|
|
|
@ -3,13 +3,13 @@ import useUserStore from '@/store/modules/user'; |
|
|
|
export function getNameById(id) { |
|
|
|
const userStore = useUserStore(); |
|
|
|
const list = userStore.dsSysList || []; |
|
|
|
const item = list.find(x => x.id === id); |
|
|
|
const item = list.find(x => x.id == id); |
|
|
|
return item ? item.name : ''; |
|
|
|
} |
|
|
|
|
|
|
|
export function getIdByName(name) { |
|
|
|
const userStore = useUserStore(); |
|
|
|
const list = userStore.dsSysList || []; |
|
|
|
const item = list.find(x => x.name === name); |
|
|
|
const item = list.find(x => x.name == name); |
|
|
|
return item ? item.id : null; |
|
|
|
} |
|
|
|
|