From 403727ec6bb0a68e682e49f8a69abf666ae469d3 Mon Sep 17 00:00:00 2001 From: xudanya <707166741@qq.com> Date: Tue, 29 Mar 2022 16:51:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=A2=98=E5=BA=93=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/publish/publishHistory.js | 11 ++ src/api/publish/publishList.js | 10 -- src/views/components/ThemeGalleryList.vue | 125 ++++++++++------ src/views/device/deviceConfig.vue | 1 + .../materialContent/materialList/index.vue | 2 +- .../publishContent/historyList/index.vue | 134 ++++++++++++------ 6 files changed, 187 insertions(+), 96 deletions(-) create mode 100644 src/api/publish/publishHistory.js delete mode 100644 src/api/publish/publishList.js diff --git a/src/api/publish/publishHistory.js b/src/api/publish/publishHistory.js new file mode 100644 index 0000000..7045632 --- /dev/null +++ b/src/api/publish/publishHistory.js @@ -0,0 +1,11 @@ +// 发布历史的接口 +import request from '@/utils/request' + +// 发布历史列表 +export function reqPublishHistory(parameter) { + return request({ + url: 'api/release/getReleaseHistoryList', + method: 'get', + params: parameter + }) +} \ No newline at end of file diff --git a/src/api/publish/publishList.js b/src/api/publish/publishList.js deleted file mode 100644 index 8af00a8..0000000 --- a/src/api/publish/publishList.js +++ /dev/null @@ -1,10 +0,0 @@ -// 管理发布列表的接口 -import request from '@/utils/request' - -export function reqPublishList(parameter) { - return request({ - url: 'api/release/getReleaseList', - method: 'get', - params: parameter - }) -} diff --git a/src/views/components/ThemeGalleryList.vue b/src/views/components/ThemeGalleryList.vue index f5e7142..8eccc45 100644 --- a/src/views/components/ThemeGalleryList.vue +++ b/src/views/components/ThemeGalleryList.vue @@ -9,22 +9,31 @@ - - 横屏 - 竖屏 + + 横屏 + 竖屏 - + + + + + + @@ -175,17 +184,17 @@ export default { data () { return { orga_id: '133221333123111', // 机构ID - // queryInfo: { - // theme_name: '',//主题库的名字 - // theme_class: '', //主题素材列表 - // device_direction: null,//横竖屏 - // orga_id: 133221333123111, - // start_time: '', //搜索开始的时间 - // end_time: '', //结束开始的时间 - // folder_id: '',//文件夹的id - // page: 1, - // size: 3 - // }, + queryInfo: { + theme_name: '',//主题库的名字 + theme_class: '', //主题素材列表 + device_direction: null,//横竖屏 + orga_id: 133221333123111, + start_time: '', //搜索开始的时间 + end_time: '', //结束开始的时间 + folder_id: '',//文件夹的id + page: 1, + size: 3 + }, // 选中的导航栏id class_ids: [], // 导航栏的lsit @@ -198,7 +207,7 @@ export default { id: '', orga_ids: ["133221333123111"], selectName: null, - direction: null, + direction: 1, //横竖屏 selectNameList: [], img_path: '' }, @@ -213,7 +222,11 @@ export default { file: null }, themeGalleryList: [],//主题库的列表 - + formatType: null, // 上传素材类型 0 img 1 video 2 audio + materialImgPath: '', // 素材封面 + materialDuration: 0, // 时长 + materialName: '', // 素材名称 + fileSize: '',//大小 listThemeData: [ { id: '1', @@ -306,7 +319,9 @@ export default { enabled: false } ], - imgSrc: '' + imgSrc: '', + videoSrc: '', + audioSrc: '' } }, watch: { @@ -317,58 +332,82 @@ export default { } }, mounted () { - // this.getThemeGallery() + this.getThemeGallery() this.getHeaderList() }, methods: { // 获取主题库list - // getThemeGallery () { - // const params = this.queryInfo - // reqThemeGallery(params).then(res => { - // if (res.code == 200) { - // this.themeGalleryList = res.data.content - // this.total = res.data.reqThemeGallery - // } - // }) - // }, + getThemeGallery () { + const params = this.queryInfo + reqThemeGallery(params).then(res => { + console.log(res) + if (res.code == 200) { + this.themeGalleryList = res.data.content + console.log(this.themeGalleryList) + this.total = res.data.totalElements + } + }) + }, getHeaderList () { const { orga_id } = this reqHeaderList(orga_id).then(res => { if (res.code == 200) { this.tabItem = res.data - } }) }, + clearCheckbox (label) { + this.classifyForm.direction = label + console.log(this.classifyForm.direction) + }, // 当复选框发生改变的时候 handleCheckedCitiesChange (val) { const class_ids = [] val.forEach(item => { class_ids.push(item) }) - console.log(class_ids) + // console.log(class_ids) }, // 上传 saveMaterial () { + console.log('-----------') + console.log(this.formatType) this.uploadDialogVisible = true this.$nextTick(() => { - this.imgSrc = this.$refs.uploadMaterial.uploadFileUrl + if (formatType == 0) { + this.imgSrc = this.$refs.uploadMaterial.uploadFileUrl + } else if (formatType == 1) { + this.videoSrc = this.$refs.uploadMaterial.uploadFileUrl + } else { + this.audioSrc = this.$refs.uploadMaterial.uploadFileUrl + } + + // console.log(this.formatType) + const duration = this.$refs.uploadMaterial.duration + this.fileSize = this.$refs.uploadMaterial.fileSize + // 主题名称 + this.materialName = this.$refs.uploadMaterial.fileNames + // 图片音频视频 类别 + const formatType = this.$refs.uploadMaterial.formatType console.log(this.$refs.uploadMaterial.uploadFileUrl) }) - // if (row) { - // console.log(row.type) - // this.uploadTitle = '编辑' - // this.classifyForm.name = row.name - // this.classifyForm.direction = row.direction - // this.classifyForm.selectNameList.push(row.type) - // } else { - // this.uploadTitle = '上传' - // } + const params = { + class_ids: this.class_ids, //主题库头部id集合 + deposit_url: this.uploadFileUrl, //素材存放路径 + device_direction: this.classifyForm.direction, //横竖屏 + material_id: null, + folder_id: null,//文件夹的id + img_path: this.materialImgPath, //封面图片的id + material_type: this.formatType, + file_size: this.fileSize, // 文件大小 + orga_id: this.queryInfo.orga_id, // 机构id + store_type: 2// 库类型 1.素材库 2.主题库 + } }, - resetForm (formName) { + resetForm () { this.addDialogVisible = false this.uploadDialogVisible = false - this.$refs[formName].resetFields() + this.$refs.classifyForm.resetFields() }, // 创建文件夹 diff --git a/src/views/device/deviceConfig.vue b/src/views/device/deviceConfig.vue index 31e19f0..8a7c31b 100644 --- a/src/views/device/deviceConfig.vue +++ b/src/views/device/deviceConfig.vue @@ -302,6 +302,7 @@ export default { }, // 每天/每周切换的情况下数据处理 clearCheckbox () { + if (this.form.open_setting === 1) { this.open_weekly = [] this.form.open_weekly = null diff --git a/src/views/materialContent/materialList/index.vue b/src/views/materialContent/materialList/index.vue index 2c01d79..cae2133 100644 --- a/src/views/materialContent/materialList/index.vue +++ b/src/views/materialContent/materialList/index.vue @@ -13,7 +13,6 @@ 创建文件夹 返回 -
@@ -388,6 +387,7 @@ export default { console.log(this.$refs.uploadMaterial.fileSize) const formatType = this.$refs.uploadMaterial.formatType this.uploadFileUrl = this.$refs.uploadMaterial.uploadFileUrl + // 视频和音频的时长 const duration = this.$refs.uploadMaterial.duration this.materialName = this.$refs.uploadMaterial.fileNames switch (formatType) { diff --git a/src/views/publishContent/historyList/index.vue b/src/views/publishContent/historyList/index.vue index acee127..394485c 100644 --- a/src/views/publishContent/historyList/index.vue +++ b/src/views/publishContent/historyList/index.vue @@ -3,35 +3,50 @@ - + - + - - + + + + + + - + + + + - @@ -40,44 +55,79 @@