From 43fc39451f0b48729cfec09ded6689c32ad93de3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E5=87=AF?= <2448379534@qq.com> Date: Wed, 26 Aug 2026 18:15:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A1=AB=E6=8A=A5=E6=B5=8B=E8=AF=95=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/ConfirmModal/index.vue | 2 +- .../src/components/MapModal/index.vue | 2 +- .../components/OperationLogModal/index.vue | 22 +- .../BasicData/BasicDataSearch.vue | 37 +- .../BasicData/DeleteConfirmModal.vue | 3 + .../BasicData/EditPowerModal.vue | 337 +++++------------- .../BasicData/index.vue | 18 +- .../FishResource/FishResourceSearch.vue | 2 +- .../aiBox/AiBoxSearch.vue | 2 +- .../aquaEco/OtweSearch.vue | 2 +- .../fishSurvey/FishSearch.vue | 2 +- .../guoYuSheShi/FpSearch.vue | 2 +- .../luShengShengTaiDiaoCha/TeSearch.vue | 2 +- .../qiXiDi/FhSearch.vue | 2 +- .../rescueStation/VaSearch.vue | 2 +- .../shengTaiLiuLiang/EditEqModal.vue | 19 +- .../shengTaiLiuLiang/EqSearch.vue | 2 +- .../shiPinJianKong/VdSearch.vue | 2 +- .../shuiShengShengTaiDiaoCha/WeSearch.vue | 2 +- .../shuiWenJianCe/WtSearch.vue | 2 +- .../shuiWenJianCe/index.vue | 2 +- .../shuiZhiJianCe/EditWqModal.vue | 95 +++-- .../shuiZhiJianCe/WqSearch.vue | 2 +- .../shuiZhiJianCe/index.vue | 2 +- .../sonarCam/SonarSearch.vue | 2 +- .../tempMit/DwSearch.vue | 2 +- .../conventionalHydropower/tempMit/index.vue | 4 +- .../terrEco/OtteSearch.vue | 2 +- .../zengZhiFangLiu/FbSearch.vue | 2 +- .../zhenXIZhiWuYuan/VpSearch.vue | 2 +- .../monitorData/FishData/FishDataSearch.vue | 2 +- .../FishRelease/FishReleaseSearch.vue | 2 +- .../views/monitorData/FishRelease/index.vue | 4 +- .../monitorData/FlowData/FlowDataSearch.vue | 2 +- .../src/views/monitorData/FlowData/index.vue | 2 +- .../FlowStation/FlowStationSearch.vue | 2 +- .../views/monitorData/FlowStation/index.vue | 2 +- .../SurfaceTemp/SurfaceTempSearch.vue | 2 +- .../views/monitorData/SurfaceTemp/index.vue | 2 +- .../VerticalTemp/VerticalTempSearch.vue | 2 +- .../views/monitorData/VerticalTemp/index.vue | 2 +- .../monitorData/WaterData/WaterDataSearch.vue | 2 +- .../src/views/monitorData/WaterData/index.vue | 2 +- .../fishSurveyData/fishSurveyDataSearch.vue | 2 +- frontend/.env.development | 2 +- .../DZShuiZhiJianCeQuShiTu/index.vue | 78 ++-- .../BasicData/BasicDataSearch.vue | 16 +- .../BasicData/EditPowerModal.vue | 278 +++++++-------- .../BasicData/index.vue | 15 +- 49 files changed, 464 insertions(+), 534 deletions(-) diff --git a/frontend-sjgl/src/components/ConfirmModal/index.vue b/frontend-sjgl/src/components/ConfirmModal/index.vue index a70641ed..993f91ae 100644 --- a/frontend-sjgl/src/components/ConfirmModal/index.vue +++ b/frontend-sjgl/src/components/ConfirmModal/index.vue @@ -27,7 +27,7 @@ v-model:value="sourceValue" placeholder="请输入修改依据" :rows="5" - :maxlength="500" + :maxlength="160" show-count /> diff --git a/frontend-sjgl/src/components/MapModal/index.vue b/frontend-sjgl/src/components/MapModal/index.vue index 53d32d33..a169f0e0 100644 --- a/frontend-sjgl/src/components/MapModal/index.vue +++ b/frontend-sjgl/src/components/MapModal/index.vue @@ -869,7 +869,7 @@ watch( params.sttp = params.sttpMap; } tabsConfig.value = handleTabs({ ...params }); - debugger + let value = tabsConfig.value.find((item: any) => item.default); currentActiveKey.value = value?.key; diff --git a/frontend-sjgl/src/components/OperationLogModal/index.vue b/frontend-sjgl/src/components/OperationLogModal/index.vue index bfaf6643..35ea0838 100644 --- a/frontend-sjgl/src/components/OperationLogModal/index.vue +++ b/frontend-sjgl/src/components/OperationLogModal/index.vue @@ -25,6 +25,9 @@ :columns="columns" :list-url="getOperationLogList" :transform-data="customTransform" + :searchParams="{ + sort: sort + }" > @@ -75,7 +74,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/aquaEco/OtweSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/aquaEco/OtweSearch.vue index 84d34d37..7fc9c729 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/aquaEco/OtweSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/aquaEco/OtweSearch.vue @@ -10,7 +10,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/fishSurvey/FishSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/fishSurvey/FishSearch.vue index d2eb5118..ea61816f 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/fishSurvey/FishSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/fishSurvey/FishSearch.vue @@ -10,7 +10,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/guoYuSheShi/FpSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/guoYuSheShi/FpSearch.vue index 2a0715c2..33af776c 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/guoYuSheShi/FpSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/guoYuSheShi/FpSearch.vue @@ -3,7 +3,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/luShengShengTaiDiaoCha/TeSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/luShengShengTaiDiaoCha/TeSearch.vue index 531bedab..ad0c3c59 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/luShengShengTaiDiaoCha/TeSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/luShengShengTaiDiaoCha/TeSearch.vue @@ -10,7 +10,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/qiXiDi/FhSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/qiXiDi/FhSearch.vue index 5ada932b..5dd06aaa 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/qiXiDi/FhSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/qiXiDi/FhSearch.vue @@ -10,7 +10,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/rescueStation/VaSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/rescueStation/VaSearch.vue index 18dd6a09..196e6df4 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/rescueStation/VaSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/rescueStation/VaSearch.vue @@ -10,7 +10,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/shengTaiLiuLiang/EditEqModal.vue b/frontend-sjgl/src/views/conventionalHydropower/shengTaiLiuLiang/EditEqModal.vue index 2ad26852..a9c516e9 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/shengTaiLiuLiang/EditEqModal.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/shengTaiLiuLiang/EditEqModal.vue @@ -77,11 +77,11 @@ - + @@ -97,9 +97,16 @@ - - - + + + @@ -152,7 +159,7 @@ const fieldLabelMap: Record = { stcd: '设施编码', stnm: '设施名称', sttp: '设施类型', stlc: '站址/位置', baseId: '水电基地', rstcd: '所属电站', lgtd: '经度(°)', lttd: '纬度(°)', elev: '高程(m)', swdt: '开工日期', jcdt: '建成日期', bldsttCode: '建设状态', - inv: '投资(亿元)', flkjg: '放流孔结构形式', flkq: '最大泄放流量(m³/s)', + inv: '投资(亿元)', flkq: '最大泄放流量(m³/s)', minFlow: '最小下泄生态流量(m³/s)', assessMethod: '考核方式', remark: '备注' }; diff --git a/frontend-sjgl/src/views/conventionalHydropower/shengTaiLiuLiang/EqSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/shengTaiLiuLiang/EqSearch.vue index f90b27e7..77559248 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/shengTaiLiuLiang/EqSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/shengTaiLiuLiang/EqSearch.vue @@ -3,7 +3,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/shiPinJianKong/VdSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/shiPinJianKong/VdSearch.vue index ce613b07..2410b31d 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/shiPinJianKong/VdSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/shiPinJianKong/VdSearch.vue @@ -3,7 +3,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/shuiShengShengTaiDiaoCha/WeSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/shuiShengShengTaiDiaoCha/WeSearch.vue index 8d76e111..96d91b65 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/shuiShengShengTaiDiaoCha/WeSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/shuiShengShengTaiDiaoCha/WeSearch.vue @@ -10,7 +10,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/shuiWenJianCe/WtSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/shuiWenJianCe/WtSearch.vue index 724b3ddc..5b2ea528 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/shuiWenJianCe/WtSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/shuiWenJianCe/WtSearch.vue @@ -10,7 +10,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/shuiWenJianCe/index.vue b/frontend-sjgl/src/views/conventionalHydropower/shuiWenJianCe/index.vue index d6c41c1e..c90bc8a9 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/shuiWenJianCe/index.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/shuiWenJianCe/index.vue @@ -235,7 +235,7 @@ const handleAdd = () => { editVisible.value = true; }; -// 查看修改 +// 查看操作日志 const handleSeeEdit = () => { operationLogVisible.value = true; }; diff --git a/frontend-sjgl/src/views/conventionalHydropower/shuiZhiJianCe/EditWqModal.vue b/frontend-sjgl/src/views/conventionalHydropower/shuiZhiJianCe/EditWqModal.vue index 1134facb..4ccc5298 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/shuiZhiJianCe/EditWqModal.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/shuiZhiJianCe/EditWqModal.vue @@ -49,7 +49,8 @@ :key="item.value" :label="item.label" :value="item.value" - >{{ item.label }} + >{{ item.label }} @@ -64,12 +65,22 @@ - + - + @@ -86,7 +97,8 @@ :key="item.value" :label="item.label" :value="item.value" - >{{ item.label }} + >{{ item.label }} @@ -105,7 +117,8 @@ :key="item.value" :label="item.label" :value="item.value" - >{{ item.label }} + >{{ item.label }} @@ -120,6 +133,18 @@ /> + + + + 人工 + 自动 + + + {{ item.label }} - - - - - - - 人工 - 自动 + >{{ item.label }} @@ -325,7 +339,7 @@ watch( continue; const isSelect = !!selectOptionsMap[key]; const oldDisplay = isSelect - ? (originalLabels.value[key] ?? resolveSelectLabel(key, oldNorm)) + ? originalLabels.value[key] ?? resolveSelectLabel(key, oldNorm) : oldNorm === null ? '空' : String(oldNorm); @@ -390,27 +404,27 @@ watch( ); // 选项加载完成后重新解析原始显示名,避免 record 加载时选项未就绪导致存成 code -watch( - [baseNameOptions, engInfoOptions, sttpOptions, wwqtgOptions], - () => { - const original = originalRecord.value; - if (!original || Object.keys(original).length === 0) return; - const labels: Record = {}; - for (const key in original) { - if (selectOptionsMap[key]) { - labels[key] = resolveOriginalLabel(key); - } +watch([baseNameOptions, engInfoOptions, sttpOptions, wwqtgOptions], () => { + const original = originalRecord.value; + if (!original || Object.keys(original).length === 0) return; + const labels: Record = {}; + for (const key in original) { + if (selectOptionsMap[key]) { + labels[key] = resolveOriginalLabel(key); } - originalLabels.value = labels; } -); + originalLabels.value = labels; +}); const loadEngOptions = async (baseId?: string) => { engLoading.value = true; try { const params = baseId ? { baseId } : {}; const res = await getEngInfoDropdown(params); - engInfoOptions.value = (res.data || []).map((item: any) => ({ label: item.ennm, value: item.stcd })); + engInfoOptions.value = (res.data || []).map((item: any) => ({ + label: item.ennm, + value: item.stcd + })); } catch (error) { console.error('获取电站列表失败:', error); } finally { @@ -451,14 +465,17 @@ const loadDropdownData = () => { // 从 store 获取水电基地数据(computed 已自动响应,无需手动赋值) }; -watch(() => formData.value?.baseId, (newBaseId) => { - // record 加载时已在 record watch 中加载过电站选项,这里仅跳过清空 - if (isInitLoading.value) { - return; +watch( + () => formData.value?.baseId, + newBaseId => { + // record 加载时已在 record watch 中加载过电站选项,这里仅跳过清空 + if (isInitLoading.value) { + return; + } + formData.value.rstcd = undefined; + loadEngOptions(newBaseId || undefined); } - formData.value.rstcd = undefined; - loadEngOptions(newBaseId || undefined); -}); +); watch( () => props.open, diff --git a/frontend-sjgl/src/views/conventionalHydropower/shuiZhiJianCe/WqSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/shuiZhiJianCe/WqSearch.vue index 9fb69b04..05924f08 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/shuiZhiJianCe/WqSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/shuiZhiJianCe/WqSearch.vue @@ -10,7 +10,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/shuiZhiJianCe/index.vue b/frontend-sjgl/src/views/conventionalHydropower/shuiZhiJianCe/index.vue index c91e96dd..ec91deeb 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/shuiZhiJianCe/index.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/shuiZhiJianCe/index.vue @@ -87,7 +87,7 @@ const columns = ref([ title: '水质站站码', dataIndex: 'stcd', visible: true, - width: 150, + width: 180, fixed: 'left', ellipsis: true }, diff --git a/frontend-sjgl/src/views/conventionalHydropower/sonarCam/SonarSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/sonarCam/SonarSearch.vue index 969a3706..eb2abd22 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/sonarCam/SonarSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/sonarCam/SonarSearch.vue @@ -10,7 +10,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/tempMit/DwSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/tempMit/DwSearch.vue index 077c7a38..03c30ab0 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/tempMit/DwSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/tempMit/DwSearch.vue @@ -10,7 +10,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/tempMit/index.vue b/frontend-sjgl/src/views/conventionalHydropower/tempMit/index.vue index a19644ba..fcc56792 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/tempMit/index.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/tempMit/index.vue @@ -99,7 +99,7 @@ const columns = ref([ title: '设施类型', dataIndex: 'sttpName', visible: true, - width: 100, + width: 160, ellipsis: true }, { @@ -107,7 +107,7 @@ const columns = ref([ title: '站址', dataIndex: 'stlc', visible: true, - width: 160, + width: 180, ellipsis: true }, { diff --git a/frontend-sjgl/src/views/conventionalHydropower/terrEco/OtteSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/terrEco/OtteSearch.vue index deb12fa7..2e881430 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/terrEco/OtteSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/terrEco/OtteSearch.vue @@ -10,7 +10,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/zengZhiFangLiu/FbSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/zengZhiFangLiu/FbSearch.vue index ad3f237c..32c193d4 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/zengZhiFangLiu/FbSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/zengZhiFangLiu/FbSearch.vue @@ -10,7 +10,7 @@ diff --git a/frontend-sjgl/src/views/conventionalHydropower/zhenXIZhiWuYuan/VpSearch.vue b/frontend-sjgl/src/views/conventionalHydropower/zhenXIZhiWuYuan/VpSearch.vue index 655cacf1..91c9b042 100644 --- a/frontend-sjgl/src/views/conventionalHydropower/zhenXIZhiWuYuan/VpSearch.vue +++ b/frontend-sjgl/src/views/conventionalHydropower/zhenXIZhiWuYuan/VpSearch.vue @@ -3,7 +3,7 @@ diff --git a/frontend-sjgl/src/views/monitorData/FishData/FishDataSearch.vue b/frontend-sjgl/src/views/monitorData/FishData/FishDataSearch.vue index c5de8cbd..ab6a8cda 100644 --- a/frontend-sjgl/src/views/monitorData/FishData/FishDataSearch.vue +++ b/frontend-sjgl/src/views/monitorData/FishData/FishDataSearch.vue @@ -57,7 +57,7 @@ diff --git a/frontend-sjgl/src/views/monitorData/FishRelease/index.vue b/frontend-sjgl/src/views/monitorData/FishRelease/index.vue index 124ce0e7..a4b12cf6 100644 --- a/frontend-sjgl/src/views/monitorData/FishRelease/index.vue +++ b/frontend-sjgl/src/views/monitorData/FishRelease/index.vue @@ -80,7 +80,7 @@ const tableScrollY = ref(0); const currentSearchParams = ref({}); const exportLoading = ref(false); -// 查看修改(操作日志) +// 查看操作日志(操作日志) const operationLogVisible = ref(false); // TODO: 操作日志表名待确认 const operationTableName = 'SD_RPIMNFISH_R'; @@ -236,7 +236,7 @@ const initTable = (values: any) => { tableRef.value.getList(params); }; -// 查看修改(操作日志) +// 查看操作日志(操作日志) const handleSeeEdit = () => { operationLogVisible.value = true; }; diff --git a/frontend-sjgl/src/views/monitorData/FlowData/FlowDataSearch.vue b/frontend-sjgl/src/views/monitorData/FlowData/FlowDataSearch.vue index 56097142..66743c0c 100644 --- a/frontend-sjgl/src/views/monitorData/FlowData/FlowDataSearch.vue +++ b/frontend-sjgl/src/views/monitorData/FlowData/FlowDataSearch.vue @@ -63,7 +63,7 @@ @@ -242,12 +241,6 @@ const searchList: any = computed(() => [ } ]); -const handleChange = (value: any) => { - if (ttpwr.value.min > value) { - message.warning('最小装机容量不能大于最大装机容量'); - ttpwr.value.max = null; - } -}; const handleRangeClick = (value: any) => { jcdt.value = { min: dayjs(value.value[0]).format('YYYY-MM-DD HH:mm:ss'), @@ -262,6 +255,15 @@ const disabledEndDate = (current: Dayjs) => { }; const onSearchFinish = (values: any) => { + if ( + ttpwr.value.min != null && + ttpwr.value.max != null && + ttpwr.value.min > ttpwr.value.max + ) { + message.warning('最小装机容量不能大于最大装机容量'); + ttpwr.value.max = null; + return; + } values.ttpwr = ttpwr.value; if (jcdt.value?.min) { values.jcdt.min = dayjs(jcdt.value.min).format('YYYY-MM-DD') + ' 00:00:00'; diff --git a/frontend/src/views/DataQueryMenuModule/components/conventionalHydropower/BasicData/EditPowerModal.vue b/frontend/src/views/DataQueryMenuModule/components/conventionalHydropower/BasicData/EditPowerModal.vue index ca91b39d..806eaa21 100644 --- a/frontend/src/views/DataQueryMenuModule/components/conventionalHydropower/BasicData/EditPowerModal.vue +++ b/frontend/src/views/DataQueryMenuModule/components/conventionalHydropower/BasicData/EditPowerModal.vue @@ -10,7 +10,7 @@
概述
- + - + - + - + - + - + - + - + - + - + - +
水文
- + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
水库
- + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - - + + - - + +
下泄流量及相应下游水位
- + - + - + - + - + - + - + - + @@ -916,7 +916,7 @@ >
工程效益指标
- + - + - + - + - + - + - +
大坝
- + - + - + - +
其他
- + - + - + - + diff --git a/frontend/src/views/DataQueryMenuModule/components/conventionalHydropower/BasicData/index.vue b/frontend/src/views/DataQueryMenuModule/components/conventionalHydropower/BasicData/index.vue index ca347d85..c46c1e56 100644 --- a/frontend/src/views/DataQueryMenuModule/components/conventionalHydropower/BasicData/index.vue +++ b/frontend/src/views/DataQueryMenuModule/components/conventionalHydropower/BasicData/index.vue @@ -134,9 +134,9 @@ const hycdLoading = ref(false); const isEdit = ref(true); const dvtpList = ref([ - { label: '堤坝式', value: '0' }, - { label: '引水式', value: '1' }, - { label: '混合式', value: '2' } + { label: '堤坝式', value: '1' }, + { label: '引水式', value: '2' }, + { label: '混合式', value: '3' } ]); // 日期列渲染函数 const dateRender = ({ text }: { text: string }) => { @@ -144,7 +144,12 @@ const dateRender = ({ text }: { text: string }) => { const date = dayjs(text); return date.isValid() ? date.format('YYYY-MM-DD') : '-'; }; - +// 装机容量列渲染函数:接口值为实际值×10,展示时除以10 +const ttpwrRender = ({ text }: { text: any }) => { + if (text === null || text === undefined || text === '-') return '-'; + const num = Number(text); + return isNaN(num) ? text : (num / 10).toFixed(2); +}; // 表格列元数据映射(列宽、排序、固定列、自定义渲染等) const columnMetaMap: Record = { stnm: { width: 150, fixed: 'left', sort: true, ellipsis: true }, @@ -211,7 +216,7 @@ const columnMetaMap: Record = { ksqxyz: { width: 250, sort: true }, gemaxrq: { width: 190, sort: true }, mxgeqxyz: { width: 260, sort: true }, - ttpwr: { width: 120, sort: true, ellipsis: true }, + ttpwr: { width: 120, sort: true, ellipsis: true,customRender: ttpwrRender }, gncnt: { width: 130, sort: true, ellipsis: true }, gntp: { width: 150, sort: true, ellipsis: true }, grntpwr: { width: 130, sort: true, ellipsis: true },