“yst 4 лет назад
Родитель
Сommit
12f5400908
65 измененных файлов с 3825 добавлено и 736 удалено
  1. 14 8
      App.vue
  2. 1 0
      README.md
  3. 8 6
      components/date-time-pick-group/date-time-pick-group.vue
  4. 23 9
      components/date-time-picker/date-time-picker.vue
  5. 63 0
      components/tm-simple-btn-group/tm-simple-btn-group.vue
  6. 2 2
      components/tm-steps/tm-steps.vue
  7. 3 11
      components/tm-trees/row.vue
  8. 34 10
      components/tm-upload-img/tm-upload-img.vue
  9. 90 89
      manifest.json
  10. 13 0
      package-lock.json
  11. 1 0
      package.json
  12. 286 0
      pages/creatingSituations/components/checkMap.vue
  13. 137 0
      pages/creatingSituations/components/checkMapAdd.vue
  14. 151 0
      pages/creatingSituations/components/checkMapDetail.vue
  15. 284 0
      pages/creatingSituations/components/checkPlan.vue
  16. 170 0
      pages/creatingSituations/components/checkRent.vue
  17. 124 25
      pages/creatingSituations/components/condition.vue
  18. 189 0
      pages/creatingSituations/components/situationPreview.vue
  19. 50 29
      pages/creatingSituations/components/theme.vue
  20. 129 12
      pages/creatingSituations/creatingSituations.vue
  21. 35 0
      pages/creatingSituations/model.js
  22. 26 0
      pages/creatingSituations/server.js
  23. 195 169
      pages/messages/messages.vue
  24. 114 26
      pages/mission-action/components/assign-mission.vue
  25. 65 3
      pages/mission-action/components/disagree.vue
  26. 140 0
      pages/mission-action/components/modal.vue
  27. 100 52
      pages/mission-action/components/pdca-components/do-and-check.vue
  28. 24 25
      pages/mission-action/components/pdca-components/one-textarea.vue
  29. 164 21
      pages/mission-action/components/pdca.vue
  30. 75 37
      pages/mission-action/components/personnel.vue
  31. 66 9
      pages/mission-action/components/write-back.vue
  32. 69 9
      pages/mission-action/mission-action.vue
  33. 146 24
      pages/mission-details/mission-details.vue
  34. 593 110
      pages/mission-details/setting.js
  35. 1 0
      pages/mission/components/list-item.vue
  36. 62 2
      pages/mission/mission.vue
  37. 44 13
      pages/mission/model.js
  38. 8 3
      pages/mission/server.js
  39. 3 0
      pages/model.js
  40. 0 0
      static/blue-arrow.png
  41. 0 0
      static/bottom-img.png
  42. 0 0
      static/disable-img.png
  43. 0 0
      static/icon-add-dis.png
  44. 0 0
      static/icon-add.png
  45. BIN
      static/icon-blueMore.png
  46. 0 0
      static/icon-del.png
  47. 0 0
      static/icon-jinyong.png
  48. 0 0
      static/icon-map-dis.png
  49. 0 0
      static/icon-map.png
  50. 0 0
      static/icon-qiyong.png
  51. 0 0
      static/icon-shang-dis.png
  52. 0 0
      static/icon-shang.png
  53. 0 0
      static/icon-xia-dis.png
  54. 0 0
      static/icon-xia.png
  55. 0 0
      static/incon-more.png
  56. BIN
      static/list-close.png
  57. BIN
      static/list-open.png
  58. 0 0
      static/theme.png
  59. 0 0
      static/theme0.png
  60. 0 0
      static/theme1.png
  61. 0 0
      static/top-img.png
  62. 14 0
      utils/arrFilter.js
  63. 72 0
      utils/dateHandle.js
  64. 3 1
      utils/requestUrl.js
  65. 34 31
      utils/ws.js

+ 14 - 8
App.vue

@@ -36,20 +36,15 @@
 
 <style lang="less">
 	/*每个页面公共css */
-
+	
 	body,
 	uni-app,
 	uni-page,
 	uni-page-wrapper,
 	uni-page-body {
 		height: 100%;
-		font-size: 12.5rpx;
-		line-height: 18.75rpx;
-	}
-
-	body,
-	uni-app,
-	uni-page {
+		font-size: 20rpx;
+		line-height: 30rpx;
 		background-color: #F5F6FA;
 	}
 
@@ -85,4 +80,15 @@
 			color: #3377FF;
 		}
 	}
+	// 新建情境样式start
+	.creatingSituations {
+		.title {
+			padding-bottom: 35rpx;
+			padding-left: 25rpx;
+			font-size: 30rpx;
+			line-height: 45rpx;
+			color: #292C33;
+		}
+	}
+	// 新建情境样式end
 </style>

+ 1 - 0
README.md

@@ -8,6 +8,7 @@
 2. 树形控件:tm-trees。
 3. 底部tabBar:tm-tabbar。
 4. 单选列表组合/下拉式单选列表组合:tm-radio-group。使用步骤看tm-radio-group/README.md
+5. 底部简单双按钮:tm-simple-btn-group。
 
 ### 公共组件的注册方式
 ---

+ 8 - 6
components/date-time-pick-group/date-time-pick-group.vue

@@ -10,7 +10,7 @@
         :pickType="'start'"
         placeholder="开始日期时间"
 			  @change="bindChange" />
-				 <text class="inner">~</text>
+			<text class="inner">~</text>
 			<date-time-picker
 				:fields="fields"
 				:start="dateObj.startTime"
