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.

181 lines
4.9 KiB

{
"type": "page",
"title": "列表管理",
"remark": null,
"name": "page-demo",
"toolbar": [
{
"type": "button",
"actionType": "link",
"link": "/crud/new",
"icon": "fa fa-plus",
"label": "新增",
"primary": true
}
],
"body": [
{
"type": "crud",
"name": "sample",
"api": "http://localhost:8080/messageTemplate/list",
"filter": {
"title": "",
"mode": "inline",
"wrapWithPanel": false,
"submitText": "",
"controls": [
{
"type": "text",
"name": "keywords",
"placeholder": "通过关键字搜索",
"addOn": {
"label": "搜索",
"type": "submit",
"className": "btn-success"
},
"clearable": true
}
],
"className": "m-b-sm"
},
"bulkActions": [
{
"label": "批量修改",
"type": "button",
"actionType": "dialog",
"level": "primary",
"dialog": {
"title": "批量编辑",
"name": "sample-bulk-edit",
"body": {
"type": "form",
"api": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/sample/bulkUpdate2",
"controls": [
{
"type": "text",
"name": "engine",
"label": "Engine"
}
]
}
}
},
{
"label": "批量删除",
"type": "button",
"level": "danger",
"actionType": "ajax",
"api": "delete:https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/sample/$ids",
"confirmText": "确定要批量删除?"
}
],
"columns": [
{
"name": "id",
"label": "ID",
"width": 20,
"sortable": true
},
{
"name": "name",
"label": "模板消息名"
},
{
"name": "sendChannel",
"label": "发送渠道",
"type": "mapping",
"map": {
"10": "IM站内信",
"20": "PUSH通知栏",
"30": "短信",
"40": "邮箱",
"50": "服务号",
"60": "小程序"
}
},
{
"name": "creator",
"label": "创建者"
},
{
"name": "idType",
"label": "接收者ID类型",
"type": "mapping",
"map": {
"10": "用户ID",
"20": "设备号",
"30": "手机号",
"40": "openId",
"50": "邮箱地址"
}
},
{
"type": "operation",
"label": "操作",
"width": "",
"buttons": [
{
"type": "button-group",
"buttons": [
{
"type": "button",
"label": "测试",
"level": "primary",
"actionType": "dialog",
"dialog": {
"title": "测试一条消息",
"body": {
"type": "form",
"api": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/form/saveForm",
"body": [
{
"type": "input-text",
"name": "groupName",
"label": "接收者"
}
]
}
}
},
{
"type": "button",
"label": "查看",
"level": "primary",
"actionType": "link",
"link": "/crud/${id}"
},
{
"type": "button",
"label": "修改",
"level": "info",
"actionType": "link",
"link": "/crud/${id}/edit"
},
{
"type": "button",
"label": "删除",
"level": "danger",
"actionType": "ajax",
"confirmText": "您确认要删除?",
"api": "delete:https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/sample/$id"
}
]
}
],
"placeholder": "-",
"fixed": "right"
}
],
"affixHeader": true,
"columnsTogglable": "auto",
"placeholder": "暂无数据",
"tableClassName": "table-db table-striped",
"headerClassName": "crud-table-header",
"footerClassName": "crud-table-footer",
"toolbarClassName": "crud-table-toolbar",
"combineNum": 0,
"bodyClassName": "panel-default"
}
]
}