From 0a0941a49b9732ab64fb6123c4aedb03ffcfb2f2 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Thu, 12 Jun 2025 16:09:06 +0800 Subject: [PATCH] feat: workflow --- ui/package.json | 5 +- ui/src/api/system/user-group.ts | 79 +++++++ ui/src/assets/fileType/csv-icon.svg | 7 + ui/src/assets/fileType/doc-icon.svg | 5 + ui/src/assets/fileType/docx-icon.svg | 5 + ui/src/assets/fileType/file-icon.svg | 1 + ui/src/assets/fileType/html-icon.svg | 6 + ui/src/assets/fileType/md-icon.svg | 5 + ui/src/assets/fileType/pdf-icon.svg | 5 + ui/src/assets/fileType/txt-icon.svg | 7 + ui/src/assets/fileType/unknown-icon.svg | 5 + ui/src/assets/fileType/xls-icon.svg | 5 + ui/src/assets/fileType/xlsx-icon.svg | 5 + ui/src/assets/fileType/zip-icon.svg | 6 + ui/src/assets/workflow/icon_and.svg | 6 + ui/src/assets/workflow/icon_file-audio.svg | 5 + ui/src/assets/workflow/icon_file-doc.svg | 5 + ui/src/assets/workflow/icon_file-image.svg | 6 + ui/src/assets/workflow/icon_or.svg | 6 + .../components/app-icon/icons/application.ts | 223 ++++++++++++++++-- .../component/DropdownMenu.vue | 18 +- ui/src/views/application-workflow/index.vue | 18 +- .../model/component/ParamSettingDialog.vue | 2 +- .../group/component/CreateGroupDialog.vue | 122 ++++++++++ ui/src/views/system-chat-user/group/index.vue | 115 +++++++++ ui/src/workflow/common/AddFormCollect.vue | 2 +- ui/src/workflow/common/EditFormCollect.vue | 2 +- ui/src/workflow/common/NodeContainer.vue | 4 +- ui/src/workflow/common/data.ts | 4 +- .../component/ApiFieldFormDialog.vue | 4 +- .../component/ApiInputFieldTable.vue | 2 +- .../component/FileUploadSettingDialog.vue | 6 +- .../component/UserFieldFormDialog.vue | 4 +- .../nodes/function-lib-node/index.vue | 8 +- ui/src/workflow/nodes/function-node/index.vue | 12 +- 35 files changed, 656 insertions(+), 64 deletions(-) create mode 100644 ui/src/api/system/user-group.ts create mode 100644 ui/src/assets/fileType/csv-icon.svg create mode 100644 ui/src/assets/fileType/doc-icon.svg create mode 100644 ui/src/assets/fileType/docx-icon.svg create mode 100644 ui/src/assets/fileType/file-icon.svg create mode 100644 ui/src/assets/fileType/html-icon.svg create mode 100644 ui/src/assets/fileType/md-icon.svg create mode 100644 ui/src/assets/fileType/pdf-icon.svg create mode 100644 ui/src/assets/fileType/txt-icon.svg create mode 100644 ui/src/assets/fileType/unknown-icon.svg create mode 100644 ui/src/assets/fileType/xls-icon.svg create mode 100644 ui/src/assets/fileType/xlsx-icon.svg create mode 100644 ui/src/assets/fileType/zip-icon.svg create mode 100644 ui/src/assets/workflow/icon_and.svg create mode 100644 ui/src/assets/workflow/icon_file-audio.svg create mode 100644 ui/src/assets/workflow/icon_file-doc.svg create mode 100644 ui/src/assets/workflow/icon_file-image.svg create mode 100644 ui/src/assets/workflow/icon_or.svg create mode 100644 ui/src/views/system-chat-user/group/component/CreateGroupDialog.vue create mode 100644 ui/src/views/system-chat-user/group/index.vue diff --git a/ui/package.json b/ui/package.json index 53d76c8a0..54e4f2fdb 100644 --- a/ui/package.json +++ b/ui/package.json @@ -13,6 +13,7 @@ "format": "prettier --write src/" }, "dependencies": { + "@antv/layout": "^1.2.14-beta.8", "@codemirror/lang-json": "^6.0.1", "@codemirror/lang-python": "^6.2.1", "@codemirror/theme-one-dark": "^6.1.2", @@ -33,15 +34,17 @@ "moment": "^2.30.1", "nprogress": "^0.2.0", "pinia": "^3.0.1", + "recorder-core": "^1.3.25011100", "screenfull": "^6.0.2", + "sortablejs": "^1.15.6", "use-element-plus-theme": "^0.0.5", "vue": "^3.5.13", "vue-clipboard3": "^2.0.0", "vue-codemirror": "^6.1.1", + "vue-demi": "^0.14.10", "vue-draggable-plus": "^0.6.0", "vue-i18n": "^11.1.3", "vue-router": "^4.5.0", - "recorder-core": "^1.3.25011100", "vue3-menus": "^1.1.2" }, "devDependencies": { diff --git a/ui/src/api/system/user-group.ts b/ui/src/api/system/user-group.ts new file mode 100644 index 000000000..ebd770a6b --- /dev/null +++ b/ui/src/api/system/user-group.ts @@ -0,0 +1,79 @@ +import { Result } from '@/request/Result' +import { get, post, del, put } from '@/request/index' +import type { Ref } from 'vue' + +const prefix = '/system/group' + +/** + * 获取用户组列表 + */ +const getUserGroup: (loading?: Ref) => Promise> = () => { + return get(`${prefix}`) +} + +/** + * 创建用户组 + * @param 参数 + * { + "id": "string", + "name": "string" + } + */ +const postUserGroup: (data: any, loading?: Ref) => Promise> = ( + data, + loading, +) => { + return post(`${prefix}`, data, undefined, loading) +} + +/** + * 删除用户组 + * @param 参数 user_group_id + */ +const delUserGroup: (user_group_id: String, loading?: Ref) => Promise> = ( + user_group_id, + loading, +) => { + return del(`${prefix}/${user_group_id}`, undefined, {}, loading) +} + +/** + * 给用户组添加用户 + * @param 参数 + * { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + */ +const postAddMember: ( + user_group_id: String, + body: any, + loading?: Ref, +) => Promise> = (user_group_id, body, loading) => { + return post(`${prefix}/${user_group_id}/add_member`, body, {}, loading) +} + +/** + * 从用户组删除用户 + * @param 参数 { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + */ +const postRemoveMember: ( + user_group_id: String, + body: any, + loading?: Ref, +) => Promise> = (user_group_id, body, loading) => { + return post(`${prefix}/${user_group_id}`, body, {}, loading) +} + +export default { + getUserGroup, + postUserGroup, + delUserGroup, + postAddMember, + postRemoveMember, +} diff --git a/ui/src/assets/fileType/csv-icon.svg b/ui/src/assets/fileType/csv-icon.svg new file mode 100644 index 000000000..85147ccb4 --- /dev/null +++ b/ui/src/assets/fileType/csv-icon.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ui/src/assets/fileType/doc-icon.svg b/ui/src/assets/fileType/doc-icon.svg new file mode 100644 index 000000000..899a00861 --- /dev/null +++ b/ui/src/assets/fileType/doc-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ui/src/assets/fileType/docx-icon.svg b/ui/src/assets/fileType/docx-icon.svg new file mode 100644 index 000000000..899a00861 --- /dev/null +++ b/ui/src/assets/fileType/docx-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ui/src/assets/fileType/file-icon.svg b/ui/src/assets/fileType/file-icon.svg new file mode 100644 index 000000000..59b195887 --- /dev/null +++ b/ui/src/assets/fileType/file-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ui/src/assets/fileType/html-icon.svg b/ui/src/assets/fileType/html-icon.svg new file mode 100644 index 000000000..b59a48826 --- /dev/null +++ b/ui/src/assets/fileType/html-icon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/ui/src/assets/fileType/md-icon.svg b/ui/src/assets/fileType/md-icon.svg new file mode 100644 index 000000000..7b35a9242 --- /dev/null +++ b/ui/src/assets/fileType/md-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ui/src/assets/fileType/pdf-icon.svg b/ui/src/assets/fileType/pdf-icon.svg new file mode 100644 index 000000000..17a4be004 --- /dev/null +++ b/ui/src/assets/fileType/pdf-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ui/src/assets/fileType/txt-icon.svg b/ui/src/assets/fileType/txt-icon.svg new file mode 100644 index 000000000..051ea2bda --- /dev/null +++ b/ui/src/assets/fileType/txt-icon.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ui/src/assets/fileType/unknown-icon.svg b/ui/src/assets/fileType/unknown-icon.svg new file mode 100644 index 000000000..20270ac52 --- /dev/null +++ b/ui/src/assets/fileType/unknown-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ui/src/assets/fileType/xls-icon.svg b/ui/src/assets/fileType/xls-icon.svg new file mode 100644 index 000000000..22cb86953 --- /dev/null +++ b/ui/src/assets/fileType/xls-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ui/src/assets/fileType/xlsx-icon.svg b/ui/src/assets/fileType/xlsx-icon.svg new file mode 100644 index 000000000..22cb86953 --- /dev/null +++ b/ui/src/assets/fileType/xlsx-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ui/src/assets/fileType/zip-icon.svg b/ui/src/assets/fileType/zip-icon.svg new file mode 100644 index 000000000..ad5d625fb --- /dev/null +++ b/ui/src/assets/fileType/zip-icon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/ui/src/assets/workflow/icon_and.svg b/ui/src/assets/workflow/icon_and.svg new file mode 100644 index 000000000..9c4842bff --- /dev/null +++ b/ui/src/assets/workflow/icon_and.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/ui/src/assets/workflow/icon_file-audio.svg b/ui/src/assets/workflow/icon_file-audio.svg new file mode 100644 index 000000000..13f1f7216 --- /dev/null +++ b/ui/src/assets/workflow/icon_file-audio.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ui/src/assets/workflow/icon_file-doc.svg b/ui/src/assets/workflow/icon_file-doc.svg new file mode 100644 index 000000000..86ac2d3f1 --- /dev/null +++ b/ui/src/assets/workflow/icon_file-doc.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ui/src/assets/workflow/icon_file-image.svg b/ui/src/assets/workflow/icon_file-image.svg new file mode 100644 index 000000000..4511c36f5 --- /dev/null +++ b/ui/src/assets/workflow/icon_file-image.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/ui/src/assets/workflow/icon_or.svg b/ui/src/assets/workflow/icon_or.svg new file mode 100644 index 000000000..d38f01472 --- /dev/null +++ b/ui/src/assets/workflow/icon_or.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/ui/src/components/app-icon/icons/application.ts b/ui/src/components/app-icon/icons/application.ts index 3d4ba498c..aad4b79de 100644 --- a/ui/src/components/app-icon/icons/application.ts +++ b/ui/src/components/app-icon/icons/application.ts @@ -200,7 +200,7 @@ export default { ]) }, }, - 'app-like': { + 'app-like': { iconReader: () => { return h('i', [ h( @@ -209,17 +209,17 @@ export default { style: { height: '100%', width: '100%' }, viewBox: '0 0 16 16', version: '1.1', - xmlns: 'http://www.w3.org/2000/svg' + xmlns: 'http://www.w3.org/2000/svg', }, [ h('path', { d: 'M2.00518 14.6608H0.666612C0.666097 14.6874 0.666707 5.33317 0.666612 5.29087H2.00518C2.00004 5.33317 1.98014 14.6874 2.00518 14.6608ZM9.70096 5.28984H12.5717C14.5687 5.28984 15.0274 7.05264 14.5687 8.37353L12.5717 13.6308C12.4029 14.2423 11.8409 14.6665 11.1995 14.6665H3.33882C3.154 14.6665 3.00418 14.5167 3.00418 14.3319V5.62448C3.00418 5.43966 3.154 5.28984 3.33882 5.28984H4.02656C4.24449 5.28984 4.44877 5.18374 4.5741 5.00545L7.35254 1.05296C7.5406 0.753754 8.04824 0.52438 8.5893 0.770777C9.40089 1.14037 10.3724 1.94718 10.3724 3.28394C10.3724 3.78809 10.1486 4.45673 9.70096 5.28984ZM12.5717 6.62841H7.46215L8.52183 4.65626C8.87422 4.00045 9.03388 3.52351 9.03388 3.28394C9.03388 2.89556 8.9524 2.45627 8.25544 2.09612L5.26934 6.34402C5.14401 6.5223 4.93973 6.62841 4.72181 6.62841H4.34275V13.3279H11.1995C11.2411 13.3279 11.2734 13.3035 11.2813 13.2747L11.298 13.2142L13.3098 7.91815C13.5743 7.13902 13.3105 6.62841 12.5717 6.62841Z', - fill: 'currentColor' - }) - ] - ) + fill: 'currentColor', + }), + ], + ), ]) - } + }, }, 'app-like-color': { iconReader: () => { @@ -230,21 +230,21 @@ export default { style: { height: '100%', width: '100%' }, viewBox: '0 0 16 16', version: '1.1', - xmlns: 'http://www.w3.org/2000/svg' + xmlns: 'http://www.w3.org/2000/svg', }, [ h('path', { d: 'M2.00497 14.6608H2.00518C2.00511 14.6609 2.00504 14.6609 2.00497 14.6608H0.666612C0.666097 14.6874 0.666707 5.33317 0.666612 5.29087H2.00518C2.00006 5.33305 1.98026 14.6344 2.00497 14.6608Z', - fill: '#FFC60A' + fill: '#FFC60A', }), h('path', { d: 'M12.5717 5.28984H9.70096C10.1486 4.45673 10.3724 3.78809 10.3724 3.28394C10.3724 1.94718 9.40089 1.14037 8.5893 0.770777C8.04824 0.52438 7.5406 0.753754 7.35254 1.05296L4.5741 5.00545C4.44877 5.18374 4.24449 5.28984 4.02656 5.28984H3.33882C3.154 5.28984 3.00418 5.43966 3.00418 5.62448V14.3319C3.00418 14.5167 3.154 14.6665 3.33882 14.6665H11.1995C11.8409 14.6665 12.4029 14.2423 12.5717 13.6308L14.5687 8.37353C15.0274 7.05264 14.5687 5.28984 12.5717 5.28984Z', - fill: '#FFC60A' - }) - ] - ) + fill: '#FFC60A', + }), + ], + ), ]) - } + }, }, 'app-oppose': { iconReader: () => { @@ -255,11 +255,140 @@ export default { style: { height: '100%', width: '100%' }, viewBox: '0 0 16 16', version: '1.1', - xmlns: 'http://www.w3.org/2000/svg' + xmlns: 'http://www.w3.org/2000/svg', }, [ h('path', { d: 'M2.00518 1.28008H0.666616C0.666616 1.33341 0.666504 10.6667 0.666616 10.65H2.00518C1.99984 10.6667 1.99984 1.33341 2.00518 1.28008ZM9.70097 10.6511H12.5717C14.5687 10.6511 15.0274 8.88828 14.5687 7.56739L12.5717 2.3101C12.4029 1.69862 11.8409 1.27441 11.1996 1.27441H3.33883C3.15401 1.27441 3.00418 1.42424 3.00418 1.60906V10.3164C3.00418 10.5013 3.15401 10.6511 3.33883 10.6511H4.02656C4.24449 10.6511 4.44877 10.7572 4.5741 10.9355L7.35254 14.888C7.5406 15.1872 8.04825 15.4165 8.58931 15.1701C9.40089 14.8005 10.3724 13.9937 10.3724 12.657C10.3724 12.1528 10.1486 11.4842 9.70097 10.6511ZM12.5717 9.31251H7.46216L8.52184 11.2847C8.87422 11.9405 9.03388 12.4174 9.03388 12.657C9.03388 13.0454 8.95241 13.4846 8.25545 13.8448L5.26935 9.5969C5.14402 9.41861 4.93974 9.31251 4.72181 9.31251H4.34275V2.61298H11.1996C11.2411 2.61298 11.2734 2.63737 11.2813 2.6662L11.298 2.72673L13.3098 8.02277C13.5743 8.8019 13.3105 9.31251 12.5717 9.31251Z', + fill: 'currentColor', + }), + ], + ), + ]) + }, + }, + 'app-oppose-color': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + style: { height: '100%', width: '100%' }, + viewBox: '0 0 16 16', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg', + }, + [ + h('path', { + d: 'M9.70106 10.7102H12.5718C14.5688 10.7102 15.0275 8.94736 14.5688 7.62647L12.5718 2.36918C12.403 1.7577 11.841 1.3335 11.1996 1.3335H3.33891C3.1541 1.3335 3.00427 1.48332 3.00427 1.66814V10.3755C3.00427 10.5603 3.1541 10.7102 3.33891 10.7102H4.02665C4.24458 10.7102 4.44886 10.8163 4.57419 10.9945L7.35263 14.947C7.54069 15.2462 8.04834 15.4756 8.58939 15.2292C9.40098 14.8596 10.3725 14.0528 10.3725 12.7161C10.3725 12.2119 10.1487 11.5433 9.70106 10.7102Z', + fill: '#F54A45', + }), + h('path', { + d: 'M2.00004 1.3335H0.661473C0.661473 1.3335 0.660982 10.7764 0.661473 10.7035H2.00001C1.99469 10.6868 1.9947 1.38674 2.00004 1.3335Z', + fill: '#F54A45', + }), + ], + ), + ]) + }, + }, + 'app-play-outlined': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + style: { height: '100%', width: '100%' }, + viewBox: '0 0 14 14', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg', + }, + [ + h('path', { + d: 'M2.63333 1.82346C2.81847 1.72056 3.04484 1.72611 3.22472 1.83795L10.8081 6.55299C10.9793 6.65945 11.0834 6.84677 11.0834 7.04838C11.0834 7.24999 10.9793 7.43731 10.8081 7.54376L3.22472 12.2588C3.04484 12.3707 2.81847 12.3762 2.63333 12.2733C2.44819 12.1704 2.33337 11.9752 2.33337 11.7634V2.33333C2.33337 2.12152 2.44819 1.92635 2.63333 1.82346ZM3.50004 3.38293V10.7138L9.39529 7.04838L3.50004 3.38293Z', + fill: 'currentColor', + }), + ], + ), + ]) + }, + }, + 'app-save-outlined': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + style: { height: '100%', width: '100%' }, + viewBox: '0 0 14 14', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg', + }, + [ + h('path', { + d: 'M1.16666 2.53734C1.16666 1.78025 1.7804 1.1665 2.53749 1.1665H11.4625C12.2196 1.1665 12.8333 1.78025 12.8333 2.53734V11.4623C12.8333 12.2194 12.2196 12.8332 11.4625 12.8332H2.53749C1.7804 12.8332 1.16666 12.2194 1.16666 11.4623V2.53734ZM2.53749 2.33317C2.42473 2.33317 2.33332 2.42458 2.33332 2.53734V11.4623C2.33332 11.5751 2.42473 11.6665 2.53749 11.6665H11.4625C11.5753 11.6665 11.6667 11.5751 11.6667 11.4623V2.53734C11.6667 2.42457 11.5753 2.33317 11.4625 2.33317H2.53749Z', + fill: 'currentColor', + }), + h('path', { + d: 'M3.79166 1.74984C3.79166 1.42767 4.05282 1.1665 4.37499 1.1665H9.33332C9.65549 1.1665 9.91666 1.42767 9.91666 1.74984V6.99984C9.91666 7.322 9.65549 7.58317 9.33332 7.58317H4.37499C4.05282 7.58317 3.79166 7.322 3.79166 6.99984V1.74984ZM4.95832 2.33317V6.4165H8.74999V2.33317H4.95832Z', + fill: 'currentColor', + }), + h('path', { + d: 'M7.58333 3.2085C7.9055 3.2085 8.16667 3.46966 8.16667 3.79183V4.9585C8.16667 5.28066 7.9055 5.54183 7.58333 5.54183C7.26117 5.54183 7 5.28066 7 4.9585V3.79183C7 3.46966 7.26117 3.2085 7.58333 3.2085Z', + fill: 'currentColor', + }), + h('path', { + d: 'M2.62415 1.74984C2.62415 1.42767 2.88531 1.1665 3.20748 1.1665H10.4996C10.8217 1.1665 11.0829 1.42767 11.0829 1.74984C11.0829 2.072 10.8217 2.33317 10.4996 2.33317H3.20748C2.88531 2.33317 2.62415 2.072 2.62415 1.74984Z', + fill: 'currentColor', + }), + ], + ), + ]) + }, + }, + 'app-history-outlined': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + style: { height: '100%', width: '100%' }, + viewBox: '0 0 20 20', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg', + }, + [ + h('path', { + d: 'M18.6667 10.0001C18.6667 14.6025 14.9358 18.3334 10.3334 18.3334C7.68359 18.3334 5.32266 17.0967 3.79633 15.1689L5.12054 14.1563C6.3421 15.6864 8.22325 16.6667 10.3334 16.6667C14.0153 16.6667 17 13.682 17 10.0001C17 6.31818 14.0153 3.33341 10.3334 3.33341C7.03005 3.33341 4.28786 5.73596 3.75889 8.88897H4.3469C4.70187 8.88897 4.9136 9.28459 4.7167 9.57995L3.32493 11.6676C3.14901 11.9315 2.76125 11.9315 2.58533 11.6676L1.19356 9.57995C0.996651 9.28459 1.20838 8.88897 1.56336 8.88897H2.07347C2.61669 4.8119 6.10774 1.66675 10.3334 1.66675C14.9358 1.66675 18.6667 5.39771 18.6667 10.0001Z', + fill: 'currentColor', + }), + h('path', { + d: 'M10.8334 9.7223V7.11119C10.8334 6.86573 10.6344 6.66675 10.3889 6.66675H9.61115C9.36569 6.66675 9.16671 6.86573 9.16671 7.11119V10.9445C9.16671 11.19 9.36569 11.389 9.61115 11.389H13.1667C13.4122 11.389 13.6112 11.19 13.6112 10.9445V10.1667C13.6112 9.92129 13.4122 9.7223 13.1667 9.7223H10.8334Z', + fill: 'currentColor', + }), + ], + ), + ]) + }, + }, + 'app-fitview': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + style: { height: '100%', width: '100%' }, + viewBox: '0 0 1024 1024', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg' + }, + [ + h('path', { + d: 'M128 85.333333h192a21.333333 21.333333 0 0 1 21.333333 21.333334v42.666666a21.333333 21.333333 0 0 1-21.333333 21.333334H170.666667v149.333333a21.333333 21.333333 0 0 1-21.333334 21.333333h-42.666666a21.333333 21.333333 0 0 1-21.333334-21.333333V128a42.666667 42.666667 0 0 1 42.666667-42.666667z m768 853.333334h-192a21.333333 21.333333 0 0 1-21.333333-21.333334v-42.666666a21.333333 21.333333 0 0 1 21.333333-21.333334H853.333333v-149.333333a21.333333 21.333333 0 0 1 21.333334-21.333333h42.666666a21.333333 21.333333 0 0 1 21.333334 21.333333V896a42.666667 42.666667 0 0 1-42.666667 42.666667zM85.333333 896v-192a21.333333 21.333333 0 0 1 21.333334-21.333333h42.666666a21.333333 21.333333 0 0 1 21.333334 21.333333V853.333333h149.333333a21.333333 21.333333 0 0 1 21.333333 21.333334v42.666666a21.333333 21.333333 0 0 1-21.333333 21.333334H128a42.666667 42.666667 0 0 1-42.666667-42.666667zM938.666667 128v192a21.333333 21.333333 0 0 1-21.333334 21.333333h-42.666666a21.333333 21.333333 0 0 1-21.333334-21.333333V170.666667h-149.333333a21.333333 21.333333 0 0 1-21.333333-21.333334v-42.666666a21.333333 21.333333 0 0 1 21.333333-21.333334H896a42.666667 42.666667 0 0 1 42.666667 42.666667z', + fill: 'currentColor' + }), + h('path', { + d: 'M512 512m-170.666667 0a170.666667 170.666667 0 1 0 341.333334 0 170.666667 170.666667 0 1 0-341.333334 0Z', fill: 'currentColor' }) ] @@ -267,7 +396,7 @@ export default { ]) } }, - 'app-oppose-color': { + 'app-retract': { iconReader: () => { return h('i', [ h( @@ -280,12 +409,66 @@ export default { }, [ h('path', { - d: 'M9.70106 10.7102H12.5718C14.5688 10.7102 15.0275 8.94736 14.5688 7.62647L12.5718 2.36918C12.403 1.7577 11.841 1.3335 11.1996 1.3335H3.33891C3.1541 1.3335 3.00427 1.48332 3.00427 1.66814V10.3755C3.00427 10.5603 3.1541 10.7102 3.33891 10.7102H4.02665C4.24458 10.7102 4.44886 10.8163 4.57419 10.9945L7.35263 14.947C7.54069 15.2462 8.04834 15.4756 8.58939 15.2292C9.40098 14.8596 10.3725 14.0528 10.3725 12.7161C10.3725 12.2119 10.1487 11.5433 9.70106 10.7102Z', - fill: '#F54A45' + d: 'M5.44661 0.747985C5.55509 0.639506 5.73097 0.639506 5.83945 0.747985L8.00004 2.90858L10.1606 0.748004C10.2691 0.639525 10.445 0.639525 10.5534 0.748004L11.1034 1.29798C11.2119 1.40645 11.2119 1.58233 11.1034 1.69081L8.7488 4.04544L8.74644 4.04782L8.19647 4.59779C8.16892 4.62534 8.13703 4.64589 8.10299 4.65945C8.003 4.6993 7.88453 4.67875 7.80359 4.59781L7.25362 4.04784L7.25003 4.04419L4.89664 1.69079C4.78816 1.58232 4.78816 1.40644 4.89664 1.29796L5.44661 0.747985Z', + fill: 'currentColor' }), h('path', { - d: 'M2.00004 1.3335H0.661473C0.661473 1.3335 0.660982 10.7764 0.661473 10.7035H2.00001C1.99469 10.6868 1.9947 1.38674 2.00004 1.3335Z', - fill: '#F54A45' + d: 'M1.99999 5.82774C1.63181 5.82774 1.33333 6.12622 1.33333 6.49441V9.16107C1.33333 9.52926 1.63181 9.82774 2 9.82774H14C14.3682 9.82774 14.6667 9.52926 14.6667 9.16107V6.49441C14.6667 6.12622 14.3682 5.82774 14 5.82774H1.99999ZM13.3333 7.16108V8.49441H2.66666V7.16108H13.3333Z', + fill: 'currentColor' + }), + h('path', { + d: 'M10.1605 14.9075C10.269 15.016 10.4449 15.016 10.5534 14.9075L11.1033 14.3575C11.2118 14.249 11.2118 14.0732 11.1033 13.9647L8.75 11.6113L8.74637 11.6076L8.1964 11.0577C8.11546 10.9767 7.99699 10.9562 7.897 10.996C7.86296 11.0096 7.83107 11.0301 7.80352 11.0577L7.25354 11.6077L7.25117 11.6101L4.89657 13.9647C4.78809 14.0731 4.78809 14.249 4.89657 14.3575L5.44654 14.9075C5.55502 15.016 5.7309 15.016 5.83938 14.9075L7.99995 12.7469L10.1605 14.9075Z', + fill: 'currentColor' + }) + ] + ) + ]) + } + }, + 'app-extend': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + style: { height: '100%', width: '100%' }, + viewBox: '0 0 16 16', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg' + }, + [ + h('path', { + d: 'M10.5534 5.07974C10.4449 5.18822 10.269 5.18822 10.1605 5.07974L7.99992 2.91915L5.83935 5.07972C5.73087 5.1882 5.555 5.1882 5.44652 5.07972L4.89654 4.52975C4.78807 4.42127 4.78807 4.24539 4.89654 4.13691L7.25117 1.78229L7.25352 1.77991L7.80349 1.22994C7.83019 1.20324 7.86098 1.18311 7.89384 1.16955C7.99448 1.12801 8.11459 1.14813 8.19638 1.22992L8.74635 1.77989L8.74998 1.78359L11.1033 4.13693C11.2118 4.24541 11.2118 4.42129 11.1033 4.52977L10.5534 5.07974Z', + fill: 'currentColor' + }), + h('path', { + d: 'M5.83943 10.9202C5.73095 10.8118 5.55507 10.8118 5.44659 10.9202L4.89662 11.4702C4.78814 11.5787 4.78814 11.7546 4.89662 11.863L7.24997 14.2164L7.25359 14.2201L7.80357 14.7701C7.8862 14.8527 8.00795 14.8724 8.10922 14.8291C8.14091 14.8156 8.17059 14.7959 8.19645 14.77L8.74642 14.2201L8.74873 14.2177L11.1034 11.8631C11.2119 11.7546 11.2119 11.5787 11.1034 11.4702L10.5534 10.9202C10.4449 10.8118 10.2691 10.8118 10.1606 10.9202L8.00002 13.0808L5.83943 10.9202Z', + fill: 'currentColor' + }), + h('path', { + d: 'M2.00004 6C1.63185 6 1.33337 6.29848 1.33337 6.66667V9.33333C1.33337 9.70152 1.63185 10 2.00004 10H14C14.3682 10 14.6667 9.70152 14.6667 9.33333V6.66667C14.6667 6.29848 14.3682 6 14 6H2.00004ZM13.3334 7.33333V8.66667H2.66671V7.33333H13.3334Z', + fill: 'currentColor' + }) + ] + ) + ]) + } + }, + 'app-beautify': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + style: { height: '100%', width: '100%' }, + viewBox: '0 0 1024 1024', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg' + }, + [ + h('path', { + d: 'M739.6864 689.92l4.2496 3.584 136.4992 135.936a34.1504 34.1504 0 0 1-43.9296 51.968l-4.1984-3.584-136.5504-135.936a34.1504 34.1504 0 0 1 43.9296-51.968zM663.4496 151.552a34.1504 34.1504 0 0 1 51.2512 30.464l-5.9392 216.6272 156.4672 146.1248a34.1504 34.1504 0 0 1-8.6528 55.808l-4.8128 1.792-202.8032 61.0816-87.4496 197.12a34.1504 34.1504 0 0 1-56.32 9.216l-3.2768-4.096-119.5008-178.432-209.9712-24.064a34.1504 34.1504 0 0 1-26.1632-50.176l2.7648-4.3008 129.28-171.7248-42.5472-212.3776a34.1504 34.1504 0 0 1 40.448-40.1408l4.6592 1.3312 198.912 72.3456z m-18.6368 89.7536l-144.5376 83.968a34.1504 34.1504 0 0 1-28.8256 2.56L314.5728 270.592l33.792 167.8848c1.4848 7.68 0.3584 15.5136-3.1744 22.3232l-3.072 4.9152-102.656 136.2944 166.4 19.1488c8.2944 0.9216 15.872 4.864 21.4016 10.9568l3.072 3.9424 93.8496 140.032 68.7104-154.7776a34.1504 34.1504 0 0 1 16.7936-17.0496l4.608-1.792 160.9216-48.4864-124.2624-116.0192a34.1504 34.1504 0 0 1-10.4448-20.0704l-0.3584-5.7856 4.6592-170.9056z', + fill: 'currentColor' }) ] ) diff --git a/ui/src/views/application-workflow/component/DropdownMenu.vue b/ui/src/views/application-workflow/component/DropdownMenu.vue index 01df3c66c..35163ebfb 100644 --- a/ui/src/views/application-workflow/component/DropdownMenu.vue +++ b/ui/src/views/application-workflow/component/DropdownMenu.vue @@ -35,7 +35,7 @@ - +
diff --git a/ui/src/views/system-chat-user/group/index.vue b/ui/src/views/system-chat-user/group/index.vue new file mode 100644 index 000000000..2fa929101 --- /dev/null +++ b/ui/src/views/system-chat-user/group/index.vue @@ -0,0 +1,115 @@ + + + + + diff --git a/ui/src/workflow/common/AddFormCollect.vue b/ui/src/workflow/common/AddFormCollect.vue index db15703a6..3c5c861c9 100644 --- a/ui/src/workflow/common/AddFormCollect.vue +++ b/ui/src/workflow/common/AddFormCollect.vue @@ -28,7 +28,7 @@ import DynamicsFormConstructor from '@/components/dynamics-form/constructor/inde import { t } from '@/locales' const props = withDefaults( defineProps<{ title?: string; addFormField: (form_data: any) => void }>(), - { title: t('views.template.templateForm.title.addParam') } + { title: t('common.param.addParam') } ) const dialogVisible = ref(false) const dynamicsFormConstructorRef = ref>() diff --git a/ui/src/workflow/common/EditFormCollect.vue b/ui/src/workflow/common/EditFormCollect.vue index 6ebbaf95e..935d59241 100644 --- a/ui/src/workflow/common/EditFormCollect.vue +++ b/ui/src/workflow/common/EditFormCollect.vue @@ -30,7 +30,7 @@ import DynamicsFormConstructor from '@/components/dynamics-form/constructor/inde import { t } from '@/locales' const props = withDefaults( defineProps<{ title?: string; editFormField: (form_data: any, index: number) => void }>(), - { title: t('views.template.templateForm.title.editParam') } + { title: t('views.model.form.title.editParam') } ) const dialogVisible = ref(false) const dynamicsFormConstructorRef = ref>() diff --git a/ui/src/workflow/common/NodeContainer.vue b/ui/src/workflow/common/NodeContainer.vue index 50ad024bc..ad69c5e76 100644 --- a/ui/src/workflow/common/NodeContainer.vue +++ b/ui/src/workflow/common/NodeContainer.vue @@ -30,8 +30,8 @@ placement="bottom-start" > - - + + diff --git a/ui/src/workflow/nodes/function-node/index.vue b/ui/src/workflow/nodes/function-node/index.vue index 575d44507..072976878 100644 --- a/ui/src/workflow/nodes/function-node/index.vue +++ b/ui/src/workflow/nodes/function-node/index.vue @@ -25,8 +25,8 @@ required: item.is_required, message: item.source === 'reference' - ? $t('views.functionLib.functionForm.form.param.selectPlaceholder') - : $t('views.functionLib.functionForm.form.param.inputPlaceholder'), + ? $t('views.tool.functionForm.form.param.selectPlaceholder') + : $t('views.tool.functionForm.form.param.inputPlaceholder'), trigger: 'blur' }" > @@ -58,14 +58,14 @@ ref="nodeCascaderRef" :nodeModel="nodeModel" class="w-full" - :placeholder="$t('views.functionLib.functionForm.form.param.selectPlaceholder')" + :placeholder="$t('views.tool.functionForm.form.param.selectPlaceholder')" v-model="item.value" :width="100" /> @@ -75,11 +75,11 @@
- {{ $t('views.functionLib.functionForm.form.param.code') }} + {{ $t('views.tool.functionForm.form.param.code') }}