zhangyun 4 anos atrás
pai
commit
14913ea1c0
33 arquivos alterados com 522 adições e 301 exclusões
  1. 2 2
      manifest.json
  2. 2 10
      pages/cb/cbd/equip-set/imgpage.vue
  3. 7 10
      pages/cb/xy2.0/historydatas.vue
  4. 2 2
      pages/cb/xy2.0/particulars.vue
  5. 210 31
      pages/environment/equipment.vue
  6. 4 2
      pages/environment/history.vue
  7. 1 0
      pages/environment/index.vue
  8. 4 1
      pages/equipList/index.vue
  9. 22 22
      pages/equipMange/index/useroperation.vue
  10. 2 1
      pages/expertDiagnosis/index.vue
  11. 1 11
      pages/index/index.vue
  12. 79 38
      pages/login/login.vue
  13. 114 86
      pages/my/about/about.vue
  14. 0 1
      pages/my/index/index.vue
  15. 1 1
      pages/prevention/equipmentdetails.vue
  16. BIN
      unpackage/cache/apk/__UNI__DBA6730_cm.apk
  17. 1 1
      unpackage/cache/apk/apkurl
  18. 1 1
      unpackage/cache/apk/cmManifestCache.json
  19. BIN
      unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-hdpi.png
  20. BIN
      unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-xhdpi.png
  21. BIN
      unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-xxhdpi.png
  22. BIN
      unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-xxxhdpi.png
  23. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/app-config-service.js
  24. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/app-service.js
  25. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/app-view.js
  26. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/manifest.json
  27. 1 1
      unpackage/dist/build/app-plus/app-config-service.js
  28. 1 1
      unpackage/dist/build/app-plus/app-service.js
  29. 1 1
      unpackage/dist/build/app-plus/app-view.js
  30. 1 1
      unpackage/dist/build/app-plus/manifest.json
  31. 39 39
      unpackage/dist/dev/app-plus/app-service.js
  32. 21 33
      unpackage/dist/dev/app-plus/app-view.js
  33. 1 1
      util/api.js

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "云飞智控",
     "appid" : "__UNI__DBA6730",
     "description" : "",
-    "versionName" : "1.0.2",
-    "versionCode" : 102,
+    "versionName" : "1.0.3",
+    "versionCode" : 103,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 2 - 10
pages/cb/cbd/equip-set/imgpage.vue

@@ -215,7 +215,6 @@
 				this.takephoto()
 			},
 			confirm(val){//时间选择框确定按钮
-				
 				var time = val.year+"-"+val.month+"-"+val.day+" "+val.hour+":"+val.minute+":00"
 				if(this.flag==1){
 					this.timestate = +new Date(time)/1000
@@ -250,20 +249,13 @@
 			this.d_id = option.d_id
 		},
 		onShow(){
-			var that = this
-			setTimeout(()=>{
-				that.imglistdata('','')
-			},1000)
 			this.timeend = +new Date() / 1000
 			this.timestate = this.timeend - 60 * 60 * 24
+			this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
 		},
 		onReachBottom() {
 			this.page++
-			if(this.self){
-				this.imglistdata('','')
-			}else{
-				this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
-			}
+			this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
 		},
 		onPageScroll(e) { //nvue暂不支持滚动监听,可用bindingx代替
 			if (e.scrollTop > 200) { //距离大于200时显示

+ 7 - 10
pages/cb/xy2.0/historydatas.vue

@@ -89,7 +89,7 @@
 					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_line_chart',
 					data: {
 						device_id: this.device_id,
-						start_time: parseInt(this.start_time / 1000),
+						strat_time: parseInt(this.start_time / 1000),
 						end_time: parseInt(this.end_time / 1000),
 						status: "at_ah"
 					}
@@ -137,7 +137,7 @@
 					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_line_chart',
 					data: {
 						device_id: this.device_id,
-						start_time: parseInt(this.start_time / 1000),
+						strat_time: parseInt(this.start_time / 1000),
 						end_time: parseInt(this.end_time / 1000),
 						status: "pest"
 					}
@@ -149,10 +149,9 @@
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_history',
 					data: {
-						device_type_id: 3,
-						device_id: this.device_id,
-						start_time: parseInt(this.start_time / 1000),
-						end_time: parseInt(this.end_time / 1000),
+						device_id:this.device_id,
+						strat_time:parseInt(this.start_time / 1000),
+						end_time:parseInt(this.end_time / 1000),
 						page: this.page
 					}
 				})
@@ -298,10 +297,8 @@
 			this.end_time = +new  Date() + 1000
 			this.start_time = this.end_time - 24 * 60 * 60 * 1000
 			console.log(new Date(this.end_time),new Date(this.start_time))
-			setTimeout(()=>{
-				this.history()
-				this.historylist()
-			},1000)
+			this.history()
+			this.historylist()
 		}
 	}
 </script>

