|
|
|
@ -260,6 +260,7 @@ |
|
|
|
import {queryCustomer |
|
|
|
} from "@/api/customer/customerInformation"; |
|
|
|
import item from "../../code/item.vue"; |
|
|
|
import {queryUsernameByRoleSuperFlag} from "../../../../api/project/project"; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
@ -533,14 +534,12 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
init (id) { |
|
|
|
console.log(id) |
|
|
|
this.dataForm.id = id || 0 |
|
|
|
let requestCustomer = null; |
|
|
|
if (this.dataForm.customerId){ |
|
|
|
requestCustomer = JSON.parse(JSON.stringify(this.dataForm)) |
|
|
|
} |
|
|
|
if(this.dataForm.id!==0){ |
|
|
|
console.log(111) |
|
|
|
let inData={ |
|
|
|
page: 1, |
|
|
|
limit: 10, |
|
|
|
@ -601,6 +600,19 @@ |
|
|
|
// 默认插入当前用户 |
|
|
|
this.addRollForUsername(this.$store.state.user.name,this.$store.state.user.userDisplay) |
|
|
|
// this.searchUserRollAll(); |
|
|
|
// 添加超级管理员角色 |
|
|
|
let params = { |
|
|
|
site: this.$store.state.user.site |
|
|
|
} |
|
|
|
queryUsernameByRoleSuperFlag(params).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
let rows = [] |
|
|
|
rows = data.rows; |
|
|
|
rows.forEach(item => { |
|
|
|
this.addRollForUsername(item.username,item.userDisplay) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
if (requestCustomer) { |
|
|
|
this.initCustomer(requestCustomer) |
|
|
|
|