xieyunhui 4 éve
szülő
commit
a0221ef123

+ 14 - 0
pages/checkList/checkList.vue

@@ -11,6 +11,7 @@
 				v-for="(item, index) in depList" 
 				@click="gotoCheckMainPointsPage(item)"
 				:key="index">
+				<view class="status" :style="{'background-color':item.color}">{{item.completeDes}}</view>
 				<view class="title-wrap">
 					<text>{{item.deptName}}</text>
 					<view>
@@ -156,6 +157,19 @@
 		}
 		.item {
 			position: relative;
+			.status {
+				position: absolute;
+				width: 100rpx;
+				height: 35rpx;
+				top:0;
+				right: 0;
+				text-align: center;
+				font-size: 17.5rpx;
+				font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+				font-weight: 500;
+				color: #FFFFFF;
+				border-radius: 0px 5rpx 0px 28.12rpx;
+			}
 		}
 		.icon-wrap {
 			position: absolute;

+ 197 - 149
pages/checkMainPoints/checkMainPoints.vue

@@ -12,14 +12,20 @@
 			</view>
 		</u-navbar>
 		<uni-popup ref="popup" type="center" :maskClick="true" @change="onMaskChange"></uni-popup>
-		<tm-top-menu v-if="!ifSearchMod">
+		<tm-top-menu v-if="!ifSearchMod" class="tm-top-menu">
 			<template v-if="situationType != 2">
 				<view class="top-search">
 					<view class="search">
 						<input confirm-type="search" @input="filterFromName" placeholder="搜索查核要点或查核项" />
 						<image src="../../static/search.png"></image>
 					</view>
-					<view class="top-btn-wrap">
+					<view class="btnGroup">
+						<image @click="toBindPeople(true)" class="searchBtn" src="../../static/bindPeople.png" mode="">
+						</image>
+						<image @click="openFilter" class="filterBtn" src="../../static/filterIcon.png" mode="">
+						</image>
+					</view>
+					<!-- <view class="top-btn-wrap">
 						<view class="btn-list" v-if="nowPermission == 3">
 							<com-button v-for="(item, index) in btnArr" :btnText="item.label"
 								:type="active === item.id ? 'pramary':'default'" v-on:btnClick="btnClick(item.id)" />
@@ -29,18 +35,20 @@
 							<text>{{getCheckPointName}}</text>
 							<image :src="`../../static/${showModal?'open':'close'}-icon.png`"></image>
 						</view>
-					</view>
+					</view> -->
 				</view>
 			</template>
-			<!-- 			// -->
+			<!-- 查核分页模式下// -->
 			<template v-if="situationType == 2">
 				<view class="top-search-two">
 					<view class="rowOne" v-if="nowPermission == 3 && situationType == 2">
 						<view class="selectPeople" @click="toSelectVisiter">
 							<template v-if="investigationUsers.length>0">
-								<image v-if="currentSelectedInvestigationUser&&currentSelectedInvestigationUser['investigationStatus'] != 1"
+								<image
+									v-if="currentSelectedInvestigationUser&&currentSelectedInvestigationUser['investigationStatus'] != 1"
 									class="completePeopleIcon" src="../../static/peopleIcon.png" mode=""></image>
-								<image v-if="currentSelectedInvestigationUser&&currentSelectedInvestigationUser['investigationStatus'] == 1"
+								<image
+									v-if="currentSelectedInvestigationUser&&currentSelectedInvestigationUser['investigationStatus'] == 1"
 									class="completePeopleIcon" src="../../static/completePeopleIcon.png" mode="">
 								</image>
 								<text
@@ -58,15 +66,16 @@
 							</image>
 						</view>
 					</view>
-					<view class="rowTwo" v-if="nowPermission == 3" :animation="animationData">
-						<text class="rowTwoName">查核状态</text>
-						<view class="filterBtnWrap">
-							<com-button v-for="(item, index) in btnArr" :btnText="item.label" :width="350" :height="80"
-								:type="active === item.id ? 'pramary':'default'" v-on:btnClick="btnClick(item.id)" />
-						</view>
-					</view>
 				</view>
 			</template>
+			<!-- 只有当查核者进入才展示 -->
+			<view class="rowTwo" v-if="nowPermission == 3" :animation="animationData">
+				<text class="rowTwoName">查核状态</text>
+				<view class="filterBtnWrap">
+					<com-button v-for="(item, index) in btnArr" :btnText="item.label" :width="350" :height="80"
+						:type="active === item.id ? 'pramary':'default'" v-on:btnClick="btnClick(item.id)" />
+				</view>
+			</view>
 
 		</tm-top-menu>
 		<tm-modal v-show="showModal" v-on:click="toggleModal(false)">
@@ -92,13 +101,14 @@
 								<text>{{child.checkItemName}}</text>
 								<!-- <text>ICU病房查看危重病人的抢救全过程(访谈)ICU病房查看危重病人的抢救全过程(访谈)ICU病房查看危重病人的抢救全过程(访谈)的抢救全过程(访谈)</text> -->
 							</view>
-							<view class="topRightGroup">
+							<view class="topRightGroup">
 								<!-- showNotApplicable==0展示,1不展示 -->
-								<view class="checkStatus" v-if="!child.showNotApplicable" @click.stop="checkNoApplicable(child)">
-									<image v-if="child.isNoApplicable&&!notApplicableList.includes(child.id)" class="checkIcon"
-										src="../../static/check-no.png" mode=""></image>
-									<image v-if="notApplicableList.includes(child.id)||!child.isNoApplicable" class="checkIcon"
-										src="../../static/check-checkbox.png" mode=""></image>
+								<view class="checkStatus" v-if="!child.showNotApplicable"
+									@click.stop="checkNoApplicable(child)">
+									<image v-if="child.isNoApplicable&&!notApplicableList.includes(child.id)"
+										class="checkIcon" src="../../static/check-no.png" mode=""></image>
+									<image v-if="notApplicableList.includes(child.id)||!child.isNoApplicable"
+										class="checkIcon" src="../../static/check-checkbox.png" mode=""></image>
 									<text class="checkStatusText">{{child.notApplicableName}}</text>
 								</view>
 								<image src="../../static/tuli.png"
@@ -175,7 +185,6 @@
 				],
 				showModal: false,
 				detailList: [],