+ 2 - 2
pages/cb/xy2.0/particulars.vue

@@ -81,7 +81,7 @@
 						<view class="sim_plan_text">
 							<p style="width: 100%;"></p>
 						</view>
-						{{simdata.data_plan}}MB
+						{{simdata.data_plan.toFixed(2)}}MB
 					</view>
 					<view class="sim_plan">
 						已用流量:
@@ -200,7 +200,7 @@
 			},
 			toggle(){
 				uni.navigateTo({
-					url:"./historydatas?device_id="+this.equipInfo.imei + "&d_id=" + this.equipInfo.d_id
+					url:"./historydatas?device_id="+this.equipInfo.device_id + "&d_id=" + this.equipInfo.d_id
 				})
 			},
 			addxy(){

+ 210 - 31
pages/environment/equipment.vue

@@ -7,10 +7,10 @@
 			</view>
 			<view class="info">
 				<view class="info_item">
-					<image :src="eqinfo.item.is_online==1?'http://static.yfpyx.com/bigdata_app/image/cb/onBg.png':'http://static.yfpyx.com/bigdata_app/image/cb/offBg.png'" mode=""
-					 class="bgi"></image>
+					<image :src="eqinfo.item.is_online==1?'http://static.yfpyx.com/bigdata_app/image/cb/onBg.png':'http://static.yfpyx.com/bigdata_app/image/cb/offBg.png'"
+					 mode="" class="bgi"></image>
 					<p style="font-size: 32rpx;" @click="copy(eqinfo.item)">设备 ID:{{eqinfo.item.equip_id||eqinfo.item.device_id}}
-					<image src="http://static.yfpyx.com/bigdata_app/image/environment/fuzhi.png" mode="" class="tishi"></image>
+						<image src="http://static.yfpyx.com/bigdata_app/image/environment/fuzhi.png" mode="" class="tishi"></image>
 					</p>
 					<p>设备名称:{{eqinfo.item.equip_name?eqinfo.item.equip_name:"无"}}</p>
 					<p>最近上报时间:{{eqinfo.item.uptime|timeFormat()}}</p>
@@ -22,7 +22,7 @@
 					<image :src="'http://static.yfpyx.com/bigdata_app'+'/image/environment/8.png'" mode=""></image>
 					<p>设备控制</p>
 				</view>
-				<view class="control_item"  @click="repairs">
+				<view class="control_item" @click="repairs">
 					<image :src="'http://static.yfpyx.com/bigdata_app'+'/image/environment/7.png'" mode=""></image>
 					<p>一键报修</p>
 				</view>
@@ -35,9 +35,10 @@
 				<p class="realtime_title">实时数据</p>
 				<view class="realtime_text">
 					<view class="realtime_text_item">
-						<view class="realtime_text_item_info" v-for="(item,index) in olddata.conf" :key="index" v-if="item">
+						<view class="realtime_text_item_info" v-for="(item,index) in olddata.conf" :key="index" v-if="item" @click="oneday(item,index)">
 							<view class="item_info_img" :style="{'background-color':olddatas[Math.floor(Math.random()*(5-0+1))]}">
-								<image :src="'http://static.yfpyx.com/bigdata_app'+'/image/environment/icon_'+olddata.dat[index][1]+'.png'" mode=""></image>
+								<image :src="'http://static.yfpyx.com/bigdata_app'+'/image/environment/icon_'+olddata.dat[index][1]+'.png'"
+								 mode=""></image>
 							</view>
 							<view class="item_info_text">
 								<p>{{item}}</p>
@@ -48,10 +49,30 @@
 				</view>
 			</view>
 		</view>
+		<u-modal v-model="show" :title-style="{color: 'red'}" :mask-close-able="true" title="24小时数据">
+			<p class="tishiTF" v-if="tishiTF">暂无24小时数据</p>
+			<view class="slot-content" v-else>
+				<canvas v-if="canvastishiTF" 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 class="maxdata">
+					<view class="maxdata_box">
+						<p class="dian"></p>
+						<p>当天最大值:{{onedatasMax}}&nbsp&nbsp{{onedatasMaxtime|timeFormat()}}</p>
+					</view>
+					<view class="maxdata_box">
+						<p class="dian diantwo"></p>
+						<p>当天最小值:{{onedatasMin}}&nbsp&nbsp{{onedatasMintime|timeFormat()}}</p>
+					</view>
+				</view>
+			</view>
+		</u-modal>
+
 	</view>
 </template>
 
 <script>
+	import uCharts from '../../components/js_sdk/u-charts/u-charts/u-charts.js';
+	var canvasColumnA = null;
 	export default {
 		data() {
 			return {
@@ -59,9 +80,20 @@
 				olddata: {},
 				olddatas: ["#fba825", "#53d67c", "#008cf2", "#fb504d", "#d87ffc", "#4ec5f0"],
 				city: "",
-				kongtf:false,
-				daydatatf:false,
-				shujutf:false
+				kongtf: false,
+				daydatatf: false,
+				shujutf: false,
+				onedatas: [],
+				canvastishiTF: true,
+				cWidth: '300',
+				cHeight: '200',
+				pixelRatio: 1,
+				show: false,
+				onedatasMax: 0,
+				onedatasMin: 0,
+				onedatasMaxtime:"",
+				onedatasMintime:"",
+				tishiTF:false
 			}
 		},
 		methods: {
@@ -86,6 +118,21 @@
 				}
 				console.log(this.olddata)
 			},
+			// weather.weather.qxz_data_chart 一天的数据
+			async onehistory() { //设备列表
+				var  newtime = +new Date()/1000
+				var  oldtime = newtime-24*60*60
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=weather.weather.qxz_data_chart',
+					data: {
+						device_id: this.eqinfo.item.equip_id || this.eqinfo.item.device_id,
+						begin: parseInt(oldtime),
+						end: parseInt(newtime)
+					}
+				})
+				this.onedatas = res.data
+				console.log(this.onedatas)
+			},
 			control() { //设备控制
 				uni.navigateTo({
 					url: "./contros?id=" + this.eqinfo.item.d_id
@@ -96,57 +143,153 @@
 					url: "./history?device_id=" + this.eqinfo.item.equip_id
 				})
 			},
