refactor: 代码规范、Bug修复

This commit is contained in:
2025-09-26 09:10:37 +08:00
parent 3610f8f7db
commit dcc288acc4
572 changed files with 41415 additions and 44746 deletions
+34 -34
View File
@@ -1,35 +1,35 @@
.DS_Store .DS_Store
node_modules/ node_modules/
dist/ dist/
demo/ demo/
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
**/*.log **/*.log
tests/**/coverage/ tests/**/coverage/
tests/e2e/reports tests/e2e/reports
selenium-debug.log selenium-debug.log
cutejava-doc cutejava-doc
# Editor directories and files # Editor directories and files
.idea .idea
.vscode .vscode
*.suo *.suo
*.ntvs* *.ntvs*
*.njsproj *.njsproj
*.sln *.sln
*.local *.local
package-lock.json package-lock.json
yarn.lock yarn.lock
### IDEA ### ### IDEA ###
.DS_Store .DS_Store
~/* ~/*
.idea/* .idea/*
*.iml *.iml
*/target/* */target/*
*/*.iml */*.iml
/.gradle/ /.gradle/
/application.pid /application.pid
+190 -190
View File
@@ -1,191 +1,191 @@
Apache License Apache License
Version 2.0, January 2004 Version 2.0, January 2004
http://www.apache.org/licenses/ http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions. 1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and "License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document. distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright "Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License. owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities "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. 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 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 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 contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity. outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising "You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License. permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including "Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration but not limited to software source code, documentation source, and configuration
files. files.
"Object" form shall mean any form resulting from mechanical transformation or "Object" form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code, translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types. generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made "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 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). 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 "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, is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works 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 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. name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version "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 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 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 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, on behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written communication sent "submitted" means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for 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 the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution." owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work. incorporated within the Work.
2. Grant of Copyright License. 2. Grant of Copyright License.
Subject to the terms and conditions of this License, each Contributor hereby Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of, irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form. Derivative Works in Source or Object form.
3. Grant of Patent License. 3. Grant of Patent License.
Subject to the terms and conditions of this License, each Contributor hereby Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have 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 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 such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination 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 of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License 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. for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. 4. Redistribution.
You may reproduce and distribute copies of the Work or Derivative Works thereof 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, in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions: provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of You must give any other recipients of the Work or Derivative Works a copy of
this License; and this License; and
You must cause any modified files to carry prominent notices stating that You You must cause any modified files to carry prominent notices stating that You
changed the files; and changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute, 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 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 of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any 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 Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices 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 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 following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative 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 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 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 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, You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as provided that such additional attribution notices cannot be construed as
modifying the License. modifying the License.
You may add Your own copyright statement to Your modifications and may provide You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole, distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License. with the conditions stated in this License.
5. Submission of Contributions. 5. Submission of Contributions.
Unless You explicitly state otherwise, any Contribution intentionally submitted 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 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. conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of Notwithstanding the above, nothing herein shall supersede or modify the terms of
any separate license agreement you may have executed with Licensor regarding any separate license agreement you may have executed with Licensor regarding
such Contributions. such Contributions.
6. Trademarks. 6. Trademarks.
This License does not grant permission to use the trade names, 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 service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file. reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. 7. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the 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, Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE, including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of redistributing the Work and assume any risks associated with Your exercise of
permissions under this License. permissions under this License.
8. Limitation of Liability. 8. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence), In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental, 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 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 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 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 any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages. been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. 9. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However, 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 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 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 agree to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability. accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "{}" replaced with your own notice, with the fields enclosed by brackets "{}" replaced with your own
identifying information. (Don't include the brackets!) The text should be identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also 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 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 the same "printed page" as the copyright notice for easier identification within
third-party archives. third-party archives.
Copyright 2022-2025 Odboy Copyright 2022-2025 Odboy
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
+96 -96
View File
@@ -1,96 +1,96 @@
<h1 style="text-align: center">CuteJava 后台管理系统</h1> <h1 style="text-align: center">CuteJava 后台管理系统</h1>
#### 项目简介 #### 项目简介
一个基于 Spring Boot 2.7.18 、 Mybatis-Plus、 JWT、Spring Security、Redis、Vue2的前后端分离的后台管理系统 一个基于 Spring Boot 2.7.18 、 Mybatis-Plus、 JWT、Spring Security、Redis、Vue2的前后端分离的后台管理系统
**账号密码:** `admin / 123456` **账号密码:** `admin / 123456`
#### 项目源码 #### 项目源码
https://github.com/odboy-tianjun/cutejava https://github.com/odboy-tianjun/cutejava
#### 编码规范 #### 编码规范
- 和数据库表一一对应的类, 以`Tb`结尾 - 和数据库表一一对应的类, 以`Tb`结尾
- API请求参数类名, 以`Args`结尾 - API请求参数类名, 以`Args`结尾
- API响应参数类名, 以`Vo`结尾 - API响应参数类名, 以`Vo`结尾
- 事件驱动类名, 以`Event`结尾 - 事件驱动类名, 以`Event`结尾
- 消息队列/Socket传输类名,以`Message`结尾 - 消息队列/Socket传输类名,以`Message`结尾
- 常用的辅助类的类名, 以`Cs`开头 - 常用的辅助类的类名, 以`Cs`开头
- 查询分页、查询列表的方法,一律为同一个方法名 - 查询分页、查询列表的方法,一律为同一个方法名
- 查询分页:queryUser(args, page) - 查询分页:queryUser(args, page)
- 查询列表:queryUser(args) - 查询列表:queryUser(args)
- MapperXml:这样mapper.xml文件中的实现方法只需要写一个queryUser - MapperXml:这样mapper.xml文件中的实现方法只需要写一个queryUser
- 枚举类名,以`Enum`结尾 - 枚举类名,以`Enum`结尾
- 拒绝过度包装 - 拒绝过度包装
#### 主要特性 #### 主要特性
- 使用最新技术栈,社区资源丰富。 - 使用最新技术栈,社区资源丰富。
- 高效率开发,代码生成器可一键生成前后端代码 - 高效率开发,代码生成器可一键生成前后端代码
- 支持数据字典,可方便地对一些状态进行管理 - 支持数据字典,可方便地对一些状态进行管理
- 支持接口限流,避免恶意请求导致服务层压力过大 - 支持接口限流,避免恶意请求导致服务层压力过大
- 支持接口级别的功能权限与数据权限,可自定义操作 - 支持接口级别的功能权限与数据权限,可自定义操作
- 自定义权限注解与匿名接口注解,可快速对接口拦截与放行 - 自定义权限注解与匿名接口注解,可快速对接口拦截与放行
- 对一些常用地前端组件封装:表格数据请求、数据字典等 - 对一些常用地前端组件封装:表格数据请求、数据字典等
- 前后端统一异常拦截处理,统一输出异常,避免繁琐的判断 - 前后端统一异常拦截处理,统一输出异常,避免繁琐的判断
- 支持在线用户管理与服务器性能监控,支持限制单用户登录 - 支持在线用户管理与服务器性能监控,支持限制单用户登录
- 支持一键复制菜单项,避免菜单繁琐配置 - 支持一键复制菜单项,避免菜单繁琐配置
#### 系统功能 #### 系统功能
- 用户管理:提供用户的相关配置,新增用户后,默认密码为123456 - 用户管理:提供用户的相关配置,新增用户后,默认密码为123456
- 角色管理:对权限与菜单进行分配,可根据部门设置角色的数据权限 - 角色管理:对权限与菜单进行分配,可根据部门设置角色的数据权限
- 菜单管理:已实现菜单动态路由,后端可配置化,支持多级菜单 - 菜单管理:已实现菜单动态路由,后端可配置化,支持多级菜单
- 部门管理:可配置系统组织架构,树形表格展示 - 部门管理:可配置系统组织架构,树形表格展示
- 岗位管理:配置各个部门的职位 - 岗位管理:配置各个部门的职位
- 字典管理:可维护常用一些固定的数据,如:状态,性别等 - 字典管理:可维护常用一些固定的数据,如:状态,性别等
- SQL监控:采用druid 监控数据库访问性能,默认用户名admin,密码123456 - SQL监控:采用druid 监控数据库访问性能,默认用户名admin,密码123456
- 定时任务:整合Quartz做定时任务,加入任务日志,任务运行情况一目了然 - 定时任务:整合Quartz做定时任务,加入任务日志,任务运行情况一目了然
- 邮件工具:配合富文本,发送html格式的邮件 - 邮件工具:配合富文本,发送html格式的邮件
- 存储管理:本地存储、Minio存储 - 存储管理:本地存储、Minio存储
- 服务监控:监控服务器的负载情况 - 服务监控:监控服务器的负载情况
#### 前端基础组件 #### 前端基础组件
> 组件所在路径:cutejava-front/src/views/components/dev > 组件所在路径:cutejava-front/src/views/components/dev
- CuteSimpleTable 简单表格 - CuteSimpleTable 简单表格
- CuteDragTable 支持拖拽的表格 - CuteDragTable 支持拖拽的表格
- CuteFormDialog 支持表单的对话框 - CuteFormDialog 支持表单的对话框
- CuteFormDrawer 支持表单的抽屉 - CuteFormDrawer 支持表单的抽屉
- CuteRichTextEditor 富文本编辑器 - CuteRichTextEditor 富文本编辑器
- CuteOneKeyCopy 一键复制 - CuteOneKeyCopy 一键复制
- CuteMarkdown Markdown编辑器 - CuteMarkdown Markdown编辑器
- CuteJavaEditor Java编辑器(已弃用) - CuteJavaEditor Java编辑器(已弃用)
- CuteYamlEditor Yaml编辑器(已弃用) - CuteYamlEditor Yaml编辑器(已弃用)
- CuteCodeEditor 多语言编辑器(支持yaml、java、go、swift、dockerfile、groovy、lua、perl、python、ruby、sql、xml、vue) - CuteCodeEditor 多语言编辑器(支持yaml、java、go、swift、dockerfile、groovy、lua、perl、python、ruby、sql、xml、vue)
#### 前端业务组件 #### 前端业务组件
> 组件所在路径:cutejava-front/src/views/components/business > 组件所在路径:cutejava-front/src/views/components/business
- CuteDeptTree 部门树 - CuteDeptTree 部门树
- CuteProductLineSelect 产品线选择框 - CuteProductLineSelect 产品线选择框
- CuteProductLineSelectPro 产品线级联选择框 - CuteProductLineSelectPro 产品线级联选择框
- CuteUserSelect 用户多选框 - CuteUserSelect 用户多选框
![CuteBusiness](./cutejava-front/docs/images/CuteBusiness.png) ![CuteBusiness](./cutejava-front/docs/images/CuteBusiness.png)
- CuteFileUpload 上传文件到OSS, 必须结合Minio使用(上传完成后必须销毁组件) - CuteFileUpload 上传文件到OSS, 必须结合Minio使用(上传完成后必须销毁组件)
![CuteFileUpload](./cutejava-front/docs/images/CuteFileUpload.png) ![CuteFileUpload](./cutejava-front/docs/images/CuteFileUpload.png)
- CuteFileDragUpload 支持拖拽上传文件到OSS, 必须结合Minio使用(上传完成后必须销毁组件) - CuteFileDragUpload 支持拖拽上传文件到OSS, 必须结合Minio使用(上传完成后必须销毁组件)
![CuteFileDragUpload](./cutejava-front/docs/images/CuteFileDragUpload.png) ![CuteFileDragUpload](./cutejava-front/docs/images/CuteFileDragUpload.png)
- CutePipelineNode 流水线节点组件 - CutePipelineNode 流水线节点组件
![CutePipelineNode](./cutejava-front/docs/images/CutePipelineNode.png) ![CutePipelineNode](./cutejava-front/docs/images/CutePipelineNode.png)
#### 系统模块 #### 系统模块
- cutejava-framework:系统基础框架。提供核心功能,如:权限、数据权限、异常处理、缓存、工具类、接口限流、接口防重、接口幂等。 - cutejava-framework:系统基础框架。提供核心功能,如:权限、数据权限、异常处理、缓存、工具类、接口限流、接口防重、接口幂等。
- cutejava-system:系统功能模块。提供用户、角色、菜单、部门、岗位、字典、定时任务、邮件、Minio存储、服务监控等功能 - cutejava-system:系统功能模块。提供用户、角色、菜单、部门、岗位、字典、定时任务、邮件、Minio存储、服务监控等功能
- cutejava-devops:devops模块,已实现流水线功能。参考阿里云云效,提供流水线功能,可配置流水线任务,并支持任务依赖、任务参数、任务参数校验、任务参数回填。 - cutejava-devops:devops模块,已实现流水线功能。参考阿里云云效,提供流水线功能,可配置流水线任务,并支持任务依赖、任务参数、任务参数校验、任务参数回填。
#### 特别鸣谢 #### 特别鸣谢
- 感谢 [elunez](https://github.com/elunez/eladmin-mp) 大佬提供的基础框架 - 感谢 [elunez](https://github.com/elunez/eladmin-mp) 大佬提供的基础框架
- 感谢 [aizuda](https://mongoplus.com/) 大佬提供的Mongodb框架 - 感谢 [aizuda](https://mongoplus.com/) 大佬提供的Mongodb框架
- 建表参考 'cutejava/doc/mongodb.md' - 建表参考 'cutejava/doc/mongodb.md'
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
is_weekend() {
day=$(date +%u)
[ "$day" -eq 6 ] || [ "$day" -eq 7 ]
}
if is_weekend; then
# 如果是周末,使用当前时间
git add .
git commit -m "$1"
git push
else
# 如果不是周末,设置为最近的周末时间
day=$(date +%u)
if [ "$day" -le 5 ]; then
# 周一到周五,设置为即将到来的周六
days_until_saturday=$((6 - day))
weekend_date=$(date -d "$days_until_saturday days" "+%Y-%m-%d 12:00:00")
else
# 周日,使用昨天(周六)
weekend_date=$(date -d "yesterday" "+%Y-%m-%d 12:00:00")
fi
export GIT_AUTHOR_DATE="$weekend_date"
export GIT_COMMITTER_DATE="$weekend_date"
git add .
git commit -m "$1"
git push
unset GIT_AUTHOR_DATE
unset GIT_COMMITTER_DATE
fi
+14 -14
View File
@@ -1,14 +1,14 @@
# https://editorconfig.org # https://editorconfig.org
root = true root = true
[*] [*]
charset = utf-8 charset = utf-8
indent_style = space indent_style = space
indent_size = 2 indent_size = 2
end_of_line = lf end_of_line = lf
insert_final_newline = true insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true
[*.md] [*.md]
insert_final_newline = false insert_final_newline = false
trim_trailing_whitespace = false trim_trailing_whitespace = false
+8 -8
View File
@@ -1,8 +1,8 @@
ENV = 'development' ENV = 'development'
# 接口地址 # 接口地址
VUE_APP_BASE_API = 'http://localhost:8000' VUE_APP_BASE_API = 'http://localhost:8000'
VUE_APP_WS_API = 'ws://localhost:8000' VUE_APP_WS_API = 'ws://localhost:8000'
# 是否启用 babel-plugin-dynamic-import-node插件 # 是否启用 babel-plugin-dynamic-import-node插件
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
+7 -7
View File
@@ -1,7 +1,7 @@
ENV = 'production' ENV = 'production'
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置 # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http # 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
VUE_APP_BASE_API = 'https://cutejava-api.odboy.cn' VUE_APP_BASE_API = 'https://cutejava-api.odboy.cn'
# 如果接口是 http 形式, wss 需要改为 ws # 如果接口是 http 形式, wss 需要改为 ws
VUE_APP_WS_API = 'wss://cutejava-api.odboy.cn' VUE_APP_WS_API = 'wss://cutejava-api.odboy.cn'
+4 -4
View File
@@ -1,4 +1,4 @@
build/*.js build/*.js
src/assets src/assets
public public
dist dist
+198 -198
View File
@@ -1,198 +1,198 @@
module.exports = { module.exports = {
root: true, root: true,
parserOptions: { parserOptions: {
parser: 'babel-eslint', parser: 'babel-eslint',
sourceType: 'module' sourceType: 'module'
}, },
env: { env: {
browser: true, browser: true,
node: true, node: true,
es6: true, es6: true,
}, },
extends: ['plugin:vue/recommended', 'eslint:recommended'], extends: ['plugin:vue/recommended', 'eslint:recommended'],
// add your custom rules here // add your custom rules here
//it is base on https://github.com/vuejs/eslint-config-vue //it is base on https://github.com/vuejs/eslint-config-vue
rules: { rules: {
"vue/max-attributes-per-line": [2, { "vue/max-attributes-per-line": [2, {
"singleline": 10, "singleline": 10,
"multiline": { "multiline": {
"max": 1, "max": 1,
"allowFirstLine": false "allowFirstLine": false
} }
}], }],
"vue/singleline-html-element-content-newline": "off", "vue/singleline-html-element-content-newline": "off",
"vue/multiline-html-element-content-newline":"off", "vue/multiline-html-element-content-newline":"off",
"vue/name-property-casing": ["error", "PascalCase"], "vue/name-property-casing": ["error", "PascalCase"],
"vue/no-v-html": "off", "vue/no-v-html": "off",
'accessor-pairs': 2, 'accessor-pairs': 2,
'arrow-spacing': [2, { 'arrow-spacing': [2, {
'before': true, 'before': true,
'after': true 'after': true
}], }],
'block-spacing': [2, 'always'], 'block-spacing': [2, 'always'],
'brace-style': [2, '1tbs', { 'brace-style': [2, '1tbs', {
'allowSingleLine': true 'allowSingleLine': true
}], }],
'camelcase': [0, { 'camelcase': [0, {
'properties': 'always' 'properties': 'always'
}], }],
'comma-dangle': [2, 'never'], 'comma-dangle': [2, 'never'],
'comma-spacing': [2, { 'comma-spacing': [2, {
'before': false, 'before': false,
'after': true 'after': true
}], }],
'comma-style': [2, 'last'], 'comma-style': [2, 'last'],
'constructor-super': 2, 'constructor-super': 2,
'curly': [2, 'multi-line'], 'curly': [2, 'multi-line'],
'dot-location': [2, 'property'], 'dot-location': [2, 'property'],
'eol-last': 2, 'eol-last': 2,
'eqeqeq': ["error", "always", {"null": "ignore"}], 'eqeqeq': ["error", "always", {"null": "ignore"}],
'generator-star-spacing': [2, { 'generator-star-spacing': [2, {
'before': true, 'before': true,
'after': true 'after': true
}], }],
'handle-callback-err': [2, '^(err|error)$'], 'handle-callback-err': [2, '^(err|error)$'],
'indent': [2, 2, { 'indent': [2, 2, {
'SwitchCase': 1 'SwitchCase': 1
}], }],
'jsx-quotes': [2, 'prefer-single'], 'jsx-quotes': [2, 'prefer-single'],
'key-spacing': [2, { 'key-spacing': [2, {
'beforeColon': false, 'beforeColon': false,
'afterColon': true 'afterColon': true
}], }],
'keyword-spacing': [2, { 'keyword-spacing': [2, {
'before': true, 'before': true,
'after': true 'after': true
}], }],
'new-cap': [2, { 'new-cap': [2, {
'newIsCap': true, 'newIsCap': true,
'capIsNew': false 'capIsNew': false
}], }],
'new-parens': 2, 'new-parens': 2,
'no-array-constructor': 2, 'no-array-constructor': 2,
'no-caller': 2, 'no-caller': 2,
'no-console': 'off', 'no-console': 'off',
'no-class-assign': 2, 'no-class-assign': 2,
'no-cond-assign': 2, 'no-cond-assign': 2,
'no-const-assign': 2, 'no-const-assign': 2,
'no-control-regex': 0, 'no-control-regex': 0,
'no-delete-var': 2, 'no-delete-var': 2,
'no-dupe-args': 2, 'no-dupe-args': 2,
'no-dupe-class-members': 2, 'no-dupe-class-members': 2,
'no-dupe-keys': 2, 'no-dupe-keys': 2,
'no-duplicate-case': 2, 'no-duplicate-case': 2,
'no-empty-character-class': 2, 'no-empty-character-class': 2,
'no-empty-pattern': 2, 'no-empty-pattern': 2,
'no-eval': 2, 'no-eval': 2,
'no-ex-assign': 2, 'no-ex-assign': 2,
'no-extend-native': 2, 'no-extend-native': 2,
'no-extra-bind': 2, 'no-extra-bind': 2,
'no-extra-boolean-cast': 2, 'no-extra-boolean-cast': 2,
'no-extra-parens': [2, 'functions'], 'no-extra-parens': [2, 'functions'],
'no-fallthrough': 2, 'no-fallthrough': 2,
'no-floating-decimal': 2, 'no-floating-decimal': 2,
'no-func-assign': 2, 'no-func-assign': 2,
'no-implied-eval': 2, 'no-implied-eval': 2,
'no-inner-declarations': [2, 'functions'], 'no-inner-declarations': [2, 'functions'],
'no-invalid-regexp': 2, 'no-invalid-regexp': 2,
'no-irregular-whitespace': 2, 'no-irregular-whitespace': 2,
'no-iterator': 2, 'no-iterator': 2,
'no-label-var': 2, 'no-label-var': 2,
'no-labels': [2, { 'no-labels': [2, {
'allowLoop': false, 'allowLoop': false,
'allowSwitch': false 'allowSwitch': false
}], }],
'no-lone-blocks': 2, 'no-lone-blocks': 2,
'no-mixed-spaces-and-tabs': 2, 'no-mixed-spaces-and-tabs': 2,
'no-multi-spaces': 2, 'no-multi-spaces': 2,
'no-multi-str': 2, 'no-multi-str': 2,
'no-multiple-empty-lines': [2, { 'no-multiple-empty-lines': [2, {
'max': 1 'max': 1
}], }],
'no-native-reassign': 2, 'no-native-reassign': 2,
'no-negated-in-lhs': 2, 'no-negated-in-lhs': 2,
'no-new-object': 2, 'no-new-object': 2,
'no-new-require': 2, 'no-new-require': 2,
'no-new-symbol': 2, 'no-new-symbol': 2,
'no-new-wrappers': 2, 'no-new-wrappers': 2,
'no-obj-calls': 2, 'no-obj-calls': 2,
'no-octal': 2, 'no-octal': 2,
'no-octal-escape': 2, 'no-octal-escape': 2,
'no-path-concat': 2, 'no-path-concat': 2,
'no-proto': 2, 'no-proto': 2,
'no-redeclare': 2, 'no-redeclare': 2,
'no-regex-spaces': 2, 'no-regex-spaces': 2,
'no-return-assign': [2, 'except-parens'], 'no-return-assign': [2, 'except-parens'],
'no-self-assign': 2, 'no-self-assign': 2,
'no-self-compare': 2, 'no-self-compare': 2,
'no-sequences': 2, 'no-sequences': 2,
'no-shadow-restricted-names': 2, 'no-shadow-restricted-names': 2,
'no-spaced-func': 2, 'no-spaced-func': 2,
'no-sparse-arrays': 2, 'no-sparse-arrays': 2,
'no-this-before-super': 2, 'no-this-before-super': 2,
'no-throw-literal': 2, 'no-throw-literal': 2,
'no-trailing-spaces': 2, 'no-trailing-spaces': 2,
'no-undef': 2, 'no-undef': 2,
'no-undef-init': 2, 'no-undef-init': 2,
'no-unexpected-multiline': 2, 'no-unexpected-multiline': 2,
'no-unmodified-loop-condition': 2, 'no-unmodified-loop-condition': 2,
'no-unneeded-ternary': [2, { 'no-unneeded-ternary': [2, {
'defaultAssignment': false 'defaultAssignment': false
}], }],
'no-unreachable': 2, 'no-unreachable': 2,
'no-unsafe-finally': 2, 'no-unsafe-finally': 2,
'no-unused-vars': [2, { 'no-unused-vars': [2, {
'vars': 'all', 'vars': 'all',
'args': 'none' 'args': 'none'
}], }],
'no-useless-call': 2, 'no-useless-call': 2,
'no-useless-computed-key': 2, 'no-useless-computed-key': 2,
'no-useless-constructor': 2, 'no-useless-constructor': 2,
'no-useless-escape': 0, 'no-useless-escape': 0,
'no-whitespace-before-property': 2, 'no-whitespace-before-property': 2,
'no-with': 2, 'no-with': 2,
'one-var': [2, { 'one-var': [2, {
'initialized': 'never' 'initialized': 'never'
}], }],
'operator-linebreak': [2, 'after', { 'operator-linebreak': [2, 'after', {
'overrides': { 'overrides': {
'?': 'before', '?': 'before',
':': 'before' ':': 'before'
} }
}], }],
'padded-blocks': [2, 'never'], 'padded-blocks': [2, 'never'],
'quotes': [2, 'single', { 'quotes': [2, 'single', {
'avoidEscape': true, 'avoidEscape': true,
'allowTemplateLiterals': true 'allowTemplateLiterals': true
}], }],
'semi': [2, 'never'], 'semi': [2, 'never'],
'semi-spacing': [2, { 'semi-spacing': [2, {
'before': false, 'before': false,
'after': true 'after': true
}], }],
'space-before-blocks': [2, 'always'], 'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, 'never'], 'space-before-function-paren': [2, 'never'],
'space-in-parens': [2, 'never'], 'space-in-parens': [2, 'never'],
'space-infix-ops': 2, 'space-infix-ops': 2,
'space-unary-ops': [2, { 'space-unary-ops': [2, {
'words': true, 'words': true,
'nonwords': false 'nonwords': false
}], }],
'spaced-comment': [2, 'always', { 'spaced-comment': [2, 'always', {
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ','] 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
}], }],
'template-curly-spacing': [2, 'never'], 'template-curly-spacing': [2, 'never'],
'use-isnan': 2, 'use-isnan': 2,
'valid-typeof': 2, 'valid-typeof': 2,
'wrap-iife': [2, 'any'], 'wrap-iife': [2, 'any'],
'yield-star-spacing': [2, 'both'], 'yield-star-spacing': [2, 'both'],
'yoda': [2, 'never'], 'yoda': [2, 'never'],
'prefer-const': 2, 'prefer-const': 2,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'object-curly-spacing': [2, 'always', { 'object-curly-spacing': [2, 'always', {
objectsInObjects: false objectsInObjects: false
}], }],
'array-bracket-spacing': [2, 'never'] 'array-bracket-spacing': [2, 'never']
} }
} }
+23 -23
View File
@@ -1,23 +1,23 @@
.DS_Store .DS_Store
node_modules/ node_modules/
dist/ dist/
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
**/*.log **/*.log
tests/**/coverage/ tests/**/coverage/
tests/e2e/reports tests/e2e/reports
selenium-debug.log selenium-debug.log
# Editor directories and files # Editor directories and files
.idea .idea
.vscode .vscode
*.suo *.suo
*.ntvs* *.ntvs*
*.njsproj *.njsproj
*.sln *.sln
*.local *.local
package-lock.json package-lock.json
yarn.lock yarn.lock
+5 -5
View File
@@ -1,5 +1,5 @@
language: node_js language: node_js
node_js: 10 node_js: 10
script: npm run test script: npm run test
notifications: notifications:
email: false email: false
+191 -191
View File
@@ -1,191 +1,191 @@
Apache License Apache License
Version 2.0, January 2004 Version 2.0, January 2004
http://www.apache.org/licenses/ http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions. 1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and "License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document. distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright "Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License. owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities "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. 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 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 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 contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity. outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising "You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License. permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including "Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration but not limited to software source code, documentation source, and configuration
files. files.
"Object" form shall mean any form resulting from mechanical transformation or "Object" form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code, translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types. generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made "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 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). 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 "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, is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works 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 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. name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version "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 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 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 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, on behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written communication sent "submitted" means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for 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 the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution." owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work. incorporated within the Work.
2. Grant of Copyright License. 2. Grant of Copyright License.
Subject to the terms and conditions of this License, each Contributor hereby Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of, irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form. Derivative Works in Source or Object form.
3. Grant of Patent License. 3. Grant of Patent License.
Subject to the terms and conditions of this License, each Contributor hereby Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have 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 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 such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination 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 of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License 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. for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. 4. Redistribution.
You may reproduce and distribute copies of the Work or Derivative Works thereof 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, in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions: provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of You must give any other recipients of the Work or Derivative Works a copy of
this License; and this License; and
You must cause any modified files to carry prominent notices stating that You You must cause any modified files to carry prominent notices stating that You
changed the files; and changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute, 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 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 of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any 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 Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices 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 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 following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative 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 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 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 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, You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as provided that such additional attribution notices cannot be construed as
modifying the License. modifying the License.
You may add Your own copyright statement to Your modifications and may provide You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole, distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License. with the conditions stated in this License.
5. Submission of Contributions. 5. Submission of Contributions.
Unless You explicitly state otherwise, any Contribution intentionally submitted 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 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. conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of Notwithstanding the above, nothing herein shall supersede or modify the terms of
any separate license agreement you may have executed with Licensor regarding any separate license agreement you may have executed with Licensor regarding
such Contributions. such Contributions.
6. Trademarks. 6. Trademarks.
This License does not grant permission to use the trade names, 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 service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file. reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. 7. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the 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, Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE, including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of redistributing the Work and assume any risks associated with Your exercise of
permissions under this License. permissions under this License.
8. Limitation of Liability. 8. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence), In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental, 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 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 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 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 any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages. been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. 9. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However, 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 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 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 agree to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability. accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "{}" replaced with your own notice, with the fields enclosed by brackets "{}" replaced with your own
identifying information. (Don't include the brackets!) The text should be identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also 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 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 the same "printed page" as the copyright notice for easier identification within
third-party archives. third-party archives.
Copyright 2022 Odboy Copyright 2022 Odboy
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
+51 -51
View File
@@ -1,51 +1,51 @@
# cutejava-ui # cutejava-ui
#### 前端模板 #### 前端模板
初始模板基于: [https://github.com/PanJiaChen/vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) 初始模板基于: [https://github.com/PanJiaChen/vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)
模板文档: [https://panjiachen.github.io/vue-element-admin-site/zh/guide/](https://panjiachen.github.io/vue-element-admin-site/zh/guide/) 模板文档: [https://panjiachen.github.io/vue-element-admin-site/zh/guide/](https://panjiachen.github.io/vue-element-admin-site/zh/guide/)
## 快速开始 ## 快速开始
### 环境要求 ### 环境要求
**推荐 node 版本:12-16 LTS** **推荐 node 版本:12-16 LTS**
### 安装依赖 ### 安装依赖
``` bash ``` bash
# 安装依赖(依赖python) # 安装依赖(依赖python)
npm install --registry https://registry.npmmirror.com npm install --registry https://registry.npmmirror.com
``` ```
### 启动服务 ### 启动服务
```bash ```bash
# 启动服务 localhost:8013 # 启动服务 localhost:8013
npm run dev npm run dev
# (或) 启动服务 localhost:8013 # (或) 启动服务 localhost:8013
IDEA -> Current File -> Edit Configurations... -> Add New Configuration -> npm -> Script选dev -> Apply -> Ok IDEA -> Current File -> Edit Configurations... -> Add New Configuration -> npm -> Script选dev -> Apply -> Ok
# 构建生产环境 # 构建生产环境
npm run build:prod npm run build:prod
``` ```
#### 常见问题 #### 常见问题
1、linux 系统在安装依赖的时候会出现 node-sass 无法安装的问题 1、linux 系统在安装依赖的时候会出现 node-sass 无法安装的问题
解决方案: 解决方案:
``` ```
1. 单独安装:npm install --unsafe-perm node-sass 1. 单独安装:npm install --unsafe-perm node-sass
2. 直接使用:npm install --unsafe-perm 2. 直接使用:npm install --unsafe-perm
``` ```
2、加速node-sass安装 2、加速node-sass安装
https://www.ydyno.com/archives/1219.html https://www.ydyno.com/archives/1219.html
#### 特别鸣谢 #### 特别鸣谢
- 感谢 [elunez](https://github.com/elunez/eladmin-mp) 大佬提供的基础框架 - 感谢 [elunez](https://github.com/elunez/eladmin-mp) 大佬提供的基础框架
+11 -11
View File
@@ -1,11 +1,11 @@
const plugins = ['@vue/babel-plugin-transform-vue-jsx'] const plugins = ['@vue/babel-plugin-transform-vue-jsx']
// 生产环境移除console // 生产环境移除console
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
plugins.push('transform-remove-console') plugins.push('transform-remove-console')
} }
module.exports = { module.exports = {
plugins: plugins, plugins: plugins,
presets: [ presets: [
'@vue/app' '@vue/app'
] ]
} }
+24 -24
View File
@@ -1,24 +1,24 @@
module.exports = { module.exports = {
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'], moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
transform: { transform: {
'^.+\\.vue$': 'vue-jest', '^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub', 'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest' '^.+\\.jsx?$': 'babel-jest'
}, },
moduleNameMapper: { moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1' '^@/(.*)$': '<rootDir>/src/$1'
}, },
snapshotSerializers: ['jest-serializer-vue'], snapshotSerializers: ['jest-serializer-vue'],
testMatch: [ testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)' '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
], ],
collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'], collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
coverageDirectory: '<rootDir>/tests/unit/coverage', coverageDirectory: '<rootDir>/tests/unit/coverage',
// 'collectCoverage': true, // 'collectCoverage': true,
'coverageReporters': [ 'coverageReporters': [
'lcov', 'lcov',
'text-summary' 'text-summary'
], ],
testURL: 'http://localhost/' testURL: 'http://localhost/'
} }
+2 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "cutejava-front", "name": "cutejava-front",
"version": "1.3.0", "version": "1.4.0",
"description": "CuteJava 前端源码", "description": "CuteJava 前端源码",
"author": "Odboy", "author": "Odboy",
"license": "Apache-2.0", "license": "Apache-2.0",
@@ -48,6 +48,7 @@
"element-ui": "^2.15.14", "element-ui": "^2.15.14",
"file-saver": "1.3.8", "file-saver": "1.3.8",
"fuse.js": "3.4.4", "fuse.js": "3.4.4",
"html2canvas": "^1.4.1",
"js-beautify": "^1.10.2", "js-beautify": "^1.10.2",
"js-cookie": "2.2.0", "js-cookie": "2.2.0",
"jsencrypt": "^3.0.0-rc.1", "jsencrypt": "^3.0.0-rc.1",
+7 -7
View File
@@ -1,7 +1,7 @@
const viewGenerator = require('./plop-templates/view/prompt') const viewGenerator = require('./plop-templates/view/prompt')
const componentGenerator = require('./plop-templates/component/prompt') const componentGenerator = require('./plop-templates/component/prompt')
module.exports = function(plop) { module.exports = function(plop) {
plop.setGenerator('view', viewGenerator) plop.setGenerator('view', viewGenerator)
plop.setGenerator('component', componentGenerator) plop.setGenerator('component', componentGenerator)
} }
+5 -5
View File
@@ -1,5 +1,5 @@
module.exports = { module.exports = {
plugins: { plugins: {
autoprefixer: {} autoprefixer: {}
} }
} }
+15 -15
View File
@@ -1,15 +1,15 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title> <title><%= webpackConfig.name %></title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </body>
</html> </html>
+1 -1
View File
@@ -1,2 +1,2 @@
User-agent: * User-agent: *
Disallow: / Disallow: /
+11 -11
View File
@@ -1,11 +1,11 @@
<template> <template>
<div id="app"> <div id="app">
<router-view /> <router-view />
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'App' name: 'App'
} }
</script> </script>
+33 -33
View File
@@ -1,33 +1,33 @@
import request from '@/utils/request' import request from '@/utils/request'
import qs from 'qs' import qs from 'qs'
// export function initData(url, params) { // export function initData(url, params) {
// return request({ // return request({
// url: url + '?' + qs.stringify(params, { indices: false }), // url: url + '?' + qs.stringify(params, { indices: false }),
// method: 'get' // method: 'get'
// }) // })
// } // }
export function initData(url, params) { export function initData(url, params) {
return request({ return request({
url: url, url: url,
method: 'post', method: 'post',
data: params data: params
}) })
} }
export function initDataByPost(url, params) { export function initDataByPost(url, params) {
return request({ return request({
url: url, url: url,
method: 'post', method: 'post',
data: params data: params
}) })
} }
export function download(url, params) { export function download(url, params) {
return request({ return request({
url: url + '?' + qs.stringify(params, { indices: false }), url: url + '?' + qs.stringify(params, { indices: false }),
method: 'get', method: 'get',
responseType: 'blob' responseType: 'blob'
}) })
} }
+35 -35
View File
@@ -1,35 +1,35 @@
import request from '@/utils/request' import request from '@/utils/request'
export function login(username, password, code, uuid) { export function login(username, password, code, uuid) {
return request({ return request({
url: 'auth/login', url: 'auth/login',
method: 'post', method: 'post',
data: { data: {
username, username,
password, password,
code, code,
uuid uuid
} }
}) })
} }
export function getInfo() { export function getInfo() {
return request({ return request({
url: 'auth/info', url: 'auth/info',
method: 'post' method: 'post'
}) })
} }
export function getCodeImg() { export function getCodeImg() {
return request({ return request({
url: 'auth/captcha/getImage', url: 'auth/captcha/getImage',
method: 'post' method: 'post'
}) })
} }
export function logout() { export function logout() {
return request({ return request({
url: 'auth/logout', url: 'auth/logout',
method: 'post' method: 'post'
}) })
} }
@@ -1,53 +0,0 @@
import request from '@/utils/request'
export function startPipeline(data) {
return request({
url: 'api/devops/pipelineInstance/start',
method: 'post',
data
})
}
export function stopPipeline(data) {
return request({
url: 'api/devops/pipelineInstance/stop',
method: 'post',
data
})
}
export function retryPipeline(data) {
return request({
url: 'api/devops/pipelineInstance/retry',
method: 'post',
data
})
}
export function restartPipeline(data) {
return request({
url: 'api/devops/pipelineInstance/restart',
method: 'post',
data
})
}
export function queryLastPipelineDetail(instanceId) {
return request({
url: 'api/devops/pipelineInstance/last',
method: 'post',
data: {
instanceId
}
})
}
export function queryLastPipelineDetailWs(instanceId) {
return request({
url: 'api/devops/pipelineInstance/lastWs',
method: 'post',
data: {
instanceId
}
})
}
@@ -1,9 +0,0 @@
import request from '@/utils/request'
export function getPipelineTemplate(id) {
return request({
url: 'api/devops/pipelineTemplate/getPipelineTemplate',
method: 'post',
data: { id }
})
}
+28 -28
View File
@@ -1,28 +1,28 @@
import request from '@/utils/request' import request from '@/utils/request'
export function sendResetEmailCaptcha(email) { export function sendResetEmailCaptcha(email) {
return request({ return request({
url: 'api/captcha/sendResetEmailCaptcha?email=' + email, url: 'api/captcha/sendResetEmailCaptcha?email=' + email,
method: 'post' method: 'post'
}) })
} }
export function sendResetPasswordCaptcha(email) { export function sendResetPasswordCaptcha(email) {
return request({ return request({
url: 'api/captcha/sendResetPasswordCaptcha?email=' + email, url: 'api/captcha/sendResetPasswordCaptcha?email=' + email,
method: 'post' method: 'post'
}) })
} }
export function checkEmailCaptcha(email, code, bizCode) { export function checkEmailCaptcha(email, code, bizCode) {
const params = { const params = {
email: email, email: email,
code: code, code: code,
bizCode: bizCode bizCode: bizCode
} }
return request({ return request({
url: 'api/captcha/checkEmailCaptcha', url: 'api/captcha/checkEmailCaptcha',
method: 'post', method: 'post',
data: params data: params
}) })
} }
+45 -45
View File
@@ -1,45 +1,45 @@
import request from '@/utils/request' import request from '@/utils/request'
export function queryDeptList(params) { export function queryDeptList(params) {
return request({ return request({
url: 'api/dept', url: 'api/dept',
method: 'post', method: 'post',
data: params data: params
}) })
} }
export function queryDeptSuperiorTree(ids, exclude) { export function queryDeptSuperiorTree(ids, exclude) {
exclude = exclude !== undefined ? exclude : false exclude = exclude !== undefined ? exclude : false
const data = Array.isArray(ids) ? ids : [ids] const data = Array.isArray(ids) ? ids : [ids]
return request({ return request({
url: 'api/dept/queryDeptSuperiorTree?exclude=' + exclude, url: 'api/dept/queryDeptSuperiorTree?exclude=' + exclude,
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function add(data) { export function add(data) {
return request({ return request({
url: 'api/dept/saveDept', url: 'api/dept/saveDept',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function del(ids) { export function del(ids) {
return request({ return request({
url: 'api/dept/removeDeptByIds', url: 'api/dept/removeDeptByIds',
method: 'post', method: 'post',
data: ids data: ids
}) })
} }
export function edit(data) { export function edit(data) {
return request({ return request({
url: 'api/dept/modifyDept', url: 'api/dept/modifyDept',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export default { add, edit, del, queryDeptList, queryDeptSuperiorTree } export default { add, edit, del, queryDeptList, queryDeptSuperiorTree }
+35 -35
View File
@@ -1,35 +1,35 @@
import request from '@/utils/request' import request from '@/utils/request'
export function add(data) { export function add(data) {
return request({ return request({
url: 'api/dict/saveDict', url: 'api/dict/saveDict',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function del(ids) { export function del(ids) {
return request({ return request({
url: 'api/dict/removeDictByIds', url: 'api/dict/removeDictByIds',
method: 'post', method: 'post',
data: ids data: ids
}) })
} }
export function edit(data) { export function edit(data) {
return request({ return request({
url: 'api/dict/modifyDictById', url: 'api/dict/modifyDictById',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function queryPageDict(data) { export function queryPageDict(data) {
return request({ return request({
url: 'api/dict', url: 'api/dict',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export default { add, edit, del, queryPageDict } export default { add, edit, del, queryPageDict }
+42 -42
View File
@@ -1,42 +1,42 @@
import request from '@/utils/request' import request from '@/utils/request'
export function get(dictName) { export function get(dictName) {
const params = { const params = {
page: 1, page: 1,
size: 9999999, size: 9999999,
args: { args: {
dictName: dictName dictName: dictName
} }
} }
return request({ return request({
url: 'api/dictDetail/queryDictDetailByArgs', url: 'api/dictDetail/queryDictDetailByArgs',
method: 'post', method: 'post',
data: params data: params
}) })
} }
export function add(data) { export function add(data) {
return request({ return request({
url: 'api/dictDetail/saveDictDetail', url: 'api/dictDetail/saveDictDetail',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function del(id) { export function del(id) {
return request({ return request({
url: 'api/dictDetail/removeDictDetailById', url: 'api/dictDetail/removeDictDetailById',
method: 'post', method: 'post',
data: { id: id } data: { id: id }
}) })
} }
export function edit(data) { export function edit(data) {
return request({ return request({
url: 'api/dictDetail/modifyDictDetailById', url: 'api/dictDetail/modifyDictDetailById',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export default { add, edit, del } export default { add, edit, del }
+24 -24
View File
@@ -1,24 +1,24 @@
import request from '@/utils/request' import request from '@/utils/request'
export function getLastEmailConfig() { export function getLastEmailConfig() {
return request({ return request({
url: 'api/email/getLastEmailConfig', url: 'api/email/getLastEmailConfig',
method: 'post' method: 'post'
}) })
} }
export function modifyEmailConfig(data) { export function modifyEmailConfig(data) {
return request({ return request({
url: 'api/email/modifyEmailConfig', url: 'api/email/modifyEmailConfig',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function sendEmail(data) { export function sendEmail(data) {
return request({ return request({
url: 'api/email/sendEmail', url: 'api/email/sendEmail',
method: 'post', method: 'post',
data: data data: data
}) })
} }
+42 -42
View File
@@ -1,42 +1,42 @@
import request from '@/utils/request' import request from '@/utils/request'
export function queryAllEnableJob() { export function queryAllEnableJob() {
const params = { const params = {
page: 1, page: 1,
size: 9999999, size: 9999999,
args: { args: {
enabled: true enabled: true
} }
} }
return request({ return request({
url: 'api/job/queryAllEnableJob', url: 'api/job/queryAllEnableJob',
method: 'post', method: 'post',
data: params data: params
}) })
} }
export function add(data) { export function add(data) {
return request({ return request({
url: 'api/job/saveJob', url: 'api/job/saveJob',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function del(ids) { export function del(ids) {
return request({ return request({
url: 'api/job/removeJobByIds', url: 'api/job/removeJobByIds',
method: 'post', method: 'post',
data: ids data: ids
}) })
} }
export function edit(data) { export function edit(data) {
return request({ return request({
url: 'api/job/modifyJobById', url: 'api/job/modifyJobById',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export default { add, edit, del } export default { add, edit, del }
+27 -27
View File
@@ -1,27 +1,27 @@
import request from '@/utils/request' import request from '@/utils/request'
export function add(data) { export function add(data) {
return request({ return request({
url: 'api/localStorage/uploadFile', url: 'api/localStorage/uploadFile',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function del(ids) { export function del(ids) {
return request({ return request({
url: 'api/localStorage/removeFileByIds', url: 'api/localStorage/removeFileByIds',
method: 'post', method: 'post',
data: ids data: ids
}) })
} }
export function edit(data) { export function edit(data) {
return request({ return request({
url: 'api/localStorage/modifyLocalStorageById', url: 'api/localStorage/modifyLocalStorageById',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export default { add, edit, del } export default { add, edit, del }
+65 -65
View File
@@ -1,65 +1,65 @@
import request from '@/utils/request' import request from '@/utils/request'
export function queryMenuListByPid(pid) { export function queryMenuListByPid(pid) {
return request({ return request({
url: 'api/menu/queryMenuListByPid?pid=' + pid, url: 'api/menu/queryMenuListByPid?pid=' + pid,
method: 'post' method: 'post'
}) })
} }
export function queryMenuByArgs(params) { export function queryMenuByArgs(params) {
return request({ return request({
url: 'api/menu/queryMenuByArgs', url: 'api/menu/queryMenuByArgs',
method: 'post', method: 'post',
data: params data: params
}) })
} }
export function queryMenuSuperior(ids) { export function queryMenuSuperior(ids) {
const data = Array.isArray(ids) ? ids : [ids] const data = Array.isArray(ids) ? ids : [ids]
return request({ return request({
url: 'api/menu/queryMenuSuperior', url: 'api/menu/queryMenuSuperior',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function queryChildMenuSet(id) { export function queryChildMenuSet(id) {
return request({ return request({
url: 'api/menu/queryChildMenuSet?id=' + id, url: 'api/menu/queryChildMenuSet?id=' + id,
method: 'post' method: 'post'
}) })
} }
export function buildMenus() { export function buildMenus() {
return request({ return request({
url: 'api/menu/buildMenus', url: 'api/menu/buildMenus',
method: 'post' method: 'post'
}) })
} }
export function add(data) { export function add(data) {
return request({ return request({
url: 'api/menu/saveMenu', url: 'api/menu/saveMenu',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function del(ids) { export function del(ids) {
return request({ return request({
url: 'api/menu/removeMenuByIds', url: 'api/menu/removeMenuByIds',
method: 'post', method: 'post',
data: ids data: ids
}) })
} }
export function edit(data) { export function edit(data) {
return request({ return request({
url: 'api/menu/modifyMenuById', url: 'api/menu/modifyMenuById',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export default { add, edit, del, queryMenuListByPid, queryMenuSuperior, queryMenuByArgs, queryChildMenuSet } export default { add, edit, del, queryMenuListByPid, queryMenuSuperior, queryMenuByArgs, queryChildMenuSet }
+9 -9
View File
@@ -1,9 +1,9 @@
import request from '@/utils/request' import request from '@/utils/request'
export function kickOutUser(keys) { export function kickOutUser(keys) {
return request({ return request({
url: 'api/user/online/kickOutUser', url: 'api/user/online/kickOutUser',
method: 'post', method: 'post',
data: keys data: keys
}) })
} }
+19 -19
View File
@@ -1,19 +1,19 @@
import request from '@/utils/request' import request from '@/utils/request'
export function add(data) { export function add(data) {
return request({ return request({
url: 'api/ossStorage/uploadFile', url: 'api/ossStorage/uploadFile',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function del(ids) { export function del(ids) {
return request({ return request({
url: 'api/ossStorage/removeFileByIds', url: 'api/ossStorage/removeFileByIds',
method: 'post', method: 'post',
data: ids data: ids
}) })
} }
export default { add, del } export default { add, del }
+41 -41
View File
@@ -1,41 +1,41 @@
import request from '@/utils/request' import request from '@/utils/request'
export function add(data) { export function add(data) {
return request({ return request({
url: 'api/quartzJob/createQuartzJob', url: 'api/quartzJob/createQuartzJob',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function del(ids) { export function del(ids) {
return request({ return request({
url: 'api/quartzJob/removeJobByIds', url: 'api/quartzJob/removeJobByIds',
method: 'post', method: 'post',
data: ids data: ids
}) })
} }
export function edit(data) { export function edit(data) {
return request({ return request({
url: 'api/quartzJob', url: 'api/quartzJob',
method: 'put', method: 'put',
data: data data: data
}) })
} }
export function switchQuartzJobStatus(id) { export function switchQuartzJobStatus(id) {
return request({ return request({
url: 'api/quartzJob/switchQuartzJobStatus/' + id, url: 'api/quartzJob/switchQuartzJobStatus/' + id,
method: 'post' method: 'post'
}) })
} }
export function startQuartzJob(id) { export function startQuartzJob(id) {
return request({ return request({
url: 'api/quartzJob/startQuartzJob/' + id, url: 'api/quartzJob/startQuartzJob/' + id,
method: 'post' method: 'post'
}) })
} }
export default { add, edit, del, switchQuartzJobStatus, startQuartzJob } export default { add, edit, del, switchQuartzJobStatus, startQuartzJob }
+58 -58
View File
@@ -1,58 +1,58 @@
import request from '@/utils/request' import request from '@/utils/request'
// 获取所有的Role // 获取所有的Role
export function queryRoleList() { export function queryRoleList() {
return request({ return request({
url: 'api/role/queryRoleList', url: 'api/role/queryRoleList',
method: 'post' method: 'post'
}) })
} }
export function add(data) { export function add(data) {
return request({ return request({
url: 'api/role/saveRole', url: 'api/role/saveRole',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function get(id) { export function get(id) {
return request({ return request({
url: 'api/role/queryRoleById', url: 'api/role/queryRoleById',
method: 'post', method: 'post',
data: { id: id } data: { id: id }
}) })
} }
export function getLevel() { export function getLevel() {
return request({ return request({
url: 'api/role/queryRoleLevel', url: 'api/role/queryRoleLevel',
method: 'post' method: 'post'
}) })
} }
export function del(ids) { export function del(ids) {
return request({ return request({
url: 'api/role/removeRoleByIds', url: 'api/role/removeRoleByIds',
method: 'post', method: 'post',
data: ids data: ids
}) })
} }
export function edit(data) { export function edit(data) {
return request({ return request({
url: 'api/role/modifyRoleById', url: 'api/role/modifyRoleById',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function editMenu(data) { export function editMenu(data) {
return request({ return request({
url: 'api/role/modifyBindMenuById', url: 'api/role/modifyBindMenuById',
method: 'post', method: 'post',
data data
}) })
} }
export default { add, edit, del, get, editMenu, getLevel } export default { add, edit, del, get, editMenu, getLevel }
+84 -84
View File
@@ -1,84 +1,84 @@
import request from '@/utils/request' import request from '@/utils/request'
import { encrypt } from '@/utils/CsRsaUtil' import { encrypt } from '@/utils/CsRsaUtil'
export function add(data) { export function add(data) {
return request({ return request({
url: 'api/user/saveUser', url: 'api/user/saveUser',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function del(ids) { export function del(ids) {
return request({ return request({
url: 'api/user/removeUserByIds', url: 'api/user/removeUserByIds',
method: 'post', method: 'post',
data: ids data: ids
}) })
} }
export function resetPwd(ids) { export function resetPwd(ids) {
return request({ return request({
url: 'api/user/resetUserPasswordByIds', url: 'api/user/resetUserPasswordByIds',
method: 'post', method: 'post',
data: ids data: ids
}) })
} }
export function edit(data) { export function edit(data) {
return request({ return request({
url: 'api/user/modifyUserById', url: 'api/user/modifyUserById',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function editUser(data) { export function editUser(data) {
return request({ return request({
url: 'api/user/modifyUserCenterInfoById', url: 'api/user/modifyUserCenterInfoById',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function updatePass(user) { export function updatePass(user) {
const data = { const data = {
oldPass: encrypt(user.oldPass), oldPass: encrypt(user.oldPass),
newPass: encrypt(user.newPass) newPass: encrypt(user.newPass)
} }
return request({ return request({
url: 'api/user/modifyUserPasswordByUsername', url: 'api/user/modifyUserPasswordByUsername',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function updateEmail(form) { export function updateEmail(form) {
const data = { const data = {
password: encrypt(form.pass), password: encrypt(form.pass),
email: form.email email: form.email
} }
return request({ return request({
url: 'api/user/modifyUserEmailByUsername/' + form.code, url: 'api/user/modifyUserEmailByUsername/' + form.code,
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function queryUserMetaPage(query) { export function queryUserMetaPage(query) {
const params = { const params = {
page: 1, page: 1,
size: 50, size: 50,
args: { args: {
blurry: query blurry: query
} }
} }
return request({ return request({
url: 'api/user/queryUserMetadataOptions', url: 'api/user/queryUserMetadataOptions',
method: 'post', method: 'post',
data: params data: params
}) })
} }
export default { add, edit, del, resetPwd, queryUserMetaPage } export default { add, edit, del, resetPwd, queryUserMetaPage }
+9 -9
View File
@@ -1,9 +1,9 @@
import Vue from 'vue' import Vue from 'vue'
import SvgIcon from '@/components/SvgIcon'// svg component import SvgIcon from '@/components/SvgIcon'// svg component
// register globally // register globally
Vue.component('svg-icon', SvgIcon) Vue.component('svg-icon', SvgIcon)
const req = require.context('./svg', false, /\.svg$/) const req = require.context('./svg', false, /\.svg$/)
const requireAll = requireContext => requireContext.keys().map(requireContext) const requireAll = requireContext => requireContext.keys().map(requireContext)
requireAll(req) requireAll(req)
+1 -1
View File
@@ -1,2 +1,2 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543748455010" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1208" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: rbicon; src: url("chrome-extension://dipiagiiohfljcicegpgffpbnjmgjcnf/fonts/rbicon.woff2") format("woff2"); font-weight: normal; font-style: normal; } <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543748455010" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1208" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: rbicon; src: url("chrome-extension://dipiagiiohfljcicegpgffpbnjmgjcnf/fonts/rbicon.woff2") format("woff2"); font-weight: normal; font-style: normal; }
</style></defs><path d="M590.769231 571.076923h324.923077c15.753846 0 29.538462-13.784615 29.538461-29.538461v-59.076924c0-15.753846-13.784615-29.538462-29.538461-29.538461H590.769231c-11.815385 0-19.692308-7.876923-19.692308-19.692308V108.307692c0-15.753846-13.784615-29.538462-29.538461-29.538461h-59.076924c-15.753846 0-29.538462 13.784615-29.538461 29.538461V433.230769c0 11.815385-7.876923 19.692308-19.692308 19.692308H108.307692c-15.753846 0-29.538462 13.784615-29.538461 29.538461v59.076924c0 15.753846 13.784615 29.538462 29.538461 29.538461H433.230769c11.815385 0 19.692308 7.876923 19.692308 19.692308v324.923077c0 15.753846 13.784615 29.538462 29.538461 29.538461h59.076924c15.753846 0 29.538462-13.784615 29.538461-29.538461V590.769231c0-11.815385 7.876923-19.692308 19.692308-19.692308z" p-id="1209"></path></svg> </style></defs><path d="M590.769231 571.076923h324.923077c15.753846 0 29.538462-13.784615 29.538461-29.538461v-59.076924c0-15.753846-13.784615-29.538462-29.538461-29.538461H590.769231c-11.815385 0-19.692308-7.876923-19.692308-19.692308V108.307692c0-15.753846-13.784615-29.538462-29.538461-29.538461h-59.076924c-15.753846 0-29.538462 13.784615-29.538461 29.538461V433.230769c0 11.815385-7.876923 19.692308-19.692308 19.692308H108.307692c-15.753846 0-29.538462 13.784615-29.538461 29.538461v59.076924c0 15.753846 13.784615 29.538462 29.538461 29.538461H433.230769c11.815385 0 19.692308 7.876923 19.692308 19.692308v324.923077c0 15.753846 13.784615 29.538462 29.538461 29.538461h59.076924c15.753846 0 29.538462-13.784615 29.538461-29.538461V590.769231c0-11.815385 7.876923-19.692308 19.692308-19.692308z" p-id="1209"></path></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -1 +1 @@
<svg t="1585887096878" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2475" width="200" height="200"><path d="M749.010 972.915h-474.022c-79.501 0-144.179-64.678-144.179-144.179v-612.227c0-79.501 64.678-144.179 144.179-144.179h61.891c24.129 0 43.691 19.562 43.691 43.691 0 24.13-19.562 43.691-43.691 43.691h-61.891c-31.317 0-56.798 25.479-56.798 56.798v612.227c0 31.318 25.481 56.798 56.798 56.798h474.022c31.318 0 56.798-25.479 56.798-56.798v-612.227c0-31.318-25.479-56.798-56.798-56.798h-61.891c-24.129 0-43.691-19.561-43.691-43.691 0-24.129 19.562-43.691 43.691-43.691h61.891c79.501 0 144.179 64.678 144.179 144.179v612.227c0 79.501-64.678 144.179-144.179 144.179z" fill="#2c2c2c" p-id="2476"></path><path d="M564.060 181.556h-104.123c-36.195 0-65.536-29.341-65.536-65.536s29.341-65.536 65.536-65.536h104.123c36.195 0 65.536 29.341 65.536 65.536s-29.341 65.536-65.536 65.536zM679.372 402.192h-334.743c-24.129 0-43.691-19.562-43.691-43.691s19.562-43.691 43.691-43.691h334.743c24.129 0 43.691 19.562 43.691 43.691s-19.562 43.691-43.691 43.691zM679.372 573.669h-334.743c-24.129 0-43.691-19.562-43.691-43.691s19.562-43.691 43.691-43.691h334.743c24.129 0 43.691 19.562 43.691 43.691s-19.562 43.691-43.691 43.691zM679.372 745.147h-334.743c-24.129 0-43.691-19.562-43.691-43.691s19.562-43.691 43.691-43.691h334.743c24.129 0 43.691 19.562 43.691 43.691s-19.562 43.691-43.691 43.691z"></path></svg> <svg t="1585887096878" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2475" width="200" height="200"><path d="M749.010 972.915h-474.022c-79.501 0-144.179-64.678-144.179-144.179v-612.227c0-79.501 64.678-144.179 144.179-144.179h61.891c24.129 0 43.691 19.562 43.691 43.691 0 24.13-19.562 43.691-43.691 43.691h-61.891c-31.317 0-56.798 25.479-56.798 56.798v612.227c0 31.318 25.481 56.798 56.798 56.798h474.022c31.318 0 56.798-25.479 56.798-56.798v-612.227c0-31.318-25.479-56.798-56.798-56.798h-61.891c-24.129 0-43.691-19.561-43.691-43.691 0-24.129 19.562-43.691 43.691-43.691h61.891c79.501 0 144.179 64.678 144.179 144.179v612.227c0 79.501-64.678 144.179-144.179 144.179z" fill="#2c2c2c" p-id="2476"></path><path d="M564.060 181.556h-104.123c-36.195 0-65.536-29.341-65.536-65.536s29.341-65.536 65.536-65.536h104.123c36.195 0 65.536 29.341 65.536 65.536s-29.341 65.536-65.536 65.536zM679.372 402.192h-334.743c-24.129 0-43.691-19.562-43.691-43.691s19.562-43.691 43.691-43.691h334.743c24.129 0 43.691 19.562 43.691 43.691s-19.562 43.691-43.691 43.691zM679.372 573.669h-334.743c-24.129 0-43.691-19.562-43.691-43.691s19.562-43.691 43.691-43.691h334.743c24.129 0 43.691 19.562 43.691 43.691s-19.562 43.691-43.691 43.691zM679.372 745.147h-334.743c-24.129 0-43.691-19.562-43.691-43.691s19.562-43.691 43.691-43.691h334.743c24.129 0 43.691 19.562 43.691 43.691s-19.562 43.691-43.691 43.691z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="211.719" height="200" class="icon" p-id="10233" t="1543827724451" version="1.1" viewBox="0 0 1084 1024"><defs><style type="text/css">@font-face{font-family:rbicon;src:url(chrome-extension://dipiagiiohfljcicegpgffpbnjmgjcnf/fonts/rbicon.woff2) format(&quot;woff2&quot;);font-weight:400;font-style:normal}</style></defs><path fill="#bfbfbf" d="M1080.09609 434.500756c-4.216302-23.731757-26.9241-47.945376-50.595623-53.185637l-17.648235-4.095836a175.940257 175.940257 0 0 1-101.612877-80.832531 177.807476 177.807476 0 0 1-18.732427-129.801867l5.541425-16.684509c7.10748-23.129428-2.108151-54.992624-20.599646-70.833873 0 0-16.624276-14.094495-63.244529-41.199293-46.800951-26.984332-66.858502-34.513443-66.858502-34.513443-22.76803-8.372371-54.631227-0.361397-71.255503 17.407304l-12.287509 13.251234a173.470708 173.470708 0 0 1-120.465769 48.065842A174.13327 174.13327 0 0 1 421.329029 33.590675L409.583617 20.761071C393.140039 2.99237 361.096144-4.898138 338.267881 3.353767c0 0-20.358715 7.529111-67.099434 34.513443-46.800951 27.34573-63.244529 41.440225-63.244529 41.440225-18.431263 15.66055-27.646894 47.222582-20.539413 70.592941l5.059562 16.865207a178.048407 178.048407 0 0 1-18.672194 129.621169 174.916297 174.916297 0 0 1-102.275439 81.073463l-17.045906 3.854904c-23.310126 5.42096-46.258856 29.333415-50.595623 53.185637 0 0-3.854905 21.382674-3.854905 75.712737 0 54.330062 3.854905 75.712736 3.854905 75.712736 4.216302 23.972688 26.9241 47.945376 50.595623 53.185637l16.624276 3.854905a174.253736 174.253736 0 0 1 102.395904 81.314394c23.310126 40.837896 28.911785 87.337683 18.732427 129.801867l-4.81863 16.443578c-7.10748 23.129428 2.108151 54.992624 20.599646 70.833872 0 0 16.624276 14.094495 63.244529 41.199293 46.800951 27.104798 66.918735 34.513443 66.918735 34.513443 22.707798 8.372371 54.631227 0.361397 71.255503-17.407303l11.624947-12.588673a175.096996 175.096996 0 0 1 242.256662 0.120465l11.624947 12.648906c16.383345 17.708468 48.427239 25.598976 71.255503 17.347071 0 0 20.358715-7.529111 67.159666-34.513443 46.740719-27.104798 63.124063-41.199293 63.124064-41.199293 18.491496-15.600317 27.707127-47.463513 20.599646-70.833873l-5.059562-17.106139a176.723284 176.723284 0 0 1 18.672194-129.139305 176.060722 176.060722 0 0 1 102.395904-81.314394l16.68451-3.854905c23.310126-5.42096 46.258856-29.333415 50.595623-53.185637 0 0 3.854905-21.382674 3.854904-75.712737-0.240932-54.330062-4.095836-75.833202-4.095836-75.833202z m-537.819428 293.334149c-119.261112 0-216.175824-97.336342-216.175824-217.621412a216.657687 216.657687 0 0 1 216.236057-217.320249c119.200879 0 216.115591 97.276109 216.11559 217.56118-0.240932 120.044139-96.974945 217.320248-216.175823 217.320249z" p-id="10234"/></svg> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="211.719" height="200" class="icon" p-id="10233" t="1543827724451" version="1.1" viewBox="0 0 1084 1024"><defs><style type="text/css">@font-face{font-family:rbicon;src:url(chrome-extension://dipiagiiohfljcicegpgffpbnjmgjcnf/fonts/rbicon.woff2) format(&quot;woff2&quot;);font-weight:400;font-style:normal}</style></defs><path fill="#bfbfbf" d="M1080.09609 434.500756c-4.216302-23.731757-26.9241-47.945376-50.595623-53.185637l-17.648235-4.095836a175.940257 175.940257 0 0 1-101.612877-80.832531 177.807476 177.807476 0 0 1-18.732427-129.801867l5.541425-16.684509c7.10748-23.129428-2.108151-54.992624-20.599646-70.833873 0 0-16.624276-14.094495-63.244529-41.199293-46.800951-26.984332-66.858502-34.513443-66.858502-34.513443-22.76803-8.372371-54.631227-0.361397-71.255503 17.407304l-12.287509 13.251234a173.470708 173.470708 0 0 1-120.465769 48.065842A174.13327 174.13327 0 0 1 421.329029 33.590675L409.583617 20.761071C393.140039 2.99237 361.096144-4.898138 338.267881 3.353767c0 0-20.358715 7.529111-67.099434 34.513443-46.800951 27.34573-63.244529 41.440225-63.244529 41.440225-18.431263 15.66055-27.646894 47.222582-20.539413 70.592941l5.059562 16.865207a178.048407 178.048407 0 0 1-18.672194 129.621169 174.916297 174.916297 0 0 1-102.275439 81.073463l-17.045906 3.854904c-23.310126 5.42096-46.258856 29.333415-50.595623 53.185637 0 0-3.854905 21.382674-3.854905 75.712737 0 54.330062 3.854905 75.712736 3.854905 75.712736 4.216302 23.972688 26.9241 47.945376 50.595623 53.185637l16.624276 3.854905a174.253736 174.253736 0 0 1 102.395904 81.314394c23.310126 40.837896 28.911785 87.337683 18.732427 129.801867l-4.81863 16.443578c-7.10748 23.129428 2.108151 54.992624 20.599646 70.833872 0 0 16.624276 14.094495 63.244529 41.199293 46.800951 27.104798 66.918735 34.513443 66.918735 34.513443 22.707798 8.372371 54.631227 0.361397 71.255503-17.407303l11.624947-12.588673a175.096996 175.096996 0 0 1 242.256662 0.120465l11.624947 12.648906c16.383345 17.708468 48.427239 25.598976 71.255503 17.347071 0 0 20.358715-7.529111 67.159666-34.513443 46.740719-27.104798 63.124063-41.199293 63.124064-41.199293 18.491496-15.600317 27.707127-47.463513 20.599646-70.833873l-5.059562-17.106139a176.723284 176.723284 0 0 1 18.672194-129.139305 176.060722 176.060722 0 0 1 102.395904-81.314394l16.68451-3.854905c23.310126-5.42096 46.258856-29.333415 50.595623-53.185637 0 0 3.854905-21.382674 3.854904-75.712737-0.240932-54.330062-4.095836-75.833202-4.095836-75.833202z m-537.819428 293.334149c-119.261112 0-216.175824-97.336342-216.175824-217.621412a216.657687 216.657687 0 0 1 216.236057-217.320249c119.200879 0 216.115591 97.276109 216.11559 217.56118-0.240932 120.044139-96.974945 217.320248-216.175823 217.320249z" p-id="10234"/></svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

@@ -1 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1576038092392" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20105" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M753.6 222.4h24c19.2 0 33.6-14.4 33.6-32V57.6c0-19.2-14.4-33.6-33.6-33.6h-24c-19.2 0-33.6 14.4-33.6 33.6v131.2c0 19.2 14.4 33.6 33.6 33.6zM251.2 222.4h24c19.2 0 33.6-14.4 33.6-32V57.6c0-19.2-14.4-33.6-33.6-33.6h-24c-19.2 0-33.6 14.4-33.6 33.6v131.2c0 19.2 14.4 33.6 33.6 33.6z" fill="#d4237a" p-id="20106"></path><path d="M928 134.4h-68.8v56c0 41.6-33.6 76.8-80 76.8h-24c-43.2 0-80-33.6-80-76.8V134.4h-320v56c0 41.6-33.6 76.8-80 76.8h-24c-43.2 0-80-33.6-80-76.8V134.4H105.6c-38.4 0-68.8 28.8-68.8 67.2v731.2c0 38.4 30.4 67.2 68.8 67.2h820.8c38.4 0 68.8-28.8 70.4-67.2V201.6c0-38.4-30.4-67.2-68.8-67.2zM105.6 932.8V355.2h820.8s0 577.6 1.6 577.6H105.6z" fill="#d4237a" p-id="20107"></path><path d="M500.8 548.8l-49.6 33.6c14.4 16 33.6 41.6 60.8 75.2l54.4-35.2c-19.2-22.4-40-46.4-65.6-73.6z" fill="#d4237a" p-id="20108"></path><path d="M553.6 451.2l14.4-14.4v-1.6H480c-51.2 68.8-118.4 121.6-196.8 155.2 11.2 12.8 25.6 28.8 41.6 54.4 80-40 142.4-89.6 188.8-148.8 43.2 59.2 102.4 107.2 180.8 144 14.4-19.2 27.2-35.2 41.6-52.8-76.8-30.4-137.6-76.8-182.4-136zM339.2 716.8h246.4c-30.4 43.2-62.4 81.6-94.4 116.8l60.8 33.6c49.6-56 89.6-108.8 123.2-155.2v-54.4h-336v59.2z" fill="#d4237a" p-id="20109"></path></svg> <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1576038092392" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20105" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M753.6 222.4h24c19.2 0 33.6-14.4 33.6-32V57.6c0-19.2-14.4-33.6-33.6-33.6h-24c-19.2 0-33.6 14.4-33.6 33.6v131.2c0 19.2 14.4 33.6 33.6 33.6zM251.2 222.4h24c19.2 0 33.6-14.4 33.6-32V57.6c0-19.2-14.4-33.6-33.6-33.6h-24c-19.2 0-33.6 14.4-33.6 33.6v131.2c0 19.2 14.4 33.6 33.6 33.6z" fill="#d4237a" p-id="20106"></path><path d="M928 134.4h-68.8v56c0 41.6-33.6 76.8-80 76.8h-24c-43.2 0-80-33.6-80-76.8V134.4h-320v56c0 41.6-33.6 76.8-80 76.8h-24c-43.2 0-80-33.6-80-76.8V134.4H105.6c-38.4 0-68.8 28.8-68.8 67.2v731.2c0 38.4 30.4 67.2 68.8 67.2h820.8c38.4 0 68.8-28.8 70.4-67.2V201.6c0-38.4-30.4-67.2-68.8-67.2zM105.6 932.8V355.2h820.8s0 577.6 1.6 577.6H105.6z" fill="#d4237a" p-id="20107"></path><path d="M500.8 548.8l-49.6 33.6c14.4 16 33.6 41.6 60.8 75.2l54.4-35.2c-19.2-22.4-40-46.4-65.6-73.6z" fill="#d4237a" p-id="20108"></path><path d="M553.6 451.2l14.4-14.4v-1.6H480c-51.2 68.8-118.4 121.6-196.8 155.2 11.2 12.8 25.6 28.8 41.6 54.4 80-40 142.4-89.6 188.8-148.8 43.2 59.2 102.4 107.2 180.8 144 14.4-19.2 27.2-35.2 41.6-52.8-76.8-30.4-137.6-76.8-182.4-136zM339.2 716.8h246.4c-30.4 43.2-62.4 81.6-94.4 116.8l60.8 33.6c49.6-56 89.6-108.8 123.2-155.2v-54.4h-336v59.2z" fill="#d4237a" p-id="20109"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

+22 -22
View File
@@ -1,22 +1,22 @@
# replace default config # replace default config
# multipass: true # multipass: true
# full: true # full: true
plugins: plugins:
# - name # - name
# #
# or: # or:
# - name: false # - name: false
# - name: true # - name: true
# #
# or: # or:
# - name: # - name:
# param1: 1 # param1: 1
# param2: 2 # param2: 2
- removeAttrs: - removeAttrs:
attrs: attrs:
- 'fill' - 'fill'
- 'fill-rule' - 'fill-rule'
Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 KiB

+99 -99
View File
@@ -1,99 +1,99 @@
@import 'variables'; @import 'variables';
@mixin colorBtn($color) { @mixin colorBtn($color) {
background: $color; background: $color;
&:hover { &:hover {
color: $color; color: $color;
&:before, &:before,
&:after { &:after {
background: $color; background: $color;
} }
} }
} }
.blue-btn { .blue-btn {
@include colorBtn($blue) @include colorBtn($blue)
} }
.light-blue-btn { .light-blue-btn {
@include colorBtn($light-blue) @include colorBtn($light-blue)
} }
.red-btn { .red-btn {
@include colorBtn($red) @include colorBtn($red)
} }
.pink-btn { .pink-btn {
@include colorBtn($pink) @include colorBtn($pink)
} }
.green-btn { .green-btn {
@include colorBtn($green) @include colorBtn($green)
} }
.tiffany-btn { .tiffany-btn {
@include colorBtn($tiffany) @include colorBtn($tiffany)
} }
.yellow-btn { .yellow-btn {
@include colorBtn($yellow) @include colorBtn($yellow)
} }
.pan-btn { .pan-btn {
font-size: 14px; font-size: 14px;
color: #fff; color: #fff;
padding: 14px 36px; padding: 14px 36px;
border-radius: 8px; border-radius: 8px;
border: none; border: none;
outline: none; outline: none;
transition: 600ms ease all; transition: 600ms ease all;
position: relative; position: relative;
display: inline-block; display: inline-block;
&:hover { &:hover {
background: #fff; background: #fff;
&:before, &:before,
&:after { &:after {
width: 100%; width: 100%;
transition: 600ms ease all; transition: 600ms ease all;
} }
} }
&:before, &:before,
&:after { &:after {
content: ''; content: '';
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
height: 2px; height: 2px;
width: 0; width: 0;
transition: 400ms ease all; transition: 400ms ease all;
} }
&::after { &::after {
right: inherit; right: inherit;
top: inherit; top: inherit;
left: 0; left: 0;
bottom: 0; bottom: 0;
} }
} }
.custom-button { .custom-button {
display: inline-block; display: inline-block;
line-height: 1; line-height: 1;
white-space: nowrap; white-space: nowrap;
cursor: pointer; cursor: pointer;
background: #fff; background: #fff;
color: #fff; color: #fff;
-webkit-appearance: none; -webkit-appearance: none;
text-align: center; text-align: center;
box-sizing: border-box; box-sizing: border-box;
outline: 0; outline: 0;
margin: 0; margin: 0;
padding: 10px 15px; padding: 10px 15px;
font-size: 14px; font-size: 14px;
border-radius: 4px; border-radius: 4px;
} }
+117 -117
View File
@@ -1,117 +1,117 @@
.head-container { .head-container {
padding-bottom: 10px; padding-bottom: 10px;
.filter-item { .filter-item {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
margin: 0 3px 10px 0; margin: 0 3px 10px 0;
input { input {
height: 30.5px; height: 30.5px;
line-height: 30.5px; line-height: 30.5px;
} }
} }
.el-form-item-label { .el-form-item-label {
margin: 0 3px 9px 0; margin: 0 3px 9px 0;
display: inline-block; display: inline-block;
text-align: right; text-align: right;
vertical-align: middle; vertical-align: middle;
font-size: 14px; font-size: 14px;
color: #606266; color: #606266;
line-height: 30.5px; line-height: 30.5px;
padding: 0 7px 0 7px; padding: 0 7px 0 7px;
} }
.el-button+.el-button { .el-button+.el-button {
margin-left: 0 !important; margin-left: 0 !important;
} }
.el-select__caret.el-input__icon.el-icon-arrow-up{ .el-select__caret.el-input__icon.el-icon-arrow-up{
line-height: 30.5px; line-height: 30.5px;
} }
.date-item { .date-item {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
margin-bottom: 10px; margin-bottom: 10px;
height: 30.5px !important; height: 30.5px !important;
width: 230px !important; width: 230px !important;
} }
} }
.el-avatar { .el-avatar {
display: inline-block; display: inline-block;
text-align: center; text-align: center;
background: #ccc; background: #ccc;
color: #fff; color: #fff;
white-space: nowrap; white-space: nowrap;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
vertical-align: middle; vertical-align: middle;
width: 32px; width: 32px;
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
border-radius: 16px; border-radius: 16px;
} }
.logo-con{ .logo-con{
height: 60px; height: 60px;
padding: 13px 0 0; padding: 13px 0 0;
img{ img{
height: 32px; height: 32px;
width: 135px; width: 135px;
display: block; display: block;
//margin: 0 auto; //margin: 0 auto;
} }
} }
#el-login-footer { #el-login-footer {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
text-align: center; text-align: center;
color: #fff; color: #fff;
font-family: Arial, serif; font-family: Arial, serif;
font-size: 12px; font-size: 12px;
letter-spacing: 1px; letter-spacing: 1px;
} }
#el-main-footer { #el-main-footer {
background: none repeat scroll 0 0 white; background: none repeat scroll 0 0 white;
border-top: 1px solid #e7eaec; border-top: 1px solid #e7eaec;
overflow: hidden; overflow: hidden;
padding: 10px 6px 0 6px; padding: 10px 6px 0 6px;
height: 33px; height: 33px;
font-size: 0.7rem !important; font-size: 0.7rem !important;
color: #7a8b9a; color: #7a8b9a;
letter-spacing: 0.8px; letter-spacing: 0.8px;
font-family: Arial, sans-serif !important; font-family: Arial, sans-serif !important;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
z-index: 99; z-index: 99;
width: 100%; width: 100%;
} }
.my-upload { .my-upload {
border: 1px dashed #c0ccda; border: 1px dashed #c0ccda;
border-radius: 5px; border-radius: 5px;
height: 45px; height: 45px;
line-height: 45px; line-height: 45px;
width: 368px; width: 368px;
} }
.my-blockquote{ .my-blockquote{
margin: 0 0 10px; margin: 0 0 10px;
padding: 15px; padding: 15px;
line-height: 22px; line-height: 22px;
border-left: 5px solid #00437B; border-left: 5px solid #00437B;
border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0;
background-color: #f2f2f2; background-color: #f2f2f2;
} }
.my-code{ .my-code{
position: relative; position: relative;
padding: 15px; padding: 15px;
line-height: 20px; line-height: 20px;
border-left: 5px solid #ddd; border-left: 5px solid #ddd;
color: #333; color: #333;
font-family: Courier New, serif; font-family: Courier New, serif;
font-size: 12px font-size: 12px
} }
.el-tabs{ .el-tabs{
margin-bottom: 25px; margin-bottom: 25px;
} }
@@ -1,79 +1,79 @@
// cover some element-ui styles // cover some element-ui styles
.el-breadcrumb__inner, .el-breadcrumb__inner,
.el-breadcrumb__inner a { .el-breadcrumb__inner a {
font-weight: 400 !important; font-weight: 400 !important;
} }
.el-upload { .el-upload {
input[type="file"] { input[type="file"] {
display: none !important; display: none !important;
} }
} }
.el-upload__input { .el-upload__input {
display: none; display: none;
} }
.cell { .cell {
.el-tag { .el-tag {
margin-right: 0; margin-right: 0;
} }
} }
.small-padding { .small-padding {
.cell { .cell {
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
} }
} }
.fixed-width { .fixed-width {
.el-button--mini { .el-button--mini {
padding: 7px 10px; padding: 7px 10px;
width: 60px; width: 60px;
} }
} }
.status-col { .status-col {
.cell { .cell {
padding: 0 10px; padding: 0 10px;
text-align: center; text-align: center;
.el-tag { .el-tag {
margin-right: 0; margin-right: 0;
} }
} }
} }
// to fixed https://github.com/ElemeFE/element/issues/2461 // to fixed https://github.com/ElemeFE/element/issues/2461
.el-dialog { .el-dialog {
transform: none; transform: none;
left: 0; left: 0;
position: relative; position: relative;
margin: 0 auto; margin: 0 auto;
} }
// refine element ui upload // refine element ui upload
.upload-container { .upload-container {
.el-upload { .el-upload {
width: 100%; width: 100%;
.el-upload-dragger { .el-upload-dragger {
width: 100%; width: 100%;
height: 200px; height: 200px;
} }
} }
} }
// dropdown // dropdown
.el-dropdown-menu { .el-dropdown-menu {
a { a {
display: block display: block
} }
} }
// fix date-picker ui bug in filter-item // fix date-picker ui bug in filter-item
.el-range-editor.el-input__inner { .el-range-editor.el-input__inner {
display: inline-flex !important; display: inline-flex !important;
} }
@@ -1,31 +1,31 @@
/** /**
* I think element-ui's default theme color is too light for long-term use. * I think element-ui's default theme color is too light for long-term use.
* So I modified the default color and you can modify it to your liking. * So I modified the default color and you can modify it to your liking.
**/ **/
/* theme color */ /* theme color */
$--color-primary: #1890ff; $--color-primary: #1890ff;
$--color-success: #13ce66; $--color-success: #13ce66;
$--color-warning: #FFBA00; $--color-warning: #FFBA00;
$--color-danger: #ff4949; $--color-danger: #ff4949;
// $--color-info: #1E1E1E; // $--color-info: #1E1E1E;
$--button-font-weight: 400; $--button-font-weight: 400;
// $--color-text-regular: #1f2d3d; // $--color-text-regular: #1f2d3d;
$--border-color-light: #dfe4ed; $--border-color-light: #dfe4ed;
$--border-color-lighter: #e6ebf5; $--border-color-lighter: #e6ebf5;
$--table-border:1px solid#dfe6ec; $--table-border:1px solid#dfe6ec;
/* icon font path, required */ /* icon font path, required */
$--font-path: '~element-ui/lib/theme-chalk/fonts'; $--font-path: '~element-ui/lib/theme-chalk/fonts';
@import "../../../node_modules/element-ui/packages/theme-chalk/src/index"; @import "../../../node_modules/element-ui/packages/theme-chalk/src/index";
// the :export directive is the magic sauce for webpack // the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
:export { :export {
theme: $--color-primary; theme: $--color-primary;
} }
+182 -182
View File
@@ -1,182 +1,182 @@
@import 'variables'; @import 'variables';
@import 'mixin'; @import 'mixin';
@import 'transition'; @import 'transition';
@import 'element-ui'; @import 'element-ui';
@import 'sidebar'; @import 'sidebar';
@import 'btn'; @import 'btn';
@import 'cutejava'; @import 'cutejava';
body { body {
height: 100%; height: 100%;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
} }
label { label {
font-weight: 700; font-weight: 700;
} }
html { html {
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
} }
#app { #app {
height: 100%; height: 100%;
} }
*, *,
*:before, *:before,
*:after { *:after {
box-sizing: inherit; box-sizing: inherit;
} }
.no-padding { .no-padding {
padding: 0 !important; padding: 0 !important;
} }
.padding-content { .padding-content {
padding: 4px 0; padding: 4px 0;
} }
a:focus, a:focus,
a:active { a:active {
outline: none; outline: none;
} }
a, a,
a:focus, a:focus,
a:hover { a:hover {
cursor: pointer; cursor: pointer;
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
} }
div:focus { div:focus {
outline: none; outline: none;
} }
.fr { .fr {
float: right; float: right;
} }
.fl { .fl {
float: left; float: left;
} }
.pr-5 { .pr-5 {
padding-right: 5px; padding-right: 5px;
} }
.pl-5 { .pl-5 {
padding-left: 5px; padding-left: 5px;
} }
.block { .block {
display: block; display: block;
} }
.pointer { .pointer {
cursor: pointer; cursor: pointer;
} }
.inlineBlock { .inlineBlock {
display: block; display: block;
} }
.clearfix { .clearfix {
&:after { &:after {
visibility: hidden; visibility: hidden;
display: block; display: block;
font-size: 0; font-size: 0;
content: " "; content: " ";
clear: both; clear: both;
height: 0; height: 0;
} }
} }
aside { aside {
background: #eef1f6; background: #eef1f6;
padding: 8px 24px; padding: 8px 24px;
margin-bottom: 20px; margin-bottom: 20px;
border-radius: 2px; border-radius: 2px;
display: block; display: block;
line-height: 32px; line-height: 32px;
font-size: 16px; font-size: 16px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
color: #2c3e50; color: #2c3e50;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
a { a {
color: #337ab7; color: #337ab7;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
color: rgb(32, 160, 255); color: rgb(32, 160, 255);
} }
} }
} }
//main-container全局样式 //main-container全局样式
.app-container { .app-container {
padding: 20px 20px 45px 20px; padding: 20px 20px 45px 20px;
} }
.components-container { .components-container {
margin: 30px 50px; margin: 30px 50px;
position: relative; position: relative;
} }
.pagination-container { .pagination-container {
margin-top: 30px; margin-top: 30px;
} }
.text-center { .text-center {
text-align: center text-align: center
} }
.sub-navbar { .sub-navbar {
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
position: relative; position: relative;
width: 100%; width: 100%;
text-align: right; text-align: right;
padding-right: 20px; padding-right: 20px;
transition: 600ms ease position; transition: 600ms ease position;
background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%); background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);
.subtitle { .subtitle {
font-size: 20px; font-size: 20px;
color: #fff; color: #fff;
} }
&.draft { &.draft {
background: #d0d0d0; background: #d0d0d0;
} }
&.deleted { &.deleted {
background: #d0d0d0; background: #d0d0d0;
} }
} }
.link-type, .link-type,
.link-type:focus { .link-type:focus {
color: #337ab7; color: #337ab7;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
color: rgb(32, 160, 255); color: rgb(32, 160, 255);
} }
} }
//refine vue-multiselect plugin //refine vue-multiselect plugin
.multiselect { .multiselect {
line-height: 16px; line-height: 16px;
} }
.multiselect--active { .multiselect--active {
z-index: 1000 !important; z-index: 1000 !important;
} }
+66 -66
View File
@@ -1,66 +1,66 @@
@mixin clearfix { @mixin clearfix {
&:after { &:after {
content: ""; content: "";
display: table; display: table;
clear: both; clear: both;
} }
} }
@mixin scrollBar { @mixin scrollBar {
&::-webkit-scrollbar-track-piece { &::-webkit-scrollbar-track-piece {
background: #d3dce6; background: #d3dce6;
} }
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 6px; width: 6px;
} }
&::-webkit-scrollbar-thumb { &::-webkit-scrollbar-thumb {
background: #99a9bf; background: #99a9bf;
border-radius: 20px; border-radius: 20px;
} }
} }
@mixin relative { @mixin relative {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
@mixin pct($pct) { @mixin pct($pct) {
width: #{$pct}; width: #{$pct};
position: relative; position: relative;
margin: 0 auto; margin: 0 auto;
} }
@mixin triangle($width, $height, $color, $direction) { @mixin triangle($width, $height, $color, $direction) {
$width: $width/2; $width: $width/2;
$color-border-style: $height solid $color; $color-border-style: $height solid $color;
$transparent-border-style: $width solid transparent; $transparent-border-style: $width solid transparent;
height: 0; height: 0;
width: 0; width: 0;
@if $direction==up { @if $direction==up {
border-bottom: $color-border-style; border-bottom: $color-border-style;
border-left: $transparent-border-style; border-left: $transparent-border-style;
border-right: $transparent-border-style; border-right: $transparent-border-style;
} }
@else if $direction==right { @else if $direction==right {
border-left: $color-border-style; border-left: $color-border-style;
border-top: $transparent-border-style; border-top: $transparent-border-style;
border-bottom: $transparent-border-style; border-bottom: $transparent-border-style;
} }
@else if $direction==down { @else if $direction==down {
border-top: $color-border-style; border-top: $color-border-style;
border-left: $transparent-border-style; border-left: $transparent-border-style;
border-right: $transparent-border-style; border-right: $transparent-border-style;
} }
@else if $direction==left { @else if $direction==left {
border-right: $color-border-style; border-right: $color-border-style;
border-top: $transparent-border-style; border-top: $transparent-border-style;
border-bottom: $transparent-border-style; border-bottom: $transparent-border-style;
} }
} }
+209 -209
View File
@@ -1,209 +1,209 @@
#app { #app {
.main-container { .main-container {
min-height: 100%; min-height: 100%;
transition: margin-left .28s; transition: margin-left .28s;
margin-left: $sideBarWidth; margin-left: $sideBarWidth;
position: relative; position: relative;
} }
.sidebar-container { .sidebar-container {
transition: width 0.28s; transition: width 0.28s;
width: $sideBarWidth !important; width: $sideBarWidth !important;
background-color: $menuBg; background-color: $menuBg;
height: 100%; height: 100%;
position: fixed; position: fixed;
font-size: 0; font-size: 0;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: 1001; z-index: 1001;
overflow: hidden; overflow: hidden;
// reset element-ui css // reset element-ui css
.horizontal-collapse-transition { .horizontal-collapse-transition {
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out; transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
} }
.scrollbar-wrapper { .scrollbar-wrapper {
overflow-x: hidden !important; overflow-x: hidden !important;
} }
.el-scrollbar__bar.is-vertical { .el-scrollbar__bar.is-vertical {
right: 0; right: 0;
} }
.el-scrollbar { .el-scrollbar {
height: 100%; height: 100%;
} }
&.has-logo { &.has-logo {
.el-scrollbar { .el-scrollbar {
height: calc(100% - 50px); height: calc(100% - 50px);
} }
} }
.is-horizontal { .is-horizontal {
display: none; display: none;
} }
a { a {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
} }
.svg-icon { .svg-icon {
margin-right: 16px; margin-right: 16px;
} }
.el-menu { .el-menu {
border: none; border: none;
height: 100%; height: 100%;
width: 100% !important; width: 100% !important;
} }
// menu hover // menu hover
.submenu-title-noDropdown, .submenu-title-noDropdown,
.el-submenu__title { .el-submenu__title {
&:hover { &:hover {
background-color: $menuHover !important; background-color: $menuHover !important;
} }
} }
.is-active>.el-submenu__title { .is-active>.el-submenu__title {
color: $subMenuActiveText !important; color: $subMenuActiveText !important;
} }
& .nest-menu .el-submenu>.el-submenu__title, & .nest-menu .el-submenu>.el-submenu__title,
& .el-submenu .el-menu-item { & .el-submenu .el-menu-item {
min-width: $sideBarWidth !important; min-width: $sideBarWidth !important;
background-color: $subMenuBg !important; background-color: $subMenuBg !important;
&:hover { &:hover {
background-color: $subMenuHover !important; background-color: $subMenuHover !important;
} }
} }
} }
.hideSidebar { .hideSidebar {
.sidebar-container { .sidebar-container {
width: 54px !important; width: 54px !important;
} }
.main-container { .main-container {
margin-left: 54px; margin-left: 54px;
} }
.submenu-title-noDropdown { .submenu-title-noDropdown {
padding: 0 !important; padding: 0 !important;
position: relative; position: relative;
.el-tooltip { .el-tooltip {
padding: 0 !important; padding: 0 !important;
.svg-icon { .svg-icon {
margin-left: 20px; margin-left: 20px;
} }
} }
} }
.el-submenu { .el-submenu {
overflow: hidden; overflow: hidden;
&>.el-submenu__title { &>.el-submenu__title {
padding: 0 !important; padding: 0 !important;
.svg-icon { .svg-icon {
margin-left: 20px; margin-left: 20px;
} }
.el-submenu__icon-arrow { .el-submenu__icon-arrow {
display: none; display: none;
} }
} }
} }
.el-menu--collapse { .el-menu--collapse {
.el-submenu { .el-submenu {
&>.el-submenu__title { &>.el-submenu__title {
&>span { &>span {
height: 0; height: 0;
width: 0; width: 0;
overflow: hidden; overflow: hidden;
visibility: hidden; visibility: hidden;
display: inline-block; display: inline-block;
} }
} }
} }
} }
} }
.el-menu--collapse .el-menu .el-submenu { .el-menu--collapse .el-menu .el-submenu {
min-width: $sideBarWidth !important; min-width: $sideBarWidth !important;
} }
// mobile responsive // mobile responsive
.mobile { .mobile {
.main-container { .main-container {
margin-left: 0; margin-left: 0;
} }
.sidebar-container { .sidebar-container {
transition: transform .28s; transition: transform .28s;
width: $sideBarWidth !important; width: $sideBarWidth !important;
} }
&.hideSidebar { &.hideSidebar {
.sidebar-container { .sidebar-container {
pointer-events: none; pointer-events: none;
transition-duration: 0.3s; transition-duration: 0.3s;
transform: translate3d(-$sideBarWidth, 0, 0); transform: translate3d(-$sideBarWidth, 0, 0);
} }
} }
} }
.withoutAnimation { .withoutAnimation {
.main-container, .main-container,
.sidebar-container { .sidebar-container {
transition: none; transition: none;
} }
} }
} }
// when menu collapsed // when menu collapsed
.el-menu--vertical { .el-menu--vertical {
&>.el-menu { &>.el-menu {
.svg-icon { .svg-icon {
margin-right: 16px; margin-right: 16px;
} }
} }
.nest-menu .el-submenu>.el-submenu__title, .nest-menu .el-submenu>.el-submenu__title,
.el-menu-item { .el-menu-item {
&:hover { &:hover {
// you can use $subMenuHover // you can use $subMenuHover
background-color: $menuHover !important; background-color: $menuHover !important;
} }
} }
// the scroll bar appears when the subMenu is too long // the scroll bar appears when the subMenu is too long
>.el-menu--popup { >.el-menu--popup {
max-height: 100vh; max-height: 100vh;
overflow-y: auto; overflow-y: auto;
&::-webkit-scrollbar-track-piece { &::-webkit-scrollbar-track-piece {
background: #d3dce6; background: #d3dce6;
} }
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 6px; width: 6px;
} }
&::-webkit-scrollbar-thumb { &::-webkit-scrollbar-thumb {
background: #99a9bf; background: #99a9bf;
border-radius: 20px; border-radius: 20px;
} }
} }
} }
@@ -1,48 +1,48 @@
// global transition css // global transition css
/* fade */ /* fade */
.fade-enter-active, .fade-enter-active,
.fade-leave-active { .fade-leave-active {
transition: opacity 0.28s; transition: opacity 0.28s;
} }
.fade-enter, .fade-enter,
.fade-leave-active { .fade-leave-active {
opacity: 0; opacity: 0;
} }
/* fade-transform */ /* fade-transform */
.fade-transform-leave-active, .fade-transform-leave-active,
.fade-transform-enter-active { .fade-transform-enter-active {
transition: all .5s; transition: all .5s;
} }
.fade-transform-enter { .fade-transform-enter {
opacity: 0; opacity: 0;
transform: translateX(-30px); transform: translateX(-30px);
} }
.fade-transform-leave-to { .fade-transform-leave-to {
opacity: 0; opacity: 0;
transform: translateX(30px); transform: translateX(30px);
} }
/* breadcrumb transition */ /* breadcrumb transition */
.breadcrumb-enter-active, .breadcrumb-enter-active,
.breadcrumb-leave-active { .breadcrumb-leave-active {
transition: all .5s; transition: all .5s;
} }
.breadcrumb-enter, .breadcrumb-enter,
.breadcrumb-leave-active { .breadcrumb-leave-active {
opacity: 0; opacity: 0;
transform: translateX(20px); transform: translateX(20px);
} }
.breadcrumb-move { .breadcrumb-move {
transition: all .5s; transition: all .5s;
} }
.breadcrumb-leave-active { .breadcrumb-leave-active {
position: absolute; position: absolute;
} }
+36 -36
View File
@@ -1,36 +1,36 @@
// base color // base color
$blue:#324157; $blue:#324157;
$light-blue:#3A71A8; $light-blue:#3A71A8;
$red:#C03639; $red:#C03639;
$pink: #E65D6E; $pink: #E65D6E;
$green: #30B08F; $green: #30B08F;
$tiffany: #4AB7BD; $tiffany: #4AB7BD;
$yellow:#FEC171; $yellow:#FEC171;
$panGreen: #30B08F; $panGreen: #30B08F;
// sidebar // sidebar
$menuText:#bfcbd9; $menuText:#bfcbd9;
$menuActiveText:#409EFF; $menuActiveText:#409EFF;
$subMenuActiveText:#f4f4f5; // https://github.com/ElemeFE/element/issues/12951 $subMenuActiveText:#f4f4f5; // https://github.com/ElemeFE/element/issues/12951
$menuBg:#304156; $menuBg:#304156;
$menuHover:#263445; $menuHover:#263445;
$subMenuBg:#1f2d3d; $subMenuBg:#1f2d3d;
$subMenuHover:#001528; $subMenuHover:#001528;
// 左侧菜单栏宽度 // 左侧菜单栏宽度
$sideBarWidth: 250px; $sideBarWidth: 250px;
// the :export directive is the magic sauce for webpack // the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
:export { :export {
menuText: $menuText; menuText: $menuText;
menuActiveText: $menuActiveText; menuActiveText: $menuActiveText;
subMenuActiveText: $subMenuActiveText; subMenuActiveText: $subMenuActiveText;
menuBg: $menuBg; menuBg: $menuBg;
menuHover: $menuHover; menuHover: $menuHover;
subMenuBg: $subMenuBg; subMenuBg: $subMenuBg;
subMenuHover: $subMenuHover; subMenuHover: $subMenuHover;
sideBarWidth: $sideBarWidth; sideBarWidth: $sideBarWidth;
} }
@@ -1,84 +1,84 @@
<template> <template>
<el-breadcrumb class="app-breadcrumb" separator="/"> <el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb"> <transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path"> <el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect==='noredirect'||index==levelList.length-1" class="no-redirect">{{ <span v-if="item.redirect==='noredirect'||index==levelList.length-1" class="no-redirect">{{
item.meta.title item.meta.title
}}</span> }}</span>
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a> <a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
</el-breadcrumb-item> </el-breadcrumb-item>
</transition-group> </transition-group>
</el-breadcrumb> </el-breadcrumb>
</template> </template>
<script> <script>
import pathToRegexp from 'path-to-regexp' import pathToRegexp from 'path-to-regexp'
export default { export default {
data() { data() {
return { return {
levelList: null levelList: null
} }
}, },
watch: { watch: {
$route(route) { $route(route) {
// if you go to the redirect page, do not update the breadcrumbs // if you go to the redirect page, do not update the breadcrumbs
if (route.path.startsWith('/redirect/')) { if (route.path.startsWith('/redirect/')) {
return return
} }
this.getBreadcrumb() this.getBreadcrumb()
} }
}, },
created() { created() {
this.getBreadcrumb() this.getBreadcrumb()
}, },
methods: { methods: {
getBreadcrumb() { getBreadcrumb() {
// only show routes with meta.title // only show routes with meta.title
let matched = this.$route.matched.filter(item => item.meta && item.meta.title) let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
const first = matched[0] const first = matched[0]
if (!this.isDashboard(first)) { if (!this.isDashboard(first)) {
matched = [{ path: '/dashboard', meta: { title: '首页' }}].concat(matched) matched = [{ path: '/dashboard', meta: { title: '首页' }}].concat(matched)
} }
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
}, },
isDashboard(route) { isDashboard(route) {
const name = route && route.name const name = route && route.name
if (!name) { if (!name) {
return false return false
} }
return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase() return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()
}, },
pathCompile(path) { pathCompile(path) {
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561 // To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
const { params } = this.$route const { params } = this.$route
var toPath = pathToRegexp.compile(path) var toPath = pathToRegexp.compile(path)
return toPath(params) return toPath(params)
}, },
handleLink(item) { handleLink(item) {
const { redirect, path } = item const { redirect, path } = item
if (redirect) { if (redirect) {
this.$router.push(redirect) this.$router.push(redirect)
return return
} }
this.$router.push(this.pathCompile(path)) this.$router.push(this.pathCompile(path))
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.app-breadcrumb.el-breadcrumb { .app-breadcrumb.el-breadcrumb {
display: inline-block; display: inline-block;
font-size: 14px; font-size: 14px;
line-height: 50px; line-height: 50px;
margin-left: 8px; margin-left: 8px;
.no-redirect { .no-redirect {
color: #97a8be; color: #97a8be;
cursor: text; cursor: text;
} }
} }
</style> </style>
@@ -1,276 +1,276 @@
<template> <template>
<div class="crud-opts"> <div class="crud-opts">
<span class="crud-opts-left"> <span class="crud-opts-left">
<!--左侧插槽--> <!--左侧插槽-->
<slot name="left" /> <slot name="left" />
<el-button <el-button
v-if="crud.optShow.add" v-if="crud.optShow.add"
v-permission="permission.add" v-permission="permission.add"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@click="crud.toAdd" @click="crud.toAdd"
> >
新增 新增
</el-button> </el-button>
<el-button <el-button
v-if="crud.optShow.edit" v-if="crud.optShow.edit"
v-permission="permission.edit" v-permission="permission.edit"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="success" type="success"
icon="el-icon-edit" icon="el-icon-edit"
:disabled="crud.selections.length !== 1" :disabled="crud.selections.length !== 1"
@click="crud.toEdit(crud.selections[0])" @click="crud.toEdit(crud.selections[0])"
> >
修改 修改
</el-button> </el-button>
<el-button <el-button
v-if="crud.optShow.del" v-if="crud.optShow.del"
slot="reference" slot="reference"
v-permission="permission.del" v-permission="permission.del"
class="filter-item" class="filter-item"
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
:loading="crud.delAllLoading" :loading="crud.delAllLoading"
:disabled="crud.selections.length === 0" :disabled="crud.selections.length === 0"
@click="toDelete(crud.selections)" @click="toDelete(crud.selections)"
> >
删除 删除
</el-button> </el-button>
<el-button <el-button
v-if="crud.optShow.download" v-if="crud.optShow.download"
:loading="crud.downloadLoading" :loading="crud.downloadLoading"
:disabled="!crud.data.length" :disabled="!crud.data.length"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="warning" type="warning"
icon="el-icon-download" icon="el-icon-download"
@click="crud.doExport" @click="crud.doExport"
>导出</el-button> >导出</el-button>
<!--右侧--> <!--右侧-->
<slot name="right" /> <slot name="right" />
</span> </span>
<el-button-group class="crud-opts-right"> <el-button-group class="crud-opts-right">
<el-button <el-button
size="mini" size="mini"
plain plain
type="info" type="info"
icon="el-icon-search" icon="el-icon-search"
@click="toggleSearch()" @click="toggleSearch()"
/> />
<el-button <el-button
size="mini" size="mini"
icon="el-icon-refresh" icon="el-icon-refresh"
@click="crud.refresh()" @click="crud.refresh()"
/> />
<el-popover <el-popover
placement="bottom-end" placement="bottom-end"
width="150" width="150"
trigger="click" trigger="click"
> >
<el-button <el-button
slot="reference" slot="reference"
size="mini" size="mini"
icon="el-icon-s-grid" icon="el-icon-s-grid"
> >
<i <i
class="fa fa-caret-down" class="fa fa-caret-down"
aria-hidden="true" aria-hidden="true"
/> />
</el-button> </el-button>
<el-checkbox <el-checkbox
v-model="allColumnsSelected" v-model="allColumnsSelected"
:indeterminate="allColumnsSelectedIndeterminate" :indeterminate="allColumnsSelectedIndeterminate"
@change="handleCheckAllChange" @change="handleCheckAllChange"
> >
全选 全选
</el-checkbox> </el-checkbox>
<el-checkbox <el-checkbox
v-for="item in tableColumns" v-for="item in tableColumns"
:key="item.property" :key="item.property"
v-model="item.visible" v-model="item.visible"
@change="handleCheckedTableColumnsChange(item)" @change="handleCheckedTableColumnsChange(item)"
> >
{{ item.label }} {{ item.label }}
</el-checkbox> </el-checkbox>
</el-popover> </el-popover>
</el-button-group> </el-button-group>
</div> </div>
</template> </template>
<script> <script>
import CRUD, { crud } from '@crud/crud' import CRUD, { crud } from '@crud/crud'
function sortWithRef(src, ref) { function sortWithRef(src, ref) {
const result = Object.assign([], ref) const result = Object.assign([], ref)
let cursor = -1 let cursor = -1
src.forEach(e => { src.forEach(e => {
const idx = result.indexOf(e) const idx = result.indexOf(e)
if (idx === -1) { if (idx === -1) {
cursor += 1 cursor += 1
result.splice(cursor, 0, e) result.splice(cursor, 0, e)
} else { } else {
cursor = idx cursor = idx
} }
}) })
return result return result
} }
export default { export default {
mixins: [crud()], mixins: [crud()],
props: { props: {
permission: { permission: {
type: Object, type: Object,
default: () => { default: () => {
return {} return {}
} }
}, },
hiddenColumns: { hiddenColumns: {
type: Array, type: Array,
default: () => { default: () => {
return [] return []
} }
}, },
ignoreColumns: { ignoreColumns: {
type: Array, type: Array,
default: () => { default: () => {
return [] return []
} }
} }
}, },
data() { data() {
return { return {
tableColumns: [], tableColumns: [],
allColumnsSelected: true, allColumnsSelected: true,
allColumnsSelectedIndeterminate: false, allColumnsSelectedIndeterminate: false,
tableUnwatcher: null, tableUnwatcher: null,
// 忽略下次表格列变动 // 忽略下次表格列变动
ignoreNextTableColumnsChange: false ignoreNextTableColumnsChange: false
} }
}, },
watch: { watch: {
'crud.props.table'() { 'crud.props.table'() {
this.updateTableColumns() this.updateTableColumns()
this.tableColumns.forEach(column => { this.tableColumns.forEach(column => {
if (this.hiddenColumns.indexOf(column.property) !== -1) { if (this.hiddenColumns.indexOf(column.property) !== -1) {
column.visible = false column.visible = false
this.updateColumnVisible(column) this.updateColumnVisible(column)
} }
}) })
}, },
'crud.props.table.store.states.columns'() { 'crud.props.table.store.states.columns'() {
this.updateTableColumns() this.updateTableColumns()
} }
}, },
created() { created() {
this.crud.updateProp('searchToggle', true) this.crud.updateProp('searchToggle', true)
}, },
methods: { methods: {
updateTableColumns() { updateTableColumns() {
const table = this.crud.getTable() const table = this.crud.getTable()
if (!table) { if (!table) {
this.tableColumns = [] this.tableColumns = []
return return
} }
let cols = null let cols = null
const columnFilter = e => e && e.type === 'default' && e.property && this.ignoreColumns.indexOf(e.property) === -1 const columnFilter = e => e && e.type === 'default' && e.property && this.ignoreColumns.indexOf(e.property) === -1
const refCols = table.columns.filter(columnFilter) const refCols = table.columns.filter(columnFilter)
if (this.ignoreNextTableColumnsChange) { if (this.ignoreNextTableColumnsChange) {
this.ignoreNextTableColumnsChange = false this.ignoreNextTableColumnsChange = false
return return
} }
this.ignoreNextTableColumnsChange = false this.ignoreNextTableColumnsChange = false
const columns = [] const columns = []
const fullTableColumns = table.$children.map(e => e.columnConfig).filter(columnFilter) const fullTableColumns = table.$children.map(e => e.columnConfig).filter(columnFilter)
cols = sortWithRef(fullTableColumns, refCols) cols = sortWithRef(fullTableColumns, refCols)
cols.forEach(config => { cols.forEach(config => {
const column = { const column = {
property: config.property, property: config.property,
label: config.label, label: config.label,
visible: refCols.indexOf(config) !== -1 visible: refCols.indexOf(config) !== -1
} }
columns.push(column) columns.push(column)
}) })
this.tableColumns = columns this.tableColumns = columns
}, },
toDelete(datas) { toDelete(datas) {
this.$confirm(`确认删除选中的${datas.length}条数据?`, '提示', { this.$confirm(`确认删除选中的${datas.length}条数据?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.crud.delAllLoading = true this.crud.delAllLoading = true
this.crud.doDelete(datas) this.crud.doDelete(datas)
}).catch(() => { }).catch(() => {
}) })
}, },
handleCheckAllChange(val) { handleCheckAllChange(val) {
if (val === false) { if (val === false) {
this.allColumnsSelected = true this.allColumnsSelected = true
return return
} }
this.tableColumns.forEach(column => { this.tableColumns.forEach(column => {
if (!column.visible) { if (!column.visible) {
column.visible = true column.visible = true
this.updateColumnVisible(column) this.updateColumnVisible(column)
} }
}) })
this.allColumnsSelected = val this.allColumnsSelected = val
this.allColumnsSelectedIndeterminate = false this.allColumnsSelectedIndeterminate = false
}, },
handleCheckedTableColumnsChange(item) { handleCheckedTableColumnsChange(item) {
let totalCount = 0 let totalCount = 0
let selectedCount = 0 let selectedCount = 0
this.tableColumns.forEach(column => { this.tableColumns.forEach(column => {
++totalCount ++totalCount
selectedCount += column.visible ? 1 : 0 selectedCount += column.visible ? 1 : 0
}) })
if (selectedCount === 0) { if (selectedCount === 0) {
this.crud.notify('请至少选择一列', CRUD.NOTIFICATION_TYPE.WARNING) this.crud.notify('请至少选择一列', CRUD.NOTIFICATION_TYPE.WARNING)
this.$nextTick(function() { this.$nextTick(function() {
item.visible = true item.visible = true
}) })
return return
} }
this.allColumnsSelected = selectedCount === totalCount this.allColumnsSelected = selectedCount === totalCount
this.allColumnsSelectedIndeterminate = selectedCount !== totalCount && selectedCount !== 0 this.allColumnsSelectedIndeterminate = selectedCount !== totalCount && selectedCount !== 0
this.updateColumnVisible(item) this.updateColumnVisible(item)
}, },
updateColumnVisible(item) { updateColumnVisible(item) {
const table = this.crud.props.table const table = this.crud.props.table
const vm = table.$children.find(e => e.prop === item.property) const vm = table.$children.find(e => e.prop === item.property)
const columnConfig = vm.columnConfig const columnConfig = vm.columnConfig
if (item.visible) { if (item.visible) {
// 找出合适的插入点 // 找出合适的插入点
const columnIndex = this.tableColumns.indexOf(item) const columnIndex = this.tableColumns.indexOf(item)
vm.owner.store.commit('insertColumn', columnConfig, columnIndex + 1, null) vm.owner.store.commit('insertColumn', columnConfig, columnIndex + 1, null)
} else { } else {
vm.owner.store.commit('removeColumn', columnConfig, null) vm.owner.store.commit('removeColumn', columnConfig, null)
} }
this.ignoreNextTableColumnsChange = true this.ignoreNextTableColumnsChange = true
}, },
toggleSearch() { toggleSearch() {
this.crud.props.searchToggle = !this.crud.props.searchToggle this.crud.props.searchToggle = !this.crud.props.searchToggle
} }
} }
} }
</script> </script>
<style> <style>
.crud-opts { .crud-opts {
padding: 4px 0; padding: 4px 0;
display: -webkit-flex; display: -webkit-flex;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.crud-opts .crud-opts-right { .crud-opts .crud-opts-right {
margin-left: auto; margin-left: auto;
} }
.crud-opts .crud-opts-right span { .crud-opts .crud-opts-right span {
float: left; float: left;
} }
</style> </style>
@@ -1,19 +1,19 @@
<!--分页--> <!--分页-->
<template> <template>
<el-pagination <el-pagination
:page-size.sync="page.size" :page-size.sync="page.size"
:total="page.total" :total="page.total"
:current-page.sync="page.page" :current-page.sync="page.page"
style="margin-top: 8px;" style="margin-top: 8px;"
layout="total, prev, pager, next, sizes" layout="total, prev, pager, next, sizes"
@size-change="crud.sizeChangeHandler($event)" @size-change="crud.sizeChangeHandler($event)"
@current-change="crud.pageChangeHandler" @current-change="crud.pageChangeHandler"
/> />
</template> </template>
<script> <script>
import { pagination } from '@crud/crud' import { pagination } from '@crud/crud'
export default { export default {
mixins: [pagination()] mixins: [pagination()]
} }
</script> </script>
@@ -1,34 +1,34 @@
<!--搜索与重置--> <!--搜索与重置-->
<template> <template>
<span> <span>
<el-button <el-button
class="filter-item" class="filter-item"
size="mini" size="mini"
type="success" type="success"
icon="el-icon-search" icon="el-icon-search"
@click="crud.toQuery" @click="crud.toQuery"
>搜索</el-button> >搜索</el-button>
<el-button <el-button
v-if="crud.optShow.reset" v-if="crud.optShow.reset"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="warning" type="warning"
icon="el-icon-refresh-left" icon="el-icon-refresh-left"
@click="crud.resetQuery()" @click="crud.resetQuery()"
>重置</el-button> >重置</el-button>
</span> </span>
</template> </template>
<script> <script>
import { crud } from '@crud/crud' import { crud } from '@crud/crud'
export default { export default {
mixins: [crud()], mixins: [crud()],
props: { props: {
itemClass: { itemClass: {
type: String, type: String,
required: false, required: false,
default: '' default: ''
} }
} }
} }
</script> </script>
@@ -1,100 +1,101 @@
<template> <template>
<div> <div>
<slot /> <slot />
<el-button <el-button
v-permission="permission.edit" v-permission="permission.edit"
:loading="crud.status.cu === 2" :loading="crud.status.cu === 2"
:disabled="disabledEdit" :disabled="disabledEdit"
size="mini" size="mini"
type="text" type="text"
@click.stop="crud.toEdit(data)" @click.stop="crud.toEdit(data)"
>编辑</el-button> >编辑</el-button>
<el-popover <el-popover
v-model="pop" v-model="pop"
v-permission="permission.del" v-permission="permission.del"
placement="top" placement="top"
width="180" width="180"
trigger="manual" trigger="manual"
@show="onPopoverShow" @show="onPopoverShow"
@hide="onPopoverHide" @hide="onPopoverHide"
> >
<p>{{ msg }}</p> <p>{{ msg }}</p>
<div style="text-align: right; margin: 0"> <div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="doCancel">取消</el-button> <el-button size="mini" type="text" @click="doCancel">取消</el-button>
<el-button <el-button
:loading="crud.dataStatus[crud.getDataId(data)].delete === 2" :loading="crud.dataStatus[crud.getDataId(data)].delete === 2"
type="primary" type="primary"
size="mini" size="mini"
@click="crud.doDelete(data)" @click="crud.doDelete(data)"
>确 定 >确 定
</el-button> </el-button>
</div> </div>
<el-button <el-button
slot="reference" slot="reference"
:disabled="disabledDle" :disabled="disabledDle"
type="text" type="text"
size="mini" size="mini"
@click.stop="toDelete" style="color: #F56C6C"
>删除</el-button> @click.stop="toDelete"
</el-popover> >删除</el-button>
</div> </el-popover>
</template> </div>
<script> </template>
import CRUD, { crud } from '@crud/crud' <script>
import CRUD, { crud } from '@crud/crud'
export default {
mixins: [crud()], export default {
props: { mixins: [crud()],
data: { props: {
type: Object, data: {
required: true type: Object,
}, required: true
permission: { },
type: Object, permission: {
required: true type: Object,
}, required: true
disabledEdit: { },
type: Boolean, disabledEdit: {
default: false type: Boolean,
}, default: false
disabledDle: { },
type: Boolean, disabledDle: {
default: false type: Boolean,
}, default: false
msg: { },
type: String, msg: {
default: '确定删除本条数据吗?' type: String,
} default: '确定删除本条数据吗?'
}, }
data() { },
return { data() {
pop: false return {
} pop: false
}, }
methods: { },
doCancel() { methods: {
this.pop = false doCancel() {
this.crud.cancelDelete(this.data) this.pop = false
}, this.crud.cancelDelete(this.data)
toDelete() { },
this.pop = true toDelete() {
}, this.pop = true
[CRUD.HOOK.afterDelete](crud, data) { },
if (data === this.data) { [CRUD.HOOK.afterDelete](crud, data) {
this.pop = false if (data === this.data) {
} this.pop = false
}, }
onPopoverShow() { },
setTimeout(() => { onPopoverShow() {
document.addEventListener('click', this.handleDocumentClick) setTimeout(() => {
}, 0) document.addEventListener('click', this.handleDocumentClick)
}, }, 0)
onPopoverHide() { },
document.removeEventListener('click', this.handleDocumentClick) onPopoverHide() {
}, document.removeEventListener('click', this.handleDocumentClick)
handleDocumentClick(event) { },
this.pop = false handleDocumentClick(event) {
} this.pop = false
} }
} }
</script> }
</script>
File diff suppressed because it is too large Load Diff
@@ -1,45 +1,45 @@
<script> <script>
import { DatePicker, DatePickerOptions } from 'element-ui' import { DatePicker, DatePickerOptions } from 'element-ui'
import { calendarShortcuts } from '@/utils/shortcuts' import { calendarShortcuts } from '@/utils/shortcuts'
export default { export default {
name: 'DateRangePicker', name: 'DateRangePicker',
mixins: [DatePicker], mixins: [DatePicker],
props: { props: {
type: { type: {
type: String, type: String,
default: 'daterange' default: 'daterange'
}, },
valueFormat: { valueFormat: {
type: String, type: String,
default: 'yyyy-MM-dd HH:mm:ss' default: 'yyyy-MM-dd HH:mm:ss'
}, },
defaultTime: { defaultTime: {
type: Array, type: Array,
default: _ => ['00:00:00', '23:59:59'] default: _ => ['00:00:00', '23:59:59']
}, },
pickerOptions: { pickerOptions: {
type: DatePickerOptions, type: DatePickerOptions,
default: _ => { default: _ => {
return { shortcuts: calendarShortcuts, firstDayOfWeek: 1 } return { shortcuts: calendarShortcuts, firstDayOfWeek: 1 }
} }
}, },
size: { size: {
type: String, type: String,
default: 'small' default: 'small'
}, },
rangeSeparator: { rangeSeparator: {
type: String, type: String,
default: ':' default: ':'
}, },
startPlaceholder: { startPlaceholder: {
type: String, type: String,
default: '开始日期' default: '开始日期'
}, },
endPlaceholder: { endPlaceholder: {
type: String, type: String,
default: '结束日期' default: '结束日期'
} }
} }
} }
</script> </script>
+29 -29
View File
@@ -1,29 +1,29 @@
import Vue from 'vue' import Vue from 'vue'
import { get as getDictDetail } from '@/api/system/dictDetail' import { get as getDictDetail } from '@/api/system/dictDetail'
export default class Dict { export default class Dict {
constructor(dict) { constructor(dict) {
this.dict = dict this.dict = dict
} }
async init(names, completeCallback) { async init(names, completeCallback) {
if (names === undefined || name === null) { if (names === undefined || name === null) {
throw new Error('need Dict names') throw new Error('need Dict names')
} }
const ps = [] const ps = []
names.forEach(n => { names.forEach(n => {
Vue.set(this.dict.dict, n, {}) Vue.set(this.dict.dict, n, {})
Vue.set(this.dict.label, n, {}) Vue.set(this.dict.label, n, {})
Vue.set(this.dict, n, []) Vue.set(this.dict, n, [])
ps.push(getDictDetail(n).then(data => { ps.push(getDictDetail(n).then(data => {
this.dict[n].splice(0, 0, ...data.content) this.dict[n].splice(0, 0, ...data.content)
data.content.forEach(d => { data.content.forEach(d => {
Vue.set(this.dict.dict[n], d.value, d) Vue.set(this.dict.dict[n], d.value, d)
Vue.set(this.dict.label[n], d.value, d.label) Vue.set(this.dict.label[n], d.value, d.label)
}) })
})) }))
}) })
await Promise.all(ps) await Promise.all(ps)
completeCallback() completeCallback()
} }
} }
+29 -29
View File
@@ -1,29 +1,29 @@
import Dict from './Dict' import Dict from './Dict'
const install = function(Vue) { const install = function(Vue) {
Vue.mixin({ Vue.mixin({
data() { data() {
if (this.$options.dicts instanceof Array) { if (this.$options.dicts instanceof Array) {
const dict = { const dict = {
dict: {}, dict: {},
label: {} label: {}
} }
return { return {
dict dict
} }
} }
return {} return {}
}, },
created() { created() {
if (this.$options.dicts instanceof Array) { if (this.$options.dicts instanceof Array) {
new Dict(this.dict).init(this.$options.dicts, () => { new Dict(this.dict).init(this.$options.dicts, () => {
this.$nextTick(() => { this.$nextTick(() => {
this.$emit('dictReady') this.$emit('dictReady')
}) })
}) })
} }
} }
}) })
} }
export default { install } export default { install }
+107 -107
View File
@@ -1,107 +1,107 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}" /> <div :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import { DeBounce } from '@/utils/CsUtil' import { DeBounce } from '@/utils/CsUtil'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
const animationDuration = 6000 const animationDuration = 6000
export default { export default {
props: { props: {
className: { className: {
type: String, type: String,
default: 'chart' default: 'chart'
}, },
width: { width: {
type: String, type: String,
default: '100%' default: '100%'
}, },
height: { height: {
type: String, type: String,
default: '300px' default: '300px'
} }
}, },
data() { data() {
return { return {
chart: null chart: null
} }
}, },
mounted() { mounted() {
this.initChart() this.initChart()
this.__resizeHandler = DeBounce(() => { this.__resizeHandler = DeBounce(() => {
if (this.chart) { if (this.chart) {
this.chart.resize() this.chart.resize()
} }
}, 100) }, 100)
window.addEventListener('resize', this.__resizeHandler) window.addEventListener('resize', this.__resizeHandler)
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
} }
window.removeEventListener('resize', this.__resizeHandler) window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose() this.chart.dispose()
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({ this.chart.setOption({
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效 axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
} }
}, },
grid: { grid: {
top: 10, top: 10,
left: '2%', left: '2%',
right: '2%', right: '2%',
bottom: '3%', bottom: '3%',
containLabel: true containLabel: true
}, },
xAxis: [{ xAxis: [{
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisTick: { axisTick: {
alignWithLabel: true alignWithLabel: true
} }
}], }],
yAxis: [{ yAxis: [{
type: 'value', type: 'value',
axisTick: { axisTick: {
show: false show: false
} }
}], }],
series: [{ series: [{
name: 'pageA', name: 'pageA',
type: 'bar', type: 'bar',
stack: 'vistors', stack: 'vistors',
barWidth: '60%', barWidth: '60%',
data: [79, 52, 200, 334, 390, 330, 220], data: [79, 52, 200, 334, 390, 330, 220],
animationDuration animationDuration
}, { }, {
name: 'pageB', name: 'pageB',
type: 'bar', type: 'bar',
stack: 'vistors', stack: 'vistors',
barWidth: '60%', barWidth: '60%',
data: [80, 52, 200, 334, 390, 330, 220], data: [80, 52, 200, 334, 390, 330, 220],
animationDuration animationDuration
}, { }, {
name: 'pageC', name: 'pageC',
type: 'bar', type: 'bar',
stack: 'vistors', stack: 'vistors',
barWidth: '60%', barWidth: '60%',
data: [30, 52, 200, 334, 390, 330, 220], data: [30, 52, 200, 334, 390, 330, 220],
animationDuration animationDuration
}] }]
}) })
} }
} }
} }
</script> </script>
+438 -438
View File
@@ -1,438 +1,438 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}" /> <div :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import { DeBounce } from '@/utils/CsUtil' import { DeBounce } from '@/utils/CsUtil'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
export default { export default {
props: { props: {
className: { className: {
type: String, type: String,
default: 'chart' default: 'chart'
}, },
width: { width: {
type: String, type: String,
default: '100%' default: '100%'
}, },
height: { height: {
type: String, type: String,
default: '500px' default: '500px'
} }
}, },
data() { data() {
return { return {
chart: null chart: null
} }
}, },
mounted() { mounted() {
this.initChart() this.initChart()
this.__resizeHandler = DeBounce(() => { this.__resizeHandler = DeBounce(() => {
if (this.chart) { if (this.chart) {
this.chart.resize() this.chart.resize()
} }
}, 100) }, 100)
window.addEventListener('resize', this.__resizeHandler) window.addEventListener('resize', this.__resizeHandler)
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
} }
window.removeEventListener('resize', this.__resizeHandler) window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose() this.chart.dispose()
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
const dataMap = {} const dataMap = {}
function dataFormatter(obj) { function dataFormatter(obj) {
const pList = ['北京', '天津', '河北', '山西', '内蒙古', '辽宁', '吉林', '黑龙江', '上海', '江苏', '浙江', '安徽', '福建', '江西', '山东', '河南', '湖北', '湖南', '广东', '广西', '海南', '重庆', '四川', '贵州', '云南', '西藏', '陕西', '甘肃', '青海', '宁夏', '新疆'] const pList = ['北京', '天津', '河北', '山西', '内蒙古', '辽宁', '吉林', '黑龙江', '上海', '江苏', '浙江', '安徽', '福建', '江西', '山东', '河南', '湖北', '湖南', '广东', '广西', '海南', '重庆', '四川', '贵州', '云南', '西藏', '陕西', '甘肃', '青海', '宁夏', '新疆']
let temp let temp
for (let year = 2002; year <= 2011; year++) { for (let year = 2002; year <= 2011; year++) {
let max = 0 let max = 0
let sum = 0 let sum = 0
temp = obj[year] temp = obj[year]
for (let i = 0, l = temp.length; i < l; i++) { for (let i = 0, l = temp.length; i < l; i++) {
max = Math.max(max, temp[i]) max = Math.max(max, temp[i])
sum += temp[i] sum += temp[i]
obj[year][i] = { obj[year][i] = {
name: pList[i], name: pList[i],
value: temp[i] value: temp[i]
} }
} }
obj[year + 'max'] = Math.floor(max / 100) * 100 obj[year + 'max'] = Math.floor(max / 100) * 100
obj[year + 'sum'] = sum obj[year + 'sum'] = sum
} }
return obj return obj
} }
dataMap.dataGDP = dataFormatter({ dataMap.dataGDP = dataFormatter({
2011: [16251.93, 11307.28, 24515.76, 11237.55, 14359.88, 22226.7, 10568.83, 12582, 19195.69, 49110.27, 32318.85, 15300.65, 17560.18, 11702.82, 45361.85, 26931.03, 19632.26, 19669.56, 53210.28, 11720.87, 2522.66, 10011.37, 21026.68, 5701.84, 8893.12, 605.83, 12512.3, 5020.37, 1670.44, 2102.21, 6610.05], 2011: [16251.93, 11307.28, 24515.76, 11237.55, 14359.88, 22226.7, 10568.83, 12582, 19195.69, 49110.27, 32318.85, 15300.65, 17560.18, 11702.82, 45361.85, 26931.03, 19632.26, 19669.56, 53210.28, 11720.87, 2522.66, 10011.37, 21026.68, 5701.84, 8893.12, 605.83, 12512.3, 5020.37, 1670.44, 2102.21, 6610.05],
2010: [14113.58, 9224.46, 20394.26, 9200.86, 11672, 18457.27, 8667.58, 10368.6, 17165.98, 41425.48, 27722.31, 12359.33, 14737.12, 9451.26, 39169.92, 23092.36, 15967.61, 16037.96, 46013.06, 9569.85, 2064.5, 7925.58, 17185.48, 4602.16, 7224.18, 507.46, 10123.48, 4120.75, 1350.43, 1689.65, 5437.47], 2010: [14113.58, 9224.46, 20394.26, 9200.86, 11672, 18457.27, 8667.58, 10368.6, 17165.98, 41425.48, 27722.31, 12359.33, 14737.12, 9451.26, 39169.92, 23092.36, 15967.61, 16037.96, 46013.06, 9569.85, 2064.5, 7925.58, 17185.48, 4602.16, 7224.18, 507.46, 10123.48, 4120.75, 1350.43, 1689.65, 5437.47],
2009: [12153.03, 7521.85, 17235.48, 7358.31, 9740.25, 15212.49, 7278.75, 8587, 15046.45, 34457.3, 22990.35, 10062.82, 12236.53, 7655.18, 33896.65, 19480.46, 12961.1, 13059.69, 39482.56, 7759.16, 1654.21, 6530.01, 14151.28, 3912.68, 6169.75, 441.36, 8169.8, 3387.56, 1081.27, 1353.31, 4277.05], 2009: [12153.03, 7521.85, 17235.48, 7358.31, 9740.25, 15212.49, 7278.75, 8587, 15046.45, 34457.3, 22990.35, 10062.82, 12236.53, 7655.18, 33896.65, 19480.46, 12961.1, 13059.69, 39482.56, 7759.16, 1654.21, 6530.01, 14151.28, 3912.68, 6169.75, 441.36, 8169.8, 3387.56, 1081.27, 1353.31, 4277.05],
2008: [11115, 6719.01, 16011.97, 7315.4, 8496.2, 13668.58, 6426.1, 8314.37, 14069.87, 30981.98, 21462.69, 8851.66, 10823.01, 6971.05, 30933.28, 18018.53, 11328.92, 11555, 36796.71, 7021, 1503.06, 5793.66, 12601.23, 3561.56, 5692.12, 394.85, 7314.58, 3166.82, 1018.62, 1203.92, 4183.21], 2008: [11115, 6719.01, 16011.97, 7315.4, 8496.2, 13668.58, 6426.1, 8314.37, 14069.87, 30981.98, 21462.69, 8851.66, 10823.01, 6971.05, 30933.28, 18018.53, 11328.92, 11555, 36796.71, 7021, 1503.06, 5793.66, 12601.23, 3561.56, 5692.12, 394.85, 7314.58, 3166.82, 1018.62, 1203.92, 4183.21],
2007: [9846.81, 5252.76, 13607.32, 6024.45, 6423.18, 11164.3, 5284.69, 7104, 12494.01, 26018.48, 18753.73, 7360.92, 9248.53, 5800.25, 25776.91, 15012.46, 9333.4, 9439.6, 31777.01, 5823.41, 1254.17, 4676.13, 10562.39, 2884.11, 4772.52, 341.43, 5757.29, 2703.98, 797.35, 919.11, 3523.16], 2007: [9846.81, 5252.76, 13607.32, 6024.45, 6423.18, 11164.3, 5284.69, 7104, 12494.01, 26018.48, 18753.73, 7360.92, 9248.53, 5800.25, 25776.91, 15012.46, 9333.4, 9439.6, 31777.01, 5823.41, 1254.17, 4676.13, 10562.39, 2884.11, 4772.52, 341.43, 5757.29, 2703.98, 797.35, 919.11, 3523.16],
2006: [8117.78, 4462.74, 11467.6, 4878.61, 4944.25, 9304.52, 4275.12, 6211.8, 10572.24, 21742.05, 15718.47, 6112.5, 7583.85, 4820.53, 21900.19, 12362.79, 7617.47, 7688.67, 26587.76, 4746.16, 1065.67, 3907.23, 8690.24, 2338.98, 3988.14, 290.76, 4743.61, 2277.35, 648.5, 725.9, 3045.26], 2006: [8117.78, 4462.74, 11467.6, 4878.61, 4944.25, 9304.52, 4275.12, 6211.8, 10572.24, 21742.05, 15718.47, 6112.5, 7583.85, 4820.53, 21900.19, 12362.79, 7617.47, 7688.67, 26587.76, 4746.16, 1065.67, 3907.23, 8690.24, 2338.98, 3988.14, 290.76, 4743.61, 2277.35, 648.5, 725.9, 3045.26],
2005: [6969.52, 3905.64, 10012.11, 4230.53, 3905.03, 8047.26, 3620.27, 5513.7, 9247.66, 18598.69, 13417.68, 5350.17, 6554.69, 4056.76, 18366.87, 10587.42, 6590.19, 6596.1, 22557.37, 3984.1, 918.75, 3467.72, 7385.1, 2005.42, 3462.73, 248.8, 3933.72, 1933.98, 543.32, 612.61, 2604.19], 2005: [6969.52, 3905.64, 10012.11, 4230.53, 3905.03, 8047.26, 3620.27, 5513.7, 9247.66, 18598.69, 13417.68, 5350.17, 6554.69, 4056.76, 18366.87, 10587.42, 6590.19, 6596.1, 22557.37, 3984.1, 918.75, 3467.72, 7385.1, 2005.42, 3462.73, 248.8, 3933.72, 1933.98, 543.32, 612.61, 2604.19],
2004: [6033.21, 3110.97, 8477.63, 3571.37, 3041.07, 6672, 3122.01, 4750.6, 8072.83, 15003.6, 11648.7, 4759.3, 5763.35, 3456.7, 15021.84, 8553.79, 5633.24, 5641.94, 18864.62, 3433.5, 819.66, 3034.58, 6379.63, 1677.8, 3081.91, 220.34, 3175.58, 1688.49, 466.1, 537.11, 2209.09], 2004: [6033.21, 3110.97, 8477.63, 3571.37, 3041.07, 6672, 3122.01, 4750.6, 8072.83, 15003.6, 11648.7, 4759.3, 5763.35, 3456.7, 15021.84, 8553.79, 5633.24, 5641.94, 18864.62, 3433.5, 819.66, 3034.58, 6379.63, 1677.8, 3081.91, 220.34, 3175.58, 1688.49, 466.1, 537.11, 2209.09],
2003: [5007.21, 2578.03, 6921.29, 2855.23, 2388.38, 6002.54, 2662.08, 4057.4, 6694.23, 12442.87, 9705.02, 3923.11, 4983.67, 2807.41, 12078.15, 6867.7, 4757.45, 4659.99, 15844.64, 2821.11, 713.96, 2555.72, 5333.09, 1426.34, 2556.02, 185.09, 2587.72, 1399.83, 390.2, 445.36, 1886.35], 2003: [5007.21, 2578.03, 6921.29, 2855.23, 2388.38, 6002.54, 2662.08, 4057.4, 6694.23, 12442.87, 9705.02, 3923.11, 4983.67, 2807.41, 12078.15, 6867.7, 4757.45, 4659.99, 15844.64, 2821.11, 713.96, 2555.72, 5333.09, 1426.34, 2556.02, 185.09, 2587.72, 1399.83, 390.2, 445.36, 1886.35],
2002: [4315, 2150.76, 6018.28, 2324.8, 1940.94, 5458.22, 2348.54, 3637.2, 5741.03, 10606.85, 8003.67, 3519.72, 4467.55, 2450.48, 10275.5, 6035.48, 4212.82, 4151.54, 13502.42, 2523.73, 642.73, 2232.86, 4725.01, 1243.43, 2312.82, 162.04, 2253.39, 1232.03, 340.65, 377.16, 1612.6] 2002: [4315, 2150.76, 6018.28, 2324.8, 1940.94, 5458.22, 2348.54, 3637.2, 5741.03, 10606.85, 8003.67, 3519.72, 4467.55, 2450.48, 10275.5, 6035.48, 4212.82, 4151.54, 13502.42, 2523.73, 642.73, 2232.86, 4725.01, 1243.43, 2312.82, 162.04, 2253.39, 1232.03, 340.65, 377.16, 1612.6]
}) })
dataMap.dataPI = dataFormatter({ dataMap.dataPI = dataFormatter({
2011: [136.27, 159.72, 2905.73, 641.42, 1306.3, 1915.57, 1277.44, 1701.5, 124.94, 3064.78, 1583.04, 2015.31, 1612.24, 1391.07, 3973.85, 3512.24, 2569.3, 2768.03, 2665.2, 2047.23, 659.23, 844.52, 2983.51, 726.22, 1411.01, 74.47, 1220.9, 678.75, 155.08, 184.14, 1139.03], 2011: [136.27, 159.72, 2905.73, 641.42, 1306.3, 1915.57, 1277.44, 1701.5, 124.94, 3064.78, 1583.04, 2015.31, 1612.24, 1391.07, 3973.85, 3512.24, 2569.3, 2768.03, 2665.2, 2047.23, 659.23, 844.52, 2983.51, 726.22, 1411.01, 74.47, 1220.9, 678.75, 155.08, 184.14, 1139.03],
2010: [124.36, 145.58, 2562.81, 554.48, 1095.28, 1631.08, 1050.15, 1302.9, 114.15, 2540.1, 1360.56, 1729.02, 1363.67, 1206.98, 3588.28, 3258.09, 2147, 2325.5, 2286.98, 1675.06, 539.83, 685.38, 2482.89, 625.03, 1108.38, 68.72, 988.45, 599.28, 134.92, 159.29, 1078.63], 2010: [124.36, 145.58, 2562.81, 554.48, 1095.28, 1631.08, 1050.15, 1302.9, 114.15, 2540.1, 1360.56, 1729.02, 1363.67, 1206.98, 3588.28, 3258.09, 2147, 2325.5, 2286.98, 1675.06, 539.83, 685.38, 2482.89, 625.03, 1108.38, 68.72, 988.45, 599.28, 134.92, 159.29, 1078.63],
2009: [118.29, 128.85, 2207.34, 477.59, 929.6, 1414.9, 980.57, 1154.33, 113.82, 2261.86, 1163.08, 1495.45, 1182.74, 1098.66, 3226.64, 2769.05, 1795.9, 1969.69, 2010.27, 1458.49, 462.19, 606.8, 2240.61, 550.27, 1067.6, 63.88, 789.64, 497.05, 107.4, 127.25, 759.74], 2009: [118.29, 128.85, 2207.34, 477.59, 929.6, 1414.9, 980.57, 1154.33, 113.82, 2261.86, 1163.08, 1495.45, 1182.74, 1098.66, 3226.64, 2769.05, 1795.9, 1969.69, 2010.27, 1458.49, 462.19, 606.8, 2240.61, 550.27, 1067.6, 63.88, 789.64, 497.05, 107.4, 127.25, 759.74],
2008: [112.83, 122.58, 2034.59, 313.58, 907.95, 1302.02, 916.72, 1088.94, 111.8, 2100.11, 1095.96, 1418.09, 1158.17, 1060.38, 3002.65, 2658.78, 1780, 1892.4, 1973.05, 1453.75, 436.04, 575.4, 2216.15, 539.19, 1020.56, 60.62, 753.72, 462.27, 105.57, 118.94, 691.07], 2008: [112.83, 122.58, 2034.59, 313.58, 907.95, 1302.02, 916.72, 1088.94, 111.8, 2100.11, 1095.96, 1418.09, 1158.17, 1060.38, 3002.65, 2658.78, 1780, 1892.4, 1973.05, 1453.75, 436.04, 575.4, 2216.15, 539.19, 1020.56, 60.62, 753.72, 462.27, 105.57, 118.94, 691.07],
2007: [101.26, 110.19, 1804.72, 311.97, 762.1, 1133.42, 783.8, 915.38, 101.84, 1816.31, 986.02, 1200.18, 1002.11, 905.77, 2509.14, 2217.66, 1378, 1626.48, 1695.57, 1241.35, 361.07, 482.39, 2032, 446.38, 837.35, 54.89, 592.63, 387.55, 83.41, 97.89, 628.72], 2007: [101.26, 110.19, 1804.72, 311.97, 762.1, 1133.42, 783.8, 915.38, 101.84, 1816.31, 986.02, 1200.18, 1002.11, 905.77, 2509.14, 2217.66, 1378, 1626.48, 1695.57, 1241.35, 361.07, 482.39, 2032, 446.38, 837.35, 54.89, 592.63, 387.55, 83.41, 97.89, 628.72],
2006: [88.8, 103.35, 1461.81, 276.77, 634.94, 939.43, 672.76, 750.14, 93.81, 1545.05, 925.1, 1011.03, 865.98, 786.14, 2138.9, 1916.74, 1140.41, 1272.2, 1532.17, 1032.47, 323.48, 386.38, 1595.48, 382.06, 724.4, 50.9, 484.81, 334, 67.55, 79.54, 527.8], 2006: [88.8, 103.35, 1461.81, 276.77, 634.94, 939.43, 672.76, 750.14, 93.81, 1545.05, 925.1, 1011.03, 865.98, 786.14, 2138.9, 1916.74, 1140.41, 1272.2, 1532.17, 1032.47, 323.48, 386.38, 1595.48, 382.06, 724.4, 50.9, 484.81, 334, 67.55, 79.54, 527.8],
2005: [88.68, 112.38, 1400, 262.42, 589.56, 882.41, 625.61, 684.6, 90.26, 1461.51, 892.83, 966.5, 827.36, 727.37, 1963.51, 1892.01, 1082.13, 1100.65, 1428.27, 912.5, 300.75, 463.4, 1481.14, 368.94, 661.69, 48.04, 435.77, 308.06, 65.34, 72.07, 509.99], 2005: [88.68, 112.38, 1400, 262.42, 589.56, 882.41, 625.61, 684.6, 90.26, 1461.51, 892.83, 966.5, 827.36, 727.37, 1963.51, 1892.01, 1082.13, 1100.65, 1428.27, 912.5, 300.75, 463.4, 1481.14, 368.94, 661.69, 48.04, 435.77, 308.06, 65.34, 72.07, 509.99],
2004: [87.36, 105.28, 1370.43, 276.3, 522.8, 798.43, 568.69, 605.79, 83.45, 1367.58, 814.1, 950.5, 786.84, 664.5, 1778.45, 1649.29, 1020.09, 1022.45, 1248.59, 817.88, 278.76, 428.05, 1379.93, 334.5, 607.75, 44.3, 387.88, 286.78, 60.7, 65.33, 461.26], 2004: [87.36, 105.28, 1370.43, 276.3, 522.8, 798.43, 568.69, 605.79, 83.45, 1367.58, 814.1, 950.5, 786.84, 664.5, 1778.45, 1649.29, 1020.09, 1022.45, 1248.59, 817.88, 278.76, 428.05, 1379.93, 334.5, 607.75, 44.3, 387.88, 286.78, 60.7, 65.33, 461.26],
2003: [84.11, 89.91, 1064.05, 215.19, 420.1, 615.8, 488.23, 504.8, 81.02, 1162.45, 717.85, 749.4, 692.94, 560, 1480.67, 1198.7, 798.35, 886.47, 1072.91, 658.78, 244.29, 339.06, 1128.61, 298.69, 494.6, 40.7, 302.66, 237.91, 48.47, 55.63, 412.9], 2003: [84.11, 89.91, 1064.05, 215.19, 420.1, 615.8, 488.23, 504.8, 81.02, 1162.45, 717.85, 749.4, 692.94, 560, 1480.67, 1198.7, 798.35, 886.47, 1072.91, 658.78, 244.29, 339.06, 1128.61, 298.69, 494.6, 40.7, 302.66, 237.91, 48.47, 55.63, 412.9],
2002: [82.44, 84.21, 956.84, 197.8, 374.69, 590.2, 446.17, 474.2, 79.68, 1110.44, 685.2, 783.66, 664.78, 535.98, 1390, 1288.36, 707, 847.25, 1015.08, 601.99, 222.89, 317.87, 1047.95, 281.1, 463.44, 39.75, 282.21, 215.51, 47.31, 52.95, 305] 2002: [82.44, 84.21, 956.84, 197.8, 374.69, 590.2, 446.17, 474.2, 79.68, 1110.44, 685.2, 783.66, 664.78, 535.98, 1390, 1288.36, 707, 847.25, 1015.08, 601.99, 222.89, 317.87, 1047.95, 281.1, 463.44, 39.75, 282.21, 215.51, 47.31, 52.95, 305]
}) })
dataMap.dataSI = dataFormatter({ dataMap.dataSI = dataFormatter({
2011: [3752.48, 5928.32, 13126.86, 6635.26, 8037.69, 12152.15, 5611.48, 5962.41, 7927.89, 25203.28, 16555.58, 8309.38, 9069.2, 6390.55, 24017.11, 15427.08, 9815.94, 9361.99, 26447.38, 5675.32, 714.5, 5543.04, 11029.13, 2194.33, 3780.32, 208.79, 6935.59, 2377.83, 975.18, 1056.15, 3225.9], 2011: [3752.48, 5928.32, 13126.86, 6635.26, 8037.69, 12152.15, 5611.48, 5962.41, 7927.89, 25203.28, 16555.58, 8309.38, 9069.2, 6390.55, 24017.11, 15427.08, 9815.94, 9361.99, 26447.38, 5675.32, 714.5, 5543.04, 11029.13, 2194.33, 3780.32, 208.79, 6935.59, 2377.83, 975.18, 1056.15, 3225.9],
2010: [3388.38, 4840.23, 10707.68, 5234, 6367.69, 9976.82, 4506.31, 5025.15, 7218.32, 21753.93, 14297.93, 6436.62, 7522.83, 5122.88, 21238.49, 13226.38, 7767.24, 7343.19, 23014.53, 4511.68, 571, 4359.12, 8672.18, 1800.06, 3223.49, 163.92, 5446.1, 1984.97, 744.63, 827.91, 2592.15], 2010: [3388.38, 4840.23, 10707.68, 5234, 6367.69, 9976.82, 4506.31, 5025.15, 7218.32, 21753.93, 14297.93, 6436.62, 7522.83, 5122.88, 21238.49, 13226.38, 7767.24, 7343.19, 23014.53, 4511.68, 571, 4359.12, 8672.18, 1800.06, 3223.49, 163.92, 5446.1, 1984.97, 744.63, 827.91, 2592.15],
2009: [2855.55, 3987.84, 8959.83, 3993.8, 5114, 7906.34, 3541.92, 4060.72, 6001.78, 18566.37, 11908.49, 4905.22, 6005.3, 3919.45, 18901.83, 11010.5, 6038.08, 5687.19, 19419.7, 3381.54, 443.43, 3448.77, 6711.87, 1476.62, 2582.53, 136.63, 4236.42, 1527.24, 575.33, 662.32, 1929.59], 2009: [2855.55, 3987.84, 8959.83, 3993.8, 5114, 7906.34, 3541.92, 4060.72, 6001.78, 18566.37, 11908.49, 4905.22, 6005.3, 3919.45, 18901.83, 11010.5, 6038.08, 5687.19, 19419.7, 3381.54, 443.43, 3448.77, 6711.87, 1476.62, 2582.53, 136.63, 4236.42, 1527.24, 575.33, 662.32, 1929.59],
2008: [2626.41, 3709.78, 8701.34, 4242.36, 4376.19, 7158.84, 3097.12, 4319.75, 6085.84, 16993.34, 11567.42, 4198.93, 5318.44, 3554.81, 17571.98, 10259.99, 5082.07, 5028.93, 18502.2, 3037.74, 423.55, 3057.78, 5823.39, 1370.03, 2452.75, 115.56, 3861.12, 1470.34, 557.12, 609.98, 2070.76], 2008: [2626.41, 3709.78, 8701.34, 4242.36, 4376.19, 7158.84, 3097.12, 4319.75, 6085.84, 16993.34, 11567.42, 4198.93, 5318.44, 3554.81, 17571.98, 10259.99, 5082.07, 5028.93, 18502.2, 3037.74, 423.55, 3057.78, 5823.39, 1370.03, 2452.75, 115.56, 3861.12, 1470.34, 557.12, 609.98, 2070.76],
2007: [2509.4, 2892.53, 7201.88, 3454.49, 3193.67, 5544.14, 2475.45, 3695.58, 5571.06, 14471.26, 10154.25, 3370.96, 4476.42, 2975.53, 14647.53, 8282.83, 4143.06, 3977.72, 16004.61, 2425.29, 364.26, 2368.53, 4648.79, 1124.79, 2038.39, 98.48, 2986.46, 1279.32, 419.03, 455.04, 1647.55], 2007: [2509.4, 2892.53, 7201.88, 3454.49, 3193.67, 5544.14, 2475.45, 3695.58, 5571.06, 14471.26, 10154.25, 3370.96, 4476.42, 2975.53, 14647.53, 8282.83, 4143.06, 3977.72, 16004.61, 2425.29, 364.26, 2368.53, 4648.79, 1124.79, 2038.39, 98.48, 2986.46, 1279.32, 419.03, 455.04, 1647.55],
2006: [2191.43, 2457.08, 6110.43, 2755.66, 2374.96, 4566.83, 1915.29, 3365.31, 4969.95, 12282.89, 8511.51, 2711.18, 3695.04, 2419.74, 12574.03, 6724.61, 3365.08, 3187.05, 13469.77, 1878.56, 308.62, 1871.65, 3775.14, 967.54, 1705.83, 80.1, 2452.44, 1043.19, 331.91, 351.58, 1459.3], 2006: [2191.43, 2457.08, 6110.43, 2755.66, 2374.96, 4566.83, 1915.29, 3365.31, 4969.95, 12282.89, 8511.51, 2711.18, 3695.04, 2419.74, 12574.03, 6724.61, 3365.08, 3187.05, 13469.77, 1878.56, 308.62, 1871.65, 3775.14, 967.54, 1705.83, 80.1, 2452.44, 1043.19, 331.91, 351.58, 1459.3],
2005: [2026.51, 2135.07, 5271.57, 2357.04, 1773.21, 3869.4, 1580.83, 2971.68, 4381.2, 10524.96, 7164.75, 2245.9, 3175.92, 1917.47, 10478.62, 5514.14, 2852.12, 2612.57, 11356.6, 1510.68, 240.83, 1564, 3067.23, 821.16, 1426.42, 63.52, 1951.36, 838.56, 264.61, 281.05, 1164.79], 2005: [2026.51, 2135.07, 5271.57, 2357.04, 1773.21, 3869.4, 1580.83, 2971.68, 4381.2, 10524.96, 7164.75, 2245.9, 3175.92, 1917.47, 10478.62, 5514.14, 2852.12, 2612.57, 11356.6, 1510.68, 240.83, 1564, 3067.23, 821.16, 1426.42, 63.52, 1951.36, 838.56, 264.61, 281.05, 1164.79],
2004: [1853.58, 1685.93, 4301.73, 1919.4, 1248.27, 3061.62, 1329.68, 2487.04, 3892.12, 8437.99, 6250.38, 1844.9, 2770.49, 1566.4, 8478.69, 4182.1, 2320.6, 2190.54, 9280.73, 1253.7, 205.6, 1376.91, 2489.4, 681.5, 1281.63, 52.74, 1553.1, 713.3, 211.7, 244.05, 914.47], 2004: [1853.58, 1685.93, 4301.73, 1919.4, 1248.27, 3061.62, 1329.68, 2487.04, 3892.12, 8437.99, 6250.38, 1844.9, 2770.49, 1566.4, 8478.69, 4182.1, 2320.6, 2190.54, 9280.73, 1253.7, 205.6, 1376.91, 2489.4, 681.5, 1281.63, 52.74, 1553.1, 713.3, 211.7, 244.05, 914.47],
2003: [1487.15, 1337.31, 3417.56, 1463.38, 967.49, 2898.89, 1098.37, 2084.7, 3209.02, 6787.11, 5096.38, 1535.29, 2340.82, 1204.33, 6485.05, 3310.14, 1956.02, 1777.74, 7592.78, 984.08, 175.82, 1135.31, 2014.8, 569.37, 1047.66, 47.64, 1221.17, 572.02, 171.92, 194.27, 719.54], 2003: [1487.15, 1337.31, 3417.56, 1463.38, 967.49, 2898.89, 1098.37, 2084.7, 3209.02, 6787.11, 5096.38, 1535.29, 2340.82, 1204.33, 6485.05, 3310.14, 1956.02, 1777.74, 7592.78, 984.08, 175.82, 1135.31, 2014.8, 569.37, 1047.66, 47.64, 1221.17, 572.02, 171.92, 194.27, 719.54],
2002: [1249.99, 1069.08, 2911.69, 1134.31, 754.78, 2609.85, 943.49, 1843.6, 2622.45, 5604.49, 4090.48, 1337.04, 2036.97, 941.77, 5184.98, 2768.75, 1709.89, 1523.5, 6143.4, 846.89, 148.88, 958.87, 1733.38, 481.96, 934.88, 32.72, 1007.56, 501.69, 144.51, 153.06, 603.15] 2002: [1249.99, 1069.08, 2911.69, 1134.31, 754.78, 2609.85, 943.49, 1843.6, 2622.45, 5604.49, 4090.48, 1337.04, 2036.97, 941.77, 5184.98, 2768.75, 1709.89, 1523.5, 6143.4, 846.89, 148.88, 958.87, 1733.38, 481.96, 934.88, 32.72, 1007.56, 501.69, 144.51, 153.06, 603.15]
}) })
dataMap.dataTI = dataFormatter({ dataMap.dataTI = dataFormatter({
2011: [12363.18, 5219.24, 8483.17, 3960.87, 5015.89, 8158.98, 3679.91, 4918.09, 11142.86, 20842.21, 14180.23, 4975.96, 6878.74, 3921.2, 17370.89, 7991.72, 7247.02, 7539.54, 24097.7, 3998.33, 1148.93, 3623.81, 7014.04, 2781.29, 3701.79, 322.57, 4355.81, 1963.79, 540.18, 861.92, 2245.12], 2011: [12363.18, 5219.24, 8483.17, 3960.87, 5015.89, 8158.98, 3679.91, 4918.09, 11142.86, 20842.21, 14180.23, 4975.96, 6878.74, 3921.2, 17370.89, 7991.72, 7247.02, 7539.54, 24097.7, 3998.33, 1148.93, 3623.81, 7014.04, 2781.29, 3701.79, 322.57, 4355.81, 1963.79, 540.18, 861.92, 2245.12],
2010: [10600.84, 4238.65, 7123.77, 3412.38, 4209.03, 6849.37, 3111.12, 4040.55, 9833.51, 17131.45, 12063.82, 4193.69, 5850.62, 3121.4, 14343.14, 6607.89, 6053.37, 6369.27, 20711.55, 3383.11, 953.67, 2881.08, 6030.41, 2177.07, 2892.31, 274.82, 3688.93, 1536.5, 470.88, 702.45, 1766.69], 2010: [10600.84, 4238.65, 7123.77, 3412.38, 4209.03, 6849.37, 3111.12, 4040.55, 9833.51, 17131.45, 12063.82, 4193.69, 5850.62, 3121.4, 14343.14, 6607.89, 6053.37, 6369.27, 20711.55, 3383.11, 953.67, 2881.08, 6030.41, 2177.07, 2892.31, 274.82, 3688.93, 1536.5, 470.88, 702.45, 1766.69],
2009: [9179.19, 3405.16, 6068.31, 2886.92, 3696.65, 5891.25, 2756.26, 3371.95, 8930.85, 13629.07, 9918.78, 3662.15, 5048.49, 2637.07, 11768.18, 5700.91, 5127.12, 5402.81, 18052.59, 2919.13, 748.59, 2474.44, 5198.8, 1885.79, 2519.62, 240.85, 3143.74, 1363.27, 398.54, 563.74, 1587.72], 2009: [9179.19, 3405.16, 6068.31, 2886.92, 3696.65, 5891.25, 2756.26, 3371.95, 8930.85, 13629.07, 9918.78, 3662.15, 5048.49, 2637.07, 11768.18, 5700.91, 5127.12, 5402.81, 18052.59, 2919.13, 748.59, 2474.44, 5198.8, 1885.79, 2519.62, 240.85, 3143.74, 1363.27, 398.54, 563.74, 1587.72],
2008: [8375.76, 2886.65, 5276.04, 2759.46, 3212.06, 5207.72, 2412.26, 2905.68, 7872.23, 11888.53, 8799.31, 3234.64, 4346.4, 2355.86, 10358.64, 5099.76, 4466.85, 4633.67, 16321.46, 2529.51, 643.47, 2160.48, 4561.69, 1652.34, 2218.81, 218.67, 2699.74, 1234.21, 355.93, 475, 1421.38], 2008: [8375.76, 2886.65, 5276.04, 2759.46, 3212.06, 5207.72, 2412.26, 2905.68, 7872.23, 11888.53, 8799.31, 3234.64, 4346.4, 2355.86, 10358.64, 5099.76, 4466.85, 4633.67, 16321.46, 2529.51, 643.47, 2160.48, 4561.69, 1652.34, 2218.81, 218.67, 2699.74, 1234.21, 355.93, 475, 1421.38],
2007: [7236.15, 2250.04, 4600.72, 2257.99, 2467.41, 4486.74, 2025.44, 2493.04, 6821.11, 9730.91, 7613.46, 2789.78, 3770, 1918.95, 8620.24, 4511.97, 3812.34, 3835.4, 14076.83, 2156.76, 528.84, 1825.21, 3881.6, 1312.94, 1896.78, 188.06, 2178.2, 1037.11, 294.91, 366.18, 1246.89], 2007: [7236.15, 2250.04, 4600.72, 2257.99, 2467.41, 4486.74, 2025.44, 2493.04, 6821.11, 9730.91, 7613.46, 2789.78, 3770, 1918.95, 8620.24, 4511.97, 3812.34, 3835.4, 14076.83, 2156.76, 528.84, 1825.21, 3881.6, 1312.94, 1896.78, 188.06, 2178.2, 1037.11, 294.91, 366.18, 1246.89],
2006: [5837.55, 1902.31, 3895.36, 1846.18, 1934.35, 3798.26, 1687.07, 2096.35, 5508.48, 7914.11, 6281.86, 2390.29, 3022.83, 1614.65, 7187.26, 3721.44, 3111.98, 3229.42, 11585.82, 1835.12, 433.57, 1649.2, 3319.62, 989.38, 1557.91, 159.76, 1806.36, 900.16, 249.04, 294.78, 1058.16], 2006: [5837.55, 1902.31, 3895.36, 1846.18, 1934.35, 3798.26, 1687.07, 2096.35, 5508.48, 7914.11, 6281.86, 2390.29, 3022.83, 1614.65, 7187.26, 3721.44, 3111.98, 3229.42, 11585.82, 1835.12, 433.57, 1649.2, 3319.62, 989.38, 1557.91, 159.76, 1806.36, 900.16, 249.04, 294.78, 1058.16],
2005: [4854.33, 1658.19, 3340.54, 1611.07, 1542.26, 3295.45, 1413.83, 1857.42, 4776.2, 6612.22, 5360.1, 2137.77, 2551.41, 1411.92, 5924.74, 3181.27, 2655.94, 2882.88, 9772.5, 1560.92, 377.17, 1440.32, 2836.73, 815.32, 1374.62, 137.24, 1546.59, 787.36, 213.37, 259.49, 929.41], 2005: [4854.33, 1658.19, 3340.54, 1611.07, 1542.26, 3295.45, 1413.83, 1857.42, 4776.2, 6612.22, 5360.1, 2137.77, 2551.41, 1411.92, 5924.74, 3181.27, 2655.94, 2882.88, 9772.5, 1560.92, 377.17, 1440.32, 2836.73, 815.32, 1374.62, 137.24, 1546.59, 787.36, 213.37, 259.49, 929.41],
2004: [4092.27, 1319.76, 2805.47, 1375.67, 1270, 2811.95, 1223.64, 1657.77, 4097.26, 5198.03, 4584.22, 1963.9, 2206.02, 1225.8, 4764.7, 2722.4, 2292.55, 2428.95, 8335.3, 1361.92, 335.3, 1229.62, 2510.3, 661.8, 1192.53, 123.3, 1234.6, 688.41, 193.7, 227.73, 833.36], 2004: [4092.27, 1319.76, 2805.47, 1375.67, 1270, 2811.95, 1223.64, 1657.77, 4097.26, 5198.03, 4584.22, 1963.9, 2206.02, 1225.8, 4764.7, 2722.4, 2292.55, 2428.95, 8335.3, 1361.92, 335.3, 1229.62, 2510.3, 661.8, 1192.53, 123.3, 1234.6, 688.41, 193.7, 227.73, 833.36],
2003: [3435.95, 1150.81, 2439.68, 1176.65, 1000.79, 2487.85, 1075.48, 1467.9, 3404.19, 4493.31, 3890.79, 1638.42, 1949.91, 1043.08, 4112.43, 2358.86, 2003.08, 1995.78, 7178.94, 1178.25, 293.85, 1081.35, 2189.68, 558.28, 1013.76, 96.76, 1063.89, 589.91, 169.81, 195.46, 753.91], 2003: [3435.95, 1150.81, 2439.68, 1176.65, 1000.79, 2487.85, 1075.48, 1467.9, 3404.19, 4493.31, 3890.79, 1638.42, 1949.91, 1043.08, 4112.43, 2358.86, 2003.08, 1995.78, 7178.94, 1178.25, 293.85, 1081.35, 2189.68, 558.28, 1013.76, 96.76, 1063.89, 589.91, 169.81, 195.46, 753.91],
2002: [2982.57, 997.47, 2149.75, 992.69, 811.47, 2258.17, 958.88, 1319.4, 3038.9, 3891.92, 3227.99, 1399.02, 1765.8, 972.73, 3700.52, 1978.37, 1795.93, 1780.79, 6343.94, 1074.85, 270.96, 956.12, 1943.68, 480.37, 914.5, 89.56, 963.62, 514.83, 148.83, 171.14, 704.5] 2002: [2982.57, 997.47, 2149.75, 992.69, 811.47, 2258.17, 958.88, 1319.4, 3038.9, 3891.92, 3227.99, 1399.02, 1765.8, 972.73, 3700.52, 1978.37, 1795.93, 1780.79, 6343.94, 1074.85, 270.96, 956.12, 1943.68, 480.37, 914.5, 89.56, 963.62, 514.83, 148.83, 171.14, 704.5]
}) })
dataMap.dataEstate = dataFormatter({ dataMap.dataEstate = dataFormatter({
2011: [1074.93, 411.46, 918.02, 224.91, 384.76, 876.12, 238.61, 492.1, 1019.68, 2747.89, 1677.13, 634.92, 911.16, 402.51, 1838.14, 987, 634.67, 518.04, 3321.31, 465.68, 208.71, 396.28, 620.62, 160.3, 222.31, 17.44, 398.03, 134.25, 29.05, 79.01, 176.22], 2011: [1074.93, 411.46, 918.02, 224.91, 384.76, 876.12, 238.61, 492.1, 1019.68, 2747.89, 1677.13, 634.92, 911.16, 402.51, 1838.14, 987, 634.67, 518.04, 3321.31, 465.68, 208.71, 396.28, 620.62, 160.3, 222.31, 17.44, 398.03, 134.25, 29.05, 79.01, 176.22],
2010: [1006.52, 377.59, 697.79, 192, 309.25, 733.37, 212.32, 391.89, 1002.5, 2600.95, 1618.17, 532.17, 679.03, 340.56, 1622.15, 773.23, 564.41, 464.21, 2813.95, 405.79, 188.33, 266.38, 558.56, 139.64, 223.45, 14.54, 315.95, 110.02, 25.41, 60.53, 143.44], 2010: [1006.52, 377.59, 697.79, 192, 309.25, 733.37, 212.32, 391.89, 1002.5, 2600.95, 1618.17, 532.17, 679.03, 340.56, 1622.15, 773.23, 564.41, 464.21, 2813.95, 405.79, 188.33, 266.38, 558.56, 139.64, 223.45, 14.54, 315.95, 110.02, 25.41, 60.53, 143.44],
2009: [1062.47, 308.73, 612.4, 173.31, 286.65, 605.27, 200.14, 301.18, 1237.56, 2025.39, 1316.84, 497.94, 656.61, 305.9, 1329.59, 622.98, 546.11, 400.11, 2470.63, 348.98, 121.76, 229.09, 548.14, 136.15, 205.14, 13.28, 239.92, 101.37, 23.05, 47.56, 115.23], 2009: [1062.47, 308.73, 612.4, 173.31, 286.65, 605.27, 200.14, 301.18, 1237.56, 2025.39, 1316.84, 497.94, 656.61, 305.9, 1329.59, 622.98, 546.11, 400.11, 2470.63, 348.98, 121.76, 229.09, 548.14, 136.15, 205.14, 13.28, 239.92, 101.37, 23.05, 47.56, 115.23],
2008: [844.59, 227.88, 513.81, 166.04, 273.3, 500.81, 182.7, 244.47, 939.34, 1626.13, 1052.03, 431.27, 506.98, 281.96, 1104.95, 512.42, 526.88, 340.07, 2057.45, 282.96, 95.6, 191.21, 453.63, 104.81, 195.48, 15.08, 193.27, 93.8, 19.96, 38.85, 89.79], 2008: [844.59, 227.88, 513.81, 166.04, 273.3, 500.81, 182.7, 244.47, 939.34, 1626.13, 1052.03, 431.27, 506.98, 281.96, 1104.95, 512.42, 526.88, 340.07, 2057.45, 282.96, 95.6, 191.21, 453.63, 104.81, 195.48, 15.08, 193.27, 93.8, 19.96, 38.85, 89.79],
2007: [821.5, 183.44, 467.97, 134.12, 191.01, 410.43, 153.03, 225.81, 958.06, 1365.71, 981.42, 366.57, 511.5, 225.96, 953.69, 447.44, 409.65, 301.8, 2029.77, 239.45, 67.19, 196.06, 376.84, 93.19, 193.59, 13.24, 153.98, 83.52, 16.98, 29.49, 91.28], 2007: [821.5, 183.44, 467.97, 134.12, 191.01, 410.43, 153.03, 225.81, 958.06, 1365.71, 981.42, 366.57, 511.5, 225.96, 953.69, 447.44, 409.65, 301.8, 2029.77, 239.45, 67.19, 196.06, 376.84, 93.19, 193.59, 13.24, 153.98, 83.52, 16.98, 29.49, 91.28],
2006: [658.3, 156.64, 397.14, 117.01, 136.5, 318.54, 131.01, 194.7, 773.61, 1017.91, 794.41, 281.98, 435.22, 184.67, 786.51, 348.7, 294.73, 254.81, 1722.07, 192.2, 44.45, 158.2, 336.2, 80.24, 165.92, 11.92, 125.2, 73.21, 15.17, 25.53, 68.9], 2006: [658.3, 156.64, 397.14, 117.01, 136.5, 318.54, 131.01, 194.7, 773.61, 1017.91, 794.41, 281.98, 435.22, 184.67, 786.51, 348.7, 294.73, 254.81, 1722.07, 192.2, 44.45, 158.2, 336.2, 80.24, 165.92, 11.92, 125.2, 73.21, 15.17, 25.53, 68.9],
2005: [493.73, 122.67, 330.87, 106, 98.75, 256.77, 112.29, 163.34, 715.97, 799.73, 688.86, 231.66, 331.8, 171.88, 664.9, 298.19, 217.17, 215.63, 1430.37, 165.05, 38.2, 143.88, 286.23, 76.38, 148.69, 10.02, 108.62, 63.78, 14.1, 22.97, 55.79], 2005: [493.73, 122.67, 330.87, 106, 98.75, 256.77, 112.29, 163.34, 715.97, 799.73, 688.86, 231.66, 331.8, 171.88, 664.9, 298.19, 217.17, 215.63, 1430.37, 165.05, 38.2, 143.88, 286.23, 76.38, 148.69, 10.02, 108.62, 63.78, 14.1, 22.97, 55.79],
2004: [436.11, 106.14, 231.08, 95.1, 73.81, 203.1, 97.93, 137.74, 666.3, 534.17, 587.83, 188.28, 248.44, 167.2, 473.27, 236.44, 204.8, 191.5, 1103.75, 122.52, 30.64, 129.12, 264.3, 68.3, 116.54, 5.8, 95.9, 56.84, 13, 20.78, 53.55], 2004: [436.11, 106.14, 231.08, 95.1, 73.81, 203.1, 97.93, 137.74, 666.3, 534.17, 587.83, 188.28, 248.44, 167.2, 473.27, 236.44, 204.8, 191.5, 1103.75, 122.52, 30.64, 129.12, 264.3, 68.3, 116.54, 5.8, 95.9, 56.84, 13, 20.78, 53.55],
2003: [341.88, 92.31, 185.19, 78.73, 61.05, 188.49, 91.99, 127.2, 487.82, 447.47, 473.16, 162.63, 215.84, 138.02, 418.21, 217.58, 176.8, 186.49, 955.66, 100.93, 25.14, 113.69, 231.72, 59.86, 103.79, 4.35, 83.9, 48.09, 11.41, 16.85, 47.84], 2003: [341.88, 92.31, 185.19, 78.73, 61.05, 188.49, 91.99, 127.2, 487.82, 447.47, 473.16, 162.63, 215.84, 138.02, 418.21, 217.58, 176.8, 186.49, 955.66, 100.93, 25.14, 113.69, 231.72, 59.86, 103.79, 4.35, 83.9, 48.09, 11.41, 16.85, 47.84],
2002: [298.02, 73.04, 140.89, 65.83, 51.48, 130.94, 76.11, 118.7, 384.86, 371.09, 360.63, 139.18, 188.09, 125.27, 371.13, 199.31, 145.17, 165.29, 808.16, 82.83, 21.45, 90.48, 210.82, 53.49, 95.68, 3.42, 77.68, 41.52, 9.74, 13.46, 43.04] 2002: [298.02, 73.04, 140.89, 65.83, 51.48, 130.94, 76.11, 118.7, 384.86, 371.09, 360.63, 139.18, 188.09, 125.27, 371.13, 199.31, 145.17, 165.29, 808.16, 82.83, 21.45, 90.48, 210.82, 53.49, 95.68, 3.42, 77.68, 41.52, 9.74, 13.46, 43.04]
}) })
dataMap.dataFinancial = dataFormatter({ dataMap.dataFinancial = dataFormatter({
2011: [2215.41, 756.5, 746.01, 519.32, 447.46, 755.57, 207.65, 370.78, 2277.4, 2600.11, 2730.29, 503.85, 862.41, 357.44, 1640.41, 868.2, 674.57, 501.09, 2916.13, 445.37, 105.24, 704.66, 868.15, 297.27, 456.23, 31.7, 432.11, 145.05, 62.56, 134.18, 288.77], 2011: [2215.41, 756.5, 746.01, 519.32, 447.46, 755.57, 207.65, 370.78, 2277.4, 2600.11, 2730.29, 503.85, 862.41, 357.44, 1640.41, 868.2, 674.57, 501.09, 2916.13, 445.37, 105.24, 704.66, 868.15, 297.27, 456.23, 31.7, 432.11, 145.05, 62.56, 134.18, 288.77],
2010: [1863.61, 572.99, 615.42, 448.3, 346.44, 639.27, 190.12, 304.59, 1950.96, 2105.92, 2326.58, 396.17, 767.58, 241.49, 1361.45, 697.68, 561.27, 463.16, 2658.76, 384.53, 78.12, 496.56, 654.7, 231.51, 375.08, 27.08, 384.75, 100.54, 54.53, 97.87, 225.2], 2010: [1863.61, 572.99, 615.42, 448.3, 346.44, 639.27, 190.12, 304.59, 1950.96, 2105.92, 2326.58, 396.17, 767.58, 241.49, 1361.45, 697.68, 561.27, 463.16, 2658.76, 384.53, 78.12, 496.56, 654.7, 231.51, 375.08, 27.08, 384.75, 100.54, 54.53, 97.87, 225.2],
2009: [1603.63, 461.2, 525.67, 361.64, 291.1, 560.2, 180.83, 227.54, 1804.28, 1596.98, 1899.33, 359.6, 612.2, 165.1, 1044.9, 499.92, 479.11, 402.57, 2283.29, 336.82, 65.73, 389.97, 524.63, 194.44, 351.74, 23.17, 336.21, 88.27, 45.63, 75.54, 198.87], 2009: [1603.63, 461.2, 525.67, 361.64, 291.1, 560.2, 180.83, 227.54, 1804.28, 1596.98, 1899.33, 359.6, 612.2, 165.1, 1044.9, 499.92, 479.11, 402.57, 2283.29, 336.82, 65.73, 389.97, 524.63, 194.44, 351.74, 23.17, 336.21, 88.27, 45.63, 75.54, 198.87],
2008: [1519.19, 368.1, 420.74, 290.91, 219.09, 455.07, 147.24, 177.43, 1414.21, 1298.48, 1653.45, 313.81, 497.65, 130.57, 880.28, 413.83, 393.05, 334.32, 1972.4, 249.01, 47.33, 303.01, 411.14, 151.55, 277.66, 22.42, 287.16, 72.49, 36.54, 64.8, 171.97], 2008: [1519.19, 368.1, 420.74, 290.91, 219.09, 455.07, 147.24, 177.43, 1414.21, 1298.48, 1653.45, 313.81, 497.65, 130.57, 880.28, 413.83, 393.05, 334.32, 1972.4, 249.01, 47.33, 303.01, 411.14, 151.55, 277.66, 22.42, 287.16, 72.49, 36.54, 64.8, 171.97],
2007: [1302.77, 288.17, 347.65, 218.73, 148.3, 386.34, 126.03, 155.48, 1209.08, 1054.25, 1251.43, 223.85, 385.84, 101.34, 734.9, 302.31, 337.27, 260.14, 1705.08, 190.73, 34.43, 247.46, 359.11, 122.25, 168.55, 11.51, 231.03, 61.6, 27.67, 51.05, 149.22], 2007: [1302.77, 288.17, 347.65, 218.73, 148.3, 386.34, 126.03, 155.48, 1209.08, 1054.25, 1251.43, 223.85, 385.84, 101.34, 734.9, 302.31, 337.27, 260.14, 1705.08, 190.73, 34.43, 247.46, 359.11, 122.25, 168.55, 11.51, 231.03, 61.6, 27.67, 51.05, 149.22],
2006: [982.37, 186.87, 284.04, 169.63, 108.21, 303.41, 100.75, 74.17, 825.2, 653.25, 906.37, 166.01, 243.9, 79.75, 524.94, 219.72, 174.99, 204.72, 899.91, 129.14, 16.37, 213.7, 299.5, 89.43, 143.62, 6.44, 152.25, 50.51, 23.69, 36.99, 99.25], 2006: [982.37, 186.87, 284.04, 169.63, 108.21, 303.41, 100.75, 74.17, 825.2, 653.25, 906.37, 166.01, 243.9, 79.75, 524.94, 219.72, 174.99, 204.72, 899.91, 129.14, 16.37, 213.7, 299.5, 89.43, 143.62, 6.44, 152.25, 50.51, 23.69, 36.99, 99.25],
2005: [840.2, 147.4, 213.47, 135.07, 72.52, 232.85, 83.63, 35.03, 675.12, 492.4, 686.32, 127.05, 186.12, 69.55, 448.36, 181.74, 127.32, 162.37, 661.81, 91.93, 13.16, 185.18, 262.26, 73.67, 130.5, 7.57, 127.58, 44.73, 20.36, 32.25, 80.34], 2005: [840.2, 147.4, 213.47, 135.07, 72.52, 232.85, 83.63, 35.03, 675.12, 492.4, 686.32, 127.05, 186.12, 69.55, 448.36, 181.74, 127.32, 162.37, 661.81, 91.93, 13.16, 185.18, 262.26, 73.67, 130.5, 7.57, 127.58, 44.73, 20.36, 32.25, 80.34],
2004: [713.79, 136.97, 209.1, 110.29, 55.89, 188.04, 77.17, 32.2, 612.45, 440.5, 523.49, 94.1, 171, 65.1, 343.37, 170.82, 118.85, 118.64, 602.68, 74, 11.56, 162.38, 236.5, 60.3, 118.4, 5.4, 90.1, 42.99, 19, 27.92, 70.3], 2004: [713.79, 136.97, 209.1, 110.29, 55.89, 188.04, 77.17, 32.2, 612.45, 440.5, 523.49, 94.1, 171, 65.1, 343.37, 170.82, 118.85, 118.64, 602.68, 74, 11.56, 162.38, 236.5, 60.3, 118.4, 5.4, 90.1, 42.99, 19, 27.92, 70.3],
2003: [635.56, 112.79, 199.87, 118.48, 55.89, 145.38, 73.15, 32.2, 517.97, 392.11, 451.54, 87.45, 150.09, 64.31, 329.71, 165.11, 107.31, 99.35, 534.28, 61.59, 10.68, 147.04, 206.24, 48.01, 105.48, 4.74, 77.87, 42.31, 17.98, 24.8, 64.92], 2003: [635.56, 112.79, 199.87, 118.48, 55.89, 145.38, 73.15, 32.2, 517.97, 392.11, 451.54, 87.45, 150.09, 64.31, 329.71, 165.11, 107.31, 99.35, 534.28, 61.59, 10.68, 147.04, 206.24, 48.01, 105.48, 4.74, 77.87, 42.31, 17.98, 24.8, 64.92],
2002: [561.91, 76.86, 179.6, 124.1, 48.39, 137.18, 75.45, 31.6, 485.25, 368.86, 347.53, 81.85, 138.28, 76.51, 310.07, 158.77, 96.95, 92.43, 454.65, 35.86, 10.08, 134.52, 183.13, 41.45, 102.39, 2.81, 67.3, 42.08, 16.75, 21.45, 52.18] 2002: [561.91, 76.86, 179.6, 124.1, 48.39, 137.18, 75.45, 31.6, 485.25, 368.86, 347.53, 81.85, 138.28, 76.51, 310.07, 158.77, 96.95, 92.43, 454.65, 35.86, 10.08, 134.52, 183.13, 41.45, 102.39, 2.81, 67.3, 42.08, 16.75, 21.45, 52.18]
}) })
this.chart.setOption({ this.chart.setOption({
baseOption: { baseOption: {
timeline: { timeline: {
axisType: 'category', axisType: 'category',
autoPlay: true, autoPlay: true,
playInterval: 1000, playInterval: 1000,
data: [ data: [
'2002-01-01', '2003-01-01', '2004-01-01', '2002-01-01', '2003-01-01', '2004-01-01',
{ {
value: '2005-01-01', value: '2005-01-01',
tooltip: { tooltip: {
formatter: '{b} GDP达到一个高度' formatter: '{b} GDP达到一个高度'
}, },
symbol: 'diamond', symbol: 'diamond',
symbolSize: 16 symbolSize: 16
}, },
'2006-01-01', '2007-01-01', '2008-01-01', '2009-01-01', '2010-01-01', '2006-01-01', '2007-01-01', '2008-01-01', '2009-01-01', '2010-01-01',
{ {
value: '2011-01-01', value: '2011-01-01',
tooltip: { tooltip: {
formatter: function(params) { formatter: function(params) {
return params.name + 'GDP达到又一个高度' return params.name + 'GDP达到又一个高度'
} }
}, },
symbol: 'diamond', symbol: 'diamond',
symbolSize: 18 symbolSize: 18
} }
], ],
label: { label: {
formatter: function(s) { formatter: function(s) {
return (new Date(s)).getFullYear() return (new Date(s)).getFullYear()
} }
} }
}, },
title: { title: {
subtext: '数据来自国家统计局' subtext: '数据来自国家统计局'
}, },
tooltip: {}, tooltip: {},
legend: { legend: {
x: 'right', x: 'right',
data: ['第一产业', '第二产业', '第三产业', 'GDP', '金融', '房地产'], data: ['第一产业', '第二产业', '第三产业', 'GDP', '金融', '房地产'],
selected: { selected: {
'GDP': false, '金融': false, '房地产': false 'GDP': false, '金融': false, '房地产': false
} }
}, },
calculable: true, calculable: true,
grid: { grid: {
top: 80, top: 80,
bottom: 100, bottom: 100,
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
type: 'shadow', type: 'shadow',
label: { label: {
show: true, show: true,
formatter: function(params) { formatter: function(params) {
return params.value.replace('\n', '') return params.value.replace('\n', '')
} }
} }
} }
} }
}, },
xAxis: [ xAxis: [
{ {
'type': 'category', 'type': 'category',
'axisLabel': { 'axisLabel': {
'interval': 0, 'interval': 0,
rotate: 45 rotate: 45
}, },
'data': [ 'data': [
'北京', '\n天津', '河北', '\n山西', '内蒙古', '\n辽宁', '吉林', '\n黑龙江', '北京', '\n天津', '河北', '\n山西', '内蒙古', '\n辽宁', '吉林', '\n黑龙江',
'上海', '\n江苏', '浙江', '\n安徽', '福建', '\n江西', '山东', '\n河南', '上海', '\n江苏', '浙江', '\n安徽', '福建', '\n江西', '山东', '\n河南',
'湖北', '\n湖南', '广东', '\n广西', '海南', '\n重庆', '四川', '\n贵州', '湖北', '\n湖南', '广东', '\n广西', '海南', '\n重庆', '四川', '\n贵州',
'云南', '\n西藏', '陕西', '\n甘肃', '青海', '\n宁夏', '新疆' '云南', '\n西藏', '陕西', '\n甘肃', '青海', '\n宁夏', '新疆'
], ],
splitLine: { show: false } splitLine: { show: false }
} }
], ],
yAxis: [ yAxis: [
{ {
type: 'value', type: 'value',
name: 'GDP(亿元)' name: 'GDP(亿元)'
} }
], ],
series: [ series: [
{ name: 'GDP', type: 'bar' }, { name: 'GDP', type: 'bar' },
{ name: '金融', type: 'bar' }, { name: '金融', type: 'bar' },
{ name: '房地产', type: 'bar' }, { name: '房地产', type: 'bar' },
{ name: '第一产业', type: 'bar' }, { name: '第一产业', type: 'bar' },
{ name: '第二产业', type: 'bar' }, { name: '第二产业', type: 'bar' },
{ name: '第三产业', type: 'bar' }, { name: '第三产业', type: 'bar' },
{ {
name: 'GDP占比', name: 'GDP占比',
type: 'pie', type: 'pie',
center: ['75%', '35%'], center: ['75%', '35%'],
radius: '28%', radius: '28%',
z: 100 z: 100
} }
] ]
}, },
options: [ options: [
{ {
title: { text: '2002全国宏观经济指标' }, title: { text: '2002全国宏观经济指标' },
series: [ series: [
{ data: dataMap.dataGDP['2002'] }, { data: dataMap.dataGDP['2002'] },
{ data: dataMap.dataFinancial['2002'] }, { data: dataMap.dataFinancial['2002'] },
{ data: dataMap.dataEstate['2002'] }, { data: dataMap.dataEstate['2002'] },
{ data: dataMap.dataPI['2002'] }, { data: dataMap.dataPI['2002'] },
{ data: dataMap.dataSI['2002'] }, { data: dataMap.dataSI['2002'] },
{ data: dataMap.dataTI['2002'] }, { data: dataMap.dataTI['2002'] },
{ {
data: [ data: [
{ name: '第一产业', value: dataMap.dataPI['2002sum'] }, { name: '第一产业', value: dataMap.dataPI['2002sum'] },
{ name: '第二产业', value: dataMap.dataSI['2002sum'] }, { name: '第二产业', value: dataMap.dataSI['2002sum'] },
{ name: '第三产业', value: dataMap.dataTI['2002sum'] } { name: '第三产业', value: dataMap.dataTI['2002sum'] }
] ]
} }
] ]
}, },
{ {
title: { text: '2003全国宏观经济指标' }, title: { text: '2003全国宏观经济指标' },
series: [ series: [
{ data: dataMap.dataGDP['2003'] }, { data: dataMap.dataGDP['2003'] },
{ data: dataMap.dataFinancial['2003'] }, { data: dataMap.dataFinancial['2003'] },
{ data: dataMap.dataEstate['2003'] }, { data: dataMap.dataEstate['2003'] },
{ data: dataMap.dataPI['2003'] }, { data: dataMap.dataPI['2003'] },
{ data: dataMap.dataSI['2003'] }, { data: dataMap.dataSI['2003'] },
{ data: dataMap.dataTI['2003'] }, { data: dataMap.dataTI['2003'] },
{ {
data: [ data: [
{ name: '第一产业', value: dataMap.dataPI['2003sum'] }, { name: '第一产业', value: dataMap.dataPI['2003sum'] },
{ name: '第二产业', value: dataMap.dataSI['2003sum'] }, { name: '第二产业', value: dataMap.dataSI['2003sum'] },
{ name: '第三产业', value: dataMap.dataTI['2003sum'] } { name: '第三产业', value: dataMap.dataTI['2003sum'] }
] ]
} }
] ]
}, },
{ {
title: { text: '2004全国宏观经济指标' }, title: { text: '2004全国宏观经济指标' },
series: [ series: [
{ data: dataMap.dataGDP['2004'] }, { data: dataMap.dataGDP['2004'] },
{ data: dataMap.dataFinancial['2004'] }, { data: dataMap.dataFinancial['2004'] },
{ data: dataMap.dataEstate['2004'] }, { data: dataMap.dataEstate['2004'] },
{ data: dataMap.dataPI['2004'] }, { data: dataMap.dataPI['2004'] },
{ data: dataMap.dataSI['2004'] }, { data: dataMap.dataSI['2004'] },
{ data: dataMap.dataTI['2004'] }, { data: dataMap.dataTI['2004'] },
{ {
data: [ data: [
{ name: '第一产业', value: dataMap.dataPI['2004sum'] }, { name: '第一产业', value: dataMap.dataPI['2004sum'] },
{ name: '第二产业', value: dataMap.dataSI['2004sum'] }, { name: '第二产业', value: dataMap.dataSI['2004sum'] },
{ name: '第三产业', value: dataMap.dataTI['2004sum'] } { name: '第三产业', value: dataMap.dataTI['2004sum'] }
] ]
} }
] ]
}, },
{ {
title: { text: '2005全国宏观经济指标' }, title: { text: '2005全国宏观经济指标' },
series: [ series: [
{ data: dataMap.dataGDP['2005'] }, { data: dataMap.dataGDP['2005'] },
{ data: dataMap.dataFinancial['2005'] }, { data: dataMap.dataFinancial['2005'] },
{ data: dataMap.dataEstate['2005'] }, { data: dataMap.dataEstate['2005'] },
{ data: dataMap.dataPI['2005'] }, { data: dataMap.dataPI['2005'] },
{ data: dataMap.dataSI['2005'] }, { data: dataMap.dataSI['2005'] },
{ data: dataMap.dataTI['2005'] }, { data: dataMap.dataTI['2005'] },
{ {
data: [ data: [
{ name: '第一产业', value: dataMap.dataPI['2005sum'] }, { name: '第一产业', value: dataMap.dataPI['2005sum'] },
{ name: '第二产业', value: dataMap.dataSI['2005sum'] }, { name: '第二产业', value: dataMap.dataSI['2005sum'] },
{ name: '第三产业', value: dataMap.dataTI['2005sum'] } { name: '第三产业', value: dataMap.dataTI['2005sum'] }
] ]
} }
] ]
}, },
{ {
title: { text: '2006全国宏观经济指标' }, title: { text: '2006全国宏观经济指标' },
series: [ series: [
{ data: dataMap.dataGDP['2006'] }, { data: dataMap.dataGDP['2006'] },
{ data: dataMap.dataFinancial['2006'] }, { data: dataMap.dataFinancial['2006'] },
{ data: dataMap.dataEstate['2006'] }, { data: dataMap.dataEstate['2006'] },
{ data: dataMap.dataPI['2006'] }, { data: dataMap.dataPI['2006'] },
{ data: dataMap.dataSI['2006'] }, { data: dataMap.dataSI['2006'] },
{ data: dataMap.dataTI['2006'] }, { data: dataMap.dataTI['2006'] },
{ {
data: [ data: [
{ name: '第一产业', value: dataMap.dataPI['2006sum'] }, { name: '第一产业', value: dataMap.dataPI['2006sum'] },
{ name: '第二产业', value: dataMap.dataSI['2006sum'] }, { name: '第二产业', value: dataMap.dataSI['2006sum'] },
{ name: '第三产业', value: dataMap.dataTI['2006sum'] } { name: '第三产业', value: dataMap.dataTI['2006sum'] }
] ]
} }
] ]
}, },
{ {
title: { text: '2007全国宏观经济指标' }, title: { text: '2007全国宏观经济指标' },
series: [ series: [
{ data: dataMap.dataGDP['2007'] }, { data: dataMap.dataGDP['2007'] },
{ data: dataMap.dataFinancial['2007'] }, { data: dataMap.dataFinancial['2007'] },
{ data: dataMap.dataEstate['2007'] }, { data: dataMap.dataEstate['2007'] },
{ data: dataMap.dataPI['2007'] }, { data: dataMap.dataPI['2007'] },
{ data: dataMap.dataSI['2007'] }, { data: dataMap.dataSI['2007'] },
{ data: dataMap.dataTI['2007'] }, { data: dataMap.dataTI['2007'] },
{ {
data: [ data: [
{ name: '第一产业', value: dataMap.dataPI['2007sum'] }, { name: '第一产业', value: dataMap.dataPI['2007sum'] },
{ name: '第二产业', value: dataMap.dataSI['2007sum'] }, { name: '第二产业', value: dataMap.dataSI['2007sum'] },
{ name: '第三产业', value: dataMap.dataTI['2007sum'] } { name: '第三产业', value: dataMap.dataTI['2007sum'] }
] ]
} }
] ]
}, },
{ {
title: { text: '2008全国宏观经济指标' }, title: { text: '2008全国宏观经济指标' },
series: [ series: [
{ data: dataMap.dataGDP['2008'] }, { data: dataMap.dataGDP['2008'] },
{ data: dataMap.dataFinancial['2008'] }, { data: dataMap.dataFinancial['2008'] },
{ data: dataMap.dataEstate['2008'] }, { data: dataMap.dataEstate['2008'] },
{ data: dataMap.dataPI['2008'] }, { data: dataMap.dataPI['2008'] },
{ data: dataMap.dataSI['2008'] }, { data: dataMap.dataSI['2008'] },
{ data: dataMap.dataTI['2008'] }, { data: dataMap.dataTI['2008'] },
{ {
data: [ data: [
{ name: '第一产业', value: dataMap.dataPI['2008sum'] }, { name: '第一产业', value: dataMap.dataPI['2008sum'] },
{ name: '第二产业', value: dataMap.dataSI['2008sum'] }, { name: '第二产业', value: dataMap.dataSI['2008sum'] },
{ name: '第三产业', value: dataMap.dataTI['2008sum'] } { name: '第三产业', value: dataMap.dataTI['2008sum'] }
] ]
} }
] ]
}, },
{ {
title: { text: '2009全国宏观经济指标' }, title: { text: '2009全国宏观经济指标' },
series: [ series: [
{ data: dataMap.dataGDP['2009'] }, { data: dataMap.dataGDP['2009'] },
{ data: dataMap.dataFinancial['2009'] }, { data: dataMap.dataFinancial['2009'] },
{ data: dataMap.dataEstate['2009'] }, { data: dataMap.dataEstate['2009'] },
{ data: dataMap.dataPI['2009'] }, { data: dataMap.dataPI['2009'] },
{ data: dataMap.dataSI['2009'] }, { data: dataMap.dataSI['2009'] },
{ data: dataMap.dataTI['2009'] }, { data: dataMap.dataTI['2009'] },
{ {
data: [ data: [
{ name: '第一产业', value: dataMap.dataPI['2009sum'] }, { name: '第一产业', value: dataMap.dataPI['2009sum'] },
{ name: '第二产业', value: dataMap.dataSI['2009sum'] }, { name: '第二产业', value: dataMap.dataSI['2009sum'] },
{ name: '第三产业', value: dataMap.dataTI['2009sum'] } { name: '第三产业', value: dataMap.dataTI['2009sum'] }
] ]
} }
] ]
}, },
{ {
title: { text: '2010全国宏观经济指标' }, title: { text: '2010全国宏观经济指标' },
series: [ series: [
{ data: dataMap.dataGDP['2010'] }, { data: dataMap.dataGDP['2010'] },
{ data: dataMap.dataFinancial['2010'] }, { data: dataMap.dataFinancial['2010'] },
{ data: dataMap.dataEstate['2010'] }, { data: dataMap.dataEstate['2010'] },
{ data: dataMap.dataPI['2010'] }, { data: dataMap.dataPI['2010'] },
{ data: dataMap.dataSI['2010'] }, { data: dataMap.dataSI['2010'] },
{ data: dataMap.dataTI['2010'] }, { data: dataMap.dataTI['2010'] },
{ {
data: [ data: [
{ name: '第一产业', value: dataMap.dataPI['2010sum'] }, { name: '第一产业', value: dataMap.dataPI['2010sum'] },
{ name: '第二产业', value: dataMap.dataSI['2010sum'] }, { name: '第二产业', value: dataMap.dataSI['2010sum'] },
{ name: '第三产业', value: dataMap.dataTI['2010sum'] } { name: '第三产业', value: dataMap.dataTI['2010sum'] }
] ]
} }
] ]
}, },
{ {
title: { text: '2011全国宏观经济指标' }, title: { text: '2011全国宏观经济指标' },
series: [ series: [
{ data: dataMap.dataGDP['2011'] }, { data: dataMap.dataGDP['2011'] },
{ data: dataMap.dataFinancial['2011'] }, { data: dataMap.dataFinancial['2011'] },
{ data: dataMap.dataEstate['2011'] }, { data: dataMap.dataEstate['2011'] },
{ data: dataMap.dataPI['2011'] }, { data: dataMap.dataPI['2011'] },
{ data: dataMap.dataSI['2011'] }, { data: dataMap.dataSI['2011'] },
{ data: dataMap.dataTI['2011'] }, { data: dataMap.dataTI['2011'] },
{ {
data: [ data: [
{ name: '第一产业', value: dataMap.dataPI['2011sum'] }, { name: '第一产业', value: dataMap.dataPI['2011sum'] },
{ name: '第二产业', value: dataMap.dataSI['2011sum'] }, { name: '第二产业', value: dataMap.dataSI['2011sum'] },
{ name: '第三产业', value: dataMap.dataTI['2011sum'] } { name: '第三产业', value: dataMap.dataTI['2011sum'] }
] ]
} }
] ]
} }
] ]
}) })
} }
} }
} }
</script> </script>
+120 -120
View File
@@ -1,120 +1,120 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}" /> <div :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import { DeBounce } from '@/utils/CsUtil' import { DeBounce } from '@/utils/CsUtil'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
export default { export default {
props: { props: {
className: { className: {
type: String, type: String,
default: 'chart' default: 'chart'
}, },
width: { width: {
type: String, type: String,
default: '100%' default: '100%'
}, },
height: { height: {
type: String, type: String,
default: '300px' default: '300px'
} }
}, },
data() { data() {
return { return {
chart: null chart: null
} }
}, },
mounted() { mounted() {
this.initChart() this.initChart()
this.__resizeHandler = DeBounce(() => { this.__resizeHandler = DeBounce(() => {
if (this.chart) { if (this.chart) {
this.chart.resize() this.chart.resize()
} }
}, 100) }, 100)
window.addEventListener('resize', this.__resizeHandler) window.addEventListener('resize', this.__resizeHandler)
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
} }
window.removeEventListener('resize', this.__resizeHandler) window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose() this.chart.dispose()
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({ this.chart.setOption({
title: { title: {
text: '漏斗图', text: '漏斗图',
subtext: '纯属虚构' subtext: '纯属虚构'
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: '{a} <br/>{b} : {c}%' formatter: '{a} <br/>{b} : {c}%'
}, },
toolbox: { toolbox: {
feature: { feature: {
dataView: { readOnly: false }, dataView: { readOnly: false },
restore: {}, restore: {},
saveAsImage: {} saveAsImage: {}
} }
}, },
legend: { legend: {
data: ['展现', '点击', '访问', '咨询', '订单'] data: ['展现', '点击', '访问', '咨询', '订单']
}, },
calculable: true, calculable: true,
series: [ series: [
{ {
name: '漏斗图', name: '漏斗图',
type: 'funnel', type: 'funnel',
left: '10%', left: '10%',
top: 60, top: 60,
bottom: 60, bottom: 60,
width: '80%', width: '80%',
// height: {totalHeight} - y - y2, // height: {totalHeight} - y - y2,
min: 0, min: 0,
max: 100, max: 100,
minSize: '0%', minSize: '0%',
maxSize: '100%', maxSize: '100%',
sort: 'descending', sort: 'descending',
gap: 2, gap: 2,
label: { label: {
show: true, show: true,
position: 'inside' position: 'inside'
}, },
labelLine: { labelLine: {
length: 10, length: 10,
lineStyle: { lineStyle: {
width: 1, width: 1,
type: 'solid' type: 'solid'
} }
}, },
itemStyle: { itemStyle: {
borderColor: '#fff', borderColor: '#fff',
borderWidth: 1 borderWidth: 1
}, },
emphasis: { emphasis: {
label: { label: {
fontSize: 20 fontSize: 20
} }
}, },
data: [ data: [
{ value: 60, name: '访问' }, { value: 60, name: '访问' },
{ value: 40, name: '咨询' }, { value: 40, name: '咨询' },
{ value: 20, name: '订单' }, { value: 20, name: '订单' },
{ value: 80, name: '点击' }, { value: 80, name: '点击' },
{ value: 100, name: '展现' } { value: 100, name: '展现' }
] ]
} }
] ]
}) })
} }
} }
} }
</script> </script>
+74 -74
View File
@@ -1,74 +1,74 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}" /> <div :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import { DeBounce } from '@/utils/CsUtil' import { DeBounce } from '@/utils/CsUtil'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
export default { export default {
props: { props: {
className: { className: {
type: String, type: String,
default: 'chart' default: 'chart'
}, },
width: { width: {
type: String, type: String,
default: '100%' default: '100%'
}, },
height: { height: {
type: String, type: String,
default: '300px' default: '300px'
} }
}, },
data() { data() {
return { return {
chart: null chart: null
} }
}, },
mounted() { mounted() {
this.initChart() this.initChart()
this.__resizeHandler = DeBounce(() => { this.__resizeHandler = DeBounce(() => {
if (this.chart) { if (this.chart) {
this.chart.resize() this.chart.resize()
} }
}, 100) }, 100)
window.addEventListener('resize', this.__resizeHandler) window.addEventListener('resize', this.__resizeHandler)
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
} }
window.removeEventListener('resize', this.__resizeHandler) window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose() this.chart.dispose()
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({ this.chart.setOption({
tooltip: { tooltip: {
formatter: '{a} <br/>{b} : {c}%' formatter: '{a} <br/>{b} : {c}%'
}, },
toolbox: { toolbox: {
feature: { feature: {
restore: {}, restore: {},
saveAsImage: {} saveAsImage: {}
} }
}, },
series: [ series: [
{ {
name: '业务指标', name: '业务指标',
type: 'gauge', type: 'gauge',
detail: { formatter: '{value}%' }, detail: { formatter: '{value}%' },
data: [{ value: 50, name: '完成率' }] data: [{ value: 50, name: '完成率' }]
} }
] ]
}) })
} }
} }
} }
</script> </script>
+101 -101
View File
@@ -1,101 +1,101 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}" /> <div :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import { DeBounce } from '@/utils/CsUtil' import { DeBounce } from '@/utils/CsUtil'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
export default { export default {
props: { props: {
className: { className: {
type: String, type: String,
default: 'chart' default: 'chart'
}, },
width: { width: {
type: String, type: String,
default: '100%' default: '100%'
}, },
height: { height: {
type: String, type: String,
default: '300px' default: '300px'
} }
}, },
data() { data() {
return { return {
chart: null chart: null
} }
}, },
mounted() { mounted() {
this.initChart() this.initChart()
this.__resizeHandler = DeBounce(() => { this.__resizeHandler = DeBounce(() => {
if (this.chart) { if (this.chart) {
this.chart.resize() this.chart.resize()
} }
}, 100) }, 100)
window.addEventListener('resize', this.__resizeHandler) window.addEventListener('resize', this.__resizeHandler)
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
} }
window.removeEventListener('resize', this.__resizeHandler) window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose() this.chart.dispose()
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
const axisData = ['周一', '周二', '周三', '很长很长的周四', '周五', '周六', '周日'] const axisData = ['周一', '周二', '周三', '很长很长的周四', '周五', '周六', '周日']
const data = axisData.map(function(item, i) { const data = axisData.map(function(item, i) {
return Math.round(Math.random() * 1000 * (i + 1)) return Math.round(Math.random() * 1000 * (i + 1))
}) })
const links = data.map(function(item, i) { const links = data.map(function(item, i) {
return { return {
source: i, source: i,
target: i + 1 target: i + 1
} }
}) })
links.pop() links.pop()
this.chart.setOption({ this.chart.setOption({
title: { title: {
text: '笛卡尔坐标系上的 Graph' text: '笛卡尔坐标系上的 Graph'
}, },
tooltip: {}, tooltip: {},
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap: false, boundaryGap: false,
data: axisData data: axisData
}, },
yAxis: { yAxis: {
type: 'value' type: 'value'
}, },
series: [ series: [
{ {
type: 'graph', type: 'graph',
layout: 'none', layout: 'none',
coordinateSystem: 'cartesian2d', coordinateSystem: 'cartesian2d',
symbolSize: 40, symbolSize: 40,
label: { label: {
normal: { normal: {
show: true show: true
} }
}, },
edgeSymbol: ['circle', 'arrow'], edgeSymbol: ['circle', 'arrow'],
edgeSymbolSize: [4, 10], edgeSymbolSize: [4, 10],
data: data, data: data,
links: links, links: links,
lineStyle: { lineStyle: {
normal: { normal: {
color: '#2f4554' color: '#2f4554'
} }
} }
} }
] ]
}) })
} }
} }
} }
</script> </script>
+105 -105
View File
@@ -1,105 +1,105 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}" /> <div :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import { DeBounce } from '@/utils/CsUtil' import { DeBounce } from '@/utils/CsUtil'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
export default { export default {
props: { props: {
className: { className: {
type: String, type: String,
default: 'chart' default: 'chart'
}, },
width: { width: {
type: String, type: String,
default: '100%' default: '100%'
}, },
height: { height: {
type: String, type: String,
default: '300px' default: '300px'
} }
}, },
data() { data() {
return { return {
chart: null chart: null
} }
}, },
mounted() { mounted() {
this.initChart() this.initChart()
this.__resizeHandler = DeBounce(() => { this.__resizeHandler = DeBounce(() => {
if (this.chart) { if (this.chart) {
this.chart.resize() this.chart.resize()
} }
}, 100) }, 100)
window.addEventListener('resize', this.__resizeHandler) window.addEventListener('resize', this.__resizeHandler)
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
} }
window.removeEventListener('resize', this.__resizeHandler) window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose() this.chart.dispose()
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({ this.chart.setOption({
tooltip: { tooltip: {
position: 'top' position: 'top'
}, },
animation: false, animation: false,
grid: { grid: {
height: '50%', height: '50%',
y: '10%' y: '10%'
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['12a', '1a', '2a', '3a', '4a', '5a', '6a', '7a', '8a', '9a', '10a', '11a', '12p', '1p', '2p', '3p', '4p', '5p', '6p', '7p', '8p', '9p', '10p', '11p'], data: ['12a', '1a', '2a', '3a', '4a', '5a', '6a', '7a', '8a', '9a', '10a', '11a', '12p', '1p', '2p', '3p', '4p', '5p', '6p', '7p', '8p', '9p', '10p', '11p'],
splitArea: { splitArea: {
show: true show: true
} }
}, },
yAxis: { yAxis: {
type: 'category', type: 'category',
data: ['Saturday', 'Friday', 'Thursday', 'Wednesday', 'Tuesday', 'Monday', 'Sunday'], data: ['Saturday', 'Friday', 'Thursday', 'Wednesday', 'Tuesday', 'Monday', 'Sunday'],
splitArea: { splitArea: {
show: true show: true
} }
}, },
visualMap: { visualMap: {
min: 0, min: 0,
max: 10, max: 10,
calculable: true, calculable: true,
orient: 'horizontal', orient: 'horizontal',
left: 'center', left: 'center',
bottom: '15%' bottom: '15%'
}, },
series: [{ series: [{
name: 'Punch Card', name: 'Punch Card',
type: 'heatmap', type: 'heatmap',
data: [[0, 0, 5], [0, 1, 1], [0, 2, 0], [0, 3, 0], [0, 4, 0], [0, 5, 0], [0, 6, 0], [0, 7, 0], [0, 8, 0], [0, 9, 0], [0, 10, 0], [0, 11, 2], [0, 12, 4], [0, 13, 1], [0, 14, 1], [0, 15, 3], [0, 16, 4], [0, 17, 6], [0, 18, 4], [0, 19, 4], [0, 20, 3], [0, 21, 3], [0, 22, 2], [0, 23, 5], [1, 0, 7], [1, 1, 0], [1, 2, 0], [1, 3, 0], [1, 4, 0], [1, 5, 0], [1, 6, 0], [1, 7, 0], [1, 8, 0], [1, 9, 0], [1, 10, 5], [1, 11, 2], [1, 12, 2], [1, 13, 6], [1, 14, 9], [1, 15, 11], [1, 16, 6], [1, 17, 7], [1, 18, 8], [1, 19, 12], [1, 20, 5], [1, 21, 5], [1, 22, 7], [1, 23, 2], [2, 0, 1], [2, 1, 1], [2, 2, 0], [2, 3, 0], [2, 4, 0], [2, 5, 0], [2, 6, 0], [2, 7, 0], [2, 8, 0], [2, 9, 0], [2, 10, 3], [2, 11, 2], [2, 12, 1], [2, 13, 9], [2, 14, 8], [2, 15, 10], [2, 16, 6], [2, 17, 5], [2, 18, 5], [2, 19, 5], [2, 20, 7], [2, 21, 4], [2, 22, 2], [2, 23, 4], [3, 0, 7], [3, 1, 3], [3, 2, 0], [3, 3, 0], [3, 4, 0], [3, 5, 0], [3, 6, 0], [3, 7, 0], [3, 8, 1], [3, 9, 0], [3, 10, 5], [3, 11, 4], [3, 12, 7], [3, 13, 14], [3, 14, 13], [3, 15, 12], [3, 16, 9], [3, 17, 5], [3, 18, 5], [3, 19, 10], [3, 20, 6], [3, 21, 4], [3, 22, 4], [3, 23, 1], [4, 0, 1], [4, 1, 3], [4, 2, 0], [4, 3, 0], [4, 4, 0], [4, 5, 1], [4, 6, 0], [4, 7, 0], [4, 8, 0], [4, 9, 2], [4, 10, 4], [4, 11, 4], [4, 12, 2], [4, 13, 4], [4, 14, 4], [4, 15, 14], [4, 16, 12], [4, 17, 1], [4, 18, 8], [4, 19, 5], [4, 20, 3], [4, 21, 7], [4, 22, 3], [4, 23, 0], [5, 0, 2], [5, 1, 1], [5, 2, 0], [5, 3, 3], [5, 4, 0], [5, 5, 0], [5, 6, 0], [5, 7, 0], [5, 8, 2], [5, 9, 0], [5, 10, 4], [5, 11, 1], [5, 12, 5], [5, 13, 10], [5, 14, 5], [5, 15, 7], [5, 16, 11], [5, 17, 6], [5, 18, 0], [5, 19, 5], [5, 20, 3], [5, 21, 4], [5, 22, 2], [5, 23, 0], [6, 0, 1], [6, 1, 0], [6, 2, 0], [6, 3, 0], [6, 4, 0], [6, 5, 0], [6, 6, 0], [6, 7, 0], [6, 8, 0], [6, 9, 0], [6, 10, 1], [6, 11, 0], [6, 12, 2], [6, 13, 1], [6, 14, 3], [6, 15, 4], [6, 16, 0], [6, 17, 0], [6, 18, 0], [6, 19, 0], [6, 20, 1], [6, 21, 2], [6, 22, 2], [6, 23, 6]].map(function(item) { data: [[0, 0, 5], [0, 1, 1], [0, 2, 0], [0, 3, 0], [0, 4, 0], [0, 5, 0], [0, 6, 0], [0, 7, 0], [0, 8, 0], [0, 9, 0], [0, 10, 0], [0, 11, 2], [0, 12, 4], [0, 13, 1], [0, 14, 1], [0, 15, 3], [0, 16, 4], [0, 17, 6], [0, 18, 4], [0, 19, 4], [0, 20, 3], [0, 21, 3], [0, 22, 2], [0, 23, 5], [1, 0, 7], [1, 1, 0], [1, 2, 0], [1, 3, 0], [1, 4, 0], [1, 5, 0], [1, 6, 0], [1, 7, 0], [1, 8, 0], [1, 9, 0], [1, 10, 5], [1, 11, 2], [1, 12, 2], [1, 13, 6], [1, 14, 9], [1, 15, 11], [1, 16, 6], [1, 17, 7], [1, 18, 8], [1, 19, 12], [1, 20, 5], [1, 21, 5], [1, 22, 7], [1, 23, 2], [2, 0, 1], [2, 1, 1], [2, 2, 0], [2, 3, 0], [2, 4, 0], [2, 5, 0], [2, 6, 0], [2, 7, 0], [2, 8, 0], [2, 9, 0], [2, 10, 3], [2, 11, 2], [2, 12, 1], [2, 13, 9], [2, 14, 8], [2, 15, 10], [2, 16, 6], [2, 17, 5], [2, 18, 5], [2, 19, 5], [2, 20, 7], [2, 21, 4], [2, 22, 2], [2, 23, 4], [3, 0, 7], [3, 1, 3], [3, 2, 0], [3, 3, 0], [3, 4, 0], [3, 5, 0], [3, 6, 0], [3, 7, 0], [3, 8, 1], [3, 9, 0], [3, 10, 5], [3, 11, 4], [3, 12, 7], [3, 13, 14], [3, 14, 13], [3, 15, 12], [3, 16, 9], [3, 17, 5], [3, 18, 5], [3, 19, 10], [3, 20, 6], [3, 21, 4], [3, 22, 4], [3, 23, 1], [4, 0, 1], [4, 1, 3], [4, 2, 0], [4, 3, 0], [4, 4, 0], [4, 5, 1], [4, 6, 0], [4, 7, 0], [4, 8, 0], [4, 9, 2], [4, 10, 4], [4, 11, 4], [4, 12, 2], [4, 13, 4], [4, 14, 4], [4, 15, 14], [4, 16, 12], [4, 17, 1], [4, 18, 8], [4, 19, 5], [4, 20, 3], [4, 21, 7], [4, 22, 3], [4, 23, 0], [5, 0, 2], [5, 1, 1], [5, 2, 0], [5, 3, 3], [5, 4, 0], [5, 5, 0], [5, 6, 0], [5, 7, 0], [5, 8, 2], [5, 9, 0], [5, 10, 4], [5, 11, 1], [5, 12, 5], [5, 13, 10], [5, 14, 5], [5, 15, 7], [5, 16, 11], [5, 17, 6], [5, 18, 0], [5, 19, 5], [5, 20, 3], [5, 21, 4], [5, 22, 2], [5, 23, 0], [6, 0, 1], [6, 1, 0], [6, 2, 0], [6, 3, 0], [6, 4, 0], [6, 5, 0], [6, 6, 0], [6, 7, 0], [6, 8, 0], [6, 9, 0], [6, 10, 1], [6, 11, 0], [6, 12, 2], [6, 13, 1], [6, 14, 3], [6, 15, 4], [6, 16, 0], [6, 17, 0], [6, 18, 0], [6, 19, 0], [6, 20, 1], [6, 21, 2], [6, 22, 2], [6, 23, 6]].map(function(item) {
return [item[1], item[0], item[2] || '-'] return [item[1], item[0], item[2] || '-']
}), }),
label: { label: {
normal: { normal: {
show: true show: true
} }
}, },
itemStyle: { itemStyle: {
emphasis: { emphasis: {
shadowBlur: 10, shadowBlur: 10,
shadowColor: 'rgba(0, 0, 0, 0.5)' shadowColor: 'rgba(0, 0, 0, 0.5)'
} }
} }
}] }]
}) })
} }
} }
} }
</script> </script>
@@ -1,85 +1,85 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}" /> <div :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import { DeBounce } from '@/utils/CsUtil' import { DeBounce } from '@/utils/CsUtil'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
export default { export default {
props: { props: {
className: { className: {
type: String, type: String,
default: 'chart' default: 'chart'
}, },
width: { width: {
type: String, type: String,
default: '100%' default: '100%'
}, },
height: { height: {
type: String, type: String,
default: '300px' default: '300px'
} }
}, },
data() { data() {
return { return {
chart: null chart: null
} }
}, },
mounted() { mounted() {
this.initChart() this.initChart()
this.__resizeHandler = DeBounce(() => { this.__resizeHandler = DeBounce(() => {
if (this.chart) { if (this.chart) {
this.chart.resize() this.chart.resize()
} }
}, 100) }, 100)
window.addEventListener('resize', this.__resizeHandler) window.addEventListener('resize', this.__resizeHandler)
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
} }
window.removeEventListener('resize', this.__resizeHandler) window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose() this.chart.dispose()
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({ this.chart.setOption({
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)' formatter: '{a} <br/>{b} : {c} ({d}%)'
}, },
legend: { legend: {
left: 'center', left: 'center',
bottom: '10', bottom: '10',
data: ['Industries', 'Technology', 'Forex', 'Gold', 'Forecasts'] data: ['Industries', 'Technology', 'Forex', 'Gold', 'Forecasts']
}, },
calculable: true, calculable: true,
series: [ series: [
{ {
name: 'WEEKLY WRITE ARTICLES', name: 'WEEKLY WRITE ARTICLES',
type: 'pie', type: 'pie',
roseType: 'radius', roseType: 'radius',
radius: [15, 95], radius: [15, 95],
center: ['50%', '38%'], center: ['50%', '38%'],
data: [ data: [
{ value: 320, name: 'Industries' }, { value: 320, name: 'Industries' },
{ value: 240, name: 'Technology' }, { value: 240, name: 'Technology' },
{ value: 149, name: 'Forex' }, { value: 149, name: 'Forex' },
{ value: 100, name: 'Gold' }, { value: 100, name: 'Gold' },
{ value: 59, name: 'Forecasts' } { value: 59, name: 'Forecasts' }
], ],
animationEasing: 'cubicInOut', animationEasing: 'cubicInOut',
animationDuration: 2600 animationDuration: 2600
} }
] ]
}) })
} }
} }
} }
</script> </script>
+149 -149
View File
@@ -1,149 +1,149 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}" /> <div :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import { DeBounce } from '@/utils/CsUtil' import { DeBounce } from '@/utils/CsUtil'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
export default { export default {
props: { props: {
className: { className: {
type: String, type: String,
default: 'chart' default: 'chart'
}, },
width: { width: {
type: String, type: String,
default: '100%' default: '100%'
}, },
height: { height: {
type: String, type: String,
default: '300px' default: '300px'
} }
}, },
data() { data() {
return { return {
chart: null chart: null
} }
}, },
mounted() { mounted() {
this.initChart() this.initChart()
this.__resizeHandler = DeBounce(() => { this.__resizeHandler = DeBounce(() => {
if (this.chart) { if (this.chart) {
this.chart.resize() this.chart.resize()
} }
}, 100) }, 100)
window.addEventListener('resize', this.__resizeHandler) window.addEventListener('resize', this.__resizeHandler)
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
} }
window.removeEventListener('resize', this.__resizeHandler) window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose() this.chart.dispose()
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({ this.chart.setOption({
title: { title: {
text: 'Graph 简单示例' text: 'Graph 简单示例'
}, },
tooltip: {}, tooltip: {},
animationDurationUpdate: 1500, animationDurationUpdate: 1500,
animationEasingUpdate: 'quinticInOut', animationEasingUpdate: 'quinticInOut',
series: [ series: [
{ {
type: 'graph', type: 'graph',
layout: 'none', layout: 'none',
symbolSize: 50, symbolSize: 50,
roam: true, roam: true,
label: { label: {
normal: { normal: {
show: true show: true
} }
}, },
edgeSymbol: ['circle', 'arrow'], edgeSymbol: ['circle', 'arrow'],
edgeSymbolSize: [4, 10], edgeSymbolSize: [4, 10],
edgeLabel: { edgeLabel: {
normal: { normal: {
textStyle: { textStyle: {
fontSize: 20 fontSize: 20
} }
} }
}, },
data: [{ data: [{
name: '节点1', name: '节点1',
x: 100, x: 100,
y: 300 y: 300
}, { }, {
name: '节点2', name: '节点2',
x: 1000, x: 1000,
y: 300 y: 300
}, { }, {
name: '节点3', name: '节点3',
x: 550, x: 550,
y: 100 y: 100
}, { }, {
name: '节点4', name: '节点4',
x: 550, x: 550,
y: 500 y: 500
}], }],
// links: [], // links: [],
links: [{ links: [{
source: 0, source: 0,
target: 1, target: 1,
symbolSize: [5, 20], symbolSize: [5, 20],
label: { label: {
normal: { normal: {
show: true show: true
} }
}, },
lineStyle: { lineStyle: {
normal: { normal: {
width: 5, width: 5,
curveness: 0.2 curveness: 0.2
} }
} }
}, { }, {
source: '节点2', source: '节点2',
target: '节点1', target: '节点1',
label: { label: {
normal: { normal: {
show: true show: true
} }
}, },
lineStyle: { lineStyle: {
normal: { curveness: 0.2 } normal: { curveness: 0.2 }
} }
}, { }, {
source: '节点1', source: '节点1',
target: '节点3' target: '节点3'
}, { }, {
source: '节点2', source: '节点2',
target: '节点3' target: '节点3'
}, { }, {
source: '节点2', source: '节点2',
target: '节点4' target: '节点4'
}, { }, {
source: '节点1', source: '节点1',
target: '节点4' target: '节点4'
}], }],
lineStyle: { lineStyle: {
normal: { normal: {
opacity: 0.9, opacity: 0.9,
width: 2, width: 2,
curveness: 0 curveness: 0
} }
} }
} }
] ]
}) })
} }
} }
} }
</script> </script>
@@ -1,121 +1,121 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}" /> <div :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import { DeBounce } from '@/utils/CsUtil' import { DeBounce } from '@/utils/CsUtil'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
const animationDuration = 3000 const animationDuration = 3000
export default { export default {
props: { props: {
className: { className: {
type: String, type: String,
default: 'chart' default: 'chart'
}, },
width: { width: {
type: String, type: String,
default: '100%' default: '100%'
}, },
height: { height: {
type: String, type: String,
default: '300px' default: '300px'
} }
}, },
data() { data() {
return { return {
chart: null chart: null
} }
}, },
mounted() { mounted() {
this.initChart() this.initChart()
this.__resizeHandler = DeBounce(() => { this.__resizeHandler = DeBounce(() => {
if (this.chart) { if (this.chart) {
this.chart.resize() this.chart.resize()
} }
}, 100) }, 100)
window.addEventListener('resize', this.__resizeHandler) window.addEventListener('resize', this.__resizeHandler)
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
} }
window.removeEventListener('resize', this.__resizeHandler) window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose() this.chart.dispose()
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({ this.chart.setOption({
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效 axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
} }
}, },
radar: { radar: {
radius: '66%', radius: '66%',
center: ['50%', '42%'], center: ['50%', '42%'],
splitNumber: 8, splitNumber: 8,
splitArea: { splitArea: {
areaStyle: { areaStyle: {
color: 'rgba(127,95,132,.3)', color: 'rgba(127,95,132,.3)',
opacity: 1, opacity: 1,
shadowBlur: 45, shadowBlur: 45,
shadowColor: 'rgba(0,0,0,.5)', shadowColor: 'rgba(0,0,0,.5)',
shadowOffsetX: 0, shadowOffsetX: 0,
shadowOffsetY: 15 shadowOffsetY: 15
} }
}, },
indicator: [ indicator: [
{ name: 'Sales', max: 10000 }, { name: 'Sales', max: 10000 },
{ name: 'Administration', max: 20000 }, { name: 'Administration', max: 20000 },
{ name: 'Information Techology', max: 20000 }, { name: 'Information Techology', max: 20000 },
{ name: 'Customer Support', max: 20000 }, { name: 'Customer Support', max: 20000 },
{ name: 'Development', max: 20000 }, { name: 'Development', max: 20000 },
{ name: 'Marketing', max: 20000 } { name: 'Marketing', max: 20000 }
] ]
}, },
legend: { legend: {
left: 'center', left: 'center',
bottom: '10', bottom: '10',
data: ['Allocated Budget', 'Expected Spending', 'Actual Spending'] data: ['Allocated Budget', 'Expected Spending', 'Actual Spending']
}, },
series: [{ series: [{
type: 'radar', type: 'radar',
symbolSize: 0, symbolSize: 0,
areaStyle: { areaStyle: {
normal: { normal: {
shadowBlur: 13, shadowBlur: 13,
shadowColor: 'rgba(0,0,0,.2)', shadowColor: 'rgba(0,0,0,.2)',
shadowOffsetX: 0, shadowOffsetX: 0,
shadowOffsetY: 10, shadowOffsetY: 10,
opacity: 1 opacity: 1
} }
}, },
data: [ data: [
{ {
value: [5000, 7000, 12000, 11000, 15000, 14000], value: [5000, 7000, 12000, 11000, 15000, 14000],
name: 'Allocated Budget' name: 'Allocated Budget'
}, },
{ {
value: [4000, 9000, 15000, 15000, 13000, 11000], value: [4000, 9000, 15000, 15000, 13000, 11000],
name: 'Expected Spending' name: 'Expected Spending'
}, },
{ {
value: [5500, 11000, 12000, 15000, 12000, 12000], value: [5500, 11000, 12000, 15000, 12000, 12000],
name: 'Actual Spending' name: 'Actual Spending'
} }
], ],
animationDuration: animationDuration animationDuration: animationDuration
}] }]
}) })
} }
} }
} }
</script> </script>
+149 -149
View File
@@ -1,149 +1,149 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}" /> <div :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import { DeBounce } from '@/utils/CsUtil' import { DeBounce } from '@/utils/CsUtil'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
export default { export default {
props: { props: {
className: { className: {
type: String, type: String,
default: 'chart' default: 'chart'
}, },
width: { width: {
type: String, type: String,
default: '100%' default: '100%'
}, },
height: { height: {
type: String, type: String,
default: '500px' default: '500px'
} }
}, },
data() { data() {
return { return {
chart: null chart: null
} }
}, },
mounted() { mounted() {
this.initChart() this.initChart()
this.__resizeHandler = DeBounce(() => { this.__resizeHandler = DeBounce(() => {
if (this.chart) { if (this.chart) {
this.chart.resize() this.chart.resize()
} }
}, 100) }, 100)
window.addEventListener('resize', this.__resizeHandler) window.addEventListener('resize', this.__resizeHandler)
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
} }
window.removeEventListener('resize', this.__resizeHandler) window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose() this.chart.dispose()
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({ this.chart.setOption({
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: '{a} <br/>{b}: {c} ({d}%)' formatter: '{a} <br/>{b}: {c} ({d}%)'
}, },
legend: { legend: {
orient: 'vertical', orient: 'vertical',
x: 'left', x: 'left',
data: ['直达', '营销广告', '搜索引擎', '邮件营销', '联盟广告', '视频广告', '百度', '谷歌', '必应', '其他'] data: ['直达', '营销广告', '搜索引擎', '邮件营销', '联盟广告', '视频广告', '百度', '谷歌', '必应', '其他']
}, },
series: [ series: [
{ {
name: '访问来源', name: '访问来源',
type: 'pie', type: 'pie',
selectedMode: 'single', selectedMode: 'single',
radius: [0, '30%'], radius: [0, '30%'],
label: { label: {
normal: { normal: {
position: 'inner' position: 'inner'
} }
}, },
labelLine: { labelLine: {
normal: { normal: {
show: false show: false
} }
}, },
data: [ data: [
{ value: 335, name: '直达', selected: true }, { value: 335, name: '直达', selected: true },
{ value: 679, name: '营销广告' }, { value: 679, name: '营销广告' },
{ value: 1548, name: '搜索引擎' } { value: 1548, name: '搜索引擎' }
] ]
}, },
{ {
name: '访问来源', name: '访问来源',
type: 'pie', type: 'pie',
radius: ['40%', '55%'], radius: ['40%', '55%'],
label: { label: {
normal: { normal: {
formatter: '{a|{a}}{abg|}\n{hr|}\n {b|{b}:}{c} {per|{d}%} ', formatter: '{a|{a}}{abg|}\n{hr|}\n {b|{b}:}{c} {per|{d}%} ',
backgroundColor: '#eee', backgroundColor: '#eee',
borderColor: '#aaa', borderColor: '#aaa',
borderWidth: 1, borderWidth: 1,
borderRadius: 4, borderRadius: 4,
shadowBlur: 3, shadowBlur: 3,
shadowOffsetX: 2, shadowOffsetX: 2,
shadowOffsetY: 2, shadowOffsetY: 2,
shadowColor: '#999', shadowColor: '#999',
padding: [0, 7], padding: [0, 7],
rich: { rich: {
a: { a: {
color: '#999', color: '#999',
lineHeight: 22, lineHeight: 22,
align: 'center' align: 'center'
}, },
abg: { abg: {
backgroundColor: '#333', backgroundColor: '#333',
width: '100%', width: '100%',
align: 'right', align: 'right',
height: 22, height: 22,
borderRadius: [4, 4, 0, 0] borderRadius: [4, 4, 0, 0]
}, },
hr: { hr: {
borderColor: '#aaa', borderColor: '#aaa',
width: '100%', width: '100%',
borderWidth: 0.5, borderWidth: 0.5,
height: 0 height: 0
}, },
b: { b: {
fontSize: 16, fontSize: 16,
lineHeight: 33 lineHeight: 33
}, },
per: { per: {
color: '#eee', color: '#eee',
backgroundColor: '#334455', backgroundColor: '#334455',
padding: [2, 4], padding: [2, 4],
borderRadius: 2 borderRadius: 2
} }
} }
} }
}, },
data: [ data: [
{ value: 335, name: '直达' }, { value: 335, name: '直达' },
{ value: 310, name: '邮件营销' }, { value: 310, name: '邮件营销' },
{ value: 234, name: '联盟广告' }, { value: 234, name: '联盟广告' },
{ value: 135, name: '视频广告' }, { value: 135, name: '视频广告' },
{ value: 1048, name: '百度' }, { value: 1048, name: '百度' },
{ value: 251, name: '谷歌' }, { value: 251, name: '谷歌' },
{ value: 147, name: '必应' }, { value: 147, name: '必应' },
{ value: 102, name: '其他' } { value: 102, name: '其他' }
] ]
} }
] ]
}) })
} }
} }
} }
</script> </script>
+100 -100
View File
@@ -1,100 +1,100 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}" /> <div :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import { DeBounce } from '@/utils/CsUtil' import { DeBounce } from '@/utils/CsUtil'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
export default { export default {
props: { props: {
className: { className: {
type: String, type: String,
default: 'chart' default: 'chart'
}, },
width: { width: {
type: String, type: String,
default: '100%' default: '100%'
}, },
height: { height: {
type: String, type: String,
default: '300px' default: '300px'
} }
}, },
data() { data() {
return { return {
chart: null chart: null
} }
}, },
mounted() { mounted() {
this.initChart() this.initChart()
this.__resizeHandler = DeBounce(() => { this.__resizeHandler = DeBounce(() => {
if (this.chart) { if (this.chart) {
this.chart.resize() this.chart.resize()
} }
}, 100) }, 100)
window.addEventListener('resize', this.__resizeHandler) window.addEventListener('resize', this.__resizeHandler)
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
} }
window.removeEventListener('resize', this.__resizeHandler) window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose() this.chart.dispose()
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({ this.chart.setOption({
series: { series: {
type: 'sankey', type: 'sankey',
layout: 'none', layout: 'none',
focusNodeAdjacency: 'allEdges', focusNodeAdjacency: 'allEdges',
data: [{ data: [{
name: 'a' name: 'a'
}, { }, {
name: 'b' name: 'b'
}, { }, {
name: 'a1' name: 'a1'
}, { }, {
name: 'a2' name: 'a2'
}, { }, {
name: 'b1' name: 'b1'
}, { }, {
name: 'c' name: 'c'
}], }],
links: [{ links: [{
source: 'a', source: 'a',
target: 'a1', target: 'a1',
value: 5 value: 5
}, { }, {
source: 'a', source: 'a',
target: 'a2', target: 'a2',
value: 3 value: 3
}, { }, {
source: 'b', source: 'b',
target: 'b1', target: 'b1',
value: 8 value: 8
}, { }, {
source: 'a', source: 'a',
target: 'b1', target: 'b1',
value: 3 value: 3
}, { }, {
source: 'b1', source: 'b1',
target: 'a1', target: 'a1',
value: 1 value: 1
}, { }, {
source: 'b1', source: 'b1',
target: 'c', target: 'c',
value: 2 value: 2
}] }]
} }
}) })
} }
} }
} }
</script> </script>
+143 -143
View File
@@ -1,143 +1,143 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}" /> <div :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import { DeBounce } from '@/utils/CsUtil' import { DeBounce } from '@/utils/CsUtil'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
export default { export default {
props: { props: {
className: { className: {
type: String, type: String,
default: 'chart' default: 'chart'
}, },
width: { width: {
type: String, type: String,
default: '100%' default: '100%'
}, },
height: { height: {
type: String, type: String,
default: '300px' default: '300px'
} }
}, },
data() { data() {
return { return {
chart: null chart: null
} }
}, },
mounted() { mounted() {
this.initChart() this.initChart()
this.__resizeHandler = DeBounce(() => { this.__resizeHandler = DeBounce(() => {
if (this.chart) { if (this.chart) {
this.chart.resize() this.chart.resize()
} }
}, 100) }, 100)
window.addEventListener('resize', this.__resizeHandler) window.addEventListener('resize', this.__resizeHandler)
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
} }
window.removeEventListener('resize', this.__resizeHandler) window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose() this.chart.dispose()
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
const data = [ const data = [
[[28604, 77, 17096869, 'Australia', 1990], [31163, 77.4, 27662440, 'Canada', 1990], [1516, 68, 1154605773, 'China', 1990], [13670, 74.7, 10582082, 'Cuba', 1990], [28599, 75, 4986705, 'Finland', 1990], [29476, 77.1, 56943299, 'France', 1990], [31476, 75.4, 78958237, 'Germany', 1990], [28666, 78.1, 254830, 'Iceland', 1990], [1777, 57.7, 870601776, 'India', 1990], [29550, 79.1, 122249285, 'Japan', 1990], [2076, 67.9, 20194354, 'North Korea', 1990], [12087, 72, 42972254, 'South Korea', 1990], [24021, 75.4, 3397534, 'New Zealand', 1990], [43296, 76.8, 4240375, 'Norway', 1990], [10088, 70.8, 38195258, 'Poland', 1990], [19349, 69.6, 147568552, 'Russia', 1990], [10670, 67.3, 53994605, 'Turkey', 1990], [26424, 75.7, 57110117, 'United Kingdom', 1990], [37062, 75.4, 252847810, 'United States', 1990]], [[28604, 77, 17096869, 'Australia', 1990], [31163, 77.4, 27662440, 'Canada', 1990], [1516, 68, 1154605773, 'China', 1990], [13670, 74.7, 10582082, 'Cuba', 1990], [28599, 75, 4986705, 'Finland', 1990], [29476, 77.1, 56943299, 'France', 1990], [31476, 75.4, 78958237, 'Germany', 1990], [28666, 78.1, 254830, 'Iceland', 1990], [1777, 57.7, 870601776, 'India', 1990], [29550, 79.1, 122249285, 'Japan', 1990], [2076, 67.9, 20194354, 'North Korea', 1990], [12087, 72, 42972254, 'South Korea', 1990], [24021, 75.4, 3397534, 'New Zealand', 1990], [43296, 76.8, 4240375, 'Norway', 1990], [10088, 70.8, 38195258, 'Poland', 1990], [19349, 69.6, 147568552, 'Russia', 1990], [10670, 67.3, 53994605, 'Turkey', 1990], [26424, 75.7, 57110117, 'United Kingdom', 1990], [37062, 75.4, 252847810, 'United States', 1990]],
[[44056, 81.8, 23968973, 'Australia', 2015], [43294, 81.7, 35939927, 'Canada', 2015], [13334, 76.9, 1376048943, 'China', 2015], [21291, 78.5, 11389562, 'Cuba', 2015], [38923, 80.8, 5503457, 'Finland', 2015], [37599, 81.9, 64395345, 'France', 2015], [44053, 81.1, 80688545, 'Germany', 2015], [42182, 82.8, 329425, 'Iceland', 2015], [5903, 66.8, 1311050527, 'India', 2015], [36162, 83.5, 126573481, 'Japan', 2015], [1390, 71.4, 25155317, 'North Korea', 2015], [34644, 80.7, 50293439, 'South Korea', 2015], [34186, 80.6, 4528526, 'New Zealand', 2015], [64304, 81.6, 5210967, 'Norway', 2015], [24787, 77.3, 38611794, 'Poland', 2015], [23038, 73.13, 143456918, 'Russia', 2015], [19360, 76.5, 78665830, 'Turkey', 2015], [38225, 81.4, 64715810, 'United Kingdom', 2015], [53354, 79.1, 321773631, 'United States', 2015]] [[44056, 81.8, 23968973, 'Australia', 2015], [43294, 81.7, 35939927, 'Canada', 2015], [13334, 76.9, 1376048943, 'China', 2015], [21291, 78.5, 11389562, 'Cuba', 2015], [38923, 80.8, 5503457, 'Finland', 2015], [37599, 81.9, 64395345, 'France', 2015], [44053, 81.1, 80688545, 'Germany', 2015], [42182, 82.8, 329425, 'Iceland', 2015], [5903, 66.8, 1311050527, 'India', 2015], [36162, 83.5, 126573481, 'Japan', 2015], [1390, 71.4, 25155317, 'North Korea', 2015], [34644, 80.7, 50293439, 'South Korea', 2015], [34186, 80.6, 4528526, 'New Zealand', 2015], [64304, 81.6, 5210967, 'Norway', 2015], [24787, 77.3, 38611794, 'Poland', 2015], [23038, 73.13, 143456918, 'Russia', 2015], [19360, 76.5, 78665830, 'Turkey', 2015], [38225, 81.4, 64715810, 'United Kingdom', 2015], [53354, 79.1, 321773631, 'United States', 2015]]
] ]
this.chart.setOption({ this.chart.setOption({
title: { title: {
text: '1990 与 2015 年各国家人均寿命与 GDP' text: '1990 与 2015 年各国家人均寿命与 GDP'
}, },
legend: { legend: {
right: 10, right: 10,
data: ['1990', '2015'] data: ['1990', '2015']
}, },
xAxis: { xAxis: {
splitLine: { splitLine: {
lineStyle: { lineStyle: {
type: 'dashed' type: 'dashed'
} }
} }
}, },
yAxis: { yAxis: {
splitLine: { splitLine: {
lineStyle: { lineStyle: {
type: 'dashed' type: 'dashed'
} }
}, },
scale: true scale: true
}, },
series: [{ series: [{
name: '1990', name: '1990',
data: data[0], data: data[0],
type: 'scatter', type: 'scatter',
symbolSize: function(data) { symbolSize: function(data) {
return Math.sqrt(data[2]) / 5e2 return Math.sqrt(data[2]) / 5e2
}, },
label: { label: {
emphasis: { emphasis: {
show: true, show: true,
formatter: function(param) { formatter: function(param) {
return param.data[3] return param.data[3]
}, },
position: 'top' position: 'top'
} }
}, },
itemStyle: { itemStyle: {
normal: { normal: {
shadowBlur: 10, shadowBlur: 10,
shadowColor: 'rgba(120, 36, 50, 0.5)', shadowColor: 'rgba(120, 36, 50, 0.5)',
shadowOffsetY: 5, shadowOffsetY: 5,
color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{ color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{
offset: 0, offset: 0,
color: 'rgb(251, 118, 123)' color: 'rgb(251, 118, 123)'
}, { }, {
offset: 1, offset: 1,
color: 'rgb(204, 46, 72)' color: 'rgb(204, 46, 72)'
}]) }])
} }
} }
}, { }, {
name: '2015', name: '2015',
data: data[1], data: data[1],
type: 'scatter', type: 'scatter',
symbolSize: function(data) { symbolSize: function(data) {
return Math.sqrt(data[2]) / 5e2 return Math.sqrt(data[2]) / 5e2
}, },
label: { label: {
emphasis: { emphasis: {
show: true, show: true,
formatter: function(param) { formatter: function(param) {
return param.data[3] return param.data[3]
}, },
position: 'top' position: 'top'
} }
}, },
itemStyle: { itemStyle: {
normal: { normal: {
shadowBlur: 10, shadowBlur: 10,
shadowColor: 'rgba(25, 100, 150, 0.5)', shadowColor: 'rgba(25, 100, 150, 0.5)',
shadowOffsetY: 5, shadowOffsetY: 5,
color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{ color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{
offset: 0, offset: 0,
color: 'rgb(129, 227, 238)' color: 'rgb(129, 227, 238)'
}, { }, {
offset: 1, offset: 1,
color: 'rgb(25, 183, 207)' color: 'rgb(25, 183, 207)'
}]) }])
} }
} }
}] }]
}) })
} }
} }
} }
</script> </script>
+107 -107
View File
@@ -1,107 +1,107 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}" /> <div :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import { DeBounce } from '@/utils/CsUtil' import { DeBounce } from '@/utils/CsUtil'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
export default { export default {
props: { props: {
className: { className: {
type: String, type: String,
default: 'chart' default: 'chart'
}, },
width: { width: {
type: String, type: String,
default: '100%' default: '100%'
}, },
height: { height: {
type: String, type: String,
default: '300px' default: '300px'
} }
}, },
data() { data() {
return { return {
chart: null chart: null
} }
}, },
mounted() { mounted() {
this.initChart() this.initChart()
this.__resizeHandler = DeBounce(() => { this.__resizeHandler = DeBounce(() => {
if (this.chart) { if (this.chart) {
this.chart.resize() this.chart.resize()
} }
}, 100) }, 100)
window.addEventListener('resize', this.__resizeHandler) window.addEventListener('resize', this.__resizeHandler)
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
} }
window.removeEventListener('resize', this.__resizeHandler) window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose() this.chart.dispose()
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
const data = [{ const data = [{
name: 'Grandpa', name: 'Grandpa',
children: [{ children: [{
name: 'Uncle Leo', name: 'Uncle Leo',
value: 15, value: 15,
children: [{ children: [{
name: 'Cousin Jack', name: 'Cousin Jack',
value: 2 value: 2
}, { }, {
name: 'Cousin Mary', name: 'Cousin Mary',
value: 5, value: 5,
children: [{ children: [{
name: 'Jackson', name: 'Jackson',
value: 2 value: 2
}] }]
}, { }, {
name: 'Cousin Ben', name: 'Cousin Ben',
value: 4 value: 4
}] }]
}, { }, {
name: 'Father', name: 'Father',
value: 10, value: 10,
children: [{ children: [{
name: 'Me', name: 'Me',
value: 5 value: 5
}, { }, {
name: 'Brother Peter', name: 'Brother Peter',
value: 1 value: 1
}] }]
}] }]
}, { }, {
name: 'Nancy', name: 'Nancy',
children: [{ children: [{
name: 'Uncle Nike', name: 'Uncle Nike',
children: [{ children: [{
name: 'Cousin Betty', name: 'Cousin Betty',
value: 1 value: 1
}, { }, {
name: 'Cousin Jenny', name: 'Cousin Jenny',
value: 2 value: 2
}] }]
}] }]
}] }]
this.chart.setOption({ this.chart.setOption({
series: { series: {
type: 'sunburst', type: 'sunburst',
data: data, data: data,
radius: [0, '90%'], radius: [0, '90%'],
label: { label: {
rotate: 'radial' rotate: 'radial'
} }
} }
}) })
} }
} }
} }
</script> </script>
@@ -1,148 +1,148 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}" /> <div :class="className" :style="{height:height,width:width}" />
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import { DeBounce } from '@/utils/CsUtil' import { DeBounce } from '@/utils/CsUtil'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
export default { export default {
props: { props: {
className: { className: {
type: String, type: String,
default: 'chart' default: 'chart'
}, },
width: { width: {
type: String, type: String,
default: '100%' default: '100%'
}, },
height: { height: {
type: String, type: String,
default: '500px' default: '500px'
} }
}, },
data() { data() {
return { return {
chart: null chart: null
} }
}, },
mounted() { mounted() {
this.initChart() this.initChart()
this.__resizeHandler = DeBounce(() => { this.__resizeHandler = DeBounce(() => {
if (this.chart) { if (this.chart) {
this.chart.resize() this.chart.resize()
} }
}, 100) }, 100)
window.addEventListener('resize', this.__resizeHandler) window.addEventListener('resize', this.__resizeHandler)
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
} }
window.removeEventListener('resize', this.__resizeHandler) window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose() this.chart.dispose()
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({ this.chart.setOption({
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
type: 'line', type: 'line',
lineStyle: { lineStyle: {
color: 'rgba(0,0,0,0.2)', color: 'rgba(0,0,0,0.2)',
width: 1, width: 1,
type: 'solid' type: 'solid'
} }
} }
}, },
legend: { legend: {
data: ['DQ', 'TY', 'SS', 'QG', 'SY', 'DD'] data: ['DQ', 'TY', 'SS', 'QG', 'SY', 'DD']
}, },
singleAxis: { singleAxis: {
top: 50, top: 50,
bottom: 50, bottom: 50,
axisTick: {}, axisTick: {},
axisLabel: {}, axisLabel: {},
type: 'time', type: 'time',
axisPointer: { axisPointer: {
animation: true, animation: true,
label: { label: {
show: true show: true
} }
}, },
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
type: 'dashed', type: 'dashed',
opacity: 0.2 opacity: 0.2
} }
} }
}, },
series: [ series: [
{ {
type: 'themeRiver', type: 'themeRiver',
itemStyle: { itemStyle: {
emphasis: { emphasis: {
shadowBlur: 20, shadowBlur: 20,
shadowColor: 'rgba(0, 0, 0, 0.8)' shadowColor: 'rgba(0, 0, 0, 0.8)'
} }
}, },
data: [['2015/11/08', 10, 'DQ'], ['2015/11/09', 15, 'DQ'], ['2015/11/10', 35, 'DQ'], data: [['2015/11/08', 10, 'DQ'], ['2015/11/09', 15, 'DQ'], ['2015/11/10', 35, 'DQ'],
['2015/11/11', 38, 'DQ'], ['2015/11/12', 22, 'DQ'], ['2015/11/13', 16, 'DQ'], ['2015/11/11', 38, 'DQ'], ['2015/11/12', 22, 'DQ'], ['2015/11/13', 16, 'DQ'],
['2015/11/14', 7, 'DQ'], ['2015/11/15', 2, 'DQ'], ['2015/11/16', 17, 'DQ'], ['2015/11/14', 7, 'DQ'], ['2015/11/15', 2, 'DQ'], ['2015/11/16', 17, 'DQ'],
['2015/11/17', 33, 'DQ'], ['2015/11/18', 40, 'DQ'], ['2015/11/19', 32, 'DQ'], ['2015/11/17', 33, 'DQ'], ['2015/11/18', 40, 'DQ'], ['2015/11/19', 32, 'DQ'],
['2015/11/20', 26, 'DQ'], ['2015/11/21', 35, 'DQ'], ['2015/11/22', 40, 'DQ'], ['2015/11/20', 26, 'DQ'], ['2015/11/21', 35, 'DQ'], ['2015/11/22', 40, 'DQ'],
['2015/11/23', 32, 'DQ'], ['2015/11/24', 26, 'DQ'], ['2015/11/25', 22, 'DQ'], ['2015/11/23', 32, 'DQ'], ['2015/11/24', 26, 'DQ'], ['2015/11/25', 22, 'DQ'],
['2015/11/26', 16, 'DQ'], ['2015/11/27', 22, 'DQ'], ['2015/11/28', 10, 'DQ'], ['2015/11/26', 16, 'DQ'], ['2015/11/27', 22, 'DQ'], ['2015/11/28', 10, 'DQ'],
['2015/11/08', 35, 'TY'], ['2015/11/09', 36, 'TY'], ['2015/11/10', 37, 'TY'], ['2015/11/08', 35, 'TY'], ['2015/11/09', 36, 'TY'], ['2015/11/10', 37, 'TY'],
['2015/11/11', 22, 'TY'], ['2015/11/12', 24, 'TY'], ['2015/11/13', 26, 'TY'], ['2015/11/11', 22, 'TY'], ['2015/11/12', 24, 'TY'], ['2015/11/13', 26, 'TY'],
['2015/11/14', 34, 'TY'], ['2015/11/15', 21, 'TY'], ['2015/11/16', 18, 'TY'], ['2015/11/14', 34, 'TY'], ['2015/11/15', 21, 'TY'], ['2015/11/16', 18, 'TY'],
['2015/11/17', 45, 'TY'], ['2015/11/18', 32, 'TY'], ['2015/11/19', 35, 'TY'], ['2015/11/17', 45, 'TY'], ['2015/11/18', 32, 'TY'], ['2015/11/19', 35, 'TY'],
['2015/11/20', 30, 'TY'], ['2015/11/21', 28, 'TY'], ['2015/11/22', 27, 'TY'], ['2015/11/20', 30, 'TY'], ['2015/11/21', 28, 'TY'], ['2015/11/22', 27, 'TY'],
['2015/11/23', 26, 'TY'], ['2015/11/24', 15, 'TY'], ['2015/11/25', 30, 'TY'], ['2015/11/23', 26, 'TY'], ['2015/11/24', 15, 'TY'], ['2015/11/25', 30, 'TY'],
['2015/11/26', 35, 'TY'], ['2015/11/27', 42, 'TY'], ['2015/11/28', 42, 'TY'], ['2015/11/26', 35, 'TY'], ['2015/11/27', 42, 'TY'], ['2015/11/28', 42, 'TY'],
['2015/11/08', 21, 'SS'], ['2015/11/09', 25, 'SS'], ['2015/11/10', 27, 'SS'], ['2015/11/08', 21, 'SS'], ['2015/11/09', 25, 'SS'], ['2015/11/10', 27, 'SS'],
['2015/11/11', 23, 'SS'], ['2015/11/12', 24, 'SS'], ['2015/11/13', 21, 'SS'], ['2015/11/11', 23, 'SS'], ['2015/11/12', 24, 'SS'], ['2015/11/13', 21, 'SS'],
['2015/11/14', 35, 'SS'], ['2015/11/15', 39, 'SS'], ['2015/11/16', 40, 'SS'], ['2015/11/14', 35, 'SS'], ['2015/11/15', 39, 'SS'], ['2015/11/16', 40, 'SS'],
['2015/11/17', 36, 'SS'], ['2015/11/18', 33, 'SS'], ['2015/11/19', 43, 'SS'], ['2015/11/17', 36, 'SS'], ['2015/11/18', 33, 'SS'], ['2015/11/19', 43, 'SS'],
['2015/11/20', 40, 'SS'], ['2015/11/21', 34, 'SS'], ['2015/11/22', 28, 'SS'], ['2015/11/20', 40, 'SS'], ['2015/11/21', 34, 'SS'], ['2015/11/22', 28, 'SS'],
['2015/11/23', 26, 'SS'], ['2015/11/24', 37, 'SS'], ['2015/11/25', 41, 'SS'], ['2015/11/23', 26, 'SS'], ['2015/11/24', 37, 'SS'], ['2015/11/25', 41, 'SS'],
['2015/11/26', 46, 'SS'], ['2015/11/27', 47, 'SS'], ['2015/11/28', 41, 'SS'], ['2015/11/26', 46, 'SS'], ['2015/11/27', 47, 'SS'], ['2015/11/28', 41, 'SS'],
['2015/11/08', 10, 'QG'], ['2015/11/09', 15, 'QG'], ['2015/11/10', 35, 'QG'], ['2015/11/08', 10, 'QG'], ['2015/11/09', 15, 'QG'], ['2015/11/10', 35, 'QG'],
['2015/11/11', 38, 'QG'], ['2015/11/12', 22, 'QG'], ['2015/11/13', 16, 'QG'], ['2015/11/11', 38, 'QG'], ['2015/11/12', 22, 'QG'], ['2015/11/13', 16, 'QG'],
['2015/11/14', 7, 'QG'], ['2015/11/15', 2, 'QG'], ['2015/11/16', 17, 'QG'], ['2015/11/14', 7, 'QG'], ['2015/11/15', 2, 'QG'], ['2015/11/16', 17, 'QG'],
['2015/11/17', 33, 'QG'], ['2015/11/18', 40, 'QG'], ['2015/11/19', 32, 'QG'], ['2015/11/17', 33, 'QG'], ['2015/11/18', 40, 'QG'], ['2015/11/19', 32, 'QG'],
['2015/11/20', 26, 'QG'], ['2015/11/21', 35, 'QG'], ['2015/11/22', 40, 'QG'], ['2015/11/20', 26, 'QG'], ['2015/11/21', 35, 'QG'], ['2015/11/22', 40, 'QG'],
['2015/11/23', 32, 'QG'], ['2015/11/24', 26, 'QG'], ['2015/11/25', 22, 'QG'], ['2015/11/23', 32, 'QG'], ['2015/11/24', 26, 'QG'], ['2015/11/25', 22, 'QG'],
['2015/11/26', 16, 'QG'], ['2015/11/27', 22, 'QG'], ['2015/11/28', 10, 'QG'], ['2015/11/26', 16, 'QG'], ['2015/11/27', 22, 'QG'], ['2015/11/28', 10, 'QG'],
['2015/11/08', 10, 'SY'], ['2015/11/09', 15, 'SY'], ['2015/11/10', 35, 'SY'], ['2015/11/08', 10, 'SY'], ['2015/11/09', 15, 'SY'], ['2015/11/10', 35, 'SY'],
['2015/11/11', 38, 'SY'], ['2015/11/12', 22, 'SY'], ['2015/11/13', 16, 'SY'], ['2015/11/11', 38, 'SY'], ['2015/11/12', 22, 'SY'], ['2015/11/13', 16, 'SY'],
['2015/11/14', 7, 'SY'], ['2015/11/15', 2, 'SY'], ['2015/11/16', 17, 'SY'], ['2015/11/14', 7, 'SY'], ['2015/11/15', 2, 'SY'], ['2015/11/16', 17, 'SY'],
['2015/11/17', 33, 'SY'], ['2015/11/18', 40, 'SY'], ['2015/11/19', 32, 'SY'], ['2015/11/17', 33, 'SY'], ['2015/11/18', 40, 'SY'], ['2015/11/19', 32, 'SY'],
['2015/11/20', 26, 'SY'], ['2015/11/21', 35, 'SY'], ['2015/11/22', 4, 'SY'], ['2015/11/20', 26, 'SY'], ['2015/11/21', 35, 'SY'], ['2015/11/22', 4, 'SY'],
['2015/11/23', 32, 'SY'], ['2015/11/24', 26, 'SY'], ['2015/11/25', 22, 'SY'], ['2015/11/23', 32, 'SY'], ['2015/11/24', 26, 'SY'], ['2015/11/25', 22, 'SY'],
['2015/11/26', 16, 'SY'], ['2015/11/27', 22, 'SY'], ['2015/11/28', 10, 'SY'], ['2015/11/26', 16, 'SY'], ['2015/11/27', 22, 'SY'], ['2015/11/28', 10, 'SY'],
['2015/11/08', 10, 'DD'], ['2015/11/09', 15, 'DD'], ['2015/11/10', 35, 'DD'], ['2015/11/08', 10, 'DD'], ['2015/11/09', 15, 'DD'], ['2015/11/10', 35, 'DD'],
['2015/11/11', 38, 'DD'], ['2015/11/12', 22, 'DD'], ['2015/11/13', 16, 'DD'], ['2015/11/11', 38, 'DD'], ['2015/11/12', 22, 'DD'], ['2015/11/13', 16, 'DD'],
['2015/11/14', 7, 'DD'], ['2015/11/15', 2, 'DD'], ['2015/11/16', 17, 'DD'], ['2015/11/14', 7, 'DD'], ['2015/11/15', 2, 'DD'], ['2015/11/16', 17, 'DD'],
['2015/11/17', 33, 'DD'], ['2015/11/18', 4, 'DD'], ['2015/11/19', 32, 'DD'], ['2015/11/17', 33, 'DD'], ['2015/11/18', 4, 'DD'], ['2015/11/19', 32, 'DD'],
['2015/11/20', 26, 'DD'], ['2015/11/21', 35, 'DD'], ['2015/11/22', 40, 'DD'], ['2015/11/20', 26, 'DD'], ['2015/11/21', 35, 'DD'], ['2015/11/22', 40, 'DD'],
['2015/11/23', 32, 'DD'], ['2015/11/24', 26, 'DD'], ['2015/11/25', 22, 'DD'], ['2015/11/23', 32, 'DD'], ['2015/11/24', 26, 'DD'], ['2015/11/25', 22, 'DD'],
['2015/11/26', 16, 'DD'], ['2015/11/27', 22, 'DD'], ['2015/11/28', 10, 'DD']] ['2015/11/26', 16, 'DD'], ['2015/11/27', 22, 'DD'], ['2015/11/28', 10, 'DD']]
} }
] ]
}) })
} }
} }
} }
</script> </script>
@@ -1,60 +1,60 @@
<template> <template>
<a <a
href="https://github.com/odboy-tianjun/cutejava" href="https://github.com/odboy-tianjun/cutejava"
target="_blank" target="_blank"
class="github-corner" class="github-corner"
aria-label="View source on Github" aria-label="View source on Github"
> >
<svg <svg
width="80" width="80"
height="80" height="80"
viewBox="0 0 250 250" viewBox="0 0 250 250"
style="fill:#40c9c6; color:#fff;" style="fill:#40c9c6; color:#fff;"
aria-hidden="true" aria-hidden="true"
> >
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z" /> <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z" />
<path <path
d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
fill="currentColor" fill="currentColor"
style="transform-origin: 130px 106px;" style="transform-origin: 130px 106px;"
class="octo-arm" class="octo-arm"
/> />
<path <path
d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
fill="currentColor" fill="currentColor"
class="octo-body" class="octo-body"
/> />
</svg> </svg>
</a> </a>
</template> </template>
<style scoped> <style scoped>
.github-corner:hover .octo-arm { .github-corner:hover .octo-arm {
animation: octocat-wave 560ms ease-in-out animation: octocat-wave 560ms ease-in-out
} }
@keyframes octocat-wave { @keyframes octocat-wave {
0%, 0%,
100% { 100% {
transform: rotate(0) transform: rotate(0)
} }
20%, 20%,
60% { 60% {
transform: rotate(-25deg) transform: rotate(-25deg)
} }
40%, 40%,
80% { 80% {
transform: rotate(10deg) transform: rotate(10deg)
} }
} }
@media (max-width: 500px) { @media (max-width: 500px) {
.github-corner:hover .octo-arm { .github-corner:hover .octo-arm {
animation: none animation: none
} }
.github-corner .octo-arm { .github-corner .octo-arm {
animation: octocat-wave 560ms ease-in-out animation: octocat-wave 560ms ease-in-out
} }
} }
</style> </style>
@@ -1,46 +1,46 @@
<template> <template>
<div style="padding: 0 15px;" @click="toggleClick"> <div style="padding: 0 15px;" @click="toggleClick">
<svg <svg
:class="{'is-active':isActive}" :class="{'is-active':isActive}"
class="hamburger" class="hamburger"
viewBox="0 0 1024 1024" viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
width="64" width="64"
height="64" height="64"
> >
<path <path
d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"
/> />
</svg> </svg>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'Hamburger', name: 'Hamburger',
props: { props: {
isActive: { isActive: {
type: Boolean, type: Boolean,
default: false default: false
} }
}, },
methods: { methods: {
toggleClick() { toggleClick() {
this.$emit('toggleClick') this.$emit('toggleClick')
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.hamburger { .hamburger {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
width: 20px; width: 20px;
height: 20px; height: 20px;
} }
.hamburger.is-active { .hamburger.is-active {
transform: rotate(180deg); transform: rotate(180deg);
} }
</style> </style>
@@ -1,190 +1,190 @@
<template> <template>
<div :class="{'show':show}" class="header-search"> <div :class="{'show':show}" class="header-search">
<svg-icon class-name="search-icon" icon-class="search" @click.stop="click" /> <svg-icon class-name="search-icon" icon-class="search" @click.stop="click" />
<el-select <el-select
ref="headerSearchSelect" ref="headerSearchSelect"
v-model="search" v-model="search"
:remote-method="querySearch" :remote-method="querySearch"
filterable filterable
default-first-option default-first-option
remote remote
placeholder="Search" placeholder="Search"
class="header-search-select" class="header-search-select"
@change="change" @change="change"
> >
<el-option v-for="item in options" :key="item.path" :value="item" :label="item.title.join(' > ')" /> <el-option v-for="item in options" :key="item.path" :value="item" :label="item.title.join(' > ')" />
</el-select> </el-select>
</div> </div>
</template> </template>
<script> <script>
// fuse is a lightweight fuzzy-search module // fuse is a lightweight fuzzy-search module
// make search results more in line with expectations // make search results more in line with expectations
import Fuse from 'fuse.js' import Fuse from 'fuse.js'
import path from 'path' import path from 'path'
export default { export default {
name: 'HeaderSearch', name: 'HeaderSearch',
data() { data() {
return { return {
search: '', search: '',
options: [], options: [],
searchPool: [], searchPool: [],
show: false, show: false,
fuse: undefined fuse: undefined
} }
}, },
computed: { computed: {
routes() { routes() {
return this.$store.state.permission.routers return this.$store.state.permission.routers
} }
}, },
watch: { watch: {
routes() { routes() {
this.searchPool = this.generateRoutes(this.routes) this.searchPool = this.generateRoutes(this.routes)
}, },
searchPool(list) { searchPool(list) {
this.initFuse(list) this.initFuse(list)
}, },
show(value) { show(value) {
if (value) { if (value) {
document.body.addEventListener('click', this.close) document.body.addEventListener('click', this.close)
} else { } else {
document.body.removeEventListener('click', this.close) document.body.removeEventListener('click', this.close)
} }
} }
}, },
mounted() { mounted() {
this.searchPool = this.generateRoutes(this.routes) this.searchPool = this.generateRoutes(this.routes)
}, },
methods: { methods: {
click() { click() {
this.show = !this.show this.show = !this.show
if (this.show) { if (this.show) {
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus() this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus()
} }
}, },
close() { close() {
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur() this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()
this.options = [] this.options = []
this.show = false this.show = false
}, },
change(val) { change(val) {
if (this.ishttp(val.path)) { if (this.ishttp(val.path)) {
// http(s):// 路径新窗口打开 // http(s):// 路径新窗口打开
window.open(val.path, '_blank') window.open(val.path, '_blank')
} else { } else {
this.$router.push(val.path) this.$router.push(val.path)
} }
this.search = '' this.search = ''
this.options = [] this.options = []
this.$nextTick(() => { this.$nextTick(() => {
this.show = false this.show = false
}) })
}, },
initFuse(list) { initFuse(list) {
this.fuse = new Fuse(list, { this.fuse = new Fuse(list, {
shouldSort: true, shouldSort: true,
threshold: 0.4, threshold: 0.4,
location: 0, location: 0,
distance: 100, distance: 100,
maxPatternLength: 32, maxPatternLength: 32,
minMatchCharLength: 1, minMatchCharLength: 1,
keys: [{ keys: [{
name: 'title', name: 'title',
weight: 0.7 weight: 0.7
}, { }, {
name: 'path', name: 'path',
weight: 0.3 weight: 0.3
}] }]
}) })
}, },
// Filter out the routes that can be displayed in the sidebar // Filter out the routes that can be displayed in the sidebar
// And generate the internationalized title // And generate the internationalized title
generateRoutes(routes, basePath = '/', prefixTitle = []) { generateRoutes(routes, basePath = '/', prefixTitle = []) {
let res = [] let res = []
for (const router of routes) { for (const router of routes) {
// skip hidden router // skip hidden router
if (router.hidden) { if (router.hidden) {
continue continue
} }
const data = { const data = {
path: !this.ishttp(router.path) ? path.resolve(basePath, router.path) : router.path, path: !this.ishttp(router.path) ? path.resolve(basePath, router.path) : router.path,
title: [...prefixTitle] title: [...prefixTitle]
} }
if (router.meta && router.meta.title) { if (router.meta && router.meta.title) {
data.title = [...data.title, router.meta.title] data.title = [...data.title, router.meta.title]
if (router.redirect !== 'noRedirect') { if (router.redirect !== 'noRedirect') {
// only push the routes with title // only push the routes with title
// special case: need to exclude parent router without redirect // special case: need to exclude parent router without redirect
res.push(data) res.push(data)
} }
} }
// recursive child routes // recursive child routes
if (router.children) { if (router.children) {
const tempRoutes = this.generateRoutes(router.children, data.path, data.title) const tempRoutes = this.generateRoutes(router.children, data.path, data.title)
if (tempRoutes.length >= 1) { if (tempRoutes.length >= 1) {
res = [...res, ...tempRoutes] res = [...res, ...tempRoutes]
} }
} }
} }
return res return res
}, },
querySearch(query) { querySearch(query) {
if (query !== '') { if (query !== '') {
this.options = this.fuse.search(query) this.options = this.fuse.search(query)
} else { } else {
this.options = [] this.options = []
} }
}, },
ishttp(url) { ishttp(url) {
return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1 return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.header-search { .header-search {
font-size: 0 !important; font-size: 0 !important;
.search-icon { .search-icon {
cursor: pointer; cursor: pointer;
font-size: 18px; font-size: 18px;
vertical-align: middle; vertical-align: middle;
} }
.header-search-select { .header-search-select {
font-size: 18px; font-size: 18px;
transition: width 0.2s; transition: width 0.2s;
width: 0; width: 0;
overflow: hidden; overflow: hidden;
background: transparent; background: transparent;
border-radius: 0; border-radius: 0;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
::v-deep .el-input__inner { ::v-deep .el-input__inner {
border-radius: 0; border-radius: 0;
border: 0; border: 0;
padding-left: 0; padding-left: 0;
padding-right: 0; padding-right: 0;
box-shadow: none !important; box-shadow: none !important;
border-bottom: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9;
vertical-align: middle; vertical-align: middle;
} }
} }
&.show { &.show {
.header-search-select { .header-search-select {
width: 210px; width: 210px;
margin-left: 10px; margin-left: 10px;
} }
} }
} }
</style> </style>
@@ -1,78 +1,78 @@
<template> <template>
<div class="icon-body"> <div class="icon-body">
<el-input <el-input
v-model="name" v-model="name"
style="position: relative;" style="position: relative;"
clearable clearable
placeholder="请输入图标名称" placeholder="请输入图标名称"
@clear="filterIcons" @clear="filterIcons"
@input.native="filterIcons" @input.native="filterIcons"
> >
<i slot="suffix" class="el-icon-search el-input__icon" /> <i slot="suffix" class="el-icon-search el-input__icon" />
</el-input> </el-input>
<div class="icon-list"> <div class="icon-list">
<div v-for="(item, index) in iconList" :key="index" @click="selectedIcon(item)"> <div v-for="(item, index) in iconList" :key="index" @click="selectedIcon(item)">
<svg-icon :icon-class="item" style="height: 30px;width: 16px;" /> <svg-icon :icon-class="item" style="height: 30px;width: 16px;" />
<span>{{ item }}</span> <span>{{ item }}</span>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import icons from './requireIcons' import icons from './requireIcons'
export default { export default {
name: 'IconSelect', name: 'IconSelect',
data() { data() {
return { return {
name: '', name: '',
iconList: icons iconList: icons
} }
}, },
methods: { methods: {
filterIcons() { filterIcons() {
this.iconList = icons this.iconList = icons
if (this.name) { if (this.name) {
this.iconList = this.iconList.filter(item => item.includes(this.name)) this.iconList = this.iconList.filter(item => item.includes(this.name))
} }
}, },
selectedIcon(name) { selectedIcon(name) {
this.$emit('selected', name) this.$emit('selected', name)
document.body.click() document.body.click()
}, },
reset() { reset() {
this.name = '' this.name = ''
this.iconList = icons this.iconList = icons
} }
} }
} }
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
.icon-body { .icon-body {
width: 100%; width: 100%;
padding: 10px; padding: 10px;
.icon-list { .icon-list {
height: 200px; height: 200px;
overflow-y: scroll; overflow-y: scroll;
div { div {
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
margin-bottom: -5px; margin-bottom: -5px;
cursor: pointer; cursor: pointer;
width: 33%; width: 33%;
float: left; float: left;
} }
span { span {
display: inline-block; display: inline-block;
vertical-align: -0.15em; vertical-align: -0.15em;
fill: currentColor; fill: currentColor;
overflow: hidden; overflow: hidden;
} }
} }
} }
</style> </style>
@@ -1,10 +1,10 @@
const req = require.context('../../assets/icons/svg', false, /\.svg$/) const req = require.context('../../assets/icons/svg', false, /\.svg$/)
const requireAll = requireContext => requireContext.keys() const requireAll = requireContext => requireContext.keys()
const re = /\.\/(.*)\.svg/ const re = /\.\/(.*)\.svg/
const icons = requireAll(req).map(i => { const icons = requireAll(req).map(i => {
return i.match(re)[1] return i.match(re)[1]
}) })
export default icons export default icons
+30 -30
View File
@@ -1,30 +1,30 @@
<template> <template>
<div v-loading="loading" :style="'height:'+ height"> <div v-loading="loading" :style="'height:'+ height">
<iframe :src="src" frameborder="no" style="width: 100%;height: 100%" scrolling="auto" /> <iframe :src="src" frameborder="no" style="width: 100%;height: 100%" scrolling="auto" />
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
src: { src: {
type: String, type: String,
required: true required: true
} }
}, },
data() { data() {
return { return {
height: document.documentElement.clientHeight - (84 + 22) + 'px;', height: document.documentElement.clientHeight - (84 + 22) + 'px;',
loading: true loading: true
} }
}, },
mounted: function() { mounted: function() {
setTimeout(() => { setTimeout(() => {
this.loading = false this.loading = false
}, 230) }, 230)
const that = this const that = this
window.onresize = function temp() { window.onresize = function temp() {
that.height = document.documentElement.clientHeight - (84 + 22) + 'px;' that.height = document.documentElement.clientHeight - (84 + 22) + 'px;'
} }
} }
} }
</script> </script>
+102 -102
View File
@@ -1,102 +1,102 @@
<template> <template>
<div :class="{'hidden':hidden}" class="pagination-container"> <div :class="{'hidden':hidden}" class="pagination-container">
<el-pagination <el-pagination
:background="background" :background="background"
:current-page.sync="currentPage" :current-page.sync="currentPage"
:page-size.sync="pageSize" :page-size.sync="pageSize"
:layout="layout" :layout="layout"
:page-sizes="pageSizes" :page-sizes="pageSizes"
:total="total" :total="total"
v-bind="$attrs" v-bind="$attrs"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
/> />
</div> </div>
</template> </template>
<script> <script>
import { scrollTo } from '@/utils/scroll-to' import { scrollTo } from '@/utils/scroll-to'
export default { export default {
name: 'Pagination', name: 'Pagination',
props: { props: {
total: { total: {
required: true, required: true,
type: Number type: Number
}, },
page: { page: {
type: Number, type: Number,
default: 1 default: 1
}, },
limit: { limit: {
type: Number, type: Number,
default: 20 default: 20
}, },
pageSizes: { pageSizes: {
type: Array, type: Array,
default() { default() {
return [10, 20, 30, 50] return [10, 20, 30, 50]
} }
}, },
layout: { layout: {
type: String, type: String,
default: 'total, sizes, prev, pager, next, jumper' default: 'total, sizes, prev, pager, next, jumper'
}, },
background: { background: {
type: Boolean, type: Boolean,
default: true default: true
}, },
autoScroll: { autoScroll: {
type: Boolean, type: Boolean,
default: true default: true
}, },
hidden: { hidden: {
type: Boolean, type: Boolean,
default: false default: false
} }
}, },
computed: { computed: {
currentPage: { currentPage: {
get() { get() {
return this.page return this.page
}, },
set(val) { set(val) {
this.$emit('update:page', val) this.$emit('update:page', val)
} }
}, },
pageSize: { pageSize: {
get() { get() {
return this.limit return this.limit
}, },
set(val) { set(val) {
this.$emit('update:limit', val) this.$emit('update:limit', val)
} }
} }
}, },
methods: { methods: {
handleSizeChange(val) { handleSizeChange(val) {
this.$emit('pagination', { page: this.currentPage, limit: val }) this.$emit('pagination', { page: this.currentPage, limit: val })
if (this.autoScroll) { if (this.autoScroll) {
scrollTo(0, 800) scrollTo(0, 800)
} }
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.$emit('pagination', { page: val, limit: this.pageSize }) this.$emit('pagination', { page: val, limit: this.pageSize })
if (this.autoScroll) { if (this.autoScroll) {
scrollTo(0, 800) scrollTo(0, 800)
} }
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.pagination-container { .pagination-container {
background: #fff; background: #fff;
padding: 32px 16px; padding: 32px 16px;
} }
.pagination-container.hidden { .pagination-container.hidden {
display: none; display: none;
} }
</style> </style>
+140 -140
View File
@@ -1,140 +1,140 @@
<template> <template>
<div :style="{zIndex:zIndex,height:height,width:width}" class="pan-item"> <div :style="{zIndex:zIndex,height:height,width:width}" class="pan-item">
<div class="pan-info"> <div class="pan-info">
<div class="pan-info-roles-container"> <div class="pan-info-roles-container">
<slot /> <slot />
</div> </div>
</div> </div>
<img :src="image" class="pan-thumb"> <img :src="image" class="pan-thumb">
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'PanThumb', name: 'PanThumb',
props: { props: {
image: { image: {
type: String, type: String,
required: true required: true
}, },
zIndex: { zIndex: {
type: Number, type: Number,
default: 1 default: 1
}, },
width: { width: {
type: String, type: String,
default: '150px' default: '150px'
}, },
height: { height: {
type: String, type: String,
default: '150px' default: '150px'
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.pan-item { .pan-item {
width: 200px; width: 200px;
height: 200px; height: 200px;
border-radius: 50%; border-radius: 50%;
display: inline-block; display: inline-block;
position: relative; position: relative;
cursor: default; cursor: default;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
} }
.pan-info-roles-container { .pan-info-roles-container {
padding: 20px; padding: 20px;
text-align: center; text-align: center;
} }
.pan-thumb { .pan-thumb {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-size: 100%; background-size: 100%;
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;
position: absolute; position: absolute;
transform-origin: 95% 40%; transform-origin: 95% 40%;
transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
} }
.pan-thumb:after { .pan-thumb:after {
content: ''; content: '';
width: 8px; width: 8px;
height: 8px; height: 8px;
position: absolute; position: absolute;
border-radius: 50%; border-radius: 50%;
top: 40%; top: 40%;
left: 95%; left: 95%;
margin: -4px 0 0 -4px; margin: -4px 0 0 -4px;
background: radial-gradient(ellipse at center, rgba(14, 14, 14, 1) 0%, rgba(125, 126, 125, 1) 100%); background: radial-gradient(ellipse at center, rgba(14, 14, 14, 1) 0%, rgba(125, 126, 125, 1) 100%);
box-shadow: 0 0 1px rgba(255, 255, 255, 0.9); box-shadow: 0 0 1px rgba(255, 255, 255, 0.9);
} }
.pan-info { .pan-info {
position: absolute; position: absolute;
width: inherit; width: inherit;
height: inherit; height: inherit;
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;
box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.05); box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.05);
} }
.pan-info h3 { .pan-info h3 {
color: #fff; color: #fff;
text-transform: uppercase; text-transform: uppercase;
position: relative; position: relative;
letter-spacing: 2px; letter-spacing: 2px;
font-size: 18px; font-size: 18px;
margin: 0 60px; margin: 0 60px;
padding: 22px 0 0 0; padding: 22px 0 0 0;
height: 85px; height: 85px;
font-family: 'Open Sans', Arial, sans-serif; font-family: 'Open Sans', Arial, sans-serif;
text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.3); text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.3);
} }
.pan-info p { .pan-info p {
color: #fff; color: #fff;
padding: 10px 5px; padding: 10px 5px;
font-style: italic; font-style: italic;
margin: 0 30px; margin: 0 30px;
font-size: 12px; font-size: 12px;
border-top: 1px solid rgba(255, 255, 255, 0.5); border-top: 1px solid rgba(255, 255, 255, 0.5);
} }
.pan-info p a { .pan-info p a {
display: block; display: block;
color: #333; color: #333;
width: 80px; width: 80px;
height: 80px; height: 80px;
background: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.3);
border-radius: 50%; border-radius: 50%;
color: #fff; color: #fff;
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
text-transform: uppercase; text-transform: uppercase;
font-size: 9px; font-size: 9px;
letter-spacing: 1px; letter-spacing: 1px;
padding-top: 24px; padding-top: 24px;
margin: 7px auto 0; margin: 7px auto 0;
font-family: 'Open Sans', Arial, sans-serif; font-family: 'Open Sans', Arial, sans-serif;
opacity: 0; opacity: 0;
transition: transform 0.3s ease-in-out 0.2s, opacity 0.3s ease-in-out 0.2s, background 0.2s linear 0s; transition: transform 0.3s ease-in-out 0.2s, opacity 0.3s ease-in-out 0.2s, background 0.2s linear 0s;
transform: translateX(60px) rotate(90deg); transform: translateX(60px) rotate(90deg);
} }
.pan-info p a:hover { .pan-info p a:hover {
background: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.5);
} }
.pan-item:hover .pan-thumb { .pan-item:hover .pan-thumb {
transform: rotate(-110deg); transform: rotate(-110deg);
} }
.pan-item:hover .pan-info p a { .pan-item:hover .pan-info p a {
opacity: 1; opacity: 1;
transform: translateX(0px) rotate(0deg); transform: translateX(0px) rotate(0deg);
} }
</style> </style>
@@ -1,3 +1,3 @@
<template> <template>
<router-view /> <router-view />
</template> </template>
@@ -1,13 +1,13 @@
import permission from './permission' import permission from './permission'
const install = function(Vue) { const install = function(Vue) {
Vue.directive('permission', permission) Vue.directive('permission', permission)
} }
if (window.Vue) { if (window.Vue) {
window['permission'] = permission window['permission'] = permission
Vue.use(install); // eslint-disable-line Vue.use(install); // eslint-disable-line
} }
permission.install = install permission.install = install
export default permission export default permission
@@ -1,21 +1,21 @@
import store from '@/store' import store from '@/store'
export default { export default {
inserted(el, binding) { inserted(el, binding) {
const { value } = binding const { value } = binding
const roles = store.getters && store.getters.roles const roles = store.getters && store.getters.roles
if (value && value instanceof Array) { if (value && value instanceof Array) {
if (value.length > 0) { if (value.length > 0) {
const permissionRoles = value const permissionRoles = value
const hasPermission = roles.some(role => { const hasPermission = roles.some(role => {
return permissionRoles.includes(role) return permissionRoles.includes(role)
}) })
if (!hasPermission) { if (!hasPermission) {
el.parentNode && el.parentNode.removeChild(el) el.parentNode && el.parentNode.removeChild(el)
} }
} }
} else { } else {
throw new Error(`使用方式: v-permission="['admin','editor']"`) throw new Error(`使用方式: v-permission="['admin','editor']"`)
} }
} }
} }
+150 -150
View File
@@ -1,150 +1,150 @@
<template> <template>
<div ref="rightPanel" :class="{show:show}" class="rightPanel-container"> <div ref="rightPanel" :class="{show:show}" class="rightPanel-container">
<div class="rightPanel-background" /> <div class="rightPanel-background" />
<div class="rightPanel"> <div class="rightPanel">
<div class="rightPanel-items"> <div class="rightPanel-items">
<slot /> <slot />
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { AddClass, RemoveClass } from '@/utils/CsDomUtil' import { AddClass, RemoveClass } from '@/utils/CsDomUtil'
export default { export default {
name: 'RightPanel', name: 'RightPanel',
props: { props: {
clickNotClose: { clickNotClose: {
default: false, default: false,
type: Boolean type: Boolean
}, },
buttonTop: { buttonTop: {
default: 250, default: 250,
type: Number type: Number
} }
}, },
computed: { computed: {
show: { show: {
get() { get() {
return this.$store.state.settings.showSettings return this.$store.state.settings.showSettings
}, },
set(val) { set(val) {
this.$store.dispatch('settings/changeSetting', { this.$store.dispatch('settings/changeSetting', {
key: 'showSettings', key: 'showSettings',
value: val value: val
}) })
} }
}, },
theme() { theme() {
return this.$store.state.settings.theme return this.$store.state.settings.theme
} }
}, },
watch: { watch: {
show(value) { show(value) {
if (value && !this.clickNotClose) { if (value && !this.clickNotClose) {
this.addEventClick() this.addEventClick()
} }
if (value) { if (value) {
AddClass(document.body, 'showRightPanel') AddClass(document.body, 'showRightPanel')
} else { } else {
RemoveClass(document.body, 'showRightPanel') RemoveClass(document.body, 'showRightPanel')
} }
} }
}, },
mounted() { mounted() {
this.insertToBody() this.insertToBody()
this.addEventClick() this.addEventClick()
}, },
beforeDestroy() { beforeDestroy() {
const elx = this.$refs.rightPanel const elx = this.$refs.rightPanel
elx.remove() elx.remove()
}, },
methods: { methods: {
addEventClick() { addEventClick() {
window.addEventListener('click', this.closeSidebar) window.addEventListener('click', this.closeSidebar)
}, },
closeSidebar(evt) { closeSidebar(evt) {
const parent = evt.target.closest('.rightPanel') const parent = evt.target.closest('.rightPanel')
if (!parent) { if (!parent) {
this.show = false this.show = false
window.removeEventListener('click', this.closeSidebar) window.removeEventListener('click', this.closeSidebar)
} }
}, },
insertToBody() { insertToBody() {
const elx = this.$refs.rightPanel const elx = this.$refs.rightPanel
const body = document.querySelector('body') const body = document.querySelector('body')
body.insertBefore(elx, body.firstChild) body.insertBefore(elx, body.firstChild)
} }
} }
} }
</script> </script>
<style> <style>
.showRightPanel { .showRightPanel {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
width: calc(100% - 15px); width: calc(100% - 15px);
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.rightPanel-background { .rightPanel-background {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
opacity: 0; opacity: 0;
transition: opacity .3s cubic-bezier(.7, .3, .1, 1); transition: opacity .3s cubic-bezier(.7, .3, .1, 1);
background: rgba(0, 0, 0, .2); background: rgba(0, 0, 0, .2);
z-index: -1; z-index: -1;
} }
.rightPanel { .rightPanel {
width: 100%; width: 100%;
max-width: 260px; max-width: 260px;
height: 100vh; height: 100vh;
position: fixed; position: fixed;
top: 0; top: 0;
right: 0; right: 0;
box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, .05); box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, .05);
transition: all .25s cubic-bezier(.7, .3, .1, 1); transition: all .25s cubic-bezier(.7, .3, .1, 1);
transform: translate(100%); transform: translate(100%);
background: #fff; background: #fff;
z-index: 40000; z-index: 40000;
} }
.show { .show {
transition: all .3s cubic-bezier(.7, .3, .1, 1); transition: all .3s cubic-bezier(.7, .3, .1, 1);
.rightPanel-background { .rightPanel-background {
z-index: 20000; z-index: 20000;
opacity: 1; opacity: 1;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.rightPanel { .rightPanel {
transform: translate(0); transform: translate(0);
} }
} }
.handle-button { .handle-button {
width: 48px; width: 48px;
height: 48px; height: 48px;
position: absolute; position: absolute;
left: -48px; left: -48px;
text-align: center; text-align: center;
font-size: 24px; font-size: 24px;
border-radius: 6px 0 0 6px !important; border-radius: 6px 0 0 6px !important;
z-index: 0; z-index: 0;
pointer-events: auto; pointer-events: auto;
cursor: pointer; cursor: pointer;
color: #fff; color: #fff;
line-height: 48px; line-height: 48px;
i { i {
font-size: 24px; font-size: 24px;
line-height: 48px; line-height: 48px;
} }
} }
</style> </style>
@@ -1,60 +1,60 @@
<template> <template>
<div> <div>
<svg-icon :icon-class="isFullscreen?'exit-fullscreen':'fullscreen'" @click="click" /> <svg-icon :icon-class="isFullscreen?'exit-fullscreen':'fullscreen'" @click="click" />
</div> </div>
</template> </template>
<script> <script>
import screenfull from 'screenfull' import screenfull from 'screenfull'
export default { export default {
name: 'Screenfull', name: 'Screenfull',
data() { data() {
return { return {
isFullscreen: false isFullscreen: false
} }
}, },
mounted() { mounted() {
this.init() this.init()
}, },
beforeDestroy() { beforeDestroy() {
this.destroy() this.destroy()
}, },
methods: { methods: {
click() { click() {
if (!screenfull.enabled) { if (!screenfull.enabled) {
this.$message({ this.$message({
message: 'you browser can not work', message: 'you browser can not work',
type: 'warning' type: 'warning'
}) })
return false return false
} }
screenfull.toggle() screenfull.toggle()
}, },
change() { change() {
this.isFullscreen = screenfull.isFullscreen this.isFullscreen = screenfull.isFullscreen
}, },
init() { init() {
if (screenfull.enabled) { if (screenfull.enabled) {
screenfull.on('change', this.change) screenfull.on('change', this.change)
} }
}, },
destroy() { destroy() {
if (screenfull.enabled) { if (screenfull.enabled) {
screenfull.off('change', this.change) screenfull.off('change', this.change)
} }
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.screenfull-svg { .screenfull-svg {
display: inline-block; display: inline-block;
cursor: pointer; cursor: pointer;
fill: #5a5e66;; fill: #5a5e66;;
width: 20px; width: 20px;
height: 20px; height: 20px;
vertical-align: 10px; vertical-align: 10px;
} }
</style> </style>
@@ -1,63 +1,63 @@
<template> <template>
<el-dropdown trigger="click" @command="handleSetSize"> <el-dropdown trigger="click" @command="handleSetSize">
<div> <div>
<svg-icon class-name="size-icon" icon-class="size" /> <svg-icon class-name="size-icon" icon-class="size" />
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item <el-dropdown-item
v-for="item of sizeOptions" v-for="item of sizeOptions"
:key="item.value" :key="item.value"
:disabled="size===item.value" :disabled="size===item.value"
:command="item.value" :command="item.value"
> >
{{ {{
item.label item.label
}} }}
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
sizeOptions: [ sizeOptions: [
{ label: 'Default', value: 'default' }, { label: 'Default', value: 'default' },
{ label: 'Medium', value: 'medium' }, { label: 'Medium', value: 'medium' },
{ label: 'Small', value: 'small' }, { label: 'Small', value: 'small' },
{ label: 'Mini', value: 'mini' } { label: 'Mini', value: 'mini' }
] ]
} }
}, },
computed: { computed: {
size() { size() {
return this.$store.getters.size return this.$store.getters.size
} }
}, },
methods: { methods: {
handleSetSize(size) { handleSetSize(size) {
this.$ELEMENT.size = size this.$ELEMENT.size = size
this.$store.dispatch('app/setSize', size) this.$store.dispatch('app/setSize', size)
this.refreshView() this.refreshView()
this.$message({ this.$message({
message: '布局设置成功', message: '布局设置成功',
type: 'success' type: 'success'
}) })
}, },
refreshView() { refreshView() {
// In order to make the cached page re-rendered // In order to make the cached page re-rendered
this.$store.dispatch('tagsView/delAllCachedViews', this.$route) this.$store.dispatch('tagsView/delAllCachedViews', this.$route)
const { fullPath } = this.$route const { fullPath } = this.$route
this.$nextTick(() => { this.$nextTick(() => {
this.$router.replace({ this.$router.replace({
path: '/redirect' + fullPath path: '/redirect' + fullPath
}) })
}) })
} }
} }
} }
</script> </script>
+62 -62
View File
@@ -1,62 +1,62 @@
<template> <template>
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" /> <div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" />
<svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners"> <svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
<use :href="iconName" /> <use :href="iconName" />
</svg> </svg>
</template> </template>
<script> <script>
// doc: https://panjiachen.github.io/vue-element-admin-site/feature/component/svg-icon.html#usage // doc: https://panjiachen.github.io/vue-element-admin-site/feature/component/svg-icon.html#usage
import { IsExternal } from '@/utils/CsValidateUtil' import { IsExternal } from '@/utils/CsValidateUtil'
export default { export default {
name: 'SvgIcon', name: 'SvgIcon',
props: { props: {
iconClass: { iconClass: {
type: String, type: String,
required: true required: true
}, },
className: { className: {
type: String, type: String,
default: '' default: ''
} }
}, },
computed: { computed: {
isExternal() { isExternal() {
return IsExternal(this.iconClass) return IsExternal(this.iconClass)
}, },
iconName() { iconName() {
return `#icon-${this.iconClass}` return `#icon-${this.iconClass}`
}, },
svgClass() { svgClass() {
if (this.className) { if (this.className) {
return 'svg-icon ' + this.className return 'svg-icon ' + this.className
} else { } else {
return 'svg-icon' return 'svg-icon'
} }
}, },
styleExternalIcon() { styleExternalIcon() {
return { return {
mask: `url(${this.iconClass}) no-repeat 50% 50%`, mask: `url(${this.iconClass}) no-repeat 50% 50%`,
'-webkit-mask': `url(${this.iconClass}) no-repeat 50% 50%` '-webkit-mask': `url(${this.iconClass}) no-repeat 50% 50%`
} }
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.svg-icon { .svg-icon {
width: 1em; width: 1em;
height: 1em; height: 1em;
vertical-align: -0.15em; vertical-align: -0.15em;
fill: currentColor; fill: currentColor;
overflow: hidden; overflow: hidden;
} }
.svg-external-icon { .svg-external-icon {
background-color: currentColor; background-color: currentColor;
mask-size: cover !important; mask-size: cover !important;
display: inline-block; display: inline-block;
} }
</style> </style>
@@ -1,166 +1,166 @@
<template> <template>
<el-color-picker <el-color-picker
v-model="theme" v-model="theme"
:predefine="['#409EFF', '#1890ff', '#304156','#212121','#11a983', '#13c2c2', '#6959CD', '#f5222d']" :predefine="['#409EFF', '#1890ff', '#304156','#212121','#11a983', '#13c2c2', '#6959CD', '#f5222d']"
class="theme-picker" class="theme-picker"
popper-class="theme-picker-dropdown" popper-class="theme-picker-dropdown"
/> />
</template> </template>
<script> <script>
const version = require('element-ui/package.json').version // element-ui version from node_modules const version = require('element-ui/package.json').version // element-ui version from node_modules
const ORIGINAL_THEME = '#409EFF' // default color const ORIGINAL_THEME = '#409EFF' // default color
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
export default { export default {
data() { data() {
return { return {
chalk: '', // content of theme-chalk css chalk: '', // content of theme-chalk css
theme: '' theme: ''
} }
}, },
computed: { computed: {
defaultTheme() { defaultTheme() {
return this.$store.state.settings.theme return this.$store.state.settings.theme
} }
}, },
watch: { watch: {
defaultTheme: { defaultTheme: {
handler: function(val, oldVal) { handler: function(val, oldVal) {
this.theme = val this.theme = val
}, },
immediate: true immediate: true
}, },
async theme(val) { async theme(val) {
Cookies.set('theme', val, { expires: 365 }) Cookies.set('theme', val, { expires: 365 })
const oldVal = this.chalk ? this.theme : Cookies.get('theme') ? Cookies.get('theme') : ORIGINAL_THEME const oldVal = this.chalk ? this.theme : Cookies.get('theme') ? Cookies.get('theme') : ORIGINAL_THEME
if (typeof val !== 'string') return if (typeof val !== 'string') return
const themeCluster = this.getThemeCluster(val.replace('#', '')) const themeCluster = this.getThemeCluster(val.replace('#', ''))
const originalCluster = this.getThemeCluster(oldVal.replace('#', '')) const originalCluster = this.getThemeCluster(oldVal.replace('#', ''))
const getHandler = (variable, id) => { const getHandler = (variable, id) => {
return () => { return () => {
const originalCluster = this.getThemeCluster(ORIGINAL_THEME.replace('#', '')) const originalCluster = this.getThemeCluster(ORIGINAL_THEME.replace('#', ''))
const newStyle = this.updateStyle(this[variable], originalCluster, themeCluster) const newStyle = this.updateStyle(this[variable], originalCluster, themeCluster)
let styleTag = document.getElementById(id) let styleTag = document.getElementById(id)
if (!styleTag) { if (!styleTag) {
styleTag = document.createElement('style') styleTag = document.createElement('style')
styleTag.setAttribute('id', id) styleTag.setAttribute('id', id)
document.head.appendChild(styleTag) document.head.appendChild(styleTag)
} }
styleTag.innerText = newStyle styleTag.innerText = newStyle
} }
} }
if (!this.chalk) { if (!this.chalk) {
const url = `https://unpkg.com/element-ui@${version}/lib/theme-chalk/index.css` const url = `https://unpkg.com/element-ui@${version}/lib/theme-chalk/index.css`
await this.getCSSString(url, 'chalk') await this.getCSSString(url, 'chalk')
} }
const chalkHandler = getHandler('chalk', 'chalk-style') const chalkHandler = getHandler('chalk', 'chalk-style')
chalkHandler() chalkHandler()
const styles = [].slice.call(document.querySelectorAll('style')) const styles = [].slice.call(document.querySelectorAll('style'))
.filter(style => { .filter(style => {
const text = style.innerText const text = style.innerText
return new RegExp(oldVal, 'i').test(text) && !/Chalk Variables/.test(text) return new RegExp(oldVal, 'i').test(text) && !/Chalk Variables/.test(text)
}) })
styles.forEach(style => { styles.forEach(style => {
const { innerText } = style const { innerText } = style
if (typeof innerText !== 'string') return if (typeof innerText !== 'string') return
style.innerText = this.updateStyle(innerText, originalCluster, themeCluster) style.innerText = this.updateStyle(innerText, originalCluster, themeCluster)
}) })
this.$emit('change', val) this.$emit('change', val)
} }
}, },
methods: { methods: {
updateStyle(style, oldCluster, newCluster) { updateStyle(style, oldCluster, newCluster) {
let newStyle = style let newStyle = style
oldCluster.forEach((color, index) => { oldCluster.forEach((color, index) => {
newStyle = newStyle.replace(new RegExp(color, 'ig'), newCluster[index]) newStyle = newStyle.replace(new RegExp(color, 'ig'), newCluster[index])
}) })
return newStyle return newStyle
}, },
getCSSString(url, variable) { getCSSString(url, variable) {
return new Promise(resolve => { return new Promise(resolve => {
const xhr = new XMLHttpRequest() const xhr = new XMLHttpRequest()
xhr.onreadystatechange = () => { xhr.onreadystatechange = () => {
if (xhr.readyState === 4 && xhr.status === 200) { if (xhr.readyState === 4 && xhr.status === 200) {
this[variable] = xhr.responseText.replace(/@font-face{[^}]+}/, '') this[variable] = xhr.responseText.replace(/@font-face{[^}]+}/, '')
resolve() resolve()
} }
} }
xhr.open('GET', url) xhr.open('GET', url)
xhr.send() xhr.send()
}) })
}, },
getThemeCluster(theme) { getThemeCluster(theme) {
const tintColor = (color, tint) => { const tintColor = (color, tint) => {
let red = parseInt(color.slice(0, 2), 16) let red = parseInt(color.slice(0, 2), 16)
let green = parseInt(color.slice(2, 4), 16) let green = parseInt(color.slice(2, 4), 16)
let blue = parseInt(color.slice(4, 6), 16) let blue = parseInt(color.slice(4, 6), 16)
if (tint === 0) { // when primary color is in its rgb space if (tint === 0) { // when primary color is in its rgb space
return [red, green, blue].join(',') return [red, green, blue].join(',')
} else { } else {
red += Math.round(tint * (255 - red)) red += Math.round(tint * (255 - red))
green += Math.round(tint * (255 - green)) green += Math.round(tint * (255 - green))
blue += Math.round(tint * (255 - blue)) blue += Math.round(tint * (255 - blue))
red = red.toString(16) red = red.toString(16)
green = green.toString(16) green = green.toString(16)
blue = blue.toString(16) blue = blue.toString(16)
return `#${red}${green}${blue}` return `#${red}${green}${blue}`
} }
} }
const shadeColor = (color, shade) => { const shadeColor = (color, shade) => {
let red = parseInt(color.slice(0, 2), 16) let red = parseInt(color.slice(0, 2), 16)
let green = parseInt(color.slice(2, 4), 16) let green = parseInt(color.slice(2, 4), 16)
let blue = parseInt(color.slice(4, 6), 16) let blue = parseInt(color.slice(4, 6), 16)
red = Math.round((1 - shade) * red) red = Math.round((1 - shade) * red)
green = Math.round((1 - shade) * green) green = Math.round((1 - shade) * green)
blue = Math.round((1 - shade) * blue) blue = Math.round((1 - shade) * blue)
red = red.toString(16) red = red.toString(16)
green = green.toString(16) green = green.toString(16)
blue = blue.toString(16) blue = blue.toString(16)
return `#${red}${green}${blue}` return `#${red}${green}${blue}`
} }
const clusters = [theme] const clusters = [theme]
for (let i = 0; i <= 9; i++) { for (let i = 0; i <= 9; i++) {
clusters.push(tintColor(theme, Number((i / 10).toFixed(2)))) clusters.push(tintColor(theme, Number((i / 10).toFixed(2))))
} }
clusters.push(shadeColor(theme, 0.1)) clusters.push(shadeColor(theme, 0.1))
return clusters return clusters
} }
} }
} }
</script> </script>
<style> <style>
.theme-message, .theme-message,
.theme-picker-dropdown { .theme-picker-dropdown {
z-index: 99999 !important; z-index: 99999 !important;
} }
.theme-picker .el-color-picker__trigger { .theme-picker .el-color-picker__trigger {
height: 26px !important; height: 26px !important;
width: 26px !important; width: 26px !important;
padding: 2px; padding: 2px;
} }
.theme-picker-dropdown .el-color-dropdown__link-btn { .theme-picker-dropdown .el-color-dropdown__link-btn {
display: none; display: none;
} }
</style> </style>
@@ -1,63 +1,63 @@
<template> <template>
<section class="app-main"> <section class="app-main">
<transition name="fade-transform" mode="out-in"> <transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews"> <keep-alive :include="cachedViews">
<router-view :key="key" /> <router-view :key="key" />
</keep-alive> </keep-alive>
</transition> </transition>
<el-backtop :bottom="50" :right="40"><i class="el-icon-caret-top" /></el-backtop> <el-backtop :bottom="50" :right="40"><i class="el-icon-caret-top" /></el-backtop>
<div v-if="$store.state.settings.showFooter" id="el-main-footer"> <div v-if="$store.state.settings.showFooter" id="el-main-footer">
<span v-html="$store.state.settings.footerTxt" /> <span v-html="$store.state.settings.footerTxt" />
<span v-if="$store.state.settings.caseNumber"> ⋅ </span> <span v-if="$store.state.settings.caseNumber"> ⋅ </span>
<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">{{ $store.state.settings.caseNumber }}</a> <a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">{{ $store.state.settings.caseNumber }}</a>
</div> </div>
</section> </section>
</template> </template>
<script> <script>
export default { export default {
name: 'AppMain', name: 'AppMain',
computed: { computed: {
cachedViews() { cachedViews() {
return this.$store.state.tagsView.cachedViews return this.$store.state.tagsView.cachedViews
}, },
key() { key() {
return this.$route.path return this.$route.path
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.app-main { .app-main {
/* 50= navbar 50 */ /* 50= navbar 50 */
min-height: calc(100vh - 50px); min-height: calc(100vh - 50px);
width: 100%; width: 100%;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.fixed-header+.app-main { .fixed-header+.app-main {
padding-top: 50px; padding-top: 50px;
} }
.hasTagsView { .hasTagsView {
.app-main { .app-main {
/* 84 = navbar + tags-view = 50 + 34 */ /* 84 = navbar + tags-view = 50 + 34 */
min-height: calc(100vh - 84px); min-height: calc(100vh - 84px);
} }
.fixed-header+.app-main { .fixed-header+.app-main {
padding-top: 84px; padding-top: 84px;
} }
} }
</style> </style>
<style lang="scss"> <style lang="scss">
// fix css style bug in open el-dialog // fix css style bug in open el-dialog
.el-popup-parent--hidden { .el-popup-parent--hidden {
.fixed-header { .fixed-header {
padding-right: 15px; padding-right: 15px;
} }
} }
</style> </style>
+194 -194
View File
@@ -1,194 +1,194 @@
<template> <template>
<div class="navbar"> <div class="navbar">
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" /> <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
<div class="right-menu"> <div class="right-menu">
<template v-if="device!=='mobile'"> <template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item" /> <search id="header-search" class="right-menu-item" />
<el-tooltip content="全屏缩放" effect="dark" placement="bottom"> <el-tooltip content="全屏缩放" effect="dark" placement="bottom">
<screenfull id="screenfull" class="right-menu-item hover-effect" /> <screenfull id="screenfull" class="right-menu-item hover-effect" />
</el-tooltip> </el-tooltip>
<el-tooltip content="布局设置" effect="dark" placement="bottom"> <el-tooltip content="布局设置" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect" /> <size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip> </el-tooltip>
</template> </template>
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click"> <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<img :src="user.avatarName ? baseApi + '/avatar/' + user.avatarName : Avatar" class="user-avatar"> <img :src="user.avatarName ? baseApi + '/avatar/' + user.avatarName : Avatar" class="user-avatar">
<i class="el-icon-caret-bottom" /> <i class="el-icon-caret-bottom" />
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<span style="display:block;" @click="show = true"> <span style="display:block;" @click="show = true">
<el-dropdown-item> <el-dropdown-item>
布局设置 布局设置
</el-dropdown-item> </el-dropdown-item>
</span> </span>
<router-link to="/user/center"> <router-link to="/user/center">
<el-dropdown-item> <el-dropdown-item>
个人中心 个人中心
</el-dropdown-item> </el-dropdown-item>
</router-link> </router-link>
<span style="display:block;" @click="open"> <span style="display:block;" @click="open">
<el-dropdown-item divided> <el-dropdown-item divided>
退出登录 退出登录
</el-dropdown-item> </el-dropdown-item>
</span> </span>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import Breadcrumb from '@/components/Breadcrumb' import Breadcrumb from '@/components/Breadcrumb'
import Hamburger from '@/components/Hamburger' import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull' import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect' import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch' import Search from '@/components/HeaderSearch'
import Avatar from '@/assets/images/avatar.png' import Avatar from '@/assets/images/avatar.png'
export default { export default {
components: { components: {
Breadcrumb, Breadcrumb,
Hamburger, Hamburger,
Screenfull, Screenfull,
SizeSelect, SizeSelect,
Search Search
}, },
data() { data() {
return { return {
Avatar: Avatar, Avatar: Avatar,
dialogVisible: false dialogVisible: false
} }
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
'sidebar', 'sidebar',
'device', 'device',
'user', 'user',
'baseApi' 'baseApi'
]), ]),
show: { show: {
get() { get() {
return this.$store.state.settings.showSettings return this.$store.state.settings.showSettings
}, },
set(val) { set(val) {
this.$store.dispatch('settings/changeSetting', { this.$store.dispatch('settings/changeSetting', {
key: 'showSettings', key: 'showSettings',
value: val value: val
}) })
} }
} }
}, },
methods: { methods: {
toggleSideBar() { toggleSideBar() {
this.$store.dispatch('app/toggleSideBar') this.$store.dispatch('app/toggleSideBar')
}, },
open() { open() {
this.$confirm('确定注销并退出系统吗?', '提示', { this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.logout() this.logout()
}) })
}, },
logout() { logout() {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
location.reload() location.reload()
}) })
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.navbar { .navbar {
height: 50px; height: 50px;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
background: #fff; background: #fff;
box-shadow: 0 1px 4px rgba(0,21,41,.08); box-shadow: 0 1px 4px rgba(0,21,41,.08);
.hamburger-container { .hamburger-container {
line-height: 46px; line-height: 46px;
height: 100%; height: 100%;
float: left; float: left;
cursor: pointer; cursor: pointer;
transition: background .3s; transition: background .3s;
-webkit-tap-highlight-color:transparent; -webkit-tap-highlight-color:transparent;
&:hover { &:hover {
background: rgba(0, 0, 0, .025) background: rgba(0, 0, 0, .025)
} }
} }
.breadcrumb-container { .breadcrumb-container {
float: left; float: left;
} }
.errLog-container { .errLog-container {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
} }
.right-menu { .right-menu {
float: right; float: right;
height: 100%; height: 100%;
line-height: 50px; line-height: 50px;
&:focus { &:focus {
outline: none; outline: none;
} }
.right-menu-item { .right-menu-item {
display: inline-block; display: inline-block;
padding: 0 8px; padding: 0 8px;
height: 100%; height: 100%;
font-size: 18px; font-size: 18px;
color: #5a5e66; color: #5a5e66;
vertical-align: text-bottom; vertical-align: text-bottom;
&.hover-effect { &.hover-effect {
cursor: pointer; cursor: pointer;
transition: background .3s; transition: background .3s;
&:hover { &:hover {
background: rgba(0, 0, 0, .025) background: rgba(0, 0, 0, .025)
} }
} }
} }
.avatar-container { .avatar-container {
margin-right: 30px; margin-right: 30px;
.avatar-wrapper { .avatar-wrapper {
margin-top: 5px; margin-top: 5px;
position: relative; position: relative;
.user-avatar { .user-avatar {
cursor: pointer; cursor: pointer;
width: 40px; width: 40px;
height: 40px; height: 40px;
border-radius: 10px; border-radius: 10px;
} }
.el-icon-caret-bottom { .el-icon-caret-bottom {
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
right: -20px; right: -20px;
top: 25px; top: 25px;
font-size: 12px; font-size: 12px;
} }
} }
} }
} }
} }
</style> </style>
@@ -1,108 +1,108 @@
<template> <template>
<div class="drawer-container"> <div class="drawer-container">
<div> <div>
<h3 class="drawer-title">系统布局设置</h3> <h3 class="drawer-title">系统布局设置</h3>
<div class="drawer-item"> <div class="drawer-item">
<span>主题颜色</span> <span>主题颜色</span>
<theme-picker style="float: right;height: 26px;margin: -3px 8px 0 0;" @change="themeChange" /> <theme-picker style="float: right;height: 26px;margin: -3px 8px 0 0;" @change="themeChange" />
</div> </div>
<div class="drawer-item"> <div class="drawer-item">
<span>显示标签</span> <span>显示标签</span>
<el-switch v-model="tagsView" class="drawer-switch" /> <el-switch v-model="tagsView" class="drawer-switch" />
</div> </div>
<div class="drawer-item"> <div class="drawer-item">
<span>固定头部</span> <span>固定头部</span>
<el-switch v-model="fixedHeader" class="drawer-switch" /> <el-switch v-model="fixedHeader" class="drawer-switch" />
</div> </div>
<div class="drawer-item"> <div class="drawer-item">
<span>显示LOGO</span> <span>显示LOGO</span>
<el-switch v-model="sidebarLogo" class="drawer-switch" /> <el-switch v-model="sidebarLogo" class="drawer-switch" />
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import ThemePicker from '@/components/ThemePicker' import ThemePicker from '@/components/ThemePicker'
export default { export default {
components: { ThemePicker }, components: { ThemePicker },
data() { data() {
return {} return {}
}, },
computed: { computed: {
fixedHeader: { fixedHeader: {
get() { get() {
return this.$store.state.settings.fixedHeader return this.$store.state.settings.fixedHeader
}, },
set(val) { set(val) {
this.$store.dispatch('settings/changeSetting', { this.$store.dispatch('settings/changeSetting', {
key: 'fixedHeader', key: 'fixedHeader',
value: val value: val
}) })
} }
}, },
tagsView: { tagsView: {
get() { get() {
return this.$store.state.settings.tagsView return this.$store.state.settings.tagsView
}, },
set(val) { set(val) {
this.$store.dispatch('settings/changeSetting', { this.$store.dispatch('settings/changeSetting', {
key: 'tagsView', key: 'tagsView',
value: val value: val
}) })
} }
}, },
sidebarLogo: { sidebarLogo: {
get() { get() {
return this.$store.state.settings.sidebarLogo return this.$store.state.settings.sidebarLogo
}, },
set(val) { set(val) {
this.$store.dispatch('settings/changeSetting', { this.$store.dispatch('settings/changeSetting', {
key: 'sidebarLogo', key: 'sidebarLogo',
value: val value: val
}) })
} }
} }
}, },
methods: { methods: {
themeChange(val) { themeChange(val) {
this.$store.dispatch('settings/changeSetting', { this.$store.dispatch('settings/changeSetting', {
key: 'theme', key: 'theme',
value: val value: val
}) })
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.drawer-container { .drawer-container {
padding: 24px; padding: 24px;
font-size: 14px; font-size: 14px;
line-height: 1.5; line-height: 1.5;
word-wrap: break-word; word-wrap: break-word;
.drawer-title { .drawer-title {
margin-bottom: 12px; margin-bottom: 12px;
color: rgba(0, 0, 0, .85); color: rgba(0, 0, 0, .85);
font-size: 14px; font-size: 14px;
line-height: 22px; line-height: 22px;
} }
.drawer-item { .drawer-item {
color: rgba(0, 0, 0, .65); color: rgba(0, 0, 0, .65);
font-size: 14px; font-size: 14px;
padding: 12px 0; padding: 12px 0;
} }
.drawer-switch { .drawer-switch {
float: right float: right
} }
} }
</style> </style>
@@ -1,26 +1,26 @@
export default { export default {
computed: { computed: {
device() { device() {
return this.$store.state.app.device return this.$store.state.app.device
} }
}, },
mounted() { mounted() {
// In order to fix the click on menu on the ios device will trigger the mouseleave bug // In order to fix the click on menu on the ios device will trigger the mouseleave bug
// https://github.com/PanJiaChen/vue-element-admin/issues/1135 // https://github.com/PanJiaChen/vue-element-admin/issues/1135
this.fixBugIniOS() this.fixBugIniOS()
}, },
methods: { methods: {
fixBugIniOS() { fixBugIniOS() {
const $subMenu = this.$refs.subMenu const $subMenu = this.$refs.subMenu
if ($subMenu) { if ($subMenu) {
const handleMouseleave = $subMenu.handleMouseleave const handleMouseleave = $subMenu.handleMouseleave
$subMenu.handleMouseleave = (e) => { $subMenu.handleMouseleave = (e) => {
if (this.device === 'mobile') { if (this.device === 'mobile') {
return return
} }
handleMouseleave(e) handleMouseleave(e)
} }
} }
} }
} }
} }
@@ -1,29 +1,29 @@
<script> <script>
export default { export default {
name: 'MenuItem', name: 'MenuItem',
functional: true, functional: true,
props: { props: {
icon: { icon: {
type: String, type: String,
default: '' default: ''
}, },
title: { title: {
type: String, type: String,
default: '' default: ''
} }
}, },
render(h, context) { render(h, context) {
const { icon, title } = context.props const { icon, title } = context.props
const vnodes = [] const vnodes = []
if (icon) { if (icon) {
vnodes.push(<svg-icon icon-class={icon}/>) vnodes.push(<svg-icon icon-class={icon}/>)
} }
if (title) { if (title) {
vnodes.push(<span slot='title'>{(title)}</span>) vnodes.push(<span slot='title'>{(title)}</span>)
} }
return vnodes return vnodes
} }
} }
</script> </script>
@@ -1,36 +1,36 @@
<template> <template>
<!-- eslint-disable vue/require-component-is --> <!-- eslint-disable vue/require-component-is -->
<component v-bind="linkProps(to)"> <component v-bind="linkProps(to)">
<slot /> <slot />
</component> </component>
</template> </template>
<script> <script>
import { IsExternal } from '@/utils/CsValidateUtil' import { IsExternal } from '@/utils/CsValidateUtil'
export default { export default {
props: { props: {
to: { to: {
type: String, type: String,
required: true required: true
} }
}, },
methods: { methods: {
linkProps(url) { linkProps(url) {
if (IsExternal(url)) { if (IsExternal(url)) {
return { return {
is: 'a', is: 'a',
href: url, href: url,
target: '_blank', target: '_blank',
rel: 'noopener' rel: 'noopener'
} }
} }
return { return {
is: 'router-link', is: 'router-link',
to: url to: url
} }
} }
} }
} }
</script> </script>

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