From 58c0f11fe2f23a1be2dec768f9ac02107301a634 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 19 九月 2025 17:30:36 +0800 Subject: [PATCH] 2025.9.19 数据产品(待完成) --- src/views/fysp/data-product/base-data-product/ProdInspectionInfo.vue | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 118 insertions(+), 2 deletions(-) diff --git a/src/views/fysp/data-product/base-data-product/ProdInspectionInfo.vue b/src/views/fysp/data-product/base-data-product/ProdInspectionInfo.vue index dc19bf6..0e8db25 100644 --- a/src/views/fysp/data-product/base-data-product/ProdInspectionInfo.vue +++ b/src/views/fysp/data-product/base-data-product/ProdInspectionInfo.vue @@ -1,4 +1,120 @@ <template> - 1 + <BaseProdProcess + v-model:active="active" + @onStep1="onStep1" + @onStep2="onStep2" + @onStep3="onStep3" + :loading="loading" + > + <template #step2="{ contentHeight }"> + <el-table + id="prod-inspection-table" + :data="tableData" + v-loading="loading" + :height="contentHeight + 'px'" + table-layout="fixed" + :show-overflow-tooltip="true" + size="small" + border + > + <el-table-column fixed="left" prop="index" label="缂栧彿" width="50"> + </el-table-column> + <el-table-column + fixed="left" + prop="subTask.scensename" + label="鍚嶇О" + :show-overflow-tooltip="true" + min-width="200" + > + </el-table-column> + <el-table-column + prop="subTask.planstarttime" + label="宸℃煡鏃堕棿" + :formatter="timeFormat" + 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="subTask.townname" label="琛楅亾" width="80" /> + <el-table-column prop="problems.length" label="闂鏁�" width="60" /> + <el-table-column label="闂鎽樿" width="300"> + <template #default="{ row }"> + <template v-for="(value, index) in row.problems" :key="value.guid"> + <br v-if="index > 0" />{{ index + 1 + '銆�' + value.problemname }} + </template> + </template> + </el-table-column> + <el-table-column + prop="unChangeProblems.length" + label="鏈暣鏀规暟" + width="60" + /> + <el-table-column label="鏈暣鏀归棶棰�" width="300"> + <template #default="{ row }"> + <template + v-for="(value, index) in row.unChangeProblems" + :key="value.guid" + > + <br v-if="index > 0" />{{ index + 1 + '銆�' + value.problemname }} + </template> + </template> + </el-table-column> + <!-- <el-table-column + prop="evaluate.updatedate" + label="鏇存柊鏃堕棿" + width="140" + :formatter="timeFormat" + /> --> + </el-table> + </template> + </BaseProdProcess> </template> -<script></script> \ No newline at end of file +<script setup> +import { ref, inject } from 'vue'; +import dayjs from 'dayjs'; +import BaseProdProcess from '@/views/fysp/data-product/components/BaseProdProcess.vue'; +import dataprodbaseApi from '@/api/fysp/dataprodbaseApi.js'; +import { conversionFromTable } from '@/utils/excel'; +import { useProdStepChange } from '@/views/fysp/data-product/prod-step-change.js'; + +const { active, changeActive } = useProdStepChange(); +const loading = ref(false); +const tableData = ref([]); + +function onStep1(opt) { + loading.value = true; + dataprodbaseApi + .fetchProdInspectionInfo(opt) + .then((res) => { + if (res.success) { + tableData.value = res.data.map((item) => { + return { + ...item, + unChangeProblems: item.problems.filter((p) => !p.ischanged) + }; + }); + } + changeActive(); + }) + .finally(() => { + loading.value = false; + }); +} + +function onStep2() { + changeActive(); +} + +function onStep3(val) { + if (val.downloadType == '1') { + loading.value = true; + conversionFromTable('prod-inspection-table', '鏁存敼娓呭崟'); + loading.value = false; + } +} + +function timeFormat(row, column, cellValue, index) { + return dayjs(cellValue).format('YYYY-MM-DD'); +} +</script> -- Gitblit v1.9.3