From 891b59d328ea990fe572a80f40934aebd1d1fdd9 Mon Sep 17 00:00:00 2001 From: yelan Date: Wed, 7 Oct 2026 21:02:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(users):=20=E7=BB=84=E7=BB=87=E6=A0=91?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=88=A0=E9=99=A4=E9=99=A2=E5=8C=BA=E4=B8=8E?= =?UTF-8?q?=E7=A7=91=E5=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../users/components/OrganizationTree.vue | 113 +++++++++++++----- .../src/views/management/users/index.vue | 57 ++++++++- 2 files changed, 136 insertions(+), 34 deletions(-) diff --git a/clinical-web/src/views/management/users/components/OrganizationTree.vue b/clinical-web/src/views/management/users/components/OrganizationTree.vue index 53476d3..0bdd5a3 100644 --- a/clinical-web/src/views/management/users/components/OrganizationTree.vue +++ b/clinical-web/src/views/management/users/components/OrganizationTree.vue @@ -20,6 +20,8 @@ const emit = defineEmits<{ addDepartment: [] editCampus: [campus: CampusRecord] editDepartment: [department: DepartmentRecord] + deleteCampus: [campus: CampusRecord] + deleteDepartment: [department: DepartmentRecord] }>() const institutionGroups = computed(() => { @@ -115,15 +117,24 @@ function isDescendantSelected(department: DepartmentRecord): boolean { {{ campus.name }} {{ departmentsForCampus(campus.id).length }} 科室 - +
+ + +
🗂 {{ department.name }} - +
+ + +
{{ child.name }} - +
+ + +

@@ -371,19 +400,37 @@ function isDescendantSelected(department: DepartmentRecord): boolean { font-size: 12px; } -.org-tree__edit { - padding: 3px 6px; - margin-right: 6px; - color: var(--brand); +.org-tree__actions { + display: flex; + flex: 0 0 auto; + gap: 4px; + align-items: center; +} + +.org-tree__edit, +.org-tree__remove { + padding: 3px 7px; font-size: 10.5px; background: #fff; - border: 1px solid #d3e7ee; border-radius: 5px; opacity: 0; } +.org-tree__edit { + color: var(--brand); + border: 1px solid #d3e7ee; +} + +.org-tree__remove { + margin-right: 6px; + color: var(--err); + border: 1px solid #f0cdcd; +} + .org-tree__node:hover .org-tree__edit, -.org-tree__node:focus-within .org-tree__edit { +.org-tree__node:hover .org-tree__remove, +.org-tree__node:focus-within .org-tree__edit, +.org-tree__node:focus-within .org-tree__remove { opacity: 1; } diff --git a/clinical-web/src/views/management/users/index.vue b/clinical-web/src/views/management/users/index.vue index c99e238..5d763c2 100644 --- a/clinical-web/src/views/management/users/index.vue +++ b/clinical-web/src/views/management/users/index.vue @@ -1,10 +1,12 @@