duyufeng 3 months ago
parent
commit
4836efd896
  1. BIN
      hx-ai-intelligent/public/asset/file/carbonAssets.xlsx
  2. BIN
      hx-ai-intelligent/public/asset/file/energyConsumption.xlsx
  3. 1
      hx-ai-intelligent/src/api/alarmManagement/energyAlarm.ts
  4. 1
      hx-ai-intelligent/src/api/alarmManagement/equipmentAlarm.ts
  5. 2
      hx-ai-intelligent/src/api/ventilatingSystem.ts
  6. 23
      hx-ai-intelligent/src/router/equipmentControl.ts
  7. 29
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/linkPeople/index.vue
  8. 35
      hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue
  9. 36
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue
  10. 14
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue
  11. 89
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/index.vue
  12. 75
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue
  13. 49
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue
  14. 2
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts
  15. 38
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue
  16. 47
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue
  17. 8
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue
  18. 24
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/categoryDeatil.vue
  19. 10
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/index.vue
  20. 2
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs3.vue
  21. 8
      hx-ai-intelligent/src/view/equipmentControl/planToAdd/index.vue
  22. 27
      hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanLog.vue
  23. BIN
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/meter.png
  24. BIN
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/pipe.png
  25. BIN
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/pond1.png
  26. BIN
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/pond2.png
  27. BIN
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/pump.png
  28. BIN
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/type1.png
  29. BIN
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/type2.png
  30. BIN
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/type3.png
  31. BIN
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/valve1.png
  32. BIN
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/valve2.png
  33. 7
      hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue
  34. 25
      hx-ai-intelligent/src/view/monitor/energyMonitor/analysisGraph/index.vue
  35. 2
      hx-ai-intelligent/src/view/monitor/energyMonitor/graphGraph/index.vue
  36. 41
      hx-ai-intelligent/src/view/monitor/energyMonitor/tree/index.vue
  37. 2
      hx-ai-intelligent/src/view/monitor/environmentMonitor/averageData/index.vue
  38. 12
      lib/component/form/input/input-number.vue
  39. 13
      lib/component/form/input/textarea.vue
  40. 10
      lib/component/table/table.vue
  41. 25
      lib/component/tree/tree-api.vue

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

Binary file not shown.

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

Binary file not shown.

1
hx-ai-intelligent/src/api/alarmManagement/energyAlarm.ts

@ -5,4 +5,5 @@ export enum energyAlarmApi {
getCodeList = `${BASE_URL}/api/AlarmEnergyConsumptionLog/selectErrorCodeList `, //能碳告警 列表 getCodeList = `${BASE_URL}/api/AlarmEnergyConsumptionLog/selectErrorCodeList `, //能碳告警 列表
getSelectAlarmEnergyConsumptionLogStatusProcess = `${BASE_URL}/api/AlarmEnergyConsumptionLogStatusProcess/selectAlarmEnergyConsumptionLogStatusProcess`, //能碳告警 状态 没有创建工单log接口 getSelectAlarmEnergyConsumptionLogStatusProcess = `${BASE_URL}/api/AlarmEnergyConsumptionLogStatusProcess/selectAlarmEnergyConsumptionLogStatusProcess`, //能碳告警 状态 没有创建工单log接口
noCreatOrUpdateLog = `${BASE_URL}/api/AlarmEnergyConsumptionLogStatusProcess/creatOrUpdate`, //能碳告警 状态 没有创建工单 添加 修改状态log noCreatOrUpdateLog = `${BASE_URL}/api/AlarmEnergyConsumptionLogStatusProcess/creatOrUpdate`, //能碳告警 状态 没有创建工单 添加 修改状态log
getEnergyGraph = `${BASE_URL}/energy/trigger/getEnergyGraph`, //能碳告警 状态 echarts图
} }

1
hx-ai-intelligent/src/api/alarmManagement/equipmentAlarm.ts

