simple-process-designer.scss 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826
  1. // 配置节点头部
  2. .config-header {
  3. display: flex;
  4. flex-direction: column;
  5. .node-name {
  6. display: flex;
  7. height: 24px;
  8. line-height: 24px;
  9. font-size: 16px;
  10. cursor: pointer;
  11. align-items: center;
  12. }
  13. .divide-line {
  14. width: 100%;
  15. height: 1px;
  16. margin-top: 16px;
  17. background: #eee;
  18. }
  19. .config-editable-input {
  20. height: 24px;
  21. max-width: 510px;
  22. font-size: 16px;
  23. line-height: 24px;
  24. border: 1px solid #d9d9d9;
  25. border-radius: 4px;
  26. transition: all 0.3s;
  27. &:focus {
  28. border-color: #40a9ff;
  29. outline: 0;
  30. box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
  31. }
  32. }
  33. }
  34. // 表单字段权限
  35. .field-setting-pane {
  36. display: flex;
  37. flex-direction: column;
  38. font-size: 14px;
  39. .field-setting-desc {
  40. padding-right: 8px;
  41. margin-bottom: 16px;
  42. font-size: 16px;
  43. font-weight: 700;
  44. }
  45. .field-permit-title {
  46. display: flex;
  47. justify-content: space-between;
  48. align-items: center;
  49. height: 45px;
  50. padding-left: 12px;
  51. line-height: 45px;
  52. background-color: #f8fafc0a;
  53. border: 1px solid #1f38581a;
  54. .first-title {
  55. text-align: left !important;
  56. }
  57. .other-titles {
  58. display: flex;
  59. justify-content: space-between;
  60. }
  61. .setting-title-label {
  62. display: inline-block;
  63. width: 110px;
  64. padding: 5px 0;
  65. font-size: 13px;
  66. font-weight: 700;
  67. color: #000;
  68. text-align: center;
  69. }
  70. }
  71. .field-setting-item {
  72. align-items: center;
  73. display: flex;
  74. justify-content: space-between;
  75. height: 38px;
  76. padding-left: 12px;
  77. border: 1px solid #1f38581a;
  78. border-top: 0;
  79. .field-setting-item-label {
  80. display: inline-block;
  81. width: 110px;
  82. min-height: 16px;
  83. overflow: hidden;
  84. text-overflow: ellipsis;
  85. white-space: nowrap;
  86. cursor: text;
  87. }
  88. .field-setting-item-group {
  89. display: flex;
  90. justify-content: space-between;
  91. .item-radio-wrap {
  92. display: inline-block;
  93. width: 110px;
  94. text-align: center;
  95. }
  96. }
  97. }
  98. }
  99. // 节点连线气泡卡片样式
  100. .handler-item-wrapper {
  101. width: 320px;
  102. display: flex;
  103. flex-wrap: wrap;
  104. cursor: pointer;
  105. .handler-item {
  106. display: flex;
  107. flex-direction: column;
  108. align-items: center;
  109. margin-top: 12px;
  110. }
  111. .handler-item-icon {
  112. width: 50px;
  113. height: 50px;
  114. background: #fff;
  115. border: 1px solid #e2e2e2;
  116. border-radius: 50%;
  117. user-select: none;
  118. text-align: center;
  119. &:hover {
  120. background: #e2e2e2;
  121. box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
  122. }
  123. .icon-size {
  124. font-size: 25px;
  125. line-height: 50px;
  126. }
  127. }
  128. .approve {
  129. color: #ff943e;
  130. }
  131. .copy {
  132. color: #3296fa;
  133. }
  134. .condition {
  135. color: #67c23a;
  136. }
  137. .parallel {
  138. color: #626aef;
  139. }
  140. .inclusive {
  141. color: #345da2;
  142. }
  143. .delay {
  144. color: #e47470;
  145. }
  146. .trigger {
  147. color: #3373d2;
  148. }
  149. .router {
  150. color: #ca3a31
  151. }
  152. .transactor {
  153. color: #330099;
  154. }
  155. .child-process {
  156. color: #996633;
  157. }
  158. .async-child-process {
  159. color: #006666;
  160. }
  161. .handler-item-text {
  162. margin-top: 4px;
  163. width: 80px;
  164. text-align: center;
  165. font-size: 13px;
  166. }
  167. }
  168. // Simple 流程模型样式
  169. .simple-process-model-container {
  170. height: 100%;
  171. padding-top: 32px;
  172. background-color: #fafafa;
  173. overflow-x: auto;
  174. width: 100%;
  175. .simple-process-model {
  176. display: flex;
  177. flex-direction: column;
  178. justify-content: center;
  179. align-items: center;
  180. transform-origin: 50% 0 0;
  181. min-width: fit-content;
  182. transform: scale(1);
  183. transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  184. background: url(@/assets/svgs/bpm/simple-process-bg.svg) 0 0 repeat;
  185. // 节点容器 定义节点宽度
  186. .node-container {
  187. width: 200px;
  188. }
  189. // 节点
  190. .node-box {
  191. position: relative;
  192. display: flex;
  193. min-height: 70px;
  194. padding: 5px 10px 8px;
  195. cursor: pointer;
  196. background-color: #fff;
  197. flex-direction: column;
  198. border: 2px solid transparent;
  199. border-radius: 8px;
  200. box-shadow: 0 1px 4px 0 rgb(10 30 65 / 16%);
  201. transition: all 0.1s cubic-bezier(0.645, 0.045, 0.355, 1);
  202. &.status-pass {
  203. background-color: #a9da90;
  204. border-color: #67c23a;
  205. }
  206. &.status-pass:hover {
  207. border-color: #67c23a;
  208. }
  209. &.status-running {
  210. background-color: #e7f0fe;
  211. border-color: #5a9cf8;
  212. }
  213. &.status-running:hover {
  214. border-color: #5a9cf8;
  215. }
  216. &.status-reject {
  217. background-color: #f6e5e5;
  218. border-color: #e47470;
  219. }
  220. &.status-reject:hover {
  221. border-color: #e47470;
  222. }
  223. &:hover {
  224. border-color: #0089ff;
  225. .node-toolbar {
  226. opacity: 1;
  227. }
  228. .branch-node-move {
  229. display: flex;
  230. }
  231. }
  232. // 普通节点标题
  233. .node-title-container {
  234. display: flex;
  235. padding: 4px;
  236. cursor: pointer;
  237. border-radius: 4px 4px 0 0;
  238. align-items: center;
  239. .node-title-icon {
  240. display: flex;
  241. align-items: center;
  242. &.user-task {
  243. color: #ff943e;
  244. }
  245. &.copy-task {
  246. color: #3296fa;
  247. }
  248. &.start-user {
  249. color: #676565;
  250. }
  251. &.delay-node {
  252. color: #e47470;
  253. }
  254. &.trigger-node {
  255. color: #3373d2;
  256. }
  257. &.router-node {
  258. color: #ca3a31
  259. }
  260. &.transactor-task {
  261. color: #330099;
  262. }
  263. &.child-process {
  264. color: #996633;
  265. }
  266. &.async-child-process {
  267. color: #006666;
  268. }
  269. }
  270. .node-title {
  271. margin-left: 4px;
  272. overflow: hidden;
  273. font-size: 14px;
  274. font-weight: 600;
  275. line-height: 18px;
  276. color: #1f1f1f;
  277. text-overflow: ellipsis;
  278. white-space: nowrap;
  279. &:hover {
  280. border-bottom: 1px dashed #f60;
  281. }
  282. }
  283. }
  284. // 条件节点标题
  285. .branch-node-title-container {
  286. display: flex;
  287. padding: 4px 0;
  288. cursor: pointer;
  289. border-radius: 4px 4px 0 0;
  290. align-items: center;
  291. justify-content: space-between;
  292. .input-max-width {
  293. max-width: 115px !important;
  294. }
  295. .branch-title {
  296. overflow: hidden;
  297. font-size: 13px;
  298. font-weight: 600;
  299. color: #f60;
  300. text-overflow: ellipsis;
  301. white-space: nowrap;
  302. &:hover {
  303. border-bottom: 1px dashed #000;
  304. }
  305. }
  306. .branch-priority {
  307. min-width: 50px;
  308. font-size: 12px;
  309. }
  310. }
  311. .node-content {
  312. display: flex;
  313. min-height: 32px;
  314. padding: 4px 8px;
  315. margin-top: 4px;
  316. line-height: 32px;
  317. justify-content: space-between;
  318. align-items: center;
  319. color: #111f2c;
  320. background: rgb(0 0 0 / 3%);
  321. border-radius: 4px;
  322. .node-text {
  323. display: -webkit-box;
  324. overflow: hidden;
  325. font-size: 14px;
  326. line-height: 24px;
  327. text-overflow: ellipsis;
  328. word-break: break-all;
  329. -webkit-line-clamp: 2; /* 这将限制文本显示为两行 */
  330. -webkit-box-orient: vertical;
  331. }
  332. }
  333. //条件节点内容
  334. .branch-node-content {
  335. display: flex;
  336. min-height: 32px;
  337. padding: 4px 0;
  338. margin-top: 4px;
  339. line-height: 32px;
  340. align-items: center;
  341. color: #111f2c;
  342. border-radius: 4px;
  343. .branch-node-text {
  344. overflow: hidden;
  345. font-size: 12px;
  346. line-height: 24px;
  347. text-overflow: ellipsis;
  348. word-break: break-all;
  349. -webkit-line-clamp: 2; /* 这将限制文本显示为两行 */
  350. -webkit-box-orient: vertical;
  351. }
  352. }
  353. // 节点操作 :删除
  354. .node-toolbar {
  355. position: absolute;
  356. top: -20px;
  357. right: 0;
  358. display: flex;
  359. opacity: 0;
  360. .toolbar-icon {
  361. text-align: center;
  362. vertical-align: middle;
  363. }
  364. }
  365. // 条件节点左右移动
  366. .branch-node-move {
  367. position: absolute;
  368. display: none;
  369. width: 10px;
  370. height: 100%;
  371. cursor: pointer;
  372. align-items: center;
  373. justify-content: center;
  374. }
  375. .move-node-left {
  376. top: 0;
  377. left: -2px;
  378. background: rgb(126 134 142 / 8%);
  379. border-bottom-left-radius: 8px;
  380. border-top-left-radius: 8px;
  381. }
  382. .move-node-right {
  383. top: 0;
  384. right: -2px;
  385. background: rgb(126 134 142 / 8%);
  386. border-top-right-radius: 6px;
  387. border-bottom-right-radius: 6px;
  388. }
  389. }
  390. .node-config-error {
  391. border-color: #ff5219 !important;
  392. }
  393. // 普通节点包装
  394. .node-wrapper {
  395. display: flex;
  396. flex-direction: column;
  397. justify-content: center;
  398. align-items: center;
  399. }
  400. // 节点连线处理
  401. .node-handler-wrapper {
  402. position: relative;
  403. display: flex;
  404. height: 70px;
  405. align-items: center;
  406. user-select: none;
  407. justify-content: center;
  408. flex-direction: column;
  409. &::before {
  410. position: absolute;
  411. top: 0;
  412. z-index: 0;
  413. width: 2px;
  414. height: 100%;
  415. margin: auto;
  416. background-color: #dedede;
  417. content: '';
  418. }
  419. .node-handler {
  420. .add-icon {
  421. position: relative;
  422. top: -5px;
  423. display: flex;
  424. width: 25px;
  425. height: 25px;
  426. color: #fff;
  427. cursor: pointer;
  428. background-color: #0089ff;
  429. border-radius: 50%;
  430. align-items: center;
  431. justify-content: center;
  432. &:hover {
  433. transform: scale(1.1);
  434. }
  435. }
  436. }
  437. .node-handler-arrow {
  438. position: absolute;
  439. bottom: 0;
  440. left: 50%;
  441. display: flex;
  442. transform: translateX(-50%);
  443. }
  444. }
  445. // 条件节点包装
  446. .branch-node-wrapper {
  447. position: relative;
  448. display: flex;
  449. flex-direction: column;
  450. justify-content: center;
  451. align-items: center;
  452. margin-top: 16px;
  453. .branch-node-container {
  454. position: relative;
  455. display: flex;
  456. min-width: fit-content;
  457. &::before {
  458. position: absolute;
  459. left: 50%;
  460. width: 4px;
  461. height: 100%;
  462. background-color: #fafafa;
  463. content: '';
  464. transform: translate(-50%);
  465. }
  466. .branch-node-add {
  467. position: absolute;
  468. top: -18px;
  469. left: 50%;
  470. z-index: 1;
  471. height: 36px;
  472. padding: 0 10px;
  473. font-size: 12px;
  474. line-height: 36px;
  475. border: 2px solid #dedede;
  476. border-radius: 18px;
  477. transform: translateX(-50%);
  478. transform-origin: center center;
  479. }
  480. .branch-node-readonly {
  481. position: absolute;
  482. top: -18px;
  483. left: 50%;
  484. z-index: 1;
  485. display: flex;
  486. width: 36px;
  487. height: 36px;
  488. background-color: #fff;
  489. border: 2px solid #dedede;
  490. border-radius: 50%;
  491. transform: translateX(-50%);
  492. align-items: center;
  493. justify-content: center;
  494. transform-origin: center center;
  495. &.status-pass {
  496. background-color: #e9f4e2;
  497. border-color: #6bb63c;
  498. }
  499. &.status-pass:hover {
  500. border-color: #6bb63c;
  501. }
  502. .icon-size {
  503. font-size: 22px;
  504. &.condition {
  505. color: #67c23a;
  506. }
  507. &.parallel {
  508. color: #626aef;
  509. }
  510. &.inclusive {
  511. color: #345da2;
  512. }
  513. }
  514. }
  515. .branch-node-item {
  516. position: relative;
  517. display: flex;
  518. flex-direction: column;
  519. align-items: center;
  520. min-width: 280px;
  521. padding: 40px 40px 0;
  522. background: transparent;
  523. border-top: 2px solid #dedede;
  524. border-bottom: 2px solid #dedede;
  525. flex-shrink: 0;
  526. &::before {
  527. position: absolute;
  528. width: 2px;
  529. height: 100%;
  530. margin: auto;
  531. inset: 0;
  532. background-color: #dedede;
  533. content: '';
  534. }
  535. }
  536. // 覆盖条件节点第一个节点左上角的线
  537. .branch-line-first-top {
  538. position: absolute;
  539. top: -5px;
  540. left: -1px;
  541. width: 50%;
  542. height: 7px;
  543. background-color: #fafafa;
  544. content: '';
  545. }
  546. // 覆盖条件节点第一个节点左下角的线
  547. .branch-line-first-bottom {
  548. position: absolute;
  549. bottom: -5px;
  550. left: -1px;
  551. width: 50%;
  552. height: 7px;
  553. background-color: #fafafa;
  554. content: '';
  555. }
  556. // 覆盖条件节点最后一个节点右上角的线
  557. .branch-line-last-top {
  558. position: absolute;
  559. top: -5px;
  560. right: -1px;
  561. width: 50%;
  562. height: 7px;
  563. background-color: #fafafa;
  564. content: '';
  565. }
  566. // 覆盖条件节点最后一个节点右下角的线
  567. .branch-line-last-bottom {
  568. position: absolute;
  569. right: -1px;
  570. bottom: -5px;
  571. width: 50%;
  572. height: 7px;
  573. background-color: #fafafa;
  574. content: '';
  575. }
  576. }
  577. }
  578. .node-fixed-name {
  579. display: inline-block;
  580. width: auto;
  581. padding: 0 4px;
  582. overflow: hidden;
  583. text-align: center;
  584. text-overflow: ellipsis;
  585. white-space: nowrap;
  586. }
  587. // 开始节点包装
  588. .start-node-wrapper {
  589. position: relative;
  590. margin-top: 16px;
  591. .start-node-container {
  592. display: flex;
  593. flex-direction: column;
  594. justify-content: center;
  595. align-items: center;
  596. .start-node-box {
  597. display: flex;
  598. justify-content: center;
  599. align-items: center;
  600. width: 90px;
  601. height: 36px;
  602. padding: 3px 4px;
  603. color: #212121;
  604. cursor: pointer;
  605. background: #fafafa;
  606. border-radius: 30px;
  607. box-shadow: 0 1px 5px 0 rgb(10 30 65 / 8%);
  608. box-sizing: border-box;
  609. }
  610. }
  611. }
  612. // 结束节点包装
  613. .end-node-wrapper {
  614. margin-bottom: 16px;
  615. .end-node-box {
  616. display: flex;
  617. width: 80px;
  618. height: 36px;
  619. color: #212121;
  620. border: 2px solid #fafafa;
  621. border-radius: 30px;
  622. box-shadow: 0 1px 5px 0 rgb(10 30 65 / 8%);
  623. box-sizing: border-box;
  624. justify-content: center;
  625. align-items: center;
  626. &.status-pass {
  627. background-color: #a9da90;
  628. border-color: #6bb63c;
  629. }
  630. &.status-pass:hover {
  631. border-color: #6bb63c;
  632. }
  633. &.status-reject {
  634. background-color: #f6e5e5;
  635. border-color: #e47470;
  636. }
  637. &.status-reject:hover {
  638. border-color: #e47470;
  639. }
  640. &.status-cancel {
  641. background-color: #eaeaeb;
  642. border-color: #919398;
  643. }
  644. &.status-cancel:hover {
  645. border-color: #919398;
  646. }
  647. }
  648. }
  649. // 可编辑的 title 输入框
  650. .editable-title-input {
  651. height: 20px;
  652. max-width: 145px;
  653. margin-left: 4px;
  654. font-size: 12px;
  655. line-height: 20px;
  656. border: 1px solid #d9d9d9;
  657. border-radius: 4px;
  658. transition: all 0.3s;
  659. &:focus {
  660. border-color: #40a9ff;
  661. outline: 0;
  662. box-shadow: 0 0 0 2px rgb(24 144 255 / 20%);
  663. }
  664. }
  665. }
  666. }
  667. // iconfont 样式
  668. @font-face {
  669. font-family: "iconfont"; /* Project id 4495938 */
  670. src: url('iconfont.woff2?t=1737639517142') format('woff2'),
  671. url('iconfont.woff?t=1737639517142') format('woff'),
  672. url('iconfont.ttf?t=1737639517142') format('truetype');
  673. }
  674. .iconfont {
  675. font-family: "iconfont" !important;
  676. font-size: 16px;
  677. font-style: normal;
  678. -webkit-font-smoothing: antialiased;
  679. -moz-osx-font-smoothing: grayscale;
  680. }
  681. .icon-trigger:before {
  682. content: "\e6d3";
  683. }
  684. .icon-router:before {
  685. content: "\e6b2";
  686. }
  687. .icon-delay:before {
  688. content: "\e600";
  689. }
  690. .icon-start-user:before {
  691. content: "\e679";
  692. }
  693. .icon-inclusive:before {
  694. content: "\e602";
  695. }
  696. .icon-copy:before {
  697. content: "\e7eb";
  698. }
  699. .icon-transactor:before {
  700. content: "\e61c";
  701. }
  702. .icon-exclusive:before {
  703. content: "\e717";
  704. }
  705. .icon-approve:before {
  706. content: "\e715";
  707. }
  708. .icon-parallel:before {
  709. content: "\e688";
  710. }
  711. .icon-async-child-process:before {
  712. content: "\e6f2";
  713. }
  714. .icon-child-process:before {
  715. content: "\e6c1";
  716. }