Files
tianyi_DataV/src/views/eqpView/index.vue
T
2024-11-07 17:47:40 +08:00

91 lines
2.2 KiB
Vue

<template>
<div class="box">
<div v-for="(it, ind) of data" :key="ind" class="item"
:class="it.type == 1 ? 'typeOne' : it.type == 0 ? 'typeTwo' : 'typeFo'">
<div class="lists">
<div>{{ it.device_code }}</div>
<div>设备状态:{{ it.device_state.replace("。", "") }}</div>
<div v-if="it.zsspeed">注射速度:{{ it.zsspeed }}</div>
<div v-if="it.sjspeed">射胶速度:{{ it.sjspeed }}</div>
<div v-if="it.sjspeed">成型时间:{{ it.sjspeed }}</div>
<div v-if="it.temp1">一段温度:{{ it.temp1 }}</div>
<div v-if="it.temp3">三段温度:{{ it.temp3 }}</div>
<div v-if="it.temp5">五段温度:{{ it.temp5 }}</div>
</div>
</div>
</div>
</template>
<script>
import { getEqpList } from '@/api/index'
export default {
name: 'eqpView',
data() {
return {
data: []
}
},
created() {
this.getEqpList()
},
mounted() {
},
beforeDestroy() {
},
methods: {
getEqpList() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
getEqpList().then(res => {
this.data = res.data.data || []
}).finally(e => { loading.close(); })
}
}
}
</script>
<style lang="scss" scoped>
@import '@/assets/scss/tianyi.scss';
.box {
width: 100%;
height: 860px;
display: flex;
padding: 50px;
// justify-content: space-evenly;
flex-wrap: wrap;
.item {
width: 200px;
height: 210px;
margin-right: 20px;
color: #cbaeae;
// color: rgba(0, 0, 0, .5);
text-align: center;
border-radius: 6%;
position: relative;
// padding-top: 90px;
.lists {
line-height: 20px;
width: 100%;
font-size: 14px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}
</style>