|
@@ -116,12 +116,13 @@
|
|
>解除关联</el-button
|
|
>解除关联</el-button
|
|
>
|
|
>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+
|
|
<el-form-item style="width: 100%">
|
|
<el-form-item style="width: 100%">
|
|
<el-table
|
|
<el-table
|
|
:data="form.adminPodCastProgramDetailResp"
|
|
:data="form.adminPodCastProgramDetailResp"
|
|
@selection-change="handleSelect"
|
|
@selection-change="handleSelect"
|
|
>
|
|
>
|
|
- <!-- <el-table-column type="selection" align="center" /> -->
|
|
|
|
|
|
+ <el-table-column type="selection" align="center" />
|
|
<el-table-column
|
|
<el-table-column
|
|
label="ID"
|
|
label="ID"
|
|
prop="id"
|
|
prop="id"
|
|
@@ -150,15 +151,6 @@
|
|
|
|
|
|
<el-table-column label="操作" align="center">
|
|
<el-table-column label="操作" align="center">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <Audio :src="scope.row.progaramUrl" />
|
|
|
|
-
|
|
|
|
- <el-button
|
|
|
|
- type="delete"
|
|
|
|
- :disabled="disabled"
|
|
|
|
- @click="getDeletePlus(scope.$index)"
|
|
|
|
- >删除</el-button
|
|
|
|
- >
|
|
|
|
-
|
|
|
|
<!-- 向上移动 -->
|
|
<!-- 向上移动 -->
|
|
<el-button
|
|
<el-button
|
|
type="text"
|
|
type="text"
|
|
@@ -489,9 +481,78 @@ export default {
|
|
|
|
|
|
handleSelectionChange(val) {
|
|
handleSelectionChange(val) {
|
|
if (this.isLoad) {
|
|
if (this.isLoad) {
|
|
- this.form.adminPodCastProgramDetailResp = JSON.parse(
|
|
|
|
- JSON.stringify(val)
|
|
|
|
- );
|
|
|
|
|
|
+ if (this.form.adminPodCastProgramDetailResp.length == 0) {
|
|
|
|
+ this.form.adminPodCastProgramDetailResp = JSON.parse(
|
|
|
|
+ JSON.stringify(val)
|
|
|
|
+ );
|
|
|
|
+ } else {
|
|
|
|
+ ///查找dialogTableData里面有的
|
|
|
|
+ var tempDialogHas = [];
|
|
|
|
+ for (var i = 0; i < this.dialogTableData.length; i++) {
|
|
|
|
+ for (var j = 0; j < val.length; j++) {
|
|
|
|
+ if (this.dialogTableData[i].id === val[j].id) {
|
|
|
|
+ tempDialogHas.push(this.dialogTableData[i]);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ///查找dialogTableData里面没有的
|
|
|
|
+ var tempDialogNot = [];
|
|
|
|
+ if (tempDialogHas.length == 0) {
|
|
|
|
+ tempDialogNot = JSON.parse(JSON.stringify(this.dialogTableData));
|
|
|
|
+ } else {
|
|
|
|
+ for (var i = 0; i < this.dialogTableData.length; i++) {
|
|
|
|
+ var has = false;
|
|
|
|
+ for (var j = 0; j < tempDialogHas.length; j++) {
|
|
|
|
+ if (this.dialogTableData[i].id === tempDialogHas[j].id) {
|
|
|
|
+ has = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (!has) {
|
|
|
|
+ tempDialogNot.push(this.dialogTableData[i]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ///减少val没有的
|
|
|
|
+ if (tempDialogNot.length > 0) {
|
|
|
|
+ for (var i = 0; i < tempDialogNot.length; i++) {
|
|
|
|
+ for (
|
|
|
|
+ var j = 0;
|
|
|
|
+ j < this.form.adminPodCastProgramDetailResp.length;
|
|
|
|
+ j++
|
|
|
|
+ ) {
|
|
|
|
+ if (
|
|
|
|
+ tempDialogNot[i].id ===
|
|
|
|
+ this.form.adminPodCastProgramDetailResp[j].id
|
|
|
|
+ ) {
|
|
|
|
+ this.form.adminPodCastProgramDetailResp.splice(j, 1);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ///添加adminPodCastProgramDetailResp没有的
|
|
|
|
+ for (var i = 0; i < val.length; i++) {
|
|
|
|
+ var isHas = false;
|
|
|
|
+ for (
|
|
|
|
+ var j = 0;
|
|
|
|
+ j < this.form.adminPodCastProgramDetailResp.length;
|
|
|
|
+ j++
|
|
|
|
+ ) {
|
|
|
|
+ if (val[i].id === this.form.adminPodCastProgramDetailResp[j].id) {
|
|
|
|
+ isHas = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (!isHas) {
|
|
|
|
+ this.form.adminPodCastProgramDetailResp.push(val[i]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.form.adminPodCastProgramDetailResp =
|
|
this.form.adminPodCastProgramDetailResp =
|
|
this.form.adminPodCastProgramDetailResp.filter((i) => i);
|
|
this.form.adminPodCastProgramDetailResp.filter((i) => i);
|
|
this.$message.success("操作成功!");
|
|
this.$message.success("操作成功!");
|
|
@@ -558,6 +619,7 @@ export default {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
|
|
|
this.isLoad = false;
|
|
this.isLoad = false;
|
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
if (this.form.adminPodCastProgramDetailResp.length > 0) {
|
|
if (this.form.adminPodCastProgramDetailResp.length > 0) {
|
|
var temp = [];
|
|
var temp = [];
|
|
for (var i = 0; i < this.dialogTableData.length; i++) {
|
|
for (var i = 0; i < this.dialogTableData.length; i++) {
|
|
@@ -643,6 +705,14 @@ export default {
|
|
this.form.adminPodCastProgramDetailResp.map((i) => {
|
|
this.form.adminPodCastProgramDetailResp.map((i) => {
|
|
this.form.podcastProgramIds.push(i.id);
|
|
this.form.podcastProgramIds.push(i.id);
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ console.log(
|
|
|
|
+ "gasdfasdfqerqewrqerqrqr==000=" +
|
|
|
|
+ this.form.adminPodCastProgramDetailResp.length
|
|
|
|
+ );
|
|
|
|
+ console.log(
|
|
|
|
+ "gasdfasdfqerqewrqerqrqr==111=" + this.form.podcastProgramIds.length
|
|
|
|
+ );
|
|
submit(this.form).then((res) => {
|
|
submit(this.form).then((res) => {
|
|
// if (res.code === 0) {
|
|
// if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
@@ -665,12 +735,12 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
// 多选
|
|
// 多选
|
|
- // handleSelect(e) {
|
|
|
|
- // this.ids = [];
|
|
|
|
- // e.map((i) => {
|
|
|
|
- // this.ids.push(i.id);
|
|
|
|
- // });
|
|
|
|
- // },
|
|
|
|
|
|
+ handleSelect(e) {
|
|
|
|
+ this.ids = [];
|
|
|
|
+ e.map((i) => {
|
|
|
|
+ this.ids.push(i.id);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
|
|
// 取消
|
|
// 取消
|
|
cancel() {
|
|
cancel() {
|