优化
This commit is contained in:
parent
375b60d4c2
commit
8fc5045558
@ -9,6 +9,11 @@ import { mapState, mapActions } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
data () {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<div class="performance-content boderAndRadius">
|
||||
<div class="performance-content-title">
|
||||
<InfoHeader :obj="{
|
||||
src:obj.avatar,
|
||||
src:obj.avatar || '',
|
||||
name:obj.staffName,
|
||||
departmentName:obj.departmentName
|
||||
}" />
|
||||
@ -182,6 +182,7 @@ export default {
|
||||
methods: {
|
||||
async handleGetTbale (id = this.$route.query.id) {
|
||||
let res = await apiResultGetDetail({ id })
|
||||
if (res.code !== 200) return
|
||||
this.obj = res.data
|
||||
console.log('res: ', res)
|
||||
},
|
||||
|
||||
@ -42,7 +42,11 @@ export default {
|
||||
pageSize: 3,
|
||||
status: 0
|
||||
},
|
||||
selectedTableList: []
|
||||
selectedTableList: [],
|
||||
list: [{
|
||||
name: 'assessment-performance',
|
||||
tag: 'detail'
|
||||
}]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@ -52,7 +56,21 @@ export default {
|
||||
computed: {},
|
||||
beforeMount () {},
|
||||
mounted () {
|
||||
this.handleGetList()
|
||||
let search = window.location.search
|
||||
console.log('search: ', search)
|
||||
if (search) {
|
||||
const item = this.list.filter(i => '?' + i.tag === search.split('=')[0])
|
||||
if (item.length > 0) {
|
||||
this.$nextTick(() => {
|
||||
this.$router.replace({
|
||||
name: item[0].name,
|
||||
query: this.$route.query
|
||||
})
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.handleGetList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleGetList () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user