@ -5,4 +5,5 @@ export enum equipmentAlarmApi {
getCodeList = `${BASE_URL}/api/AlarmEquipmentLog/selectErrorCodeList`, //设备告警 列表 getCodeList = `${BASE_URL}/api/AlarmEquipmentLog/selectErrorCodeList`, //设备告警 列表
getSelectAlarmEquipmentLogStatusProcess = `${BASE_URL}/api/AlarmEquipmentLogStatusProcess/selectAlarmEquipmentLogStatusProcess`, //设备告警 状态 没有创建工单log接口 getSelectAlarmEquipmentLogStatusProcess = `${BASE_URL}/api/AlarmEquipmentLogStatusProcess/selectAlarmEquipmentLogStatusProcess`, //设备告警 状态 没有创建工单log接口
noCreatOrUpdateLog = `${BASE_URL}/api/AlarmEquipmentLogStatusProcess/creatOrUpdate`, //设备告警 状态 没有创建工单 添加 修改状态log noCreatOrUpdateLog = `${BASE_URL}/api/AlarmEquipmentLogStatusProcess/creatOrUpdate`, //设备告警 状态 没有创建工单 添加 修改状态log
getDeviceGraph = `${BASE_URL}/equipment/trigger/getDeviceGraph`, //设备告警 echats图
} }

2
hx-ai-intelligent/src/api/ventilatingSystem.ts

