Ming 4 роки тому
батько
коміт
2dc13b7ac7

+ 1 - 1
pages/accountManage/accountManage.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="padding" style="height:calc(100vh - 126rpx);overflow:auto;">
+	<view class="padding" style="height:calc(100vh - 240rpx);overflow:auto;">
 		<table>
 			<tr>
 				<th>人员名称</th>

+ 29 - 39
pages/unprocessDetail/unprocessDetail.vue

@@ -53,7 +53,8 @@
 						<view class="btn-area">
 							<button class="bg-orange round missReport margin-top" @click="alarmSubmit(1)">误 报
 							</button>
-							<button class="bg-blue round  missReport margin-top " @click="alarmSubmit(0)">非 误 报 </button>
+							<button class="bg-blue round  missReport margin-top " @click="alarmSubmit(0)">非 误 报
+							</button>
 						</view>
 					</form>
 				</view>
@@ -111,16 +112,6 @@
 					}, 1000);
 				}
 			},
-			
-			
-			//拼接公共搜索条件
-			// getSearchParamObj() {
-			//     let queryParam = {};
-			//     queryParam.id=this.getData.id;
-			//     return queryParam;
-				
-				
-			// },
 
 			alarmSubmit(query) {
 				if (!this.msg) {
@@ -131,46 +122,45 @@
 				} 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;
-
+					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;
+					alert(this.getData.dwtype)
 					if (this.getData.dwtype == 1) {
-						queryParam.data3=this.getData.data3;
-						queryParam.data5=this.getData.data5;
-						this.powerSubmitRes(queryParam)
+						queryParam.data3 = this.getData.data3;
+						queryParam.data5 = this.getData.data5;
+						this.powerSubmitRes(queryParam);
+						return;
+					}
+					if (this.getData.dwtype == 2) {
+						queryParam.data1 = this.getData.data1;
+						this.powerSubmitRes(queryParam);
+						return;
 					}
-					if (this.getData.dwtype == 2||this.getData.dwtype == 7) {
-						queryParam.data1=this.getData.data1;
-						this.powerSubmitRes(queryParam)
+					if (this.getData.dwtype == 7) {
+						queryParam.data1 = this.getData.data1;
+						this.powerSubmitRes(queryParam);
+						return;
 					}
 					if (this.getData.dwtype == 3) {
 						queryParam.data2=this.getData.data2;
-						this.powerSubmitRes(queryParam)
+						this.powerSubmitRes(queryParam);
+						return;
 					}
 					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)
+						this.powerSubmitRes(queryParam);
+						return;
 					}
-					if (this.getData.dwtype == 2) {
-						queryParam.data1=this.getData.data1;
-						this.powerSubmitRes(queryParam)
-					}
-
-					
-
+					this.powerSubmitRes(queryParam)
 				}
 			},
