longyong 6 months ago
commit
fdffb132be
100 changed files with 1612 additions and 0 deletions
  1. 14 0
      .editorconfig
  2. 8 0
      .env.development
  3. 7 0
      .env.production
  4. 7 0
      .env.production.bak
  5. 4 0
      .eslintignore
  6. 198 0
      .eslintrc.js
  7. 5 0
      .travis.yml
  8. 191 0
      LICENSE
  9. 66 0
      README.md
  10. 11 0
      babel.config.js
  11. 24 0
      jest.config.js
  12. 116 0
      package.json
  13. 7 0
      plopfile.js
  14. 5 0
      postcss.config.js
  15. BIN
      public/favicon.ico
  16. 15 0
      public/index.html
  17. 11 0
      src/App.vue
  18. 17 0
      src/api/data.js
  19. 16 0
      src/api/generator/genConfig.js
  20. 33 0
      src/api/generator/generator.js
  21. 35 0
      src/api/login.js
  22. 27 0
      src/api/mnt/app.js
  23. 17 0
      src/api/mnt/connect.js
  24. 35 0
      src/api/mnt/database.js
  25. 77 0
      src/api/mnt/deploy.js
  26. 21 0
      src/api/mnt/deployHistory.js
  27. 27 0
      src/api/mnt/serverDeploy.js
  28. 22 0
      src/api/monitor/log.js
  29. 9 0
      src/api/monitor/online.js
  30. 15 0
      src/api/system/code.js
  31. 44 0
      src/api/system/dept.js
  32. 34 0
      src/api/system/dict.js
  33. 52 0
      src/api/system/dictDetail.js
  34. 40 0
      src/api/system/job.js
  35. 65 0
      src/api/system/menu.js
  36. 57 0
      src/api/system/role.js
  37. 41 0
      src/api/system/timing.js
  38. 61 0
      src/api/system/user.js
  39. 25 0
      src/api/tools/alipay.js
  40. 24 0
      src/api/tools/email.js
  41. 27 0
      src/api/tools/localStorage.js
  42. 40 0
      src/api/tools/qiniu.js
  43. BIN
      src/assets/401_images/401.gif
  44. BIN
      src/assets/404_images/404.png
  45. BIN
      src/assets/404_images/404_cloud.png
  46. 9 0
      src/assets/icons/index.js
  47. 1 0
      src/assets/icons/svg/Steve-Jobs.svg
  48. 1 0
      src/assets/icons/svg/alipay.svg
  49. 1 0
      src/assets/icons/svg/anq.svg
  50. 1 0
      src/assets/icons/svg/app.svg
  51. 1 0
      src/assets/icons/svg/backup.svg
  52. 1 0
      src/assets/icons/svg/chain.svg
  53. 1 0
      src/assets/icons/svg/chart.svg
  54. 1 0
      src/assets/icons/svg/codeConsole.svg
  55. 1 0
      src/assets/icons/svg/dashboard.svg
  56. 1 0
      src/assets/icons/svg/database.svg
  57. 1 0
      src/assets/icons/svg/date.svg
  58. 1 0
      src/assets/icons/svg/deploy.svg
  59. 1 0
      src/assets/icons/svg/dept.svg
  60. 1 0
      src/assets/icons/svg/dev.svg
  61. 1 0
      src/assets/icons/svg/develop.svg
  62. 1 0
      src/assets/icons/svg/dictionary.svg
  63. 1 0
      src/assets/icons/svg/doc.svg
  64. 1 0
      src/assets/icons/svg/download.svg
  65. 1 0
      src/assets/icons/svg/edit.svg
  66. 1 0
      src/assets/icons/svg/education.svg
  67. 1 0
      src/assets/icons/svg/email.svg
  68. 1 0
      src/assets/icons/svg/error.svg
  69. 1 0
      src/assets/icons/svg/exit-fullscreen.svg
  70. 1 0
      src/assets/icons/svg/fullscreen.svg
  71. 1 0
      src/assets/icons/svg/fwb.svg
  72. 1 0
      src/assets/icons/svg/github.svg
  73. 1 0
      src/assets/icons/svg/gonggao.svg
  74. 1 0
      src/assets/icons/svg/icon.svg
  75. 1 0
      src/assets/icons/svg/image.svg
  76. 1 0
      src/assets/icons/svg/index.svg
  77. 1 0
      src/assets/icons/svg/international.svg
  78. 1 0
      src/assets/icons/svg/ipvisits.svg
  79. 1 0
      src/assets/icons/svg/java.svg
  80. 1 0
      src/assets/icons/svg/link.svg
  81. 1 0
      src/assets/icons/svg/list.svg
  82. 1 0
      src/assets/icons/svg/lock.svg
  83. 1 0
      src/assets/icons/svg/log.svg
  84. 1 0
      src/assets/icons/svg/login.svg
  85. 1 0
      src/assets/icons/svg/markdown.svg
  86. 1 0
      src/assets/icons/svg/menu.svg
  87. 1 0
      src/assets/icons/svg/message.svg
  88. 1 0
      src/assets/icons/svg/mnt.svg
  89. 1 0
      src/assets/icons/svg/money.svg
  90. 1 0
      src/assets/icons/svg/monitor.svg
  91. 1 0
      src/assets/icons/svg/nested.svg
  92. 1 0
      src/assets/icons/svg/password.svg
  93. 1 0
      src/assets/icons/svg/people.svg
  94. 1 0
      src/assets/icons/svg/peoples.svg
  95. 1 0
      src/assets/icons/svg/permission.svg
  96. 1 0
      src/assets/icons/svg/phone.svg
  97. 1 0
      src/assets/icons/svg/qiniu.svg
  98. 1 0
      src/assets/icons/svg/redis.svg
  99. 1 0
      src/assets/icons/svg/role.svg
  100. 0 0
      src/assets/icons/svg/search.svg

+ 14 - 0
.editorconfig

@@ -0,0 +1,14 @@
+# https://editorconfig.org
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.md]
+insert_final_newline = false
+trim_trailing_whitespace = false

+ 8 - 0
.env.development

@@ -0,0 +1,8 @@
+ENV = 'development'
+
+# 接口地址
+VUE_APP_BASE_API  = 'http://localhost:8000'
+VUE_APP_WS_API = 'ws://localhost:8000'
+
+# 是否启用 babel-plugin-dynamic-import-node插件
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 7 - 0
.env.production

