pudongliang 5 лет назад
Сommit
04757c7834
100 измененных файлов с 2488 добавлено и 0 удалено
  1. 17 0
      .gitignore
  2. 201 0
      LICENSE
  3. 238 0
      README.md
  4. BIN
      assemble/plume-code-starter-0.0.1.jar
  5. BIN
      assemble/plume-code-starter-0.0.2.jar
  6. 34 0
      downloads/1627358514682/plume_code/portal/api/fnActivityImg.js
  7. 124 0
      downloads/1627358514682/plume_code/portal/src/views/fnActivityImg/FnActivityImgMain.vue
  8. 3 0
      downloads/1627358514682/plume_code/portal/src/views/fnActivityImg/index.js
  9. 23 0
      downloads/1627358514682/plume_code/portal/src/views/fnActivityImg/object.js
  10. 42 0
      downloads/1627358514682/plume_code/src/main/java/com/plume/code/admin/controller/FnActivityImgController.java
  11. 44 0
      downloads/1627358514682/plume_code/src/main/java/com/plume/code/admin/controller/query/FnActivityImgQuery.java
  12. 42 0
      downloads/1627358514682/plume_code/src/main/java/com/plume/code/admin/controller/vo/FnActivityImgVO.java
  13. 12 0
      downloads/1627358514682/plume_code/src/main/java/com/plume/code/repository/FnActivityImgRepository.java
  14. 42 0
      downloads/1627358514682/plume_code/src/main/java/com/plume/code/service/dto/FnActivityImgDTO.java
  15. BIN
      image/0.png
  16. BIN
      image/1.png
  17. BIN
      image/10.png
  18. BIN
      image/11.png
  19. BIN
      image/12.png
  20. BIN
      image/2.png
  21. BIN
      image/3.png
  22. BIN
      image/4.png
  23. BIN
      image/5.png
  24. BIN
      image/6.png
  25. BIN
      image/7.png
  26. BIN
      libs/ojdbc8-19.11.0.0.jar
  27. 310 0
      mvnw
  28. 2 0
      plume-code-portal/.browserslistrc
  29. 5 0
      plume-code-portal/.editorconfig
  30. 17 0
      plume-code-portal/.env
  31. 6 0
      plume-code-portal/.env.development
  32. 13 0
      plume-code-portal/.env.preview
  33. 14 0
      plume-code-portal/.eslintignore
  34. 28 0
      plume-code-portal/.eslintrc.js
  35. 11 0
      plume-code-portal/.github/ISSUE_TEMPLATE/bug.md
  36. 11 0
      plume-code-portal/.github/ISSUE_TEMPLATE/demo.md
  37. 11 0
      plume-code-portal/.github/ISSUE_TEMPLATE/display.md
  38. 11 0
      plume-code-portal/.github/ISSUE_TEMPLATE/doc.md
  39. 11 0
      plume-code-portal/.github/ISSUE_TEMPLATE/feature.md
  40. 11 0
      plume-code-portal/.github/ISSUE_TEMPLATE/other.md
  41. 11 0
      plume-code-portal/.github/ISSUE_TEMPLATE/question.md
  42. 11 0
      plume-code-portal/.github/ISSUE_TEMPLATE/update.md
  43. 113 0
      plume-code-portal/.github/workflows/deploy.yml
  44. 17 0
      plume-code-portal/.github/workflows/star.yml
  45. 21 0
      plume-code-portal/.gitignore
  46. 5 0
      plume-code-portal/.postcssrc.js
  47. 21 0
      plume-code-portal/LICENSE
  48. 24 0
      plume-code-portal/README.md
  49. 26 0
      plume-code-portal/README.zh.md
  50. 7 0
      plume-code-portal/babel.config.js
  51. 165 0
      plume-code-portal/d2-admin.babel
  52. 2 0
      plume-code-portal/dependencies-cdn.js
  53. 3 0
      plume-code-portal/jest.config.js
  54. 11 0
      plume-code-portal/jsconfig.json
  55. 75 0
      plume-code-portal/package.json
  56. 21 0
      plume-code-portal/pom.xml
  57. BIN
      plume-code-portal/public/icon.ico
  58. BIN
      plume-code-portal/public/icon.png
  59. BIN
      plume-code-portal/public/image/baidu-pan-logo.png
  60. 6 0
      plume-code-portal/public/image/loading/loading-spin.svg
  61. BIN
      plume-code-portal/public/image/logo.png
  62. BIN
      plume-code-portal/public/image/logo/d2.png
  63. 8 0
      plume-code-portal/public/image/logo/elementui.svg
  64. 45 0
      plume-code-portal/public/image/logo/iview.svg
  65. BIN
      plume-code-portal/public/image/logo/lombok.png
  66. 128 0
      plume-code-portal/public/image/logo/mybatis-plus.svg
  67. BIN
      plume-code-portal/public/image/logo/mybatis.jpg
  68. BIN
      plume-code-portal/public/image/logo/spring.png
  69. BIN
      plume-code-portal/public/image/logo/swagger.png
  70. BIN
      plume-code-portal/public/image/theme/chester/logo/all.png
  71. BIN
      plume-code-portal/public/image/theme/chester/logo/icon-only.png
  72. BIN
      plume-code-portal/public/image/theme/chester/preview@2x.png
  73. BIN
      plume-code-portal/public/image/theme/d2/logo/all.png
  74. BIN
      plume-code-portal/public/image/theme/d2/logo/icon-only.png
  75. BIN
      plume-code-portal/public/image/theme/d2/preview@2x.png
  76. BIN
      plume-code-portal/public/image/theme/element/logo/all.png
  77. BIN
      plume-code-portal/public/image/theme/element/logo/icon-only.png
  78. BIN
      plume-code-portal/public/image/theme/element/preview@2x.png
  79. BIN
      plume-code-portal/public/image/theme/line/bg.jpg
  80. BIN
      plume-code-portal/public/image/theme/line/logo/all.png
  81. BIN
      plume-code-portal/public/image/theme/line/logo/icon-only.png
  82. BIN
      plume-code-portal/public/image/theme/line/preview@2x.png
  83. BIN
      plume-code-portal/public/image/theme/star/bg.jpg
  84. BIN
      plume-code-portal/public/image/theme/star/logo/all.png
  85. BIN
      plume-code-portal/public/image/theme/star/logo/icon-only.png
  86. BIN
      plume-code-portal/public/image/theme/star/preview@2x.png
  87. BIN
      plume-code-portal/public/image/theme/tomorrow-night-blue/logo/all.png
  88. BIN
      plume-code-portal/public/image/theme/tomorrow-night-blue/logo/icon-only.png
  89. BIN
      plume-code-portal/public/image/theme/tomorrow-night-blue/preview@2x.png
  90. BIN
      plume-code-portal/public/image/theme/violet/logo/all.png
  91. BIN
      plume-code-portal/public/image/theme/violet/logo/icon-only.png
  92. BIN
      plume-code-portal/public/image/theme/violet/preview@2x.png
  93. 55 0
      plume-code-portal/public/index.html
  94. 154 0
      plume-code-portal/src/App.vue
  95. 17 0
      plume-code-portal/src/api/index.js
  96. 16 0
      plume-code-portal/src/api/modules/database.api.js
  97. 24 0
      plume-code-portal/src/api/modules/generator.api.js
  98. 31 0
      plume-code-portal/src/api/modules/sys.user.api.js
  99. 102 0
      plume-code-portal/src/api/service.js
  100. 86 0
      plume-code-portal/src/api/tools.js

+ 17 - 0
.gitignore

@@ -0,0 +1,17 @@
+### IntelliJ IDEA ###
+*.iws
+*.iml
+*.ipr
+*.class
+*.log
+*.gz
+*/target/
+*/node_modules/
+*/dist/
+/.idea/
+/logs/
+**/web/
+*/downloads/
+
+package-lock.json
+yarn.lock

+ 201 - 0
LICENSE

@@ -0,0 +1,201 @@
+                                 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:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) 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
+
+      (d) 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 [yyyy] [name of copyright owner]
+
+   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.

+ 238 - 0
README.md