-			
+
 			RadioChange(e) {
 				this.radioOne = e.detail.value;
 				console.log(this.radioOne)

+ 29 - 21
pages/weiBao/plan/components/chart2.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="content">
-		<view @click="echarts.onClick" :prop="option" :change:prop="echarts.updateEcharts" id="echarts" class="echarts">
+		<view @click="echarts.onClick" :change:prop="echarts.updateEcharts" id="echarts" class="echarts">
 		</view>
 
 	</view>
@@ -9,26 +9,29 @@
 
 <script>
 	import echarts from 'static/echarts.min.js'
-	
-	var abcolor =  new echarts.graphic.LinearGradient(
-                                0, 1, 1, 0, [{
-                                        offset: 0,
-                                        color: '#FF1F48',
-                                    },
-									{
-									        offset: .4,
-									        color: '#D6FF1F',
-									    },
-                                    {
-                                        offset: 1,
-                                        color: '#1FFBFF',
-                                    }
-                                ]
-                            )
+
+	var abcolor = new echarts.graphic.LinearGradient(
+		0, 1, 1, 0, [{
+				offset: 0,
+				color: '#FF1F48',
+			},
+			{
+				offset: .4,
+				color: '#D6FF1F',
+			},
+			{
+				offset: 1,
+				color: '#1FFBFF',
+			}
+		]
+	)
 	export default {
 		name: 'chart',
 		props: {
-
+			bindData: {
+				type: Object,
+				default: ''
+			}
 		},
 		data() {
 			return {
@@ -42,7 +45,7 @@
 						//半径
 						radius: '95%',
 						detail: {
-							 formatter: '{value}%',
+							formatter: '{value}%',
 							color: '#FFC600',
 							fontSize: 30,
 							fontFamily: 'IMPACT',
@@ -50,7 +53,8 @@
 							offsetCenter: [0, '70%']
 						},
 						data: [{
-							value: 30,
+							value: parseInt(this.bindData.completion),
+							// value: '30',
 							name: '任务完成率'
 						}],
 
@@ -75,7 +79,7 @@
 						splitLine: {
 							show: false,
 						},
-						
+
 
 						axisLine: {
 							show: true,
@@ -97,6 +101,7 @@
 		},
 		onLoad() {
 
+
 		},
 		methods: {
 			changeOption() {
@@ -130,6 +135,9 @@
 		},
 		methods: {
 			initEcharts() {
+
+				console.log('this.bindData')
+				console.log(this.bindData)
 				myChart = echarts.init(document.getElementById('echarts'))
 				// 观测更新的数据在 view 层可以直接访问到
 				myChart.setOption(this.option)

+ 32 - 10
pages/weiBao/plan/plan.vue

@@ -4,7 +4,7 @@
 		<view class="bg-white plan-sec text-center" style="margin:0rpx 30rpx 30rpx 30rpx">
 			<view class="plan-tit padding-top-lg">任务名称:ui测试</view>
 			<br>
-			<chart2></chart2>
+			<chart2 :bindData="this.getData" v-if=" JSON.stringify(getData) != '{}'"></chart2>
 		</view>
 
 		<view class="margin bg-white plan-sec">
@@ -13,15 +13,15 @@
 				维保详情
 			</view>
 			<view class="cu-list menu-avatar">
-				<view class="cu-item deviceTypeItem" v-for="(item,index) in inspectList" :key="index"
+				<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==2">已执行</span>
+							<span class="error" v-if="item.data3==1">未执行</span>
 							<text class="icon iconfont margin-right-xs ">&#xe629;</text>
 						</view>
 					</view>
@@ -44,22 +44,44 @@
 		data() {
 			return {
 				inspectList: json.weiBaoPlan,
+				getData:{},
+				planList:[]
 
 			};
 		},
-		onLoad: function(option) {
-
+		onLoad:function(option){
+			this.getPlanList({'company_code':uni.getStorageSync('selectedCode')})
+		
 		},
 
 		methods: {
+			
+			// 维保计划列表数据请求
+			async getPlanList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'Maintenance/getMaintenanceList',
+					data:params,
+					showLoading: true
+				})
+				this.getData=res.data.data[0];
+				this.planList=this.getData.point;
+				console.log(this.planList)
+				
+			},
+			
+			
+			
 			goDetailPage(item) {
-				if (item.status) {
+				
+				if (item.data3==2) {
+					alert(1)
 					uni.navigateTo({
-						url: "/pages/weiBao/planDetail/planDetail"
+						url: "/pages/weiBao/planDetailDone/planDetailDone?id="+item.id+'&zb_id='+this.getData.id,
 					})
+					
 				} else {
 					uni.navigateTo({
-						url: "/pages/weiBao/planDetailDone/planDetailDone"
+						url: "/pages/weiBao/planDetail/planDetail?id="+item.id+'&zb_id='+this.getData.id,
 					})
 				}
 

+ 22 - 8
pages/weiBao/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 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>
@@ -33,11 +35,12 @@
 			return {
 				deviceManage: json.weiBaoRecord,
 				modalName: null,
+				getData:[]
 			};
 		},
 		
 		onLoad:function(option){
-			
+			this.goRecordList({'company_code':uni.getStorageSync('selectedCode')})
 		},
 		onNavigationBarButtonTap(e) {
 			console.log(e)
@@ -47,11 +50,22 @@
 			});
 		},
 		methods: {
+			
+			// 维保记录列表数据请求
+			async goRecordList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'Maintenance/getMaintenanceRecorList',
+					data:params,
+					showLoading: true
+				})
+				this.getData=res.data.data;
+				console.log(this.getData);
+			},
 		
 			// 页面跳转
 			goDetail(item) {
 				uni.navigateTo({
-					url: '/pages/weiBao/recordDetail/recordDetail',
+					url: '/pages/weiBao/recordDetail/recordDetail?id='+item.id,
 				});
 			},
 		}

+ 30 - 90
pages/weiBao/recordDetail/recordDetail.vue

@@ -1,8 +1,11 @@
 <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="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>
@@ -14,28 +17,28 @@
 				<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>维保点位01</text>
+						<text>{{this.getData.spot_name}}</text>
 					</view>
 					<view>
 						<text>点位地址:</text>
-						<text>市光四村221号楼</text>
+						<text>{{this.getData.spot_address}}</text>
 					</view>
 					<view>
 						<text>预期时间:</text>
-						<text>2019-05-28 16:12:45</text>
+						<text>{{this.getData.ywc_time}}</text>
 					</view>
 					<view>
 						<text>完成时间:</text>
-						<text>2019-05-28 18:00:00</text>
+						<text>{{this.getData.wc_time}}</text>
 					</view>
 				</view>
 			</view>
@@ -49,22 +52,17 @@
 				<view class="info-content">
 					<view class="info-one-info ">
 						<text>维保人员:</text>
-						<text>张三</text>
+						<text>{{this.getData.name}}</text>
 					</view>
 			
 					<view>
 						<text>联系方式:</text>
-						<text>16666666666</text>
+						<text>{{this.getData.phone}}</text>
 					</view>
 					<view>
 						<text>维保描述:</text>
-						<text>已维保</text>
+						<text>{{this.getData.rec_count}}</text>
 					</view>
-					<view>
-						<text>点位地址:</text>
-						<text>市光四村221号楼</text>
-					</view>
-					
 				</view>
 			</view>
 			<!-- 处理状态start -->
@@ -74,7 +72,8 @@
 					维保图片
 				</view>
 				<view class="padding-lr padding-bottom-lg">
-					<image src="../../../static/record-detail-img.png" style="width:100%"></image>
+					<img v-if="!this.getData.report_photos" src="/static/defaultImg.jpg" style="width:100%"></img>
+					<img v-else :src="this.getData.report_photos" style="width:100%"></img>
 				</view>
 			</view>
 			<!-- 处理状态end -->
@@ -98,89 +97,30 @@
 				msg: '',
 				msg2: '',
 				flag:false,
-				companyCode:0
+				companyCode:0,
+				
+				getData:{}
 
 			}
 		},
 		onLoad: function(option) {
-			
-
+			this.goRecordDetail({
+				'company_code': uni.getStorageSync('selectedCode'),
+				"id": option.id
+			})
 		},
 		methods: {
-			async powerSubmitRes(params = {}) {
+			// 维保记录列详情数据请求
+			async goRecordDetail(params = {}) {
 				const res = await this.$myRequest({
-					url: 'IntegratedAlarm/setAlarmHandle',
-					data: params
+					url: 'Maintenance/getMaintenanceRecordDetails',
+					data: params,
+					showLoading: true
 				})
-				
-			   if(res.data.flag){
-				  uni.showToast({
-				  	title: "提交成功",
-				  });
-			   }
-			   
-			   setTimeout(() => {
-			   	uni.navigateTo({
-			   		url: '/pages/processList/processList?companyCode=' + this.companyCode + '&type='+this.type+'',
-			   	});
-			   }, 1000);
-			 
-				
+				this.getData = res.data.data[0];
+				console.log(this.getData);
 			},
-			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
-			},
-			// textarea
-			inputReason(e) {
-				this.reason = e.detail.value;
-			}
 
 
 		}

