| | |
| | | :level="4" |
| | | v-model:value="formSearch._locations" |
| | | ></FYOptionLocation> |
| | | <FYOptionText |
| | | label="场景名称" |
| | | placeholder="输入名称关键字" |
| | | v-model:value="formSearch.searchText" |
| | | ></FYOptionText> |
| | | <FYOptionScene |
| | | :allOption="true" |
| | | :type="2" |
| | | v-model:value="formSearch.scensetype" |
| | | v-model:value="formSearch._scenetype" |
| | | ></FYOptionScene> |
| | | <FYOptionOnlineStatus |
| | | :allOption="true" |
| | | v-model:value="formSearch.online" |
| | | ></FYOptionOnlineStatus> |
| | | </template> |
| | | |
| | | <template #buttons> |
| | | <CompSceneImport></CompSceneImport> |
| | | </template> |
| | | |
| | | <template #table-column> |
| | |
| | | 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: {}, |
| | | }, |
| | | searchText: '', |
| | | _scenetype: {}, |
| | | 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; |
| | | area.scensetypeid = f._scenetype.value; |
| | | if (area.scensetypeid == '0') area.scensetypeid = null; |
| | | // 上下线状态 |
| | | area.online = f.online.value; |
| | | // 查询关键字(场景名称) |
| | | area.sceneName = f.searchText |
| | | |
| | | 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; |
| | |
| | | .finally(() => { |
| | | scope.row.loading2 = false; |
| | | }); |
| | | }, |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |