Browse Source

reactor:综合查询新增查询条件;

zhangchong 6 months ago
parent
commit
7b3bae0fdb
3 changed files with 49 additions and 32 deletions
  1. 2 1
      src/api/home/index.ts
  2. 3 3
      src/views/business/order/index.vue
  3. 44 28
      src/views/home/components/Home-date.vue

+ 2 - 1
src/api/home/index.ts

@@ -72,10 +72,11 @@ export const getHomeData2 = () => {
  * @description 获取加密后的用户名
  * @return {*}
  */
-export const getUserNameApi = () => {
+export const getUserNameApi = (params?: object) => {
 	return request({
 		url: '/api/v1/OldHotline/get_rsa_loginname',
 		method: 'get',
+		params
 	});
 };
 /**

+ 3 - 3
src/views/business/order/index.vue

@@ -379,8 +379,8 @@
 						:default-time="defaultTimeStartEnd"
 					/>
 				</el-form-item>
-				<el-form-item label="签收情况" prop="IsSgin">
-					<el-select v-model="state.queryParams.IsSgin" placeholder="请选择签收情况" clearable @change="handleQuery">
+				<el-form-item label="受理情况" prop="IsSgin">
+					<el-select v-model="state.queryParams.IsSgin" placeholder="请选择受理情况" clearable @change="handleQuery">
 						<el-option label="已签收" :value="true" />
 						<el-option label="未签收" :value="false" />
 					</el-select>
@@ -493,7 +493,7 @@ const state = reactive<any>({
 		SensitiveWord: null, // 敏感词
 		IsUrgent: null, // 是否加急
 		ContentRetrieval: null, // 内容检索
-		IsSgin:null, // 签收情况
+		IsSgin:null, // 受理情况
 	},
 	tableData: [], //表单
 	loading: false, // 加载

+ 44 - 28
src/views/home/components/Home-date.vue

@@ -3,11 +3,11 @@
 		<el-text type="danger">欢迎:{{ userInfos.name }}使用本系统!</el-text>
 		<el-text type="info" class="ml20">公历:{{ formatDate(now, 'YYYY-mm-dd HH:MM:SS WWW') }}</el-text>
 		<el-text type="info" class="ml20">农历:{{ getChineseDate() }}</el-text>
-<!--		<el-badge :is-dot="isDot" class="ml20">
-			<el-button class="share-button" type="primary" @click="linkOld" :disabled="!userNameEncryption"
-				><SvgIcon name="iconfont icon-daohang" class="mr5" size="18px" /> 一键登录到系统</el-button
+		<el-badge :is-dot="isDot" class="ml20">
+			<el-button class="share-button" type="primary" @click="linkOld" :disabled="!userNameEncryptionEnCode"
+				><SvgIcon name="iconfont icon-daohang" class="mr5" size="18px" /> 一键登录到系统</el-button
 			>
-		</el-badge>-->
+		</el-badge>
 	</el-card>
 </template>
 <script setup lang="ts">
@@ -35,38 +35,54 @@ const getChineseDate = () => {
 };
 // 获取加密后的用户名
 // encodeURIComponent
-const userNameEncryption = ref('');
+const userNameEncryptionEnCode = ref(''); // 需要转码
+const userNameEncryption = ref(''); // 不需要转码
 const getUserName = () => {
-	getUserNameApi().then(res => {
-			console.log(res)
-		getOldWorkTodo();
-	}).catch(err => {
-
-	})
+	getUserNameApi({ IsUrlEncode: true })
+		.then((res) => {
+			userNameEncryptionEnCode.value = res.result;
+		})
+		.catch((err) => {});
+	getUserNameApi()
+		.then((res) => {
+			userNameEncryption.value = res.result;
+			getOldWorkTodo();
+		})
+		.catch((err) => {});
 };
 // 查询老系统的工单是否有待办 60秒查询一次
 const isDot = ref(false);
 const getOldWorkTodo = () => {
-	axios.get(AppConfigInfo.value.oldHotlineOrderState+userNameEncryption.value).then((res:any)=>{
-		console.log(res,'1111')
-	}).catch(err=>{
-		console.log(err,'222')
-	})
-	useIntervalFn(() => {
-			axios.get(AppConfigInfo.value.oldHotlineOrderState+userNameEncryption.value).then((res:any)=>{
-					console.log(res,'1111')
-			}).catch(err=>{
-				console.log(err,'222')
-			})
-		},60*1000,{ immediate: true })
-}
+	axios
+		.get(AppConfigInfo.value.oldHotlineOrderState + userNameEncryption.value)
+		.then((res: any) => {
+			console.log('旧系统的查询工单待办返回:',res);
+		})
+		.catch((err) => {
+			console.log('旧系统的查询工单待办失败:',err);
+		});
+	useIntervalFn(
+		() => {
+			axios
+				.get(AppConfigInfo.value.oldHotlineOrderState + userNameEncryption.value)
+				.then((res: any) => {
+					console.log('旧系统的查询工单待办返回:',res);
+				})
+				.catch((err) => {
+					console.log('旧系统的查询工单待办失败:',err);
+				});
+		},
+		60 * 1000,
+		{ immediate: true }
+	);
+};
 // 一建登录到老系统
 const linkOld = () => {
-	window.open(AppConfigInfo.value.oldHotlineUrl+userNameEncryption.value);
+	window.open(AppConfigInfo.value.oldHotlineUrl + userNameEncryptionEnCode.value);
 };
-onMounted(()=>{
-	// getUserName();
-})
+onMounted(() => {
+	getUserName();
+});
 </script>
 <style lang="scss" scoped>
 :deep(.el-badge__content.is-dot) {