@@ -0,0 +1,7 @@
+ENV = 'production'
+
+# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
+# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
+VUE_APP_BASE_API  = 'http://manager.longyong.cc'
+# 如果接口是 http 形式, wss 需要改为 ws
+VUE_APP_WS_API = 'ws://manager.longyong.cc'

+ 7 - 0
.env.production.bak

@@ -0,0 +1,7 @@
+ENV = 'production'
+
+# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
+# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
+VUE_APP_BASE_API  = 'http://localhost:8000'
+# 如果接口是 http 形式, wss 需要改为 ws
+VUE_APP_WS_API = 'wss://el-admin.xin'

+ 4 - 0
.eslintignore

@@ -0,0 +1,4 @@
+build/*.js
+src/assets
+public
+dist

+ 198 - 0
.eslintrc.js

@@ -0,0 +1,198 @@
+module.exports = {
+  root: true,
+  parserOptions: {
+    parser: 'babel-eslint',
+    sourceType: 'module'
+  },
+  env: {
+    browser: true,
+    node: true,
+    es6: true,
+  },
+  extends: ['plugin:vue/recommended', 'eslint:recommended'],
+
+  // add your custom rules here
+  //it is base on https://github.com/vuejs/eslint-config-vue
+  rules: {
+    "vue/max-attributes-per-line": [2, {
+      "singleline": 10,
+      "multiline": {
+        "max": 1,
+        "allowFirstLine": false
+      }
+    }],
+    "vue/singleline-html-element-content-newline": "off",
+    "vue/multiline-html-element-content-newline":"off",
+    "vue/name-property-casing": ["error", "PascalCase"],
+    "vue/no-v-html": "off",
+    'accessor-pairs': 2,
+    'arrow-spacing': [2, {
+      'before': true,
+      'after': true
+    }],
+    'block-spacing': [2, 'always'],
+    'brace-style': [2, '1tbs', {
+      'allowSingleLine': true
+    }],
+    'camelcase': [0, {
+      'properties': 'always'
+    }],
+    'comma-dangle': [2, 'never'],
+    'comma-spacing': [2, {
+      'before': false,
+      'after': true
+    }],
+    'comma-style': [2, 'last'],
+    'constructor-super': 2,
+    'curly': [2, 'multi-line'],
+    'dot-location': [2, 'property'],
+    'eol-last': 2,
+    'eqeqeq': ["error", "always", {"null": "ignore"}],
+    'generator-star-spacing': [2, {
+      'before': true,
+      'after': true
+    }],
+    'handle-callback-err': [2, '^(err|error)$'],
+    'indent': [2, 2, {
+      'SwitchCase': 1
+    }],
+    'jsx-quotes': [2, 'prefer-single'],
+    'key-spacing': [2, {
+      'beforeColon': false,
+      'afterColon': true
+    }],
+    'keyword-spacing': [2, {
+      'before': true,
+      'after': true
+    }],
+    'new-cap': [2, {
+      'newIsCap': true,
+      'capIsNew': false
+    }],
+    'new-parens': 2,
+    'no-array-constructor': 2,
+    'no-caller': 2,
+    'no-console': 'off',
+    'no-class-assign': 2,
+    'no-cond-assign': 2,
+    'no-const-assign': 2,
+    'no-control-regex': 0,
+    'no-delete-var': 2,
+    'no-dupe-args': 2,
+    'no-dupe-class-members': 2,
+    'no-dupe-keys': 2,
+    'no-duplicate-case': 2,
+    'no-empty-character-class': 2,
+    'no-empty-pattern': 2,
+    'no-eval': 2,
+    'no-ex-assign': 2,
+    'no-extend-native': 2,
+    'no-extra-bind': 2,
+    'no-extra-boolean-cast': 2,
+    'no-extra-parens': [2, 'functions'],
+    'no-fallthrough': 2,
+    'no-floating-decimal': 2,
+    'no-func-assign': 2,
+    'no-implied-eval': 2,
+    'no-inner-declarations': [2, 'functions'],
+    'no-invalid-regexp': 2,
+    'no-irregular-whitespace': 2,
+    'no-iterator': 2,
+    'no-label-var': 2,
+    'no-labels': [2, {
+      'allowLoop': false,
+      'allowSwitch': false
+    }],
+    'no-lone-blocks': 2,
+    'no-mixed-spaces-and-tabs': 2,
+    'no-multi-spaces': 2,
+    'no-multi-str': 2,
+    'no-multiple-empty-lines': [2, {
+      'max': 1
+    }],
+    'no-native-reassign': 2,
+    'no-negated-in-lhs': 2,
+    'no-new-object': 2,
+    'no-new-require': 2,
+    'no-new-symbol': 2,
+    'no-new-wrappers': 2,
+    'no-obj-calls': 2,
+    'no-octal': 2,
+    'no-octal-escape': 2,
+    'no-path-concat': 2,
+    'no-proto': 2,
+    'no-redeclare': 2,
+    'no-regex-spaces': 2,
+    'no-return-assign': [2, 'except-parens'],
+    'no-self-assign': 2,
+    'no-self-compare': 2,
+    'no-sequences': 2,
+    'no-shadow-restricted-names': 2,
+    'no-spaced-func': 2,
+    'no-sparse-arrays': 2,
+    'no-this-before-super': 2,
+    'no-throw-literal': 2,
+    'no-trailing-spaces': 2,
+    'no-undef': 2,
+    'no-undef-init': 2,
+    'no-unexpected-multiline': 2,
+    'no-unmodified-loop-condition': 2,
+    'no-unneeded-ternary': [2, {
+      'defaultAssignment': false
+    }],
+    'no-unreachable': 2,
+    'no-unsafe-finally': 2,
+    'no-unused-vars': [2, {
+      'vars': 'all',
+      'args': 'none'
+    }],
+    'no-useless-call': 2,
+    'no-useless-computed-key': 2,
+    'no-useless-constructor': 2,
+    'no-useless-escape': 0,
+    'no-whitespace-before-property': 2,
+    'no-with': 2,
+    'one-var': [2, {
+      'initialized': 'never'
+    }],
+    'operator-linebreak': [2, 'after', {
+      'overrides': {
+        '?': 'before',
+        ':': 'before'
+      }
+    }],
+    'padded-blocks': [2, 'never'],
+    'quotes': [2, 'single', {
+      'avoidEscape': true,
+      'allowTemplateLiterals': true
+    }],
+    'semi': [2, 'never'],
+    'semi-spacing': [2, {
+      'before': false,
+      'after': true
+    }],
+    'space-before-blocks': [2, 'always'],
+    'space-before-function-paren': [2, 'never'],
+    'space-in-parens': [2, 'never'],
+    'space-infix-ops': 2,
+    'space-unary-ops': [2, {
+      'words': true,
+      'nonwords': false
+    }],
+    'spaced-comment': [2, 'always', {
+      'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
+    }],
+    'template-curly-spacing': [2, 'never'],
+    'use-isnan': 2,
+    'valid-typeof': 2,
+    'wrap-iife': [2, 'any'],
+    'yield-star-spacing': [2, 'both'],
+    'yoda': [2, 'never'],
+    'prefer-const': 2,
+    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
+    'object-curly-spacing': [2, 'always', {
+      objectsInObjects: false
+    }],
+    'array-bracket-spacing': [2, 'never']
+  }
+}

+ 5 - 0
.travis.yml

@@ -0,0 +1,5 @@
+language: node_js
+node_js: 10
+script: npm run test
+notifications:
+  email: false

+ 191 - 0
LICENSE

@@ -0,0 +1,191 @@
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and
+distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright
+owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities
+that control, are controlled by, or are under common control with that entity.
+For the purposes of this definition, "control" means (i) the power, direct or
+indirect, to cause the direction or management of such entity, whether by
+contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
+outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including
+but not limited to software source code, documentation source, and configuration
+files.
+
+"Object" form shall mean any form resulting from mechanical transformation or
+translation of a Source form, including but not limited to compiled object code,
+generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made
+available under the License, as indicated by a copyright notice that is included
+in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that
+is based on (or derived from) the Work and for which the editorial revisions,
+annotations, elaborations, or other modifications represent, as a whole, an
+original work of authorship. For the purposes of this License, Derivative Works
+shall not include works that remain separable from, or merely link (or bind by
+name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version
+of the Work and any modifications or additions to that Work or Derivative Works
+thereof, that is intentionally submitted to Licensor for inclusion in the Work
+by the copyright owner or by an individual or Legal Entity authorized to submit
+on behalf of the copyright owner. For the purposes of this definition,
+"submitted" means any form of electronic, verbal, or written communication sent
+to the Licensor or its representatives, including but not limited to
+communication on electronic mailing lists, source code control systems, and
+issue tracking systems that are managed by, or on behalf of, the Licensor for
+the purpose of discussing and improving the Work, but excluding communication
+that is conspicuously marked or otherwise designated in writing by the copyright
+owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
+of whom a Contribution has been received by Licensor and subsequently
+incorporated within the Work.
+
+2. Grant of Copyright License.
+
+Subject to the terms and conditions of this License, each Contributor hereby
+grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+irrevocable copyright license to reproduce, prepare Derivative Works of,
+publicly display, publicly perform, sublicense, and distribute the Work and such
+Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+
+Subject to the terms and conditions of this License, each Contributor hereby
+grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+irrevocable (except as stated in this section) patent license to make, have
+made, use, offer to sell, sell, import, and otherwise transfer the Work, where
+such license applies only to those patent claims licensable by such Contributor
+that are necessarily infringed by their Contribution(s) alone or by combination
+of their Contribution(s) with the Work to which such Contribution(s) was
+submitted. If You institute patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that the Work or a
+Contribution incorporated within the Work constitutes direct or contributory
+patent infringement, then any patent licenses granted to You under this License
+for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution.
+
+You may reproduce and distribute copies of the Work or Derivative Works thereof
+in any medium, with or without modifications, and in Source or Object form,
+provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of
+this License; and
+You must cause any modified files to carry prominent notices stating that You
+changed the files; and
+You must retain, in the Source form of any Derivative Works that You distribute,
+all copyright, patent, trademark, and attribution notices from the Source form
+of the Work, excluding those notices that do not pertain to any part of the
+Derivative Works; and
+If the Work includes a "NOTICE" text file as part of its distribution, then any
+Derivative Works that You distribute must include a readable copy of the
+attribution notices contained within such NOTICE file, excluding those notices
+that do not pertain to any part of the Derivative Works, in at least one of the
+following places: within a NOTICE text file distributed as part of the
+Derivative Works; within the Source form or documentation, if provided along
+with the Derivative Works; or, within a display generated by the Derivative
+Works, if and wherever such third-party notices normally appear. The contents of
+the NOTICE file are for informational purposes only and do not modify the
+License. You may add Your own attribution notices within Derivative Works that
+You distribute, alongside or as an addendum to the NOTICE text from the Work,
+provided that such additional attribution notices cannot be construed as
+modifying the License.
+You may add Your own copyright statement to Your modifications and may provide
+additional or different license terms and conditions for use, reproduction, or
+distribution of Your modifications, or for any such Derivative Works as a whole,
+provided Your use, reproduction, and distribution of the Work otherwise complies
+with the conditions stated in this License.
+
+5. Submission of Contributions.
+
+Unless You explicitly state otherwise, any Contribution intentionally submitted
+for inclusion in the Work by You to the Licensor shall be under the terms and
+conditions of this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify the terms of
+any separate license agreement you may have executed with Licensor regarding
+such Contributions.
+
+6. Trademarks.
+
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+
+Unless required by applicable law or agreed to in writing, Licensor provides the
+Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
+including, without limitation, any warranties or conditions of TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
+solely responsible for determining the appropriateness of using or
+redistributing the Work and assume any risks associated with Your exercise of
+permissions under this License.
+
+8. Limitation of Liability.
+
+In no event and under no legal theory, whether in tort (including negligence),
+contract, or otherwise, unless required by applicable law (such as deliberate
+and grossly negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special, incidental,
+or consequential damages of any character arising as a result of this License or
+out of the use or inability to use the Work (including but not limited to
+damages for loss of goodwill, work stoppage, computer failure or malfunction, or
+any and all other commercial damages or losses), even if such Contributor has
+been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+
+While redistributing the Work or Derivative Works thereof, You may choose to
+offer, and charge a fee for, acceptance of support, warranty, indemnity, or
+other liability obligations and/or rights consistent with this License. However,
+in accepting such obligations, You may act only on Your own behalf and on Your
+sole responsibility, not on behalf of any other Contributor, and only if You
+agree to indemnify, defend, and hold each Contributor harmless for any liability
+incurred by, or claims asserted against, such Contributor by reason of your
+accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work
+
+To apply the Apache License to your work, attach the following boilerplate
+notice, with the fields enclosed by brackets "{}" replaced with your own
+identifying information. (Don't include the brackets!) The text should be
+enclosed in the appropriate comment syntax for the file format. We also
+recommend that a file or class name and description of purpose be included on
+the same "printed page" as the copyright notice for easier identification within
+third-party archives.
+
+   Copyright 2019 Zheng Jie
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

+ 66 - 0
README.md

@@ -0,0 +1,66 @@
+# ELADMIN-WEB
+
+ELADMIN 前端源码
+
+#### 项目源码
+
+|     |   后端源码  |   前端源码  |
+|---  |--- | --- |
+|  github   |  https://github.com/elunez/eladmin   |  https://github.com/elunez/eladmin-web   |
+|  码云   |  https://gitee.com/elunez/eladmin   |  https://gitee.com/elunez/eladmin-web   |
+
+#### 开发文档
+[https://el-admin.vip](https://el-admin.vip)
+
+#### 前端模板
+
+初始模板基于: [https://github.com/PanJiaChen/vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)
+
+模板文档: [https://panjiachen.github.io/vue-element-admin-site/zh/guide/](https://panjiachen.github.io/vue-element-admin-site/zh/guide/)
+
+#### Build Setup
+``` bash
+# 配置镜像加速
+https://www.ydyno.com/archives/1219.html
+
+# 安装依赖
+npm install
+
+# 启动服务 localhost:8013
+npm run dev
+
+# 构建生产环境
+npm run build:prod
+```
+
+#### 常见问题
+
+1、linux 系统在安装依赖的时候会出现 node-sass 无法安装的问题
+
+解决方案:
+```
+1. 单独安装:npm install --unsafe-perm node-sass 
+2. 直接使用:npm install --unsafe-perm
+```
+
+2、加速node-sass安装
+
+https://www.ydyno.com/archives/1219.html
+
+#### 特别鸣谢
+
+- 感谢 [JetBrains](https://www.jetbrains.com/) 提供的非商业开源软件开发授权
+
+- 感谢 [PanJiaChen](https://github.com/PanJiaChen/vue-element-admin) 大佬提供的前端模板
+
+- 感谢 [Moxun](https://github.com/moxun1639) 大佬提供的前端 Curd 通用组件
+
+- 感谢 [zhy6599](https://gitee.com/zhy6599) 大佬提供的后端运维管理相关功能
+
+- 感谢 [j.yao.SUSE](https://github.com/everhopingandwaiting) 大佬提供的匿名接口与Redis限流等功能
+
+- 感谢 [d15801543974](https://github.com/d15801543974) 大佬提供的基于注解的通用查询方式
+
+#### 反馈交流
+
+- QQ交流群:一群:<strike>891137268</strike> 已满、二群:947578238

+ 11 - 0
babel.config.js

@@ -0,0 +1,11 @@
+const plugins = ['@vue/babel-plugin-transform-vue-jsx']
+// 生产环境移除console
+if (process.env.NODE_ENV === 'production') {
+  plugins.push('transform-remove-console')
+}
+module.exports = {
+  plugins: plugins,
+  presets: [
+    '@vue/app'
+  ]
+}

+ 24 - 0
jest.config.js

@@ -0,0 +1,24 @@
+module.exports = {
+  moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
+  transform: {
+    '^.+\\.vue$': 'vue-jest',
+    '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
+      'jest-transform-stub',
+    '^.+\\.jsx?$': 'babel-jest'
+  },
+  moduleNameMapper: {
+    '^@/(.*)$': '<rootDir>/src/$1'
+  },
+  snapshotSerializers: ['jest-serializer-vue'],
+  testMatch: [
+    '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
+  ],
+  collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
+  coverageDirectory: '<rootDir>/tests/unit/coverage',
+  // 'collectCoverage': true,
+  'coverageReporters': [
+    'lcov',
+    'text-summary'
+  ],
+  testURL: 'http://localhost/'
+}

+ 116 - 0
package.json

@@ -0,0 +1,116 @@
+{
+  "name": "eladmin-web",
+  "version": "2.6.0",
+  "description": "EL-ADMIN 前端源码",
+  "author": "Zheng Jie",
+  "license": "Apache-2.0",
+  "scripts": {
+    "dev": "vue-cli-service serve",
+    "build:prod": "vue-cli-service build",
+    "build:stage": "vue-cli-service build --mode staging",
+    "preview": "node build/index.js --preview",
+    "lint": "eslint --ext .js,.vue src",
+    "test:unit": "jest --clearCache && vue-cli-service test:unit",
+    "svgo": "svgo -f src/assets/icons/svg --config=src/assets/icons/svgo.yml",
+    "new": "plop"
+  },
+  "husky": {
+    "hooks": {
+      "pre-commit": "lint-staged"
+    }
+  },
+  "lint-staged": {
+    "src/**/*.{js,vue}": [
+      "eslint --fix",
+      "git add"
+    ]
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/elunez/eladmin-web.git"
+  },
+  "bugs": {
+    "url": "https://github.com/elunez/eladmin/issues"
+  },
+  "dependencies": {
+    "@riophae/vue-treeselect": "0.4.0",
+    "axios": "^0.21.1",
+    "clipboard": "2.0.4",
+    "codemirror": "^5.49.2",
+    "connect": "3.6.6",
+    "core-js": "^2.6.12",
+    "echarts": "^4.2.1",
+    "echarts-gl": "^1.1.1",
+    "echarts-wordcloud": "^1.1.3",
+    "element-ui": "^2.13.2",
+    "file-saver": "1.3.8",
+    "fuse.js": "3.4.4",
+    "js-beautify": "^1.10.2",
+    "js-cookie": "2.2.0",
+    "jsencrypt": "^3.0.0-rc.1",
+    "jszip": "3.1.5",
+    "mavon-editor": "^2.9.0",
+    "normalize.css": "7.0.0",
+    "nprogress": "0.2.0",
+    "path-to-regexp": "2.4.0",
+    "qs": "^6.9.1",
+    "screenfull": "4.2.0",
+    "sortablejs": "1.8.4",
+    "vue": "2.6.10",
+    "vue-count-to": "1.0.13",
+    "vue-cropper": "0.4.9",
+    "vue-echarts": "^5.0.0-beta.0",
+    "vue-highlightjs": "^1.3.3",
+    "vue-image-crop-upload": "^2.5.0",
+    "vue-router": "3.0.2",
+    "vue-splitpane": "1.0.4",
+    "vuedraggable": "2.20.0",
+    "vuex": "3.1.0",
+    "wangeditor": "^3.1.1",
+    "xlsx": "^0.14.1"
+  },
+  "devDependencies": {
+    "@babel/core": "7.0.0",
+    "@babel/parser": "^7.7.4",
+    "@babel/register": "7.0.0",
+    "@vue/babel-plugin-transform-vue-jsx": "^1.2.1",
+    "@vue/cli-plugin-babel": "3.5.3",
+    "@vue/cli-plugin-eslint": "^3.9.1",
+    "@vue/cli-plugin-unit-jest": "3.5.3",
+    "@vue/cli-service": "3.5.3",
+    "@vue/test-utils": "1.0.0-beta.29",
+    "autoprefixer": "^9.5.1",
+    "babel-core": "7.0.0-bridge.0",
+    "babel-eslint": "10.0.1",
+    "babel-jest": "23.6.0",
+    "babel-plugin-dynamic-import-node": "2.3.0",
+    "babel-plugin-transform-remove-console": "^6.9.4",
+    "chalk": "2.4.2",
+    "chokidar": "2.1.5",
+    "connect": "3.6.6",
+    "eslint": "5.15.3",
+    "eslint-plugin-vue": "5.2.2",
+    "html-webpack-plugin": "3.2.0",
+    "http-proxy-middleware": "^0.19.1",
+    "husky": "1.3.1",
+    "lint-staged": "8.1.5",
+    "plop": "2.3.0",
+    "runjs": "^4.3.2",
+    "sass": "^1.26.10",
+    "sass-loader": "^7.1.0",
+    "script-ext-html-webpack-plugin": "2.1.3",
+    "script-loader": "0.7.2",
+    "serve-static": "^1.13.2",
+    "svg-sprite-loader": "4.1.3",
+    "svgo": "1.2.0",
+    "vue-template-compiler": "2.6.10"
+  },
+  "engines": {
+    "node": ">=8.9",
+    "npm": ">= 3.0.0"
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions"
+  ]
+}

