|
@@ -1,3 +1,4 @@
|
|
|
+<!-- 博客专辑 详情 -->
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-form
|
|
@@ -153,14 +154,17 @@
|
|
|
<el-button
|
|
|
type="text"
|
|
|
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
|
|
|
type="text"
|
|
|
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.adminPodCastProgramDetailResp.length - 2
|
|
|
+ "
|
|
|
/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -430,6 +434,26 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 排序
|
|
|
+ getChangeSort(row, sort) {
|
|
|
+ const rowBean = this.form.adminPodCastProgramDetailResp[row];
|
|
|
+ const sortBean = this.form.adminPodCastProgramDetailResp[sort];
|
|
|
+ this.form.adminPodCastProgramDetailResp[row] = sortBean;
|
|
|
+ this.form.adminPodCastProgramDetailResp[sort] = rowBean;
|
|
|
+
|
|
|
+ this.form.podcastProgramIds = [];
|
|
|
+ this.form.adminPodCastProgramDetailResp.map((i) => {
|
|
|
+ this.form.podcastProgramIds.push(i.id);
|
|
|
+ });
|
|
|
+ submit(this.form).then((res) => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ let title = "修改成功!";
|
|
|
+ this.$message.success(`${title}`);
|
|
|
+ this.getDetail();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
// 详情
|
|
|
getDetail() {
|
|
|
detail(this.form.id).then((res) => {
|