Эх сурвалжийг харах

reactor:事件分类选择问题修复;

zhangchong 10 сар өмнө
parent
commit
9f8a753181

+ 273 - 0
src/components/Hotspot/event.vue

@@ -0,0 +1,273 @@
+<template>
+  <el-select
+    v-model="state.id"
+    :disabled="props.disabled"
+    :placeholder="props.placeholder"
+    ref="selectRef"
+    :clearable="props.clearable"
+    @clear="clear"
+    :filterable="props.filterable"
+    :filter-method="filterMethod"
+  >
+    <template #default>
+      <el-option hidden key="id" :value="state.id" :label="state.name"> </el-option>
+      <el-tree
+        node-key="id"
+        :load="loadNode"
+        lazy
+        v-if="lazyShow"
+        :props="treeProps"
+        :filter-node-method="filterNode"
+        @node-click="nodeClick"
+        :default-expanded-keys="state.externalArr"
+        v-loading="loading"
+        highlight-current
+        check-strictly
+        ref="treeRef"
+        :show-checkbox="props.showCheckbox"
+        @check="checkChange"
+        check-on-click-node
+        :expand-on-click-node="expandOnClickNode"
+      />
+      <el-tree
+        ref="treeRef"
+        :data="state.treeData"
+        node-key="id"
+        v-else
+        default-expand-all
+        highlight-current
+        :props="treeProps"
+        v-loading="loading"
+        :filter-node-method="filterNode"
+        @node-click="nodeClick"
+        check-strictly
+        :show-checkbox="props.showCheckbox"
+        @check="checkChange"
+        check-on-click-node
+      />
+    </template>
+    <template #footer v-if="props.showCheckbox">
+      <div class="flex-end">
+        <el-button type="primary" @click="chooseHotSpot" size="small">确定</el-button>
+        <el-button @click="reset" size="small">重置</el-button>
+      </div>
+    </template>
+  </el-select>
+</template>
+<script setup lang="ts">
+import { computed, 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: () => '',
+  },
+  disabled: {
+    type: Boolean,
+    default: false,
+  },
+  placeholder: {
+    type: String,
+    default: '请选择',
+  },
+  externalArr: {
+    // 外部传入的父级id数组 懒加载时使用
+    type: Array,
+    default: () => [],
+  },
+  showCheckbox: {
+    // 是否显示多选
+    type: Boolean,
+    default: false,
+  },
+  clearable: {
+    type: Boolean,
+    default: false,
+  },
+  checkStrictly: {
+    // 任意一级
+    type: Boolean,
+    default: false,
+  },
+  filterable: {
+    type: Boolean,
+    default: true,
+  },
+} as any);
+// 选择节点展开
+const expandOnClickNode = computed(() => {
+  return !props.checkStrictly;
+});
+const treeProps = computed(() => {
+  return {
+    label: 'eventFullName',
+    children: 'children',
+    isLeaf: 'hasChild',
+  };
+});
+
+const emit = defineEmits(['choose', 'update:modelValue', 'confirm']);
+
+const state = reactive<any>({
+  id: '',
+  name: '',
+  treeData: [],
+  externalArr: [],
+  external: [],
+  checkedKeys: [],
+  checkNodes: [],
+});
+
+watch(
+  () => props.externalArr,
+  (val) => {
+    if (val) {
+      state.externalArr = val;
+    }
+  },
+  { immediate: true }
+);
+
+const lazyShow = ref(true);
+const loading = ref(false);
+// 懒加载
+const treeRef = ref<RefType>();
+const loadNode = async (node: any, resolve: any) => {
+  if (node.isLeaf) return resolve([]);
+  const { showCheckbox, modelValue } = props;
+  try {
+    loading.value = true;
+    const { result } = await treeEventClass({ id: node.data.id ? node.data.id : null });
+    resolve(result);
+    state.id = modelValue;
+    if (showCheckbox) {
+      treeRef.value.setCheckedKeys(modelValue);
+      const nodes = treeRef.value.getCheckedNodes();
+      state.name = nodes.map((item: any) => item.eventFullName).join(',') ?? '';
+    } else {
+      treeRef.value.setCurrentKey(modelValue);
+      const currentNode = treeRef.value.getNode(modelValue);
+       state.name = currentNode.data.eventFullName;
+    }
+    loading.value = false;
+  } catch (e) {
+    loading.value = false;
+  }
+};
+// 搜索
+const filterMethod = (value: string) => {
+  if (value) {
+    lazyShow.value = false; //当输入框有值时关闭懒加载
+    loading.value = true;
+    treeEventClassSearch(value)
+      .then((res) => {
+        //获取后端搜索的数据 	//selectMacTree是我自己的后端接口,你们换成自己的
+        state.treeData.length = 0;
+        state.treeData = res.result ?? [];
+        treeRef.value!.filter(value);
+        if (props.showCheckbox && state.checkedKeys.length) {
+          treeRef.value.setCheckedKeys(state.checkedKeys);
+        }
+        if (props.modelValue) {
+          setTimeout(() => {
+            treeRef.value.setCurrentKey(props.modelValue);
+          }, 100);
+        }
+        loading.value = false;
+      })
+      .catch((e) => {
+        loading.value = false;
+      });
+  } else if (value == '' || value == ' ' || value == null) {
+    lazyShow.value = true; // 懒加载树显示
+  }
+};
+// 查询
+const filterNode = (value: string, data: any) => {
+  if (!value) return true;
+  return data.hotSpotFullName.includes(value);
+};
+// 单选
+const selectRef = ref<RefType>();
+const nodeClick = async (val: any, node: any) => {
+  const { showCheckbox, checkStrictly } = props;
+  if (showCheckbox) return;
+  if (checkStrictly) {
+    state.externalArr = [];
+    state.external = [];
+    state.externalArr = getParentId(node, state.external);
+    state.name = val.eventFullName;
+    state.id = val.id;
+    emit('update:modelValue', val.id);
+    emit('choose', { externalArr: state.externalArr, ...val });
+    selectRef.value.blur();
+  }
+  if (!node?.isLeaf) return;
+  state.externalArr = [];
+  state.external = [];
+  state.externalArr = getParentId(node, state.external);
+   state.name = val.eventFullName;
+  state.id = val.id;
+  emit('update:modelValue', val.id);
+  emit('choose', { externalArr: state.externalArr, ...val });
+  selectRef.value.blur();
+};
+// 多选
+const checkChange = (val: any, e: any) => {
+  const { showCheckbox } = props;
+  if (!showCheckbox) return;
+  const current = treeRef.value.getNode(val);
+  state.checkedKeys = e.checkedKeys;
+  state.checkedNodes = e.checkedNodes;
+  state.id = e.checkedKeys;
+   state.name = e.checkedNodes.map((item: any) => item.eventFullName).join(',') ?? '';
+  if (props.externalArr.length) {
+    state.externalArr = props.externalArr.concat(getParentId(current, state.external));
+  } else {
+    state.externalArr = getParentId(current, state.external);
+  }
+  emit('choose', state.checkedKeys, state.checkedNodes, state.externalArr);
+  emit('update:modelValue', e.checkedKeys);
+};
+// 多选确定
+const chooseHotSpot = () => {
+  emit('confirm', state.checkedKeys, state.checkedNodes, state.externalArr);
+  selectRef.value.blur();
+};
+// 重置
+const reset = () => {
+  state.checkedKeys = [];
+  treeRef.value.setCheckedKeys([]);
+  state.name = '';
+  emit('update:modelValue', []);
+};
+// 递归查找父级Id
+const getParentId = (val: any, arr: string[]) => {
+  if (val.data.parentId) {
+    arr.push(val.data.parentId);
+    getParentId(val.parent, arr);
+  }
+  return removeDuplicate(arr);
+};
+// 清空
+const clear = () => {
+  if (props.showCheckbox) {
+    state.checkedKeys = [];
+    treeRef.value.setCheckedKeys([]);
+    state.name = '';
+    state.id = [];
+    emit('update:modelValue', []);
+  } else {
+    state.id = '';
+    state.name = '';
+    treeRef.value.setCurrentKey(null);
+    emit('update:modelValue', '');
+  }
+};
+defineExpose({
+  reset,
+  clear,
+});
+</script>

