Browse Source

运营管理 推荐管理 修复内容选择多选交互bug

DESKTOP-O04BTUJ\muzen 3 years ago
parent
commit
d615f26424
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/views/operation/recommend/index.vue

+ 6 - 3
src/views/operation/recommend/index.vue

@@ -90,7 +90,7 @@
               <el-button type="primary" @click="getDialog(index)" v-hasPermi="['operation:recommend:add']">
                 添加内容</el-button>
               <el-table :data="item.childList" height="332">
-                <el-table-column label="电台名称:" prop="contentName" align="center" show-overflow-tooltip/>
+                <el-table-column label="电台名称:" prop="contentName" align="center" show-overflow-tooltip />
                 <el-table-column label="当前状态" prop="status" align="center" :formatter="statusFormatter" />
                 <el-table-column label="操作" align="center">
                   <template slot-scope="scope">
@@ -153,7 +153,9 @@
         <el-table-column label="付费类型" align="center" :formatter="freeFormatter" width="100px" />
         <el-table-column label="操作" align="center">
           <template slot-scope="scope">
-            <el-button type="text" @click="getSelect(scope.row)" :disabled="tabIndex === 2 && active === 1">选择
+            <el-button v-if="tabIndex === 2 && active === 1 ? false : true" type="text"
+              @click="getSelect(scope.row)">
+              选择
             </el-button>
           </template>
         </el-table-column>
@@ -474,11 +476,12 @@ export default {
         if (res.code === 0) {
           this.tableData = res.data.records
           this.total = res.data.total
+          this.$refs.tableData.clearSelection()
           this.$nextTick(() => {
             this.list[this.index].childList.map(i => {
               let row = res.data.records.find(j => j.audioId === i.contentId)
               if (row) {
-                this.$refs.tableData.toggleRowSelection(row, true)
+                this.$refs.tableData.toggleRowSelection(row)
               }
             })
           })