Просмотр исходного кода

fix:1.AB模型不生效;2.权限控制逻辑修改

yf_elsa.cui 8 месяцев назад
Родитель
Сommit
ea77ec5963

+ 16 - 14
pages/cb/cbd/equip-set/imgpage.vue

@@ -6,7 +6,7 @@
 				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="查看图片" rightIcon="camera"
 					@clickRight="clickRight"></uni-nav-bar>
 			</view>
-			<p class="tishi" v-if="tishi">暂无数据</p>
+			<p class="tishi" v-if="imglists.length==0">暂无数据</p>
 			<u-select v-model="modelPicker" mode="single-column" @confirm="confirmModel" v-if="device_type != 7"
 				:default-value="[identify_model]" :list="modelList"></u-select>
 			<view class="schedule" @click="modelPicker=!modelPicker" v-if="device_type != 7">
@@ -28,7 +28,7 @@
 				</view>
 				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
 			</view>
-			<view class="imglist">
+			<view class="imglist" >
 				<view class="imglist_box" v-for="(item,index) in imglists" :key="index">
 					<view class="imglist_left">
 						<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/cb/jiazai.ui.gif'" mode="">
@@ -94,27 +94,35 @@
 				tiemshow: false, //时间选择器
 				disable: "",
 				device_type: "",
-				myuid: ""
+				myuid: "",
+				loading:false
 			}
 		},
 		methods: {
 			// 切换模型
 			confirmModel(e) {
+				
 				this.modelList.forEach((item, index) => {
 					if (e[0].value == item.value) {
 						this.identify_model = index;
 					}
 				})
+				this.page=1
 				this.imglists=[];
 				this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
 				// console.log(e)
 			},
 			//forecast.forecast_system.equip_photofo
 			async imglistdata(time_begin, time_end) { //获取图片列表
+				this.loading = true
+				uni.showLoading({
+					title: '加载中'
+				});
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.forecast_system.device_photo_list',
 					data: {
 						device_id: this.device_id,
+						// device_id: '861551058865205',
 						page: this.page,
 						status: "no",
 						page_number: 12,
@@ -123,13 +131,11 @@
 						time_end: time_end, //结束时间
 					}
 				})
+				uni.hideLoading()
+				// this.loading = false
 				this.imglists = this.imglists.concat(res.data)
 				console.log(this.imglists)
-				if (this.imglists.length == 0) {
-					this.tishi = true
-				} else {
-					this.tishi = false
-				}
+				
 			},
 			// 孢子仪的图片列表
 			async imglistdataBzy(time_begin, time_end) { //获取图片列表
@@ -147,11 +153,7 @@
 				})
 				this.imglists = this.imglists.concat(res.data)
 				console.log(this.imglists)
-				if (this.imglists.length == 0) {
-					this.tishi = true
-				} else {
-					this.tishi = false
-				}
+			
 			},
 			//forecast.forecast_system.equip_photo_del
 			async del(id) { //删除图片
@@ -243,7 +245,7 @@
 			shibie(id, addr) { //识别
 				// this.discern(id)
 				uni.navigateTo({
-					url: "./results?id=" + id + "&addr=" + addr
+					url: "./results?id=" + id + "&addr=" + addr+"&identify_model=" + this.modelList[this.identify_model].value
 				})
 			},
 			tongji(item) { //统计

+ 2 - 1
pages/cb/cbd/equip-set/results.vue

@@ -55,7 +55,7 @@
 						img_id: this.id,
 						ret: ret,
 						device_type: "cbd",
-						identify_model: "A",
+						identify_model: this.identify_model,
 						sign: pubblicData
 					},
 				})
@@ -115,6 +115,7 @@
 		onLoad(option) {
 			this.id = option.id
 			this.addr = option.addr
+			this.identify_model = option.identify_model
 			this.discern("see")
 		}
 	}

+ 0 - 1
pages/login/login.vue

@@ -265,7 +265,6 @@
 				this.formdata.passwold = this.formdata.passwold.replace(/[\u4E00-\u9FA5]/g, '')
 			},
 			rempass(val) {
-				debugger
 				this.passvalue = val.value
 				if (val.value) {
 					uni.setStorage({

+ 4 - 8
util/QueryPermission.js

@@ -1,13 +1,9 @@
-var list = []
 
+var list =[]
 function QueryPermission(id) {
-	uni.getStorage({
-		key: "jurisdiction",
-		success: function(res) {
-			list = JSON.parse(res.data)
-		}
-	})
-	// console.log(list)
+	if(uni.getStorageSync("jurisdiction")){
+		list = JSON.parse(uni.getStorageSync("jurisdiction"))
+	}
 	for (var i = 0; i < list.length; i++) {
 		if (list[i].children) {
 			var data = list[i].children