riku
2024-04-19 ce51d7719b4d908da5577751f0c840fab5d1a39e
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,42 +69,44 @@
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) => {
      return sceneApi.searchScene(area, page.currentPage, page.pageSize).then((res) => {
          if (res.success) {
            func({
              data: res.data,
              total: res.head.totalCount,
            total: res.head.totalCount
            });
          }
        });
@@ -130,10 +136,10 @@
            .finally(() => {
              scope.row.loading2 = false;
            });
        },
        }
      });
    },
  },
    }
  }
};
</script>