Files
im_manager/web/src/views/imAdminQueryShared.ts
T

14 lines
421 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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;
}