Skip to content

Commit 62233b3

Browse files
committed
refactor: ui
1 parent 5dc5183 commit 62233b3

File tree

6 files changed

+45
-25
lines changed

6 files changed

+45
-25
lines changed

ui/src/views/application/ApplicationAccess.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const platforms = reactive([
9090
exists: false,
9191
},
9292
{
93-
key: 'feishu',
93+
key: 'lark',
9494
logoSrc: new URL(`../../assets/logo/logo_lark.svg`, import.meta.url).href,
9595
name: t('views.application.applicationAccess.lark'),
9696
description: t('views.application.applicationAccess.larkTip'),
@@ -143,7 +143,7 @@ function changeStatus(type: string, value: boolean) {
143143
}
144144
145145
onMounted(() => {
146-
// getPlatformStatus()
146+
getPlatformStatus()
147147
})
148148
</script>
149149

ui/src/views/application/component/AccessSettingDrawer.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
>{{ $t('views.application.applicationAccess.wecomPlatform') }}</a
7878
>{{ $t('views.application.applicationAccess.wecomSetting.urlInfo') }}
7979
</el-text>
80-
<el-text type="info" v-if="configType === 'feishu'">
80+
<el-text type="info" v-if="configType === 'lark'">
8181
{{ $t('views.application.applicationAccess.copyUrl') }}
8282
<a class="primary" href="https://open.feishu.cn/app/" target="_blank">{{
8383
$t('views.application.applicationAccess.larkPlatform')
@@ -107,7 +107,7 @@ import { MsgError, MsgSuccess } from '@/utils/message'
107107
import { copyClick } from '@/utils/clipboard'
108108
import { t } from '@/locales'
109109
110-
type PlatformType = 'wechat' | 'dingtalk' | 'wecom' | 'feishu' | 'slack'
110+
type PlatformType = 'wechat' | 'dingtalk' | 'wecom' | 'lark' | 'slack'
111111
112112
const formRef = ref<FormInstance>()
113113
const visible = ref(false)
@@ -138,7 +138,7 @@ const form = reactive<any>({
138138
encoding_aes_key: '',
139139
callback_url: ''
140140
},
141-
feishu: { app_id: '', app_secret: '', verification_token: '', callback_url: '' },
141+
lark: { app_id: '', app_secret: '', verification_token: '', callback_url: '' },
142142
slack: { signing_secret: '', bot_user_token: '', callback_url: '' }
143143
})
144144
@@ -226,7 +226,7 @@ const rules = reactive<{ [propName: string]: any }>({
226226
}
227227
]
228228
},
229-
feishu: {
229+
lark: {
230230
app_id: [
231231
{
232232
required: true,
@@ -297,7 +297,7 @@ const configFields: { [propName: string]: { [propName: string]: any } } = {
297297
token: { label: 'Token', placeholder: '' },
298298
encoding_aes_key: { label: 'EncodingAESKey', placeholder: '' }
299299
},
300-
feishu: {
300+
lark: {
301301
app_id: { label: 'App ID', placeholder: '' },
302302
app_secret: { label: 'App Secret', placeholder: '' },
303303
verification_token: { label: 'Verification Token', placeholder: '' }
@@ -322,7 +322,7 @@ const drawerTitle = computed(
322322
wechat: t('views.application.applicationAccess.wechatSetting.title'),
323323
dingtalk: t('views.application.applicationAccess.dingtalkSetting.title'),
324324
wecom: t('views.application.applicationAccess.wecomSetting.title'),
325-
feishu: t('views.application.applicationAccess.larkSetting.title'),
325+
lark: t('views.application.applicationAccess.larkSetting.title'),
326326
slack: t('views.application.applicationAccess.slackSetting.title')
327327
}[configType.value])
328328
)
@@ -333,7 +333,7 @@ const infoTitle = computed(
333333
wechat: t('views.applicationOverview.appInfo.header'),
334334
dingtalk: t('views.applicationOverview.appInfo.header'),
335335
wecom: t('views.applicationOverview.appInfo.header'),
336-
feishu: t('views.applicationOverview.appInfo.header'),
336+
lark: t('views.applicationOverview.appInfo.header'),
337337
slack: t('views.applicationOverview.appInfo.header')
338338
}[configType.value])
339339
)

ui/src/views/chat/user-login/index.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@ function changeMode(val: string) {
303303
onBeforeMount(() => {
304304
if (chatUser.chat_profile?.login_value) {
305305
modeList.value = chatUser.chat_profile.login_value
306+
if (modeList.value.includes('LOCAL')) {
307+
modeList.value = ['LOCAL', ...modeList.value.filter((item) => item !== 'LOCAL')]
308+
}
306309
loginMode.value = modeList.value[0] || 'LOCAL'
307310
if (modeList.value.length == 1 && ['CAS', 'OIDC', 'OAuth2'].includes(modeList.value[0])) {
308311
redirectAuth(modeList.value[0])

ui/src/views/system-chat-user/group/component/CreateGroupUserDialog.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
<el-form-item :label="$t('views.chatUser.group.usernameOrName')" prop="user">
88
<el-select v-model="form.user" multiple filterable
99
:placeholder="$t('common.selectPlaceholder')"
10-
:loading="optionLoading">
10+
:loading="optionLoading"
11+
:filter-method="filterUser"
12+
>
1113
<el-option v-for="item in chatUserList" :key="item.id" :label="item.nick_name"
1214
:value="item.id">
1315
</el-option>
@@ -58,6 +60,16 @@ async function getChatUserList() {
5860
}
5961
}
6062
63+
const filterUser = (query: string, item: ChatUserItem) => {
64+
if (!query) return true;
65+
const q = query.toLowerCase();
66+
return (
67+
item.nick_name?.toLowerCase().includes(q) ||
68+
item.username?.toLowerCase().includes(q) ||
69+
false
70+
);
71+
};
72+
6173
onBeforeMount(() => {
6274
getChatUserList()
6375
})

ui/src/views/system-chat-user/group/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
:placeholder="$t('common.search')"
3838
prefix-icon="Search"
3939
clearable
40+
filterable
4041
/>
4142
</div>
4243

ui/src/views/system/resource-authorization/component/PermissionSetting.vue

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<template>
22
<div class="w-full">
33
<div class="flex-between mb-16">
4-
<div class="flex align-center" v-if="hasPermission(EditionConst.IS_EE, 'OR')">
4+
<div class="flex align-center"
5+
v-if="hasPermission([EditionConst.IS_EE,EditionConst.IS_PE], 'OR')">
56
<!-- 企业版: 选优先级-->
67
<span class="lighter mr-16">{{ $t('views.resourceAuthorization.priority.label') }}</span>
78
<el-radio-group v-model="radioRole">
89
<el-radio :value="true" size="large">{{
9-
$t('views.resourceAuthorization.priority.role')
10-
}}</el-radio>
10+
$t('views.resourceAuthorization.priority.role')
11+
}}
12+
</el-radio>
1113
<el-radio :value="false" size="large">{{ $t('common.custom') }}</el-radio>
1214
</el-radio-group>
1315
</div>
@@ -16,7 +18,7 @@
1618
:placeholder="$t('common.search')"
1719
prefix-icon="Search"
1820
class="mt-4"
19-
:class="hasPermission(EditionConst.IS_EE, 'OR') ? 'w-240' : ''"
21+
:class="hasPermission([EditionConst.IS_EE,EditionConst.IS_PE], 'OR') ? 'w-240' : ''"
2022
clearable
2123
/>
2224
</div>
@@ -46,7 +48,7 @@
4648
/>
4749
</el-avatar>
4850
<!--  知识库 icon -->
49-
<KnowledgeIcon class="mr-12" :size="20" v-else-if="isKnowledge" :type="row.icon" />
51+
<KnowledgeIcon class="mr-12" :size="20" v-else-if="isKnowledge" :type="row.icon"/>
5052
<!--  应用/工具 自定义 icon -->
5153
<el-avatar
5254
v-else-if="isAppIcon(row?.icon) && !isModel"
@@ -55,13 +57,13 @@
5557
shape="square"
5658
:size="20"
5759
>
58-
<img :src="row?.icon" alt="" />
60+
<img :src="row?.icon" alt=""/>
5961
</el-avatar>
6062
<!--  应用 icon -->
61-
<LogoIcon v-else-if="isApplication" height="20px" class="mr-12" />
63+
<LogoIcon v-else-if="isApplication" height="20px" class="mr-12"/>
6264
<!-- 工具 icon -->
6365
<el-avatar v-else-if="isTool" class="avatar-green mr-12" shape="square" :size="20">
64-
<img src="@/assets/node/icon_tool.svg" style="width: 58%" alt="" />
66+
<img src="@/assets/node/icon_tool.svg" style="width: 58%" alt=""/>
6567
</el-avatar>
6668
<!-- 模型 icon -->
6769
<span
@@ -170,14 +172,15 @@
170172
</div>
171173
</template>
172174
<script setup lang="ts">
173-
import { ref, onMounted, watch, computed } from 'vue'
174-
import type { Provider } from '@/api/type/model'
175-
import { AuthorizationEnum } from '@/enums/system'
176-
import { isAppIcon } from '@/utils/common'
177-
import { EditionConst } from '@/utils/permission/data'
178-
import { hasPermission } from '@/utils/permission/index'
175+
import {ref, onMounted, watch, computed} from 'vue'
176+
import type {Provider} from '@/api/type/model'
177+
import {AuthorizationEnum} from '@/enums/system'
178+
import {isAppIcon} from '@/utils/common'
179+
import {EditionConst} from '@/utils/permission/data'
180+
import {hasPermission} from '@/utils/permission/index'
179181
import useStore from '@/stores'
180-
const { model } = useStore()
182+
183+
const {model} = useStore()
181184
const props = defineProps({
182185
data: {
183186
type: Array,
@@ -234,6 +237,7 @@ function checkedOperateChange(Name: string | number, row: any, e: boolean) {
234237
}
235238
236239
const provider_list = ref<Array<Provider>>([])
240+
237241
function getProvider() {
238242
model.asyncGetProvider().then((res: any) => {
239243
provider_list.value = res?.data

0 commit comments

Comments
 (0)