提交 e5d71583 编写于 作者: G gongzijian

Merge remote-tracking branch 'upstream/branch-1.0.2' into branch-1.0.2

......@@ -43,7 +43,11 @@ Easy Scheduler
- [**升级文档**](https://analysys.github.io/easyscheduler_docs_cn/升级文档.html?_blank "升级文档")
- <a href="http://52.82.13.76:8888" target="_blank">我要体验</a> 普通用户登录:demo/demo123
- [**接口文档**](http://52.82.13.76:8888/easyscheduler/doc.html?language=zh_CN&lang=cn?_blank "接口文档")
- <a href="http://52.82.13.76:8888" target="_blank">我要体验</a>
- [**FAQ**](https://analysys.github.io/easyscheduler_docs_cn/EasyScheduler-FAQ".html?_blank "EasyScheduler-FAQ")
更多文档请参考 <a href="https://analysys.github.io/easyscheduler_docs_cn/" target="_blank">easyscheduler中文在线文档</a>
......
Easy Scheduler Release 1.0.3
===
Easy Scheduler 1.0.3是1.x系列中的第四个版本。
新特性:
===
- [[EasyScheduler-254](https://github.com/analysys/EasyScheduler/issues/254)] 流程定义删除和批量删除
- [[EasyScheduler-347](https://github.com/analysys/EasyScheduler/issues/347)] 任务依赖增加“今日”
- [[EasyScheduler-273](https://github.com/analysys/EasyScheduler/issues/273)]sql任务添加title
- [[EasyScheduler-247](https://github.com/analysys/EasyScheduler/issues/247)]API在线文档
- [[EasyScheduler-319](https://github.com/analysys/EasyScheduler/issues/319)] 单机容错
- [[EasyScheduler-253](https://github.com/analysys/EasyScheduler/issues/253)] 项目增加流程定义统计和运行流程实例统计
- [[EasyScheduler-292](https://github.com/analysys/EasyScheduler/issues/292)] 启用SSL的邮箱发送邮件
- [[EasyScheduler-77](https://github.com/analysys/EasyScheduler/issues/77)] 定时管理、工作流定义添加删除功能
- [[EasyScheduler-380](https://github.com/analysys/EasyScheduler/issues/380)] 服务监控功能
- [[EasyScheduler-380](https://github.com/analysys/EasyScheduler/issues/382)] 项目增加流程定义统计和运行流程实例统计
增强:
===
- [[EasyScheduler-192](https://github.com/analysys/EasyScheduler/issues/192)] 租户删除前可以考虑校验租户和资源
- [[EasyScheduler-376](https://github.com/analysys/EasyScheduler/issues/294)] 删除实例时候,没有删除对应zookeeper队列里的任务
- [[EasyScheduler-185](https://github.com/analysys/EasyScheduler/issues/185)] 项目删除工作流定义还存在
- [[EasyScheduler-206](https://github.com/analysys/EasyScheduler/issues/206)] 优化部署,完善docker化支持
- [[EasyScheduler-381](https://github.com/analysys/EasyScheduler/issues/381)] 前端一键部署脚本支持ubuntu
修复:
===
- [[EasyScheduler-255](https://github.com/analysys/EasyScheduler/issues/255)]子父流程全局变量覆盖,子流程继承父流程全局变量并可以重写
- [[EasyScheduler-256](https://github.com/analysys/EasyScheduler/issues/256)]子父流程参数显示异常
- [[EasyScheduler-186](https://github.com/analysys/EasyScheduler/issues/186)]所有查询中只要输入%会返回所有数据
- [[EasyScheduler-185](https://github.com/analysys/EasyScheduler/issues/185)]项目删除工作流定义还存在
- [[EasyScheduler-266](https://github.com/analysys/EasyScheduler/issues/266)]Stop process return: process definition 1 not on line
- [[EasyScheduler-300](https://github.com/analysys/EasyScheduler/issues/300)] 超时告警时间单位
- [[EasyScheduler-235](https://github.com/analysys/EasyScheduler/issues/235)]nginx超时连接问题修复
- [[EasyScheduler-272](https://github.com/analysys/EasyScheduler/issues/272)]管理员不能生成token
- [[EasyScheduler-272](https://github.com/analysys/EasyScheduler/issues/277)]save global parameters error
- [[EasyScheduler-183](https://github.com/analysys/EasyScheduler/issues/183)]创建中文名称的Worker分组报错
- [[EasyScheduler-377](https://github.com/analysys/EasyScheduler/issues/377)]资源文件重命名只修改描述时会报名称已存在错误
- [[EasyScheduler-235](https://github.com/analysys/EasyScheduler/issues/235)]创建spark数据源,点击“测试连接”,系统回退回到登入页面
- [[EasyScheduler-83](https://github.com/analysys/EasyScheduler/issues/83)]1.0.1版本启动api server报错
- [[EasyScheduler-379](https://github.com/analysys/EasyScheduler/issues/379)]跨天恢复执行定时任务时,时间参数不对
- [[EasyScheduler-383](https://github.com/analysys/EasyScheduler/issues/383)]sql邮件不显示前面的空行
感谢:
===
最后但最重要的是,没有以下伙伴的贡献就没有新版本的诞生:
Baoqi, jimmy201602, samz406, petersear, millionfor, hyperknob, fanguanqun, yangqinlong, qq389401879,
feloxx, coding-now, hymzcn, nysyxxg, chgxtony
以及微信群里众多的热心伙伴!在此非常感谢!
......@@ -30,7 +30,7 @@ A: 支持绝大多数邮箱,qq、163、126、139、outlook、aliyun等皆可
Q:常用的系统变量时间参数有哪些,如何使用?
![image-20190524180218862](/Users/stone/Library/Application Support/typora-user-images/image-20190524180218862.png)
A: 请参考使用手册中的系统参数
---
......@@ -82,31 +82,15 @@ A: 建议在Ubuntu、Centos上运行,暂不支持windows上运行,不过win
-----
Q: 自定义参数如何使用?
A:
----
Q:任务为什么不执行?
A: 不执行的原因:
查看xx表里有没有内容?
查看command表里有没有内容?
查看Master server的运行日志:
查看Worker Server的运行日志
----
Q: 为什么任务一直在运行中?
A:
----
Q: 任务
......@@ -43,6 +43,8 @@ Easy Scheduler
- [**升级文档**](https://analysys.github.io/easyscheduler_docs_cn/升级文档.html?_blank "升级文档")
- [**FAQ**](https://analysys.github.io/easyscheduler_docs_cn/EasyScheduler-FAQ.html?_blank "EasyScheduler-FAQ")
- <a href="http://52.82.13.76:8888" target="_blank">我要体验</a> 普通用户登录:demo/demo123
更多文档请参考 <a href="https://analysys.github.io/easyscheduler_docs_cn/" target="_blank">easyscheduler中文在线文档</a>
......
......@@ -9,7 +9,13 @@
* [准备工作](后端部署文档.md#1、准备工作)
* [部署](后端部署文档.md#2、部署)
* [快速上手](快速上手.md#快速上手)
* [系统使用手册](系统使用手册.md#使用手册)
* 系统使用手册
* [快速上手](系统使用手册.md#快速上手)
* [操作指南](系统使用手册.md#操作指南)
* [安全中心(权限系统)](系统使用手册.md#安全中心(权限系统))
* [监控中心](系统使用手册.md#监控中心)
* [任务节点类型和参数设置](系统使用手册.md#任务节点类型和参数设置)
* [系统参数](系统使用手册.md#系统参数)
* [系统架构设计](系统架构设计.md#系统架构设计)
* 前端开发文档
* [开发环境搭建](前端开发文档.md#开发环境搭建)
......@@ -23,9 +29,13 @@
* [开发环境搭建](后端开发文档.md#项目编译)
* [自定义任务插件文档](任务插件开发.md#任务插件开发)
* [接口文档](http://52.82.13.76:8888/easyscheduler/doc.html?language=zh_CN&lang=cn)
* FAQ
* [FAQ](EasyScheduler-FAQ.md)
* 系统版本升级文档
* [版本升级](升级文档.md)
* 历次版本发布内容
* [1.0.3 release](1.0.3-release.md)
* [1.0.2 release](1.0.2-release.md)
* [1.0.1 release](1.0.1-release.md)
* [1.0.0 release 正式开源]
......
## 快速上手
# 快速上手
* 管理员用户登录
>地址:192.168.xx.xx:8888 用户名密码:admin/esheduler123
......
# 使用手册
# 系统使用手册
## 快速上手
> 请参照[快速上手](快速上手.md)
## 操作指南
......@@ -17,11 +19,12 @@
</p>
> 项目首页其中包含任务状态统计,流程状态统计、流程定义统计、队列统计、命令统计
- 任务状态统计:是指在指定时间范围内,统计任务实例中的待运行、失败、运行中、完成、成功的个数
- 流程状态统计:是指在指定时间范围内,统计流程实例中的待运行、失败、运行中、完成、成功的个数
- 流程定义统计:是统计该用户创建的流程定义及管理员授予该用户的流程定义
- 队列统计: worker执行队列统计,待执行的任务和待杀掉的任务个数
- 命令统计: 执行命令个数统计
- 任务状态统计:是指在指定时间范围内,统计任务实例中的待运行、失败、运行中、完成、成功的个数
- 流程状态统计:是指在指定时间范围内,统计流程实例中的待运行、失败、运行中、完成、成功的个数
- 流程定义统计:是统计该用户创建的流程定义及管理员授予该用户的流程定义
- 队列统计: worker执行队列统计,待执行的任务和待杀掉的任务个数
- 命令统计: 执行命令个数统计
### 创建工作流定义
- 进入项目首页,点击“工作流定义”,进入流程定义列表页。
......@@ -102,11 +105,18 @@
<img src="https://analysys.github.io/easyscheduler_docs_cn/images/instance-detail.png" width="60%" />
</p>
> 击任务节点,点击“查看日志”,查看任务执行日志。
> 击任务节点,点击“查看日志”,查看任务执行日志。
<p align="center">
<img src="https://analysys.github.io/easyscheduler_docs_cn/images/task-log.png" width="60%" />
</p>
> 点击任务实例节点,点击**查看历史**,可以查看该流程实例运行的该任务实例列表
<p align="center">
<img src="https://analysys.github.io/EasyScheduler/zh_CN/images/task_history.png" width="60%" />
</p>
> 对工作流实例的操作:
......
......@@ -4,7 +4,7 @@
<parent>
<groupId>cn.analysys</groupId>
<artifactId>escheduler</artifactId>
<version>1.0.2-SNAPSHOT</version>
<version>1.0.3-SNAPSHOT</version>
</parent>
<artifactId>escheduler-alert</artifactId>
<packaging>jar</packaging>
......
......@@ -3,7 +3,7 @@
<parent>
<groupId>cn.analysys</groupId>
<artifactId>escheduler</artifactId>
<version>1.0.2-SNAPSHOT</version>
<version>1.0.3-SNAPSHOT</version>
</parent>
<artifactId>escheduler-api</artifactId>
<packaging>jar</packaging>
......
......@@ -4,7 +4,7 @@
<parent>
<artifactId>escheduler</artifactId>
<groupId>cn.analysys</groupId>
<version>1.0.2-SNAPSHOT</version>
<version>1.0.3-SNAPSHOT</version>
</parent>
<artifactId>escheduler-common</artifactId>
<name>escheduler-common</name>
......
......@@ -4,7 +4,7 @@
<parent>
<groupId>cn.analysys</groupId>
<artifactId>escheduler</artifactId>
<version>1.0.2-SNAPSHOT</version>
<version>1.0.3-SNAPSHOT</version>
</parent>
<artifactId>escheduler-dao</artifactId>
<name>escheduler-dao</name>
......
......@@ -4,7 +4,7 @@
<parent>
<artifactId>escheduler</artifactId>
<groupId>cn.analysys</groupId>
<version>1.0.2-SNAPSHOT</version>
<version>1.0.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -3,7 +3,7 @@
<parent>
<artifactId>escheduler</artifactId>
<groupId>cn.analysys</groupId>
<version>1.0.2-SNAPSHOT</version>
<version>1.0.3-SNAPSHOT</version>
</parent>
<artifactId>escheduler-server</artifactId>
<name>escheduler-server</name>
......
.hljs{display:block;overflow-x:auto;padding:0.5em;background:white;color:black}.hljs-comment,.hljs-quote,.hljs-variable{color:#008000}.hljs-keyword,.hljs-selector-tag,.hljs-built_in,.hljs-name,.hljs-tag{color:#00f}.hljs-string,.hljs-title,.hljs-section,.hljs-attribute,.hljs-literal,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-addition{color:#a31515}.hljs-deletion,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-meta{color:#2b91af}.hljs-doctag{color:#808080}.hljs-attr{color:#f00}.hljs-symbol,.hljs-bullet,.hljs-link{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}
.jtk-node{position:absolute}.jtk-group{position:absolute;overflow:visible}[jtk-group-content]{position:relative}.katavorio-clone-drag{pointer-events:none}.jtk-surface{overflow:hidden!important;position:relative;cursor:move;cursor:-moz-grab;cursor:-webkit-grab;touch-action:none}.jtk-surface-panning{cursor:-moz-grabbing;cursor:-webkit-grabbing;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jtk-surface-canvas{overflow:visible!important}.jtk-surface-droppable-node{touch-action:none}.jtk-surface-nopan{overflow:scroll!important;cursor:default}.jtk-surface-tile{border:none;outline:0;margin:0;-webkit-transition:opacity .3s ease .15s;-moz-transition:opacity .3s ease .15s;-o-transition:opacity .3s ease .15s;-ms-transition:opacity .3s ease .15s;transition:opacity .3s ease .15s}.jtk-lasso{border:2px solid #3177b8;background-color:#f5f5f5;opacity:.5;display:none;z-index:20000;position:absolute}.jtk-lasso-select-defeat *{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jtk-lasso-mask{position:fixed;z-index:20000;display:none;opacity:.5;background-color:#07234e;top:0;bottom:0;left:0;right:0}.jtk-surface-selected-element{border:2px dashed #f76258!important}.jtk-surface-pan{background-color:Azure;opacity:.4;text-align:center;cursor:pointer;z-index:2;-webkit-transition:background-color .15s ease-in;-moz-transition:background-color .15s ease-in;-o-transition:background-color .15s ease-in;transition:background-color .15s ease-in}.jtk-surface-pan-bottom,.jtk-surface-pan-top{width:100%;height:20px}.jtk-surface-pan-bottom:hover,.jtk-surface-pan-left:hover,.jtk-surface-pan-right:hover,.jtk-surface-pan-top:hover{opacity:.6;background-color:#3177b8;color:#fff;font-weight:700}.jtk-surface-pan-left,.jtk-surface-pan-right{width:20px;height:100%;line-height:40}.jtk-surface-pan-active,.jtk-surface-pan-active:hover{background-color:#f76258}.jtk-miniview{overflow:hidden!important;width:125px;height:125px;position:relative;background-color:#b2c9cd;border:1px solid #e2e6cd;border-radius:4px;opacity:.8}.jtk-miniview-panner{border:5px dotted #f5f5f5;opacity:.4;background-color:#4f6f7e;cursor:move;cursor:-moz-grab;cursor:-webkit-grab}.jtk-miniview-panning{cursor:-moz-grabbing;cursor:-webkit-grabbing}.jtk-miniview-element{background-color:#607a86;position:absolute}.jtk-miniview-group-element{background:0 0;border:2px solid #607a86}.jtk-miniview-collapse{color:#f5f5f5;position:absolute;font-size:18px;top:-1px;right:3px;cursor:pointer;font-weight:700}.jtk-miniview-collapse:before{content:"\2012"}.jtk-miniview-collapsed{background-color:#449ea6;border-radius:4px;height:22px;margin-right:0;padding:4px;width:21px}.jtk-miniview-collapsed .jtk-miniview-element,.jtk-miniview-collapsed .jtk-miniview-panner{visibility:hidden}.jtk-miniview-collapsed .jtk-miniview-collapse:before{content:"+"}.jtk-miniview-collapse:hover{color:#e4f013}.jtk-dialog-underlay{left:0;right:0;top:0;bottom:0;position:fixed;z-index:100000;opacity:.8;background-color:#ccc;display:none}.jtk-dialog-overlay{position:fixed;z-index:100001;display:none;background-color:#fff;font-family:"Open Sans",sans-serif;padding:7px;box-shadow:0 0 5px gray;overflow:hidden}.jtk-dialog-overlay-x{max-height:0;transition:max-height .5s ease-in;-moz-transition:max-height .5s ease-in;-ms-transition:max-height .5s ease-in;-o-transition:max-height .5s ease-in;-webkit-transition:max-height .5s ease-in}.jtk-dialog-overlay-y{max-width:0;transition:max-width .5s ease-in;-moz-transition:max-width .5s ease-in;-ms-transition:max-width .5s ease-in;-o-transition:max-width .5s ease-in;-webkit-transition:max-width .5s ease-in}.jtk-dialog-overlay-top{top:20px}.jtk-dialog-overlay-bottom{bottom:20px}.jtk-dialog-overlay-left{left:20px}.jtk-dialog-overlay-right{right:20px}.jtk-dialog-overlay-x.jtk-dialog-overlay-visible{max-height:1000px}.jtk-dialog-overlay-y.jtk-dialog-overlay-visible{max-width:1000px}.jtk-dialog-buttons{text-align:right;margin-top:5px}.jtk-dialog-button{border:none;cursor:pointer;margin-right:5px;min-width:56px;background-color:#fff;outline:1px solid #ccc}.jtk-dialog-button:hover{color:#fff;background-color:#234b5e}.jtk-dialog-title{text-align:left;font-size:14px;margin-bottom:9px}.jtk-dialog-content{font-size:12px;text-align:left;min-width:250px;margin:0 14px}.jtk-dialog-content ul{width:100%;padding-left:0}.jtk-dialog-content label{cursor:pointer;font-weight:inherit}.jtk-dialog-overlay input,.jtk-dialog-overlay textarea{background-color:#fff;border:1px solid #ccc;color:#333;font-size:14px;font-style:normal;outline:0;padding:6px 4px;margin-right:6px}.jtk-dialog-overlay input:focus,.jtk-dialog-overlay textarea:focus{background-color:#cbeae1;border:1px solid #83b8a8;color:#333;font-size:14px;font-style:normal;outline:0}.jtk-draw-skeleton{position:absolute;left:0;right:0;top:0;bottom:0;outline:2px solid #84acb3;opacity:.8}.jtk-draw-handle{position:absolute;width:7px;height:7px;background-color:#84acb3}.jtk-draw-handle-tl{left:0;top:0;cursor:nw-resize}.jtk-draw-handle-tr{right:0;top:0;cursor:ne-resize}.jtk-draw-handle-bl{left:0;bottom:0;cursor:sw-resize}.jtk-draw-handle-br{bottom:0;right:0;cursor:se-resize}.jtk-draw-drag{display:none;position:absolute;left:50%;top:50%;margin-left:-10px;margin-top:-10px;width:20px;height:20px;background-color:#84acb3;cursor:move}.jtk-drag-select-defeat *{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}
.cm-s-mdn-like.CodeMirror{color:#999;background-color:#fff}.cm-s-mdn-like .CodeMirror-line::selection,.cm-s-mdn-like .CodeMirror-line>span::selection,.cm-s-mdn-like .CodeMirror-line>span>span::selection,.cm-s-mdn-like div.CodeMirror-selected{background:#cfc}.cm-s-mdn-like .CodeMirror-line::-moz-selection,.cm-s-mdn-like .CodeMirror-line>span::-moz-selection,.cm-s-mdn-like .CodeMirror-line>span>span::-moz-selection{background:#cfc}.cm-s-mdn-like .CodeMirror-gutters{background:#f8f8f8;border-left:6px solid rgba(0,83,159,.65);color:#333}.cm-s-mdn-like .CodeMirror-linenumber{color:#aaa;padding-left:8px}.cm-s-mdn-like .CodeMirror-cursor{border-left:2px solid #222}.cm-s-mdn-like .cm-keyword{color:#6262FF}.cm-s-mdn-like .cm-atom{color:#F90}.cm-s-mdn-like .cm-number{color:#ca7841}.cm-s-mdn-like .cm-def{color:#8DA6CE}.cm-s-mdn-like span.cm-tag,.cm-s-mdn-like span.cm-variable-2{color:#690}.cm-s-mdn-like .cm-variable,.cm-s-mdn-like span.cm-def,.cm-s-mdn-like span.cm-variable-3{color:#07a}.cm-s-mdn-like .cm-property{color:#905}.cm-s-mdn-like .cm-qualifier{color:#690}.cm-s-mdn-like .cm-operator{color:#cda869}.cm-s-mdn-like .cm-comment{color:#777;font-weight:400}.cm-s-mdn-like .cm-string{color:#07a;font-style:italic}.cm-s-mdn-like .cm-string-2{color:#bd6b18}.cm-s-mdn-like .cm-meta{color:#000}.cm-s-mdn-like .cm-builtin{color:#9B7536}.cm-s-mdn-like .cm-tag{color:#997643}.cm-s-mdn-like .cm-attribute{color:#d6bb6d}.cm-s-mdn-like .cm-header{color:#FF6400}.cm-s-mdn-like .cm-hr{color:#AEAEAE}.cm-s-mdn-like .cm-link{color:#ad9361;font-style:italic;text-decoration:none}.cm-s-mdn-like .cm-error{border-bottom:1px solid red}div.cm-s-mdn-like .CodeMirror-activeline-background{background:#efefff}div.cm-s-mdn-like span.CodeMirror-matchingbracket{outline:grey solid 1px;color:inherit}.cm-s-mdn-like.CodeMirror{background-image:url(/~/codemirror/5.20.0/theme/mdn-like.min.css)}
.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}
此差异已折叠。
此差异已折叠。
此差异已折叠。
Not found
\ No newline at end of file
此差异已折叠。
此差异已折叠。
<!doctype html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta http-equiv="Cache-Control" content="no-siteapp"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-title" content="标题"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><meta name="format-detection" content="telphone=no, email=no"><meta name="screen-orientation" content="portrait"><meta name="x5-orientation" content="portrait"><meta name="theme-color" content="#4a8dee"><meta name="msapplication-navbutton-color" content="#4a8dee"><meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><link rel="shortcut icon" href="/images/favicon.ico"><link href="/combo/1.0.0/base.css?v1.0.0.1" rel="stylesheet"><link href="/combo/1.0.0/3rd.css?v1.0.0.1" rel="stylesheet"><!--[if lt IE 9]>
<script src="/combo/1.0.0/es5.js"></script>
<![endif]--><script>let NODE_ENV = 'true'</script><title>EasyScheduler</title><link href="/css/common.8ba9af7.css" rel="stylesheet"><link href="/css/home/index.b444b91.css" rel="stylesheet"></head><body><div id="app"></div><div id="contextmenu" class="contextmenu"></div><div class="global-loading"><div class="svg-box"><svg class="lds-gears" width="54px" height="54px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" style="background: none;"><g transform="translate(50 50)"><g transform="translate(-19 -19) scale(0.6)"><g transform="rotate(107.866)"><animateTransform attributeName="transform" type="rotate" values="0;360" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite"></animateTransform><path
d="M37.3496987939662 -7 L47.3496987939662 -7 L47.3496987939662 7 L37.3496987939662 7 A38 38 0 0 1 31.359972760794346 21.46047782418268 L31.359972760794346 21.46047782418268 L38.431040572659825 28.531545636048154 L28.531545636048154 38.431040572659825 L21.46047782418268 31.359972760794346 A38 38 0 0 1 7.0000000000000036 37.3496987939662 L7.0000000000000036 37.3496987939662 L7.000000000000004 47.3496987939662 L-6.999999999999999 47.3496987939662 L-7 37.3496987939662 A38 38 0 0 1 -21.46047782418268 31.35997276079435 L-21.46047782418268 31.35997276079435 L-28.531545636048154 38.431040572659825 L-38.43104057265982 28.531545636048158 L-31.359972760794346 21.460477824182682 A38 38 0 0 1 -37.3496987939662 7.000000000000007 L-37.3496987939662 7.000000000000007 L-47.3496987939662 7.000000000000008 L-47.3496987939662 -6.9999999999999964 L-37.3496987939662 -6.999999999999997 A38 38 0 0 1 -31.35997276079435 -21.460477824182675 L-31.35997276079435 -21.460477824182675 L-38.431040572659825 -28.531545636048147 L-28.53154563604818 -38.4310405726598 L-21.4604778241827 -31.35997276079433 A38 38 0 0 1 -6.999999999999992 -37.3496987939662 L-6.999999999999992 -37.3496987939662 L-6.999999999999994 -47.3496987939662 L6.999999999999977 -47.3496987939662 L6.999999999999979 -37.3496987939662 A38 38 0 0 1 21.460477824182686 -31.359972760794342 L21.460477824182686 -31.359972760794342 L28.531545636048158 -38.43104057265982 L38.4310405726598 -28.53154563604818 L31.35997276079433 -21.4604778241827 A38 38 0 0 1 37.3496987939662 -6.999999999999995 M0 -23A23 23 0 1 0 0 23 A23 23 0 1 0 0 -23"
fill="#0097e0"></path></g></g><g transform="translate(19 19) scale(0.6)"><g transform="rotate(229.634)"><animateTransform attributeName="transform" type="rotate" values="360;0" keyTimes="0;1" dur="1s" begin="-0.0625s" repeatCount="indefinite"></animateTransform><path
d="M37.3496987939662 -7 L47.3496987939662 -7 L47.3496987939662 7 L37.3496987939662 7 A38 38 0 0 1 31.359972760794346 21.46047782418268 L31.359972760794346 21.46047782418268 L38.431040572659825 28.531545636048154 L28.531545636048154 38.431040572659825 L21.46047782418268 31.359972760794346 A38 38 0 0 1 7.0000000000000036 37.3496987939662 L7.0000000000000036 37.3496987939662 L7.000000000000004 47.3496987939662 L-6.999999999999999 47.3496987939662 L-7 37.3496987939662 A38 38 0 0 1 -21.46047782418268 31.35997276079435 L-21.46047782418268 31.35997276079435 L-28.531545636048154 38.431040572659825 L-38.43104057265982 28.531545636048158 L-31.359972760794346 21.460477824182682 A38 38 0 0 1 -37.3496987939662 7.000000000000007 L-37.3496987939662 7.000000000000007 L-47.3496987939662 7.000000000000008 L-47.3496987939662 -6.9999999999999964 L-37.3496987939662 -6.999999999999997 A38 38 0 0 1 -31.35997276079435 -21.460477824182675 L-31.35997276079435 -21.460477824182675 L-38.431040572659825 -28.531545636048147 L-28.53154563604818 -38.4310405726598 L-21.4604778241827 -31.35997276079433 A38 38 0 0 1 -6.999999999999992 -37.3496987939662 L-6.999999999999992 -37.3496987939662 L-6.999999999999994 -47.3496987939662 L6.999999999999977 -47.3496987939662 L6.999999999999979 -37.3496987939662 A38 38 0 0 1 21.460477824182686 -31.359972760794342 L21.460477824182686 -31.359972760794342 L28.531545636048158 -38.43104057265982 L38.4310405726598 -28.53154563604818 L31.35997276079433 -21.4604778241827 A38 38 0 0 1 37.3496987939662 -6.999999999999995 M0 -23A23 23 0 1 0 0 23 A23 23 0 1 0 0 -23"
fill="#7f8b95"></path></g></g></g></svg> <span class="sp1">Loading ...</span></div></div><script src="/combo/1.0.0/3rd.js?v1.0.0.1"></script><script src="/js/common.3af51f0.js"></script><script src="/js/home/index.574a699.js"></script></body></html>
\ No newline at end of file
webpackJsonp([47],{221:function(e,t,o){"use strict";t.__esModule=!0;var s=i(o(36)),n=i(o(25));function i(e){return e&&e.__esModule?e:{default:e}}t.default={name:"login-model",data:function(){return{spinnerLoading:!1,userName:"",userPassword:"",isUserName:!1,isUserPassword:!1,userNameText:"",userPasswordText:""}},props:{},methods:{_ok:function(){var e=this;this._verification()&&(this.spinnerLoading=!0,this._gLogin().then(function(t){setTimeout(function(){e.spinnerLoading=!1,"admin"===e.userName?window.location.href="/#/security/tenant":window.location.href="/#/home"},1e3)}).catch(function(t){e.userPasswordText=t.msg,e.isUserPassword=!0,e.spinnerLoading=!1}))},_verification:function(){var e=!0;return this.userName||(this.userNameText=""+s.default.$t("Please enter user name"),this.isUserName=!0,e=!1),this.userPassword||(this.userPasswordText=""+s.default.$t("Please enter your password"),this.isUserPassword=!0,e=!1),e},_gLogin:function(){var e=this;return new Promise(function(t,o){n.default.post("login",{userName:e.userName,userPassword:e.userPassword},function(e){t(e)}).catch(function(e){o(e)})})}},watch:{userName:function(){this.isUserName=!1},userPassword:function(){this.isUserPassword=!1}},created:function(){},mounted:function(){}}},24:function(e,t){e.exports=Vue},30:function(e,t){e.exports=_},598:function(e,t,o){"use strict";var s=l(o(71)),n=l(o(24)),i=l(o(599)),r=l(o(36));o(219);var a=l(o(220));function l(e){return e&&e.__esModule?e:{default:e}}o(604),n.default.use(a.default),n.default.config.devtools=!0,n.default.config.productionTip=!0,n.default.config.silent=!0,new n.default({el:"#app",render:function(e){return e(i.default)},mounted:function(){},methods:{initApp:function(){var e=s.default.fn.tooltip.noConflict();s.default.fn.tooltip=e,(0,s.default)("body").tooltip({selector:'[data-toggle="tooltip"]',trigger:"hover"}),r.default.init()}},created:function(){this.initApp()}})},599:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=o(221),n=o.n(s);for(var i in s)"default"!==i&&function(e){o.d(t,e,function(){return s[e]})}(i);var r=o(603);var a=function(e){o(600)},l=o(29)(n.a,r.a,!1,a,null,null);t.default=l.exports},600:function(e,t,o){var s=o(601);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);o(35)("44eee55a",s,!0,{})},601:function(e,t,o){var s=o(125);(e.exports=o(34)(!1)).push([e.i,".login-model{width:400px;min-height:260px;background:#fff;border-radius:3px;position:fixed;left:50%;top:50%;margin-left:-200px;margin-top:-200px;z-index:1;box-shadow:0 2px 25px 0 rgba(0,0,0,.3)}.login-model .text-1{padding-top:30px;margin-bottom:-6px}.login-model .text-1 a{width:280px;height:60px;display:block;background:url("+s(o(602))+");margin:0 auto}.login-model .from-model{padding:30px 20px}.login-model .from-model .list{margin-bottom:24px}.login-model .from-model .list>label{font-size:14px;display:block;height:24px;line-height:24px;font-weight:400;color:#333}.login-model .from-model .list>.error{font-size:12px;color:red;padding-top:6px}.login-model .from-model .list:last-child{margin-bottom:6px}.login-model .ctr{width:400px;text-align:center;position:absolute;left:0;bottom:-80px;color:#fff}",""])},602:function(e,t,o){e.exports=o.p+"images/login-logo.png?ddbe8d0df16b034ed1d2e2142c4c4233"},603:function(e,t,o){"use strict";var s={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"login-model"},[e._m(0),e._v(" "),o("div",{staticClass:"from-model"},[o("div",{staticClass:"list"},[o("label",[e._v(e._s(e.$t("User Name")))]),e._v(" "),o("div",[o("x-input",{attrs:{size:"large",type:"text",placeholder:e.$t("Please enter user name"),maxlength:"20"},on:{"on-enterkey":e._ok},model:{value:e.userName,callback:function(t){e.userName=t},expression:"userName"}})],1),e._v(" "),e.isUserPassword?o("p",{staticClass:"error"},[e._v("\n "+e._s(e.userNameText)+"\n ")]):e._e()]),e._v(" "),o("div",{staticClass:"list"},[o("label",[e._v(e._s(e.$t("Password")))]),e._v(" "),o("div",[o("x-input",{attrs:{type:"password",size:"large",placeholder:e.$t("Please enter your password"),maxlength:"20"},on:{"on-enterkey":e._ok},model:{value:e.userPassword,callback:function(t){e.userPassword=t},expression:"userPassword"}})],1),e._v(" "),e.isUserPassword?o("p",{staticClass:"error"},[e._v("\n "+e._s(e.userPasswordText)+"\n ")]):e._e()]),e._v(" "),o("div",{staticClass:"list",staticStyle:{"margin-top":"10px"}},[o("x-button",{attrs:{type:"primary",shape:"circle",size:"large",loading:e.spinnerLoading,long:""},on:{click:e._ok}},[e._v(e._s(e.spinnerLoading?"Loading...":" "+e.$t("Login")+" ")+" ")])],1)]),e._v(" "),o("div",{staticClass:"ctr"},[e._v("Copyright © 2019 Analysys Inc.")])])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"text-1"},[t("a",{attrs:{href:"javascript:"}})])}]};t.a=s},604:function(e,t){},71:function(e,t){e.exports=$}},[598]);
//# sourceMappingURL=index.97eaebb.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///src/js/conf/login/App.vue","webpack:///external \"Vue\"","webpack:///external \"_\"","webpack:///./src/js/conf/login/index.js","webpack:///./src/js/conf/login/App.vue","webpack:///./src/js/conf/login/App.vue?bb53","webpack:///./src/js/conf/login/App.vue?3bd0","webpack:///./src/js/conf/login/img/login-logo.png","webpack:///./src/js/conf/login/App.vue?7211","webpack:///external \"$\""],"names":["__webpack_require__","name","data","spinnerLoading","userName","userPassword","isUserName","isUserPassword","userNameText","userPasswordText","props","methods","_ok","_this","this","_verification","_gLogin","then","res","setTimeout","window","location","href","catch","e","msg","flag","_i18n2","default","$t","_this2","Promise","resolve","reject","_io2","post","watch","created","mounted","module","exports","Vue","_","use","ans","config","devtools","productionTip","silent","el","render","h","App","initApp","bootstrapTooltip","$","fn","tooltip","noConflict","_jquery2","selector","trigger","i18n","init","Object","defineProperty","__webpack_exports__","value","__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_App_vue__","__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_App_vue___default","n","__WEBPACK_IMPORT_KEY__","key","d","__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_d0ee4864_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_App_vue__","__vue_styles__","ssrContext","Component","normalizeComponent","a","content","i","locals","escape","push","p","esExports","_vm","_h","$createElement","_c","_self","staticClass","_m","_v","_s","attrs","size","type","placeholder","maxlength","on","on-enterkey","model","callback","$$v","expression","_e","staticStyle","margin-top","shape","loading","long","click","staticRenderFns"],"mappings":"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","file":"js/login/index.97eaebb.js","sourcesContent":["<template>\n <div class=\"login-model\">\n <div class=\"text-1\">\n <a href=\"javascript:\"></a>\n </div>\n <div class=\"from-model\">\n <div class=\"list\">\n <label>{{$t('User Name')}}</label>\n <div>\n <x-input\n size=\"large\"\n type=\"text\"\n v-model=\"userName\"\n :placeholder=\"$t('Please enter user name')\"\n maxlength=\"20\"\n @on-enterkey=\"_ok\">\n </x-input>\n </div>\n <p class=\"error\" v-if=\"isUserPassword\">\n {{userNameText}}\n </p>\n </div>\n <div class=\"list\">\n <label>{{$t('Password')}}</label>\n <div>\n <x-input\n type=\"password\"\n size=\"large\"\n v-model=\"userPassword\"\n :placeholder=\"$t('Please enter your password')\"\n maxlength=\"20\"\n @on-enterkey=\"_ok\">\n </x-input>\n </div>\n <p class=\"error\" v-if=\"isUserPassword\">\n {{userPasswordText}}\n </p>\n </div>\n <div class=\"list\" style=\"margin-top: 10px;\">\n <x-button type=\"primary\" shape=\"circle\" size=\"large\" :loading=\"spinnerLoading\" long @click=\"_ok\">{{spinnerLoading ? 'Loading...' : ` ${$t('Login')} `}} </x-button>\n </div>\n </div>\n <div class=\"ctr\">Copyright © 2019 Analysys Inc.</div>\n </div>\n</template>\n<script>\n import i18n from '@/module/i18n'\n import io from '@/module/io'\n\n export default {\n name: 'login-model',\n data () {\n return {\n spinnerLoading: false,\n userName: '',\n userPassword: '',\n isUserName: false,\n isUserPassword: false,\n userNameText: '',\n userPasswordText: ''\n }\n },\n props: {},\n methods: {\n _ok () {\n if (this._verification()) {\n this.spinnerLoading = true\n this._gLogin().then(res => {\n setTimeout(() => {\n this.spinnerLoading = false\n if (this.userName === 'admin') {\n window.location.href = '/#/security/tenant'\n } else {\n window.location.href = '/#/home'\n }\n }, 1000)\n }).catch(e => {\n this.userPasswordText = e.msg\n this.isUserPassword = true\n this.spinnerLoading = false\n })\n }\n },\n _verification () {\n let flag = true\n if (!this.userName) {\n this.userNameText = `${i18n.$t('Please enter user name')}`\n this.isUserName = true\n flag = false\n }\n if (!this.userPassword) {\n this.userPasswordText = `${i18n.$t('Please enter your password')}`\n this.isUserPassword = true\n flag = false\n }\n return flag\n },\n _gLogin () {\n return new Promise((resolve, reject) => {\n io.post(`login`, {\n userName: this.userName,\n userPassword: this.userPassword\n }, res => {\n resolve(res)\n }).catch(e => {\n reject(e)\n })\n })\n }\n },\n watch: {\n userName () {\n this.isUserName = false\n },\n userPassword () {\n this.isUserPassword = false\n }\n },\n created () {\n },\n mounted () {\n }\n }\n</script>\n\n<style lang=\"scss\" rel=\"stylesheet/scss\">\n .login-model {\n width: 400px;\n min-height: 260px;\n background: #fff;\n border-radius: 3px;\n position: fixed;\n left:50%;\n top: 50%;\n margin-left: -200px;\n margin-top: -200px;\n z-index: 1;\n box-shadow: 0px 2px 25px 0px rgba(0, 0, 0, .3);\n .text-1 {\n padding-top: 30px;\n margin-bottom: -6px;\n a {\n width: 280px;\n height: 60px;\n display: block;\n background: url(\"img/login-logo.png\");\n margin: 0 auto;\n }\n }\n .from-model {\n padding: 30px 20px;\n .list {\n margin-bottom: 24px;\n >label {\n font-size: 14px;\n display: block;\n height: 24px;\n line-height: 24px;\n font-weight: normal;\n color: #333;\n }\n >.error {\n font-size: 12px;\n color: #ff0000;\n padding-top: 6px;\n }\n &:last-child {\n margin-bottom: 6px;\n }\n }\n }\n .ctr {\n width: 400px;\n text-align: center;\n position: absolute;\n left: 0;\n bottom: -80px;\n color: #fff;\n }\n }\n</style>\n\n\n\n// WEBPACK FOOTER //\n// src/js/conf/login/App.vue","module.exports = Vue;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"Vue\"\n// module id = 24\n// module chunks = 46 47","module.exports = _;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"_\"\n// module id = 30\n// module chunks = 46 47","/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// The Vue build version to load with the `import` command\n// (runtime-only or standalone) has been set in webpack.base.conf with an alias.\nimport $ from 'jquery'\nimport Vue from 'vue'\nimport App from './App'\nimport i18n from '@/module/i18n'\nimport '~/@analysys/ans-ui/lib/ans-ui.min.css'\nimport ans from '~/@analysys/ans-ui/lib/ans-ui.min'\n\nimport 'sass/conf/login/index.scss'\n\nVue.use(ans)\n\nVue.config.devtools = true\nVue.config.productionTip = true\nVue.config.silent = true\n\n/* eslint-disable no-new */\nnew Vue({\n el: '#app',\n render: h => h(App),\n mounted () {\n },\n methods: {\n initApp () {\n let bootstrapTooltip = $.fn.tooltip.noConflict()\n $.fn.tooltip = bootstrapTooltip\n $('body').tooltip({\n selector: '[data-toggle=\"tooltip\"]',\n trigger: 'hover'\n })\n // Component internationalization\n i18n.init()\n }\n },\n created () {\n this.initApp()\n }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/conf/login/index.js","function injectStyle (ssrContext) {\n require(\"!!vue-loader/node_modules/vue-style-loader!css-loader?minimize!../../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-d0ee4864\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!sass-loader!../../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./App.vue\")\n}\nvar normalizeComponent = require(\"!../../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-d0ee4864\\\",\\\"hasScoped\\\":false,\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../../node_modules/vue-loader/lib/selector?type=template&index=0!./App.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/conf/login/App.vue\n// module id = 599\n// module chunks = 47","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../node_modules/css-loader/index.js?minimize!../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-d0ee4864\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../../../node_modules/sass-loader/lib/loader.js!../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./App.vue\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = require(\"!../../../../node_modules/vue-loader/node_modules/vue-style-loader/lib/addStylesClient.js\")(\"44eee55a\", content, true, {});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/node_modules/vue-style-loader!./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-d0ee4864\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/js/conf/login/App.vue\n// module id = 600\n// module chunks = 47","var escape = require(\"../../../../node_modules/css-loader/lib/url/escape.js\");\nexports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".login-model{width:400px;min-height:260px;background:#fff;border-radius:3px;position:fixed;left:50%;top:50%;margin-left:-200px;margin-top:-200px;z-index:1;box-shadow:0 2px 25px 0 rgba(0,0,0,.3)}.login-model .text-1{padding-top:30px;margin-bottom:-6px}.login-model .text-1 a{width:280px;height:60px;display:block;background:url(\" + escape(require(\"./img/login-logo.png\")) + \");margin:0 auto}.login-model .from-model{padding:30px 20px}.login-model .from-model .list{margin-bottom:24px}.login-model .from-model .list>label{font-size:14px;display:block;height:24px;line-height:24px;font-weight:400;color:#333}.login-model .from-model .list>.error{font-size:12px;color:red;padding-top:6px}.login-model .from-model .list:last-child{margin-bottom:6px}.login-model .ctr{width:400px;text-align:center;position:absolute;left:0;bottom:-80px;color:#fff}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-d0ee4864\",\"scoped\":false,\"hasInlineConfig\":false}!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/js/conf/login/App.vue\n// module id = 601\n// module chunks = 47","module.exports = __webpack_public_path__ + \"images/login-logo.png?ddbe8d0df16b034ed1d2e2142c4c4233\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/conf/login/img/login-logo.png\n// module id = 602\n// module chunks = 47","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"login-model\"},[_vm._m(0),_vm._v(\" \"),_c('div',{staticClass:\"from-model\"},[_c('div',{staticClass:\"list\"},[_c('label',[_vm._v(_vm._s(_vm.$t('User Name')))]),_vm._v(\" \"),_c('div',[_c('x-input',{attrs:{\"size\":\"large\",\"type\":\"text\",\"placeholder\":_vm.$t('Please enter user name'),\"maxlength\":\"20\"},on:{\"on-enterkey\":_vm._ok},model:{value:(_vm.userName),callback:function ($$v) {_vm.userName=$$v},expression:\"userName\"}})],1),_vm._v(\" \"),(_vm.isUserPassword)?_c('p',{staticClass:\"error\"},[_vm._v(\"\\n \"+_vm._s(_vm.userNameText)+\"\\n \")]):_vm._e()]),_vm._v(\" \"),_c('div',{staticClass:\"list\"},[_c('label',[_vm._v(_vm._s(_vm.$t('Password')))]),_vm._v(\" \"),_c('div',[_c('x-input',{attrs:{\"type\":\"password\",\"size\":\"large\",\"placeholder\":_vm.$t('Please enter your password'),\"maxlength\":\"20\"},on:{\"on-enterkey\":_vm._ok},model:{value:(_vm.userPassword),callback:function ($$v) {_vm.userPassword=$$v},expression:\"userPassword\"}})],1),_vm._v(\" \"),(_vm.isUserPassword)?_c('p',{staticClass:\"error\"},[_vm._v(\"\\n \"+_vm._s(_vm.userPasswordText)+\"\\n \")]):_vm._e()]),_vm._v(\" \"),_c('div',{staticClass:\"list\",staticStyle:{\"margin-top\":\"10px\"}},[_c('x-button',{attrs:{\"type\":\"primary\",\"shape\":\"circle\",\"size\":\"large\",\"loading\":_vm.spinnerLoading,\"long\":\"\"},on:{\"click\":_vm._ok}},[_vm._v(_vm._s(_vm.spinnerLoading ? 'Loading...' : (\" \" + (_vm.$t('Login')) + \" \"))+\" \")])],1)]),_vm._v(\" \"),_c('div',{staticClass:\"ctr\"},[_vm._v(\"Copyright © 2019 Analysys Inc.\")])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"text-1\"},[_c('a',{attrs:{\"href\":\"javascript:\"}})])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-d0ee4864\",\"hasScoped\":false,\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/js/conf/login/App.vue\n// module id = 603\n// module chunks = 47","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 71\n// module chunks = 46 47"],"sourceRoot":""}
\ No newline at end of file
# ana-charts
echarts 扩展
## 安装
```
npm i @analysys/ana-charts
```
## 特性
- 统一的数据结构
- 支持 ECharts 原生操作
## 快速开始
### 全量导入
```html
<template>
<div>
<div id="chart" style="height:500px"></div>
</div>
</template>
<script>
import Chart from '@analysys/ana-charts'
export default {
mounted () {
Chart.line('#chart', [
{ key: 'Monday', value: 1 },
{ key: 'Tuesday', value: 2 },
{ key: 'Wednesday', value: 3 }
])
}
}
</script>
```
### 按需导入
```html
<template>
<div>
<div id="chart" style="height:500px"></div>
</div>
</template>
<script>
import { Line } from '@analysys/ana-charts'
export default {
mounted () {
Line.init('#chart', [
{ key: 'Monday', value: 1 },
{ key: 'Tuesday', value: 2 },
{ key: 'Wednesday', value: 3 }
])
}
}
</script>
```
## APIs
### 一般用法
``` js
const myChart = Chart.line(el, data, options)
// const myChart = Chart.bar(el, data, options)
// const myChart = Chart.pie(el, data, options)
// const myChart = Chart.radar(el, data, options)
// const myChart = Chart.funnel(el, data, options)
// const myChart = Chart.scatter(el, data, options)
// 刷新数据
myChart.setData(data)
```
### 注入属性
``` js
// 以 line 折线图为例,bar、funnel、pie、scatter 均可使用
Chart.line(el, data, {
insertSeries: [
{
// index 可选 `all`,`start`,`end`,也可指定需要被注入的索引数组,如 [0, 2, 4]
index: 'all',
// 以下属性会被注入到指定的序列中
areaStyle: {}
}
]
})
```
### ECharts 对象
> 初始化图表后返回的对象上保存了 ECharts 对象的引用,可以通过该属性来设置图表配置和监听事件
``` js
const myChart = Chart.line(el, data, options)
// 设置可配置项
myChart.echart.setOption({
// 与 ECharts 参考文档用法一致
})
```
### 折线图
#### 基本用法
``` js
Chart.line('#chart', [
{ key: 'Monday', value: 1 },
{ key: 'Tuesday', value: 2 },
{ key: 'Wednesday', value: 3 },
...
])
```
#### 多条折线图
``` js
Chart.line('#chart', [
{ typeName: 'apple', key: 'Monday', value: 1 },
{ typeName: 'apple', key: 'Tuesday', value: 2 },
{ typeName: 'apple', key: 'Wednesday', value: 3 },
{ typeName: 'pear', key: 'Monday', value: 11 },
{ typeName: 'pear', key: 'Tuesday', value: 21 },
{ typeName: 'pear', key: 'Wednesday', value: 31 },
{ typeName: 'banana', key: 'Monday', value: 31 },
{ typeName: 'banana', key: 'Tuesday', value: 32 },
{ typeName: 'banana', key: 'Wednesday', value: 33 },
...
])
```
#### options 可配置参数
| 属性 | 说明 | required | 类型 | 默认值 |
| :----| :------| :--------| :---:| :------|
| title | 图表标题 | - | String | '单条折线图' 或 '多条折线图' |
| keyMap | 数据列表的属性字典 | - | Object | 详见后续属性 |
| keyMap.xAxisKey | x 轴对应的属性名称 | - | String | 'key' |
| keyMap.dataKey | 数据值对应的属性名称 | - | String | 'value' |
| keyMap.legendKey | 图例对应的属性名称 | - | String | 'typeName' |
| reverseAxis | 是否为横向图 | - | Boolean | false |
### 柱状图
#### 基本用法
``` js
Chart.bar('#chart', [
{ key: 'Monday', value: 1 },
{ key: 'Tuesday', value: 2 },
{ key: 'Wednesday', value: 3 },
...
])
```
#### 多条柱状图
``` js
Chart.bar('#chart', [
{ typeName: 'apple', key: 'Monday', value: 1 },
{ typeName: 'apple', key: 'Tuesday', value: 2 },
{ typeName: 'apple', key: 'Wednesday', value: 3 },
{ typeName: 'pear', key: 'Monday', value: 11 },
{ typeName: 'pear', key: 'Tuesday', value: 21 },
{ typeName: 'pear', key: 'Wednesday', value: 31 },
{ typeName: 'banana', key: 'Monday', value: 31 },
{ typeName: 'banana', key: 'Tuesday', value: 32 },
{ typeName: 'banana', key: 'Wednesday', value: 33 },
...
])
```
#### 折柱混合图
``` js
Chart.bar('#chart', [
{ typeName: 'apple', key: 'Monday', value: 1 },
{ typeName: 'apple', key: 'Tuesday', value: 2 },
{ typeName: 'apple', key: 'Wednesday', value: 3 },
{ typeName: 'pear', key: 'Monday', value: 11 },
{ typeName: 'pear', key: 'Tuesday', value: 21 },
{ typeName: 'pear', key: 'Wednesday', value: 31 },
{ typeName: 'banana', key: 'Monday', value: 31 },
{ typeName: 'banana', key: 'Tuesday', value: 32 },
{ typeName: 'banana', key: 'Wednesday', value: 33 },
...
], {
lineTypes: ['banana']
})
```
#### 时间轴柱状图
``` js
Chart.bar('#chart', [
{ timeline: 2015, typeName: 'apple', key: 'Monday', value: 1 },
{ timeline: 2015, typeName: 'apple', key: 'Tuesday', value: 2 },
{ timeline: 2015, typeName: 'apple', key: 'Wednesday', value: 3 },
{ timeline: 2015, typeName: 'pear', key: 'Monday', value: 11 },
{ timeline: 2015, typeName: 'pear', key: 'Tuesday', value: 21 },
{ timeline: 2015, typeName: 'pear', key: 'Wednesday', value: 31 },
{ timeline: 2015, typeName: 'banana', key: 'Monday', value: 31 },
{ timeline: 2015, typeName: 'banana', key: 'Tuesday', value: 32 },
{ timeline: 2015, typeName: 'banana', key: 'Wednesday', value: 33 },
{ timeline: 2016, typeName: 'apple', key: 'Monday', value: 1 },
{ timeline: 2016, typeName: 'apple', key: 'Tuesday', value: 2 },
{ timeline: 2016, typeName: 'apple', key: 'Wednesday', value: 3 },
{ timeline: 2016, typeName: 'pear', key: 'Monday', value: 11 },
{ timeline: 2016, typeName: 'pear', key: 'Tuesday', value: 21 },
{ timeline: 2016, typeName: 'pear', key: 'Wednesday', value: 31 },
{ timeline: 2016, typeName: 'banana', key: 'Monday', value: 31 },
{ timeline: 2016, typeName: 'banana', key: 'Tuesday', value: 32 },
{ timeline: 2016, typeName: 'banana', key: 'Wednesday', value: 33 },
...
], {
// 可以使用 $timeline 进行占位,该字符串将替换为 timeline 属性的值
title: '$timeline时间轴柱状图'
})
```
#### options 可配置参数
| 属性 | 说明 | required | 类型 | 默认值 |
| :----| :------| :--------| :---:| :------|
| title | 图表标题 | - | String | '单条柱状图' 或 '多条柱状图' |
| keyMap | 数据列表的属性字典 | - | Object | 详见后续属性 |
| keyMap.xAxisKey | x 轴对应的属性名称 | - | String | 'key' |
| keyMap.dataKey | 数据值对应的属性名称 | - | String | 'value' |
| keyMap.legendKey | 图例对应的属性名称 | - | String | 'typeName' |
| keyMap.timelineKey | 时间轴对应的属性名称 | - | String | 'timeline' |
| reverseAxis | 是否为横向图 | - | Boolean | false |
| stack | 是否为堆叠图 | - | Boolean | false |
| lineTypes | 折柱混合图中折线数据对应的图例名称数组 | - | Array | - |
| yAxis | 自定义的 y 轴,请参考 echarts 配置 | - | Object | - |
### 饼状图
#### 基本用法
``` js
Chart.pie('#chart', [
{ key: 'Monday', value: 1 },
{ key: 'Tuesday', value: 2 },
{ key: 'Wednesday', value: 3 },
...
])
```
#### 环形图
``` js
Chart.pie('#chart', [
{ key: 'Monday', value: 1 },
{ key: 'Tuesday', value: 2 },
{ key: 'Wednesday', value: 3 },
...
], {
ring: true
})
```
#### options 可配置参数
| 属性 | 说明 | required | 类型 | 默认值 |
| :----| :------| :--------| :---:| :------|
| title | 图表标题 | - | String | '饼图' |
| keyMap | 数据列表的属性字典 | - | Object | 详见后续属性 |
| keyMap.textKey | 文本对应的属性名称 | - | String | 'key' |
| keyMap.dataKey | 数据值对应的属性名称 | - | String | 'value' |
| ring | 是否环形图 | - | Boolean | false |
### 雷达图
#### 基本用法
``` js
Chart.radar('#chart', [
{ typeName: 'apple', key: 'Monday', value: 1 },
{ typeName: 'apple', key: 'Tuesday', value: 2 },
{ typeName: 'apple', key: 'Wednesday', value: 3 },
{ typeName: 'pear', key: 'Monday', value: 11 },
{ typeName: 'pear', key: 'Tuesday', value: 21 },
{ typeName: 'pear', key: 'Wednesday', value: 31 },
{ typeName: 'banana', key: 'Monday', value: 31 },
{ typeName: 'banana', key: 'Tuesday', value: 32 },
{ typeName: 'banana', key: 'Wednesday', value: 33 },
...
])
```
#### options 可配置参数
| 属性 | 说明 | required | 类型 | 默认值 |
| :----| :------| :--------| :---:| :------|
| title | 图表标题 | - | String | '雷达图' |
| keyMap | 数据列表的属性字典 | - | Object | 详见后续属性 |
| keyMap.textKey | 指标对应的属性名称 | - | String | 'key' |
| keyMap.dataKey | 数据值对应的属性名称 | - | String | 'value' |
| keyMap.legendKey | 图例对应的属性名称 | - | String | 'typeName' |
### 漏斗图
#### 基本用法
``` js
Chart.funnel('#chart', [
{ key: 'Monday', value: 1 },
{ key: 'Tuesday', value: 2 },
{ key: 'Wednesday', value: 3 },
...
])
```
#### options 可配置参数
| 属性 | 说明 | required | 类型 | 默认值 |
| :----| :------| :--------| :---:| :------|
| title | 图表标题 | - | String | '漏斗图' |
| keyMap | 数据列表的属性字典 | - | Object | 详见后续属性 |
| keyMap.textKey | 文本对应的属性名称 | - | String | 'key' |
| keyMap.dataKey | 数据值对应的属性名称 | - | String | 'value' |
### 气泡图
#### 基本用法
``` js
Chart.scatter('#chart', [
{ typeName: 'apple', text: 'Monday', x: 1, y: 1, size: 1 },
{ typeName: 'apple', text: 'Tuesday', x: 2, y: 2, size: 2 },
{ typeName: 'apple', text: 'Wednesday', x: 3, y: 3, size: 3 },
{ typeName: 'pear', text: 'Monday', x: 11, y: 11, size: 11 },
{ typeName: 'pear', text: 'Tuesday', x: 21, y: 21, size: 21 },
{ typeName: 'pear', text: 'Wednesday', x: 31, y: 31, size: 31 },
{ typeName: 'banana', text: 'Monday', x: 31, y: 31, size: 31 },
{ typeName: 'banana', text: 'Tuesday', x: 32, y: 32, size: 32 },
{ typeName: 'banana', text: 'Wednesday', x: 33, y: 33, size: 33 },
...
])
```
#### options 可配置参数
| 属性 | 说明 | required | 类型 | 默认值 |
| :----| :------| :--------| :---:| :------|
| title | 图表标题 | - | String | '气泡图' |
| keyMap | 数据列表的属性字典 | - | Object | 详见后续属性 |
| keyMap.xKey | x 坐标对应的属性名称 | - | String | 'x' |
| keyMap.yKey | y 坐标对应的属性名称 | - | String | 'y' |
| keyMap.sizeKey | 气泡大小对应的属性名称 | - | String | 'size' |
| keyMap.textKey | 气泡文本对应的属性名称 | - | String | 'text' |
| keyMap.legendKey | 图例对应的属性名称 | - | String | 'typeName' |
### 全局配置
#### 主题
注册并按需使用
``` js
import themeData from './theme.json'
// 注册主题
Chart.config({
theme: {
name: 'themeName',
data: themeData
}
})
// 使用主题
Chart.line('#chart', data, { theme: 'themeName' })
```
注册并全局使用
``` js
import themeData from './theme.json'
// 注册为默认主题后,所有的图表均使用该主题,不需要特别指定
Chart.config({
theme: {
name: 'themeName',
data: themeData,
default: true
}
})
```
### 实例 API
| 方法 | 说明 | 参数 | 参数类型 | 返回值 |
| :----| :------| :--------| :---:| :------|
| setData | 重新设置数据 | data | Array | - |
## License
[MIT](http://opensource.org/licenses/MIT)
/**
* webpack config
*
* author: liuxin(liuxin@analysys.com.cn)
*/
const path = require('path')
const glob = require('globby')
const isProduction = process.env.NODE_ENV !== 'development'
const resolve = dir => path.join(__dirname, '..', dir)
const assetsDir = resolve('src')
const distDir = resolve('dist')
const baseConfig = {
entry: {
'index': glob.sync(['index.js'], { cwd: assetsDir })
},
output: {
path: distDir
},
module: {
rules: [
{
test: /\.js$/,
exclude: file => (
/node_modules/.test(file) &&
!/\.vue\.js/.test(file)
),
use: [
{
loader: 'babel-loader',
options: {
cacheDirectory: true,
cacheIdentifier: true
}
}
]
}
]
},
resolve: {
modules: [
resolve('node_modules'),
resolve('src')
],
extensions: ['.js', '.json', '.vue', '.scss']
},
externals: {
'vue': 'Vue',
'echarts': 'echarts'
}
}
module.exports = {
isProduction,
assetsDir,
distDir,
baseConfig
}
/**
* webpack config for production
*
* author: liuxin(liuxin@analysys.com.cn)
*/
const webpack = require('webpack')
const merge = require('webpack-merge')
const { baseConfig } = require('./config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin')
const VueLoaderPlugin = require('vue-loader/lib/plugin')
const config = merge.smart(baseConfig, {
devtool: 'source-map',
output: {
filename: '[name].js',
libraryTarget: 'umd',
umdNamedDefine: false
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
hotReload: false
}
},
{
test: /\.css$/,
loader: ExtractTextPlugin.extract({
use: [
'css-loader',
{
loader: 'postcss-loader',
options: {
plugins: (loader) => [
require('autoprefixer')({
'browsers': ['ie > 8', 'last 2 version', 'safari >= 9']
}),
require('cssnano')
]
}
}
],
fallback: ['vue-style-loader']
})
},
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract({
use: [
'css-loader',
'sass-loader',
{
loader: 'postcss-loader',
options: {
plugins: (loader) => [
require('autoprefixer')({
'browsers': ['ie > 8', 'last 2 version', 'safari >= 9']
}),
require('cssnano')
]
}
}
],
fallback: ['vue-style-loader']
})
}
]
},
plugins: [
new VueLoaderPlugin(),
new ExtractTextPlugin({ filename: '[name].css', allChunks: true }),
new webpack.optimize.OccurrenceOrderPlugin(),
new OptimizeCssAssetsPlugin({
assetNameRegExp: /\.css$/g,
cssProcessor: require('cssnano'),
cssProcessorOptions: { discardComments: { removeAll: true } },
canPrint: true
}),
new UglifyJSPlugin({
parallel: true,
sourceMap: true,
uglifyOptions: {
compress: {
drop_console: true,
drop_debugger: true
},
comments: function (n, c) {
/*! IMPORTANT: Please preserve 3rd-party library license info, inspired from @allex/amd-build-worker/config/util.js */
var text = c.value, type = c.type
if (type === 'comment2') {
return /^!|@preserve|@license|@cc_on|MIT/i.test(text)
}
}
}
})
]
})
module.exports = config
<template>
<div class="app-container">
<div class="left">
<ul class="sidebar">
<li v-for="(link, i) in links" :key="i">
<router-link :to="link.url">{{link.name}}</router-link>
<ul class="sub" v-if="link.subs">
<li v-for="(sub, j) in link.subs" :key="j">
<router-link :to="sub.url">{{sub.name}}</router-link>
</li>
</ul>
</li>
</ul>
</div>
<div class="right">
<router-view />
</div>
</div>
</template>
<script>
import './styles/main.scss'
export default {
name: 'App',
data () {
return {
links: [
{
name: '折线图',
url: '/line',
subs: [
{ name: '单条折线图', url: '/line#simple' },
{ name: '多条折线图', url: '/line#multiple' },
{ name: '横向折线图', url: '/line#reverse' }
]
},
{
name: '柱状图',
url: '/bar',
subs: [
{ name: '单条柱状图', url: '/bar#simple' },
{ name: '多条柱状图', url: '/bar#multiple' },
{ name: '横向柱状图', url: '/bar#reverse' },
{ name: '折柱混合图', url: '/bar#mixin' },
{ name: '堆叠柱状图', url: '/bar#stack' },
{ name: '时间轴柱状图', url: '/bar#timeline' }
]
},
{
name: '饼状图',
url: '/pie',
subs: [
{ name: '简单饼状图', url: '/pie#simple' },
{ name: '环形图', url: '/pie#ring' }
]
},
{
name: '雷达图',
url: '/radar',
subs: [
{ name: '简单雷达图', url: '/radar#simple' }
]
},
{
name: '漏斗图',
url: '/funnel',
subs: [
{ name: '简单漏斗图', url: '/funnel#simple' }
]
},
{
name: '气泡图',
url: '/scatter',
subs: [
{ name: '气泡图', url: '/scatter#simple' }
]
}
]
}
}
}
</script>
<style lang="scss">
</style>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1">
<title>demo</title>
</head>
<body>
<div id="app"></div>
<script src="./index.js"></script>
</body>
</html>
import Vue from 'vue'
import router from './router'
import App from './app.vue'
new Vue({
el: '#app',
router,
render: h => h(App),
mounted () {
if (this.$route.path === '/') {
this.$router.push('/line')
}
}
})
export const getTimelineList = () => {
const list = []
for (let i = 2008; i < 2018; i++) {
let index = 0
for (const key of keys) {
for (const day of days) {
list.push({
timeline: i,
typeName: key,
key: day,
value: Math.floor(Math.random() * 100 + (index + 1) * 100)
})
index++
}
}
}
return list
}
export const getSimpleList = () => {
const list = []
for (const key of keys) {
list.push({
key: key,
value: Math.floor(Math.random() * 100)
})
}
return list
}
export const getMultipleList = (scatter = false) => {
const list = []
let index = 0
for (const key of keys) {
for (const day of days) {
if (scatter) {
list.push({
typeName: key,
text: day,
x: Math.floor(Math.random() * 100 + (index + 1) * 100),
y: Math.floor(Math.random() * 100 + (index + 1) * 100),
size: Math.floor(Math.random() * 1000)
})
} else {
list.push({
typeName: key,
key: day,
value: Math.floor(Math.random() * 100 + (index + 1) * 100)
})
}
}
index++
}
return list
}
const keys = ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
const days = ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
{
"color": [
"#fc97af",
"#87f7cf",
"#f7f494",
"#72ccff",
"#f7c5a0",
"#d4a4eb",
"#d2f5a6",
"#76f2f2"
],
"backgroundColor": "rgba(41,52,65,1)",
"textStyle": {},
"title": {
"textStyle": {
"color": "#ffffff"
},
"subtextStyle": {
"color": "#dddddd"
}
},
"line": {
"itemStyle": {
"normal": {
"borderWidth": "4"
}
},
"lineStyle": {
"normal": {
"width": "3"
}
},
"symbolSize": "0",
"symbol": "circle",
"smooth": true
},
"radar": {
"itemStyle": {
"normal": {
"borderWidth": "4"
}
},
"lineStyle": {
"normal": {
"width": "3"
}
},
"symbolSize": "0",
"symbol": "circle",
"smooth": true
},
"bar": {
"itemStyle": {
"normal": {
"barBorderWidth": 0,
"barBorderColor": "#ccc"
},
"emphasis": {
"barBorderWidth": 0,
"barBorderColor": "#ccc"
}
}
},
"pie": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"scatter": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"boxplot": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"parallel": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"sankey": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"funnel": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"gauge": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"candlestick": {
"itemStyle": {
"normal": {
"color": "#fc97af",
"color0": "transparent",
"borderColor": "#fc97af",
"borderColor0": "#87f7cf",
"borderWidth": "2"
}
}
},
"graph": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"lineStyle": {
"normal": {
"width": "1",
"color": "#ffffff"
}
},
"symbolSize": "0",
"symbol": "circle",
"smooth": true,
"color": [
"#fc97af",
"#87f7cf",
"#f7f494",
"#72ccff",
"#f7c5a0",
"#d4a4eb",
"#d2f5a6",
"#76f2f2"
],
"label": {
"normal": {
"textStyle": {
"color": "#293441"
}
}
}
},
"map": {
"itemStyle": {
"normal": {
"areaColor": "#f3f3f3",
"borderColor": "#999999",
"borderWidth": 0.5
},
"emphasis": {
"areaColor": "rgba(255,178,72,1)",
"borderColor": "#eb8146",
"borderWidth": 1
}
},
"label": {
"normal": {
"textStyle": {
"color": "#893448"
}
},
"emphasis": {
"textStyle": {
"color": "rgb(137,52,72)"
}
}
}
},
"geo": {
"itemStyle": {
"normal": {
"areaColor": "#f3f3f3",
"borderColor": "#999999",
"borderWidth": 0.5
},
"emphasis": {
"areaColor": "rgba(255,178,72,1)",
"borderColor": "#eb8146",
"borderWidth": 1
}
},
"label": {
"normal": {
"textStyle": {
"color": "#893448"
}
},
"emphasis": {
"textStyle": {
"color": "rgb(137,52,72)"
}
}
}
},
"categoryAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#666666"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"textStyle": {
"color": "#aaaaaa"
}
},
"splitLine": {
"show": false,
"lineStyle": {
"color": [
"#e6e6e6"
]
}
},
"splitArea": {
"show": false,
"areaStyle": {
"color": [
"rgba(250,250,250,0.05)",
"rgba(200,200,200,0.02)"
]
}
}
},
"valueAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#666666"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"textStyle": {
"color": "#aaaaaa"
}
},
"splitLine": {
"show": false,
"lineStyle": {
"color": [
"#e6e6e6"
]
}
},
"splitArea": {
"show": false,
"areaStyle": {
"color": [
"rgba(250,250,250,0.05)",
"rgba(200,200,200,0.02)"
]
}
}
},
"logAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#666666"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"textStyle": {
"color": "#aaaaaa"
}
},
"splitLine": {
"show": false,
"lineStyle": {
"color": [
"#e6e6e6"
]
}
},
"splitArea": {
"show": false,
"areaStyle": {
"color": [
"rgba(250,250,250,0.05)",
"rgba(200,200,200,0.02)"
]
}
}
},
"timeAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#666666"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"textStyle": {
"color": "#aaaaaa"
}
},
"splitLine": {
"show": false,
"lineStyle": {
"color": [
"#e6e6e6"
]
}
},
"splitArea": {
"show": false,
"areaStyle": {
"color": [
"rgba(250,250,250,0.05)",
"rgba(200,200,200,0.02)"
]
}
}
},
"toolbox": {
"iconStyle": {
"normal": {
"borderColor": "#999999"
},
"emphasis": {
"borderColor": "#666666"
}
}
},
"legend": {
"textStyle": {
"color": "#999999"
}
},
"tooltip": {
"axisPointer": {
"lineStyle": {
"color": "#cccccc",
"width": 1
},
"crossStyle": {
"color": "#cccccc",
"width": 1
}
}
},
"timeline": {
"lineStyle": {
"color": "#87f7cf",
"width": 1
},
"itemStyle": {
"normal": {
"color": "#87f7cf",
"borderWidth": 1
},
"emphasis": {
"color": "#f7f494"
}
},
"controlStyle": {
"normal": {
"color": "#87f7cf",
"borderColor": "#87f7cf",
"borderWidth": 0.5
},
"emphasis": {
"color": "#87f7cf",
"borderColor": "#87f7cf",
"borderWidth": 0.5
}
},
"checkpointStyle": {
"color": "#fc97af",
"borderColor": "rgba(252,151,175,0.3)"
},
"label": {
"normal": {
"textStyle": {
"color": "#87f7cf"
}
},
"emphasis": {
"textStyle": {
"color": "#87f7cf"
}
}
}
},
"visualMap": {
"color": [
"#fc97af",
"#87f7cf"
]
},
"dataZoom": {
"backgroundColor": "rgba(255,255,255,0)",
"dataBackgroundColor": "rgba(114,204,255,1)",
"fillerColor": "rgba(114,204,255,0.2)",
"handleColor": "#72ccff",
"handleSize": "100%",
"textStyle": {
"color": "#333333"
}
},
"markPoint": {
"label": {
"normal": {
"textStyle": {
"color": "#293441"
}
},
"emphasis": {
"textStyle": {
"color": "#293441"
}
}
}
}
}
<template>
<div>
<h1>漏斗图示例</h1>
<h2 id="simple">简单漏斗图</h2>
<div id="simpleChart" class="chart-container tall" ></div>
</div>
</template>
<script>
import Chart from '../../src/index'
import { getSimpleList } from '../mock/data.js'
export default {
name: 'funnelCharts',
mounted () {
Chart.funnel('#simpleChart', getSimpleList())
}
}
</script>
<style lang="scss">
</style>
<template>
<div>
<h1>折线图示例</h1>
<h2 id="simple">单条折线图</h2>
<div id="simpleChart" class="chart-container" ></div>
<h2 id="multiple">多条折线图</h2>
<div id="multipleChart" class="chart-container" ></div>
<h2 id="reverse">横向折线图</h2>
<div id="reverseChart" class="chart-container tall" ></div>
</div>
</template>
<script>
import { Line } from '../../src/index'
import { getSimpleList, getMultipleList } from '../mock/data.js'
export default {
name: 'lineCharts',
mounted () {
Line.init('#simpleChart', getSimpleList())
Line.init('#multipleChart', getMultipleList())
Line.init('#reverseChart', getMultipleList(), { reverseAxis: true })
}
}
</script>
<style lang="scss">
</style>
module.exports = {
plugins: [
require('autoprefixer')({
browsers: ["ie > 8", "last 2 version", "safari >= 9"]
})
]
}
import Vue from 'vue'
import App from './app.vue'
new Vue({
el: '#app',
render: h => h(App),
mounted () {
console.log('success')
}
})
import xButton from './source/Button.vue'
import xButtonGroup from './source/ButtonGroup.vue'
export {
xButton,
xButtonGroup
}
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册