fix(项目管理): 修复环境管理显示设置统一和显示设置关闭后不展示

This commit is contained in:
xinxin.wu 2024-04-16 19:28:31 +08:00 committed by Craftsman
parent b8a6bcbb6b
commit b3cd1fb950
8 changed files with 38 additions and 8 deletions

View File

@ -59,6 +59,7 @@ export enum TableKeyEnum {
PROJECT_MANAGEMENT_ENV_ALL_PARAM = 'projectManagementEnvAllParam',
PROJECT_MANAGEMENT_ENV_ENV_PARAM = 'projectManagementEnvEnvParam',
PROJECT_MANAGEMENT_ENV_ENV_HTTP = 'projectManagementEnvEnvHttp',
PROJECT_MANAGEMENT_ENV_ENV_DATASTORES = 'projectManagementEnvEnvDataSource',
PROJECT_MANAGEMENT_ENV_ALL_PARAM_HEADER = 'projectManagementEnvAllParamHeader',
PROJECT_MANAGEMENT_ENV_ALL_PARAM_VARIABLE = 'projectManagementEnvAllParamVariable',
TEST_PLAN_ALL_TABLE = 'testPlanAllTable',

View File

@ -515,6 +515,7 @@
function changeShowType(val: string | number | boolean) {
showType.value = val as ReportShowType;
resetSelector();
initData();
}

View File

@ -100,6 +100,7 @@
function searchStep() {
const splitLevel = props.keyWords.split('-');
const stepTypeStatus = splitLevel[1];
expandedKeys.value = [];
const search = (_data: ScenarioItemType[]) => {
const result: ScenarioItemType[] = [];
_data.forEach((item) => {

View File

@ -136,6 +136,15 @@
hasChange.value = true;
};
watch(
() => props.visible,
(value) => {
if (value) {
hasChange.value = false;
}
}
);
onBeforeMount(() => {
loadTab();
});

View File

@ -139,7 +139,7 @@
{
value: EnvTabTypeEnum.ENVIRONMENT_SETTING,
label: t('project.environmental.displaySetting'),
canHide: false,
canHide: true,
isShow: true,
},
];

View File

@ -25,12 +25,12 @@
}}</span></a-divider
>
<VueDraggable
v-model="couldCloseColumn"
v-model="couldCloseColumnExcludeSetting"
class="ms-assertion-body-left"
ghost-class="ghost"
handle=".column-drag-item"
>
<div v-for="element in couldCloseColumn" :key="element.value" class="column-drag-item">
<div v-for="element in couldCloseColumnExcludeSetting" :key="element.value" class="column-drag-item">
<div class="flex w-[90%] items-center">
<span class="ml-[8px]">{{ t(element.label) }}</span>
</div>
@ -73,10 +73,14 @@
const loadColumn = async () => {
const res = (await store.getContentTabList()) || [];
nonCloseColumn.value = res.filter((item) => !item.canHide && item.value !== 'SETTING');
nonCloseColumn.value = res.filter((item) => !item.canHide);
couldCloseColumn.value = res.filter((item) => item.canHide);
};
const couldCloseColumnExcludeSetting = computed(() => {
return couldCloseColumn.value.filter((item) => item.canHide && item.value !== 'SETTING');
});
const handleReset = () => {
loadColumn();
hasChange.value = false;
@ -86,6 +90,15 @@
hasChange.value = true;
};
watch(
() => innerVisible.value,
(value) => {
if (value) {
hasChange.value = false;
}
}
);
onBeforeMount(() => {
loadColumn();
});
@ -115,7 +128,7 @@
flex-flow: row nowrap;
justify-content: space-between;
align-items: center;
padding: 8px 12px 8px 36px;
padding: 8px 12px 8px 16px;
&:hover {
border-radius: 6px;
background: var(--color-text-n9);

View File

@ -87,8 +87,9 @@
title: 'project.environmental.database.name',
dataIndex: 'dataSource',
showTooltip: true,
showDrag: true,
showDrag: false,
showInTable: true,
columnSelectorDisabled: true,
},
{
title: 'project.environmental.database.driver',
@ -142,7 +143,6 @@
showPagination: false,
heightUsed: 590,
showMode: false,
isSimpleSetting: true,
});
const moreActionList: ActionsItem[] = [

View File

@ -124,6 +124,7 @@
import type { ModuleTreeNode } from '@/models/common';
import type { CommonParams } from '@/models/projectManagement/environmental';
import { HttpForm } from '@/models/projectManagement/environmental';
import { TableKeyEnum } from '@/enums/tableEnum';
const appStore = useAppStore();
const { t } = useI18n();
@ -139,6 +140,8 @@
dataIndex: 'url',
slotName: 'url',
showTooltip: true,
showDrag: false,
columnSelectorDisabled: true,
},
{
title: 'project.environmental.http.desc',
@ -167,12 +170,14 @@
width: 170,
},
];
await tableStore.initColumn(TableKeyEnum.PROJECT_MANAGEMENT_ENV_ENV_DATASTORES, columns);
const { propsRes, propsEvent } = useTable(undefined, {
tableKey: TableKeyEnum.PROJECT_MANAGEMENT_ENV_ENV_DATASTORES,
columns,
scroll: { x: '100%' },
selectable: false,
noDisable: true,
showSetting: false,
showSetting: true,
showPagination: false,
enableDrag: true,
showMode: false,