|
@@ -74,7 +74,12 @@
|
|
|
</el-radio-group>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <gantt-elastic :tasks="tasks" :options="options" />
|
|
|
+ <gantt-elastic
|
|
|
+ :tasks="tasks"
|
|
|
+ :options="options"
|
|
|
+ >
|
|
|
+ <gantt-elastic-header v-show="false" slot="header" ref="ganttHeader" />
|
|
|
+ </gantt-elastic>
|
|
|
</el-main>
|
|
|
</el-container>
|
|
|
</template>
|
|
@@ -83,11 +88,12 @@
|
|
|
import workbenchApi from '@/api/workbench.js'
|
|
|
import { queryBizTypeList } from '@/api/defectManage'
|
|
|
import GanttElastic from 'gantt-elastic'
|
|
|
-// import Header from 'gantt-elastic-header'
|
|
|
+import GanttHeader from 'gantt-elastic-header'
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
+ ganttElasticHeader: GanttHeader,
|
|
|
ganttElastic: GanttElastic
|
|
|
},
|
|
|
data() {
|
|
@@ -239,6 +245,15 @@ export default {
|
|
|
this.queryTeamWorkList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ tasksUpdate(tasks) {
|
|
|
+ this.tasks = tasks
|
|
|
+ },
|
|
|
+ optionsUpdate(options) {
|
|
|
+ this.options = options
|
|
|
+ },
|
|
|
+ styleUpdate(style) {
|
|
|
+ this.dynamicStyle = style
|
|
|
+ },
|
|
|
radioChange(val) {
|
|
|
if (val === '忙碌') {
|
|
|
this.queryTeamWorkList()
|
|
@@ -246,10 +261,20 @@ export default {
|
|
|
this.queryTeamIdleList()
|
|
|
}
|
|
|
if (val === '今天') {
|
|
|
- if (this.radio2TF) {
|
|
|
- this.radio2 = ''
|
|
|
- }
|
|
|
- this.radio2TF = !this.radio2TF
|
|
|
+ // if (this.radio2TF) {
|
|
|
+ // this.radio2 = ''
|
|
|
+ // }
|
|
|
+ this.$refs.ganttHeader.recenterPosition()
|
|
|
+ // this.radio2TF = !this.radio2TF
|
|
|
+ }
|
|
|
+ if (val === '月') {
|
|
|
+ this.$refs.ganttHeader.setScale(22)
|
|
|
+ }
|
|
|
+ if (val === '周') {
|
|
|
+ this.$refs.ganttHeader.setScale(20)
|
|
|
+ }
|
|
|
+ if (val === '日') {
|
|
|
+ this.$refs.ganttHeader.setScale(10)
|
|
|
}
|
|
|
},
|
|
|
queryTeamInfoList(username) {
|