+
-
+
选取文件
-
+
大小不超过 {{ fileSize }}MB
@@ -53,6 +53,18 @@
+
+
+
+
+
{{ file.name }}
+
+
+ 下载
+
+
+
+
-
diff --git a/src/views/ai/chat/index/components/conversation/ConversationList.vue b/src/views/ai/chat/index/components/conversation/ConversationList.vue
new file mode 100644
index 0000000000000000000000000000000000000000..54940f827a7baadd873445ffd3f3c5e3a1a50a31
--- /dev/null
+++ b/src/views/ai/chat/index/components/conversation/ConversationList.vue
@@ -0,0 +1,472 @@
+
+
+
+
+
+
+
+ 新建对话
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ conversationKey }}
+
+
+
+
+
![]()
+
{{ conversation.title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/chat/index/components/conversation/ConversationUpdateForm.vue b/src/views/ai/chat/index/components/conversation/ConversationUpdateForm.vue
new file mode 100644
index 0000000000000000000000000000000000000000..bff094fb6f24db0090d860205eff4d7182d5a8c3
--- /dev/null
+++ b/src/views/ai/chat/index/components/conversation/ConversationUpdateForm.vue
@@ -0,0 +1,145 @@
+
+
+
+
diff --git a/src/views/ai/chat/index/components/message/MessageList.vue b/src/views/ai/chat/index/components/message/MessageList.vue
new file mode 100644
index 0000000000000000000000000000000000000000..b7402a9e021dec7784d097be9c54c81aba3c09d5
--- /dev/null
+++ b/src/views/ai/chat/index/components/message/MessageList.vue
@@ -0,0 +1,282 @@
+
+
+
+
+
+
+
+
+
+
+ {{ formatDate(item.createTime) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ formatDate(item.createTime) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/chat/index/components/message/MessageListEmpty.vue b/src/views/ai/chat/index/components/message/MessageListEmpty.vue
new file mode 100644
index 0000000000000000000000000000000000000000..b042fd663885ede21007e220470cd3616f38ccb8
--- /dev/null
+++ b/src/views/ai/chat/index/components/message/MessageListEmpty.vue
@@ -0,0 +1,83 @@
+
+
+
+
+
+
芋道 AI
+
+
+ {{ prompt.prompt }}
+
+
+
+
+
+
+
diff --git a/src/views/ai/chat/index/components/message/MessageLoading.vue b/src/views/ai/chat/index/components/message/MessageLoading.vue
new file mode 100644
index 0000000000000000000000000000000000000000..f3198cbda61ae3e2799f70760f267fb629a18c86
--- /dev/null
+++ b/src/views/ai/chat/index/components/message/MessageLoading.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/chat/index/components/message/MessageNewConversation.vue b/src/views/ai/chat/index/components/message/MessageNewConversation.vue
new file mode 100644
index 0000000000000000000000000000000000000000..40c3107a7bd4d188c1b65abee1437c1229baf1c5
--- /dev/null
+++ b/src/views/ai/chat/index/components/message/MessageNewConversation.vue
@@ -0,0 +1,46 @@
+
+
+
+
+
点击下方按钮,开始你的对话吧
+
+ 新建对话
+
+
+
+
+
+
diff --git a/src/views/ai/chat/index/components/role/RoleCategoryList.vue b/src/views/ai/chat/index/components/role/RoleCategoryList.vue
new file mode 100644
index 0000000000000000000000000000000000000000..c02126d572572b617877402f19e115dca386620e
--- /dev/null
+++ b/src/views/ai/chat/index/components/role/RoleCategoryList.vue
@@ -0,0 +1,53 @@
+
+
+
+
+ {{ category }}
+
+
+
+
+
+
diff --git a/src/views/ai/chat/index/components/role/RoleHeader.vue b/src/views/ai/chat/index/components/role/RoleHeader.vue
new file mode 100644
index 0000000000000000000000000000000000000000..17b1693bd2f8d20e4ec58f10d97eecc4df4a48a2
--- /dev/null
+++ b/src/views/ai/chat/index/components/role/RoleHeader.vue
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/chat/index/components/role/RoleList.vue b/src/views/ai/chat/index/components/role/RoleList.vue
new file mode 100644
index 0000000000000000000000000000000000000000..b148b220e7a7e883133cd0bcba39cbe012cd050c
--- /dev/null
+++ b/src/views/ai/chat/index/components/role/RoleList.vue
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
![]()
+
+
+
+
{{ role.name }}
+
{{ role.description }}
+
+
+ 使用
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/chat/index/components/role/RoleRepository.vue b/src/views/ai/chat/index/components/role/RoleRepository.vue
new file mode 100644
index 0000000000000000000000000000000000000000..246dcb4fbd7c6a7cb56edd168a060ba3123b35ff
--- /dev/null
+++ b/src/views/ai/chat/index/components/role/RoleRepository.vue
@@ -0,0 +1,289 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加角色
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/chat/index/index.vue b/src/views/ai/chat/index/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..28f1d65fffcde6f74410b0a1c169726ff26b63d2
--- /dev/null
+++ b/src/views/ai/chat/index/index.vue
@@ -0,0 +1,772 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/chat/manager/ChatConversationList.vue b/src/views/ai/chat/manager/ChatConversationList.vue
new file mode 100644
index 0000000000000000000000000000000000000000..23933f01cd6f4a2b30d1ff1306a60d396c4becee
--- /dev/null
+++ b/src/views/ai/chat/manager/ChatConversationList.vue
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+ {{ userList.find((item) => item.id === scope.row.userId)?.nickname }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/chat/manager/ChatMessageList.vue b/src/views/ai/chat/manager/ChatMessageList.vue
new file mode 100644
index 0000000000000000000000000000000000000000..0d84184081b2088d9a79f7f2842f531fda50338b
--- /dev/null
+++ b/src/views/ai/chat/manager/ChatMessageList.vue
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+ {{ userList.find((item) => item.id === scope.row.userId)?.nickname }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/chat/manager/index.vue b/src/views/ai/chat/manager/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..ca2d092460eb9eed28145db74a35d7eddb837601
--- /dev/null
+++ b/src/views/ai/chat/manager/index.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/image/index/components/ImageCard.vue b/src/views/ai/image/index/components/ImageCard.vue
new file mode 100644
index 0000000000000000000000000000000000000000..4ba78cac8f3878a7b00c71d6ccd9bdf2589f21da
--- /dev/null
+++ b/src/views/ai/image/index/components/ImageCard.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+ 生成中
+
+
+ 已完成
+
+
+ 异常
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ detail?.errorMessage }}
+
+
+
+
+
+ {{ button.label }}{{ button.emoji }}
+
+
+
+
+
+
+
diff --git a/src/views/ai/image/index/components/ImageDetail.vue b/src/views/ai/image/index/components/ImageDetail.vue
new file mode 100644
index 0000000000000000000000000000000000000000..ad15aa8d766880238c55055c8d3e8c92d564e9c0
--- /dev/null
+++ b/src/views/ai/image/index/components/ImageDetail.vue
@@ -0,0 +1,224 @@
+
+
+
+
+
+
+
时间
+
+
提交时间:{{ formatTime(detail.createTime, 'yyyy-MM-dd HH:mm:ss') }}
+
生成时间:{{ formatTime(detail.finishTime, 'yyyy-MM-dd HH:mm:ss') }}
+
+
+
+
+
模型
+
{{ detail.model }}({{ detail.height }}x{{ detail.width }})
+
+
+
+
提示词
+
+ {{ detail.prompt }}
+
+
+
+
+
图片地址
+
+ {{ detail.picUrl }}
+
+
+
+
+
采样方法
+
+ {{
+ StableDiffusionSamplers.find(
+ (item: ImageModelVO) => item.key === detail?.options?.sampler
+ )?.name
+ }}
+
+
+
+
CLIP
+
+ {{
+ StableDiffusionClipGuidancePresets.find(
+ (item: ImageModelVO) => item.key === detail?.options?.clipGuidancePreset
+ )?.name
+ }}
+
+
+
+
风格
+
+ {{
+ StableDiffusionStylePresets.find(
+ (item: ImageModelVO) => item.key === detail?.options?.stylePreset
+ )?.name
+ }}
+
+
+
+
迭代步数
+
+ {{ detail?.options?.steps }}
+
+
+
+
引导系数
+
+ {{ detail?.options?.scale }}
+
+
+
+
随机因子
+
+ {{ detail?.options?.seed }}
+
+
+
+
+
风格选择
+
+ {{ Dall3StyleList.find((item: ImageModelVO) => item.key === detail?.options?.style)?.name }}
+
+
+
+
+
模型版本
+
+ {{ detail?.options?.version }}
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/image/index/components/ImageList.vue b/src/views/ai/image/index/components/ImageList.vue
new file mode 100644
index 0000000000000000000000000000000000000000..ced006f041b72cd603841521f99f556b700454fb
--- /dev/null
+++ b/src/views/ai/image/index/components/ImageList.vue
@@ -0,0 +1,245 @@
+
+
+
+ 绘画任务
+
+ 绘画作品
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/image/index/components/dall3/index.vue b/src/views/ai/image/index/components/dall3/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..5c891ab93179d919bbbc079d7e50c34acdf9c441
--- /dev/null
+++ b/src/views/ai/image/index/components/dall3/index.vue
@@ -0,0 +1,320 @@
+
+
+
+ 画面描述
+ 建议使用“形容词+动词+风格”的格式,使用“,”隔开
+
+
+
+
+ 随机热词
+
+
+
+ {{ hotWord }}
+
+
+
+
+
+
+ 风格选择
+
+
+
+
+
{{ imageStyle.name }}
+
+
+
+
+
+ 画面比例
+
+
+
+
+
{{ imageSize.name }}
+
+
+
+
+
+ {{ drawIn ? '生成中' : '生成内容' }}
+
+
+
+
+
diff --git a/src/views/ai/image/index/components/midjourney/index.vue b/src/views/ai/image/index/components/midjourney/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..1d7fda185acb7546cfb2079f059efb8aacd237ff
--- /dev/null
+++ b/src/views/ai/image/index/components/midjourney/index.vue
@@ -0,0 +1,326 @@
+
+
+
+ 画面描述
+ 建议使用“形容词+动词+风格”的格式,使用“,”隔开.
+
+
+
+
+ 随机热词
+
+
+
+ {{ hotWord }}
+
+
+
+
+
+ 尺寸
+
+
+
+
+
{{ imageSize.key }}
+
+
+
+
+
+
+
+
+ {{ drawIn ? '生成中' : '生成内容' }}
+
+
+
+
+
diff --git a/src/views/ai/image/index/components/other/index.vue b/src/views/ai/image/index/components/other/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..a688be1862a7c17f620f73cbac3a27eb0ea9a89e
--- /dev/null
+++ b/src/views/ai/image/index/components/other/index.vue
@@ -0,0 +1,216 @@
+
+
+
+ 画面描述
+ 建议使用“形容词+动词+风格”的格式,使用“,”隔开
+
+
+
+
+ 随机热词
+
+
+
+ {{ hotWord }}
+
+
+
+
+
+
+
+
+ {{ drawIn ? '生成中' : '生成内容' }}
+
+
+
+
+
diff --git a/src/views/ai/image/index/components/stableDiffusion/index.vue b/src/views/ai/image/index/components/stableDiffusion/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..169938f4f23780dbe74f4d094ac9ef8584fdaaf0
--- /dev/null
+++ b/src/views/ai/image/index/components/stableDiffusion/index.vue
@@ -0,0 +1,272 @@
+
+
+
+ 画面描述
+ 建议使用“形容词+动词+风格”的格式,使用“,”隔开
+
+
+
+
+ 随机热词
+
+
+
+ {{ hotWord }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ drawIn ? '生成中' : '生成内容' }}
+
+
+
+
+
diff --git a/src/views/ai/image/index/index.vue b/src/views/ai/image/index/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..1217e793822eb843929c62f9047019cd3d521bb2
--- /dev/null
+++ b/src/views/ai/image/index/index.vue
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/image/manager/index.vue b/src/views/ai/image/manager/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..d2cefe6c902545eeff674d1ba39502367d31aead
--- /dev/null
+++ b/src/views/ai/image/manager/index.vue
@@ -0,0 +1,251 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ userList.find((item) => item.id === scope.row.userId)?.nickname }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/image/square/index.vue b/src/views/ai/image/square/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..3da6cdefc8e7c54e183468b4a254cc1fc1c8cb67
--- /dev/null
+++ b/src/views/ai/image/square/index.vue
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
![]()
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/mindmap/index/components/Left.vue b/src/views/ai/mindmap/index/components/Left.vue
new file mode 100644
index 0000000000000000000000000000000000000000..e684b887463c57bad95a9def1fe9a93869d16ceb
--- /dev/null
+++ b/src/views/ai/mindmap/index/components/Left.vue
@@ -0,0 +1,78 @@
+
+
+
思维导图创作中心
+
+
+
+ 您的需求?
+
+
+ 智能生成思维导图
+
+
+
+ 使用已有内容生成?
+
+
+ 直接生成
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/mindmap/index/components/Right.vue b/src/views/ai/mindmap/index/components/Right.vue
new file mode 100644
index 0000000000000000000000000000000000000000..b1d04de49053f3092b95504583ac7d686afad5e1
--- /dev/null
+++ b/src/views/ai/mindmap/index/components/Right.vue
@@ -0,0 +1,167 @@
+
+
+
+
+ 思维导图预览
+
+
+
+
+
+ 下载图片
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/mindmap/index/index.vue b/src/views/ai/mindmap/index/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..b85f20bad49a485fcf832d4f814f42048d16d05f
--- /dev/null
+++ b/src/views/ai/mindmap/index/index.vue
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/mindmap/manager/index.vue b/src/views/ai/mindmap/manager/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..9e873b908145ebb3d763dd491b6d4bb1c96644ef
--- /dev/null
+++ b/src/views/ai/mindmap/manager/index.vue
@@ -0,0 +1,189 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+ {{ userList.find((item) => item.id === scope.row.userId)?.nickname }}
+
+
+
+
+
+
+
+
+
+ 预览
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/model/apiKey/ApiKeyForm.vue b/src/views/ai/model/apiKey/ApiKeyForm.vue
new file mode 100644
index 0000000000000000000000000000000000000000..2d3d4bfb7807bccbeee224426ad51080e0393381
--- /dev/null
+++ b/src/views/ai/model/apiKey/ApiKeyForm.vue
@@ -0,0 +1,132 @@
+
+
+
+
diff --git a/src/views/ai/model/apiKey/index.vue b/src/views/ai/model/apiKey/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..6daf6a7d207468beb49d0d750bda90da7bfe9a73
--- /dev/null
+++ b/src/views/ai/model/apiKey/index.vue
@@ -0,0 +1,180 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/model/chatModel/ChatModelForm.vue b/src/views/ai/model/chatModel/ChatModelForm.vue
new file mode 100644
index 0000000000000000000000000000000000000000..ed9747a6b9aedce28d9d23d34eb73293eafd769a
--- /dev/null
+++ b/src/views/ai/model/chatModel/ChatModelForm.vue
@@ -0,0 +1,181 @@
+
+
+
+
diff --git a/src/views/ai/model/chatModel/index.vue b/src/views/ai/model/chatModel/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..c5506746713a5fec35efbea186ad1d1e10955e1c
--- /dev/null
+++ b/src/views/ai/model/chatModel/index.vue
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ apiKeyList.find((item) => item.id === scope.row.keyId)?.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/model/chatRole/ChatRoleForm.vue b/src/views/ai/model/chatRole/ChatRoleForm.vue
new file mode 100644
index 0000000000000000000000000000000000000000..18d1a0d443d07b7d23be4029c74d1e96f2bc27d9
--- /dev/null
+++ b/src/views/ai/model/chatRole/ChatRoleForm.vue
@@ -0,0 +1,183 @@
+
+
+
+
diff --git a/src/views/ai/model/chatRole/index.vue b/src/views/ai/model/chatRole/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..e870a5563a307d52dabdae748452e89eb53fa19f
--- /dev/null
+++ b/src/views/ai/model/chatRole/index.vue
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/music/index/index.vue b/src/views/ai/music/index/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..413792a7f0c89a148514c86079ebf442aafe1431
--- /dev/null
+++ b/src/views/ai/music/index/index.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/music/index/list/audioBar/index.vue b/src/views/ai/music/index/list/audioBar/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..db7f76734065e9b028f8b1437d77d807e553cce9
--- /dev/null
+++ b/src/views/ai/music/index/list/audioBar/index.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
{{currentSong.name}}
+
{{currentSong.singer}}
+
+
+
+
+
+
+
+
+
+ {{audioProps.currentTime}}
+
+ {{ audioProps.duration }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/music/index/list/index.vue b/src/views/ai/music/index/list/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..6c33f565afe56dee4ae7652b9d14e6b040e5fd02
--- /dev/null
+++ b/src/views/ai/music/index/list/index.vue
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/music/index/list/songCard/index.vue b/src/views/ai/music/index/list/songCard/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..05342512ebb02f6db4334dca005bd391f676315c
--- /dev/null
+++ b/src/views/ai/music/index/list/songCard/index.vue
@@ -0,0 +1,36 @@
+
+
+
+
+
{{ songInfo.title }}
+
+ {{ songInfo.desc }}
+
+
+
+
+
+
diff --git a/src/views/ai/music/index/list/songInfo/index.vue b/src/views/ai/music/index/list/songInfo/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..8d67c4d461f012a23be6833d56a065fb9dab3d59
--- /dev/null
+++ b/src/views/ai/music/index/list/songInfo/index.vue
@@ -0,0 +1,22 @@
+
+
+
+ {{ currentSong.title }}
+
+ {{ currentSong.desc }}
+
+
+ {{ currentSong.date }}
+
+ 信息复用
+
+
+
+
+
diff --git a/src/views/ai/music/index/mode/desc.vue b/src/views/ai/music/index/mode/desc.vue
new file mode 100644
index 0000000000000000000000000000000000000000..4488461e9fc3da3b96efad819bdc4de909b8f20e
--- /dev/null
+++ b/src/views/ai/music/index/mode/desc.vue
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/music/index/mode/index.vue b/src/views/ai/music/index/mode/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..32cad7ece2c2dabd8db428fd1183f9186d399cb6
--- /dev/null
+++ b/src/views/ai/music/index/mode/index.vue
@@ -0,0 +1,35 @@
+
+
+
+ 描述模式
+ 歌词模式
+
+
+
+
+
+ 创作音乐
+
+
+
+
diff --git a/src/views/ai/music/index/mode/lyric.vue b/src/views/ai/music/index/mode/lyric.vue
new file mode 100644
index 0000000000000000000000000000000000000000..f774003a8d591598eda8a868df47c70510230c07
--- /dev/null
+++ b/src/views/ai/music/index/mode/lyric.vue
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+ {{tag}}
+
+
+ 自定义风格
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/music/index/title/index.vue b/src/views/ai/music/index/title/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..a0658027a4c9950fd5b99da3cf4991d15623ec55
--- /dev/null
+++ b/src/views/ai/music/index/title/index.vue
@@ -0,0 +1,25 @@
+
+
+
+ {{title}}
+
+
+
+ {{desc}}
+
+
+
+
+
+
diff --git a/src/views/ai/music/manager/index.vue b/src/views/ai/music/manager/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..e1b94112a6349ed9cb00f1ee7795732129af6606
--- /dev/null
+++ b/src/views/ai/music/manager/index.vue
@@ -0,0 +1,292 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+ {{ userList.find((item) => item.id === scope.row.userId)?.nickname }}
+
+
+
+
+
+
+
+
+
+
+
+ 音乐
+
+
+ 视频
+
+
+ 封面
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ tag }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/utils/constants.ts b/src/views/ai/utils/constants.ts
new file mode 100644
index 0000000000000000000000000000000000000000..be4da7bc4d5a76744fedac648e9b5dab0afb3ba6
--- /dev/null
+++ b/src/views/ai/utils/constants.ts
@@ -0,0 +1,481 @@
+/**
+ * Created by 芋道源码
+ *
+ * AI 枚举类
+ *
+ * 问题:为什么不放在 src/utils/constants.ts 呢?
+ * 回答:主要 AI 是可选模块,考虑到独立、解耦,所以放在了 /views/ai/utils/constants.ts
+ */
+
+/**
+ * AI 平台的枚举
+ */
+export const AiPlatformEnum = {
+ TONG_YI: 'TongYi', // 阿里
+ YI_YAN: 'YiYan', // 百度
+ DEEP_SEEK: 'DeepSeek', // DeepSeek
+ ZHI_PU: 'ZhiPu', // 智谱 AI
+ XING_HUO: 'XingHuo', // 讯飞
+ OPENAI: 'OpenAI',
+ Ollama: 'Ollama',
+ STABLE_DIFFUSION: 'StableDiffusion', // Stability AI
+ MIDJOURNEY: 'Midjourney', // Midjourney
+ SUNO: 'Suno' // Suno AI
+}
+
+export const OtherPlatformEnum: ImageModelVO[] = [
+ {
+ key: AiPlatformEnum.TONG_YI,
+ name: '通义万相'
+ },
+ {
+ key: AiPlatformEnum.YI_YAN,
+ name: '百度千帆'
+ },
+ {
+ key: AiPlatformEnum.ZHI_PU,
+ name: '智谱 AI'
+ }
+]
+
+/**
+ * AI 图像生成状态的枚举
+ */
+export const AiImageStatusEnum = {
+ IN_PROGRESS: 10, // 进行中
+ SUCCESS: 20, // 已完成
+ FAIL: 30 // 已失败
+}
+
+/**
+ * AI 音乐生成状态的枚举
+ */
+export const AiMusicStatusEnum = {
+ IN_PROGRESS: 10, // 进行中
+ SUCCESS: 20, // 已完成
+ FAIL: 30 // 已失败
+}
+
+/**
+ * AI 写作类型的枚举
+ */
+export enum AiWriteTypeEnum {
+ WRITING = 1, // 撰写
+ REPLY // 回复
+}
+
+// 表格展示对照map
+export const AiWriteTypeTableRender = {
+ [AiWriteTypeEnum.WRITING]: '撰写',
+ [AiWriteTypeEnum.REPLY]: '回复'
+}
+
+// ========== 【图片 UI】相关的枚举 ==========
+
+export const ImageHotWords = [
+ '中国旗袍',
+ '古装美女',
+ '卡通头像',
+ '机甲战士',
+ '童话小屋',
+ '中国长城'
+] // 图片热词
+
+export const ImageHotEnglishWords = [
+ 'Chinese Cheongsam',
+ 'Ancient Beauty',
+ 'Cartoon Avatar',
+ 'Mech Warrior',
+ 'Fairy Tale Cottage',
+ 'The Great Wall of China'
+] // 图片热词(英文)
+
+export interface ImageModelVO {
+ key: string
+ name: string
+ image?: string
+}
+
+export const StableDiffusionSamplers: ImageModelVO[] = [
+ {
+ key: 'DDIM',
+ name: 'DDIM'
+ },
+ {
+ key: 'DDPM',
+ name: 'DDPM'
+ },
+ {
+ key: 'K_DPMPP_2M',
+ name: 'K_DPMPP_2M'
+ },
+ {
+ key: 'K_DPMPP_2S_ANCESTRAL',
+ name: 'K_DPMPP_2S_ANCESTRAL'
+ },
+ {
+ key: 'K_DPM_2',
+ name: 'K_DPM_2'
+ },
+ {
+ key: 'K_DPM_2_ANCESTRAL',
+ name: 'K_DPM_2_ANCESTRAL'
+ },
+ {
+ key: 'K_EULER',
+ name: 'K_EULER'
+ },
+ {
+ key: 'K_EULER_ANCESTRAL',
+ name: 'K_EULER_ANCESTRAL'
+ },
+ {
+ key: 'K_HEUN',
+ name: 'K_HEUN'
+ },
+ {
+ key: 'K_LMS',
+ name: 'K_LMS'
+ }
+]
+
+export const StableDiffusionStylePresets: ImageModelVO[] = [
+ {
+ key: '3d-model',
+ name: '3d-model'
+ },
+ {
+ key: 'analog-film',
+ name: 'analog-film'
+ },
+ {
+ key: 'anime',
+ name: 'anime'
+ },
+ {
+ key: 'cinematic',
+ name: 'cinematic'
+ },
+ {
+ key: 'comic-book',
+ name: 'comic-book'
+ },
+ {
+ key: 'digital-art',
+ name: 'digital-art'
+ },
+ {
+ key: 'enhance',
+ name: 'enhance'
+ },
+ {
+ key: 'fantasy-art',
+ name: 'fantasy-art'
+ },
+ {
+ key: 'isometric',
+ name: 'isometric'
+ },
+ {
+ key: 'line-art',
+ name: 'line-art'
+ },
+ {
+ key: 'low-poly',
+ name: 'low-poly'
+ },
+ {
+ key: 'modeling-compound',
+ name: 'modeling-compound'
+ },
+ // neon-punk origami photographic pixel-art tile-texture
+ {
+ key: 'neon-punk',
+ name: 'neon-punk'
+ },
+ {
+ key: 'origami',
+ name: 'origami'
+ },
+ {
+ key: 'photographic',
+ name: 'photographic'
+ },
+ {
+ key: 'pixel-art',
+ name: 'pixel-art'
+ },
+ {
+ key: 'tile-texture',
+ name: 'tile-texture'
+ }
+]
+
+export const TongYiWanXiangModels: ImageModelVO[] = [
+ {
+ key: 'wanx-v1',
+ name: 'wanx-v1'
+ },
+ {
+ key: 'wanx-sketch-to-image-v1',
+ name: 'wanx-sketch-to-image-v1'
+ }
+]
+
+export const QianFanModels: ImageModelVO[] = [
+ {
+ key: 'sd_xl',
+ name: 'sd_xl'
+ }
+]
+
+export const ChatGlmModels: ImageModelVO[] = [
+ {
+ key: 'cogview-3',
+ name: 'cogview-3'
+ }
+]
+
+export const StableDiffusionClipGuidancePresets: ImageModelVO[] = [
+ {
+ key: 'NONE',
+ name: 'NONE'
+ },
+ {
+ key: 'FAST_BLUE',
+ name: 'FAST_BLUE'
+ },
+ {
+ key: 'FAST_GREEN',
+ name: 'FAST_GREEN'
+ },
+ {
+ key: 'SIMPLE',
+ name: 'SIMPLE'
+ },
+ {
+ key: 'SLOW',
+ name: 'SLOW'
+ },
+ {
+ key: 'SLOWER',
+ name: 'SLOWER'
+ },
+ {
+ key: 'SLOWEST',
+ name: 'SLOWEST'
+ }
+]
+
+export const Dall3Models: ImageModelVO[] = [
+ {
+ key: 'dall-e-3',
+ name: 'DALL·E 3',
+ image: `/src/assets/ai/dall2.jpg`
+ },
+ {
+ key: 'dall-e-2',
+ name: 'DALL·E 2',
+ image: `/src/assets/ai/dall3.jpg`
+ }
+]
+
+export const Dall3StyleList: ImageModelVO[] = [
+ {
+ key: 'vivid',
+ name: '清晰',
+ image: `/src/assets/ai/qingxi.jpg`
+ },
+ {
+ key: 'natural',
+ name: '自然',
+ image: `/src/assets/ai/ziran.jpg`
+ }
+]
+
+export interface ImageSizeVO {
+ key: string
+ name?: string
+ style: string
+ width: string
+ height: string
+}
+
+export const Dall3SizeList: ImageSizeVO[] = [
+ {
+ key: '1024x1024',
+ name: '1:1',
+ width: '1024',
+ height: '1024',
+ style: 'width: 30px; height: 30px;background-color: #dcdcdc;'
+ },
+ {
+ key: '1024x1792',
+ name: '3:5',
+ width: '1024',
+ height: '1792',
+ style: 'width: 30px; height: 50px;background-color: #dcdcdc;'
+ },
+ {
+ key: '1792x1024',
+ name: '5:3',
+ width: '1792',
+ height: '1024',
+ style: 'width: 50px; height: 30px;background-color: #dcdcdc;'
+ }
+]
+
+export const MidjourneyModels: ImageModelVO[] = [
+ {
+ key: 'midjourney',
+ name: 'MJ',
+ image: 'https://bigpt8.com/pc/_nuxt/mj.34a61377.png'
+ },
+ {
+ key: 'niji',
+ name: 'NIJI',
+ image: 'https://bigpt8.com/pc/_nuxt/nj.ca79b143.png'
+ }
+]
+
+export const MidjourneySizeList: ImageSizeVO[] = [
+ {
+ key: '1:1',
+ width: '1',
+ height: '1',
+ style: 'width: 30px; height: 30px;background-color: #dcdcdc;'
+ },
+ {
+ key: '3:4',
+ width: '3',
+ height: '4',
+ style: 'width: 30px; height: 40px;background-color: #dcdcdc;'
+ },
+ {
+ key: '4:3',
+ width: '4',
+ height: '3',
+ style: 'width: 40px; height: 30px;background-color: #dcdcdc;'
+ },
+ {
+ key: '9:16',
+ width: '9',
+ height: '16',
+ style: 'width: 30px; height: 50px;background-color: #dcdcdc;'
+ },
+ {
+ key: '16:9',
+ width: '16',
+ height: '9',
+ style: 'width: 50px; height: 30px;background-color: #dcdcdc;'
+ }
+]
+
+export const MidjourneyVersions = [
+ {
+ value: '6.0',
+ label: 'v6.0'
+ },
+ {
+ value: '5.2',
+ label: 'v5.2'
+ },
+ {
+ value: '5.1',
+ label: 'v5.1'
+ },
+ {
+ value: '5.0',
+ label: 'v5.0'
+ },
+ {
+ value: '4.0',
+ label: 'v4.0'
+ }
+]
+
+export const NijiVersionList = [
+ {
+ value: '5',
+ label: 'v5'
+ }
+]
+
+// ========== 【写作 UI】相关的枚举 ==========
+
+/** 写作点击示例时的数据 **/
+export const WriteExample = {
+ write: {
+ prompt: 'vue',
+ data: 'Vue.js 是一种用于构建用户界面的渐进式 JavaScript 框架。它的核心库只关注视图层,易于上手,同时也便于与其他库或已有项目整合。\n\nVue.js 的特点包括:\n- 响应式的数据绑定:Vue.js 会自动将数据与 DOM 同步,使得状态管理变得更加简单。\n- 组件化:Vue.js 允许开发者通过小型、独立和通常可复用的组件构建大型应用。\n- 虚拟 DOM:Vue.js 使用虚拟 DOM 实现快速渲染,提高了性能。\n\n在 Vue.js 中,一个典型的应用结构可能包括:\n1. 根实例:每个 Vue 应用都需要一个根实例作为入口点。\n2. 组件系统:可以创建自定义的可复用组件。\n3. 指令:特殊的带有前缀 v- 的属性,为 DOM 元素提供特殊的行为。\n4. 插值:用于文本内容,将数据动态地插入到 HTML。\n5. 计算属性和侦听器:用于处理数据的复杂逻辑和响应数据变化。\n6. 条件渲染:根据条件决定元素的渲染。\n7. 列表渲染:用于显示列表数据。\n8. 事件处理:响应用户交互。\n9. 表单输入绑定:处理表单输入和验证。\n10. 组件生命周期钩子:在组件的不同阶段执行特定的函数。\n\nVue.js 还提供了官方的路由器 Vue Router 和状态管理库 Vuex,以支持构建复杂的单页应用(SPA)。\n\n在开发过程中,开发者通常会使用 Vue CLI,这是一个强大的命令行工具,用于快速生成 Vue 项目脚手架,集成了诸如 Babel、Webpack 等现代前端工具,以及热重载、代码检测等开发体验优化功能。\n\nVue.js 的生态系统还包括大量的第三方库和插件,如 Vuetify(UI 组件库)、Vue Test Utils(测试工具)等,这些都极大地丰富了 Vue.js 的开发生态。\n\n总的来说,Vue.js 是一个灵活、高效的前端框架,适合从小型项目到大型企业级应用的开发。它的易用性、灵活性和强大的社区支持使其成为许多开发者的首选框架之一。'
+ },
+ reply: {
+ originalContent: '领导,我想请假',
+ prompt: '不批',
+ data: '您的请假申请已收悉,经核实和考虑,暂时无法批准您的请假申请。\n\n如有特殊情况或紧急事务,请及时与我联系。\n\n祝工作顺利。\n\n谢谢。'
+ }
+}
+
+// ========== 【思维导图 UI】相关的枚举 ==========
+
+/** 思维导图已有内容生成示例 **/
+export const MindMapContentExample = `# Java 技术栈
+
+## 核心技术
+### Java SE
+### Java EE
+
+## 框架
+### Spring
+#### Spring Boot
+#### Spring MVC
+#### Spring Data
+### Hibernate
+### MyBatis
+
+## 构建工具
+### Maven
+### Gradle
+
+## 版本控制
+### Git
+### SVN
+
+## 测试工具
+### JUnit
+### Mockito
+### Selenium
+
+## 应用服务器
+### Tomcat
+### Jetty
+### WildFly
+
+## 数据库
+### MySQL
+### PostgreSQL
+### Oracle
+### MongoDB
+
+## 消息队列
+### Kafka
+### RabbitMQ
+### ActiveMQ
+
+## 微服务
+### Spring Cloud
+### Dubbo
+
+## 容器化
+### Docker
+### Kubernetes
+
+## 云服务
+### AWS
+### Azure
+### Google Cloud
+
+## 开发工具
+### IntelliJ IDEA
+### Eclipse
+### Visual Studio Code`
diff --git a/src/views/ai/utils/utils.ts b/src/views/ai/utils/utils.ts
new file mode 100644
index 0000000000000000000000000000000000000000..ab45ae183d79cd3d6164be68d27fceedac1172e5
--- /dev/null
+++ b/src/views/ai/utils/utils.ts
@@ -0,0 +1,13 @@
+/**
+ * Created by 芋道源码
+ *
+ * AI 枚举类
+ *
+ * 问题:为什么不放在 src/utils/common-utils.ts 呢?
+ * 回答:主要 AI 是可选模块,考虑到独立、解耦,所以放在了 /views/ai/utils/common-utils.ts
+ */
+
+/** 判断字符串是否包含中文 */
+export const hasChinese = (str: string) => {
+ return /[\u4e00-\u9fa5]/.test(str)
+}
diff --git a/src/views/ai/write/index/components/Left.vue b/src/views/ai/write/index/components/Left.vue
new file mode 100644
index 0000000000000000000000000000000000000000..74e5d58bb2e1c738aff97ec07e720bee89a985ad
--- /dev/null
+++ b/src/views/ai/write/index/components/Left.vue
@@ -0,0 +1,213 @@
+
+
+
+
+ {{ text }}
+
+
+
+
+
+ {{ label }}
+
+
+ {{ hint }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 重置
+ 生成
+
+
+
+
+
+
+
diff --git a/src/views/ai/write/index/components/Right.vue b/src/views/ai/write/index/components/Right.vue
new file mode 100644
index 0000000000000000000000000000000000000000..d0aada5df8adc8ece017cf0362bd757ca788ea10
--- /dev/null
+++ b/src/views/ai/write/index/components/Right.vue
@@ -0,0 +1,120 @@
+
+
+
+
+ 预览
+
+
+
+
+
+ 复制
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/write/index/components/Tag.vue b/src/views/ai/write/index/components/Tag.vue
new file mode 100644
index 0000000000000000000000000000000000000000..3d616bedd81060727426f969cde2d343bffb53d0
--- /dev/null
+++ b/src/views/ai/write/index/components/Tag.vue
@@ -0,0 +1,32 @@
+
+
+
+
+ {{ tag.label }}
+
+
+
+
+
+
diff --git a/src/views/ai/write/index/index.vue b/src/views/ai/write/index/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..0dfda7429b71c86d8cf2d159ab7fee27240e1368
--- /dev/null
+++ b/src/views/ai/write/index/index.vue
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
diff --git a/src/views/ai/write/manager/index.vue b/src/views/ai/write/manager/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..ddd1400a04896281b93a364fd8d0cd236e1daf21
--- /dev/null
+++ b/src/views/ai/write/manager/index.vue
@@ -0,0 +1,256 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+ 新增
+
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+ {{ userList.find((item) => item.id === scope.row.userId)?.nickname }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/bpm/category/CategoryForm.vue b/src/views/bpm/category/CategoryForm.vue
index 5b771537cada2122b17ad84d082f9d20b35e04d6..0d5abe7d6ef8a6206ad619f93738f75b4109bbc2 100644
--- a/src/views/bpm/category/CategoryForm.vue
+++ b/src/views/bpm/category/CategoryForm.vue
@@ -18,7 +18,7 @@
{{ dict.label }}
diff --git a/src/views/bpm/category/index.vue b/src/views/bpm/category/index.vue
index 46fa6cf1f15f59a0a5fe9c8f2083acc54e0386aa..085b3715b17b02a6d7221547a0ca298010c1aaaf 100644
--- a/src/views/bpm/category/index.vue
+++ b/src/views/bpm/category/index.vue
@@ -126,7 +126,6 @@
+
+
diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue
new file mode 100644
index 0000000000000000000000000000000000000000..17b858bcaf8308f77ee694b75895d734c8d7ba69
--- /dev/null
+++ b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue
@@ -0,0 +1,161 @@
+
+
+
+
+
{{ activity.name }}
+
{{ activity.assigneeUser.nickname }}
+
+
审批意见:
+
+ {{ activity.opinion }}
+
+
+
+ {{ formatDate(activity.createTime) }}
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/bpm/processInstance/detail/dialog/TaskSignDeleteForm.vue b/src/views/bpm/processInstance/detail/dialog/TaskSignDeleteForm.vue
index 19bb2dcecca754163967e4ae283035adafa15cf2..fc6d6b2cf83a16aa29a747215b88df9cfe030197 100644
--- a/src/views/bpm/processInstance/detail/dialog/TaskSignDeleteForm.vue
+++ b/src/views/bpm/processInstance/detail/dialog/TaskSignDeleteForm.vue
@@ -9,7 +9,7 @@
>
-
+
{{ item.name }}
({{ item.assigneeUser?.deptName || item.ownerUser?.deptName }} -
{{ item.assigneeUser?.nickname || item.ownerUser?.nickname }})
diff --git a/src/views/bpm/processInstance/detail/index.vue b/src/views/bpm/processInstance/detail/index.vue
index f3072e561429990f8794fe7fa1e4811ed3984dcb..eafb7eabe609b759248f00c83d66a7fe09af7069 100644
--- a/src/views/bpm/processInstance/detail/index.vue
+++ b/src/views/bpm/processInstance/detail/index.vue
@@ -47,10 +47,10 @@
@@ -363,7 +363,7 @@ const loadRunningTask = (tasks) => {
// 2.4 处理 approve 表单
if (task.formId && task.formConf) {
const approveForm = {}
- setConfAndFields2(approveForm, task.formConf, task.formFields, task.formVariable)
+ setConfAndFields2(approveForm, task.formConf, task.formFields, task.formVariables)
approveForms.value.push(approveForm)
} else {
approveForms.value.push({}) // 占位,避免为空
diff --git a/src/views/bpm/processInstance/detail/index_new.vue b/src/views/bpm/processInstance/detail/index_new.vue
new file mode 100644
index 0000000000000000000000000000000000000000..4529c3555473d9cc19e94d2a438cd4cc22f98837
--- /dev/null
+++ b/src/views/bpm/processInstance/detail/index_new.vue
@@ -0,0 +1,227 @@
+
+
+
+ 编号:{{ id }}
+
+
+
{{ processInstance.name }}
+
+
+
+
+
+

+ {{ processInstance?.startUser?.nickname }}
+
+
{{ formatDate(processInstance.startTime) }} 提交
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 流转评论
+
+
+
+
+
+
diff --git a/src/views/bpm/processInstance/index.vue b/src/views/bpm/processInstance/index.vue
index 7ca07f90003fc0c0aa5663c9a38f386b8e00ea61..f1d6ca734a933dc8ecf65191044c253e5a52d9bd 100644
--- a/src/views/bpm/processInstance/index.vue
+++ b/src/views/bpm/processInstance/index.vue
@@ -76,7 +76,7 @@
type="primary"
plain
v-hasPermi="['bpm:process-instance:query']"
- @click="handleCreate()"
+ @click="handleCreate(undefined)"
>
发起流程
@@ -146,7 +146,7 @@
>
取消
-
+
重新发起
@@ -167,6 +167,8 @@ import { dateFormatter, formatPast2 } from '@/utils/formatTime'
import { ElMessageBox } from 'element-plus'
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
import { CategoryApi } from '@/api/bpm/category'
+import { ProcessInstanceVO } from '@/api/bpm/processInstance'
+import * as DefinitionApi from '@/api/bpm/definition'
defineOptions({ name: 'BpmProcessInstanceMy' })
@@ -214,10 +216,22 @@ const resetQuery = () => {
}
/** 发起流程操作 **/
-const handleCreate = (id) => {
- router.push({
+const handleCreate = async (row?: ProcessInstanceVO) => {
+ // 如果是【业务表单】,不支持重新发起
+ if (row?.id) {
+ const processDefinitionDetail = await DefinitionApi.getProcessDefinition(
+ row.processDefinitionId
+ )
+ debugger
+ if (processDefinitionDetail.formType === 20) {
+ message.error('重新发起流程失败,原因:该流程使用业务表单,不支持重新发起')
+ return
+ }
+ }
+ // 跳转发起流程界面
+ await router.push({
name: 'BpmProcessInstanceCreate',
- query: { processInstanceId: id }
+ query: { processInstanceId: row?.id }
})
}
diff --git a/src/views/bpm/processInstance/manager/index.vue b/src/views/bpm/processInstance/manager/index.vue
index ab8da9c9bf43de6845895fb4730f8f166239c55e..bce479d1284f1057ead604100b3d79b67055326e 100644
--- a/src/views/bpm/processInstance/manager/index.vue
+++ b/src/views/bpm/processInstance/manager/index.vue
@@ -76,7 +76,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
- class="!w-220px"
+ class="!w-240px"
/>
diff --git a/src/views/bpm/processListener/ProcessListenerForm.vue b/src/views/bpm/processListener/ProcessListenerForm.vue
index 8d4e9796baed3e25ecaec1ef1f7ef7777818896f..a9684dffb49de9a8472799b298514623704cc5c1 100644
--- a/src/views/bpm/processListener/ProcessListenerForm.vue
+++ b/src/views/bpm/processListener/ProcessListenerForm.vue
@@ -15,7 +15,7 @@
{{ dict.label }}
diff --git a/src/views/bpm/task/copy/index.vue b/src/views/bpm/task/copy/index.vue
index adc1fe325995368070ed96ee4ab90a3be7aa7e6a..93f55c6824ab31a7948f11b579fce6daf7743ce1 100644
--- a/src/views/bpm/task/copy/index.vue
+++ b/src/views/bpm/task/copy/index.vue
@@ -11,6 +11,7 @@
diff --git a/src/views/crm/contact/ContactForm.vue b/src/views/crm/contact/ContactForm.vue
index ac749da904c2485e705ae43fd0b4dba82f9b00d0..81813e6a21ea0c26ba677de1a0ad8ef848e7fc3d 100644
--- a/src/views/crm/contact/ContactForm.vue
+++ b/src/views/crm/contact/ContactForm.vue
@@ -90,7 +90,7 @@
{{ dict.label }}
@@ -153,6 +153,7 @@
placeholder="选择下次联系时间"
type="datetime"
value-format="x"
+ class="!w-1/1"
/>
diff --git a/src/views/crm/contract/config/index.vue b/src/views/crm/contract/config/index.vue
index be654f7631bd7b5c9dc530fb21b4c1c4fbdf3f74..c59212334fb72831af34a7e4fc669a4bc43f1656 100644
--- a/src/views/crm/contract/config/index.vue
+++ b/src/views/crm/contract/config/index.vue
@@ -27,8 +27,8 @@
@change="changeNotifyEnable"
class="ml-4"
>
-
不提醒
-
提醒
+
不提醒
+
提醒
diff --git a/src/views/crm/contract/detail/index.vue b/src/views/crm/contract/detail/index.vue
index 0829e10064de8dfabaf89c40c6001bffecaef746..9d5e14ca49fd70f0ea360eb89fd43e86caaf35b6 100644
--- a/src/views/crm/contract/detail/index.vue
+++ b/src/views/crm/contract/detail/index.vue
@@ -36,7 +36,7 @@
ref="permissionListRef"
:biz-id="contract.id!"
:biz-type="BizTypeEnum.CRM_CONTRACT"
- :show-action="false"
+ :show-action="true"
@quit-team="close"
/>
diff --git a/src/views/crm/customer/CustomerForm.vue b/src/views/crm/customer/CustomerForm.vue
index 82869719d586157e0f00737da8d46f4f576694fd..9a904d2e737bb48d4aa17de3caa69bfe2551d2c0 100644
--- a/src/views/crm/customer/CustomerForm.vue
+++ b/src/views/crm/customer/CustomerForm.vue
@@ -127,6 +127,7 @@
placeholder="选择下次联系时间"
type="datetime"
value-format="x"
+ class="!w-1/1"
/>
diff --git a/src/views/crm/customer/poolConfig/index.vue b/src/views/crm/customer/poolConfig/index.vue
index 2880887764c7b8b327934a38e4ec828aada58cb5..28d58a664122c2fa77654f08251397e89f8aca3a 100644
--- a/src/views/crm/customer/poolConfig/index.vue
+++ b/src/views/crm/customer/poolConfig/index.vue
@@ -27,8 +27,8 @@
- 不启用
- 启用
+ 不启用
+ 启用
@@ -44,8 +44,8 @@
@change="changeNotifyEnable"
class="ml-4"
>
-
不提醒
-
提醒
+
不提醒
+
提醒
diff --git a/src/views/crm/permission/components/PermissionForm.vue b/src/views/crm/permission/components/PermissionForm.vue
index 9cf8867f2e637522c58667743c60ca76770e7092..632a34714c187ad9586c5e8a7716dff4944c5838 100644
--- a/src/views/crm/permission/components/PermissionForm.vue
+++ b/src/views/crm/permission/components/PermissionForm.vue
@@ -23,7 +23,7 @@
v-for="dict in getIntDictOptions(DICT_TYPE.CRM_PERMISSION_LEVEL)"
:key="dict.value"
>
-
+
{{ dict.label }}
@@ -34,9 +34,9 @@
label="同时添加至"
>
- 联系人
- 商机
- 合同
+ 联系人
+ 商机
+ 合同
diff --git a/src/views/crm/permission/components/TransferForm.vue b/src/views/crm/permission/components/TransferForm.vue
index 311071be9db740381378db588328dda3eb448f9b..43d5af74b45a2cf3ae88d9f9c880d4801e4e340d 100644
--- a/src/views/crm/permission/components/TransferForm.vue
+++ b/src/views/crm/permission/components/TransferForm.vue
@@ -20,8 +20,8 @@
- 移除
- 加入团队
+ 移除
+ 加入团队
@@ -30,7 +30,7 @@
v-for="dict in getIntDictOptions(DICT_TYPE.CRM_PERMISSION_LEVEL)"
:key="dict.value"
>
-
+
{{ dict.label }}
@@ -38,9 +38,9 @@
- 联系人
- 商机
- 合同
+ 联系人
+ 商机
+ 合同
diff --git a/src/views/crm/receivable/ReceivableForm.vue b/src/views/crm/receivable/ReceivableForm.vue
index a44164a32b6b005659982a176dc00e54b787e19d..61fac08d263181188dd0a9ff8ee3bee5bb1da494 100644
--- a/src/views/crm/receivable/ReceivableForm.vue
+++ b/src/views/crm/receivable/ReceivableForm.vue
@@ -124,6 +124,7 @@
placeholder="选择回款日期"
type="date"
value-format="x"
+ class="!w-100%"
/>
diff --git a/src/views/crm/receivable/plan/ReceivablePlanForm.vue b/src/views/crm/receivable/plan/ReceivablePlanForm.vue
index 0d4ef179a4699d11b8deb51ef6e61e36a7d2b6b6..f321592a28a7d01ea5d40416b8075e7b6ecec718 100644
--- a/src/views/crm/receivable/plan/ReceivablePlanForm.vue
+++ b/src/views/crm/receivable/plan/ReceivablePlanForm.vue
@@ -89,6 +89,7 @@
placeholder="选择计划回款日期"
type="date"
value-format="x"
+ class="!w-100%"
/>
diff --git a/src/views/crm/statistics/performance/components/ContractCountPerformance.vue b/src/views/crm/statistics/performance/components/ContractCountPerformance.vue
index f911bb2d6a85f58feec1c0747fe96ce58d278701..fa5a897ba44e2e4920e7b979e9f5f71fce9db5c5 100644
--- a/src/views/crm/statistics/performance/components/ContractCountPerformance.vue
+++ b/src/views/crm/statistics/performance/components/ContractCountPerformance.vue
@@ -1,5 +1,4 @@
-
@@ -64,13 +63,13 @@ const echartsOption = reactive({
data: []
},
{
- name: '同比增长率(%)',
+ name: '环比增长率(%)',
type: 'line',
yAxisIndex: 1,
data: []
},
{
- name: '环比增长率(%)',
+ name: '同比增长率(%)',
type: 'line',
yAxisIndex: 1,
data: []
@@ -173,7 +172,9 @@ const loadData = async () => {
(s: StatisticsPerformanceRespVO) => s.lastMonthCount
)
echartsOption.series[3]['data'] = performanceList.map((s: StatisticsPerformanceRespVO) =>
- s.lastMonthCount !== 0 ? ((s.currentMonthCount / s.lastMonthCount) * 100).toFixed(2) : 'NULL'
+ s.lastMonthCount !== 0
+ ? (((s.currentMonthCount - s.lastMonthCount) / s.lastMonthCount) * 100).toFixed(2)
+ : 'NULL'
)
}
if (echartsOption.series && echartsOption.series[2] && echartsOption.series[2]['data']) {
@@ -181,7 +182,9 @@ const loadData = async () => {
(s: StatisticsPerformanceRespVO) => s.lastYearCount
)
echartsOption.series[4]['data'] = performanceList.map((s: StatisticsPerformanceRespVO) =>
- s.lastYearCount !== 0 ? ((s.currentMonthCount / s.lastYearCount) * 100).toFixed(2) : 'NULL'
+ s.lastYearCount !== 0
+ ? (((s.currentMonthCount - s.lastYearCount) / s.lastYearCount) * 100).toFixed(2)
+ : 'NULL'
)
}
@@ -197,8 +200,8 @@ const tableData = reactive([
{ title: '当月合同数量统计(个)' },
{ title: '上月合同数量统计(个)' },
{ title: '去年当月合同数量统计(个)' },
- { title: '同比增长率(%)' },
- { title: '环比增长率(%)' }
+ { title: '环比增长率(%)' },
+ { title: '同比增长率(%)' }
])
// 定义 convertListData 方法,数据行列转置,展示每月数据
@@ -214,9 +217,13 @@ const convertListData = () => {
tableData[1]['prop' + index] = item.lastMonthCount
tableData[2]['prop' + index] = item.lastYearCount
tableData[3]['prop' + index] =
- item.lastMonthCount !== 0 ? (item.currentMonthCount / item.lastMonthCount).toFixed(2) : 'NULL'
+ item.lastMonthCount !== 0
+ ? (((item.currentMonthCount - item.lastMonthCount) / item.lastMonthCount) * 100).toFixed(2)
+ : 'NULL'
tableData[4]['prop' + index] =
- item.lastYearCount !== 0 ? (item.currentMonthCount / item.lastYearCount).toFixed(2) : 'NULL'
+ item.lastYearCount !== 0
+ ? (((item.currentMonthCount - item.lastYearCount) / item.lastYearCount) * 100).toFixed(2)
+ : 'NULL'
})
}
diff --git a/src/views/crm/statistics/performance/components/ContractPricePerformance.vue b/src/views/crm/statistics/performance/components/ContractPricePerformance.vue
index f97b612c9c4f8b831cf6b046255e1a032ccbc995..dd52d9fb34bd21d653b31e8a5a1b452b5efcee0f 100644
--- a/src/views/crm/statistics/performance/components/ContractPricePerformance.vue
+++ b/src/views/crm/statistics/performance/components/ContractPricePerformance.vue
@@ -1,5 +1,4 @@
-
@@ -64,13 +63,13 @@ const echartsOption = reactive({
data: []
},
{
- name: '同比增长率(%)',
+ name: '环比增长率(%)',
type: 'line',
yAxisIndex: 1,
data: []
},
{
- name: '环比增长率(%)',
+ name: '同比增长率(%)',
type: 'line',
yAxisIndex: 1,
data: []
@@ -173,7 +172,9 @@ const loadData = async () => {
(s: StatisticsPerformanceRespVO) => s.lastMonthCount
)
echartsOption.series[3]['data'] = performanceList.map((s: StatisticsPerformanceRespVO) =>
- s.lastMonthCount !== 0 ? ((s.currentMonthCount / s.lastMonthCount) * 100).toFixed(2) : 'NULL'
+ s.lastMonthCount !== 0
+ ? (((s.currentMonthCount - s.lastMonthCount) / s.lastMonthCount) * 100).toFixed(2)
+ : 'NULL'
)
}
if (echartsOption.series && echartsOption.series[2] && echartsOption.series[2]['data']) {
@@ -181,7 +182,9 @@ const loadData = async () => {
(s: StatisticsPerformanceRespVO) => s.lastYearCount
)
echartsOption.series[4]['data'] = performanceList.map((s: StatisticsPerformanceRespVO) =>
- s.lastYearCount !== 0 ? ((s.currentMonthCount / s.lastYearCount) * 100).toFixed(2) : 'NULL'
+ s.lastYearCount !== 0
+ ? (((s.currentMonthCount - s.lastYearCount) / s.lastYearCount) * 100).toFixed(2)
+ : 'NULL'
)
}
@@ -197,8 +200,8 @@ const tableData = reactive([
{ title: '当月合同金额统计(元)' },
{ title: '上月合同金额统计(元)' },
{ title: '去年当月合同金额统计(元)' },
- { title: '同比增长率(%)' },
- { title: '环比增长率(%)' }
+ { title: '环比增长率(%)' },
+ { title: '同比增长率(%)' }
])
// 定义 init 方法
@@ -214,9 +217,13 @@ const convertListData = () => {
tableData[1]['prop' + index] = item.lastMonthCount
tableData[2]['prop' + index] = item.lastYearCount
tableData[3]['prop' + index] =
- item.lastMonthCount !== 0 ? (item.currentMonthCount / item.lastMonthCount).toFixed(2) : 'NULL'
+ item.lastMonthCount !== 0
+ ? (((item.currentMonthCount - item.lastMonthCount) / item.lastMonthCount) * 100).toFixed(2)
+ : 'NULL'
tableData[4]['prop' + index] =
- item.lastYearCount !== 0 ? (item.currentMonthCount / item.lastYearCount).toFixed(2) : 'NULL'
+ item.lastYearCount !== 0
+ ? (((item.currentMonthCount - item.lastYearCount) / item.lastYearCount) * 100).toFixed(2)
+ : 'NULL'
})
}
diff --git a/src/views/crm/statistics/performance/components/ReceivablePricePerformance.vue b/src/views/crm/statistics/performance/components/ReceivablePricePerformance.vue
index 14f59909fded1ca39efdff7c2887f846ef530e0e..169f074b8fa0f00e6576d1615b440864a6c9694b 100644
--- a/src/views/crm/statistics/performance/components/ReceivablePricePerformance.vue
+++ b/src/views/crm/statistics/performance/components/ReceivablePricePerformance.vue
@@ -17,7 +17,6 @@
:prop="item.prop"
align="center"
>
-
{{ scope.row[item.prop] }}
@@ -64,13 +63,13 @@ const echartsOption = reactive({
data: []
},
{
- name: '同比增长率(%)',
+ name: '环比增长率(%)',
type: 'line',
yAxisIndex: 1,
data: []
},
{
- name: '环比增长率(%)',
+ name: '同比增长率(%)',
type: 'line',
yAxisIndex: 1,
data: []
@@ -121,7 +120,6 @@ const echartsOption = reactive({
type: 'value',
name: '',
axisTick: {
- // TODO @scholar:IDEA 爆红的处理
alignWithLabel: true,
lineStyle: {
width: 0
@@ -174,7 +172,9 @@ const loadData = async () => {
(s: StatisticsPerformanceRespVO) => s.lastMonthCount
)
echartsOption.series[3]['data'] = performanceList.map((s: StatisticsPerformanceRespVO) =>
- s.lastMonthCount !== 0 ? ((s.currentMonthCount / s.lastMonthCount) * 100).toFixed(2) : 'NULL'
+ s.lastMonthCount !== 0
+ ? (((s.currentMonthCount - s.lastMonthCount) / s.lastMonthCount) * 100).toFixed(2)
+ : 'NULL'
)
}
if (echartsOption.series && echartsOption.series[2] && echartsOption.series[1]['data']) {
@@ -182,7 +182,9 @@ const loadData = async () => {
(s: StatisticsPerformanceRespVO) => s.lastYearCount
)
echartsOption.series[4]['data'] = performanceList.map((s: StatisticsPerformanceRespVO) =>
- s.lastYearCount !== 0 ? ((s.currentMonthCount / s.lastYearCount) * 100).toFixed(2) : 'NULL'
+ s.lastYearCount !== 0
+ ? (((s.currentMonthCount - s.lastYearCount) / s.lastYearCount) * 100).toFixed(2)
+ : 'NULL'
)
}
@@ -193,14 +195,13 @@ const loadData = async () => {
}
// 初始化数据
-// TODO @scholar:加个 as any[],避免 idea 爆红
-const columnsData = reactive([] as any[])
+const columnsData = reactive([])
const tableData = reactive([
{ title: '当月回款金额统计(元)' },
{ title: '上月回款金额统计(元)' },
{ title: '去年当月回款金额统计(元)' },
- { title: '同比增长率(%)' },
- { title: '环比增长率(%)' }
+ { title: '环比增长率(%)' },
+ { title: '同比增长率(%)' }
])
// 定义 init 方法
@@ -215,11 +216,14 @@ const convertListData = () => {
tableData[0]['prop' + index] = item.currentMonthCount
tableData[1]['prop' + index] = item.lastMonthCount
tableData[2]['prop' + index] = item.lastYearCount
- // TODO @scholar:百分比,使用 erpCalculatePercentage 直接计算;如果是 0,则返回 0,统一就好哈;
tableData[3]['prop' + index] =
- item.lastMonthCount !== 0 ? (item.currentMonthCount / item.lastMonthCount).toFixed(2) : 'NULL'
+ item.lastMonthCount !== 0
+ ? (((item.currentMonthCount - item.lastMonthCount) / item.lastMonthCount) * 100).toFixed(2)
+ : 'NULL'
tableData[4]['prop' + index] =
- item.lastYearCount !== 0 ? (item.currentMonthCount / item.lastYearCount).toFixed(2) : 'NULL'
+ item.lastYearCount !== 0
+ ? (((item.currentMonthCount - item.lastYearCount) / item.lastYearCount) * 100).toFixed(2)
+ : 'NULL'
})
}
diff --git a/src/views/crm/statistics/performance/index.vue b/src/views/crm/statistics/performance/index.vue
index 4a443c55ef37e9458c127690c97760cda0a826f3..822afec9b8aafe623082114d0003e312c8a9015e 100644
--- a/src/views/crm/statistics/performance/index.vue
+++ b/src/views/crm/statistics/performance/index.vue
@@ -73,7 +73,7 @@
import * as DeptApi from '@/api/system/dept'
import * as UserApi from '@/api/system/user'
import { useUserStore } from '@/store/modules/user'
-import { beginOfDay, formatDate } from '@/utils/formatTime'
+import { beginOfDay, endOfDay, formatDate } from '@/utils/formatTime'
import { defaultProps, handleTree } from '@/utils/tree'
import ContractCountPerformance from './components/ContractCountPerformance.vue'
import ContractPricePerformance from './components/ContractPricePerformance.vue'
@@ -85,8 +85,8 @@ const queryParams = reactive({
deptId: useUserStore().getUser.deptId,
userId: undefined,
times: [
- // 默认显示当年的数据
- formatDate(beginOfDay(new Date(new Date().getTime() - 3600 * 1000 * 24 * 7)))
+ formatDate(beginOfDay(new Date(new Date().getFullYear(), 0, 1))),
+ formatDate(endOfDay(new Date(new Date().getFullYear(), 11, 31)))
]
})
@@ -100,31 +100,20 @@ const userListByDeptId = computed(() =>
: []
)
-// TODO @scholar:改成尾注释,保证 vue 内容短一点;变量名小写
// 活跃标签
const activeTab = ref('ContractCountPerformance')
-// 1.员工合同数量统计
-const ContractCountPerformanceRef = ref()
-// 2.员工合同金额统计
-const ContractPricePerformanceRef = ref()
-// 3.员工回款金额统计
-const ReceivablePricePerformanceRef = ref()
+const ContractCountPerformanceRef = ref() // 员工合同数量统计
+const ContractPricePerformanceRef = ref() // 员工合同金额统计
+const ReceivablePricePerformanceRef = ref() // 员工回款金额统计
/** 搜索按钮操作 */
const handleQuery = () => {
// 从 queryParams.times[0] 中获取到了年份
const selectYear = parseInt(queryParams.times[0])
+ queryParams.times[0] = formatDate(beginOfDay(new Date(selectYear, 0, 1)))
+ queryParams.times[1] = formatDate(endOfDay(new Date(selectYear, 11, 31)))
- // 创建一个新的 Date 对象,设置为指定的年份的第一天
- const fullDate = new Date(selectYear, 0, 1, 0, 0, 0)
-
- // 将完整的日期时间格式化为需要的字符串形式,比如 2004-01-01 00:00:00
- // TODO @scholar:看看,是不是可以使用 year 哈
- queryParams.times[0] = `${fullDate.getFullYear()}-${String(fullDate.getMonth() + 1).padStart(
- 2,
- '0'
- )}-${String(fullDate.getDate()).padStart(2, '0')} ${String(fullDate.getHours()).padStart(2, '0')}:${String(fullDate.getMinutes()).padStart(2, '0')}:${String(fullDate.getSeconds()).padStart(2, '0')}`
-
+ // 执行查询
switch (activeTab.value) {
case 'ContractCountPerformance':
ContractCountPerformanceRef.value?.loadData?.()
diff --git a/src/views/erp/finance/account/AccountForm.vue b/src/views/erp/finance/account/AccountForm.vue
index 2f2e6f40c738656b418a0f69d1ff55093ddd8c6b..bde4bd2d5a483a78700246d79f1c4e92277e56e3 100644
--- a/src/views/erp/finance/account/AccountForm.vue
+++ b/src/views/erp/finance/account/AccountForm.vue
@@ -21,7 +21,7 @@
{{ dict.label }}
diff --git a/src/views/erp/finance/payment/index.vue b/src/views/erp/finance/payment/index.vue
index 56bc83d3a39bc609ea766a8ad7a6562ac989894d..a449ca5e6580d13522363ffcf684138eab43bee7 100644
--- a/src/views/erp/finance/payment/index.vue
+++ b/src/views/erp/finance/payment/index.vue
@@ -30,7 +30,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
- class="!w-220px"
+ class="!w-240px"
/>
diff --git a/src/views/erp/finance/receipt/index.vue b/src/views/erp/finance/receipt/index.vue
index 1c8f82f8cc3c19969bf274ee6a2f086a926e7cb0..b96a33d5cde6c9b85dc81bdf5e6de078148d9fd2 100644
--- a/src/views/erp/finance/receipt/index.vue
+++ b/src/views/erp/finance/receipt/index.vue
@@ -30,7 +30,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
- class="!w-220px"
+ class="!w-240px"
/>
diff --git a/src/views/erp/product/category/ProductCategoryForm.vue b/src/views/erp/product/category/ProductCategoryForm.vue
index cef420c75982715a25bf19cd0efef6e5c1305175..488b31e1299202930bfd28405800e9200e6c3a64 100644
--- a/src/views/erp/product/category/ProductCategoryForm.vue
+++ b/src/views/erp/product/category/ProductCategoryForm.vue
@@ -31,7 +31,7 @@
{{ dict.label }}
diff --git a/src/views/erp/product/product/ProductForm.vue b/src/views/erp/product/product/ProductForm.vue
index 3f9de0ad185e20c6bbc9c20d1c1acde7e8a95e2a..75be903b8d239e26f954ba1f92b6988cd2685305 100644
--- a/src/views/erp/product/product/ProductForm.vue
+++ b/src/views/erp/product/product/ProductForm.vue
@@ -50,7 +50,7 @@
{{ dict.label }}
diff --git a/src/views/erp/product/unit/ProductUnitForm.vue b/src/views/erp/product/unit/ProductUnitForm.vue
index ca14ff43998fb1809895c9686975ccce1c9966dc..bced5db839eb7e59cdadcf71df9f4677f80df514 100644
--- a/src/views/erp/product/unit/ProductUnitForm.vue
+++ b/src/views/erp/product/unit/ProductUnitForm.vue
@@ -15,7 +15,7 @@
{{ dict.label }}
diff --git a/src/views/erp/purchase/in/index.vue b/src/views/erp/purchase/in/index.vue
index ce8ecee7edac090c656d3c036efe35f36434af37..b1277d4d9a2706dac1eca058a22ead72a6d25705 100644
--- a/src/views/erp/purchase/in/index.vue
+++ b/src/views/erp/purchase/in/index.vue
@@ -43,7 +43,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
- class="!w-220px"
+ class="!w-240px"
/>
diff --git a/src/views/erp/purchase/order/components/PurchaseOrderInEnableList.vue b/src/views/erp/purchase/order/components/PurchaseOrderInEnableList.vue
index e10694a0a08e5c83cb4ea4370225074331795b59..f3df9532c2c15ceccf81f5923a8ff88a6f840f2f 100644
--- a/src/views/erp/purchase/order/components/PurchaseOrderInEnableList.vue
+++ b/src/views/erp/purchase/order/components/PurchaseOrderInEnableList.vue
@@ -64,7 +64,7 @@
diff --git a/src/views/erp/purchase/order/components/PurchaseOrderReturnEnableList.vue b/src/views/erp/purchase/order/components/PurchaseOrderReturnEnableList.vue
index cac2bbc413132b0d2bbf3d5cbdab9b86447246d5..17e59db1b7d05657eda46a9f81b8d3795e17d081 100644
--- a/src/views/erp/purchase/order/components/PurchaseOrderReturnEnableList.vue
+++ b/src/views/erp/purchase/order/components/PurchaseOrderReturnEnableList.vue
@@ -64,7 +64,7 @@
diff --git a/src/views/erp/purchase/order/index.vue b/src/views/erp/purchase/order/index.vue
index f179fa989d921a3adea778baae83b91d5a010944..14177611a23130d6361c6f6ab45492b12f10b538 100644
--- a/src/views/erp/purchase/order/index.vue
+++ b/src/views/erp/purchase/order/index.vue
@@ -43,7 +43,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
- class="!w-220px"
+ class="!w-240px"
/>
diff --git a/src/views/erp/purchase/return/index.vue b/src/views/erp/purchase/return/index.vue
index 545d18acc145489fb75b3e8b6d6d4637b9ce3f5b..cdf8411ad41c339106ef9d576adff92ce1bc3189 100644
--- a/src/views/erp/purchase/return/index.vue
+++ b/src/views/erp/purchase/return/index.vue
@@ -43,7 +43,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
- class="!w-220px"
+ class="!w-240px"
/>
diff --git a/src/views/erp/purchase/supplier/SupplierForm.vue b/src/views/erp/purchase/supplier/SupplierForm.vue
index d3c433c83f0bfa9ca6ae7043b4953e3ad29f35a0..3225df709bd5b49812f8da195dc21d1116adc5ff 100644
--- a/src/views/erp/purchase/supplier/SupplierForm.vue
+++ b/src/views/erp/purchase/supplier/SupplierForm.vue
@@ -44,7 +44,7 @@
{{ dict.label }}
diff --git a/src/views/erp/sale/customer/CustomerForm.vue b/src/views/erp/sale/customer/CustomerForm.vue
index da6e004f078b47e704feefcba02de1f33417e998..ce63cbb081cc389c366a29afc31e46e2caf9f231 100644
--- a/src/views/erp/sale/customer/CustomerForm.vue
+++ b/src/views/erp/sale/customer/CustomerForm.vue
@@ -44,7 +44,7 @@
{{ dict.label }}
diff --git a/src/views/erp/sale/order/components/SaleOrderOutEnableList.vue b/src/views/erp/sale/order/components/SaleOrderOutEnableList.vue
index 55de7459c930f213ca3e004b644b5c3ac667e55e..38dcac42d17824fe12630577b82b49f84f27fd97 100644
--- a/src/views/erp/sale/order/components/SaleOrderOutEnableList.vue
+++ b/src/views/erp/sale/order/components/SaleOrderOutEnableList.vue
@@ -64,7 +64,7 @@
diff --git a/src/views/erp/sale/order/components/SaleOrderReturnEnableList.vue b/src/views/erp/sale/order/components/SaleOrderReturnEnableList.vue
index a93a9971a43ce6cc5bb0d603bdbcbcdc6c9f5dee..75d925d5a1a87641e830eec79b9ca90f98373867 100644
--- a/src/views/erp/sale/order/components/SaleOrderReturnEnableList.vue
+++ b/src/views/erp/sale/order/components/SaleOrderReturnEnableList.vue
@@ -64,7 +64,7 @@
diff --git a/src/views/erp/sale/order/index.vue b/src/views/erp/sale/order/index.vue
index deb03c00feb65f7339deb9c0ce154920ad00b72b..4d151b768c8702ab2a0945ae2ff96d94f00ddfc4 100644
--- a/src/views/erp/sale/order/index.vue
+++ b/src/views/erp/sale/order/index.vue
@@ -43,7 +43,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
- class="!w-220px"
+ class="!w-240px"
/>
diff --git a/src/views/erp/sale/out/index.vue b/src/views/erp/sale/out/index.vue
index bd143b90d63efc4bcb273c342af3e00864ab0269..fdc7f71be92f9af4242c18e9c280969eb7aa7926 100644
--- a/src/views/erp/sale/out/index.vue
+++ b/src/views/erp/sale/out/index.vue
@@ -43,7 +43,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
- class="!w-220px"
+ class="!w-240px"
/>
diff --git a/src/views/erp/sale/return/index.vue b/src/views/erp/sale/return/index.vue
index c88f58413412ce6980476a7a07ca4747e7c0af67..be0b174bcaf8a1dd2e5bfd62bc0302187bf8f6f5 100644
--- a/src/views/erp/sale/return/index.vue
+++ b/src/views/erp/sale/return/index.vue
@@ -43,7 +43,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
- class="!w-220px"
+ class="!w-240px"
/>
diff --git a/src/views/erp/stock/in/index.vue b/src/views/erp/stock/in/index.vue
index 5a8f6cfb27cc22613599496c1e808df1d51314da..ca697e9c2baf27c766a445eab29ff9c7b324061b 100644
--- a/src/views/erp/stock/in/index.vue
+++ b/src/views/erp/stock/in/index.vue
@@ -43,7 +43,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
- class="!w-220px"
+ class="!w-240px"
/>
diff --git a/src/views/erp/stock/record/index.vue b/src/views/erp/stock/record/index.vue
index 6946a19895ecf7ffc7915f8a072a9ae118b75cc4..35b58ca391b376d3ff47c36939a079115c879485 100644
--- a/src/views/erp/stock/record/index.vue
+++ b/src/views/erp/stock/record/index.vue
@@ -75,7 +75,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
- class="!w-220px"
+ class="!w-240px"
/>
diff --git a/src/views/erp/stock/warehouse/WarehouseForm.vue b/src/views/erp/stock/warehouse/WarehouseForm.vue
index ea88a18cc419a58798d537d593c4887f1efd4a6a..f65cea6a1fc4132d5f6b0932ac0216227d1e7571 100644
--- a/src/views/erp/stock/warehouse/WarehouseForm.vue
+++ b/src/views/erp/stock/warehouse/WarehouseForm.vue
@@ -19,7 +19,7 @@
{{ dict.label }}
diff --git a/src/views/infra/codegen/components/ColumInfoForm.vue b/src/views/infra/codegen/components/ColumInfoForm.vue
index 737c2e2bab26e9079fb4b502a9642779cbfc055b..f5260226e1017068111d3d8193337f21413dde61 100644
--- a/src/views/infra/codegen/components/ColumInfoForm.vue
+++ b/src/views/infra/codegen/components/ColumInfoForm.vue
@@ -37,26 +37,26 @@
-
+
-
+
-
+
@@ -75,7 +75,7 @@
-
+
diff --git a/src/views/infra/codegen/components/GenerateInfoForm.vue b/src/views/infra/codegen/components/GenerateInfoForm.vue
index d2a01cc049a09f8dd58f97f1e143ff7487f17d9c..aaf176fb38152ad70723af584c27e6db16c0014c 100644
--- a/src/views/infra/codegen/components/GenerateInfoForm.vue
+++ b/src/views/infra/codegen/components/GenerateInfoForm.vue
@@ -285,8 +285,8 @@
- 一对多
- 一对一
+ 一对多
+ 一对一
diff --git a/src/views/infra/config/ConfigForm.vue b/src/views/infra/config/ConfigForm.vue
index f61face0651ca3049f426ad587b5ddfcdbeb0b4e..4f7333a60f41e5dc75f391b0dc9b15dffe0ca116 100644
--- a/src/views/infra/config/ConfigForm.vue
+++ b/src/views/infra/config/ConfigForm.vue
@@ -24,7 +24,7 @@
{{ dict.label }}
diff --git a/src/views/infra/demo/demo01/Demo01ContactForm.vue b/src/views/infra/demo/demo01/Demo01ContactForm.vue
index 5d28112a2ec9671e82245fa2f47217c34421ad8a..f317fe763714d4aed7fd5b58ed74e729bfe7e58b 100644
--- a/src/views/infra/demo/demo01/Demo01ContactForm.vue
+++ b/src/views/infra/demo/demo01/Demo01ContactForm.vue
@@ -15,7 +15,7 @@
{{ dict.label }}
diff --git a/src/views/infra/demo/demo03/erp/Demo03StudentForm.vue b/src/views/infra/demo/demo03/erp/Demo03StudentForm.vue
index 758c7e5db0e9df2edaaeda2f8849dfc1fb9b25e7..b73f423307d83fff8204b52e0b780a10015ee07b 100644
--- a/src/views/infra/demo/demo03/erp/Demo03StudentForm.vue
+++ b/src/views/infra/demo/demo03/erp/Demo03StudentForm.vue
@@ -15,7 +15,7 @@
{{ dict.label }}
diff --git a/src/views/infra/demo/demo03/inner/Demo03StudentForm.vue b/src/views/infra/demo/demo03/inner/Demo03StudentForm.vue
index 98c1b7bf1394a4431454c19c3292742e00ada6b9..8621593bdca4e94a5f6f07e0793b8bac95679ea3 100644
--- a/src/views/infra/demo/demo03/inner/Demo03StudentForm.vue
+++ b/src/views/infra/demo/demo03/inner/Demo03StudentForm.vue
@@ -15,7 +15,7 @@
{{ dict.label }}
diff --git a/src/views/infra/demo/demo03/normal/Demo03StudentForm.vue b/src/views/infra/demo/demo03/normal/Demo03StudentForm.vue
index 4815357e58dc7ec1b449eaec9ca20bdffc11c042..42613c4da1d29628496b188af7a574f4d7a2e3af 100644
--- a/src/views/infra/demo/demo03/normal/Demo03StudentForm.vue
+++ b/src/views/infra/demo/demo03/normal/Demo03StudentForm.vue
@@ -15,7 +15,7 @@
{{ dict.label }}
diff --git a/src/views/infra/druid/index.vue b/src/views/infra/druid/index.vue
index bc047d766e225b918fcffc54c93e1ef0d9c2bc22..2ac99d2398ec8ef8ae3fd7e5eb046de896ddfe42 100644
--- a/src/views/infra/druid/index.vue
+++ b/src/views/infra/druid/index.vue
@@ -2,8 +2,8 @@
-
-
+
+
diff --git a/src/views/mall/product/spu/form/ProductPropertyAddForm.vue b/src/views/mall/product/spu/form/ProductPropertyAddForm.vue
index 9a8eee001d6017e755e750bc1a63a0fc00b2eb8d..f45281b1f0df54824c95a5636d947ad49128cf84 100644
--- a/src/views/mall/product/spu/form/ProductPropertyAddForm.vue
+++ b/src/views/mall/product/spu/form/ProductPropertyAddForm.vue
@@ -7,9 +7,25 @@
:model="formData"
:rules="formRules"
label-width="80px"
+ @keydown.enter.prevent="submitForm"
>
-
+
+
+
@@ -36,6 +52,7 @@ const formRules = reactive({
})
const formRef = ref() // 表单 Ref
const attributeList = ref([]) // 商品属性列表
+const attributeOptions = ref([] as PropertyApi.PropertyVO[]) // 商品属性名称下拉框
const props = defineProps({
propertyList: {
type: Array,
@@ -59,15 +76,39 @@ watch(
const open = async () => {
dialogVisible.value = true
resetForm()
+ // 加载列表
+ await getAttributeOptions()
}
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
/** 提交表单 */
const submitForm = async () => {
- // 校验表单
+ // 1.1 重复添加校验
+ for (const attrItem of attributeList.value) {
+ if (attrItem.name === formData.value.name) {
+ return message.error('该属性已存在,请勿重复添加')
+ }
+ }
+ // 1.2 校验表单
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
+
+ // 2.1 情况一:属性名已存在,则直接使用并结束
+ const existProperty = attributeOptions.value.find((item) => item.name === formData.value.name)
+ if (existProperty) {
+ // 添加到属性列表
+ attributeList.value.push({
+ id: existProperty.id,
+ ...formData.value,
+ values: []
+ })
+ // 关闭弹窗
+ dialogVisible.value = false
+ return
+ }
+
+ // 2.2 情况二:如果是不存在的属性,则需要执行新增
// 提交请求
formLoading.value = true
try {
@@ -79,6 +120,7 @@ const submitForm = async () => {
...formData.value,
values: []
})
+ // 关闭弹窗
message.success(t('common.createSuccess'))
dialogVisible.value = false
} finally {
@@ -93,4 +135,14 @@ const resetForm = () => {
}
formRef.value?.resetFields()
}
+
+/** 获取商品属性下拉选项 */
+const getAttributeOptions = async () => {
+ formLoading.value = true
+ try {
+ attributeOptions.value = await PropertyApi.getPropertySimpleList()
+ } finally {
+ formLoading.value = false
+ }
+}
diff --git a/src/views/mall/product/spu/form/SkuForm.vue b/src/views/mall/product/spu/form/SkuForm.vue
index 0bd797239441ed750be6317c3e611259e91d715e..eb8a7f4bbec3e69134992179f522609f5ab5d3d7 100644
--- a/src/views/mall/product/spu/form/SkuForm.vue
+++ b/src/views/mall/product/spu/form/SkuForm.vue
@@ -1,20 +1,27 @@
-
+
- 默认设置
- 单独设置
+ 默认设置
+ 单独设置
-
- 单规格
- 多规格
+
+ 单规格
+ 多规格
@@ -29,22 +36,22 @@
添加属性
-
+
@@ -94,7 +101,7 @@ const ruleConfig: RuleConfig[] = [
]
const message = useMessage() // 消息弹窗
-
+const formLoading = ref(false)
const props = defineProps({
propFormData: {
type: Object as PropType,
@@ -181,7 +188,7 @@ const onChangeSpec = () => {
}
/** 调用 SkuList generateTableData 方法*/
-const generateSkus = (propertyList) => {
+const generateSkus = (propertyList: any[]) => {
skuListRef.value.generateTableData(propertyList)
}
diff --git a/src/views/mall/product/spu/form/index.vue b/src/views/mall/product/spu/form/index.vue
index de874524698c6bb72463cc180e35f7011d8a1a79..c4e4b7b2d6e1a4114e4cb4f422091a37a495e6fc 100644
--- a/src/views/mall/product/spu/form/index.vue
+++ b/src/views/mall/product/spu/form/index.vue
@@ -63,7 +63,7 @@ import SkuForm from './SkuForm.vue'
import DeliveryForm from './DeliveryForm.vue'
import { convertToInteger, floatToFixed2, formatToFraction } from '@/utils'
-defineOptions({ name: 'ProductSpuForm' })
+defineOptions({ name: 'ProductSpuAdd' })
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
diff --git a/src/views/mall/product/spu/index.vue b/src/views/mall/product/spu/index.vue
index d77d25ee4b4c812cecd5c0acc9ebf4e408a26eac..0451ef3a114356605582a4a7a52b8bb2ab52cc81 100644
--- a/src/views/mall/product/spu/index.vue
+++ b/src/views/mall/product/spu/index.vue
@@ -244,6 +244,7 @@ import * as ProductCategoryApi from '@/api/mall/product/category'
defineOptions({ name: 'ProductSpu' })
const message = useMessage() // 消息弹窗
+const route = useRoute() // 路由
const { t } = useI18n() // 国际化
const { push } = useRouter() // 路由跳转
@@ -431,6 +432,11 @@ onActivated(() => {
/** 初始化 **/
onMounted(async () => {
+ // 解析路由的 categoryId
+ if (route.query.categoryId) {
+ queryParams.value.categoryId = Number(route.query.categoryId)
+ }
+ // 获得商品信息
await getTabsCount()
await getList()
// 获得分类树
diff --git a/src/views/mall/promotion/article/ArticleForm.vue b/src/views/mall/promotion/article/ArticleForm.vue
index 1e44fad65b77fa20f33bce599a713f3106b2dbe7..3f269cb080726004e61d35fb409842bab7be24d5 100644
--- a/src/views/mall/promotion/article/ArticleForm.vue
+++ b/src/views/mall/promotion/article/ArticleForm.vue
@@ -51,7 +51,7 @@
{{ dict.label }}
@@ -64,7 +64,7 @@
{{ dict.label }}
@@ -77,7 +77,7 @@
{{ dict.label }}
diff --git a/src/views/mall/promotion/article/category/ArticleCategoryForm.vue b/src/views/mall/promotion/article/category/ArticleCategoryForm.vue
index f8da3bc898809fcad17405addc86a0292ed14465..2e6e9e29f941f337ce0a258919391a0d9548a421 100644
--- a/src/views/mall/promotion/article/category/ArticleCategoryForm.vue
+++ b/src/views/mall/promotion/article/category/ArticleCategoryForm.vue
@@ -20,7 +20,7 @@
{{ dict.label }}
diff --git a/src/views/mall/promotion/banner/BannerForm.vue b/src/views/mall/promotion/banner/BannerForm.vue
index 03bca0f9ff88583f04702bdbd9f6bf36296c1ed6..9d1b7fc7d3db6d937b2023d300e0b5b9db11b666 100644
--- a/src/views/mall/promotion/banner/BannerForm.vue
+++ b/src/views/mall/promotion/banner/BannerForm.vue
@@ -34,7 +34,7 @@
{{ dict.label }}
@@ -47,7 +47,7 @@
{{ dict.label }}
diff --git a/src/views/mall/promotion/combination/components/CombinationShowcase.vue b/src/views/mall/promotion/combination/components/CombinationShowcase.vue
new file mode 100644
index 0000000000000000000000000000000000000000..ba88434bfb8078c5aa539928e0c5279d593e58ac
--- /dev/null
+++ b/src/views/mall/promotion/combination/components/CombinationShowcase.vue
@@ -0,0 +1,158 @@
+
+
+
+
+
+
+
+
diff --git a/src/views/mall/promotion/combination/components/CombinationTableSelect.vue b/src/views/mall/promotion/combination/components/CombinationTableSelect.vue
new file mode 100644
index 0000000000000000000000000000000000000000..36395214dc8db5aa9269edb355529f88baa33e45
--- /dev/null
+++ b/src/views/mall/promotion/combination/components/CombinationTableSelect.vue
@@ -0,0 +1,345 @@
+
+
+
+
+
diff --git a/src/views/mall/promotion/components/SpuAndSkuList.vue b/src/views/mall/promotion/components/SpuAndSkuList.vue
index facc6cf3fe08734906a2f61855fbd9e85f381094..5a96ddc3cdde2be88276ba299f32f72c757defb7 100644
--- a/src/views/mall/promotion/components/SpuAndSkuList.vue
+++ b/src/views/mall/promotion/components/SpuAndSkuList.vue
@@ -29,6 +29,16 @@
+
+
+ 删除
+
+
diff --git a/src/views/mall/promotion/coupon/components/CouponSendForm.vue b/src/views/mall/promotion/coupon/components/CouponSendForm.vue
index be0223a0786302fbc6b7209836b960b429375ed9..4b9edb7cc728e8b0e483c7df1ffa62dc74cc4874 100644
--- a/src/views/mall/promotion/coupon/components/CouponSendForm.vue
+++ b/src/views/mall/promotion/coupon/components/CouponSendForm.vue
@@ -67,7 +67,7 @@
:disabled="sendLoading"
:loading="sendLoading"
@click="handleSendCoupon(scope.row.id)"
- v-hasPermi="['member:level:update']"
+ v-hasPermi="['promotion:coupon:send']"
>
发送
diff --git a/src/views/mall/promotion/coupon/template/CouponTemplateForm.vue b/src/views/mall/promotion/coupon/template/CouponTemplateForm.vue
index 408f381a4c1afd499185977a0758d0814644503e..28e15c72b57f0a1ae15303c2bdb7761a51419614 100644
--- a/src/views/mall/promotion/coupon/template/CouponTemplateForm.vue
+++ b/src/views/mall/promotion/coupon/template/CouponTemplateForm.vue
@@ -10,12 +10,24 @@
+
+
+
{{ dict.label }}
@@ -40,7 +52,7 @@
{{ dict.label }}
@@ -101,8 +113,8 @@
- 直接领取
- 指定发放
+ 直接领取
+ 指定发放
@@ -130,7 +142,7 @@
{{ dict.label }}
@@ -144,7 +156,6 @@
@@ -218,6 +229,7 @@ const formData = ref({
fixedStartTerm: undefined,
fixedEndTerm: undefined,
productScope: PromotionProductScopeEnum.ALL.scope,
+ description: undefined,
productScopeValues: [], // 商品范围:值为 品类编号列表 或 商品编号列表 ,用于提交
productCategoryIds: [], // 仅用于表单,不提交
productSpuIds: [] // 仅用于表单,不提交
@@ -323,6 +335,7 @@ const resetForm = () => {
formData.value = {
id: undefined,
name: undefined,
+ description: undefined,
discountType: PromotionDiscountTypeEnum.PRICE.type,
discountPrice: undefined,
discountPercent: undefined,
diff --git a/src/views/mall/promotion/discountActivity/DiscountActivityForm.vue b/src/views/mall/promotion/discountActivity/DiscountActivityForm.vue
index d7a980615498c27647ac22506249cb03ae297503..915af43cf03abd789799ae17367131290c32f0a1 100644
--- a/src/views/mall/promotion/discountActivity/DiscountActivityForm.vue
+++ b/src/views/mall/promotion/discountActivity/DiscountActivityForm.vue
@@ -19,6 +19,8 @@
:rule-config="ruleConfig"
:spu-list="spuList"
:spu-property-list-p="spuPropertyList"
+ :isDelete="true"
+ @delete="deleteSpu"
>
@@ -47,6 +49,7 @@ import { cloneDeep } from 'lodash-es'
import * as DiscountActivityApi from '@/api/mall/promotion/discount/discountActivity'
import * as ProductSpuApi from '@/api/mall/product/spu'
import { getPropertyList, RuleConfig } from '@/views/mall/product/spu/components'
+import { formatToFraction } from '@/utils'
defineOptions({ name: 'PromotionDiscountActivityForm' })
@@ -65,8 +68,8 @@ const spuAndSkuListRef = ref() // sku 限时折扣 配置组件Ref
const ruleConfig: RuleConfig[] = []
const spuList = ref([]) // 选择的 spu
const spuPropertyList = ref[]>([])
+const spuIds = ref([])
const selectSpu = (spuId: number, skuIds: number[]) => {
- formRef.value.setValues({ spuId })
getSpuDetails(spuId, skuIds)
}
/**
@@ -75,14 +78,22 @@ const selectSpu = (spuId: number, skuIds: number[]) => {
const getSpuDetails = async (
spuId: number,
skuIds: number[] | undefined,
- products?: DiscountActivityApi.DiscountProductVO[]
+ products?: DiscountActivityApi.DiscountProductVO[],
+ type?: string
) => {
- const spuProperties: SpuProperty[] = []
+ // 如果已经包含 SPU 则跳过
+ if (spuIds.value.includes(spuId)) {
+ if (type !== 'load') {
+ message.error('数据重复选择!')
+ }
+ return
+ }
+ spuIds.value.push(spuId)
const res = (await ProductSpuApi.getSpuDetailList([spuId])) as DiscountActivityApi.SpuExtension[]
if (res.length == 0) {
return
}
- spuList.value = []
+ //spuList.value = []
// 因为只能选择一个
const spu = res[0]
const selectSkus =
@@ -100,15 +111,19 @@ const getSpuDetails = async (
config = product || config
}
sku.productConfig = config
+ sku.price = formatToFraction(sku.price)
+ sku.marketPrice = formatToFraction(sku.marketPrice)
+ sku.costPrice = formatToFraction(sku.costPrice)
+ sku.firstBrokeragePrice = formatToFraction(sku.firstBrokeragePrice)
+ sku.secondBrokeragePrice = formatToFraction(sku.secondBrokeragePrice)
})
spu.skus = selectSkus as DiscountActivityApi.SkuExtension[]
- spuProperties.push({
+ spuPropertyList.value.push({
spuId: spu.id!,
spuDetail: spu,
propertyList: getPropertyList(spu)
})
spuList.value.push(spu)
- spuPropertyList.value = spuProperties
}
// ================= end =================
@@ -126,8 +141,15 @@ const open = async (type: string, id?: number) => {
const data = (await DiscountActivityApi.getDiscountActivity(
id
)) as DiscountActivityApi.DiscountActivityVO
- const supId = data.products[0].spuId
- await getSpuDetails(supId!, data.products?.map((sku) => sku.skuId), data.products)
+ for (let productsKey in data.products) {
+ const supId = data.products[productsKey].spuId
+ await getSpuDetails(
+ supId!,
+ data.products?.map((sku) => sku.skuId),
+ data.products,
+ 'load'
+ )
+ }
formRef.value.setValues(data)
} finally {
formLoading.value = false
@@ -147,11 +169,24 @@ const submitForm = async () => {
formLoading.value = true
try {
const data = formRef.value.formModel as DiscountActivityApi.DiscountActivityVO
- // 获取 折扣商品配置
+ // 获取折扣商品配置
const products = cloneDeep(spuAndSkuListRef.value.getSkuConfigs('productConfig'))
+ // 校验优惠金额、折扣百分比,是否正确
+ // TODO @puhui999:这个交互,可以参考下 youzan 的
+ let discountInvalid = false
products.forEach((item: DiscountActivityApi.DiscountProductVO) => {
- item.discountType = data['discountType']
+ if (item.discountPrice != null && item.discountPrice > 0) {
+ item.discountType = 1
+ } else if (item.discountPercent != null && item.discountPercent > 0) {
+ item.discountType = 2
+ } else {
+ discountInvalid = true
+ }
})
+ if (discountInvalid) {
+ message.error('优惠金额和折扣百分比需要填写一个')
+ return
+ }
data.products = products
// 真正提交
if (formType.value === 'create') {
@@ -173,7 +208,22 @@ const submitForm = async () => {
const resetForm = async () => {
spuList.value = []
spuPropertyList.value = []
+ spuIds.value = []
await nextTick()
formRef.value.getElFormRef().resetFields()
}
+
+/**
+ * 删除 SPU
+ */
+const deleteSpu = (spuId: number) => {
+ spuIds.value.splice(
+ spuIds.value.findIndex((item) => item == spuId),
+ 1
+ )
+ spuPropertyList.value.splice(
+ spuPropertyList.value.findIndex((item) => item.spuId == spuId),
+ 1
+ )
+}
diff --git a/src/views/mall/promotion/discountActivity/discountActivity.data.ts b/src/views/mall/promotion/discountActivity/discountActivity.data.ts
index d79dcab71b2aed87bf88459b3aa312c902c40957..a4c93ffb5ec0b276c03ece58459ff488a0417729 100644
--- a/src/views/mall/promotion/discountActivity/discountActivity.data.ts
+++ b/src/views/mall/promotion/discountActivity/discountActivity.data.ts
@@ -72,17 +72,6 @@ const crudSchemas = reactive([
width: 120
}
},
- {
- label: '优惠类型',
- field: 'discountType',
- dictType: DICT_TYPE.PROMOTION_DISCOUNT_TYPE,
- dictClass: 'number',
- isSearch: true,
- form: {
- component: 'Radio',
- value: 1
- }
- },
{
label: '活动商品',
field: 'spuId',
diff --git a/src/views/mall/promotion/discountActivity/index.vue b/src/views/mall/promotion/discountActivity/index.vue
index 7d73b51489e705c21ca902c1365c6fcedeb73a75..1841603aff852210782c516253e57b30a570e14b 100644
--- a/src/views/mall/promotion/discountActivity/index.vue
+++ b/src/views/mall/promotion/discountActivity/index.vue
@@ -70,17 +70,17 @@
~ {{ formatDate(scope.row.endTime, 'YYYY-MM-DD') }}
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mall/promotion/diy/template/decorate.vue b/src/views/mall/promotion/diy/template/decorate.vue
index e7838f29fc738594f52cc415f4eac376f63f53ae..82edbe5f18e84577d71c8d1ce09966728b2c3747 100644
--- a/src/views/mall/promotion/diy/template/decorate.vue
+++ b/src/views/mall/promotion/diy/template/decorate.vue
@@ -18,7 +18,7 @@
@change="handleTemplateItemChange"
>
-
+
diff --git a/src/views/mall/promotion/kefu/components/KeFuConversationList.vue b/src/views/mall/promotion/kefu/components/KeFuConversationList.vue
new file mode 100644
index 0000000000000000000000000000000000000000..0ff3d422aa5a425edf1e751f8ca5f4f8614b8cf7
--- /dev/null
+++ b/src/views/mall/promotion/kefu/components/KeFuConversationList.vue
@@ -0,0 +1,236 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.userNickname }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mall/promotion/kefu/components/KeFuMessageList.vue b/src/views/mall/promotion/kefu/components/KeFuMessageList.vue
new file mode 100644
index 0000000000000000000000000000000000000000..483fdc24956e48491e95dc125ec10cf35e8d687c
--- /dev/null
+++ b/src/views/mall/promotion/kefu/components/KeFuMessageList.vue
@@ -0,0 +1,467 @@
+
+
+
+ {{ conversation.userNickname }}
+
+
+
+
+
+
+
+
+
+ {{ formatDate(item.createTime) }}
+
+
+
+ {{ item.content }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 有新消息
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mall/promotion/kefu/components/asserts/a.png b/src/views/mall/promotion/kefu/components/asserts/a.png
new file mode 100644
index 0000000000000000000000000000000000000000..32939004d69bf26555bebe6ca040a82d3fe84c3b
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/a.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/aini.png b/src/views/mall/promotion/kefu/components/asserts/aini.png
new file mode 100644
index 0000000000000000000000000000000000000000..02cf5c49830e1002b481e6a21bfb3947eaf24549
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/aini.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/aixin.png b/src/views/mall/promotion/kefu/components/asserts/aixin.png
new file mode 100644
index 0000000000000000000000000000000000000000..25e64223495ba2e55aaffd690f1cd4a553b77afd
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/aixin.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/baiyan.png b/src/views/mall/promotion/kefu/components/asserts/baiyan.png
new file mode 100644
index 0000000000000000000000000000000000000000..d16260afd6443e2bb7a257d0b425f18c4c2c7ccd
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/baiyan.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/bizui.png b/src/views/mall/promotion/kefu/components/asserts/bizui.png
new file mode 100644
index 0000000000000000000000000000000000000000..a3b18002e882336b0ffdd6c508a98bb5178a0205
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/bizui.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/buhaoyisi.png b/src/views/mall/promotion/kefu/components/asserts/buhaoyisi.png
new file mode 100644
index 0000000000000000000000000000000000000000..54c4b3f71376f0e33d67e7ee74c31b75059d44dd
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/buhaoyisi.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/bukesiyi.png b/src/views/mall/promotion/kefu/components/asserts/bukesiyi.png
new file mode 100644
index 0000000000000000000000000000000000000000..5f272e3e4e59e92cd88c63f2579cc8f46563d3da
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/bukesiyi.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/dajing.png b/src/views/mall/promotion/kefu/components/asserts/dajing.png
new file mode 100644
index 0000000000000000000000000000000000000000..8649727ecd4219f16fa5440a53774274ebccd3a0
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/dajing.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/danao.png b/src/views/mall/promotion/kefu/components/asserts/danao.png
new file mode 100644
index 0000000000000000000000000000000000000000..aa85a294752cf73cbc8885dfdfe5b3d7e8036d84
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/danao.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/daxiao.png b/src/views/mall/promotion/kefu/components/asserts/daxiao.png
new file mode 100644
index 0000000000000000000000000000000000000000..26206bc0578f0817dacd62de9fae05b7f7d315d3
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/daxiao.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/dianzan.png b/src/views/mall/promotion/kefu/components/asserts/dianzan.png
new file mode 100644
index 0000000000000000000000000000000000000000..2e7f00eba9e1335ee20298e4fd764ebc88961226
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/dianzan.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/emo.png b/src/views/mall/promotion/kefu/components/asserts/emo.png
new file mode 100644
index 0000000000000000000000000000000000000000..9c84551659150372083909ea21a5136b89d03fa3
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/emo.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/esi.png b/src/views/mall/promotion/kefu/components/asserts/esi.png
new file mode 100644
index 0000000000000000000000000000000000000000..84e9726f13e6015cbf2c0bbf62f6386a2d020516
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/esi.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/fadai.png b/src/views/mall/promotion/kefu/components/asserts/fadai.png
new file mode 100644
index 0000000000000000000000000000000000000000..0772de262339066ceab006ab81731eeeeaeb7fca
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/fadai.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/fankun.png b/src/views/mall/promotion/kefu/components/asserts/fankun.png
new file mode 100644
index 0000000000000000000000000000000000000000..6e18dac3ecd9a88a74a3a7f8db6ca5ed4d437201
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/fankun.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/feiwen.png b/src/views/mall/promotion/kefu/components/asserts/feiwen.png
new file mode 100644
index 0000000000000000000000000000000000000000..be9761658d3424b01c713908c7c4fedce8e4567f
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/feiwen.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/fennu.png b/src/views/mall/promotion/kefu/components/asserts/fennu.png
new file mode 100644
index 0000000000000000000000000000000000000000..20c57338cc5103321e3056f170521a59d70b1ccc
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/fennu.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/ganga.png b/src/views/mall/promotion/kefu/components/asserts/ganga.png
new file mode 100644
index 0000000000000000000000000000000000000000..30ec329d2f1093af1643194b8b72140e8cb4a12a
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/ganga.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/ganmao.png b/src/views/mall/promotion/kefu/components/asserts/ganmao.png
new file mode 100644
index 0000000000000000000000000000000000000000..35bbb89f33806ddaecaf947dff4b6c4559a49c02
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/ganmao.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/hanyan.png b/src/views/mall/promotion/kefu/components/asserts/hanyan.png
new file mode 100644
index 0000000000000000000000000000000000000000..a0bc838b1ce04c4faf8627307a02435afccf58cb
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/hanyan.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/haochi.png b/src/views/mall/promotion/kefu/components/asserts/haochi.png
new file mode 100644
index 0000000000000000000000000000000000000000..2e52b6bee69cc436f8fae3d4dbefb85fe76864a3
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/haochi.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/hongxin.png b/src/views/mall/promotion/kefu/components/asserts/hongxin.png
new file mode 100644
index 0000000000000000000000000000000000000000..65b5de8f0922e148c84ed8cd44863fb2f0bcd6a4
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/hongxin.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/huaixiao.png b/src/views/mall/promotion/kefu/components/asserts/huaixiao.png
new file mode 100644
index 0000000000000000000000000000000000000000..bc0e76c4c9bd004e8855656bb7ceadc287eac388
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/huaixiao.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/jingkong.png b/src/views/mall/promotion/kefu/components/asserts/jingkong.png
new file mode 100644
index 0000000000000000000000000000000000000000..7aa65845ffaac2909d98ddc03524ff1c5ec933f3
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/jingkong.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/jingshu.png b/src/views/mall/promotion/kefu/components/asserts/jingshu.png
new file mode 100644
index 0000000000000000000000000000000000000000..0e984d68dfed93934adf0803e29b916cf801abe2
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/jingshu.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/jingya.png b/src/views/mall/promotion/kefu/components/asserts/jingya.png
new file mode 100644
index 0000000000000000000000000000000000000000..9ba6bab326a0a9541d831d5d7281b80ec0e04196
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/jingya.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/kaixin.png b/src/views/mall/promotion/kefu/components/asserts/kaixin.png
new file mode 100644
index 0000000000000000000000000000000000000000..29c9f5ddb6567052bca2075325de3f95485ae7ea
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/kaixin.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/keai.png b/src/views/mall/promotion/kefu/components/asserts/keai.png
new file mode 100644
index 0000000000000000000000000000000000000000..d3b582c6945b4c1aa04f1b58f54c0ee1d9e3e8fa
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/keai.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/keshui.png b/src/views/mall/promotion/kefu/components/asserts/keshui.png
new file mode 100644
index 0000000000000000000000000000000000000000..cef489ea4d60ec713bf0cc8802a5500ffd5479b1
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/keshui.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/kun.png b/src/views/mall/promotion/kefu/components/asserts/kun.png
new file mode 100644
index 0000000000000000000000000000000000000000..1ddc388a684febead030fe56064ef039146519fe
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/kun.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/lengku.png b/src/views/mall/promotion/kefu/components/asserts/lengku.png
new file mode 100644
index 0000000000000000000000000000000000000000..c5c6feebbeb152d829d312a00891b1c933066147
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/lengku.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/liuhan.png b/src/views/mall/promotion/kefu/components/asserts/liuhan.png
new file mode 100644
index 0000000000000000000000000000000000000000..e6ddc6f4d706eab7c3ccf816520b26e9f7aef959
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/liuhan.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/liukoushui.png b/src/views/mall/promotion/kefu/components/asserts/liukoushui.png
new file mode 100644
index 0000000000000000000000000000000000000000..3e2fba6560d9e095c73b223f5cee681ef9aa62f0
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/liukoushui.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/liulei.png b/src/views/mall/promotion/kefu/components/asserts/liulei.png
new file mode 100644
index 0000000000000000000000000000000000000000..dbf820404f26c4dab085fd7811406bb3d52275c8
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/liulei.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/mengbi.png b/src/views/mall/promotion/kefu/components/asserts/mengbi.png
new file mode 100644
index 0000000000000000000000000000000000000000..a4206eefb4017743ae56a3527c97a035bcbe281a
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/mengbi.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/mianwubiaoqing.png b/src/views/mall/promotion/kefu/components/asserts/mianwubiaoqing.png
new file mode 100644
index 0000000000000000000000000000000000000000..6f315b98e12117b67874afc5b1368fa083a96f8c
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/mianwubiaoqing.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/nanguo.png b/src/views/mall/promotion/kefu/components/asserts/nanguo.png
new file mode 100644
index 0000000000000000000000000000000000000000..19b9fb94aef26aa8cbfcb40fe6e3f4bd06b82c8a
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/nanguo.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/outu.png b/src/views/mall/promotion/kefu/components/asserts/outu.png
new file mode 100644
index 0000000000000000000000000000000000000000..2f9a06d63ebc6fd1ce5c0906517f51dc5cec3b08
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/outu.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/picture.svg b/src/views/mall/promotion/kefu/components/asserts/picture.svg
new file mode 100644
index 0000000000000000000000000000000000000000..8811d495712b42e73329faeb58b6bd430b77d6da
--- /dev/null
+++ b/src/views/mall/promotion/kefu/components/asserts/picture.svg
@@ -0,0 +1,10 @@
+
+
diff --git a/src/views/mall/promotion/kefu/components/asserts/shengqi.png b/src/views/mall/promotion/kefu/components/asserts/shengqi.png
new file mode 100644
index 0000000000000000000000000000000000000000..7dce41dc993a0de9004f396df71d955646adef8e
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/shengqi.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/shuizhuo.png b/src/views/mall/promotion/kefu/components/asserts/shuizhuo.png
new file mode 100644
index 0000000000000000000000000000000000000000..97d0f0a67982cea1d265f76d0b8a31c9212217cb
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/shuizhuo.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/tianshi.png b/src/views/mall/promotion/kefu/components/asserts/tianshi.png
new file mode 100644
index 0000000000000000000000000000000000000000..eb922dd7ac765707287c2434fb6b2bed2b3f8f4d
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/tianshi.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/xiaodiaoya.png b/src/views/mall/promotion/kefu/components/asserts/xiaodiaoya.png
new file mode 100644
index 0000000000000000000000000000000000000000..29fbc0e19391a43886eabbfa1cdea17647ab01d6
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/xiaodiaoya.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/xiaoku.png b/src/views/mall/promotion/kefu/components/asserts/xiaoku.png
new file mode 100644
index 0000000000000000000000000000000000000000..88a169d4f92de79f254ce763df4c7091a09684d0
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/xiaoku.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/xinsui.png b/src/views/mall/promotion/kefu/components/asserts/xinsui.png
new file mode 100644
index 0000000000000000000000000000000000000000..a0f572a11277a77eb7058344a7512785f8bf1874
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/xinsui.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/xiong.png b/src/views/mall/promotion/kefu/components/asserts/xiong.png
new file mode 100644
index 0000000000000000000000000000000000000000..43dfd70908d1ada6aae6166bbd26db3e773471d7
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/xiong.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/yiwen.png b/src/views/mall/promotion/kefu/components/asserts/yiwen.png
new file mode 100644
index 0000000000000000000000000000000000000000..4c0da7095c9682d09b99228d50c6de0607c2b5b2
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/yiwen.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/yun.png b/src/views/mall/promotion/kefu/components/asserts/yun.png
new file mode 100644
index 0000000000000000000000000000000000000000..56e5d02189878cc2c197fa90c405d6ed1070e13b
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/yun.png differ
diff --git a/src/views/mall/promotion/kefu/components/asserts/ziya.png b/src/views/mall/promotion/kefu/components/asserts/ziya.png
new file mode 100644
index 0000000000000000000000000000000000000000..593ef5e68f3933d19284eb3dd348a4fdfeec40c1
Binary files /dev/null and b/src/views/mall/promotion/kefu/components/asserts/ziya.png differ
diff --git a/src/views/mall/promotion/kefu/components/history/MemberBrowsingHistory.vue b/src/views/mall/promotion/kefu/components/history/MemberBrowsingHistory.vue
new file mode 100644
index 0000000000000000000000000000000000000000..52c1095b53f9af8932fce44b281798b0d9095394
--- /dev/null
+++ b/src/views/mall/promotion/kefu/components/history/MemberBrowsingHistory.vue
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mall/promotion/kefu/components/history/OrderBrowsingHistory.vue b/src/views/mall/promotion/kefu/components/history/OrderBrowsingHistory.vue
new file mode 100644
index 0000000000000000000000000000000000000000..8fb8891c38d914786f0bc39c7e9c868673e838e1
--- /dev/null
+++ b/src/views/mall/promotion/kefu/components/history/OrderBrowsingHistory.vue
@@ -0,0 +1,44 @@
+
+
+
+
+
diff --git a/src/views/mall/promotion/kefu/components/history/ProductBrowsingHistory.vue b/src/views/mall/promotion/kefu/components/history/ProductBrowsingHistory.vue
new file mode 100644
index 0000000000000000000000000000000000000000..8bc4aeaf56fa4ce98a906e9cb10a9a8299ea0160
--- /dev/null
+++ b/src/views/mall/promotion/kefu/components/history/ProductBrowsingHistory.vue
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
diff --git a/src/views/mall/promotion/kefu/components/index.ts b/src/views/mall/promotion/kefu/components/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..585d0da7a89e9be7b757c9313060c8cb16cc9106
--- /dev/null
+++ b/src/views/mall/promotion/kefu/components/index.ts
@@ -0,0 +1,5 @@
+import KeFuConversationList from './KeFuConversationList.vue'
+import KeFuMessageList from './KeFuMessageList.vue'
+import MemberBrowsingHistory from './history/MemberBrowsingHistory.vue'
+
+export { KeFuConversationList, KeFuMessageList, MemberBrowsingHistory }
diff --git a/src/views/mall/promotion/kefu/components/message/MessageItem.vue b/src/views/mall/promotion/kefu/components/message/MessageItem.vue
new file mode 100644
index 0000000000000000000000000000000000000000..325a36394ade8b40185a9da5414ceb15bf043242
--- /dev/null
+++ b/src/views/mall/promotion/kefu/components/message/MessageItem.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
diff --git a/src/views/mall/promotion/kefu/components/message/OrderItem.vue b/src/views/mall/promotion/kefu/components/message/OrderItem.vue
new file mode 100644
index 0000000000000000000000000000000000000000..84d61779beff4913da21ca6f05afd08789c14970
--- /dev/null
+++ b/src/views/mall/promotion/kefu/components/message/OrderItem.vue
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+
+
共 {{ getMessageContent?.productCount }} 件商品,总金额:
+
+
+ ¥{{ fenToYuan(getMessageContent?.payPrice) }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mall/promotion/kefu/components/message/ProductItem.vue b/src/views/mall/promotion/kefu/components/message/ProductItem.vue
new file mode 100644
index 0000000000000000000000000000000000000000..4e59365b9d095f0f222d9e3c5f6b291696e9b682
--- /dev/null
+++ b/src/views/mall/promotion/kefu/components/message/ProductItem.vue
@@ -0,0 +1,203 @@
+
+
+
+
+
+
+
+
+
+
+
{{ title }}
+
{{ skuString }}
+
+
+
+
+
+
+ ¥{{ fenToYuan(price) }}
+
+
x {{ num }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mall/promotion/kefu/components/tools/EmojiSelectPopover.vue b/src/views/mall/promotion/kefu/components/tools/EmojiSelectPopover.vue
new file mode 100644
index 0000000000000000000000000000000000000000..43c096db982f491099780977c11fe6e6432fe0ea
--- /dev/null
+++ b/src/views/mall/promotion/kefu/components/tools/EmojiSelectPopover.vue
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
diff --git a/src/views/mall/promotion/kefu/components/tools/PictureSelectUpload.vue b/src/views/mall/promotion/kefu/components/tools/PictureSelectUpload.vue
new file mode 100644
index 0000000000000000000000000000000000000000..9742353aa56a2ebf0c7b80995908e9f2b7542f75
--- /dev/null
+++ b/src/views/mall/promotion/kefu/components/tools/PictureSelectUpload.vue
@@ -0,0 +1,93 @@
+
+
+
+
![]()
+
+
+
+
+
+
diff --git a/src/views/mall/promotion/kefu/components/tools/constants.ts b/src/views/mall/promotion/kefu/components/tools/constants.ts
new file mode 100644
index 0000000000000000000000000000000000000000..750e7f5541db5332aeb4f2a76cb8525f7e534c40
--- /dev/null
+++ b/src/views/mall/promotion/kefu/components/tools/constants.ts
@@ -0,0 +1,17 @@
+// 客服消息类型枚举类
+export const KeFuMessageContentTypeEnum = {
+ TEXT: 1, // 文本消息
+ IMAGE: 2, // 图片消息
+ VOICE: 3, // 语音消息
+ VIDEO: 4, // 视频消息
+ SYSTEM: 5, // 系统消息
+ // ========== 商城特殊消息 ==========
+ PRODUCT: 10, // 商品消息
+ ORDER: 11 // 订单消息"
+}
+
+// Promotion 的 WebSocket 消息类型枚举类
+export const WebSocketMessageTypeConstants = {
+ KEFU_MESSAGE_TYPE: 'kefu_message_type', // 客服消息类型
+ KEFU_MESSAGE_ADMIN_READ: 'kefu_message_read_status_change' // 客服消息管理员已读
+}
diff --git a/src/views/mall/promotion/kefu/components/tools/emoji.ts b/src/views/mall/promotion/kefu/components/tools/emoji.ts
new file mode 100644
index 0000000000000000000000000000000000000000..0cbf95af29ace3a5be725ab6efa125d2190ba633
--- /dev/null
+++ b/src/views/mall/promotion/kefu/components/tools/emoji.ts
@@ -0,0 +1,129 @@
+import { isEmpty } from '@/utils/is'
+
+const emojiList = [
+ { name: '[笑掉牙]', file: 'xiaodiaoya.png' },
+ { name: '[可爱]', file: 'keai.png' },
+ { name: '[冷酷]', file: 'lengku.png' },
+ { name: '[闭嘴]', file: 'bizui.png' },
+ { name: '[生气]', file: 'shengqi.png' },
+ { name: '[惊恐]', file: 'jingkong.png' },
+ { name: '[瞌睡]', file: 'keshui.png' },
+ { name: '[大笑]', file: 'daxiao.png' },
+ { name: '[爱心]', file: 'aixin.png' },
+ { name: '[坏笑]', file: 'huaixiao.png' },
+ { name: '[飞吻]', file: 'feiwen.png' },
+ { name: '[疑问]', file: 'yiwen.png' },
+ { name: '[开心]', file: 'kaixin.png' },
+ { name: '[发呆]', file: 'fadai.png' },
+ { name: '[流泪]', file: 'liulei.png' },
+ { name: '[汗颜]', file: 'hanyan.png' },
+ { name: '[惊悚]', file: 'jingshu.png' },
+ { name: '[困~]', file: 'kun.png' },
+ { name: '[心碎]', file: 'xinsui.png' },
+ { name: '[天使]', file: 'tianshi.png' },
+ { name: '[晕]', file: 'yun.png' },
+ { name: '[啊]', file: 'a.png' },
+ { name: '[愤怒]', file: 'fennu.png' },
+ { name: '[睡着]', file: 'shuizhuo.png' },
+ { name: '[面无表情]', file: 'mianwubiaoqing.png' },
+ { name: '[难过]', file: 'nanguo.png' },
+ { name: '[犯困]', file: 'fankun.png' },
+ { name: '[好吃]', file: 'haochi.png' },
+ { name: '[呕吐]', file: 'outu.png' },
+ { name: '[龇牙]', file: 'ziya.png' },
+ { name: '[懵比]', file: 'mengbi.png' },
+ { name: '[白眼]', file: 'baiyan.png' },
+ { name: '[饿死]', file: 'esi.png' },
+ { name: '[凶]', file: 'xiong.png' },
+ { name: '[感冒]', file: 'ganmao.png' },
+ { name: '[流汗]', file: 'liuhan.png' },
+ { name: '[笑哭]', file: 'xiaoku.png' },
+ { name: '[流口水]', file: 'liukoushui.png' },
+ { name: '[尴尬]', file: 'ganga.png' },
+ { name: '[惊讶]', file: 'jingya.png' },
+ { name: '[大惊]', file: 'dajing.png' },
+ { name: '[不好意思]', file: 'buhaoyisi.png' },
+ { name: '[大闹]', file: 'danao.png' },
+ { name: '[不可思议]', file: 'bukesiyi.png' },
+ { name: '[爱你]', file: 'aini.png' },
+ { name: '[红心]', file: 'hongxin.png' },
+ { name: '[点赞]', file: 'dianzan.png' },
+ { name: '[恶魔]', file: 'emo.png' }
+]
+
+export interface Emoji {
+ name: string
+ url: string
+}
+
+export const useEmoji = () => {
+ const emojiPathList = ref([])
+
+ /** 加载本地图片 */
+ const initStaticEmoji = async () => {
+ const pathList = import.meta.glob(
+ '@/views/mall/promotion/kefu/components/asserts/*.{png,jpg,jpeg,svg}'
+ )
+ for (const path in pathList) {
+ const imageModule: any = await pathList[path]()
+ emojiPathList.value.push({ path: path, src: imageModule.default })
+ }
+ }
+
+ /** 初始化 */
+ onMounted(async () => {
+ if (isEmpty(emojiPathList.value)) {
+ await initStaticEmoji()
+ }
+ })
+
+ /**
+ * 将文本中的表情替换成图片
+ *
+ * @return 替换后的文本
+ * @param content 消息内容
+ */
+ const replaceEmoji = (content: string) => {
+ let newData = content
+ if (typeof newData !== 'object') {
+ const reg = /\[(.+?)]/g // [] 中括号
+ const zhEmojiName = newData.match(reg)
+ if (zhEmojiName) {
+ zhEmojiName.forEach((item) => {
+ const emojiFile = getEmojiFileByName(item)
+ newData = newData.replace(
+ item,
+ `
`
+ )
+ })
+ }
+ }
+ return newData
+ }
+
+ /**
+ * 获得所有表情
+ *
+ * @return 表情列表
+ */
+ function getEmojiList(): Emoji[] {
+ return emojiList.map((item) => ({
+ url: getEmojiFileByName(item.name),
+ name: item.name
+ })) as Emoji[]
+ }
+
+ function getEmojiFileByName(name: string) {
+ for (const emoji of emojiList) {
+ if (emoji.name === name) {
+ const emojiPath = emojiPathList.value.find(
+ (item: { path: string; src: string }) => item.path.indexOf(emoji.file) > -1
+ )
+ return emojiPath ? emojiPath.src : undefined
+ }
+ }
+ return false
+ }
+
+ return { replaceEmoji, getEmojiList }
+}
diff --git a/src/views/mall/promotion/kefu/index.vue b/src/views/mall/promotion/kefu/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..e6b4976ff06dcd9354d6be2f02d7fe2d4180b33f
--- /dev/null
+++ b/src/views/mall/promotion/kefu/index.vue
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mall/promotion/rewardActivity/RewardForm.vue b/src/views/mall/promotion/rewardActivity/RewardForm.vue
index 9fb69a569afa30c1a68ff57fe047a469d38450c9..fc1d5dfc68dbf10bea35d847e3fe7f0f79c47d5d 100644
--- a/src/views/mall/promotion/rewardActivity/RewardForm.vue
+++ b/src/views/mall/promotion/rewardActivity/RewardForm.vue
@@ -1,11 +1,11 @@
-
diff --git a/src/views/mall/promotion/rewardActivity/components/RewardRule.vue b/src/views/mall/promotion/rewardActivity/components/RewardRule.vue
new file mode 100644
index 0000000000000000000000000000000000000000..8dc37b32140bfb58ad3a7fe9ca81c51be33821e9
--- /dev/null
+++ b/src/views/mall/promotion/rewardActivity/components/RewardRule.vue
@@ -0,0 +1,127 @@
+
+
+
+
+
+ 活动层级{{ index + 1 }}
+
+ 删除
+
+
+
+ 满
+
+
+ {{ PromotionConditionTypeEnum.PRICE.type === formData.conditionType ? '元' : '件' }}
+
+
+
+ 订单金额优惠
+
+ 减
+
+ 元
+
+
+
+ 包邮:
+
+
+
+ 送积分:
+
+ 送
+
+ 积分
+
+
+
+ 送优惠券:
+
+
+
+
+
+
+
+ 添加优惠规则
+
+
+ 赠送积分为 0 时不赠送。未选优惠券时不赠送。
+
+
+
+
+
diff --git a/src/views/mall/promotion/rewardActivity/components/RewardRuleCouponSelect.vue b/src/views/mall/promotion/rewardActivity/components/RewardRuleCouponSelect.vue
new file mode 100644
index 0000000000000000000000000000000000000000..f515e4f1f4cb08c204c288d5056393ab7201a04f
--- /dev/null
+++ b/src/views/mall/promotion/rewardActivity/components/RewardRuleCouponSelect.vue
@@ -0,0 +1,136 @@
+
+ 添加优惠卷
+
+
+
+
优惠券名称:{{ item.name }}
+
+ 范围:
+
+
+
+ 优惠:
+
+ {{ discountFormat(item) }}
+
+
+
+ 送
+
+ 张
+ 删除
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mall/promotion/rewardActivity/index.vue b/src/views/mall/promotion/rewardActivity/index.vue
index 4f6f8a6025087892b87c5b9968ded8e4a456de60..55f30358c69f9d1aeaac280605b9956dfc0944d7 100644
--- a/src/views/mall/promotion/rewardActivity/index.vue
+++ b/src/views/mall/promotion/rewardActivity/index.vue
@@ -4,27 +4,27 @@
- 搜索
- 重置
+
+
+ 搜索
+
+
+
+ 重置
+
- 新增
+
+ 新增
@@ -62,47 +69,47 @@
-
+
-
+
-
+
编辑
删除
@@ -111,9 +118,9 @@
@@ -168,9 +175,9 @@ const resetQuery = () => {
}
/** 添加/修改操作 */
-const formRef = ref()
+const formRef = ref>()
const openForm = (type: string, id?: number) => {
- formRef.value.open(type, id)
+ formRef.value?.open(type, id)
}
/** 删除按钮操作 */
diff --git a/src/views/mall/promotion/seckill/components/SeckillShowcase.vue b/src/views/mall/promotion/seckill/components/SeckillShowcase.vue
new file mode 100644
index 0000000000000000000000000000000000000000..a924e8caa11be99eafc80d186f36c5d3377d348d
--- /dev/null
+++ b/src/views/mall/promotion/seckill/components/SeckillShowcase.vue
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
diff --git a/src/views/mall/promotion/seckill/components/SeckillTableSelect.vue b/src/views/mall/promotion/seckill/components/SeckillTableSelect.vue
new file mode 100644
index 0000000000000000000000000000000000000000..3e4e67e9993cb0022c4283fceed35ed8513bbcdc
--- /dev/null
+++ b/src/views/mall/promotion/seckill/components/SeckillTableSelect.vue
@@ -0,0 +1,343 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+ 重置
+
+
+
+
+
+
+
+
+
+
+ handleCheckOne(checked, row, true)"
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ formatDate(scope.row.startTime, 'YYYY-MM-DD') }}
+ ~ {{ formatDate(scope.row.endTime, 'YYYY-MM-DD') }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ formatSeckillPrice(scope.row.products) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确 定
+ 取 消
+
+
+
+
+
diff --git a/src/views/mall/promotion/seckill/config/SeckillConfigForm.vue b/src/views/mall/promotion/seckill/config/SeckillConfigForm.vue
index a7ce5fe7ac06de017e485eda06fb19d3372bad32..185b25698c69fb80ed7eee13b36e6578011be303 100644
--- a/src/views/mall/promotion/seckill/config/SeckillConfigForm.vue
+++ b/src/views/mall/promotion/seckill/config/SeckillConfigForm.vue
@@ -32,7 +32,7 @@
{{ dict.label }}
diff --git a/src/views/mall/trade/afterSale/detail/index.vue b/src/views/mall/trade/afterSale/detail/index.vue
index 26df0d345f3f905b26175e7c2f25393af125b706..024f48958e472873ce5777240f475657a63051d9 100644
--- a/src/views/mall/trade/afterSale/detail/index.vue
+++ b/src/views/mall/trade/afterSale/detail/index.vue
@@ -325,13 +325,13 @@ onMounted(async () => {
align-items: center;
min-height: 30px;
padding: 10px;
- background-color: #f7f8fa;
+ background-color: var(--app-content-bg-color);
&::before {
position: absolute;
top: 10px;
left: 13px;
- border-color: transparent #f7f8fa transparent transparent; /* 尖角颜色,左侧朝向 */
+ border-color: transparent var(--app-content-bg-color) transparent transparent; /* 尖角颜色,左侧朝向 */
border-style: solid;
border-width: 8px; /* 调整尖角大小 */
content: '';
diff --git a/src/views/mall/trade/afterSale/index.vue b/src/views/mall/trade/afterSale/index.vue
index 23ff967f8cfbbc442ddaae11150978081891af78..0c4d0b852c2592456488543f3041ce79c1bd5232 100644
--- a/src/views/mall/trade/afterSale/index.vue
+++ b/src/views/mall/trade/afterSale/index.vue
@@ -81,7 +81,7 @@
-
+
{{ fenToYuan(scope.row.refundPrice) }} 元
@@ -206,6 +206,7 @@ const queryParams = reactive({
way: null,
type: null
})
+
/** 查询列表 */
const getList = async () => {
loading.value = true
@@ -216,23 +217,26 @@ const getList = async () => {
delete data.status
}
// 执行查询
- const res = (await AfterSaleApi.getAfterSalePage(data)) as AfterSaleApi.TradeAfterSaleVO[]
- list.value = res.list
+ const res = await AfterSaleApi.getAfterSalePage(data)
+ list.value = res.list as AfterSaleApi.TradeAfterSaleVO[]
total.value = res.total
} finally {
loading.value = false
}
}
+
/** 搜索按钮操作 */
const handleQuery = async () => {
queryParams.pageNo = 1
await getList()
}
+
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields()
handleQuery()
}
+
/** tab 切换 */
const tabClick = async (tab: TabsPaneContext) => {
queryParams.status = tab.paneName
@@ -246,7 +250,7 @@ const openAfterSaleDetail = (id: number) => {
/** 查看订单详情 */
const openOrderDetail = (id: number) => {
- push({ name: 'TradeOrderDetail', params: { orderId: id } })
+ push({ name: 'TradeOrderDetail', params: { id } })
}
/** 商品图预览 */
diff --git a/src/views/mall/trade/brokerage/user/BrokerageOrderListDialog.vue b/src/views/mall/trade/brokerage/user/BrokerageOrderListDialog.vue
index 54e3c16d262d8ec4c23536aa203282ccd45ed680..20b4a9ab1ded58b6e2be6f4ac913b78c568a7398 100644
--- a/src/views/mall/trade/brokerage/user/BrokerageOrderListDialog.vue
+++ b/src/views/mall/trade/brokerage/user/BrokerageOrderListDialog.vue
@@ -12,8 +12,8 @@
全部
- 一级推广人
- 二级推广人
+ 一级推广人
+ 二级推广人
diff --git a/src/views/mall/trade/brokerage/user/BrokerageUserListDialog.vue b/src/views/mall/trade/brokerage/user/BrokerageUserListDialog.vue
index 87dc8f672470a568df50f86c1d5dd0dca6a4e7da..732f4bbbb896c13b4ab0baefcea925d3db093ddb 100644
--- a/src/views/mall/trade/brokerage/user/BrokerageUserListDialog.vue
+++ b/src/views/mall/trade/brokerage/user/BrokerageUserListDialog.vue
@@ -12,8 +12,8 @@
全部
- 一级推广人
- 二级推广人
+ 一级推广人
+ 二级推广人
diff --git a/src/views/mall/trade/config/index.vue b/src/views/mall/trade/config/index.vue
index cdaf812cd05a73dba347142704301bb82627ae88..6aa4b9796ec821906153368dbcbbd9eb430887e2 100644
--- a/src/views/mall/trade/config/index.vue
+++ b/src/views/mall/trade/config/index.vue
@@ -82,7 +82,7 @@
{{ dict.label }}
@@ -99,7 +99,7 @@
{{ dict.label }}
@@ -182,7 +182,7 @@
{{ dict.label }}
diff --git a/src/views/mall/trade/delivery/express/ExpressForm.vue b/src/views/mall/trade/delivery/express/ExpressForm.vue
index 232fb793c05ad88d5e93954061d678d280cb532f..8b759f28832d492f2491e518f764be38bc6f5ddc 100644
--- a/src/views/mall/trade/delivery/express/ExpressForm.vue
+++ b/src/views/mall/trade/delivery/express/ExpressForm.vue
@@ -25,7 +25,7 @@
{{ dict.label }}
diff --git a/src/views/mall/trade/delivery/expressTemplate/ExpressTemplateForm.vue b/src/views/mall/trade/delivery/expressTemplate/ExpressTemplateForm.vue
index edbcbc3a90e403adb9f72eb443c2197337849f78..547aece6813c9161e08b53cca3b55f949e3487e2 100644
--- a/src/views/mall/trade/delivery/expressTemplate/ExpressTemplateForm.vue
+++ b/src/views/mall/trade/delivery/expressTemplate/ExpressTemplateForm.vue
@@ -15,7 +15,7 @@
{{ dict.label }}
diff --git a/src/views/mall/trade/delivery/pickUpStore/PickUpStoreForm.vue b/src/views/mall/trade/delivery/pickUpStore/PickUpStoreForm.vue
index 5900558877a7ee6492971eea3ad126f9892814d4..077ba672010b42adc9826e3efb6b1918bfc1ed54 100644
--- a/src/views/mall/trade/delivery/pickUpStore/PickUpStoreForm.vue
+++ b/src/views/mall/trade/delivery/pickUpStore/PickUpStoreForm.vue
@@ -20,7 +20,7 @@
{{ dict.label }}
@@ -106,14 +106,8 @@
确 定
取 消
-
-
+
+
@@ -266,8 +260,3 @@ onMounted(async () => {
await initTencentLbsMap()
})
-
diff --git a/src/views/mall/trade/order/components/OrderTableColumn.vue b/src/views/mall/trade/order/components/OrderTableColumn.vue
index 5d1e25eec40a5a26ecb385d90fb771925215d89c..adad30564a4961ed396ca048c08b52b44952789b 100644
--- a/src/views/mall/trade/order/components/OrderTableColumn.vue
+++ b/src/views/mall/trade/order/components/OrderTableColumn.vue
@@ -41,7 +41,7 @@
订单号:{{ scope.row.no }}
下单时间:{{ formatDate(scope.row.createTime) }}
diff --git a/src/views/mall/trade/order/detail/index.vue b/src/views/mall/trade/order/detail/index.vue
index 67e5476711952ade5811c2ae29b2db8d213ace8a..d521c2a395e1efc3f550474065dcf81c057c9e33 100644
--- a/src/views/mall/trade/order/detail/index.vue
+++ b/src/views/mall/trade/order/detail/index.vue
@@ -397,13 +397,14 @@ onMounted(async () => {
align-items: center;
min-height: 30px;
padding: 10px;
- background-color: #f7f8fa;
+ border-radius: var(--el-card-border-radius);
+ background-color: var(--app-content-bg-color);
&::before {
position: absolute;
top: 10px;
left: 13px; /* 将伪元素水平居中 */
- border-color: transparent #f7f8fa transparent transparent; /* 尖角颜色,左侧朝向 */
+ border-color: transparent var(--app-content-bg-color) transparent transparent; /* 尖角颜色,左侧朝向 */
border-style: solid;
border-width: 8px; /* 调整尖角大小 */
content: ''; /* 必须设置 content 属性 */
diff --git a/src/views/mall/trade/order/form/OrderDeliveryForm.vue b/src/views/mall/trade/order/form/OrderDeliveryForm.vue
index 3b98c2e67ac33840477ffceea53e470100609eec..d901c15669948d8719bfaa30afe278e1dc776fbb 100644
--- a/src/views/mall/trade/order/form/OrderDeliveryForm.vue
+++ b/src/views/mall/trade/order/form/OrderDeliveryForm.vue
@@ -3,8 +3,8 @@
- 快递物流
- 无需发货
+ 快递物流
+ 无需发货
diff --git a/src/views/member/group/GroupForm.vue b/src/views/member/group/GroupForm.vue
index 14510b0fb2b4b9516b07e8c731d0abd4c836610e..f87030b785644bca6d6c7b5ffee8617ecb7dd9dc 100644
--- a/src/views/member/group/GroupForm.vue
+++ b/src/views/member/group/GroupForm.vue
@@ -15,7 +15,7 @@
{{ dict.label }}
diff --git a/src/views/member/level/LevelForm.vue b/src/views/member/level/LevelForm.vue
index 7e6873cc6b0cfe54d3e4065b4b8a45f5ca113224..2aa49480c2219b8dc153b8905258ba2e61fe15fe 100644
--- a/src/views/member/level/LevelForm.vue
+++ b/src/views/member/level/LevelForm.vue
@@ -67,7 +67,7 @@
{{ dict.label }}
diff --git a/src/views/member/signin/config/SignInConfigForm.vue b/src/views/member/signin/config/SignInConfigForm.vue
index 616fd8fc0a638c4428ef1686871e491bf8d68445..9e0a629a32310e3f78e6747b032a40c25e917053 100644
--- a/src/views/member/signin/config/SignInConfigForm.vue
+++ b/src/views/member/signin/config/SignInConfigForm.vue
@@ -24,7 +24,7 @@
{{ dict.label }}
diff --git a/src/views/member/user/UserForm.vue b/src/views/member/user/UserForm.vue
index 0da4ef6147ea33fd9396864419cf514ee54f107e..70d831383b020e5420014848265b28f80fe3d9e7 100644
--- a/src/views/member/user/UserForm.vue
+++ b/src/views/member/user/UserForm.vue
@@ -15,7 +15,7 @@
{{ dict.label }}
@@ -35,7 +35,7 @@
{{ dict.label }}
diff --git a/src/views/member/user/components/UserBalanceUpdateForm.vue b/src/views/member/user/components/UserBalanceUpdateForm.vue
new file mode 100644
index 0000000000000000000000000000000000000000..36137cf7a59ababb105de232683a6e41928f9383
--- /dev/null
+++ b/src/views/member/user/components/UserBalanceUpdateForm.vue
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 增加
+ 减少
+
+
+
+
+
+
+
+
+
+
+ 确 定
+ 取 消
+
+
+
+
diff --git a/src/views/member/user/UserLevelUpdateForm.vue b/src/views/member/user/components/UserLevelUpdateForm.vue
similarity index 100%
rename from src/views/member/user/UserLevelUpdateForm.vue
rename to src/views/member/user/components/UserLevelUpdateForm.vue
diff --git a/src/views/member/user/UserPointUpdateForm.vue b/src/views/member/user/components/UserPointUpdateForm.vue
similarity index 88%
rename from src/views/member/user/UserPointUpdateForm.vue
rename to src/views/member/user/components/UserPointUpdateForm.vue
index 967ebe03a1e05fce9b2bd8654acbb54121f35c67..ad673bead0d660059f5564e981f111b9bf2d23a6 100644
--- a/src/views/member/user/UserPointUpdateForm.vue
+++ b/src/views/member/user/components/UserPointUpdateForm.vue
@@ -1,11 +1,11 @@
-
+
@@ -18,24 +18,24 @@
- 增加
- 减少
+ 增加
+ 减少
-
+
- 确 定
+ 确 定
取 消
-
-
-
-
- 余额列表
-
-
-
diff --git a/src/views/member/user/detail/UserAccountInfo.vue b/src/views/member/user/detail/UserAccountInfo.vue
index 56a6ab63a7941206c622ef17ee9734a950b45eb4..49071fdbbcf1549d7f9e3ddec16e0313d961bf56 100644
--- a/src/views/member/user/detail/UserAccountInfo.vue
+++ b/src/views/member/user/detail/UserAccountInfo.vue
@@ -2,81 +2,57 @@
-
+
{{ user.levelName || '无' }}
-
+
{{ user.experience || 0 }}
-
+
{{ user.point || 0 }}
-
+
{{ user.totalPoint || 0 }}
-
+
{{ fenToYuan(wallet.balance || 0) }}
-
+
{{ fenToYuan(wallet.totalExpense || 0) }}
-
+
{{ fenToYuan(wallet.totalRecharge || 0) }}
-
-
+
diff --git a/src/views/report/goview/index.vue b/src/views/report/goview/index.vue
index dd10cca0901f1e71164013d2e3c6250bd9961fe3..038b0624a6ccf78371f3ef9d9e6c42971f8ff078 100644
--- a/src/views/report/goview/index.vue
+++ b/src/views/report/goview/index.vue
@@ -1,7 +1,7 @@
-
-
+
+
diff --git a/src/views/report/jmreport/index.vue b/src/views/report/jmreport/index.vue
index 382d78937901b21d2774cb4cb949f1e4f74b5e63..9f0ba7259a1556709f1c99dd70815a035f768db8 100644
--- a/src/views/report/jmreport/index.vue
+++ b/src/views/report/jmreport/index.vue
@@ -1,7 +1,7 @@
-
-
+
+
@@ -10,6 +10,5 @@ import { getAccessToken } from '@/utils/auth'
defineOptions({ name: 'JimuReport' })
-const BASE_URL = import.meta.env.VITE_BASE_URL
-const src = ref(BASE_URL + '/jmreport/list?token=' + getAccessToken())
+const src = ref(import.meta.env.VITE_BASE_URL + '/jmreport/list?token=' + getAccessToken())
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index e99d7f8ad8bac2cf1f878583e9d200cc59188f59..5e47846b067f79e019c97f1c32be4c87bb350bef 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -8,11 +8,12 @@
:inline="true"
label-width="68px"
>
-
+
diff --git a/src/views/system/dict/DictTypeForm.vue b/src/views/system/dict/DictTypeForm.vue
index 5e416d785b642d819a617e6642dadf366e739df0..b9159b508ee7a1bf5715b43446cd85d3d5b0b960 100644
--- a/src/views/system/dict/DictTypeForm.vue
+++ b/src/views/system/dict/DictTypeForm.vue
@@ -22,7 +22,7 @@
{{ dict.label }}
diff --git a/src/views/system/dict/data/DictDataForm.vue b/src/views/system/dict/data/DictDataForm.vue
index 2094371de5ee11b075cb61fbc3da09bd1e352e99..bab18dbf0e9e28fae4ffe7cd9b0a491457ff295f 100644
--- a/src/views/system/dict/data/DictDataForm.vue
+++ b/src/views/system/dict/data/DictDataForm.vue
@@ -28,7 +28,7 @@
{{ dict.label }}
diff --git a/src/views/system/mail/account/account.data.ts b/src/views/system/mail/account/account.data.ts
index 23b1f0846b66894872f07fb281f8e3454641b203..6de394e6600b662b2982af42060f34a7c9bde153 100644
--- a/src/views/system/mail/account/account.data.ts
+++ b/src/views/system/mail/account/account.data.ts
@@ -25,12 +25,26 @@ const crudSchemas = reactive([
{
label: '邮箱',
field: 'mail',
- isSearch: true
+ isSearch: true,
+ search: {
+ componentProps: {
+ style: {
+ width: '240px'
+ }
+ }
+ }
},
{
label: '用户名',
field: 'username',
- isSearch: true
+ isSearch: true,
+ search: {
+ componentProps: {
+ style: {
+ width: '240px'
+ }
+ }
+ }
},
{
label: '密码',
diff --git a/src/views/system/mail/log/log.data.ts b/src/views/system/mail/log/log.data.ts
index 62cbf516a9d439afc8f5695b8d18b44e16a5e96b..594a5d5fa6ab2f361271facf0f0ee3f9d863295c 100644
--- a/src/views/system/mail/log/log.data.ts
+++ b/src/views/system/mail/log/log.data.ts
@@ -21,7 +21,10 @@ const crudSchemas = reactive([
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
- defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
+ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')],
+ style: {
+ width: '240px'
+ }
}
},
detail: {
@@ -36,7 +39,14 @@ const crudSchemas = reactive([
label: '用户编号',
field: 'userId',
isSearch: true,
- isTable: false
+ isTable: false,
+ search: {
+ componentProps: {
+ style: {
+ width: '240px'
+ }
+ }
+ }
},
{
label: '用户类型',
@@ -44,7 +54,14 @@ const crudSchemas = reactive([
dictType: DICT_TYPE.USER_TYPE,
dictClass: 'number',
isSearch: true,
- isTable: false
+ isTable: false,
+ search: {
+ componentProps: {
+ style: {
+ width: '240px'
+ }
+ }
+ }
},
{
label: '邮件标题',
@@ -65,7 +82,14 @@ const crudSchemas = reactive([
field: 'sendStatus',
dictType: DICT_TYPE.SYSTEM_MAIL_SEND_STATUS,
dictClass: 'string',
- isSearch: true
+ isSearch: true,
+ search: {
+ componentProps: {
+ style: {
+ width: '240px'
+ }
+ }
+ }
},
{
label: '邮箱账号',
@@ -79,6 +103,9 @@ const crudSchemas = reactive([
optionsAlias: {
labelField: 'mail',
valueField: 'id'
+ },
+ style: {
+ width: '240px'
}
}
}
@@ -93,7 +120,14 @@ const crudSchemas = reactive([
{
label: '模板编号',
field: 'templateId',
- isSearch: true
+ isSearch: true,
+ search: {
+ componentProps: {
+ style: {
+ width: '240px'
+ }
+ }
+ }
},
{
label: '模板编码',
diff --git a/src/views/system/mail/template/template.data.ts b/src/views/system/mail/template/template.data.ts
index e68f875a1637f46403ba8f9672b47b03683538fc..c11d5fe9f1d8468a5e42e1fb6f677d9171cd235e 100644
--- a/src/views/system/mail/template/template.data.ts
+++ b/src/views/system/mail/template/template.data.ts
@@ -22,12 +22,26 @@ const crudSchemas = reactive([
{
label: '模板编码',
field: 'code',
- isSearch: true
+ isSearch: true,
+ search: {
+ componentProps: {
+ style: {
+ width: '240px'
+ }
+ }
+ }
},
{
label: '模板名称',
field: 'name',
- isSearch: true
+ isSearch: true,
+ search: {
+ componentProps: {
+ style: {
+ width: '240px'
+ }
+ }
+ }
},
{
label: '模板标题',
@@ -59,6 +73,9 @@ const crudSchemas = reactive([
optionsAlias: {
labelField: 'mail',
valueField: 'id'
+ },
+ style: {
+ width: '240px'
}
}
},
@@ -82,7 +99,14 @@ const crudSchemas = reactive([
field: 'status',
isSearch: true,
dictType: DICT_TYPE.COMMON_STATUS,
- dictClass: 'number'
+ dictClass: 'number',
+ search: {
+ componentProps: {
+ style: {
+ width: '240px'
+ }
+ }
+ }
},
{
label: '备注',
@@ -100,7 +124,10 @@ const crudSchemas = reactive([
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
- defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
+ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')],
+ style: {
+ width: '240px'
+ }
}
}
},
diff --git a/src/views/system/menu/MenuForm.vue b/src/views/system/menu/MenuForm.vue
index 2b4a90d1507b6ddda43c7c92790b775b2a9c5722..ac37937c6fa2b5b55114acd5c7aa6c405a75489e 100644
--- a/src/views/system/menu/MenuForm.vue
+++ b/src/views/system/menu/MenuForm.vue
@@ -25,7 +25,7 @@
{{ dict.label }}
@@ -66,7 +66,7 @@
{{ dict.label }}
@@ -77,8 +77,8 @@
- 显示
- 隐藏
+ 显示
+ 隐藏
@@ -89,8 +89,8 @@
/>
- 总是
- 不是
+ 总是
+ 不是
@@ -101,8 +101,8 @@
/>
- 缓存
- 不缓存
+ 缓存
+ 不缓存
diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue
index bf64a807eb51dd9d39e7f9637847e35c190091bc..b2c93bbe569ed8b76d76d72462c8ee8dfd925317 100644
--- a/src/views/system/menu/index.vue
+++ b/src/views/system/menu/index.vue
@@ -84,9 +84,17 @@
-
+
-
+ handleStatusChanged(scope.row, val as number)"
+ />
@@ -127,8 +135,10 @@
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { handleTree } from '@/utils/tree'
import * as MenuApi from '@/api/system/menu'
+import { MenuVO } from '@/api/system/menu'
import MenuForm from './MenuForm.vue'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
+import { CommonStatusEnum } from '@/utils/constants'
defineOptions({ name: 'SystemMenu' })
@@ -208,6 +218,21 @@ const handleDelete = async (id: number) => {
} catch {}
}
+/** 开启/关闭菜单的状态 */
+const menuStatusUpdating = ref({}) // 菜单状态更新中的 menu 映射。key:菜单编号,value:是否更新中
+const handleStatusChanged = async (menu: MenuVO, val: number) => {
+ // 1. 标记 menu.id 更新中
+ menuStatusUpdating.value[menu.id] = true
+ try {
+ // 2. 发起更新状态
+ menu.status = val
+ await MenuApi.updateMenu(menu)
+ } finally {
+ // 3. 标记 menu.id 更新完成
+ menuStatusUpdating.value[menu.id] = false
+ }
+}
+
/** 初始化 **/
onMounted(() => {
getList()
diff --git a/src/views/system/notify/template/NotifyTemplateForm.vue b/src/views/system/notify/template/NotifyTemplateForm.vue
index a734e2d60e8b58d3b90a76fa8304039aa12689c8..beb286347f0165cba931fc096e6bafdc7bfbbf37 100644
--- a/src/views/system/notify/template/NotifyTemplateForm.vue
+++ b/src/views/system/notify/template/NotifyTemplateForm.vue
@@ -34,7 +34,7 @@
{{ dict.label }}
diff --git a/src/views/system/notify/template/NotifyTemplateSendForm.vue b/src/views/system/notify/template/NotifyTemplateSendForm.vue
index 126067c1ef11d7db751f060a81460c26fccaae38..4c3e9c45a78d8c01e3ae33be4d180cc48f3f4f0d 100644
--- a/src/views/system/notify/template/NotifyTemplateSendForm.vue
+++ b/src/views/system/notify/template/NotifyTemplateSendForm.vue
@@ -20,7 +20,7 @@
{{ dict.label }}
diff --git a/src/views/system/oauth2/client/ClientForm.vue b/src/views/system/oauth2/client/ClientForm.vue
index 5d13f71b3f2bd27c6547841a57fdb888ec3c8182..563682a083d85866872f59dd712f757c3b156b48 100644
--- a/src/views/system/oauth2/client/ClientForm.vue
+++ b/src/views/system/oauth2/client/ClientForm.vue
@@ -27,7 +27,7 @@
{{ dict.label }}
diff --git a/src/views/system/operatelog/index.vue b/src/views/system/operatelog/index.vue
index ed4f8f598c349a5f1be1461ae009140a23003cda..3f221b7ed049cb21659bd3e95fd69e1d49577201 100644
--- a/src/views/system/operatelog/index.vue
+++ b/src/views/system/operatelog/index.vue
@@ -13,7 +13,8 @@
@@ -34,10 +35,10 @@
class="!w-240px"
/>
-
+
@@ -104,7 +105,7 @@
:formatter="dateFormatter"
/>
-
+
@@ -21,11 +22,12 @@
v-model="queryParams.code"
placeholder="请输入岗位编码"
clearable
+ class="!w-240px"
@keyup.enter="handleQuery"
/>
-
+
{{ formData.code }}
-
+
全选/全不选:
{
}
}
-
diff --git a/src/views/system/role/RoleDataPermissionForm.vue b/src/views/system/role/RoleDataPermissionForm.vue
index 476a623cff6a3d31cd84027085676057bda11998..758d47aded1539ef5194f8f1e3610f8394926411 100644
--- a/src/views/system/role/RoleDataPermissionForm.vue
+++ b/src/views/system/role/RoleDataPermissionForm.vue
@@ -1,5 +1,5 @@
-
+
{{ formData.name }}
@@ -21,9 +21,9 @@
-
+
全选/全不选:
{{ dict.label }}
diff --git a/src/views/system/sms/channel/index.vue b/src/views/system/sms/channel/index.vue
index 417d870ed1926a46f6331c74f4956b4d5ca33e89..f681b4095b9edde40a68c2f8d40b3cabfe9a6c79 100644
--- a/src/views/system/sms/channel/index.vue
+++ b/src/views/system/sms/channel/index.vue
@@ -14,11 +14,17 @@
v-model="queryParams.signature"
placeholder="请输入短信签名"
clearable
+ class="!w-240px"
@keyup.enter="handleQuery"
/>
-
+
diff --git a/src/views/system/sms/template/SmsTemplateForm.vue b/src/views/system/sms/template/SmsTemplateForm.vue
index 9750e8a79681a409e9f15c110ce46cdf88c1a036..f339136a0e3af5d1fca9d01b440b068eaeaef34c 100644
--- a/src/views/system/sms/template/SmsTemplateForm.vue
+++ b/src/views/system/sms/template/SmsTemplateForm.vue
@@ -44,7 +44,7 @@
{{ dict.label }}
diff --git a/src/views/system/social/client/SocialClientForm.vue b/src/views/system/social/client/SocialClientForm.vue
index e6f92bd6c486e3bfb7f3f8a381683335cb359139..cbfe195b509d0767da958b377c81a1d36b9b4631 100644
--- a/src/views/system/social/client/SocialClientForm.vue
+++ b/src/views/system/social/client/SocialClientForm.vue
@@ -15,7 +15,7 @@
{{ dict.label }}
@@ -26,7 +26,7 @@
{{ dict.label }}
@@ -49,7 +49,7 @@
{{ dict.label }}
diff --git a/src/views/system/tenant/TenantForm.vue b/src/views/system/tenant/TenantForm.vue
index 4d5fde5a1e391cb42138afe191165462255e5e88..205a2cf0f055113824b359458fb13f4fda20cfb5 100644
--- a/src/views/system/tenant/TenantForm.vue
+++ b/src/views/system/tenant/TenantForm.vue
@@ -62,7 +62,7 @@
{{ dict.label }}
diff --git a/src/views/system/tenantPackage/TenantPackageForm.vue b/src/views/system/tenantPackage/TenantPackageForm.vue
index 74928892be52328addaa73d95590aae34304865d..2003c9c5de76c3833ea15c7dfc94a5342b551bf3 100644
--- a/src/views/system/tenantPackage/TenantPackageForm.vue
+++ b/src/views/system/tenantPackage/TenantPackageForm.vue
@@ -11,7 +11,7 @@
-
+
全选/全不选:
{{ dict.label }}
@@ -185,10 +185,3 @@ const handleCheckedTreeExpand = () => {
}
}
-
diff --git a/stylelint.config.js b/stylelint.config.js
index 890b45bcf9bc63538b340cdf22cec4cd1fd46664..b336785026b4cd48f09a12c0d5973fe7f60b619a 100644
--- a/stylelint.config.js
+++ b/stylelint.config.js
@@ -13,19 +13,19 @@ module.exports = {
'at-rule-no-unknown': [
true,
{
- ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin']
+ ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin', 'extend']
}
],
'media-query-no-invalid': null,
'function-no-unknown': null,
'no-empty-source': null,
'named-grid-areas-no-invalid': null,
- 'unicode-bom': 'never',
+ // 'unicode-bom': 'never',
'no-descending-specificity': null,
'font-family-no-missing-generic-family-keyword': null,
- 'declaration-colon-space-after': 'always-single-line',
- 'declaration-colon-space-before': 'never',
- 'declaration-block-trailing-semicolon': null,
+ // 'declaration-colon-space-after': 'always-single-line',
+ // 'declaration-colon-space-before': 'never',
+ // 'declaration-block-trailing-semicolon': null,
'rule-empty-line-before': [
'always',
{
diff --git a/tsconfig.json b/tsconfig.json
index 182852ac7d4a868a84287697a72f0668afe4bd43..38376ef96689fa059c322f4260aece185f76ae05 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -24,11 +24,11 @@
"@/*": ["src/*"]
},
"types": [
- "@intlify/unplugin-vue-i18n/types",
- "vite/client",
- "element-plus/global",
- "@types/qrcode",
- "vite-plugin-svg-icons/client"
+ // "@intlify/unplugin-vue-i18n/types",
+ "vite/client"
+ // "element-plus/global",
+ // "@types/qrcode",
+ // "vite-plugin-svg-icons/client"
],
"outDir": "target", // 请保留这个属性,防止tsconfig.json文件报错
"typeRoots": ["./node_modules/@types/", "./types"]
diff --git a/types/env.d.ts b/types/env.d.ts
index 057b52689e1ab650221ac455b2f5c9b8ac32acff..1326e3b4666e74babac0c6919cc4afce55043dd3 100644
--- a/types/env.d.ts
+++ b/types/env.d.ts
@@ -14,6 +14,9 @@ interface ImportMetaEnv {
readonly VITE_DEV: string
readonly VITE_APP_CAPTCHA_ENABLE: string
readonly VITE_APP_TENANT_ENABLE: string
+ readonly VITE_APP_DEFAULT_LOGIN_TENANT: string
+ readonly VITE_APP_DEFAULT_LOGIN_USERNAME: string
+ readonly VITE_APP_DEFAULT_LOGIN_PASSWORD: string
readonly VITE_APP_DOCALERT_ENABLE: string
readonly VITE_BASE_URL: string
readonly VITE_UPLOAD_URL: string
diff --git a/types/global.d.ts b/types/global.d.ts
index e91e1fe4093035ada41708bef283ea20483a745b..eebe9bb830babf4ca4f4617e6e12d236f0b616b2 100644
--- a/types/global.d.ts
+++ b/types/global.d.ts
@@ -50,4 +50,9 @@ declare global {
name: string
children?: Tree[] | any[]
}
+ // 分页数据公共返回
+ interface PageResult {
+ list: T // 数据
+ total: number // 总量
+ }
}
diff --git a/uno.config.ts b/uno.config.ts
index d146731952fefd2321596e196a182cb728fe5811..e52457ac34e20c7571e1d76cf381bbcc6ab77ea9 100644
--- a/uno.config.ts
+++ b/uno.config.ts
@@ -12,7 +12,7 @@ export default defineConfig({
${selector} {
display: flex;
height: 100%;
- padding: 1px 10px 0;
+ padding: 0 10px;
cursor: pointer;
align-items: center;
transition: background var(--transition-time-02);
diff --git a/vite.config.ts b/vite.config.ts
index 8cba9150fb0a015dfde4f8fb8dcf33b0b22cce88..3ef21f269cd0f0c430f4f58dd19a8a99b8658512 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,78 +1,85 @@
-import { resolve } from 'path'
-import { loadEnv } from 'vite'
-import type { UserConfig, ConfigEnv } from 'vite'
-import { createVitePlugins } from './build/vite'
-import { include, exclude } from "./build/vite/optimize"
+import {resolve} from 'path'
+import type {ConfigEnv, UserConfig} from 'vite'
+import {loadEnv} from 'vite'
+import {createVitePlugins} from './build/vite'
+import {exclude, include} from "./build/vite/optimize"
// 当前执行node命令时文件夹的地址(工作目录)
const root = process.cwd()
// 路径查找
function pathResolve(dir: string) {
- return resolve(root, '.', dir)
+ return resolve(root, '.', dir)
}
// https://vitejs.dev/config/
-export default ({ command, mode }: ConfigEnv): UserConfig => {
- let env = {} as any
- const isBuild = command === 'build'
- if (!isBuild) {
- env = loadEnv((process.argv[3] === '--mode' ? process.argv[4] : process.argv[3]), root)
- } else {
- env = loadEnv(mode, root)
- }
- return {
- base: env.VITE_BASE_PATH,
- root: root,
- // 服务端渲染
- server: {
- port: env.VITE_PORT, // 端口号
- host: "0.0.0.0",
- open: env.VITE_OPEN === 'true',
- // 本地跨域代理. 目前注释的原因:暂时没有用途,server 端已经支持跨域
- // proxy: {
- // ['/admin-api']: {
- // target: env.VITE_BASE_URL,
- // ws: false,
- // changeOrigin: true,
- // rewrite: (path) => path.replace(new RegExp(`^/admin-api`), ''),
- // },
- // },
- },
- // 项目使用的vite插件。 单独提取到build/vite/plugin中管理
- plugins: createVitePlugins(),
- css: {
- preprocessorOptions: {
- scss: {
- additionalData: '@import "./src/styles/variables.scss";',
- javascriptEnabled: true
- }
- }
- },
- resolve: {
- extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.scss', '.css'],
- alias: [
- {
- find: 'vue-i18n',
- replacement: 'vue-i18n/dist/vue-i18n.cjs.js'
+export default ({command, mode}: ConfigEnv): UserConfig => {
+ let env = {} as any
+ const isBuild = command === 'build'
+ if (!isBuild) {
+ env = loadEnv((process.argv[3] === '--mode' ? process.argv[4] : process.argv[3]), root)
+ } else {
+ env = loadEnv(mode, root)
+ }
+ return {
+ base: env.VITE_BASE_PATH,
+ root: root,
+ // 服务端渲染
+ server: {
+ port: env.VITE_PORT, // 端口号
+ host: "0.0.0.0",
+ open: env.VITE_OPEN === 'true',
+ // 本地跨域代理. 目前注释的原因:暂时没有用途,server 端已经支持跨域
+ // proxy: {
+ // ['/admin-api']: {
+ // target: env.VITE_BASE_URL,
+ // ws: false,
+ // changeOrigin: true,
+ // rewrite: (path) => path.replace(new RegExp(`^/admin-api`), ''),
+ // },
+ // },
},
- {
- find: /\@\//,
- replacement: `${pathResolve('src')}/`
- }
- ]
- },
- build: {
- minify: 'terser',
- outDir: env.VITE_OUT_DIR || 'dist',
- sourcemap: env.VITE_SOURCEMAP === 'true' ? 'inline' : false,
- // brotliSize: false,
- terserOptions: {
- compress: {
- drop_debugger: env.VITE_DROP_DEBUGGER === 'true',
- drop_console: env.VITE_DROP_CONSOLE === 'true'
- }
- }
- },
- optimizeDeps: { include, exclude }
- }
+ // 项目使用的vite插件。 单独提取到build/vite/plugin中管理
+ plugins: createVitePlugins(),
+ css: {
+ preprocessorOptions: {
+ scss: {
+ additionalData: '@import "./src/styles/variables.scss";',
+ javascriptEnabled: true
+ }
+ }
+ },
+ resolve: {
+ extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.scss', '.css'],
+ alias: [
+ {
+ find: 'vue-i18n',
+ replacement: 'vue-i18n/dist/vue-i18n.cjs.js'
+ },
+ {
+ find: /\@\//,
+ replacement: `${pathResolve('src')}/`
+ }
+ ]
+ },
+ build: {
+ minify: 'terser',
+ outDir: env.VITE_OUT_DIR || 'dist',
+ sourcemap: env.VITE_SOURCEMAP === 'true' ? 'inline' : false,
+ // brotliSize: false,
+ terserOptions: {
+ compress: {
+ drop_debugger: env.VITE_DROP_DEBUGGER === 'true',
+ drop_console: env.VITE_DROP_CONSOLE === 'true'
+ }
+ },
+ rollupOptions: {
+ output: {
+ manualChunks: {
+ echarts: ['echarts'] // 将 echarts 单独打包,参考 https://gitee.com/yudaocode/yudao-ui-admin-vue3/issues/IAB1SX 讨论
+ }
+ },
+ },
+ },
+ optimizeDeps: {include, exclude}
+ }
}