hookehuyr

新增抄送类型节点,抄送节点点击时节点属性不显示

...@@ -171,7 +171,11 @@ ...@@ -171,7 +171,11 @@
171 </el-form-item> 171 </el-form-item>
172 <div v-if="state.attr_radio === '更多属性'"> 172 <div v-if="state.attr_radio === '更多属性'">
173 <div class="more-attr"> 173 <div class="more-attr">
174 - <div v-for="(attr, index) in state.more_attr" :key="index" class="more-attr-item"> 174 + <div
175 + v-for="(attr, index) in state.more_attr"
176 + :key="index"
177 + class="more-attr-item"
178 + >
175 <div style="display: flex; align-items: center;"> 179 <div style="display: flex; align-items: center;">
176 <p class="title">{{ attr.label }}</p>&nbsp; 180 <p class="title">{{ attr.label }}</p>&nbsp;
177 <el-tooltip 181 <el-tooltip
...@@ -182,7 +186,11 @@ ...@@ -182,7 +186,11 @@
182 <el-icon><InfoFilled color="#b5b8be" /></el-icon> 186 <el-icon><InfoFilled color="#b5b8be" /></el-icon>
183 </el-tooltip> 187 </el-tooltip>
184 </div> 188 </div>
185 - <div v-for="(item, idx) in attr.data" :key="idx" class="content"> 189 + <div
190 + v-for="(item, idx) in attr.data"
191 + :key="idx"
192 + class="content"
193 + >
186 <div v-if="item.btnText" class="left"> 194 <div v-if="item.btnText" class="left">
187 <span v-if="item.label === item.btnText">{{ item.label }}</span> 195 <span v-if="item.label === item.btnText">{{ item.label }}</span>
188 <span v-else> 196 <span v-else>
...@@ -268,11 +276,16 @@ ...@@ -268,11 +276,16 @@
268 <template v-slot:toolbar> 276 <template v-slot:toolbar>
269 <el-tooltip content="保存流程图数据"> 277 <el-tooltip content="保存流程图数据">
270 <div class="vue-flow-editor-toolbar-item" @click="saveData"> 278 <div class="vue-flow-editor-toolbar-item" @click="saveData">
271 - <!-- <el-icon><Coin /></el-icon> -->
272 <i class="el-icon-coin" style=" margin-top: 4px;" /> 279 <i class="el-icon-coin" style=" margin-top: 4px;" />
273 <span style="font-size: 12px; transform: scale(0.8); margin-top: 2px;">保存</span> 280 <span style="font-size: 12px; transform: scale(0.8); margin-top: 2px;">保存</span>
274 </div> 281 </div>
275 </el-tooltip> 282 </el-tooltip>
283 + <!-- <el-tooltip content="启用流程图数据">
284 + <div class="vue-flow-editor-toolbar-item" @click="startFlow">
285 + <i class="el-icon-check" style=" margin-top: 4px;" />
286 + <span style="font-size: 12px; transform: scale(0.8); margin-top: 2px;">启用</span>
287 + </div>
288 + </el-tooltip> -->
276 </template> 289 </template>
277 <!-- 表单底部按钮 --> 290 <!-- 表单底部按钮 -->
278 <template v-slot:foot> 291 <template v-slot:foot>
...@@ -419,6 +432,12 @@ export default { ...@@ -419,6 +432,12 @@ export default {
419 color: '#ed8383', 432 color: '#ed8383',
420 img: 'https://cdn.ipadbiz.cn/oa/coupon-node.svg', 433 img: 'https://cdn.ipadbiz.cn/oa/coupon-node.svg',
421 }, 434 },
435 + cc: {
436 + text: '抄送节点',
437 + desc: '抄送节点',
438 + color: '#ed8383',
439 + img: 'https://cdn.ipadbiz.cn/oa/coupon-node.svg',
440 + },
422 end: { 441 end: {
423 id: 'end-node', 442 id: 'end-node',
424 text: '结束', 443 text: '结束',
...@@ -432,64 +451,7 @@ export default { ...@@ -432,64 +451,7 @@ export default {
432 attr_radio: '基础属性', 451 attr_radio: '基础属性',
433 main_attr_set: true, 452 main_attr_set: true,
434 more_attr_switch: false, 453 more_attr_switch: false,
435 - more_attr: [ // 更多属性 454 + more_attr: [], // 更多属性
436 - {
437 - id: 'no-1',
438 - label: '审批意见',
439 - desc: '开启审批意见后,节点负责人处理流程时须按要求填写审批意见',
440 - data: [
441 - {
442 - id: 'text-1',
443 - label: '文本意见',
444 - show: true,
445 - desc: '用户在处理流程时,可通过输入框或快捷选项录入文本意见。',
446 - btnText: '',
447 - },
448 - {
449 - id: 'signature-1',
450 - label: '手写签名',
451 - show: false,
452 - desc: '用户在处理流程时,需要签名确认。',
453 - btnText: ''
454 - },
455 - ]
456 - },
457 - {
458 - id: 'no-2',
459 - label: '节点操作',
460 - desc: '定义流程负责人在处理流程时可以进行的操作',
461 - data: [
462 - {
463 - id: 'node-1',
464 - label: '提交',
465 - show: true,
466 - desc: '用户在处理流程时点击此按钮,将保存用户在此节点中对数据的更改,流程数据流转至后续节点。',
467 - btnText: '提交'
468 - },
469 - {
470 - id: 'node-2',
471 - label: '暂存',
472 - show: false,
473 - desc: '暂存后将保存在此节点中对数据的更改,流程不发生流转。',
474 - btnText: '暂存'
475 - },
476 - {
477 - id: 'node-3',
478 - label: '撤回',
479 - show: false,
480 - desc: '开启后,用户在处理流程时点击此按钮,将保存用户在此节点中对数据的更改,同时流程退回到指定的节点中。',
481 - btnText: '撤回'
482 - },
483 - {
484 - id: 'node-4',
485 - label: '回退',
486 - show: false,
487 - desc: '开启后,用户在处理流程时点击此按钮,将保存用户在此节点中对数据的更改,同时流程退回到指定的节点中。',
488 - btnText: '回退'
489 - },
490 - ],
491 - }
492 - ],
493 more_attr_data: { 455 more_attr_data: {
494 label: '', 456 label: '',
495 show: false, 457 show: false,
...@@ -736,8 +698,73 @@ export default { ...@@ -736,8 +698,73 @@ export default {
736 // 检查字段权限选中情况 698 // 检查字段权限选中情况
737 checkAuthAll('visible'); 699 checkAuthAll('visible');
738 checkAuthAll('editable'); 700 checkAuthAll('editable');
701 + // TODO: 需要处理更多属性数据,节点类型是抄送时不显示节点操作
702 + state.more_attr = [ // 更多属性
703 + {
704 + id: 'no-1',
705 + label: '审批意见',
706 + desc: '开启审批意见后,节点负责人处理流程时须按要求填写审批意见',
707 + data: [
708 + {
709 + id: 'text-1',
710 + label: '文本意见',
711 + show: true,
712 + desc: '用户在处理流程时,可通过输入框或快捷选项录入文本意见。',
713 + btnText: '',
714 + },
715 + {
716 + id: 'signature-1',
717 + label: '手写签名',
718 + show: false,
719 + desc: '用户在处理流程时,需要签名确认。',
720 + btnText: ''
721 + },
722 + ]
723 + },
724 + {
725 + id: 'no-2',
726 + label: '节点操作',
727 + desc: '定义流程负责人在处理流程时可以进行的操作',
728 + data: [
729 + {
730 + id: 'node-1',
731 + label: '提交',
732 + show: true,
733 + desc: '用户在处理流程时点击此按钮,将保存用户在此节点中对数据的更改,流程数据流转至后续节点。',
734 + btnText: '提交'
735 + },
736 + {
737 + id: 'node-2',
738 + label: '暂存',
739 + show: false,
740 + desc: '暂存后将保存在此节点中对数据的更改,流程不发生流转。',
741 + btnText: '暂存'
742 + },
743 + {
744 + id: 'node-3',
745 + label: '撤回',
746 + show: false,
747 + desc: '开启后,用户在处理流程时点击此按钮,将保存用户在此节点中对数据的更改,同时流程退回到指定的节点中。',
748 + btnText: '撤回'
749 + },
750 + {
751 + id: 'node-4',
752 + label: '回退',
753 + show: false,
754 + desc: '开启后,用户在处理流程时点击此按钮,将保存用户在此节点中对数据的更改,同时流程退回到指定的节点中。',
755 + btnText: '回退'
756 + },
757 + ],
758 + }
759 + ];
760 + if (state.detailModel.control === 'cc') {
761 + state.more_attr = state.more_attr.filter((ele: any) => {
762 + return ele.label !== '节点操作'
763 + });
764 + }
739 // 打开属性表单 765 // 打开属性表单
740 - editor.openModel() 766 + state.attr_radio = '基础属性'; // 还原tab默认值
767 + editor.openModel();
741 } else { 768 } else {
742 editor.closeModel() 769 editor.closeModel()
743 } 770 }
...@@ -1005,6 +1032,10 @@ export default { ...@@ -1005,6 +1032,10 @@ export default {
1005 console.log(edges) 1032 console.log(edges)
1006 } 1033 }
1007 1034
1035 + const startFlow = () => { // 启用流程图
1036 +
1037 + }
1038 +
1008 /** 1039 /**
1009 * 格式化工具栏按钮 1040 * 格式化工具栏按钮
1010 * 1041 *
...@@ -1051,6 +1082,7 @@ export default { ...@@ -1051,6 +1082,7 @@ export default {
1051 onConfirmUserView, 1082 onConfirmUserView,
1052 1083
1053 saveData, 1084 saveData,
1085 + startFlow,
1054 toolbarButtonHandler, 1086 toolbarButtonHandler,
1055 1087
1056 onRef: (e: any) => (editor = e), 1088 onRef: (e: any) => (editor = e),
......
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-15 16:16:04 4 + * @LastEditTime: 2023-11-17 15:08:51
5 * @FilePath: /vue-flow-editor/doc/data.js 5 * @FilePath: /vue-flow-editor/doc/data.js
6 * @Description: 初始化结构,数据都是固定的 6 * @Description: 初始化结构,数据都是固定的
7 */ 7 */
...@@ -24,6 +24,14 @@ export const AppData = { ...@@ -24,6 +24,14 @@ export const AppData = {
24 control: 'flow', 24 control: 'flow',
25 }, 25 },
26 { 26 {
27 + id: '1700204887203',
28 + x: 465,
29 + y: 210,
30 + text: '抄送节点',
31 + desc: '',
32 + control: 'cc',
33 + },
34 + {
27 id: 'end-node', 35 id: 'end-node',
28 x: 225, 36 x: 225,
29 y: 335, 37 y: 335,
...@@ -45,5 +53,11 @@ export const AppData = { ...@@ -45,5 +53,11 @@ export const AppData = {
45 target: 'end-node', 53 target: 'end-node',
46 targetAnchor: 0, 54 targetAnchor: 0,
47 }, 55 },
56 + {
57 + source: '5353453523',
58 + sourceAnchor: 3,
59 + target: '1700204887203',
60 + targetAnchor: 1,
61 + },
48 ], 62 ],
49 } 63 }
......