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