拖旺项目:聊城公交辅助决策系统
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
<template>
  <div class="c-asseaa-report-line-operate colorfff">
      <div class="flex mt24">
          <img class="__img" :src="require(`@/assets/assess/${flag == 2 ? 'bg_xiaxing' : 'bg_shangxing'}.png`)" />
          <div class="flex flex-1 ju-c ml20 t-center">
              <div class="flex-1" v-for="(item, index) in basic" :key="index" >
                  <div class="_operate-box">{{ getDecimal(info[item.count], 2) }}</div>
                  <div>{{item.name}}</div>
                  <div>({{item.unit}})</div>
              </div>
          </div>
      </div>
      <div class="_bottom-box mt24">
          <div class="flex ml20">
              <div class="_rate-box">正点率<span class="_color-1">{{+info.onTimeRate.toFixed(2)}}%</span></div>
              <div class="_rate-box">早点率<span class="_color-2">{{+info.onEarlyRate.toFixed(2)    }}%</span></div>
              <div class="_rate-box">晚点率<span class="_color-3">{{+info.onLateRate.toFixed(2)}}%</span></div>
              <div class="_rate-box">班次完成率<span class="_color-4">{{+info.completionRate.toFixed(2)}}%</span></div>
          </div>
      </div>
    
  </div>
</template>
<script>
import * as echarts from "echarts";
import moment from "moment";
export default {
  name: "driverappraise",
  components: {  },
  props: {
      info: {
          type: Object,
          default: () => {}
      },
      flag: {
          type: [Number, String],
          default: () => '1'
      },
  },
  data() {
    return {
        basic: [
            {
                name: '发车班次',
                count: 'operateShift',
                unit: '次/日'
            },
            {
 
                name: '平均发车间隔',
                count: 'avgDepartureInterval',
                unit: 'min'
            },
            {
 
                name: '单程间隔',
                count: 'oneWayDuration',
                unit: 'min'
            },
            {
                name: '平均时速',
                count: 'avgSpeed',
                unit: 'km/h'
            },
 
        ]
 
     
    };
  },
  created() {
    
  },
  activated() {
 
  },
  computed: {
      time() {
          let obj = this.info || {}
          return obj.firstTime + '~' +  obj.lastTime
      }
 
  },
  mounted() {
  },
  methods: {
      getDecimal(e, index) {
          return Number(+e.toFixed(index))
 
      }
 
 
  
  },
};
</script>
 
<style lang="less">
.c-asseaa-report-line-operate {
    color: #8D9DBC;
    ._operate-box {
        width: 74px;
        height: 74px;
        padding-left: 10px;
        line-height: 74px;
        position: relative;
        color: #fff;
        left: 50%;
        transform: translate(-50%, 0);
        font-family: 'Digital';
        font-size: 22px;
        background: url('../../assets/assess/bg_zhibiao.png') no-repeat center/cover;
 
    }
    ._bottom-box {
        width: 510px;
        height: 36px;
        background: linear-gradient(180deg,rgba(20,28,36,0.6), rgba(16,34,54,0.6));
        position: relative;
        line-height: 36px;
        &::before {
            content: '';
            border-right: 12px solid transparent;
            border-top: 12px solid #80A3D5;
            position: absolute;
            top: 0;
            left: 0;
        }
        &::after {
            content: '';
            border-left: 12px solid transparent;
            border-bottom: 12px solid #80A3D5;
            position: absolute;
            bottom: 0;
            right: 0;
        }
        ._rate-box {
            width: 25%;
        }
        ._color-1, ._color-2, ._color-3 {
            color: #00E9E8;
            padding-right: 20px;
            position: relative;
            font-family: 'Digital';
            font-size: 18px;
            width: 76px;
            text-align: right;
            display: inline-block;
            &::after {
                content: '';
                width: 2px;
                height: 18px;
                background: #00E9E8;
                display: inline-block;
                position: absolute;
                top: 9px;
                right: 8px;
            
            }
 
 
        }
        ._color-4 {
            color: #00E9E8;    
            margin-left: 16px;
            width: 60px;
        }
        ._color-2 {
            color: #FAB71E;
        }
        ._color-3 {
            color: #38BBFF;
        }
        
 
    }
    
    
}
 
</style>