Procházet zdrojové kódy

feat(merge): merge wzy

Next wzy
Lind před 3 roky
rodič
revize
8eff97bcc9

+ 16 - 2
src/app.tsx

@@ -16,6 +16,7 @@ import { service as MenuService } from '@/pages/system/Menu';
 import getRoutes, { extraRouteArr, getMenus, handleRoutes, saveMenusCache } from '@/utils/menu';
 import { AIcon } from '@/components';
 import React from 'react';
+import { getMenuPathByCode } from '@/utils/menu';
 
 const isDev = process.env.NODE_ENV === 'development';
 const loginPath = '/user/login';
@@ -236,8 +237,21 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => {
       // content: initialState?.currentUser?.name,
     },
     itemRender: (route, _, routes) => {
-      const chilck = routes.indexOf(route) > 1;
-      return chilck && route.path !== '/iot/rule-engine/Alarm' ? (
+      console.log(route);
+      const isToParentUrl = getMenuPathByCode('notice');
+      const chilck = routes.indexOf(route) !== 0;
+      const goto = routes.some((item) => {
+        if (!route.path.includes('iot')) {
+          return routes.indexOf(route) <= 1;
+        } else {
+          if (route.path.includes('notice')) {
+            return item.path.indexOf(isToParentUrl) > -1;
+          } else {
+            return routes.indexOf(route) > 1;
+          }
+        }
+      });
+      return chilck && goto && route.path !== '/iot/rule-engine/Alarm' ? (
         <Link to={route.path}>{route.breadcrumbName}</Link>
       ) : (
         <span>{route.breadcrumbName}</span>

+ 2 - 2
src/pages/Northbound/AliCloud/index.tsx

@@ -7,7 +7,7 @@ import { PermissionButton, ProTableCard } from '@/components';
 import {
   DeleteOutlined,
   EditOutlined,
-  ExclamationCircleFilled,
+  InfoCircleOutlined,
   PlayCircleOutlined,
   PlusOutlined,
   StopOutlined,
@@ -196,7 +196,7 @@ const AliCloud = () => {
             backgroundColor: '#f6f6f6',
           }}
         >
-          <ExclamationCircleFilled style={{ marginRight: 10 }} />
+          <InfoCircleOutlined style={{ marginRight: 10 }} />
           将平台产品与设备数据通过API的方式同步到阿里云物联网平台
         </div>
       </div>

+ 2 - 2
src/pages/Northbound/DuerOS/index.tsx

@@ -7,7 +7,7 @@ import {
   CloseCircleOutlined,
   DeleteOutlined,
   EditOutlined,
-  ExclamationCircleFilled,
+  InfoCircleOutlined,
   PlayCircleOutlined,
   PlusOutlined,
 } from '@ant-design/icons';
@@ -230,7 +230,7 @@ export default () => {
             backgroundColor: '#f6f6f6',
           }}
         >
-          <ExclamationCircleFilled style={{ marginRight: 10 }} />
+          <InfoCircleOutlined style={{ marginRight: 10 }} />
           将平台产品通过API的方式同步DuerOS平台
         </div>
       </div>

+ 2 - 2
src/pages/device/Instance/Detail/Diagnose/Status/DiagnosticAdvice.tsx

@@ -1,5 +1,5 @@
 import { getMenuPathByParams, MENUS_CODE } from '@/utils/menu';
-import { ExclamationCircleFilled } from '@ant-design/icons';
+import { InfoCircleOutlined } from '@ant-design/icons';
 import { Badge, Modal } from 'antd';
 import styles from './index.less';
 
@@ -42,7 +42,7 @@ const DiagnosticAdvice = (props: Props) => {
     >
       <div className={styles.advice}>
         <div className={styles.alert}>
-          <ExclamationCircleFilled style={{ marginRight: 10 }} />
+          <InfoCircleOutlined style={{ marginRight: 10 }} />
           所有诊断均无异常但设备任未上线,请检查以下内容
         </div>
         {(data?.product || []).map((item: any) => (

+ 2 - 2
src/pages/device/Instance/Detail/Diagnose/Status/ManualInspection.tsx

@@ -4,7 +4,7 @@ import type { ISchema } from '@formily/json-schema';
 import { Form, FormGrid, FormItem, Input, Password, PreviewText } from '@formily/antd';
 import { Modal } from 'antd';
 import styles from './index.less';
-import { ExclamationCircleFilled } from '@ant-design/icons';
+import { InfoCircleOutlined } from '@ant-design/icons';
 
 const componentMap = {
   string: 'Input',
@@ -132,7 +132,7 @@ const ManualInspection = (props: Props) => {
       visible
     >
       <div className={styles.alert}>
-        <ExclamationCircleFilled style={{ marginRight: 10 }} />
+        <InfoCircleOutlined style={{ marginRight: 10 }} />
         {data.type === 'product'
           ? `当前填写的数据将与产品-设备接入配置中的${data.data.name}数据进行比对`
           : `当前填写的数据将与设备-实例信息配置中的${data.data.name}数据进行比对`}

+ 3 - 3
src/pages/link/AccessConfig/Detail/Access/index.tsx

@@ -19,7 +19,7 @@ import encodeQuery from '@/utils/encodeQuery';
 import { useHistory } from 'umi';
 import ReactMarkdown from 'react-markdown';
 import { getButtonPermission, getMenuPathByCode, MENUS_CODE } from '@/utils/menu';
-import { ExclamationCircleFilled } from '@ant-design/icons';
+import { InfoCircleOutlined } from '@ant-design/icons';
 import TitleComponent from '@/components/TitleComponent';
 import { PermissionButton } from '@/components';
 import { useDomFullHeight } from '@/hooks';
@@ -276,7 +276,7 @@ const Access = (props: Props) => {
         return (
           <div>
             <div className={styles.alert}>
-              <ExclamationCircleFilled style={{ marginRight: 10 }} />
+              <InfoCircleOutlined style={{ marginRight: 10 }} />
               选择与设备通信的网络组件
             </div>
             <div className={styles.search}>
@@ -391,7 +391,7 @@ const Access = (props: Props) => {
         return (
           <div>
             <div className={styles.alert}>
-              <ExclamationCircleFilled style={{ marginRight: 10 }} />
+              <InfoCircleOutlined style={{ marginRight: 10 }} />
               使用选择的消息协议,对网络组件通信数据进行编解码、认证等操作
             </div>
             <div className={styles.search}>

+ 3 - 3
src/pages/link/AccessConfig/Detail/Cloud/index.tsx

@@ -1,7 +1,7 @@
 import { Button, Card, Steps } from 'antd';
 import { useEffect, useState } from 'react';
 import styles from './index.less';
-import { ExclamationCircleFilled } from '@ant-design/icons';
+import { InfoCircleOutlined } from '@ant-design/icons';
 import OneNet from './OneNet';
 import CTWing from './CTWing';
 import Protocol from './Protocol';
@@ -40,7 +40,7 @@ const Cloud = (props: Props) => {
         return (
           <div>
             <div className={styles.alert}>
-              <ExclamationCircleFilled style={{ marginRight: 10 }} />
+              <InfoCircleOutlined style={{ marginRight: 10 }} />
               通过{props?.provider?.id === 'OneNet' ? 'OneNet' : 'CTWing'}
               平台的HTTP推送服务进行数据接入
             </div>
@@ -57,7 +57,7 @@ const Cloud = (props: Props) => {
         return (
           <div>
             <div className={styles.alert}>
-              <ExclamationCircleFilled style={{ marginRight: 10 }} />
+              <InfoCircleOutlined style={{ marginRight: 10 }} />
               只能选择HTTP通信方式的协议
             </div>
             <div style={{ marginTop: 10 }}>

+ 2 - 2
src/pages/link/AccessConfig/Detail/Media/index.tsx

@@ -19,7 +19,7 @@ import { service } from '@/pages/link/AccessConfig';
 import { useLocation } from 'umi';
 import SipComponent from '@/components/SipComponent';
 import TitleComponent from '@/components/TitleComponent';
-import { ExclamationCircleFilled } from '@ant-design/icons';
+import { InfoCircleOutlined } from '@ant-design/icons';
 import { testIP } from '@/utils/util';
 import { getButtonPermission } from '@/utils/menu';
 
@@ -395,7 +395,7 @@ const Media = (props: Props) => {
     return (
       <div>
         <div className={styles.alert}>
-          <ExclamationCircleFilled style={{ marginRight: 10 }} />
+          <InfoCircleOutlined style={{ marginRight: 10 }} />
           配置设备信令参数
         </div>
         <AForm form={aform} layout="vertical" style={{ padding: 30 }}>

+ 4 - 3
src/pages/media/Device/Channel/index.tsx

@@ -74,7 +74,7 @@ export default () => {
     {
       dataIndex: 'channelId',
       title: '通道ID',
-      width: 220,
+      width: 200,
       ellipsis: true,
     },
     {
@@ -83,7 +83,7 @@ export default () => {
         id: 'pages.table.name',
         defaultMessage: '名称',
       }),
-      width: 220,
+      width: 200,
       ellipsis: true,
     },
     {
@@ -101,6 +101,7 @@ export default () => {
     },
     {
       dataIndex: 'state',
+      width: 90,
       title: intl.formatMessage({
         id: 'pages.searchTable.titleStatus',
         defaultMessage: '状态',
@@ -135,7 +136,7 @@ export default () => {
       }),
       valueType: 'option',
       align: 'center',
-      width: 200,
+      width: 120,
       render: (_, record) => [
         <Tooltip
           key="edit"

+ 1 - 0
src/pages/rule-engine/Alarm/Configuration/index.tsx

@@ -54,6 +54,7 @@ const Configuration = () => {
     {
       title: '告警级别',
       dataIndex: 'level',
+      ellipsis: true,
       render: (text: any) => (
         <span>
           {(Store.get('default-level') || []).find((item: any) => item?.level === text)?.title ||