123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <template>
- <view class="report">
- <view class="report-header">
- <view class="report-header-left">
- 营收趋势分析
- </view>
- <view class="report-header-right">
- <view class="report-header-right-item" :class="{'current': current === 1}" @click="current = 1">日</view>
- <view class="report-header-right-item" :class="{'current': current === 2}" @click="current = 2">月</view>
- <view class="report-header-right-item" :class="{'current': current === 3}" @click="current = 3">年</view>
- </view>
- </view>
- <view class="charts-box">
- <qiun-data-charts type="column" :chartData="chartData" :opts="opts" />
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- current: 3,
- chartData: {
- categories: ["党固路",
- "富强路",
- "玉兔山路",
- "顺时路",
- "本杰路",
- "可处路",
- "物资路",
- "桂花苑路",
- "丰林路",
- "教育路"
- ],
- series: [{
- data: [100,
- 140,
- 230,
- 100,
- 130,
- 100,
- 100,
- 100,
- 100,
- 100
- ]
- }],
- },
- opts: {
- xAxis: {
- rotateLabel: true
- },
- yAxis: {
- showTitle: true,
- splitNumber: 5,
- data: [
- {
- title: '收益(元)',
- max: 250
- }
- ]
- },
- legend: {
- show: false
- },
- padding: [10, 0, 10, 0],
- extra: {
- column: {
- width: 20
- }
- }
- }
- }
- },
- methods: {
- }
- }
- </script>
- <style lang="scss" scoped>
- .report {
- padding: 28rpx;
- font-family: PingFangSC-regular;
- &-header {
- display: flex;
- align-items: center;
- &-left {
- border-left: solid 4px #EC0D0D;
- padding-left: 10rpx;
- color: #101010;
- font-size: 30rpx;
- margin-right: 40rpx;
- }
- &-right {
- display: flex;
- &-item {
- width: 100rpx;
- height: 60rpx;
- line-height: 60rpx;
- text-align: center;
- border: solid 1px #008CFF;
- border-right: none;
- &:last-child {
- border-radius: 0 8rpx 8rpx 0;
- border-right: solid 1px #008CFF;
- }
- &:first-child {
- border-radius: 8rpx 0 0 8rpx;
- }
- }
- .current {
- background-color: #008CFF;
- color: #fff;
- }
- }
- }
- .charts-box {
- margin-top: 30rpx;
- width: 100%;
- height: 700rpx;
- }
- }
- </style>
|