simple-process-designer.scss 16 KB

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