|
@@ -1,6 +1,6 @@
|
|
import { buildUUID } from '@/utils/uuid'
|
|
import { buildUUID } from '@/utils/uuid'
|
|
-import { ApartmentOutlined, ClusterOutlined, PlusOutlined } from '@ant-design/icons'
|
|
|
|
-import { Button, Menu, Popover } from 'antd'
|
|
|
|
|
|
+import { BranchesOutlined, PlusOutlined, SolutionOutlined } from '@ant-design/icons'
|
|
|
|
+import { Button, Popover } from 'antd'
|
|
import React, { useMemo, useState, useContext } from 'react'
|
|
import React, { useMemo, useState, useContext } from 'react'
|
|
import { getBezierPath, getEdgeCenter, getMarkerEnd, useStoreState } from 'react-flow-renderer'
|
|
import { getBezierPath, getEdgeCenter, getMarkerEnd, useStoreState } from 'react-flow-renderer'
|
|
import { Actions, FlowContext } from '../../context'
|
|
import { Actions, FlowContext } from '../../context'
|
|
@@ -9,7 +9,7 @@ import styles from './index.less'
|
|
import 'antd/lib/button/style/css'
|
|
import 'antd/lib/button/style/css'
|
|
const foreignObjectSize = 50
|
|
const foreignObjectSize = 50
|
|
|
|
|
|
-const renderMenu = ({ dispatch, elements, togglePopver, id, flowInstance, sort }) => {
|
|
|
|
|
|
+const renderMenu = ({ dispatch, elements, togglePopver, id, flowInstance }) => {
|
|
const setElements = els => {
|
|
const setElements = els => {
|
|
dispatch({
|
|
dispatch({
|
|
type: Actions.SET_ELEMENTS,
|
|
type: Actions.SET_ELEMENTS,
|
|
@@ -58,16 +58,38 @@ const renderMenu = ({ dispatch, elements, togglePopver, id, flowInstance, sort }
|
|
}
|
|
}
|
|
|
|
|
|
return (
|
|
return (
|
|
- <Menu>
|
|
|
|
- <Menu.Item key="1" onClick={addAuditor}>
|
|
|
|
- <ClusterOutlined />
|
|
|
|
- <span className="ml-1">审批人</span>
|
|
|
|
- </Menu.Item>
|
|
|
|
- {/* <Menu.Item key="2" onClick={remove}>
|
|
|
|
- <ApartmentOutlined />
|
|
|
|
- <span className="ml-1">条件分支</span>
|
|
|
|
- </Menu.Item> */}
|
|
|
|
- </Menu>
|
|
|
|
|
|
+ // <Menu>
|
|
|
|
+ // <Menu.Item key="1" onClick={addAuditor}>
|
|
|
|
+ // <ClusterOutlined />
|
|
|
|
+ // <span className="ml-1">审批人</span>
|
|
|
|
+ // </Menu.Item>
|
|
|
|
+ // {/* <Menu.Item key="2" onClick={remove}>
|
|
|
|
+ // <ApartmentOutlined />
|
|
|
|
+ // <span className="ml-1">条件分支</span>
|
|
|
|
+ // </Menu.Item> */}
|
|
|
|
+ // </Menu>
|
|
|
|
+ <ul className="m-0 p-0 ">
|
|
|
|
+ <li>
|
|
|
|
+ <Button type="dashed" onClick={addAuditor} icon={<SolutionOutlined />}>
|
|
|
|
+ 审批人
|
|
|
|
+ </Button>
|
|
|
|
+ </li>
|
|
|
|
+ <li className="mt-2 condition">
|
|
|
|
+ <Button type="dashed" onClick={addAuditor} icon={<BranchesOutlined />}>
|
|
|
|
+ 条件分支
|
|
|
|
+ </Button>
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
+ // <ul className="m-0 p-0">
|
|
|
|
+ // <li className="rounded-2px border border-hex-d9d9d9 border-dashed text-hex-1890ff px-17px py-9px cursor-pointer">
|
|
|
|
+ // <SolutionOutlined />
|
|
|
|
+ // <span className="ml-9px">审批人</span>
|
|
|
|
+ // </li>
|
|
|
|
+ // <li className="mt-2 rounded-2px border border-hex-d9d9d9 border-dashed text-hex-52c41a px-17px py-9px cursor-pointer">
|
|
|
|
+ // <BranchesOutlined />
|
|
|
|
+ // <span className="ml-9px">条件分支</span>
|
|
|
|
+ // </li>
|
|
|
|
+ // </ul>
|
|
)
|
|
)
|
|
}
|
|
}
|
|
|
|
|