Commit e1a3419f authored by “lixuyan”'s avatar “lixuyan”

修改甘特图提示的问题

parent ccb5818f
<template> <template>
<div class="TfMomWebStep-model"> <div class="TfMomWebStep-model">
<div :id="ganttElId" style="height: 100%;width: 100%;position: relative;" /> <div :id="ganttElId" style="height: 100%;width: 100%;position: relative;" @mouseleave="hideTooltip" />
</div> </div>
</template> </template>
...@@ -61,6 +61,11 @@ export default { ...@@ -61,6 +61,11 @@ export default {
}, },
methods: { methods: {
hideTooltip() {
setTimeout(() => {
this.gantt.ext.tooltips.tooltip.hide()
}, 100)
},
configLayout() { configLayout() {
const ganttAg = this.gantt const ganttAg = this.gantt
this.setColumnsConfig() this.setColumnsConfig()
...@@ -120,7 +125,6 @@ export default { ...@@ -120,7 +125,6 @@ export default {
return ganttAg.$root.querySelector('.gantt_task') return ganttAg.$root.querySelector('.gantt_task')
} }
} }
ganttAg.config.date_format = '%Y-%m-%d' ganttAg.config.date_format = '%Y-%m-%d'
// ganttAg.config.duration_unit = 'minute' // ganttAg.config.duration_unit = 'minute'
ganttAg.config.branch_loading = true ganttAg.config.branch_loading = true
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</el-input> </el-input>
</div> </div>
<div :id="ganttElId" :ref="ganttElId" class="gatt" /> <div :id="ganttElId" :ref="ganttElId" class="gatt" @mouseleave="hideTooltip" />
<sortUnit <sortUnit
:dialog-flag="dialogFlag" :dialog-flag="dialogFlag"
:unit-list="unitList" :unit-list="unitList"
...@@ -65,6 +65,11 @@ export default { ...@@ -65,6 +65,11 @@ export default {
}, },
methods: { methods: {
hideTooltip() {
setTimeout(() => {
this.gantt.ext.tooltips.tooltip.hide()
}, 100)
},
refreshGantt(val) { refreshGantt(val) {
if (!val || !val.length) { if (!val || !val.length) {
return return
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</el-input> </el-input>
</div> </div>
<div :id="ganttElId" :ref="ganttElId" class="gatt" /> <div :id="ganttElId" :ref="ganttElId" class="gatt" @mouseleave="hideTooltip" />
</div> </div>
</template> </template>
...@@ -51,6 +51,11 @@ export default { ...@@ -51,6 +51,11 @@ export default {
}, },
methods: { methods: {
hideTooltip() {
setTimeout(() => {
this.gantt.ext.tooltips.tooltip.hide()
}, 100)
},
refreshGantt(val) { refreshGantt(val) {
if (!val || !val.length) { if (!val || !val.length) {
return return
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<i class="el-icon-loading" /> <i class="el-icon-loading" />
<span>数据加载中···</span> <span>数据加载中···</span>
</div> </div>
<div :id="onlyUuid" :ref="onlyUuid" class="gannt" style="height: calc(100vh - 100px)" /> <div :id="onlyUuid" :ref="onlyUuid" class="gannt" style="height: calc(100vh - 100px)" @mouseleave="hideTooltip" />
</main> </main>
</div> </div>
</template> </template>
...@@ -70,6 +70,11 @@ export default { ...@@ -70,6 +70,11 @@ export default {
}, },
methods: { methods: {
hideTooltip() {
setTimeout(() => {
this.gantt.ext.tooltips.tooltip.hide()
}, 100)
},
// 初始化甘特图 // 初始化甘特图
initGantt() { initGantt() {
const that = this const that = this
......
<template> <template>
<div> <div>
<div :id="onlyUuid" :ref="onlyUuid" class="gantt-station-plan" /> <div :id="onlyUuid" :ref="onlyUuid" class="gantt-station-plan" @mouseleave="hideTooltip" />
</div> </div>
</template> </template>
...@@ -55,6 +55,11 @@ export default { ...@@ -55,6 +55,11 @@ export default {
}, },
methods: { methods: {
hideTooltip() {
setTimeout(() => {
this.gantt.ext.tooltips.tooltip.hide()
}, 100)
},
initGantt() { initGantt() {
const that = this const that = this
const ganttStm = this.gantt const ganttStm = this.gantt
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment