Ming преди 4 години
родител
ревизия
b7d81dc905

+ 4 - 2
data/json.js

@@ -364,13 +364,15 @@ let inspectList = [{
 		"id": "1",
 		"title": "人工督查单",
 		"num": "3",
-		"imgUrl": "/static/rg-icon.png"
+		"imgUrl": "/static/rg-icon.png",
+		"type":1
 	},
 	{
 		"id": "2",
 		"title": "电子督查单",
 		"num": "4",
-		"imgUrl": "/static/dz-icon.png"
+		"imgUrl": "/static/dz-icon.png",
+		"type":2
 	}
 
 ];

+ 5 - 4
pages/index/components/chart/chart.vue

@@ -12,7 +12,7 @@
 		props: {
 			bindData: {
 				type: Object,
-				default: ''
+				default: null
 			}
 		},
 		data() {
@@ -27,6 +27,7 @@
 
 		},
 		methods: {
+			
 			// changeOption() {
 			// 	const data = this.option.series[0].data
 			// 	// 随机更新示例数据
@@ -34,9 +35,9 @@
 			// 		data.splice(index, 1, Math.random() * 40)
 			// 	})
 			// },
-			// onViewClick(options) {
-			// 	console.log(options)
-			// }
+			onViewClick(options) {
+				console.log(options)
+			}
 		}
 	}
 </script>

+ 3 - 4
pages/inspectList/inspectList.vue

@@ -2,14 +2,13 @@
 
 	<view class="">
 		<view class="cu-list menu-avatar">
-			<view class="cu-item deviceTypeItem" v-for="(item,index) in inspectList" :key="index" @tap="goProcessList()">
+			<view class="cu-item deviceTypeItem" v-for="(item,index) in inspectList" :key="index" @tap="goProcessList(item)">
 				<view class="cu-avatar round" :style="`background-image:url(${item.imgUrl})`"></view>
 				<view class="content">
 					<view class="title">{{item.title}}</view>
 				</view>
 				<view class="nav-right num">
 					<view>
-						
 						<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
 					</view>
 				</view>
