4 changed files with 73 additions and 49 deletions
@ -1,13 +1,46 @@
|
||||
import request from '@/axios'; |
||||
|
||||
export const getList = (current, size, params) => { |
||||
return request({ |
||||
url: '/api/logpm-basicdata/basicdataBrand/list', |
||||
method: 'get', |
||||
params: { |
||||
...params, |
||||
current, |
||||
size, |
||||
import { getSelect } from '@/api/base/region'; |
||||
|
||||
let optioner = []; |
||||
|
||||
export async function useGetGlobalProperties (){ |
||||
let shu = []; |
||||
let bb = await getSelect(''); |
||||
|
||||
for (const it of bb.data.data) { |
||||
let a = { |
||||
value: it.code, |
||||
label: it.name, |
||||
children: [] |
||||
}; |
||||
let res = await getSelect(it.code) |
||||
let shi = []; |
||||
for (const i of res.data.data){ |
||||
let b ={ |
||||
value: i.code, |
||||
label: i.name, |
||||
children: [] |
||||
} |
||||
let er = []; |
||||
let res = await getSelect(i.code); |
||||
|
||||
res.data.data.forEach( l =>{ |
||||
let a ={ |
||||
value: l.code, |
||||
label: l.name, |
||||
} |
||||
er.push(a); |
||||
}) |
||||
b.children = er; |
||||
shi.push(b); |
||||
} |
||||
}) |
||||
a.children= shi; |
||||
shu.push(a); |
||||
} |
||||
optioner = shu; |
||||
return shu; |
||||
} |
||||
|
||||
export default { useGetGlobalProperties , optioner} ; |
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in new issue