From 3576d9e17ec6a821031f1c884d783fcaf294638c Mon Sep 17 00:00:00 2001 From: Iruka <1017819588@qq.com> Date: Mon, 2 Dec 2024 15:23:49 +0800 Subject: [PATCH] . --- .env.development | 2 +- .../custom-index-adc/custom-index-adc.vue | 193 ++++++++++++++++++ .../custom-index-mp/custom-index-mp.vue | 191 +++++++++++++++++ pages/index.vue | 181 +++++++--------- 4 files changed, 461 insertions(+), 106 deletions(-) create mode 100644 components/custom-index-adc/custom-index-adc.vue create mode 100644 components/custom-index-mp/custom-index-mp.vue diff --git a/.env.development b/.env.development index 1d83a62..4f01d77 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,6 @@ VITE_ENV = 'development' #VITE_BASE_API = 'http://39.105.121.219' -VITE_BASE_API = 'http://127.0.0.1' +VITE_BASE_API = 'http://192.168.0.239' #VITE_BASE_API = 'http://api.jsyzhineng.com' VITE_APP_BASE_API = '/dev-api' VITE_BASE_MQTT = '39.105.121.219:8083/mqtt' diff --git a/components/custom-index-adc/custom-index-adc.vue b/components/custom-index-adc/custom-index-adc.vue new file mode 100644 index 0000000..f6a397a --- /dev/null +++ b/components/custom-index-adc/custom-index-adc.vue @@ -0,0 +1,193 @@ + + + + \ No newline at end of file diff --git a/components/custom-index-mp/custom-index-mp.vue b/components/custom-index-mp/custom-index-mp.vue new file mode 100644 index 0000000..047c1fa --- /dev/null +++ b/components/custom-index-mp/custom-index-mp.vue @@ -0,0 +1,191 @@ + + + + \ No newline at end of file diff --git a/pages/index.vue b/pages/index.vue index 7bea84c..5b3b655 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -38,28 +38,52 @@ - - + - + + + + 总设备 + + + + + 在线设备 + + + + + 异常设备 + + + + + 土壤墒情 + + + + + + + - + - + - + @@ -67,81 +91,6 @@ - - - - - - 总设备 - - - - - 在线设备 - - - - - 异常设备 - - - - - 土壤墒情 - - - - @@ -170,7 +119,7 @@ - + {{ item.deviceCode }} @@ -541,14 +490,13 @@ - - - - - - - + + + + + + @@ -615,8 +563,8 @@ uni.$off("open-angle-slider"); }, onPageScroll(e) { // 页面滚动触发事件的处理函数 - console.log(e.scrollTop); // 输出滚动位置的垂直距离 - if (e.scrollTop >= 80) { + // console.log(e.scrollTop); // 输出滚动位置的垂直距离 + if (e.scrollTop >= 75) { this.isSticky = true; } else { this.isSticky = false; @@ -643,8 +591,38 @@ this.$refs.landRef.addLand(e, res.data); }); }, - //去扫码 + // 去扫码 toQRCode() {}, + // 基站adc + stationLeftClickCode(item) { + this.$refs.adcRef.show(1, item, this.dc.dataObj[item.deviceCode]); + }, + + // 打开弹窗 + async openDialog(key, row = null) { + switch (key) { + // case "mp": //墒情 + // this.$refs.mpRef.show(this.land); + // break; + // case "wh": //浇灌履历 + // this.$refs.wateringHistoryRef.show(this.land, row); + // break; + // case "log": //日志 + // this.$refs.deviceLogRef.show(this.land, row); + // break; + case "adc": //设备adc + this.$refs.adcRef.show(2, row, this.dc.dataObj[row.dataKey]); + break; + case "chart": //曲线 + this.$refs.adcChartRef.show(row); + break; + case "wo": + this.$refs.woRemarkRef.show(row); + break; + } + }, + + // 顶部关键字搜索 handleKeyup(e) { @@ -861,17 +839,10 @@ opacity: 1; } } - + .grey-box.ceiling { - animation: opacity 1s ease-in-out forwards; - // transition: transform 1s; - // transform: translateY(-100%); - // opacity: 0; - - - - // transition: opacity 1s; + animation: opacity 0.3s ease-in-out forwards; border-radius: 0; padding-bottom: 0px; margin: 0; @@ -880,10 +851,10 @@ position: fixed; width: 100%; /* #ifdef H5 */ - top: 44px; + top: 40px; /* #endif */ /* #ifdef APP-PLUS */ - top: 44px; + top: 67px; /* #endif */ @@ -931,7 +902,7 @@ padding: 10px 5px; .u-grid { - margin-bottom: 10px; + margin-bottom: 5px; .u-grid-item { margin: auto 5px;