fix: 修改遗留中高级bug
This commit is contained in:
parent
0d06dbdb06
commit
86cbd0efbb
|
@ -17,7 +17,7 @@
|
|||
allow-clear
|
||||
:max-length="255"
|
||||
/>
|
||||
<a-tooltip :content="isExpandAll ? t('apiScenario.collapseAll') : t('apiScenario.expandAllStep')">
|
||||
<a-tooltip :content="isExpandAll ? t('common.collapseAll') : t('common.expandAll')">
|
||||
<a-button
|
||||
type="outline"
|
||||
class="expand-btn arco-btn-outline--secondary"
|
||||
|
|
|
@ -83,6 +83,7 @@
|
|||
raw?: string;
|
||||
uploadImage?: (file: File) => Promise<any>;
|
||||
maxHeight?: string;
|
||||
autoHeight?: boolean;
|
||||
filedIds?: string[];
|
||||
commentIds?: string[];
|
||||
wrapperClass?: string;
|
||||
|
@ -96,6 +97,7 @@
|
|||
uploadImage: undefined,
|
||||
placeholder: 'editor.placeholder',
|
||||
draggable: false,
|
||||
autoHeight: true,
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -438,7 +440,7 @@
|
|||
|
||||
const contentStyles = computed(() => {
|
||||
return {
|
||||
maxHeight: props.maxHeight || '200px',
|
||||
maxHeight: props.autoHeight ? '800px' : props.maxHeight || '260px',
|
||||
overflow: 'auto',
|
||||
};
|
||||
});
|
||||
|
@ -520,7 +522,7 @@
|
|||
@apply relative overflow-hidden;
|
||||
:deep(.halo-rich-text-editor .ProseMirror) {
|
||||
padding: 16px !important;
|
||||
height: 130px;
|
||||
min-height: 130px;
|
||||
p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
}>(),
|
||||
{
|
||||
size: '300px',
|
||||
min: '250px',
|
||||
min: '300px',
|
||||
max: 0.5,
|
||||
direction: 'horizontal',
|
||||
expandDirection: 'left',
|
||||
|
|
|
@ -50,7 +50,7 @@ const useFeatureCaseStore = defineStore('featureCase', {
|
|||
// 设置选择moduleId
|
||||
setModuleId(currentModuleId: string[]) {
|
||||
if (['all', 'recycle'].includes(currentModuleId[0])) {
|
||||
this.moduleId = ['root'];
|
||||
this.moduleId = [];
|
||||
} else {
|
||||
this.moduleId = currentModuleId;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
{{ t('bugManagement.edit.content') }}
|
||||
</strong>
|
||||
</div>
|
||||
<div class="mb-4 mt-[16px]" :class="{ 'max-h-[260px]': contentEditAble }">
|
||||
<div class="mb-4 mt-[16px]">
|
||||
<MsRichText
|
||||
v-if="contentEditAble"
|
||||
v-model:raw="form.description"
|
||||
|
@ -25,6 +25,7 @@
|
|||
:disabled="!contentEditAble"
|
||||
:placeholder="t('editor.placeholder')"
|
||||
:upload-image="handleUploadImage"
|
||||
:auto-height="false"
|
||||
:preview-url="EditorPreviewFileUrl"
|
||||
/>
|
||||
<div v-else v-dompurify-html="form?.description || '-'" class="markdown-body"></div>
|
||||
|
@ -43,12 +44,13 @@
|
|||
<h1 class="header-title">
|
||||
<strong>{{ item.fieldName }}</strong>
|
||||
</h1>
|
||||
<div class="mb-4 mt-[16px]" :class="{ 'max-h-[260px]': contentEditAble }">
|
||||
<div class="mb-4 mt-[16px]">
|
||||
<MsRichText
|
||||
v-if="contentEditAble"
|
||||
v-model:raw="item.defaultValue"
|
||||
v-model:filed-ids="descriptionFileIdMap[item.fieldId]"
|
||||
:disabled="!contentEditAble"
|
||||
:auto-height="false"
|
||||
:placeholder="t('editor.placeholder')"
|
||||
:upload-image="handleUploadImage"
|
||||
:preview-url="EditorPreviewFileUrl"
|
||||
|
|
|
@ -866,10 +866,10 @@
|
|||
async function initTableParams() {
|
||||
let moduleIds: string[] = [];
|
||||
if (props.activeFolder && props.activeFolder !== 'all') {
|
||||
moduleIds = [...featureCaseStore.moduleId];
|
||||
moduleIds = [props.activeFolder];
|
||||
const getAllChildren = await tableStore.getSubShow(TableKeyEnum.CASE_MANAGEMENT_TABLE);
|
||||
if (getAllChildren) {
|
||||
moduleIds = [...featureCaseStore.moduleId, ...props.offspringIds];
|
||||
moduleIds = [props.activeFolder, ...props.offspringIds];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1054,7 +1054,7 @@
|
|||
const moduleNamePath = computed(() => {
|
||||
return props.activeFolder === 'all'
|
||||
? t('caseManagement.featureCase.allCase')
|
||||
: findNodeByKey<Record<string, any>>(caseTreeData.value, featureCaseStore.moduleId[0], 'id')?.name;
|
||||
: findNodeByKey<Record<string, any>>(caseTreeData.value, props.activeFolder, 'id')?.name;
|
||||
});
|
||||
// 获取对应模块name
|
||||
function getModules(moduleIds: string) {
|
||||
|
|
|
@ -183,13 +183,20 @@
|
|||
});
|
||||
featureCaseStore.setModulesTree(caseTree.value);
|
||||
featureCaseStore.setModuleId(['all']);
|
||||
|
||||
if (isSetDefaultKey) {
|
||||
selectedNodeKeys.value = [caseTree.value[0].id];
|
||||
const offspringIds: string[] = [];
|
||||
mapTree(caseTree.value[0].children || [], (e) => {
|
||||
offspringIds.push(e.id);
|
||||
return e;
|
||||
});
|
||||
|
||||
emits('caseNodeSelect', selectedNodeKeys.value, offspringIds);
|
||||
}
|
||||
emits(
|
||||
'init',
|
||||
caseTree.value.map((e) => e.name),
|
||||
isSetDefaultKey
|
||||
caseTree.value.map((e) => e.name)
|
||||
);
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
|
@ -214,7 +221,11 @@
|
|||
try {
|
||||
await deleteCaseModuleTree(node.id);
|
||||
Message.success(t('caseManagement.featureCase.deleteSuccess'));
|
||||
initModules(true);
|
||||
emits(
|
||||
'init',
|
||||
caseTree.value.map((e) => e.name),
|
||||
true
|
||||
);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
@ -369,15 +380,6 @@
|
|||
};
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.activeFolder,
|
||||
(val) => {
|
||||
if (val === 'all') {
|
||||
initModules();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* 初始化模块文件数量
|
||||
*/
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
v-if="validateResultInfo.successCount"
|
||||
type="text"
|
||||
class="ml-[8px]"
|
||||
:disabled="props.importLoading"
|
||||
:loading="props.importLoading"
|
||||
@click="confirmImport"
|
||||
>
|
||||
|
|
|
@ -260,10 +260,11 @@
|
|||
* 设置根模块名称列表
|
||||
* @param names 根模块名称列表
|
||||
*/
|
||||
function setRootModules(names: string[], isSetDefaultKey: boolean) {
|
||||
function setRootModules(names: string[], isDelete = false) {
|
||||
rootModulesName.value = names;
|
||||
if (isSetDefaultKey) {
|
||||
activeFolder.value = 'all';
|
||||
if (isDelete) {
|
||||
caseTreeRef.value?.initModules(true);
|
||||
caseTableRef.value?.initData();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -180,6 +180,7 @@
|
|||
v-model:raw="dialogForm.reason"
|
||||
v-model:commentIds="dialogForm.commentIds"
|
||||
:upload-image="handleUploadImage"
|
||||
:auto-height="false"
|
||||
:preview-url="PreviewEditorImageUrl"
|
||||
class="w-full"
|
||||
/>
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
v-model:raw="caseResultForm.reason"
|
||||
v-model:commentIds="caseResultForm.commentIds"
|
||||
v-model:filed-ids="caseResultForm.fileList"
|
||||
:auto-height="false"
|
||||
:upload-image="handleUploadImage"
|
||||
:preview-url="PreviewEditorImageUrl"
|
||||
class="w-full"
|
||||
|
|
|
@ -194,7 +194,7 @@
|
|||
@change="enableAllJar"
|
||||
></a-switch>
|
||||
{{ t('project.fileManagement.enableAll') }}
|
||||
<a-tooltip :content="t('project.fileManagement.uploadTip')">
|
||||
<a-tooltip position="tr" :content="t('project.fileManagement.uploadTip')">
|
||||
<MsIcon type="icon-icon-maybe_outlined" class="cursor-pointer hover:text-[rgb(var(--primary-5))]" />
|
||||
</a-tooltip>
|
||||
</div>
|
||||
|
|
|
@ -18,19 +18,9 @@
|
|||
allow-clear
|
||||
/>
|
||||
<span class="absolute right-0 top-1 flex items-center">
|
||||
<span class="float-left cursor-pointer text-[rgb(var(--primary-5))]" @click="openGithub">{{
|
||||
<MsButton class="!mx-0 text-[rgb(var(--primary-5))]" @click="openGithub">{{
|
||||
t('system.plugin.getPlugin')
|
||||
}}</span>
|
||||
<a-tooltip position="bottom">
|
||||
<span class="float-right ml-1 mt-[2px]">
|
||||
<IconQuestionCircle
|
||||
class="h-[16px] w-[16px] text-[--color-text-4] hover:text-[rgb(var(--primary-5))]"
|
||||
/>
|
||||
</span>
|
||||
<template #content>
|
||||
<span @click="openGithub">{{ t('system.plugin.infoTip') }}</span>
|
||||
</template>
|
||||
</a-tooltip>
|
||||
}}</MsButton>
|
||||
</span>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
|
@ -248,7 +238,7 @@
|
|||
});
|
||||
|
||||
function openGithub() {
|
||||
window.open('https://github.com/metersphere');
|
||||
window.open('https://metersphere.io/docs/v3.x/plugin/');
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ export default {
|
|||
'system.plugin.selectOrganizeTip': 'Please Choose Organization',
|
||||
'system.plugin.selectOrganization': 'Choose Organization',
|
||||
'system.plugin.infoTip': 'Jump to the Github download plug-in',
|
||||
'system.plugin.getPlugin': 'Gets the open source plug-in',
|
||||
'system.plugin.getPlugin': 'Get more plugins',
|
||||
'system.plugin.afterSecond': 'Return to the list of plug-ins after the second',
|
||||
'system.plugin.uploadSuccess': 'Upload Success!',
|
||||
'system.plugin.uploadSuccessAfter': 'After successful upload, must arrive',
|
||||
|
|
|
@ -45,7 +45,7 @@ export default {
|
|||
'system.plugin.selectOrganizeTip': '请选择组织',
|
||||
'system.plugin.selectOrganization': '选择组织',
|
||||
'system.plugin.infoTip': '跳转至 GitHub 下载插件',
|
||||
'system.plugin.getPlugin': '获取开源插件',
|
||||
'system.plugin.getPlugin': '获取更多插件',
|
||||
'system.plugin.afterSecond': '秒后回到插件列表',
|
||||
'system.plugin.uploadSuccess': '上传成功!',
|
||||
'system.plugin.uploadSuccessAfter': '上传成功后,须到',
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
v-model:filedIds="form.planCommentFileIds"
|
||||
:upload-image="handleUploadImage"
|
||||
:preview-url="PreviewEditorImageUrl"
|
||||
:auto-height="false"
|
||||
class="w-full"
|
||||
:placeholder="
|
||||
props.isDblclickPlaceholder
|
||||
|
|
Loading…
Reference in New Issue