ソースを参照

fix: label display

fenghao 3 年 前
コミット
d2a6151f54
1 ファイル変更40 行追加19 行削除
  1. 40 19
      src/views/review/workflow/mine/index.vue

+ 40 - 19
src/views/review/workflow/mine/index.vue

@@ -50,13 +50,13 @@ import {
   PublishType, EventPriority, State, EventTarget
 } from '@/constant'
 import { getEventDescription } from '@/utils/event'
-const data2label = {
-  minio: '媒资',
-  item: '节目',
-  carousel: '轮播',
-  program: '排期',
-  calendar: '发布'
-}
+// const data2label = {
+//   minio: '媒资',
+//   item: '节目',
+//   carousel: '轮播',
+//   program: '排期',
+//   calendar: '发布'
+// }
 export default {
   name: 'MyWorkflow',
   data () {
@@ -77,7 +77,11 @@ export default {
                 h('div', null, row.desc),
                 h('div', null, `设备:${row.device}`)
               ]
-              if (row.status === State.REJECTED && row.rejectEvent && row.rejectEvent.length) {
+              if (
+                row.status === State.REJECTED
+                && row.rejectEvent
+                && row.rejectEvent.length
+              ) {
                 base = base.concat(h('div', { style: { height: '10px' } }))
                 if (
                   row.rejectEvent.length === 1
@@ -89,25 +93,32 @@ export default {
                     h('em', { style: { verticalAlign: 'top' } }, '驳回对象:'),
                     h(
                       'ul',
-                      { staticClass: 'c-reject', style: { display: 'inline-block' } },
+                      {
+                        staticClass: 'c-reject',
+                        style: { display: 'inline-block' }
+                      },
                       row.rejectEvent
                         .filter(i => i.type !== 'calendar')
                         .map(item => h(
                           'li',
                           {
-                            staticClass:
-                              'c-reject__item',
-                            class: item.type === 'minio' ? '' : 'c-table__btn u-pointer',
+                            staticClass: 'c-reject__item',
+                            class:
+                                item.type === 'minio'
+                                  ? ''
+                                  : 'c-table__btn u-pointer',
                             // 'o-link c-table__btn u-pointer',
                             on: {
                               click ($event) {
                                 $event.stopPropagation()
-                                if (item.type === 'minio') { return }
+                                if (item.type === 'minio') {
+                                  return
+                                }
                                 _this1.onHandleReject(item, false)
                               }
                             }
                           },
-                          `${data2label[item.type]}:${item.name}`
+                          `${item.name}`
                         ))
                     )
                   ])
@@ -211,24 +222,32 @@ export default {
                     h('em', { style: { verticalAlign: 'top' } }, '驳回对象:'),
                     h(
                       'ul',
-                      { staticClass: 'c-reject', style: { display: 'inline-block' } },
+                      {
+                        staticClass: 'c-reject',
+                        style: { display: 'inline-block' }
+                      },
                       row.rejectEvent
                         .filter(i => i.type !== 'calendar')
                         .map(item => h(
                           'li',
                           {
                             staticClass: 'c-reject__item',
-                            class: item.type === 'minio' ? '' : 'c-table__btn u-pointer',
+                            class:
+                                item.type === 'minio'
+                                  ? ''
+                                  : 'c-table__btn u-pointer',
                             // 'o-link c-table__btn u-pointer',
                             on: {
                               click ($event) {
                                 $event.stopPropagation()
-                                if (item.type === 'minio') { return }
+                                if (item.type === 'minio') {
+                                  return
+                                }
                                 _this1.onHandleReject(item, isView)
                               }
                             }
                           },
-                          `${data2label[item.type]}:${item.name}`
+                          `${item.name}`
                         ))
                     )
                   ]
@@ -386,7 +405,9 @@ export default {
           this.onViewAsset(row)
           break
         case 'item':
-          isView ? this.$refs.programDialog.show(row.id) : this.editProgram(row.id)
+          isView
+            ? this.$refs.programDialog.show(row.id)
+            : this.editProgram(row.id)
           break
         case 'carousel':
           isView