diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue index 21ef7b9..95ef056 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue @@ -50,11 +50,7 @@
- + -
+
@@ -153,10 +153,7 @@ formState.value.orgId = orgId.value; formState.value.startTime = formState.value.reportScope[0]; formState.value.endTime = formState.value.reportScope[1]; - if ( - oldStartTime.value === formState.value.startTime && - oldEndTime.value === formState.value.endTime - ) { + if (text.value === '新增报告') { spinning.value = true; fetch(carbonInventoryCheck.createOrUpdate, formState.value).then((res) => { visible.value = false; @@ -164,26 +161,38 @@ spinning.value = false; }); } else { - Modal.confirm({ - title: '修改日期后会导致数据丢失是否保留数据?', - icon: createVNode(ExclamationCircleOutlined), - onOk() { - spinning.value = true; - fetch(carbonInventoryCheck.createOrUpdate, formState.value) - .then((res) => { - visible.value = false; - mainRef.value?.nsTableRef.reload(); - spinning.value = false; - }) - .catch((error) => { - message.error(error ? error : '保存失败!'); - }); - }, - onCancel() { - console.log('Cancel'); - }, - class: 'test', - }); + if ( + oldStartTime.value === formState.value.startTime && + oldEndTime.value === formState.value.endTime + ) { + spinning.value = true; + fetch(carbonInventoryCheck.createOrUpdate, formState.value).then((res) => { + visible.value = false; + mainRef.value?.nsTableRef.reload(); + spinning.value = false; + }); + } else { + Modal.confirm({ + title: '修改日期会导致已有数据丢失,是否继续修改?', + icon: createVNode(ExclamationCircleOutlined), + onOk() { + spinning.value = true; + fetch(carbonInventoryCheck.createOrUpdate, formState.value) + .then((res) => { + visible.value = false; + mainRef.value?.nsTableRef.reload(); + spinning.value = false; + }) + .catch((error) => { + message.error(error ? error : '保存失败!'); + }); + }, + onCancel() { + console.log('Cancel'); + }, + class: 'test', + }); + } } }) .catch((error) => { diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/all/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/all/index.vue index f07ea0c..701c8fc 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/all/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/all/index.vue @@ -52,24 +52,26 @@
-
-
- -
-
- - + +
+
+ +
+
+ + +
-
+
@@ -88,6 +90,7 @@ const fetch = (api, params = { orgId }) => { return http.post(api, params); }; + const spinning = ref(false); const selectYear = ref(dayjs(new Date().getFullYear().toString())); const selectMonth = ref(dayjs().startOf('year').month(0)); // 年/月切换 @@ -250,10 +253,12 @@ yearAndMonth: 'year', }); const getTableData = () => { + spinning.value = true; fetch(carbonPlanning.whole, queryParams.value).then((res) => { data.value = res.data; setTimeout(() => { drawEcharts(); + spinning.value = false; }, 500); }); }; diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/categoryDeatil.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/categoryDeatil.vue index dd9641c..b5b0fef 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/categoryDeatil.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/categoryDeatil.vue @@ -8,122 +8,124 @@ 返回 -
- -
-
-
-
- {{ lastYearActualUsage }} - kwh + +
+ +
+
+
+
+ {{ lastYearActualUsage }} + kwh +
+
{{ Number(props.year) - 1 }}年实际用量
-
{{ Number(props.year) - 1 }}年实际用量
-
-
-
- {{ actualUsage }} - kwh +
+
+ {{ actualUsage }} + kwh +
+
{{ props.year }}年实际用量
-
{{ props.year }}年实际用量
-
-
-
- {{ budget }} - kwh +
+
+ {{ budget }} + kwh +
+
{{ props.year }}年预算
-
{{ props.year }}年预算
-
-
-
- {{ referenceValue }} - kwh +
+
+ {{ referenceValue }} + kwh +
+
基准值
+
+
+
+ + {{ Math.abs(count) }}% + + {{ count }}% + {{ count }}% +
+
实际|预算
-
基准值
-
-
- - {{ Math.abs(count) }}% - - {{ count }}% - {{ count }}% +
+
+ + 隐藏
-
实际|预算
-
-
-
- - 隐藏 + + +
+
+ + 展开 +
-
- - -
-
- - 展开 +
+ 批量设置 + + 基准值设置 +
-
-
- 批量设置 - - 基准值设置 - -
- -