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.
132 lines
2.7 KiB
132 lines
2.7 KiB
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",
|
|
input: "textarea",
|
|
showForList: true,
|
|
rules: [
|
|
{
|
|
required: true,
|
|
},
|
|
{ max: 60 },
|
|
],
|
|
},
|
|
},
|
|
};
|
|
|
|
const baseUrl = "settleaccount/code-setting";
|
|
const queryUrl = `${baseUrl}/get-list`;
|
|
const detailsUrl = `${baseUrl}/get/%s`;
|
|
const createUrl = `${baseUrl}/create`;
|
|
const updateUrl = `${baseUrl}/update/%s`;
|
|
const deleteUrl = `${baseUrl}/delete-list`;
|
|
const importUrl = `${baseUrl}/code-setting-upload-excel-import`;
|
|
const exportUrl = `${baseUrl}/export`;
|
|
const queryMethod = "POST";
|
|
const detailsMethod = "POST";
|
|
const createMethod = "POST";
|
|
const updateMethod = "POST";
|
|
const deleteMethod = "POST";
|
|
const importMethod = "POST";
|
|
const exportMethod = "POST";
|
|
|
|
export default function () {
|
|
return {
|
|
query: {
|
|
url: queryUrl,
|
|
method: queryMethod,
|
|
hasFilter: true,
|
|
schema: {
|
|
title: "通用代码",
|
|
type: "object",
|
|
properties: {
|
|
filters: {
|
|
title: "项目",
|
|
type: "array",
|
|
hidden: true,
|
|
items: {
|
|
type: "object",
|
|
properties: {
|
|
logic: {
|
|
type: "int",
|
|
},
|
|
column: {
|
|
type: "string",
|
|
},
|
|
action: {
|
|
type: "int",
|
|
},
|
|
value: {
|
|
type: "string",
|
|
},
|
|
},
|
|
},
|
|
default: [
|
|
{
|
|
logic: "and",
|
|
column: "project",
|
|
action: "like",
|
|
value: null,
|
|
readOnly: true,
|
|
},
|
|
],
|
|
},
|
|
skipCount: {
|
|
hidden: true,
|
|
default: 0,
|
|
},
|
|
maxResultCount: {
|
|
hidden: true,
|
|
default: 10,
|
|
},
|
|
sorting: {
|
|
hidden: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
table: {
|
|
schema: schema,
|
|
},
|
|
edit: {
|
|
detailsUrl,
|
|
createUrl,
|
|
updateUrl,
|
|
deleteUrl,
|
|
importUrl,
|
|
exportUrl,
|
|
detailsMethod,
|
|
createMethod,
|
|
updateMethod,
|
|
deleteMethod,
|
|
importMethod,
|
|
exportMethod,
|
|
schema: schema,
|
|
},
|
|
};
|
|
}
|
|
|