Ming 4 jaren geleden
bovenliggende
commit
d0ec12f189

+ 18 - 0
pages.json

@@ -621,6 +621,24 @@
             }
             
         }
+        ,{
+            "path" : "pages/xunJian/planInnerList/planInnerList",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "巡检详情列表",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/weiBao/planInnerList/planInnerList",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "维保详情列表",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	
 	

+ 34 - 56
pages/weiBao/plan/plan.vue

@@ -1,27 +1,25 @@
 <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>
-			<br>
-			<chart2 :bindData="this.getData" v-if=" JSON.stringify(getData) != '{}'"></chart2>
-		</view>
+		<!-- <view style="height:30rpx"></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=" bg-white plan-sec">
+			
 			<view class="cu-list menu-avatar">
-				<view class="cu-item deviceTypeItem" v-for="(item,index) in planList" :key="index"
-					@tap="goDetailPage(item)">
+				<view class="cu-item " v-for="(item,index) in getData" :key="index"
+					@tap="goInnerList(item)">
 					<view class="content" style="left:0!important;width:80%">
-						<view class="title">{{item.spot_name}}</view>
+						<view class="title">{{item.plan_name}}</view>
+						<view class="pro-des  ">
+							<view class="text-cut">
+								任务完成率:{{item.completion}}
+							</view>
+						</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>
+							<!-- <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>
@@ -34,66 +32,46 @@
 </template>
 
 <script>
-	import chart from './components/chart.vue';
-	import chart2 from './components/chart2.vue';
+
 	import json from '../../../data/json.js';
 	export default {
-		components: {
-			chart,chart2
-		},
+		
 		data() {
 			return {
-				inspectList: json.weiBaoPlan,
-				getData:{},
-				planList:[]
-
+				inspectList: json.xunJianPlan,
+				getData: {},
+				
 			};
 		},
-		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: 'Maintenance/getMaintenanceList',
-					data:params,
+					data: params,
 					showLoading: true
 				})
-				this.getData=res.data.data[0];
-				this.planList=this.getData.point;
-				console.log(this.planList)
-				
+				this.getData = res.data.data;
+				// this.planList = this.getData.point
 			},
-			
-			
-			
-			goDetailPage(item) {
-				
-				if (item.data3==2) {
-					alert(1)
-					uni.navigateTo({
-						url: "/pages/weiBao/planDetailDone/planDetailDone?id="+item.id+'&zb_id='+this.getData.id,
-					})
-					
-				} else {
-					uni.navigateTo({
-						url: "/pages/weiBao/planDetail/planDetail?id="+item.id+'&zb_id='+this.getData.id,
-					})
-				}
-
+			goInnerList(item) {
+				uni.navigateTo({
+					url: "/pages/weiBao/planInnerList/planInnerList?id=" + item.id ,
+				})
 			}
-
 		}
 
 	}
 </script>
 
 <style lang="scss">
-	page {
-		background-color: #F4F5F7;
-	}
+	// page {
+	// 	background-color: #F4F5F7;
+	// }
 </style>

+ 127 - 27
pages/weiBao/planDetail/planDetail.vue

@@ -1,16 +1,17 @@
 <template>
 	<view>
-		
-		<form action=""  >
-			<view style="height:30rpx"></view>
-			<view class="form-item ">
+
+		<form action="">
+			<view style='height:30rpx'></view>
+
+			<view class="form-item">
 				<view class="title">
 					<text class="necessary">*</text>
 					上报名称:
 				</view>
-				<input type="text">
+				<input type="text" v-model="reportName">
 			</view>
-			
+
 			<view class="form-item margin-top">
 				<view class="title">
 					<text class="necessary">*</text>
@@ -18,10 +19,10 @@
 				</view>
 				<radio-group name="gender" @change="radioChange">
 					<label class="margin-right-xs">
-						<radio value="2" checked /><text>正常</text>
+						<radio value="0" checked /><text>正常</text>
 					</label>
 					<label class="margin-right-xs">
-						<radio value="3" /><text>异常</text>
+						<radio value="1" /><text>异常</text>
 					</label>
 					<label class="margin-right-xs">
 						<radio value="2" /><text>故障</text>
@@ -30,20 +31,23 @@
 						<radio value="3" /><text>其他</text>
 					</label>
 				</radio-group>
-				
+
 			</view>
-			
+
 			<view class="form-item margin-top">
 				<view class="title">
 					<text class="necessary">*</text>
 					上传图片:
 				</view>
-				
+
 				<view style="width:500rpx">
-					<view class="cu-form-group">
+					<view ref="input" class="input">
+					</view>
+					<!-- <view class="cu-form-group">
 						<view class="grid col-4 grid-square flex-sub">
