ming 3 éve
szülő
commit
cfe9f17fac

+ 16 - 5
pages/eleControl/controlReport/controlReportAdd/controlReportAdd.vue

@@ -59,7 +59,7 @@
 			</view>
 			<br>
 			<view style="height:20rpx;background:#EDEDED"></view>
-			<view class="form-item justify-between" style="border-bottom:1px solid #EDEDED;padding:20rpx 30rpx" @tap="goArchivePage()">
+			<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>
@@ -108,10 +108,21 @@
 		},
 		methods: {
 			
-			goArchivePage(){
-				uni.navigateTo({
-					url: '/pages/siteArchive/siteArchive',
-				});
+			
+			goArchiveDetail(){
+				if(this.site_id){
+				
+					uni.navigateTo({
+						url: '/pages/siteArchive/archiveDetail/archiveDetail?id='+this.site_id+'&mark=control',
+					});
+				}else{
+					uni.showToast({
+						title: "请先选择所属站点",
+						icon: "none"
+					});
+					
+				}
+				
 			},
 			upFile(input, event) {
 			 var _self = this;

+ 14 - 5
pages/eleControl/controlReport/controlReportDetail/controlReportDetail.vue

@@ -52,7 +52,7 @@
 		</form>
 		
 		<view style="height:20rpx;background:#EDEDED"></view>
-		<view class="form-item justify-between" style="border-bottom:1px solid #EDEDED;padding:20rpx 30rpx" @tap="goArchivePage()">
+		<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>
@@ -78,10 +78,19 @@
 		mounted() {},
 		methods: {
 			
-			goArchivePage(){
-				uni.navigateTo({
-					url: '/pages/siteArchive/siteArchive',
-				});
+			goArchiveDetail(){
+				if(this.controlReportDetail.site_id){
+				
+					uni.navigateTo({
+						url: '/pages/siteArchive/archiveDetail/archiveDetail?id='+this.site_id+'&mark=control',
+					});
+				}else{
+					uni.showToast({
+						title: "请先选择所属站点",
+						icon: "none"
+					});
+					
+				}
 			},
 
 			//数据请求

+ 1 - 1
pages/messagePush/messagePush.vue

@@ -225,7 +225,7 @@
 			// 回显数据请求
 			async getCheckList(params = {}) {
 				const res = await this.$myRequest({
-					url: 'PushSettings/setperm',
+					url: 'PushConfig/setperm',
 					data: params,
 					showLoading: true
 				})

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

@@ -29,7 +29,7 @@
 			</view>
 			<view class="form-item">
 				<view class="title">电试报告时间:</view>
-				<view class="sub">{{detailInfo.supervision_name}}</view>
+				<view class="sub">{{detailInfo.electric_test_overdue}}</view>
 			</view>
 			<view class="eleTime">
 				<image src="/static/noteIcon.png"></image>
@@ -263,6 +263,10 @@
 				<textarea name="" id="" disabled="true" v-model="detailInfo.remarks"></textarea>
 			</view>
 			
+			
+			<view  v-if="this.control&&Object.keys(this.detailInfo).length!=0" class="btn-area submitBottomBtn padding-lr-sm  " style="position:static">
+				<button class="bg-blue round  margin-top" @click="goArchiveEdit()">编 辑 </button>
+			</view>
 			<br>
 		</form>
 
@@ -275,10 +279,13 @@
 		data() {
 			return {
 				detailInfo:{},
+				control:'',
+				id:''
 			}
 		},
 		onLoad: function(option) {
 			console.log('option')
+			console.log(this.detailInfo)
 			if(option.siteId){
 				// alert(1)
 				this.getDataList({"site_id":option.siteId})
@@ -286,9 +293,18 @@
 				// alert(2)
 				this.getDataList({"id":option.id})
 			}
+			this.control=option.mark;
+			
+			this.id=option.id;
 			
 		},
 		methods: {
+			goArchiveEdit(){
+				uni.navigateTo({
+					url: '/pages/siteArchive/siteArchiveAdd/siteArchiveAdd?id='+this.id,
+				});
+				
+			},
 			//数据请求
 			async getDataList(params = {}) {
 				const res = await this.$myRequest({

+ 1 - 1
pages/siteArchive/siteArchive.vue

@@ -79,7 +79,7 @@
 
 			searchData() {
 				this.getDataList({
-					"siteName": this.siteName,
+					"site_name": this.siteName,
 				})
 			},
 

+ 12 - 111
pages/siteArchive/siteArchiveAdd/siteArchiveAdd.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="appWrapper">
-		<!-- 现场档案新增start -->
+		<!-- 现场档案start -->
 		<form action="">
 			<view style="height:30rpx"></view>
 			<view class="form-item">
@@ -41,7 +41,6 @@
 				</select>
 			</view>
 
-			<!-- 电试 -->
 			<view class="info-tit margin-left-xs">
 				<text class="cuIcon-titles margin-right-xs"></text>
 				电试
@@ -329,11 +328,7 @@
 			</view>
 			<br>
 		</form>
-		<!-- 现场档案新增end -->
-
-
-
-
+		<!-- 现场档案end -->
 
 	</view>
 </template>
@@ -349,6 +344,8 @@
 				routeListData: [],
 				siteListData: [],
 
+				id: 0,
+
 				formMess: {
 					"account_number": "",
 					"rheological_change": "",
@@ -356,11 +353,11 @@
 					"route_id": 0,
 					"site_id": 0,
 					"supervision_department_id": 0,
-					
+
 					"electric_test_overdue": "",
 
 					"cable_hole": "0",
-					cable_hole_describe: '',
+					 cable_hole_describe: '',
 
 					"damage": "0",
 					"damage_describe": "",
@@ -395,8 +392,6 @@
 					"overdue_electrician_certificate": "0",
 					"overdue_electrician_certificate_describe": "",
 
-					
-
 					"old_equipment": "",
 
 					"blanket_insufficient_configuration": "0",
@@ -409,7 +404,6 @@
 					"analog_screen_describe": "",
 					"remarks": "",
 
-
 					cable_hole_picture: '',
 					damage_picture: '',
 					water_leakage_picture: '',
@@ -425,48 +419,7 @@
 					blanket_insufficient_configuration_picture: '',
 					ground_wire_picture: '',
 					analog_screen_picture: '',
-
-
 				},
-				id: 0,
-				detailInfo: {},
-
-				//图片显示及上传图片路径
-				"imageList": [{
-						cable_hole_image: '',
-						damage_image: '',
-						water_leakage_image: '',
-						annihilator_insufficient_configuration_image: '',
-						annihilator_overdue_image: '',
-						pile_up_sundries_image: '',
-						serious_ash_deposition_image: '',
-						around_environment_humid_image: '',
-						around_pile_up_sundries_image: '',
-						no_electrician_image: '',
-						electrician_lack_image: '',
-						overdue_electrician_certificate_image: '',
-						blanket_insufficient_configuration_image: '',
-						ground_wire_image: '',
-						analog_screen_image: ''
-					},
-					{
-						cable_hole_picture: '',
-						damage_picture: '',
-						water_leakage_picture: '',
-						annihilator_insufficient_configuration_picture: '',
-						annihilator_overdue_picture: '',
-						pile_up_sundries_picture: '',
-						serious_ash_deposition_picture: '',
-						around_environment_humid_picture: '',
-						around_pile_up_sundries_picture: '',
-						no_electrician_picture: '',
-						electrician_lack_picture: '',
-						overdue_electrician_certificate_picture: '',
-						blanket_insufficient_configuration_picture: '',
-						ground_wire_picture: '',
-						analog_screen_picture: ''
-					}
-				]
 			}
 		},
 
@@ -491,7 +444,6 @@
 
 		},
 		methods: {
-
 			// 相机拍照
 			goCamera(name, upimage) {
 				const that = this;
@@ -515,7 +467,6 @@
 								that.formMess[upimage] = 'https://wx.ewoogi.com' + JSON.parse(
 										uploadFileRes.data)
 									.img_url;
-
 								console.log(that.formMess)
 							}
 						});
@@ -523,52 +474,14 @@
 				})
 			},
 
-
 			// 修改回显请求
 			async getDetailList(ming = {}) {
-
-
 				const res = await this.$myRequest({
 					url: 'Archives/getArchivesList',
 					showLoading: true,
 					data: ming
 				})
-				// this.detailInfo = res.data.data[0];
 				this.formMess = res.data.data[0];
-				
-
-				// 正式部署删除 start
-				// let tmpImg = {
-				// 	cable_hole_picture: '',
-				// 	damage_picture: '',
-				// 	water_leakage_picture: '',
-				// 	annihilator_insufficient_configuration_picture: '',
-				// 	annihilator_overdue_picture: '',
-				// 	pile_up_sundries_picture: '',
-				// 	serious_ash_deposition_picture: '',
-				// 	around_environment_humid_picture: '',
-				// 	around_pile_up_sundries_picture: '',
-				// 	no_electrician_picture: '',
-				// 	electrician_lack_picture: '',
-				// 	overdue_electrician_certificate_picture: '',
-				// 	blanket_insufficient_configuration_picture: '',
-				// 	ground_wire_picture: '',
-				// 	analog_screen_picture: ''
-				// }
-
-				// for (let key in this.formMess) {
-				// 	if (tmpImg.hasOwnProperty(key)) {
-				// 		this.formMess[key] = 'https://wx.ewoogi.com' + this.formMess[key]
-				// 	}
-				// }
-				
-				console.log(111)
-				console.log(this.formMess.damage_picture)
-				console.log(typeof(this.formMess.damage_picture))
-				
-				// 正式部署删除 end
-
-
 
 			},
 
@@ -580,7 +493,6 @@
 					data: params
 				})
 				this.routeListData = res.data.data;
-				// console.log(this.routeListData)
 			},
 
 			//监察下拉下拉数据请求
