Browse Source

服务管理 qq音乐

DESKTOP-O04BTUJ\muzen 3 years ago
parent
commit
db939c10fc
1 changed files with 6 additions and 16 deletions
  1. 6 16
      src/views/service/qqmusic/index.vue

+ 6 - 16
src/views/service/qqmusic/index.vue

@@ -9,7 +9,8 @@
       </el-form-item>
       <el-form-item label="服务时长:">
         <el-select v-model="form.serviceTime" placeholder="请选择服务时长" clearable>
-          <el-option v-for="item in timeOptions" :key="item.value" :label="item.label" :value="item.value" />
+          <el-option v-for="item in serviceTimeOptions" :key="item.value" :label="item.label"
+            :value="item.value" />
         </el-select>
       </el-form-item>
       <el-form-item label="当前状态:">
@@ -59,7 +60,7 @@
       <el-form v-if="title === '批量推送短信'">
         <el-form-item label="服务时长:" label-width="100px" style="width: 300px">
           <el-select v-model="dialogForm.serviceTime" placeholder="请选择服务时长">
-            <el-option v-for="item in timeOptions" :key="item.value" :label="item.label"
+            <el-option v-for="item in serviceTimeOptions" :key="item.value" :label="item.label"
               :value="item.value" />
           </el-select>
         </el-form-item>
@@ -125,8 +126,10 @@
 
 <script>
 import { page, send, importData, detail, past, batchList, batchPage } from '@/api/service/qqmusic'
+import { serviceTimeOptions } from '@/mixin/index'
 import Upload from '@/components/Upload/index'
 export default {
+  mixins: [serviceTimeOptions],
   components: {
     Upload
   },
@@ -170,19 +173,6 @@ export default {
         label: '删除'
       }],
       batchOptions: [],
-      // 服务时长
-      timeOptions: [
-        { value: 1, label: '7天' },
-        { value: 2, label: '14天' },
-        { value: 3, label: '1个月' },
-        { value: 4, label: '3个月' },
-        { value: 5, label: '6个月' },
-        { value: 6, label: '1年' },
-        { value: 7, label: '2年' },
-        { value: 8, label: '3年' },
-        { value: 9, label: '5年' },
-        { value: 0, label: '永久' }
-      ],
       // 当前状态
       statusOptions: [
         { value: 0, label: '已发送' },
@@ -341,7 +331,7 @@ export default {
       return this.selectDictLabel(this.statusOptions, row.codeStatus)
     },
     timeFormatter(row) {
-      return this.selectDictLabel(this.timeOptions, row.serviceTime)
+      return this.selectDictLabel(this.serviceTimeOptions, row.serviceTime)
     },
     batchFormatter(row) {
       return this.selectDictLabel(this.batchStatusOptions, row.status)