+ 66 - 73
pages/xunJian/plan/plan.vue

@@ -1,94 +1,87 @@
-<template>
+<template>
 	<view>
-		<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 :bindData="this.getData" v-if=" JSON.stringify(getData) != '{}'"></chart>
-		</view>
-		
-		<view class="margin bg-white plan-sec">
-			<view class="info-tit margin-left-xs">
-				<text class="cuIcon-titles margin-right-xs"></text>
-				巡检详情
-			</view>
-			<view class="cu-list menu-avatar">
-				<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.spot_name}}</view>
-					</view>
-					<view class="nav-right num">
-						<view class="text-grey">
-							<span class="online" v-if="item.data3==2">已执行</span>
-							<span class="error" v-if="item.data3==1">未执行</span>
-							<text class="icon iconfont margin-right-xs ">&#xe629;</text>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-	
-	
+		<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 :bindData="this.getData" v-if=" JSON.stringify(getData) != '{}'"></chart>
+		</view>
+
+		<view class="margin bg-white plan-sec">
+			<view class="info-tit margin-left-xs">
+				<text class="cuIcon-titles margin-right-xs"></text>
+				巡检详情
+			</view>
+			<view class="cu-list menu-avatar">
+				<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.spot_name}}</view>
+					</view>
+					<view class="nav-right num">
+						<view class="text-grey">
+							<span class="online" v-if="item.data3==2">已执行</span>
+							<span class="error" v-if="item.data3==1">未执行</span>
+							<text class="icon iconfont margin-right-xs ">&#xe629;</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+
+
 </template>
 