+ 7 - 0
plopfile.js

@@ -0,0 +1,7 @@
+const viewGenerator = require('./plop-templates/view/prompt')
+const componentGenerator = require('./plop-templates/component/prompt')
+
+module.exports = function(plop) {
+  plop.setGenerator('view', viewGenerator)
+  plop.setGenerator('component', componentGenerator)
+}

+ 5 - 0
postcss.config.js

@@ -0,0 +1,5 @@
+module.exports = {
+  plugins: {
+    autoprefixer: {}
+  }
+}

BIN
public/favicon.ico


+ 15 - 0
public/index.html

@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="renderer" content="webkit">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+    <title><%= webpackConfig.name %></title>
+  </head>
+  <body>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+  </body>
+</html>

+ 11 - 0
src/App.vue

@@ -0,0 +1,11 @@
+<template>
+  <div id="app">
+    <router-view />
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'App'
+}
+</script>

+ 17 - 0
src/api/data.js

@@ -0,0 +1,17 @@
+import request from '@/utils/request'
+import qs from 'qs'
+
+export function initData(url, params) {
+  return request({
+    url: url + '?' + qs.stringify(params, { indices: false }),
+    method: 'get'
+  })
+}
+
+export function download(url, params) {
+  return request({
+    url: url + '?' + qs.stringify(params, { indices: false }),
+    method: 'get',
+    responseType: 'blob'
+  })
+}

