فهرست منبع

feat: 添加设备详情页禁用显示选项和位置获取功能

- 在photoImage组件中添加disableShow属性控制标签显示
- 在首页添加位置获取功能并调用getcity方法
- 修复设备数据分页显示问题和样式调整
- 更新manifest版本号至1.15.12
- 修改neutral.js配置为智控环境
allen 2 روز پیش
والد
کامیت
c9def590d0

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "智控",
     "appid" : "__UNI__DBA6730",
     "description" : "",
-    "versionName" : "1.15.11",
-    "versionCode" : 11511,
+    "versionName" : "1.15.12",
+    "versionCode" : 11512,
     "transformPx" : false,
     "sassImplementationName" : "node-sass",
     /* 5+App特有相关 */

+ 6 - 7
pages/cbd/components/deviceData.vue

@@ -156,7 +156,7 @@
       </view>
       <view class="pagination">
         <text class="pagination-btn prev-btn" @click="prevPage">上一页</text>
-        <text class="pagination-info">{{currentPage}}/{{totalPages}}</text>
+        <text class="pagination-info">{{currentPage}}/{{totalPages || 1}}</text>
         <text class="pagination-btn next-btn" @click="nextPage">下一页</text>
       </view>
     </view>
@@ -287,11 +287,6 @@ export default {
   components: {
     floatButton,
   },
-  computed:{
-    totalPages(){
-      return Math.ceil(this.totalPage / this.page_size)
-    }
-  },
   data() {
     return {
       setting,
@@ -362,6 +357,9 @@ export default {
     this.equipStateDict = Circulation
   },
   computed: {
+    totalPages(){
+      return Math.ceil(this.totalPage / this.page_size)
+    },
     formatDevImg() {
       return `https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image/${this.devImg}.png`;
     },
@@ -380,7 +378,6 @@ export default {
     },
     deviceInfo:{
       handler(newVal, oldVal){
-        console.log(newVal.device_model,'device_modeldevice_modeldevice_model')
         if (newVal.device_model == '11'){
           this.devImg = 'cbd4.1'
           this.isShowPhoto = true
@@ -783,6 +780,7 @@ export default {
   align-items: center;
   justify-content: center;
   transition: all 0.3s ease;
+  background: #ffffff;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
   .general-icon{
     width: 50rpx;
@@ -800,6 +798,7 @@ export default {
     width: 80rpx;
     height: 80rpx;
     border-radius: 50%;
+    background: #ffffff;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
     display:flex;
     align-items: center;

+ 8 - 1
pages/cbd/components/photoImage.vue

@@ -1,6 +1,9 @@
 <template>
   <view class="photo-image">
-    <view class="photo-image__tabs">
+    <view
+      class="photo-image__tabs"
+      v-if="disableShow"
+    >
       <view
         class="photo-image__tab"
         v-for="(pest, index) in pestList"
@@ -36,6 +39,10 @@
 <script>
 export default {
   props:{
+    disableShow:{
+      type: Boolean,
+      default: true
+    },
     pestList:{
       type: Array,
       default: () => []

+ 1 - 0
pages/cbd/detail.vue

@@ -71,6 +71,7 @@
         <photoImage
           :images="imageList"
           :pestList="pestList"
+          :disableShow="disableShow"
           @changeTab="changeTab"
           :currentYear="currentYear"
           :deviceInfo="deviceInfo"

+ 1 - 0
pages/deviceDetails/weatherStation/eleDetail.vue

@@ -651,6 +651,7 @@ export default {
     position: relative;
     padding: 10rpx;
     overflow: hidden;
+    height: 336rpx;
     z-index: 0;
     .chart {
       width: 100%;

+ 1 - 2
pages/disease/cmb.vue

@@ -13,7 +13,6 @@
       <view class="info">
         <view class="info_item">
           <image
-		  
             :src="$imageURL+'/bigdata_app/image/cb/onBg.png'"
             mode=""
             class="bgi"
@@ -26,7 +25,7 @@
               class="tishi"
             ></image>
           </p>
-          <p>设备名称:{{ eqinfo.device_name || eqinfo.name || '无' }}</p>
+          <p>设备名称:{{ eqinfo.device_name || eqinfo.name || eqinfo.equip_name || '无' }}</p>
           <p>
             最近上报时间:<span v-if="eqinfo.uptime">{{
               eqinfo.uptime == 0 ? '无' : eqinfo.uptime | timeFormat()

+ 12 - 0
pages/index/index.vue

@@ -414,6 +414,12 @@
 			Debounce(() => {
 				this.getUserlogin();
 			}, 500)();
+			uni.getLocation({
+				type: 'wgs84 ',
+				success: (res) => {
+					this.getcity(res.longitude, res.latitude);
+				},
+			});
 			this.checkLocationPermission(true); // 首次加载弹框提醒
 		},
 		onShow() {
@@ -421,6 +427,12 @@
 			Debounce(() => {
 				this.getUserlogin();
 			}, 500)();
+			uni.getLocation({
+				type: 'wgs84 ',
+				success: (res) => {
+					this.getcity(res.longitude, res.latitude);
+				},
+			});
 			this.checkLocationPermission();
 		},
 	};

+ 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',//生产环境