-							<view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" :data-url="imgList[index]">
-							 <image :src="imgList[index]" mode="aspectFill"></image>
+							<view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage"
+								:data-url="imgList[index]">
+								<image :src="imgList[index]" mode="aspectFill"></image>
 								<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
 									<text class='cuIcon-close'></text>
 								</view>
@@ -52,25 +56,25 @@
 								<text class='cuIcon-cameraadd'></text>
 							</view>
 						</view>
-					</view>
+					</view> -->
 				</view>
 			</view>
-			
+
 			<view class="form-item margin-top">
 				<view class="title">
 					<text class="necessary">*</text>
 					维保描述:
 				</view>
-				<textarea maxlength="-1"  @input="textareaAInput" placeholder="" width="250"></textarea>
+				<textarea maxlength="-1" @input="textareaAInput" placeholder="" v-model="msg" width="250"></textarea>
 			</view>
-		
+
 			<view class="btn-area submitBottomBtn padding-lr-sm">
 				<button class="bg-blue round  margin-top" @click="addSubmit">提 交 </button>
 			</view>
-			
+
 		</form>
 
-		
+
 	</view>
 </template>
 
@@ -78,17 +82,111 @@
 	export default {
 		data() {
 			return {
-				
 				imgList: [],
+				msg: '',
+				id: '',
+				reportName: '',
+				radioOne: 0,
+				zb_id:0
+
+			}
+		},
 
+		onLoad: function(option) {
+			this.id = option.id;
+			this.zb_id=option.zb_id
+		},
+
+		mounted() {
+			// 创建附件上传
+			var _self = this;
+			var input = document.createElement('input'); //创建元素
+			input.type = 'file' //添加file类型
+			input.onchange = (event) => {
+				_self.upFile(input, event)
 			}
+			this.$refs.input.$el.appendChild(input)
+
 		},
 		methods: {
 			radioChange(e) {
 				console.log('type:' + e.detail.value);
 				this.radioOne = e.detail.value;
 			},
-			
+
+			upFile(input, event) {
+				var _self = this;
+				uni.uploadFile({
+					url: 'https://qhome.usky.cn/USKYZHAF/USKYZHAF.php/Home/Inspection/setUpload',
+					files: [{
+						file: input.files[0],
+						uri: event.srcElement.value
+					}],
+					success: (uploadFileRes) => {
+						var data = JSON.parse(uploadFileRes.data)
+						this.img = data.img_url;
+						console.log(this.img)
+					},
+					fail: (err) => {
+
+						console.log(err)
+					}
+				});
+			},
+
+			addSubmit() {
+				if (!this.reportName) {
+					uni.showToast({
+						title: "请输入上报名称",
+						icon: "none"
+					});
+					return
+				}
+				if (!this.msg) {
+					uni.showToast({
+						title: "请输入维保描述",
+						icon: "none"
+					});
+					return
+				}
+				if (!this.img) {
+					uni.showToast({
+						title: "请上传图片",
+						icon: "none"
+					});
+					return
+				}
+
+
+				this.powerSubmitRes({
+					"zb_id": this.zb_id,
+					// "zb_id":600,
+					"spot_id": this.id,
+					"report_name": this.reportName,
+					"spot_abnormal": this.radioOne,
+					"img": this.img,
+					"dwsb_remarks": this.msg,
+				})
+
+			},
+			async powerSubmitRes(params = {}) {
+				const res = await this.$myRequest({
+					url: 'Maintenance/setMaintenance',
+					data: params
+				})
+				if (res.data.flag) {
+					uni.showToast({
+						title: "提交成功",
+					});
+					setTimeout(() => {
+						uni.navigateTo({
+							url: '/pages/weiBao/planInnerList/planInnerList?id=' + this.id,
+						});
+					}, 1000);
+				}
+			},
+
+
 			ChooseImage() {
 				uni.chooseImage({
 					count: 4, //默认9
@@ -103,7 +201,7 @@
 					}
 				});
 			},
-			
+
 			ViewImage(e) {
 				uni.previewImage({
 					urls: this.imgList,
@@ -123,14 +221,16 @@
 					}
 				})
 			},
-			
+			textareaAInput(e) {
+				this.textareaAValue = e.detail.value
+			},
+
 		}
 	}
 </script>
 
 <style lang="scss">
-	
 
-	
-</style>
 
+
+</style>

+ 0 - 0
pages/weiBao/plan/components/chart.vue → pages/weiBao/planInnerList/components/chart.vue


+ 0 - 0
pages/weiBao/plan/components/chart2.vue → pages/weiBao/planInnerList/components/chart2.vue


+ 95 - 0
pages/weiBao/planInnerList/planInnerList.vue