+ 16 - 0
src/api/generator/genConfig.js

@@ -0,0 +1,16 @@
+import request from '@/utils/request'
+
+export function get(tableName) {
+  return request({
+    url: 'api/genConfig/' + tableName,
+    method: 'get'
+  })
+}
+
+export function update(data) {
+  return request({
+    url: 'api/genConfig',
+    data,
+    method: 'put'
+  })
+}

+ 33 - 0
src/api/generator/generator.js

@@ -0,0 +1,33 @@
+import request from '@/utils/request'
+
+export function getAllTable() {
+  return request({
+    url: 'api/generator/tables/all',
+    method: 'get'
+  })
+}
+
+export function generator(tableName, type) {
+  return request({
+    url: 'api/generator/' + tableName + '/' + type,
+    method: 'post',
+    responseType: type === 2 ? 'blob' : ''
+  })
+}
+
+export function save(data) {
+  return request({
+    url: 'api/generator',
+    data,
+    method: 'put'
+  })
+}
+
+export function sync(tables) {
+  return request({
+    url: 'api/generator/sync',
+    method: 'post',
+    data: tables
+  })
+}
+

+ 35 - 0
src/api/login.js

@@ -0,0 +1,35 @@
+import request from '@/utils/request'
+
+export function login(username, password, code, uuid) {
+  return request({
+    url: 'auth/login',
+    method: 'post',
+    data: {
+      username,
+      password,
+      code,
+      uuid
+    }
+  })
+}
+
+export function getInfo() {
+  return request({
+    url: 'auth/info',
+    method: 'get'
+  })
+}
+
+export function getCodeImg() {
+  return request({
+    url: 'auth/code',
+    method: 'get'
+  })
+}
+
+export function logout() {
+  return request({
+    url: 'auth/logout',
+    method: 'delete'
+  })
+}