@@ -35,9 +34,9 @@
 		
 	
 		methods: {
-			goProcessList(){
+			goProcessList(item){
 				uni.navigateTo({
-					url: '/pages/inspectList/processList/processList',
+					url: '/pages/inspectList/processList/processList?type='+item.type,
 				});
 			}
 

+ 20 - 27
pages/inspectList/processList/processList.vue

@@ -21,7 +21,7 @@
 						</view>
 						<view class="content">
 							<view class="pro-title">
-								<view class="cut">{{item.artificial_code}}</view>
+								<view class="cut">{{type==1?item.artificial_code:item.supervise_code}}</view>
 							</view>
 							<view class="pro-des  ">
 								<view class="text-cut">
@@ -47,7 +47,7 @@
 						</view>
 						<view class="content">
 							<view class="pro-title">
-								<view class="cut">{{item.artificial_code}}</view>
+								<view class="cut">{{type==1?item.artificial_code:item.supervise_code}}</view>
 							</view>
 							<view class="pro-des  ">
 								<view class="text-cut">
@@ -75,22 +75,32 @@
 			return {
 				unporcessList: [],
 				porcessedList: [],
-
-				type: '0',
+				type: 1,
 				modalName: null,
 				listTouchStart: 0,
 				listTouchDirection: null,
 				CustomBar: this.CustomBar,
 				TabCur: 0,
 				tabNav: ['未处理', '已处理'],
-
 				record_count: '',
-				record_count1: ''
+				record_count1: '',
+				
+				requestUrl:''
 
 
 			};
 		},
 		onLoad: function(option) {
+			this.type=option.type;
+			if(option.type==1){
+				uni.setNavigationBarTitle({
+					title: "消防支队人工督察单",
+				});
+			}else{
+				uni.setNavigationBarTitle({
+					title: "消防支队电子督察单",
+				});
+			}
 
 			this.getProcessData({
 				"company_code": uni.getStorageSync('selectedCode'),
@@ -110,30 +120,22 @@
 			});
 		},
 		methods: {
-
 			async getProcessData(params = {}, whichTab) {
 				const res = await this.$myRequest({
-					url: 'FireInspector/getManualInspectorList',
+					url: this.type==1?'FireInspector/getManualInspectorList':'FireInspector/getElectronicInspectorList',
 					data: params,
 					showLoading: true
 				})
 				this.unporcessList = res.data.data;
-				console.log(this.unporcessList)
-
-
 				if (whichTab == 0) {
 					this.unporcessList = res.data.data;
 					this.record_count = parseInt(res.data.record_count)
-
 				} else {
 					this.porcessedList = res.data.data;
 					this.record_count1 = parseInt(res.data.record_count)
 				}
 			},
 
-
-
-
 			tabSelect(e) {
 				this.unporcessList = [],
 					this.porcessedList = [],
@@ -150,7 +152,7 @@
 			// 页面跳转
 			goUnprocessDetail(item) {
 				uni.navigateTo({
-					url: '/pages/inspectList/unprocessDetail/unprocessDetail?id='+item.id,
+					url: '/pages/inspectList/unprocessDetail/unprocessDetail?id='+item.id+'&type='+this.type,
 					success: res => {},
 					fail: () => {},
 					complete: () => {}
@@ -159,7 +161,7 @@
 
 			goProcessedDetail(item) {
 				uni.navigateTo({
-					url: '/pages/inspectList/processedDetail/processedDetail?id='+item.id,
+					url: '/pages/inspectList/processedDetail/processedDetail?id='+item.id+'&type='+this.type,
 					success: res => {},
 					fail: () => {},
 					complete: () => {}
@@ -169,16 +171,7 @@
 
 
 
-			goVideoProcessedDetail(id) {
-				uni.navigateTo({
-					url: '/pages/processedDetail/processedDetail?companyCode=' + this.companyCode +
-						'&processingStatus=' + this.processingStatus +
-						'&id=' + id + '&type=2',
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
-				});
-			}
+		
 		}
 	}
 </script>

+ 14 - 17
pages/inspectList/processedDetail/processedDetail.vue

@@ -4,7 +4,6 @@
 			<view class="time">{{this.getData.cl_time}}</view>
 			<button class="cu-btn radius bg-green sm">{{this.getData.wtype}}</button>
 		</view>
-	
 		<view >
 			<!-- 基本信息start -->
 			<view class="basic-info">
@@ -14,13 +13,11 @@
 				</view>
 				<view class="info-content">
 					<view class="info-one-info ">
-						<text>{{this.getData.artificial_code}}</text>  
+						<text>{{type==1?this.getData.artificial_code:this.getData.supervise_code}}</text>  
 					</view>
-					
 					<view>
 						<text>{{this.getData.content}}</text>
 					</view>
-					
 				</view>
 			</view>
 			<!-- 基本信息end -->
@@ -49,8 +46,6 @@
 			</view>
 			<!-- 处理状态end -->
 		</view>
-		
-
 	</view>
 </template>
 
@@ -61,46 +56,48 @@
 				radio: 'A',
 				radio: 'B',
 				modalName: null,
-				type: '0',
+				type: 0,
 				getData:{},
 				detailMessage2:{},
 			}
 		},
 		onLoad: function(option) {
+			this.type=option.type;
+			if(option.type==1){
+				uni.setNavigationBarTitle({
+					title: "消防支队人工督察单详情页",
+				});
+			}else{
+				uni.setNavigationBarTitle({
+					title: "消防支队电子督察单详情页",
+				});
+			}
 			this.getDetailData({
 				"id": option.id,
 				"company_code": uni.getStorageSync('selectedCode')
 			})
-		
-			
-			
 		},
 		methods: {
-			
 			async getDetailData(params = {}) {
 				const res = await this.$myRequest({
-					url: 'FireInspector/getManualInspectorDetails',
+					url: this.type==1?'FireInspector/getManualInspectorDetails':'FireInspector/getElectronicInspectorDetails',
 					data: params,
 					showLoading: true
-			
 				})
 				this.getData = res.data.data[0];
 				console.log(this.getData)
 			},
-			
 			submit() {
 				uni.makePhoneCall({
 					phoneNumber: '15122423833' //仅为示例
 				});
-			},
-			
+			},
 			RadioChange(e) {
 				this.radio = e.detail.value
 			},
 			textareaAInput(e) {
 				this.textareaAValue = e.detail.value
 			},
-
 		}
 	}
 </script>

+ 21 - 51
pages/inspectList/unprocessDetail/unprocessDetail.vue

@@ -4,7 +4,6 @@
 			<view class="time">{{this.getData.cl_time}}</view>
 			<button class="cu-btn radius bg-green sm">{{this.getData.wtype}}</button>
 		</view>
-	
 		<view >
 			<!-- 基本信息start -->
 			<view class="basic-info">
@@ -14,13 +13,11 @@
 				</view>
 				<view class="info-content">
 					<view class="info-one-info ">
-						<text>{{this.getData.artificial_code}}</text>  
+						<text>{{type==1?this.getData.artificial_code:this.getData.supervise_code}}</text>  
 					</view>
-					
 					<view>
 						<text>{{this.getData.content}}</text>
 					</view>
-					
 				</view>
 			</view>
 			<!-- 基本信息end -->
@@ -33,7 +30,6 @@
 				</view>
 				<view class="padding-lr padding-bottom-lg">
 					<form action="">
-						
 						<radio-group name="gender" class=""  @change="RadioChange">
 							<label class="margin-right">
 								<radio value="0"  checked /><text>单个处理</text>
@@ -42,9 +38,7 @@
 								<radio value="1" /><text>批量处理</text>
 							</label>
 						</radio-group>
-						
 						<view class="cu-form-group">
-							
 							<textarea class="JTxtArea lg" 
 							:maxlength="50" 
 							 v-model="msg"
@@ -52,7 +46,6 @@
 							auto-height
 							@input="inputReason"
 							:value="reason"></textarea>
-							
 						</view>
 						<view class="btn-area">
 							<button class="bg-blue round  margin-top" @click="powerSubmit()">提 交 </button>
@@ -62,8 +55,6 @@
 			</view>
 			<!-- 处理状态end -->
 		</view>
-		
-
 	</view>
 </template>
 
@@ -72,31 +63,29 @@
 		data() {
 			return {
 				reason: '',
-				type: '0',
-			
+				type: 0,
 				msg: '',
-				msg2: '',
-				flag:false,
-				companyCode:0,
-				
 				getData:{},
-				
-				id:'',
 				radioOne: 0,
-				
-				
 			}
 		},
 		onLoad: function(option) {
-			this.id=option.id;
-			console.log(this.id)
+			this.type=option.type;
+			if(option.type==1){
+				uni.setNavigationBarTitle({
+					title: "消防支队人工督察单详情页",
+				});
+			}else{
+				uni.setNavigationBarTitle({
+					title: "消防支队电子督察单详情页",
+				});
+			}
 			this.getDetailData({
 				"id": option.id,
 				"company_code": uni.getStorageSync('selectedCode')
 			})
 		},
 		methods: {
-			
 			RadioChange(e) {
 				this.radioOne = e.detail.value;
 				console.log(this.radioOne)
@@ -112,63 +101,44 @@
 						"id": this.getData.id,
 						"company_code":this.getData.company_code,
 						"plcl": this.radioOne,
-						"artificial_code": this.getData.artificial_id,
+						"artificial_code": this.type==1?this.getData.artificial_id:this.getData.supervise_id,
 						"clnr": this.msg,
-						// "clr": this.msg
 					})
 				}
-				
-				
 			},
-			
-			
 			async powerSubmitRes(params = {}) {
 				const res = await this.$myRequest({
-					url: 'FireInspector/setManualInspector',
+					url: this.type==1?'FireInspector/setManualInspector':'FireInspector/setElectronicInspector',
 					data: params
 				})
-				
 			   if(res.data.flag){
 				  uni.showToast({
 				  	title: "提交成功",
 				  });
+				  setTimeout(() => {
+				  	uni.navigateTo({
+				  		url: '/pages/inspectList/processList/processList?type='+this.type,
+				  	});
+				  }, 1000);
 			   }
-			   
-			   // setTimeout(() => {
-			   // 	uni.navigateTo({
-			   // 		url: '/pages/inspectList/processList/processList',
-			   
-			   // 	});
-			   // }, 1000);
-			 
-				
 			},
 			
-			
+			//回显信息
 			async getDetailData(params = {}) {
 				const res = await this.$myRequest({
-					url: 'FireInspector/getManualInspectorDetails',
+					url: this.type==1?'FireInspector/getManualInspectorDetails':'FireInspector/getElectronicInspectorDetails',
 					data: params,
 					showLoading: true
-			
 				})
 				this.getData = res.data.data[0];
 				console.log(this.getData)
 			},
-			
-			submit() {
-				uni.makePhoneCall({
-					phoneNumber: '15122423833' //仅为示例
-				});
-			},
-			// textarea
 			inputReason(e) {
 				this.reason = e.detail.value;
 			},
 			textareaAInput(e) {
 				this.textareaAValue = e.detail.value
 			},
-
 		}
 	}
 </script>

