wzyyy 3 년 전
부모
커밋
81d058ef5f

+ 6 - 4
src/pages/Northbound/AliCloud/Detail/index.tsx

@@ -135,10 +135,12 @@ const Detail = observer(() => {
         resolve(list);
       });
     } else {
-      return service.getProductsList({ paging: false }).then((resp) => {
-        Store.set('productList', resp);
-        return resp.filter((j: any) => !checked.includes(j.value));
-      });
+      return service
+        .getProductsList({ paging: false, sorts: [{ name: 'createTime', order: 'desc' }] })
+        .then((resp) => {
+          Store.set('productList', resp);
+          return resp.filter((j: any) => !checked.includes(j.value));
+        });
     }
   };
 

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

@@ -22,6 +22,7 @@ class Service extends BaseService<DuerOSItem> {
       data: {
         paging: false,
         terms: data,
+        sorts: [{ name: 'createTime', order: 'desc' }],
       },
     });
   };

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

@@ -5,6 +5,7 @@ import { useHistory } from 'umi';
 import { getMenuPathByCode, getMenuPathByParams, MENUS_CODE } from '@/utils/menu';
 import { InstanceModel } from '@/pages/device/Instance';
 import { randomString } from '@/utils/util';
+import { PermissionButton } from '@/components';
 interface Props {
   close: () => void;
   data: any;
@@ -13,6 +14,7 @@ interface Props {
 
 const ManualInspection = (props: Props) => {
   const { data } = props;
+  const { permission } = PermissionButton.usePermission('device/Product');
 
   const history = useHistory<Record<string, string>>();
 
@@ -211,8 +213,11 @@ const ManualInspection = (props: Props) => {
       }}
       width={900}
       footer={[
-        <Button
+        <PermissionButton
+          isPermission={permission.update}
+          // type={'link'}
           key="back"
+          style={{ marginRight: 10 }}
           onClick={() => {
             if (data.type === 'device') {
               InstanceModel.active = 'detail';
@@ -234,7 +239,30 @@ const ManualInspection = (props: Props) => {
           }}
         >
           去修改
-        </Button>,
+        </PermissionButton>,
+        // <Button
+        //   key="back"
+        //   onClick={() => {
+        //     if (data.type === 'device') {
+        //       InstanceModel.active = 'detail';
+        //     } else if (data.type === 'product') {
+        //       history.push(
+        //         `${getMenuPathByParams(MENUS_CODE['device/Product/Detail'], data.productId)}`,
+        //         {
+        //           tab: 'access',
+        //         },
+        //       );
+        //     } else {
+        //       history.push(
+        //         `${getMenuPathByCode(MENUS_CODE['link/AccessConfig/Detail'])}?id=${data.configuration?.id
+        //         }`,
+        //       );
+        //     }
+        //     props.close();
+        //   }}
+        // >
+        //   去修改
+        // </Button>,
         <Button
           key="submit"
           onClick={() => {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 43 - 9
src/pages/device/Instance/Detail/Parsing/index.tsx


+ 9 - 3
src/pages/device/Instance/Detail/Reation/index.tsx

@@ -4,7 +4,7 @@ import { useEffect, useState } from 'react';
 import { useParams } from 'umi';
 import { EditOutlined, QuestionCircleOutlined } from '@ant-design/icons';
 import Edit from './Edit';
-import { PermissionButton } from '@/components';
+import { Ellipsis, PermissionButton } from '@/components';
 import _ from 'lodash';
 
 const Reation = () => {
@@ -57,14 +57,20 @@ const Reation = () => {
       >
         {(data || [])?.map((item: any) => (
           <Descriptions.Item span={1} label={item.relationName} key={item.objectId}>
-            <Tooltip
+            <Ellipsis
+              title={item?.related ? _.map(item?.related || [], 'name').join(',') : ''}
+              tooltip={{ placement: 'topLeft' }}
+              style={{ maxWidth: 250 }}
+              limitWidth={250}
+            />
+            {/* <Tooltip
               title={item?.related ? _.map(item?.related || [], 'name').join(',') : ''}
               placement="topLeft"
             >
               <div className="ellipsis" style={{ width: 300 }}>
                 {item?.related ? _.map(item?.related || [], 'name').join(',') : ''}
               </div>
-            </Tooltip>
+            </Tooltip> */}
           </Descriptions.Item>
         ))}
       </Descriptions>

+ 4 - 4
src/pages/init-home/components/data/RoleData.ts

@@ -346,7 +346,7 @@ export default {
       icon: 'icon-zhilianshebei',
       url: '/iot/link/Channel/Opcua',
       buttons: [
-        { id: 'view', name: '设备接入', enabled: true, granted: true },
+        { id: 'view', name: '查看', enabled: true, granted: true },
         {
           id: 'action',
           name: '启/禁用',
@@ -385,7 +385,7 @@ export default {
           enabled: true,
           granted: true,
         },
-        { id: 'view', name: '设备接入', enabled: true, granted: true },
+        { id: 'view', name: '查看', enabled: true, granted: true },
         {
           id: 'delete',
           name: '删除',
@@ -752,7 +752,7 @@ export default {
       icon: 'icon-zhilianshebei',
       url: '/iot/link/Channel/Opcua',
       buttons: [
-        { id: 'view', name: '设备接入', enabled: true, granted: true },
+        { id: 'view', name: '查看', enabled: true, granted: true },
         {
           id: 'action',
           name: '启/禁用',
@@ -791,7 +791,7 @@ export default {
           enabled: true,
           granted: true,
         },
-        { id: 'view', name: '设备接入', enabled: true, granted: true },
+        { id: 'view', name: '查看', enabled: true, granted: true },
         {
           id: 'delete',
           name: '删除',

+ 2 - 2
src/pages/link/Channel/Modbus/index.tsx

@@ -60,7 +60,7 @@ const NewModbus = () => {
     <Menu>
       <Menu.Item key="1">
         <PermissionButton
-          isPermission={permission.export || true}
+          isPermission={permission.view}
           icon={<ExportOutlined />}
           type="default"
           onClick={() => {
@@ -72,7 +72,7 @@ const NewModbus = () => {
       </Menu.Item>
       <Menu.Item key="2">
         <PermissionButton
-          isPermission={permission.import || true}
+          isPermission={permission.update}
           icon={<ImportOutlined />}
           onClick={() => {
             setImportVisible(true);

+ 7 - 7
src/pages/system/Department/Member/index.tsx

@@ -75,13 +75,13 @@ const Member = observer((props: { parentId: string }) => {
       onFilter: true,
       valueType: 'select',
       valueEnum: {
-        all: {
-          text: intl.formatMessage({
-            id: 'pages.searchTable.titleStatus.all',
-            defaultMessage: '全部',
-          }),
-          status: 'Default',
-        },
+        // all: {
+        //   text: intl.formatMessage({
+        //     id: 'pages.searchTable.titleStatus.all',
+        //     defaultMessage: '全部',
+        //   }),
+        //   status: 'Default',
+        // },
         1: {
           text: intl.formatMessage({
             id: 'pages.searchTable.titleStatus.normal',