+ 27 - 0
src/api/mnt/app.js

@@ -0,0 +1,27 @@
+import request from '@/utils/request'
+
+export function add(data) {
+  return request({
+    url: 'api/app',
+    method: 'post',
+    data
+  })
+}
+
+export function del(ids) {
+  return request({
+    url: 'api/app',
+    method: 'delete',
+    data: ids
+  })
+}
+
+export function edit(data) {
+  return request({
+    url: 'api/app',
+    method: 'put',
+    data
+  })
+}
+
+export default { add, edit, del }

+ 17 - 0
src/api/mnt/connect.js

@@ -0,0 +1,17 @@
+import request from '@/utils/request'
+
+export function testDbConnect(data) {
+  return request({
+    url: 'api/database/testConnect',
+    method: 'post',
+    data
+  })
+}
+
+export function testServerConnect(data) {
+  return request({
+    url: 'api/serverDeploy/testConnect',
+    method: 'post',
+    data
+  })
+}

+ 35 - 0
src/api/mnt/database.js

@@ -0,0 +1,35 @@
+import request from '@/utils/request'
+
+export function add(data) {
+  return request({
+    url: 'api/database',
+    method: 'post',
+    data
+  })
+}
+
+export function del(ids) {
+  return request({
+    url: 'api/database',
+    method: 'delete',
+    data: ids
+  })
+}
+
+export function edit(data) {
+  return request({
+    url: 'api/database',
+    method: 'put',
+    data
+  })
+}
+
+export function testDbConnection(data) {
+  return request({
+    url: 'api/database/testConnect',
+    method: 'post',
+    data
+  })
+}
+
+export default { add, edit, del, testDbConnection }

