Browse Source

merge dev v0.8.2

xieyunhui 2 years ago
parent
commit
3f236049e3
69 changed files with 6296 additions and 1973 deletions
  1. 1 1
      components/tm-check-map-list/tm-check-map-list.vue
  2. 7 0
      components/tm-navbar/style.scss
  3. 536 0
      components/tm-navbar/tm-navbar.vue
  4. 21 2
      components/tm-tabbar/tm-tabbar.vue
  5. 38 6
      components/tm-trees/row.vue
  6. 19 5
      components/tm-trees/tm-trees.vue
  7. 1 1
      manifest.json
  8. 20 1
      pages.json
  9. 51 18
      pages/auditItemDetails/auditItemDetails.vue
  10. 285 174
      pages/batchDistribution/batchDistribution.vue
  11. 15 0
      pages/batchDistribution/server.js
  12. 248 0
      pages/checkGroup/checkGroup.vue
  13. 18 0
      pages/checkGroup/model.js
  14. 11 0
      pages/checkGroup/server.js
  15. 165 58
      pages/checkMainPoints/checkMainPoints.vue
  16. 15 1
      pages/checkMainPoints/server.js
  17. 27 9
      pages/creatingSituations/components/checkMap.vue
  18. 3 2
      pages/creatingSituations/components/checkPlan.vue
  19. 3 1
      pages/creatingSituations/components/checkRent.vue
  20. 27 6
      pages/creatingSituations/components/condition.vue
  21. 436 0
      pages/creatingSituations/components/conditionCard.vue
  22. 459 0
      pages/creatingSituations/components/person.vue
  23. 151 0
      pages/creatingSituations/components/preview.vue
  24. 485 320
      pages/creatingSituations/components/situationPreview.vue
  25. 311 0
      pages/creatingSituations/components/taskPreview.vue
  26. 104 42
      pages/creatingSituations/components/theme.vue
  27. 209 0
      pages/creatingSituations/components/type.vue
  28. 9 0
      pages/creatingSituations/components/utils.js
  29. 744 383
      pages/creatingSituations/creatingSituations.vue
  30. 23 2
      pages/creatingSituations/model.js
  31. 35 0
      pages/creatingSituations/server.js
  32. 5 3
      pages/editCheckList/editCheckList.vue
  33. 16 4
      pages/home/home.vue
  34. 3 3
      pages/improve-mission-list/improve-mission-list.vue
  35. 1 1
      pages/login/login.vue
  36. 156 36
      pages/mainPointsDetail/mainPointsDetail.vue
  37. 10 0
      pages/mainPointsDetail/server.js
  38. 2 1
      pages/mission-action/components/assign-mission.vue
  39. 4 0
      pages/mission-action/components/disagree.vue
  40. 135 139
      pages/mission-action/components/modal.vue
  41. 16 7
      pages/mission-action/components/pdca.vue
  42. 129 131
      pages/mission-action/components/personnel.vue
  43. 9 5
      pages/mission-action/components/write-back.vue
  44. 38 9
      pages/mission-action/mission-action.vue
  45. 27 12
      pages/mission-details/mission-details.vue
  46. 1 1
      pages/mission-details/setting.js
  47. 24 1
      pages/mission/components/list-item.vue
  48. 4 2
      pages/mission/mission.vue
  49. 7 2
      pages/model.js
  50. 20 0
      pages/planDetailList/model.js
  51. 120 0
      pages/planDetailList/planDetailList.vue
  52. 14 0
      pages/planDetailList/server.js
  53. 73 26
      pages/planList/planList.vue
  54. 7 0
      pages/planList/server.js
  55. 23 15
      pages/responsibleList/responsibleList.vue
  56. 5 1
      pages/role-switching/role-switching.vue
  57. 1 1
      pages/selectVisitPerson/selectVisitPerson.vue
  58. 7 2
      pages/situationDetail/model.js
  59. 10 5
      pages/situationDetail/server.js
  60. 205 19
      pages/situationDetail/situationDetail.vue
  61. 8 1
      pages/situationsCenter/model.js
  62. 688 499
      pages/situationsCenter/situationsCenter.vue
  63. BIN
      static/activedGou_white.png
  64. 5 2
      static/html/template.html
  65. BIN
      static/tabbar/tabicon-actived-zhineng.png
  66. BIN
      static/tabbar/tabicon-zhineng.png
  67. 15 0
      utils/loginHandle.js
  68. 28 10
      utils/request.js
  69. 3 3
      utils/requestUrl.js

+ 1 - 1
components/tm-check-map-list/tm-check-map-list.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="content-wrap">
 		<view class="title-wrap">
-			<text>{{item.name}}</text>
+			<text>{{item.name?item.name:item.departmentName}}</text>
 			<view>
 				<image src="../../static/icon-map.png"></image>
 				<text>{{item.deptClassName}}</text>

+ 7 - 0
components/tm-navbar/style.scss

@@ -0,0 +1,7 @@
+// 定义混入指令,用于在非nvue环境下的flex定义,因为nvue没有display属性,会报错
+@mixin vue-flex($direction: row) {
+	/* #ifndef APP-NVUE */
+	display: flex;
+	flex-direction: $direction;
+	/* #endif */
+}

+ 536 - 0
components/tm-navbar/tm-navbar.vue

@@ -0,0 +1,536 @@
+<template>
+	<view class="">
+		<view class="u-navbar" :style="[navbarStyle]"
+			:class="{ 'u-navbar-fixed': isFixed, 'u-border-bottom': borderBottom }">
+			<view class="u-status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
+			<view class="u-navbar-inner" :style="[navbarInnerStyle]">
+				<!-- <view class="u-icon-wrap">
+					<u-icon :name="backIconName" :color="backIconColor" :size="backIconSize"></u-icon>
+				</view> -->
+				<view class="u-back-wrap" v-if="isBack" @tap="goBack">
+					<view class="u-icon-wrap">
+						<u-icon :name="backIconName" :color="backIconColor" :size="backIconSize"></u-icon>
+					</view>
+					<!-- <view class="u-icon-wrap u-back-text u-line-1" v-if="backText" :style="[backTextStyle]">
+						{{ backText }}</view> -->
+				</view>
+
+				<div :class="[isSearchStatus?'search active':'search']" v-if="isShowSearch">
+					<image class="searchBtn" src="../../static/search.png" @click="startSearch" mode=""></image>
+					<u-input v-if="isSearchStatus" placeholder="请输入内容" prefixIcon="search" :value="searchKeywords"
+						@input="searchInputhandle" prefixIconStyle="font-size: 22px;color: #909399,"></u-input>
+					<!-- <image v-if="isSearchStatus" @click="clearHandle" class="clearBtn" src="../../static/clearIcon.png" mode=""></image> -->
+					<div v-if="isSearchStatus" @click="cancelSearchHandle" class="cancelSearchBtn">取消</div>
+				</div>
+				<div v-if="!isSearchStatus" class="navTitle">
+					<text v-if="titleMod == 'Normal'">{{title}}</text>
+					<view v-if="titleMod == 'Filter'" class="filterTitle" @click="selecterHandle">
+						<text>{{filterStr}}</text>
+						<image src="../../static/close-icon.png" mode=""></image>
+					</view>
+				</div>
+				<view class="navNoticeIcon">
+					<image v-if="messageStatus" class="navNoticeIcon"
+						:src="`../../static/message-${messageStatus?'unread':'read'}.png`" mode=""
+						@click="checkMessageHandle"></image>
+				</view>
+
+			</view>
+		</view>
+		<!-- 解决fixed定位后导航栏塌陷的问题 -->
+		<view class="u-navbar-placeholder" v-if="isFixed && !immersive"
+			:style="{ width: '100%', height: Number(navbarHeight) + statusBarHeight + 'px' }"></view>
+
+		<uni-popup ref="popup" type="top" :maskClick="true">
+			<view class="selectableList">
+				<scroll-view scroll-y="true" class="listWrap">
+					<view :class="getClass(v.text)" v-for="(v,i) in filterKeyList" @click="listClickHandle(v)">
+						{{`${v.text}`}}
+					</view>
+				</scroll-view>
+				<!-- <view class="btnGroup">
+					<view class="cancelBtn btn" @click="btnGroupClickHandle(false)">取消</view>
+					<view class="confirmBtn btn" @click="btnGroupClickHandle(true)">确定</view>
+				</view> -->
+			</view>
+		</uni-popup>
+
+	</view>
+</template>
+
+<script>
+	// 获取系统状态栏的高度
+	let systemInfo = uni.getSystemInfoSync();
+	let menuButtonInfo = {};
+	// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
+	// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
+	menuButtonInfo = uni.getMenuButtonBoundingClientRect();
+	// #endif
+	/**
+	 * navbar 自定义导航栏
+	 * @description 此组件一般用于在特殊情况下,需要自定义导航栏的时候用到,一般建议使用uniapp自带的导航栏。
+	 * @tutorial https://www.uviewui.com/components/navbar.html
+	 * @property {String Number} height 导航栏高度(不包括状态栏高度在内,内部自动加上),注意这里的单位是px(默认44)
+	 * @property {String} back-icon-color 左边返回图标的颜色(默认#606266)
+	 * @property {String} back-icon-name 左边返回图标的名称,只能为uView自带的图标(默认arrow-left)
+	 * @property {String Number} back-icon-size 左边返回图标的大小,单位rpx(默认30)
+	 * @property {String} back-text 返回图标右边的辅助提示文字
+	 * @property {Object} back-text-style 返回图标右边的辅助提示文字的样式,对象形式(默认{ color: '#606266' })
+	 * @property {String} title 导航栏标题,如设置为空字符,将会隐藏标题占位区域
+	 * @property {String Number} title-width 导航栏标题的最大宽度,内容超出会以省略号隐藏,单位rpx(默认250)
+	 * @property {String} title-color 标题的颜色(默认#606266)
+	 * @property {String Number} title-size 导航栏标题字体大小,单位rpx(默认32)
+	 * @property {Function} custom-back 自定义返回逻辑方法
+	 * @property {String Number} z-index 固定在顶部时的z-index值(默认980)
+	 * @property {Boolean} is-back 是否显示导航栏左边返回图标和辅助文字(默认true)
+	 * @property {Object} background 导航栏背景设置,见官网说明(默认{ background: '#ffffff' })
+	 * @property {Boolean} is-fixed 导航栏是否固定在顶部(默认true)
+	 * @property {Boolean} immersive 沉浸式,允许fixed定位后导航栏塌陷,仅fixed定位下生效(默认false)
+	 * @property {Boolean} border-bottom 导航栏底部是否显示下边框,如定义了较深的背景颜色,可取消此值(默认true)
+	 * @example <u-navbar back-text="返回" title="剑未配妥,出门已是江湖"></u-navbar>
+	 */
+	export default {
+		name: "tm-navbar",
+		props: {
+			isShowFilter: {
+				type: Boolean,
+				default: false,
+			},
+			backTextStyle: {
+				type: Object,
+				default () {
+					return {
+						color: '#606266'
+					}
+				}
+			},
+			// 左边返回图标的大小,rpx
+			backIconSize: {
+				type: [String, Number],
+				default: '40'
+			},
+			// 返回箭头的颜色
+			backIconColor: {
+				type: String,
+				default: '#606266'
+			},
+			isShowSearch: {
+				type: Boolean,
+				default: false,
+			},
+			titleMod: {
+				type: String,
+				default: 'Normal', //Filter 标题为筛选,Normal 普通标题
+			},
+			messageStatus: {
+				type: Boolean,
+				default: false, //消息Icon状态,true有消息,false 无
+			},
+			filterKeys: {
+				type: Array,
+				default: () => [], //筛选可选项 {text:string,checked:boolean}[]
+			},
+			// defaultFilterKey: {
+			// 	type: Array,
+			// 	default: () => [], //默认选中筛选项
+			// },
+			// 导航栏标题
+			title: {
+				type: String,
+				default: ''
+			},
+			// 标题的宽度,如果需要自定义右侧内容,且右侧内容很多时,可能需要减少这个宽度,单位rpx
+			titleWidth: {
+				type: [String, Number],
+				default: '250'
+			},
+			// 标题的颜色
+			titleColor: {
+				type: String,
+				default: '#606266'
+			},
+			// 标题字体是否加粗
+			titleBold: {
+				type: Boolean,
+				default: false
+			},
+			// 标题的字体大小
+			titleSize: {
+				type: [String, Number],
+				default: 32
+			},
+			isBack: {
+				type: [Boolean, String],
+				default: true
+			},
+			// 左边返回的图标
+			backIconName: {
+				type: String,
+				default: 'nav-back'
+			},
+			// 对象形式,因为用户可能定义一个纯色,或者线性渐变的颜色
+			background: {
+				type: Object,
+				default () {
+					return {
+						background: '#ffffff'
+					}
+				}
+			},
+			// 导航栏是否固定在顶部
+			isFixed: {
+				type: Boolean,
+				default: true
+			},
+			// 是否沉浸式,允许fixed定位后导航栏塌陷,仅fixed定位下生效
+			immersive: {
+				type: Boolean,
+				default: false
+			},
+			// 是否显示导航栏的下边框
+			borderBottom: {
+				type: Boolean,
+				default: true
+			},
+			zIndex: {
+				type: [String, Number],
+				default: ''
+			},
+			// 自定义返回逻辑
+			customBack: {
+				type: Function,
+				default: null
+			}
+		},
+		data() {
+			return {
+				searchKeywords: '',
+				isSearchStatus: false,
+				filterStr: '', //筛选关键字
+				menuButtonInfo: menuButtonInfo,
+				filterKeyList: [],
+				checkedItem: null, //筛选选中项
+				statusBarHeight: systemInfo.statusBarHeight,
+			};
+		},
+		watch: {
+			searchKeywords(prev, current) {
+				this.$emit('onsearchChange', prev);
+			},
+
+		},
+		computed: {
+			// 导航栏内部盒子的样式
+			navbarInnerStyle() {
+				let style = {};
+				// 导航栏宽度,如果在小程序下,导航栏宽度为胶囊的左边到屏幕左边的距离
+				style.height = this.navbarHeight + 'px';
+				// // 如果是各家小程序,导航栏内部的宽度需要减少右边胶囊的宽度
+				// #ifdef MP
+				let rightButtonWidth = systemInfo.windowWidth - menuButtonInfo.left;
+				style.marginRight = rightButtonWidth + 'px';
+				// #endif
+				return style;
+			},
+			// 整个导航栏的样式
+			navbarStyle() {
+				let style = {};
+				style.zIndex = this.zIndex ? this.zIndex : this.$u.zIndex.navbar;
+				// 合并用户传递的背景色对象
+				Object.assign(style, this.background);
+				return style;
+			},
+			// 导航中间的标题的样式
+			titleStyle() {
+				let style = {};
+				// #ifndef MP
+				style.left = (systemInfo.windowWidth - uni.upx2px(this.titleWidth)) / 2 + 'px';
+				style.right = (systemInfo.windowWidth - uni.upx2px(this.titleWidth)) / 2 + 'px';
+				// #endif
+				// #ifdef MP
+				// 此处是为了让标题显示区域即使在小程序有右侧胶囊的情况下也能处于屏幕的中间,是通过绝对定位实现的
+				let rightButtonWidth = systemInfo.windowWidth - menuButtonInfo.left;
+				style.left = (systemInfo.windowWidth - uni.upx2px(this.titleWidth)) / 2 + 'px';
+				style.right = rightButtonWidth - (systemInfo.windowWidth - uni.upx2px(this.titleWidth)) / 2 +
+					rightButtonWidth +
+					'px';
+				// #endif
+				style.width = uni.upx2px(this.titleWidth) + 'px';
+				return style;
+			},
+			// 转换字符数值为真正的数值
+			navbarHeight() {
+				// #ifdef APP-PLUS || H5
+				return this.height ? this.height : 44;
+				// #endif
+				// #ifdef MP
+				// 小程序特别处理,让导航栏高度 = 胶囊高度 + 两倍胶囊顶部与状态栏底部的距离之差(相当于同时获得了导航栏底部与胶囊底部的距离)
+				// 此方法有缺陷,暂不用(会导致少了几个px),采用直接固定值的方式
+				// return menuButtonInfo.height + (menuButtonInfo.top - this.statusBarHeight) * 2;//导航高度
+				let height = systemInfo.platform == 'ios' ? 44 : 48;
+				return this.height ? this.height : height;
+				// #endif
+			}
+		},
+		mounted() {
+			this.filterKeyList = this.filterKeys
+			let index = this.filterKeys.findIndex(item => item.checked);
+			
+			if (index != -1) {
+				
+				this.checkedItem = this.filterKeys[index];
+				this.filterStr = this.filterKeys[index].text
+				this.$emit('filterClick',{key:this.checkedItem.key,text:this.checkedItem.text});
+			} 
+			// else {
+			// 	//默认已第一个为选中项
+			// 	this.filterKeyList = this.filterKeys.map((item, index) => {
+			// 		if (index == 0) {
+			// 			this.checkedItem = item;
+			// 			return {
+			// 				text: item.text,
+			// 				checked: true
+			// 			}
+			// 		}
+			// 	})
+			// }
+		},
+		methods: {
+			startSearch() {
+				this.isSearchStatus = true;
+			},
+			selecterHandle() {
+				this.$refs.popup.open();
+			},
+			listClickHandle(item) {
+				//筛选条件点击
+				this.checkedItem = item;
+				this.filterStr = item.text;
+				this.$refs.popup.close();
+				this.$emit('filterClick',{key:item.key,text:item.text});
+			},
+			getClass(text) {
+				if (this.checkedItem && text == this.checkedItem.text) {
+					return "list on"
+				}
+				return "list"
+			},
+			clearHandle() {
+				this.searchKeywords = '';
+			},
+			cancelSearchHandle() {
+				this.searchKeywords = '';
+				this.isSearchStatus = false;
+			},
+			searchInputhandle(e) {
+				this.searchKeywords = e;
+			},
+			checkMessageHandle() {
+				this.$emit('checkMessage');
+			},
+			goBack() {
+				// 如果自定义了点击返回按钮的函数,则执行,否则执行返回逻辑
+				if (typeof this.customBack === 'function') {
+					// 在微信,支付宝等环境(H5正常),会导致父组件定义的customBack()函数体中的this变成子组件的this
+					// 通过bind()方法,绑定父组件的this,让this.customBack()的this为父组件的上下文
+					this.customBack.bind(this.$u.$parent.call(this))();
+				} else {
+					uni.navigateBack();
+				}
+			}
+		}
+	};
+</script>
+
+<style scoped lang="scss">
+	@import "./style.scss";
+
+	.u-navbar {
+		width: 100%;
+	}
+
+	.u-navbar-fixed {
+		position: fixed;
+		left: 0;
+		right: 0;
+		top: 0;
+		z-index: 991;
+	}
+
+	.u-status-bar {
+		width: 100%;
+	}
+
+	.u-navbar-inner {
+		@include vue-flex;
+		flex-direction: row;
+		justify-content: space-between;
+		position: relative;
+		align-items: center;
+		padding: 0 30rpx;
+
+		.search {
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+			width: 40rpx;
+
+			.searchBtn {
+				width: 30rpx;
+				height: 30rpx;
+				margin-right: 12.5rpx;
+			}
+
+			.clearBtn {
+				width: 25rpx;
+				height: 25rpx;
+			}
+
+			.cancelSearchBtn {
+				font-size: 25rpx;
+				font-family: SourceHanSansCN-Bold, SourceHanSansCN;
+				color: #292C33;
+				margin-left: 25rpx;
+			}
+
+			&.active {
+				width: 85vw;
+			}
+		}
+
+		.navTitle {
+			font-size: 25rpx;
+			font-family: SourceHanSansCN-Bold, SourceHanSansCN;
+			font-weight: bold;
+			color: #292C33;
+
+			.filterTitle {
+				display: flex;
+
+				&>image {
+					position: relative;
+					top: 12rpx;
+					left: 5rpx;
+					width: 12rpx;
+					height: 12rpx;
+				}
+			}
+		}
+
+		.navNoticeIcon {
+			width: 27.5rpx;
+			height: 28.75rpx;
+		}
+	}
+
+	.u-back-wrap {
+		position: relative;
+		left: -10rpx;
+		@include vue-flex;
+		align-items: center;
+		flex: 1;
+		flex-grow: 0;
+		// padding: 14rpx 14rpx 14rpx 24rpx;
+	}
+
+	.u-back-text {
+		// padding-left: 4rpx;
+		font-size: 30rpx;
+	}
+
+	.u-navbar-content-title {
+		@include vue-flex;
+		align-items: center;
+		justify-content: center;
+		flex: 1;
+		position: absolute;
+		left: 0;
+		right: 0;
+		height: 60rpx;
+		text-align: center;
+		flex-shrink: 0;
+	}
+
+	.u-navbar-centent-slot {
+		flex: 1;
+	}
+
+	.u-title {
+		line-height: 60rpx;
+		font-size: 32rpx;
+		flex: 1;
+	}
+
+	.u-navbar-right {
+		flex: 1;
+		@include vue-flex;
+		align-items: center;
+		justify-content: flex-end;
+	}
+
+	.u-slot-content {
+		flex: 1;
+		@include vue-flex;
+		align-items: center;
+	}
+
+	//底部弹窗
+	.selectableList {
+		display: flex;
+		width: 100%;
+		flex-direction: column;
+		height: 50vh;
+		padding-top: 100rpx;
+		box-sizing: border-box;
+		border-radius: 25rpx 25rpx 0px 0px;
+		background-color: #FFFFFF;
+
+		.listWrap {
+			height: calc(50vh - 75rpx);
+			overflow-y: scroll;
+
+			.list {
+				height: 87.5rpx;
+				line-height: 87.5rpx;
+				text-align: center;
+				font-size: 30rpx;
+				font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+				font-weight: 400;
+				color: #8A8F99;
+
+				&.on {
+					font-weight: 500;
+					color: #3377FF;
+				}
+			}
+		}
+
+		.btnGroup {
+			display: flex;
+			width: 100%;
+			flex-direction: row;
+			justify-content: center;
+			align-items: center;
+
+			.btn {
+				width: 50%;
+				height: 75rpx;
+				line-height: 75rpx;
+				text-align: center;
+				font-size: 22.5rpx;
+				font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+				font-weight: 400;
+				color: #3377FF;
+			}
+
+			.cancelBtn {
+				border-top: 0.62rpx solid #DADEE6;
+			}
+
+			.confirmBtn {
+				color: #FFFFFF;
+				background: #3377FF;
+			}
+		}
+	}
+</style>

+ 21 - 2
components/tm-tabbar/tm-tabbar.vue

@@ -65,15 +65,34 @@
 						iconPath: '/static/tabbar/calendar-unselect.png',
 						selectedIconPath: '/static/tabbar/calendar-select.png',
 						pagePath: 'pages/calendar/calendar'
+					},
+					{
+						text: '自查督查',
+						iconPath: '/static/tabbar/tabicon-zhineng.png',
+						selectedIconPath: '/static/tabbar/tabicon-actived-zhineng.png',
+						pagePath: 'pages/situationsCenter/situationsCenter' // 页面路径
 					}
 				],
 				// 不同角色的拥有 tabbar下标(1、管理员 2、查核组长 3、查核组员 4、单位负责人 5、改善者)
+				
+				// {permission: 1, name: '管理员', msg: '个改善任务待处理'},
+				// {permission: 2, name: '查核组长', msg: '个情境待分配'},
+				// {permission: 3, name: '查核组员', msg: '个单位待查核'},
+				// {permission: 4, name: '单位负责人', msg: '个改善任务待处理'},
+				// {permission: 5, name: '改善者', msg: '个改善任务待处理'},
+				// {permission: 6, name: '职能科室负责人', msg: '个改善任务待处理'},
+				// {permission: 7, name: '职能科室普通人员', msg: '个改善任务待处理'},
+				// {permission: 8, name: '自查人', msg: '个改善任务待处理'},
+				
 				rolList: [
 					{permission: 1, name: '管理员', tabBarIndexs: [0,2, 3]}, // tabBarIndexs:tabBarList种对应的下标
 					{permission: 2, name: '查核组长', tabBarIndexs: [0,1, 4, 3]},
 					{permission: 3, name: '查核组员', tabBarIndexs: [0, 4, 3]},
-					{permission: 4, name: '单位负责人', tabBarIndexs: [1, 3]},
-					{permission: 5, name: '改善者', tabBarIndexs: [1, 3]}
+					{permission: 4, name: '单位负责人', tabBarIndexs: [1,5,3]},
+					{permission: 5, name: '改善者', tabBarIndexs: [1, 3]},
+					{permission: 6, name: '职能科室负责人', tabBarIndexs: [5,1,4,3]},
+					{permission: 7, name: '职能科室普通人员', tabBarIndexs: [5,4,3]},
+					{permission: 8, name: '自查人', tabBarIndexs: [5,3]}
         ],
         rolToTabBars: [],
 			}

+ 38 - 6
components/tm-trees/row.vue

@@ -9,7 +9,7 @@
 				</view>
 				<text>{{ option.label }}</text>
 			</view>
-			<view v-if="option.parentId !== 0" class="right" @click="checkedHandle">
+			<view v-if="parentCheckble||option.parentId !== 0" class="right" @click="checkedHandle">
 				<image :src="`../../static/${rightIcon}.png`"></image>
 			</view>
 		</view>
@@ -31,9 +31,10 @@
 	
 	export default {
 		data() {
-			return {}
+			return {
+			}
 		},
-		props: ['option', 'openKeys', 'checkedKeys'],
+		props: ['option', 'openKeys', 'checkedKeys','parentCheck'],
 		computed: {
 			hasChildren: function() {
 				return this.option.children && this.option.children.length > 0;
@@ -44,6 +45,10 @@
 			checked: function() {
 				return this.checkedKeys.includes(this.option.key);
 			},
+			parentCheckble(){
+				 //父级节点是否可选
+				 return this.parentCheck;
+			},
 			leftIcon: function() {
 				let iconName = 'parent-open';
 				if(this.hasChildren) {
@@ -59,20 +64,47 @@
 				return this.checked ? 'check-checkbox' : 'check-no';
 			}
 		},
+		
+		mounted() {
+			// console.log('this.props',this.parentCheckble);
+		},
+
 		methods: {
 			rowClick: function() {
 				if(!this.hasChildren) return;
 				this.openKeysHandle(arrFilter(this.option.key, this.openKeys));
 			},
 			checkedHandle: function(e) {
+				
 				_stopPropagation(e);
-				this.checkedKeysHandle(arrFilter(this.option.key, this.checkedKeys));
+				let checkedKeys = this.checkedKeys;
+				
+				if(this.option.children&&this.option.children.length>0){
+					  //勾选的是父级
+					  const keys = this.option.children.map(item=>item.key);
+					  
+					  [...keys,this.option.key].forEach(item=>{
+						    const index = checkedKeys.findIndex(key => key == item);
+						    if(index != -1){
+								  checkedKeys.splice(index,1);   
+							}else{
+								  checkedKeys.push(item);
+							}
+					  });
+					  
+					  this.checkedKeysHandle(checkedKeys,this.option);
+					  
+				}else{
+					
+					this.checkedKeysHandle(arrFilter(this.option.key, this.checkedKeys),this.option);
+				}
+			
 			},
 			openKeysHandle: function(arr) {
 				this.$emit('open-keys', arr);
 			},
-			checkedKeysHandle: function(arr) {
-				this.$emit('checked-keys', arr);
+			checkedKeysHandle: function(arr,items) {
+				this.$emit('checked-keys',arr,items);
 			}
 		}
 	}

+ 19 - 5
components/tm-trees/tm-trees.vue

@@ -4,6 +4,7 @@
 			:option="item" 
 			:openKeys="openKeys"
 			:checkedKeys="checkedKeys"
+			:parentCheck="parentCheckble"
 			v-on:open-keys="openKeysHandle"
 			v-on:checked-keys="checkedKeysHandle"
 			:key="index"/>
@@ -27,10 +28,11 @@
 		data() {
 			return {
 				openKeys: [],
-				checkedKeys: []
+				checkedKeys: [],
+				checkedItems:[], //已勾选项
 			};
 		},
-		props: ['options', 'defaultOpen', 'defaultChecked'],
+		props: ['options', 'defaultOpen', 'defaultChecked','parentCheckble'],
 		created:function(){
 			this.openKeys = this.defaultOpen || [];
 			this.checkedKeys = this.defaultChecked || [];
@@ -43,15 +45,27 @@
 				this.checkedKeys = checked;
 			}
 		},
+		mounted() {
+			// console.log('this.props',this.parentCheckble);
+		},
 		methods: {
 			openKeysHandle: function(keys) {
 				this.openKeys = keys;
 				this.$emit('open-keys', keys);
 			},
-			checkedKeysHandle: function(keys) {
-				console.log('已选中');
+			checkedKeysHandle: function(keys,items) {
 				this.checkedKeys = keys;
-				this.$emit('checked-keys', keys);
+				
+				const index = this.checkedItems.findIndex(item=>item.key == items.key);
+				let _checkedItems = this.checkedItems;
+				if(index != -1){
+					_checkedItems.splice(index,1);
+				}else{
+					_checkedItems.push(items);
+				}
+				this.checkedItems = _checkedItems;
+				
+				this.$emit('checked-keys', keys,_checkedItems);
 			}
 		}
 	}

+ 1 - 1
manifest.json

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

+ 20 - 1
pages.json

@@ -97,7 +97,8 @@
 			"path": "pages/situationsCenter/situationsCenter",
 			"style": {
 				"navigationBarTitleText": "情境中心",
-				"enablePullDownRefresh": false
+				"enablePullDownRefresh": false,
+				"navigationStyle":"custom"
 			}
 		},
 		{
@@ -258,6 +259,24 @@
             }
             
         }
+        ,{
+            "path" : "pages/planDetailList/planDetailList",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/checkGroup/checkGroup",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"easycom": {
 			"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"

+ 51 - 18
pages/auditItemDetails/auditItemDetails.vue

@@ -24,7 +24,7 @@
 					<text>上次结果</text>
 				</view>
 				<view class="child">
-					<text>{{detail.checkResult || '--'}}</text>
+					<text>{{situationsCenter.currentSelectedSituation.systemSituationType == 2 ? detail.checkResultName :detail.checkResult || '--'}}</text>
 					<text>本次结果</text>
 				</view>
 			</view>
@@ -66,7 +66,7 @@
 	const pictureModule = uni.requireNativePlugin("Wlake-PictureView")
 	const modal = uni.requireNativePlugin('modal');
 	// #endif
-
+    import { mapState } from "vuex";
 	import {
 		_goBackFresh
 	} from '../../utils/compatible.js';
@@ -87,16 +87,26 @@
 				itemBelongGroup: [],
 				itemId: '',
 				ifImprover: true,
-				bottomBtnText: '返回改善任务详情'
+				bottomBtnText: '返回改善任务详情',
 			};
+		},
+		computed: {
+			...mapState({
+				situationsCenter: state => state.situationsCenter
+			}),
 		},
 		onLoad: function({
 			id,
-			checkPointId
-		}) {
+			checkPointId,
+			isZichaDucha,
+			improveType
+		}) {
+			
+			
 			const pages = getCurrentPages();
-			const reversedPageList = pages.reverse();
-			if (reversedPageList && reversedPageList[0].route == 'pages/checkMainPoints/checkMainPoints') {
+			const reversedPageList = pages.reverse();
+			
+			if (reversedPageList && reversedPageList[1].route == 'pages/checkMainPoints/checkMainPoints') {
 				this.bottomBtnText = '返回查核任务列表'
 			}
 
@@ -104,7 +114,10 @@
 			if (roleNum == 3) this.ifShowBotBtn = true;
 			if (roleNum == 3) this.ifImprover = false;
 			this.checkPointId = checkPointId;
-			this.itemId = id;
+			this.itemId = id;
+			this.isZichaDucha = isZichaDucha;
+			this.improveType = improveType;
+			
 			this.loadItemDetail(id);
 
 			//只有查核展示底部按钮
@@ -170,16 +183,36 @@
                     delta: 1
                 });
 			},
-			loadItemDetail(id) {
-				this.dispatch('checkTaskDetail', {
-					id
-				}).then((data) => {
-					if (data) {
-						this.detail = data;
-						this.itemId = id;
-
-					}
-				});
+			loadItemDetail(id) {
+				if(this.isZichaDucha){
+					//自查督查
+					this.$store.dispatch({
+						type: 'mainPointsDetail/commActions',
+						payload:{
+							key:'zichaduchaCheckTaskDetail',
+							data:{
+								id: id,
+								improveType:this.improveType
+							}
+						}
+					}).then((data)=>{
+						if(data){
+							 this.detail = data;
+							 this.itemId = id;
+						}
+					})
+				}else{
+					this.dispatch('checkTaskDetail', {
+						id,
+						improveType:this.improveType
+					}).then((data) => {
+						if (data) {
+							this.detail = data;
+							this.itemId = id;
+					
+						}
+					});
+				}
 			},
 			switchItem(num) {
 				let currentIndex = this.detail.checkDetailIds.findIndex(t => t == this.itemId);

+ 285 - 174
pages/batchDistribution/batchDistribution.vue

@@ -18,44 +18,47 @@
 						<view class="date-box">
 							<date-time-picker :disabled="details.isDistribution" :height="100"
 								:start="details.planStartDate" :end="details.planEndDate"
-								:defaultValue="details.endDate" placeholder="请选择结束时间" pickType="endDate"
+								:defaultValue="details.endDate?details.endDate:details.planEndDate" placeholder="请选择结束时间" pickType="endDate"
 								@change="changeDateTime" />
 						</view>
 					</view>
-				</div>
-				
-				<view class="tabWrap" v-if="checkPointList.length >0">
-					<view :class="[currentSelectedTab==0?'on tab':'tab']" @click="tabChangeHandle(0)" >{{`查核人(${checkPresonList.length})`}}</view>
-					<view :class="[currentSelectedTab==1?'on tab':'tab']" @click="tabChangeHandle(1)">{{`要点分类(${checkedPointList.length})`}}</view>
-				</view>
-				
-                <view class="blockTitle noBottomBlockTitle" v-if="checkPointList.length == 0">查核人<text>{{`已选择${checkPresonList.length}人`}}</text></view>
-				
-                <view v-if="currentSelectedTab==0">
-					<view class="filter">
-						<view class="selecter" @click="selecterHandle">
-							<text>{{selectedDeptStr}}</text>
-							<image src="../../static/fillBlackArrow.png" mode=""></image>
-						</view>
-						<view class="searchBar">
-							<image class="serachIcon" src="../../static/searchIcon.png" mode=""></image>
-							<tm-input class="searchVal" :clear="ifclearSearch" @onChange="searchInputHandle"
-								placeholder="请输入搜索姓名"></tm-input>
-							<view class="searchBtn" @click="searchHandle">搜索</view>
-						</view>
-					</view>
-                	 <view class="empListWrapper" v-if="empList.length>0" :style="{height:empListWrapperH}">
-                	 	<tm-checked-group :list="empList" :defaultValue='checkPresonList' :setting="{
-                	 	  value: 'employeeId',
-                	 	  name: 'label'
-                	 	}" :openkeys="[0]" @change="onCheckPerosonChanged" />
-                	 </view>
-                	 <view class="empty" v-if="empList.length==0">
-                	 	<image src="../../static/no-data.png" mode=""></image>
-                	 	<text>暂无内容</text>
-                	 </view>
-                </view> 
-				
+				</div>
+
+				<view class="tabWrap" v-if="checkPointList.length >0">
+					<view :class="[currentSelectedTab==0?'on tab':'tab']" @click="tabChangeHandle(0)">
+						{{`查核人(${checkPresonList.length})`}}</view>
+					<view :class="[currentSelectedTab==1?'on tab':'tab']" @click="tabChangeHandle(1)">
+						{{`要点分类(${checkedPointList.length})`}}</view>
+				</view>
+
+				<view class="blockTitle noBottomBlockTitle" v-if="checkPointList.length == 0">
+					查核人<text>{{`已选择${checkPresonList.length}人`}}</text></view>
+
+				<view v-if="currentSelectedTab==0">
+					<view class="filter">
+						<view class="selecter" @click="selecterHandle">
+							<text>{{selectedDeptStr}}</text>
+							<image src="../../static/fillBlackArrow.png" mode=""></image>
+						</view>
+						<view class="searchBar">
+							<image class="serachIcon" src="../../static/searchIcon.png" mode=""></image>
+							<tm-input class="searchVal" :clear="ifclearSearch" @onChange="searchInputHandle"
+								placeholder="请输入搜索姓名"></tm-input>
+							<view class="searchBtn" @click="searchHandle">搜索</view>
+						</view>
+					</view>
+					<view class="empListWrapper" v-if="empList.length>0" :style="{height:empListWrapperH}">
+						<tm-checked-group :list="empList" :defaultValue='checkPresonList' :setting="{
+						  value: 'employeeId',
+						  name: 'label'
+						}" :openkeys="[0]" @change="onCheckPerosonChanged" />
+					</view>
+					<view class="empty" v-if="empList.length==0">
+						<image src="../../static/no-data.png" mode=""></image>
+						<text>暂无内容</text>
+					</view>
+				</view>
+
 				<tm-checked-group v-if="details.situationType == 3&&currentSelectedTab==1" :list="checkPointList"
 					:defaultValue='checkedPointList' :setting="{
 				  value: 'categoryId',
