Blame view

src/views/youdaopingsection.vue 1.56 KB
e00e4982   liuqimichale   道闸 诱导屏
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
  <template>
    <div>
      <titlesection title="道闸/诱导屏"></titlesection>
      <ul class="flexfm ydp-dz-wrap">
        <li>
          <div>
            <div class="bg-wrap">
              <p>123</p>
              <p>123</p>
            </div>
          </div>
          <div>
            <div class="bg-wrap">
              <p>123</p>
              <p>123</p>
            </div>
          </div>
        </li>
        <!--<allPieChart tag="li"></allPieChart>-->
        <li>
          <allPieChart :chart-data="lineChartData"/>
        </li>
      </ul>
    </div>
  </template>
  
  <script>
  import titlesection from '../components/titlesection'
  import allPieChart from '../components/allPieChart'
  import { formatNum } from '../filters/filters'
  import {fetchList} from '../api/api'
  
  const lineChartData = {
    newVisitis: {
      yData: [100, 120, 161],
      xData: ['正常', '异常', '故障']
    }
  }
  
  
  export default {
    name: 'youdaopingsection',
    components: {
      titlesection,
      allPieChart
    },
    data() {
      return {
        lineChartData: lineChartData.newVisitis
      }
    },
    created() {
    },
    methods: {
      getList() {
        fetchList()
        .then(res => {
          console.log(res);
  
        });
      },
    }
  }
  </script>
  
  <style lang="scss"  scoped>
    .ydp-dz-wrap{
      display: flex;
      li{
        height: 100%;
        flex: 1;
        &:nth-of-type(1)>div{
          height: 50%;
          .bg-wrap{
            width: 111px;
            height: 52px;
            position: relative;
            top:50%;
            left: 50%;
            transform: translate(-50%,-50%);
            background-color: #f00;
          }
        }
      }
    }
  </style>