Просмотр исходного кода

孢子仪1.0 2.0历史数据兼容

zhangsijie 1 год назад
Родитель
Сommit
31eb45cb25
38 измененных файлов с 599 добавлено и 528 удалено
  1. 1 1
      manifest.json
  2. 25 10
      pages/cb/bzy/equip-set/bzyhistoryile.vue
  3. 99 51
      pages/cb/equip-detail/equip-detail.vue
  4. 16 3
      pages/environment/gsequipment.vue
  5. 442 447
      pages/environment/gshistory.vue
  6. BIN
      unpackage/cache/apk/__UNI__DBA6730_cm.apk
  7. 1 1
      unpackage/cache/apk/apkurl
  8. 1 1
      unpackage/cache/apk/cmManifestCache.json
  9. BIN
      unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-hdpi.png
  10. BIN
      unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-xhdpi.png
  11. BIN
      unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-xxhdpi.png
  12. BIN
      unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-xxxhdpi.png
  13. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/app-config-service.js
  14. 3 3
      unpackage/cache/wgt/__UNI__DBA6730/app-service.js
  15. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/app-view.js
  16. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/manifest.json
  17. 1 1
      unpackage/dist/build/app-plus/app-config-service.js
  18. 3 3
      unpackage/dist/build/app-plus/app-service.js
  19. 1 1
      unpackage/dist/build/app-plus/app-view.js
  20. 1 1
      unpackage/dist/build/app-plus/manifest.json
  21. BIN
      unpackage/res/icons/1024x1024.png
  22. BIN
      unpackage/res/icons/120x120.png
  23. BIN
      unpackage/res/icons/144x144.png
  24. BIN
      unpackage/res/icons/152x152.png
  25. BIN
      unpackage/res/icons/167x167.png
  26. BIN
      unpackage/res/icons/180x180.png
  27. BIN
      unpackage/res/icons/192x192.png
  28. BIN
      unpackage/res/icons/20x20.png
  29. BIN
      unpackage/res/icons/29x29.png
  30. BIN
      unpackage/res/icons/40x40.png
  31. BIN
      unpackage/res/icons/58x58.png
  32. BIN
      unpackage/res/icons/60x60.png
  33. BIN
      unpackage/res/icons/72x72.png
  34. BIN
      unpackage/res/icons/76x76.png
  35. BIN
      unpackage/res/icons/80x80.png
  36. BIN
      unpackage/res/icons/87x87.png
  37. BIN
      unpackage/res/icons/96x96.png
  38. 2 2
      util/neutral.js

+ 1 - 1
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "云飞智控",
+    "name" : "智控",
     "appid" : "__UNI__DBA6730",
     "description" : "",
     "versionName" : "1.9.1",

+ 25 - 10
pages/cb/bzy/equip-set/bzyhistoryile.vue

@@ -28,17 +28,17 @@
 			</view>
 			<view class="condition">
 				<scroll-view scroll-x="true" class="scroll-X" scroll-top="0">
-					<table class="table" v-if="$QueryPermission(265)">
+					<table class="table" v-if="$QueryPermission(265) ||$QueryPermission(304) ||$QueryPermission(313)">
 						<tr class="tr">
-							<th class="th" v-for="(item,index) in thdata" :key="index">{{item}}</th>
+							<th class="th" v-for="(item,index) in thdata" :key="index" v-if="(!isShowBwc && item.indexOf('保温仓') < 0) || isShowBwc">{{item}}</th>
 						</tr>
 						<tr class="tr" v-for="(items,indexs) in historylistdata" :key="indexs" v-if="!forbidden">
 							<td class="td">{{items.d_h_t.addtime|timeFormat()}}</td>
 							<td class="td">{{items.d_h_t.ds==0?"关":"开"}}</td>
 							<td class="td">{{items.d_h_t.at}}</td>
 							<td class="td">{{items.d_h_t.ah}}</td>
-							<td class="td">{{items.d_h_t.set_temp}}</td>
-							<td class="td">{{items.d_h_t.pre_temp}}</td>
+							<td class="td" v-if="isShowBwc">{{items.d_h_t.set_temp}}</td>
+							<td class="td" v-if="isShowBwc">{{items.d_h_t.pre_temp}}</td>
 							<td class="td">{{items.d_h_t.batStatus==0?"正常":"欠压"}}</td>
 							<td class="td">{{items.d_h_t.rps==0?"正常":"雨控"}}</td>
 							<td class="td">{{Circulation.work_sta.value[items.d_h_t.work_sta]}}</td>
@@ -53,15 +53,15 @@
 					</table>
 					<table class="table" v-else>
 						<tr class="tr">
-							<th class="th" v-for="(item,index) in thdata2" :key="index">{{item}}</th>
+							<th class="th" v-for="(item,index) in thdata2" :key="index" v-if="(!isShowBwc && item.indexOf('保温仓') < 0) || isShowBwc">{{item}}</th>
 						</tr>
 						<tr class="tr" v-for="(items,indexs) in historylistdata" :key="indexs" v-if="!forbidden">
 							<td class="td">{{items.d_h_t.addtime|timeFormat()}}</td>
 							<td class="td">{{items.d_h_t.ds==0?"关":"开"}}</td>
 							<td class="td">{{items.d_h_t.at}}</td>
 							<td class="td">{{items.d_h_t.ah}}</td>
-							<td class="td">{{items.d_h_t.set_temp}}</td>
-							<td class="td">{{items.d_h_t.pre_temp}}</td>
+							<td class="td" v-if="isShowBwc">{{items.d_h_t.set_temp}}</td>
+							<td class="td" v-if="isShowBwc">{{items.d_h_t.pre_temp}}</td>
 							<td class="td">{{items.d_h_t.batStatus==0?"正常":"欠压"}}</td>
 							<td class="td">{{items.d_h_t.rps==0?"正常":"雨控"}}</td>
 							<td class="td">{{Circulation.work_sta.value[items.d_h_t.work_sta]}}</td>
