|
@@ -34,11 +34,24 @@
|
|
@node-click="nodeClick"
|
|
@node-click="nodeClick"
|
|
>
|
|
>
|
|
<span slot-scope="{ node, data }" class="custom-tree-node">
|
|
<span slot-scope="{ node, data }" class="custom-tree-node">
|
|
|
|
+ <el-tooltip
|
|
|
|
+ :content="data.full_name"
|
|
|
|
+ :disabled="isShowTooltip"
|
|
|
|
+ :open-delay="300"
|
|
|
|
+ placement="top"
|
|
|
|
+ effect="dark"
|
|
|
|
+ >
|
|
<!-- <span><svg-icon :icon-class="data.type===4?'sickroom':data.type===5?'bed':'area'" />{{ data.full_name }}</span>-->
|
|
<!-- <span><svg-icon :icon-class="data.type===4?'sickroom':data.type===5?'bed':'area'" />{{ data.full_name }}</span>-->
|
|
- <span><svg-icon :style="data.customer_id ? 'color: #0a901c' : ''" :icon-class="data.type===4?'sickroom':data.type===5?'bed':'area'" />{{ data.full_name }}</span>
|
|
|
|
- <span>
|
|
|
|
|
|
+ <span @mouseover="mouseOver($event)"
|
|
|
|
+ class="over-ellipsis"
|
|
|
|
+ ><svg-icon :style="data.customer_id ? 'color: #0a901c' : ''"
|
|
|
|
+ :icon-class="data.type===4?'sickroom':data.type===5?'bed':'area'"
|
|
|
|
+ />{{ data.full_name }}</span>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ <span class="top-right">
|
|
<el-button
|
|
<el-button
|
|
v-if="data.type!==5"
|
|
v-if="data.type!==5"
|
|
|
|
+ :disabled="data.type===1"
|
|
type="text"
|
|
type="text"
|
|
size="mini"
|
|
size="mini"
|
|
icon="el-icon-plus"
|
|
icon="el-icon-plus"
|
|
@@ -206,6 +219,7 @@ export default {
|
|
return {
|
|
return {
|
|
treeData: [],
|
|
treeData: [],
|
|
treeDataClone: [],
|
|
treeDataClone: [],
|
|
|
|
+ isShowTooltip: false,
|
|
/** 当前选中的树节点 */
|
|
/** 当前选中的树节点 */
|
|
selectedNodeId: 0,
|
|
selectedNodeId: 0,
|
|
selectedNode: {},
|
|
selectedNode: {},
|
|
@@ -220,14 +234,14 @@ export default {
|
|
rules: {
|
|
rules: {
|
|
name: [
|
|
name: [
|
|
this.MixinRequired(this.$t('frameManage.inputFrameName')),
|
|
this.MixinRequired(this.$t('frameManage.inputFrameName')),
|
|
- { min: 2, max: 10, message: this.$t('frameManage.inputLong'), trigger: 'blur' }
|
|
|
|
|
|
+ { min: 2, max: 20, message: this.$t('frameManage.inputLong'), trigger: 'blur' }
|
|
],
|
|
],
|
|
alias: [
|
|
alias: [
|
|
- { min: 2, max: 10, message: this.$t('frameManage.inputLong'), trigger: 'blur' }
|
|
|
|
|
|
+ { min: 2, max: 20, message: this.$t('frameManage.inputLong'), trigger: 'blur' }
|
|
],
|
|
],
|
|
full_name: [
|
|
full_name: [
|
|
this.MixinRequired(this.$t('frameManage.inputFrameFullName')),
|
|
this.MixinRequired(this.$t('frameManage.inputFrameFullName')),
|
|
- { min: 2, max: 10, message: this.$t('frameManage.inputLong'), trigger: 'blur' }
|
|
|
|
|
|
+ { min: 2, max: 20, message: this.$t('frameManage.inputLong'), trigger: 'blur' }
|
|
]
|
|
]
|
|
},
|
|
},
|
|
/** 快速创建空间结构弹窗 **/
|
|
/** 快速创建空间结构弹窗 **/
|
|
@@ -291,7 +305,7 @@ export default {
|
|
this.formmodel.frame_parent_id = data.id
|
|
this.formmodel.frame_parent_id = data.id
|
|
this.formmodel.full_name = data.name
|
|
this.formmodel.full_name = data.name
|
|
console.log('this.formmodel.parent_id=', this.formmodel.parent_id)
|
|
console.log('this.formmodel.parent_id=', this.formmodel.parent_id)
|
|
- this.formshow = true
|
|
|
|
|
|
+ this.frameDialogVisible = true
|
|
} else {
|
|
} else {
|
|
if (data.type === FRAME_TYPE.ROOM) {
|
|
if (data.type === FRAME_TYPE.ROOM) {
|
|
this.frameEditTitle = '【' + data.full_name + '】' + this.$t('frameManage.addBed')
|
|
this.frameEditTitle = '【' + data.full_name + '】' + this.$t('frameManage.addBed')
|
|
@@ -506,12 +520,31 @@ export default {
|
|
},
|
|
},
|
|
handleCustomerChange() {
|
|
handleCustomerChange() {
|
|
this.getFrameTree()
|
|
this.getFrameTree()
|
|
|
|
+ },
|
|
|
|
+ mouseOver(event) {
|
|
|
|
+ this.isShowTooltip =
|
|
|
|
+ event.currentTarget.scrollWidth <= event.currentTarget.clientWidth;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
|
+.top-right{
|
|
|
|
+ display: block;
|
|
|
|
+ min-width: 50px;
|
|
|
|
+ width: 60px;
|
|
|
|
+ text-align: right;
|
|
|
|
+ position: absolute;
|
|
|
|
+ right: 1px;
|
|
|
|
+}
|
|
|
|
+.over-ellipsis{
|
|
|
|
+ display: block;
|
|
|
|
+ width: calc(100% - 60px);
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+}
|
|
.el-aside{
|
|
.el-aside{
|
|
margin: 8px;
|
|
margin: 8px;
|
|
padding: 8px;
|
|
padding: 8px;
|