陈帅 vor 6 Jahren
Ursprung
Commit
99834c3dd5
9 geänderte Dateien mit 364 neuen und 97 gelöschten Zeilen
  1. 1 1
      Dockerfile.dev
  2. 30 36
      README.ja-JP.md
  3. 5 11
      README.md
  4. 4 11
      README.ru-RU.md
  5. 11 17
      README.tr-TR.md
  6. 10 15
      README.zh-CN.md
  7. 297 0
      config/router.config.js
  8. 3 3
      package.json
  9. 3 3
      src/utils/Authorized.ts

+ 1 - 1
Dockerfile.dev

@@ -3,7 +3,7 @@ FROM node:latest
 WORKDIR /usr/src/app/
 
 COPY package.json ./
-RUN npm install --silent --no-cache
+RUN npm install --silent --no-cache --registry=https://registry.npm.taobao.org
 
 COPY ./ ./
 

Datei-Diff unterdrückt, da er zu groß ist
+ 30 - 36
README.ja-JP.md


Datei-Diff unterdrückt, da er zu groß ist
+ 5 - 11
README.md


Datei-Diff unterdrückt, da er zu groß ist
+ 4 - 11
README.ru-RU.md


Datei-Diff unterdrückt, da er zu groß ist
+ 11 - 17
README.tr-TR.md


Datei-Diff unterdrückt, da er zu groß ist
+ 10 - 15
README.zh-CN.md


+ 297 - 0
config/router.config.js

@@ -0,0 +1,297 @@
+export default [
+  // user
+  {
+    path: '/user',
+    component: '../layouts/UserLayout',
+    routes: [
+      { path: '/user', redirect: '/user/login' },
+      { path: '/user/login', name: 'login', component: './User/Login' },
+      { path: '/user/register', name: 'register', component: './User/Register' },
+      {
+        path: '/user/register-result',
+        name: 'register.result',
+        component: './User/RegisterResult',
+      },
+      {
+        component: '404',
+      },
+    ],
+  },
+  // app
+  {
+    path: '/',
+    component: '../layouts/BasicLayout',
+    Routes: ['src/pages/Authorized'],
+    routes: [
+      // dashboard
+      { path: '/', redirect: '/dashboard/analysis', authority: ['admin', 'user'] },
+      {
+        path: '/dashboard',
+        name: 'dashboard',
+        icon: 'dashboard',
+        routes: [
+          {
+            path: '/dashboard/analysis',
+            name: 'analysis',
+            component: './Dashboard/Analysis',
+          },
+          {
+            path: '/dashboard/monitor',
+            name: 'monitor',
+            component: './Dashboard/Monitor',
+          },
+          {
+            path: '/dashboard/workplace',
+            name: 'workplace',
+            component: './Dashboard/Workplace',
+          },
+        ],
+      },
+      // forms
+      {
+        path: '/form',
+        icon: 'form',
+        name: 'form',
+        routes: [
+          {
+            path: '/form/basic-form',
+            name: 'basicform',
+            component: './Forms/BasicForm',
+          },
+          {
+            path: '/form/step-form',
+            name: 'stepform',
+            component: './Forms/StepForm',
+            hideChildrenInMenu: true,
+            routes: [
+              {
+                path: '/form/step-form',
+                redirect: '/form/step-form/info',
+              },
+              {
+                path: '/form/step-form/info',
+                name: 'info',
+                component: './Forms/StepForm/Step1',
+              },
+              {
+                path: '/form/step-form/confirm',
+                name: 'confirm',
+                component: './Forms/StepForm/Step2',
+              },
+              {
+                path: '/form/step-form/result',
+                name: 'result',
+                component: './Forms/StepForm/Step3',
+              },
+            ],
+          },
+          {
+            path: '/form/advanced-form',
+            name: 'advancedform',
+            authority: ['admin'],
+            component: './Forms/AdvancedForm',
+          },
+        ],
+      },
+      // list
+      {
+        path: '/list',
+        icon: 'table',
+        name: 'list',
+        routes: [
+          {
+            path: '/list/table-list',
+            name: 'searchtable',
+            component: './List/TableList',
+          },
+          {
+            path: '/list/basic-list',
+            name: 'basiclist',
+            component: './List/BasicList',
+          },
+          {
+            path: '/list/card-list',
+            name: 'cardlist',
+            component: './List/CardList',
+          },
+          {
+            path: '/list/search',
+            name: 'searchlist',
+            component: './List/List',
+            routes: [
+              {
+                path: '/list/search',
+                redirect: '/list/search/articles',
+              },
+              {
+                path: '/list/search/articles',
+                name: 'articles',
+                component: './List/Articles',
+              },
+              {
+                path: '/list/search/projects',
+                name: 'projects',
+                component: './List/Projects',
+              },
+              {
+                path: '/list/search/applications',
+                name: 'applications',
+                component: './List/Applications',
+              },
+            ],
+          },
+        ],
+      },
+      {
+        path: '/profile',
+        name: 'profile',
+        icon: 'profile',
+        routes: [
+          // profile
+          {
+            path: '/profile/basic',
+            name: 'basic',
+            component: './Profile/BasicProfile',
+          },
+          {
+            path: '/profile/basic/:id',
+            hideInMenu: true,
+            component: './Profile/BasicProfile',
+          },
+          {
+            path: '/profile/advanced',
+            name: 'advanced',
+            authority: ['admin'],
+            component: './Profile/AdvancedProfile',
+          },
+        ],
+      },
+      {
+        name: 'result',
+        icon: 'check-circle-o',
+        path: '/result',
+        routes: [
+          // result
+          {
+            path: '/result/success',
+            name: 'success',
+            component: './Result/Success',
+          },
+          { path: '/result/fail', name: 'fail', component: './Result/Error' },
+        ],
+      },
+      {
+        name: 'exception',
+        icon: 'warning',
+        path: '/exception',
+        routes: [
+          // exception
+          {
+            path: '/exception/403',
+            name: 'not-permission',
+            component: './Exception/403',
+          },
+          {
+            path: '/exception/404',
+            name: 'not-find',
+            component: './Exception/404',
+          },
+          {
+            path: '/exception/500',
+            name: 'server-error',
+            component: './Exception/500',
+          },
+          {
+            path: '/exception/trigger',
+            name: 'trigger',
+            hideInMenu: true,
+            component: './Exception/TriggerException',
+          },
+        ],
+      },
+      {
+        name: 'account',
+        icon: 'user',
+        path: '/account',
+        routes: [
+          {
+            path: '/account/center',
+            name: 'center',
+            component: './Account/Center/Center',
+            routes: [
+              {
+                path: '/account/center',
+                redirect: '/account/center/articles',
+              },
+              {
+                path: '/account/center/articles',
+                component: './Account/Center/Articles',
+              },
+              {
+                path: '/account/center/applications',
+                component: './Account/Center/Applications',
+              },
+              {
+                path: '/account/center/projects',
+                component: './Account/Center/Projects',
+              },
+            ],
+          },
+          {
+            path: '/account/settings',
+            name: 'settings',
+            component: './Account/Settings/Info',
+            routes: [
+              {
+                path: '/account/settings',
+                redirect: '/account/settings/base',
+              },
+              {
+                path: '/account/settings/base',
+                component: './Account/Settings/BaseView',
+              },
+              {
+                path: '/account/settings/security',
+                component: './Account/Settings/SecurityView',
+              },
+              {
+                path: '/account/settings/binding',
+                component: './Account/Settings/BindingView',
+              },
+              {
+                path: '/account/settings/notification',
+                component: './Account/Settings/NotificationView',
+              },
+            ],
+          },
+        ],
+      },
+      //  editor
+      {
+        name: 'editor',
+        icon: 'highlight',
+        path: '/editor',
+        routes: [
+          {
+            path: '/editor/flow',
+            name: 'flow',
+            component: './Editor/GGEditor/Flow',
+          },
+          {
+            path: '/editor/mind',
+            name: 'mind',
+            component: './Editor/GGEditor/Mind',
+          },
+          {
+            path: '/editor/koni',
+            name: 'koni',
+            component: './Editor/GGEditor/Koni',
+          },
+        ],
+      },
+      {
+        component: '404',
+      },
+    ],
+  },
+];