@@ -590,7 +502,6 @@
 					showLoading: true,
 					data: params
 				})
-
 				this.supervisionListData = res.data.data
 			},
 
@@ -604,8 +515,7 @@
 				this.siteListData = res.data.data
 			},
 
-
-			//新增提交
+			//新增修改提交
 			async addSubmit() {
 				// alert(this.id)
 				//提交验证
@@ -653,16 +563,11 @@
 				}
 
 				let data = this.formMess;
-				let url = 'Archives/addArchives';
-
-				// if (id) {
-				// 	url = 'Archives/setArchives';
-
-				// 	data.id = id;
-				// }
-				
-				
+				// let url = 'Archives/addArchives';
 
+				if (this.id) {
+					this.formMess.id = this.id;
+				}
 				let res = await this.addArchive(this.formMess)
 				if (!res.data.flag) {
 					uni.showToast({
@@ -679,17 +584,13 @@
 						url: '/pages/siteArchive/siteArchive',
 					});
 				}, 1000);
-
 			},
 			addArchive(params = {}) {
 				return this.$myRequest({
-					url:'Archives/addArchives',
-					// url: url,
+					url: !this.id ? 'Archives/addArchives' : 'Archives/setArchives',
 					data: params
 				})
 			},
-
-
 		}
 	}
 </script>