拖旺项目:聊城公交辅助决策系统
master
2022-04-27 493930a42a2ea3e13905ffd8772cdb945baa7bcf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<template>
  <div class="c-asseaa-report-income-detail colorfff mt30">
        <div class="_line-length-box flex-1">
                <div style="position: relative">
                    <img src="@/assets/driverappraise/pic_zhanbitu.png" class="_img"/>
                    <div class="_line-total">
                        <div class="_total">{{ info.totalIncome || 0 }}</div>
                        <div class="_main-color">日总收入(元)</div>
                    </div>
                    <commonEcharts 
                        id="pie" class="__echart-pie" width="130px" height="130px" :option="setOption"
                    />
                </div>
                <div class="_drive-detail mt30 mr10">
                <div  class="flex ml30" v-for="(item, index) in option.series[0].data" :key="index">
                    <div class="_icon" :style="{background: option.series[0].color[index]}"/>
                    <span class="flex-1 _main-color mr20" style="width: 70px">{{ item.name }}</span>
                    <span><span class="_num font16 mr5">{{ item.value }}</span>条</span>
                </div>
                </div>
        </div>
        <div style="position: relative" class="ml100">
            <img src="@/assets/driverappraise/pic_zhanbitu.png" class="_img"/>
            <div class="_line-total" style="top: 50px;">
                <div class="_total _total-1">{{ info.thousandKilometerPerson }}</div>
                <div class="_main-color">千公里人数 </div>
                <div class="_main-color">(人/千公里)</div>
            </div>
            
        </div>
        <div style="position: relative" class="ml100 mr40">
            <img src="@/assets/driverappraise/pic_zhanbitu.png" class="_img"/>
            <div class="_line-total" style="top: 50px;">
                <div class="_total _total-2">{{ info.thousandKilometerIncome }}</div>
                <div class="_main-color">千公里收入</div>
                <div class="_main-color">(元/千公里)</div>
            </div>
            
        </div>
    
  </div>
</template>
<script>
import * as echarts from "echarts";
import moment from "moment";
import commonEcharts from "@/components/common/echart/echart.vue";
export default {
  name: "driverappraise",
  components: { commonEcharts },
  props: {
      info: {
          type: Object,
          default: () => {}
      },
      flag: {
          type: [Number, String],
          default: () => '1'
      },
  },
  data() {
    return {
        type: {
             1:'现金', 2: '微信', 3: '支付宝', 4: '交通卡', 5: '乘车码'
        },
        option: {
          tooltip: {
            trigger: 'item'
          },
          legend: {
            show: false,
            top: '5%',
            left: 'center'
          },
          series: [
            {
              name: '线路长度',
              type: 'pie',
              radius: ['78%', '90%'],
              avoidLabelOverlap: false,
              label: {
                show: false,
                position: 'center'
              },
              emptyCircleStyle: {
                
              },
              color: ['#069EFE', '#F99854', '#13CBA8', '#F2FFFF', '#FFCD80'],
              emphasis: {
                label: {
                  show: true,
                  fontSize: '0',
                  fontWeight: 'bold', 
                }
              },
              labelLine: {
                show: false
              },
              data: [
                { value: 1048, name: '现金支付' },
                { value: 735, name: '交通卡支付' },
                { value: 580, name: '微信支付' },
                { value: 484, name: '支付宝支付' },
                { value: 300, name: '乘车码支付' }
              ]
            }
          ]
        }
 
     
    };
  },
  created() {
       const arr = this.info.typeGroup || [];
        this.option.series[0].data = arr.map(i => {
            return {
                value: i.income, name: this.type[+i.type]
            }
 
        })
    
  },
  activated() {
 
  },
  computed: {
 
  },
  mounted() {
  },
  methods: {
 
  
  },
};
</script>
 
<style lang="less">
.c-asseaa-report-income-detail {
    padding-bottom: 40px;
    display: flex;
    ._total{
        font-family: 'Digital';
        color: #069EFE;
        font-size: 26px;
        font-weight: 500
    }
    ._total-1 {
        color: #13CBA8;
    }
    ._total-2 {
        color: #F99854;
    }
    ._drive-detail {
        color: #fff;
        margin-left: 10px;
        flex: 1;
        ._icon {
            width: 10px;
            height: 10px;
            margin-right: 10px;
        }
        ._num {
            color: #F2FFFF;
            font-family: 'Digital';
            font-size: 18px;
        }
        &>div{
        align-items: center;
        }
    }
    
     ._line-length-box {
            display: flex;
            align-items: center;
            position: relative;
            height: '15vh';
            .__echart-pie {
            margin-left: 28px;
            margin-top: 38px;
 
        }
        ._img {
            position:absolute;
            top: 10px
        }
            
    }
    .ml100 {
        margin-left: 100px;
    }
    ._line-total {
        position: absolute;
        width: 187px;
        top: 70px;
        text-align: center;
        color: #fff;
    }
    
    
}
 
</style>