ming 3 years ago
parent
commit
523bb40af1

+ 21 - 13
pages/eleControl/controlReport/controlReportDetail/controlReportDetail.vue

@@ -33,7 +33,7 @@
 
 				</view>
 			</view>
-			
+
 			<view class="form-item">
 				<view class="title">
 					<text class="necessary">*</text>
@@ -41,7 +41,7 @@
 				</view>
 				<input type="text" v-model="controlReportDetail.creator" disabled>
 			</view>
-			
+
 			<view class="form-item">
 				<view class="title">
 					<text class="necessary">*</text>
@@ -50,10 +50,11 @@
 				<input type="text" v-model="controlReportDetail.create_time" disabled>
 			</view>
 		</form>
-		
+
 		<view style="height:20rpx;background:#EDEDED"></view>
-		<view class="form-item justify-between" style="border-bottom:1px solid #EDEDED;padding:20rpx 30rpx" @tap="goArchiveDetail()">
-			<view  >现场档案</view>
+		<view class="form-item justify-between" style="border-bottom:1px solid #EDEDED;padding:20rpx 30rpx"
+			@tap="goArchiveDetail()">
+			<view>现场档案</view>
 			<view><text class="icon iconfont margin-left-xs ">&#xe629;</text></view>
 		</view>
 
@@ -66,7 +67,7 @@
 			return {
 				siteListData: [],
 				controlReportDetail: {},
-		
+
 			}
 		},
 		onLoad: function(option) {
@@ -75,21 +76,28 @@
 			});
 			this.getSiteList();
 		},
+		onShow() {
+			// uni.$on('deltaOptions', function(res) {
+			// 	// res就是传的值
+			// })
+
+		},
 		mounted() {},
 		methods: {
-			
-			goArchiveDetail(){
-				if(this.controlReportDetail.site_id){
-				
+
+			goArchiveDetail() {
+				if (this.controlReportDetail.site_id) {
+
 					uni.navigateTo({
-						url: '/pages/siteArchive/archiveDetail/archiveDetail?siteId='+this.controlReportDetail.site_id+'&mark=control',
+						url: '/pages/siteArchive/archiveDetail/archiveDetail?siteId=' + this.controlReportDetail
+							.site_id + '&mark=control',
 					});
-				}else{
+				} else {
 					uni.showToast({
 						title: "请先选择所属站点",
 						icon: "none"
 					});
-					
+
 				}
 			},
 

+ 9 - 9
pages/index/index.vue

@@ -194,18 +194,18 @@
 		onLoad: function(option) {
 		
 			
-			if (option.op) {
-				// alert('op')
-				// alert(option.op)
-				// 首页数据渲染
-				this.getData();
+			// if (option.op) {
+			// 	// alert('op')
+			// 	// alert(option.op)
+			// 	// 首页数据渲染
+			// 	this.getData();
 			
-			} else {
-				this.init()
-			}
+			// } else {
+			// 	this.init()
+			// }
 			
 			
-			// this.getData();
+			this.getData();
 
 			this.hackReset = false;
 			this.$nextTick(() => {

+ 23 - 26
pages/processDetailEle/processDetailEle.vue

@@ -13,12 +13,8 @@
 			<button v-if="handling_status==2" class="cu-btn radius bg-orange sm margin-top-sm">待确认</button>
 			<button v-if="handling_status==3" class="cu-btn radius bg-blue sm margin-top-sm">自动恢复</button>
 			<button v-if="handling_status==4" class="cu-btn radius bg-gray sm margin-top-sm">过期失效</button>
-			
-			
-			
 		</view>
-
-
+		
 		<view>
 			<!-- 基本信息start -->
 			<view class="basic-info dealDetail">
@@ -154,25 +150,15 @@
 			}
 		},
 		onLoad: function(option) {
-			this.handling_status = option.handling_status;
+			// this.handling_status = option.handling_status;
 			this.type = option.type;
 			this.companyCode = option.companyCode;
-			this.processingStatus = option.handling_status;
+			this.processingStatus =this.handling_status;
 			this.alarmId = option.id;
 			
-			if (option.handling_status!=0) {
-				uni.setNavigationBarTitle({
-					title: '已处理'
-				});
-			} else {
-				uni.setNavigationBarTitle({
-					title: '未处理'
-				});
-			}
-
+			
 			this.getUnProcessDetail({
 				"companyCode": option.companyCode,
-				"processingStatus": option.handling_status,
 				"alarmId": option.id
 			})
 
@@ -227,15 +213,26 @@
 				})
 				console.log(res.data.data[0]);
 				this.detailMessage = res.data.data[0]
+				this.handling_status=this.detailMessage.handling_status;
+				if (this.handling_status!=0) {
+					uni.setNavigationBarTitle({
+						title: '已处理'
+					});
+				} else {
+					uni.setNavigationBarTitle({
+						title: '未处理'
+					});
+				}
+				
 			},
-			async getVideoDetail(ming = {}) {
-				const res = await this.$myRequest({
-					url: 'IntegratedAlarm/getVideoAlarmDetails',
-					data: ming
-				})
-				console.log(res.data.data[0]);
-				this.detailMessage2 = res.data.data[0]
-			},
+			// async getVideoDetail(ming = {}) {
+			// 	const res = await this.$myRequest({
+			// 		url: 'IntegratedAlarm/getVideoAlarmDetails',
+			// 		data: ming
+			// 	})
+			// 	console.log(res.data.data[0]);
+			// 	this.detailMessage2 = res.data.data[0]
+			// },
 
 			submit() {
 				uni.makePhoneCall({

+ 26 - 29
pages/processDetailEle1/processDetailEle1.vue

@@ -13,12 +13,8 @@
 			<button v-if="handling_status==2" class="cu-btn radius bg-orange sm margin-top-sm">待确认</button>
 			<button v-if="handling_status==3" class="cu-btn radius bg-blue sm margin-top-sm">自动恢复</button>
 			<button v-if="handling_status==4" class="cu-btn radius bg-gray sm margin-top-sm">过期失效</button>
-			
-			
-			
 		</view>
-
-
+		
 		<view>
 			<!-- 基本信息start -->
 			<view class="basic-info dealDetail">
@@ -153,34 +149,24 @@
 				handling_status: 0
 			}
 		},
-		mounted(){
-			document.querySelector('.uni-page-head-hd').style.display = 'none'
-		},
 		onLoad: function(option) {
-			this.handling_status = option.handling_status;
+			// this.handling_status = option.handling_status;
 			this.type = option.type;
 			this.companyCode = option.companyCode;
-			this.processingStatus = option.handling_status;
+			this.processingStatus =this.handling_status;
 			this.alarmId = option.id;
 			
-			if (option.handling_status!=0) {
-				uni.setNavigationBarTitle({
-					title: '已处理'
-				});
-			} else {
-				uni.setNavigationBarTitle({
-					title: '未处理'
-				});
-			}
-
+			
 			this.getUnProcessDetail({
 				"companyCode": option.companyCode,
-				"processingStatus": option.handling_status,
 				"alarmId": option.id
 			})
 
 
 		},
+		mounted(){
+					document.querySelector('.uni-page-head-hd').style.display = 'none'
+				},
 		methods: {
 
 			powerSubmit() {
@@ -230,15 +216,26 @@
 				})
 				console.log(res.data.data[0]);
 				this.detailMessage = res.data.data[0]
+				this.handling_status=this.detailMessage.handling_status;
+				if (this.handling_status!=0) {
+					uni.setNavigationBarTitle({
+						title: '已处理'
+					});
+				} else {
+					uni.setNavigationBarTitle({
+						title: '未处理'
+					});
+				}
+				
 			},
-			async getVideoDetail(ming = {}) {
-				const res = await this.$myRequest({
-					url: 'IntegratedAlarm/getVideoAlarmDetails',
-					data: ming
-				})
-				console.log(res.data.data[0]);
-				this.detailMessage2 = res.data.data[0]
-			},
+			// async getVideoDetail(ming = {}) {
+			// 	const res = await this.$myRequest({
+			// 		url: 'IntegratedAlarm/getVideoAlarmDetails',
+			// 		data: ming
+			// 	})
+			// 	console.log(res.data.data[0]);
+			// 	this.detailMessage2 = res.data.data[0]
+			// },
 
 			submit() {
 				uni.makePhoneCall({

+ 1 - 1
pages/siteArchive/archiveDetail/archiveDetail.vue

@@ -128,7 +128,7 @@
 			},
 			goArchiveEdit() {
 				uni.navigateTo({
-					url: '/pages/siteArchive/siteArchiveAdd/siteArchiveAdd?id=' + this.id,
+					url: '/pages/siteArchive/siteArchiveAdd/siteArchiveAdd?id=' + this.id+'&mark=control',
 				});
 			},
 			//数据请求

+ 41 - 7
pages/siteArchive/siteArchiveAdd/siteArchiveAdd.vue

@@ -420,6 +420,8 @@
 			}
 		},
 		onLoad: function(option) {
+			this.control = option.mark;
+			// alert(this.control)
 			this.getDataList();
 			this.getTitleList();
 			this.getRoutrBox();
@@ -459,14 +461,14 @@
 						that.formMess[upimage] = res.tempFilePaths[0];
 						console.log(res.tempFilePaths[0])
 						uni.uploadFile({
-							url: that.$BASE_URL+'MonitoringReporting/setUpload',
+							url: that.$BASE_URL + 'MonitoringReporting/setUpload',
 							filePath: that.formMess[upimage],
 							name: 'file',
 							formData: {
 								'user': 'test'
 							},
 							success: (uploadFileRes) => {
-								that.formMess[upimage] = that.$websiteUrl+ JSON.parse(
+								that.formMess[upimage] = that.$websiteUrl + JSON.parse(
 										uploadFileRes.data)
 									.img_url;
 								console.log(that.formMess)
@@ -582,8 +584,8 @@
 				if (this.id) {
 					this.formMess.id = this.id;
 				}
-				
-				
+
+
 				let res = await this.addArchive(this.formMess)
 				if (!res.data.flag) {
 					uni.showToast({
@@ -596,9 +598,41 @@
 					});
 				}
 				setTimeout(() => {
-					uni.navigateTo({
-						url: '/pages/siteArchive/siteArchive',
-					});
+					if(this.control){
+						uni.navigateBack({
+						     delta: 2
+						    });
+					}else{
+						uni.navigateTo({
+							url: '/pages/siteArchive/siteArchive',
+						});
+					}
+
+
+					// const pages = getCurrentPages();
+					
+					//  uni.$emit('deltaOptions',值)
+					 
+					// if (pages.length > 1) {
+					// 	uni.navigateBack({
+					// 		delta: 2,
+					// 		fail: function() {
+					// 			console.log('回退失败');
+								
+					// 			//跳转
+							
+
+					// 		}
+					// 	});
+					// } else {
+					// 	console.log('不存在上一页,回退失败');
+					// 	//跳转
+
+					// }
+
+
+
+
 				}, 1000);
 			},
 			addArchive(params = {}) {