瀏覽代碼

chore: 发布v1.15.25版本,调整配置与优化设备页面

1.  切换环境配置与修改应用名称、版本号
2.  移除无用页面路由,调整设备跳转参数与设备模型判断逻辑
3.  优化图表页面异步加载顺序,修复土壤墒情页面文案与表格宽度
4.  新增设备图片显示逻辑,调整页面布局与样式
5.  优化预警页面标签逻辑与数据展示
allen 1 天之前
父節點
當前提交
e5e92ecb8d

+ 3 - 3
manifest.json

@@ -1,9 +1,9 @@
 {
-    "name" : "云飞智控",
+    "name" : "智控",
     "appid" : "__UNI__DBA6730",
     "description" : "",
-    "versionName" : "1.15.24",
-    "versionCode" : 11524,
+    "versionName" : "1.15.25",
+    "versionCode" : 11525,
     "transformPx" : false,
     "sassImplementationName" : "node-sass",
     /* 5+App特有相关 */

+ 0 - 8
pages.json

@@ -271,14 +271,6 @@
       }
     },
     {
-      "path": "pages/equipList2/seabox/locationPicker",
-      "style": {
-        "navigationBarTitleText": "选择地址",
-        "enablePullDownRefresh": false,
-				"navigationStyle": "custom"
-      }
-    },
-    {
       "path": "pages/distribution/index",
       "style": {
         "navigationBarTitleText": "设备分布",

+ 10 - 23
pages/bzy/components/deviceData.vue

@@ -70,11 +70,11 @@
             <text class="data-label">设备版本</text>
           </view>
         </view>
-        <!-- <view class="data-column-right">
+        <view class="data-column-right">
           <view class="device-image-container">
             <image class="device-image" :src="formatDevImg" mode="aspectFit"></image>
           </view>
-        </view> -->
+        </view>
       </view>
     </view>
     <!-- 图表区域 -->
@@ -382,23 +382,12 @@ export default {
           this.isStatic = true
           this.getStatic()
         }
-        if (newVal.device_model == '11'){
-          this.devImg = 'cbd4.1'
-          this.isShowPhoto = true
-        } else if(newVal.device_model == '12'){
-          this.devImg = 'cbd1'
-          this.isShowPhoto = false
-        } else if(newVal.device_model == '13'){
-          this.devImg = 'cbd5'
+        console.log(newVal.device_model,'ssssssss')
+        if (newVal.device_model == '0'){
+          this.devImg = 'bzy'
           this.isShowPhoto = true
-        } else if(newVal.device_model == '14'){
-          this.devImg = 'cbd6'
-          this.isShowPhoto = true
-        } else if(newVal.device_model == '15'){
-          this.devImg = 'gkcbd1'
-          this.isShowPhoto = false
-        } else{
-          this.devImg = 'cbd'
+        }  else{
+          this.devImg = 'bzy1'
           this.isShowPhoto = true
         }
       },
@@ -883,8 +872,6 @@ export default {
 
   .data-column-left {
     flex: 1;
-    display: grid;
-    grid-template-columns: repeat(2, 1fr);
     gap: 24rpx;
 
     .data-item {
@@ -892,6 +879,7 @@ export default {
       flex: 1;
       flex-direction: column;
       gap: 8rpx;
+      margin-bottom: 16rpx;
 
       .data-label {
         font-size: 24rpx;
@@ -945,10 +933,9 @@ export default {
 
       .device-image {
         position: relative;
-        width: 260rpx;
-        height: 360rpx;
+        width: 200rpx;
+        height: 280rpx;
         z-index: 1;
-        top: 60rpx;
       }
     }
 

文件差異過大導致無法顯示
+ 928 - 1103
pages/cb/equip-detail/equip-detail.vue


+ 9 - 9
pages/deviceDetails/SoilMoisturelist/index.vue

@@ -654,16 +654,16 @@ export default {
         if(item){
           if(this.elemengIsSetting){
           if(this.currentResData[depth[index]] && this.currentResData[depth[index]].includes('temp')){
-            this.legendData.push(depth[index] + 'cm土壤湿度(%)');
+            this.legendData.push(depth[index] + 'cm土壤温度(℃)');
             this.tableColumn.push({
-              label: depth[index] + 'cm土壤湿度(%)',
+              label: depth[index] + 'cm土壤温度(℃)',
               prop: 'temp' + index,
               index
             });
           }}else{
-            this.legendData.push(depth[index] + 'cm土壤湿度(%)');
+            this.legendData.push(depth[index] + 'cm土壤温度(℃)');
             this.tableColumn.push({
-              label: depth[index] + 'cm土壤湿度(%)',
+              label: depth[index] + 'cm土壤温度(℃)',
               prop: 'temp' + index,
               index
             });
@@ -674,17 +674,17 @@ export default {
         if(item){
           if(this.elemengIsSetting){
             if(this.currentResData[depth[index]] && this.currentResData[depth[index]].includes('swc')){
-              this.legendData.push(depth[index] + 'cm土壤温度(℃)');
+              this.legendData.push(depth[index] + 'cm土壤湿度(%)');
               this.tableColumn.push({
-                label: depth[index] + 'cm土壤温度(℃)',
+                label: depth[index] + 'cm土壤湿度(%)',
                 prop: 'swc' + index,
                 index
               });
             }
           }else{
-            this.legendData.push(depth[index] + 'cm土壤温度(℃)');
+            this.legendData.push(depth[index] + 'cm土壤湿度(%)');
               this.tableColumn.push({
-                label: depth[index] + 'cm土壤温度(℃)',
+                label: depth[index] + 'cm土壤湿度(%)',
                 prop: 'swc' + index,
                 index
               });
@@ -1390,7 +1390,7 @@ export default {
         }
       }
       .table-cell {
-        width: 160rpx;
+        width: 180rpx;
         height: 80rpx;
         line-height: 80rpx;
         padding-right: 10rpx;

+ 9 - 8
pages/deviceDetails/weatherStation1/eleDetail.vue

@@ -155,13 +155,13 @@ import uCharts from "../../../components/js_sdk/u-charts/u-charts/u-charts.js";
 import baseCharts from "./charts.vue";
 export default {
   components: { baseCharts },
-  onLoad(options) {
+  async onLoad(options) {
     const deviceInfo = JSON.parse(decodeURIComponent(options.deviceInfo));
     this.eleKey = options.eleKey || "";
     this.initDateRange(deviceInfo.uptime);
     this.deviceInfo = deviceInfo;
+    await this.getObData();
     this.getChartData();
-    this.getObData();
   },
   data() {
     return {
@@ -442,14 +442,15 @@ export default {
         if (res && Array.isArray(res) && res.length > 0) {
           this.eleTabs = res;
           this.hasData = true;
-          this.activeChartInfo =
+          const activeChartInfo =
             this.eleTabs.find((item) => item.name === this.eleKey) ||
             this.eleTabs[0];
-          this.eleActive = this.eleTabs.indexOf(this.activeChartInfo);
-          const key = this.activeChartInfo.unit ? this.activeChartInfo.name + '(' + this.activeChartInfo.unit + ')' : this.activeChartInfo.name
+          this.eleActive = this.eleTabs.indexOf(activeChartInfo);
+          const key = activeChartInfo.unit ? activeChartInfo.name + '(' + activeChartInfo.unit + ')' : activeChartInfo.name
           const keyValue = this.getKeyByName(key)
-          this.activeChartInfo.key = keyValue
+          activeChartInfo.key = keyValue
           this.$nextTick(() => {
+            this.activeChartInfo = activeChartInfo
             this.initChart();
           });
         } else {
@@ -459,8 +460,8 @@ export default {
       });
     },
     // 历史数据
-    getObData() {
-      this.$myRequest({
+    async getObData() {
+      await this.$myRequest({
         url: "/api/api_gateway?method=greenhouse.env_first.history_data",
         data: {
           device_id: this.deviceInfo.devBid,

+ 14 - 9
pages/deviceDetails/weatherStation1/index.vue

@@ -8,10 +8,10 @@
 
     <!-- 设备基本信息 -->
     <view class="device-info">
-      <view class="operation" @click.stop="isShowOperation = !isShowOperation">操作</view>
+      <view class="operation" @click.stop="isShowOperation = !isShowOperation" v-if="type_id!=50">操作</view>
       <view class="operation-container" v-if="isShowOperation" @click="closeOperationHandler">
       <view class="operation-background"></view>
-      <view class="operation-content">
+      <view class="operation-content" v-if="type_id!=50">
         <view class="operation-item" @click="goPage('devRepair')">
           <image :src="serviceIcon" class="operation-icon"></image>
           维修
@@ -104,7 +104,7 @@
             </view>
             <image
               class="device-img"
-              :src="`/static/images/device/${item.key}-default.svg`"
+              :src="`https://s3.hnyfwlw.com/webstaticimg/bigdata_app/appIconSvg/${item.key}-default.svg`"
               mode="aspectFit"
             ></image>
           </view>
@@ -117,7 +117,7 @@
           <view class="device-control">
             <view class="control-left">
               <view>{{formatTimestamp(deviceInfo.uptime)}}</view>
-              <u-icon name="reload" color="#0BBC58" style="margin-left: 12rpx" @click="refreshData"></u-icon>
+              <!-- <u-icon name="reload" color="#0BBC58" style="margin-left: 12rpx" @click="refreshData"></u-icon> -->
             </view>
           </view>
           <view class="params-board">
@@ -152,7 +152,7 @@
               <image
                 class="device-img"
                 style="width: 150rpx; height: 300rpx;"
-                :src="qxzImg"
+                :src="deviceIcon"
                 mode="aspectFit"
               ></image>
             </view>
@@ -243,19 +243,23 @@
 </template>
 
 <script>
-import qxzImg from '@/static/images/device/qxz_low.png';
-
 export default {
   onLoad(options) {
     this.deviceInfo = options;
     this.initDateRange(options.uptime);
     this.getQxzObData();
+    this.type_id = options.type_id;
+    if(this.type_id == 50){
+      this.deviceIcon = 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcon/jcy.png';
+    }else{
+      this.deviceIcon = '/static/images/device/qxz_low.png';
+    }
     // this.getDeviceStatus();
     this.getDeviceData();
   },
   data() {
     return {
-      qxzImg,
+      type_id: '',
       deviceInfo: {},
       isShowOperation: false,
       activeTab: 'monitoring',
@@ -264,6 +268,7 @@ export default {
       show: false,
       mode: 'range',
       startDate: '',
+      deviceIcon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcon/jcy.png',
       endDate: '',
       page: 1,
       photoIcon:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/photoIcon.png',
@@ -913,7 +918,7 @@ export default {
       font-weight: 400;
       line-height: normal;
       .fixed-column {
-        width: 250rpx;
+        width: 300rpx;
         .table-cell {
           width: 100%;
           white-space: nowrap;

+ 2 - 1
pages/equipList2/index.vue

@@ -745,8 +745,9 @@ import openingDegree from '../assets/openingDegree.png';
 						// }
 						break;
 					case 38:
+					case 50:
 						uni.navigateTo({
-							url: `../deviceDetails/weatherStation1/index?devBid=${item.id}&devName=${item.name}&devStatus=${item.status}&address=${item.address}&uptime=${item.uptime}&d_id=${item.d_id}&deviceType=46`,
+							url: `../deviceDetails/weatherStation1/index?devBid=${item.id}&devName=${item.name}&devStatus=${item.status}&address=${item.address}&uptime=${item.uptime}&d_id=${item.d_id}&deviceType=46&type_id=${type_id}`,
 						});
 						break;
 						

+ 18 - 12
pages/scd/components/deviceData.vue

@@ -24,26 +24,27 @@
       <view class="main-data-panel">
         <view class="data-column-left">
           <view class="data-item">
-            <text class="data-value">{{ objItem.ds }}</text>
+            <text class="data-value">{{ objItem.ds || '--' }}</text>
             <text class="data-label">设备开关</text>
           </view>
           <view class="data-item">
-            <text class="data-value">{{ objItem.ws }}</text>
+            <text class="data-value">{{ objItem.ws || '--' }}</text>
             <text class="data-label">工作状态</text>
           </view>
-        </view>
-      </view>
-      <view class="main-data-panel">
-        <view class="data-column-left">
           <view class="data-item">
-            <text class="data-value">{{ objItem.rps }}</text>
+            <text class="data-value">{{ objItem.rps || '--' }}</text>
             <text class="data-label">雨控状态</text>
           </view>
           <view class="data-item">
-            <text class="data-value">{{ objItem.tps }}</text>
+            <text class="data-value">{{ objItem.tps || '--' }}</text>
             <text class="data-label">温控状态</text>
           </view>
         </view>
+        <view class="data-column-right">
+          <view class="device-image-container">
+            <image class="device-image" :src="formatDevImg" mode="aspectFit"></image>
+          </view>
+        </view>
       </view>
     </view>
     <!-- 图表区域 -->
@@ -288,6 +289,10 @@ export default {
       type:Number,
       default:10
     },
+    devImg:{
+      type:String,
+      default:'scd',
+    },
   },
   components: {
     floatButton,
@@ -301,7 +306,6 @@ export default {
       simBorder:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/simBorder.png',
       devImage:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image/cbd.png',
       photoBorder:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/photoBorder.png',
-      devImg:'',
       activeTab: 0,
       edit:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/edit.png',
       sim:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/newImg/home/sim.png',
@@ -367,6 +371,9 @@ export default {
     totalPages(){
       return Math.ceil(this.totalPage / this.page_size)
     },
+    formatDevImg() {
+      return `https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image/${this.devImg}.png`;
+    },
   },
   watch:{
     polylineList:{
@@ -893,14 +900,13 @@ export default {
 
   .data-column-left {
     flex: 1;
-    display: flex;
-    gap: 24rpx;
 
     .data-item {
       display: flex;
       flex: 1;
       flex-direction: column;
       gap: 8rpx;
+      margin-bottom: 16rpx;
 
       .data-label {
         font-size: 24rpx;
@@ -954,7 +960,7 @@ export default {
 
       .device-image {
         position: relative;
-        width: 260rpx;
+        width: 200rpx;
         height: 360rpx;
         z-index: 1;
         top: 60rpx;

+ 7 - 9
pages/scd/detail.vue

@@ -87,6 +87,7 @@
         <DeviceData
           :deviceStatic="deviceStatic"
           :deviceInfo="deviceInfo"
+          :devImg="devImg"
           :polylineList="polylineList"
           :deviceHistoryList="deviceHistoryList"
           :totalPage="totalPage"
@@ -152,6 +153,7 @@ export default {
       location: '',
       total: 0,
       day: [],
+      devImg: 'scd',
       pest: [],
       page: 1,
       is_pest: '',
@@ -172,17 +174,13 @@ export default {
 		this.accessToken = uni.getStorageSync('session_key')
     this.getDeviceCameraData()
     const newVal = this.deviceInfo;
-    if (newVal.device_model == '11'){
+    if (newVal.device_model == '102'){
       this.isShowPhoto = true
-    } else if(newVal.device_model == '12'){
-      this.isShowPhoto = false
-    } else if(newVal.device_model == '13'){
-      this.isShowPhoto = true
-    } else if(newVal.device_model == '14'){
-      this.isShowPhoto = true
-    } else if(newVal.device_model == '15'){
-      this.isShowPhoto = false
+      this.devImg = 'jgscd'
+    } else if(newVal.device_model == '0'){
+      this.devImg = 'scd'
     } else{
+      this.devImg = 'fxscd'
       this.isShowPhoto = true
     }
     // this.getPestAnalysis();

+ 12 - 16
pages/warning/index.vue

@@ -48,7 +48,7 @@
 
       <!-- 预警列表 -->
       <scroll-view
-        v-if="activeTab == 0"
+        v-if="activeTab == 0 || activeTab == 1 || activeTab == 2"
         class="warning-list" 
         scroll-y 
         :scroll-top="listScrollTop" 
@@ -68,7 +68,7 @@
                 <image :src="weather" class="icon-image" />
               </view>
               <text class="type-text">{{ warning.warning_title }}</text>
-              <text class="device-type">{{ warning.device_type }}</text>
+              <text class="device-type">{{ warning.purview_name }}</text>
             </view>
             <view class="warning-level" 
             :class="
@@ -102,7 +102,7 @@
       </scroll-view>
 
       <scroll-view
-        v-if="activeTab == 1"
+        v-if="activeTab == 3"
         class="warning-list" 
         scroll-y 
         :scroll-top="listScrollTop" 
@@ -159,7 +159,7 @@
         <view class="popup-time">{{ formatTime(current.upl_time) }}</view>
         <view class="popup-text">
           <u-icon name="map" size="28"></u-icon>
-          <text style="margin-left: 10rpx">{{ warning.address || '-' }}</text>
+          <text style="margin-left: 10rpx">{{ current.address || '-' }}</text>
         </view>
       </view>
 		</u-popup>
@@ -222,9 +222,9 @@ export default {
     activeTabHandler(index){
       this.activeTab = index;
       this.page = 1;
-      if(index == 0 || index == 1){
+      if(index == 0 || index == 1 || index == 2){
         this.getWarningList();
-      }else if(index == 2){
+      }else if(index == 3){
         this.getWarningManualList();
       }
     },
@@ -248,18 +248,18 @@ export default {
       this.page = 1;
       this.loading = false;
       this.finished = false;
-      if(this.activeTab == 0 || this.activeTab == 1){
+      if(this.activeTab == 0 || this.activeTab == 1 || this.activeTab == 2){
         this.getWarningList();
-      }else if(this.activeTab == 2){
+      }else if(this.activeTab == 3){
         this.getWarningManualList();
       }
     },
     // 加载更多
     loadMore() {
       if (this.finished) return;
-      if(this.activeTab == 0 || this.activeTab == 1){
+      if(this.activeTab == 0 || this.activeTab == 1 || this.activeTab == 2){
         this.getWarningList();
-      }else if(this.activeTab == 2){
+      }else if(this.activeTab == 3){
         this.getWarningManualList();
       }
     },
@@ -271,9 +271,9 @@ export default {
       this.loading = false;
       this.finished = false;
       this.refreshing = true;
-      if(this.activeTab == 0 || this.activeTab == 1){
+      if(this.activeTab == 0 || this.activeTab == 1 || this.activeTab == 2){
         this.getWarningList();
-      }else if(this.activeTab == 2){
+      }else if(this.activeTab == 3){
         this.getWarningManualList();
       }
     },
@@ -402,7 +402,6 @@ export default {
       
       const start = this.dateToTimestamp(this.startTime + ' 00:00:00');
       const end = this.dateToTimestamp(this.endTime + ' 23:59:59');
-      console.log(this.activeTab,this.tabs,'activeTabactiveTabactiveTab')
       const params = {
         start,
         end,
@@ -419,10 +418,8 @@ export default {
           method:'POST',
           data: params,
         })
-        
         const resData = res?.data || [];
         const list = resData || [];
-        
         if (this.page === 1) {
           this.warningList = list;
         } else {
@@ -431,7 +428,6 @@ export default {
         
         this.total = res?.total_num || 0;
         this.loading = false;
-        
         // 计算是否还有更多数据
         if (this.warningList.length >= this.total) {
           this.finished = true;

+ 2 - 2
util/neutral.js

@@ -1,6 +1,6 @@
 export default {
-  isneutral:true,//云飞智控
-  // isneutral: false, //智控
+  // isneutral:true,//云飞智控
+  isneutral: false, //智控
   developAPI:'https://uat.hnyfwlw.com',//测试环境访问地址
   // productAPI:'http://8.136.98.49:8002',//生产环境
   productAPI:'https://web.hnyfwlw.com',//生产环境