@ -3,7 +3,7 @@ const prefix = '/carbon-smart/api';
// 通风系统相关接口 // 通风系统相关接口
export enum ventilating { export enum ventilating {
//传感器获取数据 //传感器获取数据
getSensorData = prefix + '/multiFuncSensorCtrl/getDeviceState', getSensorData = prefix + '/sensorCtrl/getMultiFuncSensorState',
// 排风扇相关 ============================================= // 排风扇相关 =============================================
// 获得排风扇系统的树形结构 // 获得排风扇系统的树形结构
getTree1 = prefix + '/ventilatingFanCtrl/getCtrlPanelTree', getTree1 = prefix + '/ventilatingFanCtrl/getCtrlPanelTree',

23
hx-ai-intelligent/src/router/equipmentControl.ts

@ -103,7 +103,7 @@ const equipmentControl = {
{ {
path: 'airConditionControlSystem', path: 'airConditionControlSystem',
name: 'airConditionControlSystem', name: 'airConditionControlSystem',
meta: { title: '空调系统群控', hideChildren: true, icon: 'shebeiqunkong' }, meta: { title: '空调系统', hideChildren: true, icon: 'shebeiqunkong' },
component: Base, component: Base,
redirect: { name: 'airConditionControlSystemIndex' }, redirect: { name: 'airConditionControlSystemIndex' },
children: [ children: [
@ -112,13 +112,32 @@ const equipmentControl = {
name: 'airConditionControlSystemIndex', name: 'airConditionControlSystemIndex',
component: () => import('/@/view/equipmentControl/airConditionControlSystem/index.vue'), component: () => import('/@/view/equipmentControl/airConditionControlSystem/index.vue'),
meta: { meta: {
title: '空调系统群控', title: '空调系统',
keepAlive: false, keepAlive: false,
// backApi: [], // backApi: [],
}, },
}, },
], ],
}, },
// {
// path: 'waterSystem',
// name: 'waterSystem',
// meta: { title: '给排水系统', hideChildren: true, icon: 'shebeiqunkong' },
// component: Base,
// redirect: { name: 'waternControlSystemIndex' },
// children: [
// {
// path: 'index',
// name: 'waternControlSystemIndex',
// component: () => import('/@/view/equipmentControl/waterSystem/index.vue'),
// meta: {
// title: '给排水系统',
// keepAlive: false,
// // backApi: [],
// },
// },
// ],
// },
{ {
path: 'planToAdd', path: 'planToAdd',
name: 'planToAdd', name: 'planToAdd',

29
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/linkPeople/index.vue

@ -70,7 +70,7 @@
import { http } from '/nerv-lib/util'; import { http } from '/nerv-lib/util';
// //
const dataList: TreeProps['treeData'] = []; let dataList: TreeProps['treeData'] = [];
const generateList = (data: TreeProps['treeData']) => { const generateList = (data: TreeProps['treeData']) => {
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
const node = data[i]; const node = data[i];
@ -84,19 +84,23 @@
const getParentKey = ( const getParentKey = (
key: string | number, key: string | number,
tree: TreeProps['treeData'], tree: TreeProps['treeData'],
): string | number | undefined => { parents: (string | number)[] = [],
let parentKey; ): (string | number)[] | undefined => {
for (let i = 0; i < tree.length; i++) { for (const node of tree) {
const node = tree[i];
if (node.children) { if (node.children) {
if (node.children.some((item) => item.key === key)) { if (node.children.some((item) => item.key === key)) {
parentKey = node.key; //
} else if (getParentKey(key, node.children)) { return [...parents, node.key];
parentKey = getParentKey(key, node.children);
} }
//
const result = getParentKey(key, node.children, [...parents, node.key]);
if (result) {
return result;
} }
} }
return parentKey; }
return undefined;
}; };
export default defineComponent({ export default defineComponent({
setup(props, { emit }) { setup(props, { emit }) {
@ -172,6 +176,7 @@
getDepartList({ orgId: orgId.value }).then((res) => { getDepartList({ orgId: orgId.value }).then((res) => {
deptTreeData.value = res; deptTreeData.value = res;
selectedKeys.value = [orgId.value]; selectedKeys.value = [orgId.value];
dataList = [];
generateList(deptTreeData.value); generateList(deptTreeData.value);
}); });
}; };
@ -304,7 +309,11 @@
return null; return null;
}) })
.filter((item, i, self) => item && self.indexOf(item) === i); .filter((item, i, self) => item && self.indexOf(item) === i);
expandedKeys.value = expanded; let selctky = [];
expanded.forEach((item) => {
selctky.push(...item);
});
expandedKeys.value = selctky;
searchValue.value = value; searchValue.value = value;
autoExpandParent.value = true; autoExpandParent.value = true;
}); });

35
hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue

@ -33,7 +33,7 @@
}}</a-descriptions-item> }}</a-descriptions-item>
<a-descriptions-item label="错误码">{{ infoObject.errorCode }}</a-descriptions-item> <a-descriptions-item label="错误码">{{ infoObject.errorCode }}</a-descriptions-item>
<a-descriptions-item label="告警描述"> <a-descriptions-item label="告警描述">
<div style="color: #2778ff">{{ infoObject.alarmTitle }}</div> <div style="color: rgba(255, 118, 54, 1)">{{ infoObject.alarmTitle }}</div>
{{ infoObject.abnormalDescription }}</a-descriptions-item {{ infoObject.abnormalDescription }}</a-descriptions-item
> >
<a-descriptions-item label="监测点位"> <a-descriptions-item label="监测点位">
@ -56,6 +56,9 @@
}); });
import { ref } from 'vue'; import { ref } from 'vue';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import { energyAlarmApi } from '/@/api/alarmManagement/energyAlarm';
import { http } from '/nerv-lib/util';
import { message } from 'ant-design-vue';
let chartInstance: echarts.ECharts | null = null; let chartInstance: echarts.ECharts | null = null;
const graphChart = ref(null); const graphChart = ref(null);
@ -94,19 +97,21 @@
const toggle = (data: any) => { const toggle = (data: any) => {
infoObject.value = data; infoObject.value = data;
visible.value = true; visible.value = true;
setTimeout(() => { // setTimeout(() => {
getChatr(); // getChatr();
}, 500); // }, 500);
}; http.get(energyAlarmApi.getEnergyGraph, { logId: infoObject.value.id }).then((res: any) => {
const getChatr = () => { if (res.msg === 'success') {
let dayData = []; const data = res.data;
let energyAlarm: any = []; if (data.length > 0) {
getChatr(data[0]);
// Extend data for 30 days }
for (let i = 1; i < 30; i++) { } else {
dayData.push(`3/${i}`); message.error(res.msg);
energyAlarm.push(Math.floor(Math.random() * 250));
} }
});
};
const getChatr = (data) => {
if (chartInstance) { if (chartInstance) {
chartInstance.dispose(); chartInstance.dispose();
} }
@ -182,7 +187,7 @@
return value; return value;
}, },
}, },
data: dayData, data: data.dateList,
}, },
], ],
yAxis: [ yAxis: [
@ -342,7 +347,7 @@
shadowBlur: 20, shadowBlur: 20,
}, },
}, },
data: energyAlarm, data: data.data,
}, },
], ],
}; };

36
hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue

