From ea744c63bf10f14fe5a51addf37083c384093e21 Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期五, 02 八月 2024 17:16:59 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
web/src/views/modules/taskReliability/TimeDiagram.vue | 124 +++++++++++++++++++++++++++++++++++++---
1 files changed, 113 insertions(+), 11 deletions(-)
diff --git a/web/src/views/modules/taskReliability/TimeDiagram.vue b/web/src/views/modules/taskReliability/TimeDiagram.vue
index 5806178..34b9656 100644
--- a/web/src/views/modules/taskReliability/TimeDiagram.vue
+++ b/web/src/views/modules/taskReliability/TimeDiagram.vue
@@ -118,6 +118,7 @@
},
mounted() {
this.getProductList()
+
},
components: {
ProductModelTree,
@@ -159,6 +160,9 @@
},
autoResize: true,
history: true,
+ // panning: {
+ // enabled: true,
+ // },
scroller: {
enabled: true,
pageVisible: true,
@@ -187,7 +191,6 @@
},
// anchor: 'center',
connectionPoint: 'anchor',
- allowBlank: false,
snap: {
radius: 20,
},
@@ -217,6 +220,9 @@
zIndex: 0,
})
},
+ // validateConnection({targetMagnet}) {
+ // return !!targetMagnet
+ // },
},
highlighting: {
magnetAdsorbed: {
@@ -264,6 +270,7 @@
rowHeight: 100,
},
})
+ document.getElementById('stencil').appendChild(stencil.container)
Graph.registerNode(
'custom-rect',
{
@@ -324,7 +331,101 @@
},
ports: {
...this.ports
+ // items: [
+ // {
+ // group: 'top',
+ // },
+ // {
+ // group: 'bottom',
+ // },
+ // ],
},
+ },
+ true,
+ )
+ //
+ Graph.registerNode(
+ 'custom-circle',
+ {
+ inherit: 'ellipse',
+ width: 120,
+ height: 120,
+ data: {
+ dataId: '',
+ finishDate: ''
+ },
+ attrs: {
+ body: {
+ strokeWidth: 1,
+ stroke: '#5F95FF',
+ fill: '#EFF4FF',
+ },
+ //鏃ユ湡
+ title: {
+ text: '',
+ fontSize: 12,
+ fill: '#262626',
+ refX: 0.5,
+ refY: '100%',
+ refY2: -10,
+ textAnchor: 'middle',
+ textVerticalAnchor: 'bottom',
+ },
+ // 鍚嶇О
+ text: {
+ // fontFamily: '浠垮畫',
+ fontSize: 20,
+ fill: '#262626',
+ textWrap: {
+ width: 80, // 瀹藉害涓� 80px鎹㈣
+ ellipsis: false, // 鏂囨湰瓒呭嚭鏄剧ず鑼冨洿鏃讹紝鑷姩娣诲姞鐪佺暐鍙�
+ breakWord: true, // 鏄惁鎴柇鍗曡瘝
+ }
+ },
+ },
+ markup: [
+ {
+ tagName: 'ellipse',
+ selector: 'body',
+ },
+ {
+ tagName: 'text',
+ selector: 'title',
+ },
+ {
+ tagName: 'text',
+ selector: 'text',
+ },
+ ],
+ ports: {...this.ports},
+ },
+ true,
+ )
+ Graph.registerNode(
+ 'custom-circle1',
+ {
+ inherit: 'ellipse',
+ width: 65,
+ height: 65,
+ data: {
+ dataId: '',
+ finishDate: ''
+ },
+ attrs: {
+ body: {
+ strokeWidth: 1,
+ stroke: '#5F95FF',
+ fill: '#EFF4FF',
+ },
+ //鏃ユ湡
+ text: {
+ // fontFamily: '浠垮畫',
+ fontSize: 12,
+ text: '鏃ユ湡鑺傜偣',
+ fill: '#262626',
+ },
+ },
+ ports: {...this.ports},
},
true,
)
@@ -539,7 +640,10 @@
})
this.graph.on('blank:click', ({cell}) => {
+ // this.reset()
+ // this.type.value = "grid"
this.type = 'grid'
+ // this.id = cell.id
})
this.graph.on('cell:click', ({cell}) => {
@@ -566,16 +670,14 @@
// 鍗曞嚮node鑺傜偣
this.graph.on('node:click', ({node}) => {
// this.reset()
- if (node.getData().dataId) {
- this.dialogVisible2 = true
- let param = {
- id: node.getData().dataId,
- modelName: node.attr('label/textWrap/text'),
- }
- this.$nextTick(() => {
- this.$refs.rbdEditImg.init(param)
- })
- }
+ node.attr('line/stroke', '#5F95FF')
+ node.prop('labels/0', {
+ attrs: {
+ body: {
+ stroke: '#5F95FF',
+ },
+ },
+ })
})
// 鎺у埗杩炴帴妗╂樉绀�/闅愯棌
this.graph.on('node:delete', ({view, e}) => {
--
Gitblit v1.9.1