Browse Source

修改测试问题

temp
fks-xuxinyue 3 months ago
parent
commit
8ef988b7b2
  1. BIN
      hx-ai-intelligent/public/asset/file/energyConsumption.xlsx
  2. 14
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue
  3. 89
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/index.vue
  4. 75
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue
  5. 49
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue
  6. 2
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts
  7. 9
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue
  8. 47
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue
  9. 8
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue
  10. 24
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/categoryDeatil.vue
  11. 10
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/index.vue
  12. 12
      lib/component/form/input/input-number.vue
  13. 13
      lib/component/form/input/textarea.vue

BIN
hx-ai-intelligent/public/asset/file/energyConsumption.xlsx

Binary file not shown.

14
hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue

@ -73,9 +73,10 @@
</div> </div>
<a-table :columns="totalColumns" :data-source="totalData" bordered :pagination="false"> <a-table :columns="totalColumns" :data-source="totalData" bordered :pagination="false">
<template #bodyCell="{ column, text }"> <template #bodyCell="{ column, text }">
<template v-if="column.dataIndex === 'name'"> <span>{{ text || '-' }}</span>
<!-- <template v-if="column.dataIndex === 'name'">
<a>{{ text }}</a> <a>{{ text }}</a>
</template> </template> -->
</template> </template>
</a-table> </a-table>
</div> </div>
@ -391,6 +392,7 @@
api: carbonAssets.import, // api: carbonAssets.import, //
params: { params: {
orgId, orgId,
year,
}, },
title: '碳资产', // title title: '碳资产', // title
templateName: 'carbonAssets', // 使 templateName: 'carbonAssets', // 使
@ -413,6 +415,7 @@
pageSize: 999, pageSize: 999,
year: queryParams.value.year, year: queryParams.value.year,
ids: selectedRowKeys.value, ids: selectedRowKeys.value,
accountType: props.parentId,
}); });
const config = { const config = {
responseType: 'blob', responseType: 'blob',
@ -674,6 +677,7 @@
.validate() .validate()
.then(() => { .then(() => {
console.log('values', formState, toRaw(formState)); console.log('values', formState, toRaw(formState));
formState.value.orgId = orgId.value;
if (formState.value.transactionType) { if (formState.value.transactionType) {
formState.value.transactionType = formState.value.transactionType.join(',').split(',')[1]; formState.value.transactionType = formState.value.transactionType.join(',').split(',')[1];
} }
@ -699,7 +703,8 @@
message.success('操作成功!'); message.success('操作成功!');
visible.value = false; visible.value = false;
delIds.value = []; delIds.value = [];
getDetailList(); // getDetailList();
mainRef.value?.nsTableRef.reload();
getTotalTable(); getTotalTable();
}) })
.catch((error) => { .catch((error) => {
@ -709,7 +714,8 @@
message.success('操作成功!'); message.success('操作成功!');
visible.value = false; visible.value = false;
delIds.value = []; delIds.value = [];
getDetailList(); // getDetailList();
mainRef.value?.nsTableRef.reload();
} }
}); });
}) })

89
hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/index.vue

