优化
This commit is contained in:
parent
419896f1a7
commit
e2a5b65c75
@ -38,7 +38,7 @@ const user = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
GET_DEPLIST: async ({ commit }) => {
|
GET_DEPLIST: async ({ commit }) => {
|
||||||
let data = getDepList({type: 1})
|
let data = await getDepList({type: 1})
|
||||||
commit('SET_DEPLIST', data.code === 200 ? data.data : [])
|
commit('SET_DEPLIST', data.code === 200 ? data.data : [])
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,5 +57,7 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
router.afterEach(async () => {
|
router.afterEach(async () => {
|
||||||
|
console.log('afterEach: ')
|
||||||
|
|
||||||
await store.dispatch('GET_DEPLIST')
|
await store.dispatch('GET_DEPLIST')
|
||||||
})
|
})
|
||||||
|
|||||||
@ -136,8 +136,6 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
info: {
|
info: {
|
||||||
handler (n, o) {
|
handler (n, o) {
|
||||||
console.log('n: ', n)
|
|
||||||
console.log('this.processLsit: ', this.processLsit)
|
|
||||||
this.processLsit.length > 0 && this.processLsit.map(j => {
|
this.processLsit.length > 0 && this.processLsit.map(j => {
|
||||||
for (let i in n) {
|
for (let i in n) {
|
||||||
if (n[i] && j.id === n[i].id) j.label = n[i].label
|
if (n[i] && j.id === n[i].id) j.label = n[i].label
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user