From e28f1bd987192cf689fc294242a9cc1618d4b8bb Mon Sep 17 00:00:00 2001 From: "1378012178@qq.com" <1378012178@qq.com> Date: Thu, 28 Aug 2025 10:35:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=8A=E5=8E=BF=E7=AE=A1=E7=BD=91=E7=9B=91?= =?UTF-8?q?=E6=B5=8B=E6=8C=87=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../heatanalysis/HeatanalysisListJx.vue | 48 +++- .../components/HeatanalysisModal.vue | 33 ++- .../components/{Cqzxt.vue => ZxtCQ.vue} | 13 +- .../heating/heatanalysis/components/ZxtJX.vue | 255 ++++++++++++++++++ .../history/HeatanalysisHistory.api.ts | 4 + 5 files changed, 330 insertions(+), 23 deletions(-) rename src/views/heating/heatanalysis/components/{Cqzxt.vue => ZxtCQ.vue} (95%) create mode 100644 src/views/heating/heatanalysis/components/ZxtJX.vue diff --git a/src/views/heating/heatanalysis/HeatanalysisListJx.vue b/src/views/heating/heatanalysis/HeatanalysisListJx.vue index b239dd5..391b255 100644 --- a/src/views/heating/heatanalysis/HeatanalysisListJx.vue +++ b/src/views/heating/heatanalysis/HeatanalysisListJx.vue @@ -22,15 +22,15 @@ - - - - - - - - - + + + + + + + + + @@ -64,6 +64,10 @@ + + + + @@ -86,6 +92,7 @@ import { BasicTable, useTable, TableAction } from '/@/components/Table'; import { useListPage } from '/@/hooks/system/useListPage'; import { columnsJx } from './Heatanalysis.data'; import { list, companylist, heatsourcelist, heatsourcestationlist } from './Heatanalysis.api'; +import HeatanalysisModal from './components/HeatanalysisModal.vue' const queryParam = ref({}); const toggleSearchStatus = ref(false); @@ -99,7 +106,6 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ canResize: false, useSearchForm: false, clickToRowSelect: false, - showActionColumn: false, showIndexColumn: false, tableSetting: { // 是否显示刷新按钮 @@ -156,13 +162,13 @@ function searchReset() { const thermalcompany = ref(); async function getThermalcompany() { - let params = {regionType:'郊县'}; + let params = { regionType: '郊县' }; thermalcompany.value = await companylist(params); } const heatsource = ref(); async function getHeatsource() { - let params = {regionType:'郊县'}; + let params = { regionType: '郊县' }; heatsource.value = await heatsourcelist(params); } @@ -172,7 +178,7 @@ async function getHeatsource() { // } async function handleChange1(record) { - var params = { companyId: record,regionType:'郊县' }; + var params = { companyId: record, regionType: '郊县' }; heatsource.value = await heatsourcelist(params); // heatsourcestation.value = []; } @@ -183,6 +189,22 @@ async function handleChange2(record) { function handleChange3(record) { } +function handleDetail(record) { + registerModal.value.jxDetail(record) +} + + +/** + * 操作栏 + */ +function getTableAction(record) { + return [ + { + label: '详情', + onClick: handleDetail.bind(null, record), + }, + ]; +} onMounted(() => { getThermalcompany(); getHeatsource(); diff --git a/src/views/heating/heatanalysis/components/HeatanalysisModal.vue b/src/views/heating/heatanalysis/components/HeatanalysisModal.vue index 6129f74..0275064 100644 --- a/src/views/heating/heatanalysis/components/HeatanalysisModal.vue +++ b/src/views/heating/heatanalysis/components/HeatanalysisModal.vue @@ -4,16 +4,23 @@ - - + + + + + + + @@ -101,11 +122,13 @@ defineExpose({ padding-bottom: 0; margin: 0; } + .ant-modal-content { display: flex; flex-direction: column; height: calc(100vh); } + .ant-modal-body { flex: 1; } diff --git a/src/views/heating/heatanalysis/components/Cqzxt.vue b/src/views/heating/heatanalysis/components/ZxtCQ.vue similarity index 95% rename from src/views/heating/heatanalysis/components/Cqzxt.vue rename to src/views/heating/heatanalysis/components/ZxtCQ.vue index 89ad4f7..dd822ba 100644 --- a/src/views/heating/heatanalysis/components/Cqzxt.vue +++ b/src/views/heating/heatanalysis/components/ZxtCQ.vue @@ -53,13 +53,16 @@ function safeNum(v: any) { } function buildHeader(records: any[], record_: any) { - if (records && records.length > 0) { - const r = records[0]; - return `${r.view001Name || ''}/${r.view002Name || ''}/${r.view004Name || ''}`; - } - return `${record_.view001Name || ''}/${record_.view002Name || ''}/${record_.view004Name || ''}`.replace(/\/+$/, ''); + const r = (records && records.length > 0) ? records[0] : record_; + + // 取出名称 + const names = [r.view001Name, r.view002Name, r.view004Name].filter(v => v && v !== ''); + + // 用箭头连接 + return names.join(' → '); } + function initChartsOptions(records: any[]) { records.sort((a: any, b: any) => new Date(a.datatime).getTime() - new Date(b.datatime).getTime()); const xAxis = records.map((r: any) => r.datatime); diff --git a/src/views/heating/heatanalysis/components/ZxtJX.vue b/src/views/heating/heatanalysis/components/ZxtJX.vue new file mode 100644 index 0000000..570fc14 --- /dev/null +++ b/src/views/heating/heatanalysis/components/ZxtJX.vue @@ -0,0 +1,255 @@ + + + + + diff --git a/src/views/heating/history/HeatanalysisHistory.api.ts b/src/views/heating/history/HeatanalysisHistory.api.ts index 89d9f2a..05d12f0 100644 --- a/src/views/heating/history/HeatanalysisHistory.api.ts +++ b/src/views/heating/history/HeatanalysisHistory.api.ts @@ -5,6 +5,7 @@ const { createConfirm } = useMessage(); enum Api { list = '/heating/heatanalysishistory/page', + jxpage = '/heating/heatanalysishistory/jxpage', companylist = '/heating/thermalcompany/list', heatsourcelist = '/heating/heatsource/list', heatsourcestationlist = '/heating/heatsourcestation/list', @@ -17,6 +18,9 @@ enum Api { export const list = (params) => defHttp.get({url: Api.list, params}); +export const jxpage = (params) => + defHttp.get({url: Api.jxpage, params}); + export const companylist = (params) => defHttp.get({url: Api.companylist, params});