@@ -105,7 +105,7 @@ export default {
 .date-pick {
 	display: flex;
 	align-items: center;
-	height: 25rpx;
+	// height: 25rpx;
 
 	.label {
 		margin-right: 3.12rpx;
@@ -118,11 +118,13 @@ export default {
 		display: flex;
 		justify-content: space-between;
 		align-items: center;
-		width: 238.28rpx;
-		height: 25rpx;
-		background: #ffffff;
-		border-radius: 3.12rpx;
+		border-radius: 5rpx;
 		border: 0.78rpx solid #e1e4ed;
+		padding: 9.37rpx 25rpx;
+		// width: 238.28rpx;
+		// height: 25rpx;
+		white-space: nowrap;
+		background: #ffffff;
 		color: #2e2f33;
 		box-sizing: border-box;
 

+ 23 - 9
components/date-time-picker/date-time-picker.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="date-time">
 		<picker mode="multiSelector" :range="range" range-key="text" @change="change" @columnchange="columnchange" :value="value" :disabled="disabled">
-			<view class="content" :class="{ placeholder: !dateStr }">
+			<view class="content" :class="{ placeholder: !dateStr }" :style="{height: pickHeight}">
 				<text>{{ dateStr ? dateStr : placeholder }}</text>
         <slot></slot>
 			</view>
@@ -64,7 +64,17 @@ export default {
     defaultValue: {
       type: String,
       default: ""
-    }
+    },
+    // 高度
+    height: {
+      type: Number,
+      default: 40
+    },
+    // 下标
+    pickIndex: {
+      type: Number,
+      default: 0
+    },
   },
 
   /**
@@ -79,7 +89,6 @@ export default {
       dtEnd: null // 有效范围结束
     };
   },
-
   /**
    * 监听数据
    */
@@ -89,7 +98,7 @@ export default {
       // 设置默认值
       this.setDefaultValue();
     },
-    start(){
+    start(newVal, oldVal){
        if(newVal != oldVal){
         this.setDisabled()
       }
@@ -100,6 +109,11 @@ export default {
       }
     }
   },
+  computed: {
+    pickHeight() {
+      return (this.height * 750 / 1200).toFixed(2) + 'rpx';
+    }
+  },
   /**
    * 组件初次加载完成
    */
@@ -147,14 +161,14 @@ export default {
         year = this.range[0][this.value[0]].number; // 年
         let dtStr = `${year}`;
         this.setDateStr(dtStr);
-        this.$emit("change", utils.formatDate(dtStr), this.pickType);
+        this.$emit("change", utils.formatDate(dtStr), this.pickType, this.pickIndex);
         return;
       } else if (this.fields == "month") {
         year = this.range[0][this.value[0]].number; // 年
         month = this.range[1][this.value[1]].number; // 月
         let dtStr = `${year}-${month}`;
         this.setDateStr(dtStr);
-        this.$emit("change", utils.formatDate(dtStr), this.pickType);
+        this.$emit("change", utils.formatDate(dtStr), this.pickType, this.pickIndex);
         return;
       } else if (this.fields == "day") {
         year = this.range[0][this.value[0]].number; // 年
@@ -162,7 +176,7 @@ export default {
         day = this.range[2][this.value[2]].number; // 日
         let dtStr = `${year}-${month}-${day}`;
         this.setDateStr(dtStr);
-        this.$emit("change", utils.formatDate(dtStr), this.pickType);
+        this.$emit("change", utils.formatDate(dtStr), this.pickType, this.pickIndex);
         return;
       } else if (this.fields == "hour") {
         year = this.range[0][this.value[0]].number; // 年
@@ -172,7 +186,7 @@ export default {
         day = this.range[2][this.value[2]].number; // 日
         let dtStr = `${year}-${month}-${day} ${hour}`;
         this.setDateStr(dtStr);
-        this.$emit("change", utils.formatDate(dtStr), this.pickType);
+        this.$emit("change", utils.formatDate(dtStr), this.pickType, this.pickIndex);
         return;
       } else if (this.fields == "minute") {
         year = this.range[0][this.value[0]].number; // 年
@@ -182,7 +196,7 @@ export default {
         minute = this.range[4][this.value[4]].number; // 分
         let dtStr = `${year}-${month}-${day} ${hour}:${minute}`;
         this.setDateStr(dtStr);
-        this.$emit("change", utils.formatDate(dtStr), this.pickType);
+        this.$emit("change", utils.formatDate(dtStr), this.pickType, this.pickIndex);
         return;
       }
     },

+ 63 - 0
components/tm-simple-btn-group/tm-simple-btn-group.vue

@@ -0,0 +1,63 @@
+<template>
+	<view class="tm-simple-btn-group">
+		<button v-for="(item, index) in options" 
+			@click="changeStep(item.id)"
+			:key="index">{{item.label}}</button>
+	</view>
+</template>
+
+<script>
+	/**
+	 * 底部组件,只有两个按钮的简单组件(只有文字没图标),按钮内容需要自行传入数据
+	 * props:{
+		 * options: [{id:按钮的唯一id,会在点击后返回,label:显示的文本内容}]
+		 * callback: 点击事件返回函数,返回参数是按钮id
+		 * }
+	 */
+	export default {
+		props: {
+			options: {
+				type: Array,
+				default: [
+					{id: 'pre', label: '上一步'},
+					{id: 'next', label: '下一步'}
+				]
+			}
+		},
+		methods: {
+			changeStep: function(type) {
+				this.$emit('callback', type);
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.tm-simple-btn-group {
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		display: flex;
+		flex-direction: row;
+		border-top: 0.62rpx solid #DADEE6;
+		width: 100%;
+		height: 75rpx;
+		
+		button {
+			border-radius: 0;
+			width: 50%;
+			height: 100%;
+			font-size: 22.5rpx;
+			line-height: 75rpx;
+			color: #3377FF;
+			background-color: #fff;
+			&:last-child {
+				color: #fff;
+				background-color: #3377FF;
+			}
+			&:after {
+				border: 0;
+			}
+		}
+	}
+</style>

+ 2 - 2
components/tm-steps/tm-steps.vue

@@ -49,7 +49,7 @@
 			flex-direction: row;
 			justify-content: space-between;
 			align-items: center;
-			margin: 37.5rpx 25rpx 50rpx 25rpx;
+			padding: 37.5rpx 25rpx 50rpx 25rpx;
 			
 			.item {
 				display: flex;
@@ -114,7 +114,7 @@
 		}
 		.component-wrap {
 			width: 100%;
-			height: calc(100% - 101.87rpx);
+			height: calc(100% - 160rpx);
 		}
 	}
 </style>

+ 3 - 11
components/tm-trees/row.vue

@@ -27,6 +27,7 @@
 
 <script>
 	import {_stopPropagation} from "../../utils/compatible.js";
+	import {arrFilter} from "../../utils/arrFilter.js";
 	
 	export default {
 		data() {
@@ -61,20 +62,11 @@
 		methods: {
 			rowClick: function() {
 				if(!this.hasChildren) return;
-				this.openKeysHandle(this.keysHandle(this.open, this.openKeys));
+				this.openKeysHandle(arrFilter(this.option.key, this.openKeys));
 			},
 			checkedHandle: function(e) {
 				_stopPropagation(e);
-				this.checkedKeysHandle(this.keysHandle(this.checked, this.checkedKeys));
-			},
-			keysHandle: function(condition, oldKeys) {
-				let keys = [];
-				if(condition) {
-					keys = oldKeys.filter((key)=> key !== this.option.key);
-				} else {
-					keys = [...oldKeys, this.option.key];
-				}
-				return keys;
+				this.checkedKeysHandle(arrFilter(this.option.key, this.checkedKeys));
 			},
 			openKeysHandle: function(arr) {
 				this.$emit('open-keys', arr);

+ 34 - 10
components/tm-upload-img/tm-upload-img.vue

@@ -2,7 +2,7 @@
 	<view class="tm-upload-img">
 		<view class="row" @click="uploadPicture">
 			<view class="label-view">
-				<text>上传图片</text>
+				<text>{{ label }}</text>
 			</view>
 			<text class="placeholder" v-show="filePaths.length === 0">点击上传图片</text>
 			<image class="img-icon" src="/static/img-icon.png"></image>
@@ -42,29 +42,52 @@
       isMultiple: {
 				type: Boolean,
 				default: false
-			}
+      },
+      // 是否禁用
+      disabled: {
+        type: Boolean,
+        default: false
+      },
+      label: {
+        type: String,
+        default: '上传图片'
+      },
+      // 下标
+      pickIndex: {
+        type: Number,
+        default: 0
+      }
 		},
 		methods: {
 			// 上传图片
 			uploadPicture() {
+        if(this.disabled) return;
 				uni.chooseImage({
-					count: this.isMultiple ? 0 : 1, // 是否多选
+					count: this.isMultiple ? 9 : 1, // 是否多选
 					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
 					sourceType: ['album'], //从相册选择
 					success: res1 => {
-						let filePathStr = res1.tempFilePaths.join(',');
-						console.log(filePathStr)
+            console.log(filePathStr)
+            // res1.tempFilePaths.map(item => {
+            // })
 						uni.uploadFile({
-							url: `${URL}/eduscreen/upload/picture`,
+              // url: `${URL}/eduscreen/upload/picture`,
+              url: `${URL}/imed/pfm/file/uploadImg`,
 							fileType: 'image',
-							filePath: filePathStr,
-							name: 'file',
+							filePath: res1.tempFilePaths[0],
+              name: 'file',
+              onUploadProgress(progressEvent) {
+                var percentCompleted = Math.round(
+                  (progressEvent.loaded * 100) / progressEvent.total
+                );
+                console.log('进度条:', percentCompleted, progressEvent);
+              },
 							success: res2 => {
 								if (res2.statusCode == 200) {
 									let data = JSON.parse(res2.data || '{}');
 									if (parseInt(data.meta.code, 10) === 200) {
 										const { viewUrl, picture } = data.body;
-										this.$emit('changeFilePaths', [...this.filePaths, viewUrl])
+										this.$emit('changeFilePaths', [...this.filePaths, viewUrl], this.pickIndex)
 										this.picture = picture;
 									} else {
 										uni.showToast({
@@ -93,7 +116,8 @@
 			},
 			// 删除图片
 			delImg(i) {
-				this.$emit('changeFilePaths',  this.filePaths.filter((item, index) => index != i))
+        if(this.disabled) return;
+				this.$emit('changeFilePaths', this.filePaths.filter((item, index) => index != i), this.pickIndex);
 			}
 		}
 	}

+ 90 - 89
manifest.json

@@ -1,91 +1,92 @@
 {
-	"name" : "TracerMethodology",
-	"appid" : "__UNI__E410614",
-	"description": "",
-	"versionName": "1.0.0",
-	"versionCode": "100",
-	"transformPx": false,
-	"app-plus": { /* 5+App特有相关 */
-		"usingComponents": true,
-		"nvueCompiler": "uni-app",
-		"splashscreen": {
-			"alwaysShowBeforeRender": true,
-			"waiting": true,
-			"autoclose": true,
-			"delay": 0
-		},
-		"modules": { /* 模块配置 */
-
-		},
-		"distribute": { /* 应用发布信息 */
-			"android": { /* android打包配置 */
-				"permissions": [
-					"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-					"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-					"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-					"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.CAMERA\"/>",
-					"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-					"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-					"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-					"<uses-feature android:name=\"android.hardware.camera\"/>",
-					"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-				]
-			},
-			"ios": { /* ios打包配置 */
-
-			},
-			"sdkConfigs": { /* SDK配置 */
-
-			}
-		}
-	},
-	"quickapp": { /* 快应用特有相关 */
-
-	},
-	"mp-weixin": { /* 小程序特有相关 */
-		"appid": "",
-		"setting": {
-			"urlCheck": false
-		},
-		"usingComponents": true
-	},
-	"h5" : {
-	    "title" : "追踪方法学",
-	    "router" : {
-	        "mode" : "hash",
-	        "base" : "/TracerMethodology/"
-	    },
-	    "devServer" : {
-	        "port" : 8901,
-	        "headers" : {
-	            "Access-Control-Allow-Origin" : "*"
-	        },
-	        "proxy" : {
-	            "/TracerMethodology/api/*" : {
-	                "pathRewrite" : {
-	                    "^/TracerMethodology/api" : "/topro"
-	                },
-	                // "target" : "http://192.168.1.55:8901", // 内网
-	                "target" : "http://s1.nsloop.com:5137", // 外网
-	                "changeOrigin" : true,
-	                "secure" : false,
-	                "logLevel" : "debug"
-	            }
-	        }
-	    },
-	    "optimization" : {
-	        "treeShaking" : {
-	            "enable" : true
-	        }
-	    },
-	    "networkTimeout" : {
-	        "request" : 5000
-	    }
-	}
+    "name" : "TracerMethodology",
+    "appid" : "__UNI__E410614",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    "app-plus" : {
+        /* 5+App特有相关 */
+        "usingComponents" : true,
+        "nvueCompiler" : "uni-app",
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        "modules" : {},
+        /* 模块配置 */
+        "distribute" : {
+            /* 应用发布信息 */
+            "android" : {
+                /* android打包配置 */
+                "permissions" : [
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            "ios" : {},
+            /* ios打包配置 */
+            "sdkConfigs" : {
+                "ad" : {}
+            }
+        }
+    },
+    /* SDK配置 */
+    "quickapp" : {},
+    /* 快应用特有相关 */
+    "mp-weixin" : {
+        /* 小程序特有相关 */
+        "appid" : "",
+        "setting" : {
+            "urlCheck" : false
+        },
+        "usingComponents" : true
+    },
+    "h5" : {
+        "title" : "追踪方法学",
+        "router" : {
+            "mode" : "hash",
+            "base" : "/TracerMethodology/"
+        },
+        "devServer" : {
+            "port" : 8901,
+            "headers" : {
+                "Access-Control-Allow-Origin" : "*"
+            },
+            "proxy" : {
+                "/TracerMethodology/api/*" : {
+                    "pathRewrite" : {
+                        "^/TracerMethodology/api" : ""
+                    },
+                    "target" : "http://192.168.1.45:8088", // 内网
+                    "changeOrigin" : true,
+                    "secure" : false,
+                    "logLevel" : "debug"
+                }
+            }
+        },
+        "optimization" : {
+            "treeShaking" : {
+                "enable" : true
+            }
+        },
+        "networkTimeout" : {
+            "request" : 5000
+        }
+    }
 }

+ 13 - 0
package-lock.json

@@ -14,11 +14,24 @@
       "resolved": "https://registry.npm.taobao.org/moment/download/moment-2.29.1.tgz",
       "integrity": "sha1-sr52n6MZQL6e7qZGnAdeNQBvo9M="
     },
+    "ometa": {
+      "version": "0.2.2",
+      "resolved": "https://registry.npm.taobao.org/ometa/download/ometa-0.2.2.tgz",
+      "integrity": "sha1-9TxHNbptVq9aRrBN+3xDNMWW1E4="
+    },
     "qs": {
       "version": "6.9.6",
       "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz",
       "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ=="
     },
+    "scss": {
+      "version": "0.2.4",
+      "resolved": "https://registry.npm.taobao.org/scss/download/scss-0.2.4.tgz",
+      "integrity": "sha1-BA2QPtN8XU+krTOuH9OJrBKk4GU=",
+      "requires": {
+        "ometa": "0.2.2"
+      }
+    },
     "vuex": {
       "version": "3.6.2",
       "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",

+ 1 - 0
package.json

@@ -7,6 +7,7 @@
     "crypto-js": "^4.0.0",
     "moment": "^2.29.1",
     "qs": "^6.9.6",
+    "scss": "^0.2.4",
     "vuex": "^3.6.0"
   },
   "devDependencies": {},

+ 286 - 0
pages/creatingSituations/components/checkMap.vue

@@ -0,0 +1,286 @@
+<template>
+	<view class="check-map">
+		<view class="title">请对查核地图进行配置</view>
+		<view class="list">
+			<view class="item" 
+				v-for="(item, index) in 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>
+				<view class="btn-group">
+					<view class="btn" 
+						v-for="(btn, index) in btnGroupArr" 
+						@click="btnClick($event, btn.id)"
+						: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`">
+						</image>
+						<text>{{ creatIcon(item.status)['label'] }}</text>
+					</view>
+				</view>
+				<view class="add-img-wrap" v-if="item.status === 'add'">
+					<image src="../../../static/top-img.png"></image>
+					<text>新增项</text>
+				</view>
+				<view class="dis-img-wrap" v-if="item.status === 'disable'">
+					<image src="../../../static/disable-img.png"></image>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { mapState } from "vuex";
+	import {_stopPropagation} from "../../../utils/compatible.js";
+	const btnGroupArr = [
+		{id: 'add', label: '新增'},
+		{id: 'shang', label: '上移'},
+		{id: 'xia', label: '下移'},
+	];
+	export default {
+		data() {
+			return {
+				btnGroupArr,
+				list: [
+					{status: 'normal'},
+					{status: 'add'},
+					{status: 'disable'},
+				]
+			}
+		},
+		computed: {
+			...mapState({
+				checkMap: state => state.creatingSituations.checkMap,
+				checkRent: state => state.creatingSituations.checkRent,
+				condition: state => state.creatingSituations.condition,
+			})
+		},
+		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);
+				});
+			}
+		},
+		methods: {
+			creatIcon: function(status) {
+				let obj = {icon: 'jinyong', label: '禁用'};
+				switch(status) {
+					case 'add': 
+						obj = {icon: 'del', label: '删除'};
+						break;
+					case 'disable': 
+						obj = {icon: 'qiyong', label: '启用'};
+						break;
+				}
+				return obj;
+			},
+			detail: function(item) {
+				this.$store.commit({
+					type: 'creatingSituations/comChangeState',
+					key: 'showCheckMapDetail',
+					data: true
+				});
+			},
+			btnClick: function(e, id) {
+				_stopPropagation(e);
+				switch(id) {
+					case 'add': 
+						this.$store.commit({
+							type: 'creatingSituations/comChangeState',
+							key: 'showCheckMapAdd',
+							data: true
+						});
+						break;
+				}
+			},
+			/**
+			 * 更新condition数据
+			 * @param {Object} key 要更新的属性
+			 * @param {Object} value 值
+			 */
+			myCommit: function(key, value) {
+				let data = {...this.checkMap};
+				data[key] = value;
+				this.$store.commit({
+					type: 'creatingSituations/comChangeState', 
+					key: 'checkMap', 
+					data
+				});
+			}
+		}
+	}
+</script>
+
+<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;
+				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;
+						}
+					}
+				}
+				.btn-group {
+					display: flex;
+					flex-direction: row;
+					padding: 15rpx 0;
+					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;
+						}
+					}
+				}
+				.dis-img-wrap,
+				.add-img-wrap {
+					position: absolute;
+					top: 18.75rpx;
+					right: 18.75rpx;
+					width: 93.75rpx;
+					height: 93.75rpx;
+					image {
+						width: 100%;
+						height: 100%;
+					}
+				}
+				.add-img-wrap {
+					top: 0;
+					right: 0;
+					width: 100rpx;
+					height: 35rpx;
+					text {
+						position: absolute;
+						top: 4.37rpx;
+						left: 28.75rpx;
+						font-size: 17.5rpx;
+						line-height: 26.25rpx;
+						color: #fff;
+					}
+				}
+				&.disable {
+					.title-wrap {
+						>text, >view {
+							color: #B8BECC;
+						}
+					}
+					.content {
+						text {
+							color: #B8BECC;
+						}
+					}
+					.btn-group {
+						.btn {
+							color: #B8BECC;
+							&:last-child {
+								color: #7A8599;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 137 - 0
pages/creatingSituations/components/checkMapAdd.vue

@@ -0,0 +1,137 @@
+<template>
+	<view class="modal">
+		<scroll-view scroll-y="true" class="modal-body">
+			<view class="body-content">
+				<text class="top-title">选择要新增的单位</text>
+				<view class="list">
+					<view class="item">
+						<view class="item-title">门诊</view>
+						<view class="chidren">
+							<view class="child" 
+								:class="{active: checkedIds.includes(0)}"
+								@click="changeChecked(0)">
+								<text>挂号处</text>
+								<image v-if="checkedIds.includes(0)" 
+									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>
+			</view>
+			<tm-simple-btn-group :options="botmBtnGroup"
+				v-on:callback="btnClick" ></tm-simple-btn-group>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import {arrFilter} from "../../../utils/arrFilter.js";
+	export default {
+		data() {
+			return {
+				checkedIds: []
+			}
+		},
+		computed: {
+			botmBtnGroup: function() {
+				return [
+					{id: 'cancle', label: '取消'},
+					{id: 'ok', label: `已选${this.checkedIds.length}项,确定新增`}
+				];
+			}
+		},
+		methods: {
+			changeChecked: function(id) {
+				this.checkedIds = arrFilter(id, this.checkedIds);
+			},
+			btnClick: function(id) {
+				if(id === 'ok') {
+					
+				} else {
+					this.$store.commit({
+						type: 'creatingSituations/comChangeState',
+						key: 'showCheckMapAdd',
+						data: false
+					});
+				}
+			}
+		}
+	}
+</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;
+			padding: 35rpx 40rpx 75rpx;
+			width: 100%;
+			height: 90%;
+			font-size: 22.5rpx;
+			line-height: 33.75rpx;
+			color: #292C33;
+			background-color: #fff;
+			.top-title {
+				font-size: 30rpx;
+				line-height: 45rpx;
+			}
+			.list {
+				margin-top: 25rpx;
+				.item {
+					.item-title {
+						margin-bottom: 3.75rpx;
+						font-size: 25rpx;
+						line-height: 37.5rpx;
+						font-weight: bold;
+					}
+					.chidren {
+						display: flex;
+						flex-direction: row;
+						flex-wrap: wrap;
+						justify-content: space-between;
+						.child {
+							position: relative;
+							display: flex;
+							flex-direction: row;
+							justify-content: center;
+							align-items: center;
+							margin: 10rpx 0;
+							border-radius: 5rpx;
+							width: 200rpx;
+							height: 50rpx;
+							font-weight: 500;
+							background-color: #EBEDF2;
+							image {
+								position: absolute;
+								right: 0;
+								bottom: 0;
+								width: 25rpx;
+								height: 25rpx;
+							}
+							&.active {
+								color: #3377FF;
+								background-color: #E6EEFF;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

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

@@ -0,0 +1,151 @@
+<template>
+	<view class="check-map-detail">
+		<view class="item">
+			<view class="icon-wrap" @click="openChildren(0)">
+				<image :src="`../../static/list-${openItems.includes(0)
+					?'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)
+								?'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>
+		<tm-simple-btn-group :options="botmBtnGroup"
+			v-on:callback="btnClick" ></tm-simple-btn-group>
+	</view>
+</template>
+
+<script>
+	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}项,确定`}
+				];
+			}
+		},
+		methods: {
+			openChildren: function(key) {
+				this.openItems = arrFilter(key, this.openItems);
+			},
+			changeChecked: function(id) {
+				this.checkedIds = arrFilter(id, this.checkedIds);
+			},
+			btnClick: function(id) {
+				if(id === 'ok') {
+					
+				} else {
+					this.$store.commit({
+						type: 'creatingSituations/comChangeState',
+						key: 'showCheckMapDetail',
+						data: false
+					});
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+	.check-map-detail {
+		padding-bottom: 75rpx;
+		width: 100%;
+		height: 100%;
+		.item {
+			display: flex;
+			flex-direction: row;
+			border-top: 1px solid #DADEE6;
+			padding-left: 25rpx;
+			width: 100%;
+			background-color: #fff;
+			.icon-wrap {
+				padding-top: 28.12rpx;
+				padding-right: 23.75rpx;
+				width: 45rpx;
+				height: inherit;
+				image {
+					width: 100%;
+					height: 12.5rpx;
+				}
+			}
+			.content {
+				width: 100%;
+				color: #292C33;
+				line-height: 87.5rpx;
+				.content-title {
+					height: 87.5rpx;
+					font-size: 22.5rpx;
+					font-weight: 500;
+				}
+				.children {
+					width: 100%;
+					.child {
+						display: flex;
+						flex-direction: row;
+						justify-content: space-between;
+						border-top: 1px solid #DADEE6;
+						height: 87.5rpx;
+						.check-icon-wrap {
+							display: flex;
+							flex-direction: row;
+							justify-content: center;
+							align-items: center;
+							width: 75rpx;
+							height: 100%;
+							image {
+								width: 25rpx;
+								height: 25rpx;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 284 - 0
pages/creatingSituations/components/checkPlan.vue

@@ -0,0 +1,284 @@
+<template>
+	<view class="check-plan">
+		<view class="title">请制定查核计划({{showCheckPlan1 ? 1 : 2}}/2)</view>
+		<view class="content1" v-if="showCheckPlan1">
+			<view class="list">
+				<view class="item" v-for="(item, index) in list" :key="index">
+					<view class="text-wrap">
+						<input v-if="item.id === 'custom'" 
+							v-model="item.model" 
+							type="number" 
+							@input="createList"
+							placeholder="自定义" />
+						<text>{{item.label}}</text>
+					</view>
+					<view class="img-wrap" @click="checkModel(item)">
+						<image :src="`../../static/check-${checkedItem.id === item.id 
+							? 'radio': 'no'}.png`"></image>
+					</view>
+				</view>
+			</view>
+			<view class="date-box">
+				<text>起止时间</text>
+				<view>
+					<date-time-pick-group fields="day" 
+						:startTime="startTime()"
+						:startSelectValue="dateObj.start"
+						:endSelectValue="dateObj.end"
+						v-on:changeDate="changeDate"></date-time-pick-group>
+					<image src="../../../static/incon-more.png"></image>
+				</view>
+			</view>
+			<view class="result-box">
+				<text>查核频次</text>
+				<text>{{checkNumber}}</text>
+			</view>
+		</view>
+		<view class="content2" v-else>
+			<view class="top-box">
+				<view class="result-box">
+					<text>开始日期</text>
+					<text>{{dateObj.start}}</text>
+				</view>
+				<view class="date-box">
+					<text>结束日期</text>
+					<view>
+						<date-time-picker fields="day"
+							placeholder="请选择结束日期"
+							pickType="end"
+							:start="startTime()"
+							:defaultValue="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">
+					<text>第{{index + 1}}次查核</text>
+					<view class="date-box">
+						<text>开始日期</text>
+						<view>
+							<date-time-picker fields="day"
+								:start="startDate(index)"
+								:end="formateStartEnd(endDate())"
+								placeholder="请选择开始日期"
+								:defaultValue="item"
+								v-on:change="changeChildDate($event, index)"></date-time-picker>
+							<image src="../../../static/incon-more.png"></image>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {dateHandle} from "../../../utils/dateHandle.js";
+	import { mapState } from "vuex";
+	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},
+	];
+	export default {
+		data() {
+			return {
+				list, 
+				checkedItem: list[1], // 选中的取模方式对象
+				dateObj: { // 保存开始日期结束日期的对象
+					start: todayDate(),
+					end: '',
+					dayNum: 0 // 两个日期间隔的天数
+				}, 
+				checkList: [], // 核查计划数组
+			}
+		},
+		computed: {
+			...mapState({
+				showCheckPlan1: state => state.creatingSituations.showCheckPlan1,
+			}),
+			checkNumber: function() { // 查核频次
+				return this.checkList.length;
+			}
+		},
+		methods: {
+			checkModel: function(item) {
+				this.checkedItem = item;
+				this.createList();
+			},
+			/**
+			 * 开始、结束日期变化函数
+			 * @param {Object} date 日期对象
+			 * @param {Object} type 返回类型(start/end)
+			 */
+			changeDate: function(date, type) {
+				this.dateObj[type] = date.f1;
+				const {start, end} = this.dateObj;
+				if(start && end) {
+					this.dateObj.dayNum = dateDiff(start, end);
+					this.createList();
+				}
+			},
+			/**
+			 * 构造计划列表
+			 */
+			createList: function() {
+				const { model } = this.checkedItem;
+				const {start, dayNum} = this.dateObj;
+				if(model && dayNum > 0) { // 确保前两步都做好了
+					let num = Math.floor(dayNum / model);
+					this.checkList = [start];
+					for(let i = 0; i < num - 1; i++) {
+						this.checkList[i+1] = getNewData(this.checkList[i], model);
+					}
+				} else {
+					this.checkList = [];
+				}
+			},
+			/**
+			 * 已经生成的计划日期变化
+			 * @param {Object} date
+			 */
+			changeChildDate: function(date, index) {
+				let newList = this.checkList.slice(0, index); // 不包括index
+				newList[index] = date.f1;
+				const { model } = this.checkedItem;
+				let i = index;
+				// 判断下一个计划开始时间日期不能大于结束的前X(模)天
+				while(compare(this.endDate(), getNewData(newList[i], model))) { 
+					newList[i+1] = getNewData(newList[i], model);
+					i++;
+				}
+				this.checkList = newList;
+			},
+			startTime: function() { // 限制只能从今天开始
+				return this.formateStartEnd(todayDate());
+			},
+			endDate: function() { // 获取能选择的最大日期,取结束日期的前模天
+				let day = -Number(this.checkedItem.model); // 使用负数能取前X天
+				return getNewData(this.dateObj.end, day);
+			},
+			startDate: function(index) { // 子级能选择的最早开始时间
+				if(index > 0) {
+					let day = Number(this.checkedItem.model);
+					return this.formateStartEnd(getNewData(this.checkList[index - 1], day));
+				} else {
+					return this.startTime();
+				}
+			},
+			formateStartEnd: function(str) {
+				return str + ' 00:00';
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.check-plan {
+		font-size: 22.5rpx;
+		line-height: 33.75rpx;
+		color: #292C33;
+		.content1 {
+			.list {
+				padding-left: 25rpx;
+				background-color: #fff;
+				.item {
+					display: flex;
+					flex-direction: row;
+					justify-content: space-between;
+					align-items: center;
+					border-bottom: 1px solid #DADEE6;
+					width: 100%;
+					height: 87.5rpx;
+					.text-wrap {
+						display: flex;
+						flex-direction: row;
+						align-items: center;
+						input {
+							margin-right: 25rpx;
+							width: 75rpx;
+							font-size: 22.5rpx;
+							line-height: 33.75rpx;
+							color: #292C33;
+						}
+					}
+					.img-wrap {
+						display: flex;
+						flex-direction: row;
+						justify-content: center;
+						align-items: center;
+						width: 75rpx;
+						height: 100%;
+						image {
+							width: 25rpx;
+							height: 25rpx;
+						}
+					}
+				}
+			}
+		}
+		.content2 {
+			.top-box {
+				padding-left: 25rpx;
+				background-color: #fff;
+				.date-box,
+				.result-box {
+					padding-left: 0;
+				}
+				.result-box {
+					border-bottom: 1px solid #DADEE6;
+				}
+			}
+			.content2-list {
+				padding-bottom: 25rpx;
+				.item {
+					display: flex;
+					flex-direction: column;
+					margin-top: 19.37rpx;
+					>text {
+						padding-bottom: 9.37rpx;
+						padding-left: 25rpx;
+						color: #666F80;
+					}
+				}
+			}
+			.date-box,
+			.result-box {
+				margin-top: 0;
+			}
+		}
+		.date-box,
+		.result-box {
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+			margin-top: 15rpx;
+			padding: 0 25rpx;
+			width: 100%;
+			height: 87.5rpx;
+			background-color: #fff;
+			>text:first-child {
+				margin-right: 85rpx;
+				white-space: nowrap;
+				color: #525866;
+			}
+			>view {
+				display: flex;
+				flex-direction: row;
+				justify-content: space-between;
+				align-items: center;
+				width: 100%;
+				image {
+					width: 12.5rpx;
+					height: 21.25rpx;
+				}
+			}
+		}
+	}
+</style>

+ 170 - 0
pages/creatingSituations/components/checkRent.vue

@@ -0,0 +1,170 @@
+<template>
+	<view class="check-rent">
+		<view class="title">请指定负责查核的查核组</view>
+		<view class="list">
+			<view class="item" 
+				v-for="(item, index) in checkRent.list" 
+				:key="index"
+				@click="openItemHandle(item.id)">
+				<view class="img-wrap">
+					<image :src="`../../static/list-${openItems.includes(item.id)
+						?'close':'open'}.png`"></image>
+				</view>
+				<view class="content">
+					<view class="info">
+						<view class="text">
+							<view>{{item.name}}</view>
+							<view>组长:{{item.groupManagerName}}</view>
+						</view>
+						<view class="icon" @click="checkedHandle($event, item)">
+							<image :src="`../../static/check-${checkRent.checkedItem.id === item.id ? 'radio' : 'no'}.png`"></image>
+						</view>
+					</view>
+					<view class="chidren" v-if="openItems.includes(item.id)">
+						<view class="chid-item"> 
+							<view>小组成员</view>
+							<view>{{item.members.join('、')}}</view>
+						</view>
+						<view class="chid-item"> 
+							<view>负责要点</view>
+							<view>
+								<text v-for="(point, c) in item.points" :key="c">
+									{{point.name}};
+								</text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { mapState } from "vuex";
+	import {_stopPropagation} from "../../../utils/compatible.js";
+	import {arrFilter} from "../../../utils/arrFilter.js";
+	
+	export default {
+		data() {
+			return {
+				openItems: []
+			}
+		},
+		computed: {
+			...mapState({
+				checkRent: state => state.creatingSituations.checkRent,
+				condition: state => state.creatingSituations.condition,
+			})
+		},
+		created:function(){
+			if(this.checkRent.list.length === 0) {
+				this.$store.dispatch({
+					type: 'creatingSituations/commActions',
+					key: 'checkGroupList',
+					data: { conditionIds: this.condition.conditionIds}
+				}).then((data)=> {
+					if(data) this.myCommit('list', data);
+				});
+			}
+		},
+		methods: {
+			openItemHandle: function(key) {
+				this.openItems = arrFilter(key, this.openItems);
+			},
+			checkedHandle: function(e, item) {
+				_stopPropagation(e);
+				this.myCommit('checkedItem', item);
+			},
+			/**
+			 * 更新condition数据
+			 * @param {Object} key 要更新的属性
+			 * @param {Object} value 值
+			 */
+			myCommit: function(key, value) {
+				let data = {...this.checkRent};
+				data[key] = value;
+				this.$store.commit({
+					type: 'creatingSituations/comChangeState', 
+					key: 'checkRent', 
+					data
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.check-rent {
+		.list {
+			.item {
+				display: flex;
+				flex-direction: row;
+				justify-content: space-between;
+				margin-bottom: 15rpx;
+				padding: 25rpx;
+				padding-right: 0;
+				width: 100%;
+				background-color: #fff;
+				
+				.img-wrap {
+					width: 36.25rpx;
+					image {
+						width: 21.25rpx;
+						height: 12.5rpx;
+					}
+				}
+				.content {
+					width: calc(100% - 36.25rpx);
+					font-size: 20rpx;
+					line-height: 30rpx;
+					color: #666E80;
+					.info {
+						display: flex;
+						flex-direction: row;
+						justify-content: space-between;
+						margin-top: -25rpx;
+						.text {
+							padding-top: 25rpx;
+							view:first-child {
+								margin-bottom: 25rpx;
+								font-size: 25rpx;
+								line-height: 37.5rpx;
+								color: #292C33;
+							}
+						}
+						.icon { // 图标样式,用view包裹img防止挤压变形
+							padding-top: 25rpx;
+							padding-left: 25rpx;
+							width: 75rpx;
+							height: inherit;
+							image {
+								width: 25rpx;
+								height: 25rpx;
+							}
+						}
+					}
+					.chidren {
+						margin-top: 25rpx;
+						border-top: 1px solid #DADEE6;
+						width: 100%;
+						.chid-item {
+							padding-top: 25rpx;
+							padding-right: 25rpx;
+							view {
+								overflow: hidden;
+								white-space: nowrap;
+								text-overflow: ellipsis;
+								&:first-child {
+									padding-bottom: 15rpx;
+									font-weight: bold;
+									color: #292C33;
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 124 - 25
pages/creatingSituations/components/condition.vue

@@ -1,43 +1,142 @@
 <template>
 	<view class="condition">
-		
-		<tm-trees :options="options"
-		 :defaultOpen="defaultOpen" 
-		 :defaultChecked="defaultChecked"
+		<view class="title">请选择追踪条件(可多选)</view>
+		<view class="select-btn">
+			<text>选择门诊或急诊</text>
+			<view>
+				<button :class="{active: condition.depType === 1}" 
+					@click="selectBtnHandle(1)">门诊</button>
+				<button :class="{active: condition.depType === 2}" 
+					@click="selectBtnHandle(2)">急诊</button>
+			</view>
+		</view>
+		<tm-trees :options="condition.options"
+		 :defaultOpen="condition.defaultOpen" 
+		 :defaultChecked="condition.conditionIds"
 		 v-on:checked-keys="checkedHandle"></tm-trees>
 	</view>
 </template>
 
 <script>
+	import { mapState } from "vuex";
 	export default {
-		data() {
-			return {
-				options: [
-					{key: 'zhuyuan',label: '住院', children: [
-						{key: 'ICU',label: 'ICU', children: []},
-						{key: 'RCC',label: 'RCC', children: []},
-						{key: 'shengchan',label: '生产', children: [{
-							key: 'ziranchan',label: '自然产'
-						}]},
-					]},{key: 'zhuyuan',label: '住院', children: [
-						{key: 'ICU',label: 'ICU', children: []},
-						{key: 'RCC',label: 'RCC', children: []},
-						{key: 'shengchan',label: '生产', children: [{
-							key: 'ziranchan',label: '自然产'
-						}]},
-					]}
-				],
-				defaultOpen: ['zhuyuan'],
-				defaultChecked: ['ICU']
-			}
+		computed: {
+			...mapState({
+				condition: state => state.creatingSituations.condition,
+				theme: state => state.creatingSituations.theme
+			})
+		},
+		created: function(){
+			if(this.condition.options.length === 0)
+				this.getOptions(this.condition.depType);
 		},
 		methods: {
 			checkedHandle: function(keys) {
-				console.log(keys);
+				this.myCommit('conditionIds', keys);
+			},
+			selectBtnHandle: function(depType) {
+				this.myCommit('depType', depType);
+				this.getOptions(depType);
+			},
+			/**
+			 * 获取树形节点数据
+			 */
+			getOptions: function(depType) {
+				this.checkedHandle([]); // 切换后清空选中
+				const {id} = this.theme;
+				if(id || id === 0) {
+					this.$store.dispatch({
+						type: 'creatingSituations/commActions',
+						key: 'conditions',
+						data: { depType, type: id }
+					}).then((data)=> {
+						if(data) {
+							if(data.length > 0) {
+								this.myCommit('defaultOpen', [data[0].id]);
+							}
+							this.myCommit('options', this.optionsHandle(data));
+						} 
+					});
+				} else {
+					uni.showModal({
+					  title: '温馨提示',
+					  content: '请先选择主题!',
+					  showCancel: false
+					});
+				}
+			},
+			/**
+			 * 增加树形数据字段,以适配公共组件
+			 * @param {Object} data
+			 */
+			optionsHandle: function(data) {
+				let options = data.map((item, i)=>{
+					return {
+						...item,
+						key: item.id,
+						label: item.name,
+						children: this.optionsHandle(item.child)
+					}
+				});
+				return options;
+			},
+			/**
+			 * 更新condition数据
+			 * @param {Object} key 要更新的属性
+			 * @param {Object} value 值
+			 */
+			myCommit: function(key, value) {
+				let data = {...this.condition};
+				data[key] = value;
+				this.$store.commit({
+					type: 'creatingSituations/comChangeState', 
+					key: 'condition', 
+					data
+				});
 			}
 		}
 	}
 </script>
 
 <style lang="less">
+	.select-btn {
+		display: flex;
+		flex-direction: row;
+		justify-content: space-between;
+		align-items: center;
+		margin-bottom: 15rpx;
+		padding: 0 25rpx;
+		width: 100%;
+		height: 87.5rpx;
+		font-size: 22.5rpx;
+		line-height: 33.75rpx;
+		color: #525866;
+		background-color: #fff;
+		
+		view {
+			display: flex;
+			flex-direction: row;
+			
+			button {
+				border: 0;
+				border-radius: 25rpx;
+				padding: 0 46.25rpx;
+				height: 50rpx;
+				line-height: 50rpx;
+				color: #292C33;
+				background-color: #EBEFF7;
+				
+				&:first-child {
+					margin-right: 20rpx;
+				}
+				&::after {
+					border: 0;
+				}
+				&.active {
+					color: #fff;
+					background-color: #3377FF;
+				}
+			}
+		}
+	}
 </style>

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

@@ -0,0 +1,189 @@
+<template>
+	<view class="situation-preview">
+		<view class="title">情境预览</view>
+		<view class="box1">
+			<view class="row1">
+				<view class="top">
+					<text>主题:个案追踪</text>
+					<view>
+						<text>查看查核地图</text>
+						<image src="../../../static/icon-blueMore.png"></image>
+					</view>
+				</view>
+				<view class="list">
+					<text>门诊</text>
+					<text>住院</text>
+					<text>ICU</text>
+				</view>
+			</view>
+			<view class="row2">
+				<view class="item">
+					<text>查核组</text>
+					<text>内科查核二组</text>
+				</view>
+				<view class="item">
+					<text>组长</text>
+					<text>王晓雪</text>
+				</view>
+			</view>
+		</view>
+		<view class="box2">
+			<view>情景名称</view>
+			<view class="input-wrap">
+				<input placeholder="限2~16个中文、英文或数字" />
+			</view>
+		</view>
+		<view class="box2">
+			<view>
+				<text>计划开始前</text>
+				<input placeholder="请输入" type="number" />
+				<text>天的</text>
+				<input placeholder="请输入" type="number" />
+				<text>时提醒</text>
+			</view>
+			<view>
+				<text>启动</text>
+				<input placeholder="请输入" type="number" />
+				<text>天前提醒</text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.situation-preview {
+		overflow: hidden;
+		font-size: 22.5rpx;
+		line-height: 33.75rpx;
+		color: #292C33;
+		.box1,
+		.box2 {
+			margin-bottom: 15rpx;
+			padding: 25rpx;
+			width: 100%;
+			background-color: #fff;
+		}
+		.box1 {
+			display: flex;
+			flex-direction: column;
+			.row1 {
+				display: flex;
+				flex-direction: column;
+				margin-bottom: 35rpx;
+				.top {
+					display: flex;
+					flex-direction: row;
+					justify-content: space-between;
+					margin-bottom: 6.25rpx;
+					>text {
+						font-size: 30rpx;
+						line-height: 45rpx;
+					}
+					>view {
+						display: flex;
+						flex-direction: row;
+						align-items: center;
+						font-size: 20rpx;
+						line-height: 30rpx;
+						color: #3377FF;
+						image {
+							margin-left: 10rpx;
+							width: 11.87rpx;
+							height: 20rpx;
+						}
+					}
+				}
+				.list {
+					overflow: hidden;
+					display: flex;
+					flex-direction: row;
+					flex-wrap: wrap;
+					align-items: center;
+					>text {
+						margin-top: 6.25rpx;
+						margin-right: 15rpx;
+						border-radius: 5rpx;
+						padding: 2.5rpx 20.62rpx;
+						font-size: 17.5rpx;
+						line-height: 26.25rpx;
+						color: #7A8499;
+						background-color: #EBEFF7;
+					}
+				}
+			}
+			.row2 {
+				display: flex;
+				flex-direction: row;
+				justify-content: center;
+				align-items: center;
+				.item {
+					display: flex;
+					flex-direction: column;
+					width: 47.5%;
+					text {
+						overflow: hidden;
+						white-space: nowrap;
+						text-overflow: ellipsis;
+						font-size: 25rpx;
+						line-height: 37.5rpx;
+					}
+					text:first-child {
+						margin-bottom: 4.37rpx;
+						font-size: 17.5rpx;
+						line-height: 26.25rpx;
+						color: #666F80;
+					}
+					&:first-child {
+						margin-right: 5%;
+						border-right: 1px solid #DADEE6;
+					}
+				}
+			}
+		}
+		.box2 {
+			padding: 0;
+			padding-left: 25rpx;
+			>view {
+				display: flex;
+				flex-direction: row;
+				align-items: center;
+				border-bottom: 1px solid #DADEE6;
+				height: 87.5rpx;
+				color: #525866;
+				>text {
+					white-space: nowrap;
+					color: #292C33;
+				}
+				>input {
+					padding: 0 9.37rpx;
+					width: 80rpx;
+					height: 33.75rpx;
+					font-size: 22.5rpx;
+					line-height: 33.75rpx;
+					text-align: center;
+				}
+				&:last-child {
+					border-bottom: 0;
+				}
+				&.input-wrap {
+					>input {
+						padding: 0;
+						padding-right: 25rpx;
+						width: 100%;
+						text-align: left;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 50 - 29
pages/creatingSituations/components/theme.vue

@@ -1,34 +1,53 @@
 <template>
 	<view class="theme">
-		<text class="title">请先选定一个主题进行追踪</text>
+		<view class="title">请先选定一个主题进行追踪</view>
 		<view class="content">
-			<view class="item">
+			<view class="item" 
+				v-for="(item, index) in themeList" 
+				@click="checkedHandle(item)"
+				:key="index">
 				<view class="left">
-					<image src="../../../static/gean.png"></image>
+					<image :src="`../../static/theme${item.id}.png`"></image>
 				</view>
 				<view class="right">
-					<text>个案追踪</text>
-					<text>评价诊疗服务的内涵质量以及对各种诊疗规范、临床路径等的执行力</text>
-				</view>
-			</view>
-			<view class="item">
-				<view class="left">
-					<image src="../../../static/xitong.png"></image>
-				</view>
-				<view class="right">
-					<text>系统追踪</text>
-					<text>评价对各种质量与安全管理制度与流程的执行力、医院服务的连贯性及多学科综合的服务能力</text>
+					<text>{{item.title}}</text>
+					<text>{{item.des}}</text>
 				</view>
+				<image v-if="theme.id === item.id" src="../../../static/theme.png"></image>
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import { mapState } from "vuex";
+	const themeList = [{
+			id: 0, 
+			title: '个案追踪', 
+			des: '评价诊疗服务的内涵质量以及对各种诊疗规范、临床路径等的执行力',
+		},{
+			id: 1, 
+			title: '系统追踪', 
+			des: '评价对各种质量与安全管理制度与流程的执行力、医院服务的连贯性及多学科综合的服务能力',
+	}]
 	export default {
 		data() {
 			return {
-				
+				themeList
+			}
+		},
+		computed: {
+			...mapState({
+				theme: state => state.creatingSituations.theme
+			})
+		},
+		methods: {
+			checkedHandle: function(item) {
+				this.myCommit('theme', item);
+				this.myCommit('stepActive', 1);
+			},
+			myCommit: function(key, data) {
+				this.$store.commit({type: 'creatingSituations/comChangeState',key,data});
 			}
 		}
 	}
@@ -36,29 +55,30 @@
 
 <style lang="less">
 	.theme {
+		overflow: hidden;
 		width: 100%;
-		.title {
-			padding-left: 25rpx;
-			font-size: 30rpx;
-			line-height: 45rpx;
-			color: #292C33;
-		}
 		.content {
 			display: flex;
 			flex-direction: column;
 			align-items: center;
-			margin-top: 25rpx;
 			.item {
+				position: relative;
 				display: flex;
 				flex-direction: row;
-				margin-top: 125rpx;
+				margin: 62.5rpx 0;
 				border-radius: 15rpx;
 				padding: 37.5rpx 50rpx;
 				width: 625rpx;
 				height: 187.5rpx;
-				background: linear-gradient(270deg, #00CCBB 0%, #00CCAA 100%);
-				box-shadow: 0 12.5rpx 12.5rpx 0 rgba(0, 204, 170, 0.2);
-				
+				background: linear-gradient(270deg, #6697FE 0%, #4980F2 100%);
+				box-shadow: 0 12.5rpx 12.5rpx 0 rgba(73, 128, 242, 0.2);
+				>image {
+					position: absolute;
+					top: 10rpx;
+					right: 10rpx;
+					width: 46.87rpx;
+					height: 46.87rpx;
+				}
 				.left {
 					margin-right: 25rpx;
 					image {
@@ -81,9 +101,10 @@
 						}
 					}
 				}
-				&:last-child {
-					background: linear-gradient(270deg, #6697FE 0%, #4980F2 100%);
-					box-shadow: 0 12.5rpx 12.5rpx 0 rgba(73, 128, 242, 0.2);
+				&:first-child {
+					margin-top: 125rpx;
+					background: linear-gradient(270deg, #00CCBB 0%, #00CCAA 100%);
+					box-shadow: 0 12.5rpx 12.5rpx 0 rgba(0, 204, 170, 0.2);
 				}
 			}
 		}

+ 129 - 12
pages/creatingSituations/creatingSituations.vue

@@ -1,37 +1,154 @@
 <template>
 	<view class="creatingSituations">
-		<tm-steps :options="options" :active="active"></tm-steps>
+		<check-map-detail v-if="showCheckMapDetail"></check-map-detail>
+		<view v-else class="page-wrap" 
+			:style="{paddingBottom: stepActive !== 0 ? '75rpx' : 0}">
+			<tm-steps :options="options" :active="stepActive"></tm-steps>
+			<tm-simple-btn-group v-if="stepActive !== 0" 
+				:options="botmBtnGroup"
+				v-on:callback="changeStep"></tm-simple-btn-group>
+		</view>
+		<check-map-add v-if="showCheckMapAdd"></check-map-add>
 	</view>
 </template>
 
 <script>
+	import { mapState } from "vuex";
 	import theme from "./components/theme.vue";
 	import condition from "./components/condition.vue";
+	import checkRent from "./components/checkRent.vue";
+	import checkMap from "./components/checkMap.vue";
+	import checkMapDetail from "./components/checkMapDetail.vue";
+	import checkMapAdd from "./components/checkMapAdd.vue";
+	import checkPlan from "./components/checkPlan.vue";
+	import situationPreview from "./components/situationPreview.vue";
+	
+	const normalBtnGroup = [
+		{id: 'pre', label: '上一步'},
+		{id: 'next', label: '下一步'}
+	];
+	const btnGroupPlan1 = [
+		{id: 'pre', label: '上一步'},
+		{id: 'checkPlanCreate', label: '生成查核计划'}
+	];
+	const btnGroupPlan2 = [
+		{id: 'checkPlanCallback', label: '返回'},
+		{id: 'next', label: '下一步'}
+	];
+	const btnGroupSituationPreview = [
+		{id: 'pre', label: '上一步'},
+		{id: 'situationPreviewOK', label: '完成'}
+	];
 	
 	export default {
 		data() {
 			return {
 				options: [
-					{title: '主题', component: theme},
-					{title: '条件', component: condition},
-					{title: '查核组'},
-					{title: '地图'},
-					{title: '计划'},
-					{title: '配置'},
-				],
-				active: 1
+					{id: 'theme', title: '主题', component: theme},
+					{id: 'condition', title: '条件', component: condition, hint: '追踪条件'},
+					{id: 'checkRent', title: '查核组', component: checkRent, hint: '查核组'},
+					{id: 'checkMap', title: '地图', component: checkMap, hint: '地图'},
+					{id: 'checkPlan', title: '计划', component: checkPlan, hint: '计划'},
+					{id: 'situationPreview', title: '预览', component: situationPreview},
+				]
+			}
+		},
+		computed: {
+			...mapState({
+				showCheckMapDetail: state => state.creatingSituations.showCheckMapDetail,
+				showCheckMapAdd: state => state.creatingSituations.showCheckMapAdd,
+				showCheckPlan1: state => state.creatingSituations.showCheckPlan1,
+				stepActive: state => state.creatingSituations.stepActive,
+				condition: state => state.creatingSituations.condition,
+				checkRent: state => state.creatingSituations.checkRent,
+			}),
+			botmBtnGroup: function() {
+				if(this.stepActive === 4) {
+					if(this.showCheckPlan1) {
+						return btnGroupPlan1;
+					} else {
+						return btnGroupPlan2;
+					}
+				} else if(this.stepActive === 5) {
+					return btnGroupSituationPreview;
+				} else {
+					return normalBtnGroup;
+				}
 			}
 		},
 		methods: {
-			
+			changeStep: function(id) {
+				switch(id) {
+					case 'pre': // 上一步
+						if(this.stepActive > 0) 
+							this.myCommit('stepActive', this.stepActive - 1);
+						break;
+					case 'next': // 下一步
+						if(this.stepActive < this.options.length) 
+							this.nextHandle(this.stepActive);
+						break;
+					case 'checkPlanCreate': // 生成查核计划
+						this.myCommit('showCheckPlan1', false);
+						break;
+					case 'checkPlanCallback': // 生成查核计划-返回
+						this.myCommit('showCheckPlan1', true);
+						break;
+				}
+			},
+			/**
+			 * 处理【下一步】逻辑
+			 */
+			nextHandle: function(stepActive) {
+				let flage = false;
+				switch(stepActive) {
+					case 1: 
+						flage = this.errorHandle(this.condition.conditionIds.length > 0, 1);
+						break;
+					case 2: 
+						const {points} = this.checkRent.checkedItem;
+						let condition = this.checkRent.checkedItem.id !== null && points;
+						flage = this.errorHandle(condition, 2);
+						break;
+				}
+				if(flage) this.myCommit('stepActive', stepActive + 1);
+			},
+			/**
+			 * 错误处理,满足条件返回true
+			 * @param {Object} condition 条件
+			 * @param {Object} index 当前下标
+			 */
+			errorHandle: function(condition, index) {
+				if(condition) {
+					return true;
+				} else {
+					uni.showModal({
+						title: '温馨提示',
+						content: `请先选择${this.options[index].hint}!`,
+						showCancel: false
+					});
+					return false;
+				}
+			},
+			myCommit: function(key, data) {
+				this.$store.commit({type: 'creatingSituations/comChangeState',key,data});
+			}
+		},
+		components: {
+			checkMapDetail,
+			checkMapAdd
 		}
 	}
 </script>
 
 <style lang="less">
-		.creatingSituations {
+	.creatingSituations {
+		width: 100%;
+		height: 100%;
+		background-color: #F5F6FA;
+		.page-wrap {
+			padding-bottom: 75rpx;
 			width: 100%;
 			height: 100%;
-			background-color: #F5F6FA;
 		}
+	}
 </style>

+ 35 - 0
pages/creatingSituations/model.js

@@ -0,0 +1,35 @@
+import { commServer } from './server.js';
+
+export default {
+  namespaced: true,
+  state: {
+		showCheckMapDetail: false,
+		showCheckMapAdd: false,
+		showCheckPlan1: true,
+		stepActive: 0, // 步骤进度
+		theme: {id: null, title: null, des: null}, // 主题选中数据(id: 0个案 1系统)
+		condition: { // 条件页面数据
+			options: [], // 树形节点数据
+			conditionIds: [], // 选中的key
+			depType: 1, // 门急诊类型 1-门诊 2-急诊
+			defaultOpen: [], // 默认展开的项
+		},
+		checkRent: { // 查核组页面数据
+			list: [],
+			checkedItem: {id: null}
+		},
+		checkMap: { // 查核地图数据
+			list: [], // 列表数据
+		}
+  },
+  mutations: {
+		comChangeState(state, {key, data}) {
+			state[key] = data;
+		},
+  },
+  actions: {
+		commActions({ commit, state }, { key, data }) {
+      return commServer(key, data);
+		},
+  }
+}

+ 26 - 0
pages/creatingSituations/server.js

@@ -0,0 +1,26 @@
+import { creatRequest } from '../../utils/request.js';
+
+const requestList = {
+  // 获取条件树
+  conditions: {
+    method: 'GET',
+    url: 'common/conditions',
+		// successMessage: '',
+		// needLoading: false // 还有这两个参数,但不是必传的,默认loading
+  }, 
+	// 查核组列表
+  checkGroupList: {
+    method: 'POST',
+    url: 'situation/checkGroupList',
+  },
+	// 查核地图列表
+  checkDeptList: {
+    method: 'POST',
+    url: 'situation/checkDeptList',
+  },
+};
+
+export const commServer = (key, data) => {
+  let obj = requestList[key];
+  return creatRequest(obj, data);
+}

+ 195 - 169
pages/messages/messages.vue

@@ -1,177 +1,203 @@
 <template>
-	<view class="messages-page">
-		<view class="contBody" @touchend="touchend" :style="MessList.length <= 8 ? {height:'calc(100% - 30rpx)'} : {}">
-			<view v-for="(item,index) in MessList" :key="index" class="messages-content" @click="toDetail(item)">
-				<view class="imgView">
-					<image :src="item.businessType == 1 ? (item.readStatus ? '/static/橙色已读.png' : '/static/橙色未读.png') : (item.readStatus ? '/static/绿色已读.png' : '/static/绿色未读.png')"></image>
-				</view>
-				<view class="contView">
-					<view class="contView-title">
-						{{item.title}}
-					</view>
-					<view class="contView-content">
-						{{item.content}}
-					</view>
-					<view class="contView-time">
-						{{item.effectTime}}
-					</view>
-				</view>
-			</view>
-			<view class="bottomPanDuan"></view>
-		</view>
-		
-		<view class="bottomTishi">
-			<view v-if="loading">
-				向上滑动加载更多!
-			</view>
-			<view v-else>
-				已经到底了~
-			</view>
-		</view>
-	</view>
+  <view class="messages-page">
+    <view
+      class="contBody"
+      @touchend="touchend"
+      :style="MessList.length <= 8 ? { height: 'calc(100% - 30rpx)' } : {}"
+    >
+      <view
+        v-for="(item, index) in MessList"
+        :key="index"
+        class="messages-content"
+        @click="toDetail(item)"
+      >
+        <view class="imgView">
+          <image
+            :src="
+              item.businessType == 1
+                ? item.readStatus
+                  ? '/static/橙色已读.png'
+                  : '/static/橙色未读.png'
+                : item.readStatus
+                ? '/static/绿色已读.png'
+                : '/static/绿色未读.png'
+            "
+          ></image>
+        </view>
+        <view class="contView">
+          <view class="contView-title">
+            {{ item.title }}
+          </view>
+          <view class="contView-content">
+            {{ item.content }}
+          </view>
+          <view class="contView-time">
+            {{ item.effectTime }}
+          </view>
+        </view>
+      </view>
+      <view class="bottomPanDuan"></view>
+    </view>
+
+    <view class="bottomTishi">
+      <view v-if="loading"> 向上滑动加载更多! </view>
+      <view v-else> 已经到底了~ </view>
+    </view>
+  </view>
 </template>
 
 <script>
-	import moment from 'moment';
-	export default {
-		data() {
-			return {
-				pageNum: 1,
-				pageSize: 10,
-				MessList: [],
-				loading: false,
-				currentPage: 0,
-				totalPage: 0,
-			}
-		},
-		mounted() {
-		  this.getMessList();
-		},
-		methods:{
-			getMessList(){
-				var currPage = this.currentPage + 1;
-				this.$store.dispatch({
-					type: "messages/commActions",
-					payload: {
-					  key: "messagesList",
-					  data: {
-						  pageNum: currPage,
-						  pageSize: this.pageSize,
-					  }
-					},
-				}).then(res=>{
-					this.totalPage = res.totalPage;
-					res.list.map((item)=>{
-						item.effectTime = moment(item.effectTime).format('MM-DD hh:mm')
-					})
-					//获取当前页码
-					this.currentPage = res.pageNum;
-					//当前页码与总页码进行比对
-					this.loading = this.currentPage < this.totalPage;
-					//将获得的数据拼接当前渲染数据中
-					this.MessList = this.MessList.concat(res.list);
-				})
-			},
-			touchend(){
-				if(this.currentPage < this.totalPage){
-					var box = document.getElementsByClassName('bottomPanDuan')[0];
-					var pos = box.getBoundingClientRect();
-					if(pos.bottom<=document.documentElement.clientHeight){
-						this.getMessList();
-					}
-				}
-				
-			},
-			toDetail(data){
-				this.$store.dispatch({
-					type: "messages/commActions",
-					payload: {
-					  key: "toRead",
-					  data: {
-						  id:data.id
-					  }
-					},
-				}).then(res=>{
-					uni.navigateTo({
-					  url: '/pages/mission-details/mission-details'
-					});
-					this.MessList = [];
-					for(let i = 0 ; i < this.currentPage; i++){
-						this.$store.dispatch({
-							type: "messages/commActions",
-							payload: {
-							  key: "messagesList",
-							  data: {
-								  pageNum: i,
-								  pageSize: this.pageSize,
-							  }
-							},
-						}).then(res=>{
-							this.MessList = this.MessList.concat(res.list);
-						})
-					}
-				})
-			}
-			
-		},
-		computed:{
-		}
-	}
+import moment from "moment";
+export default {
+  data() {
+    return {
+      pageNum: 1,
+      pageSize: 10,
+      MessList: [],
+      loading: false,
+      currentPage: 0,
+      totalPage: 0,
+    };
+  },
+  mounted() {
+    this.getMessList();
+  },
+  methods: {
+    getMessList() {
+      var currPage = this.currentPage + 1;
+      this.$store.dispatch({
+          type: "messages/commActions",
+          payload: {
+            key: "messagesList",
+            data: {
+              pageNum: currPage,
+              pageSize: this.pageSize,
+            },
+          },
+        })
+        .then((res) => {
+          this.totalPage = res.totalPage;
+          res.list.map((item) => {
+            item.effectTime = moment(item.effectTime).format("MM-DD hh:mm");
+          });
+          //获取当前页码
+          this.currentPage = res.pageNum;
+          //当前页码与总页码进行比对
+          this.loading = this.currentPage < this.totalPage;
+          //将获得的数据拼接当前渲染数据中
+          this.MessList = this.MessList.concat(res.list);
+        });
+    },
+    touchend() {
+      if (this.currentPage < this.totalPage) {
+        var box = document.getElementsByClassName("bottomPanDuan")[0];
+        var pos = box.getBoundingClientRect();
+        if (pos.bottom <= document.documentElement.clientHeight) {
+          this.getMessList();
+        }
+      }
+    },
+    toDetail(data) {
+      this.$store.dispatch({
+          type: "messages/commActions",
+          payload: {
+            key: "toRead",
+            data: {
+              id: data.id,
+            },
+          },
+        })
+        .then((res) => {
+          if (data.businessType == 1) {
+            uni.navigateTo({
+              url: `/pages/mission-details/mission-details?taskId=${data.businessId}`,
+            });
+          } else if (data.businessType == 2) {
+            uni.navigateTo({
+              url: `/pages/home/home`,
+            });
+          }
+          this.MessList = [];
+          for (let i = 1; i < this.currentPage + 1; i++) {
+            this.$store.dispatch({
+                type: "messages/commActions",
+                payload: {
+                  key: "messagesList",
+                  data: {
+                    pageNum: i,
+                    pageSize: this.pageSize,
+                  },
+                },
+              })
+              .then((res) => {
+                res.list.map((item) => {
+                  item.effectTime = moment(item.effectTime).format(
+                    "MM-DD hh:mm"
+                  );
+                });
+                this.MessList = this.MessList.concat(res.list);
+              });
+          }
+        });
+    },
+  },
+  computed: {},
+};
 </script>
 
 <style lang="less">
-	.messages-page{
-		padding-top: 15rpx;
-		height: 100%;
-		overflow-y: auto;
-		.messages-content{
-			display: flex;
-			background-color: #fff;
-			.imgView{
-				margin-top: 25rpx;
-				margin-left: 25rpx;
-				margin-right: 25rpx;
-				margin-bottom: 63.75rpx;
-				width: 56.25rpx;
-				height: 56.25rpx;
-				vertical-align: top;
-				.image-circle{
-					background-color: ;
-				}
-				image{
-					width: 56.25rpx;
-					height: 90px;
-				}
-			}
-			.contView{
-				flex: 1;
-				border-bottom: 0.62rpx solid #DADEE6;
-				.contView-title{
-					margin-top:25rpx ;
-					font-size: 22.5rpx;
-					font-weight: 500;
-					color: #292C33;
-				}
-				.contView-content{
-					margin:15rpx 0 20rpx;
-					font-size: 20rpx;
-					color: #525866;
-				}
-				.contView-time{
-					margin-bottom: 25rpx;
-					font-size: 17.5rpx;
-					color: #666E80;
-				}
-			}
-		}
-		.bottomTishi{
-			padding: 6.25rpx 0px;
-			width: 100%;
-			// position: absolute;
-			// bottom: 0rpx;
-			text-align: center;
-			font-size: 17.5rpx;
-			color: #525866;
-		}
-	}
+.messages-page {
+  padding-top: 15rpx;
+  height: 100%;
+  overflow-y: auto;
+  .messages-content {
+    display: flex;
+    background-color: #fff;
+    .imgView {
+      margin-top: 25rpx;
+      margin-left: 25rpx;
+      margin-right: 25rpx;
+      margin-bottom: 63.75rpx;
+      width: 56.25rpx;
+      height: 56.25rpx;
+      vertical-align: top;
+      .image-circle {
+        background-color: ;
+      }
+      image {
+        width: 56.25rpx;
+        height: 90px;
+      }
+    }
+    .contView {
+      flex: 1;
+      border-bottom: 0.62rpx solid #dadee6;
+      .contView-title {
+        margin-top: 25rpx;
+        font-size: 22.5rpx;
+        font-weight: 500;
+        color: #292c33;
+      }
+      .contView-content {
+        margin: 15rpx 0 20rpx;
+        font-size: 20rpx;
+        color: #525866;
+      }
+      .contView-time {
+        margin-bottom: 25rpx;
+        font-size: 17.5rpx;
+        color: #666e80;
+      }
+    }
+  }
+  .bottomTishi {
+    padding: 6.25rpx 0px;
+    width: 100%;
+    // position: absolute;
+    // bottom: 0rpx;
+    text-align: center;
+    font-size: 17.5rpx;
+    color: #525866;
+  }
+}
 </style>

+ 114 - 26
pages/mission-action/components/assign-mission.vue

@@ -2,30 +2,26 @@
 	<view class="assign-mission">
 		<scroll-view class="scroll-y" scroll-y="true">
 			<tm-radio-group
-			  :list="list"
+			  :list="desicionList"
 				label="改善工具"
-				:defaultValue='defaultValue'
-				@change="changeSelect"
-				:setting="{
-				  value: 'value',
-				  name: 'label'
-			  }"
+				:defaultValue='desicion'
+				@change="changeDesicion"
 		  />
 		  <view class="switch-box">
 			  <text class="label">需要审核改善方案</text>
-			  <switch checked="true" style="transform:scale(1.5)" />
+			  <switch
+          :checked="needApproveFlag"
+          style="transform:scale(1.5)"
+          @change="switchChange" />
 		  </view>
 		  <tm-radio-group
-			  :list="list"
-			  :defaultValue='defaultValue'
-			  @change="changeSelect"
-			  :setting="{
-				  value: 'value',
-				  name: 'label'
-			  }"
+			  :list="empDeptList"
+			  :setting="{value: 'empId',name: 'empName'}"
+        :defaultValue='desPersopn.empId'
+			  @change="changeDesPersopn"
 		  />
 		</scroll-view>
-		<view class="fixed-buttom-btn">
+		<view class="fixed-buttom-btn" @click="sure">
 			<text class="btn-text">确定</text>
 		</view>
 	</view>
@@ -34,25 +30,117 @@
 <script>
 	// 指派改善任务
 	export default {
+    props: {
+      // 是否禁用
+      disabled: {
+        type: Boolean,
+        default: false
+      },
+      // 详情回显的数据
+      values: {
+        type: Object,
+        default: () => {
+          return {}
+        }
+      },
+      // 按钮信息 (包过请求的key)
+      btnInfo: {
+        type: Object,
+        default: () => {
+          return {}
+        }
+      },
+      // 任务详情
+      missionDetails: {
+        type: Object,
+        default: () => {
+          return {}
+        }
+      }
+    },
 		data() {
 			return {
-				defaultValue: 1,
-				list: [
-					{value: 1, label: 'PDCA1'},
-					// {value: 2, label: 'PDCA2'},
-					// {value: 3, label: 'PDCA3'},
-					// {value: 4, label: 'PDCA4'}
-				]
+        // 选中改善方案
+        desicion: 0,
+        // 改善方案列表(0 改善方案 目前只有pdca)
+				desicionList: [{ value: 0, name: 'PDCA' }],
+        // 是否需要审核改善方案
+        needApproveFlag: false,
+        // 人员列表
+        empDeptList: [],
+        // 更改指派人
+        desPersopn: {}
 			}
 		},
 		created() {
 			uni.setNavigationBarTitle({
 				title: '指派改善任务'
-			});
+      });
+      this.getEmpDeptTree();
 		},
 		methods: {
-			changeSelect(selectVal, selectData, i) {
-				this.defaultValue = selectVal;
+      // 更改改善方案
+			changeDesicion(selectVal, selectData, i) {
+				this.desicion = selectVal;
+      },
+      switchChange(e) {
+        this.needApproveFlag = e.target.value;
+      },
+       // 更改指派人
+			changeDesPersopn(selectVal, selectData, i) {
+				this.desPersopn = selectData;
+      },
+      // 确定
+      sure() {
+        const { params } = this.btnInfo;
+        let requestParams = {};
+        this.btnInfo.params.map(item => {
+          if(item.valueKey){
+            requestParams[item.paramsKey] = (
+              item.isOutvalueKey
+              ? this.missionDetails
+              : this.btnInfo
+            )[item.valueKey];
+          }else {
+            switch(item.paramsKey){
+              case 'desicion':
+                requestParams[item.paramsKey] = this.desicion;
+                break;
+              case 'receiveEmpId':
+                requestParams[item.paramsKey] = this.desPersopn.empId;
+                break;
+              case 'receiveEmpName':
+                requestParams[item.paramsKey] = this.desPersopn.empName;
+                break;
+              case 'needApproveFlag':
+                requestParams[item.paramsKey] = this.needApproveFlag;
+                break;
+              default:
+                requestParams[item.paramsKey] = '';
+                break;
+            }
+          }
+        });
+        this.$emit('comRequest', requestParams);
+      },
+      // 查询部门人员树
+			getEmpDeptTree() {
+				this.$store.dispatch({
+					type: 'mission/commActions',
+					payload: {
+						key: "getEmpDeptTree"
+					}
+				}).then(data => {
+					if(data) {
+            let _empDeptList = [];
+            data && data.map(item => {
+              if(item.responseList){
+                 _empDeptList = [..._empDeptList, ...item.responseList];
+              }
+            });
+            this.empDeptList = _empDeptList;
+					}
+				});
 			}
 		}
 	}

+ 65 - 3
pages/mission-action/components/disagree.vue

@@ -9,11 +9,16 @@
 			    placeholder="请输入"
 			  	placeholder-style="color: #B8BECC"
 			  	:maxlength="-1"
+          :disabled="disabled"
           auto-height
+          :value="value"
+          @input="changeValue"
 			  />
 		</view>
     </scroll-view>
-		<view class="fixed-buttom-btn">
+		<view class="fixed-buttom-btn"
+      v-if="!disabled"
+      @click="sure">
 			<text class="btn-text">确定</text>
 		</view>
 	</view>
@@ -22,11 +27,68 @@
 <script>
 	// 不认可原因
 	export default {
+    props: {
+      // 是否禁用
+      disabled: {
+        type: Boolean,
+        default: false
+      },
+      // 详情回显的数据
+      values: {
+        type: Object,
+        default: () => {
+          return {}
+        }
+      },
+      // 按钮信息 (包过请求的key)
+      btnInfo: {
+        type: Object,
+        default: () => {
+          return {}
+        }
+      },
+      // 任务详情
+      missionDetails: {
+        type: Object,
+        default: () => {
+          return {}
+        }
+      }
+    },
+    data(){
+      return {
+        value: ''
+      }
+    },
 		created() {
 			uni.setNavigationBarTitle({
 				title: '原因'
-			});
-		}
+      });
+      if(this.disabled) {
+        this.value = this.values['textarea'];
+      }
+    },
+    methods: {
+      changeValue(e) {
+        this.value = e.detail.value;
+      },
+      sure() {
+        const { params } = this.btnInfo;
+        let requestParams = {};
+        this.btnInfo.params.map(item => {
+          if(item.valueKey){
+            requestParams[item.paramsKey] = (
+              item.isOutvalueKey
+              ? this.missionDetails
+              : this.btnInfo
+            )[item.valueKey];
+          }else {
+            requestParams[item.paramsKey] = this.value;
+          }
+        });
+        this.$emit('comRequest', requestParams);
+      }
+    }
 	}
 </script>
 

+ 140 - 0
pages/mission-action/components/modal.vue

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

+ 100 - 52
pages/mission-action/components/pdca-components/do-and-check.vue

@@ -1,13 +1,19 @@
 <template>
 	<view class="com-plan-content">
 		<view class="title">
-			<text>{{ title }}</text>
+			<text>
+        {{ type === 'do' ? '执行过程记录(Do)' :  '改善确认(Check)'}}
+      </text>
 		</view>
-		<template v-for="(item, i) in list">
-			<view class="item-view">
+		<template v-for="(item, i) in recordList">
+			<view class="item-view" :key="type + i">
 				<view class="top-action">
-					<text>改善确认(1)</text>
-					<text class="blue-text">删除</text>
+					<text>改善确认({{ i + 1 }})</text>
+					<text class="blue-text"
+            v-if="!disabled"
+            @click="delRecord(i)" >
+            删除
+          </text>
 				</view>
 				<view class="main">
 					<view class="row">
@@ -16,11 +22,14 @@
 						</view>
 						<view class="content">
 							<textarea class="textarea"
-						    :key="title"
+						    :key="type"
 							  placeholder="请输入"
 								placeholder-style="color: #B8BECC"
 								:maxlength="-1"
 								auto-height
+                :value="item.record"
+                :disabled="disabled"
+                @input="changeRecord($event, i)"
 							/>
 						</view>
 					</view>
@@ -28,18 +37,28 @@
 						<view class="label-view">
 							<text>计划日期</text>
 						</view>
-						<view class="content">
-							<text>选择计划日期</text>
+						<view class="time-pick">
+							<date-time-picker
+                :height="140"
+                :pickIndex="i"
+                :defaultValue="item.date"
+                :disabled="disabled"
+                @change="changeDateTime" />
 						</view>
 					</view>
-					<tm-upload-img
-						:filePaths="['/static/img-icon.png', '/static/img-icon.png']"
-					/>
+          <template v-if="showUploadImg">
+            <tm-upload-img
+              label="改善效果"
+						  :filePaths="item.filePath"
+              :disabled="disabled"
+              @changeFilePaths="changeFilePaths"
+					  />
+          </template>
 				</view>
 			</view>
 		</template>
-		<view class="add-btn" @click="addRecord">
-			<text class="blue-text"> 
+		<view class="add-btn" @click="addRecord" v-if="!disabled">
+			<text class="blue-text">
 			  <text class="big">+</text>
 			  增加一条记录
 			</text>
@@ -48,37 +67,62 @@
 </template>
 
 <script>
-	// 执行过程记录(Do)和 改善确认(Check)
+  // 执行过程记录(Do)和 改善确认(Check)
 	export default {
 		props: {
       // 多行文本框标题
-			title: {
+			type: {
         type: String,
-        default: '执行过程记录(Do)'
-			}
-    },
-    data() {
-      return {
-        // list长度 控制个数
-        list: [
-					{gcjl: '', date: '', imgPath: '' },
-					{gcjl: '', date: '', imgPath: '' }
-				]
-      }
+        default: 'do'
+			},
+      // 是否展示上传图片行
+			showUploadImg: {
+        type: Boolean,
+        default: false
+      },
+      // 是否禁用
+      disabled: {
+        type: Boolean,
+        default: false
+      },
+      // 控制记录列表数组
+      recordList: {
+        type: Array,
+        default: () => {
+          return [{record: '', date: '', filePath: [] }]
+        }
+      },
     },
 		methods: {
-      changeVal(e) {
-        if(this.label === '改善计划'){
-          this.planvalue = e.target.value;
-        }else {
-          this.actionvalue = e.target.value;
-        }
+      // 过程记录变化
+      changeRecord(e, index) {
+        let _recordList = [...this.recordList];
+        _recordList[index].record = e.target.value;
+         this.$emit('changeRecordList', _recordList);
+      },
+      // 日期时间改变
+      changeDateTime(dateObj, pickType, index) {
+        let _recordList = [...this.recordList];
+        _recordList[index].date = dateObj.f4;
+        console.log('日期时间', dateObj.f4, index);
+        this.$emit('changeRecordList', _recordList);
       },
-			// 新增一条记录
+      // 改善效果改变
+      changeFilePaths(filePaths, index) {
+        let _recordList = [...this.recordList];
+        _recordList[index].filePath = filePaths;
+        console.log('改善效果', filePaths, index);
+        this.$emit('changeRecordList', _recordList);
+      },
+      // 新增一条记录
 			addRecord() {
-				this.list = [...this.list, {gcjl: '', date: '', imgPath: '' }]
-			}
-		},
+        this.$emit('changeRecordList', [...this.recordList, {record: '', date: '', filePath: [] }]);
+      },
+      // 删除记录
+      delRecord(index) {
+         this.$emit('changeRecordList', this.recordList.filter((item, i) => i != index));
+      }
+    }
 	}
 </script>
 
@@ -96,18 +140,18 @@
 				color: #292C33;
 			}
 		}
-		
+
 		.blue-text {
 			font-size: 23.75rpx;
 			color: #3377FF !important;
-			
+
 			.big {
 				font-size: 28.75rpx;
 			}
 		}
-		
+
 		.item-view {
-			
+
 			.top-action {
 				display: flex;
 				align-items: center;
@@ -116,36 +160,36 @@
 				margin-bottom: 15rpx;
 				height: 22.5rpx;
 				padding: 0 25rpx;
-				
+
 				text {
 					font-size: 22.5rpx;
 					color: #666F80;
 				}
 			}
-			
+
 			.main {
 				background-color: #fff;
-				
+
 				.row {
 					display: flex;
 					border-bottom: 0.62rpx solid #DADEE6;
 					padding-left: 25rpx;
-					
+
 					.label-view {
 						width: 175rpx;
 						line-height: 22.5rpx;
 						padding: 31.25rpx 0;
-					
+
 						>text {
 							font-size: 22.5rpx;
 							color: #666F80;
 						}
 					}
-					
+
 					.content {
 						flex: 1;
 						padding: 25rpx 0;
-					
+
 						.textarea {
 							width: 100%;
 							min-height: 200rpx;
@@ -155,16 +199,20 @@
 							color: #525866;
 							box-sizing: border-box;
 						}
-						
+
 						>text {
 							font-size: 22.5rpx;
 							color: #B8BECC;
 						}
-					}
+          }
+
+          .time-pick {
+            flex: 1;
+          }
 				}
-				
+
 				.row-heigth {
-					
+
 					.label-view {
 						line-height: 22.5rpx;
 						padding: 31.25rpx 0;
@@ -172,7 +220,7 @@
 				}
 			}
 		}
-		
+
 		.add-btn {
 			display: flex;
 			justify-content: center;

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

@@ -14,7 +14,8 @@
 					placeholder-style="color: #B8BECC"
 					:maxlength="-1"
 					auto-height
-          :value="label === '改善计划' ? planvalue : actionvalue"
+          :value="defaultValue"
+          :disabled="disabled"
           @input="changeVal"
 				/>
 			</view>
@@ -27,40 +28,38 @@
 
 	export default {
 		props: {
-      // 多行文本框标题
-			title: {
-        type: String,
-        default: '改善计划(Plan)'
-			},
-      // 多行文本框子标题
-			label: {
-        type: String,
-        default: '改善计划'
-      },
-      // 改善计划默认值
-      defaultPlanValue: {
+      // 类型 (plan 和 action)
+			type: {
         type: String,
-        default: ''
+        default: 'plan'
       },
       // 对策处置默认值
-      defaultactionValue: {
+      defaultValue: {
         type: String,
         default: ''
-      }
+      },
+      // 是否禁用
+      disabled: {
+        type: Boolean,
+        default: false
+      },
     },
-    data() {
-      return {
-        planvalue: this.defaultPlanValue, // 改善计划
-        actionvalue: this.defaultactionValue // 对策处置
+    computed: {
+      // 多行文本框标题
+      title() {
+        return this.type === 'plan' ? '改善计划(Plan)' : '对策处置(Action)'
+      },
+        // 多行文本框子标题
+			label() {
+        return this.type === 'plan' ? '改善计划' : '对策处置'
       }
+    },
+    created() {
+      this.value = this.defaultValue;
     },
 		methods: {
       changeVal(e) {
-        if(this.label === '改善计划'){
-          this.planvalue = e.target.value;
-        }else {
-          this.actionvalue = e.target.value;
-        }
+        this.$emit('changeTextare', this.type,  e.target.value);
       }
 		},
 	}

+ 164 - 21
pages/mission-action/components/pdca.vue

@@ -2,7 +2,7 @@
 	<view class="pdca-page">
 		<uni-segmented-control
 		  :current="current"
-			:values="items"
+			:values="tabItems"
 			@clickItem="onClickItem"
 			style-type="text"
 			active-color="#3377FF" />
@@ -10,30 +10,50 @@
 			<scroll-view class="scroll-y" scroll-y="true">
         <one-textarea
           v-if="current === 0"
-          :defaultPlanValue="'99999'"
-         />
+          type="plan"
+          :defaultValue="plan"
+          :disabled="disabled"
+          @changeTextare="changeTextare"
+        />
 				 <do-and-check
 					 v-if="current === 1"
-					/>
-				<view v-if="current === 2">
-						选项卡3的内容
-				</view>
+           type="do"
+           :disabled="disabled"
+           :recordList="doList"
+           @changeRecordList="changeDoList"
+				/>
+				<do-and-check
+					v-if="current === 2"
+          type="check"
+          :disabled="disabled"
+          :recordList="checkList"
+          :showUploadImg="true"
+          @changeRecordList="changeCheckList"
+				/>
 				<one-textarea
           v-if="current === 3"
+          type="action"
           title="对策处置(Action)"
           label="对策处置"
-          :defaultactionValue="'123'"
+          :defaultValue="action"
+          :disabled="disabled"
+          @changeTextare="changeTextare"
          />
 			</scroll-view>
-			<view class="fixed-buttom-btn">
-				<view class="btn-text cancle">
-					<text>取消</text>
+			<view class="fixed-buttom-btn" v-if="!disabled">
+		   	<view class="fixed-buttom-btn">
+					<text>暂存</text>
 				</view>
-				<view class="btn-text">
-					<text>确定</text>
+				<view class="btn-text" @click="toggleModalVisibile">
+					<text>提交</text>
 				</view>
 			</view>
 		</view>
+    <!-- 方案名称modal -->
+    <modal
+      v-if="modalVisibile"
+      @close="toggleModalVisibile"
+      @sure="sure" />
 	</view>
 </template>
 
@@ -41,31 +61,154 @@
 	// 改善任务PDCA
 	import uniSegmentedControl from "@/components/uni-segmented-control/uni-segmented-control.vue"
 	import oneTextarea from './pdca-components/one-textarea.vue'
-	import doAndCheck from './pdca-components/do-and-check.vue'
+  import doAndCheck from './pdca-components/do-and-check.vue'
+  import modal from './modal.vue'
 
 	export default {
+    props: {
+      // 是否禁用
+      disabled: {
+        type: Boolean,
+        default: false
+      },
+      // 详情回显的数据
+      values: {
+        type: Object,
+        default: () => {
+          return {}
+        }
+      },
+      // 按钮信息 (包过请求的key)
+      btnInfo: {
+        type: Object,
+        default: () => {
+          return {}
+        }
+      },
+      // 任务详情
+      missionDetails: {
+        type: Object,
+        default: () => {
+          return {}
+        }
+      },
+      // pdca类型 p 和 pdca
+      pdcaSetting: {
+        type: String,
+        default: 'p'
+      }
+    },
 		data() {
 			return {
-				items: ['改善计划(P)', '执行过程(D)', '改善确认(C)', '对策处置(A)'],
-        current: 1,
+        current: 0,
+        plan: '', // 改善计划
+        doList: [{record: '', date: ''}], // 执行过程
+        checkList: [{record: '', date: '', filePath: [] }], // 改善确认
+        action: '', // 对策处置
+        // 方案名称显示隐藏
+        modalVisibile: false
 			}
-		},
+    },
+    computed: {
+      tabItems(){
+        return this.pdcaSetting === 'p'
+          ? ['改善计划(P)']
+          : ['改善计划(P)', '执行过程(D)', '改善确认(C)', '对策处置(A)'];
+      }
+    },
 		created() {
 			uni.setNavigationBarTitle({
 				title: '改善计划'
-			});
+      });
+      if(this.disabled) {
+        this.plan = this.values['plan'] || '';
+        this.doList = (this.values['do'] && this.values['do'].length > 0)
+          ? this.values['do']
+          : [{record: '', date: ''}];
+        this.checkList = (this.values['check'] && this.values['check'].length > 0)
+          ? this.values['check']
+          : [{record: '', date: '', filePath: [] }];
+        this.action = this.values['action'] || '';
+      }
 		},
 		methods: {
 			onClickItem(e) {
 				if (this.current !== e.currentIndex) {
 					this.current = e.currentIndex;
 				}
-			}
+      },
+      // 切换方案名称显示隐藏
+      toggleModalVisibile() {
+        this.modalVisibile = !this.modalVisibile;
+      },
+      // 改善计划/对策处置变化
+      changeTextare(type, text) {
+        this[type] = text;
+      },
+      // 执行过程变化
+      changeDoList(list) {
+        this.doList = list;
+      },
+      // 改善确认变化
+      changeCheckList(list) {
+        this.checkList = list;
+      },
+      // 提交审核/ 暂存(暂存时improveScheme为空)
+      sure(improveScheme) {
+        const { params } = this.btnInfo;
+        let requestParams = {
+          improveScheme // 改善方案名称
+        };
+        this.btnInfo.params && this.btnInfo.params.map(item => {
+          if(item.valueKey){
+            requestParams[item.paramsKey] = (
+              item.isOutvalueKey
+              ? this.missionDetails
+              : this.btnInfo
+            )[item.valueKey];
+          }else {
+            switch(item.paramsKey){
+              case 'taskPlan':
+                requestParams[item.paramsKey] = this.plan;
+                break;
+              case 'taskAction':
+                requestParams[item.paramsKey] = this.action;
+                break;
+              case 'taskDoRequestList':
+                requestParams[item.paramsKey] = this.doList.map((item, i) => {
+                  return {
+                    taskDoId: i + 1,
+                    taskDoProcess: item.record,
+                    taskDoPlan: item.date
+                  }
+                });
+                break;
+              case 'taskCheckRequestList':
+                requestParams[item.paramsKey] = this.checkList.map((item, i) => {
+                  return {
+                    taskCheckId: i + 1,
+                    taskCheckProcess: item.record,
+                    taskCheckPlan: item.date,
+                    taskCheckEffect: item.filePath.join(',')
+                  }
+                });
+                break;
+              default:
+                requestParams[item.paramsKey] = '';
+                break;
+            }
+          }
+        });
+        console.log(9, requestParams)
+        this.$emit('comRequest', requestParams);
+        this.toggleModalVisibile();
+      }
 		},
 		components: {
 			uniSegmentedControl,
 			oneTextarea,
-			doAndCheck
+      doAndCheck,
+      modal
 		}
 	}
 </script>
@@ -75,7 +218,7 @@
 		height: 100%;
 
 		.content {
-			height: calc(100% - 141.5rpx);
+      height: calc(100% - 141.5rpx);
 
 			.scroll-y {
 				height: 100%;

+ 75 - 37
pages/mission-action/components/personnel.vue

@@ -3,19 +3,19 @@
 		<scroll-view class="scroll-y" scroll-y="true">
 			<tm-radio-group
         type="select"
-			  :list="list"
-				:defaultValue='defaultValue'
-				@change="changeSelect"
-        :openkeys="[0]"
+			  :list="empDeptList"
+				:defaultValue='desPersopn.empId'
 				:setting="{
-          pName: 'pName',
-          child: 'childList',
-				  value: 'value',
-				  name: 'label'
+          pName: 'deptName',
+          child: 'responseList',
+				  value: 'empId',
+				  name: 'empName'
 			  }"
+        :openkeys="[0]"
+        @change="changeDesPersopn"
 			/>
 		</scroll-view>
-		<view class="fixed-buttom-btn">
+		<view class="fixed-buttom-btn" @click="sure">
 			<text class="btn-text">确定</text>
 		</view>
 	</view>
@@ -24,43 +24,81 @@
 <script>
 	// 人员架构
 	export default {
+    props: {
+      // 按钮信息 (包过请求的key)
+      btnInfo: {
+        type: Object,
+        default: () => {
+          return {}
+        }
+      },
+      // 任务详情
+      missionDetails: {
+        type: Object,
+        default: () => {
+          return {}
+        }
+      }
+    },
 		data(){
 			return {
-				defaultValue: 1,
-				list: [
-          {
-            pValue: 1,
-            pName: '门诊',
-            childList: [
-              {value: 1, label: 'PDCA1'},
-					    {value: 2, label: 'PDCA2'},
-				    	{value: 3, label: 'PDCA3'},
-					    {value: 4, label: 'PDCA4'}
-            ]
-          },
-          {
-            pValue: 2,
-            pName: '分诊',
-            childList: [
-              {value: 11, label: '许玮琛1'},
-					    {value: 22, label: '许玮琛2'},
-				    	{value: 33, label: '许玮琛3'},
-					    {value: 44, label: '许玮琛4'}
-            ]
-          },
-
-				]
+        // 人员列表
+        empDeptList: [],
+        // 接收人信息
+        desPersopn: {}
 			}
 		},
 		created() {
 			uni.setNavigationBarTitle({
 				title: '人员架构'
-			});
+      });
+      this.getEmpDeptTree();
     },
     methods: {
-      changeSelect(selectVal) {
-        this.defaultValue = selectVal
-      }
+      // 更改接收人
+      changeDesPersopn(selectVal, selectData, i) {
+        this.desPersopn = selectData;
+      },
+      // 确定
+      sure() {
+        const { params } = this.btnInfo;
+        let requestParams = {};
+        this.btnInfo.params.map(item => {
+          if(item.valueKey){
+            requestParams[item.paramsKey] = (
+              item.isOutvalueKey
+              ? this.missionDetails
+              : this.btnInfo
+            )[item.valueKey];
+          }else {
+            switch(item.paramsKey){
+              case 'receiveEmpId':
+                requestParams[item.paramsKey] = this.desPersopn.empId;
+                break;
+              case 'receiveEmpName':
+                requestParams[item.paramsKey] = this.desPersopn.empName;
+                break;
+              default:
+                requestParams[item.paramsKey] = '';
+                break;
+            }
+          }
+        });
+        this.$emit('comRequest', requestParams);
+      },
+      // 查询部门人员树
+			getEmpDeptTree() {
+				this.$store.dispatch({
+					type: 'mission/commActions',
+					payload: {
+						key: "getEmpDeptTree"
+					}
+				}).then(data => {
+					if(data) {
+            this.empDeptList = data || [];
+          }
+				});
+			}
     },
 	}
 </script>

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

@@ -9,16 +9,22 @@
 				  placeholder="请输入"
 					placeholder-style="color: #B8BECC"
 					:maxlength="-1"
+          :disabled="disabled"
           auto-height
+          :value="disabled ? values['textarea'] : value"
+          @input="changeValue"
 				/>
 			</view>
 			<tm-upload-img
-			  :filePaths="filePaths"
+			  :filePaths="filePath"
 				:isMultiple="true"
+        :disabled="disabled"
 				@changeFilePaths="changeFilePaths"
 			/>
 		</scroll-view>
-		<view class="fixed-buttom-btn">
+		<view class="fixed-buttom-btn"
+      v-if="!disabled"
+      @click="sure">
 			<text class="btn-text">确定</text>
 		</view>
 	</view>
@@ -26,22 +32,73 @@
 
 <script>
 	// 改善回复
-
 	export default {
+     props: {
+      // 是否禁用
+      disabled: {
+        type: Boolean,
+        default: false
+      },
+      // 详情回显的数据
+      values: {
+        type: Object,
+        default: () => {
+          return {}
+        }
+      },
+      // 按钮信息 (包过请求的key)
+      btnInfo: {
+        type: Object,
+        default: () => {
+          return {}
+        }
+      },
+      // 任务详情
+      missionDetails: {
+        type: Object,
+        default: () => {
+          return {}
+        }
+      }
+    },
 		data() {
 			return {
-				filePaths: ['/static/img-icon.png', '/static/img-icon.png']
+        value: '',
+				filePath: ['/static/img-icon.png', '/static/img-icon.png']
 			}
 		},
 		created() {
 			uni.setNavigationBarTitle({
 				title: '原因'
-			});
+      });
+      if(this.disabled) {
+        this.value = this.values['textarea'];
+        this.filePath = this.values['filePath'] || [];
+      }
 		},
 		methods: {
-			changeFilePaths(filePaths) {
-				this.filePaths = filePaths;
-			}
+      changeValue(e) {
+        this.value = e.detail.value;
+      },
+			changeFilePaths(filePath) {
+				this.filePath = filePath;
+      },
+      sure() {
+        const { params } = this.btnInfo;
+        let requestParams = {};
+        params.map(item => {
+          if(item.valueKey){
+            requestParams[item.paramsKey] = (item.isOutvalueKey ? this.missionDetails : this.btnInfo)[item.valueKey];
+          }else {
+            if(item.paramsKey === 'imgPath'){ // 上传图片
+              requestParams[item.paramsKey] = this.filePath.join(',');
+            }else {
+              requestParams[item.paramsKey] = this.value;
+            }
+          }
+        })
+        this.$emit('comRequest', requestParams);
+      }
 		}
 	}
 </script>
@@ -64,7 +121,7 @@
 				.label-view {
 					width: 175rpx;
 					line-height: 37.5rpx;
-					
+
 
 					>text {
 						font-size: 22.5rpx;

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

@@ -3,6 +3,12 @@
 		<!-- 指派改善任务 -->
 		<component
 		  :is="currentComponet"
+      :disabled="disabled"
+      :values="values"
+      :btnInfo="btnInfo"
+      :missionDetails="missionDetails"
+      :pdcaSetting="pdcaSetting"
+      @comRequest="comTaskCirculation"
 		/>
 	</view>
 </template>
@@ -13,7 +19,7 @@
 	import disagree from './components/disagree.vue'
 	import personnel from './components/personnel.vue'
 	import writeBack from './components/write-back.vue'
-	import pdca from './components/pdca.vue'
+  import pdca from './components/pdca.vue'
 
 	export default {
     computed: {
@@ -24,22 +30,76 @@
 		data() {
 			return {
 				// 当前显示的组件
-				currentComponet: 'write-back',
+        currentComponet: 'assign-mission',
+        // 查看详情回显的数据
+        values: {},
+        // 按钮信息
+        btnInfo: {},
 				compoentList: [
 					{type: 1, name: '指派改善任务', component: 'assign-mission'},
 					{type: 2, name: '原因', component: 'disagree'},
 					{type: 3, name: '人员架构', component: 'personnel'},
 					{type: 4, name: '改善回复', component: 'write-back'},
 					{type: 5, name: 'PDCA', component: 'pdca'},
-				]
+        ],
+        // pdca类型
+        pdcaSetting: 'p'
 			}
-		},
-		created() {
-			// console.log(this.compoentList[0].component)
-			// this.currentComponet = this.compoentList[0].component
-		},
+    },
+    onLoad({ details }){
+      this.getComponentInfo(details ? JSON.parse(details) : {});
+    },
 		methods: {
-
+      // 获取组件信息
+      getComponentInfo(details) {
+        console.log('组件数据', details)
+        const {
+          nextPermission,
+          nextPermissionName,
+          componentName,
+          disabled,
+          hasAnyData,
+          isOutvalueKey,
+          key,
+          labelKey,
+          dataKey,
+          pdcaSetting
+        } = details;
+        this.currentComponet = componentName;
+        this.disabled = disabled;
+        if(disabled) { // 查看xx详情
+          let values = {};
+          if(hasAnyData){ // 回显数据由多个key组成
+            dataKey.map(item => {
+              values[item.labelKey] = (item.isOutvalueKey ? this.missionDetails : details)[item.key];
+            });
+          }else {
+            values[labelKey] = (isOutvalueKey ? this.missionDetails : details)[key]
+          }
+          this.values = values;
+          this.pdcaSetting = pdcaSetting;
+          this.btnInfo = details;
+        }else { // 编辑流程
+          this.btnInfo = details;
+        }
+      },
+      // 公共改善任务接口
+      comTaskCirculation(data) {
+        this.$store.dispatch({
+					type: 'mission/commActions',
+					payload: {
+						key: "comTaskCirculation",
+						data
+					}
+				}).then(data1 => {
+          if(!data1){
+            let taskId = uni.getStorageSync('taskId');
+            uni.redirectTo({
+              url: `/pages/mission-details/mission-details?taskId=${taskId}`
+            });
+          }
+				});
+      }
 		},
 		components: {
 			assignMission,

+ 146 - 24
pages/mission-details/mission-details.vue

@@ -7,34 +7,52 @@
 					<text>改善进度</text>
 				</view>
 				<view class="plan-box">
-					<template v-for="(item, i) in list">
+					<template v-for="(item, i) in missionDetails.pfmTaskCirculationList || []">
 						<view class="row" :key="i">
 							<view class="col">
 								<image
 								  class="plan-icon"
-									:src="`/static/${i === list.length - 1 ? 'check-radio' : 'check-no'}.png`">
+									:src="`/static/${i === taskStepLength ? 'check-radio' : 'check-no'}.png`">
 								</image>
-								<view class="line" v-show="i != list.length -1"></view>
+								<view class="line" v-show="i != taskStepLength"></view>
 							</view>
 						  <view class="col">
 								<view class="title">
-									<text>{{ item.title }}</text>
+									<text>{{ getContext(item, false, 'row1') }}</text>
 								</view>
 								<view class="sub-box">
 									<view class="sub-title">
-										<text>{{ item.subTitle }}</text>
+										<text>{{ getContext(item, false, 'row2') }}</text>
 									</view>
 									<view class="sub-title">
-										<text>{{ item.date }}</text>
+										<text>{{ item.createTime }}</text>
 									</view>
 								</view>
+                <template v-if="getContext(item, true, 'selectDetails')">
+                  <view class="link-view"
+                    @click="goToDetails(item, getContext(item, true, 'selectDetails'))"
+                  >
+                    <text>{{ getContext(item, true, 'selectDetails').name }}</text>
+								  	<image class="blue-arr" src="/static/blue-arrow.png"></image>
+                  </view>
+                </template>
 						  </view>
 						</view>
+            <view :class="['btn-group', taskBtn.length === 1 ?'btn-one' : '']"
+              v-if="missionDetails.buttonDisplayFlag == 1
+              && missionDetails.pfmTaskCirculationList
+              && i == missionDetails.pfmTaskCirculationList.length - 1"
+            >
+              <template v-for="(btn, i1) in taskBtn">
+                <tm-button
+                  :key="i1"
+                  :type="taskBtn.length === 1 ? 'default' : ( i1 === 0 ? 'default' : 'pramary')"
+                  :btnText="btn.name"
+                  @btnClick="clickBtn(item, btn)"
+                />
+              </template>
+					  </view>
 					</template>
-					<view class="btn-group">
-						<tm-button type="pramary" btnText="不认可" @btnClick="clickRightBtn" />
-						<tm-button btnText="指派改善任务" @btnClick="clickRightBtn" />
-					</view>
 				</view>
 			</view>
 		</scroll-view>
@@ -45,20 +63,39 @@
 	// 改善任务
   import { mapState } from "vuex";
   import listItem from '../mission/components/list-item.vue';
+  import taskTypeList from './setting.js';
+
 	export default {
     computed: {
       ...mapState({
         missionDetails: state => state.mission.missionDetails
-      })
+      }),
+      // 进度长度
+      taskStepLength() {
+        return (this.missionDetails.pfmTaskCirculationList || []).length - 1;
+      },
+      // 获取底部按钮
+      taskBtn() {
+        const { buttonDisplayFlag, pfmTaskCirculationList, taskType, checkResult } = this.missionDetails;
+        if(buttonDisplayFlag == 1 && pfmTaskCirculationList && pfmTaskCirculationList.length > 0) {
+          let task = null;
+          if(taskType == 1) { // 状态为1比较特殊,需要再比较checkResult
+            task = taskTypeList.find(item => (item.taskType == taskType && item.checkResult == checkResult));
+          }else {
+            task = taskTypeList.find(item => item.taskType == taskType);
+          }
+          return task ? task.btnList : []
+        }else {
+          return [];
+        }
+      }
     },
 		data() {
 			return {
-        list: [
-					{title: '查核人:王晓雪', subTitle: '发送改善通知,查核结果:主要缺失', date: '2020-11-22 15:30:22'},
-					{title: '单位负责人', subTitle: '发送改善通知,查核结果:主要缺失', date: '2020-11-22 15:30:22'}
-        ],
         // 任务id
-        taskId: ''
+        taskId: '',
+        // 跳转详情信息
+        linkTaskDetails: null
 			}
     },
     onLoad({ taskId }){
@@ -79,11 +116,70 @@
 				});
 			},
 			// 点击右侧按钮
-			clickRightBtn() {
-				uni.navigateTo({
-					url: '/pages/mission-action/mission-action'
-				})
-			}
+			clickBtn(currentInfo, btnInfo) {
+        if(btnInfo.componentName){ // 有组件名,则跳转页面
+          uni.navigateTo({
+            url: `/pages/mission-action/mission-action?details=${encodeURIComponent(JSON.stringify({...currentInfo, ...btnInfo}))}`
+				  })
+        }else { // 直接调接口
+          let requestParams = {};
+          btnInfo.params.map(item => {
+            if(item.valueKey){
+              requestParams[item.paramsKey] = (
+                item.isOutvalueKey
+                ? this.missionDetails
+                : currentInfo
+              )[item.valueKey];
+            }
+          })
+          this.comTaskCirculation(requestParams);
+        }
+      },
+      // 查看详情
+      goToDetails(currentInfo, detailInfo) {
+        uni.navigateTo({
+          url: `/pages/mission-action/mission-action?details=${encodeURIComponent(JSON.stringify({...currentInfo, ...detailInfo}))}`
+				});
+      },
+      /***
+       *  解析显示对应的内容
+       *  @param {Object} obj 当前遍历的任务
+			 *  @param {Boolean} isLink 是否需要跳转页面(查看详情)
+			 *  @param {String} rowKey 任务流程中的key
+       */
+      getContext(obj, isLink, rowKey){
+        let currentTypeTask = null;
+        if(obj.taskType == 1) {
+          const { checkResult } = this.missionDetails;
+          currentTypeTask = taskTypeList.find(item => (item.taskType == obj.taskType && item.checkResult == checkResult)) || {};
+        }else {
+          currentTypeTask = taskTypeList.find(item => item.taskType == obj.taskType) || {};
+        }
+        if(isLink) {
+          return currentTypeTask[rowKey];
+        }else {
+          const { hasJoin, name, key} = currentTypeTask[rowKey] || {};
+          if(hasJoin) { // 需要删除*并替换
+            return name ? name.replace(/x/g, (obj[key] || '')) : ''
+          }else {
+            return name || '';
+          }
+        }
+      },
+      // 公共改善任务接口
+      comTaskCirculation(data) {
+        this.$store.dispatch({
+					type: 'mission/commActions',
+					payload: {
+						key: "comTaskCirculation",
+						data
+					}
+				}).then(data1 => {
+          if(!data1){
+           this.getMissionDetails();
+          }
+				});
+      }
 		},
 		components: {
 			listItem
@@ -174,15 +270,41 @@
 									height: 75rpx;
 									background-color: #E6EAF2;
 								}
-							}
+              }
+
+              &:last-child {
+                position: relative;
+                flex: 1;
+
+                .link-view {
+                  position: absolute;
+                  top: 0;
+                  right: 0;
+
+                  >text {
+                    font-size: 17.5rpx;
+										color: #3377FF;
+                  }
+
+									.blue-arr {
+										margin-left: 10rpx;
+										width: 8.12rpx;
+										height: 15.62rpx;
+									}
+                }
+              }
 						}
 					}
 
 					.btn-group {
 						display: flex;
-						justify-content: space-between;
+            justify-content: space-between;
 						padding: 0 25rpx;
-					}
+          }
+
+          .btn-one {
+            justify-content: center;
+          }
 				}
 			}
 		}

+ 593 - 110
pages/mission-details/setting.js

@@ -1,23 +1,72 @@
 // 任务流程列表
+/**
+ * 注意:
+ 1. 所有imgPath要换成正式接口key;
+ 2. taskType: 11的按钮需要重新来一遍plan吗,还是pdca都可修改
+ 3. taskType: 12的驳回请求按钮好像不需要填写原因,(原因没画)
+ 4. taskType: 15 制定改善方案,从p开始还是pdca都需要执行)
+ */
 const taskTypeList = [
   {
-    // 任务当前状态
-    taskType: 1,
+    taskType: 1, // 任务当前状态
     currentPermission: 4, // 当前任务在哪
     taskName: '创建任务',
-    // 《只针对第一步操作区分按钮是显示 指派改善任务还是改善回复》 1不用管 2 改善回复 3 制定改善方案
-    checkResult: 3,
-    //  底部按钮 (name: 按钮名字, componentName: 点击后跳转的页面, nextPermission:下一步指派给谁)
-    btnList: [
-      {name: '不认可', componentName: 'disagree', nextPermission: 1, nextPermissionName: '管理员'},
-      {name: '指派改善任务', componentName: 'assign-mission', nextPermission: 5, nextPermissionName: '改善者' }
+    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: '查核人*', key: 'establishEmpName' },
-    // 第二行
-    row2: {hasJoin: true, name: '发送改善通知,查核结果:*', key: 'xx' },
+    // 第一行显示的内容
+    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: '查看查核结果详情', componentName: 'disagree', disabled: true }
+    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,
@@ -25,12 +74,44 @@ const taskTypeList = [
     taskName: '创建任务',
     checkResult: 2,
     btnList: [
-      {name: '不认可', componentName: 'disagree', nextPermission: 1, nextPermissionName: '管理员'},
-      {name: '改善回复', componentName: 'write-back', nextPermission: 1, nextPermissionName: '管理员' }
+      {
+        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: 'imgPath', valueKey: null } // 图片地址
+        ]
+      }
     ],
-     row1: { hasJoin: true, name: '查核人*', key: 'establishEmpName' },
-     row2: {hasJoin: true, name: '发送改善通知,查核结果:*', key: 'xx' },
-    selectDetails: {name: '查看查核结果详情', componentName: 'disagree', disabled: true}
+    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,
@@ -38,12 +119,42 @@ const taskTypeList = [
     taskName: '不认可',
     checkResult: 1,
     btnList: [
-      {name: '重新发送', componentName: 'disagree', nextPermission: 4, nextPermissionName: '单位负责人'},
-      {name: '发送给其他人', componentName: 'personnel', nextPermission: 4, nextPermissionName: '单位负责人' }
+      {
+        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: '单位负责人*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '不认可改善通知' },
-    selectDetails: {name: '查看不认可原因详情', componentName: 'disagree', disabled: true}
+    selectDetails: {
+      name: '查看不认可原因详情',
+      key: 'approveReason',
+      componentName: 'disagree',
+      disabled: true,
+      labelKey: 'textarea'
+    }
   },
   {
     taskType: 3,
@@ -51,11 +162,31 @@ const taskTypeList = [
     taskName: '重新发送',
     checkResult: 1,
     btnList: [
-      {name: '指派改善任务', componentName: 'assign-mission', nextPermission: 4, nextPermissionName: '单位负责人' }
+      {
+        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: '管理员*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '管理员x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '重新发送改善通知' },
-    selectDetails: {name: '查看原因详情', componentName: 'disagree', disabled: true}
+    selectDetails: {
+      name: '查看原因详情',
+      key: 'approveReason',
+      componentName: 'disagree',
+      disabled: true,
+      labelKey: 'textarea'
+    }
   },
   {
     taskType: 4,
@@ -63,11 +194,35 @@ const taskTypeList = [
     taskName: '指派改善任务',
     currentPermission: 5,
     btnList: [
-      {name: '申请更换改善人', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' },
-      {name: '制定改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p' }
+      {
+        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: '单位负责人*', key: 'establishEmpName' },
-    row2: {hasJoin: true, name: '指派*为改善人', key: 'receiveEmpName'},
+    row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
+    row2: {hasJoin: true, name: '指派x为改善人', key: 'receiveEmpName'},
     selectDetails: null
   },
   {
@@ -76,12 +231,43 @@ const taskTypeList = [
     taskName: '改善回复',
     currentPermission: 1,
     btnList: [
-      {name: '不通过', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' },
-      {name: '通过', componentName: null, nextPermission: null, nextPermission: 4, nextPermissionName: '单位负责人' }
+      {
+        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 }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
+        ]
+      }
     ],
-    row1: { hasJoin: true, name: '单位负责人*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '提交了改善回复'},
-    selectDetails: {name: '查看改善回复详情', componentName: 'write-back', disabled: true},
+    selectDetails: {
+      name: '查看改善回复详情',
+      componentName: 'write-back',
+      hasAnyData: true, // 是否有多个数据需要回显(多个数据对多个key)
+      dataKey: [
+        {key: 'approveReason', isOutvalueKey: false, labelKey: 'textarea'}, // 回复内容
+        {key: 'imgPath', isOutvalueKey: false, labelKey: 'filePath'} // 回复图片地址
+      ],
+      disabled: true
+    },
   },
   {
     taskType: 6,
@@ -89,11 +275,35 @@ const taskTypeList = [
     taskName: '更换改善人',
     currentPermission: 5,
     btnList: [
-      {name: '申请更换改善人', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' },
-      {name: '制定改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p' }
+      {
+        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: '单位负责人*', key: 'establishEmpName' },
-    row2: {hasJoin: true, name: '指派*为改善人', key: 'receiveEmpName'},
+    row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
+    row2: {hasJoin: true, name: '指派x为改善人', key: 'receiveEmpName'},
     selectDetails: null
   },
   {
@@ -102,9 +312,22 @@ const taskTypeList = [
     taskName: '更换改善人驳回',
     currentPermission: 5,
     btnList: [
-      {name: '制定改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p' }
+      {
+        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: '单位负责人*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '驳回更换改善人的申请'},
     selectDetails: null
   },
@@ -114,11 +337,34 @@ const taskTypeList = [
     taskName: '改善计划plan通过',
     currentPermission: 5,
     btnList: [
-      {name: '记录改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'pdca' }
+      {
+        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: '单位管理员*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '单位管理员x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '通过改善计划审核,开始执行改善计划'},
-    selectDetails: {name: '查看改善计划详情', componentName: 'pdca',  pdcaSetting: 'p', disabled: true}
+    selectDetails: {
+      name: '查看改善计划详情',
+      componentName: 'pdca',
+      pdcaSetting: 'p',
+      key: 'taskPlan',
+      disabled: true,
+      labelKey: 'plan'
+    }
   },
   {
     taskType: 9,
@@ -126,11 +372,30 @@ const taskTypeList = [
     taskName: '改善计划plan不通过',
     currentPermission: 5,
     btnList: [
-      {name: '制定改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p' }
+      {
+        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: '单位管理员*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '单位管理员x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '建议重新完善改善计划'},
-    selectDetails: {name: '查看原因详情', componentName: 'disagree', disabled: true}
+    selectDetails: {
+      name: '查看原因详情',
+      key: 'approveReason',
+      componentName: 'disagree',
+      disabled: true,
+      labelKey: 'textarea'
+    }
   },
   {
     taskType: 10,
@@ -138,12 +403,47 @@ const taskTypeList = [
     taskName: '改善方案PDCA通过',
     currentPermission: 1,
     btnList: [
-      {name: '不通过', componentName: 'disagree', nextPermission: 4, nextPermissionName: '单位负责人' },
-      {name: '通过', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' }
+      {
+        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: '单位负责人*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '通过了改善方案(PDCA)'},
-    selectDetails: {name: '查看改善方案详情', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'pacd', disabled: true}
+    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,
@@ -151,11 +451,30 @@ const taskTypeList = [
     taskName: '改善方案PDCA不通过',
     currentPermission: 5,
     btnList: [
-      {name: '制定改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p' },
+      {
+        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: '单位管理员*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '单位管理员x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '建议重新完善改善计划'},
-    selectDetails: {name: '查看原因详情', componentName: 'disagree', nextPermission: 4, nextPermissionName: '单位负责人', disabled: true}
+    selectDetails: {
+      name: '查看原因详情',
+      key: 'approveReason',
+      componentName: 'disagree',
+      disabled: true,
+      labelKey: 'textarea'
+    }
   },
   {
     taskType: 12,
@@ -163,10 +482,36 @@ const taskTypeList = [
     taskName: '申请更改改善人',
     currentPermission: 4,
     btnList: [
-      {name: '更改改善人', componentName: 'assign-mission', nextPermission: 5, nextPermissionName: '改善者' },
-      {name: '驳回请求', componentName: null, nextPermission: 5, nextPermissionName: '改善者' },
+      {
+        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: '改善人*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '改善人x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '申请更换改善人'},
     selectDetails: null
   },
@@ -176,12 +521,44 @@ const taskTypeList = [
     taskName: '制定改善方案',
     currentPermission: 4,
     btnList: [
-      {name: '不通过', componentName: 'disagree', nextPermission: 4, nextPermissionName: '单位负责人' },
-      {name: '通过', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' },
+      {
+        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: '改善者*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '改善者x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '提交了改善计划(PLAN)'},
-    selectDetails: {name: '查看改善计划详情', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p', disabled: true}
+    selectDetails: {
+      name: '查看改善计划详情',
+      componentName: 'pdca',
+      pdcaSetting: 'p',
+      key: 'taskPlan',
+      disabled: true,
+      labelKey: 'plan'
+    }
   },
   {
     taskType: 14,
@@ -189,92 +566,198 @@ const taskTypeList = [
     taskName: '制定改善方案plan',
     currentPermission: 4,
     btnList: [
-      {name: '不通过', componentName: 'disagree', nextPermission: 5, nextPermissionName: '改善者' },
-      {name: '通过', componentName: null, nextPermission: 5, nextPermissionName: '改善者' },
+      {
+        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: '改善者*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '改善者x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '提交了改善计划(PLAN)'},
-    selectDetails: {name: '查看改善计划详情', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p', disabled: true}
+    selectDetails: {
+      name: '查看改善计划详情',
+      key: 'taskPlan',
+      componentName: 'pdca',
+      pdcaSetting: 'p',
+      nextPermission: 5,
+      disabled: true,
+      labelKey: 'plan'
+    }
   },
   {
     taskType: 15,
     checkResult: 1,
-    taskName: '改善方案暂停',
+    taskName: '制定改善方案',
     currentPermission: 4,
     btnList: [
-      {name: '不通过', componentName: 'disagree', nextPermission: 4, nextPermissionName: '单位负责人' },
-      {name: '通过', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' },
+      {
+        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: '改善者*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '改善者x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '提交了改善计划(PLAN)'},
-    selectDetails: {name: '查看改善计划详情', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p', disabled: true}
+    selectDetails: {
+      name: '查看改善计划详情',
+      key: 'taskPlan',
+      componentName: 'pdca',
+      pdcaSetting: 'pdca',
+      nextPermission: 5,
+      disabled: true,
+      labelKey: 'plan'
+    }
   },
   {
     taskType: 16,
     checkResult: 1,
-    taskName: '记录改善方案plan',
+    taskName: '记录改善方案pdca',
     currentPermission: 4,
     btnList: [
-      {name: '不通过', componentName: 'disagree', nextPermission: 5, nextPermissionName: '改善者' },
-      {name: '通过', componentName: null, nextPermission: 1, nextPermissionName: '管理员' },
+      {
+        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: null }, // action
+          { paramsKey: 'taskDoRequestList', valueKey: null }, // do
+          { paramsKey: 'taskCheckRequestList', valueKey: null } // check
+        ]
+      },
+      {
+        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 }, // 接收人姓名
+        ]
+      },
     ],
-    row1: { hasJoin: true, name: '改善者*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '改善者x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '提交了改善计划(PLAN)'},
-    selectDetails: {name: '查看改善方案详情', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'pdca', disabled: true}
+    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通过, 改善回复通过',
+    taskName: '改善方案plan通过',
     currentPermission: 4,
     btnList: [],
-    row1: { hasJoin: true, name: '管理员*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '管理员x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '完成改善,本次任务结束'},
-    selectDetails: {name: '查看改善方案详情', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'pdca', disabled: true}
+    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: 4, nextPermissionName: '单位负责人' },
+      {
+        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: '管理员*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '管理员x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '改善方案不通过,重新执行改善流程'},
-    selectDetails: {name: '查看原因详情', componentName: 'disagree', disabled: true }
+    selectDetails: {
+      name: '查看原因详情',
+      key: 'approveReason',
+      componentName: 'disagree',
+      disabled: true,
+      labelKey: 'textarea'
+    }
   },
 ];
 
 export default taskTypeList;
-
-/**
- * 字段描述:
- * taskType:          // 任务当前状态
- * currentPermission:  // 当前任务位置在哪 (1、管理员 2、查核组长 3、查核组员 4、单位负责人 5、改善者)
- * taskName:          // 任务名称
- * checkResult:       // 《只针对第一步创建任务 区分按钮 显示指派改善任务还是改善回复》 1不用管 2 改善回复 3 制定改善方案
- * btnList:{ // 底部按钮
- *   name: // 按钮名字,
- *   componentName: // 点击后跳转的页面,null直接刷新页面即可
- *   nextPermission: // 下一步指派给谁id
- *   nextPermissionName: // 下一步指派给谁
- *   pdcaSetting: // 跳转pdca的配置: <p: 只能编辑plan, pdca: 都可以编辑>
- * }
- * row1: { // 第一行显示的内容
- *    hasJoin:// 是否需要拼接,
- *    name:   // 显示的内容 <注意 星号*指占位符, 后面需要被key字段替换的,
- *    key:    //  要显示的的内容(后端返回的key, 用于替换星号*)
- *  }
- * row2: { // 第二行显示的内容
- *    hasJoin: // 是否需要拼接,
- *    name:    // 显示的内容 <注意 星号*指占位符, 后面需要被key字段替换的,
- *    key:     // 要显示的的内容(后端返回的key, 用于替换星号*)
- *  }
- * selectDetails {
- *   name: '查看改善计划详情', // 详情显示的名字
- *   componentName: 'pdca', // 点击后跳转的页面
- *   pdcaSetting: 'p', // 当componentName='pdca', 需要判断pdcaSetting='p', 还是‘pdca’
- *   disabled: true // 底部按钮禁用
- * }
- */

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

@@ -57,6 +57,7 @@
 		methods: {
 			// 跳转详情页面(改善任务)
 			gotoDetails(id){
+        uni.setStorageSync('taskId', id);
 				uni.navigateTo({
 				  url: `/pages/mission-details/mission-details?taskId=${id}`
 				});

+ 62 - 2
pages/mission/mission.vue

@@ -1,5 +1,8 @@
 <template>
 	<view class="mission-page">
+		<view class="message-remind" @click="toMessagePage">
+			<image :src="messageType?'/static/mission/消息中心未读.png':'/static/mission/消息中心已读.png'" mode=""></image>
+		</view>
 	 	<scroll-view class="scroll-y" scroll-y="true">
 			<list-item
 				v-for="(item, i) in improvingTaskList"
@@ -32,6 +35,7 @@
 <script>
 	// 任务列表
 	import listItem from './components/list-item.vue';
+	import websocket from '../../utils/ws.js';//引入websocket
 	export default {
 		data(){
 			return {
@@ -74,11 +78,24 @@
 				],
 				// 历史任务
 				completeTaskList: [],
+				refTimer: null,
+				isInitWs:null,
+				messageType:null,
 			}
 		},
 		created() {
-			this.getMissionList()
+			// this.getMissionList();
+			this.init(true);
+			this.refTimer = setInterval(() => {
+			    this.isInitWs = websocket.ws ? false : true;
+			    this.init(this.isInitWs);
+			}, 3 * 60 * 1000);
 		},
+		beforeDestroy() {
+		    // 关闭ws连接
+		    websocket.close();
+		    clearInterval(this.refTimer);
+		  },
 		methods: {
 			toggleBtn() {
 				let flag = !this.showCloseList;
@@ -88,6 +105,10 @@
 					name: flag ? '收起历史任务' : '展示历史任务'
 				}
 			},
+			init(isInitWs) {
+				this.isInitWs = isInitWs;
+			    this.getMissionList()
+			},
 			// 获取改善任务列表
 			getMissionList(data) {
 				this.$store.dispatch({
@@ -100,12 +121,36 @@
 					if(data) {
 						this.improvingTaskList = data.improvingTaskResponses || [];
 						this.completeTaskList = data.improveCompleteResponses || [];
+						let hiId = uni.getStorageSync('hiId');
+						let user = uni.getStorageSync('id');
+						let permission = uni.getStorageSync('nowPermission');
+						this.isInitWs && this.initWebsocket(hiId,user,permission);
 					}
 				});
 				/** 请求参数 data
 				 * situationId: 情境id 当管路员或者查核者通过情境进入任务列表时 必传
 				 * checkItemId 单位负责人通过 查核要点进入改善任务列表时 必传
 				 */
+			},
+			initWebsocket(hiId,user,permission) {
+			    websocket.url = `ws://192.168.1.45:8088/imed/pfm/websocket/${hiId}/${user}/${permission}`;
+			    websocket.createWebSocket(this.resolverWsData.bind(this));
+			},
+			// 解析websocket返回数据
+			resolverWsData(type) {
+			  switch (type) {
+			    case "TO_READ":
+			      this.messageType = true;
+			      break;
+			    default:
+				  this.messageType = false;
+			      break;
+			  }
+			},
+			toMessagePage(){
+				uni.navigateTo({
+				  url: `/pages/messages/messages`
+				});
 			}
 		},
 		components: {
@@ -118,7 +163,22 @@
  .mission-page {
    height: 100%;
    padding-top: 15rpx;
-
+	.message-remind{
+		width: 62.5rpx;
+		height: 62.5rpx;
+		position: fixed;
+		top: 25rpx;
+		right: 25rpx;
+		background: rgba(255, 255, 255, 0.95);
+		border-radius: 50%;
+		z-index: 2;
+		image{
+			margin-left: 17.5rpx;
+			margin-top: 16.87rpx;
+			width: 27.5rpx;
+			height: 28.75rpx;
+		}
+	}
    	.scroll-y {
 			height: calc(100% - 87.5rpx);
 

+ 44 - 13
pages/mission/model.js

@@ -27,12 +27,16 @@ export default {
       recordTime: "2021-02-03 09:44:17", // 最终修改时间
       situationId: 1, // 情景id
       situationName: "测试情景", // 情景名称
-      taskType: 0, // 任务当前状态
+      taskType: 2, // 任务当前状态
       updateTime: "2021-02-03T01:44:17.000+0000", // 修改时间 (发送时间)
       improveEmpName: '', //改善人
       improveEmpId: '', //改善人id
-      buttonDisplayFlag: 1,  // 0 不展示 1展示
-      checkResult: 1, // 《只针对第一步操作区分按钮是显示 指派改善任务还是改善回复》 1不用管 2 改善回复 3 制定改善方案
+      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", // 创建时间
@@ -41,23 +45,50 @@ export default {
           id: 1, // 流转记录id
           receiveEmpId: 1, // 接收人id
           receiveEmpName: "管理员吧",// 接收人姓名
-          // action
-          taskAction: "", // 改善处置
+          taskAction: "", // 改善处置 action
           taskId: 1, // 任务id
-          taskPlan: "",// plan整改计划
-          taskType: 0, // 流转状态
+          taskPlan: "噢噢噢噢",// plan整改计划
+          taskType: 13, // 流转状态
+          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: '审核意见', // 审核意见
-          // do
-          taskDoRequestList: [
+          taskDoRequestList: [ // do
             {
               taskDoId:"mock",  // 过程记录id
               taskDoProcess:"mock", // 过程记录内容
               taskDoPlan:"mock" // 计划日期
             }
           ],
-          // check
-          taskCheckRequestList: [
+          taskCheckRequestList: [// check
             {
               taskCheckId:"mock",  // 改善确认id
               taskCheckProcess:"mock", // 改善确认记录过程
@@ -65,7 +96,7 @@ export default {
               taskCheckEffect:"mock" //改善确认改善效果
             }
           ]
-        }
+        },
       ]
     }
   },
@@ -79,7 +110,7 @@ export default {
       // payload = {key,data} // data是请求数据,key是请求接口id
       return commServer(payload).then(data => {
         // 查看任务详情
-        if (payload.key === 'getMissionDetails') {
+        if (payload.key === 'getMissionDetails' && data) {
           commit({
             type: 'changeMissionDetails',
             data

+ 8 - 3
pages/mission/server.js

@@ -6,17 +6,22 @@ const requestList = {
 	// 改善任务列表
 	getMissionList: {
 		method: 'GET',
-		url: 'imed/pfm/improverTask/list'
+		url: 'improverTask/list'
 	},
 	// 改善任务详情
 	getMissionDetails: {
 		method: 'GET',
-		url: 'imed/pfm/improverTask/detail'
+		url: 'improverTask/detail'
 	},
 	// 查询部门人员树 (通用接口)
 	getEmpDeptTree: {
 		method: 'GET',
-		url: 'imed/pfm/common/empDeptTree'
+		url: 'common/empDeptTree'
+	},
+	// 公共改善任务接口
+	comTaskCirculation: {
+		method: 'POST',
+		url: 'improverTask/taskCirculation'
 	}
 };
 

+ 3 - 0
pages/model.js

@@ -6,6 +6,8 @@ import messages from './messages/model.js';
 import mission from './mission/model.js';
 import situationsCenter from './situationsCenter/model.js';
 import situationDetail from './situationDetail/model.js';
+import creatingSituations from "./creatingSituations/model.js";
+
 export default module = {
   login,
   configure,
@@ -15,4 +17,5 @@ export default module = {
   mission,
 	situationsCenter,
 	situationDetail,
+	creatingSituations
 }

+ 0 - 0
static/蓝色查看更多_.png → static/blue-arrow.png


+ 0 - 0
static/蓝色勾选.png → static/bottom-img.png


+ 0 - 0
static/禁用标志.png → static/disable-img.png


+ 0 - 0
static/icon新增(禁用).png → static/icon-add-dis.png


+ 0 - 0
static/icon新增.png → static/icon-add.png


BIN
static/icon-blueMore.png


+ 0 - 0
static/icon删除.png → static/icon-del.png


+ 0 - 0
static/icon禁用.png → static/icon-jinyong.png


+ 0 - 0
static/icon地点(禁用).png → static/icon-map-dis.png


+ 0 - 0
static/icon地点.png → static/icon-map.png


+ 0 - 0
static/icon启用.png → static/icon-qiyong.png


+ 0 - 0
static/icon上移(禁用).png → static/icon-shang-dis.png


+ 0 - 0
static/icon上移.png → static/icon-shang.png


+ 0 - 0
static/icon下移(禁用).png → static/icon-xia-dis.png


+ 0 - 0
static/icon下移.png → static/icon-xia.png


+ 0 - 0
static/查看更多_.png → static/incon-more.png


BIN
static/list-close.png


BIN
static/list-open.png


+ 0 - 0
static/主题勾选.png → static/theme.png


+ 0 - 0
static/gean.png → static/theme0.png


+ 0 - 0
static/xitong.png → static/theme1.png


+ 0 - 0
static/绿色角标.png → static/top-img.png


+ 14 - 0
utils/arrFilter.js

@@ -0,0 +1,14 @@
+/**
+ * 判断原来的数组里是否有某个值,有就删除,没有就添加,然后返回新数组。
+ * 千里及
+ * 2021.2.2
+ */
+export const arrFilter = (key, oldKeys) => {
+	let keys = [];
+	if(oldKeys.includes(key)) {
+		keys = oldKeys.filter((item)=> item !== key);
+	} else {
+		keys = [...oldKeys, key];
+	}
+	return keys;
+}

+ 72 - 0
utils/dateHandle.js

@@ -0,0 +1,72 @@
+/**
+ * 千里及
+ * 2021.2.3
+ * 处理日期的对象
+ */
+export const dateHandle = {
+	/**
+	 * 获取今天的日期时间串
+	 */
+	todayDate: function() {
+		var date = new Date();
+		var year = date.getFullYear();
+		var month = date.getMonth() + 1;
+		var day = date.getDate();
+		return year + "-" + dateHandle.add0(month) + "-" + dateHandle.add0(day);
+	},
+	/**
+	 * 计算两个日期之间相差的天数
+	 * @param {Object} sDate1
+	 * @param {Object} sDate2
+	 */
+	dateDiff: function(sDate1, sDate2) {
+		if(sDate1 == sDate2){
+			return 0;
+		}
+		if(!sDate1){
+			var date = new Date();
+			var year = date.getFullYear();
+			var month = date.getMonth()+1;
+			var day = date.getDate();
+			sDate1 = year + "-" + month + "-" + day;
+		}
+		var oDate1, oDate2, iDays ; 
+		oDate1 = dateHandle.createDate(sDate1);
+		oDate2 = dateHandle.createDate(sDate2);
+		//把相差的毫秒数转换为天数  
+		iDays  =  parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24);
+		return  iDays;  
+	},
+	/**
+	 * 计算指定日期之后X天数的日期
+	 * @param {Object} dateTemp
+	 * @param {Object} days
+	 */
+	getNewData: function(dateTemp, days) {  
+		var nDate = dateHandle.createDate(dateTemp);
+		var millSeconds = Math.abs(nDate) + (days * 24 * 60 * 60 * 1000);  
+		var rDate = new Date(millSeconds);
+		var year = rDate.getFullYear();  
+		var month = rDate.getMonth() + 1;  
+		var date = rDate.getDate();  
+		return year + "-" + dateHandle.add0(month) + "-" + dateHandle.add0(date); 
+	},
+	/**
+	 * 比较第一个日期是否大于第二个
+	 * @param {Object} date1
+	 * @param {Object} date2
+	 */
+	compare: function(date1, date2) {
+		var oDate1 = dateHandle.createDate(date1);
+	 	var oDate2 = dateHandle.createDate(date2);
+		return oDate1.getTime() > oDate2.getTime();
+	},
+	createDate: function(str) {
+		var dateTemp = str.split("-");
+		return new Date(dateTemp[0], Number(dateTemp[1]) - 1, dateTemp[2]);
+	},
+	add0: function(num) {
+		if (Number(num) < 10) num = "0" + num; 
+		return num;
+	}
+}

+ 3 - 1
utils/requestUrl.js

@@ -2,4 +2,6 @@
 // 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://s1.nsloop.com:5137';  // 外网
+
+

+ 34 - 31
utils/ws.js

@@ -11,64 +11,67 @@ const heartCheck = {
       // 表示连接已经关闭或者连接不能打开。
       if (ws && ws.readyState === 3) return;
       //发送一个心跳,后端收到后,返回一个心跳消息,onmessage拿到返回的心跳就说明连接正常
-      ws && ws.send({data: "ping"});
+      ws && ws.send({ data: "ping" });
       self.serverTimeoutObj = setTimeout(() => {
         ws && ws.close();
-                websocket.reconnect();
+        websocket.reconnect();
       }, self.timeout + 3000);
     }, this.timeout);
   }
 };
- 
+
 const websocket = {
   ws: null,
   url: '',
   connected: false,
   connecting: false,
   reconnectTimeId: null,
-    callback: null, // 存放回调函数
-    reconnetCount: 0, // 重连次数
+  callback: null, // 存放回调函数
+  reconnetCount: 0, // 重连次数
   lockReconnect: false, // 避免ws重复连接
   createWebSocket(callback) {
+
     if (this.connected || this.connecting) { // 正在连接或者已经连接,请勿重复连接
       return false
     }
     try {
-            if (callback) websocket.callback = callback;
+      if (callback) websocket.callback = callback;
       this.connecting = true;
       // 创建
       this.ws = uni.connectSocket({
         url: this.url,
         success(data) {
-          // console.log("websocket连接成功!");
+          console.log("websocket连接成功!");
         }
       });
       // 监听 Ws 连接打开
       this.ws.onOpen((res) => {
         this.connecting = false;
         this.connected = true;
-        // console.log("websocket连接打开正常!");
+        console.log("websocket连接打开正常!");
         //心跳检测重置
         heartCheck.start(this.ws);
-                this.reconnetCount && (this.reconnetCount = 0);
+        this.reconnetCount && (this.reconnetCount = 0);
       });
       this.ws.onError((res) => {
         this.connecting = false;
         this.connected = false;
-        // console.log("ws连接错误!", res);
+        console.log("ws连接错误!", res);
         this.reconnect();
       });
       this.ws.onMessage((res) => {
-            if (res.data === 'ping') {
-              heartCheck.start(this.ws); //获取到消息,心跳检测重置
-              this.reconnetCount && (this.reconnetCount = 0);
-            } else {
-          const { type, data } = JSON.parse(res.data);
-          // console.log("ws 收到消息啦:" + type);
+        if (res.data === 'ping') {
+          heartCheck.start(this.ws); //获取到消息,心跳检测重置
+          console.log("ws 没有收到消息");
+          this.reconnetCount && (this.reconnetCount = 0);
+        } else {
+          // const { type, data } = JSON.parse(res.data);
+          const { data } = res;
+          console.log("ws 收到消息啦:" + data);
           if (callback) {
-            callback(type, data);
+            callback(data);
           } else if (websocket.callback) {
-            websocket.callback(type, data);
+            websocket.callback(data);
           }
         }
       });
@@ -86,12 +89,12 @@ const websocket = {
   },
   reconnect() { // 重连
     if (this.lockReconnect) return;
-        if (this.reconnetCount === 6) {
-          this.close();
-          return
-        }
+    if (this.reconnetCount === 6) {
+      this.close();
+      return
+    }
     this.lockReconnect = true;
-        this.reconnetCount++;
+    this.reconnetCount++;
     this.reconnectTimeId && clearTimeout(this.reconnectTimeId);
     this.reconnectTimeId = setTimeout(() => {//没连接上会一直重连,设置延迟避免请求过多
       this.createWebSocket(websocket.callback);
@@ -103,14 +106,14 @@ const websocket = {
       this.ws.close && this.ws.close();
       this.ws = null;
     }
-        this.connected = false;
-        this.connecting = false;
-        this.lockReconnect = false;
-        this.reconnetCount = 0;
-        this.reconnectTimeId && clearTimeout(this.reconnectTimeId);
-        heartCheck.timeoutObj && clearTimeout(heartCheck.timeoutObj);
-        heartCheck.serverTimeoutObj && clearTimeout(heartCheck.serverTimeoutObj);
+    this.connected = false;
+    this.connecting = false;
+    this.lockReconnect = false;
+    this.reconnetCount = 0;
+    this.reconnectTimeId && clearTimeout(this.reconnectTimeId);
+    heartCheck.timeoutObj && clearTimeout(heartCheck.timeoutObj);
+    heartCheck.serverTimeoutObj && clearTimeout(heartCheck.serverTimeoutObj);
   }
 }
- 
+
 export default websocket;