ソースを参照

fix: reject reason

fenghao 3 年 前
コミット
ed2ffd979a

+ 4 - 1
src/views/review/workflow/detail/index.vue

@@ -12,7 +12,7 @@
       @click="getPublishWorkflowDetail"
     />
     <div v-if="dataMap.length">
-      <div class="l-flex--row o-title has-bottom-padding u-color--black u-bold">{{ title }} <span class="applicant">{{ sourceMap.createBy?`申请人:${sourceMap.createBy}`:'' }}</span></div>
+      <div class="l-flex--row o-title has-bottom-padding u-color--black u-bold">{{ title }} <span class="applicant">{{ createBy?`申请人:${createBy}`:'' }}</span></div>
       <div class="l-flex--row has-padding">
         <el-steps
           :active="active"
@@ -223,6 +223,9 @@ export default {
     title () {
       return this.$route.params.name
     },
+    createBy () {
+      return this.$route.params.createBy
+    },
     totalStep () {
       return this.dataMap.length + 1
     },

+ 2 - 1
src/views/review/workflow/index.vue

@@ -156,7 +156,8 @@ export default {
         name: 'workflow-detail',
         params: {
           id: item.workflowId,
-          name: item.name
+          name: item.name,
+          createBy: item.createBy
         }
       })
     }

+ 9 - 1
src/views/review/workflow/mine/index.vue

@@ -82,6 +82,7 @@ export default {
               }
             }
           },
+          null,
           {
             type: 'invoke',
             width: 160,
@@ -111,13 +112,20 @@ export default {
     onTabClick ({ name: active }) {
       if (this.active !== active) {
         this.active = active
+        if (Number(active) === State.REJECTED) {
+          this.$set(this.schema.cols, 6, {
+            prop: 'reason', label: '驳回原因'
+          })
+        } else {
+          this.$set(this.schema.cols, 6, null)
+        }
         this.$refs.table.mergeCondition({ status: Number(active) })
       }
     },
     transform (item) {
       const same = this.getSame(item.calendarRelease)
       const diff = this.getDiff(item.calendarRelease)
-      return { ...same, ...diff, workflowId: item.id, status: item.status }
+      return { ...same, ...diff, workflowId: item.id, status: item.status, reason: item.reason }
     },
     getSame ({
       id,