hookehuyr

初始化流程图结构调整

...@@ -385,54 +385,28 @@ export default { ...@@ -385,54 +385,28 @@ export default {
385 data: AppData, // 渲染的数据,数据格式参考G6文档 385 data: AppData, // 渲染的数据,数据格式参考G6文档
386 detailModel: null, 386 detailModel: null,
387 editorLoading: false, // 开始编辑器的loading状态 387 editorLoading: false, // 开始编辑器的loading状态
388 - selectOptions: [ 388 + // menuData: [
389 - { label: '待确认', value: '0' }, 389 + // {
390 - { label: '填写表单', value: '1' }, 390 + // label: '流程节点',
391 - { label: '部门负责人审批', value: '2' }, 391 + // menus: [
392 - { label: '总经理审批', value: '3' }, 392 + // { label: '开始', shape: 'ellipse', id: 'start-node' },
393 - ], 393 + // { label: '结束', shape: 'ellipse', id: 'end-node' },
394 - menuData: [ 394 + // { label: '审批节点', busType: '123' },
395 - { 395 + // { label: '判断节点', shape: 'diamond' },
396 - label: '流程节点', 396 + // ],
397 - menus: [
398 - { label: '开始', shape: 'ellipse', id: 'start-node' },
399 - { label: '结束', shape: 'ellipse', id: 'end-node' },
400 - { label: '审批节点', busType: '123' },
401 - { label: '判断节点', shape: 'diamond' },
402 - ],
403 - },
404 - {
405 - label: '其他形状节点',
406 - menus: [
407 - { label: '矩形节点', shape: 'rect' },
408 - { label: '圆形节点', shape: 'circle' },
409 - { label: '椭圆节点', shape: 'ellipse' },
410 - { label: '菱形节点', shape: 'diamond' },
411 - { label: '三角形节点', shape: 'triangle' },
412 - { label: '星形节点', shape: 'star' },
413 - ],
414 - },
415 - ],
416 - // activityConfig: {
417 - // advertisement: {
418 - // text: "广告宣传1",
419 - // desc: "通过广告宣传新品",
420 - // color: "#9283ed",
421 - // img: "https://cdn.ipadbiz.cn/oa/advertisement-node.svg"
422 // }, 397 // },
423 - // coupon: { 398 + // {
424 - // text: "优惠券", 399 + // label: '其他形状节点',
425 - // desc: "发放奖励优惠券", 400 + // menus: [
426 - // color: "#ed8383", 401 + // { label: '矩形节点', shape: 'rect' },
427 - // img: "https://cdn.ipadbiz.cn/oa/coupon-node.svg" 402 + // { label: '圆形节点', shape: 'circle' },
403 + // { label: '椭圆节点', shape: 'ellipse' },
404 + // { label: '菱形节点', shape: 'diamond' },
405 + // { label: '三角形节点', shape: 'triangle' },
406 + // { label: '星形节点', shape: 'star' },
407 + // ],
428 // }, 408 // },
429 - // crowd: { 409 + // ],
430 - // text: "用户反馈",
431 - // desc: "收集用户反馈信息",
432 - // color: "#92dba8",
433 - // img: "https://cdn.ipadbiz.cn/oa/crowd-node.svg"
434 - // }
435 - // },
436 controlList: { 410 controlList: {
437 flow: { 411 flow: {
438 text: '流程节点', 412 text: '流程节点',
...@@ -489,9 +463,7 @@ export default { ...@@ -489,9 +463,7 @@ export default {
489 btnText: '', 463 btnText: '',
490 }, 464 },
491 node_name: '', // 节点名称 465 node_name: '', // 节点名称
492 - userTags: [ // 节点负责人 466 + userTags: [], // 节点负责人,
493 - { id: "user-1-1", name: "用户1-1" }
494 - ],
495 auth_all_checked: false, 467 auth_all_checked: false,
496 auth_all_edit: false, 468 auth_all_edit: false,
497 field_auths: [ // 字段权限 469 field_auths: [ // 字段权限
...@@ -1269,7 +1241,7 @@ body { ...@@ -1269,7 +1241,7 @@ body {
1269 } 1241 }
1270 1242
1271 /* .demo-tabs > .el-tabs__content { */ 1243 /* .demo-tabs > .el-tabs__content { */
1272 - /* padding: 32px; */ 1244 +/* padding: 32px; */
1273 /* } */ 1245 /* } */
1274 1246
1275 .flow-tag__wrapper { 1247 .flow-tag__wrapper {
...@@ -1348,27 +1320,32 @@ body { ...@@ -1348,27 +1320,32 @@ body {
1348 } 1320 }
1349 } 1321 }
1350 1322
1351 -.el-tabs__item.is-active, .el-radio-button__inner:hover { 1323 +.el-tabs__item.is-active,
1324 +.el-radio-button__inner:hover {
1352 color: #009688 !important; 1325 color: #009688 !important;
1353 } 1326 }
1354 -.el-tabs__active-bar, .el-radio-button__original-radio:checked+.el-radio-button__inner { 1327 +.el-tabs__active-bar,
1355 - background-color: #009688!important; 1328 +.el-radio-button__original-radio:checked + .el-radio-button__inner {
1329 + background-color: #009688 !important;
1356 } 1330 }
1357 .el-tag { 1331 .el-tag {
1358 - background-color: #009688!important; 1332 + background-color: #009688 !important;
1359 color: white !important; 1333 color: white !important;
1360 } 1334 }
1361 -.el-tag .el-tag__close, .el-radio-button__original-radio:checked+.el-radio-button__inner:hover { 1335 +.el-tag .el-tag__close,
1336 +.el-radio-button__original-radio:checked + .el-radio-button__inner:hover {
1362 color: white !important; 1337 color: white !important;
1363 } 1338 }
1364 -.el-checkbox__input.is-checked .el-checkbox__inner, .el-switch.is-checked .el-switch__core { 1339 +.el-checkbox__input.is-checked .el-checkbox__inner,
1365 - background-color: #009688!important; 1340 +.el-switch.is-checked .el-switch__core {
1366 - border-color: #009688!important; 1341 + background-color: #009688 !important;
1342 + border-color: #009688 !important;
1367 } 1343 }
1368 -.el-button:focus, .el-button:hover { 1344 +.el-button:focus,
1369 - color: #009688!important; 1345 +.el-button:hover {
1370 - border-color: #009688!important; 1346 + color: #009688 !important;
1371 - background-color: white!important; 1347 + border-color: #009688 !important;
1348 + background-color: white !important;
1372 outline: 0; 1349 outline: 0;
1373 } 1350 }
1374 </style> 1351 </style>
......
1 /* 1 /*
2 * @Date: 2023-10-27 09:29:48 2 * @Date: 2023-10-27 09:29:48
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2023-11-20 13:54:00 4 + * @LastEditTime: 2023-11-22 17:41:19
5 * @FilePath: /vue-flow-editor/doc/data.js 5 * @FilePath: /vue-flow-editor/doc/data.js
6 * @Description: 初始化结构,数据都是固定的 6 * @Description: 初始化结构,数据都是固定的
7 */ 7 */
8 +import { v4 as uuidv4 } from 'uuid';
9 +
10 +const flow_id = uuidv4();
11 +const cc_id = uuidv4();
12 +
8 export const AppData = { 13 export const AppData = {
9 nodes: [ 14 nodes: [
10 { 15 {
...@@ -16,7 +21,7 @@ export const AppData = { ...@@ -16,7 +21,7 @@ export const AppData = {
16 control: 'start', 21 control: 'start',
17 }, 22 },
18 { 23 {
19 - id: '5353453523', 24 + id: flow_id,
20 x: 225, 25 x: 225,
21 y: 210, 26 y: 210,
22 text: '流程节点', 27 text: '流程节点',
...@@ -32,7 +37,7 @@ export const AppData = { ...@@ -32,7 +37,7 @@ export const AppData = {
32 // control: 'flow', 37 // control: 'flow',
33 // }, 38 // },
34 { 39 {
35 - id: '1700204887203', 40 + id: cc_id,
36 x: 465, 41 x: 465,
37 y: 210, 42 y: 210,
38 text: '抄送节点', 43 text: '抄送节点',
...@@ -52,19 +57,19 @@ export const AppData = { ...@@ -52,19 +57,19 @@ export const AppData = {
52 { 57 {
53 source: 'start-node', 58 source: 'start-node',
54 sourceAnchor: 2, 59 sourceAnchor: 2,
55 - target: '5353453523', 60 + target: flow_id,
56 targetAnchor: 0, 61 targetAnchor: 0,
57 }, 62 },
58 { 63 {
59 - source: '5353453523', 64 + source: flow_id,
60 sourceAnchor: 2, 65 sourceAnchor: 2,
61 target: 'end-node', 66 target: 'end-node',
62 targetAnchor: 0, 67 targetAnchor: 0,
63 }, 68 },
64 { 69 {
65 - source: '5353453523', 70 + source: flow_id,
66 sourceAnchor: 3, 71 sourceAnchor: 3,
67 - target: '1700204887203', 72 + target: cc_id,
68 targetAnchor: 1, 73 targetAnchor: 1,
69 }, 74 },
70 // { 75 // {
......