275 lines
7.8 KiB
JSON
275 lines
7.8 KiB
JSON
{
|
|
"type": "page",
|
|
"title": "复杂表单",
|
|
"subTitle": "展示表格编辑、联动等等",
|
|
"body": [
|
|
{
|
|
"type": "form",
|
|
"mode": "horizontal",
|
|
"title": "",
|
|
"affixFooter": true,
|
|
"api": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/form/save",
|
|
"actions": [
|
|
{
|
|
"label": "保存",
|
|
"type": "submit",
|
|
"level": "success"
|
|
}
|
|
],
|
|
"controls": [
|
|
{
|
|
"type": "fieldSet",
|
|
"title": "基本配置",
|
|
"controls": [
|
|
{
|
|
"type": "text",
|
|
"label": "任务名称",
|
|
"name": "title",
|
|
"size": "md",
|
|
"required": true
|
|
},
|
|
|
|
{
|
|
"type": "textarea",
|
|
"label": "任务描述",
|
|
"name": "description",
|
|
"size": "md"
|
|
},
|
|
|
|
{
|
|
"label": "任务频率",
|
|
"type": "radios",
|
|
"name": "repeat",
|
|
"inline": true,
|
|
"value": "none",
|
|
"required": true,
|
|
"options": [
|
|
{
|
|
"label": "不重复",
|
|
"value": "none"
|
|
},
|
|
|
|
{
|
|
"label": "每天",
|
|
"value": "day"
|
|
},
|
|
|
|
{
|
|
"label": "每周",
|
|
"value": "week"
|
|
},
|
|
|
|
{
|
|
"label": "每月",
|
|
"value": "month"
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
"label": "每天几点",
|
|
"type": "select",
|
|
"name": "time",
|
|
"multiple": true,
|
|
"required": true,
|
|
"extractValue": true,
|
|
"visibleOn": "this.repeat == \"day\"",
|
|
"inline": true,
|
|
"options": [
|
|
{"value": 0, "label": "0:00"},
|
|
{"value": 1, "label": "1:00"},
|
|
{"value": 2, "label": "2:00"},
|
|
{"value": 3, "label": "3:00"},
|
|
{"value": 4, "label": "4:00"},
|
|
{"value": 5, "label": "5:00"},
|
|
{"value": 6, "label": "6:00"},
|
|
{"value": 7, "label": "7:00"},
|
|
{"value": 8, "label": "8:00"},
|
|
{"value": 9, "label": "9:00"},
|
|
{"value": 10, "label": "10:00"},
|
|
{"value": 11, "label": "11:00"},
|
|
{"value": 12, "label": "12:00"},
|
|
{"value": 13, "label": "13:00"},
|
|
{"value": 14, "label": "14:00"},
|
|
{"value": 15, "label": "15:00"},
|
|
{"value": 16, "label": "16:00"},
|
|
{"value": 17, "label": "17:00"},
|
|
{"value": 18, "label": "18:00"},
|
|
{"value": 19, "label": "19:00"},
|
|
{"value": 20, "label": "20:00"},
|
|
{"value": 21, "label": "21:00"},
|
|
{"value": 22, "label": "22:00"},
|
|
{"value": 23, "label": "23:00"}
|
|
]
|
|
},
|
|
|
|
{
|
|
"label": "每周几执行",
|
|
"type": "button-group",
|
|
"name": "weekdays",
|
|
"size": "md",
|
|
"visibleOn": "this.repeat == \"week\"",
|
|
"clearable": true,
|
|
"multiple": true,
|
|
"required": true,
|
|
"extractValue": true,
|
|
"maxLength": 7,
|
|
"options": [
|
|
{
|
|
"label": "周一",
|
|
"value": "0"
|
|
},
|
|
|
|
{
|
|
"label": "周二",
|
|
"value": "1"
|
|
},
|
|
|
|
{
|
|
"label": "周三",
|
|
"value": "2"
|
|
},
|
|
|
|
{
|
|
"label": "周四",
|
|
"value": "3"
|
|
},
|
|
|
|
{
|
|
"label": "周五",
|
|
"value": "4"
|
|
},
|
|
|
|
{
|
|
"label": "周六",
|
|
"value": "5"
|
|
},
|
|
|
|
{
|
|
"label": "周日",
|
|
"value": "6"
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
"label": "每月几号执行",
|
|
"type": "list",
|
|
"name": "monthday",
|
|
"size": "md",
|
|
"visibleOn": "this.repeat == \"month\"",
|
|
"required": true,
|
|
"maxLength": 31,
|
|
"clearable": true,
|
|
"multiple": true,
|
|
"extractValue": true,
|
|
"options": [
|
|
{"value": 0, "label": "01"},
|
|
{"value": 1, "label": "02"},
|
|
{"value": 2, "label": "03"},
|
|
{"value": 3, "label": "04"},
|
|
{"value": 4, "label": "05"},
|
|
{"value": 5, "label": "06"},
|
|
{"value": 6, "label": "07"},
|
|
{"value": 7, "label": "08"},
|
|
{"value": 8, "label": "09"},
|
|
{"value": 9, "label": "10"},
|
|
{"value": 10, "label": "11"},
|
|
{"value": 11, "label": "12"},
|
|
{"value": 12, "label": "13"},
|
|
{"value": 13, "label": "14"},
|
|
{"value": 14, "label": "15"},
|
|
{"value": 15, "label": "16"},
|
|
{"value": 16, "label": "17"},
|
|
{"value": 17, "label": "18"},
|
|
{"value": 18, "label": "19"},
|
|
{"value": 19, "label": "20"},
|
|
{"value": 20, "label": "21"},
|
|
{"value": 21, "label": "22"},
|
|
{"value": 22, "label": "23"},
|
|
{"value": 23, "label": "24"},
|
|
{"value": 24, "label": "25"},
|
|
{"value": 25, "label": "26"},
|
|
{"value": 26, "label": "27"},
|
|
{"value": 27, "label": "28"},
|
|
{"value": 28, "label": "29"},
|
|
{"value": 29, "label": "30"},
|
|
{"value": 30, "label": "31"}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
"type": "fieldSet",
|
|
"title": "其他信息",
|
|
"collapsable": true,
|
|
"controls": [
|
|
{
|
|
"type": "combo",
|
|
"name": "admins",
|
|
"label": "用户列表",
|
|
"value": [""],
|
|
"description": "请输入用户信息,不要重复。",
|
|
"multiple": true,
|
|
"inline": true,
|
|
"controls": [
|
|
{
|
|
"type": "text",
|
|
"name": "name",
|
|
"unique": true
|
|
},
|
|
|
|
{
|
|
"type": "select",
|
|
"name": "perm",
|
|
"value": "read",
|
|
"options": [
|
|
{
|
|
"label": "可读",
|
|
"value": "read"
|
|
},
|
|
|
|
{
|
|
"label": "可写",
|
|
"value": "write"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"label": "新增一行",
|
|
"type": "button",
|
|
"actionType": "add",
|
|
"target": "thetable",
|
|
"level": "info"
|
|
},
|
|
{
|
|
"name": "thetable",
|
|
"type": "table",
|
|
"label": "任务参数",
|
|
"editable": true,
|
|
"addable": true,
|
|
"removable": true,
|
|
"columns": [
|
|
{
|
|
"label": "参数名",
|
|
"name": "key",
|
|
"quickEdit": true
|
|
},
|
|
|
|
{
|
|
"label": "参数值",
|
|
"name": "value",
|
|
"quickEdit": true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|