-<script>
-	import chart from './components/chart.vue';
+<script>
+	import chart from './components/chart.vue';
 	import json from '../../../data/json.js';
-	export default {
-		components: {
-			chart
+	export default {
+		components: {
+			chart
 		},
 		data() {
-			return {
-			inspectList: json.xunJianPlan,
-			getData:{},
-			planList:[]
-
+			return {
+				inspectList: json.xunJianPlan,
+				getData: {},
+				planList: [],
 			};
-		},
-		onLoad:function(option){
-			this.getPlanList({'company_code':uni.getStorageSync('selectedCode')})
-
-		},
-		
+		},
+		onLoad: function(option) {
+			this.getPlanList({
+				'company_code': uni.getStorageSync('selectedCode')
+			})
+		},
+
 		methods: {
-			
 			// 巡检计划列表数据请求
 			async getPlanList(params = {}) {
 				const res = await this.$myRequest({
 					url: 'Inspection/getInspectionList',
-					data:params,
+					data: params,
 					showLoading: true
 				})
-				this.getData=res.data.data[0];
-				this.planList=this.getData.point
-				
+				this.getData = res.data.data[0];
+				this.planList = this.getData.point
 			},
-			
-			
-			goDetailPage(item){
-				if(item.data3==2){
-					uni.navigateTo({
-						
-						url:  "/pages/xunJian/planDetailDone/planDetailDone?id="+item.id,
-					})
-				}else{
-					uni.navigateTo({
-						url:  "/pages/xunJian/planDetail/planDetail?id="+item.id,
-					})
-				}
-				
-			}
-
+			goDetailPage(item) {
+				if (item.data3 == 2) {
+					uni.navigateTo({
+						url: "/pages/xunJian/planDetailDone/planDetailDone?id=" + item.id + '&zb_id=' + this
+							.getData.id,
+					})
+				} else {
+					uni.navigateTo({
+						url: "/pages/xunJian/planDetail/planDetail?id=" + item.id + '&zb_id=' + this.getData.id,
+					})
+				}
+			}
 		}
 
 	}
 </script>
 
-<style lang="scss">
-	page{
-		background-color:#F4F5F7;
-	}
-	
-	
+<style lang="scss">
+	page {
+		background-color: #F4F5F7;
+	}
 </style>

+ 5 - 3
pages/xunJian/planDetail/planDetail.vue

@@ -88,12 +88,14 @@
 				id: '',
 				reportName: '',
 				radioOne: 0,
+				zb_id:0
 
 			}
 		},
 
 		onLoad: function(option) {
 			this.id = option.id;
+			this.zb_id=option.zb_id
 
 		},
 
@@ -117,7 +119,7 @@
 			upFile(input, event) {
 				var _self = this;
 				uni.uploadFile({
-					url: 'https://wx.ewoogi.com/wx/USKYOF/USKYOF.php/Home/MonitoringReporting/setUpload',
+					url: 'https://qhome.usky.cn/USKYZHAF/USKYZHAF.php/Home/Inspection/setUpload',
 					files: [{
 						file: input.files[0],
 						uri: event.srcElement.value
@@ -159,8 +161,8 @@
 
 
 				this.powerSubmitRes({
-					// "zb_id": this.getData.id,  ??????
-					"zb_id":'6172484',
+					"zb_id": this.zb_id,
+					// "zb_id":600,
 					"spot_id": this.id,
 					"report_name": this.reportName,
 					"spot_abnormal": this.radioOne,

+ 1 - 1
pages/xunJian/record/record.vue

@@ -10,7 +10,7 @@
 					</view>
 					<view class="pro-des  ">
 						<view class="text-cut">
-							点位{{item.spot_name}}
+							点位{{item.spot_name}}
 						</view>
 					</view>
 					<view class="pro-date ">{{item.wc_time}}</view>