Menu.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062
  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: "/other/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. },
  804. {
  805. text: "预警记录",
  806. icon: "svg-wind-site",
  807. path: "/others/alarmCenter/alarmcenter",
  808. children: [
  809. {
  810. text: "预警管理",
  811. icon: "svg-wind-site",
  812. path: "/others/alarmCenter/alarmcenter",
  813. },
  814. {
  815. text: "停机事件管理",
  816. icon: "svg-wind-site",
  817. path: "/others/alarmCenter/tjsj",
  818. },
  819. {
  820. text: "限电管理",
  821. icon: "svg-wind-site",
  822. path: "/others/alarmCenter/xdgl",
  823. },
  824. {
  825. text: "升压站报警",
  826. icon: "svg-wind-site",
  827. path: "/others/alarmCenter/boosterAlarm",
  828. },
  829. {
  830. text: "SCADA报警",
  831. icon: "svg-wind-site",
  832. path: "/others/alarmCenter/scadaAlarm",
  833. },
  834. {
  835. text: "自定义报警",
  836. icon: "svg-wind-site",
  837. path: "/others/alarmCenter/customAlarm",
  838. },
  839. {
  840. text: "自定义报警统计",
  841. icon: "svg-wind-site",
  842. path: "/others/alarmCenter/customStatistics",
  843. },
  844. ],
  845. },
  846. {
  847. text: "专家知识",
  848. icon: "svg-wind-site",
  849. path: "/others/knowledge/knowledge",
  850. children: [
  851. {
  852. text: "故障知识列表",
  853. icon: "svg-matrix",
  854. path: "/others/knowledge/knowledge",
  855. },
  856. {
  857. text: "安全措施知识",
  858. icon: "svg-matrix",
  859. path: "/others/knowledge/knowledge2",
  860. },
  861. {
  862. text: "排查检修方案",
  863. icon: "svg-matrix",
  864. path: "/others/knowledge/knowledge6",
  865. },
  866. {
  867. text: "预警知识",
  868. icon: "svg-matrix",
  869. path: "/others/knowledge/knowledge7",
  870. },
  871. {
  872. text: "特征参数",
  873. icon: "svg-matrix",
  874. path: "/others/knowledge/knowledge5",
  875. },
  876. {
  877. text: "风险辨识知识",
  878. icon: "svg-matrix",
  879. path: "/others/knowledge/knowledge3",
  880. },
  881. {
  882. text: "作业指导知识",
  883. icon: "svg-matrix",
  884. path: "/others/knowledge/knowledge4",
  885. },
  886. ],
  887. },
  888. ],
  889. }
  890. ],
  891. activeIndex: 0,
  892. isShowSubMenu: false,
  893. parentIndex: null,
  894. subMenu: [],
  895. subIndex: null,
  896. };
  897. },
  898. methods: {
  899. click(index) {
  900. this.activeIndex = index;
  901. this.subIndex = null;
  902. },
  903. subMenuShow(children, index) {
  904. if (children) {
  905. this.isShowSubMenu = true;
  906. this.parentIndex = index;
  907. } else {
  908. this.isShowSubMenu = false;
  909. this.parentIndex = null;
  910. }
  911. this.subMenu = children;
  912. },
  913. subMenuHide() {
  914. this.isShowSubMenu = false;
  915. this.parentIndex = null;
  916. // this.subMenu = [];
  917. },
  918. subclick(index) {
  919. this.activeIndex = this.parentIndex;
  920. this.subIndex = index;
  921. },
  922. },
  923. computed: {
  924. currentMenu() {
  925. let data = this.menuData.filter((t) => {
  926. return t.id == this.currRoot;
  927. })[0].data;
  928. return data;
  929. },
  930. },
  931. watch: {
  932. // 监听路由
  933. $route: {
  934. handler: function (val, oldVal) {
  935. this.menuData.some((element, index) => {
  936. if (val.path.includes(element.id)) {
  937. this.$nextTick(() => {
  938. this.currRoot = element.id;
  939. this.$nextTick(() => {
  940. this.currentMenu.some((element, index) => {
  941. if (val.path == element.path) {
  942. this.activeIndex = index;
  943. }
  944. });
  945. });
  946. });
  947. return true;
  948. }
  949. });
  950. },
  951. //深度观察监听
  952. deep: true,
  953. },
  954. },
  955. };
  956. </script>
  957. <style lang="less">
  958. .menu {
  959. padding-top: 1.481vh;
  960. .menu-list {
  961. margin: 0;
  962. padding: 0;
  963. list-style: none;
  964. .menu-item {
  965. padding: 1.481vh 0;
  966. text-align: center;
  967. .menu-icon {
  968. display: flex;
  969. justify-content: center;
  970. }
  971. &.active i {
  972. color: #05bb4c;
  973. transition: color 1s;
  974. }
  975. }
  976. }
  977. i {
  978. font-size: 2.222vh;
  979. color: rgba(255, 255, 255, 50%);
  980. }
  981. }
  982. .sub-menu {
  983. position: absolute;
  984. top: 0;
  985. left: 5.3704vh;
  986. width: 158px;
  987. height: 100%;
  988. padding-top: 1.481vh;
  989. background: fade(#192a26, 75);
  990. border-right: 1px solid fade(@green, 50);
  991. box-shadow: inset 11px 0px 20px 0px fade(#021412, 60);
  992. .menu-list {
  993. margin: 0;
  994. padding: 0;
  995. list-style: none;
  996. .menu-item {
  997. display: flex;
  998. text-align: center;
  999. line-height: 1.5;
  1000. padding: 8px 0;
  1001. background: #121d1c;
  1002. a {
  1003. display: flex;
  1004. width: 100%;
  1005. height: 100%;
  1006. padding: 0 1.4815vh;
  1007. font-size: @fontsize-s;
  1008. text-decoration: unset;
  1009. .menu-icon {
  1010. display: flex;
  1011. align-items: center;
  1012. svg {
  1013. width: 14px;
  1014. height: 14px;
  1015. use {
  1016. fill: fade(@green, 75);
  1017. }
  1018. }
  1019. }
  1020. }
  1021. &.active {
  1022. background: #323e70;
  1023. .menu-icon {
  1024. display: flex;
  1025. svg use {
  1026. fill: fade(@white, 75);
  1027. }
  1028. }
  1029. }
  1030. .sub-menu-text {
  1031. margin-left: 1.1111vh;
  1032. color: @gray-l;
  1033. }
  1034. & + .menu-item {
  1035. border-top: 1px solid fade(@darkgray, 40);
  1036. }
  1037. }
  1038. }
  1039. i {
  1040. font-size: 2.222vh;
  1041. color: rgba(255, 255, 255, 50%);
  1042. }
  1043. }
  1044. </style>