Jelajahi Sumber

音频管理 已选禁用

DESKTOP-O04BTUJ\muzen 2 tahun lalu
induk
melakukan
426e0cd0f2
2 mengubah file dengan 7 tambahan dan 10 penghapusan
  1. 1 4
      src/views/music/blog/detail.vue
  2. 6 6
      src/views/music/menu/detail.vue

+ 1 - 4
src/views/music/blog/detail.vue

@@ -90,7 +90,7 @@
         <el-table-column label="操作" align="center">
           <template slot-scope="scope">
             <el-button type="text" @click="getChecked(scope.row)"
-              :disabled="disabledChecked || scope.row.status === 2">
+              :disabled="form.adminPodCastProgramDetailResp.findIndex(i => i.id === scope.row.id) === -1 ? false : true">
               选择
             </el-button>
           </template>
@@ -213,9 +213,6 @@ export default {
       detail(this.form.id).then(res => {
         if (res.code === 0) {
           this.form = res.data
-          if (res.data.adminPodCastProgramDetailResp) {
-            this.disabledChecked = this.form.adminPodCastProgramDetailResp.findIndex(i => i.id === scope.row.id) === -1 ? false : true
-          }
           this.anchorOptions = []
           res.data.adminPrdCasterResp.map(i => {
             this.anchorOptions.push({

+ 6 - 6
src/views/music/menu/detail.vue

@@ -75,7 +75,8 @@
         <el-table-column label="播放时长" prop="playTime" align="center" />
         <el-table-column label="操作" align="center">
           <template slot-scope="scope">
-            <el-button type="text" @click="getChecked(scope.row)" :disabled="disabledChecked">
+            <el-button type="text" @click="getChecked(scope.row)"
+              :disabled="form.programList.findIndex(i => i.id === scope.row.id) === -1 ? false : true">
               选择
             </el-button>
           </template>
@@ -138,7 +139,8 @@ export default {
       // 弹窗表单
       dialogForm: {
         pageNum: 1,
-        pageSize: 10
+        pageSize: 10,
+        status: 1
       },
       // 总数据
       total: 0,
@@ -167,9 +169,6 @@ export default {
         if (res.code === 0) {
           this.form = res.data
           this.form_loading = false
-          if (res.data.programList) {
-            this.disabledChecked = this.form.programList.findIndex(i => i.id === scope.row.id) === -1 ? false : true
-          }
         }
       })
     },
@@ -206,7 +205,8 @@ export default {
     getRefresh() {
       this.dialogForm = {
         pageNum: 1,
-        pageSize: 10
+        pageSize: 10,
+        status: 1
       }
       this.getList()
     },