diff --git a/src/components/GanttComponent.vue b/src/components/GanttComponent.vue index 587b7f6f..cc6b0865 100644 --- a/src/components/GanttComponent.vue +++ b/src/components/GanttComponent.vue @@ -1,164 +1,200 @@ \ No newline at end of file + diff --git a/src/views/pm/utask_dept10.vue b/src/views/pm/utask_dept10.vue index e2a1d8e9..9f56047c 100644 --- a/src/views/pm/utask_dept10.vue +++ b/src/views/pm/utask_dept10.vue @@ -201,6 +201,7 @@ class="left-container" v-if="ganntVisit" :tasks="tasks" + :key="timeStamp" :start_date="start_date" > @@ -247,6 +248,7 @@ export default { dateValue: "", apiUtask: null, apiObj: null, + timeStamp: "", ganntVisit: true, visibleRecord: false, currentDept: { id: 0 }, @@ -289,7 +291,8 @@ export default { let data = []; that.ganntVisit = false; that.tasks.data = []; - console.log("tableData", tableData); + let date = new Date(); + that.timeStamp = date.getTime(); if (tableData.length > 0) { tableData.forEach((item) => { let start_date = item.start_date; @@ -328,7 +331,6 @@ export default { that.tasks.data = data; that.ganntVisit = true; gantt.parse(that.tasks); - // 刷新数据 gantt.refreshData(); }, getGantt() { diff --git a/src/views/pm/utask_dept6.vue b/src/views/pm/utask_dept6.vue index 30d526c2..49f25b72 100644 --- a/src/views/pm/utask_dept6.vue +++ b/src/views/pm/utask_dept6.vue @@ -212,6 +212,7 @@ class="left-container" v-if="ganntVisit" :tasks="tasks" + :key="timeStamp" :start_date="start_date" > @@ -258,6 +259,7 @@ export default { start_date: "", end_date: "", }, + timeStamp: "", ganntVisit: true, dateValue: "", apiUtask: null, @@ -304,7 +306,8 @@ export default { let data = []; that.ganntVisit = false; that.tasks.data = []; - console.log("tableData", tableData); + let date = new Date(); + that.timeStamp = date.getTime(); if (tableData.length > 0) { tableData.forEach((item) => { let start_date = item.start_date; @@ -341,9 +344,8 @@ export default { }); } that.tasks.data = data; - that.ganntVisit = true; gantt.parse(that.tasks); - // 刷新数据 + that.ganntVisit = true; gantt.refreshData(); }, getGantt() { diff --git a/src/views/pm/utask_dept7.vue b/src/views/pm/utask_dept7.vue index d41a8c9a..52fe466a 100644 --- a/src/views/pm/utask_dept7.vue +++ b/src/views/pm/utask_dept7.vue @@ -45,7 +45,6 @@ stripe :params="paramsUtask" :query="queryUtask" - @row-click="rowclick" @selection-change="handleSelectionChange" @dataChange="updateCount" > @@ -233,6 +232,7 @@ @@ -277,6 +277,7 @@ export default { tasks: { data: [], }, + timeStamp: "", ganntVisit: true, dateValue: [], apiUtask: null, @@ -300,6 +301,8 @@ export default { }, mounted() { this.initDept(); + let date = new Date(); + this.timeStamp = date.getTime(); }, methods: { initDept() { @@ -310,9 +313,7 @@ export default { if (res.length == 1) { that.currentDept = res[0]; that.paramsUtask.belong_dept = that.currentDept.id; - // that.paramsObj.belong_dept = that.currentDept.id; that.apiUtask = that.$API.pm.utask.list; - // that.getGantt(); } else { that.$message.error("未找到车间"); } @@ -322,9 +323,10 @@ export default { let that = this; this.count = res.count; let data = []; - that.ganntVisit = false; that.tasks.data = []; - console.log("tableData", tableData); + that.ganntVisit = false; + let date = new Date(); + that.timeStamp = date.getTime(); if (tableData.length > 0) { tableData.forEach((item) => { let start_date = item.start_date; @@ -361,9 +363,8 @@ export default { }); } that.tasks.data = data; - that.ganntVisit = true; gantt.parse(that.tasks); - // 刷新数据 + that.ganntVisit = true; gantt.refreshData(); }, utaskDepuse() {