|
@@ -11,38 +11,27 @@
|
|
|
|
|
|
|
|
<!-- 地图 -->
|
|
<!-- 地图 -->
|
|
|
<template #map>
|
|
<template #map>
|
|
|
- <TongzhouTrafficMap
|
|
|
|
|
- ref="trafficMapRef"
|
|
|
|
|
- amapKey="db2da7e3e248c3b2077d53fc809be63f"
|
|
|
|
|
- securityJsCode="a7413c674852c5eaf01d90813c5b7ef6"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <TongzhouTrafficMap ref="trafficMapRef" amapKey="db2da7e3e248c3b2077d53fc809be63f"
|
|
|
|
|
+ securityJsCode="a7413c674852c5eaf01d90813c5b7ef6" />
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #left>
|
|
<template #left>
|
|
|
<div class="panel-list">
|
|
<div class="panel-list">
|
|
|
<div class="panel-item">
|
|
<div class="panel-item">
|
|
|
<PanelContainer title="在线状态">
|
|
<PanelContainer title="在线状态">
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<OnlineStatusTabs />
|
|
<OnlineStatusTabs />
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
</PanelContainer>
|
|
</PanelContainer>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="panel-item">
|
|
<div class="panel-item">
|
|
|
<PanelContainer title="控制模式">
|
|
<PanelContainer title="控制模式">
|
|
|
- <TickDonutChart
|
|
|
|
|
- :chartData="controlInfoData"
|
|
|
|
|
- centerTitle="650个"
|
|
|
|
|
- centerSubTitle="控制信息"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <TickDonutChart :chartData="controlInfoData" centerTitle="650个" centerSubTitle="控制信息" />
|
|
|
</PanelContainer>
|
|
</PanelContainer>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="panel-item">
|
|
<div class="panel-item">
|
|
|
<PanelContainer title="故障报警">
|
|
<PanelContainer title="故障报警">
|
|
|
- <AlarmMessageList
|
|
|
|
|
- :listData="alarmData"
|
|
|
|
|
- @ignore="onAlarmIgnore"
|
|
|
|
|
- @view="onAlarmView"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <AlarmMessageList :listData="alarmData" @ignore="onAlarmIgnore" @view="onAlarmView" />
|
|
|
</PanelContainer>
|
|
</PanelContainer>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -52,54 +41,56 @@
|
|
|
<div class="panel-list">
|
|
<div class="panel-list">
|
|
|
<div class="panel-item">
|
|
<div class="panel-item">
|
|
|
<PanelContainer title="设备状态">
|
|
<PanelContainer title="设备状态">
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<DeviceStatusTabs />
|
|
<DeviceStatusTabs />
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
</PanelContainer>
|
|
</PanelContainer>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="panel-item">
|
|
<div class="panel-item">
|
|
|
<PanelContainer title="勤务执行" class="table-panel">
|
|
<PanelContainer title="勤务执行" class="table-panel">
|
|
|
- <TechTable :columns="tableColumns" :data="tableData" height="263px" @mouseenter.native="pauseDutyScroll" @mouseleave.native="resumeDutyScroll">
|
|
|
|
|
-
|
|
|
|
|
- <template #level="{ row }">
|
|
|
|
|
- <span :title="row.level" :style="{ color: row.level === '二级' ? '#FFDF0C' : '#F00' }">
|
|
|
|
|
- {{ row.level }}
|
|
|
|
|
- </span>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
|
|
|
- <template #status="{ row }">
|
|
|
|
|
- <span :title="row.status" :style="{ color: row.status === '进行中' ? '#FFDF0C' : '#F00' }">
|
|
|
|
|
- {{ row.status }}
|
|
|
|
|
- </span>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <SeamlessScroll :data="tableData" :limit="4">
|
|
|
|
|
+
|
|
|
|
|
+ <template #default="{ list }">
|
|
|
|
|
+
|
|
|
|
|
+ <TechTable ref="dutyTable" :columns="tableColumns" :data="list" >
|
|
|
|
|
+
|
|
|
|
|
+ <template #level="{ row }">
|
|
|
|
|
+ <span :title="row.level" :style="{ color: row.level === '二级' ? '#FFDF0C' : '#F00' }">
|
|
|
|
|
+ {{ row.level }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <template #status="{ row }">
|
|
|
|
|
+ <span :title="row.status" :style="{ color: row.status === '进行中' ? '#FFDF0C' : '#F00' }">
|
|
|
|
|
+ {{ row.status }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <template #action="{ row }">
|
|
|
|
|
+ <span class="action-btn" @click="handleView(row)">
|
|
|
|
|
+ 查看
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ </TechTable>
|
|
|
|
|
|
|
|
- <template #action="{ row }">
|
|
|
|
|
- <span
|
|
|
|
|
- class="action-btn"
|
|
|
|
|
- @click="handleView(row)"
|
|
|
|
|
- >
|
|
|
|
|
- 查看
|
|
|
|
|
- </span>
|
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- </TechTable>
|
|
|
|
|
|
|
+ </SeamlessScroll>
|
|
|
</PanelContainer>
|
|
</PanelContainer>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="panel-item">
|
|
<div class="panel-item">
|
|
|
<PanelContainer title="关键路口" class="table-panel">
|
|
<PanelContainer title="关键路口" class="table-panel">
|
|
|
- <TechTable
|
|
|
|
|
- :columns="keyIntersectionColumns"
|
|
|
|
|
- :data="keyIntersectionData"
|
|
|
|
|
- height="263px"
|
|
|
|
|
- @row-click="onIntersectionRowClick"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <TechTable :columns="keyIntersectionColumns" :data="keyIntersectionData" height="263px"
|
|
|
|
|
+ @row-click="onIntersectionRowClick" />
|
|
|
</PanelContainer>
|
|
</PanelContainer>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #center>
|
|
<template #center>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
</DashboardLayout>
|
|
</DashboardLayout>
|
|
@@ -116,6 +107,7 @@ import TechTable from '@/components/ui/TechTable.vue';
|
|
|
import TongzhouTrafficMap from '@/components/TongzhouTrafficMap.vue';
|
|
import TongzhouTrafficMap from '@/components/TongzhouTrafficMap.vue';
|
|
|
import OnlineStatusTabs from '@/components/ui/OnlineStatusTabs.vue';
|
|
import OnlineStatusTabs from '@/components/ui/OnlineStatusTabs.vue';
|
|
|
import DeviceStatusTabs from '@/components/ui/DeviceStatusTabs.vue';
|
|
import DeviceStatusTabs from '@/components/ui/DeviceStatusTabs.vue';
|
|
|
|
|
+import SeamlessScroll from '@/components/ui/SeamlessScroll.vue';
|
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -130,19 +122,23 @@ export default {
|
|
|
TechTable,
|
|
TechTable,
|
|
|
TongzhouTrafficMap,
|
|
TongzhouTrafficMap,
|
|
|
OnlineStatusTabs,
|
|
OnlineStatusTabs,
|
|
|
- DeviceStatusTabs
|
|
|
|
|
|
|
+ DeviceStatusTabs,
|
|
|
|
|
+ SeamlessScroll
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
dutyScrollTimer: null,
|
|
dutyScrollTimer: null,
|
|
|
|
|
+ currentScrollTop: 0, // 记录当前的精确滚动像素
|
|
|
|
|
+ isDataDoubled: false, // 记录数据是否已经克隆翻倍
|
|
|
|
|
+ scrollContainer: null, // 存放表格内部滚动容器的 DOM
|
|
|
// 在线状态面板
|
|
// 在线状态面板
|
|
|
controlInfoData: [
|
|
controlInfoData: [
|
|
|
{ name: '定周期控制', value: 400, color: '#33a3ff' }, // 蓝色
|
|
{ name: '定周期控制', value: 400, color: '#33a3ff' }, // 蓝色
|
|
|
- { name: '感应控制', value: 50, color: '#e6734d' }, // 橙色
|
|
|
|
|
- { name: '干线协调', value: 200, color: '#10b981' }, // 绿色
|
|
|
|
|
- { name: '黄闪控制', value: 6, color: '#eab308' }, // 黄色
|
|
|
|
|
|
|
+ { name: '感应控制', value: 50, color: '#e6734d' }, // 橙色
|
|
|
|
|
+ { name: '干线协调', value: 200, color: '#10b981' }, // 绿色
|
|
|
|
|
+ { name: '黄闪控制', value: 6, color: '#eab308' }, // 黄色
|
|
|
// { name: '关灯控制', value: null,color: '#64748b' }, // 灰色 (没有值传入null即可隐藏数字)
|
|
// { name: '关灯控制', value: null,color: '#64748b' }, // 灰色 (没有值传入null即可隐藏数字)
|
|
|
- { name: '自适应控制', value: 10, color: '#2dd4bf' }, // 青色
|
|
|
|
|
|
|
+ { name: '自适应控制', value: 10, color: '#2dd4bf' }, // 青色
|
|
|
// { name: '中心控制', value: null,color: '#8b5cf6' }, // 紫色
|
|
// { name: '中心控制', value: null,color: '#8b5cf6' }, // 紫色
|
|
|
// { name: '全红控制', value: null,color: '#f43f5e' } // 红色
|
|
// { name: '全红控制', value: null,color: '#f43f5e' } // 红色
|
|
|
],
|
|
],
|
|
@@ -206,19 +202,17 @@ export default {
|
|
|
// 搜索数据
|
|
// 搜索数据
|
|
|
currentMapSearch: 'all',
|
|
currentMapSearch: 'all',
|
|
|
mapSearchOptions: [
|
|
mapSearchOptions: [
|
|
|
- {label: '全部', value: 'all' },
|
|
|
|
|
- {label: '选项2', value: '1' },
|
|
|
|
|
- {label: '选项3', value: '2' },
|
|
|
|
|
|
|
+ { label: '全部', value: 'all' },
|
|
|
|
|
+ { label: '选项2', value: '1' },
|
|
|
|
|
+ { label: '选项3', value: '2' },
|
|
|
]
|
|
]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- // 组件挂载时启动自动滚动
|
|
|
|
|
- this.startDutyScroll();
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|
|
|
- // 离开页面时务必销毁定时器,防止内存泄漏
|
|
|
|
|
- this.pauseDutyScroll();
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
// 处理忽略逻辑
|
|
// 处理忽略逻辑
|
|
@@ -232,14 +226,14 @@ export default {
|
|
|
console.log('点击了查看:', item);
|
|
console.log('点击了查看:', item);
|
|
|
// 临时逻辑,有真实接口后可以删除
|
|
// 临时逻辑,有真实接口后可以删除
|
|
|
const position = localStorage.getItem(`pos${index + 1}`).split(',');
|
|
const position = localStorage.getItem(`pos${index + 1}`).split(',');
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 地图联动
|
|
// 地图联动
|
|
|
this.$refs.trafficMapRef.focusByLocation([Number(position[0]), Number(position[1])]);
|
|
this.$refs.trafficMapRef.focusByLocation([Number(position[0]), Number(position[1])]);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
onIntersectionRowClick({ row, index }) {
|
|
onIntersectionRowClick({ row, index }) {
|
|
|
console.log(`准备跳转查看关键路口详情,当前路口:`, row.id, row.intersection);
|
|
console.log(`准备跳转查看关键路口详情,当前路口:`, row.id, row.intersection);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 使用 Vue Router 跳转,将信息通过 URL 参数 (query) 带过去
|
|
// 使用 Vue Router 跳转,将信息通过 URL 参数 (query) 带过去
|
|
|
// 注意:这里的 path 请替换为你项目中“状态监控”页面的真实路由路径
|
|
// 注意:这里的 path 请替换为你项目中“状态监控”页面的真实路由路径
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
@@ -255,32 +249,10 @@ export default {
|
|
|
handleSearch() {
|
|
handleSearch() {
|
|
|
console.log('搜索', this.currentMapSearch);
|
|
console.log('搜索', this.currentMapSearch);
|
|
|
},
|
|
},
|
|
|
- // 勤务执行自动轮播逻辑
|
|
|
|
|
- startDutyScroll() {
|
|
|
|
|
- // 如果数据较少不需要滚动
|
|
|
|
|
- if (this.tableData.length <= 4) return;
|
|
|
|
|
- this.pauseDutyScroll(); // 开启前先清除旧的,防止防抖问题
|
|
|
|
|
- this.dutyScrollTimer = setInterval(() => {
|
|
|
|
|
- // 将第一条数据切下来,放到数组最后,实现无限循环
|
|
|
|
|
- if (this.tableData.length > 0) {
|
|
|
|
|
- const firstItem = this.tableData.shift();
|
|
|
|
|
- this.tableData.push(firstItem);
|
|
|
|
|
- }
|
|
|
|
|
- }, 2500); // 每 2.5 秒滚动一次,时间可根据需要调整
|
|
|
|
|
- },
|
|
|
|
|
- pauseDutyScroll() {
|
|
|
|
|
- if (this.dutyScrollTimer) {
|
|
|
|
|
- clearInterval(this.dutyScrollTimer);
|
|
|
|
|
- this.dutyScrollTimer = null;
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- resumeDutyScroll() {
|
|
|
|
|
- this.startDutyScroll();
|
|
|
|
|
- },
|
|
|
|
|
// 跳转逻辑修改
|
|
// 跳转逻辑修改
|
|
|
handleView(row) {
|
|
handleView(row) {
|
|
|
console.log('准备跳转查看特勤线路,当前数据:', row);
|
|
console.log('准备跳转查看特勤线路,当前数据:', row);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 使用 Vue Router 跳转,将信息通过 URL 参数 (query) 带过去
|
|
// 使用 Vue Router 跳转,将信息通过 URL 参数 (query) 带过去
|
|
|
// 注意:这里的 path 请替换为你项目中“状态监控”页面的真实路由路径
|
|
// 注意:这里的 path 请替换为你项目中“状态监控”页面的真实路由路径
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
@@ -301,27 +273,33 @@ export default {
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
gap: 16px;
|
|
gap: 16px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.panel-item {
|
|
.panel-item {
|
|
|
height: 254px;
|
|
height: 254px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.table-panel ::v-deep .panel-content {
|
|
.table-panel ::v-deep .panel-content {
|
|
|
padding: 0;
|
|
padding: 0;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.action-btn {
|
|
.action-btn {
|
|
|
color: #c4d7f0;
|
|
color: #c4d7f0;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
transition: color 0.3s;
|
|
transition: color 0.3s;
|
|
|
user-select: none;
|
|
user-select: none;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.action-btn:hover {
|
|
.action-btn:hover {
|
|
|
color: #32F6F8;
|
|
color: #32F6F8;
|
|
|
text-decoration: underline;
|
|
text-decoration: underline;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.map-legend-pos {
|
|
.map-legend-pos {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
bottom: 100px;
|
|
bottom: 100px;
|
|
|
right: 0;
|
|
right: 0;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.top-search-pos {
|
|
.top-search-pos {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
top: 0;
|
|
top: 0;
|
|
@@ -330,4 +308,9 @@ export default {
|
|
|
flex-direction: row;
|
|
flex-direction: row;
|
|
|
column-gap: 9px;
|
|
column-gap: 9px;
|
|
|
}
|
|
}
|
|
|
|
|
+.table-panel ::v-deep .tech-table-wrapper {
|
|
|
|
|
+ height: auto !important;
|
|
|
|
|
+ max-height: none !important;
|
|
|
|
|
+ overflow: visible !important;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|