didiyu
2019-08-09 71dd80c584a59d608e3aca6f06ade23ae12d414b
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
<template>
    <div class="layout">
        <Row>
            <i-col v-for="(machine,key) in machines" :key="key" :span="getCol">
                <div class="machine-item">
                    <div class="machine-item-inner">
                        <img src="../../images/machine.png">
                        <div class="img-area screen">
                            <Poptip title="17寸工控一体化屏" placement="right">
                                <div slot="content" v-html="machine.screen"></div>
                                <div class="img-area-inner"></div>
                            </Poptip>
                        </div>
                        <div class="img-area test-slot">
                            <Poptip title="抽屉式板卡测试槽" content="状态信息" placement="right">
                                <div slot="content" v-html="machine.testSlot"></div>
                                <div class="img-area-inner"></div>
                            </Poptip>
                        </div>
                        <div class="img-area smart-interface">
                            <Poptip title="智能转换接口板" content="状态信息" placement="right">
                                <div slot="content" v-html="machine.smartInterface"></div>
                                <div class="img-area-inner"></div>
                            </Poptip>
                        </div>
                        <div class="img-area ac-module">
                            <Poptip title="采集模块" content="状态信息" placement="right">
                                <div slot="content" v-html="machine.acModule"></div>
                                <div class="img-area-inner"></div>
                            </Poptip>
                        </div>
                        <div class="img-area program-power">
                            <Poptip title="程控电源" content="状态信息" placement="right">
                                <div slot="content" v-html="machine.programPower"></div>
                                <div class="img-area-inner"></div>
                            </Poptip>
                        </div>
                    </div>
                </div>
            </i-col>
        </Row>
    </div>
</template>
<script>
export default {
    data(){
        return {
            machines:[
                {
                    screen: '17寸工控一体化屏状态信息',
                    testSlot: '抽屉式板卡测试槽状态信息',
                    smartInterface: '抽屉式板卡测试槽状态信息',
                    acModule: '采集模块状态信息',
                    programPower: '程控电源状态信息'
                },
                {
                    screen: '17寸工控一体化屏状态信息',
                    testSlot: '抽屉式板卡测试槽状态信息',
                    smartInterface: '抽屉式板卡测试槽状态信息',
                    acModule: '采集模块状态信息',
                    programPower: '程控电源状态信息'
                },
                {
                    screen: '17寸工控一体化屏状态信息',
                    testSlot: '抽屉式板卡测试槽状态信息',
                    smartInterface: '抽屉式板卡测试槽状态信息',
                    acModule: '采集模块状态信息',
                    programPower: '程控电源状态信息'
                },
                {
                    screen: '17寸工控一体化屏状态信息',
                    testSlot: '抽屉式板卡测试槽状态信息',
                    smartInterface: '抽屉式板卡测试槽状态信息',
                    acModule: '采集模块状态信息',
                    programPower: '程控电源状态信息'
                }
            ]
        }
    },
    computed: {
        getCol: function() {
            // console.log(this.machines.length);
            var machines = this.machines.length;
            var col = 0;
            if(machines != 0) {
                col = Math.ceil(24/machines);
            }
            col = col<6?6:col;
            return col;
        }
    }
}
</script>
<style scoped>
    .machine-item {
        text-align: center;
    }
    .machine-item-inner{
        position: relative;
        display: inline-block;
        width: 192px;
        height: 500px;
        margin-top: 80px;
    }
    .machine-item-inner img{
        width: auto;
        height: 100%;
    }
    .img-area {
        position: absolute;
    }
    .img-area:hover {
        cursor: pointer;
    }
    /* 板卡测试柜屏幕 */
    .img-area.screen {
        top: 30px;
        left: 40px;
    }
    .img-area.screen .img-area-inner {
        width: 110px;
        height: 100px;
        background-color: none;
    }
    /* 板卡测试柜测试插槽 */
    .img-area.test-slot {
        top: 174px;
        left: 35px;
    }
    .img-area.test-slot .img-area-inner {
        width: 120px;
        height: 20px;
        background-color: none;
    }
    /* 板卡测试柜智能转换接口板 */
    .img-area.smart-interface {
        top: 270px;
        left: 35px;
    }
    .img-area.smart-interface .img-area-inner {
        width: 120px;
        height: 12px;
        background-color: none;
    }
    /* 板卡测试柜采集模块 */
    .img-area.ac-module {
        top: 335px;
        left: 35px;
    }
    .img-area.ac-module .img-area-inner {
        width: 120px;
        height: 12px;
        background-color: none;
    }
    /* 板卡测试柜称控电源 */
    .img-area.program-power {
        top: 395px;
        left: 35px;
    }
    .img-area.program-power .img-area-inner {
        width: 120px;
        height: 12px;
        background-color: none;
    }
</style>