$bg-color : #ebeef5; $line-color : #A9B4CD; $base-size : 24rpx; // Mixin flex 垂直居中布局 @mixin flex-center() { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; } // 三点省略 支持单行多行 // Mixin { n:Number } n:省略行数限制 @mixin ellipsis($n) { overflow: hidden; text-overflow: ellipsis; @if $n>1 { display: -webkit-box; -webkit-line-clamp: $n; -webkit-box-orient: vertical; } @else { white-space: nowrap; } } // 按钮变大效果 @mixin btn-bigger() { transform: scale(1.2); box-shadow: 0 16rpx 32rpx 0 rgba(0, 0, 0, .1); } .node-wrap-box { position: relative; @include flex-center(); flex-direction: column; &.condition, &.branchFlow, &.interflow { padding:60rpx 60rpx 0 } &.empty { overflow: hidden; } &.approver::before { content: ''; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 4px; border-style: solid; border-width: 8px 6px 4px; border-color: $line-color transparent transparent; background: $bg-color; } &.approver.branchFlow::before, &.approver.interflow::before { top: 20px; } } .end-node { font-size: $base-size; text-align: center; @include flex-center(); flex-direction: column; &::before { content: ""; width: 20rpx; height: 20rpx; margin: auto; border: none; margin-bottom: 12rpx; border-radius: 50%; background: #A9B4CD; } } .flow-path-card { width: 400rpx; min-height: 150rpx; font-size: $base-size; border-radius: 4px; text-align: left; cursor: pointer; overflow: hidden; position: relative; box-sizing: border-box; box-shadow: 0 0 12rpx 0 rgba(0, 0, 0, 0.3); background: #FFF; border-radius: 4rpx; font-size: 24rpx; &.copy { .header { background-color: #1890ff; } } &.timer { .header { color: #f5811c; border-bottom: 1px solid #EEEEEE; .actions { color: #606266; } } } &.approver, &.subFlow { .header { background-color: #1890ff; } } &.start-node { .header { background-color: #576a95; } } .header { padding-left: 20rpx; padding-right: 60rpx; width: 100%; height: 60rpx; line-height: 60rpx; color: white; position: relative; box-sizing: border-box; .title-box { position: relative; display: inline-block; @include ellipsis(1); } .title-input { position: absolute; left: 0; border: none; background: inherit; color: inherit; opacity: 0; margin-top: 12rpx; &:focus { border-radius: 8rpx; font-size: $base-size; padding: 4rpx; padding-left: 8rpx; width: 97%; margin-left: 1px; height: 36rpx; box-sizing: border-box; box-shadow: 0 0 1px 1px #1890ff; background-color: $bg-color; color: black; opacity: 1; } } .title-text { vertical-align: middle; } >.actions { position: absolute; right: 0; top: 0; visibility: hidden; } >.async-state { position: absolute; right: 50rpx; top: 10rpx; } } &.subFlow { .header { .title-box { width: 280rpx !important; } } } .body { position: relative; padding: 20rpx; box-sizing: border-box; .text { word-break: break-all; margin: 0 ellipsis(4); } } .icon-wrapper { position: absolute; top: 0; height: 100%; width: 28rpx; box-sizing: border-box; &.left { left: 0; } &.right { right: 0; } > { .right-arrow, .left-arrow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } } } } .flow-path-card.condition { .header { line-height: 60rpx; color: inherit; border-bottom: 1px solid #EEEEEE; .title-box { height: auto !important; } .title-text { color: #15bc83; } } .body { padding: 20rpx; color: #606266; } .right-arrow, .left-arrow { visibility: hidden; } } .col-box:first-of-type>.node-wrap .left { display: none; } .col-box:last-of-type>.node-wrap .right { display: none; } .add-node-btn-box { width:400rpx; height: 80rpx; position: relative; padding-top: 60rpx; &::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; width: 1px; height: 100%; background-color: $line-color; } } .branch-wrap { .branch-box-wrap { display: inline-flex; flex-direction: column; align-items: center; } .branch-box { align-items: stretch; border-bottom: 1px solid $line-color; border-top: 1px solid $line-color; box-sizing: border-box; background: $bg-color; >.col-box { display: flex; flex-direction: column; align-items: center; position: relative; &:first-of-type { &::before, &::after { content: ""; position: absolute; left: 0; height: 6rpx; width: calc(50% - 1px); background: $bg-color; } &::before { top: -4rpx; } &::after { bottom: -4rpx; } } &:last-of-type { &::before, &::after { content: ""; position: absolute; right: 0; height: 6rpx; width: calc(50% - 1px); background: $bg-color; } &::before { top: -4rpx; } &::after { bottom: -4rpx; } } .center-line { height: 100%; width: 1px; background: $line-color; position: absolute; } } } } .condition-box { display: flex; justify-content: space-around; align-items: center; text-align: center; padding: 20rpx 0; >div:nth-child(1) .iconfont { color: #FF943E; } >div:nth-child(2) .iconfont { color: #3296FA; } .condition-disabled { color: #C0C4CC; .condition-icon { background: #e5e5e5; color: #999; cursor: default; } } .condition-icon { width: 120rpx; height: 120rpx; line-height: 120rpx; border: 1px solid #e5e5e5; border-radius: 60rpx; box-sizing: border-box; font-size: 24rpx; cursor: pointer; margin-bottom: 8rpx; .icon-ym, [class^=el-icon-], .ym-custom { font-size: 64rpx; } } } .relative { position: relative; } .flex { display: flex; } .justify-center { justify-content: center; } .icon { vertical-align: middle; width: 28rpx; height: 28rpx; font-size: 28rpx; } .priority { position: absolute; right: 0; font-size: 24rpx; } input::-ms-clear, input::-ms-reveal { display: none; }