{
  "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
            },
            {
              "type": "input-text",
              "label": "模板业务方",
              "name": "proposer",
              "size": "md",
              "mode": "",
              "description": ""
            },
            {
              "type": "radios",
              "label": "接收者Id类型",
              "name": "idType",
              "options": [
                {
                  "label": "用户ID",
                  "value": "10"
                },
                {
                  "label": "设备号",
                  "value": "20"
                },
                {
                  "label": "手机号",
                  "value": "30"
                },
                {
                  "label": "openID",
                  "value": "40"
                },
                {
                  "label": "邮箱地址",
                  "value": "50"
                },
                {
                  "label": "企业微信userId",
                  "value": "60"
                },
                {
                  "label": "钉钉userId",
                  "value": "70"
                },
                {
                  "label": "推送通知栏cid",
                  "value": "80"
                },
                {
                  "label": "飞书userId",
                  "value": "90"
                }
              ],
              "required": true
            },
            {
              "type": "radios",
              "label": "消息类型",
              "name": "msgType",
              "options": [
                {
                  "label": "通知类",
                  "value": "10"
                },
                {
                  "label": "营销类",
                  "value": "20"
                },
                {
                  "label": "验证码",
                  "value": "30"
                }
              ],
              "required": true
            },
            {
              "type": "radios",
              "label": "屏蔽类型",
              "name": "shieldType",
              "options": [
                {
                  "label": "夜间不屏蔽",
                  "value": "10"
                },
                {
                  "label": "夜间屏蔽",
                  "value": "20"
                },
                {
                  "label": "夜间屏蔽(次日早上9点发送)",
                  "value": "30"
                }
              ],
              "required": true
            },
            {
              "type": "radios",
              "label": "消息模板类型",
              "name": "templateType",
              "options": [
                {
                  "label": "定时",
                  "value": "10"
                },
                {
                  "label": "实时",
                  "value": "20"
                }
              ],
              "required": true
            },
            {
              "type": "input-text",
              "label": "cron表达式",
              "name": "expectPushTime",
              "size": "md",
              "visibleOn": "this.templateType == 10",
              "clearValueOnHidden": false,
              "visible": "",
              "required": true,
              "description": "1、<font color=\"#008252\">生成cron表达式页面：<a href=\"https://www.matools.com/cron\" target=\"_blank\">https://www.matools.com/cron</a></font>  2、<font color=\"#008252\">需要【立即发送】时填0</font>",
              "placeholder": "需要【立即发送】时填0"
            },
            {
              "type": "input-text",
              "name": "cronCrowdPath",
              "visibleOn": "this.templateType == 10",
              "required": true,
              "label": "人群文件路径",
              "size": "md",
              "clearValueOnHidden": false,
              "visible": "",
              "readOnly": true,
              "placeholder": "上传成功后自动填写(无须编辑)"
            }
          ],
          "bodyClassName": "r-3x w-full text-lg r font-bold",
          "className": ""
        },
        {
          "type": "fieldSet",
          "title": "渠道信息",
          "body": [
            {
              "name": "sendChannel",
              "label": "发送渠道",
              "type": "radios",
              "options": [
                {
                  "label": "PUSH通知栏",
                  "value": "20"
                },
                {
                  "label": "短信",
                  "value": "30"
                },
                {
                  "label": "邮箱",
                  "value": "40"
                },
                {
                  "label": "微信服务号（模板消息）",
                  "value": "50"
                },
                {
                  "label": "微信小程序（订阅消息）",
                  "value": "60"
                },
                {
                  "label": "企业微信（应用消息）",
                  "value": "70"
                },
                {
                  "label": "企业微信（机器人）",
                  "value": "100"
                },
                {
                  "label": "钉钉群机器人",
                  "value": "80"
                },
                {
                  "label": "钉钉工作消息",
                  "value": "90"
                },
                {
                  "label": "飞书机器人",
                  "value": "110"
                }
              ],
              "required": true
            },
            {
              "type": "hidden",
              "name": "sendAccount",
              "value": "0",
              "visibleOn": "this.sendChannel == 30"
            },
            {
              "type": "input-text",
              "label": "短信账号",
              "disabled": true,
              "value": "根据【消息类型】按流量分配到对应短信渠道",
              "visibleOn": "this.sendChannel == 30",
              "clearValueOnHidden": false,
              "required": false,
              "size": "lg"
            },
            {
              "name": "content",
              "type": "input-text",
              "label": "短信内容",
              "required": true,
              "visibleOn": "this.sendChannel == 30",
              "mode": "",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$content}"
            },
            {
              "type": "input-text",
              "label": "短信链接",
              "name": "url",
              "visibleOn": "this.sendChannel == 30",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$url}"
            },
            {
              "type": "select",
              "label": "服务号账号",
              "name": "sendAccount",
              "source": "${ls:backend_url}/account/queryByChannelType?channelType=50&creator=${ls:openId}",
              "visibleOn": "this.sendChannel == 50",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg"
            },
            {
              "type": "select",
              "label": "选择模板",
              "name": "templateId",
              "source": "${ls:backend_url}/officialAccount/template/list?id=${sendAccount}",
              "visibleOn": "this.sendChannel == 50",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg",
              "initFetchOn": "data.sendAccount"
            },
            {
              "type": "radios",
              "name": "linkType",
              "label": "跳转落地页",
              "visibleOn": "this.sendChannel == 50",
              "options": [
                {
                  "label": "HTTP链接",
                  "value": "10"
                },
                {
                  "label": "小程序",
                  "value": "20"
                }
              ],
              "required": true
            },
            {
              "type": "input-text",
              "label": "发送链接",
              "name": "url",
              "required": true,
              "visibleOn": "this.sendChannel == 50 && this.linkType==10",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$url}"
            },
            {
              "type": "select",
              "label": "小程序",
              "name": "miniProgramId",
              "required": true,
              "visibleOn": "this.sendChannel == 50 && this.linkType==20",
              "options": [
                {
                  "label": "暂无可用小程序",
                  "value": "10"
                }
              ],
              "size": "lg",
              "clearValueOnHidden": false
            },
            {
              "type": "input-text",
              "label": "发送链接",
              "name": "path",
              "required": true,
              "visibleOn": "this.sendChannel == 50 && this.linkType==20",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$url}"
            },
            {
              "type": "select",
              "label": "企业微信（机器人）",
              "name": "sendAccount",
              "source": "${ls:backend_url}/account/queryByChannelType?channelType=100&creator=${ls:openId}",
              "visibleOn": "this.sendChannel == 100",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg"
            },
            {
              "name": "sendType",
              "label": "发送类型",
              "type": "radios",
              "options": [
                {
                  "label": "文本",
                  "value": "10"
                },
                {
                  "label": "图文",
                  "value": "40"
                },
                {
                  "label": "文件",
                  "value": "60"
                },
                {
                  "label": "markdown类型",
                  "value": "80"
                },
                {
                  "label": "图片",
                  "value": "100"
                }
              ],
              "visibleOn": "this.sendChannel == 100",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg"
            },
            {
              "type": "input-text",
              "label": "发送内容",
              "name": "content",
              "required": true,
              "visibleOn": "this.sendChannel == 100 && this.sendType == 10",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$content}"
            },
            {
              "type": "input-text",
              "label": "markdown",
              "name": "content",
              "required": true,
              "visibleOn": "this.sendChannel == 100 && this.sendType == 80",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$content}"
            },
            {
              "type": "input-text",
              "label": "图片base64",
              "name": "base64",
              "required": true,
              "visibleOn": "this.sendChannel == 100 && this.sendType == 100",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "图片内容的base64编码"
            },
            {
              "type": "input-text",
              "label": "图片内容md5",
              "name": "md5",
              "required": true,
              "visibleOn": "this.sendChannel == 100 && this.sendType == 100",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "在base64编码前的md5"
            },
            {
              "type": "input-text",
              "label": "文件Id",
              "name": "mediaId",
              "required": true,
              "visibleOn": "this.sendChannel == 100 && this.sendType == 60",
              "size": "lg",
              "placeholder": "可用占位符{$mediaId}",
              "clearValueOnHidden": false
            },
            {
              "type": "input-table",
              "name": "articles",
              "addable": true,
              "editable": true,
              "visibleOn": "this.sendChannel == 100 && ( this.sendType == 40)",
              "columns": [
                {
                  "name": "title",
                  "label": "标题",
                  "placeholder": "可用占位符{$title}"
                },
                {
                  "name": "description",
                  "label": "描述",
                  "placeholder": "可用占位符{$description}"
                },
                {
                  "name": "url",
                  "label": "跳转链接",
                  "placeholder": "可用占位符{$url}"
                },
                {
                  "name": "picurl",
                  "label": "图片链接",
                  "placeholder": "可用占位符{$picurlURL}"
                }
              ]
            },
            {
              "type": "service",
              "schemaApi": "${ls:backend_url}/officialAccount/detailTemplate?id=${sendAccount}&wxTemplateId=${templateId}",
              "visibleOn": "this.sendChannel == 50"
            },
            {
              "type": "select",
              "label": "小程序账号",
              "name": "sendAccount",
              "source": "${ls:backend_url}/account/queryByChannelType?channelType=60&creator=${ls:openId}",
              "visibleOn": "this.sendChannel == 60",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg"
            },
            {
              "type": "select",
              "label": "选择模板",
              "name": "templateId",
              "source": "${ls:backend_url}/miniProgram/template/list?id=${sendAccount}",
              "visibleOn": "this.sendChannel == 60",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg",
              "initFetchOn": "data.sendAccount"
            },
            {
              "type": "input-text",
              "label": "发送链接",
              "name": "page",
              "required": true,
              "visibleOn": "this.sendChannel == 60 ",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$url}"
            },
            {
              "type": "service",
              "schemaApi": "${ls:backend_url}/miniProgram/detailTemplate?id=${sendAccount}&wxTemplateId=${templateId}",
              "visibleOn": "this.sendChannel == 60",
              "description": "<font color=\"#990000\">请点击【新增】填入文案</font>"
            },
            {
              "type": "select",
              "label": "飞书机器人",
              "name": "sendAccount",
              "source": "${ls:backend_url}/account/queryByChannelType?channelType=110&creator=${ls:openId}",
              "visibleOn": "this.sendChannel == 110",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg"
            },
            {
              "name": "sendType",
              "label": "发送类型",
              "type": "radios",
              "options": [
                {
                  "label": "文本",
                  "value": "10"
                }
              ],
              "visibleOn": "this.sendChannel == 110",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg"
            },
            {
              "type": "input-text",
              "label": "飞书内容",
              "name": "content",
              "required": true,
              "visibleOn": "this.sendChannel == 110 && this.sendType ==10 ",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$content}"
            },
            {
              "type": "input-text",
              "label": "图片标识",
              "name": "mediaId",
              "required": true,
              "visibleOn": "this.sendChannel == 110 && this.sendType ==100 ",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$mediaId}"
            },
            {
              "type": "select",
              "label": "推送账号",
              "name": "sendAccount",
              "source": "${ls:backend_url}/account/queryByChannelType?channelType=20&creator=${ls:openId}",
              "visibleOn": "this.sendChannel == 20",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg"
            },
            {
              "type": "input-text",
              "label": "推送标题",
              "name": "title",
              "visibleOn": "this.sendChannel == 20",
              "size": "lg",
              "required": true,
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$title}"
            },
            {
              "name": "content",
              "type": "input-text",
              "label": "推送内容",
              "required": true,
              "visibleOn": "this.sendChannel == 20",
              "mode": "",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$content}"
            },
            {
              "type": "input-text",
              "label": "推送链接",
              "name": "url",
              "required": true,
              "visibleOn": "this.sendChannel == 20",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$url}"
            },
            {
              "type": "select",
              "label": "邮件账号",
              "name": "sendAccount",
              "source": "${ls:backend_url}/account/queryByChannelType?channelType=40&creator=${ls:openId}",
              "visibleOn": "this.sendChannel == 40",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg"
            },
            {
              "type": "input-text",
              "label": "邮件标题",
              "name": "title",
              "required": true,
              "visibleOn": "this.sendChannel == 40",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$title}"
            },
            {
              "type": "input-text",
              "label": "邮件内容",
              "name": "content",
              "required": true,
              "visibleOn": "this.sendChannel == 40",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$content}，可输入HTML"
            },
            {
              "type": "select",
              "label": "企业微信应用",
              "name": "sendAccount",
              "source": "${ls:backend_url}/account/queryByChannelType?channelType=70&creator=${ls:openId}",
              "visibleOn": "this.sendChannel == 70",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg"
            },
            {
              "name": "sendType",
              "label": "发送类型",
              "type": "radios",
              "options": [
                {
                  "label": "文本",
                  "value": "10"
                },
                {
                  "label": "语音",
                  "value": "20"
                },
                {
                  "label": "视频",
                  "value": "30"
                },
                {
                  "label": "图文",
                  "value": "40"
                },
                {
                  "label": "文本卡片",
                  "value": "50"
                },
                {
                  "label": "文件",
                  "value": "60"
                },
                {
                  "label": "markdown类型",
                  "value": "80"
                },
                {
                  "label": "图片",
                  "value": "100"
                }
              ],
              "visibleOn": "this.sendChannel == 70  ",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg"
            },
            {
              "type": "input-text",
              "label": "企业微信内容",
              "name": "content",
              "required": true,
              "visibleOn": "this.sendChannel == 70 && this.sendType == 10",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$content}"
            },
            {
              "type": "input-text",
              "label": "图片Id",
              "name": "mediaId",
              "required": true,
              "visibleOn": "this.sendChannel == 70 && this.sendType == 100",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$mediaId}"
            },
            {
              "type": "input-text",
              "label": "语音Id",
              "name": "mediaId",
              "required": true,
              "visibleOn": "this.sendChannel == 70 && this.sendType == 20",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$mediaId}"
            },
            {
              "type": "input-text",
              "label": "视频Id",
              "name": "mediaId",
              "required": true,
              "visibleOn": "this.sendChannel == 70 && this.sendType == 30",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$mediaId}"
            },
            {
              "type": "input-text",
              "label": "文件Id",
              "name": "mediaId",
              "required": true,
              "visibleOn": "this.sendChannel == 70 && this.sendType == 60",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$mediaId}"
            },
            {
              "type": "input-text",
              "label": "标题",
              "name": "title",
              "required": true,
              "visibleOn": "this.sendChannel == 70 && this.sendType == 50",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$title}"
            },
            {
              "type": "input-text",
              "label": "描述详情",
              "name": "description",
              "required": true,
              "visibleOn": "this.sendChannel == 70 && this.sendType == 50",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$description}"
            },
            {
              "type": "input-text",
              "label": "跳转链接",
              "name": "url",
              "required": true,
              "visibleOn": "this.sendChannel == 70 && this.sendType == 50",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$url}"
            },
            {
              "type": "input-table",
              "name": "articles",
              "addable": true,
              "editable": true,
              "visibleOn": "this.sendChannel == 70 && ( this.sendType == 40)",
              "columns": [
                {
                  "name": "title",
                  "label": "标题",
                  "placeholder": "可用占位符{$title}"
                },
                {
                  "name": "description",
                  "label": "描述",
                  "placeholder": "可用占位符{$description}"
                },
                {
                  "name": "url",
                  "label": "跳转链接",
                  "placeholder": "可用占位符{$url}"
                },
                {
                  "name": "picurl",
                  "label": "图片链接",
                  "placeholder": "可用占位符{$picurlURL}"
                }
              ]
            },
            {
              "type": "input-text",
              "label": "markdown",
              "name": "content",
              "required": true,
              "visibleOn": "this.sendChannel == 70 && this.sendType == 80",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$content}"
            },
            {
              "type": "select",
              "label": "钉钉群机器人",
              "name": "sendAccount",
              "source": "${ls:backend_url}/account/queryByChannelType?channelType=80&creator=${ls:openId}",
              "visibleOn": "this.sendChannel == 80",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg"
            },
            {
              "type": "select",
              "label": "钉钉应用",
              "name": "sendAccount",
              "source": "${ls:backend_url}/account/queryByChannelType?channelType=90&creator=${ls:openId}",
              "visibleOn": "this.sendChannel == 90",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg"
            },
            {
              "name": "sendType",
              "label": "发送类型",
              "type": "radios",
              "options": [
                {
                  "label": "文本(text)",
                  "value": "10"
                },
                {
                  "label": "语音(voice)",
                  "value": "20"
                },
                {
                  "label": "文件(file)",
                  "value": "60"
                },
                {
                  "label": "markdown类型(markdown)",
                  "value": "80"
                },
                {
                  "label": "图片(image)",
                  "value": "100"
                },
                {
                  "label": "链接消息(link)",
                  "value": "110"
                },
                {
                  "label": "卡片消息(action_card)",
                  "value": "120"
                },
                {
                  "label": "OA消息(oa)",
                  "value": "130"
                }
              ],
              "visibleOn": "this.sendChannel==90 ",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg"
            },
            {
              "name": "sendType",
              "label": "发送类型",
              "type": "radios",
              "options": [
                {
                  "label": "文本(text)",
                  "value": "10"
                },
                {
                  "label": "图文(FeedCard)",
                  "value": "40"
                },
                {
                  "label": "markdown类型(markdown)",
                  "value": "80"
                },
                {
                  "label": "链接消息(links)",
                  "value": "110"
                },
                {
                  "label": "卡片消息(actionCard)",
                  "value": "120"
                }
              ],
              "visibleOn": "this.sendChannel == 80",
              "clearValueOnHidden": false,
              "required": true,
              "size": "lg"
            },
            {
              "type": "input-text",
              "label": "钉钉标题",
              "name": "title",
              "required": true,
              "visibleOn": "this.sendChannel == 80 && (this.sendType == 80 || this.sendType == 110 || this.sendType == 120 )",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$title}"
            },
            {
              "type": "input-text",
              "label": "钉钉发送内容",
              "name": "content",
              "required": true,
              "visibleOn": "this.sendChannel == 80 && (this.sendType == 10 || this.sendType == 80|| this.sendType == 110 || this.sendType == 120)",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$content}"
            },
            {
              "type": "radios",
              "label": "按钮布局",
              "name": "btnOrientation",
              "visibleOn": "this.sendChannel == 80 && (this.sendType == 120)",
              "options": [
                {
                  "label": "按钮竖直排列",
                  "value": "0"
                },
                {
                  "label": "按钮横向排列",
                  "value": "1"
                }
              ]
            },
            {
              "type": "input-table",
              "name": "btns",
              "addable": true,
              "editable": true,
              "visibleOn": "this.sendChannel == 80 && ( this.sendType == 120)",
              "columns": [
                {
                  "name": "title",
                  "label": "标题",
                  "placeholder": "可用占位符{$title}"
                },
                {
                  "name": "actionURL",
                  "label": "跳转链接",
                  "placeholder": "可用占位符{$actionURL}"
                }
              ]
            },
            {
              "type": "input-text",
              "label": "钉钉发送链接",
              "name": "url",
              "required": true,
              "visibleOn": "this.sendChannel == 80 && ( this.sendType == 110)",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$url}"
            },
            {
              "type": "input-text",
              "label": "钉钉图片链接",
              "name": "picUrl",
              "visibleOn": "this.sendChannel == 80 && ( this.sendType == 110)",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$picUrl}"
            },
            {
              "type": "input-table",
              "name": "feedCards",
              "addable": true,
              "editable": true,
              "visibleOn": "this.sendChannel == 80 && ( this.sendType == 40)",
              "columns": [
                {
                  "name": "title",
                  "label": "标题"
                },
                {
                  "name": "messageURL",
                  "label": "跳转链接"
                },
                {
                  "name": "picURL",
                  "label": "图片链接"
                }
              ]
            },
            {
              "type": "input-text",
              "label": "消息标题",
              "name": "title",
              "required": true,
              "visibleOn": "this.sendChannel == 90 && (this.sendType == 110 || this.sendType == 80 ||this.sendType == 120 )",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$title}"
            },
            {
              "type": "input-text",
              "label": "消息内容",
              "name": "content",
              "required": true,
              "visibleOn": "this.sendChannel == 90 && (this.sendType == 10 || this.sendType == 110 || this.sendType == 80 ||this.sendType == 120)",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$content}"
            },
            {
              "type": "input-text",
              "label": "语音Id",
              "name": "mediaId",
              "required": true,
              "visibleOn": "this.sendChannel == 90 && this.sendType == 20",
              "size": "lg",
              "placeholder": "可用占位符{$mediaId}",
              "clearValueOnHidden": false
            },
            {
              "type": "input-text",
              "label": "语音时长",
              "name": "duration",
              "required": true,
              "visibleOn": "this.sendChannel == 90 && this.sendType == 20",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "正整数，小于60，表示音频时长"
            },
            {
              "type": "input-text",
              "label": "文件Id",
              "name": "mediaId",
              "required": true,
              "visibleOn": "this.sendChannel == 90 && this.sendType == 60",
              "size": "lg",
              "placeholder": "可用占位符{$mediaId}",
              "clearValueOnHidden": false
            },
            {
              "type": "radios",
              "label": "按钮布局",
              "name": "btnOrientation",
              "visibleOn": "this.sendChannel == 90 && (this.sendType == 120)",
              "options": [
                {
                  "label": "按钮竖直排列",
                  "value": "0"
                },
                {
                  "label": "按钮横向排列",
                  "value": "1"
                }
              ]
            },
            {
              "type": "input-table",
              "name": "btns",
              "addable": true,
              "editable": true,
              "visibleOn": "this.sendChannel == 90 && ( this.sendType == 120)",
              "columns": [
                {
                  "name": "title",
                  "label": "标题",
                  "placeholder": "可用占位符{$title}"
                },
                {
                  "name": "action_url",
                  "label": "跳转链接",
                  "placeholder": "可用占位符{$action_url}"
                }
              ]
            },
            {
              "type": "input-text",
              "label": "头部标题",
              "name": "dingDingOaHeadTitle",
              "required": true,
              "visibleOn": "this.sendChannel == 90 && this.sendType == 130",
              "size": "lg",
              "clearValueOnHidden": false
            },
            {
              "type": "input-text",
              "label": "头部标题颜色",
              "name": "dingDingOaHeadBgColor",
              "required": true,
              "visibleOn": "this.sendChannel == 90 && this.sendType == 130",
              "size": "lg",
              "clearValueOnHidden": false
            },
            {
              "type": "input-text",
              "label": "页面跳转链接",
              "name": "url",
              "required": true,
              "visibleOn": "this.sendChannel == 90 && (this.sendType == 110 || this.sendType == 130)",
              "size": "lg",
              "clearValueOnHidden": false,
              "placeholder": "可用占位符{$url}"
            },
            {
              "type": "input-text",
              "label": "正文标题",
              "name": "dingDingOaTitle",
              "visibleOn": "this.sendChannel == 90 && this.sendType == 130",
              "size": "lg",
              "clearValueOnHidden": false
            },
            {
              "type": "input-text",
              "label": "正文内容",
              "name": "dingDingOaContent",
              "visibleOn": "this.sendChannel == 90 && this.sendType == 130",
              "size": "lg",
              "clearValueOnHidden": false
            },
            {
              "type": "input-text",
              "label": "图片Id",
              "name": "mediaId",
              "visibleOn": "this.sendChannel == 90 && (this.sendType == 100 || this.sendType == 110|| this.sendType == 130)",
              "size": "lg",
              "placeholder": "可用占位符{$mediaId}",
              "clearValueOnHidden": false
            },
            {
              "type": "input-text",
              "label": "作者名称",
              "name": "dingDingOaAuthor",
              "visibleOn": "this.sendChannel == 90 && this.sendType == 130",
              "size": "lg",
              "clearValueOnHidden": false
            }
          ],
          "className": "",
          "bodyClassName": "r-3x w-full text-lg r font-bold"
        }
      ],
      "type": "form",
      "mode": "horizontal",
      "affixFooter": true,
      "panelClassName": "Panel--default",
      "bodyClassName": "text-lg",
      "redirect": "/crud/list",
      "api": {
        "url": "${ls:backend_url}/messageTemplate/save",
        "method": "post",
        "requestAdaptor": "let jsonObj = {};\n\nlet content = JSON.parse(api.data.msgContent).content\nlet url = JSON.parse(api.data.msgContent).url\nlet title = JSON.parse(api.data.msgContent).title\nlet sendType = JSON.parse(api.data.msgContent).sendType\nlet picUrl = JSON.parse(api.data.msgContent).picUrl\n\n\n// push通知栏\nif(api.data.sendChannel == '20'){\n    jsonObj.content = content\n    jsonObj.url = url\n    jsonObj.title = title\n}\n// 短信\nif(api.data.sendChannel == '30'){\n    jsonObj.url = url\n    jsonObj.content = content\n}\n// 邮件\nif(api.data.sendChannel == '40'){\n    jsonObj.content = content\n    jsonObj.title = title\n}\n// 企业微信(应用消息)\nif (api.data.sendChannel == '70') {\n    // 文本、markdown类型\n    if (sendType == '10' || sendType =='80') {\n        jsonObj.content = content\n        jsonObj.sendType = sendType\n    }\n    // 图片、视频、语音、文件类型\n    if(sendType =='20' || sendType =='30' || sendType =='60' || sendType=='100'){\n        jsonObj.sendType = sendType\n        jsonObj.mediaId = api.data.mediaId\n    }\n    // 文本卡片类型\n    if(sendType =='50'){\n        jsonObj.sendType = sendType\n        jsonObj.title = title\n        jsonObj.url= url \n        jsonObj.description = api.data.description\n    }\n    // 图文类型\n    if(sendType == '40'){\n        jsonObj.sendType = sendType\n        jsonObj.articles = JSON.stringify(api.data.articles)\n    }\n\n}\n// 企业微信(机器人)\nif (api.data.sendChannel == '100') {\n    // 文本类型\n    if (sendType == '10') {\n        jsonObj.content = content\n        jsonObj.sendType = sendType\n    }\n    // markdown类型\n    if (sendType == '80') {\n        jsonObj.content = content\n        jsonObj.sendType = sendType\n    }\n     // 图片类型\n    if (sendType == '100') {\n        jsonObj.md5 = api.data.md5\n        jsonObj.base64 = api.data.base64\n        jsonObj.sendType = sendType\n    }\n     // 文件类型\n    if (sendType == '60') {\n        jsonObj.sendType = sendType\n        jsonObj.mediaId = api.data.mediaId\n    }\n    // 图文类型\n    if(sendType == '40'){\n        jsonObj.sendType = sendType\n        jsonObj.articles = JSON.stringify(api.data.articles)\n    }\n}\n// 微信服务号\nif (api.data.sendChannel == '50') {\n    jsonObj.path = api.data.path\n    jsonObj.miniProgramId = api.data.miniProgramId\n    jsonObj.templateId = api.data.templateId\n    jsonObj.url = url\n    jsonObj.linkType = api.data.linkType\n\n    // 模板参数\n    jsonObj.officialAccountParam = JSON.stringify(api.data.officialAccountParam[0])\n}\n// 微信小程序\nif (api.data.sendChannel == '60') {\n    jsonObj.page = api.data.page\n    jsonObj.templateId = api.data.templateId\n    // 模板参数\n    jsonObj.miniProgramParam = JSON.stringify(api.data.miniProgramParam[0])\n}\n\n// 钉钉机器人\nif (api.data.sendChannel == '80') {\n    // 文本类型(text)\n    if (sendType == '10') {\n        jsonObj.content = content\n        jsonObj.sendType = sendType\n    }\n    // 图文类型(FeedCard)\n    if (sendType == '40') {\n        jsonObj.sendType = sendType\n        jsonObj.feedCards = JSON.stringify(api.data.feedCards)\n    }\n    // markdown类型(markdown)\n    if (sendType == '80') {\n        jsonObj.content = content\n        jsonObj.sendType = sendType\n        jsonObj.title = title\n    }\n    // 链接类型(link)\n    if (sendType == '110') {\n        jsonObj.content = content\n        jsonObj.sendType = sendType\n        jsonObj.title = title\n        jsonObj.picUrl = picUrl\n        jsonObj.url = url\n    }\n    // 卡片跳转(actionCard)\n    if (sendType == '120') {\n        jsonObj.title = title\n        jsonObj.content = content\n        jsonObj.btnOrientation = api.data.btnOrientation\n        jsonObj.btns = JSON.stringify(api.data.btns)\n        jsonObj.sendType = sendType\n    }\n}\n// 钉钉工作消息\nif (api.data.sendChannel == '90') {\n    // 文本类型\n    if (sendType == '10') {\n        jsonObj.content = content\n        jsonObj.sendType = sendType\n    }\n    // 语音类型\n    if (sendType == '20') {\n        jsonObj.sendType = sendType\n        jsonObj.duration = api.data.duration\n        jsonObj.mediaId = api.data.mediaId\n    }\n    // 文件类型 || 图片类型\n    if (sendType == '60' || sendType == '100') {\n        jsonObj.sendType = sendType\n        jsonObj.mediaId = api.data.mediaId\n    }\n    // 链接类型\n    if (sendType == '110') {\n        jsonObj.content = content\n        jsonObj.sendType = sendType\n        jsonObj.title = title\n        jsonObj.mediaId = api.data.mediaId\n        jsonObj.url = url\n    }\n    // markdown类型(markdown)\n    if (sendType == '80') {\n        jsonObj.content = content\n        jsonObj.sendType = sendType\n        jsonObj.title = title\n    }\n    // 卡片跳转(actionCard)\n    if (sendType == '120') {\n        jsonObj.title = title\n        jsonObj.content = content\n        jsonObj.btnOrientation = api.data.btnOrientation\n        jsonObj.btns = JSON.stringify(api.data.btns)\n        jsonObj.sendType = sendType\n    }\n    \n    // OA(actionCard)\n    if (sendType == '130') {\n        \n        // 头部\n        var head = {}\n        head.bgcolor = api.data.dingDingOaHeadBgColor\n        head.text = api.data.dingDingOaHeadTitle\n        jsonObj.dingDingOaHead = head\n        \n        // body\n        var body = {}\n        body.title = api.data.dingDingOaTitle\n        body.content = api.data.dingDingOaContent\n        body.image = api.data.mediaId\n        body.author = api.data.dingDingOaAuthor\n        jsonObj.dingDingOaBody = body\n        \n        // 通用\n        jsonObj.sendType = sendType\n        jsonObj.url = url\n    }\n}\n\n// 飞书群机器人\nif (api.data.sendChannel == '110') {\n    // 文本类型\n    if (sendType == '10') {\n        jsonObj.content = content\n        jsonObj.sendType = sendType\n    }\n\n    // 通用\n    jsonObj.sendType = sendType\n    jsonObj.url = url\n}\n\napi.data.msgContent = JSON.stringify(jsonObj)\nreturn api;",
        "data": {
          "name": "${name}",
          "idType": "${idType}",
          "msgType": "${msgType}",
          "templateType": "${templateType}",
          "expectPushTime": "${expectPushTime}",
          "proposer": "${proposer}",
          "sendChannel": "${sendChannel}",
          "sendAccount": "${sendAccount}",
          "cronCrowdPath": "${cronCrowdPath}",
          "shieldType": "${shieldType}",
          "msgContent": "{\"content\":\"${content}\",\"url\":\"${url}\",\"title\":\"${title}\",\"sendType\":\"${sendType}\",\"picUrl\":\"${picUrl}\"}",
          "id": "${id}",
          "flowId": "${flowId}",
          "msgStatus": "${msgStatus}",
          "auditStatus": "${auditStatus}",
          "creator": "${creator}",
          "updator": "${updator}",
          "team": "${team}",
          "auditor": "${auditor}",
          "deduplicationTime": "${deduplicationTime}",
          "isNightShield": "${isNightShield}",
          "created": "${created}",
          "updated": "${updated}",
          "feedCards": "${feedCards}",
          "btnOrientation": "${btnOrientation}",
          "btns": "${btns}",
          "mediaId": "${mediaId}",
          "duration": "${duration}",
          "dingDingOaHeadTitle": "${dingDingOaHeadTitle}",
          "dingDingOaHeadBgColor": "${dingDingOaHeadBgColor}",
          "dingDingOaTitle": "${dingDingOaTitle}",
          "dingDingOaContent": "${dingDingOaContent}",
          "dingDingOaAuthor": "${dingDingOaAuthor}",
          "officialAccountParam": "${officialAccountParam}",
          "templateId": "${templateId}",
          "path": "${path}",
          "miniProgramId": "${miniProgramId}",
          "linkType": "${linkType}",
          "page": "${page}",
          "miniProgramParam": "${miniProgramParam}",
          "md5": "${md5}",
          "base64": "${base64}",
          "articles": "${articles}",
          "description": "${description}",
          "isDeleted": "${isDeleted}"
        }
      },
      "initApi": "${ls:backend_url}/messageTemplate/query/${params.id}"
    }
  ],
  "toolbar": [
    {
      "type": "button",
      "actionType": "link",
      "link": "/crud/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"
}