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 @@
-
+
{{ record.accountType.label }}
@@ -206,12 +202,23 @@
year: year.value,
});
const transactionTypeValue = ref();
+
+ const selectValue = ref([]);
const changeSelect = (value, selectedOptions) => {
- debugger;
// transactionTypeValue.value = selectedOptions.flatMap((group) =>
// group.flatMap((node) => [node.value, ...(node.children?.map((child) => child.value) || [])]),
// );
- transactionTypeValue.value = value.flat();
+ const aaa = JSON.parse(JSON.stringify(value));
+ aaa.forEach((item) => {
+ if (item.length > 1) {
+ item.shift();
+ selectValue.value.push(item);
+ } else {
+ selectValue.value.push(item);
+ }
+ });
+ transactionTypeValue.value = Array.from(new Set(selectValue.value.flat()));
+ selectValue.value = [];
};
const searchTableList = () => {
year.value = queryParams.value.year;
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue
index cac49c8..2527379 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue
@@ -171,13 +171,13 @@
{{ data.cnValue }}
-
-
+
-
+ v-if="!data.parentId"
+ @click="editGroup(data)" />
+
@@ -480,9 +480,9 @@
// 删除树节点
const deleteTreeNode = (data) => {
Modal.confirm({
- title: '警告',
+ // title: '警告',
icon: createVNode(ExclamationCircleOutlined),
- content: '确定要删除么?',
+ content: '您将删除此节点。其数据将保留并移至“未分类”区域,仍可访问。确定删除吗?',
okText: '确认',
okType: 'primary',
cancelText: '取消',
@@ -710,11 +710,11 @@
pageNum: 1,
pageSize: 999,
ids: mainRef.value.nsTableRef.tableState.selectedRowKeys,
- bibliography:mainRef.value.nsTableRef.formParamsRef.bibliography,
- emissionGas:mainRef.value.nsTableRef.formParamsRef.emissionGas,
- carbonDatabase:mainRef.value.nsTableRef.formParamsRef.carbonDatabase,
- emissionProcess:mainRef.value.nsTableRef.formParamsRef.emissionProcess,
- emissionSources:mainRef.value.nsTableRef.formParamsRef.emissionSources,
+ bibliography: mainRef.value.nsTableRef.formParamsRef.bibliography,
+ emissionGas: mainRef.value.nsTableRef.formParamsRef.emissionGas,
+ carbonDatabase: mainRef.value.nsTableRef.formParamsRef.carbonDatabase,
+ emissionProcess: mainRef.value.nsTableRef.formParamsRef.emissionProcess,
+ emissionSources: mainRef.value.nsTableRef.formParamsRef.emissionSources,
};
const config = {
responseType: 'blob',
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue
index db760ae..e07a9ec 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue
@@ -7,15 +7,19 @@
:pagination="false"
:scroll="{ x: 1700, y: 480 }">
-
+
- 查询
- 重置
+ 重置
+ 搜索
- {{ text || '-' }}
-
+ {{ text || '-' }}
+
-
+
@@ -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 }}%
+
-
-
-
-
-
-
-
-
-
-
-
-
- 修改预算值
-
+
+
+
+
+ 修改预算值
+
+
-
-
-
-
- 合计
-
- {{ totalLastYearActualUsage + unit }}
-
-
- {{ totalActualUsage + unit }}
-
-
- {{ totalReferenceValue + unit }}
-
-
- -
-
-
- -
-
-
- {{ totalBudget + unit }}
-
-
-
-
-
-
-
+
+
+
+ 合计
+
+ {{ totalLastYearActualUsage + unit }}
+
+
+ {{ totalActualUsage + unit }}
+
+
+ {{ totalReferenceValue + unit }}
+
+
+ -
+
+
+ -
+
+
+ {{ totalBudget + unit }}
+
+
+
+
+
+
+
+
@@ -317,6 +319,7 @@
const fetch = (api, params = { orgId }) => {
return http.post(api, params);
};
+ const spinning = ref(false);
// 点击返回
const emit = defineEmits(['change-data']);
const changeParentData = () => {
@@ -345,6 +348,7 @@
const totalLastYearActualUsage = ref();
const totalReferenceValue = ref();
const getTableData = () => {
+ spinning.value = true;
fetch(carbonPlanning.detailedStatisticalDataTable, queryParams.value).then(async (res) => {
let resUnit = await getEnumEnergy({ params: { code: props.resourceType } });
unit.value = resUnit.data.unit;
@@ -358,6 +362,7 @@
lastActualUsageList.value = data.value.map((item) => item.lastYearActualUsage);
formState.value.lastYearList = lastActualUsageList.value;
}
+ getChartData();
});
};
getTableData();
@@ -646,9 +651,9 @@
lastYearActualUsage.value = res.data.lastYearActualUsage;
count.value = res.data.count;
chart();
+ spinning.value = false;
});
};
- getChartData();
const chart = () => {
chartInstance = echarts.init(chartRef.value);
const option = {
@@ -996,7 +1001,7 @@
:deep(.ant-card-bordered) {
border: unset;
}
- :deep(.ant-input-number-handler-wrap){
+ :deep(.ant-input-number-handler-wrap) {
display: none;
}
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/index.vue
index 32d151c..6caa848 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/index.vue
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/index.vue
@@ -38,30 +38,32 @@
-
{
return http.post(api, params);
};
+ const spinning = ref(false);
const selectYearValue = ref(dayjs(new Date().getFullYear().toString()));
const selectMonthValue = ref(dayjs().startOf('year').month(0));
const electricTotal = ref(true);
@@ -371,6 +374,7 @@
fetch(carbonPlanning.yearAndMonthAchievement, getBallQuery.value).then((res) => {
ballValue.value = res.data;
drawSQ();
+ spinning.value = false;
});
};
let ballChartInstance: echarts.ECharts | null = null;
@@ -489,6 +493,7 @@
// 获取单位
const unit = ref();
const getYearData = () => {
+ spinning.value = true;
treeCheckedKeys.value = [];
fetch(carbonPlanning.searchListByYear, yearQueryParams.value).then(async (res) => {
let resUnit = await getEnumEnergy({ params: { code: props.energyType } });
@@ -516,6 +521,7 @@
getMonthData();
};
const getMonthData = () => {
+ spinning.value = true;
fetch(carbonPlanning.searchListByMonth, monthQueryParams.value).then(async (res) => {
let resUnit = await getEnumEnergy({ params: { code: props.energyType } });
unit.value = resUnit.data.unit;