@ -54,6 +54,9 @@
}); });
import { ref } from 'vue'; import { ref } from 'vue';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import { equipmentAlarmApi } from '/@/api/alarmManagement/equipmentAlarm';
import { http } from '/nerv-lib/util';
import { message } from 'ant-design-vue';
let chartInstance: echarts.ECharts | null = null; let chartInstance: echarts.ECharts | null = null;
const graphChart = ref(null); const graphChart = ref(null);
@ -92,20 +95,23 @@
const toggle = (data: any) => { const toggle = (data: any) => {
infoObject.value = data; infoObject.value = data;
visible.value = true; visible.value = true;
setTimeout(() => { // setTimeout(() => {
// echarts // // echarts
getChatr(); // getChatr();
}, 500); // }, 500);
}; http.get(equipmentAlarmApi.getDeviceGraph, { logId: infoObject.value.id }).then((res: any) => {
const getChatr = () => { if (res.msg === 'success') {
let dayData = []; console.log(res.data, '数据');
let energyAlarm: any = []; const data = res.data;
if (data.length > 0) {
// Extend data for 30 days getChatr(data[0]);
for (let i = 1; i < 30; i++) { }
dayData.push(`3/${i}`); } else {
energyAlarm.push(Math.floor(Math.random() * 250)); message.error(res.msg);
} }
});
};
const getChatr = (data: any) => {
if (chartInstance) { if (chartInstance) {
chartInstance.dispose(); chartInstance.dispose();
} }
@ -182,7 +188,7 @@
return value; return value;
}, },
}, },
data: dayData, data: data.dateList,
}, },
], ],
yAxis: [ yAxis: [
@ -342,7 +348,7 @@
shadowBlur: 20, shadowBlur: 20,
}, },
}, },
data: energyAlarm, data: data.data,
}, },
], ],
}; };

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: '操作',

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

