|
|
@ -763,11 +763,13 @@ const getLists = async function () { |
|
|
|
} |
|
|
|
console.log('看看data', data.value) |
|
|
|
console.log('parentID:', addRole.value.parentId, 'roleId:', roleId) |
|
|
|
if (addRole.value.parentId) { |
|
|
|
if (addRole.value.parentId&& addRole.value.parentId!=2) { |
|
|
|
const result = await API({ |
|
|
|
url: '/general/roleMarket', |
|
|
|
data: { id: addRole.value.parentId } |
|
|
|
}) |
|
|
|
console.log('result11',result.data); |
|
|
|
|
|
|
|
if (result.code == 200) { |
|
|
|
if (typeof result.data === 'string' && result.data) { |
|
|
|
addRoleMarket.value = result.data.split(','); |
|
|
@ -783,17 +785,16 @@ const getLists = async function () { |
|
|
|
|
|
|
|
} |
|
|
|
console.log('addRoleMarket.value', addRoleMarket.value); |
|
|
|
} else { |
|
|
|
if (typeof adminData.value.markets === 'string' && adminData.value.markets) { |
|
|
|
addRoleMarket.value = adminData.value.markets.split(','); |
|
|
|
} else if (Array.isArray(adminData.value.markets)) { |
|
|
|
addRoleMarket.value = adminData.value.markets |
|
|
|
} else{ |
|
|
|
if (typeof market.value === 'string' && market.value) { |
|
|
|
addRoleMarket.value = market.value.split(','); |
|
|
|
} else if (Array.isArray(market.value)) { |
|
|
|
addRoleMarket.value = market.value |
|
|
|
} |
|
|
|
else { |
|
|
|
addRoleMarket.value = []; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
console.log('请求失败', error) |
|
|
|
} |
|
|
|