4747 <div class =" flex-between" >
4848 <div class =" flex align-center" >
4949 <h4 class =" medium ellipsis" :title =" current?.name" >{{ current?.name || '-' }}</h4 >
50- <el-divider direction =" vertical" class =" mr-8 ml-8" />
50+ <el-divider direction =" vertical" class =" mr-8 ml-8" />
5151
52- <el-icon class =" color-input-placeholder" ><UserFilled /></el-icon >
52+ <el-icon class =" color-input-placeholder" >
53+ <UserFilled />
54+ </el-icon >
5355 <span class =" color-input-placeholder ml-4" >
5456 {{ paginationConfig.total }}
5557 </span >
7678 <div class =" flex-between mb-16" style =" margin-top : 18px " >
7779 <div class =" flex complex-search" >
7880 <el-select class =" complex-search__left" v-model =" searchType" style =" width : 120px " >
79- <el-option :label =" $t('views.login.loginForm.username.label')" value =" name" />
81+ <el-option :label =" $t('views.login.loginForm.username.label')" value =" username" />
82+ <el-option :label =" $t('views.userManage.userForm.nick_name.label')"
83+ value =" nick_name" />
84+ <el-option :label =" $t('views.userManage.source.label')" value =" source" />
8085 </el-select >
8186 <el-input
82- v-if =" searchType === 'name '"
83- v-model =" searchForm.name "
87+ v-if =" searchType === 'username '"
88+ v-model =" searchForm.username "
8489 @change =" getList"
8590 :placeholder =" $t('common.inputPlaceholder')"
8691 style =" width : 220px "
8792 clearable
8893 />
94+ <el-input
95+ v-else-if =" searchType === 'nick_name'"
96+ v-model =" searchForm.nick_name"
97+ @change =" getList"
98+ :placeholder =" $t('common.inputPlaceholder')"
99+ style =" width : 220px "
100+ clearable
101+ />
102+ <el-select
103+ v-else-if =" searchType === 'source'"
104+ v-model =" searchForm.source"
105+ @change =" getList"
106+ :placeholder =" $t('common.selectPlaceholder')"
107+ style =" width : 220px "
108+ clearable
109+ >
110+ <el-option
111+ :label =" $t('views.userManage.source.local')"
112+ value =" LOCAL"
113+ />
114+ <el-option
115+ label =" CAS"
116+ value =" CAS"
117+ />
118+ <el-option
119+ label =" LDAP"
120+ value =" LDAP"
121+ />
122+ <el-option
123+ label =" OIDC"
124+ value =" OIDC"
125+ />
126+ <el-option
127+ label =" OAuth2"
128+ value =" OAuth2"
129+ />
130+ <el-option
131+ :label =" $t('views.userManage.source.wecom')"
132+ value =" wecom"
133+ />
134+ <el-option
135+ :label =" $t('views.userManage.source.lark')"
136+ value =" lark"
137+ />
138+ <el-option
139+ :label =" $t('views.userManage.source.dingtalk')"
140+ value =" dingtalk"
141+ />
142+ </el-select >
143+
89144 </div >
90145 <div
91146 class =" flex align-center"
121176 prop =" nick_name"
122177 :label =" $t('views.userManage.userForm.nick_name.label')"
123178 />
124- <el-table-column prop =" username" :label =" $t('views.login.loginForm.username.label')" />
179+ <el-table-column prop =" username" :label =" $t('views.login.loginForm.username.label')" />
125180 <el-table-column prop =" source" :label =" $t('views.userManage.source.label')" >
126181 <template #default =" { row } " >
127182 {{
146201 :indeterminate =" allIndeterminate"
147202 :disabled =" current?.is_auth"
148203 @change =" handleCheckAll"
149- >{{ $t('views.chatUser.authorization') }}</el-checkbox
204+ >{{ $t('views.chatUser.authorization') }}
205+ </el-checkbox
150206 >
151207 </template >
152208 <template #default =" { row } " >
166222</template >
167223
168224<script lang="ts" setup>
169- import { onMounted , ref , watch , reactive , computed } from ' vue'
170-
171- import { t } from ' @/locales'
172- import type { ChatUserGroupItem , ChatUserGroupUserItem } from ' @/api/type/workspaceChatUser'
173- import { useRoute } from ' vue-router'
174- import { SourceTypeEnum } from ' @/enums/common'
175- import { MsgSuccess } from ' @/utils/message'
176- import { ComplexPermission } from ' @/utils/permission/type'
177- import { RoleConst , PermissionConst } from ' @/utils/permission/data'
178- import { hasPermission } from ' @/utils/permission/index'
179- import { loadSharedApi } from ' @/utils/dynamics-api/shared-api'
225+ import {onMounted , ref , watch , reactive , computed } from ' vue'
226+
227+ import {t } from ' @/locales'
228+ import type {ChatUserGroupItem , ChatUserGroupUserItem } from ' @/api/type/workspaceChatUser'
229+ import {useRoute } from ' vue-router'
230+ import {SourceTypeEnum } from ' @/enums/common'
231+ import {MsgSuccess } from ' @/utils/message'
232+ import {ComplexPermission } from ' @/utils/permission/type'
233+ import {RoleConst , PermissionConst } from ' @/utils/permission/data'
234+ import {hasPermission } from ' @/utils/permission/index'
235+ import {loadSharedApi } from ' @/utils/dynamics-api/shared-api'
180236
181237const route = useRoute ()
182238
183239const {
184- params : { id, folderId },
240+ params : {id, folderId},
185241} = route as any
186242
187243const permissionObj = ref <any >({
@@ -214,15 +270,17 @@ const permissionObj = ref<any>({
214270})
215271
216272const currentPermissionKey = computed (() => {
217- if (route .path .includes (' shared' )) return ' SHAREDKNOWLEDGE'
218- if (route .path .includes (' resource-management' )) {
219- if (route .meta ?.resourceType === ' KNOWLEDGE' ) { return ' RESOURCE_KNOWLEDGE' }
220- else if (route .meta ?.resourceType === ' APPLICATION' ) { return ' RESOURCE_APPLICATION' }
273+ if (route .path .includes (' shared' )) return ' SHAREDKNOWLEDGE'
274+ if (route .path .includes (' resource-management' )) {
275+ if (route .meta ?.resourceType === ' KNOWLEDGE' ) {
276+ return ' RESOURCE_KNOWLEDGE'
277+ } else if (route .meta ?.resourceType === ' APPLICATION' ) {
278+ return ' RESOURCE_APPLICATION'
221279 }
222- return route .meta ?.resourceType as string
280+ }
281+ return route .meta ?.resourceType as string
223282})
224283
225- console .log (currentPermissionKey .value )
226284
227285const resource = reactive ({
228286 resource_id: route .params .id as string ,
@@ -285,7 +343,7 @@ function clickUserGroup(item: ChatUserGroupItem) {
285343}
286344
287345async function changeAuth() {
288- const params = [{ user_group_id: current .value ?.id as string , is_auth: ! current .value ?.is_auth }]
346+ const params = [{user_group_id: current .value ?.id as string , is_auth: ! current .value ?.is_auth }]
289347 try {
290348 await loadSharedApi ({
291349 type: ' chatUser' ,
@@ -305,9 +363,11 @@ async function changeAuth() {
305363
306364const rightLoading = ref (false )
307365
308- const searchType = ref (' name ' )
366+ const searchType = ref (' username ' )
309367const searchForm = ref <Record <string , any >>({
310- name: ' ' ,
368+ username: ' ' ,
369+ nick_name: ' ' ,
370+ source: ' ' ,
311371})
312372const paginationConfig = reactive ({
313373 current_page: 1 ,
@@ -323,6 +383,11 @@ const isShared = computed(() => {
323383
324384async function getList() {
325385 if (! current .value ?.id ) return
386+ const params: any = {}
387+ const searchValue = searchForm .value [searchType .value as keyof typeof searchForm .value ];
388+ if (searchValue !== undefined && searchValue !== null && searchValue !== ' ' ) {
389+ params [searchType .value ] = searchValue ;
390+ }
326391 try {
327392 const res = await loadSharedApi ({
328393 type: ' chatUser' ,
@@ -332,7 +397,7 @@ async function getList() {
332397 resource ,
333398 current .value ?.id ,
334399 paginationConfig ,
335- searchForm . value . name ,
400+ params ,
336401 rightLoading ,
337402 )
338403 // 更新缓存和回显状态
0 commit comments