Browse Source

feat(notice): notice doc

lind 3 năm trước cách đây
mục cha
commit
de65089a91
46 tập tin đã thay đổi với 296 bổ sung97 xóa
  1. BIN
      public/images/notice/dingTalk-message.png
  2. BIN
      public/images/notice/dingTalk-rebot.png
  3. BIN
      public/images/notice/doc/config/aliyun-sms-voice/AccesskeyIDSecret.jpg
  4. BIN
      public/images/notice/doc/config/dingTalk-message/01-AppKey.jpg
  5. BIN
      public/images/notice/doc/config/dingTalk-message/02-AppSecret.jpg
  6. BIN
      public/images/notice/doc/config/dingTalk-rebot/01-group-setting.jpg
  7. BIN
      public/images/notice/doc/config/dingTalk-rebot/02-rebot.jpg
  8. BIN
      public/images/notice/doc/config/dingTalk-rebot/03-Webhook.jpg
  9. BIN
      public/images/notice/doc/config/weixin-corp/01-corpId.jpg
  10. BIN
      public/images/notice/doc/config/weixin-corp/02-corpSecret.jpg
  11. BIN
      public/images/notice/doc/config/weixin-official/01-AppID.jpg
  12. BIN
      public/images/notice/doc/config/weixin-official/02-AppSecret.jpg
  13. BIN
      public/images/notice/doc/template/dingTalk-message/01-Agentid.jpg
  14. BIN
      public/images/notice/doc/template/dingTalk-message/02-user-id.jpg
  15. BIN
      public/images/notice/doc/template/dingTalk-message/03-dept.jpg
  16. BIN
      public/images/notice/doc/template/dingTalk-rebot/01-text.jpg
  17. BIN
      public/images/notice/doc/template/dingTalk-rebot/02-markdown.jpg
  18. BIN
      public/images/notice/doc/template/dingTalk-rebot/03-link.jpg
  19. BIN
      public/images/notice/doc/template/weixin-corp/01-Agentid.jpg
  20. BIN
      public/images/notice/doc/template/weixin-corp/02-userID.jpg
  21. BIN
      public/images/notice/doc/template/weixin-corp/03-toDept.jpg
  22. BIN
      public/images/notice/doc/template/weixin-corp/04-toTags.jpg
  23. BIN
      public/images/notice/doc/template/weixin-official/01-Agentid.jpg
  24. BIN
      public/images/notice/doc/template/weixin-official/02-mini-Program-Appid.jpg
  25. BIN
      public/images/notice/weixin-corp.png
  26. BIN
      public/images/notice/weixin-official.png
  27. 1 1
      src/components/AlarmEditor/Action/index.ts
  28. 2 2
      src/locales/zh-CN/menu.ts
  29. 2 2
      src/locales/zh-CN/pages.ts
  30. 1 1
      src/pages/edge/Device/index.tsx
  31. 4 0
      src/pages/notice/Config/Detail/doc/AliyunSms.tsx
  32. 5 0
      src/pages/notice/Config/Detail/doc/AliyunVoice.tsx
  33. 8 0
      src/pages/notice/Config/Detail/doc/DingTalk.tsx
  34. 14 0
      src/pages/notice/Config/Detail/doc/DingTalkRebot.tsx
  35. 9 0
      src/pages/notice/Config/Detail/doc/WeixinApp.tsx
  36. 8 0
      src/pages/notice/Config/Detail/doc/WeixinCorp.tsx
  37. 6 2
      src/pages/notice/Config/Detail/index.tsx
  38. 0 1
      src/pages/notice/Template/Detail/doc/AliyunVoice.tsx
  39. 12 3
      src/pages/notice/Template/Detail/doc/DingTalk.tsx
  40. 10 2
      src/pages/notice/Template/Detail/doc/DingTalkRebot.tsx
  41. 9 0
      src/pages/notice/Template/Detail/doc/WeixinApp.tsx
  42. 13 1
      src/pages/notice/Template/Detail/doc/WeixinCorp.tsx
  43. 174 52
      src/pages/notice/Template/Detail/index.tsx
  44. 1 1
      src/pages/notice/Template/Log/index.tsx
  45. 15 27
      src/pages/notice/index.tsx
  46. 2 2
      src/utils/menu/index.ts

BIN
public/images/notice/dingTalk-message.png


BIN
public/images/notice/dingTalk-rebot.png


BIN
public/images/notice/doc/config/aliyun-sms-voice/AccesskeyIDSecret.jpg


BIN
public/images/notice/doc/config/dingTalk-message/01-AppKey.jpg


BIN
public/images/notice/doc/config/dingTalk-message/02-AppSecret.jpg


BIN
public/images/notice/doc/config/dingTalk-rebot/01-group-setting.jpg


BIN
public/images/notice/doc/config/dingTalk-rebot/02-rebot.jpg


BIN
public/images/notice/doc/config/dingTalk-rebot/03-Webhook.jpg


BIN
public/images/notice/doc/config/weixin-corp/01-corpId.jpg


BIN
public/images/notice/doc/config/weixin-corp/02-corpSecret.jpg


BIN
public/images/notice/doc/config/weixin-official/01-AppID.jpg


BIN
public/images/notice/doc/config/weixin-official/02-AppSecret.jpg


BIN
public/images/notice/doc/template/dingTalk-message/01-Agentid.jpg


BIN
public/images/notice/doc/template/dingTalk-message/02-user-id.jpg


BIN
public/images/notice/doc/template/dingTalk-message/03-dept.jpg


BIN
public/images/notice/doc/template/dingTalk-rebot/01-text.jpg


BIN
public/images/notice/doc/template/dingTalk-rebot/02-markdown.jpg


BIN
public/images/notice/doc/template/dingTalk-rebot/03-link.jpg


BIN
public/images/notice/doc/template/weixin-corp/01-Agentid.jpg


BIN
public/images/notice/doc/template/weixin-corp/02-userID.jpg


BIN
public/images/notice/doc/template/weixin-corp/03-toDept.jpg


BIN
public/images/notice/doc/template/weixin-corp/04-toTags.jpg


BIN
public/images/notice/doc/template/weixin-official/01-Agentid.jpg


BIN
public/images/notice/doc/template/weixin-official/02-mini-Program-Appid.jpg


BIN
public/images/notice/weixin-corp.png


BIN
public/images/notice/weixin-official.png


+ 1 - 1
src/components/AlarmEditor/Action/index.ts

