|
|
@@ -18,7 +18,7 @@
|
|
|
<div class="panel-item">
|
|
|
<PanelContainer title="在线状态">
|
|
|
|
|
|
- <TechTabs v-model="onlineStatusActiveTab" type="segmented" @tab-click="handleTabClick">
|
|
|
+ <TechTabs v-model="onlineStatusActiveTab" type="segmented" autoPlay @tab-click="handleTabClick">
|
|
|
<TechTabPane label="信号机" name="signalMachine" style="height: 100%;">
|
|
|
<DynamicDonutChart v-if="onlineStatusDisplayData" :chartData="onlineStatusDisplayData.chartData"
|
|
|
:centerTitle="onlineStatusDisplayData.centerTitle" :centerSubTitle="onlineStatusDisplayData.centerSubTitle" />
|
|
|
@@ -56,6 +56,69 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
+ <template #right>
|
|
|
+ <div class="panel-list">
|
|
|
+ <div class="panel-item">
|
|
|
+ <PanelContainer title="在线状态">
|
|
|
+
|
|
|
+ <TechTabs v-model="onlineStatusActiveTab" type="segmented" autoPlay @tab-click="handleTabClick">
|
|
|
+ <TechTabPane label="信号机" name="signalMachine" style="height: 100%;">
|
|
|
+ <DynamicDonutChart v-if="onlineStatusDisplayData" :chartData="onlineStatusDisplayData.chartData"
|
|
|
+ :centerTitle="onlineStatusDisplayData.centerTitle" :centerSubTitle="onlineStatusDisplayData.centerSubTitle" />
|
|
|
+ </TechTabPane>
|
|
|
+ <TechTabPane label="检测器" name="detector">
|
|
|
+ <DynamicDonutChart v-if="onlineStatusDisplayData" :chartData="onlineStatusDisplayData.chartData"
|
|
|
+ :centerTitle="onlineStatusDisplayData.centerTitle" :centerSubTitle="onlineStatusDisplayData.centerSubTitle" />
|
|
|
+ </TechTabPane>
|
|
|
+ <TechTabPane label="红路灯" name="trafficLight">
|
|
|
+ <DynamicDonutChart v-if="onlineStatusDisplayData" :chartData="onlineStatusDisplayData.chartData"
|
|
|
+ :centerTitle="onlineStatusDisplayData.centerTitle" :centerSubTitle="onlineStatusDisplayData.centerSubTitle" />
|
|
|
+ </TechTabPane>
|
|
|
+ </TechTabs>
|
|
|
+
|
|
|
+ </PanelContainer>
|
|
|
+ </div>
|
|
|
+ <div class="panel-item">
|
|
|
+ <PanelContainer title="勤务执行" class="table-panel">
|
|
|
+ <TechTable :columns="tableColumns" :data="tableData" height="263px">
|
|
|
+
|
|
|
+ <template #level="{ row }">
|
|
|
+ <span :style="{ color: row.level === '二级' ? '#FFDF0C' : 'inherit' }">
|
|
|
+ {{ row.level }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #status="{ row }">
|
|
|
+ <span :style="{ color: row.status === '进行中' ? '#FFDF0C' : 'inherit' }">
|
|
|
+ {{ row.status }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #action="{ row }">
|
|
|
+ <span
|
|
|
+ class="action-btn"
|
|
|
+ @click="handleView(row)"
|
|
|
+ >
|
|
|
+ 查看
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </TechTable>
|
|
|
+ </PanelContainer>
|
|
|
+ </div>
|
|
|
+ <div class="panel-item">
|
|
|
+ <PanelContainer title="关键路口" class="table-panel">
|
|
|
+ <TechTable
|
|
|
+ :columns="keyIntersectionColumns"
|
|
|
+ :data="keyIntersectionData"
|
|
|
+ height="263px"
|
|
|
+ @row-click="onIntersectionRowClick"
|
|
|
+ />
|
|
|
+ </PanelContainer>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
</DashboardLayout>
|
|
|
</template>
|
|
|
|
|
|
@@ -69,6 +132,7 @@ import TechTabs from '@/components/ui/TechTabs.vue';
|
|
|
import TechTabPane from '@/components/ui/TechTabPane.vue';
|
|
|
import TickDonutChart from '@/components/ui/TickDonutChart.vue';
|
|
|
import AlarmMessageList from '@/components/ui/AlarmMessageList.vue';
|
|
|
+import TechTable from '@/components/ui/TechTable.vue';
|
|
|
|
|
|
|
|
|
const mockDeviceData = {
|
|
|
@@ -110,7 +174,8 @@ export default {
|
|
|
TechTabs,
|
|
|
TechTabPane,
|
|
|
TickDonutChart,
|
|
|
- AlarmMessageList
|
|
|
+ AlarmMessageList,
|
|
|
+ TechTable
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -127,6 +192,7 @@ export default {
|
|
|
{ name: '中心控制', value: null,color: '#8b5cf6' }, // 紫色
|
|
|
{ name: '全红控制', value: null,color: '#f43f5e' } // 红色
|
|
|
],
|
|
|
+ // 消息模拟数据
|
|
|
alarmData: [
|
|
|
{
|
|
|
id: '1',
|
|
|
@@ -149,6 +215,35 @@ export default {
|
|
|
time: '16:28:28',
|
|
|
description: '中关村大街-科学院南路口-设备离线'
|
|
|
}
|
|
|
+ ],
|
|
|
+ // 1. 表头
|
|
|
+ tableColumns: [
|
|
|
+ { label: '序号', key: 'id', width: '60px' },
|
|
|
+ { label: '名称', key: 'name' },
|
|
|
+ { label: '执行人', key: 'executor' },
|
|
|
+ { label: '等级', key: 'level' },
|
|
|
+ { label: '状态', key: 'status' },
|
|
|
+ { label: '操作', key: 'action', width: '80px' }
|
|
|
+ ],
|
|
|
+ // 2. 模拟数据源
|
|
|
+ tableData: [
|
|
|
+ { id: 1, name: '测试', executor: '测试', level: '一级', status: '未开始' },
|
|
|
+ { id: 2, name: '张飞', executor: '张飞', level: '一级', status: '未开始' },
|
|
|
+ { id: 3, name: '关将', executor: '关将', level: '二级', status: '进行中' },
|
|
|
+ { id: 4, name: '刘备', executor: '刘备', level: '一级', status: '未开始' },
|
|
|
+ { id: 5, name: '孙权', executor: '孙权', level: '一级', status: '未开始' },
|
|
|
+ ],
|
|
|
+ // 1. 表头
|
|
|
+ keyIntersectionColumns: [
|
|
|
+ { label: '路口', key: 'intersection', align: 'left' }, // 路口名称较长,建议左对齐更好看
|
|
|
+ { label: '运营模式', key: 'mode', width: '120px' },
|
|
|
+ { label: '方案号', key: 'plan', width: '80px' }
|
|
|
+ ],
|
|
|
+ // 2. 模拟数据源 (完美还原截图内容)
|
|
|
+ keyIntersectionData: [
|
|
|
+ { intersection: '实行东街双园路交叉路口', mode: '定周期控制', plan: '4' },
|
|
|
+ { intersection: '实行东街双园路交叉路口', mode: '自适应控制', plan: '1' },
|
|
|
+ { intersection: '实行东街双园路交叉路口', mode: '感应控制', plan: '5' }
|
|
|
]
|
|
|
};
|
|
|
},
|
|
|
@@ -175,6 +270,14 @@ export default {
|
|
|
onAlarmView({ item, index }) {
|
|
|
console.log('点击了查看:', item.title);
|
|
|
// 这里可以触发打开一个弹窗 (调用你之前的 SmartDialog 或者路由跳转)
|
|
|
+ },
|
|
|
+ handleView(row) {
|
|
|
+ console.log('点击了查看,当前行数据:', row);
|
|
|
+ // 这里可以触发弹窗或路由跳转
|
|
|
+ },
|
|
|
+ onIntersectionRowClick({ row, index }) {
|
|
|
+ console.log(`用户点击了第 ${index + 1} 行,路口名称是:`, row.intersection);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -186,6 +289,19 @@ export default {
|
|
|
gap: 16px;
|
|
|
}
|
|
|
.panel-item {
|
|
|
- max-height: 263px;
|
|
|
+ height: 254px;
|
|
|
+}
|
|
|
+.table-panel ::v-deep .panel-content {
|
|
|
+ padding: 0;
|
|
|
+}
|
|
|
+.action-btn {
|
|
|
+ color: #c4d7f0;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: color 0.3s;
|
|
|
+ user-select: none;
|
|
|
+}
|
|
|
+.action-btn:hover {
|
|
|
+ color: #32F6F8;
|
|
|
+ text-decoration: underline;
|
|
|
}
|
|
|
</style>
|