Browse Source

任务调试

yuwenfen 4 years ago
parent
commit
9cb8e5e7ed

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

@@ -42,11 +42,17 @@
       isMultiple: {
 				type: Boolean,
 				default: false
-			}
+      },
+        // 是否禁用
+      disabled: {
+        type: Boolean,
+        default: false
+      },
 		},
 		methods: {
 			// 上传图片
 			uploadPicture() {
+        if(this.disabled) return;
 				uni.chooseImage({
 					count: this.isMultiple ? 0 : 1, // 是否多选
 					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
@@ -93,6 +99,7 @@
 			},
 			// 删除图片
 			delImg(i) {
+        if(this.disabled) return;
 				this.$emit('changeFilePaths',  this.filePaths.filter((item, index) => index != i))
 			}
 		}

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

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

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

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

+ 7 - 1
pages/mission-action/components/pdca-components/one-textarea.vue

@@ -15,6 +15,7 @@
 					:maxlength="-1"
 					auto-height
           :value="label === '改善计划' ? planvalue : actionvalue"
+          :disabled="disabled"
           @input="changeVal"
 				/>
 			</view>
@@ -46,7 +47,12 @@
       defaultactionValue: {
         type: String,
         default: ''
-      }
+      },
+      // 是否禁用
+      disabled: {
+        type: Boolean,
+        default: false
+      },
     },
     data() {
       return {

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

@@ -10,10 +10,12 @@
 			<scroll-view class="scroll-y" scroll-y="true">
         <one-textarea
           v-if="current === 0"
-          :defaultPlanValue="'99999'"
+          :defaultPlanValue="plan"
+          :disabled="disabled"
          />
 				 <do-and-check
 					 v-if="current === 1"
+           :disabled="disabled"
 					/>
 				<view v-if="current === 2">
 						选项卡3的内容
@@ -23,14 +25,15 @@
           title="对策处置(Action)"
           label="对策处置"
           :defaultactionValue="'123'"
+          :disabled="disabled"
          />
 			</scroll-view>
-			<view class="fixed-buttom-btn">
+			<view class="fixed-buttom-btn" v-if="!disabled">
 				<view class="btn-text cancle">
-					<text>取消</text>
+					<text>暂存</text>
 				</view>
 				<view class="btn-text">
-					<text>确定</text>
+					<text>完成</text>
 				</view>
 			</view>
 		</view>
@@ -44,16 +47,50 @@
 	import doAndCheck from './pdca-components/do-and-check.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 {}
+        }
+      }
+    },
 		data() {
 			return {
 				items: ['改善计划(P)', '执行过程(D)', '改善确认(C)', '对策处置(A)'],
-        current: 1,
+        current: 0,
+        // plan 改善计划
+        plan: ''
 			}
 		},
 		created() {
 			uni.setNavigationBarTitle({
 				title: '改善计划'
-			});
+      });
+      if(this.disabled) {
+        this.plan = this.values['plan'];
+        console.log(9, this.values)
+      }
 		},
 		methods: {
 			onClickItem(e) {
@@ -75,7 +112,7 @@
 		height: 100%;
 
 		.content {
-			height: calc(100% - 141.5rpx);
+      height: calc(100% - 141.5rpx);
 
 			.scroll-y {
 				height: 100%;

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

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

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

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

+ 63 - 11
pages/mission-action/mission-action.vue

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

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

@@ -38,17 +38,21 @@
                 </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" v-if="missionDetails.buttonDisplayFlag == 1">
-            <template v-for="(item, i) in taskBtn">
-              <tm-button
-                :key="i"
-                :type="taskBtn.length === 1 ? 'default' : ( i === 0 ? 'default' : 'pramary')"
-                :btnText="item.name"
-                @btnClick="clickBtn(item)"
-              />
-            </template>
-					</view>
 				</view>
 			</view>
 		</scroll-view>
@@ -112,15 +116,29 @@
 				});
 			},
 			// 点击右侧按钮
-			clickBtn(btnInfo) {
-				uni.navigateTo({
-					url: `/pages/mission-action/mission-action?details=${encodeURIComponent(JSON.stringify(btnInfo))}`
-				})
+			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}))}`
+          url: `/pages/mission-action/mission-action?details=${encodeURIComponent(JSON.stringify({...currentInfo, ...detailInfo}))}`
 				});
       },
       /***
@@ -132,7 +150,8 @@
       getContext(obj, isLink, rowKey){
         let currentTypeTask = null;
         if(obj.taskType == 1) {
-          currentTypeTask = taskTypeList.find(item => (item.taskType == obj.taskType && item.checkResult == this.missionDetails.checkResult)) || {};
+          const { checkResult } = this.missionDetails;
+          currentTypeTask = taskTypeList.find(item => (item.taskType == obj.taskType && item.checkResult == checkResult)) || {};
         }else {
           currentTypeTask = taskTypeList.find(item => item.taskType == obj.taskType) || {};
         }
@@ -146,6 +165,20 @@
             return name || '';
           }
         }
+      },
+      // 公共改善任务接口
+      comTaskCirculation(data) {
+        this.$store.dispatch({
+					type: 'mission/commActions',
+					payload: {
+						key: "comTaskCirculation",
+						data
+					}
+				}).then(data1 => {
+          if(!data1){
+           this.getMissionDetails();
+          }
+				});
       }
 		},
 		components: {
@@ -265,9 +298,13 @@
 
 					.btn-group {
 						display: flex;
-						justify-content: space-between;
+            justify-content: space-between;
 						padding: 0 25rpx;
-					}
+          }
+
+          .btn-one {
+            justify-content: center;
+          }
 				}
 			}
 		}

+ 42 - 31
pages/mission-details/setting.js

@@ -47,14 +47,14 @@ const taskTypeList = [
       hasJoin: true, // 是否需要拼接
       name: '查核人x', // 显示的内容, x未来被替换的值
       key: 'establishEmpName', // 使用详情接口key,用来替换x
-      isOutDataKey: false // 是否详情接口一级key, 不是则在当前任务状态中找key(如pfmTaskCirculationList下面)
+      isOutvalueKey: false // 是否详情接口一级key, 不是则在当前任务状态中找key(如pfmTaskCirculationList下面)
     },
     // 第二行显示的内容
     row2: {
       hasJoin: true,
       name: '发送改善通知,查核结果:x',
       key: 'checkDetailResult',
-      isOutDataKey: true
+      isOutvalueKey: true
     },
     // 查看xx详情 (name: 详情名字, componentName: 点击后跳转的页面, disabled: 底部按钮禁用)
     selectDetails: {
@@ -62,9 +62,10 @@ const taskTypeList = [
       hasAnyData: false, // 是否有多个数据需要回显 为true则使用dateKey, 否则使用key <key和datakey互斥)
       key: 'checkDetailResult', //使用详情接口key
       dataKey: [],
-      isOutDataKey: true,  // 是否详情接口一级key, 不是则在当前任务状态中找key(如pfmTaskCirculationList下面)
+      isOutvalueKey: true,  // 是否详情接口一级key, 不是则在当前任务状态中找key(如pfmTaskCirculationList下面)
       componentName: 'disagree', //点击后跳转的组件名
-      disabled: true // 调整后是否编辑和禁用
+      disabled: true, // 调整后是否编辑和禁用
+      labelKey: 'textarea' // 回显时使用的key
     }
   },
   {
@@ -102,13 +103,14 @@ const taskTypeList = [
       }
     ],
     row1: { hasJoin: true, name: '查核人x', key: 'establishEmpName' },
-    row2: {hasJoin: true, name: '发送改善通知,查核结果:x', key: 'checkDetailResult', isOutDataKey: true },
+    row2: {hasJoin: true, name: '发送改善通知,查核结果:x', key: 'checkDetailResult', isOutvalueKey: true },
     selectDetails: {
       name: '查看查核结果详情',
       key: 'checkDetailResult',
-      isOutDataKey: true,
+      isOutvalueKey: true,
       componentName: 'disagree',
-      disabled: true
+      disabled: true,
+      labelKey: 'textarea'
     }
   },
   {
@@ -150,7 +152,8 @@ const taskTypeList = [
       name: '查看不认可原因详情',
       key: 'approveReason',
       componentName: 'disagree',
-      disabled: true
+      disabled: true,
+      labelKey: 'textarea'
     }
   },
   {
@@ -181,7 +184,8 @@ const taskTypeList = [
       name: '查看原因详情',
       key: 'approveReason',
       componentName: 'disagree',
-      disabled: true
+      disabled: true,
+      labelKey: 'textarea'
     }
   },
   {
@@ -259,8 +263,8 @@ const taskTypeList = [
       componentName: 'write-back',
       hasAnyData: true, // 是否有多个数据需要回显(多个数据对多个key)
       dataKey: [
-        {key: 'approveReason', isOutvalueKey: false}, // 回复内容
-        {key: 'imgPath', isOutvalueKey: false} // 回复图片地址
+        {key: 'approveReason', isOutvalueKey: false, labelKey: 'textarea'}, // 回复内容
+        {key: 'imgPath', isOutvalueKey: false, labelKey: 'filePath'} // 回复图片地址
       ],
       disabled: true
     },
@@ -358,7 +362,8 @@ const taskTypeList = [
       componentName: 'pdca',
       pdcaSetting: 'p',
       key: 'taskPlan',
-      disabled: true
+      disabled: true,
+      labelKey: 'plan'
     }
   },
   {
@@ -388,7 +393,8 @@ const taskTypeList = [
       name: '查看原因详情',
       key: 'approveReason',
       componentName: 'disagree',
-      disabled: true
+      disabled: true,
+      labelKey: 'textarea'
     }
   },
   {
@@ -428,13 +434,13 @@ const taskTypeList = [
     selectDetails: {
       name: '查看改善方案详情',
       componentName: 'pdca',
-      pdcaSetting: 'pacd',
+      pdcaSetting: 'pdca',
       hasAnyData: true, // 是否有多个数据需要回显(多个数据对多个key)
       dataKey: [
-        {key: 'taskPlan', isOutvalueKey: false}, // plan
-        {key: 'taskDoRequestList', isOutvalueKey: false}, // do
-        {key: 'taskCheckRequestList', isOutvalueKey: false}, // check
-        {key: 'taskAction', isOutvalueKey: false}, // action
+        {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
     }
@@ -466,7 +472,8 @@ const taskTypeList = [
       name: '查看原因详情',
       key: 'approveReason',
       componentName: 'disagree',
-      disabled: true
+      disabled: true,
+      labelKey: 'textarea'
     }
   },
   {
@@ -549,7 +556,8 @@ const taskTypeList = [
       componentName: 'pdca',
       pdcaSetting: 'p',
       key: 'taskPlan',
-      disabled: true
+      disabled: true,
+      labelKey: 'plan'
     }
   },
   {
@@ -594,7 +602,8 @@ const taskTypeList = [
       componentName: 'pdca',
       pdcaSetting: 'p',
       nextPermission: 5,
-      disabled: true
+      disabled: true,
+      labelKey: 'plan'
     }
   },
   {
@@ -639,7 +648,8 @@ const taskTypeList = [
       componentName: 'pdca',
       pdcaSetting: 'p',
       nextPermission: 5,
-      disabled: true
+      disabled: true,
+      labelKey: 'plan'
     }
   },
   {
@@ -683,10 +693,10 @@ const taskTypeList = [
       name: '查看改善方案详情',
       hasAnyData: true, // 是否有多个数据需要回显(多个数据对多个key)
       dataKey: [
-        {key: 'taskPlan', isOutvalueKey: false}, // plan
-        {key: 'taskDoRequestList', isOutvalueKey: false}, // do
-        {key: 'taskCheckRequestList', isOutvalueKey: false}, // check
-        {key: 'taskAction', isOutvalueKey: false}, // action
+        {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',
@@ -705,10 +715,10 @@ const taskTypeList = [
       name: '查看改善方案详情',
       hasAnyData: true, // 是否有多个数据需要回显(多个数据对多个key)
       dataKey: [
-        {key: 'taskPlan', isOutvalueKey: false}, // plan
-        {key: 'taskDoRequestList', isOutvalueKey: false}, // do
-        {key: 'taskCheckRequestList', isOutvalueKey: false}, // check
-        {key: 'taskAction', isOutvalueKey: false}, // action
+        {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',
@@ -744,7 +754,8 @@ const taskTypeList = [
       name: '查看原因详情',
       key: 'approveReason',
       componentName: 'disagree',
-      disabled: true
+      disabled: true,
+      labelKey: 'textarea'
     }
   },
 ];

+ 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}`
 				});

