烘房监控界面修改

yangwl
Yangwl 6 months ago
parent eafe5fdf3b
commit 942cc4a980

@ -1,10 +1,10 @@
<template xmlns:fontSize="http://www.w3.org/1999/xhtml"> <template xmlns:fontSize="http://www.w3.org/1999/xhtml">
<div> <div>
<div id="cards"> <div id="cards" style="height: 20vh">
<div style="height: 35vh;margin-right: 0.6vw;margin-bottom: 12px;" class="card-item" v-for="(card, i) in dataProp.data1" :key="card.title"> <div style="height: 20vh;margin-right: 0.6vw;margin-bottom: 12px;" class="card-item" v-for="(card, i) in dataProp.data1" :key="card.title">
<div class="card-header"> <div class="card-header">
<div class="card-header-left">{{ card.title }}</div> <div class="card-header-left">{{ card.title }}</div>
<div class="card-header-right">{{ card.i }}</div> <!-- <div class="card-header-right">{{ card.i }}</div>-->
</div> </div>
<div class="card-box"> <div class="card-box">
</div> </div>
@ -46,11 +46,11 @@
</div> </div>
<div id="cardss"> <div id="cardss" style="height: 20vh">
<div style="height: 35vh;margin-right: 0.6vw;margin-bottom: 12px;" class="card-item" v-for="(card, i) in dataProp.data2" :key="card.title"> <div style="height: 20vh;margin-right: 0.6vw;margin-bottom: 12px;" class="card-item" v-for="(card, i) in dataProp.data2" :key="card.title">
<div class="card-header"> <div class="card-header">
<div class="card-header-left">{{ card.title }}</div> <div class="card-header-left">{{ card.title }}</div>
<div class="card-header-right">{{ (i + 9) }}</div> <!-- <div class="card-header-right">{{ (i + 9) }}</div>-->
</div> </div>
<div class="card-box"> <div class="card-box">
</div> </div>
@ -91,6 +91,51 @@
</div> </div>
</div> </div>
<div id="cardsss" style="height: 20vh">
<div style="height: 20vh;margin-right: 0.6vw;margin-bottom: 12px;" class="card-item" v-for="(card, i) in dataProp.data3" :key="card.title">
<div class="card-header">
<div class="card-header-left">{{ card.title }}</div>
<!-- <div class="card-header-right">{{ (i + 9) }}</div>-->
</div>
<div class="card-box">
</div>
<div class="card-footer">
<div class="card-footer-item">
<div class="footer-title">烘房模式</div>
<div class="footer-detail">
<span :style="{ fontSize: '25px', fontWeight: 'bold', color: getTextColor(card.model), textAlign: 'right' }">
{{ getTagModel(card.model) }}
</span>
</div>
</div>
<div class="card-footer-item">
<div class="footer-title">门前数量</div>
<div class="footer-detail">
<span :style="{ fontSize: '25px', fontWeight: 'bold', color: getTextColor(card.dollyNumber), textAlign: 'right' }">
{{ getTagText(card.dollyNumber) }}
</span>
</div>
</div>
</div>
<div class="card-footer">
<div class="card-footer-item">
<div class="footer-title">烘房温度</div>
<div class="footer-detail">
<span style="font-size: 25px;font-weight: bold; color: #ea6027; textAlign: 'right'">{{ card.temperature }}</span>
</div>
</div>
<div class="card-footer-item">
<div class="footer-title">保持时长</div>
<div class="footer-detail">
<span style="font-size: 25px;font-weight: bold; color: #26fcd8; textAlign: 'right'">{{ card.waitmin }}</span>min
</div>
</div>
</div>
</div>
</div>
</div> </div>
</template> </template>
@ -105,6 +150,7 @@ export default {
return { return {
cards: [], cards: [],
cardss: [], cardss: [],
cardsss: [],
} }
}, },
methods: { methods: {
@ -144,6 +190,9 @@ export default {
this.cardss = new Array(8).fill(0).map((foo, i) => ({ this.cardss = new Array(8).fill(0).map((foo, i) => ({
title: '烘房' + (i + 9), title: '烘房' + (i + 9),
})); }));
this.cardsss = new Array(8).fill(0).map((foo, i) => ({
title: '烘房' + (i + 9),
}));
}, },
@ -158,10 +207,10 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
#cards ,#cardss { #cards ,#cardss , #cardsss{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
height: 35vh;
margin-bottom: 12px; margin-bottom: 12px;
.card-item { .card-item {

@ -1,9 +1,9 @@
<template> <template>
<div class="fullscreen-carousel"> <div class="fullscreen-carousel">
<el-carousel :interval="3000" indicator-position="outside" @change="handleScroll"> <el-carousel :interval="3000" indicator-position="outside" @change="handleScroll">
<el-carousel-item v-for="(item,k) in 2" :key="item" > <el-carousel-item v-for="(item,k) in 1" :key="item" >
<h3 v-if="k===0"><cards :dataProp="cards" /></h3> <h3 v-if="k===0"><cards :dataProp="cards" /></h3>
<h3 v-if="k===1"><cards2 :dataProp="cardss"/></h3> <!-- <h3 v-if="k===1"><cards2 :dataProp="cardss"/></h3>-->
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</div> </div>
@ -25,7 +25,7 @@ export default {
// //
name: 'carousel', name: 'carousel',
components: { components: {
cards2, // cards2,
cards cards
}, },
props: { props: {
@ -40,7 +40,6 @@ export default {
data1:[], data1:[],
data2:[], data2:[],
}, },
cardss: [], cardss: [],
} }
}, },
@ -55,7 +54,7 @@ export default {
this.cards.data2 = new Array(8).fill(0).map((foo, i) => ({ this.cards.data2 = new Array(8).fill(0).map((foo, i) => ({
i:(i+9), i:(i+9),
})); }));
this.cardss = new Array(5).fill(0).map((foo, i) => ({ this.cards.data3 = new Array(5).fill(0).map((foo, i) => ({
i: (i === 0 ? 17 : i === 1 ? 18 : i === 2 ? 61 : i === 3 ? 62 : 63), i: (i === 0 ? 17 : i === 1 ? 18 : i === 2 ? 61 : i === 3 ? 62 : 63),
})); }));
// console.log(this.cards.data1) // console.log(this.cards.data1)
@ -93,6 +92,22 @@ export default {
return card; return card;
} }
});
this.cards.data3 = this.cards.data3.map((card) => {
const matchingIndex = response.data.dryingroomList.find((index) => index.i === card.i);
if (matchingIndex) {
return {
...card,
title: '烘房' + matchingIndex.i,
model: matchingIndex.status,
dollyNumber:matchingIndex.dollyNumber,
waitmin:matchingIndex.waitmin,
temperature:matchingIndex.temperature
};
} else {
return card;
}
}); });
this.cardss = this.cardss.map((card) => { this.cardss = this.cardss.map((card) => {

Loading…
Cancel
Save