@ -2,26 +2,27 @@
<div class="mainContant" v-if="homePage"> <div class="mainContant" v-if="homePage">
<a-card class="card" v-if="nationwide" style="margin-right: 1%; margin-bottom: 1%"> <a-card class="card" v-if="nationwide" style="margin-right: 1%; margin-bottom: 1%">
<div class="top" style="background: rgba(252, 139, 78, 0.05)"> <div class="top" style="background: rgba(252, 139, 78, 0.05)">
<div class="moneyImg" <div class="moneyImg"><img width="68" height="68" src="../../../../src/icon/carbonAssetsMoney-1.svg" /></div>
><img width="68px" height="68px" src="../../../../src/icon/carbonAssetsMoney-1.svg"
/></div>
<div class="moneyTitle">全国碳账户估值CNY</div> <div class="moneyTitle">全国碳账户估值CNY</div>
<div class="moneyTotal" style="color: rgba(229, 102, 22, 1)">{{ <div class="moneyTotal" style="color: rgba(229, 102, 22, 1)">{{
nationwide.valuation nationwide.valuation
}}</div> }}</div>
<div class="moneyDetail"> <div class="moneyDetail">
<div class="detailClick" @click="viewDetail(1)" style="border: 1px solid rgba(229, 102, 22, 1);"> <div
class="detailClick"
@click="viewDetail(1)"
style="border: 1px solid rgba(229, 102, 22, 1)">
<img <img
width="20px" width="20"
height="20px" height="20"
src="../../../../src/icon/carbonAssetsToDetail-1.svg" src="../../../../src/icon/carbonAssetsToDetail-1.svg"
alt="" /> alt="" />
<span style="color: rgba(229, 102, 22, 1);">交易明细</span> <span style="color: rgba(229, 102, 22, 1)">交易明细</span>
</div> </div>
</div> </div>
</div> </div>
<div class="title"> <div class="title">
<img width="24px" height="24px" src="../../../../src/icon/carbonAssetsTitle-1.svg" /> <img width="24" height="24" src="../../../../src/icon/carbonAssetsTitle-1.svg" />
<span>全国碳账户余额</span> <span>全国碳账户余额</span>
</div> </div>
<div class="bottom"> <div class="bottom">
@ -29,23 +30,23 @@
<div class="money">{{ nationwide.opening }}</div> <div class="money">{{ nationwide.opening }}</div>
<div class="moneyType">期初余额tCO2</div> <div class="moneyType">期初余额tCO2</div>
</div> </div>
<img width="17px" height="17px" src="../../../../src/icon/carbonAssetsAdd.svg" /> <img width="17" height="17" src="../../../../src/icon/carbonAssetsAdd.svg" />
<div class="calculation TLCard"> <div class="calculation TLCard">
<div class="money">{{ nationwide.income }}</div> <div class="money">{{ nationwide.income }}</div>
<div class="moneyType"> <div class="moneyType">
<img width="20px" height="17px" src="../../../../src/icon/carbonAssetsIncrease.svg" /> <img width="20" height="17" src="../../../../src/icon/carbonAssetsIncrease.svg" />
增加tCO2 增加tCO2
</div> </div>
</div> </div>
<img width="17px" height="17px" src="../../../../src/icon/carbonAssetsReduce.svg" /> <img width="17" height="17" src="../../../../src/icon/carbonAssetsReduce.svg" />
<div class="calculation TLCard"> <div class="calculation TLCard">
<div class="money">{{ nationwide.expenditure }}</div> <div class="money">{{ nationwide.expenditure }}</div>
<div class="moneyType"> <div class="moneyType">
<img width="20px" height="17px" src="../../../../src/icon/carbonAssetsLower.svg" /> <img width="20" height="17" src="../../../../src/icon/carbonAssetsLower.svg" />
减少tCO2 减少tCO2
</div> </div>
</div> </div>
<img width="17px" height="17px" src="../../../../src/icon/carbonAssetsEqual.svg" /> <img width="17" height="17" src="../../../../src/icon/carbonAssetsEqual.svg" />
<div class="calculation TLCard"> <div class="calculation TLCard">
<div class="money">{{ nationwide.period }}</div> <div class="money">{{ nationwide.period }}</div>
<div class="moneyType">期末余额tCO2</div> <div class="moneyType">期末余额tCO2</div>
@ -55,23 +56,26 @@
<a-card class="card" v-if="place" style="margin-bottom: 1%"> <a-card class="card" v-if="place" style="margin-bottom: 1%">
<div class="top" style="background: rgba(234, 71, 54, 0.05)"> <div class="top" style="background: rgba(234, 71, 54, 0.05)">
<div class="moneyImg" <div class="moneyImg"
><img width="68px" height="68px" src="../../../../src/icon/carbonAssetsMoney-2.svg" ><img width="68" height="68" src="../../../../src/icon/carbonAssetsMoney-2.svg"
/></div> /></div>
<div class="moneyTitle">地方碳账户估值CNY</div> <div class="moneyTitle">地方碳账户估值CNY</div>
<div class="moneyTotal" style="color: rgba(229, 102, 22, 1)">{{ place.valuation }}</div> <div class="moneyTotal" style="color: rgba(229, 102, 22, 1)">{{ place.valuation }}</div>
<div class="moneyDetail"> <div class="moneyDetail">
<div class="detailClick" @click="viewDetail(2)" style="border: 1px solid rgba(230, 51, 44, 1);"> <div
class="detailClick"
@click="viewDetail(2)"
style="border: 1px solid rgba(230, 51, 44, 1)">
<img <img
width="20px" width="20"
height="20px" height="20"
src="../../../../src/icon/carbonAssetsToDetail-2.svg" src="../../../../src/icon/carbonAssetsToDetail-2.svg"
alt="" /> alt="" />
<span style="color: rgba(230, 51, 44, 1);">交易明细</span> <span style="color: rgba(230, 51, 44, 1)">交易明细</span>
</div> </div>
</div> </div>
</div> </div>
<div class="title"> <div class="title">
<img width="24px" height="24px" src="../../../../src/icon/carbonAssetsTitle-2.svg" /> <img width="24" height="24" src="../../../../src/icon/carbonAssetsTitle-2.svg" />
<span>地方碳账户余额</span> <span>地方碳账户余额</span>
</div> </div>
<div class="bottom"> <div class="bottom">
@ -79,23 +83,23 @@
<div class="money">{{ place.opening }}</div> <div class="money">{{ place.opening }}</div>
<div class="moneyType">期初余额tCO2</div> <div class="moneyType">期初余额tCO2</div>
</div> </div>
<img width="17px" height="17px" src="../../../../src/icon/carbonAssetsAdd.svg" /> <img width="17" height="17" src="../../../../src/icon/carbonAssetsAdd.svg" />
<div class="calculation TRCard"> <div class="calculation TRCard">
<div class="money">{{ place.income }}</div> <div class="money">{{ place.income }}</div>
<div class="moneyType"> <div class="moneyType">
<img width="20px" height="17px" src="../../../../src/icon/carbonAssetsIncrease.svg" /> <img width="20" height="17" src="../../../../src/icon/carbonAssetsIncrease.svg" />
增加tCO2 增加tCO2
</div> </div>
</div> </div>
<img width="17px" height="17px" src="../../../../src/icon/carbonAssetsReduce.svg" /> <img width="17" height="17" src="../../../../src/icon/carbonAssetsReduce.svg" />
<div class="calculation TRCard"> <div class="calculation TRCard">
<div class="money">{{ place.expenditure }}</div> <div class="money">{{ place.expenditure }}</div>
<div class="moneyType"> <div class="moneyType">
<img width="20px" height="17px" src="../../../../src/icon/carbonAssetsLower.svg" /> <img width="20" height="17" src="../../../../src/icon/carbonAssetsLower.svg" />
减少tCO2 减少tCO2
</div> </div>
</div> </div>
<img width="17px" height="17px" src="../../../../src/icon/carbonAssetsEqual.svg" /> <img width="17" height="17" src="../../../../src/icon/carbonAssetsEqual.svg" />
<div class="calculation TRCard"> <div class="calculation TRCard">
<div class="money">{{ place.period }}</div> <div class="money">{{ place.period }}</div>
<div class="moneyType">期末余额tCO2</div> <div class="moneyType">期末余额tCO2</div>
@ -105,23 +109,26 @@
<a-card class="card" v-if="ccer" style="margin-right: 1%"> <a-card class="card" v-if="ccer" style="margin-right: 1%">
<div class="top" style="background: rgba(65, 163, 224, 0.05)"> <div class="top" style="background: rgba(65, 163, 224, 0.05)">
<div class="moneyImg" <div class="moneyImg"
><img width="68px" height="68px" src="../../../../src/icon/carbonAssetsMoney-3.svg" ><img width="68" height="68" src="../../../../src/icon/carbonAssetsMoney-3.svg"
/></div> /></div>
<div class="moneyTitle">CCER资产估值CNY</div> <div class="moneyTitle">CCER资产估值CNY</div>
<div class="moneyTotal" style="color: rgba(229, 102, 22, 1)">{{ ccer.valuation }}</div> <div class="moneyTotal" style="color: rgba(229, 102, 22, 1)">{{ ccer.valuation }}</div>
<div class="moneyDetail" > <div class="moneyDetail">
<div class="detailClick" @click="viewDetail(3)" style="border: 1px solid rgba(56, 157, 220, 1);"> <div
class="detailClick"
@click="viewDetail(3)"
style="border: 1px solid rgba(56, 157, 220, 1)">
<img <img
width="20px" width="20"
height="20px" height="20"
src="../../../../src/icon/carbonAssetsToDetail-3.svg" src="../../../../src/icon/carbonAssetsToDetail-3.svg"
alt="" /> alt="" />
<span style="color: rgba(56, 157, 220, 1);">交易明细</span> <span style="color: rgba(56, 157, 220, 1)">交易明细</span>
</div> </div>
</div> </div>
</div> </div>
<div class="title"> <div class="title">
<img width="24px" height="24px" src="../../../../src/icon/carbonAssetsTitle-3.svg" /> <img width="24" height="24" src="../../../../src/icon/carbonAssetsTitle-3.svg" />
<span>全国碳账户余额</span> <span>全国碳账户余额</span>
</div> </div>
<div class="bottom"> <div class="bottom">
@ -129,23 +136,23 @@
<div class="money">{{ ccer.opening }}</div> <div class="money">{{ ccer.opening }}</div>
<div class="moneyType">期初余额tCO2</div> <div class="moneyType">期初余额tCO2</div>
</div> </div>
<img width="17px" height="17px" src="../../../../src/icon/carbonAssetsAdd.svg" /> <img width="17" height="17" src="../../../../src/icon/carbonAssetsAdd.svg" />
<div class="calculation BLCard"> <div class="calculation BLCard">
<div class="money">{{ ccer.income }}</div> <div class="money">{{ ccer.income }}</div>
<div class="moneyType"> <div class="moneyType">
<img width="20px" height="17px" src="../../../../src/icon/carbonAssetsIncrease.svg" /> <img width="20" height="17" src="../../../../src/icon/carbonAssetsIncrease.svg" />
增加tCO2 增加tCO2
</div> </div>
</div> </div>
<img width="17px" height="17px" src="../../../../src/icon/carbonAssetsReduce.svg" /> <img width="17" height="17" src="../../../../src/icon/carbonAssetsReduce.svg" />
<div class="calculation BLCard"> <div class="calculation BLCard">
<div class="money">{{ ccer.expenditure }}</div> <div class="money">{{ ccer.expenditure }}</div>
<div class="moneyType"> <div class="moneyType">
<img width="20px" height="17px" src="../../../../src/icon/carbonAssetsLower.svg" /> <img width="20" height="17" src="../../../../src/icon/carbonAssetsLower.svg" />
减少tCO2 减少tCO2
</div> </div>
</div> </div>
<img width="17px" height="17px" src="../../../../src/icon/carbonAssetsEqual.svg" /> <img width="17" height="17" src="../../../../src/icon/carbonAssetsEqual.svg" />
<div class="calculation BLCard"> <div class="calculation BLCard">
<div class="money">{{ ccer.period }}</div> <div class="money">{{ ccer.period }}</div>
<div class="moneyType">期末余额tCO2</div> <div class="moneyType">期末余额tCO2</div>
@ -155,15 +162,15 @@
<a-card class="card" v-if="whole"> <a-card class="card" v-if="whole">
<div class="top" style="background: rgba(37, 192, 150, 0.05)"> <div class="top" style="background: rgba(37, 192, 150, 0.05)">
<div class="moneyImg" <div class="moneyImg"
><img width="68px" height="68px" src="../../../../src/icon/carbonAssetsMoney-4.svg" ><img width="68" height="68" src="../../../../src/icon/carbonAssetsMoney-4.svg"
/></div> /></div>
<div class="moneyTitle">碳资产总估值CNY</div> <div class="moneyTitle">碳资产总估值CNY</div>
<div class="moneyTotal" style="color: rgba(229, 102, 22, 1)">{{ whole.whole }}</div> <div class="moneyTotal" style="color: rgba(229, 102, 22, 1)">{{ whole.whole }}</div>
</div> </div>
<div class="title" style="justify-content: center"> <div class="title" style="justify-content: center">
<img <img
width="17px" width="17"
height="17px" height="17"
style="transform: rotate(90deg)" style="transform: rotate(90deg)"
src="../../../../src/icon/carbonAssetsEqual.svg" /> src="../../../../src/icon/carbonAssetsEqual.svg" />
</div> </div>
@ -172,12 +179,12 @@
<div class="money">{{ whole.nationwide }}</div> <div class="money">{{ whole.nationwide }}</div>
<div class="moneyType">全国碳账户资产估值</div> <div class="moneyType">全国碳账户资产估值</div>
</div> </div>
<img width="17px" height="17px" src="../../../../src/icon/carbonAssetsAdd.svg" /> <img width="17" height="17" src="../../../../src/icon/carbonAssetsAdd.svg" />
<div class="BRCard"> <div class="BRCard">
<div class="money">{{ whole.place }}</div> <div class="money">{{ whole.place }}</div>
<div class="moneyType">地方碳账户资产估值</div> <div class="moneyType">地方碳账户资产估值</div>
</div> </div>
<img width="17px" height="17px" src="../../../../src/icon/carbonAssetsAdd.svg" /> <img width="17" height="17" src="../../../../src/icon/carbonAssetsAdd.svg" />
<div class="BRCard"> <div class="BRCard">
<div class="money">{{ whole.ccer }}</div> <div class="money">{{ whole.ccer }}</div>
<div class="moneyType">CCER碳资产估值</div> <div class="moneyType">CCER碳资产估值</div>

