chore: prune org selectors from lightweight admin

This commit is contained in:
2026-06-11 10:15:55 +08:00
parent 7c83edba1d
commit 50402b5f8c
5 changed files with 2 additions and 73 deletions
@@ -95,16 +95,6 @@ const ElUpload = defineAsyncComponent(() =>
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(() =>
import('#/components/zq-form/role-selector/role-selector.vue').then(
(res) => res.default,
@@ -176,14 +166,12 @@ export type ComponentType =
| 'CheckboxGroup'
| 'CodeEditor'
| 'DatePicker'
| 'DeptSelector'
| 'Divider'
| 'FileSelector'
| 'IconPicker'
| 'ImageSelector'
| 'Input'
| 'InputNumber'
| 'PostSelector'
| 'RadioGroup'
| 'RoleSelector'
| 'Select'
@@ -261,8 +249,6 @@ function initComponentAdapter() {
PrimaryButton: (props, { attrs, slots }) => {
return h(ElButton, { ...props, attrs, type: 'primary' }, slots);
},
DeptSelector: withDefaultPlaceholder(DeptSelector, 'select'),
PostSelector: withDefaultPlaceholder(PostSelector, 'select'),
RoleSelector: withDefaultPlaceholder(RoleSelector, 'select'),
Divider: ElDivider,
FileSelector: withDefaultPlaceholder(FileSelector, 'select'),
@@ -50,8 +50,6 @@ import {
ElTooltip,
} 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 { useTableForm } from './init';
@@ -611,16 +609,7 @@ const dateShortcuts = [
// 判断是否为弹窗选择器过滤的组件类型
function isDialogFilterComponent(componentType: string): boolean {
return [
'department-selector',
'dept-select',
'dept-selector',
'position-selector',
'post-select',
'post-selector',
'user-select',
'user-selector',
].includes(componentType);
return ['user-select', 'user-selector'].includes(componentType);
}
// 判断是否为日期时间组件类型
@@ -1255,28 +1244,6 @@ function getSummaryMethod(param: { columns: any[]; data: any[] }) {
:placeholder="$t('common.select')"
@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 class="mt-2 flex justify-end gap-2">
@@ -139,7 +139,6 @@ const AI_AGENT_ADMIN_MENU_NAMES = new Set([
'AIWorkflowRuns',
'KnowledgeBase',
'Codex',
'SystemConfigManager',
'SystemManagement',
'SystemPermission',
'UserManagement',
@@ -191,14 +191,6 @@ export function getFormSchema(): VbenFormSchema[] {
fieldName: 'bio',
label: $t('user.bio'),
},
{
component: 'DeptSelector',
componentProps: {
placeholder: $t('user.selectDept'),
},
fieldName: 'dept_id',
label: $t('user.dept'),
},
{
component: 'UserSelector',
componentProps: {
@@ -207,14 +199,6 @@ export function getFormSchema(): VbenFormSchema[] {
fieldName: 'manager_id',
label: $t('user.manager'),
},
{
component: 'PostSelector',
componentProps: {
placeholder: $t('user.selectPost'),
},
fieldName: 'post_id',
label: $t('user.post'),
},
{
component: 'RoleSelector',
componentProps: {
@@ -311,12 +295,6 @@ export function useZqTableColumns(): Column[] {
title: $t('user.city'),
width: 120,
},
{
key: 'dept_name',
dataKey: 'dept_name',
title: $t('user.dept'),
width: 140,
},
{
key: 'manager_name',
dataKey: 'manager_name',