diff --git a/.drone.yml b/.drone.yml index 7cc4390..b193984 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,7 +16,7 @@ steps: - export NODE_MODULES_PATH=`pwd`/node_modules - npm config set registry https://registry.npm.taobao.org - set NODE_OPTIONS=--openssl-legacy-provider - - npm install +# - npm install - npm run build - echo $NODE_MODULES_PATH - cp -r dist /app/build/$DRONE_REPO_NAME diff --git a/public/images/fanInfo/bg.png b/public/images/fanInfo/bg.png deleted file mode 100644 index 0dfae84..0000000 Binary files a/public/images/fanInfo/bg.png and /dev/null differ diff --git a/public/images/fanInfo/blue-state-icon.png b/public/images/fanInfo/blue-state-icon.png deleted file mode 100644 index 9c19279..0000000 Binary files a/public/images/fanInfo/blue-state-icon.png and /dev/null differ diff --git a/public/images/fanInfo/red-state-icon.png b/public/images/fanInfo/red-state-icon.png deleted file mode 100644 index 42c07ba..0000000 Binary files a/public/images/fanInfo/red-state-icon.png and /dev/null differ diff --git a/public/images/airInfo/bg.png b/src/assets/images/airInfo/bg.png similarity index 100% rename from public/images/airInfo/bg.png rename to src/assets/images/airInfo/bg.png diff --git a/public/images/airInfo/dust-icon.png b/src/assets/images/airInfo/dust-icon.png similarity index 100% rename from public/images/airInfo/dust-icon.png rename to src/assets/images/airInfo/dust-icon.png diff --git a/public/images/airInfo/fan-v-icon.png b/src/assets/images/airInfo/fan-v-icon.png similarity index 100% rename from public/images/airInfo/fan-v-icon.png rename to src/assets/images/airInfo/fan-v-icon.png diff --git a/public/images/airInfo/o2-icon.png b/src/assets/images/airInfo/o2-icon.png similarity index 100% rename from public/images/airInfo/o2-icon.png rename to src/assets/images/airInfo/o2-icon.png diff --git a/public/images/airInfo/tempture-icon.png b/src/assets/images/airInfo/tempture-icon.png similarity index 100% rename from public/images/airInfo/tempture-icon.png rename to src/assets/images/airInfo/tempture-icon.png diff --git a/public/images/airInfo/water-icon.png b/src/assets/images/airInfo/water-icon.png similarity index 100% rename from public/images/airInfo/water-icon.png rename to src/assets/images/airInfo/water-icon.png diff --git a/public/images/badGasInfo/bg.png b/src/assets/images/badGasInfo/bg.png similarity index 100% rename from public/images/badGasInfo/bg.png rename to src/assets/images/badGasInfo/bg.png diff --git a/src/assets/images/fanInfo/white-state-icon.png b/src/assets/images/fanInfo/white-state-icon.png new file mode 100644 index 0000000..0bf15cd Binary files /dev/null and b/src/assets/images/fanInfo/white-state-icon.png differ diff --git a/src/assets/images/site/zdgl_bj.png b/src/assets/images/site/zdgl_bj.png new file mode 100644 index 0000000..4dba7f0 Binary files /dev/null and b/src/assets/images/site/zdgl_bj.png differ diff --git a/src/assets/images/site/zdgl_dbj.png b/src/assets/images/site/zdgl_dbj.png new file mode 100644 index 0000000..d7614de Binary files /dev/null and b/src/assets/images/site/zdgl_dbj.png differ diff --git a/src/assets/images/site/zdgl_icon_bj.png b/src/assets/images/site/zdgl_icon_bj.png new file mode 100644 index 0000000..1be9605 Binary files /dev/null and b/src/assets/images/site/zdgl_icon_bj.png differ diff --git a/src/assets/images/site/zdgl_icon_fh.png b/src/assets/images/site/zdgl_icon_fh.png new file mode 100644 index 0000000..60424a1 Binary files /dev/null and b/src/assets/images/site/zdgl_icon_fh.png differ diff --git a/src/assets/images/site/zdgl_icon_tjz.png b/src/assets/images/site/zdgl_icon_tjz.png new file mode 100644 index 0000000..db79d1c Binary files /dev/null and b/src/assets/images/site/zdgl_icon_tjz.png differ diff --git a/src/assets/images/site/zdgl_zd.png b/src/assets/images/site/zdgl_zd.png new file mode 100644 index 0000000..57d384c Binary files /dev/null and b/src/assets/images/site/zdgl_zd.png differ diff --git a/src/assets/images/transducer/icon1.png b/src/assets/images/transducer/icon1.png new file mode 100644 index 0000000..2294e5a Binary files /dev/null and b/src/assets/images/transducer/icon1.png differ diff --git a/src/assets/images/transducer/sp_icon_dl.png b/src/assets/images/transducer/sp_icon_dl.png new file mode 100644 index 0000000..2d0dc0f Binary files /dev/null and b/src/assets/images/transducer/sp_icon_dl.png differ diff --git a/src/assets/images/transducer/sp_icon_dy.png b/src/assets/images/transducer/sp_icon_dy.png new file mode 100644 index 0000000..7da834e Binary files /dev/null and b/src/assets/images/transducer/sp_icon_dy.png differ diff --git a/src/assets/images/transducer/sp_icon_pbq.png b/src/assets/images/transducer/sp_icon_pbq.png new file mode 100644 index 0000000..7cfa4a3 Binary files /dev/null and b/src/assets/images/transducer/sp_icon_pbq.png differ diff --git a/src/assets/images/transducer/sp_icon_yc.png b/src/assets/images/transducer/sp_icon_yc.png new file mode 100644 index 0000000..74c6be9 Binary files /dev/null and b/src/assets/images/transducer/sp_icon_yc.png differ diff --git a/src/assets/images/usedEle/white-ele.png b/src/assets/images/usedEle/white-ele.png new file mode 100644 index 0000000..da08f8a Binary files /dev/null and b/src/assets/images/usedEle/white-ele.png differ diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 9a128e8..cfb4bc7 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -16,7 +16,16 @@ a { html, body, #app, .el-container, .el-aside, .el-main { height: 100%; } - +.tunnel-title { + width: 2330px; + height: 156px; + z-index: 2; + position: absolute; + top: 0; + left: 50%; + margin-left: -1165px; + background-image: url('../images/topAndDown/sp_tb.png'); +} .box-top { .manage-btn { display: flex; @@ -49,17 +58,6 @@ html, body, #app, .el-container, .el-aside, .el-main { } } - .tunnel-title { - width: 2330px; - height: 156px; - z-index: 2; - position: absolute; - top: 0; - left: 50%; - margin-left: -1165px; - background-image: url('../images/topAndDown/sp_tb.png'); - } - .top-right { z-index: 2; position: absolute; @@ -113,6 +111,7 @@ html, body, #app, .el-container, .el-aside, .el-main { .el-drawer { width: 900px !important; background-color: transparent; + box-shadow: none; } } diff --git a/src/components/content/airInfo/AirInfo.vue b/src/components/content/airInfo/AirInfo.vue index ff4147c..5772f7e 100644 --- a/src/components/content/airInfo/AirInfo.vue +++ b/src/components/content/airInfo/AirInfo.vue @@ -1,42 +1,46 @@ diff --git a/src/components/content/transducerList/TransducerList.vue b/src/components/content/transducerList/TransducerList.vue index fdfd69c..0b68ea3 100644 --- a/src/components/content/transducerList/TransducerList.vue +++ b/src/components/content/transducerList/TransducerList.vue @@ -1,11 +1,126 @@ diff --git a/src/components/content/transducerList/childComps/TransducerItem.vue b/src/components/content/transducerList/childComps/TransducerItem.vue deleted file mode 100644 index 4aef1c2..0000000 --- a/src/components/content/transducerList/childComps/TransducerItem.vue +++ /dev/null @@ -1,110 +0,0 @@ - - - - - diff --git a/src/components/content/usedEle/UsedEle.vue b/src/components/content/usedEle/UsedEle.vue index a623c1d..0870087 100644 --- a/src/components/content/usedEle/UsedEle.vue +++ b/src/components/content/usedEle/UsedEle.vue @@ -2,49 +2,20 @@
用电量
-
-
一号变频器
+
+
{{index===1?'二':'一'}}号变频器
  • - 总用电量:2345v +
    + 总用电量:{{ item.electricityConsumptionTotal }}v
  • - 总用电量:2345v +
    + 月用电量:{{ item.electricityConsumptionMonthly }}v
  • - 总用电量:2345v -
  • -
