左侧菜单栏样式修改
This commit is contained in:
@ -42,7 +42,7 @@ export interface DeviceDetail {
|
|||||||
name: string; // 姓名
|
name: string; // 姓名
|
||||||
code: string; // ID(身份证/工号)
|
code: string; // ID(身份证/工号)
|
||||||
};
|
};
|
||||||
|
chargeState: string
|
||||||
}
|
}
|
||||||
// 定义灯光模式的类型接口
|
// 定义灯光模式的类型接口
|
||||||
export interface LightMode {
|
export interface LightMode {
|
||||||
|
BIN
src/assets/images/path.png
Normal file
BIN
src/assets/images/path.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 408 B |
@ -81,11 +81,15 @@
|
|||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-menu-item,
|
.el-sub-menu,
|
||||||
.menu-title {
|
.menu-title {
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
text-overflow: ellipsis !important;
|
text-overflow: ellipsis !important;
|
||||||
white-space: nowrap !important;
|
white-space: nowrap !important;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
font-family: Microsoft YaHei;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-menu-item .el-menu-tooltip__trigger {
|
.el-menu-item .el-menu-tooltip__trigger {
|
||||||
@ -100,6 +104,7 @@
|
|||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub-menu-title-noDropdown,
|
.sub-menu-title-noDropdown,
|
||||||
.el-sub-menu__title {
|
.el-sub-menu__title {
|
||||||
&:hover {
|
&:hover {
|
||||||
@ -119,6 +124,7 @@
|
|||||||
& .nest-menu .el-sub-menu>.el-sub-menu__title,
|
& .nest-menu .el-sub-menu>.el-sub-menu__title,
|
||||||
& .el-sub-menu .el-menu-item {
|
& .el-sub-menu .el-menu-item {
|
||||||
min-width: $base-sidebar-width !important;
|
min-width: $base-sidebar-width !important;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: rgba(0, 0, 0, 0.1) !important;
|
background-color: rgba(0, 0, 0, 0.1) !important;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
@ -143,6 +149,7 @@
|
|||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
& .nest-menu .el-sub-menu>.el-sub-menu__title,
|
& .nest-menu .el-sub-menu>.el-sub-menu__title,
|
||||||
& .el-menu-item {
|
& .el-menu-item {
|
||||||
&:hover {
|
&:hover {
|
||||||
@ -197,6 +204,7 @@
|
|||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
&>i {
|
&>i {
|
||||||
height: 0;
|
height: 0;
|
||||||
width: 0;
|
width: 0;
|
||||||
@ -234,6 +242,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.withoutAnimation {
|
.withoutAnimation {
|
||||||
|
|
||||||
.main-container,
|
.main-container,
|
||||||
.sidebar-container {
|
.sidebar-container {
|
||||||
transition: none;
|
transition: none;
|
||||||
@ -326,7 +335,7 @@
|
|||||||
.el-sub-menu .el-menu-item {
|
.el-sub-menu .el-menu-item {
|
||||||
&.is-active {
|
&.is-active {
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
color: #409eff !important;
|
color: rgba(1, 159, 228, 1) !important;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
@ -381,7 +390,7 @@
|
|||||||
|
|
||||||
// 子菜单背景色
|
// 子菜单背景色
|
||||||
.el-sub-menu .el-menu {
|
.el-sub-menu .el-menu {
|
||||||
background: #1f2d3d !important;
|
background: linear-gradient(0.00deg, rgba(0, 87, 159, 0.15), rgba(0, 87, 159, 0) 100%) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 子菜单项悬停效果
|
// 子菜单项悬停效果
|
||||||
@ -399,7 +408,8 @@
|
|||||||
// 全局菜单样式匹配设计UI
|
// 全局菜单样式匹配设计UI
|
||||||
#app .sidebar-container {
|
#app .sidebar-container {
|
||||||
// 确保背景色一致
|
// 确保背景色一致
|
||||||
background: #2c3e50 !important;
|
background: rgba(11, 24, 40, 1) !important;
|
||||||
|
//background: #2c3e50 !important;
|
||||||
|
|
||||||
// 菜单项基础样式
|
// 菜单项基础样式
|
||||||
.el-menu-item,
|
.el-menu-item,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// 全局SCSS变量
|
// 全局SCSS变量
|
||||||
:root {
|
:root {
|
||||||
--menuBg: #2c3e50; // 精确匹配图片中的深色背景
|
--menuBg: linear-gradient(0.00deg, rgba(0, 87, 159, 0.15),rgba(0, 87, 159, 0) 100%);; // 精确匹配图片中的深色背景
|
||||||
--menuColor: #bfcbd9; // 非激活菜单项的文字颜色
|
--menuColor: #bfcbd9; // 非激活菜单项的文字颜色
|
||||||
--menuActiveText: #ffffff; // 激活菜单项的文字颜色
|
--menuActiveText: #ffffff; // 激活菜单项的文字颜色
|
||||||
--menuHover: #34495e; // 悬停时的背景色
|
--menuHover: #34495e; // 悬停时的背景色
|
||||||
@ -11,7 +11,7 @@
|
|||||||
--subMenuTitleHover: #293444; // 子菜单标题悬停背景色
|
--subMenuTitleHover: #293444; // 子菜单标题悬停背景色
|
||||||
|
|
||||||
// 激活菜单项的渐变颜色 - 根据设计UI调整
|
// 激活菜单项的渐变颜色 - 根据设计UI调整
|
||||||
--menuActiveGradient: linear-gradient(90deg, #0080EA 0%, #000F27 100%);
|
--menuActiveGradient:linear-gradient(90.00deg, rgba(0, 128, 234, 1),rgba(0, 15, 39, 0) 100%);
|
||||||
|
|
||||||
--fixedHeaderBg: #ffffff;
|
--fixedHeaderBg: #ffffff;
|
||||||
--tableHeaderBg: #f8f8f9;
|
--tableHeaderBg: #f8f8f9;
|
||||||
@ -130,7 +130,7 @@ $--color-warning: #e6a23c;
|
|||||||
$--color-danger: #f56c6c;
|
$--color-danger: #f56c6c;
|
||||||
$--color-info: #909399;
|
$--color-info: #909399;
|
||||||
|
|
||||||
$base-sidebar-width: 280px;
|
$base-sidebar-width: 250px;
|
||||||
|
|
||||||
// the :export directive is the magic sauce for webpack
|
// the :export directive is the magic sauce for webpack
|
||||||
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
|
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
|
||||||
|
@ -124,6 +124,16 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- ===========充电提示框====== -->
|
||||||
|
<el-dialog title="充电提示" v-model="centerDialogVisible" width="15%">
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<h3 style="color: rgba(224, 52, 52, 1)">设备电量低于20%</h3>
|
||||||
|
</div>
|
||||||
|
<div>请及时充电</div>
|
||||||
|
<span slot="footer" class="dialog-footer" style="text-align: right;display: block;">
|
||||||
|
<el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup name="DeviceControl" lang="ts">
|
<script setup name="DeviceControl" lang="ts">
|
||||||
@ -151,6 +161,7 @@ const fullscreenLoading = ref(false)
|
|||||||
const forceAlarmLoading = ref(false) //强制报警
|
const forceAlarmLoading = ref(false) //强制报警
|
||||||
const sendTextLoading = ref(false)
|
const sendTextLoading = ref(false)
|
||||||
const lightModesLoading = ref(false)
|
const lightModesLoading = ref(false)
|
||||||
|
const centerDialogVisible = ref(false)
|
||||||
const {
|
const {
|
||||||
connected,
|
connected,
|
||||||
connect,
|
connect,
|
||||||
@ -575,9 +586,8 @@ const handleDeviceMessage = (msg: any) => {
|
|||||||
deviceDetail.value.batteryPercentage = deviceState[3]; //电量
|
deviceDetail.value.batteryPercentage = deviceState[3]; //电量
|
||||||
deviceDetail.value.batteryRemainingTime = deviceState[5]; //续航时间
|
deviceDetail.value.batteryRemainingTime = deviceState[5]; //续航时间
|
||||||
// getList(); // 重新获取设备详情
|
// getList(); // 重新获取设备详情
|
||||||
if (deviceDetail.value.batteryPercentage < 20) {
|
if (deviceDetail.value.batteryPercentage < 20 && deviceDetail.value.chargeState == 0) {
|
||||||
ElMessage.closeAll();
|
centerDialogVisible.value=true
|
||||||
proxy?.$modal.msgWarning('电量低于20%,请及时充电');
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -663,7 +673,7 @@ onUnmounted(() => {
|
|||||||
background: white;
|
background: white;
|
||||||
padding: 0px 20px 50px;
|
padding: 0px 20px 50px;
|
||||||
border: 1px solid #ebeef5;
|
border: 1px solid #ebeef5;
|
||||||
height: 250px;
|
height: 289px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -736,6 +746,7 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.brightness-alarm {
|
.brightness-alarm {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@ -927,4 +938,9 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.path-img {
|
||||||
|
width: 52px;
|
||||||
|
height: 28px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -15,8 +15,7 @@
|
|||||||
<el-card>
|
<el-card>
|
||||||
<!-- =========搜索按钮操作======= -->
|
<!-- =========搜索按钮操作======= -->
|
||||||
<div class="btn_search">
|
<div class="btn_search">
|
||||||
<el-button type="primary" plain icon="Download"
|
<el-button type="primary" plain icon="Download" @click="handleExport">导出</el-button>
|
||||||
@click="handleExport">导出</el-button>
|
|
||||||
<div style="position: absolute; right:30px; top:20px">
|
<div style="position: absolute; right:30px; top:20px">
|
||||||
<el-input v-model="queryParams.content" placeholder="MAC/IMEI" clearable
|
<el-input v-model="queryParams.content" placeholder="MAC/IMEI" clearable
|
||||||
style="width: 200px; margin-right: 20px;" @keyup.enter="handleQuery" @input="handleInput" />
|
style="width: 200px; margin-right: 20px;" @keyup.enter="handleQuery" @input="handleInput" />
|
||||||
|
Reference in New Issue
Block a user