ソースを参照

问题上报,处理

zhengkaixin 1 ヶ月 前
コミット
061bb0fff1

+ 20 - 0
apis/pagejs/pagejsIndex.js

@@ -0,0 +1,20 @@
+import request from '@/apis/utils/request'
+
+
+export function errList(data) {
+	var url='/mobile/floorlockError/errList';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function floorStatus(data) {
+	var url='/mobile/inspection/floorStatus';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}

+ 55 - 0
apis/pagejs/pagesTask.js

@@ -0,0 +1,55 @@
+
+
+import request from '@/apis/utils/request'
+
+
+export function findFloorLock(data) {
+	var url='/mobile/floorlock/findFloorLock';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+
+
+export function addErr(data) {
+	var url='/mobile/floorlockError/addErr';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+
+
+export function errDetails(data) {
+	var url='/mobile/floorlockError/errDetails';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function updateErr(data) {
+	var url='/mobile/floorlockError/updateErr';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+
+export function findByCatalogName(data) {
+	var url='/mobile/dataDictionary/findByCatalogName';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+

BIN
assets/img/daohuang.png


+ 7 - 0
pages.json

@@ -160,6 +160,13 @@
 			{
 				"navigationBarTitleText" : ""
 			}
+		},
+		{
+			"path" : "pages/task/selectLock",
+			"style" : 
+			{
+				"navigationBarTitleText" : ""
+			}
 		}
 	],
 

+ 206 - 105
pages/index/index.vue

@@ -72,12 +72,16 @@
 				<view class="pie">
 					<view id="body1pie1" class="body1pie">
 
+					</view>
+					<view  class="body2pie">
+						<view class="v1">{{datafloorStatus.totalNum}}</view>
+						<view class="v2">地锁:套</view>
 					</view>
 				</view>
 				<view class="item-list">
 					<view class="item-status">
 						<view class="num">
-							160
+							{{datafloorStatus.normalNum}}
 						</view>
 						<view class="statusN">
 							<view class="statusC status1">
@@ -90,7 +94,7 @@
 					</view>
 					<view class="item-status">
 						<view class="num">
-							160
+							{{datafloorStatus.errorNum}}
 						</view>
 						<view class="statusN">
 							<view class="statusC status2">
@@ -104,7 +108,7 @@
 					</view>
 					<view class="item-status">
 						<view class="num">
-							160
+							{{datafloorStatus.loseNum}}
 						</view>
 						<view class="statusN">
 							<view class="statusC status3">
@@ -116,9 +120,9 @@
 							</view>
 						</view>
 					</view>
-					<view class="item-status">
+					<view class="item-status" >
 						<view class="num">
-							160
+							0
 						</view>
 						<view class="statusN">
 							<view class="statusC status4">
@@ -144,95 +148,50 @@
 					查看详情
 					<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
 				</view>
-			</view>
-			<view class="list">
-				<view class="item">
-					<view class="icon">
-						<image class="img" src="@/assets/img/taskstatus/status1.png" mode=""></image>
-					</view>
-					<view class="body">
-						<view class="line1">
-							<view class="title">
-								杆位异常
-
-							</view>
-							<view class="status status1">
-								未认领
-
-							</view>
-						</view>
-						<view class="line2">
-							<view class="value">
-								2025-02-14 09:00:01
-
-							</view>
-							<view class="value">
-								荆鹏软件园
-
-							</view>
-						</view>
-
-					</view>
-					<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
-				</view>
-				<view class="item">
-					<view class="icon">
-						<image class="img" src="@/assets/img/taskstatus/status2.png" mode=""></image>
-					</view>
-					<view class="body">
-						<view class="line1">
-							<view class="title">
-								杆位异常
-
-							</view>
-							<view class="status status2">
-								已认领
-
-							</view>
-						</view>
-						<view class="line2">
-							<view class="value">
-								2025-02-14 09:00:01
-
-							</view>
-							<view class="value">
-								荆鹏软件园
-
-							</view>
-						</view>
-
-					</view>
-					<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
-				</view>
-				<view class="item">
-					<view class="icon">
-						<image class="img" src="@/assets/img/taskstatus/status3.png" mode=""></image>
+			</view>
+			 
+			<view class="list"  >
+				<view class="item" 
+				 v-for="(item,index) in dataerrList" 
+				 @click="gotoUrl('/pages/task/maintenanceTaks?id='+item.id)"
+				 :key="index">
+					<view class="icon">
+						
+						<image class="img" v-if="item.errorCodeImage" :src="item.errorCodeImage" mode=""></image>
+						
+						<image class="img" v-else src="@/assets/img/taskstatus/status3.png" mode=""></image>
 					</view>
 					<view class="body">
 						<view class="line1">
 							<view class="title">
-								杆位异常
+								{{item.errorCodeText}}
 
 							</view>
-							<view class="status status3">
-								已处理
+							<view class="status " :class="'status'+item.status">
+								{{item.statusN}}
 
 							</view>
-						</view>
+						</view>
+						
 						<view class="line2">
 							<view class="value">
-								2025-02-14 09:00:01
+								{{item.createTime}}
 
 							</view>
 							<view class="value">
-								荆鹏软件园
+								{{item.parkingName}} 
 
 							</view>
+						</view>
+						<view class="errorDesc" v-if="item.errorDesc">
+							描述:{{item.errorDesc}}
+							
 						</view>
 
 					</view>
 					<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
 				</view>
+			
 			</view>
 
 		</view>
@@ -247,8 +206,8 @@
 </template>
 
 <script>
-	import * as API from '@/apis/pagejs/index.js'
-
+	import * as API from '@/apis/pagejs/pagejsIndex.js'
+	
 	import * as echarts from 'echarts';
 	import Tabbar from '@/components/Tabbar.vue'
 
@@ -260,16 +219,75 @@
 		},
 		data() {
 			return {
-				echartsList: {},
+				echartsList: {},
+				isReadyfloorStatus:false,
+				datafloorStatus:{},
+				
+				isReadyerrList:false,
+				dataerrList:[],
 			};
 		},
 		onLoad() {
 
+		},
+		onShow() {
+			
+			if(this.isReadyfloorStatus){
+				this.getfloorStatus()
+			}
+			if(this.isReadyerrList){
+				this.geterrList()
+			}
+			
 		},
-		onReady() {
-			this.getbody1pie1()
+		onReady() {
+			this.geterrList()
+			this.getfloorStatus()
+			//this.getbody1pie1()
 		},
-		methods: {
+		methods: {
+			geterrList(){
+				
+				API.errList({
+					pageIndex:1,
+					pageIndex:5,
+				}).then((response) => {
+					this.dataerrList=response.data.data
+					this.isReadyerrList=true
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				
+				})
+			},
+			getfloorStatus(){
+				
+				API.floorStatus().then((response) => {
+					var obj=response.data;
+					var sz=['totalNum','normalNum','errorNum','loseNum']
+					var bl=false
+					for(var i in sz){
+						if(obj[sz[i]]!=this.datafloorStatus[sz[i]]){
+							bl=true
+							this.datafloorStatus=obj
+						}
+					}
+					
+					this.isReadyfloorStatus=true
+					if(bl){
+						this.getbody1pie1()
+					}
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				
+				})
+			},
 			getbody1pie1() {
 				var key = "body1pie1"
 				var myChart = this.echartsList[key];
@@ -282,25 +300,31 @@
 				}
 				myChart.clear()
 				var option = {
-
+				  
 					series: [{
 						silent: true,
 						type: 'pie',
-						radius: ['70%', '100%'],
+						radius: ['80%', '100%'],
 						label: {
 							show: false,
 						},
 
 						data: [{
-								value: 99,
+								value: this.datafloorStatus.normalNum,
 								itemStyle: {
-									color: '#AAAAAA'
+									color: 'rgba(0, 185, 98, 1)'
 								}
-							},
+							},
+							{
+									value: this.datafloorStatus.loseNum,
+									itemStyle: {
+										color: 'rgba(153, 153, 153, 1)'
+									}
+								},
 							{
-								value: 88,
+								value: this.datafloorStatus.errorNum,
 								itemStyle: {
-									color: '#53B56B'
+									color: 'rgba(255, 123, 0, 1)'
 								}
 							}
 						]
@@ -314,13 +338,18 @@
 					},
 
 				}
-				myChart.setOption(option);
+				myChart.setOption(option);
+				console.log(option)
 				this.echartsList[key] = myChart;
 			}
 		}
 	}
 </script>
-
+<style>
+	page{
+	/* 	background-color: #FFFFFF; */
+	}
+</style>
 <style lang="scss">
 	.back-blue {
 		height: 0px;
@@ -427,7 +456,23 @@
 	.main_statuspanel {
 		margin-top: 24rpx;
 		padding: 24rpx;
-
+		.body2pie{
+			    position: relative;
+			    top: -140rpx;
+			    height: 0px;
+			    left: 0px;
+				width: 176rpx;
+				text-align: center;
+				.v1{
+					color: rgba(16,16,16,1);
+					font-size: 48rpx;
+					font-weight: bold;
+				}
+				.v2{
+					color: rgba(119,119,119,1);
+					font-size: 24rpx;
+				}
+		}
 		.body {
 			display: flex;
 			padding: 24rpx;
@@ -483,15 +528,55 @@
 	.main_list1 {
 		margin-top: 24rpx;
 		padding: 24rpx;
-
+		
+		.list-body{
+			padding: 24rpx 0;
+			.item {
+				border-bottom: 1px solid rgba(232, 232, 232, 1);
+			}
+			.title {
+				display: flex;
+				    justify-content: space-between;
+					.name{
+						color: rgba(51,51,51,1);
+						font-size: 32rpx;
+						font-weight: bold;
+					}
+					.status{
+						
+					}
+					.statusN1{
+						
+					}
+					.statusN2{
+						
+					}
+					.statusN3{
+						
+					}
+			}
+			.body{
+				    display: flex;
+					color: rgba(51,51,51,1);
+					font-size: 28rpx;
+				.name{
+					width: 150rpx;
+				}
+				.value{
+					
+				}
+			}
+		}
+		
+		
 		.list {
 			padding: 24rpx 0;
 
 			.item {
 				display: flex;
 				border-bottom: 1px solid rgba(232, 232, 232, 1);
-				padding: 6rpx 0;
-				margin: 6rpx 0;
+				padding: 12rpx 0;
+				margin: 12rpx 0;
 
 				.img {
 					width: 72rpx;
@@ -511,42 +596,58 @@
 					}
 					.line2 {
 						color: rgba(119,119,119,1);
-						font-size: 24rpx;
+						font-size: 24rpx;
+						margin-top: 8rpx;
 					}
 					.line1 {
 						.title {
 							color: rgba(51, 51, 51, 1);
-							font-size: 28rpx;
+							font-size: 28rpx;
+							font-weight: bold;
 						}
 
 						.status {
-							border: 1px solid rgba(255, 61, 0, 1);
+							background-color:  rgba(255, 61, 0, 1);
 							font-size: 24rpx;
-
+							color:#fff;
 							padding: 2rpx 8rpx;
-							border-radius: 4px;
+							//border-radius: 4px;
 
 						}
-
+						
+						.status0 {
+							background-color:  rgba(255, 61, 0, 1);
+							
+						}
 						.status1 {
-							border: 1px solid #007aff;
-							color: #007aff;
+							background-color:  #007aff;
+							
 						}
 
 						.status2 {
-							border: 1px solid #ff9900;
-							color: #ff9900;
+							background-color:  #ff9900;
+							
 						}
 
 						.status3 {
-							border: 1px solid #19be6b;
-							color: #19be6b;
+							background-color:  #19be6b;
+							
 						}
 
 						.status4 {
 							border: 1px solid rgba(255, 61, 0, 1);
 							color: rgba(255, 61, 0, 1);
 						}
+					}
+					
+					.errorDesc{
+						margin: 8rpx 0;
+						 width: 480rpx;
+						     color: #777777;
+						     font-size: 24rpx;
+						 overflow: hidden;
+						    text-overflow: ellipsis;
+						    white-space: nowrap; /* 禁止换行,强制单行 */
 					}
 				}
 			}

+ 189 - 35
pages/task/addTask.vue

@@ -1,20 +1,16 @@
 <template>
 	<view  class="jpmain  " >
 			<u-navbar  title="故障上报" title-color="#101010"></u-navbar>
-			<u-picker mode="selector"
-			 v-model="isswitchshow" 
-			 :range="columns" range-key="label"
-			  :default-selector="columnsindex"
-			   @confirm="switchBtn" ></u-picker>
+			
 			<view class="list" >
 				<view class="item"  >
 					<view class="name">
 						<span>*</span>选择地锁
 				
 					</view>
-					<view class="value" @click="isswitchshowBtn">
-						<view :style="taskInfo.parkingIdN?'':'color:#BBB'"
-						>{{taskInfo.parkingIdN?taskInfo.parkingIdN:'请选择所属停车场'}}</view>
+					<view class="value"  @click="gotoSelectLock()">
+						<view :style="taskInfo.lockId?'':'color:#BBB'"
+						>{{taskInfo.lockId?lockName:'选择需要上报的地锁'}}</view>
 						<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
 					</view>
 				</view>
@@ -24,37 +20,21 @@
 				
 					</view>
 					<view class="value">
-						123123123
-					</view>
-				</view>
-				<view class="item">
-					<view class="name">
-						负责人
-				
-					</view>
-					<view class="value">
-						11111111
-					</view>
-				</view>
-				<view class="item">
-					<view class="name">
-						联系电话
-				
-					</view>
-					<view class="value" style=" color:#1677FF;">
-						123123123
+						<view :style="taskInfo.lockId?'':'color:#BBB'"
+						>{{taskInfo.lockId?lockNo:'选择需要上报的地锁'}}</view>
 					</view>
 				</view>
+				 
 			</view>
 			<view class="list" >
 				<view class="item"  >
 					<view class="name">
-						<span>*</span>选择地锁
+						<span>*</span>故障类型
 				
 					</view>
-					<view class="value" @click="isswitchshowBtn">
-						<view :style="taskInfo.parkingIdN?'':'color:#BBB'"
-						>{{taskInfo.parkingIdN?taskInfo.parkingIdN:'请选择所属停车场'}}</view>
+					<view class="value" @click="selectTaskInfoCodeBtn">
+						<view :style="taskInfo.code?'':'color:#BBB'"
+						>{{taskInfo.code?codeN:'请选择故障类型'}}</view>
 						<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
 					</view>
 				</view>
@@ -64,7 +44,9 @@
 				
 					</view>
 					<view class="value" >
-						<textarea placeholder="请简单描述处理内容" class="textarea"></textarea>
+						<textarea placeholder="请简单描述处理内容" 
+						v-model="taskInfo.desc" placeholder-class="textareaclass"
+						class="textarea"></textarea>
 					</view>
 				</view>
 				<view class="item item-plus"  >
@@ -73,10 +55,17 @@
 				
 					</view>
 					<view class="value" >
-						<u-upload></u-upload>
+						<u-upload name="photoFile"
+								ref="uUpload"
+								 :form-data="formData" :header="header" :action="action"
+								  :file-list="listPic" ></u-upload>
 					</view>
 				</view>
 			</view>
+			
+			<u-select v-model="selectTaskInfoCode"  :default-value="selectTaskInfoCodeValue"
+			value-name="value" label-name="name" @confirm="selectTaskInfoCodeConfirm"
+			:list="codeList"></u-select>
 			
 			<view class="floating-button">
 				<view class="button"  @click="submit" >
@@ -89,11 +78,172 @@
 </template>
 
 <script>
+	import * as API from '@/apis/pagejs/pagesTask.js'
+	
 	export default {
 		data() {
 			return {
-				taskInfo:{}
+				listPic: [],
+				action:"",
+				formData:{
+					
+				},
+				header:{
+					
+				},
+				codeN:"",
+				selectTaskInfoCode:false,
+				selectTaskInfoCodeValue:[0],
+				lockNo:"",
+				lockName:"",
+				
+				taskInfo:{
+					lockId:"",
+					code:"",
+					desc:"",
+					images:"",
+					
+				},
+				codeList:[]
 			};
+		},
+		onLoad() {
+			this.action=process.jphelp.BASE_URL+"uploadPicture"
+			this.formData.subFolder="/floorlock/inspection/addTask"
+			var token=this.jphelp.getToken()
+			
+			this.header={
+					
+				'Authorization':token
+			}
+			this.findByCatalogName({
+				catalogName:'设备故障类型'
+			},"codeList")
+		},
+		methods:{
+			submit(){
+				if(!this.taskInfo.lockId){
+					uni.showToast({
+						title:"选择需要上报的地锁"
+					})
+					 return
+				}
+				if(!this.taskInfo.code){
+					uni.showToast({
+						title:"请选择故障类型"
+					})
+					 return
+				}
+				
+				let files = [];
+				// 通过filter,筛选出上传进度为100的文件(因为某些上传失败的文件,进度值不为100,这个是可选的操作)
+				files = this.$refs.uUpload.lists.filter(val => {
+					return val.progress == 100;
+				})
+				// 如果您不需要进行太多的处理,直接如下即可
+					// files = this.$refs.uUpload.lists;
+				
+				//(files);
+					
+				var imgUrl=files.map(item=>{
+					return item.response.data;
+				})
+				//(imgUrl);
+				this.taskInfo.images = imgUrl.join(',');
+				
+				
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				API.addErr(this.taskInfo).then((res) => {
+					
+					uni.showModal({
+						title: '提示',
+						showCancel: false,
+						content: "上报成功",
+						success: res1 => {
+							if (res1.confirm) {
+								uni.navigateBack()
+							} else if (res1.cancel) {
+								//('用户点击取消');
+							}
+						}
+					})
+				
+					uni.hideLoading();
+				
+				}).catch(error => {
+				
+					uni.hideLoading();
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+				
+				
+			},
+			findByCatalogName(obj,listName){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				API.findByCatalogName(obj).then((res) => {
+					
+					var arr = res.data.dataDictionaryList
+					
+					this[listName] = arr
+				
+					uni.hideLoading();
+				
+				}).catch(error => {
+				
+					uni.hideLoading();
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+				
+			},
+			
+			selectTaskInfoCodeConfirm(e){
+				console.log(e)
+				this.codeN=e[0].label
+				this.taskInfo.code=e[0].value
+			},
+			selectTaskInfoCodeBtn(){
+				if(this.taskInfo.code){
+					//this.selectTaskInfoCodeValue=[parseInt(this.bindInfo.type)-1]
+					var i =this.codeList.findIndex(item=>{
+						return item.value==this.taskInfo.code
+					})
+					this.selectTaskInfoCodeValue=[i]
+				}
+				this.selectTaskInfoCode=true;
+			},
+			gotoSelectLock(){
+				uni.navigateTo({
+				  url: '/pages/task/selectLock',
+				  events: {
+				    // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
+				    acceptDataFromOpenerPage: (item)=>{
+						console.log(item)
+						this.taskInfo.lockId=item.item.id
+						this.lockName=item.item.name
+						this.lockNo=item.item.lockNo
+						this.$forceUpdate()
+						
+				    },
+				 
+				  }
+				 
+				})
+			}
 		}
 	}
 </script>
@@ -108,7 +258,7 @@
 		  border-bottom:1px solid rgba(232,232,232,1);
 		}
 		.item{
-			padding: 32rpx;
+			padding: 24rpx;
 			display: flex;
 			    justify-content: space-between;
 			.name{
@@ -175,4 +325,8 @@
 					font-size: 36rpx;
 			}
 	}
+	
+	.textareaclass{
+		padding:16rpx
+	}
 </style>

+ 361 - 52
pages/task/maintenanceTaks.vue

@@ -1,77 +1,386 @@
 <template>
-	<view>
-		<u-navbar  title="维修结果" title-color="#101010"></u-navbar>
-		<view class="list" >
-			
-			<view class="item">
-				<view class="name">
-					地锁编号
+	<view  class="jpmain  " >
+			<u-navbar  title="维修结果" title-color="#101010"></u-navbar>
+			<view class="list" >
+				<view class="item">
+					<view class="name">
+						问题类型
+				
+					</view>
+					<view class="value">
+						{{floorlockErrorRecord.errorCodeText}}
+						
+					</view>
+				</view>
+				<view class="item item-plus">
+					
+					<view class="value">
+						{{floorlockErrorRecord.errorDesc}}
+						
+					</view>
+				</view>
+				<view class="item item-plus">
+					
+					<view class="value" style="display: block;">
+						<img  class="viewImg" v-for="(item,i) in imgList" :key="i"
+						 :src="item" mode=""></img>
+						
+					</view>
+				</view>
+				
+				
+			</view>
+			
 			
+			<view class="list" >
+				<view class="item">
+					<view class="name">
+						地锁编号
+				
+					</view>
+					<view class="value">
+						{{floorlockInfo.lockNo}}
+						<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
+					</view>
 				</view>
-				<view class="value">
-					123123123
+				<view class="item">
+					<view class="name">
+						地锁名称
+				
+					</view>
+					<view class="value">
+						{{floorlockInfo.name}}
+					</view>
+				</view>
+				
+				<view class="item">
+					<view class="name">
+						所属停车场
+				
+					</view>
+					<view class="value" @click="navigate">
+						<view>{{parkingInfo.name}}</view>
+						<image class="img" v-if="parkingInfo.latitude&&parkingInfo.longitude"
+						 src="@/assets/img/daohuang.png" mode=""></image>
+						
+					</view>
+				</view>
+				<view class="item" v-if="parkingInfo.address">
+					<view class="name">
+						详细地址
+				
+					</view>
+					<view class="value">
+						{{parkingInfo.address}}
+					</view>
 				</view>
+				
 			</view>
-			<view class="item">
-				<view class="name">
-					负责人
-			
+			<view class="list" >
+				
+				<view class="item item-plus"  >
+					<view class="name">
+						问题描述
+				
+					</view>
+					<view class="value" >
+						<textarea placeholder="请简单描述处理内容" 
+						placeholder-class="textareaclass"
+						v-model="taskInfo.desc"
+						class="textarea"></textarea>
+					</view>
 				</view>
-				<view class="value">
-					11111111
+				<view class="item item-plus"  >
+					<view class="name">
+						上传图片
+				
+					</view>
+					<view class="value" >
+						<u-upload name="photoFile"
+								ref="uUpload"
+								 :form-data="formData" :header="header" :action="action"
+								  :file-list="listPic" ></u-upload>
+					</view>
 				</view>
 			</view>
-			<view class="item">
-				<view class="name">
-					联系电话
+			
 			
+			<view class="floating-button">
+				<view class="button"  @click="submit" >
+					
+					提交
 				</view>
-				<view class="value" style=" color:#1677FF;">
-					123123123
-				</view>
-			</view>
-		</view>
-		<view class="list" >
-		<view class="item item-plus"  >
-			<view class="name">
-				问题描述
-		
-			</view>
-			<view class="value" >
-				<textarea placeholder="请简单描述处理内容" class="textarea"></textarea>
-			</view>
-		</view>
-		<view class="item item-plus"  >
-			<view class="name">
-				上传图片
-		
-			</view>
-			<view class="value" >
-				<u-upload></u-upload>
-			</view>
-		</view>
-		</view>
-		
-		<view class="floating-button">
-			<view class="button"  @click="submit" >
 				
-				提交
-			</view>
-			
-		</view>
+			</view>
 	</view>
 </template>
 
 <script>
+	import * as API from '@/apis/pagejs/pagesTask.js'
+	import * as WxJsApi from '@/apis/utils/wxJsApi.js'
+	
 	export default {
 		data() {
 			return {
+				listPic: [],
+				action:"",
+				formData:{
+					
+				},
+				header:{
+					
+				},
+				codeN:"",
+				selectTaskInfoCode:false,
+				selectTaskInfoCodeValue:[0],
+				lockNo:"",
+				lockName:"",
 				
+				floorlockInfo:{},
+				floorlockErrorRecord:{},
+				parkingInfo:{},
+				taskInfo:{
+					id:"",
+					desc:"",
+					images:"",
+					
+				},
+				codeList:[],
+				id:"",
+				imgList:[],
 			};
+		},
+		onLoad(op) {
+			this.action=process.jphelp.BASE_URL+"uploadPicture"
+			this.formData.subFolder="/floorlock/inspection/updateErr"
+			var token=this.jphelp.getToken()
+			
+			this.id=op.id
+			this.errDetails()
+			
+			
+		},
+		onReady() {
+			WxJsApi.getWxConfig([ 'openLocation']).then((res) => {
+				// //(res)
+			}).catch(error => {
+				//(res)
+			})
+		},
+		methods:{
+			previewImage(img) {
+				let imgs = [];
+				imgs.push(img);
+				uni.previewImage({
+					urls: imgs,
+					current: 0
+				})
+			},
+			navigate() {
+				var item=this.parkingInfo
+				if(!(this.parkingInfo.latitude&&this.parkingInfo.longitude)){
+					return
+				}
+				//console.log(item)
+				uni.showLoading({
+			
+				})
+				WxJsApi.openLocation({
+					latitude: parseFloat(item.latitude), //目的地latitude
+					longitude: parseFloat(item.longitude), //目的地longitude
+					name: item.name,
+					address: item.address,
+					scale: 15, //地图缩放大小,可根据情况具体调整
+					success(res) {
+						uni.hideLoading()
+					},
+					complete() {
+						//	uni.hideLoading()
+					}
+				});
+				// //('station'+JSON.stringify(_self.stationDetail.station))
+				// window.location.href = "https://uri.amap.com/marker?position=" + _self.stationDetail.station.longitude +
+				// 	"," + _self.stationDetail.station.latitude + "&name=" + _self.stationDetail.station.name;
+			
+			},
+			errDetails(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				API.errDetails({
+					id:this.id
+				}).then((res) => {
+					this.floorlockErrorRecord=res.data.floorlockErrorRecord
+					this.floorlockInfo=res.data.floorlockInfo
+					this.parkingInfo=res.data.parkingInfo
+					if(this.floorlockErrorRecord.errorImage){
+						this.imgList=this.floorlockErrorRecord.errorImage.split(',')
+					}
+					
+					uni.hideLoading();
+				
+				}).catch(error => {
+				
+					uni.hideLoading();
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			submit(){
+				if(!this.taskInfo.lockId){
+					uni.showToast({
+						title:"选择需要上报的地锁"
+					})
+					 return
+				}
+				if(!this.taskInfo.code){
+					uni.showToast({
+						title:"请选择故障类型"
+					})
+					 return
+				}
+				
+				let files = [];
+				// 通过filter,筛选出上传进度为100的文件(因为某些上传失败的文件,进度值不为100,这个是可选的操作)
+				files = this.$refs.uUpload.lists.filter(val => {
+					return val.progress == 100;
+				})
+				// 如果您不需要进行太多的处理,直接如下即可
+					// files = this.$refs.uUpload.lists;
+				
+				//(files);
+					
+				var imgUrl=files.map(item=>{
+					return item.response.data;
+				})
+				//(imgUrl);
+				this.taskInfo.images = imgUrl.join(',');
+				
+				
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				API.errDetails(this.taskInfo).then((res) => {
+					
+					uni.showModal({
+						title: '提示',
+						showCancel: false,
+						content: "上报成功",
+						success: res1 => {
+							if (res1.confirm) {
+								uni.navigateBack()
+							} else if (res1.cancel) {
+								//('用户点击取消');
+							}
+						}
+					})
+				
+					uni.hideLoading();
+				
+				}).catch(error => {
+				
+					uni.hideLoading();
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+				
+				
+			},
+			
 		}
 	}
 </script>
 
-<style lang="scss">
-
+<style lang="scss">
+	.jpmain{padding-bottom: 120rpx;}
+.list{
+		background-color: rgba(255,255,255,1);
+		
+		margin: 20rpx 0;
+		.item:not(:last-child) {
+		  border-bottom:1px solid rgba(232,232,232,1);
+		}
+		.item{
+			padding: 24rpx;
+			display: flex;
+			    justify-content: space-between;
+			.name{
+				    width: 40%;
+					font-size: 32rpx;
+					color: #777777;
+					span{
+						color:red
+					}
+					white-space: pre;
+			}
+			.value{
+				font-size: 32rpx;
+				    width: 60%;
+				display: flex;
+				    justify-content: space-between;
+					input::placeholder{
+						color:#AAAAAA;
+					}
+					.img{
+						width: 40rpx;
+						height: 40rpx;
+						
+					}
+					.textarea{
+						background-color: rgba(241,242,245,1);
+						width: 100%;
+						border-radius: 4px;
+					}
+					
+			}
+		}
+		.item-plus{
+			flex-direction: column;
+			.value,.name{
+				   width: 100%;
+			}
+			.name{
+				    padding-bottom: 32rpx;
+			}
+		}
+	}
+	.textareaclass{
+		padding:16rpx
+	}
+	.floating-button {
+		position: fixed; 
+		  bottom: 0;    /* 距离底部 20px */
+		    width: 100%;
+			 display: flex;
+			  height: 120rpx;
+			    justify-content: center;
+			background-color: rgba(255,255,255,1);
+			.button{
+				margin-top: 24rpx;
+				border-radius: 50px;
+			 height: 80rpx;
+				width: 80%;
+				display: flex;
+				    align-items: center;
+				    justify-content: center;
+					padding:12rpx;
+					
+					background-color: rgba(22,119,255,1);
+					color: rgba(255,255,255,1);
+					font-size: 36rpx;
+			}
+	}
+	.viewImg{
+		width: 160rpx;
+		height: 160rpx;
+	}
 </style>

+ 196 - 0
pages/task/selectLock.vue

@@ -0,0 +1,196 @@
+<template>
+	<view>
+		<u-navbar  title="选择地锁" title-color="#101010"></u-navbar>
+		
+		<view class="top">
+			<view class="search">
+				<view class="searchBox">
+					<u-search shape="square" placeholder="使用停车场名称/地锁编号搜索" maxlength="12" v-model="testName" :show-action="false"
+						:animation="true"></u-search>
+					<u-button type="primary" size="mini" @click="testBtn">搜素</u-button>
+				</view>
+			</view>
+		</view>
+		<view class="body2">
+			<view class="item" v-for="(item,i) in list" :key="i"
+				@click="returnName( item)">
+				<view class="v">
+					
+
+					<view class="v1" >
+						荆鹏停车场<span class="y">|</span>{{item.lockNo}}
+					</view>
+					<view class="v2" >
+						地锁名称:{{item.name}}
+					</view>
+					<view class="v2" v-if="item.locationAddress" >
+						地锁地址:{{item.locationAddress}}
+					</view>
+				</view>
+				<u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
+			</view>
+
+			 
+		</view>
+
+		<u-divider color="#B6BDC3" :isnone="list.length==0">已经到底了</u-divider>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/pagejs/pagesTask.js'
+
+	export default {
+		data() {
+			return {
+				list: [],
+				testName: "",
+				queryName: "",
+				type: 1,
+			};
+		},
+		onLoad(op) {
+			if (op.type) {
+				this.type = op.type
+			}
+			this.getList()
+		},
+		methods: {
+			getList() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				var obj = {
+					name: this.testName
+				}
+				if (this.type == 3) {
+					obj.buildMode = 2
+				}
+				API.findFloorLock(obj).then((res) => {
+					this.queryName = this.testName
+					var list = res.data.floorlockInfoList
+					if (list == null) {
+						list = []
+					}
+					this.list = list
+
+
+					
+
+
+					uni.hideLoading();
+
+				}).catch(error => {
+
+					uni.hideLoading();
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			returnName(  obj) {
+				const eventChannel = this.getOpenerEventChannel();
+
+				eventChannel.emit('acceptDataFromOpenerPage', {
+				 
+					item: obj
+				})
+				uni.navigateBack()
+			},
+			testBtn() {
+
+				this.list = []
+				//this.listForm.pageIndex=1
+				this.getList()
+			},
+			getInfo() {
+
+			}
+
+		}
+	}
+</script>
+<style>
+	page {
+		background-color: rgba(242, 244, 246, 1);
+	}
+</style>
+<style lang="scss" scoped>
+	::v-deep .u-content {
+		width: 380% !important;
+	}
+
+	.search {
+
+		padding: 16rpx 32rpx;
+		background: #fff;
+
+		.searchBox {
+			display: flex;
+			align-items: center;
+			background: #F2F2F2;
+			padding: 1px 16rpx;
+			border-radius: 8px;
+			justify-content: space-between;
+		}
+	}
+
+	.body2 {
+		.item:not(:last-child) {
+			border-bottom: 1px solid rgba(232, 232, 232, 1);
+		}
+
+		.item {
+			padding: 24rpx 32rpx;
+			background: #fff;
+			display: flex;
+			justify-content: space-between;
+
+			.vquery {
+				display: flex;
+				align-items: center;
+			}
+
+			.buildMode {
+				font-size: 24rpx;
+				border: 1px solid #bbbbbb;
+				border-radius: 4px;
+				color: #1677ff;
+				padding: 2rpx 8rpx;
+				margin: 0 8rpx;
+
+			}
+
+			.buildMode1 {
+				color: #1677ff;
+				border: 1px solid #1677ff;
+			}
+
+			.buildMode2 {
+				color: #4CAF50;
+				border: 1px solid #4CAF50;
+			}
+
+			.qName {
+				color: #FF5100
+			}
+
+			.v1 {
+				color: rgba(16, 16, 16, 1);
+				font-size: 32rpx;
+			}
+			.y{
+				margin: 0 8rpx;
+				color:rgba(119, 119, 119, 1);
+				
+			}
+			.v2 {
+				color: rgba(119, 119, 119, 1);
+				font-size: 24rpx;
+			}
+
+		}
+	}
+</style>