From ab9ce936a36cffbb7bac92855e501eb76af4e624 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Sat, 17 Aug 2024 12:19:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8-=20=E5=88=A0=E9=99=A4=E7=AC=AC1?= =?UTF-8?q?=E7=89=88=EF=BC=8C=E6=96=B0=E5=A2=9E=E8=BF=9E=E7=BB=AD=E5=A4=9A?= =?UTF-8?q?=E7=BA=A7=E9=83=A8=E5=88=86=E8=B4=9F=E8=B4=A3=E4=BA=BA=E7=AD=96?= =?UTF-8?q?=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SimpleProcessDesigner/src/addNode.vue | 386 ----- .../SimpleProcessDesigner/src/consts.ts | 63 - .../src/drawer/approverDrawer.vue | 434 ------ .../src/drawer/copyerDrawer.vue | 250 --- .../SimpleProcessDesigner/src/nodeWrap.vue | 504 ------ .../SimpleProcessDesigner/src/util.ts | 218 --- .../SimpleProcessDesigner/theme/iconfont.ttf | Bin 2908 -> 0 bytes .../SimpleProcessDesigner/theme/iconfont.woff | Bin 1976 -> 0 bytes .../theme/iconfont.woff2 | Bin 1480 -> 0 bytes .../SimpleProcessDesigner/theme/workflow.css | 1366 ----------------- .../src/SimpleProcessDesigner.vue | 4 +- .../SimpleProcessDesignerV2/src/consts.ts | 48 +- .../SimpleProcessDesignerV2/src/node.ts | 159 +- .../src/nodes-config/CopyTaskNodeConfig.vue | 77 +- .../src/nodes-config/UserTaskNodeConfig.vue | 120 +- 15 files changed, 289 insertions(+), 3340 deletions(-) delete mode 100644 src/components/SimpleProcessDesigner/src/addNode.vue delete mode 100644 src/components/SimpleProcessDesigner/src/consts.ts delete mode 100644 src/components/SimpleProcessDesigner/src/drawer/approverDrawer.vue delete mode 100644 src/components/SimpleProcessDesigner/src/drawer/copyerDrawer.vue delete mode 100644 src/components/SimpleProcessDesigner/src/nodeWrap.vue delete mode 100644 src/components/SimpleProcessDesigner/src/util.ts delete mode 100644 src/components/SimpleProcessDesigner/theme/iconfont.ttf delete mode 100644 src/components/SimpleProcessDesigner/theme/iconfont.woff delete mode 100644 src/components/SimpleProcessDesigner/theme/iconfont.woff2 delete mode 100644 src/components/SimpleProcessDesigner/theme/workflow.css diff --git a/src/components/SimpleProcessDesigner/src/addNode.vue b/src/components/SimpleProcessDesigner/src/addNode.vue deleted file mode 100644 index 1fe66ab5..00000000 --- a/src/components/SimpleProcessDesigner/src/addNode.vue +++ /dev/null @@ -1,386 +0,0 @@ -/* stylelint-disable order/properties-order */ - - - diff --git a/src/components/SimpleProcessDesigner/src/consts.ts b/src/components/SimpleProcessDesigner/src/consts.ts deleted file mode 100644 index 2d9b585e..00000000 --- a/src/components/SimpleProcessDesigner/src/consts.ts +++ /dev/null @@ -1,63 +0,0 @@ -export enum NodeType { - //// -1 根节点流程开始节点 0 发起人 1审批 2抄送 3条件 4路由 - ROOT_NODE = -1, - /** - * 发起人节点 - */ - START_USER_NODE = 0, - /** - * 审批人节点 - */ - APPROVE_USER_NODE = 1, - /** - * 抄送人节点 - */ - CC_USER_NODE = 2, - /** - * 条件节点 - */ - CONDITION_NODE = 3, - /** - * 条件分支节点 - */ - EXCLUSIVE_NODE = 4, - /** - * 并行分支分叉节点 - */ - PARALLEL_NODE_FORK = 5, - /** - * 并行分支聚合 - */ - PARALLEL_NODE_JOIN = 6, - /** - * 包容分支分叉节点 - */ - INCLUSIVE_NODE_FORK = 7, - /** - * 包容分支聚合节点 - */ - INCLUSIVE_NODE_JOIN = 8 -} - -export const NODE_BG_COLOR = new Map() -NODE_BG_COLOR.set(NodeType.START_USER_NODE, '#87, 106, 149') -NODE_BG_COLOR.set(NodeType.APPROVE_USER_NODE, '#255, 148, 62') -NODE_BG_COLOR.set(NodeType.CC_USER_NODE, '#50, 150, 250') - -/** - * 节点的标题 - */ -export const NODE_TITLE = new Map() -NODE_TITLE.set(NodeType.START_USER_NODE, '发起人') -NODE_TITLE.set(NodeType.APPROVE_USER_NODE, '审批人') -NODE_TITLE.set(NodeType.CC_USER_NODE, '抄送人') - -export type WorkFlowNode = { - id: string, - type: NodeType, - name: string, - attributes: any, - // 操作人 - childNode?: WorkFlowNode | undefined, - conditionNodes: WorkFlowNode[] -} \ No newline at end of file diff --git a/src/components/SimpleProcessDesigner/src/drawer/approverDrawer.vue b/src/components/SimpleProcessDesigner/src/drawer/approverDrawer.vue deleted file mode 100644 index d6ad5c2c..00000000 --- a/src/components/SimpleProcessDesigner/src/drawer/approverDrawer.vue +++ /dev/null @@ -1,434 +0,0 @@ - - - - diff --git a/src/components/SimpleProcessDesigner/src/drawer/copyerDrawer.vue b/src/components/SimpleProcessDesigner/src/drawer/copyerDrawer.vue deleted file mode 100644 index 70b1fc5b..00000000 --- a/src/components/SimpleProcessDesigner/src/drawer/copyerDrawer.vue +++ /dev/null @@ -1,250 +0,0 @@ - - - diff --git a/src/components/SimpleProcessDesigner/src/nodeWrap.vue b/src/components/SimpleProcessDesigner/src/nodeWrap.vue deleted file mode 100644 index 18cde05a..00000000 --- a/src/components/SimpleProcessDesigner/src/nodeWrap.vue +++ /dev/null @@ -1,504 +0,0 @@ - - - - - diff --git a/src/components/SimpleProcessDesigner/src/util.ts b/src/components/SimpleProcessDesigner/src/util.ts deleted file mode 100644 index 6b139366..00000000 --- a/src/components/SimpleProcessDesigner/src/util.ts +++ /dev/null @@ -1,218 +0,0 @@ -// @ts-ignore -import { DictDataVO } from '@/api/system/dict/types' -import { DICT_TYPE, getDictLabel } from '@/utils/dict' -/** - * todo - */ -export const arrToStr = (arr?: [{ name: string }]) => { - if (arr) { - return arr - .map((item) => { - return item.name - }) - .toString() - } -} - -export const setApproverStr = (nodeConfig: any) => { - if (nodeConfig.settype == 1) { - if (nodeConfig.nodeUserList.length == 1) { - return nodeConfig.nodeUserList[0].name - } else if (nodeConfig.nodeUserList.length > 1) { - if (nodeConfig.examineMode == 1) { - return arrToStr(nodeConfig.nodeUserList) - } else if (nodeConfig.examineMode == 2) { - return nodeConfig.nodeUserList.length + '人会签' - } - } - } else if (nodeConfig.settype == 2) { - const level = - nodeConfig.directorLevel == 1 ? '直接主管' : '第' + nodeConfig.directorLevel + '级主管' - if (nodeConfig.examineMode == 1) { - return level - } else if (nodeConfig.examineMode == 2) { - return level + '会签' - } - } else if (nodeConfig.settype == 4) { - if (nodeConfig.selectRange == 1) { - return '发起人自选' - } else { - if (nodeConfig.nodeUserList.length > 0) { - if (nodeConfig.selectRange == 2) { - return '发起人自选' - } else { - return '发起人从' + nodeConfig.nodeUserList[0].name + '中自选' - } - } else { - return '' - } - } - } else if (nodeConfig.settype == 5) { - return '发起人自己' - } else if (nodeConfig.settype == 7) { - return '从直接主管到通讯录中级别最高的第' + nodeConfig.examineEndDirectorLevel + '个层级主管' - } -} - - -export const approveMethods: DictDataVO [] = [ - { label: '单人审批', value: 1 } - // { label: '多人审批(所有人审批通过)', value: 2 } - // TODO 更多的类型 -]; - -export const getApproverShowText = (approveMethod :number, candidateStrategy: number) => { - let appoveMethodText = '单人审批' - if(candidateStrategy) { - approveMethods.forEach((item) => { - if (item.value == approveMethod) { - appoveMethodText = item.label - } - }) - const strategyText = getDictLabel( - DICT_TYPE.BPM_TASK_CANDIDATE_STRATEGY, - candidateStrategy - ) - return `审批方式:${appoveMethodText}
- 审批人规则类型:按${strategyText}` - } else { - return '' - } -} - -export const copyerStr = ( candidateStrategy: number) => { - // if (nodeConfig.nodeUserList.length != 0) { - // return arrToStr(nodeConfig.nodeUserList) - // } else { - // if (nodeConfig.ccSelfSelectFlag == 1) { - // return '发起人自选' - // } - // } - console.log('candidateStrategy', candidateStrategy); - - if(candidateStrategy) { - const strategyText = getDictLabel( - DICT_TYPE.BPM_TASK_CANDIDATE_STRATEGY, - candidateStrategy - ) - return `抄送人类型:按${strategyText}` - } else { - return '' - } -} -export const conditionStr = (nodeConfig, index) => { - // const { conditionList, nodeUserList } = nodeConfig.conditionNodes[index] - // if (conditionList.length == 0) { - // return index == nodeConfig.conditionNodes.length - 1 && - // nodeConfig.conditionNodes[0].conditionList.length != 0 - // ? '其他条件进入此流程' - // : '请设置条件' - // return index == nodeConfig.conditionNodes.length - 1 && - // nodeConfig.conditionNodes[0].conditionList.length != 0 - // ? '其他条件进入此流程' - // : '请设置条件' - // console.log('index===>', index); - // console.log('nodeConfig.conditionNodes.length===>', nodeConfig.conditionNodes.length); - if( index === nodeConfig.conditionNodes.length - 1) { - return '其它情况将进入该分支' - } else { - return '请设置条件' - } - - // } else { - // let str = '' - // for (let i = 0; i < conditionList.length; i++) { - // const { - // columnId, - // columnType, - // showType, - // showName, - // optType, - // zdy1, - // opt1, - // zdy2, - // opt2, - // fixedDownBoxValue - // } = conditionList[i] - // if (columnId == 0) { - // if (nodeUserList.length != 0) { - // str += '发起人属于:' - // str += - // nodeUserList - // .map((item) => { - // return item.name - // }) - // .join('或') + ' 并且 ' - // } - // } - // if (columnType == 'String' && showType == '3') { - // if (zdy1) { - // str += showName + '属于:' + dealStr(zdy1, JSON.parse(fixedDownBoxValue)) + ' 并且 ' - // } - // } - // if (columnType == 'Double') { - // if (optType != 6 && zdy1) { - // const optTypeStr = ['', '<', '>', '≤', '=', '≥'][optType] - // str += `${showName} ${optTypeStr} ${zdy1} 并且 ` - // } else if (optType == 6 && zdy1 && zdy2) { - // str += `${zdy1} ${opt1} ${showName} ${opt2} ${zdy2} 并且 ` - // } - // } - // } - // str ? str.substring(0, str.length - 4) : - return '请设置条件' - // } -} - -// export const dealStr = (str: string, obj) => { -// const arr = [] -// const list = str.split(',') -// for (const elem in obj) { -// list.map((item) => { -// if (item == elem) { -// arr.push(obj[elem].value) -// } -// }) -// } -// return arr.join('或') -// } - -export const removeEle = (arr, elem, key = 'id') => { - let includesIndex - arr.map((item, index) => { - if (item[key] == elem[key]) { - includesIndex = index - } - }) - arr.splice(includesIndex, 1) -} - -export const bgColors = ['87, 106, 149', '255, 148, 62', '50, 150, 250','50, 150, 250','248, 107, 248','244, 118, 118','23, 148, 46','23, 148, 46'] -export const placeholderList = ['发起人', '审核人', '抄送人'] -export const setTypes = [ - { value: 1, label: '指定成员' }, - { value: 2, label: '主管' }, - { value: 4, label: '发起人自选' }, - { value: 5, label: '发起人自己' }, - { value: 7, label: '连续多级主管' } -] - -export const selectModes = [ - { value: 1, label: '选一个人' }, - { value: 2, label: '选多个人' } -] - -export const selectRanges = [ - { value: 1, label: '全公司' }, - { value: 2, label: '指定成员' }, - { value: 3, label: '指定角色' } -] - -export const optTypes = [ - { value: '1', label: '小于' }, - { value: '2', label: '大于' }, - { value: '3', label: '小于等于' }, - { value: '4', label: '等于' }, - { value: '5', label: '大于等于' }, - { value: '6', label: '介于两个数之间' } -] diff --git a/src/components/SimpleProcessDesigner/theme/iconfont.ttf b/src/components/SimpleProcessDesigner/theme/iconfont.ttf deleted file mode 100644 index c2dcd3f422eda69e3cb3520c32c67528a6f82944..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2908 zcmd^B|8HAY6+h=)$4+eLy<~aMj!WXc_Z-`G+Swf!(gk>Cdq8Ul?16U5UxkoWGH0Rn&rs=#1i>cspJ^_lSF0C+F4a}S(I7^D7~pOF46 z>1VU6nbPPJ`M&`Ot;Ai=zX;%_@n8XH?yR~~g-0Bu(hMlD4sKVjIz#Li&i(T@XQa`8fv4g7UiwE}+^x~> zR2{%RM`|kwb};YB1&{Ggsc_a!KY$&sQsH(t48Rx&M<-|JK+I<<1=wZ#H|&kr2FCny zE<^p>8u@W65`*BhS%(Ag61328UlM*v+}9c{-T(tBQh*jl?8lS`7mqE#n_EKdMm-e+g_rqukk z8#|PpJ9YAG7NnTlKR!Q3Yj2_cD8I8p3z5=5Gk!=-Q2j+&a?>unAlEFuo(qa{JEn>>q3cybypGjL;Ceh;k5(F-*ph z>2XYsp%Fw`#5RoRE_BL%^clmLju6(P7)cT~h?51Fy*M*-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Fc|c&eU_l(Oi&Eh%AG)8wc@s0;9C3L|QHB*m4kOcPT~ zLQ>1NG<3S2ji@kTAveCLL=sHM*N8cr0>Y9~h1kDJKgeUyFL=8qQsgL6MIBAF`gWK^ ib*iFE6Nz<$sXQ{NqFL&X*rp?Q!RL2r#zj6-iWC5rIkjv6 diff --git a/src/components/SimpleProcessDesigner/theme/workflow.css b/src/components/SimpleProcessDesigner/theme/workflow.css deleted file mode 100644 index ac711bc2..00000000 --- a/src/components/SimpleProcessDesigner/theme/workflow.css +++ /dev/null @@ -1,1366 +0,0 @@ - -.clearfix { - zoom: 1 -} - -.clearfix:after, -.clearfix:before { - content: ""; - display: table -} - -.clearfix:after { - clear: both -} - -@font-face { - font-family: anticon; - font-display: fallback; - src: url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.eot"); - src: url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.woff") format("woff"), url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.ttf") format("truetype"), url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.svg#iconfont") format("svg") -} - -.anticon { - display: inline-block; - font-style: normal; - vertical-align: baseline; - text-align: center; - text-transform: none; - line-height: 1; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale -} - -.anticon:before { - display: block; - font-family: anticon!important -} -.anticon-close:before { - content: "\E633" -} -.anticon-right:before { - content: "\E61F" -} -.anticon-exclamation-circle{ - color: rgb(242, 86, 67) -} -.anticon-exclamation-circle:before { - content: "\E62C" -} - -.anticon-left:before { - content: "\E620" -} - -.anticon-close-circle:before { - content: "\E62E" -} - -.ant-btn { - line-height: 1.5; - display: inline-block; - font-weight: 400; - text-align: center; - touch-action: manipulation; - cursor: pointer; - background-image: none; - border: 1px solid transparent; - white-space: nowrap; - padding: 0 15px; - font-size: 14px; - border-radius: 4px; - height: 32px; - user-select: none; - transition: all .3s cubic-bezier(.645, .045, .355, 1); - position: relative; - color: rgba(0, 0, 0, .65); - background-color: #fff; - border-color: #d9d9d9 -} - -.ant-btn>.anticon { - line-height: 1 -} - -.ant-btn, -.ant-btn:active, -.ant-btn:focus { - outline: 0 -} - -.ant-btn>a:only-child { - color: currentColor -} - -.ant-btn>a:only-child:after { - content: ""; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - background: transparent -} - -.ant-btn:focus, -.ant-btn:hover { - color: #40a9ff; - background-color: #fff; - border-color: #40a9ff -} - -.ant-btn:focus>a:only-child, -.ant-btn:hover>a:only-child { - color: currentColor -} - -.ant-btn:focus>a:only-child:after, -.ant-btn:hover>a:only-child:after { - content: ""; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - background: transparent -} - -.ant-btn.active, -.ant-btn:active { - color: #096dd9; - background-color: #fff; - border-color: #096dd9 -} - -.ant-btn.active>a:only-child, -.ant-btn:active>a:only-child { - color: currentColor -} - -.ant-btn.active>a:only-child:after, -.ant-btn:active>a:only-child:after { - content: ""; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - background: transparent -} - -.ant-btn.active, -.ant-btn:active, -.ant-btn:focus, -.ant-btn:hover { - background: #fff; - text-decoration: none -} - -.ant-btn>i, -.ant-btn>span { - pointer-events: none -} - -.ant-btn:before { - position: absolute; - top: -1px; - left: -1px; - bottom: -1px; - right: -1px; - background: #fff; - opacity: .35; - content: ""; - border-radius: inherit; - z-index: 1; - transition: opacity .2s; - pointer-events: none; - display: none -} - -.ant-btn .anticon { - transition: margin-left .3s cubic-bezier(.645, .045, .355, 1) -} - -.ant-btn:active>span, -.ant-btn:focus>span { - position: relative -} - -.ant-btn>.anticon+span, -.ant-btn>span+.anticon { - margin-left: 8px -} - -.ant-input { - font-family: Chinese Quote, -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif; - font-variant: tabular-nums; - box-sizing: border-box; - margin: 0; - padding: 0; - list-style: none; - position: relative; - display: inline-block; - padding: 4px 11px; - width: 100%; - height: 32px; - font-size: 14px; - line-height: 1.5; - color: rgba(0, 0, 0, .65); - background-color: #fff; - background-image: none; - border: 1px solid #d9d9d9; - border-radius: 4px; - transition: all .3s -} - -.ant-input::-moz-placeholder { - color: #bfbfbf; - opacity: 1 -} - -.ant-input:-ms-input-placeholder { - color: #bfbfbf -} - -.ant-input::-webkit-input-placeholder { - color: #bfbfbf -} - -.ant-input:focus, -.ant-input:hover { - border-color: #40a9ff; - border-right-width: 1px!important -} - -.ant-input:focus { - outline: 0; - box-shadow: 0 0 0 2px rgba(24, 144, 255, .2) -} - -textarea.ant-input { - max-width: 100%; - height: auto; - vertical-align: bottom; - transition: all .3s, height 0s; - min-height: 32px -} - -a, -abbr, -acronym, -address, -applet, -article, -aside, -audio, -b, -big, -blockquote, -body, -canvas, -caption, -center, -cite, -code, -dd, -del, -details, -dfn, -div, -dl, -dt, -em, -fieldset, -figcaption, -figure, -footer, -form, -h1, -h2, -h3, -h4, -h5, -h6, -header, -hgroup, -html, -i, -iframe, -img, -ins, -kbd, -label, -legend, -li, -mark, -menu, -nav, -object, -ol, -p, -pre, -q, -s, -samp, -section, -small, -span, -strike, -strong, -sub, -summary, -sup, -table, -tbody, -td, -tfoot, -th, -thead, -time, -tr, -tt, -u, -ul, -var, -video { - margin: 0; - padding: 0; - border: 0; - outline: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline -} - -*, -:after, -:before { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box -} - -html { - font-family: sans-serif; - -ms-text-size-adjust: 100%; - -webkit-text-size-adjust: 100% -} - -body, -html { - font-size: 14px -} - -body { - font-family: Microsoft Yahei, Lucida Grande, Lucida Sans Unicode, Helvetica, Arial, Verdana, sans-serif; - line-height: 1.6; - background-color: #fff; - position: static!important; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0) -} - -ol, -ul { - list-style-type: none -} - -b, -strong { - font-weight: 700 -} - -img { - border: 0 -} - -button, -input, -select, -textarea { - font-family: inherit; - font-size: 100%; - margin: 0 -} - -textarea { - overflow: auto; - vertical-align: top; - -webkit-appearance: none -} - -button, -input { - line-height: normal -} - -button, -select { - text-transform: none -} - -button, -html input[type=button], -input[type=reset], -input[type=submit] { - -webkit-appearance: button; - cursor: pointer -} - -input[type=search] { - -webkit-appearance: textfield; - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; - box-sizing: content-box -} - -input[type=search]::-webkit-search-cancel-button, -input[type=search]::-webkit-search-decoration { - -webkit-appearance: none -} - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0 -} - -table { - width: 100%; - border-spacing: 0; - border-collapse: collapse -} - -table, -td, -th { - border: 0 -} - -td, -th { - padding: 0; - vertical-align: top -} - -th { - font-weight: 700; - text-align: left -} - -thead th { - white-space: nowrap -} - -a { - text-decoration: none; - cursor: pointer; - color: #3296fa -} - -a:active, -a:hover { - outline: 0; - color: #3296fa -} - -small { - font-size: 80% -} - -body, -html { - font-size: 12px!important; - color: #191f25!important; - background: #f6f6f6!important -} - -.wrap { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - height: 100% -} - -/* @font-face { - font-family: IconFont; - src: url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.eot"); - src: url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.eot?#iefix") format("embedded-opentype"), url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.woff") format("woff"), url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.ttf") format("truetype"), url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.svg#IconFont") format("svg") -} - -.iconfont { - font-family: IconFont!important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -webkit-text-stroke-width: .2px; - -moz-osx-font-smoothing: grayscale -} */ - -@font-face { - font-family: "iconfont"; /* Project id 4495938 */ - src: url('iconfont.woff2?t=1712392083512') format('woff2'), - url('iconfont.woff?t=1712392083512') format('woff'), - url('iconfont.ttf?t=1712392083512') format('truetype'); -} - -.iconfont { - font-family: "iconfont" !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon-Inclusive:before { - content: "\e602"; -} - -.icon-copy:before { - content: "\e7eb"; -} - -.icon-handle:before { - content: "\e61c"; -} - -.icon-exclusive:before { - content: "\e717"; -} - -.icon-approve:before { - content: "\e715"; -} - -.icon-parallel:before { - content: "\e688"; -} - -.fd-nav { - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 997; - width: 100%; - height: 60px; - font-size: 14px; - color: #fff; - background: #3296fa; - display: flex; - align-items: center -} - -.fd-nav>* { - flex: 1; - width: 100% -} - -.fd-nav .fd-nav-left { - display: -webkit-box; - display: flex; - align-items: center -} - -.fd-nav .fd-nav-center { - flex: none; - width: 600px; - text-align: center -} - -.fd-nav .fd-nav-right { - display: flex; - align-items: center; - justify-content: flex-end; - text-align: right -} - -.fd-nav .fd-nav-back { - display: inline-block; - width: 60px; - height: 60px; - font-size: 22px; - border-right: 1px solid #1583f2; - text-align: center; - cursor: pointer -} - -.fd-nav .fd-nav-back:hover { - background: #5af -} - -.fd-nav .fd-nav-back:active { - background: #1583f2 -} - -.fd-nav .fd-nav-back .anticon { - line-height: 60px -} - -.fd-nav .fd-nav-title { - width: 0; - flex: 1; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - padding: 0 15px -} - -.fd-nav a { - color: #fff; - margin-left: 12px -} - -.fd-nav .button-publish { - min-width: 80px; - margin-left: 4px; - margin-right: 15px; - color: #3296fa; - border-color: #fff -} - -.fd-nav .button-publish.ant-btn:focus, -.fd-nav .button-publish.ant-btn:hover { - color: #3296fa; - border-color: #fff; - box-shadow: 0 10px 20px 0 rgba(0, 0, 0, .3) -} - -.fd-nav .button-publish.ant-btn:active { - color: #3296fa; - background: #d6eaff; - box-shadow: none -} - -.fd-nav .button-preview { - min-width: 80px; - margin-left: 16px; - margin-right: 4px; - color: #fff; - border-color: #fff; - background: transparent -} - -.fd-nav .button-preview.ant-btn:focus, -.fd-nav .button-preview.ant-btn:hover { - color: #fff; - border-color: #fff; - background: #59acfc -} - -.fd-nav .button-preview.ant-btn:active { - color: #fff; - border-color: #fff; - background: #2186ef -} - -.fd-nav-content { - position: fixed; - top: 60px; - left: 0; - right: 0; - bottom: 0; - z-index: 1; - overflow-x: hidden; - overflow-y: auto; - padding-bottom: 30px -} - -.error-modal-desc { - font-size: 13px; - color: rgba(25, 31, 37, .56); - line-height: 22px; - margin-bottom: 14px -} - -.error-modal-list { - height: 200px; - overflow-y: auto; - margin-right: -25px; - padding-right: 25px -} - -.error-modal-item { - padding: 10px 20px; - line-height: 21px; - background: #f6f6f6; - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 8px; - border-radius: 4px -} - -.error-modal-item-label { - flex: none; - font-size: 15px; - color: rgba(25, 31, 37, .56); - padding-right: 10px -} - -.error-modal-item-content { - text-align: right; - flex: 1; - font-size: 13px; - color: #191f25 -} - -#body.blur { - -webkit-filter: blur(3px); - filter: blur(3px) -} - -.zoom { - display: flex; - position: fixed; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - height: 40px; - width: 125px; - right: 40px; - margin-top: 30px; - z-index: 10 -} - -.zoom .zoom-in, -.zoom .zoom-out { - width: 30px; - height: 30px; - background: #fff; - color: #c1c1cd; - cursor: pointer; - background-size: 100%; - background-repeat: no-repeat -} - -.zoom .zoom-out { - background-image: url(https://gw.alicdn.com/tfs/TB1s0qhBHGYBuNjy0FoXXciBFXa-90-90.png) -} - -.zoom .zoom-out.disabled { - opacity: .5 -} - -.zoom .zoom-in { - background-image: url(https://gw.alicdn.com/tfs/TB1UIgJBTtYBeNjy1XdXXXXyVXa-90-90.png) -} - -.zoom .zoom-in.disabled { - opacity: .5 -} - -.auto-judge:hover .editable-title, -.node-wrap-box:hover .editable-title { - border-bottom: 1px dashed #fff -} - -.auto-judge:hover .editable-title.editing, -.node-wrap-box:hover .editable-title.editing { - text-decoration: none; - border: 1px solid #d9d9d9 -} - -.auto-judge:hover .editable-title { - border-color: #15bc83 -} - -.editable-title { - line-height: 15px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - border-bottom: 1px dashed transparent -} - -.editable-title:before { - content: ""; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 40px -} - -.editable-title:hover { - border-bottom: 1px dashed #fff -} - -.editable-title-input { - flex: none; - height: 18px; - padding-left: 4px; - text-indent: 0; - font-size: 12px; - line-height: 18px; - z-index: 1 -} - -.editable-title-input:hover { - text-decoration: none -} - -.ant-btn { - position: relative -} - -.node-wrap-box { - display: -webkit-inline-box; - display: -ms-inline-flexbox; - display: inline-flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - position: relative; - width: 220px; - min-height: 72px; - -ms-flex-negative: 0; - flex-shrink: 0; - background: #fff; - border-radius: 4px; - cursor: pointer -} - -.node-wrap-box:after { - pointer-events: none; - content: ""; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - z-index: 2; - border-radius: 4px; - border: 1px solid transparent; - transition: all .1s cubic-bezier(.645, .045, .355, 1); - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .1) -} - -.node-wrap-box.active:after, -.node-wrap-box:active:after, -.node-wrap-box:hover:after { - border: 1px solid #3296fa; - box-shadow: 0 0 6px 0 rgba(50, 150, 250, .3) -} - -.node-wrap-box.active .close, -.node-wrap-box:active .close, -.node-wrap-box:hover .close { - display: block -} - -.node-wrap-box.error:after { - border: 1px solid #f25643; - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .1) -} - -.node-wrap-box .title { - position: relative; - display: flex; - align-items: center; - padding-left: 16px; - padding-right: 30px; - width: 100%; - height: 24px; - line-height: 24px; - font-size: 12px; - color: #fff; - text-align: left; - background: #576a95; - border-radius: 4px 4px 0 0 -} - -.node-wrap-box .title .iconfont { - font-size: 12px; - margin-right: 5px -} - -.node-wrap-box .placeholder { - color: #bfbfbf -} - -.node-wrap-box .close { - display: none; - position: absolute; - right: 10px; - top: 50%; - transform: translateY(-50%); - width: 20px; - height: 20px; - font-size: 14px; - color: #fff; - border-radius: 50%; - text-align: center; - line-height: 20px -} - -.node-wrap-box .content { - position: relative; - font-size: 14px; - padding: 16px; - padding-right: 30px -} - -.node-wrap-box .content .text { - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical -} - -.node-wrap-box .content .arrow { - position: absolute; - right: 10px; - top: 50%; - transform: translateY(-50%); - width: 20px; - height: 14px; - font-size: 14px; - color: #979797 -} - -.start-node.node-wrap-box .content .text { - display: block; - white-space: nowrap -} - -.node-wrap-box:before { - content: ""; - position: absolute; - top: -12px; - left: 50%; - -webkit-transform: translateX(-50%); - transform: translateX(-50%); - width: 0; - height: 4px; - border-style: solid; - border-width: 8px 6px 4px; - border-color: #cacaca transparent transparent; - background: #f5f5f7 -} - -.node-wrap-box.start-node:before { - content: none -} - -.top-left-cover-line { - left: -1px -} - -.top-left-cover-line, -.top-right-cover-line { - position: absolute; - height: 8px; - width: 50%; - background-color: #f5f5f7; - top: -4px -} - -.top-right-cover-line { - right: -1px -} - -.bottom-left-cover-line { - left: -1px -} - -.bottom-left-cover-line, -.bottom-right-cover-line { - position: absolute; - height: 8px; - width: 50%; - background-color: #f5f5f7; - bottom: -4px -} - -.bottom-right-cover-line { - right: -1px -} - -.dingflow-design { - width: 100%; - background-color: #f5f5f7; - overflow: auto; - position: absolute; - bottom: 0; - left: 0; - right: 0; - top: 0 -} - -.dingflow-design .box-scale { - transform: scale(1); - display: inline-block; - position: relative; - width: 100%; - padding: 54.5px 0; - -webkit-box-align: start; - -ms-flex-align: start; - align-items: flex-start; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - min-width: -webkit-min-content; - min-width: -moz-min-content; - min-width: min-content; - background-color: #f5f5f7; - transform-origin: 50% 0px 0px; -} - -.dingflow-design .node-wrap { - flex-direction: column; - -webkit-box-pack: start; - -ms-flex-pack: start; - justify-content: flex-start; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - -webkit-box-flex: 1; - -ms-flex-positive: 1; - padding: 0 50px; - position: relative -} - -.dingflow-design .branch-wrap, -.dingflow-design .node-wrap { - display: inline-flex; - width: 100% -} - -.dingflow-design .branch-box-wrap { - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - min-height: 270px; - width: 100%; - -ms-flex-negative: 0; - flex-shrink: 0 -} - -.dingflow-design .branch-box { - display: flex; - overflow: visible; - min-height: 180px; - height: auto; - border-bottom: 2px solid #ccc; - border-top: 2px solid #ccc; - position: relative; - margin-top: 15px -} - -.dingflow-design .branch-box .col-box { - background: #f5f5f7 -} - -.dingflow-design .branch-box .col-box:before { - content: ""; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 0; - margin: auto; - width: 2px; - height: 100%; - background-color: #cacaca -} - -.dingflow-design .add-branch { - border: none; - outline: none; - user-select: none; - justify-content: center; - font-size: 12px; - padding: 0 10px; - height: 30px; - line-height: 30px; - border-radius: 15px; - color: #3296fa; - background: #fff; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .1); - position: absolute; - top: -16px; - left: 50%; - transform: translateX(-50%); - transform-origin: center center; - cursor: pointer; - z-index: 1; - display: inline-flex; - align-items: center; - -webkit-transition: all .3s cubic-bezier(.645, .045, .355, 1); - transition: all .3s cubic-bezier(.645, .045, .355, 1) -} - -.dingflow-design .add-branch:hover { - transform: translateX(-50%) scale(1.1); - box-shadow: 0 8px 16px 0 rgba(0, 0, 0, .1) -} - -.dingflow-design .add-branch:active { - transform: translateX(-50%); - box-shadow: none -} - -.dingflow-design .col-box { - display: inline-flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - -webkit-box-align: center; - align-items: center; - position: relative -} - -.dingflow-design .condition-node { - min-height: 220px -} - -.dingflow-design .condition-node, -.dingflow-design .condition-node-box { - display: inline-flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - -webkit-box-flex: 1 -} - -.dingflow-design .condition-node-box { - padding-top: 30px; - padding-right: 50px; - padding-left: 50px; - -webkit-box-pack: center; - justify-content: center; - -webkit-box-align: center; - align-items: center; - flex-grow: 1; - position: relative -} - -.dingflow-design .condition-node-box:before { - content: ""; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - margin: auto; - width: 2px; - height: 100%; - background-color: #cacaca -} - -.dingflow-design .auto-judge { - position: relative; - width: 220px; - min-height: 72px; - background: #fff; - border-radius: 4px; - padding: 14px 19px; - cursor: pointer -} - -.dingflow-design .auto-judge:after { - pointer-events: none; - content: ""; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - z-index: 2; - border-radius: 4px; - border: 1px solid transparent; - transition: all .1s cubic-bezier(.645, .045, .355, 1); - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .1) -} - -.dingflow-design .auto-judge.active:after, -.dingflow-design .auto-judge:active:after, -.dingflow-design .auto-judge:hover:after { - border: 1px solid #3296fa; - box-shadow: 0 0 6px 0 rgba(50, 150, 250, .3) -} - - - -.dingflow-design .auto-judge.error:after { - border: 1px solid #f25643; - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .1) -} - -/* .dingflow-design .auto-judge .title-wrapper { - position: relative; - font-size: 12px; - color: #15bc83; - text-align: left; - height: 24px; - line-height: 24px; - width: 258px; -} */ - -.dingflow-design .title-wrapper { - display: flex; - justify-content: space-between; - align-items: center; - position: relative; - font-size: 12px; - border-radius: 4px 4px 0 0; - text-align: left; - height: 24px; - line-height: 24px; - width: 220px; - color: #fff; - padding-right: 10px; - padding-left: 10px; -} - -.dingflow-design .title-wrapper .editable-title { - max-width: 120px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis -} - -.dingflow-design .title-wrapper .close { - display: none; - position: absolute; - right: 10px; - top: 2px; - width: 20px; - height: 20px; - font-size: 14px; - color:#fff; - border-radius: 50%; - text-align: center; - line-height: 20px; - z-index: 2 -} - -.dingflow-design .title-wrapper:hover .close { - display: block -} -/* .dingflow-design .title-wrapper .close { - padding-right: 2px; -} */ - -/* .dingflow-design .title-wrapper .priority-title { - display: inline-block; - float: right; - margin-right: 10px; - color: rgba(25, 31, 37, .56) -} */ - -/* .dingflow-design .auto-judge .title-wrapper .editable-title { - display: inline-block; - max-width: 120px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis -} - -.dingflow-design .auto-judge .title-wrapper .priority-title { - display: inline-block; - float: right; - margin-right: 10px; - color: rgba(25, 31, 37, .56) -} */ - -.dingflow-design .auto-judge .placeholder { - color: #bfbfbf -} - -.dingflow-design .auto-judge .content { - font-size: 14px; - color: #191f25; - text-align: left; - margin-top: 6px; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical -} - -.dingflow-design .auto-judge .sort-left, -.dingflow-design .auto-judge .sort-right { - position: absolute; - top: 0; - bottom: 0; - display: none; - z-index: 1 -} - -.dingflow-design .auto-judge .sort-left { - left: 0; - border-right: 1px solid #f6f6f6 -} - -.dingflow-design .auto-judge .sort-right { - right: 0; - border-left: 1px solid #f6f6f6 -} - -.dingflow-design .auto-judge:hover .sort-left, -.dingflow-design .auto-judge:hover .sort-right { - display: flex; - align-items: center -} - -.dingflow-design .auto-judge .sort-left:hover, -.dingflow-design .auto-judge .sort-right:hover { - background: #efefef -} - -.dingflow-design .end-node { - border-radius: 50%; - font-size: 14px; - color: rgba(25, 31, 37, .4); - text-align: left -} - -.dingflow-design .end-node .end-node-circle { - width: 10px; - height: 10px; - margin: auto; - border-radius: 50%; - background: #dbdcdc -} - -.dingflow-design .end-node .end-node-text { - margin-top: 5px; - text-align: center -} - -.approval-setting { - border-radius: 2px; - margin: 20px 0; - position: relative; - background: #fff -} - -.ant-btn { - position: relative -} - - diff --git a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue index d112cf5b..a913fdf0 100644 --- a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue +++ b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue @@ -146,9 +146,9 @@ onMounted(async () => { processNodeTree.value = { name: '开始', type: NodeType.START_EVENT_NODE, - id: 'StartEvent_1', // TODO @jason:这个我们要不要 StartEvent 哈? + id: 'StartEvent', childNode: { - id: 'EndEvent_1', + id: 'EndEvent', name: '结束', type: NodeType.END_EVENT_NODE } diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts index 449e193e..6411237d 100644 --- a/src/components/SimpleProcessDesignerV2/src/consts.ts +++ b/src/components/SimpleProcessDesignerV2/src/consts.ts @@ -1,5 +1,6 @@ // @ts-ignore import { DictDataVO } from '@/api/system/dict/types' + /** * 节点类型 */ @@ -85,13 +86,17 @@ export enum CandidateStrategy { */ ROLE = 10, /** - * 指定部门成员 + * 部门成员 */ DEPT_MEMBER = 20, /** * 部门的负责人 */ DEPT_LEADER = 21, + /** + * 连续多级部门的负责人 + */ + MULTI_LEVEL_DEPT_LEADER = 23, /** * 指定岗位 */ @@ -108,6 +113,14 @@ export enum CandidateStrategy { * 发起人自己 */ START_USER = 36, + /** + * 发起人部门负责人 + */ + START_USER_DEPT_LEADER = 37, + /** + * 发起人连续多级部门的负责人 + */ + START_USER_MULTI_LEVEL_DEPT_LEADER = 38, /** * 指定用户组 */ @@ -280,6 +293,21 @@ NODE_DEFAULT_NAME.set(NodeType.USER_TASK_NODE, '审批人') NODE_DEFAULT_NAME.set(NodeType.COPY_TASK_NODE, '抄送人') NODE_DEFAULT_NAME.set(NodeType.CONDITION_NODE, '条件') +// 候选人策略。暂时不从字典中取。 后续可能调整。控制显示顺序 +export const CANDIDATE_STRATEGY: DictDataVO[] = [ + { label: '指定成员', value: CandidateStrategy.USER }, + { label: '指定角色', value: CandidateStrategy.ROLE }, + { label: '部门成员', value: CandidateStrategy.DEPT_MEMBER }, + { label: '部门负责人', value: CandidateStrategy.DEPT_LEADER }, + { label: '连续多级部门负责人', value: CandidateStrategy.MULTI_LEVEL_DEPT_LEADER }, + { label: '发起人自选', value: CandidateStrategy.START_USER_SELECT }, + { label: '发起人本人', value: CandidateStrategy.START_USER }, + { label: '发起人部门负责人', value: CandidateStrategy.START_USER_DEPT_LEADER }, + { label: '发起人连续部门负责人', value: CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER }, + { label: '用户组', value: CandidateStrategy.USER_GROUP }, + { label: '流程表达式', value: CandidateStrategy.EXPRESSION } +] + export const APPROVE_METHODS: DictDataVO[] = [ { label: '随机挑选一人审批', value: ApproveMethodType.RRANDOM_SELECT_ONE_APPROVE }, { label: '多人会签(按通过比例%)', value: ApproveMethodType.APPROVE_BY_RATIO }, @@ -355,3 +383,21 @@ export const DEFAULT_BUTTON_SETTING: ButtonSetting[] = [ { id: OpsButtonType.ADD_SIGN, displayName: '加签', enable: false }, { id: OpsButtonType.RETURN, displayName: '回退', enable: false } ] + +export const MULTI_LEVEL_DEPT: DictDataVO = [ + { label: '第1级部门', value: 1 }, + { label: '第2级部门', value: 2 }, + { label: '第3级部门', value: 3 }, + { label: '第4级部门', value: 4 }, + { label: '第5级部门', value: 5 }, + { label: '第6级部门', value: 6 }, + { label: '第7级部门', value: 7 }, + { label: '第8级部门', value: 8 }, + { label: '第9级部门', value: 9 }, + { label: '第10级部门', value: 10 }, + { label: '第11级部门', value: 11 }, + { label: '第12级部门', value: 12 }, + { label: '第13级部门', value: 13 }, + { label: '第14级部门', value: 14 }, + { label: '第15级部门', value: 15 } +] diff --git a/src/components/SimpleProcessDesignerV2/src/node.ts b/src/components/SimpleProcessDesignerV2/src/node.ts index e41c9b83..e9831d81 100644 --- a/src/components/SimpleProcessDesignerV2/src/node.ts +++ b/src/components/SimpleProcessDesignerV2/src/node.ts @@ -89,9 +89,16 @@ export function useFormFieldsPermission() { } export type UserTaskFormType = { - candidateParamArray: any[] + //candidateParamArray: any[] candidateStrategy: CandidateStrategy approveMethod: ApproveMethodType + roleIds?: number[] // 角色 + deptIds?: number[] // 部门 + deptLevel?: number // 部门层级 + userIds?: number[] // 用户 + userGroups?: number[] // 用户组 + postIds?: number[] // 岗位 + expression?: string // 流程表达式 approveRatio?: number rejectHandlerType?: RejectHandlerType returnNodeId?: string @@ -103,8 +110,15 @@ export type UserTaskFormType = { } export type CopyTaskFormType = { - candidateParamArray: any[] + // candidateParamArray: any[] candidateStrategy: CandidateStrategy + roleIds?: number[] // 角色 + deptIds?: number[] // 部门 + deptLevel?: number // 部门层级 + userIds?: number[] // 用户 + userGroups?: number[] // 用户组 + postIds?: number[] // 岗位 + expression?: string // 流程表达式 } /** @@ -120,7 +134,7 @@ export function useNodeForm(nodeType: NodeType) { const configForm = ref() if (nodeType === NodeType.USER_TASK_NODE) { configForm.value = { - candidateParamArray: [], + //candidateParamArray: [], candidateStrategy: CandidateStrategy.USER, approveMethod: ApproveMethodType.RRANDOM_SELECT_ONE_APPROVE, approveRatio: 100, @@ -134,7 +148,7 @@ export function useNodeForm(nodeType: NodeType) { } } else { configForm.value = { - candidateParamArray: [], + //candidateParamArray: [], candidateStrategy: CandidateStrategy.USER } } @@ -143,10 +157,10 @@ export function useNodeForm(nodeType: NodeType) { let showText = '' // 指定成员 if (configForm.value?.candidateStrategy === CandidateStrategy.USER) { - if (configForm.value.candidateParamArray?.length > 0) { + if (configForm.value?.userIds!.length > 0) { const candidateNames: string[] = [] userOptions?.value.forEach((item) => { - if (configForm.value?.candidateParamArray.includes(item.id)) { + if (configForm.value?.userIds!.includes(item.id)) { candidateNames.push(item.nickname) } }) @@ -155,10 +169,10 @@ export function useNodeForm(nodeType: NodeType) { } // 指定角色 if (configForm.value?.candidateStrategy === CandidateStrategy.ROLE) { - if (configForm.value.candidateParamArray?.length > 0) { + if (configForm.value.roleIds!.length > 0) { const candidateNames: string[] = [] roleOptions?.value.forEach((item) => { - if (configForm.value?.candidateParamArray.includes(item.id)) { + if (configForm.value?.roleIds!.includes(item.id)) { candidateNames.push(item.name) } }) @@ -168,29 +182,32 @@ export function useNodeForm(nodeType: NodeType) { // 指定部门 if ( configForm.value?.candidateStrategy === CandidateStrategy.DEPT_MEMBER || - configForm.value?.candidateStrategy === CandidateStrategy.DEPT_LEADER + configForm.value?.candidateStrategy === CandidateStrategy.DEPT_LEADER || + configForm.value?.candidateStrategy === CandidateStrategy.MULTI_LEVEL_DEPT_LEADER ) { - if (configForm.value?.candidateParamArray?.length > 0) { + if (configForm.value?.deptIds!.length > 0) { const candidateNames: string[] = [] deptOptions?.value.forEach((item) => { - if (configForm.value?.candidateParamArray.includes(item.id)) { + if (configForm.value?.deptIds!.includes(item.id!)) { candidateNames.push(item.name) } }) if (configForm.value.candidateStrategy === CandidateStrategy.DEPT_MEMBER) { showText = `部门成员:${candidateNames.join(',')}` - } else { + } else if (configForm.value.candidateStrategy === CandidateStrategy.DEPT_LEADER) { showText = `部门的负责人:${candidateNames.join(',')}` + } else { + showText = `多级部门的负责人:${candidateNames.join(',')}` } } } // 指定岗位 if (configForm.value?.candidateStrategy === CandidateStrategy.POST) { - if (configForm.value.candidateParamArray?.length > 0) { + if (configForm.value.postIds!.length > 0) { const candidateNames: string[] = [] postOptions?.value.forEach((item) => { - if (configForm.value?.candidateParamArray.includes(item.id)) { + if (configForm.value?.postIds!.includes(item.id!)) { candidateNames.push(item.name) } }) @@ -199,10 +216,10 @@ export function useNodeForm(nodeType: NodeType) { } // 指定用户组 if (configForm.value?.candidateStrategy === CandidateStrategy.USER_GROUP) { - if (configForm.value?.candidateParamArray?.length > 0) { + if (configForm.value?.userGroups!.length > 0) { const candidateNames: string[] = [] userGroupOptions?.value.forEach((item) => { - if (configForm.value?.candidateParamArray.includes(item.id)) { + if (configForm.value?.userGroups!.includes(item.id)) { candidateNames.push(item.name) } }) @@ -218,16 +235,116 @@ export function useNodeForm(nodeType: NodeType) { if (configForm.value?.candidateStrategy === CandidateStrategy.START_USER) { showText = `发起人自己` } - + // 发起人的部门负责人 + if (configForm.value?.candidateStrategy === CandidateStrategy.START_USER_DEPT_LEADER) { + showText = `发起人的部门负责人` + } + // 发起人的部门负责人 + if ( + configForm.value?.candidateStrategy === CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER + ) { + showText = `发起人连续部门负责人` + } // 流程表达式 if (configForm.value?.candidateStrategy === CandidateStrategy.EXPRESSION) { - if (configForm.value.candidateParamArray?.length > 0) { - showText = `流程表达式:${configForm.value.candidateParamArray[0]}` - } + showText = `流程表达式:${configForm.value.expression}` } return showText } + /** + * 处理候选人参数的赋值 + */ + const handleCandidateParam = () => { + let candidateParam: undefined | string = undefined + if (!configForm.value) { + return candidateParam + } + switch (configForm.value.candidateStrategy) { + case CandidateStrategy.USER: + candidateParam = configForm.value.userIds!.join(',') + break + case CandidateStrategy.ROLE: + candidateParam = configForm.value.roleIds!.join(',') + break + case CandidateStrategy.POST: + candidateParam = configForm.value.postIds!.join(',') + break + case CandidateStrategy.USER_GROUP: + candidateParam = configForm.value.userGroups!.join(',') + break + case CandidateStrategy.EXPRESSION: + candidateParam = configForm.value.expression! + break + case CandidateStrategy.DEPT_MEMBER: + case CandidateStrategy.DEPT_LEADER: + candidateParam = configForm.value.deptIds!.join(',') + break + // 发起人部门负责人 + case CandidateStrategy.START_USER_DEPT_LEADER: + case CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER: + candidateParam = configForm.value.deptLevel + '' + break + // 指定连续多级部门的负责人 + case CandidateStrategy.MULTI_LEVEL_DEPT_LEADER: { + // TODO 是否允许选多个部门 + const deptIds = configForm.value.deptIds!.join(',') + candidateParam = deptIds.concat(',' + configForm.value.deptLevel + '') + break + } + default: + break + } + return candidateParam + } + /** + * 解析候选人参数 + */ + const parseCandidateParam = ( + candidateStrategy: CandidateStrategy, + candidateParam: string | undefined + ) => { + if (!configForm.value || !candidateParam) { + return + } + switch (candidateStrategy) { + case CandidateStrategy.USER: { + configForm.value.userIds = candidateParam.split(',').map((item) => +item) + break + } + case CandidateStrategy.ROLE: + configForm.value.roleIds = candidateParam.split(',').map((item) => +item) + break + case CandidateStrategy.POST: + configForm.value.postIds = candidateParam.split(',').map((item) => +item) + break + case CandidateStrategy.USER_GROUP: + configForm.value.userGroups = candidateParam.split(',').map((item) => +item) + break + case CandidateStrategy.EXPRESSION: + configForm.value.expression = candidateParam + break + case CandidateStrategy.DEPT_MEMBER: + case CandidateStrategy.DEPT_LEADER: + configForm.value.deptIds = candidateParam.split(',').map((item) => +item) + break + // 发起人部门负责人 + case CandidateStrategy.START_USER_DEPT_LEADER: + case CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER: + configForm.value.deptLevel = +candidateParam + break + // 指定连续多级部门的负责人 + case CandidateStrategy.MULTI_LEVEL_DEPT_LEADER: { + // 暂时只能选一个部门 + const paramArray = candidateParam.split(',') + configForm.value.deptIds = [+paramArray[0]] + configForm.value.deptLevel = +paramArray[1] + break + } + default: + break + } + } return { configForm, roleOptions, @@ -235,6 +352,8 @@ export function useNodeForm(nodeType: NodeType) { userOptions, userGroupOptions, deptTreeOptions, + handleCandidateParam, + parseCandidateParam, getShowText } } diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/CopyTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/CopyTaskNodeConfig.vue index 807f08b5..aa1bb51b 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/CopyTaskNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/CopyTaskNodeConfig.vue @@ -46,14 +46,9 @@ - + - + - + - + @@ -200,7 +180,7 @@