14 lines
421 B
TypeScript
14 lines
421 B
TypeScript
import { ref } from 'vue';
|
||
import { List as TenantList } from '@/api/imTenant';
|
||
|
||
export const imQueryTenantOptions = ref<any[]>([]);
|
||
|
||
export async function loadImQueryTenantOptions() {
|
||
const res = await TenantList({ page: 1, perPage: 100 });
|
||
imQueryTenantOptions.value = (res?.list || []).map((item) => ({
|
||
label: `${item.name}(${item.code})`,
|
||
value: item.id,
|
||
}));
|
||
return imQueryTenantOptions.value;
|
||
}
|