From a574f5f3690a73759b54f09d1c3ac76ef9354ce5 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Fri, 11 Aug 2023 18:01:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=88=E6=9D=83=E7=AE=A1=E7=90=86=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=8C=BA=E5=9F=9F=E8=87=AA=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/modules/setting/serviceIntegration.ts | 42 +++++++++++++++++++ .../api/requrls/setting/serviceIntegration.ts | 8 ++++ .../serviceIntegration/locale/en-US.ts | 5 ++- .../serviceIntegration/locale/zh-CN.ts | 5 ++- .../system/authorizedManagement/index.vue | 8 ++-- 5 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 frontend/src/api/modules/setting/serviceIntegration.ts create mode 100644 frontend/src/api/requrls/setting/serviceIntegration.ts diff --git a/frontend/src/api/modules/setting/serviceIntegration.ts b/frontend/src/api/modules/setting/serviceIntegration.ts new file mode 100644 index 0000000000..aa9f36892d --- /dev/null +++ b/frontend/src/api/modules/setting/serviceIntegration.ts @@ -0,0 +1,42 @@ +import MSR from '@/api/http/index'; +import { + GetServiceListUrl, + AddServiceUrl, + UpdateServiceUrl, + ResetServiceUrl, + GetValidateServiceUrl, + PostValidateServiceUrl, + ConfigServiceScriptUrl, + getLogoUrl, +} from '@/api/requrls/setting/serviceIntegration'; +import type { ServiceList, AddOrUpdateServiceModel } from '@/models/setting/serviceIntegration'; +// 获取集成列表 +export function getServiceList(organizationId: string) { + return MSR.get({ url: GetServiceListUrl, params: organizationId }); +} +// 创建或更新服务集成 +export function addOrUpdate(data: AddOrUpdateServiceModel, type: string) { + if (type === 'create') { + return MSR.post({ url: AddServiceUrl, data }); + } + return MSR.post({ url: UpdateServiceUrl, data }); +} +// 重置到未配置 +export function resetService(id: string) { + return MSR.get({ url: ResetServiceUrl, params: id }); +} +// 外部校验测试连接 +export function getValidate(id: string) { + return MSR.get({ url: GetValidateServiceUrl, params: id }); +} +// 内部校验测试连接 注:不同的平台对应的不同的字段 +export function postValidate(data: any) { + return MSR.post({ url: PostValidateServiceUrl, data }); +} +// 前端配置脚本 +export function configScript(pluginId: string) { + return MSR.get({ url: ConfigServiceScriptUrl, params: pluginId }); +} +export function getLogo(pluginId: string) { + return MSR.get({ url: getLogoUrl, params: pluginId }); +} diff --git a/frontend/src/api/requrls/setting/serviceIntegration.ts b/frontend/src/api/requrls/setting/serviceIntegration.ts new file mode 100644 index 0000000000..cf39578f74 --- /dev/null +++ b/frontend/src/api/requrls/setting/serviceIntegration.ts @@ -0,0 +1,8 @@ +export const GetServiceListUrl = '/service/integration/list'; +export const AddServiceUrl = '/service/integration/add'; +export const UpdateServiceUrl = '/service/integration/update'; +export const ResetServiceUrl = '/service/integration/delete'; +export const GetValidateServiceUrl = '/service/integration/validate'; +export const PostValidateServiceUrl = '/service/integration/validate'; +export const ConfigServiceScriptUrl = '/service/integration/script/'; +export const getLogoUrl = '/plugin/image'; diff --git a/frontend/src/views/setting/organization/serviceIntegration/locale/en-US.ts b/frontend/src/views/setting/organization/serviceIntegration/locale/en-US.ts index 0134832d37..b3ac460f64 100644 --- a/frontend/src/views/setting/organization/serviceIntegration/locale/en-US.ts +++ b/frontend/src/views/setting/organization/serviceIntegration/locale/en-US.ts @@ -5,7 +5,7 @@ export default { 'system.service.statusDisableTip': 'Shutdown: the project can not integrate with the platform and the default template for the platform is not available', 'organization.service.headerTip': 'Service integration usage guidelines', - 'organization.service.serviceIntegration': 'Service Integration', + 'organization.service.integrationList': 'Integration of List', 'organization.service.packUp': 'Pack Up', 'organization.service.expand': 'Expand', 'organization.service.downloadPluginOrDev': 'Download plug-ins or develop plug-ins', @@ -18,13 +18,14 @@ export default { 'Downloaded or developed plug-ins need to be uploaded to plug-in management, upload, you can configure the current page', 'organization.service.jumpPlugin': 'JUMP to plug-in management', 'organization.service.testLink': 'Test link', + 'organization.service.testLinkStatusTip': 'Test connection successful!', 'organization.service.unconfigured': 'Unconfigured', 'organization.service.configured': 'Configured', 'organization.service.methodOfAuthentication': 'Method of authentication', 'organization.service.edit': 'Edit', 'organization.service.reset': 'Reset', 'organization.service.unconfiguredTip': 'Not configured yet. Configure and open on the edit page', - 'organization.service.batchActionAddUsergroup': 'Add to usergroup', + 'organization.service.resetConfigTip': 'Reset Successfully !', 'organization.service.tableEnable': 'Enabled', 'organization.service.tableDisable': 'Disabled', 'organization.service.tableColunmEmail': 'Email', diff --git a/frontend/src/views/setting/organization/serviceIntegration/locale/zh-CN.ts b/frontend/src/views/setting/organization/serviceIntegration/locale/zh-CN.ts index d1c413d3ef..00a8444873 100644 --- a/frontend/src/views/setting/organization/serviceIntegration/locale/zh-CN.ts +++ b/frontend/src/views/setting/organization/serviceIntegration/locale/zh-CN.ts @@ -3,7 +3,7 @@ export default { 'organization.service.statusEnableTip': '开启:项目可以与该平台集成并生成该平台的默认模版', 'organization.service.statusDisableTip': '关闭:项目无法与该平台集成且该平台默认模版不可用', 'organization.service.headerTip': '服务集成 使用指引', - 'organization.service.serviceIntegration': '服务集成', + 'organization.service.integrationList': '集成列表', 'organization.service.packUp': '收起', 'organization.service.expand': '展开', 'organization.service.downloadPluginOrDev': '下载插件或开发插件', @@ -14,13 +14,14 @@ export default { 'organization.service.configDescription': '已下载或已开发的插件需上传至插件管理,上传后,可在当前页进行配置', 'organization.service.jumpPlugin': '跳转至插件管理', 'organization.service.testLink': '测试连接', + 'organization.service.testLinkStatusTip': '测试连接成功!', 'organization.service.unconfigured': '未配置', 'organization.service.configured': '已配置', 'organization.service.methodOfAuthentication': '认证方式', 'organization.service.edit': '编辑', 'organization.service.reset': '重置', 'organization.service.unconfiguredTip': '暂未配置,可在编辑页配置并开启', - 'organization.service.batchActionAddUsergroup': '添加至用户组', + 'organization.service.resetConfigTip': '重置成功!', 'organization.service.tableEnable': '正常', 'organization.service.tableDisable': '禁用', 'organization.service.tableColunmEmail': '邮箱', diff --git a/frontend/src/views/setting/system/authorizedManagement/index.vue b/frontend/src/views/setting/system/authorizedManagement/index.vue index 4a748ef3f0..039a0e7546 100644 --- a/frontend/src/views/setting/system/authorizedManagement/index.vue +++ b/frontend/src/views/setting/system/authorizedManagement/index.vue @@ -58,9 +58,7 @@ >
  • - {{ - t('system.authorized.authorityChecking') - }} + {{ t('system.authorized.authorityChecking') }}
  • @@ -95,6 +93,9 @@ v-model="authorizedForm.licenseCode" class="mt-4" :placeholder="t('system.authorized.licenseCode')" + :auto-size="{ + minRows: 3, + }" :rules="[{ required: true }]" > @@ -112,6 +113,7 @@ import MsDrawer from '@/components/pure/ms-drawer/index.vue'; import MsUpload from '@/components/pure/ms-upload/index.vue'; import { FormInstance, Message, ValidatedError } from '@arco-design/web-vue'; + import MsButton from '@/components/pure/ms-button/index.vue'; import { useI18n } from '@/hooks/useI18n'; const { t } = useI18n();