index.js 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
  2. import Home from '../pages/Home.vue'
  3. const routes = [{
  4. path: '/',
  5. redirect: '/dataFilter/prepare',
  6. },
  7. {
  8. path: '/',
  9. name: 'Home',
  10. redirect: '/dataFilter/prepare',
  11. component: Home,
  12. children: [
  13. {
  14. icon: 'iconfont iconbaojingpeizhi',
  15. path: '/dataFilter',
  16. name: 'dataFilter',
  17. redirect: '/dataFilter/prepare',
  18. meta: {
  19. title: '数据准备',
  20. },
  21. component: () =>
  22. import(
  23. '../pages/routerViewss.vue'
  24. ),
  25. children: [
  26. {
  27. icon: 'el-icon-s-home',
  28. path: '/dataFilter/prepare',
  29. name: 'dataFilterPrepare',
  30. meta: {
  31. title: '风电数据准备',
  32. },
  33. component: () =>
  34. import(
  35. '../pages/dataFilter/prepare/index.vue'
  36. ),
  37. },
  38. {
  39. icon: 'el-icon-s-home',
  40. path: '/dataFilter/process',
  41. name: 'dataFilterProcess',
  42. meta: {
  43. title: '风电数据处理',
  44. },
  45. component: () =>
  46. import(
  47. '../pages/dataFilter/process/index.vue'
  48. ),
  49. },
  50. // {
  51. // icon: 'el-icon-s-home',
  52. // path: '/dataFilter/lightPrepare',
  53. // name: 'dataFilterLightPrepare',
  54. // meta: {
  55. // title: '光伏数据准备',
  56. // },
  57. // component: () =>
  58. // import(
  59. // '../pages/dataFilter/lightPrepare/index.vue'
  60. // ),
  61. // },
  62. ]
  63. },
  64. {
  65. icon: 'iconfont iconbaojingpeizhi',
  66. path: '/dataAnalysis',
  67. name: 'dataAnalysis',
  68. redirect: '/dataAnalysis/combine',
  69. meta: {
  70. title: '风电分析',
  71. },
  72. component: () =>
  73. import(
  74. '../pages/routerViewss.vue'
  75. ),
  76. children: [
  77. {
  78. icon: 'el-icon-s-home',
  79. path: '/dataAnalysis/combine',
  80. name: 'dataAnalysis',
  81. meta: {
  82. title: '功率曲线拟合分析',
  83. },
  84. component: () =>
  85. import(
  86. '../pages/dataAnalysis/combine/index.vue'
  87. ),
  88. },
  89. {
  90. icon: 'el-icon-s-home',
  91. path: '/dataAnalysis/rateAnalysis',
  92. name: 'dataAnalysisRateAnalysis',
  93. meta: {
  94. title: '对风偏差分析',
  95. },
  96. component: () =>
  97. import(
  98. '../pages/dataAnalysis/rateAnalysis/index.vue'
  99. ),
  100. },
  101. {
  102. icon: 'el-icon-s-home',
  103. path: '/dataAnalysis/lineAnalysis',
  104. name: 'dataAnalysislineAnalysis',
  105. meta: {
  106. title: '曲线偏差率分析',
  107. },
  108. component: () =>
  109. import(
  110. '../pages/dataAnalysis/lineAnalysis/index.vue'
  111. ),
  112. },
  113. {
  114. icon: 'el-icon-s-home',
  115. path: '/dataAnalysis/hotAnalysis',
  116. name: 'dataAnalysisthotAnalysis',
  117. meta: {
  118. title: '温度与功率分析',
  119. },
  120. component: () =>
  121. import(
  122. '../pages/dataAnalysis/hotAnalysis/index.vue'
  123. ),
  124. },
  125. {
  126. icon: 'el-icon-s-home',
  127. path: '/dataAnalysis/posAnalysis',
  128. name: 'dataAnalysisPosAnalysis',
  129. meta: {
  130. title: '微观选址分析',
  131. },
  132. component: () =>
  133. import(
  134. '../pages/dataAnalysis/posAnalysis/index.vue'
  135. ),
  136. },
  137. {
  138. icon: 'el-icon-s-home',
  139. path: '/dataAnalysis/spaceAnalysis',
  140. name: 'dataAnalysisspaceAnalysis',
  141. meta: {
  142. title: '毛容量分析',
  143. },
  144. component: () =>
  145. import(
  146. '../pages/dataAnalysis/spaceAnalysis/index.vue'
  147. ),
  148. },
  149. // {
  150. // icon: 'el-icon-s-home',
  151. // path: '/dataAnalysis/angleAnalysis',
  152. // name: 'dataAnalysisAngleAnalysis',
  153. // meta: {
  154. // title: '浆距角分析',
  155. // },
  156. // component: () =>
  157. // import(
  158. // '../pages/dataAnalysis/angleAnalysis/index.vue'
  159. // ),
  160. // },
  161. {
  162. icon: 'el-icon-s-home',
  163. path: '/dataAnalysis/windAnalysis',
  164. name: 'dataAnalysisWindAnalysis',
  165. meta: {
  166. title: '损失电量分析',
  167. },
  168. component: () =>
  169. import(
  170. '../pages/dataAnalysis/windAnalysis/index.vue'
  171. ),
  172. },
  173. {
  174. icon: 'el-icon-s-home',
  175. path: '/dataAnalysis/agcAnalysis',
  176. name: 'dataAnalysisAgcAnalysis',
  177. meta: {
  178. title: 'AGC曲线偏差分析',
  179. },
  180. component: () =>
  181. import(
  182. '../pages/dataAnalysis/agcAnalysis/index.vue'
  183. ),
  184. },
  185. // {
  186. // icon: 'el-icon-s-home',
  187. // path: '/report/index',
  188. // name: 'reportIndex',
  189. // meta: {
  190. // title: '分析报告',
  191. // },
  192. // component: () =>
  193. // import(
  194. // '../pages/report/index.vue'
  195. // ),
  196. // },
  197. ]
  198. },
  199. {
  200. icon: 'iconfont iconbaojingpeizhi',
  201. path: '/lightAnalysis',
  202. name: 'lightAnalysis',
  203. redirect: '/lightAnalysis/glAnalysis',
  204. meta: {
  205. title: '场站分析',
  206. },
  207. component: () =>
  208. import(
  209. '../pages/routerViewss.vue'
  210. ),
  211. children: [
  212. {
  213. icon: 'el-icon-s-home',
  214. path: '/report/index',
  215. name: 'reportIndex',
  216. meta: {
  217. title: '分析报告',
  218. },
  219. component: () =>
  220. import(
  221. '../pages/report/index.vue'
  222. ),
  223. },
  224. // {
  225. // icon: 'el-icon-s-home',
  226. // path: '/lightAnalysis/glAnalysis',
  227. // name: 'glAnalysis',
  228. // meta: {
  229. // title: '功率曲线分析',
  230. // },
  231. // component: () =>
  232. // import(
  233. // '../pages/lightAnalysis/glAnalysis/index.vue'
  234. // ),
  235. // },
  236. // {
  237. // icon: 'el-icon-s-home',
  238. // path: '/lightAnalysis/glHotAnalysis',
  239. // name: 'glHotAnalysis',
  240. // meta: {
  241. // title: '功率光照曲线分析',
  242. // },
  243. // component: () =>
  244. // import(
  245. // '../pages/lightAnalysis/glHotAnalysis/index.vue'
  246. // ),
  247. // },
  248. ]
  249. },
  250. ],
  251. },
  252. // {
  253. // path: '/login',
  254. // name: 'Login',
  255. // meta: {
  256. // title: '登录',
  257. // },
  258. // component: () =>
  259. // import(
  260. // /* webpackChunkName: "login" */
  261. // '../pages/Login.vue'
  262. // ),
  263. // },
  264. ]
  265. const router = createRouter({
  266. history: createWebHashHistory(''),
  267. routes,
  268. })
  269. router.beforeEach((to, from, next) => {
  270. document.title = `${to.meta.title} | 发电能力分析平台`
  271. // const role = sessionStorage.getItem('ms_chinesename')
  272. // if (!role && to.path !== '/login') {
  273. // next('/login')
  274. // } else {
  275. next()
  276. // }
  277. })
  278. export default router