mirror of
https://github.com/dataease/dataease.git
synced 2026-05-21 12:45:37 +08:00
Merge pull request #3417 from dataease/pr@dev@feat_larksuite
feat(平台对接): 飞书国际版
This commit is contained in:
@@ -121,6 +121,13 @@ export function larkStatus() {
|
||||
})
|
||||
}
|
||||
|
||||
export function larksuiteStatus() {
|
||||
return request({
|
||||
url: '/api/auth/isOpenLarksuite',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function pluginLoaded() {
|
||||
return request({
|
||||
url: '/api/auth/isPluginLoaded',
|
||||
|
||||
@@ -2361,7 +2361,8 @@ export default {
|
||||
channel_email_msg: 'Email',
|
||||
channel_wecom_msg: 'Wecom',
|
||||
channel_dingtalk_msg: 'Dingtalk',
|
||||
channel_lark_msg: 'Lark'
|
||||
channel_lark_msg: 'Lark',
|
||||
channel_larksuite_msg: 'Larksuite'
|
||||
},
|
||||
denumberrange: {
|
||||
label: 'Number range',
|
||||
@@ -2477,6 +2478,7 @@ export default {
|
||||
wecom: 'Wecom',
|
||||
dingtalk: 'Dingtalk',
|
||||
lark: 'Lark',
|
||||
larksuite: 'Larksuite',
|
||||
pixel: 'Pixel',
|
||||
default: 'Default',
|
||||
custom: 'Custom',
|
||||
|
||||
@@ -2362,7 +2362,8 @@ export default {
|
||||
channel_email_msg: '郵件提醒',
|
||||
channel_wecom_msg: '企業微信',
|
||||
channel_dingtalk_msg: '釘釘提醒',
|
||||
channel_lark_msg: '飛書提醒'
|
||||
channel_lark_msg: '飛書提醒',
|
||||
channel_larksuite_msg: '國際飛書'
|
||||
},
|
||||
denumberrange: {
|
||||
label: '數值區間',
|
||||
@@ -2478,6 +2479,7 @@ export default {
|
||||
wecom: '企業微信',
|
||||
dingtalk: '釘釘',
|
||||
lark: '飛書',
|
||||
larksuite: '國際飛書',
|
||||
pixel: '分辨率',
|
||||
default: '默認',
|
||||
custom: '自定義',
|
||||
|
||||
@@ -2362,7 +2362,8 @@ export default {
|
||||
channel_email_msg: '邮件提醒',
|
||||
channel_wecom_msg: '企业微信',
|
||||
channel_dingtalk_msg: '钉钉提醒',
|
||||
channel_lark_msg: '飞书提醒'
|
||||
channel_lark_msg: '飞书提醒',
|
||||
channel_larksuite_msg: '国际飞书'
|
||||
},
|
||||
denumberrange: {
|
||||
label: '数值区间',
|
||||
@@ -2478,6 +2479,7 @@ export default {
|
||||
wecom: '企业微信',
|
||||
dingtalk: '钉钉',
|
||||
lark: '飞书',
|
||||
larksuite: '国际飞书',
|
||||
pixel: '分辨率',
|
||||
default: '默认',
|
||||
custom: '自定义',
|
||||
|
||||
@@ -75,6 +75,11 @@
|
||||
:label="2"
|
||||
size="mini"
|
||||
>OIDC</el-radio>
|
||||
<el-radio
|
||||
v-if="loginTypes.includes(7)"
|
||||
:label="7"
|
||||
size="mini"
|
||||
>Larksuite</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="username">
|
||||
@@ -187,6 +192,12 @@
|
||||
component-name="SSOComponent"
|
||||
/>
|
||||
|
||||
<plugin-com
|
||||
v-if="loginTypes.includes(7) && loginForm.loginType === 7"
|
||||
ref="LarksuiteQr"
|
||||
component-name="LarksuiteQr"
|
||||
/>
|
||||
|
||||
</div>
|
||||
<div
|
||||
v-if="showFoot"
|
||||
@@ -199,7 +210,7 @@
|
||||
<script>
|
||||
|
||||
import { encrypt } from '@/utils/rsaEncrypt'
|
||||
import { ldapStatus, oidcStatus, getPublicKey, pluginLoaded, defaultLoginType, wecomStatus, dingtalkStatus, larkStatus } from '@/api/user'
|
||||
import { ldapStatus, oidcStatus, getPublicKey, pluginLoaded, defaultLoginType, wecomStatus, dingtalkStatus, larkStatus, larksuiteStatus } from '@/api/user'
|
||||
import { getSysUI } from '@/utils/auth'
|
||||
import { changeFavicon } from '@/utils/index'
|
||||
import { initTheme } from '@/utils/ThemeUtil'
|
||||
@@ -248,10 +259,10 @@ export default {
|
||||
return this.$store.state.user.loginMsg
|
||||
},
|
||||
qrTypes() {
|
||||
return this.loginTypes && this.loginTypes.filter(item => item > 3) || []
|
||||
return this.loginTypes && this.loginTypes.filter(item => item > 3 && item < 7) || []
|
||||
},
|
||||
radioTypes() {
|
||||
return this.loginTypes && this.loginTypes.filter(item => item < 4) || []
|
||||
return this.loginTypes && this.loginTypes.filter(item => item < 4 || item > 6) || []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -312,6 +323,13 @@ export default {
|
||||
this.setDefaultType()
|
||||
})
|
||||
|
||||
larksuiteStatus().then(res => {
|
||||
if (res.success && res.data) {
|
||||
this.loginTypes.push(7)
|
||||
}
|
||||
this.setDefaultType()
|
||||
})
|
||||
|
||||
getPublicKey().then(res => {
|
||||
if (res.success && res.data) {
|
||||
// 保存公钥
|
||||
@@ -391,6 +409,9 @@ export default {
|
||||
clearLarkMsg() {
|
||||
Cookies.remove('LarkError')
|
||||
},
|
||||
clearLarksuiteMsg() {
|
||||
Cookies.remove('LarksuiteError')
|
||||
},
|
||||
showLoginImage(uiInfo) {
|
||||
this.uiInfo = getSysUI()
|
||||
if (!this.uiInfo || Object.keys(this.uiInfo).length === 0) {
|
||||
@@ -427,6 +448,7 @@ export default {
|
||||
this.clearWecomMsg()
|
||||
this.clearDingtalkMsg()
|
||||
this.clearLarkMsg()
|
||||
this.clearLarksuiteMsg()
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
@@ -447,8 +469,9 @@ export default {
|
||||
})
|
||||
},
|
||||
changeLoginType(val) {
|
||||
if (val !== 2) return
|
||||
if (val !== 2 && val !== 7) return
|
||||
this.clearOidcMsg()
|
||||
this.clearLarksuiteMsg()
|
||||
this.$nextTick(() => {
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user