+ 1 - 3
pages/processList/processList.vue

@@ -197,11 +197,9 @@
 
 			// 页面跳转
 			goUnprocessDetail(item) {
-				if (item.type == 1 || item.type == 3)
 					uni.navigateTo({
 						url: '/pages/unprocessDetail/unprocessDetail?id=' + item
-							.id + '&type=' + this.type + '&deviceCode=' + item.device_code + '&data2=' + item.data2 +
-							'&data3=' + item.data3 + '&data5=' + item.data5,
+							.id + '&type=' + this.type,
 					});
 			},
 

+ 2 - 17
pages/processedDetail/processedDetail.vue

@@ -66,18 +66,12 @@
 	export default {
 		data() {
 			return {
-				radio: 'A',
-				radio: 'B',
-				modalName: null,
-				type: '0',
-				detailMessage: {},
-				detailMessage2: {},
-
+				type: 1,
 				getData: {}
 			}
 		},
 		onLoad: function(option) {
-
+			this.type=option.type;
 			this.getDetailData({
 				"type": option.type,
 				"id": option.id
@@ -91,20 +85,11 @@
 					url: 'ComprehensiveAlarm/getAlarmDetails',
 					data: params,
 					showLoading: true
-
 				})
 				this.getData = res.data.data[0];
 				console.log(this.getData)
 			},
 
-
-
-			submit() {
-				uni.makePhoneCall({
-					phoneNumber: '15122423833' //仅为示例
-				});
-			},
-
 			RadioChange(e) {
 				this.radio = e.detail.value
 			},

+ 109 - 99
pages/unprocessDetail/unprocessDetail.vue

@@ -1,10 +1,9 @@
 <template>
 	<view>
-		<view class="timeBox flex justify-between align-center padding-lr-sm">
+		<view class="timeBox flex justify-between align-center padding-lr-sm">
 			<view class="time">2021-01-18 15:16:45</view>
 			<button class="cu-btn radius bg-red sm">未处理</button>
 		</view>
-		
 		<view>
 			<view class="basic-info">
 				<view class="info-tit margin-left-xs">
@@ -14,60 +13,55 @@
 				<view class="info-content">
 					<view class="info-one-info ">
 						<text>设备名称:</text>
-						<text>三楼赛特威尔测试烟感二</text>
+						<text>{{getData.device_name}}</text>
 					</view>
 
 					<view>
 						<text>设备地址:</text>
-						<text>上海市青浦区徐泾镇徐乐路208号</text>
+						<text>{{getData.unitinfo}}</text>
 					</view>
 					<view>
 						<text>告警信息:</text>
-						<text>烟雾拆卸报警</text>
+						<text>{{getData.alarm_information}}</text>
 					</view>
 				</view>
 			</view>
-			
-			<!-- 处理状态start -->
+
+			<!-- 处理内容start -->
 			<view class="processStatus">
 				<view class="info-tit margin-left-xs">
 					<text class="cuIcon-titles margin-right-xs"></text>
 					处理内容
 				</view>
-				
+
 				<view class="padding-lr padding-bottom-lg">
 					<form action="">
-						
-						<radio-group name="gender" class="">
+						<radio-group name="gender" class="" @change="RadioChange">
 							<label class="margin-right">
-								<radio value="单个处理" checked /><text>单个处理</text>
+								<radio value="0" checked /><text>单个处理</text>
 							</label>
 							<label>
-								<radio value="批量处理" /><text>批量处理</text>
+								<radio value="1" /><text>批量处理</text>
 							</label>
 						</radio-group>
-						
 						<view class="cu-form-group">
-							
-							<textarea class="JTxtArea lg" 
-							:maxlength="50" 
-							:data-maxnum="reason.length+'/50'"   placeholder="备注信息,最多可输入50个字..."
-							auto-height
-							@input="inputReason"
-							:value="reason"></textarea>
-							
+							<textarea class="JTxtArea lg" :maxlength="50" :data-maxnum="reason.length+'/50'"
+								placeholder="备注信息,最多可输入50个字..." auto-height v-model="msg" @input="inputReason"
+								:value="reason"></textarea>
+
 						</view>
 						<view class="btn-area">
-							<button class="bg-orange round missReport margin-top" @click="videoMissSubmit()">误 报 </button>
-							<button class="bg-blue round  missReport margin-top " @click="videoSubmit()">非 误 报 </button>
+							<button class="bg-orange round missReport margin-top" @click="alarmSubmit(1)">误 报
+							</button>
+							<button class="bg-blue round  missReport margin-top " @click="alarmSubmit(0)">非 误 报 </button>
 						</view>
 					</form>
 				</view>
 			</view>
-			<!-- 处理状态end -->
+			<!-- 处理内容end -->
 		</view>
-
-		
+
+
 	</view>
 </template>
 
@@ -75,106 +69,122 @@
 	export default {
 		data() {
 			return {
-				radio: 'A',
-				radio: 'B',
 				modalName: null,
 				reason: '',
-				type: '0',
-				detailMessage: {},
-				detailMessage2: {},
+				type: 1,
 				msg: '',
-				msg2: '',
-				flag:false,
-				companyCode:0
-
+				getData: {},
+				radioOne: 0,
 			}
 		},
 		onLoad: function(option) {
-			
-
+			this.type = option.type;
+			this.getDetailData({
+				"type": option.type,
+				"id": option.id
+			})
 		},
 		methods: {
+			async getDetailData(params = {}) {
+				const res = await this.$myRequest({
+					url: 'ComprehensiveAlarm/getAlarmDetails',
+					data: params,
+					showLoading: true
+				})
+				this.getData = res.data.data[0];
+				console.log(this.getData)
+			},
+
 			async powerSubmitRes(params = {}) {
 				const res = await this.$myRequest({
-					url: 'IntegratedAlarm/setAlarmHandle',
+					url: 'ComprehensiveAlarm/setAlarmHandling',
 					data: params
-				})
-				
-			   if(res.data.flag){
-				  uni.showToast({
-				  	title: "提交成功",
-				  });
-			   }
-			   
-			   setTimeout(() => {
-			   	uni.navigateTo({
-			   		url: '/pages/processList/processList?companyCode=' + this.companyCode + '&type='+this.type+'',
-			   	});
-			   }, 1000);
-			 
-				
-			},
-			videoSubmit() {
-				if(!this.msg2){
-					uni.showToast({
-						title: "请输入处理内容",
-						icon:"none"
-					});
-				}else{
-					this.powerSubmitRes({
-						"alarmStatus": 0,
-						"type": 2,
-						"deviceCode": this.detailMessage2.deviceCode,
-						"companyCode": this.companyCode,
-						"id": this.detailMessage2.id,
-						"handlerContent": this.msg2
-					})
-					
+				})
+				if (res.data.flag) {
+					uni.showToast({
+						title: "提交成功",
+					});
+					setTimeout(() => {
+						uni.navigateTo({
+							url: '/pages/processList/processList?type=' + this.type,
+						});
+					}, 1000);
 				}
+			},
 			
+			
+			//拼接公共搜索条件
+			// getSearchParamObj() {
+			//     let queryParam = {};
+			//     queryParam.id=this.getData.id;
+			//     return queryParam;
 				
-			},
-			videoMissSubmit() {
-				if(!this.msg2){
-					uni.showToast({
-						title: "请输入处理内容",
-						icon:"none"
-					});
-				}else{
-					this.powerSubmitRes({
-						"alarmStatus": 1,
-						"type": 2,
-						"deviceCode": this.detailMessage2.deviceCode,
-						"companyCode": this.companyCode,
-						"id": this.detailMessage2.id,
-						"handlerContent": this.msg2
-					})
-				}
-			},
+				
+			// },
 
-			submit() {
-				uni.makePhoneCall({
-					phoneNumber: '15122423833' //仅为示例
-				});
-			},
+			alarmSubmit(query) {
+				if (!this.msg) {
+					uni.showToast({
+						title: "请输入处理内容",
+						icon: "none"
+					});
+				} else {
+					
+					let queryParam = {};
+					queryParam.id=this.getData.id;
+					queryParam.type=this.getData.dwtype;
+					queryParam.device_code=this.getData.device_code;
+					queryParam.if_batch=this.radioOne;
+					queryParam.clwb=query;
+					queryParam.ncmb=this.getData.ncmd;
+					queryParam.clnr=this.msg;
+
+					if (this.getData.dwtype == 1) {
+						queryParam.data3=this.getData.data3;
+						queryParam.data5=this.getData.data5;
+						this.powerSubmitRes(queryParam)
+					}
+					if (this.getData.dwtype == 2||this.getData.dwtype == 7) {
+						queryParam.data1=this.getData.data1;
+						this.powerSubmitRes(queryParam)
+					}
+					if (this.getData.dwtype == 3) {
+						queryParam.data2=this.getData.data2;
+						this.powerSubmitRes(queryParam)
+					}
+					if (this.getData.dwtype == 6) {
+						queryParam.data2=this.getData.data2;
+						queryParam.data4=this.getData.data4;
+						this.powerSubmitRes(queryParam)
+					}
+					if (this.getData.dwtype == 2) {
+						queryParam.data1=this.getData.data1;
+						this.powerSubmitRes(queryParam)
+					}
+					if (this.getData.dwtype == 2) {
+						queryParam.data1=this.getData.data1;
+						this.powerSubmitRes(queryParam)
+					}
+
+					
 
+				}
+			},
+			
 			RadioChange(e) {
-				this.radio = e.detail.value
+				this.radioOne = e.detail.value;
+				console.log(this.radioOne)
 			},
 			textareaAInput(e) {
 				this.textareaAValue = e.detail.value
 			},
-			// textarea
 			inputReason(e) {
 				this.reason = e.detail.value;
 			}
-			
-			
-
 		}
 	}
 </script>
 
 <style lang="scss">
