|
@@ -82,7 +82,7 @@
|
|
|
|
|
|
<!-- 弹窗 -->
|
|
|
<el-dialog :visible.sync="dialogVisible" title="新增频道内容">
|
|
|
- <el-form inline size="mini">
|
|
|
+ <el-form inline size="mini" @submit.native.prevent>
|
|
|
<el-form-item label="内容名称:">
|
|
|
<el-input v-model="dialogForm.name" placeholder="请输入内容名称" clearable />
|
|
|
</el-form-item>
|
|
@@ -92,20 +92,21 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<!-- 列表 -->
|
|
|
- <el-table :data="dialogData" height="584" v-loading="loading" ref="table" :row-key="getRowKey"
|
|
|
- @selection-change="getChange" lazy>
|
|
|
- <el-table-column type="selection" align="center" reserve-selection />
|
|
|
- <el-table-column label="内容ID" prop="id" align="center" />
|
|
|
- <el-table-column label="音频名称" prop="audioName" align="center" />
|
|
|
- <el-table-column label="音频封面" align="center" width="100px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-image :src="scope.row.audioPic" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="分类" prop="audioType" align="center" :formatter="typeFormatter" />
|
|
|
- <el-table-column label="节目数量" prop="programCount" align="center" />
|
|
|
- <el-table-column label="付费类型" prop="isFree" align="center" :formatter="freeFormatter" />
|
|
|
- </el-table>
|
|
|
+ <div style="height:584px; overflow:auto">
|
|
|
+ <el-table :data="dialogData" ref="table" :row-key="getRowKey" @selection-change="getChange">
|
|
|
+ <el-table-column type="selection" align="center" reserve-selection />
|
|
|
+ <el-table-column label="内容ID" prop="id" align="center" />
|
|
|
+ <el-table-column label="音频名称" prop="audioName" align="center" />
|
|
|
+ <el-table-column label="音频封面" align="center" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-image :src="scope.row.audioPic" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="分类" prop="audioType" align="center" :formatter="typeFormatter" />
|
|
|
+ <el-table-column label="节目数量" prop="programCount" align="center" />
|
|
|
+ <el-table-column label="付费类型" prop="isFree" align="center" :formatter="freeFormatter" />
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
<pagination v-show="total>0" :total="total" :page.sync="dialogForm.pageNum"
|
|
|
:limit.sync="dialogForm.pageSize" @pagination="getPage" />
|
|
|
<div slot="footer">
|
|
@@ -131,8 +132,6 @@ export default {
|
|
|
},
|
|
|
// 列表
|
|
|
tableData: [],
|
|
|
- // 弹窗列表
|
|
|
- dialogData: [],
|
|
|
// 添加内容id数组
|
|
|
ids: [],
|
|
|
// 二级标签
|
|
@@ -155,6 +154,8 @@ export default {
|
|
|
pageSize: 10,
|
|
|
},
|
|
|
total: 0,
|
|
|
+ // 弹窗列表
|
|
|
+ dialogData: [],
|
|
|
|
|
|
// 标签属性
|
|
|
lableTypeOptions: [{
|
|
@@ -304,14 +305,14 @@ export default {
|
|
|
this.dialogData = res.data.records
|
|
|
this.total = res.data.total
|
|
|
this.$refs.table.clearSelection()
|
|
|
- if (this.tableData.length > 0) {
|
|
|
+ this.$nextTick(() => {
|
|
|
this.tableData.map(i => {
|
|
|
- let row = res.data.records.find(j => j.id == i.audioId)
|
|
|
+ let row = this.dialogData.find(j => j.id == i.audioId)
|
|
|
if (row) {
|
|
|
this.$refs.table.toggleRowSelection(row)
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
+ })
|
|
|
this.loading = false
|
|
|
}
|
|
|
})
|