-
-
-
二号变频器
-
    -
  • - 总用电量:2345v -
  • -
  • - 总用电量:2345v -
  • -
  • - 总用电量:2345v +
    + 日用电量:{{ item.electricityConsumptionDay }}v
@@ -53,11 +24,29 @@ diff --git a/src/components/content/windPressure/childComps/WindPressureItem.vue b/src/components/content/windPressure/childComps/WindPressureItem.vue index 7ee0e3b..e69dc24 100644 --- a/src/components/content/windPressure/childComps/WindPressureItem.vue +++ b/src/components/content/windPressure/childComps/WindPressureItem.vue @@ -1,9 +1,8 @@ diff --git a/src/views/tunnel/index.vue b/src/views/tunnel/index.vue index de35d5f..a843e5f 100644 --- a/src/views/tunnel/index.vue +++ b/src/views/tunnel/index.vue @@ -20,9 +20,9 @@
- - - + + +
@@ -30,9 +30,9 @@
- - - + + +
@@ -63,8 +63,9 @@ import WindPressureList from "@/components/content/windPressure/WindPressureList import AirInfo from "@/components/content/airInfo/AirInfo.vue"; import BadGasInfo from "@/components/content/badGasInfo/BadGasInfo.vue"; import ManageBtn from "@/components/manageBtn/index.vue"; -import ManageLength from "@/components/manageLength/index.vue"; import { dateFormat } from "@/utils/date.js"; +import { onMounted } from "vue"; +import { getToken } from "@/utils/auth"; import { useAuthStore } from '@/store/userstore.js' const authStore = useAuthStore() @@ -100,7 +101,32 @@ const tunnelList = ref([ name: '七号隧道' }, ]) -const manageSelect = () => { +let socket = reactive('') +const serialNumber = ref('SC00DY00GH00ELBT') +let token = getToken(); +let send = { + type: "ping" +} +const socketData = reactive({ + currentVoltage: [], + frequencyState: [], + frequencyFeedback: [], + electricityConsumption: [], + windPressure: [], + sensor: [], +}) +onMounted(() => { + nextTick(() => { + showFan.value = true + }) +}) +const manageSelect = (index) => { + console.log('首页点击-', index) + if (index === 0) { + console.log('站点管理=====-----') + router.push('/site') + } + // getInfo(); }; const closeLeft = () => { @@ -118,9 +144,63 @@ const previousBtn = () => { } const nextBtn = () => { tunnelBtn.value.next(); - // tunnelList.value.push(tunnelList.value.shift()) - // console.log('tunnelList.value', tunnelList.value) } + +const initWebSocket = () => { + // let wsUrl = `ws://192.168.31.175:9000/websocket/equipment/${token}/${serialNumber.value}` + let wsUrl = `ws://web-tunnel.feashow.com/api/wstunnel/websocket/equipment/${token}/${serialNumber.value}` + console.log(wsUrl) + socket = new WebSocket(wsUrl) + //连接发生错误的回调方法 + socket.onerror = function () { + console.log("ws连接发生错误"); + }; + //连接成功建立的回调方法 + socket.onopen = function () { + console.log("ws连接成功"); + } + //接收到消息的回调方法 + socket.onmessage = function (event) { + console.log("服务器返回的信息: ", JSON.parse(event.data)); + const type = JSON.parse(event.data).type + const data = JSON.parse(event.data).data + if (type === 'equipment') { + data.forEach((item) => { + if (item.typeKey === 'currentVoltage') { + console.log('电流电压') + socketData.currentVoltage = data + } else if (item.typeKey === 'frequencyFeedback') { + console.log('变频器频率') + socketData.frequencyFeedback = data + } else if (item.typeKey === 'frequencyState') { + console.log('风机状态') + socketData.frequencyState = data + } else if (item.typeKey === 'electricityConsumption') { + console.log('用电量') + socketData.electricityConsumption = data + } else if (item.typeKey === 'windPressure') { + console.log('风压风压') + socketData.windPressure = data + } else if (item.typeKey === 'sensor') { + console.log('传感器==========?') + socketData.sensor = data + } + }) + } + } + //连接关闭的回调方法 + socket.onclose = function () { + console.log("ws连接关闭"); + // initWebSocket() + } + setInterval(() => { + socket.send(JSON.stringify(send)) + }, 30000) +} +const closeSocket = () => { + socket.close(); +} +initWebSocket()