@@ -94,6 +94,7 @@
 	export default {
 		data() {
 			return {
+				isShowBwc: false,
 				styles: {
 					// width: "650rpx",
 					height: "400rpx"
@@ -159,7 +160,13 @@
 							times.getMinutes())
 						arr1.push(res[i].temperature == "" ? "0" : res[i].temperature)
 						arr2.push(res[i].humidity == "" ? "0" : res[i].humidity)
-						arr3.push(res[i].others == "" ? "0" : res[i].others)
+						if(res[i].others) {
+							arr3.push(res[i].others)
+						} else {
+							if(res[i].others == "") {
+								arr3.push(0)
+							}
+						}
 					}
 					var obj = [{
 						name: '温度',
@@ -169,11 +176,14 @@
 						name: '湿度',
 						data: arr2,
 						color: '#6CBBFF'
-					}, {
+					}]
+					if(arr3.length > 0) {
+						obj.push({
 						name: '保温仓温度',
 						data: arr3,
 						color: '#FF3F3F'
-					}]
+					})
+					}
 					this.showColumn("canvasColumnA", xtitle, obj)
 				}
 			},
@@ -195,6 +205,11 @@
 					this.forbidden = true
 					console.log(res.data.length)
 				} else {
+					if(res.data[0].d_h_t.set_temp) {
+						this.isShowBwc = true
+					} else {
+						this.isShowBwc = false;
+					}
 					this.forbidden = false
 					console.log(res.data.length)
 				}

+ 99 - 51
pages/cb/equip-detail/equip-detail.vue

@@ -325,57 +325,105 @@
 							}
 						]
 					case 7:
