|
|
|
@ -2,13 +2,13 @@ |
|
|
|
<div> |
|
|
|
<el-card> |
|
|
|
<!-- <el-button type="primary" @click="addorginiztiom">新增组织</el-button> --> |
|
|
|
|
|
|
|
<div class="publicfontsize">科室设置</div> |
|
|
|
<div class="allC"> |
|
|
|
<i |
|
|
|
<!-- <i |
|
|
|
class="el-icon-link" |
|
|
|
v-if="natureoptions.length == '0' ? false : true" |
|
|
|
></i |
|
|
|
><span>组织架构</span> |
|
|
|
><span>组织架构</span> --> |
|
|
|
<div |
|
|
|
v-if="natureoptions.length == '0' ? true : false" |
|
|
|
@click="append(node, data)" |
|
|
|
@ -36,36 +36,43 @@ |
|
|
|
style="font-size:15px" |
|
|
|
></i> --> |
|
|
|
<el-button |
|
|
|
type="danger" |
|
|
|
icon="el-icon-plus" |
|
|
|
type="primary" |
|
|
|
size="small" |
|
|
|
style="padding: 3px; font-size: 15px;margin-left:5%" |
|
|
|
@click="() => addorginiztiom(node, data)" |
|
|
|
>新增同级</el-button |
|
|
|
> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
size="mini" |
|
|
|
style="padding: 3px; font-size: 15px; margin-left: 10%" |
|
|
|
style="padding: 3px; font-size: 15px;" |
|
|
|
@click="append(node, data)" |
|
|
|
></el-button> |
|
|
|
>新增子级</el-button |
|
|
|
> |
|
|
|
<!-- <i class="el-icon-delete" @click="() => deleates(node, data)" style="font-size:15px"></i> --> |
|
|
|
<el-button |
|
|
|
type="danger" |
|
|
|
icon="el-icon-delete" |
|
|
|
size="mini" |
|
|
|
style="padding: 3px; font-size: 15px" |
|
|
|
@click="() => deleates(node, data)" |
|
|
|
></el-button> |
|
|
|
>删除</el-button |
|
|
|
> |
|
|
|
|
|
|
|
<!-- <i class="el-icon-edit" @click="() => rena(node, data)" style="font-size:15px">编辑</i> --> |
|
|
|
<el-button |
|
|
|
type="danger" |
|
|
|
icon="el-icon-edit" |
|
|
|
type="primary" |
|
|
|
size="small" |
|
|
|
style="padding: 3px; font-size: 15px" |
|
|
|
@click="() => rena(node, data)" |
|
|
|
></el-button> |
|
|
|
>编辑</el-button |
|
|
|
> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</el-tree> |
|
|
|
<!-- 弹框 --> |
|
|
|
<el-button type="primary" @click="addorginiztiom" style="height: 40px" |
|
|
|
<!-- <el-button type="primary" @click="addorginiztiom" style="height: 40px" |
|
|
|
>新增组织</el-button |
|
|
|
> |
|
|
|
> --> |
|
|
|
</div> |
|
|
|
<!-- 新增组织弹框 --> |
|
|
|
<el-dialog |
|
|
|
@ -75,6 +82,28 @@ |
|
|
|
@close="closethiebox" |
|
|
|
:close-on-click-modal="false" |
|
|
|
> |
|
|
|
<div> |
|
|
|
<span>上级部门</span> |
|
|
|
<!-- <el-cascader |
|
|
|
:options="selecttable" |
|
|
|
:props="{ |
|
|
|
checkStrictly: true, |
|
|
|
children: 'treeChildren', |
|
|
|
label: 'displayName', |
|
|
|
}" |
|
|
|
clearable |
|
|
|
></el-cascader> --> |
|
|
|
<el-tree |
|
|
|
:data="selecttable" |
|
|
|
:props="defaultProp" |
|
|
|
show-checkbox |
|
|
|
ref="terr" |
|
|
|
node-key="id" |
|
|
|
:default-checked-keys="defaultKeys" |
|
|
|
@check="iscrentd" |
|
|
|
> |
|
|
|
</el-tree> |
|
|
|
</div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
是否为体检中心 |
|
|
|
@ -110,6 +139,8 @@ import { postapi, putapi, getapi } from "@/api/api"; |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
defaultKeys: [], |
|
|
|
selecttable: [], |
|
|
|
form: { |
|
|
|
parentId: "", |
|
|
|
displayName: "", |
|
|
|
@ -118,6 +149,10 @@ export default { |
|
|
|
title: 1, |
|
|
|
dialogVisible: false, |
|
|
|
natureoptions: [], |
|
|
|
defaultProp: { |
|
|
|
children: "treeChildren", |
|
|
|
label: "displayName", |
|
|
|
}, |
|
|
|
defaultProps: { |
|
|
|
children: "treeChildren", |
|
|
|
label: "displayName", |
|
|
|
@ -130,6 +165,13 @@ export default { |
|
|
|
this.getonorganization(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
//选中的组织 |
|
|
|
iscrentd() { |
|
|
|
console.log("222", this.$refs.terr.getCheckedKeys(true)); |
|
|
|
this.defaultKeys = this.$refs.terr.getCheckedKeys(true); |
|
|
|
console.log(this.defaultKeys); |
|
|
|
// console.log("222", this.$refs.tree.defaultKeys(true)); |
|
|
|
}, |
|
|
|
//close弹框关闭事件 |
|
|
|
closethiebox() {}, |
|
|
|
//关闭弹框 |
|
|
|
@ -261,8 +303,11 @@ export default { |
|
|
|
rena(node, data) { |
|
|
|
this.dialogVisible = true; |
|
|
|
this.title = 2; |
|
|
|
this.selecttable.push(data); |
|
|
|
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; |
|
|
|
@ -286,6 +331,10 @@ export default { |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
.publicfontsize { |
|
|
|
font-size: 18px; |
|
|
|
} |
|
|
|
|
|
|
|
.el-icon-plus { |
|
|
|
margin-left: 10%; |
|
|
|
} |
|
|
|
|