simple-process-designer.scss 16 KB

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