@@ -0,0 +1,95 @@
+<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>
+			<br>
+			<chart2 :bindData="this.getData" v-if=" JSON.stringify(getData) != '{}'"></chart2>
+		</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';
+	import chart2 from './components/chart2.vue';
+	import json from '../../../data/json.js';
+	export default {
+		components: {
+			chart,chart2
+		},
+		data() {
+			return {
+				inspectList: json.weiBaoPlan,
+				getData:{},
+				planList:[]
+
+			};
+		},
+		onLoad:function(option){
+			this.getPlanList({'company_code':uni.getStorageSync('selectedCode'),"id":option.id})
+		
+		},
+
+		methods: {
+			
+			// 维保计划列表数据请求
+			async getPlanList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'Maintenance/getMaintenanceDetails',
+					data:params,
+					showLoading: true
+				})
+				this.getData=res.data.data[0];
+				this.planList=this.getData.point;
+				console.log(this.planList)
+			},
+			
+			goDetailPage(item) {
+				if (item.data3==2) {
+					alert(1)
+					uni.navigateTo({
+						url: "/pages/weiBao/planDetailDone/planDetailDone?id="+item.id+'&zb_id='+this.getData.id,
+					})
+					
+				} else {
+					uni.navigateTo({
+						url: "/pages/weiBao/planDetail/planDetail?id="+item.id+'&zb_id='+this.getData.id,
+					})
+				}
+
+			}
+
+		}
+
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #F4F5F7;
+	}
+</style>

+ 24 - 36
pages/xunJian/plan/plan.vue

@@ -1,26 +1,25 @@
 <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 style="height:30rpx"></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=" bg-white plan-sec">
+			
 			<view class="cu-list menu-avatar">
-				<view class="cu-item deviceTypeItem" v-for="(item,index) in planList" :key="index"
-					@tap="goDetailPage(item)">
+				<view class="cu-item" v-for="(item,index) in getData" :key="index"
+					@tap="goInnerList(item)">
 					<view class="content" style="left:0!important;width:80%">
-						<view class="title">{{item.spot_name}}</view>
+						<view class="title">{{item.plan_name}}</view>
+						<view class="pro-des  ">
+							<view class="text-cut">
+								任务完成率:{{item.completion}}
+							</view>
+						</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>
+							<!-- <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>
@@ -33,17 +32,15 @@
 </template>
 
 <script>
-	import chart from './components/chart.vue';
+
 	import json from '../../../data/json.js';
 	export default {
-		components: {
-			chart
-		},
+		
 		data() {
 			return {
 				inspectList: json.xunJianPlan,
 				getData: {},
-				planList: [],
+				
 			};
 		},
 		onLoad: function(option) {
@@ -60,20 +57,13 @@
 					data: params,
 					showLoading: true
 				})
-				this.getData = res.data.data[0];
-				this.planList = this.getData.point
+				this.getData = res.data.data;
+				// this.planList = this.getData.point
 			},
-			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,
-					})
-				}
+			goInnerList(item) {
+				uni.navigateTo({
+					url: "/pages/xunJian/planInnerList/planInnerList?id=" + item.id ,
+				})
 			}
 		}
 
@@ -81,7 +71,5 @@
 </script>
 
 <style lang="scss">
-	page {
-		background-color: #F4F5F7;
-	}
+
 </style>

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