@@ -0,0 +1,238 @@
+<p align="center">
+    <h3 align="center">Plume-Code</h3>
+    <div align="center">
+        <a href='https://gitee.com/yansheng/plume-code/stargazers'><img src='https://gitee.com/yansheng/plume-code/badge/star.svg?theme=dark' alt='star'></img></a>
+        <a href='https://gitee.com/yansheng/plume-code/members'><img src='https://gitee.com/yansheng/plume-code/badge/fork.svg?theme=dark' alt='fork'></img></a>
+    </div>
+</p>
+<p align="center">
+        一个简单易用且功能强大的代码生成器(Java & ElementUI),熟练使用你就是CURD代码挖掘机!!!
+</p>
+
+     ⭐⭐⭐新项目,需要大家的支持,欢迎Star、PR、Issue⭐⭐⭐  
+
+PlumeCode 不仅简单、而且强大
+
+- 支持多数据库Mysql、H2、SqlServer、Oracle、PostgreSQL
+- 支持多种持久层框架MybatisPlus、Mybatis、Jpa、tk-Mybatis、Hibernate
+- 一键下载拥有portal、controller、service、repository、mapper、dto、entity、vo、query、mapper.xml等前后端代码
+- 良好的项目结构,让二次开发变得像喝水一样简单
+
+## 快速开始
+
+### 下载文件
+- 发行版[下载](https://gitee.com/yansheng/plume-code/releases/0.0.2)  
+
+### 启动项目
+`java -jar plume-code-starter-0.0.2.jar`
+![start](/image/0.png)
+
+### 功能简介
+
+- 打开网页
+  http://localhost:8844/web/index.html
+- 数据库配置
+  ![start](/image/1.png)
+  ![database](/image/3.png)
+- 生成代码
+  ![generator](/image/2.png)
+- 代码预览
+  ![preview](/image/4.png)
+
+## 生成代码示例
+[plume-code-sample](https://gitee.com/yansheng/plume-code-sample)
+
+## 联系交流
+
+- QQ群:691455148
+
+## 测试地址
+
+- DEMO演示:[http://42.192.14.60:8844/web/index.html](http://42.192.14.60:8844/web/index.html)
+
+## 生成代码结构
+
+### 后端框架
+对于java后端项目框架设计,目前主要有两种:  
+- 面向领域(DDD)
+- 面向数据(三层框架)  
+
+一般而言互联网后端C端业务并不复杂(相对B端或企业级项目),且通常也做了微服务,业务边界划分良好的话,DDD并不是一个好的选择,所以本项目基于三层框架生成后端代码  
+- controller层(controller、vo、query)
+- servicer层(service、serviceImpl、dto)
+- repository层(repository/mapper/dao、repositoryImpl/daoImpl、entity)  
+
+下面是我常用的系统分层设计(参考自阿里巴巴代码规约)  
+![project layer](/image/6.png)  
+以及我常用的包结构设计  
+![package](/image/7.png)  
+**以上都是个人理解,对于系统设计,没有银弹,适合的,符合场景的实践才是好的**
+
+
+### 前端框架
+由于前端代码公司间差异比较大,这里只是做了ElementUI的示例,如有需要,可根据实际前端技术选型,做二次开发集成  
+- [d2admin](https://d2.pub/zh/)
+- [element-ui](https://element.eleme.cn/2.15/#/zh-CN)
+
+
+## 项目结构
+
+ ![framework](/image/5.png)
+
+
+## 二开说明
+
+### 新增数据库
+
+项目本身是基于JDBC获取数据库信息,数据库需要有JDBC实现
+
+获取数据信息有两种方式
+
+- 通过JDBC Connection 获取DatabaseMetaData,从而获取数据库、表、字段、主键信息(推荐),只需要继承MetaDataDatabaseBehavior,且提供一个获取数据库名称的SQL即可
+- 通过JDBC执行Raw SQL获取数据库、表、字段、主键信息
+
+![database behavior class](/image/10.png)
+
+Sample:新增PostgreSQL
+
+```java
+@Component
+@Scope(value = "prototype")
+public class PostgreSQLDatabaseBehavior extends MetaDataDatabaseBehavior {
+
+    @Override
+    protected String getDatabaseNameSql() {
+        return "SELECT current_database();";
+    }
+}
+```
+
+### 新增模板
+![tempalte behavior class](/image/11.png)
+默认使用Velocity模板引擎、FreeMarker可选  
+新增模板文件  
+![template file](/image/12.png)
+
+新增后端java、xml模板实现类,继承JavaGeneratorBehavior类
+```java
+@Component
+@Scope("prototype")
+class JpaControllerGeneratorBehavior extends JavaGeneratorBehavior {
+	
+    //获取模板文件名
+    @Override
+    protected String getTemplateName() {
+        return "Jpa-Controller.java.tpl";
+    }
+	
+    //获取文件包名(也是文件相对路径)
+    @Override
+    protected String getPackageName() {
+        return settingModel.getBasePackageName().concat(".admin.controller");
+    }
+
+    //获取文件名
+    @Override
+    protected String getFileName() {
+        return String.format("%sController.java", upperFirstCase(classModel.getName()));
+    }
+}
+```
+
+
+
+新增前端js、vue模板实现类,继承VueGeneratorBehavior类
+```java
+@Component
+@Scope("prototype")
+public class ElementUiTableGeneratorBehavior extends VueGeneratorBehavior {
+    //文件路径在基类中已经实现,如有调整需要重写父类getFilePath方法
+    
+    //获取文件名
+    @Override
+    protected String getFileName() {
+        return "Table.vue";
+    }
+	
+    //获取模板文件名
+    @Override
+    protected String getTemplateName() {
+        return "ElementUi-Table.vue.tpl";
+    }
+}
+```
+
+### 模板上下文变量
+
+```java
+protected Map<String, Object> getTemplateContext() {
+    Map<String, Object> templateContext = new HashMap<>(32);
+
+    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+    templateContext.put("setting", settingModel);
+    templateContext.put("createTime", simpleDateFormat.format(new Date()));
+    templateContext.put("className", classModel.getName());
+    templateContext.put("ClassName", upperFirstCase(classModel.getName()));
+    templateContext.put("tableName", classModel.getTableName());
+    templateContext.put("author", settingModel.getAuthor());
+    templateContext.put("comment", classModel.getComment());
+    templateContext.put("lombok", settingModel.getLombokState());
+    templateContext.put("fieldModelList", fieldModelList);
+    templateContext.put("isMultiplePK", fieldModelList.stream().filter(FieldModel::isPk).count() > 1);
+    templateContext.put("primaryKeyList", fieldModelList.stream().filter(FieldModel::isPk).collect(Collectors.toList()));
+
+    return templateContext;
+}
+```
+
+如果有额外的变量,可以在模板实现类中重写基类getTemplateContext方法
+
+```java
+@Override
+protected Map<String, Object> getTemplateContext() {
+    Map<String, Object> templateContext = super.getTemplateContext();
+
+    templateContext.put("basePackageName", settingModel.getBasePackageName());
+    templateContext.put("packageName", getPackageName());
+
+    String servicePackageName = settingModel.getBasePackageName().concat(".service");
+    templateContext.put("servicePackageName", servicePackageName);
+
+    templateContext.put("typePackageNameList", getTypePackageNameList());
+    return templateContext;
+}
+```
+
+### 修改portal页面
+
+略
+
+## Road Map
+
+### 0.0.1 version
+
+- 支持 mysql、h2 --done
+- 支持 element-ui --done
+- 支持mybatis、mybatis-plus、jpa --done
+- 支持预览代码、获取代码 --done
+
+### 0.0.2 version
+
+- 支持联合主键 --done
+- 支持sqlserver、oracle、PostgreSQL --done
+- 支持hibernate、tk-Mybatis --done
+- 支持Query 后缀配置   --done
+- 支持VO 后缀配置  --done
+- 支持DTO后缀配置  --done
+- 支持Entity后缀配置   --done
+
+### 0.0.3 version
+- 支持包路径修改
+- 基于xml(dtd)配置执行
+- 用户自定义配置文件
+
+### 0.0.4 version
+
+- 支持docker部署(部署plume-code)
+- 支持docker compose 部署(含所有数据库类型)
+

BIN
assemble/plume-code-starter-0.0.1.jar


BIN
assemble/plume-code-starter-0.0.2.jar


+ 34 - 0
downloads/1627358514682/plume_code/portal/api/fnActivityImg.js

@@ -0,0 +1,34 @@
+import request from '@/plugin/axios'
+
+export function Page (data) {
+  return request({
+    url: '/admin/fnActivityImg/page',
+    method: 'POST',
+    data
+  })
+}
+
+export function Add (data) {
+  return request({
+    url: '/admin/fnActivityImg/save',
+    method: 'POST',
+    data
+  })
+}
+
+export function Update (data) {
+  return request({
+    url: '/admin/fnActivityImg/update',
+    method: 'POST',
+    data
+  })
+}
+
+export function Delete (data) {
+  return request({
+    url: '/admin/fnActivityImg/delete',
+    method: 'POST',
+    data
+  })
+}
+

+ 124 - 0
downloads/1627358514682/plume_code/portal/src/views/fnActivityImg/FnActivityImgMain.vue

@@ -0,0 +1,124 @@
+<template>
+  <div>
+    <Search ref="search" />
+    <el-row style="text-align: left">
+      <el-button @click="showAdd">新 增</el-button>
+    </el-row>
+    <div class="table-container">
+        <el-table stripe border :data="data" v-loading="loading" highlight-current-row>
+            <el-table-column prop="id" label="ID" width="300" align="center"/>
+            <el-table-column prop="name" label="名称" width="300" align="center"/>
+            <el-table-column prop="bgImg" label="背景图片" width="300" align="center"/>
+            <el-table-column prop="isValid" label="是否有效:0-无效,1-有效" width="300" align="center"/>
+            <el-table-column prop="createTime" label="创建时间" width="300" align="center"/>
+            <el-table-column label="操作" width="100">
+            <template slot-scope="{row}">
+              <el-button @click="handleShowEdit(row)" type="text" size="small">编辑</el-button>
+              <el-button @click="deleteRow(row)" type="text" size="small">删除</el-button>
+            </template>
+        </el-table-column>
+    </el-table>
+  </div>
+  <div class="page-container">
+    <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="pageInfo.pageIndex"
+        :page-sizes="[10, 20, 30]"
+        :page-size="pageInfo.pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="pageInfo.total">
+    </el-pagination>
+  </div>
+  <OptionDialog ref="dialog"/>
+  </div>
+</template>
+
+
+<script>
+import Search from './Search'
+import OptionDialog from './OptionDialog'
+import {FnActivityImgEnt} from "./object";
+import {
+  Page,
+  Delete,
+} from '@/api/fnActivityImg'
+export default {
+  name: "fnActivityImg",
+  components: {Search, OptionDialog},
+  provide: function () {
+    return {
+      loadData: this.loadData,
+      showEdit: this.showEdit
+    }
+  },
+  data() {
+    return {
+      loading: false,
+      data: [],
+      pageInfo: {
+        page: 1,
+        limit: 10,
+        total: 0
+      }
+    }
+  },
+  methods: {
+    loadData(firstPage = false, searchForm) {
+      firstPage && (this.pageInfo.pageIndex = 1)
+      const searchForm = this.$refs.search.getSearchForm()
+      let req = {...searchForm, ...this.pageInfo}
+      this.doLoadData(req)
+    },
+    doLoadData(req) {
+      this.loading = true
+      Page(req).then(res => {
+        this.data = res.data.records
+        this.pageInfo.total = res.data.total
+        this.loading = false
+      })
+    },
+    deleteRow(row) {
+      this.$confirm('确定删除, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        Delete({id: row.id}).then(res => {
+          this.$message({
+            message: '删除成功',
+            type: 'success'
+          })
+          this.loadData()
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        })
+      })
+    },
+    handleSizeChange(v) {
+      this.pageInfo.pageSize = v
+      this.loadData()
+    },
+    handleCurrentChange(v) {
+      this.pageInfo.pageIndex = v
+      this.loadData()
+    },
+    handleShowEdit(row) {
+      this.showEdit({...row})
+    },
+    showEdit(row) {
+      this.$refs.dialog.show(true, {...row})
+    },
+    showAdd() {
+      this.$refs.dialog.show(false, new FnActivityImgEnt())
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 3 - 0
downloads/1627358514682/plume_code/portal/src/views/fnActivityImg/index.js

@@ -0,0 +1,3 @@
+import FnActivityImg from './FnActivityImgMain.vue'
+
+export default FnActivityImg

+ 23 - 0
downloads/1627358514682/plume_code/portal/src/views/fnActivityImg/object.js

@@ -0,0 +1,23 @@
+export let searchForm = {
+    id : null,
+    name : null,
+    bgImg : null,
+    isValid : null,
+    createTime : null,
+}
+
+export class FnActivityImgEnt {
+    id
+    name
+    bgImg
+    isValid
+    createTime
+}
+
+export let formRules = {
+    id: [{required: true, message: '请填写ID', trigger: 'change'}],
+    name: [{required: true, message: '请填写名称', trigger: 'change'}],
+    bgImg: [{required: true, message: '请填写背景图片', trigger: 'change'}],
+    isValid: [{required: true, message: '请填写是否有效:0-无效,1-有效', trigger: 'change'}],
+    createTime: [{required: true, message: '请填写创建时间', trigger: 'change'}],
+}

+ 42 - 0
downloads/1627358514682/plume_code/src/main/java/com/plume/code/admin/controller/FnActivityImgController.java

@@ -0,0 +1,42 @@
+package com.plume.code.admin.controller;
+
+import com.plume.code.admin.controller.query.FnActivityImgQuery;
+import com.plume.code.repository.entity.FnActivityImgENT;
+import com.plume.code.repository.FnActivityImgRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @description: 活动页背景素材
+ * @author: plume-code
+ * @date: 2021-07-27 12:01:55
+ **/
+@RestController
+@RequestMapping("/admin/fnActivityImg/")
+public class FnActivityImgController {
+    @Autowired
+    private FnActivityImgService fnActivityImgService;
+    @Autowired
+    private FnActivityImgRepository fnActivityImgRepository;
+
+    @PostMapping("page")
+    public Page<FnActivityImgENT> page(@RequestBody FnActivityImgQuery query) {
+      return fnActivityImgService.page(query);
+    }
+
+    @PostMapping(value = "save")
+    public void save(@RequestBody FnActivityImgENT ent) {
+        fnActivityImgRepository.save(ent);
+    }
+
+    @PostMapping(value = "update")
+    public void update(@RequestBody FnActivityImgENT ent) {
+        fnActivityImgRepository.save(ent);
+    }
+
+    @PostMapping(value = "delete")
+    public void delete(@RequestBody FnActivityImgENT ent) {
+        fnActivityImgRepository.delete(id);
+    }
+}

+ 44 - 0
downloads/1627358514682/plume_code/src/main/java/com/plume/code/admin/controller/query/FnActivityImgQuery.java

@@ -0,0 +1,44 @@
+package com.plume.code.admin.controller.query;
+
+import java.util.Date;
+
+import java.io.Serializable;
+import lombok.Data;
+/**
+ * @description: 活动页背景素材
+ * @author: plume-code
+ * @date: 2021-07-27 12:01:55
+ **/
+@Data
+public class FnActivityImgQuery implements Serializable {
+    protected Integer pageIndex = 1;
+    protected Integer pageSize = 10;
+
+    /**
+     * comment:ID
+     */
+    private Long id;
+
+    /**
+     * comment:名称
+     */
+    private String name;
+
+    /**
+     * comment:背景图片
+     */
+    private String bgImg;
+
+    /**
+     * comment:是否有效:0-无效,1-有效
+     */
+    private Integer isValid;
+
+    /**
+     * comment:创建时间
+     */
+    private Date createTime;
+
+
+}
+

+ 42 - 0
downloads/1627358514682/plume_code/src/main/java/com/plume/code/admin/controller/vo/FnActivityImgVO.java

@@ -0,0 +1,42 @@
+package com.plume.code.admin.controller.vo;
+
+import java.util.Date;
+
+import java.io.Serializable;
+import lombok.Data;
+/**
+ * @description: 活动页背景素材
+ * @author: plume-code
+ * @date: 2021-07-27 12:01:55
+ **/
+@Data
+public class FnActivityImgVO implements Serializable {
+
+    /**
+     * comment:ID
+     */
+    private Long id;
+
+    /**
+     * comment:名称
+     */
+    private String name;
+
+    /**
+     * comment:背景图片
+     */
+    private String bgImg;
+
+    /**
+     * comment:是否有效:0-无效,1-有效
+     */
+    private Integer isValid;
+
+    /**
+     * comment:创建时间
+     */
+    private Date createTime;
+
+
+}
+

+ 12 - 0
downloads/1627358514682/plume_code/src/main/java/com/plume/code/repository/FnActivityImgRepository.java

@@ -0,0 +1,12 @@
+package com.plume.code.repository;
+
+import com.plume.code.repository.entity.FnActivityImgENT;
+import org.springframework.data.jpa.repository.JpaRepository;
+/**
+ * @description: 活动页背景素材
+ * @author: plume-code
+ * @date: 2021-07-27 12:01:55
+ **/
+public interface FnActivityImgRepository extends JpaRepository<FnActivityImgENT, Long> {
+
+}

+ 42 - 0
downloads/1627358514682/plume_code/src/main/java/com/plume/code/service/dto/FnActivityImgDTO.java

@@ -0,0 +1,42 @@
+package com.plume.code.service.dto;
+
+import java.util.Date;
+
+import java.io.Serializable;
+import lombok.Data;
+/**
+ * @description: 活动页背景素材
+ * @author: plume-code
+ * @date: 2021-07-27 12:01:55
+ **/
+@Data
+public class FnActivityImgDTO implements Serializable {
+
+    /**
+     * comment:ID
+     */
+    private Long id;
+
+    /**
+     * comment:名称
+     */
+    private String name;
+
+    /**
+     * comment:背景图片
+     */
+    private String bgImg;
+
+    /**
+     * comment:是否有效:0-无效,1-有效
+     */
+    private Integer isValid;
+
+    /**
+     * comment:创建时间
+     */
+    private Date createTime;
+
+
+}
+












BIN
libs/ojdbc8-19.11.0.0.jar


+ 310 - 0
mvnw

@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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
+#
+#    https://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.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="`which javac`"
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=`which readlink`
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+      if $darwin ; then
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+      else
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+      fi
+      javaHome="`dirname \"$javaExecutable\"`"
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`which java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=`cd "$wdir/.."; pwd`
+    fi
+    # end of workaround
+  done
+  echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
+    fi
+else
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+    fi
+    if [ -n "$MVNW_REPOURL" ]; then
+      jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    else
+      jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    fi
+    while IFS="=" read key value; do
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+      esac
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Downloading from: $jarUrl"
+    fi
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+    if $cygwin; then
+      wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+    fi
+
+    if command -v wget > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found wget ... using wget"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            wget "$jarUrl" -O "$wrapperJarPath"
+        else
+            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+        fi
+    elif command -v curl > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found curl ... using curl"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            curl -o "$wrapperJarPath" "$jarUrl" -f
+        else
+            curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+        fi
+
+    else
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Falling back to using Java to download"
+        fi
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+        # For Cygwin, switch paths to Windows format before running javac
+        if $cygwin; then
+          javaClass=`cygpath --path --windows "$javaClass"`
+        fi
+        if [ -e "$javaClass" ]; then
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Compiling MavenWrapperDownloader.java ..."
+                fi
+                # Compiling the Java class
+                ("$JAVA_HOME/bin/javac" "$javaClass")
+            fi
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                # Running the downloader
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Running MavenWrapperDownloader.java ..."
+                fi
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+            fi
+        fi
+    fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 2 - 0
plume-code-portal/.browserslistrc

@@ -0,0 +1,2 @@
+> 1%
+last 2 versions

+ 5 - 0
plume-code-portal/.editorconfig

@@ -0,0 +1,5 @@
+[*.{js,jsx,ts,tsx,vue}]
+indent_style = space
+indent_size = 2
+trim_trailing_whitespace = true
+insert_final_newline = true

+ 17 - 0
plume-code-portal/.env

@@ -0,0 +1,17 @@
+# 所有环境默认
+
+# 页面 title 前缀
+VUE_APP_TITLE=Plume Code
+
+# 网络请求公用地址
+VUE_APP_API=/
+VUE_APP_PUBLIC_PATH=/
+# 仓库地址
+VUE_APP_REPO=https://github.com/d2-projects/d2-admin-start-kit
+
+# 国际化配置
+VUE_APP_I18N_LOCALE=zh-chs
+VUE_APP_I18N_FALLBACK_LOCALE=en
+
+# element 颜色
+VUE_APP_ELEMENT_COLOR=#409EFF

+ 6 - 0
plume-code-portal/.env.development

@@ -0,0 +1,6 @@
+# 开发环境
+
+# 页面 title 前缀
+VUE_APP_TITLE=Plume Code
+#VUE_APP_API=http://localhost.qa.yourdomain.cn:8844/
+VUE_APP_API=http://127.0.0.1:8844/

+ 13 - 0
plume-code-portal/.env.preview

@@ -0,0 +1,13 @@
+# 构建预览页面
+
+# 指定构建模式
+NODE_ENV=production
+
+# 标记当前构建方式
+VUE_APP_BUILD_MODE=PREVIEW
+
+# 显示源码按钮
+VUE_APP_SCOURCE_LINK=TRUE
+
+# 部署路径
+VUE_APP_PUBLIC_PATH=/

+ 14 - 0
plume-code-portal/.eslintignore

@@ -0,0 +1,14 @@
+# 忽略目录
+build/
+tests/
+node_modules/
+
+# D2CRUD 演示
+src/views/demo/d2-crud/
+
+# node 覆盖率文件
+coverage/
+
+# 忽略文件
+**/*-min.js
+**/*.min.js

+ 28 - 0
plume-code-portal/.eslintrc.js

@@ -0,0 +1,28 @@
+module.exports = {
+  root: true,
+  env: {
+    node: true
+  },
+  'extends': [
+    'plugin:vue/essential',
+    '@vue/standard'
+  ],
+  rules: {
+    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
+    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
+  },
+  parserOptions: {
+    parser: 'babel-eslint'
+  },
+  overrides: [
+    {
+      files: [
+        '**/__tests__/*.{j,t}s?(x)',
+        '**/tests/unit/**/*.spec.{j,t}s?(x)'
+      ],
+      env: {
+        jest: true
+      }
+    }
+  ]
+}

+ 11 - 0
plume-code-portal/.github/ISSUE_TEMPLATE/bug.md

@@ -0,0 +1,11 @@
+---
+name: "👾 BUG"
+about: 代码错误
+---
+
+```
+为了统一格式,请将下面一行复制到 `Title` 栏,然后删除这部分
+👾 BUG | 你的标题
+```
+
+如果需要,在这里描述具体内容

+ 11 - 0
plume-code-portal/.github/ISSUE_TEMPLATE/demo.md

@@ -0,0 +1,11 @@
+---
+name: "🎮 示例相关"
+about: 增加或者完善示例
+---
+
+```
+为了统一格式,请将下面一行复制到 `Title` 栏,然后删除这部分
+🎮 示例相关 | 你的标题
+```
+
+如果需要,在这里描述具体内容

+ 11 - 0
plume-code-portal/.github/ISSUE_TEMPLATE/display.md

@@ -0,0 +1,11 @@
+---
+name: "🌈 显示优化"
+about: 显示方面调整
+---
+
+```
+为了统一格式,请将下面一行复制到 `Title` 栏,然后删除这部分
+🌈 显示优化 | 你的标题
+```
+
+如果需要,在这里描述具体内容

+ 11 - 0
plume-code-portal/.github/ISSUE_TEMPLATE/doc.md

@@ -0,0 +1,11 @@
+---
+name: "📔 文档相关"
+about: 更新或者新增文档内容
+---
+
+```
+为了统一格式,请将下面一行复制到 `Title` 栏,然后删除这部分
+📔 文档相关 | 你的标题
+```
+
+如果需要,在这里描述具体内容

+ 11 - 0
plume-code-portal/.github/ISSUE_TEMPLATE/feature.md

@@ -0,0 +1,11 @@
+---
+name: "🔩 功能开发"
+about: 开发新的功能
+---
+
+```
+为了统一格式,请将下面一行复制到 `Title` 栏,然后删除这部分
+🔩 功能开发 | 你的标题
+```
+
+如果需要,在这里描述具体内容

+ 11 - 0
plume-code-portal/.github/ISSUE_TEMPLATE/other.md

@@ -0,0 +1,11 @@
+---
+name: "🖐 其它问题"
+about: 其它类型的 issue 请使用该模板
+---
+
+```
+为了统一格式,请将下面一行复制到 `Title` 栏,然后删除这部分
+🖐 其它问题 | 你的标题
+```
+
+如果需要,在这里描述具体内容

+ 11 - 0
plume-code-portal/.github/ISSUE_TEMPLATE/question.md

@@ -0,0 +1,11 @@
+---
+name: "🤔 提问"
+about: 提出使用方面的问题
+---
+
+```
+为了统一格式,请将下面一行复制到 `Title` 栏,然后删除这部分
+🤔 提问 | 你的标题
+```
+
+如果需要,在这里描述具体内容

+ 11 - 0
plume-code-portal/.github/ISSUE_TEMPLATE/update.md

@@ -0,0 +1,11 @@
+---
+name: "⚙ 功能升级"
+about: 升级某个功能
+---
+
+```
+为了统一格式,请将下面一行复制到 `Title` 栏,然后删除这部分
+⚙ 功能升级 | 你的标题
+```
+
+如果需要,在这里描述具体内容

+ 113 - 0
plume-code-portal/.github/workflows/deploy.yml

@@ -0,0 +1,113 @@
+name: Deploy preview
+
+on:
+  push:
+    branches:
+      - master
+
+jobs:
+
+  cdn:
+    name: CDN
+    if: "! contains(github.event.head_commit.message, '[skip ci]')"
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v1
+    - uses: bahmutov/npm-install@v1
+    - name: Set vue cli env
+      shell: bash
+      run: |
+        echo -e "\
+        VUE_APP_PUBLIC_PATH=/d2-admin-start-kit/preview/\
+        " > .env.preview.local
+        cat .env.preview.local | while read line
+        do
+          echo $line
+        done
+    - name: Build
+      run: yarn build:preview --report
+    - name: Setup qshell
+      uses: foxundermoon/setup-qshell@v1
+      env:
+        ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
+      with:
+        qshell-version: '2.4.0'
+    - name: Test qshell
+      run: qshell version
+    - name: Login
+      run: qshell account ${{ secrets.AK }} ${{ secrets.SK }} GITHUB_ACTION
+    - name: CDN upload
+      run: |
+        qshell qupload2 \
+        --src-dir=$GITHUB_WORKSPACE/dist \
+        --bucket=d2-cdn \
+        --key-prefix=${GITHUB_REPOSITORY//*\//}/preview/ \
+        --overwrite=true \
+        --check-exists=true \
+        --check-hash=true \
+        --check-size=true \
+        --rescan-local=true \
+        --thread-count=32
+    - name: CDN refresh
+      run: |
+        echo "https://cdn.d2.pub/${GITHUB_REPOSITORY//*\//}/preview/" > cdnrefresh.txt
+        qshell cdnrefresh --dirs -i ./cdnrefresh.txt
+  
+  ftp:
+    name: FTP
+    if: "! contains(github.event.head_commit.message, '[skip ci]')"
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v1
+    - uses: bahmutov/npm-install@v1
+    - name: Set vue cli env
+      shell: bash
+      run: |
+        echo -e "\
+        VUE_APP_PUBLIC_PATH=/d2-admin-start-kit/preview/\
+        " > .env.preview.local
+        cat .env.preview.local | while read line
+        do
+          echo $line
+        done
+    - name: Build
+      run: yarn build:preview --report
+    - name: Deploy
+      uses: SamKirkland/FTP-Deploy-Action@2.0.0
+      env:
+        FTP_SERVER: ${{ secrets.FTP_SERVER }}
+        FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
+        FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
+        METHOD: sftp
+        PORT: ${{ secrets.FTP_PORT }}
+        LOCAL_DIR: dist
+        REMOTE_DIR: /www/d2-admin-start-kit/preview
+        ARGS: --delete --verbose --parallel=100
+  
+  gh-pages:
+    name: Github Pages
+    if: "! contains(github.event.head_commit.message, '[skip ci]')"
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v1
+    - uses: bahmutov/npm-install@v1
+    - name: Set vue cli env
+      shell: bash
+      run: |
+        echo -e "\
+        VUE_APP_PUBLIC_PATH=/d2-admin-start-kit/\
+        " > .env.preview.local
+        cat .env.preview.local | while read line
+        do
+          echo $line
+        done
+    - name: Build
+      run: yarn build:preview --report
+    - name: Deploy
+      uses: peaceiris/actions-gh-pages@v2
+      env:
+        PERSONAL_TOKEN: ${{ secrets.ACCESS_TOKEN }}
+        PUBLISH_BRANCH: gh-pages
+        PUBLISH_DIR: ./dist
+      with:
+        forceOrphan: true

+ 17 - 0
plume-code-portal/.github/workflows/star.yml

@@ -0,0 +1,17 @@
+name: Star notice
+
+on:
+  watch:
+    types: [started]
+
+jobs:
+  bark:
+
+    runs-on: ubuntu-latest
+
+    steps:
+    - name: send bark message
+      run: |
+        repo=${GITHUB_REPOSITORY//\//:}
+        actor=$GITHUB_ACTOR
+        curl https://api.day.app/rwVK7e3nsZtopouwhRpVvM/$actor%20star%20了你的仓库/$repo

+ 21 - 0
plume-code-portal/.gitignore

@@ -0,0 +1,21 @@
+.DS_Store
+node_modules
+/dist
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?

+ 5 - 0
plume-code-portal/.postcssrc.js

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

+ 21 - 0
plume-code-portal/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 李杨
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 24 - 0
plume-code-portal/README.md

@@ -0,0 +1,24 @@
+[D2Admin](https://github.com/d2-projects/d2-admin) is a fully open source and free enterprise back-end product front-end integration solution, using the latest front-end technology stack, javascript files loading of local first screen less than 60kb, has prepared most of the project preparations, and with a lot of sample code to help the management system agile development.
+
+[中文](https://github.com/d2-projects/d2-admin-start-kit/blob/master/README.zh.md) | **English**
+
+## Preview
+
+![Deploy preview](https://github.com/d2-projects/d2-admin-start-kit/workflows/Deploy%20preview/badge.svg)
+[![Netlify Status](https://api.netlify.com/api/v1/badges/08ff8c93-f0a8-497a-a081-440b31fb3aa4/deploy-status)](https://app.netlify.com/sites/d2-admin-start-kit/deploys)
+
+The following access addresses are built and deployed by the latest master branch code at the same time. The access effect is completely consistent. Please select the appropriate access link according to your own network situation.
+
+| server | link | server |
+| --- | --- | --- |
+| d2.pub | [d2.pub/d2-admin-start-kit/preview](https://d2.pub/d2-admin-start-kit/preview) | China server |
+| cdn.d2.pub | [cdn.d2.pub/d2-admin-start-kit/preview](https://cdn.d2.pub/d2-admin-start-kit/preview) | qiniu CDN |
+| github | [d2-projects.github.io/d2-admin-start-kit](https://d2-projects.github.io/d2-admin-start-kit) | GitHub pages |
+| netlify | [d2-admin-start-kit.netlify.com](https://d2-admin-start-kit.netlify.com) | Netlify CDN |
+
+## Other synchronous repositories
+
+| type | link |
+| --- | --- |
+| gitee | [https://gitee.com/d2-projects/d2-admin](https://gitee.com/d2-projects/d2-admin) |
+| coding | [https://d2-projects.coding.net/p/d2-projects/d/d2-admin/git](https://d2-projects.coding.net/p/d2-projects/d/d2-admin/git) |

+ 26 - 0
plume-code-portal/README.zh.md

@@ -0,0 +1,26 @@
+[D2Admin](https://github.com/d2-projects/d2-admin) 是一个完全 **开源免费** 的企业中后台产品前端集成方案,使用最新的前端技术栈,小于 60kb 的本地首屏 js 加载,已经做好大部分项目前期准备工作,并且带有大量示例代码,助力管理系统敏捷开发。
+
+**中文** | [English](https://github.com/d2-projects/d2-admin-start-kit)
+
+## 预览
+
+![Deploy preview](https://github.com/d2-projects/d2-admin-start-kit/workflows/Deploy%20preview/badge.svg)
+[![Netlify Status](https://api.netlify.com/api/v1/badges/08ff8c93-f0a8-497a-a081-440b31fb3aa4/deploy-status)](https://app.netlify.com/sites/d2-admin-start-kit/deploys)
+
+下列访问地址均由最新的 master 分支代码同时构建部署,访问效果完全一致,请根据自身网络情况选择合适的访问链接。
+
+| 位置 | 链接 | 部署位置 |
+| --- | --- | --- |
+| d2.pub | [preview](https://d2.pub/d2-admin-start-kit/preview) | 中国服务器 |
+| cdn.d2.pub | [preview](https://cdn.d2.pub/d2-admin-start-kit/preview) | 七牛云 CDN |
+| github | [preview](https://d2-projects.github.io/d2-admin-start-kit) | GitHub pages |
+| netlify | [preview](https://d2-admin-start-kit.netlify.com) | Netlify CDN |
+
+## 其它同步仓库
+
+| 位置 | 链接 |
+| --- | --- |
+| 码云 | [https://gitee.com/d2-projects/d2-admin-start-kit](https://gitee.com/d2-projects/d2-admin-start-kit) |
+| coding | [https://d2-projects.coding.net/p/d2-projects/d/d2-admin-start-kit/git](https://d2-projects.coding.net/p/d2-projects/d/d2-admin-start-kit/git) |
+
+> 如果您在 github 仓库下载很慢,可以尝试使用我们的码云仓库克隆代码

+ 7 - 0
plume-code-portal/babel.config.js

@@ -0,0 +1,7 @@
+module.exports = {
+  presets: [
+    '@vue/cli-plugin-babel/preset'
+  ],
+  // 允许两种编码引入方式共存,也就是 common 规范与 es6 规范的共存处理
+  sourceType: 'unambiguous'
+}

+ 165 - 0
plume-code-portal/d2-admin.babel

@@ -0,0 +1,165 @@
+<babeledit_project version="1.2">
+    <!--
+
+    BabelEdit project file
+    https://www.codeandweb.com/babeledit
+
+    This file contains meta data for all translations, but not the translation texts itself.
+    They are stored in framework-specific message files (.json / .vue / .yaml / .properties)
+
+    -->
+    <preset_collections/>
+    <framework>vue-json</framework>
+    <filename>d2-admin.babel</filename>
+    <source_root_dir></source_root_dir>
+    <folder_node>
+        <name></name>
+        <children>
+            <concept_node>
+                <name>_element</name>
+                <definition_loaded>false</definition_loaded>
+                <description></description>
+                <comment></comment>
+                <default_text></default_text>
+                <translations>
+                    <translation>
+                        <language>en-US</language>
+                        <approved>false</approved>
+                    </translation>
+                    <translation>
+                        <language>ja-JP</language>
+                        <approved>false</approved>
+                    </translation>
+                    <translation>
+                        <language>zh-CHS</language>
+                        <approved>false</approved>
+                    </translation>
+                    <translation>
+                        <language>zh-CHT</language>
+                        <approved>false</approved>
+                    </translation>
+                </translations>
+            </concept_node>
+            <concept_node>
+                <name>_name</name>
+                <definition_loaded>false</definition_loaded>
+                <description></description>
+                <comment></comment>
+                <default_text></default_text>
+                <translations>
+                    <translation>
+                        <language>en-US</language>
+                        <approved>false</approved>
+                    </translation>
+                    <translation>
+                        <language>ja-JP</language>
+                        <approved>false</approved>
+                    </translation>
+                    <translation>
+                        <language>zh-CHS</language>
+                        <approved>false</approved>
+                    </translation>
+                    <translation>
+                        <language>zh-CHT</language>
+                        <approved>false</approved>
+                    </translation>
+                </translations>
+            </concept_node>
+            <folder_node>
+                <name>page</name>
+                <children>
+                    <folder_node>
+                        <name>demo</name>
+                        <children>
+                            <folder_node>
+                                <name>playground</name>
+                                <children>
+                                    <folder_node>
+                                        <name>locales</name>
+                                        <children>
+                                            <concept_node>
+                                                <name>text</name>
+                                                <definition_loaded>false</definition_loaded>
+                                                <description></description>
+                                                <comment></comment>
+                                                <default_text></default_text>
+                                                <translations>
+                                                    <translation>
+                                                        <language>en-US</language>
+                                                        <approved>false</approved>
+                                                    </translation>
+                                                    <translation>
+                                                        <language>ja-JP</language>
+                                                        <approved>false</approved>
+                                                    </translation>
+                                                    <translation>
+                                                        <language>zh-CHS</language>
+                                                        <approved>false</approved>
+                                                    </translation>
+                                                    <translation>
+                                                        <language>zh-CHT</language>
+                                                        <approved>false</approved>
+                                                    </translation>
+                                                </translations>
+                                            </concept_node>
+                                        </children>
+                                    </folder_node>
+                                </children>
+                            </folder_node>
+                        </children>
+                    </folder_node>
+                </children>
+            </folder_node>
+        </children>
+    </folder_node>
+    <isTemplateProject>false</isTemplateProject>
+    <languages>
+        <language>
+            <code>en-US</code>
+            <source_id></source_id>
+            <source_file>src/locales/en.json</source_file>
+        </language>
+        <language>
+            <code>ja-JP</code>
+            <source_id></source_id>
+            <source_file>src/locales/ja.json</source_file>
+        </language>
+        <language>
+            <code>zh-CHS</code>
+            <source_id></source_id>
+            <source_file>src/locales/zh-chs.json</source_file>
+        </language>
+        <language>
+            <code>zh-CHT</code>
+            <source_id></source_id>
+            <source_file>src/locales/zh-cht.json</source_file>
+        </language>
+    </languages>
+    <translation_files>
+        <translation_file>
+            <file>src/locales/en.json</file>
+        </translation_file>
+        <translation_file>
+            <file>src/locales/ja.json</file>
+        </translation_file>
+        <translation_file>
+            <file>src/locales/zh-chs.json</file>
+        </translation_file>
+        <translation_file>
+            <file>src/locales/zh-cht.json</file>
+        </translation_file>
+    </translation_files>
+    <editor_configuration>
+        <save_empty_translations>true</save_empty_translations>
+        <copy_templates>
+            <copy_template>$t('%1')</copy_template>
+            <copy_template>{{ $t('%1') }}</copy_template>
+            <copy_template>this.$t('%1')</copy_template>
+        </copy_templates>
+    </editor_configuration>
+    <primary_language>zh-CHS</primary_language>
+    <configuration>
+        <indent>tab</indent>
+        <format>namespaced-json</format>
+    </configuration>
+</babeledit_project>

+ 2 - 0
plume-code-portal/dependencies-cdn.js

@@ -0,0 +1,2 @@
+module.exports = [
+]

+ 3 - 0
plume-code-portal/jest.config.js

@@ -0,0 +1,3 @@
+module.exports = {
+  preset: '@vue/cli-plugin-unit-jest'
+}

+ 11 - 0
plume-code-portal/jsconfig.json

@@ -0,0 +1,11 @@
+{
+  "compilerOptions": {
+    "target": "es2017",
+    "allowSyntheticDefaultImports": false,
+    "baseUrl": "./",
+    "paths": {
+      "@/*": ["src/*"]
+    }
+  },
+  "exclude": ["node_modules", "dist"]
+}

+ 75 - 0
plume-code-portal/package.json

@@ -0,0 +1,75 @@
+{
+  "name": "d2-admin",
+  "version": "1.20.1",
+  "scripts": {
+    "serve": "vue-cli-service serve --open",
+    "start": "npm run serve",
+    "dev": "npm run serve",
+    "build": "vue-cli-service build",
+    "build:preview": "NODE_OPTIONS=--max_old_space_size=4096 vue-cli-service build --mode preview",
+    "lint": "vue-cli-service lint --fix",
+    "test:unit": "vue-cli-service test:unit"
+  },
+  "dependencies": {
+    "axios": "^0.19.0",
+    "axios-mock-adapter": "^1.18.1",
+    "better-scroll": "^1.15.2",
+    "core-js": "^3.4.3",
+    "dayjs": "^1.8.17",
+    "element-ui": "^2.13.1",
+    "faker": "^4.1.0",
+    "flex.css": "^1.1.7",
+    "fuse.js": "^5.2.3",
+    "hotkeys-js": "^3.7.3",
+    "js-cookie": "^2.2.1",
+    "lodash": "^4.17.19",
+    "lowdb": "^1.0.0",
+    "nprogress": "^0.2.0",
+    "screenfull": "^5.0.2",
+    "sortablejs": "^1.10.1",
+    "ua-parser-js": "^0.7.20",
+    "vue": "^2.6.11",
+    "vue-codemirror": "^4.0.6",
+    "vue-i18n": "^8.15.1",
+    "vue-router": "^3.1.3",
+    "vuex": "^3.1.2"
+  },
+  "devDependencies": {
+    "@d2-projects/vue-filename-injector": "^1.1.0",
+    "@kazupon/vue-i18n-loader": "^0.5.0",
+    "@vue/cli-plugin-babel": "^4.1.0",
+    "@vue/cli-plugin-eslint": "^4.1.0",
+    "@vue/cli-plugin-router": "^4.1.0",
+    "@vue/cli-plugin-unit-jest": "^4.1.0",
+    "@vue/cli-plugin-vuex": "^4.1.0",
+    "@vue/cli-service": "^4.1.0",
+    "@vue/eslint-config-standard": "^5.1.2",
+    "@vue/test-utils": "^1.0.2",
+    "babel-eslint": "^10.0.3",
+    "compression-webpack-plugin": "^3.0.1",
+    "cz-conventional-changelog": "^3.2.0",
+    "eslint": "^6.8.0",
+    "eslint-plugin-import": "^2.20.2",
+    "eslint-plugin-node": "^11.1.0",
+    "eslint-plugin-promise": "^4.2.1",
+    "eslint-plugin-standard": "^4.0.1",
+    "eslint-plugin-vue": "^6.2.2",
+    "sass": "^1.23.7",
+    "sass-loader": "^8.0.0",
+    "svg-sprite-loader": "^4.1.6",
+    "text-loader": "^0.0.1",
+    "vue-cli-plugin-i18n": "^1.0.1",
+    "vue-template-compiler": "^2.6.10",
+    "webpack-bundle-analyzer": "^3.6.0",
+    "webpack-theme-color-replacer": "^1.3.3"
+  },
+  "config": {
+    "commitizen": {
+      "path": "./node_modules/cz-conventional-changelog"
+    }
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/d2-projects/d2-admin.git"
+  }
+}

+ 21 - 0
plume-code-portal/pom.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.plume</groupId>
+        <artifactId>code</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>plume-code-portal</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+    </properties>
+
+
+</project>

BIN
plume-code-portal/public/icon.ico


BIN
plume-code-portal/public/icon.png


BIN
plume-code-portal/public/image/baidu-pan-logo.png


+ 6 - 0
plume-code-portal/public/image/loading/loading-spin.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="white">
+  <path opacity=".25" d="M16 0 A16 16 0 0 0 16 32 A16 16 0 0 0 16 0 M16 4 A12 12 0 0 1 16 28 A12 12 0 0 1 16 4"/>
+  <path d="M16 0 A16 16 0 0 1 32 16 L28 16 A12 12 0 0 0 16 4z">
+    <animateTransform attributeName="transform" type="rotate" from="0 16 16" to="360 16 16" dur="0.8s" repeatCount="indefinite" />
+  </path>
+</svg>

BIN
plume-code-portal/public/image/logo.png


BIN
plume-code-portal/public/image/logo/d2.png


Разница между файлами не показана из-за своего большого размера
+ 8 - 0
plume-code-portal/public/image/logo/elementui.svg


+ 45 - 0
plume-code-portal/public/image/logo/iview.svg

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="502px" height="477px" viewBox="0 0 502 477" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <!-- Generator: Sketch 54 (76480) - https://sketchapp.com -->
+    <title>未命名</title>
+    <desc>Created with Sketch.</desc>
+    <defs>
+        <linearGradient x1="0.00542331488%" y1="50.0074349%" x2="100.011743%" y2="50.0074349%" id="linearGradient-1">
+            <stop stop-color="#3668E7" offset="0.3030465%"></stop>
+            <stop stop-color="#44BAE1" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="0.0117592657%" y1="50.0044985%" x2="100.006481%" y2="50.0044985%" id="linearGradient-2">
+            <stop stop-color="#44BCE1" offset="0%"></stop>
+            <stop stop-color="#44BAE1" offset="36.72%"></stop>
+            <stop stop-color="#43B2E2" offset="54.5%"></stop>
+            <stop stop-color="#41A5E2" offset="68.19%"></stop>
+            <stop stop-color="#3F93E4" offset="79.8%"></stop>
+            <stop stop-color="#3C7BE5" offset="89.99%"></stop>
+            <stop stop-color="#385EE7" offset="99.21%"></stop>
+            <stop stop-color="#385BE7" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="0.0148416278%" y1="50.0005568%" x2="100.005996%" y2="50.0005568%" id="linearGradient-3">
+            <stop stop-color="#44BCE1" offset="0%"></stop>
+            <stop stop-color="#43B6E1" offset="14.76%"></stop>
+            <stop stop-color="#41A4E2" offset="34.89%"></stop>
+            <stop stop-color="#3E88E4" offset="58.12%"></stop>
+            <stop stop-color="#3960E7" offset="83.49%"></stop>
+            <stop stop-color="#385BE7" offset="86.36%"></stop>
+        </linearGradient>
+    </defs>
+    <g id="页面1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="logo" fill-rule="nonzero">
+            <g id="logo3-01的副本">
+                <g id="图层_2">
+                    <g id="XMLID_5_">
+                        <g id="编组">
+                            <path d="M241.7,169.1 C187.5,174.1 145.1,219.6 145.1,275.1 C145.1,333.9 192.8,381.5 251.5,381.5 C251.5,381.5 468.8,417.6 417.4,153.8 C447,203.4 474,253.3 474,253.3 C474,253.3 540,367.2 466.8,436.8 C466.8,436.8 424.3,476.6 345.7,476.6 C324.1,476.6 298.2,476.6 271.8,476.6 C134.2,452.4 122.6,330.6 122.6,330.6 C113.1,174 241.7,168.6 241.7,168.6 L241.7,169.1 Z" id="路径" fill="url(#linearGradient-1)"></path>
+                            <path d="M417.4,153.8 C468.8,417.6 251.5,381.5 251.5,381.5 C310.3,381.5 357.9,333.9 357.9,275.1 C357.9,265.2 356.5,255.6 354,246.5 C354,246.5 354,246.4 354,246.4 C352.9,240.7 336.4,162.2 256.3,131.7 C219.8,117.8 179.5,118.8 142.9,132.3 C117.2,141.8 87,158.3 64.7,186.7 L120.2,89 C132.9,66.7 149.5,46.9 169.7,31.1 C205,3.7 260.6,-19.3 323.9,28.2 C323.9,28.2 342.9,39 381.8,96.9 C393,113.6 405.5,133.7 417.4,153.8 Z" id="路径" fill="url(#linearGradient-2)"></path>
+                            <path d="M122.6,330.6 C122.6,330.6 134.1,452.4 271.8,476.6 C226.7,476.6 180.5,476.6 153.4,476.6 C123.1,476.6 93.1,469.6 66.4,455.2 C30.8,435.9 -5.4,400.6 1.2,338.1 C6,292.6 61.8,191.9 61.8,191.9 L64.7,186.8 C64.7,186.8 64.7,186.8 64.7,186.7 C86.9,158.2 117.1,141.8 142.9,132.3 C179.5,118.8 219.8,117.8 256.3,131.7 C336.4,162.3 352.9,240.8 354,246.4 C341.5,201.6 300.3,168.7 251.5,168.7 C248.2,168.7 244.9,168.9 241.7,169.1 L241.7,168.7 C241.7,168.6 113.1,174 122.6,330.6 Z" id="路径" fill="url(#linearGradient-3)"></path>
+                        </g>
+                    </g>
+                </g>
+            </g>
+        </g>
+    </g>
+</svg>

BIN
plume-code-portal/public/image/logo/lombok.png


+ 128 - 0
plume-code-portal/public/image/logo/mybatis-plus.svg

@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Created with EazyDraw for Mac ( http://www.eazydraw.com/ ) -->
+
+<svg
+    version="1.1"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:cc="http://creativecommons.org/ns#"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:svg="http://www.w3.org/2000/svg"
+    xmlns:xlink="http://www.w3.org/1999/xlink"
+    xmlns="http://www.w3.org/2000/svg"
+    width="769.985528"
+    height="659.983748856"
+    viewBox="0, 0, 769.985528, 659.983748856"
+    preserveAspectRatio="none"
+    id="svg2">
+   <defs
+       id="defs_7269C646">
+      <linearGradient id="linearStops_C5EEEB26">
+         <stop id="stop_C5EEEB26_0" offset="0" style="stop-color:#6D5656;stop-opacity:1;"/>
+         <stop id="stop_C5EEEB26_1" offset="1" style="stop-color:#000000;stop-opacity:1;"/>
+      </linearGradient>
+      <linearGradient id="linearGradient_C5EEEB26" x1="1" y1="0.5" x2="0" y2="0.5" gradientUnits="objectBoundingBox" xlink:href="#linearStops_C5EEEB26"/>
+      <linearGradient id="linearStops_F6EEEB26">
+         <stop id="stop_F6EEEB26_0" offset="0" style="stop-color:#000000;stop-opacity:1;"/>
+         <stop id="stop_F6EEEB26_1" offset="1" style="stop-color:#6D5656;stop-opacity:1;"/>
+      </linearGradient>
+      <linearGradient id="linearGradient_F6EEEB26" x1="0.080617193692" y1="0.772246325546" x2="0.919382806308" y2="0.227753674454" gradientUnits="objectBoundingBox" xlink:href="#linearStops_F6EEEB26"/>
+      <linearGradient id="linearGradient_77EEEB26" x1="0.03424954901" y1="0.681869506521" x2="0.96575045099" y2="0.318130493479" gradientUnits="objectBoundingBox" xlink:href="#linearStops_F6EEEB26"/>
+   </defs>
+   <metadata
+       id="metadata7">
+      <rdf:RDF>
+         <cc:Work
+             rdf:about="">
+            <dc:format>image/svg+xml</dc:format>
+            <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+            <dc:title></dc:title>
+         </cc:Work>
+      </rdf:RDF>
+   </metadata>
+   <g
+       id="layer_Paper"
+       style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;fill-rule:nonzero;stroke-linecap:square;stroke-linejoin:miter;stroke-width:1;stroke-miterlimit:10">
+      <g
+          id="21EEEB26">
+         <path
+             style="fill:#1A1A1A;stroke-linecap:butt;stroke-width:1.8;stroke-miterlimit:4"
+             id="02EEEB26"
+             d="M713.99052,256.9404888 C769.035528,272.9345328 769.035528,272.9345328 769.035528,272.9345328 L717.70572,288.0041508 L752.825502,302.7103128 L715.851252,309.6242928 z"/>
+         <path
+             style="fill:url(#linearGradient_C5EEEB26);stroke:none"
+             id="C5EEEB26"
+             d="M197.682084,154.4210928 C190.285416,248.3979408 302.870088,399.0704328 414.131868,411.0343308 C457.607268,415.7092008 521.415396,374.6361528 518.09355,331.0365168 C508.828698,209.4342588 321.126264,203.3238708 197.682084,154.4210928
+z"/>
+         <path
+             style="fill:url(#linearGradient_F6EEEB26);stroke:none"
+             id="F6EEEB26"
+             d="M0,502.2226548 C121.821984,638.0081928 341.218548,699.2063028 500.780448,633.4869528 C633.89781,578.6594028 720.209916,401.7859128 720.2529,261.5078448 C720.28224,165.4378128 624.067056,56.1721428 481.633416,101.2160268
+C417.653226,121.4494308 368.83827,185.7207348 327.605364,244.1009808 C235.477278,366.7236408 153.781236,449.1030348 0,502.2226548 z"/>
+         <path
+             style="fill:url(#linearGradient_77EEEB26);stroke:none"
+             id="77EEEB26"
+             d="M91.64061,227.8480428 C99.391626,321.7963428 234.655848,452.4909948 346.397454,446.4797508 C390.060324,444.1308408 446.466024,393.3679788 436.203756,350.8632828 C407.581614,232.3149048 221.32377,256.3475508 91.64061,227.8480428
+z"/>
+         <path
+             style="fill:#1E90FF;stroke:none"
+             id="08EEEB26"
+             d="M400.551174,153.8761428 C439.276194,157.3362468 507.65886,169.5974508 561.619656,172.9410948 C605.907918,175.6853748 658.238112,174.4987248 694.73691,173.7335268 C721.171836,219.0436128 723.311784,267.3513288 715.851252,309.6242928
+C638.021412,322.6578588 580.070466,313.0477668 516.569436,292.7543328 C458.79894,274.2922188 401.499198,246.4752888 359.971092,200.1181248 C378.489888,173.7711468 384.79221,168.0797628 400.551174,153.8761428
+z"/>
+         <g
+             id="28EEEB26">
+            <g
+                id="48EEEB26">
+               <g
+                   id="78EEEB26">
+                  <path
+                      style="fill:#FFFFFF;stroke:none"
+                      id="D8EEEB26"
+                      d="M688.07242058,264.559574262 C680.416802595,284.642555245 653.679739081,292.268424455 628.353452497,281.592395924 C603.027204872,270.916383817 588.702315006,245.98128199 596.357932991,225.898301007 C604.013550976,205.815320024 630.75065345,198.189467237 656.076901074,208.865479344
+C681.403187659,219.541507875 695.728038565,244.476593279 688.07242058,264.559574262 z"/>
+                  <path
+                      style="fill:#1A1A1A;stroke:none"
+                      id="29EEEB26"
+                      d="M685.448127649,262.135024967 C679.670295733,277.292010166 660.614723953,283.520908673 642.886362304,276.047705124 C625.157969487,268.574488438 615.470131044,250.229109034 621.24796296,235.072123834 C627.02578421,219.915166615 646.081335488,213.68622699 663.809728305,221.159443677
+C681.538089954,228.632647225 691.225948899,246.978067748 685.448127649,262.135024967 z"/>
+                  <path
+                      style="fill:#FFFFFF;stroke:none"
+                      id="89EEEB26"
+                      d="M678.302128437,242.679899924 C676.259363193,248.03868554 669.764161885,250.342938512 663.79471882,247.826582857 C657.825244587,245.310214063 654.642031927,238.926127938 656.684797171,233.567342322 C658.72757308,228.208528725 665.222774389,225.904275754 671.192248622,228.420644548
+C677.161691687,230.937000203 680.344904346,237.321086327 678.302128437,242.679899924 z"/>
+               </g>
+            </g>
+         </g>
+         <path
+             style="fill:#1A1A1A;stroke:none"
+             id="4AEEEB26"
+             d="M685.28916,235.8278208 C675.55197,229.7555388 667.477962,221.4235368 657.786168,215.2765008 C648.453384,208.9799748 638.826588,202.9070808 628.361082,198.6804648 C623.77371,197.0945388 619.18299,195.5175768 614.617146,193.8703068
+C611.495424,194.6146428 615.210768,191.8233648 615.860316,190.7903628 C619.020162,187.2639828 622.180044,183.7376028 625.339908,180.2112408 C629.439588,180.7514028 633.061008,183.0095388 637.053948,183.9689028
+C647.859672,188.3942208 657.625284,194.9318748 667.390104,201.2447448 C676.984626,207.7197048 685.936728,215.1401688 695.608452,221.4768888 C698.472468,222.0127488 698.318568,224.0047728 696.112002,225.2127348
+C692.50437,228.7510848 688.89681,232.2895428 685.28916,235.8278208 z"/>
+         <path
+             style="fill:#1E90FF;stroke:none"
+             id="9AEEEB26"
+             d="M408.576672,205.7849928 C389.91069,205.1359668 368.182692,207.4563828 353.877012,190.1940768 C341.281152,176.3939448 331.031664,159.2145288 324.421632,140.4904788 C323.275248,126.8893548 323.26281,110.2744728 310.841118,103.8122928
+C296.504478,94.7136887999 279.565146,96.0231168 263.888928,93.5044488 C234.306342,91.5367428001 206.121348,103.8706128 178.54704,114.7816188 C165.456252,119.9197548 149.363802,118.9761588 139.766238,105.8641488
+C132.289866,97.2881028 127.746036,86.1814007999 123.026562,75.5493948 C116.11476,68.6667888 115.699662,57.9743747999 125.030052,55.1214108 C130.774482,51.2266067999 136.51893,47.3318208001 142.26336,43.4370348
+C151.088904,62.5379868 157.803804,87.0815268001 176.414922,95.5924488 C195.521562,100.4294628 213.24276,87.4434348001 231.254658,82.1825748001 C256.789296,72.4676148 284.076396,71.0052588 310.448682,76.1566608
+C325.63377,77.7525948001 344.010096,84.3372828 348.600978,103.9129668 C349.943796,120.8878308 353.003652,137.4218568 363.154032,150.1692048 C372.758274,167.4188208 386.842302,183.8612988 405.33111,184.5703548
+C411.450966,186.9710868 431.478072,182.0671668 429.273198,187.9517088 C422.374356,193.8961368 415.475514,199.8405648 408.576672,205.7849928 z"/>
+         <path
+             style="fill:#1E90FF;stroke:none"
+             id="DAEEEB26"
+             d="M396.071478,196.8304968 C382.536,188.0040348 365.978286,180.2170548 360.221814,163.9691568 C356.408838,153.0896868 352.492056,142.0892568 350.583228,130.7067408 C348.910542,115.2381168 350.629308,99.6495948001 349.857918,84.1459968
+C352.352394,74.2528187999 345.936474,65.1511008001 336.027654,63.3246228 C323.040528,59.5388448 309.302982,60.0366888001 295.987284,58.2029748 C283.747158,57.5358767999 269.13933,60.1988688 259.43103,50.9926968
+C252.067842,42.2113428001 248.869206,30.8462868 245.220408,20.2070627999 C244.38384,14.6499948 251.763246,14.4277308 254.971044,11.1417948001 C260.8245,7.427858400091 266.677938,3.713929199947 272.531394,0
+C273.80169,10.3518432 278.341812,20.0140488 282.399174,29.5037747999 C287.999226,39.4741368001 300.265344,39.9498768 310.384278,39.6993708001 C326.251458,40.7089188 342.367326,41.0217228 357.905808,44.5466988
+C367.700292,46.8350388001 379.243134,53.7691787999 378.212904,65.1717288001 C378.873306,88.7961167999 374.96088,113.2944048 383.082876,136.0747728 C386.439318,146.2649868 389.733066,157.2645888 398.745738,164.0301228
+C405.503676,170.2953828 414.002196,174.4112808 421.533216,179.4110508 C415.362456,184.8082788 407.488284,188.8742268 400.666608,193.7878848 C399.134862,194.8020408 397.603134,195.8162328 396.071478,196.8304968
+z"/>
+      </g>
+      <polygon
+          style="fill:#FFFFFF;stroke:#FFFFFF"
+          id="507C0036"
+          points="565.615106535,230.105227729 544.484479673,237.321057559 537.268649843,258.451684422 530.052820012,237.321057559 508.92219315,230.105227729 530.052820012,222.889397899 537.268649843,201.758771036 544.484479673,222.889397899"/>
+   </g>
+</svg>

BIN
plume-code-portal/public/image/logo/mybatis.jpg


BIN
plume-code-portal/public/image/logo/spring.png


BIN
plume-code-portal/public/image/logo/swagger.png


BIN
plume-code-portal/public/image/theme/chester/logo/all.png


BIN
plume-code-portal/public/image/theme/chester/logo/icon-only.png


BIN
plume-code-portal/public/image/theme/chester/preview@2x.png


BIN
plume-code-portal/public/image/theme/d2/logo/all.png


BIN
plume-code-portal/public/image/theme/d2/logo/icon-only.png


BIN
plume-code-portal/public/image/theme/d2/preview@2x.png


BIN
plume-code-portal/public/image/theme/element/logo/all.png


BIN
plume-code-portal/public/image/theme/element/logo/icon-only.png


BIN
plume-code-portal/public/image/theme/element/preview@2x.png


BIN
plume-code-portal/public/image/theme/line/bg.jpg


BIN
plume-code-portal/public/image/theme/line/logo/all.png


BIN
plume-code-portal/public/image/theme/line/logo/icon-only.png


BIN
plume-code-portal/public/image/theme/line/preview@2x.png


BIN
plume-code-portal/public/image/theme/star/bg.jpg


BIN
plume-code-portal/public/image/theme/star/logo/all.png


BIN
plume-code-portal/public/image/theme/star/logo/icon-only.png


BIN
plume-code-portal/public/image/theme/star/preview@2x.png


BIN
plume-code-portal/public/image/theme/tomorrow-night-blue/logo/all.png


BIN
plume-code-portal/public/image/theme/tomorrow-night-blue/logo/icon-only.png


BIN
plume-code-portal/public/image/theme/tomorrow-night-blue/preview@2x.png


BIN
plume-code-portal/public/image/theme/violet/logo/all.png


BIN
plume-code-portal/public/image/theme/violet/logo/icon-only.png


BIN
plume-code-portal/public/image/theme/violet/preview@2x.png


+ 55 - 0
plume-code-portal/public/index.html

@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
+    <link rel="icon" href="<%= BASE_URL %>icon.png">
+    <!-- 使用 CDN 加速的 CSS 文件,配置在 vue.config.js 下 -->
+    <% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.css) { %>
+    <link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="preload" as="style">
+    <link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="stylesheet">
+    <% } %>
+    <!-- 使用 CDN 加速的 JS 文件,配置在 vue.config.js 下 -->
+    <% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.js) { %>
+    <link href="<%= htmlWebpackPlugin.options.cdn.js[i] %>" rel="preload" as="script">
+    <% } %>
+    <title><%= VUE_APP_TITLE %></title>
+    <style>
+      html, body, #app { height: 100%; margin: 0px; padding: 0px; width: 100%; }
+      .d2-home { background-color: #303133; height: 100%; display: flex; flex-direction: column; }
+      .d2-home__main { user-select: none; width: 100%; flex-grow: 1; display: flex; justify-content: center; align-items: center; flex-direction: column; }
+      .d2-home__footer { width: 100%; flex-grow: 0; text-align: center; padding: 1em 0; }
+      .d2-home__footer > a { font-size: 12px; color: #ABABAB; text-decoration: none; }
+      .d2-home__loading { height: 32px; width: 32px; margin-bottom: 20px; }
+    </style>
+  </head>
+  <body>
+    <noscript>
+      <strong>
+        Sorry, D2Admin will not work properly without JavaScript support. Enable JavaScript for browsers and continue.
+      </strong>
+    </noscript>
+    <div id="app">
+      <div class="d2-home">
+        <div class="d2-home__main">
+          <img
+            class="d2-home__loading"
+            src="./image/loading/loading-spin.svg"
+            alt="loading">
+        </div>
+        <div class="d2-home__footer">
+<!--          <a-->
+<!--            href="https://github.com/d2-projects/d2-admin"-->
+<!--            target="_blank">-->
+<!--            https://github.com/d2-projects/d2-admin-->
+<!--          </a>-->
+        </div>
+      </div>
+    </div>
+    <!-- 使用 CDN 加速的 JS 文件,配置在 vue.config.js 下 -->
+    <% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.js) { %>
+    <script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
+    <% } %>
+  </body>
+</html>

+ 154 - 0
plume-code-portal/src/App.vue

@@ -0,0 +1,154 @@
+<template>
+  <div id="app">
+    <router-view/>
+  </div>
+</template>
+
+<script>
+import util from '@/libs/util'
+
+export default {
+  name: 'app',
+  watch: {
+    '$i18n.locale': 'i18nHandle'
+  },
+  created() {
+    this.i18nHandle(this.$i18n.locale)
+  },
+  methods: {
+    i18nHandle(val, oldVal) {
+      util.cookies.set('lang', val)
+      document.querySelector('html').setAttribute('lang', val)
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+@import '~@/assets/style/public-class.scss';
+
+.el-table {
+  padding-bottom: 10px !important;
+}
+
+.el-divider--horizontal {
+  margin: 10px 0;
+}
+
+/* switch按钮款式 */
+.switch .el-switch__label {
+  position: absolute;
+  display: none;
+  color: #fff !important;
+}
+/*关上时文字地位设置*/
+.switch .el-switch__label--right {
+  z-index: 1;
+}
+/* 调整关上时文字的显示位子 */
+.switch .el-switch__label--right span{
+  margin-left: 12px;
+}
+/*敞开时文字地位设置*/
+.switch .el-switch__label--left {
+  z-index: 1;
+}
+/* 调整敞开时文字的显示位子 */
+.switch .el-switch__label--left span{
+  margin-left: 22px;
+}
+/*显示文字*/
+.switch .el-switch__label.is-active {
+  display: block;
+}
+/* 调整按钮的宽度 */
+.switch.el-switch .el-switch__core,
+.el-switch .el-switch__label {
+  width: 60px !important;
+  margin: 0;
+}
+
+.el-drawer {
+  outline: none;
+  &__body {
+    height: 100%;
+    overflow: hidden;
+  }
+  &__header {
+    padding: 10px 10px 10px 10px;
+    margin-bottom: 0;
+    border-bottom: 1px solid #DCDFE6;
+  }
+}
+
+.drawer {
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+  &__header {
+    flex: none;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    box-sizing: border-box;
+    padding: 15px 20px;
+    border-bottom: 1px solid #d3d4d5;
+    &__title {
+      flex: auto;
+      font-family: PingFangSC-Medium;
+      font-size: 16px;
+      color: #333333;
+      letter-spacing: 0;
+    }
+    &__close {
+      color: #979797;
+      font-size: 22px;
+      flex: none;
+      cursor: pointer;
+    }
+  }
+  &__body {
+    ::-webkit-scrollbar { width: 0 !important }
+    flex: auto;
+    overflow-x: hidden;
+    overflow-y: auto;
+    box-sizing: border-box;
+    padding: 10px;
+  }
+  &__footer {
+    flex: none;
+    box-sizing: border-box;
+    padding: 10px 20px;
+    box-shadow: 0 -1px 4px 1px rgba(0, 0, 0, 0.14);
+  }
+}
+
+.el-pagination {
+  float: right !important;
+}
+
+.table-container {
+  margin: 10px 0;
+}
+
+.page-container {
+  margin: 10px 0;
+  text-align: right;
+}
+
+
+.w100 {
+  width: 100%
+}
+
+.green {
+  color: green;
+  font-weight: bold;
+}
+
+.red {
+  color: red;
+  font-weight: bold;
+}
+
+</style>

+ 17 - 0
plume-code-portal/src/api/index.js

@@ -0,0 +1,17 @@
+import { assign, map } from 'lodash'
+import faker from 'faker/locale/zh_CN'
+import { service, request, serviceForMock, requestForMock, mock } from './service'
+import * as tools from './tools'
+
+const files = require.context('./modules', true, /\.api\.js$/)
+const generators = files.keys().map(key => files(key).default)
+
+export default assign({}, ...map(generators, generator => generator({
+  service,
+  request,
+  serviceForMock,
+  requestForMock,
+  mock,
+  faker,
+  tools
+})))

+ 16 - 0
plume-code-portal/src/api/modules/database.api.js

@@ -0,0 +1,16 @@
+export default ({service, request, serviceForMock, requestForMock, mock, faker, tools}) => ({
+  testConnection(data = {}) {
+    return request({
+      url: '/database/testConnection',
+      method: 'post',
+      data
+    })
+  },
+  listTableName(data = {}) {
+    return request({
+      url: '/database/listTableName',
+      method: 'post',
+      data
+    })
+  }
+})

+ 24 - 0
plume-code-portal/src/api/modules/generator.api.js

@@ -0,0 +1,24 @@
+export default ({service, request, serviceForMock, requestForMock, mock, faker, tools}) => ({
+  generate(data = {}) {
+    return request({
+      url: '/generator/generate',
+      timeout: 10000,
+      method: 'post',
+      data
+    })
+  },
+  tree(params = {}) {
+    return request({
+      url: '/generator/tree',
+      method: 'get',
+      params
+    })
+  },
+  content(params = {}) {
+    return request({
+      url: '/generator/content',
+      method: 'get',
+      params
+    })
+  }
+})

+ 31 - 0
plume-code-portal/src/api/modules/sys.user.api.js

@@ -0,0 +1,31 @@
+import { find, assign } from 'lodash'
+
+const users = [
+  { username: 'admin', password: 'admin', uuid: 'admin-uuid', name: 'Admin' },
+  { username: 'editor', password: 'editor', uuid: 'editor-uuid', name: 'Editor' },
+  { username: 'user1', password: 'user1', uuid: 'user1-uuid', name: 'User1' }
+]
+
+export default ({ service, request, serviceForMock, requestForMock, mock, faker, tools }) => ({
+  /**
+   * @description 登录
+   * @param {Object} data 登录携带的信息
+   */
+  SYS_USER_LOGIN (data = {}) {
+    // 模拟数据
+    mock
+      .onAny('/login')
+      .reply(config => {
+        const user = find(users, tools.parse(config.data))
+        return user
+          ? tools.responseSuccess(assign({}, user, { token: faker.random.uuid() }))
+          : tools.responseError({}, '账号或密码不正确')
+      })
+    // 接口请求
+    return requestForMock({
+      url: '/login',
+      method: 'post',
+      data
+    })
+  }
+})

+ 102 - 0
plume-code-portal/src/api/service.js

@@ -0,0 +1,102 @@
+import axios from 'axios'
+import Adapter from 'axios-mock-adapter'
+import { get } from 'lodash'
+import util from '@/libs/util'
+import { errorLog, errorCreate } from './tools'
+
+/**
+ * @description 创建请求实例
+ */
+function createService () {
+  // 创建一个 axios 实例
+  const service = axios.create()
+  // 请求拦截
+  service.interceptors.request.use(
+    config => config,
+    error => {
+      // 发送失败
+      console.log(error)
+      return Promise.reject(error)
+    }
+  )
+  // 响应拦截
+  service.interceptors.response.use(
+    response => {
+      // dataAxios 是 axios 返回数据中的 data
+      const dataAxios = response.data
+      // 这个状态码是和后端约定的
+      const { code } = dataAxios
+      // 根据 code 进行判断
+      if (code === undefined) {
+        // 如果没有 code 代表这不是项目后端开发的接口 比如可能是 D2Admin 请求最新版本
+        return dataAxios
+      } else {
+        // 有 code 代表这是一个后端接口 可以进行进一步的判断
+        switch (code) {
+          case 0:
+            // [ 示例 ] code === 0 代表没有错误
+            return dataAxios.data
+          case 'xxx':
+            // [ 示例 ] 其它和后台约定的 code
+            errorCreate(`[ code: xxx ] ${dataAxios.msg}: ${response.config.url}`)
+            break
+          default:
+            // 不是正确的 code
+            errorCreate(`${dataAxios.msg}: ${response.config.url}`)
+            break
+        }
+      }
+    },
+    error => {
+      const status = get(error, 'response.status')
+      switch (status) {
+        case 400: error.message = '请求错误'; break
+        case 401: error.message = '未授权,请登录'; break
+        case 403: error.message = '拒绝访问'; break
+        case 404: error.message = `请求地址出错: ${error.response.config.url}`; break
+        case 408: error.message = '请求超时'; break
+        case 500: error.message = '服务器内部错误'; break
+        case 501: error.message = '服务未实现'; break
+        case 502: error.message = '网关错误'; break
+        case 503: error.message = '服务不可用'; break
+        case 504: error.message = '网关超时'; break
+        case 505: error.message = 'HTTP版本不受支持'; break
+        default: break
+      }
+      errorLog(error)
+      return Promise.reject(error)
+    }
+  )
+  return service
+}
+
+/**
+ * @description 创建请求方法
+ * @param {Object} service axios 实例
+ */
+function createRequestFunction (service) {
+  return function (config) {
+    // const token = util.cookies.get('token')
+    const configDefault = {
+      headers: {
+        // Authorization: token,
+        'Content-Type': get(config, 'headers.Content-Type', 'application/json')
+      },
+      timeout: 20000,
+      baseURL: process.env.VUE_APP_API,
+      data: {}
+    }
+    return service(Object.assign(configDefault, config))
+  }
+}
+
+// 用于真实网络请求的实例和请求方法
+export const service = createService()
+export const request = createRequestFunction(service)
+
+// 用于模拟网络请求的实例和请求方法
+export const serviceForMock = createService()
+export const requestForMock = createRequestFunction(serviceForMock)
+
+// 网络请求数据模拟工具
+export const mock = new Adapter(serviceForMock)

+ 86 - 0
plume-code-portal/src/api/tools.js

@@ -0,0 +1,86 @@
+import { Message } from 'element-ui'
+import store from '@/store'
+import util from '@/libs/util'
+
+/**
+ * @description 安全地解析 json 字符串
+ * @param {String} jsonString 需要解析的 json 字符串
+ * @param {String} defaultValue 默认值
+ */
+export function parse (jsonString = '{}', defaultValue = {}) {
+  let result = defaultValue
+  try {
+    result = JSON.parse(jsonString)
+  } catch (error) {
+    console.log(error)
+  }
+  return result
+}
+
+/**
+ * @description 接口请求返回
+ * @param {Any} data 返回值
+ * @param {String} msg 状态信息
+ * @param {Number} code 状态码
+ */
+export function response (data = {}, msg = '', code = 0) {
+  return [
+    200,
+    { code, msg, data }
+  ]
+}
+
+/**
+ * @description 接口请求返回 正确返回
+ * @param {Any} data 返回值
+ * @param {String} msg 状态信息
+ */
+export function responseSuccess (data = {}, msg = '成功') {
+  return response(data, msg)
+}
+
+/**
+ * @description 接口请求返回 错误返回
+ * @param {Any} data 返回值
+ * @param {String} msg 状态信息
+ * @param {Number} code 状态码
+ */
+export function responseError (data = {}, msg = '请求失败', code = 500) {
+  return response(data, msg, code)
+}
+
+/**
+ * @description 记录和显示错误
+ * @param {Error} error 错误对象
+ */
+export function errorLog (error) {
+  // 添加到日志
+  store.dispatch('d2admin/log/push', {
+    message: '数据请求异常',
+    type: 'danger',
+    meta: {
+      error
+    }
+  })
+  // 打印到控制台
+  if (process.env.NODE_ENV === 'development') {
+    util.log.danger('>>>>>> Error >>>>>>')
+    console.log(error)
+  }
+  // 显示提示
+  Message({
+    message: error.message,
+    type: 'error',
+    duration: 5 * 1000
+  })
+}
+
+/**
+ * @description 创建一个错误
+ * @param {String} msg 错误信息
+ */
+export function errorCreate (msg) {
+  const error = new Error(msg)
+  errorLog(error)
+  throw error
+}

Некоторые файлы не были показаны из-за большого количества измененных файлов