feat: add WeCom Bot configuration support in application settings
This commit is contained in:
parent
6279c9bc3e
commit
8ee9bc04eb
@ -161,6 +161,8 @@ export default {
|
|||||||
title: 'APP Access',
|
title: 'APP Access',
|
||||||
wecom: 'WeCom',
|
wecom: 'WeCom',
|
||||||
wecomTip: 'Create WeCom intelligent APP',
|
wecomTip: 'Create WeCom intelligent APP',
|
||||||
|
wecomBot: 'WeCom Bot',
|
||||||
|
wecomBotTip: 'Create WeCom intelligent Bot',
|
||||||
dingtalk: 'DingTalk',
|
dingtalk: 'DingTalk',
|
||||||
dingtalkTip: 'Create DingTalk intelligent APP',
|
dingtalkTip: 'Create DingTalk intelligent APP',
|
||||||
wechat: 'WeChat',
|
wechat: 'WeChat',
|
||||||
@ -208,6 +210,10 @@ export default {
|
|||||||
urlInfo:
|
urlInfo:
|
||||||
'-Settings and Development-Basic Configuration-"Server Address URL" in server configuration',
|
'-Settings and Development-Basic Configuration-"Server Address URL" in server configuration',
|
||||||
},
|
},
|
||||||
|
wecomBotSetting: {
|
||||||
|
title: 'WeCom Bot Configuration',
|
||||||
|
urlInfo: '-Security and Management-Management Tools-Intelligent Bots-API Mode',
|
||||||
|
},
|
||||||
larkSetting: {
|
larkSetting: {
|
||||||
title: 'Lark Configuration',
|
title: 'Lark Configuration',
|
||||||
appIdPlaceholder: 'Please enter APP ID',
|
appIdPlaceholder: 'Please enter APP ID',
|
||||||
|
|||||||
@ -150,6 +150,8 @@ export default {
|
|||||||
title: '应用接入',
|
title: '应用接入',
|
||||||
wecom: '企业微信应用',
|
wecom: '企业微信应用',
|
||||||
wecomTip: '打造企业微信智能应用',
|
wecomTip: '打造企业微信智能应用',
|
||||||
|
wecomBot: '企业微信智能机器人',
|
||||||
|
wecomBotTip: '打造企业微信智能机器人应用',
|
||||||
dingtalk: '钉钉应用',
|
dingtalk: '钉钉应用',
|
||||||
dingtalkTip: '打造钉钉智能应用',
|
dingtalkTip: '打造钉钉智能应用',
|
||||||
wechat: '公众号',
|
wechat: '公众号',
|
||||||
@ -176,6 +178,10 @@ export default {
|
|||||||
authenticationSuccessful: '认证成功',
|
authenticationSuccessful: '认证成功',
|
||||||
urlInfo: '-应用管理-自建-创建的应用-接收消息-设置 API 接收的 "URL" 中',
|
urlInfo: '-应用管理-自建-创建的应用-接收消息-设置 API 接收的 "URL" 中',
|
||||||
},
|
},
|
||||||
|
wecomBotSetting: {
|
||||||
|
title: '企业微信应用配置',
|
||||||
|
urlInfo: '-安全与管理-管理工具-智能机器人- API 模式创建的 "URL" 中',
|
||||||
|
},
|
||||||
dingtalkSetting: {
|
dingtalkSetting: {
|
||||||
title: '钉钉应用配置',
|
title: '钉钉应用配置',
|
||||||
clientIdPlaceholder: '请输入Client ID',
|
clientIdPlaceholder: '请输入Client ID',
|
||||||
|
|||||||
@ -153,6 +153,8 @@ export default {
|
|||||||
wecomTip: '打造企業微信智慧應用',
|
wecomTip: '打造企業微信智慧應用',
|
||||||
dingtalk: '釘釘應用',
|
dingtalk: '釘釘應用',
|
||||||
dingtalkTip: '打造釘釘智慧應用',
|
dingtalkTip: '打造釘釘智慧應用',
|
||||||
|
wecomBot: '企業微信智能機器人',
|
||||||
|
wecomBotTip: '打造企業微信智能機器人',
|
||||||
wechat: '公眾號',
|
wechat: '公眾號',
|
||||||
wechatTip: '打造公眾號智慧應用',
|
wechatTip: '打造公眾號智慧應用',
|
||||||
lark: '飛書應用',
|
lark: '飛書應用',
|
||||||
@ -201,6 +203,10 @@ export default {
|
|||||||
appSecretPlaceholder: '請輸入App Secret',
|
appSecretPlaceholder: '請輸入App Secret',
|
||||||
verificationTokenPlaceholder: '請輸入Verification Token',
|
verificationTokenPlaceholder: '請輸入Verification Token',
|
||||||
urlInfo: '-事件與回呼-事件配置-配置訂閱方式的 "請求位址" 中',
|
urlInfo: '-事件與回呼-事件配置-配置訂閱方式的 "請求位址" 中',
|
||||||
|
},
|
||||||
|
wecomBotSetting: {
|
||||||
|
title: '企業微信機器人配置',
|
||||||
|
urlInfo: '-安全與管理-管理工具-智能機器人- API 模式建立的 "URL" 中',
|
||||||
},
|
},
|
||||||
slackSetting: {
|
slackSetting: {
|
||||||
title: 'Slack 應用配置',
|
title: 'Slack 應用配置',
|
||||||
|
|||||||
@ -109,6 +109,14 @@ const platforms = reactive([
|
|||||||
isActive: false,
|
isActive: false,
|
||||||
exists: false,
|
exists: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'wecomBot',
|
||||||
|
logoSrc: new URL(`../../assets/logo/logo_wechat-work.svg`, import.meta.url).href,
|
||||||
|
name: t('views.application.applicationAccess.wecomBot'),
|
||||||
|
description: t('views.application.applicationAccess.wecomBotTip'),
|
||||||
|
isActive: false,
|
||||||
|
exists: false,
|
||||||
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const AccessSettingDrawerRef = ref()
|
const AccessSettingDrawerRef = ref()
|
||||||
|
|||||||
@ -106,7 +106,8 @@ import { MsgError, MsgSuccess } from '@/utils/message'
|
|||||||
import {copyClick} from '@/utils/clipboard'
|
import {copyClick} from '@/utils/clipboard'
|
||||||
import {t} from '@/locales'
|
import {t} from '@/locales'
|
||||||
import {loadSharedApi} from '@/utils/dynamics-api/shared-api'
|
import {loadSharedApi} from '@/utils/dynamics-api/shared-api'
|
||||||
type PlatformType = 'wechat' | 'dingtalk' | 'wecom' | 'lark' | 'slack'
|
|
||||||
|
type PlatformType = 'wechat' | 'dingtalk' | 'wecom' | 'lark' | 'slack' | 'wecomBot'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
@ -147,6 +148,11 @@ const form = reactive<any>({
|
|||||||
},
|
},
|
||||||
lark: {app_id: '', app_secret: '', verification_token: '', callback_url: ''},
|
lark: {app_id: '', app_secret: '', verification_token: '', callback_url: ''},
|
||||||
slack: {signing_secret: '', bot_user_token: '', callback_url: ''},
|
slack: {signing_secret: '', bot_user_token: '', callback_url: ''},
|
||||||
|
wecomBot: {
|
||||||
|
token: '',
|
||||||
|
encoding_aes_key: '',
|
||||||
|
callback_url: '',
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const rules = reactive<{ [propName: string]: any }>({
|
const rules = reactive<{ [propName: string]: any }>({
|
||||||
@ -272,6 +278,22 @@ const rules = reactive<{ [propName: string]: any }>({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
wecomBot: {
|
||||||
|
token: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: t('views.application.applicationAccess.wecomSetting.tokenPlaceholder'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
encoding_aes_key: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: t('views.application.applicationAccess.wecomSetting.encodingAesKeyPlaceholder'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const configFields: { [propName: string]: { [propName: string]: any } } = {
|
const configFields: { [propName: string]: { [propName: string]: any } } = {
|
||||||
@ -304,6 +326,10 @@ const configFields: { [propName: string]: { [propName: string]: any } } = {
|
|||||||
token: {label: 'Token', placeholder: ''},
|
token: {label: 'Token', placeholder: ''},
|
||||||
encoding_aes_key: {label: 'EncodingAESKey', placeholder: ''},
|
encoding_aes_key: {label: 'EncodingAESKey', placeholder: ''},
|
||||||
},
|
},
|
||||||
|
wecomBot: {
|
||||||
|
token: {label: 'Token', placeholder: ''},
|
||||||
|
encoding_aes_key: {label: 'EncodingAESKey', placeholder: ''},
|
||||||
|
},
|
||||||
lark: {
|
lark: {
|
||||||
app_id: {label: 'App ID', placeholder: ''},
|
app_id: {label: 'App ID', placeholder: ''},
|
||||||
app_secret: {label: 'App Secret', placeholder: ''},
|
app_secret: {label: 'App Secret', placeholder: ''},
|
||||||
@ -331,6 +357,7 @@ const drawerTitle = computed(
|
|||||||
wecom: t('views.application.applicationAccess.wecomSetting.title'),
|
wecom: t('views.application.applicationAccess.wecomSetting.title'),
|
||||||
lark: t('views.application.applicationAccess.larkSetting.title'),
|
lark: t('views.application.applicationAccess.larkSetting.title'),
|
||||||
slack: t('views.application.applicationAccess.slackSetting.title'),
|
slack: t('views.application.applicationAccess.slackSetting.title'),
|
||||||
|
wecomBot: t('views.application.applicationAccess.wecomBotSetting.title'),
|
||||||
})[configType.value],
|
})[configType.value],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -342,6 +369,7 @@ const infoTitle = computed(
|
|||||||
wecom: t('views.applicationOverview.appInfo.header'),
|
wecom: t('views.applicationOverview.appInfo.header'),
|
||||||
lark: t('views.applicationOverview.appInfo.header'),
|
lark: t('views.applicationOverview.appInfo.header'),
|
||||||
slack: t('views.applicationOverview.appInfo.header'),
|
slack: t('views.applicationOverview.appInfo.header'),
|
||||||
|
wecomBot: t('views.applicationOverview.appInfo.header'),
|
||||||
})[configType.value],
|
})[configType.value],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user