zhangyun пре 4 година
родитељ
комит
396c0d2871

+ 1 - 2
pages/cb/equip-detail/equip-detail.vue

@@ -402,9 +402,8 @@
 			}
 		},
 		onLoad(option) {
-			console.log(JSON.parse(option.info))
 			this.equipInfo = JSON.parse(option.info)
-			this.type = this.equipInfo.type
+			this.type = Number(this.equipInfo.type)
 			this.device_status = this.equipInfo.device_status
 			this.getState()
 			console.log(this.equipInfo)

+ 4 - 3
pages/equipList/search.vue

@@ -12,7 +12,7 @@
 			<view class="list_item" v-for="(item,index) in eqlistdata" :key="index" @click="historys(item)">
 				<view class="list_item_top">
 					<p class="p1">
-						<image :src="images[current].path" mode=""></image>
+						<image :src="images[indexs-2].path" mode=""></image>
 						{{item.device_name==''?"--":item.device_name}}
 					</p>
 					<p :class="[item.is_online?'p2':'p_out']">{{item.is_online?"在线":"离线"}}</p>
@@ -43,7 +43,6 @@
 			return {
 				imports: '',
 				eqlistdata: [],
-				current: 0,
 				images: [{
 						path: "../../static/image/fourMoodBase/scd.png",
 						id: 2
@@ -83,6 +82,7 @@
 					}
 				})
 				this.eqlistdata = this.eqlistdata.concat(res.data)
+				console.log(this.eqlistdata)
 				if (this.eqlistdata.length == 0) {
 					this.eqlistdatatf = true
 				} else {
@@ -112,7 +112,7 @@
 				})
 			},
 			historys(item) {
-				switch (this.indexs) {
+				switch (Number(this.indexs)) {
 					case 2:
 						uni.navigateTo({
 							url: "../prevention/equipmentdetails?shebei=" + JSON.stringify(item)
@@ -148,6 +148,7 @@
 		},
 		onLoad(option) {
 			this.indexs = option.id
+			console.log(this.indexs)
 		},
 		onReachBottom() {
 			this.page++

+ 2 - 2
pages/prevention/control.vue

@@ -55,7 +55,7 @@
 							<u-slider v-model="condatas.dattim" min="0" max="100" step="1" active-color="#58C876"></u-slider>
 						</view>
 						<view class="" style="width: 10%;text-align: center;">
-							{{condatas.dattim}}
+							{{condatas.dattim || 0}}
 						</view>
 					</view>
 				</view>
@@ -66,7 +66,7 @@
 							<u-slider v-model="condatas.clt" min="0" max="100" step="1" active-color="#58C876"></u-slider>
 						</view>
 						<view class="" style="width: 10%;text-align: center;">
-							{{condatas.clt}}
+							{{condatas.clt || 0}}
 						</view>
 					</view>
 				</view>

+ 2 - 7
pages/prevention/equipmentdetails.vue

@@ -107,7 +107,7 @@
 					{
 						icon: '../../static/image/prevention/105.png',
 						txt: '充电电压',
-						value: this.olddata.cv / 100
+						value: this.olddata.cv
 					},
 					{
 						icon: '../../static/image/prevention/106.png',
@@ -135,7 +135,7 @@
 					}
 				})
 				this.olddata = res.data[0].d_h_t
-				console.log(this.olddata)
+				console.log(res)
 				this.modification()
 			},
 			clickLeft() {
@@ -148,11 +148,6 @@
 				uni.navigateTo({
 					url:"./sim?id="+this.eqinfo.item.d_id
 				})
-				// uni.showToast({
-				// 	title: '此功能暂未开放',
-				// 	duration: 2000,
-				// 	icon: "none"
-				// });
 			},
 			control() { //设备控制
 				uni.navigateTo({

+ 2 - 1
pages/prevention/ucharts.vue

@@ -102,6 +102,7 @@
 	import uCharts from '../../components/js_sdk/u-charts/u-charts/u-charts.js';
 	var canvaColumnA = null;
 	var canvaColumnB = null;
+	var presenttime = null
 	// var oldpresenttime = presenttime - 24*60*60*1000
 	export default {
 		data() {
@@ -147,7 +148,7 @@
 			this.cHeight = uni.upx2px(500);
 		},
 		onShow(){
-			var presenttime = +new Date();
+			presenttime = +new Date();
 			this.oldtime = parseInt((presenttime - 24 * 60 * 60 * 1000) / 1000)
 			this.newtime = parseInt(presenttime / 1000)
 			setTimeout(()=>{