diff --git a/frontend/src/components/business/ms-common-script/ms-addScriptDrawer.vue b/frontend/src/components/business/ms-common-script/ms-addScriptDrawer.vue index f5b41660fa..35a01eba1a 100644 --- a/frontend/src/components/business/ms-common-script/ms-addScriptDrawer.vue +++ b/frontend/src/components/business/ms-common-script/ms-addScriptDrawer.vue @@ -6,6 +6,7 @@ :footer="true" unmount-on-close :ok-loading="props.confirmLoading" + :mask-closable="false" save-continue-text="project.commonScript.saveAsDraft" ok-text="project.commonScript.apply" @confirm="handleDrawerConfirm" diff --git a/frontend/src/components/pure/ms-card/index.vue b/frontend/src/components/pure/ms-card/index.vue index ae10e24b0c..b7055976f6 100644 --- a/frontend/src/components/pure/ms-card/index.vue +++ b/frontend/src/components/pure/ms-card/index.vue @@ -9,7 +9,7 @@ props.autoHeight ? '' : 'h-full min-h-[500px]', props.noContentPadding ? 'ms-card--noContentPadding' : 'p-[24px]', props.noBottomRadius ? 'ms-card--noBottomRadius' : '', - !props.hideFooter && !props.simple ? 'pb-[80px]' : '', + !props.hideFooter && !props.simple ? 'pb-[24px]' : '', ]" > @@ -151,7 +151,7 @@ // 简单模式没有标题、没有底部 return props.noContentPadding ? 66 + _specialHeight : 114 + _specialHeight; } - return 250 + _specialHeight; + return 230 + _specialHeight; }); const getComputedContentStyle = computed(() => { diff --git a/frontend/src/components/pure/ms-drawer/index.vue b/frontend/src/components/pure/ms-drawer/index.vue index f340ac5e23..e52c46eb37 100644 --- a/frontend/src/components/pure/ms-drawer/index.vue +++ b/frontend/src/components/pure/ms-drawer/index.vue @@ -149,6 +149,7 @@ noTitle?: boolean; // 是否不显示标题栏 drawerStyle?: Record; // 抽屉样式 showFullScreen?: boolean; // 是否显示全屏按钮 + maskClosable?: boolean; // 点击遮罩是否关闭 } const props = withDefaults(defineProps(), { @@ -160,6 +161,7 @@ popupContainer: 'body', disabledWidthDrag: false, showFullScreen: false, + maskClosable: true, okPermission: () => [], // 确认按钮权限 }); const emit = defineEmits(['update:visible', 'confirm', 'cancel', 'continue', 'close']); diff --git a/frontend/src/views/api-test/components/condition/content.vue b/frontend/src/views/api-test/components/condition/content.vue index 07e3491c2b..654e19568e 100644 --- a/frontend/src/views/api-test/components/condition/content.vue +++ b/frontend/src/views/api-test/components/condition/content.vue @@ -273,71 +273,73 @@ {{ t('apiTestDebug.introduceSource') }} -
{{ t('apiTestDebug.sqlScript') }}
-
- - -
-
-
- {{ t('apiTestDebug.storageByCol') }} - - - +
diff --git a/frontend/src/views/api-test/components/requestComposition/response/result/index.vue b/frontend/src/views/api-test/components/requestComposition/response/result/index.vue index ef3cde1522..fe4cf374cd 100644 --- a/frontend/src/views/api-test/components/requestComposition/response/result/index.vue +++ b/frontend/src/views/api-test/components/requestComposition/response/result/index.vue @@ -119,7 +119,6 @@ import { cloneDeep } from 'lodash-es'; import result from '@/views/api-test/components/requestComposition/response/result.vue'; - import loopPagination from '@/views/api-test/scenario/components/common/customApiDrawer.vue'; import { reportCaseStepDetail, reportStepDetail } from '@/api/modules/api-test/report'; import { useI18n } from '@/hooks/useI18n'; @@ -292,6 +291,7 @@ } } } catch (error) { + // eslint-disable-next-line no-console console.log(error); } finally { loading.value = false; diff --git a/frontend/src/views/api-test/debug/index.vue b/frontend/src/views/api-test/debug/index.vue index d11ad15573..da4bda84c9 100644 --- a/frontend/src/views/api-test/debug/index.vue +++ b/frontend/src/views/api-test/debug/index.vue @@ -97,6 +97,7 @@ /** * @description 接口测试-接口调试 */ + import { useRoute } from 'vue-router'; import { cloneDeep } from 'lodash-es'; import MsCard from '@/components/pure/ms-card/index.vue'; @@ -138,6 +139,7 @@ import { defaultBodyParams, defaultResponse } from '../components/config'; import { parseRequestBodyFiles } from '../components/utils'; + const route = useRoute(); const { t } = useI18n(); const moduleTreeRef = ref>(); @@ -235,8 +237,9 @@ activeDebug.value = debugTabs.value[debugTabs.value.length - 1]; } - async function openApiTab(apiInfo: ModuleTreeNode) { - const isLoadedTabIndex = debugTabs.value.findIndex((e) => e.id === apiInfo.id); + async function openApiTab(apiInfo: ModuleTreeNode | string) { + const id = typeof apiInfo === 'string' ? apiInfo : apiInfo.id; + const isLoadedTabIndex = debugTabs.value.findIndex((e) => e.id === id); if (isLoadedTabIndex > -1) { // 如果点击的请求在tab中已经存在,则直接切换到该tab activeDebug.value = debugTabs.value[isLoadedTabIndex]; @@ -244,17 +247,17 @@ } try { loading.value = true; - const res = await getDebugDetail(apiInfo.id); + const res = await getDebugDetail(id); let parseRequestBodyResult; if (res.protocol === 'HTTP') { parseRequestBodyResult = parseRequestBodyFiles(res.request.body); // 解析请求体中的文件,将详情中的文件 id 集合收集,更新时以判断文件是否删除以及是否新上传的文件 } addDebugTab({ - label: apiInfo.name, ...res, response: cloneDeep(defaultResponse), ...res.request, url: res.path, + label: res.name, name: res.name, // request里面还有个name但是是null moduleId: res.moduleId, // request里面还有个moduleId但是是null ...parseRequestBodyResult, @@ -345,6 +348,12 @@ } } + onMounted(() => { + if (route.query.id) { + openApiTab(route.query.id as string); + } + }); + useLeaveTabUnSaveCheck(debugTabs.value, ['PROJECT_API_DEBUG:READ+ADD', 'PROJECT_API_DEBUG:READ+UPDATE']); diff --git a/frontend/src/views/api-test/scenario/components/step/index.vue b/frontend/src/views/api-test/scenario/components/step/index.vue index 5620bd0619..468d94f502 100644 --- a/frontend/src/views/api-test/scenario/components/step/index.vue +++ b/frontend/src/views/api-test/scenario/components/step/index.vue @@ -80,7 +80,7 @@ allow-clear class="w-[200px]" /> --> - + @@ -10,7 +10,6 @@ /** * @description 系统设置-系统参数 */ - import { onMounted, ref, watch } from 'vue'; import { useRoute } from 'vue-router'; import MsTabCard from '@/components/pure/ms-tab-card/index.vue'; @@ -19,7 +18,6 @@ import useLicenseStore from '@/store/modules/setting/license'; import { hasAnyPermission } from '@/utils/permission'; - import type { AuthConfigInstance } from './components/authConfig.vue'; // 异步组件加载 const baseConfig = defineAsyncComponent(() => import('./components/baseConfig.vue')); const pageConfig = defineAsyncComponent(() => import('./components/pageConfig.vue')); @@ -33,7 +31,6 @@ const isInitPageConfig = ref(activeTab.value === 'pageConfig'); const isInitAuthConfig = ref(activeTab.value === 'authConfig'); const isInitMemoryCleanup = ref(activeTab.value === 'memoryCleanup'); - const authConfigRef = ref(); const tabList = ref([ { key: 'baseConfig', title: t('system.config.baseConfig'), permission: ['SYSTEM_PARAMETER_SETTING_BASE:READ'] }, { key: 'pageConfig', title: t('system.config.pageConfig'), permission: ['SYSTEM_PARAMETER_SETTING_DISPLAY:READ'] }, @@ -73,13 +70,7 @@ onBeforeMount(() => { getXpackTab(); const firstHasPermissionTab = tabList.value.find((item: any) => hasAnyPermission(item.permission)); - activeTab.value = firstHasPermissionTab?.key || 'baseConfig'; - }); - - onMounted(() => { - if (route.query.tab === 'authConfig' && route.query.id) { - authConfigRef.value?.openAuthDetail(route.query.id as string); - } + activeTab.value = (route.query.tab as string) || firstHasPermissionTab?.key || 'baseConfig'; }); diff --git a/frontend/src/views/setting/system/resourcePool/index.vue b/frontend/src/views/setting/system/resourcePool/index.vue index 0833567fae..80254fc3fd 100644 --- a/frontend/src/views/setting/system/resourcePool/index.vue +++ b/frontend/src/views/setting/system/resourcePool/index.vue @@ -19,9 +19,9 @@ {{ record.name }}