jiangniuniu %!s(int64=4) %!d(string=hai) anos
pai
achega
53c6a55e1b
Modificáronse 46 ficheiros con 2429 adicións e 707 borrados
  1. 79 0
      App.vue
  2. 26 0
      components/tm-check-map-list/tm-check-map-list.vue
  3. 13 3
      components/tm-tabbar/tm-tabbar.vue
  4. 1 1
      components/tm-upload-img/tm-upload-img.vue
  5. 22 7
      pages.json
  6. 127 0
      pages/checkList/checkList.vue
  7. 18 0
      pages/checkList/model.js
  8. 16 0
      pages/checkList/server.js
  9. 32 0
      pages/checkMapList/checkMapList.vue
  10. 162 182
      pages/creatingSituations/components/checkMap.vue
  11. 48 33
      pages/creatingSituations/components/checkMapAdd.vue
  12. 56 51
      pages/creatingSituations/components/checkMapDetail.vue
  13. 50 39
      pages/creatingSituations/components/checkPlan.vue
  14. 2 1
      pages/creatingSituations/components/checkRent.vue
  15. 3 2
      pages/creatingSituations/components/condition.vue
  16. 47 14
      pages/creatingSituations/components/situationPreview.vue
  17. 1 0
      pages/creatingSituations/components/theme.vue
  18. 103 3
      pages/creatingSituations/creatingSituations.vue
  19. 20 1
      pages/creatingSituations/model.js
  20. 16 0
      pages/creatingSituations/server.js
  21. 1 1
      pages/home/home.vue
  22. 0 51
      pages/index/index.vue
  23. 0 3
      pages/mission-action/components/pdca-components/one-textarea.vue
  24. 2 2
      pages/mission-action/components/pdca.vue
  25. 13 2
      pages/mission-action/mission-action.vue
  26. 18 1
      pages/mission-details/mission-details.vue
  27. 49 0
      pages/mission-details/pdcaSetting.js
  28. 770 0
      pages/mission-details/setting-old.js
  29. 84 189
      pages/mission-details/setting.js
  30. 93 93
      pages/mission/model.js
  31. 5 1
      pages/model.js
  32. 14 0
      pages/planList/model.js
  33. 193 0
      pages/planList/planList.vue
  34. 19 0
      pages/planList/server.js
  35. 5 3
      pages/role-switching/role-switching.vue
  36. 223 0
      pages/situationDetail/components/bottom-popup.vue
  37. 15 0
      pages/situationDetail/server.js
  38. 64 12
      pages/situationDetail/situationDetail.vue
  39. 14 7
      pages/situationsCenter/situationsCenter.vue
  40. BIN=BIN
      static/checkStatus.png
  41. 0 0
      static/icon-next-dis.png
  42. 0 0
      static/icon-next.png
  43. 0 0
      static/icon-pre-dis.png
  44. 0 0
      static/icon-pre.png
  45. 3 3
      utils/request.js
  46. 2 2
      utils/requestUrl.js

+ 79 - 0
App.vue

@@ -91,4 +91,83 @@
 		}
 	}
 	// 新建情境样式end
+	// 查核地图列表样式start
+	.check-map-list {
+		overflow: hidden;
+		padding: 0 25rpx;
+		.item {
+			position: relative;
+			overflow: hidden;
+			margin-bottom: 25rpx;
+			border-radius: 5rpx;
+			padding-top: 16.25rpx;
+			padding-bottom: 0;
+			width: 100%;
+			background-color: #fff;
+			box-shadow: 0 3.75rpx 12.5rpx 0 rgba(0, 13, 51, 0.1);
+			
+			.title-wrap {
+				display: flex;
+				flex-direction: row;
+				align-items: center;
+				padding: 0 25rpx;
+				>text {
+					font-size: 35rpx;
+					line-height: 52.5rpx;
+					color: #292C33;
+				}
+				>view {
+					display: flex;
+					flex-direction: row;
+					align-items: center;
+					margin-left: 20rpx;
+					border-radius: 17.5rpx;
+					height: 35rpx;
+					font-size: 17.5rpx;
+					line-height: 35rpx;
+					color: #8F9BB3;
+					background-color: #EDF2FA;
+					image {
+						width: 35rpx;
+						height: 35rpx;
+					}
+					text {
+						padding-left: 10rpx;
+						padding-right: 20rpx;
+					}
+				}
+			}
+			.content {
+				display: flex;
+				flex-direction: column;
+				padding: 11.25rpx 25rpx 20rpx;
+				>text {
+					overflow: hidden;
+					white-space: nowrap;
+					text-overflow: ellipsis;
+					font-size: 20rpx;
+					line-height: 30rpx;
+					color: #666F80;
+					&:first-child {
+						margin-bottom: 5rpx;
+						font-weight: bold;
+						color: #292C33;
+					}
+				}
+			}
+		}
+	}
+	// 查核地图列表样式end
+	// 弹出层样式start
+	.modal {
+		overflow: hidden;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		z-index: 1000;
+		background-color: rgba(18, 20, 26, 0.5);
+	}
+	// 弹出层样式end
 </style>

+ 26 - 0
components/tm-check-map-list/tm-check-map-list.vue

@@ -0,0 +1,26 @@
+<template>
+	<view class="content-wrap">
+		<view class="title-wrap">
+			<text>{{item.name}}</text>
+			<view>
+				<image src="../../static/icon-map.png"></image>
+				<text>{{item.deptClassName}}</text>
+			</view>
+		</view>
+		<view class="content">
+			<text>包含{{item.pointCount || 0}}个查核要点,{{item.itemCount || 0}}个查核项目</text>
+			<text>
+				要点概览:
+				<text v-for="(point, c) in item.pointList" :key="c">
+					{{point.name}};
+				</text>
+			</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: ['item']
+	}
+</script>

+ 13 - 3
components/tm-tabbar/tm-tabbar.vue

@@ -24,6 +24,12 @@
 	 * 2021.2.1
 	 */
 	export default {
+    props: {
+      permission: {
+        type: Number,
+        default: 0
+      }
+    },
 		data() {
 			return {
 				// 当前路由地址
@@ -68,8 +74,13 @@
         rolToTabBars: [],
 			}
 		},
+    watch: {
+      permission(newVal) {
+        this.getRolToTabBars(newVal)
+      }
+    },
 		created(){
-      this.getRolToTabBars();
+      this.getRolToTabBars(uni.getStorageSync('nowPermission'));
 		},
 		methods: {
 			// 路由跳转
@@ -80,8 +91,7 @@
 				});
       },
       // 获取权限对应的地步导航
