StatusMonitoring.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  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. <TongzhouTrafficMap amapKey="db2da7e3e248c3b2077d53fc809be63f"
  12. securityJsCode="a7413c674852c5eaf01d90813c5b7ef6" />
  13. </template>
  14. <template #left>
  15. <!-- 左侧Tab菜单栏 -->
  16. <div class="left-sidebar-wrap">
  17. <TechTabs v-model="activeLeftTab" type="underline" @tab-click="handleTabClick">
  18. <TechTabPane label="总览" name="overview" class="menu-scroll-view">
  19. <MenuItem theme="tech" v-for="item in menuData" :key="item.id" :node="item" :level="0"
  20. @node-click="handleMenuClick" />
  21. </TechTabPane>
  22. <TechTabPane label="路口" name="crossing" class="menu-scroll-view">
  23. <MenuItem theme="tech" v-for="item in menuData" :key="item.id" :node="item" :level="0"
  24. @node-click="handleMenuClick" />
  25. </TechTabPane>
  26. <TechTabPane label="干线" name="trunkLine" class="menu-scroll-view">
  27. <MenuItem v-for="item in menuData" :key="item.id" :node="item" :level="0"
  28. @node-click="handleMenuClick">
  29. <template #label="{ node }">
  30. <span v-if="node.children && node.children.length > 0">{{ node.label }}</span>
  31. <span v-else>{{ node.label }} 绿波带</span>
  32. </template>
  33. </MenuItem>
  34. </TechTabPane>
  35. <TechTabPane label="特勤" name="specialDuty">
  36. </TechTabPane>
  37. </TechTabs>
  38. </div>
  39. </template>
  40. <template #right>
  41. <!-- 模式切换按钮组 -->
  42. <div class="mode-switch" v-if="activeLeftTab === 'crossing'">
  43. <ButtonGroup v-model="currentView" :options="viewOptions" @select="onViewSelect" />
  44. </div>
  45. </template>
  46. <template #center>
  47. </template>
  48. </DashboardLayout>
  49. </template>
  50. <script>
  51. import DashboardLayout from '@/layouts/DashboardLayout.vue';
  52. import DateTimeWidget from '@/components/ui/DateTimeWidget.vue';
  53. import TechTabs from '@/components/ui/TechTabs.vue';
  54. import TechTabPane from '@/components/ui/TechTabPane.vue';
  55. import TongzhouTrafficMap from '@/components/TongzhouTrafficMap.vue';
  56. import MenuItem from '@/components/ui/MenuItem.vue';
  57. import ButtonGroup from '@/components/ui/ButtonGroup.vue';
  58. import { makeTrafficTimeSpaceData } from '@/mock/data';
  59. import testVideo1 from '@/assets/videos/video1.mp4';
  60. import testVideo2 from '@/assets/videos/video2.mp4';
  61. import testImg1 from '@/assets/test_img1.png';
  62. export default {
  63. name: "HomePage",
  64. components: {
  65. DashboardLayout,
  66. DateTimeWidget,
  67. TechTabs,
  68. TechTabPane,
  69. TongzhouTrafficMap,
  70. MenuItem,
  71. ButtonGroup,
  72. },
  73. data() {
  74. return {
  75. // 左侧边栏数据
  76. activeLeftTab: 'overview',
  77. menuData: [
  78. {
  79. id: 'root-1',
  80. label: '主控中心',
  81. icon: 'el-icon-monitor', // 这里可以替换为你项目用的图标类名,比如 iconfont
  82. children: [
  83. {
  84. id: 'team-1',
  85. label: '北京市交警总队',
  86. children:
  87. [
  88. {
  89. id: 'dist-1',
  90. label: '通州区',
  91. children: [
  92. {
  93. id: 'street-1',
  94. label: '中仓街道',
  95. children: [
  96. { id: 'node-1', label: '新华东街 - 新华南路' },
  97. { id: 'node-2', label: '玉带河东街 - 车站路' },
  98. { id: 'node-3', label: '赵登禹大街 - 新华东街' }
  99. ]
  100. },
  101. {
  102. id: 'street-2',
  103. label: '新华街道',
  104. children: [
  105. { id: 'node-4', label: '新华南北街交叉口' },
  106. { id: 'node-5', label: '通胡大街 - 紫运中路' },
  107. { id: 'node-6', label: '芙蓉东路 - 通胡大街' }
  108. ]
  109. },
  110. {
  111. id: 'street-3',
  112. label: '北苑街道',
  113. children: [
  114. { id: 'node-7', label: '北苑路口' },
  115. { id: 'node-8', label: '新华西街 - 北苑南路' },
  116. { id: 'node-9', label: '新城南街 - 新华西街' }
  117. ]
  118. },
  119. {
  120. id: 'street-4',
  121. label: '玉桥街道',
  122. children: [
  123. { id: 'node-10', label: '玉桥西路 - 玉桥西里中街' },
  124. { id: 'node-11', label: '运河西大街 - 玉桥中路' },
  125. { id: 'node-12', label: '梨园南街 - 运河西大街' }
  126. ]
  127. },
  128. {
  129. id: 'street-5',
  130. label: '杨庄街道',
  131. children: [
  132. { id: 'node-13', label: '怡乐中街 - 九棵树西路' },
  133. { id: 'node-14', label: '翠屏西路 - 怡乐中街' },
  134. { id: 'node-15', label: '杨庄路 - 新华西街' }
  135. ]
  136. },
  137. {
  138. id: 'street-6',
  139. label: '九棵树街道',
  140. children: [
  141. { id: 'node-16', label: '九棵树东路 - 九棵树西路' },
  142. { id: 'node-17', label: '云景东路 - 九棵树东路' },
  143. { id: 'node-18', label: '群芳南街 - 云景东路' }
  144. ]
  145. },
  146. {
  147. id: 'street-7',
  148. label: '临河里街道',
  149. children: [
  150. { id: 'node-19', label: '梨园中街 - 九棵树东路' },
  151. { id: 'node-20', label: '临河里路 - 梨园中街' },
  152. { id: 'node-21', label: '万盛南街 - 临河里路' }
  153. ]
  154. },
  155. {
  156. id: 'street-8',
  157. label: '潞邑街道',
  158. children: [
  159. { id: 'node-22', label: '潞苑北大街 - 潞邑西路' },
  160. { id: 'node-23', label: '潞苑南大街 - 潞邑三路' },
  161. { id: 'node-24', label: '东六环 - 潞苑北大街' }
  162. ]
  163. },
  164. {
  165. id: 'street-9',
  166. label: '通运街道',
  167. children: [
  168. { id: 'node-25', label: '通胡大街 - 东六环' },
  169. { id: 'node-26', label: '运河东大街 - 通胡大街' },
  170. { id: 'node-27', label: '紫运中路 - 运河东大街' }
  171. ]
  172. },
  173. {
  174. id: 'street-10',
  175. label: '潞源街道',
  176. children: [
  177. { id: 'node-28', label: '宋梁路 - 运河东大街' },
  178. { id: 'node-29', label: '东六环 - 运河东大街' },
  179. { id: 'node-30', label: '潞源北街 - 宋梁路' }
  180. ]
  181. },
  182. {
  183. id: 'street-11',
  184. label: '文景街道',
  185. children: [
  186. { id: 'node-31', label: '环球大道 - 九棵树东路' },
  187. { id: 'node-32', label: '颐瑞东路 - 环球大道' },
  188. { id: 'node-33', label: '万盛南街 - 颐瑞东路' }
  189. ]
  190. }
  191. ]
  192. }
  193. ]
  194. }
  195. ]
  196. }
  197. ],
  198. // 地图模式切换数据
  199. currentView: 'map-mode',
  200. viewOptions: [
  201. { label: '列表模式', value: 'list-mode' },
  202. { label: '地图模式', value: 'map-mode' },
  203. ]
  204. };
  205. },
  206. watch: {
  207. // 监听路由参数变化(解决多次从首页点击不同数据跳转过来,页面不刷新的问题)
  208. '$route.query': {
  209. handler() {
  210. this.checkRouteParams();
  211. },
  212. deep: true
  213. }
  214. },
  215. created() {
  216. },
  217. mounted() {
  218. // 组件挂载时检查路由
  219. this.checkRouteParams();
  220. // 初始显示顶部图表(如果没有路由参数覆盖的话)
  221. if (Object.keys(this.$route.query).length === 0) {
  222. this.showTopChartDalogs();
  223. }
  224. },
  225. methods: {
  226. // 模式切换
  227. onViewSelect(item) {
  228. console.log('你点击了:', item.label);
  229. this.currentView = item.value;
  230. this.$refs.layout.clearDialogs(); // 清空全部弹窗
  231. // 列表模式弹窗
  232. if (this.currentView === 'list-mode') {
  233. this.$refs.layout.openDialog({
  234. id: 'crossing-list', // 这里的 ID 可以根据实际业务场景动态生成
  235. title: '',
  236. component: 'CrossingListPanel',
  237. width: 1920,
  238. height: 750,
  239. center: false,
  240. showClose: true,
  241. noPadding: false,
  242. enableDblclickExpand: false,
  243. position: { x: 100, y: 150 },
  244. data: {
  245. onViewDetail: (rowData) => this.handleCrossingViewDetail(rowData)
  246. }
  247. });
  248. } else {
  249. this.showCrossingTopDialogs();
  250. }
  251. },
  252. // 处理tab点击
  253. handleTabClick(tabName) {
  254. console.log('父组件接收到了tab点击事件:', tabName);
  255. this.$refs.layout.clearDialogs(); // 清空全部弹窗
  256. this.showTopChartDalogs(); // 根据当前Tab显示对应的顶部常驻图表
  257. },
  258. // 处理菜单点击
  259. handleMenuClick(nodeData) {
  260. console.log('父组件接收到了最底层路口点击事件:', nodeData);
  261. // 根据Tab来显示不同的弹窗内容
  262. if (this.activeLeftTab === 'overview') { // 总览
  263. this.showOverviewDalogs(nodeData);
  264. } else if (this.activeLeftTab === 'crossing') { // 路口
  265. this.showCrossingDalogs(nodeData);
  266. } else if (this.activeLeftTab === 'trunkLine') { // 干线
  267. this.showTrunkLineDalogs(nodeData);
  268. } else if (this.activeLeftTab === 'specialDuty') { // 特勤
  269. this.showSpecialDutyDalogs(nodeData);
  270. }
  271. },
  272. // 处理弹窗双击展开(通过 onExpand 回调从 Layout 传入)
  273. handleDoubleClickExpend(nodeData) {
  274. console.log('处理弹窗双击事件', nodeData);
  275. if (this.activeLeftTab === 'crossing') {
  276. this.showCrossingDetailDialogs(nodeData);
  277. }
  278. },
  279. // 显示顶部常驻图表(根据当前Tab状态)
  280. showTopChartDalogs() {
  281. if (this.activeLeftTab === 'overview') { // 总览
  282. this.showOverviewTopDialogs();
  283. } else if (this.activeLeftTab === 'crossing') { // 路口
  284. this.showCrossingTopDialogs();
  285. } else if (this.activeLeftTab === 'trunkLine') { // 干线
  286. // TODO: 干线Tab的顶部图表
  287. } else if (this.activeLeftTab === 'specialDuty') { // 特勤
  288. this.openDutyDetailDialog();
  289. }
  290. },
  291. // 显示总览弹窗组
  292. showOverviewDalogs(nodeData) {
  293. console.log('显示总览弹窗组', nodeData.id, nodeData.label);
  294. this.showCrossingDetailDialogs(nodeData);
  295. },
  296. showOverviewTopDialogs() {
  297. this.$refs.layout.openDialog({
  298. id: 'top-chart-overview-1',
  299. title: '',
  300. component: 'OnlineStatusTabs',
  301. width: 300,
  302. height: 160,
  303. center: false,
  304. showClose: false,
  305. draggable: false,
  306. resizable: false,
  307. position: { x: 630, y: 130 },
  308. noPadding: true,
  309. data: {}
  310. });
  311. this.$refs.layout.openDialog({
  312. id: 'top-chart-overview-2',
  313. title: '',
  314. component: 'DeviceStatusTabs',
  315. width: 300,
  316. height: 160,
  317. center: false,
  318. showClose: false,
  319. draggable: false,
  320. resizable: false,
  321. position: { x: 980, y: 130 },
  322. noPadding: true,
  323. data: {}
  324. });
  325. },
  326. // 显示路口弹窗组
  327. showCrossingDalogs(nodeData) {
  328. console.log('显示路口弹窗组', nodeData.id, nodeData.label);
  329. // 路口弹窗
  330. // this.$refs.layout.openDialog({
  331. // id: 'crossing3_' + nodeData.id, // 这里的 ID 可以根据实际业务场景动态生成
  332. // title: nodeData.label,
  333. // component: 'CrossingPanel',
  334. // width: 260,
  335. // height: 260,
  336. // center: false,
  337. // showClose: true,
  338. // position: { x: 950, y: 430 },
  339. // noPadding: false,
  340. // data: {
  341. // ...nodeData,
  342. // onExpand: (data) => this.handleDoubleClickExpend(data)
  343. // },
  344. // onClose: () => {
  345. // this.$refs.layout.handleDialogClose('top-chart-crossing-1');
  346. // this.$refs.layout.handleDialogClose('top-chart-crossing-2');
  347. // }
  348. // });
  349. this.showCrossingDetailDialogs(nodeData);
  350. },
  351. showCrossingDetailDialogs(nodeData) {
  352. console.log('显示干线弹窗组', nodeData.id, nodeData.label);
  353. this.$refs.layout.openDialog({
  354. id: 'crossing_detail' + nodeData.id, // 这里的 ID 可以根据实际业务场景动态生成,例如 'dev-security-route' 代表特勤安保路线弹窗
  355. title: nodeData.label || nodeData.name,
  356. component: 'CrossingDetailPanel',
  357. width: 1315,
  358. height: 682,
  359. center: false,
  360. showClose: true,
  361. position: { x: 500, y: 170 },
  362. noPadding: false,
  363. enableDblclickExpand: false,
  364. data: nodeData
  365. });
  366. },
  367. showCrossingTopDialogs() {
  368. this.$refs.layout.openDialog({
  369. id: 'top-chart-crossing-1',
  370. title: '',
  371. component: 'RingDonutChart',
  372. width: 228,
  373. height: 124,
  374. center: false,
  375. showClose: false,
  376. draggable: false,
  377. resizable: false,
  378. position: { x: 730, y: 130 },
  379. noPadding: true,
  380. data: {
  381. chartData: [
  382. { name: '在线', value: 38, color: '#4DF5F8' },
  383. { name: '离线', value: 3, color: '#FFD369' }
  384. ],
  385. centerTitle: "98%",
  386. centerSubTitle: "38/41"
  387. }
  388. });
  389. this.$refs.layout.openDialog({
  390. id: 'top-chart-crossing-2',
  391. title: '',
  392. component: 'RingDonutChart',
  393. width: 228,
  394. height: 124,
  395. center: false,
  396. showClose: false,
  397. draggable: false,
  398. resizable: false,
  399. position: { x: 980, y: 130 },
  400. noPadding: true,
  401. data: {
  402. chartData: [
  403. { name: '通信', value: 10, color: '#4DF5F8' },
  404. { name: '检测器', value: 8, color: '#FFA033' },
  405. { name: '灯控', value: 15, color: '#FFF587' },
  406. { name: '冲突', value: 5, color: '#FF4D4F' }
  407. ],
  408. centerTitle: "98%",
  409. centerSubTitle: "38/41"
  410. }
  411. });
  412. },
  413. // 路口列表模式下弹窗
  414. handleCrossingViewDetail(rowData) {
  415. console.log('显示路口列表查看', rowData);
  416. this.showCrossingDetailDialogs(rowData);
  417. },
  418. // 显示干线弹窗组
  419. showTrunkLineDalogs(nodeData) {
  420. console.log('显示干线弹窗组', nodeData.id, nodeData.label);
  421. this.$refs.layout.openDialog({
  422. id: nodeData.id, // 这里的 ID 可以根据实际业务场景动态生成,例如 'dev-security-route' 代表特勤安保路线弹窗
  423. title: nodeData.label,
  424. component: 'TrafficTimeSpace',
  425. width: 1000,
  426. height: 500,
  427. center: true,
  428. showClose: true,
  429. // position: { x: 400, y: 450 },
  430. data: makeTrafficTimeSpaceData(),
  431. });
  432. },
  433. // 显示特勤弹窗组
  434. showSpecialDutyDalogs(nodeData) {
  435. console.log('显示干线弹窗组', nodeData.id, nodeData.label);
  436. },
  437. // === 解析路由参数并执行对应操作 ===
  438. checkRouteParams() {
  439. // 统一参数接收:特勤接收 id,路口接收 intersectionName 和 plan
  440. const { tab, action, id, } = this.$route.query;
  441. if (!tab) return; // 如果没有传递 tab 参数,说明是正常访问,不处理
  442. // 1. 处理“特勤线路”跳转
  443. if (tab === 'specialDuty') {
  444. this.activeLeftTab = 'specialDuty'; // 切换到左侧【特勤】Tab
  445. this.handleTabClick('specialDuty'); // 手动触发 Tab 切换事件,更新顶部图表
  446. // 这里判断的条件改为 id
  447. if (action === 'open-dialog' && id) {
  448. this.$nextTick(() => {
  449. this.openDutyDetailDialog(id); // 打开特勤弹窗
  450. });
  451. }
  452. }
  453. // 2. 处理“关键路口”跳转
  454. else if (tab === 'crossing') {
  455. this.activeLeftTab = 'crossing'; // 切换到左侧【路口】Tab
  456. this.handleTabClick('crossing'); // 手动触发 Tab 切换事件,更新顶部图表
  457. if (action === 'open-dialog') {
  458. this.$nextTick(() => {
  459. // 构造一个假的 nodeData 传给详情弹窗方法
  460. this.showCrossingDetailDialogs({
  461. id: 'route_' + new Date().getTime(), // 动态生成一个ID防重复
  462. label: '路口详情',
  463. });
  464. });
  465. }
  466. }
  467. },
  468. // === 特勤详情弹窗 (你需要根据实际组件名替换) ===
  469. async openDutyDetailDialog(dutyId) {
  470. console.log('准备打开特勤线路详情,ID:', dutyId);
  471. // 1. 获取数据
  472. const panelData = await this.fetchSpecialTaskData();
  473. // 2. 呼出弹窗
  474. this.$refs.layout.openDialog({
  475. id: 'special-task-dialog',
  476. title: ' ', // 留空以隐藏默认标题,使用自定义 Header
  477. width: 1400, // 弹窗宽一点,容纳 3 列
  478. height: 700,
  479. center: false,
  480. showClose: false,
  481. noPadding: true, // 去除默认内边距,让内部组件自己控制
  482. position: {x: 200, y: 150},
  483. // 挂载主体组件和数据
  484. component: 'SpecialTaskMonitorPanel',
  485. data: { panelData: panelData },
  486. // 挂载自定义 Header 和数据
  487. headerComponent: 'TaskMonitorHeader',
  488. headerProps: {
  489. taskData: panelData.taskInfo,
  490. onEndTask: () => {
  491. console.log('点击了结束任务');
  492. this.$refs.layout.handleDialogClose('special-task-dialog');
  493. }
  494. }
  495. });
  496. },
  497. // 模拟从后端拉取数据
  498. async fetchSpecialTaskData() {
  499. // 模拟 API 请求延迟
  500. await new Promise(resolve => setTimeout(resolve, 500));
  501. // 这是后端返回的完整数据结构
  502. return {
  503. // 1. 头部任务信息
  504. taskInfo: {
  505. name: '北京路演唱会特勤路线',
  506. time: '12:00-14:00',
  507. manager: '张飞',
  508. level: '一级',
  509. status: '进行中',
  510. statusColor: '#ff4d4f' // 红色状态灯
  511. },
  512. // 2. 视频流列表 (支持有源和无源)
  513. videos: [
  514. { id: 1, url: testVideo1 }, // 有视频
  515. { id: 2, url: testVideo2 }, // 无视频,展示占位
  516. { id: 3, url: testVideo1 },
  517. { id: 4, url: testVideo2 } // 第4个,用于测试轮播翻页
  518. ],
  519. // 3. 路口控制卡片列表
  520. intersections: [
  521. {
  522. id: 'INT_01',
  523. name: '京原路与北宫路交叉口1',
  524. statusColor: '#ffaa00', // 黄色状态灯
  525. stage: 3,
  526. mode: '步进',
  527. timeLeft: 30,
  528. btnText: '立即解锁',
  529. btnType: 'normal',
  530. phases: [
  531. { id: 1, icon: '↑', img: testImg1, active: false },
  532. { id: 2, icon: '↰', img: testImg1, active: false },
  533. { id: 3, icon: '↑', img: testImg1, active: true }, // 当前激活相位
  534. { id: 4, icon: '↰', img: testImg1, active: false }
  535. ],
  536. // 传给你原有的 IntersectionMapVideos 组件的数据
  537. mapData: {
  538. armsConfig: {
  539. N: { lanes: ['L', 'S', 'R'], cameraType: 1 },
  540. S: { lanes: ['L', 'S', 'R'], cameraType: 1 },
  541. E: { lanes: ['L', 'S', 'R'], cameraType: 2 },
  542. W: { lanes: ['L', 'S', 'R'], cameraType: 2 }
  543. },
  544. signals: {
  545. ns: { isGreen: true, time: 30, phaseName: '南北直行' },
  546. ew: { isGreen: false, time: 45, phaseName: '东西直行' }
  547. }
  548. },
  549. videoUrls: {
  550. nw: testVideo1,
  551. ne: testVideo2,
  552. sw: testVideo1,
  553. se: testVideo2
  554. }
  555. },
  556. // 为了演示,这里复制上面的数据作为第2、3、4个路口
  557. ...Array.from({ length: 3 }).map((_, i) => ({
  558. id: `INT_0${i + 2}`,
  559. name: `京原路与北宫路交叉口${i + 2}`,
  560. statusColor: '#00e5ff',
  561. stage: 2, mode: '系统', timeLeft: 15,
  562. btnText: '立即执行', btnType: 'primary',
  563. phases: [
  564. { id: 1, icon: '↑', img: testImg1, active: true },
  565. { id: 2, icon: '↰', img: testImg1, active: false },
  566. { id: 3, icon: '↑', img: testImg1, active: false },
  567. { id: 4, icon: '↰', img: testImg1, active: false }
  568. ],
  569. mapData: {
  570. armsConfig: {
  571. N: { lanes: ['L', 'S', 'R'], cameraType: 1 },
  572. S: { lanes: ['L', 'S', 'R'], cameraType: 1 },
  573. E: { lanes: ['L', 'S', 'R'], cameraType: 2 },
  574. W: { lanes: ['L', 'S', 'R'], cameraType: 2 }
  575. },
  576. signals: {
  577. ns: { isGreen: true, time: 30, phaseName: '南北直行' },
  578. ew: { isGreen: false, time: 45, phaseName: '东西直行' }
  579. }
  580. },
  581. videoUrls: {
  582. nw: testVideo1,
  583. ne: testVideo2,
  584. sw: testVideo2,
  585. se: testVideo1
  586. }
  587. }))
  588. ]
  589. };
  590. },
  591. }
  592. }
  593. </script>
  594. <style scoped>
  595. .mode-switch {
  596. display: flex;
  597. flex-direction: row;
  598. justify-content: flex-end;
  599. }
  600. .mode-switch>div {
  601. width: 200px;
  602. }
  603. </style>