| | |
| | | <template> |
| | | <div class="gantt-blocks" |
| | | :style="{height:blockHeight+'px'}"> |
| | | :style="blocksStyle"> |
| | | <!-- {{blocksStyle}}--> |
| | | <!-- :style="{height:blockHeight+'px'}">--> |
| | | <div class="gantt-block gantt-block-top-space" |
| | | :style="{height:calTopSpace()+'px'}"> |
| | | </div> |
| | |
| | | return arrayKeys; |
| | | } |
| | | return ["gtArray"]; |
| | | }, |
| | | blocksStyle() { |
| | | return { |
| | | backgroundSize: `${this.cellWidth}px ${this.cellHeight}px`, |
| | | height: `${this.blockHeight}px` |
| | | }; |
| | | }, |
| | | blockStyle() { |
| | | return { |
| | |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | </script> |
| | |
| | | <div |
| | | class="gantt-timeline-day " |
| | | :style="heightStyle" |
| | | |
| | | > |
| | | {{ day.format('YYYY-MM-DD') }} |
| | | {{ getDayMy(day.format('YYYY-MM-DD')) }} |
| | |
| | | <div |
| | | class="gantt-timeline-scale" |
| | | :style="heightStyle" |
| | | style="border-right: 1px solid #eee" |
| | | |
| | | |
| | | > |
| | | <!-- style="border-right: 1px solid #eee"--> |
| | | <div |
| | | v-for="(hour,ind) in getTimeScales(day)" |
| | | :key="ind" |
| | | :style="cellWidthStyle" |
| | | |
| | | |
| | | > |
| | | <!-- style="border-right: 1px solid #eee;"--> |
| | | {{ hour }} |
| | | <!-- <span v-if="hour !='01' ">{{hour}}</span> --> |
| | | </div> |
| | |
| | | }, |
| | | cellWidthStyle() { |
| | | return { |
| | | width: `${this.cellWidth}px` |
| | | width: `${this.cellWidth}px`, |
| | | |
| | | // width: `${this.cellWidth/2}px`, |
| | | |
| | | |
| | | // marginLeft:`${this.cellWidth/2}px` |
| | | } |
| | | }, |
| | | heightStyle() { |
| | |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .gantt-timeline-day { |
| | | border-right: 1px solid #ebeef5; |
| | | //border-right: 1px solid #ebeef5; |
| | | border-bottom: 1px solid #ebeef5; |
| | | //background: rgb(245, 245, 245); |
| | | background: #fff; |
| | |
| | | } |
| | | |
| | | &-blocks { |
| | | border: 1px solid #eee; |
| | | background-image: linear-gradient(rgba(236, 236, 236) 1px, transparent 0), |
| | | linear-gradient(90deg, rgba(236, 236, 236) 1px, transparent 0); |
| | | &-wrapper { |
| | | overflow: hidden; |
| | | } |