-				ifFromChildPage: false,
 				copyDetailList: [],
 				point: [{
 					checkPointId: 'all',
@@ -195,8 +204,8 @@
 				searchKey: '', //搜索关键字
 				ifSearchMod: false, //搜索模式
 				applicable: true, //是否适用
-				situationType: null, //情境类型
-				notApplicableList:[],//保存本次check的查核项id
+				situationType: null, //情境类型
+				notApplicableList: [], //保存本次check的查核项id
 
 			};
 		},
@@ -204,28 +213,28 @@
 			...mapState({
 				investigationUsers: state => state.checkMainPoints.investigationUsers,
 				currentSelectedInvestigationUser: state => state.checkMainPoints.currentSelectedInvestigationUser,
-				ifShowBindPeopleDialog:state => state.checkMainPoints.ifShowBindPeopleDialog,
+				ifUpdate:state => state.checkMainPoints.ifUpdate,
 			}),
 			getCheckPointName() {
 				let item = this.point.find((item) => item.checkPointId === this.checkPointId);
 				return item ? item.checkPointName : '';
-			},
+			}
 		},
 		watch: {
-			currentSelectedInvestigationUser(newVal,oldVal) {
+			currentSelectedInvestigationUser(newVal, oldVal) {
 				if (this.situationType == 2) {
-					//更换受访对象时拉取新数据
-					if(newVal&&newVal.investigationUserName==''){
-						//已删除所有访查对象
-						this.$store.commit('checkMainPoints/comChangeState', {
-							key: 'detailList',
-							data:[]
-						});
-						this.detailList=[];
-					}else {
-						this.loadItemData();
-					}
-			    }		
+					//更换受访对象时拉取新数据
+					if (newVal && newVal.investigationUserName == '') {
+						//已删除所有访查对象
+						this.$store.commit('checkMainPoints/comChangeState', {
+							key: 'detailList',
+							data: []
+						});
+						this.detailList = [];
+					} else {
+						this.loadItemData();
+					}
+				}
 			}
 		},
 		onLoad: function({
@@ -247,18 +256,9 @@
 			if (situationType != 2) {
 				this.loadItemData();
 			}
-		},
-		onUnload() {
-			this.$store.commit('checkMainPoints/comChangeState',{key:'ifShowBindPeopleDialog',data:true});
 		},
 		onShow: function() {
-			const {
-				checkMainPoints: {
-					ifUpdate
-				}
-			} = this.$store.state;
-
-			if (ifUpdate) {
+			if (this.ifUpdate) {
 				//页面重新拉取数据
 				this.loadItemData();
 			}
@@ -268,24 +268,72 @@
 				timingFunction: 'ease',
 			})
 
-			this.animation = animation;
-		
-		},
-		beforeDestroy() {
-			this.ifFromChildPage = false;
+			this.animation = animation;
+
+		},
+		onUnload() {
+			this.$store.commit('checkMainPoints/comChangeState',{key:'ifUpdate',data:false});
 		},
