|  | @ -11,7 +11,7 @@ | 
		
	
		
			
				|  |  |       <div class="material_item cont_upload"> |  |  |       <div class="material_item cont_upload"> | 
		
	
		
			
				|  |  |         <Upload ref="uploadMaterial" @saveMaterial="saveMaterial" /> |  |  |         <Upload ref="uploadMaterial" @saveMaterial="saveMaterial" /> | 
		
	
		
			
				|  |  |         <el-button v-if="!isToFolder" class="mkdir_btn" round type="primary" @click="handleMkdir(0)">创建文件夹</el-button> |  |  |         <el-button v-if="!isToFolder" class="mkdir_btn" round type="primary" @click="handleMkdir(0)">创建文件夹</el-button> | 
		
	
		
			
				|  |  |         <el-button v-else class="mkdir_btn" round type="primary"><a href="/content">返回</a></el-button> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         <el-button v-else class="return_btn" round type="primary"><a href="/content">返回</a></el-button> | 
		
	
		
			
				|  |  |       </div> |  |  |       </div> | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |       <!-- 文件夹list --> |  |  |       <!-- 文件夹list --> | 
		
	
	
		
			
				|  | @ -38,7 +38,7 @@ | 
		
	
		
			
				|  |  |           <span v-if="item.material_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> | 
		
	
		
			
				|  |  |         <div class="file_name">{{ item.material_name }}</div> |  |  |         <div class="file_name">{{ item.material_name }}</div> | 
		
	
		
			
				|  |  |         <span v-if="isMultiSelected" class="checked_btn" @click="selectedItem(item.material_id, item.material_type)"></span> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         <span v-if="isMultiSelected" class="checked_btn" @click="selectedItem(item.material_id, item.in_folder_id, item.material_type)"></span> | 
		
	
		
			
				|  |  |       </div> |  |  |       </div> | 
		
	
		
			
				|  |  |     </div> |  |  |     </div> | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
	
		
			
				|  | @ -74,8 +74,8 @@ | 
		
	
		
			
				|  |  |     </div> |  |  |     </div> | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |     <!-- 多选操作 --> |  |  |     <!-- 多选操作 --> | 
		
	
		
			
				|  |  |     <div v-if="selectedList.length !== 0 || folderChecked != -1" class="multi_handle"> |  |  |  | 
		
	
		
			
				|  |  |       <div v-if="isEditFolder != true"> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     <div v-if="selectedList.length != 0 || folderChecked != -1" class="multi_handle"> | 
		
	
		
			
				|  |  |  |  |  |       <div v-if="isEditFolder != true && folderChecked == -1 && isMultiSelected"> | 
		
	
		
			
				|  |  |         <el-button type="button" class="mulit_btn" @click="publishHandle(0)">即时发布</el-button> |  |  |         <el-button type="button" class="mulit_btn" @click="publishHandle(0)">即时发布</el-button> | 
		
	
		
			
				|  |  |         <el-button type="button" class="mulit_btn" @click="publishHandle(1)">定时发布</el-button> |  |  |         <el-button type="button" class="mulit_btn" @click="publishHandle(1)">定时发布</el-button> | 
		
	
		
			
				|  |  |         <el-button |  |  |         <el-button | 
		
	
	
		
			
				|  | @ -85,7 +85,7 @@ | 
		
	
		
			
				|  |  |           @click="editContent()" |  |  |           @click="editContent()" | 
		
	
		
			
				|  |  |         >编辑</el-button> |  |  |         >编辑</el-button> | 
		
	
		
			
				|  |  |         <el-button type="button" class="mulit_btn">下载</el-button> |  |  |         <el-button type="button" class="mulit_btn">下载</el-button> | 
		
	
		
			
				|  |  |         <el-button v-if="!isToFolder" type="button" class="mulit_btn" @click="moveingTo()">移动</el-button> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         <el-button type="button" class="mulit_btn" @click="moveingTo()">移动</el-button> | 
		
	
		
			
				|  |  |         <el-button type="button" class="mulit_btn mulit_delt_btn" @click="deleteMyMaterial">删除</el-button> |  |  |         <el-button type="button" class="mulit_btn mulit_delt_btn" @click="deleteMyMaterial">删除</el-button> | 
		
	
		
			
				|  |  |       </div> |  |  |       </div> | 
		
	
		
			
				|  |  |       <div v-else> |  |  |       <div v-else> | 
		
	
	
		
			
				|  | @ -96,7 +96,6 @@ | 
		
	
		
			
				|  |  |         >编辑</el-button> |  |  |         >编辑</el-button> | 
		
	
		
			
				|  |  |         <el-button type="button" class="mulit_btn mulit_delt_btn" @click="deleteMaterialFolder">删除</el-button> |  |  |         <el-button type="button" class="mulit_btn mulit_delt_btn" @click="deleteMaterialFolder">删除</el-button> | 
		
	
		
			
				|  |  |       </div> |  |  |       </div> | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  |     </div> |  |  |     </div> | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |     <!-- 移动至layer --> |  |  |     <!-- 移动至layer --> | 
		
	
	
		
			
				|  | @ -112,7 +111,7 @@ | 
		
	
		
			
				|  |  |       > |  |  |       > | 
		
	
		
			
				|  |  |         <div class="wjj_list"> |  |  |         <div class="wjj_list"> | 
		
	
		
			
				|  |  |           <div |  |  |           <div | 
		
	
		
			
				|  |  |             v-for="(item, index) in materialFolders" |  |  |  | 
		
	
		
			
				|  |  |  |  |  |             v-for="(item, index) in folderList" | 
		
	
		
			
				|  |  |             :key="index" |  |  |             :key="index" | 
		
	
		
			
				|  |  |             :class="['wjj_item', { 'wjj_item_active': folderListChecked == index }]" |  |  |             :class="['wjj_item', { 'wjj_item_active': folderListChecked == index }]" | 
		
	
		
			
				|  |  |             @click="wjjSelected(item,index)" |  |  |             @click="wjjSelected(item,index)" | 
		
	
	
		
			
				|  | @ -149,18 +148,15 @@ export default { | 
		
	
		
			
				|  |  |     isMultiSelected: { |  |  |     isMultiSelected: { | 
		
	
		
			
				|  |  |       type: Boolean, |  |  |       type: Boolean, | 
		
	
		
			
				|  |  |       required: true |  |  |       required: true | 
		
	
		
			
				|  |  |     }, |  |  |  | 
		
	
		
			
				|  |  |     mulitText: { |  |  |  | 
		
	
		
			
				|  |  |       type: String, |  |  |  | 
		
	
		
			
				|  |  |       required: true |  |  |  | 
		
	
		
			
				|  |  |     } |  |  |     } | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   data() { |  |  |   data() { | 
		
	
		
			
				|  |  |     return { |  |  |     return { | 
		
	
		
			
				|  |  |       orga_id: '133221333123111', // 机构ID |  |  |       orga_id: '133221333123111', // 机构ID | 
		
	
		
			
				|  |  |  |  |  |       rootFolderId: null, // 根目录文件夹ID | 
		
	
		
			
				|  |  |       thisFoldId: null, // 当前父文件夹ID |  |  |       thisFoldId: null, // 当前父文件夹ID | 
		
	
		
			
				|  |  |  |  |  |       folderList: [], // 文件夹list | 
		
	
		
			
				|  |  |       materialFolders: [], // 文件夹list |  |  |       materialFolders: [], // 文件夹list | 
		
	
		
			
				|  |  |       materialList: [], // 素材库list |  |  |  | 
		
	
		
			
				|  |  |       folderForm: { // form |  |  |       folderForm: { // form | 
		
	
		
			
				|  |  |         fid: '', |  |  |         fid: '', | 
		
	
		
			
				|  |  |         id: '', |  |  |         id: '', | 
		
	
	
		
			
				|  | @ -171,6 +167,8 @@ export default { | 
		
	
		
			
				|  |  |       isEditFolder: false, // 是否编辑文件夹 |  |  |       isEditFolder: false, // 是否编辑文件夹 | 
		
	
		
			
				|  |  |       mkdirVisible: false, // 新建编辑layer |  |  |       mkdirVisible: false, // 新建编辑layer | 
		
	
		
			
				|  |  |       folderChecked: -1, // 文件夹是否单击选中 |  |  |       folderChecked: -1, // 文件夹是否单击选中 | 
		
	
		
			
				|  |  |  |  |  |       materialList: [], // 素材库list | 
		
	
		
			
				|  |  |  |  |  |       isPropMultiSelected: this.isMultiSelected, | 
		
	
		
			
				|  |  |       isEditMaterial: false, // 是否是编辑素材 |  |  |       isEditMaterial: false, // 是否是编辑素材 | 
		
	
		
			
				|  |  |       formatType: null, // 上传素材类型 0 img 1 video 2 audio |  |  |       formatType: null, // 上传素材类型 0 img 1 video 2 audio | 
		
	
		
			
				|  |  |       materialId: null, // 编辑时需要参数 id |  |  |       materialId: null, // 编辑时需要参数 id | 
		
	
	
		
			
				|  | @ -179,7 +177,8 @@ export default { | 
		
	
		
			
				|  |  |       materialDuration: 0, // 时长 |  |  |       materialDuration: 0, // 时长 | 
		
	
		
			
				|  |  |       materialName: '', // 素材名称 |  |  |       materialName: '', // 素材名称 | 
		
	
		
			
				|  |  |       uploadFileUrl: null, // 素材保存路径 |  |  |       uploadFileUrl: null, // 素材保存路径 | 
		
	
		
			
				|  |  |       selectedList: [], // 素材选中的 |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       selectedList: [], // 素材选中的material_id | 
		
	
		
			
				|  |  |  |  |  |       selectinFolderid: [], // 素材选中的和文件关联表id -- in_folder_id | 
		
	
		
			
				|  |  |       layerTitle: '创建文件夹', // 文件夹/素材编辑框title |  |  |       layerTitle: '创建文件夹', // 文件夹/素材编辑框title | 
		
	
		
			
				|  |  |       labelTxt: '文件夹名称', |  |  |       labelTxt: '文件夹名称', | 
		
	
		
			
				|  |  |       isToFolder: false, // 是否进入文件夹 |  |  |       isToFolder: false, // 是否进入文件夹 | 
		
	
	
		
			
				|  | @ -200,9 +199,11 @@ export default { | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   watch: { |  |  |   watch: { | 
		
	
		
			
				|  |  |     isMultiSelected(newName, oldName) { |  |  |     isMultiSelected(newName, oldName) { | 
		
	
		
			
				|  |  |  |  |  |       console.log('newName', newName) | 
		
	
		
			
				|  |  |       if (newName === false) { |  |  |       if (newName === false) { | 
		
	
		
			
				|  |  |         this.selectedList = [] |  |  |         this.selectedList = [] | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |  |  |  |       this.isPropMultiSelected = newName | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     '$route.query.folderTag'(Val) { |  |  |     '$route.query.folderTag'(Val) { | 
		
	
		
			
				|  |  |       console.log(Val) |  |  |       console.log(Val) | 
		
	
	
		
			
				|  | @ -246,6 +247,9 @@ export default { | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |       getMaterialList(params).then(res => { |  |  |       getMaterialList(params).then(res => { | 
		
	
		
			
				|  |  |  |  |  |         if (!this.$route.query.folderTag) { | 
		
	
		
			
				|  |  |  |  |  |           localStorage.setItem('rootFolderId', res.data.thisFoldId) | 
		
	
		
			
				|  |  |  |  |  |         } | 
		
	
		
			
				|  |  |         this.materialFolders = res.data.materialFolders |  |  |         this.materialFolders = res.data.materialFolders | 
		
	
		
			
				|  |  |         this.materialList = res.data.pageThemeVO |  |  |         this.materialList = res.data.pageThemeVO | 
		
	
		
			
				|  |  |         // 创建文件夹获取data |  |  |         // 创建文件夹获取data | 
		
	
	
		
			
				|  | @ -281,7 +285,7 @@ export default { | 
		
	
		
			
				|  |  |     // 文件夹双击操作 |  |  |     // 文件夹双击操作 | 
		
	
		
			
				|  |  |     floderDbClick(item, index) { |  |  |     floderDbClick(item, index) { | 
		
	
		
			
				|  |  |       this.isEditMaterial = false |  |  |       this.isEditMaterial = false | 
		
	
		
			
				|  |  |       this.$router.push( |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.$router.replace( | 
		
	
		
			
				|  |  |         { |  |  |         { | 
		
	
		
			
				|  |  |           path: '/content', query: { folderTag: 1 } |  |  |           path: '/content', query: { folderTag: 1 } | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
	
		
			
				|  | @ -291,15 +295,22 @@ export default { | 
		
	
		
			
				|  |  |       localStorage.setItem('currentFolder', this.currentFolder) |  |  |       localStorage.setItem('currentFolder', this.currentFolder) | 
		
	
		
			
				|  |  |       localStorage.setItem('currentFolderId', this.currentFolderId) |  |  |       localStorage.setItem('currentFolderId', this.currentFolderId) | 
		
	
		
			
				|  |  |       this.getMaterialList() |  |  |       this.getMaterialList() | 
		
	
		
			
				|  |  |  |  |  |       this.selectedList = [] | 
		
	
		
			
				|  |  |  |  |  |       this.folderChecked = -1 | 
		
	
		
			
				|  |  |  |  |  |       this.isEditFolder = false | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 点击其他区域选中的文件夹 去掉选中样式 |  |  |     // 点击其他区域选中的文件夹 去掉选中样式 | 
		
	
		
			
				|  |  |     hiddenFolderActiveClick() { |  |  |     hiddenFolderActiveClick() { | 
		
	
		
			
				|  |  |       this.folderChecked = -1 |  |  |       this.folderChecked = -1 | 
		
	
		
			
				|  |  |  |  |  |       this.isEditFolder = false | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 选择 编辑 文件夹 |  |  |     // 选择 编辑 文件夹 | 
		
	
		
			
				|  |  |     editFolder(item, index) { |  |  |     editFolder(item, index) { | 
		
	
		
			
				|  |  |       this.isEditMaterial = false |  |  |       this.isEditMaterial = false | 
		
	
		
			
				|  |  |       if (index !== this.folderChecked) { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.selectedList = [] | 
		
	
		
			
				|  |  |  |  |  |       // 有选择中的文件夹时,同时存在素材多选操作时 | 
		
	
		
			
				|  |  |  |  |  |       this.$emit('changedMultiSelected') | 
		
	
		
			
				|  |  |  |  |  |       if (index != this.folderChecked) { | 
		
	
		
			
				|  |  |         this.folderChecked = index |  |  |         this.folderChecked = index | 
		
	
		
			
				|  |  |         this.isEditFolder = true |  |  |         this.isEditFolder = true | 
		
	
		
			
				|  |  |         this.folderForm = { |  |  |         this.folderForm = { | 
		
	
	
		
			
				|  | @ -471,18 +482,17 @@ export default { | 
		
	
		
			
				|  |  |       }, 200) |  |  |       }, 200) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 素材 - 多选 |  |  |     // 素材 - 多选 | 
		
	
		
			
				|  |  |     selectedItem(id, type) { |  |  |  | 
		
	
		
			
				|  |  |       console.log(id) |  |  |  | 
		
	
		
			
				|  |  |       console.log(type) |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     selectedItem(id, inFolderId, type) { | 
		
	
		
			
				|  |  |       const arr = this.selectedList |  |  |       const arr = this.selectedList | 
		
	
		
			
				|  |  |       if (arr.includes(id)) { |  |  |       if (arr.includes(id)) { | 
		
	
		
			
				|  |  |         const index = arr.indexOf(id) |  |  |         const index = arr.indexOf(id) | 
		
	
		
			
				|  |  |         console.log(index) |  |  |  | 
		
	
		
			
				|  |  |         if (index > -1) { |  |  |         if (index > -1) { | 
		
	
		
			
				|  |  |           arr.splice(index, 1) |  |  |           arr.splice(index, 1) | 
		
	
		
			
				|  |  |  |  |  |           this.selectinFolderid.splice(index, 1) | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |       } else { |  |  |       } else { | 
		
	
		
			
				|  |  |         this.selectedList.push(id) |  |  |         this.selectedList.push(id) | 
		
	
		
			
				|  |  |  |  |  |         this.selectinFolderid.push(inFolderId) | 
		
	
		
			
				|  |  |         this.formatType = type |  |  |         this.formatType = type | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
	
		
			
				|  | @ -518,21 +528,41 @@ export default { | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 点击-移动btn |  |  |     // 点击-移动btn | 
		
	
		
			
				|  |  |     moveingTo(index) { |  |  |     moveingTo(index) { | 
		
	
		
			
				|  |  |  |  |  |       this.folderList = [] | 
		
	
		
			
				|  |  |  |  |  |       if (this.materialFolders.length > 0) { | 
		
	
		
			
				|  |  |  |  |  |         this.folderList = this.materialFolders.slice(0, this.materialFolders.length) | 
		
	
		
			
				|  |  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |  |       this.rootFolderId = localStorage.getItem('rootFolderId') | 
		
	
		
			
				|  |  |  |  |  |       const returnFolder = { | 
		
	
		
			
				|  |  |  |  |  |         id: this.rootFolderId, | 
		
	
		
			
				|  |  |  |  |  |         name: '返回上一级' | 
		
	
		
			
				|  |  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |  |       this.folderList.unshift(returnFolder) | 
		
	
		
			
				|  |  |       this.movingVisible = true |  |  |       this.movingVisible = true | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 文件夹list - 选中操作 |  |  |     // 文件夹list - 选中操作 | 
		
	
		
			
				|  |  |     wjjSelected(item, index) { |  |  |     wjjSelected(item, index) { | 
		
	
		
			
				|  |  |       console.log(item) |  |  |  | 
		
	
		
			
				|  |  |       this.folderListChecked = index |  |  |       this.folderListChecked = index | 
		
	
		
			
				|  |  |       this.thisFoldId = item.id |  |  |       this.thisFoldId = item.id | 
		
	
		
			
				|  |  |       console.log(this.folderListChecked) |  |  |  | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 点击确定 - 移动素材 |  |  |     // 点击确定 - 移动素材 | 
		
	
		
			
				|  |  |     moveFile() { |  |  |     moveFile() { | 
		
	
		
			
				|  |  |  |  |  |       if (this.materialFolders.length > 0) { | 
		
	
		
			
				|  |  |  |  |  |         console.log(this.materialFolders) | 
		
	
		
			
				|  |  |  |  |  |         if (this.thisFoldId == this.rootFolderId) { | 
		
	
		
			
				|  |  |  |  |  |           this.$message({ | 
		
	
		
			
				|  |  |  |  |  |             message: '不能讲文件移动到自身目录下哦~', | 
		
	
		
			
				|  |  |  |  |  |             type: 'error' | 
		
	
		
			
				|  |  |  |  |  |           }) | 
		
	
		
			
				|  |  |  |  |  |           return | 
		
	
		
			
				|  |  |  |  |  |         } | 
		
	
		
			
				|  |  |  |  |  |       } else { | 
		
	
		
			
				|  |  |  |  |  |         this.thisFoldId = this.rootFolderId | 
		
	
		
			
				|  |  |  |  |  |       } | 
		
	
		
			
				|  |  |       const params = { |  |  |       const params = { | 
		
	
		
			
				|  |  |         'folder_id': this.thisFoldId, |  |  |         'folder_id': this.thisFoldId, | 
		
	
		
			
				|  |  |         'ids': this.selectedList, |  |  |  | 
		
	
		
			
				|  |  |         'material_id': null |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         'ids': this.selectinFolderid, | 
		
	
		
			
				|  |  |  |  |  |         'material_ids': this.selectedList | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |       moveMyMaterial(params).then(res => { |  |  |       moveMyMaterial(params).then(res => { | 
		
	
		
			
				|  |  |         if (res.code === 200) { |  |  |         if (res.code === 200) { | 
		
	
	
		
			
				|  | @ -541,6 +571,8 @@ export default { | 
		
	
		
			
				|  |  |             type: 'success' |  |  |             type: 'success' | 
		
	
		
			
				|  |  |           }) |  |  |           }) | 
		
	
		
			
				|  |  |           this.movingVisible = false |  |  |           this.movingVisible = false | 
		
	
		
			
				|  |  |  |  |  |           this.getMaterialList() | 
		
	
		
			
				|  |  |  |  |  |           this.selectedList = [] | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |       }) |  |  |       }) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
	
		
			
				|  | 
 |