43 lines
888 B
Plaintext
43 lines
888 B
Plaintext
import { FormSchema } from '@/components/Form/index';
|
|
import { getRoleAllList } from '@/api/system/role';
|
|
export const loadSelectData = async (res) => {
|
|
//这里可以进行数据转换处理
|
|
return (await getRoleAllList({ ...res })).map((item, index) => {
|
|
return {
|
|
...item,
|
|
label: item.name,
|
|
value: item.id,
|
|
index,
|
|
};
|
|
});
|
|
};
|
|
export const schemas: FormSchema[] = [
|
|
{
|
|
name: 'name',
|
|
component: 'Input',
|
|
label: '租户名称',
|
|
componentProps: {
|
|
placeholder: '请输入租户名称',
|
|
},
|
|
},
|
|
{
|
|
name: 'status',
|
|
component: 'Select',
|
|
label: '状态',
|
|
componentProps: {
|
|
placeholder: '请选择状态',
|
|
clearable: true,
|
|
options: [
|
|
{
|
|
label: '正常',
|
|
value: '0',
|
|
},
|
|
{
|
|
label: '禁用',
|
|
value: '1',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
];
|