From 8db403d9dd51388b3b98ecdbb081755dc5423751 Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Sat, 2 Apr 2022 18:17:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/adminIndex.scss | 37 +++++-- src/views/ThemeGallery/index.vue | 103 +++++++++++------- src/views/components/MyAlbum.vue | 25 ++--- src/views/components/ThemeGalleryList.vue | 53 ++++----- src/views/components/upload.vue | 1 - src/views/dashboard/PublishProcess.vue | 2 + src/views/materialContent/index.vue | 41 ++++--- .../materialContent/materialList/index.vue | 20 +++- 8 files changed, 170 insertions(+), 112 deletions(-) diff --git a/src/assets/styles/adminIndex.scss b/src/assets/styles/adminIndex.scss index 61c7316..6645b4a 100644 --- a/src/assets/styles/adminIndex.scss +++ b/src/assets/styles/adminIndex.scss @@ -10,6 +10,9 @@ background-color: #c1c1c1; border-radius: 3px; } + +img[src=""],img:not([src]){opacity:0;} + .home_item { height: 248px; padding: 0 18px; @@ -243,13 +246,7 @@ display: block; width: 164px; height: 140px; - } - - .radio_img { - width: 164px; - height: 140px; - background: url(../../assets/images/t-yp.png) no-repeat #b3e8fa center; - background-size: 98px 98px; + object-fit: cover; } .item_player { position: absolute; @@ -264,6 +261,22 @@ } } +.radio_img { + width: 164px; + height: 140px; + background: url(../../assets/images/t-yp.png) no-repeat #b3e8fa center; + background-size: 98px 98px; +} + +.set_radio{ + .radio_img { + width: 140px; + height: 250px; + background: url(../../assets/images/t-yp.png) no-repeat #b3e8fa center; + background-size: 98px 98px; + } +} + .content_warp { i { font-style: normal; @@ -402,14 +415,22 @@ overflow: hidden; margin: 0 24px 24px 0; img { + position: relative; display: block; width: 100%; height: 100%; object-fit: cover; + &::after{ + content: "222222"; + position: absolute; + left: 0; + top: 0; + z-index: 999; + } } + } } - .cont_upload { display: flex; flex-wrap: wrap; diff --git a/src/views/ThemeGallery/index.vue b/src/views/ThemeGallery/index.vue index e763f77..3e4ce16 100644 --- a/src/views/ThemeGallery/index.vue +++ b/src/views/ThemeGallery/index.vue @@ -94,14 +94,14 @@ - + @@ -158,6 +158,23 @@ + + + @@ -241,7 +258,8 @@ export default { isEditTheme: false, page: 1, size: 10, - total: 0 + total: 0, + selectContVisible: true } }, watch: { @@ -466,46 +484,53 @@ export default { }) } this.uploadForm.class_ids = this.selectClassifyList + if (this.uploadForm.class_ids.length == 0) { + this.$message.error('请选择类别名称') + return + } else if (!this.uploadForm.device_direction) { + this.$message.error('请选择设备方向') + return + } else if (!this.uploadForm.deposit_url) { + this.$message.error('请上传资源内容') + return + } else if (!this.uploadForm.material_name) { + this.$message.error('请输入文件名称') + return + } // this.uploadForm.orga_id = this.orga_id this.uploadForm.store_type = 2 - this.$refs[formName].validate((valid) => { - if (valid) { - setTimeout(() => { - saveMaterial(this.uploadForm).then(res => { - if (res.code === 200) { - this.$message({ - message: '上传素材成功', - type: 'success' - }) - this.uploadDialogVisible = false - this.getThemeHistoryList() - // 上传表单重置 - this.selectClassifyList = [] - this.uploadForm.device_direction = 0 - this.uploadForm.deposit_url = null - this.formatType = -1 - this.uploadForm.material_type = null - this.uploadForm.img_path = null - this.materialImgPath = null - this.$nextTick(() => { - if (this.$refs.uploadMaterial) { - this.$refs.uploadMaterial.filePercent = 0 - } - if (this.$refs.childUpload) { - this.$refs.childUpload.imageUrl = null - } - }) - this.$refs.uploadForm.resetFields() - } else { - this.$message.error(res.msg) + setTimeout(() => { + saveMaterial(this.uploadForm).then(res => { + if (res.code === 200) { + this.$message({ + message: '上传素材成功', + type: 'success' + }) + this.uploadDialogVisible = false + this.getThemeHistoryList() + this.$refs.ThemeGalleryList.getThemeGallery() + // 上传表单重置 + this.selectClassifyList = [] + this.uploadForm.device_direction = 0 + this.uploadForm.deposit_url = null + this.formatType = -1 + this.uploadForm.material_type = null + this.uploadForm.img_path = null + this.materialImgPath = null + this.$nextTick(() => { + if (this.$refs.uploadMaterial) { + this.$refs.uploadMaterial.filePercent = 0 + } + if (this.$refs.childUpload) { + this.$refs.childUpload.imageUrl = null } }) - }, 200) - } else { - console.log('error submit!!') - return false - } - }) + this.$refs.uploadForm.resetFields() + } else { + this.$message.error(res.msg) + } + }) + }, 200) }, // 上传历史list - 主题库 getThemeHistoryList(pager = 1) { diff --git a/src/views/components/MyAlbum.vue b/src/views/components/MyAlbum.vue index 6d9d239..5e75a93 100644 --- a/src/views/components/MyAlbum.vue +++ b/src/views/components/MyAlbum.vue @@ -16,7 +16,7 @@ 创建文件夹
- 添加 + 添加 返回
@@ -30,7 +30,7 @@
-
+
@@ -41,7 +41,6 @@
-
@@ -98,6 +97,7 @@
+
@@ -108,6 +108,7 @@ import UploadCover from './upload_cover' export default { name: 'ThemeGalleryList', components: { UploadCover }, + inject: ['selectContVisible'], filters: { getSeconds(s) { return getSeconds(s) @@ -150,7 +151,8 @@ export default { img_path: '', name: '', orga_id: '' - } + }, + selectContVisible2: 0 } }, computed: { @@ -171,6 +173,9 @@ export default { document.addEventListener('click', this.hiddenFolderActiveClick) }, methods: { + addThemeToAlbum() { + this.$emit('test', this.selectContVisible2) + }, breadcrumbToAlbum() { this.$router.push('/theme') this.getMyAlbum() @@ -457,12 +462,6 @@ export default { } diff --git a/src/views/components/upload.vue b/src/views/components/upload.vue index a4b53f1..b9676b0 100644 --- a/src/views/components/upload.vue +++ b/src/views/components/upload.vue @@ -217,7 +217,6 @@ export default { _this.getVideoDuration(_this.uploadFileUrl) setTimeout(() => { _this.$emit('saveMaterial') - _this.$emit('uploadSubmit') }, 200) document.getElementById('upFile').value = '' } diff --git a/src/views/dashboard/PublishProcess.vue b/src/views/dashboard/PublishProcess.vue index 7411ecd..499c555 100644 --- a/src/views/dashboard/PublishProcess.vue +++ b/src/views/dashboard/PublishProcess.vue @@ -36,6 +36,8 @@ export default { }, methods: { publishHandle(index) { + localStorage.removeItem('selectedMaterial') + localStorage.removeItem('releaseId') this.$router.push( { path: '/release', query: { tag: index } diff --git a/src/views/materialContent/index.vue b/src/views/materialContent/index.vue index ffc60ef..259635f 100644 --- a/src/views/materialContent/index.vue +++ b/src/views/materialContent/index.vue @@ -2,30 +2,24 @@
- - + + - 图片 - 1 + 图片1 - tp - + - 视频 - 1 + 视频1 - ship - + - 音频 - 1 + 音频1 - yinp - +
上传列表 @@ -41,14 +35,29 @@ export default { components: { MaterialList }, data() { return { - activeIndex: 0, + activeIndex: 0 || '0', isMultiSelected: false, mulitText: '多选' } }, methods: { handleClick(tab) { - console.log(tab.index) + this.activeIndex = tab.index + switch (this.activeIndex) { + case '0': + this.$refs.MaterialList.tabType = null + break + case '1': + this.$refs.MaterialList.tabType = 0 + break + case '2': + this.$refs.MaterialList.tabType = 1 + break + case '3': + this.$refs.MaterialList.tabType = 2 + break + } + this.$refs.MaterialList.getMaterialList() }, handleUpload() { this.$refs.MaterialList.UploadList() diff --git a/src/views/materialContent/materialList/index.vue b/src/views/materialContent/materialList/index.vue index cea2da4..018454d 100644 --- a/src/views/materialContent/materialList/index.vue +++ b/src/views/materialContent/materialList/index.vue @@ -118,6 +118,10 @@ export default { isMultiSelected: { type: Boolean, required: true + }, + activeIndex: { + type: String, + required: true } }, data() { @@ -157,7 +161,8 @@ export default { movingVisible: false, uploadListData: [ // 上传列表 ], - folderListChecked: -1 + folderListChecked: -1, + tabType: null } }, computed: { @@ -172,10 +177,17 @@ export default { this.selectedListId = [] } }, + activeIndex(newName, oldName) { + // console.log(newName) + this.tabIndex = newName + }, '$route.query.folderTag'(Val) { console.log(Val) } }, + created() { + console.log(localStorage.getItem('materialTabIndex')) + }, mounted: function() { console.log(this.$route.query.folderTag) this.getMaterialList() @@ -193,7 +205,8 @@ export default { params = { 'folder_id': this.currentFolderId, 'material_name': null, - 'material_type': null, + 'material_type': this.tabType, + 'material_type_not': null, 'orga_id': this.orga_id } } else { @@ -204,7 +217,7 @@ export default { params = { 'folder_id': null, 'material_name': null, - 'material_type': null, + 'material_type': this.tabType, 'material_type_not': null, 'orga_id': this.orga_id } @@ -583,6 +596,7 @@ export default {