diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 704d0f03b2..524ea40698 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -5,11 +5,11 @@ // Read more: https://github.com/vuejs/core/pull/3399 import '@vue/runtime-core' -export {}; +export {} declare module '@vue/runtime-core' { export interface GlobalComponents { - RouterLink: typeof import('vue-router')['RouterLink']; - RouterView: typeof import('vue-router')['RouterView']; + RouterLink: typeof import('vue-router')['RouterLink'] + RouterView: typeof import('vue-router')['RouterView'] } } diff --git a/frontend/src/mock/system/pluginManger.ts b/frontend/src/mock/system/pluginManger.ts index 5cf8f93056..ecbc53bd4f 100644 --- a/frontend/src/mock/system/pluginManger.ts +++ b/frontend/src/mock/system/pluginManger.ts @@ -73,77 +73,18 @@ const getPluginList = () => { enable: true, }, ], - children: [ + steps: [ { id: '1-1-1', - name: '插件1-1', - describe: '插件1-1', - enable: true, - createTime: 'number', - updateTime: 'number', - jarPackage: 'string', - version: 'string', - applicationScene: 'string', - createUser: 'string', - updateUser: 'string', - organizationList: [ - { - id: 'string', - num: 0, - name: '组织 1', - description: 'blabla', - createTime: 0, - updateTime: 0, - createUser: 'string', - updateUser: 'string', - deleted: true, - deleteUser: 'string', - deleteTime: 0, - enable: true, - }, - { - id: 'string', - num: 0, - name: '组织 2', - description: 'blabla', - createTime: 0, - updateTime: 0, - createUser: 'string', - updateUser: 'string', - deleted: true, - deleteUser: 'string', - deleteTime: 0, - enable: true, - }, - { - id: 'string', - num: 0, - name: '组织 3', - description: 'blabla', - createTime: 0, - updateTime: 0, - createUser: 'string', - updateUser: 'string', - deleted: true, - deleteUser: 'string', - deleteTime: 0, - enable: true, - }, - { - id: 'string', - num: 0, - name: '组织 4', - description: 'blabla', - createTime: 0, - updateTime: 0, - createUser: 'string', - updateUser: 'string', - deleted: true, - deleteUser: 'string', - deleteTime: 0, - enable: true, - }, - ], + name: '步骤一', + }, + { + id: '1-1-2', + name: '步骤二', + }, + { + id: '1-1-3', + name: '步骤三', }, ], }, @@ -217,77 +158,18 @@ const getPluginList = () => { enable: true, }, ], - children: [ + steps: [ { id: '2-1-1', - name: '插件2-1', - describe: '插件2-1', - enable: true, - createTime: 'number', - updateTime: 'number', - jarPackage: 'string', - version: 'string', - applicationScene: 'string', - createUser: 'string', - updateUser: 'string', - organizationList: [ - { - id: 'string', - num: 0, - name: '组织 1', - description: 'blabla', - createTime: 0, - updateTime: 0, - createUser: 'string', - updateUser: 'string', - deleted: true, - deleteUser: 'string', - deleteTime: 0, - enable: true, - }, - { - id: 'string', - num: 0, - name: '组织 2', - description: 'blabla', - createTime: 0, - updateTime: 0, - createUser: 'string', - updateUser: 'string', - deleted: true, - deleteUser: 'string', - deleteTime: 0, - enable: true, - }, - { - id: 'string', - num: 0, - name: '组织 3', - description: 'blabla', - createTime: 0, - updateTime: 0, - createUser: 'string', - updateUser: 'string', - deleted: true, - deleteUser: 'string', - deleteTime: 0, - enable: true, - }, - { - id: 'string', - num: 0, - name: '组织 4', - description: 'blabla', - createTime: 0, - updateTime: 0, - createUser: 'string', - updateUser: 'string', - deleted: true, - deleteUser: 'string', - deleteTime: 0, - enable: true, - }, - ], + name: '步骤2-一', + }, + { + id: '2-1-2', + name: '步骤2-二', + }, + { + id: '2-1-3', + name: '步骤3-三', }, ], }, diff --git a/frontend/src/models/system/plugin.ts b/frontend/src/models/system/plugin.ts index e02f1de028..bcf5845327 100644 --- a/frontend/src/models/system/plugin.ts +++ b/frontend/src/models/system/plugin.ts @@ -27,7 +27,7 @@ export interface PluginItem { createUser: string; updateUser: string; organizationList: organizationList; - children?: PluginItem[]; + steps?: string[]; } export type PluginList = PluginItem[]; diff --git a/frontend/src/views/organization/member/components/addMemberModal.vue b/frontend/src/views/organization/member/components/addMemberModal.vue index 844714cc07..da868b092d 100644 --- a/frontend/src/views/organization/member/components/addMemberModal.vue +++ b/frontend/src/views/organization/member/components/addMemberModal.vue @@ -1,15 +1,15 @@ - + diff --git a/frontend/src/views/organization/member/locale/en-US.ts b/frontend/src/views/organization/member/locale/en-US.ts index e38ec26dc3..9ac43f0372 100644 --- a/frontend/src/views/organization/member/locale/en-US.ts +++ b/frontend/src/views/organization/member/locale/en-US.ts @@ -2,6 +2,7 @@ export default { 'organization.member.addMember': 'Add Member', 'organization.member.searchMember': 'Search by name or email address', 'organization.member.remove': 'Remove', + 'organization.member.edit': 'Edit', 'organization.member.batchActionAddProject': 'Add to project', 'organization.member.batchActionAddUsergroup': 'Add to usergroup', 'organization.member.tableEnable': 'Enabled', diff --git a/frontend/src/views/organization/member/locale/zh-CN.ts b/frontend/src/views/organization/member/locale/zh-CN.ts index b49ae0334f..3a48ef6063 100644 --- a/frontend/src/views/organization/member/locale/zh-CN.ts +++ b/frontend/src/views/organization/member/locale/zh-CN.ts @@ -2,6 +2,7 @@ export default { 'organization.member.addMember': '添加成员', 'organization.member.searchMember': '通过名称或邮箱搜索搜索', 'organization.member.remove': '移除', + 'organization.member.edit': '编辑', 'organization.member.batchActionAddProject': '添加至项目', 'organization.member.batchActionAddUsergroup': '添加至用户组', 'organization.member.tableEnable': '正常', diff --git a/frontend/src/views/system/pluginManager/components/pluginTable.vue b/frontend/src/views/system/pluginManager/components/pluginTable.vue index 59525d7607..8eff388439 100644 --- a/frontend/src/views/system/pluginManager/components/pluginTable.vue +++ b/frontend/src/views/system/pluginManager/components/pluginTable.vue @@ -40,6 +40,10 @@ +
{{ 101 }}项数据
@@ -60,6 +64,8 @@ import uploadSuccessModal from './uploadSuccessModal.vue'; import sceneChangeModal from './sceneChangeModal.vue'; import { useCommandComponent } from '@/hooks/useCommandComponent'; + import useModal from '@/hooks/useModal'; + import { Message } from '@arco-design/web-vue'; const { t } = useI18n(); export type Options = { @@ -123,10 +129,13 @@ ]; const { propsRes, propsEvent, loadList, setKeyword } = useTable(getPluginList, { columns, - scroll: { y: 'auto', x: 1800 }, - selectable: false, - showSelectAll: false, + 'scroll': { y: 'auto', x: 1800 }, + 'selectable': false, + 'showSelectAll': false, + 'pagination': false, + 'virtual-list-props': { height: 380 }, }); + const { openModal } = useModal(); const keyword = ref(''); const scene = ref('1'); const sceneList = ref([ @@ -146,7 +155,28 @@ setKeyword(keyword.value); await loadList(); } - function deletePlugin() {} + function deletePlugin(record: any) { + openModal({ + type: 'warning', + title: t('system.plugin.deletePluginTip', { name: record.name }), + content: '', + okText: t('system.plugin.deletePluginConfirm'), + cancelText: t('system.plugin.pluginCancel'), + okButtonProps: { + status: 'danger', + }, + onBeforeOk: async () => { + try { + Message.success(t('system.plugin.deletePluginSuccess')); + return true; + } catch (error) { + console.log(error); + return false; + } + }, + hideCancel: false, + }); + } /** * 处理表格更多按钮事件 * @param item @@ -154,7 +184,7 @@ function handleSelect(item: ActionsItem, record: any) { switch (item.eventTag) { case 'delete': - deletePlugin(); + deletePlugin(record); break; default: break; @@ -191,7 +221,7 @@ const okHandler = () => { dialogOpen(uploadSuccessOptions); }; - const changeScene = () => { + const changeScene = (record: any) => { sceneChangeOptions.visible = true; mySceneChangeDialog(sceneChangeOptions); }; diff --git a/frontend/src/views/system/pluginManager/components/sceneChangeModal.vue b/frontend/src/views/system/pluginManager/components/sceneChangeModal.vue index d0b221c46a..045742140e 100644 --- a/frontend/src/views/system/pluginManager/components/sceneChangeModal.vue +++ b/frontend/src/views/system/pluginManager/components/sceneChangeModal.vue @@ -1,8 +1,8 @@ @@ -69,6 +75,9 @@ }); currentItem.isSelected = true; }; + const handelOk = () => { + emits('close'); + };