确认删除该连线?
", - onOk: () => { - this.jsPlumb.deleteConnection(line) - } - }) + if (confirm("确认删除该连线?")) { + this.jsPlumb.deleteConnection(line) + } else { + // 用户点击了取消 + alert("操作已取消!"); + } + // this.$Modal.confirm({ + // title: '删除连线', + // content: "确认删除该连线?
", + // onOk: () => { + // this.jsPlumb.deleteConnection(line) + // } + // }) }, + // 删除连线 deleLine(line) { this.data.lineList.forEach((item, index) => { if(item.from === line.sourceId && item.to === line.targetId) { + console.log('删线: ' + item.from + ' -/- ' + item.to) this.data.lineList.splice(index, 1) } }) @@ -171,6 +184,8 @@ const methods = { }, // 添加新的节点 addNode(temp) { + console.log('新增节点: ') + console.log(temp) this.data.nodeList.push(temp); this.$nextTick(() => { this.jsPlumb.makeSource(temp.id, this.jsplumbSourceOptions); @@ -233,8 +248,9 @@ const methods = { this.style.cursor = "grab"; }); }, - + // 设置节点名称 setNodeName(nodeId, name) { + console.log('设置节点 '+nodeId+' 名称为: ' + name) this.data.nodeList.some((v) => { if(v.id === nodeId) { v.nodeName = name @@ -244,9 +260,10 @@ const methods = { } }) }, - //删除节点 deleteNode(node) { + console.log('删除节点: ') + console.log(node) this.data.nodeList.some((v,index) => { if(v.id === node.id) { this.data.nodeList.splice(index, 1) @@ -257,7 +274,6 @@ const methods = { } }) }, - //更改连线状态 changeLineState(nodeId, val) { console.log(val) From f8328b4dd12c24119dbd32e422286c419c182304 Mon Sep 17 00:00:00 2001 From: chentaisen <14615430+chentaisen@user.noreply.gitee.com> Date: Mon, 26 Aug 2024 08:51:52 +0800 Subject: [PATCH 03/23] Changes --- src/views/rule/rule/index.vue | 2 ++ src/views/rule/rule/version.vue | 40 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/src/views/rule/rule/index.vue b/src/views/rule/rule/index.vue index 21251c7..92f0f22 100644 --- a/src/views/rule/rule/index.vue +++ b/src/views/rule/rule/index.vue @@ -129,6 +129,8 @@