|
|
@ -4,8 +4,9 @@ |
|
|
<el-input placeholder="输入关键字进行过滤" v-model="filterText" size="small" /> |
|
|
<el-input placeholder="输入关键字进行过滤" v-model="filterText" size="small" /> |
|
|
</div> |
|
|
</div> |
|
|
<div> |
|
|
<div> |
|
|
<el-tree :style="'overflow: scroll;height:' + (window.pageHeight < 600 ? 465 : window.pageHeight - 135) + 'px;width:200px;'" |
|
|
|
|
|
:data="patientRegister.customerOrgTreeAll" :props="treeprops" node-key="id" |
|
|
|
|
|
|
|
|
<el-tree |
|
|
|
|
|
:style="'overflow: scroll;height:' + (window.pageHeight < 600 ? 465 : window.pageHeight - 135) + 'px;width:200px;'" |
|
|
|
|
|
:data="patientRegister.customerOrgTreeAll" :props="treeprops" node-key="id" @node-contextmenu="nodeContextmenu" |
|
|
:filter-node-method="filterNode" @node-click="treeclick" highlight-current ref="customerOrgTree"> |
|
|
:filter-node-method="filterNode" @node-click="treeclick" highlight-current ref="customerOrgTree"> |
|
|
<span class="custom-tree-node" slot-scope="{ node, data }"> |
|
|
<span class="custom-tree-node" slot-scope="{ node, data }"> |
|
|
<div> |
|
|
<div> |
|
|
@ -95,6 +96,52 @@ export default { |
|
|
// }); |
|
|
// }); |
|
|
// }, |
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
// 节点右击事件 |
|
|
|
|
|
nodeContextmenu(event, data, node, ids) { |
|
|
|
|
|
// console.log('event,data,node,ids', event, data, node, ids) |
|
|
|
|
|
if (data.id == this.dict.personOrgId) return |
|
|
|
|
|
|
|
|
|
|
|
let items = [ |
|
|
|
|
|
{ |
|
|
|
|
|
label: "置顶", |
|
|
|
|
|
onClick: () => { |
|
|
|
|
|
this.treeSort(data, 1); |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: "置底", |
|
|
|
|
|
onClick: () => { |
|
|
|
|
|
this.treeSort(data, 2); |
|
|
|
|
|
}, |
|
|
|
|
|
} |
|
|
|
|
|
] //菜单项 |
|
|
|
|
|
this.$contextmenu({ |
|
|
|
|
|
items, |
|
|
|
|
|
event, |
|
|
|
|
|
//x: event.clientX, |
|
|
|
|
|
//y: event.clientY, |
|
|
|
|
|
customClass: "custom-class", |
|
|
|
|
|
zIndex: 3, |
|
|
|
|
|
minWidth: 80, |
|
|
|
|
|
}); |
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 树节点排序 |
|
|
|
|
|
treeSort(data, sortType) { |
|
|
|
|
|
// if (data.parentId) { |
|
|
|
|
|
// this.$message.warning({ showClose: true, message: "请选择一级单位" }) |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
// console.log('data,sortType',data,sortType) |
|
|
|
|
|
putapi(`/api/app/customerorg/updatemanysort?id=${data.id}&SortType=${sortType}`).then(res => { |
|
|
|
|
|
if (res.code > -1) { |
|
|
|
|
|
this.getCustomerOrgTree() |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
//树过滤 |
|
|
//树过滤 |
|
|
filterNode(value, data) { |
|
|
filterNode(value, data) { |
|
|
//console.log(value,data) |
|
|
//console.log(value,data) |
|
|
@ -130,6 +177,7 @@ export default { |
|
|
font-size: 20px; |
|
|
font-size: 20px; |
|
|
margin-right: 5px; |
|
|
margin-right: 5px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
:deep .el-tree-node>.el-tree-node__children { |
|
|
:deep .el-tree-node>.el-tree-node__children { |
|
|
overflow: visible; |
|
|
overflow: visible; |
|
|
} |
|
|
} |
|
|
|