@@ -99,13 +102,13 @@
 					deptIdStr
 				} = this.filter;
 				return (deptIdStr.map(t => t.name)).join(',')
-			},
-			empListWrapperH(){
-				if(this.checkPointList.length >0){
-					  return 'calc(100vh - 485rpx)'
-				}else{
-					  return 'calc(100vh - 460rpx)'
-				}
+			},
+			empListWrapperH() {
+				if (this.checkPointList.length > 0) {
+					return 'calc(100vh - 485rpx)'
+				} else {
+					return 'calc(100vh - 460rpx)'
+				}
 			},
 			ifclearSearch() {
 				return this.filter.keyword.length == 0
@@ -137,8 +140,8 @@
 				//选中的查核要点
 				checkedPointList: [],
 				//可选单位列表
-				departments: [],
-				currentSelectedTab:0,//0 查核人 1 要点分类
+				departments: [],
+				currentSelectedTab: 0, //0 查核人 1 要点分类
 				//筛选条件
 				filter: {
 					keyword: '',
@@ -149,24 +152,30 @@
 				},
 			}
 		},
-		onLoad({
-			details
-		}) {
-			const _details = details ? JSON.parse(details) : {};
+		onLoad(data) {
+			
+			const _details = JSON.parse(data.details);
 			//初始化默认时间
+			// console.log({data,_details});
 			const currentDate = new Date();
 			_details.startDate = `${currentDate.getFullYear()}-${currentDate.getMonth()+1}-${currentDate.getDate()} 00:00`;
-			_details.endDate = _details.planEndDate;
-
-
+			_details.endDate = _details.endDate;
+
+			this.isZichaducha = _details.isZichaducha;
+			this.departmentType = _details.departmentType;
+			this.departmentId = _details.departmentId;
+			this.editPlanIds = _details.ids;  //当前设置计划的id
+			this.multiple = data.multiple; //是否批量
+			
 			// 强制刷新返回查核列表页面
-			if (getCurrentPages().length === 1) {
+			if (getCurrentPages().length === 1 && !this.isZichaducha) {
 				const {
 					situationId,
 					checkId,
 					checkGroupId,
 					planStartDate,
-					planEndDate
+					planEndDate,
+
 				} = _details;
 				uni.redirectTo({
 					url: `/pages/editCheckList/editCheckList?situationId=${situationId}&checkId=${checkId}&checkGroupId=${checkGroupId}&startDate=${planStartDate}&endDate=${planEndDate}`
@@ -178,9 +187,9 @@
 		destroyed() {
 			this.clearTimer();
 		},
-		methods: {
-			tabChangeHandle(num){
-				  this.currentSelectedTab = num;
+		methods: {
+			tabChangeHandle(num) {
+				this.currentSelectedTab = num;
 			},
 			getClass(id) {
 				const index = this.filter.deptIdStr.findIndex(t => t.id == id)
@@ -195,7 +204,7 @@
 					situationType,
 					checkedList,
 				} = this.details;
-				const deptId = checkedList.join(',');
+				const deptId = checkedList?checkedList.join(','):'';
 				this.getEmpDeptTree(checkGroupId, situationType, deptId)
 			},
 			/**
@@ -252,8 +261,8 @@
 					keyword: val
 				};
 			},
-			getComponentInfo(details) {
-
+			getComponentInfo(details) {
+				
 				const {
 					checkGroupId,
 					situationType,
@@ -263,9 +272,11 @@
 					empId,
 					empName,
 					categoryId
-				} = details;
-				this.details = details;
-				const deptId = checkedList.join(',');
+				} = details;
+				
+				this.details = details;
+				
+				const deptId = checkedList ? checkedList.join(',') : '';
 				this.getEmpDeptTree(checkGroupId, situationType, deptId);
 				//查核人回显
 				if (empId && empName) {
@@ -286,37 +297,84 @@
 			},
 			// 查询部门人员树
 			getEmpDeptTree(checkGroupId, situationType, deptId) {
-				this.$store.dispatch({
-					type: 'allocationPerson/commActions',
-					key: "getGroupEmpList",
-					data: {
-						checkGroupId,
-						situationType,
-						deptId,
-						name: this.filter.keyword,
-						deptIdStr: (this.filter.deptIdStr.map(t => t.id == 0 ? '' : t.id)).join(',')
-					}
-				}).then(data => {
-					if (data) {
-						let empList = [];
-						if (data.sysCheckGroupEmployees) {
-							empList = data.sysCheckGroupEmployees.map(t => ({
-								...t,
-								label: `${t.employeeName}  |  ${t.code}  |  ${t.deptName}`
-							}))
-						} else {
-							empList = [];
-						}
-						
-
-						this.empList = empList;
-						this.departments = [{
-							name: '全部',
-							id: 0
-						}, ...data.departments] || [];
-						if (situationType == 3) this.checkPointList = data.pointCategoryBOs || [];
-					}
-				});
+
+				if (this.isZichaducha) {
+					//自查督查人员批量设置
+					this.$store.dispatch({
+						type: 'batchDistribution/commActions',
+						key: "getZichaduchaEmpList",
+						data: {
+							departmentType: this.departmentType,
+							departmentId: this.departmentId,
+						}
+					}).then((data) => {
+						if (data) {
+
+							this.empList = data.map(item => ({
+								label: `${item.empName}`,
+								employeeId: item.empId
+							}));
+							
+							const deweight = (arr)=>{
+							        let map = new Map();
+							        for (let i of arr) {
+							          if (!map.has(i.id)) {
+							            map.set(i.id, i)
+							          }
+							        }
+							        arr = [...map.values()]
+							        return arr;
+							}
+							
+
+							let departments = data.map(item => ({
+								name: item.departmentName,
+								id: item.departmentId
+							}));
+
+							this.departments = [{
+								name: '全部',
+								id: 0
+							   }, 
+							   ...deweight(departments)
+							];
+						}
+					})
+
+				} else {
+					this.$store.dispatch({
+						type: 'allocationPerson/commActions',
+						key: "getGroupEmpList",
+						data: {
+							checkGroupId,
+							situationType,
+							deptId,
+							name: this.filter.keyword,
+							deptIdStr: (this.filter.deptIdStr.map(t => t.id == 0 ? '' : t.id)).join(',')
+						}
+					}).then(data => {
+						if (data) {
+							let empList = [];
+							if (data.sysCheckGroupEmployees) {
+								empList = data.sysCheckGroupEmployees.map(t => ({
+									...t,
+									label: `${t.employeeName}  |  ${t.code}  |  ${t.deptName}`
+								}))
+							} else {
+								empList = [];
+							}
+
+
+							this.empList = empList;
+							this.departments = [{
+								name: '全部',
+								id: 0
+							}, ...data.departments] || [];
+							if (situationType == 3) this.checkPointList = data.pointCategoryBOs || [];
+						}
+					});
+				}
+
 			},
 			//查核要点选择回调
 			checkChanged(data) {
@@ -363,8 +421,12 @@
 			sure() {
 				const {
 					startDate,
-					endDate
-				} = this.details;
+					endDate,
+					planEndDate
+				} = this.details;
+				
+				console.log('this.details',this.details);
+				
 				const empId = (this.checkPresonList.map(item => item.employeeId)).join(',');
 				const empName = (this.checkPresonList.map(item => item.employeeName)).join(',');
 
@@ -374,61 +436,107 @@
 				if (!startDate) {
 					return this.showModal('请选择开始时间');
 				}
-				if (!endDate) {
+				if (!endDate&&!planEndDate) {
 					return this.showModal('请选择结束时间');
-				}
-				if (this.checkPointList.length>0&&this.checkedPointList.length==0) {
-					//当未选择要点分类时
-					return this.showModal('请选择要点分类!');
 				}
-				const {
-					checkId,
-					checkedList,
-					checkNo,
-					situationType
-				} = this.details;
-				const categoryIds = this.checkedPointList.map(item => item.categoryId);
-				const data = {
-					"checkId": checkId, //  计划id
-					"deptId": JSON.parse(JSON.stringify(checkedList)), // 多个单位id列表
-					"empId": empId, // 查核者id
-					"empName": empName, // 查核者名字
-					"startDate": startDate, // 开始时间
-					"endDate": endDate, // 结束时间
-					"checkNo": checkNo,
-					"situationType": Number(situationType),
-					"categoryIds": categoryIds
-
+				if (this.checkPointList.length > 0 && this.checkedPointList.length == 0) {
+					//当未选择要点分类时
+					return this.showModal('请选择要点分类!');
+				}
+				
+                
+				if(this.isZichaducha){
+					//自查督查计划修改
+									
+					if(this.multiple == 'false'){
+						   
+						   this.$store.dispatch({
+						   	type: 'batchDistribution/commActions',
+						   	key: 'saveZichaduchaPlanSet',
+						   	data: {
+						   		checkUser:this.checkPresonList.map(item=>({responsibleUserId:item.employeeId,responsibleUserName:item.label?item.label:item.employeeName})),
+						   		departmentId:Number(this.departmentId),
+						   		functionId:Number(this.editPlanIds),
+						   		planStartDate:startDate,
+						   		planEndDate:endDate?endDate:planEndDate
+						   	}
+						   }).then((data)=>{
+						   	  if(data){
+						   		     uni.navigateBack({
+						   		     	delta: 1
+						   		     });
+						   	  }
+						   })
+					}else{
+						//批量设置
+						let ids = this.editPlanIds.split(',');
+						this.$store.dispatch({
+							type: 'batchDistribution/commActions',
+							key: 'batchSaveZichaduchaPlanSet',
+							data: {
+								checkUser:this.checkPresonList.map(item=>({responsibleUserId:item.employeeId,responsibleUserName:item.label?item.label:item.employeeName})),
+								functionId:ids.map(item=>Number(item)),
+							}
+						}).then((data)=>{
+							  if(data){
+								     uni.navigateBack({
+								     	delta: 1
+								     });
+							  }
+						})
+					}
+					
+					
+				}else{
+					
+					const {
+						checkId,
+						checkedList,
+						checkNo,
+						situationType
+					} = this.details;
+					const categoryIds = this.checkedPointList.map(item => item.categoryId);
+					const data = {
+						"checkId": checkId, //  计划id
+						"deptId": JSON.parse(JSON.stringify(checkedList)), // 多个单位id列表
+						"empId": empId, // 查核者id
+						"empName": empName, // 查核者名字
+						"startDate": startDate, // 开始时间
+						"endDate": endDate?endDate:planEndDate, // 结束时间
+						"checkNo": checkNo,
+						"situationType": Number(situationType),
+						"categoryIds": categoryIds
+					
+					}
+					
+					  this.$store.dispatch({
+					  	type: 'batchDistribution/commActions',
+					  	key: 'batchCheckEmp',
+					  	data: {
+					  		...data
+					  	}
+					  }).then(data => {
+					  	if (data) {
+					  		uni.showModal({
+					  			title: '分配成功!',
+					  			content: '',
+					  			showCancel: false,
+					  			success: function(res) {
+					  				if (res.confirm) {
+					  					// console.log('用户点击确定');
+					  					let pages = getCurrentPages(); // 获取当前页面栈
+					  					let prePage = pages[pages.length - 2]; // 上一个页面
+					  					prePage.ifInit = true;
+					  					uni.navigateBack({
+					  						delta: 1
+					  					});
+					  
+					  				}
+					  			}
+					  		});
+					  	}
+					  });
 				}
-
-				this.$store.dispatch({
-					type: 'batchDistribution/commActions',
-					key: 'batchCheckEmp',
-					data: {
-						...data
-					}
-				}).then(data => {
-					if (data) {
-						uni.showModal({
-							title: '分配成功!',
-							content: '',
-							showCancel: false,
-							success: function(res) {
-								if (res.confirm) {
-									// console.log('用户点击确定');
-									let pages = getCurrentPages(); // 获取当前页面栈
-									let prePage = pages[pages.length - 2]; // 上一个页面
-									prePage.ifInit = true;
-									uni.navigateBack({
-										delta: 1
-									});
-
-								}
-							}
-						});
-					}
-				});
-
 			},
 
 
@@ -526,6 +634,7 @@
 		.scroll-y {
 			height: calc(100% - 87.5rpx);
 			padding-top: 15rpx;
+
 			.blockTitle {
 				display: flex;
 				flex-direction: row;
@@ -541,32 +650,34 @@
 				&.noBottomBlockTitle {
 					border-bottom: none;
 				}
-			}
-			
-			.tabWrap {
-				display: flex;
-				flex-direction: row;
-				justify-content: space-around;
-				align-items: center;
-				padding: 25rpx 0;
-				padding-top: 12.5rpx;
-				
-				.tab {
-					width: 250rpx;
-					height: 50rpx;
-					background: #FFFFFF;
-					border-radius: 25rpx;
-					font-size: 22.5rpx;
-					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-					font-weight: 400;
-					text-align: center;
-					line-height:50rpx;;
-					color: #525866;
-					&.on {
-						color: #FFFFFF;
-						background: #3377FF;
-					}
-				}
+			}
+
+			.tabWrap {
+				display: flex;
+				flex-direction: row;
+				justify-content: space-around;
+				align-items: center;
+				padding: 25rpx 0;
+				padding-top: 12.5rpx;
+
+				.tab {
+					width: 250rpx;
+					height: 50rpx;
+					background: #FFFFFF;
+					border-radius: 25rpx;
+					font-size: 22.5rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					text-align: center;
+					line-height: 50rpx;
+					;
+					color: #525866;
+
+					&.on {
+						color: #FFFFFF;
+						background: #3377FF;
+					}
+				}
 			}
 
 			.filter {
@@ -634,7 +745,7 @@
 						font-size: 25rpx;
 						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
 						font-weight: 400;
-						color: #3377FF;
+						color: #3377FF;
 						white-space: nowrap;
 						border-left: 1rpx solid #DADEE6;
 					}

+ 15 - 0
pages/batchDistribution/server.js

@@ -6,6 +6,21 @@ const requestList = {
     method: 'GET',
     url: 'common/groupEmpList'
   },
+  // 自查督查获取人员列表
+  getZichaduchaEmpList: {
+    method: 'GET',
+    url: 'inspector/getDepartmentEmployee'
+  },
+  // 自查督查计划分配/修改保存
+  saveZichaduchaPlanSet: {
+    method: 'POST',
+    url: 'inspector/saveSelfEmployee'
+  },
+  // 自查督查计划 批量 分配/修改保存
+  batchSaveZichaduchaPlanSet: {
+    method: 'POST',
+    url: 'inspector/saveBatchSelfEmployee'
+  },
   batchCheckEmp: {
     method: 'POST',
     url: 'plan/newDistribution'

+ 248 - 0
pages/checkGroup/checkGroup.vue

@@ -0,0 +1,248 @@
+<!--自查督查 查核单位 -->
+
+<template>
+	<view class="checkGroup">
+		
+		<tmNavbar :customBack="goBack"  :is-back="true" :title="pageTitle" title-color="#292C33"></tmNavbar>
+		
+		<view class="list" v-for="item in list" @click="gotoCheckItemList(item)">
+			<view :class="[item.completeFlag == 0?'mark noCompleted':'mark']">
+				<text class="score">{{`${item.score}分`}}</text>
+				<view class="status">{{item.completeFlag == 0?'未完成':'完成'}}</view>
+			</view>
+			<view class="name">{{item.departmentName}}</view>
+			<view class="rowOne">
+				{{`包含${item.pointCount}个查核要点,已完成${item.itemComplete}个查核项目`}}
+			</view>
+			<view class="rowTwo">
+				要点概览:{{item.pointList.reduce((prev,next)=>`${prev},${next.checkPointName}`,'')}}
+			</view>
+			<view class="footer">
+				<view class="line">
+					<view class="left">{{`职能科室:${item.functionDepartment}`}}</view>
+					<view class="right">{{`${item.checkStartDate}~${item.checkEndDate}`}}</view>
+				</view>
+				<view class="line">
+					<view class="left">自查情况</view>
+					<view class="right">{{`得分:${item.selfScore} 改善:${item.improveStatus}`}}</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	import tmNavbar from "@/components/tm-navbar/tm-navbar.vue";
+	export default {
+		components:{
+			tmNavbar
+		},
+		data() {
+			return {
+                list:[],
+				pageTitle:'标题'
+			};
+		},
+		computed: {
+			...mapState({
+				ifReloadPageData: state => state.checkGroup.ifReloadPageData,
+			})
+		},
+		watch:{
+			ifReloadPageData(cur,prev){
+				if(cur){
+					this.getData(this.situationId,this.num,this.planType);
+				}
+			}
+		},
+		onLoad({
+			situationId,
+			num,
+			planType,
+			name,
+			entry,//点击进来的入口
+			systemSituationType, 
+		}) {
+			this.situationId = situationId;
+			this.num = num;
+			this.entry = entry;
+			this.planType = planType;
+			this.pageTitle = name;
+			this.getData(situationId,num,planType);
+			this.systemSituationType = systemSituationType;
+		},
+		methods: {
+			goBack(e) {
+			    this.$store.commit('situationDetail/comChangeState', {
+			    	key: 'ifReloadPageData',
+			    	data: true
+			    });
+				
+				uni.navigateBack();
+			},
+			getData(situationId,num,planType) {
+				this.$store.dispatch({
+					type: 'planDetailList/commActions',
+					payload: {
+						key: 'getPlanList',
+						data: {
+							situationId: situationId,
+							num: num,
+							planType: planType,
+							entry:this.entry
+						}
+					}
+				}).then((data) => {
+					this.list = data;
+					
+					this.$store.commit('checkGroup/comChangeState', {
+						key: 'ifReloadPageData',
+						data: false
+					});
+				})
+			},
+			gotoCheckItemList(item){
+				uni.navigateTo({
+					url: `/pages/checkMainPoints/checkMainPoints?systemSituationType=${this.systemSituationType}&functionId=${item.functionId}&isZichaDucha=${true}&departmentId=${item.departmentId}`
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	.checkGroup {
+		padding: 25rpx;
+
+		.list {
+			position: relative;
+			width: 700rpx;
+			height: 280rpx;
+			padding: 25rpx;
+			box-sizing: border-box;
+			background: #FFFFFF;
+			box-shadow: 0px 3.75rpx 12.5rpx 0px rgba(0, 13, 51, 0.1);
+			border-radius: 5rpx;
+			margin-bottom: 25rpx;
+
+			.mark {
+				display: inline-flex;
+				flex-direction: row;
+				justify-content: flex-end;
+				align-items: center;
+				position: absolute;
+				top: 0;
+				right: 0;
+				// width: 237.5rpx;
+				height: 35rpx;
+				background: rgba(41, 204, 150, .1);
+				border-radius: 0px 5rpx 0px 28.13rpx;
+
+				.score {
+					font-size: 17.5rpx;
+					font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+					font-weight: 500;
+					color: #29CC96;
+					padding: 0 25rpx;
+				}
+
+				.status {
+					display: inline-block;
+					padding: 0 18.75rpx;
+					height: 35rpx;
+					line-height: 35rpx;
+					text-align: center;
+					background: #29CC96;
+					border-radius: 0px 5rpx 0px 28.13rpx;
+					font-size: 17.5rpx;
+					font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+					font-weight: 500;
+					color: #FFFFFF;
+				}
+				&.noCompleted {
+					background: rgba(255, 204, 102, .1);
+					.score {
+						color: rgba(255, 170, 0, 1);
+					}
+					.status {
+						background: rgba(255, 170, 0, 1);
+					}
+				}
+			}
+
+			.name {
+				font-size: 35rpx;
+				font-family: SourceHanSansCN-Light, SourceHanSansCN;
+				font-weight: 300;
+				color: #292C33;
+				margin-bottom: 25rpx;
+			}
+
+			.rowOne {
+				// height: 20rpx;
+				// line-height: 20rpx;
+				font-size: 20rpx;
+				font-family: SourceHanSansCN-Bold, SourceHanSansCN;
+				font-weight: bold;
+				color: #292C33;
+				margin-bottom: 15rpx;
+			}
+
+			.rowTwo {
+				// height: 20rpx;
+				// line-height: 20rpx;
+				font-size: 20rpx;
+				font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+				font-weight: 400;
+				color: #666F80;
+				margin-bottom: 25rpx;
+				white-space: nowrap;
+				overflow: hidden;
+				text-overflow: ellipsis;
+			}
+
+			.footer {
+				padding-top: 18.75rpx;
+				border-top: 0.63rpx solid #DADEE6;
+
+				.line {
+					display: flex;
+					flex-direction: row;
+					justify-content: space-between;
+					align-items: center;
+					margin-bottom: 15rpx;
+
+					.left {
+						width: 50%;
+						font-size: 17.5rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #666E80;
+						white-space: nowrap;
+						overflow: hidden;
+						text-overflow: ellipsis;
+					}
+
+					.right {
+						text-align: right;
+						width: 50%;
+						font-size: 17.5rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #666E80;
+						white-space: nowrap;
+						overflow: hidden;
+						text-overflow: ellipsis;
+					}
+
+					&:last-child {
+						margin-bottom: 0;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 18 - 0
pages/checkGroup/model.js

@@ -0,0 +1,18 @@
+import { commServer } from './server.js';
+	
+export default {
+  namespaced: true,
+  state: {
+      ifReloadPageData:false
+  },
+  mutations: {
+		comChangeState(state, {key, data}) {
+			state[key] = data;
+		},
+  },
+  actions: {
+		commActions({ commit, state }, { key, data }) {
+      return commServer(key, data);
+		},
+  }
+}

+ 11 - 0
pages/checkGroup/server.js

@@ -0,0 +1,11 @@
+import { creatRequest } from '../../utils/request.js';
+
+const requestList = {
+
+
+};
+
+export const commServer = (key, data) => {
+  let obj = requestList[key];
+  return creatRequest(obj, data);
+}

+ 165 - 58
pages/checkMainPoints/checkMainPoints.vue

@@ -11,7 +11,9 @@
 				<text @click="cancelSearchMod" class="searchActiveBtn">取消</text>
 			</view>
 		</u-navbar>
-		<uni-popup ref="popup" type="center" :maskClick="true" @change="onMaskChange"></uni-popup>
+		<uni-popup ref="popup" type="center" :maskClick="true" @change="onMaskChange">
+		
+		</uni-popup>
 		<tm-top-menu v-if="!ifSearchMod" class="tm-top-menu">
 			<template v-if="situationType != 2">
 				<view class="top-search">
@@ -59,7 +61,7 @@
 			</template>
 			<!-- 只有当查核者进入才展示 -->
 			<view ref="rowTwoWraper">
-				  <view class="rowTwo"v-if="nowPermission == 3||nowPermission == 1" :animation="animationData" v-for="(v,i) in btnArr">
+				  <view class="rowTwo"v-if="nowPermission == 3||nowPermission == 1||nowPermission == 7||nowPermission == 8||nowPermission == 6" :animation="animationData" v-for="(v,i) in btnArr">
 				  	<text class="rowTwoName">{{v.key}}</text>
 				  	<view class="filterBtnWrap" :style="{paddingBottom:i==2?'20px':0}">
 				  		<com-button v-for="(item, index) in v.list" :btnText="item.label" :width="`${32}%`" :height="80" :marginBottom="20"
@@ -100,9 +102,15 @@
 								<!-- 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="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> -->
+									<image v-if="child.isNoApplicable"
+										class="checkIcon" src="../../static/check-no.png" mode=""></image>
+										
+									<image v-if="!child.isNoApplicable"
 										class="checkIcon" src="../../static/check-checkbox.png" mode=""></image>
 									<text class="checkStatusText">{{child.notApplicableName}}</text>
 								</view>
@@ -120,11 +128,11 @@
 								<text>查核方式</text>
 							</view>
 							<view class="child">
-								<text :style="{color:`#${child.lastResultColor}`}">{{child.lastResult || '--'}}</text>
+								<text :style="{color:`#${child.lastResultColor}`}">{{isZichaDucha?child.lastResultName:child.lastResult || '--'}}</text>
 								<text>上次结果</text>
 							</view>
 							<view class="child">
-								<text :style="{color:`#${child.checkResultColor}`}">{{child.checkResult || '--'}}</text>
+								<text :style="{color:`#${child.checkResultColor}`}">{{isZichaDucha?child.checkResultName:child.checkResult || '--'}}</text>
 								<text>本次结果</text>
 							</view>
 						</view>
@@ -272,7 +280,11 @@
 			deptId,
 			finishedStatus,
 			situationType,
-			pageTemplateId
+			pageTemplateId,
+			isZichaDucha,
+			functionId, //计划id 用于自查督查
+			departmentId,//科室id 用于自查督查
+			systemSituationType, 
 		}) {
 
 			this.deptId = deptId;
@@ -280,9 +292,13 @@
 			this.finishedStatus = finishedStatus;
 			this.situationType = situationType;
             this.pageTemplateId = pageTemplateId;
-			
+			this.functionId = functionId;
+			this.isZichaDucha = isZichaDucha?JSON.parse(isZichaDucha):false;
+			this.departmentId = departmentId; //用于自查督查作为科室id
+			this.systemSituationType = systemSituationType;
 			
-			if (situationType == 2) {
+			if (situationType == 2) {
+				//分页模式
 				this.getInvestigationUsers();
 			}
 			//非分页情况下
@@ -292,7 +308,7 @@
 			if(this.currentSelectedInvestigationUser){
 				this.getFilterList(checkId,deptId,this.currentSelectedInvestigationUser.investigationId);
 			}else{
-				this.getFilterList(checkId,deptId);
+		        this.getFilterList(checkId,departmentId);
 			}
 			
 		},
@@ -309,8 +325,15 @@
 
 			this.animation = animation;
 
+		},
+		onBackPress(e) {
+		    this.$store.commit('checkGroup/comChangeState', {
+		    	key: 'ifReloadPageData',
+		    	data: true
+		    });
 		},
-		onUnload() {
+		onUnload() {
+			
 			this.$store.commit('checkMainPoints/comChangeState', {
 				key: 'ifReloadPageData',
 				data: false
@@ -373,8 +396,8 @@
  
 				if (!notNowBindPeopledeptIds.includes(this.deptId) || bool) {
 					const nowPermission = JSON.parse(uni.getStorageSync('nowPermission'));
-					console.log(this.isBindResponsible,this.checkDetailMapResponses.length > 0,nowPermission);
-					if (!this.isBindResponsible && this.checkDetailMapResponses.length > 0 && nowPermission == 3) {
+					// console.log(this.isBindResponsible,this.checkDetailMapResponses.length > 0,nowPermission);
+					if (!this.isBindResponsible && this.checkDetailMapResponses.length > 0 && (nowPermission == 3||nowPermission == 7||nowPermission == 8)) {
 						//当是否已绑定当事人状态为false,可查核项大于0且当前角色是查核组员时
 						//只有从查核列表进来才提示
 						uni.showModal({
@@ -385,7 +408,7 @@
 							success: (res) => {
 								if (res.confirm) {
 									uni.navigateTo({
-										url: `/pages/responsibleList/responsibleList?deptId=${this.deptId}&isFromCheckMainPoints=true`,
+										url: `/pages/responsibleList/responsibleList?deptId=${this.isZichaDucha?this.departmentId:this.deptId}&isFromCheckMainPoints=true&isZichaDucha=${this.isZichaDucha}`,
 									});
 								} else if (res.cancel) {
 									//将当前病区保存,之后不在提示
@@ -409,6 +432,53 @@
 				}
 			},
 			loadItemData() {
+				
+				if(this.isZichaDucha){
+					//自查督查的情况下
+					this.$store.dispatch({
+						type: 'checkMainPoints/commActions',
+						key: 'getZichaduchaCheckItems',
+						data:{
+							functionId:this.functionId,
+							// filter:
+						}
+					}).then(data => {
+						if (data) {
+							let renderList = data.checkDetailMapResponses?data.checkDetailMapResponses:[];
+						    							
+							this.$store.commit('checkMainPoints/comChangeState', {
+								key: 'detailList',
+								data: renderList
+							});
+							
+							this.isBindResponsible = data.isBindResponsible;
+							this.detailList = renderList;
+							this.copyDetailList = renderList;
+							this.currentScore = data.getScore;
+							this.totalScore = data.totalScore;
+							this.subtotalScore = data.subtotalScore;
+							this.isShowSubtotal = data.isShowSubtotal;
+							this.totalSubtotalScore = data.totalSubtotalScore;
+							this.checkDetailMapResponses = renderList;
+							renderList.map(({
+								checkPointId,
+								checkPointName
+							}) => {
+								this.point.push({
+									checkPointId,
+									checkPointName
+								});
+							});
+							//检查是否需要弹绑定当事人弹窗
+							//this.toBindPeople();
+						}
+					});
+					
+					return
+				}
+				
+				
+				//非自查督查的情况下
 				if(this.situationType == 2&&!this.currentSelectedInvestigationUser){
 					//分页模式下且未选择访谈对象时拒绝请求数据同时清空历史数据
 					this.$store.commit('checkMainPoints/comChangeState', {
@@ -425,7 +495,8 @@
 					this.checkDetailMapResponses = [];
 					this.point = [];
 					return false
-				}
+				}
+				
 				this.checkTaskDetailList({
 					'deptId': this.deptId,
 					'checkId': this.checkId,
@@ -442,7 +513,10 @@
 				this.$store.dispatch({
 					type: 'checkMainPoints/commActions',
 					key: 'oneKeyNotApplicable',
-					data: id
+					data: {
+						id,
+						type:this.isZichaDucha?1:0, //0 普通的  1自查督查
+					}
 				}).then(data => {
 					if (data) {
 						//重新拉去列表数据
@@ -490,8 +564,7 @@
 				}
 			},
 			openFilter() {
-				const status = this.ifOpenFilter;
-				// console.log(this.$refs.rowTwoWraper.$el.offsetHeight)
+				const status = this.ifOpenFilter;
 				if (!status) {
 					this.$refs.popup.open();
 					this.ifOpenFilter = true;
@@ -531,35 +604,62 @@
 					}
 				});
 			},
-			oneKeyCheckCommit() {
-				let ids = [];
-				this.detailList.forEach(item => {
-					//筛选掉已查核项
-					const temp = item.responseList.filter(v => !v.checkResult);
-					const arr = temp.map(v => v.id);
-					ids = ids.concat(arr);
-				});
-				this.$store.dispatch({
-					type: 'checkMainPoints/commActions',
-					key: 'oneKeyCheck',
-					data: ids
-				}).then(data => {
-					if (data) {
-						uni.showModal({
-							title: '查核完成!',
-							content: '',
-							showCancel: false,
-							success: function(res) {
-								if (res.confirm) {
-									console.log('用户点击确定');
-									uni.navigateBack({
-										delta: 1
-									});
-								}
-							}
-						});
-					}
-				});
+			oneKeyCheckCommit() {
+				if(!this.isZichaDucha){
+					//非自查督查
+					let ids = [];
+					this.detailList.forEach(item => {
+						//筛选掉已查核项
+						const temp = item.responseList.filter(v => !v.checkResult);
+						const arr = temp.map(v => v.id);
+						ids = ids.concat(arr);
+					});
+					this.$store.dispatch({
+						type: 'checkMainPoints/commActions',
+						key: 'oneKeyCheck',
+						data: ids
+					}).then(data => {
+						if (data) {
+							uni.showModal({
+								title: '查核完成!',
+								content: '',
+								showCancel: false,
+								success: function(res) {
+									if (res.confirm) {
+										console.log('用户点击确定');
+										uni.navigateBack({
+											delta: 1
+										});
+									}
+								}
+							});
+						}
+					});
+					
+				}else{
+					//自查督查
+					this.$store.dispatch({
+						type: 'checkMainPoints/commActions',
+						key: 'oneKeyCheckZichaducha',
+						data:Number(this.functionId)
+					}).then((data)=>{
+						if(data){
+							  uni.showModal({
+							  	title: '查核完成!',
+							  	content: '',
+							  	showCancel: false,
+							  	success: function(res) {
+							  		if (res.confirm) {
+							  			uni.navigateBack({
+							  				delta: 1
+							  			});
+							  		}
+							  	}
+							  });
+						}
+					})
+				}
+				
 			},
 			setFilterBtnType(val,key){
 				if(key == '查核结果'){
@@ -632,7 +732,8 @@
 				deptId,
 				situationType,
 				investigationId,
-			}) {
+			}) {
+								
 				const params = {
 					checkId,
 					deptId,
@@ -643,7 +744,8 @@
 				}
 				
 				//增加受访人
-				if (situationType == 2) params['investigationId'] = investigationId;
+				if (situationType == 2) params['investigationId'] = investigationId;
+				
 				this.dispatch('checkTaskDetailList', {
 					...params
 				}).then((data) => {
@@ -678,17 +780,18 @@
 					}
 				});
 			},
-			childClick(child, checkPointId) {
-				// 查核者,管理员
-				if (this.nowPermission == 1 || this.nowPermission == 3) {
+			childClick(child, checkPointId) {
+			
+				if (this.nowPermission == 1 || this.nowPermission == 3||this.nowPermission == 6 ||this.nowPermission == 7 ||this.nowPermission == 8 ) {
 					let str = '',
 						that = this;
 
 					if (child.checkResult && !child.allowEdit) {
 						// 当存在查核结果且不允许再修改时 跳转到查核项详情
-						str = 'auditItemDetails/auditItemDetails';
+						str = `auditItemDetails/auditItemDetails`;
 					} else {
-						if (this.nowPermission == 1) {
+						if (this.nowPermission != 3&&this.nowPermission != 8&&this.nowPermission != 7) {
+							//角色为非查核组员,职能科室普通人员,自查人
 							uni.showModal({
 								title: '提示',
 								content: '请切换至查核者角色再进行查核操作!',
@@ -697,11 +800,12 @@
 							return;
 						} else {
 							// 跳转到查核结果提交
-							str = 'mainPointsDetail/mainPointsDetail';
+							str = `mainPointsDetail/mainPointsDetail`;
 						}
-					}
+					}
+					
 					uni.navigateTo({
-						url: `/pages/${str}?id=${child.id}&checkPointId=${checkPointId}&checkItemId=${child.checkItemId}&situationType=${this.situationType}`,
+						url: `/pages/${str}?id=${child.id}&checkPointId=${checkPointId}&checkItemId=${child.checkItemId}&situationType=${this.situationType}&isZichaDucha=${this.isZichaDucha}&departmentId=${this.departmentId}`,
 						success: function(res) {
 							const currentGroup = that.detailList.filter(item => item.checkPointId ==
 								checkPointId);
@@ -1159,7 +1263,10 @@
 		}
 
 		.list {
-			.title {
+			.title {
+				white-space: nowrap;
+				overflow: hidden;
+				text-overflow: ellipsis;
 				padding-left: 25rpx;
 				width: 100%;
 				height: 62.5rpx;

+ 15 - 1
pages/checkMainPoints/server.js

@@ -19,6 +19,14 @@ const requestList = {
   getPointConditions:{   //获取筛选条件
 	method: 'GET',
 	url: 'plan/getPointConditions'  
+  },
+  getZichaduchaCheckItems:{ //获取自查督查查核要点
+	  method: 'GET',
+	  url: 'inspector/checkItemList'  
+  },
+  oneKeyCheckZichaducha:{ //一键查核自查督查
+  	  method: 'post',
+  	  url: 'inspector/saveBatchItem'  
   }
 };
 
@@ -28,8 +36,14 @@ export const commServer = (key, data) => {
   if(key=='oneKeyNotApplicable'){
 	  return creatRequest({
 		  ...obj,
-		  url:`checkTask/notApplicable?checkDetailId=${data}`
+		  url:`checkTask/notApplicable?checkDetailId=${data.id}&type=${data.type}`
 	  });
   }
+  if(key=='oneKeyCheckZichaducha'){
+  	  return creatRequest({
+  		  ...obj,
+  		  url:`inspector/saveBatchItem?functionId=${data}`
+  	  });
+  }
   return creatRequest(obj, data);
 }

+ 27 - 9
pages/creatingSituations/components/checkMap.vue

@@ -52,6 +52,7 @@
 		},
 		computed: {
 			...mapState({
+				theme: state => state.creatingSituations.theme,
 				checkMap: state => state.creatingSituations.checkMap,
 				checkRent: state => state.creatingSituations.checkRent,
 				condition: state => state.creatingSituations.condition,
@@ -66,19 +67,36 @@
 			init: function() {
 				const {checkedItem} = this.checkRent;
 				const {depType} = this.condition;
+				
 				// 编辑的时候不用获取数据
 				if(this.editConfig && this.editConfig.checkRent && depType === this.editConfig.condition.depType && checkedItem.id === this.editConfig.checkRent.checkedItem.id) {
 					this.commit('checkMap', this.editConfig.checkMap);
 				} else if(this.needReload) { // 点击上一步不用获取数据
-					if(!checkedItem.points) return;
-					let checkPointIds = checkedItem.points.map(({id})=> id);
-					this.dispatch('checkDeptList', { depType, checkPointIds,conditionIds: this.condition.conditionIds })
-						.then((data)=> {
-							if(data) {
-								let _data = this.checkDep(data);
-								this.myCommit('list', _data);
-							} 
-						});
+				
+				    if(this.theme.id != 2){
+						//普通+个案
+						 if(!checkedItem.points) return;
+						 let checkPointIds = checkedItem.points.map(({id})=> id);
+						 this.dispatch('checkDeptList', { depType, checkPointIds,conditionIds: this.condition.conditionIds })
+						 	.then((data)=> {
+						 		if(data) {
+						 			let _data = this.checkDep(data);
+						 			this.myCommit('list', _data);
+						 		} 
+						 	});
+					}
+					if(this.theme.id == 2){
+						//自查督查
+						 this.dispatch('getPlanSetMap',this.condition.conditionIds)
+						 	.then((data)=> {
+						 		if(data) {
+						 			let _data = this.checkDep(data);
+						 			this.myCommit('list', _data);
+						 		} 
+						 	});
+					}
+					
+					
 					// 获取新增单位
 					this.dispatch('deptList', { depType }).then((data)=>{
 						if(data) this.myCommit('deptList', data);

+ 3 - 2
pages/creatingSituations/components/checkPlan.vue

@@ -1,6 +1,7 @@
 <template>
 	<view class="check-plan">
-		<view class="title">请制定查核计划({{showCheckPlan1 ? 1 : 2}}/2)</view>
+		<view class="title" v-if="theme.id != 2">请制定查核计划({{showCheckPlan1 ? 1 : 2}}/2)</view>
+		<view class="title" v-if="theme.id == 2">请制定查核计划</view>
 		<view class="content1" v-if="showCheckPlan1">
 			<view class="list">
 				<view class="item" v-for="(item, index) in list" :key="index">
@@ -92,8 +93,8 @@
 		computed: {
 			...mapState({
 				showCheckPlan1: state => state.creatingSituations.showCheckPlan1,
+				theme: state => state.creatingSituations.theme,
 				checkPlan: state =>{
-					console.log('state.creatingSituations.checkPlan',state.creatingSituations.checkPlan);
 					return state.creatingSituations.checkPlan;
 				},
 			}),

+ 3 - 1
pages/creatingSituations/components/checkRent.vue

@@ -66,7 +66,9 @@
 				checkRent: state => state.creatingSituations.checkRent,
 				condition: state => state.creatingSituations.condition,
 				needReload: state => state.creatingSituations.needReload,
-				editConfig: state => state.creatingSituations.editConfig
+				editConfig: state => state.creatingSituations.editConfig,
+				theme: state => state.creatingSituations.theme,
+				conditionCard: state => state.creatingSituations.conditionCard,
 			})
 		},
 		watch:{

+ 27 - 6
pages/creatingSituations/components/condition.vue

@@ -13,7 +13,8 @@
 		<tm-trees :options="condition.options"
 		 :defaultOpen="condition.defaultOpen" 
 		 :defaultChecked="condition.conditionIds"
-		 v-on:checked-keys="checkedHandle"></tm-trees>
+		 :parentCheckble = "false"	
+		 @checked-keys="checkedHandle"></tm-trees>
 	</view>
 </template>
 
@@ -39,12 +40,16 @@
 					data: this.editConfig.condition
 				});
 			} else if(this.needReload) {
-				this.getOptions(this.theme.id === 1 ? 1 :this.condition.depType);
+				if(this.theme.id != undefined||this.theme.id != null){
+					  this.getOptions(this.theme.id === 1 ? 1 :this.condition.depType);
+				}
+				
 			}
 		},
 		methods: {
-			checkedHandle: function(keys) {
-				this.myCommit('conditionIds', keys);
+			checkedHandle: function(conditionIds,conditions) {
+				this.myCommit('conditionIds', conditionIds);
+				this.myCommit('checkedItems', conditions);
 			},
 			selectBtnHandle: function(depType) {
 				this.myCommit('depType', depType);
@@ -56,7 +61,8 @@
 			getOptions: function(depType) {
 				this.checkedHandle([]); // 切换后清空选中
 				const {id} = this.theme;
-				if(id || id === 0) {
+				if(id === 0||id == 1) {
+					//普通+个案
 					this.$store.dispatch({
 						type: 'creatingSituations/commActions',
 						key: 'conditions',
@@ -69,7 +75,22 @@
 							this.myCommit('options', conditionOptions(data));
 						} 
 					});
-				} else {
+				} else if(id == 2) {
+					//自查督查
+					this.$store.dispatch({
+						type: 'creatingSituations/commActions',
+						key: 'getTypeLists',
+						data: { filter:1,situationId:this.theme.situationId}
+					}).then((data)=> {
+					
+						if(data) {
+							if(data.length > 0) {
+								this.myCommit('defaultOpen', [data[0].id]);
+							}
+							this.myCommit('options', conditionOptions(data));
+						} 
+					});
+				}else {
 					uni.showModal({
 					  title: '温馨提示',
 					  content: '请先选择主题!',

+ 436 - 0
pages/creatingSituations/components/conditionCard.vue

@@ -0,0 +1,436 @@
+<!-- 个案情境创建时的可选条件 -->
+<template>
+	<div class="conditionCard">
+		<view class="title">请选择追踪条件(可多选)</view>
+		<view class="container">
+			<view class="card" v-for="(data,index) in list">
+				<view class="mark">{{`${index+1}/${list.length}`}}</view>
+				<!-- <view class="cardInner" v-if="item.initialize == 1" v-for="item in data.child">
+					<view :class="[item.required == 1?'cardTitle required':'cardTitle']">{{item.name?item.name:''}}</view>
+					<view :class="[item.child.length>2?'tabWrap multi':'tabWrap']">
+						<view :class="[selectedIds.includes(val.id)?'tab on':'tab']" v-for="val in item.child"
+							@click="tabClickHandle(val,index,item.multiple,item.child,item)">
+							<image v-if="selectedIds.includes(val.id)&&item.child.length>2"
+								src="../../../static/activedGou_white.png" class="bottomMark" mode=""></image>
+							{{val.name}}
+						</view>
+					</view>
+				</view> -->
+
+				<view class="cardInner" v-for="item in childContainer[index].list">
+					<view :class="[item.required == 1?'cardTitle required':'cardTitle']">{{item.name?item.name:''}}
+					</view>
+					<view :class="[item.child.length>2?'tabWrap multi':'tabWrap']">
+						<view :class="[selectedIds.includes(val.id)?'tab on':'tab']" v-for="val in item.child"
+							@click="tabClickHandle(val,index,item.multiple,item.child,item)">
+							<image v-if="selectedIds.includes(val.id)&&item.child.length>2"
+								src="../../../static/activedGou_white.png" class="bottomMark" mode=""></image>
+							{{val.name}}
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+
+	export default {
+		computed: {
+			...mapState({
+				needReload: state => state.creatingSituations.needReload,
+				condition: state => state.creatingSituations.condition,
+				theme: state => state.creatingSituations.theme,
+				editConfig: state => state.creatingSituations.editConfig,
+				conditionCard: state => state.creatingSituations.conditionCard
+			})
+		},
+		data() {
+			return {
+				results: [], //选择结果列表
+				requireds: [], //必填项
+				list: [],
+				childContainer: [],
+				selectedIds: [],
+				currentActTabGroupId: null,
+			}
+		},
+		watch: {
+			childContainer(prev, cur) {
+
+				this.$store.commit({
+					type: 'creatingSituations/comChangeState',
+					key: 'condition',
+					data: {
+						...this.condition,
+						childContainer: prev
+					}
+				});
+			},
+			results(prev, cur) {
+				this.$store.commit({
+					type: 'creatingSituations/comChangeState',
+					key: 'conditionCard',
+					data: {
+						...this.conditionCard,
+						checkResults: prev
+					}
+				});
+			},
+		},
+		created: function() {
+			// 编辑的时候不用获取数据
+
+			if (this.editConfig && this.editConfig.theme.id === this.theme.id) {
+
+				this.$store.commit({
+					type: 'creatingSituations/comChangeState',
+					key: 'condition',
+					data: this.editConfig.condition
+				});
+
+
+			} else if (this.needReload) {
+				if (this.theme.id != undefined || this.theme.id != null) {
+					this.$store.commit({
+						type: 'creatingSituations/comChangeState',
+						key: 'condition',
+						data: {
+							...this.condition,
+							options: [],
+							conditionIds: [],
+							childContainer: []
+						}
+					});
+
+					this.getData();
+				}
+
+			} else {
+				this.list = this.condition.options;
+				this.selectedIds = this.condition.conditionIds;
+				this.childContainer = this.condition.childContainer;
+				this.results = this.conditionCard.checkResults;
+			}
+
+		},
+		methods: {
+			sortFunc(arr) {
+				return arr.map(item => {
+
+					const arr = item.list;
+					arr.sort((cur, next) => {
+						return cur.id - next.id
+					});
+
+					return {
+						...item,
+						list: arr
+					}
+				})
+			},
+			getData(depType) {
+				const {
+					id
+				} = this.theme;
+				this.$store.dispatch({
+					type: 'creatingSituations/commActions',
+					key: 'getTypeListsInGeanCreate',
+					data: {
+						depType: 0,
+						type: id
+					}
+				}).then(data => {
+					if (data) {
+						this.list = data;
+
+						this.childContainer = data.map((item, index) => {
+
+							for (let i = 0; i < item.child.length; i++) {
+								if (item.child[i].required == 1) {
+									//必填
+									this.requireds = [...this.requireds, item.child[i]]
+								}
+							}
+							return {
+								index: index,
+								list: [item.child[0]]
+							}
+						});
+
+						this.$store.commit({
+							type: 'creatingSituations/comChangeState',
+							key: 'condition',
+							data: {
+								...this.condition,
+								options: data
+							}
+						});
+						this.$store.commit({
+							type: 'creatingSituations/comChangeState',
+							key: 'conditionCard',
+							data: {
+								...this.conditionCard,
+								requireds: this.requireds
+							}
+						});
+
+
+					}
+				})
+			},
+			tabClickHandle(item, index, isMulti, parts, parent) {
+				// console.log({item, index, isMulti, parts,parent});
+				// console.log({results:this.results});
+				
+				const needCancelActiedItems = parts.filter(a => a.id != item.id);
+				const needCancelActiedIds = needCancelActiedItems.map(b => b.id);
+				const needCancelActiedcardIds = needCancelActiedItems.map(i => i.subOptionId);
+
+				if (isMulti == 1) {
+					//isMulti == 1 单选
+					
+					const leftActivedIds = this.selectedIds.filter(c => !(needCancelActiedIds.includes(c))); //去除非选中项
+
+					this.selectedIds = [...leftActivedIds, item.id];
+
+					const parentSameIdIndex = this.results.findIndex(item => item.id == parent.id);
+
+					if (parentSameIdIndex != -1) {
+						//之前有选过,需要修改
+						const _results = this.results.map(a => {
+							if (a.id == parent.id) {
+								return {
+									...a,
+									value: item.name,
+								}
+							} else {
+								return a
+							}
+						})
+						this.results = [..._results];
+
+					} else {
+						this.results = [...this.results, {
+							name: parent.name,
+							value: item.name,
+							id: parent.id
+						}];
+					}
+
+					const filtedResults = this.results.filter(i => !(needCancelActiedcardIds.includes(i.id)));
+
+					this.results = [...filtedResults];
+
+
+
+				}
+
+				if (isMulti == 2) {
+					//isMulti == 2 多选
+					const index = this.selectedIds.findIndex(a => a == item.id);
+
+					if (index != -1) {
+						//已选中
+						this.selectedIds = this.selectedIds.filter(a => a != item.id);
+					} else {
+						this.selectedIds = [...this.selectedIds, item.id];
+					}
+
+					this.results = [...this.results, {
+						name: parent.name,
+						value: item.name,
+						id: parent.id
+					}];
+
+				}
+
+
+				if (item.subOptions) {
+					//subOptionId 关联子选项id,subOptions是否有关联子级选项
+
+					const childs = this.list[index].child.filter(d => d.id == item.subOptionId);
+					const needDeleteChilds = parts.filter(e => e.id != item.id); //获取同层级需要取消高亮的tab
+					const needDeleteChildIds = needDeleteChilds.map(f => f.id);
+
+					const needCancelActivedTabs = needDeleteChilds.filter(f => f.subOptions);
+
+					const filtedChildContainer = this.childContainer[index].list.filter(g => !(needDeleteChildIds.includes(
+						g.id)));
+
+					const positionIndex = filtedChildContainer.findIndex(a => a.id == childs[0].id);
+
+					if (isMulti == 1) {
+						//单选
+						if (positionIndex == -1) {
+							this.childContainer[index].list = [...childs, ...filtedChildContainer]
+						}
+					}
+
+					if (isMulti == 2) {
+						//多选
+						if (positionIndex != -1) {
+							const _list = this.childContainer[index].list;
+							_list.splice(positionIndex, 1);
+							this.childContainer[index].list = _list;
+						} else {
+							this.childContainer[index].list = [...childs, ...filtedChildContainer]
+						}
+
+
+					}
+
+
+				} else {
+
+					if (isMulti != 2) {
+						//单选同一组中
+						const needDeleteChilds = parts.filter(e => e.id != item.id); //获取同层级需要取消高亮的tab
+						const needDeleteChildIds = needDeleteChilds.map(f => f.subOptionId);
+
+
+						const filtedChildContainer = this.childContainer[index].list.filter(g => {
+							if (needDeleteChildIds.includes(g.id)) {
+								const ids = g.child.map(a => a.id);
+								const selectedIds = this.selectedIds.filter(f => !(ids.includes(f)));
+								this.selectedIds = selectedIds;
+							}
+
+							return !(needDeleteChildIds.includes(g.id))
+						})
+
+						this.childContainer[index].list = [...filtedChildContainer];
+					}
+
+				}
+
+				this.currentActTabGroupId = item.parentId;
+
+
+				this.$store.commit({
+					type: 'creatingSituations/comChangeState',
+					key: 'condition',
+					data: {
+						...this.condition,
+						conditionIds: this.selectedIds
+					}
+				});
+
+				this.childContainer = this.sortFunc(this.childContainer);
+				
+				// console.log('this.childContainer',this.childContainer);
+				// console.log('this.results',this.results);
+
+
+			},
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	.conditionCard {
+		.container {
+			padding: 25rpx;
+
+			.card {
+				position: relative;
+				width: 100%;
+				padding: 25rpx;
+				background: #FFFFFF;
+				border-radius: 15rpx;
+				margin-bottom: 25rpx;
+
+				.mark {
+					display: flex;
+					position: absolute;
+					justify-content: center;
+					align-items: center;
+					top: 0;
+					left: 0;
+					font-size: 22.5rpx;
+					font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+					font-weight: 500;
+					color: #FFFFFF;
+					width: 75rpx;
+					height: 45rpx;
+					background: linear-gradient(270deg, #66A6FF 0%, #4D88FF 100%);
+					border-radius: 15rpx 0px 35rpx 0px;
+				}
+
+				.cardInner {
+					margin-bottom: 25rpx;
+
+					.cardTitle {
+						text-align: center;
+						font-size: 22.5rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #525866;
+						margin-bottom: 25rpx;
+
+						&.required {
+							&::before {
+								position: relative;
+								content: '*';
+								color: rgba(255, 51, 85, 1);
+								left: -3rpx;
+							}
+						}
+					}
+
+					.tabWrap {
+						display: flex;
+						flex-direction: row;
+						justify-content: space-between;
+
+						.tab {
+							width: 48.5%;
+							text-align: center;
+							font-size: 25rpx;
+							margin-bottom: 25rpx;
+							font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+							font-weight: 400;
+							color: #525866;
+							height: 62.5rpx;
+							line-height: 60rpx;
+							background: #F5F7FA;
+							border-radius: 10rpx;
+
+							&.on {
+								color: #3377FF;
+								background: #E6EEFF;
+							}
+						}
+
+						&.multi {
+							display: flex;
+							flex-wrap: wrap;
+
+							.tab {
+								position: relative;
+								width: 23%;
+
+								.bottomMark {
+									position: absolute;
+									width: 25rpx;
+									height: 25rpx;
+									bottom: 0;
+									right: 0;
+								}
+							}
+						}
+					}
+
+					&:last-child {
+						margin-bottom: 0;
+					}
+				}
+
+			}
+		}
+	}
+</style>

+ 459 - 0
pages/creatingSituations/components/person.vue

@@ -0,0 +1,459 @@
+<template>
+	<view class="person">
+		<view class="title">请指定查核人</view>
+		
+		<view class="searchBar" >
+			<view class="filter">
+				<view class="selecter" @click="selecterHandle">
+					<text>{{selectedStr}}</text>
+					<image src="../../../static/fillBlackArrow.png" mode=""></image>
+				</view>
+				<view class="searchBar">
+					<image class="serachIcon" src="../../../static/searchIcon.png" mode=""></image>
+					<tm-input class="searchVal" :clear="ifclearSearch" @onChange="searchInputHandle"
+						placeholder="请输入人员名称"></tm-input>
+					<view class="searchBtn" @click="searchHandle">搜索</view>
+				</view>
+			</view>
+		</view>
+		
+		<view class="list">
+			<view class="item" v-for="(item,index) in copiedDepList">
+				<view class="itemInner">
+					<text>{{item.empName}}</text>
+					<text>{{item.empId}}</text>
+					<text>{{item.departmentName}}</text>
+				</view>
+				<view class="icon" @click="checkedHandle($event, item)">
+					<image
+						:src="`../../static/check-${ checkPerson.checkedItems&&(checkPerson.checkedItems.findIndex(val=>val.empId == item.empId)) != -1 ? 'checkbox' : 'no'}.png`">
+					</image>
+				</view>
+			</view>
+		</view>
+		<uni-popup ref="popup" type="bottom" :maskClick="true">
+			<view class="selectableList">
+				<scroll-view scroll-y="true" class="listWrap">
+					<view :class="getClass(v.id)" v-for="(v,i) in selectables" @click="listClickHandle(v)">
+						{{`${v.name}`}}
+					</view>
+				</scroll-view>
+				<view class="btnGroup">
+					<view class="cancelBtn btn" @click="btnGroupClickHandle(false)">取消</view>
+					<view class="confirmBtn btn" @click="btnGroupClickHandle(true)">确定</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import {
+		_stopPropagation
+	} from "../../../utils/compatible.js";
+	import {
+		arrFilter
+	} from "../../../utils/arrFilter.js";
+	import {
+		arrayEquality
+	} from "./utils.js";
+
+	export default {
+		data() {
+			return {
+				openItems: [],
+				keyword: '',
+				depList:[],
+				selectables:[
+					{
+						name: '全部单位',
+						id: 0
+					}
+				],
+				ifclearSearch:false,
+				copiedDepList: [], //筛选后结果
+				//筛选条件
+				filter: {
+					keyword: '',
+					status: [{
+						name: '全部单位',
+						id: 0
+					}]
+				},
+			}
+		},
+		computed: {
+			...mapState({
+				checkPerson: state => state.creatingSituations.checkPerson,
+				checkRent: state => state.creatingSituations.checkRent,
+				condition: state => state.creatingSituations.condition,
+				needReload: state => state.creatingSituations.needReload,
+				editConfig: state => state.creatingSituations.editConfig
+			}),
+			selectedStr() {
+				const {
+					status
+				} = this.filter;
+				return (status.map(t => t.name)).join(',')
+			},
+		},
+		watch: {
+			// filter(val, oldVal) {
+				
+			// 	if (val.keyword.length == 0) {
+			// 		this.searchHandle();
+			// 	}
+			// }
+		},
+		created: function() {
+			// 编辑的时候不用获取数据
+			if (this.editConfig && arrayEquality(this.checkPerson, this.editConfig.checkPerson) && this.editConfig
+				.checkPerson) {
+				this.$store.commit({
+					type: 'creatingSituations/comChangeState',
+					key: 'checkPerson',
+					data: this.editConfig.checkPerson
+				});
+			} else if (this.needReload) { // 点击上一步不用获取数据
+				this.getData();
+			}
+		},
+		methods: {
+			/**
+			 * @param {string} val
+			 */
+
+			searchInputHandle(val) {
+				this.filter = {
+					...this.filter,
+					keyword: val
+				};
+			},
+			searchHandle() {
+
+				const {keyword,status} = this.filter;
+				
+				if(keyword.length == 0){
+					  let results = this.checkPerson.list.filter(item=>item.departmentName.indexOf(status[0].name) != -1 );
+					  this.copiedDepList = results;
+				}
+				
+				const filtedList = this.copiedDepList.filter(t => t.empName.indexOf(keyword) != -1);
+			
+				this.copiedDepList = filtedList;
+				
+				// if (checkedItem.id) { // 如果选中过,要去更新数据
+				// 	let obj = filtedList.find(({
+				// 		id
+				// 	}) => id === checkedItem.id);
+				// 	this.myCommit('checkedItem', obj ? obj : {
+				// 		id: null
+				// 	});
+				// }
+			},
+			/**
+			 * @param {boolean} flag true确定按钮点击,false取消按钮
+			 */
+			btnGroupClickHandle(flag) {
+				this.$refs.popup.close();
+				const {status} = this.filter;
+				
+				if(flag){
+					if(status[0].id == 0){
+						this.copiedDepList = this.checkPerson.list;
+					}else{
+						let results = this.checkPerson.list.filter(item=>item.departmentName.indexOf(status[0].name) != -1 );
+						this.copiedDepList = results;
+					}
+				}else{
+					//清空搜索
+					this.filter = {
+						...this.filter,
+						keyword: ''
+					}
+				}
+			},
+			selecterHandle() {
+				this.$refs.popup.open();
+			},
+			getClass(id) {
+				const ids = this.filter.status.map(item => item.id);
+				if (ids.indexOf(id) != -1) {
+					return "list on"
+				}
+				return "list"
+			},
+			/**
+			 * @param {string} searchKey
+			 */
+			getData() {
+				this.$store.dispatch({
+					type: 'creatingSituations/commActions',
+					key: 'getCheckPersonLists',
+					data: {
+						'filterList': this.condition.conditionIds,
+						'situationId':Number(this.checkPerson.situationId)
+					}
+				}).then((data) => {
+					console.log({data})
+					if (data) {
+						this.myCommit('list', data);
+						this.copiedDepList = data;
+						let nodedup_depList = data.map((item,index)=>item.departmentName);
+						let depList = Array.from(new Set(nodedup_depList));
+						let _depList = depList.map((item,index)=>({name:item,id:index+1}));
+					
+						this.depList = [...this.depList,..._depList];
+						this.selectables = [...this.selectables,..._depList];
+						
+						// const {checkedItem} = this.checkPerson;
+						// if(checkedItem.id) { // 如果选中过,要去更新数据
+						// 	let obj = data.find(({id})=>id === checkedItem.id);
+						// 	this.myCommit('checkPerson', obj?obj:{id:null});
+						// }
+					}
+				});
+			},
+			listClickHandle(item) {
+				this.filter = {
+					...this.filter,
+					status: [
+						item
+					]
+				};
+			},
+			openItemHandle: function(key) {
+				this.openItems = arrFilter(key, this.openItems);
+			},
+			checkedHandle: function(e, item) {
+				_stopPropagation(e);
+				let _checkedPersons = this.checkPerson.checkedItems;
+				console.log('this.checkPerson',this.checkPerson)
+				const index = this.checkPerson.checkedItems.findIndex(val => val.empId == item.empId);
+				if (index != -1) {
+					//取消选中
+					_checkedPersons.splice(index, 1);
+				} else {
+					//选中
+
+					_checkedPersons.push(item);
+				}
+				this.myCommit('checkedItems', _checkedPersons);
+			},
+			/**
+			 * 更新condition数据
+			 * @param {Object} key 要更新的属性
+			 * @param {Object} value 值
+			 */
+			myCommit: function(key, value) {
+				let data = {
+					...this.checkPerson
+				};
+				data[key] = value;
+				this.$store.commit({
+					type: 'creatingSituations/comChangeState',
+					key: 'checkPerson',
+					data
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	.person {
+		// padding: 15rpx;
+		.selectableList {
+			display: flex;
+			width: 100%;
+			flex-direction: column;
+			height: 50vh;
+			padding-top: 50rpx;
+			box-sizing: border-box;
+			border-radius: 25rpx 25rpx 0px 0px;
+			background-color: #FFFFFF;
+		
+			.listWrap {
+				height: calc(50vh - 75rpx);
+				overflow-y: scroll;
+		
+				.list {
+					height: 87.5rpx;
+					line-height: 87.5rpx;
+					text-align: center;
+					font-size: 30rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #8A8F99;
+		
+					&.on {
+						font-weight: 500;
+						color: #3377FF;
+					}
+				}
+			}
+		
+			.btnGroup {
+				display: flex;
+				width: 100%;
+				flex-direction: row;
+				justify-content: center;
+				align-items: center;
+		
+				.btn {
+					width: 50%;
+					height: 75rpx;
+					line-height: 75rpx;
+					text-align: center;
+					font-size: 22.5rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #3377FF;
+				}
+		
+				.cancelBtn {
+					border-top: 0.62rpx solid #DADEE6;
+				}
+		
+				.confirmBtn {
+					color: #FFFFFF;
+					background: #3377FF;
+				}
+			}
+		}
+		.searchBar {
+			width: 100%%;
+			margin: 0 auto;
+		
+			.filter {
+				display: flex;
+				flex-direction: row;
+				justify-content: space-between;
+				align-items: center;
+				margin-bottom: 15rpx;
+				padding: 0 25rpx;
+				background: #FFFFFF;
+		
+				.selecter {
+					display: flex;
+					width: 25%;
+					height: 70rpx;
+					flex-direction: row;
+					justify-content: space-between;
+					align-items: center;
+					padding-right: 25rpx;
+					border-right: 0.62rpx solid #DADEE6;
+		
+					&>text {
+						width: 112.5rpx;
+						font-size: 25rpx;
+						font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+						font-weight: 500;
+						color: #292C33;
+						text-overflow: ellipsis;
+						overflow: hidden;
+						white-space: nowrap;
+		
+					}
+		
+					&>image {
+						width: 11.25rpx;
+						height: 7.5rpx;
+					}
+				}
+		
+				.searchBar {
+					display: flex;
+					width: 75%;
+					flex-direction: row;
+					align-items: center;
+					height: 70rpx;
+					padding-left: 25rpx;
+		
+					.serachIcon {
+						width: 25rpx;
+						height: 25rpx;
+					}
+		
+					.searchVal {
+						width: 79%;
+						padding-left: 25rpx;
+						font-size: 25rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #292C33;
+					}
+		
+					.searchBtn {
+						padding-left: 25rpx;
+						font-size: 25rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #3377FF;
+						white-space: nowrap;
+						border-left: 1rpx solid #DADEE6;
+					}
+				}
+			}
+		}
+
+		.list {
+			.empty {
+				display: flex;
+				height: 500rpx;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+
+				&>image {
+					width: 175rpx;
+					height: 190rpx;
+					margin-bottom: 40rpx;
+				}
+
+				&>text {
+					font-size: 22.5rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #828899;
+				}
+			}
+
+			.item {
+				display: flex;
+				flex-direction: row;
+				justify-content: space-between;
+				align-items: center;
+				height: 87.5rpx;
+				padding: 0 25rpx;
+				background: #FFFFFF;
+
+				.itemInner {
+					&>text {
+						font-size: 22.5rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #292C33;
+						padding-right: 20rpx;
+					}
+				}
+
+				.icon {
+					// 图标样式,用view包裹img防止挤压变形
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					height: inherit;
+
+					image {
+						width: 25rpx;
+						height: 25rpx;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 151 - 0
pages/creatingSituations/components/preview.vue

@@ -0,0 +1,151 @@
+<template>
+	<view class="planPreview">
+		<view class="title">计划预览</view>
+		<div class="content">
+			<div class="theme">主题:督查自查</div>
+			<div class="rowTwo">
+				<div class="subBlock">
+					<span class="subBlocklabel">计划模块</span>
+					<div class="subBlockval">{{(typeList.checkedItems.map(v=>v.name)).join(',')}}</div>
+				</div>
+				<div class="subBlock">
+					<span class="subBlocklabel">负责职能科室</span>
+					<div class="subBlockval">{{responsibleDepartments}}</div>
+				</div>
+			</div>
+		</div>
+		<div class="endContent">
+			<span>任务名称</span>
+			<input class="inputArea" :value="name" @input="inputHandle" type="text" >
+		</div>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+
+	export default {
+		props: {},
+		data() {
+			return {
+                name:''
+			}
+		},
+		computed:{
+			 ...mapState({
+			 	typeList: state => state.creatingSituations.typeList,
+			 	zhinengDepartments:state => state.creatingSituations.zhinengDepartments,
+				situationPreview:state=>state.creatingSituations.situationPreview,
+			 }),
+			 responsibleDepartments:function(){
+				  const a = this.zhinengDepartments.checkedItems.reduce((prev,cur)=>prev+`${cur.name}(${cur.employees})`,'');
+				  return a;
+			 }
+		},
+		methods: {
+             inputHandle(e){
+				 this.name = e.detail.value;
+				 this.$store.commit({
+				 	type: 'creatingSituations/comChangeState', 
+				 	key: 'situationPreview', 
+				 	data:{...this.situationPreview,sitName:e.detail.value}
+				 });
+			 }
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	.planPreview {
+		.title {
+			height: 30rpx;
+			font-size: 30rpx;
+			font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+			font-weight: 400;
+			color: #292C33;
+			line-height: 30rpx;
+			margin-bottom: 35rpx;
+		}
+
+		.content {
+			padding: 31.25rpx 25rpx;
+			background-color: #fff;
+
+			.theme {
+				font-size: 30rpx;
+				font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+				font-weight: 400;
+				color: #292C33;
+				margin-bottom: 31.25rpx;
+			}
+
+			.rowTwo {
+				display: flex;
+				flex-direction: row;
+				justify-content: space-between;
+				align-items: center;
+
+				.subBlock {
+					width: 45%;
+
+					.subBlocklabel {
+						font-size: 17.5rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #666F80;
+
+					}
+
+					.subBlockval {
+						font-size: 25rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #292C33;
+					}
+
+					&:first-child {
+						position: relative;
+
+						&::after {
+							display: block;
+							position: absolute;
+							top: 50%;
+							margin-top: -25rpx;
+							right: 0;
+							content: '';
+							width: 1rpx;
+							height: 50rpx;
+							background-color: rgba(218, 222, 230, 1);
+						}
+					}
+				}
+			}
+
+		}
+
+		.endContent {
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+			margin-top: 15rpx;
+			padding: 31.25rpx 25rpx;
+			background-color: #fff;
+			span {
+				font-size: 25rpx;
+				font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+				font-weight: 400;
+				color: #525866;
+				&:last-child {
+					display: inline-block;
+					color: rgba(41, 44, 51, 1);
+					padding-left: 75rpx;
+				}
+			}
+			.inputArea {
+				padding-left: 31.25rpx;
+			}
+		}
+	}
+</style>

+ 485 - 320
pages/creatingSituations/components/situationPreview.vue

@@ -1,339 +1,504 @@
-<template>
+<template>
 	<view class="situation-preview">
-		<view class="title">情境预览</view>
-		<view class="box1">
-			<view class="row1">
-				<view class="top">
-					<text>主题:{{theme.title}}</text>
-					<view @click="goMapList">
-						<text>查看查核地图</text>
-						<image src="../../../static/icon-blueMore.png"></image>
-					</view>
-				</view>
-				<view class="list">
-					<text v-for="(item, index) in list" :key="index">{{item.name}}</text>
+		<tm-modal v-if="modalVisible" @click="modalClickHandle">
+			<view class="conditionReview">
+				<view class="conditionReviewContent">
+					<view class="list" v-for="item in resultLists">{{`${item.name}: ${item.value}`}}</view>
 				</view>
 			</view>
-			<view class="row2">
-				<view class="item">
-					<text>查核组</text>
-					<text>{{checkRent.checkedItem.name}}</text>
+		</tm-modal>
+		<view class="title">情境预览</view>	
+		<view class="box1">
+			<view class="row1">
+				<view class="top">
+					<text>主题:{{theme.title}}</text>
+					<view @click="goMapList">
+						<text>查看查核地图</text>
+						<image src="../../../static/icon-blueMore.png"></image>
+					</view>
+				</view>
+				<view class="conditionDetailBtn" @click="showCondition" v-if="this.theme.id ==0">
+					条件详情
+					<image src="../../../static/icon-blueMore.png"></image>
 				</view>
-				<view class="item">
-					<text>组长</text>
-					<text>{{checkRent.checkedItem.groupManagerName}}</text>
-				</view>
-			</view>
-		</view>
-		<view class="box2">
-			<view class="situationType" @click="selectSituationType">
-				<text>情境类型</text>
-				<text class="typeValue">{{situationTypeName}}</text>
-				<image class="arrowRight" src="../../../static/incon-more.png" mode=""></image>
-			</view>
-			<view class="input-wrap">
-				<view>情境名称</view>
-				<input maxlength="16" 
-					v-model="situationPreview.sitName" 
-					placeholder="限2~16个中文、英文或数字" />
-			</view>
-			<view class="input-wrap">
-				<view>情境描述</view>
-				<textarea  maxlength="300"
-					rows=""
-					v-model="situationPreview.description" 
-					placeholder="限300字" />
-			</view>
-		</view>
-		<view class="box2">
-			<view>
-				<text>计划开始前</text>
-				<input v-model="situationPreview.preDay" 
-					placeholder="请输入" 
-					type="number" />
-				<text>天的</text>
-				<input v-model="situationPreview.preH" 
-					placeholder="请输入" 
-					type="number" />
-				<text>时提醒</text>
-			</view>
-			<view>
-				<text>启动</text>
-				<input v-model="situationPreview.startDay" 
-					placeholder="请输入" 
-					type="number" />
-				<text>天前提醒</text>
-			</view>
-			<view class="setIfShowNotApplicable" @click="setIfShowNotApplicable">
-				<text>是否需要不适用场景</text>
-				<image class="icon"
-					:src="`/static/${situationPreview.showNotApplicable == 0 ? 'check-checkbox' : 'check-no'}.png`">
-				</image>
-			</view>
-			<view class="setIfShowNotApplicable" @click="setIfCountNum">
-				<text>是否统计小计</text>
-				<image class="icon"
-					:src="`/static/${situationPreview.showCountNum == 1 ? 'check-checkbox' : 'check-no'}.png`">
-				</image>
-			</view>
-			<view v-if="ifShowTemplateSelector" class="situationType" @click="selectTemplateHandle">
-				<text>分页模板</text>
-				<text class="typeValue">{{situationPreview.templateName}}</text>
-				<image class="arrowRight" src="../../../static/incon-more.png" ></image>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import { mapState,mapMutations } from "vuex";
-	export default {
-		data(){
+				<view class="list"  v-if="this.theme.id !=0">
+					<text v-for="(item, index) in list" :key="index">{{item.name}}</text>
+				</view>
+			</view>
+			<view class="row2">
+				<view class="item">
+					<text>查核组</text>
+					<text>{{checkRent.checkedItem.name}}</text>
+				</view>
+				<view class="item">
+					<text>组长</text>
+					<text>{{checkRent.checkedItem.groupManagerName}}</text>
+				</view>
+			</view>
+		</view>
+		<view class="box2">
+			<view class="situationType" @click="selectSituationType">
+				<text>情境类型</text>
+				<text class="typeValue">{{situationTypeName}}</text>
+				<image class="arrowRight" src="../../../static/incon-more.png" mode=""></image>
+			</view>
+			<view class="input-wrap">
+				<view>情境名称</view>
+				<input maxlength="16" v-model="situationPreview.sitName" placeholder="限2~16个中文、英文或数字" />
+			</view>
+			<view class="input-wrap">
+				<view>情境描述</view>
+				<textarea maxlength="300" rows="" v-model="situationPreview.description" placeholder="限300字" />
+			</view>
+		</view>
+		<view class="box2">
+			<view>
+				<text>计划开始前</text>
+				<input v-model="situationPreview.preDay" placeholder="请输入" type="number" />
+				<text>天的</text>
+				<input v-model="situationPreview.preH" placeholder="请输入" type="number" />
+				<text>时提醒</text>
+			</view>
+			<view>
+				<text>启动</text>
+				<input v-model="situationPreview.startDay" placeholder="请输入" type="number" />
+				<text>天前提醒</text>
+			</view>
+			<view class="setIfShowNotApplicable" @click="setIfShowNotApplicable">
+				<text>是否需要不适用场景</text>
+				<image class="icon"
+					:src="`/static/${situationPreview.showNotApplicable == 0 ? 'check-checkbox' : 'check-no'}.png`">
+				</image>
+			</view>
+			<view class="setIfShowNotApplicable" @click="setIfCountNum">
+				<text>是否统计小计</text>
+				<image class="icon"
+					:src="`/static/${situationPreview.showCountNum == 1 ? 'check-checkbox' : 'check-no'}.png`">
+				</image>
+			</view>
+			<view v-if="ifShowTemplateSelector" class="situationType" @click="selectTemplateHandle">
+				<text>分页模板</text>
+				<text class="typeValue">{{situationPreview.templateName}}</text>
+				<image class="arrowRight" src="../../../static/incon-more.png"></image>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from "vuex";
+	export default {
+		data() {
 			return {
-				 ifShowTemplateSelector:false,//是否展示选择模版的选项
-			}
-		},
-		computed: {
-			...mapState({
-				theme: state => state.creatingSituations.theme,
+				
+				modalVisible:false,
+				ifShowTemplateSelector: false, //是否展示选择模版的选项
+				childContainer:[],
+				resultLists:[],//创建情境选择的条件
+			}
+		},
+		computed: {
+			...mapState({
+				theme: state => state.creatingSituations.theme,
 				condition: state => state.creatingSituations.condition,
-				checkRent: state => state.creatingSituations.checkRent,
-				situationPreview: state => state.creatingSituations.situationPreview,
-				situationTypeList:state => state.creatingSituations.situationTypeList
-			}),
-			situationTypeName(){
-				if(this.situationTypeList.length>0&&this.situationPreview){
-					  const temp  = this.situationTypeList.filter(item=>item.situationType == this.situationPreview.situationType);
-					  return temp.length>0?temp[0].situationTypeName:null;
-				}
-				return null;
-			},
-			list: function() {
-				const { conditionIds, options } = this.condition;
+				conditionCard: state => state.creatingSituations.conditionCard,
+				checkRent: state => state.creatingSituations.checkRent,
+				situationPreview: state => state.creatingSituations.situationPreview,
+				situationTypeList: state => state.creatingSituations.situationTypeList
+			}),
+			situationTypeName() {
+				if (this.situationTypeList.length > 0 && this.situationPreview) {
+					const temp = this.situationTypeList.filter(item => item.situationType == this.situationPreview
+						.situationType);
+					return temp.length > 0 ? temp[0].situationTypeName : null;
+				}
+				return null;
+			},
+			list: function() {
+				const {
+					conditionIds,
+					options
+				} = this.condition;
 				let list = [];
-				this.loopOptions(options, conditionIds, list);
-				return list;
-			}
-		},
-		watch:{
-			situationPreview(newVal){
-				if(newVal.situationType == 2){
-					//情境类型为分页时
-					this.ifShowTemplateSelector = true;
-					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:[]});
+				
+				if(this.theme.id == 0){
+					//个案情境
+			     let arr = this.condition.childContainer.reduce((cur,next)=>{
+					     return cur.concat(next.list)
+				 },[]);
+                 
 				}
-			}
-		},
-		methods: {
+				
+				this.loopOptions(options, conditionIds, list);
+				return list;
+			}
+		},
+		watch: {
+			situationPreview(newVal) {
+				if (newVal.situationType == 2) {
+					//情境类型为分页时
+					this.ifShowTemplateSelector = true;
+					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: []
+					});
+				}
+			}
+		},
+		methods: {
 			...mapMutations(['comChangeState']),
-			selectSituationType(){
-				// this.$refs.popup.open();
-				this.$store.commit('creatingSituations/comChangeState',{key:'popupType',data:1});
-				this.$store.commit('creatingSituations/comChangeState',{key:'showPopupSelectorList',data:true});
-			},
-			selectTemplateHandle(){
-				this.$store.commit('creatingSituations/comChangeState',{key:'popupType',data:2});
-				this.$store.commit('creatingSituations/comChangeState',{key:'showPopupSelectorList',data:true});
-			},
-			loopOptions: function(arr, conditionIds, list) {
-				arr.map((item)=>{
-					if(conditionIds.includes(item.id)) {
-						list.push(item);
-					}
-					if(item.children.length > 0) {
-						this.loopOptions(item.children, conditionIds, list);
-					}
-				});
-			},
-			goMapList: function() {
-				uni.navigateTo({
-					url: '/pages/checkMapList/checkMapList'
-				});
-			},
-			setIfShowNotApplicable(){
-				const showNotApplicable = this.situationPreview.showNotApplicable;
-				this.$store.commit('creatingSituations/comChangeState',{key:'situationPreview',data:{...this.situationPreview,showNotApplicable:showNotApplicable?0:1}});
+			modalClickHandle(){
+				this.modalVisible = false;
 			},
-			setIfCountNum(){
-				const showCountNum = this.situationPreview.showCountNum;
-				this.$store.commit('creatingSituations/comChangeState',{key:'situationPreview',data:{...this.situationPreview,showCountNum:showCountNum?0:1}});
-			},
-			dispatch: function(key, data) {
-				return this.$store.dispatch({type: 'creatingSituations/commActions', key, data});
-			},
-		}
-	}
-</script>
-
-<style lang="less">
-	.situation-preview {
-		overflow: hidden;
-		font-size: 22.5rpx;
-		line-height: 33.75rpx;
+			showCondition(){
+				
+				const list = this.condition.childContainer.reduce((cur,next)=>{
+					   return cur.concat(next.list);
+				},[]); 
+							
+				const rebuildList = list.map(a=>{
+					   let tempA = {name:a.name,id:a.id,value:''};
+					   for (let i = 0; i < this.conditionCard.checkResults.length; i++) {
+					   	     if(this.conditionCard.checkResults[i].id == a.id){
+								 //匹配到结果
+								 tempA.value = `${tempA.value?tempA.value+',':tempA.value}${this.conditionCard.checkResults[i].value}`
+							 }
+					   }
+					   return tempA;
+				})
+							
+				this.modalVisible = true;
+				this.resultLists = rebuildList;
+				//this.resultLists = this.conditionCard.checkResults;
+			},
+			selectSituationType() {
+				// this.$refs.popup.open();
+				this.$store.commit('creatingSituations/comChangeState', {
+					key: 'popupType',
+					data: 1
+				});
+				this.$store.commit('creatingSituations/comChangeState', {
+					key: 'showPopupSelectorList',
+					data: true
+				});
+			},
+			selectTemplateHandle() {
+				this.$store.commit('creatingSituations/comChangeState', {
+					key: 'popupType',
+					data: 2
+				});
+				this.$store.commit('creatingSituations/comChangeState', {
+					key: 'showPopupSelectorList',
+					data: true
+				});
+			},
+			loopOptions: function(arr, conditionIds, list) {
+				arr.map((item) => {
+					if (conditionIds.includes(item.id)) {
+						list.push(item);
+					}
+
+					if (item.child&&item.child.length > 0) {
+						this.loopOptions(item.child, conditionIds, list);
+
+					}
+
+					if (item.children&&item.children.length > 0) {
+						this.loopOptions(item.children, conditionIds, list);
+					}
+				});
+			},
+			goMapList: function() {
+				uni.navigateTo({
+					url: '/pages/checkMapList/checkMapList'
+				});
+			},
+			setIfShowNotApplicable() {
+				const showNotApplicable = this.situationPreview.showNotApplicable;
+				this.$store.commit('creatingSituations/comChangeState', {
+					key: 'situationPreview',
+					data: {
+						...this.situationPreview,
+						showNotApplicable: showNotApplicable ? 0 : 1
+					}
+				});
+			},
+			setIfCountNum() {
+				const showCountNum = this.situationPreview.showCountNum;
+				this.$store.commit('creatingSituations/comChangeState', {
+					key: 'situationPreview',
+					data: {
+						...this.situationPreview,
+						showCountNum: showCountNum ? 0 : 1
+					}
+				});
+			},
+			dispatch: function(key, data) {
+				return this.$store.dispatch({
+					type: 'creatingSituations/commActions',
+					key,
+					data
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+	.situation-preview {
+		overflow: hidden;
+		font-size: 22.5rpx;
+		line-height: 33.75rpx;
 		color: #292C33;
-		.box1,
-		.box2 {
-			margin-bottom: 15rpx;
-			padding: 25rpx;
-			width: 100%;
+		
+		.conditionReview {
+			width: 80%;
+			max-height: 70vh;
+			margin:0 auto;
+			margin-top: 20vh;
+			padding:30rpx;
+			border-radius: 18.75rpx;
 			background-color: #fff;
-		}
-		.box1 {
-			display: flex;
-			flex-direction: column;
-			.row1 {
-				display: flex;
-				flex-direction: column;
-				margin-bottom: 35rpx;
-				.top {
-					display: flex;
-					flex-direction: row;
-					justify-content: space-between;
-					margin-bottom: 6.25rpx;
-					>text {
-						font-size: 30rpx;
-						line-height: 45rpx;
-					}
-					>view {
-						display: flex;
-						flex-direction: row;
-						align-items: center;
-						font-size: 20rpx;
-						line-height: 30rpx;
-						color: #3377FF;
-						image {
-							margin-left: 10rpx;
-							width: 11.87rpx;
-							height: 20rpx;
-						}
-					}
-				}
+			overflow-y: hidden;
+			.conditionReviewContent {
+				max-height: 70vh;
+				overflow-y: scroll;
+				padding-bottom: 25rpx;
 				.list {
-					overflow: hidden;
-					display: flex;
-					flex-direction: row;
-					flex-wrap: wrap;
-					align-items: center;
-					>text {
-						margin-top: 6.25rpx;
-						margin-right: 15rpx;
-						border-radius: 5rpx;
-						padding: 2.5rpx 20.62rpx;
-						font-size: 17.5rpx;
-						line-height: 26.25rpx;
-						color: #7A8499;
-						background-color: #EBEFF7;
-					}
-				}
-			}
-			.row2 {
-				display: flex;
-				flex-direction: row;
-				justify-content: center;
-				align-items: center;
-				.item {
-					display: flex;
-					flex-direction: column;
-					width: 47.5%;
-					text {
-						overflow: hidden;
-						white-space: nowrap;
-						text-overflow: ellipsis;
-						font-size: 25rpx;
-						line-height: 37.5rpx;
-					}
-					text:first-child {
-						margin-bottom: 4.37rpx;
-						font-size: 17.5rpx;
-						line-height: 26.25rpx;
-						color: #666F80;
-					}
-					&:first-child {
-						margin-right: 5%;
-						border-right: 1px solid #DADEE6;
-					}
-				}
-			}
-		}
-		.box2 {
-			padding: 0;
-			padding-left: 25rpx;
-			>view {
-				display: flex;
-				flex-direction: row;
-				align-items: center;
-				border-bottom: 1px solid #DADEE6;
-				height: 87.5rpx;
-				color: #525866;
-				>text {
-					white-space: nowrap;
-					color: #292C33;
-				}
-				
-				>input {
-					padding: 0 9.37rpx;
-					width: 80rpx;
-					height: 33.75rpx;
+					height:50rpx;
+					line-height: 50rpx;
 					font-size: 22.5rpx;
-					line-height: 33.75rpx;
-					text-align: center;
-				}
-				&:last-child {
-					border-bottom: 0;
+					border-bottom: 0.63rpx solid #DADEE6;
 				}
-				&.input-wrap {
-					display: flex;
-					flex-direction: row;
-					&:last-child {
-						align-items: flex-start;
-						padding: 20rpx 0;
-						height: 200rpx;
-					}
-					view {
-						margin-right: 40rpx;
-						white-space: nowrap;
-					}
-					input, textarea {
-						padding: 0;
-						padding-right: 25rpx;
-						width: 100%;
-						font-size: 22.5rpx;
-						line-height: 33.75rpx;
-						text-align: left;
+			}
+		}
+
+		.box1,
+		.box2 {
+			margin-bottom: 15rpx;
+			padding: 25rpx;
+			width: 100%;
+			background-color: #fff;
+		}
+
+		.box1 {
+			display: flex;
+			flex-direction: column;
+
+			.row1 {
+				display: flex;
+				flex-direction: column;
+				margin-bottom: 35rpx;
+
+				.top {
+					display: flex;
+					flex-direction: row;
+					justify-content: space-between;
+					margin-bottom: 6.25rpx;
+
+					>text {
+						font-size: 30rpx;
+						line-height: 45rpx;
+					}
+
+					>view {
+						display: flex;
+						flex-direction: row;
+						align-items: center;
+						font-size: 20rpx;
+						line-height: 30rpx;
+						color: #3377FF;
+
+						image {
+							position: relative;
+							top:1.25rpx;
+							margin-left: 10rpx;
+							width: 11.87rpx;
+							height: 20rpx;
+						}
+					}
+				}
+                .conditionDetailBtn {
+					text-align: right;
+					font-size: 20rpx;
+					line-height: 30rpx;
+					color: #3377FF;
+					image {
+						margin-left: 10rpx;
+						width: 11.87rpx;
+						height: 20rpx;
 					}
-					textarea {
-						height: 100%;
+				}
+				.list {
+					overflow: hidden;
+					display: flex;
+					flex-direction: row;
+					flex-wrap: nowrap;
+					align-items: center;
+
+					>text {
+						margin-top: 6.25rpx;
+						margin-right: 15rpx;
+						border-radius: 5rpx;
+						flex-wrap: wrap;
+						padding: 2.5rpx 20.62rpx;
+						font-size: 17.5rpx;
+						line-height: 26.25rpx;
+						color: #7A8499;
+						background-color: #EBEFF7;
+						// overflow: hidden;
+						// text-overflow: ellipsis;
+						white-space: nowrap;
 					}
+					
+					// &::after {
+					// 	position: relative;
+					// 	top:1.25rpx;
+					// 	content: '';
+					// 	display: inline-block;
+					// 	width: 18rpx;
+					// 	height: 25rpx;
+					// 	opacity: 0.8;
+					// 	background: url('@/static/images/icon-more.png');
+					// 	background-size:100% 100%;
+					// }
 				}
-			}
-			.setIfShowNotApplicable {
-				display: flex;
-				flex-direction: row;
-				justify-content: space-between;
-				.icon {
-					width: 30rpx;
-					height: 30rpx;
-					margin-right: 25rpx;
-				}
-			}
-			.situationType {
-				position: relative;
-				.typeValue {
-					display: inline-block;
-					margin-left: 40rpx;
-				}
-				.arrowRight {
-					position: absolute;
-					right:20rpx;
-					width: 15rpx;
-					height: 25rpx;
-				}
-			}
-		}
-	}
+				
+			}
+
+			.row2 {
+				display: flex;
+				flex-direction: row;
+				justify-content: center;
+				align-items: center;
+
+				.item {
+					display: flex;
+					flex-direction: column;
+					width: 47.5%;
+
+					text {
+						overflow: hidden;
+						white-space: nowrap;
+						text-overflow: ellipsis;
+						font-size: 25rpx;
+						line-height: 37.5rpx;
+					}
+
+					text:first-child {
+						margin-bottom: 4.37rpx;
+						font-size: 17.5rpx;
+						line-height: 26.25rpx;
+						color: #666F80;
+					}
+
+					&:first-child {
+						margin-right: 5%;
+						border-right: 1px solid #DADEE6;
+					}
+				}
+			}
+		}
+
+		.box2 {
+			padding: 0;
+			padding-left: 25rpx;
+
+			>view {
+				display: flex;
+				flex-direction: row;
+				align-items: center;
+				border-bottom: 1px solid #DADEE6;
+				height: 87.5rpx;
+				color: #525866;
+
+				>text {
+					white-space: nowrap;
+					color: #292C33;
+				}
+
+				>input {
+					padding: 0 9.37rpx;
+					width: 80rpx;
+					height: 33.75rpx;
+					font-size: 22.5rpx;
+					line-height: 33.75rpx;
+					text-align: center;
+				}
+
+				&:last-child {
+					border-bottom: 0;
+				}
+
+				&.input-wrap {
+					display: flex;
+					flex-direction: row;
+
+					&:last-child {
+						align-items: flex-start;
+						padding: 20rpx 0;
+						height: 200rpx;
+					}
+
+					view {
+						margin-right: 40rpx;
+						white-space: nowrap;
+					}
+
+					input,
+					textarea {
+						padding: 0;
+						padding-right: 25rpx;
+						width: 100%;
+						font-size: 22.5rpx;
+						line-height: 33.75rpx;
+						text-align: left;
+					}
+
+					textarea {
+						height: 100%;
+					}
+				}
+			}
+
+			.setIfShowNotApplicable {
+				display: flex;
+				flex-direction: row;
+				justify-content: space-between;
+
+				.icon {
+					width: 30rpx;
+					height: 30rpx;
+					margin-right: 25rpx;
+				}
+			}
+
+			.situationType {
+				position: relative;
+
+				.typeValue {
+					display: inline-block;
+					margin-left: 40rpx;
+				}
+
+				.arrowRight {
+					position: absolute;
+					right: 20rpx;
+					width: 15rpx;
+					height: 25rpx;
+				}
+			}
+		}
+	}
 </style>

+ 311 - 0
pages/creatingSituations/components/taskPreview.vue

@@ -0,0 +1,311 @@
+<template>
+	<view class="taskPreview">
+		<view class="title">任务预览</view>
+		<view class="box1">
+			<view class="row1">
+				<view class="top">
+					<text>主题:{{title}}</text>
+					<view @click="goMapList">
+						<text>查看查核地图</text>
+						<image src="../../../static/icon-blueMore.png"></image>
+					</view>
+				</view>
+				<view class="list">
+					<text v-for="(item, index) in list" :key="index">{{item.name}}</text>
+				</view>
+			</view>
+			<view class="row2">
+				<view class="item">
+					<text>职能科室</text>
+					<text>{{situationsCenter.currentSelectedSituation.checkGroupName}}</text>
+				</view>
+				<view class="item">
+					<text>查核人</text>
+					<text>{{(checkPerson.checkedItems.map(item=>item.empName)).join(',')}}</text>
+				</view>
+			</view>
+		</view>
+
+		<view class="box2">
+			<view>
+				<text>计划频率</text>
+				<text style="padding-left: 20px;">{{checkPlan.checkedItem.label}}</text>
+			</view>
+			<view>
+				<text>起止时间</text>
+				<text style="padding-left: 20px;">{{`${checkPlan.dateObj.start} ~ ${checkPlan.dateObj.end}`}}</text>
+			</view>
+			<view>
+				<text>查核频次</text>
+				<text style="padding-left: 20px;">{{checkPlan.checkList.length}}</text>
+			</view>
+			<view class="situationType" @click="selectSituationType">
+				<text>情境类型</text>
+				<text class="typeValue">{{situationTypeName}}</text>
+				<image class="arrowRight" src="../../../static/incon-more.png" mode=""></image>
+			</view>
+	        
+		</view>
+	</view>
+</template>
+
+<script>
+	import { mapState,mapMutations } from "vuex";
+	export default {
+		data(){
+			return {
+				 ifShowTemplateSelector:false,//是否展示选择模版的选项
+			}
+		},
+		computed: {
+			...mapState({
+				theme: state => state.creatingSituations.theme,
+				checkPlan: state => state.creatingSituations.checkPlan,
+				condition: state => state.creatingSituations.condition,
+				checkRent: state => state.creatingSituations.checkRent,
+				situationPreview: state => state.creatingSituations.situationPreview,
+				situationsCenter: state => state.situationsCenter,
+				checkPerson: state => state.creatingSituations.checkPerson,
+				situationTypeList:state => state.creatingSituations.situationTypeList
+			}),
+			situationTypeName(){
+				if(this.situationTypeList.length>0&&this.situationPreview){
+					  const temp  = this.situationTypeList.filter(item=>item.situationType == this.situationPreview.situationType);
+					  return temp.length>0?temp[0].situationTypeName:null;
+				}
+				return null;
+			},
+			list: function() {
+				const { conditionIds, options } = this.condition;
+				let list = [];
+				this.loopOptions(options, conditionIds, list);
+				return list;
+			},
+			title(){
+				if(this.theme.id == 0)return '个案追踪';
+				if(this.theme.id == 1)return '普通';
+				if(this.theme.id == 2)return '自查督查';
+			}
+		},
+		watch:{
+			situationPreview(newVal){
+				if(newVal.situationType == 2){
+					//情境类型为分页时
+					this.ifShowTemplateSelector = true;
+					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:[]});
+				}
+			}
+		},
+		methods: {
+			...mapMutations(['comChangeState']),
+			selectSituationType(){
+				// this.$refs.popup.open();
+				this.$store.commit('creatingSituations/comChangeState',{key:'popupType',data:1});
+				this.$store.commit('creatingSituations/comChangeState',{key:'showPopupSelectorList',data:true});
+			},
+			selectTemplateHandle(){
+				this.$store.commit('creatingSituations/comChangeState',{key:'popupType',data:2});
+				this.$store.commit('creatingSituations/comChangeState',{key:'showPopupSelectorList',data:true});
+			},
+			loopOptions: function(arr, conditionIds, list) {
+				arr.map((item)=>{
+					if(conditionIds.includes(item.id)) {
+						list.push(item);
+					}
+					if(item.children.length > 0) {
+						this.loopOptions(item.children, conditionIds, list);
+					}
+				});
+			},
+			goMapList: function() {
+				uni.navigateTo({
+					url: '/pages/checkMapList/checkMapList'
+				});
+			},
+			setIfShowNotApplicable(){
+				const showNotApplicable = this.situationPreview.showNotApplicable;
+				this.$store.commit('creatingSituations/comChangeState',{key:'situationPreview',data:{...this.situationPreview,showNotApplicable:showNotApplicable?0:1}});
+			},
+			setIfCountNum(){
+				const showCountNum = this.situationPreview.showCountNum;
+				this.$store.commit('creatingSituations/comChangeState',{key:'situationPreview',data:{...this.situationPreview,showCountNum:showCountNum?0:1}});
+			},
+			dispatch: function(key, data) {
+				return this.$store.dispatch({type: 'creatingSituations/commActions', key, data});
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+	.taskPreview {
+		overflow: hidden;
+		font-size: 22.5rpx;
+		line-height: 33.75rpx;
+		color: #292C33;
+		.box1,
+		.box2 {
+			margin-bottom: 15rpx;
+			padding: 25rpx;
+			width: 100%;
+			background-color: #fff;
+		}
+		.box1 {
+			display: flex;
+			flex-direction: column;
+			.row1 {
+				display: flex;
+				flex-direction: column;
+				margin-bottom: 35rpx;
+				.top {
+					display: flex;
+					flex-direction: row;
+					justify-content: space-between;
+					margin-bottom: 6.25rpx;
+					>text {
+						font-size: 30rpx;
+						line-height: 45rpx;
+					}
+					>view {
+						display: flex;
+						flex-direction: row;
+						align-items: center;
+						font-size: 20rpx;
+						line-height: 30rpx;
+						color: #3377FF;
+						image {
+							margin-left: 10rpx;
+							width: 11.87rpx;
+							height: 20rpx;
+						}
+					}
+				}
+				.list {
+					overflow: hidden;
+					display: flex;
+					flex-direction: row;
+					flex-wrap: wrap;
+					align-items: center;
+					>text {
+						margin-top: 6.25rpx;
+						margin-right: 15rpx;
+						border-radius: 5rpx;
+						padding: 2.5rpx 20.62rpx;
+						font-size: 17.5rpx;
+						line-height: 26.25rpx;
+						color: #7A8499;
+						background-color: #EBEFF7;
+					}
+				}
+			}
+			.row2 {
+				display: flex;
+				flex-direction: row;
+				justify-content: center;
+				align-items: center;
+				.item {
+					display: flex;
+					flex-direction: column;
+					width: 47.5%;
+					text {
+						overflow: hidden;
+						white-space: nowrap;
+						text-overflow: ellipsis;
+						font-size: 25rpx;
+						line-height: 37.5rpx;
+					}
+					text:first-child {
+						margin-bottom: 4.37rpx;
+						font-size: 17.5rpx;
+						line-height: 26.25rpx;
+						color: #666F80;
+					}
+					&:first-child {
+						margin-right: 5%;
+						border-right: 1px solid #DADEE6;
+					}
+				}
+			}
+		}
+		.box2 {
+			padding: 0;
+			padding-left: 25rpx;
+			>view {
+				display: flex;
+				flex-direction: row;
+				align-items: center;
+				border-bottom: 1px solid #DADEE6;
+				height: 87.5rpx;
+				color: #525866;
+				>text {
+					white-space: nowrap;
+					color: #292C33;
+				}
+				
+				>input {
+					padding: 0 9.37rpx;
+					width: 80rpx;
+					height: 33.75rpx;
+					font-size: 22.5rpx;
+					line-height: 33.75rpx;
+					text-align: center;
+				}
+				&:last-child {
+					border-bottom: 0;
+				}
+				&.input-wrap {
+					display: flex;
+					flex-direction: row;
+					&:last-child {
+						align-items: flex-start;
+						padding: 20rpx 0;
+						height: 200rpx;
+					}
+					view {
+						margin-right: 40rpx;
+						white-space: nowrap;
+					}
+					input, textarea {
+						padding: 0;
+						padding-right: 25rpx;
+						width: 100%;
+						font-size: 22.5rpx;
+						line-height: 33.75rpx;
+						text-align: left;
+					}
+					textarea {
+						height: 100%;
+					}
+				}
+			}
+			.setIfShowNotApplicable {
+				display: flex;
+				flex-direction: row;
+				justify-content: space-between;
+				.icon {
+					width: 30rpx;
+					height: 30rpx;
+					margin-right: 25rpx;
+				}
+			}
+			.situationType {
+				position: relative;
+				.typeValue {
+					display: inline-block;
+					margin-left: 40rpx;
+				}
+				.arrowRight {
+					position: absolute;
+					right:20rpx;
+					width: 15rpx;
+					height: 25rpx;
+				}
+			}
+		}
+	}
+</style>

+ 104 - 42
pages/creatingSituations/components/theme.vue

@@ -4,16 +4,23 @@
 		<view class="content">
 			<view class="item" 
 				v-for="(item, index) in themeList" 
-				@click="checkedHandle(item)"
+				@click="checkedHandle(item,index)"
 				:key="index">
-				<view class="left">
-					<image :src="`../../static/theme${item.id}.png`"></image>
-				</view>
-				<view class="right">
-					<text>{{item.title}}</text>
-					<text>{{item.des}}</text>
-				</view>
-				<image v-if="theme.id === item.id" src="../../../static/theme.png"></image>
+				<div class="up">
+					 <view class="left">
+					 	<image :src="`../../static/theme${item.id}.png`"></image>
+					 </view>
+					 <view class="right">
+					 	<text>{{item.title}}</text>
+					 	<text>{{item.des}}</text>
+					 </view>
+				</div>
+				<div class="down" v-if="index == 1">
+					  <div class="leftBtn" @click="checkedHandle(item,index,'NORMAL')">普通</div>
+					  <div class="rightBtn" @click="checkedHandle(item,index,'MULTI')">督查+自查</div>
+				</div>
+				
+				<image class="checkmark" v-if="theme.id === item.id" src="../../../static/theme.png"></image>
 			</view>
 		</view>
 	</view>
@@ -35,10 +42,27 @@
 			})
 		},
 		methods: {
-			checkedHandle: function(item) {
-				this.myCommit('theme', item);
-				this.myCommit('needReload', true);
-				this.myCommit('stepActive', 1);
+			/**
+			 * @param {Object} item  操作数据
+			 * @param {number} index  操作下标
+			 * @param {string} type  操作类型
+			 */
+			checkedHandle: function(item,index,type) {
+				
+				if(index==0||(index == 1&&type == 'NORMAL')){
+					//个案/普通系统追踪
+					 this.myCommit('theme',{...item,type:'NORMAL'});
+					 this.myCommit('needReload', true);
+					 this.myCommit('stepActive', 1);
+				}
+				if(index == 1 && type == 'MULTI'){
+					//督查+自查
+					this.myCommit('theme',{...item,type:type});
+					this.myCommit('needReload', true);
+					this.myCommit('stepActive', 1);
+					
+				}
+							
 			},
 			myCommit: function(key, data) {
 				this.$store.commit({type: 'creatingSituations/comChangeState',key,data});
@@ -58,46 +82,84 @@
 			align-items: center;
 			.item {
 				position: relative;
-				display: flex;
-				flex-direction: row;
-				margin: 62.5rpx 0;
+				width:80%;
+				margin: 0 auto;
 				border-radius: 15rpx;
-				padding: 37.5rpx 50rpx;
-				width: 625rpx;
-				height: 187.5rpx;
 				background: linear-gradient(270deg, #6697FE 0%, #4980F2 100%);
 				box-shadow: 0 12.5rpx 12.5rpx 0 rgba(73, 128, 242, 0.2);
-				>image {
-					position: absolute;
-					top: 10rpx;
-					right: 10rpx;
-					width: 46.87rpx;
-					height: 46.87rpx;
+				
+				
+				.checkmark {
+						position: absolute;
+						top: 10rpx;
+						right: 10rpx;
+						width: 46.87rpx;
+						height: 46.87rpx;
 				}
-				.left {
-					margin-right: 25rpx;
-					image {
-						width: 112.5rpx;
-						height: 112.5rpx;
+				
+				
+				.up {
+					display: flex;
+					flex-direction: row;
+					padding: 37.5rpx 50rpx;
+					
+					// >image {
+					// 	position: absolute;
+					// 	top: 10rpx;
+					// 	right: 10rpx;
+					// 	width: 46.87rpx;
+					// 	height: 46.87rpx;
+					// }
+									
+					.left {
+						margin-right: 25rpx;
+						image {
+							width: 112.5rpx;
+							height: 112.5rpx;
+						}
+					}
+					.right {
+						display: flex;
+						flex-direction: column;
+						text {
+							font-size: 17.5rpx;
+							line-height: 25rpx;
+							color: #fff;
+							&:first-child {
+								margin-bottom: 5rpx;
+								font-size: 30rpx;
+								font-weight: bold;
+								line-height: 45rpx;
+							}
+						}
 					}
 				}
-				.right {
+				.down {
 					display: flex;
-					flex-direction: column;
-					text {
-						font-size: 17.5rpx;
-						line-height: 25rpx;
-						color: #fff;
-						&:first-child {
-							margin-bottom: 5rpx;
-							font-size: 30rpx;
-							font-weight: bold;
-							line-height: 45rpx;
-						}
+					flex-direction: row;
+					align-items: center;
+					justify-content: center;
+					padding-bottom:50rpx;
+					.leftBtn,.rightBtn {
+						width: 237.5rpx;
+						height: 62.5rpx;
+						line-height:62.5rpx;
+						background: #FFFFFF;
+						border-radius: 31.25rpx;
+						text-align: center;
+						font-size: 30rpx;
+						font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+						font-weight: 500;
+						color: #4980F2;
+					}
+					.rightBtn {
+						margin-left: 37.5rpx;
 					}
 				}
+				
 				&:first-child {
 					margin-top: 125rpx;
+					margin-bottom: 125rpx;
 					background: linear-gradient(270deg, #00CCBB 0%, #00CCAA 100%);
 					box-shadow: 0 12.5rpx 12.5rpx 0 rgba(0, 204, 170, 0.2);
 				}

+ 209 - 0
pages/creatingSituations/components/type.vue

@@ -0,0 +1,209 @@
+<template>
+	<view class="typeList">
+		<view class="title">{{isMultiMode?`请选择科室`:`请指定类型`}}</view>
+		<div class="content">
+			<div class="list" v-for="(item,index) in list">
+				<div class="rowOne">{{item.name}}</div>
+				<div class="rowTwo" v-if="isMultiMode">
+					{{`负责人:${item.employees}`}}
+				</div>
+				<view class="checkBtn" @click="checkedHandle(item)">
+					<image :src="(checkedItems.map(v=>v.id)).includes(item.id) ?`../../static/check-checkbox.png`:`../../static/check-no.png`">
+					</image>
+				</view>
+			</div>
+		</div>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+
+	export default {
+		props: {
+			isMultiMode: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				checkedIndex: 0,
+				
+			}
+		},
+		computed: {
+			rightIcon: function() {
+				return this.checked ? 'check-checkbox' : 'check-no';
+			},
+			...mapState({
+				typeList: state => state.creatingSituations.typeList,
+				zhinengDepartments:state => state.creatingSituations.zhinengDepartments,
+			}),
+			list(){
+				if(this.isMultiMode){
+					return this.zhinengDepartments.list.map(v=>({
+						  name:v.name,
+						  id:v.id,
+						  employees:(v.employeeList.map(v=>v.employeeName)).join(',')
+					}))
+				}else{
+					return this.typeList.list
+				}
+			},
+			checkedItems(){
+				if(this.isMultiMode){
+					return this.zhinengDepartments.checkedItems
+				}else{
+					return this.typeList.checkedItems
+				}
+			}
+		},
+		watch: {
+			isMultiMode(prev, cur) {
+				 if (prev) {
+				 	//职能科室
+				 	this.getZhinengDepartments();
+				 } 
+			}
+		},
+		mounted() {
+            if(!this.isMultiMode){
+				 this.getTypes();
+			}
+		},
+		methods: {
+			checkedHandle(item) {
+				let _checkedItems = this.checkedItems;
+				let findIndex = _checkedItems.findIndex(v=>v.id == item.id);
+				
+				console.log({_checkedItems,item})
+				if(findIndex != -1){
+					_checkedItems.splice(findIndex,1)  
+				}else{
+					_checkedItems.push(item)
+				}
+	
+				this.myCommit('checkedItems',_checkedItems)
+			},
+			getTypes: function() {
+				this.$store.dispatch({
+					type: 'creatingSituations/commActions',
+					key: 'getTypeLists',
+					data: {
+						filter: 0
+					}
+				}).then((data) => {
+					if (data) {
+						console.log({data});
+						this.myCommit('list', data);
+					}
+				});
+			},
+			getZhinengDepartments: function() {
+				this.$store.dispatch({
+					type: 'creatingSituations/commActions',
+					key: 'getZhinengDepartments',
+				}).then((data) => {
+					if (data) {
+						this.myCommit('list', data);
+					}
+				});
+			},
+			/**
+			 * 更新typeList和zhinengDepartments数据
+			 * @param {Object} key 要更新的属性
+			 * @param {Object} value 值
+			 */
+			myCommit: function(key, value) {
+				if(this.isMultiMode){
+					 let data = {...this.zhinengDepartments};
+					 data[key] = value;
+					 this.$store.commit({
+					 	type: 'creatingSituations/comChangeState', 
+					 	key: 'zhinengDepartments', 
+					 	data
+					 });
+				}else{
+					 let data = {...this.typeList};
+					 data[key] = value;
+					 this.$store.commit({
+					 	type: 'creatingSituations/comChangeState', 
+					 	key: 'typeList', 
+					 	data
+					 });
+				}
+				
+			}
+			
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	.typeList {
+		.title {
+			height: 30rpx;
+			font-size: 30rpx;
+			font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+			font-weight: 400;
+			color: #292C33;
+			line-height: 30rpx;
+			margin-bottom: 35rpx;
+		}
+
+		.content {
+			background-color: #fff;
+
+			.list {
+				position: relative;
+				padding: 31.25rpx;
+
+				.rowOne {
+					font-size: 25rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #292C33;
+				}
+
+				.rowTwo {
+					font-size: 20rpx;
+					height: 20rpx;
+					line-height: 20rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #666E80;
+					margin-top: 25rpx;
+				}
+
+				.checkBtn {
+					position: absolute;
+					top: 3rpx;
+					right: 12.5rpx;
+					display: flex;
+					flex-direction: row;
+					justify-content: center;
+					align-items: center;
+					width: 87.5rpx;
+					height: 87.5rpx;
+
+					image {
+						width: 25rpx;
+						height: 25rpx;
+					}
+				}
+
+				&::after {
+					position: absolute;
+					bottom: 0;
+					content: '';
+					width: 90%;
+					height: 0.63rpx;
+					background: #DADEE6;
+				}
+			}
+		}
+	}
+</style>

+ 9 - 0
pages/creatingSituations/components/utils.js

@@ -13,6 +13,7 @@ export const themeList = [{
 		des: '评价对各种质量与安全管理制度与流程的执行力、医院服务的连贯性及多学科综合的服务能力',
 }];
 // 查核计划里的数据
+
 export const checkPlanList = [
 		{id: 'week', value: 1, label: '每周', model: 7},
 		{id: 'month', value: 2, label: '每月', model: 30},
@@ -40,11 +41,19 @@ export const btnGroupSituationPreview = [
 	{id: 'pre', label: '上一步'},
 	{id: 'situationPreviewOK', label: '完成'}
 ];
+
+export const firstStepBtnGroup = [
+	{id: 'goback', label: '返回'},
+	{id: 'next', label: '下一步'}
+];
+
+
 /**
  * 增加树形数据字段,以适配公共组件
  * @param {Object} data
  */
 export const conditionOptions = function(data) {
+	if(!data) return [];
 	let options = data.map((item)=>{
 		return {
 			...item,

+ 744 - 383
pages/creatingSituations/creatingSituations.vue

@@ -1,271 +1,425 @@
-<template>
-	<view class="creatingSituations">
-		
-		<uni-popup ref="popup" type="bottom" :maskClick="true" @change="popupChangehandle">
-			<tm-radio-group v-if="popupType==1" :list="situationTypeList" :defaultValue='situationPreview.situationType' :setting="{
-			  value: 'situationType',
-			  name: 'situationTypeName'
-			}" :openkeys="[0]" @change="situationTypeChanged" />
+<template>
+	<view class="creatingSituations">
+
+		<uni-popup ref="popup" type="bottom" :maskClick="true" @change="popupChangehandle">
+			<tm-radio-group v-if="popupType==1" :list="situationTypeList" :defaultValue='situationPreview.situationType'
+				:setting="{
+			  value: 'situationType',
+			  name: 'situationTypeName'
+			}" :openkeys="[0]" @change="situationTypeChanged" />
+
+			<tm-radio-group v-if="popupType==2" :list="templateList" :defaultValue='situationPreview.pageTemplateId'
+				:setting="{
+			  value: 'id',
+			  name: 'name'
+			}" :openkeys="[0]" @change="templateTypeChanged" />
+
+		</uni-popup>
+
+		<check-map-detail v-if="showCheckMapDetail"></check-map-detail>
+		<view v-else class="page-wrap" :style="{paddingBottom: stepActive !== 0 ? '75rpx' : 0}">
+			<tm-steps class="tm-steps" :options="options" :active="stepActive"></tm-steps>
+
+			<scroll-view scroll-y="true" class="component-wrap">
+				<!-- <component :is="options[active].component"></component> -->
+				
+				<!-- 当流程下标为0且非职能科室负责人执行计划设置时展示 -->
+				<theme v-if="stepActive==0&&!isPlanSet"></theme>
+				
+				<div v-if="theme.type == 'NORMAL'">
+					<condition v-if="stepActive==1&&theme.id != 0"></condition>
+	                <!-- 个案情境条件 -->
+					<conditionCard v-if="stepActive==1&&theme.id == 0"></conditionCard>
+					
+					<checkRent v-if="stepActive==2"></checkRent> 		
+					<checkMap v-if="stepActive==3"></checkMap>
+					<checkPlan v-if="stepActive==4"></checkPlan>
+					<situationPreview v-if="stepActive==5"></situationPreview>
+				</div>
+				
+				<div v-if="isPlanSet">
+					<!--自查督查计划设置 -->
+					<condition v-if="stepActive==0"></condition>
+					<person v-if="stepActive==1"></person>
+					<checkMap v-if="stepActive==2"></checkMap>
+					<checkPlan v-if="stepActive==3"></checkPlan>
+					<taskPreview v-if="stepActive==4"></taskPreview>
+				</div>
+				
+				<div v-if="theme.type == 'MULTI'">
+					<!--创建 自查+督查 -->
+					<typeList v-if="stepActive==1"></typeList>
+					<typeList v-if="stepActive==2" :isMultiMode="true"></typeList>
+					<planPreview v-if="stepActive==3"></planPreview>
+				</div>
+
+			</scroll-view>
+
+			<tm-simple-btn-group v-if="stepActive != 0 || isPlanSet" :options="botmBtnGroup" v-on:callback="changeStep">
+			</tm-simple-btn-group>
+		</view>
+		<check-map-add v-if="showCheckMapAdd"></check-map-add>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import theme from "./components/theme.vue";
+	import condition from "./components/condition.vue";
+	import checkRent from "./components/checkRent.vue";
+	import checkMap from "./components/checkMap.vue";
+	import checkMapDetail from "./components/checkMapDetail.vue";
+	import checkMapAdd from "./components/checkMapAdd.vue";
+	import checkPlan from "./components/checkPlan.vue";
+	import situationPreview from "./components/situationPreview.vue";
+	import typeList from "./components/type.vue"
+	import planPreview from "./components/preview.vue"
+	import taskPreview from "./components/taskPreview.vue"
+	import person from "./components/person.vue"
+	import conditionCard from "./components/conditionCard.vue";
+	import {
+		themeList,
+		normalBtnGroup,
+		btnGroupPlan1,
+		btnGroupPlan2,
+		btnGroupSituationPreview,
+		optionsHandle,
+		checkDep,
+		firstStepBtnGroup,
+		checkGroup,
+		editCondition,
+		editCheckRent,
+		editCheckMap,
+		editCheckPlan,
+		checkPlanList,
+		editSituationPreview
+	} from "./components/utils.js";
+	import {
+		dateHandle
+	} from "../../utils/dateHandle.js";
+
+	export default {
+		data() {
+			return {
+				isPlanSet: false, //自查督查负责人操作计划设置
+				saveType: 'POST',
+				editID: '',
+			}
+		},
+		computed: {
+			...mapState({
+				popupType: state => state.creatingSituations.popupType,
+				showCheckMapDetail: state => state.creatingSituations.showCheckMapDetail,
+				showCheckMapAdd: state => state.creatingSituations.showCheckMapAdd,
+				showCheckPlan1: state => state.creatingSituations.showCheckPlan1,
+				stepActive: state => state.creatingSituations.stepActive,
+				theme: state => state.creatingSituations.theme,
+				condition: state => state.creatingSituations.condition,
+				checkRent: state => state.creatingSituations.checkRent,
+				checkMap: state => state.creatingSituations.checkMap,
+				checkPlan: state => state.creatingSituations.checkPlan,
+				situationPreview: state => state.creatingSituations.situationPreview,
+				templateList: state => state.creatingSituations.templateList,
+				situationTypeList: state => state.creatingSituations.situationTypeList,
+				showPopupSelectorList: state => state.creatingSituations.showPopupSelectorList,
+				zhinengDepartments:state=>state.creatingSituations.zhinengDepartments,
+				typeList:state=>state.creatingSituations.typeList,
+				checkPerson:state=>state.creatingSituations.checkPerson,
+				conditionCard: state => state.creatingSituations.conditionCard
+			}),
+			situationTypeName() {
+				const temp = this.situationTypeList.filter(item => item.situationType == this.situationPreview
+					.situationType);
+				return temp[0].situationTypeName;
+			},
+			botmBtnGroup: function() {
+				if(this.stepActive === 0){
+					  return firstStepBtnGroup;
+				}
+				if (this.stepActive === 4 && this.theme.id != 2) {
+					if (this.showCheckPlan1) {
+						return btnGroupPlan1;
+					} else {
+						return btnGroupPlan2;
+					}
+				} else if (this.stepActive === 5 || (this.stepActive === 3 && this.theme.type == 'MULTI')||(this.stepActive === 4&&this.theme.id == 2)) {
+					//普通情境和自查督查
+					return btnGroupSituationPreview;
+				} else {
+					return normalBtnGroup;
+				}
+			},
+			dataIsNull() {
+				let data = this.checkMap.list.filter((item) => item.status !== 'disable');
+				return data.length === 0;
+			},
+			themeType() {
+				//planSet 职能科室负责人操作计划设置
+				return this.theme.type?this.theme.type:'planSet'
+			},
+			options() {
+				if (this.theme.type == 'MULTI'&&!this.isPlanSet) {
+					//管理员创建自查督查
+					return [{
+							id: 'theme',
+							title: '主题',
+							component: theme
+						},
+						{
+							id: 'typeList',
+							title: '类型',
+							component: typeList,
+							hint: '追踪条件'
+						},
+						{
+							id: 'departmentList',
+							title: '职能科室',
+							component: typeList,
+							hint: '查核组'
+						},
+						{
+							id: 'checkRent',
+							title: '预览',
+							component: checkRent,
+							hint: '查核组'
+						},
+					]
+				}
+          
+				if (this.isPlanSet) {
+					//自查督查负责人操作计划设置流程集合
+					return [
+						{
+							id: 'condition',
+							title: '条件',
+							component: condition,
+							hint: '追踪条件'
+						},
+						{
+							id: 'person',
+							title: '人员',
+							component: person,
+							hint: '人员'
+						},
+						{
+							id: 'checkMap',
+							title: '地图',
+							component: checkMap,
+							hint: '地图'
+						},
+						{
+							id: 'checkPlan',
+							title: '计划',
+							component: checkPlan,
+							hint: '制定计划'
+						},
+						{
+							id: 'situationPreview',
+							title: '预览',
+							component: situationPreview
+						},
+					]
+				}
+
+				//普通情境流程
+				return [{
+						id: 'theme',
+						title: '主题',
+						component: theme
+					},
+					{
+						id: 'condition',
+						title: '条件',
+						component: condition,
+						hint: '追踪条件'
+					},
+					{
+						id: 'checkRent',
+						title: '查核组',
+						component: checkRent,
+						hint: '查核组'
+					},
+					{
+						id: 'checkMap',
+						title: '地图',
+						component: checkMap,
+						hint: '地图'
+					},
+					{
+						id: 'checkPlan',
+						title: '计划',
+						component: checkPlan,
+						hint: '制定计划'
+					},
+					{
+						id: 'situationPreview',
+						title: '预览',
+						component: situationPreview
+					},
+				]
+			}
+		},
+		watch: {
+			/**
+			 * @param {Boolen} newVal
+			 * @param {Boolen} oldVal
+			 */
+			showPopupSelectorList: function(newVal, oldVal) {
+				if (newVal) {
+					this.$refs.popup.open();
+				} else {
+					this.$refs.popup.close();
+				}
+			}
+		},
+		onLoad: function({
+			id,
+			type,
+			actTarget,
+			situationId,
+			themeName, //情境名
+			systemSituationType, //系统情境类型 0 个案 1 普通 2自查督查
+		}) {
+			
+			this.isPlanSet = actTarget == 'planSet';
+			this.situationId = situationId;
 			
-			<tm-radio-group v-if="popupType==2" :list="templateList" :defaultValue='situationPreview.pageTemplateId' :setting="{
-			  value: 'id',
-			  name: 'name'
-			}" :openkeys="[0]" @change="templateTypeChanged" />
 			
-		</uni-popup>
-		
-		<check-map-detail v-if="showCheckMapDetail"></check-map-detail>
-		<view v-else class="page-wrap" 
-			:style="{paddingBottom: stepActive !== 0 ? '75rpx' : 0}">
-			<tm-steps class="tm-steps" :options="options" :active="stepActive"></tm-steps>
 			
-			<scroll-view scroll-y="true" class="component-wrap">
-				<!-- <component :is="options[active].component"></component> -->
-				<theme v-if="stepActive==0"></theme>
-				<condition v-if="stepActive==1"></condition>
-				<checkRent v-if="stepActive==2"></checkRent>
-				<checkMap v-if="stepActive==3"></checkMap>
-				<checkPlan v-if="stepActive==4"></checkPlan>
-				<situationPreview v-if="stepActive==5"></situationPreview>
-			</scroll-view>
+			
+			this.saveType = type ? type : 'POST';
 			
-			<tm-simple-btn-group v-if="stepActive !== 0" 
-				:options="botmBtnGroup"
-				v-on:callback="changeStep"></tm-simple-btn-group>
-		</view>
-		<check-map-add v-if="showCheckMapAdd"></check-map-add>
-	</view>
-</template>
-
-<script>
-	import { mapState } from "vuex";
-	import theme from "./components/theme.vue";
-	import condition from "./components/condition.vue";
-	import checkRent from "./components/checkRent.vue";
-	import checkMap from "./components/checkMap.vue";
-	import checkMapDetail from "./components/checkMapDetail.vue";
-	import checkMapAdd from "./components/checkMapAdd.vue";
-	import checkPlan from "./components/checkPlan.vue";
-	import situationPreview from "./components/situationPreview.vue";
-	import {
-		themeList,
-		normalBtnGroup,
-		btnGroupPlan1,
-		btnGroupPlan2,
-		btnGroupSituationPreview,
-		optionsHandle,
-		checkDep,
-		checkGroup,
-		editCondition,
-		editCheckRent,
-		editCheckMap,
-		editCheckPlan,
-		checkPlanList,
-		editSituationPreview
-	} from "./components/utils.js";
-	import {dateHandle} from "../../utils/dateHandle.js";
-	
-	export default {
-		data() {
-			return {
-				saveType: 'POST',
-				editID: '',
-				options: [
-					{id: 'theme', title: '主题', component: theme},
-					{id: 'condition', title: '条件', component: condition, hint: '追踪条件'},
-					{id: 'checkRent', title: '查核组', component: checkRent, hint: '查核组'},
-					{id: 'checkMap', title: '地图', component: checkMap, hint: '地图'},
-					{id: 'checkPlan', title: '计划', component: checkPlan, hint: '制定计划'},
-					{id: 'situationPreview', title: '预览', component: situationPreview},
-				]
+			if(systemSituationType == 2){
+				  
+				  this.myCommit('theme', {
+					  ...this.theme,
+				  	  id: systemSituationType, title:themeName, des: null,
+					  situationId:situationId,
+				  }); // 设置为自查督查
+				  
+				  this.myCommit('checkPerson', {
+					  ...this.checkPerson,
+				  	  situationId:situationId
+				  }); // 自查督查时,人员获取需要适用情境筛选
 			}
-		},
-		computed: {
-			...mapState({
-				popupType:state => state.creatingSituations.popupType,
-				showCheckMapDetail: state => state.creatingSituations.showCheckMapDetail,
-				showCheckMapAdd: state => state.creatingSituations.showCheckMapAdd,
-				showCheckPlan1: state => state.creatingSituations.showCheckPlan1,
-				stepActive: state => state.creatingSituations.stepActive,
-				theme: state => state.creatingSituations.theme,
-				condition: state => state.creatingSituations.condition,
-				checkRent: state => state.creatingSituations.checkRent,
-				checkMap: state => state.creatingSituations.checkMap,
-				checkPlan: state => state.creatingSituations.checkPlan,
-				situationPreview: state => state.creatingSituations.situationPreview,
-				templateList:state => state.creatingSituations.templateList,
-				situationTypeList:state => state.creatingSituations.situationTypeList,
-				showPopupSelectorList:state => state.creatingSituations.showPopupSelectorList,
-			}),
-			situationTypeName(){
-				const temp  = this.situationTypeList.filter(item=>item.situationType == this.situationPreview.situationType);
-				return temp[0].situationTypeName;
-			},
-			botmBtnGroup: function() {
-				if(this.stepActive === 4) {
-					if(this.showCheckPlan1) {
-						return btnGroupPlan1;
-					} else {
-						return btnGroupPlan2;
-					}
-				} else if(this.stepActive === 5) {
-					return btnGroupSituationPreview;
-				} else {
-					return normalBtnGroup;
-				}
-			},
-			dataIsNull() {
-				let data = this.checkMap.list.filter((item)=> item.status !== 'disable');
-				return data.length === 0;
-			}
-		},
-		watch:{
-			/**
-			 * @param {Boolen} newVal
-			 * @param {Boolen} oldVal
-			 */
-			showPopupSelectorList:function(newVal, oldVal){
-				if(newVal){
-					this.$refs.popup.open();
-				}else{
-					this.$refs.popup.close();
-				}
-			}
-		},
-		onLoad:function({id,type}){
-			this.saveType = type ? type : 'POST';
-			this.dispatch('getSituationTypes').then(res=>{
-				  this.myCommit('situationTypeList', res);
-			})
-			if(id) {
-				this.editID = id;
-				this.dispatch('detialConfig',{id}).then((data)=>{
-					if(data) {
-						const {topic} = data;
-						let theme = themeList[Number(topic)],
-							condition = editCondition(data),
-							editConfig = {};
+			
+			this.dispatch('getSituationTypes').then(res => {
+				this.myCommit('situationTypeList', res);
+			});
+			
+			
+			if (id) {
+				this.editID = id;
+				this.dispatch('detialConfig', {
+					id
+				}).then((data) => {
+					if (data) {
+						const {
+							topic
+						} = data;
+						let theme = themeList[Number(topic)],
+							condition = editCondition(data),
+							editConfig = {};
 						this.myCommit('theme', theme); // 主题
-						if(type === 'PUT') { // 编辑
-							let checkRent = editCheckRent(data),
-							checkMap = editCheckMap(data),
-							checkPlan = editCheckPlan(data),
-							situationPreview = editSituationPreview(data);
-							this.myCommit('checkPlan', checkPlan); // 查核计划
-							this.myCommit('situationPreview', situationPreview); // 预览
-							editConfig = {
-								theme, 
-								condition, 
-								checkRent, 
-								checkMap,
-								checkPlan,
-								situationPreview
-							};
-							console.log({editConfig});
-						} else { // 复制创建
-							this.myCommit('condition', condition); // 条件
-							editConfig = {
-								theme, 
-								condition, 
-							};
-						}
-						this.myCommit('editConfig', editConfig); 
-						// 回到第一步或者第三步
-						this.myCommit('stepActive', type === 'PUT' ? 0 : 2); 
-					}
-				});
-			}
-		},
-		methods: {
-			situationTypeChanged(type,name){
-				// console.log({type,name});
-			    this.$store.commit('creatingSituations/comChangeState',{key:'situationPreview',data:{...this.situationPreview,situationType:type}});
-			},
-			templateTypeChanged(type,item){
-				// console.log({type,item});
-				this.$store.commit('creatingSituations/comChangeState',{key:'situationPreview',data:{...this.situationPreview,pageTemplateId:type,templateName:item.name}});
+						
+						if (type === 'PUT') { // 编辑
+							let checkRent = editCheckRent(data),
+								checkMap = editCheckMap(data),
+								checkPlan = editCheckPlan(data),
+								situationPreview = editSituationPreview(data);
+							this.myCommit('checkPlan', checkPlan); // 查核计划
+							this.myCommit('situationPreview', situationPreview); // 预览
+							editConfig = {
+								theme,
+								condition,
+								checkRent,
+								checkMap,
+								checkPlan,
+								situationPreview
+							};
+
+						} else { // 复制创建
+							this.myCommit('condition', condition); // 条件
+							editConfig = {
+								theme,
+								condition,
+							};
+						}
+						this.myCommit('editConfig', editConfig);
+						// 回到第一步或者第三步
+						this.myCommit('stepActive', type === 'PUT' ? 0 : 2);
+					}
+				});
+			}
+		},
+		methods: {
+			situationTypeChanged(type, name) {
+				// console.log({type,name});
+				this.$store.commit('creatingSituations/comChangeState', {
+					key: 'situationPreview',
+					data: {
+						...this.situationPreview,
+						situationType: type
+					}
+				});
+			},
+			templateTypeChanged(type, item) {
+				// console.log({type,item});
+				this.$store.commit('creatingSituations/comChangeState', {
+					key: 'situationPreview',
+					data: {
+						...this.situationPreview,
+						pageTemplateId: type,
+						templateName: item.name
+					}
+				});
+			},
+			zichaduchaSave: function() {
+				  let data = {
+					   name:this.situationPreview.sitName,
+					   checkPlanStartDate:'',
+					   checkPlanEndDate:'',
+					   functionCodes:this.zhinengDepartments.checkedItems.map(v=>v.id),
+					   filterCodes:this.typeList.checkedItems.map(v=>v.id),
+					   permission:1
+				  }
+                  this.dispatch(`addDuchazichaSituation`, data).then((data) => {
+                  	if (data) {
+                  		// 保存成功先清空数据
+                  		this.clearData();
+                  		uni.navigateTo({
+                  			url: '/pages/situationsCenter/situationsCenter'
+                  		});
+                  	}
+                  });
 			},
-			save: function() {
-				const {sitName,preDay,preH,startDay, description,situationType,showNotApplicable,showCountNum,pageTemplateId} = this.situationPreview;
-				const {dateObj,checkedItem,checkList} = this.checkPlan;
-				const {depType, options, conditionIds} = this.condition;
-
-				if(!sitName || sitName.length < 2) {
-					uni.showModal({
-						title: '温馨提示',
-						content: `情境名称不能为空也不能少于2个字!`,
-						showCancel: false
-					});
-					return;
+			zichaduchaPlanSave(){
+				//自查督查计划保存
+				const param  = {
+					  name:this.theme.title,
+					  topic: this.theme.id,
+					  id:this.situationId,
+					  num: this.checkPlan.checkList.length,
+					  checkPlanEndDate:`${this.checkPlan.dateObj.end} 23:59`,
+					  checkPlanStartDate:`${this.checkPlan.dateObj.start} 00:00`,
+					  day:this.checkPlan.dateObj.dayNum,
+					  employeeList:this.checkPerson.checkedItems,
+					  filterCondition:this.condition.checkedItems,
+					  frequency:this.checkPlan.checkedItem.value,
+					  planList: [...this.checkPlan.checkList].map((date, i) => {
+					  	return {
+					  		startDate:`${date} 00:00`,
+					  		endDate: `${dateHandle.getNewData(date, this.checkPlan.checkedItem.model - 1)} 23:59`
+					  	}
+					  }),
+					  filterDepartments:this.checkMap.list.map(item=>item.departmentId)
+					  
 				}
-				if(preDay > 31) {
-					uni.showModal({
-						title: '温馨提示',
-						content: `提醒天数不得大于31天!`,
-						showCancel: false
-					});
-					return;
-				}
-				if(preH > 24) {
-					uni.showModal({
-						title: '温馨提示',
-						content: `提醒天数不得大于24小时!`,
-						showCancel: false
-					});
-					return;
-				}
-				if(preDay != null&&! /^\d+$/.test(preDay)) {
-					uni.showModal({
-						title: '温馨提示',
-						content: `提醒天数不能是小数!`,
-						showCancel: false
-					});
-					return;
-				}
-				if(preH != null&&! /^\d+$/.test(preH)) {
-					uni.showModal({
-						title: '温馨提示',
-						content: `提醒小时不能是小数!`,
-						showCancel: false
-					});
-					return;
-				}
-				let data = {
-					description,
-					name: sitName,
-					topic: this.theme.id,
-					checkPlanStartDate: dateObj.start,
-					checkPlanEndDate: dateObj.end,
-					remindPlanDay: preDay,
-					remindPlanHour: preH,
-					remindCheckDay: startDay,
-					depType,
-					showNotApplicable:showNotApplicable,
-					subtotal:showCountNum,
-					situationType:situationType, 
-					pageTemplateId:pageTemplateId,
-					filterCondition: optionsHandle(options, conditionIds),
-					checkGroup: checkGroup(this.checkRent),
-					checkDep: checkDep(this.checkMap.list),
-					planConfig: {
-						frequency: checkedItem.value,
-						day: checkedItem.model,
-						startDate: dateObj.start,
-						endDate: dateObj.end,
-						num: checkList.length
-					},
-					planList: [...checkList].map((date, i)=>{
-						return {
-							startDate: date,
-							endDate: dateHandle.getNewData(date, checkedItem.model - 1)
-						}
-					})
-				};
-				if(this.saveType === 'PUT') {
-					data.id = this.editID;
-				}
-				this.dispatch(`save${this.saveType}`, data).then((data)=>{
-					if(data) {
+				
+				this.dispatch(`saveZichaduchaPlan`, param).then((data) => {
+					if (data) {
 						// 保存成功先清空数据
 						this.clearData();
 						uni.navigateTo({
@@ -273,135 +427,342 @@
 						});
 					}
 				});
-			},
+			},
+			save: function() {
+				const {
+					sitName,
+					preDay,
+					preH,
+					startDay,
+					description,
+					situationType,
+					showNotApplicable,
+					showCountNum,
+					pageTemplateId
+				} = this.situationPreview;
+				const {
+					dateObj,
+					checkedItem,
+					checkList
+				} = this.checkPlan;
+				const {
+					depType,
+					options,
+					conditionIds
+				} = this.condition;
+
+				if (!sitName || sitName.length < 2) {
+					uni.showModal({
+						title: '温馨提示',
+						content: `情境名称不能为空也不能少于2个字!`,
+						showCancel: false
+					});
+					return;
+				}
+				if (preDay > 31) {
+					uni.showModal({
+						title: '温馨提示',
+						content: `提醒天数不得大于31天!`,
+						showCancel: false
+					});
+					return;
+				}
+				if (preH > 24) {
+					uni.showModal({
+						title: '温馨提示',
+						content: `提醒天数不得大于24小时!`,
+						showCancel: false
+					});
+					return;
+				}
+				if (preDay != null && !/^\d+$/.test(preDay)) {
+					uni.showModal({
+						title: '温馨提示',
+						content: `提醒天数不能是小数!`,
+						showCancel: false
+					});
+					return;
+				}
+				if (preH != null && !/^\d+$/.test(preH)) {
+					uni.showModal({
+						title: '温馨提示',
+						content: `提醒小时不能是小数!`,
+						showCancel: false
+					});
+					return;
+				}
+				let data = {
+					description,
+					name: sitName,
+					topic: this.theme.id,
+					checkPlanStartDate: dateObj.start,
+					checkPlanEndDate: dateObj.end,
+					remindPlanDay: preDay,
+					remindPlanHour: preH,
+					remindCheckDay: startDay,
+					depType,
+					showNotApplicable: showNotApplicable,
+					subtotal: showCountNum,
+					situationType: situationType,
+					pageTemplateId: pageTemplateId,
+					filterCondition:optionsHandle(options, conditionIds),
+					checkGroup: checkGroup(this.checkRent),
+					checkDep: checkDep(this.checkMap.list),
+					planConfig: {
+						frequency: checkedItem.value,
+						day: checkedItem.model,
+						startDate: dateObj.start,
+						endDate: dateObj.end,
+						num: checkList.length
+					},
+					planList: [...checkList].map((date, i) => {
+						return {
+							startDate: date,
+							endDate: dateHandle.getNewData(date, checkedItem.model - 1)
+						}
+					})
+				};
+				if (this.saveType === 'PUT') {
+					data.id = this.editID;
+				}
+				
+				this.dispatch(`save${this.saveType}`, data).then((data) => {
+					if (data) {
+						// 保存成功先清空数据
+						this.clearData();
+						uni.navigateTo({
+							url: '/pages/situationsCenter/situationsCenter'
+						});
+					}
+				});
+			},
 			changeStep: function(id) {
-				switch(id) {
-					case 'pre': // 上一步
-						if(this.stepActive > 0) 
+				// console.log({id,'stepActive':this.stepActive,'this.options':this.options});
+				switch (id) {
+					case 'goback':
+					     uni.navigateBack({
+					     	delta: 1
+					     });
+					break;
+					case 'pre': // 上一步
+						if (this.stepActive > 0){
 							this.myCommit('needReload', false);
 							this.myCommit('stepActive', this.stepActive - 1);
-						break;
-					case 'next': // 下一步
-						if(this.stepActive < this.options.length) 
-							this.nextHandle(this.stepActive);
-						break;
-					case 'checkPlanCreate': // 生成查核计划
-						if(this.checkPlan.checkList.length === 0&&this.checkPlan.dateObj.dayNum<1) {
-							uni.showModal({
-							  title: '错误提示',
-							  content: '查核频次必须大于或等于1!',
-							  showCancel: false
-							});
 						}else {
-							this.myCommit('showCheckPlan1', false);
+							console.log({'this.stepActive':this.stepActive});
+						}
+						break;
+					case 'next': // 下一步
+						if (this.stepActive < this.options.length)
+							this.nextHandle(this.stepActive);
+						break;
+					case 'checkPlanCreate': // 生成查核计划
+					    
+						if (this.checkPlan.checkList.length === 0 && this.checkPlan.dateObj.dayNum < 1) {
+							uni.showModal({
+								title: '错误提示',
+								content: '查核频次必须大于或等于1!',
+								showCancel: false
+							});
+						} else {
+							console.log('checkPlanCreate');
+							this.myCommit('showCheckPlan1', false);
+						}
+						break;
+					case 'checkPlanCallback': // 生成查核计划-返回
+						this.myCommit('showCheckPlan1', true);
+						break;
+					case 'situationPreviewOK': // 完成
+						if (this.theme.type == 'MULTI') {
+							//自查督查
+							this.zichaduchaSave();
+							break;
 						}
-						break;
-					case 'checkPlanCallback': // 生成查核计划-返回
-						this.myCommit('showCheckPlan1', true);
-						break;
-					case 'situationPreviewOK': // 完成
-						this.save();
-						break;
-				}
-			},
-			/**
-			 * 处理【下一步】逻辑
-			 */
+						if (this.theme.id == 2) {
+							//自查督查
+							this.zichaduchaPlanSave();
+							break;
+						}
+						this.save();
+						break;
+				}
+			},
+			/**
+			 * 处理【下一步】逻辑
+			 */
 			nextHandle: function(stepActive) {
-				let flage = false;
-				switch(stepActive) {
-					case 1: 
-						flage = this.errorHandle(this.condition.conditionIds.length > 0, 1);
-						break;
-					case 2: 
-						const {points} = this.checkRent.checkedItem;
-						let condition = this.checkRent.checkedItem.id !== null && points;
-						flage = this.errorHandle(condition, 2);
-						break;
-					case 3: flage = this.errorHandle(!this.dataIsNull, 3);
-						break;
-					case 4: 
-						const {checkList} = this.checkPlan;
-						flage = this.errorHandle(checkList.length > 0, 4);
-						break;
-					case 5: 
-					    this.dispatch('getSituationTypes').then(res=>{
-							  console.log({res});
-						})
-					    break;
-					default: 
-						flage = true;
-						break;
+				console.log({stepActive,'themeType':this.themeType})
+				let flage = false;
+				if (this.themeType == 'NORMAL') {
+					//非督查+自查
+					switch (stepActive) {
+						case 1:
+						    if(this.theme.id == 0){
+								//创建个案情境
+								flage = this.errorHandle(this.condition.conditionIds.length >= this.conditionCard.requireds.length, 1);			
+							}else{
+								flage = this.errorHandle(this.condition.conditionIds.length > 0, 1);
+							}
+							break;
+						case 2:
+							const {
+								points
+							} = this.checkRent.checkedItem;
+							let condition = this.checkRent.checkedItem.id !== null && points;
+							flage = this.errorHandle(condition, 2);
+							break;
+						case 3:
+							flage = this.errorHandle(!this.dataIsNull, 3);
+							break;
+						case 4:
+							const {
+								checkList
+							} = this.checkPlan;
+							flage = this.errorHandle(checkList.length > 0, 4);
+							break;
+						case 5:
+							this.dispatch('getSituationTypes').then(res => {
+								console.log({
+									res
+								});
+							})
+							break;
+						default:
+							flage = true;
+							break;
+					}
+
 				}
-				if(flage) {
-					this.myCommit('needReload', true);
-					this.myCommit('stepActive', stepActive + 1);
-				} 
-			},
-			/**
-			 * 错误处理,满足条件返回true
-			 * @param {Object} condition 条件
-			 * @param {Object} index 当前下标
-			 */
-			errorHandle: function(condition, index) {
-				if(condition) {
-					return true;
-				} else {
-					uni.showModal({
-						title: '温馨提示',
-						content: index === 3 ? '查核地图不能为空' :`请先选择${this.options[index].hint}!`,
-						showCancel: false
-					});
-					return false;
+				
+				
+				
+				if (this.themeType == 'MULTI') {
+					//管理员创建 督查+自查
+					switch (stepActive) {
+						case 1:
+							flage = true;
+							break;
+						case 2:
+							flage = true;
+							break;
+						case 3:
+							flage = true;
+							break;
+						default:
+							flage = true;
+							break;
+					}
 				}
-			},
-			myCommit: function(key, data) {
-				// console.log({key, data});
-				this.$store.commit({type: 'creatingSituations/comChangeState',key,data});
-			},
-			dispatch: function(key, data) {
-				return this.$store.dispatch({type: 'creatingSituations/commActions', key, data});
-			},
-			clearData:function() {
-				checkPlanList[5].model = null;
-				this.$store.commit({type: 'creatingSituations/setInit'});
-			},
-			popupChangehandle:function(data){
-				const {show} = data;
-				this.$store.commit('creatingSituations/comChangeState',{key:'showPopupSelectorList',data:show});
-			},
-		},
-		destroyed() {
-			this.clearData();
-		},
-		components: {
-			checkMapDetail,
-			checkMapAdd,
-			theme,
-			condition,
-			checkRent,
-			checkMap,
-			checkPlan,
-			situationPreview
-		}
-	}
-</script>
-
-<style lang="less">
-	.creatingSituations {
-		width: 100%;
-		height: 100%;
-		background-color: #F5F6FA;
-		.page-wrap {
-			padding-bottom: 75rpx;
-			width: 100%;
-			height: 100%;
-			.tm-steps {
-				height: auto;
-			}
-			.component-wrap {
-				padding-bottom: 87.5rpx;
-			}
-		}
-	}
+				
+				if(this.isPlanSet){
+					  //职能科室负责人  督查+自查 计划设置
+					  switch (stepActive) {
+					  	case 1:
+					  		flage = true;
+					  		break;
+					  	case 2:
+					  		flage = true;
+					  		break;
+					  	case 3:
+					  		flage = true;
+					  		break;
+					  	default:
+					  		flage = true;
+					  		break;
+					  }
+				}
+
+				if (flage) {
+					this.myCommit('needReload', true);
+					this.myCommit('stepActive', stepActive + 1);
+				}
+			},
+			/**
+			 * 错误处理,满足条件返回true
+			 * @param {Object} condition 条件
+			 * @param {Object} index 当前下标
+			 */
+			errorHandle: function(condition, index) {
+				if (condition) {
+					return true;
+				} else {
+					uni.showModal({
+						title: '温馨提示',
+						content: index === 3 ? '查核地图不能为空' : `请先选择${this.options[index].hint}!`,
+						showCancel: false
+					});
+					return false;
+				}
+			},
+			myCommit: function(key, data) {
+				this.$store.commit({
+					type: 'creatingSituations/comChangeState',
+					key,
+					data
+				});
+			},
+			dispatch: function(key, data) {
+				return this.$store.dispatch({
+					type: 'creatingSituations/commActions',
+					key,
+					data
+				});
+			},
+			clearData: function() {
+				checkPlanList[5].model = null;
+				this.$store.commit({
+					type: 'creatingSituations/setInit'
+				});
+			},
+			popupChangehandle: function(data) {
+				const {
+					show
+				} = data;
+				this.$store.commit('creatingSituations/comChangeState', {
+					key: 'showPopupSelectorList',
+					data: show
+				});
+			},
+		},
+		destroyed() {
+			this.clearData();
+		},
+		components: {
+			checkMapDetail,
+			checkMapAdd,
+			theme,
+			condition,
+			checkRent,
+			checkMap,
+			checkPlan,
+			situationPreview,
+			typeList,
+			person,
+			planPreview,
+			taskPreview,
+			conditionCard
+		}
+	}
+</script>
+
+<style lang="less">
+	.creatingSituations {
+		width: 100%;
+		height: 100%;
+		background-color: #F5F6FA;
+
+		.page-wrap {
+			padding-bottom: 75rpx;
+			width: 100%;
+			height: 100%;
+
+			.tm-steps {
+				height: auto;
+			}
+
+			.component-wrap {
+				padding-bottom: 87.5rpx;
+			}
+		}
+	}
 </style>

+ 23 - 2
pages/creatingSituations/model.js

@@ -10,12 +10,34 @@ const initState = {
 	needReload: true, // 切换页面是否需要获取新数据
 	stepActive: 0, // 步骤进度
 	showPopupSelectorList:false, //是否打开选择弹窗
-	theme: {id: null, title: null, des: null}, // 主题选中数据(id: 0个案 1系统)
+	theme: {id: null, title: null, des: null,type:null,situationId:null}, // 主题选中数据(id: 0个案 1普通 2自查督查)
+
+	typeList:{
+		//类型
+		list:[],
+		checkedItems:[]
+	},
+	conditionCard:{
+		//卡片条件,
+		checkResults:[],
+	},
+	zhinengDepartments:{
+		//职能科室
+		list:[],
+		checkedItems:[]
+	},
+	checkPerson:{
+		situationId:null,
+		list:[],
+		checkedItems:[]
+	},//自查督查情境选择的查核人
 	condition: { // 条件页面数据
 		options: [], // 树形节点数据
 		conditionIds: [], // 选中的key
 		depType: 1, // 门急诊类型 1-门诊 2-急诊
 		defaultOpen: [], // 默认展开的项
+		checkedItems:[],//已勾选项,
+		childContainer:[],//卡片条件,展开的子项
 	},
 	checkRent: { // 查核组页面数据
 		list: [],
@@ -61,7 +83,6 @@ export default {
 		},
 		setInit(state) {
 			let _initState = JSON.parse(JSON.stringify(initState));
-			console.log({_initState});
 			for(let key in _initState) {
 				state[key] = _initState[key];
 			}

+ 35 - 0
pages/creatingSituations/server.js

@@ -54,6 +54,41 @@ const requestList = {
   getTemplates:{
 	method: 'GET',
 	url: 'situation/getPageTemplateList',  
+  },
+  //获取自查督查条件
+  getTypeLists:{
+  	method: 'GET',
+  	url: 'inspector/filter',  
+  },
+  //获取创建个案情境时的条件
+  getTypeListsInGeanCreate:{
+  	method: 'GET',
+  	url: 'common/newConditions',  
+  },
+  //获取自查督查可选查核人
+  getCheckPersonLists:{
+  	method: 'POST',
+  	url: 'inspector/filterEmployees',  
+  },
+  //获取职能科室
+  getZhinengDepartments:{
+  	method: 'GET',
+  	url: 'inspector/functionEmployees',  
+  },
+  //获职能科室负责计划设置中的可选地图列表
+  getPlanSetMap:{
+  	method: 'POST',
+  	url: 'inspector/getCheckDepartments',  
+  },
+  //添加督查自查情境
+  addDuchazichaSituation:{
+  	method: 'POST',
+  	url: 'inspector/add',  
+  },
+  //保存自查督查情境计划
+  saveZichaduchaPlan:{
+	  method: 'POST',
+	  url: 'inspector/savePlan',  
   }
 };
 

+ 5 - 3
pages/editCheckList/editCheckList.vue

@@ -576,7 +576,8 @@
 						const _detailsTwo = {
 							...details,
 							checkedList: [deptId]
-						}
+						}
+						
 						uni.navigateTo({
 							url: `/pages/batchDistribution/batchDistribution?details=${encodeURIComponent(JSON.stringify(_detailsTwo))}`
 						});
@@ -898,11 +899,12 @@
 					.labelVal {
 						display: flex;
 						flex-direction: row;
-						align-items: center;
+						align-items: center;
+						flex-wrap: nowrap;
 						height: 100%;
 
 						.base-text {
-							flex: 1;
+							// flex: 1;
 							line-height: 62.5rpx;
 							color: #B8BECC;
 							font-weight: normal;

+ 16 - 4
pages/home/home.vue

@@ -30,7 +30,7 @@
 						<text class="text">所属查核组:{{dep.split(',')[0]}}</text>
 					</view>
 				</view>
-
+             
 			</view>
 			<view class="function-box">
 				<view class="role-switch" @click="switchRole">
@@ -53,10 +53,10 @@
 					<text class="func-text">修改密码</text>
 					<image class="icon-more" src="/static/images/icon-more.png"></image>
 				</view>
-				<view class="viewReport-btn" @click="viewReportHandle">
+				<!-- <view class="viewReport-btn" @click="viewReportHandle">
 					<text class="func-text">查看报表</text>
 					<image class="icon-more" src="/static/images/icon-more.png"></image>
-				</view>
+				</view> -->
 				<!-- <view class="resetPsd-btn" @click="resetFontSizeFunc">
 					<text class="func-text">修改字体大小</text>
 					<image class="icon-more" src="/static/images/icon-more.png"></image>
@@ -107,7 +107,7 @@
 			return {
 				ifshowVersionInfo:false,
 				showJournal: false,
-				version: '0.7.9',
+				version: '0.8.2',
 				versionData: {
 					versionNo: '',
 					versionId: '',
@@ -147,6 +147,18 @@
 					{
 						permission: 5,
 						name: '改善者'
+					},
+					{
+						permission: 6,
+						name: '职能科室负责人'
+					},
+					{
+						permission: 7,
+						name: '职能科室人员'
+					},
+					{
+						permission: 8,
+						name: '自查人'
 					}
 				]
 			}

+ 3 - 3
pages/improve-mission-list/improve-mission-list.vue

@@ -30,11 +30,11 @@
 				completeTaskList: []
 			}
     },
-    onLoad({ situationId }){ // situationId:情景id
-      this.getMissionList({situationId});
+    onLoad({ situationId,systemSituationType }){ // situationId:情景id,systemSituationType 情境类型
+      this.getMissionList({situationId,planType:systemSituationType});
     },
 		methods: {
-    	// 获取改善任务列表
+    	    // 获取改善任务列表
 			getMissionList(data) {
 				this.$store.dispatch({
 					type: 'mission/commActions',

+ 1 - 1
pages/login/login.vue

@@ -34,7 +34,7 @@
 		data() {
 			return {
 				index:0,
-				appHospSign:'d4miD82MvwFI6gY5',//app端更新hospSign
+				appHospSign:'8CJYqxlGIdLEIwaG',//app端更新hospSign
 				showInputModal:false,
 				hospSign: '', // 医院标识
 				username: '', // 用户名

+ 156 - 36
pages/mainPointsDetail/mainPointsDetail.vue

@@ -201,7 +201,7 @@
 				checkedSelectResultList: [], //下拉结果选中集合
 				checkedSelectResultListIds: [],
 				currentSelect: '',
-				checkItemScore: 0, //查核选中的分数
+				checkItemScore: null, //查核选中的分数
 				checkItemValue: null, //查核选中的分数占比
 				checkConfiglist: [], //查核情况可配置列表
 				totalScore: 0, //总分
@@ -219,6 +219,9 @@
 				ifInputScore: false, //是否手动干预分值
 			};
 		},
+		created() {
+			this.nowPermission = uni.getStorageSync('nowPermission');
+		},
 		onShow() {
 			const {
 				responsibleList
@@ -234,7 +237,14 @@
 				} = this.$store.state;
 				return responsibleList.checkedResponsibleList.map(item => item.main);
 			},
+			checkedResponsibleData() {
+				const {
+					responsibleList
+				} = this.$store.state;
+				return responsibleList.checkedResponsibleList;
+			},
 			selectedScore: function(newVal, oldVal) {
+
 				this.scoreCounter()
 			},
 			checkItemScore: function(newVal) {
@@ -256,17 +266,19 @@
 			});
 		},
 		methods: {
-			scoreCounter() {
-				if(this.checkItemValue == -1){
-					//清空分数
-					this.deductPoint = 0;
-					return
+			scoreCounter() {
+				if (this.checkItemValue == -1) {
+					//清空分数
+					this.deductPoint = 0;
+					return
 				}
 				if (this.inputScore) {
 					this.deductPoint = Number(this.inputScore) + this.selectedScore
 				} else {
 					this.deductPoint = this.selectedScore + this.checkItemValue
 				}
+
+
 			},
 			changeToInputScore() {
 				this.ifInputScore = true;
@@ -315,8 +327,9 @@
 			},
 			//跳转选择当事人
 			toSelectResponsible() {
+
 				uni.navigateTo({
-					url: `/pages/responsibleList/responsibleList?deptId=${this.deptId}&checkId=${this.id}`,
+					url: `/pages/responsibleList/responsibleList?deptId=${this.isZichaDucha?this.departmentId:this.deptId}&checkId=${this.id}&isZichaDucha=${this.isZichaDucha}`,
 				});
 			},
 			selectResultHandle(item) {
@@ -391,6 +404,7 @@
 			commitSelectResult() {
 
 				const _commitFunc = () => {
+
 					if (this.data.checkModelName == '访谈') {
 
 						const tempArr = this.checkedSelectResultListData[this.currentEditTextAreaIndex].map(item =>
@@ -412,6 +426,7 @@
 						}, 0);
 						this.recordList[0].seeResult = this.checkedSelectResultList.join(',');
 						this.selectedScore = tempScore;
+
 					}
 				}
 				_commitFunc();
@@ -421,7 +436,7 @@
 				this.$store.dispatch({
 					type: "mainPointsDetail/commActions",
 					payload: {
-						key: "checkTaskDetail",
+						key: this.isZichaDucha ? "zichaduchaCheckTaskDetail" : "checkTaskDetail",
 						data: {
 							id: id,
 						},
@@ -434,14 +449,15 @@
 					this.id = id;
 					this.deptId = res.deptId;
 					//再次编辑回显
-					const filePath = res.checkResultTxt ? JSON.parse(res.checkResultTxt) : [];
-					this.filePath = filePath[0] && filePath[0].checkResultUrl != '' ? filePath[0].checkResultUrl
-						.split(',') : [];
-					this.Index = res.checkResult;
-					this.totalScore = res.totalScore;
-					this.currentScore = res.checkResult ? res.score : res.totalScore;
+
+					this.Index = this.isZichaDucha?res.checkResultName:res.checkResult;
+					
+					this.totalScore = this.isZichaDucha ? res.itemTotalScore : res.totalScore;
+					this.currentScore = this.isZichaDucha ? (res.checkResult ? res.checkScore : res
+						.itemTotalScore) : (res.checkResult ? res.score : res.totalScore);
 					this.deductPoint = res.deductPoint;
 					this.moreDeduction = res.moreDeduction;
+
 					if (res.checkResultRequestList && res.checkResultRequestList.length > 0) {
 						if (res.checkModelName == '访谈') {
 							this.talkList = res.checkResultRequestList.map((item, currentIndex) => {
@@ -483,36 +499,47 @@
 
 						} else {
 
-							const arr = res.checkResultRequestList[0].checkResultDescribe.split(',');
+							let filePath = res.checkResultTxt ? JSON.parse(res.checkResultTxt) : [];
+							this.filePath = filePath[0] && filePath[0].checkResultUrl != '' ? filePath[0]
+								.checkResultUrl
+								.split(',') : [];
+
+							if (this.isZichaDucha) {
+								//自查督查回显图片
+                                this.filePath = res.checkResultRequestList[0].checkResultUrl.length>0?res.checkResultRequestList[0].checkResultUrl.split(','):[];
+							}
+
+
+							const arr = res.checkResultRequestList[0].checkResultDescribe ? 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.checkedSelectResultList = res.checkResultRequestList[0].checkResultDescribe ? res
+								.checkResultRequestList[0].checkResultDescribe.split(',') : [];
 							this.checkedSelectResultListData = tempResult;
 
-							console.log({
-								tempResult
-							});
-							// this.selectedScore = tempScore;
 
 						}
 					}
 
 					//用于当时人页面回显
-					if (res.responsibleUserName) {
-						const tempResponsibleUserName = res.responsibleUserName.split(',');
-						const tempResponsibleUserId = res.responsibleUserId.split(',');
+					if (res.responsibleUserName || res.responseUserName) {
+
+						//同时适配自查督查
+						const tempResponsibleUserName = res.responsibleUserName ? res.responsibleUserName.split(
+							',') : res.responseUserName.split(',');
+						const tempResponsibleUserId = res.responsibleUserId ? res.responsibleUserId.split(',') :
+							res.responseUserId.split(',');
 						this.checkedResponsibleList = tempResponsibleUserName;
 						const arr = tempResponsibleUserName.map((item, index) => ({
 							main: item,
 							id: parseInt(tempResponsibleUserId[index])
 						}));
-						// console.log({arr});
+
 						this.$store.commit('responsibleList/updateCheckedResponsibleList', arr);
 					} else {
 						this.checkedResponsibleList = [];
@@ -520,7 +547,17 @@
 					}
 
 					if (res) {
-						this.data = res;
+						console.log({
+							res
+						});
+						this.data = this.isZichaDucha ? {
+							...res,
+							lastResult: res.lastResultName,
+							checkResult: res.checkResultName
+						} : res;
+						
+						console.log('this.data',this.data);
+
 						if (res && res.lastResult == "不适用") {
 							// this.lastIndex = 1;
 							this.lastIndex = res.lastResult;
@@ -550,7 +587,9 @@
 			},
 			//查核点击回调
 			checkedOne(data) {
+
 				const parsedData = JSON.parse(JSON.stringify(data));
+
 				this.currentCheckedTab = data;
 				this.Index = parsedData.attr;
 				this.data.checkResult = parsedData.attr;
@@ -558,11 +597,11 @@
 
 				this.checkItemScore = parsedData.itemGetScore;
 				this.checkItemValue = parsedData.value;
-				this.calScore = parsedData.calScore;
-				
+				this.calScore = parsedData.calScore;
+
 				if (!this.inputScore) { //没有手输调整过的才可以修改
 					this.checkItemScore = parsedData.itemGetScore;
-				}
+				}
 
 
 			},
@@ -637,9 +676,14 @@
 				console.log('commit check');
 				return new Promise((resolve) => {
 					const _commitCheck = () => {
+
+						//console.log('checkedResponsibleList',this.checkedResponsibleList,'checkedResponsibleData',this.checkedResponsibleData);
+						let resultIndex = this.resultConfigList.findIndex(item => item.name == this.data
+							.checkResult);
+
 						try {
 							if (this.Index) {
-								let params = {
+								let params = !this.isZichaDucha ? {
 									id: this.data.id,
 									checkResult: this.data.checkResult,
 									checkResultRequestList: [],
@@ -648,6 +692,23 @@
 									situationType: this.situationType,
 									calScore: this.calScore,
 									score: this.currentScore,
+									deductPoint: this.deductPoint,
+								} : {
+									//自查督查保存
+									id: this.data.id,
+									responsibleUser: this.checkedResponsibleData.map(item => ({
+										responsibleUserId: item.id,
+										responsibleUserName: item.main
+									})),
+									checkResult: resultIndex != -1 ? this.resultConfigList[resultIndex]
+										.code : '',
+									checkResultRequestList: [],
+									checkItemScore: this.checkItemScore,
+									value: this.checkItemValue,
+									situationType: this.situationType,
+									calScore: this.calScore,
+									score: this.currentScore,
+
 									deductPoint: this.deductPoint,
 								};
 
@@ -683,10 +744,13 @@
 								}
 								const checkConfiglist = JSON.parse(JSON.stringify(this.checkConfiglist));
 
+
+
 								this.$store.dispatch({
 									type: "mainPointsDetail/commActions",
 									payload: {
-										key: "saveCheckTaskDetail",
+										key: this.isZichaDucha ? "saveZichaduchaCheckTaskDetail" :
+											"saveCheckTaskDetail",
 										data: {
 											...params,
 										},
@@ -694,18 +758,66 @@
 								}).then((res) => {
 									if (res) {
 										resolve(true);
-										// console.log({checkConfiglist,params});
+
+										// const resultIndex = this.resultConfigList.findIndex(item => item.name == this.data.checkResult);
+
+										// console.log({resultIndex,'this.resultConfigList':this.resultConfigList});
+
 										for (let i = 0; i < checkConfiglist.length; i++) {
 
+											const index = this.resultConfigList.findIndex(item => item
+												.code == params.checkResult);
+											let name = '';
+											if (index != -1) {
+												name = this.resultConfigList[index].name
+											}
+
+
 											if (
-												checkConfiglist[i].attr == params.checkResult &&
+												checkConfiglist[i].attr == (this.isZichaDucha ? name :
+													params.checkResult) &&
 												(checkConfiglist[i].resultType == 2 ||
 													checkConfiglist[i].resultType == 3)
 											) {
 												//当主要缺失和次要缺失时发起改善任务
 												console.log('开始提交改善前准备');
 
-												let param = {
+												let improveType = undefined;
+												if (this.nowPermission == 6 || this.nowPermission ==
+													7) {
+													improveType = 1
+												}
+												if (this.nowPermission == 4 || this.nowPermission ==
+													8) {
+													improveType = 2
+												}
+
+												let param = this.isZichaDucha ? {
+													situationId: this.data.situationId,
+													situationName: this.data.situationName,
+													checkGroupId: this.data.checkGroupId,
+													checkGroupName: this.data.checkGroupName,
+													checkItemId: this.data.checkItemId,
+													checkItemName: this.data.checkItemName,
+													checkPointId: this.data.checkPointId,
+													checkPointName: this.data.checkPointName,
+													deptName: this.data.checkGroupName,
+													deptId: this.data.checkGroupId,
+													appointFlag: false,
+													desicion: 0,
+													taskType: "1",
+													checkId: this.data.functionId,
+													checkResult: 0,
+													// newResultType: Number(resultIndex != -1 ? this
+													// 	.resultConfigList[resultIndex].code : 0
+													// 	),
+													newResultType:checkConfiglist[i].resultType,
+													receiveEmpId: this.data.receiveEmpId,
+													receiveEmpName: this.data.receiveEmpName,
+													checkDetailId: this.data.id,
+													improveType: improveType, //0 普通 1督查 2自查 nowpermission 67 督查 48 自查
+
+												} : {
 													situationId: this.data.situationId,
 													situationName: this.data.situationName,
 													checkGroupId: this.data.checkGroupId,
@@ -919,14 +1031,22 @@
 			id,
 			checkPointId,
 			checkItemId,
-			situationType
+			situationType,
+			isZichaDucha,
+			departmentId,
+			checkGroupName,
 		}) {
+
 			this.id = id;
 			this.checkPointId = checkPointId;
 			this.situationType = situationType;
 			this.checkItemId = checkItemId;
+			this.departmentId = departmentId; //用于自查督查作为科室id
+
 			this.getCheckConfigList(checkItemId);
 			this.getCheckItemResultList(checkItemId);
+			this.isZichaDucha = isZichaDucha? JSON.parse(isZichaDucha) : false; //是否为自查督查
+
 
 			//接收来自上个页面所传过来的数据
 			const eventChannel = this.getOpenerEventChannel();

+ 10 - 0
pages/mainPointsDetail/server.js

@@ -6,11 +6,21 @@ const requestList = {
 		method: 'GET',
 		url: 'checkTask/checkTaskDetail'
 	},
+	// 自查督查查核项明细
+	zichaduchaCheckTaskDetail: {
+		method: 'GET',
+		url: 'inspector/checkItemDetail'
+	},
 	//保存查核项
 	saveCheckTaskDetail: {
 	  method: 'POST',
 	  url: 'checkTask/saveCheckTaskDetail'
 	},
+	//自查督查保存查核项
+	saveZichaduchaCheckTaskDetail: {
+	  method: 'POST',
+	  url: 'inspector/saveItem'
+	},
 	//获取查核配置选项
 	getCheckItemAttr:{
 		method: 'GET',

+ 2 - 1
pages/mission-action/components/assign-mission.vue

@@ -138,7 +138,8 @@
 								break;
 						}
 					}
-				});
+				});
+				console.log({'1':requestParams});
 				this.$emit('comRequest', requestParams);
 			},
 			// 查询部门人员树

+ 4 - 0
pages/mission-action/components/disagree.vue

@@ -85,6 +85,8 @@
 		}
         const { params } = this.btnInfo;
         let requestParams = {};
+		console.log('this.btnInfo',this.btnInfo);
+		
         this.btnInfo.params.map(item => {
           if(item.valueKey){
             requestParams[item.paramsKey] = (
@@ -98,6 +100,8 @@
             requestParams[item.paramsKey] = this.value;
           }
         });
+		
+		console.log({'2':requestParams});
         this.$emit('comRequest', requestParams);
       }
     }

+ 135 - 139
pages/mission-action/components/modal.vue

@@ -1,140 +1,136 @@
-<template>
-	<view class="modal-view">
-    <view class="content">
-      <view class="title">
-      	<text>方案名称</text>
-      </view>
-			<!-- <view class="label">
-				<text>请输入方案的名称</text>
-			</view> -->
-			<view class="input-box">
-			  <input
-				  class="input"
-					maxlength="16"
-					placeholder="限2~16个字符"
-					placeholder-style="color: #A1A7B3"
-					@blur="changeImproveScheme"
-				/>
-			</view>
-			<view class="btn-box">
-				<view class="btn" @click="close">
-					<text>取消</text>
-				</view>
-				<view class="btn" @click="save">
-					<text>保存</text>
-				</view>
-			</view>
-    </view>
-	</view>
-</template>
-
-<script>
-	// 不认可原因
-	export default {
-    data() {
-      return {
-        // 方案名称
-        improveScheme: ''
-      }
-    },
-    methods: {
-			changeImproveScheme(e) {
-        this.improveScheme = e.detail.value;
-        this.checkImproveScheme(e.detail.value);
-      },
-      // 校验方案名称
-			checkImproveScheme(name) {
-			  if(name.length < 2 || name.length > 16){
-					uni.showToast({
-						title: '限2~16个字符!',
-						icon: 'none',
-						duration: 500
-          });
-          return true;
-				}
-      },
-      // 保存
-      save() {
-        if(this.checkImproveScheme(this.improveScheme)) return;
-        this.$emit('sure', this.improveScheme);
-      },
-      close() {
-        this.$emit('close');
-      }
-    }
-	}
-</script>
-
-<style lang="less">
-	.modal-view {
-    position: absolute;
-    top: 0;
-    right: 0;
-    bottom: 0;
-    left: 0;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-    background: rgba(18, 20, 26, .5);
-
-    .content {
-			width: 562.5rpx;
-			border-radius: 15rpx;
-			background-color: #fff;
-			overflow: hidden;
-
-			.title {
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				height: 95rpx;
-				font-size: 25rpx;
-				font-weight: bold;
-				color: #292C33;
-			}
-
-			.label {
-				display: flex;
-				align-items: center;
-				height: 78.75rpx;
-				padding-left: 25rpx;
-				font-size: 22.5rpx;
-				color: #B8BECC;
-			}
-
-			.input-box {
-				border-top: 0.62rpx solid #DADEE6;
-				border-bottom: 0.62rpx solid #DADEE6;
-
-				.input {
-					width: 100%;
-					min-height: 103.12rpx;
-					padding: 0 25rpx;
-					line-height: 26.25rpx;
-					font-size: 22.5rpx;
-					color: #525866;
-					box-sizing: border-box;
-				}
-			}
-
-			.btn-box {
-				display: flex;
-				height: 75rpx;
-
-				.btn {
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					flex: 1;
-					font-size: 22.5rpx;
-					color: #3377FF;
-
-				  &:last-child {
-				  	background-color: #007AFF;
-				  	color: #fff;
-			  	}
-				}
-			}
-    }
-	}
+<template>
+	<view class="modal-view">
+		<view class="content">
+			<view class="title">
+				<text>方案名称</text>
+			</view>
+			<!-- <view class="label">
+				<text>请输入方案的名称</text>
+			</view> -->
+			<view class="input-box">
+				<input class="input" maxlength="16" placeholder="限2~16个字符" placeholder-style="color: #A1A7B3"
+					@blur="changeImproveScheme" />
+			</view>
+			<view class="btn-box">
+				<view class="btn" @click="close">
+					<text>取消</text>
+				</view>
+				<view class="btn" @click="save">
+					<text>保存</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	// 不认可原因
+	export default {
+		data() {
+			return {
+				// 方案名称
+				improveScheme: ''
+			}
+		},
+		methods: {
+			changeImproveScheme(e) {
+				this.improveScheme = e.detail.value;
+				this.checkImproveScheme(e.detail.value);
+			},
+			// 校验方案名称
+			checkImproveScheme(name) {
+				if (name.length < 2 || name.length > 16) {
+					uni.showToast({
+						title: '限2~16个字符!',
+						icon: 'none',
+						duration: 500
+					});
+					return true;
+				}
+			},
+			// 保存
+			save() {
+				if (this.checkImproveScheme(this.improveScheme)) return;
+				console.log('this.improveScheme',this.improveScheme);
+				this.$emit('sure', this.improveScheme);
+			},
+			close() {
+				this.$emit('close');
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.modal-view {
+		position: absolute;
+		top: 0;
+		right: 0;
+		bottom: 0;
+		left: 0;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		background: rgba(18, 20, 26, .5);
+
+		.content {
+			width: 562.5rpx;
+			border-radius: 15rpx;
+			background-color: #fff;
+			overflow: hidden;
+
+			.title {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				height: 95rpx;
+				font-size: 25rpx;
+				font-weight: bold;
+				color: #292C33;
+			}
+
+			.label {
+				display: flex;
+				align-items: center;
+				height: 78.75rpx;
+				padding-left: 25rpx;
+				font-size: 22.5rpx;
+				color: #B8BECC;
+			}
+
+			.input-box {
+				border-top: 0.62rpx solid #DADEE6;
+				border-bottom: 0.62rpx solid #DADEE6;
+
+				.input {
+					width: 100%;
+					min-height: 103.12rpx;
+					padding: 0 25rpx;
+					line-height: 26.25rpx;
+					font-size: 22.5rpx;
+					color: #525866;
+					box-sizing: border-box;
+				}
+			}
+
+			.btn-box {
+				display: flex;
+				height: 75rpx;
+
+				.btn {
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					flex: 1;
+					font-size: 22.5rpx;
+					color: #3377FF;
+
+					&:last-child {
+						background-color: #007AFF;
+						color: #fff;
+					}
+				}
+			}
+		}
+	}
 </style>

+ 16 - 7
pages/mission-action/components/pdca.vue

@@ -154,14 +154,17 @@
 			sure(improveScheme) {
 				let requestParams = {
 					improveScheme // 改善方案名称
-				};
+				};
+				// console.log('this.btnInfo.params',this.btnInfo.params);
+				// console.log('this.missionDetails',this.missionDetails);
 				this.btnInfo.params && this.btnInfo.params.map(item => {
 					if (item.valueKey && !item.isEdit) {
 						requestParams[item.paramsKey] = (
 							item.isOutvalueKey ?
 							this.missionDetails :
 							this.btnInfo
-						)[item.valueKey];
+						)[item.valueKey];
+					
 					} else {
 						switch (item.paramsKey) {
 							case 'taskPlan':
@@ -194,18 +197,24 @@
 								break;
 						}
 					}
-				});
-				if (improveScheme) { // 提交
-					requestParams['taskType'] = this.pdcaSetting === 'p' ? 14 : 16;
+				});
+		
+				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;
 					}
-				}
+				}
+				
+				console.log({'3':requestParams});
 				this.$emit('comRequest', requestParams);
 				improveScheme && this.toggleModalVisibile();
 			},

+ 129 - 131
pages/mission-action/components/personnel.vue

@@ -1,133 +1,131 @@
-<template>
-	<view class="personnel-page">
-		<scroll-view class="scroll-y" scroll-y="true">
-			<tm-radio-group
-        type="select"
-			  :list="empDeptList"
-				:defaultValue='desPersopn.empId'
-				:setting="{
-          pName: 'deptName',
-          child: 'responseList',
-				  value: 'empId',
-				  name: 'empName'
-			  }"
-        :openkeys="[0]"
-        @change="changeDesPersopn"
-			/>
-		</scroll-view>
-		<view class="fixed-buttom-btn" @click="sure">
-			<text class="btn-text">确定</text>
-		</view>
-	</view>
-</template>
-
-<script>
-	// 人员架构
-	export default {
-    props: {
-      // 按钮信息 (包过请求的key)
-      btnInfo: {
-        type: Object,
-        default: () => {
-          return {}
-        }
-      },
-      // 任务详情
-      missionDetails: {
-        type: Object,
-        default: () => {
-          return {}
-        }
-      }
-    },
-		data(){
-			return {
-        // 人员列表
-        empDeptList: [],
-        // 接收人信息
-        desPersopn: {}
-			}
-		},
-		created() {
-			uni.setNavigationBarTitle({
-				title: '人员架构'
-      });
-      this.getEmpDeptTree();
-    },
-    methods: {
-      // 更改接收人
-      changeDesPersopn(selectVal, selectData, i, pSelect) {
-        this.desPersopn = {
-          ...selectData,
-          ...pSelect
-        };
-      },
-      // 确定
-      sure() {
-        const { params } = this.btnInfo;
-        let requestParams = {};
-        this.btnInfo.params.map(item => {
-          if(item.valueKey){
-            requestParams[item.paramsKey] = (
-              item.isOutvalueKey
-              ? this.missionDetails
-              : this.btnInfo
-            )[item.valueKey];
-          }else if(item.value){
-            requestParams[item.paramsKey] = item.value;
-          }else {
-            switch(item.paramsKey){
-              case 'receiveEmpId':
-                requestParams[item.paramsKey] = this.desPersopn.empId;
-                break;
-              case 'receiveEmpName':
-                requestParams[item.paramsKey] = this.desPersopn.empName;
-                break;
-              case 'deptId':
-                requestParams[item.paramsKey] = this.desPersopn.deptId;
-                break;
-              case 'deptName':
-                requestParams[item.paramsKey] = this.desPersopn.deptName;
-                break;
-              default:
-                requestParams[item.paramsKey] = '';
-                break;
-            }
-          }
-        });
-        this.$emit('comRequest', requestParams);
-      },
-      // 查询部门人员树
-			getEmpDeptTree() {
-				this.$store.dispatch({
-					type: 'mission/commActions',
-					payload: {
-						key: "getEmpDeptTree"
-					}
-				}).then(data => {
-					if(data) {
-            let _empDeptList = data.map(item1 => {
-              return {
-                ...item1,
-                responseList: item1.responseList ?  item1.responseList.filter(item2 => item2.deptManage == 1) : []
-              }
-            }) || [];
-            _empDeptList = _empDeptList.filter(item => item.responseList.length > 0);
-            this.empDeptList = _empDeptList || [];
-          }
+<template>
+	<view class="personnel-page">
+		<scroll-view class="scroll-y" scroll-y="true">
+			<tm-radio-group type="select" :list="empDeptList" :defaultValue='desPersopn.empId' :setting="{
+          pName: 'deptName',
+          child: 'responseList',
+				  value: 'empId',
+				  name: 'empName'
+			  }" :openkeys="[0]" @change="changeDesPersopn" />
+		</scroll-view>
+		<view class="fixed-buttom-btn" @click="sure">
+			<text class="btn-text">确定</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	// 人员架构
+	export default {
+		props: {
+			// 按钮信息 (包过请求的key)
+			btnInfo: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			},
+			// 任务详情
+			missionDetails: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			}
+		},
+		data() {
+			return {
+				// 人员列表
+				empDeptList: [],
+				// 接收人信息
+				desPersopn: {}
+			}
+		},
+		created() {
+			uni.setNavigationBarTitle({
+				title: '人员架构'
+			});
+			this.getEmpDeptTree();
+		},
+		methods: {
+			// 更改接收人
+			changeDesPersopn(selectVal, selectData, i, pSelect) {
+				this.desPersopn = {
+					...selectData,
+					...pSelect
+				};
+			},
+			// 确定
+			sure() {
+				const {
+					params
+				} = this.btnInfo;
+				let requestParams = {};
+				this.btnInfo.params.map(item => {
+					if (item.valueKey) {
+						requestParams[item.paramsKey] = (
+							item.isOutvalueKey ?
+							this.missionDetails :
+							this.btnInfo
+						)[item.valueKey];
+					} else if (item.value) {
+						requestParams[item.paramsKey] = item.value;
+					} else {
+						switch (item.paramsKey) {
+							case 'receiveEmpId':
+								requestParams[item.paramsKey] = this.desPersopn.empId;
+								break;
+							case 'receiveEmpName':
+								requestParams[item.paramsKey] = this.desPersopn.empName;
+								break;
+							case 'deptId':
+								requestParams[item.paramsKey] = this.desPersopn.deptId;
+								break;
+							case 'deptName':
+								requestParams[item.paramsKey] = this.desPersopn.deptName;
+								break;
+							default:
+								requestParams[item.paramsKey] = '';
+								break;
+						}
+					}
 				});
-			}
-    },
-	}
-</script>
-
-<style lang="less">
-	.personnel-page {
-		height: 100%;
-
-		.scroll-y {
-			height: calc(100% - 87.5rpx);
-			padding-top: 15rpx;
-		}
-	}
+				
+				console.log({'4':requestParams});
+				this.$emit('comRequest', requestParams);
+			},
+			// 查询部门人员树
+			getEmpDeptTree() {
+				this.$store.dispatch({
+					type: 'mission/commActions',
+					payload: {
+						key: "getEmpDeptTree"
+					}
+				}).then(data => {
+					if (data) {
+						let _empDeptList = data.map(item1 => {
+							return {
+								...item1,
+								responseList: item1.responseList ? item1.responseList.filter(item2 => item2
+									.deptManage == 1) : []
+							}
+						}) || [];
+						_empDeptList = _empDeptList.filter(item => item.responseList.length > 0);
+						this.empDeptList = _empDeptList || [];
+					}
+				});
+			}
+		},
+	}
+</script>
+
+<style lang="less">
+	.personnel-page {
+		height: 100%;
+
+		.scroll-y {
+			height: calc(100% - 87.5rpx);
+			padding-top: 15rpx;
+		}
+	}
 </style>

+ 9 - 5
pages/mission-action/components/write-back.vue

@@ -59,7 +59,8 @@
 		created() {
 			uni.setNavigationBarTitle({
 				title: '原因'
-			});
+			});
+			
 			if (this.disabled) {
 				this.value = this.values['textarea'];
 				this.filePath = this.values['filePath'] ? this.values['filePath'].split(',') : [];
@@ -88,8 +89,9 @@
 			},
 			sure() {
 				let requestParams = {};
-				// console.log('this.btnInfo',this.btnInfo);
+
 				let _value = this.value;
+
 				this.btnInfo.params.map(item => {
 					if (item.valueKey) {
 						requestParams[item.paramsKey] = (
@@ -100,10 +102,13 @@
 					} else if (item.value) {
 						requestParams[item.paramsKey] = item.value;
 					} else {
-						// console.log('this.filePath',this.filePath,'item.paramsKey',item.paramsKey);
+
 						switch (item.paramsKey) {
 							case 'improveUrl': // 上传图片
 								requestParams[item.paramsKey] = this.filePath.join(',');
+								break;
+							case 'improveUrl': // 上传图片
+								requestParams[item.paramsKey] = this.filePath.join(',');
 								break;
 							case 'textarea': // 回复内容
 								requestParams[item.paramsKey] = this.value;
@@ -117,8 +122,7 @@
 						}
 					}
 				});
-	            
-				// console.log({requestParams})
+
 				this.$emit('comRequest', requestParams);
 			}
 		}

+ 38 - 9
pages/mission-action/mission-action.vue

@@ -64,16 +64,17 @@
 		},
 		onLoad({
 			details,
-			ifSetImproveEmp
+			ifSetImproveEmp,
+			improveType
 		}) {
 			
 			this.getComponentInfo(details ? JSON.parse(details) : {});
-			this.ifSetImproveEmp = ifSetImproveEmp;
+			this.ifSetImproveEmp = ifSetImproveEmp;
+			this.improveType = improveType;
 		},
 		methods: {
 			// 获取组件信息
-			getComponentInfo(details) {
-				
+			getComponentInfo(details) {
 				const {
 					nextPermission,
 					nextPermissionName,
@@ -89,7 +90,8 @@
 					params
 				} = details;
 				this.currentComponet = componentName;
-				this.disabled = disabled;
+				this.disabled = disabled;
+				this.details = details;
 				if (disabled) { // 查看xx详情
 					let values = {};
 					if (hasAnyData) { // 回显数据由多个key组成
@@ -108,7 +110,8 @@
 						if (item.labelKey) {
 							values[item.labelKey] = details[item.valueKey];
 						}
-					});
+					});
+				
 					this.values = values;
 					// }
 				}
@@ -116,12 +119,37 @@
 			},
 			// 公共改善任务接口
 			comTaskCirculation(data) {
-
+               
+			   
+				if(data.taskPlan.length == 0){
+					 uni.showModal({title: '请填写改善计划!'}); 
+					 return;
+				}
+				if(data.taskDoRequestList.length == 0||data.taskDoRequestList[0].taskDoProcess.length == 0){
+					 uni.showModal({title: '请填写执行过程!'});  
+					 return;
+				}
+				if(data.taskCheckRequestList.length == 0||data.taskCheckRequestList[0].taskCheckProcess.length == 0){
+					 uni.showModal({title: '请填写改善确认!'});   
+					 return;
+				}
+				if(data.taskAction.length == 0){
+					 uni.showModal({title: '请填写对策处置!'});  
+					 return;
+				}
+				
+				
+				
+				
+			
 				this.$store.dispatch({
 					type: 'mission/commActions',
 					payload: {
 						key: "comTaskCirculation",
-						data
+						data:{
+							...data,
+							improveType:this.improveType
+						}
 					}
 				}).then(data1 => {
                     
@@ -131,7 +159,8 @@
 							url:`/pages/mission-details/mission-details?taskId=${taskId}`
 						})
 
-					}
+					}
+					
 				});
 				
 			}

+ 27 - 12
pages/mission-details/mission-details.vue

@@ -100,7 +100,8 @@
 				// 任务id
 				taskId: '',
 				botBtnText: '',
-				// 跳转详情信息
+				// 跳转详情信息,
+				details:{},
 				linkTaskDetails: null
 			}
 		},
@@ -145,11 +146,16 @@
 							taskId: this.taskId
 						}
 					}
-				});
+				}).then((data)=>{
+					  // console.log({'details':data});
+					  if(data){
+						  this.details = data;
+					  }
+				})
 			},
 			// 点击按钮
 			clickBtn(currentInfo, btnInfo) {
-		
+		        console.log({currentInfo, btnInfo});
 				if (btnInfo.componentName) { // 有组件名,则跳转页面
 					if (btnInfo.componentName === 'pdca') {
 						const {
@@ -191,10 +197,12 @@
 						}
 					}
 					uni.navigateTo({
-						url: `/pages/mission-action/mission-action?ifSetImproveEmp=${this.missionDetails.improveEmpId}&details=${encodeURIComponent(JSON.stringify({...currentInfo, ...btnInfo}))}`
+						url: `/pages/mission-action/mission-action?ifSetImproveEmp=${this.missionDetails.improveEmpId}&details=${encodeURIComponent(JSON.stringify({...currentInfo, ...btnInfo}))}&improveType=${this.details.improveType}`
 					});
 				} else { // 直接调接口
-					let requestParams = {};
+					let requestParams = {
+						  improveType:this.missionDetails.improveType
+					};
 					btnInfo.params.map(item => {
 						if (item.valueKey) {
 							requestParams[item.paramsKey] = (
@@ -210,7 +218,10 @@
 				}
 			},
 			// 查看详情
-			goToDetails(currentInfo, detailInfo) {
+			goToDetails(currentInfo, detailInfo) {
+				
+				console.log({currentInfo, detailInfo});
+				
 				if (detailInfo.navigateUrl) { // 跳转其他页面(如查核项详情) 目前hasAnyData都为false
 					const {
 						navigateUrl,
@@ -219,11 +230,11 @@
 						hasAnyData
 					} = detailInfo;
 					uni.navigateTo({
-						url: `${detailInfo.navigateUrl}?id=${(isOutvalueKey ? this.missionDetails : currentInfo)[detailInfo.key]}&checkPointId=${this.missionDetails.checkPointId}`
+						url: `${detailInfo.navigateUrl}?id=${(isOutvalueKey ? this.missionDetails : currentInfo)[detailInfo.key]}&checkPointId=${this.missionDetails.checkPointId}&improveType=${this.details.improveType}`
 					});
 				} else {
 					uni.navigateTo({
-						url: `/pages/mission-action/mission-action?details=${encodeURIComponent(JSON.stringify({...currentInfo, ...detailInfo}))}`
+						url: `/pages/mission-action/mission-action?details=${encodeURIComponent(JSON.stringify({...currentInfo, ...detailInfo}))}&improveType=${this.details.improveType}`
 					});
 				}
 			},
@@ -234,17 +245,20 @@
 			 *  @param {String} rowKey 任务流程中的key
 			 */
 			getContext(obj, isLink, rowKey) {
-				
+						
 				let currentTypeTask = null;
 				if (obj.taskType == 1) {
 					const {
 						checkResult
-					} = this.missionDetails;
+					} = this.missionDetails;
+					
 					currentTypeTask = taskTypeList.find(item => (item.taskType == obj.taskType && item.checkResult ==
 						checkResult)) || {};
 				} else {
 					currentTypeTask = taskTypeList.find(item => item.taskType == obj.taskType) || {};
-				}
+				}
+				
+				
 				if (isLink) {
 					return currentTypeTask[rowKey];
 				} else {
@@ -253,7 +267,8 @@
 						name,
 						key,
 						isOutvalueKey
-					} = currentTypeTask[rowKey] || {};
+					} = currentTypeTask[rowKey] || {};
+					
 					if (hasJoin) { // 需要删除*并替换
 						return name ? name.replace(/x/g, (isOutvalueKey ? this.missionDetails : obj)[key] || '') : ''
 					} else {

+ 1 - 1
pages/mission-details/setting.js

@@ -397,7 +397,7 @@ const taskTypeList = [
           { paramsKey: 'taskType', value: 18}, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
-          { paramsKey: 'approveReason', valueKey: 'approveReason', isOutvalueKey: false } // 原因
+          { paramsKey: 'approveReason', isOutvalueKey: false } // 原因
         ]
       },
       {

+ 24 - 1
pages/mission/components/list-item.vue

@@ -8,7 +8,10 @@
 				<view v-show="!isDetails" :class="['bg-box', isComplete ? 'disabled-bg' : 'hight-bg']">
 					<text>{{isComplete ? '改善结案' : '改善中'}}</text>
 				</view>
-			<text class="title">{{ task.checkItemName }}</text>
+			<text class="title">
+				<text v-if="taskTypeName" class="taskTypeName">{{taskTypeName}}</text>
+			{{ task.checkItemName }}
+			</text>
 	    	<text class="subtitle">{{ task.checkPointName }}</text>
 	    	<view class="row">
 	    		<view class="col">
@@ -53,6 +56,12 @@
 		computed: {
 			bgImage(){
 				return `../../../static/${!this.isComplete ? 'hight' : 'disabled'}-bg.png`;
+			},
+			taskTypeName(){
+				 //改善类型 0 普通 1督查 2自查
+				 if(this.task.improveType == 2 )return '自';
+				 if(this.task.improveType == 1 )return '督';
+				 return null
 			}
 		},
 		methods: {
@@ -103,11 +112,25 @@
 				text-overflow: ellipsis;
 				white-space: nowrap;
 				overflow-x: hidden;
+				.taskTypeName {
+					display: inline-block;
+					color: #fff;
+					margin-right:8rpx;
+					padding: 1.25rpx 2rpx;
+					border-radius: 3rpx;
+					background-color:#ff6680;
+					// text-overflow: ellipsis;
+					// white-space: nowrap;
+					// overflow-x: hidden;
+				}
 			}
             .subtitle {
 				font-size: 12px;
 				color: #666F80;
 				margin:10rpx 0;
+				white-space: nowrap;
+				overflow: hidden;
+				text-overflow: ellipsis;
 			}
 			.row {
 				display: flex;

+ 4 - 2
pages/mission/mission.vue

@@ -6,7 +6,7 @@
 		<view class="radio-group" v-if="permission == 1 || permission == 4">
 			<text :style="checkIndex==1?{background:'#3377ff',color:'#fff'}:{background:'#F5F6FA',color:'#3377ff'}" @click="cheangeRadioIndex(1)">我的单位</text>
 			<text :style="checkIndex==2?{background:'#3377ff',color:'#fff'}:{background:'#F5F6FA',color:'#3377ff'}" @click="cheangeRadioIndex(2)">待处理</text></view>
-	 	<scroll-view class="scroll-y" scroll-y="true">
+	 	<scroll-view class="scroll-y" scroll-y="true" >
 			<list-item
 				v-for="(item, i) in improvingTaskList"
 				:key="item.id"
@@ -133,9 +133,11 @@
 					}
 				}).then(data => {
 					if(data) {
+						
 						// this.improvingTaskList = data.improvingTaskResponses || [];
 						this.improvingTaskList2 = data.improvingTaskResponses || [];
 						this.completeTaskList = data.improveCompleteResponses || [];
+						console.log('this.completeTaskList',this.completeTaskList.length);
 						let hiId = uni.getStorageSync('hiId');
 						let user = uni.getStorageSync('id');
 						let permission = uni.getStorageSync('nowPermission');
@@ -258,7 +260,7 @@
 		}
 	}
 	.scroll-y {
-			height: calc(100% - 100rpx);
+			height: calc(100% - 180rpx);
 
 			.completed-box {
 

+ 7 - 2
pages/model.js

@@ -20,7 +20,10 @@ import batchDistribution from './batchDistribution/model.js';
 import checkMainPoints from './checkMainPoints/model.js';
 import responsibleList from './responsibleList/model.js';
 import selectVisitPerson from './selectVisitPerson/model.js'; 
-import reports from './reports/model.js'
+import reports from './reports/model.js';
+import planDetailList from './planDetailList/model.js';
+import checkGroup from './checkGroup/model.js'
+
 
 
 export default module = {
@@ -47,5 +50,7 @@ export default module = {
   checkMainPoints,
   responsibleList,
   selectVisitPerson,
-  reports
+  reports,
+  planDetailList,
+  checkGroup
 }

+ 20 - 0
pages/planDetailList/model.js

@@ -0,0 +1,20 @@
+import { commServer } from './server.js';
+
+export default {
+  namespaced: true,
+  state: {
+
+  },
+  mutations: {
+	  comChangeState(state, {key, data}) {
+	  	state[key] = data;
+	  },
+  },
+  getters:{},
+  actions: {
+		commActions({ commit, state }, { payload }) {
+			// payload = {key,data} // data是请求数据,key是请求接口id
+             return commServer(payload);
+		},
+  }
+}

+ 120 - 0
pages/planDetailList/planDetailList.vue

@@ -0,0 +1,120 @@
+
+<!-- 自查督查小计划列表  -->
+
+<template>
+	<view class="planDetailList">
+		<view class="list" v-for="item in list" @click="toCheckItemList(item)">
+			  <text class="name">{{item.departmentName}}</text>
+			  <view class="row">
+			  	   <text class="left">得分</text>
+				   <text class="right">{{item.selfScore}}</text>
+			  </view>
+			  <view class="row">
+			  	   <text class="left">改善</text>
+			  	   <text class="right">{{item.improveStatus}}</text>
+			  </view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				list:[]
+			};
+		},
+		onLoad({
+			situationId,
+			num,
+			planType,
+			entry,//点击进来的入口
+		}) {
+			this.situationId = situationId;
+			this.num = num;
+			this.entry = entry;
+			this.planType = planType;
+			
+			this.getData(situationId,num,planType);
+		},
+		methods:{
+			getData(situationId,num,planType){
+				 this.$store.dispatch({
+				 	type: 'planDetailList/commActions',
+				 	payload: {
+				 		key: 'getPlanList',
+				 		data: {
+				 			situationId: situationId,
+							num:num,
+							planType:planType,
+							entry:this.entry
+				 		}
+				 	}
+				 }).then((data)=>{
+					   this.list = data;
+				 })
+			},
+			toCheckItemList(item){
+				uni.navigateTo({
+					url: `/pages/checkMainPoints/checkMainPoints?situationType=${1}&functionId=${item.functionId}&isZichaDucha=${true}&departmentId=${item.departmentId}`
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+    .planDetailList {
+		display: flex;
+		flex-direction: row;
+		flex-wrap: wrap;
+		padding: 25rpx;
+		.list {
+			width: 337.5rpx;
+			height: 175rpx;
+			margin-right: 25rpx;
+			background: #FFFFFF;
+			box-shadow: 0px 3.75rpx 12.5rpx 0px rgba(0,13,51,0.1);
+			border-radius: 5rpx;
+			padding: 25rpx;
+			margin-bottom: 25rpx;
+			.name {
+				display: inline-block;
+				font-size: 30rpx;
+				font-family: SourceHanSansCN-Light, SourceHanSansCN;
+				font-weight: 300;
+				color: #292C33;
+				margin-bottom: 25rpx;
+			}
+			.row {
+				display: flex;
+				flex-direction: row;
+				justify-content: space-between;
+				align-items: center;
+				margin-bottom: 20rpx;
+				.left {
+					font-size: 25rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #666F80;
+				}
+				.right {
+					font-size: 25rpx;
+					font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+					font-weight: 500;
+					color: #292C33;
+				}
+				&:last-child {
+					margin-bottom: 0;
+					.right {
+						color: #3377FF;
+					}
+				}
+			}
+			
+			&:nth-child(2n){
+				margin-right: 0;
+			}
+		}
+	}
+</style>

+ 14 - 0
pages/planDetailList/server.js

@@ -0,0 +1,14 @@
+import { creatRequest } from '../../utils/request.js';
+
+const requestList = {
+	//获取小计划计划列表
+	getPlanList:{
+		method:'GET',
+		url: 'inspector/checkListDetail'
+	},
+
+};
+export const commServer = ({ key, data }) => {
+  let obj = requestList[key];
+  return creatRequest(obj, data);
+}

+ 73 - 26
pages/planList/planList.vue

@@ -65,28 +65,35 @@
 		watch: {
 			ifReloadData(newVal, oldVal) {
 				if (newVal != oldVal) {
-					console.log('更新列表');
 					this.getPlanList();
 				}
 			},
+		},
+		onShow() {
+			this.getPlanList(); //刷新数据
 		},
 		onLoad({
 			situationId,
-			checkGroupId
+			checkGroupId,
+			situationType,
+			systemSituationType,
 		}) { // situationId:情景id checkGroupId: 查核组id
 			this.situationID = situationId;
-			this.checkGroupId = checkGroupId;
-		},
-		created: function() {
+			this.checkGroupId = checkGroupId;
+			this.situationType = situationType;  
+			this.systemSituationType = systemSituationType;
 			this.getPlanList();
 		},
+	
 		methods: {
 			delPlanHandle(data){
 				 this.$store.dispatch({
 				 	type: 'planList/commActions',
 				 	payload: {
 				 		key: 'delOutofPlan',
-				 		data:data.id
+				 		data:{
+							situationId:data.id,
+						}
 				 	}
 				 }).then(()=>{
 					 this.getPlanList();
@@ -95,16 +102,19 @@
 			callback(flage) {
 				this.showModal = false;
 				if (flage && this.planList.length > 0) {
-					this.gotoCheckList(true, this.planList[0]);
+					this.gotoCheckList(true, this.planList[0]);
+					
 				}
 			},
-			getPlanList() {
+			getPlanList() {
+			
 				this.$store.dispatch({
 					type: 'planList/commActions',
-					payload: {
+					payload: {	
 						key: 'planList',
 						data: {
-							situationId: this.situationID
+							situationId: this.situationID,
+							type:this.systemSituationType == 2 ? 1 : 0 ,  //0 普通的   1自查督查
 						}
 					}
 				}).then((data) => {
@@ -125,10 +135,14 @@
 								checkNo: item.checkNo,
 								isCompeleted: item.status == 3 ? true : false,
 								isContinued: item.status == 2 ? true : false,
-								toDistribute: item.toDistribute,
+								toDistribute: item.toDistribute,
+								departmentId:item.departmentId,
+								departmentType:item.departmentType,
+								empList:item.empList,
+								
 							}
 						});
-						if (this.firstFlag == 1) {
+						if (this.firstFlag == 1&&data.length > 0) {
 							this.showModal = true;
 						}
 					}
@@ -140,8 +154,7 @@
 					key: "getDateStr",
 				}).then((dateStr) => {
 					if (dateStr) {
-						if (planList.some((item) => moment(item.startDate).valueOf() < moment(dateStr)
-								.valueOf())) {
+						if (planList.some((item) => moment(item.startDate).valueOf() < moment(dateStr).valueOf())) {
 							this.listHeight = 1200;
 						} else {
 							this.isShowDistribution = true;
@@ -154,24 +167,58 @@
 			 * @param {Boolean} multiple 是否批量编辑
 			 * @param {Number} checkId 查核id
 			 */
-			gotoCheckList(multiple, currentObj) {
+			gotoCheckList(multiple, currentObj) {
+		
 				const {
 					id,
 					startDate,
 					endDate,
 					situationType,
-					checkNo
-				} = currentObj;
+					checkNo,
+					departmentId,
+					departmentType,
+					empList
+				} = currentObj;
+		
 				let _startDate = startDate ? startDate + ' 00:00' : ''; // 计划开始时间
-				let _endDate = endDate ? endDate + ' 23:59' : ''; // 计划结束时间
-				//跳转到查核列表
-				this.$store.commit('planList/comChangeState', {
-					key: 'ifReloadData',
-					data: false
-				});
-				uni.navigateTo({
-					url: `/pages/editCheckList/editCheckList?situationId=${this.situationID}&checkId=${id}&checkGroupId=${this.checkGroupId}&startDate=${_startDate}&endDate=${_endDate}&multiple=${multiple}&situationType=${situationType}&checkNo=${checkNo}`
-				});
+				let _endDate = endDate ? endDate + ' 23:59' : ''; // 计划结束时间
+				
+				if(this.systemSituationType != 2){
+					//非自查督查
+					//跳转到查核列表
+					this.$store.commit('planList/comChangeState', {
+						key: 'ifReloadData',
+						data: false
+					});
+					uni.navigateTo({
+						url: `/pages/editCheckList/editCheckList?situationId=${this.situationID}&checkId=${id}&checkGroupId=${this.checkGroupId}&startDate=${_startDate}&endDate=${_endDate}&multiple=${multiple}&situationType=${situationType}&checkNo=${checkNo}`
+					});
+				}
+				if(this.systemSituationType == 2){
+					//自查督查
+				    let ids = multiple?(this.planList.map(item=>Number(item.id))):[Number(id)];
+					
+					const details = {
+						situationId:this.situationId,
+						endDate:_endDate,
+						startDate:_startDate,
+			            situationType:situationType,
+						isZichaducha:true,
+						departmentId:departmentId,
+						departmentType:departmentType,
+						ids:ids,
+						empId:(empList.map(item=>item.empId)).join(','),
+						empName:(empList.map(item=>item.empName)).join(','),
+					}
+					
+				
+					const _details = encodeURIComponent(JSON.stringify(details))
+
+					uni.navigateTo({
+						url: `/pages/batchDistribution/batchDistribution?multiple=${multiple}&details=${_details}`
+					});
+				}
+				
 			}
 		},
 		components: {

+ 7 - 0
pages/planList/server.js

@@ -27,5 +27,12 @@ export const commServer = ({ key, data }) => {
 		    url: `plan/delCheckTask?checkId=${data}`
 	  },{});
   }
+  if(key=='planList'){
+  	  return creatRequest({
+  		    method:'GET',
+  		    url: `plan/list?situationId=${data.situationId}&type=${data.type}`
+  	  });
+  }
+  
   return creatRequest(obj, data);
 }

+ 23 - 15
pages/responsibleList/responsibleList.vue

@@ -47,8 +47,9 @@
 				isFromCheckMainPoints:false,
 			};
 		},
-		onLoad({deptId,isFromCheckMainPoints,checkId}) {
+		onLoad({deptId,isFromCheckMainPoints,checkId,isZichaDucha}) {
 			this.deptIdTemp = deptId;
+			this.isZichaDucha = isZichaDucha?JSON.parse(isZichaDucha):false;
 			this.isFromCheckMainPoints = isFromCheckMainPoints;
 			if(checkId)this.checkId = checkId
 			this.tabClick(this.currentTabIndex);
@@ -145,9 +146,7 @@
 	
 				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(this.currentTabIndex,this.checkedResponsibleListTemp_all,this.checkedResponsibleListTemp_dept)
-				// console.log({responsibleUserIds,responsibleUserNames});
-				// return;
+			    
 				if(this.isFromCheckMainPoints){
 					//批量保存当事人
 					const {checkMainPoints:{detailList}} = this.$store.state;
@@ -160,6 +159,9 @@
 					const tempCheckIds = detailListFlat(detailList,0);
 					const checkIds = tempCheckIds.map(item=>item.id);
 					
+					
+					
+					
 					this.$store.dispatch({
 					    type: "responsibleList/commActions",
 					    payload: {
@@ -168,6 +170,7 @@
 					         responsibleUserId:responsibleUserIds.join(','),
 							 responsibleUserName:responsibleUserNames.join(','),
 							 checkIds:checkIds,
+							 planType:this.isZichaDucha?1:0,
 					      },
 					    }
 					}).then((data)=>{
@@ -187,17 +190,22 @@
 						  });
 					})
 				}else {
-					this.$store.dispatch({
-					    type: "responsibleList/commActions",
-					    payload: {
-					      key: "bindCheckDetailResponsibleUser",
-					      data: {
-					         responsibleUserId:responsibleUserIds.join(','),
-							 responsibleUserName:responsibleUserNames.join(','),
-							 checkIds:[parseInt(this.checkId)],
-					      },
-					    }
-					});
+					
+					if(!this.isZichaDucha){
+						//非自查督查时提交数据
+						this.$store.dispatch({
+						    type: "responsibleList/commActions",
+						    payload: {
+						      key: "bindCheckDetailResponsibleUser",
+						      data: {
+						         responsibleUserId:responsibleUserIds.join(','),
+								 responsibleUserName:responsibleUserNames.join(','),
+								 checkIds:[parseInt(this.checkId)],
+						      },
+						    }
+						});
+					}
+					
 					this.$store.commit('responsibleList/updateCheckedResponsibleList',this.currentTabIndex == 0?this.checkedResponsibleListTemp_all:this.checkedResponsibleListTemp_dept);
 					uni.navigateBack({
 					    delta: 1

+ 5 - 1
pages/role-switching/role-switching.vue

@@ -24,7 +24,11 @@
 		{permission: 2, name: '查核组长', msg: '个情境待分配'},
 		{permission: 3, name: '查核组员', msg: '个单位待查核'},
 		{permission: 4, name: '单位负责人', msg: '个改善任务待处理'},
-		{permission: 5, name: '改善者', msg: '个改善任务待处理'}
+		{permission: 5, name: '改善者', msg: '个改善任务待处理'},
+		{permission: 6, name: '职能科室负责人', msg: '个改善任务待处理'},
+		{permission: 7, name: '职能科室普通人员', msg: '个改善任务待处理'},
+		{permission: 8, name: '自查人', msg: '个改善任务待处理'},
+		
 	];
 	export default {
 		data() {

+ 1 - 1
pages/selectVisitPerson/selectVisitPerson.vue

@@ -312,7 +312,7 @@
 						deptId: this.deptId
 					}
 				}).then(data => {
-					console.log({data,bool});
+				
 					this.$store.commit('checkMainPoints/comChangeState', {
 						key: 'investigationUsers',
 						data: data

+ 7 - 2
pages/situationDetail/model.js

@@ -3,12 +3,17 @@ import { commServer } from './server.js';
 export default {
   namespaced: true,
   state: {
+	   ifReloadPageData:false
+  },
+  mutations: {
+	   comChangeState(state, {key, data}) {
+	   	state[key] = data;
+	   },
   },
-  mutations: {},
   actions: {
 		commActions({ commit, state }, { payload }) {
 			// payload = {key,data} // data是请求数据,key是请求接口id
-      return commServer(payload);
+            return commServer(payload);
 		},
   }
 }

+ 10 - 5
pages/situationDetail/server.js

@@ -1,11 +1,11 @@
 import { creatRequest } from '../../utils/request.js';
 
 const requestList = {
-  //情境详情
-  situationDetail: {
-    method: 'GET',
-    url: 'situation'
-  },
+	  //情境详情
+	  situationDetail: {
+		method: 'GET',
+		url: 'situation'
+	  },
 	//情境作废
 	situationDelete:{
 		method:'DELETE',
@@ -26,6 +26,11 @@ const requestList = {
 		method:'GET',
 		url: 'plan/unplannedCheck'
 	},
+	//自查督查获取小计划列表
+	getPlanDetailList:{
+		method:'GET',
+		url: 'inspector/checkList'
+	},
 };
 export const commServer = ({ key, data }) => {
   let obj = requestList[key];

+ 205 - 19
pages/situationDetail/situationDetail.vue

@@ -16,12 +16,13 @@
 				<text class="team-text">{{checkGroupName}}</text>
 			</view>
 			<view class="list-box">
-				<view class="check-list" v-show="isCheckImproveShow" @click="gotoCheckPage">
+				<!-- v-show="isCheckImproveShow" -->
+				<view class="check-list" v-show="isChecker"   @click="gotoCheckPage">
 					<image class="check-pic" src="../../static/check-list.png"></image>
 					<text class="list-title">查核列表</text>
 					<text class="list-info">{{checkStatus}}</text>
 				</view>
-				<view class="improve-list" v-show="isCheckImproveShow" @click="gotoImprovePage">
+				<view class="improve-list" v-show="isCheckImproveShow"   @click="gotoImprovePage">
 					<image class="improve-pic" src="../../static/improve-list.png"></image>
 					<text class="list-title">改善列表</text>
 					<text class="list-info">查看改善记录</text>
@@ -37,6 +38,29 @@
 					<text class="info-text">{{description}}</text>
 				</view>
 			</view>
+			<view class="planListWrap" v-if="nowPermission == 1||nowPermission == 6 || nowPermission == 7 || nowPermission == 8">
+				<view class="planList" v-for="(item,index) in zichaduchaList" @click="toCheckGroupPage(item)">
+					  <view class="head">{{item.checkNum}}</view>
+					  <view class="blockWrap">
+							<view class="block">
+									<text class="sup">已查核</text>
+									<text class="sub">{{item.checked}}</text>
+							</view>
+							<view class="block">
+									<text class="sup">待改善</text>
+									<text class="sub">{{item.preImprove}}</text>
+							</view>
+							<view class="block">
+									<text class="sup">已改善</text>
+									<text class="sub">{{item.improved}}</text>
+							</view>
+							<view class="block" v-if="nowPermission != 8">
+									<text class="sup">自查</text>
+									<text class="sub" style="color:#3377FF;" @click.stop="gotoDetail(item)">明细</text>
+							</view>
+					  </view>
+				</view>
+			</view>
 		</view>
 		<view class="button-box">
 			<view class="btn-left btn-item" @click="delSituation" v-show="isAdmin">
@@ -45,7 +69,7 @@
 			<view class="btn-right btn-item" @click="editSituation('PUT')" v-show="canEdit">
 				<text class="right-text">编辑</text>
 			</view>
-			<view class="btn-center btn-item" v-show="isChecker" @click="startUnplanned">
+			<view class="btn-center btn-item" v-show="ifShowUnplanedBtn" @click="startUnplanned">
 				<text class="center-text">开始一次计划外查核</text>
 			</view>
 			<view class="btn-left btn-item" v-show="isUnplanned" @click="createCheck">
@@ -54,6 +78,9 @@
 			<view class="btn-right btn-item" v-show="isUnplanned" @click="startCheck">
 				<text class="right-text">提前开始一个计划内查核</text>
 			</view>
+			<view class="btn-right btn-item" @click="planSetting" v-show="ifShowPlanSetBtn">
+				<text class="right-text">计划设置</text>
+			</view>
 		</view>
 		<popup ref="popup" :situationID="situationID"></popup>
 		<tm-callback-listpage/>
@@ -63,6 +90,9 @@
 <script>
 	import popup from './components/bottom-popup.vue';
 	import {dateHandle} from "../../utils/dateHandle.js";
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
@@ -83,36 +113,56 @@
 				isCheckImproveShow:false,//查核改善列表是否显示
 				isStartEndTimeShow:false,//距离情境开始或结束时间是否显示
 				isAdmin:false,//是否为管理员
-				isCheckLeader:false,//是否为查核组长
+				isCheckLeader:false,//是否为查核组长或职能科室负责人
 				isChecker:false,//是否为查核者
 				isUnplanned:false,//是否计划外查核
 				checkFlag:'',//计划查核标志,是新建还是提前开始
 				checkID:'',//新建查核计划时,计划列表中的前一个计划 id
-        checkItemList:[],//时间区间包含当前时间的item
-        checkGroupId: 0, // 查核组id
+                checkItemList:[],//时间区间包含当前时间的item
+                checkGroupId: 0, // 查核组id
+				zichaduchaList:[],//自查督查明细
+				ifShowUnplanedBtn:false,//是否展示计划外查核按钮
+				ifShowPlanSetBtn:false,//是否展示计划设置按钮
+				
 			}
 		},
 		computed: {
+			...mapState({
+				ifReloadPageData: state => state.situationDetail.ifReloadPageData,
+			}),
 			canEdit: function() {
 				return this.compareTime(this.firstCheckTime) && this.isAdmin && this.allowEdit;
 			}
 		},
-		onLoad({ situationId }){ // situationId:情景id
+		watch:{
+			ifReloadPageData(cur,prev){
+				if(cur){
+					this.getPlanDetailList();
+				}
+			}
+		},
+		onLoad({ situationId,systemSituationType}){ // situationId:情景id,systemSituationType 情境类型
 		  this.situationID=situationId;
+		  this.systemSituationType = systemSituationType;
+		  this.getPlanDetailList();
 		},
 		created: function() {
 			this.nowPermission=uni.getStorageSync('nowPermission');
 			this.isAdmin=this.nowPermission==1?true:false;
-			this.isCheckLeader=this.nowPermission==2?true:false;
-			this.isChecker=this.nowPermission==3?true:false;
+			this.isCheckLeader=this.nowPermission==2||this.nowPermission==6||this.nowPermission==4?true:false;
+			this.isChecker=this.nowPermission==3||this.nowPermission==1||this.nowPermission==7||this.nowPermission==8?true:false;
 			this.isStartEndTimeShow=this.nowPermission==2||this.nowPermission==3?true:false;
-			this.isCheckImproveShow=this.nowPermission==1||this.nowPermission==4||this.nowPermission==3?true:false;
+			this.isCheckImproveShow=this.nowPermission==1||this.nowPermission==4||this.nowPermission==3||this.nowPermission==6||this.nowPermission==7||this.nowPermission==8?true:false;
+			this.ifShowUnplanedBtn = this.nowPermission==3?true:false;
+			this.ifShowPlanSetBtn = this.nowPermission==6?true:false;
+		
 			this.$store.dispatch({
 				type: 'situationDetail/commActions',
 				payload: {
 					key: 'situationDetail',
 					data:{
-						id: this.situationID
+						id: this.situationID,
+						systemSituationType:this.systemSituationType,
 					}
 				}
 			}).then((data) => {
@@ -133,10 +183,26 @@
 				  this.firstCheckTime=data.firstCheckTime;
 				  this.checkGroupId = data.checkGroupId;
 				  this.allowEdit = data.allowEdit;
+				  this.currentNum = data.currentNum;
 				}
 			});
 		},
 		methods: {
+			gotoDetail(data){
+				//跳转明细列表
+		        
+				uni.navigateTo({url:`/pages/planDetailList/planDetailList?situationId=${this.situationID}&num=${data.num}&planType=${1}&systemSituationType=${this.systemSituationType}&entry=${1}`}); //entry 入口  0 查核列表  1 自查
+			},
+			planSetting(){
+				//计划设置
+				uni.navigateTo({url: `/pages/creatingSituations/creatingSituations?actTarget=planSet&situationId=${this.situationID}&themeName=${this.name}&systemSituationType=${this.systemSituationType}`});
+			},
+			toCheckGroupPage(itemData){
+				//自查督查情境跳转到查核列表
+				uni.navigateTo({
+					url: `/pages/checkGroup/checkGroup?situationId=${this.situationID}&num=${itemData.num}&planType=${0}&name=${itemData.checkNum}&systemSituationType=${this.systemSituationType}&entry=${0}`
+				});
+			},
 			delSituation(){
 				uni.showModal({
 					title:'提示',
@@ -148,7 +214,8 @@
 								payload: {
 									key: 'situationDelete',
 									data:{
-										id:this.situationID
+										id:this.situationID,
+										systemSituationType:this.systemSituationType
 									}
 								}
 							}).then((data) => {
@@ -198,21 +265,51 @@
 				}
 			},
 			gotoCheckPage(){
-				//跳转到查核列表
-				uni.navigateTo({
-					url: `/pages/checkList/checkList?situationId=${this.situationID}&situationType=${this.situationType}`
-				});
+				if(this.systemSituationType != 2){
+					 //普通情境跳转到查核列表
+					 uni.navigateTo({
+					 	url: `/pages/checkList/checkList?situationId=${this.situationID}&situationType=${this.situationType}`
+					 });
+				}else{
+					//自查督查情境跳转到查核列表
+					if(this.systemSituationType == 2&&this.nowPermission!=4){
+						//自查督查非单位负责人
+						 let planType = 0;  //默认督查
+						 if(this.nowPermission == 4 || this.nowPermission == 8){
+							   planType = 1;
+						 }
+						 uni.navigateTo({
+						 	url: `/pages/checkGroup/checkGroup?situationId=${this.situationID}&num=${this.currentNum?this.currentNum:0}&planType=${planType}&name=${this.checkStatus}&situationType=${this.situationType}&systemSituationType=${this.systemSituationType}&entry=${0}`
+						 });
+					}
+					if(this.systemSituationType == 2&&this.nowPermission==4){
+						//自查督查单位负责人
+						uni.navigateTo({
+							url: `/pages/planList/planList?situationId=${this.situationID}&systemSituationType=${this.systemSituationType}`
+						});
+					}
+				}
+				
 			},
 			gotoImprovePage(){
 				//跳转到改善列表
 				uni.navigateTo({
-					 url: `/pages/improve-mission-list/improve-mission-list?situationId=${this.situationID}`
+					 url: `/pages/improve-mission-list/improve-mission-list?situationId=${this.situationID}&systemSituationType=${this.systemSituationType}`
 				});
 			},
 			gotoPlanPage(){
 				//跳转到计划列表
+				if(this.systemSituationType == 2 && this.firstCheckTime && this.nowPermission == 6){
+					//当自查督查情境详情已经设置过计划时,职能科室负责人不允许再设置
+					uni.showModal({
+						title:'提示',
+						content:'计划已设置,无需再次设置!',
+					    showCancel:false
+					})
+					return;
+				}
 				uni.navigateTo({
-					url: `/pages/planList/planList?situationId=${this.situationID}&checkGroupId=${this.checkGroupId}`
+					url: `/pages/planList/planList?situationId=${this.situationID}&checkGroupId=${this.checkGroupId}&systemSituationType=${this.systemSituationType}`
 				});
 			},
 			startUnplanned(){
@@ -222,6 +319,28 @@
 			startCheck(){
 				this.$refs.popup.show();
 			},
+			getPlanDetailList(){
+				if(this.systemSituationType == 2){
+					   //自查督查时才需要获取查核明细列表
+					   this.$store.dispatch({
+					   	type: 'situationDetail/commActions',
+					   	payload: {
+					   		key: 'getPlanDetailList',
+					   		data:{
+					   			situationId:this.situationID
+					   		}
+					   	}
+					   }).then((data) => {
+							if(data){
+								 this.zichaduchaList = data;
+							}
+							this.$store.commit('situationDetail/comChangeState', {
+								key: 'ifReloadPageData',
+								data: false
+							});
+					   })
+				}
+			},
 			createCheck(){
 				this.$store.dispatch({
 					type: 'situationDetail/commActions',
@@ -271,7 +390,8 @@
 		height: 100%;
 		.copy-btn {
 			border: 0;
-			height: 50rpx;
+			height: 60rpx;
+			margin-bottom: 10rpx;
 			&::after {
 				border: 0;
 			}
@@ -383,6 +503,10 @@
 						top: 40rpx;
 					}
 					.list-info{
+						width: 225rpx;
+						overflow: hidden;
+						white-space: nowrap;
+						text-overflow: ellipsis;
 						font-size: 17.5rpx;
 						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
 						font-weight: 400;
@@ -390,6 +514,7 @@
 						position: absolute;
 						left: 145rpx;
 						top: 80rpx;
+						
 					}
 				}
 				.improve-list{
@@ -413,6 +538,10 @@
 						left: 458.75rpx;
 					}
 					.list-info{
+						width: 225rpx;
+						overflow: hidden;
+						white-space: nowrap;
+						text-overflow: ellipsis;
 						font-size: 17.5rpx;
 						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
 						font-weight: 400;
@@ -443,6 +572,10 @@
 						top: 40rpx;
 					}
 					.list-info{
+						width: 225rpx;
+						overflow: hidden;
+						white-space: nowrap;
+						text-overflow: ellipsis;
 						font-size: 17.5rpx;
 						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
 						font-weight: 400;
@@ -469,6 +602,59 @@
 					}
 				}
 			}
+			.planListWrap {
+				padding: 0 25rpx;
+				padding-bottom: 31.25rpx;
+				.planList {
+					display: flex;
+					flex-direction: row;
+					width:100%;
+					height:100rpx;
+					padding: 10rpx;
+					margin-bottom: 15rpx;
+					background: #F5F6FA;
+					border-radius: 10rpx;
+					.head {
+						display: flex;
+						justify-content: center;
+						align-items: center;
+						width: 145rpx;
+						height: 80rpx;
+						font-size: 25rpx;
+						font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+						font-weight: 500;
+						color: #FFFFFF;
+						border-bottom-right-radius:20rpx;
+						background-color: #66B2FE;
+					}
+					.blockWrap {
+						 display: flex;
+						 width: 100%;
+						 flex-direction: row;
+						 justify-content: space-around;
+						 .block {
+						 	display: flex;
+						 	flex-direction: column;
+						 	justify-content: center;
+						 	align-items: center;
+						 	.sup {
+						 		font-size: 17.5rpx;
+						 		font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						 		font-weight: 400;
+						 		color: #666F80;
+						 		padding-bottom: 15rpx;
+						 	}
+						 	.sub {
+						 		font-size: 25rpx;
+						 		font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+						 		font-weight: 500;
+						 		color: #292C33;
+						 	}
+						 }
+					}
+				}
+				
+			}
 		}
 		.button-box{
 			display: flex;

+ 8 - 1
pages/situationsCenter/model.js

@@ -3,8 +3,15 @@ import { commServer } from './server.js';
 export default {
   namespaced: true,
   state: {
+	   currentSelectedSituation:{
+		   systemSituationType:0,
+	   },
+  },
+  mutations: {
+	  comChangeState(state, {key, data}) {
+	  	state[key] = data;
+	  },
   },
-  mutations: {},
   actions: {
 		commActions({ commit, state }, { payload }) {
 			// payload = {key,data} // data是请求数据,key是请求接口id

+ 688 - 499
pages/situationsCenter/situationsCenter.vue

@@ -1,500 +1,689 @@
-<template>
-	<!-- <page-meta :root-font-size="getRootFontSize()"></page-meta> -->
-  <view class="situationsCenter-page">
-	<!-- <app-update url="123"  ref="appUpdate" ></app-update> -->
-    <view class="calender-remind" @click="toMessagePage">
-      <image
-        :src="`/static/message-${messageType ? 'unread' : 'read'}.png`"
-      ></image>
-    </view>
-	<view class="search-box" :style="{top:statusBarHeight==0?50:statusBarHeight}">
-	  <view
-	    class="search-model"
-	    @click="openSearchBar"
-	    v-show="isSearchBoxShow"
-	  >
-	    <image class="search-pic" src="/static/search.png"></image>
-	  </view>
-	  <view class="search-bar" v-show="isSearchBarShow">
-	    <view class="search-item">
-	      <image class="search-pic" src="/static/search.png"></image>
-	      <image
-	        class="text-clear"
-	        @click="valueEmpty"
-	        src="/static/text-clear.png"
-	      ></image>
-	      <input
-	        class="searh-input"
-	        v-model="inputValue"
-	        @confirm="searchByKeywords($event)"
-	        placeholder="搜索项目"
-	        placeholder-style="font-weight: 400,color: #A1A7B3"
-	      />
-	    </view>
-	    <text class="cancel-text" @click="closeSearchBar">取消</text>
-	  </view>
-	</view>
-    <view class="situation-list">
-
-      <scroll-view
-        class="scroll-box"
-        scroll-y="true"
-        @scrolltolower="toLower"
-        lower-threshold="5"
-      >
-        <view class="content" :style="[situationList.length === 0 ?{height:'100%'}:{}]">
-          <view
-            class="situation"
-            v-for="(item, index) in situationList"
-            :key="item.id"
-            @click="gotoDetail(item.situationID)"
-          >
-            <image
-              class="situation-topic"
-              :src="`/static/${
-                item.topic ? 'situation-case' : 'situation-system'
-              }.png`"
-            ></image>
-            <view class="title">
-              <text class="title-name">{{ item.name }}</text>
-            </view>
-            <view class="check-group">
-              <text class="group-text">
-                {{
-                  nowPermission == 2
-                    ? "剩余" + (item.toDistributeCount || 0) + "个待分配"
-                    : item.checkGroupName
-                }}</text
-              >
-            </view>
-            <view class="row">
-              <image
-                class="situation-check"
-                src="/static/situation-check.png"
-              ></image>
-              <text class="text">{{ item.checkStatus }}</text>
-            </view>
-            <view class="row">
-              <image
-                class="situation-time"
-                src="/static/situation-time.png"
-              ></image>
-              <text class="text">{{ item.nextCheckTime }}</text>
-            </view>
-          </view>
-					<tm-no-data v-if="situationList.length === 0" 
-						:textArr="['还没有情境', '快点击右下方按钮新建一个吧']" />
-        </view>
-      </scroll-view>
-    </view>
-    <view v-if="nowPermission == 1" class="situaions-add" @click="gotoCreate">
-      <image class="add-pic" src="/static/situation-add.png"></image>
-    </view>
-    <tm-tabbar :permission="nowPermission" />
-  </view>
-</template>
-/**
- * 情境中心
- */
-<script>
-import websocket from "../../utils/ws.js"; //引入websocket
-import {wsURL} from "../../utils/requestUrl.js";
-// import appUpdate from "@/components/app-update/app-update.vue"
-
-export default {
-  data() {
-    return {
-      page: 1, //页数
-      inputValue: "",
-      nowPermission: "",
-      isSearchBarShow: false, //搜索栏是否可见
-      isSearchBoxShow: true, //搜索图标是否可见
-      situationList: [], //情境卡片列表
-      totalCount: "", //返回数据的总条数
-      refTimer: null,
-      isInitWs: null,
-      messageType: null,
-      num: 1,
-	  // showUpdatePop:false,
-      timer: null,
-      // ws接口参数
-      initParams: {}
-    };
-  },
-  // components:{appUpdate},
-  created: function () {
-    this.nowPermission = uni.getStorageSync("nowPermission");
-    this.init(true);
-    this.refTimer = setInterval(() => {
-      this.isInitWs = websocket.ws ? false : true;
-      const {hiId, user, permission} = this.initParams;
-      this.isInitWs && this.initWebsocket(hiId, user, permission);
-    }, 3 * 60 * 1000);
-    // this.messStatus();
-  },
-  beforeDestroy() {
-    // 关闭ws连接
-    websocket.close();
-    clearInterval(this.refTimer);
-    clearTimeout(this.timer);
-  },
-  computed:{
-	  statusBarHeight(){
-		   const {statusBarHeight} = uni.getSystemInfoSync();
-		   return statusBarHeight;
-	  }
-  },
-  mounted() {
-
-  },
-  methods: {
-    openSearchBar() {
-      this.isSearchBarShow = true;
-      this.isSearchBoxShow = false;
-    },
-    closeSearchBar() {
-      this.isSearchBarShow = false;
-      this.isSearchBoxShow = true;
-    },
-    valueEmpty() {
-      this.inputValue = "";
-    },
-    gotoCreate() {
-      uni.navigateTo({
-        url: "/pages/creatingSituations/creatingSituations",
-      });
-    },
-    gotoDetail(id) {
-      uni.navigateTo({
-        url: `/pages/situationDetail/situationDetail?situationId=${id}`,
-      });
-    },
-    getSituationList(data, callback) {
-      this.$store
-        .dispatch({
-          type: "situationsCenter/commActions",
-          payload: {
-            data,
-            key: "situationList",
-          },
-        })
-        .then((data) => {
-          if (data) callback(data);
-        });
-    },
-    searchByKeywords(event) {
-      let data = {
-        pageNum: 1,
-        pageSize: 300,
-        keyword: event.target.value,
-      };
-      this.getSituationList(data, (data) => {
-        this.situationList = [];
-        this.createSituationList(data.list);
-      });
-    },
-    createSituationList(list = []) {
-      list.map((item, index) => {
-        this.situationList.push({
-          name: item.name,
-          checkStatus: item.checkStatus,
-          nextCheckTime: item.nextCheckTime,
-          checkGroupName: item.checkGroupName,
-          topic: item.topic == 0 ? true : false,
-          situationID: item.id,
-          toDistributeCount: item.toDistributeCount,
-        });
-      });
-    },
-    toLower() {
-	  console.log('toLower');
-      uni.showToast({
-        title: "加载中....",
-        icon: "loading",
-        duration: 2000,
-      });
-      let count = this.situationList.length;
-	  console.log(this.totalCount,count);
-      if (this.totalCount != count) {
-        this.page++;
-        let data = {
-          pageNum: this.page,
-          pageSize: 300,
-        };
-        this.getSituationList(data, (data) => {
-          this.createSituationList(data.list);
-          let hiId = uni.getStorageSync("hiId");
-          let user = uni.getStorageSync("id");
-          let permission = uni.getStorageSync("nowPermission");
-          this.initParams = {
-            hiId,
-            user,
-            permission
-          };
-          this.isInitWs && this.initWebsocket(hiId, user, permission);
-        });
-      } else {
-        uni.showToast({
-          title: "没有更多数据了",
-          icon: "none",
-          duration: 1000,
-        });
-      }
-    },
-    toMessagePage() {
-      // this.messageType = false;
-      uni.navigateTo({
-        url: `/pages/messages/messages`,
-      });
-    },
-    init(isInitWs) {
-      this.isInitWs = isInitWs;
-      this.initSituationList();
-    },
-    initWebsocket(hiId, user, permission) {
-      websocket.url = wsURL(hiId, user, permission);
-      websocket.createWebSocket(this.resolverWsData.bind(this));
-    },
-    // 解析websocket返回数据
-    resolverWsData(type) {
-      let types = JSON.parse(type);
-      switch (types.type) {
-        case "TO_READ":
-          this.messageType = true;
-          break;
-        default:
-          this.messageType = false;
-          break;
-      }
-    },
-    initSituationList() {
-      let data = {
-        pageNum: 1,
-        pageSize: 300,
-      };
-      this.getSituationList(data, (data) => {
-        this.totalCount = data.totalCount;
-        this.createSituationList(data.list);
-        let hiId = uni.getStorageSync("hiId");
-        let user = uni.getStorageSync("id");
-        let permission = uni.getStorageSync("nowPermission");
-        this.initParams = {
-          hiId,
-          user,
-          permission
-        };
-        this.isInitWs && this.initWebsocket(hiId, user, permission);
-      });
-    },
-    // messStatus(){
-    // 	let num = 1;
-    // 	let timer = setInterval(()=>{
-    // 	  this.$store.dispatch({
-    // 		  type: "calendar/commActions",
-    // 		  payload: {
-    // 			key: "messagesList",
-    // 			data: {
-    // 			  pageNum: num,
-    // 			  pageSize: 100,
-    // 			},
-    // 		  },
-    // 		}).then((res)=>{
-    // 			if(res && res.list.length == 0){
-    // 				clearInterval(timer)
-    // 			}else if(res && res.list.length != 0){
-    // 				res.list.map((item)=>{
-    // 					if(!item.readStatus){
-    // 						this.messageType = true;
-    // 						return;
-    // 					}
-    // 				})
-    // 			}
-    // 		})
-    // 	  num++;
-    // 	},200)
-    // }
-  },
-};
-</script>
-
-<style lang="less">
-
-.situationsCenter-page {
-  height: 100%;
-  .calender-remind {
-    width: 62.5rpx;
-    height: 62.5rpx;
-    position: fixed;
-	top:20rpx;
-    right: 25rpx;
-    background: rgba(255, 255, 255, 0.95);
-    border-radius: 50%;
-    z-index: 2;
-    image {
-      margin-left: 17.5rpx;
-      margin-top: 16.87rpx;
-      width: 27.5rpx;
-      height: 28.75rpx;
-    }
-  }
-  .search-box {
-    position: fixed;
-	top:20rpx;
-    left: 25rpx;
-    z-index: 2;
-    .search-model {
-      height: 62.5rpx;
-      width: 62.5rpx;
-      background-color: #ffffff;
-      text-align: center;
-      border-radius: 50%;
-      box-shadow: 0px 10px 10px 0px rgba(217, 221, 228, 0.5);
-      border: 1px solid #e6eaf2;
-      opacity: 0.85;
-      .search-pic {
-        width: 27.5rpx;
-        height: 27.5rpx;
-        margin-top: 17.5rpx;
-      }
-    }
-    .search-bar {
-      background-color: #ffffff;
-      width: 700rpx;
-      height: 62.5rpx;
-      top:0rpx;
-      position: absolute;
-      z-index: 2;
-      .search-item {
-        background-color: #ffffff;
-        width: 593.75rpx;
-        height: 62.5rpx;
-        float: left;
-        border-radius: 6.25rpx;
-        border-right: 1.25rpx solid #f0f2f7;;
-        .search-pic {
-          width: 21.87rpx;
-          height: 21.87rpx;
-          margin-left: 12.5rpx;
-          margin-top: 20.62rpx;
-          float: left;
-        }
-        .searh-input {
-          background-color: #ffffff;
-          width: 525rpx;
-          height: 55rpx;
-          font-size: 22.5rpx;
-          float: right;
-          margin-top: 3.75rpx;
-          margin-left: 3.12rpx;
-        }
-        .text-clear {
-          width: 21.87rpx;
-          height: 21.87rpx;
-          float: right;
-          margin-top: 20.62rpx;
-          margin-right: 6.25rpx;
-        }
-      }
-      .cancel-text {
-        font-size: 22.5rpx;
-        line-height: 62.5rpx;
-        color: #a1a7b3;
-        margin-right: 31.25rpx;
-        float: right;
-      }
-    }
-  }
-  
-  .situation-list {
-    position: relative;
-    height: 100%;
-    .scroll-box {
-      width: 100%;
-      height: calc(100% - 87.5rpx);
-      .content {
-        display: flex;
-        flex-flow: row wrap;
-        padding-bottom: 100rpx;
-        .situation {
-          height: 187.5rpx;
-          width: 337.5rpx;
-          background: #ffffff;
-          box-shadow: 0px 6px 20px 0px rgba(0, 13, 51, 0.1);
-          border-radius: 8px;
-          margin-left: 25rpx;
-          margin-top: 25rpx;
-
-          .situation-topic {
-            width: 62.5rpx;
-            height: 25rpx;
-            float: right;
-          }
-          .title {
-            height: 22.5rpx;
-            margin-left: 20rpx;
-            margin-top: 25rpx;
-            display: flex;
-            align-items: center;
-            .title-name {
-			  width: 300rpx;
-              font-size: 22.5rpx;
-              font-family: SourceHanSansCN-Bold, SourceHanSansCN;
-              font-weight: bold;
-              color: #292c33;
-			  overflow:hidden; //超出的文本隐藏
-			  text-overflow:ellipsis; //溢出用省略号显示
-			  white-space:nowrap; //溢出不换行
-
-            }
-          }
-          .check-group {
-            margin-left: 20rpx;
-            margin-top: 15rpx;
-            margin-bottom: 25rpx;
-            height: 17.5rpx;
-            display: flex;
-            align-items: center;
-            .group-text {
-              font-size: 17.5rpx;
-              font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-              font-weight: 400;
-              color: #666e80;
-            }
-          }
-          .row {
-            margin-left: 20rpx;
-            margin-bottom: 17.5rpx;
-            display: flex;
-            align-items: center;
-            height: 20rpx;
-            .situation-check {
-              width: 20rpx;
-              height: 20rpx;
-            }
-            .situation-time {
-              width: 20rpx;
-              height: 20rpx;
-            }
-            .text {
-              font-size: 20rpx;
-              font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-              font-weight: 400;
-              color: #292c33;
-              margin-left: 11.25rpx;
-            }
-          }
-        }
-      }
-    }
-  }
-  .situaions-add {
-    position: fixed;
-    right: 25rpx;
-    bottom: 130rpx;
-    .add-pic {
-      width: 75rpx;
-      height: 75rpx;
-    }
-  }
-}
+<template>
+	<view class="situationsCenter-page">
+		<tmNavbar @onsearchChange="onsearchChangehandle" :is-back="false" @checkMessage="checkMessageHandle"
+			:titleMod="nowPermission == 6||nowPermission == 4||nowPermission ==7||nowPermission == 8?'Filter':'Normal'"
+			:filterKeys="filterKeys" :isShowFilter="true" :messageStatus="true" :isShowSearch="true"
+			@filterClick="filterClickHandle" :title="pageTitle" title-color="#292C33"></tmNavbar>
+
+		<view class="situation-list">
+
+			<scroll-view class="scroll-box" scroll-y="true" @scrolltolower="toLower" lower-threshold="5">
+				<view class="content" :style="[situationList.length === 0 ?{height:'100%'}:{}]">
+					<view class="situation" v-for="(item, index) in situationList" :key="item.id"
+						@click="gotoDetail(item.situationID,item.systemSituationType,item)">
+						<!-- <image v-if="item.systemSituationType != 2" class="situation-topic" :src="`/static/${
+                item.topic ? 'situation-case' : 'situation-system'
+              }.png`"></image> -->
+
+						<view v-if="item.systemSituationType == 2&&nowPermission !=1 " :class="getClass(item)">
+							{{situationStatusName(item)}}</view>
+
+						<view :class="situationTypeName(item,0)"
+							v-if="nowPermission !=4&&nowPermission !=7&&nowPermission !=8&&nowPermission !=6 ">
+							{{situationTypeName(item,1)}}</view>
+
+						<view class="title">
+							<text class="title-name">{{ item.name }}</text>
+						</view>
+						<view class="check-group">
+							<text class="group-text">
+								{{
+                  nowPermission == 2
+                    ? "剩余" + (item.toDistributeCount || 0) + "个待分配"
+                    : item.checkGroupName
+                }}</text>
+						</view>
+						<view class="row">
+							<image class="situation-check" src="/static/situation-check.png"></image>
+							<text class="text">{{ item.checkStatus }}</text>
+						</view>
+						<view class="row">
+							<image class="situation-time" src="/static/situation-time.png"></image>
+							<text class="text">{{ item.nextCheckTime }}</text>
+						</view>
+					</view>
+					<tm-no-data v-if="situationList.length === 0" :textArr="['还没有情境', '快点击右下方按钮新建一个吧']" />
+				</view>
+			</scroll-view>
+		</view>
+		<view v-if="nowPermission == 1" class="situaions-add" @click="gotoCreate">
+			<image class="add-pic" src="/static/situation-add.png"></image>
+		</view>
+		<tm-tabbar :permission="nowPermission" />
+	</view>
+</template>
+/**
+* 情境中心
+*/
+<script>
+	import websocket from "../../utils/ws.js"; //引入websocket
+	import tmNavbar from "@/components/tm-navbar/tm-navbar.vue";
+	import {
+		wsURL
+	} from "../../utils/requestUrl.js";
+	// import appUpdate from "@/components/app-update/app-update.vue"
+
+	export default {
+		components: {
+			tmNavbar
+		},
+		data() {
+			return {
+
+				page: 1, //页数
+				inputValue: "",
+				nowPermission: "",
+				isSearchBarShow: false, //搜索栏是否可见
+				isSearchBoxShow: true, //搜索图标是否可见
+				situationList: [], //情境卡片列表
+				copied_situationList: [], //复制情境卡片列表 用于筛选
+				totalCount: "", //返回数据的总条数
+				refTimer: null,
+				isInitWs: null,
+				messageType: null,
+				num: 1,
+				pageTitle: '情境中心',
+				// showUpdatePop:false,
+				timer: null,
+				// ws接口参数
+				initParams: {},
+
+			};
+		},
+		// components:{appUpdate},
+		created: function() {
+			this.nowPermission = uni.getStorageSync("nowPermission");
+			this.init(true);
+			this.refTimer = setInterval(() => {
+				this.isInitWs = websocket.ws ? false : true;
+				const {
+					hiId,
+					user,
+					permission
+				} = this.initParams;
+				this.isInitWs && this.initWebsocket(hiId, user, permission);
+			}, 3 * 60 * 1000);
+
+			// this.messStatus();
+		},
+		beforeDestroy() {
+			// 关闭ws连接
+			websocket.close();
+			clearInterval(this.refTimer);
+			clearTimeout(this.timer);
+		},
+		computed: {
+			statusBarHeight() {
+				const {
+					statusBarHeight
+				} = uni.getSystemInfoSync();
+				return statusBarHeight;
+			},
+			filterKeys() {
+
+				const list = [{
+						text: '全部',
+						checked: true,
+						key: '0'
+					},
+					{
+						text: '已完成',
+						checked: false,
+						key: '6'
+					},
+					{
+						text: '进行中',
+						checked: false,
+						key: '2'
+					},
+					{
+						text: '待分配',
+						checked: false,
+						key: '4'
+					}
+				];
+				
+				return list;
+
+				// const modify = (key) => {
+				// 	const _list = list.map(a => {
+				// 		if (a.key == key) {
+				// 			return {
+				// 				...a,
+				// 				checked: true
+				// 			}
+				// 		} else {
+				// 			return {
+				// 				...a,
+				// 				checked: false
+				// 			}
+				// 		}
+				// 	});
+				// 	return _list;
+				// }
+
+				// if (this.nowPermission == 6) {
+				// 	//职能科室负责人
+				// 	return modify(1);
+				// }
+				// if (this.nowPermission == 6) {
+				// 	//职能科室负责人
+				// 	return modify(4);
+				// }
+
+			}
+
+		},
+		mounted() {
+
+		},
+		methods: {
+			filterClickHandle(filterData) {
+				console.log({filterData});
+
+				if (filterData.key != 0) {
+					const _situationList = this.copied_situationList.filter(item => item.situationStatus == Number(
+						filterData.key));
+					console.log({
+						_situationList,
+						filterData,
+						'this.copied_situationList':this.copied_situationList,'this.situationList':this.situationList
+					});
+					this.situationList = _situationList;
+				} else {
+					this.initSituationList();
+				}
+
+			},
+			situationStatusName(item) {
+
+				if (item.situationStatus == 2) {
+					return '进行中'
+				}
+				if (item.situationStatus == 6) {
+					return '全部完成'
+				}
+				if (item.situationStatus == 4) {
+					return '待分配'
+				}
+				if (item.situationStatus == 5) {
+					return '已完成'
+				}
+
+				return null
+
+			},
+			situationTypeName(item, type) {
+
+				if (item.systemSituationType == 0) {
+					return type == 1 ? '个案' : 'Mark case'
+				}
+				if (item.systemSituationType == 1) {
+					return type == 1 ? '系统' : 'Mark system'
+				}
+				if (item.systemSituationType == 2) {
+					return type == 1 ? '自查督查' : 'Mark zichaducha'
+				}
+			},
+			getClass(item) {
+				if (item.situationStatus == 2) {
+					return 'topMark doing'
+				}
+				if (item.situationStatus == 6) {
+					return 'topMark complete'
+				}
+				if (item.situationStatus == 4) {
+					return 'topMark wait'
+				}
+				if (item.situationStatus == 5) {
+					return 'topMark complete'
+				}
+
+				return 'topMark'
+			},
+			onsearchChangehandle(keywords) {
+				this.searchByKeywords(keywords);
+			},
+			openSearchBar() {
+				this.isSearchBarShow = true;
+				this.isSearchBoxShow = false;
+			},
+			checkMessageHandle() {
+				//查看消息
+				uni.navigateTo({
+					url: `/pages/messages/messages`,
+				});
+			},
+			closeSearchBar() {
+				this.isSearchBarShow = false;
+				this.isSearchBoxShow = true;
+			},
+			valueEmpty() {
+				this.inputValue = "";
+			},
+			gotoCreate() {
+				uni.navigateTo({
+					url: "/pages/creatingSituations/creatingSituations",
+				});
+			},
+			gotoDetail(id, systemSituationType, item) {
+
+				this.$store.commit({
+					type: 'situationsCenter/comChangeState',
+					key: 'currentSelectedSituation',
+					data: item
+				});
+
+				uni.navigateTo({
+					url: `/pages/situationDetail/situationDetail?situationId=${id}&systemSituationType=${systemSituationType}`,
+				});
+			},
+			getSituationList(data, callback) {
+				this.$store
+					.dispatch({
+						type: "situationsCenter/commActions",
+						payload: {
+							data,
+							key: "situationList",
+						},
+					})
+					.then((data) => {
+						if (data) callback(data);
+					});
+			},
+			searchByKeywords(keywords) {
+				let data = {
+					pageNum: 1,
+					pageSize: 300,
+					keyword: keywords,
+				};
+				this.getSituationList(data, (data) => {
+					this.situationList = [];
+					this.createSituationList(data.list);
+				});
+			},
+			createSituationList(list = []) {
+				list.map((item, index) => {
+					this.situationList.push({
+						name: item.name,
+						checkStatus: item.checkStatus,
+						nextCheckTime: item.nextCheckTime,
+						systemSituationType: item.systemSituationType,
+						//systemSituationType == 0 普通 1 自查督查
+						checkGroupName: item.systemSituationType != 2 ? item.checkGroupName : (item
+							.department.map(v => v.deptClassName)).join(','),
+						topic: item.topic == 0 ? true : false,
+						situationStatus: item.situationStatus,
+						situationID: item.id,
+						toDistributeCount: item.toDistributeCount,
+					});
+				});
+			},
+			toLower() {
+
+				uni.showToast({
+					title: "加载中....",
+					icon: "loading",
+					duration: 2000,
+				});
+				let count = this.situationList.length;
+				if (this.totalCount != count) {
+					this.page++;
+					let data = {
+						pageNum: this.page,
+						pageSize: 300,
+					};
+					// this.getSituationList(data, (data) => {
+					// 	this.createSituationList(data.list);
+					// 	let hiId = uni.getStorageSync("hiId");
+					// 	let user = uni.getStorageSync("id");
+					// 	let permission = uni.getStorageSync("nowPermission");
+					// 	this.initParams = {
+					// 		hiId,
+					// 		user,
+					// 		permission
+					// 	};
+					// 	this.isInitWs && this.initWebsocket(hiId, user, permission);
+					// });
+				} else {
+					uni.showToast({
+						title: "没有更多数据了",
+						icon: "none",
+						duration: 1000,
+					});
+				}
+			},
+			// toMessagePage() {
+			// 	// this.messageType = false;
+			// 	uni.navigateTo({
+			// 		url: `/pages/messages/messages`,
+			// 	});
+			// },
+			init(isInitWs) {
+				this.isInitWs = isInitWs;
+				this.initSituationList();
+			},
+			initWebsocket(hiId, user, permission) {
+				websocket.url = wsURL(hiId, user, permission);
+				websocket.createWebSocket(this.resolverWsData.bind(this));
+			},
+			// 解析websocket返回数据
+			resolverWsData(type) {
+				let types = JSON.parse(type);
+				switch (types.type) {
+					case "TO_READ":
+						this.messageType = true;
+						break;
+					default:
+						this.messageType = false;
+						break;
+				}
+			},
+			initSituationList() {
+				let data = {
+					pageNum: 1,
+					pageSize: 300,
+				};
+				this.getSituationList(data, (data) => {
+					this.totalCount = data.totalCount;
+					this.createSituationList(data.list);
+					this.copied_situationList = data.list;
+					let hiId = uni.getStorageSync("hiId");
+					let user = uni.getStorageSync("id");
+					let permission = uni.getStorageSync("nowPermission");
+					this.initParams = {
+						hiId,
+						user,
+						permission
+					};
+					this.isInitWs && this.initWebsocket(hiId, user, permission);
+				});
+			},
+			// messStatus(){
+			// 	let num = 1;
+			// 	let timer = setInterval(()=>{
+			// 	  this.$store.dispatch({
+			// 		  type: "calendar/commActions",
+			// 		  payload: {
+			// 			key: "messagesList",
+			// 			data: {
+			// 			  pageNum: num,
+			// 			  pageSize: 100,
+			// 			},
+			// 		  },
+			// 		}).then((res)=>{
+			// 			if(res && res.list.length == 0){
+			// 				clearInterval(timer)
+			// 			}else if(res && res.list.length != 0){
+			// 				res.list.map((item)=>{
+			// 					if(!item.readStatus){
+			// 						this.messageType = true;
+			// 						return;
+			// 					}
+			// 				})
+			// 			}
+			// 		})
+			// 	  num++;
+			// 	},200)
+			// }
+		},
+	};
+</script>
+
+<style lang="less">
+	.situationsCenter-page {
+		height: 100%;
+
+		.navbar {
+			background-color: #ffffff;
+		}
+
+		.calender-remind {
+			width: 62.5rpx;
+			height: 62.5rpx;
+			position: fixed;
+			top: 20rpx;
+			right: 25rpx;
+			background: rgba(255, 255, 255, 0.95);
+			border-radius: 50%;
+			z-index: 2;
+
+			image {
+				margin-left: 17.5rpx;
+				margin-top: 16.87rpx;
+				width: 27.5rpx;
+				height: 28.75rpx;
+			}
+		}
+
+		.search-box {
+			position: fixed;
+			top: 20rpx;
+			left: 25rpx;
+			z-index: 2;
+
+			.search-model {
+				height: 62.5rpx;
+				width: 62.5rpx;
+				background-color: #ffffff;
+				text-align: center;
+				border-radius: 50%;
+				box-shadow: 0px 10px 10px 0px rgba(217, 221, 228, 0.5);
+				border: 1px solid #e6eaf2;
+				opacity: 0.85;
+
+				.search-pic {
+					width: 27.5rpx;
+					height: 27.5rpx;
+					margin-top: 17.5rpx;
+				}
+			}
+
+			.search-bar {
+				background-color: #ffffff;
+				width: 700rpx;
+				height: 62.5rpx;
+				top: 0rpx;
+				position: absolute;
+				z-index: 2;
+
+				.search-item {
+					background-color: #ffffff;
+					width: 593.75rpx;
+					height: 62.5rpx;
+					float: left;
+					border-radius: 6.25rpx;
+					border-right: 1.25rpx solid #f0f2f7;
+					;
+
+					.search-pic {
+						width: 21.87rpx;
+						height: 21.87rpx;
+						margin-left: 12.5rpx;
+						margin-top: 20.62rpx;
+						float: left;
+					}
+
+					.searh-input {
+						background-color: #ffffff;
+						width: 525rpx;
+						height: 55rpx;
+						font-size: 22.5rpx;
+						float: right;
+						margin-top: 3.75rpx;
+						margin-left: 3.12rpx;
+					}
+
+					.text-clear {
+						width: 21.87rpx;
+						height: 21.87rpx;
+						float: right;
+						margin-top: 20.62rpx;
+						margin-right: 6.25rpx;
+					}
+				}
+
+				.cancel-text {
+					font-size: 22.5rpx;
+					line-height: 62.5rpx;
+					color: #a1a7b3;
+					margin-right: 31.25rpx;
+					float: right;
+				}
+			}
+		}
+
+		.situation-list {
+			position: relative;
+			height: 100%;
+
+			.scroll-box {
+				width: 100%;
+				height: calc(100% - 87.5rpx);
+
+				.content {
+					display: flex;
+					flex-flow: row wrap;
+					padding-bottom: 100rpx;
+
+					.situation {
+						position: relative;
+						height: 187.5rpx;
+						width: 337.5rpx;
+						background: #ffffff;
+						box-shadow: 0px 6px 20px 0px rgba(0, 13, 51, 0.1);
+						border-radius: 8px;
+						margin-left: 25rpx;
+						margin-top: 25rpx;
+						// overflow: hidden;
+
+						.Mark {
+							position: absolute;
+							top: 0;
+							right: 0;
+							font-size: 15rpx;
+
+							padding-left: 20rpx;
+							padding-right: 10rpx;
+							color: #ffffff;
+							border-radius: 0px 8rpx 0px 25rpx;
+							background: rgba(255, 51, 85, 1);
+
+							&.case {
+								background: rgba(0, 204, 170, 1);
+							}
+
+							&.system {
+								background: rgba(61, 121, 242, 1);
+							}
+						}
+
+						.topMark {
+							position: absolute;
+							top: 0;
+							right: 0;
+							padding: 3.75rpx 12.5rpx;
+							font-size: 13.75rpx;
+							font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+							font-weight: 500;
+							color: #FFFFFF;
+							background: #FF6680;
+							border-radius: 0px 5rpx 0px 20rpx;
+
+							&.doing {
+								background-color: rgba(255, 204, 102, 1);
+							}
+
+							&.wait {
+								background-color: rgba(102, 179, 255, 1);
+							}
+
+							&.complete {
+								background-color: rgba(173, 184, 204, 1);
+							}
+						}
+
+						.situation-topic {
+							width: 62.5rpx;
+							height: 25rpx;
+							float: right;
+						}
+
+						.title {
+							height: 22.5rpx;
+							margin-left: 20rpx;
+							margin-top: 25rpx;
+							display: flex;
+							align-items: center;
+
+							.title-name {
+								width: 300rpx;
+								font-size: 22.5rpx;
+								font-family: SourceHanSansCN-Bold, SourceHanSansCN;
+								font-weight: bold;
+								color: #292c33;
+								overflow: hidden; //超出的文本隐藏
+								text-overflow: ellipsis; //溢出用省略号显示
+								white-space: nowrap; //溢出不换行
+
+							}
+						}
+
+						.check-group {
+							margin-left: 20rpx;
+							margin-top: 15rpx;
+							margin-bottom: 25rpx;
+							height: 17.5rpx;
+							display: flex;
+							align-items: center;
+
+							.group-text {
+								font-size: 17.5rpx;
+								font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+								font-weight: 400;
+								color: #666e80;
+							}
+						}
+
+						.row {
+							margin-left: 20rpx;
+							margin-bottom: 17.5rpx;
+							display: flex;
+							align-items: center;
+							height: 20rpx;
+
+							.situation-check {
+								width: 20rpx;
+								height: 20rpx;
+							}
+
+							.situation-time {
+								width: 20rpx;
+								height: 20rpx;
+							}
+
+							.text {
+								font-size: 20rpx;
+								font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+								font-weight: 400;
+								color: #292c33;
+								margin-left: 11.25rpx;
+							}
+						}
+					}
+				}
+			}
+		}
+
+		.situaions-add {
+			position: fixed;
+			right: 25rpx;
+			bottom: 130rpx;
+
+			.add-pic {
+				width: 75rpx;
+				height: 75rpx;
+			}
+		}
+	}
 </style>

BIN
static/activedGou_white.png


+ 5 - 2
static/html/template.html

@@ -26,8 +26,11 @@
                     bottom: 0;
                     left: 0;
                     margin: auto;
-                    border: rgba(0,0,0,0.7) solid 2px;
-                    border-radius: 4px;
+                   /* border: rgba(0,0,0,1) solid 10px;
+					border-top: rgba(0,0,0,1) solid 30px;
+					border-bottom: rgba(0,0,0,1) solid 50px;
+                    border-radius: 35px;
+					box-shadow: -10px 10px 30px #333333; */
                 }
             }
         </style>

BIN
static/tabbar/tabicon-actived-zhineng.png


BIN
static/tabbar/tabicon-zhineng.png


+ 15 - 0
utils/loginHandle.js

@@ -36,6 +36,21 @@ export const loginAfterHandle = (data,hospSign) => {
 			permission: 5,
 			name: '改善者',
 			pagePath: 'pages/mission/mission'
+		},
+		{
+			permission: 6,
+			name: '职能科室负责人',
+			pagePath: 'pages/situationsCenter/situationsCenter'
+		},
+		{
+			permission: 7,
+			name: '职能科室人员',
+			pagePath: 'pages/situationsCenter/situationsCenter'
+		},
+		{
+			permission: 8,
+			name: '自查人',
+			pagePath: 'pages/situationsCenter/situationsCenter'
 		}
 	]
 

+ 28 - 10
utils/request.js

@@ -114,23 +114,41 @@ function dispatchEventGloal(type){
 }
 
 function notifyException(resArr, additional) {
+  // console.log({resArr, additional});
   openCloseLoading(additional, false);
   const [error, res] = resArr;
+  
   if (error) {
-    uni.showModal({
-      title: '错误提示',
-      content: JSON.stringify(error),
-      showCancel: false,
-	  success: function (res) {
-	          if (res.confirm) {
-	              dispatchEventGloal(JSON.stringify(error));
-	          }
-	  }
-    });
+	const errorStr = JSON.stringify(error);
+	if(errorStr.indexOf('timed out') != -1){
+		  //超时
+		  uni.showModal({
+		    title: '错误提示',
+		    content: '网络连接超时!',
+		    showCancel: false,
+		    success: function (res) {
+		            if (res.confirm) {
+		                dispatchEventGloal(JSON.stringify(error));
+		            }
+		    }
+		  });
+	}else{
+		  uni.showModal({
+		    title: '错误提示',
+		    content: JSON.stringify(error),
+		    showCancel: false,
+		    success: function (res) {
+		            if (res.confirm) {
+		                dispatchEventGloal(JSON.stringify(error));
+		            }
+		    }
+		  });
+	}
     console.error(`请求错误: ${error.errMsg}`);
     return false;
   } else if (res.data.code !== 'SUCCESS') {
     const { code, msg } = res.data;
+	console.log('res.data',res.data)
     if (code === '410' || code === '401'||code === '403') {
 		
 	  // 当页面被嵌套告诉主页面,token过期

+ 3 - 3
utils/requestUrl.js

@@ -10,9 +10,9 @@
 
 export const networkType = 1; //网络类型:内网=0,外网=1
 
-// export const URL = '192.168.50.190: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 = '192.168.3.28: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.12.21.134:8111/imed/pfm/'; //横店
 
 // export const URL = '192.168.1.253:8111/imed/pfm/';