-    	getRolToTabBars() {
-        const permission = uni.getStorageSync('nowPermission');
+    	getRolToTabBars(permission) {
 				if(!permission) {
 					this.rolToTabBars = [];
 				}else {

+ 1 - 1
components/tm-upload-img/tm-upload-img.vue

@@ -132,7 +132,7 @@
 				margin-right: 25rpx;
 				margin-bottom: 25rpx;
 				width: 300rpx;
-				height: 225rpx;
+        height: 225rpx;
 
 				>image {
 					width: 300rpx;

+ 22 - 7
pages.json

@@ -1,11 +1,5 @@
 {
 	"pages": [
-		{
-			"path": "pages/index/index",
-			"style": {
-				"navigationBarTitleText": "追踪方法学"
-			}
-		},
 		{
 			"path": "pages/login/login"
 		},
@@ -99,8 +93,29 @@
 				"navigationBarTitleText": "情境详情",
 				"enablePullDownRefresh": false
 			}
+		},
+		{
+			"path" : "pages/checkMapList/checkMapList",
+			"style" : {
+				"navigationBarTitleText": "查核地图",
+				"enablePullDownRefresh": false
+			}
 		}
-	],
+    ,{
+       "path" : "pages/planList/planList",
+       "style":  {
+          "navigationBarTitleText": "计划列表",
+          "enablePullDownRefresh": false
+       }
+    },
+		{
+			"path" : "pages/checkList/checkList",
+			"style" :	{
+				"navigationBarTitleText": "查核列表",
+				"enablePullDownRefresh": false
+			}
+    }
+  ],
 	"globalStyle": {
 		"navigationStyle": "custom",
 		"navigationBarTextStyle": "black",

+ 127 - 0
pages/checkList/checkList.vue

@@ -0,0 +1,127 @@
+<template>
+	<view class="check-map-list">
+		<view class="item"
+			v-for="(item, index) in depList" 
+			:key="index">
+			<view class="title-wrap">
+				<text>{{item.deptName}}</text>
+				<view>
+					<image src="../../static/icon-map.png"></image>
+					<text>{{item.deptClassName}}</text>
+				</view>
+			</view>
+			<view class="content">
+				<text>{{item.decs}}</text>
+				<text>
+					要点概览:{{item.checkPointNames}}
+				</text>
+			</view>
+			<view class="footer">
+				<text>查核人:{{item.empName}}</text>
+				<text>{{item.startDate}}~{{item.endDate}}</text>
+			</view>
+		</view>
+		<view class="null" v-if="depList.length === 0">暂无数据</view>
+		<view class="modal">
+			<view class="content-list">
+				<view class="list-item">
+					<text>第1次查核计划(2020-09-21 ~ 2020-09-22)</text>
+					<view class="item-icon">已完成</view>
+				</view>
+				<view class="list-item active">
+					<text>第1次查核计划(2020-09-21 ~ 2020-09-22)</text>
+					<view class="item-icon">进行中</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				depList: [
+					{
+						"checkId":30, //类型:Number  必有字段  备注:计划id
+						"deptId":1, //类型:Number  必有字段  备注:单位id
+						"deptName":"测试单位1", //类型:String  必有字段  备注:单位名称
+						"deptClassId":1, //类型:Number  必有字段  备注:单位分组id
+						"deptClassName":"单位分类1", //类型:String  必有字段  备注:单位分组名称
+						"checkPointNames":"要点1", //类型:String  必有字段  备注:要点名称拼接
+						"decs":"包含1个查核要点, 已完成0/2个查核项目", //类型:String  必有字段  备注:描述
+						"empId":6, //类型:Number  必有字段  备注:分配查核人id
+						"empName":"查核组员2", //类型:String  必有字段  备注:分配查核人名称
+						"startDate":"2021-02-20 08:00", //类型:String  必有字段  备注:分配开始时间
+						"endDate":"2021-02-21 05:00" //类型:String  必有字段  备注:分配结束时间
+					}
+				]
+			};
+		},
+		created: function(){
+			this.dispatch('depList', {checkId: ''}).then((data)=>{
+				console.log(data);
+				if(data) {
+					// this.depList = data;
+				}
+			});
+		},
+		methods: {
+			dispatch: function(key, data) {
+				return this.$store.dispatch({type: 'checkList/commActions', key, data});
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+	.check-map-list {
+		padding: 25rpx;
+		.footer {
+			display: flex;
+			flex-direction: row;
+			justify-content: space-between;
+			align-items: center;
+			margin: 0 25rpx 16.87rpx;
+			border-top: 1px solid #DADEE6;
+			padding-top: 16.25rpx;
+			font-size: 17.5rpx;
+			line-height: 26.25rpx;
+			color: #666E80;
+		}
+	}
+	.null {
+		text-align: center;
+		color: #999;
+	}
+	.content-list {
+		width: 100%;
+		background-color: #fff;
+		.list-item {
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+			border-bottom: 1px solid #DADEE6;
+			padding: 0 25rpx;
+			width: 100%;
+			height: 87.5rpx;
+			font-size: 22.5rpx;
+			line-height: 33.75rpx;
+			color: #292C33;
+			.item-icon {
+				border-radius: 5rpx;
+				padding: 6.25rpx 11.25rpx;
+				line-height: 26.25rpx;
+				color: #29CC96;
+				background-color: #e9f9f4;
+			}
+			&.active {
+				color: #3377FF;
+				.item-icon {
+					color: #FFAA00;
+					background-color: #fff9ef;
+				}
+			}
+		}
+	}
+</style>

+ 18 - 0
pages/checkList/model.js

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

+ 16 - 0
pages/checkList/server.js

@@ -0,0 +1,16 @@
+import { creatRequest } from '../../utils/request.js';
+
+const requestList = {
+  // 查核列表
+  depList: {
+    method: 'GET',
+    url: 'plan/depList',
+		// successMessage: '',
+		// needLoading: false // 还有这两个参数,但不是必传的,默认loading
+  }, 
+};
+
+export const commServer = (key, data) => {
+  let obj = requestList[key];
+  return creatRequest(obj, data);
+}

+ 32 - 0
pages/checkMapList/checkMapList.vue

@@ -0,0 +1,32 @@
+<template>
+	<view class="check-map-list">
+		<view class="item"
+			v-for="(item, index) in checkMap.list" 
+			:key="index">
+			<tm-check-map-list :item="item"></tm-check-map-list>
+		</view>
+		<view class="null" v-if="checkMap.list.length === 0">暂无数据</view>
+	</view>
+</template>
+
+<script>
+	import { mapState } from "vuex";
+	
+	export default {
+		computed: {
+			...mapState({
+				checkMap: state => state.creatingSituations.checkMap,
+			})
+		},
+	}
+</script>
+
+<style lang="less">
+	.check-map-list {
+		padding: 25rpx;
+	}
+	.null {
+		text-align: center;
+		color: #999;
+	}
+</style>

+ 162 - 182
pages/creatingSituations/components/checkMap.vue

@@ -1,38 +1,25 @@
 <template>
 	<view class="check-map">
 		<view class="title">请对查核地图进行配置</view>
-		<view class="list">
+		<view class="check-map-list">
 			<view class="item" 
-				v-for="(item, index) in list" 
+				v-for="(item, index) in checkMap.list" 
 				:class="{disable: item.status === 'disable'}"
 				@click="detail(item)"
 				:key="index">
-				<view class="title-wrap">
-					<text>{{item.name}}</text>
-					<view>
-						<image src="../../../static/icon-map.png"></image>
-						<text>{{item.deptClassName}}</text>
-					</view>
-				</view>
-				<view class="content">
-					<text>包含{{item.pointCount}}个查核要点,{{item.itemCount}}个查核项目</text>
-					<text>
-						<text v-for="(point, c) in item.pointList" :key="c">
-							{{point.name}};
-						</text>
-					</text>
-				</view>
+				<tm-check-map-list :item="item"></tm-check-map-list>
 				<view class="btn-group">
 					<view class="btn" 
 						v-for="(btn, index) in btnGroupArr" 
-						@click="btnClick($event, btn.id)"
+						@click="btnClick($event, btn.id, item)"
 						:key="index">
 						<image :src="`../../static/icon-${btn.id}${item.status === 'disable' 
 							? 'dis' : ''}.png`"></image>
 						<text>{{btn.label}}</text>
 					</view>
-					<view class="btn">
-						<image :src="`../../static/icon-${creatIcon(item.status)['icon']}.png`">
+					<view class="btn" 
+						@click="btnClick($event, creatIcon(item.status)['id'], item)">
+						<image :src="`../../static/icon-${creatIcon(item.status)['id']}.png`">
 						</image>
 						<text>{{ creatIcon(item.status)['label'] }}</text>
 					</view>
@@ -54,18 +41,13 @@
 	import {_stopPropagation} from "../../../utils/compatible.js";
 	const btnGroupArr = [
 		{id: 'add', label: '新增'},
-		{id: 'shang', label: '上移'},
-		{id: 'xia', label: '下移'},
+		{id: 'pre', label: '上移'},
+		{id: 'next', label: '下移'},
 	];
 	export default {
 		data() {
 			return {
 				btnGroupArr,
-				list: [
-					{status: 'normal'},
-					{status: 'add'},
-					{status: 'disable'},
-				]
 			}
 		},
 		computed: {
@@ -73,57 +55,116 @@
 				checkMap: state => state.creatingSituations.checkMap,
 				checkRent: state => state.creatingSituations.checkRent,
 				condition: state => state.creatingSituations.condition,
+				needReload: state => state.creatingSituations.needReload,
 			})
 		},
 		created:function(){
-			if(this.checkMap.list.length === 0) {
-				const {points} = this.checkRent.checkedItem;
-				if(!points) return;
-				let checkPointIds = points.map(({id})=> id);
-				console.log(checkPointIds)
-				this.$store.dispatch({
-					type: 'creatingSituations/commActions',
-					key: 'checkDeptList',
-					data: { 
-						depType: this.condition.depType,
-						checkPointIds,
-					}
-				}).then((data)=> {
-					if(data) this.myCommit('list', data);
-				});
-			}
+			this.init();
 		},
 		methods: {
+			init: function() {
+				if(this.needReload) { // 点击上一步不用获取数据
+					const {points} = this.checkRent.checkedItem;
+					const {depType} = this.condition;
+					if(!points) return;
+					let checkPointIds = points.map(({id})=> id);
+					this.dispatch('checkDeptList', { depType, checkPointIds })
+						.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);
+					});
+				}
+			},
+			checkDep: function(list) {
+				return list.map((item, i)=>{
+					return {
+						...item,
+						status: 'normal',
+						pointList: (item.pointList || []).map((ptem)=>{
+							return {
+								...ptem,
+								selectFlag: true,
+								itemList: (ptem.itemList || []).map((ntem)=>{
+									return {
+										...ntem,
+										selectFlag: true
+									}
+								})
+							}
+						})
+					}
+				});
+			},
 			creatIcon: function(status) {
-				let obj = {icon: 'jinyong', label: '禁用'};
+				let obj = {id: 'jinyong', label: '禁用'};
 				switch(status) {
 					case 'add': 
-						obj = {icon: 'del', label: '删除'};
+						obj = {id: 'del', label: '删除'};
 						break;
 					case 'disable': 
-						obj = {icon: 'qiyong', label: '启用'};
+						obj = {id: 'qiyong', label: '启用'};
 						break;
 				}
 				return obj;
 			},
 			detail: function(item) {
-				this.$store.commit({
-					type: 'creatingSituations/comChangeState',
-					key: 'showCheckMapDetail',
-					data: true
-				});
+				if(item.status === 'disable') return;
+				this.commit('needReload', false); // 不用新获取数据
+				this.commit('showCheckMapDetail', true);
+				this.myCommit('actionItem', item);
 			},
-			btnClick: function(e, id) {
+			btnClick: function(e, btnType, item) {
+				if(item.status === 'disable' && btnType !== 'qiyong') return;
 				_stopPropagation(e);
-				switch(id) {
-					case 'add': 
-						this.$store.commit({
-							type: 'creatingSituations/comChangeState',
-							key: 'showCheckMapAdd',
-							data: true
-						});
+				switch(btnType) {
+					case 'add': // 新增
+						this.commit('needReload', false); // 不用新获取数据
+						this.commit('showCheckMapAdd', true);
+						this.myCommit('actionItem', item);
+						break;
+					default: // 其他
+						this.preAndNext(btnType, item);
+						break;
+				}
+			},
+			preAndNext: function(type, item) {
+				let arr = [...this.checkMap.list];
+				let index = arr.findIndex(({id}) => id === item.id);
+				switch(type) {
+					case 'pre': // 上移
+						if(index > 0) {
+							let pre = arr[index - 1];
+							arr[index - 1] = item;
+							arr[index] = pre;
+						}
+						break;
+					case 'next': // 下移
+						if(index < arr.length - 1) {
+							let next = arr[index + 1];
+							arr[index + 1] = item;
+							arr[index] = next;
+						}
+						break;
+					case 'del': // 删除
+						arr.splice(index, 1);
+						break;
+					case 'jinyong': // 禁用
+						arr.splice(index, 1);
+						arr.push({...item, status: 'disable'});
+						break;
+					case 'qiyong': // 启用
+						let _index = arr.findIndex(({status})=>status === 'disable');
+						arr.splice(index, 1); // 删掉原来的
+						arr.splice(_index, 0, {...item, status: 'normal'}); // 添加到disable的前面
 						break;
 				}
+				this.myCommit('list', arr);
 			},
 			/**
 			 * 更新condition数据
@@ -133,11 +174,13 @@
 			myCommit: function(key, value) {
 				let data = {...this.checkMap};
 				data[key] = value;
-				this.$store.commit({
-					type: 'creatingSituations/comChangeState', 
-					key: 'checkMap', 
-					data
-				});
+				this.commit('checkMap', data);
+			},
+			dispatch: function(key, data) {
+				return this.$store.dispatch({type: 'creatingSituations/commActions', key, data});
+			},
+			commit: function(key, data) {
+				this.$store.commit({type: 'creatingSituations/comChangeState', key, data});
 			}
 		}
 	}
@@ -145,138 +188,75 @@
 
 <style lang="less">
 	.check-map {
-		.list {
-			overflow: hidden;
-			padding: 0 25rpx;
-			.item {
-				position: relative;
-				overflow: hidden;
-				margin-bottom: 25rpx;
-				border-radius: 5rpx;
-				padding-top: 16.25rpx;
-				padding-bottom: 0;
+		.check-map-list {
+			.btn-group {
+				display: flex;
+				flex-direction: row;
+				padding: 15rpx 0;
 				width: 100%;
-				background-color: #fff;
-				box-shadow: 0 3.75rpx 12.5rpx 0 rgba(0, 13, 51, 0.1);
-				
-				.title-wrap {
+				height: 77.5rpx;
+				background-color: #FAFBFC;
+				.btn {
 					display: flex;
-					flex-direction: row;
+					flex-direction: column;
 					align-items: center;
-					padding: 0 25rpx;
-					>text {
-						font-size: 35rpx;
-						line-height: 52.5rpx;
-						color: #292C33;
+					justify-content: center;
+					border-right: 1px solid #DADEE6;
+					flex: 1;
+					font-size: 17.5rpx;
+					line-height: 26.25rpx;
+					color: #7A8599;
+					&:last-child {
+						border-right: 0;
 					}
-					>view {
-						display: flex;
-						flex-direction: row;
-						align-items: center;
-						margin-left: 20rpx;
-						border-radius: 17.5rpx;
-						height: 35rpx;
-						font-size: 17.5rpx;
-						line-height: 35rpx;
-						color: #8F9BB3;
-						background-color: #EDF2FA;
-						image {
-							width: 35rpx;
-							height: 35rpx;
-						}
-						text {
-							padding-left: 10rpx;
-							padding-right: 20rpx;
-						}
-					}
-				}
-				.content {
-					display: flex;
-					flex-direction: column;
-					padding: 11.25rpx 25rpx 20rpx;
-					text {
-						overflow: hidden;
-						white-space: nowrap;
-						text-overflow: ellipsis;
-						font-size: 20rpx;
-						line-height: 30rpx;
-						color: #666F80;
-						&:first-child {
-							margin-bottom: 5rpx;
-							font-weight: bold;
-							color: #292C33;
-						}
+					image {
+						width: 25rpx;
+						height: 25rpx;
 					}
 				}
-				.btn-group {
-					display: flex;
-					flex-direction: row;
-					padding: 15rpx 0;
+			}
+			.dis-img-wrap,
+			.add-img-wrap {
+				position: absolute;
+				top: 18.75rpx;
+				right: 18.75rpx;
+				width: 93.75rpx;
+				height: 93.75rpx;
+				image {
 					width: 100%;
-					height: 77.5rpx;
-					background-color: #FAFBFC;
-					.btn {
-						display: flex;
-						flex-direction: column;
-						align-items: center;
-						justify-content: center;
-						border-right: 1px solid #DADEE6;
-						flex: 1;
-						font-size: 17.5rpx;
-						line-height: 26.25rpx;
-						color: #7A8599;
-						&:last-child {
-							border-right: 0;
-						}
-						image {
-							width: 25rpx;
-							height: 25rpx;
-						}
-					}
+					height: 100%;
 				}
-				.dis-img-wrap,
-				.add-img-wrap {
+			}
+			.add-img-wrap {
+				top: 0;
+				right: 0;
+				width: 100rpx;
+				height: 35rpx;
+				text {
 					position: absolute;
-					top: 18.75rpx;
-					right: 18.75rpx;
-					width: 93.75rpx;
-					height: 93.75rpx;
-					image {
-						width: 100%;
-						height: 100%;
+					top: 4.37rpx;
+					left: 28.75rpx;
+					font-size: 17.5rpx;
+					line-height: 26.25rpx;
+					color: #fff;
+				}
+			}
+			&.disable {
+				.title-wrap {
+					>text, >view {
+						color: #B8BECC;
 					}
 				}
-				.add-img-wrap {
-					top: 0;
-					right: 0;
-					width: 100rpx;
-					height: 35rpx;
+				.content {
 					text {
-						position: absolute;
-						top: 4.37rpx;
-						left: 28.75rpx;
-						font-size: 17.5rpx;
-						line-height: 26.25rpx;
-						color: #fff;
+						color: #B8BECC;
 					}
 				}
-				&.disable {
-					.title-wrap {
-						>text, >view {
-							color: #B8BECC;
-						}
-					}
-					.content {
-						text {
-							color: #B8BECC;
-						}
-					}
-					.btn-group {
-						.btn {
-							color: #B8BECC;
-							&:last-child {
-								color: #7A8599;
-							}
+				.btn-group {
+					.btn {
+						color: #B8BECC;
+						&:last-child {
+							color: #7A8599;
 						}
 					}
 				}

+ 48 - 33
pages/creatingSituations/components/checkMapAdd.vue

@@ -4,25 +4,18 @@
 			<view class="body-content">
 				<text class="top-title">选择要新增的单位</text>
 				<view class="list">
-					<view class="item">
-						<view class="item-title">门诊</view>
+					<view class="item"v-for="(item, index) in checkMap.deptList" :key="index">
+						<view class="item-title">{{item.name}}</view>
 						<view class="chidren">
-							<view class="child" 
-								:class="{active: checkedIds.includes(0)}"
-								@click="changeChecked(0)">
-								<text>挂号处</text>
-								<image v-if="checkedIds.includes(0)" 
+							<view class="child"
+								v-for="(child, n) in item.departmentList"
+								:key="n"
+								:class="{active: checkedIds.includes(child.id)}"
+								@click="changeChecked(child.id)">
+								<text>{{child.name}}</text>
+								<image v-if="checkedIds.includes(child.id)" 
 									src="../../../static/bottom-img.png"></image>
 							</view>
-							<view class="child">
-								<text>分诊处</text>
-							</view>
-							<view class="child">
-								<text>挂号处</text>
-							</view>
-							<view class="child">
-								<text>分诊处</text>
-							</view>
 						</view>
 					</view>
 				</view>
@@ -34,6 +27,7 @@
 </template>
 
 <script>
+	import { mapState } from "vuex";
 	import {arrFilter} from "../../../utils/arrFilter.js";
 	export default {
 		data() {
@@ -47,7 +41,10 @@
 					{id: 'cancle', label: '取消'},
 					{id: 'ok', label: `已选${this.checkedIds.length}项,确定新增`}
 				];
-			}
+			},
+			...mapState({
+				checkMap: state => state.creatingSituations.checkMap,
+			})
 		},
 		methods: {
 			changeChecked: function(id) {
@@ -55,28 +52,46 @@
 			},
 			btnClick: function(id) {
 				if(id === 'ok') {
-					
-				} else {
-					this.$store.commit({
-						type: 'creatingSituations/comChangeState',
-						key: 'showCheckMapAdd',
-						data: false
+					this.dispatch('addDeptList', {depIds: this.checkedIds}).then((data)=>{
+						if(data) {
+							const {list, actionItem} = this.checkMap;
+							let arr = [...this.checkMap.list];
+							data = data.map((item)=>{
+								return {
+									...item,
+									status: 'add'
+								}
+							});
+							let index = list.findIndex(({id})=> id === actionItem.id);
+							arr.splice(index + 1, 0, ...data);
+							this.myCommit('list', arr);
+						}
 					});
 				}
-			}
+				this.commit('showCheckMapAdd', false);
+			},
+			/**
+			 * 更新condition数据
+			 * @param {Object} key 要更新的属性
+			 * @param {Object} value 值
+			 */
+			myCommit: function(key, value) {
+				let data = {...this.checkMap};
+				data[key] = value;
+				this.commit('checkMap', data);
+			},
+			dispatch: function(key, data) {
+				return this.$store.dispatch({type: 'creatingSituations/commActions', key, data});
+			},
+			commit: function(key,data) {
+				this.$store.commit({type: 'creatingSituations/comChangeState', key, data});
+			},
 		}
 	}
 </script>
 
 <style lang="less">
 	.modal {
-		position: absolute;
-		bottom: 0;
-		width: 100%;
-		height: 100%;
-		z-index: 1000;
-		background-color: rgba(18, 20, 26, 0.5);
-		
 		.modal-body {
 			margin-top: 10%;
 			border-radius: 25rpx 25rpx 0 0;
@@ -104,14 +119,14 @@
 						display: flex;
 						flex-direction: row;
 						flex-wrap: wrap;
-						justify-content: space-between;
+						margin: 0 -17.5rpx;
 						.child {
 							position: relative;
 							display: flex;
 							flex-direction: row;
 							justify-content: center;
 							align-items: center;
-							margin: 10rpx 0;
+							margin: 10rpx 17.5rpx;
 							border-radius: 5rpx;
 							width: 200rpx;
 							height: 50rpx;

+ 56 - 51
pages/creatingSituations/components/checkMapDetail.vue

@@ -1,49 +1,21 @@
 <template>
 	<view class="check-map-detail">
-		<view class="item">
-			<view class="icon-wrap" @click="openChildren(0)">
-				<image :src="`../../static/list-${openItems.includes(0)
+		<view class="item" v-for="(item, index) in checkMap.actionItem.pointList" :key="index">
+			<view class="icon-wrap" @click="openChildren(item.id)">
+				<image :src="`../../static/list-${openItems.includes(item.id)
 					?'close':'open'}.png`"></image>
 			</view>
 			<view class="content">
-				<view class="content-title" @click="openChildren(0)">疼痛之评估及再评估</view>
-				<view class="children" v-if="openItems.includes(0)">
-					<view class="child">
-						<text>PRN order时间间隔与时机</text>
-						<view class="check-icon-wrap" @click="changeChecked(1)">
-							<image :src="`../../static/check-${checkedIds.includes(1)
+				<view class="content-title" @click="openChildren(item.id)">{{item.name}}</view>
+				<view class="children" v-if="openItems.includes(item.id)">
+					<view class="child" v-for="(child, n) in item.itemList" :key="n">
+						<text>{{child.name}}</text>
+						<view class="check-icon-wrap" 
+							@click="changeChecked(index, n, child.selectFlag)">
+							<image :src="`../../static/check-${child.selectFlag
 								?'checkbox':'no'}.png`"></image>
 						</view>
 					</view>
-					<view class="child">
-						<text>过敏反应表现</text>
-						<view class="check-icon-wrap">
-							<image src="../../../static/check-no.png"></image>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="item">
-			<view class="icon-wrap" @click="openChildren(1)">
-				<image :src="`../../static/list-${openItems.includes(1)
-					?'close':'open'}.png`"></image>
-			</view>
-			<view class="content">
-				<view class="content-title" @click="openChildren(1)">疼痛之评估及再评估</view>
-				<view class="children" v-if="openItems.includes(1)">
-					<view class="child">
-						<text>PRN order时间间隔与时机</text>
-						<view class="check-icon-wrap">
-							<image src="../../../static/check-no.png"></image>
-						</view>
-					</view>
-					<view class="child">
-						<text>过敏反应表现</text>
-						<view class="check-icon-wrap">
-							<image src="../../../static/check-no.png"></image>
-						</view>
-					</view>
 				</view>
 			</view>
 		</view>
@@ -53,40 +25,73 @@
 </template>
 
 <script>
+	import { mapState } from "vuex";
 	import {arrFilter} from "../../../utils/arrFilter.js";
 	
 	export default {
 		data() {
 			return {
 				openItems: [],
-				checkedIds: [],
 			}
 		},
 		computed: {
 			botmBtnGroup: function() {
 				return [
 					{id: 'cancle', label: '取消'},
-					{id: 'ok', label: `已选${this.checkedIds.length}项,确定`}
+					{id: 'ok', label: `已选${this.selectedNum}项,确定`}
 				];
-			}
+			},
+			...mapState({
+				checkMap: state => state.creatingSituations.checkMap,
+			}),
+			selectedNum: function() {
+				let num = 0;
+				this.checkMap.actionItem.pointList.map((item)=>{
+					item.itemList.map((ntem)=>{
+						if(ntem.selectFlag) num++;
+					});
+				});
+				return num;
+			},
+		},
+		created:function(){
+			this.checkMap.actionItem.pointList.map((item)=>{
+				this.openItems.push(item.id);
+			});
 		},
 		methods: {
 			openChildren: function(key) {
 				this.openItems = arrFilter(key, this.openItems);
 			},
-			changeChecked: function(id) {
-				this.checkedIds = arrFilter(id, this.checkedIds);
+			changeChecked: function(i, n, selectFlag) {
+				this.checkMap.actionItem.pointList[i].itemList[n].selectFlag = !selectFlag;
+				this.myCommit('actionItem', this.checkMap.actionItem);
 			},
 			btnClick: function(id) {
 				if(id === 'ok') {
-					
-				} else {
-					this.$store.commit({
-						type: 'creatingSituations/comChangeState',
-						key: 'showCheckMapDetail',
-						data: false
-					});
-				}
+					const {id, pointList} = this.checkMap.actionItem;
+					let list = [...this.checkMap.list];
+					let index = list.findIndex((item)=> item.id === id);
+					list[index].pointList = pointList;
+					this.myCommit('list', list);
+				} 
+				this.commit('showCheckMapDetail', false);
+			},
+			/**
+			 * 更新condition数据
+			 * @param {Object} key 要更新的属性
+			 * @param {Object} value 值
+			 */
+			myCommit: function(key, value) {
+				let data = {...this.checkMap};
+				data[key] = value;
+				this.commit('checkMap', data);
+			},
+			dispatch: function(key, data) {
+				return this.$store.dispatch({type: 'creatingSituations/commActions', key, data});
+			},
+			commit: function(key,data) {
+				this.$store.commit({type: 'creatingSituations/comChangeState', key, data});
 			},
 		}
 	}

+ 50 - 39
pages/creatingSituations/components/checkPlan.vue

@@ -13,7 +13,7 @@
 						<text>{{item.label}}</text>
 					</view>
 					<view class="img-wrap" @click="checkModel(item)">
-						<image :src="`../../static/check-${checkedItem.id === item.id 
+						<image :src="`../../static/check-${checkPlan.checkedItem.id === item.id 
 							? 'radio': 'no'}.png`"></image>
 					</view>
 				</view>
@@ -23,8 +23,8 @@
 				<view>
 					<date-time-pick-group fields="day" 
 						:startTime="startTime()"
-						:startSelectValue="dateObj.start"
-						:endSelectValue="dateObj.end"
+						:startSelectValue="checkPlan.dateObj.start"
+						:endSelectValue="checkPlan.dateObj.end"
 						v-on:changeDate="changeDate"></date-time-pick-group>
 					<image src="../../../static/incon-more.png"></image>
 				</view>
@@ -38,7 +38,7 @@
 			<view class="top-box">
 				<view class="result-box">
 					<text>开始日期</text>
-					<text>{{dateObj.start}}</text>
+					<text>{{checkPlan.dateObj.start}}</text>
 				</view>
 				<view class="date-box">
 					<text>结束日期</text>
@@ -47,14 +47,14 @@
 							placeholder="请选择结束日期"
 							pickType="end"
 							:start="startTime()"
-							:defaultValue="dateObj.end"
+							:defaultValue="checkPlan.dateObj.end"
 							v-on:change="changeDate"></date-time-picker>
 						<image src="../../../static/incon-more.png"></image>
 					</view>
 				</view>
 			</view>
 			<view class="content2-list">
-				<view class="item" v-for="(item, index) in checkList" :key="index">
+				<view class="item" v-for="(item, index) in checkPlan.checkList" :key="index">
 					<text>第{{index + 1}}次查核</text>
 					<view class="date-box">
 						<text>开始日期</text>
@@ -75,41 +75,35 @@
 </template>
 
 <script>
-	import {dateHandle} from "../../../utils/dateHandle.js";
 	import { mapState } from "vuex";
+	import {dateHandle} from "../../../utils/dateHandle.js";
 	const {dateDiff, getNewData, todayDate, compare} = dateHandle;
 	const list = [
-		{id: 'week', label: '每周', model: 7},
-		{id: 'month', label: '每月', model: 30},
-		{id: 'twoMonth', label: '每两月', model: 60},
-		{id: 'quarter', label: '每季度', model: 90},
-		{id: 'halfAYear', label: '每半年', model: 180},
-		{id: 'custom', label: '天', model: null},
+		{id: 'week', value: 1, label: '每周', model: 7},
+		{id: 'month', value: 2, label: '每月', model: 30},
+		{id: 'twoMonth', value: 3, label: '每两月', model: 60},
+		{id: 'quarter', value: 4, label: '每季度', model: 90},
+		{id: 'halfAYear', value: 5, label: '每半年', model: 180},
+		{id: 'custom', value: 6, label: '天', model: null},
 	];
 	export default {
 		data() {
 			return {
-				list, 
-				checkedItem: list[1], // 选中的取模方式对象
-				dateObj: { // 保存开始日期结束日期的对象
-					start: todayDate(),
-					end: '',
-					dayNum: 0 // 两个日期间隔的天数
-				}, 
-				checkList: [], // 核查计划数组
+				list
 			}
 		},
 		computed: {
 			...mapState({
 				showCheckPlan1: state => state.creatingSituations.showCheckPlan1,
+				checkPlan: state => state.creatingSituations.checkPlan,
 			}),
 			checkNumber: function() { // 查核频次
-				return this.checkList.length;
+				return this.checkPlan.checkList.length;
 			}
 		},
 		methods: {
 			checkModel: function(item) {
-				this.checkedItem = item;
+				this.myCommit('checkedItem', item);
 				this.createList();
 			},
 			/**
@@ -118,10 +112,13 @@
 			 * @param {Object} type 返回类型(start/end)
 			 */
 			changeDate: function(date, type) {
-				this.dateObj[type] = date.f1;
-				const {start, end} = this.dateObj;
+				let dateObj = {...this.checkPlan.dateObj};
+				dateObj[type] = date.f1;
+				this.myCommit('dateObj', dateObj);
+				const {start, end} = dateObj;
 				if(start && end) {
-					this.dateObj.dayNum = dateDiff(start, end);
+					dateObj.dayNum = dateDiff(start, end);
+					this.myCommit('dateObj', dateObj);
 					this.createList();
 				}
 			},
@@ -129,51 +126,65 @@
 			 * 构造计划列表
 			 */
 			createList: function() {
-				const { model } = this.checkedItem;
-				const {start, dayNum} = this.dateObj;
+				const { model } = this.checkPlan.checkedItem;
+				const {start, dayNum} = this.checkPlan.dateObj;
+				let checkList = [];
 				if(model && dayNum > 0) { // 确保前两步都做好了
 					let num = Math.floor(dayNum / model);
-					this.checkList = [start];
+					checkList = [start];
 					for(let i = 0; i < num - 1; i++) {
-						this.checkList[i+1] = getNewData(this.checkList[i], model);
+						checkList[i+1] = getNewData(checkList[i], model);
 					}
-				} else {
-					this.checkList = [];
 				}
+				this.myCommit('checkList', checkList);
 			},
 			/**
 			 * 已经生成的计划日期变化
 			 * @param {Object} date
 			 */
 			changeChildDate: function(date, index) {
-				let newList = this.checkList.slice(0, index); // 不包括index
+				let newList = this.checkPlan.checkList.slice(0, index); // 不包括index
 				newList[index] = date.f1;
-				const { model } = this.checkedItem;
+				const { model } = this.checkPlan.checkedItem;
 				let i = index;
 				// 判断下一个计划开始时间日期不能大于结束的前X(模)天
 				while(compare(this.endDate(), getNewData(newList[i], model))) { 
 					newList[i+1] = getNewData(newList[i], model);
 					i++;
 				}
-				this.checkList = newList;
+				this.myCommit('checkList', newList);
 			},
 			startTime: function() { // 限制只能从今天开始
 				return this.formateStartEnd(todayDate());
 			},
 			endDate: function() { // 获取能选择的最大日期,取结束日期的前模天
-				let day = -Number(this.checkedItem.model); // 使用负数能取前X天
-				return getNewData(this.dateObj.end, day);
+				let day = -Number(this.checkPlan.checkedItem.model); // 使用负数能取前X天
+				return getNewData(this.checkPlan.dateObj.end, day);
 			},
 			startDate: function(index) { // 子级能选择的最早开始时间
 				if(index > 0) {
-					let day = Number(this.checkedItem.model);
-					return this.formateStartEnd(getNewData(this.checkList[index - 1], day));
+					let day = Number(this.checkPlan.checkedItem.model);
+					return this.formateStartEnd(getNewData(this.checkPlan.checkList[index - 1], day));
 				} else {
 					return this.startTime();
 				}
 			},
 			formateStartEnd: function(str) {
 				return str + ' 00:00';
+			},
+			/**
+			 * 更新condition数据
+			 * @param {Object} key 要更新的属性
+			 * @param {Object} value 值
+			 */
+			myCommit: function(key, value) {
+				let data = {...this.checkPlan};
+				data[key] = value;
+				this.$store.commit({
+					type: 'creatingSituations/comChangeState', 
+					key: 'checkPlan', 
+					data
+				});
 			}
 		}
 	}

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

@@ -55,10 +55,11 @@
 			...mapState({
 				checkRent: state => state.creatingSituations.checkRent,
 				condition: state => state.creatingSituations.condition,
+				needReload: state => state.creatingSituations.needReload,
 			})
 		},
 		created:function(){
-			if(this.checkRent.list.length === 0) {
+			if(this.needReload) { // 点击上一步不用获取数据
 				this.$store.dispatch({
 					type: 'creatingSituations/commActions',
 					key: 'checkGroupList',

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

@@ -23,11 +23,12 @@
 		computed: {
 			...mapState({
 				condition: state => state.creatingSituations.condition,
+				needReload: state => state.creatingSituations.needReload,
 				theme: state => state.creatingSituations.theme
 			})
 		},
 		created: function(){
-			if(this.condition.options.length === 0)
+			if(this.needReload) // 点击上一步不用获取数据
 				this.getOptions(this.condition.depType);
 		},
 		methods: {
@@ -70,7 +71,7 @@
 			 * @param {Object} data
 			 */
 			optionsHandle: function(data) {
-				let options = data.map((item, i)=>{
+				let options = data.map((item)=>{
 					return {
 						...item,
 						key: item.id,

+ 47 - 14
pages/creatingSituations/components/situationPreview.vue

@@ -4,46 +4,52 @@
 		<view class="box1">
 			<view class="row1">
 				<view class="top">
-					<text>主题:个案追踪</text>
-					<view>
+					<text>主题:{{theme.title}}</text>
+					<view @click="goMapList">
 						<text>查看查核地图</text>
 						<image src="../../../static/icon-blueMore.png"></image>
 					</view>
 				</view>
 				<view class="list">
-					<text>门诊</text>
-					<text>住院</text>
-					<text>ICU</text>
+					<text v-for="(item, index) in list" :key="index">{{item.name}}</text>
 				</view>
 			</view>
 			<view class="row2">
 				<view class="item">
 					<text>查核组</text>
-					<text>内科查核二组</text>
+					<text>{{checkRent.checkedItem.name}}</text>
 				</view>
 				<view class="item">
 					<text>组长</text>
-					<text>王晓雪</text>
+					<text>{{checkRent.checkedItem.groupManagerName}}</text>
 				</view>
 			</view>
 		</view>
 		<view class="box2">
 			<view>情景名称</view>
 			<view class="input-wrap">
-				<input placeholder="限2~16个中文、英文或数字" />
+				<input maxlength="16" 
+					v-model="situationPreview.sitName" 
+					placeholder="限2~16个中文、英文或数字" />
 			</view>
 		</view>
 		<view class="box2">
 			<view>
 				<text>计划开始前</text>
-				<input placeholder="请输入" type="number" />
+				<input v-model="situationPreview.preDay" 
+					placeholder="请输入" 
+					type="number" />
 				<text>天的</text>
-				<input placeholder="请输入" type="number" />
+				<input v-model="situationPreview.preH" 
+					placeholder="请输入" 
+					type="number" />
 				<text>时提醒</text>
 			</view>
 			<view>
 				<text>启动</text>
-				<input placeholder="请输入" type="number" />
+				<input v-model="situationPreview.startDay" 
+					placeholder="请输入" 
+					type="number" />
 				<text>天前提醒</text>
 			</view>
 		</view>
@@ -51,10 +57,37 @@
 </template>
 
 <script>
+	import { mapState } from "vuex";
 	export default {
-		data() {
-			return {
-				
+		computed: {
+			...mapState({
+				theme: state => state.creatingSituations.theme,
+				condition: state => state.creatingSituations.condition,
+				checkRent: state => state.creatingSituations.checkRent,
+				situationPreview: state => state.creatingSituations.situationPreview,
+			}),
+			list: function() {
+				const { conditionIds, options } = this.condition;
+				let list = [];
+				this.loopOptions(options, conditionIds, list);
+				return list;
+			}
+		},
+		methods: {
+			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'
+				});
 			}
 		}
 	}

+ 1 - 0
pages/creatingSituations/components/theme.vue

@@ -44,6 +44,7 @@
 		methods: {
 			checkedHandle: function(item) {
 				this.myCommit('theme', item);
+				this.myCommit('needReload', true);
 				this.myCommit('stepActive', 1);
 			},
 			myCommit: function(key, data) {

+ 103 - 3
pages/creatingSituations/creatingSituations.vue

@@ -48,7 +48,7 @@
 					{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: 'checkPlan', title: '计划', component: checkPlan, hint: '制定计划'},
 					{id: 'situationPreview', title: '预览', component: situationPreview},
 				]
 			}
@@ -59,8 +59,12 @@
 				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,
 			}),
 			botmBtnGroup: function() {
 				if(this.stepActive === 4) {
@@ -77,10 +81,57 @@
 			}
 		},
 		methods: {
+			save: function() {
+				const {sitName,preDay,preH,startDay} = this.situationPreview;
+				const {dateObj,checkedItem,checkList} = this.checkPlan;
+				const {depType, options} = this.condition;
+				if(!sitName) {
+					uni.showModal({
+						title: '温馨提示',
+						content: `情境名称不能为空!`,
+						showCancel: false
+					});
+					return;
+				}
+				this.dispatch('save', {
+					name: sitName,
+					topic: this.theme.id,
+					checkPlanStartDate: dateObj.start,
+					checkPlanEndDate: dateObj.end,
+					remindPlanDay: preDay,
+					remindPlanHour: preH,
+					remindCheckDay: startDay,
+					depType,
+					filterCondition: this.optionsHandle(options),
+					checkGroup: this.checkGroup(),
+					checkDep: this.checkDep(),
+					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: i === checkList.length - 1 ? dateObj.end : checkList[i+1]
+						}
+					})
+				}).then((data)=>{
+					console.log(data);
+					if(data) {
+						uni.navigateTo({
+							url: '/pages/situationsCenter/situationsCenter'
+						});
+					}
+				});
+			},
 			changeStep: function(id) {
 				switch(id) {
 					case 'pre': // 上一步
 						if(this.stepActive > 0) 
+							this.myCommit('needReload', false);
 							this.myCommit('stepActive', this.stepActive - 1);
 						break;
 					case 'next': // 下一步
@@ -93,6 +144,9 @@
 					case 'checkPlanCallback': // 生成查核计划-返回
 						this.myCommit('showCheckPlan1', true);
 						break;
+					case 'situationPreviewOK': // 完成
+						this.save();
+						break;
 				}
 			},
 			/**
@@ -109,8 +163,18 @@
 						let condition = this.checkRent.checkedItem.id !== null && points;
 						flage = this.errorHandle(condition, 2);
 						break;
+					case 4: 
+						const {checkList} = this.checkPlan;
+						flage = this.errorHandle(checkList.length > 0, 4);
+						break;
+					default: 
+						flage = true;
+						break;
 				}
-				if(flage) this.myCommit('stepActive', stepActive + 1);
+				if(flage) {
+					this.myCommit('needReload', true);
+					this.myCommit('stepActive', stepActive + 1);
+				} 
 			},
 			/**
 			 * 错误处理,满足条件返回true
@@ -129,9 +193,45 @@
 					return false;
 				}
 			},
+			/**
+			 * 构造条件提交结果
+			 */
+			optionsHandle: function(arr) {
+				let options = [...arr].map((item)=>{
+					return {
+						...item,
+						selectFlag: this.condition.conditionIds.includes(item.id),
+						child: this.optionsHandle(item.child)
+					}
+				});
+				return options;
+			},
+			checkDep: function() {
+				const {list} = this.checkMap;
+				return list.map((item, i)=>{
+					return {
+						...item,
+						sort: i+1,
+						enableFlag: item.status === 'disable' ? false : true,
+					}
+				});
+			},
+			checkGroup: function() {
+				const {list, checkedItem} = this.checkRent;
+				let _list = [...list].map((ntem)=>{
+					return {
+						...ntem,
+						selectFlag: ntem.id === checkedItem.id ? true : false
+					}
+				});
+				return _list;
+			},
 			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});
+			},
 		},
 		components: {
 			checkMapDetail,

+ 20 - 1
pages/creatingSituations/model.js

@@ -1,11 +1,13 @@
 import { commServer } from './server.js';
-
+	import {dateHandle} from "../../utils/dateHandle.js";
+	
 export default {
   namespaced: true,
   state: {
 		showCheckMapDetail: false,
 		showCheckMapAdd: false,
 		showCheckPlan1: true,
+		needReload: true, // 切换页面是否需要获取新数据
 		stepActive: 0, // 步骤进度
 		theme: {id: null, title: null, des: null}, // 主题选中数据(id: 0个案 1系统)
 		condition: { // 条件页面数据
@@ -20,6 +22,23 @@ export default {
 		},
 		checkMap: { // 查核地图数据
 			list: [], // 列表数据
+			actionItem: {id: '', pointList: []}, // 当前操作的列表项
+			deptList: [], // 新增单位数据
+		},
+		checkPlan: { // 查核计划
+			checkedItem: {id: 'month', value: 2, label: '每月', model: 30}, // 选中的取模方式对象
+			dateObj: { // 保存开始日期结束日期的对象
+				start: dateHandle.todayDate(),
+				end: '',
+				dayNum: 0 // 两个日期间隔的天数
+			}, 
+			checkList: [], // 核查计划数组
+		},
+		situationPreview: { // 预览
+			sitName: null,
+			preDay: null,
+			preH: null,
+			startDay: null
 		}
   },
   mutations: {

+ 16 - 0
pages/creatingSituations/server.js

@@ -17,6 +17,22 @@ const requestList = {
   checkDeptList: {
     method: 'POST',
     url: 'situation/checkDeptList',
+  },
+	// 地图新增单位树
+  deptList: {
+    method: 'GET',
+    url: 'common/deptList',
+  },
+	// 地图新增选择返回新增单位
+  addDeptList: {
+    method: 'POST',
+    url: 'situation/addDeptList',
+  },
+	// 情境新增保存
+  save: {
+    method: 'POST',
+    url: 'situation',
+		successMessage: '保存成功!'
   },
 };
 

+ 1 - 1
pages/home/home.vue

@@ -107,7 +107,7 @@
 						key: 'logout',
 					}
 				}).then((data)=>{
-					if(data!==null){
+					if(data){
 						uni.navigateTo({
 							url: '/pages/login/login'
 						});

+ 0 - 51
pages/index/index.vue

@@ -1,51 +0,0 @@
-<template>
-	<view class="content">
-		<view class="text-area">
-			<text class="title">{{title}}</text>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				title: 'Hello'
-			}
-		},
-		onLoad() {
-
-		},
-		methods: {
-
-		}
-	}
-</script>
-
-<style>
-	.content {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.logo {
-		height: 200rpx;
-		width: 200rpx;
-		margin-top: 200rpx;
-		margin-left: auto;
-		margin-right: auto;
-		margin-bottom: 50rpx;
-	}
-
-	.text-area {
-		display: flex;
-		justify-content: center;
-	}
-
-	.title {
-		font-size: 36rpx;
-		color: #8f8f94;
-	}
-</style>

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

@@ -53,9 +53,6 @@
 			label() {
         return this.type === 'plan' ? '改善计划' : '对策处置'
       }
-    },
-    created() {
-      this.value = this.defaultValue;
     },
 		methods: {
       changeVal(e) {

+ 2 - 2
pages/mission-action/components/pdca.vue

@@ -120,7 +120,7 @@
 			uni.setNavigationBarTitle({
 				title: '改善计划'
       });
-      if(this.disabled) {
+      if(this.disabled || this.btnInfo.isEdit) {
         this.plan = this.values['plan'] || '';
         this.doList = (this.values['do'] && this.values['do'].length > 0)
           ? this.getComList(this.values['do'], 'do')
@@ -159,7 +159,7 @@
           improveScheme // 改善方案名称
         };
         this.btnInfo.params && this.btnInfo.params.map(item => {
-          if(item.valueKey){
+          if(item.valueKey && !item.isEdit){
             requestParams[item.paramsKey] = (
               item.isOutvalueKey
               ? this.missionDetails

+ 13 - 2
pages/mission-action/mission-action.vue

@@ -62,7 +62,9 @@
           key,
           labelKey,
           dataKey,
-          pdcaSetting
+          pdcaSetting,
+          isEdit,
+          params
         } = details;
         this.currentComponet = componentName;
         this.disabled = disabled;
@@ -78,6 +80,15 @@
           this.values = values;
         }else { // 编辑流程
           this.btnInfo = details;
+          if(isEdit) { // 之前暂存过,需要先回显数据
+            let values = {};
+            params && params.map(item => {
+              if(item.labelKey){
+                values[item.labelKey] = details[item.valueKey];
+              }
+            });
+            this.values = values;
+          }
         }
         this.pdcaSetting = pdcaSetting;
       },
@@ -90,7 +101,7 @@
 						data
 					}
 				}).then(data1 => {
-          if(!data1){
+          if(data1){
             let taskId = uni.getStorageSync('taskId');
             uni.redirectTo({
               url: `/pages/mission-details/mission-details?taskId=${taskId}`

+ 18 - 1
pages/mission-details/mission-details.vue

@@ -25,7 +25,7 @@
 										<text>{{ getContext(item, false, 'row2') }}</text>
 									</view>
 									<view class="sub-title">
-										<text>{{ item.createTime }}</text>
+										<text>{{ item.recordTime }}</text>
 									</view>
 								</view>
                 <template v-if="getContext(item, true, 'selectDetails')">
@@ -64,6 +64,7 @@
   import { mapState } from "vuex";
   import listItem from '../mission/components/list-item.vue';
   import taskTypeList from './setting.js';
+  import pdcaSetting from './pdcaSetting.js'
 
 	export default {
     computed: {
@@ -118,6 +119,22 @@
 			// 点击右侧按钮
 			clickBtn(currentInfo, btnInfo) {
         if(btnInfo.componentName){ // 有组件名,则跳转页面
+          if(btnInfo.componentName === 'pdca'){
+            const { taskType, needApproveFlag } = this.missionDetails;
+            if(taskType === 13 || taskType === 15){ // 制定改善方案中(需要回显暂存过的数据)
+              if(needApproveFlag){// 需要审核(pdca)
+                btnInfo= { ...btnInfo, ...pdcaSetting['editPdcaBtnInfo'], isEdit: true };
+              }else {
+                btnInfo= { ...btnInfo, ...pdcaSetting['editPBtnInfo'], isEdit: true };
+              }
+            }else {
+              if(needApproveFlag){ // 需要审核(pdca)
+                btnInfo= { ...btnInfo, ...pdcaSetting['pdcaBtnInfo'] };
+              }else {
+                btnInfo= { ...btnInfo, ...pdcaSetting['pBtnInfo'] };
+              }
+            }
+          }
           uni.navigateTo({
             url: `/pages/mission-action/mission-action?details=${encodeURIComponent(JSON.stringify({...currentInfo, ...btnInfo}))}`
 				  });

+ 49 - 0
pages/mission-details/pdcaSetting.js

@@ -0,0 +1,49 @@
+const baseSetting = [
+  { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+  { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+  { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+  { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+];
+
+let pdcaSetting = {
+  // p按钮的信息(未暂存过的)
+  pBtnInfo: {
+    pdcaSetting: 'p',
+    params: [
+      ...baseSetting,
+      { paramsKey: 'taskPlan', valueKey: null } // plan
+    ]
+  },
+  // 编辑p按钮的信息(暂存过的)
+  editPBtnInfo: {
+    pdcaSetting: 'p',
+    params: [
+      ...baseSetting,
+      { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false, labelKey: 'plan', isEdit: true } // plan
+    ]
+  },
+  // pdca按钮的信息(未暂存过的)
+  pdcaBtnInfo: {
+    pdcaSetting: 'pdca',
+    params: [
+      ...baseSetting,
+      { paramsKey: 'taskPlan', valueKey: null }, // plan
+      { paramsKey: 'taskAction', valueKey: null }, // action
+      { paramsKey: 'taskDoRequestList', valueKey: null }, // do
+      { paramsKey: 'taskCheckRequestList', valueKey: null } // check
+    ]
+  },
+  // 编辑pdca按钮的信息(暂存过的)
+  editPdcaBtnInfo: {
+    pdcaSetting: 'pdca',
+    params: [
+      ...baseSetting,
+      { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false, labelKey: 'plan', isEdit: true }, // 改善plan
+      { paramsKey: 'taskAction', valueKey: 'taskAction', isOutvalueKey: false, labelKey: 'action', isEdit: true }, // action
+      { paramsKey: 'taskDoRequestList', valueKey: 'taskDoRequestList', isOutvalueKey: false, labelKey: 'do', isEdit: true }, // do
+      { paramsKey: 'taskCheckRequestList', valueKey: 'taskCheckRequestList', isOutvalueKey: false, labelKey: 'check', isEdit: true }, // check
+    ]
+  }
+};
+
+export default pdcaSetting;

+ 770 - 0
pages/mission-details/setting-old.js

@@ -0,0 +1,770 @@
+// 任务流程列表
+
+const taskTypeList = [
+  {
+    taskType: 1, // 任务当前状态
+    currentPermission: 4, // 当前任务在哪
+    taskName: '创建任务',
+    checkResult: 3, // 只针对第一步操作区分按钮是显示 (指派改善任务还是改善回复) 1不用管 2 改善回复 3 制定改善方案
+    btnList: [ //  底部按钮
+      {
+        name: '不认可', // 按钮显示名字
+        componentName: 'disagree', // 点击后跳转的组件名
+        nextPermission: 1, // 接收人id
+        nextPermissionName: '管理员', // 接收人名字
+        params: [ // 接口保存的参数配置(paramsKey: 参数名, valueKey: 使用详情接口key, 为null, 表示当前组件可自输入, isOutvalueKey: 是否详情接一级key, 不是则在当前任务状态中找key(如pfmTaskCirculationList下面))
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'adminId', isOutvalueKey: true }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'adminName', isOutvalueKey: true }, // 接收人姓名
+          { paramsKey: 'approveReason', valueKey: null } // 不认可原因
+        ]
+      },
+      {
+        name: '指派改善任务',
+        componentName: 'assign-mission',
+        nextPermission: 5,
+        nextPermissionName: '改善者',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'appointFlag', valueKey: 'appointFlag', isOutvalueKey: true }, // 已指派标志, 0 未指派 1已指派
+          { paramsKey: 'desicion', valueKey: null }, // 改善方案 目前只有pdca
+          { paramsKey: 'receiveEmpId', valueKey: null }, // 指派人
+          { paramsKey: 'receiveEmpName', valueKey: null }, // 指派人姓名
+          { paramsKey: 'needApproveFlag', valueKey: null } // 是否需要审核 true 是 false 不需要
+        ]
+      }
+    ],
+    // 第一行显示的内容
+    row1: {
+      hasJoin: true, // 是否需要拼接
+      name: '查核人x', // 显示的内容, x未来被替换的值
+      key: 'establishEmpName', // 使用详情接口key,用来替换x
+      isOutvalueKey: false // 是否详情接口一级key, 不是则在当前任务状态中找key(如pfmTaskCirculationList下面)
+    },
+    // 第二行显示的内容
+    row2: {
+      hasJoin: true,
+      name: '发送改善通知,查核结果:x',
+      key: 'checkDetailResult',
+      isOutvalueKey: true
+    },
+    // 查看xx详情 (name: 详情名字, componentName: 点击后跳转的页面, disabled: 底部按钮禁用)
+    selectDetails: {
+      name: '查看查核结果详情', // 详情显示的名字
+      hasAnyData: false, // 是否有多个数据需要回显 为true则使用dateKey, 否则使用key <key和datakey互斥)
+      key: 'checkDetailResult', //使用详情接口key
+      dataKey: [],
+      isOutvalueKey: true,  // 是否详情接口一级key, 不是则在当前任务状态中找key(如pfmTaskCirculationList下面)
+      componentName: 'disagree', //点击后跳转的组件名
+      disabled: true, // 调整后是否编辑和禁用
+      labelKey: 'textarea' // 回显时使用的key
+    }
+  },
+  {
+    taskType: 1,
+    currentPermission: 4,
+    taskName: '创建任务',
+    checkResult: 2,
+    btnList: [
+      {
+        name: '不认可',
+        componentName: 'disagree',
+        nextPermission: 1,
+        nextPermissionName: '管理员',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'adminId', isOutvalueKey: true }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'adminName', isOutvalueKey: true }, // 接收人姓名
+          { paramsKey: 'approveReason', valueKey: null }, // 不认可原因
+        ]
+      },
+      {
+        name: '改善回复',
+        componentName: 'write-back',
+        nextPermission: 1,
+        nextPermissionName: '管理员',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'receiveEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'adminName', isOutvalueKey: true }, // 接收人姓名
+          { paramsKey: 'approveReason', valueKey: null }, // 不认可原因
+          { paramsKey: 'improveUrl', valueKey: null } // 图片地址
+        ]
+      }
+    ],
+    row1: { hasJoin: true, name: '查核人x', key: 'establishEmpName' },
+    row2: {hasJoin: true, name: '发送改善通知,查核结果:x', key: 'checkDetailResult', isOutvalueKey: true },
+    selectDetails: {
+      name: '查看查核结果详情',
+      key: 'checkDetailResult',
+      isOutvalueKey: true,
+      componentName: 'disagree',
+      disabled: true,
+      labelKey: 'textarea'
+    }
+  },
+  {
+    taskType: 2,
+    currentPermission: 1,
+    taskName: '不认可',
+    checkResult: 1,
+    btnList: [
+      {
+        name: '重新发送',
+        componentName: 'disagree',
+        nextPermission: 4,
+        nextPermissionName: '单位负责人',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+          { paramsKey: 'approveReason', valueKey: null } // 不认可原因
+        ]
+      },
+      {
+        name: '发送给其他人',
+        componentName: 'personnel',
+        keys: null,
+        nextPermission: 4,
+        nextPermissionName: '单位负责人',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: null }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: null } // 接收人姓名
+        ]
+      }
+    ],
+    row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '不认可改善通知' },
+    selectDetails: {
+      name: '查看不认可原因详情',
+      key: 'approveReason',
+      componentName: 'disagree',
+      disabled: true,
+      labelKey: 'textarea'
+    }
+  },
+  {
+    taskType: 3,
+    currentPermission: 4,
+    taskName: '重新发送',
+    checkResult: 1,
+    btnList: [
+      {
+        name: '指派改善任务',
+        componentName: 'assign-mission',
+        nextPermission: 4,
+        nextPermissionName: '单位负责人',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'appointFlag', valueKey: 'appointFlag', isOutvalueKey: true }, // 已指派标志, 0 未指派 1已指派
+          { paramsKey: 'desicion', valueKey: null }, // 改善方案 目前只有pdca
+          { paramsKey: 'receiveEmpId', valueKey: null }, // 指派人
+          { paramsKey: 'receiveEmpName', valueKey: null }, // 指派人姓名
+          { paramsKey: 'needApproveFlag', valueKey: null } // 是否需要审核 true 是 false 不需要
+        ]
+      }
+    ],
+    row1: { hasJoin: true, name: '管理员x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '重新发送改善通知' },
+    selectDetails: {
+      name: '查看原因详情',
+      key: 'approveReason',
+      componentName: 'disagree',
+      disabled: true,
+      labelKey: 'textarea'
+    }
+  },
+  {
+    taskType: 4,
+    checkResult: 1,
+    taskName: '指派改善任务',
+    currentPermission: 5,
+    btnList: [
+      {
+        name: '申请更换改善人',
+        componentName: null,
+        nextPermission: 5,
+        nextPermissionName: '改善者',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false } // 接收人姓名
+        ]
+      },
+      {
+        name: '制定改善方案',
+        componentName: 'pdca',
+        nextPermission: 6,
+        nextPermissionName: '单位负责人',
+        pdcaSetting: 'p',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+          { paramsKey: 'taskPlan', valueKey: null} // 接收人姓名
+        ]
+      }
+    ],
+    row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
+    row2: {hasJoin: true, name: '指派x为改善人', key: 'receiveEmpName'},
+    selectDetails: null
+  },
+  {
+    taskType: 5,
+    checkResult: 1,
+    taskName: '改善回复',
+    currentPermission: 1,
+    btnList: [
+      {
+        name: '不通过',
+        componentName: null,
+        nextPermission: 4,
+        nextPermissionName: '单位负责人',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+        ]
+      },
+      {
+        name: '通过',
+        componentName: null,
+        nextPermission: 4,
+        nextPermissionName: '单位负责人',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+        ]
+      }
+    ],
+    row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '提交了改善回复'},
+    selectDetails: {
+      name: '查看改善回复详情',
+      componentName: 'write-back',
+      hasAnyData: true, // 是否有多个数据需要回显(多个数据对多个key)
+      dataKey: [
+        {key: 'approveReason', isOutvalueKey: false, labelKey: 'textarea'}, // 回复内容
+        {key: 'improveUrl', isOutvalueKey: false, labelKey: 'filePath'} // 回复图片地址(多个用逗号分隔)
+      ],
+      disabled: true
+    },
+  },
+  {
+    taskType: 6,
+    checkResult: 1,
+    taskName: '更换改善人',
+    currentPermission: 5,
+    btnList: [
+      {
+        name: '申请更换改善人',
+        componentName: null,
+        nextPermission: 4,
+        nextPermissionName: '单位负责人',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false } // 接收人姓名
+        ]
+      },
+      {
+        name: '制定改善方案',
+        componentName: 'pdca',
+        pdcaSetting: 'p',
+        nextPermission: 4,
+        nextPermissionName: '单位负责人',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+          { paramsKey: 'taskPlan', valueKey: null }, // 接收人姓名
+        ]
+      }
+    ],
+    row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
+    row2: {hasJoin: true, name: '指派x为改善人', key: 'receiveEmpName'},
+    selectDetails: null
+  },
+  {
+    taskType: 7,
+    checkResult: 1,
+    taskName: '更换改善人驳回',
+    currentPermission: 5,
+    btnList: [
+      {
+        name: '制定改善方案',
+        componentName: 'pdca',
+        pdcaSetting: 'p',
+        nextPermission: 4,
+        nextPermissionName: '单位负责人',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+          { paramsKey: 'taskPlan', valueKey: null } // plan
+        ]
+      }
+    ],
+    row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '驳回更换改善人的申请'},
+    selectDetails: null
+  },
+  {
+    taskType: 8,
+    checkResult: 1,
+    taskName: '改善计划plan通过',
+    currentPermission: 5,
+    btnList: [
+      {
+        name: '记录改善方案',
+        componentName: 'pdca',
+        pdcaSetting: 'pdca',
+        nextPermission: 4,
+        nextPermissionName: '单位负责人',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+          { paramsKey: 'taskPlan', valueKey: null }, // plan
+          { paramsKey: 'taskAction', valueKey: null }, // action
+          { paramsKey: 'taskDoRequestList', valueKey: null }, // do
+          { paramsKey: 'taskCheckRequestList', valueKey: null } // check
+        ]
+      }
+    ],
+    row1: { hasJoin: true, name: '单位管理员x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '通过改善计划审核,开始执行改善计划'},
+    selectDetails: {
+      name: '查看改善计划详情',
+      componentName: 'pdca',
+      pdcaSetting: 'p',
+      key: 'taskPlan',
+      disabled: true,
+      labelKey: 'plan'
+    }
+  },
+  {
+    taskType: 9,
+    checkResult: 1,
+    taskName: '改善计划plan不通过',
+    currentPermission: 5,
+    btnList: [
+      {
+        name: '制定改善方案',
+        componentName: 'pdca',
+        pdcaSetting: 'p',
+        nextPermission: 4,
+        nextPermissionName: '单位负责人',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+          { paramsKey: 'taskPlan', valueKey: null } // plan
+        ]
+      }
+    ],
+    row1: { hasJoin: true, name: '单位管理员x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '建议重新完善改善计划'},
+    selectDetails: {
+      name: '查看原因详情',
+      key: 'approveReason',
+      componentName: 'disagree',
+      disabled: true,
+      labelKey: 'textarea'
+    }
+  },
+  {
+    taskType: 10,
+    checkResult: 1,
+    taskName: '改善方案PDCA通过',
+    currentPermission: 1,
+    btnList: [
+      {
+        name: '不通过',
+        componentName: 'disagree',
+        nextPermission: 4,
+        nextPermissionName: '单位负责人',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+          { paramsKey: 'approveReason', valueKey: 'approveReason', isOutvalueKey: false } // 原因
+        ]
+      },
+      {
+        name: '通过',
+        componentName: null,
+        nextPermission: 4,
+        nextPermissionName: '单位负责人',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false } // 接收人姓名
+        ]
+      }
+    ],
+    row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '通过了改善方案(PDCA)'},
+    selectDetails: {
+      name: '查看改善方案详情',
+      componentName: 'pdca',
+      pdcaSetting: 'pdca',
+      hasAnyData: true, // 是否有多个数据需要回显(多个数据对多个key)
+      dataKey: [
+        {key: 'taskPlan', isOutvalueKey: false, labelKey: 'plan'}, // plan
+        {key: 'taskDoRequestList', isOutvalueKey: false, labelKey: 'do'}, // do
+        {key: 'taskCheckRequestList', isOutvalueKey: false, labelKey: 'check'}, // check
+        {key: 'taskAction', isOutvalueKey: false, labelKey: 'action'}, // action
+      ],
+      disabled: true
+    }
+  },
+  {
+    taskType: 11,
+    checkResult: 1,
+    taskName: '改善方案PDCA不通过',
+    currentPermission: 5,
+    btnList: [
+      {
+        name: '制定改善方案',
+        componentName: 'pdca',
+        pdcaSetting: 'p',
+        nextPermission: 4,
+        nextPermissionName: '单位负责人',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+          { paramsKey: 'taskPlan', valueKey: null } // plan
+        ]
+      },
+    ],
+    row1: { hasJoin: true, name: '单位管理员x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '建议重新完善改善计划'},
+    selectDetails: {
+      name: '查看原因详情',
+      key: 'approveReason',
+      componentName: 'disagree',
+      disabled: true,
+      labelKey: 'textarea'
+    }
+  },
+  {
+    taskType: 12,
+    checkResult: 1,
+    taskName: '申请更改改善人',
+    currentPermission: 4,
+    btnList: [
+      {
+        name: '更改改善人',
+        componentName: 'assign-mission',
+        nextPermission: 5,
+        nextPermissionName: '改善者',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'appointFlag', valueKey: 'appointFlag', isOutvalueKey: true }, // 已指派标志, 0 未指派 1已指派
+          { paramsKey: 'desicion', valueKey: null }, // 改善方案 目前只有pdca 0
+          { paramsKey: 'receiveEmpId', valueKey: null }, // 指派人
+          { paramsKey: 'receiveEmpName', valueKey: null }, // 指派人姓名
+          { paramsKey: 'needApproveFlag', valueKey: null } // 是否需要审核 true 是 false 不需要
+        ]
+      },
+      {
+        name: '驳回请求',
+        componentName: null,
+        nextPermission: 5,
+        nextPermissionName: '改善者',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
+          { paramsKey: 'approveReason', valueKey: null } // 原因
+        ]
+      },
+    ],
+    row1: { hasJoin: true, name: '改善人x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '申请更换改善人'},
+    selectDetails: null
+  },
+  {
+    taskType: 13,
+    checkResult: 1,
+    taskName: '制定改善方案',
+    currentPermission: 4,
+    btnList: [
+      {
+        name: '不通过',
+        componentName: 'disagree',
+        nextPermission: 5,
+        nextPermissionName: '改善者',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
+          { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false }, // 改善plan
+          { paramsKey: 'approveReason', valueKey: null } // 审核不通过原因
+        ]
+      },
+      {
+        name: '通过',
+        componentName: null,
+        nextPermission: 5,
+        nextPermissionName: '改善者',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
+          { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false } // 改善plan
+        ]
+      },
+    ],
+    row1: { hasJoin: true, name: '改善者x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '提交了改善计划(PLAN)'},
+    selectDetails: {
+      name: '查看改善计划详情',
+      componentName: 'pdca',
+      pdcaSetting: 'p',
+      key: 'taskPlan',
+      disabled: true,
+      labelKey: 'plan'
+    }
+  },
+  {
+    taskType: 14,
+    checkResult: 1,
+    taskName: '制定改善方案plan',
+    currentPermission: 4,
+    btnList: [
+      {
+        name: '不通过',
+        componentName: 'disagree',
+        nextPermission: 5,
+        nextPermissionName: '改善者',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
+          { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false }, // 改善plan
+          { paramsKey: 'approveReason', valueKey: null } // 审核不通过原因
+        ]
+      },
+      {
+        name: '通过',
+        componentName: null,
+        nextPermission: 5,
+        nextPermissionName: '改善者',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
+          { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false } // 改善plan
+        ]
+      },
+    ],
+    row1: { hasJoin: true, name: '改善者x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '提交了改善计划(PLAN)'},
+    selectDetails: {
+      name: '查看改善计划详情',
+      key: 'taskPlan',
+      componentName: 'pdca',
+      pdcaSetting: 'p',
+      nextPermission: 5,
+      disabled: true,
+      labelKey: 'plan'
+    }
+  },
+  {
+    taskType: 15,
+    checkResult: 1,
+    taskName: '制定改善方案',
+    currentPermission: 4,
+    btnList: [
+      {
+        name: '不通过',
+        componentName: 'disagree',
+        nextPermission: 5,
+        nextPermissionName: '改善者',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
+          { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false }, // 改善plan
+          { paramsKey: 'approveReason', valueKey: null } // 审核不通过原因
+        ]
+      },
+      {
+        name: '通过',
+        componentName: null,
+        nextPermission: 5,
+        nextPermissionName: '改善者',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
+          { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false } // 改善plan
+        ]
+      },
+    ],
+    row1: { hasJoin: true, name: '改善者x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '提交了改善计划(PLAN)'},
+    selectDetails: {
+      name: '查看改善计划详情',
+      key: 'taskPlan',
+      componentName: 'pdca',
+      pdcaSetting: 'pdca',
+      nextPermission: 5,
+      disabled: true,
+      labelKey: 'plan'
+    }
+  },
+  {
+    taskType: 16,
+    checkResult: 1,
+    taskName: '记录改善方案pdca',
+    currentPermission: 4,
+    btnList: [
+      {
+        name: '不通过',
+        componentName: 'disagree',
+        nextPermission: 5,
+        nextPermissionName: '改善者',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
+          { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false }, // 改善plan
+          { paramsKey: 'taskAction', valueKey: 'taskAction', isOutvalueKey: false }, // action
+          { paramsKey: 'taskDoRequestList', valueKey: 'taskDoRequestList', isOutvalueKey: false }, // do
+          { paramsKey: 'taskCheckRequestList', valueKey: 'taskCheckRequestList', isOutvalueKey: false }, // check
+          { paramsKey: 'approveReason', valueKey: null } // 不通过原因
+        ]
+      },
+      {
+        name: '通过',
+        componentName: null,
+        nextPermission: 1,
+        nextPermissionName: '管理员',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'adminId', isOutvalueKey: true }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'adminName', isOutvalueKey: true }, // 接收人姓名
+          { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false }, // 改善plan
+          { paramsKey: 'taskAction', valueKey: 'taskAction', isOutvalueKey: false }, // action
+          { paramsKey: 'taskDoRequestList', valueKey: 'taskDoRequestList', isOutvalueKey: false }, // do
+          { paramsKey: 'taskCheckRequestList', valueKey: 'taskCheckRequestList', isOutvalueKey: false }, // check
+          { paramsKey: 'improveScheme', valueKey: 'improveScheme', isOutvalueKey: false }, // 改善方案名称
+        ]
+      },
+    ],
+    row1: { hasJoin: true, name: '改善者x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '提交了改善方案(PDCA)'},
+    selectDetails: {
+      name: '查看改善方案详情',
+      hasAnyData: true, // 是否有多个数据需要回显(多个数据对多个key)
+      dataKey: [
+        {key: 'taskPlan', isOutvalueKey: false, labelKey: 'plan'}, // plan
+        {key: 'taskDoRequestList', isOutvalueKey: false, labelKey: 'do'}, // do
+        {key: 'taskCheckRequestList', isOutvalueKey: false, labelKey: 'check'}, // check
+        {key: 'taskAction', isOutvalueKey: false, labelKey: 'action'}, // action
+      ],
+      componentName: 'pdca',
+      pdcaSetting: 'pdca',
+      disabled: true
+    }
+  },
+  {
+    taskType: 17,
+    checkResult: 1,
+    taskName: '改善方案plan通过',
+    currentPermission: 4,
+    btnList: [],
+    row1: { hasJoin: true, name: '管理员x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '完成改善,本次任务结束'},
+    selectDetails: {
+      name: '查看改善方案详情',
+      hasAnyData: true, // 是否有多个数据需要回显(多个数据对多个key)
+      dataKey: [
+        {key: 'taskPlan', isOutvalueKey: false, labelKey: 'plan'}, // plan
+        {key: 'taskDoRequestList', isOutvalueKey: false, labelKey: 'do'}, // do
+        { key: 'taskCheckRequestList', isOutvalueKey: false, labelKey: 'check'}, // check
+        {key: 'taskAction', isOutvalueKey: false, labelKey: 'action'}, // action
+      ],
+      componentName: 'pdca',
+      pdcaSetting: 'pdca',
+      disabled: true
+    }
+  },
+  {
+    taskType: 18,
+    checkResult: 1,
+    taskName: '改善方案plan通过, 改善回复通过',
+    currentPermission: 4,
+    btnList: [
+      {
+        name: '指派改善任务',
+        componentName: 'assign-mission',
+        nextPermission: 5,
+        nextPermissionName: '改善者',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'appointFlag', valueKey: 'appointFlag', isOutvalueKey: true }, // 已指派标志, 0 未指派 1已指派
+          { paramsKey: 'desicion', valueKey: null }, // 改善方案 目前只有pdca
+          { paramsKey: 'receiveEmpId', valueKey: null }, // 指派人
+          { paramsKey: 'receiveEmpName', valueKey: null }, // 指派人姓名
+          { paramsKey: 'needApproveFlag', valueKey: null } // 是否需要审核 true 是 false 不需要
+        ]
+      }
+    ],
+    row1: { hasJoin: true, name: '管理员x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '改善方案不通过,重新执行改善流程'},
+    selectDetails: {
+      name: '查看原因详情',
+      key: 'approveReason',
+      componentName: 'disagree',
+      disabled: true,
+      labelKey: 'textarea'
+    }
+  },
+];
+
+export default taskTypeList;
+
+/**
+ * taskType: 4 => 制定改善方案 =>  pdcaSetting: 'p',要根据前面的改善工具决定p 还是pdca
+ * taskType: 6,
+ * taskType: 7,
+ * taskType: 9,
+ * taskType: 11,
+ */

+ 84 - 189
pages/mission-details/setting.js

@@ -3,15 +3,12 @@
 const taskTypeList = [
   {
     taskType: 1, // 任务当前状态
-    currentPermission: 4, // 当前任务在哪
     taskName: '创建任务',
     checkResult: 3, // 只针对第一步操作区分按钮是显示 (指派改善任务还是改善回复) 1不用管 2 改善回复 3 制定改善方案
     btnList: [ //  底部按钮
       {
         name: '不认可', // 按钮显示名字
         componentName: 'disagree', // 点击后跳转的组件名
-        nextPermission: 1, // 接收人id
-        nextPermissionName: '管理员', // 接收人名字
         params: [ // 接口保存的参数配置(paramsKey: 参数名, valueKey: 使用详情接口key, 为null, 表示当前组件可自输入, isOutvalueKey: 是否详情接一级key, 不是则在当前任务状态中找key(如pfmTaskCirculationList下面))
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -23,8 +20,6 @@ const taskTypeList = [
       {
         name: '指派改善任务',
         componentName: 'assign-mission',
-        nextPermission: 5,
-        nextPermissionName: '改善者',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -64,15 +59,12 @@ const taskTypeList = [
   },
   {
     taskType: 1,
-    currentPermission: 4,
     taskName: '创建任务',
     checkResult: 2,
     btnList: [
       {
         name: '不认可',
         componentName: 'disagree',
-        nextPermission: 1,
-        nextPermissionName: '管理员',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -84,8 +76,6 @@ const taskTypeList = [
       {
         name: '改善回复',
         componentName: 'write-back',
-        nextPermission: 1,
-        nextPermissionName: '管理员',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -109,15 +99,12 @@ const taskTypeList = [
   },
   {
     taskType: 2,
-    currentPermission: 1,
     taskName: '不认可',
     checkResult: 1,
     btnList: [
       {
         name: '重新发送',
         componentName: 'disagree',
-        nextPermission: 4,
-        nextPermissionName: '单位负责人',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -130,8 +117,6 @@ const taskTypeList = [
         name: '发送给其他人',
         componentName: 'personnel',
         keys: null,
-        nextPermission: 4,
-        nextPermissionName: '单位负责人',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -152,15 +137,12 @@ const taskTypeList = [
   },
   {
     taskType: 3,
-    currentPermission: 4,
     taskName: '重新发送',
     checkResult: 1,
     btnList: [
       {
         name: '指派改善任务',
         componentName: 'assign-mission',
-        nextPermission: 4,
-        nextPermissionName: '单位负责人',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -186,13 +168,10 @@ const taskTypeList = [
     taskType: 4,
     checkResult: 1,
     taskName: '指派改善任务',
-    currentPermission: 5,
     btnList: [
       {
         name: '申请更换改善人',
         componentName: null,
-        nextPermission: 5,
-        nextPermissionName: '改善者',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -203,16 +182,14 @@ const taskTypeList = [
       {
         name: '制定改善方案',
         componentName: 'pdca',
-        nextPermission: 6,
-        nextPermissionName: '单位负责人',
-        pdcaSetting: 'p',
-        params: [
-          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
-          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
-          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
-          { paramsKey: 'taskPlan', valueKey: null} // 接收人姓名
-        ]
+        // pdcaSetting: 'p',
+        // params: [
+        //   { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+        //   { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+        //   { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+        //   { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+        //   { paramsKey: 'taskPlan', valueKey: null} // 接收人姓名
+        // ]
       }
     ],
     row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
@@ -223,25 +200,20 @@ const taskTypeList = [
     taskType: 5,
     checkResult: 1,
     taskName: '改善回复',
-    currentPermission: 1,
     btnList: [
       {
         name: '不通过',
         componentName: null,
-        nextPermission: 4,
-        nextPermissionName: '单位负责人',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
-        ] // todo
+        ]
       },
       {
         name: '通过',
         componentName: null,
-        nextPermission: 4,
-        nextPermissionName: '单位负责人',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -267,13 +239,10 @@ const taskTypeList = [
     taskType: 6,
     checkResult: 1,
     taskName: '更换改善人',
-    currentPermission: 5,
     btnList: [
       {
         name: '申请更换改善人',
         componentName: null,
-        nextPermission: 4,
-        nextPermissionName: '单位负责人',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -284,16 +253,14 @@ const taskTypeList = [
       {
         name: '制定改善方案',
         componentName: 'pdca',
-        pdcaSetting: 'p',
-        nextPermission: 4,
-        nextPermissionName: '单位负责人',
-        params: [
-          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
-          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
-          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
-          { paramsKey: 'taskPlan', valueKey: null }, // 接收人姓名
-        ]
+        // pdcaSetting: 'p',
+        // params: [
+        //   { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+        //   { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+        //   { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+        //   { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+        //   { paramsKey: 'taskPlan', valueKey: null }, // 接收人姓名
+        // ]
       }
     ],
     row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
@@ -304,21 +271,18 @@ const taskTypeList = [
     taskType: 7,
     checkResult: 1,
     taskName: '更换改善人驳回',
-    currentPermission: 5,
     btnList: [
       {
         name: '制定改善方案',
         componentName: 'pdca',
-        pdcaSetting: 'p',
-        nextPermission: 4,
-        nextPermissionName: '单位负责人',
-        params: [
-          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
-          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
-          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
-          { paramsKey: 'taskPlan', valueKey: null } // plan
-        ]
+        // pdcaSetting: 'p',
+        // params: [
+        //   { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+        //   { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+        //   { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+        //   { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+        //   { paramsKey: 'taskPlan', valueKey: null } // plan
+        // ]
       }
     ],
     row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
@@ -329,24 +293,21 @@ const taskTypeList = [
     taskType: 8,
     checkResult: 1,
     taskName: '改善计划plan通过',
-    currentPermission: 5,
     btnList: [
       {
         name: '记录改善方案',
         componentName: 'pdca',
-        pdcaSetting: 'pdca',
-        nextPermission: 4,
-        nextPermissionName: '单位负责人',
-        params: [
-          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
-          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
-          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
-          { paramsKey: 'taskPlan', valueKey: null }, // plan
-          { paramsKey: 'taskAction', valueKey: null }, // action
-          { paramsKey: 'taskDoRequestList', valueKey: null }, // do
-          { paramsKey: 'taskCheckRequestList', valueKey: null } // check
-        ]
+        // pdcaSetting: 'pdca',
+        // params: [
+        //   { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+        //   { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+        //   { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+        //   { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+        //   { paramsKey: 'taskPlan', valueKey: null }, // plan
+        //   { paramsKey: 'taskAction', valueKey: null }, // action
+        //   { paramsKey: 'taskDoRequestList', valueKey: null }, // do
+        //   { paramsKey: 'taskCheckRequestList', valueKey: null } // check
+        // ]
       }
     ],
     row1: { hasJoin: true, name: '单位管理员x', key: 'establishEmpName' },
@@ -364,21 +325,18 @@ const taskTypeList = [
     taskType: 9,
     checkResult: 1,
     taskName: '改善计划plan不通过',
-    currentPermission: 5,
     btnList: [
       {
         name: '制定改善方案',
         componentName: 'pdca',
-        pdcaSetting: 'p',
-        nextPermission: 4,
-        nextPermissionName: '单位负责人',
-        params: [
-          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
-          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
-          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
-          { paramsKey: 'taskPlan', valueKey: null } // plan
-        ]
+        // pdcaSetting: 'p',
+        // params: [
+        //   { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+        //   { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+        //   { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+        //   { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+        //   { paramsKey: 'taskPlan', valueKey: null } // plan
+        // ]
       }
     ],
     row1: { hasJoin: true, name: '单位管理员x', key: 'establishEmpName' },
@@ -387,21 +345,19 @@ const taskTypeList = [
       name: '查看原因详情',
       key: 'approveReason',
       componentName: 'disagree',
+      isOutvalueKey: false,
       disabled: true,
-      labelKey: 'textarea'
+      labelKey: 'textarea',
     }
   },
   {
     taskType: 10,
     checkResult: 1,
     taskName: '改善方案PDCA通过',
-    currentPermission: 1,
     btnList: [
       {
         name: '不通过',
         componentName: 'disagree',
-        nextPermission: 4,
-        nextPermissionName: '单位负责人',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -413,8 +369,6 @@ const taskTypeList = [
       {
         name: '通过',
         componentName: null,
-        nextPermission: 4,
-        nextPermissionName: '单位负责人',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -443,21 +397,18 @@ const taskTypeList = [
     taskType: 11,
     checkResult: 1,
     taskName: '改善方案PDCA不通过',
-    currentPermission: 5,
     btnList: [
       {
         name: '制定改善方案',
         componentName: 'pdca',
-        pdcaSetting: 'p',
-        nextPermission: 4,
-        nextPermissionName: '单位负责人',
-        params: [
-          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
-          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
-          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
-          { paramsKey: 'taskPlan', valueKey: null } // plan
-        ]
+        // pdcaSetting: 'p',
+        // params: [
+        //   { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+        //   { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+        //   { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+        //   { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+        //   { paramsKey: 'taskPlan', valueKey: null } // plan
+        // ]
       },
     ],
     row1: { hasJoin: true, name: '单位管理员x', key: 'establishEmpName' },
@@ -465,6 +416,7 @@ const taskTypeList = [
     selectDetails: {
       name: '查看原因详情',
       key: 'approveReason',
+      isOutvalueKey: false,
       componentName: 'disagree',
       disabled: true,
       labelKey: 'textarea'
@@ -474,13 +426,10 @@ const taskTypeList = [
     taskType: 12,
     checkResult: 1,
     taskName: '申请更改改善人',
-    currentPermission: 4,
     btnList: [
       {
         name: '更改改善人',
         componentName: 'assign-mission',
-        nextPermission: 5,
-        nextPermissionName: '改善者',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -494,8 +443,6 @@ const taskTypeList = [
       {
         name: '驳回请求',
         componentName: null,
-        nextPermission: 5,
-        nextPermissionName: '改善者',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -512,59 +459,37 @@ const taskTypeList = [
   {
     taskType: 13,
     checkResult: 1,
-    taskName: '制定改善方案',
-    currentPermission: 4,
+    taskName: '制定改善方案中',
     btnList: [
       {
-        name: '不通过',
-        componentName: 'disagree',
-        nextPermission: 5,
-        nextPermissionName: '改善者',
-        params: [
-          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
-          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
-          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
-          { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false }, // 改善plan
-          { paramsKey: 'approveReason', valueKey: null } // 审核不通过原因
-        ]
-      },
-      {
-        name: '通过',
+        name: '申请更换改善人',
         componentName: null,
-        nextPermission: 5,
-        nextPermissionName: '改善者',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
-          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
-          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
-          { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false } // 改善plan
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false } // 接收人姓名
         ]
       },
+      {
+        name: '制定改善方案',
+        componentName: 'pdca',
+        pdcaSetting: 'pdca',
+        params: [],
+      }
     ],
-    row1: { hasJoin: true, name: '改善者x', key: 'establishEmpName' },
-    row2: {hasJoin: false, name: '提交了改善计划(PLAN)'},
-    selectDetails: {
-      name: '查看改善计划详情',
-      componentName: 'pdca',
-      pdcaSetting: 'p',
-      key: 'taskPlan',
-      disabled: true,
-      labelKey: 'plan'
-    }
+    row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
+    row2: {hasJoin: true, name: '指派x为改善人', key: 'receiveEmpName'},
+    selectDetails: null
   },
   {
     taskType: 14,
     checkResult: 1,
     taskName: '制定改善方案plan',
-    currentPermission: 4,
     btnList: [
       {
         name: '不通过',
         componentName: 'disagree',
-        nextPermission: 5,
-        nextPermissionName: '改善者',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -577,8 +502,6 @@ const taskTypeList = [
       {
         name: '通过',
         componentName: null,
-        nextPermission: 5,
-        nextPermissionName: '改善者',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -603,60 +526,37 @@ const taskTypeList = [
   {
     taskType: 15,
     checkResult: 1,
-    taskName: '制定改善方案',
-    currentPermission: 4,
+    taskName: '制定改善方案中pdca',
     btnList: [
       {
-        name: '不通过',
-        componentName: 'disagree',
-        nextPermission: 5,
-        nextPermissionName: '改善者',
-        params: [
-          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
-          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
-          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
-          { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false }, // 改善plan
-          { paramsKey: 'approveReason', valueKey: null } // 审核不通过原因
-        ]
-      },
-      {
-        name: '通过',
+        name: '申请更换改善人',
         componentName: null,
-        nextPermission: 5,
-        nextPermissionName: '改善者',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
-          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
-          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
-          { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false } // 改善plan
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false } // 接收人姓名
         ]
       },
+      {
+        name: '制定改善方案',
+        componentName: 'pdca',
+        pdcaSetting: 'pdca',
+        params: [],
+      }
     ],
-    row1: { hasJoin: true, name: '改善者x', key: 'establishEmpName' },
-    row2: {hasJoin: false, name: '提交了改善计划(PLAN)'},
-    selectDetails: {
-      name: '查看改善计划详情',
-      key: 'taskPlan',
-      componentName: 'pdca',
-      pdcaSetting: 'pdca',
-      nextPermission: 5,
-      disabled: true,
-      labelKey: 'plan'
-    }
+    row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
+    row2: {hasJoin: true, name: '指派x为改善人', key: 'receiveEmpName'},
+    selectDetails: null
   },
   {
     taskType: 16,
     checkResult: 1,
     taskName: '记录改善方案pdca',
-    currentPermission: 4,
     btnList: [
       {
         name: '不通过',
         componentName: 'disagree',
-        nextPermission: 5,
-        nextPermissionName: '改善者',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -672,8 +572,6 @@ const taskTypeList = [
       {
         name: '通过',
         componentName: null,
-        nextPermission: 1,
-        nextPermissionName: '管理员',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -706,8 +604,7 @@ const taskTypeList = [
   {
     taskType: 17,
     checkResult: 1,
-    taskName: '改善方案plan通过',
-    currentPermission: 4,
+    taskName: '改善方案pdca通过',
     btnList: [],
     row1: { hasJoin: true, name: '管理员x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '完成改善,本次任务结束'},
@@ -728,14 +625,11 @@ const taskTypeList = [
   {
     taskType: 18,
     checkResult: 1,
-    taskName: '改善方案plan通过, 改善回复通过',
-    currentPermission: 4,
+    taskName: '改善方案pdca不通过',
     btnList: [
       {
         name: '指派改善任务',
         componentName: 'assign-mission',
-        nextPermission: 5,
-        nextPermissionName: '改善者',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
           { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
@@ -752,6 +646,7 @@ const taskTypeList = [
     selectDetails: {
       name: '查看原因详情',
       key: 'approveReason',
+      isOutvalueKey: false,
       componentName: 'disagree',
       disabled: true,
       labelKey: 'textarea'

+ 93 - 93
pages/mission/model.js

@@ -5,99 +5,99 @@ export default {
   state: {
     // 任务详情
     missionDetails: {
-      appointFlag: false, // 已指派标志, 0 未指派 1已指派
-      checkGroupId: 1, // 查核组id
-      checkGroupName: "测试群组", // 查核组名称
-      checkId: 1,
-      checkItemId: 1, // 查核项目id
-      checkItemName: "测试点", // 查核项目名称
-      checkPlan: "第1/3次查核计划", // 查核计划
-      checkPointId: 1, // 查核要点id
-      checkPointName: "测试", // 查核要点名称(查核项)
-      createDate: "2021-02-03T01:44:09.000+0000", // 任务创建时间
-      createEmpId: 1, //创建人
-      createEmpName: "管理员", // 创建人姓名
-      delFlag: false,
-      deptId: 1, // 单位id
-      deptName: "测试部门", // 单位名称
-      desicion: "", // 改善工具:0,进行PDCA改善 1,暂不改善
-      endFlag: false, // 完结标识
-      id: 1, // 任务id
-      needApproveFlag: false, // 需要审核标志
-      recordTime: "2021-02-03 09:44:17", // 最终修改时间
-      situationId: 1, // 情景id
-      situationName: "测试情景", // 情景名称
-      taskType: 10, // 任务当前状态
-      updateTime: "2021-02-03T01:44:16.000+0000", // 修改时间 (发送时间)
-      improveEmpName: '', //改善人
-      improveEmpId: '', //改善人id
-      buttonDisplayFlag: 1,  // 底部按钮显示隐藏 0 不展示 1展示
-      checkResult: 2, // 《只针对第一步操作区分按钮是显示 指派改善任务还是改善回复》 1不用管 2 改善回复 3 制定改善方案
-      checkDetailResult: '查核结果xxx', // 查核结果
-      checkDetailId: '', // 查核明细id
-      adminId: 1,  // 管理员id
-      adminName: '管理员丫', // 管理员名称
-      pfmTaskCirculationList: [
-        {
-          createTime: "2021-02-03T01:44:42.000+0000", // 创建时间
-          establishEmpId: 1, // 员工id
-          establishEmpName: "管理员",// 发送人员名称
-          id: 1, // 流转记录id
-          receiveEmpId: 1, // 接收人id
-          receiveEmpName: "管理员吧",// 接收人姓名
-          taskAction: "", // 改善处置 action
-          taskId: 1, // 任务id
-          taskPlan: "噢噢噢噢",// plan整改计划
-          taskType: 8, // 流转状态
-          improveScheme: '', // 改善方案名称
-          approveReason: '审核意见', // 审核意见/原因
-          taskDoRequestList: [ // do
-            {
-              taskDoId:"mock",  // 过程记录id
-              taskDoProcess:"mock", // 过程记录内容
-              taskDoPlan:"mock" // 计划日期
-            }
-          ],
-          taskCheckRequestList: [// check
-            {
-              taskCheckId:"mock",  // 改善确认id
-              taskCheckProcess:"mock", // 改善确认记录过程
-              taskCheckPlan:"mock",  // 改善确认计划日期
-              taskCheckEffect:"mock" //改善确认改善效果
-            }
-          ],
-          recordTime: 'recordTime' //测量时间
-        },
-        {
-          createTime: "2021-02-03T01:44:42.000+0000", // 创建时间
-          establishEmpId: 1, // 员工id
-          establishEmpName: "管理员",// 发送人员名称
-          id: 1, // 流转记录id
-          receiveEmpId: 1, // 接收人id
-          receiveEmpName: "管理员吧",// 接收人姓名
-          taskAction: "", // 改善处置 action
-          taskId: 1, // 任务id
-          taskPlan: "plan内容",// plan整改计划
-          taskType: 10, // 流转状态
-          improveScheme: '', // 改善方案名称
-          approveReason: '审核意见', // 审核意见
-          taskDoRequestList: [ // do
-            {
-              taskDoId:"mock",  // 过程记录id
-              taskDoProcess:"mock", // 过程记录内容
-              taskDoPlan:"2020-12-12 00:01:50" // 计划日期
-            }
-          ],
-          taskCheckRequestList: [// check
-            {
-              taskCheckId:"mock",  // 改善确认id
-              taskCheckProcess:"mock", // 改善确认记录过程
-              taskCheckPlan:"mock",  // 改善确认计划日期
-              taskCheckEffect:"mock" //改善确认改善效果
-            }
-          ]
-        },
-      ]
+      // appointFlag: false, // 已指派标志, 0 未指派 1已指派
+      // checkGroupId: 1, // 查核组id
+      // checkGroupName: "测试群组", // 查核组名称
+      // checkId: 1,
+      // checkItemId: 1, // 查核项目id
+      // checkItemName: "测试点", // 查核项目名称
+      // checkPlan: "第1/3次查核计划", // 查核计划
+      // checkPointId: 1, // 查核要点id
+      // checkPointName: "测试", // 查核要点名称(查核项)
+      // createDate: "2021-02-03T01:44:09.000+0000", // 任务创建时间
+      // createEmpId: 1, //创建人
+      // createEmpName: "管理员", // 创建人姓名
+      // delFlag: false,
+      // deptId: 1, // 单位id
+      // deptName: "测试部门", // 单位名称
+      // desicion: "", // 改善工具:0,进行PDCA改善 1,暂不改善
+      // endFlag: false, // 完结标识
+      // id: 1, // 任务id
+      // needApproveFlag: true, // 需要审核标志
+      // recordTime: "2021-02-03 09:44:17", // 最终修改时间
+      // situationId: 1, // 情景id
+      // situationName: "测试情景", // 情景名称
+      // taskType: 13, // 任务当前状态
+      // updateTime: "2021-02-03T01:44:16.000+0000", // 修改时间 (发送时间)
+      // improveEmpName: '', //改善人
+      // improveEmpId: '', //改善人id
+      // buttonDisplayFlag: 1,  // 底部按钮显示隐藏 0 不展示 1展示
+      // checkResult: 2, // 《只针对第一步操作区分按钮是显示 指派改善任务还是改善回复》 1不用管 2 改善回复 3 制定改善方案
+      // checkDetailResult: '查核结果xxx', // 查核结果
+      // checkDetailId: '', // 查核明细id
+      // adminId: 1,  // 管理员id
+      // adminName: '管理员丫', // 管理员名称
+      // pfmTaskCirculationList: [
+      //   {
+      //     createTime: "2021-02-03T01:44:42.000+0000", // 创建时间
+      //     establishEmpId: 1, // 员工id
+      //     establishEmpName: "管理员",// 发送人员名称
+      //     id: 1, // 流转记录id
+      //     receiveEmpId: 1, // 接收人id
+      //     receiveEmpName: "管理员吧",// 接收人姓名
+      //     taskAction: "", // 改善处置 action
+      //     taskId: 1, // 任务id
+      //     taskPlan: "噢噢噢噢",// plan整改计划
+      //     taskType: 8, // 流转状态
+      //     improveScheme: '', // 改善方案名称
+      //     approveReason: '审核意见', // 审核意见/原因
+      //     taskDoRequestList: [ // do
+      //       {
+      //         taskDoId:"mock",  // 过程记录id
+      //         taskDoProcess:"mock", // 过程记录内容
+      //         taskDoPlan:"mock" // 计划日期
+      //       }
+      //     ],
+      //     taskCheckRequestList: [// check
+      //       {
+      //         taskCheckId:"mock",  // 改善确认id
+      //         taskCheckProcess:"mock", // 改善确认记录过程
+      //         taskCheckPlan:"mock",  // 改善确认计划日期
+      //         taskCheckEffect:"mock" //改善确认改善效果
+      //       }
+      //     ],
+      //     recordTime: 'recordTime' //测量时间
+      //   },
+      //   {
+      //     createTime: "2021-02-03T01:44:42.000+0000", // 创建时间
+      //     establishEmpId: 1, // 员工id
+      //     establishEmpName: "管理员",// 发送人员名称
+      //     id: 1, // 流转记录id
+      //     receiveEmpId: 1, // 接收人id
+      //     receiveEmpName: "管理员吧",// 接收人姓名
+      //     taskAction: "", // 改善处置 action
+      //     taskId: 1, // 任务id
+      //     taskPlan: "plan内容",// plan整改计划
+      //     taskType: 13, // 流转状态
+      //     improveScheme: '', // 改善方案名称
+      //     approveReason: '审核意见', // 审核意见
+      //     taskDoRequestList: [ // do
+      //       {
+      //         taskDoId:"mock",  // 过程记录id
+      //         taskDoProcess:"mock", // 过程记录内容
+      //         taskDoPlan:"2020-12-12 00:01:50" // 计划日期
+      //       }
+      //     ],
+      //     taskCheckRequestList: [// check
+      //       {
+      //         taskCheckId:"mock",  // 改善确认id
+      //         taskCheckProcess:"mock", // 改善确认记录过程
+      //         taskCheckPlan:"mock",  // 改善确认计划日期
+      //         taskCheckEffect:"mock" //改善确认改善效果
+      //       }
+      //     ]
+      //   },
+      // ]
     }
   },
   mutations: {

+ 5 - 1
pages/model.js

@@ -9,6 +9,8 @@ import situationDetail from './situationDetail/model.js';
 import creatingSituations from "./creatingSituations/model.js";
 import calendar from './calendar/model.js';
 import todayCheck from './todayCheck/model.js';
+import planList from './planList/model.js';
+import checkList from "./checkList/model.js";
 
 export default module = {
   login,
@@ -22,5 +24,7 @@ export default module = {
   todayCheck,
   situationsCenter,
   situationDetail,
-  creatingSituations
+  creatingSituations,
+	planList,
+	checkList
 }

+ 14 - 0
pages/planList/model.js

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

+ 193 - 0
pages/planList/planList.vue

@@ -0,0 +1,193 @@
+<template>
+	<view class="planList-page">
+		<scroll-view class="list-box" scroll-y="true" :style="{'height':listHeight+'rpx'}">
+			<view class="item-box" v-for="(item,index) in planList" @click="gotoCheckList">
+				<view class="row1">
+					<text class="title">{{item.name}}</text>
+					<view class="compeleted-box" v-if="item.isCompeleted">
+						<text class="compeleted-text" >已完成</text>
+					</view>
+					<view class="continued-box" v-if="item.isContinued">
+						<text class="continued-text" >进行中</text>
+					</view>
+				</view>
+				<view class="row2">
+					<text class="TobeDistributed">剩余1个单位待分配</text>
+					<text class="startEndTime">起止时间:2020-12-26 ~ 2020-12-18</text>
+				</view>
+			</view>
+		</scroll-view>
+		<view class="btn-distribution" @click="gotoCheckList" v-if="isShowDistribution">
+			<text class="btn-text">批量分配</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				situationID:'',//情境id
+				planList:[],//计划列表
+				firstFlag:1,//是否为第一次分配的标志,为1时表示是第一次,弹框提示
+				isShowDistribution:true,//是否显示批量分配按钮
+				listHeight:1125,//列表高度
+			}
+		},
+		onLoad({ situationId }){ // situationId:情景id
+		  this.situationID=situationId;
+		},
+		created: function() {
+			this.$store.dispatch({
+				type: 'planList/commActions',
+				payload: {
+					key: 'planList',
+					data:{
+						situationId:this.situationID
+					}
+				}
+			}).then((data) => {
+				if (data) {
+					this.planList=data.map((item,index)=>{	
+						if(item.empList.length!=item.toDistribute){
+							this.firstFlag=0;
+						}
+						if(!this.compareTime(item.startDate)){
+							this.isShowDistribution=false;
+							this.listHeight=1200;
+						}
+						return {
+							id:item.id,
+							name:item.name,
+							startDate:item.startDate,
+							endDate:item.endDate,
+							status:item.status,
+							isCompeleted:item.status==3?true:false,
+							isContinued:item.status==2?true:false,
+							toDistribute:item.toDistribute,
+						}
+					});
+					if(this.firstFlag==1){
+						uni.showModal({
+							title:'提示',
+							content:'您的分配工作量较大,建议使用批量分配功能',
+						  showCancel:false
+						})
+					}
+				}
+			});
+		},
+		methods: {
+			compareTime(time){
+				let myDate=new Date();
+				let startDate=time.replace(/-/g,"/");
+				startDate=Date.parse(startDate);
+				if(myDate>startDate){
+					return false;
+				}else{
+					return true;
+				}
+			},
+			gotoCheckList(){
+				//跳转到查核列表
+				uni.navigateTo({
+					url: `/pages/creatingSituations/creatingSituations?situationId=${this.situationID}`
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.planList-page{
+		height: 100%;
+		.list-box{
+			// height: 1125rpx;
+			.item-box{
+				width: 100%;
+				height: 125rpx;
+				background: #FFFFFF;
+				border: 0.62rpx solid #DADEE6;
+				.row1{
+					margin-top: 30rpx;
+					margin-left: 25rpx;
+					margin-right: 25rpx;
+					.title{
+						font-size: 25rpx;
+						font-family: SourceHanSansCN-Bold, SourceHanSansCN;
+						font-weight: bold;
+						color: #292C33;
+						float: left;
+					}
+					.compeleted-box{
+						width: 75rpx;
+						height: 31.25rpx;
+						border-radius: 8px;
+						background: rgba(41, 204, 150, 0.1);
+						text-align: center;
+						float: right;
+						.compeleted-text{
+							font-size: 17.5rpx;
+							font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+							font-weight: 500;
+							color: #29CC96;
+							line-height: 31.25rpx;
+						}
+					}
+					.continued-box{
+						width: 75rpx;
+						height: 31.25rpx;
+						border-radius: 8px;
+						background: rgba(255, 204, 102, 0.1);
+						text-align: center;
+						float: right;
+						.continued-text{
+							width: 75rpx;
+							height: 31.25rpx;
+							font-size: 17.5rpx;
+							font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+							font-weight: 500;
+							color: #FFAA00;
+							line-height: 31.25rpx;
+						}
+					}
+				}
+				.row2{
+					margin-left: 25rpx;
+					margin-top: 75rpx;
+					margin-right: 25rpx;
+					.TobeDistributed{
+						font-size: 20rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #666E80;
+						float: left;
+					}
+					.startEndTime{
+						font-size: 20rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #666E80;
+						float: right;
+					}
+				}
+			}
+		}
+		.btn-distribution {
+			width: 750rpx;
+			height: 75rpx;
+			background: #3377FF;
+			position: fixed;
+			bottom: 0rpx;
+		
+			.btn-text {
+				font-size: 22.5rpx;
+				font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+				font-weight: 400;
+				color: #FFFFFF;
+				line-height: 75rpx;
+				margin-left: 352.5rpx;
+			}
+		}
+	}
+</style>

+ 19 - 0
pages/planList/server.js

@@ -0,0 +1,19 @@
+import { creatRequest } from '../../utils/request.js';
+
+const requestList = {
+	//计划列表
+	planList:{
+		method:'GET',
+		url: 'plan/list'
+	},
+	//分配单位查核人员
+	batchDistribute:{
+		method:'POST',
+		url: 'plan/batchDistribute'
+	},
+
+};
+export const commServer = ({ key, data }) => {
+  let obj = requestList[key];
+  return creatRequest(obj, data);
+}

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

@@ -66,9 +66,11 @@
 						}
 					}
 				}).then((data)=>{
-					uni.navigateTo({
-						url: '/pages/home/home'
-					});
+					if(data){
+						uni.navigateTo({
+							url: '/pages/home/home'
+						});
+					}
 				});
 			}
 		},

+ 223 - 0
pages/situationDetail/components/bottom-popup.vue

@@ -0,0 +1,223 @@
+<template>
+	<view class="popup-page" v-show="showModalStatus">
+		<view class="popup-box" v-show="showModalStatus">
+			<view class="item-box" v-for="(item,index) in planList">
+				<view class="radio-item" @click="toggleSelect(item,index)">
+					<image class="icon" :src="`/static/${item.isChecked ? 'check-radio' : 'check-no'}.png`"></image>
+				</view>
+				<text :class="item.nameClass">{{item.name}}({{item.startDate}} ~ {{item.endDate}})</text>
+				<view class="compeleted-box" v-if="item.isCompeleted">
+					<text class="compeleted-text" >已完成</text>
+				</view>
+				<view class="continued-box" v-if="item.isContinued">
+					<text class="continued-text" >进行中</text>
+				</view>
+				<image class="checked-pic" v-if="item.isContinued" src="../../../static/checkStatus.png"></image>
+			</view>
+		</view>
+		<view class="btn-confirm" @click="saveChange">
+			<text class="btn-text">确定</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:{
+			situationID:String,
+		},
+		data() {
+			return {
+				currentType:this.type,//当前类型
+				selectedPlanID:'',//选择的计划id
+				showModalStatus:false,//查核计划选择弹框
+				flag:-3,//是否为进行中计划,判断下一个未开始的查核计划
+				planList:[],//查核计划列表
+				arrUnstarted:[],//未开始计划数组
+			}
+		},
+		created: function() {
+			this.$store.dispatch({
+				type: 'situationDetail/commActions',
+				payload: {
+					key: 'planList',
+					data:{
+						situationId:this.situationID
+					}
+				}
+			}).then((data) => {
+				if (data) {
+					this.planList=data.map((item,index)=>{				
+						if(item.status==1){
+							this.arrUnstarted.push(item);
+							this.flag=this.arrUnstarted[0].id;
+						}
+						return {
+							id:item.id,
+							name:item.name,
+							startDate:item.startDate,
+							endDate:item.endDate,
+							status:item.status,
+							isCompeleted:item.status==3?true:false,
+							isContinued:item.status==2?true:false,
+							isChecked:false,
+							nameClass:item.id==this.flag?'item-text':'disable-text',
+						}
+					});
+				}
+			});
+		},
+		methods: {
+			show(){
+				this.showModalStatus=true;
+			},	
+			hide(){
+				this.showModalStatus=false;
+			},
+			hidePopupBox(){
+				this.hide();
+			},
+			toggleSelect(item,index) {
+				this.planList.map((item,index)=>{
+					item.isChecked=false;
+				});
+				if(item.id==this.flag){
+					this.planList[index].isChecked=true;
+					this.selectedPlanID=item.id;
+				}
+				else{
+					return;
+				}
+				
+			},
+			saveChange(){
+				this.$store.dispatch({
+					type: 'situationDetail/commActions',
+					payload: {
+						key: 'planAdvance',
+						data:{
+							checkId:this.selectedPlanID
+						}
+					}
+				}).then((data)=>{
+					if(data){
+						this.hide();
+					}
+				});
+			},
+		},
+	}
+</script>
+
+<style lang="less">
+	.popup-page{
+		height: 100%;
+		width: 100%;
+		position: fixed;
+		top: 0rpx;
+		left: 0rpx;
+		// background: rgba(0,0,0,0.5);
+		background-color: #FFFFFF;
+		.popup-box{
+			width: 100%;
+			position: fixed;
+			top: 0rpx;
+			left: 0rpx;
+			z-index: 2000;
+			background-color: #FFFFFF;
+			display: flex;
+			flex-direction: column;
+			overflow: hidden;
+			.item-box{
+				width: 100%;
+				height: 87.5rpx;
+				border: 0.62rpx solid #DADEE6;
+				.radio-item {
+					float: left;
+					margin-left: 25rpx;
+					margin-top: 30rpx;
+				
+					.icon {
+						width: 25rpx;
+						height: 25rpx;
+					}
+				}
+				.item-text{
+					font-size: 22.5rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #292C33;
+					line-height: 87.5rpx;
+					margin-left: 25rpx;
+					float: left;
+				}
+				.disable-text{
+					font-size: 22.5rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #666E80;
+					line-height: 87.5rpx;
+					margin-left: 25rpx;
+					float: left;
+				}
+				.compeleted-box{
+					width: 75rpx;
+					height: 31.25rpx;
+					border-radius: 8px;
+					background: rgba(41, 204, 150, 0.1);
+					text-align: center;
+					float: left;
+					margin-top: 28.12rpx;
+					.compeleted-text{
+						font-size: 17.5rpx;
+						font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+						font-weight: 500;
+						color: #29CC96;
+						line-height: 31.25rpx;
+					}
+				}
+				.continued-box{
+					width: 75rpx;
+					height: 31.25rpx;
+					border-radius: 8px;
+					background: rgba(255, 204, 102, 0.1);
+					text-align: center;
+					float: left;
+					margin-top: 28.12rpx;
+					.continued-text{
+						width: 75rpx;
+						height: 31.25rpx;
+						font-size: 17.5rpx;
+						font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+						font-weight: 500;
+						color: #FFAA00;
+						line-height: 31.25rpx;
+					}
+				}
+				.checked-pic{
+					width: 19.37rpx;
+					height: 14.37rpx;
+					float: right;
+					margin-top: 36.87rpx;
+					margin-right: 25rpx;
+				}
+			}
+		}
+		.btn-confirm {
+			width: 750rpx;
+			height: 75rpx;
+			background: #3377FF;
+			position: fixed;
+			bottom: 0rpx;
+
+			.btn-text {
+				font-size: 22.5rpx;
+				font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+				font-weight: 400;
+				color: #FFFFFF;
+				line-height: 75rpx;
+				margin-left: 352.5rpx;
+			}
+		}
+	}
+</style>

+ 15 - 0
pages/situationDetail/server.js

@@ -11,6 +11,21 @@ const requestList = {
 		method:'DELETE',
 		url: 'situation'
 	},
+	//查核计划列表
+	planList:{
+		method:'GET',
+		url: 'plan/list'
+	},
+	//提前开始计划内查核
+	planAdvance:{
+		method:'GET',
+		url: 'plan/advance'
+	},
+	//创建计划外查核
+	createCheck:{
+		method:'GET',
+		url: 'plan/unplannedCheck'
+	},
 };
 export const commServer = ({ key, data }) => {
   let obj = requestList[key];

+ 64 - 12
pages/situationDetail/situationDetail.vue

@@ -45,22 +45,24 @@
 			<view class="btn-center" v-show="isChecker" @click="startUnplanned">
 				<text class="center-text">开始一次计划外查核</text>
 			</view>
-			<view class="btn-left" v-show="isUnplanned">
+			<view class="btn-left" v-show="isUnplanned" @click="createCheck">
 				<text class="left-text">新建一个计划外查核</text>
 			</view>
-			<view class="btn-right" v-show="isUnplanned">
+			<view class="btn-right" v-show="isUnplanned" @click="startCheck">
 				<text class="right-text">提前开始一个计划内查核</text>
 			</view>
 		</view>
+		<popup ref="popup" :situationID="situationID"></popup>
 	</view>
 </template>
 
 <script>
+	import popup from './components/bottom-popup.vue'
 	export default {
 		data() {
 			return {
 				nowPermission:'',//用户当前权限
-				situaionID:'',//情境id
+				situationID:'',//情境id
 				checkGroupName:'',//查核组名
 				checkStatus:'',//查核状态
 				name:'',//查核名
@@ -78,8 +80,15 @@
 				isCheckLeader:false,//是否为查核组长
 				isChecker:false,//是否为查核者
 				isUnplanned:false,//是否计划外查核
+				checkFlag:'',//计划查核标志,是新建还是提前开始
+				checkID:'',//新建查核计划时,计划列表中的前一个计划 id
+				checkItemList:[],//时间区间包含当前时间的item
+				
 			}
 		},
+		onLoad({ situationId }){ // situationId:情景id
+		  this.situationID=situationId;
+		},
 		created: function() {
 			this.nowPermission=uni.getStorageSync('nowPermission');
 			console.log(this.nowPermission);
@@ -88,13 +97,12 @@
 			this.isChecker=this.nowPermission==3?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.situaionID=uni.getStorageSync('situaionID');
 			this.$store.dispatch({
 				type: 'situationDetail/commActions',
 				payload: {
 					key: 'situationDetail',
 					data:{
-						id:this.situaionID
+						id:this.situationID
 					}
 				}
 			}).then((data) => {
@@ -125,7 +133,7 @@
 								payload: {
 									key: 'situationDelete',
 									data:{
-										id:this.situaionID
+										id:this.situationID
 									}
 								}
 							}).then((data) => {
@@ -146,7 +154,7 @@
 				
 			},
 			editSituation(){
-				let editEnable=this.compareTime();
+				let editEnable=this.compareTime(this.firstCheckTime);
 				if(editEnable){
 					uni.navigateTo({
 						url: '/pages/creatingSituations/creatingSituations'
@@ -160,9 +168,9 @@
 					})
 				}
 			},
-			compareTime(){
+			compareTime(time){
 				let myDate=new Date();
-				let firstCheckTime=this.firstCheckTime.replace(/-/g,"/");
+				let firstCheckTime=time.replace(/-/g,"/");
 				firstCheckTime=Date.parse(firstCheckTime);
 				if(myDate>firstCheckTime){
 					return false;
@@ -173,25 +181,69 @@
 			gotoCheckPage(){
 				//跳转到查核列表
 				uni.navigateTo({
-					url: '/pages/creatingSituations/creatingSituations'
+					url: `/pages/creatingSituations/creatingSituations?situationId=${this.situationID}`
 				});
 			},
 			gotoImprovePage(){
 				//跳转到改善列表
 				uni.navigateTo({
-					url: '/pages/creatingSituations/creatingSituations'
+					 url: `/pages/improve-mission-list/improve-mission-list?situationId=${this.situationID}`
 				});
 			},
 			gotoPlanPage(){
 				//跳转到计划列表
 				uni.navigateTo({
-					url: '/pages/creatingSituations/creatingSituations'
+					url: `/pages/planList/planList?situationId=${this.situationID}`
 				});
 			},
 			startUnplanned(){
 				this.isUnplanned=true;
 				this.isChecker=false;
 			},
+			startCheck(){
+				this.$refs.popup.show();
+			},
+			createCheck(){
+				this.$store.dispatch({
+					type: 'situationDetail/commActions',
+					payload: {
+						key: 'planList',
+						data:{
+							situationId:this.situationID
+						}
+					}
+				}).then((data) => {
+					if (data) {
+						data.map((item,index)=>{
+							if(this.compareTime(item.startDate)==false||this.compareTime(item.endDate)){
+								this.checkItemList.push(item);
+							}
+							else{
+								return;
+							}
+						});
+						this.$store.dispatch({
+							type: 'situationDetail/commActions',
+							payload: {
+								key: 'createCheck',
+								data:{
+									checkId:this.checkItemList[0].id
+								}
+							}
+						}).then((data) => {
+							if(data){
+								uni.navigateTo({
+									 url: `/pages/creatingSituations/creatingSituations`
+								});
+							}
+							
+						});
+					}
+				});
+			}
+		},
+		components: {
+			popup,
 		}
 	}
 </script>

+ 14 - 7
pages/situationsCenter/situationsCenter.vue

@@ -103,9 +103,8 @@
 				});
 			},
 			gotoDetail(id){
-				uni.setStorageSync('situaionID', id);
 				uni.navigateTo({
-					url: '/pages/situationDetail/situationDetail'
+					url: `/pages/situationDetail/situationDetail?situationId=${id}`
 				});
 			},
 			searchByKeywords(event){
@@ -279,9 +278,11 @@
 							float: right;
 						}
 						.title{
+							height: 22.5rpx;
 							margin-left: 20rpx;
-							// margin-top: 31.25rpx;
-							padding-top: 25rpx;
+							margin-top: 25rpx;
+							display: flex;
+							align-items: center;
 							.title-name{
 								font-size: 22.5rpx;
 								font-family: SourceHanSansCN-Bold, SourceHanSansCN;
@@ -292,8 +293,11 @@
 						.check-group{
 							margin-left: 20rpx;
 							margin-top: 15rpx;
-							margin-bottom: 7.5rpx;
-							.group.text{
+							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;
@@ -302,7 +306,10 @@
 						}
 						.row{
 							margin-left: 20rpx;
-							margin-top: 17.5rpx;
+							margin-bottom: 17.5rpx;
+							display: flex;
+							align-items: center;
+							height: 20rpx;
 							.situation-check{
 								width: 20rpx;
 								height: 20rpx;

BIN=BIN
static/checkStatus.png


+ 0 - 0
static/icon-xia-dis.png → static/icon-next-dis.png


+ 0 - 0
static/icon-xia.png → static/icon-next.png


+ 0 - 0
static/icon-shang-dis.png → static/icon-pre-dis.png


+ 0 - 0
static/icon-shang.png → static/icon-pre.png


+ 3 - 3
utils/request.js

@@ -107,7 +107,7 @@ function notifyException(resArr, additional) {
       showCancel: false
     });
     console.error(`请求错误: ${error.errMsg}`);
-    return null;
+    return false;
   } else if (res.data.code !== 'SUCCESS') {
     const { code, msg } = res.data;
     if (code === '410' || code === '401') {
@@ -132,7 +132,7 @@ function notifyException(resArr, additional) {
       });
     }
     console.error(`错误信息: ${msg}`);
-    return null;
+    return false;
   } else if (additional.successMessage) {
     let msg = additional.successMessage;
     uni.showModal({
@@ -141,7 +141,7 @@ function notifyException(resArr, additional) {
       showCancel: false
     });
   }
-  return res.data.data;
+  return res.data.data ? res.data.data : true;
 }
 
 export {

+ 2 - 2
utils/requestUrl.js

@@ -1,7 +1,7 @@
 // export const URL = 'http://192.168.38.140:8088'; // 李磊
 // export const URL = 'http://192.9.216.251:8088'; // 建德
 // export const URL = 'http://192.168.38.174:8088';
-export const URL = 'http://192.168.1.45:8088'; //内网
-// export const URL = 'http://s1.nsloop.com:5137';  // 外网
+// export const URL = 'http://192.168.1.45:8088'; //内网
+export const URL = 'http://s1.nsloop.com:5137';  // 外网