Explorar el Código

reactor:外部数据没有热点分类和受理类型调整;

zhangchong hace 9 meses
padre
commit
1c5a0b8756

+ 4 - 4
src/components/Hotspot/event.vue

@@ -55,14 +55,14 @@
 	</el-select>
 </template>
 <script setup lang="ts">
-import { computed, reactive, ref, watch } from 'vue';
+import {computed, PropType, reactive, ref, watch} from 'vue';
 import { removeDuplicate } from '@/utils/arrayOperation';
 import { treeEventClass, treeEventClassSearch } from '@/api/auxiliary/eventClass';
 
 const props = defineProps({
 	modelValue: {
-		type: [String, Array],
-		default: () => '',
+		type: [String, Array, null,undefined] as PropType<string | null | Array<object> | undefined>,
+		default: () => null,
 	},
 	disabled: {
 		type: Boolean,
@@ -152,7 +152,7 @@ const loadNode = async (node: any, resolve: any) => {
 		loading.value = true;
 		const { result } = await treeEventClass({ id: node.data.id ? node.data.id : null });
 		resolve(result);
-		state.id = childValue.value;
+		state.id = childValue.value ?? '';
 		if (showCheckbox) {
 			treeRef.value.setCheckedKeys(childValue.value);
 			const nodes = treeRef.value.getCheckedNodes();

+ 6 - 4
src/components/Hotspot/index.vue

@@ -55,7 +55,7 @@
 	</el-select>
 </template>
 <script setup lang="ts">
-import { computed, nextTick, PropType, reactive, ref, watch } from 'vue';
+import {computed, nextTick, onMounted, PropType, reactive, ref, watch} from 'vue';
 import { hotSpotSearch, hotSpotType } from '@/api/business/order';
 import { removeDuplicate } from '@/utils/arrayOperation';
 
@@ -108,7 +108,7 @@ const treeProps = computed(() => {
 	};
 });
 
-const emit = defineEmits(['choose', 'update:modelValue', 'confirm']);
+const emit = defineEmits(['choose', 'update:modelValue', 'confirm','getCurrentData']);
 
 const state = reactive<any>({
 	id: '',
@@ -153,15 +153,17 @@ const loadNode = async (node: any, resolve: any) => {
 		loading.value = true;
 		const { result } = await hotSpotType({ id: node.data.id ? node.data.id : null });
 		resolve(result);
-		state.id = childValue.value;
+		state.id = childValue.value ?? '';
 		if (showCheckbox) {
 			treeRef.value.setCheckedKeys(childValue.value);
 			const nodes = treeRef.value.getCheckedNodes();
 			state.name = nodes.map((item: any) => item.hotSpotFullName).join(',') ?? '';
+      emit('getCurrentData', nodes)
 		} else {
 			treeRef.value.setCurrentKey(childValue.value);
 			const currentNode = treeRef.value.getNode(childValue.value);
 			state.name = currentNode.data.hotSpotFullName;
+      emit('getCurrentData', currentNode)
 		}
 		loading.value = false;
 	} catch (e) {
@@ -277,6 +279,6 @@ const clear = () => {
 };
 defineExpose({
 	reset,
-	clear,
+	clear
 });
 </script>

+ 1 - 0
src/layout/navBars/breadcrumb/ybTel.vue

@@ -1058,6 +1058,7 @@ const onMessage = async (event: any) => {
 						onEndAcw(); // 挂机后整理结束
 						clearTimeout(talkDealTimer.value); // 清除话后整理定时器
 					}, time);
+
 					console.log('呼叫中心:话后整理中', getNowDateTime());
 					// 如果不是话后整理中
 					await onBeginAcw(); // 挂机后整理开始

+ 2 - 6
src/views/business/visit/index.vue

@@ -2,7 +2,7 @@
 	<div class="business-visit-container layout-pd">
 		<!-- 搜索  -->
 		<el-card shadow="never">
-      <div class="flex-center-align mb20" v-auth="'business:visit:orderType'">
+      <div class="flex-center-align mb20">
         <span class="fast-search-label">工单类型</span>
         <el-radio-group v-model="state.queryParams.IsProvince" @change="handleQuery">
           <el-radio-button label="">我的</el-radio-button>
@@ -253,11 +253,7 @@ const resetQuery = (formEl: FormInstance | undefined) => {
 // 回访详情
 const visitDetailRef = ref<RefType>();
 const visitDetail = (row: any) => {
-	if ([10, 20].includes(row.visitState)) {
-		visitDetailRef.value.openDialog(row, '回访');
-	} else {
-		visitDetailRef.value.openDialog(row, '回访详情');
-	}
+  visitDetailRef.value.openDialog(row, '回访详情');
 };
 // 导出
 const exportCurrent = (cloums, prop) => {

+ 1 - 5
src/views/business/visit/reverse.vue

@@ -384,11 +384,7 @@ const resetQuery = (formEl: FormInstance | undefined) => {
 // 回访详情
 const visitDetailRef = ref<RefType>();
 const visitDetail = (row: any) => {
-	if ([10, 20].includes(row.visitState)) {
-		visitDetailRef.value.openDialog(row, '回访');
-	} else {
-		visitDetailRef.value.openDialog(row, '回访详情');
-	}
+  visitDetailRef.value.openDialog(row, '回访详情');
 };
 // 批量扭转退回
 const reverseAuditRef = ref<RefType>();

+ 0 - 8
src/views/business/visit/todo.vue

@@ -270,14 +270,6 @@ const multiplePeople = () => {
 	const ids = proTableRef.value.selectedList.map((item: any) => item.id);
 	assignReturnVisitorsRef.value.openDialog(ids);
 };
-// 智能回访
-const smartFollowUp = () => {
-	console.log('智能回访');
-};
-// 导出
-const onExport = () => {
-	console.log('导出');
-};
 // 回访
 const visitDetailRef = ref<RefType>();
 const onManpower = (row: any) => {

+ 1 - 5
src/views/judicial/statistics/detailSatisfied.vue

@@ -140,11 +140,7 @@ const visitDetail = (row: any) => {
 		orderId: row.id,
 		id: row.visitId,
 	};
-	if ([10, 20].includes(row.visitState)) {
-		visitDetailRef.value.openDialog(rowData, '回访');
-	} else {
-		visitDetailRef.value.openDialog(rowData, '回访详情');
-	}
+  visitDetailRef.value.openDialog(rowData, '回访详情');
 };
 onMounted(() => {
 	queryList();

+ 1 - 5
src/views/statistics/department/detailSatisfied.vue

@@ -156,11 +156,7 @@ const resetQuery = (formEl: FormInstance | undefined) => {
 // 回访详情
 const visitDetailRef = ref<RefType>();
 const visitDetail = (row: any) => {
-	if ([10, 20].includes(row.visitState)) {
-		visitDetailRef.value.openDialog(row.orderVisit, '回访');
-	} else {
-		visitDetailRef.value.openDialog(row.orderVisit, '回访详情');
-	}
+  visitDetailRef.value.openDialog(row.orderVisit, '回访详情');
 };
 onMounted(() => {
 	queryList();

+ 23 - 4
src/views/todo/seats/accept/index.vue

@@ -336,6 +336,8 @@
 											@choose="chooseHotSpot"
 											placeholder="请选择热点分类"
 											clearable
+											ref="hotSpotRef"
+											@getCurrentData="getCurrentData"
 										/>
 									</el-form-item>
 								</el-col>
@@ -567,7 +569,7 @@
 </template>
 
 <script setup lang="ts" name="orderAccept">
-import { computed, defineAsyncComponent, onMounted, reactive, ref, watch } from 'vue';
+import { computed, defineAsyncComponent, nextTick, onMounted, reactive, ref, watch } from 'vue';
 import type { FormInstance } from 'element-plus';
 import { ElMessage, ElMessageBox, ElNotification } from 'element-plus';
 import { storeToRefs } from 'pinia';
@@ -1167,6 +1169,7 @@ const loadBaseData = async () => {
 	}
 };
 // 如果是修改加载表单内容
+const hotSpotRef = ref();
 const loadForm = async () => {
 	state.formLoading = true;
 	if (route.query.createBy) {
@@ -1210,6 +1213,7 @@ const loadForm = async () => {
 			state.ruleForm.isRepeat = 'false';
 		}
 		if (state.ruleForm.focusOnEvents) {
+			// 重点关注事项
 			state.ruleForm.focusOnEventsArr = response.result.focusOnEvents.split(',');
 		}
 		state.ruleForm.channel = {
@@ -1236,6 +1240,13 @@ const loadForm = async () => {
 			dicDataValue: state.ruleForm.licenceTypeCode,
 			dicDataName: state.ruleForm.licenceType,
 		};
+		if (!state.ruleForm.acceptType) {
+			// 外部输入数据没有受理名称和热点名称 需要根据code调用一次change事件获取
+			const currentAcceptType = state.acceptTypeOptions.find((item: any) => {
+				return item.dicDataValue === state.ruleForm.acceptTypeCode;
+			});
+			state.ruleForm.acceptType = currentAcceptType?.dicDataName ?? '';
+		}
 		state.ruleForm.acceptTypeObj = {
 			// 受理类型
 			dicDataValue: state.ruleForm.acceptTypeCode,
@@ -1290,10 +1301,18 @@ const loadExtra = async () => {
 		extraLoading.value = false;
 	}
 };
+const getCurrentData = (val: any) => {
+	if (!state.ruleForm.hotspotName || !state.ruleForm.hotspotSpliceName) {
+		// 外部输入数据没有受理名称和热点名称
+		state.ruleForm.hotspotName = val.data.hotSpotName;
+		state.ruleForm.hotspotSpliceName = val.data.hotSpotFullName;
+		state.ruleForm.hotspotCode = val.data.provinceCode;
+	}
+};
 loadBaseData();
-loadForm();
+loadAddress();
+loadExtra();
 onMounted(async () => {
-	await loadAddress();
-	await loadExtra();
+	await loadForm();
 });
 </script>