-			reverseGeocode(lat,lng){
+			reverseGeocode(lat, lng) {
 				uni.request({
 					type: "GET",
-					url: "https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=" + lng + "," +lat  + "&key=27273b81090f78759e4057f94474516f&radius=1000&extensions=all",
+					url: "https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=" + lng + "," + lat +
+						"&key=27273b81090f78759e4057f94474516f&radius=1000&extensions=all",
 					dataType: "json",
 					complete: ress => {
 						console.log(ress)
 						this.city = ress.data.regeocode.formatted_address
-					}  
+					}
 				});
 			},
-			copy(item){
+			copy(item) {
 				uni.setClipboardData({
-				    data: item.equip_id||item.device_id,
-				    success: function () {
-				        console.log('success');
-				    }
+					data: item.equip_id || item.device_id,
+					success: function() {
+						console.log('success');
+					}
 				});
 			},
-			repairs(){
+			repairs() {
 				console.log(this.eqinfo.item)
-				var device_id = this.eqinfo.item.equip_id||this.eqinfo.item.device_id
+				var device_id = this.eqinfo.item.equip_id || this.eqinfo.item.device_id
 				uni.navigateTo({
-					url: "../afterSale/addafter?device_id="+ device_id +"&device_type="+ 5
+					url: "../afterSale/addafter?device_id=" + device_id + "&device_type=" + 5
 				})
-			}
+			},
+			oneday(item, index) {
+				console.log(item, index)
+				var obj = {
+					name: item,
+					data: [],
+				}
+				var xtitle = []
+				var linearr = []
+				var arr = []
+				var timearr = []
+				for (var i = 0; i < this.onedatas.length; i++) {
+					if(Number(this.onedatas[i].dat[index].slice(0, this.onedatas[i].dat[index].indexOf("#")))!=-99.99){
+						obj.data.unshift(Number(this.onedatas[i].dat[index].slice(0, this.onedatas[i].dat[index].indexOf("#"))))
+						arr.unshift(Number(this.onedatas[i].dat[index].slice(0, this.onedatas[i].dat[index].indexOf("#"))))
+						var times = new Date(this.onedatas[i].time * 1000)
+						xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" + times.getMinutes())
+						timearr.unshift(+new Date(times)/1000)
+					}
+				}
+				arr.sort(function(a, b) {
+					return a - b
+				})
+				this.onedatasMin = arr[0]
+				this.onedatasMax = arr[arr.length - 1]
+				for(var i = 0; i < obj.data.length; i++){
+					if(this.onedatasMax==obj.data[i]){
+						this.onedatasMaxtime = timearr[i]
+					}
+					if(this.onedatasMin==obj.data[i]){
+						this.onedatasMintime = timearr[i]
+					}
+				}
+				linearr.push(obj)
+				if(obj.data.length==0){
+					this.tishiTF = true
+				}else{
+					this.tishiTF = false
+				}
+				this.showColumn("canvasColumnA", xtitle, linearr)
+				this.show = true
+			},
+			showColumn(id, xtitle, xinfo) {
+				var _self = this
+				canvasColumnA = 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: {
+						format:(val)=>{return val.toFixed(2)}
+					},
+					width: _self.cWidth * 1,
+					height: _self.cHeight * 1,
+					extra: {
+						line: {
+							type: 'curve'
+						},
+					},
+				});
+			},
+			touchLineA(e) {
+				canvasColumnA.scrollStart(e);
+			},
+			moveLineA(e) {
+				canvasColumnA.scroll(e);
+			},
+			touchEndLineA(e) {
+				canvasColumnA.scrollEnd(e);
+				//下面是toolTip事件,如果滚动后不需要显示,可不填写
+				canvasColumnA.showToolTip(e, {
+					format: function(item, category) {
+						return category + ' ' + item.name + ':' + item.data
+					}
+				});
+			},
 		},
 		onLoad(option) {
 			this.$forceUpdate()
 			this.eqinfo.item = JSON.parse(option.shebei)
 			console.log(JSON.parse(option.shebei))
 			this.history()
-			if(this.eqinfo.item.lat==''||this.eqinfo.item.lng==""){
+			this.onehistory()
+			if (this.eqinfo.item.lat == '' || this.eqinfo.item.lng == "") {
 				console.log(1)
-			}else{
-				this.reverseGeocode(this.eqinfo.item.lat,this.eqinfo.item.lng)
+			} else {
+				this.reverseGeocode(this.eqinfo.item.lat, this.eqinfo.item.lng)
 			}
 			uni.getStorage({
-				key:"jurisdiction",
-				success:(res)=>{
+				key: "jurisdiction",
+				success: (res) => {
 					console.log(JSON.parse(res.data))
-					let items = JSON.parse(res.data).filter((item)=>{
+					let items = JSON.parse(res.data).filter((item) => {
 						return item.purview_name == "环境监测系统"
 					})
-					let items2 = items[0].children.filter((item)=>{
+					let items2 = items[0].children.filter((item) => {
 						return item.purview_name == "环境监测"
 					})
 					var arr = items2[0].children
 					console.log(arr)
-					for(var i =0;i<arr.length;i++){
-						switch (arr[i].purview_name){
+					for (var i = 0; i < arr.length; i++) {
+						switch (arr[i].purview_name) {
 							case "设备控制":
 								this.kongtf = true
 								break
@@ -169,6 +312,7 @@
 		width: 100%;
 		position: absolute;
 		top: 44px;
+
 		.info_item {
 			width: 90%;
 			margin: 0 auto;
@@ -176,6 +320,7 @@
 			padding: 26rpx 50rpx;
 			position: relative;
 			box-sizing: border-box;
+
 			.bgi {
 				width: 100%;
 				height: 250rpx;
@@ -184,11 +329,13 @@
 				left: 0;
 				z-index: -1;
 			}
+
 			p {
 				font-size: 24rpx;
 				color: #FFFFFF;
 				margin-bottom: 10rpx;
-				.tishi{
+
+				.tishi {
 					width: 30rpx;
 					height: 30rpx;
 					margin: 0rpx 0 0 20rpx;
@@ -211,6 +358,7 @@
 			width: 128rpx;
 			height: 120rpx;
 			width: 33%;
+
 			image {
 				width: 70rpx;
 				height: 70rpx;
@@ -258,6 +406,7 @@
 						margin-right: 28rpx;
 						border-radius: 50%;
 						height: 90rpx;
+
 						image {
 							width: 64rpx;
 							height: 64rpx;
@@ -273,4 +422,34 @@
 		}
 
 	}
+
+	.charts {
+		// width: 650upx;
+		// height: 400upx;
+		background-color: #FFFFFF;
+	}
+	.tishiTF{
+		text-align: center;
+		margin-top: 20rpx;
+	}
+	.maxdata {
+		font-size: 26rpx;
+
+		.maxdata_box {
+			display: flex;
+			padding-left: 30rpx;
+			box-sizing: border-box;
+		}
+		.dian {
+			width: 20rpx;
+			height: 20rpx;
+			background-color: red;
+			margin: 8rpx 10rpx 0 0;
+			border-radius: 50%;
+		}
+
+		.diantwo {
+			background-color: #16c60d;
+		}
+	}
 </style>

+ 4 - 2
pages/environment/history.vue

@@ -168,6 +168,7 @@
 						if (obj.name) {
 							linearr.push(obj)
 						}
+						// console.log(linearr)
 					}
 					this.canvastishiTF = linearr.some((item) => {
 						return item.data.length != 0;
@@ -295,9 +296,10 @@
 			height: 550rpx;
 			position: relative;
 			box-shadow: 0 0 10rpx #bcb9ca;
-			z-index: -1;
 			.charts{
-				z-index: -1;
+				width: 650upx;
+				height: 400upx;
+				background-color: #FFFFFF;
 			}
 			.canvastishi {
 				font-size: 32rpx;

+ 1 - 0
pages/environment/index.vue

@@ -25,6 +25,7 @@
 		<view class="top" v-if="isTop" @click="top">
 			<image :src="'http://static.yfpyx.com/bigdata_app'+'/image/6209a98f0cb3b5086f2ca36152c9269.png'" mode=""></image>
 		</view>
+		
 	</view>
 </template>
 

+ 4 - 1
pages/equipList/index.vue

@@ -221,9 +221,12 @@
 				}
 			}
 		},
-		onLoad() {
+		onShow() {
 			this.list=[]
 			this.camera()
+			this.current=0
+			this.currents=0
+			// console.log(this.current)
 			uni.getStorage({
 				key: "jurisdiction",
 				success: (res) => {

+ 22 - 22
pages/equipMange/index/useroperation.vue

@@ -56,7 +56,7 @@
 			<view class="operation_group">
 				<view class="group_one" v-if="btnTF">
 					<view class="group_one_top">
-						<button type="default" @click="recharge">充值</button>
+						<!-- <button type="default" @click="recharge">充值</button> -->
 						<button type="default" @click="compile">编辑</button>
 						<button type="default" @click="forbidden" v-if="forbiddenTF" style="background-color: red;">禁用</button>
 						<button type="default" @click="forbidden" v-else>可用</button>
@@ -273,27 +273,27 @@
 					},
 				})
 			},
-			recharge() { //充值按钮
-				if(this.quanxian.chongzhi){
-					uni.showModal({
-						title: '提示',
-						content: '是否向该用户充值一年费用?',
-						success: function(res) {
-							if (res.confirm) {
-								this.getRecharge()
-								console.log('用户点击确定');
-							} else if (res.cancel) {
-								console.log('用户点击取消');
-							}
-						}
-					});
-				}else{
-					uni.showToast({
-						title: "您暂无权限进行此操作,如有需要,请联系管理员",
-						icon: "none"
-					})
-				}
-			}
+			// recharge() { //充值按钮
+			// 	if(this.quanxian.chongzhi){
+			// 		uni.showModal({
+			// 			title: '提示',
+			// 			content: '是否向该用户充值一年费用?',
+			// 			success: function(res) {
+			// 				if (res.confirm) {
+			// 					this.getRecharge()
+			// 					console.log('用户点击确定');
+			// 				} else if (res.cancel) {
+			// 					console.log('用户点击取消');
+			// 				}
+			// 			}
+			// 		});
+			// 	}else{
+			// 		uni.showToast({
+			// 			title: "您暂无权限进行此操作,如有需要,请联系管理员",
+			// 			icon: "none"
+			// 		})
+			// 	}
+			// }
 		},
 		onLoad(option) {
 			this.user_meg = JSON.parse(option.item)

+ 2 - 1
pages/expertDiagnosis/index.vue

@@ -116,8 +116,9 @@
 				success:(res)=>{
 					console.log(JSON.parse(res.data))
 					let items = JSON.parse(res.data).filter((item)=>{
-						return item.purview_name == "专家介绍"
+						return item.purview_name == "专家诊断"
 					})
+					console.log(items)
 					this.jurisdiction = items[0].children.some((item)=>{
 						return item.purview_name == "发帖列表"
 					})

+ 1 - 11
pages/index/index.vue

@@ -90,16 +90,6 @@
 			}
 		},
 		onLoad() {
-			this.jurisdiction={
-					cbtf:false,
-					jktf:false,
-					hjtf:false,
-					fztf:false,
-					sytf:false,
-					sbtf:false,
-					sqtf:false,
-					zjtf:false
-				}
 			this.getUserlogin()
 		}, 
 		onShow(){
@@ -135,7 +125,7 @@
 						case "测报系统":
 									this.jurisdiction.cbtf = true
 									break;
-						case "监控系统":
+						case "可视农业":
 									this.jurisdiction.jktf = true
 									break;
 						case "环境监测系统":

+ 79 - 38
pages/login/login.vue

@@ -17,7 +17,7 @@
 				<view class="passwold">
 					<u-icon name="lock" size="36" style="margin-right:30rpx;color: #72CD9C;"></u-icon>
 					<u-input v-model="formdata.passwold" type="password" :password-icon="true" :clearable="false" placeholder="请输入密码"
-					 @confirm="formSubmit" @input="passwoldddata" class="uni-input"/>
+					 @confirm="formSubmit" @input="passwoldddata" class="uni-input" />
 				</view>
 				<view class="aboutpass">
 					<u-checkbox-group>
@@ -78,7 +78,8 @@
 				contentA: '',
 				isShow: false, //进度条
 				percentNum: 0, //在线下载进度
-				passvalue:false
+				passvalue: false,
+				turnover: true
 			}
 		},
 		onLoad() {
@@ -105,10 +106,17 @@
 					this.value = res.data
 				}
 			})
+
 			console.log(this.value)
 		},
 		onShow() {
 			this.getEquipList()
+			uni.getStorage({
+				key: 'turnover',
+				success: (res) => {
+					this.turnover = Number(res.data)
+				}
+			})
 		},
 		methods: {
 			async getEquipList() {
@@ -122,42 +130,69 @@
 				this.appName = res[0].app_name
 				this.versions = Number(res[0].app_num.match(/\d+/g).join(""))
 				var id = Number(plus.runtime.version.match(/\d+/g).join(""))
-				console.log(this.versions,id)
-				if (this.versions > id) {
-					uni.showModal({
-						title: '提示',
-						content: '检测到有新版本,是否更新?',
-						success: (res) => {
-							if (res.confirm) {
-								console.log('用户点击确定');
-								this.showA = true
-								this.isShow = true
-								this.upgrade()
-							} else if (res.cancel) {
-								plus.runtime.quit();
-								console.log('用户点击取消');
-							}
-						}
-					})
+				console.log(this.versions, id)
+				if (this.percentNum > 0) {
+					console.log("更新中")
 				} else {
-					uni.getStorage({
-						key: 'session_key',
-						success: (res) => {
-							console.log(res)
-							if (res.data != "") {
-								uni.switchTab({
-									url: "../index/index"
-								})
-							}
-						},
-					})
+					if (this.turnover) {
+						if (this.versions > id) {
+							uni.showModal({
+								title: '检测到有新版本,是否更新?',
+								content: '建议更新,不更新可能会出现部分数据无法获取!',
+								confirmText: "更新",
+								cancelText: "不更新",
+								success: (res) => {
+									if (res.confirm) {
+										console.log('用户点击确定');
+										this.showA = true
+										this.isShow = true
+										this.upgrade()
+									} else if (res.cancel) {
+										// plus.runtime.quit();
+										console.log('用户点击取消');
+										uni.showModal({
+											title: '是否每次进入提示更新?',
+											content: '不再提示后可在<我的>-<关于我们>-<版本更新>中更新',
+											confirmText: "提示",
+											cancelText: "不再提示",
+											success: (res) => {
+												if (res.confirm) {
+													console.log('用户点击确定');
+													uni.setStorage({
+														key: "turnover",
+														data: '1',
+													})
+												} else if (res.cancel) {
+													uni.setStorage({
+														key: "turnover",
+														data: '0',
+													})
+												}
+											}
+										})
+									}
+								}
+							})
+						}
+					} else {
+						uni.getStorage({
+							key: 'session_key',
+							success: (res) => {
+								console.log(res)
+								if (res.data != "") {
+									uni.switchTab({
+										url: "../index/index"
+									})
+								}
+							},
+						})
+					}
 				}
 			},
 			upgrade() {
 				console.log(this.appName)
 				// var url = this.value + "/app_file/" + this.appName
 				var url = "http://hnyfwlw.com/app/big_data.apk"
-				console.log(url)
 				const downloadTask = uni.downloadFile({
 					url: url, //仅为示例,并非真实的资源
 					success: (res) => {
@@ -166,6 +201,8 @@
 							console.log('下载成功');
 							console.log('安装包下载成功,即将安装:' + JSON.stringify(res, null, 4));
 							plus.runtime.openFile(res.tempFilePath);
+							this.showA = false
+							this.isShow = false
 						}
 					},
 					fail: (err) => {
@@ -194,7 +231,6 @@
 				let session_key = res.session_key
 				uni.setStorage({
 					key: 'session_key',
-					
 					data: session_key,
 					success: () => {
 						uni.switchTab({
@@ -246,7 +282,7 @@
 						})
 						this.getEquipList()
 						uni.removeStorage({
-							key:"session_key"
+							key: "session_key"
 						})
 					}
 				});
@@ -255,7 +291,7 @@
 			arrow() {
 				this.arrowtf = !this.arrowtf
 			},
-			denglu(){
+			denglu() {
 				if (this.passvalue) {
 					uni.setStorage({
 						key: 'user_pass',
@@ -305,6 +341,7 @@
 		bottom: 0;
 		left: 0;
 		z-index: -1;
+
 		image {
 			width: 100%;
 		}
@@ -324,10 +361,12 @@
 			margin-bottom: 40rpx;
 			padding-bottom: 10rpx;
 			border-bottom: 2rpx solid #C3C3C3;
-			.u-icon__icon{
+
+			.u-icon__icon {
 				margin-top: 17rpx;
 			}
-			.uni-input{
+
+			.uni-input {
 				width: 100%;
 			}
 		}
@@ -339,10 +378,12 @@
 			margin-bottom: 40rpx;
 			padding-bottom: 10rpx;
 			border-bottom: 2rpx solid #C3C3C3;
-			.u-icon__icon{
+
+			.u-icon__icon {
 				margin-top: 17rpx;
 			}
-			.uni-input{
+
+			.uni-input {
 				width: 100%;
 			}
 		}

+ 114 - 86
pages/my/about/about.vue

@@ -70,21 +70,21 @@
 	export default {
 		data() {
 			return {
-				 id:'',
-				 versions:'',
-				 showA: false, //
-				 contentA: '',
-				 isShow: false, //进度条
-				 percentNum: 0, //在线下载进度,
-				 value:""
+				id: '',
+				versions: '',
+				showA: false, //
+				contentA: '',
+				isShow: false, //进度条
+				percentNum: 0, //在线下载进度,
+				value: ""
 			}
 		},
 		methods: {
-			async getEquipList() {
+			async getEquipList(TF) {
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=home.homes.app_version_record',
 					data: {
-						ret:"first"
+						ret: "first"
 					}
 				})
 				console.log(res)
@@ -92,31 +92,39 @@
 				this.id = res[0].app_num
 				this.versions = Number(res[0].app_num.match(/\d+/g).join(""))
 				var ids = Number(this.id.match(/\d+/g).join(""))
-				if (this.versions > ids) {
-					uni.showModal({
-						title: '提示',
-						content: '检测到有新版本,是否更新?',
-						success: (res) => {
-							if (res.confirm) {
-								console.log('用户点击确定');
-								this.showA = true
-								this.isShow = true
-								this.upgrade()
-							} else if (res.cancel) {
-								plus.runtime.quit();
-								console.log('用户点击取消');
-							}
+				if (this.percentNum > 0) {
+					console.log("更新中")
+				} else {
+					if (TF) {
+						if (this.versions > ids) {
+							uni.showModal({
+								title: '检测到有新版本,是否更新?',
+								content: '建议更新,不更新可能会出现部分数据无法获取!',
+								confirmText: "更新",
+								cancelText: "不更新",
+								success: (res) => {
+									if (res.confirm) {
+										console.log('用户点击确定');
+										this.showA = true
+										this.isShow = true
+										this.upgrade()
+									} else if (res.cancel) {
+										// plus.runtime.quit();
+										console.log('用户点击取消');
+									}
+								}
+							})
+						} else {
+							uni.showToast({
+								title: "当前版本已是最新版本",
+								icon: "none"
+							})
 						}
-					})
-				}else{
-					uni.showToast({
-						title:"当前版本已是最新版本",
-						icon:"none"
-					})
+					}
 				}
 			},
-			renewal(){
-				this.getEquipList()
+			renewal() {
+				this.getEquipList(true)
 			},
 			upgrade() {
 				uni.getStorage({
@@ -136,6 +144,8 @@
 							console.log('下载成功');
 							console.log('安装包下载成功,即将安装:' + JSON.stringify(res, null, 4));
 							plus.runtime.openFile(res.tempFilePath);
+							this.showA = false
+							this.isShow = false
 						}
 					},
 					fail: (err) => {
@@ -153,81 +163,99 @@
 					}
 				});
 			},
-			record(){
+			record() {
 				uni.navigateTo({
-					url:"../record/record"
+					url: "../record/record"
 				})
 			}
 		},
 		onShow() {
 			// this.id = plus.runtime.version
-			this.getEquipList()
+			this.getEquipList(false)
 		},
-		onBackPress(option){
+		onBackPress(option) {
 			uni.redirectTo({
-				url:"../index/index"
+				url: "../index/index"
 			})
 		}
 	}
 </script>
 
 <style lang="scss">
-page {
- 	background:$uni-bg-color-grey;
-}
-.line{
-	height:16rpx;
-	width:100%;
-	background:$uni-bg-color-grey;
-}
-.bottom{
-	height:190rpx;
-	line-height:190rpx;
-	font-size:8px;
-	text-align: center;
-}
-.logo-box{
-	background:#fff;
-	text-align: center;
-	padding:80rpx 0;
-	image{
-		width:150rpx;
+	page {
+		background: $uni-bg-color-grey;
+	}
+
+	.line {
+		height: 16rpx;
+		width: 100%;
+		background: $uni-bg-color-grey;
 	}
-	.version{
-		font-size:24rpx;
-		margin-top:20rpx;
+
+	.bottom {
+		height: 190rpx;
+		line-height: 190rpx;
+		font-size: 8px;
+		text-align: center;
 	}
-}
-.part{
-	background:#fff;
-	padding:0 40rpx;
-	.divide{
-		width:100%;
-		height:1px;
-		background:$uni-bg-color-grey;
+
+	.logo-box {
+		background: #fff;
+		text-align: center;
+		padding: 80rpx 0;
+
+		image {
+			width: 150rpx;
 		}
-	.info-item{
-		display:flex;
-		justify-content: space-between;
-		line-height:100rpx;
-		.tit{font-size:14px}
-		.val{
-			font-size:12px;
-			color:#666;
+
+		.version {
+			font-size: 24rpx;
+			margin-top: 20rpx;
 		}
 	}
-}
-.record{
-	background:#fff;
-	padding:0 40rpx;
-	.info-item{
-		display:flex;
-		justify-content: space-between;
-		line-height:100rpx;
-		.tit{font-size:14px}
+
+	.part {
+		background: #fff;
+		padding: 0 40rpx;
+
+		.divide {
+			width: 100%;
+			height: 1px;
+			background: $uni-bg-color-grey;
+		}
+
+		.info-item {
+			display: flex;
+			justify-content: space-between;
+			line-height: 100rpx;
+
+			.tit {
+				font-size: 14px
+			}
+
+			.val {
+				font-size: 12px;
+				color: #666;
+			}
+		}
 	}
-}
-.upgradeBox {
+
+	.record {
+		background: #fff;
+		padding: 0 40rpx;
+
+		.info-item {
+			display: flex;
+			justify-content: space-between;
+			line-height: 100rpx;
+
+			.tit {
+				font-size: 14px
+			}
+		}
+	}
+
+	.upgradeBox {
 		padding: 15rpx;
 	}
 </style>

+ 0 - 1
pages/my/index/index.vue

@@ -40,7 +40,6 @@
 			return {
 				usernames: '',
 				userinfos: {
-
 				}
 			}
 		},

+ 1 - 1
pages/prevention/equipmentdetails.vue

@@ -166,7 +166,7 @@
 			},
 			repairs(){
 				console.log(this.eqinfo.item)
-				var device_id = this.eqinfo.item.equip_id||this.eqinfo.item.device_id
+				var device_id = this.eqinfo.item.imei
 				uni.navigateTo({
 					url: "../afterSale/addafter?device_id="+ device_id +"&device_type="+ 5
 				})

BIN
unpackage/cache/apk/__UNI__DBA6730_cm.apk


+ 1 - 1
unpackage/cache/apk/apkurl

@@ -1 +1 @@
-https://service.dcloud.net.cn/build/download/09a68840-c5dd-11eb-b587-2fa0fbe284f1
+https://service.dcloud.net.cn/build/download/92c64520-c8f7-11eb-89f8-79a7dcf5e6e8

Diferenças do arquivo suprimidas por serem muito extensas
+ 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


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/app-config-service.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/app-service.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/app-view.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/manifest.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
unpackage/dist/build/app-plus/app-config-service.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
unpackage/dist/build/app-plus/app-service.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
unpackage/dist/build/app-plus/app-view.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
unpackage/dist/build/app-plus/manifest.json


Diferenças do arquivo suprimidas por serem muito extensas
+ 39 - 39
unpackage/dist/dev/app-plus/app-service.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 21 - 33
unpackage/dist/dev/app-plus/app-view.js


+ 1 - 1
util/api.js

@@ -1,5 +1,5 @@
 // const BASE_URL='http://8.136.98.49:8002'
-let BASE_URL = ''
+let BASE_URL = 'http://192.168.1.112:8002'
 export const myRequest=(options)=>{
 	BASE_URL=uni.getStorageSync('http')
 	if(BASE_URL==''){