refactor: ui
This commit is contained in:
parent
5dc51836ef
commit
62233b34c4
@ -90,7 +90,7 @@ const platforms = reactive([
|
|||||||
exists: false,
|
exists: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'feishu',
|
key: 'lark',
|
||||||
logoSrc: new URL(`../../assets/logo/logo_lark.svg`, import.meta.url).href,
|
logoSrc: new URL(`../../assets/logo/logo_lark.svg`, import.meta.url).href,
|
||||||
name: t('views.application.applicationAccess.lark'),
|
name: t('views.application.applicationAccess.lark'),
|
||||||
description: t('views.application.applicationAccess.larkTip'),
|
description: t('views.application.applicationAccess.larkTip'),
|
||||||
@ -143,7 +143,7 @@ function changeStatus(type: string, value: boolean) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// getPlatformStatus()
|
getPlatformStatus()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -77,7 +77,7 @@
|
|||||||
>{{ $t('views.application.applicationAccess.wecomPlatform') }}</a
|
>{{ $t('views.application.applicationAccess.wecomPlatform') }}</a
|
||||||
>{{ $t('views.application.applicationAccess.wecomSetting.urlInfo') }}
|
>{{ $t('views.application.applicationAccess.wecomSetting.urlInfo') }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text type="info" v-if="configType === 'feishu'">
|
<el-text type="info" v-if="configType === 'lark'">
|
||||||
{{ $t('views.application.applicationAccess.copyUrl') }}
|
{{ $t('views.application.applicationAccess.copyUrl') }}
|
||||||
<a class="primary" href="https://open.feishu.cn/app/" target="_blank">{{
|
<a class="primary" href="https://open.feishu.cn/app/" target="_blank">{{
|
||||||
$t('views.application.applicationAccess.larkPlatform')
|
$t('views.application.applicationAccess.larkPlatform')
|
||||||
@ -107,7 +107,7 @@ import { MsgError, MsgSuccess } from '@/utils/message'
|
|||||||
import { copyClick } from '@/utils/clipboard'
|
import { copyClick } from '@/utils/clipboard'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
|
|
||||||
type PlatformType = 'wechat' | 'dingtalk' | 'wecom' | 'feishu' | 'slack'
|
type PlatformType = 'wechat' | 'dingtalk' | 'wecom' | 'lark' | 'slack'
|
||||||
|
|
||||||
const formRef = ref<FormInstance>()
|
const formRef = ref<FormInstance>()
|
||||||
const visible = ref(false)
|
const visible = ref(false)
|
||||||
@ -138,7 +138,7 @@ const form = reactive<any>({
|
|||||||
encoding_aes_key: '',
|
encoding_aes_key: '',
|
||||||
callback_url: ''
|
callback_url: ''
|
||||||
},
|
},
|
||||||
feishu: { 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: '' }
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ const rules = reactive<{ [propName: string]: any }>({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
feishu: {
|
lark: {
|
||||||
app_id: [
|
app_id: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
@ -297,7 +297,7 @@ 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: '' }
|
||||||
},
|
},
|
||||||
feishu: {
|
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: '' },
|
||||||
verification_token: { label: 'Verification Token', placeholder: '' }
|
verification_token: { label: 'Verification Token', placeholder: '' }
|
||||||
@ -322,7 +322,7 @@ const drawerTitle = computed(
|
|||||||
wechat: t('views.application.applicationAccess.wechatSetting.title'),
|
wechat: t('views.application.applicationAccess.wechatSetting.title'),
|
||||||
dingtalk: t('views.application.applicationAccess.dingtalkSetting.title'),
|
dingtalk: t('views.application.applicationAccess.dingtalkSetting.title'),
|
||||||
wecom: t('views.application.applicationAccess.wecomSetting.title'),
|
wecom: t('views.application.applicationAccess.wecomSetting.title'),
|
||||||
feishu: 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')
|
||||||
}[configType.value])
|
}[configType.value])
|
||||||
)
|
)
|
||||||
@ -333,7 +333,7 @@ const infoTitle = computed(
|
|||||||
wechat: t('views.applicationOverview.appInfo.header'),
|
wechat: t('views.applicationOverview.appInfo.header'),
|
||||||
dingtalk: t('views.applicationOverview.appInfo.header'),
|
dingtalk: t('views.applicationOverview.appInfo.header'),
|
||||||
wecom: t('views.applicationOverview.appInfo.header'),
|
wecom: t('views.applicationOverview.appInfo.header'),
|
||||||
feishu: t('views.applicationOverview.appInfo.header'),
|
lark: t('views.applicationOverview.appInfo.header'),
|
||||||
slack: t('views.applicationOverview.appInfo.header')
|
slack: t('views.applicationOverview.appInfo.header')
|
||||||
}[configType.value])
|
}[configType.value])
|
||||||
)
|
)
|
||||||
|
|||||||
@ -303,6 +303,9 @@ function changeMode(val: string) {
|
|||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
if (chatUser.chat_profile?.login_value) {
|
if (chatUser.chat_profile?.login_value) {
|
||||||
modeList.value = chatUser.chat_profile.login_value
|
modeList.value = chatUser.chat_profile.login_value
|
||||||
|
if (modeList.value.includes('LOCAL')) {
|
||||||
|
modeList.value = ['LOCAL', ...modeList.value.filter((item) => item !== 'LOCAL')]
|
||||||
|
}
|
||||||
loginMode.value = modeList.value[0] || 'LOCAL'
|
loginMode.value = modeList.value[0] || 'LOCAL'
|
||||||
if (modeList.value.length == 1 && ['CAS', 'OIDC', 'OAuth2'].includes(modeList.value[0])) {
|
if (modeList.value.length == 1 && ['CAS', 'OIDC', 'OAuth2'].includes(modeList.value[0])) {
|
||||||
redirectAuth(modeList.value[0])
|
redirectAuth(modeList.value[0])
|
||||||
|
|||||||
@ -7,7 +7,9 @@
|
|||||||
<el-form-item :label="$t('views.chatUser.group.usernameOrName')" prop="user">
|
<el-form-item :label="$t('views.chatUser.group.usernameOrName')" prop="user">
|
||||||
<el-select v-model="form.user" multiple filterable
|
<el-select v-model="form.user" multiple filterable
|
||||||
:placeholder="$t('common.selectPlaceholder')"
|
:placeholder="$t('common.selectPlaceholder')"
|
||||||
:loading="optionLoading">
|
:loading="optionLoading"
|
||||||
|
:filter-method="filterUser"
|
||||||
|
>
|
||||||
<el-option v-for="item in chatUserList" :key="item.id" :label="item.nick_name"
|
<el-option v-for="item in chatUserList" :key="item.id" :label="item.nick_name"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
@ -58,6 +60,16 @@ async function getChatUserList() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const filterUser = (query: string, item: ChatUserItem) => {
|
||||||
|
if (!query) return true;
|
||||||
|
const q = query.toLowerCase();
|
||||||
|
return (
|
||||||
|
item.nick_name?.toLowerCase().includes(q) ||
|
||||||
|
item.username?.toLowerCase().includes(q) ||
|
||||||
|
false
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
getChatUserList()
|
getChatUserList()
|
||||||
})
|
})
|
||||||
|
|||||||
@ -37,6 +37,7 @@
|
|||||||
:placeholder="$t('common.search')"
|
:placeholder="$t('common.search')"
|
||||||
prefix-icon="Search"
|
prefix-icon="Search"
|
||||||
clearable
|
clearable
|
||||||
|
filterable
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<div class="flex-between mb-16">
|
<div class="flex-between mb-16">
|
||||||
<div class="flex align-center" v-if="hasPermission(EditionConst.IS_EE, 'OR')">
|
<div class="flex align-center"
|
||||||
|
v-if="hasPermission([EditionConst.IS_EE,EditionConst.IS_PE], 'OR')">
|
||||||
<!-- 企业版: 选优先级-->
|
<!-- 企业版: 选优先级-->
|
||||||
<span class="lighter mr-16">{{ $t('views.resourceAuthorization.priority.label') }}</span>
|
<span class="lighter mr-16">{{ $t('views.resourceAuthorization.priority.label') }}</span>
|
||||||
<el-radio-group v-model="radioRole">
|
<el-radio-group v-model="radioRole">
|
||||||
<el-radio :value="true" size="large">{{
|
<el-radio :value="true" size="large">{{
|
||||||
$t('views.resourceAuthorization.priority.role')
|
$t('views.resourceAuthorization.priority.role')
|
||||||
}}</el-radio>
|
}}
|
||||||
|
</el-radio>
|
||||||
<el-radio :value="false" size="large">{{ $t('common.custom') }}</el-radio>
|
<el-radio :value="false" size="large">{{ $t('common.custom') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
@ -16,7 +18,7 @@
|
|||||||
:placeholder="$t('common.search')"
|
:placeholder="$t('common.search')"
|
||||||
prefix-icon="Search"
|
prefix-icon="Search"
|
||||||
class="mt-4"
|
class="mt-4"
|
||||||
:class="hasPermission(EditionConst.IS_EE, 'OR') ? 'w-240' : ''"
|
:class="hasPermission([EditionConst.IS_EE,EditionConst.IS_PE], 'OR') ? 'w-240' : ''"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -177,6 +179,7 @@ import { isAppIcon } from '@/utils/common'
|
|||||||
import {EditionConst} from '@/utils/permission/data'
|
import {EditionConst} from '@/utils/permission/data'
|
||||||
import {hasPermission} from '@/utils/permission/index'
|
import {hasPermission} from '@/utils/permission/index'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
|
|
||||||
const {model} = useStore()
|
const {model} = useStore()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
@ -234,6 +237,7 @@ function checkedOperateChange(Name: string | number, row: any, e: boolean) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const provider_list = ref<Array<Provider>>([])
|
const provider_list = ref<Array<Provider>>([])
|
||||||
|
|
||||||
function getProvider() {
|
function getProvider() {
|
||||||
model.asyncGetProvider().then((res: any) => {
|
model.asyncGetProvider().then((res: any) => {
|
||||||
provider_list.value = res?.data
|
provider_list.value = res?.data
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user