diff --git a/src/components/staff/deleteStaff.vue b/src/components/staff/deleteStaff.vue index 8ca2cf657..41c5d5fac 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 a2bad48bc..67d401da8 100644 --- a/src/views/staff/aStaffList.vue +++ b/src/views/staff/aStaffList.vue @@ -41,7 +41,7 @@ diff --git a/src/views/staff/staffList.vue b/src/views/staff/staffList.vue index 12a41dee5..f4d6da998 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