Parcourir la source

1、SIM卡逻辑
2、绿普森性诱设置需求更改

zhangsijie il y a 1 an
Parent
commit
5eb61fb6e5

+ 9 - 7
pages/cb/xylps/detail.vue

@@ -157,7 +157,7 @@
 					<u-button size="mini" class="btn" type="primary" @click="equipBtnControl('update')">升级</u-button>
 					<u-divider>设备控制</u-divider>
 				</view>
-				<u-form-item label="设备名称"><u-input v-model="equipContrlForm1.devname" /></u-form-item>
+				<!-- <u-form-item label="设备名称"><u-input v-model="equipContrlForm1.devname" /></u-form-item> -->
 				<u-form-item label="高压包开关状态" :label-width="240">
 					<u-radio-group v-model="equipContrlForm1.dev_work_onoff">
 						<u-radio :name="1">开</u-radio>
@@ -179,9 +179,9 @@
 					<u-picker mode="time" v-model="equipContrlForm1.show_et" :default-time="equipContrlForm1.et"
 						:params="params" @confirm="(e) => changeControlTime(e, 'et')"></u-picker>
 				</u-form-item>
-				<u-form-item label="SIM卡号" :label-width="200">
+				<!-- <u-form-item label="SIM卡号" :label-width="200">
 					<u-input v-model="equipContrlForm1.sim" />
-				</u-form-item>
+				</u-form-item> -->
 				<u-form-item label="心跳间隔(S)" :label-width="200">
 					<u-input v-model="equipContrlForm1.heart_time" type="number"/>
 				</u-form-item>
@@ -198,19 +198,19 @@
 			</u-form>
 		</view>
 		<!-- 拍照定时 -->
-		<u-modal v-model="photoTimeLayer" width="90%" :async-close="true" :show-cancel-button="true"
+		<u-modal v-model="photoTimeLayer" width="80%" :async-close="true" :show-cancel-button="true"
 			@confirm="devicePhotoTime">
 			<view class="slot-content">
 				<view class="expireBox">
+					<u-tag text="注意:00:00为不拍照" mode="dark" type="warning"/>
 					<u-form>
 						<u-form-item :label="`时间${index + 1}`" :label-width="180"
 							v-for="(time, index) in photoTimeArray" :key="time.key">
-							<text @click="time.show = true">{{time.value}}</text> <u-button size="mini" type="error"
-								@click="removeTime(index)">删除</u-button>
+							<text @click="time.show = true">{{time.value}}</text>
 							<u-picker mode="time" v-model="time.show" :default-time="time.value" :params="params"
 								@confirm="(e) => changeSnapTime(e, time.key, index)"></u-picker>
 						</u-form-item>
-						<u-button size="mini" type="primary" @click="addTime(photoTimeArray.length)">添加</u-button>
+						<!-- <u-button size="mini" type="primary" @click="addTime(photoTimeArray.length)">添加</u-button> -->
 					</u-form>
 				</view>
 			</view>
@@ -1238,6 +1238,8 @@
 	}
 
 	.expireBox {
+		width: 80%;
+		margin: 0 auto;
 		padding: 20rpx;
 		box-sizing: border-box;
 		max-height: 60vh;

+ 33 - 9
pages/prevention/sim.vue

@@ -28,7 +28,7 @@
 					</view>
 				</view>
 			</view>
-			<template v-if="iccidObj.photo_iccid">
+			<template v-if="iccidObj.photo_iccid || iccidObj.is_editor">
 				<view class="sim_info">
 					<view class="sim_info_loding" v-if="loding2">
 						<image src="../../static/images/cb/6286299.gif" mode="" class="img"></image>
@@ -42,7 +42,7 @@
 							<p>ICCID:{{siminfo['photo'].iccid}}</p>
 							<image @click="copy(siminfo['photo'].iccid)" src="../../static/images/ba167c2774bc7a63381dc3aaf1ef95c.png" mode="" class="tishi">
 							</image>
-							<text v-if="iccidObj.data_iccid" class="yficonfont icon-xiugai" @click="editFun(siminfo['photo'].iccid)"></text>
+							<text class="yficonfont icon-xiugai" @click="editFun(siminfo['photo'].iccid)"></text>
 							<!-- <image  src="../../static/images/ba167c2774bc7a63381dc3aaf1ef95c.png" mode="" class="tishi">
 							</image> -->
 						</view>
@@ -128,7 +128,7 @@
 				})
 				if(res.code) {
 					this.editFlag = false;
-					this.loding2 = true;
+					this.loding2 = false;
 					uni.showToast({
 					    title: '修改成功',
 					    duration: 2000,
@@ -152,11 +152,22 @@
 					}
 				})
 				if(res.data_iccid == '' && res.photo_iccid == '') {
-					uni.showToast({
-					    title: '此设备暂无SIM卡信息!',
-					    duration: 2000,
-						icon:"none"
-					});
+					if(res.is_editor) {
+						this.isPhotoFault = true;
+						this.iccidObj = res;
+						this.siminfo = {
+							photo: {
+								iccid: ''
+							}
+						}
+						this.loding2 = false;
+					} else {
+						uni.showToast({
+							title: '此设备暂无SIM卡信息!',
+							duration: 2000,
+							icon:"none"
+						});
+					}
 					return
 				}
 				this.iccidObj = res;
@@ -165,6 +176,15 @@
 				}
 				if (res.photo_iccid) {
 					this.simdata(res.photo_iccid, 'photo')
+				} else if(res.is_editor) {
+					this.isPhotoFault = true;
+					this.iccidObj = res;
+					this.siminfo = {
+						photo: {
+							iccid: ''
+						}
+					}
+					this.loding2 = false;
 				}
 				console.log(res);
 
@@ -197,7 +217,11 @@
 					}
 					return
 				}
-				this.isFault = false;
+				if(type == 'data') {
+					this.isDataFault = false;
+				} else {
+					this.isPhotoFault = false;
+				}
 				this.siminfo[type] = res;
 				console.log(this.siminfo[type])
 			},

BIN
unpackage/cache/apk/__UNI__DBA6730_cm.apk


+ 1 - 1
unpackage/cache/apk/apkurl

@@ -1 +1 @@
-https://app.liuyingyong.cn/build/download/4532e4e0-a301-11ef-9c81-e9d4629a2602
+https://app.liuyingyong.cn/build/download/b4f94200-a7eb-11ef-a0b1-eb1caac3906c

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
unpackage/cache/apk/cmManifestCache.json


+ 1 - 1
util/api.js

@@ -7,7 +7,7 @@ export const myRequest = (options) => {
 		// BASE_URL = 'http://114.55.0.7:8002'//测试
 		// BASE_URL = process.env.NODE_ENV === 'development' ? "http://192.168.2.110:8003" : "http://8.136.98.49:8002"
 		// BASE_URL = process.env.NODE_ENV === 'development' ? "http://114.55.0.7:8002" : "http://8.136.98.49:8002"
-		BASE_URL = process.env.NODE_ENV === 'development' ? "http://8.136.98.49:8002" : "http://8.136.98.49:8002"
+		BASE_URL = process.env.NODE_ENV === 'development' ? "http://192.168.2.118:8003" : "http://8.136.98.49:8002"
 		// BASE_URL = 'http://192.168.1.77:8002'
 	}
 	// BASE_URL = 'http://192.168.1.52:8003'