simple-process-designer.scss 16 KB

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