-		methods: {
-			loadItemData(){
-				this.checkTaskDetailList({
-					'deptId': this.deptId,
-					'checkId': this.checkId,
-					'situationType': this.situationType,
-					'investigationUserName':this.currentSelectedInvestigationUser&&this.currentSelectedInvestigationUser.investigationUserName
-				})
+		methods: {
+			//绑定当事人
+			/**
+			 * @param {Boolean} bool true直接执行设置当事人,忽略本地以缓存的deptTd 
+			 */
+			toBindPeople(bool) {
+				if(this.isBindResponsible&&bool){
+					uni.showToast({
+						icon:'none',
+					    title: '已绑定过当事人!',
+					    duration: 2000
+					});
+					return;
+				};
+				
+				let notNowBindPeopledeptIds = uni.getStorageSync('notNowBindPeopledeptIds');
+				if(!notNowBindPeopledeptIds){
+					notNowBindPeopledeptIds = []
+				}else {
+					notNowBindPeopledeptIds = JSON.parse(notNowBindPeopledeptIds);
+				}
+				
+				if (!notNowBindPeopledeptIds.includes(this.deptId)||bool) {
+                        const nowPermission = JSON.parse(uni.getStorageSync('nowPermission'));
+                        if (!this.isBindResponsible && this.checkDetailMapResponses.length > 0 && nowPermission == 3) {
+                        	//当未绑定当事人状态为false,可查核项大于0且当前角色是查核组员时
+                        	//只有从查核列表进来才提示
+                        	uni.showModal({
+                        		title: '提示',
+                        		content: '目前未批量分配当事人,是否前往选择?',
+                        		confirmText: '前往设置',
+                        		cancelText: '暂不设置',
+                        		success: (res) => {
+                        			if (res.confirm) {
+                        				uni.navigateTo({
+                        					url: `/pages/responsibleList/responsibleList?deptId=${this.deptId}&isFromCheckMainPoints=true`,
+                        				});
+                        			} else if (res.cancel) {
+                        			     //将当前病区保存,之后不在提示
+										  notNowBindPeopledeptIds.push(this.deptId);
+										  uni.setStorageSync('notNowBindPeopledeptIds',JSON.stringify(notNowBindPeopledeptIds));
+                        			}
+                        		}
+                        	});
+                        }
+				}
+			},
+			loadItemData() {
+				this.checkTaskDetailList({
+					'deptId': this.deptId,
+					'checkId': this.checkId,
+					'situationType': this.situationType,
+					'investigationUserName': this.currentSelectedInvestigationUser && this
+						.currentSelectedInvestigationUser.investigationUserName
+				})
 			},
 			//不适用回调
 			checkNoApplicable({
-				id,isNoApplicable
+				id,
+				isNoApplicable
 			}) {
 				this.$store.dispatch({
 					type: 'checkMainPoints/commActions',
@@ -298,25 +346,25 @@
 					}
 				})
 			},
-			toSelectVisiter() {
-				//更新受访对象状态,可能已经是进行中了
-				this.$store.dispatch({
-					type: 'checkMainPoints/commActions',
-					key: 'getInvestigationUsers',
-					data: {
-						checkId: this.checkId,
-						situationType: this.situationType,
-						deptId:this.deptId
-					}
-				}).then(data => {
-					this.$store.commit('checkMainPoints/comChangeState', {
-						key: 'investigationUsers',
-						data: data
-					});
-					
-					uni.navigateTo({
-						url: `/pages/selectVisitPerson/selectVisitPerson?checkId=${this.checkId}&situationType=${this.situationType}&deptId=${this.deptId}`
-					});
+			toSelectVisiter() {
+				//更新受访对象状态,可能已经是进行中了
+				this.$store.dispatch({
+					type: 'checkMainPoints/commActions',
+					key: 'getInvestigationUsers',
+					data: {
+						checkId: this.checkId,
+						situationType: this.situationType,
+						deptId: this.deptId
+					}
+				}).then(data => {
+					this.$store.commit('checkMainPoints/comChangeState', {
+						key: 'investigationUsers',
+						data: data
+					});
+
+					uni.navigateTo({
+						url: `/pages/selectVisitPerson/selectVisitPerson?checkId=${this.checkId}&situationType=${this.situationType}&deptId=${this.deptId}`
+					});
 				});
 			},
 			toSearch() {
@@ -413,8 +461,8 @@
 					key: 'getInvestigationUsers',
 					data: {
 						checkId: this.checkId,
-						situationType: this.situationType,
-						deptId:this.deptId
+						situationType: this.situationType,
+						deptId: this.deptId
 					}
 				}).then(data => {
 					this.$store.commit('checkMainPoints/comChangeState', {
@@ -438,56 +486,26 @@
 					deptId,
 					situationType,
 				}
-				const pages = getCurrentPages();
-				// console.log('pages',pages);
+	
 				//增加受访人
 				if (situationType == 2) params['investigationUser'] = investigationUserName;
 
 				this.dispatch('checkTaskDetailList', {
 					...params
 				}).then((data) => {
-					if (data) {
-						
-						if(!data.checkDetailMapResponses)return;
-						
-						const nowPermission = JSON.parse(uni.getStorageSync('nowPermission'));
+					if (data) {
+						if (!data.checkDetailMapResponses) return;
+
 						this.$store.commit('checkMainPoints/comChangeState', {
 							key: 'detailList',
 							data: data.checkDetailMapResponses
 						});
-						if (!data.isBindResponsible && data.checkDetailMapResponses.length > 0 && nowPermission ==
-							3) {
-							//当未绑定当事人状态为false,可查核项大于0且当前角色是查核组员时
-							//只有从查核列表进来才提示
-							if (pages.length > 1&&this.ifShowBindPeopleDialog) {
-								// console.log(pages[pages.length-2].route);
-								// console.log(pages.length);
-								if (pages[pages.length - 2].route && pages[pages.length - 2].route ==
-									"pages/checkList/checkList") {
-									uni.showModal({
-										title: '提示',
-										content: '目前未批量分配当事人,是否前往选择?',
-										confirmText:'前往设置',
-										cancelText:'暂不设置',
-										success: (res) => {
-											if (res.confirm) {
-												uni.navigateTo({
-													url: `/pages/responsibleList/responsibleList?deptId=${this.deptId}&isFromCheckMainPoints=true`,
-												});
-											} else if (res.cancel) {
-												// console.log('用户点击取消');
-												this.$store.commit('checkMainPoints/comChangeState',{key:'ifShowBindPeopleDialog',data:false});
-											}
-										}
-									});
-								}
-							}
-						}
-
+                        this.isBindResponsible = data.isBindResponsible;
 						this.detailList = data.checkDetailMapResponses;
 						this.copyDetailList = data.checkDetailMapResponses;
 						this.currentScore = data.getScore;
-						this.totalScore = data.totalScore;
+						this.totalScore = data.totalScore;
+						this.checkDetailMapResponses = data.checkDetailMapResponses;
 						data.checkDetailMapResponses.map(({
 							checkPointId,
 							checkPointName
@@ -497,8 +515,10 @@
 								checkPointName
 							});
 						});
-						
-						//页面获取完数据时,保持筛选
+						//检查是否需要弹绑定当事人弹窗
+						this.toBindPeople();
+                        
+						//页面获取完数据时,保持筛选
 						this.filterCompleteFlag(this.active);
 					}
 				});
@@ -739,17 +759,46 @@
 			}
 		}
 
+		.tm-top-menu {
+			.rowTwo {
+				display: flex;
+				width: 100%;
+				height: 0;
+				overflow: hidden;
+				flex-direction: column;
+				box-sizing: border-box;
+				padding: 0 25rpx;
+				overflow: hidden;
+
+				.rowTwoName {
+					font-size: 22.5rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #666F80;
+					margin-bottom: 12.5rpx;
+					padding-top: 35rpx;
+				}
+
+				.filterBtnWrap {
+					display: flex;
+					flex-direction: row;
+					justify-content: space-between;
+				}
+			}
+		}
+
 		.top-search {
 			display: flex;
 			flex-direction: row;
 			align-items: center;
+			justify-content: space-between;
 			padding: 25rpx;
 			background-color: #fff;
 			box-shadow: 0 3.75rpx 12.5rpx 0 rgba(0, 13, 51, 0.1);
 
 			.search {
 				position: relative;
-				width: 100%;
+				width: 70%;
 				height: 55rpx;
 				line-height: 55rpx;
 				background-color: #F0F2F7;
@@ -770,6 +819,24 @@
 				}
 			}
 
+			.btnGroup {
+				display: flex;
+				flex-direction: row;
+				justify-content: center;
+				align-items: center;
+
+				.searchBtn {
+					width: 30rpx;
+					height: 30rpx;
+					margin-right: 30rpx;
+				}
+
+				.filterBtn {
+					width: 30rpx;
+					height: 27.5rpx;
+				}
+			}
+
 			.top-btn-wrap {
 				padding-left: 25rpx;
 
@@ -863,30 +930,6 @@
 					}
 				}
 			}
-
-			.rowTwo {
-				display: flex;
-				width: 100%;
-				height: 0;
-				overflow: hidden;
-				flex-direction: column;
-				box-sizing: border-box;
-
-				.rowTwoName {
-					font-size: 22.5rpx;
-					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-					font-weight: 400;
-					color: #666F80;
-					margin-bottom: 12.5rpx;
-					padding-top: 50rpx;
-				}
-
-				.filterBtnWrap {
-					display: flex;
-					flex-direction: row;
-					justify-content: space-between;
-				}
-			}
 		}
 
 		.content-list {
@@ -1041,13 +1084,18 @@
 						flex: 1;
 						border-right: 1px solid #DADEE6;
 
-						text {
-							font-weight: 500;
-
+						text {
+							width:150rpx;
+							font-weight: 500;
+							text-align: center;
+                            overflow: hidden;
+							text-overflow: ellipsis;
+							white-space: nowrap;
 							&:last-child {
 								font-size: 17.5rpx;
 								line-height: 26.25rpx;
 								color: #7A8599;
+								text-align: center;
 								font-weight: 400;
 							}
 						}

+ 8 - 4
pages/home/home.vue

@@ -21,13 +21,13 @@
 				</view> -->
 				<view class="row">
 					<view class="col">
-						<text class="text">主管:{{depManager}}</text>
+						<text class="text">主管:{{depManager.split(',')[0]}}</text>
 					</view>
 					<view class="col">
 						<text class="text">|</text>
 					</view>
 					<view class="col">
-						<text class="text">所属查核组:{{dep}}</text>
+						<text class="text">所属查核组:{{dep.split(',')[0]}}</text>
 					</view>
 				</view>
 
@@ -445,11 +445,15 @@
 					}
 				}
 
-				.text {
+				.text {
+					width: 50rpx;
 					font-size: 22.5rpx;
 					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
 					font-weight: 400;
-					color: #666E80;
+					color: #666E80;
+					// overflow: hidden;
+					// text-overflow: ellipsis;
+					// white-space: nowrap;
 				}
 
 			}

+ 2 - 0
pages/responsibleList/responsibleList.vue

@@ -178,6 +178,8 @@
 						      showCancel:false,
 							  success:(res)=>{
 								   if (res.confirm) {
+									   //更新查核要点页数据
+									  this.$store.commit('checkMainPoints/comChangeState',{key:'ifUpdate',data:true});
 									  uni.navigateBack({
 									      delta: 1
 									  });

BIN
static/bindPeople.png