From a6f88657d34321048bea5f24cd59c973777db9f9 Mon Sep 17 00:00:00 2001 From: wj <347312259@qq.com> Date: Tue, 23 May 2023 09:52:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=EF=BC=8C=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- psdc-ui/src/api/analyse/nhfx/nhfx.js | 0 psdc-ui/src/api/analyse/nhtj/nhtj.js | 6 + psdc-ui/src/api/bigview/bigview.js | 4 + psdc-ui/src/api/control/manual.js | 12 +- psdc-ui/src/api/control/timer.js | 10 +- psdc-ui/src/views/analyse/nhtj/index.vue | 451 +++++++++++++++------ psdc-ui/src/views/bigview/index.vue | 255 ++++++++++-- psdc-ui/src/views/control/manual/index.vue | 191 +++------ psdc-ui/src/views/control/timer/index.vue | 243 ++++++++--- 9 files changed, 812 insertions(+), 360 deletions(-) create mode 100644 psdc-ui/src/api/analyse/nhfx/nhfx.js create mode 100644 psdc-ui/src/api/analyse/nhtj/nhtj.js diff --git a/psdc-ui/src/api/analyse/nhfx/nhfx.js b/psdc-ui/src/api/analyse/nhfx/nhfx.js new file mode 100644 index 0000000..e69de29 diff --git a/psdc-ui/src/api/analyse/nhtj/nhtj.js b/psdc-ui/src/api/analyse/nhtj/nhtj.js new file mode 100644 index 0000000..e3101f7 --- /dev/null +++ b/psdc-ui/src/api/analyse/nhtj/nhtj.js @@ -0,0 +1,6 @@ +import request from '@/utils/request' + +/** 获取能耗列表*/ +export function getTable(data) { + return request.post('/evaluate/statistics/list',data) +} \ No newline at end of file diff --git a/psdc-ui/src/api/bigview/bigview.js b/psdc-ui/src/api/bigview/bigview.js index 0e9cf09..4d643e9 100644 --- a/psdc-ui/src/api/bigview/bigview.js +++ b/psdc-ui/src/api/bigview/bigview.js @@ -7,4 +7,8 @@ export function getTemperature() { /**运行设备工作信息查询接口*/ export function getDevicesInfo() { return request.get('/indexLook/devicesInfo') +} +/**总电表接口*/ +export function getZdb() { + return request.get('/indexLook/zdb') } \ No newline at end of file diff --git a/psdc-ui/src/api/control/manual.js b/psdc-ui/src/api/control/manual.js index b754ed7..902edf6 100644 --- a/psdc-ui/src/api/control/manual.js +++ b/psdc-ui/src/api/control/manual.js @@ -9,6 +9,14 @@ export function getControlLogList(data) { return request.post('/control/manual/controlLogList',data) } /** 获取策略列表*/ -export function getStrategyList(data) { - return request.get('/control/manual/strategyList',data) +export function getStrategyList() { + return request.get('/control/manual/strategyList') +} +/** 控制设备启停*/ +export function getStartAndStop(data) { + return request.post('/control/manual/startAndStop',data) +} +/** 设置温度*/ +export function getSetTemperature(data) { + return request.post('/control/manual/setTemperature',data) } \ No newline at end of file diff --git a/psdc-ui/src/api/control/timer.js b/psdc-ui/src/api/control/timer.js index 8ecf3d2..2e5dd27 100644 --- a/psdc-ui/src/api/control/timer.js +++ b/psdc-ui/src/api/control/timer.js @@ -3,4 +3,12 @@ import request from '@/utils/request' /** 获取定时控制列表*/ export function getList(data) { return request.post('/control/timer/list',data) -} \ No newline at end of file +} +/** 新增定时任务*/ +export function getAddTimer(data) { + return request.post('/control/timer/addTimer',data) +} +/** 删除定时任务*/ +export function getDeleteTimer(data) { + return request.get('/control/timer/deleteTimer/' + data) +} diff --git a/psdc-ui/src/views/analyse/nhtj/index.vue b/psdc-ui/src/views/analyse/nhtj/index.vue index 1141e4d..22fc4a8 100644 --- a/psdc-ui/src/views/analyse/nhtj/index.vue +++ b/psdc-ui/src/views/analyse/nhtj/index.vue @@ -3,14 +3,15 @@ - - - - - + + + + + - - + + + @@ -20,7 +21,9 @@ - + 搜索 @@ -29,20 +32,20 @@ - - - + + +
- - - + + + @@ -54,7 +57,7 @@ :disabled="disabled" :background="background" layout="total, sizes, prev, pager, next, jumper" - :total="dataTable.length" + :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange"/>
@@ -68,176 +71,360 @@
+ + 关闭 @@ -697,7 +889,6 @@ onBeforeUnmount(() => { .nowPower_chart{ width: 100%; height: 81%; - border: 1px solid #fff; } } .wendu_box{ diff --git a/psdc-ui/src/views/control/manual/index.vue b/psdc-ui/src/views/control/manual/index.vue index 9790278..f49d6fd 100644 --- a/psdc-ui/src/views/control/manual/index.vue +++ b/psdc-ui/src/views/control/manual/index.vue @@ -5,6 +5,7 @@
{{ item.deviceName}} +
@@ -14,115 +15,14 @@
{{ item.deviceRunstatus }} - - + + -
确定
+
确定
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
调控日志
@@ -178,7 +78,7 @@ import { Download } from '@element-plus/icons-vue' //element字体图标 import { ref,reactive,onMounted } from 'vue' import { ElMessageBox } from 'element-plus' -import { getDevice,getControlLogList,getStrategyList } from '@/api/control/manual' +import { getDevice,getControlLogList,getStrategyList,getStartAndStop,getSetTemperature } from '@/api/control/manual' onMounted(()=>{ getDeviceFun(); @@ -189,8 +89,6 @@ onMounted(()=>{ /** 获取所有设备*/ const deviceArr = ref([]) const isShow1 = ref(true) -const isShow2 = ref(true) -const isShow3 = ref(true) function getDeviceFun(){ getDevice().then((res)=>{ console.log(res.data) @@ -201,39 +99,20 @@ function getDeviceFun(){ }else{ res.data[i].deviceRunstatus = '关闭' } + + // if(res.data[i].deviceModel == '发热电缆'){ + // isShow1.value = false + // } } }) } /** 设备控制处理*/ -const value1 = ref(true) -const value2 = ref(false) -const value3 = ref(false) -const value4 = ref(false) -const value5 = ref(false) -const value6 = ref(false) -const value7 = ref(false) const form1 = reactive({ - enter:'', - leave:'', + intemp:'', + outtemp:'', now:'' }) -const form2 = reactive({ - enter:'', - leave:'', -}) -const form3 = reactive({ - now:'', -}) -const onSubmit1 = () => { - console.log('确定') -} -const onSubmit2 = () => { - console.log('确定') -} -const onSubmit3 = () => { - console.log('确定') -} /** 数据表格处理*/ const controlLogList = ref([]) @@ -249,6 +128,7 @@ const handleSizeChange = (val) => { const handleCurrentChange = (val) => { getControlLogListFun() } + function getControlLogListFun(){ getControlLogList({ "deviceId": null, @@ -263,6 +143,15 @@ function getControlLogListFun(){ }).then((res)=>{ tableLength.value = res.total controlLogList.value = res.rows + for(let i = 0;i < res.rows.length;i++){ + if(res.rows[i].controlResult == 1){ + res.rows[i].controlResult = '控制中' + }else if(res.rows[i].controlResult == 2){ + res.rows[i].controlResult = '控制成功' + }else if(res.rows[i].controlResult == 3){ + res.rows[i].controlResult = '控制失败' + } + } }) } @@ -284,6 +173,35 @@ function confirmClick() { }) } +/** 控制设备启停*/ +// function handleChange(item){ +// console.log(item) +// // getStartAndStop({ +// // "deviceId": 100, +// // "runStatus": 2 +// // }).then((res)=>{ +// // console.log(res.data) +// // }) +// } + +/** 设置温度*/ +function getSetTemperatureFun(item){ + console.log(item) + // getSetTemperature({ + // "deviceId":100, + // "data":[ + // { + // "controlKey":"intemp", + // "controlValue":"28" + // }, + // { + // "controlKey":"outtemp", + // "controlValue":"90" + // }] + // }).then((res)=>{ + // console.log(res) + // }) +} @@ -424,6 +342,15 @@ function confirmClick() { } } + +.success { + color: green; +} + +.failure { + color: red; +} + ::v-deep .el-button{ border-radius: 2px; margin-bottom: 12px; diff --git a/psdc-ui/src/views/control/timer/index.vue b/psdc-ui/src/views/control/timer/index.vue index c044c49..0bfed0b 100644 --- a/psdc-ui/src/views/control/timer/index.vue +++ b/psdc-ui/src/views/control/timer/index.vue @@ -3,29 +3,41 @@ - - - - + + + - - - - + + + + + + + + + + + + - - --> + + + + + + + - + 搜索 重置 @@ -36,15 +48,16 @@
- + - - - - + + + + + @@ -69,9 +82,16 @@ + + + + + + + - + @@ -79,19 +99,25 @@ - - - - 星期一 - 星期二 - 星期三 - 星期四 - 星期五 - 星期六 - 星期日 - - - +
+ + + + 星期一 + 星期二 + 星期三 + 星期四 + 星期五 + 星期六 + 星期日 + + + + + + + +
@@ -114,14 +140,17 @@