|
|
@@ -115,104 +115,105 @@ const initData = () => {
|
|
|
nodes: [],
|
|
|
edges: [],
|
|
|
}
|
|
|
- const data = {
|
|
|
- graph: {
|
|
|
- nodes: [
|
|
|
- {
|
|
|
- id: '40fc7fd8-9adc-4446-a1bb-a0e8546cbdce',
|
|
|
- type: 'start',
|
|
|
- position: {
|
|
|
- x: 23,
|
|
|
- y: 35,
|
|
|
- },
|
|
|
- data: {
|
|
|
- id: '40fc7fd8-9adc-4446-a1bb-a0e8546cbdce',
|
|
|
- title: '发起',
|
|
|
- edgeSource: null,
|
|
|
- edgeTarget: ['3f1ebbdd-ba81-47e5-9e28-47106774cabb'],
|
|
|
- valid: true,
|
|
|
- type: 'start',
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- id: '937362a7-7122-4b1a-a7b2-02c9a1a155fd',
|
|
|
- type: 'end',
|
|
|
- position: {
|
|
|
- x: 23,
|
|
|
- y: 477,
|
|
|
- },
|
|
|
- data: {
|
|
|
- id: '937362a7-7122-4b1a-a7b2-02c9a1a155fd',
|
|
|
- title: '结束',
|
|
|
- edgeSource: ['0bf28835-8eb2-4596-bab4-ec5bb2314390'],
|
|
|
- edgeTarget: null,
|
|
|
- valid: true,
|
|
|
- type: 'end',
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- id: '3f1ebbdd-ba81-47e5-9e28-47106774cabb',
|
|
|
- type: 'approval',
|
|
|
- position: {
|
|
|
- x: -200,
|
|
|
- y: 234,
|
|
|
- },
|
|
|
- data: {
|
|
|
- id: '3f1ebbdd-ba81-47e5-9e28-47106774cabb',
|
|
|
- title: '审批节点',
|
|
|
- edgeSource: ['40fc7fd8-9adc-4446-a1bb-a0e8546cbdce'],
|
|
|
- edgeTarget: ['0bf28835-8eb2-4596-bab4-ec5bb2314390'],
|
|
|
- valid: true,
|
|
|
- type: 'approval',
|
|
|
- name: '55555',
|
|
|
- linkAccount: 'role',
|
|
|
- roles: ['1968135147337920512'],
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- id: '0bf28835-8eb2-4596-bab4-ec5bb2314390',
|
|
|
- type: 'approval',
|
|
|
- position: {
|
|
|
- x: 170,
|
|
|
- y: 270,
|
|
|
- },
|
|
|
- data: {
|
|
|
- id: '0bf28835-8eb2-4596-bab4-ec5bb2314390',
|
|
|
- title: '审批节点',
|
|
|
- edgeSource: ['3f1ebbdd-ba81-47e5-9e28-47106774cabb'],
|
|
|
- edgeTarget: ['937362a7-7122-4b1a-a7b2-02c9a1a155fd'],
|
|
|
- valid: true,
|
|
|
- type: 'approval',
|
|
|
- name: 'kkfkkfkk',
|
|
|
- linkAccount: 'account',
|
|
|
- accounts: ['0', '1950731839749042176', '1977563023736336384'],
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- edges: [
|
|
|
- {
|
|
|
- id: 'ab1c1778-94d8-450c-b823-dd169a434fd2',
|
|
|
- target: '3f1ebbdd-ba81-47e5-9e28-47106774cabb',
|
|
|
- source: '40fc7fd8-9adc-4446-a1bb-a0e8546cbdce',
|
|
|
- },
|
|
|
- {
|
|
|
- id: 'c766ffc2-fc71-4739-ba87-054fa164adcf',
|
|
|
- target: '0bf28835-8eb2-4596-bab4-ec5bb2314390',
|
|
|
- source: '3f1ebbdd-ba81-47e5-9e28-47106774cabb',
|
|
|
- },
|
|
|
- {
|
|
|
- id: '09fef45f-f143-48a8-993f-6592ec313598',
|
|
|
- target: '937362a7-7122-4b1a-a7b2-02c9a1a155fd',
|
|
|
- source: '0bf28835-8eb2-4596-bab4-ec5bb2314390',
|
|
|
- },
|
|
|
- ],
|
|
|
- viewport: {
|
|
|
- zoom: 1,
|
|
|
- x: 423,
|
|
|
- y: 129,
|
|
|
- },
|
|
|
- },
|
|
|
- }
|
|
|
+ const data = null
|
|
|
+ // {
|
|
|
+ // graph: {
|
|
|
+ // nodes: [
|
|
|
+ // {
|
|
|
+ // id: '40fc7fd8-9adc-4446-a1bb-a0e8546cbdce',
|
|
|
+ // type: 'start',
|
|
|
+ // position: {
|
|
|
+ // x: 23,
|
|
|
+ // y: 35,
|
|
|
+ // },
|
|
|
+ // data: {
|
|
|
+ // id: '40fc7fd8-9adc-4446-a1bb-a0e8546cbdce',
|
|
|
+ // title: '发起',
|
|
|
+ // edgeSource: null,
|
|
|
+ // edgeTarget: ['3f1ebbdd-ba81-47e5-9e28-47106774cabb'],
|
|
|
+ // valid: true,
|
|
|
+ // type: 'start',
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: '937362a7-7122-4b1a-a7b2-02c9a1a155fd',
|
|
|
+ // type: 'end',
|
|
|
+ // position: {
|
|
|
+ // x: 23,
|
|
|
+ // y: 477,
|
|
|
+ // },
|
|
|
+ // data: {
|
|
|
+ // id: '937362a7-7122-4b1a-a7b2-02c9a1a155fd',
|
|
|
+ // title: '结束',
|
|
|
+ // edgeSource: ['0bf28835-8eb2-4596-bab4-ec5bb2314390'],
|
|
|
+ // edgeTarget: null,
|
|
|
+ // valid: true,
|
|
|
+ // type: 'end',
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: '3f1ebbdd-ba81-47e5-9e28-47106774cabb',
|
|
|
+ // type: 'approval',
|
|
|
+ // position: {
|
|
|
+ // x: -200,
|
|
|
+ // y: 234,
|
|
|
+ // },
|
|
|
+ // data: {
|
|
|
+ // id: '3f1ebbdd-ba81-47e5-9e28-47106774cabb',
|
|
|
+ // title: '审批节点',
|
|
|
+ // edgeSource: ['40fc7fd8-9adc-4446-a1bb-a0e8546cbdce'],
|
|
|
+ // edgeTarget: ['0bf28835-8eb2-4596-bab4-ec5bb2314390'],
|
|
|
+ // valid: true,
|
|
|
+ // type: 'approval',
|
|
|
+ // name: '55555',
|
|
|
+ // linkAccount: 'role',
|
|
|
+ // roles: ['1968135147337920512'],
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: '0bf28835-8eb2-4596-bab4-ec5bb2314390',
|
|
|
+ // type: 'approval',
|
|
|
+ // position: {
|
|
|
+ // x: 170,
|
|
|
+ // y: 270,
|
|
|
+ // },
|
|
|
+ // data: {
|
|
|
+ // id: '0bf28835-8eb2-4596-bab4-ec5bb2314390',
|
|
|
+ // title: '审批节点',
|
|
|
+ // edgeSource: ['3f1ebbdd-ba81-47e5-9e28-47106774cabb'],
|
|
|
+ // edgeTarget: ['937362a7-7122-4b1a-a7b2-02c9a1a155fd'],
|
|
|
+ // valid: true,
|
|
|
+ // type: 'approval',
|
|
|
+ // name: 'kkfkkfkk',
|
|
|
+ // linkAccount: 'account',
|
|
|
+ // accounts: ['0', '1950731839749042176', '1977563023736336384'],
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
+ // edges: [
|
|
|
+ // {
|
|
|
+ // id: 'ab1c1778-94d8-450c-b823-dd169a434fd2',
|
|
|
+ // target: '3f1ebbdd-ba81-47e5-9e28-47106774cabb',
|
|
|
+ // source: '40fc7fd8-9adc-4446-a1bb-a0e8546cbdce',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 'c766ffc2-fc71-4739-ba87-054fa164adcf',
|
|
|
+ // target: '0bf28835-8eb2-4596-bab4-ec5bb2314390',
|
|
|
+ // source: '3f1ebbdd-ba81-47e5-9e28-47106774cabb',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: '09fef45f-f143-48a8-993f-6592ec313598',
|
|
|
+ // target: '937362a7-7122-4b1a-a7b2-02c9a1a155fd',
|
|
|
+ // source: '0bf28835-8eb2-4596-bab4-ec5bb2314390',
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
+ // viewport: {
|
|
|
+ // zoom: 1,
|
|
|
+ // x: 423,
|
|
|
+ // y: 129,
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ // }
|
|
|
if (data?.graph?.viewport) {
|
|
|
state.workflowData = {
|
|
|
viewport: data.graph.viewport,
|