diff --git a/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts
index 2d5f06f..67568c2 100644
--- a/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts
+++ b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts
@@ -57,4 +57,6 @@ export enum carbonInventoryCheck {
updateTable = '/carbon-smart/api/carbon/inventory/details/update',
// 排放统计接口
emissionStatistic = '/carbon-smart/api/carbon/inventory/emissionStatistic',
+ // 碳排流向
+ carbonFlowDirection = '/carbon-smart/api/carbon/inventory/carbonFlowDirection',
}
diff --git a/hx-ai-intelligent/src/icon/carbonAssetsAdd.svg b/hx-ai-intelligent/src/icon/carbonAssetsAdd.svg
new file mode 100644
index 0000000..4089903
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/carbonAssetsAdd.svg
@@ -0,0 +1,4 @@
+
diff --git a/hx-ai-intelligent/src/icon/carbonAssetsEqual.svg b/hx-ai-intelligent/src/icon/carbonAssetsEqual.svg
new file mode 100644
index 0000000..02fdc0f
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/carbonAssetsEqual.svg
@@ -0,0 +1,6 @@
+
diff --git a/hx-ai-intelligent/src/icon/carbonAssetsIncrease.svg b/hx-ai-intelligent/src/icon/carbonAssetsIncrease.svg
new file mode 100644
index 0000000..c5eaf6d
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/carbonAssetsIncrease.svg
@@ -0,0 +1,4 @@
+
diff --git a/hx-ai-intelligent/src/icon/carbonAssetsLower.svg b/hx-ai-intelligent/src/icon/carbonAssetsLower.svg
new file mode 100644
index 0000000..bc8755a
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/carbonAssetsLower.svg
@@ -0,0 +1,4 @@
+
diff --git a/hx-ai-intelligent/src/icon/carbonAssetsMoney-1.svg b/hx-ai-intelligent/src/icon/carbonAssetsMoney-1.svg
new file mode 100644
index 0000000..2c7300d
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/carbonAssetsMoney-1.svg
@@ -0,0 +1,26 @@
+
diff --git a/hx-ai-intelligent/src/icon/carbonAssetsMoney-2.svg b/hx-ai-intelligent/src/icon/carbonAssetsMoney-2.svg
new file mode 100644
index 0000000..180961a
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/carbonAssetsMoney-2.svg
@@ -0,0 +1,26 @@
+
diff --git a/hx-ai-intelligent/src/icon/carbonAssetsMoney-3.svg b/hx-ai-intelligent/src/icon/carbonAssetsMoney-3.svg
new file mode 100644
index 0000000..262a936
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/carbonAssetsMoney-3.svg
@@ -0,0 +1,26 @@
+
diff --git a/hx-ai-intelligent/src/icon/carbonAssetsMoney-4.svg b/hx-ai-intelligent/src/icon/carbonAssetsMoney-4.svg
new file mode 100644
index 0000000..c5616a1
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/carbonAssetsMoney-4.svg
@@ -0,0 +1,26 @@
+
diff --git a/hx-ai-intelligent/src/icon/carbonAssetsReduce.svg b/hx-ai-intelligent/src/icon/carbonAssetsReduce.svg
new file mode 100644
index 0000000..845ea03
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/carbonAssetsReduce.svg
@@ -0,0 +1,4 @@
+
diff --git a/hx-ai-intelligent/src/icon/carbonAssetsSearch-1.svg b/hx-ai-intelligent/src/icon/carbonAssetsSearch-1.svg
new file mode 100644
index 0000000..babbb9e
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/carbonAssetsSearch-1.svg
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/icon/carbonAssetsSearch-2.svg b/hx-ai-intelligent/src/icon/carbonAssetsSearch-2.svg
new file mode 100644
index 0000000..2a1bcfa
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/carbonAssetsSearch-2.svg
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/icon/carbonAssetsSearch-3.svg b/hx-ai-intelligent/src/icon/carbonAssetsSearch-3.svg
new file mode 100644
index 0000000..0ddbb21
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/carbonAssetsSearch-3.svg
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/icon/carbonAssetsTitle-1.svg b/hx-ai-intelligent/src/icon/carbonAssetsTitle-1.svg
new file mode 100644
index 0000000..e418bdf
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/carbonAssetsTitle-1.svg
@@ -0,0 +1,10 @@
+
diff --git a/hx-ai-intelligent/src/icon/carbonAssetsTitle-2.svg b/hx-ai-intelligent/src/icon/carbonAssetsTitle-2.svg
new file mode 100644
index 0000000..78bbe69
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/carbonAssetsTitle-2.svg
@@ -0,0 +1,10 @@
+
diff --git a/hx-ai-intelligent/src/icon/carbonAssetsTitle-3.svg b/hx-ai-intelligent/src/icon/carbonAssetsTitle-3.svg
new file mode 100644
index 0000000..9eb9a43
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/carbonAssetsTitle-3.svg
@@ -0,0 +1,10 @@
+
diff --git a/hx-ai-intelligent/src/router/carbonEmissionManage.ts b/hx-ai-intelligent/src/router/carbonEmissionManage.ts
index 2d0e6d4..46bf216 100644
--- a/hx-ai-intelligent/src/router/carbonEmissionManage.ts
+++ b/hx-ai-intelligent/src/router/carbonEmissionManage.ts
@@ -66,17 +66,17 @@ const equipment = {
],
},
{
- path: 'carbonInventoryCheck',
- name: 'CarbonInventoryCheck',
+ path: 'carbonAssets',
+ name: 'CbonAssets',
meta: { title: '碳资产', hideChildren: true, icon: 'tanpaiguanli' },
component: Base,
- redirect: { name: 'CarbonInventoryCheckIndex' },
+ redirect: { name: 'CarbonAssetsIndex' },
children: [
{
path: 'index',
- name: 'CarbonInventoryCheckIndex',
+ name: 'CarbonAssetsIndex',
// component: () => import('/nerv-lib/saas/view/menuManage/index.vue'),
- component: () => import('/@/view/carbonEmissionManage/carbonInventoryCheck/index.vue'),
+ component: () => import('/@/view/carbonEmissionManage/carbonAssets/index.vue'),
meta: {
title: '碳资产',
keepAlive: false,
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue
new file mode 100644
index 0000000..aa5ea2e
--- /dev/null
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/index.vue
new file mode 100644
index 0000000..df55258
--- /dev/null
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/index.vue
@@ -0,0 +1,319 @@
+
+
+
+
+
+
全国碳账户估值(CNY)
+
300,000.00
+
+
+
+
+
全国碳账户余额
+
+
+
+
75,000.00
+
期初余额(tCO2)
+
+
+
+
20,000.00
+
+
+ 增加(tCO2)
+
+
+
+
+
20,000.00
+
+
+ 减少(tCO2)
+
+
+
+
+
75,000.00
+
期末余额(tCO2)
+
+
+
+
+
+
+
地方碳账户估值(CNY)
+
300,000.00
+
+
+
+
+
地方碳账户余额
+
+
+
+
75,000.00
+
期初余额(tCO2)
+
+
+
+
20,000.00
+
+
+ 增加(tCO2)
+
+
+
+
+
20,000.00
+
+
+ 减少(tCO2)
+
+
+
+
+
75,000.00
+
期末余额(tCO2)
+
+
+
+
+
+
+
CCER资产估值(CNY)
+
300,000.00
+
+
+
+
+
全国碳账户余额
+
+
+
+
75,000.00
+
期初余额(tCO2)
+
+
+
+
20,000.00
+
+
+ 增加(tCO2)
+
+
+
+
+
20,000.00
+
+
+ 减少(tCO2)
+
+
+
+
+
75,000.00
+
期末余额(tCO2)
+
+
+
+
+
+
+
全国碳账户估值(CNY)
+
300,000.00
+
+
+
+
+
+
+
300,000.00
+
全国碳账户资产估值
+
+
+
+
300,000.00
+
地方碳账户资产估值
+
+
+
+
300,000.00
+
CCER碳资产估值
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue
index 49a4221..feec1a2 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue
@@ -466,6 +466,7 @@
const addTreeNode = ref();
const handleOk = (e: MouseEvent) => {
editTreeNode.value.emissionName = addTreeNode.value;
+ editTreeNode.value.orgId = orgId.value;
http.post(carbonEmissionFactorLibrary.creat, editTreeNode.value).then(() => {
getOrgTree();
NsMessage.success('操作成功');
@@ -550,7 +551,9 @@
const onClose = () => {
visible.value = false;
- formData.value = {};
+ formData.value = {
+ orgId: orgId.value,
+ };
userAuthList.value.splice(0);
};
const closeUnitManag = () => {
@@ -588,6 +591,7 @@
formData.value = {
carbonEmissionPrefix: 't',
numberOfReferences: '10',
+ orgId: orgId.value,
};
userAuthList.value.splice(0);
});
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue
index 92e2c41..f7ba68f 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue
@@ -355,7 +355,7 @@
carbonInventoryCheck,
} from '/@/api/carbonEmissionFactorLibrary';
import { group } from '/@/api/deviceManage';
- import { debug } from 'node:console';
+ import { debug, log } from 'node:console';
defineOptions({
energyType: 'fillInPage', // 与页面路由name一致缓存才可生效
components: {
@@ -474,6 +474,8 @@
queryEmissionData.value.categoryId = info.node.conId;
getEmissionStatistic();
} else if (isClickedTplx.value) {
+ queryFlowDirection.value.categoryId = info.node.conId;
+ getCarbonFlowDirection();
}
};
// 获取碳盘查报告树
@@ -488,6 +490,7 @@
categoryId.value = res.data[0].children[0].conId;
formState.value.categoryId = categoryId.value;
queryEmissionData.value.categoryId = categoryId.value;
+ queryFlowDirection.value.categoryId = categoryId.value;
selectedIds.value = getAllIds(gData.value);
}
getEmissionSourceTree();
@@ -602,6 +605,7 @@
// 类别配置树点击确定
const queryConfigure = ref({
orgId: orgId.value,
+ reportId: props.reportId,
});
const submitCategory = () => {
fetch(carbonInventoryCheck.updateCategoryTree, queryConfigure.value).then((res) => {
@@ -957,8 +961,13 @@
.validate()
.then(() => {
console.log('values', editFormState, toRaw(editFormState));
- editFormState.value.factorId = editFormState.value.factorId.join(',');
- if (editFormState.value.collectionNode.value) {
+ if (editFormState.value.factorId.length > 0) {
+ editFormState.value.factorId = editFormState.value.factorId.join(',');
+ }
+ if (editFormState.value.dataSources.value) {
+ editFormState.value.dataSources = editFormState.value.dataSources.value;
+ }
+ if (editFormState.value.collectionNode) {
editFormState.value.collectionNode = editFormState.value.collectionNode.value;
}
fetch(carbonInventoryCheck.updateTable, editFormState.value).then((res) => {
@@ -1000,10 +1009,23 @@
fillInPage.value = false;
isClickedPftj.value = false;
isClickedTplx.value = true;
+ getCarbonFlowDirection();
setTimeout(() => {
drawEcharts();
}, 500);
};
+ // 获取碳排流向数据
+ const queryFlowDirection = ref({
+ orgId: orgId.value,
+ reportId: props.reportId,
+ year: props.year,
+ categoryId: categoryId.value,
+ });
+ const getCarbonFlowDirection = () => {
+ fetch(carbonInventoryCheck.carbonFlowDirection, queryFlowDirection.value).then((res) => {
+ console.log(res);
+ });
+ };
// 获取排放统计数据
const queryEmissionData = ref({
orgId: orgId.value,
@@ -1015,13 +1037,30 @@
const getEmissionStatistic = () => {
fetch(carbonInventoryCheck.emissionStatistic, queryEmissionData.value).then((res) => {
pftjData.value = res.data.body;
- const data = res.data.title;
+ // 将数据表头数据按顺序组织
+ const orderedKeys = res.data.title.map((obj) => Object.keys(obj)[0]); // 获取原始键的顺序
+ const result: { [key: string]: string } = {};
+
+ res.data.title.forEach((obj) => {
+ const key = Object.keys(obj)[0];
+ result[key] = obj[key];
+ });
+
+ // 确保按照原始顺序返回结果
+ const orderedResult: { [key: string]: string } = {};
+ orderedKeys.forEach((key) => {
+ if (result[key] !== undefined) {
+ orderedResult[key] = result[key];
+ }
+ });
+
+ const data = orderedResult;
// 将数据转换为 DataItem 数组
tableHeader.value = [];
pftjColumn.value = [
{
title: '排放分类',
- dataIndex: 'emissionCategory',
+ dataIndex: 'emissionClassify',
customCell: (record, rowIndex) => {
if (rowIndex == undefined) {
return {
@@ -1029,10 +1068,10 @@
colSpan: 0,
};
}
- const rowSpan = getRowSpan('emissionCategory', record, pftjData.value);
+ const rowSpan = getRowSpan('emissionClassify', record, pftjData.value);
if (
rowIndex != 0 &&
- pftjData.value[rowIndex - 1].emissionCategory == record.emissionCategory
+ pftjData.value[rowIndex - 1].emissionClassify == record.emissionClassify
) {
return {
rowSpan: 0,
@@ -1431,7 +1470,6 @@
min-width: fit-content;
> div {
background-color: @white;
- flex: 1;
}
display: flex;
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue
index a58a17e..7376e9b 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue
@@ -4,7 +4,7 @@
-