Bläddra i källkod

fix(bug): fix bug

lind 3 år sedan
förälder
incheckning
564284cc8e

+ 1 - 1
src/components/ProTableCard/CardItems/noticeTemplate.tsx

@@ -16,7 +16,7 @@ export const imgMap = {
     dingTalkRobotWebHook: require('/public/images/notice/dingTalk-rebot.png'),
   },
   weixin: {
-    corpMessage: require('/public/images/notice/wechat.png'),
+    corpMessage: require('/public/images/notice/weixin-corp.png'),
     officialMessage: require('/public/images/notice/weixin-official.png'),
   },
   email: {

+ 5 - 1
src/pages/Northbound/DuerOS/Detail/Doc.tsx

@@ -7,7 +7,11 @@ const Doc = () => {
     <div className="doc">
       <div className="url">
         小度智能家居开放平台:
-        <a href="https://dueros.baidu.com/dbp/bot/index#/iotopenplatform">
+        <a
+          href="https://dueros.baidu.com/dbp/bot/index#/iotopenplatform"
+          target="_blank"
+          rel="noopener noreferrer"
+        >
           https://dueros.baidu.com/dbp/bot/index#/iotopenplatform
         </a>
       </div>

+ 6 - 0
src/pages/Northbound/DuerOS/service.ts

@@ -14,6 +14,12 @@ class Service extends BaseService<DuerOSItem> {
       method: 'POST',
       data: {
         paging: false,
+        terms: [
+          {
+            column: 'id$dueros-product$not',
+            value: 1,
+          },
+        ],
       },
     });
 

+ 1 - 1
src/pages/home/comprehensive/index.tsx

@@ -354,7 +354,7 @@ const Comprehensive = () => {
               content: '根据不同的传输类型,关联消息协议,配置设备接入网关相关参数。',
               url: require('/public/images/home/bottom-4.png'),
               onClick: () => {
-                const url = getMenuPathByCode(MENUS_CODE['link/Gateway']);
+                const url = getMenuPathByCode(MENUS_CODE['link/AccessConfig']);
                 if (!!url) {
                   history.push(url);
                 } else {

+ 1 - 1
src/pages/home/ops/index.tsx

@@ -179,7 +179,7 @@ const Ops = () => {
               content: '根据不同的传输类型,关联消息协议,配置设备接入网关相关参数。',
               url: require('/public/images/home/bottom-4.png'),
               onClick: () => {
-                const url = getMenuPathByCode(MENUS_CODE['link/Gateway']);
+                const url = getMenuPathByCode(MENUS_CODE['link/AccessConfig']);
                 if (!!url) {
                   history.push(url);
                 } else {

+ 3 - 1
src/pages/notice/Config/Detail/doc/AliyunSms.tsx

@@ -7,7 +7,9 @@ const AliyunSms = () => {
     <div className={'doc'}>
       <div className={'url'}>
         阿里云管理控制台:
-        <a href="https://home.console.aliyun.com">https://home.console.aliyun.com</a>
+        <a href="https://home.console.aliyun.com" target="_blank" rel="noopener noreferrer">
+          https://home.console.aliyun.com
+        </a>
       </div>
       <h1>1. 概述</h1>
       <div>

+ 3 - 1
src/pages/notice/Config/Detail/doc/AliyunVoice.tsx

@@ -8,7 +8,9 @@ const AliyunVoice = () => {
     <div className={'doc'}>
       <div className={'url'}>
         阿里云管理控制台:
-        <a href="https://home.console.aliyun.com">https://home.console.aliyun.com</a>
+        <a href="https://home.console.aliyun.com" target="_blank" rel="noopener noreferrer">
+          https://home.console.aliyun.com
+        </a>
       </div>
       <h1>1. 概述</h1>
       <div>

+ 4 - 1
src/pages/notice/Config/Detail/doc/DingTalk.tsx

@@ -7,7 +7,10 @@ const DingTalk = () => {
   return (
     <div className={'doc'}>
       <div className={'url'}>
-        钉钉管理后台:<a href="https://open-dev.dingtalk.com">https://open-dev.dingtalk.com</a>
+        钉钉管理后台:
+        <a href="https://open-dev.dingtalk.com" target="_blank" rel="noopener noreferrer">
+          https://open-dev.dingtalk.com
+        </a>
       </div>
       <h1>1. 概述</h1>
       <div>

+ 4 - 1
src/pages/notice/Config/Detail/doc/WeixinApp.tsx

@@ -8,7 +8,10 @@ const WeixinApp = () => {
   return (
     <div className={'doc'}>
       <div className={'url'}>
-        微信公众平台:<a href="https://mp.weixin.qq.com/">https://mp.weixin.qq.com/</a>
+        微信公众平台:
+        <a href="https://mp.weixin.qq.com/" target="_blank" rel="noopener noreferrer">
+          https://mp.weixin.qq.com/
+        </a>
       </div>
       <h1>1. 概述</h1>
       <div>

+ 4 - 1
src/pages/notice/Config/Detail/doc/WeixinCorp.tsx

@@ -7,7 +7,10 @@ const WeixinCorp = () => {
   return (
     <div className={'doc'}>
       <div className={'url'}>
-        企业微信管理后台:<a href="https://work.weixin.qq.com">https://work.weixin.qq.com</a>
+        企业微信管理后台:
+        <a href="https://work.weixin.qq.com" target="_blank" rel="noopener noreferrer">
+          https://work.weixin.qq.com
+        </a>
       </div>
       <h1>1. 概述</h1>
       <div>

+ 4 - 1
src/pages/notice/Config/Detail/index.tsx

@@ -352,7 +352,7 @@ const Detail = observer(() => {
                     'x-component-props': {
                       placeholder: '请输入服务器地址',
                       style: {
-                        width: '200px',
+                        width: '180px',
                       },
                     },
                     'x-component': 'FAutoComplete',
@@ -407,6 +407,9 @@ const Detail = observer(() => {
                     'x-decorator': 'FormItem',
                     'x-component-props': {
                       children: '开启SSL',
+                      style: {
+                        width: '100px',
+                      },
                     },
                     // enum: [{label: '开启SSL', value: true}],
                   },

+ 3 - 1
src/pages/notice/Config/Log/index.tsx

@@ -20,6 +20,7 @@ const Log = observer(() => {
     {
       dataIndex: 'notifyTime',
       title: '发送时间',
+      valueType: 'dateTime',
     },
     {
       dataIndex: 'state',
@@ -80,10 +81,11 @@ const Log = observer(() => {
       footer={null}
       onCancel={() => (state.log = false)}
       title="通知记录"
-      width={'70vw'}
+      width="50vw"
       visible={state.log && !!state.current?.id}
     >
       <SearchComponent
+        model="simple"
         defaultParam={[{ column: 'notifyType$IN', value: id }]}
         field={columns}
         onSearch={(data) => {

+ 11 - 5
src/pages/notice/Template/Debug/index.tsx

@@ -1,5 +1,5 @@
-import { message, Modal } from 'antd';
-import { useEffect, useMemo, useRef } from 'react';
+import { message, Modal, Spin } from 'antd';
+import { useEffect, useMemo, useRef, useState } from 'react';
 import { createForm, Field, onFieldReact, onFieldValueChange } from '@formily/core';
 import { createSchemaField, observer } from '@formily/react';
 import {
@@ -233,7 +233,9 @@ const Debug = observer(() => {
     },
   };
 
+  const [spinning, setSpinning] = useState<boolean>(false);
   const start = async () => {
+    setSpinning(true);
     const data: { configId: string; variableDefinitions: any } = await form.submit();
     // 应该取选择的配置信息
     if (!state.current) return;
@@ -252,6 +254,8 @@ const Debug = observer(() => {
     );
     if (resp.status === 200) {
       message.success('操作成功!');
+      setSpinning(false);
+      state.debug = false;
     }
   };
   return (
@@ -264,9 +268,11 @@ const Debug = observer(() => {
       onCancel={() => (state.debug = false)}
       onOk={start}
     >
-      <Form form={form} layout={'vertical'}>
-        <SchemaField schema={schema} scope={{ getConfig, useAsyncDataSource }} />
-      </Form>
+      <Spin spinning={spinning}>
+        <Form form={form} layout={'vertical'}>
+          <SchemaField schema={schema} scope={{ getConfig, useAsyncDataSource }} />
+        </Form>
+      </Spin>
     </Modal>
   );
 });

+ 3 - 1
src/pages/notice/Template/Detail/doc/AliyunSms.tsx

@@ -5,7 +5,9 @@ const AliyunSms = () => {
     <div className="doc">
       <div className="url">
         阿里云短信服务平台:
-        <a href="https://dysms.console.aliyun.com">https://dysms.console.aliyun.com</a>
+        <a href="https://dysms.console.aliyun.com" target="_blank" rel="noopener noreferrer">
+          https://dysms.console.aliyun.com
+        </a>
       </div>
       <h1>1. 概述</h1>
       <div>

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

@@ -5,7 +5,9 @@ const AliyunVoice = () => {
     <div className="doc">
       <div className="url">
         阿里云语音服务平台:
-        <a href="https://account.console.aliyun.com">https://account.console.aliyun.com</a>
+        <a href="https://account.console.aliyun.com" target="_blank" rel="noopener noreferrer">
+          https://account.console.aliyun.com
+        </a>
       </div>
       <h1>1. 概述</h1>
       <div>

+ 8 - 2
src/pages/notice/Template/Detail/doc/DingTalk.tsx

@@ -9,9 +9,15 @@ const DingTalk = () => {
   return (
     <div className="doc">
       <div className="url">
-        钉钉开放平台:<a href="https://open-dev.dingtalk.com">https://open-dev.dingtalk.com</a>
+        钉钉开放平台:
+        <a href="https://open-dev.dingtalk.com" target="_blank" rel="noopener noreferrer">
+          https://open-dev.dingtalk.com
+        </a>
         <br />
-        钉钉管理后台:<a href="https://www.dingtalk.com">https://www.dingtalk.com</a>
+        钉钉管理后台:
+        <a href="https://www.dingtalk.com" target="_blank" rel="noopener noreferrer">
+          https://www.dingtalk.com
+        </a>
       </div>
       <h1>1. 概述</h1>
       <div>

+ 4 - 1
src/pages/notice/Template/Detail/doc/DingTalkRebot.tsx

@@ -5,7 +5,10 @@ const DingTalkRebot = () => {
   return (
     <div className="doc">
       <div className="url">
-        钉钉管理后台:<a href="https://www.dingtalk.com">https://www.dingtalk.com</a>
+        钉钉管理后台:
+        <a href="https://www.dingtalk.com" target="_blank" rel="noopener noreferrer">
+          https://www.dingtalk.com
+        </a>
       </div>
       <h1>1. 概述</h1>
       <div>

+ 4 - 1
src/pages/notice/Template/Detail/doc/WeixinApp.tsx

@@ -7,7 +7,10 @@ const WeixinApp = () => {
   return (
     <div className="doc">
       <div className="url">
-        企业微信管理后台:<a href="https://work.weixin.qq.com">https://work.weixin.qq.com</a>
+        企业微信管理后台:
+        <a href="https://work.weixin.qq.com" target="_blank" rel="noopener noreferrer">
+          https://work.weixin.qq.com
+        </a>
       </div>
       <h1>1. 概述</h1>
       <div>

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

@@ -10,7 +10,10 @@ const WeixinCorp = () => {
   return (
     <div className="doc">
       <div className="url">
-        企业微信管理后台:<a href="https://work.weixin.qq.com">https://work.weixin.qq.com</a>
+        企业微信管理后台:
+        <a href="https://work.weixin.qq.com" target="_blank" rel="noopener noreferrer">
+          https://work.weixin.qq.com
+        </a>
       </div>
       <h1>1. 概述</h1>
       <div>

+ 2 - 0
src/pages/notice/Template/Detail/index.tsx

@@ -1013,6 +1013,7 @@ const Detail = observer(() => {
                     properties: {
                       code: {
                         title: '模版',
+                        required: true,
                         'x-component': 'Select',
                         'x-decorator': 'FormItem',
                         'x-decorator-props': {
@@ -1046,6 +1047,7 @@ const Detail = observer(() => {
                   },
                   signName: {
                     title: '签名',
+                    required: true,
                     'x-component': 'Select',
                     'x-decorator': 'FormItem',
                     'x-decorator-props': {

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

@@ -84,12 +84,13 @@ const Log = observer(() => {
       destroyOnClose
       onCancel={() => (state.log = false)}
       title="通知记录"
-      width={'70vw'}
+      width={'50vw'}
       visible={state.log && !!state.current?.id}
     >
       <SearchComponent
         defaultParam={[{ column: 'notifyType$IN', value: id }]}
         field={columns}
+        model="simple"
         onSearch={(data) => {
           actionRef.current?.reset?.();
           setParam(data);

+ 2 - 3
src/pages/rule-engine/Alarm/Config/index.tsx

@@ -272,7 +272,7 @@ const Config = () => {
         'x-component': 'Input',
         'x-hidden': true,
       },
-      kafka: {
+      address: {
         title: 'kafka地址',
         type: 'string',
         required: true,
@@ -421,8 +421,7 @@ const Config = () => {
           <h1>功能说明</h1>
           <div>1、告警级别用于描述告警的严重程度,请根据业务管理方式进行自定义。</div>
           <div>2、告警级别将会在告警配置中被引用</div>
-          <div>3、该页面删除告警级别后,下方的告警级别会自动-1进行补位</div>
-          <div>4、最多可配置5个级别</div>
+          <div>3、最多可配置5个级别</div>
         </div>
       </Col>
     </Row>

+ 1 - 1
src/pages/system/User/index.tsx

@@ -253,7 +253,7 @@ const User = observer(() => {
           </PermissionButton>
         }
         request={async (params) =>
-          service.query({ ...params, sorts: [{ name: 'createTime', order: 'desc' }] })
+          service.queryDetailList({ ...params, sorts: [{ name: 'createTime', order: 'desc' }] })
         }
       />
       <Save

+ 6 - 0
src/pages/system/User/serivce.ts

@@ -15,6 +15,12 @@ class Service extends BaseService<UserItem> {
       params,
     });
 
+  queryDetailList = (data?: any) =>
+    request(`${SystemConst.API_BASE}/user/detail/_query`, {
+      method: 'POST',
+      data,
+    });
+
   queryDetail = (id: string) =>
     request(`/${SystemConst.API_BASE}/user/detail/${id}`, {
       method: 'GET',