浏览代码

fix 当事人保存/评分计算 bug

xieyunhui 4 年之前
父节点
当前提交
53fbfebe66

二进制
.DS_Store


+ 249 - 148
components/index-list/index-list.vue

@@ -1,150 +1,251 @@
-<template>
-	<view class="container">
-		<scroll-view   scroll-y="true" class="scroll-Y" 
-		>
-			<view class="box" v-for="item in options">
-				  <view class="letter">{{item.letter}}</view>
-				  <view class="listWrap">
-				  	   <view class="list" v-for="val in item.data" @click="listClickHandle(val)">
-						     <view class="iconWrap">
-						     	  <image v-if="isSelectAll||checkedListIds.includes(val.id)" class="checkedIcon" src="../../static/check-checkbox.png" mode=""></image>
-						     </view>
-				  	   	     <text class="mainText">{{val.main}}</text>
-							 <text class="subText">{{val.sub}}</text>
-				  	   </view>
-				  </view>
-			</view>
-		</scroll-view> 
-	</view>
-</template>
+<template>
+	<view class="container">
+		<!-- <view class="indexPosition">
+			<view class="activeKey" v-for="(item,index) in keyList"  @click="activeKeyHandle(item)">{{item}}
+			</view>
+		</view> -->
+		<scroll-view scroll-y="true" class="scroll-Y" :scroll-top="top" scroll-with-animation="true" @scroll="scroll">
+			<view :class="[`box ${item.letter}`]" v-for="item in options">
+				<view class="letter">{{item.letter}}</view>
+				<view class="listWrap">
+					<view class="list" v-for="val in item.data" @click="listClickHandle(val)">
+						<view :class="[isSelectAll||checkedListIds.includes(val.id)?'iconWrap':'iconWrap on']">
+							<image v-if="isSelectAll||checkedListIds.includes(val.id)" class="checkedIcon"
+								src="../../static/check-checkbox.png" mode=""></image>
+						</view>
+						<text class="mainText">{{val.main}}</text>
+						<text class="subText">{{val.sub}}</text>
+					</view>
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "index-list",
+		props: {
+			checkedResponsibleList: Array,
+			options: Array,
+		},
+		data() {
+			return {
+				checkedList: [],
+				checkedListIds: [],
+				isSelectAll: false,
+				keyList: [
+					'A', 'B', 'C', 'D'
+				],
+				top:0
+			};
+		},
+		computed: {
+
+		},
+		watch: {
+			checkedResponsibleList: function(newVal, oldVal) {
+				// console.log({newVal,oldVal});
+				if (newVal.length != oldVal.length) {
+					this.checkedListIds = JSON.parse(JSON.stringify(newVal)).map(item => item.id);
+					this.checkedList = JSON.parse(JSON.stringify(newVal));
+					this.$emit("listClick", this.checkedList);
+				}
+
+			},
+			options:function(){
+			    this.checkedList=[];
+				this.checkedListIds = JSON.parse(JSON.stringify(this.checkedResponsibleList)).map(item => item.id);
+				this.checkedList = JSON.parse(JSON.stringify(this.checkedResponsibleList));
+			}
+		},
+		mounted() {
+			this.checkedListIds = JSON.parse(JSON.stringify(this.checkedResponsibleList)).map(item => item.id);
+			this.checkedList = JSON.parse(JSON.stringify(this.checkedResponsibleList));
+			// console.log(this.checkedListIds);
+		},
+		methods: {
+			scroll(event){
+				const {scrollLeft, scrollTop, scrollHeight, scrollWidth, deltaX, deltaY} = event.detail;
+				console.log({scrollTop});
+			},
+			activeKeyHandle(key) {
+				this.getDescBox(`.${key.toLowerCase()}`).then(res=>{
+					   console.log({res});
+					   console.log(`.${key.toLowerCase()}`);
+					   if(!res||res-80<=0||res == this.top-80)return;
+					   this.top = res-80;
+					   
+					   // let timer = setInterval(()=>{
+						  //    this.top = this.top + 500;
+							 // if(this.top >=res-100 ){
+								//  clearInterval(timer);
+							 // }
+					   // },60);
+					   // uni.pageScrollTo({
+					   //     duration:500, // 毫秒
+					   // 	  scrollTop:100, // 位置
+						  //  complete:()=>{
+							 //   console.log('done');
+						  //  }
+					   // });
 
-<script>
-	export default {
-		name:"index-list",
-		props:{
-			checkedResponsibleList:Array,
-			options:Array,
-		},
-		data() {
-			return {
-				checkedList:[],
-				checkedListIds:[],
-				isSelectAll:false
-			};
-		},
-		computed:{
-             
-		},
-		watch:{
-	         checkedResponsibleList:function(newVal,oldVal){
-				  // console.log({newVal,oldVal});
-				  if(newVal.length != oldVal.length){
-					  this.checkedListIds = JSON.parse(JSON.stringify(newVal)).map(item=>item.id);
-					  this.checkedList = JSON.parse(JSON.stringify(newVal));
-					  this.$emit("listClick",this.checkedList);
-				  }
-				  
-			 }
-		},
-		mounted() {
-			this.checkedListIds = JSON.parse(JSON.stringify(this.checkedResponsibleList)).map(item=>item.id);
-			this.checkedList = JSON.parse(JSON.stringify(this.checkedResponsibleList));
-			// console.log(this.checkedListIds);
-		},
-		methods:{
-			listClickHandle(val){
-				const tempIdsArr = JSON.parse(JSON.stringify(this.checkedListIds));
-				const tempArr = JSON.parse(JSON.stringify(this.checkedList));
-				const data = JSON.parse(JSON.stringify(val));
-				// console.log({tempIdsArr,tempArr});
-				// console.log(tempIdsArr.includes(data.id));
-				
-				if(tempIdsArr.includes(data.id)){
-					  this.isSelectAll = false;
-					  tempIdsArr.splice(tempIdsArr.indexOf(data.id),1);
-					  this.checkedList = tempArr.filter(item=>item.id != data.id);
-					  this.checkedListIds = tempIdsArr;
-				}else {
-					  this.checkedList.push(data);
-					  this.checkedListIds.push(data.id);
-					  // console.log(this.checkedListIds);
-					  
-				}
-				this.$emit("listClick",this.checkedList);
-			}
-		}
-	}
-</script>
-
-<style lang="less">
-    .container {
-		height: 100%;
-		overflow: scroll;
-		.scroll-Y {
-			// height: 100%;
-			 .box {
-			 	.letter {
-			 		height: 62.5rpx;
-			 		line-height: 62.5rpx;
-			 		font-size: 22.5rpx;
-			 		font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-			 		font-weight: 400;
-			 		color: #666F80;
-			 		padding: 0 25rpx;
-			 	}
-			 	.listWrap {
-			 		background-color: #FFFFFF;
-			 		.list {
-			 			position: relative;
-			 			display: flex;
-			 			flex-direction: row;
-			 			justify-content: flex-start;
-			 			align-items: center;
-			 			height:87.5rpx;
-			 			padding: 0 25rpx;
-			 			.iconWrap {
-			 				width: 25rpx;
-			 				height: 25rpx;
-			 				margin-right: 25rpx;
-			 				.checkedIcon {
-			 					width: 25rpx;
-			 					height: 25rpx;
-			 					
-			 				}
-			 			}
-			 			.mainText {
-			 				display: inline-block;
-			 				font-size: 22.5rpx;
-			 				font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-			 				font-weight: 400;
-			 				color: #292C33;
-			                 margin-right: 50rpx;
-			 			}
-			 			.subText {
-			 				font-size: 22.5rpx;
-			 				font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-			 				font-weight: 400;
-			 				color: #7A8499;
-			 			}
-			 			
-			 			&::after {
-			 				position: absolute;
-			 				right: 0;
-			 				bottom: 0;
-			 				display: block;
-			 				content: '';
-			 				width: 90%;
-			 				border-bottom: 1px solid #DADEE6;
-			 			}
-			 			
-			 			&:last-child {
-			 				&::after {
-			 					display: none;
-			 				}
-			 			}
-			 		}
-			 	}
-			 }
-		}
-	}
+				});
+			},
+			// 获取元素距离顶部的高度
+			getDescBox(className) {
+				let that = this;
+				let count = 0;
+				return new Promise(resolve => {
+					getHeight();
+
+					function getHeight() {
+						uni
+							.createSelectorQuery()
+							.in(that)
+							.select(className)
+							.boundingClientRect()
+							.exec(res => {
+								if (res[0]) {
+									resolve(res[0].top);
+								} else {
+									that.$nextTick(() => {
+										++count <= 8 ? getHeight() : resolve(null);
+									});
+								}
+							});
+					}
+				});
+			},
+
+			listClickHandle(val) {
+				const tempIdsArr = JSON.parse(JSON.stringify(this.checkedListIds));
+				const tempArr = JSON.parse(JSON.stringify(this.checkedList));
+				const data = JSON.parse(JSON.stringify(val));
+				// console.log({tempIdsArr,tempArr});
+				// console.log(tempIdsArr.includes(data.id));
+
+				if (tempIdsArr.includes(data.id)) {
+					this.isSelectAll = false;
+					tempIdsArr.splice(tempIdsArr.indexOf(data.id), 1);
+					this.checkedList = tempArr.filter(item => item.id != data.id);
+					this.checkedListIds = tempIdsArr;
+				} else {
+					this.checkedList.push(data);
+					this.checkedListIds.push(data.id);
+					// console.log(this.checkedListIds);
+
+				}
+				this.$emit("listClick", this.checkedList);
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.container {
+		position: relative;
+		z-index: 1;
+		height: 100%;
+		overflow: scroll;
+		.indexPosition {
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			align-items: center;
+			position: absolute;
+			z-index: 10;
+			right: 0;
+			width: 50rpx;
+			height: 100%;
+			background-color: red;
+
+			.activeKey {
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				flex: 1;
+				width: 100%;
+			}
+		}
+
+		.scroll-Y {
+
+			height: 100%;
+			.box {
+				.letter {
+					height: 62.5rpx;
+					line-height: 62.5rpx;
+					font-size: 22.5rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #666F80;
+					padding: 0 25rpx;
+				}
+
+				.listWrap {
+					background-color: #FFFFFF;
+
+					.list {
+						position: relative;
+						display: flex;
+						flex-direction: row;
+						justify-content: flex-start;
+						align-items: center;
+						height: 87.5rpx;
+						padding: 0 25rpx;
+
+						.iconWrap {
+							width: 25rpx;
+							height: 25rpx;
+							margin-right: 25rpx;
+
+							.checkedIcon {
+								width: 25rpx;
+								height: 25rpx;
+
+							}
+
+							&.on {
+								border-radius: 50%;
+								border: 2.5rpx solid #C3CAD9;
+							}
+						}
+
+						.mainText {
+							display: inline-block;
+							font-size: 22.5rpx;
+							font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+							font-weight: 400;
+							color: #292C33;
+							margin-right: 50rpx;
+						}
+
+						.subText {
+							font-size: 22.5rpx;
+							font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+							font-weight: 400;
+							color: #7A8499;
+						}
+
+						&::after {
+							position: absolute;
+							right: 0;
+							bottom: 0;
+							display: block;
+							content: '';
+							width: 90%;
+							border-bottom: 1px solid #DADEE6;
+						}
+
+						&:last-child {
+							&::after {
+								display: none;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
 </style>

+ 4 - 1
manifest.json

@@ -2,7 +2,7 @@
     "name" : "追踪方法学",
     "appid" : "__UNI__03C4C69",
     "description" : "",
-    "versionName" : "0.6.3",
+    "versionName" : "0.6.5",
     "versionCode" : 100,
     "transformPx" : false,
     "app-plus" : {
@@ -15,6 +15,9 @@
             "autoclose" : true,
             "delay" : 0
         },
+        "compatible" : {
+            "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持  
+        },
         /* 模块配置 */
         "distribute" : {
             /* 应用发布信息 */

+ 1 - 1
pages.json

@@ -198,7 +198,7 @@
         }
     ],
 	"globalStyle": {
-		"navigationStyle": "default",
+		"navigationStyle": "custom",
 		"autoBackButton": true,
 		// "homeButton": true,
 		"navigationBarTextStyle": "black",

+ 9 - 5
pages/checkMainPoints/checkMainPoints.vue

@@ -230,8 +230,11 @@
 				}).then((data) => {
 					if (data) {
 						// console.log({data});
+						const nowPermission = JSON.parse(uni.getStorageSync('nowPermission'));
+						console.log({nowPermission});
 						this.$store.commit('checkMainPoints/comChangeState',{key:'detailList',data:data.checkDetailMapResponses});
-						if(!data.isBindResponsible){
+						if(!data.isBindResponsible&&data.checkDetailMapResponses.length>0&&nowPermission==3){
+							//当未绑定当事人状态为false,可查核项大于0且当前角色是查核组员时
 							uni.showModal({
 							    title: '提示',
 							    content: '目前未批量分配当事人,是否前往选择?',
@@ -267,9 +270,10 @@
 				// 查核者,管理员
 				if (this.nowPermission == 1 || this.nowPermission == 3) {
 					let str = '',
-						that = this;
-					if (child.checkResult) {
-						// 跳转到查核项详情
+						that = this;
+						
+					if (child.checkResult&&!child.allowEdit) {
+						// 当存在查核结果且不允许再修改时 跳转到查核项详情
 						str = 'auditItemDetails/auditItemDetails';
 					} else {
 						if (this.nowPermission == 1) {
@@ -423,7 +427,7 @@
 				}
 				.midLine {
 					height:17.5rpx;
-					border-left: 1px solid #DADEE6;
+					border-left: 0.62rpx solid #DADEE6;
 				}
 			}
 			.botOneKeyCheck {

+ 1 - 1
pages/home/home.vue

@@ -99,7 +99,7 @@
 			return {
 				ifshowVersionInfo:false,
 				showJournal: false,
-				version: '0.6.3',
+				version: '0.6.5',
 				versionData: {
 					versionNo: '',
 					versionId: '',

+ 2 - 2
pages/login/login.vue

@@ -26,7 +26,7 @@
 				 	  <view class="modalBar">开发者模式</view>
 					  <input class="keyInutArea" type="text" @input='setHospSign' placeholder="请输入hospSign" />
 					  <button class="commitActBtn" @click="updateHospSign(true)" type="default">确定</button>
-					  <button class="commitActBtn" @click="updateHospSign(false)" type="default">取消</button>
+					  <button class="commitActBtn" @click="updateHospSign(false)" type="default">确定</button>
 				 </view>
 			</view>
 		</tm-modal>
@@ -39,7 +39,7 @@
 		data() {
 			return {
 				index:0,
-				appHospSign:'8CJYqxlGIdLEIwaG',//app端更新hospSign
+				appHospSign:'tYAoFaa20yCAgaiy',//app端更新hospSign
 				showInputModal:false,
 				hospSign: '', // 医院标识
 				username: '', // 用户名

+ 264 - 45
pages/mainPointsDetail/mainPointsDetail.vue

@@ -4,12 +4,19 @@
 		<view class="checkItemResultModal">
 			 <view class="modalContent">
 			 	  <view class="modalBar">请选择查核结果</view>
-				  <scroll-view class="scroll" scroll-y="true" >
+				  <scroll-view v-if="data.checkModelName != '访谈'" class="scroll" scroll-y="true" >
 				  	<view v-for="item in checkItemResultList" :class="[checkedSelectResultListIds.includes(item.id)?'list on':'list']" :key="item.id" @click.stop="selectResultHandle(item)" >
 						<image class="checkIcon" src="../../static/check-checkbox.png" mode=""></image>
 					   {{item.resultName}}
 					</view>
 				  </scroll-view>
+				  
+				  <scroll-view v-if="data.checkModelName == '访谈'" class="scroll" scroll-y="true" >
+				  	<view v-for="item in checkItemResultList" :class="[checkedSelectResultListIds[currentEditTextAreaIndex]&&checkedSelectResultListIds[currentEditTextAreaIndex].includes(item.id)?'list on':'list']" :key="item.id" @click.stop="selectResultHandle(item)" >
+				  						<image class="checkIcon" src="../../static/check-checkbox.png" mode=""></image>
+				  					   {{item.resultName}}
+				  					</view>
+				  </scroll-view>
 				  <view class="comfirmBtn" @click="commitSelectResult">确定</view>
 			 </view>
 		</view>
@@ -105,8 +112,9 @@
 			</view>
 		  </view>
 		  <view class="inputScore">
-		  	<text class="label">本项评分</text>
-			<input class="value" @input="onInputScore" type="number" value="" placeholder="请输入分值" placeholder-class="placeholder" />
+		  	<text class="label">本项扣分</text>
+		<!-- 	<text class="label">{{deductPoint}}</text> -->
+			<input class="value" @input="onInputScore" type="number" v-model="inputScore"  :placeholder="deductPoint" placeholder-class="placeholder" />
 		  </view>
         </view>
       </view>
@@ -122,12 +130,13 @@
             <view class="talkResult">
 			  <view class="seeResultFloorOne">
                    <text class="seeName">查核结果</text>
-				   <view class="plusAction" v-if="checkItemResultList.length>0" @click="openSelectModal">
+				   <view class="plusAction" v-if="checkItemResultList.length>0" @click="openSelectModal(i)">
 				   				<image class="plusIcon" src="../../static/icon-add.png" mode=""></image>
 				   	<text class="threePoint"  >缺陷</text>
 				   </view>
 				   <!-- <text v-if="checkItemResultList.length>0" class="threePoint" @click="openSelectModal(i)">⋮</text> -->
 			  </view>
+			  <text class="clear" @click="clearResult(true,i)">清空</text>
               <textarea
                 maxlength="300"
                 class="seeTextarea"
@@ -159,6 +168,7 @@
 			  <!-- <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"
@@ -226,14 +236,16 @@ export default {
 	  checkItemScore:null,//查核选中的分数
 	  checkItemValue:null,//查核选中的分数占比
 	  checkConfiglist:[],//查核情况可配置列表
-	  totalScore:10,//总分
+	  totalScore:0,//总分
 	  // currentScore:0,//当前得分
-	  inputScore:0,//手动填写分值
+	  inputScore:null,//手动填写分值
 	  selectedScore:0,//缺失项分值
 	  checkedResponsibleList:[],
 	  deptId:'',//病区id
 	  checkedResponsibleData:[],
 	  checkedSelectResultListData:[],
+	  multiSelectScore:[],
+	  deductPointFromRes:0,
     };
   },
   onShow() {
@@ -242,18 +254,43 @@ export default {
   	this.checkedResponsibleList = responsibleList.checkedResponsibleList.map(item=>item.main);
   },
   computed:{
-	  currentScore:function(){
-		   return (this.totalScore-this.inputScore-this.selectedScore-this.checkItemScore).toFixed(2);
+	  // currentScore:function(){
+		 //   return (this.totalScore-this.selectedScore-this.checkItemScore).toFixed(2);
+	  // },
+	  currentScore:{
+		 get: function () {
+			 // console.log(this.inputScore);
+			 // console.log(this.totalScore,this.selectedScore,this.checkItemScore)
+			   if(this.inputScore>0){
+				   return this.totalScore  - this.inputScore;
+			   }
+
+		       return (this.totalScore-this.selectedScore-this.checkItemScore-this.deductPointFromRes).toFixed(2);
+		 },
+		 set:function(newValue){
+			 // const everyCount = Math.abs((newValue)/2);
+			 // this.selectedScore = everyCount;
+			 // this.checkItemScore = everyCount;
+			 // this.inputScore = this.inputScore + newValue;
+		 },
+		 
 	  },
+	  //this.inputScore
+	  // score:function(){
+		 //  return this.inputScore+Math.abs(this.currentScore)
+	  // },
 	  deductPoint:function(){
-		  // console.log(Number(this.inputScore)+Number(this.selectedScore)+Number(this.checkItemScore));
-		  return (Number(this.inputScore)+Number(this.selectedScore)+Number(this.checkItemScore)).toFixed(2)
+		  console.log(Number(this.inputScore),Number(this.selectedScore),Number(this.checkItemScore));
+		  if(this.inputScore){
+			   return this.inputScore;
+		  }
+		  return (this.deductPointFromRes-Number(this.inputScore)+Number(this.selectedScore)+Number(this.checkItemScore)).toFixed(2)
 	  }
   },
   watch:{
 	  checkedResponsibleList:function(){
 		   const {responsibleList} = this.$store.state;
-		   // console.log({responsibleList});
+		   console.log({responsibleList});
 		   return responsibleList.checkedResponsibleList.map(item=>item.main);
 	  }
   },
@@ -263,6 +300,26 @@ export default {
 	
   },
   methods: {
+	//查核结果清空操作
+	clearResult(ifMulti,index){
+		if(ifMulti){
+			//多个查核结果组件时
+			this.talkList[index].talkResult = '';
+			this.multiSelectScore[index] = 0;
+			this.selectedScore = this.multiSelectScore.reduce((prev,cur)=>(prev+cur),0);
+			
+			this.checkedSelectResultListIds.splice(index,1,[]);
+			this.checkedSelectResultList.splice(index,1,[]);
+			this.checkedSelectResultListData.splice(index,1,[]);
+						
+		}else {
+			this.recordList[0].seeResult='';
+			this.selectedScore = 0;
+			this.checkedSelectResultListIds=[];
+			this.checkedSelectResultList=[];
+			this.checkedSelectResultListData=[];
+		}
+	},
 	clickModalhandle(){
 		this.showSelectModal = false;
 	},
@@ -282,38 +339,87 @@ export default {
 	},
 	onInputScore(e){
 		this.inputScore = e.target.value;
+		this.currentScore = e.target.value;
 	},
     selectResultHandle(item){
-		// console.log({val});
-		// console.log('currentEditTextAreaIndex',this.currentEditTextAreaIndex);
-		if(this.checkedSelectResultListIds.includes(item.id)){
-			const tempIdsArr = JSON.parse(JSON.stringify(this.checkedSelectResultListIds));
-			const tempArr = JSON.parse(JSON.stringify(this.checkedSelectResultList));
-			const tempArrData = JSON.parse(JSON.stringify(this.checkedSelectResultListData));
-			tempIdsArr.splice(tempIdsArr.indexOf(item.id),1);
-			tempArr.splice(tempArr.indexOf(item.resultName),1);
-			tempArrData.splice(tempArrData.indexOf(item.id),1);
-			this.checkedSelectResultListIds = tempIdsArr;
-			this.checkedSelectResultList = tempArr;
-			this.checkedSelectResultListData = tempArrData;
+	
+		if(this.data.checkModelName == '访谈'){
+			const currentIndex = this.currentEditTextAreaIndex;
+			 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]));
+				  
+				  tempIdsArr.splice(tempIdsArr.indexOf(item.id),1);
+				  tempArr.splice(tempArr.indexOf(item.resultName),1);
+				  tempArrData.splice(tempArrData.indexOf(item.id),1);
+				  
+				  // console.log({tempIdsArr});
+				  
+				  this.checkedSelectResultListIds.splice(currentIndex,1,tempIdsArr);
+				  this.checkedSelectResultList.splice(currentIndex,1,tempArr);
+				  this.checkedSelectResultListData.splice(currentIndex,1,tempArrData);
+			 }else {
+				  if(!Array.isArray(this.checkedSelectResultListIds[currentIndex]))this.checkedSelectResultListIds[currentIndex]=[];
+				  if(!Array.isArray(this.checkedSelectResultList[currentIndex]))this.checkedSelectResultList[currentIndex]=[];
+				  if(!Array.isArray(this.checkedSelectResultListData[currentIndex]))this.checkedSelectResultListData[currentIndex]=[];
+				  
+				  const tempIdsArr = this.checkedSelectResultListIds[currentIndex].concat([item.id]);
+				  const tempArr = this.checkedSelectResultList[currentIndex].concat([item.resultName]);
+				  const tempArrData = this.checkedSelectResultListData[currentIndex].concat([item]);
+		          
+				  this.checkedSelectResultListIds.splice(currentIndex,1,tempIdsArr);
+				  this.checkedSelectResultList.splice(currentIndex,1,tempArr);
+				  this.checkedSelectResultListData.splice(currentIndex,1,tempArrData);
+				  // console.log(this.checkedSelectResultListIds[currentIndex],`index:${currentIndex}`);
+			 }
 		}else {
-			this.checkedSelectResultListIds.push(item.id);
-			this.checkedSelectResultList.push(item.resultName);
-			this.checkedSelectResultListData.push(item);
+			 if(this.checkedSelectResultListIds.includes(item.id)){
+			 	const tempIdsArr = JSON.parse(JSON.stringify(this.checkedSelectResultListIds));
+			 	const tempArr = JSON.parse(JSON.stringify(this.checkedSelectResultList));
+			 	const tempArrData = JSON.parse(JSON.stringify(this.checkedSelectResultListData));
+			 	tempIdsArr.splice(tempIdsArr.indexOf(item.id),1);
+			 	tempArr.splice(tempArr.indexOf(item.resultName),1);
+			 	tempArrData.splice(tempArrData.indexOf(item.id),1);
+			 	this.checkedSelectResultListIds = tempIdsArr;
+			 	this.checkedSelectResultList = tempArr;
+			 	this.checkedSelectResultListData = tempArrData;
+			 }else {
+			 	this.checkedSelectResultListIds.push(item.id);
+			 	this.checkedSelectResultList.push(item.resultName);
+			 	this.checkedSelectResultListData.push(item);
+			 }
 		}
 	},
 	commitSelectResult(){
+		
+		
 		if(this.data.checkModelName == '访谈'){
-			this.talkList[this.currentEditTextAreaIndex].talkResult = this.checkedSelectResultList.join(',');
+			const tempArr = this.checkedSelectResultListData[this.currentEditTextAreaIndex].map(item=>item.percentScore);
+			const tempScore = tempArr.reduce((prev,cur)=>{
+				   // return ((prev/100)*this.totalScore)+((cur/100)*this.totalScore)
+				   return prev + cur;
+			},0);
+			
+			this.talkList[this.currentEditTextAreaIndex].talkResult = this.checkedSelectResultList[this.currentEditTextAreaIndex].join(',');
+			this.multiSelectScore[this.currentEditTextAreaIndex] = tempScore;
+			this.selectedScore = this.multiSelectScore.reduce((prev,cur)=>(prev+cur),0);
+		    // console.log(this.selectedScore,this.multiSelectScore[this.currentEditTextAreaIndex],tempScore,tempArr,this.checkedSelectResultListData);
 		}else {
+			const tempArr = this.checkedSelectResultListData.map(item=>item.percentScore);
+			const tempScore = tempArr.reduce((prev,cur)=>{
+				   return prev + cur;
+			},0);
 			this.recordList[0].seeResult = this.checkedSelectResultList.join(',');
+			this.selectedScore = tempScore;
 		}
-		const tempArr = this.checkedSelectResultListData.map(item=>item.percentScore);
-		const tempScore = tempArr.reduce((prev,cur)=>{
-			   return (prev/100)+(cur/100)
-		},0);
+		// const tempArr = this.checkedSelectResultListData.map(item=>item.percentScore);
+		// const tempScore = tempArr.reduce((prev,cur)=>{
+		// 	   return (prev/100)+(cur/100)
+		// },0);
+		
 		
-		this.selectedScore = this.totalScore*tempScore;
 		// console.log({tempScore});
 		// console.log(this.selectedScore);
 		
@@ -332,6 +438,66 @@ export default {
 		  // console.log({res});
 		  this.id = id;
 		  this.deptId = res.deptId;
+		  //再次编辑回显
+		  this.totalScore = res.totalScore;
+		  this.deductPointFromRes = res.deductPoint;
+		
+		  if(res.lastResult){
+			  const lastConfig = this.checkConfiglist.filter(item=>item.attr == res.lastResult);
+			  this.checkItemScore = lastConfig[0].score*lastConfig[0].value;
+		  }
+		  
+		  // this.deductPoint = res.deductPoint;
+		  if(res.checkResultRequestList&&res.checkResultRequestList.length>0){
+			      if(res.checkModelName == '访谈'){
+			      			  this.talkList = res.checkResultRequestList.map((item,currentIndex)=>{
+			      			  			  const arr = item.checkResultDescribe.split(',');
+			      			  			  const tempResult= this.checkItemResultList.filter(v=>arr.includes(v.resultName));
+			      			  			  // console.log({tempResult});
+			      						  
+			      						  if(!Array.isArray(this.checkedSelectResultListIds[currentIndex]))this.checkedSelectResultListIds[currentIndex]=[];
+			      						  if(!Array.isArray(this.checkedSelectResultList[currentIndex]))this.checkedSelectResultList[currentIndex]=[];
+			      						  if(!Array.isArray(this.checkedSelectResultListData[currentIndex]))this.checkedSelectResultListData[currentIndex]=[];
+			      						  
+			      						  const tempIdsArr = this.checkedSelectResultListIds[currentIndex].concat(tempResult.map(item=>item.id));
+			      						  const tempArr = this.checkedSelectResultList[currentIndex].concat(tempResult.map(item=>item.resultName));
+			      						  // const tempArrData = this.checkedSelectResultListData[currentIndex].concat(tempResult.map(item=>item));
+			      						  
+			      						  this.checkedSelectResultListIds.splice(currentIndex,1,tempIdsArr);
+			      						  this.checkedSelectResultList.splice(currentIndex,1,tempArr);
+			      						  this.checkedSelectResultListData.splice(currentIndex,1,tempResult);
+			      						  
+			      						  const tempArrFull = this.checkedSelectResultListData[currentIndex].map(item=>item.percentScore);
+			      						  const tempScore = tempArrFull.reduce((prev,cur)=>{
+			      						  	   return prev + cur;
+			      						  },0);
+			      			              this.multiSelectScore[currentIndex] = tempScore;
+			      			  			  return {
+			      			  				  talkResult:item.checkResultDescribe,
+			      			  				  filePath:item.checkResultUrl !=''?item.checkResultUrl.split(','):[]
+			      			  			  } 
+			      			  });
+			      			  //设置回显分数
+			      			  // this.selectedScore = this.multiSelectScore.reduce((prev,cur)=>(prev+cur),0);
+							  
+			      }else {
+					    //       console.log('非访谈');
+							  // console.log(res.checkResultRequestList[0]);
+			      			  const arr = res.checkResultRequestList[0].checkResultDescribe.split(',');
+			      			  const tempResult= this.checkItemResultList.filter(v=>arr.includes(v.resultName));
+							  const tempIds = tempResult.map(item=>item.id);
+							  const scores =  tempResult.map(item=>item.percentScore);
+							  const tempScore = scores.reduce((prev,cur)=>(prev+cur),0);
+			      			  this.recordList[0].seeResult = res.checkResultRequestList[0].checkResultDescribe;
+			      			  this.checkedSelectResultListIds=tempIds;
+			      			  this.checkedSelectResultList=res.checkResultRequestList[0].checkResultDescribe.split(',');
+			      			  this.checkedSelectResultListData=tempResult;
+							  this.selectedScore = tempScore;
+							  // console.log(this.checkedSelectResultListIds,tempResult,tempIds,tempScore,this.selectedScore);
+			      			  
+			      }
+		  }
+		  
 		  //用于当时人页面回显
 		  if(res.responsibleUserName){
 			  const tempResponsibleUserName = res.responsibleUserName.split(',');
@@ -341,11 +507,15 @@ export default {
 				   main:item,
 				   id:parseInt(tempResponsibleUserId[index])
 			  }));
-			 
+			  console.log({arr});
 			  this.$store.commit('responsibleList/updateCheckedResponsibleList',arr);
+		  }else{
+			  this.checkedResponsibleList = [];
+			  this.$store.commit('responsibleList/updateCheckedResponsibleList',[]);
 		  }
 		  
           if (res) {
+			console.log({res});
             this.data = res;			
             if (res && res.lastResult == "不适用") {
               // this.lastIndex = 1;
@@ -380,7 +550,8 @@ export default {
 		// console.log({parsedData})
 		this.Index = parsedData.attr;
 		this.data.checkResult = parsedData.attr;
-		this.checkItemScore = parsedData.score;
+		this.checkItemScore = parsedData.score*parsedData.value;
+		console.log(this.checkItemScore,parsedData);
 		this.checkItemValue = parsedData.value;
 		
    //    this.Index = data;
@@ -448,7 +619,7 @@ export default {
 		  // responsibleUserId:(this.checkedResponsibleData.map(item=>item.id)).join(','),
 		  // responsibleUserName:(this.checkedResponsibleData.map(item=>item.main)).join(','),
 		  score:Number(this.currentScore),
-		  deductPoint:Number(this.deductPoint),
+		  deductPoint:Number(this.inputScore?this.inputScore:this.deductPoint),
         };
         if (this.data.checkModelName == "访谈") {
           let list = [];
@@ -501,7 +672,7 @@ export default {
               },
             },
           }).then((res) => {
-			console.log({'res':res,'checkConfiglist':checkConfiglist});
+			// console.log({'res':res,'checkConfiglist':checkConfiglist});
             if (res) {
               for (let i = 0; i < checkConfiglist.length; i++) {
                 if (
@@ -541,15 +712,15 @@ export default {
                           ...param,
                         },
                       },
-					}).then(() => {
-					  
 					});
                 }else {
 					 console.log('改善条件为false');
 				}
               }
+			  console.log('w');
 			  if(key=='back'){
 				  //点完成时返回
+				  console.log('开始返回');
 				  _goBackFresh('pages/checkMainPoints/checkMainPoints');
 			  }
 			  // _goBackFresh('pages/checkMainPoints/checkMainPoints');
@@ -603,13 +774,26 @@ export default {
 	   */
       
     },
-	clearForm(){
+	clearForm(index){
 		 this.Index = '';
+		 this.deductPoint = 0;
+		 this.currentScore = 0;
+		 this.inputScore = 0;
 		 if(this.data.checkModelName == '访谈'){
-		 	this.talkList[this.currentEditTextAreaIndex].talkResult = '';
+			 if(index){
+				 this.talkList[index].talkResult = '';
+			 }else {
+				 for(let i=0;i<this.talkList.length;i++){
+					 this.talkList[i].talkResult = '';
+				 }
+			 }
+		 	
 		 }else {
 		 	this.recordList[0].talkResult ='';
 		 }
+		 this.checkedSelectResultListIds=[];
+		 this.checkedSelectResultList=[];
+		 this.checkedSelectResultListData=[];
 	},
 	goToPrevPage(){
 		_goBackFresh('pages/checkMainPoints/checkMainPoints');
@@ -654,6 +838,7 @@ export default {
 				data:checkItemId
 			}
 		}).then(data=>{
+			// console.log({data});
 			this.checkConfiglist = data
 		})
 	},
@@ -1006,7 +1191,7 @@ export default {
 			  font-size: 22.5rpx;
 			  font-family: SourceHanSansCN-Normal, SourceHanSansCN;
 			  font-weight: 400;
-			  color: #B8BECC;
+			  color: #525866;
 		  }
 	  }
     }
@@ -1017,10 +1202,21 @@ export default {
     background-color: #fff;
     // padding-left: 25rpx;
     .seeResult {
+	  position: relative;
       margin-left: 25rpx;
       padding-top: 32.5rpx;
       // height: 200rpx;
       border-bottom: 1px solid #dadee6;
+	  .clear {
+		  position: absolute;
+		  z-index: 10;
+		  right: 25rpx;
+		  bottom: 25rpx;
+		  font-size: 22.5rpx;
+		  font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+		  font-weight: 400;
+		  color: #FF3355;
+	  }
 	  .seeResultFloorOne {
 		  display: flex;
 		  flex-direction: row;
@@ -1085,10 +1281,21 @@ export default {
       }
     }
     .talkResult {
+	  position: relative;
       padding-left: 25rpx;
       padding-top: 32.5rpx;
       border-bottom: 1px solid #dadee6;
       background-color: #fff;
+	  .clear {
+	  		  position: absolute;
+			  z-index: 10;
+	  		  right: 25rpx;
+	  		  bottom: 25rpx;
+	  		  font-size: 22.5rpx;
+	  		  font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+	  		  font-weight: 400;
+	  		  color: #FF3355;
+	  }
 	  .seeResultFloorOne {
 	  		  display: flex;
 	  		  flex-direction: row;
@@ -1096,10 +1303,22 @@ export default {
 	  		  align-items: center;
 	  		  margin-bottom: 25rpx;
 	  		  padding-right: 25rpx;
-	  		  .threePoint {
-	  			  padding-left: 12.5rpx;
-	  			  font-size: 20rpx;
-	  			  font-weight:700;
+	  		  .plusAction {
+				  display: flex;
+				  flex-direction: row;
+				  justify-content: center;
+				  align-items: center;
+				  .plusIcon {
+					  width: 25rpx;
+					  height: 25rpx;
+					  margin-right: 10rpx;
+				  }
+	  		      .threePoint {
+				   font-size: 22.5rpx;
+				   font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+				   font-weight: 400;
+				   color: #7A8599;
+	  		      }
 	  		  }
 	  }
       .seeName {

+ 39 - 16
pages/responsibleList/responsibleList.vue

@@ -19,7 +19,7 @@
 			<view class="selectAll" @click="selectAllHandle">
 				<image v-if="selectAll" class="icon" src="../../static/selectAll.png" mode=""></image>
 				<image v-if="!selectAll" class="icon" src="../../static/selectAllnoclor.png" mode=""></image>
-				<text :class="[selectAll?'text on':'text']">全选</text>
+				<text :class="[selectAll?'text on':'text']">{{selectAll?'取消':'全选'}}</text>
 			</view>
 			<view class="cancelBtn" @click="cancelCheck">取消</view>
 			<view class="comfirm" @click="sureCheck">确定</view>
@@ -34,6 +34,8 @@
 			return {
 				currentTabIndex:0,
 				checkedResponsibleListTemp:[],
+				checkedResponsibleListTemp_all:[],
+				checkedResponsibleListTemp_dept:[],
 				checkedResponsibleList:[],//已选择的当事人列表
 				list:[],
 				checkId:'',
@@ -72,7 +74,7 @@
 		},
 		onShow() {
 			const {responsibleList} = this.$store.state;
-			console.log({responsibleList});
+			// console.log({responsibleList});
 			this.checkedResponsibleList = responsibleList.checkedResponsibleList;
 		},
 		mounted(){
@@ -84,15 +86,20 @@
 				
 			},
 			selectAllHandle(){
-				
-				this.selectAll = true;
-				const getResponsibleListIds = (arr,index)=>{
-					if(index == arr.length-1){
-						return arr[index].data
+				if(!this.selectAll){
+					this.selectAll = true;
+					const getResponsibleListIds = (arr,index)=>{
+						if(index == arr.length-1){
+							return arr[index].data
+						}
+						return arr[index].data.concat(getResponsibleListIds(arr,index+1))
 					}
-					return arr[index].data.concat(getResponsibleListIds(arr,index+1))
+					this.checkedResponsibleList = getResponsibleListIds(this.list,0);
+				}else {
+					this.selectAll = false;
+					this.checkedResponsibleList = [];
 				}
-				this.checkedResponsibleList = getResponsibleListIds(this.list,0);
+				
 				// console.log('selectAllHandle',this.checkedResponsibleList);
 			},
 			keywordsHandle(e){
@@ -121,11 +128,24 @@
 			},
 			//当事人列表点击handle
 			listClickHandle(checkedList){
-				this.checkedResponsibleListTemp = checkedList;
+				if(this.currentTabIndex == 0){
+					//全院
+					this.checkedResponsibleListTemp_all = checkedList;
+				}
+				
+				if(this.currentTabIndex == 1){
+					//当前病区
+					this.checkedResponsibleListTemp_dept = checkedList;
+				}
+				
+				console.log(this.currentTabIndex,this.checkedResponsibleListTemp_all,this.checkedResponsibleListTemp_dept)
+				
 			},
 			sureCheck(){
-				const responsibleUserIds = this.checkedResponsibleListTemp.map(item=>item.id);
-				const responsibleUserNames = this.checkedResponsibleListTemp.map(item=>item.main);
+				const responsibleUserIds = this.currentTabIndex == 0?this.checkedResponsibleListTemp_all.map(item=>item.id):this.checkedResponsibleListTemp_dept.map(item=>item.id);
+				const responsibleUserNames = this.currentTabIndex == 0?this.checkedResponsibleListTemp_all.map(item=>item.main):this.checkedResponsibleListTemp_dept.map(item=>item.main);
+				// console.log({responsibleUserIds,responsibleUserNames});
+				// return;
 				if(this.isFromCheckMainPoints){
 					//批量保存当事人
 					const {checkMainPoints:{detailList}} = this.$store.state;
@@ -133,7 +153,7 @@
 						if(index == arr.length-1){
 							return arr[index].responseList
 						}
-						return arr[index].responseList.concat(getResponsibleListIds(arr,index+1))
+						return arr[index].responseList.concat(detailListFlat(arr,index+1))
 					}
 					const tempCheckIds = detailListFlat(detailList,0);
 					const checkIds = tempCheckIds.map(item=>item.id);
@@ -175,7 +195,7 @@
 					      },
 					    }
 					});
-					this.$store.commit('responsibleList/updateCheckedResponsibleList',this.checkedResponsibleListTemp);
+					this.$store.commit('responsibleList/updateCheckedResponsibleList',this.currentTabIndex == 0?this.checkedResponsibleListTemp_all:this.checkedResponsibleListTemp_dept);
 					uni.navigateBack({
 					    delta: 1
 					});
@@ -194,6 +214,8 @@
 				 }else {
 					 this.deptId ='';
 				 }
+				 // this.checkedResponsibleListTemp = [],
+				 // this.checkedResponsibleList = [],
 				 this.getResponsibleList();
 				 this.currentTabIndex = index;
 			}
@@ -206,8 +228,9 @@
 		display: flex;
 		height: 100%;
 		flex-direction: column;
-		.top {
-				 height: 170rpx;
+		.top {   position: relative;
+		         z-index: 10;
+				 height: 200rpx;
 				 padding: 0 25rpx;
 				 padding-top: 18.75rpx;
 				 background-color: #FFFFFF;

+ 3 - 2
utils/compatible.js

@@ -21,14 +21,15 @@ export const _goBackFresh = (pathName)=>{
 	const pages = getCurrentPages();
 	const reversed = pages.reverse();
 	const currentPageIndex = 0;
-	// console.log({reversed});
+	console.log({reversed,pages});
 
 	if(true){
 		pages.some((item,index)=>{
 			  // console.log('循环');
+			  console.log({item});
 			  if(item.route == pathName){
 				  let needdelta =index-currentPageIndex;
-				  // console.log({needdelta,index,currentPageIndex});
+				  console.log({needdelta,index,currentPageIndex});
 				  //通知返回目标页面刷新数据
 				  item.ifFromChildPage=true;
 				  uni.navigateBack({

+ 3 - 2
utils/requestUrl.js

@@ -7,11 +7,12 @@
  * @FilePath: /web_TracerMethodology/utils/requestUrl.js
  */
 // const base = '192.168.51.80:8801/imed/pfm/';
-export const URL = '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 = '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/';  // 外网
-// export const URL = '121.43.139.179:8801/imed/pfm/';  // 云端服务1
+export const URL = '121.43.139.179:8801/imed/pfm/';  // 云端服务1
 // export const URL = '172.18.116.20:8801/imed/pfm/';  // 云端服务2
 
 // export const URL = '172.18.116.20:9002/imed/pfm/';  // 云端服务2