diff --git a/frontend/src/components/business/ms-menu/index.vue b/frontend/src/components/business/ms-menu/index.vue index 00eb079e84..e1c122a214 100644 --- a/frontend/src/components/business/ms-menu/index.vue +++ b/frontend/src/components/business/ms-menu/index.vue @@ -147,7 +147,7 @@ Message.success(t('personal.switchOrgSuccess')); personalMenusVisible.value = false; orgKeyword.value = ''; - await userStore.checkIsLogin(); + await userStore.checkIsLogin(true); appStore.hideLoading(); router.replace({ name: getFirstRouteNameByPermission(router.getRoutes()), diff --git a/frontend/src/components/pure/ms-table/base-table.vue b/frontend/src/components/pure/ms-table/base-table.vue index a58c0ce709..b0fc4ee0d2 100644 --- a/frontend/src/components/pure/ms-table/base-table.vue +++ b/frontend/src/components/pure/ms-table/base-table.vue @@ -345,7 +345,7 @@ (e: 'pageSizeChange', value: number): void; (e: 'rowNameChange', value: TableData, cb: (v: boolean) => void): void; (e: 'rowSelectChange', key: string): void; - (e: 'selectAllChange', value: SelectAllEnum): void; + (e: 'selectAllChange', value: SelectAllEnum, onlyCurrent: boolean): void; (e: 'dragChange', value: DragSortParams): void; (e: 'sorterChange', value: { [key: string]: string }): void; (e: 'expand', record: TableData): void | Promise; @@ -485,8 +485,8 @@ } // 全选change事件 - const handleSelectAllChange = (v: SelectAllEnum) => { - emit('selectAllChange', v); + const handleSelectAllChange = (v: SelectAllEnum, onlyCurrent: boolean) => { + emit('selectAllChange', v, onlyCurrent); }; // 行选择器change事件 const rowSelectChange = (key: string) => { diff --git a/frontend/src/components/pure/ms-table/select-all.vue b/frontend/src/components/pure/ms-table/select-all.vue index c8c9aefbca..a243b73570 100644 --- a/frontend/src/components/pure/ms-table/select-all.vue +++ b/frontend/src/components/pure/ms-table/select-all.vue @@ -36,7 +36,7 @@ const { t } = useI18n(); const emit = defineEmits<{ - (e: 'change', value: SelectAllEnum): void; + (e: 'change', value: SelectAllEnum, onlyCurrent: boolean): void; }>(); const props = withDefaults( @@ -81,20 +81,20 @@ ); }); - const handleSelect = (v: SelectAllEnum) => { + const handleSelect = (v: SelectAllEnum, onlyCurrent = true) => { if ( (selectAllStatus.value === SelectAllEnum.ALL && v === SelectAllEnum.NONE && props.excludeKeys.length < props.total) || - (selectAllStatus.value === SelectAllEnum.ALL && v === SelectAllEnum.CURRENT) + (selectAllStatus.value === SelectAllEnum.ALL && v === SelectAllEnum.CURRENT && !onlyCurrent) ) { // 如果当前是全选所有页状态,且是取消选中当前页操作,且排除项小于总数,则保持跨页全选状态 - // 如果当前是全选所有页状态,且是选中当前页操作,则保持跨页全选状态 + // 如果当前是全选所有页状态,且是选中当前页操作(是点击全选的多选框,非下拉菜单全选当前页),则保持跨页全选状态 selectAllStatus.value = SelectAllEnum.ALL; } else { selectAllStatus.value = v; } - emit('change', v); + emit('change', v, onlyCurrent); }; function hasUnselectedChildren( @@ -113,7 +113,7 @@ const handleCheckChange = () => { if (hasUnselectedChildren(props.currentData, props.selectedKeys, props.rowKey)) { // 当前页有数据没有勾选上,此时点击全选按钮代表全部选中 - handleSelect(SelectAllEnum.CURRENT); + handleSelect(SelectAllEnum.CURRENT, false); } else { // 否则是当前页全部数据已勾选,此时点击全选按钮代表取消当前页面数据勾选 handleSelect(SelectAllEnum.NONE); diff --git a/frontend/src/components/pure/ms-table/useTable.ts b/frontend/src/components/pure/ms-table/useTable.ts index 0896917bab..6865dddd2e 100644 --- a/frontend/src/components/pure/ms-table/useTable.ts +++ b/frontend/src/components/pure/ms-table/useTable.ts @@ -419,7 +419,7 @@ export default function useTableProps( }, // 表格SelectAll change - selectAllChange: (v: SelectAllEnum) => { + selectAllChange: (v: SelectAllEnum, onlyCurrent: boolean) => { const { data, rowKey } = propsRes.value; if (v === SelectAllEnum.NONE) { // 清空选中项 @@ -437,10 +437,10 @@ export default function useTableProps( v === SelectAllEnum.NONE && propsRes.value.msPagination && propsRes.value.excludeKeys.size < propsRes.value.msPagination.total) || - (propsRes.value.selectorStatus === SelectAllEnum.ALL && v === SelectAllEnum.CURRENT) + (propsRes.value.selectorStatus === SelectAllEnum.ALL && v === SelectAllEnum.CURRENT && !onlyCurrent) ) { // 如果当前是全选所有页状态,且是取消选中当前页操作,且排除项小于总数,则保持跨页全选状态 - // 如果当前是全选所有页状态,且是选中当前页操作,则保持跨页全选状态 + // 如果当前是全选所有页状态,且是选中当前页操作(是点击全选的多选框,非下拉菜单全选当前页),则保持跨页全选状态 propsRes.value.selectorStatus = SelectAllEnum.ALL; } else { propsRes.value.selectorStatus = v; diff --git a/frontend/src/components/pure/navbar/index.vue b/frontend/src/components/pure/navbar/index.vue index eaaf378d58..c6902c7682 100644 --- a/frontend/src/components/pure/navbar/index.vue +++ b/frontend/src/components/pure/navbar/index.vue @@ -228,7 +228,7 @@ // eslint-disable-next-line no-console console.log(error); } finally { - await userStore.checkIsLogin(); + await userStore.checkIsLogin(true); appStore.hideLoading(); router.replace({ name: getFirstRouteNameByPermission(router.getRoutes()), diff --git a/frontend/src/store/modules/user/index.ts b/frontend/src/store/modules/user/index.ts index 58b2fd6ede..58ea5b193b 100644 --- a/frontend/src/store/modules/user/index.ts +++ b/frontend/src/store/modules/user/index.ts @@ -209,11 +209,11 @@ const useUserStore = defineStore('user', { console.log(error); } }, - async checkIsLogin() { + async checkIsLogin(forceSet = false) { const { isLoginPage } = useUser(); const router = useRouter(); const appStore = useAppStore(); - const isLogin = await this.isLogin(true); + const isLogin = await this.isLogin(forceSet); if (isLogin && appStore.currentProjectId !== 'no_such_project') { // 当前为登陆状态,且已经选择了项目,初始化当前项目配置 try { diff --git a/frontend/src/views/api-test/management/components/import.vue b/frontend/src/views/api-test/management/components/import.vue index a79d5182d0..99e0cee0bb 100644 --- a/frontend/src/views/api-test/management/components/import.vue +++ b/frontend/src/views/api-test/management/components/import.vue @@ -42,7 +42,7 @@ []>([]); const importType = ref<'file' | 'time'>('file'); const platformList = [ { @@ -415,6 +417,7 @@ (val) => { if (val) { importForm.value.moduleId = props.activeModule !== 'all' ? props.activeModule : ''; + innerModuleTree.value = filterTree(props.moduleTree, (node) => node.type === 'MODULE'); } }, { diff --git a/frontend/src/views/api-test/management/components/management/api/apiTable.vue b/frontend/src/views/api-test/management/components/management/api/apiTable.vue index 10b572ec25..c96c15027e 100644 --- a/frontend/src/views/api-test/management/components/management/api/apiTable.vue +++ b/frontend/src/views/api-test/management/components/management/api/apiTable.vue @@ -394,6 +394,13 @@ filterSlotName: FilterSlotNameEnum.API_TEST_API_REQUEST_METHODS, }, }, + { + title: 'apiTestManagement.path', + dataIndex: 'path', + showTooltip: true, + width: 200, + showDrag: true, + }, { title: 'apiTestManagement.apiStatus', dataIndex: 'status', @@ -405,13 +412,6 @@ width: 130, showDrag: true, }, - { - title: 'apiTestManagement.path', - dataIndex: 'path', - showTooltip: true, - width: 200, - showDrag: true, - }, { title: 'apiTestManagement.belongModule', dataIndex: 'moduleName', diff --git a/frontend/src/views/api-test/management/components/management/mock/mockTable.vue b/frontend/src/views/api-test/management/components/management/mock/mockTable.vue index c884879e9b..d5926062a5 100644 --- a/frontend/src/views/api-test/management/components/management/mock/mockTable.vue +++ b/frontend/src/views/api-test/management/components/management/mock/mockTable.vue @@ -225,7 +225,7 @@ import useModal from '@/hooks/useModal'; import useTableStore from '@/hooks/useTableStore'; import useAppStore from '@/store/modules/app'; - import { operationWidth } from '@/utils'; + import { characterLimit, operationWidth } from '@/utils'; import { hasAnyPermission } from '@/utils/permission'; import { ApiDefinitionMockDetail } from '@/models/apiTest/management'; @@ -441,7 +441,7 @@ * 删除接口 */ function removeMock(record?: ApiDefinitionMockDetail, isBatch?: boolean, params?: BatchActionQueryParams) { - let title = t('apiTestManagement.confirmDelete', { name: record?.name }); + let title = t('apiTestManagement.confirmDelete', { name: characterLimit(record?.name) }); let selectIds = [record?.id || '']; if (isBatch) { title = t('mockManagement.batchDeleteMockTip', { diff --git a/frontend/src/views/api-test/management/components/recycle/api/apiTable.vue b/frontend/src/views/api-test/management/components/recycle/api/apiTable.vue index 2e538b14b8..557e4f3d47 100644 --- a/frontend/src/views/api-test/management/components/recycle/api/apiTable.vue +++ b/frontend/src/views/api-test/management/components/recycle/api/apiTable.vue @@ -220,6 +220,13 @@ width: 140, showDrag: true, }, + { + title: 'apiTestManagement.path', + dataIndex: 'path', + showTooltip: true, + width: 200, + showDrag: true, + }, { title: 'apiTestManagement.apiStatus', dataIndex: 'status', @@ -228,13 +235,6 @@ width: 130, showDrag: true, }, - { - title: 'apiTestManagement.path', - dataIndex: 'path', - showTooltip: true, - width: 200, - showDrag: true, - }, { title: 'common.tag', dataIndex: 'tags', diff --git a/frontend/src/views/api-test/scenario/components/common/importApiDrawer/table.vue b/frontend/src/views/api-test/scenario/components/common/importApiDrawer/table.vue index 3f6a5bc90c..541d0ead64 100644 --- a/frontend/src/views/api-test/scenario/components/common/importApiDrawer/table.vue +++ b/frontend/src/views/api-test/scenario/components/common/importApiDrawer/table.vue @@ -235,6 +235,12 @@ titleSlotName: 'methodFilter', width: 140, }, + { + title: 'apiTestManagement.path', + dataIndex: 'path', + showTooltip: true, + width: 200, + }, { title: 'apiTestManagement.apiStatus', dataIndex: 'status', @@ -242,12 +248,6 @@ titleSlotName: 'statusFilter', width: 130, }, - { - title: 'apiTestManagement.path', - dataIndex: 'path', - showTooltip: true, - width: 200, - }, { title: 'common.tag', dataIndex: 'tags', diff --git a/frontend/src/views/api-test/scenario/components/step/stepTree.vue b/frontend/src/views/api-test/scenario/components/step/stepTree.vue index f211030293..7497135a64 100644 --- a/frontend/src/views/api-test/scenario/components/step/stepTree.vue +++ b/frontend/src/views/api-test/scenario/components/step/stepTree.vue @@ -878,6 +878,7 @@ const realStep = findNodeByKey(steps.value, step.uniqueId, 'uniqueId'); if (id && realStep) { realStep.csvIds = realStep.csvIds.filter((item: string) => item !== id); + scenario.value.unSaved = true; } } diff --git a/frontend/src/views/api-test/scenario/index.vue b/frontend/src/views/api-test/scenario/index.vue index eae194bf76..9a7c4b1327 100644 --- a/frontend/src/views/api-test/scenario/index.vue +++ b/frontend/src/views/api-test/scenario/index.vue @@ -26,8 +26,10 @@ @stop-debug="handleStopExecute" />
-
+
-
-
{{ robot.name }}
+
+
{{ robot.name }}
- {{ robot.createUser }} + {{ robot.createUser }} + {{ robot.createUser }} - {{ - `${t('project.messageManagement.createAt')} ${dayjs(robot.createTime).format( - 'YYYY-MM-DD HH:mm:ss' - )}` - }} + + {{ + `${t('project.messageManagement.createAt')} ${dayjs(robot.createTime).format( + 'YYYY-MM-DD HH:mm:ss' + )}` + }} + - {{ robot.updateUser }} + {{ robot.updateUser }} + {{ robot.updateUser }} {{ ` ${t('project.messageManagement.updateAt')} ${dayjs(robot.updateTime).format( @@ -475,7 +477,7 @@ function delRobot(robot: RobotItem) { openModal({ type: 'error', - title: t('project.messageManagement.deleteTitle', { name: robot.name }), + title: t('project.messageManagement.deleteTitle', { name: characterLimit(robot.name) }), content: t('project.messageManagement.deleteContent'), okText: t('common.confirmDelete'), cancelText: t('common.cancel'), diff --git a/frontend/src/views/setting/utils.ts b/frontend/src/views/setting/utils.ts index 2245d3035c..79f73db65c 100644 --- a/frontend/src/views/setting/utils.ts +++ b/frontend/src/views/setting/utils.ts @@ -36,7 +36,7 @@ export async function enterProject(projectId: string, organizationId?: string) { projectId, userId: userStore.id || '', }); - await userStore.checkIsLogin(); + await userStore.checkIsLogin(true); // 跳转到项目页面 router.replace({ name: getFirstRouteNameByPermission(router.getRoutes()),