This commit is contained in:
xiongchengqiang 2020-12-21 12:33:23 +08:00
parent ba38a2490f
commit 246ed40a9a
3 changed files with 20 additions and 4 deletions

View File

@ -3,7 +3,10 @@
<div v-if="!dd.pc && !dd.other" class="pc commonFont"> <div v-if="!dd.pc && !dd.other" class="pc commonFont">
请移步PC端操作 请移步PC端操作
</div> </div>
<router-view v-else class="main"/> <keep-alive>
<router-view class="main"/>
</keep-alive>
<div @dblclick="handleShowVcnsole" class="baaa" style="width:20px;height:20px;"></div> <div @dblclick="handleShowVcnsole" class="baaa" style="width:20px;height:20px;"></div>
</div> </div>
</template> </template>

View File

@ -1,7 +1,10 @@
<!-- --> <!-- -->
<template> <template>
<div> <div>
<router-view></router-view> <keep-alive >
<router-view v-if="$route.meta.kppeAlive"></router-view>
</keep-alive >
<router-view v-if="!$route.meta.kppeAlive"></router-view>
</div> </div>
</template> </template>

View File

@ -232,6 +232,7 @@ import { apiManagerDetail, apiChartList, apiAssessManagerToScore, apiManagerUrgi
import { getStartsData } from '@/api/report' import { getStartsData } from '@/api/report'
let id = 0 let id = 0
export default { export default {
name: 'assessment-stepList',
data () { data () {
return { return {
options: { options: {
@ -253,7 +254,7 @@ export default {
'evaluationIds': '', 'evaluationIds': '',
'flowProcess': null, 'flowProcess': null,
'pageSize': 10, 'pageSize': 10,
'staffIds': '', 'staffIds': this.$route.query.staffIds || '',
'staffName': '', 'staffName': '',
'startId': 10 'startId': 10
}, },
@ -295,9 +296,18 @@ export default {
} }
}, },
beforeMount () { }, beforeMount () { },
created () {
console.log(12345)
},
beforeRouteLeave (to, from, next) {
// ...
this.$route.meta.kppeAlive = to.name === 'assessment-performance'
next()
},
async mounted () { async mounted () {
this.params.startId = Number(this.$route.query.id) this.params.startId = Number(this.$route.query.id)
await this.handleStartsReq() await this.handleStartsReq()
console.log(123)
}, },
methods: { methods: {
async handleAddCuiBan () { async handleAddCuiBan () {
@ -418,7 +428,7 @@ export default {
this.params.startId = item[1] this.params.startId = item[1]
this.$router.replace({ this.$router.replace({
name: 'assessment-stepList', name: 'assessment-stepList',
query: { query: {...this.$route.query,
id: item[1] id: item[1]
} }
}) })