修改测试问题
This commit is contained in:
Binary file not shown.
@@ -73,9 +73,10 @@
|
||||
</div>
|
||||
<a-table :columns="totalColumns" :data-source="totalData" bordered :pagination="false">
|
||||
<template #bodyCell="{ column, text }">
|
||||
<template v-if="column.dataIndex === 'name'">
|
||||
<span>{{ text || '-' }}</span>
|
||||
<!-- <template v-if="column.dataIndex === 'name'">
|
||||
<a>{{ text }}</a>
|
||||
</template>
|
||||
</template> -->
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
@@ -391,6 +392,7 @@
|
||||
api: carbonAssets.import, // 导入接口名
|
||||
params: {
|
||||
orgId,
|
||||
year,
|
||||
},
|
||||
title: '碳资产', // 弹窗title
|
||||
templateName: 'carbonAssets', // 所使用的文件名称
|
||||
@@ -413,6 +415,7 @@
|
||||
pageSize: 999,
|
||||
year: queryParams.value.year,
|
||||
ids: selectedRowKeys.value,
|
||||
accountType: props.parentId,
|
||||
});
|
||||
const config = {
|
||||
responseType: 'blob',
|
||||
@@ -674,6 +677,7 @@
|
||||
.validate()
|
||||
.then(() => {
|
||||
console.log('values', formState, toRaw(formState));
|
||||
formState.value.orgId = orgId.value;
|
||||
if (formState.value.transactionType) {
|
||||
formState.value.transactionType = formState.value.transactionType.join(',').split(',')[1];
|
||||
}
|
||||
@@ -699,7 +703,8 @@
|
||||
message.success('操作成功!');
|
||||
visible.value = false;
|
||||
delIds.value = [];
|
||||
getDetailList();
|
||||
// getDetailList();
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
getTotalTable();
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -709,7 +714,8 @@
|
||||
message.success('操作成功!');
|
||||
visible.value = false;
|
||||
delIds.value = [];
|
||||
getDetailList();
|
||||
// getDetailList();
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
}
|
||||
});
|
||||
})
|
||||
|
@@ -2,26 +2,27 @@
|
||||
<div class="mainContant" v-if="homePage">
|
||||
<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="moneyImg"
|
||||
><img width="68px" height="68px" src="../../../../src/icon/carbonAssetsMoney-1.svg"
|
||||
/></div>
|
||||
<div class="moneyImg"><img width="68" height="68" src="../../../../src/icon/carbonAssetsMoney-1.svg" /></div>
|
||||
<div class="moneyTitle">全国碳账户估值(CNY)</div>
|
||||
<div class="moneyTotal" style="color: rgba(229, 102, 22, 1)">{{
|
||||
nationwide.valuation
|
||||
}}</div>
|
||||
<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
|
||||
width="20px"
|
||||
height="20px"
|
||||
width="20"
|
||||
height="20"
|
||||
src="../../../../src/icon/carbonAssetsToDetail-1.svg"
|
||||
alt="" />
|
||||
<span style="color: rgba(229, 102, 22, 1);">交易明细</span>
|
||||
<span style="color: rgba(229, 102, 22, 1)">交易明细</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
@@ -29,23 +30,23 @@
|
||||
<div class="money">{{ nationwide.opening }}</div>
|
||||
<div class="moneyType">期初余额(tCO2)</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="money">{{ nationwide.income }}</div>
|
||||
<div class="moneyType">
|
||||
<img width="20px" height="17px" src="../../../../src/icon/carbonAssetsIncrease.svg" />
|
||||
<img width="20" height="17" src="../../../../src/icon/carbonAssetsIncrease.svg" />
|
||||
增加(tCO2)
|
||||
</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="money">{{ nationwide.expenditure }}</div>
|
||||
<div class="moneyType">
|
||||
<img width="20px" height="17px" src="../../../../src/icon/carbonAssetsLower.svg" />
|
||||
<img width="20" height="17" src="../../../../src/icon/carbonAssetsLower.svg" />
|
||||
减少(tCO2)
|
||||
</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="money">{{ nationwide.period }}</div>
|
||||
<div class="moneyType">期末余额(tCO2)</div>
|
||||
@@ -55,23 +56,26 @@
|
||||
<a-card class="card" v-if="place" style="margin-bottom: 1%">
|
||||
<div class="top" style="background: rgba(234, 71, 54, 0.05)">
|
||||
<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 class="moneyTitle">地方碳账户估值(CNY)</div>
|
||||
<div class="moneyTotal" style="color: rgba(229, 102, 22, 1)">{{ place.valuation }}</div>
|
||||
<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
|
||||
width="20px"
|
||||
height="20px"
|
||||
width="20"
|
||||
height="20"
|
||||
src="../../../../src/icon/carbonAssetsToDetail-2.svg"
|
||||
alt="" />
|
||||
<span style="color: rgba(230, 51, 44, 1);">交易明细</span>
|
||||
<span style="color: rgba(230, 51, 44, 1)">交易明细</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
@@ -79,23 +83,23 @@
|
||||
<div class="money">{{ place.opening }}</div>
|
||||
<div class="moneyType">期初余额(tCO2)</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="money">{{ place.income }}</div>
|
||||
<div class="moneyType">
|
||||
<img width="20px" height="17px" src="../../../../src/icon/carbonAssetsIncrease.svg" />
|
||||
<img width="20" height="17" src="../../../../src/icon/carbonAssetsIncrease.svg" />
|
||||
增加(tCO2)
|
||||
</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="money">{{ place.expenditure }}</div>
|
||||
<div class="moneyType">
|
||||
<img width="20px" height="17px" src="../../../../src/icon/carbonAssetsLower.svg" />
|
||||
<img width="20" height="17" src="../../../../src/icon/carbonAssetsLower.svg" />
|
||||
减少(tCO2)
|
||||
</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="money">{{ place.period }}</div>
|
||||
<div class="moneyType">期末余额(tCO2)</div>
|
||||
@@ -105,23 +109,26 @@
|
||||
<a-card class="card" v-if="ccer" style="margin-right: 1%">
|
||||
<div class="top" style="background: rgba(65, 163, 224, 0.05)">
|
||||
<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 class="moneyTitle">CCER资产估值(CNY)</div>
|
||||
<div class="moneyTotal" style="color: rgba(229, 102, 22, 1)">{{ ccer.valuation }}</div>
|
||||
<div class="moneyDetail" >
|
||||
<div class="detailClick" @click="viewDetail(3)" style="border: 1px solid rgba(56, 157, 220, 1);">
|
||||
<div class="moneyDetail">
|
||||
<div
|
||||
class="detailClick"
|
||||
@click="viewDetail(3)"
|
||||
style="border: 1px solid rgba(56, 157, 220, 1)">
|
||||
<img
|
||||
width="20px"
|
||||
height="20px"
|
||||
width="20"
|
||||
height="20"
|
||||
src="../../../../src/icon/carbonAssetsToDetail-3.svg"
|
||||
alt="" />
|
||||
<span style="color: rgba(56, 157, 220, 1);">交易明细</span>
|
||||
<span style="color: rgba(56, 157, 220, 1)">交易明细</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
@@ -129,23 +136,23 @@
|
||||
<div class="money">{{ ccer.opening }}</div>
|
||||
<div class="moneyType">期初余额(tCO2)</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="money">{{ ccer.income }}</div>
|
||||
<div class="moneyType">
|
||||
<img width="20px" height="17px" src="../../../../src/icon/carbonAssetsIncrease.svg" />
|
||||
<img width="20" height="17" src="../../../../src/icon/carbonAssetsIncrease.svg" />
|
||||
增加(tCO2)
|
||||
</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="money">{{ ccer.expenditure }}</div>
|
||||
<div class="moneyType">
|
||||
<img width="20px" height="17px" src="../../../../src/icon/carbonAssetsLower.svg" />
|
||||
<img width="20" height="17" src="../../../../src/icon/carbonAssetsLower.svg" />
|
||||
减少(tCO2)
|
||||
</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="money">{{ ccer.period }}</div>
|
||||
<div class="moneyType">期末余额(tCO2)</div>
|
||||
@@ -155,15 +162,15 @@
|
||||
<a-card class="card" v-if="whole">
|
||||
<div class="top" style="background: rgba(37, 192, 150, 0.05)">
|
||||
<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 class="moneyTitle">碳资产总估值(CNY)</div>
|
||||
<div class="moneyTotal" style="color: rgba(229, 102, 22, 1)">{{ whole.whole }}</div>
|
||||
</div>
|
||||
<div class="title" style="justify-content: center">
|
||||
<img
|
||||
width="17px"
|
||||
height="17px"
|
||||
width="17"
|
||||
height="17"
|
||||
style="transform: rotate(90deg)"
|
||||
src="../../../../src/icon/carbonAssetsEqual.svg" />
|
||||
</div>
|
||||
@@ -172,12 +179,12 @@
|
||||
<div class="money">{{ whole.nationwide }}</div>
|
||||
<div class="moneyType">全国碳账户资产估值</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="money">{{ whole.place }}</div>
|
||||
<div class="moneyType">地方碳账户资产估值</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="money">{{ whole.ccer }}</div>
|
||||
<div class="moneyType">CCER碳资产估值</div>
|
||||
|
@@ -38,41 +38,37 @@
|
||||
<template #title="data">
|
||||
<div class="treeRow">
|
||||
<div>
|
||||
<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>
|
||||
<span>{{ data.emissionName }}</span>
|
||||
</div>
|
||||
<a-dropdown>
|
||||
<ns-icon name="actionMore" size="14" class="actionMore" />
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item @click="editTreeNodeData(data)">编辑</a-menu-item>
|
||||
<a-menu-item @click="addTreeNodeData">新增子节点</a-menu-item>
|
||||
<a-menu-item
|
||||
v-if="!data.isFirst && data.emissionName !== '未分类'"
|
||||
@click="moveNode(data, 'up')"
|
||||
>上移</a-menu-item
|
||||
<a-menu-item v-if="data.emissionName !== '全部'" @click="editTreeNodeData(data)"
|
||||
>编辑</a-menu-item
|
||||
>
|
||||
<a-menu-item @click="addTreeNodeData"> 新增子节点 </a-menu-item>
|
||||
<a-menu-item
|
||||
v-if="!data.isEnd && data.emissionName !== '未分类'"
|
||||
@click="moveNode(data, 'down')"
|
||||
>下移</a-menu-item
|
||||
v-if="
|
||||
!data.isFirst &&
|
||||
data.emissionName !== '未分类' &&
|
||||
data.emissionName !== '全部'
|
||||
"
|
||||
@click="moveNode(data, 'up')">
|
||||
上移
|
||||
</a-menu-item>
|
||||
<a-menu-item
|
||||
v-if="
|
||||
!data.isEnd &&
|
||||
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>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
@@ -311,6 +307,7 @@
|
||||
},
|
||||
];
|
||||
const checkedTreeNodeKeys = ref<string[]>();
|
||||
const selectedKeys = ref<string[]>();
|
||||
|
||||
// const generateData = (_level: number, _preKey?: string, _tns?: TreeProps['treeData']) => {
|
||||
// const preKey = _preKey || '0';
|
||||
@@ -565,7 +562,10 @@
|
||||
// 被选中的树节点
|
||||
const editTreeNode = 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) {
|
||||
// showOperation.value = true;
|
||||
editTreeNode.value = {
|
||||
@@ -575,7 +575,7 @@
|
||||
sortNumber: info.selectedNodes[0].sortNumber,
|
||||
parentEmissionId: info.selectedNodes[0].parentEmissionId,
|
||||
};
|
||||
onSelectKeys.value.push(info.selectedNodes[0].id);
|
||||
onSelectKeys.value = [info.selectedNodes[0].id];
|
||||
emissionList.value = [...onSelectKeys.value, ...checkedIds.value];
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
} else {
|
||||
@@ -766,49 +766,60 @@
|
||||
columns: [
|
||||
{
|
||||
title: 'id',
|
||||
width: 50,
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '排放源',
|
||||
width: 100,
|
||||
dataIndex: 'emissionSources',
|
||||
},
|
||||
{
|
||||
title: '排放类型',
|
||||
width: 100,
|
||||
dataIndex: 'emissionTypeColumn',
|
||||
},
|
||||
{
|
||||
title: '排放气体',
|
||||
width: 100,
|
||||
dataIndex: 'emissionGas',
|
||||
},
|
||||
{
|
||||
title: '排放环节',
|
||||
width: 100,
|
||||
dataIndex: 'emissionProcess',
|
||||
},
|
||||
{
|
||||
title: '排放因子',
|
||||
width: 100,
|
||||
dataIndex: 'emissionFactors',
|
||||
},
|
||||
{
|
||||
title: '排放因子单位',
|
||||
width: 100,
|
||||
dataIndex: 'emissionFactorUnits',
|
||||
},
|
||||
{
|
||||
title: '数据来源',
|
||||
width: 100,
|
||||
dataIndex: 'dataSources',
|
||||
},
|
||||
{
|
||||
title: '数据库',
|
||||
width: 100,
|
||||
dataIndex: 'carbonDatabase',
|
||||
},
|
||||
{
|
||||
title: '参考文献',
|
||||
width: 100,
|
||||
dataIndex: 'bibliography',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '引用数量',
|
||||
width: 100,
|
||||
dataIndex: 'numberOfReferences',
|
||||
},
|
||||
],
|
||||
@@ -1224,13 +1235,17 @@
|
||||
}
|
||||
.treePart {
|
||||
width: 70%;
|
||||
height: 100%;
|
||||
height: calc(100% - 5vh);
|
||||
display: flex;
|
||||
border: 1px solid #bfbfbf;
|
||||
margin-left: 10%;
|
||||
flex-direction: column;
|
||||
border-radius: 12px;
|
||||
overflow: auto;
|
||||
:deep(.ant-tree) {
|
||||
height: 90%;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
.actionMore {
|
||||
display: none;
|
||||
|
@@ -5,7 +5,7 @@
|
||||
:data-source="data"
|
||||
:bordered="true"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 2000, y: 480 }">
|
||||
:scroll="{ x: 1700, y: 480 }">
|
||||
<template #title>
|
||||
<a-date-picker v-model:value="selectYear" picker="year" valueFormat="YYYY" />
|
||||
<span style="margin-left: 30px">
|
||||
@@ -14,14 +14,14 @@
|
||||
</span>
|
||||
</template>
|
||||
</a-table>
|
||||
<a-pagination
|
||||
<!-- <a-pagination
|
||||
:current="queryParams.pageNum"
|
||||
:total="total"
|
||||
:page-size="queryParams.pageSize"
|
||||
style="display: flex; justify-content: center; margin-top: 16px"
|
||||
:show-size-changer="true"
|
||||
:show-quick-jumper="true"
|
||||
@change="onChange" />
|
||||
@change="onChange" /> -->
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
@@ -67,7 +67,7 @@
|
||||
{
|
||||
title: '排放类型',
|
||||
dataIndex: 'cnValue',
|
||||
width: 130,
|
||||
width: 100,
|
||||
customCell: (record, rowIndex) => {
|
||||
if (rowIndex == undefined) {
|
||||
return {
|
||||
@@ -90,82 +90,82 @@
|
||||
{
|
||||
title: '能源种类',
|
||||
dataIndex: 'energyType',
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '计量单位',
|
||||
dataIndex: 'unitName',
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '加权平均',
|
||||
dataIndex: 'averageFactorValue',
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '全年',
|
||||
dataIndex: 'carbonYearly',
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '1月',
|
||||
dataIndex: 'jan',
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '2月',
|
||||
dataIndex: 'feb',
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '3月',
|
||||
dataIndex: 'mar',
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '4月',
|
||||
dataIndex: 'apr',
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '5月',
|
||||
dataIndex: 'may',
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '6月',
|
||||
dataIndex: 'jun',
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '7月',
|
||||
dataIndex: 'jul',
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '8月',
|
||||
dataIndex: 'aug',
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '9月',
|
||||
dataIndex: 'sep',
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '10月',
|
||||
dataIndex: 'oct',
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '11月',
|
||||
dataIndex: 'nov',
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '12月',
|
||||
dataIndex: 'dec',
|
||||
width: 80,
|
||||
dataIndex: 'dece',
|
||||
width: 100,
|
||||
},
|
||||
];
|
||||
// 合并单元格
|
||||
@@ -209,7 +209,7 @@
|
||||
display: flex;
|
||||
}
|
||||
:deep(.ant-table-container) {
|
||||
padding: 0px 16px;
|
||||
margin: 0px 16px;
|
||||
}
|
||||
// :deep(.ant-table-cell) {
|
||||
// border: 1px solid #f0f0f0;
|
||||
@@ -223,4 +223,9 @@
|
||||
td.column-money {
|
||||
text-align: right !important;
|
||||
}
|
||||
.custom-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 8px;
|
||||
}
|
||||
</style>
|
||||
|
@@ -71,7 +71,7 @@ export const tableColumns = [
|
||||
},
|
||||
{
|
||||
title: '12月',
|
||||
dataIndex: 'dec',
|
||||
dataIndex: 'dece',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
@@ -625,18 +625,18 @@
|
||||
},
|
||||
{
|
||||
title: '12月',
|
||||
dataIndex: 'dec',
|
||||
dataIndex: 'dece',
|
||||
width: 100,
|
||||
customRender: (value) => {
|
||||
let text;
|
||||
let color;
|
||||
switch (value.record.decFlag) {
|
||||
case 1:
|
||||
text = value.record.dec ? value.record.dec : '';
|
||||
text = value.record.dece ? value.record.dece : '';
|
||||
color = 'rgba(243, 97, 99, 1)';
|
||||
break;
|
||||
case 0:
|
||||
text = value.record.dec ? value.record.dec : '';
|
||||
text = value.record.dece ? value.record.dece : '';
|
||||
color = 'rgba(57, 215, 287, 1)';
|
||||
break;
|
||||
}
|
||||
@@ -659,6 +659,7 @@
|
||||
if (res.data.emissionType) {
|
||||
res.data.emissionType = Number(res.data.emissionType);
|
||||
}
|
||||
changeEnergyType(res.data.energyConsumptionType);
|
||||
if (res.data.unit) {
|
||||
let selectDevice = ref([Number(res.data.unit)]);
|
||||
findParentIds(measurementUnit.value, res.data.unit, selectDevice.value);
|
||||
@@ -773,6 +774,8 @@
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
};
|
||||
const changeEnergyType = (value) => {
|
||||
debugger;
|
||||
formState.value.collectionNode = '';
|
||||
// 获取自动采集节点的数据
|
||||
fetch(group.queryDeviceGroupTree, { energyType: value, orgId: orgId.value }).then((res) => {
|
||||
treeData.value = res.data;
|
||||
|
@@ -5,8 +5,8 @@
|
||||
<div class="title">{{ props.year }}年济阳站碳盘查报告</div>
|
||||
<div class="standard" style="display: flex; align-items: center">
|
||||
<img
|
||||
width="11px"
|
||||
height="11px"
|
||||
width="11"
|
||||
height="11"
|
||||
style="margin-right: 5px"
|
||||
src="../../../../../src/icon/carbonInventoryCheck.svg" />
|
||||
<span
|
||||
@@ -19,7 +19,7 @@
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
">
|
||||
适用标准:ISO 14064-1
|
||||
适用标准:{{ props.standard }}
|
||||
</span>
|
||||
<a-button type="primary" @click="changeParentData" ghost style="margin-left: 6px">
|
||||
返回
|
||||
@@ -328,7 +328,7 @@
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item ref="name" label="消耗量" name="consumption">
|
||||
<ns-input
|
||||
<ns-input-number
|
||||
v-model:value="editFormState.consumption"
|
||||
:maxlength="20"
|
||||
@keydown="handleKeyDown"
|
||||
@@ -482,6 +482,9 @@
|
||||
endTime: {
|
||||
type: String,
|
||||
},
|
||||
standard: {
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
const activeKey = ref('1');
|
||||
const orgId = ref('');
|
||||
@@ -641,16 +644,18 @@
|
||||
}
|
||||
} else {
|
||||
selectedKeysR.value = ['0-0-0'];
|
||||
getTableId.value = res.data[0].children[0].id;
|
||||
bizId.value = res.data[0].children[0].id;
|
||||
if (res.data.length != 0) {
|
||||
getPFYTableList(getTableId.value);
|
||||
getTableHeardUnit(getTableId.value);
|
||||
} else {
|
||||
data.value = [];
|
||||
columns.value[1].title = '消耗量';
|
||||
columns.value[2].title = '碳排因子';
|
||||
columns.value[3].title = '排放量';
|
||||
if (res.data[0].children.length > 0) {
|
||||
getTableId.value = res.data[0].children[0].id;
|
||||
bizId.value = res.data[0].children[0].id;
|
||||
if (res.data.length != 0) {
|
||||
getPFYTableList(getTableId.value);
|
||||
getTableHeardUnit(getTableId.value);
|
||||
} else {
|
||||
data.value = [];
|
||||
columns.value[1].title = '消耗量';
|
||||
columns.value[2].title = '碳排因子';
|
||||
columns.value[3].title = '排放量';
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -658,10 +663,12 @@
|
||||
// 排放源树中被选中的树节点
|
||||
const onSelectR = (selectedKey: string[], info: any) => {
|
||||
selectedKeysR.value = selectedKey;
|
||||
getTableId.value = info.selectedNodes[0].id;
|
||||
bizId.value = info.selectedNodes[0].id;
|
||||
getPFYTableList(getTableId.value);
|
||||
getTableHeardUnit(getTableId.value);
|
||||
if (info.selectedNodes[0].emissionSource !== '全部') {
|
||||
getTableId.value = info.selectedNodes[0].id;
|
||||
bizId.value = info.selectedNodes[0].id;
|
||||
getPFYTableList(getTableId.value);
|
||||
getTableHeardUnit(getTableId.value);
|
||||
}
|
||||
};
|
||||
// 获取表头单位
|
||||
const getTableHeardUnit = (id) => {
|
||||
@@ -815,16 +822,17 @@
|
||||
.validate()
|
||||
.then(() => {
|
||||
console.log('values', formState, toRaw(formState));
|
||||
if (formState.value.unitId) {
|
||||
formState.value.unitId = formState.value.unitId.join(',').split(',')[1];
|
||||
const addformState = JSON.parse(JSON.stringify(formState.value));
|
||||
if (addformState.unitId) {
|
||||
addformState.unitId = addformState.unitId.join(',').split(',')[1];
|
||||
}
|
||||
if (formState.value.carbonEmissionUnits) {
|
||||
formState.value.carbonEmissionUnits = formState.value.carbonEmissionUnits
|
||||
if (addformState.carbonEmissionUnits) {
|
||||
addformState.carbonEmissionUnits = addformState.carbonEmissionUnits
|
||||
.join(',')
|
||||
.split(',')[1];
|
||||
}
|
||||
if (formState.value.id) {
|
||||
fetch(carbonInventoryCheck.update, formState.value).then((res) => {
|
||||
if (addformState.id) {
|
||||
fetch(carbonInventoryCheck.update, addformState).then((res) => {
|
||||
addTreeNodeVisible.value = false;
|
||||
formState.value = {
|
||||
orgId: orgId.value,
|
||||
@@ -837,20 +845,25 @@
|
||||
getEmissionSourceTree();
|
||||
});
|
||||
} else {
|
||||
fetch(carbonInventoryCheck.create, formState.value).then((res) => {
|
||||
if (addformState.categoryId) {
|
||||
fetch(carbonInventoryCheck.create, addformState).then((res) => {
|
||||
addTreeNodeVisible.value = false;
|
||||
formState.value = {
|
||||
orgId: orgId.value,
|
||||
year: props.year,
|
||||
startTime: props.startTime,
|
||||
endTime: props.endTime,
|
||||
categoryId: categoryId.value,
|
||||
};
|
||||
message.success('操作成功!');
|
||||
changeSelectedKeys.value = true;
|
||||
getEmissionSourceTree();
|
||||
getPFYTableList(res.data.id);
|
||||
});
|
||||
} else {
|
||||
message.warning('请选择能源类别');
|
||||
addTreeNodeVisible.value = false;
|
||||
formState.value = {
|
||||
orgId: orgId.value,
|
||||
year: props.year,
|
||||
startTime: props.startTime,
|
||||
endTime: props.endTime,
|
||||
categoryId: categoryId.value,
|
||||
};
|
||||
message.success('操作成功!');
|
||||
changeSelectedKeys.value = true;
|
||||
getEmissionSourceTree();
|
||||
getPFYTableList(res.data.id);
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -1266,10 +1279,10 @@
|
||||
fetch(carbonInventoryCheck.carbonFlowDirection, queryFlowDirection.value).then((res) => {
|
||||
console.log(res);
|
||||
linksData.value = res.data[0];
|
||||
if (linksData.value[0].value !== 0) {
|
||||
showChart.value = true;
|
||||
} else {
|
||||
if (linksData.value[0].value === 0 || linksData.value[0].value === undefined) {
|
||||
showChart.value = false;
|
||||
} else {
|
||||
showChart.value = true;
|
||||
}
|
||||
datalist.value = res.data[1];
|
||||
drawEcharts();
|
||||
@@ -1487,11 +1500,13 @@
|
||||
colorStops: [
|
||||
{
|
||||
offset: 1,
|
||||
color: Color[d], // 0% 处的颜色
|
||||
// color: Color[d], // 0% 处的颜色
|
||||
color: Color[d % Color.length],
|
||||
},
|
||||
{
|
||||
offset: 0,
|
||||
color: Color1[d], // 100% 处的颜色
|
||||
// color: Color1[d], // 100% 处的颜色
|
||||
color: Color1[d % Color1.length],
|
||||
},
|
||||
],
|
||||
global: false, // 缺省为 false
|
||||
|
@@ -10,6 +10,7 @@
|
||||
:year="year"
|
||||
:startTime="startTime"
|
||||
:endTime="endTime"
|
||||
:standard="standard"
|
||||
@change-data="updateData" />
|
||||
</div>
|
||||
<!-- 新增报告弹窗 -->
|
||||
@@ -23,46 +24,48 @@
|
||||
<div class="ns-form-title"
|
||||
><div class="title">{{ text }}</div></div
|
||||
>
|
||||
<a-form
|
||||
ref="formRef"
|
||||
:model="formState"
|
||||
:rules="rules"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol">
|
||||
<a-form-item ref="name" label="报告名称" name="reportName">
|
||||
<a-input
|
||||
v-model:value="formState.reportName"
|
||||
:maxlength="15"
|
||||
@keydown="handleKeyDown"
|
||||
placeholder="请输入报告名称" />
|
||||
</a-form-item>
|
||||
<a-form-item ref="name" label="报告年度" name="reportYear">
|
||||
<a-date-picker v-model:value="formState.reportYear" picker="year" valueFormat="YYYY" />
|
||||
</a-form-item>
|
||||
<a-form-item ref="name" label="适用标准" name="genericStandard">
|
||||
<a-input
|
||||
v-model:value="formState.genericStandard"
|
||||
:maxlength="20"
|
||||
@keydown="handleKeyDown"
|
||||
placeholder="请输入适用标准" />
|
||||
</a-form-item>
|
||||
<a-form-item label="报告周期" name="reportPeriod">
|
||||
<a-select
|
||||
v-model:value="formState.reportPeriod"
|
||||
placeholder="请选择报告周期"
|
||||
@change="selectChange">
|
||||
<a-select-option value="1">年度</a-select-option>
|
||||
<a-select-option value="2">月度</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item ref="name" label="报告范围" name="reportScope">
|
||||
<a-range-picker
|
||||
v-model:value="formState.reportScope"
|
||||
picker="month"
|
||||
:disabledDate="disabledDate"
|
||||
valueFormat="YYYY-MM" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<a-spin :spinning="spinning">
|
||||
<a-form
|
||||
ref="formRef"
|
||||
:model="formState"
|
||||
:rules="rules"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol">
|
||||
<a-form-item ref="name" label="报告名称" name="reportName">
|
||||
<a-input
|
||||
v-model:value="formState.reportName"
|
||||
:maxlength="15"
|
||||
@keydown="handleKeyDown"
|
||||
placeholder="请输入报告名称" />
|
||||
</a-form-item>
|
||||
<a-form-item ref="name" label="报告年度" name="reportYear">
|
||||
<a-date-picker v-model:value="formState.reportYear" picker="year" valueFormat="YYYY" />
|
||||
</a-form-item>
|
||||
<a-form-item ref="name" label="适用标准" name="genericStandard">
|
||||
<a-input
|
||||
v-model:value="formState.genericStandard"
|
||||
:maxlength="20"
|
||||
@keydown="handleKeyDown"
|
||||
placeholder="请输入适用标准" />
|
||||
</a-form-item>
|
||||
<a-form-item label="报告周期" name="reportPeriod">
|
||||
<a-select
|
||||
v-model:value="formState.reportPeriod"
|
||||
placeholder="请选择报告周期"
|
||||
@change="selectChange">
|
||||
<a-select-option value="1">年度</a-select-option>
|
||||
<a-select-option value="2">月度</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item ref="name" label="报告范围" name="reportScope">
|
||||
<a-range-picker
|
||||
v-model:value="formState.reportScope"
|
||||
picker="month"
|
||||
:disabledDate="disabledDate"
|
||||
valueFormat="YYYY-MM" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
<template #footer>
|
||||
<a-button style="margin-right: 8px" @click="onClose">取消</a-button>
|
||||
<a-button type="primary" @click="onSubmit">确定</a-button>
|
||||
@@ -121,8 +124,10 @@
|
||||
event.preventDefault();
|
||||
}
|
||||
};
|
||||
const spinning = ref(false);
|
||||
// 点击确定提交
|
||||
const onSubmit = () => {
|
||||
spinning.value = true;
|
||||
formRef.value
|
||||
.validate()
|
||||
.then(() => {
|
||||
@@ -133,6 +138,7 @@
|
||||
fetch(carbonInventoryCheck.createOrUpdate, formState.value).then((res) => {
|
||||
visible.value = false;
|
||||
mainRef.value?.nsTableRef.reload();
|
||||
spinning.value = false;
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -145,6 +151,7 @@
|
||||
const reportId = ref();
|
||||
const startTime = ref();
|
||||
const endTime = ref();
|
||||
const standard = ref();
|
||||
const year = ref();
|
||||
const tableConfig = ref({
|
||||
title: '数据库',
|
||||
@@ -220,6 +227,7 @@
|
||||
year.value = record.reportYear;
|
||||
startTime.value = record.startTime;
|
||||
endTime.value = record.endTime;
|
||||
standard.value = record.genericStandard;
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@@ -96,6 +96,28 @@
|
||||
</span>
|
||||
</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-card>
|
||||
</div>
|
||||
@@ -769,7 +791,7 @@
|
||||
}
|
||||
.contant {
|
||||
width: 100%;
|
||||
height: calc(100% - 5vh);
|
||||
height: calc(95% - 5vh);
|
||||
overflow: auto;
|
||||
.chartsPart {
|
||||
width: 100%;
|
||||
|
@@ -155,7 +155,7 @@
|
||||
selectedTime.value = false;
|
||||
getMonthData();
|
||||
getBallQuery.value.yearAndMonth = 'month';
|
||||
getMonthPillarData();
|
||||
// getMonthPillarData();
|
||||
};
|
||||
const changeToYear = () => {
|
||||
monthStyles.value = 'background: #transparent';
|
||||
@@ -167,7 +167,7 @@
|
||||
selectedTime.value = true;
|
||||
getYearData();
|
||||
getBallQuery.value.yearAndMonth = 'year';
|
||||
getYearPillarData();
|
||||
// getYearPillarData();
|
||||
};
|
||||
// echarts图
|
||||
const pillarChartRef = ref(null);
|
||||
@@ -514,7 +514,6 @@
|
||||
getBallQuery.value.year = selectYearValue.value;
|
||||
addTreeNode.value.year = selectYearValue.value;
|
||||
getYearData();
|
||||
getYearPillarData();
|
||||
};
|
||||
const getYearData = () => {
|
||||
fetch(carbonPlanning.searchListByYear, yearQueryParams.value).then((res) => {
|
||||
@@ -522,6 +521,9 @@
|
||||
res.data.forEach((item) => {
|
||||
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;
|
||||
getBallQuery.value.yearMonth = selectMonthValue.value;
|
||||
getMonthData();
|
||||
getMonthPillarData();
|
||||
};
|
||||
const getMonthData = () => {
|
||||
fetch(carbonPlanning.searchListByMonth, monthQueryParams.value).then((res) => {
|
||||
data.value = res.data;
|
||||
getMonthPillarData();
|
||||
});
|
||||
};
|
||||
defineExpose({
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<a-input-number>
|
||||
<a-input-number @keydown="handleKeyDown">
|
||||
<template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
|
||||
<slot :name="item" v-bind="data || {}"> </slot>
|
||||
</template>
|
||||
@@ -10,7 +10,15 @@
|
||||
export default defineComponent({
|
||||
name: 'NsInputNumber',
|
||||
setup() {
|
||||
return {};
|
||||
const handleKeyDown = (event: KeyboardEvent) => {
|
||||
// Check if the pressed key is a space
|
||||
if (event.code === 'Space') {
|
||||
event.preventDefault();
|
||||
}
|
||||
};
|
||||
return {
|
||||
handleKeyDown,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
@@ -1,11 +1,22 @@
|
||||
<template>
|
||||
<a-textarea />
|
||||
<a-textarea @keydown="handleKeyDown" />
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'NsTextarea',
|
||||
setup() {
|
||||
const handleKeyDown = (event: KeyboardEvent) => {
|
||||
// Check if the pressed key is a space
|
||||
if (event.code === 'Space') {
|
||||
event.preventDefault();
|
||||
}
|
||||
};
|
||||
return {
|
||||
handleKeyDown,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped></style>
|
||||
|
Reference in New Issue
Block a user