75
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue

@ -38,41 +38,37 @@
<template #title="data"> <template #title="data">
<div class="treeRow"> <div class="treeRow">
<div> <div>
<span <span>{{ data.emissionName }}</span>
v-if="
data.emissionName &&
selectTreeDataValue &&
data.emissionName.indexOf(selectTreeDataValue) > -1
">
{{
data.emissionName.substring(0, data.emissionName.indexOf(selectTreeDataValue))
}}
<span style="color: #f50">{{ selectTreeDataValue }}</span>
{{
data.emissionName.substring(
data.emissionName.indexOf(selectTreeDataValue) + selectTreeDataValue.length,
)
}}
</span>
<span v-else>{{ data.emissionName }}</span>
</div> </div>
<a-dropdown> <a-dropdown>
<ns-icon name="actionMore" size="14" class="actionMore" /> <ns-icon name="actionMore" size="14" class="actionMore" />
<template #overlay> <template #overlay>
<a-menu> <a-menu>
<a-menu-item @click="editTreeNodeData(data)">编辑</a-menu-item> <a-menu-item v-if="data.emissionName !== '全部'" @click="editTreeNodeData(data)"
<a-menu-item @click="addTreeNodeData">新增子节点</a-menu-item> >编辑</a-menu-item
<a-menu-item
v-if="!data.isFirst && data.emissionName !== '未分类'"
@click="moveNode(data, 'up')"
>上移</a-menu-item
> >
<a-menu-item @click="addTreeNodeData"> 新增子节点 </a-menu-item>
<a-menu-item
v-if="
!data.isFirst &&
data.emissionName !== '未分类' &&
data.emissionName !== '全部'
"
@click="moveNode(data, 'up')">
上移
</a-menu-item>
<a-menu-item <a-menu-item
v-if="!data.isEnd && data.emissionName !== '未分类'" v-if="
@click="moveNode(data, 'down')" !data.isEnd &&
>下移</a-menu-item data.emissionName !== '未分类' &&
data.emissionName !== '全部'
"
@click="moveNode(data, 'down')">
下移
</a-menu-item>
<a-menu-item v-if="data.emissionName !== '全部'" @click="deleteTreeNode(data)"
>删除</a-menu-item
> >
<a-menu-item @click="deleteTreeNode(data)">删除</a-menu-item>
</a-menu> </a-menu>
</template> </template>
</a-dropdown> </a-dropdown>
@ -311,6 +307,7 @@
}, },
]; ];
const checkedTreeNodeKeys = ref<string[]>(); const checkedTreeNodeKeys = ref<string[]>();
const selectedKeys = ref<string[]>();
// const generateData = (_level: number, _preKey?: string, _tns?: TreeProps['treeData']) => { // const generateData = (_level: number, _preKey?: string, _tns?: TreeProps['treeData']) => {
// const preKey = _preKey || '0'; // const preKey = _preKey || '0';
@ -565,7 +562,10 @@
// //
const editTreeNode = ref({}); const editTreeNode = ref({});
const onSelectKeys = ref([]); const onSelectKeys = ref([]);
const onSelect = (selectedKeys: string[], info: any) => { const onSelect = (selectedKey: string[], info: any) => {
if (selectedKey.length === 1) {
selectedKeys.value = selectedKey;
}
if (info.selected) { if (info.selected) {
// showOperation.value = true; // showOperation.value = true;
editTreeNode.value = { editTreeNode.value = {
@ -575,7 +575,7 @@
sortNumber: info.selectedNodes[0].sortNumber, sortNumber: info.selectedNodes[0].sortNumber,
parentEmissionId: info.selectedNodes[0].parentEmissionId, parentEmissionId: info.selectedNodes[0].parentEmissionId,
}; };
onSelectKeys.value.push(info.selectedNodes[0].id); onSelectKeys.value = [info.selectedNodes[0].id];
emissionList.value = [...onSelectKeys.value, ...checkedIds.value]; emissionList.value = [...onSelectKeys.value, ...checkedIds.value];
mainRef.value?.nsTableRef.reload(); mainRef.value?.nsTableRef.reload();
} else { } else {
@ -766,49 +766,60 @@
columns: [ columns: [
{ {
title: 'id', title: 'id',
width: 50,
customRender: (text: any) => { customRender: (text: any) => {
return text.index + 1; return text.index + 1;
}, },
}, },
{ {
title: '排放源', title: '排放源',
width: 100,
dataIndex: 'emissionSources', dataIndex: 'emissionSources',
}, },
{ {
title: '排放类型', title: '排放类型',
width: 100,
dataIndex: 'emissionTypeColumn', dataIndex: 'emissionTypeColumn',
}, },
{ {
title: '排放气体', title: '排放气体',
width: 100,
dataIndex: 'emissionGas', dataIndex: 'emissionGas',
}, },
{ {
title: '排放环节', title: '排放环节',
width: 100,
dataIndex: 'emissionProcess', dataIndex: 'emissionProcess',
}, },
{ {
title: '排放因子', title: '排放因子',
width: 100,
dataIndex: 'emissionFactors', dataIndex: 'emissionFactors',
}, },
{ {
title: '排放因子单位', title: '排放因子单位',
width: 100,
dataIndex: 'emissionFactorUnits', dataIndex: 'emissionFactorUnits',
}, },
{ {
title: '数据来源', title: '数据来源',
width: 100,
dataIndex: 'dataSources', dataIndex: 'dataSources',
}, },
{ {
title: '数据库', title: '数据库',
width: 100,
dataIndex: 'carbonDatabase', dataIndex: 'carbonDatabase',
}, },
{ {
title: '参考文献', title: '参考文献',
width: 100,
dataIndex: 'bibliography', dataIndex: 'bibliography',
ellipsis: true, ellipsis: true,
}, },
{ {
title: '引用数量', title: '引用数量',
width: 100,
dataIndex: 'numberOfReferences', dataIndex: 'numberOfReferences',
}, },
], ],
@ -1224,13 +1235,17 @@
} }
.treePart { .treePart {
width: 70%; width: 70%;
height: 100%; height: calc(100% - 5vh);
display: flex; display: flex;
border: 1px solid #bfbfbf; border: 1px solid #bfbfbf;
margin-left: 10%; margin-left: 10%;
flex-direction: column; flex-direction: column;
border-radius: 12px; border-radius: 12px;
overflow: auto; overflow: auto;
:deep(.ant-tree) {
height: 90%;
overflow: auto;
}
} }
.actionMore { .actionMore {
display: none; display: none;

49
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue

@ -5,7 +5,7 @@
:data-source="data" :data-source="data"
:bordered="true" :bordered="true"
:pagination="false" :pagination="false"
:scroll="{ x: 2000, y: 480 }"> :scroll="{ x: 1700, y: 480 }">
<template #title> <template #title>
<a-date-picker v-model:value="selectYear" picker="year" valueFormat="YYYY" /> <a-date-picker v-model:value="selectYear" picker="year" valueFormat="YYYY" />
<span style="margin-left: 30px"> <span style="margin-left: 30px">
@ -14,14 +14,14 @@
</span> </span>
</template> </template>
</a-table> </a-table>
<a-pagination <!-- <a-pagination
:current="queryParams.pageNum" :current="queryParams.pageNum"
:total="total" :total="total"
:page-size="queryParams.pageSize" :page-size="queryParams.pageSize"
style="display: flex; justify-content: center; margin-top: 16px" style="display: flex; justify-content: center; margin-top: 16px"
:show-size-changer="true" :show-size-changer="true"
:show-quick-jumper="true" :show-quick-jumper="true"
@change="onChange" /> @change="onChange" /> -->
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -67,7 +67,7 @@
{ {
title: '排放类型', title: '排放类型',
dataIndex: 'cnValue', dataIndex: 'cnValue',
width: 130, width: 100,
customCell: (record, rowIndex) => { customCell: (record, rowIndex) => {
if (rowIndex == undefined) { if (rowIndex == undefined) {
return { return {
@ -90,82 +90,82 @@
{ {
title: '能源种类', title: '能源种类',
dataIndex: 'energyType', dataIndex: 'energyType',
width: 80, width: 100,
}, },
{ {
title: '计量单位', title: '计量单位',
dataIndex: 'unitName', dataIndex: 'unitName',
width: 80, width: 100,
}, },
{ {
title: '加权平均', title: '加权平均',
dataIndex: 'averageFactorValue', dataIndex: 'averageFactorValue',
width: 80, width: 100,
}, },
{ {
title: '全年', title: '全年',
dataIndex: 'carbonYearly', dataIndex: 'carbonYearly',
width: 80, width: 100,
}, },
{ {
title: '1月', title: '1月',
dataIndex: 'jan', dataIndex: 'jan',
width: 80, width: 100,
}, },
{ {
title: '2月', title: '2月',
dataIndex: 'feb', dataIndex: 'feb',
width: 80, width: 100,
}, },
{ {
title: '3月', title: '3月',
dataIndex: 'mar', dataIndex: 'mar',
width: 80, width: 100,
}, },
{ {
title: '4月', title: '4月',
dataIndex: 'apr', dataIndex: 'apr',
width: 80, width: 100,
}, },
{ {
title: '5月', title: '5月',
dataIndex: 'may', dataIndex: 'may',
width: 80, width: 100,
}, },
{ {
title: '6月', title: '6月',
dataIndex: 'jun', dataIndex: 'jun',
width: 80, width: 100,
}, },
{ {
title: '7月', title: '7月',
dataIndex: 'jul', dataIndex: 'jul',
width: 80, width: 100,
}, },
{ {
title: '8月', title: '8月',
dataIndex: 'aug', dataIndex: 'aug',
width: 80, width: 100,
}, },
{ {
title: '9月', title: '9月',
dataIndex: 'sep', dataIndex: 'sep',
width: 80, width: 100,
}, },
{ {
title: '10月', title: '10月',
dataIndex: 'oct', dataIndex: 'oct',
width: 80, width: 100,
}, },
{ {
title: '11月', title: '11月',
dataIndex: 'nov', dataIndex: 'nov',
width: 80, width: 100,
}, },
{ {
title: '12月', title: '12月',
dataIndex: 'dec', dataIndex: 'dece',
width: 80, width: 100,
}, },
]; ];
// //
@ -209,7 +209,7 @@
display: flex; display: flex;
} }
:deep(.ant-table-container) { :deep(.ant-table-container) {
padding: 0px 16px; margin: 0px 16px;
} }
// :deep(.ant-table-cell) { // :deep(.ant-table-cell) {
// border: 1px solid #f0f0f0; // border: 1px solid #f0f0f0;
@ -223,4 +223,9 @@
td.column-money { td.column-money {
text-align: right !important; text-align: right !important;
} }
.custom-cell {
display: flex;
align-items: center;
padding: 8px;
}
</style> </style>

2
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts

@ -71,7 +71,7 @@ export const tableColumns = [
}, },
{ {
title: '12月', title: '12月',
dataIndex: 'dec', dataIndex: 'dece',
}, },
{ {
title: '操作', title: '操作',

9
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue

@ -625,18 +625,18 @@
}, },
{ {
title: '12月', title: '12月',
dataIndex: 'dec', dataIndex: 'dece',
width: 100, width: 100,
customRender: (value) => { customRender: (value) => {
let text; let text;
let color; let color;
switch (value.record.decFlag) { switch (value.record.decFlag) {
case 1: case 1:
text = value.record.dec ? value.record.dec : ''; text = value.record.dece ? value.record.dece : '';
color = 'rgba(243, 97, 99, 1)'; color = 'rgba(243, 97, 99, 1)';
break; break;
case 0: case 0:
text = value.record.dec ? value.record.dec : ''; text = value.record.dece ? value.record.dece : '';
color = 'rgba(57, 215, 287, 1)'; color = 'rgba(57, 215, 287, 1)';
break; break;
} }
@ -659,6 +659,7 @@
if (res.data.emissionType) { if (res.data.emissionType) {
res.data.emissionType = Number(res.data.emissionType); res.data.emissionType = Number(res.data.emissionType);
} }
changeEnergyType(res.data.energyConsumptionType);
if (res.data.unit) { if (res.data.unit) {
let selectDevice = ref([Number(res.data.unit)]); let selectDevice = ref([Number(res.data.unit)]);
findParentIds(measurementUnit.value, res.data.unit, selectDevice.value); findParentIds(measurementUnit.value, res.data.unit, selectDevice.value);
@ -773,6 +774,8 @@
mainRef.value?.nsTableRef.reload(); mainRef.value?.nsTableRef.reload();
}; };
const changeEnergyType = (value) => { const changeEnergyType = (value) => {
debugger;
formState.value.collectionNode = '';
// //
fetch(group.queryDeviceGroupTree, { energyType: value, orgId: orgId.value }).then((res) => { fetch(group.queryDeviceGroupTree, { energyType: value, orgId: orgId.value }).then((res) => {
treeData.value = res.data; treeData.value = res.data;

47
hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue

@ -5,8 +5,8 @@
<div class="title">{{ props.year }}年济阳站碳盘查报告</div> <div class="title">{{ props.year }}年济阳站碳盘查报告</div>
<div class="standard" style="display: flex; align-items: center"> <div class="standard" style="display: flex; align-items: center">
<img <img
width="11px" width="11"
height="11px" height="11"
style="margin-right: 5px" style="margin-right: 5px"
src="../../../../../src/icon/carbonInventoryCheck.svg" /> src="../../../../../src/icon/carbonInventoryCheck.svg" />
<span <span
@ -19,7 +19,7 @@
text-align: left; text-align: left;
vertical-align: top; vertical-align: top;
"> ">
适用标准ISO 14064-1 适用标准{{ props.standard }}
</span> </span>
<a-button type="primary" @click="changeParentData" ghost style="margin-left: 6px"> <a-button type="primary" @click="changeParentData" ghost style="margin-left: 6px">
返回 返回
@ -328,7 +328,7 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item ref="name" label="消耗量" name="consumption"> <a-form-item ref="name" label="消耗量" name="consumption">
<ns-input <ns-input-number
v-model:value="editFormState.consumption" v-model:value="editFormState.consumption"
:maxlength="20" :maxlength="20"
@keydown="handleKeyDown" @keydown="handleKeyDown"
@ -482,6 +482,9 @@
endTime: { endTime: {
type: String, type: String,
}, },
standard: {
type: String,
},
}); });
const activeKey = ref('1'); const activeKey = ref('1');
const orgId = ref(''); const orgId = ref('');
@ -641,6 +644,7 @@
} }
} else { } else {
selectedKeysR.value = ['0-0-0']; selectedKeysR.value = ['0-0-0'];
if (res.data[0].children.length > 0) {
getTableId.value = res.data[0].children[0].id; getTableId.value = res.data[0].children[0].id;
bizId.value = res.data[0].children[0].id; bizId.value = res.data[0].children[0].id;
if (res.data.length != 0) { if (res.data.length != 0) {
@ -653,15 +657,18 @@
columns.value[3].title = '排放量'; columns.value[3].title = '排放量';
} }
} }
}
}); });
}; };
// //
const onSelectR = (selectedKey: string[], info: any) => { const onSelectR = (selectedKey: string[], info: any) => {
selectedKeysR.value = selectedKey; selectedKeysR.value = selectedKey;
if (info.selectedNodes[0].emissionSource !== '全部') {
getTableId.value = info.selectedNodes[0].id; getTableId.value = info.selectedNodes[0].id;
bizId.value = info.selectedNodes[0].id; bizId.value = info.selectedNodes[0].id;
getPFYTableList(getTableId.value); getPFYTableList(getTableId.value);
getTableHeardUnit(getTableId.value); getTableHeardUnit(getTableId.value);
}
}; };
// //
const getTableHeardUnit = (id) => { const getTableHeardUnit = (id) => {
@ -815,16 +822,17 @@
.validate() .validate()
.then(() => { .then(() => {
console.log('values', formState, toRaw(formState)); console.log('values', formState, toRaw(formState));
if (formState.value.unitId) { const addformState = JSON.parse(JSON.stringify(formState.value));
formState.value.unitId = formState.value.unitId.join(',').split(',')[1]; if (addformState.unitId) {
addformState.unitId = addformState.unitId.join(',').split(',')[1];
} }
if (formState.value.carbonEmissionUnits) { if (addformState.carbonEmissionUnits) {
formState.value.carbonEmissionUnits = formState.value.carbonEmissionUnits addformState.carbonEmissionUnits = addformState.carbonEmissionUnits
.join(',') .join(',')
.split(',')[1]; .split(',')[1];
} }
if (formState.value.id) { if (addformState.id) {
fetch(carbonInventoryCheck.update, formState.value).then((res) => { fetch(carbonInventoryCheck.update, addformState).then((res) => {
addTreeNodeVisible.value = false; addTreeNodeVisible.value = false;
formState.value = { formState.value = {
orgId: orgId.value, orgId: orgId.value,
@ -837,7 +845,8 @@
getEmissionSourceTree(); getEmissionSourceTree();
}); });
} else { } else {
fetch(carbonInventoryCheck.create, formState.value).then((res) => { if (addformState.categoryId) {
fetch(carbonInventoryCheck.create, addformState).then((res) => {
addTreeNodeVisible.value = false; addTreeNodeVisible.value = false;
formState.value = { formState.value = {
orgId: orgId.value, orgId: orgId.value,
@ -851,6 +860,10 @@
getEmissionSourceTree(); getEmissionSourceTree();
getPFYTableList(res.data.id); getPFYTableList(res.data.id);
}); });
} else {
message.warning('请选择能源类别');
addTreeNodeVisible.value = false;
}
} }
}) })
.catch((error) => { .catch((error) => {
@ -1266,10 +1279,10 @@
fetch(carbonInventoryCheck.carbonFlowDirection, queryFlowDirection.value).then((res) => { fetch(carbonInventoryCheck.carbonFlowDirection, queryFlowDirection.value).then((res) => {
console.log(res); console.log(res);
linksData.value = res.data[0]; linksData.value = res.data[0];
if (linksData.value[0].value !== 0) { if (linksData.value[0].value === 0 || linksData.value[0].value === undefined) {
showChart.value = true;
} else {
showChart.value = false; showChart.value = false;
} else {
showChart.value = true;
} }
datalist.value = res.data[1]; datalist.value = res.data[1];
drawEcharts(); drawEcharts();
@ -1487,11 +1500,13 @@
colorStops: [ colorStops: [
{ {
offset: 1, offset: 1,
color: Color[d], // 0% // color: Color[d], // 0%
color: Color[d % Color.length],
}, },
{ {
offset: 0, offset: 0,
color: Color1[d], // 100% // color: Color1[d], // 100%
color: Color1[d % Color1.length],
}, },
], ],
global: false, // false global: false, // false

8
hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue

@ -10,6 +10,7 @@
:year="year" :year="year"
:startTime="startTime" :startTime="startTime"
:endTime="endTime" :endTime="endTime"
:standard="standard"
@change-data="updateData" /> @change-data="updateData" />
</div> </div>
<!-- 新增报告弹窗 --> <!-- 新增报告弹窗 -->
@ -23,6 +24,7 @@
<div class="ns-form-title" <div class="ns-form-title"
><div class="title">{{ text }}</div></div ><div class="title">{{ text }}</div></div
> >
<a-spin :spinning="spinning">
<a-form <a-form
ref="formRef" ref="formRef"
:model="formState" :model="formState"
@ -63,6 +65,7 @@
valueFormat="YYYY-MM" /> valueFormat="YYYY-MM" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-spin>
<template #footer> <template #footer>
<a-button style="margin-right: 8px" @click="onClose">取消</a-button> <a-button style="margin-right: 8px" @click="onClose">取消</a-button>
<a-button type="primary" @click="onSubmit">确定</a-button> <a-button type="primary" @click="onSubmit">确定</a-button>
@ -121,8 +124,10 @@
event.preventDefault(); event.preventDefault();
} }
}; };
const spinning = ref(false);
// //
const onSubmit = () => { const onSubmit = () => {
spinning.value = true;
formRef.value formRef.value
.validate() .validate()
.then(() => { .then(() => {
@ -133,6 +138,7 @@
fetch(carbonInventoryCheck.createOrUpdate, formState.value).then((res) => { fetch(carbonInventoryCheck.createOrUpdate, formState.value).then((res) => {
visible.value = false; visible.value = false;
mainRef.value?.nsTableRef.reload(); mainRef.value?.nsTableRef.reload();
spinning.value = false;
}); });
}) })
.catch((error) => { .catch((error) => {
@ -145,6 +151,7 @@
const reportId = ref(); const reportId = ref();
const startTime = ref(); const startTime = ref();
const endTime = ref(); const endTime = ref();
const standard = ref();
const year = ref(); const year = ref();
const tableConfig = ref({ const tableConfig = ref({
title: '数据库', title: '数据库',
@ -220,6 +227,7 @@
year.value = record.reportYear; year.value = record.reportYear;
startTime.value = record.startTime; startTime.value = record.startTime;
endTime.value = record.endTime; endTime.value = record.endTime;
standard.value = record.genericStandard;
}, },
}, },
{ {

24
hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/categoryDeatil.vue

@ -96,6 +96,28 @@
</span> </span>
</template> </template>
</template> </template>
<!-- <template #summary>
<a-table-summary-row>
<a-table-summary-cell></a-table-summary-cell>
<a-table-summary-cell>合计</a-table-summary-cell>
<a-table-summary-cell></a-table-summary-cell>
<a-table-summary-cell>
<a-typography-text type="danger">{{ 111 }}</a-typography-text>
</a-table-summary-cell>
<a-table-summary-cell>
<a-typography-text>{{ 222 }}</a-typography-text>
</a-table-summary-cell>
<a-table-summary-cell>
<a-typography-text>{{ 222 }}</a-typography-text>
</a-table-summary-cell>
<a-table-summary-cell></a-table-summary-cell>
<a-table-summary-cell></a-table-summary-cell>
<a-table-summary-cell>
<a-typography-text>{{ 222 }}</a-typography-text>
</a-table-summary-cell>
<a-table-summary-cell></a-table-summary-cell>
</a-table-summary-row>
</template> -->
</a-table> </a-table>
</a-card> </a-card>
</div> </div>
@ -769,7 +791,7 @@
} }
.contant { .contant {
width: 100%; width: 100%;
height: calc(100% - 5vh); height: calc(95% - 5vh);
overflow: auto; overflow: auto;
.chartsPart { .chartsPart {
width: 100%; width: 100%;

10
hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/index.vue

@ -155,7 +155,7 @@
selectedTime.value = false; selectedTime.value = false;
getMonthData(); getMonthData();
getBallQuery.value.yearAndMonth = 'month'; getBallQuery.value.yearAndMonth = 'month';
getMonthPillarData(); // getMonthPillarData();
}; };
const changeToYear = () => { const changeToYear = () => {
monthStyles.value = 'background: #transparent'; monthStyles.value = 'background: #transparent';
@ -167,7 +167,7 @@
selectedTime.value = true; selectedTime.value = true;
getYearData(); getYearData();
getBallQuery.value.yearAndMonth = 'year'; getBallQuery.value.yearAndMonth = 'year';
getYearPillarData(); // getYearPillarData();
}; };
// echarts // echarts
const pillarChartRef = ref(null); const pillarChartRef = ref(null);
@ -514,7 +514,6 @@
getBallQuery.value.year = selectYearValue.value; getBallQuery.value.year = selectYearValue.value;
addTreeNode.value.year = selectYearValue.value; addTreeNode.value.year = selectYearValue.value;
getYearData(); getYearData();
getYearPillarData();
}; };
const getYearData = () => { const getYearData = () => {
fetch(carbonPlanning.searchListByYear, yearQueryParams.value).then((res) => { fetch(carbonPlanning.searchListByYear, yearQueryParams.value).then((res) => {
@ -522,6 +521,9 @@
res.data.forEach((item) => { res.data.forEach((item) => {
treeCheckedKeys.value.push(item.itemizeId.toString()); treeCheckedKeys.value.push(item.itemizeId.toString());
}); });
addTreeNode.value.itemizeIds = treeCheckedKeys.value;
getPillarQuery.value.itemizeIds = treeCheckedKeys.value;
getYearPillarData();
}); });
}; };
// //
@ -536,11 +538,11 @@
getPillarQuery.value.selectedMonth = selectMonthValue.value; getPillarQuery.value.selectedMonth = selectMonthValue.value;
getBallQuery.value.yearMonth = selectMonthValue.value; getBallQuery.value.yearMonth = selectMonthValue.value;
getMonthData(); getMonthData();
getMonthPillarData();
}; };
const getMonthData = () => { const getMonthData = () => {
fetch(carbonPlanning.searchListByMonth, monthQueryParams.value).then((res) => { fetch(carbonPlanning.searchListByMonth, monthQueryParams.value).then((res) => {
data.value = res.data; data.value = res.data;
getMonthPillarData();
}); });
}; };
defineExpose({ defineExpose({

12
lib/component/form/input/input-number.vue

@ -1,5 +1,5 @@
<template> <template>
<a-input-number> <a-input-number @keydown="handleKeyDown">
<template #[item]="data" v-for="item in Object.keys($slots)" :key="item"> <template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
<slot :name="item" v-bind="data || {}"> </slot> <slot :name="item" v-bind="data || {}"> </slot>
</template> </template>
@ -10,7 +10,15 @@
export default defineComponent({ export default defineComponent({
name: 'NsInputNumber', name: 'NsInputNumber',
setup() { setup() {
return {}; const handleKeyDown = (event: KeyboardEvent) => {
// Check if the pressed key is a space
if (event.code === 'Space') {
event.preventDefault();
}
};
return {
handleKeyDown,
};
}, },
}); });
</script> </script>

13
lib/component/form/input/textarea.vue

@ -1,11 +1,22 @@
<template> <template>
<a-textarea /> <a-textarea @keydown="handleKeyDown" />
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
export default defineComponent({ export default defineComponent({
name: 'NsTextarea', name: 'NsTextarea',
setup() {
const handleKeyDown = (event: KeyboardEvent) => {
// Check if the pressed key is a space
if (event.code === 'Space') {
event.preventDefault();
}
};
return {
handleKeyDown,
};
},
}); });
</script> </script>
<style lang="less" scoped></style> <style lang="less" scoped></style>

Loading…
Cancel
Save