duyufeng 6 months ago
parent
commit
94e5079222
  1. BIN
      hx-ai-intelligent/public/asset/file/emissionSource.xlsx
  2. BIN
      hx-ai-intelligent/public/asset/file/energyConsumption.xlsx
  3. 14
      hx-ai-intelligent/src/api/alarmManagement/alarmOverview.ts
  4. 16
      hx-ai-intelligent/src/api/alarmManagement/alarmSettings/deviceAlarms.ts
  5. 16
      hx-ai-intelligent/src/api/alarmManagement/alarmSettings/energyAlarm.ts
  6. 8
      hx-ai-intelligent/src/api/alarmManagement/alarmSettings/notificationManagements.ts
  7. 10
      hx-ai-intelligent/src/api/alarmManagement/energyAlarm.ts
  8. 10
      hx-ai-intelligent/src/api/alarmManagement/equipmentAlarm.ts
  9. 3
      hx-ai-intelligent/src/api/alarmManagement/gatewayAlarm.ts
  10. 14
      hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts
  11. 5
      hx-ai-intelligent/src/api/planToAdd.ts
  12. 5
      hx-ai-intelligent/src/icon/biaoge.svg
  13. 2
      hx-ai-intelligent/src/icon/bingtu.svg
  14. 6
      hx-ai-intelligent/src/icon/carbonAssetsSearch-1.svg
  15. 6
      hx-ai-intelligent/src/icon/carbonAssetsSearch-2.svg
  16. 6
      hx-ai-intelligent/src/icon/carbonAssetsSearch-3.svg
  17. 4
      hx-ai-intelligent/src/icon/carbonAssetsToDetail-1.svg
  18. 4
      hx-ai-intelligent/src/icon/carbonAssetsToDetail-2.svg
  19. 4
      hx-ai-intelligent/src/icon/carbonAssetsToDetail-3.svg
  20. 6
      hx-ai-intelligent/src/icon/del.svg
  21. 4
      hx-ai-intelligent/src/icon/title.svg
  22. 2
      hx-ai-intelligent/src/icon/xiazai.svg
  23. 3
      hx-ai-intelligent/src/router/carbonEmissionManage.ts
  24. 19
      hx-ai-intelligent/src/router/equipmentControl.ts
  25. 115
      hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue
  26. 24
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue
  27. 39
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue
  28. 70
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue
  29. 25
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue
  30. 42
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue
  31. 140
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue
  32. 21
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue
  33. 84
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/index.vue
  34. 97
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/linkPeople/index.vue
  35. 17
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts
  36. 10
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts
  37. 13
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts
  38. 48
      hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue
  39. 3
      hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue
  40. 9
      hx-ai-intelligent/src/view/alarmManagement/energyAlarm/ts/config.ts
  41. 48
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue
  42. 3
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue
  43. 9
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts
  44. 44
      hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/look.vue
  45. 3
      hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/status.vue
  46. 12
      hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/ts/config.ts
  47. 20
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue
  48. 64
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/index.vue
  49. 131
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue
  50. 952
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index copy.vue
  51. 1047
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue
  52. 39
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue
  53. 9
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/config.ts
  54. 1555
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index copy.vue
  55. 340
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue
  56. 13
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue
  57. 53
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/categoryDeatil.vue
  58. 49
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/index.vue
  59. 4
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/index.vue
  60. 1
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/dialogStyle.less
  61. 24
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.less
  62. 14
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue
  63. 24
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.less
  64. 565
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.vue
  65. 4
      hx-ai-intelligent/src/view/equipmentControl/electricDoor/index.vue
  66. BIN
      hx-ai-intelligent/src/view/equipmentControl/image/floor-1.png
  67. BIN
      hx-ai-intelligent/src/view/equipmentControl/image/floor-2.png
  68. BIN
      hx-ai-intelligent/src/view/equipmentControl/image/floor1.png
  69. BIN
      hx-ai-intelligent/src/view/equipmentControl/image/floor2.png
  70. 2
      hx-ai-intelligent/src/view/equipmentControl/liftSystem/index.vue
  71. 17
      hx-ai-intelligent/src/view/equipmentControl/liftSystem/liftInfo.vue
  72. 2
      hx-ai-intelligent/src/view/equipmentControl/liftSystem/liftPage.vue
  73. 1
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/dialogStyle.less
  74. 135
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/index.less
  75. 114
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue
  76. 70
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/light.vue
  77. 62
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/lightPosition.ts
  78. 24
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.less
  79. 602
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue
  80. 152
      hx-ai-intelligent/src/view/equipmentControl/planToAdd/config.ts
  81. 87
      hx-ai-intelligent/src/view/equipmentControl/planToAdd/index.vue
  82. 33
      hx-ai-intelligent/src/view/equipmentControl/style/color.less
  83. 2
      hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/boxModel.vue
  84. 21
      hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/dialogStyle.less
  85. 27
      hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/tabs1.less
  86. 11
      hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue
  87. 8
      hx-ai-intelligent/src/view/monitor/deviceMonitor/page.vue
  88. 39
      hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue
  89. 197
      hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue
  90. 39
      hx-ai-intelligent/src/view/monitor/energyMonitor/analysisGraph/index.vue
  91. 13
      hx-ai-intelligent/src/view/monitor/energyMonitor/analysisTable/index.vue
  92. 4
      hx-ai-intelligent/src/view/monitor/energyMonitor/graphGraph/index.vue
  93. 46
      hx-ai-intelligent/src/view/monitor/energyMonitor/graphTable/index.vue
  94. 52
      hx-ai-intelligent/src/view/monitor/energyMonitor/page.vue
  95. 330
      hx-ai-intelligent/src/view/monitor/energyMonitor/tree/index.vue
  96. 47
      hx-ai-intelligent/src/view/monitor/environmentMonitor/aggregateData/index.vue
  97. 226
      hx-ai-intelligent/src/view/monitor/environmentMonitor/averageData/index.vue
  98. 452
      hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/index.vue
  99. 2
      hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue
  100. 7
      lib/util/xlsx-util.ts

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

Binary file not shown.

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

Binary file not shown.

14
hx-ai-intelligent/src/api/alarmManagement/alarmOverview.ts

@ -1,8 +1,10 @@
import { BASE_URL } from '../index';
export enum alarmOverviewApi {
getAlarmEquipment = '/carbon-smart/api/AlarmOverview/alarmEquipment', //设备告警 数量
getAlarmEnergyConsumption = '/carbon-smart/api/AlarmOverview/alarmEnergyConsumption', //能碳告警 数量
getAlarmGateway = '/carbon-smart/api/AlarmOverview/alarmGateway', //网关告警 数量
getPriority = '/carbon-smart/api/AlarmOverview/priority', //优先级 数量
getProcessProgress = '/carbon-smart/api/AlarmOverview/processProgress', //进度 数量
getAlarmTrend = '/carbon-smart/api/AlarmOverview/alarmTrend', //30天告警 数量
getAlarmEquipment = `${BASE_URL}/api/AlarmOverview/alarmEquipment`, //设备告警 数量
getAlarmEnergyConsumption = `${BASE_URL}/api/AlarmOverview/alarmEnergyConsumption`, //能碳告警 数量
getAlarmGateway = `${BASE_URL}/api/AlarmOverview/alarmGateway`, //网关告警 数量
getPriority = `${BASE_URL}/api/AlarmOverview/priority`, //优先级 数量
getProcessProgress = `${BASE_URL}/api/AlarmOverview/processProgress`, //进度 数量
getAlarmTrend = `${BASE_URL}/api/AlarmOverview/alarmTrend`, //30天告警 数量
}

16
hx-ai-intelligent/src/api/alarmManagement/alarmSettings/deviceAlarms.ts

@ -1,9 +1,11 @@
import { BASE_URL } from '../../index';
export enum deviceAlarms {
getTableList = '/carbon-smart/api/AlarmEquipment/selectAlarmEquipment', //设备告警分页
addOrUpNewData = '/carbon-smart/api/AlarmEquipment/creatOrUpdate', //设备告警添加 修改
del = '/carbon-smart/api/AlarmEquipment/delete', //设备告警删除
configGetTableList = '/carbon-smart/api/AlarmEquipmentRule/selectAlarmEquipmentRule', //配置设备告警分页
configAddOrUpNewData = '/carbon-smart/api/AlarmEquipmentRule/creatOrUpdate', //配置设备告警添加 修改
configFindById = '/carbon-smart/api/AlarmEquipmentRule/findById', //配置设备告警 查询详情
configDel = '/carbon-smart/api/AlarmEquipmentRule/delete', //配置设备告警删除
getTableList = `${BASE_URL}/api/AlarmEquipment/selectAlarmEquipment`, //设备告警分页
addOrUpNewData = `${BASE_URL}/api/AlarmEquipment/creatOrUpdate`, //设备告警添加 修改
del = `${BASE_URL}/api/AlarmEquipment/delete`, //设备告警删除
configGetTableList = `${BASE_URL}/api/AlarmEquipmentRule/selectAlarmEquipmentRule`, //配置设备告警分页
configAddOrUpNewData = `${BASE_URL}/api/AlarmEquipmentRule/creatOrUpdate`, //配置设备告警添加 修改
configFindById = `${BASE_URL}/api/AlarmEquipmentRule/findById`, //配置设备告警 查询详情
configDel = `${BASE_URL}/api/AlarmEquipmentRule/delete`, //配置设备告警删除
}

16
hx-ai-intelligent/src/api/alarmManagement/alarmSettings/energyAlarm.ts

@ -1,9 +1,11 @@
import { BASE_URL } from '../../index';
export enum energyAlarms {
getTableList = '/carbon-smart/api/AlarmEnergyConsumption/selectAlarmEnergyConsumption', //能耗告警分页
addOrUpNewData = '/carbon-smart/api/AlarmEnergyConsumption/creatOrUpdate', //能耗告警添加 修改
del = '/carbon-smart/api/AlarmEnergyConsumption/delete', //能耗删除
configGetTableList = '/carbon-smart/api/AlarmEnergyConsumptionRule/selectAlarmEnergyConsumptionRule', //配置设备告警分页
configAddOrUpNewData = '/carbon-smart/api/AlarmEnergyConsumptionRule/creatOrUpdate', //配置设备告警添加 修改
configFindById = '/carbon-smart/api/AlarmEnergyConsumptionRule/findById', //配置设备告警 查询详情
configDel = '/carbon-smart/api/AlarmEnergyConsumptionRule/delete', //配置设备告警删除
getTableList = `${BASE_URL}/api/AlarmEnergyConsumption/selectAlarmEnergyConsumption`, //能耗告警分页
addOrUpNewData = `${BASE_URL}/api/AlarmEnergyConsumption/creatOrUpdate`, //能耗告警添加 修改
del = `${BASE_URL}/api/AlarmEnergyConsumption/delete`, //能耗删除
configGetTableList = `${BASE_URL}/api/AlarmEnergyConsumptionRule/selectAlarmEnergyConsumptionRule`, //配置设备告警分页
configAddOrUpNewData = `${BASE_URL}/api/AlarmEnergyConsumptionRule/creatOrUpdate`, //配置设备告警添加 修改
configFindById = `${BASE_URL}/api/AlarmEnergyConsumptionRule/findById`, //配置设备告警 查询详情
configDel = `${BASE_URL}/api/AlarmEnergyConsumptionRule/delete`, //配置设备告警删除
}

8
hx-ai-intelligent/src/api/alarmManagement/alarmSettings/notificationManagements.ts

@ -1,5 +1,7 @@
import { BASE_URL } from '../../index';
export enum notificationManagementApi {
getTableList = '/carbon-smart/api/AlarmContactInformation/selectAlarmContactInformation', //通知管理分页
upData = '/carbon-smart/api/AlarmContactInformation/update', //通知管理 修改
findById = '/carbon-smart/api/AlarmContactInformation/findById', //通知管理 查询详情
getTableList = `${BASE_URL}/api/AlarmContactInformation/selectAlarmContactInformation`, //通知管理分页
upData = `${BASE_URL}/api/AlarmContactInformation/update`, //通知管理 修改
findById = `${BASE_URL}/api/AlarmContactInformation/findById`, //通知管理 查询详情
}

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

@ -1,6 +1,8 @@
import { BASE_URL } from '../index';
export enum energyAlarmApi {
getTableList = '/carbon-smart/api/AlarmEnergyConsumptionLog/selectAlarmEnergyConsumptionLog', //能碳告警 列表
getCodeList = '/carbon-smart/api/AlarmEnergyConsumptionLog/selectErrorCodeList ', //能碳告警 列表
getSelectAlarmEnergyConsumptionLogStatusProcess = '/carbon-smart/api/AlarmEnergyConsumptionLogStatusProcess/selectAlarmEnergyConsumptionLogStatusProcess', //能碳告警 状态 没有创建工单log接口
noCreatOrUpdateLog = '/carbon-smart/api/AlarmEnergyConsumptionLogStatusProcess/creatOrUpdate', //能碳告警 状态 没有创建工单 添加 修改状态log
getTableList = `${BASE_URL}/api/AlarmEnergyConsumptionLog/selectAlarmEnergyConsumptionLog`, //能碳告警 列表
getCodeList = `${BASE_URL}/api/AlarmEnergyConsumptionLog/selectErrorCodeList `, //能碳告警 列表
getSelectAlarmEnergyConsumptionLogStatusProcess = `${BASE_URL}/api/AlarmEnergyConsumptionLogStatusProcess/selectAlarmEnergyConsumptionLogStatusProcess`, //能碳告警 状态 没有创建工单log接口
noCreatOrUpdateLog = `${BASE_URL}/api/AlarmEnergyConsumptionLogStatusProcess/creatOrUpdate`, //能碳告警 状态 没有创建工单 添加 修改状态log
}

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

@ -1,6 +1,8 @@
import { BASE_URL } from '../index';
export enum equipmentAlarmApi {
getTableList = '/carbon-smart/api/AlarmEquipmentLog/selectAlarmEquipmentLog', //设备告警 列表
getCodeList = '/carbon-smart/api/AlarmEquipmentLog/selectErrorCodeList', //设备告警 列表
getSelectAlarmEquipmentLogStatusProcess = '/carbon-smart/api/AlarmEquipmentLogStatusProcess/selectAlarmEquipmentLogStatusProcess', //设备告警 状态 没有创建工单log接口
noCreatOrUpdateLog = '/carbon-smart/api/AlarmEquipmentLogStatusProcess/creatOrUpdate', //设备告警 状态 没有创建工单 添加 修改状态log
getTableList = `${BASE_URL}/api/AlarmEquipmentLog/selectAlarmEquipmentLog`, //设备告警 列表
getCodeList = `${BASE_URL}/api/AlarmEquipmentLog/selectErrorCodeList`, //设备告警 列表
getSelectAlarmEquipmentLogStatusProcess = `${BASE_URL}/api/AlarmEquipmentLogStatusProcess/selectAlarmEquipmentLogStatusProcess`, //设备告警 状态 没有创建工单log接口
noCreatOrUpdateLog = `${BASE_URL}/api/AlarmEquipmentLogStatusProcess/creatOrUpdate`, //设备告警 状态 没有创建工单 添加 修改状态log
}

3
hx-ai-intelligent/src/api/alarmManagement/gatewayAlarm.ts

@ -1,3 +1,4 @@
import { BASE_URL } from '../index';
export enum gatewayAlarmApi {
getTableList = '/carbon-smart/api/AlarmGatewayLog/selectAlarmGatewayLog', //网关告警 列表
getTableList = `${BASE_URL}/api/AlarmGatewayLog/selectAlarmGatewayLog`, //网关告警 列表
}

14
hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts

@ -8,6 +8,9 @@ export enum carbonEmissionFactorLibrary {
getCarbonFactorTree = '/carbon-smart/api/carbon/emission/type/getCarbonFactorTree',
creat = '/carbon-smart/api/carbon/emission/type/creatOrUpdate',
delTreeNode = '/carbon-smart/api/carbon/emission/type/del',
move = '/carbon-smart/api/carbon/emission/type/move',
import = '/carbon-smart/api/carbon/emission/factor/import',
export = '/carbon-smart/api/carbon/emission/factor/export',
// 单位管理
dictionaryUnitManagement = '/carbon-smart/client/dict/dictionaryUnitManagement',
findOutermost = '/carbon-smart/client/dict/findOutermost',
@ -15,7 +18,7 @@ export enum carbonEmissionFactorLibrary {
updateDictionary = '/carbon-smart/client/dict/updateDictionary',
delDictionary = '/carbon-smart/client/dict/delDictionary',
}
// 碳排管理-碳排统计接口
// 碳排管理-能耗统计接口
export enum energyConsumption {
getDicList = '/carbon-smart/client/dict/list',
pageList = '/carbon-smart/api/carbon/stats/pageList',
@ -23,6 +26,10 @@ export enum energyConsumption {
creat = '/carbon-smart/api/carbon/stats/creat',
update = '/carbon-smart/api/carbon/stats/update',
del = '/carbon-smart/api/carbon/stats/del',
voucherDownloadList = '/carbon-smart/api/carbon/stats/voucherDownloadList',
energyAcquisition = '/carbon-smart/api/carbon/stats/energyAcquisition',
import = '/carbon-smart/api/carbon/stats/import',
export = '/carbon-smart/api/carbon/stats/export',
}
// 碳排管理-碳排速算接口
export enum quickCalculation {
@ -55,6 +62,7 @@ export enum carbonInventoryCheck {
findUnitById = '/carbon-smart/api/carbon/inventory/findById',
getDetailsList = '/carbon-smart/api/carbon/inventory/details/getDetailsList',
updateTable = '/carbon-smart/api/carbon/inventory/details/update',
voucherDownloadList = '/carbon-smart/api/carbon/inventory/details/voucherDownloadList',
// 排放统计接口
emissionStatistic = '/carbon-smart/api/carbon/inventory/emissionStatistic',
// 碳排流向
@ -75,6 +83,8 @@ export enum uploadPic {
uploadfiles = '/carbon-smart/api/common/file/uploadfiles',
select = '/carbon-smart/api/common/file/select',
uploadfile = '/carbon-smart/api/common/file/uploadfile',
download = '/carbon-smart/api/common/file/download',
downloadZip = '/carbon-smart/api/common/file/downloadZip',
}
// 碳规划
export enum carbonPlanning {
@ -90,4 +100,6 @@ export enum carbonPlanning {
detailedStatisticalDataChart = '/carbon-smart/api/carbon/planning/detailedStatisticalDataChart',
batchOrUpdate = '/carbon-smart/api/carbon/planning/batchOrUpdate',
addNodes = '/carbon-smart/api/carbon/planning/addNodes',
benchmarkSetting = '/carbon-smart/api/carbon/planning/benchmarkSetting',
benchmarkSubmit = '/carbon-smart/api/carbon/planning/benchmarkSubmit',
}

5
hx-ai-intelligent/src/api/planToAdd.ts

@ -0,0 +1,5 @@
export enum planToAddApi {
getActivatedPlanTree = '/carbon-smart/deviceCtrlPlan/getActivatedPlanTree', //计划树
getActivatedPlanListByTree = '/carbon-smart/deviceCtrlPlan/getActivatedPlanListByTree', //计划列表
updPlan = '/carbon-smart/deviceCtrlPlan/updateActivatedPlan', //修改计划
}

5
hx-ai-intelligent/src/icon/biaoge.svg

@ -1 +1,4 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1720144479404" class="icon" viewBox="0 0 1142 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2572" xmlns:xlink="http://www.w3.org/1999/xlink" width="17.84375" height="16"><path d="M1102.769231 39.384615v945.23077H39.384615V39.384615h1063.384616m0-39.384615H39.384615a39.384615 39.384615 0 0 0-39.384615 39.384615v945.23077a39.384615 39.384615 0 0 0 39.384615 39.384615h1063.384616a39.384615 39.384615 0 0 0 39.384615-39.384615V39.384615a39.384615 39.384615 0 0 0-39.384615-39.384615z" fill="#4D4D4D" p-id="2573"></path><path d="M39.384615 393.846154h1063.384616v39.384615H39.384615zM39.384615 590.769231h1063.384616v39.384615H39.384615zM39.384615 787.692308h1063.384616v39.384615H39.384615zM39.384615 196.923077h1063.384616v39.384615H39.384615z" fill="#B3B3B3" p-id="2574"></path><path d="M315.076923 196.923077v787.692308H275.692308V196.923077zM590.769231 196.923077v787.692308h-39.384616V196.923077zM866.461538 196.923077v787.692308h-39.384615V196.923077z" fill="#B3B3B3" p-id="2575"></path><path d="M39.384615 39.384615h1063.384616v157.538462H39.384615z" fill="#05AFC8" p-id="2576"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16.56231689453125" height="15.345458984375" viewBox="0 0 16.56231689453125 15.345458984375" fill="none">
<path d="M2.26283 0C2.61778 0 2.91885 0.120438 3.16605 0.36129C3.41325 0.60215 3.53685 0.900055 3.53685 1.25501L3.53685 2.22479C3.53685 2.57975 3.41325 2.88082 3.16605 3.12801C2.91885 3.37522 2.61778 3.49882 2.26283 3.49882L1.25501 3.49882C0.912735 3.49882 0.618004 3.37522 0.370804 3.12801C0.123596 2.88082 0 2.57975 0 2.22479L0 1.25501C0 0.900055 0.123596 0.60215 0.370804 0.36129C0.618004 0.120438 0.912743 0 1.25501 0L2.26283 0ZM15.3073 0C15.6496 0 15.9443 0.120438 16.1915 0.36129C16.4387 0.60215 16.5623 0.900055 16.5623 1.25501L16.5623 2.22479C16.5623 2.57975 16.4387 2.88082 16.1915 3.12801C15.9443 3.37522 15.6496 3.49882 15.3073 3.49882L7.18778 3.49882C6.83284 3.49882 6.53176 3.37522 6.28456 3.12801C6.03737 2.88082 5.91376 2.57975 5.91376 2.22479L5.91376 1.25501C5.91376 0.900055 6.03737 0.60215 6.28456 0.36129C6.53176 0.120438 6.83284 0 7.18778 0L15.3073 0ZM2.26283 5.91376C2.61778 5.91376 2.91885 6.03737 3.16605 6.28456C3.41325 6.53176 3.53685 6.83284 3.53685 7.18778L3.53685 8.15757C3.53685 8.49984 3.41325 8.79458 3.16605 9.04179C2.91885 9.28898 2.61778 9.41258 2.26283 9.41258L1.25501 9.41258C0.912735 9.41258 0.618004 9.28898 0.370804 9.04179C0.123596 8.79458 0 8.49984 0 8.15757L0 7.18778C0 6.83284 0.123596 6.53176 0.370804 6.28456C0.618004 6.03737 0.912743 5.91376 1.25501 5.91376L2.26283 5.91376ZM15.3073 5.91376C15.6496 5.91376 15.9443 6.03737 16.1915 6.28456C16.4387 6.53176 16.5623 6.83284 16.5623 7.18778L16.5623 8.15757C16.5623 8.49984 16.4387 8.79458 16.1915 9.04179C15.9443 9.28898 15.6496 9.41258 15.3073 9.41258L7.18778 9.41258C6.83284 9.41258 6.53176 9.28898 6.28456 9.04179C6.03737 8.79458 5.91376 8.49984 5.91376 8.15757L5.91376 7.18778C5.91376 6.83284 6.03737 6.53176 6.28456 6.28456C6.53176 6.03737 6.83284 5.91376 7.18778 5.91376L15.3073 5.91376ZM2.26283 11.8465C2.61778 11.8465 2.91885 11.9701 3.16605 12.2173C3.41325 12.4645 3.53685 12.7593 3.53685 13.1016L3.53685 14.0713C3.53685 14.4263 3.41325 14.7274 3.16605 14.9746C2.91885 15.2218 2.61778 15.3454 2.26283 15.3454L1.25501 15.3454C0.912735 15.3454 0.618004 15.2218 0.370804 14.9746C0.123596 14.7274 0 14.4263 0 14.0713L0 13.1016C0 12.7593 0.123596 12.4645 0.370804 12.2173C0.618004 11.9701 0.912743 11.8465 1.25501 11.8465L2.26283 11.8465ZM15.3073 11.8465C15.6496 11.8465 15.9443 11.9701 16.1915 12.2173C16.4387 12.4645 16.5623 12.7593 16.5623 13.1016L16.5623 14.0713C16.5623 14.4263 16.4387 14.7274 16.1915 14.9746C15.9443 15.2218 15.6496 15.3454 15.3073 15.3454L7.18778 15.3454C6.83284 15.3454 6.53176 15.2218 6.28456 14.9746C6.03737 14.7274 5.91376 14.4263 5.91376 14.0713L5.91376 13.1016C5.91376 12.7593 6.03737 12.4645 6.28456 12.2173C6.53176 11.9701 6.83284 11.8465 7.18778 11.8465L15.3073 11.8465Z" fill="#2778FF" >
</path>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

2
hx-ai-intelligent/src/icon/bingtu.svg

@ -1 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1720145764410" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4680" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M495.611479 159.364238C285.562631 159.364238 115.284768 329.642102 115.284768 539.690949S285.562631 920.01766 495.611479 920.01766 875.93819 749.739797 875.93819 539.690949H518.216336c-12.484662 0-22.604857-10.120194-22.604857-22.604856V159.364238z" fill="#839BFB" p-id="4681"></path><path d="M562.860927 495.046358h368.459161c0-215.978102-175.085916-391.064018-391.064017-391.064018v368.459161c0 12.484662 10.120194 22.604857 22.604856 22.604857z" fill="#839BFB" fill-opacity=".6" p-id="4682"></path></svg>
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1720145764410" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4680" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M495.611479 159.364238C285.562631 159.364238 115.284768 329.642102 115.284768 539.690949S285.562631 920.01766 495.611479 920.01766 875.93819 749.739797 875.93819 539.690949H518.216336c-12.484662 0-22.604857-10.120194-22.604857-22.604856V159.364238z" fill="#2778FF" p-id="4681"></path><path d="M562.860927 495.046358h368.459161c0-215.978102-175.085916-391.064018-391.064017-391.064018v368.459161c0 12.484662 10.120194 22.604857 22.604856 22.604857z" fill="#2778FF" p-id="4682"></path></svg>

Before

Width:  |  Height:  |  Size: 838 B

After

Width:  |  Height:  |  Size: 821 B

6
hx-ai-intelligent/src/icon/carbonAssetsSearch-1.svg

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="37px" height="37px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -738 -62 )">
<path d="M 32 16.17637875390625 L 32 5 L 5 5 L 5 32 L 16.17637875390625 32 L 16.17637875390625 37 L 0 37 L 0 0 L 37 0 L 37 16.17637875390625 L 32 16.17637875390625 Z M 6.9478248789666415 18.66767607469059 C 6.9478248789666415 15.5442205297455 8.189402439205798 12.548862312376832 10.3991006171875 10.341327827148438 C 12.604273280037184 8.143662959434554 15.590626658621316 6.909656880840238 18.703907459282163 6.909656880840238 C 25.201454239889483 6.909656880840238 30.46875662920404 12.176959270154791 30.46875662920404 18.674506050762112 C 30.46875662920404 20.983959083452117 29.789040393343488 23.24233673232217 28.514333895507814 25.16813439941406 L 36.990756359375 33.66766596484375 L 33.6653550546875 36.99768908984375 L 25.18893259082031 28.49815752441406 C 23.267562429817577 29.7630406080517 21.01764204116391 30.43714706492497 18.717295869201017 30.43714706492497 C 12.217196527718643 30.43714706492497 6.9478248789666415 25.167775416172965 6.9478248789666415 18.66767607469059 Z M 18.53350819726563 25.387670972656252 L 18.526575466796874 25.387670972656245 C 18.537359653048604 25.387721182280185 18.54814394157355 25.387746287194187 18.558928244709044 25.387746287194187 C 22.396705336309363 25.387746287194187 25.50783837263873 22.27661325086481 25.50783837263873 18.438836159264497 C 25.50783837263873 14.601059067664185 22.396705336309363 11.48992603133481 18.558928244709044 11.48992603133481 C 14.72118056523231 11.48992603133481 11.610059711939467 14.601013165475232 11.610018117187504 18.438760844726563 C 11.6100055260099 18.44415500501238 11.609999230414665 18.449549178157536 11.609999230414665 18.45494335313865 C 11.609999230414665 22.280184472224335 14.70827046453852 25.38258105471001 18.53350819726563 25.387670972656252 Z " fill-rule="nonzero" fill="#e4793f" stroke="none" transform="matrix(1 0 0 1 738 62 )" />
</g>
</svg>

6
hx-ai-intelligent/src/icon/carbonAssetsSearch-2.svg

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="37px" height="37px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -738 -62 )">
<path d="M 32 16.17637875390625 L 32 5 L 5 5 L 5 32 L 16.17637875390625 32 L 16.17637875390625 37 L 0 37 L 0 0 L 37 0 L 37 16.17637875390625 L 32 16.17637875390625 Z M 6.9478248789666415 18.66767607469059 C 6.9478248789666415 15.5442205297455 8.189402439205798 12.548862312376832 10.3991006171875 10.341327827148438 C 12.604273280037184 8.143662959434554 15.590626658621316 6.909656880840238 18.703907459282163 6.909656880840238 C 25.201454239889483 6.909656880840238 30.46875662920404 12.176959270154791 30.46875662920404 18.674506050762112 C 30.46875662920404 20.983959083452117 29.789040393343488 23.24233673232217 28.514333895507814 25.16813439941406 L 36.990756359375 33.66766596484375 L 33.6653550546875 36.99768908984375 L 25.18893259082031 28.49815752441406 C 23.267562429817577 29.7630406080517 21.01764204116391 30.43714706492497 18.717295869201017 30.43714706492497 C 12.217196527718643 30.43714706492497 6.9478248789666415 25.167775416172965 6.9478248789666415 18.66767607469059 Z M 18.53350819726563 25.387670972656252 L 18.526575466796874 25.387670972656245 C 18.537359653048604 25.387721182280185 18.54814394157355 25.387746287194187 18.558928244709044 25.387746287194187 C 22.396705336309363 25.387746287194187 25.50783837263873 22.27661325086481 25.50783837263873 18.438836159264497 C 25.50783837263873 14.601059067664185 22.396705336309363 11.48992603133481 18.558928244709044 11.48992603133481 C 14.72118056523231 11.48992603133481 11.610059711939467 14.601013165475232 11.610018117187504 18.438760844726563 C 11.6100055260099 18.44415500501238 11.609999230414665 18.449549178157536 11.609999230414665 18.45494335313865 C 11.609999230414665 22.280184472224335 14.70827046453852 25.38258105471001 18.53350819726563 25.387670972656252 Z " fill-rule="nonzero" fill="#e93f33" stroke="none" transform="matrix(1 0 0 1 738 62 )" />
</g>
</svg>

6
hx-ai-intelligent/src/icon/carbonAssetsSearch-3.svg

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="37px" height="37px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -738 -62 )">
<path d="M 32 16.17637875390625 L 32 5 L 5 5 L 5 32 L 16.17637875390625 32 L 16.17637875390625 37 L 0 37 L 0 0 L 37 0 L 37 16.17637875390625 L 32 16.17637875390625 Z M 6.9478248789666415 18.66767607469059 C 6.9478248789666415 15.5442205297455 8.189402439205798 12.548862312376832 10.3991006171875 10.341327827148438 C 12.604273280037184 8.143662959434554 15.590626658621316 6.909656880840238 18.703907459282163 6.909656880840238 C 25.201454239889483 6.909656880840238 30.46875662920404 12.176959270154791 30.46875662920404 18.674506050762112 C 30.46875662920404 20.983959083452117 29.789040393343488 23.24233673232217 28.514333895507814 25.16813439941406 L 36.990756359375 33.66766596484375 L 33.6653550546875 36.99768908984375 L 25.18893259082031 28.49815752441406 C 23.267562429817577 29.7630406080517 21.01764204116391 30.43714706492497 18.717295869201017 30.43714706492497 C 12.217196527718643 30.43714706492497 6.9478248789666415 25.167775416172965 6.9478248789666415 18.66767607469059 Z M 18.53350819726563 25.387670972656252 L 18.526575466796874 25.387670972656245 C 18.537359653048604 25.387721182280185 18.54814394157355 25.387746287194187 18.558928244709044 25.387746287194187 C 22.396705336309363 25.387746287194187 25.50783837263873 22.27661325086481 25.50783837263873 18.438836159264497 C 25.50783837263873 14.601059067664185 22.396705336309363 11.48992603133481 18.558928244709044 11.48992603133481 C 14.72118056523231 11.48992603133481 11.610059711939467 14.601013165475232 11.610018117187504 18.438760844726563 C 11.6100055260099 18.44415500501238 11.609999230414665 18.449549178157536 11.609999230414665 18.45494335313865 C 11.609999230414665 22.280184472224335 14.70827046453852 25.38258105471001 18.53350819726563 25.387670972656252 Z " fill-rule="nonzero" fill="#3da1de" stroke="none" transform="matrix(1 0 0 1 738 62 )" />
</g>
</svg>

4
hx-ai-intelligent/src/icon/carbonAssetsToDetail-1.svg

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 20 20" fill="none">
<path d="M15.8699 14.8395C16.0301 14.431 16.1182 13.9985 16.1182 13.558C16.1182 11.6116 14.5403 10.0257 12.594 10.0257C10.6476 10.0257 9.06971 11.6116 9.06971 13.558C9.06971 15.5043 10.6476 17.0902 12.594 17.0902C13.443 17.0902 14.2199 16.7778 14.8287 16.2732L16.9032 18.0273L18.0406 16.6817L15.8699 14.8395L15.8699 14.8395ZM12.586 15.3201C11.6168 15.3441 10.8078 14.5672 10.7838 13.59C10.7597 12.6128 11.5367 11.8038 12.5059 11.7798L12.586 11.7798C13.5631 11.8038 14.3321 12.6128 14.308 13.59C14.292 14.5431 13.5311 15.296 12.586 15.3201L12.586 15.3201ZM8.18862 13.5499C8.18862 11.115 10.167 9.13662 12.602 9.13662C13.2347 9.13662 13.8274 9.27279 14.3641 9.51308L14.3641 3.77013C14.3641 2.79295 13.5792 2 12.602 2L3.77531 2C2.79813 2 2.01318 2.78495 2.01318 3.77013L2.01318 15.3201C2.01318 16.2972 2.79813 17.0902 3.77531 17.0902L9.96678 17.0902C8.84543 16.2572 8.18864 14.9516 8.18864 13.5499L8.18862 13.5499ZM4.36001 5.50022L10.984 5.50022C11.3044 5.50022 11.5687 5.7325 11.5687 6.02085C11.5687 6.3092 11.3044 6.54148 10.984 6.54148L4.352 6.54148C4.03161 6.54148 3.7753 6.3092 3.7753 6.02085C3.7753 5.7325 4.03962 5.50022 4.36001 5.50022L4.36001 5.50022ZM4.36001 8.62399L8.66121 8.62399C8.9816 8.62399 9.24592 8.85627 9.24592 9.14462C9.24592 9.43297 8.98158 9.66525 8.66121 9.66525L4.352 9.66525C4.03161 9.66525 3.7753 9.43297 3.7753 9.14462C3.7753 8.85627 4.03962 8.62399 4.36001 8.62399L4.36001 8.62399ZM7.49981 12.789L4.352 12.789C4.03161 12.789 3.7753 12.5567 3.7753 12.2684C3.7753 11.98 4.03962 11.7478 4.352 11.7478L7.49179 11.7478C7.81218 11.7478 8.0765 11.98 8.0765 12.2684C8.0765 12.5567 7.81218 12.789 7.4998 12.789L7.49981 12.789Z" fill="#E56616" >
</path>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

4
hx-ai-intelligent/src/icon/carbonAssetsToDetail-2.svg

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 20 20" fill="none">
<path d="M15.8699 14.8395C16.0301 14.431 16.1182 13.9985 16.1182 13.558C16.1182 11.6116 14.5403 10.0257 12.594 10.0257C10.6476 10.0257 9.06971 11.6116 9.06971 13.558C9.06971 15.5043 10.6476 17.0902 12.594 17.0902C13.443 17.0902 14.2199 16.7778 14.8287 16.2732L16.9032 18.0273L18.0406 16.6817L15.8699 14.8395L15.8699 14.8395ZM12.586 15.3201C11.6168 15.3441 10.8078 14.5672 10.7838 13.59C10.7597 12.6128 11.5367 11.8038 12.5059 11.7798L12.586 11.7798C13.5631 11.8038 14.3321 12.6128 14.308 13.59C14.292 14.5431 13.5311 15.296 12.586 15.3201L12.586 15.3201ZM8.18862 13.5499C8.18862 11.115 10.167 9.13662 12.602 9.13662C13.2347 9.13662 13.8274 9.27279 14.3641 9.51308L14.3641 3.77013C14.3641 2.79295 13.5792 2 12.602 2L3.77531 2C2.79813 2 2.01318 2.78495 2.01318 3.77013L2.01318 15.3201C2.01318 16.2972 2.79813 17.0902 3.77531 17.0902L9.96678 17.0902C8.84543 16.2572 8.18864 14.9516 8.18864 13.5499L8.18862 13.5499ZM4.36001 5.50022L10.984 5.50022C11.3044 5.50022 11.5687 5.7325 11.5687 6.02085C11.5687 6.3092 11.3044 6.54148 10.984 6.54148L4.352 6.54148C4.03161 6.54148 3.7753 6.3092 3.7753 6.02085C3.7753 5.7325 4.03962 5.50022 4.36001 5.50022L4.36001 5.50022ZM4.36001 8.62399L8.66121 8.62399C8.9816 8.62399 9.24592 8.85627 9.24592 9.14462C9.24592 9.43297 8.98158 9.66525 8.66121 9.66525L4.352 9.66525C4.03161 9.66525 3.7753 9.43297 3.7753 9.14462C3.7753 8.85627 4.03962 8.62399 4.36001 8.62399L4.36001 8.62399ZM7.49981 12.789L4.352 12.789C4.03161 12.789 3.7753 12.5567 3.7753 12.2684C3.7753 11.98 4.03962 11.7478 4.352 11.7478L7.49179 11.7478C7.81218 11.7478 8.0765 11.98 8.0765 12.2684C8.0765 12.5567 7.81218 12.789 7.4998 12.789L7.49981 12.789Z" fill="#E6332C" >
</path>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

4
hx-ai-intelligent/src/icon/carbonAssetsToDetail-3.svg

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 20 20" fill="none">
<path d="M15.8699 14.8395C16.0301 14.431 16.1182 13.9985 16.1182 13.558C16.1182 11.6116 14.5403 10.0257 12.594 10.0257C10.6476 10.0257 9.06971 11.6116 9.06971 13.558C9.06971 15.5043 10.6476 17.0902 12.594 17.0902C13.443 17.0902 14.2199 16.7778 14.8287 16.2732L16.9032 18.0273L18.0406 16.6817L15.8699 14.8395L15.8699 14.8395ZM12.586 15.3201C11.6168 15.3441 10.8078 14.5672 10.7838 13.59C10.7597 12.6128 11.5367 11.8038 12.5059 11.7798L12.586 11.7798C13.5631 11.8038 14.3321 12.6128 14.308 13.59C14.292 14.5431 13.5311 15.296 12.586 15.3201L12.586 15.3201ZM8.18862 13.5499C8.18862 11.115 10.167 9.13662 12.602 9.13662C13.2347 9.13662 13.8274 9.27279 14.3641 9.51308L14.3641 3.77013C14.3641 2.79295 13.5792 2 12.602 2L3.77531 2C2.79813 2 2.01318 2.78495 2.01318 3.77013L2.01318 15.3201C2.01318 16.2972 2.79813 17.0902 3.77531 17.0902L9.96678 17.0902C8.84543 16.2572 8.18864 14.9516 8.18864 13.5499L8.18862 13.5499ZM4.36001 5.50022L10.984 5.50022C11.3044 5.50022 11.5687 5.7325 11.5687 6.02085C11.5687 6.3092 11.3044 6.54148 10.984 6.54148L4.352 6.54148C4.03161 6.54148 3.7753 6.3092 3.7753 6.02085C3.7753 5.7325 4.03962 5.50022 4.36001 5.50022L4.36001 5.50022ZM4.36001 8.62399L8.66121 8.62399C8.9816 8.62399 9.24592 8.85627 9.24592 9.14462C9.24592 9.43297 8.98158 9.66525 8.66121 9.66525L4.352 9.66525C4.03161 9.66525 3.7753 9.43297 3.7753 9.14462C3.7753 8.85627 4.03962 8.62399 4.36001 8.62399L4.36001 8.62399ZM7.49981 12.789L4.352 12.789C4.03161 12.789 3.7753 12.5567 3.7753 12.2684C3.7753 11.98 4.03962 11.7478 4.352 11.7478L7.49179 11.7478C7.81218 11.7478 8.0765 11.98 8.0765 12.2684C8.0765 12.5567 7.81218 12.789 7.4998 12.789L7.49981 12.789Z" fill="#389DDC" >
</path>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

6
hx-ai-intelligent/src/icon/del.svg

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="12px" height="12px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -347 -469 )">
<path d="M 10.684322033898304 5.219491525423729 C 10.685593220338983 4.930932203389831 10.452966101694914 4.698305084745764 10.165677966101695 4.698305084745764 C 9.878389830508475 4.698305084745764 9.644491525423728 4.930932203389831 9.644491525423728 5.219491525423729 L 9.644491525423728 10.426271186440678 C 9.644491525423728 10.7135593220339 9.410593220338983 10.947457627118645 9.123305084745763 10.947457627118645 L 2.8754237288135593 10.947457627118645 C 2.588135593220339 10.947457627118645 2.354237288135593 10.7135593220339 2.354237288135593 10.426271186440678 L 2.354237288135593 5.219491525423729 C 2.354237288135593 4.932203389830509 2.1216101694915253 4.698305084745764 1.833050847457627 4.698305084745764 C 1.5444915254237288 4.698305084745764 1.3118644067796608 4.930932203389831 1.3118644067796608 5.219491525423729 L 1.3118644067796608 10.426271186440678 C 1.3118644067796608 11.288135593220339 2.01228813559322 11.988559322033899 2.8741525423728818 11.988559322033899 L 9.122033898305085 11.988559322033899 C 9.983898305084745 11.988559322033899 10.684322033898304 11.288135593220339 10.684322033898304 10.426271186440678 L 10.684322033898304 5.219491525423729 Z M 11.98728813559322 2.8766949152542374 C 11.98728813559322 2.589406779661017 11.753389830508475 2.3555084745762715 11.467372881355931 2.3555084745762715 L 9.12457627118644 2.3555084745762715 L 9.12457627118644 1.314406779661017 C 9.12457627118644 0.5961864406779662 8.539830508474576 0.012711864406779662 7.8228813559322035 0.012711864406779662 L 4.177118644067797 0.012711864406779662 C 3.458898305084746 0.012711864406779662 2.87542372881356 0.5961864406779662 2.87542372881356 1.314406779661017 L 2.87542372881356 2.3555084745762715 L 0.5326271186440679 2.3555084745762715 C 0.24661016949152548 2.3555084745762715 0.011440677966101768 2.589406779661017 0.011440677966101768 2.8766949152542374 C 0.011440677966101768 3.1627118644067798 0.2453389830508475 3.3978813559322036 0.5326271186440679 3.3978813559322036 L 11.466101694915254 3.3978813559322036 C 11.752118644067796 3.3978813559322036 11.98728813559322 3.163983050847458 11.98728813559322 2.8766949152542374 Z M 8.083474576271188 2.3555084745762715 L 3.917796610169492 2.3555084745762715 L 3.917796610169492 1.314406779661017 C 3.917796610169492 1.1707627118644068 4.034745762711864 1.053813559322034 4.1783898305084755 1.053813559322034 L 7.822881355932205 1.053813559322034 C 7.966525423728815 1.053813559322034 8.083474576271188 1.1707627118644068 8.083474576271188 1.314406779661017 L 8.083474576271188 2.3555084745762715 Z M 4.698305084745764 9.385169491525422 C 4.985593220338984 9.385169491525422 5.219491525423729 9.149999999999999 5.219491525423729 8.863983050847457 L 5.219491525423729 5.739406779661016 C 5.219491525423729 5.453389830508475 4.985593220338984 5.21822033898305 4.698305084745764 5.21822033898305 C 4.411016949152542 5.21822033898305 4.177118644067797 5.452118644067796 4.177118644067797 5.739406779661016 L 4.177118644067797 8.863983050847457 C 4.177118644067797 9.149999999999999 4.411016949152542 9.385169491525422 4.698305084745764 9.385169491525422 Z M 7.301694915254236 9.385169491525422 C 7.58771186440678 9.383898305084745 7.8228813559322035 9.149999999999999 7.8228813559322035 8.863983050847457 L 7.8228813559322035 5.739406779661016 C 7.8228813559322035 5.453389830508475 7.5889830508474585 5.21822033898305 7.301694915254236 5.21822033898305 C 7.015677966101695 5.21822033898305 6.780508474576271 5.452118644067796 6.780508474576271 5.739406779661016 L 6.780508474576271 8.863983050847457 C 6.780508474576271 9.149999999999999 7.014406779661017 9.385169491525422 7.301694915254236 9.385169491525422 Z " fill-rule="nonzero" fill="#d9001b" stroke="none" transform="matrix(1 0 0 1 347 469 )" />
</g>
</svg>

4
hx-ai-intelligent/src/icon/title.svg

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="3" height="13" viewBox="0 0 3 13" fill="none">
<rect x="0" y="0" width="3" height="13" rx="1" fill="#4388FB" >
</rect>
</svg>

After

Width:  |  Height:  |  Size: 220 B

2
hx-ai-intelligent/src/icon/xiazai.svg

@ -1 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1720430904326" class="icon" viewBox="0 0 1354 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3403" xmlns:xlink="http://www.w3.org/1999/xlink" width="21.15625" height="16"><path d="M1034.83248 645.406063l-191.508238 191.508238a53.622507 53.622507 0 0 1-75.964301 0l-191.508238-191.508238a53.622507 53.622507 0 0 1 0-75.964301 53.622507 53.622507 0 0 1 75.965301 0l102.775054 102.775054V303.884205a53.622507 53.622507 0 1 1 107.245014 0v368.332611l95.753119-102.775054a53.622507 53.622507 0 0 1 75.965301 0 53.622507 53.622507 0 0 1 1.276988 75.964301z m262.364587-175.548385a365.141641 365.141641 0 0 0-97.030108-98.94609 378.546518 378.546518 0 0 0-29.364729-123.202867 397.697341 397.697341 0 0 0-89.369178-127.671825 404.719277 404.719277 0 0 0-133.418773-91.28516A408.549242 408.549242 0 0 0 792.894706 0.026a400.251318 400.251318 0 0 0-225.977921 67.665377 410.464224 410.464224 0 0 0-97.669102 91.285161 261.088598 261.088598 0 0 0-63.836412-7.65993 247.044727 247.044727 0 0 0-176.18738 70.857348 245.129745 245.129745 0 0 0-72.134336 202.360139 324.925011 324.925011 0 0 0-84.263225 72.77333A308.965158 308.965158 0 0 0 0.053 702.22054a310.242146 310.242146 0 0 0 97.029107 228.531898 331.307952 331.307952 0 0 0 105.969025 69.58136 330.030964 330.030964 0 0 0 127.670826 23.619782h656.233963A360.034688 360.034688 0 0 0 1242.298572 919.261544a360.034688 360.034688 0 0 0 81.071254-116.181932 354.288741 354.288741 0 0 0 27.449748-138.523725 344.713829 344.713829 0 0 0-54.260501-194.699209z" fill="#5656FB" p-id="3404"></path></svg>
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1720430904326" class="icon" viewBox="0 0 1354 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3403" xmlns:xlink="http://www.w3.org/1999/xlink" width="21.15625" height="16"><path d="M1034.83248 645.406063l-191.508238 191.508238a53.622507 53.622507 0 0 1-75.964301 0l-191.508238-191.508238a53.622507 53.622507 0 0 1 0-75.964301 53.622507 53.622507 0 0 1 75.965301 0l102.775054 102.775054V303.884205a53.622507 53.622507 0 1 1 107.245014 0v368.332611l95.753119-102.775054a53.622507 53.622507 0 0 1 75.965301 0 53.622507 53.622507 0 0 1 1.276988 75.964301z m262.364587-175.548385a365.141641 365.141641 0 0 0-97.030108-98.94609 378.546518 378.546518 0 0 0-29.364729-123.202867 397.697341 397.697341 0 0 0-89.369178-127.671825 404.719277 404.719277 0 0 0-133.418773-91.28516A408.549242 408.549242 0 0 0 792.894706 0.026a400.251318 400.251318 0 0 0-225.977921 67.665377 410.464224 410.464224 0 0 0-97.669102 91.285161 261.088598 261.088598 0 0 0-63.836412-7.65993 247.044727 247.044727 0 0 0-176.18738 70.857348 245.129745 245.129745 0 0 0-72.134336 202.360139 324.925011 324.925011 0 0 0-84.263225 72.77333A308.965158 308.965158 0 0 0 0.053 702.22054a310.242146 310.242146 0 0 0 97.029107 228.531898 331.307952 331.307952 0 0 0 105.969025 69.58136 330.030964 330.030964 0 0 0 127.670826 23.619782h656.233963A360.034688 360.034688 0 0 0 1242.298572 919.261544a360.034688 360.034688 0 0 0 81.071254-116.181932 354.288741 354.288741 0 0 0 27.449748-138.523725 344.713829 344.713829 0 0 0-54.260501-194.699209z" fill="#16B187" p-id="3404"></path></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

3
hx-ai-intelligent/src/router/carbonEmissionManage.ts

@ -40,6 +40,9 @@ const equipment = {
meta: {
title: '碳排因子库',
keepAlive: false,
operates: [
{ title: '碳排因子库导入', code: 'carbonEmissionFactorLibraryImport' },
],
// backApi: [],
},
},

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

@ -119,6 +119,25 @@ const equipmentControl = {
},
],
},
{
path: 'planToAdd',
name: 'planToAdd',
meta: { title: '计划添加', hideChildren: true, icon: 'shebeiqunkong' },
component: Base,
redirect: { name: 'planToAddIndex' },
children: [
{
path: 'index',
name: 'planToAddIndex',
component: () => import('/@/view/equipmentControl/planToAdd/index.vue'),
meta: {
title: '计划添加',
keepAlive: false,
// backApi: [],
},
},
],
},
],
};
export default equipmentControl;

115
hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue

@ -39,7 +39,7 @@
><span style="color: rgba(0, 0, 0, 1); font-size: 16px; font-weight: 700">{{
item.title
}}</span>
<span style="margin-left: 6px; font-size: 13px"> 今日处理 / 总数</span>
<span style="margin-left: 6px; font-size: 12px"> 今日处理 / 总数</span>
</div>
</div>
</div>
@ -50,7 +50,7 @@
<div class="box-center-item-top">
<img style="display: flex; position: absolute; top: 5px" :src="priority" />
<div class="box-center-item-top-title">
<span style="font-size: 18px">优先级</span>
<span style="font-size: 20px">优先级</span>
</div>
<div
style="
@ -72,7 +72,7 @@
<div class="box-center-item-top">
<img style="display: flex; position: absolute; top: 5px" :src="priority" />
<div class="box-center-item-top-title">
<span style="font-size: 18px">处理进度</span>
<span style="font-size: 20px">处理进度</span>
</div>
<div
style="
@ -96,7 +96,7 @@
<div class="box-bottom-top">
<img style="display: flex; position: absolute; top: 5px" :src="priority" />
<div class="box-bottom-top-title">
<span style="font-size: 18px">处理进度</span>
<span style="font-size: 20px">处理进度</span>
</div>
<div class="box-bottom-top-unit"> ( 近30天 ) </div>
</div>
@ -136,26 +136,35 @@
const echartPieOne = ref(null);
const echartPieTow = ref(null);
const getGraphChart = async () => {
let dayData = [];
let dayData: any = [];
//
let energyAlarm = [];
let energyAlarm: any = [];
//
let wgAlarm = [];
let wgAlarm: any = [];
//
let equipmentAlarm = [];
let total = [];
let equipmentAlarm: any = [];
let total: any = [];
await http
.post(alarmOverviewApi.getAlarmTrend, {
orgId: orgId.value,
})
.then((res) => {
if (res.msg === 'success') {
res.data.forEach((item: any, index) => {
//
const data = res.data.sort((a: any, b: any) => {
// dayData
const dateA: any = new Date(a.createTime);
const dateB: any = new Date(b.createTime);
//
return dateA - dateB;
});
data.forEach((item: any) => {
energyAlarm.push(item.alarmEnergyConsumptionNum);
wgAlarm.push(item.alarmGatewayNum);
equipmentAlarm.push(item.alarmEquipmentNum);
total.push(0);
dayData.push(item.createTime);
item.createTime = item.createTime.substring(5, 10);
dayData.push(item.createTime.replace('-', '/'));
});
}
});
@ -180,7 +189,7 @@
axisPointer: {
type: 'shadow',
},
formatter: function (params) {
formatter: function (params: any) {
let res =
params[0].axisValue +
'<br/>' +
@ -217,11 +226,13 @@
left: 'right', //
textStyle: {
color: 'rgb(89, 89, 89)',
fontSize: '14',
fontSize: 14,
fontWeight: 'normal',
}, //
data: ['设备告警', '网关告警', '能源告警'],
itemGap: 30, //
itemWidth: 16, //
itemHeight: 16, //
},
],
calculable: true,
@ -238,14 +249,24 @@
show: false,
},
data: dayData,
axisLabel: {
show: true, //
// interval: 1, //
// rotate: 45, //
},
},
],
yAxis: [
{
type: 'value',
shwo: false,
show: true,
splitLine: {
show: true,
lineStyle: {
color: '#dae7ff', // 线
width: 1, // 线
type: 'dashed', // 线 'solid''dashed' 'dotted'
},
},
axisLine: {
show: false,
@ -257,17 +278,49 @@
show: false,
},
axisLabel: {
show: false, //
show: true, //
},
},
],
//
dataZoom: [
{
height: 12,
type: 'inside',
start: 0,
end: 100,
handleSize: '300%', //
bottom: 15,
},
{
type: 'slider',
// backgroundColor: 'yellow',
// fillerColor: 'yellow',
height: 12, // slider15
start: 0,
end: 100,
right: 60,
left: 60,
bottom: 10,
handleIcon:
'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5M36.9,35.8h-1.3z M27.8,35.8 h-1.3H27L27.8,35.8L27.8,35.8z', // 使 axisPointer
handleSize: '140%', //
// borderColor: 'none',
handleStyle: {
// color: 'red',
// shadowBlur: 6,
// shadowColor: 'yellow',
shadowOffsetX: 0, // x
shadowOffsetY: 0, // y
},
// label
// 20050101 2005\n0101
// labelFormatter: function (index, value) {
// const year = value.slice(0, 4);
// const date = value.slice(4);
// return year + '\n' + date;
// },
// textStyle: {
// fontStyle: 'italic', //
// },
// showDataShadow: false, //
},
],
series: [
@ -330,7 +383,7 @@
color: '#000000',
position: 'top',
top: '10',
formatter: function (value) {
formatter: function (value: any) {
return (
Number(energyAlarm[value.dataIndex]) +
Number(wgAlarm[value.dataIndex]) +
@ -404,7 +457,7 @@
// icon: 'circle',
itemWidth: 16,
itemHeight: 16,
itemGap: 16,
itemGap: 30,
textStyle: {
fontSize: 14,
},
@ -426,8 +479,9 @@
fontSize: 14,
fontWeight: 'bold',
},
formatter: function (parms) {
return '[ ' + parms.data.name + ' ] : ' + parms.data.value;
formatter: function (parms: any) {
// return '[ ' + parms.data.name + ' ] : ' + parms.data.value;
return parms.data.name + ' : ' + parms.data.value;
},
},
// emphasis: {
@ -516,7 +570,7 @@
orient: 'vertical',
itemWidth: 16,
itemHeight: 16,
itemGap: 16,
itemGap: 30,
textStyle: {
fontSize: 14,
},
@ -538,8 +592,9 @@
fontSize: 14,
fontWeight: 'bold',
},
formatter: function (parms) {
return '[ ' + parms.data.name + ' ] : ' + parms.data.value;
formatter: function (parms: any) {
// return '[ ' + parms.data.name + ' ] : ' + parms.data.value;
return parms.data.name + ' : ' + parms.data.value;
},
},
},
@ -611,7 +666,7 @@
// border: 1px solid red;
display: flex;
flex-direction: column;
gap: 12px;
gap: 20px;
background-color: #f0f1f4;
box-sizing: border-box;
.box-top {
@ -620,11 +675,11 @@
height: 100%;
display: flex;
flex-direction: row;
gap: 12px;
gap: 20px;
.box-top-item {
height: 100%;
flex: 1;
gap: 12px;
gap: 20px;
background-color: white;
border-radius: 4px;
.item-box {
@ -652,7 +707,7 @@
}
.iem-box-left-number {
color: #000000;
font-weight: 700;
font-weight: 400;
font-family: 'Arial Negreta', 'Arial Normal', 'Arial', sans-serif;
font-style: normal;
font-size: 30px;
@ -669,7 +724,7 @@
flex: 4;
width: 100%;
display: flex;
gap: 12px;
gap: 20px;
.box-center-item {
flex: 1;
height: 100%;

24
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue

@ -145,8 +145,8 @@
return data.list.length === 0;
},
handle: (data: any) => {
let ids = [];
data.list.forEach((item) => {
let ids: any = [];
data.list.forEach((item: any) => {
ids.push(item.id);
});
data.list = [];
@ -167,6 +167,7 @@
customRender: (text: any) => {
return text.index + 1;
},
width: 80,
},
{
title: '规则id',
@ -179,6 +180,7 @@
{
title: '对比类型',
dataIndex: 'comparisonType',
width: 180,
},
{
title: '告警点位',
@ -196,11 +198,16 @@
{
title: '启用状态',
dataIndex: 'enableRules',
width: 120,
},
],
// rowSelection: null,
scroll: { x: 2500 },
columnActions: {
title: '操作',
width: 200,
fixed: 'right',
dataIndex: 'tableAction',
actions: [
{
label: '编辑',
@ -318,24 +325,25 @@
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.grey-background.ant-switch {
background-color: grey !important;
background-color: rgba(238, 238, 238, 1) !important;
}
.blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
}
.grey-background.ant-switch .ant-switch-handle {
background-color: grey !important;
background-color: rgba(238, 238, 238, 1) !important;
}
</style>
../../../../api/alarmManagement/alarmSettings/energyAlarm

39
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue

@ -1,13 +1,16 @@
<template>
<ns-drawer
v-model:visible="visible"
width="520"
:title="infoObject?.id ? '编辑告警规则' : '新增告警规则'"
width="562px"
:title="' '"
:footer-style="{ textAlign: 'right' }"
:ok="btnClick"
:cancel="handleClose"
@close="handleClose"
placement="right">
<div class="ns-title-extra-box title">
<span style="margin-left: 6px">{{ infoObject?.id ? '编辑' : '新增' }}</span>
</div>
<div style="padding: 18px; width: 100%; overflow: hidden">
<a-form ref="formRef" :model="infoObject" :rules="rules">
<a-form-item ref="site" label="站点" name="site">
@ -104,9 +107,7 @@
<div
style="width: 70px; align-items: center; cursor: pointer"
@click="deleteAlarmList(index - 1)">
<img
style="width: 14px; margin: 0 12px"
src="https://files.axshare.com/gsc/4T0UQR/5a/e6/81/5ae6813d499c422383c7a15dd956523f/images/设备规则/u72.svg?pageId=cbce6e61-bc6a-4283-802d-993fce6151c0" />
<img style="width: 14px; margin: 0 12px" src="../../../../../src/icon/del.svg" />
</div>
</div>
<div
@ -356,7 +357,6 @@
site: [{ required: true, message: '请选择站点', trigger: 'change' }],
dataSources: [{ required: true, message: '请选择设备类型', trigger: 'change' }],
deviceNode: [{ required: true, message: '请选择设备名称', trigger: 'change' }],
sbAdress: [{ required: true, message: '请选择设备点位', trigger: 'change' }],
comparisonType: [{ required: true, message: '请选择对比类型', trigger: 'change' }],
ruleType: [{ required: true, message: '请选择规则类型', trigger: 'change' }],
abnormalDescription: [
@ -480,33 +480,46 @@
display: flex;
justify-content: space-between;
}
.title {
width: 200px;
height: 22px;
opacity: 1;
/** 文本1 */
font-size: 16px;
font-weight: 700;
letter-spacing: 0px;
line-height: 21px;
color: rgba(51, 51, 51, 1);
margin-left: 24px;
}
.blue-background.ant-switch-checked {
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.grey-background.ant-switch {
background-color: grey !important;
background-color: rgba(238, 238, 238, 1) !important;
}
.blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
}
.grey-background.ant-switch .ant-switch-handle {
background-color: grey !important;
background-color: rgba(238, 238, 238, 1) !important;
}
:deep(.ant-form-item-label) {
z-index: 20;
text-align: right;
width: 23%;
width: 20%;
}
</style>
../../../../api/alarmManagement/alarmSettings/energyAlarm

70
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue

@ -1,13 +1,16 @@
<template>
<ns-drawer
v-model:visible="visible"
width="520"
width="562px"
:title="' '"
:footer-style="{ textAlign: 'right' }"
:ok="btnClick"
:cancel="handleClose"
placement="right"
@close="handleClose">
<div class="ns-title-extra-box title">
<span style="margin-left: 6px">{{ infoObject?.id ? '编辑' : '新增' }}</span>
</div>
<a-form ref="formRef" :model="infoObject" :rules="rules">
<a-form-item name="alarmTitle" label="告警标题">
<ns-input allowClear v-model:value="infoObject.alarmTitle" placeholder="请输入告警标题" />
@ -24,7 +27,10 @@
<a-form-item v-if="infoObject.alarmFrequency === 2" name="repetitions" label="重复次数">
<ns-input-number v-model:value="infoObject.repetitions" placeholder="请输入重复次数" />
</a-form-item>
<a-form-item v-if="infoObject.alarmFrequency === 2" name="intervalDuration" label="间隔时长">
<a-form-item
v-if="infoObject.alarmFrequency === 2 || infoObject.alarmFrequency === 3"
name="intervalDuration"
label="间隔时长">
<ns-input-number
style="width: 100%"
v-model:value="infoObject.intervalDuration"
@ -45,7 +51,8 @@
placeholder="请选择优先级"
style="width: 100%"
allowClear
:options="PriorityEnum" />
:options="PriorityEnum"
@change="handleChangePriority" />
</a-form-item>
<a-form-item label="监测频率" name="monitorFrequency">
<a-select
@ -66,7 +73,9 @@
@change="changeSwitch" />
</a-form-item>
<a-form-item label="是否创建工单" name="createWorkOrder">
<a-radio-group v-model:value="infoObject.createWorkOrder">
<a-radio-group
v-model:value="infoObject.createWorkOrder"
:disabled="infoObject.priority === 1">
<a-radio value="1"> </a-radio>
<a-radio value="0"> </a-radio>
</a-radio-group>
@ -84,9 +93,12 @@
const visible = ref(false);
//
const handleChangeAlarmFrequency = () => {
if (infoObject.value.alarmFrequency === 2 && !infoObject.value.intervalDurationUnit) {
if (infoObject.value.alarmFrequency !== 1 && !infoObject.value.intervalDurationUnit) {
infoObject.value.intervalDurationUnit = 1;
}
if (infoObject.value.alarmFrequency === 3) {
infoObject.value.repetitions = null;
}
};
//id
const orgId = ref('');
@ -206,6 +218,12 @@
break;
}
};
//
const handleChangePriority = () => {
if (infoObject.value.priority === 1) {
infoObject.value.createWorkOrder = '1';
}
};
const btnClick = () => {
//
formRef.value.validate().then(() => {
@ -214,7 +232,7 @@
data.orgId = orgId.value;
}
data.createWorkOrder = Number(data.createWorkOrder);
if (data.alarmFrequency !== 2) {
if (data.alarmFrequency === 1) {
data.repetitions = null;
data.intervalDuration = null;
data.intervalDurationUnit = null;
@ -256,33 +274,61 @@
display: flex;
justify-content: space-between;
}
.title {
width: 200px;
height: 22px;
opacity: 1;
/** 文本1 */
font-size: 16px;
font-weight: 700;
letter-spacing: 0px;
line-height: 21px;
color: rgba(51, 51, 51, 1);
margin-bottom: 24px;
margin-left: 24px;
}
.blue-background.ant-switch-checked {
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.grey-background.ant-switch {
background-color: grey !important;
background-color: rgba(238, 238, 238, 1) !important;
}
.blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
}
.grey-background.ant-switch .ant-switch-handle {
background-color: grey !important;
background-color: rgba(238, 238, 238, 1) !important;
}
:deep(.ant-form-item-label) {
z-index: 20;
text-align: right;
width: 23%;
}
//
:deep(.ant-radio-disabled .ant-radio-inner::after) {
background-color: #2778ff !important;
border-color: #2778ff !important;
}
:deep(.ant-radio-checked .ant-radio-inner) {
border-color: #2778ff !important;
}
:deep(.ant-radio-inner) {
background-color: white !important;
}
:deep(.ant-radio-disabled + span) {
color: rgba(51, 51, 51, 1);
}
</style>
../../../../api/alarmManagement/alarmSettings/energyAlarm

25
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue

@ -123,8 +123,8 @@
return data.list.length === 0;
},
handle: (data: any) => {
let ids = [];
data.list.forEach((item) => {
let ids: any = [];
data.list.forEach((item: any) => {
ids.push(item.id);
});
data.list = [];
@ -145,6 +145,7 @@
customRender: (text: any) => {
return text.index + 1;
},
width: 80,
},
{
title: '规则id',
@ -157,6 +158,7 @@
{
title: '告警点位',
dataIndex: 'devicePointName',
width: 120,
},
{
title: '判断条件',
@ -165,6 +167,7 @@
{
title: '取值类型',
dataIndex: 'valueType',
width: 140,
},
{
title: '异常描述',
@ -173,11 +176,16 @@
{
title: '启用状态',
dataIndex: 'enableRules',
width: 120,
},
],
// rowSelection: null,
scroll: { x: 2500 },
columnActions: {
title: '操作',
width: 200,
fixed: 'right',
dataIndex: 'tableAction',
actions: [
{
label: '编辑',
@ -304,24 +312,25 @@
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.grey-background.ant-switch {
background-color: grey !important;
background-color: rgba(238, 238, 238, 1) !important;
}
.blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
}
.grey-background.ant-switch .ant-switch-handle {
background-color: grey !important;
background-color: rgba(238, 238, 238, 1) !important;
}
</style>
../../../../api/alarmManagement/alarmSettings/deviceAlarms

42
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue

@ -1,14 +1,17 @@
<template>
<ns-drawer
v-model:visible="visible"
width="520"
:title="infoObject?.id ? '编辑告警规则' : '新增告警规则'"
width="562px"
:title="' '"
:footer-style="{ textAlign: 'right' }"
:ok="btnClick"
:cancel="handleClose"
placement="right"
@close="handleClose">
<div style="padding: 18px; width: 100%; overflow: hidden">
<div style="padding: 12px; width: 100%; overflow: hidden">
<div class="ns-title-extra-box title">
<span style="margin-left: 6px">{{ infoObject?.id ? '编辑' : '新增' }}</span>
</div>
<a-form ref="formRef" :model="infoObject" :rules="rules">
<a-form-item ref="site" label="站点" name="site">
<a-tree-select
@ -123,9 +126,7 @@
<div
style="width: 70px; align-items: center; cursor: pointer"
@click="deleteAlarmList(index - 1)">
<img
style="width: 14px; margin: 0 12px"
src="https://files.axshare.com/gsc/4T0UQR/5a/e6/81/5ae6813d499c422383c7a15dd956523f/images/设备规则/u72.svg?pageId=cbce6e61-bc6a-4283-802d-993fce6151c0" />
<img style="width: 14px; margin: 0 12px" src="../../../../../src/icon/del.svg" />
</div>
</div>
<div
@ -504,33 +505,48 @@
display: flex;
justify-content: space-between;
}
.title {
width: 200px;
height: 22px;
opacity: 1;
/** 文本1 */
font-size: 16px;
font-weight: 700;
letter-spacing: 0px;
line-height: 21px;
color: rgba(51, 51, 51, 1);
margin-bottom: 24px;
margin-left: 24px;
}
.blue-background.ant-switch-checked {
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.grey-background.ant-switch {
background-color: grey !important;
background-color: rgba(238, 238, 238, 1) !important;
}
.blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
}
.grey-background.ant-switch .ant-switch-handle {
background-color: grey !important;
background-color: rgba(238, 238, 238, 1) !important;
}
:deep(.ant-form-item-label) {
z-index: 20;
text-align: right;
width: 23%;
width: 20%;
position: relative;
}
</style>
../../../../api/alarmManagement/alarmSettings/deviceAlarms

140
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue

@ -1,31 +1,20 @@
<template>
<ns-drawer
v-model:visible="visible"
width="520"
:title="infoObject?.id ? '编辑告警' : '新增告警'"
width="562px"
:title="' '"
:footer-style="{ textAlign: 'right' }"
:ok="btnClick"
:cancel="handleClose"
placement="right"
@close="handleClose">
<div class="ns-title-extra-box title">
<span style="margin-left: 6px">{{ infoObject?.id ? '编辑' : '新增' }}</span>
</div>
<a-form ref="formRef" :model="infoObject" :rules="rules">
<a-form-item name="alarmTitle" label="告警标题">
<ns-input allowClear v-model:value="infoObject.alarmTitle" placeholder="请输入告警标题" />
</a-form-item>
<a-form-item name="monitorTime" label="监测时长">
<ns-input-number
allowClear
v-model:value="infoObject.monitorTime"
placeholder="请输入监测时长" />
</a-form-item>
<a-form-item label="监测时长单位" name="monitorTimeUnit">
<a-select
v-model:value="infoObject.monitorTimeUnit"
placeholder="请选择监测时长单位"
style="width: 100%"
allowClear
:options="MonitorTimeUnitEnum" />
</a-form-item>
<a-form-item label="告警频率" name="alarmFrequency">
<a-select
v-model:value="infoObject.alarmFrequency"
@ -38,7 +27,10 @@
<a-form-item v-if="infoObject.alarmFrequency === 2" name="repetitions" label="重复次数">
<ns-input-number v-model:value="infoObject.repetitions" placeholder="请输入重复次数" />
</a-form-item>
<a-form-item v-if="infoObject.alarmFrequency === 2" name="intervalDuration" label="间隔时长">
<a-form-item
v-if="infoObject.alarmFrequency === 2 || infoObject.alarmFrequency === 3"
name="intervalDuration"
label="间隔时长">
<ns-input-number
style="width: 100%"
v-model:value="infoObject.intervalDuration"
@ -53,13 +45,38 @@
</template>
</ns-input-number>
</a-form-item>
<a-form-item name="monitorTime" label="监测时长">
<ns-input-number
allowClear
style="width: 100%"
v-model:value="infoObject.monitorTime"
placeholder="请输入监测时长">
<template #addonAfter>
<a-select
v-model:value="infoObject.monitorTimeUnit"
placeholder="请选择监测时长单位"
style="width: 80px"
allowClear
:options="MonitorTimeUnitEnum" />
</template>
</ns-input-number>
</a-form-item>
<!-- <a-form-item label="监测时长单位" name="monitorTimeUnit">
<a-select
v-model:value="infoObject.monitorTimeUnit"
placeholder="请选择监测时长单位"
style="width: 100%"
allowClear
:options="MonitorTimeUnitEnum" />
</a-form-item> -->
<a-form-item label="优先级" name="priority">
<a-select
v-model:value="infoObject.priority"
placeholder="请选择优先级"
style="width: 100%"
allowClear
:options="PriorityEnum" />
:options="PriorityEnum"
@change="handleChangePriority" />
</a-form-item>
<a-form-item label="启用规则">
<a-switch
@ -72,7 +89,9 @@
@change="changeSwitch" />
</a-form-item>
<a-form-item label="是否创建工单" name="createWorkOrder">
<a-radio-group v-model:value="infoObject.createWorkOrder">
<a-radio-group
v-model:value="infoObject.createWorkOrder"
:disabled="infoObject.priority === 1">
<a-radio value="1"> </a-radio>
<a-radio value="0"> </a-radio>
</a-radio-group>
@ -98,7 +117,7 @@
alarmTitle: null,
alarmFrequency: null,
monitorTime: null,
monitorTimeUnit: null,
monitorTimeUnit: 2,
priority: null,
createWorkOrder: null,
intervalDurationUnit: null,
@ -138,7 +157,7 @@
alarmTitle: null,
alarmFrequency: null,
monitorTime: null,
monitorTimeUnit: null,
monitorTimeUnit: 2,
priority: null,
createWorkOrder: null,
intervalDurationUnit: null,
@ -151,9 +170,17 @@
};
//
const handleChangeAlarmFrequency = () => {
if (infoObject.value.alarmFrequency === 2 && !infoObject.value.intervalDurationUnit) {
if (
(infoObject.value.alarmFrequency === 2 || infoObject.value.alarmFrequency === 3) &&
!infoObject.value.intervalDurationUnit
) {
infoObject.value.intervalDurationUnit = 1;
}
console.log(infoObject.value.alarmFrequency);
if (infoObject.value.alarmFrequency === 3) {
infoObject.value.repetitions = null;
}
};
//
const rules = {
@ -177,7 +204,11 @@
required: true,
trigger: 'change',
validator: (rules: any, monitorTime: any, cbfn: any) => {
if (Number.isInteger(monitorTime) && monitorTime > 0) {
if (
Number.isInteger(monitorTime) &&
monitorTime > 0 &&
infoObject.value.monitorTimeUnit
) {
cbfn();
} else {
cbfn('请输入正确的监测时长');
@ -217,7 +248,7 @@
],
createWorkOrder: [{ required: true, message: '请选择是否创建工单', trigger: 'change' }],
priority: [{ required: true, message: '请选择优先级', trigger: 'change' }],
monitorTimeUnit: [{ required: true, message: '请选择监测时长单位', trigger: 'change' }],
// monitorTimeUnit: [{ required: true, message: '', trigger: 'change' }],
};
//
const changeSwitch = () => {
@ -230,11 +261,17 @@
break;
}
};
//
const handleChangePriority = () => {
if (infoObject.value.priority === 1) {
infoObject.value.createWorkOrder = '1';
}
};
const btnClick = () => {
//
formRef.value.validate().then(() => {
// * <=
if (infoObject.value.alarmFrequency === 2) {
// * <= 1
if (infoObject.value.alarmFrequency === 2 || infoObject.value.alarmFrequency === 3) {
//
let monitorTime = 0;
switch (infoObject.value.monitorTimeUnit) {
@ -253,18 +290,22 @@
switch (infoObject.value.intervalDurationUnit) {
case 1:
intervalTime =
Number(infoObject.value.intervalDuration) * 1 * Number(infoObject.value.repetitions);
Number(infoObject.value.intervalDuration) *
1 *
Number(infoObject.value.repetitions ? infoObject.value.repetitions : 1);
break;
case 2:
intervalTime =
Number(infoObject.value.intervalDuration) * 60 * Number(infoObject.value.repetitions);
Number(infoObject.value.intervalDuration) *
60 *
Number(infoObject.value.repetitions ? infoObject.value.repetitions : 1);
break;
case 3:
intervalTime =
Number(infoObject.value.intervalDuration) *
60 *
24 *
Number(infoObject.value.repetitions);
Number(infoObject.value.repetitions ? infoObject.value.repetitions : 1);
break;
}
if (intervalTime > monitorTime) {
@ -280,11 +321,13 @@
//
let data = { ...infoObject.value };
data.createWorkOrder = Number(data.createWorkOrder);
if (data.alarmFrequency !== 2) {
if (data.alarmFrequency === 1) {
data.repetitions = null;
data.intervalDuration = null;
data.intervalDurationUnit = null;
}
console.log(data, '数据');
if (!data.orgId) {
data.orgId = orgId.value;
}
@ -316,32 +359,61 @@
display: flex;
justify-content: space-between;
}
.title {
width: 200px;
height: 22px;
opacity: 1;
/** 文本1 */
font-size: 16px;
font-weight: 700;
letter-spacing: 0px;
line-height: 21px;
color: rgba(51, 51, 51, 1);
margin-bottom: 24px;
margin-left: 24px;
}
.blue-background.ant-switch-checked {
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.grey-background.ant-switch {
background-color: grey !important;
background-color: rgba(238, 238, 238, 1) !important;
}
.blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.grey-background.ant-switch .ant-switch-handle {
background-color: grey !important;
background-color: alarmSettings !important;
}
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
}
:deep(.ant-form-item-label) {
z-index: 20;
text-align: right;
width: 23%;
}
//
:deep(.ant-radio-disabled .ant-radio-inner::after) {
background-color: #2778ff !important;
}
:deep(.ant-radio-checked .ant-radio-inner) {
border-color: #2778ff !important;
}
:deep(.ant-radio-inner) {
background-color: white !important;
}
:deep(.ant-radio-disabled + span) {
color: rgba(51, 51, 51, 1);
}
</style>

21
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue

@ -64,7 +64,8 @@
</template>
<template v-if="column.dataIndex === 'interval'">
{{
record.intervalDuration && record.alarmFrequency.value === 2
record.intervalDuration &&
(record.alarmFrequency.value === 2 || record.alarmFrequency.value === 3)
? record.intervalDuration + '' + record.intervalDurationUnit.label
: '-'
}}
@ -117,7 +118,7 @@
</template>
<template v-if="column.dataIndex === 'interval'">
{{
record.intervalDuration && record.alarmFrequency.value === 2
record.intervalDuration && record.alarmFrequency.value !== 1
? record.intervalDuration + '' + record.intervalDurationUnit.label
: '-'
}}
@ -180,10 +181,10 @@
//
const getNotificationMethod = (data: any) => {
if (!data) return '';
const methods = [];
const methods: any = [];
const notifications = data.split(',');
notifications.forEach((notification) => {
notifications.forEach((notification: any) => {
if (notification === '1') {
methods.push('站内信息');
} else if (notification === '2') {
@ -326,23 +327,25 @@
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.grey-background.ant-switch {
background-color: grey !important;
background-color: rgba(238, 238, 238, 1) !important;
}
.blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
}
.grey-background.ant-switch .ant-switch-handle {
background-color: grey !important;
background-color: rgba(238, 238, 238, 1) !important;
}
</style>

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

@ -1,14 +1,30 @@
<template>
<ns-drawer
v-model:visible="visible"
width="600"
:title="'设置通知联系人'"
width="562px"
:title="' '"
:ok="btnClick"
:cancel="handleClose"
placement="right"
:footer-style="{ textAlign: 'right' }"
@close="handleClose">
<div style="width: 100%; overflow: hidden; overflow-y: hidden; height: 100%">
<div
class="ns-title-extra-box"
style="
width: 100%;
height: 22px;
opacity: 1;
/** 文本1 */
font-size: 16px;
font-weight: 700;
letter-spacing: 0px;
line-height: 21px;
color: rgba(51, 51, 51, 1);
margin-bottom: 24px;
">
<span style="margin-left: 6px">设置通知联系人</span>
</div>
<a-form ref="formRef" :model="infoObject" :rules="rules" style="width: 80%">
<a-form-item ref="notificationMethod" label="通知方式" name="notificationMethod">
<a-select
@ -34,21 +50,33 @@
</a-form-item>
</a-form>
<div style="width: 100%; height: 765px; overflow-y: auto">
<div style="margin-bottom: 8px">
<div style="width: 100%; display: flex; position: relative" class="ns-title-extra-box">
<span style="margin-left: 12px; color: #333333">联系人名单</span>
<div style="margin-bottom: 8px; width: 100%; display: flex">
<div
style="
width: auto;
height: 30px;
opacity: 1;
/** 文本1 */
font-size: 16px;
font-weight: 700;
letter-spacing: 0px;
line-height: 30px;
color: rgba(51, 51, 51, 1);
">
联系人名单
</div>
<div style="margin-bottom: 16px; margin-left: 12px">
<a-button
style="color: rgba(67, 136, 251, 1); border: 1px solid rgba(67, 136, 251, 1)"
@click="chengUser"
>选择联系人
</a-button>
</div>
<img
style="width: 100%; margin-top: -10px"
src="https://files.axshare.com/gsc/4T0UQR/7e/5d/a2/7e5da2a277344db8af30521cefeb70cc/images/告警设置/u150.svg?pageId=1f58c1ba-b461-4fe8-a2b3-295f1e7b0aa0" />
</div>
<div style="margin-bottom: 16px">
<a-button type="primary" @click="chengUser">选择联系人 </a-button>
</div>
<a-table
:dataSource="dataSource"
:columns="columns"
:scroll="{ x: 800, y: 700 }"
:scroll="{ x: 1000, y: 700 }"
:pagination="pagination">
<template #bodyCell="{ record, column }">
<template v-if="column.dataIndex === 'address'">
@ -90,9 +118,10 @@
{
title: '姓名',
dataIndex: 'realName',
width: 80,
width: 100,
fixed: 'left',
key: 'deviceName',
ellipsis: true,
},
{
title: '性别',
@ -109,7 +138,6 @@
title: '部门',
dataIndex: 'address',
key: 'address',
width: 200,
textEllipsis: true,
},
{
@ -135,15 +163,14 @@
showQuickJumper: true,
showLessItems: true,
// showSizeChanger: true, //
showTotal: (total: number, range: any) =>
total && range ? `显示第${range[0]}${range[1]}条记录,共 ${total} 条记录` : '',
showTotal: (total: number, range: any) => (total && range ? '' : ''),
onChange: handleChangePage,
});
//
const chengUser = () => {
visibleModel.value = true;
let ids = [];
dataSource.value.forEach((item) => {
let ids: any = [];
dataSource.value.forEach((item: any) => {
ids.push(item.userId);
});
//
@ -286,29 +313,38 @@
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.grey-background.ant-switch {
background-color: grey !important;
background-color: rgba(238, 238, 238, 1) !important;
}
.blue-background.ant-switch-checked .ant-switch-handle {
background-color: linear-gradient(
180deg,
rgba(1, 206, 255, 1) 0%,
rgba(0, 150, 229, 1) 100%
rgba(57, 215, 187, 1) 100%
) !important;
}
.ant-switch-checked {
background-color: rgba(57, 215, 187, 1) !important;
}
.grey-background.ant-switch .ant-switch-handle {
background-color: grey !important;
background-color: rgba(238, 238, 238, 1) !important;
}
:deep(.ant-form-item-label) {
z-index: 20;
text-align: left;
width: 20%;
}
:deep(.ant-pagination-prev) {
border: 1px solid rgba(207, 212, 219, 1) !important;
margin-right: 6px !important;
}
:deep(.ant-pagination-next) {
border: 1px solid rgba(207, 212, 219, 1) !important;
margin-left: 6px !important;
}
</style>
../../../../api/alarmManagement/alarmSettings/notificationManagements

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

@ -2,26 +2,18 @@
<ns-modal
v-model:visible="show"
width="1100px"
style="overflow-y: hidden"
title="添加联系人"
class="ns-modal-boxs"
@ok="handleOk"
@cancel="handleCancel">
<div class="ns-title-extra-box" style="position: absolute; top: 28px"></div>
<div class="box">
<div class="box-left">
<div style="width: 100%; display: flex; position: relative" class="ns-title-extra-box">
<span style="margin-left: 12px; color: #333333">联系人名单</span>
</div>
<img
style="width: 100%; height: 2px"
src="https://files.axshare.com/gsc/4T0UQR/7e/5d/a2/7e5da2a277344db8af30521cefeb70cc/images/告警设置/u150.svg?pageId=1f58c1ba-b461-4fe8-a2b3-295f1e7b0aa0" />
<a-input-search
<a-input
v-model:value="searchValue"
style="margin-bottom: 8px"
style="margin-bottom: 8px; width: 194px"
placeholder="请输入关键字" />
<img
style="width: 100%; height: 2px"
src="https://files.axshare.com/gsc/4T0UQR/7e/5d/a2/7e5da2a277344db8af30521cefeb70cc/images/告警设置/u150.svg?pageId=1f58c1ba-b461-4fe8-a2b3-295f1e7b0aa0" />
<div style="width: 100%; height: 370px; overflow-y: auto">
<div style="width: 100%; height: 420px; overflow-y: auto">
<a-tree
v-model:selectedKeys="selectedKeys"
v-model:expandedKeys="expandedKeys"
@ -30,19 +22,19 @@
/></div>
</div>
<div class="box-right">
<div style="width: 100%; display: flex; position: relative" class="ns-title-extra-box">
<span style="margin-left: 12px; color: #333333">人员列表 </span>
<div style="width: 100%; display: flex; position: relative">
<span style="color: rgba(51, 51, 51, 1); font-size: 16px; font-weight: 700"
>人员列表
</span>
<a-input-search
v-model:value="realName"
style="margin-bottom: 8px; width: 280px; position: absolute; right: 20px"
placeholder="请输入"
style="margin-bottom: 2px; width: 210px; margin-left: 12px"
placeholder="请输入关键字"
allowClear="true"
@search="onSearch" />
@search="onSearch"
@pressEnter="onSearch" />
</div>
<img
style="width: 100%; height: 2px"
src="https://files.axshare.com/gsc/4T0UQR/7e/5d/a2/7e5da2a277344db8af30521cefeb70cc/images/告警设置/u150.svg?pageId=1f58c1ba-b461-4fe8-a2b3-295f1e7b0aa0" />
<div style="width: 100%; height: 450px; overflow-y: auto; padding: 12px 0">
<div style="width: 100%; height: 455px; overflow-y: hidden; padding: 12px 0">
<a-table
:row-selection="{
selectedRowKeys: selectedRowKey,
@ -55,6 +47,7 @@
:rowKey="(record: any) => record.userId"
:pagination="pagination"
:bordered="true"
:scroll="{ x: 1000, y: 355 }"
:size="'middle'">
<template #bodyCell="{ record, column }">
<template v-if="column.dataIndex === 'address'">
@ -151,8 +144,8 @@
getList();
};
//
const processDepartmentTree = (tree) => {
tree.forEach((item) => {
const processDepartmentTree = (tree: any) => {
tree.forEach((item: any) => {
item.deptInfo = item.deptInfo;
item.key = item.deptInfo.deptId;
item.title = item.deptInfo.deptName;
@ -162,9 +155,9 @@
};
//
const getDepartList = (params) => {
const getDepartList = (params: any) => {
return http.post(department.queryDeptTree, params).then((res) => {
const result = res.data.map((item) => ({
const result = res.data.map((item: any) => ({
key: item.orgInfo.orgId,
orgInfo: item.orgInfo,
title: item.orgInfo.orgName,
@ -214,15 +207,14 @@
showQuickJumper: true,
showLessItems: true,
// showSizeChanger: true,
showTotal: (total: number, range: any) =>
total && range ? `显示第${range[0]}${range[1]}条记录,共 ${total} 条记录` : '',
showTotal: (total: number, range: any) => (total && range ? '' : ''),
onChange: handleChangePage,
});
const onSelectChange = (selectedRowKeys: any, selectedRows: any) => {
selectedRowKey.value = selectedRowKeys;
// 使 forEach selectedRows
let newSelectRows = [];
selectedRows.forEach((item, index) => {
let newSelectRows: any = [];
selectedRows.forEach((item: any) => {
if (item) {
newSelectRows.push(item);
}
@ -244,21 +236,28 @@
{
title: '序号',
dataIndex: 'index',
width: 80,
customRender: (text: any) => {
return text.index + 1;
},
fixed: 'left',
},
{
title: '姓名',
dataIndex: 'realName',
width: 120,
ellipsis: true,
fixed: 'left',
},
{
title: '性别',
dataIndex: 'sex',
width: 80,
},
{
title: '组织关系',
dataIndex: 'orgName',
width: 220,
},
{
title: '部门 ',
@ -342,22 +341,44 @@
},
});
</script>
<style scoped lang="less">
<style lang="less">
.ns-modal-boxs {
overflow-y: hidden;
position: relative;
height: 650px;
.ant-modal-title {
font-size: 16px !important;
font-weight: 700 !important;
letter-spacing: 0 !important;
line-height: 24px !important;
color: rgba(51, 51, 51, 1) !important;
margin: 0 16px !important;
}
.ant-pagination-prev {
border: 1px solid rgba(207, 212, 219, 1) !important;
margin-right: 6px !important;
}
.ant-pagination-next {
border: 1px solid rgba(207, 212, 219, 1) !important;
margin-left: 6px !important;
}
}
.box {
width: 100%;
height: 500px;
height: 490px;
display: flex;
overflow: hidden;
.box-left {
width: 300px;
height: 100%;
overflow-y: auto;
padding: 0, 12px;
border: 1px solid rgba(235, 238, 245, 1);
padding: 16px;
width: 226px;
height: 490px;
gap: 5px;
}
.box-right {
width: calc(100% - 200px);
width: calc(100% - 226px);
height: 100%;
padding: 0 12px;
padding: 0 20px;
overflow-y: auto;
}
}

17
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts

@ -14,10 +14,12 @@ const tableKeyMap = [
customRender: (text: any) => {
return text.index + 1;
},
width: 80,
},
{
title: '优先级',
dataIndex: 'priority',
width: 120,
},
{
title: '告警标题',
@ -26,26 +28,32 @@ const tableKeyMap = [
{
title: '错误码',
dataIndex: 'errorCode',
width: 120,
},
{
title: '告警频率',
dataIndex: 'alarmFrequency',
width: 120,
},
{
title: '重复次数',
dataIndex: 'repetitions',
width: 120,
},
{
title: '频率间隔',
dataIndex: 'interval',
width: 120,
},
{
title: '监测时长',
dataIndex: 'monitorFrequency',
width: 120,
},
{
title: '是否启用',
dataIndex: 'enableRules',
width: 140,
},
];
const doWnload = (url: any) => {
@ -103,9 +111,13 @@ export const energyAlarmConfigs = (
},
],
columns: tableKeyMap,
scroll: { x: 1800 },
// rowSelection: null, 选择按钮
columnActions: {
title: '操作',
width: 250,
fixed: 'right',
dataIndex: 'tableAction',
actions: [
{
label: '编辑',
@ -124,11 +136,14 @@ export const energyAlarmConfigs = (
obj.monitorFrequency = data.monitorFrequency.value;
}
obj.createWorkOrder = obj.createWorkOrder + '';
if (obj.alarmFrequency !== 2) {
if (obj.alarmFrequency === 1) {
obj.repetitions = null;
obj.intervalDuration = null;
obj.intervalDurationUnit = null;
}
if (obj.alarmFrequency === 3) {
obj.repetitions = null;
}
editeEnergyAlarm.value.toggle(obj);
},
},

10
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts

@ -14,6 +14,7 @@ const tableKeyMap = [
customRender: (text: any) => {
return text.index + 1;
},
width: 80,
},
{
title: '优先级',
@ -105,8 +106,12 @@ export const equipmentAlarmTableConfig = (
],
columns: tableKeyMap,
// rowSelection: null, 选择按钮
scroll: { x: 1800 },
columnActions: {
title: '操作',
width: 250,
fixed: 'right',
dataIndex: 'tableAction',
actions: [
{
label: '编辑',
@ -122,11 +127,14 @@ export const equipmentAlarmTableConfig = (
obj.intervalDurationUnit = data.intervalDurationUnit.value;
}
obj.createWorkOrder = obj.createWorkOrder + '';
if (obj.alarmFrequency !== 2) {
if (obj.alarmFrequency === 1) {
obj.repetitions = null;
obj.intervalDuration = null;
obj.intervalDurationUnit = null;
}
if (obj.alarmFrequency === 3) {
obj.repetitions = null;
}
obj.monitorTimeUnit = data.monitorTimeUnit.value;
editEquipmentAlarm.value.toggle(obj);
},

13
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts

@ -12,14 +12,17 @@ const tableKeyMap = [
customRender: (text: any) => {
return text.index + 1;
},
width: 80,
},
{
title: '优先级',
dataIndex: 'prioritys',
width: 120,
},
{
title: '告警类型',
dataIndex: 'alarmTypeName',
width: 140,
},
{
title: '告警标题',
@ -28,20 +31,24 @@ const tableKeyMap = [
{
title: '错误码',
dataIndex: 'errorCode',
width: 120,
},
{
title: '通知名单',
dataIndex: 'notificationList',
width: 150,
width: 220,
textEllipsis: true,
textWidth: 150,
},
{
title: '通知方式',
dataIndex: 'notificationMethod',
width: 160,
},
{
title: '启用通知',
dataIndex: 'enableNotifications',
width: 140,
},
];
export const notificationtableConfig = (notificationManagements: any) => {
@ -50,8 +57,12 @@ export const notificationtableConfig = (notificationManagements: any) => {
api: notificationManagementApi.getTableList,
headerActions: [],
columns: tableKeyMap,
scroll: { x: 1800 },
columnActions: {
title: '操作',
width: 140,
fixed: 'right',
dataIndex: 'tableAction',
actions: [
{
label: '联系方式',

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

@ -1,7 +1,7 @@
<template>
<ns-drawer
v-model:visible="visible"
width="520"
width="562px"
:title="' '"
:footer-style="{ textAlign: 'right' }"
:ok="btnClick"
@ -101,7 +101,7 @@
};
const getChatr = () => {
let dayData = [];
let energyAlarm = [];
let energyAlarm: any = [];
// Extend data for 30 days
for (let i = 1; i < 30; i++) {
@ -178,7 +178,7 @@
show: true, // X
color: 'rgb(89, 89, 89)', // X
fontSize: 12, // X
formatter: function (value) {
formatter: function (value: any) {
// X
return value;
},
@ -204,19 +204,51 @@
},
axisLabel: {
show: true, //
formatter: function (value) {
formatter: function (value: any) {
return value + ' V'; //
},
},
},
],
//
dataZoom: [
{
height: 12,
type: 'inside',
start: 0,
end: 100,
handleSize: '300%', //
bottom: 15,
},
{
type: 'slider',
// backgroundColor: 'yellow',
// fillerColor: 'yellow',
height: 12, // slider15
start: 0,
end: 100,
right: 60,
left: 60,
bottom: 10,
handleIcon:
'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5M36.9,35.8h-1.3z M27.8,35.8 h-1.3H27L27.8,35.8L27.8,35.8z', // 使 axisPointer
handleSize: '140%', //
// borderColor: 'none',
handleStyle: {
// color: 'red',
// shadowBlur: 6,
// shadowColor: 'yellow',
shadowOffsetX: 0, // x
shadowOffsetY: 0, // y
},
// label
// 20050101 2005\n0101
// labelFormatter: function (index, value) {
// const year = value.slice(0, 4);
// const date = value.slice(4);
// return year + '\n' + date;
// },
// textStyle: {
// fontStyle: 'italic', //
// },
showDataShadow: false, //
},
],
series: [
@ -236,7 +268,7 @@
color: 'rgb(89, 89, 89)',
position: 'top',
top: '10',
formatter: function (value) {
formatter: function (value: any) {
return Number(energyAlarm[value.dataIndex]) + 'V';
},
},

3
hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue

@ -1,7 +1,7 @@
<template>
<ns-drawer
v-model:visible="visible"
width="550"
width="562px"
:title="' '"
:footer-style="{ textAlign: 'right' }"
:ok="btnClick"
@ -97,6 +97,7 @@
infoObject.value = {};
visible.value = false;
config.value.dataSource = [];
formRef.value.resetFields();
};
const btnClick = () => {
formRef.value.validate().then(() => {

9
hx-ai-intelligent/src/view/alarmManagement/energyAlarm/ts/config.ts

@ -57,18 +57,21 @@ export const notificationtableConfig = (look: any, status: any) => {
title: '告警记录',
api: energyAlarmApi.getTableList,
headerActions: [{}],
scroll: { x: 2000 },
scroll: { x: 1800 },
columns: tableKeyMap,
// rowSelection: null, 选择按钮
columnActions: {
title: '操作',
width: 180,
fixed: 'right',
dataIndex: 'tableAction',
actions: [
{
label: '详情',
name: 'FeedBackDetail',
dynamicParams: ['uuid', 'appealType'],
handle: (data: any) => {
look.value.toggle(data);
look.value.toggle({ ...data });
},
},
{
@ -76,7 +79,7 @@ export const notificationtableConfig = (look: any, status: any) => {
name: 'FeedBackDetail',
dynamicParams: ['uuid', 'appealType'],
handle: (data: any) => {
status.value.toggle(data);
status.value.toggle({ ...data });
},
},
],

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

@ -1,7 +1,7 @@
<template>
<ns-drawer
v-model:visible="visible"
width="520"
width="562px"
:title="' '"
:footer-style="{ textAlign: 'right' }"
:ok="btnClick"
@ -100,7 +100,7 @@
};
const getChatr = () => {
let dayData = [];
let energyAlarm = [];
let energyAlarm: any = [];
// Extend data for 30 days
for (let i = 1; i < 30; i++) {
@ -177,7 +177,7 @@
show: true, // X
color: 'rgb(89, 89, 89)', // X
fontSize: 12, // X
formatter: function (value) {
formatter: function (value: any) {
// X
return value;
},
@ -203,19 +203,51 @@
},
axisLabel: {
show: true, //
formatter: function (value) {
formatter: function (value: any) {
return value + ' V'; //
},
},
},
],
//
dataZoom: [
{
height: 12,
type: 'inside',
start: 0,
end: 100,
handleSize: '300%', //
bottom: 15,
},
{
type: 'slider',
// backgroundColor: 'yellow',
// fillerColor: 'yellow',
height: 12, // slider15
start: 0,
end: 100,
right: 60,
left: 60,
bottom: 10,
handleIcon:
'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5M36.9,35.8h-1.3z M27.8,35.8 h-1.3H27L27.8,35.8L27.8,35.8z', // 使 axisPointer
handleSize: '140%', //
// borderColor: 'none',
handleStyle: {
// color: 'red',
// shadowBlur: 6,
// shadowColor: 'yellow',
shadowOffsetX: 0, // x
shadowOffsetY: 0, // y
},
// label
// 20050101 2005\n0101
// labelFormatter: function (index, value) {
// const year = value.slice(0, 4);
// const date = value.slice(4);
// return year + '\n' + date;
// },
// textStyle: {
// fontStyle: 'italic', //
// },
showDataShadow: false, //
},
],
series: [
@ -235,7 +267,7 @@
color: 'rgb(89, 89, 89)',
position: 'top',
top: '10',
formatter: function (value) {
formatter: function (value: any) {
return Number(energyAlarm[value.dataIndex]) + 'V';
},
},

3
hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue

@ -1,7 +1,7 @@
<template>
<ns-drawer
v-model:visible="visible"
width="550"
width="562px"
:title="' '"
:footer-style="{ textAlign: 'right' }"
:ok="btnClick"
@ -98,6 +98,7 @@
visible.value = false;
config.value.dataSource = [];
logList.value = [];
formRef.value.resetFields();
};
const btnClick = () => {
formRef.value.validate().then(() => {

9
hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts

@ -59,18 +59,21 @@ export const notificationtableConfig = (look: any, status: any) => {
title: '告警记录',
api: equipmentAlarmApi.getTableList,
headerActions: [{}],
scroll: { x: 2000 },
scroll: { x: 1800 },
columns: tableKeyMap,
// rowSelection: null, 选择按钮
columnActions: {
title: '操作',
width: 180,
fixed: 'right',
dataIndex: 'tableAction',
actions: [
{
label: '详情',
name: 'FeedBackDetail',
dynamicParams: ['uuid', 'appealType'],
handle: (data: any) => {
look.value.toggle(data);
look.value.toggle({ ...data });
},
},
{
@ -78,7 +81,7 @@ export const notificationtableConfig = (look: any, status: any) => {
name: 'FeedBackDetail',
dynamicParams: ['uuid', 'appealType'],
handle: (data: any) => {
status.value.toggle(data);
status.value.toggle({ ...data });
},
},
],

44
hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/look.vue

@ -1,7 +1,7 @@
<template>
<ns-drawer
v-model:visible="visible"
width="520"
width="562px"
:title="' '"
:footer-style="{ textAlign: 'right' }"
:ok="btnClick"
@ -164,7 +164,7 @@
color: 'rgb(89, 89, 89)', // X
fontSize: 12, // X
interval: 0, //
formatter: function (value) {
formatter: function (value: any) {
// X
return value;
},
@ -190,20 +190,52 @@
},
axisLabel: {
show: true, //
formatter: function (value) {
formatter: function (value: any) {
return value;
},
},
interval: 1, // Y 1
},
],
//
dataZoom: [
{
height: 12,
type: 'inside',
start: 0,
end: 100,
handleSize: '300%', //
bottom: 15,
},
{
type: 'slider',
// backgroundColor: 'yellow',
// fillerColor: 'yellow',
height: 12, // slider15
start: 0,
end: 100,
right: 60,
left: 60,
bottom: 10,
handleIcon:
'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5M36.9,35.8h-1.3z M27.8,35.8 h-1.3H27L27.8,35.8L27.8,35.8z', // 使 axisPointer
handleSize: '140%', //
// borderColor: 'none',
handleStyle: {
// color: 'red',
// shadowBlur: 6,
// shadowColor: 'yellow',
shadowOffsetX: 0, // x
shadowOffsetY: 0, // y
},
// label
// 20050101 2005\n0101
// labelFormatter: function (index, value) {
// const year = value.slice(0, 4);
// const date = value.slice(4);
// return year + '\n' + date;
// },
// textStyle: {
// fontStyle: 'italic', //
// },
showDataShadow: false, //
},
],
series: [

3
hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/status.vue

@ -1,7 +1,7 @@
<template>
<ns-drawer
v-model:visible="visible"
width="550"
width="562px"
:title="' '"
:footer-style="{ textAlign: 'right' }"
:ok="btnClick"
@ -49,6 +49,7 @@
visible.value = false;
};
const toggle = async (data) => {
console.log(data, 'xxxxxx');
let states = await getEnum({ params: { enumType: 'AlarmLogStateEnum' } });
stateOptions.value = states.data;
let stateMap = {

12
hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/ts/config.ts

@ -12,6 +12,7 @@ const tableKeyMap = [
customRender: (text: any) => {
return text.index + 1;
},
width: 80,
},
{
title: '告警编号',
@ -24,10 +25,12 @@ const tableKeyMap = [
{
title: '优先级',
dataIndex: 'priority',
width: 120,
},
{
title: '状态',
dataIndex: 'alarmLogState',
width: 140,
},
{
title: '错误码',
@ -53,16 +56,19 @@ export const notificationtableConfig = (look: any, status: any) => {
headerActions: [{}],
columns: tableKeyMap,
// rowSelection: null, 选择按钮
scroll: { x: 1800 },
columnActions: {
title: '操作',
width: 180,
fixed: 'right',
dataIndex: 'tableAction',
actions: [
{
label: '详情',
name: 'FeedBackDetail',
dynamicParams: ['uuid', 'appealType'],
handle: (data: any) => {
console.log(look.value);
look.value.toggle(data);
look.value.toggle({ ...data });
},
},
{
@ -70,7 +76,7 @@ export const notificationtableConfig = (look: any, status: any) => {
name: 'FeedBackDetail',
dynamicParams: ['uuid', 'appealType'],
handle: (data: any) => {
status.value.toggle(data);
status.value.toggle({ ...data });
},
},
],

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

@ -290,11 +290,12 @@
getDictList();
visible.value = true;
formState.value.id = record.id;
fetch(uploadPic.select, { bizId: record.id, bizTpye: 1 }).then((res) => {
fetch(uploadPic.select, { bizId: record.id, bizType: 1 }).then((res) => {
fileList.value = res.data.map((item) => ({
uid: item.id.toString(), // 使id
name: item.fileName, //
status: 'done', //
type: 'done',
url: item.filePath, // URLURL
}));
});
@ -415,7 +416,9 @@
message.error(`${info.file.name} 文件上传失败`);
}
};
const delIds = ref([]);
const handleFileRemove = (file) => {
delIds.value.push(file.uid);
const newFileList = [];
fileList.value.forEach((item) => {
if (item.uid !== file.uid) {
@ -424,9 +427,6 @@
});
fileList.value = newFileList;
};
const uploadQuery = ref({
bizTpye: 1,
});
const onSubmit = () => {
formRef.value
.validate()
@ -443,14 +443,20 @@
// uploadQuery.value.bizId = res.data.id;
const formData = ref(new FormData());
fileList.value.forEach((file) => {
formData.value.append('files', file.originFileObj);
if (file.type !== 'done') {
formData.value.append('files', file.originFileObj);
}
});
formData.value.append('bizTpye', 1);
formData.value.append('bizType', 1);
formData.value.append('bizId', res.data.id);
delIds.value.forEach((item) => {
formData.value.append('deleteList', item);
});
fetch(uploadPic.uploadfiles, formData.value)
.then((res) => {
message.success('操作成功!');
visible.value = false;
delIds.value = [];
getDetailList();
})
.catch((error) => {
@ -459,6 +465,7 @@
} else {
message.success('操作成功!');
visible.value = false;
delIds.value = [];
getDetailList();
}
});
@ -479,6 +486,7 @@
//
const onClose = () => {
visible.value = false;
delIds.value = [];
formState.value = {};
fileList.value = [];
formRef.value.resetFields();

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

@ -9,13 +9,16 @@
<div class="moneyTotal" style="color: rgba(229, 102, 22, 1)">{{
nationwide.valuation
}}</div>
<div class="moneyDetail"
><img
@click="viewDetail(1)"
width="34px"
height="34px"
src="../../../../src/icon/carbonAssetsSearch-1.svg"
/></div>
<div class="moneyDetail">
<div class="detailClick" @click="viewDetail(1)" style="border: 1px solid rgba(229, 102, 22, 1);">
<img
width="20px"
height="20px"
src="../../../../src/icon/carbonAssetsToDetail-1.svg"
alt="" />
<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" />
@ -56,13 +59,16 @@
/></div>
<div class="moneyTitle">地方碳账户估值CNY</div>
<div class="moneyTotal" style="color: rgba(229, 102, 22, 1)">{{ place.valuation }}</div>
<div class="moneyDetail"
><img
width="34px"
height="34px"
@click="viewDetail(2)"
src="../../../../src/icon/carbonAssetsSearch-2.svg"
/></div>
<div class="moneyDetail">
<div class="detailClick" @click="viewDetail(2)" style="border: 1px solid rgba(230, 51, 44, 1);">
<img
width="20px"
height="20px"
src="../../../../src/icon/carbonAssetsToDetail-2.svg"
alt="" />
<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" />
@ -103,13 +109,16 @@
/></div>
<div class="moneyTitle">CCER资产估值CNY</div>
<div class="moneyTotal" style="color: rgba(229, 102, 22, 1)">{{ ccer.valuation }}</div>
<div class="moneyDetail"
><img
width="34px"
height="34px"
@click="viewDetail(3)"
src="../../../../src/icon/carbonAssetsSearch-3.svg"
/></div>
<div class="moneyDetail" >
<div class="detailClick" @click="viewDetail(3)" style="border: 1px solid rgba(56, 157, 220, 1);">
<img
width="20px"
height="20px"
src="../../../../src/icon/carbonAssetsToDetail-3.svg"
alt="" />
<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" />
@ -259,7 +268,7 @@
display: flex;
align-items: center;
.moneyImg {
width: 20%;
width: 18%;
display: flex;
justify-content: center;
}
@ -275,7 +284,7 @@
vertical-align: top;
}
.moneyTotal {
width: 35%;
width: 33%;
display: flex;
justify-content: center;
opacity: 1;
@ -285,10 +294,17 @@
text-align: left;
}
.moneyDetail {
width: 10%;
width: 14%;
display: flex;
justify-content: center;
cursor: pointer;
.detailClick {
border-radius: 4px;
padding: 3px;
> span {
font-size: 12px;
}
}
}
}
.title {

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

@ -62,9 +62,17 @@
<a-menu>
<a-menu-item @click="editTreeNodeData(data)">编辑</a-menu-item>
<a-menu-item @click="addTreeNodeData">新增子节点</a-menu-item>
<a-menu-item>上移</a-menu-item>
<a-menu-item>下移</a-menu-item>
<a-menu-item @click="deleteTreeNode">删除</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.isEnd && data.emissionName !== '未分类'"
@click="moveNode(data, 'down')"
>下移</a-menu-item
>
<a-menu-item @click="deleteTreeNode(data)">删除</a-menu-item>
</a-menu>
</template>
</a-dropdown>
@ -117,12 +125,14 @@
:body-style="{ paddingBottom: '80px' }"
:footer-style="{ textAlign: 'right' }"
destroyOnClose
title="单位管理"
@close="closeUnitManag">
<div class="addButton">
<div class="ns-form-title titleUnit">
<div class="title">单位管理</div>
<a-button type="primary" @click="addGroup">新增分组</a-button>
<a-button type="primary" @click="addUnit">新增单位</a-button>
</div>
<!-- <div class="addButton">
</div> -->
<div class="treePart">
<div
style="
@ -228,6 +238,7 @@
TreeProps,
} from 'ant-design-vue/es/tree';
import { log } from 'node:console';
import { or } from '@vueuse/core';
defineOptions({ name: 'OrderListIndex' });
const orgId = ref('');
@ -236,8 +247,8 @@
const dynamicDisabled = computed(() => {
return formRef.value?.validateResult && userAuthList.value?.length;
});
const fetch = (api, params = { orgId }) => {
return http.post(api, params);
const fetch = (api, params = { orgId }, config) => {
return http.post(api, params, config);
};
const selectTreeDataValue = ref<string>('');
const mainRef = ref();
@ -253,7 +264,7 @@
const disabled = ref(false);
const treeNodeAdd = ref<boolean>(false);
const operationTree = ref<string>('新增');
const showOperation = ref(false);
// const showOperation = ref(false);
const opMap: any = ref({
type: 'add',
@ -442,8 +453,15 @@
editTreeNode.value.type = 'update';
addTreeNode.value = data.emissionName;
};
const moveNode = (data, type: opType) => {
const flag = type === 'up';
http.post(carbonEmissionFactorLibrary.move, { ...data, isUp: flag }).then(() => {
getOrgTree();
NsMessage.success('操作成功');
});
};
//
const deleteTreeNode = () => {
const deleteTreeNode = (data) => {
Modal.confirm({
title: '警告',
icon: createVNode(ExclamationCircleOutlined),
@ -452,10 +470,12 @@
okType: 'primary',
cancelText: '取消',
onOk() {
http.post(carbonEmissionFactorLibrary.delTreeNode, editTreeNode.value).then(() => {
getOrgTree();
NsMessage.success('操作成功');
});
http
.post(carbonEmissionFactorLibrary.delTreeNode, { orgId: orgId.value, id: data.id })
.then(() => {
getOrgTree();
NsMessage.success('操作成功');
});
},
onCancel() {
console.log('Cancel');
@ -511,7 +531,7 @@
const editTreeNode = ref({});
const onSelect = (selectedKeys: string[], info: any) => {
if (info.selected) {
showOperation.value = true;
// showOperation.value = true;
editTreeNode.value = {
id: info.selectedNodes[0].id,
level: info.selectedNodes[0].level,
@ -519,6 +539,8 @@
sortNumber: info.selectedNodes[0].sortNumber,
parentEmissionId: info.selectedNodes[0].parentEmissionId,
};
} else {
editTreeNode.value = {};
}
};
@ -573,6 +595,15 @@
opMap.value.fuc && opMap.value.fuc({ ...formData.value });
});
};
const doWnload = (url: any) => {
const a = document.createElement('a');
document.body.appendChild(a);
a.href = encodeURI(url);
//
// a.download = fileName.value;
//a
a.click();
};
const tableConfig = ref({
title: '数据库',
api: carbonEmissionFactorLibrary.getTableList,
@ -609,13 +640,53 @@
{
label: '导入',
type: 'primary',
name: 'userImport',
handle: () => {},
name: 'carbonEmissionFactorLibraryImport',
extra: {
api: carbonEmissionFactorLibrary.import, //
params: {
orgId,
},
title: '排放源', // title
templateName: 'emissionSource', // 使
indexName: '设备id', //
message: [
{ label: '1、若必填项未填写,则不能进行导入操作' },
{ label: `2、当重复时,则更新数据。` },
{ label: '3、数据将从模版的第五行进行导入。' },
{ label: '4、文件导入勿超过5MB。' },
],
},
},
{
label: '导出',
type: 'primary',
name: 'userExports',
handle: () => {
const exportQuery = {
orgId: orgId.value,
pageNum: 1,
pageSize: 999,
};
const config = {
responseType: 'blob',
};
fetch(carbonEmissionFactorLibrary.export, exportQuery, config)
.then((res) => {
// URL blob
const url = window.URL.createObjectURL(new Blob([res]));
// <a>
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'carbonFactor.xlsx'); //
document.body.appendChild(link);
link.click();
// URL
window.URL.revokeObjectURL(url);
})
.catch((error) => {
console.error('下载失败:', error);
});
},
},
{
label: '批量删除',
@ -687,6 +758,7 @@
{
title: '参考文献',
dataIndex: 'bibliography',
ellipsis: true,
},
{
title: '引用数量',
@ -917,7 +989,7 @@
} else {
canSelect.value = false;
}
fetch(carbonEmissionFactorLibrary.findOutermost).then((res) => {
fetch(carbonEmissionFactorLibrary.findOutermost, { grp: 'MEASUREMENT_UNIT' }).then((res) => {
groupData.value = res.data;
});
addUnitTitle.value = '新增单位';
@ -992,10 +1064,18 @@
onOk() {
fetch(carbonEmissionFactorLibrary.delDictionary, formState.value).then((res) => {
message.success('操作成功!');
formState.value = {
grp: 'MEASUREMENT_UNIT',
grpDesc: '计量单位',
};
getUnitTree();
});
},
onCancel() {
formState.value = {
grp: 'MEASUREMENT_UNIT',
grpDesc: '计量单位',
};
console.log('Cancel');
},
});
@ -1047,6 +1127,20 @@
padding-bottom: 10px;
border-bottom: 1px solid #e9e9e9;
}
.titleUnit {
font-weight: bold;
user-select: text;
padding: unset;
margin-bottom: unset;
padding-bottom: unset;
border-bottom: unset;
width: 70%;
height: 5vh;
display: flex;
align-items: center;
justify-content: space-between;
margin-left: 10%;
}
.title {
text-align: left;
height: 32px;
@ -1086,6 +1180,7 @@
border: 1px solid #bfbfbf;
margin-left: 10%;
flex-direction: column;
border-radius: 12px;
}
.actionMore {
display: none;

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

@ -0,0 +1,952 @@
<template>
<div>
<!-- <a-table
:columns="tableColumns"
:data-source="data"
bordered
:pagination="false"
:scroll="{ x: 2000 }">
<template #bodyCell="{ column, text, record }">
<template v-if="column.key === 'action'">
<span>
<a @click="editData(record)">编辑</a>
<a-divider type="vertical" />
<a @click="delData(record)">删除</a>
</span>
</template>
</template>
<template #title>
<a-date-picker v-model:value="selectYear" picker="year" @change="changeYearData" valueFormat="YYYY" />
<div class="buttonGroup">
<a-button type="primary" @click="addNewData">新增</a-button>
<a-button type="primary">导入</a-button>
<a-button type="primary">导出</a-button>
<a-button type="primary">模板下载</a-button>
<a-button type="primary" @click="uploadVoucher">上传凭证</a-button>
<a-button type="primary">凭证下载</a-button>
</div>
</template>
</a-table> -->
<ns-view-list-table
v-bind="tableConfig"
:model="data"
ref="mainRef"
:scroll="{ x: 1500, y: 350 }">
<!-- <template #bodyCell="{ column, text, record }">
<template v-if="column.dataIndex === 'janFlag'">
<span v-if="record.janFlag===1" style="color: rgba(243, 97, 99, 1);">{{text}}</span>
<span v-else style="color: rgba(57, 215, 287, 1);">{{text}}</span>
</template>
</template> -->
</ns-view-list-table>
<!-- <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" /> -->
<!-- 新增数据库数据 -->
<a-drawer
:width="500"
:visible="visible"
:body-style="{ paddingBottom: '80px' }"
:footer-style="{ textAlign: 'right' }"
destroyOnClose
@close="onClose">
<a-form
ref="formRef"
:model="formState"
:rules="rules"
:label-col="labelCol"
:wrapper-col="wrapperCol">
<a-form-item ref="name" label="能耗名称" name="energyType">
<a-input v-model:value="formState.energyType" placeholder="请输入能源种类" />
</a-form-item>
<a-form-item label="计量单位" name="unit">
<a-cascader v-model:value="formState.unit" :options="measurementUnit" />
</a-form-item>
<a-form-item label="能耗类型" name="emissionType" :required="isRequired">
<a-select v-model:value="formState.emissionType" placeholder="请选择能耗类型">
<a-select-option v-for="(item, index) in energyTypeOptions" :key="index" :value="item.dicKey">
{{ item.cnValue }}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="自动采集节点" name="collectionNode">
<a-tree-select
v-model:value="formState.collectionNode"
:tree-line="true"
:tree-data="treeData">
</a-tree-select>
</a-form-item>
<a-form-item label="计算碳排" name="isComputeCarbon">
<a-radio-group v-model:value="formState.isComputeCarbon" @change="changeRadio">
<a-radio :value="0"></a-radio>
<a-radio :value="1"></a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="排放类型" name="emissionType" :required="isRequired">
<a-select v-model:value="formState.emissionType" placeholder="请选择排放类型">
<a-select-option v-for="(item, index) in emissionTypeDic" :key="index" :value="item.id">
{{ item.cnValue }}
</a-select-option>
</a-select>
</a-form-item>
<a-row>
<a-col :span="24" style="display: flex; justify-content: space-around">
<a-form-item
label="1月"
name="janFlag"
:label-col="switchLabelCol"
:wrapper-col="switchWrapperCol">
<a-switch
v-model:checked="formState.janFlag"
:checked-value="1"
:unCheckedValue="0" />
</a-form-item>
<a-form-item
label="2月"
name="febFlag"
:label-col="switchLabelCol"
:wrapper-col="switchWrapperCol">
<a-switch
v-model:checked="formState.febFlag"
:checked-value="1"
:unCheckedValue="0" />
</a-form-item>
<a-form-item
label="3月"
name="marFlag"
:label-col="switchLabelCol"
:wrapper-col="switchWrapperCol">
<a-switch
v-model:checked="formState.marFlag"
:checked-value="1"
:unCheckedValue="0" />
</a-form-item>
</a-col>
<a-col :span="24" style="display: flex; justify-content: space-around">
<a-form-item
label="4月"
name="aprFlag"
:label-col="switchLabelCol"
:wrapper-col="switchWrapperCol">
<a-switch
v-model:checked="formState.aprFlag"
:checked-value="1"
:unCheckedValue="0" />
</a-form-item>
<a-form-item
label="5月"
name="mayFlag"
:label-col="switchLabelCol"
:wrapper-col="switchWrapperCol">
<a-switch
v-model:checked="formState.mayFlag"
:checked-value="1"
:unCheckedValue="0" />
</a-form-item>
<a-form-item
label="6月"
name="junFlag"
:label-col="switchLabelCol"
:wrapper-col="switchWrapperCol">
<a-switch
v-model:checked="formState.junFlag"
:checked-value="1"
:unCheckedValue="0" />
</a-form-item>
</a-col>
<a-col :span="24" style="display: flex; justify-content: space-around">
<a-form-item
label="7月"
name="julFlag"
:label-col="switchLabelCol"
:wrapper-col="switchWrapperCol">
<a-switch
v-model:checked="formState.julFlag"
:checked-value="1"
:unCheckedValue="0" />
</a-form-item>
<a-form-item
label="8月"
name="augFlag"
:label-col="switchLabelCol"
:wrapper-col="switchWrapperCol">
<a-switch
v-model:checked="formState.augFlag"
:checked-value="1"
:unCheckedValue="0" />
</a-form-item>
<a-form-item
label="9月"
name="sepFlag"
:label-col="switchLabelCol"
:wrapper-col="switchWrapperCol">
<a-switch
v-model:checked="formState.sepFlag"
:checked-value="1"
:unCheckedValue="0" />
</a-form-item>
</a-col>
<a-col :span="24" style="display: flex; justify-content: space-around">
<a-form-item
label="10月"
name="octFlag"
:label-col="switchLabelCol"
:wrapper-col="switchWrapperCol">
<a-switch
v-model:checked="formState.octFlag"
:checked-value="1"
:unCheckedValue="0" />
</a-form-item>
<a-form-item
label="11月"
name="novFlag"
:label-col="switchLabelCol"
:wrapper-col="switchWrapperCol">
<a-switch
v-model:checked="formState.novFlag"
:checked-value="1"
:unCheckedValue="0" />
</a-form-item>
<a-form-item
label="12月"
name="decFlag"
:label-col="switchLabelCol"
:wrapper-col="switchWrapperCol">
<a-switch
v-model:checked="formState.decFlag"
:checked-value="1"
:unCheckedValue="0" />
</a-form-item>
</a-col>
</a-row>
<a-form-item ref="name" label="上传凭证">
<a-upload
:file-list="fileList"
name="file"
accept=".jpg,.jpeg,.png,.gif,.bmp,.pdf"
@remove="handleFileRemove"
:before-upload="beforeUpload"
@change="handleChange">
<a-button>
<upload-outlined></upload-outlined>
上传
</a-button>
</a-upload>
</a-form-item>
</a-form>
<template #footer>
<a-button style="margin-right: 8px" @click="onClose">取消</a-button>
<a-button type="primary" @click="onSubmit">确定</a-button>
</template>
</a-drawer>
<!-- 上传凭证弹窗 -->
<!-- <a-modal :visible="openUpload" title="凭证上传" @ok="handleOk" @cancel="closeOpenUpload">
<a-upload-dragger
v-model:fileList="fileList"
name="file"
:multiple="true"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
@change="handleChange"
@drop="handleDrop"
>
<p class="ant-upload-drag-icon">
<inbox-outlined></inbox-outlined>
</p>
<p class="ant-upload-hint" style="display: flex;flex-direction: column;">
<p>1.仅支持pdf格式文件或文件夹</p>
<p>2.文件命名规则为能源种类_年份</p>
<p>3.每次上传自动覆盖</p>
</p>
</a-upload-dragger>
</a-modal> -->
<!-- 凭证下载 -->
<a-drawer
:visible="downLoadVisible"
title="凭证列表"
:width="500"
@close="onCloseDownLoad"
:footer-style="{ textAlign: 'right' }">
<div></div>
<a-table
:columns="downLoadColumns"
:data-source="downLoadData"
bordered
rowKey="id"
:rowSelection="{
selectedRowKeys: selectedRowKeysSet,
onChange: onSelectionChangeSet,
}"
:pagination="false">
<template #bodyCell="{ column, text, record }">
<template v-if="column.key === 'action'">
<span>
<a @click="downLoad(record)">下载</a>
</span>
</template>
</template>
</a-table>
<template #footer>
<a-button style="margin-right: 8px" @click="onCloseDownLoad">取消</a-button>
<a-button type="primary" @click="onSubmitDownLoad">确定</a-button>
</template>
</a-drawer>
</div>
</template>
<script lang="ts" setup>
import { ref, toRaw, defineExpose } from 'vue';
import type { Rule } from 'ant-design-vue/es/form';
import { Pagination, message, Modal } from 'ant-design-vue';
import { UploadOutlined } from '@ant-design/icons-vue';
import type { TreeSelectProps, UploadChangeParam, UploadProps } from 'ant-design-vue';
import { NsMessage } from '/nerv-lib/component';
import dayjs, { Dayjs } from 'dayjs';
import { http } from '/nerv-lib/util/http';
import { Cookies } from '/nerv-lib/util/cookie';
import { tableColumns } from '../config';
import {
energyConsumption,
carbonEmissionFactorLibrary,
uploadPic,
} from '/@/api/carbonEmissionFactorLibrary';
import { dict } from '/@/api';
import { group } from '/@/api/deviceManage';
defineOptions({
energyType: 'EnergyConsumption', // name
components: {
'a-pagination': Pagination,
},
});
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const fetch = (api, params = { orgId }, config) => {
return http.post(api, params, config);
};
const selectYear = ref<Dayjs>(dayjs(new Date().getFullYear().toString()));
const total = ref<number>();
const queryParams = ref({
pageNum: 1,
pageSize: 10,
orgId: orgId.value,
year: selectYear.value.format('YYYY'),
});
const isRequired = ref(false);
const visible = ref(false);
const openUpload = ref<boolean>(false);
const data = ref([]);
interface FormState {
energyType: string;
unit: string;
collectionNode: string;
emissionType: string | undefined;
isComputeCarbon: string;
janFlag: string;
febFlag: string;
marFlag: string;
aprFlag: string;
mayFlag: string;
junFlag: string;
julFlag: string;
augFlag: string;
sepFlag: string;
octFlag: string;
novFlag: string;
decFlag: string;
}
const formRef = ref();
const labelCol = { span: 5 };
const wrapperCol = { span: 19 };
const switchLabelCol = { span: 10 };
const switchWrapperCol = { span: 14 };
const formState = ref({
orgId: orgId.value,
});
// form
const rules: Record<string, Rule[]> = {
energyType: [{ required: true, message: '请输入能源种类', trigger: 'change' }],
isComputeCarbon: [{ required: true, message: '请选择是否计算碳排', trigger: 'change' }],
unit: [{ required: true, message: '请选择计量单位', trigger: 'change' }],
};
//
const emissionTypeDic = ref();
//
const measurementUnit = ref([]);
//
const treeData = ref<TreeSelectProps['treeData']>([]);
//
const changeYearData = () => {
queryParams.value.year = selectYear.value;
getTableList();
};
const mainRef = ref();
const year = selectYear.value.format('YYYY');
const tableConfig = ref({
title: '能耗统计',
api: energyConsumption.pageList,
params: queryParams.value,
headerActions: [
{
label: '新增',
name: 'userAdd',
type: 'primary',
handle: () => {
getDictList();
visible.value = true;
},
},
{
label: '导入',
type: 'primary',
name: 'userImport',
handle: () => {},
},
{
label: '导出',
type: 'primary',
name: 'userExports',
},
{
label: '模板下载',
type: 'primary',
},
// {
// label: '',
// type: 'primary',
// handle: () => {
// openUpload.value = true;
// },
// },
{
label: '凭证下载',
type: 'primary',
handle: () => {
fetch(energyConsumption.voucherDownloadList, { bizType: 3 }).then((res) => {
downLoadData.value = res.data;
});
downLoadVisible.value = true;
},
},
],
columns: [
{
title: '序号',
customRender: (text: any) => {
return text.index + 1;
},
},
{
title: '能源种类',
dataIndex: 'energyType',
},
{
title: '计量单位',
className: 'unitName',
dataIndex: 'unitName',
},
{
title: '全年',
dataIndex: 'yearly',
},
{
title: '1月',
dataIndex: 'jan',
// customRender: ({ text }: { text: string }) => {
// return <span :style="{ color: getColor(text) }">{text}</span>;
// }
},
{
title: '2月',
dataIndex: 'feb',
},
{
title: '3月',
dataIndex: 'mar',
},
{
title: '4月',
dataIndex: 'apr',
},
{
title: '5月',
dataIndex: 'may',
},
{
title: '6月',
dataIndex: 'jun',
},
{
title: '7月',
dataIndex: 'jul',
},
{
title: '8月',
dataIndex: 'aug',
},
{
title: '9月',
dataIndex: 'sep',
},
{
title: '10月',
dataIndex: 'oct',
},
{
title: '11月',
dataIndex: 'nov',
},
{
title: '12月',
dataIndex: 'dec',
},
],
columnActions: {
title: '操作',
actions: [
{
label: '编辑',
name: 'userEdit',
handle: (record: any) => {
getDictList();
visible.value = true;
fetch(energyConsumption.findById, { id: record.id }).then((res) => {
if (res.data.emissionType) {
res.data.emissionType = Number(res.data.emissionType);
}
if (res.data.unit) {
let selectDevice = ref([Number(res.data.unit)]);
findParentIds(measurementUnit.value, res.data.unit, selectDevice.value);
res.data.unit = selectDevice;
}
formState.value = res.data;
emissionType.value = res.data.emissionType;
if (formState.value.isComputeCarbon === 0) {
isRequired.value = true;
} else {
isRequired.value = false;
}
});
fetch(uploadPic.select, { bizId: record.id, bizType: 3 }).then((res) => {
fileList.value = res.data.map((item) => ({
uid: item.id.toString(), // 使id
name: item.fileName, //
status: 'done', //
type: 'done',
url: item.filePath, // URLURL
}));
});
},
},
{
label: '删除',
name: 'userDelete',
dynamicParams: { id: 'id' },
confirm: true,
isReload: true,
api: energyConsumption.del,
},
],
},
formConfig: {
schemas: [
{
field: 'year',
label: '年份',
component: 'NsDatePicker',
componentProps: {
picker: 'year',
valueFormat: 'YYYY',
defaultValue: selectYear.value.format('YYYY'),
},
},
],
params: {},
},
rowKey: 'id',
});
const getColor = (value: string | number): string => {
debugger;
if (typeof value === 'string') {
switch (value) {
case 'active':
return 'green';
case 'inactive':
return 'red';
default:
return 'black';
}
} else if (typeof value === 'number') {
return value > 30 ? 'blue' : 'purple'; //
}
return 'black';
};
defineExpose({
mainRef,
});
// id
function findParentIds(tree: any, targetId: number, result: any) {
for (let item of tree) {
if (item.children && item.children.length > 0) {
if (item.children.some((child: any) => child.value === targetId)) {
result.unshift(item.value); // id
findParentIds(tree, item.value, result); // id
break; // 退
}
}
}
}
//
const getTableList = () => {
fetch(energyConsumption.pageList, queryParams.value).then((res) => {
data.value = res.data.records;
});
};
//
const onChange = (pageNumber: number, size: number) => {
queryParams.value.pageNum = pageNumber;
queryParams.value.pageSize = size;
mainRef.value?.nsTableRef.reload();
};
//
const emissionType = ref();
const changeRadio = (e) => {
if (e.target.value === 0) {
isRequired.value = true;
if (emissionType.value) {
formState.value.emissionType = emissionType.value;
}
} else {
isRequired.value = false;
formState.value.emissionType = '';
}
};
//
const onSubmit = () => {
formRef.value
.validate()
.then(() => {
console.log('values', formState, toRaw(formState));
formState.value.year = selectYear.value.format('YYYY');
if (formState.value.unit) {
formState.value.unit = formState.value.unit.join(',').split(',')[1];
}
if (formState.value.id) {
fetch(energyConsumption.update, formState.value).then((res) => {
if (fileList.value.length !== 0) {
const formData = ref(new FormData());
fileList.value.forEach((file) => {
if (file.type !== 'done') {
formData.value.append('files', file.originFileObj);
}
});
formData.value.append('bizType', 3);
formData.value.append('bizId', formState.value.id);
delIds.value.forEach((item) => {
formData.value.append('deleteList', item);
});
fetch(uploadPic.uploadfiles, formData.value)
.then((res) => {
message.success('操作成功!');
visible.value = false;
delIds.value = [];
formState.value = {
orgId: orgId.value,
};
mainRef.value?.nsTableRef.reload();
})
.catch((error) => {
console.log('error', error);
});
} else {
visible.value = false;
delIds.value = [];
formState.value = {
orgId: orgId.value,
};
message.success('操作成功!');
mainRef.value?.nsTableRef.reload();
}
});
} else {
fetch(energyConsumption.creat, formState.value).then((res) => {
if (res.data === '新增数据已存在') {
visible.value = false;
delIds.value = [];
NsMessage.warning(res.data);
} else {
if (fileList.value.length !== 0) {
const formData = ref(new FormData());
fileList.value.forEach((file) => {
formData.value.append('files', file.originFileObj);
});
formData.value.append('bizType', 3);
formData.value.append('bizId', res.data);
fetch(uploadPic.uploadfiles, formData.value)
.then((res) => {
message.success('操作成功!');
visible.value = false;
delIds.value = [];
formState.value = {
orgId: orgId.value,
};
mainRef.value?.nsTableRef.reload();
})
.catch((error) => {
console.log('error', error);
});
} else {
visible.value = false;
delIds.value = [];
formState.value = {
orgId: orgId.value,
};
message.success('操作成功!');
mainRef.value?.nsTableRef.reload();
}
}
});
}
})
.catch((error) => {
console.log('error', error);
});
};
const energyTypeOptions = ref([]);
//
const getDictList = async () => {
//
const options = await dict({ params: { dicKey: 'ENERGY_TYPE' } });
energyTypeOptions.value = options.data.data
console.log(energyTypeOptions);
debugger
//
fetch(energyConsumption.getDicList, { grp: 'EMISSION_TYPE' }).then((res) => {
emissionTypeDic.value = res.data;
});
//
fetch(carbonEmissionFactorLibrary.dictionaryUnitManagement, { grp: 'MEASUREMENT_UNIT' }).then(
(res) => {
measurementUnit.value = res.data;
measurementUnit.value = measurementUnit.value.map((item) => ({
value: item.id,
label: item.cnValue,
children: item.children
? item.children.map((child) => ({
value: child.id,
label: child.cnValue,
}))
: [],
}));
},
);
//
fetch(group.queryDeviceGroupTree, { energyType: 'ELECTRICITY_USAGE', orgId: orgId.value }).then(
(res) => {
treeData.value = res.data;
treeData.value = treeData.value.map((item) => ({
value: item.id,
label: item.pointName,
children: item.children
? item.children.map((child) => ({
value: child.id,
label: child.pointName,
}))
: [],
}));
},
);
};
//
const addNewData = () => {
getDictList();
visible.value = true;
};
//
const editData = (record) => {
getDictList();
visible.value = true;
fetch(energyConsumption.findById, { id: record.id }).then((res) => {
if (res.data.unitName) {
res.data.unitName = res.data.unitName.split(',');
}
formState.value = res.data;
});
};
//
const delData = (record) => {
Modal.confirm({
title: '警告',
content: '确定要删除吗?',
okText: '确定',
okType: 'primary',
cancelText: '取消',
onOk() {
fetch(energyConsumption.del, { id: record.id }).then((res) => {
message.success('操作成功!');
mainRef.value?.nsTableRef.reload();
});
},
onCancel() {
console.log('Cancel');
},
});
};
//
const onClose = () => {
visible.value = false;
delIds.value = [];
formState.value = {
orgId: orgId.value,
};
formRef.value.resetFields();
};
//
const uploadVoucher = () => {
openUpload.value = true;
};
//
const handleOk = (e: MouseEvent) => {
console.log(e);
openUpload.value = false;
};
//
const fileList = ref<UploadProps['fileList']>([]);
const beforeUpload: UploadProps['beforeUpload'] = (file) => {
return false;
};
const handleChange = (info: UploadChangeParam) => {
fileList.value = [...info.fileList];
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList);
}
if (info.file.status === 'done') {
message.success(`${info.file.name} 文件上传成功`);
} else if (info.file.status === 'error') {
message.error(`${info.file.name} 文件上传失败`);
}
};
const delIds = ref([]);
const handleFileRemove = (file) => {
delIds.value.push(file.uid);
const newFileList = [];
fileList.value.forEach((item) => {
if (item.uid !== file.uid) {
newFileList.push(item);
}
});
fileList.value = newFileList;
};
//
const closeOpenUpload = () => {
openUpload.value = false;
};
//
const downLoadVisible = ref(false);
const downLoadColumns = [
{
title: '序号',
customRender: (text: any) => {
return text.index + 1;
},
},
{
title: '能源类型',
dataIndex: 'bizName',
},
{
title: '文件名',
dataIndex: 'fileName',
ellipsis: true,
},
{
title: '操作',
key: 'action',
},
];
const downLoadData = ref([]);
const selectedRowKeysSet = ref([]);
const onSelectionChangeSet = (selectedKeys, selectedRows) => {
selectedRowKeysSet.value = selectedKeys;
};
const downLoad = (record) => {
const deleteId = ref(new FormData());
deleteId.value.append('id', record.id);
const config = {
headers: {
responseType: 'blob',
},
};
fetch(uploadPic.download, deleteId.value, config)
.then((res) => {
// URL blob
const url = window.URL.createObjectURL(new Blob([res.data]));
// <a>
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', record.fileName); //
document.body.appendChild(link);
link.click();
// URL
window.URL.revokeObjectURL(url);
})
.catch((error) => {
console.error('下载图片失败:', error);
});
};
const onSubmitDownLoad = () => {
const deleteIds = ref(new FormData());
selectedRowKeysSet.value.forEach((item) => {
deleteIds.value.append('ids', item);
});
fetch(uploadPic.downloadZip, deleteIds.value)
.then((res) => {
// URL blob
const url = window.URL.createObjectURL(new Blob([res.data]));
// <a>
const link = document.createElement('a');
link.href = url;
debugger;
link.setAttribute('download', ''); //
document.body.appendChild(link);
link.click();
// URL
window.URL.revokeObjectURL(url);
onCloseDownLoad();
})
.catch((error) => {
console.error('下载图片失败:', error);
});
};
const onCloseDownLoad = () => {
selectedRowKeysSet.value = [];
downLoadVisible.value = false;
};
</script>
<style scoped lang="less">
:deep(.ant-table-title) {
display: flex;
}
:deep(.ant-table-container) {
padding: 0px 16px;
}
.buttonGroup {
margin-left: 1vw;
width: 30vw;
display: flex;
justify-content: space-around;
}
</style>
<style scoped>
th.column-money,
td.column-money {
text-align: right !important;
}
</style>

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

File diff suppressed because it is too large

39
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue

@ -61,7 +61,11 @@
</div>
</template>
</a-table> -->
<ns-view-list-table v-bind="tableConfig" :model="tableData" ref="mainRef" />
<ns-view-list-table
v-bind="tableConfig"
:model="tableData"
ref="mainRef"
:scroll="{ x: 1000 }" />
<a-pagination
:current="queryParams.pageNum"
:total="total"
@ -72,7 +76,7 @@
@change="onChange" />
<!-- 新增/编辑 -->
<a-drawer
:width="700"
:width="500"
:visible="visible"
:body-style="{ paddingBottom: '80px' }"
:footer-style="{ textAlign: 'right' }"
@ -85,7 +89,7 @@
:label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row>
<a-col :span="12">
<a-col :span="24">
<a-form-item ref="name" label="日期范围" name="dateRange">
<a-range-picker
v-model:value="formState.dateRange"
@ -93,16 +97,21 @@
valueFormat="YYYY-MM" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-col :span="24">
<a-form-item ref="name" label="排放因子" name="emissionFactors">
<ns-input v-model:value="formState.emissionFactors" disabled />
</a-form-item>
</a-col>
</a-row>
<span
key=""
style="font-size: 16px; font-weight: 700; color: rgba(51, 51, 51, 1); text-align: left">
因子列表
</span>
<a-row>
<a-col :span="12">
<a-form-item ref="name" label="关键词">
<ns-input v-model:value="selectData" />
<a-form-item ref="name">
<ns-input style="margin-top: 5px" v-model:value="selectData" @change="keyChange" />
</a-form-item>
</a-col>
</a-row>
@ -266,7 +275,7 @@
orgId: orgId.value,
});
const tableData = ref([]);
const emissionSources = ref();
const tableConfig = ref({
title: '排放因子库',
api: quickCalculation.queryCarbonEmissionPage,
@ -281,7 +290,7 @@
type: 'primary',
handle: () => {
visible.value = true;
getNewTable();
// getNewTable();
},
},
],
@ -305,6 +314,7 @@
title: '更新时间',
className: 'updateTime',
dataIndex: 'updateTime',
ellipsis: true,
},
{
title: '启用时间',
@ -335,6 +345,8 @@
formState.value.dateRange = [record.startTime, record.endTime];
formState.value.factorId = record.factorId;
visible.value = true;
emissionSources.value = record.emissionSources;
queryData.value.emissionSources = emissionSources.value;
getNewTable();
},
},
@ -384,7 +396,7 @@
//
const addNewData = () => {
visible.value = true;
getNewTable();
// getNewTable();
};
//
const selectedRowKeys = ref([]);
@ -404,6 +416,15 @@
newTableData.value = res.data.records;
});
};
const selectData = ref();
const keyChange = () => {
if (selectData.value === '') {
queryData.value.emissionSources = emissionSources.value;
} else {
queryData.value.emissionSources = selectData.value;
}
getNewTable();
};
//
const editData = (record) => {
selectedRowKeys.value = [record.factorId];

9
hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/config.ts

@ -8,13 +8,14 @@ export const voucherColumns = [
},
{
title: '日期',
dataIndex: 'age',
key: 'age',
dataIndex: 'updateTime',
key: 'updateTime',
ellipsis: true,
},
{
title: '文件名称',
dataIndex: 'address',
key: 'address 1',
dataIndex: 'fileName',
key: 'fileName',
ellipsis: true,
},
];

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

File diff suppressed because it is too large

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

@ -45,7 +45,7 @@
</template>
</a-tree>
</div>
<div class="bottom">
<!-- <div class="bottom">
<a-form style="width: 100%; margin: 0 auto">
<div class="ns-form-title"><div class="title">报告相关</div></div>
<div class="button" style="padding: 0 16px !important">
@ -53,80 +53,88 @@
<div :class="{ tplx: isClickedTplx }" @click="showTplx">碳排流向</div>
</div>
</a-form>
</div>
</div> -->
</div>
<div class="right">
<div style="display: flex">
<div class="ns-table-title ns-title-extra-box">排放源</div>
<a-button type="primary" style="margin-left: 12px" @click="changeParentData">返回</a-button>
</div>
<div style="display: flex; height: 100%" v-if="fillInPage">
<div class="mainLeft">
<a-tree
:expandedKeys="expandedKeysR"
:selectedKeys="selectedKeysR"
:checkedKeys="checkedKeys"
:tree-data="treeData"
@select="onSelectR"
block-node>
<template #title="data">
<div class="treeRow">
<div>
<span>{{ data.emissionSource }}</span>
</div>
<div class="actionMore">
<EditOutlined @click="editUnit(data)" />
<MinusCircleOutlined style="margin-left: 6px" @click="delUnit(data)" />
</div>
<a-button
type="primary"
@click="changeParentData"
style="position: absolute; right: 25px; top: 10px; z-index: 99">
返回
</a-button>
<a-tabs v-model:activeKey="activeKey" @change="handleTabChange" style="height: 100%">
<a-tab-pane key="1" tab="排放源">
<div style="display: flex; height: 100%">
<div class="mainLeft">
<a-tree
:expandedKeys="expandedKeysR"
:selectedKeys="selectedKeysR"
:checkedKeys="checkedKeys"
:tree-data="treeData"
@select="onSelectR"
block-node>
<template #title="data">
<div class="treeRow">
<div>
<span>{{ data.emissionSource }}</span>
</div>
<div class="actionMore">
<EditOutlined @click="editUnit(data)" />
<MinusCircleOutlined style="margin-left: 6px" @click="delUnit(data)" />
</div>
</div>
</template>
</a-tree>
<div class="addTreeNode">
<a-button type="primary" style="width: 100%" @click="addTreeNodeData"
>新增</a-button
>
</div>
</template>
</a-tree>
<div class="addTreeNode">
<a-button type="primary" style="width: 100%" @click="addTreeNodeData">新增</a-button>
</div>
<div class="mainRight">
<a-table
:columns="columns"
:data-source="data"
:pagination="false"
bordered
size="middle"
:scroll="{ y: 500 }">
<template #title>
<a-button type="primary" @click="downLoadVoucher">凭证</a-button>
</template>
<template #bodyCell="{ column, text, record }">
<template v-if="column.dataIndex === 'dataSources'">
<span v-if="record.dataSources">{{ record.dataSources.label }}</span>
</template>
<template v-if="column.dataIndex === 'carbonSource'">
<span v-if="record.carbonSource">{{ record.carbonSource.label }}</span>
</template>
<template v-if="column.key === 'action'">
<span>
<a @click="edit(record)">编辑</a>
</span>
</template>
</template>
</a-table>
</div>
</div>
</div>
<div class="mainRight">
</a-tab-pane>
<a-tab-pane key="2" tab="排放统计">
<a-table
:columns="columns"
:data-source="data"
:pagination="false"
:columns="pftjColumn"
:data-source="pftjData"
bordered
size="middle"
:scroll="{ y: 480 }">
<template #title>
<a-button type="primary" @click="downLoadVoucher">凭证</a-button>
</template>
:pagination="false"
:scroll="{ x: 2000, y: 500 }">
<template #bodyCell="{ column, text, record }">
<template v-if="column.dataIndex === 'dataSources'">
<span v-if="record.dataSources">{{ record.dataSources.label }}</span>
</template>
<template v-if="column.dataIndex === 'carbonSource'">
<span v-if="record.carbonSource">{{ record.carbonSource.label }}</span>
</template>
<template v-if="column.key === 'action'">
<span>
<a @click="edit(record)">编辑</a>
</span>
</template>
{{ text || '-' }}
</template>
</a-table>
</div>
</div>
<div v-if="isClickedPftj">
<a-table
:columns="pftjColumn"
:data-source="pftjData"
bordered
:pagination="false"
:scroll="{ x: 2000 }">
<template #bodyCell="{ column, text, record }">
{{ text || '-' }}
</template>
</a-table>
</div>
<div v-if="isClickedTplx" style="width: 100%; height: 100%">
<div ref="tplxChart" style="width: 100%; height: 68vh"></div>
</div>
</a-tab-pane>
<a-tab-pane key="3" tab="碳排流向">
<div ref="tplxChart" style="width: 100%; height: 68vh"></div>
</a-tab-pane>
</a-tabs>
</div>
<!-- 类别配置 -->
<a-drawer
@ -225,6 +233,7 @@
:columns="voucherColumns"
:data-source="voucherData"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectionChange }"
rowKey="id"
:pagination="false">
<template #bodyCell="{ column, text }">
<template v-if="column.dataIndex === 'name'">
@ -275,6 +284,7 @@
<a-tree-select
v-model:value="editFormState.collectionNode"
:tree-line="true"
@select="selectNode"
:tree-data="collectingNodes">
</a-tree-select>
</a-form-item>
@ -290,6 +300,7 @@
<a-form-item ref="name" label="关键字" name="emissionFactors">
<a-input-search
v-model:value="editFormState.emissionFactors"
@search="searchKey"
placeholder="请输入关键字" />
</a-form-item>
</a-col>
@ -300,7 +311,8 @@
:data-source="newTableData"
bordered
rowKey="id"
:scroll="{ y: 400 }"
:scroll="{ y: 300 }"
size="small"
style="margin-bottom: 10px"
:rowSelection="{
selectedRowKeys: selectedRowKeysEdit,
@ -310,24 +322,38 @@
:pagination="false">
</a-table>
<a-pagination
:current="queryParams.pageNum"
:current="queryData.pageNum"
:total="total"
:page-size="queryParams.pageSize"
:page-size="queryData.pageSize"
style="display: flex; justify-content: center; margin-top: 16px"
:show-size-changer="true"
:show-quick-jumper="true"
@change="onChange" />
<a-upload
<!-- <a-upload
v-model:file-list="fileList"
name="file"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
:headers="headers"
accept=".jpg,.jpeg,.png,.gif,.bmp,.pdf"
@remove="handleFileRemove"
:before-upload="beforeUpload"
@change="handleChange">
<a-button>
<upload-outlined></upload-outlined>
点击上传凭证
</a-button>
</a-upload>
</a-upload> -->
<a-upload-dragger
v-model:fileList="fileList"
name="file"
@remove="handleFileRemove"
:before-upload="beforeUpload"
@change="handleChange">
<p class="ant-upload-drag-icon">
<inbox-outlined></inbox-outlined>
</p>
<p class="ant-upload-hint">1.仅支持pdf格式文件或文件夹</p>
<p class="ant-upload-hint">2.文件名命名规则为能源种类_年份</p>
<p class="ant-upload-hint">3.每次上传自动覆盖</p>
</a-upload-dragger>
<template #footer>
<a-button style="margin-right: 8px" @click="onCloseEditData">取消</a-button>
<a-button type="primary" @click="submitEditData">确定</a-button>
@ -337,7 +363,7 @@
</template>
<script lang="ts" setup>
import { ref, watch, toRaw, defineEmits } from 'vue';
import { ref, watch, toRaw, defineEmits, nextTick } from 'vue';
import { http } from '/nerv-lib/util/http';
import { Pagination, Modal, message } from 'ant-design-vue';
import type { TreeProps, UploadChangeParam } from 'ant-design-vue';
@ -346,6 +372,7 @@
PlusCircleOutlined,
MinusCircleOutlined,
UploadOutlined,
InboxOutlined,
} from '@ant-design/icons-vue';
import * as echarts from 'echarts';
import { voucherColumns, drawerColumns } from '../config';
@ -353,6 +380,7 @@
energyConsumption,
carbonEmissionFactorLibrary,
carbonInventoryCheck,
uploadPic,
} from '/@/api/carbonEmissionFactorLibrary';
import { group } from '/@/api/deviceManage';
import { debug, log } from 'node:console';
@ -377,12 +405,12 @@
type: String,
},
});
const activeKey = ref('1');
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const fetch = (api, params = { orgId: orgId.value }) => {
return http.post(api, params);
const fetch = (api, params = { orgId: orgId.value }, config) => {
return http.post(api, params, config);
};
//
const x = 3;
@ -844,6 +872,9 @@
//
const openVoucher = ref(false);
const downLoadVoucher = () => {
fetch(carbonInventoryCheck.voucherDownloadList, { bizType: 2 }).then((res) => {
voucherData.value = res.data;
});
openVoucher.value = true;
};
const selectedRowKeys = ref([]);
@ -851,30 +882,36 @@
selectedRowKeys.value = selectedKeys;
};
const voucherData = [
{
key: '1',
name: 'John Brown',
age: 32,
address: 'New York No. 1 Lake Park, New York No. 1 Lake Park',
tags: ['nice', 'developer'],
},
{
key: '2',
name: 'Jim Green',
age: 42,
address: 'London No. 2 Lake Park, London No. 2 Lake Park',
tags: ['loser'],
},
{
key: '3',
name: 'Joe Black',
age: 32,
address: 'Sidney No. 1 Lake Park, Sidney No. 1 Lake Park',
tags: ['cool', 'teacher'],
},
];
const voucherData = ref([]);
const downLoadMore = () => {
const deleteIds = ref(new FormData());
selectedRowKeys.value.forEach((item) => {
deleteIds.value.append('ids', item);
});
const config = {
responseType: 'blob',
};
fetch(uploadPic.downloadZip, deleteIds.value, config)
.then((res) => {
// URL blob
const url = window.URL.createObjectURL(new Blob([res]));
// <a>
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', '碳盘查凭证.zip'); //
document.body.appendChild(link);
link.click();
// URL
window.URL.revokeObjectURL(url);
onCloseVoucher();
})
.catch((error) => {
console.error('下载图片失败:', error);
});
};
const onCloseVoucher = () => {
selectedRowKeys.value = [];
openVoucher.value = false;
};
//
@ -898,10 +935,11 @@
const queryData = ref({
orgId: orgId.value,
pageNum: 1,
pageSize: 999,
pageSize: 10,
});
const edit = (record) => {
getDictList();
// queryData.value.emissionSources = record.emissionFactors;
getNewTable();
editFormState.value.id = record.id;
editFormState.value.dataSources = record.dataSources;
@ -909,6 +947,15 @@
editFormState.value.collectionNode = record.carbonSource;
editFormState.value.factorId = record.factorId;
selectedRowKeysEdit.value = [record.factorId];
fetch(uploadPic.select, { bizId: record.id, bizType: 2 }).then((res) => {
fileList.value = res.data.map((item) => ({
uid: item.id.toString(), // 使id
name: item.fileName, //
status: 'done', //
type: 'done',
url: item.filePath, // URLURL
}));
});
editData.value = true;
};
const getNewTable = () => {
@ -917,6 +964,10 @@
total.value = res.data.total;
});
};
const searchKey = () => {
queryData.value.emissionSources = editFormState.value.emissionFactors;
getNewTable();
};
//
const canEdit = ref(false);
const automatic = ref(false);
@ -946,23 +997,37 @@
},
);
};
const selectNode = (value) => {
debugger;
};
//
const fileList = ref<UploadProps['fileList']>([]);
const beforeUpload: UploadProps['beforeUpload'] = (file) => {
return false;
};
const handleChange = (info: UploadChangeParam) => {
fileList.value = [...info.fileList];
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList);
}
if (info.file.status === 'done') {
message.success(`${info.file.name} file uploaded successfully`);
message.success(`${info.file.name} 文件上传成功`);
} else if (info.file.status === 'error') {
message.error(`${info.file.name} file upload failed.`);
message.error(`${info.file.name} 文件上传失败`);
}
};
const fileList = ref([]);
const headers = {
authorization: 'authorization-text',
const delIds = ref([]);
const handleFileRemove = (file) => {
delIds.value.push(file.uid);
const newFileList = [];
fileList.value.forEach((item) => {
if (item.uid !== file.uid) {
newFileList.push(item);
}
});
fileList.value = newFileList;
};
//
// ;
const submitEditData = () => {
editFormRef.value
.validate()
@ -978,8 +1043,33 @@
editFormState.value.collectionNode = editFormState.value.collectionNode.value;
}
fetch(carbonInventoryCheck.updateTable, editFormState.value).then((res) => {
editData.value = false;
getPFYTableList(getTableId.value);
if (fileList.value.length !== 0) {
const formData = ref(new FormData());
fileList.value.forEach((file) => {
if (file.type !== 'done') {
formData.value.append('files', file.originFileObj);
}
});
formData.value.append('bizType', 2);
formData.value.append('bizId', editFormState.value.id);
delIds.value.forEach((item) => {
formData.value.append('deleteList', item);
});
fetch(uploadPic.uploadfiles, formData.value)
.then((res) => {
message.success('操作成功!');
editData.value = false;
delIds.value = [];
getPFYTableList(getTableId.value);
})
.catch((error) => {
console.log('error', error);
});
} else {
editData.value = false;
delIds.value = [];
getPFYTableList(getTableId.value);
}
});
})
.catch((error) => {
@ -988,6 +1078,7 @@
};
const onCloseEditData = () => {
editData.value = false;
delIds.value = [];
editFormState.value = {
orgId: orgId.value,
};
@ -997,8 +1088,8 @@
};
//
const onChange = (pageNumber: number, size: number) => {
queryParams.value.pageNum = pageNumber;
queryParams.value.pageSize = size;
queryData.value.pageNum = pageNumber;
queryData.value.pageSize = size;
getNewTable();
};
// /
@ -1323,6 +1414,20 @@
chartInstance = echarts.init(tplxChart.value);
chartInstance.setOption(option);
};
const handleTabChange = (key) => {
console.log('Tab changed:', key);
//
if (key === '2') {
nextTick(() => {
getEmissionStatistic();
});
} else if (key === '3') {
nextTick(() => {
getCarbonFlowDirection();
});
}
};
//
const emit = defineEmits(['change-data']);
const changeParentData = () => {
@ -1348,7 +1453,7 @@
flex-direction: column;
.top {
position: relative;
height: 80%;
height: 100%;
margin-bottom: 20px;
.ns-form-title {
font-weight: bold;
@ -1427,10 +1532,13 @@
flex: 1;
min-width: 0;
height: 100%;
padding: @ns-gap;
background-color: @white;
border-radius: @ns-border-radius;
box-shadow: @ns-content-box-shadow;
position: relative;
:deep(.ant-tabs-content-holder) {
padding: 20px;
}
.ns-table-title {
text-align: left;
font-size: 16px;
@ -1487,4 +1595,8 @@
margin-left: 10%;
flex-direction: column;
}
:deep(.ant-upload.ant-upload-drag) {
height: 18vh;
margin-top: 10px;
}
</style>

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

@ -5,7 +5,12 @@
</div>
<!-- 填报页 -->
<div v-if="fillInPage" style="height: 100%">
<fillIn :reportId="reportId" :year="year" :startTime="startTime" :endTime="endTime" @change-data="updateData" />
<fillIn
:reportId="reportId"
:year="year"
:startTime="startTime"
:endTime="endTime"
@change-data="updateData" />
</div>
<!-- 新增报告弹窗 -->
<a-drawer
@ -33,7 +38,7 @@
<a-form-item label="报告周期" name="reportPeriod">
<a-select
v-model:value="formState.reportPeriod"
placeholder="请选择排放类型"
placeholder="请选择报告周期"
@change="selectChange">
<a-select-option value="1">年度</a-select-option>
<a-select-option value="2">月度</a-select-option>
@ -81,7 +86,9 @@
return year === Number(formState.value.reportYear) ? false : true;
}
};
const selectChange = (value) => {};
const selectChange = (value) => {
formState.value.reportScope = '';
};
// form
const rules: Record<string, Rule[]> = {
reportName: [{ required: true, message: '请输入报告名称', trigger: 'change' }],

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

@ -41,7 +41,7 @@
<div class="quantityTitle">基准值</div>
</div>
<div class="model">
<div class="quantity">
<div class="quantity" style="align-items: center; display: flex">
<img
width="20px"
height="28px"
@ -74,9 +74,7 @@
</div>
</div>
<div class="button" style="margin-bottom: 12px">
<a-button type="primary" :disabled="selectedRowKeys.length === 0" @click="editData">
批量设置
</a-button>
<a-button type="primary" @click="editData"> 批量设置 </a-button>
<a-button type="primary" style="margin-left: 6px" @click="setBasicData">
基准值设置
</a-button>
@ -137,20 +135,13 @@
:columns="drawerColumns"
:data-source="newTableData"
bordered
rowKey="id"
:rowKey="(record, index) => index"
:rowSelection="{
selectedRowKeys: selectedRowKeysSet,
onChange: onSelectionChangeSet,
type: 'radio',
}"
:pagination="false">
<template #bodyCell="{ column, text, record }">
<template v-if="column.key === 'action'">
<span>
<a @click="setBasic(record)">设为基准值</a>
</span>
</template>
</template>
</a-table>
<template #footer>
<a-button style="margin-right: 8px" @click="onClose">取消</a-button>
@ -206,9 +197,11 @@
itemizeId: props.parentId,
type: props.type,
});
const ids = ref([]);
const getTableData = () => {
fetch(carbonPlanning.detailedStatisticalDataTable, queryParams.value).then((res) => {
data.value = res.data;
ids.value = data.value.map((item) => item.id);
});
};
getTableData();
@ -261,7 +254,7 @@
const wrapperCol = { span: 18 };
const editData = (record) => {
open.value = true;
if (record) {
if (record.isLastYear) {
formState.value.ids = [record.id];
if (record.lastYear === '是') {
formState.value.isLastYear = 1;
@ -285,6 +278,13 @@
.validate()
.then(() => {
console.log('values', formState, toRaw(formState));
if (formState.value.ids === undefined) {
formState.value.ids = ids.value;
} else {
if (formState.value.ids[0] === undefined) {
formState.value.ids = ids.value;
}
}
fetch(carbonPlanning.batchOrUpdate, formState.value).then((res) => {
open.value = false;
formState.value = {};
@ -301,27 +301,42 @@
};
const visible = ref(false);
const selectedRowKeysSet = ref([]);
const referenceQuery = ref();
const onSelectionChangeSet = (selectedKeys, selectedRows) => {
selectedRowKeysSet.value = selectedKeys;
referenceQuery.value = selectedRows[0].referenceValue;
};
const drawerColumns = [
{
title: '年份',
dataIndex: 'emissionSources',
dataIndex: 'year',
},
{
title: '用电量',
dataIndex: 'emissionFactors',
},
{
title: '操作',
key: 'action',
dataIndex: 'referenceValue',
},
];
const newTableData = ref([]);
const setBasicData = () => {
fetch(carbonPlanning.benchmarkSetting, {
orgId: orgId.value,
type: props.type,
itemizeId: props.parentId,
}).then((res) => {
newTableData.value = res.data;
});
visible.value = true;
};
const onSubmit = () => {
fetch(carbonPlanning.benchmarkSubmit, {
ids: ids.value,
referenceValue: referenceQuery.value,
}).then((res) => {
visible.value = false;
selectedRowKeysSet.value = [];
getTableData();
});
};
const onClose = () => {
visible.value = false;
};

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

@ -8,6 +8,7 @@
v-if="selectedTime"
style="margin-left: 5%"
v-model:value="selectYearValue"
:disabled-date="disabledDate"
valueFormat="YYYY"
@change="changeYear"
picker="year" />
@ -35,6 +36,9 @@
:data-source="data"
bordered
:pagination="false"
row-key="itemizeId"
:onRow="onRow"
:customRow="customRow"
:scroll="{ x: 1300, y: 250 }">
<template #bodyCell="{ column, text, record }">
<template v-if="column.key === 'action'">
@ -48,7 +52,12 @@
</div>
</div>
<div class="totalContant" v-else>
<categoryDeatil @change-data="updateData" :parentId="parentId" :year="year" :type="type" :nodeName="nodeName" />
<categoryDeatil
@change-data="updateData"
:parentId="parentId"
:year="year"
:type="type"
:nodeName="nodeName" />
</div>
<!-- 新增节点 -->
<a-drawer :visible="visible" :width="500" @close="onClose" :footer-style="{ textAlign: 'right' }">
@ -110,6 +119,10 @@
const selectYearValue = ref<Dayjs>(dayjs(new Date().getFullYear().toString()));
const selectMonthValue = ref<Dayjs>(dayjs().startOf('year').month(0));
const electricTotal = ref(true);
const disabledDate = (current: any) => {
return current && current.year() > new Date().getFullYear();
};
// /
const monthStyles = ref('background: #f2f2f2');
const yearStyles = ref('background: #2778ff');
@ -122,7 +135,6 @@
selectedTime.value = false;
getMonthData();
getBallQuery.value.yearAndMonth = 'month';
getBallData();
getMonthPillarData();
};
const changeToYear = () => {
@ -133,7 +145,6 @@
selectedTime.value = true;
getYearData();
getBallQuery.value.yearAndMonth = 'year';
getBallData();
getYearPillarData();
};
// echarts
@ -143,6 +154,7 @@
orgId: orgId.value,
type: props.tabId,
year: selectYearValue.value.format('YYYY'),
selectedMonth: selectMonthValue.value.format('YYYY-DD'),
});
const xAxisData = ref([]);
const referenceValue = ref([]);
@ -155,15 +167,19 @@
budget.value = res.data.budget;
actualUsage.value = res.data.actualUsage;
drawPillarChart();
getBallQuery.value.selectActualUsage = res.data.selectActualUsage;
getBallData();
});
};
const getMonthPillarData = () => {
fetch(carbonPlanning.electricityUsageBackThen, getPillarQuery.value).then((res) => {
xAxisData.value = res.data.year;
xAxisData.value = res.data.yearMonth;
referenceValue.value = res.data.referenceValue;
budget.value = res.data.budget;
actualUsage.value = res.data.actualUsage;
drawPillarChart();
getBallQuery.value.selectActualUsage = res.data.selectActualUsage;
getBallData();
});
};
const drawPillarChart = () => {
@ -286,6 +302,7 @@
type: props.tabId,
year: selectYearValue.value.format('YYYY'),
yearAndMonth: 'year',
yearMonth: selectMonthValue.value.format('YYYY-DD'),
});
const ballValue = ref();
const getBallData = () => {
@ -439,15 +456,17 @@
});
const changeYear = () => {
yearQueryParams.value.year = selectYearValue.value;
year.value = selectYearValue.value;
getPillarQuery.value.year = selectYearValue.value;
getBallQuery.value.year = selectYearValue.value;
addTreeNode.value.year = selectYearValue.value;
getYearData();
getYearPillarData();
};
const getYearData = () => {
fetch(carbonPlanning.searchListByYear, yearQueryParams.value).then((res) => {
data.value = res.data;
res.data.forEach((item) => {
treeCheckedKeys.value.push((item.itemizeId).toString());
treeCheckedKeys.value.push(item.itemizeId.toString());
});
});
};
@ -460,7 +479,10 @@
});
const changeMonth = () => {
monthQueryParams.value.yearMonth = selectMonthValue.value;
getPillarQuery.value.selectedMonth = selectMonthValue.value;
getBallQuery.value.yearMonth = selectMonthValue.value;
getMonthData();
getMonthPillarData();
};
const getMonthData = () => {
fetch(carbonPlanning.searchListByMonth, monthQueryParams.value).then((res) => {
@ -481,6 +503,21 @@
type.value = props.tabId;
nodeName.value = record.itemizeName;
};
const customRow = (record) => {
return {
//
onClick: (event) => {
getPillarQuery.value.itemizeId = record.itemizeId;
getBallQuery.value.itemizeId = record.itemizeId;
if (selectedTime.value) {
getYearPillarData();
} else {
getMonthPillarData();
}
},
};
};
//
const updateData = (type) => {
electricTotal.value = type;

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

@ -78,7 +78,7 @@
}
});
} else if (key === '5') {
tabId.value = 4;
tabId.value = 5;
energyType.value = 'CARBON_EMISSIONS'
nextTick(() => {
if (carbonEmissionsRef.value) {
@ -87,7 +87,7 @@
}
});
} else if (key === '6') {
tabId.value = 5;
tabId.value = 4;
energyType.value = 'HEAT_SUPPLY'
nextTick(() => {
if (provideHotRef.value) {

1
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/dialogStyle.less

@ -39,7 +39,6 @@
.journal {
padding: 1% 3%;
width: 100%;
height: 150px;
background-color: rgba(0, 0, 0);
border-radius: 12px;
border: 2px solid transparent;

24
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.less

@ -16,26 +16,30 @@
perspective-origin: 850px -160px;
// 左上角区域切换功能
.btn-box {
width: 120px;
width: 100px;
position: sticky;
top: 10px;
left: 10px;
top: 15px;
margin-left: 10px;
display: flex;
flex-direction: column;
gap: 8px;
.btn-item {
cursor: pointer;
width: 100%;
height: 40px;
height: 35px;
border-radius: 4px;
background: rgba(39, 120, 255, 1);
// background: rgba(39, 120, 255, 1);
background: rgb(7, 72, 116);
border: 1px solid rgba(51, 199, 255, 1);
box-shadow: 0px 10px 15px rgba(0, 54, 136, 0.3);
font-size: 18px;
font-size: 16px;
color: white;
}
.btnActive {
background: rgba(39, 120, 255, 1);
}
.btn-item:hover {
color: black;
color: white;
}
}
// 大区分区
@ -128,7 +132,10 @@
justify-content: center;
align-items: center;
cursor: pointer;
}
}
}
.drawer-item {
position: relative;
// 抽屉关闭按钮
.drawer-box-out {
width: 30px;
@ -145,5 +152,4 @@
align-items: center;
cursor: pointer;
}
}

14
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue

@ -7,7 +7,7 @@
v-for="(item, index) in floorData"
:key="index"
class="btn-item"
:style="{ color: item.dataCode == thisFloor ? 'black' : 'white' }"
:class="{ btnActive: item.dataCode == thisFloor }"
@click="changeFloor(item.childList, item.dataCode)"
>{{ item.name }}</button
>
@ -36,14 +36,6 @@
:visible="item.visible" />
</div>
</div>
<!-- 右侧抽屉的触发按钮 -->
<div class="drawer-box-in" v-if="!visible" @click="toggleDrawer">
<double-left-outlined class="drawer-icon" style="color: white" />
</div>
<!-- 左侧抽屉的关闭按钮 -->
<div class="drawer-box-out" v-if="visible" @click="toggleDrawer">
<double-right-outlined class="drawer-icon" style="color: white" />
</div>
<!-- 右侧抽屉 -->
<a-drawer
v-model:visible="visible"
@ -56,6 +48,10 @@
id="drawer"
:maskStyle="{ 'background-color': 'rgba(0, 0, 0, 0)' }">
<a-tabs v-model:activeKey="activeKey">
<div class="drawer-box-out" @click="toggleDrawer">
<double-left-outlined v-if="!visible" class="drawer-icon" style="color: white" />
<double-right-outlined v-else class="drawer-icon" style="color: white" />
</div>
<a-tab-pane key="1" tab="控制面板">
<tabs1
ref="tabs1Ref"

24
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.less

@ -392,12 +392,22 @@
.zmhlbtn {
position: relative;
}
// 禁用图标
.anticon-stop {
position: absolute;
right: 3px;
bottom: 3px;
overflow: hidden;
.btn-back {
position: absolute;
width: 50px;
height: 50px;
right: -25px;
bottom: -30px;
transform: rotate(45deg);
background: orange;
// 禁用图标
.anticon-stop {
transform: rotate(-45deg) scale(0.9);
position: absolute;
left: 3px;
top: 15px;
}
}
}
}

565
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.vue

@ -1,243 +1,266 @@
<template>
<a-spin :spinning="isLoading">
<!-- 照明区域 -->
<div>
<div class="light-area">
<div class="light-area-tab"></div>
<span class="light-area-text">空调区域</span>
</div>
<!-- 照明区域按钮部分 -->
<div class="area">
<template v-if="!showAllButtonsArea">
<button
v-for="(button, index) in limitedButtons1"
:key="index"
:class="{ btn: true, selected: button.selected }"
@click="changeArea(button)">
{{ button.name }}
</button>
<div style="margin-top: 10px">
<span @click="showAllButtonsArea = true" class="openzm"><down-outlined /> 展开</span>
</div>
</template>
<template v-else>
<button
v-for="(button, index) in props.treeData"
:key="index"
:class="{ btn: true, selected: button.selected }"
@click="changeArea(button)">
{{ button.name }}
</button>
<div style="margin-top: 10px">
<span @click="showAllButtonsArea = false" class="openzm"><up-outlined /> 回缩</span>
</div>
</template>
</div>
<!-- 空调区域 -->
<div>
<div class="light-area">
<div class="light-area-tab"></div>
<span class="light-area-text">空调区域</span>
</div>
<!-- 空调分组部分 -->
<div>
<div class="circuit-area">
<div class="circuit-tab"></div>
<span class="circuit-text">空调分组</span>
<div class="btn2">
<!-- 空调区域按钮部分 -->
<div class="area">
<template v-if="!showAllButtonsArea">
<button
v-for="(button, index) in limitedButtons1"
:key="index"
:class="{ btn: true, selected: button.selected }"
@click="changeArea(button)">
{{ button.name }}
</button>
<div style="margin-top: 10px">
<span @click="showAllButtonsArea = true" class="openzm"><down-outlined /> 展开</span>
</div>
</template>
<template v-else>
<button
v-for="(button, index) in props.treeData"
:key="index"
:class="{ btn: true, selected: button.selected }"
@click="changeArea(button)">
{{ button.name }}
</button>
<div style="margin-top: 10px">
<span @click="showAllButtonsArea = false" class="openzm"><up-outlined /> 回缩</span>
</div>
</template>
</div>
</div>
<!-- 空调分组部分 -->
<div>
<div class="circuit-area">
<div class="circuit-tab"></div>
<span class="circuit-text">空调分组</span>
<div class="btn2">
<a-badge :offset="[-10, 2]" :count="lockList.length">
<button
class="openPlan"
:class="{ enabled2: isPlanEnabled2, disabled2: !isPlanEnabled2 }"
@click="togglePlan2">
{{ isPlanEnabled2 ? '启用开关' : '禁用开关' }}
</button>
<a-switch
v-model:checked="selectAllCheckbox"
:disabled="singleSelection"
:class="{
'blue-background': selectAllCheckbox,
'grey-background': !selectAllCheckbox,
}"
@change="toggleAllSelection" />
<button class="allBtn">全选</button>
<button class="both" @click="selectAll">
{{ singleSelection ? '多选' : '单选' }}
</button>
</div>
</div>
<div class="btnArea">
<template v-if="!showAllButtons">
<button
v-for="(button, index) in limitedButtons2"
:key="index"
:class="{ btn: true, selected: button.selected }"
class="zmhlbtn"
@click="changeLine(button)">
<stop-outlined v-if="button.ctrlStatus" />
{{ button.name }}
</button>
<div style="margin-top: 10px">
<span @click="showAllButtons = true" class="openzm"><down-outlined /> 展开</span>
</div>
</template>
<template v-else>
<button
v-for="(button, index) in buttons2"
:key="index"
:class="{ btn: true, selected: button.selected }"
class="zmhlbtn"
@click="changeLine(button)">
<stop-outlined v-if="button.ctrlStatus" />
{{ button.name }}
</button>
<div style="margin-top: 10px">
<span @click="showAllButtons = false" class="openzm"><up-outlined /> 回缩</span>
</div>
</template>
</a-badge>
<a-switch
v-model:checked="selectAllCheckbox"
:disabled="singleSelection"
:class="{
'blue-background': selectAllCheckbox,
'grey-background': !selectAllCheckbox,
}"
@change="toggleAllSelection" />
<button class="allBtn">全选</button>
<button class="both" @click="selectAll">
{{ singleSelection ? '多选' : '单选' }}
</button>
</div>
</div>
<!-- 控制模式部分 -->
<div v-show="thisButton2.dataCode">
<div class="control-area">
<div class="control-tab"></div>
<span class="control-text">控制模式</span>
</div>
<!-- 控制模式按钮部分 -->
<div class="control-mode-btn-area">
<div class="btnArea">
<template v-if="!showAllButtons">
<button
v-for="(button3, index) in thisButton2.childList"
v-for="(button, index) in limitedButtons2"
:key="index"
class="btn"
:class="{ selected: button3.selectAble }"
@click="selectButton3(button3)">
{{ button3.name }}
:class="{ btn: true, selected: button.selected }"
class="zmhlbtn"
@click="changeLine(button)">
<div v-if="button.lockStatus" class="btn-back">
<stop-outlined />
</div>
{{ button.name }}
</button>
</div>
</div>
<!-- 控制场景部分 -->
<div v-show="thisButton2.dataCode">
<div class="control-scene-area">
<div class="control-scene-tab"></div>
<span class="control-scene-text">启动模式</span>
<div v-if="!singleSelection" style="flex: 1; color: red; text-align: right"
>多选模式下会修改当前选中的所有回路</div
>
</div>
<!-- 控制场景按钮部分 -->
<div class="control-scene-btn-area">
<div style="margin-top: 10px">
<span @click="showAllButtons = true" class="openzm"><down-outlined /> 展开</span>
</div>
</template>
<template v-else>
<button
v-for="(button4, index) in thisButton3.childList"
v-for="(button, index) in buttons2"
:key="index"
:class="{ btn: true, selected: button4.executeStatus.value != 0 }"
@click="selectButton4(button4)">
{{ button4.name }}
:class="{ btn: true, selected: button.selected }"
class="zmhlbtn"
@click="changeLine(button)">
<div v-if="button.lockStatus" class="btn-back">
<stop-outlined />
</div>
{{ button.name }}
</button>
</div>
<div style="margin-top: 10px">
<span @click="showAllButtons = false" class="openzm"><up-outlined /> 回缩</span>
</div>
</template>
</div>
<!-- 底部按钮区 -->
<div class="bottom">
<a-badge :offset="[-10, 2]" :count="changeList.length">
<a-popconfirm
title="刷新将会取消已作出的修改"
ok-text="确定"
cancel-text="取消"
@confirm="refresh(false)"
@cancel="changeCancel">
<button class="flushed">刷新</button>
</a-popconfirm>
</a-badge>
<a-spin :spinning="buttonLoading">
<button class="execute" @click="showModal">执行</button>
</a-spin>
</div>
<!-- 控制模式部分 -->
<div v-show="thisButton2.dataCode">
<div class="control-area">
<div class="control-tab"></div>
<span class="control-text">控制模式</span>
</div>
<!-- 控制模式按钮部分 -->
<div class="control-mode-btn-area">
<button
v-for="(button3, index) in thisButton2.childList"
:key="index"
class="btn"
:class="{ selected: button3.selectAble }"
@click="selectButton3(button3)">
{{ button3.name }}
</button>
</div>
</div>
<!-- 控制场景部分 -->
<div v-show="thisButton2.dataCode">
<div class="control-scene-area">
<div class="control-scene-tab"></div>
<span class="control-scene-text">启动模式</span>
<div v-if="!singleSelection" style="flex: 1; color: red; text-align: right"
>多选模式下会修改当前选中的所有回路</div
>
</div>
<!-- 控制场景按钮部分 -->
<div class="control-scene-btn-area">
<button
v-for="(button4, index) in thisButton3.childList"
:key="index"
:class="{ btn: true, selected: button4.executeStatus.value != 0 }"
@click="selectButton4(button4)">
{{ button4.name }}
</button>
</div>
</div>
<!-- 底部按钮区 -->
<div class="bottom">
<a-badge :offset="[-10, 2]" :count="changeList.length">
<a-popconfirm
title="刷新将会取消已作出的修改"
ok-text="确定"
cancel-text="取消"
@confirm="refresh(false)"
@cancel="changeCancel">
<button class="flushed">刷新</button>
</a-popconfirm>
</a-badge>
<button class="execute" @click="showModal">执行</button>
</div>
<!-- 点击执行时的弹出框 -->
<div class="out-dialog" v-if="executeVisible">
<div class="content">
<div>
<div class="div-operation"></div>
<span class="text-operation">变更内容 </span>
</div>
<div class="j-box" v-for="item in diffList" :key="item.id">
<div class="journal" style="margin-top: 20px">
<div class="imgText">
<div class="zjzm">
<img class="title-img" src="/asset/image//bulbLogo/21961.png" alt="" />&nbsp;
<span
class="title-text"
style="font-size: 20px; font-weight: 500; color: rgba(255, 255, 255, 1)"
>{{ item.regionName + ' > ' + item.deviceGroupName }}</span
>
<!-- 点击执行时的弹出框 -->
<div class="out-dialog" v-if="executeVisible">
<div class="content">
<div>
<div class="div-operation"></div>
<span class="text-operation">变更内容 </span>
</div>
<div class="j-box" v-for="item in diffList" :key="item.id">
<div class="journal" style="margin-top: 20px">
<div class="imgText">
<div class="zjzm">
<img class="title-img" src="/asset/image//bulbLogo/21961.png" alt="" />&nbsp;
<span
class="title-text"
style="font-size: 20px; font-weight: 500; color: rgba(255, 255, 255, 1)"
>{{ item.regionName + ' > ' + item.deviceGroupName }}</span
>
</div>
<a-popconfirm
title="此操作将会撤销修改"
ok-text="确定"
cancel-text="取消"
@confirm="delBtn(item)"
@cancel="changeCancel">
<button class="cxbtn">撤销</button>
</a-popconfirm>
</div>
<div class="btn-box">
<div class="btn-item">
<div class="left">控制模式</div>
<div class="right">
<span>手动</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>自动</span>
</div>
<a-popconfirm
title="此操作将会撤销修改"
ok-text="确定"
cancel-text="取消"
@confirm="delBtn(item)"
@cancel="changeCancel">
<button class="cxbtn">撤销</button>
</a-popconfirm>
</div>
<div class="btn-box">
<div class="btn-item">
<div class="left">控制模式</div>
<div class="right">
<span>手动</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>自动</span>
</div>
<div class="btn-item">
<div class="left"> 亮度 </div>
<div class="right">
<!-- 数字0也会被判为false故只判断undefined null -->
<span>{{
item?.stateBefore?.brightness != undefined ? item.stateBefore.brightness : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item?.stateAfter?.brightness != undefined ? item.stateAfter.brightness : '--'
}}</span>
</div>
<div class="btn-item">
<div class="left"> 亮度 </div>
<div class="right">
<!-- 数字0也会被判为false故只判断undefined null -->
<span>{{
item?.stateBefore?.brightness != undefined ? item.stateBefore.brightness : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item?.stateAfter?.brightness != undefined ? item.stateAfter.brightness : '--'
}}</span>
</div>
</div>
<div class="btn-item">
<div class="left"> 控制场景 </div>
<div class="right">
<span>{{
item?.stateBefore?.scene?.label ? item.stateBefore.scene.label : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item?.stateAfter?.scene?.label ? item.stateAfter.scene.label : '--'
}}</span>
</div>
<div class="btn-item">
<div class="left"> 控制场景 </div>
<div class="right">
<span>{{
item?.stateBefore?.scene?.label ? item.stateBefore.scene.label : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item?.stateAfter?.scene?.label ? item.stateAfter.scene.label : '--'
}}</span>
</div>
</div>
<div class="btn-item">
<div class="left"> 色温 </div>
<div class="right">
<span>{{
item?.stateBefore?.color != undefined ? item.stateBefore.color : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>
{{ item?.stateAfter?.color != undefined ? item.stateAfter.color : '--' }}
</span>
</div>
<div class="btn-item">
<div class="left"> 色温 </div>
<div class="right">
<span>{{
item?.stateBefore?.color != undefined ? item.stateBefore.color : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>
{{ item?.stateAfter?.color != undefined ? item.stateAfter.color : '--' }}
</span>
</div>
</div>
<div class="btn-item">
<div class="left"> 启用状态 </div>
<div class="right">
<span>{{
item?.stateBefore?.lockStatus != undefined
? item.stateBefore.lockStatus
? '禁用'
: '启用'
: '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>
{{
item?.stateAfter?.lockStatus != undefined
? item.stateAfter.lockStatus
? '禁用'
: '启用'
: '--'
}}
</span>
</div>
</div>
</div>
</div>
</div>
<div style="width: 100%; height: 60px"></div>
<div class="button-box">
<button class="cancel" @click="executeVisible = false">取消</button>
<a-popconfirm
title="此操作将提交以上修改内容"
ok-text="确定"
cancel-text="取消"
@confirm="submitChangeList"
@cancel="changeCancel">
<button class="execute">执行</button>
</a-popconfirm>
</div>
</div>
</a-spin>
<div style="width: 100%; height: 60px"></div>
<div class="button-box">
<button class="cancel" @click="executeVisible = false">取消</button>
<a-popconfirm
title="此操作将提交以上修改内容"
ok-text="确定"
cancel-text="取消"
@confirm="submitChangeList"
@cancel="changeCancel">
<button class="execute">执行</button>
</a-popconfirm>
</div>
</div>
</template>
<script setup lang="ts">
@ -304,48 +327,67 @@
emit('changeArea', button.id);
// -
resetMode();
// -
handleButton.value = '';
};
// 8
const limitedButtons1 = computed(() => props.treeData.slice(0, 8));
// ======================================================================
// id
const handleButton = ref('');
// /
const isPlanEnabled2 = ref(true);
const isPlanEnabled2 = ref(false);
//
const lockList = ref<any>([]);
// /
const togglePlan2 = () => {
//
if (handleButton.value == '') {
return message.info('请选择空调分组');
}
//
const btn: any = buttons2.value.find((button: any) => button.id === handleButton.value);
let panel = +!btn.ctrlStatus;
isLoading.value = true;
http
.get(lightingManage.setDisable, {
deviceGroup: btn.dataCode,
panel,
projectId: state.projectId,
siteId: state.siteId,
})
.then((res) => {
if (res.msg === 'success') {
// - - - loading
isPlanEnabled2.value = !isPlanEnabled2.value;
btn.ctrlStatus = panel;
isLoading.value = false;
// 线
let valid = buttons2.value.filter((item: any) => {
return item.selected;
});
// 线
if (valid.length == 0) {
return message.info('请先选择线路');
// 线
} else {
//
isPlanEnabled2.value = !isPlanEnabled2.value;
//
let after = +isPlanEnabled2.value;
// 线
valid.forEach((item: any) => {
//
if (item.lockStatus == after) {
return;
}
//
const same = lockList.value.find((v: any) => {
return v.deviceGroup == item.dataCode;
});
//
if (same) {
//
if (same.before == after) {
lockList.value.forEach((v1: any, index: number) => {
if (same.deviceGroup == v1.deviceGroup) {
lockList.value.splice(index, 1);
}
});
// true false
}
//
} else {
isLoading.value = false;
lockList.value.push({
deviceGroup: item.dataCode,
deviceGroupName: item.name,
region: item.treePid,
regionName: '',
before: item.lockStatus,
lockStatus: after,
});
}
})
.catch(() => {
isLoading.value = false;
//
item.lockStatus = after;
});
}
};
//
@ -399,8 +441,6 @@
});
//
const changeLine = (button: any) => {
// ID/
handleButton.value = button.id;
// /
if (button.ctrlStatus) {
isPlanEnabled2.value = true;
@ -449,7 +489,7 @@
console.log(thisButton2, 'button');
};
//
//
const buttons2 = ref([]);
//
const showAllButtons = ref(false);
@ -612,9 +652,6 @@
// ======================================================================
const isLoading = ref(false);
// loading
const buttonLoading = ref(false);
//
const refresh = (reload = false) => {
//
@ -631,6 +668,12 @@
});
}
changeList.value = [];
if (!reload) {
lockList.value.forEach((item: any) => {
resetLockList(item);
});
}
lockList.value = [];
//
let data = props.treeData[0];
//
@ -640,6 +683,18 @@
// 线
resetMode();
};
// /
const resetLockList = (item: any) => {
props.treeData.find((v: any) => {
if (item.region == v.dataCode) {
v.childList.find((v1: any) => {
if (item.deviceGroup == v1.dataCode) {
v1.lockStatus = item.before;
}
});
}
});
};
//
const resetChangeList = (item: any) => {
props.treeData.find((v: any) => {
@ -675,11 +730,10 @@
if (!changeList.value.length) {
return message.info('未产生任何修改');
}
buttonLoading.value = true;
http
.post(airConditionControl.getChangeList, {
sceneList: changeList.value,
lockList: [],
lockList: lockList.value,
projectId: state.projectId,
siteId: state.siteId,
})
@ -690,11 +744,8 @@
} else {
message.warning('获取修改内容失败');
}
buttonLoading.value = false;
})
.catch(() => {
buttonLoading.value = false;
});
.catch(() => {});
};
//
const changeCancel = () => {};
@ -714,17 +765,19 @@
obj.scene = obj.stateAfter.scene.value;
obj.before = obj.stateBefore.scene.value;
resetChangeList(obj);
resetLockList(obj);
// changeList diffList ()
changeList.value = changeList.value.filter((item: any) => {
return item.deviceGroup !== obj.deviceGroup;
});
lockList.value = lockList.value.filter((item: any) => {
return item.deviceGroup !== obj.deviceGroup;
});
diffList.value = diffList.value.filter((item: any) => {
return item.deviceGroup !== obj.deviceGroup;
});
console.log(changeList, 'changeList');
console.log(diffList, 'diffList');
//
if (changeList.value.length == 0) {
if (changeList.value.length == 0 && lockList.value.length == 0) {
executeVisible.value = false;
}
};
@ -733,7 +786,7 @@
http
.post(airConditionControl.submitChangeList, {
sceneList: changeList.value,
lockList: [],
lockList: lockList.value,
projectId: state.projectId,
siteId: state.siteId,
})

4
hx-ai-intelligent/src/view/equipmentControl/electricDoor/index.vue

@ -117,10 +117,10 @@
clearInterval(intervalId);
});
const tables = ref(null);
const customRow = (record) => {
const customRow = (record: any) => {
return {
//
onClick: (event) => {
onClick: () => {
detailed.value = !detailed.value;
infoObject.value = record;
tables.value.toggle(record);

BIN
hx-ai-intelligent/src/view/equipmentControl/image/floor-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

BIN
hx-ai-intelligent/src/view/equipmentControl/image/floor-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
hx-ai-intelligent/src/view/equipmentControl/image/floor1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

BIN
hx-ai-intelligent/src/view/equipmentControl/image/floor2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

2
hx-ai-intelligent/src/view/equipmentControl/liftSystem/index.vue

@ -152,7 +152,7 @@
//
--unknown: #a742ff;
//
--size: 40px;
--size: 36px;
width: 100%;
height: 100%;
position: relative;

17
hx-ai-intelligent/src/view/equipmentControl/liftSystem/liftInfo.vue

@ -174,20 +174,20 @@
.info-box {
//
--text: rgb(20, 255, 255);
width: 224.54px;
height: 110px;
width: 180px;
height: 95px;
display: flex;
gap: 5px;
flex-direction: column;
background: rgb(17, 44, 86, 0.9);
border-radius: 8px;
box-sizing: border-box;
padding: 8px;
padding: 4px 6px;
border: 2px solid var(--text);
transform: translateY(-50%);
cursor: pointer;
//
.box-title {
font-size: 14px;
height: auto;
color: var(--text);
//
@ -222,12 +222,12 @@
justify-content: center;
// border: 1px solid red;
.icon {
width: 45px;
height: 45px;
width: 40px;
height: 40px;
background-image: url(../image/box.svg);
background-size: 130% 130%;
background-repeat: no-repeat;
background-position: left -6.5px top -3px;
background-position: left -5px top -2px;
// border: 1px solid red;
position: relative;
.icon-item {
@ -242,12 +242,13 @@
img {
width: 100%;
height: 100%;
user-select: none;
}
}
}
}
.item-text {
margin-top: 2px;
margin-top: 0px;
height: 20px;
text-align: center;
font-size: 12px;

2
hx-ai-intelligent/src/view/equipmentControl/liftSystem/liftPage.vue

@ -231,10 +231,12 @@
:deep(.ant-pagination-prev) {
background-color: rgba(0, 0, 0, 1) !important;
border: 1px solid rgba(147, 200, 243, 1) !important;
margin-right: 6px !important;
}
:deep(.ant-pagination-next) {
background-color: rgba(0, 0, 0, 1) !important;
border: 1px solid rgba(147, 200, 243, 1) !important;
margin-left: 6px !important;
}
:deep(.anticon) {
color: rgba(12, 140, 246, 1) !important;

1
hx-ai-intelligent/src/view/equipmentControl/lightingManage/dialogStyle.less

@ -39,7 +39,6 @@
.journal {
padding: 1% 3%;
width: 100%;
height: 150px;
background-color: rgba(0, 0, 0);
border-radius: 12px;
border: 2px solid transparent;

135
hx-ai-intelligent/src/view/equipmentControl/lightingManage/index.less

@ -10,42 +10,49 @@
width: 1280px;
height: 720px;
user-select: none;
background-image: url(../image/bg.jpg);
background-image: url(../image/floor-1.png);
background-size: 100% 100%;
background-repeat: no-repeat;
background-color: linear-gradient(top to bottom,#c0deff, #8eadf0);
// 由于背景是俯视图,会产生有交点的透视效果,故使用透视属性
perspective: 1000px;
perspective-origin: 850px -160px;
perspective: 900px;
perspective-origin: 900px -120px;
// 左上角区域切换功能
.btn-box {
width: 120px;
width: 100px;
position: sticky;
top: 10px;
left: 10px;
top: 15px;
margin-left: 10px;
display: flex;
flex-direction: column;
gap: 8px;
.btn-item {
cursor: pointer;
width: 100%;
height: 40px;
height: 35px;
border-radius: 4px;
background: rgba(39, 120, 255, 1);
// background: rgba(39, 120, 255, 1);
background: rgb(7, 72, 116);
border: 1px solid rgba(51, 199, 255, 1);
box-shadow: 0px 10px 15px rgba(0, 54, 136, 0.3);
font-size: 18px;
font-size: 16px;
color: white;
}
.btnActive {
background: rgba(39, 120, 255, 1);
}
.btn-item:hover {
color: black;
color: white;
}
}
// 大区分区
.area{
position: absolute;
bottom: 170px;
left: 240px;
width: 780px;
height: 240px;
transform: rotateX(79deg) rotateZ(-22deg) skew(29deg);
bottom: 210px;
left: 250px;
width: 700px;
height: 270px;
transform: rotateX(73deg) rotateZ(338deg) skew(31deg);
display: flex;
gap: 5px;
.area1 {
@ -89,7 +96,95 @@
}
.area-item {
cursor: pointer;
transition: all ease 0.2s;
transition: transform ease 0.2s;
>.light-group {
height: 100%;
flex: 1;
display:flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
padding: 10px;
// border: 2px solid red;
.shadow-box {
width: 30px;
height: 220px;
border-radius: 20px;
background: rgba(0, 0, 0, 0.2);
}
}
}
}
}
.lightingImgBox1 {
position: relative;
width: 1280px;
height: 720px;
user-select: none;
background-image: url(../image/floor-2.png);
background-size: 100% 100%;
background-repeat: no-repeat;
background-color: linear-gradient(top to bottom,#c0deff, #8eadf0);
// 由于背景是俯视图,会产生有交点的透视效果,故使用透视属性
perspective: 900px;
perspective-origin: 900px -120px;
// 左上角区域切换功能
.btn-box {
width: 100px;
position: sticky;
top: 15px;
margin-left: 10px;
display: flex;
flex-direction: column;
gap: 8px;
.btn-item {
cursor: pointer;
width: 100%;
height: 35px;
border-radius: 4px;
// background: rgba(39, 120, 255, 1);
background: rgb(7, 72, 116);
border: 1px solid rgba(51, 199, 255, 1);
box-shadow: 0px 10px 15px rgba(0, 54, 136, 0.3);
font-size: 16px;
color: white;
}
.btnActive {
background: rgba(39, 120, 255, 1);
}
.btn-item:hover {
color: white;
}
}
// 大区分区
.area{
position: absolute;
bottom: 320px;
left: 240px;
width: 950px;
height: 270px;
transform: rotateX(76deg) rotateZ(-22deg) skew(30deg);
display: flex;
justify-content: space-between;
gap: 5px;
.area1 {
width: 170px;
background: rgba(0, 251, 91, 0.3);
border: 2px solid rgb(0, 251, 91);
display: flex;
}
.area2 {
width: 150px;
background: rgba(255, 165, 0, 0.3);
border: 2px solid rgb(255, 165, 0);
display: flex;
}
.area-item:hover {
transform: scale(1.05);
}
.area-item {
cursor: pointer;
transition: transform ease 0.2s;
>.light-group {
height: 100%;
flex: 1;
@ -101,7 +196,7 @@
// border: 2px solid red;
.shadow-box {
width: 30px;
height: 200px;
height: 230px;
border-radius: 20px;
background: rgba(0, 0, 0, 0.2);
}
@ -128,7 +223,10 @@
justify-content: center;
align-items: center;
cursor: pointer;
}
}
}
.drawer-item {
position: relative;
// 抽屉关闭按钮
.drawer-box-out {
width: 30px;
@ -145,5 +243,4 @@
align-items: center;
cursor: pointer;
}
}

114
hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue

@ -1,16 +1,20 @@
<template>
<div class="lighting-box">
<div class="lighting-img-box">
<div class="lighting-img-box" :class="{ lightingImgBox1: thisFloor == '2' }">
<!-- 左上角区域切换 -->
<div class="btn-box">
<button
<a-popconfirm
v-for="(item, index) in floorData"
:key="index"
class="btn-item"
:style="{ color: item.dataCode == thisFloor ? 'black' : 'white' }"
@click="changeFloor(item.childList, item.dataCode)"
>{{ item.name }}</button
>
title="切换楼层将取消当前的所有修改项"
ok-text="确定"
cancel-text="取消"
placement="bottomLeft"
@confirm="changeFloor(item.childList, item.dataCode)">
<button class="btn-item" :class="{ btnActive: item.dataCode == thisFloor }">{{
item.name
}}</button>
</a-popconfirm>
</div>
<!-- 楼层区域 -->
<div class="area">
@ -28,22 +32,9 @@
</div>
<!-- 照明设备 -->
<div class="lights">
<light
v-for="(item, index) in bulbs"
:key="index"
:styleObject="item.styleText"
:type="item.type"
:visible="item.visible" />
<light v-for="(blub, index) in bulbs" :key="index" :blub="blub" />
</div>
</div>
<!-- 右侧抽屉的触发按钮 -->
<div class="drawer-box-in" v-if="!visible" @click="toggleDrawer">
<double-left-outlined class="drawer-icon" style="color: white" />
</div>
<!-- 左侧抽屉的关闭按钮 -->
<div class="drawer-box-out" v-if="visible" @click="toggleDrawer">
<double-right-outlined class="drawer-icon" style="color: white" />
</div>
<!-- 右侧抽屉 -->
<a-drawer
v-model:visible="visible"
@ -55,13 +46,17 @@
:closable="false"
id="drawer"
:maskStyle="{ 'background-color': 'rgba(0, 0, 0, 0)' }">
<div class="drawer-box-out" @click="toggleDrawer">
<double-left-outlined v-if="!visible" class="drawer-icon" style="color: white" />
<double-right-outlined v-else class="drawer-icon" style="color: white" />
</div>
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="控制面板">
<tabs1
ref="tabs1Ref"
@changeArea="changeArea"
@reset="reset"
@reload="reload"
@changeArea="changeArea"
:treeData="treeData" />
</a-tab-pane>
<a-tab-pane key="2" tab="计划列表" force-render>
@ -77,6 +72,7 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { lightPosition, lightPosition1 } from './lightPosition';
//
import light from './light.vue';
import tabs1 from './tabs1.vue';
@ -112,7 +108,15 @@
const thisFloor = ref('1');
//
const changeFloor = (area: any, floor: string) => {
if (floor == thisFloor.value) {
return;
}
//
tabs1Ref.value.refresh(false);
//
bulbs.value = [];
thisFloor.value = floor;
getBulbs();
//
reset();
//
@ -131,56 +135,7 @@
// -
const area = ref(['1']);
// 线 -
const bulbs = ref([
{
styleText: { left: '180px', bottom: '200px' },
area: 1,
type: 1,
visible: true,
},
{
styleText: { left: '230px', bottom: '125px' },
area: 1,
type: 2,
visible: true,
},
{
styleText: { left: '320px', bottom: '140px' },
area: 1,
type: 3,
visible: true,
},
{
styleText: { left: '245px', bottom: '230px' },
area: 1,
type: 3,
visible: true,
},
{
styleText: { left: '405px', bottom: '230px' },
area: 2,
type: 3,
visible: true,
},
{
styleText: { left: '460px', bottom: '180px' },
area: 2,
type: 3,
visible: true,
},
{
styleText: { left: '360px', bottom: '275px' },
area: 2,
type: 3,
visible: true,
},
{
styleText: { left: '715px', bottom: '320px' },
area: 3,
type: 1,
visible: true,
},
]);
const bulbs = ref([]);
// 线
const changeArea = (result: any) => {
console.log(result, 'changeArea');
@ -282,14 +237,25 @@
// ==============================================
const getBulbs = () => {
const floor = thisFloor.value;
let arr: Array<Object> = [];
if (floor == '1') {
arr = lightPosition;
} else if (floor == '2') {
arr = lightPosition1;
}
http
.get(lightingManage.getBulbs, {
floor: thisFloor.value,
floor,
projectId: state.projectId,
siteId: state.siteId,
})
.then((res) => {
console.log(res);
const data = res.data;
data.forEach((item: any, index: number) => {
item.styleText = arr[index];
});
bulbs.value = data;
});
};

70
hx-ai-intelligent/src/view/equipmentControl/lightingManage/light.vue

@ -5,71 +5,69 @@
<div class="light-tag-tit">
<div>
<img src="/asset/image//bulbLogo/21962.png" alt="" />
<span class="tag-text">{{ result.name }}</span>
</div>
<button class="right-button">{{ type == 1 ? '正常' : '关闭' }}</button>
<span class="tag-text">{{ blub.regionName + ' > ' + blub.deviceGroupName }}</span></div
>
<button class="right-button">{{ blub.scene.label }}</button>
</div>
<div class="light-tag-box">
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">控制模式</span>
<span class="result">自动</span>
<span class="result">{{
blub.mode.label.indexOf('模式') != -1
? blub.mode.label.replace('模式', '')
: blub.mode.label
}}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">亮度</span>
<span class="result">{{ result.brightness }}</span>
<span class="result">{{ record.brightness + record.brightnessUnit }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">控制场景</span>
<span class="result">{{ result.automatic2 }}</span>
<span class="result">{{ blub.scene.label }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">色温</span>
<span class="result">{{ result.brightness3 }}</span>
<span class="result">{{ record.LwctemC + record.LwctemCUnit }}</span>
</div>
</div>
</div>
</template>
<div class="icon-box" :style="styleObject" v-show="visible">
<img v-if="type == 1" class="icon-item" src="/asset/image/bulbLogo/22394.png" alt="" />
<img v-if="type == 2" class="icon-item" src="/asset/image/bulbLogo/22396.png" alt="" />
<img v-if="type == 3" class="icon-item" src="/asset/image/bulbLogo/22400.png" alt="" />
<div class="icon-box" :style="props.blub.styleText">
<img
v-if="blub.mode.value == 1"
class="icon-item"
src="/asset/image/bulbLogo/22394.png"
alt="" />
<img
v-if="blub.mode.value == 2"
class="icon-item"
src="/asset/image/bulbLogo/22396.png"
alt="" />
<img
v-if="blub.mode.value == 3"
class="icon-item"
src="/asset/image/bulbLogo/22400.png"
alt="" />
</div>
</a-popover>
</template>
<script setup lang="ts">
import { ref } from 'vue';
defineProps({
styleObject: Object,
type: Number,
visible: {
type: Boolean,
default: false,
},
});
const result = ref({
id: '1',
name: '站厅照明 1区',
manual: '手动',
automatic: '自动',
brightness: '100lux',
brightness2: '30lux',
manual2: '手动',
automatic2: '舒适',
brightness3: '4000k',
brightness4: '3800k',
const props = defineProps({
blub: Object,
});
const blub = props.blub;
const record = props.blub.record;
</script>
<style lang="less" scoped>
.icon-box {
width: 25px;
height: 25px;
width: 28px;
height: 40px;
position: absolute;
.icon-item {
@ -140,7 +138,7 @@
.result {
line-height: 50px;
font-size: 16px;
font-size: 14px;
font-weight: 700;
color: white;
}

62
hx-ai-intelligent/src/view/equipmentControl/lightingManage/lightPosition.ts

@ -1,3 +1,63 @@
// 此文件只定义light(即俯视图小灯泡)的位置信息
// 与显示状态和分组信息无关
export const lightPosition = [];
export const lightPosition = [
// 安检区A
{ left: '160px', bottom: '270px' },
{ left: '185px', bottom: '230px' },
{ left: '220px', bottom: '180px' },
{ left: '250px', bottom: '130px' },
// 站厅区B 1组
{ left: '240px', bottom: '290px' },
{ left: '260px', bottom: '260px' },
{ left: '280px', bottom: '230px' },
{ left: '310px', bottom: '190px' },
{ left: '330px', bottom: '160px' },
// 站厅区B 2组
{ left: '300px', bottom: '305px' },
{ left: '325px', bottom: '275px' },
{ left: '350px', bottom: '245px' },
{ left: '375px', bottom: '215px' },
{ left: '400px', bottom: '180px' },
// 站台区A 1组
{ left: '370px', bottom: '320px' },
{ left: '470px', bottom: '210px' },
// 站台区A 2组
{ left: '425px', bottom: '335px' },
{ left: '530px', bottom: '230px' },
// 站台区A 3组
{ left: '475px', bottom: '350px' },
{ left: '590px', bottom: '250px' },
// 站台区A 4组
{ left: '530px', bottom: '365px' },
{ left: '640px', bottom: '270px' },
// 一楼办公区
{ left: '570px', bottom: '390px' },
{ left: '605px', bottom: '365px' },
{ left: '640px', bottom: '340px' },
{ left: '675px', bottom: '315px' },
{ left: '710px', bottom: '290px' },
// 安保区 4 分组
{ left: '670px', bottom: '370px' },
{ left: '720px', bottom: '385px' },
{ left: '770px', bottom: '400px' },
{ left: '820px', bottom: '415px' },
// 一楼男厕A
{ left: '810px', bottom: '455px' },
{ left: '970px', bottom: '370px' },
{ left: '850px', bottom: '465px' },
{ left: '1010px', bottom: '385px' },
];
export const lightPosition1 = [
// 二楼办公区
{ left: '200px', bottom: '380px' },
{ left: '220px', bottom: '350px' },
{ left: '240px', bottom: '320px' },
{ left: '260px', bottom: '290px' },
{ left: '280px', bottom: '260px' },
//
{ left: '940px', bottom: '550px' },
{ left: '1110px', bottom: '480px' },
{ left: '990px', bottom: '560px' },
{ left: '1170px', bottom: '490px' },
];

24
hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.less

@ -413,12 +413,22 @@
.zmhlbtn {
position: relative;
}
// 禁用图标
.anticon-stop {
position: absolute;
right: 3px;
bottom: 3px;
overflow: hidden;
.btn-back {
position: absolute;
width: 50px;
height: 50px;
right: -25px;
bottom: -30px;
transform: rotate(45deg);
background: orange;
// 禁用图标
.anticon-stop {
transform: rotate(-45deg) scale(0.9);
position: absolute;
left: 3px;
top: 15px;
}
}
}
}

602
hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue

@ -1,243 +1,267 @@
<template>
<a-spin :spinning="isLoading">
<!-- 照明区域 -->
<div>
<div class="light-area">
<div class="light-area-tab"></div>
<span class="light-area-text"> 照明区域 </span>
</div>
<!-- 照明区域按钮部分 -->
<div class="area">
<template v-if="!showAllButtonsArea">
<button
v-for="(button, index) in limitedButtons1"
:key="index"
:class="{ btn: true, selected: button.selected }"
@click="changeArea(button)">
{{ button.name }}
</button>
<div style="margin-top: 10px">
<span @click="showAllButtonsArea = true" class="openzm"><down-outlined /> 展开</span>
</div>
</template>
<template v-else>
<button
v-for="(button, index) in props.treeData"
:key="index"
:class="{ btn: true, selected: button.selected }"
@click="changeArea(button)">
{{ button.name }}
</button>
<div style="margin-top: 10px">
<span @click="showAllButtonsArea = false" class="openzm"><up-outlined /> 回缩</span>
</div>
</template>
</div>
<!-- 照明区域 -->
<div>
<div class="light-area">
<div class="light-area-tab"></div>
<span class="light-area-text"> 照明区域 </span>
</div>
<!-- 照明区域按钮部分 -->
<div class="area">
<template v-if="!showAllButtonsArea">
<button
v-for="(button, index) in limitedButtons1"
:key="index"
:class="{ btn: true, selected: button.selected }"
@click="changeArea(button)">
{{ button.name }}
</button>
<div style="margin-top: 10px">
<span @click="showAllButtonsArea = true" class="openzm"><down-outlined /> 展开</span>
</div>
</template>
<template v-else>
<button
v-for="(button, index) in props.treeData"
:key="index"
:class="{ btn: true, selected: button.selected }"
@click="changeArea(button)">
{{ button.name }}
</button>
<div style="margin-top: 10px">
<span @click="showAllButtonsArea = false" class="openzm"><up-outlined /> 回缩</span>
</div>
</template>
</div>
<!-- 照明回路部分 -->
<div>
<div class="circuit-area">
<div class="circuit-tab"></div>
<span class="circuit-text">照明回路</span>
<div class="btn2">
</div>
<!-- 照明回路部分 -->
<div>
<div class="circuit-area">
<div class="circuit-tab"></div>
<span class="circuit-text">照明回路</span>
<div class="btn2">
<a-badge :offset="[-10, 2]" :count="lockList.length">
<button
class="openPlan"
:class="{ enabled2: isPlanEnabled2, disabled2: !isPlanEnabled2 }"
@click="togglePlan2">
{{ isPlanEnabled2 ? '启用开关' : '禁用开关' }}
</button>
<a-switch
v-model:checked="selectAllCheckbox"
:disabled="singleSelection"
:class="{
'blue-background': selectAllCheckbox,
'grey-background': !selectAllCheckbox,
}"
@change="toggleAllSelection" />
<button class="allBtn">全选</button>
<button class="both" @click="selectAll">
{{ singleSelection ? '多选' : '单选' }}
</button>
</div>
</div>
<div class="btnArea">
<template v-if="!showAllButtons">
<button
v-for="(button, index) in limitedButtons2"
:key="index"
:class="{ btn: true, selected: button.selected }"
class="zmhlbtn"
@click="changeLine(button)">
<stop-outlined v-if="button.ctrlStatus" />
{{ button.name }}
</button>
<div style="margin-top: 10px">
<span @click="showAllButtons = true" class="openzm"><down-outlined /> 展开</span>
</div>
</template>
<template v-else>
<button
v-for="(button, index) in buttons2"
:key="index"
:class="{ btn: true, selected: button.selected }"
class="zmhlbtn"
@click="changeLine(button)">
<stop-outlined v-if="button.ctrlStatus" />
{{ button.name }}
</button>
<div style="margin-top: 10px">
<span @click="showAllButtons = false" class="openzm"><up-outlined /> 回缩</span>
</div>
</template>
</a-badge>
<a-switch
v-model:checked="selectAllCheckbox"
:disabled="singleSelection"
:class="{
'blue-background': selectAllCheckbox,
'grey-background': !selectAllCheckbox,
}"
@change="toggleAllSelection" />
<button class="allBtn">全选</button>
<button class="both" @click="selectAll">
{{ singleSelection ? '多选' : '单选' }}
</button>
</div>
</div>
<!-- 控制模式部分 -->
<div v-show="thisButton2.dataCode">
<div class="control-area">
<div class="control-tab"></div>
<span class="control-text"> 控制模式 </span>
</div>
<!-- 控制模式按钮部分 -->
<div class="control-mode-btn-area">
<div class="btnArea">
<template v-if="!showAllButtons">
<button
v-for="(button3, index) in thisButton2.childList"
v-for="(button, index) in limitedButtons2"
:key="index"
class="btn"
:class="{ selected: button3.selectAble }"
@click="selectButton3(button3)">
{{ button3.name }}
:class="{ btn: true, selected: button.selected }"
class="zmhlbtn"
@click="changeLine(button)">
<div v-if="button.lockStatus" class="btn-back">
<stop-outlined />
</div>
{{ button.name }}
</button>
</div>
</div>
<!-- 控制场景部分 -->
<div v-show="thisButton2.dataCode">
<div class="control-scene-area">
<div class="control-scene-tab"></div>
<span class="control-scene-text"> 控制场景 </span>
<div v-if="!singleSelection" style="flex: 1; color: red; text-align: right"
>多选模式下会修改当前选中的所有回路</div
>
</div>
<!-- 控制场景按钮部分 -->
<div class="control-scene-btn-area">
<div style="margin-top: 10px">
<span @click="showAllButtons = true" class="openzm"><down-outlined /> 展开</span>
</div>
</template>
<template v-else>
<button
v-for="(button4, index) in thisButton3.childList"
v-for="(button, index) in buttons2"
:key="index"
:class="{ btn: true, selected: button4.executeStatus.value != 0 }"
@click="selectButton4(button4)">
{{ button4.name }}
:class="{ btn: true, selected: button.selected }"
class="zmhlbtn"
@click="changeLine(button)">
<div v-if="button.lockStatus" class="btn-back">
<stop-outlined />
</div>
{{ button.name }}
</button>
</div>
<div style="margin-top: 10px">
<span @click="showAllButtons = false" class="openzm"><up-outlined /> 回缩</span>
</div>
</template>
</div>
<!-- 底部按钮区 -->
<div class="bottom">
<a-badge :offset="[-10, 2]" :count="changeList.length">
<a-popconfirm
title="刷新将会取消已作出的修改"
ok-text="确定"
cancel-text="取消"
@confirm="refresh(false)"
@cancel="changeCancel">
<button class="flushed">刷新</button>
</a-popconfirm>
</a-badge>
<a-spin :spinning="buttonLoading">
<button class="execute" @click="showModal">执行</button>
</a-spin>
</div>
<!-- 控制模式部分 -->
<div v-show="thisButton2.dataCode">
<div class="control-area">
<div class="control-tab"></div>
<span class="control-text"> 控制模式 </span>
</div>
<!-- 控制模式按钮部分 -->
<div class="control-mode-btn-area">
<button
v-for="(button3, index) in thisButton2.childList"
:key="index"
class="btn"
:class="{ selected: button3.selectAble }"
@click="selectButton3(button3)">
{{ button3.name }}
</button>
</div>
</div>
<!-- 控制场景部分 -->
<div v-show="thisButton2.dataCode">
<div class="control-scene-area">
<div class="control-scene-tab"></div>
<span class="control-scene-text"> 控制场景 </span>
<div v-if="!singleSelection" style="flex: 1; color: red; text-align: right"
>多选模式下会修改当前选中的所有回路</div
>
</div>
<!-- 控制场景按钮部分 -->
<div class="control-scene-btn-area">
<button
v-for="(button4, index) in thisButton3.childList"
:key="index"
:class="{ btn: true, selected: button4.executeStatus.value != 0 }"
@click="selectButton4(button4)">
{{ button4.name }}
</button>
</div>
</div>
<!-- 底部按钮区 -->
<div class="bottom">
<a-badge :offset="[-10, 2]" :count="changeList.length">
<a-popconfirm
title="刷新将会取消已作出的修改"
ok-text="确定"
cancel-text="取消"
@confirm="refresh(false)"
@cancel="changeCancel">
<button class="flushed">刷新</button>
</a-popconfirm>
</a-badge>
<button class="execute" @click="showModal">执行</button>
</div>
<!-- 点击执行时的弹出框 -->
<div class="out-dialog" v-if="executeVisible">
<div class="content">
<div>
<div class="div-operation"></div>
<span class="text-operation">变更内容 </span>
</div>
<div class="j-box" v-for="(item, index) in diffList" :key="item.id">
<div class="journal" style="margin-top: 20px">
<div class="imgText">
<div class="zjzm">
<img class="title-img" src="/asset/image//bulbLogo/21961.png" alt="" />&nbsp;
<span
class="title-text"
style="font-size: 20px; font-weight: 500; color: rgba(255, 255, 255, 1)"
>{{ item.regionName + ' > ' + item.deviceGroupName }}</span
>
</div>
<a-popconfirm
title="此操作将会撤销修改"
ok-text="确定"
cancel-text="取消"
@confirm="delBtn(item)"
@cancel="changeCancel">
<button class="cxbtn">撤销</button>
</a-popconfirm>
<!-- 点击执行时的弹出框 -->
<div class="out-dialog" v-if="executeVisible">
<div class="content">
<div>
<div class="div-operation"></div>
<span class="text-operation">变更内容 </span>
</div>
<div class="j-box" v-for="item in diffList" :key="item.id">
<div class="journal" style="margin-top: 20px">
<div class="imgText">
<div class="zjzm">
<img class="title-img" src="/asset/image//bulbLogo/21961.png" alt="" />&nbsp;
<span
class="title-text"
style="font-size: 18px; font-weight: 500; color: rgba(255, 255, 255, 1)"
>{{ item.regionName + ' > ' + item.deviceGroupName }}</span
>
</div>
<a-popconfirm
title="此操作将会撤销修改"
ok-text="确定"
cancel-text="取消"
placement="bottomRight"
@confirm="delBtn(item)"
@cancel="changeCancel">
<button class="cxbtn">撤销</button>
</a-popconfirm>
</div>
<div class="btn-box">
<div class="btn-item">
<div class="left">控制模式</div>
<div class="right">
<span>手动</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>自动</span></div
>
</div>
<div class="btn-box">
<div class="btn-item">
<div class="left">控制模式</div>
<div class="right">
<span>手动</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>自动</span>
</div>
<div class="btn-item">
<div class="left"> 亮度 </div>
<div class="right">
<!-- 由于数字0也会被判为false故只判断undefined null -->
<span>{{
item?.stateBefore?.brightness != undefined ? item.stateBefore.brightness : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item?.stateAfter?.brightness != undefined ? item.stateAfter.brightness : '--'
}}</span>
</div>
<div class="btn-item">
<div class="left"> 亮度 </div>
<div class="right">
<!-- 由于数字0也会被判为false故只判断undefined null -->
<span>{{
item?.stateBefore?.brightness != undefined ? item.stateBefore.brightness : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item?.stateAfter?.brightness != undefined ? item.stateAfter.brightness : '--'
}}</span>
</div>
</div>
<div class="btn-item">
<div class="left"> 控制场景 </div>
<div class="right">
<span>{{
item?.stateBefore?.scene?.label ? item.stateBefore.scene.label : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item?.stateAfter?.scene?.label ? item.stateAfter.scene.label : '--'
}}</span>
</div>
<div class="btn-item">
<div class="left"> 控制场景 </div>
<div class="right">
<span>{{
item?.stateBefore?.scene?.label ? item.stateBefore.scene.label : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item?.stateAfter?.scene?.label ? item.stateAfter.scene.label : '--'
}}</span>
</div>
</div>
<div class="btn-item">
<div class="left"> 色温 </div>
<div class="right">
<span>{{
item?.stateBefore?.color != undefined ? item.stateBefore.color : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>
{{ item?.stateAfter?.color != undefined ? item.stateAfter.color : '--' }}
</span>
</div>
<div class="btn-item">
<div class="left"> 色温 </div>
<div class="right">
<span>{{
item?.stateBefore?.color != undefined ? item.stateBefore.color : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>
{{ item?.stateAfter?.color != undefined ? item.stateAfter.color : '--' }}
</span>
</div>
</div>
<div class="btn-item">
<div class="left"> 启用状态 </div>
<div class="right">
<span>{{
item?.stateBefore?.lockStatus != undefined
? item.stateBefore.lockStatus
? '禁用'
: '启用'
: '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>
{{
item?.stateAfter?.lockStatus != undefined
? item.stateAfter.lockStatus
? '禁用'
: '启用'
: '--'
}}
</span>
</div>
</div>
</div>
</div>
</div>
<div style="width: 100%; height: 60px"></div>
<div class="button-box">
<button class="cancel" @click="executeVisible = false">取消</button>
<a-popconfirm
title="此操作将提交以上修改内容"
ok-text="确定"
cancel-text="取消"
@confirm="submitChangeList"
@cancel="changeCancel">
<button class="execute">执行</button>
</a-popconfirm>
</div>
</div>
</a-spin>
<div style="width: 100%; height: 60px"></div>
<div class="button-box">
<button class="cancel" @click="executeVisible = false">取消</button>
<a-popconfirm
title="此操作将提交以上修改内容"
ok-text="确定"
cancel-text="取消"
@confirm="submitChangeList"
@cancel="changeCancel">
<button class="execute">执行</button>
</a-popconfirm>
</div>
</div>
</template>
<script setup lang="ts">
@ -303,48 +327,67 @@
emit('changeArea', button.id);
// -
resetMode();
// -
handleButton.value = '';
};
// 8
const limitedButtons1 = computed(() => props.treeData.slice(0, 8));
// ======================================================================
// id
const handleButton = ref('');
// /
const isPlanEnabled2 = ref(true);
const isPlanEnabled2 = ref(false);
//
const lockList = ref<any>([]);
// /
const togglePlan2 = () => {
//
if (handleButton.value == '') {
return message.info('请选择照明回路');
}
//
const btn: any = buttons2.value.find((button: any) => button.id === handleButton.value);
let panel = +!btn.ctrlStatus;
isLoading.value = true;
http
.get(lightingManage.setDisable, {
deviceGroup: btn.dataCode,
panel,
projectId: state.projectId,
siteId: state.siteId,
})
.then((res) => {
if (res.msg === 'success') {
// - - - loading
isPlanEnabled2.value = !isPlanEnabled2.value;
btn.ctrlStatus = panel;
isLoading.value = false;
// 线
let valid = buttons2.value.filter((item: any) => {
return item.selected;
});
// 线
if (valid.length == 0) {
return message.info('请先选择线路');
// 线
} else {
//
isPlanEnabled2.value = !isPlanEnabled2.value;
//
let after = +isPlanEnabled2.value;
// 线
valid.forEach((item: any) => {
//
if (item.lockStatus == after) {
return;
}
//
const same = lockList.value.find((v: any) => {
return v.deviceGroup == item.dataCode;
});
//
if (same) {
//
if (same.before == after) {
lockList.value.forEach((v1: any, index: number) => {
if (same.deviceGroup == v1.deviceGroup) {
lockList.value.splice(index, 1);
}
});
// true false
}
//
} else {
isLoading.value = false;
lockList.value.push({
deviceGroup: item.dataCode,
deviceGroupName: item.name,
region: item.treePid,
regionName: '',
before: item.lockStatus,
lockStatus: after,
});
}
})
.catch(() => {
isLoading.value = false;
//
item.lockStatus = after;
});
}
};
//
@ -398,8 +441,6 @@
});
//
const changeLine = (button: any) => {
// ID/
handleButton.value = button.id;
// /
if (button.ctrlStatus) {
isPlanEnabled2.value = true;
@ -611,9 +652,6 @@
// ======================================================================
const isLoading = ref(false);
// loading
const buttonLoading = ref(false);
//
const refresh = (reload = false) => {
//
@ -630,6 +668,12 @@
});
}
changeList.value = [];
if (!reload) {
lockList.value.forEach((item: any) => {
resetLockList(item);
});
}
lockList.value = [];
//
let data = props.treeData[0];
//
@ -638,7 +682,19 @@
buttons2.value = data.childList;
resetMode();
};
//
// /
const resetLockList = (item: any) => {
props.treeData.find((v: any) => {
if (item.region == v.dataCode) {
v.childList.find((v1: any) => {
if (item.deviceGroup == v1.dataCode) {
v1.lockStatus = item.before;
}
});
}
});
};
// 线
const resetChangeList = (item: any) => {
props.treeData.find((v: any) => {
if (item.region == v.dataCode) {
@ -653,7 +709,7 @@
v3.executeStatus.value = 0;
}
if (!item.before) {
console.log(item, '没有这个选项');
console.log(item, '没有这个选项---');
v3.executeStatus.value = 0;
}
//
@ -670,14 +726,13 @@
};
//
const showModal = () => {
if (!changeList.value.length) {
if (!changeList.value.length && !lockList.value.length) {
return message.info('未产生任何修改');
}
buttonLoading.value = true;
http
.post(lightingManage.getChangeList, {
sceneList: changeList.value,
lockList: [],
lockList: lockList.value,
projectId: state.projectId,
siteId: state.siteId,
})
@ -688,11 +743,8 @@
} else {
message.warning('获取修改内容失败');
}
buttonLoading.value = false;
})
.catch(() => {
buttonLoading.value = false;
});
.catch(() => {});
};
//
const changeCancel = () => {};
@ -705,24 +757,26 @@
const changeList: any = ref([]);
//
const diffList = ref([]);
//
//
const delBtn = (obj: any) => {
console.log(obj, '当前选择的修改内容');
// treeData
obj.scene = obj.stateAfter.scene.value;
obj.before = obj.stateBefore.scene.value;
obj.scene = obj?.stateAfter?.scene?.value;
obj.before = obj?.stateBefore?.scene?.value;
resetChangeList(obj);
// changeList diffList ()
resetLockList(obj);
// changeList lockList diffList ()
changeList.value = changeList.value.filter((item: any) => {
return item.deviceGroup !== obj.deviceGroup;
});
lockList.value = lockList.value.filter((item: any) => {
return item.deviceGroup !== obj.deviceGroup;
});
diffList.value = diffList.value.filter((item: any) => {
return item.deviceGroup !== obj.deviceGroup;
});
console.log(changeList, 'changeList');
console.log(diffList, 'diffList');
//
if (changeList.value.length == 0) {
if (changeList.value.length == 0 && lockList.value.length == 0) {
executeVisible.value = false;
}
};
@ -731,14 +785,28 @@
http
.post(lightingManage.submitChangeList, {
sceneList: changeList.value,
lockList: [],
lockList: lockList.value,
projectId: state.projectId,
siteId: state.siteId,
})
.then(() => {
.then((res) => {
let data = res.data;
//
if (data.retcode != 0) {
//
return message.warning(data.msg);
}
//
if (data.allSucceed) {
message.success('修改完成');
// allSucceedtrue
} else {
message.info(`${data.successList.length}条修改成功,${data.failList.length}条修改失败`);
}
emit('reload');
refresh(true);
});
})
.catch(() => {});
};
// ========================================================================
@ -759,6 +827,10 @@
changeArea,
//
changeLine,
//
refresh,
resetLockList,
resetChangeList,
});
</script>
<style lang="less" scoped>

152
hx-ai-intelligent/src/view/equipmentControl/planToAdd/config.ts

@ -0,0 +1,152 @@
import { planToAddApi } from '/@/api/planToAdd';
import { ref } from 'vue';
import { http } from '/nerv-lib/util';
import { getEnum } from '/@/api';
import { NsMessage } from '/nerv-lib/component';
const enumData: any = await getEnum({ params: { enumType: 'CtrlDeviceType' } });
export const tableConfig = (
orgId: any,
projectId: any,
mainRef: any,
nsModalFormConfig: any,
modalFormRef: any,
) => {
return ref({
title: '计划库',
api: planToAddApi.getActivatedPlanListByTree,
params: { orgId, projectId, deviceType: enumData.data[0].value },
treeConfig: {
defaultExpandAll: true,
header: {
icon: 'name',
title: '执行计划',
},
params: { projectId, deviceType: enumData.data[0].value },
dynamicParams: {
id: 'id',
pid: 'pid',
level: 'level',
projectId: 'projectId',
deviceType: 'deviceType',
},
api: planToAddApi.getActivatedPlanTree,
fieldNames: {
title: 'name',
key: 'id',
pid: 'pid',
level: 'level',
projectId: 'projectId',
deviceType: 'deviceType',
children: 'childList',
},
formConfig: {
schemas: [
{
field: 'deviceType',
label: '告警优先级',
component: 'nsSelectApi',
autoSubmit: true,
componentProps: {
api: () => getEnum({ params: { enumType: 'CtrlDeviceType' } }),
immediate: true,
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择告警优先级',
showSearch: true,
autoSelectFirst: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
},
},
],
},
},
rowSelection: null,
columns: [
{
title: '执行顺序',
dataIndex: 'address',
width: 100,
customRender: (text: any) => {
return text.index + 1;
},
},
{
title: '计划类型',
dataIndex: 'planGroupName',
},
{
title: '计划名称',
dataIndex: 'planName',
},
{
title: '执行时间',
dataIndex: 'executionTime',
},
],
columnActions: {
title: '操作',
width: 200,
fixed: 'right',
dataIndex: 'tableAction',
actions: [
{
label: '编辑',
name: 'energyAlarmEdit',
dynamicParams: ['uuid', 'appealType'],
handle: (data: any) => {
const obj = { ...data };
nsModalFormConfig.value.title = '编辑';
setTimeout(() => {
nsModalFormConfig.value.data = {
id: obj.id,
};
if (obj.startTime) {
nsModalFormConfig.value.data.createTime = obj.startTime
? [obj.startTime, obj.endTime]
: [];
}
}, 1);
modalFormRef.value?.toggle();
},
},
{
label: '删除',
name: 'energyAlarmDel',
dynamicParams: ['uuid', 'appealType'],
confirm: true,
handle: (data: any) => {
http.post(planToAddApi.updPlan, { id: data.id, isDeleted: 1 }).then((res) => {
if (res.msg === 'success') {
NsMessage.success('操作成功');
mainRef.value?.nsTableRef.reload();
} else {
NsMessage.error(res.msg);
}
});
mainRef.value?.nsTableRef.reload();
},
},
],
},
formConfig: {
schemas: [
{
field: 'planName',
label: '计划标题',
component: 'NsInput',
componentProps: {
allowClear: true,
placeholder: '请输入计划名称关键字',
},
},
],
params: {},
},
// pagination: { pageSizeOptions: false },
rowKey: 'uuid',
});
};

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

@ -0,0 +1,87 @@
<template>
<ns-view-list-table ref="mainRef" v-bind="config">
<template #bodyCell="{ record, column }">
<template v-if="column.dataIndex === 'executionTime'">
{{ getData(record) }}
</template>
</template>
</ns-view-list-table>
<NsModalFrom ref="modalFormRef" v-bind="nsModalFormConfig" />
</template>
<script lang="ts" setup>
import { tableConfig } from './config';
import { ref, onMounted } from 'vue';
import NsModalFrom from '/@/components/ns-modal-form.vue';
import { planToAddApi } from '/@/api/planToAdd';
import { NsMessage } from '/nerv-lib/component';
//
const orgId = ref('');
const projectId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const results = JSON.parse(sessionStorage.getItem('/hx-ai-intelligent/')!);
projectId.value = results.projectId;
const mainRef = ref(null);
const modalFormRef = ref(null);
const getData = (record: any) => {
return record.startTime
? record.startTime.substring(0, 10) + ' - ' + record.endTime.substring(0, 10)
: '未配置时间';
};
const nsModalFormConfig = ref({
api: planToAddApi.updPlan,
data: {},
title: '编辑',
schemas: [
{ field: 'id', component: 'NsInput', show: false },
{ field: 'orgId', component: 'NsInput', show: false },
{
field: 'createTime',
label: '执行时间',
component: 'NsRangePicker',
allowClear: true,
fieldMap: ['startTime', 'endTime'],
componentProps: {
valueFormat: 'YYYY-MM-DD hh:mm:ss',
placeholder: ['开始日期', '结束日期'],
},
rules: [
{
required: true,
message: '请选择执行时间',
},
],
},
],
extraModalConfig: {
bodyStyle: { paddingBottom: 0 },
},
success: (data: any) => {
if (data.msg === 'success') {
mainRef.value?.nsTableRef.reload();
} else {
NsMessage.error(data.msg);
}
},
});
//
onMounted(() => {});
const config = tableConfig(
orgId.value,
projectId.value,
mainRef,
nsModalFormConfig,
modalFormRef,
);
defineOptions({
name: 'LedgerIndex', // name
});
</script>
<style lang="less" scoped>
:deep(.ns-table-search),
:deep(.ns-part-tree),
:deep(.ns-table-main) {
box-shadow: @ns-content-box-shadow;
}
</style>

33
hx-ai-intelligent/src/view/equipmentControl/style/color.less

@ -0,0 +1,33 @@
:root {
// 电梯
// 正常
--on: #0dffa4;
// 开启
--open: #0dffa4;
// 上行
--up:#0dffa4;
// 下行
--down: #0dffa4;
// 关闭
--off: #bfcde2;
// 暂停 - 维修
--pause: #ffbc46;
// 热风
--hot: #fcf770;
// 告警 - 急停
--stop: #f36163;
// 故障
--fault: #ff7636;
// 未知
--unknown: #a742ff;
// 风机
// 关
--shut: #bfcde2;
// 低速
--low: #55d1ff;
// 中速
--middle: #0090FF;
// 高速
--high: #5757FF;
}

2
hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/boxModel.vue

@ -78,6 +78,7 @@
</script>
<style lang="less" scoped>
.box-model {
position: relative;
min-width: 162px;
height: 110px;
background: inherit;
@ -87,6 +88,7 @@
border-style: solid;
border-color: rgba(13, 255, 255, 1);
border-radius: 8px;
z-index: 99;
.title {
position: relative;
padding-left: 9px;

21
hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/dialogStyle.less

@ -39,13 +39,17 @@
.journal {
padding: 1% 3%;
width: 100%;
height: 150px;
background-color: rgba(0, 0, 0);
border-radius: 12px;
border: 2px solid transparent;
border-image: linear-gradient(to bottom, #0077ff, #00f6ff, #000000) 1;
.title-img {
padding-top: 6px;
margin-top: 6px;
}
.title-text {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.imgText {
@ -126,18 +130,7 @@
bottom: 0;
left: 0;
right: 0;
.execute {
margin-right: 10px;
width: 74px;
height: 40px;
opacity: 1;
cursor: pointer;
border-radius: 4px;
font-size: 14px;
font-weight: 400;
border: 0;
margin-left: 10px;
}.cancel {
.execute, .cancel {
margin-right: 10px;
width: 74px;
height: 40px;

27
hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/tabs1.less

@ -1,5 +1,6 @@
// 抽屉
.drawer-fan {
.drawer-item {
.light-area,
.circuit-area,
.control-area,
@ -412,12 +413,22 @@
.zmhlbtn {
position: relative;
}
// 禁用图标
.anticon-stop {
position: absolute;
right: 3px;
bottom: 3px;
overflow: hidden;
.btn-back {
position: absolute;
width: 50px;
height: 50px;
right: -25px;
bottom: -30px;
transform: rotate(45deg);
background: orange;
// 禁用图标
.anticon-stop {
transform: rotate(-45deg) scale(0.9);
position: absolute;
left: 3px;
top: 15px;
}
}
}
}

11
hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue

@ -74,10 +74,19 @@
// }
}
const option = {
grid: {
top: 60, //
bottom: 40, //
left: 10, //
right: 60, //
containLabel: true, // grid
},
legend: {
data: legendList,
orient: 'horizontal',
bottom: 30,
top: 30,
right: 130,
icon: 'rect',
},
tooltip: {
trigger: 'axis',

8
hx-ai-intelligent/src/view/monitor/deviceMonitor/page.vue

@ -1,6 +1,6 @@
<!-- eslint-disable vue/multi-word-component-names -->
<template>
<a-row type="flex">
<a-row type="flex" style="display: flex; position: relative">
<a-col :span="4">
<div style="padding: 0 20px; width: 100%; height: 100%">
<tree ref="treeRef" />
@ -9,7 +9,7 @@
<a-col :span="20">
<div style="width: 100%; height: 100%">
<div class="ns-right-title">
<span>历史数据</span>
<span><ns-icon name="title" size="11" style="margin-right: 3px" />历史数据</span>
<div class="button">
<ns-icon name="xiazai" size="18" style="margin-right: 10px" @click="downloadChart" />
<ns-icon :name="iconName" size="18" style="margin-right: 10px" @click="change" />
@ -65,9 +65,9 @@
align-items: center;
user-select: text;
margin-bottom: 5px;
padding-bottom: 10px;
padding-bottom: 60px;
padding-top: 10px;
border-bottom: 1px solid #e9e9e9;
// border-bottom: 1px solid #e9e9e9;
> span {
padding-left: 10px;

39
hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue

@ -3,19 +3,41 @@
:columns="columns"
:data-source="data"
bordered
style="width: 100%"
:scroll="{ x: 2000 }" />
:pagination="false"
style="width: 99%; height: 75%"
:scroll="{ x: 2000, y: 450 }" />
<a-pagination
:total="total"
:show-total="(total, range) => ` 共 ${total} 条`"
show-size-changer
show-quick-jumper
@change="onChange"
style="display: flex; justify-content: right; margin-top: 10px; margin-right: 30px" />
</template>
<script lang="ts">
import { defineComponent, watch, ref, onMounted } from 'vue';
import type { TableColumnType } from 'ant-design-vue';
import { Pagination } from 'ant-design-vue';
import { inject } from 'vue';
// defineOptions({
// name: 'EnvironmentTable', // name
// components: {
// 'a-pagination': Pagination,
// },
// });
export default defineComponent({
name: 'EnvironmentTable',
components: {
'a-pagination': Pagination,
},
setup() {
const total = ref<number>();
//
let data = ref<any[]>([]);
//
let dataList = ref<any[]>([]);
let columns = ref<TableColumnType[]>([]);
let index = ref(0);
@ -30,6 +52,12 @@
if (!pageData) {
throw new Error('pageData is not provided');
}
//
const onChange = (pageNumber: number, size: number) => {
const start = (pageNumber - 1) * size;
const end = start + size;
data.value = dataList.value.slice(start, end);
};
// pageData
watch(
() => pageData as PageData,
@ -69,7 +97,6 @@
{
title: '序号',
customRender: ({ record, index }) => {
debugger;
//
if (index == 0) {
data.value[index].index = 1;
@ -194,7 +221,7 @@
const init = () => {
index.value = 0;
data.value = pageData.tableList;
dataList.value = pageData.tableList;
let columnA: any[] = [...column];
let columnB: any[] = [];
@ -203,6 +230,8 @@
});
columnA.push(...columnB);
columns.value = columnA;
total.value = dataList.value.length;
onChange(1, 10);
};
onMounted(() => {
init();
@ -212,6 +241,8 @@
column,
columns,
pageData,
total,
onChange,
};
},
});

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

@ -2,13 +2,16 @@
<template>
<div class="parent-container">
<div class="ns-tree-title">
<ns-icon name="deviceType" size="11" style="margin-right: 3px" />
<span>设备列表</span>
</div>
<a-tree-select
ref="select"
v-model:value="value"
style="width: 100%"
:tree-line="treeLine && { showLeafIcon }"
:tree-data="treeData1"
allowClear
@change="changeDeviceType" />
<a-spin :spinning="treeLoading">
@ -17,23 +20,35 @@
v-model:selectedKeys="selectedKeys"
v-model:checkedKeys="checkedKeys"
checkable
:height="340"
:height="560"
style="width: 100%; overflow-y: auto; margin-bottom: 10px; margin-top: 10px"
:tree-data="treeData2" />
</a-spin>
<div class="fixed-bottom">
<a-divider />
<!-- <div class="fixed-bottom"> -->
<div>
<!-- <a-divider /> -->
<a-select
ref="select"
v-model:value="selectedValue"
placeholder="请选择点位"
style="width: 100%; margin-bottom: 10px"
:style="{
top: '50px',
left: `${divWidth + 40}px`,
zIndex: 9,
position: 'absolute',
width: `${divWidth}px`,
}"
:options="options1" />
<a-select
v-model:value="frequencyValue"
placeholder="请选择频率"
style="width: 100%; margin-bottom: 10px"
:style="{
top: '50px',
left: `${divWidth * 2 + 50}px`,
zIndex: 9,
position: 'absolute',
width: `${divWidth}px`,
}"
:options="options2" />
<a-range-picker
:value="hackValue || dateRange"
@ -41,9 +56,23 @@
@change="onChange"
@openChange="onOpenChange"
@calendarChange="onCalendarChange"
style="width: 100%; margin-bottom: 10px"
:style="{
top: '50px',
left: `${divWidth * 3 + 60}px`,
zIndex: 9,
position: 'absolute',
width: `${divWidth}px`,
}"
:placeholder="['请选择日期', '请选择日期']" />
<a-button type="primary" style="width: 100%; margin-bottom: 10px" @click="getSelect">
<a-button
type="primary"
:style="{
top: '50px',
left: `${divWidth * 4 + 70}px`,
zIndex: 9,
position: 'absolute',
}"
@click="getSelect">
查询
</a-button>
</div>
@ -52,18 +81,36 @@
<script lang="ts">
import type { TreeSelectProps, SelectProps } from 'ant-design-vue';
import { defineComponent, ref, onMounted, watch } from 'vue';
import { Dayjs } from 'dayjs';
import { defineComponent, ref, onMounted, onUnmounted, watch } from 'vue';
import dayjs, { Dayjs } from 'dayjs';
import { inject } from 'vue';
import { http } from '/nerv-lib/util';
import { device } from '/@/api/deviceManage';
import { deviceMonitor } from '/@/api/monitor';
import { Item } from 'ant-design-vue/lib/menu';
import { dict, getEnum } from '/@/api';
export default defineComponent({
// eslint-disable-next-line vue/multi-word-component-names
name: 'Tree',
setup() {
const select = ref<HTMLElement | null>(null);
const divWidth = ref(0); // div
// div
// const getDivWidth = () => {
// if (select.value) {
// divWidth.value = select.value.$el.offsetWidth;
// }
// };
// 使 ResizeObserver
const getDivWidth = new ResizeObserver(() => {
if (select.value?.$el) {
divWidth.value = select.value.$el.offsetWidth;
console.log('宽度变化:', divWidth.value);
}
});
const treeLoading = ref(false);
const treeLine = ref(true);
const showLeafIcon = ref(false);
@ -93,7 +140,7 @@
treeLoading.value = true;
http
.post(device.queryDevicePage, {
code: val,
deviceCode: val,
orgId: orgId.value,
pageNum: 1,
pageSize: 1000,
@ -102,7 +149,7 @@
if (!val) {
val = '999999999';
}
if (!label) {
if (!label || label.length == 0) {
label = ['所有设备'];
}
let records = res.data.records;
@ -113,6 +160,9 @@
let a: TreeSelectProps['treeData'] = [{ title: label[0], key: val, children: records }];
treeData2.value = a;
expandedKeys.value = [val];
if (records && records.length > 2) {
checkedKeys.value = [records[0].deviceInfoCode, records[1].deviceInfoCode];
}
})
.finally(() => {
treeLoading.value = false;
@ -125,27 +175,37 @@
const options1 = ref<SelectProps['options']>([]);
const options2 = ref<SelectProps['options']>([
{
value: '1',
label: '5分钟',
},
{
value: '2',
label: '10分钟',
},
{
value: '3',
label: '30分钟',
},
{
value: '4',
label: '1小时',
},
// {
// value: '1',
// label: '5',
// },
// {
// value: '2',
// label: '10',
// },
// {
// value: '3',
// label: '30',
// },
// {
// value: '4',
// label: '1',
// },
]);
const selectedValue = ref<string | undefined>();
const frequencyValue = ref<string | undefined>();
const dateRange = ref<[Dayjs, Dayjs] | undefined>();
const dateRange = ref<[Dayjs, Dayjs] | undefined>([dayjs(), dayjs()]);
interface PageData {
tableList: any[];
tableColumns: any[];
graphList: any[];
XData: any[];
}
const pageData = inject<PageData>('pageData');
if (!pageData) {
throw new Error('pageData is not provided');
}
const getDianWeiList = () => {
if (checkedKeys.value && checkedKeys.value.length > 0) {
http
@ -159,6 +219,15 @@
res.data.forEach((item: any) => {
options1.value?.push({ value: item.code, label: item.name });
});
selectedValue.value = options1.value[0].value;
if (
pageData.tableList.length == 0 ||
pageData.tableColumns.length == 0 ||
pageData.graphList.length == 0 ||
pageData.XData.length == 0
) {
getSelect();
}
}
// options1.value = res.data;
@ -177,18 +246,18 @@
// ];
};
interface PageData {
tableList: any[];
tableColumns: any[];
graphList: any[];
XData: any[];
}
const pageData = inject<PageData>('pageData');
if (!pageData) {
throw new Error('pageData is not provided');
}
// pageData
const getSelect = () => {
if (!startDate.value || !endDate.value) {
//
const today = new Date();
const year = today.getFullYear();
const month = String(today.getMonth() + 1).padStart(2, '0'); // getMonth() 0-11
const day = String(today.getDate()).padStart(2, '0');
startDate.value = year + '-' + month + '-' + day;
endDate.value = year + '-' + month + '-' + day;
}
http
.post(deviceMonitor.getDeviceGraph, {
deviceIds: checkedKeys.value,
@ -196,7 +265,7 @@
endDate: endDate.value,
startDate: startDate.value,
timeRate: '2',
timeRate: frequencyValue.value,
})
.then((res) => {
pageData.tableList = res.data.tableList;
@ -240,9 +309,32 @@
dates.value = val;
};
onMounted(() => {
onMounted(async () => {
if (select.value?.$el) {
divWidth.value = select.value.$el.offsetWidth;
getDivWidth.observe(select.value.$el);
}
// getDivWidth();
// window.addEventListener('resize', getDivWidth); //
let frequency = await getEnum({ params: { enumType: 'TimeFrequencyEnum' } });
options2.value = frequency.data;
if (options2.value && options2.value.length > 0) {
frequencyValue.value = options2.value[options2.value.length - 1].value;
}
changeDeviceType(null, null);
getSelect();
// getSelect();
});
//
// onUpdated(() => {
// window.removeEventListener('resize', getDivWidth);
// });
//
onUnmounted(() => {
if (select.value?.$el) {
getDivWidth.unobserve(select.value.$el);
}
getDivWidth.disconnect();
});
// pageData
watch(
@ -277,6 +369,8 @@
pageData,
changeDeviceType,
treeLoading,
select,
divWidth,
};
},
});
@ -295,14 +389,19 @@
}
}
.parent-container {
position: relative;
// position: relative;
height: 100%;
}
.fixed-bottom {
position: absolute;
bottom: 0;
width: 100%;
margin-bottom: 10px;
}
// .fixed-bottom {
// // display: flex;
// // top: 50px;
// // left: 340px;
// // z-index: 9;
// // position: absolute;
// // bottom: 0;
// width: 100%;
// // margin-bottom: 10px;
// }
</style>

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

@ -1,5 +1,5 @@
<template>
<a-row type="flex" style="height: 92%">
<a-row type="flex" style="height: 90%">
<a-col :span="8" style="height: 100%">
<div
style="
@ -14,14 +14,16 @@
style="
padding-bottom: 10px;
width: 40%;
height: 4%;
padding-left: 30px;
height: 20%;
padding-right: 30px;
padding-top: 10px;
display: flex;
float: right;
">
<a-radio-button value="1" style="width: 50%; text-align: center"> 同比 </a-radio-button>
<a-radio-button value="2" style="width: 50%; text-align: center"> 环比 </a-radio-button>
</a-radio-group>
<div ref="analysisGraphchart" style="width: 100%; height: 95%"></div>
<div ref="analysisGraphchart" style="width: 100%; height: 95%; padding-top: 10%"></div>
</div>
</a-col>
<a-col :span="16" style="height: 100%">
@ -37,7 +39,7 @@
ref="analysisGraphBarchart"
style="
width: 98%;
height: 58%;
height: 57%;
box-shadow: 0 0 0 2px rgba(218, 218, 218, 0.5);
margin: 1%;
"></div>
@ -179,7 +181,7 @@
const option = {
grid: {
top: 60,
top: 80,
bottom: 20,
},
dataZoom: [
@ -243,13 +245,22 @@
for (let i = 0; i < data.value.length; i++) {
dateX.push(data.value[i].name);
seriesdata.push({ value: data.value[i].value, name: data.value[i].name });
seriesdata.push({
value: data.value[i].value,
name: data.value[i].name,
radius: ['70%', '90%'],
});
}
var seriesList = [
{
// name: data.value[0].energyType,
data: seriesdata,
type: 'pie',
// //
selectedMode: true,
//
clockwise: '10',
// hoverAnimation: true,
//
radius: ['70%', '90%'],
center: ['30%', '50%'], //
@ -264,7 +275,7 @@
// formatter: '{b}',
position: 'outside', //
// alignTo: 'edge',
formatter: '{c}' + data.value[0].energyUnit + '\n{d}%',
formatter: '{c}' + data.value[0].unit + '\n{d}%',
alignTo: 'labelLine',
distanceToLabelLine: 5, // 线
distance: 10, //
@ -312,10 +323,12 @@
};
chartRight1 = echarts.init(analysisGraphRingchart.value);
chartRight1.setOption(option);
// chartRight1.setOption(option);
//
if (seriesdata.length > 0) {
seriesdata[0].radius = ['50%', '100%'];
chartRight1.setOption(option);
drawRight2(seriesdata[0]);
}
chartRight1.on('click', function (params) {
@ -368,10 +381,10 @@
},
},
},
grid: {
top: 20,
bottom: 60,
},
// grid: {
// top: 20,
// bottom: 60,
// },
xAxis: {
type: 'category',
axisLine: { show: false },

13
hx-ai-intelligent/src/view/monitor/energyMonitor/analysisTable/index.vue

@ -4,6 +4,7 @@
:columns="columns"
:data-source="data"
bordered
:pagination="false"
:row-selection="rowSelection">
<template #bodyCell="{ column, record }">
<template v-if="column.title === '操作'">
@ -35,53 +36,65 @@
{
title: '设备/节点',
dataIndex: 'name',
align: 'center',
},
{
title: '统计值',
dataIndex: 'value',
align: 'center',
},
{
title: '同比',
align: 'center',
children: [
{
title: '△差值',
dataIndex: 'yoyDiff',
align: 'center',
},
{
title: '增长率',
dataIndex: 'yoyRate',
align: 'center',
},
],
},
{
title: '环比',
align: 'center',
children: [
{
title: '△差值',
dataIndex: 'momDiff',
align: 'center',
},
{
title: '增长率',
dataIndex: 'momRate',
align: 'center',
},
],
},
{
title: '纵向对比',
align: 'center',
children: [
{
title: '△差值',
dataIndex: 'zongxiangDiff',
align: 'center',
},
{
title: '增长率',
dataIndex: 'zongxiangRate',
align: 'center',
},
],
},
{
title: '操作',
align: 'center',
// dataIndex: 'date',
},
];

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

@ -69,12 +69,12 @@
// }
// }
seriesList.push({
name: data.value[i].deviceName,
name: data.value[i].name,
data: data.value[i].data,
type: 'line',
smooth: true,
});
legendList.push(data.value[i].deviceName);
legendList.push(data.value[i].name);
}
const option = {
legend: {

46
hx-ai-intelligent/src/view/monitor/energyMonitor/graphTable/index.vue

@ -3,18 +3,34 @@
:columns="columns"
:data-source="data"
bordered
style="width: 100%"
style="width: 100%; height: 90%"
:pagination="false"
:scroll="{ x: '2000' }" />
<a-pagination
:total="total"
:show-total="(total, range) => ` 共 ${total} 条`"
show-size-changer
show-quick-jumper
@change="onChange"
style="display: flex; justify-content: right; margin-top: 10px; margin-right: 30px" />
</template>
<script lang="ts">
import { defineComponent, watch, inject, ref, onMounted } from 'vue';
import type { TableColumnType } from 'ant-design-vue';
import { Pagination } from 'ant-design-vue';
export default defineComponent({
name: 'EnvironmentTable',
// name: 'EnvironmentTable',
components: {
'a-pagination': Pagination,
},
setup() {
const total = ref<number>();
//
let data = ref<any[]>([]);
//
let dataList = ref<any[]>([]);
let columns = ref<TableColumnType[]>([]);
interface PageData {
@ -72,7 +88,8 @@
const column: TableColumnType[] = [
{
title: '设备/组名',
dataIndex: 'deviceName',
dataIndex: 'name',
align: 'center',
customCell: (record, rowIndex) => {
if (rowIndex == undefined) {
return {
@ -80,8 +97,8 @@
colSpan: 0,
};
}
const rowSpan = getRowSpan('deviceName', record, data.value);
if (rowIndex != 0 && data.value[rowIndex - 1].deviceName == record.deviceName) {
const rowSpan = getRowSpan('name', record, data.value);
if (rowIndex != 0 && data.value[rowIndex - 1].name == record.name) {
return {
rowSpan: 0,
colSpan: 0,
@ -94,6 +111,7 @@
},
{
title: '参数名称',
align: 'center',
dataIndex: 'selectedValueName',
customCell: (record, rowIndex) => {
if (rowIndex == undefined) {
@ -102,8 +120,8 @@
colSpan: 0,
};
}
const rowSpan = getRowSpan('selectedValueName', record, data.value, ['deviceName']);
if (rowIndex != 0 && data.value[rowIndex - 1].deviceName == record.deviceName) {
const rowSpan = getRowSpan('selectedValueName', record, data.value, ['name']);
if (rowIndex != 0 && data.value[rowIndex - 1].name == record.name) {
return {
rowSpan: 0,
colSpan: 0,
@ -116,16 +134,24 @@
},
];
//
const onChange = (pageNumber: number, size: number) => {
const start = (pageNumber - 1) * size;
const end = start + size;
data.value = dataList.value.slice(start, end);
};
const init = () => {
data.value = pageData.graphTableList;
dataList.value = pageData.graphTableList;
let columnA: any[] = [...column];
let columnB: any[] = [];
pageData.graphTableColumns.forEach((item) => {
columnB.push({ title: item, dataIndex: item });
columnB.push({ title: item, dataIndex: item, align: 'center' });
});
columnA.push(...columnB);
columns.value = columnA;
total.value = dataList.value.length;
onChange(1, 10);
};
onMounted(() => {
init();
@ -139,6 +165,8 @@
data,
column,
columns,
total,
onChange,
};
},
});

52
hx-ai-intelligent/src/view/monitor/energyMonitor/page.vue

@ -1,10 +1,6 @@
<!-- eslint-disable vue/multi-word-component-names -->
<template>
<a-tabs v-model:activeKey="activeKey" style="height: 8%">
<a-tab-pane key="1" tab="图表" />
<a-tab-pane key="2" tab="分析" />
</a-tabs>
<a-row type="flex" style="height: 92%">
<a-row type="flex" style="height: 92%; display: flex; position: relative">
<a-col :span="4">
<div style="padding: 0 20px; width: 100%; height: 100%">
<tree ref="treeRef" />
@ -12,19 +8,31 @@
</a-col>
<a-col :span="20">
<div style="width: 100%; height: 100%">
<div class="ns-right-title">
<span>统计数据</span>
<div class="button">
<ns-icon name="xiazai" size="18" style="margin-right: 10px" @click="downloadChart" />
<ns-icon :name="iconName" size="18" style="margin-right: 10px" @click="change" />
<div style="height: 22%">
<div class="ns-right-title">
<a-tabs
v-model:activeKey="activeKey"
style="height: 8%; width: 100%"
@change="changeActive">
<a-tab-pane key="1" tab="图表" />
<a-tab-pane key="2" tab="分析" />
</a-tabs>
<div class="button">
<ns-icon name="xiazai" size="18" style="margin-right: 10px" @click="downloadChart" />
<ns-icon :name="iconName" size="18" style="margin-right: 10px" @click="change" />
</div>
</div>
<span style="padding-left: 10px; line-height: 20px"
><ns-icon name="title" size="11" style="margin-right: 3px" />统计数据</span
>
</div>
<div v-if="activeKey == '1'" style="height: 90%; width: 100%">
<div v-if="activeKey == '1'" style="height: 82%; width: 100%">
<graph-graph ref="graphRef" v-if="isGraph" />
<environment-table ref="tableRef" v-else style="width: 100%" />
</div>
<div v-else style="height: 90%">
<analysis-graph ref="analysisGraphRef" v-if="isGraph" />
<div v-else style="height: 82%; width: 100%">
<analysis-graph ref="analysisGraphRef" v-if="isGraph" style="height: 100%; width: 100%" />
<analysis-table ref="analysisTableRef" v-else />
</div>
</div>
@ -67,6 +75,13 @@
}
}
};
const changeActive = () => {
if (activeKey.value == '1') {
treeRef.value.getSelectGraph(activeKey.value);
} else {
treeRef.value.getSelectAnalyse(activeKey.value);
}
};
function change() {
isGraph.value = !isGraph.value;
@ -80,21 +95,18 @@
<style lang="less" scoped>
.ns-right-title {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
user-select: text;
margin-bottom: 5px;
padding-bottom: 10px;
padding-top: 10px;
border-bottom: 1px solid #e9e9e9;
> span {
padding-left: 10px;
line-height: 20px;
}
// border-bottom: 1px solid #e9e9e9;
}
.button {
position: absolute;
right: 0;
display: inline-block;
padding-right: 10px;
}

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

@ -2,16 +2,12 @@
<template>
<div class="parent-container">
<div class="ns-tree-title">
<ns-icon name="common" size="11" style="margin-right: 3px" />
<span>数据点位</span>
</div>
<a-select
ref="select"
v-model:value="selectedValue"
placeholder="请选择能耗类型"
style="width: 100%; margin-bottom: 10px"
:options="options1"
@change="changeEnergyType" />
<a-radio-group
ref="select"
v-model:value="mode"
@change="changeMode"
style="padding-bottom: 10px; width: 100%">
@ -32,7 +28,7 @@
v-model:selectedKeys="selectedKeys"
v-model:checkedKeys="checkedKeys"
checkable
:height="300"
:height="600"
style="width: 100%; overflow-y: auto; margin-bottom: 10px; margin-top: 10px"
:tree-data="treeData2">
<!-- <template #title="{ title }">
@ -51,38 +47,104 @@
</a-tree>
</a-spin>
<div class="fixed-bottom">
<a-divider />
<!-- <div class="fixed-bottom"> -->
<div>
<!-- <a-divider /> -->
<a-select
v-model:value="dateTypeValue"
v-model:value="selectedValue"
placeholder="请选择能耗类型"
:style="{
top: '100px',
left: `${divWidth + 40}px`,
zIndex: 9,
position: 'absolute',
width: `${divWidth}px`,
}"
:options="options1"
@change="changeEnergyType" />
<a-select
v-model:value="frequencyValue"
placeholder="请选择日期类型"
style="width: 100%; margin-bottom: 10px"
:options="options2" />
:style="{
top: '100px',
left: `${divWidth * 2 + 50}px`,
zIndex: 9,
position: 'absolute',
width: `${divWidth}px`,
}"
:options="options2"
@change="changeFrequency" />
<a-range-picker
style="width: 100%; margin-bottom: 10px"
:style="{
top: '100px',
left: `${divWidth * 3 + 60}px`,
zIndex: 9,
position: 'absolute',
width: `${divWidth}px`,
}"
@change="onChangeDate"
v-model:value="dateValue"
:picker="dateTypeValue" />
<a-button type="primary" style="width: 100%; margin-bottom: 10px" @click="getSelect">
:picker="dateTypeValue"
v-if="activeKey == '1'" />
<a-date-picker
:style="{
top: '100px',
left: `${divWidth * 3 + 60}px`,
zIndex: 9,
position: 'absolute',
width: `${divWidth}px`,
}"
@change="onChangeDate"
v-model:value="timeValue"
:picker="dateTypeValue"
v-if="activeKey == '2'" />
<a-button
type="primary"
:style="{
top: '100px',
left: `${divWidth * 4 + 70}px`,
zIndex: 9,
position: 'absolute',
}"
@click="getSelect(null)">
查询
</a-button>
</div>
<!-- </div> -->
</div>
</template>
<script lang="ts">
import type { TreeSelectProps, SelectProps } from 'ant-design-vue';
import { defineComponent, ref, onMounted, inject } from 'vue';
import { defineComponent, ref, onMounted, inject, onUnmounted } from 'vue';
import dayjs, { Dayjs } from 'dayjs';
import { http } from '/nerv-lib/util';
import { device, group } from '/@/api/deviceManage';
import { energyMonitor } from '/@/api/monitor';
import { dict } from '/@/api';
import { dict, getEnum } from '/@/api';
export default defineComponent({
// eslint-disable-next-line vue/multi-word-component-names
name: 'Tree',
setup() {
const select = ref<HTMLElement | null>(null);
const divWidth = ref(0); // div
// div
// const getDivWidth = () => {
// if (select.value) {
// divWidth.value = select.value.$el.offsetWidth;
// }
// };
// 使 ResizeObserver
const getDivWidth = new ResizeObserver(() => {
if (select.value?.$el) {
divWidth.value = select.value.$el.offsetWidth;
console.log('宽度变化:', divWidth.value);
}
});
const value = ref<string>();
const deviceName = ref<string>();
const pointName = ref<string>();
@ -104,10 +166,17 @@
//
const selectedValue = ref<string | number | null | undefined>();
//
const dateTypeValue = ref<string | undefined>('month');
const dateTypeValue = ref();
const frequencyValue = ref();
const activeKey = ref('1');
//
const dateValue = ref<[Dayjs, Dayjs] | undefined>([dayjs(), dayjs()]);
const timeValue = ref<Dayjs | undefined>(dayjs());
//
const getOptionsList = async () => {
try {
@ -122,20 +191,26 @@
} catch (error) {
console.error('Failed to fetch options:', error);
}
options2.value = [
{
value: 'date',
label: '日',
},
{
value: 'month',
label: '月',
},
{
value: 'year',
label: '年',
},
];
let frequency = await getEnum({ params: { enumType: 'EnergyTimeEnum' } });
options2.value = frequency.data;
if (options2.value && options2.value.length > 0) {
dateTypeValue.value = 'date';
frequencyValue.value = options2.value[0].value;
}
// options2.value = [
// {
// value: 'date',
// label: '',
// },
// {
// value: 'month',
// label: '',
// },
// {
// value: 'year',
// label: '',
// },
// ];
};
interface PageData {
//
@ -156,7 +231,7 @@
//
const changeEnergyType = () => {
if (selectedValue.value == '碳排量') {
if (selectedValue.value == 'CARBON_EMISSIONS') {
shebei.value = true;
mode.value = '1';
} else {
@ -166,23 +241,55 @@
};
const startDate = ref<String>();
const endDate = ref<String>();
const onChangeDate = (val: RangeValue, dateStrings: any) => {
const startDateAnalyse = ref<String>();
const endDateAnalyse = ref<String>();
const onChangeDate = (val: any, dateStrings: any) => {
if (dateStrings && dateStrings.length === 2) {
dateValue.value = val;
startDate.value = dateStrings[0];
endDate.value = dateStrings[1];
} else if (dateStrings) {
timeValue.value = val;
startDateAnalyse.value = dateStrings;
endDateAnalyse.value = dateStrings;
}
};
const getSelect = () => {
// const date = dateValue.value;
// let year = 0;
// let month = 0;
// if (date) {
// year = date.year();
// month = date.month() + 1;
// } else {
// return;
// }
const changeFrequency = (value) => {
if (frequencyValue.value == 0) {
dateTypeValue.value = 'date';
} else if (frequencyValue.value == 1) {
dateTypeValue.value = 'month';
} else if (frequencyValue.value == 2) {
dateTypeValue.value = 'year';
}
};
const getSelect = (key: any) => {
let keyV = null;
if (key) {
keyV = key;
}
if (activeKey.value == '1') {
getSelectGraph(keyV);
} else {
getSelectAnalyse(keyV);
}
};
const getSelectGraph = (key: any) => {
if (key) {
activeKey.value = key;
if (
pageData.graphTableList.length > 0 &&
pageData.graphTableColumns.length > 0 &&
pageData.graphGraphList.length > 0
) {
return;
}
}
let startTime = '';
let endTime = '';
if (startDate.value && endDate.value) {
@ -222,28 +329,77 @@
energyType: selectedValue.value,
orgId: orgId.value,
dateType: dateTypeValue.value == 'year' ? 0 : 1, //0 1
dateType: frequencyValue.value,
deviceInfoCodes: mode.value == '0' ? checkedKeys.value : [], // device_info_code
energyQueryType: mode.value, // 0 1
nodeIds: mode.value == '1' ? checkedKeys.value : [],
startTime: startTime,
endTime: endTime,
startDate: startTime,
endDate: endTime,
})
.then((res) => {
let selectedValueName = '';
options1.value?.forEach((item) => {
if (item.value == selectedValue.value) {
selectedValueName = item.label;
}
});
res.data.tableList.forEach((item) => {
item.selectedValueName = selectedValueName;
});
pageData.graphTableList = res.data.tableList;
pageData.graphTableColumns = res.data.tableHeaderList;
pageData.graphGraphList = res.data.graghData;
if (res.data && res.data.tableList && res.data.tableHeaderList && res.data.graghData) {
let selectedValueName = '';
options1.value?.forEach((item) => {
if (item.value == selectedValue.value) {
selectedValueName = item.label;
}
});
res.data.tableList.forEach((item) => {
item.selectedValueName = selectedValueName;
});
pageData.graphTableList = res.data.tableList;
pageData.graphTableColumns = res.data.tableHeaderList;
pageData.graphGraphList = res.data.graghData;
} else {
pageData.graphTableList = [];
pageData.graphTableColumns = [];
pageData.graphGraphList = [];
}
});
};
const getSelectAnalyse = (key: any) => {
if (key) {
activeKey.value = key;
if (pageData.analysisGraphList.length > 0 && pageData.analysisTableList.length > 0) {
return;
}
}
let startTime = '';
let endTime = '';
if (startDateAnalyse.value != endDateAnalyse.value) {
endDate.value = startDateAnalyse.value;
}
if (startDateAnalyse.value && endDateAnalyse.value) {
if (dateTypeValue.value == 'month') {
startTime = startDateAnalyse.value + '-01';
const [year, month] = endDateAnalyse.value.split('-').map(Number);
//
const date = new Date(year, month, 1);
//
// date.setDate(date.getDate() - 1);
endTime = date.toISOString().split('T')[0];
// endTime = endDate.value + '-01';
} else if (dateTypeValue.value == 'year') {
startTime = startDateAnalyse.value + '-01-01';
endTime = endDateAnalyse.value + '-12-31';
} else {
startTime = startDateAnalyse.value + '';
endTime = endDateAnalyse.value + '';
}
} else {
//
const today = new Date();
const year = today.getFullYear();
const month = String(today.getMonth() + 1).padStart(2, '0'); // getMonth() 0-11
const day = String(today.getDate()).padStart(2, '0');
startTime = year + '-' + month + '-' + day;
endTime = year + '-' + month + '-' + day;
}
timeValue.value = dayjs(startTime);
//
http
@ -257,12 +413,17 @@
energyQueryType: mode.value, // 0 1
nodeIds: mode.value == '1' ? checkedKeys.value : [],
startTime: startTime,
endTime: endTime,
startDate: startTime,
endDate: endTime,
})
.then((res) => {
pageData.analysisTableList = res.data.dataList;
pageData.analysisGraphList = res.data.dataList;
if (res.data && res.data.dataList) {
pageData.analysisTableList = res.data.dataList;
pageData.analysisGraphList = res.data.dataList;
} else {
pageData.analysisTableList = [];
pageData.analysisGraphList = [];
}
});
};
@ -272,6 +433,7 @@
const treeData2 = ref<TreeSelectProps['treeData']>([]);
//
const changeMode = () => {
checkedKeys.value = [];
treeLoading.value = true;
if (mode.value == '0') {
http
@ -295,7 +457,7 @@
treeData2.value = a;
expandedKeys.value = [val];
checkedKeys.value.push(records[0].deviceCode, records[1].deviceCode);
getSelect();
getSelect(null);
})
.finally(() => {
treeLoading.value = false;
@ -312,6 +474,8 @@
treeData2.value = formatTreeData(pointName.value ? res.data[0].searchList : res.data);
expandedKeys.value = getAllKeys(treeData2.value);
checkedKeys.value.push(treeData2.value[0].key, treeData2.value[1].key);
getSelect(null);
})
.finally(() => {
treeLoading.value = false;
@ -362,6 +526,11 @@
dates.value = val;
};
onMounted(() => {
if (select.value?.$el) {
divWidth.value = select.value.$el.offsetWidth;
getDivWidth.observe(select.value.$el);
}
getOptionsList();
changeMode();
// debugger;
@ -370,7 +539,14 @@
// treeData2.value[0].children[1].deviceCode,
// );
// debugger;
getSelect();
// getSelect(null);
});
//
onUnmounted(() => {
if (select.value?.$el) {
getDivWidth.unobserve(select.value.$el);
}
getDivWidth.disconnect();
});
return {
@ -386,9 +562,13 @@
mode,
selectedValue,
dateTypeValue,
frequencyValue,
dateValue,
timeValue,
getOptionsList,
getSelect,
getSelectAnalyse,
getSelectGraph,
changeMode,
disabledDate,
onCalendarChange,
@ -398,6 +578,10 @@
changeEnergyType,
shebei,
onChangeDate,
changeFrequency,
activeKey,
select,
divWidth,
};
},
});
@ -416,14 +600,14 @@
}
}
.parent-container {
position: relative;
// position: relative;
height: 100%;
}
.fixed-bottom {
position: absolute;
bottom: 0;
width: 100%;
margin-bottom: 10px;
}
// .fixed-bottom {
// position: absolute;
// bottom: 0;
// width: 100%;
// margin-bottom: 10px;
// }
</style>

47
hx-ai-intelligent/src/view/monitor/environmentMonitor/aggregateData/index.vue

@ -1,5 +1,6 @@
<!-- eslint-disable vue/multi-word-component-names -->
<template>
<!-- <a-spin :spinning="loading"> -->
<a-row type="flex" style="height: 100%; width: 96%; margin: 2%">
<a-col :span="6">
<!-- <div style="height: 96%; margin: 2%"> -->
@ -26,6 +27,7 @@
</div>
</div>
</div>
<div
style="
height: 62%;
@ -34,26 +36,16 @@
box-shadow: 0 0 0 2px rgba(218, 218, 218, 0.5);
border-radius: 10px;
background: #ffffff;
"
><div style="height: 10%">平均值</div>
">
<div style="height: 10%">平均值</div>
<div style="display: flex; display: flex; flex-wrap: wrap; width: 100%; height: 100%">
<div
v-for="(item, index) in averageData"
:key="index"
style="
width: 33%;
height: 45%;
/* display: flex; */
/* flex-direction: column;
justify-content: center;
align-items: center; */
/* margin: 10%;
">
<div v-for="(item, index) in averageData" :key="index" style="width: 33%; height: 45%">
<div
style="
height: 90%;
margin: 0 5%;
/* box-shadow: 0 0 0 2px rgba(218, 218, 218, 0.5); */
border-radius: 10px;
background-color: rgba(67, 136, 251, 0.09803921568627451);
display: flex;
@ -94,8 +86,8 @@
>
</div>
</div>
</div></div
>
</div>
</div>
<!-- </div> -->
</a-col>
<a-col :span="18">
@ -141,14 +133,7 @@
style="width: 20%; margin-left: 10px"
:options="frequencyOptions" />
<a-date-picker style="width: 20%; margin-left: 10px" v-model:value="timeValue" />
<!-- <a-range-picker
:value="hackValue || dateRange"
:disabled-date="disabledDate"
@change="onChange"
@openChange="onOpenChange"
@calendarChange="onCalendarChange"
style="width: 100%; margin-bottom: 10px"
:placeholder="['请选择日期', '请选择日期']" /> -->
<a-button type="primary" style="margin-left: 10px" @click="getDeviceHotMap">
查询
</a-button>
@ -160,6 +145,7 @@
<!-- </div> -->
</a-col>
</a-row>
<!-- </a-spin> -->
</template>
<script lang="ts">
export default {
@ -181,7 +167,7 @@
defineOptions({
name: 'AggregateData', // name
});
const loading = ref(false);
//
const frequencyValue = ref<string>();
@ -301,6 +287,7 @@
treeData2.value = res.data;
if (treeData2.value && treeData2.value.length > 0) {
quyuvalue.value = [treeData2.value[0].childList[0].id];
getDeviceHotMap();
}
});
};
@ -355,7 +342,7 @@
//
await queryDeviceArea();
await getDeviceHotMap();
// await getDeviceHotMap();
// let hotData = {
// timeList: [
@ -781,4 +768,8 @@
};
</script>
<style lang="less" scoped></style>
<style lang="less" scoped>
:deep(.ant-spin-nested-loading) {
height: 100% !important;
}
</style>

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

@ -1,51 +1,55 @@
<!-- eslint-disable vue/v-on-event-hyphenation -->
<template>
<div>
<a-table
:columns="tableColumns"
:data-source="pageData"
bordered
:pagination="false"
:scroll="{ x: 100, y: 450 }">
<template #title>
<div
style="display: flex; align-items: center; justify-content: space-between; width: 100%">
<div style="display: flex; align-items: center; width: 85%">
<div style="width: 10%">数据报表</div>
<!-- <a-spin :spinning="loading"> -->
<div style="background: #ffffff; height: 95%">
<a-spin :spinning="loading">
<a-table
:columns="tableColumns"
:data-source="pageData"
bordered
:pagination="false"
:scroll="{ x: 100, y: 450 }">
<template #title>
<div
style="display: flex; align-items: center; justify-content: space-between; width: 100%">
<div style="display: flex; align-items: center; width: 85%">
<div style="width: 10%">数据报表</div>
<a-select
v-model:value="frequencyValue"
placeholder="请选择频率"
style="width: 17%; margin-left: 10px"
:options="frequencyOptions"
@change="changeFrequency" />
<!-- <a-date-picker style="width: 13%; margin-left: 10px" v-model:value="timeValue" /> -->
<!-- :picker="dateTypeValue" -->
<a-range-picker
:value="hackValue || dateRange"
:disabled-date="disabledDate"
@change="onChangeDate"
@openChange="onOpenChange"
@calendarChange="onCalendarChange"
style="width: 17%; margin-left: 10px"
:placeholder="['请选择日期', '请选择日期']" />
<a-button type="primary" style="margin-left: 10px" @click="getTableList">
查询
</a-button>
<a-select
v-model:value="frequencyValue"
placeholder="请选择频率"
style="width: 17%; margin-left: 10px"
:options="frequencyOptions"
@change="changeFrequency" />
<!-- <a-date-picker style="width: 13%; margin-left: 10px" v-model:value="timeValue" /> -->
<!-- :picker="dateTypeValue" -->
<a-range-picker
:value="hackValue || dateRange"
:disabled-date="disabledDate"
@change="onChangeDate"
@openChange="onOpenChange"
@calendarChange="onCalendarChange"
style="width: 17%; margin-left: 10px"
:placeholder="['请选择日期', '请选择日期']" />
<a-button type="primary" style="margin-left: 10px" @click="getTableList">
查询
</a-button>
</div>
<a-button type="primary"> 导出 </a-button>
</div>
<a-button type="primary"> 导出 </a-button>
</div>
</template>
</a-table>
<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" />
</template>
</a-table>
<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" />
</a-spin>
</div>
<!-- </a-spin> -->
</template>
<script lang="ts" setup>
import { ref, onMounted } from 'vue';
@ -65,6 +69,8 @@
},
});
const loading = ref(false);
const typeList = ref();
//
const frequencyValue = ref<string | undefined>();
@ -136,44 +142,20 @@
};
//
const getTableList = () => {
loading.value = true;
//
if (!startDate.value || !endDate.value) {
const nowDate = new Date();
let nowDateString = nowDate.toISOString().split('T')[0];
const [year, month, day] = nowDateString.split('-').map(Number);
if (frequencyValue.value == '3') {
startDate.value = year + '-' + month;
endDate.value = year + '-' + month;
} else if (frequencyValue.value == '4') {
startDate.value = year + '';
endDate.value = year + '';
}
}
let startTime = '';
let endTime = '';
if (frequencyValue.value == '3') {
startTime = startDate.value + '-01';
const [year, month] = endDate.value.split('-').map(Number);
//
const date = new Date(year, month, 1);
//
// date.setDate(date.getDate() - 1);
endTime = date.toISOString().split('T')[0];
// endTime = endDate.value + '-01';
} else if (frequencyValue.value == '4') {
startTime = startDate.value + '-01-01';
endTime = endDate.value + '-12-31';
} else {
startTime = startDate.value + '';
endTime = endDate.value + '';
startDate.value = year + '-' + month + '-' + day;
endDate.value = year + '-' + month + '-' + day;
}
http
.post(environmentMonitor.getDeviceAveragesByRate, {
orgId: orgId.value,
startTime: startTime, //
endTime: endTime, //
startTime: startDate.value, //
endTime: endDate.value, //
timeRate: frequencyValue.value, //
})
@ -195,6 +177,9 @@
data.value = res.data.data;
total.value = res.data.data.length;
onChange(1, 10);
})
.finally(() => {
loading.value = false;
});
};
onMounted(async () => {
@ -204,106 +189,9 @@
if (frequencyOptions.value && frequencyOptions.value.length > 0) {
frequencyValue.value = frequencyOptions.value[frequencyOptions.value.length - 1].value;
}
// frequencyOptions.value = [
// {
// value: '1',
// label: '30',
// },
// {
// value: '2',
// label: '',
// },
// {
// value: '3',
// label: '',
// },
// {
// value: '4',
// label: '',
// },
// {
// value: '5',
// label: '',
// },
// ];
typeList.value = [
{
id: 1,
value: '温度',
},
{
id: 2,
value: 'CO2浓度',
},
{
id: 3,
value: 'PM2.5',
},
{
id: 4,
value: '光照度',
},
{
id: 5,
value: 'TVOC',
},
{
id: 6,
value: '湿度',
},
];
treeData2.value = [
{
label: '办公区',
value: '0-0',
children: [
{
label: '办公一区',
value: '0-0-0',
},
{
label: '办公二区',
value: '0-0-1',
},
{
label: '办公三区',
value: '0-0-2',
},
{
label: '办公四区',
value: '0-0-3',
},
],
},
{
label: '站厅',
value: '0-1',
children: [
{
label: '站厅一区',
value: '0-1-0',
// disabled: true,
},
{
label: '站厅二区',
value: '0-1-1',
},
{
label: '站厅三区',
value: '0-1-2',
},
{
label: '站厅四区',
value: '0-1-3',
},
],
},
];
getTableList();
});
// getTableList();
//
const onChange = (pageNumber: number, size: number) => {
queryParams.value.pageNum = pageNumber;

452
hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/index.vue

@ -1,85 +1,73 @@
<!-- eslint-disable vue/multi-word-component-names -->
<template>
<div>
<a-table
:columns="tableColumns"
:data-source="pageData"
bordered
:pagination="false"
:scroll="{ x: 100 }">
<template #title>
<div
style="display: flex; align-items: center; justify-content: space-between; width: 100%">
<div style="display: flex; align-items: center; width: 85%">
<div style="width: 10%">数据报表</div>
<a-select
v-model:value="typeValue"
placeholder="请选择环境参数"
style="width: 17%"
:options="typeList" />
<a-tree-select
v-model:value="quyuvalue"
style="width: 17%; margin-left: 10px"
:tree-data="treeData2"
:field-names="{
children: 'childList',
label: 'name',
value: 'id',
}"
tree-checkable
allow-clear
placeholder="请选择区域"
tree-node-filter-prop="label"
:maxTagCount="1" />
<a-select
v-model:value="frequencyValue"
placeholder="请选择采集频率"
style="width: 17%; margin-left: 10px"
:options="frequencyOptions"
@change="changeFrequency" />
<!-- <a-date-picker
:picker="dateTypeValue"
style="width: 15%; margin-left: 10px"
v-model:value="timeValue" /> -->
<!-- :picker="dateTypeValue" -->
<a-range-picker
:value="dateRange"
:disabled-date="disabledDate"
@change="onChangeDate"
@openChange="onOpenChange"
@calendarChange="onCalendarChange"
style="width: 17%; margin-left: 10px"
:placeholder="['请选择日期', '请选择日期']" />
<a-button type="primary" style="margin-left: 10px" @click="getTableList">
查询
</a-button>
<div style="background: #ffffff; height: 95%">
<a-spin :spinning="loading">
<a-table
:columns="tableColumns"
:data-source="pageData"
bordered
:pagination="false"
:scroll="{ x: 100 }">
<template #title>
<div
style="display: flex; align-items: center; justify-content: space-between; width: 100%">
<div style="display: flex; align-items: center; width: 85%">
<div style="width: 10%">数据报表</div>
<a-select
v-model:value="typeValue"
placeholder="请选择环境参数"
style="width: 17%"
:options="typeList" />
<a-tree-select
v-model:value="quyuvalue"
style="width: 17%; margin-left: 10px"
:tree-data="treeData2"
:field-names="{
children: 'childList',
label: 'name',
value: 'id',
}"
tree-checkable
allow-clear
placeholder="请选择区域"
tree-node-filter-prop="label"
:maxTagCount="1" />
<a-select
v-model:value="frequencyValue"
placeholder="请选择采集频率"
style="width: 17%; margin-left: 10px"
:options="frequencyOptions"
@change="changeFrequency" />
<a-range-picker
:value="dateRange"
:disabled-date="disabledDate"
@change="onChangeDate"
@openChange="onOpenChange"
@calendarChange="onCalendarChange"
style="width: 17%; margin-left: 10px"
:placeholder="['请选择日期', '请选择日期']" />
<a-button type="primary" style="margin-left: 10px" @click="getTableList">
查询
</a-button>
</div>
<a-button type="primary"> 导出 </a-button>
</div>
<a-button type="primary"> 导出 </a-button>
</div>
</template>
</a-table>
<!-- <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" /> -->
<a-pagination
:total="total"
show-size-changer
show-quick-jumper
@change="onChange"
style="display: flex; justify-content: center; margin-top: 10px" />
</template>
</a-table>
<a-pagination
:total="total"
show-size-changer
show-quick-jumper
@change="onChange"
style="display: flex; justify-content: center; margin-top: 10px" />
</a-spin>
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted, defineOptions } from 'vue';
// import { http } from '/nerv-lib/util/http';
import { Pagination, SelectProps, TreeSelectProps, TableColumnType } from 'ant-design-vue';
import { tableColumns as tableColumnsA } from './config';
// import { tableColumns as tableColumnsA } from './config';
import { environmentMonitor } from '/@/api/monitor';
import { http } from '/nerv-lib/util';
import { dict, getEnum } from '/@/api';
@ -92,6 +80,115 @@
'a-pagination': Pagination,
},
});
const loading = ref(false);
const getRowSpan = (dataIndex: string, record: any, data: any, dependents: string[] = []) => {
let rowSpan = 1;
for (let i = data.indexOf(record) + 1; i < data.length; i++) {
let shouldMerge = true;
for (const dependent of dependents) {
if (data[i][dependent] !== record[dependent]) {
shouldMerge = false;
break;
}
}
if (shouldMerge && data[i][dataIndex] === record[dataIndex]) {
rowSpan++;
} else {
break;
}
}
return rowSpan;
};
const tableColumnsA: TableColumnType[] = [
{
title: '序号',
customRender: ({ record, index }) => {
//
if (index == 0) {
pageData.value[index].index = 1;
// return 1;
} else if (pageData.value[index - 1].location == record.location) {
pageData.value[index].index = pageData.value[index - 1].index;
// return data.value[index].index;
} else {
pageData.value[index].index = pageData.value[index - 1].index + 1;
}
return pageData.value[index].index;
},
customCell: (record, rowIndex) => {
if (rowIndex == undefined) {
return {
rowSpan: 0,
colSpan: 0,
};
}
const rowSpan = getRowSpan('location', record, pageData.value);
if (rowIndex != 0 && pageData.value[rowIndex - 1].location == record.location) {
return {
rowSpan: 0,
colSpan: 0,
};
}
return {
rowSpan: rowSpan,
};
},
},
{
title: '区域名称',
dataIndex: 'location',
customCell: (record, rowIndex) => {
if (rowIndex == undefined) {
return {
rowSpan: 0,
colSpan: 0,
};
}
const rowSpan = getRowSpan('location', record, pageData.value);
if (rowIndex != 0 && pageData.value[rowIndex - 1].location == record.location) {
return {
rowSpan: 0,
colSpan: 0,
};
}
return {
rowSpan: rowSpan,
};
},
},
{
title: '点位',
dataIndex: 'pointName',
customCell: (record, rowIndex) => {
if (rowIndex == undefined) {
return {
rowSpan: 0,
colSpan: 0,
};
}
const rowSpan = getRowSpan('pointName', record, pageData.value, ['location']);
if (
rowIndex != 0 &&
pageData.value[rowIndex - 1].location == record.location &&
pageData.value[rowIndex - 1].pointName == record.pointName
) {
return {
rowSpan: 0,
colSpan: 0,
};
}
return {
rowSpan: rowSpan,
};
},
},
{
title: '日期',
dataIndex: 'time',
},
];
const typeList = ref();
const typeValue = ref();
const quyuvalue = ref<string[]>([]);
@ -103,8 +200,9 @@
const frequencyOptions = ref<SelectProps['options']>([]);
const treeData2 = ref<TreeSelectProps['treeData']>([]);
const data = ref([]);
const pageData = ref([]);
// const data = ref([]);
let data = ref<any[]>([]);
const pageData = ref<any[]>([]);
// const timeValue = ref<Dayjs>();
let tableColumns = ref<TableColumnType[]>([]);
@ -117,15 +215,6 @@
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
// const fetch = (api, params = { orgId }) => {
// return http.post(api, params);
// };
//
// const changeYearData = () => {
// queryParams.value.year = selectYear.value.format('YYYY');
// getTableList();
// };
type RangeValue = [Dayjs, Dayjs];
const dates = ref<RangeValue>();
@ -160,23 +249,11 @@
};
//
const changeFrequency = () => {
//
// if (frequencyValue.value == '0' || frequencyValue.value == '1' || frequencyValue.value == '2') {
// dateTypeValue.value = 'date';
// } else if (frequencyValue.value == '3') {
// dateTypeValue.value = 'month';
// } else if (frequencyValue.value == '4') {
// dateTypeValue.value = 'year';
// }
dateRange.value = undefined;
};
//
const getTableList = () => {
// fetch(energyConsumption.pageList, queryParams.value).then((res) => {
// data.value = res.data.records;
// total.value = res.data.total;
// });
loading.value = true;
let environmentType = '';
for (let i = 0; i < typeList.value.length; i++) {
if (typeList.value[i].value == typeValue.value) {
@ -189,41 +266,16 @@
const nowDate = new Date();
let nowDateString = nowDate.toISOString().split('T')[0];
const [year, month, day] = nowDateString.split('-').map(Number);
if (frequencyValue.value == '3') {
startDate.value = year + '-' + month;
endDate.value = year + '-' + month;
} else if (frequencyValue.value == '4') {
startDate.value = year + '';
endDate.value = year + '';
}
}
let startTime = '';
let endTime = '';
if (frequencyValue.value == '3') {
startTime = startDate.value + '-01';
const [year, month] = endDate.value.split('-').map(Number);
//
const date = new Date(year, month, 1);
//
// date.setDate(date.getDate() - 1);
endTime = date.toISOString().split('T')[0];
// endTime = endDate.value + '-01';
} else if (frequencyValue.value == '4') {
startTime = startDate.value + '-01-01';
endTime = endDate.value + '-12-31';
} else {
startTime = startDate.value + '';
endTime = endDate.value + '';
startDate.value = year + '-' + month + '-' + day;
endDate.value = year + '-' + month + '-' + day;
}
http
.post(environmentMonitor.getDeviceHistory, {
orgId: orgId.value,
environmentType: environmentType, // code
location: quyuvalue.value, // idname
startTime: startTime, //
endTime: endTime, //
startTime: startDate.value, //
endTime: endDate.value, //
timeRate: frequencyValue.value, //
})
@ -237,24 +289,6 @@
dataIndex: headerList[i],
});
}
// let tableColumnsB = [
// {
// title: '1:00',
// dataIndex: '1:00',
// },
// {
// title: '2:00',
// dataIndex: '2:00',
// },
// {
// title: '3:00',
// dataIndex: '3:00',
// },
// {
// title: '4:00',
// dataIndex: '4:00',
// },
// ];
let columnA: any[] = [...tableColumnsA];
columnA.push(...tableColumnsB);
tableColumns.value = columnA;
@ -263,6 +297,9 @@
data.value = res.data.data;
total.value = res.data.data.length;
onChange(1, 10);
})
.finally(() => {
loading.value = false;
});
};
//
@ -273,6 +310,7 @@
treeData2.value = res.data;
if (treeData2.value && treeData2.value.length > 0) {
quyuvalue.value = [treeData2.value[0].childList[0].id];
getTableList();
}
});
};
@ -295,139 +333,13 @@
}
//
await queryDeviceArea();
// frequencyOptions.value = [
// {
// value: '1',
// label: '30',
// },
// {
// value: '2',
// label: '',
// },
// {
// value: '3',
// label: '',
// },
// {
// value: '4',
// label: '',
// },
// {
// value: '5',
// label: '',
// },
// ];
// typeList.value = [
// {
// id: 1,
// value: '',
// },
// {
// id: 2,
// value: 'CO2',
// },
// {
// id: 3,
// value: 'PM2.5',
// },
// {
// id: 4,
// value: '',
// },
// {
// id: 5,
// value: 'TVOC',
// },
// {
// id: 6,
// value: '湿',
// },
// ];
// treeData2.value = [
// {
// label: '',
// value: '0-0',
// children: [
// {
// label: '',
// value: '0-0-0',
// },
// {
// label: '',
// value: '0-0-1',
// },
// {
// label: '',
// value: '0-0-2',
// },
// {
// label: '',
// value: '0-0-3',
// },
// ],
// },
// {
// label: '',
// value: '0-1',
// children: [
// {
// label: '',
// value: '0-1-0',
// // disabled: true,
// },
// {
// label: '',
// value: '0-1-1',
// },
// {
// label: '',
// value: '0-1-2',
// },
// {
// label: '',
// value: '0-1-3',
// },
// ],
// },
// ];
// let tableColumnsB = [
// {
// title: '1:00',
// dataIndex: '1:00',
// },
// {
// title: '2:00',
// dataIndex: '2:00',
// },
// {
// title: '3:00',
// dataIndex: '3:00',
// },
// {
// title: '4:00',
// dataIndex: '4:00',
// },
// ];
// let columnA: any[] = [...tableColumnsA];
// columnA.push(...tableColumnsB);
// tableColumns.value = columnA;
await getTableList();
});
// getTableList();
//
const onChange = (pageNumber: number, size: number) => {
// queryParams.value.pageNum = pageNumber;
// queryParams.value.pageSize = size;
// data.value;
// debugger;
const start = (pageNumber - 1) * size;
const end = start + size;
pageData.value = data.value.slice(start, end);
// getTableList();
};
</script>
<style scoped lang="less">

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

@ -3,7 +3,7 @@
<div style="display: flex">
<a-tabs v-model:activeKey="activeKey" style="height: 5%; width: 100%; background: #ffffff">
<a-tab-pane key="1" tab="综合数据" />
<a-tab-pane key="2" tab="历史数据" force-render />
<a-tab-pane key="2" tab="历史数据" />
<a-tab-pane key="3" tab="平均数据" />
</a-tabs>
<a-button

7
lib/util/xlsx-util.ts

@ -1,10 +1,9 @@
import { utils, write } from 'xlsx';
import { dateUtil } from '/nerv-lib/util/date-util';
import { NsMessage } from '/nerv-lib/component/message';
import axios from 'axios';
import { createVNode, h, render as vueRender } from 'vue';
import { Cookies } from '/nerv-lib/util/cookie';
import { NsXlsxImport } from '/nerv-lib/component/xlsx';
import { NsModal } from '/nerv-lib/component/modal';
@ -126,7 +125,9 @@ export const importFile = (
});
formData.append('file', event);
axios
.post(api, formData)
.post(api, formData, {
headers: { token: Cookies.get(`${import.meta.env.VITE_PUBLIC_PATH}-nervsid`) },
})
.then((res) => {
if (res) {
NsMessage.success('导入成功', 1, () => {

Loading…
Cancel
Save