@@ -82,7 +82,6 @@
 	export default {
 		data() {
 			return {
-
 				imgList: [],
 				msg: '',
 				id: '',
@@ -96,7 +95,6 @@
 		onLoad: function(option) {
 			this.id = option.id;
 			this.zb_id=option.zb_id
-
 		},
 
 		mounted() {
@@ -182,7 +180,7 @@
 					});
 					setTimeout(() => {
 						uni.navigateTo({
-							url: '/pages/inspectList/processList/processList?type=' + this.type,
+							url: '/pages/xunJian/planInnerList/planInnerList?id=' + this.id,
 						});
 					}, 1000);
 				}

+ 169 - 169
pages/xunJian/plan/components/chart.vue → pages/xunJian/planInnerList/components/chart.vue

@@ -1,171 +1,171 @@
-<template>
-	<view class="content">
-		<view @click="echarts.onClick"  :change:prop="echarts.updateEcharts" id="echarts" class="echarts"></view>
-
-	</view>
-</template>
-
-<script>
-	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% 处的颜色
-					}]
-				},
-
-
-				myChart = echarts.init(document.getElementById('echarts'))
-				// 观测更新的数据在 view 层可以直接访问到
-				myChart.setOption({
-					title: {
-						text: '{name|' + datas.value + datas.company + '}\n{val|任务完成率}',
-						x: 'center',
-						y: 'center',
-						textStyle: {
-							rich: {
-								name: {
-									fontSize: 32,
-									fontWeight: 'normal',
+<template>
+	<view class="content">
+		<view @click="echarts.onClick"  :change:prop="echarts.updateEcharts" id="echarts" class="echarts"></view>
+
+	</view>
+</template>
+
+<script>
+	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% 处的颜色
+					}]
+				},
+
+
+				myChart = echarts.init(document.getElementById('echarts'))
+				// 观测更新的数据在 view 层可以直接访问到
+				myChart.setOption({
+					title: {
+						text: '{name|' + datas.value + datas.company + '}\n{val|任务完成率}',
+						x: 'center',
+						y: 'center',
+						textStyle: {
+							rich: {
+								name: {
+									fontSize: 32,
+									fontWeight: 'normal',
 									color: '#24F0E4',
-									fontFamily: 'IMPACT',
-
-									padding: [8, 0]
-								},
-								val: {
-									fontSize: 16,
-									color: '#333333',
-								}
-							}
-						}
-					},
-					color: ['#F4F5F7'],
-					legend: {
-						show: false,
-						data: []
-					},
-
-					series: [{
-						name: 'Line 1',
-						type: 'pie',
-						clockWise: true,
-						radius: ['64%', '80%'],
-						itemStyle: {
-							normal: {
-								label: {
-									show: false
-								},
-								labelLine: {
-									show: false
-								}
-							}
-						},
-						hoverAnimation: false,
-						data: [{
-							value: datas.value,
-							name: '',
-							itemStyle: {
-								normal: {
-									color: { // 完成的圆环的颜色
-										colorStops: datas.ringColor
-									},
-									label: {
-										show: false
-									},
-									labelLine: {
-										show: false
-									}
-								}
-							}
-						}, {
-							name: '',
-							value: 100 - datas.value
-						}]
-					}]
-				})
-			},
-			updateEcharts(newValue, oldValue, ownerInstance, instance) {
-				// 监听 service 层数据变更
-				myChart.setOption(newValue)
-			},
-			onClick(event, ownerInstance) {
-				// 调用 service 层的方法
-				ownerInstance.callMethod('onViewClick', {
-					test: 'test'
-				})
-			}
-		}
-	}
-</script>
-
-<style>
-	.content {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.echarts {
-		width: 100%;
-		height: 400rpx;
-
-	}
+									fontFamily: 'IMPACT',
+
+									padding: [8, 0]
+								},
+								val: {
+									fontSize: 16,
+									color: '#333333',
+								}
+							}
+						}
+					},
+					color: ['#F4F5F7'],
+					legend: {
+						show: false,
+						data: []
+					},
+
+					series: [{
+						name: 'Line 1',
+						type: 'pie',
+						clockWise: true,
+						radius: ['64%', '80%'],
+						itemStyle: {
+							normal: {
+								label: {
+									show: false
+								},
+								labelLine: {
+									show: false
+								}
+							}
+						},
+						hoverAnimation: false,
+						data: [{
+							value: datas.value,
+							name: '',
+							itemStyle: {
+								normal: {
+									color: { // 完成的圆环的颜色
+										colorStops: datas.ringColor
+									},
+									label: {
+										show: false
+									},
+									labelLine: {
+										show: false
+									}
+								}
+							}
+						}, {
+							name: '',
+							value: 100 - datas.value
+						}]
+					}]
+				})
+			},
+			updateEcharts(newValue, oldValue, ownerInstance, instance) {
+				// 监听 service 层数据变更
+				myChart.setOption(newValue)
+			},
+			onClick(event, ownerInstance) {
+				// 调用 service 层的方法
+				ownerInstance.callMethod('onViewClick', {
+					test: 'test'
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+	.content {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.echarts {
+		width: 100%;
+		height: 400rpx;
+
+	}
 </style>

+ 88 - 0
pages/xunJian/planInnerList/planInnerList.vue

@@ -0,0 +1,88 @@
+<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>
+
+
+</template>
+
+<script>
+	import chart from './components/chart.vue';
+	import json from '../../../data/json.js';
+	export default {
+		components: {
+			chart
+		},
+		data() {
+			return {
+				inspectList: json.xunJianPlan,
+				getData: {},
+				planList: [],
+			};
+		},
+		onLoad: function(option) {
+			this.getPlanList({
+				'company_code': uni.getStorageSync('selectedCode'),
+				"id":option.id
+			})
+		},
+
+		methods: {
+			// 巡检计划列表数据请求
+			async getPlanList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'Inspection/getInspectionDetails',
+					data: params,
+					showLoading: true
+				})
+				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 + '&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>