diff --git a/src/pages/work/list.vue b/src/pages/work/list.vue index 55df1f6..73c8373 100644 --- a/src/pages/work/list.vue +++ b/src/pages/work/list.vue @@ -23,7 +23,7 @@ v-for="item in list" :key="item.id" :title="item.job.name" - :status-text="item.promotion_status_text" + :status-text="statusFun(item.promotion_status, 'promotion_status', 'name')" :status-color="statusFun(item.promotion_status, 'promotion_status', 'color')" :body="[ { label: '推荐人: ', value: item.invitor.name }, @@ -47,8 +47,8 @@ v-for="item in list" :key="item.id" :title="item.job.name" - :status-text="item.promotion_status_text" - :status-color="statusFun(item.promotion_status, 'promotion_status', 'color')" + :status-text="statusFun(item.promotion_status, 'promotion_status1', 'name')" + :status-color="statusFun(item.promotion_status, 'promotion_status1', 'color')" :body="[ { label: '申请人: ', value: item.employee.name }, { label: '申请时间: ', value: item.created_format }, diff --git a/src/utils/status.js b/src/utils/status.js index f18bf48..a74e752 100644 --- a/src/utils/status.js +++ b/src/utils/status.js @@ -1,17 +1,10 @@ const data = { - messages:[{ - value:'system', - name:'系统消息', - },{ - value:'work', - name:'工作消息', - },{ - value:'exam', - name:'考试通知', - },{ - value:'approval', - name:'审批通知', - }], + messages:[ + { value:'system', name:'系统消息' }, + { value:'work', name:'工作消息' }, + { value:'exam', name:'考试通知' }, + { value:'approval', name:'审批通知' } + ], // 申请状态 statusExpense: [ { value: 1, name: '待审核', color: '#f56c6c' }, @@ -64,7 +57,7 @@ const data = { { value: 5, name: '未通过', color: '#999999' } ], // 升职申请-推荐人 - promotion_status: [ + promotion_status1: [ { value: 1, name: '待提交', color: '#f56c6c'}, { value: 2, name: '待推荐', color: '#f56c6c' }, { value: 3, name: '审核中', color: '#f56c6c' },