|
|
|
@ -82,12 +82,13 @@ |
|
|
|
@close="closethiebox" |
|
|
|
:close-on-click-modal="false" |
|
|
|
> |
|
|
|
<div v-if="title==2"> |
|
|
|
当前选中的科室<span style="margin-left: 20px; font-size: 18px">{{ |
|
|
|
departmentname |
|
|
|
}}</span> |
|
|
|
<div v-if="title == 2"> |
|
|
|
当前选中的科室<span |
|
|
|
style="margin-left: 20px; font-size: 18px; margin-top: -20px" |
|
|
|
>{{ departmentname }}</span |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div v-if="title==2" > |
|
|
|
<div v-if="title == 2"> |
|
|
|
<span>上级部门</span> |
|
|
|
<el-cascader |
|
|
|
ref="depref" |
|
|
|
@ -110,7 +111,7 @@ |
|
|
|
</el-tree> --> |
|
|
|
</div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8" style="line-height:40px"> |
|
|
|
<el-col :span="8" style="line-height: 40px"> |
|
|
|
是否为体检中心 |
|
|
|
<el-radio v-model="form.isPeis" label="Y">是</el-radio> |
|
|
|
<el-radio v-model="form.isPeis" label="N">否</el-radio> |
|
|
|
@ -146,11 +147,12 @@ export default { |
|
|
|
return { |
|
|
|
showcheckbox: false, |
|
|
|
defaultKeys: [], |
|
|
|
selecttable: [], |
|
|
|
selecttable: [], //科室的选择选中 |
|
|
|
form: { |
|
|
|
parentId: "", |
|
|
|
displayName: "", |
|
|
|
isPeis: "N", |
|
|
|
departmentname: "", |
|
|
|
}, |
|
|
|
title: 1, |
|
|
|
dialogVisible: false, |
|
|
|
@ -175,10 +177,12 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
cascaderchang(v) { |
|
|
|
v.forEach(item => { |
|
|
|
this.departmentname=item |
|
|
|
|
|
|
|
}); |
|
|
|
console.log(this.departmentname); |
|
|
|
this.departmentname = v[v.length - 1]; |
|
|
|
// console.log(v[v.length-1]); |
|
|
|
// v.forEach((item) => { |
|
|
|
// this.departmentname = item; |
|
|
|
// }); |
|
|
|
// let a=this.depref.value.togglePoppervisible() |
|
|
|
// console.log(a); |
|
|
|
}, |
|
|
|
@ -188,7 +192,9 @@ export default { |
|
|
|
console.log(data); |
|
|
|
}, |
|
|
|
//close弹框关闭事件 |
|
|
|
closethiebox() {}, |
|
|
|
closethiebox() { |
|
|
|
this.departmentname = ""; |
|
|
|
}, |
|
|
|
//关闭弹框 |
|
|
|
closethebulletbox() { |
|
|
|
this.dialogVisible = false; |
|
|
|
@ -225,7 +231,8 @@ export default { |
|
|
|
}).then((res) => { |
|
|
|
this.$message.success("新增成功"); |
|
|
|
this.dialogVisible = false; |
|
|
|
this.form = {}; |
|
|
|
// this.form = {}; |
|
|
|
this.form.displayName = ""; |
|
|
|
this.form.isPeis = "N"; |
|
|
|
this.getonorganization(); |
|
|
|
}); |
|
|
|
@ -243,7 +250,7 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
//添加父级组织 |
|
|
|
addorginiztiom() { |
|
|
|
addorginiztiom(node, data) { |
|
|
|
// this.$prompt("组织名称", "新增组织", { |
|
|
|
// confirmButtonText: "确定", |
|
|
|
// cancelButtonText: "取消", |
|
|
|
@ -269,7 +276,6 @@ export default { |
|
|
|
//新增组织组织 |
|
|
|
append(node, data) { |
|
|
|
this.title = 3; |
|
|
|
|
|
|
|
if (this.title == 3) { |
|
|
|
this.dialogVisible = true; |
|
|
|
this.form.parentId = data.id; |
|
|
|
@ -312,25 +318,43 @@ export default { |
|
|
|
}, |
|
|
|
//删除组织 |
|
|
|
deleates(data) { |
|
|
|
deleteschema(data.data.id).then((res) => { |
|
|
|
console.log(res); |
|
|
|
this.$message.success("删除成功"); |
|
|
|
this.getonorganization(); |
|
|
|
this.$confirm("是否确定删除, 是否继续?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}).then((res) => { |
|
|
|
deleteschema(data.data.id).then((res) => { |
|
|
|
if (res.code == 0) { |
|
|
|
console.log(res); |
|
|
|
this.$message.success("删除成功"); |
|
|
|
this.getonorganization(); |
|
|
|
} |
|
|
|
}); |
|
|
|
console.log(data); |
|
|
|
}); |
|
|
|
console.log(data); |
|
|
|
}, |
|
|
|
//编辑组织 |
|
|
|
rena(node, data) { |
|
|
|
console.log(data); |
|
|
|
this.dialogVisible = true; |
|
|
|
this.title = 2; |
|
|
|
this.selecttable.push(data); |
|
|
|
// this.selecttable.push(data); |
|
|
|
this.showcheckbox = true; |
|
|
|
console.log(this.selecttable, 5555); |
|
|
|
getapi(`/api/app/organization-units?Id=${data.id}`).then((res) => { |
|
|
|
this.form = res.data; |
|
|
|
// this.selecttable.push(res.data) |
|
|
|
console.log(res); |
|
|
|
this.form = data; |
|
|
|
this.form.isPeis = "N"; |
|
|
|
// console.log(this.selecttable, 5555); |
|
|
|
getapi( |
|
|
|
`/api/app/organizationunit/getbycodeparent?OrganizationUnitId=${data.id}` |
|
|
|
).then((res) => { |
|
|
|
this.selecttable = res.data; |
|
|
|
console.log(res, "res"); |
|
|
|
}); |
|
|
|
// getapi(`/api/app/organization-units?Id=${data.id}`).then((res) => { |
|
|
|
// this.form = res.data; |
|
|
|
|
|
|
|
// console.log(res); |
|
|
|
// }); |
|
|
|
|
|
|
|
// this.form = data; |
|
|
|
// console.log(this.form); |
|
|
|
// console.log(data); |
|
|
|
|