| | |
| | | <template> |
| | | <BaseProdProcess :active="active"> |
| | | <template #step1> |
| | | <BaseProdProcess |
| | | v-model:active="active" |
| | | @onStep1="onStep1" |
| | | :loading="loading" |
| | | > |
| | | <!-- <template #step1> |
| | | <ProdQueryOpt :loading="loading" @submit="onSearch"> </ProdQueryOpt> |
| | | </template> --> |
| | | <template #step2="{ contentHeight }"> |
| | | <el-table |
| | | :data="tableData" |
| | | v-loading="loading" |
| | | :height="viewHeight" |
| | | table-layout="fixed" |
| | | :show-overflow-tooltip="true" |
| | | size="small" |
| | | border |
| | | > |
| | | <el-table-column fixed="left" prop="index" label="编号" width="40"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="left" |
| | | prop="name" |
| | | label="名称" |
| | | :show-overflow-tooltip="true" |
| | | min-width="200" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="type" label="类型" width="50" /> |
| | | <el-table-column prop="status" label="状态" width="60" /> |
| | | <el-table-column prop="stage" label="阶段" width="90" /> |
| | | <!-- <el-table-column prop="provincename" label="省" width="90" /> |
| | | <el-table-column prop="cityname" label="市" width="90" /> |
| | | <el-table-column prop="districtname" label="区县" width="90" /> --> |
| | | <el-table-column prop="townname" label="街道" width="110" /> |
| | | <el-table-column prop="location" label="地址" width="200" /> |
| | | <!-- <el-table-column prop="longitude" label="经度" width="110" /> |
| | | <el-table-column prop="latitude" label="纬度" width="110" /> --> |
| | | <!-- <el-table-column |
| | | prop="updatedate" |
| | | label="更新时间" |
| | | width="140" |
| | | :formatter="timeFormat" |
| | | /> --> |
| | | </el-table> |
| | | </template> |
| | | <template #step2></template> |
| | | <template #step3></template> |
| | | <!-- <template #step3></template> --> |
| | | </BaseProdProcess> |
| | | </template> |
| | | <script setup> |
| | | import { ref } from 'vue'; |
| | | import { ref, inject } from 'vue'; |
| | | import dayjs from 'dayjs'; |
| | | import BaseProdProcess from '@/views/fysp/data-product/base-data-product/components/BaseProdProcess.vue'; |
| | | import ProdQueryOpt from '@/views/fysp/data-product/base-data-product/components/ProdQueryOpt.vue'; |
| | | import dataprodbaseApi from '@/api/fysp/dataprodbaseApi.js'; |
| | | |
| | | const active = ref(1); |
| | | const loading = ref(false) |
| | | const loading = ref(false); |
| | | const tableData = ref([]); |
| | | const viewHeight = inject('viewHeight'); |
| | | |
| | | function changeActive() { |
| | | active.value++; |
| | | active.value = active.value > 3 ? 1 : active.value; |
| | | } |
| | | |
| | | function onSearch(opt) { |
| | | console.log(opt); |
| | | function onStep1(opt) { |
| | | loading.value = true; |
| | | setTimeout(() => { |
| | | changeActive() |
| | | dataprodbaseApi |
| | | .fetchProdSceneInfo(opt) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | tableData.value = res.data.map((item) => ({ |
| | | status: item.status, |
| | | stage: item.stage, |
| | | ...item.scene |
| | | })); |
| | | } |
| | | changeActive(); |
| | | }) |
| | | .finally(() => { |
| | | loading.value = false; |
| | | }, 1000); |
| | | }); |
| | | } |
| | | |
| | | function timeFormat(row, column, cellValue, index) { |
| | | return dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss'); |
| | | } |
| | | </script> |