From bf86bf69b1399d663add6801aff06f4e3bceb5c8 Mon Sep 17 00:00:00 2001 From: wx-jincw Date: Sun, 15 Jun 2025 23:52:12 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=9B=BE=E7=89=87=E5=85=B1=E4=BA=AB?= =?UTF-8?q?=EF=BC=8C=E5=90=88=E6=88=90=E5=9B=BE=E7=89=87=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E7=AD=89=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bs-ui/.env.development | 10 +- bs-ui/.env.production | 4 +- bs-ui/.env.staging | 4 +- bs-ui/package.json | 2 +- bs-ui/src/components/NomalSelect/index.vue | 185 ++++++++++++++++++ bs-ui/src/components/PhotoCart/index.vue | 50 ++++- bs-ui/src/main.js | 2 + bs-ui/src/mixins/table-edit-mixin.js | 9 +- bs-ui/src/plugins/download.js | 18 ++ bs-ui/src/utils/index.js | 14 ++ bs-ui/src/utils/request.js | 2 +- .../gallery/list/components/ImageItem.vue | 21 +- bs-ui/src/views/gallery/list/index.vue | 13 +- .../gallery/query/components/ImageChooser.vue | 1 + bs-ui/src/views/login.vue | 2 +- bs-ui/src/views/register.vue | 2 +- .../share-gallery/components/ShareDialog.vue | 131 +++++++++++++ .../share-gallery/components/ShareList.vue | 75 +++++++ bs-ui/src/views/share-gallery/my/index.vue | 0 bs-ui/src/views/share-gallery/other/index.vue | 0 bs-ui/vue.config.js | 2 +- 21 files changed, 519 insertions(+), 28 deletions(-) create mode 100644 bs-ui/src/components/NomalSelect/index.vue create mode 100644 bs-ui/src/views/share-gallery/components/ShareDialog.vue create mode 100644 bs-ui/src/views/share-gallery/components/ShareList.vue create mode 100644 bs-ui/src/views/share-gallery/my/index.vue create mode 100644 bs-ui/src/views/share-gallery/other/index.vue diff --git a/bs-ui/.env.development b/bs-ui/.env.development index 4ae96bf..68ea47b 100644 --- a/bs-ui/.env.development +++ b/bs-ui/.env.development @@ -1,14 +1,14 @@ # 页面标题 -VUE_APP_TITLE = 烟草管理系统 +VUE_APP_TITLE = 烟草图片助手 # 开发环境配置 ENV = 'development' -# 烟草管理系统/开发环境 +# 烟草图片助手/开发环境 #VUE_APP_BASE_API = 'http://124.71.134.146:8096/prod-api' -VUE_APP_BASE_API = 'http://localhost:8080' -# VUE_APP_BASE_API = 'http://tanjunwei.test.jiutianda.cn' -# VUE_APP_BASE_API = 'http://wangyi.test.jiutianda.cn' +# VUE_APP_BASE_API = 'http://localhost:8080' +# VUE_APP_BASE_API = 'https://tobacco2.test.jiutianda.cn' +VUE_APP_BASE_API = 'http://wangyi.test.jiutianda.cn' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/bs-ui/.env.production b/bs-ui/.env.production index 898b10a..3600d26 100644 --- a/bs-ui/.env.production +++ b/bs-ui/.env.production @@ -1,8 +1,8 @@ # 页面标题 -VUE_APP_TITLE = 烟草管理系统 +VUE_APP_TITLE = 烟草图片助手 # 生产环境配置 ENV = 'production' -# 烟草管理系统/生产环境 +# 烟草图片助手/生产环境 VUE_APP_BASE_API = '/prod-api' diff --git a/bs-ui/.env.staging b/bs-ui/.env.staging index e70d974..9fb5c46 100644 --- a/bs-ui/.env.staging +++ b/bs-ui/.env.staging @@ -1,10 +1,10 @@ # 页面标题 -VUE_APP_TITLE = 烟草管理系统 +VUE_APP_TITLE = 烟草图片助手 NODE_ENV = production # 测试环境配置 ENV = 'staging' -# 烟草管理系统/测试环境 +# 烟草图片助手/测试环境 VUE_APP_BASE_API = '/stage-api' diff --git a/bs-ui/package.json b/bs-ui/package.json index 9bd5d2e..6a22404 100644 --- a/bs-ui/package.json +++ b/bs-ui/package.json @@ -1,7 +1,7 @@ { "name": "tobacco", "version": "3.8.6", - "description": "烟草管理系统", + "description": "烟草图片助手", "author": "烟草", "license": "MIT", "scripts": { diff --git a/bs-ui/src/components/NomalSelect/index.vue b/bs-ui/src/components/NomalSelect/index.vue new file mode 100644 index 0000000..45c76c4 --- /dev/null +++ b/bs-ui/src/components/NomalSelect/index.vue @@ -0,0 +1,185 @@ + + + + + + \ No newline at end of file diff --git a/bs-ui/src/components/PhotoCart/index.vue b/bs-ui/src/components/PhotoCart/index.vue index d7ed3aa..90df3cb 100644 --- a/bs-ui/src/components/PhotoCart/index.vue +++ b/bs-ui/src/components/PhotoCart/index.vue @@ -21,9 +21,7 @@ 全选({{list.filter(val => val._check).length}}) - - 图片合并 - + 图片合并 九宫格 四宫格 @@ -32,9 +30,16 @@ 生成视频 - 清空购物车 + 创建任务 反馈到任务 + + 更多 + + 共享 + 清空购物车 + +
@@ -166,6 +171,7 @@
+ @@ -176,12 +182,16 @@ import { addImageFeedback } from "@/api/task/feedback"; import { generateTasks } from "@/api/task/images"; import { imageToGroup } from "@/api/gallery/images"; import AuditDialog from "@/views/task-distribut/send/other-task/components/AuditDialog"; +// import { downloadFileUrl } from '../../utils'; +import download from '@/plugins/download.js' +import ShareDialog from '@/views/share-gallery/components/ShareDialog.vue'; export default { name: 'PhotoCart', dicts: ['task_type','task_status'], components: { - AuditDialog + AuditDialog, + ShareDialog }, data () { return { @@ -404,10 +414,31 @@ import AuditDialog from "@/views/task-distribut/send/other-task/components/Audit imageType: command, }).then(res => { this.genImaging = false; + if (res.data) { + // const paths = res.data.split('.'); + // const piffix = paths[paths.length - 1]; + // const fileName = `${res.data.replace(`.${piffix}`, '')}.${piffix}`; + // downloadFileUrl(process.env.VUE_APP_BASE_API + '/profile/' + res.data, res.data); + download.profilePath(res.data); + } }).catch(e => { this.genImaging = false; }); }, + handleMoreCommand(command) { + if (command === 'clear') { + this.clear(); + return; + } + if (command === 'share') { + const ids = this.list.filter(val => val._check).map(val => val.id); + console.log('选中:', ids); + this.$refs.shareDialog.open({ + cataIds: ids, + }); + return; + } + }, animationEnd() { this.isAnimation = true; setTimeout(() => { @@ -436,7 +467,7 @@ import AuditDialog from "@/views/task-distribut/send/other-task/components/Audit } - \ No newline at end of file diff --git a/bs-ui/src/views/gallery/list/index.vue b/bs-ui/src/views/gallery/list/index.vue index bb3fa68..c6729b7 100644 --- a/bs-ui/src/views/gallery/list/index.vue +++ b/bs-ui/src/views/gallery/list/index.vue @@ -304,14 +304,21 @@ resetQueryTable() { this.imageUrl = URL.createObjectURL(file.raw); }, handleFileSuccess(res, file) { - this.$message.success('上传成功'); - this.openLoad = false; + this.uploading = false; - this.getTableList(); + if (res.code === 200) { + this.$message.success('上传成功'); + this.openLoad = false; + this.getTableList(); + } else { + this.$message.error(res.msg); + } + this.$refs.upload.clearFiles(); }, handleFileError() { this.$message.error('上传失败'); this.uploading = false; + this.$refs.upload.clearFiles(); }, beforeAvatarUpload(file) { const isImg = file.type.indexOf('image/') !== -1; diff --git a/bs-ui/src/views/gallery/query/components/ImageChooser.vue b/bs-ui/src/views/gallery/query/components/ImageChooser.vue index 0ef550d..ae9bc7e 100644 --- a/bs-ui/src/views/gallery/query/components/ImageChooser.vue +++ b/bs-ui/src/views/gallery/query/components/ImageChooser.vue @@ -143,6 +143,7 @@ export default { handleFileError() { this.$message.error('上传失败'); this.uploading = false; + this.$refs.upload.clearFiles(); }, removeImage(item, i) { if (item._new) { diff --git a/bs-ui/src/views/login.vue b/bs-ui/src/views/login.vue index ca0c7d2..d57a3bc 100644 --- a/bs-ui/src/views/login.vue +++ b/bs-ui/src/views/login.vue @@ -1,7 +1,7 @@