simple-process-designer.scss 16 KB

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