|
@@ -88,7 +88,8 @@
|
|
|
|
|
|
<el-form-item label="列表:" v-if="isList()">
|
|
<el-form-item label="列表:" v-if="isList()">
|
|
<el-button type="primary" @click="getDialog(index)" v-hasPermi="['operation:recommend:add']">
|
|
<el-button type="primary" @click="getDialog(index)" v-hasPermi="['operation:recommend:add']">
|
|
- 添加内容</el-button>
|
|
|
|
|
|
+ 添加内容
|
|
|
|
+ </el-button>
|
|
<el-table :data="item.childList" height="332">
|
|
<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="当前状态" prop="status" align="center" :formatter="statusFormatter" />
|
|
@@ -141,7 +142,7 @@
|
|
@selection-change="handleSelectionChange">
|
|
@selection-change="handleSelectionChange">
|
|
<el-table-column type="selection" align="center" reserve-selection
|
|
<el-table-column type="selection" align="center" reserve-selection
|
|
v-if="tabIndex === 2 && active === 1" />
|
|
v-if="tabIndex === 2 && active === 1" />
|
|
- <el-table-column label="音频ID" prop="audioId" align="center" />
|
|
|
|
|
|
+ <el-table-column label="音频ID" prop="audioId" align="center" show-overflow-tooltip />
|
|
<el-table-column label="音频名称" prop="audioName" align="center" show-overflow-tooltip />
|
|
<el-table-column label="音频名称" prop="audioName" align="center" show-overflow-tooltip />
|
|
<el-table-column label="音频封面" align="center" width="100px">
|
|
<el-table-column label="音频封面" align="center" width="100px">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -181,14 +182,15 @@ import {
|
|
upOrDown
|
|
upOrDown
|
|
} from '@/api/operation/recommend'
|
|
} from '@/api/operation/recommend'
|
|
import Upload from '@/components/Upload/index'
|
|
import Upload from '@/components/Upload/index'
|
|
|
|
+import { isFreeMixin } from '@/mixin/index'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
dicts: [
|
|
dicts: [
|
|
'platform_type',
|
|
'platform_type',
|
|
- 'free_yes_no',
|
|
|
|
'is_custom',
|
|
'is_custom',
|
|
'content_model'
|
|
'content_model'
|
|
],
|
|
],
|
|
|
|
+ mixins: [isFreeMixin],
|
|
components: {
|
|
components: {
|
|
Upload
|
|
Upload
|
|
},
|
|
},
|
|
@@ -476,14 +478,14 @@ export default {
|
|
this.tableData = res.data.records
|
|
this.tableData = res.data.records
|
|
this.total = res.data.total
|
|
this.total = res.data.total
|
|
this.$refs.tableData.clearSelection()
|
|
this.$refs.tableData.clearSelection()
|
|
- this.$nextTick(() => {
|
|
|
|
|
|
+ if (this.tableData.length > 0) {
|
|
this.list[this.index].childList.map(i => {
|
|
this.list[this.index].childList.map(i => {
|
|
let row = res.data.records.find(j => j.audioId === i.contentId)
|
|
let row = res.data.records.find(j => j.audioId === i.contentId)
|
|
if (row) {
|
|
if (row) {
|
|
this.$refs.tableData.toggleRowSelection(row)
|
|
this.$refs.tableData.toggleRowSelection(row)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- })
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -493,8 +495,10 @@ export default {
|
|
let e = this.list[this.index]
|
|
let e = this.list[this.index]
|
|
e.contentId = row.audioId
|
|
e.contentId = row.audioId
|
|
e.contentName = row.audioName
|
|
e.contentName = row.audioName
|
|
|
|
+ e.pic = row.audioPic
|
|
e.platformId = row.platformId
|
|
e.platformId = row.platformId
|
|
e.contentType = row.audioType
|
|
e.contentType = row.audioType
|
|
|
|
+ e.description = row.description
|
|
this.dialogVisible = false
|
|
this.dialogVisible = false
|
|
this.$message.success('选择成功!')
|
|
this.$message.success('选择成功!')
|
|
},
|
|
},
|
|
@@ -512,7 +516,9 @@ export default {
|
|
contentId: i.audioId,
|
|
contentId: i.audioId,
|
|
contentName: i.audioName,
|
|
contentName: i.audioName,
|
|
platformId: i.platformId,
|
|
platformId: i.platformId,
|
|
- contentType: i.audioType
|
|
|
|
|
|
+ contentType: i.audioType,
|
|
|
|
+ pic: i.audioPic,
|
|
|
|
+ description: i.description
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -561,7 +567,7 @@ export default {
|
|
return this.selectDictLabel(this.audioTypeOptions, row.audioType)
|
|
return this.selectDictLabel(this.audioTypeOptions, row.audioType)
|
|
},
|
|
},
|
|
freeFormatter(row) {
|
|
freeFormatter(row) {
|
|
- return this.selectDictLabel(this.dict.type.free_yes_no, row.isFree)
|
|
|
|
|
|
+ return this.selectDictLabel(this.freeOptions, row.isFree)
|
|
},
|
|
},
|
|
statusFormatter(row) {
|
|
statusFormatter(row) {
|
|
return row.status === 0 ? '上架' : '下架'
|
|
return row.status === 0 ? '上架' : '下架'
|