Compare commits

...

44 Commits
dev ... meizhou

Author SHA1 Message Date
selia-zx 13d0d71bd7 生活热水-控制界面,去掉供水温度设定、温度偏差值设置;水箱添加最低液位设置值功能 4 days ago
selia-zx 4fb6d980bf 修改input单位样式 4 days ago
selia-zx 8cdad84735 1.主机参数详情页面冷水设定值便宜可编辑 4 days ago
selia-zx 2e63ef4fea 1.修改主机运行记录导出异常 5 days ago
selia-zx ff44d006db 1.测试修改主机运行记录功能 6 days ago
selia-zx b63bc3ed98 一些图表添加单位 2 weeks ago
selia-zx a41b7e1cf8 1.主机参数启动停止颜色分别用绿色和蓝色; 2 weeks ago
selia-zx 54929bc638 修改能耗分析图表参数 2 months ago
selia-zx 1629c56cc5 处理能耗报表报错问题 2 months ago
selia-zx 2c51fbf984 修改大屏数据 2 months ago
selia-zx 61dc4a5d59 修改生活热水-热泵开关机逻辑 2 months ago
selia-zx b422e6e323 1.修改大屏数据 2 months ago
selia-zx b31574e5fd 修改能源分析-能耗报表数据 2 months ago
selia-zx 8416806539 1.修改热水-项目总览,饼图描述 2 months ago
selia-zx 68efeef754 更新2000px以上页面样式变动2.0 2 months ago
selia-zx 56da047b0f 修改设备定时开关匹配数据逻辑 2 months ago
selia-zx b829c8d52d 更新2000px以上页面样式变动 2 months ago
selia-zx 46fe8ea70c 1.生活热水-首页修改热泵总数 2 months ago
selia-zx 7e78020d6e 1.对接生活热水供水监控系统-项目总览-项目概况、当月数据统计 2 months ago
selia-zx eec0e3cabb 1.生活热水供水监控系统添加:项目总览、能源分析(能耗报表、温度变化表、水位变化表)、用能查询(能耗、水表读数、电表读数)、数据分析四个静态页面内容 2 months ago
selia-zx 928427732c 修改首页饼图数据 2 months ago
selia-zx d99ad9947d 修改首页饼图数据 2 months ago
selia-zx bf2640958b 1.首页添加生活热水、温度系统、风柜系统的数据 2 months ago
25604 c90530caad 1、风柜系统添加定时; 3 months ago
selia-zx b71839eba6 1.压缩机排序 3 months ago
selia-zx eb9d523e1e 1.修改风柜系统监测-定时开关机参数问题 3 months ago
selia-zx 027e4d6d7f 1.修改大屏数据 3 months ago
selia-zx 781cc7e59f 1.修改风柜系统监测-定时开关机弹框高亮 3 months ago
selia-zx ad60088e00 1.主机详情页面,图表添加负载y轴,压缩机参数不采用tab形式 3 months ago
selia-zx 8282126f15 1.冷源监控-系统监测添加可点击打开弹窗控制阀门、水泵、风机、主机 3 months ago
mh ee447e1d7f 监控界面、主机详情、温湿度图表优化 3 months ago
selia-zx a9833153fb 1.修改中央空调-系统监测-压缩机参数内容tab分开展示 3 months ago
selia-zx c06ca6002c 1.空调风柜监控系统-系统监控添加定时开关功能 3 months ago
selia-zx e6b93684ae 1.修改生活热水-实时监控的动态图 3 months ago
selia-zx abec1b1416 1.ps修改生活热水-实时监控的动态图,修改添加供水泵1、供水泵2、补水状态、回水状态、热泵等状态 3 months ago
mh ac91f0837c 冷热源界面修改 3 months ago
v-lijf43 f9a2a9b905 阀门开关到位修改 3 months ago
selia-zx 39661b7ba6 1.联调梅州-中央空调-系统监测页面内容,调整样式 3 months ago
selia-zx ccde8e6187 修改主机参数页面数据 4 months ago
selia-zx 4f79f5bac9 1.解决冲突 4 months ago
selia-zx c6b4345766 系统监测采用大屏显示版本 4 months ago
selia-zx a74c3ad306 修改定时任务、表单构建样式 4 months ago
selia-zx 11d131c3ec 1.修改系统监测页面 4 months ago
selia-zx e068a1a14b 梅州分支 4 months ago
  1. 6
      .env.development
  2. 4
      package.json
  3. 17
      src/api/aircAndWindc/index.js
  4. 27
      src/api/centerairC/hostRunReport.js
  5. 9
      src/api/centerairC/temHistory.js
  6. 18
      src/api/hotWater/dataAnalysis.js
  7. 34
      src/api/hotWater/energyAnalysis.js
  8. 10
      src/api/hotWater/energyQuery.js
  9. 18
      src/api/hotWater/overview.js
  10. 7
      src/api/region.js
  11. BIN
      src/assets/flowimg/bu-move.gif
  12. BIN
      src/assets/flowimg/bu-nomove.png
  13. BIN
      src/assets/flowimg/circulate-move - 副本.gif
  14. BIN
      src/assets/flowimg/circulate-move.gif
  15. BIN
      src/assets/flowimg/circulate-nomove - 副本.png
  16. BIN
      src/assets/flowimg/circulate-nomove.png
  17. BIN
      src/assets/flowimg/pump.png
  18. BIN
      src/assets/flowimg/replenish-move.gif
  19. BIN
      src/assets/flowimg/replenish-nomove.png
  20. BIN
      src/assets/flowimg/replenish-nomove3.png
  21. BIN
      src/assets/flowimg/supply-move.gif
  22. BIN
      src/assets/flowimg/supply-nomove - 副本.png
  23. BIN
      src/assets/flowimg/supply-nomove.png
  24. BIN
      src/assets/flowimg/supply-nomove2.png
  25. BIN
      src/assets/flowimg/waterBox - 副本.png
  26. BIN
      src/assets/flowimg/waterBox.png
  27. 1
      src/assets/icons/svg/dataAnalysis.svg
  28. 1
      src/assets/icons/svg/energyQuery.svg
  29. BIN
      src/assets/images/detail-line.png
  30. BIN
      src/assets/images/host-img3.png
  31. BIN
      src/assets/images/host-img5.png
  32. BIN
      src/assets/images/meizhou.png
  33. BIN
      src/assets/images/overview1.png
  34. BIN
      src/assets/images/overview2.png
  35. BIN
      src/assets/images/overview3.png
  36. BIN
      src/assets/images/overview4.png
  37. BIN
      src/assets/images/pump.png
  38. BIN
      src/assets/images/supply-nomove.png
  39. BIN
      src/assets/images/use1.png
  40. BIN
      src/assets/images/use2.png
  41. BIN
      src/assets/images/use3.png
  42. 343
      src/assets/styles/bigScreen.scss
  43. 14
      src/assets/styles/element-ui.scss
  44. 277
      src/assets/styles/index.scss
  45. 22
      src/components/Crontab/index.vue
  46. 32
      src/components/IconSelect/index.vue
  47. 29
      src/store/modules/permission.js
  48. 2110
      src/views/aircAndWindc/awSysMonitor/asSysMonitorDetails.vue
  49. 1840
      src/views/aircAndWindc/awSysMonitor/index copy.vue
  50. 1200
      src/views/aircAndWindc/awSysMonitor/index.vue
  51. 43
      src/views/alarm/alarmCode/index.vue
  52. 40
      src/views/alarm/alarmRecord/index.vue
  53. 55
      src/views/alarm/alarmRule/index.vue
  54. 66
      src/views/bigScreen/bigScreen.vue
  55. 46
      src/views/bigScreen/components/allEnergy.vue
  56. 39
      src/views/bigScreen/components/coldSysEnergy.vue
  57. 23
      src/views/bigScreen/components/useElect.vue
  58. 1138
      src/views/bigScreen/components/waterSysEnergy.vue
  59. 2
      src/views/centerairC/deviceStrategy/index.vue
  60. 9
      src/views/centerairC/enSourceAnalysis/components/deviceEnergy.vue
  61. 7
      src/views/centerairC/enSourceAnalysis/components/equipment.vue
  62. 2
      src/views/centerairC/enSourceAnalysis/components/machineRoom.vue
  63. 40
      src/views/centerairC/energyAnalysis/components/energyAnalysis.vue
  64. 911
      src/views/centerairC/hostRunReport/index.vue
  65. 5
      src/views/centerairC/overview/index.vue
  66. 431
      src/views/centerairC/sysControl/index copy 2.vue
  67. 643
      src/views/centerairC/sysControl/index copy.vue
  68. 31
      src/views/centerairC/sysControl/index.vue
  69. 159
      src/views/centerairC/sysControl/listHeader.vue
  70. 107
      src/views/centerairC/sysControl/vavleheader.vue
  71. 404
      src/views/centerairC/sysMonitor/components/hostChart.vue
  72. 643
      src/views/centerairC/sysMonitor/hostDetails.vue
  73. 2306
      src/views/centerairC/sysMonitor/monitorCenter.vue
  74. 147
      src/views/centerairC/sysMonitor/performance.vue
  75. 430
      src/views/centerairC/temHistoryQuery/index.vue
  76. 19
      src/views/centerairC/timeSwitch/index.vue
  77. 460
      src/views/components/aircAndWindcMeter.vue
  78. 142
      src/views/components/hotWater.vue
  79. 460
      src/views/components/temMeter.vue
  80. 234
      src/views/components/viewColdSys.vue
  81. 26
      src/views/components/viewEnergy.vue
  82. 22
      src/views/components/waterTank.vue
  83. 43
      src/views/device/comm/index.vue
  84. 40
      src/views/device/gateway/index.vue
  85. 51
      src/views/device/gather/index.vue
  86. 50
      src/views/device/ledger/index.vue
  87. 40
      src/views/device/maintenance/index.vue
  88. 54
      src/views/device/qrCode/index.vue
  89. 36
      src/views/device/spare/index.vue
  90. 51
      src/views/device/spareInOut/index.vue
  91. 894
      src/views/hotWater/dataAnalysis/components/analyzeMonth.vue
  92. 791
      src/views/hotWater/dataAnalysis/components/analyzeYear.vue
  93. 321
      src/views/hotWater/dataAnalysis/index.vue
  94. 1057
      src/views/hotWater/energyAnalysis/components/energyReport.vue
  95. 756
      src/views/hotWater/energyAnalysis/components/temReport.vue
  96. 756
      src/views/hotWater/energyAnalysis/components/waterReport.vue
  97. 94
      src/views/hotWater/energyAnalysis/index.vue
  98. 483
      src/views/hotWater/energyQuery/components/electReading.vue
  99. 578
      src/views/hotWater/energyQuery/components/energy.vue
  100. 483
      src/views/hotWater/energyQuery/components/waterReading.vue
  101. Some files were not shown because too many files have changed in this diff Show More

6
.env.development

@ -7,9 +7,9 @@ ENV = 'development'
# 开发环境
# VUE_APP_BASE_API = '/dev-api'
# 后台
# VUE_APP_BASE_API = 'http://192.168.1.222:8080'
# 云端
VUE_APP_BASE_API = 'http://106.55.173.225:8090'
VUE_APP_BASE_API = 'http://192.168.1.222:8080'
# 梅州云端
# VUE_APP_BASE_API = 'http://106.55.173.225:8091'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

4
package.json

@ -59,7 +59,8 @@
"vue-meta": "2.4.0",
"vue-router": "3.4.9",
"vuedraggable": "2.24.3",
"vuex": "3.6.0"
"vuex": "3.6.0",
"xlsx": "^0.18.5"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.4.6",
@ -72,6 +73,7 @@
"connect": "3.6.6",
"eslint": "7.15.0",
"eslint-plugin-vue": "7.2.0",
"html-webpack-plugin": "^5.6.3",
"lint-staged": "10.5.3",
"runjs": "4.4.2",
"sass": "1.32.13",

17
src/api/aircAndWindc/index.js

@ -8,3 +8,20 @@ export function windList(query) {
params: query,
});
}
//查询定时开关列表
export function timeList(query) {
return request({
url: "/device/ahu/monitor/timeList",
method: "get",
params: query,
});
}
//修改定时开关
export function undateTime(query) {
return request({
url: "/device/ahu/monitor/time",
method: "put",
params: query,
});
}

27
src/api/centerairC/hostRunReport.js

@ -0,0 +1,27 @@
import request from "@/utils/request";
// 查询运行记录
export function reportSysList(data) {
return request({
url: "/reportSys/list",
method: "post",
data,
});
}
// 编辑运行记录
export function reportSysEdit(data) {
return request({
url: "/reportSys/edit",
method: "put",
data,
});
}
// 导出
export function reportSysExport(data) {
return request({
url: "/reportSys/export",
method: "post",
data,
responseType: 'blob',
});
}

9
src/api/centerairC/temHistory.js

@ -0,0 +1,9 @@
import request from "@/utils/request";
// 历史天气查询
export function weatherTempData(query) {
return request({
url: "/device/cs/getWeatherTemp",
method: "get",
params: query,
});
}

18
src/api/hotWater/dataAnalysis.js

@ -0,0 +1,18 @@
import request from "@/utils/request";
// 数据分析-月
export function queryMonthDatas(query) {
return request({
url: "/hot_energy/analysis/queryMonth",
method: "get",
params: query,
});
}
// 数据分析-年
export function queryYearDatas(query) {
return request({
url: "/hot_energy/analysis/queryYear",
method: "get",
params: query,
});
}

34
src/api/hotWater/energyAnalysis.js

@ -0,0 +1,34 @@
import request from "@/utils/request";
// 楼层
export function hotBuildList(query) {
return request({
url: "/space/building/hot_list",
method: "get",
params: query,
});
}
// 楼栋能耗环比
export function hotEnergySum(query) {
return request({
url: "/hot_energy/energySum",
method: "get",
params: query,
});
}
// 温度变化表
export function hotWaterTemp(query) {
return request({
url: "/hot_energy/waterTemp",
method: "get",
params: query,
});
}
// 温度变化表
export function hotWaterLevel(query) {
return request({
url: "/hot_energy/waterLevel",
method: "get",
params: query,
});
}

10
src/api/hotWater/energyQuery.js

@ -0,0 +1,10 @@
import request from "@/utils/request";
// 水电表读数
export function queryDeviceDatas(query) {
return request({
url: "/hot_energy/queryDeviceDatas",
method: "get",
params: query,
});
}

18
src/api/hotWater/overview.js

@ -0,0 +1,18 @@
import request from "@/utils/request";
// 设备状态
export function deviceState(query) {
return request({
url: "/device/hotWater/deviceState",
method: "get",
params: query,
});
}
// 楼栋能耗
export function hotEnergyQuery(query) {
return request({
url: "/hot_energy/query",
method: "get",
params: query,
});
}

7
src/api/region.js

@ -7,6 +7,13 @@ export function spaceTree() {
method: "get",
});
}
export function floorTree() {
return request({
url: "/space/floorTree",
method: "get",
});
}
// 获取区域信息
export function getAreaList(query) {

BIN
src/assets/flowimg/bu-move.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

BIN
src/assets/flowimg/bu-nomove.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

BIN
src/assets/flowimg/circulate-move - 副本.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
src/assets/flowimg/circulate-move.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 21 KiB

BIN
src/assets/flowimg/circulate-nomove - 副本.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
src/assets/flowimg/circulate-nomove.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 10 KiB

BIN
src/assets/flowimg/pump.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/assets/flowimg/replenish-move.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

BIN
src/assets/flowimg/replenish-nomove.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
src/assets/flowimg/replenish-nomove3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
src/assets/flowimg/supply-move.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 KiB

After

Width:  |  Height:  |  Size: 248 KiB

BIN
src/assets/flowimg/supply-nomove - 副本.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 156 KiB

BIN
src/assets/flowimg/supply-nomove.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 135 KiB

BIN
src/assets/flowimg/supply-nomove2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 KiB

After

Width:  |  Height:  |  Size: 284 KiB

BIN
src/assets/flowimg/waterBox - 副本.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

BIN
src/assets/flowimg/waterBox.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 188 KiB

1
src/assets/icons/svg/dataAnalysis.svg

@ -0,0 +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="1750837487744" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6669" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M930.133333 900.266667H93.866667a8.533333 8.533333 0 0 1-8.533334-8.533334v-25.6a8.533333 8.533333 0 0 1 8.533334-8.533333h836.266666a8.533333 8.533333 0 0 1 8.533334 8.533333v25.6a8.533333 8.533333 0 0 1-8.533334 8.533334zM746.666667 661.333333h-170.666667a8.533333 8.533333 0 0 1-8.533333-8.533333v-25.6a8.533333 8.533333 0 0 1 8.533333-8.533333h170.666667a8.533333 8.533333 0 0 1 8.533333 8.533333v25.6a8.533333 8.533333 0 0 1-8.533333 8.533333z" fill="" p-id="6670"></path><path d="M904.533333 117.333333H119.466667a8.533333 8.533333 0 0 0-8.533334 8.533334v665.6a8.533333 8.533333 0 0 0 8.533334 8.533333h785.066666a8.533333 8.533333 0 0 0 8.533334-8.533333v-665.6a8.533333 8.533333 0 0 0-8.533334-8.533334z m-563.2 149.333334c51.84 0 93.866667 42.026667 93.866667 93.866666s-42.026667 93.866667-93.866667 93.866667-93.866667-42.026667-93.866666-93.866667 42.026667-93.866667 93.866666-93.866666zM247.466667 512a8.533333 8.533333 0 0 1 8.533333-8.533333h170.666667a8.533333 8.533333 0 0 1 8.533333 8.533333v25.6a8.533333 8.533333 0 0 1-8.533333 8.533333H256a8.533333 8.533333 0 0 1-8.533333-8.533333v-25.6z m520.682666-82.709333l-0.149333 0.149333v0.247467l-16.0256 16.0256h-0.247467l-68.053333 68.053333a8.533333 8.533333 0 0 1-12.066133 0l-18.103467-18.103467a8.533333 8.533333 0 0 1 0-12.066133l37.883733-37.883733h-54.135466l-212.241067 212.241066a8.503467 8.503467 0 0 1-6.8736 3.515734H256a8.533333 8.533333 0 0 1-8.533333-8.533334v-25.6a8.533333 8.533333 0 0 1 8.533333-8.533333h147.818667l212.245333-212.245333a8.503467 8.503467 0 0 1 6.8736-3.515734h70.8864l-40.315733-40.315733a8.533333 8.533333 0 0 1 0-12.066133l18.103466-18.103467a8.533333 8.533333 0 0 1 12.066134 0l84.475733 84.475733c1.6896 1.6896 2.513067 3.912533 2.491733 6.126934a8.533333 8.533333 0 0 1-2.496 6.1312z" fill="" p-id="6671"></path></svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

1
src/assets/icons/svg/energyQuery.svg

@ -0,0 +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="1750837471498" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4744" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M896 64H128c-35.328 0-64 28.672-64 64v768c0 35.328 28.672 64 64 64h592a32 32 0 1 0 0-64H128V128h768v592a32 32 0 1 0 64 0V128c0-35.328-28.672-64-64-64z m-104.256 682.496A206.72 206.72 0 0 0 832 624 208.256 208.256 0 0 0 624 416 208.256 208.256 0 0 0 416 624 208.256 208.256 0 0 0 624 832c44.096 0 87.04-14.08 122.496-40.256l110.848 110.848a31.936 31.936 0 0 0 54.656-22.592 32 32 0 0 0-9.344-22.656l-110.912-110.848zM480 624c0-79.36 64.64-144 144-144S768 544.64 768 624 703.36 768 624 768 480 703.36 480 624z m320-360a32 32 0 0 0-32-32H256a32 32 0 0 0 0 64h512a32 32 0 0 0 32-32zM256 422.656a32 32 0 0 0 0 64h96a32 32 0 0 0 0-64H256z" fill="" p-id="4745"></path></svg>

Before

Width:  |  Height:  |  Size: 1000 B

After

Width:  |  Height:  |  Size: 1000 B

BIN
src/assets/images/detail-line.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

BIN
src/assets/images/host-img3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 KiB

After

Width:  |  Height:  |  Size: 410 KiB

BIN
src/assets/images/host-img5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 KiB

After

Width:  |  Height:  |  Size: 417 KiB

BIN
src/assets/images/meizhou.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

BIN
src/assets/images/overview1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

BIN
src/assets/images/overview2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

BIN
src/assets/images/overview3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

BIN
src/assets/images/overview4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

BIN
src/assets/images/pump.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
src/assets/images/supply-nomove.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 156 KiB

BIN
src/assets/images/use1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
src/assets/images/use2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
src/assets/images/use3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

343
src/assets/styles/bigScreen.scss

@ -1,6 +1,5 @@
// 媒体查询适配大于2000px分辨率的大屏样式
// 媒体查询适配大于2000px分辨率的大屏样式-element样式
@media (min-width: 2000px) {
// element样式
.el-tabs--top .el-tabs__item.is-top:nth-child(2),
.el-tabs--top .el-tabs__item.is-bottom:nth-child(2),
.el-tabs--bottom .el-tabs__item.is-top:nth-child(2),
@ -144,6 +143,15 @@
.el-range-editor--medium .el-range__close-icon {
line-height: 0.28rem !important;
}
.el-range-editor--small.el-input__inner {
height: 0.32rem !important;
}
.el-range-editor--small .el-range-input {
font-size: 0.13rem !important;
}
.el-tag--mini .el-icon-close {
margin-left: -0.03rem !important;
}
.el-date-editor .el-range__icon {
font-size: 0.14rem !important;
margin-left: -0.05rem !important;
@ -151,7 +159,7 @@
}
.el-input__icon {
width: 0.25rem !important;
line-height: 0.4rem !important;
line-height: 0.32rem !important;
}
.el-range-editor--medium .el-range-input {
font-size: 0.14rem !important;
@ -183,7 +191,10 @@
}
.el-picker-panel,
.el-date-range-picker .el-picker-panel__body {
min-width: 5.13rem !important;
// min-width: 5.13rem !important;
}
.el-date-picker {
width: 3.22rem !important;
}
.el-date-range-picker__time-header {
font-size: 0.12rem !important;
@ -192,6 +203,29 @@
.el-date-range-picker__time-picker-wrap {
padding: 0 0.05rem !important;
}
.el-date-range-picker .el-picker-panel__body {
min-width: 5.13rem !important;
}
.el-date-range-picker {
width: 6.46rem !important;
}
.el-date-editor--daterange.el-input,
.el-date-editor--daterange.el-input__inner,
.el-date-editor--timerange.el-input,
.el-date-editor--timerange.el-input__inner {
width: 3.5rem !important;
}
.el-date-editor--monthrange.el-input,
.el-date-editor--monthrange.el-input__inner {
width: 3rem !important;
}
.el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 2.2rem !important;
}
.el-year-table td {
padding: 0.2rem 0.03rem !important;
}
.el-input--small {
font-size: 0.13rem !important;
}
@ -224,6 +258,31 @@
height: 0.24rem !important;
line-height: 0.24rem !important;
}
.el-year-table td .cell {
width: 0.48rem !important;
height: 0.32rem !important;
line-height: 0.32rem !important;
}
.el-year-table {
font-size: 0.12rem !important;
margin: -0.01rem !important;
}
.el-select-dropdown {
margin: 0.05rem 0 !important;
border-radius: 0.04rem !important;
}
.el-select-dropdown__wrap,
.el-scrollbar__wrap {
margin-bottom: -0.1rem !important;
margin-right: -0.1rem !important;
}
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected::after {
right: 0.2rem !important;
font-size: 0.12rem !important;
}
.el-select-dropdown__wrap {
max-height: 2.74rem !important;
}
.el-date-table td.start-date div {
margin-left: 0.05rem !important;
border-top-left-radius: 0.15rem !important;
@ -242,14 +301,27 @@
padding: 0.04rem 0 !important;
position: relative;
}
.el-pager li {
padding: 0 0.04rem !important;
font-size: 0.13rem !important;
min-width: 0.355rem !important;
height: 0.28rem !important;
line-height: 0.28rem !important;
}
.el-picker-panel__footer {
padding: 0.04rem !important;
}
.el-button {
padding: 0.08rem 0.15rem !important;
}
.el-button--mini {
padding: 0.07rem 0.15rem !important;
// padding: 0.08rem 0.15rem !important;
font-size: 0.12rem !important;
border-radius: 0.03rem !important;
}
.el-button--text {
padding: 0 !important;
}
.el-input__suffix {
right: 0.05rem !important;
}
@ -273,7 +345,7 @@
line-height: 0.36rem !important;
}
.el-input--suffix .el-input__inner {
padding-right: 0.3rem !important;
padding: 0 0.3rem !important;
}
.el-input--medium {
font-size: 0.14rem !important;
@ -293,6 +365,7 @@
width: 0.16rem !important;
line-height: 0.16rem !important;
right: 0rem !important;
top: -0.01rem !important;
}
.el-tag--small {
height: 0.24rem !important;
@ -320,7 +393,7 @@
font-size: 0.14rem !important;
}
.el-table--medium .el-table__cell {
padding: 10px 0;
padding: 0.01rem 0 !important;
}
.el-table .cell {
line-height: 0.23rem !important;
@ -358,6 +431,9 @@
height: 0.28rem !important;
line-height: 0.28rem !important;
}
.el-tree-node__label {
font-size: 0.14rem !important;
}
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .btn-next,
.el-pagination.is-background .el-pager li {
@ -365,6 +441,12 @@
min-width: 0.3rem !important;
border-radius: 0.02rem !important;
}
.pagination-container {
padding: 0.32rem 0.16rem !important;
height: 0.32rem !important;
margin-bottom: 0.1rem !important;
margin-top: 0.15rem !important;
}
.el-pagination .btn-prev .el-icon,
.el-pagination .btn-next .el-icon {
font-size: 0.12rem !important;
@ -400,7 +482,206 @@
font-size: 0.14rem !important;
padding-right: 0.08rem !important;
}
.el-form-item--small .el-form-item__label {
line-height: 0.32rem !important;
}
.el-form-item__label {
font-size: 0.14rem !important;
}
.el-date-picker__header-label {
font-size: 0.16rem !important;
padding: 0 0.05rem !important;
line-height: 0.22rem !important;
}
.el-month-table td .cell {
width: 0.6rem !important;
height: 0.36rem !important;
line-height: 0.36rem !important;
border-radius: 0.18rem !important;
}
.el-month-table {
font-size: 0.12rem !important;
}
.el-month-table td {
padding: 0.08rem 0px !important;
}
.mb8 {
margin-bottom: 0.08rem !important;
}
.el-month-table td div {
height: 0.48rem !important;
padding: 0.06rem 0 !important;
}
.el-date-picker .el-picker-panel__content {
width: 2.92rem !important;
}
.el-cascader-panel {
border-radius: 0.04rem !important;
font-size: 0.14rem !important;
}
.el-cascader-menu {
min-width: 1.8rem !important;
}
.el-cascader-menu__wrap {
height: 2.04rem !important;
}
.el-cascader-menu__list {
padding: 0.06rem 0 !important;
}
.el-cascader-node {
padding: 0 0.3rem 0 0.2rem !important;
height: 0.34rem !important;
line-height: 0.34rem !important;
}
.el-checkbox {
font-size: 0.14rem !important;
margin-right: 0.08rem !important;
}
.el-checkbox__label {
padding-left: 0.1rem !important;
line-height: 0.19rem !important;
font-size: 0.14rem !important;
}
.el-input-number--medium .el-input-number__increase,
.el-input-number--medium .el-input-number__decrease {
width: 0.36rem !important;
height: 50% !important;
font-size: 0.14rem !important;
}
.el-table__expand-icon {
font-size: 0.12rem !important;
}
.el-table [class*="el-table__row--level"] .el-table__expand-icon {
width: 0.2rem !important;
line-height: 0.2rem !important;
height: 0.2rem !important;
margin-right: 0.03rem !important;
}
.el-cascader-node__label {
padding: 0 0.1rem !important;
}
.el-input--prefix .el-input__inner {
padding-left: 0.3rem !important;
}
.el-input__prefix {
left: 0.05rem !important ;
}
.el-checkbox__inner {
border-radius: 0.02rem !important;
width: 0.14rem !important;
height: 0.14rem !important;
}
.el-checkbox__inner::after {
height: 0.07rem !important;
left: 0.04rem !important;
top: 0.01rem !important;
}
.el-checkbox__inner::after {
height: 0.07rem !important;
left: 0.04rem !important;
top: 0.01rem !important;
width: 0.03rem !important;
}
.el-checkbox__input.is-indeterminate .el-checkbox__inner::before {
height: 0.02rem !important;
top: 0.05rem !important;
}
.el-dialog {
border-radius: 0.1rem !important;
border: 0.02rem solid #005fbf !important;
}
.el-dialog__body {
padding: 0.3rem 0.2rem !important;
font-size: 0.14rem !important;
}
.el-form-item {
margin-bottom: 0.22rem !important;
}
.el-dialog__title {
width: 2.84rem !important;
height: 0.45rem !important;
font-size: 0.2rem !important;
line-height: 0.25rem !important;
}
.el-dialog__footer {
padding: 0.2rem !important;
padding-top: 0.1rem !important;
}
.el-form-item__content {
line-height: 0.32rem !important;
font-size: 0.14rem !important;
}
.el-message-box__message p {
line-height: 0.24rem !important;
}
.el-dialog .el-row {
margin-bottom: 0.1rem !important;
}
.el-dialog__headerbtn {
top: 0.32rem !important;
right: 0.2rem !important;
font-size: 0.16rem !important;
}
.el-dialog__header {
padding: 0.2rem !important;
padding-bottom: 0.1rem !important;
}
.el-dialog__headerbtn .el-dialog__close {
font-size: 0.25rem !important;
}
.el-dropdown-menu--medium .el-dropdown-menu__item {
line-height: 0.3rem !important;
padding: 0 0.17rem !important;
font-size: 0.14rem !important;
}
.vue-treeselect--searchable .vue-treeselect__input-container {
padding-left: 0.05rem !important;
padding-right: 0.05rem !important;
}
.vue-treeselect__x-container,
.vue-treeselect__control-arrow-container {
width: 0.2rem !important;
}
.vue-treeselect__x {
width: 0.08rem !important;
height: 0.08rem !important;
}
.vue-treeselect__control-arrow,
.vue-treeselect__option-arrow {
width: 0.09rem !important;
height: 0.09rem !important;
}
.vue-treeselect__option-arrow-container,
.vue-treeselect__option-arrow-placeholder {
width: 0.2rem !important;
}
.vue-treeselect div,
.vue-treeselect span {
line-height: 0.36rem !important;
}
.el-dropdown-menu--mini .el-dropdown-menu__item {
line-height: 0.24rem !important;
padding: 0 0.1rem !important;
font-size: 0.12rem !important;
}
// 弹框input宽度对齐
.el-form-item--medium .el-form-item__content {
width: 100%;
}
.el-popover {
// min-width: 1.5rem !important;
min-width: 4.6rem !important;
border-radius: 0.04rem !important;
border: 0.01rem solid #e6ebf5 !important;
padding: 0.12rem !important;
font-size: 0.14rem !important;
}
.el-card__header {
padding: 0.14rem 0.15rem 0.07rem !important;
min-height: 0.4rem !important;
}
}
@media (min-width: 2000px) {
// 页面公共样式
.analysis-table th {
height: 0.5rem !important;
@ -428,4 +709,50 @@
font-size: 0.24rem !important;
}
}
.choice {
margin-left: 0.42rem !important;
.mr20 {
font-size: 0.16rem !important;
width: 0.48rem !important;
border-radius: 0.14rem !important;
margin-right: 0.1rem !important;
}
}
.timeStyle {
border-radius: 0.14rem !important;
}
.special-div {
.special-top {
padding: 0.04rem 0.26rem 0.04rem 0 !important;
min-height: 0.37rem !important;
}
.special-top::after {
height: 0.01rem !important;
top: -0.03rem !important;
}
.special-top::before {
height: 0.01rem !important;
bottom: -0.03rem !important;
}
.special-title {
padding-left: 0.36rem !important;
font-size: 0.2rem !important;
line-height: 0.23rem !important;
background-size: 1.4rem 0.35rem !important;
background-position: 0px -0.03rem !important;
}
.special-title::before {
width: 0.34rem !important;
height: 0.13rem !important;
}
}
// 首页
.project-data {
margin: 0.16rem 0 !important;
}
.form-header {
font-size: 0.15rem !important;
margin: 0.08rem 0.1rem 0.25rem 0.1rem !important;
padding-bottom: 0.05rem !important;
}
}

14
src/assets/styles/element-ui.scss

@ -1430,7 +1430,7 @@
min-width: 50px !important;
z-index: 0;
}
.el-input__suffix{
.el-input__suffix {
z-index: 10;
}
.el-cascader__tags {
@ -1438,4 +1438,14 @@
flex-direction: row;
align-items: center;
flex-wrap: nowrap;
}
}
.el-table--group,
.el-table--border {
border: 1px solid #00264f !important;
}
.el-table--border .el-table__cell {
border-right: 1px solid #00264f !important;
}
.el-table--border th.el-table__cell {
border-bottom: 1px solid #00264f !important;
}

277
src/assets/styles/index.scss

