Browse Source

解决冲突

jiangniuniu 4 years ago
parent
commit
dc8567ee81
46 changed files with 2680 additions and 396 deletions
  1. 23 11
      components/date-time-picker/date-time-picker.vue
  2. 24 38
      components/tm-upload-img/tm-upload-img.vue
  3. 0 1
      manifest.json
  4. 24 2
      pages.json
  5. 66 0
      pages/improve-mission-list/improve-mission-list.vue
  6. 121 26
      pages/mission-action/components/assign-mission.vue
  7. 65 3
      pages/mission-action/components/disagree.vue
  8. 140 0
      pages/mission-action/components/modal.vue
  9. 98 52
      pages/mission-action/components/pdca-components/do-and-check.vue
  10. 24 25
      pages/mission-action/components/pdca-components/one-textarea.vue
  11. 185 21
      pages/mission-action/components/pdca.vue
  12. 75 37
      pages/mission-action/components/personnel.vue
  13. 75 9
      pages/mission-action/components/write-back.vue
  14. 68 10
      pages/mission-action/mission-action.vue
  15. 146 24
      pages/mission-details/mission-details.vue
  16. 593 111
      pages/mission-details/setting.js
  17. 1 0
      pages/mission/components/list-item.vue
  18. 1 1
      pages/mission/mission.vue
  19. 46 15
      pages/mission/model.js
  20. 8 3
      pages/mission/server.js
  21. 5 0
      pages/model.js
  22. 6 6
      pages/role-switching/role-switching.vue
  23. 14 0
      pages/situationDetail/model.js
  24. 18 0
      pages/situationDetail/server.js
  25. 432 0
      pages/situationDetail/situationDetail.vue
  26. 14 0
      pages/situationsCenter/model.js
  27. 13 0
      pages/situationsCenter/server.js
  28. 340 0
      pages/situationsCenter/situationsCenter.vue
  29. BIN
      static/blue-arrow.png
  30. BIN
      static/check-list.png
  31. BIN
      static/improve-list.png
  32. 0 0
      static/message-read.png
  33. 0 0
      static/message-unread.png
  34. BIN
      static/mission/多选-已选状态.png
  35. BIN
      static/mission/导航栏返回.png
  36. BIN
      static/mission/蓝色更多.png
  37. BIN
      static/sDetail-subscript.png
  38. BIN
      static/search.png
  39. BIN
      static/situation-add.png
  40. BIN
      static/situation-case.png
  41. BIN
      static/situation-check.png
  42. BIN
      static/situation-system.png
  43. BIN
      static/situation-time.png
  44. BIN
      static/text-clear.png
  45. 2 1
      utils/requestUrl.js
  46. 53 0
      utils/uploadImg.js

+ 23 - 11
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 // 有效范围结束
     };
   },
-
   /**
    * 监听数据
    */
@@ -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;
       }
     },
@@ -383,9 +397,7 @@ export default {
       // 传了默认日期,格式化默认日期为日期对象
       if (this.defaultValue) {
         dtDefault = utils.formatDate(this.defaultValue).dt;
-      }
-      // 如果没有传默认日期,将默认日期设置为当前日期
-      else {
+      } else {// 如果没有传默认日期,将默认日期设置为当前日期
         dtDefault = new Date();
       }
 

+ 24 - 38
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>
@@ -14,6 +14,7 @@
 				<image
 				  class="del-close"
 				  src="/static/del-close.png"
+          v-if="!disabled"
 					@click="delImg(i)" />
 			</view>
 		</view>
@@ -28,7 +29,7 @@
 	 * props:属性说明看tm-radio-gruop.vue
 	 */
 
-  import { URL } from "../../utils/requestUrl.js";
+  import uploadImage from "../../utils/uploadImg.js";
 	export default {
 	  props: {
 			// 上传的图片路径列表
@@ -42,49 +43,34 @@
       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)
-						uni.uploadFile({
-							url: `${URL}/eduscreen/upload/picture`,
-							fileType: 'image',
-							filePath: filePathStr,
-							name: 'file',
-							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.picture = picture;
-									} else {
-										uni.showToast({
-											position: 'top',
-											icon: 'none',
-											title: '上传图片失败',
-											duration: 1000
-										});
-									}
-								}
-							},
-							error(e) {
-								uni.showToast({
-									position: 'top',
-									icon: 'none',
-									title: '上传图片失败',
-									duration: 1000
-								});
-							}
-						});
+            uploadImage(res1).then(fileList => {
+              this.$emit('changeFilePaths', fileList, this.pickIndex);
+				  	})
 					},
 					error: e => {
 						console.log('选择图片失败', e);
@@ -93,7 +79,7 @@
 			},
 			// 删除图片
 			delImg(i) {
-				this.$emit('changeFilePaths',  this.filePaths.filter((item, index) => index != i))
+				this.$emit('changeFilePaths', this.filePaths.filter((item, index) => index != i), this.pickIndex);
 			}
 		}
 	}

+ 0 - 1
manifest.json

@@ -73,7 +73,6 @@
                     "pathRewrite" : {
                         "^/TracerMethodology/api" : ""
                     },
-                    // "target" : "http://192.168.1.55:8901", // 内网
                     "target" : "http://192.168.1.45:8088", // 内网
                     "changeOrigin" : true,
                     "secure" : false,

+ 24 - 2
pages.json

