Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
海康威视
web-project
Commits
87c753b3
Commit
87c753b3
authored
Aug 07, 2024
by
jiaxu.yan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat : 路由更新
parent
c33ffbf0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
551 additions
and
511 deletions
+551
-511
index.js
src/router/index.js
+551
-511
No files found.
src/router/index.js
View file @
87c753b3
// 创建路由为历史
// 创建路由为历史
import
{
createRouter
,
createWebHistory
}
from
"vue-router"
;
import
{
createRouter
,
createWebHistory
}
from
"vue-router"
;
import
LoginPage
from
'@/views/login/login.vue'
import
LoginPage
from
"@/views/login/login.vue"
;
import
HomePage
from
'@/views/home.vue'
import
HomePage
from
"@/views/home.vue"
;
import
AboutPage
from
'@/components/About.vue'
import
AboutPage
from
"@/components/About.vue"
;
import
store
from
'@/store'
import
store
from
"@/store"
;
//import nProgress from 'nprogress'
//import nProgress from 'nprogress'
import
screenDisplay
from
'@/views/Gis/screenDisplay.vue'
import
screenDisplay
from
"@/views/Gis/screenDisplay.vue"
;
import
iframe
from
'@/views/iframe.vue'
import
iframe
from
"@/views/iframe.vue"
;
//import remote from './remote'
//import remote from './remote'
// 定义路由规则
// 定义路由规则
const
routes
=
[
const
routes
=
[
{
{
path
:
'/'
,
path
:
"/"
,
component
:
HomePage
component
:
HomePage
,
},
{
path
:
"/screenDisplay"
,
component
:
screenDisplay
,
},
},
{
{
path
:
'/screenDisplay'
,
path
:
"/iframe"
,
component
:
screenDisplay
name
:
"iframe"
,
},{
component
:
iframe
,
path
:
'/iframe'
,
name
:
'iframe'
,
component
:
iframe
},
},
{
{
path
:
'/Login'
,
path
:
"/Login"
,
name
:
"/Login"
,
name
:
"/Login"
,
component
:
LoginPage
component
:
LoginPage
,
},
},
{
{
path
:
'/Home'
,
path
:
"/Home"
,
name
:
"Home"
,
name
:
"Home"
,
component
:
HomePage
,
component
:
HomePage
,
children
:
[
children
:
[
// ...remote,//远程控制
// ...remote,//远程控制
{
{
path
:
'/RealSupply'
,
path
:
"/RealSupply"
,
name
:
'RealSupplyPage'
,
name
:
"RealSupplyPage"
,
component
:
()
=>
import
(
'@/views/RealPage/RealSupplyPage.vue'
),
component
:
()
=>
import
(
"@/views/RealPage/RealSupplyPage.vue"
),
meta
:
{
meta
:
{
title
:
'首页-实时热源'
title
:
"首页-实时热源"
,
}
},
},{
},
path
:
'/RealTransfer'
,
{
name
:
'/RealTransPage'
,
path
:
"/RealTransfer"
,
component
:
()
=>
import
(
'@/views/RealPage/RealTransPage.vue'
),
name
:
"/RealTransPage"
,
component
:
()
=>
import
(
"@/views/RealPage/RealTransPage.vue"
),
meta
:
{
meta
:
{
title
:
'实时换热站'
title
:
"实时换热站"
,
}
},
},{
},
path
:
'/RealPipe'
,
{
name
:
'RealPipePage'
,
path
:
"/RealPipe"
,
component
:
()
=>
import
(
'@/views/RealPage/RealPipePage.vue'
),
name
:
"RealPipePage"
,
component
:
()
=>
import
(
"@/views/RealPage/RealPipePage.vue"
),
meta
:
{
meta
:
{
title
:
'实时总管'
title
:
"实时总管"
,
}
},
},{
},
path
:
'/RealBoiler'
,
{
name
:
'RealBoilerPage'
,
path
:
"/RealBoiler"
,
component
:
()
=>
import
(
'@/views/RealPage/RealBoilerPage.vue'
),
name
:
"RealBoilerPage"
,
component
:
()
=>
import
(
"@/views/RealPage/RealBoilerPage.vue"
),
meta
:
{
meta
:
{
title
:
'实时锅炉'
title
:
"实时锅炉"
,
}
},
},{
},
path
:
'/RealEnergy'
,
{
name
:
'RealEnergyPage'
,
path
:
"/RealEnergy"
,
component
:
()
=>
import
(
'@/views/RealPage/RealEnergyPage.vue'
),
name
:
"RealEnergyPage"
,
component
:
()
=>
import
(
"@/views/RealPage/RealEnergyPage.vue"
),
meta
:
{
meta
:
{
title
:
'实时能耗'
title
:
"实时能耗"
,
}
},
},
},
// },{
// },{
// path: '/RealGas',
// path: '/RealGas',
...
@@ -100,398 +105,435 @@ const routes = [
...
@@ -100,398 +105,435 @@ const routes = [
// }
// }
// },
// },
{
{
path
:
'/PipeStatus'
,
path
:
"/PipeStatus"
,
name
:
'PipeStatusPage'
,
name
:
"PipeStatusPage"
,
component
:
()
=>
import
(
'@/views/StatusPage/PipeStatusPage.vue'
),
component
:
()
=>
import
(
"@/views/StatusPage/PipeStatusPage.vue"
),
meta
:
{
meta
:
{
title
:
'总管状态'
title
:
"总管状态"
,
}
},
},{
},
path
:
'/BoilerStatus'
,
{
name
:
'BoilerStatusPage'
,
path
:
"/BoilerStatus"
,
component
:
()
=>
import
(
'@/views/StatusPage/BoilerStatusPage.vue'
),
name
:
"BoilerStatusPage"
,
meta
:
{
component
:
()
=>
import
(
"@/views/StatusPage/BoilerStatusPage.vue"
),
title
:
'锅炉状态'
}
},{
path
:
'/TransferStatus'
,
name
:
'TransferStatusPage'
,
component
:
()
=>
import
(
'@/views/StatusPage/TransferStatusPage.vue'
),
meta
:
{
meta
:
{
title
:
'换热站状态'
title
:
"锅炉状态"
,
}
},
},{
},
path
:
'/BoilerArtwork'
,
{
name
:
'BoilerArtworkPage'
,
path
:
"/TransferStatus"
,
component
:
()
=>
import
(
'@/views/ArtworkPage/BoilerArtworkPage.vue'
),
name
:
"TransferStatusPage"
,
component
:
()
=>
import
(
"@/views/StatusPage/TransferStatusPage.vue"
),
meta
:
{
meta
:
{
title
:
'锅炉工艺图'
title
:
"换热站状态"
,
}
},
},{
},
path
:
'/MeasurementArtwork'
,
{
name
:
'MeasurementArtworkPage'
,
path
:
"/BoilerArtwork"
,
component
:
()
=>
import
(
'@/views/ArtworkPage/MeasurementArtworkPage.vue'
),
name
:
"BoilerArtworkPage"
,
component
:
()
=>
import
(
"@/views/ArtworkPage/BoilerArtworkPage.vue"
),
meta
:
{
meta
:
{
title
:
'计量站工艺图'
title
:
"锅炉工艺图"
,
}
},
},{
},
path
:
'/AllBoilerArtwork'
,
{
name
:
'AllBoilerArtworkPage'
,
path
:
"/MeasurementArtwork"
,
component
:
()
=>
import
(
'@/views/ArtworkPage/AllBoilerArtworkPage.vue'
),
name
:
"MeasurementArtworkPage"
,
component
:
()
=>
import
(
"@/views/ArtworkPage/MeasurementArtworkPage.vue"
),
meta
:
{
meta
:
{
title
:
'全景工艺图'
title
:
"计量站工艺图"
,
}
},
},{
},
path
:
'/TransferArtwork'
,
{
name
:
'TransferArtworkPage'
,
path
:
"/AllBoilerArtwork"
,
component
:
()
=>
import
(
'@/views/ArtworkPage/TransferArtworkPage.vue'
),
name
:
"AllBoilerArtworkPage"
,
component
:
()
=>
import
(
"@/views/ArtworkPage/AllBoilerArtworkPage.vue"
),
meta
:
{
meta
:
{
title
:
'换热站工艺图'
title
:
"全景工艺图"
,
}
},
},{
},
path
:
'/AlarmStatus'
,
{
name
:
'AlarmStatusPage'
,
path
:
"/TransferArtwork"
,
component
:
()
=>
import
(
'@/views/AlarmPage/AlarmStatusPage.vue'
),
name
:
"TransferArtworkPage"
,
component
:
()
=>
import
(
"@/views/ArtworkPage/TransferArtworkPage.vue"
),
meta
:
{
meta
:
{
title
:
'报警状态'
title
:
"换热站工艺图"
,
}
},
},{
},
path
:
'/Alarm'
,
{
name
:
'AlarmInfoPage'
,
path
:
"/AlarmStatus"
,
component
:
()
=>
import
(
'@/views/AlarmPage/AlarmInfoPage.vue'
),
name
:
"AlarmStatusPage"
,
component
:
()
=>
import
(
"@/views/AlarmPage/AlarmStatusPage.vue"
),
meta
:
{
meta
:
{
title
:
'报警信息'
title
:
"报警状态"
,
}
},
},{
},
path
:
'/DataAnalysis'
,
{
name
:
'DataAnalysisPage'
,
path
:
"/Alarm"
,
component
:
()
=>
import
(
'@/views/HandlerPage/DataAnalysisPage.vue'
),
name
:
"AlarmInfoPage"
,
component
:
()
=>
import
(
"@/views/AlarmPage/AlarmInfoPage.vue"
),
meta
:
{
meta
:
{
title
:
'能耗分析'
title
:
"报警信息"
,
}
},
},{
},
path
:
'/EnergyConsumption'
,
{
name
:
'EnergyConsumptionPage'
,
path
:
"/DataAnalysis"
,
component
:
()
=>
import
(
'@/views/HandlerPage/EnergyConsumptionPage.vue'
),
name
:
"DataAnalysisPage"
,
component
:
()
=>
import
(
"@/views/HandlerPage/DataAnalysisPage.vue"
),
meta
:
{
meta
:
{
title
:
'能耗排名'
title
:
"能耗分析"
,
}
},
},{
},
path
:
'/Handler/EnerpriseEnergyView'
,
{
name
:
'EnerpriseEnergyView'
,
path
:
"/EnergyConsumption"
,
component
:
()
=>
import
(
'@/views/HandlerPage/EnerpriseEnergyView.vue'
),
name
:
"EnergyConsumptionPage"
,
component
:
()
=>
import
(
"@/views/HandlerPage/EnergyConsumptionPage.vue"
),
meta
:
{
meta
:
{
title
:
'企业趋势图'
title
:
"能耗排名"
,
}
},
},{
},
path
:
'/Handler/TransferEnergyView'
,
{
name
:
'EnergyViewPage'
,
path
:
"/Handler/EnerpriseEnergyView"
,
component
:
()
=>
import
(
'@/views/HandlerPage/TransferEnergyView.vue'
),
name
:
"EnerpriseEnergyView"
,
component
:
()
=>
import
(
"@/views/HandlerPage/EnerpriseEnergyView.vue"
),
meta
:
{
meta
:
{
title
:
'换热站趋势图'
title
:
"企业趋势图"
,
}
},
},{
},
path
:
'/Handler/QOQView'
,
{
name
:
'QOQView'
,
path
:
"/Handler/TransferEnergyView"
,
component
:
()
=>
import
(
'@/views/HandlerPage/QOQ.vue'
),
name
:
"EnergyViewPage"
,
component
:
()
=>
import
(
"@/views/HandlerPage/TransferEnergyView.vue"
),
meta
:
{
meta
:
{
title
:
'用量环比'
title
:
"换热站趋势图"
,
}
},
},{
},
path
:
'/Handler/YOYView'
,
{
name
:
'YOYView'
,
path
:
"/Handler/QOQView"
,
component
:
()
=>
import
(
'@/views/HandlerPage/YOY.vue'
),
name
:
"QOQView"
,
component
:
()
=>
import
(
"@/views/HandlerPage/QOQ.vue"
),
meta
:
{
meta
:
{
title
:
'用量同比'
title
:
"用量环比"
,
}
},
},{
},
path
:
'/HeatAnalysis'
,
{
name
:
'HeatAnalysisPage'
,
path
:
"/Handler/YOYView"
,
component
:
()
=>
import
(
'@/views/Report/HeatAnalysisPage.vue'
),
name
:
"YOYView"
,
component
:
()
=>
import
(
"@/views/HandlerPage/YOY.vue"
),
meta
:
{
meta
:
{
title
:
'热量分析'
title
:
"用量同比"
,
}
},
},{
},
path
:
'/Forecast'
,
{
name
:
'ForecastPage'
,
path
:
"/HeatAnalysis"
,
component
:
()
=>
import
(
'@/views/Report/ForecastPage.vue'
),
name
:
"HeatAnalysisPage"
,
component
:
()
=>
import
(
"@/views/Report/HeatAnalysisPage.vue"
),
meta
:
{
meta
:
{
title
:
'明日预测'
title
:
"热量分析"
,
}
},
},{
},
path
:
'/RealAnalysis'
,
{
name
:
'RealAnalysisPage'
,
path
:
"/Forecast"
,
component
:
()
=>
import
(
'@/views/Report/RealAnalysisPage.vue'
),
name
:
"ForecastPage"
,
component
:
()
=>
import
(
"@/views/Report/ForecastPage.vue"
),
meta
:
{
meta
:
{
title
:
'实时热量分析'
title
:
"明日预测"
,
}
},
},{
},
path
:
'/TransferEnergy'
,
{
name
:
'TransferEnergyPage'
,
path
:
"/RealAnalysis"
,
component
:
()
=>
import
(
'@/views/Report/TransferEnergyPage.vue'
),
name
:
"RealAnalysisPage"
,
component
:
()
=>
import
(
"@/views/Report/RealAnalysisPage.vue"
),
meta
:
{
meta
:
{
title
:
'换热站能耗'
title
:
"实时热量分析"
,
}
},
},{
},
path
:
'/AreaInfo'
,
{
name
:
'AreaInfoPage'
,
path
:
"/TransferEnergy"
,
component
:
()
=>
import
(
'@/views/Report/AreaInfoPage.vue'
),
name
:
"TransferEnergyPage"
,
component
:
()
=>
import
(
"@/views/Report/TransferEnergyPage.vue"
),
meta
:
{
meta
:
{
title
:
'面积统计'
title
:
"换热站能耗"
,
}
},
},{
},
path
:
'/TodayPatrol'
,
{
name
:
'PatrolPage'
,
path
:
"/AreaInfo"
,
component
:
()
=>
import
(
'@/views/PatrolPage/TodayPatrolPage.vue'
),
name
:
"AreaInfoPage"
,
component
:
()
=>
import
(
"@/views/Report/AreaInfoPage.vue"
),
meta
:
{
meta
:
{
title
:
'今日巡更'
title
:
"面积统计"
,
}
},
},{
},
path
:
'/HisPatrol'
,
{
name
:
'HisPatrolPage'
,
path
:
"/TodayPatrol"
,
component
:
()
=>
import
(
'@/views/PatrolPage/HisPatrolPage.vue'
),
name
:
"PatrolPage"
,
component
:
()
=>
import
(
"@/views/PatrolPage/TodayPatrolPage.vue"
),
meta
:
{
meta
:
{
title
:
'巡更历史'
title
:
"今日巡更"
,
}
},
},{
},
path
:
'/HeatUser'
,
{
name
:
'HeatUserPage'
,
path
:
"/HisPatrol"
,
component
:
()
=>
import
(
'@/views/HeatUserPage/HeatUserPage.vue'
),
name
:
"HisPatrolPage"
,
component
:
()
=>
import
(
"@/views/PatrolPage/HisPatrolPage.vue"
),
meta
:
{
meta
:
{
title
:
'热用户'
title
:
"巡更历史"
,
}
},
},{
},
path
:
'/HeatUser/Tap'
,
{
name
:
'TapPage'
,
path
:
"/HeatUser"
,
component
:
()
=>
import
(
'@/views/HeatUserPage/TapPage.vue'
),
name
:
"HeatUserPage"
,
component
:
()
=>
import
(
"@/views/HeatUserPage/HeatUserPage.vue"
),
meta
:
{
meta
:
{
title
:
'阀门'
title
:
"热用户"
,
}
},
},{
},
path
:
'/History/Pipe'
,
{
name
:
'HisPipe'
,
path
:
"/HeatUser/Tap"
,
component
:
()
=>
import
(
'@/views/HistoryPage/HisPipePage.vue'
),
name
:
"TapPage"
,
component
:
()
=>
import
(
"@/views/HeatUserPage/TapPage.vue"
),
meta
:
{
meta
:
{
title
:
'总管历史数据'
title
:
"阀门"
,
}
},
},{
},
path
:
'/History/Boiler'
,
{
name
:
'HisBoiler'
,
path
:
"/History/Pipe"
,
component
:
()
=>
import
(
'@/views/HistoryPage/HisBoilerPage.vue'
),
name
:
"HisPipe"
,
component
:
()
=>
import
(
"@/views/HistoryPage/HisPipePage.vue"
),
meta
:
{
meta
:
{
title
:
'锅炉历史数据'
title
:
"总管历史数据"
,
}
},
},{
},
path
:
'/History/Transfer'
,
{
name
:
'HisTransfer'
,
path
:
"/History/Boiler"
,
component
:
()
=>
import
(
'@/views/HistoryPage/HisTransPage.vue'
),
name
:
"HisBoiler"
,
component
:
()
=>
import
(
"@/views/HistoryPage/HisBoilerPage.vue"
),
meta
:
{
meta
:
{
title
:
'换热站历史数据'
title
:
"锅炉历史数据"
,
}
},
},{
},
path
:
'/History/Gas'
,
{
name
:
'HisGas'
,
path
:
"/History/Transfer"
,
component
:
()
=>
import
(
'@/views/HistoryPage/HisGasPage.vue'
),
name
:
"HisTransfer"
,
component
:
()
=>
import
(
"@/views/HistoryPage/HisTransPage.vue"
),
meta
:
{
meta
:
{
title
:
'燃气历史数据'
title
:
"换热站历史数据"
,
}
},
},{
},
path
:
'/History/Water'
,
{
name
:
'HisWater'
,
path
:
"/History/Gas"
,
component
:
()
=>
import
(
'@/views/HistoryPage/HisWaterPage.vue'
),
name
:
"HisGas"
,
component
:
()
=>
import
(
"@/views/HistoryPage/HisGasPage.vue"
),
meta
:
{
meta
:
{
title
:
'水表历史数据'
title
:
"燃气历史数据"
,
}
},
},{
},
path
:
'/History/Heat'
,
{
name
:
'HisHeat'
,
path
:
"/History/Water"
,
component
:
()
=>
import
(
'@/views/HistoryPage/HisHeatPage.vue'
),
name
:
"HisWater"
,
component
:
()
=>
import
(
"@/views/HistoryPage/HisWaterPage.vue"
),
meta
:
{
meta
:
{
title
:
'热表历史数据'
title
:
"水表历史数据"
,
}
},
},{
},
path
:
'/History/Electric'
,
{
name
:
'HisElectric'
,
path
:
"/History/Heat"
,
component
:
()
=>
import
(
'@/views/HistoryPage/HisElecPage.vue'
),
name
:
"HisHeat"
,
component
:
()
=>
import
(
"@/views/HistoryPage/HisHeatPage.vue"
),
meta
:
{
meta
:
{
title
:
'电表历史数据'
title
:
"热表历史数据"
,
}
},
},{
},
path
:
'/Handler/Overview'
,
{
name
:
'Overview'
,
path
:
"/History/Electric"
,
component
:
()
=>
import
(
'@/views/HandlerPage/OverviewPage.vue'
),
name
:
"HisElectric"
,
component
:
()
=>
import
(
"@/views/HistoryPage/HisElecPage.vue"
),
meta
:
{
meta
:
{
title
:
'数据总览'
title
:
"电表历史数据"
,
}
},
},{
},
path
:
'/Handler/EnergyView'
,
{
name
:
'EnergyView'
,
path
:
"/Handler/Overview"
,
component
:
()
=>
import
(
'@/views/HandlerPage/QOQ.vue'
),
//EnergyViewPage
name
:
"Overview"
,
component
:
()
=>
import
(
"@/views/HandlerPage/OverviewPage.vue"
),
meta
:
{
meta
:
{
title
:
'趋势图'
title
:
"数据总览"
,
}
},
},{
},
path
:
'/Remote/Boiler'
,
{
name
:
'BoilerRemotePage'
,
path
:
"/Handler/EnergyView"
,
component
:
()
=>
import
(
'@/views/RemotePage/BoilerControlPage.vue'
),
name
:
"EnergyView"
,
component
:
()
=>
import
(
"@/views/HandlerPage/QOQ.vue"
),
//EnergyViewPage
meta
:
{
meta
:
{
title
:
'锅炉远程控制'
title
:
"趋势图"
,
}
},
},
},
{
{
path
:
'/Remote/ZdlmSelfTest'
,
path
:
"/Remote/Boiler"
,
name
:
'ZdlmSelfTestPage'
,
name
:
"BoilerRemotePage"
,
component
:
()
=>
import
(
'@/views/RemotePage/ZdlmSelfTest.vue'
),
component
:
()
=>
import
(
"@/views/RemotePage/BoilerControlPage.vue"
),
meta
:
{
meta
:
{
title
:
'电动阀自检'
title
:
"锅炉远程控制"
,
}
},
},
},
{
{
path
:
'/Remote/Transfer'
,
path
:
"/Remote/ZdlmSelfTest"
,
name
:
'TransferRemotePage'
,
name
:
"ZdlmSelfTestPage"
,
component
:
()
=>
import
(
'@/views/RemotePage/TransControlPage.vue'
),
component
:
()
=>
import
(
"@/views/RemotePage/ZdlmSelfTest.vue"
),
meta
:
{
meta
:
{
title
:
'换热站远程控制'
title
:
"电动阀自检"
,
}
},
},{
},
path
:
'/Remote/TransferPump'
,
{
name
:
'TransferPumpPage'
,
path
:
"/Remote/Transfer"
,
component
:
()
=>
import
(
'@/views/RemotePage/TransferPumpPage.vue'
),
name
:
"TransferRemotePage"
,
component
:
()
=>
import
(
"@/views/RemotePage/TransControlPage.vue"
),
meta
:
{
meta
:
{
title
:
'循环泵压差控制'
title
:
"换热站远程控制"
,
}
},
},{
},
path
:
'/Video'
,
{
name
:
'VideoPage'
,
path
:
"/Remote/TransferPump"
,
component
:
()
=>
import
(
'@/views/Video/VideoViewPage.vue'
),
name
:
"TransferPumpPage"
,
component
:
()
=>
import
(
"@/views/RemotePage/TransferPumpPage.vue"
),
meta
:
{
meta
:
{
title
:
'视频监控'
title
:
"循环泵压差控制"
,
}
},
},{
},
path
:
'/Scheduling/WeatherManage'
,
{
name
:
'WeatherManage'
,
path
:
"/Video"
,
component
:
()
=>
import
(
'@/views/Scheduling/WeatherManage.vue'
),
name
:
"VideoPage"
,
component
:
()
=>
import
(
"@/views/Video/VideoViewPage.vue"
),
meta
:
{
meta
:
{
title
:
'气象干预'
title
:
"视频监控"
,
}
},
},{
},
path
:
'/Scheduling/EnergyManage'
,
{
name
:
'EnergyManage'
,
path
:
"/Scheduling/EnergyManage"
,
component
:
()
=>
import
(
'@/views/Scheduling/EnergyManage.vue'
),
name
:
"EnergyManagePage"
,
component
:
()
=>
import
(
"@/views/SchedulingPage/EnergyManagePage.vue"
),
meta
:
{
meta
:
{
title
:
'能源消耗'
title
:
"能源消耗"
,
}
},
},{
},
path
:
'/Scheduling/AnalysisManage'
,
{
name
:
'AnalysisManage'
,
path
:
"/Scheduling/WeatherManage"
,
component
:
()
=>
import
(
'@/views/Scheduling/AnalysisManage.vue'
),
name
:
"WeatherManagePage"
,
component
:
()
=>
import
(
"@/views/SchedulingPage/WeatherManagePage.vue"
),
meta
:
{
meta
:
{
title
:
'生产与结算数据分析表'
title
:
"气象干预"
,
}
},
},{
},
path
:
'/Scheduling/ConfigBoiler'
,
{
name
:
'ConfigBoiler'
,
path
:
"/Scheduling/AnnualParam"
,
component
:
()
=>
import
(
'@/views/Scheduling/ConfigBoiler.vue'
),
name
:
"AnnualParamPage"
,
component
:
()
=>
import
(
"@/views/SchedulingPage/AnnualParamPage.vue"
),
meta
:
{
meta
:
{
title
:
'锅炉参数配置'
title
:
"年度参数"
,
}
},
},{
},
path
:
'/Scheduling/Phenomenon'
,
{
name
:
'Phenomenon'
,
path
:
"/Scheduling/ConfigBoiler"
,
component
:
()
=>
import
(
'@/views/Scheduling/Phenomenon.vue'
),
name
:
"ConfigBoiler"
,
component
:
()
=>
import
(
"../views/SchedulingPage/ConfigBoilerPage.vue"
),
meta
:
{
meta
:
{
title
:
'天气工况'
title
:
"参数配置"
,
}
},
},{
},
path
:
'/Scheduling/InstantHeat'
,
{
name
:
'InstantHeat'
,
path
:
"/Scheduling/WindManage"
,
component
:
()
=>
import
(
'@/views/Scheduling/InstantHeat.vue'
),
name
:
"WindManage"
,
component
:
()
=>
import
(
"../views/SchedulingPage/WindManagePage.vue"
),
meta
:
{
meta
:
{
title
:
'瞬时热量对比配置'
title
:
"风力配置管理"
,
}
},
},{
},
path
:
'/Scheduling/WindManage'
,
{
name
:
'WindManage'
,
path
:
"/Scheduling/Phenomenon"
,
component
:
()
=>
import
(
'@/views/Scheduling/WindManage.vue'
),
name
:
"Phenomenon"
,
component
:
()
=>
import
(
"../views/SchedulingPage/PhenomenonPage.vue"
),
meta
:
{
meta
:
{
title
:
'风力配置管理'
title
:
"天气工况管理"
,
}
},
},{
},
path
:
'/Scheduling/AnnualParam'
,
{
name
:
'AnnualParam'
,
path
:
"/Scheduling/InstantHeat"
,
component
:
()
=>
import
(
'@/views/Scheduling/AnnualParam.vue'
),
name
:
"InstantHeatPage"
,
component
:
()
=>
import
(
"@/views/SchedulingPage/InstantHeatPage.vue"
),
meta
:
{
meta
:
{
title
:
'年度参数管理'
title
:
"瞬时热量对比配置"
,
}
},
}
},
]
],
},
},
{
{
path
:
'/About'
,
path
:
"/About"
,
name
:
"/About"
,
name
:
"/About"
,
component
:
AboutPage
component
:
AboutPage
,
},
},
{
{
path
:
'/GisHome'
,
path
:
"/GisHome"
,
name
:
'/GisHome'
,
name
:
"/GisHome"
,
component
:
()
=>
import
(
'@/views/Gis/screenDisplay.vue'
),
component
:
()
=>
import
(
"@/views/Gis/screenDisplay.vue"
),
meta
:
{
meta
:
{
title
:
'地图'
title
:
"地图"
,
}
},
},
},
//捕获404路由
//捕获404路由
{
{
path
:
'/:pathMatch(.*)*'
,
path
:
"/:pathMatch(.*)*"
,
name
:
'NotFound'
,
name
:
"NotFound"
,
component
:
()
=>
import
(
'@/views/404.vue'
)
component
:
()
=>
import
(
"@/views/404.vue"
),
},
},
{
{
path
:
'/TransferArt'
,
path
:
"/TransferArt"
,
name
:
'/TransferArt'
,
name
:
"/TransferArt"
,
component
:
()
=>
import
(
'@/components/art/TransferArt.vue'
),
component
:
()
=>
import
(
"@/components/art/TransferArt.vue"
),
meta
:
{
meta
:
{
title
:
'换热站工艺图'
title
:
"换热站工艺图"
,
}
},
},
},
{
{
path
:
'/BoilerArt'
,
path
:
"/BoilerArt"
,
name
:
'/BoilerArt'
,
name
:
"/BoilerArt"
,
component
:
()
=>
import
(
'@/components/art/BoilerArt.vue'
),
component
:
()
=>
import
(
"@/components/art/BoilerArt.vue"
),
meta
:
{
meta
:
{
title
:
'锅炉工艺图'
title
:
"锅炉工艺图"
,
}
},
},
},
{
{
path
:
'/AllBoilerArt'
,
path
:
"/AllBoilerArt"
,
name
:
'AllBoilerArt'
,
name
:
"AllBoilerArt"
,
component
:
()
=>
import
(
'@/components/art/AllBoilerArt.vue'
),
component
:
()
=>
import
(
"@/components/art/AllBoilerArt.vue"
),
meta
:
{
meta
:
{
title
:
'锅炉全景工艺图'
title
:
"锅炉全景工艺图"
,
}
},
},
},
{
{
path
:
'/MeasurementArt'
,
path
:
"/MeasurementArt"
,
name
:
'MeasurementArt'
,
name
:
"MeasurementArt"
,
component
:
()
=>
import
(
'@/components/art/MeasurementArt.vue'
),
component
:
()
=>
import
(
"@/components/art/MeasurementArt.vue"
),
meta
:
{
meta
:
{
title
:
'计量站全景工艺图'
title
:
"计量站全景工艺图"
,
}
},
},
},
{
{
path
:
'/Visualizations'
,
path
:
"/Visualizations"
,
name
:
'Visualizations'
,
name
:
"Visualizations"
,
component
:
()
=>
import
(
'@/views/Visualizations/index.vue'
),
component
:
()
=>
import
(
"@/views/Visualizations/index.vue"
),
meta
:
{
meta
:
{
title
:
'可视化'
title
:
"可视化"
,
}
},
}
},
]
]
;
//创建路由实例对象
//创建路由实例对象
const
router
=
createRouter
({
const
router
=
createRouter
({
routes
,
routes
,
history
:
createWebHistory
(
import
.
meta
.
env
.
BASE_URL
)
history
:
createWebHistory
(
import
.
meta
.
env
.
BASE_URL
),
})
})
;
// // 使用路由守卫来判断是否已经加载了Home页面
// // 使用路由守卫来判断是否已经加载了Home页面
// let homeLoaded = false
// let homeLoaded = false
...
@@ -507,8 +549,7 @@ const router = createRouter({
...
@@ -507,8 +549,7 @@ const router = createRouter({
// }
// }
// })
// })
let
isgetOrg
=
false
;
let
isgetOrg
=
false
//全局前置路由守卫
//全局前置路由守卫
router
.
beforeEach
(
async
(
to
,
from
,
next
)
=>
{
router
.
beforeEach
(
async
(
to
,
from
,
next
)
=>
{
//store.dispatch("onLoading", true);
//store.dispatch("onLoading", true);
...
@@ -519,34 +560,33 @@ router.beforeEach(async (to, from, next) => {
...
@@ -519,34 +560,33 @@ router.beforeEach(async (to, from, next) => {
const
token
=
store
.
getters
.
getToken
();
const
token
=
store
.
getters
.
getToken
();
//console.log(token);
//console.log(token);
//如果未登录跳转到登录页面
//如果未登录跳转到登录页面
if
(
!
userInfo
&&
to
.
path
!==
'/login'
)
return
next
(
'/login'
)
if
(
!
userInfo
&&
to
.
path
!==
"/login"
)
return
next
(
"/login"
);
//如果已登录避免重复登录
//如果已登录避免重复登录
if
(
userInfo
&&
to
.
path
==
'/login'
)
{
if
(
userInfo
&&
to
.
path
==
"/login"
)
{
return
next
({
path
:
from
.
path
?
from
.
path
:
'/'
})
return
next
({
path
:
from
.
path
?
from
.
path
:
"/"
});
}
}
let
hasNewRoutes
=
false
let
hasNewRoutes
=
false
;
//如果用户登录成功,调用Vuex方法,存储用户信息
//如果用户登录成功,调用Vuex方法,存储用户信息
if
(
userInfo
&&
!
isgetOrg
)
{
if
(
userInfo
&&
!
isgetOrg
)
{
try
try
{
{
const
res
=
await
store
.
dispatch
(
"getOrg"
);
const
res
=
await
store
.
dispatch
(
'getOrg'
)
isgetOrg
=
true
;
isgetOrg
=
true
}
catch
(
error
)
{
}
catch
(
error
)
{
store
.
commit
(
"clearUserInfo"
,
""
);
store
.
commit
(
"clearUserInfo"
,
""
);
return
next
(
'/login'
)
return
next
(
"/login"
);
}
}
}
}
//手动指定路由
//手动指定路由
//如果确实有新路由加入手动指定路由,否则直接放行
//如果确实有新路由加入手动指定路由,否则直接放行
hasNewRoutes
?
next
(
to
.
fullPath
)
:
next
()
hasNewRoutes
?
next
(
to
.
fullPath
)
:
next
();
//next()
//next()
})
})
;
// router.afterEach((to, from) => {
// router.afterEach((to, from) => {
// store.dispatch("onLoading", false);
// store.dispatch("onLoading", false);
// })
// })
// 共享路由实例对象
// 共享路由实例对象
export
default
router
export
default
router
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment