feat(组织): 服务集成-TAPD配置申请账号链接
This commit is contained in:
parent
a6fb585a66
commit
3083644638
|
@ -7,7 +7,18 @@
|
|||
:cancel-text="t('organization.member.Cancel')"
|
||||
unmount-on-close
|
||||
>
|
||||
<template #title> {{ title }} </template>
|
||||
<template #title>
|
||||
<div class="relative flex w-full items-center justify-between">
|
||||
{{ title }}
|
||||
<div
|
||||
v-if="pluginId.toLowerCase().includes('tapd')"
|
||||
class="absolute bottom-[-40px] right-0 z-10 cursor-pointer text-[#0D68FF] underline"
|
||||
@click="openTapd"
|
||||
>
|
||||
{{ t('organization.service.applyTapdAccount') }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="wrapper">
|
||||
<MsFormCreate v-model:api="fApi" v-model:form-item="formItemList" :form-rule="formRules" :option="options">
|
||||
</MsFormCreate>
|
||||
|
@ -18,28 +29,32 @@
|
|||
<a-switch v-model="isEnable" :disabled="isDisabled" size="small" type="line" />
|
||||
<a-tooltip>
|
||||
<template #content>
|
||||
<div class="text-sm">{{
|
||||
pluginId === 'jira'
|
||||
? t('organization.service.statusJiraEnableTip')
|
||||
: t('organization.service.statusEnableTip')
|
||||
}}</div>
|
||||
<div class="text-sm">{{
|
||||
pluginId === 'jira'
|
||||
? t('organization.service.statusJiraDisableTip')
|
||||
: t('organization.service.statusDisableTip')
|
||||
}}</div>
|
||||
<div class="text-sm">
|
||||
{{
|
||||
pluginId === 'jira'
|
||||
? t('organization.service.statusJiraEnableTip')
|
||||
: t('organization.service.statusEnableTip')
|
||||
}}
|
||||
</div>
|
||||
<div class="text-sm">
|
||||
{{
|
||||
pluginId === 'jira'
|
||||
? t('organization.service.statusJiraDisableTip')
|
||||
: t('organization.service.statusDisableTip')
|
||||
}}
|
||||
</div>
|
||||
</template>
|
||||
<icon-question-circle class="ml-2 text-[--color-text-4]" />
|
||||
</a-tooltip>
|
||||
</div>
|
||||
<div>
|
||||
<a-button type="secondary" @click="handleCancel">{{ t('organization.service.Cancel') }}</a-button>
|
||||
<a-button class="ml-[12px]" type="outline" :loading="testLoading" @click="testLink">{{
|
||||
t('organization.service.testLink')
|
||||
}}</a-button>
|
||||
<a-button class="ml-[12px]" type="primary" :loading="loading" @click="saveHandler">{{
|
||||
t('organization.service.Confirm')
|
||||
}}</a-button>
|
||||
<a-button class="ml-[12px]" type="outline" :loading="testLoading" @click="testLink">
|
||||
{{ t('organization.service.testLink') }}
|
||||
</a-button>
|
||||
<a-button class="ml-[12px]" type="primary" :loading="loading" @click="saveHandler">
|
||||
{{ t('organization.service.Confirm') }}
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -174,7 +189,7 @@
|
|||
// 测试连接是否通过
|
||||
const testLink = async () => {
|
||||
testLoading.value = true;
|
||||
fApi.value?.validate(async (valid: any, fail: any) => {
|
||||
fApi.value?.validate(async (valid: any) => {
|
||||
if (valid === true) {
|
||||
try {
|
||||
const formValue = {
|
||||
|
@ -189,7 +204,6 @@
|
|||
testLoading.value = false;
|
||||
}
|
||||
} else {
|
||||
console.log(fail);
|
||||
testLoading.value = false;
|
||||
}
|
||||
});
|
||||
|
@ -205,6 +219,11 @@
|
|||
formItem.value = { ...serviceItem };
|
||||
getPluginScript(pluginId.value);
|
||||
};
|
||||
|
||||
function openTapd() {
|
||||
window.open('https://jsj.top/f/Lpk1sh');
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
addOrEdit,
|
||||
title,
|
||||
|
|
|
@ -131,7 +131,6 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { onBeforeMount, ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import MsCard from '@/components/pure/ms-card/index.vue';
|
||||
import ConfigModal from './configModal.vue';
|
||||
|
@ -149,7 +148,6 @@
|
|||
|
||||
const { t } = useI18n();
|
||||
const { openModal } = useModal();
|
||||
const router = useRouter();
|
||||
|
||||
const appStore = useAppStore();
|
||||
const lastOrganizationId = appStore.currentOrgId;
|
||||
|
|
|
@ -78,15 +78,12 @@
|
|||
import ServiceList from './components/serviceList.vue';
|
||||
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useUserStore from '@/store/modules/user/index';
|
||||
import { openWindow } from '@/utils/index';
|
||||
import { hasAnyPermission } from '@/utils/permission';
|
||||
|
||||
import type { SkipTitle, StepListType } from '@/models/setting/serviceIntegration';
|
||||
import { SettingRouteEnum } from '@/enums/routeEnum';
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
const isHasSystemPermission = computed(() => {
|
||||
return hasAnyPermission(['SYSTEM_PLUGIN:READ']);
|
||||
});
|
||||
|
|
|
@ -53,4 +53,5 @@ export default {
|
|||
'organization.service.configSuccess': 'Configuration successfully',
|
||||
'organization.service.updateSuccess': 'Update successfully',
|
||||
'organization.service.noPermissionsTip': 'You do not have operation permission, please contact the administrator',
|
||||
'organization.service.applyTapdAccount': 'Apply to open a TAPD API account',
|
||||
};
|
||||
|
|
|
@ -48,4 +48,5 @@ export default {
|
|||
'organization.service.configSuccess': '配置成功',
|
||||
'organization.service.updateSuccess': '更新成功',
|
||||
'organization.service.noPermissionsTip': '您没有操作权限,请联系管理员',
|
||||
'organization.service.applyTapdAccount': '申请开通 TAPD 的 API 账号',
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue