From e76560c6f1f7150c3f61ef23c1536d08546612f4 Mon Sep 17 00:00:00 2001 From: web <candymxq888@outlook.com> Date: 星期二, 01 七月 2025 14:10:28 +0800 Subject: [PATCH] fix:修改首页标点配置 --- src/views/screen/index.vue | 322 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 316 insertions(+), 6 deletions(-) diff --git a/src/views/screen/index.vue b/src/views/screen/index.vue index 35ae653..7916c9d 100644 --- a/src/views/screen/index.vue +++ b/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,206 @@ .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; + } + .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; + } + .msg-item{ + width: 100%; + color: #fff; + padding: 0.3rem 0; + 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> \ No newline at end of file -- Gitblit v1.9.3