You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
117 lines
2.1 KiB
117 lines
2.1 KiB
const schema = {
|
|
title: "用户",
|
|
type: "object",
|
|
properties: {
|
|
userName: {
|
|
title: "用户名",
|
|
type: "string",
|
|
readOnly: true, //
|
|
showForList: true,
|
|
rules: [
|
|
{
|
|
required: true,
|
|
},
|
|
{
|
|
max: 64,
|
|
message: "用户名的最大长度为 64",
|
|
},
|
|
],
|
|
},
|
|
password: {
|
|
title: "密码",
|
|
type: "string",
|
|
input: "password",
|
|
},
|
|
name: {
|
|
title: "姓名",
|
|
type: "string",
|
|
showForList: true,
|
|
rules: [
|
|
{
|
|
required: true,
|
|
},
|
|
],
|
|
},
|
|
phoneNumber: {
|
|
title: "电话",
|
|
type: "string",
|
|
showForList: true,
|
|
rules: [
|
|
{
|
|
required: true,
|
|
},
|
|
],
|
|
},
|
|
email: {
|
|
title: "邮箱",
|
|
type: "string",
|
|
showForList: true,
|
|
rules: [
|
|
{
|
|
required: true,
|
|
},
|
|
],
|
|
},
|
|
roleNames: {
|
|
title: "角色",
|
|
type: "array",
|
|
input: "select",
|
|
multiple: true,
|
|
url: "identity/roles/all",
|
|
value: "name",
|
|
label: "name",
|
|
items: {
|
|
type: "string",
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
const url = "base/user";
|
|
const createUrl = url;
|
|
const updateUrl = url;
|
|
const deleteUrl = "api/identity/users";
|
|
const method = "get";
|
|
const createMethod = "post";
|
|
const updateMethod = "put";
|
|
const deleteMethod = "delete";
|
|
|
|
export default function () {
|
|
return {
|
|
query: {
|
|
url,
|
|
method,
|
|
schema: {
|
|
title: "用户",
|
|
type: "object",
|
|
properties: {
|
|
filter: {
|
|
title: "用户名",
|
|
type: "string",
|
|
},
|
|
skipCount: {
|
|
hidden: true,
|
|
default: 0,
|
|
},
|
|
maxResultCount: {
|
|
hidden: true,
|
|
default: 10,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
table: {
|
|
schema: schema,
|
|
selectable: (o) => o.name !== "admin",
|
|
},
|
|
edit: {
|
|
createUrl,
|
|
updateUrl,
|
|
deleteUrl,
|
|
createMethod,
|
|
updateMethod,
|
|
deleteMethod,
|
|
schema: schema,
|
|
},
|
|
};
|
|
}
|
|
|