diff --git a/psdc-ui/src/api/bigview/bigview.js b/psdc-ui/src/api/bigview/bigview.js index 968f708..44d0c7c 100644 --- a/psdc-ui/src/api/bigview/bigview.js +++ b/psdc-ui/src/api/bigview/bigview.js @@ -2,13 +2,13 @@ import request from '@/utils/request' /** 8个温度传感器接口*/ export function getTemperature(data) { - return request.get('/indexLook/8wd/'+data) + return request.post('/indexLook/8wd?modelTypeName='+data) } /**运行设备工作信息查询接口*/ export function getDevicesInfo() { return request.get('/indexLook/devicesInfo') } /**总电表接口*/ -export function getZdb() { - return request.get('/indexLook/zdb') +export function getZdb(data) { + return request.get('/indexLook/zdb/'+data) } \ No newline at end of file diff --git a/psdc-ui/src/api/emonitor/api.js b/psdc-ui/src/api/emonitor/api.js index 672ab00..7b18cd3 100644 --- a/psdc-ui/src/api/emonitor/api.js +++ b/psdc-ui/src/api/emonitor/api.js @@ -36,7 +36,7 @@ export function getFrld(data) { } //温度传感器 export function getWdcgq(data) { - return request.get('/monitor/wdcgq/index/sel1/'+data) + return request.post('/monitor/wdcgq/index/sel1?modelTypeName='+data) } //沙盘 export function getSp(data) { @@ -61,4 +61,23 @@ export function postDel(data) { //获取用户设备列表 export function getSb() { return request.get('/monitor/db/index/selMydevices') +} +//设备管理 +export function getYh() { + return request.get('system/device/index/selusers') +} +export function getSbTab(data) { + return request.post('system/device/index/devicesList',data) +} +export function getMx() { + return request.get('system/device/index/selmodels') +} +export function postNew1(data) { + return request.post('system/device/index',data) +} +export function postXg1(data) { + return request.put('system/device/index',data) +} +export function postDel1(data) { + return request.post('system/device/index/del',data) } \ No newline at end of file diff --git a/psdc-ui/src/assets/images/shapan.png b/psdc-ui/src/assets/images/shapan.png new file mode 100644 index 0000000..85c3e31 Binary files /dev/null and b/psdc-ui/src/assets/images/shapan.png differ diff --git a/psdc-ui/src/views/bigview/index.vue b/psdc-ui/src/views/bigview/index.vue index 43c11b7..14cec98 100644 --- a/psdc-ui/src/views/bigview/index.vue +++ b/psdc-ui/src/views/bigview/index.vue @@ -131,7 +131,7 @@ onMounted(()=>{ /** 8个温度传感器数据*/ const wdcgqArr = ref([]) function getWenduFun(){ - getTemperature(16).then((res)=>{ + getTemperature("温度传感器").then((res)=>{ wdcgqArr.value = res.data }) } @@ -612,7 +612,7 @@ const nowPower = ref() const nowEle = ref() const todayUsePowersArr = []; function getZdbFun(){ - getZdb().then((res)=>{ + getZdb(13).then((res)=>{ console.log(res.data) nowPower.value = res.data.totp; nowEle.value = res.data.totwh; diff --git a/psdc-ui/src/views/emonitor/db/index.vue b/psdc-ui/src/views/emonitor/db/index.vue index 5c533fd..105b70b 100644 --- a/psdc-ui/src/views/emonitor/db/index.vue +++ b/psdc-ui/src/views/emonitor/db/index.vue @@ -181,7 +181,7 @@ export default { onMounted(() => {//需要获取到element,所以是onMounted的Hook getData(13).then((res)=>{ console.log(res) - if(res.data){ + if(res.data!=null){ data.totp=res.data.totp data.totwh=res.data.totwh data.eday=res.data.eday diff --git a/psdc-ui/src/views/emonitor/drgl/index.vue b/psdc-ui/src/views/emonitor/drgl/index.vue index 8e170f0..2f35688 100644 --- a/psdc-ui/src/views/emonitor/drgl/index.vue +++ b/psdc-ui/src/views/emonitor/drgl/index.vue @@ -422,7 +422,7 @@ export default { }) getDrgl(1).then((res)=>{ console.log('1',res) - if(res.data){ + if(res.data!=null){ data.tempIn=res.data.tempIn data.tempOut=res.data.tempOut data.totp = res.data.totp diff --git a/psdc-ui/src/views/emonitor/frdl/index.vue b/psdc-ui/src/views/emonitor/frdl/index.vue index c4bbe16..c127043 100644 --- a/psdc-ui/src/views/emonitor/frdl/index.vue +++ b/psdc-ui/src/views/emonitor/frdl/index.vue @@ -399,21 +399,24 @@ export default { }) getFrdl(4).then((res)=>{ console.log('1',res) - data.tempIn=res.data.tempIn - data.tempOut=res.data.tempOut - data.totp = res.data.totp - data.totwh = res.data.totwh - if(res.data.runStatus==1){ - data.runStatus = '开启' - }else if (res.data.runStatus==2){ - data.runStatus = '关闭' + if(res.data!=null){ + data.tempIn=res.data.tempIn + data.tempOut=res.data.tempOut + data.totp = res.data.totp + data.totwh = res.data.totwh + if(res.data.runStatus==1){ + data.runStatus = '开启' + }else if (res.data.runStatus==2){ + data.runStatus = '关闭' + } + //gl + delete res.data.todayUsePowers.deviceId + delete res.data.todayUsePowers.samDate + delete res.data.todayUsePowers.userId + let arr = Object.values(res.data.todayUsePowers) + data.glData=arr } - //gl - delete res.data.todayUsePowers.deviceId - delete res.data.todayUsePowers.samDate - delete res.data.todayUsePowers.userId - let arr = Object.values(res.data.todayUsePowers) - data.glData=arr + let myChart3 = echarts.getInstanceByDom(document.getElementById("myEcharts3")); if (myChart3){ myChart3.dispose() diff --git a/psdc-ui/src/views/emonitor/kqyrb/index.vue b/psdc-ui/src/views/emonitor/kqyrb/index.vue index 9d403d1..00b8b77 100644 --- a/psdc-ui/src/views/emonitor/kqyrb/index.vue +++ b/psdc-ui/src/views/emonitor/kqyrb/index.vue @@ -419,21 +419,23 @@ export default { }) getKqryb(3).then((res)=>{ console.log('1',res) - data.tempIn=res.data.tempIn - data.tempOut=res.data.tempOut - data.totp = res.data.totp - data.totwh = res.data.totwh - if(res.data.runStatus==1){ - data.runStatus = '开启' - }else if (res.data.runStatus==2){ - data.runStatus = '关闭' + if(res.data!=null) { + data.tempIn = res.data.tempIn + data.tempOut = res.data.tempOut + data.totp = res.data.totp + data.totwh = res.data.totwh + if (res.data.runStatus == 1) { + data.runStatus = '开启' + } else if (res.data.runStatus == 2) { + data.runStatus = '关闭' + } + //gl + delete res.data.todayUsePowers.deviceId + delete res.data.todayUsePowers.samDate + delete res.data.todayUsePowers.userId + let arr = Object.values(res.data.todayUsePowers) + data.glData = arr } - //gl - delete res.data.todayUsePowers.deviceId - delete res.data.todayUsePowers.samDate - delete res.data.todayUsePowers.userId - let arr = Object.values(res.data.todayUsePowers) - data.glData=arr let myChart3 = echarts.getInstanceByDom(document.getElementById("myEcharts3")); if (myChart3){ myChart3.dispose() diff --git a/psdc-ui/src/views/emonitor/sp/index.vue b/psdc-ui/src/views/emonitor/sp/index.vue index 30fd137..5c021da 100644 --- a/psdc-ui/src/views/emonitor/sp/index.vue +++ b/psdc-ui/src/views/emonitor/sp/index.vue @@ -2,6 +2,7 @@

{{data.name}}

运行状态:{{data.status}}

+
@@ -17,11 +18,13 @@ export default { onMounted(()=>{ getSp(14).then((res)=>{ console.log(res) - data.name=res.data.deviceName - if(res.data.deviceRunstatus==true){ - data.status='开启' - }else{ - data.status='关闭' + if(res.data!=null) { + data.name = res.data.deviceName + if (res.data.deviceRunstatus == true) { + data.status = '开启' + } else { + data.status = '关闭' + } } }) }) @@ -36,6 +39,9 @@ export default { diff --git a/psdc-ui/src/views/emonitor/wdcgq/index.vue b/psdc-ui/src/views/emonitor/wdcgq/index.vue index 46abd72..907d71d 100644 --- a/psdc-ui/src/views/emonitor/wdcgq/index.vue +++ b/psdc-ui/src/views/emonitor/wdcgq/index.vue @@ -52,21 +52,27 @@ export default { }) onMounted(() => {//需要获取到element,所以是onMounted的Hook //温度传感器1-8 id 5-12 - getWdcgq(16).then((res)=>{ + getWdcgq("温度传感器").then((res)=>{ console.log(res) - let arr = [] - let brr = [] - let crr = [] - for (let i in res.data){ - arr.push({name:res.data[i].deviceName,temp:res.data[i].deviceTemp}) - brr.push({name:res.data[i].deviceName,type: "line",data:res.data[i].temps,itemStyle:{color:'#2F8EE0'}}) - crr.push(res.data[i].times) + if(res.data!=null) { + let arr = [] + let brr = [] + let crr = [] + for (let i in res.data) { + arr.push({name: res.data[i].deviceName, temp: res.data[i].deviceTemp}) + brr.push({ + name: res.data[i].deviceName, + type: "line", + data: res.data[i].temps, + itemStyle: {color: '#2F8EE0'} + }) + crr.push(res.data[i].times) + } + console.log(crr) + data.info = arr + data.infos = brr + data.xinfo = crr } - console.log(crr) - data.info=arr - data.infos=brr - data.xinfo=crr - let myChart = echarts.getInstanceByDom(document.getElementById("myEcharts")); if (myChart){ myChart.dispose() diff --git a/psdc-ui/src/views/emonitor/xrgl/index.vue b/psdc-ui/src/views/emonitor/xrgl/index.vue index 86fb278..8afa1c2 100644 --- a/psdc-ui/src/views/emonitor/xrgl/index.vue +++ b/psdc-ui/src/views/emonitor/xrgl/index.vue @@ -223,21 +223,23 @@ export default { onMounted(() => {//需要获取到element,所以是onMounted的Hook getXrgl(2).then((res)=>{ console.log('1',res) - data.tempIn=res.data.tempIn - data.tempOut=res.data.tempOut - data.totp = res.data.totp - data.totwh = res.data.totwh - if(res.data.runStatus==1){ - data.runStatus = '开启' - }else if (res.data.runStatus==2){ - data.runStatus = '关闭' + if(res.data!=null) { + data.tempIn = res.data.tempIn + data.tempOut = res.data.tempOut + data.totp = res.data.totp + data.totwh = res.data.totwh + if (res.data.runStatus == 1) { + data.runStatus = '开启' + } else if (res.data.runStatus == 2) { + data.runStatus = '关闭' + } + //gl + delete res.data.todayUsePowers.deviceId + delete res.data.todayUsePowers.samDate + delete res.data.todayUsePowers.userId + let arr = Object.values(res.data.todayUsePowers) + data.glData = arr } - //gl - delete res.data.todayUsePowers.deviceId - delete res.data.todayUsePowers.samDate - delete res.data.todayUsePowers.userId - let arr = Object.values(res.data.todayUsePowers) - data.glData=arr let myChart3 = echarts.getInstanceByDom(document.getElementById("myEcharts3")); if (myChart3){ myChart3.dispose() diff --git a/psdc-ui/src/views/system/cl/index.vue b/psdc-ui/src/views/system/cl/index.vue index 2968389..c645517 100644 --- a/psdc-ui/src/views/system/cl/index.vue +++ b/psdc-ui/src/views/system/cl/index.vue @@ -61,37 +61,42 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 全选 +
+ + {{item.deviceName}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +