zhangyun 4 yıl önce
ebeveyn
işleme
23d2b0e5a3

+ 1 - 1
components/equip-item/equip-item.vue

@@ -7,7 +7,7 @@
 			<view class="tag tag-off" ></view>
 		</template>
 		<view class="info">
-			<text class="">设备ID:{{item.imei||item.device_id}}</text>
+			<text class="">设备名称:{{item.device_name==""?"无":item.device_name}}</text>
 			<text v-if="item.is_online==1" class="state on">在线</text>
 			<text v-else  class="state off">离线</text>
 		</view>

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

@@ -20,7 +20,7 @@
 					<template v-for="(item,index) in equipArr[active].list">
 						<equipItem @click.native="itemClick(item)" v-bind:item="item" :key="index">
 							<view class="date">
-								<p>设备名称:{{item.device_name==""?"无":item.device_name}}</p>
+								<p>设备ID:{{item.imei||item.device_id}}</p>
 								<p>最新上报时间:{{item.addtime|timeFormat}}</p>
 							</view>
 						</equipItem>

+ 37 - 6
pages/environment/contros.vue

@@ -29,7 +29,7 @@
 			<view class="timing">
 				<p class="operation_title">上传时间间隔(min)</p>
 				<view class="timing_text">
-					<slider value="1" @change="sliderChange" step="1" min="1" max="360" show-value block-size="18" activeColor="#57C878" />
+					<slider value="1" v-model="config.interval" @change="sliderChange" step="1" min="1" max="360" show-value block-size="18" activeColor="#57C878" />
 				</view>
 			</view>
 			<view class="ensure">
@@ -48,22 +48,47 @@
 				config: {
 					content: "",
 					timeout: "",
-					interval: ""
+					interval: 1
 				},
 				id: ''
 			}
 		},
 		methods: {
+			// forecast.send_control.device_control_info 设备配置查询
+			async controsdata(datas) { //提交数据
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.send_control.device_control_info',
+					data: {
+						d_id: this.id,
+						cmd: "config"
+					}
+				})
+				console.log(res)
+				this.config.interval = res.interval
+				this.config.content = res.content
+				this.config.timeout = res.timeout
+			},
 			//forecast.send_control.device_control  config: {"interval":10,"content":"content","timeout":"1"}
 			async timing(datas) { //提交数据
 				const res = await this.$myRequest({
-					url: '/api/api_gateway?method=weather.weather.qxz_status',
+					url: '/api/api_gateway?method=forecast.send_control.device_control',
 					data: {
 						device_type_id: 5,
 						d_id: this.id,
 						config: JSON.stringify(datas)
 					}
 				})
+				console.log(res)
+				if(res){
+					uni.showToast({
+						title: '指令下发成功!'
+					});
+				}else{
+					uni.showToast({
+						title: '指令下发失败!',
+						icon: "none"
+					});
+				}
 			},
 			//forecast.send_control.admin_device_control
 			async restart(datas) { //重启
@@ -81,7 +106,8 @@
 					});
 				} else {
 					uni.showToast({
-						title: '指令下发失败!'
+						title: '指令下发失败!',
+						icon: "none"
 					});
 				}
 			},
@@ -92,7 +118,7 @@
 					data: {
 						device_type_id: 5,
 						d_id: this.id,
-						control_type: "data"
+						control_type: "interval"
 					}
 				})
 				console.log(res)
@@ -102,7 +128,8 @@
 					});
 				} else {
 					uni.showToast({
-						title: '指令下发失败!'
+						title: '指令下发失败!',
+						icon: "none"
 					});
 				}
 			},
@@ -113,6 +140,7 @@
 			},
 			ensure() { //提交
 				this.timing(this.config)
+				console.log(this.config)
 			},
 			sliderChange(e) { //滑动块
 				this.config.interval = e.detail.value
@@ -129,6 +157,9 @@
 		},
 		onLoad(option) {
 			this.id = option.id
+		},
+		onShow() {
+			this.controsdata()
 		}
 	}
 </script>

+ 2 - 2
pages/environment/index.vue

@@ -12,11 +12,11 @@
 					<image :src="item.is_online==1?'http://static.yfpyx.com/bigdata_app/image/prevention/6.png':'http://static.yfpyx.com/bigdata_app/image/prevention/7.png'" mode=""
 					 class="prevents_item_img"></image>
 					<view class="prevents_item_top">
-						<p>设备 ID:{{item.equip_id}}</p>
+						<p>设备名称:{{item.equip_name==""?"无":item.equip_name}}</p>
 						<p :class="item.is_online==1?'green':'red'" v-text="item.is_online==1?'在线':'离线'"></p>
 					</view>
 					<view class="prevents_item_bot">
-						<p>设备名称:{{item.equip_name==""?"无":item.equip_name}}</p>
+						<p>设备 ID:{{item.equip_id}}</p>
 						<p>最新上报时间:{{item.uptime|timeFormat()}}</p>
 					</view>
 				</view>

+ 0 - 1
pages/index/index.vue

@@ -23,7 +23,6 @@
 		</view>
 	</view>
 </template>