@ -360,7 +360,11 @@
label: '凭证下载', label: '凭证下载',
type: 'primary', type: 'primary',
handle: () => { handle: () => {
fetch(energyConsumption.voucherDownloadList, { bizType: 3 }).then((res) => { fetch(energyConsumption.voucherDownloadList, {
bizType: 3,
orgId: orgId.value,
year: tableConfig.value.params.year,
}).then((res) => {
downLoadData.value = res.data; downLoadData.value = res.data;
}); });
downLoadVisible.value = true; downLoadVisible.value = true;
@ -406,7 +410,7 @@
break; break;
case 0: case 0:
text = value.record.jan ? value.record.jan : ''; text = value.record.jan ? value.record.jan : '';
color = 'rgba(57, 215, 287, 1)'; color = 'rgba(57, 215, 187, 1)';
break; break;
} }
// 使 // 使
@ -427,7 +431,7 @@
break; break;
case 0: case 0:
text = value.record.feb ? value.record.feb : ''; text = value.record.feb ? value.record.feb : '';
color = 'rgba(57, 215, 287, 1)'; color = 'rgba(57, 215, 187, 1)';
break; break;
} }
// 使 // 使
@ -448,7 +452,7 @@
break; break;
case 0: case 0:
text = value.record.mar ? value.record.mar : ''; text = value.record.mar ? value.record.mar : '';
color = 'rgba(57, 215, 287, 1)'; color = 'rgba(57, 215, 187, 1)';
break; break;
} }
// 使 // 使
@ -469,7 +473,7 @@
break; break;
case 0: case 0:
text = value.record.apr ? value.record.apr : ''; text = value.record.apr ? value.record.apr : '';
color = 'rgba(57, 215, 287, 1)'; color = 'rgba(57, 215, 187, 1)';
break; break;
} }
// 使 // 使
@ -490,7 +494,7 @@
break; break;
case 0: case 0:
text = value.record.may ? value.record.may : ''; text = value.record.may ? value.record.may : '';
color = 'rgba(57, 215, 287, 1)'; color = 'rgba(57, 215, 187, 1)';
break; break;
} }
// 使 // 使
@ -511,7 +515,7 @@
break; break;
case 0: case 0:
text = value.record.jun ? value.record.jun : ''; text = value.record.jun ? value.record.jun : '';
color = 'rgba(57, 215, 287, 1)'; color = 'rgba(57, 215, 187, 1)';
break; break;
} }
// 使 // 使
@ -532,7 +536,7 @@
break; break;
case 0: case 0:
text = value.record.jul ? value.record.jul : ''; text = value.record.jul ? value.record.jul : '';
color = 'rgba(57, 215, 287, 1)'; color = 'rgba(57, 215, 187, 1)';
break; break;
} }
// 使 // 使
@ -553,7 +557,7 @@
break; break;
case 0: case 0:
text = value.record.aug ? value.record.aug : ''; text = value.record.aug ? value.record.aug : '';
color = 'rgba(57, 215, 287, 1)'; color = 'rgba(57, 215, 187, 1)';
break; break;
} }
// 使 // 使
@ -574,7 +578,7 @@
break; break;
case 0: case 0:
text = value.record.sep ? value.record.sep : ''; text = value.record.sep ? value.record.sep : '';
color = 'rgba(57, 215, 287, 1)'; color = 'rgba(57, 215, 187, 1)';
break; break;
} }
// 使 // 使
@ -595,7 +599,7 @@
break; break;
case 0: case 0:
text = value.record.oct ? value.record.oct : ''; text = value.record.oct ? value.record.oct : '';
color = 'rgba(57, 215, 287, 1)'; color = 'rgba(57, 215, 187, 1)';
break; break;
} }
// 使 // 使
@ -616,7 +620,7 @@
break; break;
case 0: case 0:
text = value.record.nov ? value.record.nov : ''; text = value.record.nov ? value.record.nov : '';
color = 'rgba(57, 215, 287, 1)'; color = 'rgba(57, 215, 187, 1)';
break; break;
} }
// 使 // 使
@ -625,19 +629,19 @@
}, },
{ {
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, 187, 1)';
break; break;
} }
// 使 // 使
@ -659,6 +663,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 +778,7 @@
mainRef.value?.nsTableRef.reload(); mainRef.value?.nsTableRef.reload();
}; };
const changeEnergyType = (value) => { const changeEnergyType = (value) => {
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({

2
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs3.vue

@ -104,7 +104,7 @@
</div> </div>
</div> </div>
</div> </div>
<div style="width: 100%; height: 160px"></div> <div style="width: 100%; height: 50px"></div>
<div class="button-box"> <div class="button-box">
<button class="cancel" @click="logModalVisible = false">关闭</button> <button class="cancel" @click="logModalVisible = false">关闭</button>
</div> </div>

8
hx-ai-intelligent/src/view/equipmentControl/planToAdd/index.vue

@ -107,6 +107,8 @@
children: 'childList', children: 'childList',
}, },
formConfig: { formConfig: {
callList: true, //
defaultSelection: true, //
schemas: [ schemas: [
{ {
field: 'ctrlType', field: 'ctrlType',
@ -220,9 +222,9 @@
rowKey: 'uuid', rowKey: 'uuid',
}; };
// //
setTimeout(() => { // setTimeout(() => {
mainRef.value?.nsTableRef.reload(); // mainRef.value?.nsTableRef.reload();
}, 1); // }, 1);
}; };
// //

27
hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanLog.vue

@ -62,13 +62,22 @@
}}</span></div }}</span></div
> >
</div> </div>
<div class="btn-item"> <div class="btn-item" v-if="props.type != 5">
<div class="left"> 亮度 </div> <div class="left"> 运行模式 </div>
<div class="right"> <div class="right">
<!-- 由于数字0也会被判为false故只判断undefined null --> <span>{{
<span>{{ item.brightnessBefore != null ? item.brightnessBefore : '--' }}</span> item.runModeBefore.label != null ? item.runModeBefore.label : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" /> <img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{ item.brightnessAfter != null ? item.brightnessAfter : '--' }}</span> <span>{{ item.runModeAfter.label != null ? item.runModeAfter.label : '--' }}</span>
</div>
</div>
<div class="btn-item" v-if="props.type == 5">
<div class="left"> 开窗幅度 </div>
<div class="right">
<span>{{ item.openPercentBefore != null ? item.openPercentBefore : '--' }}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{ item.openPercentAfter != null ? item.openPercentAfter : '--' }}</span>
</div> </div>
</div> </div>
<div class="btn-item"> <div class="btn-item">
@ -80,12 +89,14 @@
</div> </div>
</div> </div>
<div class="btn-item"> <div class="btn-item">
<div class="left"> 色温 </div> <div class="left"> 开启状态 </div>
<div class="right"> <div class="right">
<span>{{ item.colorBefore != null ? item.colorBefore : '--' }}</span> <span>{{
item.switchStatusBefore.label != null ? item.switchStatusBefore.label : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" /> <img src="/asset/image/bulbLogo/22406.png" alt="" />
<span> <span>
{{ item.colorAfter != null ? item.colorAfter : '--' }} {{ item.switchStatusAfter.label != null ? item.switchStatusAfter.label : '--' }}
</span> </span>
</div> </div>
</div> </div>

BIN
hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/meter.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/pipe.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/pond1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/pond2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/pump.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/type1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/type2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/type3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/valve1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
hx-ai-intelligent/src/view/equipmentControl/waterSystem/images/valve2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

7
hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue

@ -10,6 +10,7 @@
placeholder="请选择设备类型" placeholder="请选择设备类型"
v-model:value="value" v-model:value="value"
style="width: 100%" style="width: 100%"
:treeDefaultExpandedKeys="firstKey"
:tree-line="treeLine && { showLeafIcon }" :tree-line="treeLine && { showLeafIcon }"
:tree-data="treeData1" :tree-data="treeData1"
@change="changeDeviceType" /> @change="changeDeviceType" />
@ -123,10 +124,13 @@
orgId.value = result; orgId.value = result;
const treeData1 = ref<TreeSelectProps['treeData']>([]); const treeData1 = ref<TreeSelectProps['treeData']>([]);
const firstKey = ref<String[]>([]);
http.post(device.queryDeviceTree, { orgId: orgId.value }).then((res) => { http.post(device.queryDeviceTree, { orgId: orgId.value }).then((res) => {
treeData1.value = formatTreeData(res.data); treeData1.value = formatTreeData(res.data);
if (treeData1.value && treeData1.value.length > 0) {
firstKey.value = [treeData1.value[0].value];
}
// if (treeData1.value && treeData1.value.length > 0) { // if (treeData1.value && treeData1.value.length > 0) {
// if (treeData1.value[0].children) { // if (treeData1.value[0].children) {
// value.value = treeData1.value[0].children[0].value; // value.value = treeData1.value[0].children[0].value;
@ -401,6 +405,7 @@
treeLoading, treeLoading,
select, select,
divWidth, divWidth,
firstKey,
}; };
}, },
}); });