@@ -77,7 +77,28 @@
 			"style": {
 				"navigationBarTitleText": "今日查核",
 				"enablePullDownRefresh": false
-			}	
+			}
+		},
+		{
+			"path": "pages/improve-mission-list/improve-mission-list",
+			"style": {
+				"navigationBarTitleText": "改善列表",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/situationsCenter/situationsCenter",
+			"style": {
+				"navigationBarTitleText": "情境中心",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/situationDetail/situationDetail",
+			"style": {
+				"navigationBarTitleText": "情境详情",
+				"enablePullDownRefresh": false
+			}
 		}
 	],
 	"globalStyle": {
@@ -89,6 +110,7 @@
 		"app-plus": {
 			"background": "#efeff4"
 		},
-		"rpxCalcMaxDeviceWidth": 9999
+		"rpxCalcMaxDeviceWidth": 9999,
+		"onReachBottomDistance": 184
 	}
 }

+ 66 - 0
pages/improve-mission-list/improve-mission-list.vue

@@ -0,0 +1,66 @@
+<template>
+	<view class="improve-mission-list-page">
+		<scroll-view class="scroll-y" scroll-y="true">
+			<list-item
+				v-for="(item, i) in improvingTaskList"
+				:key="item.id"
+				:task="item"
+			/>
+			<list-item
+        v-for="(item, i) in completeTaskList"
+        :key="item.id"
+        :task="item"
+        :isComplete="true"
+			/>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+  // 改善列表
+	export default {
+		data() {
+			return {
+      	// 改善中任务
+				improvingTaskList: [],
+				// 历史任务
+				completeTaskList: []
+			}
+    },
+    onLoad({ situationId }){ // situationId:情景id
+      this.getMissionList({situationId});
+    },
+		methods: {
+    	// 获取改善任务列表
+			getMissionList(data) {
+				this.$store.dispatch({
+					type: 'mission/commActions',
+					payload: {
+						key: "getMissionList",
+						data
+					}
+				}).then(data => {
+					if(data) {
+						this.improvingTaskList = data.improvingTaskResponses || [];
+						this.completeTaskList = data.improveCompleteResponses || [];
+					}
+				});
+				/** 请求参数 data
+				 * situationId: 情境id 当管路员或者查核者通过情境进入任务列表时 必传
+				 * checkItemId 单位负责人通过 查核要点进入改善任务列表时 必传
+				 */
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+  .improve-mission-list-page {
+    height: 100%;
+    padding-top: 15rpx;
+
+    .scroll-y {
+      height: 100%;
+    }
+  }
+</style>

+ 121 - 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,124 @@
 <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() {
+        let requestParams = {};
+        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 '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",
+            data: {
+              deptId: this.missionDetails.deptId // 单位id
+            }
+					}
+				}).then(data => {
+					if(data) {
+            let _empDeptList = [];
+            data && data[0] && data[0].responseList.map(item => {
+              if(item.deptManage == 1) { // 是否部门负责人 1是 0 否
+                _empDeptList.push({
+                  ...item,
+                  empName: '单位负责人' + item.empName
+                });
+              }else {
+                _empDeptList.push(item);
+              }
+            })
+            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>

+ 98 - 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,60 @@
 </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;
+        this.$emit('changeRecordList', _recordList);
       },
-			// 新增一条记录
+      // 改善效果改变
+      changeFilePaths(filePaths, index) {
+        let _recordList = [...this.recordList];
+        _recordList[index].filePath = filePaths;
+        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 +138,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 +158,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 +197,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 +218,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);
       }
 		},
 	}

+ 185 - 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="btn-text cancle" @click="sure('')">
+					<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,175 @@
 	// 改善任务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.getComList(this.values['do'], 'do')
+          : [{record: '', date: ''}];
+        this.checkList = (this.values['check'] && this.values['check'].length > 0)
+          ? this.getComList(this.values['check'], '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) {
+        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;
+            }
+          }
+        });
+        this.$emit('comRequest', requestParams);
+        improveScheme && this.toggleModalVisibile();
+      },
+       /**
+       * 获取相同key 的新数组
+       * @param {Array} list 原数组
+       * @param {String} type 类型(如 do、check)
+       */
+      getComList(list, type) {
+        let newList = [];
+        list.map(item => {
+          if(type === 'do') {
+            newList.push({
+              record: item.taskDoProcess || '', // 记录内容
+              date: item.taskDoPlan || '' // 计划日期
+            });
+          }else if(type === 'check'){
+            newList.push({
+              record: item.taskCheckProcess || '', // 记录过程
+              date: item.taskCheckPlan || '', // 计划日期
+              filePath: item.taskCheckEffect ? item.taskCheckEffect.split(',') : [] // 改善效果(图片)
+            });
+          }
+        });
+        return newList;
+      }
 		},
 		components: {
 			uniSegmentedControl,
 			oneTextarea,
-			doAndCheck
+      doAndCheck,
+      modal
 		}
 	}
 </script>
@@ -75,7 +239,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>

+ 75 - 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,82 @@
 
 <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: []
 			}
 		},
 		created() {
 			uni.setNavigationBarTitle({
 				title: '原因'
-			});
+      });
+      if(this.disabled) {
+        this.value = this.values['textarea'];
+        this.filePath = this.values['filePath'] ? this.values['filePath'].split(',') : [];
+      }
 		},
 		methods: {
-			changeFilePaths(filePaths) {
-				this.filePaths = filePaths;
-			}
+      changeValue(e) {
+        this.value = e.detail.value;
+      },
+			changeFilePaths(filePath) {
+				this.filePath = filePath;
+      },
+      sure() {
+        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 'imgPath': // 上传图片
+                requestParams[item.paramsKey] = this.filePath.join(',');
+                break;
+              case 'textarea': // 回复内容
+                requestParams[item.paramsKey] = this.value;
+                break;
+              default:
+                requestParams[item.paramsKey] = '';
+                break;
+            }
+          }
+        });
+        this.$emit('comRequest', requestParams);
+      }
 		}
 	}
 </script>
