From a1cba8c1d16b73da4509a6baab219f7ed2f9d7ff Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: Tue, 23 Sep 2025 10:33:13 +0800
Subject: [PATCH] v1.9 修复admin 员工无法删除和性别全是女的bug
---
src/components/staff/deleteStaff.vue | 19 ++++++++-----------
src/views/staff/aStaffList.vue | 2 +-
src/views/staff/staffList.vue | 4 ++--
3 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/src/components/staff/deleteStaff.vue b/src/components/staff/deleteStaff.vue
index 8ca2cf6..41c5d5f 100644
--- a/src/components/staff/deleteStaff.vue
+++ b/src/components/staff/deleteStaff.vue
@@ -21,24 +21,21 @@ import { deleteStaff } from '@/api/staff/staffApi'
export default {
name: 'DeleteStaff',
- props: {
- visible: {
- type: Boolean,
- default: false
- },
- staffInfo: {
- type: Object,
- default: () => ({})
- }
- },
data() {
return {
- loading: false
+ loading: false,
+ staffInfo: {},
+ visible: false
}
},
methods: {
handleClose() {
this.$emit('update:visible', false)
+ this.visible = false
+ },
+ open(staffInfo) {
+ this.staffInfo = staffInfo
+ this.visible = true
},
async deleteStaff() {
try {
diff --git a/src/views/staff/aStaffList.vue b/src/views/staff/aStaffList.vue
index a2bad48..67d401d 100644
--- a/src/views/staff/aStaffList.vue
+++ b/src/views/staff/aStaffList.vue
@@ -41,7 +41,7 @@
- {{ scope.row.sex === 0 ? $t('staff.male') : $t('staff.female') }}
+ {{ scope.row.sex == 0 ? $t('staff.male') : $t('staff.female') }}
diff --git a/src/views/staff/staffList.vue b/src/views/staff/staffList.vue
index 12a41de..f4d6da9 100644
--- a/src/views/staff/staffList.vue
+++ b/src/views/staff/staffList.vue
@@ -87,7 +87,7 @@
-
+
@@ -186,7 +186,7 @@ export default {
},
openDeleteStaff(staff) {
this.currentStaff = { ...staff }
- this.deleteStaffVisible = true
+ this.$refs.deleteStaff.open(staff)
},
_moreCondition() {
this.staffInfo.moreCondition = !this.staffInfo.moreCondition
--
libgit2 0.21.4