@@ -242,6 +247,11 @@ export default {
document.addEventListener('click', this.hiddenFolderActiveClick)
},
methods: {
+ breadcrumbToMaterial() {
+ this.$router.push('/content/material')
+ this.isToFolder = false
+ this.getMaterialList()
+ },
// 素材下载
downloadMaterial() {
// console.log(this.selectedMaterial[0])
@@ -270,8 +280,15 @@ export default {
},
// 获取素材库list
getMaterialList() {
+ this.materialFolders = []
+ this.materialList = []
let params
- if (this.$route.query.folderTag) {
+ if (this.$route.query.folderTag || this.isToFolder) {
+ if (this.isReturn) {
+ this.currentFolderId = this.rootFolderId
+ } else {
+ this.currentFolderId = localStorage.getItem('currentFolderId')
+ }
this.isToFolder = true
this.currentFolder = localStorage.getItem('currentFolder')
this.currentFolderId = localStorage.getItem('currentFolderId')
@@ -327,12 +344,17 @@ export default {
},
// 文件夹双击操作
floderDbClick(item, index) {
- this.isEditMaterial = false
- this.$router.replace(
- {
- path: '/content/material', query: { folderTag: 1 }
- }
- )
+ this.isEditFolder = false
+ if (!this.isPublishLayer) {
+ this.isEditMaterial = false
+ this.$router.replace(
+ {
+ path: '/content/material', query: { folderTag: 1 }
+ }
+ )
+ } else {
+ this.isToFolder = true
+ }
this.currentFolder = item.name
this.currentFolderId = item.id
localStorage.setItem('currentFolder', this.currentFolder)
@@ -340,7 +362,6 @@ export default {
this.getMaterialList()
this.selectedListId = []
this.folderChecked = -1
- this.isEditFolder = false
},
// 点击其他区域选中的文件夹 去掉选中样式
hiddenFolderActiveClick() {
@@ -349,23 +370,25 @@ export default {
},
// 选择 编辑 文件夹
editFolder(item, index) {
- this.isEditMaterial = false
- this.selectedListId = []
- // 有选择中的文件夹时,同时存在素材多选操作时
- this.$emit('changedMultiSelected')
- if (index != this.folderChecked) {
- this.folderChecked = index
- this.isEditFolder = true
- this.folderForm = {
- fid: item.fid,
- id: item.id,
- name: item.name,
- img_path: item.imgPath,
- orga_id: item.orgaId
+ if (!this.isPublishLayer) {
+ this.isEditMaterial = false
+ this.selectedListId = []
+ // 有选择中的文件夹时,同时存在素材多选操作时
+ this.$emit('changedMultiSelected')
+ if (index != this.folderChecked) {
+ this.folderChecked = index
+ this.isEditFolder = true
+ this.folderForm = {
+ fid: item.fid,
+ id: item.id,
+ name: item.name,
+ img_path: item.imgPath,
+ orga_id: item.orgaId
+ }
+ } else {
+ this.folderChecked = -1
+ this.isEditFolder = false
}
- } else {
- this.folderChecked = -1
- this.isEditFolder = false
}
},
// 删除 文件夹
@@ -396,6 +419,13 @@ export default {
})
})
},
+ // 发布- 素材库layer - 返回
+ returnFolder() {
+ this.isReturn = false
+ this.isToFolder = false
+ this.rootFolderId = localStorage.getItem('rootFolderId')
+ this.getMaterialList()
+ },
// 提交表单 - 新建/编辑
submitForm(formName) {
this.folderForm.img_path = this.$refs.childUpload.imageUrl
diff --git a/src/views/dashboard/HomeThemeGallery.vue b/src/views/dashboard/HomeThemeGallery.vue
index 38c3ab6..a068280 100644
--- a/src/views/dashboard/HomeThemeGallery.vue
+++ b/src/views/dashboard/HomeThemeGallery.vue
@@ -47,17 +47,6 @@ export default {
localStorage.removeItem('releaseId')
const selectedMaterial = this.$refs.ThemeGalleryList.selectedMaterial
localStorage.setItem('selectedMaterial', JSON.stringify(selectedMaterial))
- // // 判断是否选择了多个音频文件
- // const resultAudio = []
- // this.selectedMaterial.map(item => {
- // if (item.material_type == 2) {
- // resultAudio.push(item)
- // }
- // })
- // if (resultAudio.length > 1) {
- // this.$message.error('音频类型的文件只可选择1个')
- // return
- // }
this.$router.push(
{
path: '/release', query: { tag: index }
diff --git a/src/views/immediateRelease/index.vue b/src/views/immediateRelease/index.vue
index 87bc343..d2580e0 100644
--- a/src/views/immediateRelease/index.vue
+++ b/src/views/immediateRelease/index.vue
@@ -146,7 +146,7 @@
-
+
{{ mulitText }}
@@ -251,7 +251,6 @@