@@ -64,7 +130,7 @@
 				.label-view {
 					width: 175rpx;
 					line-height: 37.5rpx;
-					
+
 
 					>text {
 						font-size: 22.5rpx;

+ 68 - 10
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,74 @@
 		data() {
 			return {
 				// 当前显示的组件
-				currentComponet: 'write-back',
+        currentComponet: '',
+        // 查看详情回显的数据
+        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'},
-				]
+					{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) {
+        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;
+        }else { // 编辑流程
+          this.btnInfo = details;
+        }
+        this.pdcaSetting = pdcaSetting;
+      },
+      // 公共改善任务接口
+      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 - 111
pages/mission-details/setting.js

@@ -1,23 +1,66 @@
 // 任务流程列表
+
 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 +68,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: 'improveUrl', 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 +113,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 +156,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 +188,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 +225,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: 'improveUrl', isOutvalueKey: false, labelKey: 'filePath'} // 回复图片地址(多个用逗号分隔)
+      ],
+      disabled: true
+    },
   },
   {
     taskType: 6,
@@ -89,11 +269,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 +306,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 +331,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 +366,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 +397,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 +445,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 +476,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 +515,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,48 +560,170 @@ 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: 'taskAction', isOutvalueKey: false }, // action
+          { paramsKey: 'taskDoRequestList', valueKey: 'taskDoRequestList', isOutvalueKey: false }, // do
+          { paramsKey: 'taskCheckRequestList', valueKey: 'taskCheckRequestList', isOutvalueKey: false }, // check
+          { paramsKey: 'approveReason', valueKey: null } // 不通过原因
+        ]
+      },
+      {
+        name: '通过',
+        componentName: null,
+        nextPermission: 1,
+        nextPermissionName: '管理员',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'adminId', isOutvalueKey: true }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'adminName', isOutvalueKey: true }, // 接收人姓名
+          { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false }, // 改善plan
+          { paramsKey: 'taskAction', valueKey: 'taskAction', isOutvalueKey: false }, // action
+          { paramsKey: 'taskDoRequestList', valueKey: 'taskDoRequestList', isOutvalueKey: false }, // do
+          { paramsKey: 'taskCheckRequestList', valueKey: 'taskCheckRequestList', isOutvalueKey: false }, // check
+          { paramsKey: 'improveScheme', valueKey: 'improveScheme', isOutvalueKey: false }, // 改善方案名称
+        ]
+      },
     ],
