|
@@ -22,12 +22,12 @@
|
|
|
<div v-loading="loading">
|
|
|
<div v-if="ganttShow">
|
|
|
<gantt-elastic :tasks="tasks" :options="options">
|
|
|
- <gantt-elastic-header v-show="false" slot="header" ref="ganttHeader" />
|
|
|
+ <gantt-elastic-header slot="header" ref="ganttHeader" />
|
|
|
</gantt-elastic>
|
|
|
</div>
|
|
|
<div v-if="personal">
|
|
|
<gantt-elastic v-if="personal" :tasks="tasks_personal" :options="options_personal">
|
|
|
- <gantt-elastic-header v-show="false" slot="header" ref="ganttHeader" />
|
|
|
+ <gantt-elastic-header slot="header" ref="ganttHeader" />
|
|
|
</gantt-elastic>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -189,6 +189,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.personal = true
|
|
|
+ this.setOption()
|
|
|
},
|
|
|
createTasks(data) { // 按日程
|
|
|
const today = new Date()
|
|
@@ -267,7 +268,20 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.ganttShow = true
|
|
|
+ this.setOption()
|
|
|
}
|
|
|
+ },
|
|
|
+ setOption() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ const node = document.querySelectorAll('.gantt-elastic__header-label')
|
|
|
+ node[0].style = 'display: none'
|
|
|
+ node[1].style = 'display: none'
|
|
|
+ node[2].style = 'display: none'
|
|
|
+ node[3].removeChild(node[3].childNodes[0])
|
|
|
+ const span = document.createElement('span')
|
|
|
+ span.innerText = '列表区域 :'
|
|
|
+ node[3].insertBefore(span, node[3].childNodes[0])
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -277,6 +291,19 @@ export default {
|
|
|
.gantt-view-header{
|
|
|
margin: 0 40px 20px 40px;
|
|
|
}
|
|
|
+>>>.gantt-elastic__header {
|
|
|
+ display: block !important;
|
|
|
+ background: #FFF !important;
|
|
|
+ }
|
|
|
+>>>.gantt-elastic__header-title {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ >>>.gantt-elastic__header-btn-recenter {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ >>>.gantt-elastic__header-task-list-switch--wrapper {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
.table-top {
|
|
|
margin: 0 30px 20px;
|
|
|
width: 95%;
|