fix(全局): 部分 bug 修复

This commit is contained in:
baiqi 2024-06-19 14:18:41 +08:00 committed by 刘瑞斌
parent 2e8e11e13a
commit 2d51739c1c
12 changed files with 34 additions and 32 deletions

View File

@ -392,7 +392,7 @@
// //
node.expand(); node.expand();
node.renderTree(); node.renderTree();
window.minder.layout(); node.layout();
return; return;
} }
// TODO: // TODO:
@ -440,7 +440,7 @@
node.expand(); node.expand();
// node.renderTree(); // node.renderTree();
window.minder.renderNodeBatch(waitingRenderNodes); window.minder.renderNodeBatch(waitingRenderNodes);
window.minder.layout(); node.layout();
window.minder.execCommand('camera', node, 100); window.minder.execCommand('camera', node, 100);
if (node.data) { if (node.data) {
node.data.isLoaded = true; node.data.isLoaded = true;
@ -458,10 +458,10 @@
extraVisible.value = false; extraVisible.value = false;
showDetailMenu.value = false; showDetailMenu.value = false;
resetExtractInfo(); resetExtractInfo();
if (node.children && node.children.length > 0) { if (node.children && node.children.length > 0 && node.data?.expandState === 'collapse') {
node.expand(); node.expand();
node.renderTree(); node.renderTree();
window.minder.layout(); node.layout();
} }
} }
setPriorityView(true, 'P'); setPriorityView(true, 'P');

View File

