From eb09f8235b58dfa569caddbd2d03bc6612925582 Mon Sep 17 00:00:00 2001
From: "DESKTOP-JKIE562\\PC" <1013397054@qq.com>
Date: Wed, 25 Nov 2026 15:33:28 +0800
Subject: [PATCH] =?UTF-8?q?fix(=E7=BB=84=E7=BB=87=E6=9E=B6=E6=9E=84):1.?=
=?UTF-8?q?=E9=83=A8=E9=97=A8=E5=88=97=E8=A1=A8=E6=94=B6=E7=AA=84(?=
=?UTF-8?q?=E5=9B=BA=E5=AE=9A280px),=E7=BC=96=E7=A0=81=E5=88=97140?=
=?UTF-8?q?=E2=86=9264;2.=E4=BF=AE=E5=A4=8D=E5=91=98=E5=B7=A5=E6=A1=A3?=
=?UTF-8?q?=E6=A1=88=E9=9D=A2=E6=9D=BF=E6=BA=A2=E5=87=BA=E8=A7=86=E5=8F=A3?=
=?UTF-8?q?=E2=80=94=E2=80=94=E6=A0=85=E6=A0=BC=E5=AD=90=E9=A1=B9=E6=9C=AA?=
=?UTF-8?q?=E6=94=B6=E6=95=9Bmin-width=E5=AF=BC=E8=87=B4=E5=8F=B3=E4=BE=A7?=
=?UTF-8?q?=E5=88=97=E4=B8=8E=E6=93=8D=E4=BD=9C=E6=8C=89=E9=92=AE=E8=A2=AB?=
=?UTF-8?q?=E8=A3=81=E6=8E=89=E4=B8=8D=E5=8F=AF=E7=82=B9;3.=E9=83=A8?=
=?UTF-8?q?=E9=97=A8/=E5=91=98=E5=B7=A5=E6=A1=A3=E6=A1=88=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E6=8E=A5=E5=85=A5=E5=85=B1=E7=94=A8=E5=88=86=E9=A1=B5?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=BB=98=E8=AE=A4=E6=AF=8F=E9=A1=B515?=
=?UTF-8?q?=E6=9D=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/views/org-center/OrgCenter.vue | 49 ++++++++++++++++++---
1 file changed, 43 insertions(+), 6 deletions(-)
diff --git a/frontend/src/views/org-center/OrgCenter.vue b/frontend/src/views/org-center/OrgCenter.vue
index f0e1cd8..4a321b8 100644
--- a/frontend/src/views/org-center/OrgCenter.vue
+++ b/frontend/src/views/org-center/OrgCenter.vue
@@ -21,7 +21,7 @@
部门
新增部门
-
+
修改
@@ -29,6 +29,8 @@
+
+
@@ -64,7 +66,7 @@
批量导入
-
+
{{ employeeName(row) || '-' }}
@@ -90,6 +92,8 @@
+
+
@@ -321,6 +325,8 @@ import {
} from '@/api/training'
import { useAuthStore } from '@/stores/auth'
import ResourceIcon from '@/components/icons/ResourceIcon.vue'
+import TrainingPagination from '../training/components/TrainingPagination.vue'
+import { useTrainingPager } from '../training/components/useTrainingPager'
const authStore = useAuthStore()
const loading = ref(false)
@@ -518,9 +524,10 @@ const roleText = (r: string) => roleLabelOf(r, roleDict.value, true)
const deptColumns = [
{ colKey: 'name', title: '部门名称' },
- { colKey: 'code', title: '编码', width: 140 },
+ // 000164:编码列收窄(0001 等短编码无需过宽列,原 140px 留白明显)
+ { colKey: 'code', title: '编码', width: 64 },
// 窄屏下列宽超出面板时操作列随滚动固定在右侧,保证可见可点
- { colKey: 'op', title: '操作', width: 140, fixed: 'right' },
+ { colKey: 'op', title: '操作', width: 116, fixed: 'right' },
]
// 管理角色额外有「企微账号/设置角色」操作,操作列随之加宽(computed 随权限就绪刷新)
@@ -597,6 +604,28 @@ watch(keyword, () => {
searchTimer = setTimeout(() => loadEmployees(), 300)
})
+// 共用分页(000164):部门/员工档案列表默认每页 15 条;
+// 查找或增删改刷新列表后回到第 1 页
+const {
+ page: deptPage,
+ pageSize: deptPageSize,
+ total: deptTotal,
+ paged: pagedDepts,
+ reset: resetDeptPage,
+} = useTrainingPager(depts)
+const {
+ page: employeePage,
+ pageSize: employeePageSize,
+ total: employeeTotal,
+ paged: pagedEmployees,
+ reset: resetEmployeePage,
+} = useTrainingPager(employees)
+
+watch([depts, employees], () => {
+ resetDeptPage()
+ resetEmployeePage()
+})
+
const loadAll = async () => {
// 平台用户一并拉取,用于姓名兜底联查(user_id → 用户名)。
const [d, u] = await Promise.all([
@@ -824,16 +853,24 @@ onMounted(() => {
padding: var(--app-space-3) 0 var(--app-space-6);
}
-// 3/7 分栏:部门列占 3,员工档案列占 7;窄屏退化为单列
+// 分栏:部门列收窄为固定宽度(000164,原 3fr 过宽且编码列留白明显),
+// 员工档案占剩余全部宽度;窄屏退化为单列
.org-layout {
display: grid;
- grid-template-columns: 3fr 7fr;
+ grid-template-columns: 280px minmax(0, 1fr);
gap: 12px;
align-items: start;
@media (max-width: 900px) {
grid-template-columns: 1fr;
}
+
+ // 000164 栅格子项收敛:员工档案表格/工具行较宽,缺省 min-width 会把
+ // 栅格轨道撑出视口,右侧列与操作按钮被裁掉不可见不可点;
+ // 收敛后表格在面板内横向滚动,操作列 fixed:right 始终可见
+ > .panel-box {
+ min-width: 0;
+ }
}
.panel-box {