fix: 修改全局bug树模快悬浮样式&缺陷管理bug&脚本菜单style
This commit is contained in:
parent
1e87d23c0c
commit
cd03ccead9
|
@ -78,7 +78,7 @@
|
|||
<template #title="nodeData">
|
||||
<div class="inline-flex w-full">
|
||||
<div class="one-line-text w-[calc(100%-32px)] text-[var(--color-text-1)]">{{ nodeData.name }}</div>
|
||||
<div class="ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
<div class="ms-tree-node-count ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
</div>
|
||||
</template>
|
||||
</MsTree>
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<template #title="nodeData">
|
||||
<div class="inline-flex w-full">
|
||||
<div class="one-line-text w-[calc(100%-32px)] text-[var(--color-text-1)]">{{ nodeData.name }}</div>
|
||||
<div class="ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
<div class="ms-tree-node-count ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
</div>
|
||||
</template>
|
||||
</MsTree>
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
<MsDrawer
|
||||
v-model:visible="showScriptDrawer"
|
||||
:title="form.id ? t('project.commonScript.editPublicScript') : t('project.commonScript.addPublicScript')"
|
||||
:width="768"
|
||||
:width="900"
|
||||
min-width="900px"
|
||||
:footer="true"
|
||||
unmount-on-close
|
||||
:ok-loading="props.confirmLoading"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div v-if="!innerExpand" class="w-[32%] min-w-[30%] max-w-[42%] bg-white p-3 pl-0">
|
||||
<div class="mb-2 flex items-center justify-between">
|
||||
<div v-if="!innerExpand" class="w-[32%] min-w-[260px] max-w-[42%] flex-1 bg-white p-3 pl-0">
|
||||
<div class="mb-2 flex w-full items-center justify-between">
|
||||
<div class="flex items-center">
|
||||
<span v-if="innerExpand" class="collapsebtn mr-1 flex items-center justify-center" @click="expandedHandler">
|
||||
<icon-right class="text-[12px] text-[var(--color-text-4)]" />
|
||||
|
@ -8,22 +8,23 @@
|
|||
<span v-else class="expand mr-1 flex items-center justify-center" @click="expandedHandler">
|
||||
<icon-down class="text-[12px] text-[rgb(var(--primary-6))]" />
|
||||
</span>
|
||||
<div class="font-medium">{{ t('project.commonScript.codeSnippet') }}</div>
|
||||
<div class="one-line-text font-medium">{{ t('project.commonScript.codeSnippet') }}</div>
|
||||
</div>
|
||||
|
||||
<a-select
|
||||
v-model="innerLanguageType"
|
||||
:disabled="props.disabled"
|
||||
class="max-w-[50%]"
|
||||
:placeholder="t('project.commonScript.pleaseSelected')"
|
||||
@change="changeHandler"
|
||||
>
|
||||
<a-option v-for="item of languages" :key="item.value" :value="item.value">
|
||||
<a-tooltip :content="item.text">
|
||||
{{ item.text }}
|
||||
</a-tooltip>
|
||||
</a-option>
|
||||
</a-select>
|
||||
<div class="ml-[24px] flex-1">
|
||||
<a-select
|
||||
v-model="innerLanguageType"
|
||||
:disabled="props.disabled"
|
||||
:placeholder="t('project.commonScript.pleaseSelected')"
|
||||
@change="changeHandler"
|
||||
>
|
||||
<a-option v-for="item of languages" :key="item.value" :value="item.value">
|
||||
<a-tooltip :content="item.text">
|
||||
{{ item.text }}
|
||||
</a-tooltip>
|
||||
</a-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-[12px] pt-0">
|
||||
<div v-for="item of SCRIPT_MENU" :key="item.value" class="menuItem px-1" @click="handleClick(item)">
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
nodeData.name
|
||||
}}</div
|
||||
>
|
||||
<div class="ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
<div class="ms-tree-node-count ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
</div>
|
||||
</template>
|
||||
</MsTree>
|
||||
|
|
|
@ -405,7 +405,7 @@
|
|||
@apply h-full;
|
||||
.ms-tree {
|
||||
.ms-scroll-bar();
|
||||
@apply h-full;
|
||||
@apply h-full overflow-auto;
|
||||
.arco-tree-node {
|
||||
border-radius: var(--border-radius-small);
|
||||
&:hover {
|
||||
|
@ -418,6 +418,9 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.ms-tree-node-count {
|
||||
@apply hidden;
|
||||
}
|
||||
.ms-tree-node-extra {
|
||||
@apply visible w-auto;
|
||||
}
|
||||
|
|
|
@ -252,6 +252,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
// 获取编码方式对应内容
|
||||
function getEncodingCode() {
|
||||
return editor.getValue();
|
||||
}
|
||||
|
||||
const init = () => {
|
||||
// 注册自定义主题 TODO:自定义主题高亮色还没配置
|
||||
|
@ -351,6 +355,7 @@
|
|||
undo,
|
||||
redo,
|
||||
format,
|
||||
getEncodingCode,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
|
@ -265,6 +265,12 @@
|
|||
function goMessageCenter() {
|
||||
messageCenterVisible.value = true;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (route.query.task) {
|
||||
goTaskCenter();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
|
|
@ -734,6 +734,9 @@ export const pathMap: PathMapItem[] = [
|
|||
key: 'PROJECT_MANAGEMENT_TASK_CENTER', // 项目管理-任务中心
|
||||
locale: 'menu.projectManagement.taskCenter',
|
||||
route: '',
|
||||
routeQuery: {
|
||||
task: 'projectTask',
|
||||
},
|
||||
permission: [],
|
||||
level: MENU_LEVEL[2],
|
||||
},
|
||||
|
|
|
@ -4,7 +4,12 @@
|
|||
<a-tab-pane v-for="item of responseCompositionTabList" :key="item.value" :title="item.label" />
|
||||
</a-tabs>
|
||||
<div class="response-container">
|
||||
<ResBody v-if="activeTab === ResponseComposition.BODY" :request-result="props.requestResult" @copy="copyScript" />
|
||||
<ResBody
|
||||
v-if="activeTab === ResponseComposition.BODY"
|
||||
ref="resBodyRef"
|
||||
:request-result="props.requestResult"
|
||||
@copy="copyScript"
|
||||
/>
|
||||
<ResConsole v-else-if="activeTab === ResponseComposition.CONSOLE" :console="props.console?.trim()" />
|
||||
<ResValueScript
|
||||
v-else-if="
|
||||
|
@ -116,10 +121,11 @@
|
|||
});
|
||||
|
||||
const { copy, isSupported } = useClipboard({ legacy: true });
|
||||
|
||||
const resBodyRef = ref();
|
||||
function copyScript() {
|
||||
const encodingFormatValue = resBodyRef.value.responseEditorRef.getEncodingCode();
|
||||
if (isSupported) {
|
||||
copy(props.requestResult?.responseResult.body || '');
|
||||
copy(encodingFormatValue || '');
|
||||
Message.success(t('common.copySuccess'));
|
||||
} else {
|
||||
Message.warning(t('apiTestDebug.copyNotSupport'));
|
||||
|
|
|
@ -95,6 +95,11 @@
|
|||
downloadUrlFile(imageUrl.value, `response.${props.requestResult?.responseResult.contentType.split('/')[1]}`);
|
||||
}
|
||||
}
|
||||
const responseEditorRef = ref();
|
||||
|
||||
defineExpose({
|
||||
responseEditorRef,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
</div>
|
||||
<div v-else class="inline-flex w-full">
|
||||
<div class="one-line-text w-[calc(100%-32px)] text-[var(--color-text-1)]">{{ nodeData.name }}</div>
|
||||
<div class="ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
<div class="ms-tree-node-count ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #extra="nodeData">
|
||||
|
|
|
@ -50,12 +50,20 @@
|
|||
dataIndex: 'num',
|
||||
slotName: 'num',
|
||||
width: 150,
|
||||
sortable: {
|
||||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'apiTestManagement.resourceName',
|
||||
dataIndex: 'resourceName',
|
||||
showTooltip: true,
|
||||
width: 150,
|
||||
sortable: {
|
||||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'apiTestManagement.resourceType',
|
||||
|
@ -87,6 +95,7 @@
|
|||
scroll: { x: '100%' },
|
||||
selectable: false,
|
||||
heightUsed: 374,
|
||||
showJumpMethod: true,
|
||||
},
|
||||
(item) => ({
|
||||
...item,
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
</div>
|
||||
<div v-else :id="nodeData.id" class="inline-flex w-full">
|
||||
<div class="one-line-text w-[calc(100%-32px)] text-[var(--color-text-1)]">{{ nodeData.name }}</div>
|
||||
<div v-if="!props.isModal" class="ml-[4px] text-[var(--color-text-4)]"
|
||||
<div v-if="!props.isModal" class="ms-tree-node-count ml-[4px] text-[var(--color-text-4)]"
|
||||
>({{ modulesCount[nodeData.id] || 0 }})</div
|
||||
>
|
||||
</div>
|
||||
|
|
|
@ -48,7 +48,9 @@
|
|||
<template #title="nodeData">
|
||||
<div class="inline-flex w-full">
|
||||
<div class="one-line-text w-[calc(100%-32px)] text-[var(--color-text-1)]">{{ nodeData.name }}</div>
|
||||
<div class="ml-[4px] text-[var(--color-text-4)]">({{ moduleCountMap[nodeData.id] || 0 }})</div>
|
||||
<div class="ms-tree-node-count ml-[4px] text-[var(--color-text-4)]"
|
||||
>({{ moduleCountMap[nodeData.id] || 0 }})</div
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</MsTree>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<template #title="nodeData">
|
||||
<div :id="nodeData.id" class="inline-flex w-full">
|
||||
<div class="one-line-text w-[calc(100%-32px)] text-[var(--color-text-1)]">{{ nodeData.name }}</div>
|
||||
<div class="ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
<div class="ms-tree-node-count ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
</div>
|
||||
</template>
|
||||
</MsTree>
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<template #title="nodeData">
|
||||
<div :id="nodeData.id" class="inline-flex w-full">
|
||||
<div class="one-line-text w-[calc(100%-32px)] text-[var(--color-text-1)]">{{ nodeData.name }}</div>
|
||||
<div class="ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
<div class="ms-tree-node-count ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
</div>
|
||||
</template>
|
||||
</MsTree>
|
||||
|
|
|
@ -445,25 +445,32 @@
|
|||
emit('submit');
|
||||
}
|
||||
|
||||
const tabList = [
|
||||
{
|
||||
value: 'detail',
|
||||
label: t('bugManagement.detail.detail'),
|
||||
},
|
||||
{
|
||||
value: 'case',
|
||||
label: t('bugManagement.detail.case'),
|
||||
},
|
||||
{
|
||||
value: 'comment',
|
||||
label: t('bugManagement.detail.comment'),
|
||||
},
|
||||
{
|
||||
value: 'history',
|
||||
label: t('bugManagement.detail.changeHistory'),
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* 如果模块没有开启用例管理
|
||||
*/
|
||||
const contentTabList = computed(() => {
|
||||
return [
|
||||
{
|
||||
value: 'detail',
|
||||
label: t('bugManagement.detail.detail'),
|
||||
},
|
||||
{
|
||||
value: 'case',
|
||||
label: t('bugManagement.detail.case'),
|
||||
},
|
||||
{
|
||||
value: 'comment',
|
||||
label: t('bugManagement.detail.comment'),
|
||||
},
|
||||
{
|
||||
value: 'history',
|
||||
label: t('bugManagement.detail.changeHistory'),
|
||||
},
|
||||
];
|
||||
return appStore.currentMenuConfig.includes('caseManagement')
|
||||
? tabList
|
||||
: tabList.filter((item) => item.value !== 'case');
|
||||
});
|
||||
|
||||
function updateHandler() {
|
||||
|
@ -784,7 +791,6 @@
|
|||
// width: 100%;
|
||||
// word-wrap: break-word;
|
||||
//}
|
||||
|
||||
:deep(.arco-form-item-content) {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<a-spin class="w-full" :style="{ height: `calc(100vh - 346px)` }" :loading="loading">
|
||||
<a-spin class="min-h-[400px] w-full" :loading="loading">
|
||||
<MsTree
|
||||
v-model:focus-node-key="focusNodeKey"
|
||||
:selected-keys="props.selectedKeys"
|
||||
|
@ -26,7 +26,9 @@
|
|||
<template #title="nodeData">
|
||||
<div class="inline-flex w-full">
|
||||
<div class="one-line-text w-[calc(100%-32px)] text-[var(--color-text-1)]">{{ nodeData.name }}</div>
|
||||
<div v-if="!props.isModal" class="ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
<div v-if="!props.isModal" class="ms-tree-node-count ml-[4px] text-[var(--color-text-4)]"
|
||||
>({{ nodeData.count || 0 }})</div
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="!props.isModal" #extra="nodeData">
|
||||
|
@ -343,7 +345,7 @@
|
|||
};
|
||||
}
|
||||
return {
|
||||
height: 'calc(100vh - 325px)',
|
||||
height: 'calc(100vh - 335px)',
|
||||
threshold: 200,
|
||||
fixedSize: true,
|
||||
buffer: 15,
|
||||
|
|
|
@ -52,7 +52,9 @@
|
|||
<template #title="nodeData">
|
||||
<div class="inline-flex w-full" @click="setFocusKey(nodeData)">
|
||||
<div class="one-line-text w-[calc(100%-32px)] text-[var(--color-text-1)]">{{ nodeData.name }}</div>
|
||||
<div class="ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
<div class="ms-tree-node-count ml-[4px] text-[var(--color-text-4)]"
|
||||
>({{ nodeData.count || 0 }})</div
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</MsTree>
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
@click="setFocusKey(nodeData)"
|
||||
>{{ nodeData.name }}</div
|
||||
>
|
||||
<div class="ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
<div class="ms-tree-node-count ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
</div>
|
||||
</template>
|
||||
</MsTree>
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
</div>
|
||||
<div class="flex-1">
|
||||
<a-divider class="!my-0 !mb-0" />
|
||||
<div class="case">
|
||||
<div class="case mt-2">
|
||||
<div
|
||||
class="flex items-center px-[20px]"
|
||||
:class="getActiveClass('recycle')"
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<template #title="nodeData">
|
||||
<div class="inline-flex w-full">
|
||||
<div class="one-line-text w-[calc(100%-32px)] text-[var(--color-text-1)]">{{ nodeData.name }}</div>
|
||||
<div class="ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
<div class="ms-tree-node-count ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
</div>
|
||||
</template>
|
||||
</MsTree>
|
||||
|
|
|
@ -59,7 +59,9 @@
|
|||
<template #title="nodeData">
|
||||
<div class="inline-flex w-full">
|
||||
<div class="one-line-text w-[calc(100%-32px)] text-[var(--color-text-1)]">{{ nodeData.name }}</div>
|
||||
<div v-if="!props.isModal" class="ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
<div v-if="!props.isModal" class="ms-tree-node-count ml-[4px] text-[var(--color-text-4)]"
|
||||
>({{ nodeData.count || 0 }})</div
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="!props.isModal" #extra="nodeData">
|
||||
|
|
|
@ -33,7 +33,9 @@
|
|||
<template #title="nodeData">
|
||||
<div class="inline-flex w-full">
|
||||
<div class="one-line-text text-[var(--color-text-1)]">{{ nodeData.name }}</div>
|
||||
<div v-if="!props.isModal" class="ml-auto text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
<div v-if="!props.isModal" class="ms-tree-node-count ml-auto text-[var(--color-text-4)]"
|
||||
>({{ nodeData.count || 0 }})</div
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="!props.isModal" #extra="nodeData">
|
||||
|
|
|
@ -32,7 +32,9 @@
|
|||
<template #title="nodeData">
|
||||
<div class="inline-flex w-full">
|
||||
<div class="one-line-text w-[calc(100%-32px)] text-[var(--color-text-1)]">{{ nodeData.name }}</div>
|
||||
<div v-if="!props.isModal" class="ml-[4px] text-[var(--color-text-4)]">({{ nodeData.count || 0 }})</div>
|
||||
<div v-if="!props.isModal" class="ms-tree-node-count ml-[4px] text-[var(--color-text-4)]"
|
||||
>({{ nodeData.count || 0 }})</div
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="!props.isModal" #extra="nodeData">
|
||||
|
|
Loading…
Reference in New Issue