+ 77 - 0
src/api/mnt/deploy.js

@@ -0,0 +1,77 @@
+import request from '@/utils/request'
+
+export function add(data) {
+  return request({
+    url: 'api/deploy',
+    method: 'post',
+    data
+  })
+}
+
+export function del(ids) {
+  return request({
+    url: 'api/deploy',
+    method: 'delete',
+    data: ids
+  })
+}
+
+export function edit(data) {
+  return request({
+    url: 'api/deploy',
+    method: 'put',
+    data
+  })
+}
+
+export function getApps() {
+  return request({
+    url: 'api/app',
+    method: 'get'
+  })
+}
+
+export function getServers() {
+  return request({
+    url: 'api/serverDeploy',
+    method: 'get'
+  })
+}
+
+/**
+ * 启动服务
+ * @param data 选中行
+ */
+export function startServer(data) {
+  return request({
+    url: 'api/deploy/startServer',
+    method: 'post',
+    data
+  })
+}
+
+/**
+ * 停止服务
+ * @param data  选中行
+ */
+export function stopServer(data) {
+  return request({
+    url: 'api/deploy/stopServer',
+    method: 'post',
+    data
+  })
+}
+
+/**
+ * 停止服务
+ * @param data  选中行
+ */
+export function serverStatus(data) {
+  return request({
+    url: 'api/deploy/serverStatus',
+    method: 'post',
+    data
+  })
+}
+
+export default { add, edit, del, stopServer, serverStatus, startServer, getServers, getApps }

+ 21 - 0
src/api/mnt/deployHistory.js

@@ -0,0 +1,21 @@
+import request from '@/utils/request'
+
+export function del(ids) {
+  return request({
+    url: 'api/deployHistory',
+    method: 'delete',
+    data: ids
+  })
+}
+
+/**
+ * 版本回退
+ * @param data 选中行
+ */
+export function reducte(data) {
+  return request({
+    url: 'api/deploy/serverReduction',
+    method: 'post',
+    data
+  })
+}

+ 27 - 0
src/api/mnt/serverDeploy.js

@@ -0,0 +1,27 @@
+import request from '@/utils/request'
+
+export function add(data) {
+  return request({
+    url: 'api/serverDeploy',
+    method: 'post',
+    data
+  })
+}
+
+export function del(ids) {
+  return request({
+    url: 'api/serverDeploy',
+    method: 'delete',
+    data: ids
+  })
+}
+
+export function edit(data) {
+  return request({
+    url: 'api/serverDeploy',
+    method: 'put',
+    data
+  })
+}
+
+export default { add, edit, del }

+ 22 - 0
src/api/monitor/log.js

@@ -0,0 +1,22 @@
+import request from '@/utils/request'
+
+export function getErrDetail(id) {
+  return request({
+    url: 'api/logs/error/' + id,
+    method: 'get'
+  })
+}
+
+export function delAllError() {
+  return request({
+    url: 'api/logs/del/error',
+    method: 'delete'
+  })
+}
+
+export function delAllInfo() {
+  return request({
+    url: 'api/logs/del/info',
+    method: 'delete'
+  })
+}

+ 9 - 0
src/api/monitor/online.js

@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+export function del(keys) {
+  return request({
+    url: 'auth/online',
+    method: 'delete',
+    data: keys
+  })
+}

+ 15 - 0
src/api/system/code.js

@@ -0,0 +1,15 @@
+import request from '@/utils/request'
+
+export function resetEmail(data) {
+  return request({
+    url: 'api/code/resetEmail?email=' + data,
+    method: 'post'
+  })
+}
+
+export function updatePass(pass) {
+  return request({
+    url: 'api/users/updatePass/' + pass,
+    method: 'get'
+  })
+}

+ 44 - 0
src/api/system/dept.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+export function getDepts(params) {
+  return request({
+    url: 'api/dept',
+    method: 'get',
+    params
+  })
+}
+
+export function getDeptSuperior(ids) {
+  const data = ids.length || ids.length === 0 ? ids : Array.of(ids)
+  return request({
+    url: 'api/dept/superior',
+    method: 'post',
+    data
+  })
+}
+
+export function add(data) {
+  return request({
+    url: 'api/dept',
+    method: 'post',
+    data
+  })
+}
+
+export function del(ids) {
+  return request({
+    url: 'api/dept',
+    method: 'delete',
+    data: ids
+  })
+}
+
+export function edit(data) {
+  return request({
+    url: 'api/dept',
+    method: 'put',
+    data
+  })
+}
+
+export default { add, edit, del, getDepts, getDeptSuperior }

+ 34 - 0
src/api/system/dict.js

@@ -0,0 +1,34 @@
+import request from '@/utils/request'
+
+export function getDicts() {
+  return request({
+    url: 'api/dict/all',
+    method: 'get'
+  })
+}
+
+export function add(data) {
+  return request({
+    url: 'api/dict',
+    method: 'post',
+    data
+  })
+}
+
+export function del(ids) {
+  return request({
+    url: 'api/dict/',
+    method: 'delete',
+    data: ids
+  })
+}
+
+export function edit(data) {
+  return request({
+    url: 'api/dict',
+    method: 'put',
+    data
+  })
+}
+
+export default { add, edit, del }

+ 52 - 0
src/api/system/dictDetail.js

@@ -0,0 +1,52 @@
+import request from '@/utils/request'
+
+export function get(dictName) {
+  const params = {
+    dictName,
+    page: 0,
+    size: 9999
+  }
+  return request({
+    url: 'api/dictDetail',
+    method: 'get',
+    params
+  })
+}
+
+export function getDictMap(dictName) {
+  const params = {
+    dictName,
+    page: 0,
+    size: 9999
+  }
+  return request({
+    url: 'api/dictDetail/map',
+    method: 'get',
+    params
+  })
+}
+
+export function add(data) {
+  return request({
+    url: 'api/dictDetail',
+    method: 'post',
+    data
+  })
+}
+
+export function del(id) {
+  return request({
+    url: 'api/dictDetail/' + id,
+    method: 'delete'
+  })
+}
+
+export function edit(data) {
+  return request({
+    url: 'api/dictDetail',
+    method: 'put',
+    data
+  })
+}
+
+export default { add, edit, del }

+ 40 - 0
src/api/system/job.js

@@ -0,0 +1,40 @@
+import request from '@/utils/request'
+
+export function getAllJob() {
+  const params = {
+    page: 0,
+    size: 9999,
+    enabled: true
+  }
+  return request({
+    url: 'api/job',
+    method: 'get',
+    params
+  })
+}
+
+export function add(data) {
+  return request({
+    url: 'api/job',
+    method: 'post',
+    data
+  })
+}
+
+export function del(ids) {
+  return request({
+    url: 'api/job',
+    method: 'delete',
+    data: ids
+  })
+}
+
+export function edit(data) {
+  return request({
+    url: 'api/job',
+    method: 'put',
+    data
+  })
+}
+
+export default { add, edit, del }

+ 65 - 0
src/api/system/menu.js

@@ -0,0 +1,65 @@
+import request from '@/utils/request'
+
+export function getMenusTree(pid) {
+  return request({
+    url: 'api/menus/lazy?pid=' + pid,
+    method: 'get'
+  })
+}
+
+export function getMenus(params) {
+  return request({
+    url: 'api/menus',
+    method: 'get',
+    params
+  })
+}
+
+export function getMenuSuperior(ids) {
+  const data = Array.isArray(ids) || ids.length === 0 ? ids : Array.of(ids)
+  return request({
+    url: 'api/menus/superior',
+    method: 'post',
+    data
+  })
+}
+
+export function getChild(id) {
+  return request({
+    url: 'api/menus/child?id=' + id,
+    method: 'get'
+  })
+}
+
+export function buildMenus() {
+  return request({
+    url: 'api/menus/build',
+    method: 'get'
+  })
+}
+
+export function add(data) {
+  return request({
+    url: 'api/menus',
+    method: 'post',
+    data
+  })
+}
+
+export function del(ids) {
+  return request({
+    url: 'api/menus',
+    method: 'delete',
+    data: ids
+  })
+}
+
+export function edit(data) {
+  return request({
+    url: 'api/menus',
+    method: 'put',
+    data
+  })
+}
+
+export default { add, edit, del, getMenusTree, getMenuSuperior, getMenus, getChild }

+ 57 - 0
src/api/system/role.js

@@ -0,0 +1,57 @@
+import request from '@/utils/request'
+
+// 获取所有的Role
+export function getAll() {
+  return request({
+    url: 'api/roles/all',
+    method: 'get'
+  })
+}
+
+export function add(data) {
+  return request({
+    url: 'api/roles',
+    method: 'post',
+    data
+  })
+}
+
+export function get(id) {
+  return request({
+    url: 'api/roles/' + id,
+    method: 'get'
+  })
+}
+
+export function getLevel() {
+  return request({
+    url: 'api/roles/level',
+    method: 'get'
+  })
+}
+
+export function del(ids) {
+  return request({
+    url: 'api/roles',
+    method: 'delete',
+    data: ids
+  })
+}
+
+export function edit(data) {
+  return request({
+    url: 'api/roles',
+    method: 'put',
+    data
+  })
+}
+
+export function editMenu(data) {
+  return request({
+    url: 'api/roles/menu',
+    method: 'put',
+    data
+  })
+}
+
+export default { add, edit, del, get, editMenu, getLevel }

+ 41 - 0
src/api/system/timing.js

@@ -0,0 +1,41 @@
+import request from '@/utils/request'
+
+export function add(data) {
+  return request({
+    url: 'api/jobs',
+    method: 'post',
+    data
+  })
+}
+
+export function del(ids) {
+  return request({
+    url: 'api/jobs',
+    method: 'delete',
+    data: ids
+  })
+}
+
+export function edit(data) {
+  return request({
+    url: 'api/jobs',
+    method: 'put',
+    data
+  })
+}
+
+export function updateIsPause(id) {
+  return request({
+    url: 'api/jobs/' + id,
+    method: 'put'
+  })
+}
+
+export function execution(id) {
+  return request({
+    url: 'api/jobs/exec/' + id,
+    method: 'put'
+  })
+}
+
+export default { del, updateIsPause, execution, add, edit }

+ 61 - 0
src/api/system/user.js

@@ -0,0 +1,61 @@
+import request from '@/utils/request'
+import { encrypt } from '@/utils/rsaEncrypt'
+
+export function add(data) {
+  return request({
+    url: 'api/users',
+    method: 'post',
+    data
+  })
+}
+
+export function del(ids) {
+  return request({
+    url: 'api/users',
+    method: 'delete',
+    data: ids
+  })
+}
+
+export function edit(data) {
+  return request({
+    url: 'api/users',
+    method: 'put',
+    data
+  })
+}
+
+export function editUser(data) {
+  return request({
+    url: 'api/users/center',
+    method: 'put',
+    data
+  })
+}
+
+export function updatePass(user) {
+  const data = {
+    oldPass: encrypt(user.oldPass),
+    newPass: encrypt(user.newPass)
+  }
+  return request({
+    url: 'api/users/updatePass/',
+    method: 'post',
+    data
+  })
+}
+
+export function updateEmail(form) {
+  const data = {
+    password: encrypt(form.pass),
+    email: form.email
+  }
+  return request({
+    url: 'api/users/updateEmail/' + form.code,
+    method: 'post',
+    data
+  })
+}
+
+export default { add, edit, del }
+

