const schema = { title: "通用代码", type: "object", properties: { project: { title: "项目", type: "string", readOnly: true, showForList: true, rules: [ { required: true, }, ], }, value: { title: "值", type: "string", readOnly: true, showForList: true, rules: [ { required: true, }, ], }, description: { title: "描述", type: "string", showForList: true, rules: [ { required: true, }, ], }, }, }; const baseUrl = "settleaccount/CodeSetting"; const queryUrl = `${baseUrl}/GetList`; const detailsUrl = `${baseUrl}/GET/%s`; const createUrl = `${baseUrl}/Create`; const updateUrl = `${baseUrl}/Update/%s`; const deleteUrl = `${baseUrl}/DeleteList`; const queryMethod = "POST"; const detailsMethod = "POST"; const createMethod = "POST"; const updateMethod = "POST"; const deleteMethod = "POST"; export default function () { return { query: { url: queryUrl, method: queryMethod, schema: { title: "通用代码", type: "object", properties: { project: { type: "string", }, value: { type: "string", }, description: { type: "string", }, filters: { title: "项目", type: "array", items: { type: "object", properties: { logic: { type: "int", }, column: { type: "string", }, action: { type: "int", }, value: { type: "string", }, }, }, }, skipCount: { hidden: true, default: 0, }, maxResultCount: { hidden: true, default: 10, }, sorting: { hidden: true, }, }, }, }, table: { schema: schema, }, edit: { detailsUrl, createUrl, updateUrl, deleteUrl, detailsMethod, createMethod, updateMethod, deleteMethod, schema: schema, }, }; }