Browse Source

Merge branch 'master' of http://112.124.40.88:5510/root/NanJingLamanRadarProject

# Conflicts:
#	04.系统编码/Frontend/src/router/index.ts
master
徐辉辉 3 years ago
parent
commit
6823da8779
  1. 1
      04.系统编码/Frontend/.idea/workspace.xml
  2. 16
      04.系统编码/Frontend/src/App.vue
  3. 12
      04.系统编码/Frontend/src/router/index.ts

1
04.系统编码/Frontend/.idea/workspace.xml

@ -39,6 +39,7 @@
<workItem from="1638178911648" duration="1742000" /> <workItem from="1638178911648" duration="1742000" />
<workItem from="1638188568745" duration="5341000" /> <workItem from="1638188568745" duration="5341000" />
<workItem from="1638233761575" duration="1033000" /> <workItem from="1638233761575" duration="1033000" />
<workItem from="1638235051409" duration="42000" />
</task> </task>
<servers /> <servers />
</component> </component>

16
04.系统编码/Frontend/src/App.vue

@ -1,10 +1,12 @@
<template> <template>
<!-- <Header />--> <Header v-if="showHeader" />
<login/> <!-- <login/> -->
<router-view /> <router-view />
</template> </template>
<script lang="ts"> <script lang="ts">
import { reactive, ref, toRefs, watch } from 'vue';
import { useRouter } from 'vue-router';
import Header from './components/Shared/Header.vue'; import Header from './components/Shared/Header.vue';
import Login from "./components/Login.vue"; import Login from "./components/Login.vue";
@ -12,7 +14,15 @@
name: 'App', name: 'App',
components: {Login, Header }, components: {Login, Header },
setup() { setup() {
return {} const router = useRouter();
const showHeader = ref(false);
watch(() => router.currentRoute.value.path,
(current, prev) => {
showHeader.value = current === "/Login" ? false : true;
}
);
return {showHeader}
} }
} }
</script> </script>

12
04.系统编码/Frontend/src/router/index.ts

@ -2,17 +2,7 @@ import {createRouter, createWebHashHistory} from 'vue-router';
const routes: any = [ const routes: any = [
{ path: '/', redirect: '/Login'}, { path: '/', redirect: '/Login'},
// { { path: '/Login', component: () => import('../components/Login.vue') },
// path: '/MicrowaveRadiation',
// component: () => import('../components/MicrowaveRadiation/Index.vue'),
// children: [
// { path: '/MicrowaveRadiation', redirect: '/MicrowaveRadiation/VerticalProfile' },
// { path: 'VerticalProfile', component: () => import('./../components/MicrowaveRadiation/VerticalProfile.vue') },
// { path: 'ConvectiveIndex', component: () => import('./../components/MicrowaveRadiation/ConvectiveIndex.vue') },
// { path: 'TLogP', component: () => import('./../components/MicrowaveRadiation/TLogP.vue') },
// { path: 'BPInversion', component: () => import('./../components/MicrowaveRadiation/BPInversion.vue') }
// ]
// },
{ path: '/MicrowaveRadiation', component: () => import('../components/MicrowaveRadiation.vue') }, { path: '/MicrowaveRadiation', component: () => import('../components/MicrowaveRadiation.vue') },
{ path: '/RamanLidar', component: () => import('../components/RamanLidar.vue') }, { path: '/RamanLidar', component: () => import('../components/RamanLidar.vue') },
{ path: '/SynergyEvaluation', component: () => import('../components/SynergyEvaluation.vue') }, { path: '/SynergyEvaluation', component: () => import('../components/SynergyEvaluation.vue') },

Loading…
Cancel
Save