|
|
|
@ -3,27 +3,25 @@ |
|
|
|
<!-- <div style="margin:2px 2px 2px 2px;"> |
|
|
|
<el-input placeholder="输入关键字进行过滤" v-model="filterText" size="small" /> |
|
|
|
</div> --> |
|
|
|
<div :style="'overflow: scroll;height:' +(window.pageHeight < 600 ? 480 : window.pageHeight - 110) + 'px;background-color: #fff;margin-top: 10px;'"> |
|
|
|
<el-tree :data="dataTransOpts.tableM.menu_info" :props="customerOrg.treeprops" |
|
|
|
node-key="id" :filter-node-method="filterNode" |
|
|
|
:default-expanded-keys="customerOrg.defaultExpandedKeys" |
|
|
|
@node-click="treeclick" highlight-current ref="customerOrgTree"> |
|
|
|
<div |
|
|
|
:style="'overflow: scroll;height:' + (window.pageHeight < 600 ? 480 : window.pageHeight - 110) + 'px;background-color: #fff;margin-top: 10px;'"> |
|
|
|
<el-tree :data="dataTransOpts.tableM.menu_info" :props="customerOrg.treeprops" node-key="id" :filter-node-method="filterNode" |
|
|
|
:default-expanded-keys="customerOrg.defaultExpandedKeys" @node-click="treeclick" highlight-current |
|
|
|
ref="customerOrgTree"> |
|
|
|
<span class="custom-tree-node" slot-scope="{ node, data }"> |
|
|
|
<div> |
|
|
|
<span class="treeicons"> |
|
|
|
<!-- <i |
|
|
|
<div> |
|
|
|
<span class="treeicons"> |
|
|
|
<!-- <i |
|
|
|
class="el-icon-document-remove" |
|
|
|
v-if="data.parentId == null" |
|
|
|
></i> --> |
|
|
|
<img style="width:20px;height:20px;vertical-align: sub;" src="@/assets/images/order.png" v-if="!data.parentId"/> |
|
|
|
</span> |
|
|
|
<span |
|
|
|
:class="!data.parentId ? 'maxtitle' : 'mintitle'" |
|
|
|
>{{ node.label }}</span |
|
|
|
> |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</el-tree> |
|
|
|
<img style="width:20px;height:20px;vertical-align: sub;" src="@/assets/images/order.png" |
|
|
|
v-if="!data.parentId" /> |
|
|
|
</span> |
|
|
|
<span :class="!data.parentId ? 'maxtitle' : 'mintitle'">{{ node.label }}</span> |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</el-tree> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -37,21 +35,21 @@ export default { |
|
|
|
components: {}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
filterText:'' |
|
|
|
filterText: '', |
|
|
|
}; |
|
|
|
}, |
|
|
|
//<el-tree :data="$store.state.customerOrg.customerOrgTree" :props="$store.state.customerOrg.treeprops" @node-click="treeclick"></el-tree> |
|
|
|
computed: { |
|
|
|
...mapState(["window", "dataTransOpts", "customerOrg" ]), |
|
|
|
|
|
|
|
treeHeight(){ |
|
|
|
let temp = this.window.pageHeaderHeight + this.window.pageMarginHeight + this.window.cardHeaderHeight + 32 + 20 |
|
|
|
return this.window.pageHeight < 600 ? (600 - temp):(this.window.pageHeight - temp) |
|
|
|
...mapState(["window", "dataTransOpts", "customerOrg"]), |
|
|
|
|
|
|
|
treeHeight() { |
|
|
|
let temp = this.window.pageHeaderHeight + this.window.pageMarginHeight + this.window.cardHeaderHeight + 32 + 20 |
|
|
|
return this.window.pageHeight < 600 ? (600 - temp) : (this.window.pageHeight - temp) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//创建组件后 |
|
|
|
created() { |
|
|
|
created() { |
|
|
|
}, |
|
|
|
|
|
|
|
//挂载组件完成 |
|
|
|
@ -64,9 +62,9 @@ export default { |
|
|
|
...mapMutations(["setData"]), |
|
|
|
|
|
|
|
//获取体检单位列表树信息 |
|
|
|
getMenuInfoTree() { |
|
|
|
getMenuInfoTree() { |
|
|
|
getapi("/api/app/menuinfo/getmenuinfotreelist").then((res) => { |
|
|
|
if(res.code != -1){ |
|
|
|
if (res.code != -1) { |
|
|
|
this.dataTransOpts.tableM.menu_info = res.data |
|
|
|
tcdate(this.dataTransOpts.tableM.menu_info); |
|
|
|
} |
|
|
|
@ -78,7 +76,7 @@ export default { |
|
|
|
this.dataTransOpts.tableS.menu_info.id = data.id; |
|
|
|
setTimeout(() => { |
|
|
|
this.dataTransOpts.refresh.menu_info.S++ |
|
|
|
}, 20); |
|
|
|
}, 20); |
|
|
|
}, |
|
|
|
|
|
|
|
//树过滤 |
|
|
|
@ -90,26 +88,27 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
watch: { |
|
|
|
"customerOrg.treeCurrentNodekey"(newVal,oldVal){ |
|
|
|
"customerOrg.treeCurrentNodekey"(newVal, oldVal) { |
|
|
|
//console.log('watch:customerOrg.treeCurrentNodekey',newVal,oldVal) |
|
|
|
if(newVal && newVal != oldVal){ |
|
|
|
if (newVal && newVal != oldVal) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['customerOrgTree'].setCurrentKey(newVal); |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
"filterText"(newVal,oldVal){ //过滤菜单 |
|
|
|
"filterText"(newVal, oldVal) { //过滤菜单 |
|
|
|
this.$refs['customerOrgTree'].filter(newVal); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
@import "../../assets/css/global.css"; |
|
|
|
@import "../../assets/css/global_tree.css"; |
|
|
|
:deep .el-tree-node>.el-tree-node__children{ |
|
|
|
|
|
|
|
:deep .el-tree-node>.el-tree-node__children { |
|
|
|
overflow: visible; |
|
|
|
} |
|
|
|
</style> |