+ 25 - 0
src/api/tools/alipay.js

@@ -0,0 +1,25 @@
+import request from '@/utils/request'
+
+export function get() {
+  return request({
+    url: 'api/aliPay',
+    method: 'get'
+  })
+}
+
+export function update(data) {
+  return request({
+    url: 'api/aliPay',
+    data,
+    method: 'put'
+  })
+}
+
+// 支付
+export function toAliPay(url, data) {
+  return request({
+    url: 'api/' + url,
+    data,
+    method: 'post'
+  })
+}

+ 24 - 0
src/api/tools/email.js

@@ -0,0 +1,24 @@
+import request from '@/utils/request'
+
+export function get() {
+  return request({
+    url: 'api/email',
+    method: 'get'
+  })
+}
+
+export function update(data) {
+  return request({
+    url: 'api/email',
+    data,
+    method: 'put'
+  })
+}
+
+export function send(data) {
+  return request({
+    url: 'api/email',
+    data,
+    method: 'post'
+  })
+}

+ 27 - 0
src/api/tools/localStorage.js

@@ -0,0 +1,27 @@
+import request from '@/utils/request'
+
+export function add(data) {
+  return request({
+    url: 'api/localStorage',
+    method: 'post',
+    data
+  })
+}
+
+export function del(ids) {
+  return request({
+    url: 'api/localStorage/',
+    method: 'delete',
+    data: ids
+  })
+}
+
+export function edit(data) {
+  return request({
+    url: 'api/localStorage',
+    method: 'put',
+    data
+  })
+}
+
+export default { add, edit, del }

+ 40 - 0
src/api/tools/qiniu.js

@@ -0,0 +1,40 @@
+import request from '@/utils/request'
+
+export function get() {
+  return request({
+    url: 'api/qiNiuContent/config',
+    method: 'get'
+  })
+}
+
+export function update(data) {
+  return request({
+    url: 'api/qiNiuContent/config',
+    data,
+    method: 'put'
+  })
+}
+
+export function download(id) {
+  return request({
+    url: 'api/qiNiuContent/download/' + id,
+    method: 'get'
+  })
+}
+
+export function sync() {
+  return request({
+    url: 'api/qiNiuContent/synchronize',
+    method: 'post'
+  })
+}
+
+export function del(ids) {
+  return request({
+    url: 'api/qiNiuContent',
+    method: 'delete',
+    data: ids
+  })
+}
+
+export default { del, download, sync }

BIN
src/assets/401_images/401.gif


BIN
src/assets/404_images/404.png


BIN
src/assets/404_images/404_cloud.png


+ 9 - 0
src/assets/icons/index.js

@@ -0,0 +1,9 @@
+import Vue from 'vue'
+import SvgIcon from '@/components/SvgIcon'// svg component
+
+// register globally
+Vue.component('svg-icon', SvgIcon)
+
+const req = require.context('./svg', false, /\.svg$/)
+const requireAll = requireContext => requireContext.keys().map(requireContext)
+requireAll(req)

File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/Steve-Jobs.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/alipay.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/anq.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/app.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/backup.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/chain.svg


+ 1 - 0
src/assets/icons/svg/chart.svg

@@ -0,0 +1 @@
+<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M0 54.857h36.571V128H0V54.857zM91.429 27.43H128V128H91.429V27.429zM45.714 0h36.572v128H45.714V0z"/></svg>

File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/codeConsole.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/dashboard.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/database.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/date.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/deploy.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/dept.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/dev.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/develop.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/dictionary.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/doc.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/download.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/edit.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/education.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/email.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/error.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/exit-fullscreen.svg


+ 1 - 0
src/assets/icons/svg/fullscreen.svg

@@ -0,0 +1 @@
+<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M38.47 52L52 38.462l-23.648-23.67L43.209 0H.035L0 43.137l14.757-14.865L38.47 52zm74.773 47.726L89.526 76 76 89.536l23.648 23.672L84.795 128h43.174L128 84.863l-14.757 14.863zM89.538 52l23.668-23.648L128 43.207V.038L84.866 0 99.73 14.76 76 38.472 89.538 52zM38.46 76L14.792 99.651 0 84.794v43.173l43.137.033-14.865-14.757L52 89.53 38.46 76z"/></svg>

File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/fwb.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/github.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/gonggao.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/icon.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/image.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/index.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/international.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/ipvisits.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/java.svg


+ 1 - 0
src/assets/icons/svg/link.svg

@@ -0,0 +1 @@
+<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M115.625 127.937H.063V12.375h57.781v12.374H12.438v90.813h90.813V70.156h12.374z"/><path d="M116.426 2.821l8.753 8.753-56.734 56.734-8.753-8.745z"/><path d="M127.893 37.982h-12.375V12.375H88.706V0h39.187z"/></svg>

File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/list.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/lock.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/log.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/login.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/markdown.svg


+ 1 - 0
src/assets/icons/svg/menu.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200" class="icon" p-id="2559" t="1545037285158" version="1.1" viewBox="0 0 1024 1024"><defs><style type="text/css"/></defs><path d="M96 128h832v192H96zM96 416h832v192H96zM96 704h832v192H96z" p-id="2560"/></svg>

File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/message.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/mnt.svg


+ 1 - 0
src/assets/icons/svg/money.svg

@@ -0,0 +1 @@
+<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M54.122 127.892v-28.68H7.513V87.274h46.609v-12.4H7.513v-12.86h38.003L.099 0h22.6l32.556 45.07c3.617 5.144 6.44 9.611 8.487 13.385 1.788-3.05 4.89-7.779 9.301-14.186L103.93 0h24.01L82.385 62.013h38.34v12.862h-46.41v12.4h46.41v11.937h-46.41v28.68H54.123z"/></svg>

File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/monitor.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/nested.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/password.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/people.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/peoples.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/permission.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/phone.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/qiniu.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/redis.svg


File diff suppressed because it is too large
+ 1 - 0
src/assets/icons/svg/role.svg


+ 0 - 0
src/assets/icons/svg/search.svg


Some files were not shown because too many files changed in this diff