From 0ac5a994333943270f1c38415c7cc660d3f05d5d Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Fri, 3 Mar 2023 14:20:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=A0=E6=9D=90=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppMaterialLibrary/components/List.vue | 86 ++++++++++++++----- ui/packages/basic/AiUploader.vue | 1 + 2 files changed, 67 insertions(+), 20 deletions(-) diff --git a/packages/wxwork/AppMaterialLibrary/components/List.vue b/packages/wxwork/AppMaterialLibrary/components/List.vue index ed005c0a..e9f30c01 100644 --- a/packages/wxwork/AppMaterialLibrary/components/List.vue +++ b/packages/wxwork/AppMaterialLibrary/components/List.vue @@ -40,19 +40,11 @@ :current.sync="search.current" :size.sync="search.size" @getList="getList"> - - - - + @@ -60,7 +52,7 @@ - + - + @@ -217,7 +209,6 @@ appId: '', content: '', fileUrl: [], - appid: '', pagePath: '', pictureUrl: [], title: '' @@ -231,12 +222,50 @@ }, computed: { + mpTitle () { + return { + '0': '话术标题', + '1': '图片名称', + '2': '小程序标题', + '3': '文件名称', + '4': '视频名称', + '5': '网页名称' + }[this.currIndex] + }, + colConfigs () { + if (this.currIndex === 0) { + return [ + { prop: 'title', label: this.mpTitle }, + { prop: 'content', label: '话术内容', align: 'center' }, + { prop: 'createUserName', label: '添加人', align: 'center' }, + { prop: 'createTime', label: '添加时间', align: 'center' } + ] + } + + if (this.currIndex === 2) { + return [ + { prop: 'title', label: this.mpTitle }, + { prop: 'appId', label: '小程序APPID', align: 'center' }, + { prop: 'createUserName', label: '添加人', align: 'center' }, + { prop: 'createTime', label: '添加时间', align: 'center' } + ] + } + + if (this.currIndex === 5) { + return [ + { prop: 'title', label: this.mpTitle }, + { prop: 'pagePath', label: '外链网页', align: 'center' }, + { prop: 'createUserName', label: '添加人', align: 'center' }, + { prop: 'createTime', label: '添加时间', align: 'center' } + ] + } + return [ - { prop: 'taskTitle', label: '任务名称' }, - { prop: 'typeName', label: '群发类型', align: 'center' }, - { slot: 'user', label: '创建人', openType: 'userName', align: 'center' }, - { prop: 'choiceTime', label: '群发时间', align: 'center' } + { prop: 'title', label: this.mpTitle }, + { prop: 'fileSizeStr', label: '文件大小', align: 'center' }, + { prop: 'createUserName', label: '添加人', align: 'center' }, + { prop: 'createTime', label: '添加时间', align: 'center' } ] } }, @@ -260,6 +289,21 @@ }) }, + toAdd (e) { + this.form = { + ...this.form, + ...e, + fileUrl: e.fileUrl ? [{ + url: e.fileUrl + }] : '', + pictureUrl: e.pictureUrl ? [{ + url: e.pictureUrl + }] : '' + } + + this.isShow = true + }, + onClose () { this.form.content = '' this.form.appId = '' @@ -267,6 +311,8 @@ this.form.pagePath = '' this.form.pictureUrl = [] this.form.title = '' + + this.id = '' }, confirm () { @@ -277,7 +323,7 @@ type: this.currIndex, fileUrl: this.form.fileUrl.length ? this.form.fileUrl[0].url : '', pictureUrl: this.form.pictureUrl.length ? this.form.pictureUrl[0].url : '', - fileSizeStr: this.form.fileUrl.length ? this.form.fileUrl[0].fileSizeStr : '', + fileSize: this.form.fileUrl.length ? this.form.fileUrl[0].fileSize : '', }).then(res => { if (res.code == 0) { this.$message.success('提交成功') diff --git a/ui/packages/basic/AiUploader.vue b/ui/packages/basic/AiUploader.vue index 48901460..27224660 100644 --- a/ui/packages/basic/AiUploader.vue +++ b/ui/packages/basic/AiUploader.vue @@ -359,6 +359,7 @@ export default { item.url = res.data.url item.url = res.data.url item.fileSizeStr = res.data.fileSizeStr + item.fileSize = res.data.size item.postfix = res.data.postfix } })