mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-30 09:42:48 +00:00
This commit is contained in:
parent
f46205bece
commit
27262c9478
|
|
@ -326,6 +326,26 @@ export const iconMap: any = {
|
|||
])
|
||||
},
|
||||
},
|
||||
'app-key': {
|
||||
iconReader: () => {
|
||||
return h('i', [
|
||||
h(
|
||||
'svg',
|
||||
{
|
||||
viewBox: '0 0 1024 1024',
|
||||
version: '1.1',
|
||||
xmlns: 'http://www.w3.org/2000/svg',
|
||||
},
|
||||
[
|
||||
h('path', {
|
||||
d: 'M512 512a85.333333 85.333333 0 0 1 42.666667 159.232V746.666667a21.333333 21.333333 0 0 1-21.333334 21.333333h-42.666666a21.333333 21.333333 0 0 1-21.333334-21.333333v-75.434667A85.333333 85.333333 0 0 1 512 512z" p-id="16092"></path><path d="M512 85.333333c129.578667 0 234.666667 104.96 234.666667 234.666667V341.333333H896c23.552 0 42.666667 19.2 42.666667 42.666667v512c0 23.466667-19.114667 42.666667-42.666667 42.666667H128c-23.594667 0-42.666667-19.2-42.666667-42.666667V384c0-23.466667 19.072-42.666667 42.666667-42.666667h149.333333v-21.333333C277.333333 190.293333 382.421333 85.333333 512 85.333333zM170.666667 853.333333h682.666666V426.666667H170.666667v426.666666z m341.333333-682.666666a149.290667 149.290667 0 0 0-149.333333 149.333333V341.333333h298.666666v-21.333333C661.333333 237.44 594.474667 170.666667 512 170.666667z',
|
||||
fill: 'currentColor',
|
||||
}),
|
||||
],
|
||||
),
|
||||
])
|
||||
},
|
||||
},
|
||||
// 动态加载的图标
|
||||
...dynamicIcons,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,9 +82,7 @@
|
|||
</el-button>
|
||||
<!-- 访问限制 -->
|
||||
<el-button @click="openLimitDialog" v-if="permissionPrecise.overview_access(id)">
|
||||
<el-icon class="mr-4">
|
||||
<Lock />
|
||||
</el-icon>
|
||||
<AppIcon iconName="app-key" class="mr-4"></AppIcon>
|
||||
{{ $t('views.applicationOverview.appInfo.accessControl') }}
|
||||
</el-button>
|
||||
<!-- 显示设置 -->
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
style="padding-top: 8px; padding-bottom: 8px"
|
||||
@click="openResetPassword"
|
||||
>
|
||||
<el-icon><Lock /></el-icon>
|
||||
<AppIcon iconName="app-key"></AppIcon>
|
||||
{{ $t('views.login.resetPassword') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
@click="resetPassword"
|
||||
>
|
||||
<div class="flex align-center">
|
||||
<el-icon class="mr-12"><Lock /></el-icon>
|
||||
<AppIcon iconName="app-key" class="mr-12"></AppIcon>
|
||||
<h4 class="lighter">{{ $t('views.login.resetPassword') }}</h4>
|
||||
</div>
|
||||
<el-icon size="16">
|
||||
|
|
|
|||
|
|
@ -74,9 +74,7 @@
|
|||
style="padding-top: 8px; padding-bottom: 8px"
|
||||
@click="openResetPassword"
|
||||
>
|
||||
<el-icon>
|
||||
<Lock />
|
||||
</el-icon>
|
||||
<AppIcon iconName="app-key" class="mr-4"></AppIcon>
|
||||
{{ $t('views.login.resetPassword') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
|
|
|
|||
|
|
@ -246,9 +246,10 @@
|
|||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="isSystemShare"
|
||||
icon="Lock"
|
||||
@click.stop="openAuthorizedWorkspaceDialog(item)"
|
||||
>{{ $t('views.shared.authorized_workspace') }}</el-dropdown-item
|
||||
>
|
||||
<AppIcon iconName="app-key"></AppIcon>
|
||||
{{ $t('views.shared.authorized_workspace') }}</el-dropdown-item
|
||||
>
|
||||
|
||||
<el-dropdown-item
|
||||
|
|
|
|||
|
|
@ -81,9 +81,10 @@
|
|||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="isSystemShare"
|
||||
icon="Lock"
|
||||
@click.stop="openAuthorizedWorkspaceDialog(model)"
|
||||
>{{ $t('views.shared.authorized_workspace') }}
|
||||
>
|
||||
<AppIcon iconName="app-key"></AppIcon>
|
||||
{{ $t('views.shared.authorized_workspace') }}
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item
|
||||
|
|
|
|||
|
|
@ -279,23 +279,12 @@ function deleteMulDocument() {
|
|||
}
|
||||
|
||||
function deleteProblem(row: any) {
|
||||
MsgConfirm(
|
||||
`${t('views.problem.delete.confirmTitle')} ${row.content} ?`,
|
||||
`${t('views.problem.delete.confirmMessage1')} ${row.paragraph_count} ${t('views.problem.delete.confirmMessage2')}`,
|
||||
{
|
||||
confirmButtonText: t('common.confirm'),
|
||||
confirmButtonClass: 'danger',
|
||||
},
|
||||
)
|
||||
loadSharedApi({ type: 'problem', systemType: apiType.value })
|
||||
.delProblems(id, row.id, loading)
|
||||
.then(() => {
|
||||
loadSharedApi({ type: 'problem', systemType: apiType.value })
|
||||
.delProblems(id, row.id, loading)
|
||||
.then(() => {
|
||||
MsgSuccess(t('common.deleteSuccess'))
|
||||
getList()
|
||||
})
|
||||
MsgSuccess(t('common.deleteSuccess'))
|
||||
getList()
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
function editName(val: string, problemId: string) {
|
||||
|
|
|
|||
|
|
@ -67,13 +67,10 @@
|
|||
style="width: 120px"
|
||||
@change="search_type_change"
|
||||
>
|
||||
<el-option :label="$t('views.login.loginForm.username.label')" value="username"/>
|
||||
<el-option :label="$t('views.userManage.userForm.nick_name.label')" value="nick_name"/>
|
||||
<el-option :label="$t('common.status.label')" value="is_active"/>
|
||||
<el-option
|
||||
:label="$t('views.userManage.source.label')"
|
||||
value="source"
|
||||
/>
|
||||
<el-option :label="$t('views.login.loginForm.username.label')" value="username" />
|
||||
<el-option :label="$t('views.userManage.userForm.nick_name.label')" value="nick_name" />
|
||||
<el-option :label="$t('common.status.label')" value="is_active" />
|
||||
<el-option :label="$t('views.userManage.source.label')" value="source" />
|
||||
</el-select>
|
||||
<el-input
|
||||
v-if="search_type === 'username'"
|
||||
|
|
@ -96,8 +93,8 @@
|
|||
clearable
|
||||
style="width: 220px"
|
||||
>
|
||||
<el-option :label="$t('common.status.enabled')" :value="true"/>
|
||||
<el-option :label="$t('common.status.disabled')" :value="false"/>
|
||||
<el-option :label="$t('common.status.enabled')" :value="true" />
|
||||
<el-option :label="$t('common.status.disabled')" :value="false" />
|
||||
</el-select>
|
||||
<el-select
|
||||
v-else-if="search_type === 'source'"
|
||||
|
|
@ -107,14 +104,14 @@
|
|||
clearable
|
||||
:placeholder="$t('common.inputPlaceholder')"
|
||||
>
|
||||
<el-option :label="$t('views.userManage.source.local')" value="LOCAL"/>
|
||||
<el-option label="CAS" value="CAS"/>
|
||||
<el-option label="LDAP" value="LDAP"/>
|
||||
<el-option label="OIDC" value="OIDC"/>
|
||||
<el-option label="OAuth2" value="OAuth2"/>
|
||||
<el-option :label="$t('views.userManage.source.wecom')" value="wecom"/>
|
||||
<el-option :label="$t('views.userManage.source.lark')" value="lark"/>
|
||||
<el-option :label="$t('views.userManage.source.dingtalk')" value="dingtalk"/>
|
||||
<el-option :label="$t('views.userManage.source.local')" value="LOCAL" />
|
||||
<el-option label="CAS" value="CAS" />
|
||||
<el-option label="LDAP" value="LDAP" />
|
||||
<el-option label="OIDC" value="OIDC" />
|
||||
<el-option label="OAuth2" value="OAuth2" />
|
||||
<el-option :label="$t('views.userManage.source.wecom')" value="wecom" />
|
||||
<el-option :label="$t('views.userManage.source.lark')" value="lark" />
|
||||
<el-option :label="$t('views.userManage.source.dingtalk')" value="dingtalk" />
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -129,7 +126,7 @@
|
|||
@sort-change="handleSortChange"
|
||||
:maxTableHeight="270"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column
|
||||
prop="nick_name"
|
||||
:label="$t('views.userManage.userForm.nick_name.label')"
|
||||
|
|
@ -146,7 +143,7 @@
|
|||
<template #default="{ row }">
|
||||
<div v-if="row.is_active" class="flex align-center">
|
||||
<el-icon class="color-success mr-8" style="font-size: 16px">
|
||||
<SuccessFilled/>
|
||||
<SuccessFilled />
|
||||
</el-icon>
|
||||
<span class="color-secondary">
|
||||
{{ $t('common.status.enabled') }}
|
||||
|
|
@ -186,7 +183,7 @@
|
|||
min-width="150"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<TagGroup :tags="row.user_group_names"/>
|
||||
<TagGroup :tags="row.user_group_names" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="source" :label="$t('views.userManage.source.label')">
|
||||
|
|
@ -233,7 +230,7 @@
|
|||
"
|
||||
/>
|
||||
</span>
|
||||
<el-divider direction="vertical"/>
|
||||
<el-divider direction="vertical" />
|
||||
<span class="mr-8">
|
||||
<el-button
|
||||
type="primary"
|
||||
|
|
@ -274,9 +271,7 @@
|
|||
)
|
||||
"
|
||||
>
|
||||
<el-icon>
|
||||
<Lock/>
|
||||
</el-icon>
|
||||
<AppIcon iconName="app-key"></AppIcon>
|
||||
</el-button>
|
||||
</span>
|
||||
<span>
|
||||
|
|
@ -316,34 +311,34 @@
|
|||
ref="UserDrawerRef"
|
||||
@refresh="refresh"
|
||||
/>
|
||||
<UserPwdDialog ref="UserPwdDialogRef" @refresh="refresh"/>
|
||||
<UserPwdDialog ref="UserPwdDialogRef" @refresh="refresh" />
|
||||
<SetUserGroupsDialog
|
||||
:optionLoading="optionLoading"
|
||||
:chatGroupList="chatGroupList"
|
||||
ref="setUserGroupsRef"
|
||||
@refresh="refresh"
|
||||
/>
|
||||
<SyncUsersDialog ref="syncUsersDialogRef" @refresh="refresh"/>
|
||||
<SyncUsersDialog ref="syncUsersDialogRef" @refresh="refresh" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {onMounted, ref, reactive} from 'vue'
|
||||
import { onMounted, ref, reactive } from 'vue'
|
||||
import UserDrawer from './component/UserDrawer.vue'
|
||||
import UserPwdDialog from './component/UserPwdDialog.vue'
|
||||
import SetUserGroupsDialog from './component/SetUserGroupsDialog.vue'
|
||||
import SyncUsersDialog from './component/SyncUsersDialog.vue'
|
||||
import userManageApi from '@/api/system/chat-user'
|
||||
import {datetimeFormat} from '@/utils/time'
|
||||
import {MsgSuccess, MsgConfirm} from '@/utils/message'
|
||||
import {t} from '@/locales'
|
||||
import type {ChatUserItem} from '@/api/type/systemChatUser'
|
||||
import { datetimeFormat } from '@/utils/time'
|
||||
import { MsgSuccess, MsgConfirm } from '@/utils/message'
|
||||
import { t } from '@/locales'
|
||||
import type { ChatUserItem } from '@/api/type/systemChatUser'
|
||||
import SystemGroupApi from '@/api/system/user-group'
|
||||
import type {ListItem} from '@/api/type/common'
|
||||
import {PermissionConst, RoleConst} from '@/utils/permission/data'
|
||||
import {ComplexPermission} from '@/utils/permission/type'
|
||||
import {hasPermission} from '@/utils/permission'
|
||||
import {loadPermissionApi} from '@/utils/dynamics-api/permission-api.ts'
|
||||
import type { ListItem } from '@/api/type/common'
|
||||
import { PermissionConst, RoleConst } from '@/utils/permission/data'
|
||||
import { ComplexPermission } from '@/utils/permission/type'
|
||||
import { hasPermission } from '@/utils/permission'
|
||||
import { loadPermissionApi } from '@/utils/dynamics-api/permission-api.ts'
|
||||
|
||||
const search_type = ref('username')
|
||||
const search_form = ref<{
|
||||
|
|
@ -358,7 +353,7 @@ const search_form = ref<{
|
|||
is_active: null,
|
||||
})
|
||||
const search_type_change = () => {
|
||||
search_form.value = {username: '', nick_name: '', source: '', is_active: null}
|
||||
search_form.value = { username: '', nick_name: '', source: '', is_active: null }
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
|
|
@ -393,7 +388,7 @@ function getList() {
|
|||
|
||||
const orderBy = ref<string>('')
|
||||
|
||||
function handleSortChange({prop, order}: { prop: string; order: string }) {
|
||||
function handleSortChange({ prop, order }: { prop: string; order: string }) {
|
||||
orderBy.value = order === 'ascending' ? prop : `-${prop}`
|
||||
getList()
|
||||
}
|
||||
|
|
@ -448,8 +443,7 @@ function deleteUserManage(row: ChatUserItem) {
|
|||
getList()
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
const UserPwdDialogRef = ref()
|
||||
|
|
@ -480,7 +474,7 @@ async function getChatGroupList() {
|
|||
}
|
||||
|
||||
function handleBatchDelete() {
|
||||
MsgConfirm(t('views.chatUser.batchDeleteUser', {count: multipleSelection.value.length}), '', {
|
||||
MsgConfirm(t('views.chatUser.batchDeleteUser', { count: multipleSelection.value.length }), '', {
|
||||
confirmButtonText: t('common.confirm'),
|
||||
confirmButtonClass: 'danger',
|
||||
})
|
||||
|
|
@ -495,8 +489,7 @@ function handleBatchDelete() {
|
|||
await getList()
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
const setUserGroupsRef = ref<InstanceType<typeof SetUserGroupsDialog>>()
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@
|
|||
:title="$t('views.userManage.setting.updatePwd')"
|
||||
v-if="hasPermission([RoleConst.ADMIN, PermissionConst.USER_EDIT], 'OR')"
|
||||
>
|
||||
<el-icon><Lock /></el-icon>
|
||||
<AppIcon iconName="app-key"></AppIcon>
|
||||
</el-button>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
|
|
|
|||
|
|
@ -249,9 +249,10 @@
|
|||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="isSystemShare"
|
||||
icon="Lock"
|
||||
@click.stop="openAuthorizedWorkspaceDialog(item)"
|
||||
>{{ $t('views.shared.authorized_workspace') }}</el-dropdown-item
|
||||
>
|
||||
<AppIcon iconName="app-key"></AppIcon>
|
||||
{{ $t('views.shared.authorized_workspace') }}</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item
|
||||
v-if="!item.template_id && permissionPrecise.export(item.id)"
|
||||
|
|
|
|||
Loading…
Reference in New Issue