列表页和新增页 第一版

master
3y 3 years ago
parent 2706b59ab1
commit 35fc2ae00a

@ -47,13 +47,13 @@
const app = { const app = {
type: 'app', type: 'app',
brandName: 'Admin', brandName: 'Austin',
logo: '/public/logo.png', logo: '/public/logo.png',
header: { header: {
type: 'tpl', type: 'tpl',
inline: false, inline: false,
className: 'w-full', className: 'w-full',
tpl: '<div class="flex justify-between"><div>顶部区域左侧</div><div>顶部区域右侧</div></div>' tpl: '<div class="flex justify-between"><div></div><div><a href="http://github.com/ZhongFuCheng3y/austin">帮助手册</a></div></div>'
}, },
// footer: '<div class="p-2 text-center bg-light">底部区域</div>', // footer: '<div class="p-2 text-center bg-light">底部区域</div>',
// asideBefore: '<div class="p-2 text-center">菜单前面区域</div>', // asideBefore: '<div class="p-2 text-center">菜单前面区域</div>',

@ -13,7 +13,7 @@
"body": [ "body": [
{ {
"type": "form", "type": "form",
"initApi": "http://localhost:8080/messageTemplate/queryById/${params.id}", "initApi": "http://localhost:8080/messageTemplate/query/${params.id}",
"api": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/sample/$id", "api": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/sample/$id",
"redirect": "/crud/list", "redirect": "/crud/list",
"controls": [ "controls": [

@ -23,9 +23,10 @@
"mode": "inline", "mode": "inline",
"wrapWithPanel": false, "wrapWithPanel": false,
"submitText": "", "submitText": "",
"controls": [ "className": "m-b-sm",
"body": [
{ {
"type": "text", "type": "input-text",
"name": "keywords", "name": "keywords",
"placeholder": "通过关键字搜索", "placeholder": "通过关键字搜索",
"addOn": { "addOn": {
@ -33,39 +34,18 @@
"type": "submit", "type": "submit",
"className": "btn-success" "className": "btn-success"
}, },
"clearable": true "clearable": true,
} "size": "lg"
],
"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"
} }
] ]
}
}
}, },
"bulkActions": [
{ {
"label": "批量删除", "label": "批量删除",
"type": "button", "type": "button",
"level": "danger", "level": "danger",
"actionType": "ajax", "actionType": "ajax",
"api": "delete:https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/sample/$ids", "api": "delete:http://localhost:8080/messageTemplate/delete/$ids",
"confirmText": "确定要批量删除?" "confirmText": "确定要批量删除?"
} }
], ],
@ -93,6 +73,25 @@
"60": "小程序" "60": "小程序"
} }
}, },
{
"name": "templateType",
"label": "模板类型",
"type": "mapping",
"map": {
"10": "定时任务发送",
"20": "实时调用接口"
}
},
{
"name": "msgType",
"label": "消息类型",
"type": "mapping",
"map": {
"10": "通知类",
"20": "营销类",
"30": "验证码"
}
},
{ {
"name": "creator", "name": "creator",
"label": "创建者" "label": "创建者"
@ -151,13 +150,21 @@
"actionType": "link", "actionType": "link",
"link": "/crud/${id}/edit" "link": "/crud/${id}/edit"
}, },
{
"type": "button",
"label": "复制",
"level": "warning",
"actionType": "ajax",
"confirmText": "您确认要复制?",
"api": "post:http://localhost:8080/messageTemplate/copy/$id"
},
{ {
"type": "button", "type": "button",
"label": "删除", "label": "删除",
"level": "danger", "level": "danger",
"actionType": "ajax", "actionType": "ajax",
"confirmText": "您确认要删除?", "confirmText": "您确认要删除?",
"api": "delete:https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/sample/$id" "api": "delete:http://localhost:8080/messageTemplate/delete/$id"
} }
] ]
} }

@ -15,7 +15,21 @@
"mode": "horizontal", "mode": "horizontal",
"title": "", "title": "",
"affixFooter": true, "affixFooter": true,
"api": "http://localhost:8080/messageTemplate/save", "api": {
"url": "http://localhost:8080/messageTemplate/save",
"method": "post",
"data": {
"name": "${name}",
"idType": "${idType}",
"msgType": "${msgType}",
"templateType": "${templateType}",
"expectPushTime": "${expectPushTime}",
"proposer": "${proposer}",
"sendChannel": "${sendChannel}",
"sendAccount": "${sendAccount}",
"msgContent": "{\"content\":\"${content}\",\"url\":\"${url}\"}"
}
},
"actions": [ "actions": [
{ {
"label": "保存", "label": "保存",
@ -117,7 +131,9 @@
"mode": "", "mode": "",
"description": "" "description": ""
} }
] ],
"className": "Collapse--lg",
"bodyClassName": "r-3x w-full text-lg r font-bold"
}, },
{ {
"type": "fieldSet", "type": "fieldSet",
@ -193,11 +209,17 @@
"clearValueOnHidden": false "clearValueOnHidden": false
} }
], ],
"className": "" "className": "Collapse--lg",
"bodyClassName": "r-3x w-full text-lg r font-bold"
} }
], ],
"panelClassName": "Panel--default", "panelClassName": "Panel--default",
"bodyClassName": "text-lg" "bodyClassName": "text-lg"
} }
] ],
"messages": {
},
"style": {
},
"bodyClassName": "p-lg p-t-lg p-r-lg p-b-lg p-l-lg m-none m-l-lg m-b-lg m-r-lg m-t-lg m-lg b-5x b-dark r-3x text-dark bg-white w-full font-bold text-lg"
} }
Loading…
Cancel
Save