自己操作

master
lion 2 years ago
parent 59f4a66da5
commit 3f23db3de5

@ -53,8 +53,8 @@
destroy
} from "@/api/system/baseForm.js"
import {
getWzglUser
} from "@/utils/auth.js"
getInfo
} from "@/api/user.js"
import {
getOutboundsStatus
} from "@/api/contract.js"
@ -160,14 +160,25 @@
},
methods: {
async getUserName(){
const res = await JSON.parse(getWzglUser())
this.userName = res.username
this.authName = res.name
for(var k of res.role){
if(k.name=='系统管理员'){
this.roleName = k.name
}
}
getInfo().then(res => {
console.log("res",res)
this.userName = res.username
this.authName = res.name
for(var k of res.role){
if(k.name=='系统管理员'){
this.roleName = k.name
}
}
}).catch(error => {})
// const res = await JSON.parse(getWzglUser())
// this.userName = res.username
// this.authName = res.name
// for(var k of res.role){
// if(k.name==''){
// this.roleName = k.name
// }
// }
},
async getindex() {
this.loading = true

@ -56,8 +56,8 @@
Message
} from 'element-ui'
import {
getWzglUser
} from "@/utils/auth.js"
getInfo
} from "@/api/user.js"
import imports from "@/views/component/imports.vue"
import {
index as fieldIndex
@ -152,14 +152,21 @@
},
methods: {
async getUserName(){
const res = JSON.parse(getWzglUser())
console.log("res",res)
for(var k of res.role){
if(k.name=='系统管理员'){
this.roleName = k.name
// const res = JSON.parse(getWzglUser())
// console.log("res",res)
// for(var k of res.role){
// if(k.name==''){
// this.roleName = k.name
// }
// }
getInfo().then(res => {
for(var k of res.role){
if(k.name=='系统管理员'){
this.roleName = k.name
}
}
}
this.authName = res.name
this.authName = res.name
}).catch(error => {})
},
async getindex() {

Loading…
Cancel
Save