Commit c9fc65ef authored by xinzhedeai's avatar xinzhedeai

add:leftmodule style mod

parent 7700f65e
......@@ -10,7 +10,8 @@
<div class="right-content">
<div class="name">{{ item.name }}</div>
<div class="detail">
<span class="online">在线: {{ item.onlineCount }}</span><br>
<span class="online">在线: {{ item.onlineCount }}</span
><br />
<span class="offline">离线: {{ item.offlineCount }}</span>
</div>
</div>
......@@ -21,7 +22,7 @@
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { ref, onMounted } from "vue";
// 定义设备状态数据接口
interface DeviceStatus {
......@@ -51,13 +52,41 @@ const fetchDeviceStatus = async () => {
// 模拟接口返回数据
deviceStatusList.value = [
{ id: '1', name: '在线监测', percent: 100, color: 'cyan', onlineCount: 56, offlineCount: 0 },
{ id: '2', name: '视频监测', percent: 82, color: 'yellow', onlineCount: 87, offlineCount: 2 },
{ id: '3', name: '人员定位', percent: 88, color: 'blue', onlineCount: 16, offlineCount: 2 },
{ id: '4', name: '车辆定位', percent: 100, color: 'green', onlineCount: 7, offlineCount: 2 }
{
id: "1",
name: "在线监测",
percent: 100,
color: "cyan",
onlineCount: 56,
offlineCount: 0,
},
{
id: "2",
name: "视频监测",
percent: 82,
color: "yellow",
onlineCount: 87,
offlineCount: 2,
},
{
id: "3",
name: "人员定位",
percent: 88,
color: "blue",
onlineCount: 16,
offlineCount: 2,
},
{
id: "4",
name: "车辆定位",
percent: 100,
color: "green",
onlineCount: 7,
offlineCount: 2,
},
];
} catch (error) {
console.error('获取设备状态数据失败:', error);
console.error("获取设备状态数据失败:", error);
}
};
......@@ -73,16 +102,16 @@ onMounted(() => {
height: 3rem;
position: relative;
padding: 0.15rem;
padding-top: .45rem;
padding-top: 0.45rem;
// background: var(--n-bg-color-secondary);
background-image: url('@/assets/jinrun/module-bg.png');
.card-title {
background-image: url("@/assets/jinrun/module-bg.png");
.card-title {
position: absolute;
left: .25rem;
left: 0.25rem;
top: -0.15rem;
font-weight: 500;
font-size: 0.2rem;
color: #FFFFFF;
color: #ffffff;
text-shadow: 0rem 0rem 0rem rgba(5, 38, 68, 0.5);
}
.card-header {
......@@ -93,7 +122,6 @@ onMounted(() => {
// background-image: url('@/assets/jinrun/module-title.png');
// background-size: cover;
// margin-left: -0.1rem;
}
.card-footer {
height: 0.1rem;
......@@ -121,19 +149,23 @@ onMounted(() => {
margin-right: 0.1rem;
min-width: 0.8rem;
text-align: center;
color:#fff;
background-image: url('@/assets/jinrun/blue.png');
color: #fff;
background-image: url("@/assets/jinrun/blue.png");
background-size: cover;
// padding: 0.05rem 0.1rem;
// border-radius: 0.05rem;
&.blue {
background-image: url('@/assets/jinrun/blue.png');
background-image: url("@/assets/jinrun/blue.png");
}
&.yellow {
background-image: url('@/assets/jinrun/yellow.png');
background-image: url("@/assets/jinrun/yellow.png");
}
&.cyan {
background-image: url("@/assets/jinrun/cyan.png");
}
&.green {
background-image: url("@/assets/jinrun/green.png");
}
&.cyan { background-image: url('@/assets/jinrun/cyan.png'); }
&.green { background-image: url('@/assets/jinrun/green.png'); }
}
.right-content {
......@@ -143,8 +175,8 @@ onMounted(() => {
.name {
font-weight: 400;
font-size: 0.18rem;
color: #11E0FF;
font-size: 0.18rem;
color: #11e0ff;
margin-bottom: 0.03rem;
}
......@@ -153,15 +185,17 @@ color: #11E0FF;
.online {
font-weight: 400;
font-size: 0.16rem;
color: #FFFFFF;
font-size: 0.16rem;
color: #ffffff;
margin-right: 0.1rem;
margin-bottom: 0.04rem;
display: inline-block;
}
.offline {
font-weight: 400;
font-size: 0.16rem;
color: #FFCE22;
font-size: 0.16rem;
color: #ffce22;
}
}
}
......
......@@ -483,7 +483,8 @@ const navTo = () => {
.left-modules, .right-modules {
width: 4.6rem;
// background: pink;
margin-top: .6rem;
// margin-top: .6rem;
padding-top: 0.6rem;
margin-left: 0.4rem;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment