|
@@ -113,7 +113,7 @@
|
|
|
import Upload from '@/components/Upload/index.vue'
|
|
|
import { classifyMixin, platformMixin, payTypeMixin, onOrOffMixin, isFreeMixin } from '@/mixin/index'
|
|
|
import { selectAnchor } from '@/api/music/anchor'
|
|
|
-import { detail, submit, relieve, checkList} from '@/api/music/blog'
|
|
|
+import { detail, submit, relieve, checkList } from '@/api/music/blog'
|
|
|
export default {
|
|
|
mixins: [classifyMixin, platformMixin, payTypeMixin, onOrOffMixin, isFreeMixin],
|
|
|
components: {
|
|
@@ -302,15 +302,25 @@ export default {
|
|
|
|
|
|
// 解除关联
|
|
|
getDelete() {
|
|
|
- relieve({
|
|
|
- id: this.form.id,
|
|
|
- podcastProgramIds: this.ids
|
|
|
- }).then(res => {
|
|
|
- if (res.code === 0) {
|
|
|
- this.$message.success('解除成功!')
|
|
|
- this.getDetail()
|
|
|
- }
|
|
|
- })
|
|
|
+ if (this.form.id) {
|
|
|
+ relieve({
|
|
|
+ id: this.form.id,
|
|
|
+ podcastProgramIds: this.ids
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ this.$message.success('解除成功!')
|
|
|
+ this.getDetail()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.ids.map(i => {
|
|
|
+ this.form.adminPodCastProgramDetailResp.map((j, index) => {
|
|
|
+ if(j.id === i) {
|
|
|
+ this.form.adminPodCastProgramDetailResp.splice(index, 1)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
// 确定
|
|
@@ -342,7 +352,9 @@ export default {
|
|
|
// 多选
|
|
|
handleSelect(e) {
|
|
|
this.ids = []
|
|
|
- e.map(i => this.ids.push(i.id))
|
|
|
+ e.map(i => {
|
|
|
+ this.ids.push(i.id)
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
// 取消
|