Bladeren bron

fix: merge iotcard home

Next wzy
hear 3 jaren geleden
bovenliggende
commit
7c0f7037f7

+ 4 - 4
config/proxy.ts

@@ -9,14 +9,14 @@
 export default {
   dev: {
     '/api': {
-      target: 'http://192.168.32.28:8844/',
-      ws: 'ws://192.168.32.28:8844/',
+      // target: 'http://192.168.32.28:8844/',
+      // ws: 'ws://192.168.32.28:8844/',
       // 开发环境
       // target: 'http://120.79.18.123:8844/',
       // ws: 'ws://120.79.18.123:8844/',
       // 测试环境
-      // target: 'http://120.77.179.54:8844/',
-      // ws: 'ws://120.77.179.54:8844/',
+      target: 'http://120.77.179.54:8844/',
+      ws: 'ws://120.77.179.54:8844/',
       // target: 'http://192.168.32.65:8844/',
       // ws: 'ws://192.168.32.65:8844/',
       //v2环境

+ 3 - 2
src/pages/iot-card/Home/index.tsx

@@ -44,6 +44,7 @@ export default () => {
   ]);
 
   const { permission: paltformPermission } = PermissionButton.usePermission('iot-card/Platform');
+  const { permission: cardPermission } = PermissionButton.usePermission('iot-card/CardManagement');
 
   const history = useHistory();
 
@@ -144,14 +145,14 @@ export default () => {
       key: 'EQUIPMENT',
       name: '平台对接',
       english: 'STEP1',
-      auth: !!paltformPermission.update,
+      auth: !!paltformPermission.add,
       url: platformUrl,
     },
     {
       key: 'SCREEN',
       name: '物联卡管理',
       english: 'STEP2',
-      auth: !!cardUrl,
+      auth: !!cardPermission.add,
       url: cardUrl,
       param: { save: true },
     },

+ 1 - 1
src/pages/iot-card/Platform/index.tsx

@@ -194,7 +194,7 @@ const Platform = () => {
                 history.push(url);
               }}
               style={{ marginRight: 12 }}
-              isPermission={permission.update}
+              isPermission={permission.add}
               key="button"
               icon={<PlusOutlined />}
               type="primary"

+ 270 - 0
src/pages/system/Menu/Setting/baseMenu.ts

@@ -3206,4 +3206,274 @@ export default [
       },
     ],
   },
