Browse Source

获取dsname修改

master
siyaqi 1 week ago
parent
commit
c5f0833386
  1. 4
      vue-fastapi-frontend/src/utils/dsSysUtils.js

4
vue-fastapi-frontend/src/utils/dsSysUtils.js

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

Loading…
Cancel
Save