simple-process-designer.scss 16 KB

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