wzyyy 2 yıl önce
ebeveyn
işleme
56491eef0c

+ 4 - 1
src/components/ProTableCard/CardItems/Scene/index.tsx

@@ -60,7 +60,10 @@ const notifyRender = (data: ActionsType | undefined) => {
       }
       return (
         <span>
-          通过钉钉向{data?.options?.notifierName || data?.notify?.notifierId}发送
+          通过钉钉 向 {data?.options?.orgName || ''}
+          {data?.options?.tagName || ''}
+          {data?.options?.sendTo || ''}
+          发送
           {data?.options?.templateName || data?.notify?.templateId}
         </span>
       );

+ 1 - 1
src/pages/account/Center/index.tsx

@@ -197,7 +197,7 @@ const Center = () => {
           </div>
           <div className={styles.content}>
             <Descriptions column={4} layout="vertical" labelStyle={{ fontWeight: 600 }}>
-              <Descriptions.Item label="登录账号">{data?.username}</Descriptions.Item>
+              <Descriptions.Item label="用户名">{data?.username}</Descriptions.Item>
               <Descriptions.Item label="账号ID">
                 <Ellipsis title={data?.id} tooltip={{ placement: 'topLeft' }} maxWidth={'90%'} />
               </Descriptions.Item>

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

@@ -258,7 +258,7 @@ const Save = (props: Props) => {
         </Row>
         <Row>
           <Col span={24}>
-            <Form.Item label={intlFormat('pages.table.description', '说明')} name={'description'}>
+            <Form.Item label={intlFormat('pages.table.description', '说明')} name={'describe'}>
               <Input.TextArea
                 placeholder={
                   intlFormat('pages.form.tip.input', '请输入') +

+ 58 - 0
src/pages/edge/Resource/index.tsx

@@ -20,6 +20,7 @@ import ResourceCard from '@/components/ProTableCard/CardItems/edge/Resource';
 import moment from 'moment';
 import { getMenuPathByParams, MENUS_CODE } from '@/utils/menu';
 import { useHistory } from 'umi';
+import { service as api } from '@/pages/device/Instance';
 
 export const service = new Service('entity/template');
 
@@ -175,12 +176,69 @@ export default () => {
       dataIndex: 'category',
       width: 150,
       ellipsis: true,
+      valueType: 'select',
+      valueEnum: {
+        OPC_UA: {
+          text: 'OPC UA接入',
+          status: 'OPC_UA',
+        },
+        MODBUS_TCP: {
+          text: 'Modbus TCP接入',
+          status: 'MODBUS_TCP',
+        },
+        snap7: {
+          text: 'S7-200接入',
+          status: 'snap7',
+        },
+        BACNetIp: {
+          text: 'BACnet接入',
+          status: 'BACNetIp',
+        },
+        MODBUS_RTU: {
+          text: 'MODBUS_RTU接入',
+          status: 'MODBUS_RTU',
+        },
+      },
+    },
+    {
+      title: '所属边缘网关',
+      width: 150,
+      dataIndex: 'sourceId',
+      ellipsis: true,
+      valueType: 'select',
+      hideInTable: true,
+      request: async () => {
+        const res: any = await api.queryNoPagingPost({
+          terms: [
+            {
+              terms: [
+                {
+                  column: 'productId$product-info',
+                  value: 'accessProvider is official-edge-gateway',
+                },
+              ],
+              type: 'and',
+            },
+          ],
+          sorts: [
+            {
+              name: 'createTime',
+              order: 'desc',
+            },
+          ],
+        });
+        if (res.status === 200) {
+          return res.result.map((pItem: any) => ({ label: pItem.name, value: pItem.id }));
+        }
+        return [];
+      },
     },
     {
       title: '所属边缘网关',
       width: 150,
       dataIndex: 'sourceName',
       ellipsis: true,
+      hideInSearch: true,
     },
     {
       title: '创建时间',

+ 1 - 0
src/pages/init-home/components/menu.tsx

@@ -43,6 +43,7 @@ const Menu = forwardRef((props: { onChange?: (menu: any) => void }, ref) => {
         resp.result.map((item: any) => JSON.parse(item).id),
         BaseMenu,
       );
+      // console.log(newTree)
       const _count = menuCount(newTree);
       menuRef.current = newTree;
       setCount(_count);

+ 31 - 25
src/pages/link/AccessConfig/Detail/components/Network/index.tsx

@@ -34,7 +34,14 @@ const Network = (props: Props) => {
   };
 
   useEffect(() => {
-    queryNetworkList(props.provider?.id, encodeQuery({ include: networkCurrent || '' }));
+    queryNetworkList(
+      props.provider?.id,
+      encodeQuery({
+        include: networkCurrent || '',
+        'sorts[0].name': 'id',
+        'sorts[0].value': networkCurrent,
+      }),
+    );
   }, [props.provider?.id]);
 
   useEffect(() => {
@@ -170,30 +177,29 @@ const Network = (props: Props) => {
             description={
               <span>
                 暂无数据
-                {getButtonPermission('link/Type', ['add'])
-                  ? '请联系管理员进行配置'
-                  : ''
-                    // <Button
-                    //   type="link"
-                    //   onClick={() => {
-                    //     const url = getMenuPathByCode(MENUS_CODE['link/Type/Detail']);
-                    //     const tab: any = window.open(
-                    //       `${origin}/#${url}?type=${
-                    //         NetworkTypeMapping.get(props.provider?.id) || ''
-                    //       }`,
-                    //     );
-                    //     tab!.onTabSaveSuccess = (value: any) => {
-                    //       if (value.status === 200) {
-                    //         setNetworkCurrent(value.result?.id);
-                    //         queryNetworkList(props.provider?.id, {
-                    //           include: networkCurrent || '',
-                    //         });
-                    //       }
-                    //     };
-                    //   }}
-                    // >
-                    //   去新增
-                    // </Button>
+                {
+                  getButtonPermission('link/Type', ['add']) ? '请联系管理员进行配置' : ''
+                  // <Button
+                  //   type="link"
+                  //   onClick={() => {
+                  //     const url = getMenuPathByCode(MENUS_CODE['link/Type/Detail']);
+                  //     const tab: any = window.open(
+                  //       `${origin}/#${url}?type=${
+                  //         NetworkTypeMapping.get(props.provider?.id) || ''
+                  //       }`,
+                  //     );
+                  //     tab!.onTabSaveSuccess = (value: any) => {
+                  //       if (value.status === 200) {
+                  //         setNetworkCurrent(value.result?.id);
+                  //         queryNetworkList(props.provider?.id, {
+                  //           include: networkCurrent || '',
+                  //         });
+                  //       }
+                  //     };
+                  //   }}
+                  // >
+                  //   去新增
+                  // </Button>
                 }
               </span>
             }

+ 23 - 20
src/pages/link/AccessConfig/Detail/components/Protocol/index.tsx

@@ -34,6 +34,8 @@ const Protocol = (props: Props) => {
         encodeQuery({
           ...params,
           sorts: { createTime: 'desc' },
+          'sorts[1].name': 'id',
+          'sorts[1].value': props.data,
         }),
       )
       .then((resp) => {
@@ -142,26 +144,27 @@ const Protocol = (props: Props) => {
             description={
               <span>
                 暂无数据
-                {getButtonPermission('link/Protocol', ['add'])
-                  ? '请联系管理员进行配置'
-                  : props.view
-                  ? ''
-                  : ''
-                    // <Button
-                    //   type="link"
-                    //   onClick={() => {
-                    //     const url = getMenuPathByCode(MENUS_CODE[`link/Protocol`]);
-                    //     const tab: any = window.open(`${origin}/#${url}?save=true`);
-                    //     tab!.onTabSaveSuccess = (resp: any) => {
-                    //       if (resp.status === 200) {
-                    //         setProtocolCurrent(resp.result?.id);
-                    //         queryProtocolList(props.provider?.id);
-                    //       }
-                    //     };
-                    //   }}
-                    // >
-                    //   去新增
-                    // </Button>
+                {
+                  getButtonPermission('link/Protocol', ['add'])
+                    ? '请联系管理员进行配置'
+                    : props.view
+                    ? ''
+                    : ''
+                  // <Button
+                  //   type="link"
+                  //   onClick={() => {
+                  //     const url = getMenuPathByCode(MENUS_CODE[`link/Protocol`]);
+                  //     const tab: any = window.open(`${origin}/#${url}?save=true`);
+                  //     tab!.onTabSaveSuccess = (resp: any) => {
+                  //       if (resp.status === 200) {
+                  //         setProtocolCurrent(resp.result?.id);
+                  //         queryProtocolList(props.provider?.id);
+                  //       }
+                  //     };
+                  //   }}
+                  // >
+                  //   去新增
+                  // </Button>
                 }
               </span>
             }

+ 1 - 0
src/pages/media/Home/deviceModal.tsx

@@ -117,6 +117,7 @@ export default (props: DeviceModalProps) => {
       <SearchComponent<DeviceItem>
         field={columns}
         enableSave={false}
+        model={'simple'}
         onSearch={async (data) => {
           setSearchParam(data);
         }}

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

@@ -376,7 +376,6 @@ const Config = observer(() => {
                         <ArrowDownOutlined />
                         导出
                       </PermissionButton>
-                      ,
                     </Menu.Item>
                     {(record.provider === 'dingTalkMessage' ||
                       record.provider === 'corpMessage') && (

+ 7 - 0
src/pages/notice/Template/Debug/index.tsx

@@ -190,6 +190,13 @@ const Debug = observer(() => {
         default: state?.current?.configId,
         'x-decorator': 'FormItem',
         'x-component': 'Select',
+        'x-component-props': {
+          showSearch: true,
+          allowClear: true,
+          showArrow: true,
+          filterOption: (input: string, option: any) =>
+            option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0,
+        },
         'x-reactions': '{{useAsyncDataSource(getConfig)}}',
       },
       variableDefinitions: {

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

@@ -649,6 +649,12 @@ const Detail = observer(() => {
           placeholder: '请选择绑定配置',
         },
         required: true,
+        'x-validator': [
+          {
+            required: true,
+            message: '请选择绑定配置',
+          },
+        ],
         'x-decorator-props': {
           tooltip: '使用固定的通知配置来发送此通知模版',
         },
@@ -696,6 +702,10 @@ const Detail = observer(() => {
                         max: 64,
                         message: '最多可输入64个字符',
                       },
+                      {
+                        required: true,
+                        message: '请输入AgentID',
+                      },
                     ],
                   },
                   layout: {
@@ -786,6 +796,12 @@ const Detail = observer(() => {
                           placeholder: '请选择消息模版',
                         },
                         required: true,
+                        'x-validator': [
+                          {
+                            required: true,
+                            message: '请输入AgentID',
+                          },
+                        ],
                         'x-decorator-props': {
                           gridSpan: 1,
                           tooltip: '微信公众号中配置的消息模版',
@@ -934,6 +950,10 @@ const Detail = observer(() => {
                         max: 64,
                         message: '最多可输入64个字符',
                       },
+                      {
+                        required: true,
+                        message: '请输入AgentID',
+                      },
                     ],
                   },
                   layout: {
@@ -1001,6 +1021,12 @@ const Detail = observer(() => {
                     'x-component': 'Select',
                     'x-decorator': 'FormItem',
                     required: true,
+                    'x-validator': [
+                      {
+                        required: true,
+                        message: '请选择消息类型',
+                      },
+                    ],
                     'x-component-props': {
                       placeholder: '请选择消息类型',
                     },
@@ -1026,6 +1052,10 @@ const Detail = observer(() => {
                             max: 64,
                             message: '最多可输入64个字符',
                           },
+                          {
+                            required: true,
+                            message: '请输入标题',
+                          },
                         ],
                       },
                     },
@@ -1054,6 +1084,10 @@ const Detail = observer(() => {
                             max: 64,
                             message: '最多可输入64个字符',
                           },
+                          {
+                            required: true,
+                            message: '请输入标题',
+                          },
                         ],
                       },
                       '{url:picUrl}': {
@@ -1126,6 +1160,12 @@ const Detail = observer(() => {
                     'x-component-props': {
                       placeholder: '请选择类型',
                     },
+                    'x-validator': [
+                      {
+                        required: true,
+                        message: '请选择类型',
+                      },
+                    ],
                     default: 'tts',
                     enum: [
                       { label: '语音通知', value: 'voice' },
@@ -1149,6 +1189,12 @@ const Detail = observer(() => {
                           gridSpan: 1,
                         },
                         required: true,
+                        'x-validator': [
+                          {
+                            required: true,
+                            message: '请输入模版ID',
+                          },
+                        ],
                         'x-component-props': {
                           placeholder: '请输入模版ID',
                         },
@@ -1270,6 +1316,12 @@ const Detail = observer(() => {
                       code: {
                         title: '模版',
                         required: true,
+                        'x-validator': [
+                          {
+                            required: true,
+                            message: '请选择模版',
+                          },
+                        ],
                         'x-component': 'Select',
                         'x-decorator': 'FormItem',
                         'x-decorator-props': {
@@ -1304,6 +1356,12 @@ const Detail = observer(() => {
                   signName: {
                     title: '签名',
                     required: true,
+                    'x-validator': [
+                      {
+                        required: true,
+                        message: '请输入签名',
+                      },
+                    ],
                     'x-component': 'Select',
                     'x-decorator': 'FormItem',
                     'x-decorator-props': {
@@ -1351,6 +1409,10 @@ const Detail = observer(() => {
                     max: 64,
                     message: '最多可输入64个字符',
                   },
+                  {
+                    required: true,
+                    message: '请输入标题',
+                  },
                 ],
               },
               sendTo: {
@@ -1397,6 +1459,12 @@ const Detail = observer(() => {
                         gridSpan: 23,
                       },
                       required: true,
+                      'x-validator': [
+                        {
+                          required: true,
+                          message: '请上传文件或输入文件名称',
+                        },
+                      ],
                       'x-component-props': {
                         type: 'file',
                         display: 'name',
@@ -1521,6 +1589,10 @@ const Detail = observer(() => {
             max: 500,
             message: '最多可输入500个字符',
           },
+          {
+            require: true,
+            message: '请输入模版内容',
+          },
         ],
       },
       variableDefinitions: {
@@ -1574,6 +1646,10 @@ const Detail = observer(() => {
                       max: 64,
                       message: '最多可输入64个字符',
                     },
+                    {
+                      require: true,
+                      message: '请输入名称',
+                    },
                   ],
                 },
               },
@@ -1588,6 +1664,12 @@ const Detail = observer(() => {
                   'x-decorator': 'FormItem',
                   'x-component': 'Select',
                   required: true,
+                  'x-validator': [
+                    {
+                      require: true,
+                      message: '请选择类型',
+                    },
+                  ],
                   enum: [
                     { label: '字符串', value: 'string' },
                     { label: '时间', value: 'date' },
@@ -1601,6 +1683,12 @@ const Detail = observer(() => {
               'x-component': 'ArrayTable.Column',
               'x-component-props': { title: '格式', width: '300px' },
               required: true,
+              'x-validator': [
+                {
+                  require: true,
+                  message: '请输入格式',
+                },
+              ],
               properties: {
                 format: {
                   type: 'string',

+ 3 - 3
src/pages/system/Menu/Setting/baseMenu.ts

@@ -1481,7 +1481,7 @@ export default [
             showPage: [
               'dashboard',
               'data-collect-channel',
-              'data-collect-opc',
+              // 'data-collect-opc',
               'data-collector',
               'things-collector',
             ],
@@ -1503,7 +1503,7 @@ export default [
             icon: 'icon-rizhifuwu',
             showPage: [
               'data-collect-channel',
-              'data-collect-opc',
+              // 'data-collect-opc',
               'data-collector',
               'things-collector',
             ],
@@ -1634,7 +1634,7 @@ export default [
             icon: 'icon-yingyongguanli',
             showPage: [
               'data-collect-channel',
-              'data-collect-opc',
+              // 'data-collect-opc',
               'data-collector',
               'things-collector',
             ],