Эх сурвалжийг харах

修复东阳医院反馈bug

xieyunhui 3 жил өмнө
parent
commit
e9b4ce728d

+ 0 - 1
components/tm-modal/tm-modal.vue

@@ -20,7 +20,6 @@
 
 <style lang="less">
 	.tm-modal {
-		overflow: hidden;
 		position: fixed;
 		top: 0;
 		left: 0;

+ 2 - 2
components/tm-no-data/tm-no-data.vue

@@ -23,9 +23,9 @@
 		align-items: center;
 		justify-content: center;
 		width: 100%;
-		height: 100%;
+		height:calc(100vh - 50px);
 		font-size: 22.5rpx;
-		line-height: 33.75rpx;
+		// line-height: 33.75rpx;
 		color: #828899;
 		>image {
 			margin-bottom: 35rpx;

+ 1 - 1
manifest.json

@@ -2,7 +2,7 @@
     "name" : "追踪方法学",
     "appid" : "__UNI__03C4C69",
     "description" : "",
-    "versionName" : "0.7.3",
+    "versionName" : "0.7.4",
     "versionCode" : 100,
     "transformPx" : false,
     "app-plus" : {

+ 39 - 30
pages/auditItemDetails/auditItemDetails.vue

@@ -90,7 +90,7 @@
 		}) {
 			const pages = getCurrentPages();
 			const reversedPageList = pages.reverse();
-			if (reversedPageList[1].route == 'pages/checkMainPoints/checkMainPoints') {
+			if (reversedPageList && reversedPageList[0].route == 'pages/checkMainPoints/checkMainPoints') {
 				this.bottomBtnText = '返回查核任务列表'
 			}
 
@@ -106,7 +106,6 @@
 				//接收来自上个页面所传过来的数据
 				const eventChannel = this.getOpenerEventChannel();
 				eventChannel.on('acceptDataFromOpenerPage', (data) => {
-					// console.log({data});
 					this.itemBelongGroup = data.data[0].responseList.map((item, index) => {
 						return ({
 							index: index,
@@ -151,36 +150,39 @@
 					if (data) {
 						this.detail = data;
 						this.itemId = id;
+
 					}
 				});
 			},
 			switchItem(num) {
-				let current = this.itemBelongGroup.filter(item => {
-					return item.id == this.itemId;
-				});
-				if (num < 0) {
-					if (current[0].index == 0) {
-						uni.showToast({
-							title: '已经没有上一项',
-							duration: 2000,
-							icon: 'none'
-						});
-						return;
-					}
+				let currentIndex = this.detail.checkDetailIds.findIndex(t => t == this.itemId);
+				if (currentIndex - 1 == -1 && num < 0) {
+					//当前项为第一个时且操作是点击上一项
+					uni.showToast({
+						title: '已经没有上一项',
+						duration: 2000,
+						icon: 'none'
+					});
+					return;
 				}
-				if (num > 0) {
-					if (current[0].index == this.itemBelongGroup.length - 1) {
-						uni.showToast({
-							title: '已经没有下一项',
-							duration: 2000,
-							icon: 'none'
-						});
-						return;
-					}
+
+
+				if (currentIndex + 1 > this.detail.checkDetailIds.length - 1 && num > 0) {
+					//当前项为第一个时且操作是点击下一项
+					uni.showToast({
+						title: '已经没有下一项',
+						duration: 2000,
+						icon: 'none'
+					});
+					return;
 				}
-				let needItemIndex = num > 0 ? current[0].index + 1 : current[0].index - 1;
-				let needItemId = this.itemBelongGroup[needItemIndex].id;
-				this.loadItemDetail(needItemId);
+
+				let needItemId = num > 0 ? this.detail.checkDetailIds[currentIndex + 1] : this.detail.checkDetailIds[
+					currentIndex - 1];
+				if (needItemId) {
+					this.loadItemDetail(needItemId);
+				}
+
 			}
 		}
 	}
@@ -204,7 +206,6 @@
 
 		.top-box {
 			position: relative;
-			margin-top: 15rpx;
 			padding-bottom: 37.5rpx;
 			background-color: #fff;
 
@@ -241,12 +242,14 @@
 				display: flex;
 				flex-direction: column;
 				padding: 25rpx 31.25rpx;
+
 				text {
 					font-size: 25rpx;
 					line-height: 37.5rpx;
-                    white-space: nowrap;
-                    text-overflow: ellipsis;
-                    overflow: hidden;
+					white-space: nowrap;
+					text-overflow: ellipsis;
+					overflow: hidden;
+
 					&:last-child {
 						padding-top: 4.37rpx;
 						font-size: 17.5rpx;
@@ -268,10 +271,16 @@
 					justify-content: center;
 					align-items: center;
 					flex: 1;
+					width: 25%;
 					border-right: 1px solid #DADEE6;
 
 					text {
+						width: 100%;
+						text-align: center;
 						font-weight: 500;
+						white-space: nowrap;
+						overflow: hidden;
+						text-overflow: ellipsis;
 
 						&:last-child {
 							font-size: 17.5rpx;

+ 1 - 5
pages/batchDistribution/batchDistribution.vue

@@ -75,9 +75,7 @@
 		onLoad({
 			details
 		}) {
-
-			const _details = details ? JSON.parse(details) : {};
-			console.log({_details});
+			const _details = details ? JSON.parse(details) : {};
 			// 强制刷新返回查核列表页面
 			if (getCurrentPages().length === 1) {
 				const {
@@ -233,10 +231,8 @@
 							success: function(res) {
 								if (res.confirm) {
 									// console.log('用户点击确定');
-
 									let pages = getCurrentPages(); // 获取当前页面栈
 									let prePage = pages[pages.length - 2]; // 上一个页面
-									// console.log({prePage});
 									prePage.ifInit = true;
 									uni.navigateBack({
 										delta: 1

+ 55 - 49
pages/checkList/checkList.vue

@@ -1,12 +1,12 @@
 <template>
-	<view class="check-map-list-page">
+	<view :class="[showModal?'check-map-list-page preventScroll':'check-map-list-page']">
+		<tm-top-menu>
+			<view class="top-menu" @click="showModalHandle(!showModal)">
+				<text>{{createTitle}}</text>
+				<image :src="`../../static/${showModal?'open':'close'}-icon.png`"></image>
+			</view>
+		</tm-top-menu>
 		<scroll-view scroll-y="true" class="check-map-list">
-			<tm-top-menu>
-				<view class="top-menu" @click="showModalHandle(!showModal)">
-					<text>{{createTitle}}</text>
-					<image :src="`../../static/${showModal?'open':'close'}-icon.png`"></image>
-				</view>
-			</tm-top-menu>
 			<view class="item" v-for="(item, index) in depList" @click="gotoCheckMainPointsPage(item)" :key="index">
 				<view class="title-wrap">
 					<text>{{item.deptName}}</text>
@@ -36,23 +36,23 @@
 					<text>{{item.completeDes}}</text>
 				</view>
 			</view>
-			<tm-no-data v-if="depList.length === 0" :textArr="['暂时没有内容可以展示哦', '请返回上一页面或尝试刷新页面']" />
-			<tm-modal v-show="showModal" v-on:click="showModalHandle(false)">
-				<scroll-view scroll-y="true" class="content-list">
-					<view class="list-item" v-for="(item, index) in planList" :class="{active: checkId === item.id}"
-						@click="checkItem($event, item.id)" :key="index">
-						<view>
-							<text>{{item.name}}({{item.startDate}} ~ {{item.endDate}})</text>
-							<view class="item-icon" :class="{icon2: Number(item.status) === 2}"
-								v-if="Number(item.status) !== 1">
-								{{Number(item.status) === 2 ? '进行中' : '已完成'}}
-							</view>
-						</view>
-						<image class="check-img" v-if="checkId === item.id" src="../../static/checkStatus.png"></image>
-					</view>
-				</scroll-view>
-			</tm-modal>
-		</scroll-view>
+		</scroll-view>
+		<tm-no-data v-if="depList.length === 0" :textArr="['暂时没有内容可以展示哦', '请返回上一页面或尝试刷新页面']" />
+		<tm-modal v-show="showModal" v-on:click="showModalHandle(false)">
+			<scroll-view scroll-y="true" class="content-list">
+				<view class="list-item" v-for="(item, index) in planList" :class="{active: checkId === item.id}"
+					@click="checkItem($event, item.id)" :key="index">
+					<view>
+						<text>{{item.name}}({{item.startDate}} ~ {{item.endDate}})</text>
+						<view class="item-icon" :class="{icon2: Number(item.status) === 2}"
+							v-if="Number(item.status) !== 1">
+							{{Number(item.status) === 2 ? '进行中' : '已完成'}}
+						</view>
+					</view>
+					<image class="check-img" v-if="checkId === item.id" src="../../static/checkStatus.png"></image>
+				</view>
+			</scroll-view>
+		</tm-modal>
 		<tm-callback-listpage />
 	</view>
 </template>
@@ -195,35 +195,38 @@
 	}
 </script>
 
-<style lang="less">
+<style lang="less" scoped>
 	.check-map-list-page {
-		position: relative;
-		height: 100%;
+		position: relative;
+		padding-top: 30rpx;
+		.tm-top-menu {
+			width: 93%;
+			margin:0 auto;
+		}
+		.top-menu {
+			overflow: hidden;
+			display: flex;
+			flex-direction: row;
+			justify-content: center;
+			align-items: center;
+			height: 50rpx;
+		    margin-bottom: 20rpx;
+			image {
+				margin-left: 9.37rpx;
+				width: 12.5rpx;
+				height: 12.5rpx;
+			}
+		}
+		
+		&.preventScroll {
+			position: fixed;
+		}
 	}
 
-	.check-map-list {
-		padding: 25rpx;
-		padding-top:20rpx;
+	.check-map-list {
 		height: 100%;
-
-		.top-menu {
-			overflow: hidden;
-			display: flex;
-			flex-direction: row;
-			justify-content: center;
-			align-items: center;
-			height: 50rpx;
-            margin-bottom: 20rpx;
-			image {
-				margin-left: 9.37rpx;
-				width: 12.5rpx;
-				height: 12.5rpx;
-			}
-		}
-
 		.item {
 			position: relative;
-
 			.title-wrap {
 				.scoreAndStatus {
 					 position: absolute;
@@ -288,9 +291,12 @@
 	}
 
 	.content-list {
-		padding-top: 50rpx;
+		padding-top: 50rpx;
+		padding-bottom: 50rpx;
 		width: 100%;
-		height: 100%;
+		height: 70vh;
+		overflow-y: scroll;
+		box-sizing: border-box;
 		background-color: #fff;
 
 		.list-item {

+ 43 - 11
pages/checkMainPoints/checkMainPoints.vue

@@ -77,9 +77,12 @@
 				</view>
 			</view>
 		</tm-modal>
-		<view class="contentContainer">
-			<scroll-view @scroll="scrollHandle" scroll-y="true"
-				:class="(detailList.length>0&&active != 2&&finishedStatus != 1)?'scroll-Y':'scroll-Y noBtn'">
+		<view class="contentContainer">
+			<image class="dataEmptyimg" v-if="detailList.length==0" src="../../static/no-data.png"></image>
+			<scroll-view @scroll="scrollHandle" scroll-y="true"
+			     v-if="detailList.length>0"
+				:class="(detailList.length>0&&active != 2&&finishedStatus != 1)?'scroll-Y':'scroll-Y noBtn'">
+				
 				<view class="list" v-for="(item, index) in detailList" :key="index">
 					<view class="title" v-if="item.responseList.length > 0">查核要点:{{item.checkPointName}}</view>
 					<view class="item" v-for="(child, n) in item.responseList"
@@ -360,7 +363,24 @@
 					}
 				}
 			},
-			loadItemData() {
+			loadItemData() {
+				if(this.situationType == 2&&!this.currentSelectedInvestigationUser){
+					//分页模式下且未选择访谈对象时拒绝请求数据同时清空历史数据
+					this.$store.commit('checkMainPoints/comChangeState', {
+						key: 'detailList',
+						data:[]
+					});
+					this.detailList = [];
+					this.isBindResponsible = false;
+					this.copyDetailList = [];
+					this.currentScore =0;
+					this.totalScore = 0;
+					this.subtotalScore = 0;
+					this.totalSubtotalScore = 0;
+					this.checkDetailMapResponses = [];
+					this.point = [];
+					return false
+				}
 				this.checkTaskDetailList({
 					'deptId': this.deptId,
 					'checkId': this.checkId,
@@ -467,9 +487,7 @@
 			},
 			oneKeyCheckCommit() {
 				let ids = [];
-				// console.log('this.detailList',this.detailList);
 				this.detailList.forEach(item => {
-					// console.log(item.responseList);
 					//筛选掉已查核项
 					const temp = item.responseList.filter(v => !v.checkResult);
 					const arr = temp.map(v => v.id);
@@ -512,7 +530,16 @@
 						situationType: this.situationType,
 						deptId: this.deptId
 					}
-				}).then(data => {
+				}).then(data => {
+					if(data.length==0){
+						//当不存在访查对象时
+						 uni.showModal({
+						 	title: '提示',
+						 	content: '你目前还未添加访谈对象!',
+						 	confirmText: '确定',
+						     showCancel:false
+						 });
+					}
 					this.$store.commit('checkMainPoints/comChangeState', {
 						key: 'investigationUsers',
 						data: data
@@ -547,7 +574,8 @@
 						this.$store.commit('checkMainPoints/comChangeState', {
 							key: 'detailList',
 							data: data.checkDetailMapResponses
-						});
+						});
+						
 						this.isBindResponsible = data.isBindResponsible;
 						this.detailList = data.checkDetailMapResponses;
 						this.copyDetailList = data.checkDetailMapResponses;
@@ -687,8 +715,6 @@
 		height: 100%;
 		display: flex;
 		flex-direction: column;
-		// font-size: 22.5rpx;
-		// line-height: 33.75rpx;
 		background-color: #F5F6FA;
 
 		.slot-wrap {
@@ -1052,7 +1078,13 @@
 			flex: 1;
 			height: 100%;
 			overflow: hidden;
-
+            .dataEmptyimg {
+				display: block;
+				width:200rpx;
+				height:230rpx;
+				margin: 0 auto;
+				margin-top: 200rpx;
+			}
 			.scroll-Y {
 				height: 100%;
 

+ 3 - 0
pages/creatingSituations/components/situationPreview.vue

@@ -123,6 +123,9 @@
 					this.dispatch('getTemplates').then(res=>{
 						  this.$store.commit('creatingSituations/comChangeState',{key:'templateList',data:res});
 					})
+				}else {
+					this.ifShowTemplateSelector = false;
+					this.$store.commit('creatingSituations/comChangeState',{key:'templateList',data:[]});
 				}
 			}
 		},

+ 1 - 2
pages/home/home.vue

@@ -99,7 +99,7 @@
 			return {
 				ifshowVersionInfo:false,
 				showJournal: false,
-				version: '0.7.3',
+				version: '0.7.4',
 				versionData: {
 					versionNo: '',
 					versionId: '',
@@ -252,7 +252,6 @@
 			},
 			identifyEnterCode(content){
 				 let repalcedContent = content.replace(/(\r\n|\n|\r)/gm, "<br />");
-				 console.log({repalcedContent});
 				 return repalcedContent;
 			},
 			feedbackFunc(){

+ 20 - 49
pages/mainPointsDetail/mainPointsDetail.vue

@@ -138,8 +138,6 @@
 							<image class="plusIcon" src="../../static/icon-add.png" mode=""></image>
 							<text class="threePoint">缺陷</text>
 						</view>
-						<!-- <text class="threePoint" v-if="checkItemResultList" @click="openSelectModal">⋮</text> -->
-						<!-- <dropdown :list="checkItemResultList" :current="currentSelect" @onClick="dropDownChange"></dropdown> -->
 					</view>
 					<text class="clear" @click="clearResult(false)">清空</text>
 					<textarea maxlength="300" class="seeTextarea" placeholder="请输入" :value="recordList[0].seeResult"
@@ -271,7 +269,6 @@
 				this.showSelectModal = false;
 			},
 			openSelectModal(index) {
-				// console.log({index});
 				if (index >= 0) {
 					this.currentEditTextAreaIndex = index;
 				}
@@ -306,7 +303,7 @@
 					
 					if (this.checkedSelectResultListIds[currentIndex] && this.checkedSelectResultListIds[currentIndex]
 						.includes(item.id)) {
-						console.log('减去');
+
 						const tempIdsArr = JSON.parse(JSON.stringify(this.checkedSelectResultListIds[currentIndex]));
 						const tempArr = JSON.parse(JSON.stringify(this.checkedSelectResultList[currentIndex]));
 						const tempArrData = JSON.parse(JSON.stringify(this.checkedSelectResultListData[currentIndex]));
@@ -540,21 +537,6 @@
 					this.currentScore = this.totalScore - parsedData.itemGetScore;
 				}
 
-				//    this.Index = data;
-				// this.data.checkResult = data;
-				// if (data == 1) {
-				//   this.data.checkResult = "不适用";
-				// } else if (data == 2) {
-				//   this.data.checkResult = "无缺失";
-				// } else if (data == 3) {
-				//   this.data.checkResult = "主要缺失";
-				// } else if (data == 4) {
-				//   this.data.checkResult = "次要缺失";
-				// } else if (data == 5) {
-				//   this.data.checkResult = "观察事项";
-				// } else {
-				//   this.data.checkResult = "";
-				// }
 			},
 			changeFilePaths(filePaths, index) {
 				let _recordList = [...this.recordList];
@@ -611,8 +593,6 @@
 								   		value: this.checkItemValue,
 								   		situationType: this.situationType,
 								   		calScore: this.calScore,
-								   		// responsibleUserId:(this.checkedResponsibleData.map(item=>item.id)).join(','),
-								   		// responsibleUserName:(this.checkedResponsibleData.map(item=>item.main)).join(','),
 								   		score: Number(this.currentScore),
 								   		deductPoint: Number(this.inputScore ? this.inputScore : this.deductPoint),
 								   	};
@@ -719,28 +699,23 @@
 								   					     
 								   			if (key == 'back') {
 								   				//点完成时返回
-								   				console.log('开始返回');
 								   				this.$store.commit('checkMainPoints/comChangeState', {
 								   					'key': 'ifUpdate',
 								   					'data': true
 								   				});
 								   				_goBackFresh('pages/checkMainPoints/checkMainPoints');
 								   			}
-								   			// _goBackFresh('pages/checkMainPoints/checkMainPoints');
-								   			//去查核详情页
-								   			// uni.navigateTo({
-								   			//   url: `/pages/auditItemDetails/auditItemDetails?id=${this.data.id}&checkPointId=${this.checkPointId}`,
-								   			// });
 								   		} else {
 								   			console.log('res为false');
 								   			resolve(false);
 								   		}
 								   	});
 								   } else {
-								   	uni.showModal({
-								   		title: "检查选项未选择",
-								   		showCancel: false,
-								   	});
+									   uni.showToast({
+										title: '请先选择查核结果!',
+										duration: 2000,
+										icon: 'none'
+									   });
 								   	resolve(false);
 								   }
 							 }catch(err){
@@ -798,10 +773,7 @@
 						// this.completeTaskList = data.improveCompleteResponses || [];
 					}
 				});
-				/** 请求参数 data
-				 * situationId: 情境id 当管路员或者查核者通过情境进入任务列表时 必传
-				 * checkItemId 单位负责人通过 查核要点进入改善任务列表时 必传
-				 */
+			
 
 			},
 			clearForm(index) {
@@ -819,7 +791,8 @@
 					}
 
 				} else {
-					this.recordList[0].talkResult = '';
+					this.recordList[0].talkResult = '';
+	
 				}
 				this.checkedSelectResultListIds = [];
 				this.checkedSelectResultList = [];
@@ -838,7 +811,7 @@
 					return;
 				}
 				const result = await this.sureDetail();
-				console.log({result});
+		
 				if(result){
 					  let current = this.itemBelongGroup.filter(item => {
 					  	return item.id == this.id;
@@ -865,9 +838,12 @@
 					  }
 					  let needItemIndex = num > 0 ? current[0].index + 1 : current[0].index - 1;
 					  let needItemId = this.itemBelongGroup[needItemIndex].id;
-					  // console.log({needItemIndex,needItemId});
+					  let needItemCheckId = this.itemBelongGroup[needItemIndex].checkItemId;
+					
 					  this.clearForm();
+					  this.clearResult();
 					  this.checkTaskDetail(needItemId);
+					  this.getCheckItemResultList(needItemCheckId); //获取缺陷项列表数据
 				};
 			},
 			// 获取查核项可配置列表
@@ -892,14 +868,6 @@
 						data: checkItemId
 					}
 				}).then(data => {
-					// console.log({data});
-					// const temp = [
-					// 	{resultName:'1',id:0},
-					// 	{resultName:'2',id:1},
-					// 	{resultName:'3',id:2},
-					// 	{resultName:'4',id:3}
-					// ]
-					// this.checkItemResultList = temp;
 					this.checkItemResultList = data;
 				})
 			},
@@ -912,7 +880,8 @@
 		}) {
 			this.id = id;
 			this.checkPointId = checkPointId;
-			this.situationType = situationType;
+			this.situationType = situationType;
+			this.checkItemId = checkItemId;
 			this.getCheckConfigList(checkItemId);
 			this.getCheckItemResultList(checkItemId);
 
@@ -920,10 +889,12 @@
 			const eventChannel = this.getOpenerEventChannel();
 			eventChannel.on('acceptDataFromOpenerPage', (data) => {
 				// console.log({data});
-				this.itemBelongGroup = data.data[0].responseList.map((item, index) => {
+				this.itemBelongGroup = data.data[0].responseList.map((item, index) => {
+					
 					return ({
 						index: index,
-						id: item['id'],
+						id: item['id'],
+						checkItemId:item['checkItemId']
 					})
 				});
 				//重新导航进页面,删除缓存并设置最新数据

+ 1 - 1
pages/mission-action/components/pdca-components/one-textarea.vue

@@ -12,7 +12,7 @@
 					:maxlength="500" auto-height :value="defaultValue" :disabled="disabled" @input="changeVal" />
 			</view>
 		</view>
-		<view class="bottomBtn" @click="goToPrevPage" v-if="disabled">返回改善任务详情</view>
+		<!-- <view class="bottomBtn" @click="goToPrevPage" v-if="disabled">返回改善任务详情</view> -->
 	</view>
 </template>
 

+ 267 - 261
pages/mission-action/components/pdca.vue

@@ -1,264 +1,270 @@
-<template>
-	<view class="pdca-page">
-		<uni-segmented-control
-		  :current="current"
-			:values="tabItems"
-			@clickItem="onClickItem"
-			style-type="text"
-			active-color="#3377FF" />
-		<view class="content">
-			<scroll-view class="scroll-y" scroll-y="true">
-        <one-textarea
-          v-if="current === 0"
-          type="plan"
-          :defaultValue="plan"
-          :disabled="disabled || btnInfo.pDisabled"
-          @changeTextare="changeTextare"
-        />
-				 <do-and-check
-					 v-if="current === 1"
-           type="do"
-           :disabled="disabled"
-           :recordList="doList"
-           @changeRecordList="changeDoList"
-				/>
-				<do-and-check
-					v-if="current === 2"
-          type="check"
-          :disabled="disabled"
-          :recordList="checkList"
-          :showUploadImg="true"
-          @changeRecordList="changeCheckList"
-				/>
-				<one-textarea
-          v-if="current === 3"
-          type="action"
-          title="对策处置(Action)"
-          label="对策处置"
-          :defaultValue="action"
-          :disabled="disabled"
-          @changeTextare="changeTextare"
-         />
+<template>
+	<view class="pdca-page">
+		<uni-segmented-control :current="current" :values="tabItems" @clickItem="onClickItem" style-type="text"
+			active-color="#3377FF" />
+		<view class="content">
+			<scroll-view class="scroll-y" scroll-y="true">
+				<one-textarea v-if="current === 0" type="plan" :defaultValue="plan"
+					:disabled="disabled || btnInfo.pDisabled" @changeTextare="changeTextare" />
+				<do-and-check v-if="current === 1" type="do" :disabled="disabled" :recordList="doList"
+					@changeRecordList="changeDoList" />
+				<do-and-check v-if="current === 2" type="check" :disabled="disabled" :recordList="checkList"
+					:showUploadImg="true" @changeRecordList="changeCheckList" />
+				<one-textarea v-if="current === 3" type="action" title="对策处置(Action)" label="对策处置"
+					:defaultValue="action" :disabled="disabled" @changeTextare="changeTextare" />
 			</scroll-view>
-			<view class="fixed-buttom-btn" v-if="!disabled">
-		   	<view class="btn-text cancle" @click="sure('')">
-					<text>暂存</text>
-				</view>
-				<view class="btn-text" @click="toggleModalVisibile">
-					<text>提交</text>
-				</view>
-			</view>
-		</view>
-    <!-- 方案名称modal -->
-    <modal
-      v-if="modalVisibile"
-      @close="toggleModalVisibile"
-      @sure="sure" />
-	</view>
-</template>
-
-<script>
-	// 改善任务PDCA
-	import uniSegmentedControl from "@/components/uni-segmented-control/uni-segmented-control.vue"
-	import oneTextarea from './pdca-components/one-textarea.vue'
-  import doAndCheck from './pdca-components/do-and-check.vue'
-  import modal from './modal.vue'
-  import { mapState } from "vuex";
-	
-	export default {
-    props: {
-      // 是否禁用
-      disabled: {
-        type: Boolean,
-        default: false
-      },
-      // 详情回显的数据
-      values: {
-        type: Object,
-        default: () => {
-          return {}
-        }
-      },
-      // 按钮信息 (包过请求的key)
-      btnInfo: {
-        type: Object,
-        default: () => {
-          return {}
-        }
-      },
-      // 任务详情
-      missionDetails: {
-        type: Object,
-        default: () => {
-          return {}
-        }
-      },
-      // pdca类型 p 和 pdca
-      pdcaSetting: {
-        type: String,
-        default: 'p'
-      }
-    },
-		data() {
-			return {
-        current: 0,
-        plan: '', // 改善计划
-        doList: [{record: '', date: ''}], // 执行过程
-        checkList: [{record: '', date: '', filePath: [] }], // 改善确认
-        action: '', // 对策处置
-        // 方案名称显示隐藏
-        modalVisibile: false
+			<view class="bottomBtn" @click="goToPrevPage" v-if="disabled">返回改善任务详情</view>
+			<view class="fixed-buttom-btn" v-if="!disabled">
+				<view class="btn-text cancle" @click="sure('')">
+					<text>暂存</text>
+				</view>
+				<view class="btn-text" @click="toggleModalVisibile">
+					<text>提交</text>
+				</view>
+			</view>
+		</view>
+		<!-- 方案名称modal -->
+		<modal v-if="modalVisibile" @close="toggleModalVisibile" @sure="sure" />
+	</view>
+</template>
+
+<script>
+	// 改善任务PDCA
+	import uniSegmentedControl from "@/components/uni-segmented-control/uni-segmented-control.vue"
+	import oneTextarea from './pdca-components/one-textarea.vue'
+	import doAndCheck from './pdca-components/do-and-check.vue'
+	import modal from './modal.vue'
+	import {
+		mapState
+	} from "vuex";
+
+	export default {
+		props: {
+			// 是否禁用
+			disabled: {
+				type: Boolean,
+				default: false
+			},
+			// 详情回显的数据
+			values: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			},
+			// 按钮信息 (包过请求的key)
+			btnInfo: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			},
+			// 任务详情
+			missionDetails: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			},
+			// pdca类型 p 和 pdca
+			pdcaSetting: {
+				type: String,
+				default: 'p'
+			}
+		},
+		data() {
+			return {
+				current: 0,
+				plan: '', // 改善计划
+				doList: [{
+					record: '',
+					date: ''
+				}], // 执行过程
+				checkList: [{
+					record: '',
+					date: '',
+					filePath: []
+				}], // 改善确认
+				action: '', // 对策处置
+				// 方案名称显示隐藏
+				modalVisibile: false
+			}
+		},
+		computed: {
+			tabItems() {
+				return this.pdcaSetting === 'p' ?
+					['改善计划(P)'] :
+					['改善计划(P)', '执行过程(D)', '改善确认(C)', '对策处置(A)'];
+			},
+			...mapState({
+				missionDetails: state => state.mission.missionDetails
+			}),
+		},
+		created() {
+			uni.setNavigationBarTitle({
+				title: '改善计划'
+			});
+			// if(this.disabled || this.btnInfo.isEdit) {
+			this.plan = this.values['plan'] || '';
+			this.doList = (this.values['do'] && this.values['do'].length > 0) ?
+				this.getComList(this.values['do'], 'do') :
+				[{
+					record: '',
+					date: ''
+				}];
+			this.checkList = (this.values['check'] && this.values['check'].length > 0) ?
+				this.getComList(this.values['check'], 'check') :
+				[{
+					record: '',
+					date: '',
+					filePath: []
+				}];
+			this.action = this.values['action'] || '';
+			// }
+		},
+		methods: {
+			onClickItem(e) {
+				if (this.current !== e.currentIndex) {
+					this.current = e.currentIndex;
+				}
+			},
+			// 切换方案名称显示隐藏
+			toggleModalVisibile() {
+				this.modalVisibile = !this.modalVisibile;
+			},
+			// 改善计划/对策处置变化
+			changeTextare(type, text) {
+				this[type] = text;
+			},
+			// 执行过程变化
+			changeDoList(list) {
+				this.doList = list;
+			},
+			goToPrevPage(){
+				// window.history.back();
+				uni.navigateBack({
+				    delta: 1
+				});
+			},
+			// 改善确认变化
+			changeCheckList(list) {
+				this.checkList = list;
+			},
+			// 提交审核/ 暂存(暂存时improveScheme为空)
+			sure(improveScheme) {
+				let requestParams = {
+					improveScheme // 改善方案名称
+				};
+				this.btnInfo.params && this.btnInfo.params.map(item => {
+					if (item.valueKey && !item.isEdit) {
+						requestParams[item.paramsKey] = (
+							item.isOutvalueKey ?
+							this.missionDetails :
+							this.btnInfo
+						)[item.valueKey];
+					} else {
+						switch (item.paramsKey) {
+							case 'taskPlan':
+								requestParams[item.paramsKey] = this.plan;
+								break;
+							case 'taskAction':
+								requestParams[item.paramsKey] = this.action;
+								break;
+							case 'taskDoRequestList':
+								requestParams[item.paramsKey] = this.doList.map((item, i) => {
+									return {
+										taskDoId: i + 1,
+										taskDoProcess: item.record,
+										taskDoPlan: item.date
+									}
+								});
+								break;
+							case 'taskCheckRequestList':
+								requestParams[item.paramsKey] = this.checkList.map((item, i) => {
+									return {
+										taskCheckId: i + 1,
+										taskCheckProcess: item.record,
+										taskCheckPlan: item.date,
+										taskCheckEffect: item.filePath.join(',')
+									}
+								});
+								break;
+							default:
+								requestParams[item.paramsKey] = '';
+								break;
+						}
+					}
+				});
+				if (improveScheme) { // 提交
+					requestParams['taskType'] = this.pdcaSetting === 'p' ? 14 : 16;
+				} else { // 暂存
+					// requestParams['taskType'] = this.pdcaSetting === 'p' ? 13 : 15;
+					// 注意暂存的时候接收人是当前登录的账号
+					requestParams['receiveEmpId'] = uni.getStorageSync('id');
+					requestParams['receiveEmpName'] = uni.getStorageSync('name');
+					if ([4, 6].includes(requestParams['taskType'])) {
+						requestParams['needApproveFlag'] = this.missionDetails.needApproveFlag;
+					}
+				}
+				this.$emit('comRequest', requestParams);
+				improveScheme && this.toggleModalVisibile();
+			},
+			/**
+			 * 获取相同key 的新数组
+			 * @param {Array} list 原数组
+			 * @param {String} type 类型(如 do、check)
+			 */
+			getComList(list, type) {
+				let newList = [];
+				list.map(item => {
+					if (type === 'do') {
+						newList.push({
+							record: item.taskDoProcess || '', // 记录内容
+							date: item.taskDoPlan || '' // 计划日期
+						});
+					} else if (type === 'check') {
+						newList.push({
+							record: item.taskCheckProcess || '', // 记录过程
+							date: item.taskCheckPlan || '', // 计划日期
+							filePath: item.taskCheckEffect ? item.taskCheckEffect.split(',') :
+							[] // 改善效果(图片)
+						});
+					}
+				});
+				return newList;
+			}
+		},
+		components: {
+			uniSegmentedControl,
+			oneTextarea,
+			doAndCheck,
+			modal
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	.pdca-page {
+		height: 100%;
+
+		.content {
+			height: calc(100vh - 125rpx);
+			.scroll-y {
+				height: 100%;
 			}
-    },
-    computed: {
-      tabItems(){
-        return this.pdcaSetting === 'p'
-          ? ['改善计划(P)']
-          : ['改善计划(P)', '执行过程(D)', '改善确认(C)', '对策处置(A)'];
-      },
-			...mapState({
-			  missionDetails: state => state.mission.missionDetails
-			}),
-    },
-		created() {
-			uni.setNavigationBarTitle({
-				title: '改善计划'
-      });
-      // if(this.disabled || this.btnInfo.isEdit) {
-        this.plan = this.values['plan'] || '';
-        this.doList = (this.values['do'] && this.values['do'].length > 0)
-          ? this.getComList(this.values['do'], 'do')
-          : [{record: '', date: ''}];
-        this.checkList = (this.values['check'] && this.values['check'].length > 0)
-          ? this.getComList(this.values['check'], 'check')
-          : [{record: '', date: '', filePath: [] }];
-        this.action = this.values['action'] || '';
-      // }
-		},
-		methods: {
-			onClickItem(e) {
-				if (this.current !== e.currentIndex) {
-					this.current = e.currentIndex;
-				}
-      },
-      // 切换方案名称显示隐藏
-      toggleModalVisibile() {
-        this.modalVisibile = !this.modalVisibile;
-      },
-      // 改善计划/对策处置变化
-      changeTextare(type, text) {
-        this[type] = text;
-      },
-      // 执行过程变化
-      changeDoList(list) {
-        this.doList = list;
-      },
-      // 改善确认变化
-      changeCheckList(list) {
-        this.checkList = list;
-      },
-      // 提交审核/ 暂存(暂存时improveScheme为空)
-      sure(improveScheme) {
-        let requestParams = {
-          improveScheme // 改善方案名称
-        };
-        this.btnInfo.params && this.btnInfo.params.map(item => {
-         if(item.valueKey && !item.isEdit){
-            requestParams[item.paramsKey] = (
-              item.isOutvalueKey
-              ? this.missionDetails
-              : this.btnInfo
-            )[item.valueKey];
-          }else {
-            switch(item.paramsKey){
-              case 'taskPlan':
-                requestParams[item.paramsKey] = this.plan;
-                break;
-              case 'taskAction':
-                requestParams[item.paramsKey] = this.action;
-                break;
-              case 'taskDoRequestList':
-                requestParams[item.paramsKey] = this.doList.map((item, i) => {
-                  return {
-                    taskDoId: i + 1,
-                    taskDoProcess: item.record,
-                    taskDoPlan: item.date
-                  }
-                });
-                break;
-              case 'taskCheckRequestList':
-                requestParams[item.paramsKey] = this.checkList.map((item, i) => {
-                  return {
-                    taskCheckId: i + 1,
-                    taskCheckProcess: item.record,
-                    taskCheckPlan: item.date,
-                    taskCheckEffect: item.filePath.join(',')
-                  }
-                });
-                break;
-              default:
-                requestParams[item.paramsKey] = '';
-                break;
-            }
-          }
-        });
-        if(improveScheme){ // 提交
-          requestParams['taskType'] = this.pdcaSetting === 'p' ? 14 : 16;
-        }else { // 暂存
-          // requestParams['taskType'] = this.pdcaSetting === 'p' ? 13 : 15;
-          // 注意暂存的时候接收人是当前登录的账号
-           requestParams['receiveEmpId'] = uni.getStorageSync('id');
-           requestParams['receiveEmpName'] = uni.getStorageSync('name');
-					 if([4, 6].includes(requestParams['taskType'])) {
-						 requestParams['needApproveFlag'] = this.missionDetails.needApproveFlag;
-					 }
-        }
-        this.$emit('comRequest', requestParams);
-        improveScheme && this.toggleModalVisibile();
-      },
-       /**
-       * 获取相同key 的新数组
-       * @param {Array} list 原数组
-       * @param {String} type 类型(如 do、check)
-       */
-      getComList(list, type) {
-        let newList = [];
-        list.map(item => {
-          if(type === 'do') {
-            newList.push({
-              record: item.taskDoProcess || '', // 记录内容
-              date: item.taskDoPlan || '' // 计划日期
-            });
-          }else if(type === 'check'){
-            newList.push({
-              record: item.taskCheckProcess || '', // 记录过程
-              date: item.taskCheckPlan || '', // 计划日期
-              filePath: item.taskCheckEffect ? item.taskCheckEffect.split(',') : [] // 改善效果(图片)
-            });
-          }
-        });
-        return newList;
-      }
-		},
-		components: {
-			uniSegmentedControl,
-			oneTextarea,
-      doAndCheck,
-      modal
-		}
-	}
-</script>
-
-<style lang="less">
-	.pdca-page {
-		height: 100%;
-
-		.content {
-      height: calc(100% - 141.5rpx);
-
-			.scroll-y {
-				height: 100%;
-			}
-		}
-	}
+			.bottomBtn {
+				position: fixed;
+				bottom: 0;
+				width: 100%;
+				height: 75rpx;
+				line-height: 75rpx;
+				text-align: center;
+				font-size: 22.5rpx;
+				font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+				font-weight: 400;
+				color: #FFFFFF;
+				background: #3377FF;
+			}
+		}
+	}
 </style>

+ 1 - 1
pages/mission-action/components/write-back.vue

@@ -15,7 +15,7 @@
 		<view class="fixed-buttom-btn" v-if="!disabled" @click="sure">
 			<text class="btn-text">确定</text>
 		</view>
-		<view class="bottomBtn" @click="goToPrevPage" v-if="disabled">返回改善任务详情</view>
+		<!-- <view class="bottomBtn" @click="goToPrevPage" v-if="disabled">返回改善任务详情</view> -->
 	</view>
 </template>
 

+ 147 - 129
pages/mission-action/mission-action.vue

@@ -1,130 +1,148 @@
-<template>
-	<view class="mission-action-page">
-		<!-- 指派改善任务 -->
-		<component
-		  :is="currentComponet"
-      :disabled="disabled"
-      :values="values"
-      :btnInfo="btnInfo"
-      :missionDetails="missionDetails"
-      :pdcaSetting="pdcaSetting"
-      @comRequest="comTaskCirculation"
-		/>
-	</view>
-</template>
-
-<script>
-    import { mapState } from "vuex";
-	import assignMission from './components/assign-mission.vue';
-	import disagree from './components/disagree.vue'
-	import personnel from './components/personnel.vue'
-	import writeBack from './components/write-back.vue'
-    import pdca from './components/pdca.vue'
-
-	export default {
-    computed: {
-      ...mapState({
-        missionDetails: state => state.mission.missionDetails
-      })
-    },
-		data() {
-			return {
-				// 当前显示的组件
-        currentComponet: '',
-        disabled: false,
-        // 查看详情回显的数据
-        values: {},
-        // 按钮信息
-        btnInfo: {},
-				compoentList: [
-					{type: 1, name: '指派改善任务', component: 'assign-mission'},
-					{type: 2, name: '原因', component: 'disagree'},
-					{type: 3, name: '人员架构', component: 'personnel'},
-					{type: 4, name: '改善回复', component: 'write-back'},
-					{type: 5, name: 'PDCA', component: 'pdca'}
-        ],
-        // pdca类型
-        pdcaSetting: 'p',
-		ifSetImproveEmp:null,//是否指定改善着
-		}
-    },
-    onLoad({ details,ifSetImproveEmp }){
-      this.getComponentInfo(details ? JSON.parse(details) : {});
-	  this.ifSetImproveEmp = ifSetImproveEmp;
-    },
-		methods: {
-      // 获取组件信息
-      getComponentInfo(details) {
-        const {
-          nextPermission,
-          nextPermissionName,
-          componentName,
-          disabled,
-          hasAnyData,
-          isOutvalueKey,
-          key,
-          labelKey,
-          dataKey,
-          pdcaSetting,
-          isEdit,
-          params
-        } = details;
-        this.currentComponet = componentName;
-        this.disabled = disabled;
-        if(disabled) { // 查看xx详情
-          let values = {};
-          if(hasAnyData){ // 回显数据由多个key组成
-            dataKey.map(item => {
-              values[item.labelKey] = (item.isOutvalueKey ? this.missionDetails : details)[item.key];
-            });
-          }else {
-            values[labelKey] = (isOutvalueKey ? this.missionDetails : details)[key]
-          }
-          this.values = values;
-        }else { // 编辑流程
-          this.btnInfo = details;
-          // if(isEdit) { // 之前暂存过,需要先回显数据
-            let values = {};
-            params && params.map(item => {
-              if(item.labelKey){
-                values[item.labelKey] = details[item.valueKey];
-              }
-            });
-            this.values = values;
-          // }
-        }
-        this.pdcaSetting = pdcaSetting;
-      },
-      // 公共改善任务接口
-      comTaskCirculation(data) {
-        this.$store.dispatch({
-					type: 'mission/commActions',
-					payload: {
-						key: "comTaskCirculation",
-						data
-					}
-				}).then(data1 => {
-          if(data1){
-            let taskId = uni.getStorageSync('taskId');
-            uni.redirectTo({
-              url: `/pages/mission-details/mission-details?taskId=${taskId}`
-            });
-          }
-				});
-      }
-		},
-		components: {
-			assignMission,
-			disagree,
-			personnel,
-			writeBack,
-			pdca
-		}
-	}
-</script>
-
-<style lang="less">
-	.mission-action-page {
-		height: 100%;
-	}
+<template>
+	<view class="mission-action-page">
+		<!-- 指派改善任务 -->
+		<component :is="currentComponet" :disabled="disabled" :values="values" :btnInfo="btnInfo"
+			:missionDetails="missionDetails" :pdcaSetting="pdcaSetting" @comRequest="comTaskCirculation" />
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import assignMission from './components/assign-mission.vue';
+	import disagree from './components/disagree.vue'
+	import personnel from './components/personnel.vue'
+	import writeBack from './components/write-back.vue'
+	import pdca from './components/pdca.vue'
+
+	export default {
+		computed: {
+			...mapState({
+				missionDetails: state => state.mission.missionDetails
+			})
+		},
+		data() {
+			return {
+				// 当前显示的组件
+				currentComponet: '',
+				disabled: false,
+				// 查看详情回显的数据
+				values: {},
+				// 按钮信息
+				btnInfo: {},
+				compoentList: [{
+						type: 1,
+						name: '指派改善任务',
+						component: 'assign-mission'
+					},
+					{
+						type: 2,
+						name: '原因',
+						component: 'disagree'
+					},
+					{
+						type: 3,
+						name: '人员架构',
+						component: 'personnel'
+					},
+					{
+						type: 4,
+						name: '改善回复',
+						component: 'write-back'
+					},
+					{
+						type: 5,
+						name: 'PDCA',
+						component: 'pdca'
+					}
+				],
+				// pdca类型
+				pdcaSetting: 'p',
+				ifSetImproveEmp: null, //是否指定改善着
+			}
+		},
+		onLoad({
+			details,
+			ifSetImproveEmp
+		}) {
+			console.log('details',JSON.parse(details));
+			this.getComponentInfo(details ? JSON.parse(details) : {});
+			this.ifSetImproveEmp = ifSetImproveEmp;
+		},
+		methods: {
+			// 获取组件信息
+			getComponentInfo(details) {
+				const {
+					nextPermission,
+					nextPermissionName,
+					componentName,
+					disabled,
+					hasAnyData,
+					isOutvalueKey,
+					key,
+					labelKey,
+					dataKey,
+					pdcaSetting,
+					isEdit,
+					params
+				} = details;
+				this.currentComponet = componentName;
+				this.disabled = disabled;
+				if (disabled) { // 查看xx详情
+					let values = {};
+					if (hasAnyData) { // 回显数据由多个key组成
+						dataKey.map(item => {
+							values[item.labelKey] = (item.isOutvalueKey ? this.missionDetails : details)[item.key];
+						});
+					} else {
+						values[labelKey] = (isOutvalueKey ? this.missionDetails : details)[key]
+					}
+					this.values = values;
+				} else { // 编辑流程
+					this.btnInfo = details;
+					// if(isEdit) { // 之前暂存过,需要先回显数据
+					let values = {};
+					params && params.map(item => {
+						if (item.labelKey) {
+							values[item.labelKey] = details[item.valueKey];
+						}
+					});
+					this.values = values;
+					// }
+				}
+				this.pdcaSetting = pdcaSetting;
+			},
+			// 公共改善任务接口
+			comTaskCirculation(data) {
+				this.$store.dispatch({
+					type: 'mission/commActions',
+					payload: {
+						key: "comTaskCirculation",
+						data
+					}
+				}).then(data1 => {
+					if (data1) {
+						let taskId = uni.getStorageSync('taskId');
+						uni.redirectTo({
+							url: `/pages/mission-details/mission-details?taskId=${taskId}`
+						});
+					}
+				});
+			}
+		},
+		components: {
+			assignMission,
+			disagree,
+			personnel,
+			writeBack,
+			pdca
+		}
+	}
+</script>
+
+<style lang="less">
+	.mission-action-page {
+		height: 100%;
+	}
 </style>

+ 46 - 22
pages/selectVisitPerson/selectVisitPerson.vue

@@ -3,7 +3,7 @@
 		<uni-popup ref="popup" type="bottom" :maskClick="true">
 			<view class="content">
 				<form @submit="formSubmit" @reset="formReset">
-					<text class="contentTitle">新增访查对象</text>
+					<text class="contentTitle">{{edit?'编辑访查对象':'新增访查对象'}}</text>
 					<!-- <input class="input" type="text" focus="true" v-model="visiterInfo" placeholder-class="placeholder" placeholder="请填写访查对象信息" /> -->
 					<scroll-view scroll-y="true" class="scroll-Y">
 						<view v-for="(item,index) in templateData" class="formItem">
@@ -33,7 +33,7 @@
 					:class="[item.investigationStatus==1||item.investigationStatus==2?item.investigationStatus==1?'status done':'status checking':'status']">
 					{{item.investigationStatus==1?'已完成':'进行中'}}
 				</view>
-				<text v-if="!edit&&current.investigationId ==item.investigationId "
+				<text v-if="!edit&&current&&current.investigationId ==item.investigationId "
 					class="checked">当前选中</text>
 				<text v-if="edit" class="editBtn" @click="editInvestigationUser(item,index)">编辑</text>
 				<text v-if="edit" class="delBtn" @click="delInvestigationUser(item,index)">删除</text>
@@ -72,10 +72,13 @@
 			}),
 		},
 		watch: {
-			currentSelectedInvestigationUser: function(newVal, oldVal) {
-				const index = this.investigationUsers.findIndex(item => item.id == newVal.id);
-				this.current = newVal;
-				this.index = index;
+			currentSelectedInvestigationUser: function(newVal, oldVal) {
+				//当删光所有访谈对象时newVal为null,需要做判断
+				if(newVal){
+					 const index = this.investigationUsers.findIndex(item => item.investigationId == newVal.investigationId);
+					 this.current = newVal;
+					 this.index = index;
+				}
 			},
 		},
 		onLoad({
@@ -84,7 +87,6 @@
 			deptId,
 			pageTemplateId
 		}) {
-			// console.log('this.investigationUsers', this.investigationUsers);
 			this.checkId = Number(checkId);
 			this.situationType = situationType;
 			this.deptId = deptId;
@@ -109,10 +111,11 @@
 		},
 		methods: {
 			formSubmit: function(e) {
+				//提交查访对象信息表单
 				try{
 					 const formdata = e.detail.value;
 					 const contentVOs = Object.keys(formdata).map(t => {
-					 	if(this.templateData[Number(t)].required&&formdata[t].length==0){
+					 	if(this.templateData[Number(t)].required == 1 &&formdata[t].length==0){
 					 		   throw '有必填项未填写!'
 					 	}else{
 							return {
@@ -124,6 +127,7 @@
 							}
 						}
 					 });
+					 //注意commitInvestigationUser方法报错也可能引发抛出错误,注意查看console
 					 this.commitInvestigationUser(contentVOs);
 				}catch(err){
 	                 console.log({err})
@@ -144,7 +148,8 @@
 					this.edit = false;
 				}
 			},
-			addVisiter() {
+			addVisiter() {
+				this.edit = false;
 				this.$store.dispatch({
 					type: 'selectVisitPerson/commActions',
 					key: 'getTemplateData',
@@ -181,10 +186,10 @@
 					  			content: '添加成功,是否立即返回?',
 					  			success: (res) => {
 					  				if (res.confirm) {
-					  					this.cancelAdd();
-					  					uni.navigateBack({
-					  						delta: 1
-					  					});
+										this.cancelAdd();
+										uni.navigateBack({
+												delta: 1
+										});
 					  					this.reloadData(true);
 					  				}
 					  				if (res.cancel) {
@@ -212,7 +217,7 @@
 					  				if (res.confirm) {
 					  					this.cancelAdd();
 					  					uni.navigateBack({
-					  						delta: 1
+					  							delta: 1
 					  					});
 					  					this.reloadData(true);
 					  				}
@@ -265,13 +270,30 @@
 						checkId: this.checkId,
 						investigationId: investigationId
 					}
-				}).then(data => {
-					// console.log(index,this.index);
+				}).then(data => {
+					if(data.length == 0){
+						//删光所有访谈对象时
+						this.current = null;
+						this.$store.commit('checkMainPoints/comChangeState', {
+							key: 'currentSelectedInvestigationUser',
+							data: null
+						});
+						return;
+					}
 					if (index == this.index) {
-						//当删除的是当前选中的对象
-						const prevInvestigationUser = this.index > 0 ? this.investigationUsers[this.index - 1] :
-							null;
-						this.current = prevInvestigationUser;
+						//当删除的是当前选中的对象
+						let prevInvestigationUser=null,nexInvestigationUser=null;
+						prevInvestigationUser = this.index > 0 ? this.investigationUsers[this.index - 1] :
+							null;
+						if(!prevInvestigationUser){
+							//删除的是第一个时,不存在上一个
+							nexInvestigationUser = this.investigationUsers[this.index + 1];
+						}
+						this.current = prevInvestigationUser;
+						this.$store.commit('checkMainPoints/comChangeState', {
+							key: 'currentSelectedInvestigationUser',
+							data: prevInvestigationUser||nexInvestigationUser
+						})
 					}
 					this.reloadData();
 				});
@@ -289,7 +311,8 @@
 						situationType: this.situationType,
 						deptId: this.deptId
 					}
-				}).then(data => {
+				}).then(data => {
+					console.log({data,bool});
 					this.$store.commit('checkMainPoints/comChangeState', {
 						key: 'investigationUsers',
 						data: data
@@ -301,7 +324,8 @@
 							data: data[data.length - 1]
 						})
 					}
-					//还未设置默认受访对象时
+					//还未设置默认受访对象时
+					console.log('this.currentSelectedInvestigationUser',this.currentSelectedInvestigationUser)
 					if (!this.currentSelectedInvestigationUser) {
 						this.$store.commit('checkMainPoints/comChangeState', {
 							key: 'currentSelectedInvestigationUser',

+ 1 - 1
pages/situationsCenter/situationsCenter.vue

@@ -368,7 +368,7 @@ export default {
         height: 62.5rpx;
         float: left;
         border-radius: 6.25rpx;
-        border: 1.25rpx solid #f0f2f7;
+        border-right: 1.25rpx solid #f0f2f7;;
         .search-pic {
           width: 21.87rpx;
           height: 21.87rpx;

+ 2 - 2
utils/requestUrl.js

@@ -9,8 +9,8 @@
 // const base = '192.168.51.80:8801/imed/pfm/';
 
 // export const URL = '192.168.51.80:8801/imed/pfm/'; // 本地
-export const URL = '112.124.59.133:8802/imed/pfm/'; //线上测试
-// export const URL = '118.31.245.65:8802/imed/pfm/';
+// export const URL = '112.124.59.133:8802/imed/pfm/'; //线上测试
+export const URL = '118.31.245.65:8802/imed/pfm/';
 // export const URL = '192.168.38.174:8088/imed/pfm/';
 // export const URL = '192.168.1.45:8088/imed/pfm/'; //内网
 // export const URL = 's1.nsloop.com:5137/imed/pfm/';  // 外网