|
|
@ -305,6 +305,7 @@ export default { |
|
|
|
is_topping: false, // 是否置顶, |
|
|
|
orga_id: '', // "机构id" |
|
|
|
bgm_main: '', |
|
|
|
bgm_name: '', |
|
|
|
relaase_name: '', // 发布名称 |
|
|
|
release_cycle: '', // 发布周期 0.无 1.每天 2.每周 |
|
|
|
release_weekly: '', // 发布每周 如果设置为每天则为空 |
|
|
@ -338,6 +339,10 @@ export default { |
|
|
|
], |
|
|
|
selectWeekly: [], |
|
|
|
weeklyList: [ |
|
|
|
{ |
|
|
|
id: '0', |
|
|
|
name: '周日' |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: '1', |
|
|
|
name: '周一' |
|
|
@ -361,10 +366,6 @@ export default { |
|
|
|
{ |
|
|
|
id: '6', |
|
|
|
name: '周六' |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: '7', |
|
|
|
name: '周七' |
|
|
|
} |
|
|
|
], |
|
|
|
materialTabItem: [ // 素材库 - tab切换title |
|
|
@ -433,6 +434,7 @@ export default { |
|
|
|
if (res.code == 200) { |
|
|
|
const releaseInfo = res.data.release |
|
|
|
this.releaseInfo = releaseInfo |
|
|
|
console.log(releaseInfo) |
|
|
|
this.form.orga_id = releaseInfo.orga_id |
|
|
|
this.form.relaase_name = releaseInfo.relaase_name |
|
|
|
this.form.release_cycle = releaseInfo.release_cycle |
|
|
@ -590,10 +592,14 @@ export default { |
|
|
|
const isBgm = this.selectedMaterial.find(item => { |
|
|
|
return item.material_type == 2 |
|
|
|
}) |
|
|
|
console.log('有啊') |
|
|
|
console.log(isBgm) |
|
|
|
if (isBgm) { |
|
|
|
this.form.bgm_name = isBgm.name |
|
|
|
this.form.bgm_main = isBgm.deposit_url |
|
|
|
} else { |
|
|
|
this.form.bgm_main = null |
|
|
|
this.form.bgm_name = null |
|
|
|
} |
|
|
|
console.log(this.form) |
|
|
|
// 保存提交 |
|
|
@ -756,30 +762,36 @@ export default { |
|
|
|
const index = this.audioChecked |
|
|
|
if (!this.isMainBgm) { |
|
|
|
this.audioListData[index].material_type = 2 |
|
|
|
const resultIndex = this.selectedMaterial.findIndex((item, key) => { |
|
|
|
return item.material_type == 2 |
|
|
|
}) |
|
|
|
if (resultIndex == -1) { |
|
|
|
this.selectedMaterial.push(this.audioListData[index]) |
|
|
|
} else { |
|
|
|
this.selectedMaterial.splice(resultIndex, 1, this.audioListData[index]) |
|
|
|
if (this.release_id) { |
|
|
|
// 非编辑或者无选中得内容得情况下得,选择音频 |
|
|
|
if (this.selectedMaterial) { |
|
|
|
const resultIndex = this.selectedMaterial.findIndex((item, key) => { |
|
|
|
return item.material_type == 2 |
|
|
|
}) |
|
|
|
if (resultIndex == -1) { |
|
|
|
this.selectedMaterial.push(this.audioListData[index]) |
|
|
|
} else { |
|
|
|
this.selectedMaterial.splice(resultIndex, 1, this.audioListData[index]) |
|
|
|
if (this.release_id) { |
|
|
|
// 编辑情况下 - 上传选择素材时,取消某一项选中状态-即删除该素材 |
|
|
|
const editMaterialId = [] |
|
|
|
this.isEditMaterial.map(item => { |
|
|
|
editMaterialId.push(item.material_id) |
|
|
|
}) |
|
|
|
const selectedMaterialId = [] |
|
|
|
this.selectedMaterial.map(item => { |
|
|
|
selectedMaterialId.push(item.material_id) |
|
|
|
}) |
|
|
|
const newArr = editMaterialId.filter(item => selectedMaterialId.indexOf(item) == -1) |
|
|
|
this.isEditMaterial.filter(item => { |
|
|
|
if (newArr.indexOf(item.material_id) != -1) { |
|
|
|
this.form.del_rmids.push(item.id) |
|
|
|
} |
|
|
|
}) |
|
|
|
const editMaterialId = [] |
|
|
|
this.isEditMaterial.map(item => { |
|
|
|
editMaterialId.push(item.material_id) |
|
|
|
}) |
|
|
|
const selectedMaterialId = [] |
|
|
|
this.selectedMaterial.map(item => { |
|
|
|
selectedMaterialId.push(item.material_id) |
|
|
|
}) |
|
|
|
const newArr = editMaterialId.filter(item => selectedMaterialId.indexOf(item) == -1) |
|
|
|
this.isEditMaterial.filter(item => { |
|
|
|
if (newArr.indexOf(item.material_id) != -1) { |
|
|
|
this.form.del_rmids.push(item.id) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.selectedMaterial = [] |
|
|
|
this.selectedMaterial.push(this.audioListData[index]) |
|
|
|
} |
|
|
|
// localStorage.setItem('selectedMaterial', JSON.stringify(this.selectedMaterial)) |
|
|
|
} else { |
|
|
|