Menu.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955
  1. <template>
  2. <div class="menu">
  3. <ul class="menu-list">
  4. <li class="menu-item"
  5. v-for="(menu, index) of currentMenu"
  6. :key="menu"
  7. @click="click(index)"
  8. :class="{ active: activeIndex == index }"
  9. @mouseenter="subMenuShow(menu.children, index)">
  10. <router-link :to="menu.path">
  11. <el-tooltip class="item"
  12. effect="dark"
  13. :content="menu.text"
  14. placement="bottom"
  15. :show-after="500">
  16. <div class="menu-icon svg-icon"
  17. :class="activeIndex == index ? 'svg-icon-green' : 'svg-icon-gray'">
  18. <SvgIcon :svgid="menu.icon"></SvgIcon>
  19. </div>
  20. </el-tooltip>
  21. </router-link>
  22. <!-- <div v-if="menu.children" class="sub-menu-item">
  23. <div class="menu-icon svg-icon" :class="activeIndex == index ? 'svg-icon-green' : 'svg-icon-gray'">
  24. <SvgIcon :svgid="menu.icon"></SvgIcon>
  25. </div>
  26. </div> -->
  27. </li>
  28. </ul>
  29. </div>
  30. <div class="sub-menu"
  31. v-show="isShowSubMenu"
  32. @mouseleave="subMenuHide">
  33. <ul class="menu-list">
  34. <li class="menu-item"
  35. v-for="(menu, index) of subMenu"
  36. @click="subclick(index)"
  37. :key="menu"
  38. :class="{ active: subIndex == index }">
  39. <router-link :to="menu.path">
  40. <div class="menu-icon svg-icon">
  41. <SvgIcon :svgid="menu.icon"></SvgIcon>
  42. </div>
  43. <div class="sub-menu-text"
  44. :class="subIndex == index ? 'green' : 'gray'">{{ menu.text }}</div>
  45. </router-link>
  46. </li>
  47. </ul>
  48. </div>
  49. </template>
  50. <script>
  51. import SvgIcon from '@com/coms/icon/svg-icon.vue'
  52. export default {
  53. components: {
  54. SvgIcon
  55. },
  56. props: {},
  57. data() {
  58. return {
  59. currRoot: 'monitor',
  60. menuData: [
  61. {
  62. id: 'monitor',
  63. text: '驾驶舱',
  64. data: [
  65. {
  66. text: '驾驶舱',
  67. icon: 'svg-lead-cockpit',
  68. path: '/monitor/home'
  69. },
  70. {
  71. text: '基础矩阵',
  72. icon: 'svg-matrix',
  73. path: '/monitor/lightmatrix1'
  74. },
  75. {
  76. text: '明细矩阵',
  77. icon: 'svg-mx-matrix',
  78. path: '/monitor/lightmatrix3'
  79. },
  80. {
  81. text: '欠发矩阵',
  82. icon: 'svg-qf-matrix',
  83. path: '/monitor/lightmatrix2'
  84. },
  85. {
  86. text: '光伏矩阵',
  87. icon: 'svg-gf-matrix',
  88. path: '/monitor/lightmatrix'
  89. },
  90. {
  91. text: '状态监视',
  92. icon: 'svg-state-watch',
  93. path: '/monitor/status'
  94. },
  95. {
  96. text: 'Agc',
  97. icon: 'svg-agc',
  98. path: '/monitor/agc'
  99. },
  100. {
  101. text: '风场',
  102. icon: 'svg-wind-site',
  103. path: '/monitor/windsite/home/MHS_FDC'
  104. }
  105. ]
  106. }
  107. ,
  108. {
  109. id: 'decision',
  110. text: '经济运行',
  111. data: [
  112. {
  113. text: '经济运行首页',
  114. icon: 'svg-wind-site',
  115. // path: '/monitor/sandtable'
  116. path: '/decision/pb'
  117. },
  118. {
  119. text: '对标管理',
  120. icon: 'svg-matrix',
  121. path: '/decision/decision1',
  122. children: [
  123. {
  124. text: '风机绩效榜',
  125. icon: 'svg-wind-site',
  126. path: '/decision/decision1'
  127. },
  128. {
  129. text: '五项损失率',
  130. icon: 'svg-wind-site',
  131. path: '/decision/decision2'
  132. },
  133. {
  134. text: '场内对标',
  135. icon: 'svg-wind-site',
  136. path: '/decision/decision2Cndb'
  137. },
  138. {
  139. text: '场际对标',
  140. icon: 'svg-wind-site',
  141. path: '/decision/decision2Cjdb'
  142. },
  143. {
  144. text: '项目对标',
  145. icon: 'svg-wind-site',
  146. path: '/decision/decision2Xmdb'
  147. },
  148. {
  149. text: '线路对标',
  150. icon: 'svg-wind-site',
  151. path: '/decision/decision2Xldb'
  152. },
  153. {
  154. text: '性能对标',
  155. icon: 'svg-wind-site',
  156. path: '/decision/decision3'
  157. },
  158. {
  159. text: '值际对标',
  160. icon: 'svg-wind-site',
  161. path: '/decision/decision4'
  162. },
  163. {
  164. text: '单机横向对比',
  165. icon: 'svg-matrix',
  166. path: '/decision/decision3db'
  167. },
  168. {
  169. text: '操作指令统计',
  170. icon: 'svg-matrix',
  171. path: '/decision/decision4czzl'
  172. }
  173. ]
  174. }, // 三率管理
  175. {
  176. text: '三率管理',
  177. icon: 'svg-matrix',
  178. path: '/fwjsl',
  179. children: [
  180. {
  181. text: '复位及时率',
  182. icon: 'svg-wind-site',
  183. path: '/fwjsl'
  184. },
  185. {
  186. text: '状态转换率',
  187. icon: 'svg-wind-site',
  188. path: '/ztzhl'
  189. },
  190. {
  191. text: '消缺及时率',
  192. icon: 'svg-wind-site',
  193. path: '/xqjsl'
  194. }
  195. ]
  196. } ,
  197. {
  198. text: "排行榜",
  199. icon: "svg-matrix",
  200. path: "/phb",
  201. children: [
  202. {
  203. text: "发电效率排行",
  204. icon: "svg-wind-site",
  205. path: "/powerRank",
  206. },
  207. {
  208. text: "总发电效率排行",
  209. icon: "svg-wind-site",
  210. path: "/totalPowerRank",
  211. },
  212. {
  213. text: "报警排行",
  214. icon: "svg-wind-site",
  215. path: "/warningRank",
  216. },
  217. ],
  218. },
  219. {
  220. text: '专题分析',
  221. icon: 'svg-wind-site',
  222. path: '/new/ztfx',
  223. children: [
  224. {
  225. text: '综合分析',
  226. icon: 'svg-wind-site',
  227. path: '/new/ztfx'
  228. },
  229. {
  230. text: '风能利用率',
  231. icon: 'svg-wind-site',
  232. path: '/new/fnlyl'
  233. },
  234. {
  235. text: '维护损失率',
  236. icon: 'svg-wind-site',
  237. path: '/new/whssl'
  238. },
  239. {
  240. text: '故障损失率',
  241. icon: 'svg-wind-site',
  242. path: '/new/gzssl'
  243. },
  244. {
  245. text: '限电损失率',
  246. icon: 'svg-wind-site',
  247. path: '/new/xdssl'
  248. },
  249. {
  250. text: '性能损失率',
  251. icon: 'svg-wind-site',
  252. path: '/new/xnssl'
  253. },
  254. {
  255. text: '受累损失率',
  256. icon: 'svg-wind-site',
  257. path: '/new/slssl'
  258. },
  259. {
  260. text: 'MTBF分析',
  261. icon: 'svg-wind-site',
  262. path: '/new/mtbf'
  263. },
  264. {
  265. text: 'MTTR分析',
  266. icon: 'svg-wind-site',
  267. path: '/new/mttr'
  268. },
  269. {
  270. text: '复位分析',
  271. icon: 'svg-wind-site',
  272. path: '/new/zfwjsl'
  273. },
  274. {
  275. text: '状态分析',
  276. icon: 'svg-wind-site',
  277. path: '/new/zztzhl'
  278. },
  279. {
  280. text: '消缺及时率',
  281. icon: 'svg-wind-site',
  282. path: '/new/zxqjsl'
  283. },
  284. {
  285. text: '发电量分析',
  286. icon: 'svg-wind-site',
  287. path: '/new/zfdl'
  288. },
  289. {
  290. text: '综合场用电量',
  291. icon: 'svg-wind-site',
  292. path: '/new/zzhcydl'
  293. }
  294. ]
  295. } ,
  296. {
  297. text: "风机分析",
  298. icon: "svg-matrix",
  299. path: "/fjfx",
  300. children: [
  301. {
  302. text: '单机性能分析',
  303. icon: 'svg-wind-site',
  304. path: '/performanceAnalysis'
  305. },
  306. {
  307. text: '单机月度分析',
  308. icon: 'svg-wind-site',
  309. path: '/singleAnalysis'
  310. },
  311. ],
  312. },
  313. {
  314. text: '气象分析',
  315. icon: 'svg-wind-site',
  316. path: '/new/fs'
  317. },
  318. {
  319. text: '电量预测',
  320. icon: 'svg-wind-site',
  321. path: '/nhycfsdl',
  322. children: [
  323. {
  324. text: '预测拟合风速电量',
  325. icon: 'svg-wind-site',
  326. path: '/nhycfsdl'
  327. },
  328. {
  329. text: '修正预测风速电量',
  330. icon: 'svg-wind-site',
  331. path: '/xzycfsdl'
  332. }
  333. ]
  334. }
  335. // {
  336. // text: "单机分析",
  337. // icon: "svg-wind-site",
  338. // path: "/fgzyfx",
  339. // children: [
  340. // {
  341. // text: "单机分析详细",
  342. // icon: "svg-wind-site",
  343. // path: "/new/dj1",
  344. // },
  345. // {
  346. // text: "电量预测",
  347. // icon: "svg-wind-site",
  348. // path: "/new/pf1",
  349. // },
  350. // {
  351. // text: "气象预测",
  352. // icon: "svg-wind-site",
  353. // path: "/new/fs",
  354. // }
  355. // ]
  356. // }
  357. ]
  358. },
  359. {
  360. id: 'health',
  361. text: '智慧检修',
  362. data: [
  363. {
  364. text: '沙盘',
  365. icon: 'svg-wind-site',
  366. // path: '/monitor/sandtable'
  367. path: '/health/sandtable'
  368. },
  369. {
  370. text: '等级评估',
  371. icon: 'svg-wind-site',
  372. path: '/assess/index'
  373. },
  374. {
  375. text: '故障诊断',
  376. icon: 'svg-wind-site',
  377. path: '/malfunctionDiagnose',
  378. children: [
  379. {
  380. text: '故障诊断',
  381. icon: 'svg-wind-site',
  382. path: '/malfunctionDiagnose'
  383. },
  384. {
  385. text: '故障回溯',
  386. icon: 'svg-wind-site',
  387. path: '/malfunctionRecall'
  388. },
  389. ]
  390. },
  391. {
  392. text: '健康管理',
  393. icon: 'svg-wind-site',
  394. path: '/health',
  395. children: [
  396. {
  397. text: '健康推荐',
  398. icon: 'svg-wind-site',
  399. path: '/health'
  400. },
  401. {
  402. text: '健康首页',
  403. icon: 'svg-wind-site',
  404. path: '/health/health2'
  405. },
  406. {
  407. text: '健康总览',
  408. icon: 'svg-wind-site',
  409. path: '/health/health6'
  410. },
  411. {
  412. text: '健康矩阵',
  413. icon: 'svg-wind-site',
  414. path: '/health/health5'
  415. },
  416. // {
  417. // text: "健康列表",
  418. // icon: "svg-wind-site",
  419. // path: "/health/health6",
  420. // },
  421. {
  422. text: '健康列表',
  423. icon: 'svg-wind-site',
  424. path: '/health/health8'
  425. }
  426. ]
  427. },
  428. {
  429. text: '全生命周期',
  430. icon: 'svg-wind-site',
  431. path: '/allLifeManage'
  432. }, {
  433. text: '能效分析',
  434. icon: 'svg-wind-site',
  435. path: '/powerCurve',
  436. children: [
  437. {
  438. text: '功率曲线拟合',
  439. icon: 'svg-wind-site',
  440. path: '/powerCurve'
  441. },
  442. {
  443. text: '偏航对风分析',
  444. icon: 'svg-wind-site',
  445. path: '/phdffx'
  446. },
  447. {
  448. text: '切入切出分析',
  449. icon: 'svg-wind-site',
  450. path: '/cutAnalyse'
  451. },
  452. {
  453. text: '曲线偏差率分析',
  454. icon: 'svg-wind-site',
  455. path: '/qxpclfx'
  456. },
  457. {
  458. text: '单机饱和度',
  459. icon: 'svg-wind-site',
  460. path: '/wtSaturability'
  461. }
  462. ]
  463. },
  464. {
  465. text: '可靠性分析',
  466. icon: 'svg-wind-site',
  467. path: '/new/alarmcenter1',
  468. children: [
  469. {
  470. text: '预警分析',
  471. icon: 'svg-wind-site',
  472. path: '/new/alarmcenter1'
  473. },
  474. {
  475. text: '故障分析',
  476. icon: 'svg-wind-site',
  477. path: '/new/alarmcenter2'
  478. },
  479. {
  480. text: '预警评判分析',
  481. icon: 'svg-wind-site',
  482. path: '/warnStatistics'
  483. },
  484. {
  485. text: '故障评判分析',
  486. icon: 'svg-wind-site',
  487. path: '/malfunctionStatistics'
  488. },
  489. {
  490. text: '部件评判分析',
  491. icon: 'svg-wind-site',
  492. path: '/bjgltjb'
  493. },
  494. ]
  495. },
  496. {
  497. text: '风光资源分析',
  498. icon: 'svg-wind-site',
  499. path: '/windAnalysis',
  500. children: [
  501. {
  502. text: '风资源散点',
  503. icon: 'svg-wind-site',
  504. path: '/windAnalysis'
  505. },
  506. {
  507. text: '风资源风向',
  508. icon: 'svg-wind-site',
  509. path: '/windAnalysis/fx'
  510. }
  511. ]
  512. },
  513. ]
  514. },
  515. {
  516. id: 'personnel',
  517. text: '安全管控',
  518. data: [
  519. {
  520. text: '安全管控',
  521. icon: 'svg-matrix',
  522. path: '/new/personnel',
  523. children: [
  524. {
  525. text: '人员矩阵',
  526. icon: 'svg-wind-site',
  527. path: '/new/personnel'
  528. },
  529. {
  530. text: '全局监视',
  531. icon: 'svg-wind-site',
  532. path: '/globalMonitor'
  533. }
  534. ]
  535. }
  536. ]
  537. },
  538. {
  539. id: 'znbb',
  540. text: '智能报表',
  541. data: [
  542. {
  543. text: '报表首页',
  544. icon: 'svg-wind-site',
  545. path: '/znbb/reportPandect'
  546. },// 统计分析
  547. {
  548. text: '统计分析',
  549. icon: 'svg-matrix',
  550. path: '/tjfx',
  551. children: [
  552. {
  553. text: '统计分析',
  554. icon: 'svg-matrix',
  555. path: '/tjfx'
  556. },
  557. {
  558. text: '表底值查询',
  559. icon: 'svg-matrix',
  560. path: '/bdzcx'
  561. }
  562. ]
  563. },
  564. // 报表管理
  565. {
  566. text: '报表管理',
  567. icon: 'svg-matrix',
  568. path: '/bdzcx',
  569. children: [
  570. {
  571. text: 'OA日报',
  572. icon: 'svg-matrix',
  573. path: '/oafd'
  574. },
  575. {
  576. text: 'OA日报(光伏)',
  577. icon: 'svg-matrix',
  578. path: '/oagf'
  579. },
  580. {
  581. text: '新能源日报',
  582. icon: 'svg-matrix',
  583. path: '/xnyrb'
  584. },
  585. {
  586. text: '国电电力MISS日报(风电)',
  587. icon: 'svg-matrix',
  588. path: '/missfdrb'
  589. },
  590. {
  591. text: '国电电力MISS日报(光伏)',
  592. icon: 'svg-matrix',
  593. path: '/missgfrb'
  594. },
  595. {
  596. text: '新能源风电生产月报',
  597. icon: 'svg-matrix',
  598. path: '/xnyfdscyb'
  599. },
  600. {
  601. text: '麻黄山生产月报',
  602. icon: 'svg-matrix',
  603. path: '/mhsscyb'
  604. },
  605. {
  606. text: '牛首山生产月报',
  607. icon: 'svg-matrix',
  608. path: '/nssscyb'
  609. },
  610. {
  611. text: '青山生产月报',
  612. icon: 'svg-matrix',
  613. path: '/qsscyb'
  614. },
  615. {
  616. text: '石板泉生产月报',
  617. icon: 'svg-matrix',
  618. path: '/sbqscyb'
  619. },
  620. {
  621. text: '香山生产月报',
  622. icon: 'svg-matrix',
  623. path: '/xsscyb'
  624. },
  625. {
  626. text: '新能源光伏生产月报',
  627. icon: 'svg-matrix',
  628. path: '/xnygfscyb'
  629. },
  630. {
  631. text: '大武口生产月报',
  632. icon: 'svg-matrix',
  633. path: '/dwkscyb'
  634. },
  635. {
  636. text: '平罗生产月报',
  637. icon: 'svg-matrix',
  638. path: '/plscyb'
  639. },
  640. {
  641. text: '宣和生产月报',
  642. icon: 'svg-matrix',
  643. path: '/xhscyb'
  644. }
  645. ]
  646. },
  647. // 自定制报表管理
  648. {
  649. text: '自定制报表管理',
  650. icon: 'svg-matrix',
  651. path: '/fdczzdy',
  652. children: [
  653. {
  654. text: '风电场站自定义',
  655. icon: 'svg-matrix',
  656. path: '/fdczzdy'
  657. },
  658. {
  659. text: '风电项目自定义',
  660. icon: 'svg-matrix',
  661. path: '/fdxmzdy'
  662. },
  663. {
  664. text: '光伏场站自定义',
  665. icon: 'svg-matrix',
  666. path: '/gfczzdy'
  667. },
  668. {
  669. text: '光伏项目自定义',
  670. icon: 'svg-matrix',
  671. path: '/gfxmzdy'
  672. }
  673. ]
  674. }
  675. ]
  676. },
  677. {
  678. id: 'realSearch',
  679. text: '其他',
  680. data: [
  681. {
  682. text: '原始数据查询',
  683. icon: 'svg-wind-site',
  684. path: '/realSearch',
  685. children: [
  686. {
  687. text: '测点数据查询',
  688. icon: 'svg-wind-site',
  689. path: '/realSearch'
  690. },
  691. {
  692. text: '测点历史数据查询',
  693. icon: 'svg-wind-site',
  694. path: '/historySearch'
  695. }
  696. ]
  697. },
  698. {
  699. text: '预警记录',
  700. icon: 'svg-wind-site',
  701. path: '/new/alarmcenter',
  702. children: [
  703. {
  704. text: '预警管理',
  705. icon: 'svg-wind-site',
  706. path: '/new/alarmcenter'
  707. },
  708. {
  709. text: '停机事件管理',
  710. icon: 'svg-wind-site',
  711. path: '/new/tjsj'
  712. },
  713. {
  714. text: '限电管理',
  715. icon: 'svg-wind-site',
  716. path: '/new/xdgl'
  717. },
  718. {
  719. text: '升压站报警',
  720. icon: 'svg-wind-site',
  721. path: '/alarmCenter/boosterAlarm'
  722. },
  723. {
  724. text: 'SCADA报警',
  725. icon: 'svg-wind-site',
  726. path: '/alarmCenter/scadaAlarm'
  727. },
  728. {
  729. text: '自定义报警',
  730. icon: 'svg-wind-site',
  731. path: '/alarmCenter/customAlarm'
  732. },
  733. {
  734. text: '自定义报警统计',
  735. icon: 'svg-wind-site',
  736. path: '/alarmCenter/customStatistics'
  737. }
  738. ]
  739. },
  740. {
  741. text: '专家知识',
  742. icon: 'svg-wind-site',
  743. path: '/knowledge',
  744. children: [
  745. {
  746. text: '故障知识列表',
  747. icon: 'svg-matrix',
  748. path: '/knowledge'
  749. },
  750. {
  751. text: '安全措施知识',
  752. icon: 'svg-matrix',
  753. path: '/knowledge2'
  754. },
  755. {
  756. text: '排查检修方案',
  757. icon: 'svg-matrix',
  758. path: '/knowledge6'
  759. },
  760. {
  761. text: '预警知识',
  762. icon: 'svg-matrix',
  763. path: '/knowledge7'
  764. },
  765. {
  766. text: '特征参数',
  767. icon: 'svg-matrix',
  768. path: '/knowledge5'
  769. },
  770. {
  771. text: '风险辨识知识',
  772. icon: 'svg-matrix',
  773. path: '/knowledge3'
  774. },
  775. {
  776. text: '作业指导知识',
  777. icon: 'svg-matrix',
  778. path: '/knowledge4'
  779. }
  780. ]
  781. }
  782. ]
  783. }
  784. ],
  785. activeIndex: 0,
  786. isShowSubMenu: false,
  787. parentIndex: null,
  788. subMenu: [],
  789. subIndex: null
  790. }
  791. },
  792. methods: {
  793. click(index) {
  794. this.activeIndex = index
  795. this.subIndex = null
  796. },
  797. subMenuShow(children, index) {
  798. if (children) {
  799. this.isShowSubMenu = true
  800. this.parentIndex = index
  801. } else {
  802. this.isShowSubMenu = false
  803. this.parentIndex = null
  804. }
  805. this.subMenu = children
  806. },
  807. subMenuHide() {
  808. this.isShowSubMenu = false
  809. this.parentIndex = null
  810. // this.subMenu = [];
  811. },
  812. subclick(index) {
  813. this.activeIndex = this.parentIndex
  814. this.subIndex = index
  815. }
  816. },
  817. computed: {
  818. currentMenu() {
  819. let data = this.menuData.filter(t => {
  820. return t.id == this.currRoot
  821. })[0].data
  822. return data
  823. }
  824. },
  825. watch: {
  826. // 监听路由
  827. $route: {
  828. handler: function(val, oldVal) {
  829. this.menuData.some((element, index) => {
  830. if (val.path.includes(element.id)) {
  831. this.currRoot = element.id
  832. this.$nextTick(() => {
  833. this.currentMenu.some((element, index) => {
  834. if (val.path == element.path) {
  835. this.activeIndex = index
  836. }
  837. })
  838. })
  839. return true
  840. }
  841. })
  842. },
  843. //深度观察监听
  844. deep: true
  845. }
  846. }
  847. }
  848. </script>
  849. <style lang="less">
  850. .menu {
  851. padding-top: 1.481vh;
  852. .menu-list {
  853. margin: 0;
  854. padding: 0;
  855. list-style: none;
  856. .menu-item {
  857. padding: 1.481vh 0;
  858. text-align: center;
  859. .menu-icon {
  860. display: flex;
  861. justify-content: center;
  862. }
  863. &.active i {
  864. color: #05bb4c;
  865. transition: color 1s;
  866. }
  867. }
  868. }
  869. i {
  870. font-size: 2.222vh;
  871. color: rgba(255, 255, 255, 50%);
  872. }
  873. }
  874. .sub-menu {
  875. position: absolute;
  876. top: 0;
  877. left: 5.3704vh;
  878. width: 158px;
  879. height: 100%;
  880. padding-top: 1.481vh;
  881. background: fade(#192a26, 75);
  882. border-right: 1px solid fade(@green, 50);
  883. box-shadow: inset 11px 0px 20px 0px fade(#021412, 60);
  884. .menu-list {
  885. margin: 0;
  886. padding: 0;
  887. list-style: none;
  888. .menu-item {
  889. display: flex;
  890. text-align: center;
  891. line-height: 1.5;
  892. padding: 8px 0;
  893. background: #121d1c;
  894. a {
  895. display: flex;
  896. width: 100%;
  897. height: 100%;
  898. padding: 0 1.4815vh;
  899. font-size: @fontsize-s;
  900. text-decoration: unset;
  901. .menu-icon {
  902. display: flex;
  903. align-items: center;
  904. svg {
  905. width: 14px;
  906. height: 14px;
  907. use {
  908. fill: fade(@green, 75);
  909. }
  910. }
  911. }
  912. }
  913. &.active {
  914. background: #323e70;
  915. .menu-icon {
  916. display: flex;
  917. svg use {
  918. fill: fade(@white, 75);
  919. }
  920. }
  921. }
  922. .sub-menu-text {
  923. margin-left: 1.1111vh;
  924. color: @gray-l;
  925. }
  926. & + .menu-item {
  927. border-top: 1px solid fade(@darkgray, 40);
  928. }
  929. }
  930. }
  931. i {
  932. font-size: 2.222vh;
  933. color: rgba(255, 255, 255, 50%);
  934. }
  935. }
  936. </style>