+ 12 - 27
src/components/Hotspot/index.vue

@@ -55,7 +55,7 @@
 	</el-select>
 </template>
 <script setup lang="ts">
-import { computed, reactive, ref, watch } from 'vue';
+import { computed, nextTick, reactive, ref, watch } from "vue";
 import { hotSpotSearch, hotSpotType } from '@/api/business/order';
 import { removeDuplicate } from '@/utils/arrayOperation';
 import { treeEventClass, treeEventClassSearch } from '@/api/auxiliary/eventClass';
@@ -65,10 +65,6 @@ const props = defineProps({
 		type: [String, Array],
 		default: () => '',
 	},
-	type: {
-		type: String,
-		default: 'hotspot',
-	},
 	disabled: {
 		type: Boolean,
 		default: false,
@@ -101,16 +97,13 @@ const props = defineProps({
 		default: true,
 	},
 } as any);
-const inputPlaceholder = computed(() => {
-	return props.type === 'hotspot' ? '热点名称' : '事件名称';
-});
 // 选择节点展开
 const expandOnClickNode = computed(() => {
 	return !props.checkStrictly;
 });
 const treeProps = computed(() => {
 	return {
-		label: props.type === 'hotspot' ? 'hotSpotFullName' : 'eventFullName',
+		label: 'hotSpotFullName',
 		children: 'children',
 		isLeaf: 'hasChild',
 	};
@@ -144,23 +137,20 @@ const loading = ref(false);
 const treeRef = ref<RefType>();
 const loadNode = async (node: any, resolve: any) => {
 	if (node.isLeaf) return resolve([]);
-	const { showCheckbox, type, modelValue } = props;
+	const { showCheckbox, modelValue } = props;
 	try {
 		loading.value = true;
-		const method = type === 'hotspot' ? hotSpotType : treeEventClass;
-		const { result } = await method({ id: node.data.id ? node.data.id : null });
+		const { result } = await hotSpotType({ id: node.data.id ? node.data.id : null });
 		resolve(result);
 		state.id = modelValue;
 		if (showCheckbox) {
 			treeRef.value.setCheckedKeys(modelValue);
 			const nodes = treeRef.value.getCheckedNodes();
-			if (type === 'hotspot') state.name = nodes.map((item: any) => item.hotSpotFullName).join(',') ?? '';
-			else state.name = nodes.map((item: any) => item.eventFullName).join(',') ?? '';
+			state.name = nodes.map((item: any) => item.hotSpotFullName).join(',') ?? '';
 		} else {
 			treeRef.value.setCurrentKey(modelValue);
 			const currentNode = treeRef.value.getNode(modelValue);
-			if (type === 'hotspot') state.name = currentNode.data.hotSpotFullName;
-			else state.name = currentNode.data.eventFullName;
+			state.name = currentNode.data.hotSpotFullName;
 		}
 		loading.value = false;
 	} catch (e) {
@@ -172,9 +162,7 @@ const filterMethod = (value: string) => {
 	if (value) {
 		lazyShow.value = false; //当输入框有值时关闭懒加载
 		loading.value = true;
-		const { type } = props;
-		const method = type === 'hotspot' ? hotSpotSearch : treeEventClassSearch;
-		method(value)
+    hotSpotSearch(value)
 			.then((res) => {
 				//获取后端搜索的数据 	//selectMacTree是我自己的后端接口,你们换成自己的
 				state.treeData.length = 0;
@@ -205,14 +193,13 @@ const filterNode = (value: string, data: any) => {
 // 单选
 const selectRef = ref<RefType>();
 const nodeClick = async (val: any, node: any) => {
-	const { showCheckbox, checkStrictly, type } = props;
+	const { showCheckbox, checkStrictly } = props;
 	if (showCheckbox) return;
 	if (checkStrictly) {
 		state.externalArr = [];
 		state.external = [];
 		state.externalArr = getParentId(node, state.external);
-		if (type === 'hotspot') state.name = val.hotSpotFullName;
-		else state.name = val.eventFullName;
+		state.name = val.hotSpotFullName;
 		state.id = val.id;
 		emit('update:modelValue', val.id);
 		emit('choose', { externalArr: state.externalArr, ...val });
@@ -222,8 +209,7 @@ const nodeClick = async (val: any, node: any) => {
 	state.externalArr = [];
 	state.external = [];
 	state.externalArr = getParentId(node, state.external);
-	if (type === 'hotspot') state.name = val.hotSpotFullName;
-	else state.name = val.eventFullName;
+	state.name = val.hotSpotFullName;
 	state.id = val.id;
 	emit('update:modelValue', val.id);
 	emit('choose', { externalArr: state.externalArr, ...val });
@@ -231,14 +217,13 @@ const nodeClick = async (val: any, node: any) => {
 };
 // 多选
 const checkChange = (val: any, e: any) => {
-	const { showCheckbox, type } = props;
+	const { showCheckbox } = props;
 	if (!showCheckbox) return;
 	const current = treeRef.value.getNode(val);
 	state.checkedKeys = e.checkedKeys;
 	state.checkedNodes = e.checkedNodes;
 	state.id = e.checkedKeys;
-	if (type === 'hotspot') state.name = e.checkedNodes.map((item: any) => item.hotSpotFullName).join(',') ?? '';
-	else state.name = e.checkedNodes.map((item: any) => item.eventFullName).join(',') ?? '';
+	state.name = e.checkedNodes.map((item: any) => item.hotSpotFullName).join(',') ?? '';
 	if (props.externalArr.length) {
 		state.externalArr = props.externalArr.concat(getParentId(current, state.external));
 	} else {

+ 8 - 11
src/views/auxiliary/eventClass/component/Event-add.vue

@@ -14,16 +14,13 @@
 				</el-col>
 				<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
 					<el-form-item label="上级事件" prop="parentId" :rules="[{ required: false, message: '请选择上级事件', trigger: 'change' }]">
-						<hot-spot-select
-							v-model="state.ruleForm.parentId"
-							class="w100"
-							:externalArr="state.eventExternal"
-							type="event"
-							placeholder="请选择上级事件"
-							checkStrictly
-							clearable
-							ref="eventSelectRef"
-						/>
+            <event-select
+              v-model="state.ruleForm.parentId"
+              class="w100"
+              placeholder="请选择上级事件"
+              clearable
+              ref="eventSelectRef"
+            />
 					</el-form-item>
 				</el-col>
 			</el-row>
@@ -42,7 +39,7 @@ import { reactive, ref, defineAsyncComponent } from 'vue';
 import { ElMessage, FormInstance } from 'element-plus';
 import { treeEventClassAdd } from '@/api/auxiliary/eventClass';
 
-const HotSpotSelect = defineAsyncComponent(() => import('@/components/Hotspot/index.vue')); // 选择热点
+const EventSelect = defineAsyncComponent(() => import('@/components/Hotspot/event.vue')); // 选择事件
 // 定义子组件向父组件传值/事件
 const emit = defineEmits(['updateList']);
 

+ 75 - 75
src/views/todo/seats/accept/index.vue

@@ -209,69 +209,69 @@
 											state.ruleForm.ageRange = val?.dicDataName ?? null;
 											state.ruleForm.ageRangeCode = val?.dicDataValue ?? null;
 										}"
-                    >
-                      <el-option v-for="item in state.ageRangeOptions" :key="item.dicDataValue" :label="item.dicDataName" :value="item" />
-                    </el-select>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
-                  <el-form-item label="联系电话" prop="contact" :rules="[{ required: true, message: '请填写联系电话', trigger: 'blur' }]">
-                    <el-row :gutter="9">
-                      <el-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
-                        <el-input v-model="state.ruleForm.contact" placeholder="请填写联系电话" @blur="searchHistory" clearable> </el-input>
-                      </el-col>
-                      <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
-                        <el-checkbox v-model="state.ruleForm.acceptSms" label="受理短信" />
-                      </el-col>
-                    </el-row>
-                  </el-form-item>
-                </el-col>
-                <!-- 当“来电/信人身份”为“企业”时必填 -->
-                <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
-                  <el-form-item
-                    label="企业名称"
-                    prop="enterpriseName"
-                    :rules="[{ required: state.ruleForm.identityType === 2, message: '请填写企业名称', trigger: 'blur' }]"
-                  >
-                    <el-input v-model="state.ruleForm.enterpriseName" placeholder="请填写企业名称" clearable> </el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
-                  <el-form-item
-                    label="专班名称"
-                    prop="zhuanBanMingCheng"
-                    :rules="[{ required: state.ruleForm.identityType === 2, message: '请填写专班名称', trigger: 'blur' }]"
-                  >
-                    <el-input v-model="state.ruleForm.zhuanBanMingCheng" placeholder="请填写专班名称" clearable>
-                      <template #append>
-                        <el-button type="primary" @click="handleSelect"><SvgIcon name="ele-Search" class="mr4" /> 查询企业</el-button>
-                      </template>
-                    </el-input>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-              <p class="border-title mb10">诉求信息</p>
-              <el-row>
-                <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12" v-if="state.ruleForm.no">
-                  <el-form-item label="工单编码">
-                    {{ state.ruleForm.no }} <span v-if="state.ruleForm?.password">【{{ state.ruleForm.password }}】</span>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
-                  <el-form-item label="拓展信息">
-                    <el-button @click="showExpandForm" :loading="extraLoading">
-                      <SvgIcon name="ele-CirclePlus" class="mr3" size="16px" /> 拓展信息
-                    </el-button>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
-                  <el-form-item label="受理类型" prop="acceptTypeObj" :rules="[{ required: true, message: '请选择受理类型', trigger: 'change' }]">
-                    <el-select
-                      v-model="state.ruleForm.acceptTypeObj"
-                      placeholder="请选择受理类型"
-                      class="w100"
-                      value-key="dicDataValue"
-                      @change="
+										>
+											<el-option v-for="item in state.ageRangeOptions" :key="item.dicDataValue" :label="item.dicDataName" :value="item" />
+										</el-select>
+									</el-form-item>
+								</el-col>
+								<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
+									<el-form-item label="联系电话" prop="contact" :rules="[{ required: true, message: '请填写联系电话', trigger: 'blur' }]">
+										<el-row :gutter="9">
+											<el-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
+												<el-input v-model="state.ruleForm.contact" placeholder="请填写联系电话" @blur="searchHistory" clearable> </el-input>
+											</el-col>
+											<el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
+												<el-checkbox v-model="state.ruleForm.acceptSms" label="受理短信" />
+											</el-col>
+										</el-row>
+									</el-form-item>
+								</el-col>
+								<!-- 当“来电/信人身份”为“企业”时必填 -->
+								<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
+									<el-form-item
+										label="企业名称"
+										prop="enterpriseName"
+										:rules="[{ required: state.ruleForm.identityType === 2, message: '请填写企业名称', trigger: 'blur' }]"
+									>
+										<el-input v-model="state.ruleForm.enterpriseName" placeholder="请填写企业名称" clearable> </el-input>
+									</el-form-item>
+								</el-col>
+								<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
+									<el-form-item
+										label="专班名称"
+										prop="zhuanBanMingCheng"
+										:rules="[{ required: state.ruleForm.identityType === 2, message: '请填写专班名称', trigger: 'blur' }]"
+									>
+										<el-input v-model="state.ruleForm.zhuanBanMingCheng" placeholder="请填写专班名称" clearable>
+											<template #append>
+												<el-button type="primary" @click="handleSelect"><SvgIcon name="ele-Search" class="mr4" /> 查询企业</el-button>
+											</template>
+										</el-input>
+									</el-form-item>
+								</el-col>
+							</el-row>
+							<p class="border-title mb10">诉求信息</p>
+							<el-row>
+								<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12" v-if="state.ruleForm.no">
+									<el-form-item label="工单编码">
+										{{ state.ruleForm.no }} <span v-if="state.ruleForm?.password">【{{ state.ruleForm.password }}】</span>
+									</el-form-item>
+								</el-col>
+								<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
+									<el-form-item label="拓展信息">
+										<el-button @click="showExpandForm" :loading="extraLoading">
+											<SvgIcon name="ele-CirclePlus" class="mr3" size="16px" /> 拓展信息
+										</el-button>
+									</el-form-item>
+								</el-col>
+								<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
+									<el-form-item label="受理类型" prop="acceptTypeObj" :rules="[{ required: true, message: '请选择受理类型', trigger: 'change' }]">
+										<el-select
+											v-model="state.ruleForm.acceptTypeObj"
+											placeholder="请选择受理类型"
+											class="w100"
+											value-key="dicDataValue"
+											@change="
 												(val) => {
 													state.ruleForm.acceptType = val?.dicDataName ?? null;
 													state.ruleForm.acceptTypeCode = val?.dicDataValue ?? null;
@@ -315,12 +315,11 @@
 								<!-- 宜宾特殊需求,新增一个事件分类可以自行维护(辅助功能-事件分类管理) -->
 								<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" v-if="AppConfigInfo.isCustomEvent">
 									<el-form-item label="事件分类" prop="eventCategoryId" :rules="[{ required: true, message: '请选择事件分类', trigger: 'change' }]">
-										<hot-spot-select
+										<event-select
+											@choose="chooseEvent"
 											v-model="state.ruleForm.eventCategoryId"
-											class="w100"
 											:externalArr="state.eventCategoryExternal"
-											@choose="chooseEvent"
-											type="event"
+											class="w100"
 											placeholder="请选择事件分类"
 											clearable
 										/>
@@ -595,6 +594,7 @@ const ProcessAudit = defineAsyncComponent(() => import('@/components/ProcessAudi
 const MapDialog = defineAsyncComponent(() => import('@/views/todo/seats/accept/Map-Dialog.vue')); // 地图定位
 const CompanySearch = defineAsyncComponent(() => import('@/views/todo/seats/accept/Company-search.vue')); // 企业搜索
 const HotSpotSelect = defineAsyncComponent(() => import('@/components/Hotspot/index.vue')); // 选择热点
+const EventSelect = defineAsyncComponent(() => import('@/components/Hotspot/event.vue')); // 选择事件
 const RealTimeQuality = defineAsyncComponent(() => import('@/views/todo/seats/accept/Real-time-quality.vue')); // 实时质检
 const ScriptNavigation = defineAsyncComponent(() => import('@/views/todo/seats/accept/Script-navigation.vue')); // 话术导航
 const CallSummary = defineAsyncComponent(() => import('@/views/todo/seats/accept/Call-summary.vue')); // 呼叫小结
@@ -1088,14 +1088,14 @@ const chooseAdvice = (item: any) => {
 };
 // 流程提交成功
 const orderProcessSuccess = () => {
-  // 关闭当前 tagsView
-  mittBus.emit('onCurrentContextmenuClick', Object.assign({}, { contextMenuClickId: 1, ...route }));
-  mittBus.emit('clearCache', 'order');
-  mittBus.emit('clearCache', 'todoSeats');
-  mittBus.emit('clearCache', 'todoOrder');
-  mittBus.emit('clearCache', 'todoCenter');
-  mittBus.emit('clearCache', 'callLog');
-  router.go(-1);
+	// 关闭当前 tagsView
+	mittBus.emit('onCurrentContextmenuClick', Object.assign({}, { contextMenuClickId: 1, ...route }));
+	mittBus.emit('clearCache', 'order');
+	mittBus.emit('clearCache', 'todoSeats');
+	mittBus.emit('clearCache', 'todoOrder');
+	mittBus.emit('clearCache', 'todoCenter');
+	mittBus.emit('clearCache', 'callLog');
+	router.go(-1);
 };
 // 取消
 const onCancel = () => {