diff --git a/public/index.html b/public/index.html index 401cd52..be4fbb0 100644 --- a/public/index.html +++ b/public/index.html @@ -1,5 +1,5 @@ - + diff --git a/src/App.vue b/src/App.vue index b75b8ad..23529b3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -45,4 +45,17 @@ nav a { nav a.router-link-exact-active { color: #42b983; } +body { + +/* --content:calc(100vh - var(--header)) */ +overflow: hidden !important; +-ms-overflow-style: none; +/* IE + Edge */ +scrollbar-width: none; +/* Firefox */ +} + +::-webkit-scrollbar { +display: none; +} diff --git a/src/assets/css/iconfont.css b/src/assets/css/iconfont.css index c774f27..0c8c886 100644 --- a/src/assets/css/iconfont.css +++ b/src/assets/css/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 3879194 */ - src: url('//at.alicdn.com/t/c/font_3879194_0vtcz1yxgvk.woff2?t=1683879014134') format('woff2'), - url('//at.alicdn.com/t/c/font_3879194_0vtcz1yxgvk.woff?t=1683879014134') format('woff'), - url('//at.alicdn.com/t/c/font_3879194_0vtcz1yxgvk.ttf?t=1683879014134') format('truetype'); + src: url('//at.alicdn.com/t/c/font_3879194_xfchth53vyb.woff2?t=1686011466607') format('woff2'), + url('//at.alicdn.com/t/c/font_3879194_xfchth53vyb.woff?t=1686011466607') format('woff'), + url('//at.alicdn.com/t/c/font_3879194_xfchth53vyb.ttf?t=1686011466607') format('truetype'); } .iconfont { @@ -13,6 +13,10 @@ -moz-osx-font-smoothing: grayscale; } +.icon-lishijilu:before { + content: "\eaf7"; +} + .icon-zhongyingwen:before { content: "\e607"; } diff --git a/src/assets/img/Factory/wifi.jpg b/src/assets/img/Factory/wifi.jpg new file mode 100644 index 0000000..1572bd1 Binary files /dev/null and b/src/assets/img/Factory/wifi.jpg differ diff --git a/src/assets/img/water_house_bg.jpg b/src/assets/img/water_house_bg.jpg new file mode 100644 index 0000000..430cdf4 Binary files /dev/null and b/src/assets/img/water_house_bg.jpg differ diff --git a/src/assets/indexImg/generalEnvironmentMechanical.png b/src/assets/indexImg/generalEnvironmentMechanical.png new file mode 100644 index 0000000..9a9da28 Binary files /dev/null and b/src/assets/indexImg/generalEnvironmentMechanical.png differ diff --git a/src/components/assembly/RotationTable.vue b/src/components/assembly/RotationTable.vue index 8c8c8ba..bb53219 100644 --- a/src/components/assembly/RotationTable.vue +++ b/src/components/assembly/RotationTable.vue @@ -1,5 +1,5 @@ + + + + + diff --git a/src/components/headerBox/header2.vue b/src/components/headerBox/header2.vue index 33a1e07..1dde50f 100644 --- a/src/components/headerBox/header2.vue +++ b/src/components/headerBox/header2.vue @@ -1,5 +1,5 @@ @@ -359,16 +438,14 @@ defineExpose({ width: 100%; } h1 { - position: absolute; top: 10px; - } -.zh-title{ +.zh-title { margin-top: 6px; font-size: 2.5rem; } -.en-title{ +.en-title { font-size: 2rem; max-width: 600px; height: 80px; @@ -376,7 +453,6 @@ h1 { align-items: center; overflow: hidden; /* line-height: 80px; */ - } /* .header2 p { position: absolute; @@ -406,7 +482,7 @@ h1 { font-size: 20px; color: #fff; } -.tip{ +.tip { margin-top: 15px; } .tipspan { @@ -414,7 +490,7 @@ h1 { margin-left: 10px; align-items: center; } -.comeBack{ +.comeBack { position: absolute; /* width: 2rem; height: 2rem; */ @@ -422,11 +498,12 @@ h1 { left: 1.5rem; font-size: 3rem; color: #fff; + cursor: pointer; } -.comeBack>i{ +.comeBack > i { font-size: 3rem; } -.AbnormalData{ +.AbnormalData { position: absolute; display: flex; align-items: center; @@ -437,30 +514,30 @@ h1 { font-size: 3rem; color: #fff; } -.AbnormalData:hover{ - cursor:pointer; +.AbnormalData:hover { + cursor: pointer; } -.AbnormalData>span{ +.AbnormalData > span { font-size: 1rem; } -.popoverBOX{ +.popoverBOX { max-height: 15rem; font-size: 18px; overflow-y: auto; } -.popoverBOX li{ -padding: 10px 0 10px 0; +.popoverBOX li { + padding: 10px 0 10px 0; } -.lookdown{ +.lookdown { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; - color: #1C78C2; + color: #1c78c2; } -.lookdown:hover{ - cursor:pointer; +.lookdown:hover { + cursor: pointer; } .time { position: absolute; @@ -470,29 +547,48 @@ padding: 10px 0 10px 0; left: 4.2rem; font-size: 25px; } -.i-badge{ +.i-badge { width: 3rem; height: 3rem; } -.i-badge>i{ +.i-badge > i { font-size: 3rem; position: relative; top: -5px; } - /* .dv-scroll-board /deep/ .ceil { +/* .dv-scroll-board /deep/ .ceil { font-size: 1.2rem; -} */ +} */ .dv-scroll-boardclass :deep(.ceil) { font-size: 20px; } -.el-popper.is-dark:deep(){ +.el-popper.is-dark:deep() { background: #14274b !important; } -.el-popover.el-popper:deep(){ +.el-popover.el-popper:deep() { background: #14274b !important; } -.Abnormal-icon-yellow{ - color: #DDB14F; +.Abnormal-icon-yellow { + color: #ddb14f; +} +.lishijilu { + font-size: 2rem; + color: #fff; +} +.popoverHeader { + padding: 0 !important; + display: flex; + justify-content: flex-end; + align-items: center; + line-height: 1.5rem; +} +.popoverHeader span { + display: flex; + justify-content: center; + align-items: center; + padding: 5px; + /* border-radius: 50px; + background: linear-gradient(315deg, #404040, #4c4c4c); */ + /* box-shadow: -20px -20px 60px #3c3c3c, 20px 20px 60px #525252; */ } - diff --git a/src/http/Mechanics/index.ts b/src/http/Mechanics/index.ts index 8725b34..697a8ee 100644 --- a/src/http/Mechanics/index.ts +++ b/src/http/Mechanics/index.ts @@ -29,3 +29,15 @@ export function gatcountsOfMachineryFactoryInStatusTime(){ export function gatdeviceStatusInfoMF(data:any){ return get('/device/deviceStatusInfoMF',data) } + + +/**newIndex */ +//设备列表 +export function reqDeviceTotelListMF(){ + return get('/device/deviceTotelListMF') +} + +//状态数量 +export function reqDeviceTotelStatusMF() { + return get('/device/deviceTotelStatusMF') +} diff --git a/src/http/Trend/index.ts b/src/http/Trend/index.ts new file mode 100644 index 0000000..cec1269 --- /dev/null +++ b/src/http/Trend/index.ts @@ -0,0 +1,15 @@ +/* + * @FilePath: \wwwd:\code\screenFront\src\http\realtimeSecurity\index.ts + * @Author: 王路平 + * @文件版本: V1.0.0 + * @Date: 2023-02-14 08:45:45 + * @Description: + * + * 版权信息 : 2023 by ${再登软件}, All Rights Reserved. + */ +import {get,post} from "@/utils/http" + +//气压 +export function getCurrent24Trend(id:string){ + return get('/dataTrend/getCurrent24Trend',{id}) +} \ No newline at end of file diff --git a/src/http/index.ts b/src/http/index.ts index 11590ad..1a18726 100644 --- a/src/http/index.ts +++ b/src/http/index.ts @@ -1,5 +1,5 @@ /* - * @FilePath: \wwwd:\code\screenFront\src\http\index.ts + * @FilePath: \code\gitscreenFront\src\http\index.ts * @Author: 王路平 * @文件版本: V1.0.0 * @Date: 2023-03-14 11:14:41 @@ -12,4 +12,8 @@ import {get,post} from "@/utils/http" //报警数据 export function getAlarmListData(data:any){ return get('/alarm/getAlarmList',data) +} +//报警历史数据查询 +export function getAlarmListHistoryData(data:any){ + return get('/alarm/getAlarmListHistory',data) } \ No newline at end of file diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index e72daba..4a12262 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -271,5 +271,7 @@ export default { '料场':'Raw Material Area', '危废暂存间':'dangerous waste temporary storage room', '历史数据':'Historical Data', + '环境 实时监测系统':'环境 实时监测系统', + '传感器监测走势图':'传感器监测走势图', } } \ No newline at end of file diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index ea47a71..88f954e 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -271,5 +271,7 @@ export default { '料场':'料场', '危废暂存间':'危废暂存间', '历史数据':'历史数据', + '环境 实时监测系统':'环境 实时监测系统', + '传感器监测走势图':'传感器监测走势图', } } \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 90c0ae3..91ddfbc 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,5 @@ /* - * @FilePath: \screenFront\src\main.ts + * @FilePath: \code\gitscreenFront\src\main.ts * @Author: 王路平 * @文件版本: V1.0.0 * @Date: 2023-01-29 15:16:36 @@ -11,7 +11,9 @@ import { createApp } from 'vue' import App from './App.vue' import ElementPlus from 'element-plus' import 'element-plus/dist/index.css' - +import 'element-plus/theme-chalk/dark/css-vars.css' +import 'dayjs/locale/zh-cn' +import zhCn from 'element-plus/dist/locale/zh-cn.mjs' // import echarts from '@/utils/echarts.js' import echarts from '@/utils/echarts' import {createPinia} from 'pinia' @@ -26,4 +28,4 @@ const store = createPinia() app.config.globalProperties.$echarts = echarts;//vue3的挂载方式 app.use(store) app.use(i18n) -app.use(router).use(ElementPlus).use(dataV).mount('#app') \ No newline at end of file +app.use(router).use(ElementPlus, {locale: zhCn,}).use(dataV).mount('#app') \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts index 151249f..aa47344 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -155,11 +155,22 @@ const routes: Array = [ component: () => import("../views/generalEnvironmentjixiefenchang/index.vue"), }, + { + path: "/generalEnvironmentMechanical", + name: "generalEnvironmentMechanical", + component: () => + import("../views/generalEnvironmentMechanical/index.vue"), + }, { path: "/FactoryView", name: "FactoryView", component: () => import("../views/FactoryView/index.vue"), }, + { + path: "/FactoryViewTopo", + name: "FactoryViewTopo", + component: () => import("../views/FactoryViewTopo/index.vue"), + }, { path: "/FactoryView/:type", name: "FactoryViewEdit", @@ -237,6 +248,17 @@ const routes: Array = [ component: () => import("../views/Waterhouse/index.vue"), }, + { + path: "/TrendChart", + name: "TrendChart", + component: () => import("../views/TrendChart/index.vue"), + }, + + + + + + //理论二级 { path: "/Mechanics/:id", diff --git a/src/store/module/Mechanics.ts b/src/store/module/Mechanics.ts index e25c4f7..1ff3c54 100644 --- a/src/store/module/Mechanics.ts +++ b/src/store/module/Mechanics.ts @@ -1,5 +1,5 @@ /* - * @FilePath: \wwwd:\code\screenFront\src\store\module\Mechanics.ts + * @FilePath: \code\gitscreenFront\src\store\module\Mechanics.ts * @Author: 王路平 * @文件版本: V1.0.0 * @Date: 2023-02-06 15:58:13 @@ -102,7 +102,11 @@ export const useMechanicsStore = defineStore(Names.Mechanics, { //需要使用return将数据抛出 //getters内可相互使用计算结果 //使用时可直接放入标签内
Index.方法()
- getters: {}, + getters: { + getmechanicsData(state){ + return state.mechanicsData + } + }, //methods 可同步/异步,提交state //actions内获取state数据使用this // 使用方式 diff --git a/src/store/moduleSocket.ts b/src/store/moduleSocket.ts index d1f97b7..9e83ebe 100644 --- a/src/store/moduleSocket.ts +++ b/src/store/moduleSocket.ts @@ -9,7 +9,7 @@ */ import { defineStore } from "pinia"; import { Names } from '@/store/storeName' -import {gettime,clacendTime} from "@/utils/time" +import { gettime, clacendTime } from "@/utils/time" export const useSocketStore = defineStore(Names.socket, { // 使用方式 // const Index= useIndexStore() @@ -172,16 +172,35 @@ export const useSocketStore = defineStore(Names.socket, { * @函数备注: */ changePM(val) { - if (val.enName == 'welding') { - this.pm.welding.two = val.pm25 - this.pm.welding.ten = val.pm10 - } else if (val.enName == 'stuff') { - this.pm.stuff.two = val.pm25 - this.pm.stuff.ten = val.pm10 - } else if (val.enName == 'ornaments') { - this.pm.ornaments.two = val.pm25 - this.pm.ornaments.ten = val.pm10 - } + let arr = ['083e3900-3435-11ed-a7e1-fd42bca6c8c6', 'bcbfb530-88b2-11ed-a926-570995ad0254', '01336fd0-1fa0-11ed-9223-7db1174970a8'] + + // if (arr.indexOf(val.devId) > -1) { + // console.log(val,'这三个设备'); + + // } + + if (val.devId == '083e3900-3435-11ed-a7e1-fd42bca6c8c6') { + this.pm.welding.two = val.pm25 + this.pm.welding.ten = val.pm10 + } else if (val.devId == 'bcbfb530-88b2-11ed-a926-570995ad0254') { + this.pm.ornaments.two = val.pm25 + this.pm.ornaments.ten = val.pm10 + } else if (val.devId == '01336fd0-1fa0-11ed-9223-7db1174970a8') { + this.pm.stuff.two = val.pm25 + this.pm.stuff.ten = val.pm10 + } + + + // if (val.enName == 'welding') { + // this.pm.welding.two = val.pm25 + // this.pm.welding.ten = val.pm10 + // } else if (val.enName == 'stuff') { + // this.pm.stuff.two = val.pm25 + // this.pm.stuff.ten = val.pm10 + // } else if (val.enName == 'ornaments') { + // this.pm.ornaments.two = val.pm25 + // this.pm.ornaments.ten = val.pm10 + // } }, /** @@ -322,20 +341,20 @@ export const useSocketStore = defineStore(Names.socket, { let pIndex = this.newVerticalNum.findIndex(item => item.type == val.type) let cIndex = null if (pIndex != -1) { - cIndex = this.newVerticalNum[pIndex].value.findIndex(item => item.name == val.data.name) + cIndex = this.newVerticalNum[pIndex].value.findIndex(item => item.devId == val.data.devId) } if (cIndex != -1) { - if (val.data.val>this.newVerticalNum[pIndex].limit) { - + if (val.data.val > this.newVerticalNum[pIndex].limit) { + let now = new Date().getTime() if (this.newVerticalNum[pIndex].value[cIndex].date == null) { this.newVerticalNum[pIndex].value[cIndex].date = gettime() this.newVerticalNum[pIndex].value[cIndex].time = now } - + let time = this.newVerticalNum[pIndex].value[cIndex].time - this.newVerticalNum[pIndex].value[cIndex].continuous = clacendTime(now,time) + this.newVerticalNum[pIndex].value[cIndex].continuous = clacendTime(now, time) } else { this.newVerticalNum[pIndex].value[cIndex].date = null this.newVerticalNum[pIndex].value[cIndex].time = null diff --git a/src/store/moduleSocketMechanics.ts b/src/store/moduleSocketMechanics.ts new file mode 100644 index 0000000..c0f9f1f --- /dev/null +++ b/src/store/moduleSocketMechanics.ts @@ -0,0 +1,239 @@ +/* + * @FilePath: \wwwd:\code\screenFront\src\store\moduleSocketjixie.ts + * @Author: 王路平 + * @文件版本: V1.0.0 + * @Date: 2023-02-06 15:58:13 + * @Description: + * + * 版权信息 : 2023 by ${再登软件}, All Rights Reserved. + */ +import { defineStore } from "pinia"; +import { Names } from '@/store/storeName' +import { gettime, clacendTime } from "@/utils/time" +export const useSocketStore = defineStore(Names.socketMechanics, { + // 使用方式 + // const Index= useIndexStore() + // 1、Index.{数据}++ + // 2、Index.$patch({数据:??}) + // 3、Index.$patch((state)=>{ state.数据=??}) + // 4、通过action修改 + state: () => { + return { + humiture: [ + { "devId": "c6f036c0-33fc-11ed-a7e1-fd42bca6c8c6", "name": "精饰车间", "temp": "33.4", "humidity": "30.9" }, + { "devId": "c651b930-3b15-11ed-b6af-15994988a6b3", "name": "精加车间", "temp": "26.1", "humidity": "47" }, + { "devId": "9c4be1e0-33fb-11ed-a7e1-fd42bca6c8c6", "name": "焊接车间", "temp": "29.3", "humidity": "37.6" }, + { "devId": "0e77f0b0-33fc-11ed-a7e1-fd42bca6c8c6", "name": "大件车间", "temp": "28.6", "humidity": "38.4" }, + { "devId": "91f6d000-33fc-11ed-a7e1-fd42bca6c8c6", "name": "机加车间", "temp": "29.9", "humidity": "36.2" } + ], + + // humiture:{Humiture:[],bottom:{humidity:null,temp:null,name:null},top:{humidity:null,temp:null,name:null}}, //温湿度 + pm: [ + { + "devId": "01336fd0-1fa0-11ed-9223-7db1174970a8", + "name": "大件车间中部粉尘", + "pm25": "45", + "pm10": "53" + }, + { + "devId": "083e3900-3435-11ed-a7e1-fd42bca6c8c6", + "name": "焊接车间粉尘", + "pm25": "30", + "pm10": "36" + }, + { + "devId": "270e1500-eee1-11ed-b2ee-2d727e0cafab", + "name": "精加车间粉尘", + "pm25": "71", + "pm10": "84" + }, + { + "devId": "54058c30-eee3-11ed-b2ee-2d727e0cafab", + "name": "机加车间粉尘", + "pm25": "22", + "pm10": "26" + }, + { + "devId": "76efb040-eee3-11ed-b2ee-2d727e0cafab", + "name": "大件车间东部粉尘", + "pm25": "53", + "pm10": "60" + }, + { + "devId": "a6020310-eee3-11ed-b2ee-2d727e0cafab", + "name": "大件车间西部粉尘", + "pm25": "66", + "pm10": "75" + }, + { + "devId": "bcbfb530-88b2-11ed-a926-570995ad0254", + "name": "精饰车间粉尘", + "pm25": "6", + "pm10": "7" + } + ], + newVerticalNum: [ + { + "type": "TVOC", + "icon": "icon-TVOC-Outlined", + "title": "TVOC检测", + "limit": "0.5", + "unit": "mg/m³", + "value": [ + { + "name": "精饰车间TVOC/甲醛监测传感器", + "val": null, + "type": "TVOC_CH2O", + "field": "TVOC" + } + ] + }, + { + "type": "Smoke", + "icon": "icon-yanwubaojingqi", + "title": "烟雾检测", + "limit": "100", + "unit": null, + "value": [ + { + "name": "精饰车间烟雾传感器", + "val": null, + "type": "Smoke", + "field": "Smoke_Reg" + } + ] + }, + { + "type": "Methane", + "icon": "icon-ranqi", + "title": "燃气检测", + "limit": "0", + "unit": null, + "value": [ + { + "name": "精饰车间燃气监测", + "val": null, + "type": "Methane", + "field": "Methane_Reg" + }, + { + "name": "食堂燃气监测", + "val": null, + "type": "Methane", + "field": "Methane_Reg" + }, + { + "name": "锅炉房燃气监测", + "val": null, + "type": "Methane", + "field": "Methane_Reg" + } + ] + }, + { + "type": "CH2O", + "icon": "icon-app_icons--", + "title": "甲醛检测", + "limit": "0.08", + "unit": "mg/m³", + "value": [ + { + "name": "精饰车间TVOC/甲醛监测传感器", + "val": null, + "type": "TVOC_CH2O", + "field": "CH2O" + } + ] + }, + { + "type": "FIRE", + "icon": "icon-weibiaoti1", + "title": "明火检测", + "limit": "0", + "unit": null, + "value": [ + { + "name": "精饰车间火花传感器", + "val": null, + "type": "FIRE", + "field": "Fire_Reg" + } + ] + } + ] + } + }, + //computed 修改一些值 + //需要使用return将数据抛出 + //getters内可相互使用计算结果 + //使用时可直接放入标签内
Index.方法()
+ getters: { + + }, + actions: { + //设置新的安全检测数据 + setNewVerticalNum(val) { + this.newVerticalNum = val + }, + //更新 新的安全检测数据 + changeNewVerticalNum(val) { + //{"type":"Smoke","data":{"name":"精饰车间烟雾传感器","val":"100"}} + let pIndex = this.newVerticalNum.findIndex(item => item.type == val.type) + let cIndex = null + if (pIndex != -1) { + cIndex = this.newVerticalNum[pIndex].value.findIndex(item => item.devId == val.data.devId) + } + if (cIndex != -1) { + if (val.data.val > this.newVerticalNum[pIndex].limit) { + + let now = new Date().getTime() + if (this.newVerticalNum[pIndex].value[cIndex].date == null) { + this.newVerticalNum[pIndex].value[cIndex].date = gettime() + this.newVerticalNum[pIndex].value[cIndex].time = now + } + + let time = this.newVerticalNum[pIndex].value[cIndex].time + + this.newVerticalNum[pIndex].value[cIndex].continuous = clacendTime(now, time) + } else { + this.newVerticalNum[pIndex].value[cIndex].date = null + this.newVerticalNum[pIndex].value[cIndex].time = null + } + this.newVerticalNum[pIndex].value[cIndex].val = val.data.val + this.newVerticalNum[pIndex].value[cIndex].status = true + } + }, + /** + * @函数功能: + * @param {*} val 温湿度数据 + * @出口参数: + * @函数备注: + */ + changeHumiture(val) { + // console.log(this.humiture.Humiture); + + + val.Humiture.forEach(res => { + this.humiture.forEach(ele => { + if (res.devId == ele.devId) { + ele.humidity = res.humidity + ele.temp = res.temp + } + }) + }) + + }, + /** + * 更新粉尘数据 + */ + changeDust(val) { + this.pm.forEach(res => { + if (res.devId == val.devId) { + res.pm25 = val.pm25 + res.pm10 = val.pm10 + } + }) + } + } + +}) \ No newline at end of file diff --git a/src/store/moduleSocketjixie.ts b/src/store/moduleSocketjixie.ts index e5e9254..5c9933c 100644 --- a/src/store/moduleSocketjixie.ts +++ b/src/store/moduleSocketjixie.ts @@ -172,16 +172,16 @@ export const useSocketStore = defineStore(Names.socketjixiefenchang,{ * @函数备注: */ changePM(val){ - if(val.enName=='welding'){ - this.pm.welding.two=val.pm25 - this.pm.welding.ten=val.pm10 - }else if(val.enName=='stuff'){ - this.pm.stuff.two=val.pm25 - this.pm.stuff.ten=val.pm10 - }else if(val.enName=='ornaments'){ - this.pm.ornaments.two=val.pm25 - this.pm.ornaments.ten=val.pm10 - } + if (val.devId == '083e3900-3435-11ed-a7e1-fd42bca6c8c6') { + this.pm.welding.two = val.pm25 + this.pm.welding.ten = val.pm10 + } else if (val.devId == 'bcbfb530-88b2-11ed-a926-570995ad0254') { + this.pm.ornaments.two = val.pm25 + this.pm.ornaments.ten = val.pm10 + } else if (val.devId == '01336fd0-1fa0-11ed-9223-7db1174970a8') { + this.pm.stuff.two = val.pm25 + this.pm.stuff.ten = val.pm10 + } }, /** @@ -319,12 +319,12 @@ export const useSocketStore = defineStore(Names.socketjixiefenchang,{ this.newVerticalNum = val }, //更新 新的安全检测数据 - changeNewVerticalNum(val) { + changeNewVerticalNum(val) { //{"type":"Smoke","data":{"name":"精饰车间烟雾传感器","val":"100"}} let pIndex = this.newVerticalNum.findIndex(item => item.type == val.type) let cIndex = null if (pIndex != -1) { - cIndex = this.newVerticalNum[pIndex].value.findIndex(item => item.name == val.data.name) + cIndex = this.newVerticalNum[pIndex].value.findIndex(item => item.devId == val.data.devId) } if (cIndex != -1) { if (val.data.val>this.newVerticalNum[pIndex].limit) { @@ -343,6 +343,7 @@ export const useSocketStore = defineStore(Names.socketjixiefenchang,{ this.newVerticalNum[pIndex].value[cIndex].time = null } this.newVerticalNum[pIndex].value[cIndex].val = val.data.val + this.newVerticalNum[pIndex].value[cIndex].status = true } } } diff --git a/src/store/storeName.ts b/src/store/storeName.ts index c479e52..97ae740 100644 --- a/src/store/storeName.ts +++ b/src/store/storeName.ts @@ -27,4 +27,5 @@ export const enum Names{ MechanicalViewJijia="MechanicalViewJijia", MechanicalViewJingjia="MechanicalViewJingjia", MechanicalViewJingshi="MechanicalViewJingshi", + socketMechanics='socketMechanics', } \ No newline at end of file diff --git a/src/utils/devSever.ts b/src/utils/devSever.ts index 99d6906..8cd0b4f 100644 --- a/src/utils/devSever.ts +++ b/src/utils/devSever.ts @@ -1,5 +1,5 @@ /* - * @FilePath: \screenFront\src\utils\devSever.ts + * @FilePath: \gitscreenFront\src\utils\devSever.ts * @Author: 王路平 * @文件版本: V1.0.0 * @Date: 2023-03-03 08:59:37 diff --git a/src/utils/time.ts b/src/utils/time.ts index 42824d4..698b05a 100644 --- a/src/utils/time.ts +++ b/src/utils/time.ts @@ -1,5 +1,5 @@ /* - * @FilePath: \daping\src\utils\time.ts + * @FilePath: \code\gitscreenFront\src\utils\time.ts * @Author: 王路平 * @文件版本: V1.0.0 * @Date: 2023-02-07 13:43:31 @@ -9,10 +9,10 @@ */ import { getStoredLanguage } from "../utils/languageStorage"; -export function gettime(data = null) { +export function gettime(data = null,type = 1) { var time if (data) { - time = new Date(data); + data instanceof Date? time=data : time = new Date(data); } else { time = new Date(); } @@ -38,7 +38,14 @@ export function gettime(data = null) { if (minutes < 10) minutes = "0" + minutes; if (seconds < 10) seconds = "0" + seconds; - return year + "-" + month + "-" + dates + " " + hours + ':' + minutes + ':' + seconds + ' ' + arr[day]; + if(type==1){ + return year + "-" + month + "-" + dates + " " + hours + ':' + minutes + ':' + seconds + ' ' + arr[day]; + }else if (type == 2){ + return year + "-" + month + "-" + dates + " " + hours + ':' + minutes + ':' + seconds; + }else{ + return year + "-" + month + "-" + dates + " " + hours + ':' + minutes + ':' + seconds + ' ' + arr[day]; + } + } export function clacendTime(endtime, nowtime) { let newDate = Math.abs(endtime - nowtime) @@ -47,4 +54,4 @@ export function clacendTime(endtime, nowtime) { var m = Math.floor(newDate / 1000 / 60 % 60) var s = Math.floor(newDate / 1000 % 60) return day + '天' + h + '时' + m + '分' + s + '秒' -} \ No newline at end of file +} diff --git a/src/utils/websocket.ts b/src/utils/websocket.ts index d501aa6..f72a1af 100644 --- a/src/utils/websocket.ts +++ b/src/utils/websocket.ts @@ -1,5 +1,5 @@ /* - * @FilePath: \daping\src\utils\websocket.ts + * @FilePath: \gitscreenFront\src\utils\websocket.ts * @Author: 王路平 * @文件版本: V1.0.0 * @Date: 2023-02-24 13:14:26 @@ -58,7 +58,7 @@ export const closeWebsocket = () => { if (wsObj) { writeToScreen('手动关闭websocket') wsObj.close() // 关闭websocket - // wsObj.onclose() // 关闭websocket(如果上面的关闭不生效就加上这一条) + wsObj.onclose() // 关闭websocket(如果上面的关闭不生效就加上这一条) // 关闭重连 lockReconnect = true wsCreateHandler && clearTimeout(wsCreateHandler) @@ -153,6 +153,8 @@ const onWsClose = (event) => { } const onWsError = (event) => { // writeToScreen('onWsError: ', event.data) +console.log(event); + errorCallback() } diff --git a/src/views/AerialView/content/tip.vue b/src/views/AerialView/content/tip.vue index 6831499..3d9619a 100644 --- a/src/views/AerialView/content/tip.vue +++ b/src/views/AerialView/content/tip.vue @@ -11,9 +11,10 @@ @@ -37,6 +44,8 @@ import border3 from "@/components/borderBox/border3.vue"; import pm from "./../components/pm.vue"; import power from "./chart/power2023.vue"; import chart from "@/components/assembly/chart2.vue"; +import gas from "./chart/gas.vue"; +import water from "./chart/water.vue"; import { useRoute, useRouter } from "vue-router"; import { useEnergyConsumeStore } from "@/store/module/energyConsume"; import { useI18n } from 'vue-i18n' @@ -49,6 +58,9 @@ let Productionref = ref(); let borderref = ref() let pmref = ref() let pm_timer = null + +let gasref = ref(); +let waterref = ref(); let props = defineProps<{ width: number; height: number; @@ -72,12 +84,13 @@ function reset(val: any) { } const powerBox = (width: any, height: any) => { - let a = calcWH(height, width, 1, 3, 0); + let a = calcWH(height, width, 1, 24, 0); //修改高度 - powerref.value.setchartWH(a.oWidth - 20, a.oHeight - 20); - Productionref.value.setchartWH(a.oWidth - 20, a.oHeight - 20); - pmref.value.setchartWH(a.oWidth - 40, a.oHeight - 40) - // yields.value.setchartWH(a.oWidth, a.oHeight - 30); + powerref.value.setchartWH(a.oWidth*7 - 20, a.oHeight - 20); + Productionref.value.setchartWH(a.oWidth*7 - 20, a.oHeight - 20); + pmref.value.setchartWH(a.oWidth*7 - 40, a.oHeight - 40) + gasref.value.setchartWH(a.oWidth*3-20, a.oHeight/2 - 20); + waterref.value.setchartWH(a.oWidth*3-20, a.oHeight/2 - 20); }; let powerOption = reactive({ title: "", @@ -103,9 +116,9 @@ let powerOption = reactive({ right: 20, }, grid: { - top: "8%", + top: "13%", left: "3%", - right: "0%", + right: "5%", bottom: "3%", containLabel: true, }, @@ -146,9 +159,9 @@ let ProductionOption = reactive({ right: 20, }, grid: { - top: "8%", + top: "13%", left: "3%", - right: "0%", + right: "5%", bottom: "3%", containLabel: true, }, @@ -166,20 +179,6 @@ let ProductionOption = reactive({ }, }); let Data = { power: { "1月": 11, "2月": 22, "3月": 11, "4月": 22 }, Production: { "1月": 11, "2月": 22, "3月": 11, "4月": 22 } } -// async function getpower() { -// let result: any = await getPowerData({ time: 1 }); - -// if (result.code == 200) { -// result.data.name = result.data.name.reverse(); -// result.data.listData.forEach((res) => { -// for (let key in res.month) { -// res.month[key] = res.month[key].reverse(); -// } -// }); -// power1.value.setData(result.data); -// // yields.value.setData(result.data); -// } -// } let pm_index = 0 function setcontentData(val) { clearInterval(pm_timer) @@ -279,6 +278,20 @@ function setcontentData(val) { } }, 3000) } + + +} + // 用水量用气量 +function setWaterGas(val:any){ +console.log(val); +val.forEach(res=>{ + if(res.deptName=='喷漆车间' && res.type=='GasDetail'){ + gasref.value.setData(res.usageNum); + } + if(res.deptName=='生产区' && res.type=='WaterDetail'){ + waterref.value.setData(res.usageNum); + } +}) } onMounted(() => { }); @@ -287,6 +300,7 @@ onUnmounted(() => { }); defineExpose({ setcontentData, + setWaterGas }); diff --git a/src/views/PaintShopView/View1/chart/gas.vue b/src/views/PaintShopView/View1/chart/gas.vue new file mode 100644 index 0000000..808d62f --- /dev/null +++ b/src/views/PaintShopView/View1/chart/gas.vue @@ -0,0 +1,169 @@ + + + + + + + diff --git a/src/views/PaintShopView/View1/chart/water.vue b/src/views/PaintShopView/View1/chart/water.vue new file mode 100644 index 0000000..5db7248 --- /dev/null +++ b/src/views/PaintShopView/View1/chart/water.vue @@ -0,0 +1,169 @@ + + + + + + + diff --git a/src/views/PaintShopView/View1/index.vue b/src/views/PaintShopView/View1/index.vue index 08edab6..3b9d4e6 100644 --- a/src/views/PaintShopView/View1/index.vue +++ b/src/views/PaintShopView/View1/index.vue @@ -36,6 +36,7 @@ import { calcWH } from '@/components/ts/selfAdaption' import { Offsite } from "@/store/module/offsite"; import { connectWebsocket, closeWebsocket } from "@/utils/websocket"; import { getSensorByDept } from "@/http/PaintShopView/index"; +import {getconsumeDetail} from '@/http/energyConsume' import bottom from "./bottom.vue" import top from "./top.vue" import { useI18n } from 'vue-i18n' @@ -77,6 +78,15 @@ async function getSensorByDeptfun() { bottomref.value.setcontentData(result.data) } } + +async function getconsumeDetailfun(){ + let result:any = await getconsumeDetail() + + if(result.code==200){ + bottomref.value.setWaterGas(result.data) + } +} + function getWebsocket(val) { // headerref.value.HeadergetWebsocket(val) try { @@ -108,6 +118,7 @@ onMounted(() => { }, 1000); }) getSensorByDeptfun() + getconsumeDetailfun() connectWebsocket(null, null, getWebsocket, errWebsocket); }) onUnmounted(() => { diff --git a/src/views/PaintShopView/View1/top.vue b/src/views/PaintShopView/View1/top.vue index c7aa413..9d06f5b 100644 --- a/src/views/PaintShopView/View1/top.vue +++ b/src/views/PaintShopView/View1/top.vue @@ -268,7 +268,7 @@ function setcontentData(val) { return { name: item.name, val: item.data,status:item.status }; }); verticalNum3.value.setData(val.FIRE, 'icon-weibiaoti1', 0, "") - verticalNum4.value.setData(noise, 'icon-shengyin', 120, "dB") + verticalNum4.value.setData(noise, 'icon-shengyin', 85, "dB") verticalNum5.value.setData(Smoke, 'icon-yanwubaojingqi', 100, "PPM") verticalNum6.value.setData(CH2O, 'icon-app_icons--', 0.08, "mg/m3") verticalNum7.value.setData(TVOC, 'icon-TVOC-Outlined', 0.5, "mg/m3") diff --git a/src/views/PaintShopView/finishView/top.vue b/src/views/PaintShopView/finishView/top.vue index ea913a8..e9bee6c 100644 --- a/src/views/PaintShopView/finishView/top.vue +++ b/src/views/PaintShopView/finishView/top.vue @@ -281,7 +281,7 @@ let temp_humi_index = 0 return { name: item.name, val: item.data,status:item.status }; }); // verticalNum3.value.setData(val.FIRE,'icon-ranqi',5,"") - verticalNum4.value.setData(noise,'icon-shengyin',120,"dB") + verticalNum4.value.setData(noise,'icon-shengyin',85,"dB") // verticalNum5.value.setData(val.Smoke,'icon-yanwubaojingqi',200,"") verticalNum6.value.setData(CH2O,'icon-app_icons--',0.08,"mg/m3") verticalNum7.value.setData(TVOC,'icon-TVOC-Outlined',0.5,"mg/m3") diff --git a/src/views/PaintShopView/machiningView/top.vue b/src/views/PaintShopView/machiningView/top.vue index 9056166..fb2a089 100644 --- a/src/views/PaintShopView/machiningView/top.vue +++ b/src/views/PaintShopView/machiningView/top.vue @@ -281,7 +281,7 @@ let temp_humi_index = 0 return { name: item.name, val: item.data,status:item.status }; }); // verticalNum3.value.setData(val.FIRE,'icon-ranqi',5,"") - verticalNum4.value.setData(noise,'icon-shengyin',120,"dB") + verticalNum4.value.setData(noise,'icon-shengyin',85,"dB") // verticalNum5.value.setData(val.Smoke,'icon-yanwubaojingqi',200,"") verticalNum6.value.setData(CH2O,'icon-app_icons--',0.08,"mg/m3") verticalNum7.value.setData(TVOC,'icon-TVOC-Outlined',0.5,"mg/m3") diff --git a/src/views/PaintShopView/stuffView/top.vue b/src/views/PaintShopView/stuffView/top.vue index 2b87281..98ea596 100644 --- a/src/views/PaintShopView/stuffView/top.vue +++ b/src/views/PaintShopView/stuffView/top.vue @@ -281,7 +281,7 @@ function setcontentData(val) { return { name: item.name, val: item.data,status:item.status }; }); // verticalNum3.value.setData(val.FIRE,'icon-ranqi',5,"") - verticalNum4.value.setData(noise, 'icon-shengyin', 120, "dB") + verticalNum4.value.setData(noise, 'icon-shengyin', 85, "dB") // verticalNum5.value.setData(val.Smoke,'icon-yanwubaojingqi',200,"") verticalNum6.value.setData(CH2O, 'icon-app_icons--', 0.08, "mg/m3") verticalNum7.value.setData(TVOC, 'icon-TVOC-Outlined', 0.5, "mg/m3") diff --git a/src/views/PaintShopView/weldView/top.vue b/src/views/PaintShopView/weldView/top.vue index 968ed99..08d5c49 100644 --- a/src/views/PaintShopView/weldView/top.vue +++ b/src/views/PaintShopView/weldView/top.vue @@ -280,7 +280,7 @@ function setcontentData(val) { return { name: item.name, val: item.data,status:item.status }; }); // verticalNum3.value.setData(val.FIRE,'icon-ranqi',5,"") - verticalNum4.value.setData(noise, 'icon-shengyin', 120, "dB") + verticalNum4.value.setData(noise, 'icon-shengyin', 85, "dB") // verticalNum5.value.setData(val.Smoke,'icon-yanwubaojingqi',200,"") verticalNum6.value.setData(CH2O, 'icon-app_icons--', 0.08, "mg/m3") verticalNum7.value.setData(TVOC, 'icon-TVOC-Outlined', 0.5, "mg/m3") diff --git a/src/views/Temp/Large_Format/component/Details.vue b/src/views/Temp/Large_Format/component/Details.vue index 1131c69..559e671 100644 --- a/src/views/Temp/Large_Format/component/Details.vue +++ b/src/views/Temp/Large_Format/component/Details.vue @@ -38,8 +38,9 @@ v-model:visible="visible" :content="tipcontent" placement="top" - effect="dark" + effect="light" trigger="click" + popper-class="tooltip-class" virtual-triggering :virtual-ref="triggerRef" /> @@ -187,6 +188,9 @@ p { justify-content: center; align-items: center; } +.el-popper{ + color: #fff !important; +} /* .dv-scroll-board :deep(.row-item) { line-height: normal !important; align-items: center; @@ -195,3 +199,8 @@ p { margin:0px 50px 0px 50px } */ + \ No newline at end of file diff --git a/src/views/Temp/Large_Format/component/RotationTable.vue b/src/views/Temp/Large_Format/component/RotationTable.vue index 2d23a45..661cb0f 100644 --- a/src/views/Temp/Large_Format/component/RotationTable.vue +++ b/src/views/Temp/Large_Format/component/RotationTable.vue @@ -1,5 +1,5 @@ @@ -23,19 +23,17 @@ import {getCurrentInstance, onMounted, reactive, ref} from "vue" import {EDataPerson,EDataPersonItem} from '@/type/energyConsume' import 'echarts-liquidfill' - -import border4 from "@/components/borderBox/border4.vue" +import border6 from "@/components/borderBox/border6.vue"; const { proxy } = getCurrentInstance() as any; let props=defineProps<{ title:string, - data:any }>() -let water=ref() +let gas=ref() let refborder4=ref() const echartsData = reactive({ - water:{ + gas:{ div:null, data:null, title:'', @@ -43,22 +41,24 @@ const echartsData = reactive({ }, }) -const setData=()=>{ - - echartsData.water!.div=water.value - echartsData.water!.title=props.title - echartsData.water!.data=({ +const setData=(value:any)=>{ + + echartsData.gas!.div=gas.value + echartsData.gas!.title=props.title + echartsData.gas!.data=({ title: { // 标题 - text: echartsData.water!.title, + text: echartsData.gas!.title, textStyle:{ color:'#fff', fontSize:20 - } + }, + top:'2%' }, series: [{ type: 'liquidFill', radius: '80%', //水球大小 + shape:'rect', center: ['50%', '50%'], waveAnimation: true, color: [ @@ -95,7 +95,9 @@ const setData=()=>{ fontWeight: 'bold', color: '#fff', }, - formatter:props.data + formatter:function(params){ + return value + } }, }, @@ -109,8 +111,7 @@ const setData=()=>{ }], }) - -change(echartsData.water) +change(echartsData.gas) } const change = (item:EDataPersonItem) => { @@ -123,32 +124,32 @@ item.box = Ebox }; function setchartWH(width:any,height:any){ - echartsData.water!.div=water.value - water.value.style.height=height+'px' - water.value.style.width=width+'px' + // echartsData.water!.div=water.value + gas.value.style.height=height-20+'px' + gas.value.style.width=width+'px' refborder4.value.resetWH() -if(echartsData.water.box){ - echartsData.water.box.resize() +if(echartsData.gas.box){ + echartsData.gas.box.resize() } } onMounted(() => { - setData() + // setData() }) // return{setchartWH} defineExpose({ setchartWH, -// setData + setData }) + \ No newline at end of file diff --git a/src/views/generalEnvironmentMechanical/components/gas.vue b/src/views/generalEnvironmentMechanical/components/gas.vue new file mode 100644 index 0000000..136cd0c --- /dev/null +++ b/src/views/generalEnvironmentMechanical/components/gas.vue @@ -0,0 +1,168 @@ + + + + + + + diff --git a/src/views/generalEnvironmentMechanical/components/humidity.vue b/src/views/generalEnvironmentMechanical/components/humidity.vue new file mode 100644 index 0000000..223eaed --- /dev/null +++ b/src/views/generalEnvironmentMechanical/components/humidity.vue @@ -0,0 +1,266 @@ + + + + + + \ No newline at end of file diff --git a/src/views/generalEnvironmentMechanical/components/humidityBar.vue b/src/views/generalEnvironmentMechanical/components/humidityBar.vue new file mode 100644 index 0000000..f34a32c --- /dev/null +++ b/src/views/generalEnvironmentMechanical/components/humidityBar.vue @@ -0,0 +1,198 @@ + + + + + diff --git a/src/views/generalEnvironmentMechanical/components/pipe.vue b/src/views/generalEnvironmentMechanical/components/pipe.vue new file mode 100644 index 0000000..d308e4b --- /dev/null +++ b/src/views/generalEnvironmentMechanical/components/pipe.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/generalEnvironmentMechanical/components/pm.vue b/src/views/generalEnvironmentMechanical/components/pm.vue new file mode 100644 index 0000000..38fabb0 --- /dev/null +++ b/src/views/generalEnvironmentMechanical/components/pm.vue @@ -0,0 +1,273 @@ + + + + + diff --git a/src/views/generalEnvironmentMechanical/components/power.vue b/src/views/generalEnvironmentMechanical/components/power.vue new file mode 100644 index 0000000..2273ff4 --- /dev/null +++ b/src/views/generalEnvironmentMechanical/components/power.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/src/views/generalEnvironmentMechanical/components/power2023.vue b/src/views/generalEnvironmentMechanical/components/power2023.vue new file mode 100644 index 0000000..fd32e2a --- /dev/null +++ b/src/views/generalEnvironmentMechanical/components/power2023.vue @@ -0,0 +1,276 @@ + + + + + + diff --git a/src/views/generalEnvironmentMechanical/components/verticalNumLoop.vue b/src/views/generalEnvironmentMechanical/components/verticalNumLoop.vue new file mode 100644 index 0000000..e8173f8 --- /dev/null +++ b/src/views/generalEnvironmentMechanical/components/verticalNumLoop.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/src/views/generalEnvironmentMechanical/index.vue b/src/views/generalEnvironmentMechanical/index.vue new file mode 100644 index 0000000..24a7514 --- /dev/null +++ b/src/views/generalEnvironmentMechanical/index.vue @@ -0,0 +1,476 @@ + + + + + + diff --git a/src/views/generalEnvironmentjixiefenchang/content/right.vue b/src/views/generalEnvironmentjixiefenchang/content/right.vue index eb0a4d5..f274e34 100644 --- a/src/views/generalEnvironmentjixiefenchang/content/right.vue +++ b/src/views/generalEnvironmentjixiefenchang/content/right.vue @@ -1,120 +1,123 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ - + - + \ No newline at end of file diff --git a/src/views/index.vue b/src/views/index.vue index 08df3fa..9f457e9 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,5 +1,5 @@ @@ -23,7 +23,7 @@ -
-
  • diff --git a/src/views/realtimeSecurity/content/chart/verticalNumLoop.vue b/src/views/realtimeSecurity/content/chart/verticalNumLoop.vue index 575da97..6d94fcb 100644 --- a/src/views/realtimeSecurity/content/chart/verticalNumLoop.vue +++ b/src/views/realtimeSecurity/content/chart/verticalNumLoop.vue @@ -5,7 +5,7 @@
    -
    • diff --git a/src/views/realtimeSecurity/content/content.vue b/src/views/realtimeSecurity/content/content.vue index 67e3a13..4d8fba8 100644 --- a/src/views/realtimeSecurity/content/content.vue +++ b/src/views/realtimeSecurity/content/content.vue @@ -1,96 +1,125 @@ +.topTip { + width: 100%; + height: 150px; +} diff --git a/src/views/realtimeSecurity/index.vue b/src/views/realtimeSecurity/index.vue index d9355fe..06156ab 100644 --- a/src/views/realtimeSecurity/index.vue +++ b/src/views/realtimeSecurity/index.vue @@ -77,7 +77,7 @@ function getWebsocket(val) { //精饰车间燃气监测 if (data.type == "paintingGas") { store.changepaintingGas(data.msg); - let verticalData = {name:data.msg.devName,val:data.msg.paintingGas.value} + let verticalData = {name:data.msg.devName,val:data.msg.paintingGas.value,devId:data.msg.devId} store.changeNewVerticalNum({type:'Methane',data:verticalData}) } @@ -85,7 +85,7 @@ function getWebsocket(val) { if (data.type == "boilerGas") { // store.changePM(data.msg) store.changeboilerGas(data.msg.boilerGas); - let verticalData = {name:data.msg.devName,val:data.msg.boilerGas.value} + let verticalData = {name:data.msg.devName,val:data.msg.boilerGas.value,devId:data.msg.devId} store.changeNewVerticalNum({type:'Methane',data:verticalData}) } @@ -93,15 +93,15 @@ function getWebsocket(val) { if (data.type == "canteenGas") { // store.changeHumiture(data.msg) store.changecanteenGas(data.msg.canteenGas); - let verticalData = {name:data.msg.devName,val:data.msg.canteenGas.value} + let verticalData = {name:data.msg.devName,val:data.msg.canteenGas.value,devId:data.msg.devId} store.changeNewVerticalNum({type:'Methane',data:verticalData}) } //甲醛TVOC if (data.type == "TVOC_CH2O") { store.changeTVOC_CH2O(data.msg); - let verticalData_TVOC = {name:data.msg.TVOC.name,val:data.msg.TVOC.value} + let verticalData_TVOC = {name:data.msg.TVOC.name,val:data.msg.TVOC.value,devId:data.msg.TVOC.devId} store.changeNewVerticalNum({type:'TVOC',data:verticalData_TVOC}) - let verticalData_CH2O = {name:data.msg.CH2O.name,val:data.msg.CH2O.value} + let verticalData_CH2O = {name:data.msg.CH2O.name,val:data.msg.CH2O.value,devId:data.msg.CH2O.devId} store.changeNewVerticalNum({type:'CH2O',data:verticalData_CH2O}) } @@ -109,7 +109,7 @@ function getWebsocket(val) { if (data.type == "flame") { // store.changeHumiture(data.msg) store.changeflame(data.msg.flame); - let verticalData = {name:data.msg.devName,val:data.msg.flame.value} + let verticalData = {name:data.msg.devName,val:data.msg.flame.value,devId:data.msg.devId} store.changeNewVerticalNum({type:'FIRE',data:verticalData}) @@ -119,7 +119,7 @@ function getWebsocket(val) { // store.changeHumiture(data.msg) // store.changepaintingGas(data.msg) store.changesmoke(data.msg.smoke); - let verticalData = {name:data.msg.devName,val:data.msg.smoke.value} + let verticalData = {name:data.msg.devName,val:data.msg.smoke.value,devId:data.msg.devId} store.changeNewVerticalNum({type:'Smoke',data:verticalData}) // console.log(JSON.stringify({type:'Smoke',data:verticalData}),"烟雾传感器"); } diff --git a/src/views/realtimeSecurityJixiefenchang/content/chart/verticalNum.vue b/src/views/realtimeSecurityJixiefenchang/content/chart/verticalNum.vue index a862e1a..c8407f9 100644 --- a/src/views/realtimeSecurityJixiefenchang/content/chart/verticalNum.vue +++ b/src/views/realtimeSecurityJixiefenchang/content/chart/verticalNum.vue @@ -15,7 +15,7 @@
      -
      • diff --git a/src/views/realtimeSecurityJixiefenchang/content/chart/verticalNumLoop.vue b/src/views/realtimeSecurityJixiefenchang/content/chart/verticalNumLoop.vue index 4c605ab..dc47feb 100644 --- a/src/views/realtimeSecurityJixiefenchang/content/chart/verticalNumLoop.vue +++ b/src/views/realtimeSecurityJixiefenchang/content/chart/verticalNumLoop.vue @@ -5,7 +5,7 @@
        -
        • diff --git a/src/views/realtimeSecurityJixiefenchang/index.vue b/src/views/realtimeSecurityJixiefenchang/index.vue index 9c34fda..2d2e99f 100644 --- a/src/views/realtimeSecurityJixiefenchang/index.vue +++ b/src/views/realtimeSecurityJixiefenchang/index.vue @@ -77,7 +77,7 @@ function getWebsocket(val) { //精饰车间燃气监测 if (data.type == "paintingGas") { store.changepaintingGas(data.msg); - let verticalData = {name:data.msg.devName,val:data.msg.paintingGas.value} + let verticalData = {name:data.msg.devName,val:data.msg.paintingGas.value,devId:data.msg.devId} store.changeNewVerticalNum({type:'Methane',data:verticalData}) } @@ -85,7 +85,7 @@ function getWebsocket(val) { if (data.type == "boilerGas") { // store.changePM(data.msg) store.changeboilerGas(data.msg.boilerGas); - let verticalData = {name:data.msg.devName,val:data.msg.boilerGas.value} + let verticalData = {name:data.msg.devName,val:data.msg.boilerGas.value,devId:data.msg.devId} store.changeNewVerticalNum({type:'Methane',data:verticalData}) } @@ -93,15 +93,17 @@ function getWebsocket(val) { if (data.type == "canteenGas") { // store.changeHumiture(data.msg) store.changecanteenGas(data.msg.canteenGas); - let verticalData = {name:data.msg.devName,val:data.msg.canteenGas.value} + let verticalData = {name:data.msg.devName,val:data.msg.canteenGas.value,devId:data.msg.devId} store.changeNewVerticalNum({type:'Methane',data:verticalData}) } //甲醛TVOC - if (data.type == "TVOC_CH2O") { + if (data.type == "TVOC_CH2O") { + console.log(data.msg,"TVOC_CH2O"); + store.changeTVOC_CH2O(data.msg); - let verticalData_TVOC = {name:data.msg.TVOC.name,val:data.msg.TVOC.value} + let verticalData_TVOC = {name:data.msg.TVOC.name,val:data.msg.TVOC.value,devId:data.msg.TVOC.devId} store.changeNewVerticalNum({type:'TVOC',data:verticalData_TVOC}) - let verticalData_CH2O = {name:data.msg.CH2O.name,val:data.msg.CH2O.value} + let verticalData_CH2O = {name:data.msg.CH2O.name,val:data.msg.CH2O.value,devId:data.msg.CH2O.devId} store.changeNewVerticalNum({type:'CH2O',data:verticalData_CH2O}) } @@ -109,7 +111,7 @@ function getWebsocket(val) { if (data.type == "flame") { // store.changeHumiture(data.msg) store.changeflame(data.msg.flame); - let verticalData = {name:data.msg.devName,val:data.msg.flame.value} + let verticalData = {name:data.msg.devName,val:data.msg.flame.value,devId:data.msg.devId} store.changeNewVerticalNum({type:'FIRE',data:verticalData}) @@ -119,7 +121,7 @@ function getWebsocket(val) { // store.changeHumiture(data.msg) // store.changepaintingGas(data.msg) store.changesmoke(data.msg.smoke); - let verticalData = {name:data.msg.devName,val:data.msg.smoke.value} + let verticalData = {name:data.msg.devName,val:data.msg.smoke.value,devId:data.msg.devId} store.changeNewVerticalNum({type:'Smoke',data:verticalData}) // console.log(JSON.stringify({type:'Smoke',data:verticalData}),"烟雾传感器"); }