fix(系统设置): 修复资源池并发限制缺陷&列表字段增加过滤类型
This commit is contained in:
parent
81bb2d0c39
commit
1ee17c14bf
|
@ -63,6 +63,7 @@
|
|||
class="flex-1"
|
||||
:placeholder="t(model.placeholder || '')"
|
||||
:max-length="model.maxLength || 255"
|
||||
:disabled="model.disabled"
|
||||
allow-clear
|
||||
@change="emit('change')"
|
||||
/>
|
||||
|
@ -71,6 +72,7 @@
|
|||
v-model:model-value="element[model.field]"
|
||||
class="flex-1"
|
||||
type="textarea"
|
||||
:disabled="model.disabled"
|
||||
@change="
|
||||
() => {
|
||||
formRef?.validateField(`list[${index}].${model.field}`);
|
||||
|
@ -89,6 +91,7 @@
|
|||
:max="model.max || 9999999"
|
||||
model-event="input"
|
||||
allow-clear
|
||||
:disabled="model.disabled"
|
||||
@change="emit('change')"
|
||||
/>
|
||||
<template #content>
|
||||
|
@ -109,6 +112,7 @@
|
|||
unique-value
|
||||
retain-input-value
|
||||
:max-tag-count="2"
|
||||
:disabled="model.disabled"
|
||||
@change="emit('change')"
|
||||
/>
|
||||
<a-select
|
||||
|
@ -117,6 +121,7 @@
|
|||
class="flex-1"
|
||||
:placeholder="t(model.placeholder || '')"
|
||||
:options="model.options"
|
||||
:disabled="model.disabled"
|
||||
:field-names="model.filedNames"
|
||||
@change="emit('change')"
|
||||
/>
|
||||
|
@ -139,6 +144,7 @@
|
|||
:placeholder="t(child.placeholder || '')"
|
||||
:max-length="child.maxLength || 255"
|
||||
allow-clear
|
||||
:disabled="child.disabled"
|
||||
@change="emit('change')"
|
||||
/>
|
||||
<a-select
|
||||
|
@ -147,6 +153,7 @@
|
|||
:class="child.className"
|
||||
:placeholder="t(child.placeholder || '')"
|
||||
:options="child.options"
|
||||
:disabled="child.disabled"
|
||||
:field-names="child.filedNames"
|
||||
@change="emit('change')"
|
||||
/>
|
||||
|
@ -155,6 +162,7 @@
|
|||
v-model="element[child.field]"
|
||||
type="textarea"
|
||||
:class="child.className"
|
||||
:disabled="child.disabled"
|
||||
:placeholder="t(child.placeholder || '')"
|
||||
:max-length="child.maxLength || 255"
|
||||
:title="child.title"
|
||||
|
|
|
@ -26,5 +26,6 @@ export interface FormItemModel {
|
|||
defaultValue?: string | string[] | number | number[] | boolean; // 默认值
|
||||
hasRedStar?: boolean; // 是否有红星
|
||||
tooltip?: string;
|
||||
disabled?: boolean;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<a-divider direction="vertical" :margin="4" class="!mx-2"></a-divider>
|
||||
<template #content>
|
||||
<div class="max-w-[400px] items-center gap-[8px] text-[14px]">
|
||||
<div class="text-[var(--color-text-4)]">{{ t('project.taskCenter.resourcePool') }}</div>
|
||||
<div class="mb-[4px] text-[var(--color-text-4)]">{{ t('report.detail.api.resourcePool') }}</div>
|
||||
<div> {{ props.detail.poolName || '-' }}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -75,4 +75,5 @@ export default {
|
|||
'report.detail.api.scenarioSavedEnv': 'Scenario saved environment',
|
||||
'report.detail.api.noResponseContent': 'There is no response',
|
||||
'report.detail.api.placeHolderName': 'To search by name',
|
||||
'report.detail.api.resourcePool': 'Resource pool',
|
||||
};
|
||||
|
|
|
@ -73,4 +73,5 @@ export default {
|
|||
'report.detail.api.scenarioSavedEnv': '场景保存的环境',
|
||||
'report.detail.api.noResponseContent': '暂无响应内容',
|
||||
'report.detail.api.placeHolderName': '通过名称搜索',
|
||||
'report.detail.api.resourcePool': '资源池',
|
||||
};
|
||||
|
|
|
@ -64,7 +64,9 @@
|
|||
<template #result="{ record }">
|
||||
<ExecutionStatus v-if="record.result !== '-'" :status="record.result" :module-type="ReportEnum.API_REPORT" />
|
||||
</template>
|
||||
|
||||
<template #triggerMode="{ record }">
|
||||
{{ t(executeMethodMap[record.triggerMode]) }}
|
||||
</template>
|
||||
<template #[FilterSlotNameEnum.API_TEST_CASE_API_REPORT_STATUS]="{ filterContent }">
|
||||
<ExecutionStatus :module-type="ReportEnum.API_REPORT" :status="filterContent.value" />
|
||||
</template>
|
||||
|
@ -98,6 +100,8 @@
|
|||
import { TableKeyEnum } from '@/enums/tableEnum';
|
||||
import { FilterSlotNameEnum } from '@/enums/tableFilterEnum';
|
||||
|
||||
import { executeMethodMap } from '@/views/taskCenter/component/config';
|
||||
|
||||
const { t } = useI18n();
|
||||
const tableStore = useTableStore();
|
||||
|
||||
|
@ -160,15 +164,37 @@
|
|||
options: ExecStatusList.value,
|
||||
filterSlotName: FilterSlotNameEnum.TEST_PLAN_REPORT_EXEC_STATUS,
|
||||
},
|
||||
sortable: {
|
||||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showInTable: true,
|
||||
width: 200,
|
||||
width: 120,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'ms.taskCenter.executeMethod',
|
||||
dataIndex: 'triggerMode',
|
||||
slotName: 'triggerMode',
|
||||
width: 120,
|
||||
filterConfig: {
|
||||
options: Object.keys(executeMethodMap).map((key) => ({
|
||||
label: t(executeMethodMap[key]),
|
||||
value: key,
|
||||
})),
|
||||
filterSlotName: FilterSlotNameEnum.GLOBAL_TASK_CENTER_EXEC_METHOD,
|
||||
},
|
||||
sortable: {
|
||||
sortDirections: ['ascend', 'descend'],
|
||||
sorter: true,
|
||||
},
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
title: 'common.executionResult',
|
||||
slotName: 'result',
|
||||
dataIndex: 'result',
|
||||
width: 200,
|
||||
width: 120,
|
||||
filterConfig: {
|
||||
options: statusList.value,
|
||||
filterSlotName: FilterSlotNameEnum.API_TEST_CASE_API_REPORT_STATUS,
|
||||
|
|
|
@ -636,6 +636,7 @@
|
|||
max: maxConcurrentNumber.value,
|
||||
tooltip: licenseStore.hasLicense() ? '' : t('system.resourcePool.concurrentNumberMinToolTip'),
|
||||
defaultValue: 10,
|
||||
disabled: !licenseStore.hasLicense(),
|
||||
},
|
||||
{
|
||||
field: 'singleTaskConcurrentNumber',
|
||||
|
@ -656,6 +657,7 @@
|
|||
max: maxSingleTaskConcurrentNumber.value,
|
||||
tooltip: licenseStore.hasLicense() ? '' : t('system.resourcePool.singleConcurrentNumberMinToolTip'),
|
||||
defaultValue: 3,
|
||||
disabled: !licenseStore.hasLicense(),
|
||||
},
|
||||
]);
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
import type { Description } from '@/components/pure/ms-description/index.vue';
|
||||
import MsDrawer from '@/components/pure/ms-drawer/index.vue';
|
||||
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
|
||||
import type { MsTableColumn } from '@/components/pure/ms-table/type';
|
||||
import type { MsTableColumn, MsTableColumnFilterConfig } from '@/components/pure/ms-table/type';
|
||||
import useTable from '@/components/pure/ms-table/useTable';
|
||||
import MsTag, { TagType, Theme } from '@/components/pure/ms-tag/ms-tag.vue';
|
||||
import MsTrialAlert from '@/components/business/ms-trial-alert/index.vue';
|
||||
|
@ -151,6 +151,7 @@
|
|||
|
||||
import type { ResourcePoolDetail, ResourcePoolItem } from '@/models/setting/resourcePool';
|
||||
import { TableKeyEnum } from '@/enums/tableEnum';
|
||||
import { FilterRemoteMethodsEnum } from '@/enums/tableFilterEnum';
|
||||
|
||||
const licenseStore = useLicenseStore();
|
||||
const { t } = useI18n();
|
||||
|
@ -160,6 +161,19 @@
|
|||
const hasOperationPoolPermission = computed(() =>
|
||||
hasAnyPermission(['SYSTEM_TEST_RESOURCE_POOL:READ+UPDATE', 'SYSTEM_TEST_RESOURCE_POOL:READ+DELETE'])
|
||||
);
|
||||
|
||||
const filterConfig = computed<MsTableColumnFilterConfig>(() => {
|
||||
if (licenseStore.hasLicense()) {
|
||||
return {
|
||||
mode: 'remote',
|
||||
remoteMethod: FilterRemoteMethodsEnum.SYSTEM_ORGANIZATION_LIST,
|
||||
placeholderText: t('common.pleaseSelect'),
|
||||
};
|
||||
}
|
||||
return {
|
||||
options: [],
|
||||
};
|
||||
});
|
||||
const columns: MsTableColumn = [
|
||||
{
|
||||
title: 'system.resourcePool.tableColumnName',
|
||||
|
@ -186,6 +200,7 @@
|
|||
showInTable: true,
|
||||
showDrag: true,
|
||||
isTag: true,
|
||||
filterConfig: filterConfig.value,
|
||||
isStringTag: true,
|
||||
tagPrimary: 'default',
|
||||
},
|
||||
|
@ -197,6 +212,18 @@
|
|||
{
|
||||
title: 'system.resourcePool.tableColumnType',
|
||||
dataIndex: 'type',
|
||||
filterConfig: {
|
||||
options: [
|
||||
{
|
||||
value: 'Node',
|
||||
label: 'Node',
|
||||
},
|
||||
{
|
||||
value: 'Kubernetes',
|
||||
label: 'Kubernetes',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'system.resourcePool.tableColumnCreateTime',
|
||||
|
|
Loading…
Reference in New Issue