Browse Source

所有sim卡模块问题修改,环境、监控添加SIM卡模块,病虫统计数据混乱问题修复 9/18

zhangyun 4 years atrás
parent
commit
a5f461ed78
100 changed files with 1011 additions and 322 deletions
  1. 24 0
      .hbuilderx/launch.json
  2. 4 4
      manifest.json
  3. 20 0
      pages.json
  4. 3 3
      pages/afterSale/addafter.vue
  5. 1 1
      pages/afterSale/index.vue
  6. 1 1
      pages/afterSale/search.vue
  7. 1 0
      pages/cb/cbd/equip-set/equip-set.vue
  8. 70 4
      pages/cb/cbd/equip-set/statistics.vue
  9. 179 142
      pages/cb/equip-detail/equip-detail.vue
  10. 1 1
      pages/cb/index/search.vue
  11. 28 13
      pages/cb/sim/sim.vue
  12. 4 4
      pages/disandpests/index.vue
  13. 9 0
      pages/environment/equipment.vue
  14. 2 1
      pages/environment/index.vue
  15. 1 1
      pages/environment/search.vue
  16. 186 0
      pages/environment/sim.vue
  17. 13 2
      pages/equipList/index.vue
  18. 1 1
      pages/equipList/search.vue
  19. 29 20
      pages/equipMange/index/assignment.vue
  20. 1 1
      pages/expertDiagnosis/postmessage.vue
  21. 1 1
      pages/fourBase/addbase.vue
  22. 1 1
      pages/fourBase/modification.vue
  23. 4 4
      pages/index/index.vue
  24. 3 3
      pages/login/login.vue
  25. 48 13
      pages/monitor/index.vue
  26. 186 0
      pages/monitor/sim.vue
  27. 37 12
      pages/my/about/about.vue
  28. 36 4
      pages/my/index/index.vue
  29. 15 6
      pages/my/record/record.vue
  30. 4 3
      pages/my/user-info/user-info.vue
  31. 1 1
      pages/prevention/index.vue
  32. 1 1
      pages/prevention/search.vue
  33. 34 14
      pages/prevention/sim.vue
  34. BIN
      static/images/ba167c2774bc7a63381dc3aaf1ef95c.png
  35. BIN
      unpackage/cache/apk/__UNI__DBA6730_cm.apk
  36. 1 1
      unpackage/cache/apk/apkurl
  37. 1 1
      unpackage/cache/apk/cmManifestCache.json
  38. 1 1
      unpackage/cache/certdata
  39. BIN
      unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-hdpi.png
  40. BIN
      unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-xhdpi.png
  41. BIN
      unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-xxhdpi.png
  42. BIN
      unpackage/cache/wgt/__UNI__DBA6730/.manifest/icon-android-xxxhdpi.png
  43. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/__uniappchooselocation.js
  44. BIN
      unpackage/cache/wgt/__UNI__DBA6730/__uniapperror.png
  45. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/__uniapppicker.js
  46. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/__uniappquill.js
  47. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/__uniappquillimageresize.js
  48. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/__uniappscan.js
  49. 2 2
      unpackage/cache/wgt/__UNI__DBA6730/app-config-service.js
  50. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/app-service.js
  51. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/app-view.js
  52. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/manifest.json
  53. BIN
      unpackage/cache/wgt/__UNI__DBA6730/static/images/ba167c2774bc7a63381dc3aaf1ef95c.png
  54. 1 1
      unpackage/cache/wgt/__UNI__DBA6730/view.css
  55. 3 3
      unpackage/cache/wgt/__UNI__DBA6730/view.umd.min.js
  56. 1 1
      unpackage/dist/build/app-plus/__uniappchooselocation.js
  57. BIN
      unpackage/dist/build/app-plus/__uniapperror.png
  58. 1 1
      unpackage/dist/build/app-plus/__uniapppicker.js
  59. 1 1
      unpackage/dist/build/app-plus/__uniappquill.js
  60. 1 1
      unpackage/dist/build/app-plus/__uniappquillimageresize.js
  61. 1 1
      unpackage/dist/build/app-plus/__uniappscan.js
  62. 2 2
      unpackage/dist/build/app-plus/app-config-service.js
  63. 1 1
      unpackage/dist/build/app-plus/app-service.js
  64. 1 1
      unpackage/dist/build/app-plus/app-view.js
  65. 1 1
      unpackage/dist/build/app-plus/manifest.json
  66. BIN
      unpackage/dist/build/app-plus/static/images/ba167c2774bc7a63381dc3aaf1ef95c.png
  67. 1 1
      unpackage/dist/build/app-plus/view.css
  68. 3 3
      unpackage/dist/build/app-plus/view.umd.min.js
  69. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  70. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/addafter.js.map
  71. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/index.js.map
  72. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/search.js.map
  73. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/equip-set.js.map
  74. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/statistics.js.map
  75. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/equip-detail/equip-detail.js.map
  76. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/index/search.js.map
  77. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/sim/sim.js.map
  78. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy2.0/historydatas.js.map
  79. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy2.0/particulars.js.map
  80. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/disandpests/index.js.map
  81. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/equipment.js.map
  82. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/index.js.map
  83. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/search.js.map
  84. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/sim.js.map
  85. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/index.js.map
  86. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/search.js.map
  87. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/assignment.js.map
  88. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/expertDiagnosis/postmessage.js.map
  89. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/expertDiagnosis/wormcase.js.map
  90. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/fourBase/addbase.js.map
  91. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/fourBase/modification.js.map
  92. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
  93. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map
  94. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/monitor/index.js.map
  95. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/monitor/sim.js.map
  96. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/about/about.js.map
  97. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/index/index.js.map
  98. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/record/record.js.map
  99. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/user-info/user-info.js.map
  100. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/prevention/index.js.map

+ 24 - 0
.hbuilderx/launch.json

@@ -0,0 +1,24 @@
+{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version": "0.0",
+    "configurations": [{
+     	"app-plus" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"default" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"h5" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"mp-weixin" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"type" : "uniCloud"
+     }
+    ]
+}

+ 4 - 4
manifest.json

