|
@@ -67,15 +67,10 @@
|
|
|
:label="item.label" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="![2, 11, 17].includes(dialogForm.audioType)" label="付费类型:">
|
|
|
- <el-select v-if="[10, 15].includes(dialogForm.audioType)" v-model="dialogForm.payType"
|
|
|
- placeholder="请选择付费类型">
|
|
|
- <el-option v-for="item in payTypeOptions" :key="item.value" :label="item.label"
|
|
|
- :value="item.value" />
|
|
|
- </el-select>
|
|
|
- <el-select v-else v-model="dialogForm.isFree" placeholder="请选择付费类型">
|
|
|
- <el-option v-for="item in freeOptions" :key="item.value" :label="item.label"
|
|
|
- :value="item.value" />
|
|
|
+ <el-form-item v-if="![2, 10, 11].includes(dialogForm.audioType)" label="付费类型:">
|
|
|
+ <el-select v-model="dialogForm.payType" placeholder="请选择付费类型">
|
|
|
+ <el-option v-for="item in [8, 15].includes(dialogForm.audioType) ? payTypeOptions : freeOptions "
|
|
|
+ :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="内容名称:">
|
|
@@ -87,8 +82,7 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<!-- 列表 -->
|
|
|
- <el-table :data="dialogData" height="476" ref="table" :row-key="getRowKey"
|
|
|
- @selection-change="getChange">
|
|
|
+ <el-table :data="dialogData" ref="table" :row-key="getRowKey" @selection-change="getChange">
|
|
|
<el-table-column type="selection" align="center" :reserve-selection="true" />
|
|
|
<el-table-column label="音频ID" prop="id" align="center" show-overflow-tooltip />
|
|
|
<el-table-column label="音频名称" prop="name" align="center" />
|
|
@@ -100,10 +94,16 @@
|
|
|
<el-image v-if="scope.row.thumbUrl" :src="scope.row.thumbUrl" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-if="![2, 10, 11, 15, 17].includes(dialogForm.audioType)" label="付费类型" prop="isFree"
|
|
|
- align="center" :formatter="freeFormatter" />
|
|
|
- <el-table-column v-if="[10, 15].includes(dialogForm.audioType)" label="付费类型" prop="payType"
|
|
|
- align="center" :formatter="payFormatter" />
|
|
|
+ <el-table-column label="付费类型" align="center" v-if="![2, 10, 11].includes(dialogForm.audioType)">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span
|
|
|
+ v-if="dialogForm.audioType === 6">{{ selectDictLabel(freeOptions, scope.row.isFree) }}</span>
|
|
|
+ <span
|
|
|
+ v-if="dialogForm.audioType === 8">{{ selectDictLabel(payTypeOptions, scope.row.charging) }}</span>
|
|
|
+ <span
|
|
|
+ v-if="dialogForm.audioType === 15">{{ selectDictLabel(payTypeOptions, scope.row.payType) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="资源平台" align="center" :formatter="platfromFormatter" />
|
|
|
</el-table>
|
|
|
<pagination v-show="total>0" :total="total" :page.sync="dialogForm.pageNum"
|
|
@@ -160,7 +160,6 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
'form.channelType'(val) {
|
|
|
- console.log(val);
|
|
|
this.getPlatform({
|
|
|
audioType: this.channelOptions[val][0].value
|
|
|
})
|
|
@@ -172,7 +171,7 @@ export default {
|
|
|
this.getPlatform({
|
|
|
audioType: val
|
|
|
})
|
|
|
- this.getPage()
|
|
|
+ this.getRefresh()
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -258,6 +257,11 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ // 付费类型
|
|
|
+ payType(row) {
|
|
|
+ console.log(row);
|
|
|
+ },
|
|
|
+
|
|
|
// 抽离方法
|
|
|
getRes(res) {
|
|
|
if (res.code == 0) {
|
|
@@ -294,10 +298,13 @@ export default {
|
|
|
|
|
|
// 重置
|
|
|
getRefresh() {
|
|
|
- this.dialogForm.pageNum = 1
|
|
|
- this.dialogForm.pageSize = 10
|
|
|
- this.dialogForm.status = 1
|
|
|
- this.dialogForm.name = ''
|
|
|
+ this.dialogForm = {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ status: 1,
|
|
|
+ audioType: this.dialogForm.audioType,
|
|
|
+ type: this.dialogForm.audioType === 15 ? 1 : this.dialogForm.audioType === 10 ? 2 : ''
|
|
|
+ }
|
|
|
this.getPage()
|
|
|
},
|
|
|
|
|
@@ -358,17 +365,9 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 字典翻译
|
|
|
- freeFormatter(row) {
|
|
|
- return this.selectDictLabel(this.form.channelType === 6 ? this.freeOptions : this.payTypeOptions, row.isFree)
|
|
|
- },
|
|
|
-
|
|
|
platfromFormatter(row) {
|
|
|
return this.selectDictLabel(this.platformOptions, row.platformId)
|
|
|
},
|
|
|
-
|
|
|
- payFormatter(row) {
|
|
|
- return this.selectDictLabel(this.payTypeOptions, row.payType)
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
</script>
|