tab路由页面刷新active的问题

This commit is contained in:
朱菊兰 2023-01-11 16:32:26 +08:00
parent 703813eafd
commit af0c631800
7 changed files with 23 additions and 9 deletions

View File

@ -4,7 +4,7 @@
<img src="./../../assets/logo.png" alt="中建材" class="logo-img" />
<span class="title">G8.5 TFT-LCD 玻璃基板后工程段制造执行系统</span>
</div>
<!-- <breadcrumb v-show="activeModule !== 'home'" /> -->
<breadcrumb v-show="activeModule !== 'home'" />
<div class="fr">
<div class="fr avatar-area">
<el-dropdown>

View File

@ -18,9 +18,12 @@ export default {
name: 'AlarmInformation',
data() {
return {
activeName: 'realTimeAlarm'
activeName: ''
}
},
mounted() {
this.activeName = this.$router.history.current.name
},
methods: {
handleSelect(name) {
this.$router.push({ name: name })

View File

@ -18,9 +18,12 @@ export default {
name: 'MaintenanceManagement',
data() {
return {
activeName: 'plannedMaintenance'
activeName: ''
}
},
mounted() {
this.activeName = this.$router.history.current.name
},
methods: {
handleSelect(name) {
this.$router.push({ name: name })

View File

@ -20,9 +20,12 @@ export default {
name: 'performanceAnalysis',
data() {
return {
activeName: 'devicePage'
activeName: ''
}
},
mounted() {
this.activeName = this.$router.history.current.name
},
methods: {
handleSelect(name) {
this.$router.push({ name: name })

View File

@ -18,9 +18,12 @@ export default {
name: 'SpareParts',
data() {
return {
activeName: 'sparePartsStock'
activeName: ''
}
},
mounted() {
this.activeName = this.$router.history.current.name
},
methods: {
handleSelect(name) {
this.$router.push({ name: name })

View File

@ -19,11 +19,11 @@ export default {
name: 'GenerateReports',
data() {
return {
activeName: 'productionReport'
activeName: ''
}
},
mounted() {
console.log(this.$router)
this.activeName = this.$router.history.current.name
},
methods: {
handleSelect(name) {

View File

@ -20,10 +20,12 @@ export default {
name: 'ProcessFullInspection',
data() {
return {
activeName: 'fullInspection'
activeName: ''
}
},
mounted() {},
mounted() {
this.activeName = this.$router.history.current.name
},
methods: {
handleSelect(name) {
this.$router.push({ name: name })