@@ -1,9 +1,9 @@
 {
-    "name" : "智控",
+    "name" : "云飞智控",
     "appid" : "__UNI__DBA6730",
     "description" : "",
-    "versionName" : "1.0.6",
-    "versionCode" : 106,
+    "versionName" : "1.1.0",
+    "versionCode" : 110,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {
@@ -147,7 +147,7 @@
             "disableHostCheck" : true,
             "proxy" : {
                 "/ksy" : {
-                    "target" : "http://182.92.193.64:8002",
+                    "target" : "http://114.115.147.140:8002",
                     "changeOrigin" : true,
                     "ws" : true,
                     "pathRewrite" : {

+ 20 - 0
pages.json

@@ -501,6 +501,26 @@
             }
             
         }
+        ,{
+            "path" : "pages/monitor/sim",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "监控sim信息",
+                "enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+            }
+            
+        }
+        ,{
+            "path" : "pages/environment/sim",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "环境监测sim信息",
+                "enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+            }
+            
+        }
     ],
 	"condition": { //模式配置,仅开发期间生效
 		"current": 3, //当前激活的模式(list 的索引项)

+ 3 - 3
pages/afterSale/addafter.vue

@@ -89,7 +89,7 @@
 		},
 		data() {
 			return {
-				BASE_URL: 'http://182.92.193.64:8002',
+				BASE_URL: 'http://114.115.147.140:8002',
 				adddata:{//设备参数
 					id:'',
 					name:'',
@@ -181,7 +181,7 @@
 				    success:(res)=> {
 						console.log(res)
 						uni.uploadFile({
-						    url: 'http://182.92.193.64:8002/api/api_gateway?method=after_sale.after_sale_manage.video_upload', //仅为示例,非真实的接口地址
+						    url: 'http://114.115.147.140:8002/api/api_gateway?method=after_sale.after_sale_manage.video_upload', //仅为示例,非真实的接口地址
 						    filePath: res.tempFilePath,
 						    name: 'upload',
 							fileType:"video",
@@ -331,7 +331,7 @@
 			},
 			onok(ev){
 				uni.uploadFile({
-				    url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+				    url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
 					filePath: ev.path,
 				    name: 'img_file',
 				    formData: {

+ 1 - 1
pages/afterSale/index.vue

@@ -49,7 +49,7 @@
 	export default {
 		data() {  
 			return {
-				BASE_URL: 'http://182.92.193.64:8002',
+				BASE_URL: 'http://114.115.147.140:8002',
 				faultdata: [],
 				aftersale_icon: [{
 						src: '/image/afterSale/6.png'

+ 1 - 1
pages/afterSale/search.vue

@@ -51,7 +51,7 @@
 		data() {
 			return {
 				imports:'',
-				BASE_URL: 'http://182.92.193.64:8002',
+				BASE_URL: 'http://114.115.147.140:8002',
 				faultdata:[],
 				aftersale_icon: [{
 						src: '/image/afterSale/6.png'

+ 1 - 0
pages/cb/cbd/equip-set/equip-set.vue

@@ -454,6 +454,7 @@
 				console.log(this.equipContrlForm)
 				this.equipContrlForm.st =  String(this.equipContrlForm.st)
 				this.equipContrlForm.et =  String(this.equipContrlForm.et)
+				this.equipContrlForm.ts =  String(this.equipContrlForm.ts)
 				let res=await this.$myRequest({
 					url:'/api/api_gateway?method=forecast.send_control.device_control',
 					data:{

+ 70 - 4
pages/cb/cbd/equip-set/statistics.vue

@@ -44,6 +44,20 @@
 					</view> 
 					<canvas v-if="canvastishiTF" canvas-id="canvasRing" id="canvasRing" class="charts" @touchstart="touchRing" :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="shuju_table" v-if="tableval.length">
+					<table class="table">
+						<tr class="tr">
+							<th>害虫名称</th>
+							<th>害虫数量</th>
+							<th>害虫比例</th>
+						</tr>
+						<tr class="tr" v-for="(item,index) in tableval" :key="index">
+							<td class="td">{{item.name}}</td>
+							<td class="td">{{item.data}}</td>
+							<td class="td">{{(item.prop*100).toFixed(2)+"%"}}</td>
+						</tr>
+					</table>
+				</view>
 			</view>
 		</view>
 	</view>
@@ -145,7 +159,8 @@
 				tishitf: false,
 				tishi: false,
 				toptext: ["自动统计", "手动统计"],
-				topindex: 0
+				topindex: 0,
+				tableval:[]
 			}
 		},
 		methods: {
@@ -183,13 +198,39 @@
 						arr2.unshift(res.date[i].humidity == "" ? "0" : res.date[i].humidity)
 						arr3.unshift(res.date[i]._sums == "" ? "0" : res.date[i]._sums)
 					}
+					var maxnumarr = []
 					for(var i = 0; i < res.percentage.length; i++){
 						var obj = {}
 						obj.name = res.percentage[i].name_num
 						obj.data = Number(res.percentage[i].num)
-						ringarr.unshift(obj)
+						maxnumarr.unshift(obj)
+					}
+					var temp;
+					for(var i=0;i<maxnumarr.length-1;i++){
+					    for(var j=0;j<maxnumarr.length-1;j++){
+					        if(maxnumarr[j].data<maxnumarr[j+1].data){
+					            temp=maxnumarr[j];
+					            maxnumarr[j]=maxnumarr[j+1];
+					            maxnumarr[j+1]=temp;
+					        }
+					    }
+					}
+					
+					if(maxnumarr.length<20){
+						ringarr = maxnumarr
+					}else{
+						ringarr = maxnumarr.splice(0,20)
+						this.tableval = maxnumarr.splice(20)
+					}
+					var tablevalsum = 0
+					for(var i = 0; i < maxnumarr.length; i++){
+						tablevalsum += maxnumarr[i].data
 					}
-					console.log(ringarr)
+					for(var i = 0; i < this.tableval.length; i++){
+						this.tableval[i].prop = this.tableval[i].data/tablevalsum
+					}
+					console.log(this.tableval)
+					console.log(maxnumarr)
 					var obj = [{
 						name: '温度',
 						data: arr1,
@@ -285,6 +326,7 @@
 						obj.data = Number(res.date[i].pest_num)
 						ringarr.unshift(obj)
 					}
+					
 					var obj = [{
 						name: '害虫总数',
 						data: arr1,
@@ -413,6 +455,7 @@
 				}
 			},
 			changeindex(index) {
+				this.tableval = []
 				this.topindex = index
 				if (this.topindex == 0) {
 					this.pest_name = ''
@@ -482,7 +525,9 @@
 					canvasId: "canvasRing",
 					type: 'ring',
 					fontSize: 11,
-					legend: true,
+					legend: {
+						show:true,
+					},
 					extra: {
 						pie: {
 							offsetAngle: -45,
@@ -557,6 +602,27 @@
 			margin-top: -21rpx;
 		}
 	} 
+	.shuju_table{
+		position: absolute;
+		top: 1510rpx;
+		width: 90%;
+		left: 5%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		padding-top: 20rpx;
+		box-sizing: border-box;
+		margin-bottom: 40rpx;
+		.table{
+			.th,
+			.td {
+				padding: 5rpx;
+				width: 240rpx;
+				text-align: center;
+				height: 52rpx;
+				line-height: 52rpx;
+				font-size: 28rpx !important;
+			}
+		}
+	}
 	.condition {
 		position: absolute;
 		top: 600rpx;

+ 179 - 142
pages/cb/equip-detail/equip-detail.vue

@@ -3,13 +3,15 @@
 		<view :class="['info',equipInfo.is_online==1?'on':'off']">
 			<view class="" @click="copy(equipInfo)">
 				设备ID:{{equipInfo.imei||equipInfo.device_id}}
-				<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/environment/fuzhi.png" mode="" class="tishi"></image>
+				<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/environment/fuzhi.png" mode="" class="tishi">
+				</image>
 			</view>
 			<view class="">
 				设备名称:{{equipInfo.device_name==""?"无":equipInfo.device_name}}
 			</view>
 			<view class="">
-				设备类型:<span v-if="equipInfo.type">{{equipInfo.type|equipType}}</span><span v-else>{{equipInfo.type_name}}</span>
+				设备类型:<span v-if="equipInfo.type">{{equipInfo.type|equipType}}</span><span
+					v-else>{{equipInfo.type_name}}</span>
 			</view>
 			<view class="">
 				最新上报时间:{{equipInfo.addtime||equipInfo.uptime | timeFormat}}
@@ -26,20 +28,23 @@
 				<u-icon name="edit-pen" color="#f0ad4e" size="28"></u-icon>
 			</view>
 			<u-popup v-model="setTimeShow" mode="center" width="600rpx">
-				<u-field label="载玻片更换时间" placeholder="选择日期" label-width='240' required :error-message="glassErr" v-model="glass_slide_time"
-				 @click="glass_show=true" :field-style="fieldstyle" disabled>
+				<u-field label="载玻片更换时间" placeholder="选择日期" label-width='240' required :error-message="glassErr"
+					v-model="glass_slide_time" @click="glass_show=true" :field-style="fieldstyle" disabled>
 				</u-field>
-				<u-field label="培养液更换时间" placeholder="选择日期" label-width='240' required :error-message="culErr" v-model="cultivate_time"
-				 @click="cultivate_show=true" :field-style="fieldstyle" disabled>
+				<u-field label="培养液更换时间" placeholder="选择日期" label-width='240' required :error-message="culErr"
+					v-model="cultivate_time" @click="cultivate_show=true" :field-style="fieldstyle" disabled>
 				</u-field>
 				<view class="btn-box">
 					<u-button @click="setTimeSubmit" size="mini" type="success">确定</u-button>
 				</view>
-				<u-calendar v-model="glass_show" mode="date" :max-date="date" @change="timeChange($event,'glass')"></u-calendar>
-				<u-calendar v-model="cultivate_show" mode="date" :max-date="date" @change="timeChange($event,'cultivate')"></u-calendar>
+				<u-calendar v-model="glass_show" mode="date" :max-date="date" @change="timeChange($event,'glass')">
+				</u-calendar>
+				<u-calendar v-model="cultivate_show" mode="date" :max-date="date"
+					@change="timeChange($event,'cultivate')"></u-calendar>
 			</u-popup>
 			<u-popup v-model="yxShow" mode="center" width="600rpx">
-				<u-field label="监测害虫名称" label-width='240' required :error-message="xyErr" v-model="decoy" :field-style="fieldstyle">
+				<u-field label="监测害虫名称" label-width='240' required :error-message="xyErr" v-model="decoy"
+					:field-style="fieldstyle">
 				</u-field>
 				<view class="btn-box">
 					<u-button @click="yxSubmit" size="mini" type="success">确定</u-button>
@@ -101,102 +106,98 @@
 	export default {
 		data() {
 			return {
-				fieldstyle:{
-					border:"2rpx solid #f6f6f6",
-					"border-radius":"24px",
-					"padding-left":"20rpx",
-					"background-color":"#f6f6f6"
+				fieldstyle: {
+					border: "2rpx solid #f6f6f6",
+					"border-radius": "24px",
+					"padding-left": "20rpx",
+					"background-color": "#f6f6f6"
 				},
-				city:"",
+				city: "",
 				type: null, //设备类型
 				device_status: null,
 				equipInfo: {},
 				cbd: [{
-					icon: '/image/cb/1.png',
-					tex: '查看图片',
-					path: '/pages/cb/cbd/equip-set/imgpage',
-					tf:false
-				}, 
-				// {
-				// 	icon: '/image/cb/2.png',
-				// 	tex: '历史数据',
-				// 	path: '/pages/cb/cbd/equip-set/historyfile',
-				// 	tf:false
-				// }, 
-				{
-					icon: '/image/cb/3.png',
-					tex: '害虫统计',
-					path: '/pages/cb/cbd/equip-set/statistics',
-					tf:false
-				}, {
-					icon: '/image/cb/4.png',
-					tex: '设备控制',
-					path: '/pages/cb/cbd/equip-set/equip-set',
-					tf:false
-				}, {
-					icon: '/image/cb/5.png',
-					tex: '短信预警',
-					path: '/pages/cb/cbd/equip-set/note',
-					tf:false
-				}, {
-					icon: '/image/cb/6.png',
-					tex: 'sim卡详情',
-					path: '/pages/cb/sim/sim',
-					tf:true
-				},{
-					icon: '/image/environment/7.png',
-					tex: '一键报修',
-					path: '/pages/afterSale/addafter',
-					tf:true
-				}],
+						icon: '/image/cb/1.png',
+						tex: '查看图片',
+						path: '/pages/cb/cbd/equip-set/imgpage',
+						tf: false
+					},
+					{
+						icon: '/image/cb/3.png',
+						tex: '害虫统计',
+						path: '/pages/cb/cbd/equip-set/statistics',
+						tf: true
+					}, {
+						icon: '/image/cb/4.png',
+						tex: '设备控制',
+						path: '/pages/cb/cbd/equip-set/equip-set',
+						tf: false
+					}, {
+						icon: '/image/cb/5.png',
+						tex: '短信预警',
+						path: '/pages/cb/cbd/equip-set/note',
+						tf: false
+					}, {
+						icon: '/image/cb/6.png',
+						tex: 'sim卡详情',
+						path: '/pages/cb/sim/sim',
+						tf: true
+					}, {
+						icon: '/image/environment/7.png',
+						tex: '一键报修',
+						path: '/pages/afterSale/addafter',
+						tf: true
+					}
+				],
 				bzy: [{
-					icon: '/image/cb/4.png',
-					tex: '设备控制',
-					path: '/pages/cb/bzy/equip-set/equip-set',
-					tf:false
-				}, {
-					icon: '/image/cb/1.png',
-					tex: '查看图片',
-					path: '/pages/cb/cbd/equip-set/imgpage',
-					tf:false
-				}, 
-				// {
-				// 	icon: '/image/cb/2.png',
-				// 	tex: '历史数据',
-				// 	path: '/pages/cb/bzy/equip-set/bzyhistoryile',
-				// 	tf:false
-				// }, 
-				{
-					icon: '/image/cb/6.png',
-					tex: 'sim卡详情',
-					path: '/pages/cb/sim/sim',
-					tf:false
-				},{
-					icon: '/image/environment/7.png',
-					tex: '一键报修',
-					path: '/pages/afterSale/addafter',
-					tf:true
-				}],
+						icon: '/image/cb/4.png',
+						tex: '设备控制',
+						path: '/pages/cb/bzy/equip-set/equip-set',
+						tf: false
+					}, {
+						icon: '/image/cb/1.png',
+						tex: '查看图片',
+						path: '/pages/cb/cbd/equip-set/imgpage',
+						tf: false
+					},
+					// {
+					// 	icon: '/image/cb/2.png',
+					// 	tex: '历史数据',
+					// 	path: '/pages/cb/bzy/equip-set/bzyhistoryile',
+					// 	tf:false
+					// }, 
+					{
+						icon: '/image/cb/6.png',
+						tex: 'sim卡详情',
+						path: '/pages/cb/sim/sim',
+						tf: false
+					}, {
+						icon: '/image/environment/7.png',
+						tex: '一键报修',
+						path: '/pages/afterSale/addafter',
+						tf: true
+					}
+				],
 				xy: [{
 					icon: '/image/cb/4.png',
 					tex: '设备控制',
 					path: '/pages/cb/xy/equip-set/equip-set',
-					tf:false
+					tf: false
 				}, {
 					icon: '/image/cb/6.png',
 					tex: 'sim卡详情',
 					path: '/pages/cb/sim/sim',
-					tf:false
+					tf: false
 				}, {
 					icon: '/image/cb/2.png',
 					tex: '历史数据',
 					path: '/pages/cb/xy/equip-set/xyhistoryile',
-					tf:false
-				},{
+					tf: false
+				}, {
 					icon: '/image/environment/7.png',
 					tex: '一键报修',
 					path: '/pages/afterSale/addafter',
-					tf:true
+					tf: true
 				}],
 				newState: {}, //设备最新状态
 				setTimeShow: false,
@@ -209,8 +210,8 @@
 				yxShow: false, //诱芯弹框
 				xyErr: '',
 				decoy: '',
-				newtishitf:false,
-				date:""//最大可选时间
+				newtishitf: false,
+				date: "" //最大可选时间
 			}
 		},
 		computed: {
@@ -265,11 +266,13 @@
 							}, {
 								icon: '/image/cb/icon08.png',
 								txt: '环境温度(℃)',
-								value: this.newState.at=="2.5"||this.newState.at=="25.0"||this.newState.at==""||this.newState.at=="25"?this.newState.new_tem:this.newState.at
+								value: this.newState.at == "2.5" || this.newState.at == "25.0" || this.newState.at ==
+									"" || this.newState.at == "25" ? this.newState.new_tem : this.newState.at
 							}, {
 								icon: '/image/cb/icon07.png',
 								txt: '环境湿度(%)',
-								value:this.newState.ah=="30.0"||this.newState.ah=="30.0"||this.newState.ah==""||this.newState.ah=="30"?this.newState.new_hum:this.newState.ah
+								value: this.newState.ah == "30.0" || this.newState.ah == "30.0" || this.newState.ah ==
+									"" || this.newState.ah == "30" ? this.newState.new_hum : this.newState.ah
 							}, {
 								icon: '/image/cb/icon16.png',
 								txt: '信号强度',
@@ -328,11 +331,13 @@
 							}, {
 								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
+								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
+								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: '信号强度',
@@ -379,12 +384,14 @@
 							{
 								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
+								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/cb/icon07.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
+								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/prevention/105.png',
@@ -448,57 +455,61 @@
 		},
 		onLoad(option) {
 			this.equipInfo = JSON.parse(option.info)
-			this.type = Number(this.equipInfo.type) || Number(this.equipInfo.equip_type)|| Number(this.equipInfo.device_type_id)
+			this.type = Number(this.equipInfo.type) || Number(this.equipInfo.equip_type) || Number(this.equipInfo
+				.device_type_id)
 			this.equipInfo.type = this.type
 			this.device_status = this.equipInfo.is_online
 			this.getState()
 			console.log(this.equipInfo)
-			this.selectaddress(Number(this.equipInfo.lat),Number(this.equipInfo.lng))
+			if(this.equipInfo.disable){
+				if(this.equipInfo.disable==0){
+					this.cbd[3].tf=false
+				}else{
+					this.cbd[3].tf=true
+				}	
+			}
+			this.selectaddress(Number(this.equipInfo.lat), Number(this.equipInfo.lng))
 			var times = new Date()
-			this.date = times.getFullYear()+1 + "-" + Number(times.getMonth()+1) + "-" + times.getDate()
+			this.date = times.getFullYear() + 1 + "-" + Number(times.getMonth() + 1) + "-" + times.getDate()
 			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 == "测报系统"
 					})
 					console.log(items)
-					let items2 = items[0].children.filter((item)=>{
+					let items2 = items[0].children.filter((item) => {
 						return item.purview_name == "虫情测报灯"
 					})
-					let items3 = items[0].children.filter((item)=>{
+					let items3 = items[0].children.filter((item) => {
 						return item.purview_name == "性诱测报"
 					})
-					let items4 = items[0].children.filter((item)=>{
+					let items4 = items[0].children.filter((item) => {
 						return item.purview_name == "孢子仪"
 					})
 					console.log(items2)
 					var arr = items2[0].children
-					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.cbd[1].tf = true
+								// this.cbd[1].tf = true
 								break
 							case "查看图片":
 								this.cbd[0].tf = true
 								break
 							case "设备控制":
-								this.cbd[3].tf = true
-								break
-							case "害虫统计":
 								this.cbd[2].tf = true
-								this.cbd[4].tf = true
 								break
-							case "SIM卡":
-								this.cbd[5].tf = true
+							case "害虫统计":
+								this.cbd[1].tf = true
 								break
 						}
 					}
-					console.log(items3[0].children)
+					// console.log(items3[0].children)
 					var arr2 = items3[0].children
-					for(var i =0;i<arr2.length;i++){
-						switch (arr2[i].purview_name){
+					for (var i = 0; i < arr2.length; i++) {
+						switch (arr2[i].purview_name) {
 							case "设备控制":
 								this.xy[0].tf = true
 								break;
@@ -512,8 +523,8 @@
 					}
 					console.log(items4[0].children)
 					var arr3 = items4[0].children
-					for(var i =0;i<arr3.length;i++){
-						switch (arr3[i].purview_name){
+					for (var i = 0; i < arr3.length; i++) {
+						switch (arr3[i].purview_name) {
 							case "设备控制":
 								this.bzy[0].tf = true
 								break;
@@ -536,7 +547,8 @@
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.device_history_data',
 					data: {
-						device_type_id: this.equipInfo.type || this.equipInfo.equip_type || this.equipInfo.device_type_id,
+						device_type_id: this.equipInfo.type || this.equipInfo.equip_type || this.equipInfo
+							.device_type_id,
 						device_id: this.equipInfo.imei || this.equipInfo.device_id,
 						page: 1,
 						page_size: 1,
@@ -544,10 +556,10 @@
 				})
 				console.log(res)
 				console.log(1222)
-				if(res.counts!=0){
+				if (res.counts != 0) {
 					this.newState = res.data[0].d_h_t
 					this.newtishitf = true
-				}else{
+				} else {
 					this.newtishitf = false
 				}
 			},
@@ -555,19 +567,21 @@
 				console.log(path)
 				var device_id = this.equipInfo.device_id || this.equipInfo.imei
 				uni.navigateTo({
-					url: path + '?d_id=' + this.equipInfo.d_id + "&device_id=" + device_id + "&device_type="+this.type
+					url: path + '?d_id=' + this.equipInfo.d_id + "&device_id=" + device_id + "&device_type=" + this
+						.type
 				});
 			},
-			partClicks(){
+			partClicks() {
 				var path = ""
 				var device_id = this.equipInfo.device_id || this.equipInfo.imei
-				if(this.type==3){
-					path="/pages/cb/cbd/equip-set/historyfile"
-				}else if(this.type == 7){
-					path="/pages/cb/bzy/equip-set/bzyhistoryile"
+				if (this.type == 3) {
+					path = "/pages/cb/cbd/equip-set/historyfile"
+				} else if (this.type == 7) {
+					path = "/pages/cb/bzy/equip-set/bzyhistoryile"
 				}
 				uni.navigateTo({
-					url: path + '?d_id=' + this.equipInfo.d_id + "&device_id=" + device_id+ "&device_type="+this.type
+					url: path + '?d_id=' + this.equipInfo.d_id + "&device_id=" + device_id + "&device_type=" + this
+						.type
 				});
 			},
 			async setTime(d_id) {
@@ -578,8 +592,10 @@
 						d_id
 					}
 				})
-				this.glass_slide_time = res.glass_slide_time ? this.formatTime(res.glass_slide_time * 1000, 'yyyy-MM-dd') : ''
-				this.cultivate_time = res.cultivate_time ? this.formatTime(res.cultivate_time * 1000, 'yyyy-MM-dd') : ''
+				this.glass_slide_time = res.glass_slide_time ? this.formatTime(res.glass_slide_time * 1000,
+					'yyyy-MM-dd') : ''
+				this.cultivate_time = res.cultivate_time ? this.formatTime(res.cultivate_time * 1000, 'yyyy-MM-dd') :
+					''
 				this.setTimeShow = true
 			},
 			timeChange(e, a) {
@@ -633,6 +649,17 @@
 				this.decoy = res.decoy;
 				this.yxShow = true
 			},
+			async cbnote(d_id) {
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=device.device_manage.get_spore_time',
+					data: {
+						device_type_id: this.type,
+						d_id
+					}
+				})
+				this.decoy = res.decoy;
+				this.yxShow = true
+			},
 			async yxSubmit() {
 				if (!this.decoy) {
 					this.xyErr = "请填写监测害虫名称";
@@ -651,7 +678,7 @@
 					this.yxShow = false
 				}
 			},
-			selectaddress(lat,lng) { //获取分布位置
+			selectaddress(lat, lng) { //获取分布位置
 				uni.request({
 					type: "GET",
 					url: "https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=" + lng + "," + lat +
@@ -660,21 +687,21 @@
 					complete: ress => {
 						console.log(ress)
 						// this.city = ress.data.regeocode.formatted_address
-						if(ress.data.regeocode.formatted_address.length==0){
-							this.city="--"
-						}else{
+						if (ress.data.regeocode.formatted_address.length == 0) {
+							this.city = "--"
+						} else {
 							this.city = ress.data.regeocode.formatted_address
 						}
 					}
 				});
 			},
-			copy(item){
+			copy(item) {
 				console.log(item)
 				uni.setClipboardData({
-				    data: item.imei||item.device_id,
-				    success: function () {
-				        console.log('success');
-				    }
+					data: item.imei || item.device_id,
+					success: function() {
+						console.log('success');
+					}
 				});
 			},
 		},
@@ -685,6 +712,7 @@
 	page {
 		padding: 20rpx;
 		box-sizing: border-box;
+
 		.info {
 			padding: 20rpx 40rpx;
 			color: #fff;
@@ -696,7 +724,8 @@
 			background-position: top left;
 			box-sizing: border-box;
 			width: 100%;
-			.tishi{
+
+			.tishi {
 				width: 28rpx;
 				height: 28rpx;
 				margin: 0rpx 0 0 20rpx;
@@ -718,6 +747,7 @@
 			font-size: 28rpx;
 			color: #666;
 			line-height: 50rpx;
+
 			image {
 				width: 52rpx;
 			}
@@ -734,7 +764,8 @@
 				flex-basis: 33%;
 				/* flex-grow: 1; */
 			}
-			.item3{
+
+			.item3 {
 				padding: 20rpx 0;
 				box-sizing: border-box;
 				flex-basis: 25%;
@@ -748,7 +779,8 @@
 			margin-bottom: 20rpx;
 			display: flex;
 			justify-content: space-between;
-			.span{
+
+			.span {
 				color: #6e6c76;
 				font-size: 24rpx;
 				display: flex;
@@ -756,13 +788,15 @@
 				/* margin-top: 12rpx; */
 			}
 		}
-		.newtishi{
+
+		.newtishi {
 			width: 90%;
 			margin: 0 auto;
 			text-align: center;
 			padding-top: 40rpx;
 			font-size: 32rpx;
 		}
+
 		.newState {
 			display: flex;
 			flex-wrap: wrap;
@@ -797,6 +831,7 @@
 			text-align: center;
 			padding: 30rpx;
 		}
+
 		.field {
 			/deep/.uni-input-input {
 				border: 2rpx solid #FF0000;
@@ -807,10 +842,12 @@
 			}
 		}
 	}
-	/deep/.u-calendar__action{
+
+	/deep/.u-calendar__action {
 		display: flex;
 		justify-content: space-around;
-		.u-calendar__action__text{
+
+		.u-calendar__action__text {
 			line-height: 25px;
 		}
 	}

+ 1 - 1
pages/cb/index/search.vue

@@ -5,7 +5,7 @@
 			<view style="position: fixed;z-index: 100;padding-top: 20rpx;background-color: #FFFFFF;">
 				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回"></uni-nav-bar>
 				<view class="search_top_input">
-					<input type="text" value="" placeholder="请输入设备ID" v-model="imports" @input="searchinp" />
+					<input type="text" value="" placeholder="请输入设备ID或设备名称" v-model="imports" @input="searchinp" />
 					<u-icon name="search" size="40" class="icon" @click="search"></u-icon>
 				</view>
 			</view>

+ 28 - 13
pages/cb/sim/sim.vue

@@ -8,9 +8,10 @@
 				<image mode="widthFix" src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/sim1.png"></image>
 				数据sim卡流量{{"("+sim.simnew+")"}}
 			</view>
-			<view class="item">
+			<view class="item" @click="copy(sim.iccid)">
 				<text>ICCID:</text>
 				<text>{{sim.iccid}}</text>
+				<image src="../../../static/images/ba167c2774bc7a63381dc3aaf1ef95c.png" mode="" class="tishi"></image>
 			</view>
 			<view class="item">
 				<text>状态:</text>
@@ -43,9 +44,10 @@
 					<image mode="widthFix" src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/sim2.png"></image>
 					图片sim卡流量{{"("+hksim.simnew+")"}}
 				</view>
-				<view class="item">
+				<view class="item" @click="copy(hksim.iccid)">
 					<text>ICCID:</text>
 					<text>{{hksim.iccid}}</text>
+					<image src="../../../static/images/ba167c2774bc7a63381dc3aaf1ef95c.png" mode="" class="tishi"></image>
 				</view>
 				<view class="item">
 					<text>状态:</text>
@@ -142,25 +144,25 @@
 				if (res2.code == 1) { //企鹏 新
 					var state = ""
 					switch (obj.deviceStatus) {
-						case "ACTIVATION_READY_NAME":
+						case "TEST_READY_NAME":
 							state = "可测试"
 							break;
-						case "TEST_READY_NAME":
+						case "INVENTORY_NAME":
 							state = "库存"
 							break;
-						case "INVENTORY_NAME":
+						case "ACTIVATION_READY_NAME":
 							state = "可激活"
 							break;
-						case "ACTIVATION_READY_NAME":
+						case "ACTIVATED_NAME":
 							state = "已激活"
 							break;
-						case "ACTIVATED_NAME":
+						case "DEACTIVATED_NAME":
 							state = "已停卡"
 							break;
-						case "DEACTIVATED_NAME":
+						case "RETIRED_NAME":
 							state = "已销卡"
 							break;
-						case "RETIRED_NAME":
+						case "PURGED_NAME":
 							state = "已清除"
 							break;
 					}
@@ -172,7 +174,7 @@
 							data_plan: obj.totalDataVolume, //套餐大小
 							data_usage: obj.usedDataVolume, //当月用量
 							data_balance: Number(obj.totalDataVolume) - Number(obj.usedDataVolume), //剩余流量
-							expiry_date: obj.ratePlanExpirationDate, //到期日期,
+							expiry_date: obj.dateDeactivated, //到期日期,
 							simnew:"新"
 						}
 						this.loding = false
@@ -260,7 +262,15 @@
 						});
 					}
 				})
-			}
+			},
+			copy(item){
+				uni.setClipboardData({
+				    data: item , 
+				    success: function () {
+				        console.log('success');
+				    }
+				});
+			},
 		}
 	}
 </script>
@@ -289,8 +299,8 @@
 				align-items: center;
 				z-index: 10;
 				.img{
-					width: 400rpx;
-					height: 350rpx;
+					width: 200rpx;
+					height: 175rpx;
 					
 				}
 			}
@@ -303,6 +313,11 @@
 				}
 
 				display:flex;
+				.tishi{
+					width: 30rpx;
+					height: 30rpx;
+					margin: 16rpx 0 0 20rpx;
+				}
 			}
 
 			.tit {

+ 4 - 4
pages/disandpests/index.vue

@@ -99,8 +99,8 @@
 				if (this.flag == 2) {
 					// pest.pests.insect_discern 虫害
 					uni.uploadFile({
-						// url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
-						url: 'http://182.92.193.64:8002/api/api_gateway?method=pest.pests.insect_discern', //仅为示例,非真实的接口地址
+						// url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+						url: 'http://114.115.147.140:8002/api/api_gateway?method=pest.pests.insect_discern', //仅为示例,非真实的接口地址
 						filePath: ev.path,
 						name: 'img_file',
 						formData: {
@@ -115,8 +115,8 @@
 				} else if (this.flag == 1) {
 					//pest.pests.insect_discern病害识别
 					uni.uploadFile({
-						// url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
-						url: 'http://182.92.193.64:8002/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
+						// url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+						url: 'http://114.115.147.140:8002/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
 						filePath: ev.path,
 						name: 'img_file',
 						formData: {

+ 9 - 0
pages/environment/equipment.vue

@@ -30,6 +30,10 @@
 					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/environment/10.png'" mode=""></image>
 					<p>历史数据</p>
 				</view>
+				<view class="control_item" v-if="eqinfo.item.iccid" @click="siminfo(eqinfo.item.iccid)">
+					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/cb/6.png'" mode=""></image>
+					<p>SIM卡信息</p>
+				</view>
 			</view>
 			<view class="realtime">
 				<p class="realtime_title"><span v-if="realtimeTF">实时数据</span><span v-else>实时数据(暂无数据)</span></p>
@@ -277,6 +281,11 @@
 					}
 				});
 			},
+			siminfo(sim){
+				uni.navigateTo({
+					url: "./sim?simid="+sim
+				})
+			}
 		},
 		onLoad(option) {
 			this.$forceUpdate()

+ 2 - 1
pages/environment/index.vue

@@ -62,7 +62,8 @@
 					url: '/api/api_gateway?method=weather.weather.qxz_page',
 					data: {
 						page: this.page,
-						device_status:this.device_status
+						device_status:this.device_status,
+						page_size:10
 					}
 				})
 				this.eqlistdata = this.eqlistdata.concat(res.ids)

+ 1 - 1
pages/environment/search.vue

@@ -5,7 +5,7 @@
 			<view style="position: fixed;z-index: 100;">
 				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回"></uni-nav-bar>
 				<view class="search_top_input">
-					<input type="text" value="" placeholder="请输入设备ID" v-model="imports" @input="searchinp" />
+					<input type="text" value="" placeholder="请输入设备ID或设备名称" v-model="imports" @input="searchinp" />
 					<u-icon name="search" size="40" class="icon" @click="search"></u-icon>
 				</view>
 			</view>

+ 186 - 0
pages/environment/sim.vue

@@ -0,0 +1,186 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view class="" style="position: relative;top: 44px;">
+			<view style="position: fixed;z-index: 100;width: 100%;">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="sim卡详情"></uni-nav-bar>
+			</view>
+			<view class="sim_info">
+				<view class="sim_info_loding" v-if="loding">
+					<image src="../../static/images/cb/6286299.gif" mode="" class="img"></image>
+				</view>
+				<view class="sim_info_title">
+					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/cb/sim1.png'" mode=""></image>
+					<p>sim卡查询{{"("+simnew+")"}}</p>
+				</view>
+				<view class="sim_info_text">
+					<p>运营商:{{siminfo.data.carrier}}</p>
+					<view class="sim_info_iccid" @click="copy(siminfo.data.iccid)">
+						<p>ICCID:{{siminfo.data.iccid}}</p>
+						<image src="../../static/images/ba167c2774bc7a63381dc3aaf1ef95c.png" mode="" class="tishi"></image>
+					</view>
+					<p>状态:{{state}}</p>
+					<p>套餐:{{siminfo.data.data_plan || siminfo.data.totalDataVolume}}MB</p>
+					<p v-if="simnew=='旧'">已用流量:{{siminfo.data.data_usage.toFixed(2)}}MB</p>
+					<p v-if="simnew=='新'">已用流量:{{siminfo.data.usedDataVolume.toFixed(2)}}MB</p>
+					<p v-if="simnew=='旧'">剩余流量:{{siminfo.data.data_balance.toFixed(2)}}MB</p>
+					<p v-if="simnew=='新'">剩余流量:{{(siminfo.data.totalDataVolume-siminfo.data.usedDataVolume).toFixed(2)}}MB</p>
+					<p v-if="simnew=='旧'">到期时间:{{siminfo.data.expiry_date|timeFormat()}}</p>
+					<p v-if="simnew=='新'">到期时间:{{siminfo.data.expireDate}}</p>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				iccid: '',
+				siminfo: {
+					data: {
+						carrier: "--",
+						account_status: "--",
+						data_plan: "--",
+						data_usage: "--",
+						data_balance: "--",
+						outbound_date: ""
+					}
+				},
+				state:"",
+				id: '',
+				simnew:"",
+				loding:false
+			}
+		},
+		methods: {
+			async simdata(data) { //获取sim信息
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.send_control.sim_query',
+					data: {
+						iccid: data
+					}
+				})
+				if(res.code==1){//企鹏
+					this.simnew = "新"
+					switch (res.data.data.deviceStatus){
+						case "TEST_READY_NAME":
+							this.state = "可测试"
+							break;
+						case "INVENTORY_NAME":
+							this.state = "库存"
+							break;
+						case "ACTIVATION_READY_NAME":
+							this.state = "可激活"
+							break;
+						case "ACTIVATED_NAME":
+							this.state = "已激活"
+							break;
+						case "DEACTIVATED_NAME":
+							this.state = "已停卡"
+							break;
+						case "RETIRED_NAME":
+							this.state = "已销卡"
+							break;
+						case "PURGED_NAME":
+							this.state = "已清除"
+							break;
+					}
+				}else if(res.code==2){//合宙
+					var arr = ['未知', '测试期', '沉默期', '使用中', '停机', '停机保号', '预销号', '销号']
+					this.state = arr[res.data.data.account_status]
+					this.simnew = "旧"
+				}
+				this.siminfo = res.data
+				this.loding = false
+				console.log(this.siminfo.data)
+			},
+			clickLeft() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+			copy(item){
+				uni.setClipboardData({
+				    data: item , 
+				    success: function () {
+				        console.log('success');
+				    }
+				});
+			},
+		},
+		onLoad(option) {
+			console.log(option.simid)
+			this.simdata(option.simid)
+			this.id = option.simid
+			this.loding = true
+		}
+	}
+</script>
+
+<style lang="scss">
+	.sim_info {
+		width: 90%;
+		position: absolute;
+		top: 54px;
+		left: 5%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		padding: 30rpx 20rpx 50rpx;
+		border-radius: 20rpx;
+		box-sizing: border-box;
+		
+		.sim_info_loding{
+			position: absolute;
+			top: 0;
+			left: 0;
+			width: 100%;
+			background-color: rgba(0,0,0,0.3);
+			border-radius: 20rpx;
+			height: 100%;
+			display: flex;
+			justify-content: space-around;
+			align-items: center;
+			.img{
+				width: 200rpx;
+				height: 175rpx;
+				
+			}
+		}
+		.sim_info_title {
+			width: 100%;
+			display: flex;
+
+			image {
+				width: 24rpx;
+				height: 32rpx;
+				margin: 6rpx 20rpx 0 0;
+			}
+
+			p {
+				font-weight: 700;
+			}
+		}
+
+		.sim_info_text {
+			width: 100%;
+			padding-left: 44rpx;
+
+			p {
+				height: 30rpx;
+				margin-top: 20rpx;
+				font-size: 26rpx;
+			}
+			.sim_info_iccid{
+				display: flex;
+				.tishi{
+					width: 30rpx;
+					height: 30rpx;
+					margin: 26rpx 0 0 20rpx;
+					color: #000;
+				}
+			}
+		}
+	}
+</style>
+

+ 13 - 2
pages/equipList/index.vue

@@ -64,7 +64,7 @@
 						path: "/image/fourMoodBase/5.png",
 						id: 5
 					}, {
-						name: "监控设备",
+						name: "监控",
 						path: "/image/fourMoodBase/2.png",
 						id: 6
 					}, {
@@ -76,6 +76,16 @@
 						name: "性诱2.0",
 						path: "/image/fourMoodBase/10.png",
 						id: 10
+					},
+					{
+						name: "色诱测报",
+						path: "/image/fourMoodBase/14.png",
+						id: 14
+					},
+					{
+						name: "管式墒情",
+						path: "/image/fourMoodBase/15.png",
+						id: 15
 					}
 				],
 				eqlistdata: [],
@@ -226,6 +236,7 @@
 			this.camera()
 			this.current=0
 			this.currents=0
+			this.page = 1
 			// console.log(this.current)
 			uni.getStorage({
 				key: "jurisdiction",
@@ -253,7 +264,7 @@
 									this.list.push(obj)
 								}
 								break;
-							case "监控系统":
+							case "可视农业":
 								for (var j = 0; j < res[i].children.length; j++) {
 									var obj = {
 										name: res[i].children[j].purview_name

+ 1 - 1
pages/equipList/search.vue

@@ -4,7 +4,7 @@
 		<view style="position: fixed;top: 44px; z-index: 100;height: 80rpx;background-color: #FFFFFF;padding-top: 10px;">
 			<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回"></uni-nav-bar>
 			<view class="search_bot_input">
-				<input type="text" value="" placeholder="请输入设备ID" v-model="imports" @input="searchinput" />
+				<input type="text" value="" placeholder="请输入设备ID或设备名称" v-model="imports" @input="searchinput" />
 				<u-icon name="search" size="40" class="icon" @click="search"></u-icon>
 			</view>
 		</view>

+ 29 - 20
pages/equipMange/index/assignment.vue

@@ -16,7 +16,7 @@
 					<label class="equipment" v-for="(items,index) in assignment" :key="index">
 						<view class="equipment_top">
 							<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+items.src" mode="" class="equipment_top_img"></image>
-							<span class="equipment_top_name">{{list[items.device_type_id-1].name}}</span>
+							<span class="equipment_top_name">{{items.device_type_id_name}}</span>
 							<checkbox :value="String(items.d_id)" :checked="items.device_user==user_info.uid" class="ucheckbox" color="#42b983" />
 						</view>
 						<view class="equipment_bot">
@@ -44,24 +44,6 @@
 				user_info: {},
 				list: [{
 					name: "全部"
-				}, {
-					name: "杀虫灯"
-				}, {
-					name: "测报灯"
-				}, {
-					name: "智能性诱"
-				}, {
-					name: "环境检测"
-				}, {
-					name: "监控设备"
-				}, {
-					name: "孢子仪"
-				}, {
-					name: "性诱设备"
-				}, {
-					name: "糖醋测报"
-				}, {
-					name: "性诱2.0"
 				}],
 				current: 0,
 				assignment: [],
@@ -93,6 +75,14 @@
 					{
 						path: "/image/fourMoodBase/10.png",
 						id: 10
+					},
+					{
+						path: "/image/fourMoodBase/14.png",
+						id: 14
+					},
+					{
+						path: "/image/fourMoodBase/15.png",
+						id: 15
 					}
 				],
 				allocationvalues: [], //原始数据
@@ -104,6 +94,19 @@
 			}
 		},
 		methods: {
+			async devicetypelist() { //分配设备
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=home.homes.user_device_type',
+				})
+				console.log(res)
+				for(var i = 0; i < res.length; i++){
+					var obj = {
+						name:res[i].type_name,
+						id:res[i].id
+					}
+					this.list.push(obj)
+				}
+			},
 			deweight(arr) {
 				var newArr = []
 				for (var i = 0; i < arr.length; i++) {
@@ -133,7 +136,7 @@
 					this.getAssign(this.data)
 				} else {
 					this.assignment = []
-					this.data.devicetypeid = index + 1
+					this.data.devicetypeid = this.list[index].id
 					this.getAssign(this.data)
 				}
 
@@ -158,6 +161,11 @@
 							this.assignment[i].src = this.images[j].path
 						}
 					}
+					for (var j = 0; j < this.list.length; j++) {
+						if (this.assignment[i].device_type_id == this.list[j].id) {
+							this.assignment[i].device_type_id_name = this.list[j].name
+						}
+					}
 				}
 			},
 			async allocation(data) { //分配设备
@@ -210,6 +218,7 @@
 		},
 		onLoad(option) {
 			this.user_info = JSON.parse(option.item)
+			this.devicetypelist()
 			this.getAssign(this.data)
 		},
 		onReachBottom() {

+ 1 - 1
pages/expertDiagnosis/postmessage.vue

@@ -109,7 +109,7 @@
 				console.log(ev)
 				this.toloadTF = true
 				uni.uploadFile({
-				    url: 'http://182.92.193.64:8002/api/api_gateway?method=pest.pests.pests_img', //仅为示例,非真实的接口地址
+				    url: 'http://114.115.147.140:8002/api/api_gateway?method=pest.pests.pests_img', //仅为示例,非真实的接口地址
 					filePath: ev.path,
 				    name: 'img_file',
 				    formData: {

+ 1 - 1
pages/fourBase/addbase.vue

@@ -218,7 +218,7 @@
 			},
 			onok(ev){
 				uni.uploadFile({
-					url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+					url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
 					filePath: ev.path,
 					name: 'img_file',
 					formData: {

+ 1 - 1
pages/fourBase/modification.vue

@@ -232,7 +232,7 @@
 			},
 			onok(ev){
 				uni.uploadFile({
-					url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+					url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
 					filePath: ev.path,
 					name: 'img_file',
 					formData: {

+ 4 - 4
pages/index/index.vue

@@ -270,8 +270,8 @@
 					console.log('111')
 					// pest.pests.insect_discern 虫害
 					uni.uploadFile({
-						// url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
-						url: 'http://182.92.193.64:8002/api/api_gateway?method=pest.pests.insect_discern', //仅为示例,非真实的接口地址
+						// url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+						url: 'http://114.115.147.140:8002/api/api_gateway?method=pest.pests.insect_discern', //仅为示例,非真实的接口地址
 						filePath: ev.path,
 						name: 'img_file',
 						formData: {
@@ -290,8 +290,8 @@
 					    title: '加载中'
 					});
 					uni.uploadFile({
-						// url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
-						url: 'http://182.92.193.64:8002/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
+						// url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+						url: 'http://114.115.147.140:8002/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
 						filePath: ev.path,
 						name: 'img_file',
 						formData: {

+ 3 - 3
pages/login/login.vue

@@ -72,7 +72,7 @@
 				setbgtf: false,
 				setTF: false,
 				value: "http://8.136.98.49:8002",
-				httparr: ["http://8.136.98.49:8002", "http://182.92.193.64:8002"],
+				httparr: ["http://8.136.98.49:8002", "http://114.115.147.140:8002"],
 				arrowtf: false,
 				showA: false, //
 				contentA: '',
@@ -205,8 +205,8 @@
 			upgrade() {
 				console.log(this.appName)
 				// var url = this.value + "/app_file/" + this.appName
-				var appName = "big_data2"//中性
-				// var appName = "big_data"//云飞
+				// var appName = "big_data2"//中性
+				var appName = "big_data"//云飞
 				var url = "http://hnyfwlw.com/app/"+appName+".apk"
 				const downloadTask = uni.downloadFile({
 					url: url, //仅为示例,并非真实的资源

+ 48 - 13
pages/monitor/index.vue

@@ -5,7 +5,8 @@
 			<view style="position: fixed;z-index: 100;">
 				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="监控系统"></uni-nav-bar>
 				<view class="" style="margin-top: -10rpx;">
-					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app/image/monitor/banner.png'" mode="widthFix"></image>
+					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app/image/monitor/banner.png'" mode="widthFix">
+					</image>
 				</view>
 			</view>
 			<view class="contenttf" v-if="contenttf">
@@ -14,8 +15,14 @@
 			<view class="content" v-else>
 				<template v-for="(item,index) in listArr">
 					<equipItem @click.native="itemClick(item)" v-bind:item="item" :key="index">
-						<view class="" style="font-size:28rpx;color: #999;">
-							设备ID:{{item.device_id}}
+						<view class="content_title">
+							<view class="" style="font-size:28rpx;color: #999;">
+								设备ID:{{item.device_id}}
+							</view>
+							<!-- @click.stop="modification(item)" -->
+							<view class="sim" v-if="item.sim" @click.stop="siminfo(item.sim)">
+								SIM卡
+							</view>
 						</view>
 						<view class="type-name">
 							<view class="iconfont icon-jiankong"></view>
@@ -28,7 +35,8 @@
 			</view>
 		</view>
 		<view class="top" v-if="isTop" @click="top">
-			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app/image/6209a98f0cb3b5086f2ca36152c9269.png'" mode=""></image>
+			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app/image/6209a98f0cb3b5086f2ca36152c9269.png'" mode="">
+			</image>
 		</view>
 	</view>
 </template>
@@ -42,8 +50,8 @@
 				page: 1,
 				accessToken: '',
 				counts: '',
-				isTop:false,
-				contenttf:false,
+				isTop: false,
+				contenttf: false,
 			}
 		},
 		onLoad() {
@@ -81,15 +89,15 @@
 					}
 				})
 				console.log(res)
-				if(res.counts==0){
+				if (res.counts == 0) {
 					this.contenttf = true
-				}else{
+				} else {
 					this.contenttf = false
 				}
 				let data = res.data
 				let arr = data.map(item => {
-					item.imei=item.device_id
-					item.is_online=item.status
+					item.imei = item.device_id
+					item.is_online = item.status
 					return {
 						...item,
 						device_status: item.status
@@ -116,6 +124,11 @@
 					scrollTop: 0,
 					duration: 500
 				})
+			},
+			siminfo(sim){
+				uni.navigateTo({
+					url: "./sim?simid="+sim
+				})
 			}
 		},
 		components: {
@@ -140,7 +153,8 @@
 			margin-left: 10px;
 		}
 	}
-	.contenttf{
+
+	.contenttf {
 		position: absolute;
 		top: 170px;
 		width: 95%;
@@ -148,18 +162,39 @@
 		text-align: center;
 		font-size: 20px;
 	}
-	.content{
+
+	.content {
 		position: absolute;
 		top: 130px;
 		width: 95%;
 		left: 2.5%;
+
+		.content_title {
+			display: flex;
+			justify-content: space-between;
+			.sim {
+				width: 126rpx;
+				color: #42b983;
+				height: 40rpx;
+				text-align: center;
+				border: 1rpx solid #42b983;
+				border-radius: 25rpx;
+				font-size: 24rpx;
+				line-height: 35rpx;
+				position: absolute;
+				top: 100rpx;
+				right: 20rpx;
+			}
+		}
 	}
+
 	.top {
 		position: fixed;
 		right: 30px;
 		bottom: 100px;
 		z-index: 100;
-		image{
+
+		image {
 			width: 100rpx;
 			height: 100rpx;
 		}

+ 186 - 0
pages/monitor/sim.vue

@@ -0,0 +1,186 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view class="" style="position: relative;top: 44px;">
+			<view style="position: fixed;z-index: 100;width: 100%;">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="sim卡详情"></uni-nav-bar>
+			</view>
+			<view class="sim_info">
+				<view class="sim_info_loding" v-if="loding">
+					<image src="../../static/images/cb/6286299.gif" mode="" class="img"></image>
+				</view>
+				<view class="sim_info_title">
+					<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/cb/sim1.png'" mode=""></image>
+					<p>sim卡查询{{"("+simnew+")"}}</p>
+				</view>
+				<view class="sim_info_text">
+					<p>运营商:{{siminfo.data.carrier}}</p>
+					<view class="sim_info_iccid" @click="copy(siminfo.data.iccid)">
+						<p>ICCID:{{siminfo.data.iccid}}</p>
+						<image src="../../static/images/ba167c2774bc7a63381dc3aaf1ef95c.png" mode="" class="tishi"></image>
+					</view>
+					<p>状态:{{state}}</p>
+					<p>套餐:{{siminfo.data.data_plan || siminfo.data.totalDataVolume}}MB</p>
+					<p v-if="simnew=='旧'">已用流量:{{siminfo.data.data_usage.toFixed(2)}}MB</p>
+					<p v-if="simnew=='新'">已用流量:{{siminfo.data.usedDataVolume.toFixed(2)}}MB</p>
+					<p v-if="simnew=='旧'">剩余流量:{{siminfo.data.data_balance.toFixed(2)}}MB</p>
+					<p v-if="simnew=='新'">剩余流量:{{(siminfo.data.totalDataVolume-siminfo.data.usedDataVolume).toFixed(2)}}MB</p>
+					<p v-if="simnew=='旧'">到期时间:{{siminfo.data.expiry_date|timeFormat()}}</p>
+					<p v-if="simnew=='新'">到期时间:{{siminfo.data.expireDate}}</p>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				iccid: '',
+				siminfo: {
+					data: {
+						carrier: "--",
+						account_status: "--",
+						data_plan: "--",
+						data_usage: "--",
+						data_balance: "--",
+						outbound_date: ""
+					}
+				},
+				state:"",
+				id: '',
+				simnew:"",
+				loding:false
+			}
+		},
+		methods: {
+			async simdata(data) { //获取sim信息
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.send_control.sim_query',
+					data: {
+						iccid: data
+					}
+				})
+				if(res.code==1){//企鹏
+					this.simnew = "新"
+					switch (res.data.data.deviceStatus){
+						case "TEST_READY_NAME":
+							this.state = "可测试"
+							break;
+						case "INVENTORY_NAME":
+							this.state = "库存"
+							break;
+						case "ACTIVATION_READY_NAME":
+							this.state = "可激活"
+							break;
+						case "ACTIVATED_NAME":
+							this.state = "已激活"
+							break;
+						case "DEACTIVATED_NAME":
+							this.state = "已停卡"
+							break;
+						case "RETIRED_NAME":
+							this.state = "已销卡"
+							break;
+						case "PURGED_NAME":
+							this.state = "已清除"
+							break;
+					}
+				}else if(res.code==2){//合宙
+					var arr = ['未知', '测试期', '沉默期', '使用中', '停机', '停机保号', '预销号', '销号']
+					this.state = arr[res.data.data.account_status]
+					this.simnew = "旧"
+				}
+				this.siminfo = res.data
+				this.loding = false
+				console.log(this.siminfo.data)
+			},
+			clickLeft() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+			copy(item){
+				uni.setClipboardData({
+				    data: item , 
+				    success: function () {
+				        console.log('success');
+				    }
+				});
+			},
+		},
+		onLoad(option) {
+			console.log(option.simid)
+			this.simdata(option.simid)
+			this.id = option.simid
+			this.loding = true
+		}
+	}
+</script>
+
+<style lang="scss">
+	.sim_info {
+		width: 90%;
+		position: absolute;
+		top: 54px;
+		left: 5%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		padding: 30rpx 20rpx 50rpx;
+		border-radius: 20rpx;
+		box-sizing: border-box;
+		
+		.sim_info_loding{
+			position: absolute;
+			top: 0;
+			left: 0;
+			width: 100%;
+			background-color: rgba(0,0,0,0.3);
+			border-radius: 20rpx;
+			height: 100%;
+			display: flex;
+			justify-content: space-around;
+			align-items: center;
+			.img{
+				width: 200rpx;
+				height: 175rpx;
+				
+			}
+		}
+		.sim_info_title {
+			width: 100%;
+			display: flex;
+
+			image {
+				width: 24rpx;
+				height: 32rpx;
+				margin: 6rpx 20rpx 0 0;
+			}
+
+			p {
+				font-weight: 700;
+			}
+		}
+
+		.sim_info_text {
+			width: 100%;
+			padding-left: 44rpx;
+
+			p {
+				height: 30rpx;
+				margin-top: 20rpx;
+				font-size: 26rpx;
+			}
+			.sim_info_iccid{
+				display: flex;
+				.tishi{
+					width: 30rpx;
+					height: 30rpx;
+					margin: 26rpx 0 0 20rpx;
+					color: #000;
+				}
+			}
+		}
+	}
+</style>
+

+ 37 - 12
pages/my/about/about.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<!-- <view class="line"></view>
+		<view class="line"></view>
 		<view class="logo-box">
 			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/c9b4eb88c03b2f7460e8479e80f40fc.png'" mode="widthFix"></image>
 			<view class="version">
@@ -40,11 +40,12 @@
 				<text class="tit">公司邮箱</text>
 				<text class="val">hnyf826@163.com</text>
 			</view>
-		</view> -->
+		</view>
 		<view class="line"></view>
 		<view class="part">
 			<view class="info-item" @click="renewal">
-				<text class="tit">版本更新</text>
+				<text class="tit" >版本更新</text>
+				<p class="update" v-if="updateTF">NEW</p>
 				<u-icon name="arrow-right"></u-icon>
 			</view>
 		</view>
@@ -55,9 +56,9 @@
 				<u-icon name="arrow-right"></u-icon>
 			</view>
 		</view>
-		<!-- <view class="bottom">
+		<view class="bottom">
 			©河南云飞科技发展有限公司
-		</view> -->
+		</view>
 		<u-modal title="升级中请勿随意操作" :show-confirm-button="false" v-model="showA" :content="contentA">
 			<view class="upgradeBox">
 				<u-line-progress v-show="isShow" active-color="#19be6b" :striped="true" :percent="percentNum" :striped-active="true"></u-line-progress>
@@ -77,6 +78,7 @@
 				isShow: false, //进度条
 				percentNum: 0, //在线下载进度,
 				value: "",
+				updateTF:false
 			}
 		},
 		methods: {
@@ -88,13 +90,23 @@
 					}
 				})
 				console.log(res)
-				this.appName = res[0].app_name
+				// this.appName = res[0].app_name
 				this.versions = Number(res[0].app_num.match(/\d+/g).join(""))
 				var ids = Number(plus.runtime.version.match(/\d+/g).join(""))
+				if (this.versions > ids) {
+					this.updateTF = true
+				} else {
+					this.updateTF = false
+				}
+			},
+			renewal() {
+				// this.getEquipList()
+				var ids = Number(plus.runtime.version.match(/\d+/g).join(""))
 				if (this.percentNum > 0) {
 					console.log("更新中")
 				} else {
 					if (this.versions > ids) {
+						this.updateTF = true
 						uni.showModal({
 							title: '检测到有新版本,是否更新?',
 							content: '建议更新,不更新可能会出现部分数据无法获取!',
@@ -113,6 +125,7 @@
 							}
 						})
 					} else {
+						this.updateTF = false
 						uni.showToast({
 							title: "当前版本已是最新版本",
 							icon: "none"
@@ -120,9 +133,6 @@
 					}
 				}
 			},
-			renewal() {
-				this.getEquipList()
-			},
 			upgrade() {
 				uni.getStorage({
 					key: 'http',
@@ -130,10 +140,12 @@
 						this.value = res.data
 					}
 				})
-				console.log(this.appName)
+				// console.log(this.appName)
 				// ---------------------------------------------------------------------------------------------------------------------------
 				//中性版
-				this.appName = "big_data2"
+				// this.appName = "big_data2"
+				//标准版
+				this.appName = "big_data"
 				var url = "http://hnyfwlw.com/app/" + this.appName + ".apk"
 				console.log(url)
 				const downloadTask = uni.downloadFile({
@@ -171,6 +183,7 @@
 		},
 		onShow() {
 			this.id = plus.runtime.version
+			this.getEquipList()
 		},
 		onBackPress(option) {
 			uni.redirectTo({
@@ -227,7 +240,7 @@
 			display: flex;
 			justify-content: space-between;
 			line-height: 100rpx;
-
+			position: relative;
 			.tit {
 				font-size: 14px
 			}
@@ -236,6 +249,18 @@
 				font-size: 12px;
 				color: #666;
 			}
+			.update{
+				position: absolute;
+				top: 34rpx;
+				right: 32rpx;
+				font-size: 16rpx !important;
+				background-color: #f00;
+				border-radius: 25rpx;
+				height: 30rpx;
+				padding: 2rpx 16rpx;
+				line-height: 30rpx;
+				color: #fff;
+			}
 		}
 	}
 

+ 36 - 4
pages/my/index/index.vue

@@ -19,8 +19,9 @@
 			<view style="background-color: #FFFFFF;margin: 20rpx auto 0;">
 				<view class="AboutUs" @click="about">
 					<u-icon name="moban" custom-prefix="custom-icon" class="icon_left"></u-icon>
-					<!-- 关于我们 -->
-					关于更新
+					关于我们
+					<!-- 关于更新 -->
+					<p class="update" v-if="updateTF">NEW</p>
 					<uni-icons type="arrowright" class="icon_right"></uni-icons>
 				</view>
 			</view>
@@ -40,10 +41,29 @@
 			return {
 				usernames: '',
 				userinfos: {
-				}
+				},
+				versions:"",
+				updateTF:false
 			}
 		},
 		methods: {
+			async getEquipList() {
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=home.homes.app_version_record',
+					data: {
+						ret: "first"
+					}
+				})
+				console.log(res)
+				// this.appName = res[0].app_name
+				this.versions = Number(res[0].app_num.match(/\d+/g).join(""))
+				var ids = Number(plus.runtime.version.match(/\d+/g).join(""))
+				if (this.versions > ids) {
+					this.updateTF = true
+				} else {
+					this.updateTF = false
+				}
+			},
 			//user.login.user_login_info
 			//home.homes.personal_center
 			async getUserlogin() {
@@ -113,7 +133,7 @@
 		},
 		onLoad() {
 			this.getUserlogin()
-
+			this.getEquipList()
 		},
 		onShow() {
 			this.getUserlogin()
@@ -196,6 +216,18 @@
 			right: 10rpx;
 			font-size: 32rpx !important;
 		}
+		.update{
+			position: absolute;
+			top: 34rpx;
+			right: 40rpx;
+			font-size: 16rpx !important;
+			background-color: #f00;
+			border-radius: 25rpx;
+			height: 30rpx;
+			padding: 2rpx 16rpx;
+			line-height: 30rpx;
+			color: #fff;
+		}
 	}
 
 	.opinion {

+ 15 - 6
pages/my/record/record.vue

@@ -30,12 +30,19 @@
 				})
 				console.log(res)
 				this.recordsdata = res
-				for(var i=0;i<res.length;i++){
-					var obj ={
-						head: "版本"+res[i].app_num+"主要更新",
-						body: res[i].app_desc,
+				var ids = Number(plus.runtime.version.match(/\d+/g).join(""))
+				for (var i = 0; i < res.length; i++) {
+					var appnum = Number(res[i].app_num.match(/\d+/g).join(""))
+					if (appnum > ids) {
+						console.log(appnum, ids)
+					} else {
+						var obj = {
+							head: "版本" + res[i].app_num + "主要更新",
+							body: res[i].app_desc,
+						}
+						this.itemList.push(obj)
 					}
-					this.itemList.push(obj)
+
 				}
 				if (res.length == 0) {
 					this.dataTF = true
@@ -67,8 +74,10 @@
 		margin-bottom: 20rpx;
 		background-color: #FFFFFF;
 	}
+
 	.records {
 		margin-top: 20rpx;
+
 		.records_itemtf {
 			font-size: 30rpx;
 			width: 100%;
@@ -77,4 +86,4 @@
 			text-align: center;
 		}
 	}
-</style>
+</style>

+ 4 - 3
pages/my/user-info/user-info.vue

@@ -16,7 +16,7 @@
 		</view>
 		<view class="info-item">
 			<text class="tit">用户身份</text>
-			<text class="val">管理员</text>
+			<text class="val">{{usertype[userinfos.user_type-1]}}</text>
 		</view>
 		<view class="info-item">
 			<text class="tit">用户电话</text>
@@ -52,7 +52,8 @@
 				compileTF: false,
 				phonehint: false,
 				emailhint: false,
-				loding:false
+				loding:false,
+				usertype:["超级管理员","经销商","农林政府单位","普通用户"],
 			}
 		},
 		methods: {
@@ -65,7 +66,7 @@
 						success: (res) => {
 							this.loding=true
 							uni.uploadFile({
-								url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+								url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
 								filePath: res.tempFilePaths[0],
 								name: 'img_file',
 								formData: {

+ 1 - 1
pages/prevention/index.vue

@@ -63,7 +63,7 @@
 					data: {
 						device_type_id: 2,
 						page: this.page,
-						size: this.size,
+						page_size: "10",
 						device_status:this.device_status
 					}
 				})

+ 1 - 1
pages/prevention/search.vue

@@ -5,7 +5,7 @@
 			<view style="position: fixed;z-index: 100;">
 				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回"></uni-nav-bar>
 				<view class="search_top_input">
-					<input type="text" value="" placeholder="请输入设备ID" v-model="imports" @input="searchinp" />
+					<input type="text" value="" placeholder="请输入设备ID或设备名称" v-model="imports" @input="searchinp" />
 					<u-icon name="search" size="40" class="icon" @click="search"></u-icon>
 				</view>
 			</view>

+ 34 - 14
pages/prevention/sim.vue

@@ -15,15 +15,18 @@
 				</view>
 				<view class="sim_info_text">
 					<p>运营商:{{siminfo.data.carrier}}</p>
-					<p>ICCID:{{iccid}}</p>
+					<view class="sim_info_iccid" @click="copy(iccid)">
+						<p>ICCID:{{iccid}}</p>
+						<image src="../../static/images/ba167c2774bc7a63381dc3aaf1ef95c.png" mode="" class="tishi"></image>
+					</view>
 					<p>状态:{{state}}</p>
 					<p>套餐:{{siminfo.data.data_plan || siminfo.data.totalDataVolume}}MB</p>
 					<p v-if="simnew=='旧'">已用流量:{{siminfo.data.data_usage.toFixed(2)}}MB</p>
 					<p v-if="simnew=='新'">已用流量:{{siminfo.data.usedDataVolume.toFixed(2)}}MB</p>
 					<p v-if="simnew=='旧'">剩余流量:{{siminfo.data.data_balance.toFixed(2)}}MB</p>
 					<p v-if="simnew=='新'">剩余流量:{{(siminfo.data.totalDataVolume-siminfo.data.usedDataVolume).toFixed(2)}}MB</p>
-					<p v-if="simnew=='旧'">到期时间:{{siminfo.data.outbound_date|timeFormat()}}</p>
-					<p v-if="simnew=='新'">到期时间:{{siminfo.data.ratePlanExpirationDate}}</p>
+					<p v-if="simnew=='旧'">到期时间:{{siminfo.data.expiry_date|timeFormat()}}</p>
+					<p v-if="simnew=='新'">到期时间:{{siminfo.data.expireDate}}</p>
 				</view>
 			</view>
 		</view>
@@ -76,31 +79,31 @@
 				if(res.code==1){//企鹏
 					this.simnew = "新"
 					switch (res.data.data.deviceStatus){
-						case "ACTIVATION_READY_NAME":
+						case "TEST_READY_NAME":
 							this.state = "可测试"
 							break;
-						case "TEST_READY_NAME":
+						case "INVENTORY_NAME":
 							this.state = "库存"
 							break;
-						case "INVENTORY_NAME":
+						case "ACTIVATION_READY_NAME":
 							this.state = "可激活"
 							break;
-						case "ACTIVATION_READY_NAME":
+						case "ACTIVATED_NAME":
 							this.state = "已激活"
 							break;
-						case "ACTIVATED_NAME":
+						case "DEACTIVATED_NAME":
 							this.state = "已停卡"
 							break;
-						case "DEACTIVATED_NAME":
+						case "RETIRED_NAME":
 							this.state = "已销卡"
 							break;
-						case "RETIRED_NAME":
+						case "PURGED_NAME":
 							this.state = "已清除"
 							break;
 					}
 				}else if(res.code==2){//合宙
 					var arr = ['未知', '测试期', '沉默期', '使用中', '停机', '停机保号', '预销号', '销号']
-					this.state = arr[res.data.data.active]
+					this.state = arr[res.data.data.account_status]
 					this.simnew = "旧"
 				}
 				this.siminfo = res.data
@@ -111,7 +114,15 @@
 				uni.navigateBack({
 					delta: 1
 				})
-			}
+			},
+			copy(item){
+				uni.setClipboardData({
+				    data: item , 
+				    success: function () {
+				        console.log('success');
+				    }
+				});
+			},
 		},
 		onLoad(option) {
 			console.log(option)
@@ -145,8 +156,8 @@
 			justify-content: space-around;
 			align-items: center;
 			.img{
-				width: 400rpx;
-				height: 350rpx;
+				width: 200rpx;
+				height: 175rpx;
 				
 			}
 		}
@@ -174,6 +185,15 @@
 				margin-top: 20rpx;
 				font-size: 26rpx;
 			}
+			.sim_info_iccid{
+				display: flex;
+				.tishi{
+					width: 30rpx;
+					height: 30rpx;
+					margin: 26rpx 0 0 20rpx;
+					color: #000;
+				}
+			}
 		}
 	}
 </style>

BIN
static/images/ba167c2774bc7a63381dc3aaf1ef95c.png


BIN
unpackage/cache/apk/__UNI__DBA6730_cm.apk


+ 1 - 1
unpackage/cache/apk/apkurl

@@ -1 +1 @@
-https://service.dcloud.net.cn/build/download/ef5e5b10-e836-11eb-9c4c-977be9854736
+https://service.dcloud.net.cn/build/download/4845c030-1785-11ec-a427-b9f2e5d72d1a

File diff suppressed because it is too large
+ 1 - 1
unpackage/cache/apk/cmManifestCache.json


+ 1 - 1
unpackage/cache/certdata

@@ -1,3 +1,3 @@
 andrCertfile=D:/HBuilderX.3.0.5.20210107.full/HBuilderX/plugins/app-safe-pack/Test.keystore
-andrCertAlias=test
+andrCertAlias=android
 andrCertPass=ep/Tdjka4Y7WYqDB6/S7dw==

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


File diff suppressed because it is too large
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/__uniappchooselocation.js


BIN
unpackage/cache/wgt/__UNI__DBA6730/__uniapperror.png


File diff suppressed because it is too large
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/__uniapppicker.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/__uniappquill.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/__uniappquillimageresize.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/__uniappscan.js


File diff suppressed because it is too large
+ 2 - 2
unpackage/cache/wgt/__UNI__DBA6730/app-config-service.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/app-service.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/app-view.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/manifest.json


BIN
unpackage/cache/wgt/__UNI__DBA6730/static/images/ba167c2774bc7a63381dc3aaf1ef95c.png


File diff suppressed because it is too large
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/view.css


File diff suppressed because it is too large
+ 3 - 3
unpackage/cache/wgt/__UNI__DBA6730/view.umd.min.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/build/app-plus/__uniappchooselocation.js


BIN
unpackage/dist/build/app-plus/__uniapperror.png


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/build/app-plus/__uniapppicker.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/build/app-plus/__uniappquill.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/build/app-plus/__uniappquillimageresize.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/build/app-plus/__uniappscan.js


File diff suppressed because it is too large
+ 2 - 2
unpackage/dist/build/app-plus/app-config-service.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/build/app-plus/app-service.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/build/app-plus/app-view.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/build/app-plus/manifest.json


BIN
unpackage/dist/build/app-plus/static/images/ba167c2774bc7a63381dc3aaf1ef95c.png


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/build/app-plus/view.css


File diff suppressed because it is too large
+ 3 - 3
unpackage/dist/build/app-plus/view.umd.min.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/addafter.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/afterSale/search.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/equip-set.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/cbd/equip-set/statistics.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/equip-detail/equip-detail.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/index/search.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/sim/sim.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy2.0/historydatas.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/xy2.0/particulars.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/disandpests/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/equipment.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/search.js.map


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/sim.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipList/search.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/equipMange/index/assignment.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/expertDiagnosis/postmessage.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/expertDiagnosis/wormcase.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/fourBase/addbase.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/fourBase/modification.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/monitor/index.js.map


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/monitor/sim.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/about/about.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/index/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/record/record.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/user-info/user-info.js.map


+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/prevention/index.js.map


Some files were not shown because too many files changed in this diff