-	
+
 </style>

+ 62 - 59
pages/xunJian/plan/components/chart.vue

@@ -1,35 +1,80 @@
 <template>
 	<view class="content">
-		<view @click="echarts.onClick" :prop="option" :change:prop="echarts.updateEcharts" id="echarts" class="echarts"></view>
+		<view @click="echarts.onClick"  :change:prop="echarts.updateEcharts" id="echarts" class="echarts"></view>
 
 	</view>
 </template>
 
 <script>
-	var fontColor = "#fff";
-	let noramlSize = 16;
-	var datas = {
-		value: 90,
-		company: "%",
-		ringColor: [{
-			offset: 0,
-			color: '#0BA0D7' // 0% 处的颜色
-		}, {
-			offset: 1,
-			color: '#24F0E4' // 100% 处的颜色
-		}]
-	}
-
 	export default {
 		name: 'chart',
 		props: {
-
+			bindData: {
+				type: Object,
+				default: ''
+			}
 		},
 		data() {
 			return {
+				
+			}
+		},
+		onLoad() {
+			
+
+		},
+		methods: {
+			changeOption() {
+				const data = this.option.series[0].data
+				// 随机更新示例数据
+				data.forEach((item, index) => {
+					data.splice(index, 1, Math.random() * 40)
+				})
+			},
+			onViewClick(options) {
+				console.log(options)
+			}
+		}
+	}
+</script>
+
+<script module="echarts" lang="renderjs">
+	let myChart
+	export default {
+		mounted() {
+			if (typeof window.echarts === 'function') {
+				this.initEcharts()
+			} else {
+				// 动态引入较大类库避免影响页面展示
+				const script = document.createElement('script')
+				// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
+				script.src = '/static/echarts.min.js' 
+				script.onload = this.initEcharts.bind(this)
+				document.head.appendChild(script)
+			}
+		},
+		methods: {
+			initEcharts() {
+
+				var fontColor = "#fff";
+				let noramlSize = 16;
+				var datas = {
+					// value:11,
+					value:  parseInt(this.bindData.completion),
+					company: "%",
+					ringColor: [{
+						offset: 0,
+						color: '#0BA0D7' // 0% 处的颜色
+					}, {
+						offset: 1,
+						color: '#24F0E4' // 100% 处的颜色
+					}]
+				},
 
-				option: {
 
+				myChart = echarts.init(document.getElementById('echarts'))
+				// 观测更新的数据在 view 层可以直接访问到
+				myChart.setOption({
 					title: {
 						text: '{name|' + datas.value + datas.company + '}\n{val|任务完成率}',
 						x: 'center',
@@ -94,50 +139,8 @@
 							value: 100 - datas.value
 						}]
 					}]
-				}
-			}
-		},
-		onLoad() {
-
-		},
-		methods: {
-			changeOption() {
-				const data = this.option.series[0].data
-				// 随机更新示例数据
-				data.forEach((item, index) => {
-					data.splice(index, 1, Math.random() * 40)
 				})
 			},
-			onViewClick(options) {
-				console.log(options)
-			}
-		}
-	}
-</script>
-
-<script module="echarts" lang="renderjs">
-	let myChart
-	export default {
-		mounted() {
-			if (typeof window.echarts === 'function') {
-				this.initEcharts()
-			} else {
-				// 动态引入较大类库避免影响页面展示
-				const script = document.createElement('script')
-				// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
-				script.src = '/static/echarts.min.js'
-				script.onload = this.initEcharts.bind(this)
-				document.head.appendChild(script)
-			}
-		},
-		methods: {
-			initEcharts() {
-
-
-				myChart = echarts.init(document.getElementById('echarts'))
-				// 观测更新的数据在 view 层可以直接访问到
-				myChart.setOption(this.option)
-			},
 			updateEcharts(newValue, oldValue, ownerInstance, instance) {
 				// 监听 service 层数据变更
 				myChart.setOption(newValue)

+ 28 - 10
pages/xunJian/plan/plan.vue

@@ -3,7 +3,7 @@
 		<view style="height:30rpx"></view>
 		<view class=" bg-white plan-sec text-center" style="margin:0rpx 30rpx 30rpx 30rpx">
 			<view class="plan-tit padding-top-lg">任务名称:ui测试</view>
-			<chart></chart>
+			<chart :bindData="this.getData" v-if=" JSON.stringify(getData) != '{}'"></chart>
 		</view>
 		
 		<view class="margin bg-white plan-sec">
@@ -12,14 +12,14 @@
 				巡检详情
 			</view>
 			<view class="cu-list menu-avatar">
-				<view class="cu-item deviceTypeItem" v-for="(item,index) in inspectList" :key="index" @tap="goDetailPage(item)">
+				<view class="cu-item deviceTypeItem" v-for="(item,index) in planList" :key="index" @tap="goDetailPage(item)">
 					<view class="content" style="left:0!important;width:80%">
-						<view class="title">{{item.title}}</view>
+						<view class="title">{{item.spot_name}}</view>
 					</view>
 					<view class="nav-right num">
 						<view class="text-grey">
-							<span class="online" v-if="item.status==0">已执行</span>
-							<span class="error" v-if="item.status==1">未执行</span>
+							<span class="online" v-if="item.data3==1">已执行</span>
+							<span class="error" v-if="item.data3==0">未执行</span>
 							<text class="icon iconfont margin-right-xs ">&#xe629;</text>
 						</view>
 					</view>
@@ -41,22 +41,40 @@
 		data() {
 			return {
 			inspectList: json.xunJianPlan,
+			getData:{},
+			planList:[]
 
 			};
 		},
-		onLoad:function(option){
+		onLoad:function(option){
+			this.getPlanList({'company_code':uni.getStorageSync('selectedCode')})
 
 		},
 		
-		methods: {
+		methods: {
+			
+			// 巡检计划列表数据请求
+			async getPlanList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'Inspection/getInspectionList',
+					data:params,
+					showLoading: true
+				})
+				this.getData=res.data.data[0];
+				this.planList=this.getData.point
+				
+			},
+			
+			
 			goDetailPage(item){
-				if(item.status){
+				if(item.data3){
 					uni.navigateTo({
-						url:  "/pages/xunJian/planDetail/planDetail"
+						
+						url:  "/pages/xunJian/planDetailDone/planDetailDone"
 					})
 				}else{
 					uni.navigateTo({
-						url:  "/pages/xunJian/planDetailDone/planDetailDone"
+						url:  "/pages/xunJian/planDetail/planDetail",
 					})
 				}
 				

+ 24 - 11
pages/xunJian/record/record.vue

@@ -2,23 +2,25 @@
 
 	<view class="">
 		<view class="cu-list menu-avatar">
-			<view class="cu-item"  :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in deviceManage"
+			<view class="cu-item"  :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in this.getData"
 			 :key="index" :data-target="'move-box-' + index" @tap="goDetail(item)">
 				<view class="content" style="left:0;width:80%">
 					<view class="pro-title">
-						<view class="cut">{{item.title}}</view>
+						<view class="cut">计划:{{item.plan_name}}</view>
 					</view>
 					<view class="pro-des  ">
 						<view class="text-cut">
-							{{item.des}}
+							点位{{item.spot_name}}
 						</view>
 					</view>
-					<view class="pro-date ">{{item.time}}</view>
+					<view class="pro-date ">{{item.wc_time}}</view>
 				</view>
 				<view class="nav-right num margin-right-sm">
 					<view class="text-grey">
-						<button class="cu-btn radius bg-green sm" v-if="item.status===0">正常</button>
-						<button class="cu-btn radius bg-red sm" v-if="item.status===1">异常</button>
+						<button class="cu-btn radius bg-green sm" v-if="item.spot_abnormal==0">正常</button>
+						<button class="cu-btn radius bg-orange sm" v-if="item.spot_abnormal==1">异常</button>
+						<button class="cu-btn radius bg-red sm" v-if="item.spot_abnormal==2">故障</button>
+						<button class="cu-btn radius bg-orange sm" v-if="item.spot_abnormal==3">其他</button>
 					</view>
 				</view>
 			</view>
@@ -31,13 +33,13 @@
 	export default {
 		data() {
 			return {
-				deviceManage: json.xunJianRecord,
 				modalName: null,
+				getData:[]
 			};
 		},
 		
-		onLoad:function(option){
-			
+		onLoad:function(option){
+			this.goRecordList({'company_code':uni.getStorageSync('selectedCode')})
 		},
 		onNavigationBarButtonTap(e) {
 			console.log(e)
@@ -46,12 +48,23 @@
 	
 			});
 		},
-		methods: {
+		methods: {
+			
+			// 巡检记录列表数据请求
+			async goRecordList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'Inspection/getInspectionRecordList',
+					data:params,
+					showLoading: true
+				})
+				this.getData=res.data.data;
+				console.log(this.getData);
+			},
 		
 			// 页面跳转
 			goDetail(item) {
 				uni.navigateTo({
-					url: '/pages/xunJian/recordDetail/recordDetail',
+					url: '/pages/xunJian/recordDetail/recordDetail?id='+item.id,
 				});
 			},
 		}

+ 69 - 129
pages/xunJian/recordDetail/recordDetail.vue

@@ -1,10 +1,13 @@
 <template>
 	<view>
-		<view class="timeBox flex justify-between align-center padding-lr-sm">
-			<view class="time">巡检任务1</view>
-			<button class="cu-btn radius bg-red sm">异常</button>
+		<view class="timeBox flex justify-between align-center padding-lr-sm">
+			<view class="time">{{this.getData.plan_name}}</view>
+			<button class="cu-btn radius bg-green sm" v-if="this.getData.spot_abnormal==0">正常</button>
+			<button class="cu-btn radius bg-orange sm" v-if="this.getData.spot_abnormal==1">异常</button>
+			<button class="cu-btn radius bg-red sm" v-if="this.getData.spot_abnormal==2">故障</button>
+			<button class="cu-btn radius bg-red sm" v-if="this.getData.spot_abnormal==3">其他</button>
 		</view>
-		
+
 		<view>
 			<view class="basic-info">
 				<view class="info-tit margin-left-xs">
@@ -14,58 +17,54 @@
 				<view class="info-content">
 					<view class="info-one-info ">
 						<text>所属单位:</text>
-						<text>市光四村221号楼</text>
+						<text>{{this.getData.owner_name}}</text>
 					</view>
 
 					<view>
 						<text>单位地址:</text>
-						<text>杨浦区市光四村221号楼</text>
+						<text>{{this.getData.owner_address}}</text>
+					</view>
+					<view>
+						<text>巡检点位:</text>
+						<text>{{this.getData.spot_name}}</text>
+					</view>
+					<view>
+						<text>点位地址:</text>
+						<text>{{this.getData.spot_address}}</text>
 					</view>
 					<view>
-						<text>维保点位:</text>
-						<text>巡检点位01</text>
-					</view>
-					<view>
-						<text>点位地址:</text>
-						<text>市光四村221号楼</text>
-					</view>
-					<view>
-						<text>预期时间:</text>
-						<text>2019-05-28 16:12:45</text>
-					</view>
-					<view>
-						<text>完成时间:</text>
-						<text>2019-05-28 18:00:00</text>
+						<text>预期时间:</text>
+						<text>{{this.getData.ywc_time}}</text>
+					</view>
+					<view>
+						<text>完成时间:</text>
+						<text>{{this.getData.wc_time}}</text>
 					</view>
 				</view>
 			</view>
-			
-			<!-- 巡检信息 -->
-			<view class="basic-info">
-				<view class="info-tit margin-left-xs">
-					<text class="cuIcon-titles margin-right-xs"></text>
-					巡检信息
-				</view>
-				<view class="info-content">
-					<view class="info-one-info ">
-						<text>巡检人员:</text>
-						<text>张三</text>
-					</view>
-			
-					<view>
-						<text>联系方式:</text>
-						<text>16666666666</text>
-					</view>
-					<view>
-						<text>维保点位:</text>
-						<text>巡检点位01</text>
-					</view>
-					<view>
-						<text>巡检描述:</text>
-						<text>测试</text>
-					</view>
-					
-				</view>
+
+			<!-- 巡检信息 -->
+			<view class="basic-info">
+				<view class="info-tit margin-left-xs">
+					<text class="cuIcon-titles margin-right-xs"></text>
+					巡检信息
+				</view>
+				<view class="info-content">
+					<view class="info-one-info ">
+						<text>巡检人员:</text>
+						<text>{{this.getData.name}}</text>
+					</view>
+
+					<view>
+						<text>联系方式:</text>
+						<text>{{this.getData.phone}}</text>
+					</view>
+					<view>
+						<text>巡检描述:</text>
+						<text>{{this.getData.rec_count}}</text>
+					</view>
+
+				</view>
 			</view>
 			<!-- 处理状态start -->
 			<view class="processStatus">
@@ -73,14 +72,15 @@
 					<text class="cuIcon-titles margin-right-xs"></text>
 					巡检图片
 				</view>
-				<view class="padding-lr padding-bottom-lg">
-					<image src="../../../static/record-detail-img.png" style="width:100%"></image>
+				<view class="padding-lr padding-bottom-lg"> 
+					<img v-if="!this.getData.report_photos&&this.getData" src="/static/defaultImg.jpg" style="width:100%"></img>
+					<img v-else :src="this.getData.report_photos" style="width:100%"></img>
 				</view>
 			</view>
 			<!-- 处理状态end -->
 		</view>
-
-		
+
+
 	</view>
 </template>
 
@@ -96,97 +96,37 @@
 				detailMessage: {},
 				detailMessage2: {},
 				msg: '',
-				msg2: '',
-				flag:false,
-				companyCode:0
+				msg2: '',
+				flag: false,
+				companyCode: 0,
+				getData: {}
 
 			}
 		},
 		onLoad: function(option) {
-			
-
+			this.goRecordDetail({
+				'company_code': uni.getStorageSync('selectedCode'),
+				"id": option.id
+			})
 		},
 		methods: {
-			async powerSubmitRes(params = {}) {
-				const res = await this.$myRequest({
-					url: 'IntegratedAlarm/setAlarmHandle',
-					data: params
-				})
-				
-			   if(res.data.flag){
-				  uni.showToast({
-				  	title: "提交成功",
-				  });
-			   }
-			   
-			   setTimeout(() => {
-			   	uni.navigateTo({
-			   		url: '/pages/processList/processList?companyCode=' + this.companyCode + '&type='+this.type+'',
-			   	});
-			   }, 1000);
-			 
-				
-			},
-			videoSubmit() {
-				if(!this.msg2){
-					uni.showToast({
-						title: "请输入处理内容",
-						icon:"none"
-					});
-				}else{
-					this.powerSubmitRes({
-						"alarmStatus": 0,
-						"type": 2,
-						"deviceCode": this.detailMessage2.deviceCode,
-						"companyCode": this.companyCode,
-						"id": this.detailMessage2.id,
-						"handlerContent": this.msg2
-					})
-					
-				}
-			
-				
-			},
-			videoMissSubmit() {
-				if(!this.msg2){
-					uni.showToast({
-						title: "请输入处理内容",
-						icon:"none"
-					});
-				}else{
-					this.powerSubmitRes({
-						"alarmStatus": 1,
-						"type": 2,
-						"deviceCode": this.detailMessage2.deviceCode,
-						"companyCode": this.companyCode,
-						"id": this.detailMessage2.id,
-						"handlerContent": this.msg2
-					})
-				}
-			},
 
-			submit() {
-				uni.makePhoneCall({
-					phoneNumber: '15122423833' //仅为示例
-				});
-			},
 
-			RadioChange(e) {
-				this.radio = e.detail.value
-			},
-			textareaAInput(e) {
-				this.textareaAValue = e.detail.value
+			// 巡检记录列详情数据请求
+			async goRecordDetail(params = {}) {
+				const res = await this.$myRequest({
+					url: 'Inspection/getInspectionRecordDetails',
+					data: params,
+					showLoading: true
+				})
+				this.getData = res.data.data[0];
+				console.log(this.getData);
 			},
-			// textarea
-			inputReason(e) {
-				this.reason = e.detail.value;
-			}
-
 
 		}
 	}
 </script>
 
 <style lang="scss">
-	
+
 </style>

BIN
static/defaultImg.jpg