-    row1: { hasJoin: true, name: '改善者*', key: 'establishEmpName' },
-    row2: {hasJoin: false, name: '提交了改善计划(PLAN)'},
-    selectDetails: {name: '查看改善方案详情', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'pdca', disabled: true}
+    row1: { hasJoin: true, name: '改善者x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '提交了改善方案(PDCA)'},
+    selectDetails: {
+      name: '查看改善方案详情',
+      hasAnyData: true, // 是否有多个数据需要回显(多个数据对多个key)
+      dataKey: [
+        {key: 'taskPlan', isOutvalueKey: false, labelKey: 'plan'}, // plan
+        {key: 'taskDoRequestList', isOutvalueKey: false, labelKey: 'do'}, // do
+        {key: 'taskCheckRequestList', isOutvalueKey: false, labelKey: 'check'}, // check
+        {key: 'taskAction', isOutvalueKey: false, labelKey: 'action'}, // action
+      ],
+      componentName: 'pdca',
+      pdcaSetting: 'pdca',
+      disabled: true
+    }
   },
   {
     taskType: 17,
     checkResult: 1,
-    taskName: '改善方案plan通过, 改善回复通过',
+    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,
@@ -238,43 +731,32 @@ const taskTypeList = [
     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}`
 				});

+ 1 - 1
pages/mission/mission.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="mission-page">
 		<view class="message-remind" @click="toMessagePage">
-			<image :src="messageType?'/static/mission/消息中心未读.png':'/static/mission/消息中心已读.png'" mode=""></image>
+			<image :src="messageType?'/static/message-unread.png':'/static/message-read.png'" mode=""></image>
 		</view>
 	 	<scroll-view class="scroll-y" scroll-y="true">
 			<list-item

+ 46 - 15
pages/mission/model.js

@@ -27,12 +27,16 @@ export default {
       recordTime: "2021-02-03 09:44:17", // 最终修改时间
       situationId: 1, // 情景id
       situationName: "测试情景", // 情景名称
-      taskType: 0, // 任务当前状态
-      updateTime: "2021-02-03T01:44:17.000+0000", // 修改时间 (发送时间)
+      taskType: 10, // 任务当前状态
+      updateTime: "2021-02-03T01:44:16.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: 8, // 流转状态
           improveScheme: '', // 改善方案名称
-          approveReason: '审核意见', // 审核意见
-          // do
-          taskDoRequestList: [
+          approveReason: '审核意见', // 审核意见/原因
+          taskDoRequestList: [ // do
             {
               taskDoId:"mock",  // 过程记录id
               taskDoProcess:"mock", // 过程记录内容
               taskDoPlan:"mock" // 计划日期
             }
           ],
-          // check
-          taskCheckRequestList: [
+          taskCheckRequestList: [// check
+            {
+              taskCheckId:"mock",  // 改善确认id
+              taskCheckProcess:"mock", // 改善确认记录过程
+              taskCheckPlan:"mock",  // 改善确认计划日期
+              taskCheckEffect:"mock" //改善确认改善效果
+            }
+          ],
+          recordTime: 'recordTime' //测量时间
+        },
+        {
+          createTime: "2021-02-03T01:44:42.000+0000", // 创建时间
+          establishEmpId: 1, // 员工id
+          establishEmpName: "管理员",// 发送人员名称
+          id: 1, // 流转记录id
+          receiveEmpId: 1, // 接收人id
+          receiveEmpName: "管理员吧",// 接收人姓名
+          taskAction: "", // 改善处置 action
+          taskId: 1, // 任务id
+          taskPlan: "plan内容",// plan整改计划
+          taskType: 10, // 流转状态
+          improveScheme: '', // 改善方案名称
+          approveReason: '审核意见', // 审核意见
+          taskDoRequestList: [ // do
+            {
+              taskDoId:"mock",  // 过程记录id
+              taskDoProcess:"mock", // 过程记录内容
+              taskDoPlan:"2020-12-12 00:01:50" // 计划日期
+            }
+          ],
+          taskCheckRequestList: [// check
             {
               taskCheckId:"mock",  // 改善确认id
               taskCheckProcess:"mock", // 改善确认记录过程
@@ -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'
 	}
 };
 

+ 5 - 0
pages/model.js

@@ -4,6 +4,8 @@ import roleSwitching from './role-switching/model.js';
 import configure from './configure/model.js';
 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";
 import calendar from './calendar/model.js';
 import todayCheck from './todayCheck/model.js';
@@ -18,4 +20,7 @@ export default module = {
   creatingSituations,
   calendar,
   todayCheck,
+  situationsCenter,
+  situationDetail,
+  creatingSituations
 }

+ 6 - 6
pages/role-switching/role-switching.vue

@@ -15,7 +15,9 @@
 		</view>
 	</view>
 </template>
-
+/**
+ * 角色切换
+ */
 <script>
 	export default {
 		data() {
@@ -64,11 +66,9 @@
 						}
 					}
 				}).then((data)=>{
-					if(data!==null){
-						uni.navigateTo({
-							url: '/pages/home/home'
-						});
-					}
+					uni.navigateTo({
+						url: '/pages/home/home'
+					});
 				});
 			}
 		},

+ 14 - 0
pages/situationDetail/model.js

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

+ 18 - 0
pages/situationDetail/server.js

@@ -0,0 +1,18 @@
+import { creatRequest } from '../../utils/request.js';
+
+const requestList = {
+  //情境详情
+  situationDetail: {
+    method: 'GET',
+    url: 'situation'
+  },
+	//情境作废
+	situationDelete:{
+		method:'DELETE',
+		url: 'situation'
+	},
+};
+export const commServer = ({ key, data }) => {
+  let obj = requestList[key];
+  return creatRequest(obj, data);
+}

+ 432 - 0
pages/situationDetail/situationDetail.vue

@@ -0,0 +1,432 @@
+<template>
+	<view class="detail-page">
+		<view class="content-info">
+			<view class="top-box">
+				<view class="subscript">
+					<!-- <image class="sub-pic" src="../../static/sDetail-subscript.png"></image> -->
+					<text class="sub-text">{{topic}}</text>
+				</view>
+				<text class="name-text">{{name}}</text>
+				<text class="time-text">| 情境起止时间:{{startDate}}~{{endDate}}</text>
+				<text class="nextTime-text">| 下次查核时间:{{nextCheckTime}}</text>
+				<text class="startEndTime-text" v-show="isStartEndTimeShow">| {{startEndTime}}</text>
+				<text class="team-text">{{checkGroupName}}</text>
+			</view>
+			<view class="list-box">
+				<view class="check-list" v-show="isCheckImproveShow" @click="gotoCheckPage">
+					<image class="check-pic" src="../../static/check-list.png"></image>
+					<text class="list-title">查核列表</text>
+					<text class="list-info">{{checkStatus}}</text>
+				</view>
+				<view class="improve-list" v-show="isCheckImproveShow" @click="gotoImprovePage">
+					<image class="improve-pic" src="../../static/improve-list.png"></image>
+					<text class="list-title">改善列表</text>
+					<text class="list-info">查看改善记录</text>
+				</view>
+				<view class="plan-list" v-show="isCheckLeader" @click="gotoPlanPage">
+					<image class="check-pic" src="../../static/check-list.png"></image>
+					<text class="list-title">计划列表</text>
+					<text class="list-info">共{{planCount}}次查核计划,剩余{{toDistribute}}个待分配</text>
+				</view>
+			</view>
+			<view class="info-box">
+				<view class="text-box">
+					<text class="info-text">评价医院对医院评审标准与要点的遵从程度,即评价医院对规章、制度、流程、诊疗常规与操作规程的执行力。评价病人在接受诊疗的服务过程品质、环境设施,注重病人的安全、权益及隐私的保护、医院感染的控制。</text>
+				</view>
+			</view>
+		</view>
+		<view class="button-box">
+			<view class="btn-left" @click="delSituation" v-show="isAdmin">
+				<text class="left-text">作废</text>
+			</view>
+			<view class="btn-right" @click="editSituation" v-show="isAdmin">
+				<text class="right-text">编辑</text>
+			</view>
+			<view class="btn-center" v-show="isChecker" @click="startUnplanned">
+				<text class="center-text">开始一次计划外查核</text>
+			</view>
+			<view class="btn-left" v-show="isUnplanned">
+				<text class="left-text">新建一个计划外查核</text>
+			</view>
+			<view class="btn-right" v-show="isUnplanned">
+				<text class="right-text">提前开始一个计划内查核</text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				nowPermission:'',//用户当前权限
+				situaionID:'',//情境id
+				checkGroupName:'',//查核组名
+				checkStatus:'',//查核状态
+				name:'',//查核名
+				startDate:'',//查核开始时间
+				endDate:'',//查核结束时间
+				nextCheckTime:'',//下次查核时间
+				topic:'',//个案或系统
+				startEndTime:'',//距离情境开始或结束时间
+				planCount:'',//总查核计划数
+				toDistribute:'',//待分配计划数
+				firstCheckTime:'',//首次查核时间
+				isCheckImproveShow:false,//查核改善列表是否显示
+				isStartEndTimeShow:false,//距离情境开始或结束时间是否显示
+				isAdmin:false,//是否为管理员
+				isCheckLeader:false,//是否为查核组长
+				isChecker:false,//是否为查核者
+				isUnplanned:false,//是否计划外查核
+			}
+		},
+		created: function() {
+			this.nowPermission=uni.getStorageSync('nowPermission');
+			console.log(this.nowPermission);
+			this.isAdmin=this.nowPermission==1?true:false;
+			this.isCheckLeader=this.nowPermission==2?true:false;
+			this.isChecker=this.nowPermission==3?true:false;
+			this.isStartEndTimeShow=this.nowPermission==2||this.nowPermission==3?true:false;
+			this.isCheckImproveShow=this.nowPermission==1||this.nowPermission==4||this.nowPermission==3?true:false;
+			this.situaionID=uni.getStorageSync('situaionID');
+			this.$store.dispatch({
+				type: 'situationDetail/commActions',
+				payload: {
+					key: 'situationDetail',
+					data:{
+						id:this.situaionID
+					}
+				}
+			}).then((data) => {
+				if (data) {
+					this.name=data.name;
+					this.startDate=data.startDate;
+					this.endDate=data.endDate;
+					this.nextCheckTime=data.nextCheckTime;
+					this.checkGroupName=data.checkGroupName;
+					this.topic=data.topic==0?'个案':'系统';
+					this.checkStatus=data.checkStatus;
+					this.startEndTime=data.startEndTime;
+					this.planCount=data.planCount;
+					this.toDistribute=data.toDistribute;
+					this.firstCheckTime=data.firstCheckTime;
+				}
+			});
+		},
+		methods: {
+			delSituation(){
+				uni.showModal({
+					title:'提示',
+					content:'请确认是否作废此情境,作废的情境无法被还原',
+					success:function(res){
+						if(res.confirm){
+							this.$store.dispatch({
+								type: 'situationDetail/commActions',
+								payload: {
+									key: 'situationDelete',
+									data:{
+										id:this.situaionID
+									}
+								}
+							}).then((data) => {
+								if (data) {
+									uni.showToast({
+										title:'作废成功',
+										icon:'none',
+										duration:1000
+									});
+								}
+							});
+						}
+						else if(res.cancel){
+							return;
+						}
+					}
+				})
+				
+			},
+			editSituation(){
+				let editEnable=this.compareTime();
+				if(editEnable){
+					uni.navigateTo({
+						url: '/pages/creatingSituations/creatingSituations'
+					});
+				}
+				else{
+					uni.showModal({
+						title:'提示',
+						content:'已进行过一次查核,不可编辑',
+					  showCancel:false
+					})
+				}
+			},
+			compareTime(){
+				let myDate=new Date();
+				let firstCheckTime=this.firstCheckTime.replace(/-/g,"/");
+				firstCheckTime=Date.parse(firstCheckTime);
+				if(myDate>firstCheckTime){
+					return false;
+				}else{
+					return true;
+				}
+			},
+			gotoCheckPage(){
+				//跳转到查核列表
+				uni.navigateTo({
+					url: '/pages/creatingSituations/creatingSituations'
+				});
+			},
+			gotoImprovePage(){
+				//跳转到改善列表
+				uni.navigateTo({
+					url: '/pages/creatingSituations/creatingSituations'
+				});
+			},
+			gotoPlanPage(){
+				//跳转到计划列表
+				uni.navigateTo({
+					url: '/pages/creatingSituations/creatingSituations'
+				});
+			},
+			startUnplanned(){
+				this.isUnplanned=true;
+				this.isChecker=false;
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+	.detail-page{
+		.content-info{
+			background-color: #FFFFFF;
+			.top-box{
+				width: 750rpx;
+				height: 300rpx;
+				background: linear-gradient(270deg, #3071F2 0%, #4C95FC 100%);
+				.subscript{
+					width: 84.37rpx;
+					height: 35rpx;
+					float: right;
+					margin-top: 15rpx;
+					text-align: center;
+					background-image: url(../../static/sDetail-subscript.png);
+					.sub-text{
+						font-size: 17.5rpx;
+						font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+						font-weight: 500;
+						color: #2E6CE6;
+						line-height: 35rpx;
+					}
+				}
+				
+				.name-text{
+					font-size: 40rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #FFFFFF;
+					float: left;
+					margin-left: 50rpx;
+					margin-top: 50rpx;
+					margin-bottom: 31.25rpx;
+				}
+				.time-text{
+					font-size: 20rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #FFFFFF;
+					position: absolute;
+					top: 115rpx;
+					left: 55rpx;
+				}
+				.nextTime-text{
+					font-size: 20rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #FFFFFF;
+					position: absolute;
+					left: 55rpx;
+					top: 155rpx;
+				}
+				.startEndTime-text{
+					font-size: 20rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #FFFFFF;
+					position: absolute;
+					left: 55rpx;
+					top: 195rpx;
+				}
+				.team-text{
+					font-size: 20rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #FFFFFF;
+					position: absolute;
+					top: 115rpx;
+					right: 50rpx;
+				}
+			}
+			.list-box{
+				width: 687.5rpx;
+				height: 137.5rpx;
+				background: #FFFFFF;
+				box-shadow: 0px 10px 30px 0px rgba(0, 13, 51, 0.1);
+				border-radius: 16px;
+				position: absolute;
+				left: 31.25rpx;
+				top: 250rpx;
+				.check-list{
+					width: 225rpx;
+					height: 97.5rpx;
+					float: left;
+					margin-top: 40rpx;
+					margin-left: 81.25rpx;
+					.check-pic{
+						width: 38.75rpx;
+						height: 41.87rpx;
+						margin-top: 8.12rpx;
+					}
+					.list-title{
+						font-size: 25rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #292C33;
+						position: absolute;
+						left: 145rpx;
+						top: 40rpx;
+					}
+					.list-info{
+						font-size: 17.5rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #666F80;
+						position: absolute;
+						left: 145rpx;
+						top: 80rpx;
+					}
+				}
+				.improve-list{
+					width: 225rpx;
+					height:97.5rpx;
+					float: right;
+					margin-top: 40rpx;
+					margin-right: 81.25rpx;
+					.improve-pic{
+						width: 40rpx;
+						height: 40rpx;
+						margin-top: 8.12rpx;
+					}
+					.list-title{
+						font-size: 25rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #292C33;
+						position: absolute;
+						top: 40rpx;
+						left: 458.75rpx;
+					}
+					.list-info{
+						font-size: 17.5rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #666F80;
+						position: absolute;
+						top: 80rpx;
+						left: 458.75rpx;
+					}
+				}
+				.plan-list{
+					width: 225rpx;
+					height: 97.5rpx;
+					float: left;
+					margin-top: 40rpx;
+					margin-left: 81.25rpx;
+					.check-pic{
+						width: 38.75rpx;
+						height: 41.87rpx;
+						margin-top: 8.12rpx;
+					}
+					.list-title{
+						font-size: 25rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #292C33;
+						position: absolute;
+						left: 145rpx;
+						top: 40rpx;
+					}
+					.list-info{
+						font-size: 17.5rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #666F80;
+						position: absolute;
+						left: 145rpx;
+						top: 80rpx;
+					}
+				}
+			}
+			.info-box{
+				height: 823.12rpx;
+				.text-box{
+					width: 687.5rpx;
+					margin-top: 116.87rpx;
+					margin-left: 31.25rpx;
+					.info-text{
+						font-size: 22.5rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #292C33;
+					}
+				}
+			}
+		}
+		.button-box{
+			width: 750rpx;
+			height: 75rpx;
+			position: absolute;
+			bottom: 0rpx;
+			.btn-center{
+				background: #3377FF;
+				text-align: center;
+				.center-text{
+					font-size: 22.5rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #FFFFFF;
+					line-height: 75rpx;
+				}
+			}
+			.btn-left{
+				width: 375rpx;
+				height: 75rpx;
+				background: #FFFFFF;
+				float: left;
+				text-align: center;
+				border: 0.62rpx solid #DADEE6;
+				.left-text{
+					font-size: 22.5rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #3377FF;
+					line-height: 75rpx;
+				}
+			}
+			.btn-right{
+				width: 375rpx;
+				height: 75rpx;
+				background: #3377FF;
+				float: right;
+				text-align: center;
+				.right-text{
+					font-size: 22.5rpx;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					font-weight: 400;
+					color: #FFFFFF;
+					line-height: 75rpx;
+				}
+			}
+		}
+	}
+</style>

+ 14 - 0
pages/situationsCenter/model.js

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

+ 13 - 0
pages/situationsCenter/server.js

@@ -0,0 +1,13 @@
+import { creatRequest } from '../../utils/request.js';
+
+const requestList = {
+  //获取情境列表
+  situationList: {
+    method: 'GET',
+    url: 'situation/list'
+  },
+};
+export const commServer = ({ key, data }) => {
+  let obj = requestList[key];
+  return creatRequest(obj, data);
+}

+ 340 - 0
pages/situationsCenter/situationsCenter.vue

@@ -0,0 +1,340 @@
+<template>
+	<view class="situationsCenter-page">
+		<view class="situation-list">
+			<view class="search-box">
+				<view class="search-model" @click="openSearchBar" v-show="isSearchBoxShow">
+					<image class="search-pic" src="/static/search.png"></image>
+				</view>
+				<view class="search-bar" v-show="isSearchBarShow">
+					<view class="search-item">
+						<image class="search-pic" src="/static/search.png"></image>
+						<image class="text-clear" @click="valueEmpty" src="/static/text-clear.png"></image>
+						<input class="searh-input" v-model="inputValue" @confirm="searchByKeywords($event)" placeholder="搜索项目" placeholder-style="font-weight: 400,color: #A1A7B3" />		
+					</view>
+					<text class="cancel-text" @click="closeSearchBar">取消</text>
+				</view>
+			</view>
+		  <scroll-view class="scroll-box" scroll-y="true" @scrolltolower="toLower" lower-threshold="184">
+				<view class="content">
+					<view class="situation" v-for="(item,index) in situationList" :key="item.id" @click="gotoDetail(item.situationID)">
+						<image class="situation-topic" :src="`/static/${item.topic ? 'situation-case' : 'situation-system'}.png`"></image>
+						<view class="title">
+							<text class="title-name">{{item.name}}</text>
+						</view>
+						<view class="check-group">
+							<text class="group-text">{{item.checkGroupName}}</text>
+						</view>
+						<view class="row">
+							<image class="situation-check" src="/static/situation-check.png"></image>
+							<text class="text">{{item.checkStatus}}</text>
+						</view>
+						<view class="row">
+							<image class="situation-time" src="/static/situation-time.png"></image>
+							<text class="text">{{item.nextCheckTime}}</text>
+						</view>
+					</view>
+				</view>
+		  </scroll-view>
+		</view>
+		<view class="situaions-add" @click="gotoCreate">
+			<image class="add-pic" src="/static/situation-add.png"></image>
+		</view>
+		<tm-tabbar :permission="nowPermission" />
+	</view>
+</template>
+/**
+ * 情境中心
+ */
+<script>
+	export default {
+		data() {
+			return {
+				page:1,//页数
+				inputValue:'',
+				nowPermission:'',
+				isSearchBarShow:false,//搜索栏是否可见
+				isSearchBoxShow:true,//搜索图标是否可见
+				situationList:[],//情境卡片列表
+				totalCount:'',//返回数据的总条数
+			}
+		},
+		created: function() {
+			this.nowPermission=uni.getStorageSync('nowPermission');
+			this.$store.dispatch({
+				type: 'situationsCenter/commActions',
+				payload: {
+					key: 'situationList',
+					data:{
+						pageNum:1,
+						pageSize:10
+					}
+				}
+			}).then((data) => {
+				if (data) {
+					this.totalCount=data.totalCount;
+					this.situationList=data.list.map((item,index)=>{
+						return{
+							name:item.name,
+							checkStatus:item.checkStatus,
+							nextCheckTime:item.nextCheckTime,
+							checkGroupName:item.checkGroupName,
+							topic:item.topic==0?true:false,
+							situationID:item.id,
+						}
+					});
+				}
+			});
+		},
+		methods: {
+			openSearchBar(){
+				this.isSearchBarShow=true;
+				this.isSearchBoxShow=false;
+			},
+			closeSearchBar(){
+				this.isSearchBarShow=false;
+				this.isSearchBoxShow=true;
+			},
+			valueEmpty(){
+			 this.inputValue='';
+			},
+			gotoCreate(){
+				uni.navigateTo({
+					url: '/pages/creatingSituations/creatingSituations'
+				});
+			},
+			gotoDetail(id){
+				uni.setStorageSync('situaionID', id);
+				uni.navigateTo({
+					url: '/pages/situationDetail/situationDetail'
+				});
+			},
+			searchByKeywords(event){
+				console.log(event);
+				this.$store.dispatch({
+					type: 'situationsCenter/commActions',
+					payload: {
+						key: 'situationList',
+						data:{
+							pageNum:1,
+							pageSize:10,
+							keyword:event.target.value,
+						}
+					}
+				}).then((data)=>{
+					if (data) {
+						this.situationList=data.list.map((item,index)=>{
+							return{
+								name:item.name,
+								checkStatus:item.checkStatus,
+								nextCheckTime:item.nextCheckTime,
+								checkGroupName:item.checkGroupName,
+								topic:item.topic==0?true:false,
+							}
+						});
+					}
+				});
+			},
+			toLower(){
+				uni.showToast({
+					title:'加载中....',
+					icon:'loading',
+					duration:2000
+				});
+				let count=this.situationList.length;
+				if(this.totalCount!=count){
+					this.page++;
+					this.$store.dispatch({
+						type: 'situationsCenter/commActions',
+						payload: {
+							key: 'situationList',
+							data:{
+								pageNum:this.page,
+								pageSize:10
+							}
+						}
+					}).then((data) => {
+						if (data) {
+							this.situationList=data.list.map((item,index)=>{
+								return{
+									name:item.name,
+									checkStatus:item.checkStatus,
+									nextCheckTime:item.nextCheckTime,
+									checkGroupName:item.checkGroupName,
+									topic:item.topic==0?true:false,
+									situationID:item.id,
+								}
+							});
+						}
+					});
+				}
+				else{
+					uni.showToast({
+						title:'没有更多数据了',
+						icon:'none',
+						duration:1000
+					});
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+	.situationsCenter-page{
+		height: 100%;
+		.situation-list{
+			// display: flex;
+			// flex-flow: row wrap;
+			// margin-top: 12.5rpx;
+			position: relative;
+			.search-box{
+				position: absolute;
+				left: 25rpx;
+				top: 0rpx;
+				z-index: 2;
+				.search-model{
+					height: 62.5rpx;
+					width: 62.5rpx;
+					background-color: #FFFFFF;
+					text-align: center;
+					border-radius: 50%;
+					box-shadow: 0px 10px 10px 0px rgba(217, 221, 228, 0.5);
+					border: 1px solid #E6EAF2;
+					opacity: 0.85;
+					.search-pic{
+						width: 27.5rpx;
+						height: 27.5rpx;
+						margin-top: 17.5rpx;
+					}
+				}
+				.search-bar{
+						background-color: #FFFFFF;
+						width: 700rpx;
+						height: 62.5rpx;
+						top: 31.25rpx;
+						position: absolute;
+						z-index: 2;
+					.search-item{
+						background-color: #FFFFFF;
+						width: 593.75rpx;
+						height: 62.5rpx;	
+						float: left;
+						border-radius: 6.25rpx;
+						border: 1.25rpx solid #F0F2F7;
+						.search-pic{
+							width: 21.87rpx;
+							height: 21.87rpx;
+							margin-left:12.5rpx ;
+							margin-top: 20.62rpx;
+							float: left;
+						}
+						.searh-input{
+							background-color: #FFFFFF;
+							width: 525rpx;
+							height: 55rpx;	
+							font-size: 22.5rpx;
+							float: right;
+							margin-top: 3.75rpx;
+							margin-left: 3.12rpx;
+						}
+						.text-clear{
+							width: 21.87rpx;
+							height: 21.87rpx;
+							float: right;
+							margin-top: 20.62rpx;
+							margin-right: 6.25rpx;
+						}
+						
+					}
+					.cancel-text{
+						font-size: 22.5rpx;
+						line-height: 62.5rpx;
+						color: #A1A7B3;
+						margin-right: 31.25rpx;
+						float: right;
+					}
+				}
+				
+			}
+			
+			.scroll-box{
+				height: 1072.5rpx;
+				width: 750rpx;
+				// margin-top: 25rpx;
+				.content{
+					display: flex;
+					flex-flow: row wrap;
+					.situation{
+						height: 187.5rpx;
+						width: 337.5rpx;
+						background: #FFFFFF;
+						box-shadow: 0px 6px 20px 0px rgba(0, 13, 51, 0.1);
+						border-radius: 8px;
+						margin-left: 25rpx;
+						margin-top: 25rpx;
+						
+						.situation-topic{
+							width: 62.5rpx;
+							height: 25rpx;
+							float: right;
+						}
+						.title{
+							margin-left: 20rpx;
+							// margin-top: 31.25rpx;
+							padding-top: 25rpx;
+							.title-name{
+								font-size: 22.5rpx;
+								font-family: SourceHanSansCN-Bold, SourceHanSansCN;
+								font-weight: bold;
+								color: #292C33;
+							}
+						}
+						.check-group{
+							margin-left: 20rpx;
+							margin-top: 15rpx;
+							margin-bottom: 7.5rpx;
+							.group.text{
+								font-size: 17.5rpx;
+								font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+								font-weight: 400;
+								color: #666E80;
+							}
+						}
+						.row{
+							margin-left: 20rpx;
+							margin-top: 17.5rpx;
+							.situation-check{
+								width: 20rpx;
+								height: 20rpx;
+							}
+							.situation-time{
+								width: 20rpx;
+								height: 20rpx;
+							}
+							.text{
+								font-size: 20rpx;
+								font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+								font-weight: 400;
+								color: #292C33;
+								margin-left: 11.25rpx;
+							}
+							
+						}
+					}
+				}
+				
+			}
+			
+			
+		}
+		.situaions-add{
+			position: absolute;
+			right: 25rpx;
+			bottom: 130rpx;
+			.add-pic{
+				width: 75rpx;
+				height: 75rpx;
+			}
+		}
+	}
+</style>

BIN
static/blue-arrow.png


BIN
static/check-list.png


BIN
static/improve-list.png


+ 0 - 0
static/mission/消息中心已读.png → static/message-read.png


+ 0 - 0
static/mission/消息中心未读.png → static/message-unread.png


BIN
static/mission/多选-已选状态.png


BIN
static/mission/导航栏返回.png


BIN
static/mission/蓝色更多.png


BIN
static/sDetail-subscript.png


BIN
static/search.png


BIN
static/situation-add.png


BIN
static/situation-case.png


BIN
static/situation-check.png


BIN
static/situation-system.png


BIN
static/situation-time.png


BIN
static/text-clear.png


+ 2 - 1
utils/requestUrl.js

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

+ 53 - 0
utils/uploadImg.js

@@ -0,0 +1,53 @@
+import { URL } from "./requestUrl.js";
+
+// 上传图片方法(单张/多张上传)
+const uploadImage = (params) => {
+	return new Promise((presolve, preject) => {
+		uni.showLoading()
+		let uploads = [];
+		(params.tempFilePaths).forEach((item, i) => {
+			uploads[i] = new Promise((resolve) => {
+				uni.uploadFile({
+          url: `${URL}/imed/pfm/file/uploadImg`,
+          fileType: 'image',
+					filePath: item,
+					name: 'file',
+					formData: {
+						'Filedata': item
+					},
+					header:{
+						token: uni.getStorageSync('token')
+          },
+					success(res) {
+						// console.log('1122',JSON.parse(res.data));
+						let data = JSON.parse(res.data);
+						if(data.code == 'SUCCESS'){
+							resolve(data.data)
+						}else{
+							resolve('')
+						}
+					},
+					fail(err) {
+						console.log('上传图片失败:', err)
+						uni.hideLoading()
+					}
+				})
+			})
+		})
+
+    Promise.all(uploads).then(res => {
+			//图片上传完成
+			presolve(res)
+			uni.hideLoading()
+		}).catch(err => {
+			preject(err)
+			uni.hideLoading()
+			uni.showToast({
+				title: '上传失败请重试',
+        icon: 'none',
+        duration: 1000
+			})
+		})
+	})
+}
+export default uploadImage;