chore: prune org selectors from lightweight admin
This commit is contained in:
@@ -17,7 +17,7 @@ from core.menu.schema import MenuCreate, MenuUpdate
|
|||||||
menu_cache = CacheManager(prefix="menu:")
|
menu_cache = CacheManager(prefix="menu:")
|
||||||
|
|
||||||
# 缓存key
|
# 缓存key
|
||||||
AI_AGENT_ADMIN_MENU_CACHE_VERSION = "v8"
|
AI_AGENT_ADMIN_MENU_CACHE_VERSION = "v9"
|
||||||
MENU_TREE_CACHE_KEY = f"tree:ai_agent_admin:{AI_AGENT_ADMIN_MENU_CACHE_VERSION}"
|
MENU_TREE_CACHE_KEY = f"tree:ai_agent_admin:{AI_AGENT_ADMIN_MENU_CACHE_VERSION}"
|
||||||
USER_ROUTE_CACHE_PREFIX = f"user_route:ai_agent_admin:{AI_AGENT_ADMIN_MENU_CACHE_VERSION}:"
|
USER_ROUTE_CACHE_PREFIX = f"user_route:ai_agent_admin:{AI_AGENT_ADMIN_MENU_CACHE_VERSION}:"
|
||||||
|
|
||||||
@@ -30,7 +30,6 @@ AI_AGENT_ADMIN_MENU_NAMES = {
|
|||||||
"AIWorkflowRuns",
|
"AIWorkflowRuns",
|
||||||
"KnowledgeBase",
|
"KnowledgeBase",
|
||||||
"Codex",
|
"Codex",
|
||||||
"SystemConfigManager",
|
|
||||||
"SystemManagement",
|
"SystemManagement",
|
||||||
"SystemPermission",
|
"SystemPermission",
|
||||||
"UserManagement",
|
"UserManagement",
|
||||||
|
|||||||
@@ -95,16 +95,6 @@ const ElUpload = defineAsyncComponent(() =>
|
|||||||
import('element-plus/es/components/upload/index').then((res) => res.ElUpload),
|
import('element-plus/es/components/upload/index').then((res) => res.ElUpload),
|
||||||
);
|
);
|
||||||
|
|
||||||
const DeptSelector = defineAsyncComponent(() =>
|
|
||||||
import('#/components/zq-form/dept-selector/dept-selector.vue').then(
|
|
||||||
(res) => res.default,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
const PostSelector = defineAsyncComponent(() =>
|
|
||||||
import('#/components/zq-form/post-selector/post-selector.vue').then(
|
|
||||||
(res) => res.default,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
const RoleSelector = defineAsyncComponent(() =>
|
const RoleSelector = defineAsyncComponent(() =>
|
||||||
import('#/components/zq-form/role-selector/role-selector.vue').then(
|
import('#/components/zq-form/role-selector/role-selector.vue').then(
|
||||||
(res) => res.default,
|
(res) => res.default,
|
||||||
@@ -176,14 +166,12 @@ export type ComponentType =
|
|||||||
| 'CheckboxGroup'
|
| 'CheckboxGroup'
|
||||||
| 'CodeEditor'
|
| 'CodeEditor'
|
||||||
| 'DatePicker'
|
| 'DatePicker'
|
||||||
| 'DeptSelector'
|
|
||||||
| 'Divider'
|
| 'Divider'
|
||||||
| 'FileSelector'
|
| 'FileSelector'
|
||||||
| 'IconPicker'
|
| 'IconPicker'
|
||||||
| 'ImageSelector'
|
| 'ImageSelector'
|
||||||
| 'Input'
|
| 'Input'
|
||||||
| 'InputNumber'
|
| 'InputNumber'
|
||||||
| 'PostSelector'
|
|
||||||
| 'RadioGroup'
|
| 'RadioGroup'
|
||||||
| 'RoleSelector'
|
| 'RoleSelector'
|
||||||
| 'Select'
|
| 'Select'
|
||||||
@@ -261,8 +249,6 @@ function initComponentAdapter() {
|
|||||||
PrimaryButton: (props, { attrs, slots }) => {
|
PrimaryButton: (props, { attrs, slots }) => {
|
||||||
return h(ElButton, { ...props, attrs, type: 'primary' }, slots);
|
return h(ElButton, { ...props, attrs, type: 'primary' }, slots);
|
||||||
},
|
},
|
||||||
DeptSelector: withDefaultPlaceholder(DeptSelector, 'select'),
|
|
||||||
PostSelector: withDefaultPlaceholder(PostSelector, 'select'),
|
|
||||||
RoleSelector: withDefaultPlaceholder(RoleSelector, 'select'),
|
RoleSelector: withDefaultPlaceholder(RoleSelector, 'select'),
|
||||||
Divider: ElDivider,
|
Divider: ElDivider,
|
||||||
FileSelector: withDefaultPlaceholder(FileSelector, 'select'),
|
FileSelector: withDefaultPlaceholder(FileSelector, 'select'),
|
||||||
|
|||||||
@@ -50,8 +50,6 @@ import {
|
|||||||
ElTooltip,
|
ElTooltip,
|
||||||
} from 'element-plus';
|
} from 'element-plus';
|
||||||
|
|
||||||
import { DeptSelector } from '../zq-form/dept-selector';
|
|
||||||
import { PostSelector } from '../zq-form/post-selector';
|
|
||||||
import { UserSelector } from '../zq-form/user-selector';
|
import { UserSelector } from '../zq-form/user-selector';
|
||||||
import { useTableForm } from './init';
|
import { useTableForm } from './init';
|
||||||
|
|
||||||
@@ -611,16 +609,7 @@ const dateShortcuts = [
|
|||||||
|
|
||||||
// 判断是否为弹窗选择器过滤的组件类型
|
// 判断是否为弹窗选择器过滤的组件类型
|
||||||
function isDialogFilterComponent(componentType: string): boolean {
|
function isDialogFilterComponent(componentType: string): boolean {
|
||||||
return [
|
return ['user-select', 'user-selector'].includes(componentType);
|
||||||
'department-selector',
|
|
||||||
'dept-select',
|
|
||||||
'dept-selector',
|
|
||||||
'position-selector',
|
|
||||||
'post-select',
|
|
||||||
'post-selector',
|
|
||||||
'user-select',
|
|
||||||
'user-selector',
|
|
||||||
].includes(componentType);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断是否为日期时间组件类型
|
// 判断是否为日期时间组件类型
|
||||||
@@ -1255,28 +1244,6 @@ function getSummaryMethod(param: { columns: any[]; data: any[] }) {
|
|||||||
:placeholder="$t('common.select')"
|
:placeholder="$t('common.select')"
|
||||||
@change="handleSelectorFilterChange"
|
@change="handleSelectorFilterChange"
|
||||||
/>
|
/>
|
||||||
<DeptSelector
|
|
||||||
v-else-if="
|
|
||||||
activeFilterComponentType === 'dept-select' ||
|
|
||||||
activeFilterComponentType === 'dept-selector' ||
|
|
||||||
activeFilterComponentType === 'department-selector'
|
|
||||||
"
|
|
||||||
:model-value="tempFilterValues"
|
|
||||||
multiple
|
|
||||||
:placeholder="$t('common.select')"
|
|
||||||
@change="handleSelectorFilterChange"
|
|
||||||
/>
|
|
||||||
<PostSelector
|
|
||||||
v-else-if="
|
|
||||||
activeFilterComponentType === 'post-select' ||
|
|
||||||
activeFilterComponentType === 'post-selector' ||
|
|
||||||
activeFilterComponentType === 'position-selector'
|
|
||||||
"
|
|
||||||
:model-value="tempFilterValues"
|
|
||||||
multiple
|
|
||||||
:placeholder="$t('common.select')"
|
|
||||||
@change="handleSelectorFilterChange"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<div class="mt-2 flex justify-end gap-2">
|
<div class="mt-2 flex justify-end gap-2">
|
||||||
|
|||||||
@@ -139,7 +139,6 @@ const AI_AGENT_ADMIN_MENU_NAMES = new Set([
|
|||||||
'AIWorkflowRuns',
|
'AIWorkflowRuns',
|
||||||
'KnowledgeBase',
|
'KnowledgeBase',
|
||||||
'Codex',
|
'Codex',
|
||||||
'SystemConfigManager',
|
|
||||||
'SystemManagement',
|
'SystemManagement',
|
||||||
'SystemPermission',
|
'SystemPermission',
|
||||||
'UserManagement',
|
'UserManagement',
|
||||||
|
|||||||
@@ -191,14 +191,6 @@ export function getFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'bio',
|
fieldName: 'bio',
|
||||||
label: $t('user.bio'),
|
label: $t('user.bio'),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
component: 'DeptSelector',
|
|
||||||
componentProps: {
|
|
||||||
placeholder: $t('user.selectDept'),
|
|
||||||
},
|
|
||||||
fieldName: 'dept_id',
|
|
||||||
label: $t('user.dept'),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
component: 'UserSelector',
|
component: 'UserSelector',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
@@ -207,14 +199,6 @@ export function getFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'manager_id',
|
fieldName: 'manager_id',
|
||||||
label: $t('user.manager'),
|
label: $t('user.manager'),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
component: 'PostSelector',
|
|
||||||
componentProps: {
|
|
||||||
placeholder: $t('user.selectPost'),
|
|
||||||
},
|
|
||||||
fieldName: 'post_id',
|
|
||||||
label: $t('user.post'),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
component: 'RoleSelector',
|
component: 'RoleSelector',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
@@ -311,12 +295,6 @@ export function useZqTableColumns(): Column[] {
|
|||||||
title: $t('user.city'),
|
title: $t('user.city'),
|
||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: 'dept_name',
|
|
||||||
dataKey: 'dept_name',
|
|
||||||
title: $t('user.dept'),
|
|
||||||
width: 140,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: 'manager_name',
|
key: 'manager_name',
|
||||||
dataKey: 'manager_name',
|
dataKey: 'manager_name',
|
||||||
|
|||||||
Reference in New Issue
Block a user