-
 <script>
 	import kpsImageCutter from "@/components/ksp-image-cutter/ksp-image-cutter.vue";
 	export default {

+ 1 - 1
pages/login/login.vue

@@ -22,7 +22,7 @@
 				</view>
 				<view class="aboutpass">
 					<u-checkbox-group>
-						<u-checkbox v-model="checked" :label-disabled="false" size="22" @change="rempass">记住密码</u-checkbox>
+						<u-checkbox v-model="checked" :label-disabled="false" size="28" active-color="#19be6b" icon-size="28" @change="rempass">记住密码</u-checkbox>
 					</u-checkbox-group>
 				</view>
 				<view class="uni-btn-v">

+ 2 - 2
pages/prevention/index.vue

@@ -12,11 +12,11 @@
 					<image :src="item.is_online==1?'http://static.yfpyx.com/bigdata_app/image/prevention/6.png':'http://static.yfpyx.com/bigdata_app/image/prevention/7.png'"
 					 mode="" class="prevents_item_img"></image>
 					<view class="prevents_item_top">
-						<p>设备 ID:{{item.imei}}</p>
+						<p>设备名称:{{item.device_name==""?"无":item.device_name}}</p>
 						<p :class="item.is_online==1?'green':'red'" v-text="item.is_online==1?'在线':'离线'"></p>
 					</view>
 					<view class="prevents_item_bot">
-						<p>设备名称:{{item.device_name==""?"无":item.device_name}}</p>
+						<p>设备 ID:{{item.imei}}</p>
 						<p>最新上报时间:{{item.addtime|timeFormat()}}</p>
 					</view>
 				</view>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/components/equip-item/equip-item.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/cb/index/index.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/contros.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/environment/index.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/prevention/index.js.map


+ 0 - 4
unpackage/dist/dev/mp-weixin/app.json

@@ -101,10 +101,6 @@
       }
     ]
   },
-<<<<<<< HEAD
   "usingComponents": {},
   "sitemapLocation": "sitemap.json"
-=======
-  "usingComponents": {}
->>>>>>> 689110420c3aa522bf2c78c17edcce1dae754b0c
 }

+ 1 - 1
unpackage/dist/dev/mp-weixin/components/equip-item/equip-item.wxml

@@ -1 +1 @@
-<view class="item"><block wx:if="{{item.is_online==1}}"><view class="tag tag-on"></view></block><block wx:else><view class="tag tag-off"></view></block><view class="info"><text>{{"设备ID:"+(item.imei||item.device_id)}}</text><block wx:if="{{item.is_online==1}}"><text class="state on">在线</text></block><block wx:else><text class="state off">离线</text></block></view><slot></slot></view>
+<view class="item"><block wx:if="{{item.is_online==1}}"><view class="tag tag-on"></view></block><block wx:else><view class="tag tag-off"></view></block><view class="info"><text>{{"设备名称:"+(item.device_name==""?"无":item.device_name)}}</text><block wx:if="{{item.is_online==1}}"><text class="state on">在线</text></block><block wx:else><text class="state off">离线</text></block></view><slot></slot></view>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/cb/index/index.wxml


Dosya farkı çok büyük olduğundan ihmal edildi
+ 8 - 8
unpackage/dist/dev/mp-weixin/pages/environment/contros.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/environment/contros.wxml


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/environment/index.wxml


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/login/login.wxml


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/prevention/index.wxml


+ 2 - 44
unpackage/dist/dev/mp-weixin/project.config.json

@@ -4,47 +4,6 @@
     "ignore": []
   },
   "setting": {
-<<<<<<< HEAD
-    "urlCheck": true,
-    "es6": true,
-    "enhance": false,
-    "postcss": false,
-    "preloadBackgroundData": false,
-    "minified": true,
-    "newFeature": false,
-    "coverView": true,
-    "nodeModules": false,
-    "autoAudits": false,
-    "showShadowRootInWxmlPanel": true,
-    "scopeDataCheck": false,
-    "uglifyFileName": false,
-    "checkInvalidKey": true,
-    "checkSiteMap": true,
-    "uploadWithSourceMap": true,
-    "compileHotReLoad": false,
-    "useMultiFrameRuntime": true,
-    "useApiHook": true,
-    "useApiHostProcess": false,
-    "babelSetting": {
-      "ignore": [],
-      "disablePlugins": [],
-      "outputPath": ""
-    },
-    "enableEngineNative": false,
-    "bundle": false,
-    "useIsolateContext": true,
-    "useCompilerModule": true,
-    "userConfirmedUseCompilerModuleSwitch": false,
-    "userConfirmedBundleSwitch": false,
-    "packNpmManually": false,
-    "packNpmRelationList": [],
-    "minifyWXSS": true
-  },
-  "compileType": "miniprogram",
-  "libVersion": "",
-  "appid": "wxa67985a99191095e",
-  "projectname": "云飞智控",
-=======
     "urlCheck": false,
     "minified": true,
     "postcss": false,
@@ -52,9 +11,8 @@
   },
   "compileType": "miniprogram",
   "libVersion": "",
-  "appid": "wx8b73392672bcdac0",
-  "projectname": "大数据平台APP",
->>>>>>> 689110420c3aa522bf2c78c17edcce1dae754b0c
+  "appid": "wxa67985a99191095e",
+  "projectname": "云飞智控",
   "condition": {
     "search": {
       "current": -1,