Commit f2f67696 by yuwei

项目初始化

parent 56a87d51
......@@ -140,7 +140,7 @@ export default {
// 连线的source和target Anchor
Anchors: ['Right', 'Left'],
// 鼠标不能拖动删除线
ConnectionsDetachable: false,
ConnectionsDetachable: true,
// 删除线的时候节点不删除
DeleteEndpointsOnDetach: false,
// 连线的样式,有四种默认类型:Bezier(贝塞尔曲线),Straight(直线),Flowchart(流程图),State machine(状态机)
......@@ -210,17 +210,28 @@ export default {
})
},
initEndpoint() {
console.log(this.leftTableDataList.length)
this.leftTableDataList.filter(item => item.status === '1').forEach(function(item, index, arr) {
this.jsPlumb.addEndpoint('item_left_' + item.id, {
const _this = this
// 过滤掉已映射数据
this.leftTableDataList.filter(item => item.status === '0').forEach(function(item, index, arr) {
_this.jsPlumb.addEndpoint('item_left_' + item.id, {
anchors: ['Right'],
uuid: item.id
},{
isSource: true,
isTarget: true,
connector: ['Straight']
})
})
this.rightTableDataList.forEach(function(item, index, arr) {
_this.jsPlumb.addEndpoint('item_right_' + item.id, {
anchors: ['Left'],
uuid: item.id
},{
isSource: true,
isTarget: true,
connector: ['Straight']
})
})
// this.jsPlumb.addEndpoint('item_right', {
// anchors: ['Left'],
// uuid: 'toId'
// })
// const connection = this.jsPlumb.connect({ uuids: ['fromId', 'toId'] })
// // 初始化label
// connection.getOverlay('label-1').setLabel('映射连线')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment