From c1cc454f1bdb7cd405aac65c701fd18423d38dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=9C=84?= Date: Mon, 9 Oct 2023 17:43:02 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E7=BC=96=E8=BE=91=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/workCenter.js | 9 + src/assets/image/iconDelete.svg | 1 + src/components/MindMap.vue | 44 +- src/components/tools/setting.js | 1 + .../workCenter/processConfig/EditFlowNode.vue | 574 ++++++++---------- .../processConfig/modules/FlowNodeModal.vue | 92 +++ 6 files changed, 357 insertions(+), 364 deletions(-) create mode 100644 src/assets/image/iconDelete.svg create mode 100644 src/views/workCenter/processConfig/modules/FlowNodeModal.vue diff --git a/src/api/workCenter.js b/src/api/workCenter.js index aa0920ee..aba92fab 100644 --- a/src/api/workCenter.js +++ b/src/api/workCenter.js @@ -2,6 +2,12 @@ import { getAction, postAction } from './manage.js' // 流程配置-部署 const deployWorkFlow = (params) => getAction('/activitiModel/deploy', params) +// 流程配置-获取节点列表 +const getFlowNodeList = (params) => getAction('/activitiModel/getNodeList', params) +// 流程配置-新增节点 +const addFlowNode = (params) => postAction('/activitiModel/addTask', params) +// 流程配置-删除节点 +const deleteFlowNode = (params) => postAction('/activitiModel/deleteTask', params) // 企标计划立项、变更流程相关 // 转办 @@ -13,6 +19,9 @@ const enterprisePlanApprovalReject = (params) => postAction('', params) export { deployWorkFlow, + getFlowNodeList, + addFlowNode, + deleteFlowNode, enterprisePlanApprovalTurnTo, enterprisePlanApprovalAgree, diff --git a/src/assets/image/iconDelete.svg b/src/assets/image/iconDelete.svg new file mode 100644 index 00000000..8a7831ae --- /dev/null +++ b/src/assets/image/iconDelete.svg @@ -0,0 +1 @@ + diff --git a/src/components/MindMap.vue b/src/components/MindMap.vue index 99a13cd6..22f3f7ba 100644 --- a/src/components/MindMap.vue +++ b/src/components/MindMap.vue @@ -123,45 +123,19 @@ export default { const nodeColorIndex = cfg.depth % NODE_COLOR.length const nodeStyle = NODE_COLOR[nodeColorIndex] // 节点整体的内容 - const nodeContainer = group.addShape('rect', {}) - // 实际显示的边框,由三部分组成,左右两侧是两个圆,中间用两个矩形覆盖,一个有边框,另一个没有边框,没有边框这个高小一点,宽大一点 - group.addShape('circle', { + const nodeContainer = group.addShape('rect', { attrs: { x: this.nodeHeight / 2, y: this.nodeHeight / 2, - r: this.nodeHeight / 2, - stroke: nodeStyle.stroke, - fill: nodeStyle.bg - } - }) - group.addShape('circle', { - attrs: { - x: this.nodeWidth - this.nodeHeight / 2, - y: this.nodeHeight / 2, - r: this.nodeHeight / 2, - stroke: nodeStyle.stroke, - fill: nodeStyle.bg - } - }) - group.addShape('rect', { - attrs: { - x: this.nodeHeight / 2, - y: 0, - width: this.nodeWidth - this.nodeHeight, + width: this.nodeWidth, height: this.nodeHeight, - stroke: nodeStyle.stroke, - fill: nodeStyle.bg - } - }) - group.addShape('rect', { - attrs: { - x: this.nodeHeight / 2 - 3, - y: 0.5, - width: this.nodeWidth - this.nodeHeight + 6, - height: this.nodeHeight - 1, - fill: nodeStyle.bg - } + radius: this.nodeHeight / 2, + fill: nodeStyle.bg, + stroke: nodeStyle.stroke + }, + name: 'rect-shape' }) + // 文本的部分 let textContent = cfg.name || '' if (textContent.length > 40) { @@ -184,7 +158,7 @@ export default { // 展开收起 group.addShape('marker', { attrs: { - x: this.nodeWidth + NODE_ICON_MARGIN, + x: this.nodeWidth + NODE_ICON_MARGIN + this.expendCollapseIconR, y: this.nodeHeight / 2, r: this.expendCollapseIconR, symbol: COLLAPSE_ICON, diff --git a/src/components/tools/setting.js b/src/components/tools/setting.js index 16cff3b7..c6d12af7 100644 --- a/src/components/tools/setting.js +++ b/src/components/tools/setting.js @@ -102,6 +102,7 @@ const updateColorWeak = colorWeak => { const updatePageHeight = () => { const isEmbedded = store.getters.isEmbedded const obj = { + 'primary-color': '#D52C26', 'user-info-height': isEmbedded ? '0px' : '59px', // 用户信息的高度 'breadcrumb-height': isEmbedded ? '12px' : '45px' // 面包屑的高度 } diff --git a/src/views/workCenter/processConfig/EditFlowNode.vue b/src/views/workCenter/processConfig/EditFlowNode.vue index 46c2a5d1..14d3a9e4 100644 --- a/src/views/workCenter/processConfig/EditFlowNode.vue +++ b/src/views/workCenter/processConfig/EditFlowNode.vue @@ -1,5 +1,5 @@ + +