+  //物联卡
+  {
+    path: '5Hpl',
+    sortIndex: 4,
+    level: 1,
+    owner: 'iot',
+    name: '物联卡',
+    code: 'iot-card',
+    url: '/iot-card',
+    icon: 'icon-yunyunjieru',
+    permissions: [],
+    children: [
+      {
+        path: '5Hpl-mghg',
+        sortIndex: 1,
+        level: 1,
+        owner: 'iot',
+        name: '首页',
+        code: 'iot-card/Home',
+        url: '/iot-card/Home',
+        icon: 'icon-shujumoni',
+        status: 1,
+        permissions: [
+          {
+            permission: 'network-flow',
+            actions: ['query'],
+          },
+        ],
+        accessSupport: {
+          text: '不支持',
+          value: 'unsupported',
+        },
+      },
+      {
+        path: '5Hpl-4VFS',
+        sortIndex: 2,
+        level: 1,
+        owner: 'iot',
+        name: '仪表盘',
+        code: 'iot-card/Dashboard',
+        url: '/iot-card/Dashboard',
+        icon: 'icon-keshihua',
+        permissions: [
+          {
+            permission: 'network-flow',
+            actions: ['query'],
+          },
+        ],
+      },
+      {
+        path: '5Hpl-O2m8',
+        sortIndex: 3,
+        level: 2,
+        owner: 'iot',
+        name: '物联卡管理',
+        code: 'iot-card/CardManagement',
+        url: '/iot-card/CardManagement',
+        icon: 'icon-chanpinfenlei',
+        status: 1,
+        permissions: [],
+        buttons: [
+          {
+            id: 'sync',
+            name: '同步',
+            permissions: [
+              {
+                permission: 'IotCard-management',
+                actions: ['sync'],
+              },
+            ],
+          },
+          {
+            id: 'import',
+            name: '导入',
+            permissions: [
+              {
+                permission: 'IotCard-management',
+                actions: ['import'],
+              },
+            ],
+          },
+          {
+            id: 'export',
+            name: '导出',
+            permissions: [
+              {
+                permission: 'IotCard-management',
+                actions: ['export'],
+              },
+            ],
+          },
+          {
+            id: 'delete',
+            name: '删除',
+            permissions: [
+              {
+                permission: 'IotCard-management',
+                actions: ['delete'],
+              },
+            ],
+          },
+          {
+            id: 'active',
+            name: '激活',
+            permissions: [
+              {
+                permission: 'IotCard-management',
+                actions: ['active'],
+              },
+            ],
+          },
+          {
+            id: 'bind',
+            name: '绑定',
+            permissions: [
+              {
+                permission: 'IotCard-management',
+                actions: ['action'],
+              },
+            ],
+          },
+          {
+            id: 'add',
+            name: '新增',
+            permissions: [
+              {
+                permission: 'IotCard-management',
+                actions: ['save'],
+              },
+            ],
+          },
+          {
+            id: 'action',
+            name: '启/禁用',
+            permissions: [
+              {
+                permission: 'IotCard-management',
+                actions: ['save'],
+              },
+            ],
+          },
+          {
+            id: 'update',
+            name: '编辑',
+            permissions: [
+              {
+                permission: 'IotCard-management',
+                actions: ['save'],
+              },
+            ],
+          },
+          {
+            id: 'view',
+            name: '查看',
+            permissions: [
+              {
+                permission: 'IotCard-management',
+                actions: ['query'],
+              },
+            ],
+          },
+        ],
+      },
+      {
+        path: '5Hpl-ZjAG',
+        sortIndex: 4,
+        level: 2,
+        owner: 'iot',
+        name: '充值管理',
+        code: 'iot-card/Recharge',
+        url: '/iot-card/Recharge',
+        icon: 'icon-caidanguanli',
+        status: 1,
+        permissions: [],
+        buttons: [
+          {
+            id: 'pay',
+            name: '充值',
+            permissions: [
+              {
+                permission: 'IotCard-management',
+                actions: ['pay'],
+              },
+            ],
+          },
+        ],
+      },
+      {
+        path: '5Hpl-eS9h',
+        sortIndex: 5,
+        level: 2,
+        owner: 'iot',
+        name: '平台接入',
+        code: 'iot-card/Platform',
+        url: '/iot-card/Platform',
+        icon: 'icon-wangguanzishebei',
+        status: 1,
+        permissions: [],
+        buttons: [
+          {
+            id: 'action',
+            name: '启/禁用',
+            permissions: [
+              {
+                permission: 'platform',
+                actions: ['save'],
+              },
+            ],
+          },
+          {
+            id: 'delete',
+            name: '删除',
+            permissions: [
+              {
+                permission: 'platform',
+                actions: ['delete'],
+              },
+            ],
+          },
+          {
+            id: 'update',
+            name: '编辑',
+            permissions: [
+              {
+                permission: 'platform',
+                actions: ['save'],
+              },
+            ],
+          },
+          {
+            id: 'add',
+            name: '新增',
+            permissions: [
+              {
+                permission: 'platform',
+                actions: ['save'],
+              },
+            ],
+          },
+          {
+            id: 'view',
+            name: '查看',
+            permissions: [
+              {
+                permission: 'platform',
+                actions: ['query'],
+              },
+            ],
+          },
+        ],
+      },
+      {
+        path: '5Hpl-cL34',
+        sortIndex: 6,
+        level: 1,
+        owner: 'iot',
+        name: '操作记录',
+        code: 'iot-card/Record',
+        url: '/iot-card/Record',
+        icon: 'icon-rizhifuwu',
+        status: 1,
+        permissions: [
+          {
+            permission: 'network-card',
+            actions: ['query'],
+          },
+        ],
+      },
+    ],
+  },
 ];