拖旺项目:聊城公交辅助决策系统
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
<template>
  <div class="v-data-board-header">
      <div class="_select">
        <div class="_select-box g-picker">
            <div class="flex-1 _large-title">线路详情</div>
            <el-date-picker
                v-model="day1"
                :clearable="false"
                value-format="yyyy-MM-dd"
                @change="handleSelect"
                type="date">
            </el-date-picker>
            <div class="_detail-btn ml20" @click="handleClick">线路详情</div>
 
        </div>
      </div>
      
        <div class="_line-detail">
            <div class="flex">
                <div
                    v-for="(item, index) in list"
                    :key="index"
                    :class="{'_ml70': index != 0}"
                >
                    <div class="flex">
                        <img :src="icon" class="_icon" />
                        <div class="_name ml5">{{ item.name }}</div>
                    </div>
                    <div><span class="_count"> {{ item.amount }} </span><span>条</span></div>
                </div>
        </div>
        </div>
        
 
 
  </div>
</template>
<script>
  import * as echarts from "echarts";
  import moment from "moment";
  import icon from '../../../assets/newImg/icon_xianlu.png'
 
  export  default {
    name:'',
    components:{},
    data(){
      return{
          icon,
          companyId: '',
          day1: moment().subtract(1, 'day').format("yyyy-MM-DD"), 
          list: [
              {
                  name: '线路总数',
 
              },
              {
                  name: '干线',
              },
              {
                  name: '快线',
              },
              {
                  name: '支微线',
              },
              {
                  name: '常规线',
              }
          ]
 
      }
    },
    watch:{
 
    },
    created() {
        
    },
    methods:{
        handleClick() {
            this.$router.push('branchOfficeResource?sence=3')
 
        },
        handleSelect() {
            this.$bus.$emit('data-date', this.day1)
        },
        lineLengthData(){
            this.$axios.get(this.$Interface.line.getLineType, {
            params: {
                companyId: this.companyId
            }
            }).then(res => {
                this.list = res.data.lines;
                let totalObj = {
                    name: '线路总数',
                    amount: res.data.total || 0,
                }
                this.list.unshift(totalObj);
            })
        },
 
 
 
    },
    activated() {
        this.lineLengthData();
    },
  }
</script>
<style lang="less">
.v-data-board-header {
    ._line-detail {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 30px 0 20px;
        color: #F2FFFF;
        height: 50px;
    }
    ._select {
        position: absolute;
        top: 20px;
        right: 20px;
        left: 30px
 
    }
    ._select-box {
        display: flex;
        text-align: right;
        justify-content: flex-end;
        width: 100%;
        margin-top: 10px;
        padding-right: 10px;
    }
    ._ml70 {
        margin-left: 32px;
    }
    ._icon {
        width: 24px;
        height: 24px;
    }
    ._name {
        color: #6BC2FC;
        font-size: 16px;
 
    }
    ._count {
        font-family: 'Digital';
        margin-left: 10px;
        font-size: 34px;
        line-height: 34px;
    }
}
</style>