|
|
@ -86,6 +86,7 @@ import { |
|
|
|
details, |
|
|
|
dictType, |
|
|
|
getListOrg, |
|
|
|
getUseOrgByUserSid, |
|
|
|
namesDown, |
|
|
|
SaveList, |
|
|
|
selectListOrg, |
|
|
@ -235,25 +236,29 @@ export default { |
|
|
|
}, |
|
|
|
// 所有分公司 |
|
|
|
getListOrgAll() { |
|
|
|
getListOrg().then((res) => { |
|
|
|
const userSid = window.sessionStorage.getItem('userSid') |
|
|
|
getUseOrgByUserSid({userSid: userSid}).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.getListOrgAll0(res.data.sid) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getListOrgAll0(useOrgSid) { |
|
|
|
getListOrg({sid: useOrgSid}).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.useOrg_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getuseOrg(val) { |
|
|
|
console.log('选择的使用组织', val,this.useOrg_list) |
|
|
|
var choosetItem = [] |
|
|
|
val.forEach((ele) => { |
|
|
|
console.log('111222333',ele) |
|
|
|
choosetItem.push(this.useOrg_list.filter((item) => ele == item.sid)[0]) |
|
|
|
}) |
|
|
|
console.log('使用组织chooseItem', choosetItem) |
|
|
|
const useOrgName = [] |
|
|
|
choosetItem.forEach((e) => { |
|
|
|
useOrgName.push(e.name) |
|
|
|
}) |
|
|
|
console.log('所选组织名字数组', useOrgName) |
|
|
|
this.temp.useOrg = val.join() |
|
|
|
this.temp.useOrgName = useOrgName.join() |
|
|
|
console.log('使用组织name:', this.temp.useOrgName, '使用组织sid:', this.temp.useOrg) |
|
|
|