mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
v1.9 修复admin 员工无法删除和性别全是女的bug
This commit is contained in:
parent
6ca6117a64
commit
a1cba8c1d1
@ -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 {
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
<el-table-column prop="address" :label="$t('staff.address')" align="center" />
|
||||
<el-table-column :label="$t('staff.gender')" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.sex === 0 ? $t('staff.male') : $t('staff.female') }}
|
||||
{{ scope.row.sex == 0 ? $t('staff.male') : $t('staff.female') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('staff.operations')" align="center" width="300">
|
||||
|
||||
@ -87,7 +87,7 @@
|
||||
|
||||
<edit-staff ref="editStaff" :staff-info="currentStaff" @success="handleSuccess" />
|
||||
|
||||
<delete-staff :visible.sync="deleteStaffVisible" :staff-info="currentStaff" @success="handleSuccess" />
|
||||
<delete-staff ref="deleteStaff" @success="handleSuccess" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user