|
@@ -1,3 +1,4 @@
|
|
|
|
+<!-- 定制频道 -->
|
|
<template>
|
|
<template>
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
<!-- 表单 -->
|
|
<!-- 表单 -->
|
|
@@ -107,22 +108,21 @@
|
|
<el-table-column label="操作" align="center">
|
|
<el-table-column label="操作" align="center">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button type="delete" @click="getDelete(scope.row)"
|
|
<el-button type="delete" @click="getDelete(scope.row)"
|
|
- >删除{{ form.list.length }}</el-button
|
|
|
|
|
|
+ >删除</el-button
|
|
>
|
|
>
|
|
|
|
|
|
<el-button
|
|
<el-button
|
|
- v-if="form.list.length > 1"
|
|
|
|
type="text"
|
|
type="text"
|
|
icon="el-icon-caret-top"
|
|
icon="el-icon-caret-top"
|
|
- @click="getChangeDetail(scope.row, scope.row.sort - 1)"
|
|
|
|
- :disabled="disabled"
|
|
|
|
|
|
+ @click="getChangeSort(scope.$index, scope.$index - 1)"
|
|
|
|
+ :disabled="scope.$index <= 0"
|
|
/>
|
|
/>
|
|
|
|
+
|
|
<el-button
|
|
<el-button
|
|
- v-if="form.list.length > 1"
|
|
|
|
type="text"
|
|
type="text"
|
|
icon="el-icon-caret-bottom"
|
|
icon="el-icon-caret-bottom"
|
|
- @click="getChangeDetail(scope.row, scope.row.sort + 1)"
|
|
|
|
- :disabled="disabled"
|
|
|
|
|
|
+ @click="getChangeSort(scope.$index, scope.$index + 1)"
|
|
|
|
+ :disabled="scope.$index > form.list.length - 2"
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -178,7 +178,30 @@ export default {
|
|
this.getDetail();
|
|
this.getDetail();
|
|
this.getPlatform({});
|
|
this.getPlatform({});
|
|
},
|
|
},
|
|
|
|
+
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 排序
|
|
|
|
+ getChangeSort(row, sort) {
|
|
|
|
+ const rowBean = this.form.list[row];
|
|
|
|
+ const sortBean = this.form.list[sort];
|
|
|
|
+ this.form.list[row] = sortBean;
|
|
|
|
+ this.form.list[sort] = rowBean;
|
|
|
|
+
|
|
|
|
+ this.form.audioList = [];
|
|
|
|
+ this.form.list.map((i) => {
|
|
|
|
+ this.form.audioList.push({
|
|
|
|
+ audioId: i.audioId,
|
|
|
|
+ audioType: i.audioType,
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ edit(this.form).then((res) => {
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
+ this.$message.success("修改成功!");
|
|
|
|
+ this.getDetail();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
// 频道详情
|
|
// 频道详情
|
|
getDetail() {
|
|
getDetail() {
|
|
channelDetail({
|
|
channelDetail({
|