diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/PlatformPluginService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/PlatformPluginService.java index 2c653e4aa6..fbdf2154d8 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/PlatformPluginService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/PlatformPluginService.java @@ -4,6 +4,7 @@ import io.metersphere.plugin.platform.dto.request.PlatformRequest; import io.metersphere.plugin.platform.spi.Platform; import io.metersphere.sdk.constants.PluginScenarioType; import io.metersphere.sdk.exception.MSException; +import io.metersphere.sdk.util.Translator; import io.metersphere.system.domain.Plugin; import io.metersphere.system.domain.ServiceIntegration; import io.metersphere.system.domain.ServiceIntegrationExample; @@ -45,7 +46,7 @@ public class PlatformPluginService { public Platform getPlatform(String pluginId, String orgId) { ServiceIntegration serviceIntegration = getServiceIntegrationByPluginId(pluginId, orgId); if (serviceIntegration == null) { - throw new MSException("service_integration.configuration.not_blank"); + throw new MSException(Translator.get("service_integration.configuration.not_blank")); } return getPlatform(pluginId, orgId, new String(serviceIntegration.getConfiguration())); } diff --git a/frontend/src/components/business/ms-personal-drawer/components/tripartite.vue b/frontend/src/components/business/ms-personal-drawer/components/tripartite.vue index 8fac01d5ef..0707c2d860 100644 --- a/frontend/src/components/business/ms-personal-drawer/components/tripartite.vue +++ b/frontend/src/components/business/ms-personal-drawer/components/tripartite.vue @@ -38,7 +38,15 @@ :option="options" > - + + {{ t('ms.personal.save') }} + + {{ t('ms.personal.valid') }} @@ -217,6 +225,22 @@ }); } + async function saveNoValidate(config: any) { + config.validateLoading = true; + const configForms: Record = {}; + Object.keys(dynamicForm.value).forEach((key) => { + configForms[key] = { + ...dynamicForm.value[key].formModel.form, + }; + }); + await savePlatform({ + [currentOrg.value]: configForms, + }); + Message.success(t('ms.personal.validPass')); + config.validateLoading = false; + config.status = 1; + } + async function handleOrgChange() { await initPlatformAccountInfo(); initPlatformInfo(); diff --git a/frontend/src/components/business/ms-personal-drawer/locale/en-US.ts b/frontend/src/components/business/ms-personal-drawer/locale/en-US.ts index 9a3965c2ad..a392f10486 100644 --- a/frontend/src/components/business/ms-personal-drawer/locale/en-US.ts +++ b/frontend/src/components/business/ms-personal-drawer/locale/en-US.ts @@ -73,6 +73,7 @@ export default { 'ms.personal.validFail': 'Verification failed', 'ms.personal.unValid': 'Not verified', 'ms.personal.valid': 'Verify and save', + 'ms.personal.save': 'Save', 'ms.personal.authType': 'Authentication', 'ms.personal.platformAccount': 'Account', 'ms.personal.platformAccountPlaceholder': 'Please enter {type} account', diff --git a/frontend/src/components/business/ms-personal-drawer/locale/zh-CN.ts b/frontend/src/components/business/ms-personal-drawer/locale/zh-CN.ts index 9a89063cde..ec1cceb90d 100644 --- a/frontend/src/components/business/ms-personal-drawer/locale/zh-CN.ts +++ b/frontend/src/components/business/ms-personal-drawer/locale/zh-CN.ts @@ -67,6 +67,7 @@ export default { 'ms.personal.validFail': '校验失败', 'ms.personal.unValid': '未校验', 'ms.personal.valid': '校验并保存', + 'ms.personal.save': '保存', 'ms.personal.authType': '认证方式', 'ms.personal.platformAccount': '平台账号', 'ms.personal.platformAccountPlaceholder': '请输入 {type} 账号', diff --git a/frontend/src/views/bug-management/edit.vue b/frontend/src/views/bug-management/edit.vue index 8d3f0a7f0c..855249290c 100644 --- a/frontend/src/views/bug-management/edit.vue +++ b/frontend/src/views/bug-management/edit.vue @@ -413,6 +413,7 @@ // 处理表单格式 const getFormRules = (arr: BugEditCustomField[]) => { formRules.value = []; + console.log(arr); if (Array.isArray(arr) && arr.length) { formRules.value = arr.map((item: any) => { const initOptions = item.options || JSON.parse(item.platformOptionJson || '[]'); diff --git a/frontend/src/views/bug-management/utils.ts b/frontend/src/views/bug-management/utils.ts index 9588d9619a..b620382442 100644 --- a/frontend/src/views/bug-management/utils.ts +++ b/frontend/src/views/bug-management/utils.ts @@ -98,22 +98,23 @@ export function makeCustomFieldsParams(formItem: FormRuleItem[]) { // 设置成员默认值 export function getDefaultMemberValue(item: DetailCustomField, initOptions: FieldOptions[]) { - // 系统模板创建人 - if ((item.defaultValue as string | string[]).includes('CREATE_USER')) { - const optionsIds = initOptions.map((e: any) => e.value); - const userId = userStore.id as string; - if (optionsIds.includes(userId)) { - item.defaultValue = item.type === 'MEMBER' ? userId : [userId]; + if (item.defaultValue) { + // 系统模板创建人 + if ((item.defaultValue as string | string[]).includes('CREATE_USER')) { + const optionsIds = initOptions.map((e: any) => e.value); + const userId = userStore.id as string; + if (optionsIds.includes(userId)) { + item.defaultValue = item.type === 'MEMBER' ? userId : [userId]; + } else { + item.defaultValue = item.type === 'MEMBER' ? '' : []; + } + // 三方默认创建人 } else { - item.defaultValue = item.type === 'MEMBER' ? '' : []; + item.defaultValue = + item.type === 'MULTIPLE_MEMBER' && item.defaultValue && typeof item.defaultValue === 'string' + ? JSON.parse(item.defaultValue) + : item.defaultValue; } - // 三方默认创建人 - } else { - const value = - item.type === 'MULTIPLE_MEMBER' && item.defaultValue && typeof item.defaultValue === 'string' - ? JSON.parse(item.defaultValue) - : item.defaultValue; - item.defaultValue = value; } return item.defaultValue; }