<template>
	<van-nav-bar
		:title="$t('threadHead.title')"
		left-text=""
		left-arrow
		@click-left="onClickLeft"
	>
	</van-nav-bar>
	<equipmentTop></equipmentTop>
	
	<div class="assemble">
        <div class="fermentator-header">
            <div class="status">
                <div class="img">
                    <img src="../../assets/images/icon_sbzt@2x.png" alt="" />
                </div>
                <div class="text">
                    <div class="label">设备状态</div>
                    <div class="value" style="color: #3fbf31">正常</div>
                </div>
            </div>
            <div class="mode">
                <div class="img">
                    <img src="../../assets/images/icon_gzms@2x.png" alt="" />
                </div>
                <div class="text">
                    <div class="label">工作模式</div>
                    <div class="value">自动</div>
                </div>
            </div>
        </div>
        <commonCharts></commonCharts>
		<ul>
			<li>
				<div class="li-icon">
					<img src="@/assets/images/icon_zdj@2x.png" alt="" />
				</div>
				<div class="li-text">主电机</div>
				<div class="li-stat li-stat-bg"></div>
			</li>
			<li>
				<div class="li-icon">
					<img src="@/assets/images/icon_qf@2x.png" alt="" />
				</div>
				<div class="li-text">气阀</div>
				<div class="li-stat li-stat-bg"></div>
			</li>
			<li>
				<div class="li-icon">
					<img src="@/assets/images/icon_lxj@2x.png" alt="" />
				</div>
				<div class="li-text">离心机</div>
				<div class="li-stat li-stat-bg"></div>
			</li>
		</ul>
        <div class="speed-warp">
            <div class="big-box">
                <div class="icon"></div>
                <div class="text">主电机频率</div>
                <div class="line">
                    <div></div>
                </div>
                <div class="num">99%</div>
            </div>
            <div style="margin:0 12px">
                <div class="sm-box">
                    <div class="icon"></div>
                    <div class="text">胶塞速率</div>
                    <div class="num-or-line">
                        <div class="num">99%</div>
                        <div class="line">
                            <div></div>
                        </div>
                    </div>
                </div>
                <div class="sm-box">
                    <div class="icon"></div>
                    <div class="text">针尖速率</div>
                    <div class="num-or-line">
                        <div class="num">99%</div>
                        <div class="line">
                            <div></div>
                        </div>
                    </div>
                </div>
                <div class="sm-box">
                    <div class="icon"></div>
                    <div class="text">胶塞平送</div>
                    <div class="num-or-line">
                        <div class="num">99%</div>
                        <div class="line">
                            <div></div>
                        </div>
                    </div>
                </div>
                <div class="sm-box">
                    <div class="icon"></div>
                    <div class="text">针尖平送</div>
                    <div class="num-or-line">
                        <div class="num">99%</div>
                        <div class="line">
                            <div></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
	</div>
</template>
<script setup>
import equipmentTop from '@/components/equipment-top.vue'
import commonCharts from './components/commonCharts.vue'
import * as echarts from 'echarts'
import { ref, reactive, onMounted } from 'vue'
const onClickLeft = () => proxy.$router.push('/main/working')

</script>
<style lang="scss" scoped>
.fermentator-header {
	display: flex;
	justify-content: space-between;
	margin-top: 12px;
    padding: 0 12px;
	.status,
	.mode {
		width: 49%;
		background: #fff;
		padding: 12px;
		box-sizing: border-box;
		display: flex;
		.label {
			font-size: 14px;
			color: #666;
		}
		.value {
			font-weight: bold;
			font-size: 16px;
			color: #ff8800;
			margin-top: 6px;
		}
		.img {
			width: 50px;
			height: 50px;
			margin-right: 12px;
			img {
				width: 100%;
				height: 100%;
			}
		}
	}
}
.assemble {
    .speed-warp{
        //奇偶选择器
        .sm-box:nth-child(2n){
            margin-left: 2%;
        }
        .sm-box{
            width: 49%;
            float: left;
            height: 60px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #fff;
            padding: 0 12px;
            box-sizing: border-box;
            border-radius: 5px;
            margin-bottom:8px;
            .icon{
                width: 20px;
                height: 20px;
                border:4px solid #F1EBFD;
                box-sizing: border-box;
                background: #BB99F6;
                border-radius: 10px;
            }
            .text{
                font-size: 14px;
                color: #666;
            }
            .num-or-line{
                
                .num{
                    font-size: 14px;
                    color: #333;
                    font-weight: bold;
                }
                .line{
                    width: 30px;
                    height: 6px;
                    border-radius: 3px;
                    background: #eee;
                    div{
                        width: 50%;
                        height: 100%;
                        background: #BB99F6;
                        border-radius: 3px;
                    }
                }
            }
        }
        .big-box{
            display: flex;
            height: 64px;
            background: #fff;
            margin:22px 12px 12px;
            border-radius: 5px;
            justify-content: space-between;
            align-items: center;
            padding: 0 12px;
            .icon{
                width: 20px;
                height: 20px;
                border:4px solid #FFEFDC;
                box-sizing: border-box;
                background: #FFAF53;
                border-radius: 10px;
            }
            .text{
                font-size: 14px;
                color: #333;
            }
            .num{
                font-size: 14px;
                color: #333;
                font-weight: bold;
            }
            .line{
                width: 120px;
                height: 10px;
                border-radius: 5px;
                background: #eee;
                div{
                    width: 50%;
                    height: 100%;
                    background: #FFAF53;
                    border-radius: 5px;
                }
            }
        }
    }
	ul {
		padding: 0 12px;
		overflow: hidden;
        display: flex;
        justify-content: space-between;
		li {
			width: 31%;
			
			position: relative;
			text-align: center;
			background: #fff;
			padding: 15px 0;
			box-sizing: border-box;
			margin-top: 8px;
			border-radius: 5px;
			.li-num {
				color: #333;
				font-size: 20px;
				line-height: 50px;
				margin-left: 12px;
				font-weight: bold;
			}
			.li-icon {
				height: 30px;
				width: 30px;
				border-radius: 5px;
				overflow: hidden;
                text-align: center;
                margin: 0 auto;
				img {
					width: 100%;
					height: 100%;
                    
				}
			}
			.li-text {
				margin-top:10px;
				
				font-size: 14px;
				color: #666666;
			}
			.li-stat {
				position: absolute;
				height: 16px;
				width: 16px;
				right: 8px;
				top: 8px;
			}
			.li-stat-bg {
				background: #3fbf31;
				border-radius: 50%;
				border: 3px solid #d8f2d5;
				box-sizing: border-box;
			}
			.li-stat-img {
				img {
					width: 100%;
					height: 100%;
				}
			}
		}
	}
}
</style>