From f79ba3b14981afb87999cfcb14d204bacb80f635 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Sat, 23 Mar 2024 16:38:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=BF=E5=B1=8B=E5=9B=BE=E8=B0=B1=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6,=E7=BB=84=E7=BB=87=E6=A0=91=E5=AE=BD=E5=BA=A6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9,=E9=BC=A0=E6=A0=87=E7=A7=BB=E5=85=A5?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=85=A8=E9=83=A8=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/community.vue | 67 +++++++++++---- src/views/modules/base/resi.vue | 84 +++++++++++++++---- .../modules/portrayal/house/cpts/graph.vue | 21 ++++- 3 files changed, 141 insertions(+), 31 deletions(-) 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);