@ -357,7 +357,7 @@ aside {
}
// 弹框内容超出高度滚动
.dialog-content {
max-height: 500px; /* 设置最大高度,可根据实际情况调整 */
max-height: 600px; /* 设置最大高度,可根据实际情况调整 */
overflow-y: auto; /* 当内容超出最大高度时,显示垂直滚动条 */
}
.intput-text {
@ -380,7 +380,7 @@ table {
border-spacing: 0;
}
table tr {
height: 45px !important;
height: 45px;
color: #ffffff;
}
table th {
@ -449,7 +449,7 @@ table th {
.el-dialog .el-row .el-select {
width: 100% !important;
}
.el-dialog .el-row .el-date-editor{
.el-dialog .el-row .el-date-editor {
width: 100% !important;
}
@ -502,7 +502,7 @@ table th {
/* 设置滚动条背景颜色 */
}
.analysis-table::-webkit-scrollbar-thumb {
background-color: rgb(21, 50, 104);
background-color: rgb(21, 50, 104);
/* 设置滑块颜色 */
}
.analysis-table::-webkit-scrollbar-thumb:hover {
@ -513,3 +513,272 @@ table th {
background-color: #002249;
/* 设置滑道颜色 */
}
.detail-data-li {
width: 80%;
margin-right: 0.1rem;
position: relative;
color: #c0dffc;
font-family: Arial, sans-serif;
letter-spacing: 0.02rem;
font-size: 0.18rem;
position: relative;
margin-bottom: 0.08rem;
border-left: 0.01rem solid #217df5;
border-right: 0.01rem solid #217df5;
background-image: radial-gradient(
circle at left top,
#217df5 0.01rem,
transparent 0.01rem
),
radial-gradient(circle at right top, #217df5 0.01rem, transparent 0.01rem),
radial-gradient(circle at left bottom, #217df5 0.01rem, transparent 0.01rem),
radial-gradient(
circle at right bottom,
#217df5 0.01rem,
transparent 0.01rem
);
background-repeat: no-repeat;
background-position: left top, right top, left bottom, right bottom;
}
.detail-data-li::before,
.detail-data-li::after {
content: "";
position: absolute;
left: 0;
right: 0;
height: 0.01rem;
background-image: linear-gradient(
to right,
#217df5 0%,
rgba(41, 128, 185, 0) 50%,
#217df5 100%
) !important;
}
.year-data {
margin-top: 0.1rem;
}
.rightDot {
position: relative;
width: 100%;
height: 100%;
z-index: 999;
}
.leftDot {
position: relative;
width: 100%;
height: 100%;
padding: 0.04rem 0.1rem;
display: flex;
flex-direction: row;
justify-content: space-between;
.dotData {
font-weight: bold;
margin: 0 0.06rem;
color: #3b80ff;
display: flex;
align-items: center;
}
.dotUnit {
width: 0.55rem;
text-align: left;
display: flex;
align-items: center;
}
}
.rightDot::before {
content: "";
position: absolute;
top: -0.03rem;
right: -0.03rem;
width: 0.06rem;
height: 0.06rem;
background-color: #217df5;
box-shadow: 0 0 0.1rem 0.02rem rgba(33, 125, 245, 0.9);
background-image: radial-gradient(
circle at 30% 30%,
rgba(255, 255, 255, 0.8) 0%,
rgba(255, 255, 255, 0) 70%
);
border-radius: 50%;
}
.rightDot::after {
content: "";
position: absolute;
bottom: -0.03rem;
right: -0.03rem;
width: 0.06rem;
height: 0.06rem;
background-color: #217df5;
box-shadow: 0 0 0.1rem 0.02rem rgba(33, 125, 245, 0.9);
background-image: radial-gradient(
circle at 30% 30%,
rgba(255, 255, 255, 0.8) 0%,
rgba(255, 255, 255, 0) 70%
);
border-radius: 50%;
}
.leftDot::before {
content: "";
position: absolute;
top: -0.03rem;
left: -0.03rem;
width: 0.06rem;
height: 0.06rem;
background-color: #217df5;
border-radius: 50%;
box-shadow: 0 0 0.1rem 0.02rem rgba(33, 125, 245, 0.9);
background-image: radial-gradient(
circle at 30% 30%,
rgba(255, 255, 255, 0.8) 0%,
rgba(255, 255, 255, 0) 70%
);
}
.leftDot::after {
content: "";
position: absolute;
bottom: -0.03rem;
left: -0.03rem;
width: 0.06rem;
height: 0.06rem;
background-color: #217df5;
box-shadow: 0 0 0.1rem 0.02rem rgba(33, 125, 245, 0.9);
background-image: radial-gradient(
circle at 30% 30%,
rgba(255, 255, 255, 0.8) 0%,
rgba(255, 255, 255, 0) 70%
);
border-radius: 50%;
}
/* 设备控制列表样式 */
.device-container {
display: flex;
flex-direction: column;
width: 100%;
background-color: #142c4e;
padding: 10px 10px 30px 10px;
border-radius: 10px;
margin-bottom: 20px;
}
.device-li {
flex: 1;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
padding: 12px 0;
color: #abcdfc;
border-bottom: 1px dashed #0349ac;
.device-name {
flex: 1;
white-space: nowrap;
font-size: 14px;
.el-switch {
width: 120px !important;
}
.run {
display: flex;
flex-direction: row;
align-items: center;
display: block;
}
.run::before {
content: "";
display: inline-block;
width: 10px;
height: 10px;
background-color: rgb(16, 231, 16);
border-radius: 50%;
margin-right: 5px;
}
.no-run {
display: flex;
flex-direction: row;
align-items: center;
display: block;
}
.no-run::before {
content: "";
display: inline-block;
width: 10px;
height: 10px;
background-color: rgb(180, 180, 180);
border-radius: 50%;
margin-right: 5px;
}
.el-input {
width: 100px;
}
.strong-electric {
background-color: rgba(59, 130, 246, 0.2);
color: #60a5fa;
padding: 5px 20px;
border-radius: 10px;
}
.auto-electric {
background-color: rgba(231, 144, 45, 0.2);
color: #e47f21;
padding: 5px 20px;
border-radius: 10px;
}
.good-status {
color: #4ade80;
}
.bad-status {
color: #f05348;
}
}
.device-name2 {
width: 140px;
}
}
.device-li:nth-child(1) {
color: #9ca3af;
}
// 媒体查询适配大于2000px分辨率的大屏样式
@media (min-width: 2000px) {
.device-li {
padding: 0.12rem 0 !important;
border-bottom: 0.01rem dashed #0349ac !important;
.device-name {
font-size: 0.14rem !important;
.el-switch {
width: 1.2rem !important;
}
.run::before {
width: 0.1rem !important;
height: 0.1rem !important;
margin-right: 0.05rem !important;
}
.no-run::before {
width: 0.1rem !important;
height: 0.1rem !important;
margin-right: 0.05rem !important;
}
.el-input {
width: 1rem !important;
}
.strong-electric {
padding: 0.05rem 0.2rem;
border-radius: 0.1rem !important;
}
.auto-electric {
padding: 0.05rem 0.2rem;
border-radius: 0.1rem !important;
}
}
}
}
/* 手机端样式 */
@media (min-width: 0px) and (max-width: 990px) {
.app-main {
height: 100% !important;
overflow-y: hidden !important;
}
}

22
src/components/Crontab/index.vue

@ -70,33 +70,33 @@
<p class="title">时间表达式</p>
<table>
<thead>
<th v-for="item of tabTitles" width="40" :key="item">{{item}}</th>
<th v-for="item of tabTitles" width="40" :key="item">{{ item }}</th>
<th>Cron 表达式</th>
</thead>
<tbody>
<td>
<span>{{crontabValueObj.second}}</span>
<span>{{ crontabValueObj.second }}</span>
</td>
<td>
<span>{{crontabValueObj.min}}</span>
<span>{{ crontabValueObj.min }}</span>
</td>
<td>
<span>{{crontabValueObj.hour}}</span>
<span>{{ crontabValueObj.hour }}</span>
</td>
<td>
<span>{{crontabValueObj.day}}</span>
<span>{{ crontabValueObj.day }}</span>
</td>
<td>
<span>{{crontabValueObj.month}}</span>
<span>{{ crontabValueObj.month }}</span>
</td>
<td>
<span>{{crontabValueObj.week}}</span>
<span>{{ crontabValueObj.week }}</span>
</td>
<td>
<span>{{crontabValueObj.year}}</span>
<span>{{ crontabValueObj.year }}</span>
</td>
<td>
<span>{{crontabValueString}}</span>
<span>{{ crontabValueString }}</span>
</td>
</tbody>
</table>
@ -329,7 +329,7 @@ export default {
},
},
computed: {
crontabValueString: function() {
crontabValueString: function () {
let obj = this.crontabValueObj;
let str =
obj.second +
@ -363,7 +363,7 @@ export default {
//
},
},
mounted: function() {
mounted: function () {
this.resolveExp();
},
};

32
src/components/IconSelect/index.vue

@ -73,6 +73,8 @@ export default {
display: flex;
.icon-item {
display: flex;
flex-wrap: row;
align-items: center;
max-width: 100%;
height: 100%;
padding: 0 5px;
@ -101,4 +103,34 @@ export default {
}
}
}
// 2000px-element
@media (min-width: 2000px) {
.icon-body {
padding: 0.1rem !important;
.icon-search {
margin-bottom: 0.05rem !important;
}
.icon-list {
height: 2rem !important;
.list-container {
.icon-item-wrapper {
height: 0.25rem !important;
line-height: 0.25rem !important;
.icon-item {
padding: 0 0.05rem !important;
&:hover {
border-radius: 0.05rem !important;
}
span {
padding-left: 0.02rem !important;
}
}
.icon-item.active {
border-radius: 0.05rem !important;
}
}
}
}
}
}
</style>

29
src/store/modules/permission.js

@ -90,6 +90,35 @@ const permission = {
// console.log("不满足条件");
}
// 风柜
const result2 = sidebarRoutes.find(
(item) => item.name === "AircAndWindc"
);
if (result2) {
// 定义要添加的多个路由对象数组
const additionalRoutes2 = [
{
path: "/asSysMonitorDetails",
name: "asSysMonitorDetails",
hidden: true,
component: () =>
import(
"@/views/aircAndWindc/awSysMonitor/asSysMonitorDetails"
),
meta: { title: "系统监控", icon: "screen" },
},
// 可以继续添加更多路由对象
];
// 循环添加额外的路由对象到各路由数组
additionalRoutes2.forEach((route) => {
sidebarRoutes.push(route);
rewriteRoutes.push(route);
asyncRoutes.push(route);
});
} else {
// console.log("不满足条件");
}
commit("SET_ROUTES", rewriteRoutes);
commit("SET_SIDEBAR_ROUTERS", constantRoutes.concat(sidebarRoutes));
commit("SET_DEFAULT_ROUTES", sidebarRoutes);

2110
src/views/aircAndWindc/awSysMonitor/asSysMonitorDetails.vue

File diff suppressed because it is too large Load Diff

1840
src/views/aircAndWindc/awSysMonitor/index copy.vue

File diff suppressed because it is too large Load Diff

1200
src/views/aircAndWindc/awSysMonitor/index.vue

File diff suppressed because it is too large Load Diff

43
src/views/alarm/alarmCode/index.vue

@ -7,7 +7,6 @@
ref="queryForm"
size="small"
:inline="true"
label-width="68px"
>
<el-form-item label="消息编码" prop="msgCode">
<el-input
@ -22,6 +21,7 @@
v-model="queryParams.status"
placeholder="选择采集类别"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_collection_type"
@ -36,6 +36,7 @@
v-model="queryParams.eventType"
placeholder="选择事件类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_event_type"
@ -50,6 +51,7 @@
v-model="queryParams.alarmLevel"
placeholder="选择报警等级"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_level"
@ -213,8 +215,8 @@
/>
<!-- 添加或报警编码对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-dialog :title="title" :visible.sync="open" append-to-body>
<el-form ref="form" :model="form" :rules="rules" >
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="消息编码" prop="msgCode">
@ -227,6 +229,7 @@
v-model="form.collectionType"
placeholder="请选择采集类别"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_collection_type"
@ -245,6 +248,7 @@
v-model="form.eventType"
placeholder="请选择事件类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_event_type"
@ -260,6 +264,7 @@
v-model="form.alarmLevel"
placeholder="请选择报警等级"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_level"
@ -494,3 +499,35 @@ export default {
},
};
</script>
<style scoped lang="scss">
/* 媒体查询,适配大于2000px分辨率的大屏样式 - element样式 */
@media (max-width: 2000px) {
::v-deep .el-dialog {
width: 700px !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 110px !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
@media (min-width: 2000px) {
::v-deep .el-dialog {
width: 7.5rem !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 1.1rem !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
</style>

40
src/views/alarm/alarmRecord/index.vue

@ -7,7 +7,6 @@
ref="queryForm"
size="small"
:inline="true"
label-width="68px"
>
<el-form-item label="设备名称" prop="deviceName">
<el-input
@ -22,6 +21,7 @@
v-model="queryParams.alarmType"
placeholder="选择报警类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_type"
@ -36,6 +36,7 @@
v-model="queryParams.eventType"
placeholder="选择事件类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_event_type"
@ -50,6 +51,7 @@
v-model="queryParams.alarmLevel"
placeholder="选择报警等级"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_level"
@ -72,6 +74,7 @@
v-model="queryParams.status"
placeholder="选择处理状态"
clearable
filterable
>
<el-option label="未处理" value="0" />
<el-option label="已处理" value="1" />
@ -203,8 +206,8 @@
/>
<!-- 修改报警记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-dialog :title="title" :visible.sync="open" append-to-body>
<el-form ref="form" :model="form" :rules="rules">
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="设备名称" prop="deviceName">
@ -481,3 +484,34 @@ export default {
color: rgb(7, 214, 110);
}
</style>
<style scoped lang="scss">
/* 媒体查询,适配大于2000px分辨率的大屏样式 - element样式 */
@media (max-width: 2000px) {
::v-deep .el-dialog {
width: 700px !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 140px !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
@media (min-width: 2000px) {
::v-deep .el-dialog {
width: 7.5rem !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 1.4rem !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
</style>

55
src/views/alarm/alarmRule/index.vue

@ -7,13 +7,13 @@
ref="queryForm"
size="small"
:inline="true"
label-width="68px"
>
<el-form-item label="报警类型" prop="alarmType">
<el-select
v-model="queryParams.alarmType"
placeholder="选择报警类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_type"
@ -28,6 +28,7 @@
v-model="queryParams.eventType"
placeholder="选择事件类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_event_type"
@ -42,6 +43,7 @@
v-model="queryParams.alarmLevel"
placeholder="选择报警等级"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_level"
@ -243,8 +245,8 @@
/>
<!-- 添加或报警规则对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-dialog :title="title" :visible.sync="open" append-to-body>
<el-form ref="form" :model="form" :rules="rules">
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="设备名称" prop="ledgerId">
@ -253,6 +255,7 @@
placeholder="请选择设备类型"
clearable
@change="handleDevice"
filterable
>
<el-option
v-for="item in devices"
@ -270,6 +273,7 @@
placeholder="请选择设备类型"
clearable
@change="handleMeter"
filterable
>
<el-option
v-for="item in cpmList"
@ -288,6 +292,7 @@
v-model="form.alarmType"
placeholder="请选择报警类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_type"
@ -315,6 +320,7 @@
v-model="form.eventType"
placeholder="请选择事件类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_event_type"
@ -330,6 +336,7 @@
v-model="form.alarmLevel"
placeholder="请选择报警等级"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_level"
@ -347,6 +354,7 @@
v-model="form.triggerEvent"
placeholder="请选择"
clearable
filterable
>
<el-option label="开" value="0" />
<el-option label="关" value="1" />
@ -359,6 +367,7 @@
v-model="form.timePeriodSet"
placeholder="请选择"
clearable
filterable
>
<el-option label="全时段" value="0" />
<el-option label="自定义时段" value="1" />
@ -433,7 +442,12 @@
<el-row type="flex" justify="flex-start">
<el-col :span="12">
<el-form-item label="状态" prop="status">
<el-select v-model="form.status" placeholder="请选择" clearable>
<el-select
v-model="form.status"
placeholder="请选择"
clearable
filterable
>
<el-option label="已启用" value="0" />
<el-option label="未启用" value="1" />
</el-select>
@ -670,7 +684,7 @@ export default {
this.getCpmIdList(this.form.ledgerId);
}
//
this.form.cpmId = ""
this.form.cpmId = "";
},
//
getCpmIdList(id) {
@ -819,3 +833,34 @@ export default {
color: red;
}
</style>
<style scoped lang="scss">
/* 媒体查询,适配大于2000px分辨率的大屏样式 - element样式 */
@media (max-width: 2000px) {
::v-deep .el-dialog {
width: 700px !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 150px !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
@media (min-width: 2000px) {
::v-deep .el-dialog {
width: 7.5rem !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 1.5rem !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
</style>

66
src/views/bigScreen/bigScreen.vue

@ -52,7 +52,7 @@
<div class="special-top">
<div class="special-title">
<div class="title-left">
<div>冷源系统能</div>
<div>冷源系统能</div>
<time-data
v-model="sharedIndex"
:currentIndex="sharedIndex"
@ -153,7 +153,7 @@
src="../../assets/images/message-img5.png"
alt=""
/>
<div class="message-data">{{ viewMes.eleUnitArea }}wkh/</div>
<div class="message-data">{{ viewMes.eleUnitArea }}kwh/</div>
<div>面积电耗</div>
</div>
<div class="message-li">
@ -162,7 +162,7 @@
src="../../assets/images/message-img7.png"
alt=""
/>
<div class="message-data">{{ viewMes.waterUnitArea }}kwh</div>
<div class="message-data">{{ viewMes.waterUnitArea }}t/</div>
<div>面积水耗</div>
</div>
<div class="message-li">
@ -171,7 +171,7 @@
src="../../assets/images/message-img8.png"
alt=""
/>
<div class="message-data">{{ viewMes.coldUnitArea }}kw/lm³</div>
<div class="message-data">{{ viewMes.coldUnitArea }}kw/</div>
<div>面积冷耗</div>
</div>
<div class="message-li">
@ -180,7 +180,7 @@
src="../../assets/images/message-img9.png"
alt=""
/>
<div class="message-data">{{ viewMes.gasUnitArea }}kw/lm³</div>
<div class="message-data">{{ viewMes.gasUnitArea }}t/</div>
<div>面积汽耗</div>
</div>
</div>
@ -395,7 +395,7 @@ export default {
-webkit-background-clip: text;
color: transparent;
}
.day{
.day {
position: absolute;
top: 0.43rem;
left: 5rem;
@ -581,4 +581,58 @@ export default {
}
}
}
// 2000px-element
@media (min-width: 2000px) {
.loginD {
padding-bottom: 0.2rem !important;
.title-left {
width: calc(100% - 0.3rem) !important;
}
.special-div {
margin-bottom: 0.17rem !important;
}
.screen-page {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: stretch;
width: calc(100% - 1.22rem) !important;
margin-top: 0.86rem !important;
.screen-left {
width: 30% !important;
.left-Indicator {
position: absolute;
right: -0.9rem !important;
width: 0.6rem !important;
height: 0.4rem !important;
}
}
.screen-right {
width: 30% !important;
.message {
margin-top: 0.29rem !important;
font-size: 0.16rem !important;
.message-li {
width: calc(33.33% - 0.32rem) !important;
margin: 0 0.16rem !important;
.message-data {
font-size: 0.2rem !important;
margin-bottom: 0.3rem !important;
}
.message-img {
width: 1rem !important;
height: 0.99rem !important;
}
}
}
.right-Indicator {
position: absolute;
left: -0.9rem !important;
width: 0.6rem !important;
height: 0.4rem !important;
}
}
}
}
}
</style>

46
src/views/bigScreen/components/allEnergy.vue

@ -17,7 +17,7 @@ export default {
return {
chartInstance: null,
option: {},
energyMes:{}
energyMes: {},
};
},
watch: {
@ -29,7 +29,7 @@ export default {
this.energyMes = newVal;
this.$nextTick(() => {
this.echartsData();
})
});
}
},
},
@ -124,10 +124,10 @@ export default {
{
name: "数据详情:",
data: [
{ value: this.energyMes.totalEle, name: "耗电量标准煤" },
{ value: this.energyMes.totalEle, name: "用水量标准煤" },
{ value: this.energyMes.totalEle, name: "产冷量标准煤" },
{ value: this.energyMes.totalEle, name: "蒸汽量标准煤" },
{ value: this.energyMes.eleStandardCoal, name: "耗电量" },
{ value: this.energyMes.waterStandardCoal, name: "用水量" },
{ value: this.energyMes.coldStandardCoal, name: "产冷量" },
{ value: this.energyMes.gasStandardCoal, name: "蒸汽量" },
],
itemStyle: {
color: function (params) {
@ -140,10 +140,10 @@ export default {
},
{
data: [
{ value: this.energyMes.totalEle, name: "耗电量标准煤" },
{ value: this.energyMes.totalEle, name: "用水量标准煤" },
{ value: this.energyMes.totalEle, name: "产冷量标准煤" },
{ value: this.energyMes.totalEle, name: "蒸汽量标准煤" },
{ value: this.energyMes.eleStandardCoal, name: "耗电量" },
{ value: this.energyMes.waterStandardCoal, name: "用水量" },
{ value: this.energyMes.coldStandardCoal, name: "产冷量" },
{ value: this.energyMes.gasStandardCoal, name: "蒸汽量" },
],
},
],
@ -227,10 +227,10 @@ export default {
{
name: "数据详情:",
data: [
{ value: 0, name: "耗电量标准煤" },
{ value: 0, name: "用水量标准煤" },
{ value: 0, name: "产冷量标准煤" },
{ value: 0, name: "蒸汽量标准煤" },
{ value: 0, name: "耗电量" },
{ value: 0, name: "用水量" },
{ value: 0, name: "产冷量" },
{ value: 0, name: "蒸汽量" },
],
itemStyle: {
color: function (params) {
@ -243,10 +243,10 @@ export default {
},
{
data: [
{ value: 0, name: "耗电量标准煤" },
{ value: 0, name: "用水量标准煤" },
{ value: 0, name: "产冷量标准煤" },
{ value: 0, name: "蒸汽量标准煤" },
{ value: 0, name: "耗电量" },
{ value: 0, name: "用水量" },
{ value: 0, name: "产冷量" },
{ value: 0, name: "蒸汽量" },
],
},
],
@ -278,7 +278,7 @@ export default {
this.option = {
//
title: {
subtext: "标准煤",
subtext: "标准煤",
textStyle: {
color: "#ffffff",
},
@ -426,4 +426,12 @@ export default {
height: 200px;
margin-top: 20px;
}
// 2000px
@media (min-width: 2000px) {
.charts {
margin-top: 0.3rem !important;
height: 2.4rem !important;
margin-top: 0.2rem !important;
}
}
</style>

39
src/views/bigScreen/components/coldSysEnergy.vue

@ -2,8 +2,8 @@
<div class="energy_content">
<div class="sys_charts" ref="sys_charts"></div>
<div class="eer">
<div>用电:{{energyMes.totalEle}}kw/h</div>
<div>产冷:{{energyMes.totalCold}}kwh</div>
<div>产冷:{{ energyMes.totalCold }}kwh</div>
<div>用电:{{ energyMes.totalEle }}kw/h</div>
</div>
</div>
</template>
@ -460,14 +460,25 @@ export default {
console.log("两个系统参数返回", res);
if (res.code == 200) {
this.energyMes = res.rows[0];
this.useForm.maxData = 10;
this.useForm.useData = res.rows[0].eer;
this.useForm.maxData = 10; //
const { totalEle, totalCold } = res.rows[0];
if (totalEle === 0 || totalCold === 0) {
this.useForm.useData = 0;
} else {
const result = totalCold / totalEle;
if (Number.isInteger(result)) {
this.useForm.useData = result;
} else {
this.useForm.useData = parseFloat(result.toFixed(2));
}
}
let that = this;
// 使
const axisLineColor = this.getAxisLineColor(
this.useForm.useData,
this.useForm.maxData
);
const titleFontSize = this.$refs.sys_charts.offsetWidth / 25;
const adapterOption = {
series: [
{
@ -498,7 +509,7 @@ export default {
label: {
show: true,
position: "center", //
offset: [0, -5], // 10
offset: [0, -titleFontSize * 0.6], // 10
formatter: function () {
// HTML 使 rich
return `{line|${that.useForm.useData}}`;
@ -506,7 +517,7 @@ export default {
rich: {
line: {
color: "#fff", //
fontSize: 20, //
fontSize: titleFontSize, //
lineHeight: 0, //
},
},
@ -579,10 +590,11 @@ export default {
justify-content: center;
width: 100% !important;
height: 100%;
padding: 10px 0;
.sys_charts {
width: 100%;
height: 1.6rem;
height: 160px;
}
.eer {
width: 80%;
@ -595,4 +607,17 @@ export default {
margin: 10px 0;
}
}
// 2000px
@media (min-width: 2000px) {
.energy_content {
padding: 0.1rem 0 !important;
.sys_charts {
height: 1.6rem !important;
}
.eer {
font-size: 0.18rem !important;
margin: 0.2rem 0 !important;
}
}
}
</style>

23
src/views/bigScreen/components/useElect.vue

@ -180,6 +180,7 @@ export default {
systemTrend(data).then((res) => {
console.log("用电趋势返回", res);
if (res.code == 200) {
const titleFontSize = this.$refs.sys_charts.offsetWidth / 40;
let adapterOption = {};
// 线
adapterOption = {
@ -209,6 +210,14 @@ export default {
},
xAxis: {
data: res.rows[0].timeStr,
axisLabel: {
fontSize: titleFontSize,
},
},
yAxis: {
axisLabel: {
fontSize: titleFontSize,
},
},
series: [
{
@ -255,11 +264,23 @@ export default {
.sys_charts {
width: 100%;
height: 2rem;
height: 230px;
}
.eer {
font-size: 18px;
margin-top: 25px;
}
}
// 2000px
@media (min-width: 2000px) {
.energy_content {
.sys_charts {
height: 2.4rem !important;
}
.eer {
font-size: 0.18rem !important;
margin-top: 0.25rem !important;
}
}
}
</style>

1138
src/views/bigScreen/components/waterSysEnergy.vue

File diff suppressed because it is too large Load Diff

2
src/views/centerairC/deviceStrategy/index.vue

@ -370,7 +370,7 @@ export default {
position: relative;
width: calc(33.33% - 40px);
margin: 0 20px;
min-height: 300px;
min-height: 350px;
background-image: url(../../../assets/images/strategy-border.png);
background-size: 100% 100%;
border-bottom: 1px solid #1587cc;

9
src/views/centerairC/enSourceAnalysis/components/deviceEnergy.vue

@ -60,7 +60,6 @@
v-model="startYear"
type="year"
placeholder="选择开始年份"
style="width: 180px"
value-format="yyyy"
>
</el-date-picker>
@ -69,7 +68,6 @@
v-model="endYear"
type="year"
placeholder="选择结束年份"
style="width: 180px"
value-format="yyyy"
>
</el-date-picker>
@ -427,6 +425,11 @@ export default {
this.option2.series[0].data = this.electData2;
this.option2.xAxis.data = this.dateList2;
this.option2.yAxis.name = "kwh";
this.option2.yAxis.nameTextStyle = {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
};
console.log("x轴", this.dateList2);
console.log("折线图数据", this.electData2);
this.screenAdapter();
@ -502,7 +505,7 @@ export default {
show: false, //
},
grid: {
top: "5%",
top: "6%",
left: "3%",
right: "4.4%",
bottom: "20%",

7
src/views/centerairC/enSourceAnalysis/components/equipment.vue

@ -59,7 +59,6 @@
v-model="startYear"
type="year"
placeholder="选择开始年份"
style="width: 180px"
value-format="yyyy"
>
</el-date-picker>
@ -68,7 +67,6 @@
v-model="endYear"
type="year"
placeholder="选择结束年份"
style="width: 180px"
value-format="yyyy"
>
</el-date-picker>
@ -562,6 +560,11 @@ export default {
console.log("图表数据", this.dataArr);
this.option1.series = this.dataArr;
this.option1.xAxis.data = this.timeData;
this.option1.yAxis.name = "kwh";
this.option1.yAxis.nameTextStyle = {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
};
//
this.chartInstance1.clear();
this.screenAdapter();

2
src/views/centerairC/enSourceAnalysis/components/machineRoom.vue

@ -53,7 +53,6 @@
v-model="startYear"
type="year"
placeholder="选择开始年份"
style="width: 180px"
value-format="yyyy"
>
</el-date-picker>
@ -62,7 +61,6 @@
v-model="endYear"
type="year"
placeholder="选择结束年份"
style="width: 180px"
value-format="yyyy"
>
</el-date-picker>

40
src/views/centerairC/energyAnalysis/components/energyAnalysis.vue

@ -487,7 +487,7 @@ export default {
},
grid: {
top: "5%",
top: "9%",
left: "3%",
right: "4.4%",
bottom: "20%",
@ -696,6 +696,17 @@ export default {
//
screenAdapter2() {
// console.log("checkList:", this.checkList);
//
// const selected = {
// EER: false,
// : false,
// : false,
// };
// const updatedSelected = {
// ...selected,
// [this.checkList]: true,
// };
//
const selected = {
瞬时系统EER: false,
瞬时冷量: false,
@ -705,6 +716,26 @@ export default {
...selected,
[this.checkList]: true,
};
let unit;
// selected
for (const key in updatedSelected) {
if (updatedSelected[key]) {
switch (key) {
case "瞬时系统EER":
unit = "";
break;
case "瞬时冷量":
unit = "kwr";
break;
case "瞬时功率":
unit = "kw";
break;
default:
unit = "";
}
break;
}
}
// console.log(updatedSelected);
//,2.6 mes_ref
const titleFontSize = this.$refs.charts_refs.offsetWidth / 130;
@ -717,6 +748,9 @@ export default {
// data: ["2021", "2022", "2023"],
data: this.dateList2,
},
yAxis: {
name: unit,
},
series: [
{
name: "瞬时系统EER",
@ -756,6 +790,10 @@ export default {
axisLabel: {
fontSize: titleFontSize * 1.5,
},
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: titleFontSize * 1.3,
},
},
};
//.chartInstanceoptiondataoption

911
src/views/centerairC/hostRunReport/index.vue

@ -0,0 +1,911 @@
<template>
<div class="app-container">
<div class="btn-condition">
<div class="condition-left" v-show="showSearch">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
>
<el-form-item label="主机编号" prop="deviceNum">
<el-select
v-model="queryParams.deviceNum"
placeholder="请选择主机编号"
clearable
>
<el-option label="1号主机" value="1" />
<el-option label="2号主机" value="2" />
<el-option label="3号主机" value="3" />
</el-select>
</el-form-item>
<el-form-item label="日期范围" prop="timeArr">
<el-date-picker
style="width: 220px"
v-model="timeArr"
type="daterange"
unlink-panels
range-separator="~"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
@change="dateChange"
>
</el-date-picker>
</el-form-item>
</el-form>
<div class="primary-btn">
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
</div>
<div class="cancel-btn">
<el-button
type="cancel"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
</div>
</div>
</div>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<div class="success-btn">
<el-button
type="success"
@click="leadingPrint"
icon="el-icon-printer"
size="mini"
>打印</el-button
>
</div>
</el-col> -->
<el-col :span="1.5">
<div class="warning-btn">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
</div>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="postList" stripe>
<!-- <el-table-column label="主机id" align="center" prop="deviceNum" /> -->
<el-table-column label="时间" align="center" prop="curTime" />
<el-table-column label="蒸发器">
<el-table-column
label="冷冻水进水温度(℃)"
align="center"
prop="tempInChillerWater" />
<el-table-column
label="冷冻水出水温度(℃)"
align="center"
prop="tempOutChillerWater" />
<el-table-column label="设计流量(%)" align="center" prop="designFlow" />
<el-table-column
label="蒸发器压力(kpa)"
align="center"
prop="pressEvapSaturation" />
<el-table-column
label="蒸发器饱和温度(℃)"
align="center"
prop="tempEvapSaturation" />
<el-table-column
label="蒸发器趋近温度(℃)"
align="center"
prop="tempEvapApproaching"
/></el-table-column>
<el-table-column label="冷凝器">
<el-table-column
label="冷却水进水温度(℃)"
align="center"
prop="tempInCoolingWater"
/>
<el-table-column
label="冷却水出水温度(℃)"
align="center"
prop="tempOutCoolingWater"
/>
<el-table-column
label="冷凝器压力(kpa)"
align="center"
prop="pressCondenserSaturation"
/>
<el-table-column
label="冷凝器饱和温度(℃)"
align="center"
prop="tempCondenserSaturation"
/>
<el-table-column
label="冷凝器趋近温度(℃)"
align="center"
prop="tempCondenserApproaching"
/>
</el-table-column>
<el-table-column label="系统">
<el-table-column
label="冷冻水设定值(℃)"
align="center"
prop="setChillerWater"
/>
<el-table-column label="冷水机需求(%)" align="center" prop="setLoad" />
<el-table-column label="总电流(%)" align="center" prop="currentTotal" />
<el-table-column
label="总输入功率(kw)"
align="center"
prop="inputPowerTotal"
/>
<el-table-column
label="压缩机1_压缩比"
align="center"
prop="ratioCompOne"
/>
<el-table-column
label="压缩机2_压缩比"
align="center"
prop="ratioCompTwo"
/>
<el-table-column
label="压缩机3_压缩比"
align="center"
prop="ratioCompThree"
/>
<el-table-column label="膨胀阀开度(%)" align="center" prop="openExv" />
<el-table-column
label="运行中的压缩机数量"
align="center"
prop="runCompNum"
/>
</el-table-column>
<el-table-column label="冷冻泵">
<el-table-column
label="冷冻水泵频率(hz)"
align="center"
prop="frequencyChiller"
/>
<el-table-column
label="冷冻水出水压力(kpa)"
align="center"
prop="pressOutChillerWater"
/>
<el-table-column
label="冷冻水进水压力(kpa)"
align="center"
prop="pressInChillerWater"
/>
</el-table-column>
<el-table-column label="冷却泵">
<el-table-column
label="冷却水泵频率(hz)"
align="center"
prop="frequencyCooling"
/>
<el-table-column
label="冷却水出水压力(kpa)"
align="center"
prop="pressOutCoolingWater"
/>
<el-table-column
label="冷却水进水压力(kpa)"
align="center"
prop="pressInCoolingWater"
/>
</el-table-column>
<el-table-column label="冷却塔">
<el-table-column
label="冷却塔水泵频率(hz)"
align="center"
prop="frequencyCoolingTower"
/>
<el-table-column
label="冷却塔运行数量"
align="center"
prop="runCoolingTower"
/>
</el-table-column>
<el-table-column label="室外温度(℃)" align="center" prop="tempOutdoor" />
<el-table-column
label="室外湿度(%)"
align="center"
prop="humidityOutdoor"
/>
<el-table-column
label="恒压补水罐压力(Mpa)"
align="center"
prop="pressConstantWaterTank"
/>
<el-table-column label="巡查记录人" align="center" prop="recorder" />
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:ledger:edit']"
>修改</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改设备台账对话框 -->
<el-dialog :title="title" :visible.sync="open" append-to-body>
<el-form ref="form" :model="form" :rules="rules">
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="主机编号" prop="deviceNum">
<el-select
v-model="form.deviceNum"
placeholder="请选择主机编号"
disabled
>
<el-option label="1号主机" value="1" />
<el-option label="2号主机" value="2" />
<el-option label="3号主机" value="3" />
</el-select> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="设计流量(%)" prop="designFlow">
<el-input v-model="form.designFlow" placeholder="请输入流量(%)" />
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="冷冻水进水温度(℃)" prop="tempInChillerWater">
<el-input
v-model="form.tempInChillerWater"
placeholder="请输入温度(℃)"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="冷冻水出水温度(℃)" prop="tempOutChillerWater">
<el-input
v-model="form.tempOutChillerWater"
placeholder="请输入温度(℃)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="蒸发器饱和温度(℃)" prop="tempEvapSaturation">
<el-input
v-model="form.tempEvapSaturation"
placeholder="请输入温度(℃)"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="蒸发器趋近温度(℃)" prop="tempEvapApproaching">
<el-input
v-model="form.tempEvapApproaching"
placeholder="请输入温度(℃)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="蒸发器压力(kpa)" prop="pressEvapSaturation">
<el-input
v-model="form.pressEvapSaturation"
placeholder="请输入压力(kpa)"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item
label="冷凝器压力(kpa)"
prop="pressCondenserSaturation"
>
<el-input
v-model="form.pressCondenserSaturation"
placeholder="请输入压力(kpa)"
/> </el-form-item
></el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="冷却水进水温度(℃)" prop="tempInCoolingWater">
<el-input
v-model="form.tempInCoolingWater"
placeholder="请输入温度(℃)"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="冷却水出水温度(℃)" prop="tempOutCoolingWater">
<el-input
v-model="form.tempOutCoolingWater"
placeholder="请输入温度(℃)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item
label="冷凝器饱和温度(℃)"
prop="tempCondenserSaturation"
>
<el-input
v-model="form.tempCondenserSaturation"
placeholder="请输入温度(℃)"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item
label="冷凝器趋近温度(℃)"
prop="tempCondenserApproaching"
>
<el-input
v-model="form.tempCondenserApproaching"
placeholder="请输入温度(℃)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="冷冻水设定值(℃)" prop="setChillerWater">
<el-input
v-model="form.setChillerWater"
placeholder="请输入温度(℃)"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="冷水机需求(%)" prop="setLoad">
<el-input v-model="form.setLoad" placeholder="请输入(%)" />
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="总输入功率(kw)" prop="inputPowerTotal">
<el-input
v-model="form.inputPowerTotal"
placeholder="请输入功率(kw)"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="总电流(%)" prop="currentTotal">
<el-input v-model="form.currentTotal" placeholder="请输入(%)" />
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="压缩机1_压缩比" prop="ratioCompOne">
<el-input
v-model="form.ratioCompOne"
placeholder="请输入压缩比"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="压缩机2_压缩比" prop="ratioCompTwo">
<el-input
v-model="form.ratioCompTwo"
placeholder="请输入压缩比"
/>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="压缩机3_压缩比" prop="ratioCompThree">
<el-input
v-model="form.ratioCompThree"
placeholder="请输入压缩比"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="膨胀阀开度(%)" prop="openExv">
<el-input v-model="form.openExv" placeholder="请输入(%)" />
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="运行中的压缩机数量" prop="runCompNum">
<el-input
v-model="form.runCompNum"
placeholder="请输入数量"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="冷冻水泵频率(hz)" prop="frequencyChiller">
<el-input v-model="form.openExv" placeholder="请输入频率(hz)" />
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item
label="冷冻水出水压力(kpa)"
prop="pressOutChillerWater"
>
<el-input
v-model="form.pressOutChillerWater"
placeholder="请输入压力(kpa)"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item
label="冷冻水进水压力(kpa)"
prop="pressInChillerWater"
>
<el-input
v-model="form.pressInChillerWater"
placeholder="请输入压力(kpa)"
/> </el-form-item
></el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item
label="冷却水出水压力(kpa)"
prop="pressOutCoolingWater"
>
<el-input
v-model="form.pressOutCoolingWater"
placeholder="请输入压力(kpa)"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item
label="冷却水进水压力(kpa)"
prop="pressInCoolingWater"
>
<el-input
v-model="form.pressInCoolingWater"
placeholder="请输入压力(kpa)"
/> </el-form-item
></el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="冷却水泵频率(hz)" prop="frequencyCooling">
<el-input
v-model="form.frequencyCooling"
placeholder="请输入频率(hz)"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item
label="冷却塔水泵频率(hz)"
prop="frequencyCoolingTower"
>
<el-input
v-model="form.frequencyCoolingTower"
placeholder="请输入频率(hz)"
/> </el-form-item
></el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="冷却塔运行数量" prop="runCoolingTower">
<el-input
v-model="form.runCoolingTower"
placeholder="请输入数量"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item
label="恒压补水罐压力(Mpa)"
prop="pressConstantWaterTank"
>
<el-input
v-model="form.pressConstantWaterTank"
placeholder="请输入压力(Mpa)"
/> </el-form-item
></el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="室外温度" prop="tempOutdoor">
<el-input
v-model="form.tempOutdoor"
placeholder="请输入温度(℃)"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="室外湿度(%)" prop="humidityOutdoor">
<el-input
v-model="form.humidityOutdoor"
placeholder="请输入湿度(%)"
/> </el-form-item
></el-col>
</el-row>
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="巡查记录人" prop="recorder">
<el-input
v-model="form.recorder"
placeholder="请输入巡查记录人"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.remark"
placeholder="请输入备注"
/> </el-form-item
></el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm"> </el-button>
</div>
</el-dialog>
<el-dialog
:visible.sync="dialogPrintVisible"
title="打印预览"
class="print-dialog"
>
<div id="report" ref="report" class="report">
<table
border="1"
style="
table-layout: fixed;
width: 100%;
border: 1px solid #e2e6f0;
margin-bottom: 35px;
"
>
<thead>
<tr>
<th rowspan="1" colspan="32">磁悬浮水冷冷水机组数据运行记录表</th>
</tr>
<tr>
<th>主机id</th>
<th>时间</th>
<th colspan="6">蒸发器</th>
<th colspan="5">冷凝器</th>
<th colspan="7">系统</th>
<th colspan="3">冷冻泵</th>
<th colspan="3">冷却泵</th>
<th colspan="2">冷却塔</th>
<th>室外温度()</th>
<th>室外湿度(%)</th>
<th>恒压补水罐压力(Mpa)</th>
<th>巡查记录人</th>
</tr>
<tr>
<th></th>
<th></th>
<th>冷冻水进水温度()</th>
<th>冷冻水出水温度()</th>
<th>设计流量(%)</th>
<th>蒸发器压力(kpa)</th>
<th>蒸发器饱和温度()</th>
<th>蒸发器趋近温度()</th>
<th>冷却水进水温度()</th>
<th>冷却水出水温度()</th>
<th>冷凝器压力(kpa)</th>
<th>冷凝器饱和温度()</th>
<th>冷凝器趋近温度()</th>
<th>冷冻水设定值()</th>
<th>冷水机需求(%)</th>
<th>总电流(%)</th>
<th>总输入功率(kw)</th>
<th>压缩机1_压缩比</th>
<th>膨胀阀开度(%)</th>
<th>运行中的压缩机数量</th>
<th>冷冻水泵频率(hz)</th>
<th>冷冻水出水压力(kpa)</th>
<th>冷冻水进水压力(kpa)</th>
<th>冷却水泵频率(hz)</th>
<th>冷却水出水压力(kpa)</th>
<th>冷却水进水压力(kpa)</th>
<th>冷却塔水泵频率(hz)</th>
<th>冷却塔运行数量</th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tr v-for="(item, index) in postList" :key="index">
<td align="center" v-for="(value, key) in item" :key="key">
{{ value }}
</td>
</tr>
</table>
<div
class="detail"
style="
display: flex;
flex-direction: row;
font-size: 14px;
justify-content: space-between;
flex-wrap: nowrap;
width: 40%;
color: #ffffff;
"
>
<div>操作员: {{ this.userName }}</div>
<div class="print-date">日期 {{ this.operationDate }}</div>
</div>
</div>
<el-row type="flex" justify="end" style="margin-top: 0.2rem">
<el-col :span="2">
<el-button type="info" @click="dialogPrintVisible = false"
>取消</el-button
>
</el-col>
<el-col :span="2" style="margin-left: 60px">
<el-button type="success" @click="surePrint">确认</el-button>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import {
reportSysList,
reportSysEdit,
reportSysExport,
} from "@/api/centerairC/hostRunReport";
import { format2, getDay } from "@/utils/datetime";
export default {
name: "ledger",
data() {
return {
timeArr: [],
//
loading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
postList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
deviceNum: "",
params: {
startTime: "",
endTime: "",
},
},
//
form: {},
//
rules: {
deviceName: [
{ required: true, message: "设备名称不能为空", trigger: "blur" },
],
},
dialogPrintVisible: false,
userName: "", //
operationDate: getDay(0), //
titleDate: "",
};
},
created() {
this.userName = sessionStorage.getItem("userName");
this.queryParams.deviceNum = "1";
this.getList();
},
methods: {
//
dateChange() {
// console.log("", this.timeArr);
if (!this.timeArr) {
this.$nextTick(() => {
this.timeArr = [];
this.queryParams.params.startTime = "";
this.queryParams.params.endTime = "";
});
} else {
this.queryParams.params.startTime = this.timeArr[0];
this.queryParams.params.endTime = this.timeArr[1];
}
},
/** 查询设备台账列表 */
getList() {
this.loading = true;
reportSysList(this.queryParams).then((response) => {
if (response.code == 200) {
this.postList = response.rows;
this.total = response.total;
this.loading = false;
} else {
this.postList = [];
this.total = 0;
this.loading = false;
}
});
},
//
cancel() {
this.open = false;
this.reset();
this.form.id = "";
},
//
reset() {
this.form = {
id: "",
deviceNum: "",
curTime: "",
tempInChillerWater: "",
tempOutChillerWater: "",
designFlow: "",
pressEvapSaturation: "",
tempEvapSaturation: "",
tempEvapApproaching: "",
tempInCoolingWater: "",
tempOutCoolingWater: "",
pressCondenserSaturation: "",
tempCondenserSaturation: "",
tempCondenserApproaching: "",
setChillerWater: "",
setLoad: "",
currentTotal: "",
inputPowerTotal: "",
ratioCompOne: "",
openExv: "",
runCompNum: "",
frequencyChiller: "",
pressOutChillerWater: "",
pressInChillerWater: "",
frequencyCooling: "",
pressOutCoolingWater: "",
pressInCoolingWater: "",
frequencyCoolingTower: "",
runCoolingTower: "",
pressConstantWaterTank: "",
tempOutdoor: "",
humidityOutdoor: "",
recorder: "",
remark: "",
ratioCompTwo: "",
ratioCompThree: "",
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.form = Object.assign({}, row);
this.open = true;
this.title = "修改主机运行记录";
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != undefined) {
reportSysEdit(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
console.log("新增参数", this.form);
}
}
});
},
/** 导出按钮操作 */
handleExport() {
reportSysExport(this.queryParams).then((res) => {
console.log("导出返回", res);
//
// blob URL
const url = window.URL.createObjectURL(new Blob([res]));
// <a>hrefdownload
const link = document.createElement("a");
link.href = url;
link.setAttribute("download", "主机运行记录报表.xls"); //
//
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
// blob URL
window.URL.revokeObjectURL(url);
this.$message({
type: "success",
message: "导出成功!",
});
});
},
//
leadingPrint() {
this.dialogPrintVisible = true;
},
//
surePrint() {
const printHTML = document.querySelector("#report").innerHTML;
//
window.document.body.innerHTML = printHTML;
window.print(); // window
window.location.reload(); //
},
},
};
</script>
<style scoped lang="scss">
/* 媒体查询,适配大于2000px分辨率的大屏样式 - element样式 */
@media (max-width: 2000px) {
::v-deep .el-dialog {
width: 800px !important;
}
::v-deep .print-dialog .el-dialog {
width: 1200px !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 150px !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
@media (min-width: 2000px) {
// ::v-deep .el-dialog {
// width: 8rem !important;
// }
// ::v-deep .el-dialog .el-form-item__label {
// width: 1.5rem !important;
// }
// ::v-deep .el-dialog .el-form-item {
// display: flex;
// flex-direction: row;
// align-items: center;
// }
}
</style>

5
src/views/centerairC/overview/index.vue

@ -115,7 +115,7 @@
</el-table-column>
<el-table-column prop="copData" label="EER"> </el-table-column>
</el-table>
<div class="page" >
<div class="page">
<el-pagination
background
style="width: 100%; height: 20%"
@ -455,6 +455,7 @@ export default {
endTime: this.endTime,
pageNum: 0,
pageSize: 10,
systemType: this.systemType,
};
console.log("查询数据参数", data);
energyInquiry(data).then((res) => {
@ -990,7 +991,7 @@ export default {
align-items: center;
width: 16rem;
}
.page{
.page {
margin-top: 0.22rem;
}

431
src/views/centerairC/sysControl/index copy 2.vue

@ -1,431 +0,0 @@
<template>
<div class="app-container" v-loading="loading">
<!-- 状态统计 -->
<div class="status-statistics">
<div class="status-card">
<div class="status-label">运行设备</div>
<div class="status-value-running">
{{ statistics.running }}/{{ total }}
</div>
</div>
<div class="status-card">
<div class="status-label">手动模式</div>
<div class="status-value-auto">{{ statistics.manual }}/{{ total }}</div>
</div>
<div class="status-card">
<div class="status-label">自动模式</div>
<div class="status-value-maintenance">
{{ statistics.auto }}/{{ total }}
</div>
</div>
<div class="status-card">
<div class="status-label">故障设备</div>
<div class="status-value-error">{{ statistics.warn }}/{{ total }}</div>
</div>
</div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="主机" name="host"> </el-tab-pane>
<el-tab-pane label="冷却塔" name="second"> </el-tab-pane>
<el-tab-pane label="冷却泵" name="three"> </el-tab-pane>
<el-tab-pane label="冷冻泵" name="three"> </el-tab-pane>
<el-tab-pane label="冷冻蝶阀" name="three"> </el-tab-pane>
<el-tab-pane label="冷却蝶阀" name="three"> </el-tab-pane>
<el-tab-pane label="冷却塔出水阀" name="three"> </el-tab-pane>
</el-tabs>
<!-- 非蝶阀控制列表 -->
<div class="device-container">
<list-header
:deviceList="hostList"
@operationControl="hadleOperationConrol"
></list-header>
</div>
<div class="device-container">
<list-header
:deviceList="coolingTowerFanList"
@operationControl="hadleOperationConrol"
></list-header>
</div>
<div class="device-container">
<list-header
:deviceList="coolingPump"
@operationControl="hadleOperationConrol"
></list-header>
</div>
<div class="device-container">
<list-header
:deviceList="freezingPump"
@operationControl="hadleOperationConrol"
></list-header>
</div>
<!-- 蝶阀控制列表 -->
<div class="device-container">
<vavleheader
:valveList="freezingValve"
@operationControl="hadleOperationConrol"
></vavleheader>
</div>
<div class="device-container">
<vavleheader
:valveList="coolingValve"
@operationControl="hadleOperationConrol"
></vavleheader>
</div>
<div class="device-container">
<vavleheader
:valveList="coolingTowerOutValve"
@operationControl="hadleOperationConrol"
></vavleheader>
</div>
</div>
</template>
<script>
import { operationList, operationConrol } from "@/api/centerairC/sysMonitor";
import listHeader from "./listHeader.vue";
import Vavleheader from "./vavleheader.vue";
export default {
components: { listHeader, Vavleheader },
name: "sysMonitor",
data() {
return {
loading: false,
deviceList: [], //
hostList: [], //
coolingTowerFanList: [], //
coolingPump: [], //
freezingPump: [], //
valveList: [], //
total: null,
freezingValve: [], //
coolingValve: [], //
coolingTowerOutValve: [], //
activeName: "host", //
};
},
computed: {
statistics() {
const deviceManual = this.deviceList.filter(
(d) => d.automaticText === false
).length;
const deviceAuto = this.deviceList.filter(
(d) => d.automaticText === true
).length;
const valveManual = this.valveList.filter(
(v) => v.automaticText === false
).length;
const valveAuto = this.valveList.filter(
(v) => v.automaticText === true
).length;
return {
running: this.deviceList.filter((d) => d.runStatus === "运行").length,
manual: deviceManual + valveManual,
auto: deviceAuto + valveAuto,
warn: this.deviceList.filter((d) => d.warnText === "故障").length,
};
},
},
mounted() {
this.getOperationList();
},
methods: {
handleClick(tab, event) {
console.log(tab, event);
},
//
getOperationList() {
return new Promise((resolve, reject) => {
operationList({ systemType: 0 })
.then((res) => {
console.log("列表返回res", res);
if (res.code === 200) {
let handleList = res.rows;
this.deviceList = [];
this.valveList = [];
handleList.forEach((element) => {
if (element.children && element.children.length > 0) {
//
let deviceItem = {
name: element.name,
};
//
let valveItem = {
name: element.name,
};
const limitedChildren = element.children;
let valveClosed = false;
let valveOpened = false;
limitedChildren.forEach((child) => {
if (child.name) {
//
if (
child.paramType === "1" &&
!child.name.includes("阀")
) {
deviceItem.runStatus =
Number(child.value) == 0 ? "不运行" : "运行";
}
//
else if (
child.paramType === "2" &&
!child.name.includes("阀")
) {
deviceItem.controlText =
Number(child.value) == 0 ? false : true;
deviceItem.controlId = child.id;
}
// 01
else if (
child.paramType === "6" &&
!child.name.includes("阀")
) {
deviceItem.automaticText =
Number(child.value) == 0 ? true : false;
deviceItem.automaticId = child.id;
}
//
else if (
child.paramType === "5" &&
!child.name.includes("阀")
) {
deviceItem.warnText =
Number(child.value) == 0 ? "未故障" : "故障";
//
} else if (
child.paramType === "22" &&
!child.name.includes("阀")
) {
deviceItem.localRemote =
Number(child.value) == 0 ? "本地" : "远程";
}
//
else if (
child.paramType === "3" &&
!child.name.includes("阀")
) {
deviceItem.frequencySet =
Number(child.value) == 0 ? "0" : child.value;
deviceItem.frequencyId = child.id;
}
//
else if (child.paramType === "4") {
deviceItem.frequency = child.value;
}
// -
else if (
child.paramType === "6" &&
child.name.includes("阀")
) {
valveItem.automaticText =
Number(child.value) == 0 ? true : false;
valveItem.automaticId = child.id;
}
// -
else if (
child.paramType === "2" &&
child.name.includes("阀")
) {
valveItem.controlText =
Number(child.value) == 0 ? false : true;
valveItem.controlId = child.id;
}
//
if (
child.name.includes("阀关到位") &&
Number(child.value) == 0
) {
valveClosed = false;
} else if (
child.name.includes("阀关到位") &&
Number(child.value) == 1
) {
valveClosed = true;
}
//
if (
child.name.includes("阀开到位") &&
Number(child.value) == 0
) {
valveOpened = false;
} else if (
child.name.includes("阀开到位") &&
Number(child.value) == 1
) {
valveOpened = true;
}
}
});
//
if (valveClosed && !valveOpened) {
valveItem.closeStatus = "开启";
valveItem.openStauts = "关闭";
} else if (!valveClosed && valveOpened) {
valveItem.closeStatus = "关闭";
valveItem.openStauts = "开启";
} else if (!valveClosed && !valveOpened) {
valveItem.closeStatus = "关闭";
valveItem.openStauts = "关闭";
}
// deviceList
if (Object.keys(deviceItem).length > 1) {
this.deviceList.push(deviceItem);
}
// valveList
if (Object.keys(valveItem).length > 1) {
this.valveList.push(valveItem);
}
}
});
this.valveList = this.valveList.filter(
(item) => item.name && item.name.includes("阀")
);
console.log("处理过的this.deviceList", this.deviceList);
console.log("处理过的this.valveList", this.valveList);
this.total = this.deviceList.length + this.valveList.length;
//
this.hostList = [];
this.coolingTowerFanList = [];
this.coolingPump = [];
this.freezingPump = [];
this.freezingValve = [];
this.coolingValve = [];
this.coolingTowerOutValve = [];
this.deviceList.forEach((list) => {
if (list.name.includes("机") && !list.name.includes("风")) {
this.hostList.push(list);
}
if (list.name.includes("风机")) {
this.coolingTowerFanList.push(list);
}
if (list.name.includes("冷却泵")) {
this.coolingPump.push(list);
}
if (list.name.includes("冷冻泵")) {
this.freezingPump.push(list);
}
});
this.valveList.forEach((list) => {
if (list.name.includes("冷冻蝶阀")) {
this.freezingValve.push(list);
}
if (list.name.includes("冷却蝶阀")) {
this.coolingValve.push(list);
}
if (list.name.includes("冷却塔出水阀")) {
this.coolingTowerOutValve.push(list);
}
});
console.log("处理过后的主机列表", this.hostList);
} else {
this.deviceList = [];
this.valveList = [];
this.total = 0;
}
// Promise
resolve(res);
})
.catch((error) => {
// Promise
reject(error);
});
});
},
//
hadleOperationConrol(id, param) {
let data = {
id: id,
param: param,
};
console.log("操作参数", data);
operationConrol([data])
.then((res) => {
if (res.code == 200) {
this.$modal.msgSuccess("指令下发成功!");
// loading
this.loading = true;
// ;
setTimeout(() => {
this.getOperationList().finally(() => {
// loading
this.loading = false;
});
}, 6000);
} else {
// this.$modal.msgError("");
console.log("应该更新状态的");
// ;
this.getOperationList();
}
})
.catch((error) => {
console.log("请求发生错误,更新设备状态", error);
// ;
this.getOperationList();
});
},
},
};
</script>
<style lang="scss" scoped>
/* 设备控制列表样式 */
.device-container {
display: flex;
flex-direction: column;
width: 100%;
background-color: #142c4e;
padding: 10px 10px 30px 10px;
border-radius: 10px;
margin-bottom: 20px;
}
/* 状态统计样式 */
.status-statistics {
margin-bottom: 25px;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.status-card {
background-color: #142c4e;
border-radius: 10px;
padding: 10px;
width: 24%;
}
.status-label {
color: #9ca3af;
margin-bottom: 20px;
}
.status-value-running {
font-size: 24px;
font-weight: bold;
color: #22c55e;
}
.status-value-auto {
font-size: 24px;
font-weight: bold;
color: #60a5fa;
}
.status-value-error {
font-size: 24px;
font-weight: bold;
color: #ef4444;
}
.status-value-maintenance {
font-size: 24px;
font-weight: bold;
color: #f59e0b;
}
</style>

643
src/views/centerairC/sysControl/index copy.vue

@ -1,643 +0,0 @@
<template>
<div class="app-container" v-loading="loading">
<!-- 状态统计 -->
<div class="status-statistics">
<div class="status-card">
<div class="status-label">运行设备</div>
<div class="status-value-running">
{{ statistics.running }}/{{ total }}
</div>
</div>
<div class="status-card">
<div class="status-label">手动模式</div>
<div class="status-value-auto">{{ statistics.manual }}/{{ total }}</div>
</div>
<div class="status-card">
<div class="status-label">自动模式</div>
<div class="status-value-maintenance">
{{ statistics.auto }}/{{ total }}
</div>
</div>
<div class="status-card">
<div class="status-label">故障设备</div>
<div class="status-value-error">{{ statistics.warn }}/{{ total }}</div>
</div>
</div>
<!-- 非蝶阀控制列表 -->
<div class="device-container">
<!-- <div class="device-li">
<div class="device-name">设备名称</div>
<div class="device-name">运行状态</div>
<div class="device-name">手动控制</div>
<div class="device-name">手自动切换</div>
<div class="device-name">本地远程状态</div>
<div class="device-name">故障报警</div>
<div class="device-name">频率调节</div>
<div class="device-name">频率反馈</div>
</div> -->
<list-header :deviceList ="deviceList"></list-header>
<!-- <div class="device-li" v-for="(item, index) in deviceList" :key="index">
<div class="device-name">{{ item.name }}</div>
<div class="device-name">
<div
class="run"
:class="item.runStatus === '运行' ? 'run' : 'no-run'"
>
{{ item.runStatus }}
</div>
</div>
<div class="device-name">
<el-switch
style="display: block"
v-model="item.controlText"
active-color="#13ce66"
inactive-color="#ff4949"
active-text="开启"
inactive-text="停止"
@change="handleControlText(item)"
>
</el-switch>
</div>
<div class="device-name">
<el-switch
style="display: block"
v-model="item.automaticText"
active-color="#13ce66"
inactive-color="#ff4949"
active-text="自动"
inactive-text="手动"
@change="handleAutomaticText(item)"
>
</el-switch>
</div>
<div class="device-name">
<span
:class="
item.localRemote === '远程' ? 'strong-electric' : 'auto-electric'
"
>{{ item.localRemote }}</span
>
</div>
<div class="device-name">
<div :class="item.warnText === '故障' ? 'bad-status' : 'good-status'">
{{ item.warnText }}
</div>
</div>
<div class="device-name">
<el-input
v-if="item.frequencySet !== null && item.frequencySet !== undefined"
v-model="item.frequencySet"
size="mini"
@keyup.enter.native="handleEnter(item)"
@input="handleInput(item)"
></el-input>
<div class="device-name" v-else></div>
</div>
<div class="device-name" v-if="item.frequency">
{{ item.frequency }}Hz
</div>
<div class="device-name" v-else></div>
</div> -->
</div>
<!-- 蝶阀控制列表 -->
<div class="device-container second">
<div class="device-li">
<div class="device-name">设备名称</div>
<div class="device-name">手动控制</div>
<div class="device-name">手自动切换</div>
<div class="device-name">本地远程状态</div>
<div class="device-name">阀关反馈</div>
<div class="device-name">阀开反馈</div>
</div>
<div class="device-li" v-for="(item, index) in valveList" :key="index">
<div class="device-name">{{ item.name }}</div>
<div class="device-name">
<el-switch
style="display: block"
v-model="item.controlText"
active-color="#13ce66"
inactive-color="#ff4949"
active-text="开启"
inactive-text="停止"
@change="handleControlText(item)"
>
</el-switch>
</div>
<div class="device-name">
<el-switch
style="display: block"
v-model="item.automaticText"
active-color="#13ce66"
inactive-color="#ff4949"
active-text="自动"
inactive-text="手动"
@change="handleAutomaticText(item)"
>
</el-switch>
</div>
<div class="device-name">
<span
:class="
item.localRemote === '远程' ? 'strong-electric' : 'auto-electric'
"
>{{ item.localRemote }}</span
>
</div>
<div class="device-name">
<div
:class="item.openStauts === '关闭' ? 'bad-status' : 'good-status'"
>
{{ item.openStauts }}
</div>
</div>
<div class="device-name">
<div
:class="item.closeStatus === '关闭' ? 'bad-status' : 'good-status'"
>
{{ item.closeStatus }}
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { operationList, operationConrol } from "@/api/centerairC/sysMonitor";
import listHeader from "./listHeader.vue";
export default {
components: { listHeader },
name: "sysMonitor",
data() {
return {
loading: false,
deviceList: [], //
hostList: [], //
coolingTowerFanList: [], //
coolingPump: [], //
freezingPump: [], //
valveList: [], //
total: null,
freezingValve: [], //
coolingValve: [], //
coolingTowerOutValve: [], //
};
},
computed: {
statistics() {
const deviceManual = this.deviceList.filter(
(d) => d.automaticText === false
).length;
const deviceAuto = this.deviceList.filter(
(d) => d.automaticText === true
).length;
const valveManual = this.valveList.filter(
(v) => v.automaticText === false
).length;
const valveAuto = this.valveList.filter(
(v) => v.automaticText === true
).length;
return {
running: this.deviceList.filter((d) => d.runStatus === "运行").length,
manual: deviceManual + valveManual,
auto: deviceAuto + valveAuto,
warn: this.deviceList.filter((d) => d.warnText === "故障").length,
};
},
},
mounted() {
this.getOperationList();
},
methods: {
//
getOperationList() {
return new Promise((resolve, reject) => {
operationList({ systemType: 0 })
.then((res) => {
console.log("列表返回res", res);
if (res.code === 200) {
let handleList = res.rows;
this.deviceList = [];
this.valveList = [];
handleList.forEach((element) => {
if (element.children && element.children.length > 0) {
//
let deviceItem = {
name: element.name,
};
//
let valveItem = {
name: element.name,
};
const limitedChildren = element.children;
let valveClosed = false;
let valveOpened = false;
limitedChildren.forEach((child) => {
if (child.name) {
//
if (
child.paramType === "1" &&
!child.name.includes("阀")
) {
deviceItem.runStatus =
Number(child.value) == 0 ? "不运行" : "运行";
}
//
else if (
child.paramType === "2" &&
!child.name.includes("阀")
) {
deviceItem.controlText =
Number(child.value) == 0 ? false : true;
deviceItem.controlId = child.id;
}
// 01
else if (
child.paramType === "6" &&
!child.name.includes("阀")
) {
deviceItem.automaticText =
Number(child.value) == 0 ? true : false;
deviceItem.automaticId = child.id;
}
//
else if (
child.paramType === "5" &&
!child.name.includes("阀")
) {
deviceItem.warnText =
Number(child.value) == 0 ? "未故障" : "故障";
//
} else if (
child.paramType === "22" &&
!child.name.includes("阀")
) {
deviceItem.localRemote =
Number(child.value) == 0 ? "本地" : "远程";
}
//
else if (
child.paramType === "3" &&
!child.name.includes("阀")
) {
deviceItem.frequencySet =
Number(child.value) == 0 ? "0" : child.value;
deviceItem.frequencyId = child.id;
}
//
else if (child.paramType === "4") {
deviceItem.frequency = child.value;
}
// -
else if (
child.paramType === "22" &&
child.name.includes("阀")
) {
valveItem.localRemote =
Number(child.value) == 0 ? "本地" : "远程";
}
// -
else if (
child.paramType === "6" &&
child.name.includes("阀")
) {
valveItem.automaticText =
Number(child.value) == 0 ? true : false;
valveItem.automaticId = child.id;
}
// -
else if (
child.paramType === "2" &&
child.name.includes("阀")
) {
valveItem.controlText =
Number(child.value) == 0 ? false : true;
valveItem.controlId = child.id;
}
//
if (
child.name.includes("阀关到位") &&
Number(child.value) == 0
) {
valveClosed = false;
} else if (
child.name.includes("阀关到位") &&
Number(child.value) == 1
) {
valveClosed = true;
}
//
if (
child.name.includes("阀开到位") &&
Number(child.value) == 0
) {
valveOpened = false;
} else if (
child.name.includes("阀开到位") &&
Number(child.value) == 1
) {
valveOpened = true;
}
}
});
//
if (valveClosed && !valveOpened) {
valveItem.closeStatus = "开启";
valveItem.openStauts = "关闭";
} else if (!valveClosed && valveOpened) {
valveItem.closeStatus = "关闭";
valveItem.openStauts = "开启";
}
// deviceList
if (Object.keys(deviceItem).length > 1) {
this.deviceList.push(deviceItem);
}
// valveList
if (Object.keys(valveItem).length > 1) {
this.valveList.push(valveItem);
}
}
});
console.log("处理过的this.deviceList", this.deviceList);
console.log("处理过的this.valveList", this.valveList);
this.total = this.deviceList.length + this.valveList.length;
//
this.hostList = [];
this.deviceList.forEach((list) => {
if (list.name.includes("机") && !list.name.includes("风")) {
this.hostList.push(list);
}
});
console.log("处理过后的主机列表", this.hostList);
} else {
this.deviceList = [];
this.valveList = [];
this.total = 0;
}
// Promise
resolve(res);
})
.catch((error) => {
// Promise
reject(error);
});
});
},
//
handleInput(item) {
console.log("校验");
//
item.frequencySet = String(item.frequencySet).replace(/[^\d]/g, "");
},
handleEnter(item) {
console.log("请求后端");
this.$confirm(
`确定要修改"${item.name}"的频率为:${item.frequencySet} Hz吗?`,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
this.hadleOperationConrol(item.frequencyId, item.frequencySet);
})
.catch(() => {
//
this.getOperationList();
});
},
//
handleControlText(item) {
this.$confirm(
`确定要切换设备"${item.name}"的状态为:${
item.controlText ? "开启" : "停止 吗?"
}`,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
//
console.log("请求后台", item.controlText);
let param = null;
if (item.controlText) {
param = 1;
} else {
param = 0;
}
this.hadleOperationConrol(item.controlId, param);
})
.catch(() => {
//
item.controlText = !item.controlText;
console.log("不请求后台");
});
},
//
handleAutomaticText(item) {
this.$confirm(
`确定要切换设备"${item.name}"的状态为:${
item.automaticText ? "自动" : "手动 吗?"
}`,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
//
console.log("请求后台", item.automaticText);
let param = null;
if (item.automaticText) {
param = 0;
} else {
param = 1;
}
this.hadleOperationConrol(item.automaticId, param);
})
.catch(() => {
//
item.automaticText = !item.automaticText;
console.log("不请求后台");
});
},
hadleOperationConrol(id, param) {
let data = {
id: id,
param: param,
};
console.log("操作参数", data);
operationConrol([data])
.then((res) => {
if (res.code == 200) {
this.$modal.msgSuccess("操作成功");
// loading
this.loading = true;
// ;
setTimeout(() => {
this.getOperationList().finally(() => {
// loading
this.loading = false;
});
}, 6000);
} else {
// this.$modal.msgError("");
console.log("应该更新状态的");
// ;
this.getOperationList();
}
})
.catch((error) => {
console.log("请求发生错误,更新设备状态", error);
// ;
this.getOperationList();
});
},
},
};
</script>
<style lang="scss" scoped>
/* 设备控制列表样式 */
.device-container {
display: flex;
flex-direction: column;
width: 100%;
background-color: #142c4e;
padding: 10px 10px 30px 10px;
border-radius: 10px;
.device-li {
flex: 1;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
padding: 12px 0;
color: #abcdfc;
border-bottom: 1px dashed #0349ac;
.device-name {
flex: 1;
white-space: nowrap;
.el-switch {
width: 120px !important;
}
.run {
display: flex;
flex-direction: row;
align-items: center;
display: block;
}
.run::before {
content: "";
display: inline-block;
width: 10px;
height: 10px;
background-color: rgb(16, 231, 16);
border-radius: 50%;
margin-right: 5px;
}
.no-run {
display: flex;
flex-direction: row;
align-items: center;
display: block;
}
.no-run::before {
content: "";
display: inline-block;
width: 10px;
height: 10px;
background-color: rgb(180, 180, 180);
border-radius: 50%;
margin-right: 5px;
}
.el-input {
width: 100px;
}
.strong-electric {
background-color: rgba(59, 130, 246, 0.2);
color: #60a5fa;
padding: 5px 20px;
border-radius: 10px;
}
.auto-electric {
background-color: rgba(231, 144, 45, 0.2);
color: #e47f21;
padding: 5px 20px;
border-radius: 10px;
}
.good-status {
color: #4ade80;
}
.bad-status {
color: #f05348;
}
}
}
.device-li:nth-child(1) {
color: #9ca3af;
}
}
.second {
margin-top: 20px;
}
/* 状态统计样式 */
.status-statistics {
margin-bottom: 25px;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.status-card {
background-color: #142c4e;
border-radius: 10px;
padding: 10px;
width: 24%;
}
.status-label {
color: #9ca3af;
margin-bottom: 20px;
}
.status-value-running {
font-size: 24px;
font-weight: bold;
color: #22c55e;
}
.status-value-auto {
font-size: 24px;
font-weight: bold;
color: #60a5fa;
}
.status-value-error {
font-size: 24px;
font-weight: bold;
color: #ef4444;
}
.status-value-maintenance {
font-size: 24px;
font-weight: bold;
color: #f59e0b;
}
</style>

31
src/views/centerairC/sysControl/index.vue

@ -86,6 +86,7 @@
<list-header
:deviceList="hostList"
:isNoShowHz="true"
:isNoShowlocalRemote="true"
@operationControl="hadleOperationConrol"
@upList="getOperationList"
></list-header>
@ -187,7 +188,8 @@ export default {
//
else if (
child.paramType === "2" &&
!child.name.includes("阀")
!child.name.includes("阀") &&
child.name.includes("启停")
) {
deviceItem.controlText =
Number(child.value) == 0 ? false : true;
@ -217,6 +219,15 @@ export default {
deviceItem.localRemote =
Number(child.value) == 0 ? "本地" : "远程";
}
// -
else if (
child.paramType === "40" &&
!child.name.includes("阀")
) {
deviceItem.frequencyAutotext =
Number(child.value) == 0 ? false : true;
deviceItem.frequencyAutotextId = child.id;
}
//
else if (
child.paramType === "3" &&
@ -258,24 +269,24 @@ export default {
}
//
if (
child.name.includes("关到位") &&
child.name.endsWith("关到位") &&
Number(child.value) == 0
) {
valveClosed = false;
} else if (
child.name.includes("关到位") &&
child.name.endsWith("关到位") &&
Number(child.value) == 1
) {
valveClosed = true;
}
//
if (
child.name.includes("开到位") &&
child.name.endsWith("开到位") &&
Number(child.value) == 0
) {
valveOpened = false;
} else if (
child.name.includes("开到位") &&
child.name.endsWith("开到位") &&
Number(child.value) == 1
) {
valveOpened = true;
@ -414,16 +425,6 @@ export default {
</script>
<style lang="scss" scoped>
/* 设备控制列表样式 */
.device-container {
display: flex;
flex-direction: column;
width: 100%;
background-color: #142c4e;
padding: 10px 10px 30px 10px;
border-radius: 10px;
margin-bottom: 20px;
}
/* 状态统计样式 */
.status-statistics {
margin-bottom: 25px;

159
src/views/centerairC/sysControl/listHeader.vue

@ -7,6 +7,7 @@
<div class="device-name">手动控制</div>
<div class="device-name" v-if="!isNoShowlocalRemote">本地远程状态</div>
<div class="device-name">故障报警</div>
<div class="device-name" v-if="!isNoShowHz">频率手自动切换</div>
<div class="device-name" v-if="!isNoShowHz">频率调节</div>
<div class="device-name" v-if="!isNoShowHz">频率反馈</div>
<div class="device-name">运行时间</div>
@ -55,6 +56,20 @@
{{ item.warnText }}
</div>
</div>
<!-- 频率-手自动切换 -->
<div class="device-name" v-if="!isNoShowHz">
<el-switch
style="display: block"
v-model="item.frequencyAutotext"
active-color="#13ce66"
inactive-color="#ff4949"
active-text="手动"
inactive-text="自动"
v-if="item.frequencySet !== null && item.frequencySet !== undefined"
@change="handleFrequencyAutomaticText(item)"
>
</el-switch>
</div>
<!-- 频率调节 -->
<div class="device-name" v-if="!isNoShowHz">
<el-input
@ -64,7 +79,7 @@
@keyup.enter.native="handleEnter(item, $event)"
@input="handleInput(item)"
@blur="handleBlur()"
:disabled="!item.automaticText"
:disabled="!item.frequencyAutotext"
></el-input>
<div class="device-name" v-else></div>
</div>
@ -108,7 +123,7 @@ export default {
// this.currentFocusIndex = "";
},
handleEnter(item, event) {
console.log("请求后端");
console.log("请求后端", item);
//
event.target.blur();
this.$confirm(
@ -121,7 +136,6 @@ export default {
}
)
.then(() => {
// operationControl
this.$emit("operationControl", item.frequencyId, item.frequencySet);
})
.catch(() => {
@ -189,116 +203,37 @@ export default {
console.log("不请求后台");
});
},
// -
handleFrequencyAutomaticText(item) {
this.$confirm(
`确定要切换"${item.name}"的频率手自动状态为:${
item.frequencyAutotext ? "手动" : "自动 吗?"
}`,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
//
console.log("请求后台", item.frequencyAutotext);
let param = null;
if (item.frequencyAutotext) {
param = 1;
} else {
param = 0;
}
this.$emit("operationControl", item.frequencyAutotextId, param);
})
.catch(() => {
//
item.frequencyAutotext = !item.frequencyAutotext;
console.log("不请求后台");
});
},
},
};
</script>
<style lang="scss" scoped>
.device-li {
flex: 1;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
padding: 12px 0;
color: #abcdfc;
border-bottom: 1px dashed #0349ac;
.device-name {
flex: 1;
white-space: nowrap;
font-size: 14px;
.el-switch {
width: 120px !important;
}
.run {
display: flex;
flex-direction: row;
align-items: center;
display: block;
}
.run::before {
content: "";
display: inline-block;
width: 10px;
height: 10px;
background-color: rgb(16, 231, 16);
border-radius: 50%;
margin-right: 5px;
}
.no-run {
display: flex;
flex-direction: row;
align-items: center;
display: block;
}
.no-run::before {
content: "";
display: inline-block;
width: 10px;
height: 10px;
background-color: rgb(180, 180, 180);
border-radius: 50%;
margin-right: 5px;
}
.el-input {
width: 100px;
}
.strong-electric {
background-color: rgba(59, 130, 246, 0.2);
color: #60a5fa;
padding: 5px 20px;
border-radius: 10px;
}
.auto-electric {
background-color: rgba(231, 144, 45, 0.2);
color: #e47f21;
padding: 5px 20px;
border-radius: 10px;
}
.good-status {
color: #4ade80;
}
.bad-status {
color: #f05348;
}
}
}
.device-li:nth-child(1) {
color: #9ca3af;
}
// 2000px
@media (min-width: 2000px) {
.device-li {
padding: 0.12rem 0 !important;
border-bottom: 0.01rem dashed #0349ac !important;
.device-name {
font-size: 0.14rem !important;
.el-switch {
width: 1.2rem !important;
}
.run::before {
width: 0.1rem !important;
height: 0.1rem !important;
margin-right: 0.05rem !important;
}
.no-run::before {
width: 0.1rem !important;
height: 0.1rem !important;
margin-right: 0.05rem !important;
}
.el-input {
width: 1rem !important;
}
.strong-electric {
padding: 0.05rem 0.2rem;
border-radius: 0.1rem !important;
}
.auto-electric {
padding: 0.05rem 0.2rem;
border-radius: 0.1rem !important;
}
}
}
}
</style>

107
src/views/centerairC/sysControl/vavleheader.vue

@ -125,111 +125,4 @@ export default {
</script>
<style lang="scss" scoped>
.device-li {
flex: 1;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
padding: 12px 0;
color: #abcdfc;
border-bottom: 1px dashed #0349ac;
.device-name {
flex: 1;
white-space: nowrap;
font-size: 14px;
.el-switch {
width: 120px !important;
}
.run {
display: flex;
flex-direction: row;
align-items: center;
display: block;
}
.run::before {
content: "";
display: inline-block;
width: 10px;
height: 10px;
background-color: rgb(16, 231, 16);
border-radius: 50%;
margin-right: 5px;
}
.no-run {
display: flex;
flex-direction: row;
align-items: center;
display: block;
}
.no-run::before {
content: "";
display: inline-block;
width: 10px;
height: 10px;
background-color: rgb(180, 180, 180);
border-radius: 50%;
margin-right: 5px;
}
.el-input {
width: 100px;
}
.strong-electric {
background-color: rgba(59, 130, 246, 0.2);
color: #60a5fa;
padding: 5px 20px;
border-radius: 10px;
}
.auto-electric {
background-color: rgba(231, 144, 45, 0.2);
color: #e47f21;
padding: 5px 20px;
border-radius: 10px;
}
.good-status {
color: #4ade80;
}
.bad-status {
color: #f05348;
}
}
}
.device-li:nth-child(1) {
color: #9ca3af;
}
// 2000px
@media (min-width: 2000px) {
.device-li {
padding: 0.12rem 0 !important;
border-bottom: 0.01rem dashed #0349ac !important;
.device-name {
font-size: 0.14rem !important;
.el-switch {
width: 1.2rem !important;
}
.run::before {
width: 0.1rem !important;
height: 0.1rem !important;
margin-right: 0.05rem !important;
}
.no-run::before {
width: 0.1rem !important;
height: 0.1rem !important;
margin-right: 0.05rem !important;
}
.el-input {
width: 1rem !important;
}
.strong-electric {
padding: 0.05rem 0.2rem;
border-radius: 0.1rem !important;
}
.auto-electric {
padding: 0.05rem 0.2rem;
border-radius: 0.1rem !important;
}
}
}
}
</style>

404
src/views/centerairC/sysMonitor/components/hostChart.vue

@ -21,6 +21,7 @@ export default {
chartData2: [],
chartData3: [],
chartData4: [],
chartData5: [],
bottomData: [],
};
},
@ -36,10 +37,10 @@ export default {
let data = newVal;
if (data.length > 0) {
// title titleStr
const title = data.data[0].title;
const titleStr = data.data[1].titleStr;
const title = data[0].title;
const titleStr = data[1].titleStr;
// dataList
const dataList = data.data[3].dataList;
const dataList = data[3].dataList;
// dataList
dataList.forEach((item) => {
@ -51,71 +52,134 @@ export default {
}
});
console.log("处理后的data", data);
let name1 = "";
let name2 = "";
let name3 = "";
let name4 = "";
let name5 = "";
data.forEach((item) => {
if (item.timeStr) {
this.bottomData = item.timeStr;
}
if (item.dataList) {
let name1 = "";
let name2 = "";
let name3 = "";
let name4 = "";
item.dataList.forEach((val, index) => {
// name
const names = [];
// chartData
const chartData = [];
//
let loadDataIndex = -1;
for (let i = 0; i < item.dataList.length; i++) {
if (
item.dataList[i].name &&
item.dataList[i].name.includes("负载")
) {
loadDataIndex = i;
this.chartData5 = item.dataList[i].value;
name5 = item.dataList[i].name;
break;
}
}
//
if (loadDataIndex !== -1) {
item.dataList.splice(loadDataIndex, 1);
}
//
item.dataList.slice(0, 4).forEach((val, index) => {
if (val.name) {
switch (index) {
case 0:
this.chartData1 = val.value;
name1 = val.name;
break;
case 1:
this.chartData2 = val.value;
name2 = val.name;
break;
case 2:
this.chartData3 = val.value;
name3 = val.name;
break;
case 3:
this.chartData4 = val.value;
name4 = val.name;
break;
default:
break;
}
chartData[index] = val.value;
names[index] = val.name;
}
});
// chartData this.chartDataX
this.chartData1 = chartData[0] || "";
this.chartData2 = chartData[1] || "";
this.chartData3 = chartData[2] || "";
this.chartData4 = chartData[3] || "";
// names
name1 = names[0] || "";
name2 = names[1] || "";
name3 = names[2] || "";
name4 = names[3] || "";
}
});
console.log("this.chartData1", this.chartData1);
console.log("this.chartData2", this.chartData2);
console.log("this.chartData3", this.chartData3);
console.log("this.chartData4", this.chartData4);
console.log("this.chartData5", this.chartData5);
this.$nextTick(() => {
// y
var Min1 = 0,
Min2 = 0,
Max1 = Math.ceil(
Math.max(
...this.chartData1,
...this.chartData2,
...this.chartData3,
...this.chartData4
)
),
Max2 = Math.ceil(Math.max(...this.chartData5));
console.log("Min1", Min1);
console.log("Min2", Min2);
console.log("Max1", Max1);
console.log("Max2", Max2);
const adapterOption = {
xAxis: {
data: this.bottomData,
},
yAxis: [
//y
{
min: Min1,
max: Max1,
splitNumber: 10,
interval: (Max1 - Min1) / 10,
},
{
min: Min2,
max: Max2,
splitNumber: 10,
interval: (Max2 - Min2) / 10,
},
],
series: [
{
yAxisIndex: 0,
name:name1,
name: name1,
data: this.chartData1,
},
{
yAxisIndex: 0,
name:name2,
name: name2,
data: this.chartData2,
},
{
yAxisIndex: 0,
name:name3,
name: name3,
data: this.chartData3,
},
{
yAxisIndex: 0,
name:name4,
name: name4,
data: this.chartData4,
},
{
yAxisIndex: 1,
name: name5,
data: this.chartData5,
},
],
};
this.chartInstance.setOption(adapterOption);
//resize
// resize
this.chartInstance.resize();
});
} else {
@ -124,6 +188,21 @@ export default {
xAxis: {
data: [],
},
yAxis: [
//y
{
min: 0,
max: 0,
splitNumber: 10,
interval: 0,
},
{
min: 0,
max: 0,
splitNumber: 10,
interval: 0,
},
],
series: [
{
yAxisIndex: 0,
@ -141,6 +220,10 @@ export default {
yAxisIndex: 0,
data: [],
},
{
yAxisIndex: 0,
data: [],
},
],
};
this.chartInstance.setOption(adapterOption);
@ -175,6 +258,17 @@ export default {
},
//chartInstance
initChart() {
var Min1 = 0,
Min2 = 0,
Max1 = Math.ceil(
Math.max(
...this.chartData1,
...this.chartData2,
...this.chartData3,
...this.chartData4
) + 4
),
Max2 = Math.ceil(Math.max(...this.chartData5) + 4);
const chartRef = this.$refs.chart_ref;
if (chartRef) {
//
@ -182,6 +276,42 @@ export default {
this.option = {
tooltip: {
trigger: "axis",
// tooltip
formatter: function (params) {
var res = params[0].name + "<br/>";
for (var i = 0, l = params.length; i < l; i++) {
var seriesName = params[i].seriesName;
var value = params[i].value;
// console.log("", params[i].color)
var marker =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' +
params[i].color +
'"></span>';
// seriesName
if (seriesName.includes("负载")) {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"%" +
"</span><br>";
} else {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"℃" +
"</span><br>";
}
}
return res;
},
},
legend: {
show: true,
@ -224,176 +354,152 @@ export default {
}, //x线
data: this.bottomData,
},
yAxis: {
min: 0,
// max:20,
// // // min:'dataMin',
// // // max:'dataMax',
// name: "kwh", // y
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
miniInterval: 5,
type: "value",
// y
axisLabel: {
color: "rgba(255, 255, 255, 1)",
},
// y
axisLine: {
show: true,
lineStyle: {
color: "#365576", // y 线
yAxis: [
{
min: Min1,
max: Max1,
splitNumber: 10,
interval: (Max1 - Min1) / 10,
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
miniInterval: 5,
type: "value",
// y
axisLabel: {
color: "rgba(255, 255, 255, 1)",
},
// y
axisLine: {
show: true,
lineStyle: {
color: "#365576", // y 线
},
},
//y线
// splitNumber: 10,
// y线
splitLine: {
lineStyle: {
color: "#1a3d62", // 线
type: "dashed", // 线线
},
},
},
//y线
// splitNumber: 10,
// y线
splitLine: {
lineStyle: {
color: "#1a3d62", // 线
type: "dashed", // 线线
{
min: Min2,
max: Max2,
splitNumber: 10,
interval: (Max2 - Min2) / 10,
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
miniInterval: 5,
type: "value",
name: "负载", // y
// y
axisLabel: {
color: "#ffffff",
},
// y
axisLabel: {
color: "rgba(255, 255, 255, 1)",
},
// y
axisLine: {
show: true,
lineStyle: {
color: "#365576", // y 线
},
},
//y线
// splitNumber: 10,
// y线
splitLine: {
lineStyle: {
color: "#1a3d62", // 线
type: "dashed", // 线线
},
},
},
},
],
series: [
{
type: "line",
//
symbolSize: 8,
data: this.chartData1,
yAxisIndex: 0,
//线
itemStyle: {
color: "#1a69f1", //线
color: "#00CED1", //线
},
lineStyle: {
color: "#1a69f1", //线
color: "#00CED1", //线
},
smooth: false,
// 线
showSymbol: false,
//
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(26, 105, 241, 0.5)", //
},
{
offset: 1,
color: "rgba(26, 105, 241, 0)", //
},
],
global: false, // false
},
},
},
{
type: "line",
//
symbolSize: 8,
data: this.chartData2,
yAxisIndex: 0,
//线
itemStyle: {
color: "#00CED1", //线
color: "#3ba272", //线
},
smooth: false,
// 线
showSymbol: false,
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(0, 206, 209, 0.5)", //
},
{
offset: 1,
color: "rgba(0, 206, 209, 0)", //
},
],
global: false, // false
},
},
},
{
type: "line",
//
symbolSize: 8,
data: this.chartData3,
yAxisIndex: 0,
//线
itemStyle: {
color: "#00CED1", //线
color: "#1a69f1", //线
},
smooth: false,
// 线
showSymbol: false,
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(0, 206, 209, 0.5)", //
},
{
offset: 1,
color: "rgba(0, 206, 209, 0)", //
},
],
global: false, // false
},
},
},
{
type: "line",
//
symbolSize: 8,
data: this.chartData4,
yAxisIndex: 0,
//线
itemStyle: {
color: "#00CED1", //线
color: "#ee6666", //线
},
smooth: false,
// 线
showSymbol: false,
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(0, 206, 209, 0.5)", //
},
{
offset: 1,
color: "rgba(0, 206, 209, 0)", //
},
],
global: false, // false
},
},
{
type: "line",
//
symbolSize: 8,
data: this.chartData5,
yAxisIndex: 1,
//线
itemStyle: {
color: "#fac858", //线
},
smooth: false,
// 线
showSymbol: false,
},
],
};
@ -410,6 +516,6 @@ export default {
<style lang="scss" scoped>
.historyCharts {
width: 100%;
height: 4rem;
height: 4.4rem;
}
</style>

643
src/views/centerairC/sysMonitor/hostDetails.vue

@ -62,14 +62,14 @@
<div class="host-name">{{ deviceName }}</div>
<!-- 冷凝器蒸发器压力-->
<div class="outIn">
<div class="outIn-li in1">
<!-- <div class="outIn-li in1">
<svg-icon slot="prefix" icon-class="arrow" class="arrow" />
<div class="kpa">冷凝器压力:{{ condenserPre }}kpa</div>
</div>
<div class="outIn-li out1">
<svg-icon slot="prefix" icon-class="arrow" class="arrow" />
<div class="kpa">蒸发器压力:{{ evaporatorPre }}kpa</div>
</div>
</div> -->
<!-- <div class="outIn-li in2">
<svg-icon slot="prefix" icon-class="arrow" class="arrow" />
<div class="kpa">566.6kpa</div>
@ -112,6 +112,41 @@
></span>
</div>
</div>
<div class="hostStatus">
<div class="hostStatus-li">
<span>远程开关机:</span>
<span class="automaticData">{{ onOffObj.curValue }}</span>
</div>
<div class="hostStatus-li">
<span>运行累计时间:</span>
<span class="timeData">{{ timeObj.curValue }}小时</span>
</div>
<div class="hostStatus-li">
<span>本地出水温度设定值:</span>
<span class="dotData">{{ coldWaterSetObj.curValue }}</span>
</div>
<div class="hostStatus-li">
<span>远程出水温度设定值:</span>
<span class="goodData">{{ coldWaterControlObj.curValue }}</span>
<!-- <span class="badData" v-else>{{ coldWaterControlObj.curValue }}</span> -->
</div>
<div class="hostStatus-li">
<span>冷水设定值偏移:</span>
<!-- <span class="goodData">{{ offsetValuerControlObj.curValue }}</span> -->
<span class="goodData">
<el-input
v-model="offsetValuerControlObj.curValue"
size="mini"
@keyup.enter.native="
handleEnter(offsetValuerControlObj, $event)
"
@input="handleInput(offsetValuerControlObj.curValue)"
@blur="handleBlur()"
> <template #suffix></template></el-input
></span
>
</div>
</div>
<!-- 负载 -->
<LoadData class="loadData" :hostData="hostData"></LoadData>
</div>
@ -121,27 +156,6 @@
</div>
</div>
<div class="detail-bottom">
<div class="hostStatus">
<div class="hostStatus-li">
<span>手自动切换:</span>
<span class="automaticData">{{ automaticObj.showValue }}</span>
</div>
<div class="hostStatus-li">
<span>本地远程状态:</span>
<span class="dotData">{{ localObj.showValue }}</span>
</div>
<div class="hostStatus-li">
<span>故障状态:</span>
<span class="goodData" v-if="badObj.showValue === '未故障'">{{
badObj.showValue
}}</span>
<span class="badData" v-else>{{ badObj.showValue }}</span>
</div>
<div class="hostStatus-li">
<span>运行累计时间:</span>
<span class="timeData">{{ timeObj.showValue }}小时</span>
</div>
</div>
<div class="detail-data hostparams">
<div class="detail-data-top">
<title-img></title-img>
@ -157,46 +171,112 @@
<div class="rightDot">
<div class="leftDot">
<span>{{ item.otherName }}:</span>
<span class="dotData">{{ item.curValue }}</span>
<span
:class="{
dotData: !isSpecialValue(item.curValue),
goodData: isSpecialValue(item.curValue),
badData: item.curValue === '故障',
}"
>{{ item.curValue }}</span
>
<span>{{ item.unit }}</span>
</div>
</div>
</div>
</div>
<line-square
class="line1"
:horizontalLength="700"
:verticalLength="300"
:overlap="15"
></line-square>
</div>
<div class="detail-data compressor">
<div class="detail-data-top">
<title-img></title-img>
<div class="details-title">压缩机参数</div>
<div class="choice">
<div>{{ compressorData1.mtTypeName }}</div>
</div>
<title-img></title-img>
</div>
<div class="detail-data-bottom">
<div
class="detail-data-li"
v-for="(item, index) in compressorData"
:key="index + 1"
v-for="(subItem, subIndex) in compressorData1.list"
:key="subIndex"
>
<div class="rightDot">
<div class="leftDot">
<span>{{ item.otherName }}:</span>
<span class="dotData">{{ item.curValue }}</span>
<span>{{ item.unit }}</span>
<span>{{ subItem.otherName }}:</span>
<span
:class="{
dotData: !isSpecialValue(subItem.curValue),
goodData: isSpecialValue(subItem.curValue),
badData: subItem.curValue === '故障',
}"
>{{ subItem.curValue }}</span
>
<span>{{ subItem.unit }}</span>
</div>
</div>
</div>
</div>
</div>
<div class="detail-data compressor">
<div class="detail-data-top">
<title-img></title-img>
<div class="choice">
<div>{{ compressorData2.mtTypeName }}</div>
</div>
<title-img></title-img>
</div>
<div class="detail-data-bottom">
<div
class="detail-data-li"
v-for="(subItem, subIndex) in compressorData2.list"
:key="subIndex"
>
<div class="rightDot">
<div class="leftDot">
<span>{{ subItem.otherName }}:</span>
<span
:class="{
dotData: !isSpecialValue(subItem.curValue),
goodData: isSpecialValue(subItem.curValue),
badData: subItem.curValue === '故障',
}"
>{{ subItem.curValue }}</span
>
<span>{{ subItem.unit }}</span>
</div>
</div>
</div>
</div>
</div>
<div class="detail-data compressor">
<div class="detail-data-top">
<title-img></title-img>
<div class="choice">
<div>{{ compressorData3.mtTypeName }}</div>
</div>
<title-img></title-img>
</div>
<div class="detail-data-bottom">
<div
class="detail-data-li"
v-for="(subItem, subIndex) in compressorData3.list"
:key="subIndex"
>
<div class="rightDot">
<div class="leftDot">
<span>{{ subItem.otherName }}:</span>
<span
:class="{
dotData: !isSpecialValue(subItem.curValue),
goodData: isSpecialValue(subItem.curValue),
badData: subItem.curValue === '故障',
}"
>{{ subItem.curValue }}</span
>
<span>{{ subItem.unit }}</span>
</div>
</div>
</div>
</div>
<line-square
class="line1"
:horizontalLength="700"
:verticalLength="300"
:overlap="15"
></line-square>
</div>
</div>
</div>
@ -208,6 +288,7 @@ import {
hostDetailsData,
hostTemData,
runTime,
operationConrol,
} from "@/api/centerairC/sysMonitor";
import { alarmRecordList } from "@/api/alarm/alarmRecord";
import { cpmList } from "@/api/device/gather";
@ -216,6 +297,7 @@ import hostChart from "./components/hostChart.vue";
import titleImg from "./components/titleImg.vue";
import lineSquare from "./components/lineSquare.vue";
import { format } from "@/utils/datetime";
import { getDay } from "@/utils/datetime";
export default {
name: "sysControl",
components: { LoadData, hostChart, titleImg, lineSquare },
@ -230,15 +312,19 @@ export default {
condenserPre: "", //
evaporatorPre: "", //
rightHostData: [], //
automaticObj: {}, //
localObj: {}, //
badObj: {}, //
onOffObj: {}, //
timeObj: {}, //
compressorData: [], //
coldWaterSetObj: {}, //
coldWaterControlObj: {}, //
offsetValuerControlObj: {}, //
compressorData1: [], //1
compressorData2: [],
compressorData3: [],
temArray: [], //
isMagnetic: false,
isShowWarning: false, //
dayData: "", //
sharedIndex: 0,
};
},
computed: {
@ -369,52 +455,122 @@ export default {
//
this.leftHostData = [];
this.rightHostData = [];
// paramType
// this.rightHostData = this.hostData.filter((item) => {
// return !["2", "21", "20", "6", "5", "22", "26"].includes(
// Number(item.paramType)
// );
// });
this.rightHostData = this.hostData.filter((item) => {
const specificParamTypes = [26];
// paramType
const isSpecificParamType = specificParamTypes.includes(
Number(item.paramType)
);
const isCombinedCondition0 =
Number(item.paramType) === 2 &&
item.otherName.includes("手动启停");
// item.paramType 12 otherName ""
const isCombinedCondition1 =
Number(item.paramType) === 12 &&
item.otherName.includes("冷水控制设定值");
const isCombinedCondition2 =
Number(item.paramType) === 12 &&
item.otherName.includes("用户冷水设定值");
const isCombinedCondition3 =
Number(item.paramType) === 12 &&
item.otherName.includes("冷水设定值偏移");
// false
return (
!isSpecificParamType &&
!isCombinedCondition0 &&
!isCombinedCondition1 &&
!isCombinedCondition2 &&
!isCombinedCondition3
);
});
// ordernum
this.rightHostData.sort((a, b) => {
return Number(a.orderNum) - Number(b.orderNum);
});
this.hostData.forEach((item) => {
// 12
if (item.paramType === "12") {
this.rightHostData.push(item);
}
// paramType showValue
if (item.paramType === "6") {
//
item.showValue =
Number(item.curValue) === 0 ? "自动" : "手动";
this.automaticObj = item;
} else if (item.paramType === "5") {
//
item.showValue =
Number(item.curValue) === 0 ? "未故障" : "故障";
this.badObj = item;
} else if (item.paramType === "22") {
//
item.showValue =
Number(item.curValue) === 0 ? "本地" : "远程";
this.localObj = item;
if (
item.paramType === "2" &&
item.otherName.includes("手动启停")
) {
// -
// item.showValue =
// Number(item.curValue) === 0 ? "" : "";
this.onOffObj = item;
} else if (item.paramType === "26") {
//
item.showValue = item.curValue;
this.timeObj = item;
}
});
}
if (item.mtType === "9") {
//
this.compressorData = item.list;
this.compressorData.forEach((item) => {
if (
item.paramType === "13" &&
item.otherName.includes("冷凝器")
} else if (
item.paramType === "12" &&
item.otherName.includes("冷水控制设定值")
) {
//
this.coldWaterSetObj = item;
} else if (
item.paramType === "12" &&
item.otherName.includes("用户冷水设定值")
) {
this.condenserPre = item.curValue;
//
this.coldWaterControlObj = item;
} else if (
item.paramType === "13" &&
item.otherName.includes("蒸发器")
item.paramType === "12" &&
item.otherName.includes("冷水设定值偏移")
) {
this.evaporatorPre = item.curValue;
//
this.offsetValuerControlObj = item;
}
});
}
});
// 使 filter item '0'
let compressorData = data.filter((obj) => obj.mtType !== "0");
console.log("压缩机数组", this.compressorData);
compressorData.forEach((item) => {
if (item.mtType === "9") {
// 1
this.compressorData1 = item;
// ordernum
if (
this.compressorData1.list &&
Array.isArray(this.compressorData1.list)
) {
this.compressorData1.list.sort((a, b) => {
return Number(a.orderNum) - Number(b.orderNum);
});
}
}
if (item.mtType === "10") {
// 2
this.compressorData2 = item;
// this.compressorData2 list
if (
this.compressorData2.list &&
Array.isArray(this.compressorData2.list)
) {
this.compressorData2.list.sort((a, b) => {
return Number(a.orderNum) - Number(b.orderNum);
});
}
}
if (item.mtType === "11") {
// 3
this.compressorData3 = item;
if (
this.compressorData3.list &&
Array.isArray(this.compressorData3.list)
) {
this.compressorData3.list.sort((a, b) => {
return Number(a.orderNum) - Number(b.orderNum);
});
}
}
});
}
});
},
@ -433,10 +589,11 @@ export default {
let newDataArray = []; //
data.forEach((item) => {
if (
item.otherName.includes("冷冻出水温度") ||
item.otherName.includes("冷冻进水温度") ||
item.otherName.includes("冷却出水温度") ||
item.otherName.includes("冷却进水温度")
item.otherName.includes("冷冻回水温度") ||
item.otherName.includes("冷冻供水温度") ||
item.otherName.includes("冷却回水温度") ||
item.otherName.includes("冷却供水温度") ||
item.otherName.includes("负载")
) {
let dataItem = {
name: item.otherName,
@ -474,8 +631,45 @@ export default {
hostListClass(paramType) {
for (let i = 0; i < this.hostData.length; i++) {
const item = this.hostData[i];
if (item.paramType === paramType && Number(item.curValue) !== 0) {
return true;
if (
item.paramType === paramType &&
typeof item.curValue === "string" &&
/[\u4e00-\u9fa5]/.test(item.curValue)
) {
switch (item.paramType) {
case "1": //
if (item.curValue === "运行") {
return true;
}
break;
case "2": //
if (item.curValue === "启动" && item.otherName.includes("启停")) {
return true;
}
break;
case "5": //
if (item.curValue === "正常") {
return true;
}
break;
case "6": //
if (item.curValue === "自动") {
return true;
}
break;
case "22": //
if (item.curValue === "远程") {
return true;
}
break;
default:
return false;
break;
}
} else {
if (item.paramType === paramType && Number(item.curValue) !== 0) {
return true;
}
}
}
//
@ -501,6 +695,83 @@ export default {
this.exitFullscreen();
this.$router.push("/alarm/alarmRecord");
},
// curValue
isSpecialValue(value) {
const specialValues = ["运行", "启动", "正常"];
return specialValues.includes(value);
},
//
handleInput(item) {
console.log("校验");
//
let input = String(item).replace(/[^\d.]/g, "");
//
if (input.startsWith(".")) {
//
input = input.slice(1);
}
this.offsetValuerControlObj.curValue = input;
},
//
handleBlur() {
// this.currentFocusIndex = "";
},
handleEnter(item, event) {
console.log("请求后端", item);
if (!item) {
this.$modal.msgError("请输入偏移值");
return;
}
//
event.target.blur();
this.$confirm(
`确定要修改冷水设定值偏移10V的温度为:${item.curValue} ℃吗?`,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
this.hadleOperationConrol(item.id, item.curValue);
})
.catch(() => {
//
// this.$emit("upList");
});
},
//
hadleOperationConrol(id, param) {
let data = {
id: id,
param: param,
};
console.log("操作参数", data);
operationConrol([data])
.then((res) => {
if (res.code == 200) {
this.$modal.msgSuccess("指令下发成功!");
// loading
this.loading = true;
// ;
setTimeout(() => {
this.getHostDetailsData();
this.loading = false;
}, 5000);
} else {
// this.$modal.msgError("");
console.log("应该更新状态的");
// ;
this.getHostDetailsData();
}
})
.catch((error) => {
console.log("请求发生错误,更新设备状态", error);
// ;
this.getHostDetailsData();
});
},
},
};
</script>
@ -509,7 +780,6 @@ export default {
.monitor {
width: 100%;
min-height: 100vh;
height: auto;
background-color: black;
color: #fff;
.monitor-top {
@ -621,13 +891,12 @@ export default {
align-items: center;
justify-content: space-between;
.detail-top-left {
width: 7rem;
height: 4.4rem;
// background-color: aquamarine;
position: relative;
.host-img1 {
width: 4.88rem;
height: 3.97rem;
width: 4.48rem;
height: 3.57rem;
margin: 0.2rem 0 0 0.2rem;
}
.outIn {
@ -699,18 +968,44 @@ export default {
.startClass {
z-index: 10;
position: absolute;
top: 2.9rem;
left: 3.4rem;
top: 2.2rem;
left: 2.7rem;
width: 0.18rem;
height: 0.18rem;
border-radius: 50%;
animation: blink 1s infinite;
background-color: #38fc52 !important;
}
.hostStatus {
z-index: 10;
position: absolute;
top: 0.6rem;
left: 4.9rem;
display: flex;
flex-direction: column;
justify-content: flex-start;
width: 2.8rem !important;
margin-top: 1.5rem;
.hostStatus-li {
background-color: #25455a;
color: #c0dffc;
font-size: 0.16rem;
margin-bottom: 0.1rem;
padding: 0.1rem;
letter-spacing: 0.02rem;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: flex-start;
span {
white-space: nowrap;
}
}
}
.water-flow3 {
z-index: 10;
position: absolute;
top: 3.6rem;
top: 3.5rem;
left: 1.2rem;
.water-flow-li {
margin-bottom: 0.04rem;
@ -753,8 +1048,8 @@ export default {
.fanBlade {
z-index: 10;
position: absolute;
top: 2.55rem;
left: 4.65rem;
top: 2.5rem;
left: 4.1rem;
width: 0.5rem;
height: 0.5rem;
transform-style: preserve-3d;
@ -764,7 +1059,7 @@ export default {
.leftFan {
z-index: 10;
position: absolute;
top: 2.55rem;
top: 2.29rem;
left: 0.53rem;
width: 0.5rem;
height: 0.5rem;
@ -777,46 +1072,32 @@ export default {
.host-name {
z-index: 10;
position: absolute;
top: 1.55rem;
left: 1.8rem;
color: #3520f8;
top: 1.6rem;
left: 1.44rem;
color: #2925f8;
font-weight: bold;
font-size: 0.18rem;
}
.loadData {
z-index: 10;
position: absolute;
top: 0.2rem;
right: 0rem;
top: 0rem;
left: 5rem;
}
}
.detail-top-right {
width: calc(100% - 7.25rem);
width: calc(100% - 7.6rem);
height: 4.4rem;
// background-color: rgb(127, 172, 255);
}
}
.detail-bottom {
height: 2.6rem;
// height: 5rem;
margin-top: 0.3rem;
margin-left: 0.25rem;
display: flex;
flex-direction: row;
justify-content: space-between;
.hostStatus {
display: flex;
flex-direction: column;
justify-content: flex-end;
width: 3rem;
.hostStatus-li {
background-color: #25455a;
color: #c0dffc;
font-size: 0.18rem;
margin-bottom: 0.1rem;
padding: 0.1rem;
letter-spacing: 0.02rem;
}
}
.detail-data {
display: flex;
flex-direction: column;
@ -839,18 +1120,19 @@ export default {
}
.detail-data-bottom {
width: 100%;
padding: 0.1rem 0.3rem;
// padding: 0.1rem 0.3rem;
z-index: 0;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: flex-start;
align-items: stretch;
justify-content: flex-start;
.detail-data-li {
// width: 100%;
margin-right: 0.1rem;
margin-bottom: 0.15rem !important;
position: relative;
color: #89acc4;
color: #c0dffc;
font-family: Arial, sans-serif;
letter-spacing: 0.02rem;
font-size: 0.18rem;
@ -912,6 +1194,10 @@ export default {
width: 100%;
height: 100%;
padding: 0.04rem 0.1rem;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.rightDot::before {
@ -987,55 +1273,104 @@ export default {
}
.line1 {
position: absolute;
top: 0.53rem;
top: 0rem;
}
}
.hostparams {
width: 7.6rem;
width: 7rem;
.detail-data-bottom {
padding-left: 0.75rem;
// padding-left: 0.5rem;
.detail-data-li {
width: 3rem;
// width: 3.2rem;
width: calc(50% - 0.2rem) !important;
margin: 0 0.1rem;
}
}
}
.compressor {
width: 7.6rem;
width: 3.5rem;
.detail-data-bottom {
padding-left: 0.75rem;
// padding-left: 0.75rem;
.detail-data-li {
width: 3rem;
// width: 3.4rem;
width: calc(100%) !important;
margin: 0 0.1rem;
}
}
}
.dotData {
font-weight: bold;
margin: 0 0.06rem;
color: #3b80ff;
display: flex;
align-items: center;
}
.goodData {
font-weight: bold;
margin: 0 0.06rem;
color: #3df574;
}
.badData {
font-weight: bold;
margin: 0 0.06rem;
color: #cf3607;
}
.automaticData {
font-weight: bold;
margin: 0 0.06rem;
color: #da7b10;
}
.timeData {
font-weight: bold;
margin: 0 0.06rem;
color: #1df3e8;
}
}
}
}
.choice {
margin-left: 0 !important;
}
.choice .mr20 {
width: 1rem !important;
color: #c0dffc;
font-weight: bold !important;
font-size: 0.18rem !important;
text-align: center !important;
background-color: transparent !important;
box-shadow: none !important;
}
.timeStyle {
color: #ffffff !important;
}
.dotData {
font-weight: bold;
margin: 0 0.06rem;
color: #3b80ff;
display: flex;
align-items: center;
}
.goodData {
font-weight: bold;
margin: 0 0.06rem;
color: #3df574;
}
.badData {
font-weight: bold;
margin: 0 0.06rem;
color: #cf3607;
}
.automaticData {
font-weight: bold;
margin: 0 0.06rem;
color: #da7b10;
}
.timeData {
font-weight: bold;
margin: 0 0.06rem;
color: #1df3e8;
}
</style>
<style scoped>
.goodData >>> .el-input--mini {
font-size: 0.16rem !important;
display: flex;
flex-direction: row;
align-items: center;
}
.goodData >>> .el-input {
width: 0.5rem !important;
}
.goodData >>> .el-input--mini .el-input__inner {
height: 0.28rem !important;
line-height: 20.28rem !important;
padding: 0 !important;
}
.goodData >>> .el-input__inner {
background: transparent !important;
border: 1px solid transparent !important;
color: #3df574 !important;
font-weight: bold;
box-shadow: none !important;
}
.goodData >>> .el-input__suffix {
color: #3df574 !important;
font-weight: bold;
right: -0.02rem !important;
height: 100% !important;
top: -0.01rem !important;
}
</style>

2306
src/views/centerairC/sysMonitor/monitorCenter.vue

File diff suppressed because it is too large Load Diff

147
src/views/centerairC/sysMonitor/performance.vue

@ -714,153 +714,6 @@ export default {
flex-wrap: wrap;
align-items: flex-start;
justify-content: center;
.detail-data-li {
width: 80%;
margin-right: 0.1rem;
position: relative;
color: #89acc4;
font-family: Arial, sans-serif;
letter-spacing: 0.02rem;
font-size: 0.18rem;
position: relative;
margin-bottom: 0.08rem;
border-left: 0.01rem solid #217df5;
border-right: 0.01rem solid #217df5;
background-image: radial-gradient(
circle at left top,
#217df5 0.01rem,
transparent 0.01rem
),
radial-gradient(
circle at right top,
#217df5 0.01rem,
transparent 0.01rem
),
radial-gradient(
circle at left bottom,
#217df5 0.01rem,
transparent 0.01rem
),
radial-gradient(
circle at right bottom,
#217df5 0.01rem,
transparent 0.01rem
);
background-repeat: no-repeat;
background-position: left top, right top, left bottom, right bottom;
}
.detail-data-li::before,
.detail-data-li::after {
content: "";
position: absolute;
left: 0;
right: 0;
height: 0.01rem;
background-image: linear-gradient(
to right,
#217df5 0%,
rgba(41, 128, 185, 0) 50%,
#217df5 100%
) !important;
}
.year-data {
margin-top: 0.1rem;
}
.rightDot {
position: relative;
width: 100%;
height: 100%;
z-index: 999;
}
.leftDot {
position: relative;
width: 100%;
height: 100%;
padding: 0.04rem 0.1rem;
display: flex;
flex-direction: row;
justify-content: space-between;
.dotData {
font-weight: bold;
margin: 0 0.06rem;
color: #3b80ff;
display: flex;
align-items: center;
}
.dotUnit{
width: 0.55rem;
text-align: left;
display: flex;
align-items: center;
}
}
.rightDot::before {
content: "";
position: absolute;
top: -0.03rem;
right: -0.03rem;
width: 0.06rem;
height: 0.06rem;
background-color: #217df5;
box-shadow: 0 0 0.1rem 0.02rem rgba(33, 125, 245, 0.9);
background-image: radial-gradient(
circle at 30% 30%,
rgba(255, 255, 255, 0.8) 0%,
rgba(255, 255, 255, 0) 70%
);
border-radius: 50%;
}
.rightDot::after {
content: "";
position: absolute;
bottom: -0.03rem;
right: -0.03rem;
width: 0.06rem;
height: 0.06rem;
background-color: #217df5;
box-shadow: 0 0 0.1rem 0.02rem rgba(33, 125, 245, 0.9);
background-image: radial-gradient(
circle at 30% 30%,
rgba(255, 255, 255, 0.8) 0%,
rgba(255, 255, 255, 0) 70%
);
border-radius: 50%;
}
.leftDot::before {
content: "";
position: absolute;
top: -0.03rem;
left: -0.03rem;
width: 0.06rem;
height: 0.06rem;
background-color: #217df5;
border-radius: 50%;
box-shadow: 0 0 0.1rem 0.02rem rgba(33, 125, 245, 0.9);
background-image: radial-gradient(
circle at 30% 30%,
rgba(255, 255, 255, 0.8) 0%,
rgba(255, 255, 255, 0) 70%
);
}
.leftDot::after {
content: "";
position: absolute;
bottom: -0.03rem;
left: -0.03rem;
width: 0.06rem;
height: 0.06rem;
background-color: #217df5;
box-shadow: 0 0 0.1rem 0.02rem rgba(33, 125, 245, 0.9);
background-image: radial-gradient(
circle at 30% 30%,
rgba(255, 255, 255, 0.8) 0%,
rgba(255, 255, 255, 0) 70%
);
border-radius: 50%;
}
}
.line1 {
position: absolute;

430
src/views/centerairC/temHistoryQuery/index.vue

@ -0,0 +1,430 @@
<template>
<div class="app-container">
<div class="btn-condition">
<div class="condition-left" v-show="showSearch">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
>
<el-form-item label="日期" prop="msgCode">
<el-date-picker
style="width: auto"
v-model="monthValue"
type="month"
placeholder="选择月"
value-format="yyyy-MM"
>
</el-date-picker>
</el-form-item>
</el-form>
<div class="primary-btn">
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
</div>
<div class="warning-btn">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
</div>
<div class="cancel-btn">
<el-button
type="cancel"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
</div>
</div>
</div>
<div class="charts" ref="chart_ref"></div>
<el-table
v-loading="loading"
:data="postList"
stripe
:cell-style="tableRowStyle"
>
<el-table-column label="日期" align="center" prop="dateAndWeek" />
<el-table-column label="最高气温" align="center" prop="maxTemp" />
<el-table-column label="最低气温" align="center" prop="minTemp" />
<el-table-column label="天气" align="center" prop="weatherConditions" />
<el-table-column label="风向" align="center" prop="windDirection" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { weatherTempData } from "@/api/centerairC/temHistory";
import * as echarts from "echarts";
export default {
name: "temHistoryQuery",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
postList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
startTime: "",
endTime: "",
},
monthValue: "",
chartInstance: null,
option: {},
};
},
created() {
//
const currentDate = new Date();
//
const year = currentDate.getFullYear();
// 0 1
const month = String(currentDate.getMonth() + 1).padStart(2, "0");
// yyyy-MM
this.monthValue = `${year}-${month}`;
},
mounted() {
this.getList();
this.initChart();
window.addEventListener("resize", this.screenAdapter);
this.screenAdapter();
this.getChartData();
},
methods: {
tableRowStyle({ row, column, rowIndex, columnIndex }) {
//
if (columnIndex === 1) {
return "color: #fd1e00;!important;text-align:center";
}
if (columnIndex === 2) {
return "color: #3390ff;!important;text-align:center";
}
if (columnIndex === 4) {
return "color: #75d148;!important;text-align:center";
}
// return "text-align:center";
},
/** 查询报警编码列表 */
getList() {
this.loading = true;
this.queryParams.startTime = this.queryParams.endTime = this.monthValue;
console.log("参数", this.queryParams);
weatherTempData(this.queryParams).then((response) => {
this.postList = response.rows;
this.total = response.total;
this.loading = false;
});
},
getChartData() {
this.loading = true;
this.queryParams.pageNum = 0;
this.queryParams.startTime = this.queryParams.endTime = this.monthValue;
console.log("图表参数", this.queryParams);
weatherTempData(this.queryParams).then((response) => {
console.log("处理值然后渲染");
if (response.rows.length > 0) {
let data = response.rows;
let timeValue = [];
let hightValue = [];
let lowValue = [];
data.forEach((element) => {
timeValue.push(element.weatherDate);
hightValue.push(element.maxTemp);
lowValue.push(element.minTemp);
});
let adapterOption = {};
adapterOption = {
xAxis: {
data: timeValue,
},
yAxis: {
name: "℃",
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
},
series: [
{
data: hightValue,
//线
itemStyle: {
color: "rgb(18, 126, 226)", //线
},
lineStyle: {
color: "rgb(18, 126, 226)", //线
},
},
{
data: lowValue,
//线
itemStyle: {
color: "rgb(250, 169, 19)", //线
},
lineStyle: {
color: "rgb(250, 169, 19)", //线
},
},
],
};
//.chartInstanceoptiondataoption
this.chartInstance.setOption(adapterOption);
//resize
this.chartInstance.resize();
} else {
let adapterOption = {};
adapterOption = {
xAxis: {
data: [],
},
series: [
{
data: [],
},
{
data: [],
},
],
};
//.chartInstanceoptiondataoption
this.chartInstance.setOption(adapterOption);
//resize
this.chartInstance.resize();
}
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.getChartData();
},
/** 重置按钮操作 */
resetQuery() {
this.handleQuery();
},
/** 导出按钮操作 */
handleExport() {
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 32;
this.queryParams.startTime = this.queryParams.endTime = this.monthValue;
console.log("参数", this.queryParams);
weatherTempData(this.queryParams).then((response) => {
if (response.code == 200) {
import("@/assets/excel/Export2Excel").then((excel) => {
var tHeader = ["日期", "最高气温", "最低气温", "天气", "风向"]; // excel
var filterVal = [
"dateAndWeek",
"maxTemp",
"minTemp",
"weatherConditions",
"windDirection",
];
const data = this.formatJson(filterVal, response.rows);
const autoWidth = true;
excel.export_json_to_excel({
header: tHeader, //
data, //
filename: "历史天气报表", //
autoWidth: true, //
});
this.$message({
type: "success",
message: "导出成功!",
});
});
} else {
this.$message.error("导出失败!");
}
});
},
//,
formatJson(filterVal, jsonData) {
return jsonData.map((v) =>
filterVal.map((j) => {
if (j === "installDate") {
return format(v[j]);
} else {
return v[j];
}
})
);
},
// 线+ + 线
screenAdapter() {
//,2.6 mes_ref
const titleFontSize = this.$refs.chart_ref.offsetWidth / 130;
//optionoption
const adapterOption = {};
//.chartInstanceoptiondataoption
this.chartInstance.setOption(adapterOption);
//resize
this.chartInstance.resize();
},
//chartInstance
initChart() {
this.chartInstance = echarts.init(this.$refs.chart_ref);
const titleFontSize = this.$refs.chart_ref.offsetWidth / 100;
this.option = {
tooltip: {
// axis x
trigger: "axis",
textStyle: {
//
fontSize: titleFontSize,
},
},
legend: {
show: false,
// textStyle: {
// //
// fontSize: 14
// }
},
grid: {
top: "10%",
left: "4%",
right: "6%",
bottom: "3%",
containLabel: true,
},
xAxis: {
type: "category",
//true
boundaryGap: true,
// x
axisLabel: {
// interval: 0, //x
// rotate: 30, //x30
color: "rgba(255, 255, 255, 1)",
fontSize: titleFontSize, //x
},
axisTick: {
show: false, // 线
},
// x
axisLine: {
show: true,
lineStyle: {
color: "#365576",
},
},
splitLine: {
lineStyle: {
color: "#e2e6f0",
},
}, //x线
},
yAxis: {
min: 0,
// max:20,
// name: "kwh", // y
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12, //y
},
miniInterval: 5,
type: "value",
// y
axisLabel: {
color: "rgba(255, 255, 255, 1)",
fontSize: titleFontSize, //x
},
// y
axisLine: {
show: true,
lineStyle: {
color: "#365576", // y 线
},
},
//y线
// splitNumber: 10,
// y线
splitLine: {
lineStyle: {
color: "#1a3d62", // 线
type: "dashed", // 线线
},
},
},
series: [
{
type: "line",
//
symbolSize: titleFontSize * 0.5,
lineStyle: {
// 线
width: titleFontSize * 0.1,
},
symbol: "circle",
name: "最高气温",
},
{
type: "line",
//
symbolSize: titleFontSize * 0.5,
lineStyle: {
// 线
width: titleFontSize * 0.1,
},
symbol: "circle",
name: "最低气温",
},
],
};
//
this.chartInstance.setOption(this.option, true);
},
},
};
</script>
<style lang="scss" scoped>
.charts {
width: 100%;
height: 300px;
margin-bottom: 0.1rem;
}
// 2000px
@media (min-width: 2000px) {
.charts {
height: 3rem !important;
}
}
</style>

19
src/views/centerairC/timeSwitch/index.vue

@ -102,28 +102,28 @@ export default {
// console.log("child.pointName", child.pointName);
if (child.pointName) {
// -
if (child.pointName == `定时${index + 1}开_时`) {
if (child.pointName.includes(`开_分`)) {
// console.log("-·························");
delayItem.delayOpenHour = child.curValue;
delayItem.delayOpenHourId = child.cpmId;
}
// -
else if (
child.pointName.includes(`定时${index + 1}开_分`)
child.pointName.includes(`开_分`)
) {
delayItem.delayOpenMinute = child.curValue;
delayItem.delayOpenMinuteId = child.cpmId;
}
// -
else if (
child.pointName.includes(`定时${index + 1}关_时`)
child.pointName.includes(`关_时`)
) {
delayItem.delayCloseHour = child.curValue;
delayItem.delayCloseHourId = child.cpmId;
}
// -
else if (
child.pointName.includes(`定时${index + 1}关_分`)
child.pointName.includes(`关_分`)
) {
delayItem.delayCloseMinute = child.curValue;
delayItem.delayCloseMinuteId = child.cpmId;
@ -419,13 +419,7 @@ export default {
border-radius: 10px;
font-size: 14px;
.device-li {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
padding: 12px 0;
color: #abcdfc;
border-bottom: 1px dashed #0349ac;
flex: none !important;
.device-name {
flex: 1;
white-space: nowrap;
@ -441,9 +435,6 @@ export default {
}
}
}
.device-li:nth-child(1) {
color: #9ca3af;
}
}
// 2000px
@media (min-width: 2000px) {

460
src/views/components/aircAndWindcMeter.vue

@ -0,0 +1,460 @@
<template>
<div class="sys_content">
<div class="charts" ref="chart_ref"></div>
</div>
</template>
<script>
import * as echarts from "echarts";
export default {
props: {
subData: {
type: Array,
required: true,
},
},
data() {
return {
chartInstance: null,
option: {},
chartData1: "",
chartData2: "",
allData: "",
};
},
watch: {
subData: {
immediate: true, //
handler(newVal) {
console.log("检测到传功来的数据", this.subData);
if (Object.keys(newVal).length > 0) {
console.log("newval", newVal);
let data = newVal;
this.chartData1 = "";
this.chartData2 = "";
data.forEach((item) => {
if (item.name.includes("运行")) {
this.chartData1 = parseInt(item.value);
}
if (item.name.includes("停止")) {
this.chartData2 = parseInt(item.value);
}
//
this.allData = this.chartData1 + this.chartData2;
});
this.$nextTick(() => {
// // ECharts
// if (this.chartInstance) {
// this.chartInstance.dispose();
// }
// //
// this.initChart();
this.echartsData();
});
}
},
},
},
mounted() {
this.initChart();
window.addEventListener("resize", this.screenAdapter);
this.screenAdapter();
},
destroyed() {
//
window.removeEventListener("resize", this.screenAdapter);
},
methods: {
// 线+ + 线
screenAdapter() {
//,2.6 mes_ref
const titleFontSize = this.$refs.chart_ref.offsetWidth / 100;
//optionoption
const adapterOption = {};
//.chartInstanceoptiondataoption
this.chartInstance.setOption(adapterOption);
//resize
this.chartInstance.resize();
},
echartsData() {
console.log("父组件传过来的值", this.subData);
if (this.subData) {
const titleFontSize = (this.$refs.chart_ref.offsetWidth / 100) * 2;
const colorList = ["#0882ff", "#ffe21e"]; //
const adapterOption = {
//
title: {
subtextStyle: {
fontSize: titleFontSize * 2,
},
},
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)",
},
legend: {
itemWidth: titleFontSize,
itemHeight: titleFontSize,
itemGap: titleFontSize * 2,
formatter: function (name) {
var arr = [];
let data = adapterOption.series[0].data;
var index = 0;
var total = 0;
//
for (var i = 0; i < data.length; i++) {
total += data[i].value;
if (data[i].name == name) {
index = i;
}
}
// 0
var percentage =
data[index].value === 0
? "0.00"
: ((data[index].value / total) * 100).toFixed(2);
arr.push(
"{name|" + name + "}",
"{text|" + " " + ":" + " " + "}",
"{value|" + data[index].value + " " + "}",
"{percentage|" + " " + percentage + "%}"
);
return arr.join("");
},
textStyle: {
color: function (name) {
const dataSeries = adapterOption.series[1].data; // data
const index = dataSeries.findIndex(
(item) => item.name === name
);
const colorList = ["#0882ff", "#ffe21e"]; //
return colorList[index];
},
rich: {
name: {
align: "left",
fontSize: titleFontSize * 2,
},
text: {
align: "left",
fontSize: titleFontSize * 2,
},
value: {
align: "left",
fontSize: titleFontSize * 2,
// color: function (params) {
// let data = adapterOption.series[1].data;
// return data.itemStyle.color({ dataIndex: params.dataIndex });
// },
},
percentage: {
align: "left",
fontSize: titleFontSize * 2,
// color: function (params) {
// let data = adapterOption.series[1].data;
// return data.itemStyle.color({ dataIndex: params.dataIndex });
// },
},
},
},
},
series: [
{
name: "风柜系统:",
data: [
{ value: this.chartData1, name: "运行数" },
{ value: this.chartData2, name: "停止数" },
],
itemStyle: {
color: function (params) {
var colorList = ["#0882ff", "#ffe21e"];
return colorList[params.dataIndex];
},
// borderWidth: 5,
borderColor: "#002a56",
},
},
{
data: [
{ value: this.chartData1, name: "运行数" },
{ value: this.chartData2, name: "停止数" },
],
},
],
};
this.chartInstance.setOption(adapterOption);
this.chartInstance.resize();
} else {
const titleFontSize = (this.$refs.chart_ref.offsetWidth / 100) * 2;
const adapterOption = {
//
title: {
subtextStyle: {
fontSize: titleFontSize * 2,
},
},
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)",
},
legend: {
itemWidth: titleFontSize,
itemHeight: titleFontSize,
itemGap: titleFontSize * 2,
formatter: function (name) {
var arr = [];
let data = adapterOption.series[0].data;
var index = 0;
var total = 0;
//
for (var i = 0; i < data.length; i++) {
total += data[i].value;
if (data[i].name == name) {
index = i;
}
}
// 0
var percentage =
data[index].value === 0
? "0.00"
: ((data[index].value / total) * 100).toFixed(2);
arr.push(
"{name|" + name + "}",
"{text|" + " " + ":" + " " + "}",
"{value|" + data[index].value + " " + "}",
"{percentage|" + " " + percentage + "%}"
);
return arr.join("");
},
textStyle: {
color: function (name) {
const dataSeries = adapterOption.series[1].data; // data
const index = dataSeries.findIndex(
(item) => item.name === name
);
const colorList = ["#0882ff", "#ffe21e"]; //
return colorList[index];
},
rich: {
name: {
align: "left",
fontSize: titleFontSize * 1.6,
},
text: {
align: "left",
fontSize: titleFontSize * 1.6,
},
value: {
align: "left",
fontSize: titleFontSize * 1.6,
// color: function (params) {
// let data = adapterOption.series[1].data;
// return data.itemStyle.color({ dataIndex: params.dataIndex });
// },
},
percentage: {
align: "left",
fontSize: titleFontSize * 1.6,
// color: function (params) {
// let data = adapterOption.series[1].data;
// return data.itemStyle.color({ dataIndex: params.dataIndex });
// },
},
},
},
},
series: [
{
name: "风柜系统:",
data: [
{ value: 0, name: "运行数" },
{ value: 0, name: "停止数" },
],
itemStyle: {
color: function (params) {
var colorList = ["#0882ff", "#ffe21e"];
return colorList[params.dataIndex];
},
// borderWidth: 5,
borderColor: "#002a56",
},
},
{
data: [
{ value: 0, name: "运行数" },
{ value: 0, name: "停止数" },
],
},
],
};
this.chartInstance.setOption(adapterOption);
this.chartInstance.resize();
}
},
//chartInstance
initChart() {
this.chartInstance = echarts.init(this.$refs.chart_ref);
this.option = {
//
title: {
subtext: "运行状态",
textStyle: {
color: "#ffffff",
},
subtextStyle: {
color: "#ffffff",
},
textAlign: "center",
x: "49%",
y: "36%", //
},
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)",
},
//
legend: {
orient: "horizontal", //
bottom: 0, //
left: "center", //
//
textStyle: {
color: "#ffffff",
// fontSize: 18,
},
},
series: [
//
{
name: "风柜系统:",
type: "pie",
radius: ["60%", "72%"],
center: ["50%", "44%"],
avoidLabelOverlap: false,
label: {
show: false,
position: "center",
},
labelLine: {
show: false,
},
itemStyle: {
color: function (params) {
var colorList = ["#0882ff", "#ffe21e"];
return colorList[params.dataIndex];
},
borderWidth: 5,
borderColor: "#002a56",
},
z: 10, //,
},
//
{
type: "pie",
radius: ["50%", "62%"],
center: ["50%", "44%"],
avoidLabelOverlap: false,
label: {
show: false,
position: "center",
},
silent: true,
labelLine: {
show: false,
},
//
itemStyle: {
color: function (colors) {
var colorList = ["#02427f", "#385f5c"];
return colorList[colors.dataIndex];
},
},
z: 15,
},
//
{
//
color: ["#305376"],
type: "pie",
silent: true, //
// hoverAnimation: false, //
// 使emphasis.scale true
// silent: true,
// center
radius: ["38%", "39%"],
center: ["50%", "44%"],
label: {
show: false,
},
data: [
{
value: 0,
name: "",
itemStyle: {},
},
],
},
//
{
//
type: "pie",
silent: true, //
// hoverAnimation: false, //
// 使emphasis.scale true
// silent: true,
// center
radius: ["0%", "38%"],
center: ["50%", "44%"],
label: {
show: false,
},
data: [
{
value: 0,
name: "",
itemStyle: {},
},
],
itemStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 1,
y2: 1,
colorStops: [
{ offset: 0, color: "#002a55" }, // 0%
{ offset: 1, color: "#0a457a" }, // 100%
],
global: false, // false
},
},
},
],
};
//
this.chartInstance.setOption(this.option, true);
},
},
};
</script>
<style lang="scss" scoped>
.sys_content {
padding: 20px;
.charts {
width: 100%;
height: 250px;
}
}
// 2000px
@media (min-width: 2000px) {
.sys_content {
padding: 0.2rem !important;
.charts {
width: 100%;
height: 2.5rem !important;
}
}
}
</style>

142
src/views/components/hotWater.vue

@ -0,0 +1,142 @@
<template>
<div class="card-div">
<div class="card-li room-temp">
<div class="card-header">
<h2 class="card-title">回水平均温度</h2>
<div class="icon">
<i class="fas fa-home"></i>
</div>
</div>
<div class="thermometer">
<div class="temprogress" :style="{ height: temData1 * 2 + '%' }"></div>
</div>
<div class="temperature">{{temData1}}</div>
</div>
<div class="card-li amb-temp">
<div class="card-header">
<h2 class="card-title">供水平均温度</h2>
<div class="icon">
<i class="fas fa-home"></i>
</div>
</div>
<div class="thermometer">
<div class="temprogress" :style="{ height: temData2 * 2 + '%' }"></div>
</div>
<div class="temperature">{{temData2}}</div>
</div>
</div>
</template>
<script>
export default {
props: {
subData: {
type: Array,
required: true,
},
},
data() {
return {
temData1: "",
temData2: "",
};
},
watch: {
subData: {
immediate: true, //
handler(newVal) {
console.log("检测到传功来的数据", this.subData);
if (Object.keys(newVal).length > 0) {
console.log("newval", newVal);
let data = newVal;
this.temData1 = "";
this.temData2 = "";
data.forEach((item) => {
if (item.name.includes("回水")) {
this.temData1 = parseInt(item.value);
}
if (item.name.includes("供水")) {
this.temData2 = parseInt(item.value);
}
});
}
},
},
},
};
</script>
<style lang="scss" scoped>
.card-div {
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
.card-li {
width: 50%;
padding: 0.2rem 0;
display: flex;
flex-direction: column;
align-items: center;
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.1rem;
.card-title {
font-size: 15px;
font-weight: 600;
color: #ffffff;
}
}
.temperature {
font-size: 20px;
font-weight: 700;
position: relative;
display: inline-block;
}
.thermometer {
height: 180px;
width: 40px;
background: #3d5581;
border-radius: 20px;
margin: 0 auto 0.25rem;
overflow: hidden;
box-shadow: inset 0 0 1rem rgba(0, 0, 0, 0.1);
position: relative;
}
.temprogress {
position: absolute;
bottom: 0;
width: 100%;
border-top-left-radius: 20px;
border-top-right-radius:20px;
background: linear-gradient(to top, #3498db, #2ecc71) !important;
}
}
}
@media (min-width: 2000px) {
.card-div {
.card-li {
.card-header {
.card-title {
font-size: 0.15rem !important;
}
}
.temperature {
font-size: 0.2rem !important;
}
.thermometer {
height: 1.8rem !important;
width: 0.4rem !important;
border-radius: 0.2rem !important;
}
.temprogress {
border-top-left-radius: 0.2rem !important;
border-top-right-radius:0.2rem !important;
}
}
}
}
</style>

460
src/views/components/temMeter.vue

@ -0,0 +1,460 @@
<template>
<div class="sys_content">
<div class="charts" ref="chart_ref"></div>
</div>
</template>
<script>
import * as echarts from "echarts";
export default {
props: {
subData: {
type: Array,
required: true,
},
},
data() {
return {
chartInstance: null,
option: {},
chartData1: "",
chartData2: "",
allData: "",
};
},
watch: {
subData: {
immediate: true, //
handler(newVal) {
console.log("检测到传功来的数据", this.subData);
if (Object.keys(newVal).length > 0) {
console.log("newval", newVal);
let data = newVal;
this.chartData1 = "";
this.chartData2 = "";
data.forEach((item) => {
if (item.name.includes("在线")) {
this.chartData1 = parseInt(item.value);
}
if (item.name.includes("离线")) {
this.chartData2 = parseInt(item.value);
}
//
this.allData = this.chartData1 + this.chartData2;
});
this.$nextTick(() => {
// // ECharts
// if (this.chartInstance) {
// this.chartInstance.dispose();
// }
// //
// this.initChart();
this.echartsData();
});
}
},
},
},
mounted() {
this.initChart();
window.addEventListener("resize", this.screenAdapter);
this.screenAdapter();
},
destroyed() {
//
window.removeEventListener("resize", this.screenAdapter);
},
methods: {
// 线+ + 线
screenAdapter() {
//,2.6 mes_ref
const titleFontSize = this.$refs.chart_ref.offsetWidth / 100;
//optionoption
const adapterOption = {};
//.chartInstanceoptiondataoption
this.chartInstance.setOption(adapterOption);
//resize
this.chartInstance.resize();
},
echartsData() {
console.log("父组件传过来的值", this.subData);
if (this.subData) {
const titleFontSize = (this.$refs.chart_ref.offsetWidth / 100) * 2;
const colorList = ["#ffe21e", "#08c8ff"]; //
const adapterOption = {
//
title: {
subtextStyle: {
fontSize: titleFontSize * 2,
},
},
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)",
},
legend: {
itemWidth: titleFontSize,
itemHeight: titleFontSize,
itemGap: titleFontSize * 2,
formatter: function (name) {
var arr = [];
let data = adapterOption.series[0].data;
var index = 0;
var total = 0;
//
for (var i = 0; i < data.length; i++) {
total += data[i].value;
if (data[i].name == name) {
index = i;
}
}
// 0
var percentage =
data[index].value === 0
? "0.00"
: ((data[index].value / total) * 100).toFixed(2);
arr.push(
"{name|" + name + "}",
"{text|" + " " + ":" + " " + "}",
"{value|" + data[index].value + " " + "}",
"{percentage|" + " " + percentage + "%}"
);
return arr.join("");
},
textStyle: {
color: function (name) {
const dataSeries = adapterOption.series[1].data; // data
const index = dataSeries.findIndex(
(item) => item.name === name
);
const colorList = ["#2df499", "#08c8ff"]; //
return colorList[index];
},
rich: {
name: {
align: "left",
fontSize: titleFontSize * 2,
},
text: {
align: "left",
fontSize: titleFontSize * 2,
},
value: {
align: "left",
fontSize: titleFontSize * 2,
// color: function (params) {
// let data = adapterOption.series[1].data;
// return data.itemStyle.color({ dataIndex: params.dataIndex });
// },
},
percentage: {
align: "left",
fontSize: titleFontSize * 2,
// color: function (params) {
// let data = adapterOption.series[1].data;
// return data.itemStyle.color({ dataIndex: params.dataIndex });
// },
},
},
},
},
series: [
{
name: "温度监测:",
data: [
{ value: this.chartData1, name: "在线数" },
{ value: this.chartData2, name: "离线数" },
],
itemStyle: {
color: function (params) {
var colorList = ["#2df499", "#08c8ff"];
return colorList[params.dataIndex];
},
// borderWidth: 5,
borderColor: "#002a56",
},
},
{
data: [
{ value: this.chartData1, name: "在线数" },
{ value: this.chartData2, name: "离线数" },
],
},
],
};
this.chartInstance.setOption(adapterOption);
this.chartInstance.resize();
} else {
const titleFontSize = (this.$refs.chart_ref.offsetWidth / 100) * 2;
const adapterOption = {
//
title: {
subtextStyle: {
fontSize: titleFontSize * 2,
},
},
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)",
},
legend: {
itemWidth: titleFontSize,
itemHeight: titleFontSize,
itemGap: titleFontSize * 2,
formatter: function (name) {
var arr = [];
let data = adapterOption.series[0].data;
var index = 0;
var total = 0;
//
for (var i = 0; i < data.length; i++) {
total += data[i].value;
if (data[i].name == name) {
index = i;
}
}
// 0
var percentage =
data[index].value === 0
? "0.00"
: ((data[index].value / total) * 100).toFixed(2);
arr.push(
"{name|" + name + "}",
"{text|" + " " + ":" + " " + "}",
"{value|" + data[index].value + " " + "}",
"{percentage|" + " " + percentage + "%}"
);
return arr.join("");
},
textStyle: {
color: function (name) {
const dataSeries = adapterOption.series[1].data; // data
const index = dataSeries.findIndex(
(item) => item.name === name
);
const colorList = ["#2df499", "#08c8ff"]; //
return colorList[index];
},
rich: {
name: {
align: "left",
fontSize: titleFontSize * 1.6,
},
text: {
align: "left",
fontSize: titleFontSize * 1.6,
},
value: {
align: "left",
fontSize: titleFontSize * 1.6,
// color: function (params) {
// let data = adapterOption.series[1].data;
// return data.itemStyle.color({ dataIndex: params.dataIndex });
// },
},
percentage: {
align: "left",
fontSize: titleFontSize * 1.6,
// color: function (params) {
// let data = adapterOption.series[1].data;
// return data.itemStyle.color({ dataIndex: params.dataIndex });
// },
},
},
},
},
series: [
{
name: "温度监测:",
data: [
{ value: 0, name: "在线数" },
{ value: 0, name: "离线数" },
],
itemStyle: {
color: function (params) {
var colorList = ["#2df499", "#08c8ff"];
return colorList[params.dataIndex];
},
// borderWidth: 5,
borderColor: "#002a56",
},
},
{
data: [
{ value: 0, name: "在线数" },
{ value: 0, name: "离线数" },
],
},
],
};
this.chartInstance.setOption(adapterOption);
this.chartInstance.resize();
}
},
//chartInstance
initChart() {
this.chartInstance = echarts.init(this.$refs.chart_ref);
this.option = {
//
title: {
subtext: "在线状态",
textStyle: {
color: "#ffffff",
},
subtextStyle: {
color: "#ffffff",
},
textAlign: "center",
x: "49%",
y: "36%", //
},
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)",
},
//
legend: {
orient: "horizontal", //
bottom: 0, //
left: "center", //
//
textStyle: {
color: "#ffffff",
// fontSize: 18,
},
},
series: [
//
{
name: "温度监测:",
type: "pie",
radius: ["60%", "72%"],
center: ["50%", "44%"],
avoidLabelOverlap: false,
label: {
show: false,
position: "center",
},
labelLine: {
show: false,
},
itemStyle: {
color: function (params) {
var colorList = ["#2df499", "#08c8ff"];
return colorList[params.dataIndex];
},
borderWidth: 5,
borderColor: "#002a56",
},
z: 10, //,
},
//
{
type: "pie",
radius: ["50%", "62%"],
center: ["50%", "44%"],
avoidLabelOverlap: false,
label: {
show: false,
position: "center",
},
silent: true,
labelLine: {
show: false,
},
//
itemStyle: {
color: function (colors) {
var colorList = ["#09596b", "#024e7d"];
return colorList[colors.dataIndex];
},
},
z: 15,
},
//
{
//
color: ["#305376"],
type: "pie",
silent: true, //
// hoverAnimation: false, //
// 使emphasis.scale true
// silent: true,
// center
radius: ["38%", "39%"],
center: ["50%", "44%"],
label: {
show: false,
},
data: [
{
value: 0,
name: "",
itemStyle: {},
},
],
},
//
{
//
type: "pie",
silent: true, //
// hoverAnimation: false, //
// 使emphasis.scale true
// silent: true,
// center
radius: ["0%", "38%"],
center: ["50%", "44%"],
label: {
show: false,
},
data: [
{
value: 0,
name: "",
itemStyle: {},
},
],
itemStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 1,
y2: 1,
colorStops: [
{ offset: 0, color: "#002a55" }, // 0%
{ offset: 1, color: "#0a457a" }, // 100%
],
global: false, // false
},
},
},
],
};
//
this.chartInstance.setOption(this.option, true);
},
},
};
</script>
<style lang="scss" scoped>
.sys_content {
padding: 20px;
.charts {
width: 100%;
height: 250px;
}
}
// 2000px
@media (min-width: 2000px) {
.sys_content {
padding: 0.2rem !important;
.charts {
width: 100%;
height: 2.5rem !important;
}
}
}
</style>

234
src/views/components/viewColdSys.vue

@ -9,6 +9,12 @@
import * as echarts from "echarts";
import { viewMainParams } from "@/api/index";
export default {
props: {
subData: {
type: Array,
required: true,
},
},
data() {
return {
chartInstance: null,
@ -36,11 +42,24 @@ export default {
},
};
},
watch: {
subData: {
immediate: true, //
handler(newVal) {
// console.log("", this.subData);
if (Object.keys(newVal).length > 0) {
console.log("newval", newVal);
this.$nextTick(() => {
this.echartsData();
});
}
},
},
},
mounted() {
this.initChart();
this.screenAdapter();
window.addEventListener("resize", this.screenAdapter);
this.getChartsData();
},
destroyed() {
//mounted
@ -441,117 +460,114 @@ export default {
this.chartInstance.resize();
},
//
getChartsData() {
viewMainParams().then((res) => {
console.log("系统参数返回", res);
console.log("冷源监控返回",res.rows[0]);
if (res.code == 200) {
this.useForm.maxData = 10;
this.useForm.useData = res.rows[0].values[0].value;
let that = this;
// 使
const axisLineColor = this.getAxisLineColor(
this.useForm.useData,
this.useForm.maxData
);
const adapterOption = {
series: [
{
name: "内部动态阴影",
axisLine: {
lineStyle: {
color: axisLineColor,
//
// width: 80,
},
echartsData() {
if (this.subData.length > 0) {
this.useForm.maxData = 10;
this.useForm.useData = this.subData[0].value;
let that = this;
// 使
const axisLineColor = this.getAxisLineColor(
this.useForm.useData,
this.useForm.maxData
);
const titleFontSize = this.$refs.sys_charts.offsetWidth / 20;
const adapterOption = {
series: [
{
name: "内部动态阴影",
axisLine: {
lineStyle: {
color: axisLineColor,
//
// width: 80,
},
},
{
name: "内部大边框",
min: 0,
max: this.useForm.maxData,
},
{
name: "指针上的圆",
data: [
{
value: 5,
},
{
name: "内部大边框",
min: 0,
max: this.useForm.maxData,
},
{
name: "指针上的圆",
data: [
{
value: 5,
},
],
},
{
name: "指针上的渐变圆",
label: {
show: true,
position: "center", //
offset: [0, -titleFontSize * 0.6], // 10
formatter: function () {
// HTML 使 rich
return `{line|${that.useForm.useData}}`;
},
rich: {
line: {
color: "#fff", //
fontSize: titleFontSize, //
lineHeight: 5, //
},
],
},
},
{
name: "指针上的渐变圆",
label: {
show: true,
position: "center", //
offset: [0, -5], // 10
formatter: function () {
// HTML 使 rich
return `{line|${that.useForm.useData}}`;
},
rich: {
line: {
color: "#fff", //
fontSize: 20, //
lineHeight: 0, //
data: [
{
value: 0,
itemStyle: {
//
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgb(4,112,212)", //
},
{
offset: 0.3,
color: "rgba(0, 46, 93)", //
},
],
global: false, // false
},
},
},
data: [
{
value: 0,
itemStyle: {
//
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgb(4,112,212)", //
},
{
offset: 0.3,
color: "rgba(0, 46, 93)", //
},
],
global: false, // false
},
},
},
],
},
{
//
name: this.energyCostText,
max: this.useForm.maxData, //
axisLabel: {
formatter: (value) => {
// 0
if (value === 0 || value == this.useForm.maxData) {
// 100
return value;
}
return "";
},
],
},
{
//
name: this.energyCostText,
max: this.useForm.maxData, //
axisLabel: {
formatter: (value) => {
// 0
if (value === 0 || value == this.useForm.maxData) {
// 100
return value;
}
return "";
},
data: [
{
name: this.dateUse,
value: this.useForm.useData,
},
],
},
],
};
this.chartInstance.setOption(adapterOption);
//resize
this.chartInstance.resize();
}
});
data: [
{
name: this.dateUse,
value: this.useForm.useData,
},
],
},
],
};
this.chartInstance.setOption(adapterOption);
//resize
this.chartInstance.resize();
}
},
},
};
@ -568,11 +584,21 @@ export default {
.sys_charts {
width: 100%;
height: 1.6rem;
height: 150px;
}
.eer {
font-size: 18px;
margin-top: 25px;
}
}
// 2000px
@media (min-width: 2000px) {
.sys_charts {
height: 1.5rem !important;
}
.eer {
font-size: 0.18rem !important;
margin-top: 0.25rem !important;
}
}
</style>

26
src/views/components/viewEnergy.vue

@ -81,6 +81,7 @@ export default {
);
console.log("当前要渲染的数据对象", chartsObj);
console.log("当前要渲染的颜色对象", colorObj);
const titleFontSize = this.$refs.chart_ref.offsetWidth / 50;
let adapterOption = {};
// 线
adapterOption = {
@ -106,7 +107,7 @@ export default {
value +
chartsObj.unit +
"</span><br>";
} else {
} else {
res +=
marker +
seriesName +
@ -121,9 +122,18 @@ export default {
},
xAxis: {
data: chartsObj.timeStr,
axisLabel: {
fontSize: titleFontSize,
},
},
yAxis: {
name: chartsObj.unit,
nameTextStyle: {
fontSize: titleFontSize,
},
axisLabel: {
fontSize: titleFontSize,
},
},
series: [
{
@ -290,4 +300,18 @@ export default {
width: 100%;
height: 300px;
}
// 2000px
@media (min-width: 2000px) {
.right-table {
padding: 0.27rem 0.15rem 0.25rem 0.15rem !important;
}
.mr20 {
width: 0.92rem !important;
padding: 0.02rem !important;
}
.charts {
margin-top: 0.2rem !important;
height: 3rem !important;
}
}
</style>

22
src/views/components/waterTank.vue

@ -46,9 +46,9 @@ export default {
}
.water {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
bottom: 0.05rem;
left: 0.03rem;
width: 1.13rem;
/* 修改颜色表示,添加透明度 */
background-color: rgba(23, 106, 201);
overflow: hidden;
@ -64,7 +64,7 @@ export default {
height: 120px !important;
}
.water {
width: 110px !important;
width: 105px !important;
}
}
@ -78,11 +78,11 @@ export default {
height: 100px !important;
}
.water {
width: 90px !important;
width: 85px !important;
}
}
@media (min-width: 720px) and (max-width: 1240px){
@media (min-width: 720px) and (max-width: 1240px) {
.monitor-container {
width: 100px !important;
height: 100px !important;
@ -92,7 +92,7 @@ export default {
height: 110px !important;
}
.water {
width: 100px !important;
width: 96px !important;
}
}
@ -106,7 +106,13 @@ export default {
height: 90px !important;
}
.water {
width: 80px !important;
width: 76px !important;
}
}
// 2000px-element
@media (min-width: 2000px) {
.water {
bottom: 0rem !important;
}
}
</style>

43
src/views/device/comm/index.vue

@ -7,13 +7,13 @@
ref="queryForm"
size="small"
:inline="true"
label-width="68px"
>
<el-form-item label="仪表类型" prop="mtType">
<el-select
v-model="queryParams.mtType"
placeholder="请选择仪表类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_mt_type"
@ -168,8 +168,8 @@
/>
<!-- 添加或修改设备参数对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-dialog :title="title" :visible.sync="open" append-to-body>
<el-form ref="form" :model="form" :rules="rules">
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="仪表类型" prop="mtType">
@ -177,6 +177,7 @@
v-model="form.mtType"
placeholder="请选择仪表类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_mt_type"
@ -191,6 +192,7 @@
<el-form-item label="波特率" prop="baudRate">
<el-select
clearable
filterable
placeholder="请选择波特率"
v-model="form.baudRate"
>
@ -208,6 +210,7 @@
<el-form-item label="数据位" prop="dataBit">
<el-select
clearable
filterable
placeholder="请选择数据位"
v-model="form.dataBit"
>
@ -220,6 +223,7 @@
<el-form-item label="停止位" prop="stopBit">
<el-select
clearable
filterable
placeholder="请选择停止位"
v-model="form.stopBit"
>
@ -236,6 +240,7 @@
<el-form-item label="校验位" prop="parity">
<el-select
clearable
filterable
placeholder="请选择校验位"
v-model="form.parity"
>
@ -446,3 +451,35 @@ export default {
},
};
</script>
<style scoped lang="scss">
/* 媒体查询,适配大于2000px分辨率的大屏样式 - element样式 */
@media (max-width: 2000px) {
::v-deep .el-dialog {
width: 700px !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 110px !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
@media (min-width: 2000px) {
::v-deep .el-dialog {
width: 7.5rem !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 1.1rem !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
</style>

40
src/views/device/gateway/index.vue

@ -7,7 +7,6 @@
ref="queryForm"
size="small"
:inline="true"
label-width="68px"
>
<el-form-item label="网关名称" prop="gwName">
<el-input
@ -22,6 +21,7 @@
v-model="queryParams.status"
placeholder="网关状态"
clearable
filterable
>
<el-option
v-for="dict in dict.type.gateway_status"
@ -194,8 +194,8 @@
/>
<!-- 添加或修改网关对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-dialog :title="title" :visible.sync="open" append-to-body>
<el-form ref="form" :model="form" :rules="rules">
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="网关名称" prop="gwName">
@ -256,6 +256,7 @@
v-model="form.operatorType"
placeholder="选择运营商"
clearable
filterable
>
<el-option
v-for="dict in dict.type.operator_type"
@ -271,6 +272,7 @@
v-model="form.communicationType"
placeholder="选择通信方式"
clearable
filterable
>
<el-option
v-for="dict in dict.type.communication_type"
@ -500,3 +502,35 @@ export default {
},
};
</script>
<style scoped lang="scss">
/* 媒体查询,适配大于2000px分辨率的大屏样式 - element样式 */
@media (max-width: 2000px) {
::v-deep .el-dialog {
width: 700px !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 110px !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
@media (min-width: 2000px) {
::v-deep .el-dialog {
width: 7.5rem !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 1.1rem !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
</style>

51
src/views/device/gather/index.vue

@ -7,13 +7,13 @@
ref="queryForm"
size="small"
:inline="true"
label-width="90px"
>
<el-form-item label="仪表类型" prop="mtType">
<el-select
v-model="queryParams.mtType"
placeholder="请选择仪表类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_mt_type"
@ -28,6 +28,7 @@
v-model="queryParams.systemType"
placeholder="请选择系统类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_type"
@ -42,6 +43,7 @@
v-model="queryParams.paramType"
placeholder="请选择采集参数类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_param_type"
@ -305,8 +307,8 @@
/>
<!-- 添加或修改设备采集参数对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-dialog :title="title" :visible.sync="open" append-to-body>
<el-form ref="form" :model="form" :rules="rules">
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="仪表类型" prop="mtType">
@ -314,6 +316,7 @@
v-model="form.mtType"
placeholder="请选择仪表类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_mt_type"
@ -399,6 +402,7 @@
v-model="form.dataType"
placeholder="请选择数据类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_data_type"
@ -415,6 +419,7 @@
<el-form-item label="是否累计" prop="mtIsSum">
<el-select
clearable
filterable
placeholder="请选择是否"
v-model="form.mtIsSum"
>
@ -467,6 +472,7 @@
v-model="form.protocolType"
placeholder="请选择协议类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_protocol_type"
@ -483,6 +489,7 @@
v-model="form.communicationType"
placeholder="请选择通信类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_communication_type"
@ -498,6 +505,7 @@
<el-form-item label="是否使用" prop="isUse">
<el-select
clearable
filterable
placeholder="请选择是否"
v-model="form.isUse"
>
@ -525,6 +533,7 @@
v-model="form.systemType"
placeholder="请选择系统类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_type"
@ -542,6 +551,7 @@
v-model="form.paramType"
placeholder="请选择参数类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_param_type"
@ -557,6 +567,7 @@
v-model="form.collectionType"
placeholder="请选择采集类别"
clearable
filterable
>
<el-option
v-for="dict in dict.type.alarm_collection_type"
@ -575,6 +586,7 @@
v-model="form.terminalDeviceType"
placeholder="请选择采集设备"
clearable
filterable
@change="handleDeviceType"
>
<el-option
@ -591,6 +603,7 @@
v-model="form.deviceLedgerId"
placeholder="请选择设备名称"
clearable
filterable
>
<el-option
v-for="item in ledgerList"
@ -916,3 +929,35 @@ export default {
},
};
</script>
<style scoped lang="scss">
/* 媒体查询,适配大于2000px分辨率的大屏样式 - element样式 */
@media (max-width: 2000px) {
::v-deep .el-dialog {
width: 700px !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 140px !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
@media (min-width: 2000px) {
::v-deep .el-dialog {
width: 7.5rem !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 1.4rem !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
</style>

50
src/views/device/ledger/index.vue

@ -7,7 +7,6 @@
ref="queryForm"
size="small"
:inline="true"
label-width="68px"
>
<el-form-item label="设备名称" prop="deviceName">
<el-input
@ -30,6 +29,7 @@
v-model="queryParams.deviceType"
placeholder="请选择设备类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_device_type"
@ -216,8 +216,8 @@
/>
<!-- 添加或修改设备台账对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-dialog :title="title" :visible.sync="open" append-to-body>
<el-form ref="form" :model="form" :rules="rules">
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="设备名称" prop="deviceName">
@ -233,6 +233,7 @@
v-model="form.deviceType"
placeholder="请选择设备类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_device_type"
@ -305,7 +306,12 @@
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="状态" prop="status">
<el-select v-model="form.status" placeholder="请选择" clearable>
<el-select
v-model="form.status"
placeholder="请选择"
clearable
filterable
>
<el-option label="正常" value="0" />
<el-option label="停用" value="1" /> </el-select></el-form-item
></el-col>
@ -315,6 +321,7 @@
v-model="form.isCollection"
placeholder="请选择是否"
clearable
filterable
>
<el-option label="是" value="0" />
<el-option label="否" value="1" />
@ -329,6 +336,7 @@
v-model="form.isCalcEnergy"
placeholder="请选择是否"
clearable
filterable
>
<el-option label="是" value="0" />
<el-option label="否" value="1" />
@ -340,6 +348,7 @@
v-model="form.systemType"
placeholder="请选择系统类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_type"
@ -421,7 +430,7 @@ export default {
isCollection: [
{ required: true, message: "请选择是否", trigger: "blur" },
],
modelSpecs:[
modelSpecs: [
{ required: true, message: "规格型号不能为空", trigger: "blur" },
],
isCalcEnergy: [
@ -596,3 +605,34 @@ export default {
},
};
</script>
<style scoped lang="scss">
/* 媒体查询,适配大于2000px分辨率的大屏样式 - element样式 */
@media (max-width: 2000px) {
::v-deep .el-dialog {
width: 700px !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 150px !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
@media (min-width: 2000px) {
::v-deep .el-dialog {
width: 7.5rem !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 1.5rem !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
</style>

40
src/views/device/maintenance/index.vue

@ -81,13 +81,13 @@
ref="queryForm"
size="small"
:inline="true"
label-width="68px"
>
<el-form-item label="设备类型" prop="deviceType">
<el-select
v-model="queryParams.deviceType"
placeholder="请选择设备类型"
clearable
filterable
>
<el-option
v-for="item in devices"
@ -103,6 +103,7 @@
v-model="queryParams.maintainType"
placeholder="请选择维保类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.maintain_type"
@ -287,8 +288,8 @@
/>
<!-- 添加或修改维保对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-dialog :title="title" :visible.sync="open" append-to-body>
<el-form ref="form" :model="form" :rules="rules">
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="维保类型" prop="maintainType">
@ -296,6 +297,7 @@
v-model="form.maintainType"
placeholder="请选择维保类型"
clearable
filterable
:disabled="shouldDis"
>
<el-option
@ -313,6 +315,7 @@
v-model="form.deviceType"
placeholder="请选择设备类型"
clearable
filterable
:disabled="shouldDis"
>
<el-option
@ -833,3 +836,34 @@ export default {
}
}
</style>
<style scoped lang="scss">
/* 媒体查询,适配大于2000px分辨率的大屏样式 - element样式 */
@media (max-width: 2000px) {
::v-deep .el-dialog {
width: 700px !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 110px !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
@media (min-width: 2000px) {
::v-deep .el-dialog {
width: 7.5rem !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 1.1rem !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
</style>

54
src/views/device/qrCode/index.vue

@ -7,13 +7,13 @@
ref="queryForm"
size="small"
:inline="true"
label-width="90px"
>
<el-form-item label="二维码状态" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择状态"
clearable
filterable
>
<el-option
v-for="dict in dict.type.qrcode_status"
@ -195,8 +195,8 @@
/>
<!-- 修改二维码对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-dialog :title="title" :visible.sync="open" append-to-body>
<el-form ref="form" :model="form" :rules="rules">
<el-row type="flex" justify="center">
<el-col :span="24">
<el-form-item label="二维码序列号" prop="serialNum">
@ -223,6 +223,7 @@
v-model="form.deviceLedgerId"
placeholder="请选择设备名称"
clearable
filterable
@change="handleDeviceChange"
>
<el-option
@ -238,6 +239,7 @@
v-model="form.status"
placeholder="请选择状态"
clearable
filterable
>
<el-option
v-for="dict in dict.type.qrcode_status"
@ -256,12 +258,7 @@
</div>
</el-dialog>
<!-- 二维码预览弹框 -->
<el-dialog
title="二维码预览"
:visible.sync="isCodePreview"
width="500px"
append-to-body
>
<el-dialog title="二维码预览" :visible.sync="isCodePreview" append-to-body>
<div class="dialog-img">
<img class="qrCodeImg" :src="codePreViewUrl" alt="Base64 Image" />
</div>
@ -270,15 +267,9 @@
<el-dialog
title="批量生成二维码"
:visible.sync="isMoreqrCode"
width="500px"
append-to-body
>
<el-form
ref="qrCodeForm"
:model="qrCodeForm"
:rules="qrCodeForms"
label-width="120px"
>
<el-form ref="qrCodeForm" :model="qrCodeForm" :rules="qrCodeForms">
<el-row type="flex" justify="center">
<el-col :span="24">
<el-form-item label="二维码个数" prop="qrNum">
@ -554,3 +545,34 @@ export default {
color: red;
}
</style>
<style scoped lang="scss">
/* 媒体查询,适配大于2000px分辨率的大屏样式 - element样式 */
@media (max-width: 2000px) {
::v-deep .el-dialog {
width: 500px !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 150px !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
@media (min-width: 2000px) {
::v-deep .el-dialog {
width: 5rem !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 1.5rem !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
</style>

36
src/views/device/spare/index.vue

@ -7,7 +7,6 @@
ref="queryForm"
size="small"
:inline="true"
label-width="90px"
>
<el-form-item label="备件序列号" prop="serialNum">
<el-input
@ -178,8 +177,8 @@
/>
<!-- 添加或修改备件库存对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="95px">
<el-dialog :title="title" :visible.sync="open" append-to-body>
<el-form ref="form" :model="form" :rules="rules">
<el-row type="flex" justify="center">
<el-col :span="12">
<el-form-item label="设备序列号" prop="serialNum">
@ -460,3 +459,34 @@ export default {
},
};
</script>
<style scoped lang="scss">
/* 媒体查询,适配大于2000px分辨率的大屏样式 - element样式 */
@media (max-width: 2000px) {
::v-deep .el-dialog {
width: 700px !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 140px !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
@media (min-width: 2000px) {
::v-deep .el-dialog {
width: 7.5rem !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 1.4rem !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
</style>

51
src/views/device/spareInOut/index.vue

@ -7,7 +7,6 @@
ref="queryForm"
size="small"
:inline="true"
label-width="90px"
>
<el-form-item label="备件序列号" prop="serialNum">
<el-input
@ -30,6 +29,7 @@
v-model="queryParams.operaType"
placeholder="请选择操作类型"
clearable
filterable
>
<el-option
v-for="dict in dict.type.sys_inout_type"
@ -147,14 +147,16 @@
/>
<!-- 出入库对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" label-width="95px">
<el-dialog :title="title" :visible.sync="open" append-to-body>
<el-form ref="form">
<el-table :data="dialogList">
<el-table-column label="备件名称" prop="spareName" width="200">
<el-table-column label="备件名称" prop="spareName" min-width="200">
<template slot-scope="scope">
<el-select
v-model="scope.row.sparePartsId"
@change="handleSpare(scope.row, scope.row.sparePartsId)"
filterable
clearable
>
<el-option
v-for="item in spares"
@ -166,7 +168,7 @@
</el-select>
</template>
</el-table-column>
<el-table-column label="数量" width="150">
<el-table-column label="数量" min-width="150">
<template slot-scope="scope">
<el-input
placeholder="请填写"
@ -176,9 +178,13 @@
></el-input>
</template>
</el-table-column>
<el-table-column label="当前库存" width="150" prop="inventoryLevels">
<el-table-column
label="当前库存"
min-width="150"
prop="inventoryLevels"
>
</el-table-column>
<el-table-column prop="data1" label="操作" width="130">
<el-table-column prop="data1" label="操作" min-width="130">
<template slot-scope="scope">
<div class="table-btn">
<div class="delete-btn">
@ -434,3 +440,34 @@ export default {
},
};
</script>
<style scoped lang="scss">
/* 媒体查询,适配大于2000px分辨率的大屏样式 - element样式 */
@media (max-width: 2000px) {
::v-deep .el-dialog {
width: 700px !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 140px !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
@media (min-width: 2000px) {
::v-deep .el-dialog {
width: 7.5rem !important;
}
::v-deep .el-dialog .el-form-item__label {
width: 1.4rem !important;
}
::v-deep .el-dialog .el-form-item {
display: flex;
flex-direction: row;
align-items: center;
}
}
</style>

894
src/views/hotWater/dataAnalysis/components/analyzeMonth.vue

@ -0,0 +1,894 @@
<!-- 报表查询-用能查询-年数据 -->
<template>
<div class="analy-table">
<div class="findwatercharts" ref="findwater_ref"></div>
<!-- 表格 -->
<el-table
class="maintable"
header-align="center"
:data="tableData"
style="margin-right: 0.13rem"
:cell-style="tableRowStyle"
>
<el-table-column prop="itemType" label="类别" width="160" fixed="left">
</el-table-column>
<el-table-column align="center" prop="day01" label="1日" width="100">
</el-table-column>
<el-table-column align="center" prop="day02" label="2日" width="100">
</el-table-column>
<el-table-column align="center" prop="day03" label="3日" width="100">
</el-table-column>
<el-table-column align="center" prop="day04" label="4日" width="100">
</el-table-column>
<el-table-column align="center" prop="day05" label="5日" width="100">
</el-table-column>
<el-table-column align="center" prop="day06" label="6日" width="100">
</el-table-column>
<el-table-column align="center" prop="day07" label="7日" width="100">
</el-table-column>
<el-table-column align="center" prop="day08" label="8日" width="100">
</el-table-column>
<el-table-column align="center" prop="day09" label="9日" width="100">
</el-table-column>
<el-table-column align="center" prop="day10" label="10日" width="100">
</el-table-column>
<el-table-column align="center" prop="day11" label="11日" width="100">
</el-table-column>
<el-table-column align="center" prop="day12" label="12日" width="100">
</el-table-column>
<el-table-column align="center" prop="day13" label="13日" width="100">
</el-table-column>
<el-table-column align="center" prop="day14" label="14日" width="100">
</el-table-column>
<el-table-column align="center" prop="day15" label="15日" width="100">
</el-table-column>
<el-table-column align="center" prop="day16" label="16日" width="100">
</el-table-column>
<el-table-column align="center" prop="day17" label="17日" width="100">
</el-table-column>
<el-table-column align="center" prop="day18" label="18日" width="100">
</el-table-column>
<el-table-column align="center" prop="day19" label="19日" width="100">
</el-table-column>
<el-table-column align="center" prop="day20" label="20日" width="100">
</el-table-column>
<el-table-column align="center" prop="day21" label="21日" width="100">
</el-table-column>
<el-table-column align="center" prop="day22" label="22日" width="100">
</el-table-column>
<el-table-column align="center" prop="day23" label="23日" width="100">
</el-table-column>
<el-table-column align="center" prop="day24" label="24日" width="100">
</el-table-column>
<el-table-column align="center" prop="day25" label="25日" width="100">
</el-table-column>
<el-table-column align="center" prop="day26" label="26日" width="100">
</el-table-column>
<el-table-column align="center" prop="day27" label="27日" width="100">
</el-table-column>
<el-table-column align="center" prop="day28" label="28日" width="100">
</el-table-column>
<el-table-column align="center" prop="day29" label="29日" width="100">
</el-table-column>
<el-table-column align="center" prop="day30" label="30日" width="100">
</el-table-column>
<el-table-column align="center" prop="day31" label="31日" width="100">
</el-table-column>
<el-table-column
align="center"
prop="totalValue"
label="合计"
fixed="right"
width="130"
>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { getDay, getMonth, getYear } from "@/utils/datetime";
import { queryMonthDatas } from "@/api/hotWater/dataAnalysis";
import * as echarts from "echarts";
export default {
props: {
chType: {
type: Number,
},
chTime: {
type: String,
},
chBuild: {
type: String,
},
currentIndex: {
type: Number,
},
},
data() {
return {
chartInstance1: null,
option1: {
series: [],
},
//
endTime: "",
//
tableData: [],
// 线
data1: [],
data2: [],
data3: [],
data4: [],
data5: [],
//
data6: [],
// x
data8: [],
};
},
watch: {
currentIndex: {
immediate: true,
deep: true,
handler(newVal, val) {
// console.log("", newVal);
this.$nextTick(function () {
console.log("子组件接受的type类型", this.chType);
console.log("子组件这时候有building吗", this.chBuild);
this.getMothData();
});
},
},
},
mounted() {
// this.getMothData();
this.initChart1();
window.addEventListener("resize", this.screenAdapter);
this.screenAdapter();
},
destroyed() {
//mounted
window.removeEventListener("resize", this.screenAdapter);
},
methods: {
tableRowStyle({ row, column, rowIndex, columnIndex }) {
// console.log("row",row)
// console.log("column",column)
// 1
if (columnIndex === 0 || column.label === '合计') {
return "background-color:rgb(11 ,100, 201) !important;";
}
},
//
getMothData() {
//
//
// id
// select
if (this.chTime) {
this.endTime = this.chTime;
} else {
this.endTime = getMonth(0);
}
let params = {
curDate: this.endTime,
buildingId: this.chBuild,
type: this.chType,
};
console.log("月参数", params);
queryMonthDatas(params).then((res) => {
// console.log("", res);
if (res.code == 200 && res.rows.length > 0) {
var line1 = [];
var line2 = [];
var line3 = [];
var line4 = [];
this.tableData = res.rows;
// Object.values
line1 = Object.values(this.tableData[0]).slice(3, 35);
line2 = Object.values(this.tableData[1]).slice(3, 35);
line3 = Object.values(this.tableData[2]).slice(3, 35);
line4 = Object.values(this.tableData[3]).slice(3, 35);
// 线 filter
this.data1 = line1.filter(function (s) {
return s && s.trim();
});
this.data2 = line2.filter(function (s) {
return s && s.trim();
});
//
var line5 = line3.filter(function (s) {
return s && s.trim();
});
this.data3 = [];
this.data4 = [];
// %
line5.forEach((item) => {
this.data3.push(item.split("%").join(""));
});
var line6 = line4.filter(function (s) {
return s && s.trim();
});
line6.forEach((item) => {
this.data4.push(item.split("%").join(""));
});
// 线x
// tableData[0] [1] [2] [3],
//
let newObj = {};
for (let key in this.tableData[0]) {
if (this.tableData[0][key]) {
newObj[key] = this.tableData[0][key];
}
}
// console.log("", newObj);
// key
// Object.setPrototypeOf(this.newObj);
let data7 = Object.keys(newObj);
// console.log("x", data7);
//
let allArr = [
"day01",
"day02",
"day03",
"day04",
"day05",
"day06",
"day07",
"day08",
"day09",
"day10",
"day11",
"day12",
"day13",
"day14",
"day15",
"day16",
"day17",
"day18",
"day19",
"day20",
"day21",
"day22",
"day23",
"day24",
"day25",
"day26",
"day27",
"day28",
"day29",
"day30",
"day31",
];
//
function compare(data7, allArr) {
return data7.filter((v) => {
return allArr.includes(v);
});
}
// console.log("x", compare(data7, allArr));
// data7 xx
this.data8 = [];
compare(data7, allArr).forEach((item) => {
if (item) {
this.data8.push(item.split("day").join("") + "日");
}
});
// console.log("x", this.data8);
//
this.data6 = [];
this.data5 = this.tableData.forEach((item) => {
return this.data6.push(item.itemType);
});
// console.log("data1", this.data1);
// console.log("data2", this.data2);
// console.log("data3", this.data3);
// console.log("data4", this.data4);
// console.log("", this.data6);
//
var Min1 = Math.floor(Math.min(...this.data1, ...this.data2)),
Min2 = Math.floor(Math.min(...this.data3, ...this.data4) - 4),
Max1 = Math.ceil(Math.max(...this.data1, ...this.data2) + 4),
Max2 = Math.ceil(Math.max(...this.data3, ...this.data4) + 4);
// console.log("Min1", Min1);
// console.log("Min2", Min2);
// console.log("Max1", Max1);
// console.log("Max2", Max2);
// y+
var yAxisUnit = "";
if (this.chType === 1) {
yAxisUnit = "吨";
} else if (this.chType === 2) {
yAxisUnit = "度";
} else if (this.chType === 3) {
yAxisUnit = "度/吨";
}
this.chartInstance1 = echarts.init(this.$refs.findwater_ref);
const adapterOption = {
legend: {
data: this.data6,
},
xAxis: {
data: this.data8,
},
yAxis: [
//y
{
min: Min1,
max: Max1,
splitNumber: 10,
interval: (Max1 - Min1) / 10,
name: yAxisUnit,
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
},
{
min: Min2,
max: Max2,
splitNumber: 10,
interval: (Max2 - Min2) / 10,
name: "%",
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
},
],
series: [
{
name: this.data6[0],
data: this.data1,
},
{
name: this.data6[1],
data: this.data2,
},
{
name: this.data6[2],
data: this.data3,
},
{
name: this.data6[3],
data: this.data4,
},
],
};
//.chartInstanceoptiondataoption
this.chartInstance1.setOption(adapterOption);
//resize
this.chartInstance1.resize();
} else {
this.tableData = [];
this.chartInstance1 = echarts.init(this.$refs.findwater_ref);
const adapterOption = {
legend: {
data: [],
},
xAxis: {
data: [],
},
yAxis: [
//y
{
min: 0,
max: 0,
splitNumber: 10,
interval: 0,
},
{
min: 0,
max: 0,
splitNumber: 10,
interval: 0,
},
],
series: [
{
name: "",
data: [],
},
{
name: "",
data: [],
},
{
name: "",
data: [],
},
{
name: "",
data: [],
},
],
};
//.chartInstanceoptiondataoption
this.chartInstance1.setOption(adapterOption);
//resize
this.chartInstance1.resize();
}
});
},
//
outTable() {
// console.log("");
import("@/assets/excel/Export2Excel").then((excel) => {
const tHeader = [
"类别",
"1日",
"2日",
"3日",
"4日",
"5日",
"6日",
"7日",
"8日",
"9日",
"10日",
"11日",
"12日",
"13日",
"14日",
"15日",
"16日",
"17日",
"18日",
"19日",
"20日",
"21日",
"22日",
"23日",
"24日",
"25日",
"26日",
"27日",
"28日",
"29日",
"30日",
"31日",
"合计",
]; // excel
const filterVal = [
"itemType",
"day01",
"day02",
"day03",
"day04",
"day05",
"day06",
"day07",
"day08",
"day09",
"day10",
"day11",
"day12",
"day13",
"day14",
"day15",
"day16",
"day17",
"day18",
"day19",
"day20",
"day21",
"day22",
"day23",
"day24",
"day25",
"day26",
"day27",
"day28",
"day29",
"day30",
"day31",
"totalValue",
]; // excel
// const list = this.tableData;
// console.log(list)
if (this.chTime) {
this.endTime = this.chTime;
} else {
this.endTime = getMonth(0);
}
let params = {
curDate: this.endTime,
buildingId: this.chBuild,
type: this.chType,
};
console.log("月参数", params);
queryMonthDatas(params).then((res) => {
if (res.code == 200 && res.rows.length > 0) {
// console.log(res);
const data = this.formatJson(filterVal, res.rows);
const autoWidth = true;
excel.export_json_to_excel({
header: tHeader, //
data, //
filename: "月数据报表", //
autoWidth: true, //
});
}
});
});
},
//,
formatJson(filterVal, jsonData) {
return jsonData.map((v) =>
filterVal.map((j) => {
if (j === "installDate") {
return format(v[j]);
} else {
return v[j];
}
})
);
},
//chartInstance1
// x 1 2 3
// x 1 2 3
initChart1() {
this.$emit("initChart1");
this.chartInstance1 = echarts.init(this.$refs.findwater_ref);
this.option1 = {
tooltip: {
trigger: "axis",
// hover
showDelay: 0, // ms
axisPointer: {
type: "shadow",
shadowStyle: {
color: "rgba(30, 69, 113, 0.15)",
width: "1",
},
},
// tooltip
formatter: function (params) {
var res = params[0].name + "<br/>";
for (var i = 0, l = params.length; i < l; i++) {
var seriesName = params[i].seriesName;
var value = params[i].value;
// console.log("", params[i].color.colorStops[0].color)
var marker =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' +
params[i].color.colorStops[0].color +
'"></span>';
// seriesName
if (seriesName.includes("用水量")) {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"吨" +
"</span><br>";
} else if (seriesName.includes("用电量")) {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"度" +
"</span><br>";
} else if (seriesName.includes("单耗")) {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"度/吨" +
"</span><br>";
} else {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"%" +
"</span><br>";
}
}
return res;
},
},
legend: {
// icon
// icon: "cricle",
//
textStyle: {
color: "#ffff",
fontSize: 12, //
},
left: "center",
top: "5%",
//
itemGap: 5,
itemWidth: 10,
itemHeight: 5,
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
},
xAxis: {
type: "category",
//true
boundaryGap: true,
// x
axisLabel: {
// interval: 0, //x
// rotate: 30, //x30
color: "rgba(255, 255, 255, 1)",
fontSize: 14, //
},
axisTick: {
show: false, // 线
},
// x
axisLine: {
show: true,
lineStyle: {
color: "#365576",
},
},
splitLine: {
lineStyle: {
color: "#e2e6f0",
},
}, //x线
},
yAxis: [
//y
{
type: "value",
// y
axisLabel: {
color: "rgba(255, 255, 255, 1)",
},
// y
axisLine: {
show: true,
lineStyle: {
color: "#365576", // y 线
},
fontSize: 14, //
},
//y线
// splitNumber: 10,
// y线
splitLine: {
lineStyle: {
color: "#1a3d62", // 线
type: "dashed", // 线线
},
},
//y线
splitNumber: 10,
},
{
type: "value",
// y
axisLabel: {
color: "rgba(255, 255, 255, 1)",
},
// y
axisLine: {
show: true,
lineStyle: {
color: "#365576", // y 线
},
fontSize: 14, //
},
//y线
// splitNumber: 10,
// y线
splitLine: {
lineStyle: {
color: "#1a3d62", // 线
type: "dashed", // 线线
},
},
//y线
splitNumber: 10,
},
],
series: [
{
type: "bar",
barWidth: 10, //
// tooltip: {
// valueFormatter: function (value) {
// return value + "";
// },
// },
//线
itemStyle: {
color: "#0b75d3",
// 使
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(1, 102, 251, 1)", //
},
{
offset: 1,
color: "rgba(1, 102, 251, 0)", //
},
],
global: false, // false
},
borderRadius: [5, 5, 0, 0], //
},
},
{
type: "bar",
// tooltip: {
// valueFormatter: function (value) {
// return value + "";
// },
// },
barWidth: 10, //
//线
itemStyle: {
color: "#0b75d3",
// 使
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(0, 224, 225, 1)", //
},
{
offset: 1,
color: "rgba(0, 224, 225, 0)", //
},
],
global: false, // false
},
borderRadius: [5, 5, 0, 0],
},
},
{
type: "line",
tooltip: {
valueFormatter: function (value) {
return value + "%";
},
},
// stack: 'Total',
symbol: "circle",
//
symbolSize: 6,
yAxisIndex: 1,
//
showSymbol: false,
// data: this.data3,
//线
itemStyle: {
color: "#db9215",
// 使
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "#db9215", //
},
{
offset: 1,
color: "#db9215", //
},
],
global: false, // false
},
borderRadius: [5, 5, 0, 0], //
},
},
{
type: "line",
tooltip: {
valueFormatter: function (value) {
return value + "%";
},
},
// stack: 'Total',
symbol: "circle",
//
symbolSize: 6,
//y
yAxisIndex: 1,
//
showSymbol: false,
// data: this.data4,
//线
itemStyle: {
color: "#EE5217", //线
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "#EE5217", //
},
{
offset: 1,
color: "#EE5217", //
},
],
global: false, // false
},
lineStyle: {
color: "#EE5217", //线
},
},
},
],
};
//
this.chartInstance1.setOption(this.option1, true);
},
// 线
screenAdapter() {
//,2.6 mes_ref
const titleFontSize = (this.$refs.findwater_ref.offsetWidth / 100) * 1.8;
//optionoption
const adapterOption = {
//fontSize
textStyle: {
fontSize: titleFontSize,
},
};
//.chartInstanceoptiondataoption
this.chartInstance1.setOption(adapterOption);
//resize
this.chartInstance1.resize();
},
},
};
</script>
<style scoped>
.findwatercharts {
margin-bottom: 0.35rem;
width: 100%;
height: 4.5rem;
/* background-color: pink; */
}
.analy-table >>> .el-table th.el-table__cell.is-leaf,
.analy-table >>> .el-table td.el-table__cell {
border-bottom: 1px solid #093769 !important;
border-right: 1px solid #093769 !important;
}
</style>

791
src/views/hotWater/dataAnalysis/components/analyzeYear.vue

@ -0,0 +1,791 @@
<!-- 报表查询-用能查询-年数据 -->
<template>
<div class="analy-table">
<div class="findwatercharts" ref="findwater_ref"></div>
<!-- 表格 -->
<el-table
class="maintable"
header-align="center"
:data="tableData"
style="margin-right: 0.13rem"
:cell-style="tableRowStyle"
>
<el-table-column
align="center"
prop="itemType"
label="类别"
width="160"
fixed="left"
>
</el-table-column>
<el-table-column align="center" prop="month01" label="1月">
</el-table-column>
<el-table-column align="center" prop="month02" label="2月">
</el-table-column>
<el-table-column align="center" prop="month03" label="3月">
</el-table-column>
<el-table-column align="center" prop="month04" label="4月">
</el-table-column>
<el-table-column align="center" prop="month05" label="5月">
</el-table-column>
<el-table-column align="center" prop="month06" label="6月">
</el-table-column>
<el-table-column align="center" prop="month07" label="7月">
</el-table-column>
<el-table-column align="center" prop="month08" label="8月">
</el-table-column>
<el-table-column align="center" prop="month09" label="9月">
</el-table-column>
<el-table-column align="center" prop="month10" label="10月">
</el-table-column>
<el-table-column align="center" prop="month11" label="11月">
</el-table-column>
<el-table-column align="center" prop="month12" label="12月">
</el-table-column>
<el-table-column
align="center"
prop="totalValue"
label="合计"
fixed="right"
width="100"
>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { getYear } from "@/utils/datetime";
import { queryYearDatas } from "@/api/hotWater/dataAnalysis";
import * as echarts from "echarts";
export default {
props: {
chType: {
type: Number,
},
chTime: {
type: String,
},
chBuild: {
type: String,
},
currentIndex: {
type: Number,
},
},
data() {
return {
chartInstance1: null,
option1: {
series: [],
},
//
endTime: "",
//
tableData: [],
// 线
data1: [],
data2: [],
data3: [],
data4: [],
data5: [],
//
data6: [],
// x
data8: [],
};
},
watch: {
currentIndex: {
immediate: true,
deep: true,
handler(newVal, val) {
// console.log("", newVal);
this.$nextTick(function () {
this.getYearData();
});
},
},
},
mounted() {
// this.getYearData();
this.initChart1();
window.addEventListener("resize", this.screenAdapter);
this.screenAdapter();
},
destroyed() {
//mounted
window.removeEventListener("resize", this.screenAdapter);
},
methods: {
tableRowStyle({ row, column, rowIndex, columnIndex }) {
// 1
if (columnIndex === 0 || column.label === "合计") {
return "background-color:rgb(11 ,100, 201) !important;";
}
},
//
getYearData() {
//
//
// id
// select
if (this.chTime) {
this.endTime = this.chTime;
} else {
this.endTime = getYear(0);
}
let params = {
curDate: this.endTime,
buildingId: this.chBuild,
type: this.chType,
};
console.log("年表格参数", params);
queryYearDatas(params).then((res) => {
// console.log("", res);
if (res.code == 200 && res.rows.length > 0) {
var line1 = [];
var line2 = [];
var line3 = [];
var line4 = [];
this.tableData = res.rows;
// Object.values
line1 = Object.values(this.tableData[0]).slice(3, 15);
line2 = Object.values(this.tableData[1]).slice(3, 15);
line3 = Object.values(this.tableData[2]).slice(3, 15);
line4 = Object.values(this.tableData[3]).slice(3, 15);
// 线 filter
this.data1 = line1.filter(function (s) {
return s && s.trim();
});
this.data2 = line2.filter(function (s) {
return s && s.trim();
});
//
var line5 = line3.filter(function (s) {
return s && s.trim();
});
this.data3 = [];
this.data4 = [];
// %
line5.forEach((item) => {
this.data3.push(item.split("%").join(""));
});
var line6 = line4.filter(function (s) {
return s && s.trim();
});
line6.forEach((item) => {
this.data4.push(item.split("%").join(""));
});
// 线x
// tableData[0] [1] [2] [3],
//
let newObj = {};
for (let key in this.tableData[0]) {
if (this.tableData[0][key]) {
newObj[key] = this.tableData[0][key];
}
}
// console.log("", newObj);
// key
// Object.setPrototypeOf(this.newObj);
let data7 = Object.keys(newObj);
// console.log("x", data7);
//
let allArr = [
"month01",
"month02",
"month03",
"month04",
"month05",
"month06",
"month07",
"month08",
"month09",
"month10",
"month11",
"month12",
];
//
function compare(data7, allArr) {
return data7.filter((v) => {
return allArr.includes(v);
});
}
// console.log("x", compare(data7, allArr));
// data7 xx
this.data8 = [];
compare(data7, allArr).forEach((item) => {
if (item) {
this.data8.push(item.split("month").join("") + "月");
}
});
// console.log("x", this.data8);
//
this.data6 = [];
this.data5 = this.tableData.forEach((item) => {
return this.data6.push(item.itemType);
});
// console.log("data1", this.data1);
// console.log("data2", this.data2);
// console.log("data3", this.data3);
// console.log("data4", this.data4);
// console.log("", this.data6);
//
var Min1 = Math.floor(Math.min(...this.data1, ...this.data2)),
Min2 = Math.floor(Math.min(...this.data3, ...this.data4) - 4),
Max1 = Math.ceil(Math.max(...this.data1, ...this.data2) + 4),
Max2 = Math.ceil(Math.max(...this.data3, ...this.data4) + 4);
// console.log("Min1", Min1);
// console.log("Min2", Min2);
// console.log("Max1", Max1);
// console.log("Max2", Max2);
// y+
var yAxisUnit = "";
if (this.chType === 1) {
yAxisUnit = "吨";
} else if (this.chType === 2) {
yAxisUnit = "度";
} else if (this.chType === 3) {
yAxisUnit = "度/吨";
}
this.chartInstance1 = echarts.init(this.$refs.findwater_ref);
const adapterOption = {
legend: {
data: this.data6,
},
xAxis: {
data: this.data8,
},
yAxis: [
//y
{
min: Min1,
max: Max1,
splitNumber: 10,
interval: (Max1 - Min1) / 10,
name: yAxisUnit,
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
},
{
min: Min2,
max: Max2,
splitNumber: 10,
interval: (Max2 - Min2) / 10,
name: "%",
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
},
],
series: [
{
name: this.data6[0],
data: this.data1,
},
{
name: this.data6[1],
data: this.data2,
},
{
name: this.data6[2],
data: this.data3,
},
{
name: this.data6[3],
data: this.data4,
},
],
};
//.chartInstanceoptiondataoption
this.chartInstance1.setOption(adapterOption);
//resize
this.chartInstance1.resize();
} else {
this.tableData = [];
this.chartInstance1 = echarts.init(this.$refs.findwater_ref);
const adapterOption = {
legend: {
data: [],
},
xAxis: {
data: [],
},
yAxis: [
//y
{
min: 0,
max: 0,
splitNumber: 10,
interval: 0,
},
{
min: 0,
max: 0,
splitNumber: 10,
interval: 0,
},
],
series: [
{
name: "",
data: [],
},
{
name: "",
data: [],
},
{
name: "",
data: [],
},
{
name: "",
data: [],
},
],
};
//.chartInstanceoptiondataoption
this.chartInstance1.setOption(adapterOption);
//resize
this.chartInstance1.resize();
}
});
},
//
outTable() {
// console.log("");
import("@/assets/excel/Export2Excel").then((excel) => {
const tHeader = [
"类别",
"1月",
"2月",
"3月",
"4月",
"5月",
"6月",
"7月",
"8月",
"9月",
"10月",
"11月",
"12月",
"合计",
]; // excel
const filterVal = [
"itemType",
"month01",
"month02",
"month03",
"month04",
"month05",
"month06",
"month07",
"month08",
"month09",
"month10",
"month11",
"month12",
"totalValue",
]; // excel
// const list = this.tableData;
// console.log(list)
if (this.chTime) {
this.endTime = this.chTime;
} else {
this.endTime = getYear(0);
}
let params = {
curDate: this.endTime,
buildingId: this.chBuild,
type: this.chType,
};
console.log("年表格参数", params);
queryYearDatas(params).then((res) => {
if (res.code == 200 && res.rows.length > 0) {
// console.log(res);
const data = this.formatJson(filterVal, res.rows);
const autoWidth = true;
excel.export_json_to_excel({
header: tHeader, //
data, //
filename: "年数据报表", //
autoWidth: true, //
});
}
});
});
},
//,
formatJson(filterVal, jsonData) {
return jsonData.map((v) =>
filterVal.map((j) => {
if (j === "installDate") {
return format(v[j]);
} else {
return v[j];
}
})
);
},
//chartInstance1
// x 1 2 3
// x 1 2 3
initChart1() {
this.$emit("initChart1");
this.chartInstance1 = echarts.init(this.$refs.findwater_ref);
this.option1 = {
tooltip: {
trigger: "axis",
// hover
showDelay: 0, // ms
axisPointer: {
type: "shadow",
shadowStyle: {
color: "rgba(30, 69, 113, 0.15)",
width: "1",
},
},
// tooltip
formatter: function (params) {
var res = params[0].name + "<br/>";
for (var i = 0, l = params.length; i < l; i++) {
var seriesName = params[i].seriesName;
var value = params[i].value;
// console.log("", params[i].color.colorStops[0].color)
var marker =
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' +
params[i].color.colorStops[0].color +
'"></span>';
// seriesName
if (seriesName.includes("用水量")) {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"吨" +
"</span><br>";
} else if (seriesName.includes("用电量")) {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"度" +
"</span><br>";
} else if (seriesName.includes("单耗")) {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"度/吨" +
"</span><br>";
} else {
res +=
marker +
seriesName +
":" +
'<span style="color: #000000; font-weight: bold;margin-left:5px">' +
value +
" " +
"%" +
"</span><br>";
}
}
return res;
},
},
legend: {
// icon
// icon: "cricle",
//
textStyle: {
color: "#ffff",
fontSize: 12, //
},
left: "center",
top: "5%",
//
itemGap: 5,
itemWidth: 10,
itemHeight: 5,
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
},
xAxis: {
type: "category",
//true
boundaryGap: true,
// x
axisLabel: {
// interval: 0, //x
// rotate: 30, //x30
color: "rgba(255, 255, 255, 1)",
fontSize: 14, //
},
axisTick: {
show: false, // 线
},
// x
axisLine: {
show: true,
lineStyle: {
color: "#365576",
},
},
splitLine: {
lineStyle: {
color: "#e2e6f0",
},
}, //x线
},
yAxis: [
//y
{
type: "value",
// y
axisLabel: {
color: "rgba(255, 255, 255, 1)",
},
// y
axisLine: {
show: true,
lineStyle: {
color: "#365576", // y 线
},
fontSize: 14, //
},
//y线
// splitNumber: 10,
// y线
splitLine: {
lineStyle: {
color: "#1a3d62", // 线
type: "dashed", // 线线
},
},
//y线
splitNumber: 10,
},
{
type: "value",
// y
axisLabel: {
color: "rgba(255, 255, 255, 1)",
},
// y
axisLine: {
show: true,
lineStyle: {
color: "#365576", // y 线
},
fontSize: 14, //
},
//y线
// splitNumber: 10,
// y线
splitLine: {
lineStyle: {
color: "#1a3d62", // 线
type: "dashed", // 线线
},
},
//y线
splitNumber: 10,
},
],
series: [
{
type: "bar",
barWidth: 10, //
//线
itemStyle: {
color: "#0b75d3",
// 使
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(1, 102, 251, 1)", //
},
{
offset: 1,
color: "rgba(1, 102, 251, 0)", //
},
],
global: false, // false
},
borderRadius: [5, 5, 0, 0], //
},
},
{
type: "bar",
barWidth: 10, //
//线
itemStyle: {
color: "#0b75d3",
// 使
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(0, 224, 225, 1)", //
},
{
offset: 1,
color: "rgba(0, 224, 225, 0)", //
},
],
global: false, // false
},
borderRadius: [5, 5, 0, 0],
},
},
{
type: "line",
tooltip: {
valueFormatter: function (value) {
return value + "%";
},
},
// stack: 'Total',
symbol: "circle",
//
symbolSize: 6,
yAxisIndex: 1,
//
showSymbol: false,
// data: this.data3,
//线
itemStyle: {
color: "#db9215",
// 使
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "#db9215", //
},
{
offset: 1,
color: "#db9215", //
},
],
global: false, // false
},
borderRadius: [5, 5, 0, 0], //
},
},
{
type: "line",
tooltip: {
valueFormatter: function (value) {
return value + "%";
},
},
// stack: 'Total',
symbol: "circle",
//
symbolSize: 6,
//y
yAxisIndex: 1,
//
showSymbol: false,
// data: this.data4,
//线
itemStyle: {
color: "#EE5217", //线
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "#EE5217", //
},
{
offset: 1,
color: "#EE5217", //
},
],
global: false, // false
},
lineStyle: {
color: "#EE5217", //线
},
},
},
],
};
//
this.chartInstance1.setOption(this.option1, true);
},
// 线
screenAdapter() {
//,2.6 mes_ref
const titleFontSize = (this.$refs.findwater_ref.offsetWidth / 100) * 1.8;
//optionoption
const adapterOption = {
//fontSize
textStyle: {
fontSize: titleFontSize,
},
};
//.chartInstanceoptiondataoption
this.chartInstance1.setOption(adapterOption);
//resize
this.chartInstance1.resize();
},
},
};
</script>
<style scoped>
.findwatercharts {
margin-bottom: 0.35rem;
width: 100%;
height: 4.5rem;
/* background-color: pink; */
}
.analy-table >>> .el-table th.el-table__cell.is-leaf,
.analy-table >>> .el-table td.el-table__cell {
border-bottom: 1px solid #093769 !important;
border-right: 1px solid #093769 !important;
}
</style>

321
src/views/hotWater/dataAnalysis/index.vue

@ -0,0 +1,321 @@
<template>
<div class="app-container">
<div class="right-monitor">
<div class="buildingDiv">
<div class="buildingDiv-left">
<img
class="title-bg"
src="../../../assets/images/title-bg.png"
alt=""
/>
<div class="title-word">位置{{ currentName }}</div>
</div>
</div>
<!-- 条件 -->
<div class="condition">
<div class="condition-left">
<el-select
style="margin-right: 0.1rem"
v-model="building"
placeholder="请选择楼栋"
clearable
@change="handleBuildingChange"
>
<el-option
v-for="(item, index) in builds"
:key="index"
:label="item.building_name"
:value="item.id"
/>
</el-select>
<el-select
style="margin-right: 0.1rem"
v-model="analysisType"
placeholder="请选择"
clearable
>
<el-option
v-for="(item, index) in analysisTypes"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
<div class="choice">
<div
class="mr20"
v-for="(item, index) in timeData2"
:key="index"
@click="handleEnter(index, $event)"
:class="{ timeStyle: currentIndex == index }"
>
{{ item.title }}
</div>
</div>
<el-date-picker
v-model="monthDate"
type="month"
v-if="currentIndex === 0"
placeholder="选择开始月份"
value-format="yyyy-MM"
>
</el-date-picker>
<el-date-picker
v-model="yearDate"
v-if="currentIndex === 1"
type="year"
placeholder="选择开始年份"
style="width: 180px"
value-format="yyyy"
>
</el-date-picker>
<div class="success-btn" style="margin: 0 0.12rem">
<el-button type="success" @click="findData">查询</el-button>
</div>
<div class="warning-btn">
<el-button type="warning" @click="exportData">导出</el-button>
</div>
</div>
</div>
<analyze-month
v-if="currentIndex === 0"
ref="monthRef"
:currentIndex="currentIndex"
:chType="analysisType"
:chTime="monthDate"
:chBuild="building"
></analyze-month>
<analyze-year
v-if="currentIndex === 1"
:currentIndex="currentIndex"
ref="yearRef"
:chType="analysisType"
:chTime="yearDate"
:chBuild="building"
></analyze-year>
</div>
</div>
</template>
<script>
import { hotBuildList } from "@/api/hotWater/energyAnalysis";
import analyzeMonth from "./components/analyzeMonth.vue";
import analyzeYear from "./components/analyzeYear.vue";
export default {
components: { analyzeMonth, analyzeYear },
data() {
return {
loading: false,
currentName: "",
building: "", //
builds: [], //
analysisType: 1,
analysisTypes: [
{
label: "用水量",
value: 1,
},
{
label: "用电量",
value: 2,
},
{
label: "耗能",
value: 3,
},
],
monthDate: "",
yearDate: "",
timeData2: [{ title: "月" }, { title: "年" }],
currentIndex: null, //
};
},
mounted() {
this.getBuildList();
},
methods: {
handleEnter(index) {
this.currentIndex = index;
// this.renderingBroken();
console.log("切换日月");
},
handleBuildingChange(selectedId) {
//
const selectedItem = this.builds.find((item) => item.id === selectedId);
if (selectedItem) {
this.currentName = selectedItem.building_name;
console.log("选中的楼栋 ID:", selectedId);
console.log("选中的楼栋名称:", this.currentName);
//
}
},
/** 查询楼栋 */
getBuildList() {
let data = {
systemType: "1",
};
hotBuildList(data).then((res) => {
if (res.code == 200) {
//
console.log("楼栋返回值", res);
// building_name ""
const filteredRows = res.rows.filter((row, index) => {
if (index === 0 && row.building_name === "所有") {
return false;
}
return true;
});
this.builds = filteredRows;
// console.log("", this.builds);
if (this.builds.length > 0) {
this.building = this.builds[0].id;
this.currentName = this.builds[0].building_name;
console.log("选中的第一个楼栋id-传给子组件", this.building);
this.handleEnter(0); //
}
}
});
},
//
findData() {
if (this.currentIndex == 0) {
//
this.$refs.monthRef.getMothData();
} else {
//
this.$refs.yearRef.getYearData();
}
},
//
exportData() {
if (this.currentIndex == 0) {
//
this.$refs.monthRef.outTable();
} else {
//
this.$refs.yearRef.outTable();
}
},
},
};
</script>
<style lang="scss" scoped>
.condition {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
margin-bottom: 0.24rem;
.condition-left {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
}
}
.app-container {
display: flex;
flex-direction: row;
justify-content: space-between;
flex-wrap: nowrap;
align-items: stretch;
height: 100%;
.left-tree {
width: 256px;
padding: 15px 10px 10px 10px;
border: 1px solid #004b8c;
}
.right-monitor {
width: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
.buildingDiv {
padding-left: 54px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
position: relative;
.title-bg {
width: 208px;
height: 38px;
position: absolute;
left: 0;
z-index: 0;
}
.title-word {
z-index: 10;
font-family: YouSheBiaoTiHei;
font-size: 24px;
color: #ffffff;
white-space: nowrap;
}
}
}
}
.choice {
margin-left: 0px;
.mr20 {
padding: 0.05rem 0.3rem;
white-space: nowrap;
width: auto;
}
}
.charts {
width: 870px;
height: 300px;
}
.tree-container {
height: 330px; /* 设置固定高度 */
overflow-y: auto; /* 启用垂直滚动条 */
}
//
:-webkit-scrollbar {
width: 10px; /* 滚动条宽度 */
}
::-webkit-scrollbar-track {
background: transparent !important; /* 滚动条轨道背景色 */
}
.custom-tree-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
padding-right: 8px;
.tree-left {
.custom-tree-icon {
margin-right: 5px;
}
}
}
@media (min-width: 1200px) and (max-width: 1540px) {
.tem-li {
width: calc(49% - 20px) !important;
}
}
@media (max-width: 1200px) {
.tem-li {
width: calc(100% - 40px) !important;
}
}
</style>
<style scoped>
/* 自定义高亮颜色 */
.left-tree
>>> .el-tree--highlight-current
.el-tree-node.is-current
> .el-tree-node__content {
background-color: #285b9e !important;
/* color: #f56c6c; */
color: #25f1f8;
}
</style>

1057
src/views/hotWater/energyAnalysis/components/energyReport.vue

File diff suppressed because it is too large Load Diff

756
src/views/hotWater/energyAnalysis/components/temReport.vue

@ -0,0 +1,756 @@
<template>
<div class="big-machine" v-loading="listLoading">
<div class="condition">
<div class="condition-left">
<el-select
style="margin-right: 0.1rem"
v-model="building"
placeholder="请选择楼栋"
clearable
>
<el-option
v-for="(item, index) in builds"
:key="index"
:label="item.building_name"
:value="item.id"
/>
</el-select>
<el-date-picker
v-model="dayDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
>
</el-date-picker>
<div class="success-btn" style="margin: 0 0.12rem">
<el-button type="success" @click="findData">查询</el-button>
</div>
<div class="warning-btn">
<el-button type="warning" @click="goExport">导出</el-button>
</div>
</div>
</div>
<div class="charts" ref="chart_ref"></div>
<el-table
:data="tableData"
@row-click="handlerow"
highlight-current-row
height="400"
ref="maintable"
:cell-style="tableRowStyle"
>
<el-table-column v-if="showBuild" prop="buildingName" label="楼栋名称">
</el-table-column>
<el-table-column v-if="!showBuild" prop="deviceName" label="热泵名称">
</el-table-column>
<el-table-column label="0点" align="center" prop="temp00" />
<el-table-column label="1点" align="center" prop="temp01" />
<el-table-column label="2点" align="center" prop="temp02" />
<el-table-column label="3点" align="center" prop="temp03" />
<el-table-column label="4点" align="center" prop="temp04" />
<el-table-column label="5点" align="center" prop="temp05" />
<el-table-column label="6点" align="center" prop="temp06" />
<el-table-column label="7点" align="center" prop="temp07" />
<el-table-column label="8点" align="center" prop="temp08" />
<el-table-column label="9点" align="center" prop="temp09" />
<el-table-column label="10点" align="center" prop="temp10" />
<el-table-column label="11点" align="center" prop="temp11" />
<el-table-column label="12点" align="center" prop="temp12" />
<el-table-column label="13点" align="center" prop="temp13" />
<el-table-column label="14点" align="center" prop="temp14" />
<el-table-column label="15点" align="center" prop="temp15" />
<el-table-column label="16点" align="center" prop="temp16" />
<el-table-column label="17点" align="center" prop="temp17" />
<el-table-column label="18点" align="center" prop="temp18" />
<el-table-column label="19点" align="center" prop="temp19" />
<el-table-column label="20点" align="center" prop="temp20" />
<el-table-column label="21点" align="center" prop="temp21" />
<el-table-column label="22点" align="center" prop="temp22" />
<el-table-column label="23点" align="center" prop="temp23" />
</el-table>
</div>
</template>
<script>
import { formatDay } from "@/utils/datetime";
import { hotBuildList, hotWaterTemp } from "@/api/hotWater/energyAnalysis";
import * as echarts from "echarts";
export default {
data() {
return {
showBuild: true, //
listLoading: false,
dayDate: [], //
dialogVisible: false,
building: "", //
builds: [], //
//
loading: false,
//
total: 0,
//
tableData: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
startTime: "",
endTime: "",
},
brokenInstanc: null,
brokenOption: {},
brokenData1: [],
brokenTime: [],
};
},
//
watch: {
//
tableData: function () {
this.$nextTick(function () {
this.$refs.maintable.setCurrentRow(this.tableData[0]);
});
},
},
created() {
//
},
mounted() {
this.initializeTimeDate();
this.getBuildList();
this.getList();
this.initChart();
window.addEventListener("resize", this.screenAdapter);
this.screenAdapter();
},
destroyed() {
//
window.removeEventListener("resize", this.screenAdapter);
},
methods: {
/** 查询楼栋 */
getBuildList() {
let data = {
systemType: "1",
};
hotBuildList(data).then((res) => {
if (res.code == 200) {
//
console.log("楼栋返回值", res);
this.builds = res.rows;
// console.log("", this.builds);
this.building = res.rows[0].id;
this.getList();
}
});
},
//
initializeTimeDate() {
this.dayDate = formatDay(new Date()); //
},
//
findData() {
this.getList();
},
/* 加入小手状态 */
tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (row) {
return "cursor:pointer;text-align:center";
}
},
//
getList() {
if (this.building == "所有") {
this.showBuild = true;
} else {
this.showBuild = false;
}
let data = {
buildingId: this.building,
curDate: this.dayDate,
};
console.log("查询数据参数", data);
this.listLoading = true;
//
hotWaterTemp(data).then((res) => {
if (res.code == 200 && res.rows.length > 0) {
this.tableData = res.rows;
// this.firstRow();
this.handlerow(this.tableData[0]);
} else {
this.tableData = [];
}
});
// Just to simulate the time of the request
setTimeout(() => {
this.listLoading = false;
}, 1.0 * 1000);
},
//
handlerow(row, event, column) {
console.log("点击的行数据----", row);
if (row) {
const obj = Object.assign({}, row);
//
delete obj.buildingId;
delete obj.curDate;
delete obj.deviceNum;
delete obj.deviceName;
delete obj.buildingName;
//
let newObj = {};
for (let key in obj) {
if (obj[key]) {
newObj[key] = obj[key];
}
}
// console.log("x", data7);
const keysArr = Object.keys(newObj); //
this.brokenTime = [];
keysArr.forEach((item) => {
if (item) {
this.brokenTime.push(item.split("temp").join("") + ":00");
}
});
const valuesArr = keysArr.map((key) => newObj[key]); //
// console.log("", valuesArr);
// console.log("", this.brokenTime);
this.brokenData1 = valuesArr;
} else {
this.brokenTime = [];
this.brokenData1 = [];
}
this.renderingBroken();
},
//
renderingBroken() {
this.brokenOption.yAxis.name = "℃";
this.brokenOption.yAxis.nameTextStyle = {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
};
this.brokenOption.series[0].data = this.brokenData1;
this.brokenOption.series[0].itemStyle.color = "#1f8dee";
this.brokenOption.series[0].areaStyle.color.colorStops = [
{
offset: 0,
color: "rgba(31, 141, 238, 0.3)", // 0%
},
{
offset: 0.8,
color: "rgba(31, 141, 238,0)", // 100%
},
];
// tooltip
this.brokenOption.tooltip = {
trigger: "axis",
formatter: function (params) {
//
const data = params[0];
const month = data.name;
const value = data.value;
return `${month}<br/>温度: ${value}`;
},
};
this.brokenOption.xAxis.data = this.brokenTime;
this.brokenInstanc.setOption(this.brokenOption);
},
//
goExport() {
if (this.tableData) {
import("@/assets/excel/Export2Excel").then((excel) => {
//
if (this.showBuild) {
var tHeader = [
"楼栋名称",
"0点",
"1点",
"2点",
"3点",
"4点",
"5点",
"6点",
"7点",
"8点",
"9点",
"10点",
"11点",
"12点",
"13点",
"14点",
"15点",
"16点",
"17点",
"18点",
"19点",
"20点",
"21点",
"22点",
"23点",
]; // excel
var filterVal = [
"buildingName",
"temp00",
"temp01",
"temp02",
"temp03",
"temp04",
"temp05",
"temp06",
"temp07",
"temp08",
"temp09",
"temp10",
"temp11",
"temp12",
"temp13",
"temp14",
"temp15",
"temp16",
"temp17",
"temp18",
"temp19",
"temp20",
"temp21",
"temp22",
"temp23",
]; // excel
} else {
var tHeader = [
"热泵名称",
"0点",
"1点",
"2点",
"3点",
"4点",
"5点",
"6点",
"7点",
"8点",
"9点",
"10点",
"11点",
"12点",
"13点",
"14点",
"15点",
"16点",
"17点",
"18点",
"19点",
"20点",
"21点",
"22点",
"23点",
]; // excel
var filterVal = [
"deviceName",
"temp00",
"temp01",
"temp02",
"temp03",
"temp04",
"temp05",
"temp06",
"temp07",
"temp08",
"temp09",
"temp10",
"temp11",
"temp12",
"temp13",
"temp14",
"temp15",
"temp16",
"temp17",
"temp18",
"temp19",
"temp20",
"temp21",
"temp22",
"temp23",
]; // excel
}
const data = this.formatJson(filterVal, this.tableData);
const autoWidth = true;
excel.export_json_to_excel({
header: tHeader, //
data, //
filename: "温度变化报表", //
autoWidth: true, //
});
});
this.$message({
type: "success",
message: "导出成功!",
});
} else {
this.$message.error("导出失败!");
}
},
//,
formatJson(filterVal, jsonData) {
return jsonData.map((v) =>
filterVal.map((j) => {
if (j === "installDate") {
return format(v[j]);
} else {
return v[j];
}
})
);
},
// 线+ + 线
screenAdapter() {
//,2.6 mes_ref
const titleFontSize = this.$refs.chart_ref.offsetWidth / 130;
//optionoption
const adapterOption = {};
//.chartInstanceoptiondataoption
this.brokenInstanc.setOption(adapterOption);
//resize
this.brokenInstanc.resize();
},
//chartInstance
initChart() {
this.brokenInstanc = echarts.init(this.$refs.chart_ref);
this.brokenOption = {
tooltip: {
trigger: "axis",
},
legend: {
show: false,
selectedMode: false, //
icon: "cricle", //
//
textStyle: {
color: "#ffff",
fontSize: 16, //
},
// left: "73%",
left: "66%",
top: "0",
//
itemGap: 5,
itemWidth: 10,
itemHeight: 5,
},
grid: {
top: "10%",
left: "3%",
right: "4%",
bottom: "5%",
containLabel: true,
},
xAxis: {
type: "category",
//true
boundaryGap: true,
// x
axisLabel: {
// interval: 0, //x
// rotate: 30, //x30
color: "rgba(255, 255, 255, 1)",
fontSize: 14, //
},
axisTick: {
show: false, // 线
},
// x
axisLine: {
show: true,
lineStyle: {
color: "#365576",
},
},
splitLine: {
lineStyle: {
color: "#e2e6f0",
},
}, //x线
data: this.brokenTime,
},
yAxis: {
min: 0,
// max:20,
// // // min:'dataMin',
// // // max:'dataMax',
// name: "kwh", // y
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
miniInterval: 5,
type: "value",
// y
axisLabel: {
color: "rgba(255, 255, 255, 1)",
},
// y
axisLine: {
show: true,
lineStyle: {
color: "#365576", // y 线
},
fontSize: 14, //
},
//y线
// splitNumber: 10,
// y线
splitLine: {
lineStyle: {
color: "#1a3d62", // 线
type: "dashed", // 线线
},
},
},
series: [
{
type: "line",
//
symbolSize: 8,
smooth: true,
showSymbol: false,
data: this.brokenData1,
//线
itemStyle: {
color: "#d48e17", //线
lineStyle: {
color: "#d48e17", //线
},
},
areaStyle: {
color: {
//线
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [],
},
},
},
],
};
//
this.brokenInstanc.setOption(this.brokenOption, true);
},
},
};
</script>
<style lang="scss" scoped>
.condition {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
margin-bottom: 0.24rem;
.condition-left {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
.years-div {
display: flex;
flex-direction: row;
align-items: center;
.years-word {
font-size: 14px;
margin: 0 5px;
color: #388ff3;
}
}
.time-label {
font-size: 16px;
line-height: 7px;
margin-right: 12px;
white-space: nowrap;
}
}
}
.data-content {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
width: 100%;
margin-top: 23px;
.data-li {
background-color: transparent;
border-radius: 8px;
display: flex;
flex-direction: row;
align-items: center;
padding: 0.3rem;
width: 31%;
justify-content: space-between;
margin-bottom: 0.24rem;
font-family: SourceHanSansCN-Regular;
font-size: 0.16rem;
position: relative;
overflow: hidden;
.use-icon {
width: 0.6rem;
height: 0.6rem;
}
.use-text {
width: 33%;
display: flex;
flex-direction: column;
align-items: flex-start;
color: #dbdbdb;
.data-text {
z-index: 11 !important;
font-family: DIN-Bold;
font-size: 0.24rem;
margin-top: 0.05rem;
color: #ffffff;
}
.downText {
color: #ff4027;
z-index: 11 !important;
font-family: DIN-Bold;
font-size: 0.24rem;
margin-top: 0.05rem;
.el-icon-bottom {
margin-right: 0.08rem;
}
}
.upText {
color: #2ff016;
z-index: 11 !important;
font-family: DIN-Bold;
font-size: 0.24rem;
margin-top: 0.05rem;
.el-icon-bottom,
.el-icon-top {
margin-right: 0.08rem;
}
}
}
}
.type-img {
position: absolute;
bottom: 0;
width: 3.17rem;
height: 0.52rem;
z-index: 10;
}
.type1 {
border: 1px solid #e8aa13;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(26, 56, 65, 0.5), rgba(184, 196, 51, 0.5));
}
.type1::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(243, 166, 23, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
.type2 {
border: 1px solid #27a0f2;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(2, 43, 88, 0.5), rgba(8, 96, 179, 0.5));
}
.type2::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(28, 128, 241, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
.type3 {
border: 1px solid #1ad3ef;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(2, 50, 89, 0.5), rgba(17, 145, 151, 0.5));
}
.type3::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(117, 242, 248, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
.type4 {
border: 1px solid #11d47b;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(2, 57, 82, 0.5), rgba(5, 91, 90, 0.5));
}
.type4::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(115, 245, 176, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
}
.choice {
margin: 20px;
.mr20 {
padding: 0.05rem 0.2rem;
white-space: nowrap;
width: auto;
}
}
.charts {
width: 100%;
height: 300px;
margin-bottom: 0.1rem;
}
// 2000px
@media (min-width: 2000px) {
.condition {
.condition-left {
.years-div {
.years-word {
font-size: 0.14rem !important;
margin: 0 0.05rem !important;
}
}
.time-label {
font-size: 0.16rem !important;
line-height: 0.07rem !important;
margin-right: 0.12rem !important;
}
}
}
}
</style>

756
src/views/hotWater/energyAnalysis/components/waterReport.vue

@ -0,0 +1,756 @@
<template>
<div class="big-machine" v-loading="listLoading">
<div class="condition">
<div class="condition-left">
<el-select
style="margin-right: 0.1rem"
v-model="building"
placeholder="请选择楼栋"
clearable
>
<el-option
v-for="(item, index) in builds"
:key="index"
:label="item.building_name"
:value="item.id"
/>
</el-select>
<el-date-picker
v-model="dayDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
>
</el-date-picker>
<div class="success-btn" style="margin: 0 0.12rem">
<el-button type="success" @click="findData">查询</el-button>
</div>
<div class="warning-btn">
<el-button type="warning" @click="goExport">导出</el-button>
</div>
</div>
</div>
<div class="charts" ref="chart_ref"></div>
<el-table
:data="tableData"
@row-click="handlerow"
highlight-current-row
height="400"
ref="maintable"
:cell-style="tableRowStyle"
>
<el-table-column prop="buildingName" label="楼栋名称"> </el-table-column>
<el-table-column v-if="showDeviceName" prop="deviceName" label="设备名称">
</el-table-column>
<el-table-column label="0点" align="center" prop="temp00" />
<el-table-column label="1点" align="center" prop="temp01" />
<el-table-column label="2点" align="center" prop="temp02" />
<el-table-column label="3点" align="center" prop="temp03" />
<el-table-column label="4点" align="center" prop="temp04" />
<el-table-column label="5点" align="center" prop="temp05" />
<el-table-column label="6点" align="center" prop="temp06" />
<el-table-column label="7点" align="center" prop="temp07" />
<el-table-column label="8点" align="center" prop="temp08" />
<el-table-column label="9点" align="center" prop="temp09" />
<el-table-column label="10点" align="center" prop="temp10" />
<el-table-column label="11点" align="center" prop="temp11" />
<el-table-column label="12点" align="center" prop="temp12" />
<el-table-column label="13点" align="center" prop="temp13" />
<el-table-column label="14点" align="center" prop="temp14" />
<el-table-column label="15点" align="center" prop="temp15" />
<el-table-column label="16点" align="center" prop="temp16" />
<el-table-column label="17点" align="center" prop="temp17" />
<el-table-column label="18点" align="center" prop="temp18" />
<el-table-column label="19点" align="center" prop="temp19" />
<el-table-column label="20点" align="center" prop="temp20" />
<el-table-column label="21点" align="center" prop="temp21" />
<el-table-column label="22点" align="center" prop="temp22" />
<el-table-column label="23点" align="center" prop="temp23" />
</el-table>
</div>
</template>
<script>
import { formatDay } from "@/utils/datetime";
import { hotBuildList, hotWaterLevel } from "@/api/hotWater/energyAnalysis";
import * as echarts from "echarts";
export default {
data() {
return {
showDeviceName: false, //
listLoading: false,
dayDate: [], //
dialogVisible: false,
building: "", //
builds: [], //
//
loading: false,
//
total: 0,
//
tableData: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
startTime: "",
endTime: "",
},
brokenInstanc: null,
brokenOption: {},
brokenData1: [],
brokenTime: [],
};
},
//
watch: {
//
tableData: function () {
this.$nextTick(function () {
this.$refs.maintable.setCurrentRow(this.tableData[0]);
});
},
},
created() {
//
},
mounted() {
this.initializeTimeDate();
this.getBuildList();
this.getList();
this.initChart();
window.addEventListener("resize", this.screenAdapter);
this.screenAdapter();
},
destroyed() {
//
window.removeEventListener("resize", this.screenAdapter);
},
methods: {
/** 查询楼栋 */
getBuildList() {
let data = {
systemType: "1",
};
hotBuildList(data).then((res) => {
if (res.code == 200) {
//
console.log("楼栋返回值", res);
this.builds = res.rows;
// console.log("", this.builds);
this.building = res.rows[0].id;
this.getList();
}
});
},
//
initializeTimeDate() {
this.dayDate = formatDay(new Date()); //
},
//
findData() {
this.getList();
},
/* 加入小手状态 */
tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (row) {
return "cursor:pointer;text-align:center";
}
},
//
getList() {
if (this.building == "所有") {
this.showDeviceName = false;
} else {
this.showDeviceName = true;
}
let data = {
buildingId: this.building,
curDate: this.dayDate,
};
console.log("查询数据参数", data);
this.listLoading = true;
//
hotWaterLevel(data).then((res) => {
if (res.code == 200 && res.rows.length > 0) {
this.tableData = res.rows;
// this.firstRow();
this.handlerow(this.tableData[0]);
} else {
this.tableData = [];
}
});
// Just to simulate the time of the request
setTimeout(() => {
this.listLoading = false;
}, 1.0 * 1000);
},
//
handlerow(row, event, column) {
console.log("点击的行数据----", row);
if (row) {
const obj = Object.assign({}, row);
//
delete obj.buildingId;
delete obj.curDate;
delete obj.deviceNum;
delete obj.deviceName;
delete obj.buildingName;
//
let newObj = {};
for (let key in obj) {
if (obj[key]) {
newObj[key] = obj[key];
}
}
// console.log("x", data7);
const keysArr = Object.keys(newObj); //
this.brokenTime = [];
keysArr.forEach((item) => {
if (item) {
this.brokenTime.push(item.split("temp").join("") + ":00");
}
});
const valuesArr = keysArr.map((key) => newObj[key]); //
// console.log("", valuesArr);
// console.log("", this.brokenTime);
this.brokenData1 = valuesArr;
} else {
this.brokenTime = [];
this.brokenData1 = [];
}
this.renderingBroken();
},
//
renderingBroken() {
this.brokenOption.yAxis.name = "%";
this.brokenOption.yAxis.nameTextStyle = {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
};
this.brokenOption.series[0].data = this.brokenData1;
this.brokenOption.series[0].itemStyle.color = "#1f8dee";
this.brokenOption.series[0].areaStyle.color.colorStops = [
{
offset: 0,
color: "rgba(31, 141, 238, 0.3)", // 0%
},
{
offset: 0.8,
color: "rgba(31, 141, 238,0)", // 100%
},
];
// tooltip
this.brokenOption.tooltip = {
trigger: "axis",
formatter: function (params) {
//
const data = params[0];
const month = data.name;
const value = data.value;
return `${month}<br/>水位: ${value} %`;
},
};
this.brokenOption.xAxis.data = this.brokenTime;
this.brokenInstanc.setOption(this.brokenOption);
},
//
goExport() {
if (this.tableData) {
import("@/assets/excel/Export2Excel").then((excel) => {
if (this.showDeviceName) {
var tHeader = [
"楼栋名称",
"设备名称",
"0点",
"1点",
"2点",
"3点",
"4点",
"5点",
"6点",
"7点",
"8点",
"9点",
"10点",
"11点",
"12点",
"13点",
"14点",
"15点",
"16点",
"17点",
"18点",
"19点",
"20点",
"21点",
"22点",
"23点",
]; // excel
var filterVal = [
"buildingName",
"deviceName",
"temp00",
"temp01",
"temp02",
"temp03",
"temp04",
"temp05",
"temp06",
"temp07",
"temp08",
"temp09",
"temp10",
"temp11",
"temp12",
"temp13",
"temp14",
"temp15",
"temp16",
"temp17",
"temp18",
"temp19",
"temp20",
"temp21",
"temp22",
"temp23",
]; // excel
} else {
var tHeader = [
"楼栋名称",
"0点",
"1点",
"2点",
"3点",
"4点",
"5点",
"6点",
"7点",
"8点",
"9点",
"10点",
"11点",
"12点",
"13点",
"14点",
"15点",
"16点",
"17点",
"18点",
"19点",
"20点",
"21点",
"22点",
"23点",
]; // excel
var filterVal = [
"buildingName",
"temp00",
"temp01",
"temp02",
"temp03",
"temp04",
"temp05",
"temp06",
"temp07",
"temp08",
"temp09",
"temp10",
"temp11",
"temp12",
"temp13",
"temp14",
"temp15",
"temp16",
"temp17",
"temp18",
"temp19",
"temp20",
"temp21",
"temp22",
"temp23",
]; // excel
}
const data = this.formatJson(filterVal, this.tableData);
const autoWidth = true;
excel.export_json_to_excel({
header: tHeader, //
data, //
filename: "水位变化报表", //
autoWidth: true, //
});
});
this.$message({
type: "success",
message: "导出成功!",
});
} else {
this.$message.error("导出失败!");
}
},
//,
formatJson(filterVal, jsonData) {
return jsonData.map((v) =>
filterVal.map((j) => {
if (j === "installDate") {
return format(v[j]);
} else {
return v[j];
}
})
);
},
// 线+ + 线
screenAdapter() {
//,2.6 mes_ref
const titleFontSize = this.$refs.chart_ref.offsetWidth / 130;
//optionoption
const adapterOption = {};
//.chartInstanceoptiondataoption
this.brokenInstanc.setOption(adapterOption);
//resize
this.brokenInstanc.resize();
},
//chartInstance
initChart() {
this.brokenInstanc = echarts.init(this.$refs.chart_ref);
this.brokenOption = {
tooltip: {
trigger: "axis",
},
legend: {
show: false,
selectedMode: false, //
icon: "cricle", //
//
textStyle: {
color: "#ffff",
fontSize: 16, //
},
// left: "73%",
left: "66%",
top: "0",
//
itemGap: 5,
itemWidth: 10,
itemHeight: 5,
},
grid: {
top: "10%",
left: "3%",
right: "4%",
bottom: "5%",
containLabel: true,
},
xAxis: {
type: "category",
//true
boundaryGap: true,
// x
axisLabel: {
// interval: 0, //x
// rotate: 30, //x30
color: "rgba(255, 255, 255, 1)",
fontSize: 14, //
},
axisTick: {
show: false, // 线
},
// x
axisLine: {
show: true,
lineStyle: {
color: "#365576",
},
},
splitLine: {
lineStyle: {
color: "#e2e6f0",
},
}, //x线
data: this.brokenTime,
},
yAxis: {
min: 0,
// max:20,
// // // min:'dataMin',
// // // max:'dataMax',
// name: "kwh", // y
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
miniInterval: 5,
type: "value",
// y
axisLabel: {
color: "rgba(255, 255, 255, 1)",
},
// y
axisLine: {
show: true,
lineStyle: {
color: "#365576", // y 线
},
fontSize: 14, //
},
//y线
// splitNumber: 10,
// y线
splitLine: {
lineStyle: {
color: "#1a3d62", // 线
type: "dashed", // 线线
},
},
},
series: [
{
type: "line",
//
symbolSize: 8,
smooth: true,
showSymbol: false,
data: this.brokenData1,
//线
itemStyle: {
color: "#d48e17", //线
lineStyle: {
color: "#d48e17", //线
},
},
areaStyle: {
color: {
//线
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [],
},
},
},
],
};
//
this.brokenInstanc.setOption(this.brokenOption, true);
},
},
};
</script>
<style lang="scss" scoped>
.condition {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
margin-bottom: 0.24rem;
.condition-left {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
.years-div {
display: flex;
flex-direction: row;
align-items: center;
.years-word {
font-size: 14px;
margin: 0 5px;
color: #388ff3;
}
}
.time-label {
font-size: 16px;
line-height: 7px;
margin-right: 12px;
white-space: nowrap;
}
}
}
.data-content {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
width: 100%;
margin-top: 23px;
.data-li {
background-color: transparent;
border-radius: 8px;
display: flex;
flex-direction: row;
align-items: center;
padding: 0.3rem;
width: 31%;
justify-content: space-between;
margin-bottom: 0.24rem;
font-family: SourceHanSansCN-Regular;
font-size: 0.16rem;
position: relative;
overflow: hidden;
.use-icon {
width: 0.6rem;
height: 0.6rem;
}
.use-text {
width: 33%;
display: flex;
flex-direction: column;
align-items: flex-start;
color: #dbdbdb;
.data-text {
z-index: 11 !important;
font-family: DIN-Bold;
font-size: 0.24rem;
margin-top: 0.05rem;
color: #ffffff;
}
.downText {
color: #ff4027;
z-index: 11 !important;
font-family: DIN-Bold;
font-size: 0.24rem;
margin-top: 0.05rem;
.el-icon-bottom {
margin-right: 0.08rem;
}
}
.upText {
color: #2ff016;
z-index: 11 !important;
font-family: DIN-Bold;
font-size: 0.24rem;
margin-top: 0.05rem;
.el-icon-bottom,
.el-icon-top {
margin-right: 0.08rem;
}
}
}
}
.type-img {
position: absolute;
bottom: 0;
width: 3.17rem;
height: 0.52rem;
z-index: 10;
}
.type1 {
border: 1px solid #e8aa13;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(26, 56, 65, 0.5), rgba(184, 196, 51, 0.5));
}
.type1::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(243, 166, 23, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
.type2 {
border: 1px solid #27a0f2;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(2, 43, 88, 0.5), rgba(8, 96, 179, 0.5));
}
.type2::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(28, 128, 241, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
.type3 {
border: 1px solid #1ad3ef;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(2, 50, 89, 0.5), rgba(17, 145, 151, 0.5));
}
.type3::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(117, 242, 248, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
.type4 {
border: 1px solid #11d47b;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(2, 57, 82, 0.5), rgba(5, 91, 90, 0.5));
}
.type4::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(115, 245, 176, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
}
.choice {
margin: 20px;
.mr20 {
padding: 0.05rem 0.2rem;
white-space: nowrap;
width: auto;
}
}
.charts {
width: 100%;
height: 300px;
margin-bottom: 0.1rem;
}
// 2000px
@media (min-width: 2000px) {
.condition {
.condition-left {
.years-div {
.years-word {
font-size: 0.14rem !important;
margin: 0 0.05rem !important;
}
}
.time-label {
font-size: 0.16rem !important;
line-height: 0.07rem !important;
margin-right: 0.12rem !important;
}
}
}
}
</style>

94
src/views/hotWater/energyAnalysis/index.vue

@ -0,0 +1,94 @@
<template>
<div class="paramsDetails">
<div class="details-content">
<div class="details-header">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="能耗报表" name="first">
<energy-report v-if="activeName === 'first'"></energy-report>
</el-tab-pane>
<el-tab-pane label="温度变化表" name="second">
<tem-report v-if="activeName === 'second'"></tem-report>
</el-tab-pane>
<el-tab-pane label="水位变化表" name="three">
<water-report v-if="activeName === 'three'"></water-report>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</template>
<script>
import EnergyReport from "./components/energyReport.vue";
import TemReport from "./components/temReport.vue";
import WaterReport from "./components/waterReport.vue";
export default {
components: { EnergyReport, TemReport, WaterReport },
data() {
return {
activeName: "first", //
};
},
methods: {
handleClick(tab, event) {
console.log(tab, event);
},
//switch-tab
// activeName'second'tabtab
switchToEquitesMess() {
this.activeName = "second";
},
switchToPatrolTem() {
// this.activeName = 'fourth';
},
//
},
};
</script>
<style lang="scss" scoped>
.paramsDetails {
display: flex;
flex-direction: row;
align-items: stretch;
justify-content: space-between;
.details-content {
width: 100%;
// height: 0.42rem;
position: relative;
}
}
</style>
<style scoped>
.none-div {
padding-top: 0.31rem;
}
.none-div >>> .el-tree {
background: transparent;
color: #789d9f;
}
.none-div >>> .el-tree-node:focus > .el-tree-node__content {
background-color: #00be97;
color: #fff;
}
.none-div >>> .el-tree-node__content:hover,
.none-div >>> .el-upload-list__item:hover {
background-color: #00be97;
color: #fff;
}
.none-div >>> .el-tree-node__content {
height: 0.48rem;
justify-content: center;
}
.none-div >>> .el-tree-node__expand-icon.is-leaf {
display: none !important;
}
</style>

483
src/views/hotWater/energyQuery/components/electReading.vue

@ -0,0 +1,483 @@
<template>
<div class="big-machine" v-loading="listLoading">
<div class="condition">
<div class="condition-left">
<el-select
style="margin-right: 0.1rem"
v-model="building"
placeholder="请选择楼栋"
clearable
>
<el-option
v-for="(item, index) in builds"
:key="index"
:label="item.building_name"
:value="item.id"
/>
</el-select>
<el-date-picker
v-model="dayDate"
type="daterange"
range-separator="至"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="dateChange"
>
</el-date-picker>
<div class="success-btn" style="margin: 0 0.12rem">
<el-button type="success" @click="findData">查询</el-button>
</div>
<div class="warning-btn">
<el-button type="warning" @click="exportData">导出</el-button>
</div>
</div>
</div>
<el-table
:data="postList"
stripe
:cell-style="tableRowStyle"
highlight-current-row
height="500"
>
<el-table-column
type="index"
:index="indexAdd"
prop="number"
label="序号"
width="90"
></el-table-column>
<el-table-column label="所属楼栋" align="center" prop="buildingName" />
<el-table-column label="设备编号" align="center" prop="deviceNum" />
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="抄表时间" align="center" prop="curTime" />
<el-table-column label="采集读数" align="center" prop="curValue" />
<el-table-column label="用量(度)" align="center" prop="usedValue" />
<el-table-column label="倍率" align="center" prop="ratio" />
<el-table-column label="计算量(度)" align="center" prop="calcValue" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { formatDay } from "@/utils/datetime";
import { hotBuildList } from "@/api/hotWater/energyAnalysis";
import { queryDeviceDatas } from "@/api/hotWater/energyQuery";
export default {
data() {
return {
listLoading: false,
dayDate: [], //
dialogVisible: false,
building: "", //
builds: [], //
//
loading: false,
//
total: 0,
//
postList: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
startTime: "",
endTime: "",
},
};
},
created() {
//
},
mounted() {
this.initializeTimeDate();
this.getBuildList();
this.getList();
},
methods: {
//
dateChange() {
// console.log("", this.timeform.time1);
if (!this.dayDate) {
this.$nextTick(() => {
this.dayDate = [];
});
}
},
/** 查询楼栋 */
getBuildList() {
let data = {
systemType: "1",
};
hotBuildList(data).then((res) => {
if (res.code == 200) {
//
console.log("楼栋返回值", res);
this.builds = res.rows;
// console.log("", this.builds);
this.building = res.rows[0].id;
this.getList();
}
});
},
//
initializeTimeDate() {
let date = new Date(); //
//,
let year = date.getFullYear().toString();
//01
//使10'0'
let month =
date.getMonth() + 1 < 10
? "0" + (date.getMonth() + 1).toString()
: (date.getMonth() + 1).toString();
//10'0'
let day =
date.getDate() < 10
? "0" + date.getDate().toString()
: date.getDate().toString();
//
let start1 = year + "-" + month + "-01"; //
let end1 = year + "-" + month + "-" + day; //
this.dayDate = [start1, end1]; //
},
//
findData() {
this.queryParams.pageNum = 1;
this.getList();
},
//
indexAdd(index) {
return (
index + 1 + (this.queryParams.pageNum - 1) * this.queryParams.pageSize
);
},
//
getList() {
if (this.dayDate.length == 0) {
this.initializeTimeDate();
}
let data = {
pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize,
startDate: this.dayDate[0],
endDate: this.dayDate[1],
buildingId: this.building,
deviceType: "16",
};
console.log("查询数据参数", data);
this.listLoading = true;
queryDeviceDatas(data).then((res) => {
console.log("返回", res);
if (res.code == 200) {
this.postList = res.rows;
this.total = res.total;
} else {
this.postList = [];
this.total = 0;
}
});
//
// Just to simulate the time of the request
setTimeout(() => {
this.listLoading = false;
}, 1.0 * 1000);
},
//
exportData() {
if (this.dayDate.length == 0) {
this.initializeTimeDate();
}
let data = {
pageNum: this.queryParams.pageNum,
pageSize: this.total,
startDate: this.dayDate[0],
endDate: this.dayDate[1],
buildingId: this.building,
deviceType: "16",
};
console.log("查询数据参数", data);
queryDeviceDatas(data).then((res) => {
console.log("返回", res);
if (res.code == 200) {
import("@/assets/excel/Export2Excel").then((excel) => {
var tHeader = [
"所属楼栋",
"设备编号",
"设备名称",
"抄表时间",
"采集读数",
"用量(度)",
"倍率",
"计算量(度)",
]; // excel
var filterVal = [
"buildingName",
"deviceNum",
"deviceName",
"curTime",
"curValue",
"usedValue",
"ratio",
"calcValue",
];
const data = this.formatJson(filterVal, res.rows);
const autoWidth = true;
excel.export_json_to_excel({
header: tHeader, //
data, //
filename: "电表读数报表", //
autoWidth: true, //
});
this.$message({
type: "success",
message: "导出成功!",
});
});
} else {
this.$message.error("导出失败!");
}
});
},
//,
formatJson(filterVal, jsonData) {
return jsonData.map((v) =>
filterVal.map((j) => {
if (j === "installDate") {
return format(v[j]);
} else {
return v[j];
}
})
);
},
tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 6 || columnIndex === 8) {
return "color: #75d148;!important;text-align:center";
}
// return "text-align:center";
},
},
};
</script>
<style lang="scss" scoped>
.condition {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
margin-bottom: 0.24rem;
.condition-left {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
.years-div {
display: flex;
flex-direction: row;
align-items: center;
.years-word {
font-size: 14px;
margin: 0 5px;
color: #388ff3;
}
}
.time-label {
font-size: 16px;
line-height: 7px;
margin-right: 12px;
white-space: nowrap;
}
}
}
.data-content {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
width: 100%;
margin-top: 23px;
.data-li {
background-color: transparent;
border-radius: 8px;
display: flex;
flex-direction: row;
align-items: center;
padding: 0.3rem;
width: 31%;
justify-content: space-between;
margin-bottom: 0.24rem;
font-family: SourceHanSansCN-Regular;
font-size: 0.16rem;
position: relative;
overflow: hidden;
.use-icon {
width: 0.6rem;
height: 0.6rem;
}
.use-text {
width: 33%;
display: flex;
flex-direction: column;
align-items: flex-start;
color: #dbdbdb;
.data-text {
z-index: 11 !important;
font-family: DIN-Bold;
font-size: 0.24rem;
margin-top: 0.05rem;
color: #ffffff;
}
.downText {
color: #ff4027;
z-index: 11 !important;
font-family: DIN-Bold;
font-size: 0.24rem;
margin-top: 0.05rem;
.el-icon-bottom {
margin-right: 0.08rem;
}
}
.upText {
color: #2ff016;
z-index: 11 !important;
font-family: DIN-Bold;
font-size: 0.24rem;
margin-top: 0.05rem;
.el-icon-bottom,
.el-icon-top {
margin-right: 0.08rem;
}
}
}
}
.type-img {
position: absolute;
bottom: 0;
width: 3.17rem;
height: 0.52rem;
z-index: 10;
}
.type1 {
border: 1px solid #e8aa13;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(26, 56, 65, 0.5), rgba(184, 196, 51, 0.5));
}
.type1::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(243, 166, 23, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
.type2 {
border: 1px solid #27a0f2;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(2, 43, 88, 0.5), rgba(8, 96, 179, 0.5));
}
.type2::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(28, 128, 241, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
.type3 {
border: 1px solid #1ad3ef;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(2, 50, 89, 0.5), rgba(17, 145, 151, 0.5));
}
.type3::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(117, 242, 248, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
.type4 {
border: 1px solid #11d47b;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(2, 57, 82, 0.5), rgba(5, 91, 90, 0.5));
}
.type4::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(115, 245, 176, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
}
.choice {
margin: 20px;
.mr20 {
padding: 0.05rem 0.2rem;
white-space: nowrap;
width: auto;
}
}
.charts {
width: 100%;
height: 300px;
margin-bottom: 0.1rem;
}
// 2000px
@media (min-width: 2000px) {
.condition {
.condition-left {
.years-div {
.years-word {
font-size: 0.14rem !important;
margin: 0 0.05rem !important;
}
}
.time-label {
font-size: 0.16rem !important;
line-height: 0.07rem !important;
margin-right: 0.12rem !important;
}
}
}
}
</style>

578
src/views/hotWater/energyQuery/components/energy.vue

@ -0,0 +1,578 @@
<template>
<div class="big-machine" v-loading="listLoading">
<div class="condition">
<div class="condition-left">
<el-select
style="margin-right: 0.1rem"
v-model="building"
placeholder="请选择楼栋"
clearable
>
<el-option
v-for="(item, index) in builds"
:key="index"
:label="item.building_name"
:value="item.id"
/>
</el-select>
<el-date-picker
v-model="dayDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
>
</el-date-picker>
<div class="success-btn" style="margin: 0 0.12rem">
<el-button type="success" @click="findData">查询</el-button>
</div>
</div>
</div>
<div class="choice">
<div
class="mr20"
v-for="(item, index) in timeData2"
:key="index"
@click="handleEnter(index, $event)"
:class="{ timeStyle: currentIndex == index }"
>
{{ item.title }}
</div>
</div>
<div class="charts" ref="chart_ref"></div>
</div>
</template>
<script>
import { formatDay } from "@/utils/datetime";
import { hotBuildList } from "@/api/hotWater/energyAnalysis";
import { hotEnergyQuery } from "@/api/hotWater/overview";
import * as echarts from "echarts";
export default {
data() {
return {
listLoading: false,
dayDate: [], //
dialogVisible: false,
building: "", //
builds: [], //
timeData2: [{ title: "用水量" }, { title: "用电量" }],
currentIndex: 0,
//
loading: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
startTime: "",
endTime: "",
},
brokenInstanc: null,
brokenOption: {},
brokenData1: [],
brokenTime: [],
};
},
created() {
//
},
mounted() {
this.initializeTimeDate();
this.getBuildList();
this.initChart();
window.addEventListener("resize", this.screenAdapter);
this.screenAdapter();
},
destroyed() {
//
window.removeEventListener("resize", this.screenAdapter);
},
methods: {
/** 查询楼栋 */
getBuildList() {
let data = {
systemType: "1",
};
hotBuildList(data).then((res) => {
if (res.code == 200) {
//
console.log("楼栋返回值", res);
this.builds = res.rows;
// console.log("", this.builds);
this.building = res.rows[0].id;
this.getList();
}
});
},
//
initializeTimeDate() {
this.dayDate = formatDay(new Date()); //
},
//
findData() {
this.getList();
},
//
getList() {
let data = {
type: 0,
page: 1,
limit: 31,
// curDate:this.dayDate,
startDate: this.dayDate,
endDate: this.dayDate,
buildingId: this.building,
};
console.log("查询数据参数", data);
this.listLoading = true;
//
hotEnergyQuery(data).then((res) => {
console.log("图表返回的数据", res);
this.brokenData1 = [];
this.brokenData2 = [];
this.brokenTime = [];
if (res.code == 200 && res.rows.length > 0) {
this.exportData = res.rows;
res.rows.forEach((item) => {
this.brokenData1.push(item.useHotWater);
this.brokenData2.push(item.electValue);
if (item.curDate.includes(" ")) {
var oneStr = item.curDate.split(" ");
this.brokenTime.push(oneStr[oneStr.length - 1] + ":00");
}
});
//
this.brokenData1.reverse();
this.brokenData2.reverse();
this.brokenTime.reverse();
} else {
this.brokenData1 = [];
this.brokenData2 = [];
this.brokenTime = [];
}
this.getChartData();
});
// Just to simulate the time of the request
setTimeout(() => {
this.listLoading = false;
}, 1.0 * 1000);
},
//
getChartData() {
if (this.currentIndex === 0) {
this.brokenOption.yAxis.name = "吨";
this.brokenOption.yAxis.nameTextStyle = {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
};
this.brokenOption.series[0].data = this.brokenData1;
this.brokenOption.series[0].itemStyle.color = "#1f8dee";
this.brokenOption.series[0].areaStyle.color.colorStops = [
{
offset: 0,
color: "rgba(31, 141, 238, 0.3)", // 0%
},
{
offset: 0.8,
color: "rgba(31, 141, 238,0)", // 100%
},
];
} else if (this.currentIndex === 1) {
this.brokenOption.yAxis.name = "度";
this.brokenOption.yAxis.nameTextStyle = {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
};
this.brokenOption.series[0].data = this.brokenData2;
this.brokenOption.series[0].itemStyle.color = "#1ab395";
this.brokenOption.series[0].areaStyle.color.colorStops = [
{
offset: 0,
color: "rgba(26, 179, 149, 0.3)", // 0%
},
{
offset: 0.8,
color: "rgba(26, 179, 149,0)", // 100%
},
];
}
//
const currentIndex = this.currentIndex;
// tooltip
this.brokenOption.tooltip = {
trigger: "axis",
formatter: function (params) {
//
const data = params[0];
const month = data.name;
const value = data.value;
//
if (currentIndex === 0) {
return `${month}<br/>用水量: ${value}`;
} else if (currentIndex === 1) {
return `${month}<br/>用电量: ${value}`;
}
},
};
this.brokenOption.xAxis.data = this.brokenTime;
this.brokenInstanc.setOption(this.brokenOption);
},
handleEnter(index) {
this.currentIndex = index;
this.getChartData();
},
// 线+ + 线
screenAdapter() {
//,2.6 mes_ref
const titleFontSize = this.$refs.chart_ref.offsetWidth / 130;
//optionoption
const adapterOption = {};
//.chartInstanceoptiondataoption
this.brokenInstanc.setOption(adapterOption);
//resize
this.brokenInstanc.resize();
},
//chartInstance
initChart() {
this.brokenInstanc = echarts.init(this.$refs.chart_ref);
this.brokenOption = {
tooltip: {
trigger: "axis",
},
legend: {
show: false,
selectedMode: false, //
icon: "cricle", //
//
textStyle: {
color: "#ffff",
fontSize: 16, //
},
// left: "73%",
left: "66%",
top: "0",
//
itemGap: 5,
itemWidth: 10,
itemHeight: 5,
},
grid: {
top: "4%",
left: "3%",
right: "4%",
bottom: "5%",
containLabel: true,
},
xAxis: {
type: "category",
//true
boundaryGap: true,
// x
axisLabel: {
// interval: 0, //x
// rotate: 30, //x30
color: "rgba(255, 255, 255, 1)",
fontSize: 14, //
},
axisTick: {
show: false, // 线
},
// x
axisLine: {
show: true,
lineStyle: {
color: "#365576",
},
},
splitLine: {
lineStyle: {
color: "#e2e6f0",
},
}, //x线
data: this.brokenTime,
},
yAxis: {
min: 0,
// max:20,
// // // min:'dataMin',
// // // max:'dataMax',
// name: "kwh", // y
// name
nameTextStyle: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
},
miniInterval: 5,
type: "value",
// y
axisLabel: {
color: "rgba(255, 255, 255, 1)",
},
// y
axisLine: {
show: true,
lineStyle: {
color: "#365576", // y 线
},
fontSize: 14, //
},
//y线
// splitNumber: 10,
// y线
splitLine: {
lineStyle: {
color: "#1a3d62", // 线
type: "dashed", // 线线
},
},
},
series: [
{
type: "line",
//
symbolSize: 8,
smooth: true,
showSymbol: false,
data: this.brokenData1,
//线
itemStyle: {
color: "#d48e17", //线
lineStyle: {
color: "#d48e17", //线
},
},
areaStyle: {
color: {
//线
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [],
},
},
},
],
};
//
this.brokenInstanc.setOption(this.brokenOption, true);
},
},
};
</script>
<style lang="scss" scoped>
.condition {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
margin-bottom: 0.24rem;
.condition-left {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
.years-div {
display: flex;
flex-direction: row;
align-items: center;
.years-word {
font-size: 14px;
margin: 0 5px;
color: #388ff3;
}
}
.time-label {
font-size: 16px;
line-height: 7px;
margin-right: 12px;
white-space: nowrap;
}
}
}
.data-content {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
width: 100%;
margin-top: 23px;
.data-li {
background-color: transparent;
border-radius: 8px;
display: flex;
flex-direction: row;
align-items: center;
padding: 0.3rem;
width: 31%;
justify-content: space-between;
margin-bottom: 0.24rem;
font-family: SourceHanSansCN-Regular;
font-size: 0.16rem;
position: relative;
overflow: hidden;
.use-icon {
width: 0.6rem;
height: 0.6rem;
}
.use-text {
width: 33%;
display: flex;
flex-direction: column;
align-items: flex-start;
color: #dbdbdb;
.data-text {
z-index: 11 !important;
font-family: DIN-Bold;
font-size: 0.24rem;
margin-top: 0.05rem;
color: #ffffff;
}
.downText {
color: #ff4027;
z-index: 11 !important;
font-family: DIN-Bold;
font-size: 0.24rem;
margin-top: 0.05rem;
.el-icon-bottom {
margin-right: 0.08rem;
}
}
.upText {
color: #2ff016;
z-index: 11 !important;
font-family: DIN-Bold;
font-size: 0.24rem;
margin-top: 0.05rem;
.el-icon-bottom,
.el-icon-top {
margin-right: 0.08rem;
}
}
}
}
.type-img {
position: absolute;
bottom: 0;
width: 3.17rem;
height: 0.52rem;
z-index: 10;
}
.type1 {
border: 1px solid #e8aa13;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(26, 56, 65, 0.5), rgba(184, 196, 51, 0.5));
}
.type1::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(243, 166, 23, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
.type2 {
border: 1px solid #27a0f2;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(2, 43, 88, 0.5), rgba(8, 96, 179, 0.5));
}
.type2::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(28, 128, 241, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
.type3 {
border: 1px solid #1ad3ef;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(2, 50, 89, 0.5), rgba(17, 145, 151, 0.5));
}
.type3::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(117, 242, 248, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
.type4 {
border: 1px solid #11d47b;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(2, 57, 82, 0.5), rgba(5, 91, 90, 0.5));
}
.type4::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(115, 245, 176, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
}
.choice {
margin: 20px;
.mr20 {
padding: 0.05rem 0.2rem;
white-space: nowrap;
width: auto;
}
}
.charts {
width: 100%;
height: 700px;
margin-bottom: 0.1rem;
}
// 2000px
@media (min-width: 2000px) {
.condition {
.condition-left {
.years-div {
.years-word {
font-size: 0.14rem !important;
margin: 0 0.05rem !important;
}
}
.time-label {
font-size: 0.16rem !important;
line-height: 0.07rem !important;
margin-right: 0.12rem !important;
}
}
}
}
</style>

483
src/views/hotWater/energyQuery/components/waterReading.vue

@ -0,0 +1,483 @@
<template>
<div class="big-machine" v-loading="listLoading">
<div class="condition">
<div class="condition-left">
<el-select
style="margin-right: 0.1rem"
v-model="building"
placeholder="请选择楼栋"
clearable
>
<el-option
v-for="(item, index) in builds"
:key="index"
:label="item.building_name"
:value="item.id"
/>
</el-select>
<el-date-picker
v-model="dayDate"
type="daterange"
range-separator="至"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="dateChange"
>
</el-date-picker>
<div class="success-btn" style="margin: 0 0.12rem">
<el-button type="success" @click="findData">查询</el-button>
</div>
<div class="warning-btn">
<el-button type="warning" @click="exportData">导出</el-button>
</div>
</div>
</div>
<el-table
:data="postList"
stripe
:cell-style="tableRowStyle"
highlight-current-row
height="500"
>
<el-table-column
type="index"
:index="indexAdd"
prop="number"
label="序号"
width="90"
></el-table-column>
<el-table-column label="所属楼栋" align="center" prop="buildingName" />
<el-table-column label="设备编号" align="center" prop="deviceNum" />
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="抄表时间" align="center" prop="curTime" />
<el-table-column label="采集读数" align="center" prop="curValue" />
<el-table-column label="用量(吨)" align="center" prop="usedValue" />
<el-table-column label="倍率" align="center" prop="ratio" />
<el-table-column label="计算量(吨)" align="center" prop="calcValue" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { formatDay } from "@/utils/datetime";
import { hotBuildList } from "@/api/hotWater/energyAnalysis";
import { queryDeviceDatas } from "@/api/hotWater/energyQuery";
export default {
data() {
return {
listLoading: false,
dayDate: [], //
dialogVisible: false,
building: "", //
builds: [], //
//
loading: false,
//
total: 0,
//
postList: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
startTime: "",
endTime: "",
},
};
},
created() {
//
},
mounted() {
this.initializeTimeDate();
this.getBuildList();
this.getList();
},
methods: {
//
dateChange() {
// console.log("", this.timeform.time1);
if (!this.dayDate) {
this.$nextTick(() => {
this.dayDate = [];
});
}
},
/** 查询楼栋 */
getBuildList() {
let data = {
systemType: "1",
};
hotBuildList(data).then((res) => {
if (res.code == 200) {
//
console.log("楼栋返回值", res);
this.builds = res.rows;
// console.log("", this.builds);
this.building = res.rows[0].id;
this.getList();
}
});
},
//
initializeTimeDate() {
let date = new Date(); //
//,
let year = date.getFullYear().toString();
//01
//使10'0'
let month =
date.getMonth() + 1 < 10
? "0" + (date.getMonth() + 1).toString()
: (date.getMonth() + 1).toString();
//10'0'
let day =
date.getDate() < 10
? "0" + date.getDate().toString()
: date.getDate().toString();
//
let start1 = year + "-" + month + "-01"; //
let end1 = year + "-" + month + "-" + day; //
this.dayDate = [start1, end1]; //
},
//
findData() {
this.queryParams.pageNum = 1;
this.getList();
},
//
indexAdd(index) {
return (
index + 1 + (this.queryParams.pageNum - 1) * this.queryParams.pageSize
);
},
//
getList() {
if (this.dayDate.length == 0) {
this.initializeTimeDate();
}
let data = {
pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize,
startDate: this.dayDate[0],
endDate: this.dayDate[1],
buildingId: this.building,
deviceType: "18",
};
console.log("查询数据参数", data);
this.listLoading = true;
queryDeviceDatas(data).then((res) => {
console.log("返回", res);
if (res.code == 200) {
this.postList = res.rows;
this.total = res.total;
} else {
this.postList = [];
this.total = 0;
}
});
//
// Just to simulate the time of the request
setTimeout(() => {
this.listLoading = false;
}, 1.0 * 1000);
},
//
exportData() {
if (this.dayDate.length == 0) {
this.initializeTimeDate();
}
let data = {
pageNum: this.queryParams.pageNum,
pageSize: this.total,
startDate: this.dayDate[0],
endDate: this.dayDate[1],
buildingId: this.building,
deviceType: "18",
};
console.log("查询数据参数", data);
queryDeviceDatas(data).then((res) => {
console.log("返回", res);
if (res.code == 200) {
import("@/assets/excel/Export2Excel").then((excel) => {
var tHeader = [
"所属楼栋",
"设备编号",
"设备名称",
"抄表时间",
"采集读数",
"用量(吨)",
"倍率",
"计算量(吨)",
]; // excel
var filterVal = [
"buildingName",
"deviceNum",
"deviceName",
"curTime",
"curValue",
"usedValue",
"ratio",
"calcValue",
];
const data = this.formatJson(filterVal, res.rows);
const autoWidth = true;
excel.export_json_to_excel({
header: tHeader, //
data, //
filename: "水表读数报表", //
autoWidth: true, //
});
this.$message({
type: "success",
message: "导出成功!",
});
});
} else {
this.$message.error("导出失败!");
}
});
},
//,
formatJson(filterVal, jsonData) {
return jsonData.map((v) =>
filterVal.map((j) => {
if (j === "installDate") {
return format(v[j]);
} else {
return v[j];
}
})
);
},
tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 6 || columnIndex === 8) {
return "color: #75d148;!important;text-align:center";
}
// return "text-align:center";
},
},
};
</script>
<style lang="scss" scoped>
.condition {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
margin-bottom: 0.24rem;
.condition-left {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
.years-div {
display: flex;
flex-direction: row;
align-items: center;
.years-word {
font-size: 14px;
margin: 0 5px;
color: #388ff3;
}
}
.time-label {
font-size: 16px;
line-height: 7px;
margin-right: 12px;
white-space: nowrap;
}
}
}
.data-content {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
width: 100%;
margin-top: 23px;
.data-li {
background-color: transparent;
border-radius: 8px;
display: flex;
flex-direction: row;
align-items: center;
padding: 0.3rem;
width: 31%;
justify-content: space-between;
margin-bottom: 0.24rem;
font-family: SourceHanSansCN-Regular;
font-size: 0.16rem;
position: relative;
overflow: hidden;
.use-icon {
width: 0.6rem;
height: 0.6rem;
}
.use-text {
width: 33%;
display: flex;
flex-direction: column;
align-items: flex-start;
color: #dbdbdb;
.data-text {
z-index: 11 !important;
font-family: DIN-Bold;
font-size: 0.24rem;
margin-top: 0.05rem;
color: #ffffff;
}
.downText {
color: #ff4027;
z-index: 11 !important;
font-family: DIN-Bold;
font-size: 0.24rem;
margin-top: 0.05rem;
.el-icon-bottom {
margin-right: 0.08rem;
}
}
.upText {
color: #2ff016;
z-index: 11 !important;
font-family: DIN-Bold;
font-size: 0.24rem;
margin-top: 0.05rem;
.el-icon-bottom,
.el-icon-top {
margin-right: 0.08rem;
}
}
}
}
.type-img {
position: absolute;
bottom: 0;
width: 3.17rem;
height: 0.52rem;
z-index: 10;
}
.type1 {
border: 1px solid #e8aa13;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(26, 56, 65, 0.5), rgba(184, 196, 51, 0.5));
}
.type1::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(243, 166, 23, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
.type2 {
border: 1px solid #27a0f2;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(2, 43, 88, 0.5), rgba(8, 96, 179, 0.5));
}
.type2::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(28, 128, 241, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
.type3 {
border: 1px solid #1ad3ef;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(2, 50, 89, 0.5), rgba(17, 145, 151, 0.5));
}
.type3::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(117, 242, 248, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
.type4 {
border: 1px solid #11d47b;
border-radius: 10px;
/* 设置渐变背景 */
background: linear-gradient(rgba(2, 57, 82, 0.5), rgba(5, 91, 90, 0.5));
}
.type4::after {
content: "";
width: 100%;
height: 90%;
box-shadow: 0 0 30px 40px rgba(115, 245, 176, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
bottom: -100% !important;
z-index: 1;
}
}
.choice {
margin: 20px;
.mr20 {
padding: 0.05rem 0.2rem;
white-space: nowrap;
width: auto;
}
}
.charts {
width: 100%;
height: 300px;
margin-bottom: 0.1rem;
}
// 2000px
@media (min-width: 2000px) {
.condition {
.condition-left {
.years-div {
.years-word {
font-size: 0.14rem !important;
margin: 0 0.05rem !important;
}
}
.time-label {
font-size: 0.16rem !important;
line-height: 0.07rem !important;
margin-right: 0.12rem !important;
}
}
}
}
</style>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save