feat: 撑杆监测、设备状态主体模块静态交互完成

main
donghao 2 months ago
parent d07a52c43f
commit 208f5dd0bd

@ -2,6 +2,7 @@
/* 去掉表格整体边框 */
.el-table {
border: none !important;
background-color: transparent;
}
/* 去掉表头下边框 */
.el-table__header-wrapper thead th {
@ -31,26 +32,30 @@
.el-scrollbar__view {
background: transparent !important;
}
.baseTable_box {
.el-table--large .el-table__cell {
padding: 8.5px 0;
}
.baseTable_box {
cursor: pointer;
.el-table__body {
background: linear-gradient(90deg, #082050 0%, #02102a 100%);
background: transparent;
tr {
color: #fff;
background: linear-gradient(90deg, #082050 0%, #02102a 100%);
&:nth-child(odd) {
background: linear-gradient(90deg, #082050 0%, #02102a 100%);
}
&:nth-child(even) {
background: linear-gradient(90deg, #102d65 0%, #081736 100%);
}
background: transparent;
&:hover td {
background-color: transparent;
}
&:hover {
color: #37DBFF;
background: linear-gradient( 90deg, rgba(30,54,88,0) 0%, #0C4FAD 53%, rgba(65,117,190,0) 100%);;
}
}
}
.el-table__header > thead {
color: #9fb5d7;
background-color: #104284 !important;
tr {
background-color: #104284 !important;
@ -60,58 +65,41 @@
}
}
}
// .baseTable_box {
// position: relative;
// &.el-table td.el-table__cell,
// &.el-table th.el-table__cell.is-leaf {
// border-bottom: none !important;
// border-left: none !important;
// }
// .el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
// background-color: transparent;
// }
// .el-table__body {
// // border-collapse: collapse !important;
// /* */
// // border-spacing: -1px;
// /* */
// // width: 100%;
// /* 100% */
// tr {
// & > td:nth-child(1) {
// // border-left: 1px solid #dcdcdc;
// // border-radius: 4px 0 0 4px;
// border-left: none !important;
// border-right: none !important;
// }
// & > td:nth-child(2n) {
// // border-left: 1px solid #dcdcdc;
// // border-radius: 4px 0 0 4px;
// }
// & > td {
// border-left: none !important;
// border-right: none !important;
// }
// color: #fff;
// &:nth-child(odd) {
// background: linear-gradient(90deg, #082050 0%, #02102a 100%);
// }
// &:nth-child(even) {
// background: linear-gradient(90deg, #102d65 0%, #081736 100%);
// }
// &:hover {
// background-color: transparent;
// }
// }
// }
/* full_table */
&.full_table {
.el-table--large .el-table__cell {
padding: 4px 0;
}
.baseTable_box {
.el-table__body {
background: linear-gradient(90deg, #082050 0%, #02102a 100%);
tr {
color: #fff;
background: linear-gradient(90deg, #082050 0%, #02102a 100%);
&:nth-child(odd) {
background: linear-gradient(90deg, #082050 0%, #02102a 100%);
}
&:nth-child(even) {
background: linear-gradient(90deg, #102d65 0%, #081736 100%);
}
&:hover td {
background-color: transparent;
}
}
}
// &.el-table td.el-table__cell {
// border-bottom: none;
// border-top: none;
// }
// }
.el-table__header > thead {
color: #9fb5d7;
background-color: #104284 !important;
tr {
background-color: #104284 !important;
}
th {
background-color: #104284 !important;
}
}
}
}
}
.pagination_box {

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-03-06 15:42:11
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-03-11 14:24:17
* @LastEditTime: 2025-03-11 15:42:37
* @FilePath: \vite-ai\data-dashboard\src\components\Navbar.vue
* @Description: 标题栏
-->
@ -15,7 +15,6 @@ const logout = () => {
userStore.logout()
}
// TODO
defineOptions({
name: "DsNavbar"
});
@ -46,9 +45,10 @@ function getTime() {
const time =
_formatNum(nowDate.getHours()) +
":" +
_formatNum(nowDate.getMinutes()) +
":" +
_formatNum(nowDate.getSeconds());
_formatNum(nowDate.getMinutes())
// +
// ":" +
// _formatNum(nowDate.getSeconds());
let week = "";
switch (nowDate.getDay()) {
case 0:
@ -134,10 +134,9 @@ onMounted(() => {
.right {
width: 30vw;
.date_box {
// TODO
color: #009dff;
font-size: 16px;
margin-right: 15px;
margin-right: 24px;
font-family: DingTalk JinBuTi;
&>span {
padding-left: 5px;

@ -16,3 +16,7 @@
background-image: url("@/assets/header/title#{$i}.png");
}
}
.bg_basic_content{
background: linear-gradient( 180deg, rgba(7,16,19,0) 0%, #081417 100%);;
}

@ -1,10 +1,29 @@
// ElementPlus
// $--color-primary: #ff6600; //
// $--el-color-primary: red;
/* 自定义 Element Plus 变量 */
@forward "element-plus/theme-chalk/src/common/var.scss" with (
$colors: (
"primary": (
"base": #2de6ff,
),
),
$select-dropdown: (
"background-color": red,
)
// $el-pagination: (
// --el-pagination-button-height-small: 24px;
// )
);
/* 引入 Element Plus 样式 */
@use "element-plus/theme-chalk/src/index.scss" as *;
/* 表格 */
.ds_table{
.ds_table {
position: relative;
}
/* 分页栏 */
.pagination_wrap {
}
.fixed_pagination {
// width: calc(100% - 136px);
// background-color: white;
@ -15,7 +34,7 @@
justify-content: flex-end;
right: 0;
bottom: 0;
padding: 20px 0 10px;
padding: 28px 20px;
}
.noneFixed_pagination {
display: flex;
@ -23,21 +42,78 @@
justify-content: flex-end;
padding: 20px 0;
}
.el-select--small .el-select__wrapper {
min-height: 28px;
line-height: 24px;
}
.el-pagination {
button {
background-color: transparent;
color: white;
}
button:disabled,
button.is-disabled {
background-color: transparent;
}
.el-pagination--small .btn-prev,
.el-pagination--small .btn-next,
.el-pagination--small .el-pager li {
height: 28px;
line-height: 28px;
min-width: 28px;
}
.el-select__placeholder {
color: white;
}
.el-select--small .el-select__wrapper {
width: 92px;
}
.el-select--small .el-select__wrapper {
padding: 2px 15px;
}
.el-pagination__jump {
color: white;
.el-input {
width: 40px;
height: 28px;
}
.el-input__wrapper {
background-color: transparent;
.el-input__inner {
color: white;
line-height: 24px;
}
}
}
}
.el-pager li {
background-color: transparent;
color: white;
}
/* 下拉选择 */
.custom-select {
min-width: 150px;
max-width: 300px;
width: 150px;
.el-select__selected-item {
color: white; /* 文字颜色 */
}
.el-select__wrapper {
background: rgba(74, 126, 191, 0.1); /* 下拉框背景色 */
border: 1px solid transparent; /* 边框 */
color: white; /* 文字颜色 */
height: 40px;
height: 32px;
box-shadow: none;
&::placeholder {
color: rgba(255, 255, 255, 0.6); /* 占位符颜色 */
}
}
.el-select__wrapper {
min-height: 32px;
line-height: 32px;
}
.el-select__arrow {
color: rgba(255, 255, 255, 0.6); /* 下拉箭头颜色 */
}
@ -46,31 +122,30 @@
}
}
.el-select {
background-color: #032B5C; /* 自定义背景色 */
.custom-select {
background-color: #032b5c; /* 自定义背景色 */
border: none; /* 可选:去掉边框 */
}
/* 修改下拉菜单背景色 */
.el-select-dropdown {
background-color: #032B5C; /* 下拉菜单背景 */
background-color: #032b5c; /* 下拉菜单背景 */
border: none; /* 可选:去掉下拉框边框 */
border: 1px solid #032B5C;
border: 1px solid #032b5c;
box-shadow: none; /* 可选:去掉阴影 */
}
/* 修改普通选项文字颜色 */
.el-select-dropdown__item {
color: white; /* 下拉选项文字颜色 */
}
.el-select__dropdown {
background: #002a5c; /* 下拉面板背景 */
.el-select__item {
color: white; /* 下拉选项文字颜色 */
&:hover {
background: rgba(74, 126, 191, 0.3); /* 选项悬停背景 */
}
}
.el-select-dropdown__item.is-hovering {
background-color: #2de6ff;
color: white;
}
/* table */
.el-table{
.el-table {
// background-color: transparent;
}
.table_action_box {
@ -84,4 +159,62 @@
.el-table--border::before,
.el-table__inner-wrapper::before {
background-color: transparent !important;
}
}
/* 分页 */
.el-pagination {
.el-pagination__total {
color: white;
}
.el-select {
background-color: transparent; /* 自定义背景色 */
border: none; /* 可选:去掉边框 */
}
.el-select__wrapper {
background-color: transparent;
}
}
/* 按钮 */
.basic-btn {
height: 32px;
width: 76px;
margin: 0;
&.el-button {
margin-left: 0;
}
}
.query-btn {
background: linear-gradient(180deg, #2589ff 0%, #46a9ed 100%);
border: 1px solid #42a5f5;
border-radius: 2px;
color: white;
margin-left: 0;
& .icon {
width: 14px;
height: 14px;
background-image: url("@/assets/common/search_icon.png");
background-size: contain;
background-position: center;
background-repeat: no-repeat;
margin-right: 5px;
}
}
.reset-btn {
background: transparent;
border-radius: 2px;
border: 1px solid #088bd6;
color: white;
box-shadow: none;
& .icon {
width: 14px;
height: 14px;
background-image: url("@/assets/common/reset_icon.png");
background-size: contain;
background-position: center;
background-repeat: no-repeat;
margin-right: 5px;
}
}

@ -1,9 +1,17 @@
/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-03-10 13:45:52
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-03-11 15:29:40
* @FilePath: \5G-Loading-Bay-Web\src\utils\local.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
/**
* get localStorage
* @param { String } key
*/
export function getLocal(key: string) {
if (!key) throw new Error("key is empty");
// if (!key) throw new Error("key is empty");
const value = localStorage.getItem(key);
return value ? JSON.parse(value) : null;
}

@ -1,37 +1,11 @@
.device-status-search-box {
display: flex;
align-items: center;
gap: 12px;
margin: 10px 0;
.query-btn {
background: linear-gradient(180deg, #2589ff 0%, #46a9ed 100%);
border: 1px solid #42a5f5;
border-radius: 2px;
color: white;
padding: 8px 20px;
margin-left: 0;
}
.reset-btn {
background: transparent;
border-radius: 2px;
border: 1px solid #088bd6;
color: white;
box-shadow: none;
margin-left: 0;
}
}
.device-status-content-box{
.el-scrollbar__view {
background: transparent !important;
height: 640px;
height: 600px;
}
.el-table__inner-wrapper{
background-color: #002a5c !important;
background-color: transparent !important;
}
.el-table__body-wrapper, .el-scrollbar__wrap, .el-scrollbar{
background: transparent !important;

@ -1,69 +1,47 @@
<!--
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-03-06 15:15:47
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-03-11 14:46:58
* @FilePath: \vite-ai\data-dashboard\src\views\dashboard\DeviceStatus.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="device-status-header mt-[32px]">
<ContentHeader bgLayout="1855">
<template #title>
<div class="w-[200px] bg_title bg_title_6">
</div>
</template>
</ContentHeader>
</div>
<div class="px-[16px] device-status-content-box">
<div class="device-status-search-box">
<el-select v-model="formData.name" placeholder="设备名称" class="custom-select">
<el-option label="设备A" value="deviceA"></el-option>
<el-option label="设备B" value="deviceB"></el-option>
</el-select>
<el-select v-model="formData.deviceId" placeholder="设备ID" class="custom-select">
<el-option label="ID-001" value="id001"></el-option>
<el-option label="ID-002" value="id002"></el-option>
</el-select>
<el-button type="primary" @click="handleQuery" class="query-btn">
<i class="el-icon-search"></i> 查询
</el-button>
<el-button @click="handleReset" class="reset-btn">
<i class="el-icon-refresh-right"></i> 重置
</el-button>
<div class="bg_basic_content">
<div class="device-status-header mt-[32px]">
<ContentHeader bgLayout="1855">
<template #title>
<div class="w-[200px] bg_title bg_title_6">
</div>
</template>
</ContentHeader>
</div>
<div class="bg-transparent baseTable_wrap" v-loading="dataLoading" :element-loading-svg="svg"
element-loading-svg-view-box="-10, -10, 50, 50">
<template v-if="pagination.total > 0">
<BaseTable class="bg-transparent baseTable_box" :total="pagination.total"
:pageSize="pagination.pageSize" :dataSource="listData" :isFixedPagination="true" :columns="columns"
:page="pagination.currentPage" @change="handleTableChange">
<template v-slot:actionBar="{ row }">
<ul class="flex table_action_box">
<li class="flex items-center mr-[16px]" @click="openCurrent(row)">
<el-button text>
<span :style="{
fontSize: '14px',
color: '#37DBFF'
}">
即时视频
</span>
</el-button>
</li>
<li class="flex items-center" @click="openHistory(row)">
<el-button text>
<span :style="{
fontSize: '14px',
color: '#37DBFF'
}">
历史视频
</span>
</el-button>
</li>
</ul>
</template>
</BaseTable>
</template>
<div class="px-[16px] device-status-content-box">
<div class="mt-[16px] bg-transparent baseTable_wrap full_table" v-loading="dataLoading" :element-loading-svg="svg"
element-loading-svg-view-box="-10, -10, 50, 50">
<template v-if="pagination.total > 0">
<BaseTable class="bg-transparent baseTable_box" :total="pagination.total"
:pageSize="pagination.pageSize" :dataSource="listData" :isFixedPagination="true"
:columns="columns" :page="pagination.currentPage" @change="handleTableChange">
<template v-slot:actionBar="{ row }">
<ul class="flex table_action_box">
<li class="flex items-center mr-[16px]" @click="openCurrent(row)">
<el-button text>
<span :style="{
fontSize: '14px',
color: '#37DBFF'
}">
即时视频
</span>
</el-button>
</li>
<li class="flex items-center" @click="openHistory(row)">
<el-button text>
<span :style="{
fontSize: '14px',
color: '#37DBFF'
}">
历史视频
</span>
</el-button>
</li>
</ul>
</template>
</BaseTable>
</template>
</div>
</div>
</div>
@ -196,10 +174,10 @@ const listData = ref([]);
// const searchValue = ref("");
const formData = reactive({
name: "",
status: ""
});
// const formData = reactive({
// name: "",
// status: ""
// });
const dataLoading = ref(true);
@ -207,7 +185,7 @@ const getList = async () => {
const { currentPage, pageSize } = pagination.value;
const res = await fetch('/api/getDeviceStatusList', {
method: 'POST',
body: JSON.stringify({ ...formData, page: currentPage, pageSize })
body: JSON.stringify({ page: currentPage, pageSize })
})
const { data } = await res.json()
console.log(data, 'getList_data')
@ -219,18 +197,6 @@ const getList = async () => {
};
dataLoading.value = false;
};
//
const handleQuery = () => {
getList()
};
//
const handleReset = () => {
formData.name = '';
formData.deviceId = '';
};
function handleTableChange(record) {
console.log("handleTableChange_record", record);
pagination.value = {

@ -2,6 +2,18 @@
.search-section{
padding: 16px 0;
}
.pole-monitor-search-box {
display: flex;
align-items: center;
gap: 12px;
margin: 16px 0;
}
.right-panel{
.el-scrollbar__view {
background: transparent !important;
height: 600px;
}
}
.pole-monitor-main {
.left-panel {
.main-image {

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-03-06 15:15:01
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-03-11 13:46:36
* @LastEditTime: 2025-03-12 11:43:32
* @FilePath: \vite-ai\data-dashboard\src\views\dashboard\PoleMonitor.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@ -20,30 +20,25 @@
</ContentHeader>
</div>
<!-- 搜索区域 -->
<div class="search-section">
<el-row>
<el-col span="6">
<el-select v-model="searchForm.trainNo" placeholder="列车号">
<el-option label="全部列车" value="all"></el-option>
</el-select>
</el-col>
<el-col span="6">
<el-select v-model="searchForm.carriageNo" placeholder="车厢号">
<el-option label="全部车厢" value="all"></el-option>
</el-select>
</el-col>
<el-col span="6">
<el-select v-model="searchForm.faultType" placeholder="故障类型">
<el-option label="全部类型" value="all"></el-option>
</el-select>
</el-col>
<el-col span="3">
<el-button type="primary" @click="handleSearch"></el-button>
</el-col>
<el-col span="3">
<el-button @click="handleReset"></el-button>
</el-col>
</el-row>
<div class="pole-monitor-search-box">
<el-select v-model="formData.name" placeholder="列车号" class="custom-select">
<el-option label="A" value="deviceA"></el-option>
<el-option label="B" value="deviceB"></el-option>
</el-select>
<el-select v-model="formData.deviceId" placeholder="车厢号" class="custom-select">
<el-option label="ID-001" value="id001"></el-option>
<el-option label="ID-002" value="id002"></el-option>
</el-select>
<el-select v-model="formData.faultType" placeholder="故障类型" class="custom-select">
<el-option label="类型1" value="id001"></el-option>
<el-option label="类型2" value="id002"></el-option>
</el-select>
<el-button type="primary" @click="handleQuery" class="basic-btn query-btn">
<span class="icon"></span> 查询
</el-button>
<el-button @click="handleReset" class="basic-btn reset-btn">
<span class="icon"></span> 重置
</el-button>
</div>
<!-- 主体内容区域 -->
<div class="flex justify-between pole-monitor-main">
@ -59,25 +54,11 @@
<!-- 缩略图区域 -->
<div class="thumbnail-container">
<swiper
ref="swiperRef"
:modules="modules"
:slides-per-view="4"
:space-between="10"
navigation
:scrollbar="{ draggable: false }"
:centered-slides="false"
:observer="true"
:observeParents="true"
@swiper="onSwiper"
@slideChange="onSlideChange"
>
<swiper-slide
v-for="(image, index) in images"
:key="index"
@click="handleSlideClick(index)"
:class="{ 'active-slide': activeIndex === index }"
>
<swiper ref="swiperRef" :modules="modules" :slides-per-view="4" :space-between="10" navigation
:scrollbar="{ draggable: false }" :centered-slides="false" :observer="true"
:observeParents="true" @swiper="onSwiper" @slideChange="onSlideChange">
<swiper-slide v-for="(image, index) in images" :key="index" @click="handleSlideClick(index)"
:class="{ 'active-slide': activeIndex === index }">
<img :src="image" alt="Slide" />
</swiper-slide>
</swiper>
@ -93,16 +74,6 @@
</BaseTable>
</template>
</div>
<!-- <el-table :data="tableData" stripe class="custom-table">
<el-table-column prop="carNo" label="车号" width="80"></el-table-column>
<el-table-column prop="carType" label="车型" width="60"></el-table-column>
<el-table-column prop="carriageNo" label="车厢号" width="80"></el-table-column>
<el-table-column prop="warnType" label="告警类型" width="80"></el-table-column>
<el-table-column prop="faultType" label="故障类型" width="120"></el-table-column>
<el-table-column prop="level" label="等级" width="60"></el-table-column>
<el-table-column prop="review" label="复核" width="60"></el-table-column>
<el-table-column prop="date" label="时间" width="120"></el-table-column>
</el-table> -->
</div>
</div>
</div>
@ -127,25 +98,25 @@ const searchForm = ref({
faultType: 'all'
});
const images = ref([
'https://picsum.photos/300/200?random=1',
'https://picsum.photos/300/200?random=2',
'https://picsum.photos/300/200?random=3',
'https://picsum.photos/300/200?random=4',
'https://picsum.photos/300/200?random=5'
'https://picsum.photos/300/200?random=1',
'https://picsum.photos/300/200?random=2',
'https://picsum.photos/300/200?random=3',
'https://picsum.photos/300/200?random=4',
'https://picsum.photos/300/200?random=5'
]);
const activeIndex = ref(-1);
const handleSlideClick = (index) => {
console.log(index);
activeIndex.value = index;
console.log(index);
activeIndex.value = index;
};
const swiperRef = ref(null);
console.log(swiperRef.value);
const onSwiper = (swiper) => {
swiperRef.value = swiper;
console.log('Swiper 实例已获取:', swiper);
swiperRef.value = swiper;
console.log('Swiper 实例已获取:', swiper);
};
const onSlideChange = () => {
console.log("slide change");
console.log("slide change");
};
const currentRow = ref<Record<string, any>>({});
@ -195,11 +166,11 @@ const pagination = ref({ currentPage: 1, pageSize: 10, total: 0 });
const listData = ref([]);
// const searchValue = ref("");
const formData = reactive({
name: "",
status: ""
status: "",
faultType: "",
});
const dataLoading = ref(true);

@ -1,3 +1,11 @@
<!--
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-03-06 17:57:05
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-03-11 15:40:59
* @FilePath: \5G-Loading-Bay-Web\src\views\login\Login.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE?
-->
<template>
<div class="login-container">
<div class="bg-login-title">
@ -76,9 +84,9 @@ const handleLogin = async () => {
onMounted(() => {
const loginInfoCache = getLocal('userLoginInfo')
if(loginInfoCache) {
form.username = loginInfoCache.username
form.remember = loginInfoCache.remember
form.password = loginInfoCache.password
form.username = loginInfoCache?.username
form.remember = loginInfoCache?.remember
form.password = loginInfoCache?.password
}
})
</script>

Loading…
Cancel
Save