yuwenfen преди 4 години
родител
ревизия
35fdeef59d
променени са 6 файла, в които са добавени 202 реда и са изтрити 87 реда
  1. 13 7
      pages/mission-action/mission-action.vue
  2. 93 18
      pages/mission-details/mission-details.vue
  3. 52 49
      pages/mission-details/setting.js
  4. 43 12
      pages/mission/model.js
  5. 0 0
      static/blue-arrow.png
  6. 1 1
      utils/request.js

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

@@ -13,7 +13,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,7 +24,7 @@
 		data() {
 			return {
 				// 当前显示的组件
-				currentComponet: 'write-back',
+				currentComponet: 'assign-mission',
 				compoentList: [
 					{type: 1, name: '指派改善任务', component: 'assign-mission'},
 					{type: 2, name: '原因', component: 'disagree'},
@@ -33,11 +33,17 @@
 					{type: 5, name: 'PDCA', component: 'pdca'},
 				]
 			}
-		},
-		created() {
-			// console.log(this.compoentList[0].component)
-			// this.currentComponet = this.compoentList[0].component
-		},
+    },
+    // onLoad({ details }){
+    //   console.log(8,details)
+    //   const {
+    //     nextPermission,
+    //     nextPermissionName,
+    //     componentName,
+    //     disabled
+    //   } = details ? JSON.parse(details) : {};
+    //   this.currentComponet = componentName;
+    // },
 		methods: {
 
 		},

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

@@ -7,33 +7,46 @@
 					<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>
+                <view class="link-view"
+                  v-if="getContext(item, true, 'selectDetails')"
+                  @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>
 						  </view>
 						</view>
 					</template>
-					<view class="btn-group">
-						<tm-button type="pramary" btnText="不认可" @btnClick="clickRightBtn" />
-						<tm-button btnText="指派改善任务" @btnClick="clickRightBtn" />
+					<view class="btn-group" v-if="missionDetails.buttonDisplayFlag == 1">
+            <template v-for="(item, i) in currentTask.btnList || []">
+              <tm-button
+                :key="i"
+                :type="(currentTask.btnList || []).length === 1 ? 'default' : ( i === 0 ? 'default' : 'pramary')"
+                :btnText="item.name"
+                @btnClick="clickBtn(item)"
+              />
+            </template>
 					</view>
 				</view>
 			</view>
@@ -45,20 +58,35 @@
 	// 改善任务
   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;
+      },
+      // 当前改善进度
+      currentTask() {
+        const { taskType, checkResult } = this.missionDetails;
+        let currentTypeTask = null;
+        if(taskType == 1){
+          currentTypeTask = taskTypeList.find(item => (item.taskType == taskType && item.checkResult == checkResult));
+        }else {
+          currentTypeTask = taskTypeList.find(item => item.taskType == taskType);
+        }
+        return currentTypeTask || {};
+      }
     },
 		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 +107,36 @@
 				});
 			},
 			// 点击右侧按钮
-			clickRightBtn() {
+			clickBtn() {
 				uni.navigateTo({
 					url: '/pages/mission-action/mission-action'
 				})
-			}
+      },
+      // 查看详情
+      goToDetails(detailsInfo) {
+        	uni.navigateTo({
+				  url: `/pages/mission-action/mission-action?details=${encodeURIComponent(JSON.stringify(detailsInfo))}`
+				});
+      },
+      /***
+       *  解析显示对应的内容
+       *  @param {Object} obj 当前遍历的任务
+			 *  @param {Boolean} isLink 是否需要跳转页面(查看详情)
+			 *  @param {String} rowKey 任务流程中的key
+       */
+      getContext(obj, isLink, rowKey){
+        let 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 || '';
+          }
+        }
+      }
 		},
 		components: {
 			listItem
@@ -174,7 +227,29 @@
 									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;
+									}
+                }
+              }
 						}
 					}
 

+ 52 - 49
pages/mission-details/setting.js

@@ -9,15 +9,15 @@ const taskTypeList = [
     checkResult: 3,
     //  底部按钮 (name: 按钮名字, componentName: 点击后跳转的页面, nextPermission:下一步指派给谁)
     btnList: [
-      {name: '不认可', componentName: 'disagree', nextPermission: 1, nextPermissionName: '管理员'},
-      {name: '指派改善任务', componentName: 'assign-mission', nextPermission: 5, nextPermissionName: '改善者' }
+      {name: '不认可', componentName: 'disagree', isOutDataKey: true, keys: [{key: 'adminId', name: '管理员id'}, {key: 'adminName', name: '管理员名称'}], nextPermission: 1, nextPermissionName: '管理员' },
+      {name: '指派改善任务', componentName: 'assign-mission', keys: null, nextPermission: 5, nextPermissionName: '改善者' }
     ],
     // 第一行
-    row1: { hasJoin: true, name: '查核人*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '查核人x', key: 'establishEmpName' },
     // 第二行
-    row2: {hasJoin: true, name: '发送改善通知,查核结果:*', key: 'xx' },
+    row2: {hasJoin: true, name: '发送改善通知,查核结果:x', key: 'checkDetailResult', isOutDataKey: true },
     // 查看xx详情 (name: 详情名字, componentName: 点击后跳转的页面, disabled: 底部按钮禁用)
-    selectDetails: { name: '查看查核结果详情', componentName: 'disagree', disabled: true }
+    selectDetails: { name: '查看查核结果详情', key: 'checkDetailResult', isOutDataKey: true, componentName: 'disagree', disabled: true }
   },
   {
     taskType: 1,
@@ -25,12 +25,12 @@ const taskTypeList = [
     taskName: '创建任务',
     checkResult: 2,
     btnList: [
-      {name: '不认可', componentName: 'disagree', nextPermission: 1, nextPermissionName: '管理员'},
-      {name: '改善回复', componentName: 'write-back', nextPermission: 1, nextPermissionName: '管理员' }
+      {name: '不认可', componentName: 'disagree', isOutDataKey: true, keys: [{key: 'adminId', name: '管理员id'}, {key: 'adminName', name: '管理员名称'}], nextPermission: 1, nextPermissionName: '管理员' },
+      {name: '改善回复', componentName: 'write-back', keys: [{key: 'establishEmpId', name: '发送人员工id'}, {key: 'establishEmpName', name: '发送人员名称'}], nextPermission: 1, nextPermissionName: '管理员' }
     ],
-     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', isOutDataKey: true },
+    selectDetails: { name: '查看查核结果详情', key: 'checkDetailResult', isOutDataKey: true, componentName: 'disagree', disabled: true }
   },
   {
     taskType: 2,
@@ -38,12 +38,12 @@ const taskTypeList = [
     taskName: '不认可',
     checkResult: 1,
     btnList: [
-      {name: '重新发送', componentName: 'disagree', nextPermission: 4, nextPermissionName: '单位负责人'},
-      {name: '发送给其他人', componentName: 'personnel', nextPermission: 4, nextPermissionName: '单位负责人' }
+      {name: '重新发送', componentName: 'disagree', keys: [{key: 'establishEmpId', name: '发送人员工id'}, {key: 'establishEmpName', name: '发送人员名称'}], nextPermission: 4, nextPermissionName: '单位负责人'},
+      {name: '发送给其他人', componentName: 'personnel', keys: null, nextPermission: 4, nextPermissionName: '单位负责人' }
     ],
-    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}
   },
   {
     taskType: 3,
@@ -51,11 +51,11 @@ const taskTypeList = [
     taskName: '重新发送',
     checkResult: 1,
     btnList: [
-      {name: '指派改善任务', componentName: 'assign-mission', nextPermission: 4, nextPermissionName: '单位负责人' }
+      {name: '指派改善任务', componentName: 'assign-mission', keys: null, nextPermission: 4, nextPermissionName: '单位负责人' }
     ],
-    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}
   },
   {
     taskType: 4,
@@ -66,8 +66,8 @@ const taskTypeList = [
       {name: '申请更换改善人', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' },
       {name: '制定改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p' }
     ],
-    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
   },
   {
@@ -79,9 +79,9 @@ const taskTypeList = [
       {name: '不通过', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' },
       {name: '通过', componentName: null, nextPermission: null, nextPermission: 4, nextPermissionName: '单位负责人' }
     ],
-    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: '查看改善回复详情', key: 'approveReason', componentName: 'write-back', disabled: true},
   },
   {
     taskType: 6,
@@ -92,8 +92,8 @@ const taskTypeList = [
       {name: '申请更换改善人', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' },
       {name: '制定改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p' }
     ],
-    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
   },
   {
@@ -104,7 +104,7 @@ const taskTypeList = [
     btnList: [
       {name: '制定改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p' }
     ],
-    row1: { hasJoin: true, name: '单位负责人*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '单位负责人x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '驳回更换改善人的申请'},
     selectDetails: null
   },
@@ -116,9 +116,9 @@ const taskTypeList = [
     btnList: [
       {name: '记录改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'pdca' }
     ],
-    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: '查看改善计划详情', key: '', componentName: 'pdca',  pdcaSetting: 'p', disabled: true}
   },
   {
     taskType: 9,
@@ -128,9 +128,9 @@ const taskTypeList = [
     btnList: [
       {name: '制定改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p' }
     ],
-    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}
   },
   {
     taskType: 10,
@@ -141,9 +141,9 @@ const taskTypeList = [
       {name: '不通过', componentName: 'disagree', nextPermission: 4, nextPermissionName: '单位负责人' },
       {name: '通过', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' }
     ],
-    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: '查看改善方案详情', key: '', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'pacd', disabled: true}
   },
   {
     taskType: 11,
@@ -153,9 +153,9 @@ const taskTypeList = [
     btnList: [
       {name: '制定改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p' },
     ],
-    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', nextPermission: 4, nextPermissionName: '单位负责人', disabled: true}
   },
   {
     taskType: 12,
@@ -166,7 +166,7 @@ const taskTypeList = [
       {name: '更改改善人', componentName: 'assign-mission', nextPermission: 5, nextPermissionName: '改善者' },
       {name: '驳回请求', componentName: null, nextPermission: 5, nextPermissionName: '改善者' },
     ],
-    row1: { hasJoin: true, name: '改善人*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '改善人x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '申请更换改善人'},
     selectDetails: null
   },
@@ -179,9 +179,9 @@ const taskTypeList = [
       {name: '不通过', componentName: 'disagree', nextPermission: 4, nextPermissionName: '单位负责人' },
       {name: '通过', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' },
     ],
-    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: '', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p', disabled: true}
   },
   {
     taskType: 14,
@@ -192,9 +192,9 @@ const taskTypeList = [
       {name: '不通过', componentName: 'disagree', nextPermission: 5, nextPermissionName: '改善者' },
       {name: '通过', componentName: null, nextPermission: 5, nextPermissionName: '改善者' },
     ],
-    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: '', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p', disabled: true}
   },
   {
     taskType: 15,
@@ -205,9 +205,9 @@ const taskTypeList = [
       {name: '不通过', componentName: 'disagree', nextPermission: 4, nextPermissionName: '单位负责人' },
       {name: '通过', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' },
     ],
-    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: '', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p', disabled: true}
   },
   {
     taskType: 16,
@@ -218,9 +218,9 @@ const taskTypeList = [
       {name: '不通过', componentName: 'disagree', nextPermission: 5, nextPermissionName: '改善者' },
       {name: '通过', componentName: null, nextPermission: 1, nextPermissionName: '管理员' },
     ],
-    row1: { hasJoin: true, name: '改善者*', key: 'establishEmpName' },
+    row1: { hasJoin: true, name: '改善者x', key: 'establishEmpName' },
     row2: {hasJoin: false, name: '提交了改善计划(PLAN)'},
-    selectDetails: {name: '查看改善方案详情', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'pdca', disabled: true}
+    selectDetails: {name: '查看改善方案详情', key: '', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'pdca', disabled: true}
   },
   {
     taskType: 17,
@@ -228,9 +228,9 @@ const taskTypeList = [
     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: '查看改善方案详情', key: '', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'pdca', disabled: true}
   },
   {
     taskType: 18,
@@ -240,9 +240,9 @@ const taskTypeList = [
     btnList: [
       {name: '指派改善任务', componentName: 'assign-mission', nextPermission: 4, nextPermissionName: '单位负责人' },
     ],
-    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 }
   },
 ];
 
@@ -263,16 +263,19 @@ export default taskTypeList;
  * }
  * row1: { // 第一行显示的内容
  *    hasJoin:// 是否需要拼接,
- *    name:   // 显示的内容 <注意 星号*指占位符, 后面需要被key字段替换的,
- *    key:    //  要显示的的内容(后端返回的key, 用于替换星号*)
+ *    name:   // 显示的内容 <注意 x指占位符, 后面需要被key字段替换的,
+ *    key:    //  要显示的的内容(后端返回的key, 用于替换x)
+ *    isOutDataKey: true // 是否从外层获取数据, 不然从pfmTaskCirculationList获取(比如状态为1的时候查核结果需要从外层获取)
  *  }
  * row2: { // 第二行显示的内容
  *    hasJoin: // 是否需要拼接,
- *    name:    // 显示的内容 <注意 星号*指占位符, 后面需要被key字段替换的,
- *    key:     // 要显示的的内容(后端返回的key, 用于替换星号*)
+ *    name:    // 显示的内容 <注意 x指占位符, 后面需要被key字段替换的,
+ *    key:     // 要显示的的内容(后端返回的key, 用于替换x)
+ *    isOutDataKey: true // 是否从外层获取数据, 不然从pfmTaskCirculationList获取(比如状态为1的时候查核结果需要从外层获取)
  *  }
  * selectDetails {
  *   name: '查看改善计划详情', // 详情显示的名字
+ *   key:  'approveReason',  // 取接口的哪个字段值, 当key='' 则跳转组件未pdca
  *   componentName: 'pdca', // 点击后跳转的页面
  *   pdcaSetting: 'p', // 当componentName='pdca', 需要判断pdcaSetting='p', 还是‘pdca’
  *   disabled: true // 底部按钮禁用

+ 43 - 12
pages/mission/model.js

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

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


+ 1 - 1
utils/request.js

@@ -47,7 +47,7 @@ function request(url, options, additional) {
   openCloseLoading(additional, true);
   // 模拟token,做登录的同学将这行代码移到登录成功函数中.
 
-  uni.setStorageSync('token', 'gfkZlq36bBPefzvIoukl5exPJ5/jkil2gi9fNPTABSk=');
+  // uni.setStorageSync('token', 'gfkZlq36bBPefzvIoukl5exPJ5/jkil2gi9fNPTABSk=');
   const token = uni.getStorageSync('token');
   return uni.request({
     url: `${BASE_URL}${url}`,