sun-chaochao 3 лет назад
Родитель
Сommit
0afac3aa19
34 измененных файлов с 227 добавлено и 95 удалено
  1. 1 1
      src/components/ProTableCard/CardItems/aliyun.tsx
  2. 1 1
      src/components/ProTableCard/CardItems/cascade.tsx
  3. 9 8
      src/components/ProTableCard/CardItems/duerOs.tsx
  4. 10 6
      src/components/ProTableCard/CardItems/networkCard.tsx
  5. 4 0
      src/global.less
  6. 1 1
      src/locales/zh-CN/pages.ts
  7. 1 2
      src/pages/Northbound/AliCloud/Detail/index.tsx
  8. 1 1
      src/pages/Northbound/AliCloud/index.tsx
  9. 43 3
      src/pages/Northbound/DuerOS/Detail/index.tsx
  10. 4 0
      src/pages/cloud/DuerOS/typings.d.ts
  11. 2 2
      src/pages/device/Alarm/index.tsx
  12. 2 2
      src/pages/device/Command/index.tsx
  13. 2 2
      src/pages/device/Firmware/index.tsx
  14. 1 1
      src/pages/device/Instance/index.tsx
  15. 1 1
      src/pages/link/AccessConfig/Detail/Access/index.tsx
  16. 1 1
      src/pages/link/AccessConfig/index.tsx
  17. 1 1
      src/pages/link/Channel/Opcua/Save/index.tsx
  18. 3 3
      src/pages/link/Protocol/index.tsx
  19. 4 6
      src/pages/link/Protocol/save/index.tsx
  20. 1 1
      src/pages/link/Type/Detail/index.tsx
  21. 11 6
      src/pages/link/Type/index.tsx
  22. 2 2
      src/pages/media/Cascade/Save/index.tsx
  23. 2 2
      src/pages/media/Cascade/index.tsx
  24. 1 1
      src/pages/media/Device/Channel/index.tsx
  25. 49 0
      src/pages/notice/Config/index.tsx
  26. 31 22
      src/pages/notice/Template/Debug/index.tsx
  27. 4 4
      src/pages/notice/Template/index.tsx
  28. 3 9
      src/pages/rule-engine/Alarm/Configuration/Save/index.tsx
  29. 17 0
      src/pages/rule-engine/Alarm/Configuration/index.tsx
  30. 8 0
      src/pages/rule-engine/Alarm/Log/TabComponent/index.less
  31. 1 1
      src/pages/rule-engine/Scene/Save/action/VariableItems/user.tsx
  32. 2 2
      src/pages/system/Permission/index.tsx
  33. 1 1
      src/pages/system/Tenant/Detail/Member/Bind.tsx
  34. 2 2
      src/pages/system/User/index.tsx

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