@@ -184,7 +184,7 @@ const Action = {
                     'x-reactions': ['{{useAsyncDataSource(loadNotifierType)}}'],
                   },
                   notifierId: {
-                    title: '通知配置',
+                    title: 'config',
                     type: 'string',
                     'x-decorator': 'FormItem',
                     required: true,

+ 2 - 2
src/locales/zh-CN/menu.ts

@@ -33,8 +33,8 @@ export default {
   'menu.link.gateway': '设备网关',
   'menu.link.opcua': 'OPC UA',
   'menu.notice': '通知管理',
-  'menu.notice.config': '通知配置',
-  'menu.notice.template': '通知模板',
+  'menu.notice.config': 'config',
+  'menu.notice.template': 'template',
   'menu.rule-engine': '规则引擎',
   'menu.rule-engine.instance': '规则实例',
   'menu.rule-engine.sqlRule': '数据转发',

+ 2 - 2
src/locales/zh-CN/pages.ts

@@ -325,9 +325,9 @@ export default {
   'pages.link.type': '类型',
   'pages.link.option.debug': '调试',
   // 通知管理
-  'pages.notice.config': '通知配置',
+  'pages.notice.config': 'config',
   'pages.notice.config.type': '通知类型',
-  'pages.notice.template': '通知模板',
+  'pages.notice.template': 'template',
   'pages.notice.option.debug': '调试',
 
   // 规则引擎

+ 1 - 1
src/pages/edge/Device/index.tsx

@@ -107,7 +107,7 @@ const Device = () => {
         service={service}
         title={intl.formatMessage({
           id: 'pages.edge.device',
-          defaultMessage: '通知配置',
+          defaultMessage: 'config',
         })}
         schema={schema}
         actionRef={actionRef}

+ 4 - 0
src/pages/notice/Config/Detail/doc/AliyunSms.tsx

@@ -1,4 +1,5 @@
 const AliyunSms = () => {
+  const accessKey = require('/public/images/notice/doc/config/aliyun-sms-voice/AccesskeyIDSecret.jpg');
   return (
     <div>
       <div
@@ -28,6 +29,9 @@ const AliyunSms = () => {
       <div>
         <div>用于程序通知方式调用云服务费API的用户标识和秘钥</div>
         <div>获取路径:“阿里云管理控制台”--“用户头像”--“”--“AccessKey管理”--“查看”</div>
+        <div>
+          <img style={{ width: '100%' }} src={accessKey} alt="accessKey" />
+        </div>
       </div>
     </div>
   );

+ 5 - 0
src/pages/notice/Config/Detail/doc/AliyunVoice.tsx

@@ -1,4 +1,6 @@
 const AliyunVoice = () => {
+  const accessKey = require('/public/images/notice/doc/config/aliyun-sms-voice/AccesskeyIDSecret.jpg');
+
   return (
     <div>
       <div
@@ -28,6 +30,9 @@ const AliyunVoice = () => {
         <div>用于程序通知方式调用云服务费API的用户标识和秘钥公众号开发者身份的密码</div>
         <div>获取路径:“阿里云管理控制台”--“用户头像”--“”--“AccessKey管理”--“查看”</div>
       </div>
+      <div>
+        <img style={{ width: '100%' }} src={accessKey} alt="accessKey" />
+      </div>
     </div>
   );
 };

+ 8 - 0
src/pages/notice/Config/Detail/doc/DingTalk.tsx

@@ -1,4 +1,6 @@
 const DingTalk = () => {
+  const appKey = require('/public/images/notice/doc/config/dingTalk-message/01-AppKey.jpg');
+  const appSecret = require('/public/images/notice/doc/config/dingTalk-message/02-AppSecret.jpg');
   return (
     <div>
       <div
@@ -22,11 +24,17 @@ const DingTalk = () => {
           企业内部应用的唯一身份标识。在钉钉开发者后台创建企业内部应用后,系统会自动生成一对AppKey和AppSecret。
         </div>
         <div>获取路径:“钉钉开放平台”--“应用开发”--“应用信息”</div>
+        <div>
+          <img style={{ width: '100%' }} src={appKey} alt="appKey" />
+        </div>
       </div>
       <b>2. AppSecret</b>
       <div>
         <div>钉钉应用对应的调用密钥</div>
         <div>获取路径:“钉钉开放平台”--“应用开发”--“应用信息”</div>
+        <div>
+          <img style={{ width: '100%' }} src={appSecret} alt="appSecret" />
+        </div>
       </div>
     </div>
   );

+ 14 - 0
src/pages/notice/Config/Detail/doc/DingTalkRebot.tsx

@@ -1,4 +1,9 @@
 const DingTalkRebot = () => {
+  const groupSetting = require('/public/images/notice/doc/config/dingTalk-rebot/01-group-setting.jpg');
+
+  const rebot = require('/public/images/notice/doc/config/dingTalk-rebot/02-rebot.jpg');
+
+  const webhook = require('/public/images/notice/doc/config/dingTalk-rebot/03-Webhook.jpg');
   return (
     <div>
       <b>1. 概述</b>
@@ -10,8 +15,17 @@ const DingTalkRebot = () => {
         <div> 1. WebHook</div>
         <div>在钉钉群内每创建一个钉钉群自定义机器人都会产生唯一的WebHook地址。</div>
         <div>获取路径:“钉钉桌面客户端”--“群设置”--“智能群助手”--“机器人信息”</div>
+        <div>
+          <img style={{ width: '100%' }} src={rebot} alt="rebot" />
+        </div>
         <div>1、登录钉钉桌面客户端,进入群设置</div>
+        <div>
+          <img style={{ width: '100%' }} src={groupSetting} alt="groupSetting" />
+        </div>
         <div>2、点击智能群助手,查看机器人信息</div>
+        <div>
+          <img style={{ width: '100%' }} src={webhook} alt="webhook" />
+        </div>
       </div>
     </div>
   );

+ 9 - 0
src/pages/notice/Config/Detail/doc/WeixinApp.tsx

@@ -1,4 +1,7 @@
 const WeixinApp = () => {
+  const appId = require('/public/images/notice/doc/config/weixin-official/01-AppID.jpg');
+  const appSecret = require('/public/images/notice/doc/config/weixin-official/02-AppSecret.jpg');
+
   return (
     <div>
       <div
@@ -20,11 +23,17 @@ const WeixinApp = () => {
         <div>1. AppID</div>
         <div>微信服务号的唯一专属编号。</div>
         <div>获取路径:“微信公众平台”管理后台--“设置与开发”--“基本配置”</div>
+        <div>
+          <img style={{ width: '100%' }} src={appId} alt="appId" />
+        </div>
       </div>
       <b>2. AppSecret</b>
       <div>
         <div>公众号开发者身份的密码</div>
         <div>获取路径:“微信公众平台”管理后台--“设置与开发”--“基本配置”</div>
+        <div>
+          <img style={{ width: '100%' }} src={appSecret} alt="appSercet" />
+        </div>
       </div>
     </div>
   );

+ 8 - 0
src/pages/notice/Config/Detail/doc/WeixinCorp.tsx

@@ -1,4 +1,6 @@
 const WeixinCorp = () => {
+  const corpId = require('/public/images/notice/doc/config/weixin-corp/01-corpId.jpg');
+  const corpSecret = require('/public/images/notice/doc/config/weixin-corp/02-corpSecret.jpg');
   return (
     <div>
       <div
@@ -20,12 +22,18 @@ const WeixinCorp = () => {
         <div>1. corpId</div>
         <div>企业号的唯一专属编号。</div>
         <div>获取路径:“企业微信”管理后台--“我的企业”--“企业ID”</div>
+        <div>
+          <img style={{ width: '100%' }} src={corpId} alt="corpId" />
+        </div>
       </div>
 
       <b>2. corpSecret</b>
       <div>
         <div>应用的唯一secret,一个企业微信中可以有多个corpSecret</div>
         <div>获取路径:“企业微信”--“应用与小程序”--“自建应用”中获取</div>
+        <div>
+          <img style={{ width: '100%' }} src={corpSecret} alt="corpSecret" />
+        </div>
       </div>
     </div>
   );

+ 6 - 2
src/pages/notice/Config/Detail/index.tsx

@@ -56,7 +56,7 @@ export const docMap = {
 const Detail = observer(() => {
   const { id } = useParams<{ id: string }>();
 
-  const [provider, setProvider] = useState<string>();
+  const [provider, setProvider] = useState<string>('embedded');
   const form = useMemo(
     () =>
       createForm({
@@ -73,7 +73,11 @@ const Detail = observer(() => {
             });
           });
           onFieldValueChange('provider', async (field) => {
-            setProvider(field.value);
+            if (id === 'email') {
+              setProvider('embedded');
+            } else {
+              setProvider(field.value);
+            }
           });
         },
       }),

+ 0 - 1
src/pages/notice/Template/Detail/doc/AliyunVoice.tsx

@@ -31,7 +31,6 @@ const AliyunVoice = () => {
         <div> 最多可播放3次</div>
         <div> 6、变量属性</div>
         <div>
-          {' '}
           阿里云语音模板可支持变量,但当前阿里云未提供相关语音模板内容接口,所以需要在当前页面手动设置与阿里云模板中一样的变量,否则会导致发送异常。
         </div>
       </div>

+ 12 - 3
src/pages/notice/Template/Detail/doc/DingTalk.tsx

@@ -1,4 +1,8 @@
 const DingTalk = () => {
+  const agentId = require('/public/images/notice/doc/template/dingTalk-message/01-Agentid.jpg');
+  const userId = require('/public/images/notice/doc/template/dingTalk-message/02-user-id.jpg');
+  const dept = require('/public/images/notice/doc/template/dingTalk-message/03-dept.jpg');
+  const a = '{name}';
   return (
     <div>
       <div
@@ -21,18 +25,23 @@ const DingTalk = () => {
       <div> 绑定通知配置</div>
       <div> 2. Agentid</div>
       <div> 应用唯一标识</div>
+      <div>
+        <img style={{ width: '100%' }} src={agentId} alt="agentId" />
+      </div>
       <div> 获取路径:“钉钉开发平台”--“应用开发”--“查看应用”</div>
       <div> 3. 收信人ID、收信部门ID</div>
       <div>
-        {' '}
         接收通知的2种方式,2个字段若在此页面都没有填写,则在模板调试和配置告警通知时需要手动填写
       </div>
       <div> 收信人ID获取路径:“钉钉管理后台”--“通讯录”--“查看用户”</div>
       <div> 收信部门ID获取路径:“钉钉管理后台”--“通讯录”--“编辑部门”</div>
+      <div>
+        <img style={{ width: '100%' }} src={userId} alt="userId" />
+        <img style={{ width: '100%' }} src={dept} alt="dept" />
+      </div>
       <div> 4. 模板内容</div>
       <div>
-        {' '}
-        支持填写带变量的动态模板。变量填写规范示例:${name}
+        支持填写带变量的动态模板。变量填写规范示例:${a}
         。填写动态参数后,可对变量的名称、类型、格式进行配置,以便告警通知时填写。
       </div>
     </div>

+ 10 - 2
src/pages/notice/Template/Detail/doc/DingTalkRebot.tsx

@@ -1,4 +1,8 @@
 const DingTalkRebot = () => {
+  const text = require('/public/images/notice/doc/template/dingTalk-rebot/01-text.jpg');
+  const markdown = require('/public/images/notice/doc/template/dingTalk-rebot/02-markdown.jpg');
+  const link = require('/public/images/notice/doc/template/dingTalk-rebot/03-link.jpg');
+  const b = '{name}';
   return (
     <div>
       <div
@@ -21,10 +25,14 @@ const DingTalkRebot = () => {
         <div> 绑定通知配置</div>
         <div> 2、消息类型</div>
         <div> 目前支持text、markdown、link3种,对应的发送效果示例,如下图:</div>
+        <div>
+          <img style={{ width: '100%' }} src={text} alt="text" />
+          <img style={{ width: '100%' }} src={markdown} alt="markdown" />
+          <img style={{ width: '100%' }} src={link} alt="link" />
+        </div>
         <div> 3. 模板内容</div>
         <div>
-          {' '}
-          支持填写带变量的动态模板。变量填写规范示例:${name}
+          支持填写带变量的动态模板。变量填写规范示例:${b}
           。填写动态参数后,可对变量的名称、类型、格式进行配置,以便告警通知时填写。
         </div>
       </div>

+ 9 - 0
src/pages/notice/Template/Detail/doc/WeixinApp.tsx

@@ -1,4 +1,7 @@
 const WeixinApp = () => {
+  const agentId = require('/public/images/notice/doc/template/weixin-official/01-Agentid.jpg');
+  const appId = require('/public/images/notice/doc/template/weixin-official/02-mini-Program-Appid.jpg');
+
   return (
     <div>
       <div
@@ -20,11 +23,17 @@ const WeixinApp = () => {
         <div>1. AppID</div>
         <div>微信服务号的唯一专属编号。</div>
         <div>获取路径:“微信公众平台”管理后台--“设置与开发”--“基本配置”</div>
+        <div>
+          <img style={{ width: '100%' }} src={agentId} alt="agentId" />
+        </div>
       </div>
       <b>2. AppSecret</b>
       <div>
         <div>公众号开发者身份的密码</div>
         <div>获取路径:“微信公众平台”管理后台--“设置与开发”--“基本配置”</div>
+        <div>
+          <img style={{ width: '100%' }} src={appId} alt="appId" />
+        </div>
       </div>
     </div>
   );

+ 13 - 1
src/pages/notice/Template/Detail/doc/WeixinCorp.tsx

@@ -1,4 +1,9 @@
 const WeixinCorp = () => {
+  const agentId = require('/public/images/notice/doc/template/weixin-corp/01-Agentid.jpg');
+  const userId = require('/public/images/notice/doc/template/weixin-corp/02-userID.jpg');
+  const toDept = require('/public/images/notice/doc/template/weixin-corp/03-toDept.jpg');
+  const toTags = require('/public/images/notice/doc/template/weixin-corp/04-toTags.jpg');
+
   return (
     <div>
       <div
@@ -22,13 +27,20 @@ const WeixinCorp = () => {
         <div> 2. Agentid</div>
         <div> 应用唯一标识</div>
         <div> 获取路径:“企业微信”管理后台--“应用管理”--“应用”--“查看应用”</div>
+        <div>
+          <img style={{ width: '100%' }} src={agentId} alt="agentId" />
+        </div>
         <div> 3. 收信人ID、收信部门ID、标签推送</div>
         <div>
-          {' '}
           接收通知的3种方式,3个字段若在此页面都没有填写,则在模板调试和配置告警通知时需要手动填写
         </div>
         <div> 收信人ID获取路径:【通讯录】-{'>'}【成员信息】查看成员账号</div>
         <div> 收信部门ID获取路径:【通讯录】-{'>'}【部门信息】查看部门ID</div>
+        <div>
+          <img style={{ width: '100%' }} src={userId} alt="userId" />
+          <img style={{ width: '100%' }} src={toDept} alt="toDept" />
+          <img style={{ width: '100%' }} src={toTags} alt="toTags" />
+        </div>
       </div>
     </div>
   );

+ 174 - 52
src/pages/notice/Template/Detail/index.tsx

@@ -285,68 +285,190 @@ const Detail = observer(() => {
             type: 'void',
             'x-visible': id === 'weixin',
             properties: {
-              agentId: {
-                title: 'AgentId',
-                'x-component': 'Input',
-                'x-decorator': 'FormItem',
-                'x-decorator-props': {
-                  tooltip: '请输入AgentID',
-                },
-                'x-component-props': {
-                  placeholder: '请输入AgentID',
-                },
-              },
-              toUser: {
-                title: '收信人ID',
-                'x-component': 'Select',
-                'x-decorator': 'FormItem',
-                'x-decorator-props': {
-                  tooltip: '请输入收信人ID',
-                },
-                'x-component-props': {
-                  placeholder: '请输入收信人ID',
-                  mode: 'tags',
-                },
-                'x-reactions': {
-                  dependencies: ['configId'],
-                  fulfill: {
-                    run: '{{useAsyncDataSource(getWeixinUser($deps[0]))}}',
+              corpMessage: {
+                type: 'void',
+                properties: {
+                  agentId: {
+                    title: 'AgentId',
+                    'x-component': 'Input',
+                    'x-decorator': 'FormItem',
+                    'x-decorator-props': {
+                      tooltip: '请输入AgentID',
+                    },
+                    'x-component-props': {
+                      placeholder: '请输入AgentID',
+                    },
+                  },
+                  toUser: {
+                    title: '收信人ID',
+                    'x-component': 'Select',
+                    'x-decorator': 'FormItem',
+                    'x-decorator-props': {
+                      tooltip: '请输入收信人ID',
+                    },
+                    'x-component-props': {
+                      placeholder: '请输入收信人ID',
+                      mode: 'tags',
+                    },
+                    'x-reactions': {
+                      dependencies: ['configId'],
+                      fulfill: {
+                        run: '{{useAsyncDataSource(getWeixinUser($deps[0]))}}',
+                      },
+                    },
+                  },
+                  toParty: {
+                    title: '收信部门ID',
+                    'x-component': 'Select',
+                    'x-decorator': 'FormItem',
+                    'x-decorator-props': {
+                      tooltip: '请输入收信部门ID',
+                    },
+                    'x-component-props': {
+                      placeholder: '请输入收信部门ID',
+                      mode: 'tags',
+                    },
+                    'x-reactions': {
+                      dependencies: ['configId'],
+                      fulfill: {
+                        run: '{{useAsyncDataSource(getWeixinDept($deps[0]))}}',
+                      },
+                    },
+                  },
+                  toTag: {
+                    title: '标签推送',
+                    'x-component': 'Select',
+                    'x-decorator': 'FormItem',
+                    'x-decorator-props': {
+                      tooltip: '标签推送',
+                    },
+                    'x-component-props': {
+                      placeholder: '请输入标签推送,多个标签用,号分隔',
+                      mode: 'tags',
+                    },
+                    'x-reactions': {
+                      dependencies: ['configId'],
+                      fulfill: {
+                        run: '{{useAsyncDataSource(getWeixinTags($deps[0]))}}',
+                      },
+                    },
                   },
-                },
-              },
-              toParty: {
-                title: '收信部门ID',
-                'x-component': 'Select',
-                'x-decorator': 'FormItem',
-                'x-decorator-props': {
-                  tooltip: '请输入收信部门ID',
-                },
-                'x-component-props': {
-                  placeholder: '请输入收信部门ID',
-                  mode: 'tags',
                 },
                 'x-reactions': {
-                  dependencies: ['configId'],
+                  dependencies: ['provider'],
                   fulfill: {
-                    run: '{{useAsyncDataSource(getWeixinDept($deps[0]))}}',
+                    state: {
+                      visible: '{{$deps[0]==="corpMessage"}}',
+                    },
                   },
                 },
               },
-              toTag: {
-                title: '标签推送',
-                'x-component': 'Select',
-                'x-decorator': 'FormItem',
-                'x-decorator-props': {
-                  tooltip: '标签推送',
-                },
-                'x-component-props': {
-                  placeholder: '请输入标签推送,多个标签用,号分隔',
-                  mode: 'tags',
+              officialMessage: {
+                type: 'void',
+                properties: {
+                  agentId: {
+                    title: 'AgentId',
+                    type: 'string',
+                    'x-decorator': 'FormItem',
+                    'x-component': 'Input',
+                    'x-component-props': {
+                      placeholder: '请输入AgentId',
+                    },
+                  },
+                  tagid: {
+                    title: '用户标签',
+                    type: 'string',
+                    'x-decorator': 'FormItem',
+                    'x-component': 'Select',
+                    'x-component-props': {
+                      placeholder: '请选择用户标签',
+                    },
+                  },
+                  wxTemplateId: {
+                    title: '消息模版',
+                    type: 'string',
+                    'x-decorator': 'FormItem',
+                    'x-component': 'Select',
+                    'x-component-props': {
+                      placeholder: '请选择消息模版',
+                    },
+                  },
+                  url: {
+                    title: '模版跳转链接',
+                    type: 'string',
+                    'x-decorator': 'FormItem',
+                    'x-component': 'Input',
+                    'x-component-props': {
+                      placeholder: '请输入模版跳转链接',
+                    },
+                  },
+                  toMiniProgram: {
+                    title: '跳转小程序',
+                    type: 'string',
+                    'x-decorator': 'FormItem',
+                    'x-component': 'Radio.Group',
+                    'x-component-props': {
+                      // optionType: 'button'
+                    },
+                    default: false,
+                    enum: [
+                      { label: '是', value: true },
+                      { label: '否', value: false },
+                    ],
+                  },
+                  miniProgram: {
+                    type: 'void',
+                    properties: {
+                      miniProgramId: {
+                        title: '跳转小程序AppId',
+                        type: 'string',
+                        'x-decorator': 'FormItem',
+                        'x-component': 'Input',
+                        'x-component-props': {
+                          placeholder: '请输入跳转小程序AppId',
+                        },
+                      },
+                      miniProgramPath: {
+                        title: '跳转小程序具体路径',
+                        type: 'string',
+                        'x-decorator': 'FormItem',
+                        'x-component': 'Input',
+                        'x-component-props': {
+                          placeholder: '请输入跳转小程序具体路径',
+                        },
+                      },
+                    },
+                    'x-reactions': {
+                      dependencies: ['.toMiniProgram'],
+                      fulfill: {
+                        state: {
+                          visible: '{{$deps[0]===true}}',
+                        },
+                      },
+                    },
+                  },
+                  title: {
+                    title: '模版标题',
+                    type: 'string',
+                    'x-decorator': 'FormItem',
+                    'x-component': 'Input',
+                    'x-component-props': {
+                      placeholder: '这里是回显内容',
+                    },
+                  },
+                  content: {
+                    title: '模版内容',
+                    type: 'string',
+                    'x-decorator': 'FormItem',
+                    'x-component': 'Input.TextArea',
+                  },
                 },
                 'x-reactions': {
-                  dependencies: ['configId'],
+                  dependencies: ['provider'],
                   fulfill: {
-                    run: '{{useAsyncDataSource(getWeixinTags($deps[0]))}}',
+                    state: {
+                      visible: '{{$deps[0]==="officialMessage"}}',
+                    },
                   },
                 },
               },

+ 1 - 1
src/pages/notice/Template/Log/index.tsx

@@ -14,7 +14,7 @@ const Log = observer(() => {
   const columns: ProColumns<LogItem>[] = [
     {
       dataIndex: 'config',
-      title: '通知配置',
+      title: 'config',
     },
     {
       dataIndex: 'sendTime',

+ 15 - 27
src/pages/notice/index.tsx

@@ -8,61 +8,49 @@ import { getMenuPathByCode, MENUS_CODE } from '@/utils/menu';
 
 const createImageLabel = (image: string, text: string) => {
   return (
-    <>
+    <div style={{ margin: 5 }}>
       <img alt="" height="100px" src={image} />
       <div style={{ textAlign: 'center' }}>{text}</div>
-    </>
+    </div>
   );
 };
+const weixinCorp = require('/public/images/notice/weixin-corp.png');
+const weixinOfficial = require('/public/images/notice/weixin-official.png');
+const dingTalkMessage = require('/public/images/notice/dingTalk-message.png');
+const dingTalkRebot = require('/public/images/notice/dingTalk-rebot.png');
+const sms = require('/public/images/notice/sms.png');
+const vocie = require('/public/images/notice/voice.png');
 
 export const typeList = {
   weixin: [
     {
-      label: createImageLabel(
-        'https://lf1-cdn-tos.bytegoofy.com/goofy/lark/passport/staticfiles/passport/OKR.png',
-        '企业消息',
-      ),
+      label: createImageLabel(weixinCorp, '企业消息'),
       value: 'corpMessage',
     },
     {
-      label: createImageLabel(
-        'https://lf1-cdn-tos.bytegoofy.com/goofy/lark/passport/staticfiles/passport/Hire.png',
-        '服务号消息',
-      ),
+      label: createImageLabel(weixinOfficial, '服务号消息'),
       value: 'officialMessage',
     },
   ],
   dingTalk: [
     {
-      label: createImageLabel(
-        'https://lf1-cdn-tos.bytegoofy.com/goofy/lark/passport/staticfiles/passport/OKR.png',
-        '钉钉消息',
-      ),
+      label: createImageLabel(dingTalkMessage, '钉钉消息'),
       value: 'dingTalkMessage',
     },
     {
-      label: createImageLabel(
-        'https://lf1-cdn-tos.bytegoofy.com/goofy/lark/passport/staticfiles/passport/Hire.png',
-        '群机器人消息',
-      ),
+      label: createImageLabel(dingTalkRebot, '群机器人消息'),
       value: 'dingTalkRobotWebHook',
     },
   ],
   voice: [
     {
-      label: createImageLabel(
-        'https://lf1-cdn-tos.bytegoofy.com/goofy/lark/passport/staticfiles/passport/OKR.png',
-        '阿里云语音',
-      ),
+      label: createImageLabel(vocie, '阿里云语音'),
       value: 'aliyun',
     },
   ],
   sms: [
     {
-      label: createImageLabel(
-        'https://lf1-cdn-tos.bytegoofy.com/goofy/lark/passport/staticfiles/passport/OKR.png',
-        '阿里云短信',
-      ),
+      label: createImageLabel(sms, '阿里云短信'),
       value: 'aliyunSms',
     },
   ],
@@ -121,7 +109,7 @@ const Type = observer(() => {
     <PageContainer
       title={false}
       // breadcrumbRender={() => {
-      //   return <div>通知配置</div>;
+      //   return <div>config</div>;
       // }}
     >
       <Row gutter={[24, 24]}>

+ 2 - 2
src/utils/menu/index.ts

@@ -13,8 +13,8 @@ const DetailCode = 'detail';
 const extraRouteObj = {
   notice: {
     children: [
-      { code: 'Config', name: '通知配置' },
-      { code: 'Template', name: '通知模板' },
+      { code: 'Config', name: 'config' },
+      { code: 'Template', name: 'template' },
     ],
   },
   'media/Cascade': {