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/airInfo/bg.png b/public/images/airInfo/bg.png new file mode 100644 index 0000000..43a480e Binary files /dev/null and b/public/images/airInfo/bg.png differ diff --git a/public/images/airInfo/dust-icon.png b/public/images/airInfo/dust-icon.png new file mode 100644 index 0000000..4843b0f Binary files /dev/null and b/public/images/airInfo/dust-icon.png differ diff --git a/public/images/airInfo/fan-v-icon.png b/public/images/airInfo/fan-v-icon.png new file mode 100644 index 0000000..bf3e83d Binary files /dev/null and b/public/images/airInfo/fan-v-icon.png differ diff --git a/public/images/airInfo/o2-icon.png b/public/images/airInfo/o2-icon.png new file mode 100644 index 0000000..c2a6d48 Binary files /dev/null and b/public/images/airInfo/o2-icon.png differ diff --git a/public/images/airInfo/tempture-icon.png b/public/images/airInfo/tempture-icon.png new file mode 100644 index 0000000..a66b4a7 Binary files /dev/null and b/public/images/airInfo/tempture-icon.png differ diff --git a/public/images/airInfo/water-icon.png b/public/images/airInfo/water-icon.png new file mode 100644 index 0000000..4a26c24 Binary files /dev/null and b/public/images/airInfo/water-icon.png differ diff --git a/public/images/badGasInfo/bg.png b/public/images/badGasInfo/bg.png new file mode 100644 index 0000000..bb84b16 Binary files /dev/null and b/public/images/badGasInfo/bg.png differ diff --git a/public/images/fanInfo/bg.png b/public/images/fanInfo/bg.png new file mode 100644 index 0000000..0dfae84 Binary files /dev/null and b/public/images/fanInfo/bg.png differ diff --git a/public/images/fanInfo/blue-state-icon.png b/public/images/fanInfo/blue-state-icon.png new file mode 100644 index 0000000..9c19279 Binary files /dev/null and b/public/images/fanInfo/blue-state-icon.png differ diff --git a/public/images/fanInfo/red-state-icon.png b/public/images/fanInfo/red-state-icon.png new file mode 100644 index 0000000..42c07ba Binary files /dev/null and b/public/images/fanInfo/red-state-icon.png differ diff --git a/src/assets/images/fanInfo/bg.png b/src/assets/images/fanInfo/bg.png new file mode 100644 index 0000000..0dfae84 Binary files /dev/null and b/src/assets/images/fanInfo/bg.png differ diff --git a/src/assets/images/fanInfo/blue-state-icon.png b/src/assets/images/fanInfo/blue-state-icon.png new file mode 100644 index 0000000..9c19279 Binary files /dev/null and b/src/assets/images/fanInfo/blue-state-icon.png differ diff --git a/src/assets/images/fanInfo/red-state-icon.png b/src/assets/images/fanInfo/red-state-icon.png new file mode 100644 index 0000000..42c07ba Binary files /dev/null and b/src/assets/images/fanInfo/red-state-icon.png differ diff --git a/src/assets/images/topAndDown/sp_dbbj.png b/src/assets/images/topAndDown/sp_dbbj.png new file mode 100644 index 0000000..8aadffc Binary files /dev/null and b/src/assets/images/topAndDown/sp_dbbj.png differ diff --git a/src/assets/images/topAndDown/sp_icon_mngl.png b/src/assets/images/topAndDown/sp_icon_mngl.png new file mode 100644 index 0000000..9fd3f62 Binary files /dev/null and b/src/assets/images/topAndDown/sp_icon_mngl.png differ diff --git a/src/assets/images/topAndDown/sp_icon_sdgl.png b/src/assets/images/topAndDown/sp_icon_sdgl.png new file mode 100644 index 0000000..45f1d28 Binary files /dev/null and b/src/assets/images/topAndDown/sp_icon_sdgl.png differ diff --git a/src/assets/images/topAndDown/sp_icon_sdqhd.png b/src/assets/images/topAndDown/sp_icon_sdqhd.png new file mode 100644 index 0000000..7c4abdd Binary files /dev/null and b/src/assets/images/topAndDown/sp_icon_sdqhd.png differ diff --git a/src/assets/images/topAndDown/sp_icon_sdqhx.png b/src/assets/images/topAndDown/sp_icon_sdqhx.png new file mode 100644 index 0000000..05b4e60 Binary files /dev/null and b/src/assets/images/topAndDown/sp_icon_sdqhx.png differ diff --git a/src/assets/images/topAndDown/sp_icon_tcdl.png b/src/assets/images/topAndDown/sp_icon_tcdl.png new file mode 100644 index 0000000..f4fba34 Binary files /dev/null and b/src/assets/images/topAndDown/sp_icon_tcdl.png differ diff --git a/src/assets/images/topAndDown/sp_icon_xtgl.png b/src/assets/images/topAndDown/sp_icon_xtgl.png new file mode 100644 index 0000000..5318fe8 Binary files /dev/null and b/src/assets/images/topAndDown/sp_icon_xtgl.png differ diff --git a/src/assets/images/topAndDown/sp_icon_yhgl.png b/src/assets/images/topAndDown/sp_icon_yhgl.png new file mode 100644 index 0000000..04910fe Binary files /dev/null and b/src/assets/images/topAndDown/sp_icon_yhgl.png differ diff --git a/src/assets/images/topAndDown/sp_icon_zdgl.png b/src/assets/images/topAndDown/sp_icon_zdgl.png new file mode 100644 index 0000000..c200ff4 Binary files /dev/null and b/src/assets/images/topAndDown/sp_icon_zdgl.png differ diff --git a/src/assets/images/topAndDown/sp_icon_zdqh.png b/src/assets/images/topAndDown/sp_icon_zdqh.png new file mode 100644 index 0000000..a880422 Binary files /dev/null and b/src/assets/images/topAndDown/sp_icon_zdqh.png differ diff --git a/src/assets/images/topAndDown/sp_icon_zst.png b/src/assets/images/topAndDown/sp_icon_zst.png new file mode 100644 index 0000000..015e9b5 Binary files /dev/null and b/src/assets/images/topAndDown/sp_icon_zst.png differ diff --git a/src/assets/images/topAndDown/sp_icon_zyc.png b/src/assets/images/topAndDown/sp_icon_zyc.png new file mode 100644 index 0000000..42bc47f Binary files /dev/null and b/src/assets/images/topAndDown/sp_icon_zyc.png differ diff --git a/src/assets/images/topAndDown/sp_tb.png b/src/assets/images/topAndDown/sp_tb.png new file mode 100644 index 0000000..eae68aa Binary files /dev/null and b/src/assets/images/topAndDown/sp_tb.png differ diff --git a/src/assets/images/topAndDown/sp_yyc.png b/src/assets/images/topAndDown/sp_yyc.png new file mode 100644 index 0000000..26ccc80 Binary files /dev/null and b/src/assets/images/topAndDown/sp_yyc.png differ diff --git a/src/assets/images/transducer/bg.png b/src/assets/images/transducer/bg.png new file mode 100644 index 0000000..b6d010a Binary files /dev/null and b/src/assets/images/transducer/bg.png differ diff --git a/src/assets/images/transducer/greenLight.png b/src/assets/images/transducer/greenLight.png new file mode 100644 index 0000000..f737073 Binary files /dev/null and b/src/assets/images/transducer/greenLight.png differ diff --git a/src/assets/images/transducer/icon2.png b/src/assets/images/transducer/icon2.png new file mode 100644 index 0000000..8f8d446 Binary files /dev/null and b/src/assets/images/transducer/icon2.png differ diff --git a/src/assets/images/transducer/redLight.png b/src/assets/images/transducer/redLight.png new file mode 100644 index 0000000..74c6be9 Binary files /dev/null and b/src/assets/images/transducer/redLight.png differ diff --git a/src/assets/images/transducer/transducer.png b/src/assets/images/transducer/transducer.png new file mode 100644 index 0000000..e9a7e7f Binary files /dev/null and b/src/assets/images/transducer/transducer.png differ diff --git a/src/assets/images/usedEle/bg.png b/src/assets/images/usedEle/bg.png new file mode 100644 index 0000000..b3745bd Binary files /dev/null and b/src/assets/images/usedEle/bg.png differ diff --git a/src/assets/images/usedEle/icon-all.png b/src/assets/images/usedEle/icon-all.png new file mode 100644 index 0000000..7c38ff0 Binary files /dev/null and b/src/assets/images/usedEle/icon-all.png differ diff --git a/src/assets/images/usedEle/icon-day.png b/src/assets/images/usedEle/icon-day.png new file mode 100644 index 0000000..aa8d19c Binary files /dev/null and b/src/assets/images/usedEle/icon-day.png differ diff --git a/src/assets/images/usedEle/icon-month.png b/src/assets/images/usedEle/icon-month.png new file mode 100644 index 0000000..3d475ae Binary files /dev/null and b/src/assets/images/usedEle/icon-month.png differ diff --git a/src/assets/images/windPressure/bg.png b/src/assets/images/windPressure/bg.png new file mode 100644 index 0000000..1a17d6e Binary files /dev/null and b/src/assets/images/windPressure/bg.png differ diff --git a/src/assets/images/windPressure/icon.png b/src/assets/images/windPressure/icon.png new file mode 100644 index 0000000..0a2b6e2 Binary files /dev/null and b/src/assets/images/windPressure/icon.png differ diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 7fd49d1..c091ca8 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -3,6 +3,9 @@ padding: 0; list-style: none; box-sizing: border-box; + background-repeat: no-repeat; + background-size: 100% 100%; + background-position: center; } a { @@ -13,3 +16,192 @@ a { html, body, #app, .el-container, .el-aside, .el-main { height: 100%; } + +.box-top { + .manage-btn { + display: flex; + z-index: 3; + position: absolute; + top: 85px; + left: 30px; + + .btn-box { + cursor: pointer; + margin-left: 37px; + display: flex; + align-items: center; + + > * { + font-size: 28px; + color: #FFFFFF; + line-height: 37px; + } + + > div:first-child { + margin-right: 11px; + width: 60px; + height: 60px; + } + .select-active{ + color: #11EAF2!important; + } + } + } + + .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; + top: 50px; + right: 70px; + font-size: 28px; + color: #FFFFFF; + + .current-site { + display: flex; + align-items: center; + + > span:first-child { + color: #F7B500; + margin-right: 20px; + } + + .toggle { + cursor: pointer; + width: 50px; + height: 50px; + background-image: url('../images/topAndDown/sp_icon_zdqh.png'); + } + } + + .current-user { + margin-top: 26px; + display: flex; + align-items: center; + + > span:first-child { + color: #F7B500; + margin-right: 20px; + } + + .logout { + cursor: pointer; + margin-left: 27px; + width: 50px; + height: 50px; + background-image: url('../images/topAndDown/sp_icon_tcdl.png'); + } + } + } +} + +.modal-box { + z-index: -1 !important; + position: static !important; + + .el-drawer { + width: 900px !important; + background-color: transparent; + } +} + +.left-arrow { + position: absolute; + top: 1095px; + left: 900px; + width: 100px; + height: 114px; + background-image: url('../images/topAndDown/sp_icon_zyc.png'); +} + +.shrink-left { + position: absolute; + top: 1095px; + left: 0; + width: 100px; + height: 114px; + background-image: url('../images/topAndDown/sp_yyc.png'); +} + +.right-arrow { + position: absolute; + top: 1095px; + right: 900px; + width: 100px; + height: 114px; + background-image: url('../images/topAndDown/sp_yyc.png'); +} + +.shrink-right { + position: absolute; + top: 1095px; + right: 0; + width: 100px; + height: 114px; + background-image: url('../images/topAndDown/sp_icon_zyc.png'); +} + +.switch-btn { + display: flex; + justify-content: space-between; + width: 1850px; + height: 146px; + z-index: 2; + position: absolute; + bottom: 0; + left: 50%; + margin-left: -925px; + background-image: url('../images/topAndDown/sp_dbbj.png'); + + .arrow { + margin: 50px 0 0 263px; + width: 46px; + height: 54px; + background-image: url('../images/topAndDown/sp_icon_zst.png'); + } + + .btn { + width: 100%; + display: flex; + align-items: center; + justify-content: space-around; + margin-top: 14px; + font-size: 26px; + color: #9FC3CD; + + > div { + display: flex; + justify-content: center; + } + + > div:nth-child(2) { + color: #FFFFFF; + padding-top: 7px; + width: 201px; + height: 62px; + background-image: url('../images/topAndDown/sp_icon_sdqhd.png'); + } + + > div:first-child, > div:last-child { + padding-top: 5px; + width: 158px; + height: 50px; + background-image: url('../images/topAndDown/sp_icon_sdqhx.png'); + } + } + + .right { + margin: 50px 263px 0 0; + transform: rotate(180deg); + } +} diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue deleted file mode 100644 index f5e4f53..0000000 --- a/src/components/HelloWorld.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - - - diff --git a/src/components/content/airInfo/AirInfo.vue b/src/components/content/airInfo/AirInfo.vue new file mode 100644 index 0000000..9c175d4 --- /dev/null +++ b/src/components/content/airInfo/AirInfo.vue @@ -0,0 +1,102 @@ + + + + + diff --git a/src/components/content/airInfo/childComps/ItemInfo.vue b/src/components/content/airInfo/childComps/ItemInfo.vue new file mode 100644 index 0000000..c3383a2 --- /dev/null +++ b/src/components/content/airInfo/childComps/ItemInfo.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/src/components/content/badGasInfo/BadGasInfo.vue b/src/components/content/badGasInfo/BadGasInfo.vue new file mode 100644 index 0000000..0f26fdf --- /dev/null +++ b/src/components/content/badGasInfo/BadGasInfo.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/components/content/fanInfo/FanInfo.vue b/src/components/content/fanInfo/FanInfo.vue new file mode 100644 index 0000000..20b8966 --- /dev/null +++ b/src/components/content/fanInfo/FanInfo.vue @@ -0,0 +1,438 @@ + + + + + diff --git a/src/components/content/transducerList/TransducerList.vue b/src/components/content/transducerList/TransducerList.vue new file mode 100644 index 0000000..fdfd69c --- /dev/null +++ b/src/components/content/transducerList/TransducerList.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/src/components/content/transducerList/childComps/TransducerItem.vue b/src/components/content/transducerList/childComps/TransducerItem.vue new file mode 100644 index 0000000..4aef1c2 --- /dev/null +++ b/src/components/content/transducerList/childComps/TransducerItem.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/src/components/content/usedEle/UsedEle.vue b/src/components/content/usedEle/UsedEle.vue new file mode 100644 index 0000000..a623c1d --- /dev/null +++ b/src/components/content/usedEle/UsedEle.vue @@ -0,0 +1,134 @@ + + + + + diff --git a/src/components/content/windPressure/WindPressureList.vue b/src/components/content/windPressure/WindPressureList.vue new file mode 100644 index 0000000..4f36e83 --- /dev/null +++ b/src/components/content/windPressure/WindPressureList.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/src/components/content/windPressure/childComps/WindPressureItem.vue b/src/components/content/windPressure/childComps/WindPressureItem.vue new file mode 100644 index 0000000..7ee0e3b --- /dev/null +++ b/src/components/content/windPressure/childComps/WindPressureItem.vue @@ -0,0 +1,121 @@ + + + + + diff --git a/src/components/manageBtn/index.vue b/src/components/manageBtn/index.vue new file mode 100644 index 0000000..2173478 --- /dev/null +++ b/src/components/manageBtn/index.vue @@ -0,0 +1,50 @@ + + + diff --git a/src/utils/date.js b/src/utils/date.js new file mode 100644 index 0000000..70aae99 --- /dev/null +++ b/src/utils/date.js @@ -0,0 +1,24 @@ +export const dateFormat = (time = new Date().getTime()) => { //YYYY年MM月DD日 星期d + const _time = time.toString().length > 10 ? time : time * 1000 + const weekList = ["一", "二", "三", "四", "五", "六", "日"]; + const date = new Date(_time); + const Y = date.getFullYear(); + const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1); + const D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()); + const h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()); + const m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()); + const s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()); + let weekDay = new Date().getDay(); + const week= weekList[weekDay - 1] + // const strDate = `${Y}/${M}/${D} ${h}:${m}:${s}` + return `${Y}年${M}月${D}日 星期${week}`; +} + +export default { + dateFormat +} + + + + + diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 689481f..532f716 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -7,6 +7,7 @@ 确认连接 关闭连接 + 清除
@@ -20,7 +21,10 @@
- 清除 +
+ + 发送 +
退出登录 @@ -35,6 +39,7 @@ import {useAuthStore} from '@/store/userstore.js' const router = useRouter() const authStore = useAuthStore() const serialNumber = ref('') +const number = ref('') let send = { type: "ping" } @@ -54,8 +59,16 @@ watch( } ); let socket = reactive('') +const handleSend=()=>{ + console.log('JSON.stringify(number.value))',JSON.stringify(number.value)) + let data = { + type: 1, + cmd : number.value + } + socket.send(JSON.stringify(data)) +} const initWebSocket = () => { - // let wsUrl = `ws://192.168.31.175:8000/wstunnel/debug/${token}/${serialNumber.value}` + // let wsUrl = `ws://192.168.31.175:9000/debug/${token}/${serialNumber.value}` let wsUrl = `ws://web-tunnel.feashow.com/api/wstunnel/debug/${token}/${serialNumber.value}` console.log(wsUrl) socket = new WebSocket(wsUrl) diff --git a/src/views/tunnel/index.vue b/src/views/tunnel/index.vue index 1b1c9f3..b8dba13 100644 --- a/src/views/tunnel/index.vue +++ b/src/views/tunnel/index.vue @@ -1,11 +1,101 @@