|  |  | @ -78,7 +78,7 @@ | 
			
		
	
		
			
				
					|  |  |  |                 <div v-if="!item.img_path && item.material_type == 2" class="radio_img"></div> | 
			
		
	
		
			
				
					|  |  |  |                 <div class="item_format"> | 
			
		
	
		
			
				
					|  |  |  |                   <span class="item_type">{{ item.deposit_url | getFileFormat }}</span> | 
			
		
	
		
			
				
					|  |  |  |                   <span v-if="item.material_type != '0' || item.type != '0'" class="item_time">{{ item.duration | getSeconds }}</span> | 
			
		
	
		
			
				
					|  |  |  |                   <span v-if="item.material_type != '0'" class="item_time">{{ item.duration | getSeconds }}</span> | 
			
		
	
		
			
				
					|  |  |  |                 </div> | 
			
		
	
		
			
				
					|  |  |  |                 <div class="file_name">{{ item.material_name || item.name }}</div> | 
			
		
	
		
			
				
					|  |  |  |                 <div v-if="contentIds.includes(item.material_id)" class="select_handle"> | 
			
		
	
	
		
			
				
					|  |  | @ -465,6 +465,15 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |           FetchFindMaterialById(params).then(res => { | 
			
		
	
		
			
				
					|  |  |  |             if (res.code == 200) { | 
			
		
	
		
			
				
					|  |  |  |               this.selectedMaterial = res.data | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |               this.selectedMaterial.filter((item, index) => { | 
			
		
	
		
			
				
					|  |  |  |                 this.isEditMaterial.some(items => { | 
			
		
	
		
			
				
					|  |  |  |                   if (item.material_id == items.material_id) { | 
			
		
	
		
			
				
					|  |  |  |                     item.ranking = items.ranking | 
			
		
	
		
			
				
					|  |  |  |                   } | 
			
		
	
		
			
				
					|  |  |  |                 }) | 
			
		
	
		
			
				
					|  |  |  |               }) | 
			
		
	
		
			
				
					|  |  |  |               this.selectedMaterial.sort(this.compare('ranking')) | 
			
		
	
		
			
				
					|  |  |  |               // 获取图片设置的animation | 
			
		
	
		
			
				
					|  |  |  |               this.selectedMaterial.forEach((item, index) => { | 
			
		
	
		
			
				
					|  |  |  |                 if (item.material_type == 0) { | 
			
		
	
	
		
			
				
					|  |  | @ -485,6 +494,13 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     compare(attr) { | 
			
		
	
		
			
				
					|  |  |  |       return function(a, b) { | 
			
		
	
		
			
				
					|  |  |  |         var val1 = a[attr] | 
			
		
	
		
			
				
					|  |  |  |         var val2 = b[attr] | 
			
		
	
		
			
				
					|  |  |  |         return val1 - val2 | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 发布提交 | 
			
		
	
		
			
				
					|  |  |  |     releaseSubmit(formName) { | 
			
		
	
		
			
				
					|  |  |  |       this.$refs[formName].validate((valid) => { | 
			
		
	
	
		
			
				
					|  |  | @ -553,7 +569,6 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |               json.material_name = item.material_name | 
			
		
	
		
			
				
					|  |  |  |               json.img_path = item.img_path | 
			
		
	
		
			
				
					|  |  |  |               json.file_size = item.file_size | 
			
		
	
		
			
				
					|  |  |  |               console.log(item) | 
			
		
	
		
			
				
					|  |  |  |               if (this.release_id) { | 
			
		
	
		
			
				
					|  |  |  |                 if (this.isEditMaterial.length != 0) { | 
			
		
	
		
			
				
					|  |  |  |                   if (!item.create_time || (!item.classes && item.material_type == 2)) { | 
			
		
	
	
		
			
				
					|  |  | @ -670,7 +685,6 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |       this.contentIds.splice(index, 1) | 
			
		
	
		
			
				
					|  |  |  |       this.selectedEditData.splice(index, 1) | 
			
		
	
		
			
				
					|  |  |  |       this.selectedMaterial.splice(i, 1) | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |       // 编辑的情况下 | 
			
		
	
		
			
				
					|  |  |  |       if (this.release_id) { | 
			
		
	
		
			
				
					|  |  |  |         this.isEditMaterial.find(item => { | 
			
		
	
	
		
			
				
					|  |  | @ -679,7 +693,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |       // localStorage.setItem('selectedMaterial', JSON.stringify(this.selectedMaterial)) | 
			
		
	
		
			
				
					|  |  |  |       localStorage.setItem('selectedMaterial', JSON.stringify(this.selectedMaterial)) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 选中可编辑的 | 
			
		
	
		
			
				
					|  |  |  |     clickMaterialItem(id, item) { | 
			
		
	
	
		
			
				
					|  |  | @ -698,16 +712,16 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |     // 编辑-已选择的 | 
			
		
	
		
			
				
					|  |  |  |     selectEdit() { | 
			
		
	
		
			
				
					|  |  |  |       this.listEditVisible = true | 
			
		
	
		
			
				
					|  |  |  |       // const form = { | 
			
		
	
		
			
				
					|  |  |  |       //   showTime: '15', | 
			
		
	
		
			
				
					|  |  |  |       //   showAnimation: '', | 
			
		
	
		
			
				
					|  |  |  |       //   showAnimationName: '' | 
			
		
	
		
			
				
					|  |  |  |       // } | 
			
		
	
		
			
				
					|  |  |  |       // this.selectedEditData.map((item, index) => { | 
			
		
	
		
			
				
					|  |  |  |       //   if (item.material_type == 0) { | 
			
		
	
		
			
				
					|  |  |  |       //     this.setMaterialForm.push(form) | 
			
		
	
		
			
				
					|  |  |  |       //   } | 
			
		
	
		
			
				
					|  |  |  |       // }) | 
			
		
	
		
			
				
					|  |  |  |       const form = { | 
			
		
	
		
			
				
					|  |  |  |         showTime: '15', | 
			
		
	
		
			
				
					|  |  |  |         showAnimation: '', | 
			
		
	
		
			
				
					|  |  |  |         showAnimationName: '' | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |       this.selectedEditData.map((item, index) => { | 
			
		
	
		
			
				
					|  |  |  |         if (item.material_type == 0) { | 
			
		
	
		
			
				
					|  |  |  |           this.setMaterialForm.push(form) | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     dragEnd() { | 
			
		
	
		
			
				
					|  |  |  |       // console.log(this.selectedEditData) | 
			
		
	
	
		
			
				
					|  |  | @ -747,8 +761,25 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |             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) | 
			
		
	
		
			
				
					|  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |           // localStorage.setItem('selectedMaterial', JSON.stringify(this.selectedMaterial)) | 
			
		
	
		
			
				
					|  |  |  |               }) | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |           localStorage.setItem('selectedMaterial', JSON.stringify(this.selectedMaterial)) | 
			
		
	
		
			
				
					|  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |           this.selectedEditData[this.thisEditIndex].showAudioName = this.audioListData[index].material_name | 
			
		
	
		
			
				
					|  |  |  |           this.selectedEditData[this.thisEditIndex].showAudioUrl = this.audioListData[index].deposit_url | 
			
		
	
	
		
			
				
					|  |  | @ -810,6 +841,23 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |       this.selectContVisible = false | 
			
		
	
		
			
				
					|  |  |  |       this.selectedMaterial = [] | 
			
		
	
		
			
				
					|  |  |  |       this.selectedMaterial = this.$refs.MaterialList.selectedMaterial | 
			
		
	
		
			
				
					|  |  |  |       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) | 
			
		
	
		
			
				
					|  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |       // localStorage.setItem('selectedMaterial', JSON.stringify(this.selectedMaterial)) | 
			
		
	
		
			
				
					|  |  |  |       this.mulitText = '多选' | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
	
		
			
				
					|  |  | 
 |