From ce51d7719b4d908da5577751f0c840fab5d1a39e Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 19 四月 2024 17:45:54 +0800 Subject: [PATCH] 20240419 --- src/views/fysp/scene/SceneInfo.vue | 46 ++++++++++++++++++++++++++-------------------- 1 files changed, 26 insertions(+), 20 deletions(-) diff --git a/src/views/fysp/scene/SceneInfo.vue b/src/views/fysp/scene/SceneInfo.vue index b3e7682..a207662 100644 --- a/src/views/fysp/scene/SceneInfo.vue +++ b/src/views/fysp/scene/SceneInfo.vue @@ -17,6 +17,10 @@ ></FYOptionOnlineStatus> </template> + <template #buttons> + <CompSceneImport></CompSceneImport> + </template> + <template #table-column> <el-table-column fixed="left" prop="name" label="鍚嶇О" width="400"> <template #default="scope"> @@ -65,45 +69,47 @@ import { useLoadingStore } from '@/stores/loadingStore'; import { mapStores } from 'pinia'; import { useMessageBoxTip } from '@/composables/messageBox'; +import CompSceneImport from "./CompSceneImport.vue"; export default { + components: { + CompSceneImport, + }, data() { return { formSearch: { _locations: {}, scensetype: {}, - online: {}, - }, + online: {} + } }; }, computed: { - ...mapStores(useLoadingStore), + ...mapStores(useLoadingStore) }, methods: { onSearch(page, func) { const f = this.formSearch; const area = {}; // 琛屾斂鍖哄垝 - area.provincecode = f._locations.pCode - area.citycode = f._locations.cCode - area.districtcode = f._locations.dCode - area.towncode = f._locations.tCode + area.provincecode = f._locations.pCode; + area.citycode = f._locations.cCode; + area.districtcode = f._locations.dCode; + area.towncode = f._locations.tCode; // 鍦烘櫙绫诲瀷 area.scensetypeid = f.scensetype.value; if (area.scensetypeid == '0') area.scensetypeid = null; // 涓婁笅绾跨姸鎬� area.online = f.online.value; - return sceneApi - .searchScene(area, page.currentPage, page.pageSize) - .then((res) => { - if (res.success) { - func({ - data: res.data, - total: res.head.totalCount, - }); - } - }); + return sceneApi.searchScene(area, page.currentPage, page.pageSize).then((res) => { + if (res.success) { + func({ + data: res.data, + total: res.head.totalCount + }); + } + }); }, itemEdit(scope) { scope.row.loading1 = true; @@ -130,10 +136,10 @@ .finally(() => { scope.row.loading2 = false; }); - }, + } }); - }, - }, + } + } }; </script> -- Gitblit v1.9.3