Blame view

src/views/berthsection.vue 1.59 KB
a390d377   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
  <template>
    <div>
      <titlesection title="泊位"></titlesection>
      <totalsection :totalNum="totalVal"></totalsection>
      <ul class="flexfm berth-wrap">
        <li></li>
        <li>
          <div>
            <p><span class="free">{{ free|formatNum }}</span> <span>空余</span></p>
          </div>
          <div>
            <p><span class="nofree">{{ nofree|formatNum }}</span> <span>占有</span></p>
          </div>
  
        </li>
      </ul>
    </div>
  </template>
  
  <script>
  import titlesection from '../components/titlesection'
  import totalsection from '../components/total'
  import { formatNum } from '../filters/filters'
  import {fetchList} from '../api/api'
  
  export default {
    name: 'berthsection',
    components: {
      titlesection,
      totalsection
    },
    data() {
      return {
        totalVal: '21973',
        free: '454123',
        nofree: '5125'
      }
    },
    created() {
    },
    methods: {
      getList() {
        fetchList()
        .then(res => {
          console.log(res);
  
        });
      },
    }
  }
  </script>
  
  <style lang="scss"  scoped>
    .berth-wrap {
      display: flex;
      li{
        flex: 1;
        div{
          height: 50%;
          display: flex;
          align-items:center;
          p{
            height: 24px;
            color: #fff;
            font-size: 12px;
            .free{
              @include fonttextStyle(24px);
              background-image: $fontBlue;
            }
            .nofree{
              @include fonttextStyle(24px);
              background-image: $fontOrange;
            }
            span:nth-of-type(1){
              width: 100px;
              display: inline-block;
            }
          }
        }
      }
    }
  </style>