| @@ -603,7 +603,32 @@ func ExploreImages(ctx *context.Context) { | |||||
| ctx.HTML(200, tplExploreImages) | ctx.HTML(200, tplExploreImages) | ||||
| } | } | ||||
| func ExploreDataAnalysisUserTrend(ctx *context.Context) { | |||||
| ctx.Data["url_params"]="UserTrend" | |||||
| ctx.HTML(200, tplExploreExploreDataAnalysis) | |||||
| } | |||||
| func ExploreDataAnalysisUserAnalysis(ctx *context.Context) { | |||||
| ctx.Data["url_params"]="UserAnalysis" | |||||
| ctx.HTML(200, tplExploreExploreDataAnalysis) | |||||
| } | |||||
| func ExploreDataAnalysisProTrend(ctx *context.Context) { | |||||
| ctx.Data["url_params"]="ProTrend" | |||||
| ctx.HTML(200, tplExploreExploreDataAnalysis) | |||||
| } | |||||
| func ExploreDataAnalysisProAnalysis(ctx *context.Context) { | |||||
| ctx.Data["url_params"]="ProAnalysis" | |||||
| ctx.HTML(200, tplExploreExploreDataAnalysis) | |||||
| } | |||||
| func ExploreDataAnalysisOverview(ctx *context.Context) { | |||||
| ctx.Data["url_params"]="Overview" | |||||
| ctx.HTML(200, tplExploreExploreDataAnalysis) | |||||
| } | |||||
| func ExploreDataAnalysisBrainAnalysis(ctx *context.Context) { | |||||
| ctx.Data["url_params"]="BrainAnalysis" | |||||
| ctx.HTML(200, tplExploreExploreDataAnalysis) | |||||
| } | |||||
| func ExploreDataAnalysis(ctx *context.Context) { | func ExploreDataAnalysis(ctx *context.Context) { | ||||
| ctx.Data["url_params"]="" | |||||
| ctx.HTML(200, tplExploreExploreDataAnalysis) | ctx.HTML(200, tplExploreExploreDataAnalysis) | ||||
| } | } | ||||
| @@ -345,6 +345,13 @@ func RegisterRoutes(m *macaron.Macaron) { | |||||
| m.Get("/code", routers.ExploreCode) | m.Get("/code", routers.ExploreCode) | ||||
| m.Get("/images", routers.ExploreImages) | m.Get("/images", routers.ExploreImages) | ||||
| m.Get("/data_analysis", routers.ExploreDataAnalysis) | m.Get("/data_analysis", routers.ExploreDataAnalysis) | ||||
| m.Get("/data_analysis/UserTrend", routers.ExploreDataAnalysisUserTrend) | |||||
| m.Get("/data_analysis/UserAnalysis", routers.ExploreDataAnalysisUserAnalysis) | |||||
| m.Get("/data_analysis/ProAnalysis", routers.ExploreDataAnalysisProAnalysis) | |||||
| m.Get("/data_analysis/ProTrend", routers.ExploreDataAnalysisProTrend) | |||||
| m.Get("/data_analysis/Overview", routers.ExploreDataAnalysisOverview) | |||||
| m.Get("/data_analysis/BrainAnalysis", routers.ExploreDataAnalysisBrainAnalysis) | |||||
| }, ignSignIn) | }, ignSignIn) | ||||
| m.Combo("/install", routers.InstallInit).Get(routers.Install). | m.Combo("/install", routers.InstallInit).Get(routers.Install). | ||||
| Post(bindIgnErr(auth.InstallForm{}), routers.InstallPost) | Post(bindIgnErr(auth.InstallForm{}), routers.InstallPost) | ||||
| @@ -1,11 +1,14 @@ | |||||
| {{template "base/head_fluid" .}} | {{template "base/head_fluid" .}} | ||||
| <input id="url_params" type="hidden" value={{.url_params}}/> | |||||
| <div id="data_analysis" style="height: 100%;"> | <div id="data_analysis" style="height: 100%;"> | ||||
| </div> | </div> | ||||
| {{template "base/footer_fluid" .}} | {{template "base/footer_fluid" .}} | ||||
| <!-- <script> | |||||
| localStorage.setItem("dataAnalysisURL","{{.url_params}}") | |||||
| </script> --> | |||||
| <style> | <style> | ||||
| .full.height { | .full.height { | ||||
| display: flex; | display: flex; | ||||
| @@ -5,7 +5,7 @@ | |||||
| default-active="this.$route.path" | default-active="this.$route.path" | ||||
| class="el-menu-vertical-demo" | class="el-menu-vertical-demo" | ||||
| :router="true" style="height:100%; background-color: #F5F5F6;" > | :router="true" style="height:100%; background-color: #F5F5F6;" > | ||||
| <el-menu-item index="overview" > | |||||
| <el-menu-item index="Overview" > | |||||
| <i class="ri-home-4-line"></i> | <i class="ri-home-4-line"></i> | ||||
| <span slot="title">概览</span> | <span slot="title">概览</span> | ||||
| </el-menu-item> | </el-menu-item> | ||||
| @@ -36,7 +36,25 @@ | |||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| <script> | |||||
| export default{ | |||||
| data(){ | |||||
| return { | |||||
| Path_router:'/' | |||||
| } | |||||
| }, | |||||
| created(){ | |||||
| //beforeCreate(),created(), beforeMount(), mounted() 都可以 | |||||
| var url_params = document.getElementById("url_params").value; | |||||
| console.log('url_params:',url_params); | |||||
| console.log('this.$router.path:',this.$router.path); | |||||
| if (url_params!='' && url_params!=undefined){ | |||||
| this.$router.push(url_params) | |||||
| console.log('this.$router.pathbefore:',this.$router.path); | |||||
| } | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped> | <style scoped> | ||||
| /deep/ .is-active{ | /deep/ .is-active{ | ||||
| color: #238BFC ; | color: #238BFC ; | ||||
| @@ -27,8 +27,8 @@ export default new Router({ | |||||
| }, | }, | ||||
| { | { | ||||
| path:'/overview', | |||||
| name:'overview', | |||||
| path:'/Overview', | |||||
| name:'Overview', | |||||
| component:Overview, | component:Overview, | ||||
| }, | }, | ||||
| { | { | ||||
| @@ -58,7 +58,6 @@ export default new Router({ | |||||
| component:BrainAnalysis, | component:BrainAnalysis, | ||||
| }, | }, | ||||
| ], | ], | ||||
| @@ -1,17 +0,0 @@ | |||||
| import Vue from 'vue'; | |||||
| import DataAnalysis from './components/DataAnalysis.vue' | |||||
| import router from './router/index.js' | |||||
| function initVueDataAnalysis() { | |||||
| const el = document.getElementById('data_analysis'); | |||||
| if (!el) { | |||||
| return; | |||||
| } | |||||
| new Vue({ | |||||
| el: '#data_analysis', | |||||
| router, | |||||
| render: h => h(DataAnalysis) | |||||
| }); | |||||
| } | |||||
| initVueDataAnalysis() | |||||