111
web
2025-07-07 9ce4e119fdc14459f5a9e2f40403d1755e17da8b
src/views/screen/index.vue
@@ -1,14 +1,136 @@
<template>
    <div class="home">
        <!-- 虚化盒子 -->
         <div class="blurBox"></div>
        <!-- 顶部菜单占位符 -->
        <div class="home-t"></div>
        <div class="home-content">11</div>
        <div class="home-content">
            <div class="hc-position">
                <div class="point" v-for="item in pointList" :key="item.id"
                    :style="{left: `${item.left}%`, top: `${item.top}%`, backgroundImage: `url(${warnTwo})`}"
                >
                    <div class="msg-l">
                        <div class="msg-item">
                            <span class="name">设备状态:</span>
                            <span class="val">{{ item.status }}</span>
                        </div>
                        <div class="msg-item">
                            <span class="name">甲烷浓度:</span>
                            <span class="val">{{ item.jiawan }}</span>
                        </div>
                        <div class="msg-item">
                            <span class="name">风机状态:</span>
                            <span class="val">{{ item.fengjiStatus }}</span>
                        </div>
                        <div class="msg-item">
                            <span class="name">硫化氢浓度:</span>
                            <span class="val">{{ item.liuhuaqin }}</span>
                        </div>
                    </div>
                    <div class="msg-r">
                        <div class="msg-item">
                            <span class="name">设备状态:</span>
                            <span class="val">{{ item.status }}</span>
                        </div>
                        <div class="msg-item">
                            <span class="name">甲烷浓度:</span>
                            <span class="val">{{ item.jiawan }}</span>
                        </div>
                        <div class="msg-item">
                            <span class="name">风机状态:</span>
                            <span class="val">{{ item.fengjiStatus }}</span>
                        </div>
                        <div class="msg-item">
                            <span class="name">硫化氢浓度:</span>
                            <span class="val">{{ item.liuhuaqin }}</span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="hc-info">
                <div class="shebei item">
                    <div class="item-t">辖区内设备数统计</div>
                    <div class="item-c">
                        <div class="shebei-head">
                            <div>辖区位置</div>
                            <div>甲烷传感器</div>
                            <div>硫化氢传感器</div>
                            <div>中端控制器</div>
                            <div>风机设备</div>
                            <div>总设备数</div>
                        </div>
                        <div class="shebei-conetnt">
                            <div class="list">
                                <div class="listV">
                                    <div>龙城大道</div>
                                    <div>5台</div>
                                    <div>5台</div>
                                    <div>5台</div>
                                    <div>5台</div>
                                    <div>5台</div>
                                </div>
                                <div class="listV">
                                    <div>龙城大道</div>
                                    <div>5台</div>
                                    <div>5台</div>
                                    <div>5台</div>
                                    <div>5台</div>
                                    <div>5台</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="gongdan item">
                    <div class="item-t">未处理工单统计</div>
                    <div class="item-c">
                        <div class="gongdan-head">
                            <div class="no">工单号</div>
                            <div class="type">工单类型</div>
                            <div class="time">上报时间</div>
                            <div class="user">上报人</div>
                            <div class="address">所属地址</div>
                            <div class="status">工单状态</div>
                        </div>
                        <div class="gongdan-content">
                            <div class="list">
                                <div class="listV">
                                    <div class="no">001</div>
                                    <div class="type">设备维修</div>
                                    <div class="time">2025/06/23</div>
                                    <div class="user">监测设备终端</div>
                                    <div class="address">
                                        <el-tooltip
                                            class="box-item"
                                            effect="dark"
                                            content="重庆市丰都县龙城大道288号"
                                            placement="top"
                                        >
                                            重庆市丰都县龙城大道288号
                                        </el-tooltip>
                                    </div>
                                    <div class="status"><el-button type="danger" size="small">未处理</el-button></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script setup>
import { ref } from 'vue'
    import postImg from '@/assets/images/screen/position.png'
    import warnOne from '@/assets/images/screen/warn-one.png'
    import warnTwo from '@/assets/images/screen/warn-two.png'
    const pointList = ref([
        { left: 25, top: 30, status: '一级报警', jiawan: '2.4%LEL', fengjiStatus: 1, liuhuaqin: '1.9%LEL', id: 1 },
        { left: 40, top: 60, status: '一级报警', jiawan: '2.4%LEL', fengjiStatus: 1, liuhuaqin: '1.9%LEL', id: 2 },
    ])
</script>
@@ -16,18 +138,211 @@
.home{
    position: absolute;
    left: 0;
    top: 0;
    top: 7%;
    width: 100%;
    height: 100%;
    height: 93%;
    background-image: url('@/assets/images/map-bg.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: 10;
    .blurBox{ //模糊背景盒子覆盖图片
        position: absolute;
        top: -1rem;
        left: 0;
        width: 100%;
        height: 3%;
        background-color: #000;
        filter: blur(10px);
    }
    &-t{
        height: 10%;
        height: 1%;
    }
    &-content{
        height: 90%;
        height: 99%;
        padding: 1rem 1.5rem 0;
        position: relative;
        display: flex;
        .hc-position{
            width: 70%;
            height: 100%;
            position: relative;
            .point{
                position: absolute;
                width: 56px;
                height: 80px;
                background-repeat: no-repeat;
                background-size: 100% 100%;
                .msg-l{
                    width: 250px;
                    height: 160px;
                    position: absolute;
                    left: -235px;
                    top: 0;
                    background-image: url('@/assets/images/screen/msg-box-l.png');
                    background-repeat: no-repeat;
                    background-size: 100% 100%;
                    padding: 0.5rem 1.5rem 0.5rem 0.5rem;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;
                }
                .msg-r{
                    width: 250px;
                    height: 160px;
                    position: absolute;
                    left: 40px;
                    top: 0;
                    background-image: url('@/assets/images/screen/msg-box-r.png');
                    background-repeat: no-repeat;
                    background-size: 100% 100%;
                    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;
                }
                .msg-item{
                    width: 100%;
                    color: #fff;
                    overflow: hidden;
                    white-space: nowrap;
                    text-overflow: ellipsis;
                }
            }
        }
        .hc-info{
            width: 30%;
            height: 100%;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            .item{
                width: 100%;
                height: 50%;
                background-image: url("@/assets/images/screen/ct-default.png");
                background-repeat: no-repeat;
                background-size: 100% 100%;
                &-t{
                    color: #fff;
                    height: 3rem;
                    line-height: 3rem;
                    padding-left: 2.5rem;
                }
                &-c{
                    color: #fff;
                    height: calc(100% - 3rem);
                    padding: 1rem 0.5rem;
                }
            }
            .shebei{
                .shebei-head{
                    height: 2rem;
                    line-height: 2rem;
                    display: flex;
                    justify-content: space-between;
                    font-size: 0.7rem;
                    >div{
                        width: 16%;
                        flex-shrink: 0;
                        text-align: center;
                    }
                }
                .shebei-conetnt{
                    height: calc(100% - 2rem);
                    .list{
                        height: 100%;
                        overflow-y: scroll;
                        &::-webkit-scrollbar{
                            display: none;
                        }
                        .listV{
                            display: flex;
                            justify-content: space-between;
                            font-size: 0.7rem;
                            padding: 0.5rem 0;
                            background-color: #081C3F;
                            >div{
                                width: 16%;
                                flex-shrink: 0;
                                text-align: center;
                            }
                        }
                    }
                }
            }
            .gongdan{
                .gongdan-head{
                    height: 2rem;
                    line-height: 2rem;
                    display: flex;
                    justify-content: space-between;
                    font-size: 0.7rem;
                    >div{
                        flex-shrink: 0;
                        text-align: center;
                    }
                    .no{
                        width: 8%;
                    }
                    .type{
                        width: 12%;
                    }
                    .time{
                        width: 15%;
                    }
                    .user{
                        width: 20%;
                    }
                    .address{
                        width: 30%;
                    }
                    .status{
                        width: 15%;
                    }
                }
                .gongdan-content{
                    .list{
                        height: 100%;
                        overflow-y: scroll;
                        &::-webkit-scrollbar{
                            display: none;
                        }
                        .listV{
                            display: flex;
                            justify-content: space-between;
                            align-items: center;
                            font-size: 0.7rem;
                            padding: 0.5rem 0;
                            background-color: #081C3F;
                            >div{
                                flex-shrink: 0;
                                text-align: center;
                            }
                            .no{
                                width: 8%;
                            }
                            .type{
                                width: 12%;
                            }
                            .time{
                                width: 15%;
                            }
                            .user{
                                width: 20%;
                            }
                            .address{
                                width: 30%;
                                overflow: hidden;
                                white-space: nowrap;
                                text-overflow: ellipsis;
                            }
                            .status{
                                width: 15%;
                            }
                        }
                    }
                }
            }
        }
    }
}
</style>