Menu.vue 31 KB

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