|
@@ -81,7 +81,7 @@
|
|
|
</el-form>
|
|
|
|
|
|
<!-- 弹窗 -->
|
|
|
- <el-dialog :visible.sync="dialogVisible" title="新增频道内容">
|
|
|
+ <el-dialog :visible.sync="dialogVisible" title="新增频道内容" :before-close="getCancel">
|
|
|
<el-form inline size="mini">
|
|
|
<el-form-item label="内容名称:">
|
|
|
<el-input v-model="dialogForm.name" placeholder="请输入内容名称" clearable />
|
|
@@ -109,7 +109,7 @@
|
|
|
<pagination v-show="total>0" :total="total" :page.sync="dialogForm.pageNum"
|
|
|
:limit.sync="dialogForm.pageSize" @pagination="getPage" />
|
|
|
<div slot="footer">
|
|
|
- <el-button @click="this.dialogVisible = false">取消</el-button>
|
|
|
+ <el-button @click="getCancel">取消</el-button>
|
|
|
<el-button type="primary" @click="getAdd">确定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -304,12 +304,15 @@ export default {
|
|
|
if (res.code === 0) {
|
|
|
this.dialogData = res.data.records
|
|
|
this.total = res.data.total
|
|
|
- this.tableData.map(i => {
|
|
|
- let row = res.data.records.find(j => j.id === i.audioId)
|
|
|
- if (row) {
|
|
|
- this.$refs.table.toggleRowSelection(row)
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$refs.table.clearSelection()
|
|
|
+ if (this.tableData.length > 0) {
|
|
|
+ this.tableData.map(i => {
|
|
|
+ let row = res.data.records.find(j => j.id == i.audioId)
|
|
|
+ if (row) {
|
|
|
+ this.$refs.table.toggleRowSelection(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
this.loading = false
|
|
|
}
|
|
|
})
|
|
@@ -358,6 +361,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ // 取消弹窗
|
|
|
+ getCancel() {
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.ids = []
|
|
|
+ // this.$refs.table.clearSelection();
|
|
|
+ },
|
|
|
+
|
|
|
// 添加频道内容
|
|
|
getAdd() {
|
|
|
createTag({
|