mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-05 05:29:29 +08:00
fix(项目管理): 修改环境i18n
This commit is contained in:
parent
711d7ce005
commit
e3caf65b33
@ -39,7 +39,7 @@ export interface AssertionConfig {
|
||||
}
|
||||
export interface EnvConfig {
|
||||
commonParams?: EnvConfigItem;
|
||||
commmonVariables: EnvConfigItem[];
|
||||
commonVariables: EnvConfigItem[];
|
||||
httpConfig: EnvConfigItem[];
|
||||
dataSources: DataSourceItem[];
|
||||
hostConfig: EnvConfigItem;
|
||||
|
@ -10,8 +10,8 @@ import { ContentTabItem, ContentTabsMap, EnvDetailItem, GlobalParams } from '@/m
|
||||
export const ALL_PARAM = 'allParam';
|
||||
export const NEW_ENV_PARAM = 'newEnvParam';
|
||||
export const NEW_ENV_GROUP = 'newEnvGroup';
|
||||
const envParmasDefaultConfig = {
|
||||
commmonVariables: [],
|
||||
const envParamsDefaultConfig = {
|
||||
commonVariables: [],
|
||||
httpConfig: [],
|
||||
dataSources: [],
|
||||
hostConfig: {
|
||||
@ -39,12 +39,12 @@ const useProjectEnvStore = defineStore(
|
||||
const currentEnvDetailInfo = ref<EnvDetailItem>({
|
||||
projectId: '',
|
||||
name: '',
|
||||
config: envParmasDefaultConfig,
|
||||
config: envParamsDefaultConfig,
|
||||
});
|
||||
const backupEnvDetailInfo = ref<EnvDetailItem>({
|
||||
projectId: '',
|
||||
name: '',
|
||||
config: envParmasDefaultConfig,
|
||||
config: envParamsDefaultConfig,
|
||||
});
|
||||
const allParamDetailInfo = ref<GlobalParams>(); // 全局参数详情
|
||||
const httpNoWarning = ref(true);
|
||||
@ -75,12 +75,12 @@ const useProjectEnvStore = defineStore(
|
||||
currentEnvDetailInfo.value = {
|
||||
projectId: appStore.currentProjectId,
|
||||
name: '',
|
||||
config: envParmasDefaultConfig,
|
||||
config: envParamsDefaultConfig,
|
||||
};
|
||||
backupEnvDetailInfo.value = {
|
||||
projectId: appStore.currentProjectId,
|
||||
name: '',
|
||||
config: envParmasDefaultConfig,
|
||||
config: envParamsDefaultConfig,
|
||||
};
|
||||
} else if (id === ALL_PARAM) {
|
||||
allParamDetailInfo.value = await getGlobalParamDetail(appStore.currentProjectId);
|
||||
|
@ -58,7 +58,7 @@
|
||||
const { t } = useI18n();
|
||||
|
||||
const innerParams = useVModel(props, 'params', emit);
|
||||
const backupParmas = ref(props.params);
|
||||
const backupParams = ref(props.params);
|
||||
const firstSearch = ref(true);
|
||||
|
||||
const defaultParamItem = {
|
||||
@ -84,6 +84,7 @@
|
||||
slotName: 'paramType',
|
||||
showInTable: true,
|
||||
showDrag: true,
|
||||
hasRequired: true,
|
||||
columnSelectorDisabled: true,
|
||||
typeOptions: [
|
||||
{
|
||||
@ -155,13 +156,13 @@
|
||||
|
||||
function handleSearch() {
|
||||
if (firstSearch.value) {
|
||||
backupParmas.value = [...innerParams.value];
|
||||
backupParams.value = [...innerParams.value];
|
||||
firstSearch.value = false;
|
||||
}
|
||||
if (!searchValue.value) {
|
||||
innerParams.value = [...backupParmas.value];
|
||||
innerParams.value = [...backupParams.value];
|
||||
} else {
|
||||
const result = backupParmas.value.filter((item) => item.key.includes(searchValue.value));
|
||||
const result = backupParams.value.filter((item) => item.key.includes(searchValue.value));
|
||||
innerParams.value = [...result];
|
||||
}
|
||||
}
|
||||
|
@ -13,9 +13,9 @@
|
||||
|
||||
const allParams = computed({
|
||||
set: (value: any) => {
|
||||
store.currentEnvDetailInfo.config.commmonVariables = value;
|
||||
store.currentEnvDetailInfo.config.commonVariables = value;
|
||||
},
|
||||
get: () => store.currentEnvDetailInfo.config.commmonVariables || [],
|
||||
get: () => store.currentEnvDetailInfo.config.commonVariables || [],
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -90,12 +90,6 @@
|
||||
showDrag: true,
|
||||
showInTable: true,
|
||||
},
|
||||
{
|
||||
title: 'project.environmental.http.applyScope',
|
||||
dataIndex: 'applyScope',
|
||||
showDrag: true,
|
||||
showInTable: true,
|
||||
},
|
||||
{
|
||||
title: 'project.environmental.http.enableScope',
|
||||
dataIndex: 'enableScope',
|
||||
@ -130,8 +124,8 @@
|
||||
});
|
||||
|
||||
const form = reactive({
|
||||
linkOutTime: undefined,
|
||||
timeOutTime: undefined,
|
||||
linkOutTime: 60000,
|
||||
timeOutTime: 60000,
|
||||
authType: 'Basic Auth',
|
||||
});
|
||||
|
||||
|
@ -11,6 +11,7 @@ export default {
|
||||
'project.environmental.mustContain': 'Must Contain',
|
||||
'project.environmental.searchParamsHolder': 'Search by name or tag',
|
||||
'project.environmental.paramName': 'Parameter Name',
|
||||
'project.environmental.globalVariable': 'Parameter',
|
||||
'project.environmental.paramType': 'Type',
|
||||
'project.environmental.paramTypeTooltip': 'json: only supports UI testing',
|
||||
'project.environmental.paramValue': 'Parameter Value',
|
||||
|
@ -11,7 +11,7 @@ export default {
|
||||
'project.environmental.GLOBAL': '全局参数',
|
||||
'project.environmental.ENVIRONMENT': '全局参数',
|
||||
'project.environmental.ENVIRONMENT_PARAM': '全局参数',
|
||||
'project.environmental.globalVariable': '全局变量',
|
||||
'project.environmental.globalVariable': '参数',
|
||||
'project.environmental.supportFormat': '仅支持MeterSphere导出的Json文件,单个大小不超过 50M',
|
||||
'project.environmental.importTile': '注意!导入后会覆盖原全局参数',
|
||||
'project.environmental.mustContain': '必含',
|
||||
|
Loading…
Reference in New Issue
Block a user