@@ -20,7 +20,7 @@ export default (props: AliyunCardProps) => {
       status={props?.state?.value}
       status={props?.state?.value}
       statusText={props?.state?.text}
       statusText={props?.state?.text}
       statusNames={{
       statusNames={{
-        enabled: StatusColorEnum.processing,
+        enabled: StatusColorEnum.success,
         disabled: StatusColorEnum.error,
         disabled: StatusColorEnum.error,
       }}
       }}
       showMask={false}
       showMask={false}

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

@@ -22,7 +22,7 @@ export default (props: CascadeCardProps) => {
       status={props.status.value}
       status={props.status.value}
       statusText={props.status.text}
       statusText={props.status.text}
       statusNames={{
       statusNames={{
-        enabled: StatusColorEnum.processing,
+        enabled: StatusColorEnum.success,
         disabled: StatusColorEnum.error,
         disabled: StatusColorEnum.error,
       }}
       }}
     >
     >

+ 9 - 8
src/components/ProTableCard/CardItems/duerOs.tsx

@@ -4,6 +4,7 @@ import '@/style/common.less';
 import '../index.less';
 import '../index.less';
 import { Tooltip } from 'antd';
 import { Tooltip } from 'antd';
 import { DuerOSItem } from '@/pages/cloud/DuerOS/typings';
 import { DuerOSItem } from '@/pages/cloud/DuerOS/typings';
+import { StatusColorEnum } from '@/components/BadgeStatus';
 
 
 export interface DuerOSProps extends DuerOSItem {
 export interface DuerOSProps extends DuerOSItem {
   detail?: React.ReactNode;
   detail?: React.ReactNode;
@@ -17,14 +18,14 @@ export default (props: DuerOSProps) => {
   return (
   return (
     <TableCard
     <TableCard
       actions={props.action}
       actions={props.action}
-      // detail={props.detail}
-      showStatus={false}
-      // status={props.state?.value}
-      // statusText={props.state?.text}
-      // statusNames={{
-      //   enabled: StatusColorEnum.success,
-      //   disabled: StatusColorEnum.error,
-      // }}
+      detail={props.detail}
+      // showStatus={false}
+      status={props?.state?.value}
+      statusText={props?.state?.text}
+      statusNames={{
+        enabled: StatusColorEnum.success,
+        disabled: StatusColorEnum.error,
+      }}
       showMask={false}
       showMask={false}
     >
     >
       <div className={'pro-table-card-item'}>
       <div className={'pro-table-card-item'}>

+ 10 - 6
src/components/ProTableCard/CardItems/networkCard.tsx

@@ -19,23 +19,27 @@ export default (props: NoticeCardProps) => {
   const createDetail = () => {
   const createDetail = () => {
     const record = props;
     const record = props;
     if (record.shareCluster) {
     if (record.shareCluster) {
-      const publicHost = record.configuration.publicHost;
-      const publicPort = record.configuration.publicPort;
-      return publicHost ? (
+      const host = record.configuration.publicHost || record.configuration.remoteHost;
+      const port = record.configuration.publicPort || record.configuration.remotePort;
+      return host ? (
         <>
         <>
           {networkMap[record.type]}
           {networkMap[record.type]}
-          {publicHost}:{publicPort}
+          {host}:{port}
         </>
         </>
       ) : null;
       ) : null;
     } else {
     } else {
       const log = record.cluster?.map(
       const log = record.cluster?.map(
-        (item) => `${item.configuration.publicHost}:${item.configuration.publicPort}`,
+        (item) =>
+          `${item.configuration.publicHost || record.configuration.remoteHost}:${
+            item.configuration.publicPort || record.configuration.remotePort
+          }`,
       );
       );
       return (
       return (
         <>
         <>
           {log.map((item) => (
           {log.map((item) => (
             <div key={item}>
             <div key={item}>
-              `${networkMap[record.type]}${item}`
+              {networkMap[record.type]}
+              {item}
             </div>
             </div>
           ))}
           ))}
         </>
         </>

+ 4 - 0
src/global.less

@@ -126,4 +126,8 @@ ol {
 
 
 .ellipsis-70 {
 .ellipsis-70 {
   width: 70%;
   width: 70%;
+  overflow: hidden;
+  white-space: nowrap;
+  text-align: left;
+  text-overflow: ellipsis;
 }
 }

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

@@ -257,7 +257,7 @@ export default {
   // 设备管理-设备
   // 设备管理-设备
   'pages.device.instance': '设备',
   'pages.device.instance': '设备',
   'pages.device.instance.registrationTime': '注册时间',
   'pages.device.instance.registrationTime': '注册时间',
-  'pages.device.instance.status.notActive': '未启用',
+  'pages.device.instance.status.notActive': '用',
   'pages.device.instance.status.offLine': '离线',
   'pages.device.instance.status.offLine': '离线',
   'pages.device.instance.status.onLine': '在线',
   'pages.device.instance.status.onLine': '在线',
   'pages.device.instance.deleteTip': '已启用的设备无法删除',
   'pages.device.instance.deleteTip': '已启用的设备无法删除',

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

@@ -11,8 +11,7 @@ import {
   Select,
   Select,
 } from '@formily/antd';
 } from '@formily/antd';
 import type { Field } from '@formily/core';
 import type { Field } from '@formily/core';
-import { onFormInit } from '@formily/core';
-import { createForm, FormPath, onFieldChange, onFieldValueChange } from '@formily/core';
+import { createForm, FormPath, onFieldChange, onFieldValueChange, onFormInit } from '@formily/core';
 import { createSchemaField, observer } from '@formily/react';
 import { createSchemaField, observer } from '@formily/react';
 import { Card, Col, Image, Row } from 'antd';
 import { Card, Col, Image, Row } from 'antd';
 import { useMemo } from 'react';
 import { useMemo } from 'react';

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

@@ -156,7 +156,7 @@ const AliCloud = () => {
       valueType: 'select',
       valueType: 'select',
       valueEnum: {
       valueEnum: {
         disabled: {
         disabled: {
-          text: '用',
+          text: '用',
           status: 'disabled',
           status: 'disabled',
         },
         },
         enabled: {
         enabled: {

+ 43 - 3
src/pages/Northbound/DuerOS/Detail/index.tsx

@@ -5,11 +5,13 @@ import { Card, Col, Row } from 'antd';
 import {
 import {
   ArrayCollapse,
   ArrayCollapse,
   ArrayTable,
   ArrayTable,
+  DatePicker,
   Form,
   Form,
   FormButtonGroup,
   FormButtonGroup,
   FormGrid,
   FormGrid,
   FormItem,
   FormItem,
   Input,
   Input,
+  NumberPicker,
   PreviewText,
   PreviewText,
   Select,
   Select,
 } from '@formily/antd';
 } from '@formily/antd';
@@ -29,6 +31,7 @@ import { Store } from 'jetlinks-store';
 import { useParams } from 'umi';
 import { useParams } from 'umi';
 import Doc from '@/pages/Northbound/DuerOS/Detail/Doc';
 import Doc from '@/pages/Northbound/DuerOS/Detail/Doc';
 import _ from 'lodash';
 import _ from 'lodash';
+import FUpload from '@/components/Upload';
 
 
 const Save = () => {
 const Save = () => {
   const SchemaField = createSchemaField({
   const SchemaField = createSchemaField({
@@ -99,7 +102,7 @@ const Save = () => {
             );
             );
             const value = (field as Field).value;
             const value = (field as Field).value;
 
 
-            const title = actions.find((item: any) => item.id === value)?.name;
+            const title = actions?.find((item: any) => item.id === value)?.name;
             f.setFieldState(actionPath, (state) => {
             f.setFieldState(actionPath, (state) => {
               state.componentProps = {
               state.componentProps = {
                 header: title || '动作映射',
                 header: title || '动作映射',
@@ -122,7 +125,7 @@ const Save = () => {
               const product = field.query('id').value();
               const product = field.query('id').value();
               const _functionList = findProductMetadata(product)?.functions;
               const _functionList = findProductMetadata(product)?.functions;
               const _function =
               const _function =
-                _functionList && _functionList.find((item: any) => item.id === functionId);
+                _functionList && _functionList?.find((item: any) => item.id === functionId);
               form1.setFieldState(field.query('.inputs'), (state) => {
               form1.setFieldState(field.query('.inputs'), (state) => {
                 state.value = _function?.inputs.map((item: any) => ({
                 state.value = _function?.inputs.map((item: any) => ({
                   ...item,
                   ...item,
@@ -141,7 +144,7 @@ const Save = () => {
               (index) => `propertyMappings.${index}`,
               (index) => `propertyMappings.${index}`,
             );
             );
             const value = (field as Field).value;
             const value = (field as Field).value;
-            const title = propertiesList.find((item: any) => item.id === value)?.name;
+            const title = propertiesList?.find((item: any) => item.id === value)?.name;
             f.setFieldState(propertyMappingPath, (state) => {
             f.setFieldState(propertyMappingPath, (state) => {
               state.componentProps = {
               state.componentProps = {
                 header: title || '属性映射',
                 header: title || '属性映射',
@@ -152,6 +155,39 @@ const Save = () => {
             const product = field.query('id').value();
             const product = field.query('id').value();
             (field as Field).setDataSource(findProductMetadata(product)?.properties);
             (field as Field).setDataSource(findProductMetadata(product)?.properties);
           });
           });
+          onFieldReact('actionMappings.*.layout.command.message.inputs.*.valueType', (field) => {
+            const value = (field as Field).value;
+            const format = field.query('.value').take() as any;
+            if (!format) return;
+            switch (value) {
+              case 'date':
+                format.setComponent(DatePicker);
+                break;
+              case 'string':
+                format.setComponent(Input);
+                break;
+              case 'number':
+              case 'int':
+                format.setComponent(NumberPicker);
+                break;
+              case 'boolean':
+                format.setComponent(Select);
+                format.setDataSource([
+                  { label: '是', value: true },
+                  { label: '否', value: false },
+                ]);
+                break;
+              case 'file':
+                format.setComponent(FUpload, {
+                  type: 'file',
+                });
+                break;
+
+              case 'other':
+                format.setComponent(Input);
+                break;
+            }
+          });
         },
         },
       }),
       }),
     [],
     [],
@@ -246,6 +282,10 @@ const Save = () => {
                 label: 'name',
                 label: 'name',
                 value: 'id',
                 value: 'id',
               },
               },
+              showSearch: true,
+              showArrow: true,
+              filterOption: (input: string, option: any) =>
+                option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0,
             },
             },
             'x-reactions': '{{useAsyncDataSource(getTypes)}}',
             'x-reactions': '{{useAsyncDataSource(getTypes)}}',
             required: true,
             required: true,

+ 4 - 0
src/pages/cloud/DuerOS/typings.d.ts

@@ -36,6 +36,10 @@ type DuerOSItem = {
     text: string;
     text: string;
     value: string;
     value: string;
   };
   };
+  state?: {
+    text: string;
+    value: string;
+  };
   actionMappings: ActionMapping[];
   actionMappings: ActionMapping[];
   propertyMappings: PropertyMapping[];
   propertyMappings: PropertyMapping[];
 } & BaseItem;
 } & BaseItem;

+ 2 - 2
src/pages/device/Alarm/index.tsx

@@ -1,12 +1,12 @@
 import { PageContainer } from '@ant-design/pro-layout';
 import { PageContainer } from '@ant-design/pro-layout';
 import BaseService from '@/utils/BaseService';
 import BaseService from '@/utils/BaseService';
 import { useRef } from 'react';
 import { useRef } from 'react';
-import type { ProColumns, ActionType } from '@jetlinks/pro-table';
+import type { ActionType, ProColumns } from '@jetlinks/pro-table';
+import ProTable from '@jetlinks/pro-table';
 import moment from 'moment';
 import moment from 'moment';
 import { Form, Input, Modal, Tag, Tooltip } from 'antd';
 import { Form, Input, Modal, Tag, Tooltip } from 'antd';
 import { CheckOutlined, EyeOutlined } from '@ant-design/icons';
 import { CheckOutlined, EyeOutlined } from '@ant-design/icons';
 import { useIntl } from '@@/plugin-locale/localeExports';
 import { useIntl } from '@@/plugin-locale/localeExports';
-import ProTable from '@jetlinks/pro-table';
 import { request } from 'umi';
 import { request } from 'umi';
 import SystemConst from '@/utils/const';
 import SystemConst from '@/utils/const';
 import { onlyMessage } from '@/utils/util';
 import { onlyMessage } from '@/utils/util';

+ 2 - 2
src/pages/device/Command/index.tsx

@@ -1,13 +1,13 @@
 import { PageContainer } from '@ant-design/pro-layout';
 import { PageContainer } from '@ant-design/pro-layout';
 import { useRef } from 'react';
 import { useRef } from 'react';
-import type { ProColumns, ActionType } from '@jetlinks/pro-table';
+import type { ActionType, ProColumns } from '@jetlinks/pro-table';
+import ProTable from '@jetlinks/pro-table';
 import type { CommandItem } from '@/pages/device/Command/typings';
 import type { CommandItem } from '@/pages/device/Command/typings';
 import { Button, Tooltip } from 'antd';
 import { Button, Tooltip } from 'antd';
 import moment from 'moment';
 import moment from 'moment';
 import { EyeOutlined, PlusOutlined, SyncOutlined } from '@ant-design/icons';
 import { EyeOutlined, PlusOutlined, SyncOutlined } from '@ant-design/icons';
 import { useIntl } from '@@/plugin-locale/localeExports';
 import { useIntl } from '@@/plugin-locale/localeExports';
 import Service from '@/pages/device/Command/service';
 import Service from '@/pages/device/Command/service';
-import ProTable from '@jetlinks/pro-table';
 import Create from '@/pages/device/Command/create';
 import Create from '@/pages/device/Command/create';
 import encodeQuery from '@/utils/encodeQuery';
 import encodeQuery from '@/utils/encodeQuery';
 import { model } from '@formily/reactive';
 import { model } from '@formily/reactive';

+ 2 - 2
src/pages/device/Firmware/index.tsx

@@ -1,5 +1,6 @@
 import { PageContainer } from '@ant-design/pro-layout';
 import { PageContainer } from '@ant-design/pro-layout';
-import type { ProColumns, ActionType } from '@jetlinks/pro-table';
+import type { ActionType, ProColumns } from '@jetlinks/pro-table';
+import ProTable from '@jetlinks/pro-table';
 import { Button, Popconfirm, Tooltip } from 'antd';
 import { Button, Popconfirm, Tooltip } from 'antd';
 import moment from 'moment';
 import moment from 'moment';
 import { useRef } from 'react';
 import { useRef } from 'react';
@@ -7,7 +8,6 @@ import { useIntl } from '@@/plugin-locale/localeExports';
 import { EditOutlined, EyeOutlined, MinusOutlined, PlusOutlined } from '@ant-design/icons';
 import { EditOutlined, EyeOutlined, MinusOutlined, PlusOutlined } from '@ant-design/icons';
 import { Link } from 'umi';
 import { Link } from 'umi';
 import { model } from '@formily/reactive';
 import { model } from '@formily/reactive';
-import ProTable from '@jetlinks/pro-table';
 import { observer } from '@formily/react';
 import { observer } from '@formily/react';
 import type { FirmwareItem, TaskItem } from '@/pages/device/Firmware/typings';
 import type { FirmwareItem, TaskItem } from '@/pages/device/Firmware/typings';
 import Service from '@/pages/device/Firmware/service';
 import Service from '@/pages/device/Firmware/service';

+ 1 - 1
src/pages/device/Instance/index.tsx

@@ -267,7 +267,7 @@ const Instance = () => {
         notActive: {
         notActive: {
           text: intl.formatMessage({
           text: intl.formatMessage({
             id: 'pages.device.instance.status.notActive',
             id: 'pages.device.instance.status.notActive',
-            defaultMessage: '未启用',
+            defaultMessage: '用',
           }),
           }),
           status: 'notActive',
           status: 'notActive',
         },
         },

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

@@ -11,7 +11,7 @@ import TitleComponent from '@/components/TitleComponent';
 import { PermissionButton } from '@/components';
 import { PermissionButton } from '@/components';
 import { useDomFullHeight } from '@/hooks';
 import { useDomFullHeight } from '@/hooks';
 import { onlyMessage } from '@/utils/util';
 import { onlyMessage } from '@/utils/util';
-import { MetworkTypeMapping, ProcotoleMapping, descriptionList } from './data';
+import { descriptionList, MetworkTypeMapping, ProcotoleMapping } from './data';
 
 
 interface Props {
 interface Props {
   change: () => void;
   change: () => void;

+ 1 - 1
src/pages/link/AccessConfig/index.tsx

@@ -8,7 +8,7 @@ import { useHistory } from 'umi';
 import Service from './service';
 import Service from './service';
 import { DeleteOutlined, EditOutlined, PlayCircleOutlined, StopOutlined } from '@ant-design/icons';
 import { DeleteOutlined, EditOutlined, PlayCircleOutlined, StopOutlined } from '@ant-design/icons';
 import AccessConfigCard from '@/components/ProTableCard/CardItems/AccessConfig';
 import AccessConfigCard from '@/components/ProTableCard/CardItems/AccessConfig';
-import { PermissionButton, Empty } from '@/components';
+import { Empty, PermissionButton } from '@/components';
 import { useDomFullHeight } from '@/hooks';
 import { useDomFullHeight } from '@/hooks';
 import { Store } from 'jetlinks-store';
 import { Store } from 'jetlinks-store';
 import { onlyMessage } from '@/utils/util';
 import { onlyMessage } from '@/utils/util';

+ 1 - 1
src/pages/link/Channel/Opcua/Save/index.tsx

@@ -1,4 +1,5 @@
 import { useIntl } from 'umi';
 import { useIntl } from 'umi';
+import type { Field } from '@formily/core';
 import { createForm } from '@formily/core';
 import { createForm } from '@formily/core';
 import { createSchemaField } from '@formily/react';
 import { createSchemaField } from '@formily/react';
 import { Form, FormGrid, FormItem, Input, Select } from '@formily/antd';
 import { Form, FormGrid, FormItem, Input, Select } from '@formily/antd';
@@ -8,7 +9,6 @@ import { Modal } from '@/components';
 import { useMemo } from 'react';
 import { useMemo } from 'react';
 import { action } from '@formily/reactive';
 import { action } from '@formily/reactive';
 import type { Response } from '@/utils/typings';
 import type { Response } from '@/utils/typings';
-import type { Field } from '@formily/core';
 import { onlyMessage } from '@/utils/util';
 import { onlyMessage } from '@/utils/util';
 
 
 interface Props {
 interface Props {

+ 3 - 3
src/pages/link/Protocol/index.tsx

@@ -261,10 +261,10 @@ const Protocol = () => {
                 type={'link'}
                 type={'link'}
                 style={{ padding: 0 }}
                 style={{ padding: 0 }}
                 tooltip={{
                 tooltip={{
-                  title: record.state === 1 ? '撤销' : '发布',
+                  title: record.state === 1 ? '禁用' : '启用',
                 }}
                 }}
                 popConfirm={{
                 popConfirm={{
-                  title: `确认${record.state === 1 ? '撤销' : '发布'}`,
+                  title: `确认${record.state === 1 ? '禁用' : '启用'}`,
                   onConfirm: () => {
                   onConfirm: () => {
                     if (record.state === 1) {
                     if (record.state === 1) {
                       modifyState(record.id, 'un-deploy');
                       modifyState(record.id, 'un-deploy');
@@ -275,7 +275,7 @@ const Protocol = () => {
                 }}
                 }}
               >
               >
                 {record.state === 1 ? <StopOutlined /> : <PlayCircleOutlined />}
                 {record.state === 1 ? <StopOutlined /> : <PlayCircleOutlined />}
-                {record.state === 1 ? '撤销' : '发布'}
+                {record.state === 1 ? '禁用' : '启用'}
               </PermissionButton>,
               </PermissionButton>,
               <PermissionButton
               <PermissionButton
                 isPermission={permission.delete}
                 isPermission={permission.delete}

+ 4 - 6
src/pages/link/Protocol/save/index.tsx

@@ -8,9 +8,9 @@ import type { ISchema } from '@formily/json-schema';
 import { service } from '@/pages/link/Protocol';
 import { service } from '@/pages/link/Protocol';
 import FileUpload from '../FileUpload';
 import FileUpload from '../FileUpload';
 import type { ProtocolItem } from '@/pages/link/Protocol/typings';
 import type { ProtocolItem } from '@/pages/link/Protocol/typings';
-import { PermissionButton } from '@/components';
-import { RadioCard } from '@/components';
+import { PermissionButton, RadioCard } from '@/components';
 import { onlyMessage } from '@/utils/util';
 import { onlyMessage } from '@/utils/util';
+
 interface Props {
 interface Props {
   data: ProtocolItem | undefined;
   data: ProtocolItem | undefined;
   close: () => void;
   close: () => void;
@@ -138,7 +138,6 @@ const Save = (props: Props) => {
             'x-disabled': !!props.data?.id,
             'x-disabled': !!props.data?.id,
             'x-decorator-props': {
             'x-decorator-props': {
               gridSpan: 2,
               gridSpan: 2,
-              tooltip: <div>jar:上传协议jar包,文件格式支持.jar或.zip</div>,
             },
             },
             'x-component-props': {
             'x-component-props': {
               model: 'singular',
               model: 'singular',
@@ -179,9 +178,6 @@ const Save = (props: Props) => {
                 'x-visible': false,
                 'x-visible': false,
                 'x-decorator-props': {
                 'x-decorator-props': {
                   gridSpan: 2,
                   gridSpan: 2,
-                  tooltip: (
-                    <div>local:填写本地协议编译目录绝对地址,如:d:/protocol/target/classes</div>
-                  ),
                 },
                 },
                 'x-validator': [
                 'x-validator': [
                   {
                   {
@@ -197,6 +193,8 @@ const Save = (props: Props) => {
                       componentType: '{{$deps[0]==="jar"?"FileUpload":"Input"}}',
                       componentType: '{{$deps[0]==="jar"?"FileUpload":"Input"}}',
                       componentProps:
                       componentProps:
                         '{{$deps[0]==="jar"?{type:"file", accept: ".jar, .zip"}:{placeholder: "请输入文件地址"}}}',
                         '{{$deps[0]==="jar"?{type:"file", accept: ".jar, .zip"}:{placeholder: "请输入文件地址"}}}',
+                      decoratorProps:
+                        '{{$deps[0]!=="jar"?{gridSpan:"2",tooltip:"local:填写本地协议编译目录绝对地址,如:d:/protocol/target/classes"}:{gridSpan:"2",tooltip:"jar:上传协议jar包,文件格式支持.jar或.zip"}}}',
                     },
                     },
                   },
                   },
                 },
                 },

+ 1 - 1
src/pages/link/Type/Detail/index.tsx

@@ -282,7 +282,7 @@ const Save = observer(() => {
         'x-decorator': 'FormItem',
         'x-decorator': 'FormItem',
         'x-component': 'Select',
         'x-component': 'Select',
         'x-component-props': {
         'x-component-props': {
-          placeholder: '请输入本地端口',
+          placeholder: '请选择本地端口',
         },
         },
         'x-reactions': {
         'x-reactions': {
           dependencies: ['type'],
           dependencies: ['type'],

+ 11 - 6
src/pages/link/Type/index.tsx

@@ -92,25 +92,30 @@ const Network = () => {
       dataIndex: 'configuration',
       dataIndex: 'configuration',
       title: '详情',
       title: '详情',
       ellipsis: true,
       ellipsis: true,
+      hideInSearch: true,
       renderText: (text, record) => {
       renderText: (text, record) => {
         if (record.shareCluster) {
         if (record.shareCluster) {
-          const publicHost = record.configuration.publicHost;
-          const publicPort = record.configuration.publicPort;
-          return publicHost ? (
+          const host = record.configuration.publicHost || record.configuration.remoteHost;
+          const port = record.configuration.publicPort || record.configuration.remotePort;
+          return host ? (
             <>
             <>
               {networkMap[record.type]}
               {networkMap[record.type]}
-              {publicHost}:{publicPort}
+              {host}:{port}
             </>
             </>
           ) : null;
           ) : null;
         } else {
         } else {
           const log = record.cluster?.map(
           const log = record.cluster?.map(
-            (item) => `${item.configuration.publicHost}:${item.configuration.publicPort}`,
+            (item) =>
+              `${item.configuration.publicHost || record.configuration.remoteHost}:${
+                item.configuration.publicPort || record.configuration.remotePort
+              }`,
           );
           );
           return (
           return (
             <>
             <>
               {log.map((item) => (
               {log.map((item) => (
                 <div key={item}>
                 <div key={item}>
-                  `${networkMap[record.type]}${item}`
+                  {networkMap[record.type]}
+                  {item}
                 </div>
                 </div>
               ))}
               ))}
             </>
             </>

+ 2 - 2
src/pages/media/Cascade/Save/index.tsx

@@ -2,10 +2,12 @@ import TitleComponent from '@/components/TitleComponent';
 import { InfoCircleFilled, QuestionCircleOutlined } from '@ant-design/icons';
 import { InfoCircleFilled, QuestionCircleOutlined } from '@ant-design/icons';
 import { PageContainer } from '@ant-design/pro-layout';
 import { PageContainer } from '@ant-design/pro-layout';
 import {
 import {
+  Alert,
   Button,
   Button,
   Card,
   Card,
   Col,
   Col,
   Form,
   Form,
+  Image,
   Input,
   Input,
   InputNumber,
   InputNumber,
   message,
   message,
@@ -13,8 +15,6 @@ import {
   Row,
   Row,
   Select,
   Select,
   Tooltip,
   Tooltip,
-  Image,
-  Alert,
 } from 'antd';
 } from 'antd';
 import SipComponent from '@/components/SipComponent';
 import SipComponent from '@/components/SipComponent';
 import SipSelectComponent from '@/components/SipSelectComponent';
 import SipSelectComponent from '@/components/SipSelectComponent';

+ 2 - 2
src/pages/media/Cascade/index.tsx

@@ -169,11 +169,11 @@ const Cascade = () => {
       valueType: 'select',
       valueType: 'select',
       valueEnum: {
       valueEnum: {
         disabled: {
         disabled: {
-          text: '已停止',
+          text: '禁用',
           status: 'disabled',
           status: 'disabled',
         },
         },
         enabled: {
         enabled: {
-          text: '已启动',
+          text: '正常',
           status: 'enabled',
           status: 'enabled',
         },
         },
       },
       },

+ 1 - 1
src/pages/media/Device/Channel/index.tsx

@@ -12,8 +12,8 @@ import { Button, message, Popconfirm, Tooltip } from 'antd';
 import {
 import {
   DeleteOutlined,
   DeleteOutlined,
   EditOutlined,
   EditOutlined,
-  PlusOutlined,
   LeftOutlined,
   LeftOutlined,
+  PlusOutlined,
   VideoCameraAddOutlined,
   VideoCameraAddOutlined,
   VideoCameraOutlined,
   VideoCameraOutlined,
 } from '@ant-design/icons';
 } from '@ant-design/icons';

+ 49 - 0
src/pages/notice/Config/index.tsx

@@ -42,6 +42,53 @@ export const state = model<{
   log: false,
   log: false,
   syncUser: false,
   syncUser: false,
 });
 });
+const list = {
+  weixin: {
+    corpMessage: {
+      text: '企业消息',
+      status: 'corpMessage',
+    },
+    // officialMessage: {
+    //   text: '服务号消息',
+    //   status: 'officialMessage',
+    // },
+  },
+  dingTalk: {
+    dingTalkMessage: {
+      text: '钉钉消息',
+      status: 'dingTalkMessage',
+    },
+    dingTalkRobotWebHook: {
+      text: '群机器人消息',
+      status: 'dingTalkRobotWebHook',
+    },
+  },
+  voice: {
+    aliyun: {
+      text: '阿里云语音',
+      status: 'aliyun',
+    },
+  },
+  sms: {
+    aliyunSms: {
+      text: '阿里云短信',
+      status: 'aliyunSms',
+    },
+  },
+  email: {
+    embedded: {
+      text: '默认',
+      status: 'embedded',
+    },
+  },
+  webhook: {
+    http: {
+      text: 'Webhook',
+      status: 'http',
+    },
+  },
+};
+
 const Config = observer(() => {
 const Config = observer(() => {
   const intl = useIntl();
   const intl = useIntl();
   const actionRef = useRef<ActionType>();
   const actionRef = useRef<ActionType>();
@@ -62,6 +109,8 @@ const Config = observer(() => {
       dataIndex: 'provider',
       dataIndex: 'provider',
       title: '通知方式',
       title: '通知方式',
       renderText: (text, record) => typeList[record.type][record.provider],
       renderText: (text, record) => typeList[record.type][record.provider],
+      valueType: 'select',
+      valueEnum: list[id],
     },
     },
     {
     {
       dataIndex: 'description',
       dataIndex: 'description',

+ 31 - 22
src/pages/notice/Template/Debug/index.tsx

@@ -102,7 +102,6 @@ const Debug = observer(() => {
     // 从后端接口来获取变量参数
     // 从后端接口来获取变量参数
     service.getVariableDefinitions(state.current?.id || '').then((resp) => {
     service.getVariableDefinitions(state.current?.id || '').then((resp) => {
       const _template = resp.result;
       const _template = resp.result;
-      console.log(resp, 'userEfffect', state.current);
       if (_template?.variableDefinitions?.length > 0) {
       if (_template?.variableDefinitions?.length > 0) {
         variableRef.current = _template?.variableDefinitions;
         variableRef.current = _template?.variableDefinitions;
         form.setFieldState('variableDefinitions', (state1) => {
         form.setFieldState('variableDefinitions', (state1) => {
@@ -215,6 +214,7 @@ const Debug = observer(() => {
               'x-component-props': { title: '值', width: '120px' },
               'x-component-props': { title: '值', width: '120px' },
               properties: {
               properties: {
                 value: {
                 value: {
+                  required: true,
                   type: 'string',
                   type: 'string',
                   'x-decorator': 'FormItem',
                   'x-decorator': 'FormItem',
                   'x-component': 'Input',
                   'x-component': 'Input',
@@ -236,27 +236,36 @@ const Debug = observer(() => {
   const [spinning, setSpinning] = useState<boolean>(false);
   const [spinning, setSpinning] = useState<boolean>(false);
   const start = async () => {
   const start = async () => {
     setSpinning(true);
     setSpinning(true);
-    const data: { configId: string; variableDefinitions: any } = await form.submit();
-    // 应该取选择的配置信息
-    if (!state.current) return;
-    const resp = await service.debug(
-      data.configId,
-      state?.current.id,
-      data.variableDefinitions?.reduce(
-        (previousValue: any, currentValue: { id: any; value: any }) => {
-          return {
-            ...previousValue,
-            [currentValue.id]: currentValue.value,
-          };
-        },
-        {},
-      ),
-    );
-    if (resp.status === 200) {
-      onlyMessage('操作成功!');
-      setSpinning(false);
-      state.debug = false;
-    }
+    // const data: { configId: string; variableDefinitions: any } = await form.submit();
+    form
+      .submit()
+      .then(async (data: any) => {
+        // 应该取选择的配置信息
+        if (!state.current) return;
+        const resp = await service.debug(
+          data.configId,
+          state?.current.id,
+          data.variableDefinitions?.reduce(
+            (previousValue: any, currentValue: { id: any; value: any }) => {
+              return {
+                ...previousValue,
+                [currentValue.id]: currentValue.value,
+              };
+            },
+            {},
+          ),
+        );
+        if (resp.status === 200) {
+          onlyMessage('操作成功!');
+          setSpinning(false);
+          state.debug = false;
+        } else {
+          setSpinning(false);
+        }
+      })
+      .catch(() => {
+        setSpinning(false);
+      });
   };
   };
   return (
   return (
     <Modal
     <Modal

+ 4 - 4
src/pages/notice/Template/index.tsx

@@ -45,10 +45,10 @@ const list = {
       text: '企业消息',
       text: '企业消息',
       status: 'corpMessage',
       status: 'corpMessage',
     },
     },
-    officialMessage: {
-      text: '服务号消息',
-      status: 'officialMessage',
-    },
+    // officialMessage: {
+    //   text: '服务号消息',
+    //   status: 'officialMessage',
+    // },
   },
   },
   dingTalk: {
   dingTalk: {
     dingTalkMessage: {
     dingTalkMessage: {

+ 3 - 9
src/pages/rule-engine/Alarm/Configuration/Save/index.tsx

@@ -140,6 +140,8 @@ const Save = (props: Props) => {
     }
     }
   };
   };
 
 
+  const { permission } = PermissionButton.usePermission('rule-engine/Scene');
+
   const schema: ISchema = {
   const schema: ISchema = {
     type: 'object',
     type: 'object',
     properties: {
     properties: {
@@ -234,20 +236,12 @@ const Save = (props: Props) => {
             <PermissionButton
             <PermissionButton
               type="link"
               type="link"
               style={{ padding: 0 }}
               style={{ padding: 0 }}
-              isPermission={true}
+              isPermission={permission.add}
               onClick={() => {
               onClick={() => {
                 const tab: any = window.open(`${origin}/#/iot/rule-engine/scene/Save`);
                 const tab: any = window.open(`${origin}/#/iot/rule-engine/scene/Save`);
                 tab!.onTabSaveSuccess = (value: any) => {
                 tab!.onTabSaveSuccess = (value: any) => {
                   form.setFieldState('sceneId', async (state) => {
                   form.setFieldState('sceneId', async (state) => {
                     state.dataSource = await getScene();
                     state.dataSource = await getScene();
-                    // .then((resp) =>
-                    //   resp.result?.map((item: Record<string, unknown>) => ({
-                    //     ...item,
-                    //     label: item.name,
-                    //     value: item.id,
-                    //   })),
-                    // );
-                    console.log(value, 'value');
                     state.value = value?.result?.id;
                     state.value = value?.result?.id;
                   });
                   });
                 };
                 };

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

@@ -105,9 +105,26 @@ const Configuration = () => {
     {
     {
       title: '状态',
       title: '状态',
       dataIndex: 'state',
       dataIndex: 'state',
+      valueType: 'select',
       renderText: (state) => (
       renderText: (state) => (
         <Badge text={state?.text} status={state?.value === 'disabled' ? 'error' : 'success'} />
         <Badge text={state?.text} status={state?.value === 'disabled' ? 'error' : 'success'} />
       ),
       ),
+      valueEnum: {
+        disabled: {
+          text: intl.formatMessage({
+            id: 'pages.device.product.status.disabled',
+            defaultMessage: '禁用',
+          }),
+          status: 'disabled',
+        },
+        enabled: {
+          text: intl.formatMessage({
+            id: 'pages.device.product.status.enabled',
+            defaultMessage: '正常',
+          }),
+          status: 'enabled',
+        },
+      },
     },
     },
     {
     {
       title: '说明',
       title: '说明',

+ 8 - 0
src/pages/rule-engine/Alarm/Log/TabComponent/index.less

@@ -69,5 +69,13 @@
 
 
   .card-state-content {
   .card-state-content {
     transform: skewX(-45deg);
     transform: skewX(-45deg);
+
+    .stateText {
+      width: 70px;
+      overflow: hidden;
+      white-space: nowrap;
+      text-align: center;
+      text-overflow: ellipsis;
+    }
   }
   }
 }
 }

+ 1 - 1
src/pages/rule-engine/Scene/Save/action/VariableItems/user.tsx

@@ -8,7 +8,7 @@ import {
   queryRelationUsers,
   queryRelationUsers,
   queryWechatUsers,
   queryWechatUsers,
 } from '@/pages/rule-engine/Scene/Save/action/service';
 } from '@/pages/rule-engine/Scene/Save/action/service';
-import { forkJoin, filter, from, defer, map } from 'rxjs';
+import { defer, filter, forkJoin, from, map } from 'rxjs';
 
 
 type ChangeType = {
 type ChangeType = {
   source?: string;
   source?: string;

+ 2 - 2
src/pages/system/Permission/index.tsx

@@ -1,11 +1,11 @@
 import { PageContainer } from '@ant-design/pro-layout';
 import { PageContainer } from '@ant-design/pro-layout';
 import React, { useRef, useState } from 'react';
 import React, { useRef, useState } from 'react';
 import {
 import {
-  CloseCircleOutlined,
   DeleteOutlined,
   DeleteOutlined,
   EditOutlined,
   EditOutlined,
   PlayCircleOutlined,
   PlayCircleOutlined,
   PlusOutlined,
   PlusOutlined,
+  StopOutlined,
 } from '@ant-design/icons';
 } from '@ant-design/icons';
 import { Badge, Button, Dropdown, Menu, Popconfirm, Space, Tooltip, Upload } from 'antd';
 import { Badge, Button, Dropdown, Menu, Popconfirm, Space, Tooltip, Upload } from 'antd';
 import type { ActionType, ProColumns } from '@jetlinks/pro-table';
 import type { ActionType, ProColumns } from '@jetlinks/pro-table';
@@ -217,7 +217,7 @@ const Permission: React.FC = observer(() => {
             }),
             }),
           }}
           }}
         >
         >
-          {record.status ? <CloseCircleOutlined /> : <PlayCircleOutlined />}
+          {record.status ? <StopOutlined /> : <PlayCircleOutlined />}
         </PermissionButton>,
         </PermissionButton>,
         <PermissionButton
         <PermissionButton
           type={'link'}
           type={'link'}

+ 1 - 1
src/pages/system/Tenant/Detail/Member/Bind.tsx

@@ -1,4 +1,4 @@
-import type { ProColumns, ActionType } from '@jetlinks/pro-table';
+import type { ActionType, ProColumns } from '@jetlinks/pro-table';
 import ProTable from '@jetlinks/pro-table';
 import ProTable from '@jetlinks/pro-table';
 import { service } from '@/pages/system/Tenant';
 import { service } from '@/pages/system/Tenant';
 import { Space } from 'antd';
 import { Space } from 'antd';

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

@@ -5,12 +5,12 @@ import type { ActionType, ProColumns } from '@jetlinks/pro-table';
 import ProTable from '@jetlinks/pro-table';
 import ProTable from '@jetlinks/pro-table';
 import { Badge, Popconfirm } from 'antd';
 import { Badge, Popconfirm } from 'antd';
 import {
 import {
-  CloseCircleOutlined,
   DeleteOutlined,
   DeleteOutlined,
   EditOutlined,
   EditOutlined,
   PlayCircleOutlined,
   PlayCircleOutlined,
   PlusOutlined,
   PlusOutlined,
   SafetyOutlined,
   SafetyOutlined,
+  StopOutlined,
 } from '@ant-design/icons';
 } from '@ant-design/icons';
 import { useIntl } from '@@/plugin-locale/localeExports';
 import { useIntl } from '@@/plugin-locale/localeExports';
 import { useRef, useState } from 'react';
 import { useRef, useState } from 'react';
@@ -177,7 +177,7 @@ const User = observer(() => {
             }),
             }),
           }}
           }}
         >
         >
-          {record.status ? <CloseCircleOutlined /> : <PlayCircleOutlined />}
+          {record.status ? <StopOutlined /> : <PlayCircleOutlined />}
         </PermissionButton>,
         </PermissionButton>,
         <PermissionButton
         <PermissionButton
           type="link"
           type="link"