|
|
@ -75,7 +75,7 @@ |
|
|
|
<template slot="content"> |
|
|
|
<div class="d-flex align-center"> |
|
|
|
<a-button type="primary" class="mr-2" @click="editDepartmentModal(item)"> 修改 </a-button> |
|
|
|
<a-popconfirm placement="left" title="确定删除此数据吗?" ok-text="删除" cancel-text="取消" @confirm="delpartment(item)"> |
|
|
|
<a-popconfirm placement="left" title="确定删除此数据吗?1234565" ok-text="删除" cancel-text="取消" @confirm="delpartment(item)"> |
|
|
|
<a-button type="danger"> 删除 </a-button> |
|
|
|
</a-popconfirm> |
|
|
|
</div> |
|
|
@ -95,6 +95,7 @@ |
|
|
|
@changeRole="changeRole" |
|
|
|
@editPositionModal="editPositionModal" |
|
|
|
@editDepartmentModal="editDepartmentModal" |
|
|
|
@getHospitalInfo = "getHospitalInfo" |
|
|
|
/> |
|
|
|
</a-tree-node> |
|
|
|
</template> |
|
|
@ -157,12 +158,41 @@ export default { |
|
|
|
this.$emit('editPositionModal', item); |
|
|
|
}, |
|
|
|
// 删除部门 |
|
|
|
delpartment(item) { |
|
|
|
async delpartment(item) { |
|
|
|
console.log('item: ', item); |
|
|
|
try { |
|
|
|
const params = { param: {did: item.did}}; |
|
|
|
const res = await delDepartment(params); |
|
|
|
const { code, msg, data} = res.data; |
|
|
|
if (code === 200) { |
|
|
|
this.$message.success('删除成功'); |
|
|
|
this.getHospitalInfo(); |
|
|
|
}else { |
|
|
|
this.$message.warning(msg); |
|
|
|
} |
|
|
|
}catch (e) { |
|
|
|
this.$message.warning(e); |
|
|
|
} |
|
|
|
}, |
|
|
|
getHospitalInfo() { |
|
|
|
this.$emit('getHospitalInfo'); |
|
|
|
}, |
|
|
|
// 删除职位信息 |
|
|
|
delPositionInfo(item) { |
|
|
|
async delPositionInfo(item) { |
|
|
|
console.log('item: ', item); |
|
|
|
try { |
|
|
|
const params = { param: {positionId: item.pid}}; |
|
|
|
const res = await delPosition(params); |
|
|
|
const { code, msg, data} = res.data; |
|
|
|
if (code === 200) { |
|
|
|
this.$message.success('删除成功'); |
|
|
|
this.getHospitalInfo(); |
|
|
|
}else { |
|
|
|
this.$message.warning(msg); |
|
|
|
} |
|
|
|
}catch (e) { |
|
|
|
this.$message.warning(e); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 显示修改关联角色 |
|
|
|
changeRole(id) { |
|
|
|