25
hx-ai-intelligent/src/view/monitor/energyMonitor/analysisGraph/index.vue

@ -48,6 +48,22 @@
"></div> "></div>
</a-col> </a-col>
</a-row> </a-row>
<div
v-show="!haveData"
style="
height: 80%;
width: 98%;
position: absolute;
border-radius: 10px;
z-index: 5;
top: 20%;
background: #ffffff;
display: flex;
justify-content: center;
align-items: center;
">
<a-empty />
</div>
</template> </template>
<script lang="ts"> <script lang="ts">
@ -59,6 +75,7 @@
export default defineComponent({ export default defineComponent({
name: 'AnalysisGraph', name: 'AnalysisGraph',
setup() { setup() {
let haveData = ref(false);
const mode = ref<String>('1'); const mode = ref<String>('1');
let data = ref<any[]>([]); let data = ref<any[]>([]);
interface PageData { interface PageData {
@ -112,6 +129,13 @@
// //
let dataList = JSON.parse(JSON.stringify(pageData.analysisGraphList)); let dataList = JSON.parse(JSON.stringify(pageData.analysisGraphList));
// let dataList = pageData.analysisGraphList; // let dataList = pageData.analysisGraphList;
if (dataList && dataList.length > 0) {
haveData.value = true;
} else {
haveData.value = false;
return;
}
dataList.forEach((item) => { dataList.forEach((item) => {
if (item.yoyValue < 0) { if (item.yoyValue < 0) {
item.yoyLabel = { position: 'right' }; item.yoyLabel = { position: 'right' };
@ -552,6 +576,7 @@
downloadChart, downloadChart,
mode, mode,
changeMode, changeMode,
haveData,
}; };
}, },
}); });

2
hx-ai-intelligent/src/view/monitor/energyMonitor/graphGraph/index.vue

@ -57,7 +57,7 @@
let chartInstance: echarts.ECharts | null = null; let chartInstance: echarts.ECharts | null = null;
let haveData = ref(true); let haveData = ref(false);
const draw = () => { const draw = () => {
data.value = pageData.graphGraphList; data.value = pageData.graphGraphList;
if (data.value && data.value.length > 0) { if (data.value && data.value.length > 0) {

41
hx-ai-intelligent/src/view/monitor/energyMonitor/tree/index.vue

@ -121,6 +121,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { message } from 'ant-design-vue';
import type { TreeSelectProps, SelectProps } from 'ant-design-vue'; import type { TreeSelectProps, SelectProps } from 'ant-design-vue';
import { defineComponent, ref, onMounted, inject, onUnmounted } from 'vue'; import { defineComponent, ref, onMounted, inject, onUnmounted } from 'vue';
import dayjs, { Dayjs } from 'dayjs'; import dayjs, { Dayjs } from 'dayjs';
@ -276,10 +277,25 @@
keyV = key; keyV = key;
} }
if (activeKey.value == '1') { if (activeKey.value == '1') {
if (checkedKeys.value.length == 0) {
message.warning(mode.value == '0' ? '请先选择设备!' : '请先选择节点!');
pageData.graphTableList = [];
pageData.graphTableColumns = [];
pageData.graphGraphList = [];
return;
} else {
getSelectGraph(keyV); getSelectGraph(keyV);
}
} else {
if (checkedKeys.value.length == 0) {
message.warning(mode.value == '0' ? '请先选择设备!' : '请先选择节点!');
pageData.analysisTableList = [];
pageData.analysisGraphList = [];
return;
} else { } else {
getSelectAnalyse(keyV); getSelectAnalyse(keyV);
} }
}
}; };
const getSelectGraph = (key: any) => { const getSelectGraph = (key: any) => {
@ -293,7 +309,12 @@
// return; // return;
// } // }
} }
if (checkedKeys.value.length == 0) {
pageData.graphTableList = [];
pageData.graphTableColumns = [];
pageData.graphGraphList = [];
return;
}
let startTime = ''; let startTime = '';
let endTime = ''; let endTime = '';
if (startDate.value && endDate.value) { if (startDate.value && endDate.value) {
@ -369,6 +390,11 @@
// return; // return;
// } // }
} }
if (checkedKeys.value.length == 0) {
pageData.analysisTableList = [];
pageData.analysisGraphList = [];
return;
}
let startTime = ''; let startTime = '';
let endTime = ''; let endTime = '';
if (startDateAnalyse.value != endDateAnalyse.value) { if (startDateAnalyse.value != endDateAnalyse.value) {
@ -460,8 +486,8 @@
let a: TreeSelectProps['treeData'] = [{ title: label, key: val, children: records }]; let a: TreeSelectProps['treeData'] = [{ title: label, key: val, children: records }];
treeData2.value = a; treeData2.value = a;
expandedKeys.value = [val]; expandedKeys.value = [val];
checkedKeys.value.push(records[0].deviceCode, records[1].deviceCode); // checkedKeys.value.push(records[0].deviceCode, records[1].deviceCode);
getSelect(null); // getSelect(null);
}) })
.finally(() => { .finally(() => {
treeLoading.value = false; treeLoading.value = false;
@ -478,10 +504,11 @@
treeData2.value = formatTreeData(res.data); treeData2.value = formatTreeData(res.data);
expandedKeys.value = getAllKeys(treeData2.value); expandedKeys.value = getAllKeys(treeData2.value);
if (treeData2.value?.length >= 2) { // if (treeData2.value?.length >= 2) {
checkedKeys.value.push(treeData2.value[0].key, treeData2.value[1].key); // checkedKeys.value.push(treeData2.value[0].key, treeData2.value[1].key);
getSelect(null); // getSelect(null);
} // }
// getSelect(null);
}) })
.finally(() => { .finally(() => {
treeLoading.value = false; treeLoading.value = false;

2
hx-ai-intelligent/src/view/monitor/environmentMonitor/averageData/index.vue

@ -153,7 +153,7 @@
// } else if (frequencyValue.value == '4') { // } else if (frequencyValue.value == '4') {
// dateTypeValue.value = 'year'; // dateTypeValue.value = 'year';
// } // }
dateRange.value = undefined; // dateRange.value = undefined;
}; };
// //
const getTableList = () => { const getTableList = () => {

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>

10
lib/component/table/table.vue

@ -17,7 +17,7 @@
<!-- todo drag --> <!-- todo drag -->
<div class="ns-part-tree" v-if="!isEmpty(treeConfig)"> <div class="ns-part-tree" v-if="!isEmpty(treeConfig)">
<ns-tree-api v-bind="getTreeBindValue" @select="treeSelect" /> <ns-tree-api v-bind="getTreeBindValue" @reload="reload" @select="treeSelect" />
</div> </div>
<div class="ns-part-table"> <div class="ns-part-table">
<a-spin :spinning="tableState.loading"> <a-spin :spinning="tableState.loading">
@ -204,7 +204,7 @@
import { useTableSession } from '/nerv-lib/component/table/use-table-session'; import { useTableSession } from '/nerv-lib/component/table/use-table-session';
import { useTableColumn } from '/nerv-lib/component/table/use-table-column'; import { useTableColumn } from '/nerv-lib/component/table/use-table-column';
import { useNavigate } from '/nerv-lib/use/use-navigate'; import { useNavigate } from '/nerv-lib/use/use-navigate';
import { object } from 'vue-types'; import { object } from 'vue-types';
export default defineComponent({ export default defineComponent({
name: 'NsTable', name: 'NsTable',
components: { components: {
@ -357,7 +357,6 @@ import { object } from 'vue-types';
} }
const tableChangeEvent = (pagination: Props, filters: [], sorter: any) => { const tableChangeEvent = (pagination: Props, filters: [], sorter: any) => {
if (sorter?.field) { if (sorter?.field) {
if (sorter.order) { if (sorter.order) {
orderRef.value = { orderRef.value = {
@ -482,12 +481,11 @@ import { object } from 'vue-types';
}; };
} else { } else {
//dyfadd //dyfadd
if(props.tableTitle=='系统菜单'){ if (props.tableTitle == '系统菜单') {
pageParams = {}; pageParams = {};
// [props.paramsPageField]: defaultPageRef.value, // 0 // [props.paramsPageField]: defaultPageRef.value, // 0
// [props.paramsPageSizeField]:999, // [props.paramsPageSizeField]:999,
} else {
}else{
pageParams = { pageParams = {
[props.paramsPageField]: defaultPageRef.value, // 0 [props.paramsPageField]: defaultPageRef.value, // 0
[props.paramsPageSizeField]: [props.paramsPageSizeField]:

25
lib/component/tree/tree-api.vue

@ -35,7 +35,7 @@
defineOptions({ defineOptions({
name: 'NsTreeApi', name: 'NsTreeApi',
}); });
const emit = defineEmits(['update:treeData', 'select']); const emit = defineEmits(['update:treeData', 'select', 'reload']);
// const model = defineModel('treeData'); // const model = defineModel('treeData');
const formElRef = ref(); const formElRef = ref();
@ -73,6 +73,15 @@
const formFinish = debounce((data: object) => { const formFinish = debounce((data: object) => {
// selectedKeys.value = []; // selectedKeys.value = [];
getData(data); getData(data);
// formConfig.value.schemas.forEach((item: any) => {
// if (item.callList) {
// emit('reload');
// }
// });
//
if (formConfig.value.callList && !formConfig.value.defaultSelection) {
emit('reload');
}
}, 200); }, 200);
const handleSelect = (keys: any, selectedRows: any) => { const handleSelect = (keys: any, selectedRows: any) => {
@ -109,6 +118,20 @@
}) })
.then((res) => { .then((res) => {
treeData.value = transform(get(res, resultField)); treeData.value = transform(get(res, resultField));
//
selectedKeys.value = [];
if (formConfig.value.callList && formConfig.value.defaultSelection) {
handleSelect([treeData.value[0].id], {
selected: true,
event: 'select',
selectedNodes: treeData.value,
node: {
...treeData.value[0],
dataRef: { ...treeData.value[0] },
},
});
//
}
emit('update:treeData', treeData.value); emit('update:treeData', treeData.value);
// model.value = treeData.value; // model.value = treeData.value;
}) })

Loading…
Cancel
Save