+ 3 - 3
package.json

@@ -27,7 +27,7 @@
     "lint:ts": "tslint -p . -c tslint.yml",
     "prettier": " check-prettier write",
     "site": "umi build && npm run functions:build",
-    "start": "cross-env ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION=site umi dev",
+    "start": "umi dev",
     "start:no-mock": "cross-env MOCK=none umi dev",
     "test": "umi test",
     "test:all": "node ./tests/run-tests.js",
@@ -56,8 +56,8 @@
   "dependencies": {
     "@ant-design/pro-layout": "^4.2.0",
     "@antv/data-set": "^0.10.1",
-    "antd": "^3.18.1",
-    "bizcharts": "3.5.2-beta.1",
+    "antd": "^3.16.1",
+    "bizcharts": "^3.5.3-beta.0",
     "bizcharts-plugin-slider": "^2.1.1-beta.1",
     "classnames": "^2.2.6",
     "dva": "^2.4.0",

+ 3 - 3
src/utils/Authorized.ts

@@ -1,11 +1,11 @@
-import { default as RenderAuthorized } from '@/components/Authorized';
+import { default as RenderAuthorize } from '@/components/Authorized';
 import { getAuthority } from './authority';
 
-let Authorized = RenderAuthorized(getAuthority()); // eslint-disable-line
+let Authorized = RenderAuthorize(getAuthority()); // eslint-disable-line
 
 // Reload the rights component
 const reloadAuthorized = () => {
-  Authorized = RenderAuthorized(getAuthority());
+  Authorized = RenderAuthorize(getAuthority());
 };
 
 export { reloadAuthorized };