-						return [{
-								icon: '/image/cb/icon02.png',
-								txt: '在线状态',
-								value: Number(this.device_status) == 1 ? '在线' : '离线',
-							},
-							{
-								icon: '/image/cb/icon05.png',
-								txt: '设备开关',
-								value: Number(this.newState.ds) == 1 ? '开启' : '关闭'
-							},
-							{
-								icon: '/image/cb/bzy/3.png',
-								txt: '摄像头状态',
-								value: this.newState.usb_sta == 1 ? '异常' : '正常'
-							},
-							{
-								icon: '/image/prevention/44.png',
-								txt: '当前电压',
-								value: this.newState.v_bat
-							}, {
-								icon: '/image/cb/icon08.png',
-								txt: '环境温度(℃)',
-								value: this.newState.at == "2.5" || this.newState.at == "25" || this.newState.at ==
-									"" || this.newState.at == "25.0" ? this.newState.new_tem : this.newState.at
-							}, {
-								icon: '/image/prevention/66.png',
-								txt: '环境湿度(%)',
-								value: this.newState.ah == "30" || this.newState.ah == "3.0" || this.newState.ah ==
-									"" || this.newState.ah == "30.0" ? this.newState.new_hum : this.newState.ah
-							}, {
-								icon: '/image/cb/icon16.png',
-								txt: '信号强度',
-								value: this.newState.csq
-							}, {
-								icon: '/image/cb/bzy/8.png',
-								txt: '已培养时间',
-								value: this.newState.staytime
-							}, {
-								icon: '/image/cb/icon12.png',
-								txt: '设备版本',
-								value: this.newState.dver
-							}, {
-								icon: '/image/cb/icon09.png',
-								txt: '保温仓当前温度',
-								value: this.newState.pre_temp
-							}, {
-								icon: '/image/cb/icon08.png',
-								txt: '保温仓设定温度',
-								value: this.newState.set_temp
-							}
-						];
+						if(this.newState.pre_temp) {
+							return [{
+									icon: '/image/cb/icon02.png',
+									txt: '在线状态',
+									value: Number(this.device_status) == 1 ? '在线' : '离线',
+								},
+								{
+									icon: '/image/cb/icon05.png',
+									txt: '设备开关',
+									value: Number(this.newState.ds) == 1 ? '开启' : '关闭'
+								},
+								{
+									icon: '/image/cb/bzy/3.png',
+									txt: '摄像头状态',
+									value: this.newState.usb_sta == 1 ? '异常' : '正常'
+								},
+								{
+									icon: '/image/prevention/44.png',
+									txt: '当前电压',
+									value: this.newState.v_bat
+								}, {
+									icon: '/image/cb/icon08.png',
+									txt: '环境温度(℃)',
+									value: this.newState.at == "2.5" || this.newState.at == "25" || this.newState.at ==
+										"" || this.newState.at == "25.0" ? this.newState.new_tem : this.newState.at
+								}, {
+									icon: '/image/prevention/66.png',
+									txt: '环境湿度(%)',
+									value: this.newState.ah == "30" || this.newState.ah == "3.0" || this.newState.ah ==
+										"" || this.newState.ah == "30.0" ? this.newState.new_hum : this.newState.ah
+								}, {
+									icon: '/image/cb/icon16.png',
+									txt: '信号强度',
+									value: this.newState.csq
+								}, {
+									icon: '/image/cb/bzy/8.png',
+									txt: '已培养时间',
+									value: this.newState.staytime
+								}, {
+									icon: '/image/cb/icon12.png',
+									txt: '设备版本',
+									value: this.newState.dver
+								}
+								, {
+									icon: '/image/cb/icon09.png',
+									txt: '保温仓当前温度',
+									value: this.newState.pre_temp
+								}, {
+									icon: '/image/cb/icon08.png',
+									txt: '保温仓设定温度',
+									value: this.newState.set_temp
+								}
+							];
+						} else {
+							return [{
+									icon: '/image/cb/icon02.png',
+									txt: '在线状态',
+									value: Number(this.device_status) == 1 ? '在线' : '离线',
+								},
+								{
+									icon: '/image/cb/icon05.png',
+									txt: '设备开关',
+									value: Number(this.newState.ds) == 1 ? '开启' : '关闭'
+								},
+								{
+									icon: '/image/cb/bzy/3.png',
+									txt: '摄像头状态',
+									value: this.newState.usb_sta == 1 ? '异常' : '正常'
+								},
+								{
+									icon: '/image/prevention/44.png',
+									txt: '当前电压',
+									value: this.newState.v_bat
+								}, {
+									icon: '/image/cb/icon08.png',
+									txt: '环境温度(℃)',
+									value: this.newState.at == "2.5" || this.newState.at == "25" || this.newState.at ==
+										"" || this.newState.at == "25.0" ? this.newState.new_tem : this.newState.at
+								}, {
+									icon: '/image/prevention/66.png',
+									txt: '环境湿度(%)',
+									value: this.newState.ah == "30" || this.newState.ah == "3.0" || this.newState.ah ==
+										"" || this.newState.ah == "30.0" ? this.newState.new_hum : this.newState.ah
+								}, {
+									icon: '/image/cb/icon16.png',
+									txt: '信号强度',
+									value: this.newState.csq
+								}, {
+									icon: '/image/cb/bzy/8.png',
+									txt: '已培养时间',
+									value: this.newState.staytime
+								}, {
+									icon: '/image/cb/icon12.png',
+									txt: '设备版本',
+									value: this.newState.dver
+								}
+							];
+						}
+						
 					case 4:
 						return [{
 								icon: '/image/cb/icon02.png',

+ 16 - 3
pages/environment/gsequipment.vue

@@ -59,6 +59,17 @@
 								<p>{{newdataobj.temp[index]}}℃</p>
 							</view>
 						</view>
+						<view class="newdatas_land_box" v-if="newdataobj.ecs[index]">
+							<view class="imgbox">
+								<image
+									:src="'http://www.hnyfwlw.com:8006//bigdata_app/image/environment/tubular/ddl'+(index+1)+'.png'"
+									mode="" class="img"></image>
+							</view>
+							<view class="infobox">
+								<p>电导率</p>
+								<p>{{newdataobj.ecs[index]}}ms/cm</p>
+							</view>
+						</view>
 					</view>
 				</view>
 			</view>
@@ -138,6 +149,7 @@
 				// this.depthlist = JSON.parse(JSON.stringify(this.newdataobj.depth))
 				this.newdataobj.temp = this.newdataobj.temp.split(",")
 				this.newdataobj.swc = this.newdataobj.swc.split(",")
+				this.newdataobj.ecs = this.newdataobj.ecs.split(",")
 				console.log(this.newdataobj)
 			},
 			confirm() {
@@ -296,19 +308,20 @@
 				display: flex;
 				justify-content: space-between;
 				flex-wrap: wrap;
+				align-items: center;
 
 				.newdatas_land_box {
-					width: 48%;
-					padding: 20rpx;
+					width: 32%;
+					padding: 10rpx;
 					box-sizing: border-box;
 					box-shadow: 0 0 10rpx #bcb9ca;
 					margin-top: 20rpx;
 					display: flex;
+					align-items: center;
 
 					.imgbox {
 						width: 60rpx;
 						height: 60rpx;
-						margin: 16rpx 30rpx 0rpx 20rpx;
 
 						.img {
 							width: 60rpx;

+ 442 - 447
pages/environment/gshistory.vue

@@ -1,481 +1,476 @@
 <template>
-  <view>
-    <view class="status_bar"></view>
-    <view class="" style="position: relative; top: 44px">
-      <view
-        style="
+	<view>
+		<view class="status_bar"></view>
+		<view class="" style="position: relative; top: 44px">
+			<view style="
           position: fixed;
           z-index: 10000000;
           width: 100%;
           background-color: #000000;
-        "
-      >
-        <uni-nav-bar
-          @clickLeft="clickLeft"
-          left-icon="back"
-          left-text="返回"
-          title="历史数据"
-        ></uni-nav-bar>
-      </view>
-    </view>
-    <view class="his_box">
-      <view class="selecttimes" @click="tiemshow = !tiemshow">
-        <view class="timesbox">
-          <image
-            :src="'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png'"
-            mode=""
-          ></image>
-          <p>{{ timetab(begintime) }}</p>
-          <p class="or">~</p>
-          <p>{{ timetab(end) }}</p>
-          <u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
-        </view>
-        <u-calendar
-          v-model="tiemshow"
-          mode="range"
-          @change="tiemchange"
-        ></u-calendar>
-      </view>
-      <view class="shuju_one">
-        <view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">
-          暂无数据
-        </view>
-        <view class="canvastishi" v-if="dataloadingtf">
-          <p class="dataloading">加载中</p>
-        </view>
-        <canvas
-          v-show="!tiemshow"
-          canvas-id="canvasColumnA"
-          id="canvasColumnA"
-          class="charts"
-          @touchstart="touchLineA($event)"
-          @touchmove="moveLineA($event)"
-          @touchend="touchEndLineA($event)"
-          disable-scroll="true"
-          :style="{
+        ">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="历史数据"></uni-nav-bar>
+			</view>
+		</view>
+		<view class="his_box">
+			<view class="selecttimes" @click="tiemshow = !tiemshow">
+				<view class="timesbox">
+					<image
+						:src="'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png'"
+						mode=""></image>
+					<p>{{ timetab(begintime) }}</p>
+					<p class="or">~</p>
+					<p>{{ timetab(end) }}</p>
+					<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
+				</view>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+			</view>
+			<view class="shuju_one">
+				<view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">
+					暂无数据
+				</view>
+				<view class="canvastishi" v-if="dataloadingtf">
+					<p class="dataloading">加载中</p>
+				</view>
+				<canvas v-show="!tiemshow" canvas-id="canvasColumnA" id="canvasColumnA" class="charts"
+					@touchstart="touchLineA($event)" @touchmove="moveLineA($event)" @touchend="touchEndLineA($event)"
+					disable-scroll="true" :style="{
             width: cWidth * pixelRatio + 'px',
             height: cHeight * pixelRatio + 'px',
             transform: 'scale(' + 1 / pixelRatio + ')',
             'margin-left': (-cWidth * (pixelRatio - 1)) / 2 + 'px',
             'margin-top': (-cHeight * (pixelRatio - 1)) / 2 + 'px',
-          }"
-        ></canvas>
-      </view>
-      <view class="condition">
-        <scroll-view scroll-top="0" scroll-x="true" class="scroll-X">
-          <table class="table">
-            <tr class="tr">
-              <th class="th" v-for="(item, index) in thdata" :key="'a' + index">
-                {{ item }}
-              </th>
-            </tr>
-            <tr
-              class="tr"
-              v-for="(items, indexs) in historylistdata"
-              :key="'b' + indexs"
-              v-if="!forbidden"
-            >
-              <td class="td">{{ items.uptime | timeFormat() }}</td>
-             <!-- <td class="td">{{ items.ats }}</td>
+          }"></canvas>
+			</view>
+			<view class="condition">
+				<scroll-view scroll-top="0" scroll-x="true" class="scroll-X">
+					<table class="table">
+						<tr class="tr">
+							<th class="th" v-for="(item, index) in thdata" :key="'a' + index">
+								{{ item }}
+							</th>
+						</tr>
+						<tr class="tr" v-for="(items, indexs) in historylistdata" :key="'b' + indexs" v-if="!forbidden">
+							<td class="td">{{ items.uptime | timeFormat() }}</td>
+							<!-- <td class="td">{{ items.ats }}</td>
               <td class="td">{{ items.at }}</td> -->
-              <td
-                class="td"
-                v-for="(item, index) in items.temp"
-                :key="'c' + index"
-              >
-                {{ item }}
-              </td>
-              <td
-                class="td"
-                v-for="(item, index) in items.swc"
-                :key="'d' + index"
-              >
-                {{ item }}
-              </td>
-              <!-- <td class="td">{{ items.atm }}</td> -->
-            </tr>
-            <tr class="tr" v-if="forbidden">
-              <td class="td" v-for="item in 13">暂无数据</td>
-            </tr>
-          </table>
-        </scroll-view>
-        <view class="pagenumber">
-          <button @click="prev">上一页</button>
-          <view class="pagenumber_page"> 第 {{ page }} 页 </view>
-          <view class="pagenumber_page"> 共 {{ pagesum }} 页 </view>
-          <button @click="next">下一页</button>
-        </view>
-      </view>
-    </view>
-  </view>
+							<td class="td" v-for="(item, index) in items.temp" :key="'c' + index">
+								{{ item }}
+							</td>
+							<td class="td" v-for="(item, index) in items.swc" :key="'d' + index">
+								{{ item }}
+							</td>
+							<td class="td" v-for="(item, index) in items.ecs" :key="'e' + index">
+								{{ item }}
+							</td>
+							<!-- <td class="td">{{ items.atm }}</td> -->
+						</tr>
+						<tr class="tr" v-if="forbidden">
+							<td class="td" v-for="item in 13">暂无数据</td>
+						</tr>
+					</table>
+				</scroll-view>
+				<view class="pagenumber">
+					<button @click="prev">上一页</button>
+					<view class="pagenumber_page"> 第 {{ page }} 页 </view>
+					<view class="pagenumber_page"> 共 {{ pagesum }} 页 </view>
+					<button @click="next">下一页</button>
+				</view>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
-import uCharts from "../../components/js_sdk/u-charts/u-charts/u-charts.js";
-var canvaColumnA = null;
-export default {
-  data() {
-    return {
-      tiemshow: false, //时间筛选弹框
-      begintime: "", //开始时间
-      end: "", //结束时间
-      dataloadingtf: true,
-      canvastishiTF: false,
-      device_id: "", //设备ID
-      thdata: [
-        "上传时间",
-        // "空气湿度(%RH)",
-        // "空气温度(℃)",
-        "10cm土壤温度(%RH)",
-        "20cm土壤温度(%RH)",
-        "30cm土壤温度(%RH)",
-        "10cm土壤湿度(%RH)",
-        "20cm土壤湿度(%RH)",
-        "30cm土壤湿度(%RH)",
-        // "大气压强(Pa)",
-      ], //表格抬头
-      forbidden: false,
-      historylistdata: [], //历史数据
-      pagesum: 1,
-      page: 1,
-      cWidth: "",
-      cHeight: "",
-      pixelRatio: 1,
-    };
-  },
-  methods: {
-    tiemchange(e) {
-      //切换时间
-      this.begintime = parseInt(+new Date(e.startDate) / 1000);
-      this.end = parseInt(+new Date(e.endDate) / 1000);
-      this.histprydatas();
-    },
-    timetab(e) {
-      //时间转换
-      e = new Date(e * 1000);
-      var year = e.getFullYear();
-      var month =
-        e.getMonth() + 1 < 10 ? "0" + (e.getMonth() + 1) : e.getMonth() + 1;
-      var day = e.getDate() < 10 ? "0" + e.getDate() : e.getDate();
-      var time = year + "/" + month + "/" + day;
-      return time;
-    },
-    async histprydatas() {
-      //历史数据
-      this.dataloadingtf = true;
-      const res = await this.$myRequest({
-        url: "/api/api_gateway?method=weather.weather.nd_data",
-        data: {
-          device_id: this.device_id,
-          page: this.page,
-          begin: this.begintime,
-          end: this.end,
-        },
-      });
-      this.dataloadingtf = false;
-      console.log(res.nums);
-      this.pagesum = Math.ceil(res.nums / 10) || 1;
-      this.historylistdata = res.dat_list;
-      for (var i = 0; i < this.historylistdata.length; i++) {
-        this.historylistdata[i].temp = this.historylistdata[i].temp.split(",");
-        this.historylistdata[i].swc = this.historylistdata[i].swc.split(",");
-      }
-      var arr1 = [];
-      var arr2 = [];
-      var xtitle = [];
-      var obj = [
-        {
-          name: "空气温度",
-          data: [],
-          color: "#00E29D",
-        },
-        {
-          name: "空气湿度",
-          data: [],
-          color: "#6CBBFF",
-        },
-      ];
-      var arr3 = [];
-      var k = 0;
-      for (var i = 0; i < res.dat_char.length; i++) {
-        var times = new Date(res.dat_char[i].uptime * 1000);
-        xtitle.unshift(
-          times.getMonth() +
-            1 +
-            "/" +
-            times.getDate() +
-            "-" +
-            times.getHours() +
-            ":" +
-            times.getMinutes()
-        );
-        arr1.unshift(res.dat_char[i].at == "" ? "0" : res.dat_char[i].at); //空气温度
-        arr2.unshift(res.dat_char[i].ats == "" ? "0" : res.dat_char[i].ats); //空气湿度
-        res.dat_char[i].temp = res.dat_char[i].temp.split(",");
-        res.dat_char[i].swc = res.dat_char[i].swc.split(",");
-        for (var j = 0; j < res.dat_char[i].temp.length; j++) {
-          arr3.unshift(
-            res.dat_char[i].temp[j] == "" ? "0" : res.dat_char[i].temp[j]
-          ); //10cm土壤温度
-        }
-        res.dat_char[i].temp.forEach((items, indexs) => {
-          var tempdata = [];
-          var tempdatas = [];
-          tempdata.push(Number(items));
-          tempdatas.push(Number(res.dat_char[i].swc[indexs]));
-          var temparrs = {
-            name: 10 + indexs * res.topic + "cm土壤温度",
-            data: tempdata,
-          };
-          var temparr = {
-            name: 10 + indexs * res.topic + "cm土壤湿度",
-            data: tempdatas,
-          };
-          obj.push(temparr);
-          obj.push(temparrs);
-        });
-      }
-      obj[0].data = arr1;
-      obj[1].data = arr2;
-      var listArr = [];
-      obj.forEach(function (el, index) {
-        for (var i = 0; i < listArr.length; i++) {
-          // 对比相同的字段key,相同放入对应的数组中
-          if (listArr[i].name == el.name && el.data !== undefined) {
-            listArr[i].data.unshift(el.data[0]);
-            return;
-          }
-        }
-        // 第一次对比没有参照,放入参照
-        listArr.push({
-          name: el.name,
-          data: el.data,
-        });
-      });
-      console.log(listArr);
-      if (listArr.length == 0) {
-        this.canvastishiTF = false;
-      } else {
-        this.canvastishiTF = true;
-      }
-      this.showColumn("canvasColumnA", xtitle, listArr);
-      // console.log(this.historylistdata)
-    },
-    prev() {
-      //上一页
-      if (this.page > 1) {
-        this.page--;
-        this.histprydatas();
-      }
-    },
-    next() {
-      //下一页
-      if (this.page < this.pagesum) {
-        this.page++;
-        this.histprydatas();
-      }
-    },
-    clickLeft() {
-      uni.navigateBack({
-        delta: 1,
-      });
-    },
-    showColumn(id, xtitle, xinfo) {
-      var _self = this;
-      canvaColumnA = new uCharts({
-        canvasId: id,
-        type: "line",
-        legend: {
-          position: "top",
-        },
-        fontSize: 11,
-        background: "#FFFFFF",
-        pixelRatio: 1,
-        animation: true,
-        dataLabel: false,
-        categories: xtitle,
-        series: xinfo,
-        enableScroll: true, //开启图表拖拽功能
-        xAxis: {
-          disableGrid: true,
-          type: "grid",
-          gridType: "dash",
-          itemCount: 4, //x轴单屏显示数据的数量,默认为5个
-          scrollShow: true, //新增是否显示滚动条,默认false
-          // scrollAlign: 'left', //滚动条初始位置
-          scrollBackgroundColor: "#F7F7FF", //默认为 #EFEBEF
-          scrollColor: "#DEE7F7", //默认为 #A6A6A6
-        },
-        yAxis: {},
-        width: _self.cWidth * 1,
-        height: _self.cHeight * 1,
-        extra: {
-          line: {
-            type: "curve",
-          },
-        },
-      });
-    },
-    touchLineA(e) {
-      console.log(e);
-      canvaColumnA.scrollStart(e);
-    },
-    moveLineA(e) {
-      canvaColumnA.scroll(e);
-    },
-    touchEndLineA(e) {
-      canvaColumnA.scrollEnd(e);
-      //下面是toolTip事件,如果滚动后不需要显示,可不填写
-      canvaColumnA.showToolTip(e, {
-        format: function (item, category) {
-          return category + " " + item.name + ":" + item.data;
-        },
-      });
-    },
-  },
-  onLoad(option) {
-    this.cWidth = uni.upx2px(650);
-    this.cHeight = uni.upx2px(500);
-    this.device_id = option.id;
-    this.end = parseInt(+new Date() / 1000);
-    this.begintime = parseInt(this.end - 24 * 60 * 60);
-    this.histprydatas();
-  },
-};
+	import uCharts from "../../components/js_sdk/u-charts/u-charts/u-charts.js";
+	var canvaColumnA = null;
+	export default {
+		data() {
+			return {
+				tiemshow: false, //时间筛选弹框
+				begintime: "", //开始时间
+				end: "", //结束时间
+				dataloadingtf: true,
+				canvastishiTF: false,
+				device_id: "", //设备ID
+				thdata: [
+					"上传时间",
+					// "空气湿度(%RH)",
+					// "空气温度(℃)",
+					"10cm土壤温度(%RH)",
+					"20cm土壤温度(%RH)",
+					"30cm土壤温度(%RH)",
+					"10cm土壤湿度(%RH)",
+					"20cm土壤湿度(%RH)",
+					"30cm土壤湿度(%RH)",
+					// "大气压强(Pa)",
+				], //表格抬头
+				forbidden: false,
+				historylistdata: [], //历史数据
+				pagesum: 1,
+				page: 1,
+				cWidth: "",
+				cHeight: "",
+				pixelRatio: 1,
+			};
+		},
+		methods: {
+			tiemchange(e) {
+				//切换时间
+				this.begintime = parseInt(+new Date(e.startDate) / 1000);
+				this.end = parseInt(+new Date(e.endDate) / 1000);
+				this.histprydatas();
+			},
+			timetab(e) {
+				//时间转换
+				e = new Date(e * 1000);
+				var year = e.getFullYear();
+				var month =
+					e.getMonth() + 1 < 10 ? "0" + (e.getMonth() + 1) : e.getMonth() + 1;
+				var day = e.getDate() < 10 ? "0" + e.getDate() : e.getDate();
+				var time = year + "/" + month + "/" + day;
+				return time;
+			},
+			async histprydatas() {
+				//历史数据
+				this.dataloadingtf = true;
+				const res = await this.$myRequest({
+					url: "/api/api_gateway?method=weather.weather.nd_data",
+					data: {
+						device_id: this.device_id,
+						page: this.page,
+						begin: this.begintime,
+						end: this.end,
+					},
+				});
+				this.dataloadingtf = false;
+				console.log(res.nums);
+				this.pagesum = Math.ceil(res.nums / 10) || 1;
+				this.historylistdata = res.dat_list;
+				for (var i = 0; i < this.historylistdata.length; i++) {
+					this.historylistdata[i].temp = this.historylistdata[i].temp.split(",");
+					this.historylistdata[i].swc = this.historylistdata[i].swc.split(",");
+					this.historylistdata[i].ecs = this.historylistdata[i].ecs.split(",");
+				}
+				var arr1 = [];
+				var arr2 = [];
+				var xtitle = [];
+				var obj = [{
+						name: "空气温度",
+						data: [],
+						color: "#00E29D",
+					},
+					{
+						name: "空气湿度",
+						data: [],
+						color: "#6CBBFF",
+					},
+				];
+				var arr3 = [];
+				var k = 0;
+				for (var i = 0; i < res.dat_char.length; i++) {
+					var times = new Date(res.dat_char[i].uptime * 1000);
+					xtitle.unshift(
+						times.getMonth() +
+						1 +
+						"/" +
+						times.getDate() +
+						"-" +
+						times.getHours() +
+						":" +
+						times.getMinutes()
+					);
+					arr1.unshift(res.dat_char[i].at == "" ? "0" : res.dat_char[i].at); //空气温度
+					arr2.unshift(res.dat_char[i].ats == "" ? "0" : res.dat_char[i].ats); //空气湿度
+					res.dat_char[i].temp = res.dat_char[i].temp.split(",");
+					res.dat_char[i].swc = res.dat_char[i].swc.split(",");
+					res.dat_char[i].ecs = res.dat_char[i].ecs.split(",");
+					for (var j = 0; j < res.dat_char[i].temp.length; j++) {
+						arr3.unshift(
+							res.dat_char[i].temp[j] == "" ? "0" : res.dat_char[i].temp[j]
+						); //10cm土壤温度
+					}
+					this.thdata.length = 1;
+					res.depth.split(',').forEach((dep, index) => {
+						this.thdata.push(`${dep}cm土壤温度(℃)`)
+						res.dat_char[i].temp.forEach((items, indexs) => {
+							var tempdata = [];
+							var tempdatas = [];
+							var ecsarr = [];
+							tempdata.push(Number(items));
+							tempdatas.push(Number(res.dat_char[i].swc[indexs]));
+							if((res.dat_char[i]).ecs[indexs]) {
+								ecsarr.push(Number(res.dat_char[i].ecs[indexs]));
+							}
+							var temparrs = {
+								name: dep + "cm土壤温度(℃)",
+								data: tempdata,
+							};
+							var temparr = {
+								name: dep + "cm土壤湿度(%RH)",
+								data: tempdatas,
+							};
+							var ecsparr = {
+								name: dep + "cm电导率(ms/cm)",
+								data: ecsarr,
+							};
+							obj.push(temparr);
+							obj.push(temparrs);
+							if(ecsarr.length > 0) {
+								obj.push(ecsparr);
+							}
+						});
+					})
+					res.depth.split(',').forEach((dep, index) => {
+						this.thdata.push(`${dep}cm土壤湿度(%RH)`)
+					})
+					res.depth.split(',').forEach((dep, index) => {
+						this.thdata.push(`${dep}cm电导率(ms/cm)`)
+					})
+				}
+				obj[0].data = arr1;
+				obj[1].data = arr2;
+				var listArr = [];
+				obj.forEach(function(el, index) {
+					for (var i = 0; i < listArr.length; i++) {
+						// 对比相同的字段key,相同放入对应的数组中
+						if (listArr[i].name == el.name && el.data !== undefined) {
+							listArr[i].data.unshift(el.data[0]);
+							return;
+						}
+					}
+					// 第一次对比没有参照,放入参照
+					listArr.push({
+						name: el.name,
+						data: el.data,
+					});
+				});
+				console.log(listArr);
+				if (listArr.length == 0) {
+					this.canvastishiTF = false;
+				} else {
+					this.canvastishiTF = true;
+				}
+				this.showColumn("canvasColumnA", xtitle, listArr);
+				// console.log(this.historylistdata)
+			},
+			prev() {
+				//上一页
+				if (this.page > 1) {
+					this.page--;
+					this.histprydatas();
+				}
+			},
+			next() {
+				//下一页
+				if (this.page < this.pagesum) {
+					this.page++;
+					this.histprydatas();
+				}
+			},
+			clickLeft() {
+				uni.navigateBack({
+					delta: 1,
+				});
+			},
+			showColumn(id, xtitle, xinfo) {
+				var _self = this;
+				canvaColumnA = new uCharts({
+					canvasId: id,
+					type: "line",
+					legend: {
+						position: "top",
+					},
+					fontSize: 11,
+					background: "#FFFFFF",
+					pixelRatio: 1,
+					animation: true,
+					dataLabel: false,
+					categories: xtitle,
+					series: xinfo,
+					enableScroll: true, //开启图表拖拽功能
+					xAxis: {
+						disableGrid: true,
+						type: "grid",
+						gridType: "dash",
+						itemCount: 4, //x轴单屏显示数据的数量,默认为5个
+						scrollShow: true, //新增是否显示滚动条,默认false
+						// scrollAlign: 'left', //滚动条初始位置
+						scrollBackgroundColor: "#F7F7FF", //默认为 #EFEBEF
+						scrollColor: "#DEE7F7", //默认为 #A6A6A6
+					},
+					yAxis: {},
+					width: _self.cWidth * 1,
+					height: _self.cHeight * 1,
+					extra: {
+						line: {
+							type: "curve",
+						},
+					},
+				});
+			},
+			touchLineA(e) {
+				console.log(e);
+				canvaColumnA.scrollStart(e);
+			},
+			moveLineA(e) {
+				canvaColumnA.scroll(e);
+			},
+			touchEndLineA(e) {
+				canvaColumnA.scrollEnd(e);
+				//下面是toolTip事件,如果滚动后不需要显示,可不填写
+				canvaColumnA.showToolTip(e, {
+					format: function(item, category) {
+						return category + " " + item.name + ":" + item.data;
+					},
+				});
+			},
+		},
+		onLoad(option) {
+			this.cWidth = uni.upx2px(650);
+			this.cHeight = uni.upx2px(500);
+			this.device_id = option.id;
+			this.end = parseInt(+new Date() / 1000);
+			this.begintime = parseInt(this.end - 24 * 60 * 60);
+			this.histprydatas();
+		},
+	};
 </script>
 
 <style lang="scss">
-.his_box {
-  width: 100%;
-  top: 200rpx;
-  position: relative;
-}
-.selecttimes {
-  width: 90%;
-  box-shadow: 0 0 10rpx #bcb9ca;
-  padding: 10rpx 20rpx;
-  box-sizing: border-box;
-  margin: 0 auto;
-  font-size: 28rpx;
+	.his_box {
+		width: 100%;
+		top: 200rpx;
+		position: relative;
+	}
 
-  .timesbox {
-    display: flex;
-    justify-content: space-around;
+	.selecttimes {
+		width: 90%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		padding: 10rpx 20rpx;
+		box-sizing: border-box;
+		margin: 0 auto;
+		font-size: 28rpx;
 
-    image {
-      width: 30rpx;
-      height: 30rpx;
-      margin-top: 6rpx;
-    }
+		.timesbox {
+			display: flex;
+			justify-content: space-around;
 
-    .icon {
-      color: #949494;
-      text-align: right;
-      margin-left: 30rpx;
-    }
-  }
+			image {
+				width: 30rpx;
+				height: 30rpx;
+				margin-top: 6rpx;
+			}
 
-  /deep/.u-calendar__action {
-    display: flex;
-    justify-content: space-around;
+			.icon {
+				color: #949494;
+				text-align: right;
+				margin-left: 30rpx;
+			}
+		}
 
-    .u-calendar__action__text {
-      line-height: 25px;
-    }
-  }
-}
+		/deep/.u-calendar__action {
+			display: flex;
+			justify-content: space-around;
 
-.shuju_one {
-  width: 90%;
-  margin: 20px auto;
-  box-shadow: 0 0 10rpx #bcb9ca;
-  padding-top: 20rpx;
-  height: 550rpx;
+			.u-calendar__action__text {
+				line-height: 25px;
+			}
+		}
+	}
 
-  .canvastishi {
-    font-size: 32rpx;
-    position: absolute;
-    top: 50%;
-    left: 50%;
-    margin-left: -64rpx;
-    margin-top: -21rpx;
+	.shuju_one {
+		width: 90%;
+		margin: 20px auto;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		padding-top: 20rpx;
+		height: 550rpx;
 
-    .dataloading:after {
-      overflow: hidden;
-      display: inline-block;
-      vertical-align: bottom;
-      animation: ellipsis 2s infinite;
-      content: "\2026";
-    }
+		.canvastishi {
+			font-size: 32rpx;
+			position: absolute;
+			top: 50%;
+			left: 50%;
+			margin-left: -64rpx;
+			margin-top: -21rpx;
 
-    @keyframes ellipsis {
-      from {
-        width: 2px;
-      }
+			.dataloading:after {
+				overflow: hidden;
+				display: inline-block;
+				vertical-align: bottom;
+				animation: ellipsis 2s infinite;
+				content: "\2026";
+			}
 
-      to {
-        width: 15px;
-      }
-    }
-  }
-}
+			@keyframes ellipsis {
+				from {
+					width: 2px;
+				}
 
-.condition {
-  display: flex;
-  flex-wrap: wrap;
-  width: 90%;
-  box-shadow: 0 0 10rpx #bcb9ca;
-  margin: 0 auto 30rpx;
-  .scroll-X {
-    width: 95%;
-    margin: 20rpx auto;
-    .tr {
-      display: flex;
-      overflow: hidden;
+				to {
+					width: 15px;
+				}
+			}
+		}
+	}
 
-      .th,
-      .td {
-        display: inline-block;
-        padding: 5rpx;
-        width: 300rpx;
-        text-align: center;
-        height: 52rpx;
-        line-height: 52rpx;
-        border: 2rpx solid #f1f1f1;
-      }
-    }
+	.condition {
+		display: flex;
+		flex-wrap: wrap;
+		width: 90%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		margin: 0 auto 30rpx;
 
-    .tr:nth-child(2n-1) {
-      background-color: #f5fff8;
-    }
+		.scroll-X {
+			width: 95%;
+			margin: 20rpx auto;
 
-    .tr:first-child {
-      background-color: #57c878;
-      color: #fff;
-    }
-  }
+			.tr {
+				display: flex;
+				overflow: hidden;
 
-  .pagenumber {
-    display: flex;
-    margin: 20rpx auto;
+				.th,
+				.td {
+					display: inline-block;
+					padding: 5rpx;
+					width: 300rpx;
+					text-align: center;
+					height: 52rpx;
+					line-height: 52rpx;
+					border: 2rpx solid #f1f1f1;
+				}
+			}
 
-    button {
-      width: 150rpx;
-      height: 50rpx;
-      line-height: 50rpx;
-      font-size: 26rpx;
-      text-align: center;
-      background-color: #57c878;
-      color: #ffffff;
-    }
+			.tr:nth-child(2n-1) {
+				background-color: #f5fff8;
+			}
 
-    .pagenumber_page {
-      width: 100rpx;
-      height: 50rpx;
-      line-height: 50rpx;
-      font-size: 26rpx;
-      text-align: center;
-    }
-  }
-}
-</style>
+			.tr:first-child {
+				background-color: #57c878;
+				color: #fff;
+			}
+		}
+
+		.pagenumber {
+			display: flex;
+			margin: 20rpx auto;
+
+			button {
+				width: 150rpx;
+				height: 50rpx;
+				line-height: 50rpx;
+				font-size: 26rpx;
+				text-align: center;
+				background-color: #57c878;
+				color: #ffffff;
+			}
+
+			.pagenumber_page {
+				width: 100rpx;
+				height: 50rpx;
+				line-height: 50rpx;
+				font-size: 26rpx;
+				text-align: center;
+			}
+		}
+	}
+</style>

BIN
unpackage/cache/apk/__UNI__DBA6730_cm.apk


+ 1 - 1
unpackage/cache/apk/apkurl

@@ -1 +1 @@
-https://app.liuyingyong.cn/build/download/1a8c8110-3f59-11ef-ace3-19ac6c8d787e
+https://app.liuyingyong.cn/build/download/a87a66e0-4029-11ef-b9c3-fbc5029a82ee

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/cache/apk/cmManifestCache.json


BIN
unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-hdpi.png


BIN
unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-xhdpi.png


BIN
unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-xxhdpi.png


BIN
unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-xxxhdpi.png


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/app-config-service.js


Разница между файлами не показана из-за своего большого размера
+ 3 - 3
unpackage/cache/wgt/__UNI__DBA6730/app-service.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/app-view.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/manifest.json


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/dist/build/app-plus/app-config-service.js


Разница между файлами не показана из-за своего большого размера
+ 3 - 3
unpackage/dist/build/app-plus/app-service.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/dist/build/app-plus/app-view.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/dist/build/app-plus/manifest.json


BIN
unpackage/res/icons/1024x1024.png


BIN
unpackage/res/icons/120x120.png


BIN
unpackage/res/icons/144x144.png


BIN
unpackage/res/icons/152x152.png


BIN
unpackage/res/icons/167x167.png


BIN
unpackage/res/icons/180x180.png


BIN
unpackage/res/icons/192x192.png


BIN
unpackage/res/icons/20x20.png


BIN
unpackage/res/icons/29x29.png


BIN
unpackage/res/icons/40x40.png


BIN
unpackage/res/icons/58x58.png


BIN
unpackage/res/icons/60x60.png


BIN
unpackage/res/icons/72x72.png


BIN
unpackage/res/icons/76x76.png


BIN
unpackage/res/icons/80x80.png


BIN
unpackage/res/icons/87x87.png


BIN
unpackage/res/icons/96x96.png


+ 2 - 2
util/neutral.js

@@ -1,4 +1,4 @@
 export default{
-	isneutral:true//云飞智控
-	// isneutral:false//智控
+	// isneutral:true//云飞智控
+	isneutral:false//智控
 }