From 4d0210621542da41d7f13f7de51b6f56c73c1ef5 Mon Sep 17 00:00:00 2001 From: Jiangdc <2658340955@qq.com> Date: Mon, 8 Jul 2024 10:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=98=E7=89=B9=E5=9B=BE=E6=8B=96=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/gantt-v/gantt.vue | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/components/gantt-v/gantt.vue b/src/components/gantt-v/gantt.vue index d0c52d1..a0e3904 100644 --- a/src/components/gantt-v/gantt.vue +++ b/src/components/gantt-v/gantt.vue @@ -61,6 +61,7 @@ :class="' block-type-' + task.type" @mousedown="onMouseDown($event, task.id, rowIndex)" @contextmenu.prevent="onRightClick($event, item[listKey], task)" + @mouseup="handleMouseUpTask($event, task, index)" @click.stop="onClicked(task, index)"> {{ task.title }} @@ -71,7 +72,7 @@ {{ item.remark }} -
+
this.$refs.ganttYd.offsetTop ) { + console.log(true,'11111111111', this.ganttData); + this.datas.push(task) + setTimeout(() => { + this.ganttData.forEach((item, index) => { + if (item.id == task.equipmentId) { + console.log(index,this.ganttData[index].blockList.findIndex(ite => ite.id == task.id),'this.ganttData[index].blockList.findIndex(ite => ite.id == task.id)'); + let i = this.ganttData[index].blockList.findIndex(ite => ite.id == task.id) + this.ganttData[index].blockList.splice(i, 1); + } + }) + },100) + + + } + // let gttYdHeight = this.$refs.ganttYd.clientHeight + // let gttYdWidth = this.$refs.ganttYd.clientWidth + }, handleMouseUp(task, index) { setTimeout(() => { this.datas.splice(index,index,1) -- Gitee