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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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