|
@@ -129,11 +129,11 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup lang="tsx" name="todoSeats">
|
|
|
-import { computed, defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
|
|
+import { computed, defineAsyncComponent, onActivated, onBeforeUnmount, onDeactivated, onMounted, reactive, ref } from 'vue';
|
|
|
import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
import { seatsListTodo, orderSign, orderListTodoCount } from '@/api/todo/order';
|
|
|
-import { exportAssignment } from '@/utils/tools';
|
|
|
+import { debounce, exportAssignment } from '@/utils/tools';
|
|
|
import { defaultTimeStartEnd, shortcuts } from '@/utils/constants';
|
|
|
import Other from '@/utils/other';
|
|
|
import { treeArea } from '@/api/auxiliary/area';
|
|
@@ -141,6 +141,7 @@ import { centerTodoBase } from '@/api/todo/center';
|
|
|
import { LZTableHeader, YBTableHeader, ZGTableHeader } from '@/views/todo/seats/tableHeader';
|
|
|
import { useThemeConfig } from '@/stores/themeConfig';
|
|
|
import { storeToRefs } from 'pinia';
|
|
|
+import mittBus from '@/utils/mitt';
|
|
|
// 引入组件
|
|
|
const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
|
|
|
const pagination = defineAsyncComponent(() => import('@/components/ProTable/components/Pagination.vue')); // 分页
|
|
@@ -369,4 +370,15 @@ onMounted(() => {
|
|
|
getTotal();
|
|
|
});
|
|
|
});
|
|
|
+const handleEvent = debounce(() => {
|
|
|
+ handleQuery();
|
|
|
+}, 1000);
|
|
|
+onActivated(() => {
|
|
|
+ mittBus.on('clearCachePage', () => {
|
|
|
+ handleEvent();
|
|
|
+ });
|
|
|
+});
|
|
|
+onBeforeUnmount(() => {
|
|
|
+ mittBus.off('clearCachePage');
|
|
|
+});
|
|
|
</script>
|