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 fe7571b..d54b0e1 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue
@@ -50,7 +50,12 @@
-
+
{{ record.accountType.label }}
@@ -76,9 +81,6 @@
{{ text || '-' }}
-
@@ -209,6 +211,7 @@
transactionTypeValue.value = selectedOptions.flatMap((group) =>
group.flatMap((node) => [node.value, ...(node.children?.map((child) => child.value) || [])]),
);
+ // transactionTypeValue.value = value.flat()
};
const searchTableList = () => {
year.value = queryParams.value.year;
@@ -481,50 +484,77 @@
title: '资产类别',
dataIndex: 'accountType',
width: 100,
+ customRender: (text: any) => {
+ return text.text !== undefined ? text : '-';
+ },
},
{
title: '交易方式',
dataIndex: 'transactionTypeName',
width: 100,
+ customRender: (text: any) => {
+ return text.text !== undefined ? text : '-';
+ },
},
{
title: '交易日期',
dataIndex: 'transactionDate',
width: 100,
sorter: (a, b) => a.transactionDate - b.transactionDate,
+ customRender: (text: any) => {
+ return text.text !== undefined ? text : '-';
+ },
},
{
title: '本期收入(tCO2)',
dataIndex: 'income',
width: 150,
sorter: (a, b) => a.income - b.income,
+ customRender: (text: any) => {
+ return text.text !== undefined ? text : '-';
+ },
},
{
title: '本期支出(tCO2)',
dataIndex: 'expenditure',
width: 150,
sorter: (a, b) => a.expenditure - b.expenditure,
+ customRender: (text: any) => {
+ return text.text !== undefined ? text : '-';
+ },
},
{
title: '发生金额(¥)',
width: 150,
dataIndex: 'amountIncurredValue',
+ customRender: (text: any) => {
+ return text.text !== undefined ? text : '-';
+ },
},
{
title: '交易对象',
width: 100,
dataIndex: 'tradingPartner',
+ customRender: (text: any) => {
+ return text.text !== '' ? text : '-';
+ },
},
{
title: '更新人',
width: 100,
dataIndex: 'updateUser',
+ customRender: (text: any) => {
+ return text.text !== undefined ? text : '-';
+ },
},
{
title: '更新时间',
width: 150,
ellipsis: true,
dataIndex: 'updateTime',
+ customRender: (text: any) => {
+ return text.text !== undefined ? text : '-';
+ },
},
],
columnActions: {
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts
index e14f1ee..ec50605 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts
@@ -146,7 +146,7 @@ export const drawerColumns = [
dataIndex: 'dataSources',
},
];
-export const setFactorConfig = (orgId, treeId, tableId) => {
+export const setFactorConfig = (orgId) => {
return ref({
api: carbonEmissionFactorLibrary.getTableList,
params: { orgId, pageNum: 1, pageSize: 9999, emissionList: [0] },
@@ -155,11 +155,10 @@ export const setFactorConfig = (orgId, treeId, tableId) => {
icon: 'deviceType',
title: '排放分类',
},
- selectedKeys: treeId,
+ selectedKeys: [],
params: { orgId },
dynamicParams: { emissionList: 'id[]' },
defaultExpandAll: true,
- // checkable:true,
api: carbonEmissionFactorLibrary.getCarbonFactorTree,
fieldNames: { title: 'emissionName', key: 'id' },
formConfig: {
@@ -178,7 +177,7 @@ export const setFactorConfig = (orgId, treeId, tableId) => {
},
rowSelection: {
type: 'radio',
- selectedRowKeys: tableId ? tableId : [''],
+ // selectedRowKeys: [],
},
columns: [
{
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 6e5f3ae..59b68bf 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue
@@ -804,14 +804,15 @@
.validate()
.then(() => {
console.log('values', formState, toRaw(formState));
- formState.value.year = mainRef.value.nsTableRef.formParamsRef.year
+ const addformState = JSON.parse(JSON.stringify(formState.value));
+ addformState.year = mainRef.value.nsTableRef.formParamsRef.year
? mainRef.value.nsTableRef.formParamsRef.year
: selectYear.value.format('YYYY');
- if (formState.value.unit) {
- formState.value.unit = formState.value.unit.join(',').split(',')[1];
+ if (addformState.unit) {
+ addformState.unit = addformState.unit.join(',').split(',')[1];
}
- if (formState.value.id) {
- fetch(energyConsumption.update, formState.value).then((res) => {
+ if (addformState.id) {
+ fetch(energyConsumption.update, addformState).then((res) => {
if (fileList.value.length !== 0) {
const formData = ref(new FormData());
fileList.value.forEach((file) => {
@@ -820,7 +821,7 @@
}
});
formData.value.append('bizType', 3);
- formData.value.append('bizId', formState.value.id);
+ formData.value.append('bizId', addformState.id);
delIds.value.forEach((item) => {
formData.value.append('deleteList', item);
});
@@ -848,7 +849,7 @@
}
});
} else {
- fetch(energyConsumption.creat, formState.value).then((res) => {
+ fetch(energyConsumption.creat, addformState).then((res) => {
if (res.data === '新增数据已存在') {
visible.value = false;
delIds.value = [];
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue
index e4f35f5..aa172c0 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue
@@ -512,7 +512,7 @@
};
const openVisible = ref(false);
const setFactorRef = ref();
- const config = setFactorConfig(orgId.value, treeId.value, tableId.value);
+ const config = setFactorConfig(orgId.value);
const selectFactor = () => {
openVisible.value = true;
if (treeId.value.length > 0) {
@@ -521,6 +521,16 @@
setFactorRef.value.nsTableRef.treeElRef.selectedKeys = treeId.value;
setFactorRef.value.nsTableRef.rowSelection.selectedRowKeys = tableId.value;
setFactorRef.value.nsTableRef.reload();
+ treeId.value = [];
+ tableId.value = [];
+ });
+ } else {
+ nextTick(() => {
+ console.log(setFactorRef.value.nsTableRef.rowSelection);
+ setFactorRef.value.nsTableRef.params.emissionList = [0];
+ setFactorRef.value.nsTableRef.treeElRef.selectedKeys = [];
+ // setFactorRef.value.nsTableRef.rowSelection.selectedRowKeys = [];
+ setFactorRef.value.nsTableRef.reload();
});
}
};
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 d5915da..8b88443 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue
@@ -1294,7 +1294,10 @@
NsMessage.warn('请选择因子');
return;
} else {
- if (newTableData.value[0].emissionFactorUnits === carbonEmission.value) {
+ if (
+ setFactorRef.value?.nsTableRef.tableState.selectedRows.emissionFactorUnits ===
+ carbonEmission.value
+ ) {
newTableData.value = setFactorRef.value?.nsTableRef.tableState.selectedRows;
selectedRowKeysEdit.value = setFactorRef.value?.nsTableRef.tableState.selectedRowKeys;
editFormState.value.emissionFactors = newTableData.value[0].emissionFactors;
@@ -1906,4 +1909,23 @@
justify-content: center;
flex-direction: column;
}
+ :deep(.ns-table-container) {
+ background: white;
+ }
+ :deep(.ns-part-tree) {
+ border-radius: 8px;
+ background: rgba(255, 255, 255, 1);
+ box-shadow: 0px 2px 20px rgb(69 123 234 / 20%);
+ }
+ :deep(.ns-table-search) {
+ border-radius: 8px;
+ background: rgba(255, 255, 255, 1);
+ box-shadow: 0px 2px 20px rgb(69 123 234 / 20%);
+ }
+ :deep(.ns-table-main) {
+ margin-top: 20px !important;
+ border-radius: 8px;
+ background: rgba(255, 255, 255, 1);
+ box-shadow: 0px 2px 20px rgb(69 123 234 / 20%);
+ }
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue
index 47b3f59..7bfd07c 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue
@@ -74,11 +74,12 @@