From 316310716bac8e282972b552d38d95cd7f4e3961 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Tue, 20 Feb 2024 12:30:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86bug?= =?UTF-8?q?=E5=92=8C=E5=AF=8C=E6=96=87=E6=9C=AC=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.vue | 1 - .../pure/ms-advance-filter/FilterForm.vue | 6 +-- .../pure/ms-rich-text/MsRichText.vue | 40 +++++++++---------- frontend/src/config/pathMap.ts | 21 ++++++++++ .../components/caseDetailDrawer.vue | 6 +++ .../components/caseTable.vue | 13 ++++-- .../components/caseTemplateDetail.vue | 17 +++++++- .../components/recycleCaseTable.vue | 9 +++-- .../caseManagementFeature/components/utils.ts | 2 +- frontend/src/views/login/index.vue | 8 ---- 10 files changed, 80 insertions(+), 43 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index a0488d1c65..c74e5dcbc1 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -122,7 +122,6 @@ } const { height } = useWindowSize(); appStore.innerHeight = height.value; - userStore.getAuthentication(); }); /** 屏幕大小改变时重新赋值innerHeight */ useEventListener(window, 'resize', () => { diff --git a/frontend/src/components/pure/ms-advance-filter/FilterForm.vue b/frontend/src/components/pure/ms-advance-filter/FilterForm.vue index 941a24065e..6f600bf01a 100644 --- a/frontend/src/components/pure/ms-advance-filter/FilterForm.vue +++ b/frontend/src/components/pure/ms-advance-filter/FilterForm.vue @@ -153,11 +153,7 @@ }" :max-length="1000" /> - + ", - }) - ), - title: t('editor.attachment'), - action: () => { - attachmentSelectorModal.value = true; - }, - }, - }, - ]; - }, + // getToolboxItems({ editors }: { editors: Editor }) { + // return [ + // { + // priority: 0, + // component: markRaw(ToolboxItem), + // props: { + // editor, + // icon: markRaw( + // defineComponent({ + // template: "", + // }) + // ), + // title: t('editor.attachment'), + // action: () => { + // attachmentSelectorModal.value = true; + // }, + // }, + // }, + // ]; + // }, getToolbarItems({ editors }: { editors: Editor }) { return { priority: 1000, diff --git a/frontend/src/config/pathMap.ts b/frontend/src/config/pathMap.ts index deb6f1a732..8317995e8b 100644 --- a/frontend/src/config/pathMap.ts +++ b/frontend/src/config/pathMap.ts @@ -257,6 +257,13 @@ export const pathMap: PathMapItem[] = [ permission: [], level: MENU_LEVEL[0], }, + { + key: 'SETTING_SYSTEM_TASK_CENTER', // 系统设置-系统-任务中心 + locale: 'menu.projectManagement.taskCenter', + route: RouteEnum.SETTING_SYSTEM_TASK_CENTER, + permission: [], + level: MENU_LEVEL[0], + }, { key: 'SETTING_SYSTEM_PLUGIN_MANAGEMENT', // 系统设置-系统-插件管理 locale: 'menu.settings.system.pluginManager', @@ -301,6 +308,13 @@ export const pathMap: PathMapItem[] = [ permission: [], level: MENU_LEVEL[1], }, + { + key: 'SETTING_ORGANIZATION_TASK_CENTER', // 系统设置-组织-任务中心 + locale: 'menu.projectManagement.taskCenter', + route: RouteEnum.SETTING_ORGANIZATION_TASK_CENTER, + permission: [], + level: MENU_LEVEL[1], + }, { key: 'SETTING_ORGANIZATION_TEMPLATE', // 系统设置-组织-模板 locale: 'menu.settings.organization.template', @@ -508,6 +522,13 @@ export const pathMap: PathMapItem[] = [ permission: [], level: MENU_LEVEL[2], }, + { + key: 'PROJECT_MANAGEMENT_TASK_CENTER', // 项目管理-任务中心 + locale: 'menu.projectManagement.taskCenter', + route: '', + permission: [], + level: MENU_LEVEL[2], + }, ], }, // 测试计划 diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue index ad314838ca..abaefce122 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue @@ -481,6 +481,12 @@ let currentDefaultValue; if (numberType.includes(item.type)) { currentDefaultValue = item.defaultValue * 1; + } else if ( + multipleType.includes(item.type) && + Array.isArray(item.defaultValue) && + item.defaultValue.length === 0 + ) { + currentDefaultValue = item.defaultValue; } else if (multipleType.includes(item.type)) { currentDefaultValue = JSON.parse(item.defaultValue); } else { diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseTable.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseTable.vue index edfcb13c79..235bac2814 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/caseTable.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/caseTable.vue @@ -252,6 +252,7 @@ getCustomFieldsTable, updateCaseRequest, } from '@/api/modules/case-management/featureCase'; + import { getProjectMemberOptions } from '@/api/modules/project-management/projectMember'; import { useI18n } from '@/hooks/useI18n'; import useModal from '@/hooks/useModal'; import { useAppStore, useTableStore } from '@/store'; @@ -412,6 +413,8 @@ title: 'caseManagement.featureCase.tableColumnReviewResult', dataIndex: 'reviewStatus', slotName: 'reviewStatus', + // TODO 待补充 + // titleSlotName: 'reviewStatusFilter', showInTable: true, width: 200, showDrag: true, @@ -566,6 +569,8 @@ const scrollWidth = ref(3400); async function initFilter() { const result = await getCustomFieldsTable(currentProjectId.value); + let memberOptions = await getProjectMemberOptions(appStore.currentProjectId, keyword.value); + memberOptions = memberOptions.map((e) => ({ label: e.name, value: e.id })); filterConfigList.value = [ { title: 'caseManagement.featureCase.tableColumnID', @@ -597,11 +602,11 @@ }, { title: 'caseManagement.featureCase.tableColumnCreateUser', - dataIndex: 'createUser', + dataIndex: 'createUserName', type: FilterType.SELECT, selectProps: { mode: 'static', - options: [], + options: memberOptions, }, }, { @@ -611,11 +616,11 @@ }, { title: 'caseManagement.featureCase.tableColumnUpdateUser', - dataIndex: 'updateUser', + dataIndex: 'updateUserName', type: FilterType.SELECT, selectProps: { mode: 'static', - options: [], + options: memberOptions, }, }, { diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseTemplateDetail.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseTemplateDetail.vue index 23374a8009..9761e4bddd 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/caseTemplateDetail.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/caseTemplateDetail.vue @@ -510,7 +510,22 @@ // 处理自定义字段 formRules.value = (customFields || []).map((item: any) => { const multipleType = ['MULTIPLE_SELECT', 'CHECKBOX', 'MULTIPLE_MEMBER', 'MULTIPLE_INPUT']; - const currentDefaultValue = multipleType.includes(item.type) ? JSON.parse(item.defaultValue) : item.defaultValue; + const numberType = ['INT', 'FLOAT']; + + let currentDefaultValue; + if (numberType.includes(item.type)) { + currentDefaultValue = item.defaultValue * 1; + } else if ( + multipleType.includes(item.type) && + Array.isArray(item.defaultValue) && + item.defaultValue.length === 0 + ) { + currentDefaultValue = item.defaultValue; + } else if (multipleType.includes(item.type)) { + currentDefaultValue = JSON.parse(item.defaultValue); + } else { + currentDefaultValue = item.defaultValue; + } return { ...item, diff --git a/frontend/src/views/case-management/caseManagementFeature/components/recycleCaseTable.vue b/frontend/src/views/case-management/caseManagementFeature/components/recycleCaseTable.vue index 3e27557d04..08689b48a5 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/recycleCaseTable.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/recycleCaseTable.vue @@ -171,6 +171,7 @@ recoverRecycleCase, restoreCaseList, } from '@/api/modules/case-management/featureCase'; + import { getProjectMemberOptions } from '@/api/modules/project-management/projectMember'; import { useI18n } from '@/hooks/useI18n'; import useModal from '@/hooks/useModal'; import { useAppStore, useTableStore } from '@/store'; @@ -684,6 +685,8 @@ async function initFilter() { const result = await getCustomFieldsTable(currentProjectId.value); + let memberOptions = await getProjectMemberOptions(appStore.currentProjectId, keyword.value); + memberOptions = memberOptions.map((e) => ({ label: e.name, value: e.id })); filterConfigList.value = [ { title: 'caseManagement.featureCase.tableColumnID', @@ -715,11 +718,11 @@ }, { title: 'caseManagement.featureCase.tableColumnCreateUser', - dataIndex: 'createUser', + dataIndex: 'createUserName', type: FilterType.SELECT, selectProps: { mode: 'static', - options: [], + options: memberOptions, }, }, { @@ -733,7 +736,7 @@ type: FilterType.SELECT, selectProps: { mode: 'static', - options: [], + options: memberOptions, }, }, { diff --git a/frontend/src/views/case-management/caseManagementFeature/components/utils.ts b/frontend/src/views/case-management/caseManagementFeature/components/utils.ts index b8baefd0d4..5ef0032efa 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/utils.ts +++ b/frontend/src/views/case-management/caseManagementFeature/components/utils.ts @@ -10,7 +10,7 @@ import { StatusType } from '@/enums/caseEnum'; const { t } = useI18n(); // 获取列表对应的状态图标 -const statusIconMap = [ +export const statusIconMap = [ { key: 'UN_REVIEWED', icon: StatusType.UN_REVIEWED, diff --git a/frontend/src/views/login/index.vue b/frontend/src/views/login/index.vue index 76c814a67b..10e3af8a96 100644 --- a/frontend/src/views/login/index.vue +++ b/frontend/src/views/login/index.vue @@ -17,17 +17,9 @@ import banner from './components/banner.vue'; import loginForm from './components/login-form.vue'; - import { useUserStore } from '@/store'; - const props = defineProps<{ isPreview?: boolean; }>(); - - const userStore = useUserStore(); - - onMounted(() => { - userStore.getAuthentication(); - });