|
|
|
@ -24,7 +24,7 @@ |
|
|
|
:default-expanded-keys="autoOpenArr" |
|
|
|
:load="lazyLoadTree" |
|
|
|
> |
|
|
|
<span slot-scope="{ node, data }" class="custom-tree-node"> |
|
|
|
<div slot-scope="{ node, data }" class="custom-tree-node"> |
|
|
|
<!-- <img |
|
|
|
v-if="showIcons(data)" |
|
|
|
src="@/assets/images/index/abnormal.png" |
|
|
|
@ -43,12 +43,22 @@ |
|
|
|
<span style="color: red">{{ data.showNum }}</span> |
|
|
|
<span>{{ ")" }}</span> |
|
|
|
</span> --> |
|
|
|
<span :id="data.id">{{ data.label }}</span> |
|
|
|
</span> |
|
|
|
<el-tooltip |
|
|
|
:content="tooltipTitle" |
|
|
|
:disabled="isShowTooltip" |
|
|
|
placement="top" |
|
|
|
effect="dark" |
|
|
|
> |
|
|
|
<span class="over-ellipsis" @mouseover="mouseOverNode($event)"> |
|
|
|
{{ node.label }} |
|
|
|
</span> |
|
|
|
</el-tooltip> |
|
|
|
<!-- <span :id="data.id">{{ data.label }}</span> --> |
|
|
|
</div> |
|
|
|
</el-tree> |
|
|
|
</el-scrollbar> |
|
|
|
</div> |
|
|
|
<section style="width: calc(100% - 300px)"> |
|
|
|
<section style="width: calc(100% - 200px)"> |
|
|
|
<div class="m-search"> |
|
|
|
<section |
|
|
|
:class=" |
|
|
|
@ -556,6 +566,8 @@ export default { |
|
|
|
|
|
|
|
category: this.$route.query.category, |
|
|
|
searchForm: {}, |
|
|
|
isShowTooltip:false, |
|
|
|
tooltipTitle:null, |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
@ -586,7 +598,13 @@ export default { |
|
|
|
|
|
|
|
async mounted() { |
|
|
|
this.searchH = this.$refs.myResiSearch.offsetHeight; |
|
|
|
this.loadTree(); |
|
|
|
await this.loadTree(); |
|
|
|
if (this.treeData.length > 0) { |
|
|
|
this.$nextTick(() => { |
|
|
|
// ref_tree 元素的ref value 绑定的node-key |
|
|
|
this.$refs.ref_tree.setCurrentKey(this.treeData[0].id); |
|
|
|
}); |
|
|
|
} |
|
|
|
this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({ |
|
|
|
elseParams: { |
|
|
|
categoryKeys: ["resi_info"], |
|
|
|
@ -595,8 +613,22 @@ export default { |
|
|
|
}); |
|
|
|
this.handleSearchFrom(); |
|
|
|
}, |
|
|
|
|
|
|
|
activated(){ |
|
|
|
this.handleSearchFrom(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
mouseOverNode(event){ |
|
|
|
var target = event.target; |
|
|
|
let textLength = target.clientWidth; |
|
|
|
let containerLength = target.scrollWidth; |
|
|
|
console.log(textLength,containerLength); |
|
|
|
if (textLength < containerLength) { |
|
|
|
this.tooltipTitle = event.target.innerText; |
|
|
|
this.isShowTooltip = false; |
|
|
|
} else { |
|
|
|
this.isShowTooltip = true; |
|
|
|
} |
|
|
|
}, |
|
|
|
// 更新按钮权限 |
|
|
|
updateBtnAuths() { |
|
|
|
let rot = this.$route; |
|
|
|
@ -773,10 +805,6 @@ export default { |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
if (err == "cancel") { |
|
|
|
// this.$message({ |
|
|
|
// type: "info", |
|
|
|
// message: "已取消删除" |
|
|
|
// }); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
@ -1273,12 +1301,39 @@ 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; |
|
|
|
.scrollar{ |
|
|
|
margin-top: 30px; |
|
|
|
} |
|
|
|
/deep/ .el-scrollbar__wrap { |
|
|
|
overflow-x: hidden !important; |
|
|
|
} |
|
|
|
/deep/ .el-scrollbar__bar{ |
|
|
|
right: -2px; |
|
|
|
} |
|
|
|
.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; |
|
|
|
} |
|
|
|
|
|
|
|
//搜索输入框样式 |
|
|
|
/deep/ .el-input--medium .el-input__inner { |
|
|
|
@ -1286,12 +1341,11 @@ export default { |
|
|
|
background: rgba(0, 0, 0, 0.05); |
|
|
|
border-radius: 4px; |
|
|
|
} |
|
|
|
flex: 0 0 280px; |
|
|
|
// 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; |
|
|
|
} |
|
|
|
|
|
|
|
|