|
@@ -1,3 +1,5 @@
|
|
|
+
|
|
|
+<!-- 音频管理 歌单详情 -->
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-form
|
|
@@ -111,14 +113,32 @@
|
|
|
align="center"
|
|
|
:formatter="statusFormatter"
|
|
|
/>
|
|
|
+
|
|
|
<el-table-column label="操作" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<Audio :src="scope.row.progaramUrl" />
|
|
|
<el-button type="delete" @click="getDelete(scope.$index)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ >删除</el-button>
|
|
|
+
|
|
|
+ <!-- 向上移动 -->
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-caret-top"
|
|
|
+ @click="getChange(true, scope.$index,scope.$index - 1)"
|
|
|
+ :disabled="scope.$index < 1"
|
|
|
+ />
|
|
|
+
|
|
|
+ <!-- 向下移动 -->
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-caret-bottom"
|
|
|
+ @click="getChange(false,scope.$index, scope.$index + 1)"
|
|
|
+ :disabled="scope.$index > form.programList.length-2"
|
|
|
+ />
|
|
|
+
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+
|
|
|
</el-table>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -375,6 +395,20 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 排序
|
|
|
+ getChange(top, index, laterIndex) {
|
|
|
+ var row = this.form.programList[index];
|
|
|
+ var laterRow = this.form.programList[laterIndex];
|
|
|
+ if (top) {
|
|
|
+ this.form.programList[index] = laterRow;
|
|
|
+ this.form.programList[laterIndex] = row;
|
|
|
+ } else {
|
|
|
+ this.form.programList[laterIndex] = row;
|
|
|
+ this.form.programList[index] = laterRow;
|
|
|
+ }
|
|
|
+ this.form.programList = this.form.programList.filter((i) => i);
|
|
|
+ },
|
|
|
+
|
|
|
tableKey(row) {
|
|
|
return row.id;
|
|
|
},
|