gaosp
2024-01-21 b91c71780549b06f0729b50cf7b94a1c037968b9
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
<!--
 * @Date: 2024-01-13 19:43:55
 * @LastEditors: Sneed
 * @LastEditTime: 2024-01-14 19:04:03
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/Map/LeftStatus.vue
-->
<template>
    <div class="left">
        <slot></slot>
        <div class="left-item left-1">
            <div>{{ runRate }}</div>
            <div>开机率</div>
        </div>
        <div class="left-item left-2">
            <div>{{ alarmRate }}</div>
            <div>故障率</div>
        </div>
        <div class="left-item left-3">
            <div>{{cutRate}}</div>
            <div>切削率</div>
        </div>
        <div class="left-item left-4">
            <div>{{twoShiftRate}}</div>
            <div>二班开工率</div>
        </div>
        <div class="left-item left-5">
            <div>{{threeShiftRate}}</div>
            <div>三班开工率</div>
        </div>
    </div>
</template>
<script>
    export default {
        props: {
            info: {
                type: Object
            }
        },
        computed: {
            cutRate () {
                if (this.info.cutRate) return this.info.cutRate + '%'
                return 0
            },
            twoShiftRate () {
                if (this.info.twoShiftRate) return this.info.twoShiftRate + '%'
                return 0
            },
            threeShiftRate () {
                if (this.info.threeShiftRate) return this.info.threeShiftRate + '%'
                return 0
            },
            runRate () {
                if (this.info.runRate) return this.info.runRate + '%'
                return 0
            },
            alarmRate () {
                if (this.info.alarmRate) return this.info.alarmRate + '%'
                return 0
            },
        }
    }
</script>
<style lang="scss" scoped>
    .left {
                flex: 0 0 auto;
                width: 194px;
                height: 100%;
                padding: 0 10px;
                background: url('./img/left_icon.png') 100% center no-repeat;
                .edit-btn {
                    margin-top: 20px;
                    color: #C6DCE0;
                    text-align: center;
                    line-height: 38px;
                    width: 150px;
                    height: 38px;
                    background: url('./img/btn.png') 100% center no-repeat;
                    background-size: contain;
                    font-size: 16px;
                    cursor: pointer;
                }
                .left-select {
                    margin-top: 20px;
                    width: 150px;
                }
                .left-item:first-child {
                }
                .left-item {
                    margin-top: 20px;
                    width: 138px;
                    height: 138px;
                    background: url('./img/left_1.png') 0 0 no-repeat;
                    background-size: contain;
                    color: #D6EEEF;
                    position: relative;
                    & > div:first-child {
                        font-size: 16px;
                        position: absolute;
                        left: 50%;
                        top: 50%;
                        transform: translate(-50%,-50%);
                    }
                    & > div:last-child {
                        font-size: 12px;
                        position: absolute;
                        left: 50%;
                        bottom: 25px;
                        transform: translate(-50%,-50%);
                    }
                }
                .left-2 {
                    background-image: url('./img/left_2.png');
                }
                .left-3 {
                    background-image: url('./img/left_3.png');
                }
                .left-4 {
                    background-image: url('./img/left_4.png');
                }
                .left-5 {
                    background-image: url('./img/left_5.png');
                }
            }
</style>