浏览代码

签到管理 抽奖配置 添加活动状态展示

DESKTOP-O04BTUJ\muzen 2 年之前
父节点
当前提交
d31b5e7c16
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      src/views/registration/lottery/index.vue

+ 6 - 2
src/views/registration/lottery/index.vue

@@ -15,6 +15,7 @@
           {{ scope.row.startTime }} 至 {{ scope.row.endTime }}
         </template>
       </el-table-column>
+      <el-table-column label="活动状态" prop="currentStatus" align="center" :formatter="currentFormatter" />
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
           <el-button type="text" @click="getDetail(scope.row.id, true)">查看</el-button>
@@ -32,9 +33,9 @@
 
 <script>
 import { list, change, remove } from '@/api/registration/lottery'
-import { disabledMixin } from '@/mixin/index'
+import { disabledMixin, currentMixin } from '@/mixin/index'
 export default {
-  mixins: [disabledMixin],
+  mixins: [disabledMixin, currentMixin],
   data() {
     return {
       // 遮罩层
@@ -114,6 +115,9 @@ export default {
     // 字典翻译
     statusFormatter(row) {
       return this.selectDictLabel(this.disabledOptions, row.status)
+    },
+    currentFormatter(row) {
+      return this.selectDictLabel(this.currentOptions, row.currentStatus)
     }
   }
 }