diff --git a/src/assets/indexImg/MicEnvironment.png b/src/assets/indexImg/MicEnvironment.png new file mode 100644 index 0000000..bd982fb Binary files /dev/null and b/src/assets/indexImg/MicEnvironment.png differ diff --git a/src/http/MicrofactoryDev/index.ts b/src/http/MicrofactoryDev/index.ts index d2cc05b..b44a01b 100644 --- a/src/http/MicrofactoryDev/index.ts +++ b/src/http/MicrofactoryDev/index.ts @@ -33,3 +33,11 @@ export function getCuttingLineHistogramData(){ export function getActivationData(){ return get('/device/getActivation') } + + +/** + * 微工厂环境 + */ +export function getSensorByDeptId(data){ + return get('/device/getSensorByDeptId',data) +} diff --git a/src/store/moduleSocketMicEnvironment.ts b/src/store/moduleSocketMicEnvironment.ts new file mode 100644 index 0000000..41f5a54 --- /dev/null +++ b/src/store/moduleSocketMicEnvironment.ts @@ -0,0 +1,67 @@ +/* + * @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.socketMicEnvironment, { + // 使用方式 + // const Index= useIndexStore() + // 1、Index.{数据}++ + // 2、Index.$patch({数据:??}) + // 3、Index.$patch((state)=>{ state.数据=??}) + // 4、通过action修改 + state: () => { + return { + humiture: + { "devId": "", "name": "温湿度", "temp": "0", "humidity": "0" }, + + // humiture:{Humiture:[],bottom:{humidity:null,temp:null,name:null},top:{humidity:null,temp:null,name:null}}, //温湿度 + pm: { "devId": "", "name": "粉尘", "pm25": "0", "pm10": "0" }, + verticalArr:[] + + } + }, + //computed 修改一些值 + //需要使用return将数据抛出 + //getters内可相互使用计算结果 + //使用时可直接放入标签内
Index.方法()
+ getters: { + + }, + actions: { + //初始化 + setVerticalArr(val){ + this.verticalArr=val + }, + sethumiture(val){ + this.humiture=val + }, + setpm(val){ + this.pm=val + }, + changehumiture(val){ + this.humiture.temp = val.temp + this.humiture.humidity = val.humidity + }, + changePm(val){ + this.pm.pm25 = val.pm25 + this.pm.pm10 = val.pm10 + }, + changeVerticalArr(val){ + this.verticalArr.forEach(res=>{ + if(res.id==val.devId&&res.item.type==val.type){ + res.item.val=val.val + res.item.status = val.status + } + }) + } + } + +}) \ No newline at end of file diff --git a/src/store/storeName.ts b/src/store/storeName.ts index 97ae740..c52284c 100644 --- a/src/store/storeName.ts +++ b/src/store/storeName.ts @@ -28,4 +28,5 @@ export const enum Names{ MechanicalViewJingjia="MechanicalViewJingjia", MechanicalViewJingshi="MechanicalViewJingshi", socketMechanics='socketMechanics', + socketMicEnvironment='socketMicEnvironment', } \ No newline at end of file diff --git a/src/views/MicEnvironment/components/humidity.vue b/src/views/MicEnvironment/components/humidity.vue new file mode 100644 index 0000000..35d8954 --- /dev/null +++ b/src/views/MicEnvironment/components/humidity.vue @@ -0,0 +1,232 @@ + + + + + + \ No newline at end of file diff --git a/src/views/MicEnvironment/components/lineChart.vue b/src/views/MicEnvironment/components/lineChart.vue new file mode 100644 index 0000000..33fbaa4 --- /dev/null +++ b/src/views/MicEnvironment/components/lineChart.vue @@ -0,0 +1,125 @@ + + + + + diff --git a/src/views/MicEnvironment/components/pm.vue b/src/views/MicEnvironment/components/pm.vue new file mode 100644 index 0000000..df42728 --- /dev/null +++ b/src/views/MicEnvironment/components/pm.vue @@ -0,0 +1,225 @@ + + + + + diff --git a/src/views/MicEnvironment/components/verticalNum.vue b/src/views/MicEnvironment/components/verticalNum.vue new file mode 100644 index 0000000..4038324 --- /dev/null +++ b/src/views/MicEnvironment/components/verticalNum.vue @@ -0,0 +1,199 @@ + + + + + + + \ No newline at end of file diff --git a/src/views/MicEnvironment/index.vue b/src/views/MicEnvironment/index.vue new file mode 100644 index 0000000..f7649c0 --- /dev/null +++ b/src/views/MicEnvironment/index.vue @@ -0,0 +1,334 @@ + + + + + + + \ No newline at end of file diff --git a/src/views/Waterhouse/index.vue b/src/views/Waterhouse/index.vue index 51f1b53..70f383f 100644 --- a/src/views/Waterhouse/index.vue +++ b/src/views/Waterhouse/index.vue @@ -170,7 +170,7 @@ async function getWaterFlowInfoFun() { if (code == 200) { allData.in = data.in allData.out = data.out - allData.use = data.use + allData.use = data.use.toFixed(2) allData.currentCount = data.currentCount allData.xl = data.xl.toFixed(1) allData.xy = data.xy.toFixed(1) diff --git a/src/views/index.vue b/src/views/index.vue index 259efe2..2701445 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -286,6 +286,12 @@ let routerList = [ title: '智能货架物联管理系统', url: require("../assets/indexImg/intelligentShelves.png"), }, + { + id: 33, + path: "/MicEnvironment", + title: '微工厂环境实时监测系统', + url: require("../assets/indexImg/MicEnvironment.png"), + }, ]; let lang = ref(getStoredLanguage() || '简体中文') function changelang(val) { @@ -314,7 +320,7 @@ onUnmounted(() => { }); } .itemlist { - height: 1030px; + height: 990px; width: 1920px; color: #20aec5; background-color: #100c2a;