From 7cea2ce11c6a973ab6bf87b87e15da8a03b65ec6 Mon Sep 17 00:00:00 2001 From: 3y Date: Mon, 8 Aug 2022 20:53:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=94=AF=E6=8C=81=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E7=9A=84=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/account-list.json | 88 ++++++++++++++++ pages/account-new.json | 215 ++++++++++++++++++++++++++++++++++++++++ pages/site.json | 24 +++++ 3 files changed, 327 insertions(+) create mode 100644 pages/account-list.json create mode 100644 pages/account-new.json diff --git a/pages/account-list.json b/pages/account-list.json new file mode 100644 index 0000000..e03f09a --- /dev/null +++ b/pages/account-list.json @@ -0,0 +1,88 @@ +{ + "type": "page", + "title": "列表管理", + "body": [ + { + "type": "crud", + "api": "http://localhost:8080/account/list", + "bodyClassName": "panel-default", + "name": "sample", + "columns": [ + { + "name": "id", + "label": "ID", + "width": 20, + "sortable": true + }, + { + "name": "name", + "label": "账号名称" + }, + { + "name": "accountConfig", + "label": "账号配置信息" + }, + { + "name": "sendChannel", + "label": "发送渠道", + "type": "mapping", + "map": { + "10": "IM站内信", + "20": "PUSH通知栏", + "30": "短信", + "40": "邮箱", + "50": "服务号", + "60": "小程序", + "70": "企业微信应用消息", + "80": "钉钉群机器人", + "90": "钉钉工作消息", + "100": "企业微信机器人", + "110": "飞书机器人" + } + }, + { + "type": "operation", + "label": "操作", + "width": "", + "buttons": [ + { + "type": "button-group", + "buttons": [ + { + "type": "button", + "label": "删除", + "level": "danger", + "actionType": "ajax", + "confirmText": "您确认要删除?", + "api": "delete:http://localhost:8080/account/delete/$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 + } + ], + "toolbar": [ + { + "type": "button", + "actionType": "link", + "link": "/account/new", + "label": "新增", + "icon": "fa fa-plus", + "primary": true + } + ], + "remark": null, + "name": "page-demo" +} \ No newline at end of file diff --git a/pages/account-new.json b/pages/account-new.json new file mode 100644 index 0000000..9cedadd --- /dev/null +++ b/pages/account-new.json @@ -0,0 +1,215 @@ +{ + "type": "page", + "title": "新建消息模板配置", + "body": [ + { + "title": "", + "actions": [ + { + "label": "保存", + "type": "submit", + "level": "success" + } + ], + "body": [ + { + "type": "fieldSet", + "title": "基本配置", + "body": [ + { + "type": "input-text", + "label": "账号名", + "name": "name", + "size": "md", + "required": true + }, + { + "name": "sendChannel", + "label": "发送渠道", + "type": "radios", + "options": [ + { + "label": "IM站内信", + "value": "10" + }, + { + "label": "PUSH通知栏", + "value": "20" + }, + { + "label": "短信", + "value": "30" + }, + { + "label": "邮箱", + "value": "40" + }, + { + "label": "服务号", + "value": "50" + }, + { + "label": "小程序", + "value": "60" + }, + { + "label": "企业微信", + "value": "70" + }, + { + "label": "钉钉群机器人", + "value": "80" + }, + { + "label": "钉钉工作消息", + "value": "90" + }, + { + "label": "企业微信机器人", + "value": "100" + }, + { + "label": "飞书机器人", + "value": "110" + } + ], + "required": true + }, + { + "name": "accountConfig", + "type": "input-text", + "label": "账号配置", + "required": true, + "mode": "", + "size": "lg", + "clearValueOnHidden": false + } + ], + "bodyClassName": "r-3x w-full text-lg r font-bold", + "className": "" + }, + { + "type": "fieldSet", + "title": "渠道样例信息", + "body": [ + { + "type": "static", + "name": "id", + "visibleOn": "this.sendChannel ==10", + "mode": "normal", + "inline": true, + "label": "IM账号样例:" + }, + { + "type": "static", + "name": "id", + "visibleOn": "this.sendChannel ==30", + "mode": "normal", + "inline": true, + "label": "腾讯云账号样例:{\n \"url\": \"sms.tencentcloudapi.com\",\n \"region\": \"ap-guangzhou\",\n \"secretId\": \"234234\",\n \"secretKey\": \"234324324\",\n \"smsSdkAppId\": \"2343242\",\n \"templateId\": \"234234\",\n \"signName\": \"Java3y公众号\",\n \"supplierId\": 10,\n \"supplierName\": \"腾讯云\"\n}

云片账号配置样例:{\n \"url\": \"https://sms.yunpian.com/v2/sms/tpl_batch_send.json\",\n \"apikey\": \"23423432\",\n \"tpl_id\": \"23423432\",\n \"supplierId\": 20,\n \"supplierName\": \"云片\"\n}" + }, + { + "type": "static", + "name": "id", + "visibleOn": "this.sendChannel ==20", + "mode": "normal", + "inline": true, + "label": "个推push账号样例:{\"appId\":\"23423423\",\"appKey\":\"234234234\",\"masterSecret\":\"2342342342342\"}" + }, + { + "type": "static", + "name": "id", + "visibleOn": "this.sendChannel ==40", + "mode": "normal", + "inline": true, + "label": "QQ邮箱账号样例:{\"host\":\"smtp.qq.com\",\"port\":465,\"user\":\"23423432@qq.com\",\"pass\":\"234324324\",\"from\":\"123123@qq.com\",\"starttlsEnable\":\"true\",\"auth\":true,\"sslEnable\":true}

163邮箱配置账号样例:{\"host\":\"smtp.163.com\",\"port\":465,\"user\":\"23423423@163.com\",\"pass\":\"234234324\",\"from\":\"112312312@163.com\",\"starttlsEnable\":\"false\",\"auth\":true,\"sslEnable\":true}" + }, + { + "type": "static", + "name": "id", + "visibleOn": "this.sendChannel ==50", + "mode": "normal", + "inline": true, + "label": "服务号账号样例:" + }, + { + "type": "static", + "name": "id", + "visibleOn": "this.sendChannel ==60", + "mode": "normal", + "inline": true, + "label": "小程序账号样例:" + }, + { + "type": "static", + "name": "id", + "visibleOn": "this.sendChannel ==70", + "mode": "normal", + "inline": true, + "label": "企业微信账号样例:{\"corpId\":\"23423423\",\"corpSecret\":\"-234324234\",\"agentId\":1000002,\"token\":\"234234\",\"aesKey\":\"23423423\"}" + }, + { + "type": "static", + "name": "id", + "visibleOn": "this.sendChannel ==80", + "mode": "normal", + "inline": true, + "label": "钉钉群机器人样例:{\"secret\":\"234324324324\",\"webhook\":\"https://oapi.dingtalk.com/robot/send?access_token=8d03b68d081f732343243242343247328b0c3003d164715d2c6c6e56\"}" + }, + { + "type": "static", + "name": "id", + "visibleOn": "this.sendChannel ==90", + "mode": "normal", + "inline": true, + "label": "钉钉工作消息样例:{\n \"appKey\": \"23423423\",\n \"appSecret\": \"tQpvmkR863dYcuKDVfM23432432432423Nlx_fYLLLlpPJWHvWKbTu\",\n \"agentId\": \"1523423423242\"\n}" + } + , + { + "type": "static", + "name": "id", + "visibleOn": "this.sendChannel ==100", + "mode": "normal", + "inline": true, + "label": "企业微信机器人消息样例:" + }, + { + "type": "static", + "name": "id", + "visibleOn": "this.sendChannel ==110", + "mode": "normal", + "inline": true, + "label": "飞书机器人消息样例:{\n \"webhook\": \"https://open.feishu.cn/open-apis/bot/v2/hook/c24b09ef-9aa3-4aad-9239-a7e05fcaf6ec\"\n}" + } + ] + } + ], + "type": "form", + "mode": "horizontal", + "affixFooter": true, + "panelClassName": "Panel--default", + "bodyClassName": "text-lg", + "redirect": "/crud/list", + "api": { + "url": "http://localhost:8080/account/save", + "method": "post", + "data": { + "name": "${name}", + "sendChannel": "${sendChannel}", + "accountConfig": "${accountConfig}" + } + } + } + ], + "toolbar": [ + { + "type": "button", + "actionType": "link", + "link": "/account/list", + "label": "返回列表" + } + ], + "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" +} \ No newline at end of file diff --git a/pages/site.json b/pages/site.json index 71eaf84..6281df3 100644 --- a/pages/site.json +++ b/pages/site.json @@ -86,6 +86,30 @@ ] } ] + }, + { + "label": "账号管理", + "children": [ + { + "label": "渠道账号管理", + "url": "/crud", + "icon": "fa fa-cube", + "children": [ + { + "label": "新增账号", + "url": "/account/new", + "icon": "fa fa-plus", + "schemaApi": "get:/pages/account-new.json" + }, + { + "url": "account/list", + "label": "渠道账号", + "icon": "fa fa-list", + "schemaApi": "get:/pages/account-list.json" + } + ] + } + ] } ] }