StatusMonitoring.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. <template>
  2. <DashboardLayout ref="layout" layoutClass="special-situation-monitoring">
  3. <template #header-left>
  4. </template>
  5. <template #header-right>
  6. <!-- 日期 -->
  7. <DateTimeWidget />
  8. </template>
  9. <template #map>
  10. <!-- 路口列表 -->
  11. <div v-if="currentView === 'list-mode' && activeLeftTab === 'crossing'" class="list-mode-panel">
  12. <CrossingListPanel :onViewDetail="handleCrossingViewDetail"/>
  13. </div>
  14. <!-- 地图 -->
  15. <TongzhouTrafficMap v-else ref="trafficMapRef"
  16. amapKey="db2da7e3e248c3b2077d53fc809be63f"
  17. securityJsCode="a7413c674852c5eaf01d90813c5b7ef6"
  18. :mode="activeLeftTab === 'crossing' ? '路口' : activeLeftTab === 'trunkLine' ? '干线' : activeLeftTab === 'specialDuty' ? '特勤' : ''"
  19. @map-crossing-click="handleMapCrossingClick"
  20. />
  21. </template>
  22. <template #left>
  23. <!-- 左侧Tab菜单栏 -->
  24. <div class="left-sidebar-wrap" v-if="currentView !== 'list-mode'">
  25. <TechTabs v-model="activeLeftTab" type="underline" @tab-click="handleTabClick">
  26. <TechTabPane label="总览" name="overview" class="menu-scroll-view">
  27. <MenuItem theme="tech" v-for="item in menuData" :key="item.id" :node="item" :level="0"
  28. @node-click="handleMenuClick" @folder-click="handleFolderClick"/>
  29. </TechTabPane>
  30. <TechTabPane label="路口" name="crossing" class="menu-scroll-view">
  31. <MenuItem theme="tech" v-for="item in menuData" :key="item.id" :node="item" :level="0"
  32. @node-click="handleMenuClick" />
  33. </TechTabPane>
  34. <TechTabPane label="干线" name="trunkLine" class="menu-scroll-view">
  35. <MenuItem v-for="item in menuData" :key="item.id" :node="item" :level="0"
  36. @node-click="handleMenuClick">
  37. <template #label="{ node }">
  38. <span v-if="node.children && node.children.length > 0">{{ node.label }}</span>
  39. <span v-else>{{ node.label }} 绿波带</span>
  40. </template>
  41. </MenuItem>
  42. </TechTabPane>
  43. <TechTabPane label="特勤" name="specialDuty" class="menu-scroll-view special-duty-pane">
  44. <TechTable ref="dutyTable" :columns="tableColumns" :data="tableData" class="duty-table">
  45. <template #level="{ row }">
  46. <span :title="row.level" :style="{ color: row.level === '二级' ? '#FFDF0C' : '#F00' }">
  47. {{ row.level }}
  48. </span>
  49. </template>
  50. <template #status="{ row }">
  51. <span :title="row.status" :style="{ color: row.status === '进行中' ? '#FFDF0C' : row.status === '未开始' ? '#fff' : '#8dc453' }">
  52. {{ row.status }}
  53. </span>
  54. </template>
  55. <template #action="{ row }">
  56. <div class="btn-group">
  57. <span class="action-btn" @click="handleSpecialTaskView(row)">查看</span>
  58. <span v-if="row.status === '未开始'" class="action-btn action-start" @click="handleSpecialTaskStart(row)">立即执行</span>
  59. <span v-if="row.status === '进行中'" class="action-btn action-end" @click="handleSpecialTaskEnd(row)">立即结束</span>
  60. </div>
  61. </template>
  62. </TechTable>
  63. </TechTabPane>
  64. </TechTabs>
  65. </div>
  66. </template>
  67. <template #right>
  68. <!-- 模式切换按钮组 -->
  69. <div class="mode-switch" v-if="activeLeftTab === 'crossing'">
  70. <ButtonGroup v-model="currentView" :options="viewOptions" @select="onViewSelect" />
  71. </div>
  72. </template>
  73. <template #center>
  74. <!-- 顶部常驻图表区域(替代弹窗) -->
  75. <div class="top-charts-bar" v-if="currentView !== 'list-mode'">
  76. <!-- 总览Tab -->
  77. <template v-if="activeLeftTab === 'overview'">
  78. <div class="top-chart-box overview-chart-box">
  79. <OnlineStatusTabs />
  80. </div>
  81. <div class="top-chart-box overview-chart-box">
  82. <DeviceStatusTabs />
  83. </div>
  84. </template>
  85. <!-- 路口Tab -->
  86. <template v-if="activeLeftTab === 'crossing'">
  87. <div class="top-chart-box crossing-chart-box">
  88. <RingDonutChart v-if="crossingTopCharts.onlineChart" v-bind="crossingTopCharts.onlineChart" />
  89. </div>
  90. <div class="top-chart-box crossing-chart-box">
  91. <RingDonutChart v-if="crossingTopCharts.faultChart" v-bind="crossingTopCharts.faultChart" />
  92. </div>
  93. </template>
  94. </div>
  95. </template>
  96. </DashboardLayout>
  97. </template>
  98. <script>
  99. import DashboardLayout from '@/layouts/DashboardLayout.vue';
  100. import DateTimeWidget from '@/components/ui/DateTimeWidget.vue';
  101. import TechTabs from '@/components/ui/TechTabs.vue';
  102. import TechTabPane from '@/components/ui/TechTabPane.vue';
  103. import TongzhouTrafficMap from '@/components/TongzhouTrafficMap.vue';
  104. import MenuItem from '@/components/ui/MenuItem.vue';
  105. import ButtonGroup from '@/components/ui/ButtonGroup.vue';
  106. import TechTable from '@/components/ui/TechTable.vue';
  107. import CrossingListPanel from '@/components/ui/CrossingListPanel.vue';
  108. import OnlineStatusTabs from '@/components/ui/OnlineStatusTabs.vue';
  109. import DeviceStatusTabs from '@/components/ui/DeviceStatusTabs.vue';
  110. import RingDonutChart from '@/components/ui/RingDonutChart.vue';
  111. import { apiGetTongzhouMenuTree, apiGetTasks, apiGetTrafficTimeSpace, apiGetCrossingTopCharts, apiGetSpecialTaskMonitorData, apiGetOverviewTopCharts, apiGetCrossingDetailData } from '@/api';
  112. export default {
  113. name: "HomePage",
  114. components: {
  115. DashboardLayout,
  116. DateTimeWidget,
  117. TechTabs,
  118. TechTabPane,
  119. TongzhouTrafficMap,
  120. MenuItem,
  121. ButtonGroup,
  122. TechTable,
  123. CrossingListPanel,
  124. OnlineStatusTabs,
  125. DeviceStatusTabs,
  126. RingDonutChart
  127. },
  128. data() {
  129. return {
  130. // 左侧边栏数据
  131. activeLeftTab: '',
  132. menuData: [],
  133. // 地图模式切换数据
  134. currentView: 'map-mode',
  135. viewOptions: [
  136. { label: '列表模式', value: 'list-mode' },
  137. { label: '地图模式', value: 'map-mode' },
  138. ],
  139. // 特勤表头
  140. tableColumns: [
  141. { label: '序号', key: 'id', width: '10%' },
  142. { label: '名称', key: 'name', width: '30%' },
  143. { label: '执行人', key: 'executor', width: '15%' },
  144. { label: '等级', key: 'level', width: '12%' },
  145. { label: '状态', key: 'status', width: '13%' },
  146. { label: '操作', key: 'action', width: '20%' }
  147. ],
  148. tableData: [],
  149. // 路口顶部图表数据
  150. crossingTopCharts: {},
  151. // 路口多选分屏
  152. crossingSelections: [],
  153. maxCrossingSlots: 4,
  154. };
  155. },
  156. watch: {
  157. // 监听路由参数变化(解决多次从首页点击不同数据跳转过来,页面不刷新的问题)
  158. '$route.query': {
  159. handler() {
  160. this.checkRouteParams();
  161. },
  162. deep: true
  163. }
  164. },
  165. created() {
  166. },
  167. async mounted() {
  168. // 加载菜单和任务数据
  169. const [menuData, taskData] = await Promise.all([
  170. apiGetTongzhouMenuTree(),
  171. apiGetTasks({ pageSize: 5 }),
  172. ]);
  173. this.menuData = menuData || [];
  174. this.tableData = taskData?.list || taskData || [];
  175. // 组件挂载时检查路由
  176. this.checkRouteParams();
  177. // 初始显示顶部图表(如果没有路由参数覆盖的话)
  178. if (Object.keys(this.$route.query).length === 0) {
  179. this.activeLeftTab = 'overview';
  180. this.showTopChartDalogs();
  181. }
  182. },
  183. methods: {
  184. // 处理地图点击事件
  185. handleMapCrossingClick(mapData, lnglat, pixel) {
  186. console.log('父组件接收到了地图路口点击事件:', mapData);
  187. console.log('父组件接收到了地图路口点击事件:', lnglat);
  188. console.log('父组件接收到了地图路口点击事件:', pixel);
  189. // 组装模拟数据
  190. const scale = window.innerWidth / 1920;
  191. let nodeData = {
  192. id: mapData.position[0] + mapData.position[1],
  193. label: mapData.road,
  194. // 反算为设计稿坐标(SmartDialog 内部会再乘 scale)
  195. pixelX: pixel ? Math.round(pixel.x / scale) : 950,
  196. pixelY: pixel ? Math.round(pixel.y / scale) : 430,
  197. }
  198. console.log(nodeData);
  199. if (this.activeLeftTab === 'overview') { // 总览
  200. this.showOverviewDalogs(nodeData);
  201. } else if (this.activeLeftTab === 'crossing') { // 路口
  202. this.showCrossingDalogs(nodeData);
  203. } else if (this.activeLeftTab === 'trunkLine') { // 干线
  204. this.showTrunkLineDalogs(nodeData);
  205. } else if (this.activeLeftTab === 'specialDuty') { // 特勤
  206. this.showSpecialDutyDalogs(nodeData);
  207. }
  208. },
  209. // 模式切换
  210. onViewSelect(item) {
  211. console.log('你点击了:', item.label);
  212. this.currentView = item.value;
  213. this.$refs.layout.clearDialogs(); // 清空全部弹窗
  214. this.crossingSelections = [];
  215. // 列表模式弹窗
  216. if (this.currentView === 'list-mode') {
  217. // this.$refs.layout.openDialog({
  218. // id: 'crossing-list', // 这里的 ID 可以根据实际业务场景动态生成
  219. // title: '',
  220. // component: 'CrossingListPanel',
  221. // width: 1920,
  222. // height: 750,
  223. // center: false,
  224. // showClose: true,
  225. // noPadding: false,
  226. // enableDblclickExpand: false,
  227. // position: { x: 100, y: 150 },
  228. // data: {
  229. // onViewDetail: (rowData) => this.handleCrossingViewDetail(rowData)
  230. // }
  231. // });
  232. } else {
  233. this.loadCrossingTopCharts();
  234. }
  235. },
  236. // 处理tab点击
  237. handleTabClick(tabName) {
  238. console.log('父组件接收到了tab点击事件:', tabName);
  239. this.$refs.layout.clearDialogs(); // 清空全部弹窗
  240. this.crossingSelections = [];
  241. this.showTopChartDalogs(); // 根据当前Tab显示对应的顶部常驻图表
  242. },
  243. // 处理菜单folder标题点击
  244. handleFolderClick(nodeData) {
  245. console.log('父组件接收到了文件夹点击事件:', nodeData);
  246. // 临时逻辑,有真实接口后可以删除
  247. const index = Math.floor(Math.random() * 10);
  248. const position = localStorage.getItem(`pos${index + 1}`).split(',');
  249. // 地图联动
  250. this.$refs.trafficMapRef.focusByLocation([Number(position[0]), Number(position[1])]);
  251. },
  252. // 处理菜单点击
  253. handleMenuClick(nodeData) {
  254. console.log('父组件接收到了最底层路口点击事件:', nodeData);
  255. // 通过地图组件获取像素坐标(如果有经纬度的话)
  256. // if (nodeData.lng && nodeData.lat && this.$refs.trafficMapRef) {
  257. // // 地图联动
  258. // this.$refs.trafficMapRef.focusByLocation([nodeData.lng, nodeData.lat]);
  259. // const pixel = this.$refs.trafficMapRef.lngLatToPixel(nodeData.lng, nodeData.lat);
  260. // if (pixel) {
  261. // const scale = window.innerWidth / 1920;
  262. // nodeData.pixelX = Math.round(pixel.x / scale) + 20;
  263. // nodeData.pixelY = Math.round(pixel.y / scale);
  264. // }
  265. // }
  266. // 根据Tab来显示不同的弹窗内容
  267. if (this.activeLeftTab === 'overview') { // 总览
  268. // 临时逻辑,有真实接口后可以删除
  269. const index = Math.floor(Math.random() * 10);
  270. const position = localStorage.getItem(`pos${index + 1}`).split(',');
  271. // 地图联动
  272. this.$refs.trafficMapRef.focusByLocation([Number(position[0]), Number(position[1])]);
  273. this.showOverviewDalogs(nodeData);
  274. } else if (this.activeLeftTab === 'crossing') { // 路口
  275. this.showCrossingDalogs(nodeData);
  276. } else if (this.activeLeftTab === 'trunkLine') { // 干线
  277. this.showTrunkLineDalogs(nodeData);
  278. } else if (this.activeLeftTab === 'specialDuty') { // 特勤
  279. this.showSpecialDutyDalogs(nodeData);
  280. }
  281. },
  282. // 处理弹窗双击展开(通过 onExpand 回调从 Layout 传入)
  283. handleDoubleClickExpend(nodeData) {
  284. console.log('处理弹窗双击事件', nodeData);
  285. if (this.activeLeftTab === 'crossing' || this.activeLeftTab === 'overview') {
  286. this.showCrossingDetailDialogs(nodeData);
  287. }
  288. },
  289. // 显示顶部常驻图表(根据当前Tab状态)
  290. showTopChartDalogs() {
  291. if (this.activeLeftTab === 'crossing') {
  292. this.loadCrossingTopCharts();
  293. }
  294. },
  295. // 显示总览弹窗组
  296. showOverviewDalogs(nodeData) {
  297. console.log('显示总览弹窗组', nodeData.id, nodeData.label);
  298. // 路口弹窗
  299. this.$refs.layout.openDialog({
  300. id: 'crossing3_' + nodeData.id, // 这里的 ID 可以根据实际业务场景动态生成
  301. title: nodeData.label,
  302. component: 'CrossingPanel',
  303. width: 260,
  304. height: 260,
  305. center: false,
  306. showClose: true,
  307. position: { x: (nodeData.pixelX || 950) + 20, y: nodeData.pixelY || 430 },
  308. noPadding: false,
  309. data: {
  310. ...nodeData,
  311. onExpand: (data) => this.handleDoubleClickExpend(data)
  312. },
  313. onClose: () => {
  314. // this.$refs.layout.handleDialogClose('top-chart-crossing-1');
  315. // this.$refs.layout.handleDialogClose('top-chart-crossing-2');
  316. }
  317. });
  318. },
  319. async loadCrossingTopCharts() {
  320. try {
  321. this.crossingTopCharts = await apiGetCrossingTopCharts();
  322. } catch (e) { /* ignore */ }
  323. },
  324. // 显示路口弹窗组(多选分屏)
  325. showCrossingDalogs(nodeData) {
  326. console.log('路口多选', nodeData.id, nodeData.label);
  327. // 1. 已选中 → 取消选中
  328. const existIndex = this.crossingSelections.findIndex(c => c.id === nodeData.id);
  329. if (existIndex !== -1) {
  330. this.crossingSelections.splice(existIndex, 1);
  331. if (this.crossingSelections.length === 0) {
  332. this.$refs.layout.handleDialogClose('crossing-multi-view');
  333. return;
  334. }
  335. this.openCrossingMultiView();
  336. return;
  337. }
  338. // 2. 已满 → 先进先出
  339. if (this.crossingSelections.length >= this.maxCrossingSlots) {
  340. this.crossingSelections.shift();
  341. }
  342. // 3. 追加选中
  343. this.crossingSelections.push({ ...nodeData });
  344. // 4. 打开或更新弹窗
  345. this.openCrossingMultiView();
  346. },
  347. openCrossingMultiView() {
  348. this.$refs.layout.openDialog({
  349. id: 'crossing-multi-view',
  350. title: '',
  351. component: 'CrossingMultiView',
  352. width: 1400,
  353. height: 700,
  354. center: false,
  355. position: { x: 500, y: 150 },
  356. showClose: false,
  357. noPadding: true,
  358. enableDblclickExpand: false,
  359. draggable: false,
  360. data: {
  361. crossings: [...this.crossingSelections],
  362. maxSlots: this.maxCrossingSlots,
  363. onRemove: (id) => this.handleCrossingRemove(id),
  364. onReorder: (newOrder) => {
  365. this.crossingSelections = newOrder;
  366. }
  367. },
  368. onClose: () => {
  369. this.crossingSelections = [];
  370. }
  371. });
  372. },
  373. handleCrossingRemove(id) {
  374. this.crossingSelections = this.crossingSelections.filter(c => c.id !== id);
  375. if (this.crossingSelections.length === 0) {
  376. this.$refs.layout.handleDialogClose('crossing-multi-view');
  377. } else {
  378. this.openCrossingMultiView();
  379. }
  380. },
  381. // 单个路口详情弹窗(总览双击展开等场景使用)
  382. async showCrossingDetailDialogs(nodeData) {
  383. console.log('显示路口详情弹窗组', nodeData.id, nodeData.label);
  384. const detailData = await apiGetCrossingDetailData(nodeData.id);
  385. const dialogId = 'crossing_detail' + nodeData.id;
  386. this.$refs.layout.openDialog({
  387. id: dialogId,
  388. title: ' ',
  389. component: 'CrossingDetailPanel',
  390. width: 1315,
  391. height: 682,
  392. center: false,
  393. showClose: true,
  394. position: { x: 500, y: 170 },
  395. noPadding: false,
  396. enableDblclickExpand: false,
  397. data: { ...nodeData, preloadedData: detailData },
  398. headerComponent: 'CrossingDetailHeader',
  399. headerProps: {
  400. currentRoute: detailData?.currentRoute || {},
  401. intersectionData: detailData?.intersectionData || {},
  402. cycleLength: detailData?.cycleLength || 0,
  403. }
  404. });
  405. },
  406. // 路口列表模式下弹窗
  407. handleCrossingViewDetail(rowData) {
  408. console.log('显示路口列表查看', rowData);
  409. this.showCrossingDetailDialogs(rowData);
  410. },
  411. // 显示干线弹窗组
  412. async showTrunkLineDalogs(nodeData) {
  413. console.log('显示干线弹窗组', nodeData.id, nodeData.label);
  414. const tsData = await apiGetTrafficTimeSpace();
  415. this.$refs.layout.openDialog({
  416. id: nodeData.id,
  417. title: nodeData.label,
  418. component: 'TrafficTimeSpace',
  419. width: 1000,
  420. height: 500,
  421. center: true,
  422. showClose: true,
  423. data: tsData,
  424. });
  425. },
  426. // 显示特勤弹窗组
  427. showSpecialDutyDalogs(nodeData) {
  428. console.log('显示特勤弹窗组', nodeData.id, nodeData.label);
  429. this.openDutyDetailDialog(nodeData);
  430. },
  431. // === 解析路由参数并执行对应操作 ===
  432. checkRouteParams() {
  433. // 统一参数接收:特勤接收 id,路口接收 intersectionName 和 plan
  434. const { tab, action, id, } = this.$route.query;
  435. if (!tab) return; // 如果没有传递 tab 参数,说明是正常访问,不处理
  436. // 1. 处理“特勤线路”跳转
  437. if (tab === 'specialDuty') {
  438. this.activeLeftTab = 'specialDuty'; // 切换到左侧【特勤】Tab
  439. this.handleTabClick('specialDuty'); // 手动触发 Tab 切换事件,更新顶部图表
  440. // 这里判断的条件改为 id
  441. if (action === 'open-dialog' && id) {
  442. this.$nextTick(() => {
  443. this.openDutyDetailDialog({id: id, label: '特勤路口'}); // 打开特勤弹窗
  444. });
  445. }
  446. }
  447. // 2. 处理“关键路口”跳转
  448. else if (tab === 'crossing') {
  449. this.activeLeftTab = 'crossing'; // 切换到左侧【路口】Tab
  450. this.handleTabClick('crossing'); // 手动触发 Tab 切换事件,更新顶部图表
  451. if (action === 'open-dialog') {
  452. this.$nextTick(() => {
  453. // 构造一个假的 nodeData 传给详情弹窗方法
  454. this.showCrossingDetailDialogs({
  455. id: 'route_' + new Date().getTime(), // 动态生成一个ID防重复
  456. label: '路口详情',
  457. });
  458. });
  459. }
  460. }
  461. },
  462. // === 特勤详情弹窗 (你需要根据实际组件名替换) ===
  463. async openDutyDetailDialog(nodeData) {
  464. console.log('准备打开特勤线路详情:', nodeData);
  465. // 1. 获取数据
  466. const panelData = await apiGetSpecialTaskMonitorData(nodeData.id);
  467. const id = 'special-task-dialog' + new Date().getTime();
  468. // 2. 呼出弹窗
  469. this.$refs.layout.openDialog({
  470. id: id,
  471. title: ' ', // 留空以隐藏默认标题,使用自定义 Header
  472. width: 1400, // 弹窗宽一点,容纳 3 列
  473. height: 700,
  474. center: false,
  475. showClose: true,
  476. noPadding: true, // 去除默认内边距,让内部组件自己控制
  477. position: {x: 200, y: 150},
  478. // 挂载主体组件和数据
  479. component: 'SpecialTaskMonitorPanel',
  480. data: { panelData: panelData },
  481. // 挂载自定义 Header 和数据
  482. headerComponent: 'TaskMonitorHeader',
  483. headerProps: {
  484. taskData: panelData.taskInfo,
  485. onStartTask: () => {
  486. console.log('点击了立即执行');
  487. panelData.taskInfo.status = '进行中';
  488. const tableRow = this.tableData.find(r => r.id === nodeData.id);
  489. if (tableRow) tableRow.status = '进行中';
  490. },
  491. onEndTask: () => {
  492. console.log('点击了立即结束');
  493. panelData.taskInfo.status = '已完成';
  494. const tableRow = this.tableData.find(r => r.id === nodeData.id);
  495. if (tableRow) tableRow.status = '已完成';
  496. }
  497. }
  498. });
  499. },
  500. handleSpecialTaskView(row) {
  501. console.log('查看特勤线路,当前数据:', row);
  502. this.openDutyDetailDialog(row);
  503. },
  504. handleSpecialTaskStart(row) {
  505. console.log('立即执行特勤任务:', row);
  506. row.status = '进行中';
  507. },
  508. handleSpecialTaskEnd(row) {
  509. console.log('立即结束特勤任务:', row);
  510. row.status = '已完成';
  511. },
  512. }
  513. }
  514. </script>
  515. <style scoped>
  516. .mode-switch {
  517. display: flex;
  518. flex-direction: row;
  519. justify-content: flex-end;
  520. }
  521. .mode-switch>div {
  522. width: 200px;
  523. }
  524. .duty-table {
  525. margin-top: 10px;
  526. }
  527. .action-btn {
  528. cursor: pointer;
  529. color: #4da8ff;
  530. margin-right: 10px;
  531. }
  532. .action-btn:hover {
  533. text-decoration: underline;
  534. }
  535. .action-start {
  536. color: #67c23a;
  537. }
  538. .action-end {
  539. color: #f56c6c;
  540. }
  541. .top-charts-bar {
  542. display: flex;
  543. justify-content: center;
  544. gap: clamp(10px, 1.04vw, 20px);
  545. pointer-events: none;
  546. }
  547. .top-chart-box {
  548. pointer-events: auto;
  549. flex-shrink: 0;
  550. background: radial-gradient(circle at 20% 0%, rgba(40,120,200,0.5) 0%, rgba(20,60,130,0.7) 70%);
  551. box-shadow: inset 0px 0px 0.625rem 0px rgba(88, 146, 255, 0.4), inset 1.25rem 0px 1.875rem -0.625rem rgba(88, 146, 255, 0.15);
  552. border: 1px solid rgba(255, 255, 255, 0.15);
  553. border-radius: clamp(6px, 0.625vw, 12px);
  554. overflow: hidden;
  555. }
  556. /* --- 总览Tab图表尺寸适配 (原 300x160) --- */
  557. .overview-chart-box {
  558. /* clamp(最小值, 理想值(1920下比例), 最大值) */
  559. width: clamp(200px, 15.625vw, 300px);
  560. height: clamp(106px, 8.333vw, 160px);
  561. }
  562. /* --- 路口Tab图表尺寸适配 (原 228x124) --- */
  563. .crossing-chart-box {
  564. width: clamp(152px, 11.875vw, 228px);
  565. height: clamp(82px, 6.458vw, 124px);
  566. }
  567. ::v-deep .list-mode-panel {
  568. position: absolute;
  569. inset: 0;
  570. padding: 150px 30px 30px 30px;
  571. box-sizing: border-box;
  572. display: flex;
  573. flex-direction: column;
  574. overflow: hidden;
  575. }
  576. /* 针对特勤 Tab 单独剥离背景和边框 */
  577. ::v-deep .special-duty-pane {
  578. background: transparent !important;
  579. background-color: transparent !important;
  580. background-image: none !important;
  581. border: none !important;
  582. box-shadow: none !important;
  583. outline: none !important;
  584. }
  585. /* 如果你的科技UI边框是利用伪元素(::before / ::after)绘制的,再加上这两句抹除 */
  586. ::v-deep .special-duty-pane::before,
  587. ::v-deep .special-duty-pane::after {
  588. display: none !important;
  589. }
  590. ::v-deep .special-duty-pane .tech-table tbody td {
  591. color: #ffffff;
  592. font-size: clamp(12px, 2.5cqw, 14px);
  593. padding: clamp(8px, 1.5cqw, 10px) clamp(8px, 1.5cqw, 10px);
  594. white-space: normal !important;
  595. overflow: hidden;
  596. text-overflow: ellipsis;
  597. }
  598. ::v-deep .special-duty-pane .tech-table thead th {
  599. background-color: rgba(17, 36, 70, 1);
  600. }
  601. ::v-deep .special-duty-pane .tech-table tbody tr:nth-child(odd) {
  602. background-color: rgba(30, 50, 90, 1);
  603. }
  604. ::v-deep .special-duty-pane .tech-table tbody .table-row {
  605. background-color: rgba(30, 50, 90, 1);
  606. }
  607. ::v-deep .special-duty-pane .tech-table tbody .table-row:hover {
  608. background-color: rgb(75, 112, 185);
  609. }
  610. ::v-deep .special-duty-pane .tech-table .btn-group {
  611. display: flex;
  612. gap: 10px;
  613. flex-direction: column;
  614. }
  615. </style>