@ -460,8 +460,11 @@
[RunMode.PARALLEL]: 3, [RunMode.PARALLEL]: 3,
}; };
function getExecuteMethod(priority: number) { function getExecuteMethod(data: MinderJsonNodeData) {
return priority === 2 ? RunMode.SERIAL : RunMode.PARALLEL; if (activePlanSet.value?.data.id === data.id) {
return activePlanSet.value?.data.executeMethod;
}
return data.priority === 2 ? RunMode.SERIAL : RunMode.PARALLEL;
} }
/** /**
@ -740,13 +743,13 @@
...node.data, ...node.data,
id: undefined, id: undefined,
num: nodeIndex, num: nodeIndex,
executeMethod: getExecuteMethod(node.data.priority), executeMethod: getExecuteMethod(node.data),
}); });
} else { } else {
tempMinderParams.value.editList.push({ tempMinderParams.value.editList.push({
...node.data, ...node.data,
num: nodeIndex, num: nodeIndex,
executeMethod: getExecuteMethod(node.data.priority), executeMethod: getExecuteMethod(node.data),
}); });
} }
return node.data.level < 2; return node.data.level < 2;

View File

@ -63,12 +63,7 @@
<template #tag> <template #tag>
<div v-for="org of orgList" :key="org.orgId" class="mb-[16px]"> <div v-for="org of orgList" :key="org.orgId" class="mb-[16px]">
<MsTag class="h-[26px]" max-width="100%"> <MsTag class="h-[26px]" max-width="100%">
<a-tooltip :content="org.orgName" position="left"> <span>{{ org.orgName }}</span>
<template #content>
<span>{{ org.orgName }}</span>
</template>
<span>{{ org.orgName }}</span>
</a-tooltip>
</MsTag> </MsTag>
<br /> <br />
<MsTag <MsTag
@ -77,12 +72,7 @@
class="!mr-[8px] mt-[8px] !bg-[rgb(var(--primary-1))] !text-[rgb(var(--primary-5))]" class="!mr-[8px] mt-[8px] !bg-[rgb(var(--primary-1))] !text-[rgb(var(--primary-5))]"
max-width="100%" max-width="100%"
> >
<a-tooltip :content="project.projectName" position="left"> <span>{{ project.projectName }}</span>
<template #content>
<span>{{ project.projectName }}</span>
</template>
<span>{{ project.projectName }}</span>
</a-tooltip>
</MsTag> </MsTag>
</div> </div>
</template> </template>

View File

@ -151,7 +151,7 @@
} }
); );
const _specialHeight = props.hasBreadcrumb ? 32 + props.specialHeight : props.specialHeight; // 32 const _specialHeight = props.hasBreadcrumb ? 32 + props.specialHeight : props.specialHeight; // 24+8
// TODO // TODO
const cardOverHeight = computed(() => { const cardOverHeight = computed(() => {
@ -169,9 +169,9 @@
} }
if (props.hideFooter) { if (props.hideFooter) {
// //
return props.noContentPadding ? 120 + _specialHeight : 168 + _specialHeight; return props.noContentPadding ? 130 + _specialHeight : 168 + _specialHeight;
} }
return 230 + _specialHeight; return 220 + _specialHeight;
}); });
const getComputedContentStyle = computed(() => { const getComputedContentStyle = computed(() => {

View File

@ -38,7 +38,10 @@
{{ tag }} {{ tag }}
</MsTag> </MsTag>
<template #overflow="{ number }"> <template #overflow="{ number }">
<a-tooltip :content="(Array.isArray(item.value) ? item.value : [item.value]).join('')"> <a-tooltip
:content="(Array.isArray(item.value) ? item.value : [item.value]).join('')"
position="tl"
>
<MsTag <MsTag
:theme="item.tagTheme || 'outline'" :theme="item.tagTheme || 'outline'"
:type="item.tagType || 'primary'" :type="item.tagType || 'primary'"
@ -98,6 +101,7 @@
<a-tooltip <a-tooltip
:content="`${item.value}`" :content="`${item.value}`"
:disabled="item.value === undefined || item.value === null || item.value?.toString() === ''" :disabled="item.value === undefined || item.value === null || item.value?.toString() === ''"
position="tl"
> >
<div> <div>
{{ {{

View File

@ -325,7 +325,7 @@
}); });
} }
const shortcutTriggerVisible = ref(false); // const shortcutTriggerVisible = ref(false);
onMounted(() => { onMounted(() => {
nextTick(() => { nextTick(() => {

View File

@ -99,7 +99,7 @@
if (val && node) { if (val && node) {
setTimeout(() => { setTimeout(() => {
window.minder.execCommand('camera', node, 100); window.minder.execCommand('camera', node, 100);
}, 0); }, 100);
} }
} }
); );

View File

@ -854,6 +854,7 @@
requestVModel.value.method = RequestMethods.GET; requestVModel.value.method = RequestMethods.GET;
} }
} }
localStorage.setItem('currentProtocol', requestVModel.value.protocol);
handleActiveDebugChange(); handleActiveDebugChange();
} }

View File

@ -155,11 +155,12 @@
} }
const initDefaultId = `debug-${Date.now()}`; const initDefaultId = `debug-${Date.now()}`;
const localProtocol = localStorage.getItem('currentProtocol');
const defaultDebugParams: RequestParam = { const defaultDebugParams: RequestParam = {
type: 'api', type: 'api',
id: initDefaultId, id: initDefaultId,
moduleId: 'root', moduleId: 'root',
protocol: 'HTTP', protocol: localProtocol || 'HTTP',
url: '', url: '',
activeTab: RequestComposition.HEADER, activeTab: RequestComposition.HEADER,
label: t('apiTestDebug.newApi'), label: t('apiTestDebug.newApi'),
@ -229,11 +230,12 @@
function addDebugTab(defaultProps?: Partial<TabItem>) { function addDebugTab(defaultProps?: Partial<TabItem>) {
const id = `debug-${Date.now()}`; const id = `debug-${Date.now()}`;
const protocol = localStorage.getItem('currentProtocol');
debugTabs.value.push({ debugTabs.value.push({
...cloneDeep(defaultDebugParams), ...cloneDeep(defaultDebugParams),
id, id,
isNew: !defaultProps?.id, // tabidid isNew: !defaultProps?.id, // tabidid
protocol: activeDebug.value.protocol || defaultDebugParams.protocol, // tab使tab protocol: protocol || activeDebug.value.protocol || defaultDebugParams.protocol, // tab使tab
...defaultProps, ...defaultProps,
}); });
activeDebug.value = debugTabs.value[debugTabs.value.length - 1]; activeDebug.value = debugTabs.value[debugTabs.value.length - 1];

View File

@ -226,12 +226,13 @@
}); });
const initDefaultId = `definition-${Date.now()}`; const initDefaultId = `definition-${Date.now()}`;
const localProtocol = localStorage.getItem('currentProtocol');
const defaultDefinitionParams: RequestParam = { const defaultDefinitionParams: RequestParam = {
type: 'api', type: 'api',
definitionActiveKey: 'definition', definitionActiveKey: 'definition',
id: initDefaultId, id: initDefaultId,
moduleId: props.activeModule === 'all' ? 'root' : props.activeModule, moduleId: props.activeModule === 'all' ? 'root' : props.activeModule,
protocol: 'HTTP', protocol: localProtocol || 'HTTP',
tags: [], tags: [],
status: RequestDefinitionStatus.PROCESSING, status: RequestDefinitionStatus.PROCESSING,
description: '', description: '',
@ -299,6 +300,7 @@
function addApiTab(defaultProps?: Partial<TabItem>) { function addApiTab(defaultProps?: Partial<TabItem>) {
const id = `definition-${Date.now()}`; const id = `definition-${Date.now()}`;
const protocol = localStorage.getItem('currentProtocol');
apiTabs.value.push({ apiTabs.value.push({
...cloneDeep(defaultDefinitionParams), ...cloneDeep(defaultDefinitionParams),
moduleId: props.activeModule === 'all' ? 'root' : props.activeModule, moduleId: props.activeModule === 'all' ? 'root' : props.activeModule,
@ -306,7 +308,7 @@
id, id,
isNew: !defaultProps?.id, // tabidid isNew: !defaultProps?.id, // tabidid
definitionActiveKey: !defaultProps ? 'definition' : 'preview', definitionActiveKey: !defaultProps ? 'definition' : 'preview',
protocol: activeApiTab.value.protocol || defaultDefinitionParams.protocol, // tab使tab protocol: protocol || activeApiTab.value.protocol || defaultDefinitionParams.protocol, // tab使tab
...defaultProps, ...defaultProps,
}); });
activeApiTab.value = apiTabs.value[apiTabs.value.length - 1]; activeApiTab.value = apiTabs.value[apiTabs.value.length - 1];

View File

@ -22,7 +22,7 @@
class="scenario-csv-trigger" class="scenario-csv-trigger"
:popup-translate="[-2, 244]" :popup-translate="[-2, 244]"
> >
<MsButton type="text" class="!mr-0" @click="handleRecordConfig(record)"> <MsButton type="text" class="!mr-0" size="mini" @click="handleRecordConfig(record)">
{{ t('apiScenario.params.config') }} {{ t('apiScenario.params.config') }}
</MsButton> </MsButton>
<template #content> <template #content>

View File

@ -618,8 +618,8 @@
.case-item--active { .case-item--active {
@apply relative; @apply relative;
border: 1px solid rgb(var(--primary-5));
background-color: rgb(var(--primary-1)); background-color: rgb(var(--primary-1));
box-shadow: inset 0 0 0.5px 0.5px rgb(var(--primary-5));
} }
} }
.case-detail-label { .case-detail-label {