This commit is contained in:
熊成强 2020-11-04 10:26:07 +08:00
parent 375b60d4c2
commit 8fc5045558
3 changed files with 27 additions and 3 deletions

View File

@ -9,6 +9,11 @@ import { mapState, mapActions } from 'vuex'
export default { export default {
name: 'App', name: 'App',
data () {
return {
}
},
computed: { computed: {
...mapState(['user']) ...mapState(['user'])
}, },

View File

@ -5,7 +5,7 @@
<div class="performance-content boderAndRadius"> <div class="performance-content boderAndRadius">
<div class="performance-content-title"> <div class="performance-content-title">
<InfoHeader :obj="{ <InfoHeader :obj="{
src:obj.avatar, src:obj.avatar || '',
name:obj.staffName, name:obj.staffName,
departmentName:obj.departmentName departmentName:obj.departmentName
}" /> }" />
@ -182,6 +182,7 @@ export default {
methods: { methods: {
async handleGetTbale (id = this.$route.query.id) { async handleGetTbale (id = this.$route.query.id) {
let res = await apiResultGetDetail({ id }) let res = await apiResultGetDetail({ id })
if (res.code !== 200) return
this.obj = res.data this.obj = res.data
console.log('res: ', res) console.log('res: ', res)
}, },

View File

@ -42,7 +42,11 @@ export default {
pageSize: 3, pageSize: 3,
status: 0 status: 0
}, },
selectedTableList: [] selectedTableList: [],
list: [{
name: 'assessment-performance',
tag: 'detail'
}]
} }
}, },
components: { components: {
@ -52,7 +56,21 @@ export default {
computed: {}, computed: {},
beforeMount () {}, beforeMount () {},
mounted () { 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: { methods: {
handleGetList () { handleGetList () {