diff --git a/src/views/modules/base/community/community.vue b/src/views/modules/base/community/community.vue index 8f521c20c..7aff512b3 100644 --- a/src/views/modules/base/community/community.vue +++ b/src/views/modules/base/community/community.vue @@ -42,8 +42,16 @@ {{ data.showNum }} {{ ")" }} --> - {{ data.showName }} + + + {{ node.label }} + + @@ -432,6 +440,9 @@ export default { bDisabled: false, treeIsOk: true,//树点击是否加载完成 + + isShowTooltip:false, + tooltipTitle:null, }; }, components: { @@ -492,6 +503,18 @@ export default { updateStartDate () { } }, methods: { + mouseOverNode(event){ + var target = event.target; + let textLength = target.clientWidth; + let containerLength = target.scrollWidth; + + if (textLength < containerLength) { + this.tooltipTitle = event.target.innerText; + this.isShowTooltip = false; + } else { + this.isShowTooltip = true; + } + }, handleChangeV (val) { this.buildingId = ""; this.buildingUnitId = ""; @@ -1006,28 +1029,44 @@ export default { .div_tree { margin: 7px 8px 7px 7px; - width: 30%; - max-width: 304px; - min-width: 240px; + width: 200px; + padding: 24px 15px; + background: #ffffff; + box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.08), + 0px 3px 6px -4px rgba(0, 0, 0, 0.12); + // border-radius: 5px; + overflow-y: hidden; /deep/ .el-scrollbar__wrap { overflow-x: hidden !important; } - + /deep/ .el-scrollbar__bar{ + right: -2px; + } //搜索输入框样式 /deep/ .el-input--medium .el-input__inner { height: 32px; background: rgba(0, 0, 0, 0.05); border-radius: 4px; } - flex: 0 0 280px; - background: #ffffff; - box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.08), - 0px 3px 6px -4px rgba(0, 0, 0, 0.12); - // border-radius: 5px; - padding: 24px 15px; - overflow-y: hidden; + +} +.custom-tree-node { + flex: 1; + display: flex; + align-items: center; + justify-content: space-between; + font-size: 14px; + overflow: hidden; } +.over-ellipsis { + display: block; + width: 140PX; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + -webkit-line-clamp: 1; +} .filter_tree { overflow-x: auto; // background-color: #f6f6f6; @@ -1036,7 +1075,7 @@ export default { .div_left { // flex: 1; - width: calc(100% - 300px); + width: calc(100% - 200px); } ::v-deep .el-dialog__body { padding: 0; diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index f33746b63..f8a40f883 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -24,7 +24,7 @@ :default-expanded-keys="autoOpenArr" :load="lazyLoadTree" > - +
- {{ data.label }} - + + + {{ node.label }} + + + +
-
+
`, + 'data':{id: item.id,type:item.type,name:item.name}, + })) @@ -97,7 +99,22 @@ export default { }, onNodeClick(nodeObject, $event) { - console.log('onNodeClick:', nodeObject); + let {name,id,type} = nodeObject.data + if(type === 0){ + this.$store.dispatch("saveData", { + resiId:id, + name + }); + this.$router.push({ name: 'jumin-huaxiang' }); + this.$store.state.contentTabs = this.$store.state.contentTabs.map( + (item) => { + if (item.name === "jumin-huaxiang") { + return { ...item, title: name }; + } + return item; + } + ); + } }, onLineClick(lineObject, $event) { console.log('onLineClick:', lineObject);