|  | @ -139,7 +139,7 @@ | 
		
	
		
			
				|  |  |           <div class="mulit_btn" @click="multiSelectBtn">{{ mulitText }}</div> |  |  |           <div class="mulit_btn" @click="multiSelectBtn">{{ mulitText }}</div> | 
		
	
		
			
				|  |  |         </div> |  |  |         </div> | 
		
	
		
			
				|  |  |         <div slot="footer" class="dialog-footer"> |  |  |         <div slot="footer" class="dialog-footer"> | 
		
	
		
			
				|  |  |           <el-button type="primary" round>确 定</el-button> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           <el-button type="primary" round @click="uploadSelected()">确 定</el-button> | 
		
	
		
			
				|  |  |           <el-button round @click="cancelContSelect">取 消</el-button> |  |  |           <el-button round @click="cancelContSelect">取 消</el-button> | 
		
	
		
			
				|  |  |         </div> |  |  |         </div> | 
		
	
		
			
				|  |  |       </el-dialog> |  |  |       </el-dialog> | 
		
	
	
		
			
				|  | @ -191,7 +191,7 @@ | 
		
	
		
			
				|  |  |           </div> |  |  |           </div> | 
		
	
		
			
				|  |  |         </div> |  |  |         </div> | 
		
	
		
			
				|  |  |         <div slot="footer" class="dialog-footer"> |  |  |         <div slot="footer" class="dialog-footer"> | 
		
	
		
			
				|  |  |           <el-button type="primary" round @click="editMaterialSubmit()">保 存</el-button> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           <el-button type="primary" round @click="listEditVisible = false">保 存</el-button> | 
		
	
		
			
				|  |  |           <el-button round @click="listEditVisible = false">取 消</el-button> |  |  |           <el-button round @click="listEditVisible = false">取 消</el-button> | 
		
	
		
			
				|  |  |         </div> |  |  |         </div> | 
		
	
		
			
				|  |  |       </el-dialog> |  |  |       </el-dialog> | 
		
	
	
		
			
				|  | @ -382,7 +382,6 @@ export default { | 
		
	
		
			
				|  |  |       ], |  |  |       ], | 
		
	
		
			
				|  |  |       activeIndex: 0, |  |  |       activeIndex: 0, | 
		
	
		
			
				|  |  |       activeItemIndex: 0, |  |  |       activeItemIndex: 0, | 
		
	
		
			
				|  |  |       uploadContentIds: [] // 素材 / 主题库已选择的 |  |  |  | 
		
	
		
			
				|  |  |     } |  |  |     } | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   computed: { |  |  |   computed: { | 
		
	
	
		
			
				|  | @ -394,14 +393,17 @@ export default { | 
		
	
		
			
				|  |  |     } |  |  |     } | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   created () { |  |  |   created () { | 
		
	
		
			
				|  |  |  |  |  |     this.selectedMaterial = [] | 
		
	
		
			
				|  |  |     this.selectedMaterial = JSON.parse(localStorage.getItem('selectedMaterial')) |  |  |     this.selectedMaterial = JSON.parse(localStorage.getItem('selectedMaterial')) | 
		
	
		
			
				|  |  |     // 素材类型格式处理 |  |  |     // 素材类型格式处理 | 
		
	
		
			
				|  |  |  |  |  |     if (this.selectedMaterial.length != 0) { | 
		
	
		
			
				|  |  |       this.selectedMaterial.forEach((item, key) => { |  |  |       this.selectedMaterial.forEach((item, key) => { | 
		
	
		
			
				|  |  |         this.materialPostfix[key] = item.deposit_url.substring( |  |  |         this.materialPostfix[key] = item.deposit_url.substring( | 
		
	
		
			
				|  |  |           item.deposit_url.lastIndexOf('.') + 1, |  |  |           item.deposit_url.lastIndexOf('.') + 1, | 
		
	
		
			
				|  |  |           item.deposit_url.length |  |  |           item.deposit_url.length | 
		
	
		
			
				|  |  |         ) |  |  |         ) | 
		
	
		
			
				|  |  |       }) |  |  |       }) | 
		
	
		
			
				|  |  |  |  |  |     } | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   mounted () { |  |  |   mounted () { | 
		
	
		
			
				|  |  |     if (this.$route.path === '/release') { |  |  |     if (this.$route.path === '/release') { | 
		
	
	
		
			
				|  | @ -447,10 +449,6 @@ export default { | 
		
	
		
			
				|  |  |         this.form.release_start = arrDate[0] |  |  |         this.form.release_start = arrDate[0] | 
		
	
		
			
				|  |  |         this.form.release_end = arrDate[1] |  |  |         this.form.release_end = arrDate[1] | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |       console.log("看这里这里") |  |  |  | 
		
	
		
			
				|  |  |       console.log(this.selectedEditData) |  |  |  | 
		
	
		
			
				|  |  |       console.log(this.selectedMaterial) |  |  |  | 
		
	
		
			
				|  |  |       console.log("看这里这里") |  |  |  | 
		
	
		
			
				|  |  |       this.form.release_materialDTOs = this.selectedMaterial.map((item, index) => { |  |  |       this.form.release_materialDTOs = this.selectedMaterial.map((item, index) => { | 
		
	
		
			
				|  |  |         const json = {} |  |  |         const json = {} | 
		
	
		
			
				|  |  |         if (item.material_type == 0) { |  |  |         if (item.material_type == 0) { | 
		
	
	
		
			
				|  | @ -481,7 +479,7 @@ export default { | 
		
	
		
			
				|  |  |       saveRelease(this.form).then(res => { |  |  |       saveRelease(this.form).then(res => { | 
		
	
		
			
				|  |  |         if (res.code == 200) { |  |  |         if (res.code == 200) { | 
		
	
		
			
				|  |  |           this.$message.success('发布成功!') |  |  |           this.$message.success('发布成功!') | 
		
	
		
			
				|  |  |           // this.selectedMaterial = [] |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           localStorage.removeItem('selectedMaterial') | 
		
	
		
			
				|  |  |         } else { |  |  |         } else { | 
		
	
		
			
				|  |  |           this.$message.error(res.msg) |  |  |           this.$message.error(res.msg) | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
	
		
			
				|  | @ -565,6 +563,7 @@ export default { | 
		
	
		
			
				|  |  |       this.contentIds.splice(index, 1) |  |  |       this.contentIds.splice(index, 1) | 
		
	
		
			
				|  |  |       this.selectedEditData.splice(index, 1) |  |  |       this.selectedEditData.splice(index, 1) | 
		
	
		
			
				|  |  |       this.selectedMaterial.splice(i, 1) |  |  |       this.selectedMaterial.splice(i, 1) | 
		
	
		
			
				|  |  |  |  |  |       localStorage.setItem('selectedMaterial', JSON.stringify(this.selectedMaterial)) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 选中可编辑的 |  |  |     // 选中可编辑的 | 
		
	
		
			
				|  |  |     clickMaterialItem (id, item) { |  |  |     clickMaterialItem (id, item) { | 
		
	
	
		
			
				|  | @ -624,13 +623,16 @@ export default { | 
		
	
		
			
				|  |  |       if (this.audioChecked != -1) { |  |  |       if (this.audioChecked != -1) { | 
		
	
		
			
				|  |  |         const index = this.audioChecked |  |  |         const index = this.audioChecked | 
		
	
		
			
				|  |  |         if (!this.isMainBgm) { |  |  |         if (!this.isMainBgm) { | 
		
	
		
			
				|  |  |           this.selectedMaterial.find((item, key) => { |  |  |  | 
		
	
		
			
				|  |  |             if (item.material_type == 2) { |  |  |  | 
		
	
		
			
				|  |  |               this.selectedMaterial.splice(key, 1) |  |  |  | 
		
	
		
			
				|  |  |           this.audioListData[index].material_type = 2 |  |  |           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]) |  |  |             this.selectedMaterial.push(this.audioListData[index]) | 
		
	
		
			
				|  |  |  |  |  |           } else { | 
		
	
		
			
				|  |  |  |  |  |             this.selectedMaterial.splice(resultIndex, 1, this.audioListData[index]) | 
		
	
		
			
				|  |  |           } |  |  |           } | 
		
	
		
			
				|  |  |           }) |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           localStorage.setItem('selectedMaterial', JSON.stringify(this.selectedMaterial)) | 
		
	
		
			
				|  |  |         } else { |  |  |         } else { | 
		
	
		
			
				|  |  |           this.selectedEditData[this.thisEditIndex].showAudioName = this.audioListData[index].material_name |  |  |           this.selectedEditData[this.thisEditIndex].showAudioName = this.audioListData[index].material_name | 
		
	
		
			
				|  |  |           this.selectedEditData[this.thisEditIndex].showAudioUrl = this.audioListData[index].deposit_url |  |  |           this.selectedEditData[this.thisEditIndex].showAudioUrl = this.audioListData[index].deposit_url | 
		
	
	
		
			
				|  | @ -640,59 +642,61 @@ export default { | 
		
	
		
			
				|  |  |         this.selectedEditData[this.thisEditIndex].showAudioUrl = '' |  |  |         this.selectedEditData[this.thisEditIndex].showAudioUrl = '' | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |  |  |  |     // 时间设置-切换到每天时 | 
		
	
		
			
				|  |  |  |  |  |     clearCheckbox () { | 
		
	
		
			
				|  |  |  |  |  |       if (this.form.release_cycle == 2) { | 
		
	
		
			
				|  |  |  |  |  |         this.selectWeekly = [] | 
		
	
		
			
				|  |  |  |  |  |         this.form.release_weekly = [] | 
		
	
		
			
				|  |  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |  |     }, | 
		
	
		
			
				|  |  |     // 动画切换 |  |  |     // 动画切换 | 
		
	
		
			
				|  |  |     selectAnimation (event, item) { |  |  |     selectAnimation (event, item) { | 
		
	
		
			
				|  |  |       item.showAnimationName = event.name |  |  |       item.showAnimationName = event.name | 
		
	
		
			
				|  |  |       item.showAnimation = event.key |  |  |       item.showAnimation = event.key | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 提交 - 编辑素材 |  |  |  | 
		
	
		
			
				|  |  |     editMaterialSubmit () { |  |  |  | 
		
	
		
			
				|  |  |       this.listEditVisible = false |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     // 选择内容-素材库/主题库 tab | 
		
	
		
			
				|  |  |  |  |  |     tabAll (index) { | 
		
	
		
			
				|  |  |  |  |  |       this.activeIndex = index | 
		
	
		
			
				|  |  |  |  |  |       this.activeItemIndex = 0 | 
		
	
		
			
				|  |  |  |  |  |       this.isMultiSelected = false | 
		
	
		
			
				|  |  |  |  |  |       this.mulitText = '多选' | 
		
	
		
			
				|  |  |  |  |  |     }, | 
		
	
		
			
				|  |  |  |  |  |     tab (index) { | 
		
	
		
			
				|  |  |  |  |  |       this.activeItemIndex = index | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 多选btn |  |  |     // 多选btn | 
		
	
		
			
				|  |  |     multiSelectBtn (type) { |  |  |     multiSelectBtn (type) { | 
		
	
		
			
				|  |  |       this.isMultiSelected = !this.isMultiSelected |  |  |       this.isMultiSelected = !this.isMultiSelected | 
		
	
		
			
				|  |  |       if (this.isMultiSelected) { |  |  |       if (this.isMultiSelected) { | 
		
	
		
			
				|  |  |         this.mulitText = '取消' |  |  |         this.mulitText = '取消' | 
		
	
		
			
				|  |  |  |  |  |         // 已选择的内容中-list是否包含,包含即选中状态 | 
		
	
		
			
				|  |  |  |  |  |         this.selectedMaterial.forEach(item => { | 
		
	
		
			
				|  |  |  |  |  |           this.$refs.MaterialList.selectedListId.push(item.material_id) | 
		
	
		
			
				|  |  |  |  |  |           this.$refs.MaterialList.selectedMaterial.push(item) | 
		
	
		
			
				|  |  |  |  |  |         }) | 
		
	
		
			
				|  |  |       } else { |  |  |       } else { | 
		
	
		
			
				|  |  |         if (type == 'audio') { |  |  |         if (type == 'audio') { | 
		
	
		
			
				|  |  |           this.mulitText = '选择' |  |  |           this.mulitText = '选择' | 
		
	
		
			
				|  |  |           this.audioChecked = -1 |  |  |           this.audioChecked = -1 | 
		
	
		
			
				|  |  |         } else { |  |  |         } else { | 
		
	
		
			
				|  |  |           this.mulitText = '多选' |  |  |           this.mulitText = '多选' | 
		
	
		
			
				|  |  |           this.uploadContentIds = [] |  |  |  | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 多选选中 |  |  |  | 
		
	
		
			
				|  |  |     selectedListItem (id) { |  |  |  | 
		
	
		
			
				|  |  |       const arr = this.uploadContentIds |  |  |  | 
		
	
		
			
				|  |  |       if (arr.includes(id)) { |  |  |  | 
		
	
		
			
				|  |  |         const index = arr.indexOf(id) |  |  |  | 
		
	
		
			
				|  |  |         if (index > -1) { |  |  |  | 
		
	
		
			
				|  |  |           arr.splice(index, 1) |  |  |  | 
		
	
		
			
				|  |  |         } |  |  |  | 
		
	
		
			
				|  |  |       } else { |  |  |  | 
		
	
		
			
				|  |  |         this.uploadContentIds.push(id) |  |  |  | 
		
	
		
			
				|  |  |       } |  |  |  | 
		
	
		
			
				|  |  |     }, |  |  |  | 
		
	
		
			
				|  |  |     // 选择内容-素材库/主题库 tab |  |  |  | 
		
	
		
			
				|  |  |     tabAll (index) { |  |  |  | 
		
	
		
			
				|  |  |       this.activeIndex = index |  |  |  | 
		
	
		
			
				|  |  |       this.activeItemIndex = 0 |  |  |  | 
		
	
		
			
				|  |  |       this.isMultiSelected = false |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     // 素材选择 - 确认按钮 | 
		
	
		
			
				|  |  |  |  |  |     uploadSelected () { | 
		
	
		
			
				|  |  |  |  |  |       this.selectContVisible = false | 
		
	
		
			
				|  |  |  |  |  |       this.selectedMaterial = [] | 
		
	
		
			
				|  |  |  |  |  |       this.selectedMaterial = this.$refs.MaterialList.selectedMaterial | 
		
	
		
			
				|  |  |  |  |  |       // 素材类型格式处理 | 
		
	
		
			
				|  |  |  |  |  |       this.selectedMaterial.forEach((item, key) => { | 
		
	
		
			
				|  |  |  |  |  |         this.materialPostfix[key] = item.deposit_url.substring( | 
		
	
		
			
				|  |  |  |  |  |           item.deposit_url.lastIndexOf('.') + 1, | 
		
	
		
			
				|  |  |  |  |  |           item.deposit_url.length | 
		
	
		
			
				|  |  |  |  |  |         ) | 
		
	
		
			
				|  |  |  |  |  |       }) | 
		
	
		
			
				|  |  |  |  |  |       localStorage.setItem('selectedMaterial', JSON.stringify(this.selectedMaterial)) | 
		
	
		
			
				|  |  |       this.mulitText = '多选' |  |  |       this.mulitText = '多选' | 
		
	
		
			
				|  |  |       this.uploadContentIds = [] |  |  |  | 
		
	
		
			
				|  |  |     }, |  |  |  | 
		
	
		
			
				|  |  |     tab (index) { |  |  |  | 
		
	
		
			
				|  |  |       this.activeItemIndex = index |  |  |  | 
		
	
		
			
				|  |  |     }, |  |  |  | 
		
	
		
			
				|  |  |     // 时间设置-切换到每天时 |  |  |  | 
		
	
		
			
				|  |  |     clearCheckbox () { |  |  |  | 
		
	
		
			
				|  |  |       if (this.form.release_cycle == 2) { |  |  |  | 
		
	
		
			
				|  |  |         this.selectWeekly = [] |  |  |  | 
		
	
		
			
				|  |  |         this.form.release_weekly = [] |  |  |  | 
		
	
		
			
				|  |  |       } |  |  |  | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 素材选择 - 取消按钮 |  |  |     // 素材选择 - 取消按钮 | 
		
	
		
			
				|  |  |     cancelContSelect (type) { |  |  |     cancelContSelect (type) { | 
		
	
	
		
			
				|  | @ -702,7 +706,6 @@ export default { | 
		
	
		
			
				|  |  |       } else { |  |  |       } else { | 
		
	
		
			
				|  |  |         this.selectContVisible = false |  |  |         this.selectContVisible = false | 
		
	
		
			
				|  |  |         this.mulitText = '多选' |  |  |         this.mulitText = '多选' | 
		
	
		
			
				|  |  |         this.uploadContentIds = [] |  |  |  | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |     } |  |  |     } | 
		
	
		
			
				|  |  |   } |  |  |   } | 
		
	
	
		
			
				|  | 
 |