fix(全局): 部分 bug 修复
This commit is contained in:
parent
2e8e11e13a
commit
2d51739c1c
|
@ -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');
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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(() => {
|
||||||
|
|
|
@ -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>
|
||||||
{{
|
{{
|
||||||
|
|
|
@ -325,7 +325,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const shortcutTriggerVisible = ref(false);
|
// const shortcutTriggerVisible = ref(false);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -854,6 +854,7 @@
|
||||||
requestVModel.value.method = RequestMethods.GET;
|
requestVModel.value.method = RequestMethods.GET;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
localStorage.setItem('currentProtocol', requestVModel.value.protocol);
|
||||||
handleActiveDebugChange();
|
handleActiveDebugChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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, // 新开的tab标记为前端新增的调试,因为此时都已经有id了;但是如果是查看打开的会有携带id
|
isNew: !defaultProps?.id, // 新开的tab标记为前端新增的调试,因为此时都已经有id了;但是如果是查看打开的会有携带id
|
||||||
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];
|
||||||
|
|
|
@ -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, // 新开的tab标记为前端新增的调试,因为此时都已经有id了;但是如果是查看打开的会有携带id
|
isNew: !defaultProps?.id, // 新开的tab标记为前端新增的调试,因为此时都已经有id了;但是如果是查看打开的会有携带id
|
||||||
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];
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue