diff --git a/src/api/user/user.js b/src/api/user/user.js index a8d54c2..be57ca7 100644 --- a/src/api/user/user.js +++ b/src/api/user/user.js @@ -21,9 +21,9 @@ export const getUserAccount = () => { method: 'get' }) } -export const judgeIsSameRole = () => { +export const judgeIsSameRole = (userId) => { return request({ - url: '/admin/mosr/user/company/same', + url: `/admin/mosr/user/company/same/${userId}`, method: 'get' }) } diff --git a/src/views/system/user/add.vue b/src/views/system/user/add.vue index f7332db..68b31a2 100644 --- a/src/views/system/user/add.vue +++ b/src/views/system/user/add.vue @@ -122,9 +122,9 @@ const schame = computed(() => { }, on: { change: async (val) => { - const {code, data} = await judgeIsSameRole() + const {code, data} = await judgeIsSameRole(form.value.getValues().userId) if (code === 1000) { - console.log('currentRoleArray.value', currentRoleArray.value) + console.log('currentRoleArray.value',data) if (currentRoleArray.value.length !== 0) { val.forEach(selectItem => { currentRoleArray.value.forEach(currentItem => {