+ 8 - 8
pages/mission/model.js

@@ -27,16 +27,16 @@ export default {
       recordTime: "2021-02-03 09:44:17", // 最终修改时间
       situationId: 1, // 情景id
       situationName: "测试情景", // 情景名称
-      taskType: 1, // 任务当前状态
+      taskType: 2, // 任务当前状态
       updateTime: "2021-02-03T01:44:17.000+0000", // 修改时间 (发送时间)
       improveEmpName: '', //改善人
       improveEmpId: '', //改善人id
       buttonDisplayFlag: 1,  // 底部按钮显示隐藏 0 不展示 1展示
       checkResult: 2, // 《只针对第一步操作区分按钮是显示 指派改善任务还是改善回复》 1不用管 2 改善回复 3 制定改善方案
-      checkDetailResult: '', // 查核结果
+      checkDetailResult: '查核结果xxx', // 查核结果
       checkDetailId: '', // 查核明细id
-      adminId: '',  // 管理员id
-      adminName: '', // 管理员名称
+      adminId: 1,  // 管理员id
+      adminName: '管理员丫', // 管理员名称
       pfmTaskCirculationList: [
         {
           createTime: "2021-02-03T01:44:42.000+0000", // 创建时间
@@ -47,8 +47,8 @@ export default {
           receiveEmpName: "管理员吧",// 接收人姓名
           taskAction: "", // 改善处置 action
           taskId: 1, // 任务id
-          taskPlan: "",// plan整改计划
-          taskType: 1, // 流转状态
+          taskPlan: "噢噢噢噢",// plan整改计划
+          taskType: 13, // 流转状态
           improveScheme: '', // 改善方案名称
           approveReason: '审核意见', // 审核意见/原因
           taskDoRequestList: [ // do
@@ -77,8 +77,8 @@ export default {
           receiveEmpName: "管理员吧",// 接收人姓名
           taskAction: "", // 改善处置 action
           taskId: 1, // 任务id
-          taskPlan: "",// plan整改计划
-          taskType: 9, // 流转状态
+          taskPlan: "plan内容",// plan整改计划
+          taskType: 13, // 流转状态
           improveScheme: '', // 改善方案名称
           approveReason: '审核意见', // 审核意见
           taskDoRequestList: [ // do

+ 5 - 0
pages/mission/server.js

@@ -17,6 +17,11 @@ const requestList = {
 	getEmpDeptTree: {
 		method: 'GET',
 		url: 'common/empDeptTree'
+	},
+	// 公共改善任务接口
+	comTaskCirculation: {
+		method: 'POST',
+		url: 'improverTask/taskCirculation'
 	}
 };