From 533f0cc63333ced666d3a8b25f2b8bfd720d1c52 Mon Sep 17 00:00:00 2001 From: fks-xuxinyue <2822784518@qq.com> Date: Thu, 11 Jul 2024 16:23:42 +0800 Subject: [PATCH] taskid:083 remark:commit --- .../carbonEmissionFactorLibrary/index.vue | 26 ++- .../carbonEmissionStatistics/config.ts | 38 ++-- .../energyConsumption/index.vue | 195 +++++++++++++++------ 3 files changed, 187 insertions(+), 72 deletions(-) diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue index f2397f7..6f07629 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue @@ -135,7 +135,7 @@ import { log } from 'node:console'; const casData = ref([]); const treeData = ref([]); const userAuthList = ref([]); - const orgId = JSON.parse(sessionStorage.getItem(import.meta.env.VITE_PUBLIC_PATH)).orgId; + const orgId = JSON.parse(sessionStorage.getItem('userInfo')).orgId; const dynamicDisabled = computed(() => { return formRef.value?.validateResult && userAuthList.value?.length; }); @@ -493,7 +493,7 @@ import { log } from 'node:console'; isReload: true, isClearCheck: true, api: carbonEmissionFactorLibrary.del, - dynamicParams: { id: 'id[]' }, + dynamicParams: { ids: 'id[]' }, }, ], columns: [ @@ -573,7 +573,7 @@ import { log } from 'node:console'; { label: '删除', name: 'userDelete', - dynamicParams: 'id', + dynamicParams: { ids: 'id[]' }, confirm: true, isReload: true, api: carbonEmissionFactorLibrary.del, @@ -617,11 +617,27 @@ import { log } from 'node:console'; options: [ { label: 'CO2', - value: 0, + value: 'CO2', }, { label: 'CO2e', - value: 1, + value: 'CO2e', + }, + { + label: 'SF6', + value:'SF6', + }, + { + label: 'CH4', + value: 'CH4', + }, + { + label: 'PFCs', + value: 'PFCs', + }, + { + label: 'HFCs', + value: 'HFCs', }, ], }, diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts index e12f23a..d3bc6e8 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts @@ -7,64 +7,70 @@ export const tableColumns = [ }, { title: '能源种类', - dataIndex: 'money', + dataIndex: 'energyType', }, { title: '计量单位', - className: 'column-money', - dataIndex: 'money', + className: 'unit', + dataIndex: 'unit', }, { title: '全年', - dataIndex: 'address', + dataIndex: 'yearly', }, { title: '1月', - dataIndex: 'address', + dataIndex: 'jan', + customRender: ({ text, record }) => ({ + children: text, + attrs: { + style: record.janFlag === 1 ? 'color: red' : 'color: blue' + } + }) }, { title: '2月', - dataIndex: 'address', + dataIndex: 'feb', }, { title: '3月', - dataIndex: 'address', + dataIndex: 'mar', }, { title: '4月', - dataIndex: 'address', + dataIndex: 'apr', }, { title: '5月', - dataIndex: 'address', + dataIndex: 'may', }, { title: '6月', - dataIndex: 'address', + dataIndex: 'jun', }, { title: '7月', - dataIndex: 'address', + dataIndex: 'jul', }, { title: '8月', - dataIndex: 'address', + dataIndex: 'aug', }, { title: '9月', - dataIndex: 'address', + dataIndex: 'sep', }, { title: '10月', - dataIndex: 'address', + dataIndex: 'oct', }, { title: '11月', - dataIndex: 'address', + dataIndex: 'nov', }, { title: '12月', - dataIndex: 'address', + dataIndex: 'dec', }, { title: '操作', diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue index f13ffe3..a209ff2 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue @@ -16,7 +16,7 @@ - + - - + + - - + + - + - - - - - + + + + - - - Zone one - Zone two + + + 直接排放 + 间接排放 + 其他 - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +