284 Commits
Author SHA1 Message Date
RuoYi d066539616 若依 4.2 2020-03-23 09:02:04 +08:00
RuoYi 5c736e96c9 页面滚动显示返回顶部按钮 2020-03-20 14:34:26 +08:00
RuoYi 0307599eed 移动端定时任务&角色管理更多操作可点击 2020-03-20 13:46:43 +08:00
RuoYi 55da596a80 定时任务&角色管理添加更多操作按钮 2020-03-20 13:21:30 +08:00
RuoYi 6fa8c991b8 移动端点击左侧目录不进行菜单切换 2020-03-19 13:48:15 +08:00
RuoYi 51f98aa0cb 代码生成细节优化 2020-03-18 23:05:26 +08:00
RuoYi 07042ac9b1 iframe框架页会话过期弹出超时提示 2020-03-18 22:57:03 +08:00
RuoYi 3df553c488 移动端登录不显示左侧菜单 2020-03-18 18:32:45 +08:00
RuoYi 5426ba9d5e 首页logo固定,不随菜单滚动 2020-03-18 16:06:22 +08:00
RuoYi 6b9ee80ca4 任务分组字典翻译(调度日志详细) 2020-03-18 15:37:47 +08:00
RuoYi 05b5b314ee 字典管理添加缓存读取 2020-03-18 15:03:52 +08:00
RuoYi f8491c36e2 字典数据列表标签显示样式 2020-03-18 12:45:53 +08:00
RuoYi 06751acbf9 参数管理支持缓存操作 2020-03-18 12:28:36 +08:00
RuoYi 567ab47ae9 日期控件清空结束时间设置开始默认值为2099-12-31 2020-03-14 15:34:33 +08:00
RuoYi 82f8dadbae 表格树添加获取数据后响应回调处理 2020-03-14 11:47:36 +08:00
RuoYi ca6a4b2ecf 批量替换表前缀调整 2020-03-13 21:56:29 +08:00
RuoYi 9247e004d0 调整包顺序 2020-02-28 21:37:56 +08:00
若依andGitee e1e494de33 !153 支持表格导入模板的弹窗表单加入其它输入控件
Merge pull request !153 from ฅ(̳••̳)ฅ大步/master
2020-02-28 21:34:09 +08:00
ฅ(̳••̳)ฅ大步andGitee 3988b12e72 update ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js.
支持导入模板的表单可以添加除了file、updateSupport之外的输入控件。
2020-02-26 14:30:29 +08:00
RuoYi c6bf712de4 登录页面默认模式设置 2020-02-17 17:28:16 +08:00
RuoYi 18e0a2a27d 重置刷新表格树 2020-02-17 15:50:11 +08:00
RuoYi 6ce34b1790 新增支持导出数据字段排序 2020-02-17 12:16:13 +08:00
RuoYi b5678994da 修改代码生成部分细节问题 2020-02-10 14:59:31 +08:00
RuoYi 2aa98dcbe1 新增表格参数(是否单选checkbox) 2020-02-05 18:16:52 +08:00
RuoYi 96d0bd2581 README 2020-02-05 18:05:08 +08:00
RuoYi f826a79633 防止db字段名为一个字母导致出现生成异常 2020-02-02 15:41:56 +08:00
RuoYi c958d6ec83 添加新群号 2020-01-31 14:44:31 +08:00
RuoYi 5cb3430791 druid未授权不允许访问 2020-01-11 19:33:08 +08:00
RuoYi d93e43cc2c 表格树父节点兼容0,'0','',null 2020-01-03 17:31:12 +08:00
RuoYi 47f007ba97 添加新群号 2020-01-03 10:58:25 +08:00
RuoYi f96328ea6b 调整表格树兼容父节点判断 2020-01-02 19:29:55 +08:00
RuoYi 2d55917f2e 必填的项增加星号 2019-12-31 16:34:24 +08:00
RuoYi 1c6e5cf665 修复select2不显示校验错误信息 2019-12-25 16:59:12 +08:00
RuoYi 9d316c44d2 HTML过滤器不替换双引号为",防止json格式无效 2019-12-20 17:27:17 +08:00
RuoYi 2f8422278a 添加HTML过滤器,用于去除XSS漏洞隐患 2019-12-19 17:04:32 +08:00
RuoYi 98dd156396 修复多数据源下enabled=false导致读取不到bean导致异常问题 2019-12-19 16:10:10 +08:00
RuoYi b65263fdd7 修复翻页记住选择项数据问题 2019-12-19 14:21:31 +08:00
RuoYi 21992c1be7 用户邮箱长度限制20 2019-12-16 11:44:20 +08:00
RuoYi d80c1d2a73 修改错误页面返回主页出现嵌套问题 2019-12-10 17:20:43 +08:00
RuoYi 55978c7f15 表格浮动提示单双引号转义 2019-12-10 09:55:23 +08:00
RuoYi b2012e699b 阿里云服务器89元/年,双12年末特惠,爆款产品限时1折 2019-12-09 11:32:53 +08:00
RuoYi 382d1868be 阿里云服务器89元/年,双12年末特惠,爆款产品限时1折 2019-12-09 11:25:49 +08:00
RuoYi 82df046e59 添加新群号 2019-12-04 11:44:26 +08:00
RuoYi 4f116a6a77 更新前后端分离版本链接 2019-12-03 18:05:28 +08:00
RuoYi 77d3db4cb0 代码生成防止缓存内的数据没有及时写入到zip文件 2019-12-02 15:02:31 +08:00
RuoYi 1155bcb22d 支持配置四级菜单 2019-11-27 11:05:10 +08:00
RuoYi 208c4a8417 升级shiro到最新版1.4.2 阻止rememberMe漏洞攻击 2019-11-26 15:33:42 +08:00
RuoYi 62a0018041 升级summernote到最新版本v0.8.12 2019-11-25 12:24:49 +08:00
RuoYi f276a83956 侧边栏添加一套深蓝色主题 2019-11-22 09:41:04 +08:00
RuoYi 28b8f3e36f Excel注解dateFormat属性为字符串时间时格式处理 2019-11-21 16:33:34 +08:00
若依andGitee 56a6e940c2 !146 浏览代码时间字符串处理
Merge pull request !146 from 厚积薄发/master
2019-11-21 16:31:37 +08:00
厚积薄发andGitee 868edbc88c 时间字符串处理 2019-11-21 10:15:24 +08:00
RuoYi b05a539970 支持mode配置history(表示去掉地址栏的#) 2019-11-21 09:59:45 +08:00
若依andGitee 2c48aedda7 !144 修复War部署无法正常shutdown,ehcache内存泄漏
Merge pull request !144 from wayneliquan/master
2019-11-20 18:52:32 +08:00
zhanliquan 87b8d032ca 修复War部署无法正常shutdown,ehcache内存泄漏
Signed-off-by: zhanliquan <zhanliquanit@foxmail.com>
2019-11-20 18:07:54 +08:00
zhanliquan 080237cabf 修复War部署无法正常shutdown,ehcache内存泄漏
Signed-off-by: zhanliquan <zhanliquanit@foxmail.com>
2019-11-20 16:54:22 +08:00
RuoYi 005418e065 修复代码生成短字段无法识别问题 2019-11-20 10:44:02 +08:00
RuoYi b32111f1ab 修复war包部署情况下404、500等页面样式丢失问题 2019-11-18 12:01:38 +08:00
RuoYi 25f51371f5 代码生成模板增加导出功能日志记录 2019-11-16 11:58:07 +08:00
RuoYi 14bad9bf20 2019年度最受欢迎中国开源软件评选
请给若依/RuoYi 投票,谢谢。
2019-11-15 09:55:32 +08:00
若依andGitee da2d0ba32f !143 serviceImpl模版 update方法判断bug修正
Merge pull request !143 from shenbururen/master
2019-11-13 14:55:27 +08:00
shenbururenandGitee 0b34c3e910 serviceImpl模版 update方法判断bug修正
应该判断updateTime字段。
2019-11-13 14:03:26 +08:00
RuoYi 1557a858ea 代码生成唯一编号调整为tableId 2019-11-12 15:12:13 +08:00
RuoYi 9a0098cca1 代码生成查询时忽略大小写&翻页记住选中&表注释未填写也允许导入 2019-11-12 15:00:47 +08:00
RuoYi fe8c142cd6 修改select2选择数量限制提示语 2019-11-08 10:47:07 +08:00
RuoYi 5346af9ab0 全局配置类修改为注解,防止多环境配置下读取问题。 2019-11-07 17:33:28 +08:00
RuoYi de1979212a 修复多表格情况下,firstLoad只对第一个表格生效 2019-11-07 15:22:42 +08:00
RuoYi aa0f33b5e7 处理打包出现警告问题 2019-11-06 17:04:25 +08:00
RuoYi ecb77e2be4 默认主题样式,防止网速慢情况下出现空白 2019-11-06 14:28:23 +08:00
RuoYi db9d1a7720 修复文件上传多级目录识别问题 2019-11-01 09:31:26 +08:00
RuoYi 6ad6f90968 解码url,防止中文导致页面不能加载问题 2019-10-31 15:25:23 +08:00
RuoYi b1b0542f72 右键Tab页刷新事件重复请求问题 2019-10-31 11:32:45 +08:00
RuoYi 7e749c25c6 阿里云服务器86元/年,双11冰点底价,错过再等1年 2019-10-24 09:37:19 +08:00
RuoYi 23bbd23032 若依 4.1 2019-10-22 10:18:36 +08:00
RuoYi 68f65cf77b 若依 4.1 2019-10-22 09:55:16 +08:00
RuoYi 9b93a151fb 支持多表格实例操作 2019-10-21 12:14:52 +08:00
RuoYi 3e18ca6613 支持多表格实例操作 2019-10-21 11:37:50 +08:00
RuoYi a3e946b57e 浮动提示方法tooltip支持弹窗 2019-10-18 17:59:54 +08:00
RuoYi 0ebd155be4 浮动提示方法tooltip支持弹窗 2019-10-18 17:20:57 +08:00
RuoYi 660fc42750 汉化select2插件 2019-10-18 15:02:04 +08:00
RuoYi 46b08d9474 字典数据支持模糊条件查询 2019-10-18 11:23:10 +08:00
RuoYi 9ac3ca79f8 代码生成支持模糊条件查询 2019-10-18 09:36:27 +08:00
RuoYi 7eade0d43c 添加页签全屏方法 2019-10-17 19:39:56 +08:00
RuoYi cf2ae2bccb 增加清除表单验证错误信息方法 2019-10-17 18:39:57 +08:00
RuoYi f9a2f9e0f4 支持iframe局部刷新页面 2019-10-17 10:45:19 +08:00
RuoYi 01f40d91ec 支持在线切换主题 2019-10-16 13:43:19 +08:00
RuoYi dd57a4fb1a 设置mybatis全局的配置文件 2019-10-15 15:39:15 +08:00
RuoYi 69cc7a4111 代码生成实体根据模板区分不同父字段 2019-10-15 12:45:55 +08:00
RuoYi 9f5067fbad 用户唯一校验参数属性名修正 2019-10-15 10:57:49 +08:00
若依andGitee c3a6f4af6a !140 添加用户时,用户名、手机号、邮箱唯一校验参数修正
Merge pull request !140 from BoazJun/master
2019-10-15 10:56:28 +08:00
dlnu_wqj ac9666db76 添加用户时,用户名、手机号、邮箱唯一校验参数修正 2019-10-14 15:51:14 +08:00
若依andGitee 2d064a9723 !138 修改注释中错误的方法形参名
Merge pull request !138 from lywjlong/master
2019-10-09 12:57:14 +08:00
wangjianlong 01de32cc58 修改注释 2019-10-09 12:42:22 +08:00
若依andGitee 39fdb02022 !137 fix: 预览图片设置的高宽参数颠倒
Merge pull request !137 from Dulk/fix_bug
2019-10-09 11:52:48 +08:00
deng-cc e0f091819b fix: 预览设置的高宽参数颠倒 2019-10-09 11:45:33 +08:00
RuoYi b2cbc3b28c 新增账户解锁操作 2019-10-08 16:17:23 +08:00
cain 3d10d26110 Merge remote-tracking branch 'origin/master' 2019-10-08 15:36:09 +08:00
cain f4ab77f80a 账户锁定新增解锁功能 2019-10-08 15:35:36 +08:00
RuoYi 9532ad5fcd 删除多余注解 2019-10-08 11:53:47 +08:00
cain d1c5ec58df Merge remote-tracking branch 'origin/master' 2019-10-08 09:12:16 +08:00
RuoYi 509032ff8b 修改项目扩展链接 2019-10-05 21:34:33 +08:00
RuoYi 1447fc413b 组件文档地址修改 2019-10-04 17:45:44 +08:00
RuoYi 661b6fe5d5 管理员用户&角色不允许操作 2019-10-03 09:45:41 +08:00
若依andGitee ac97d15a7f !136 optgroup标签下多选后表单值转json丢失
Merge pull request !136 from Dulk/fix-optgroup_value_jsonOverride_bug
2019-09-30 12:56:03 +08:00
若依andGitee 83ed5fc243 !135 mybatis别名类扫描通配符,无法支持多路径情况
Merge pull request !135 from Dulk/fix-mybatis_aliasScan_bug
2019-09-30 12:54:40 +08:00
RuoYi 39b063ff6a 去掉jsoup调用自定义转义工具 2019-09-30 12:43:56 +08:00
deng-cc 1166be1ea0 fix:修复optgroup标签多选后值转json后丢失的问题 2019-09-30 11:47:46 +08:00
deng-cc 4a44e097a2 fix:修复mybatis别名类扫描无法配置多目录的情况 2019-09-30 11:16:18 +08:00
RuoYi 2d07fcb4b4 选中/取消事件顺序调整 2019-09-30 11:07:11 +08:00
RuoYi 81ec67d4ea 分页记住选择指定列值数据问题修正 2019-09-29 15:53:10 +08:00
cain 3d9f48c365 Merge remote-tracking branch 'origin/master' 2019-09-28 14:37:42 +08:00
RuoYi f600cdf527 添加时间轴示例 2019-09-27 16:27:02 +08:00
cain d66b5811f7 Revert "解决翻页记住选择时获取指定列值的问题"
This reverts commit af6a313
2019-09-26 12:00:45 +08:00
cain af6a313d06 解决翻页记住选择时获取指定列值的问题 2019-09-26 11:49:31 +08:00
RuoYi cf211fa19c 默认配置表格支持移动端适配 2019-09-25 21:56:33 +08:00
RuoYi e1d2d72282 Merge branch 'master' of https://gitee.com/y_project/RuoYi 2019-09-25 19:48:40 +08:00
RuoYi ee8fb0e87b 添加表格父子视图示例 2019-09-25 19:48:29 +08:00
cain a6367e9453 Merge remote-tracking branch 'origin/master' 2019-09-25 19:07:12 +08:00
cain 65640603d1 代码生成sql脚本添加导出按钮 2019-09-25 19:06:50 +08:00
RuoYi 925d2b13d8 表格行内编辑示例添加校验及下拉选项 2019-09-25 18:54:22 +08:00
RuoYi c2e425aa12 添加表格行内编辑示例 2019-09-24 16:18:28 +08:00
RuoYi 538e7dcc29 调整查询条件文本宽度默认为65px 2019-09-23 17:11:22 +08:00
若依andGitee ad8e475bb7 !131 模板少了覆盖标签
Merge pull request !131 from wind/ruoyi
2019-09-23 16:52:44 +08:00
wind f5071e0c4d 模板少了覆盖标签 2019-09-23 16:51:21 +08:00
RuoYi c24758f451 指定 VFS 的实现 2019-09-23 16:14:54 +08:00
RuoYi f83a8ff4c0 升级fastjson到最新版1.2.60 阻止漏洞攻击 2019-09-20 21:10:00 +08:00
RuoYi e6bacada22 升级echarts到最新版4.2.1 2019-09-20 20:39:17 +08:00
RuoYi 16270ae869 操作日志新增返回参数 2019-09-20 19:07:22 +08:00
RuoYi 64f0e9d282 初始多表格demo修改 2019-09-20 18:22:34 +08:00
RuoYi d5d2ae1da8 支持通配符扫描任意多个包(无需配置多个包路径),以及防止出现类名重复异常 2019-09-17 20:13:04 +08:00
RuoYi 6dfc2a0a3d 表单构建日期选择元素调整 2019-09-14 09:05:05 +08:00
RuoYi 0f7952b9d5 添加isUser,便于校验用户是否已登录 2019-09-12 19:35:41 +08:00
RuoYi fcc889ca07 Shiro权限支持多种情况验证 2019-09-12 19:19:54 +08:00
RuoYi 362374d0b7 代码生成表前缀配置支持多个 2019-09-11 19:06:57 +08:00
若依andGitee c6c71a7e70 !128 修复代码生成Add、Edit页面多日期选择器只有第一个生效的bug
Merge pull request !128 from SnowFox/master
2019-09-11 18:57:55 +08:00
若依andGitee e1a38a3bd5 !127 自动生成代码 Tree型 add/edit 页面生成不正确
Merge pull request !127 from Dulk/fix-genTree
2019-09-11 18:40:47 +08:00
jingjie520 f169eaf6cc 修复代码生成Add、Edit页面多日期选择器只有第一个生效的bug 2019-09-06 15:10:26 +08:00
deng-cc c920d3ec5b fix:修复树形类型的代码生成的部分必要属性无法显示 2019-09-05 17:01:18 +08:00
deng-cc ac5f45d11a fix:修订代码自动生成中Tree型的Domain属性重复
GenTableColumn.java
public static boolean isSuperColumn(String javaField)
基类有两种,BaseEntity 和 TreeEntity,其中父类忽略的属性中只包含了 BaseEntity 的属性,而没有包含 TreeEntity 中的属性
如此生成的Tree型Domain中,父类已有属性会重复生成
另,为 TreeEntity 添加了 祖级列表属性 ancestors
2019-09-04 16:49:08 +08:00
RuoYi e4984b85f2 修复非表格插件情况下重置出现异常 2019-09-02 12:05:44 +08:00
RuoYi 1bd8dd00d1 修复富文本编辑器有序列表冲突 2019-09-02 11:45:38 +08:00
RuoYi 29ac3e21b2 上传完成回显完成高度调整 2019-09-01 21:49:17 +08:00
若依andGitee 7acd197389 !125 演示上传完成回显完成字样只显示一半
Merge pull request !125 from wind/ruoyi
2019-09-01 21:45:10 +08:00
wind 025d28d80d 演示上传完成回显 2019-08-30 17:49:55 +08:00
若依andGitee 7d26bfb247 !124 修改自动去除表前缀属性autoRemovePre注释
Merge pull request !124 from RACSU/master
2019-08-30 14:01:28 +08:00
racsu 2c0042c3df 修改自动去除表前缀属性autoRemovePre注释 2019-08-30 10:32:28 +08:00
若依andGitee 5a7fcde102 !123 头像裁剪超出预览框,修改高度为450
Merge pull request !123 from wind/ruoyi
2019-08-29 09:40:35 +08:00
wind 5be2aaae15 头像裁剪超出预览框,修改高度为450 2019-08-28 22:52:32 +08:00
RuoYi 1b302b9bde 修复自动去除表前缀配置无效问题 2019-08-28 17:54:05 +08:00
RuoYi 5c7f6b7c7d 按钮可见不显示(权限标识控制) 2019-08-27 09:45:29 +08:00
RuoYi a1d9354de7 修复expireTime会话超时时间无效问题 2019-08-25 22:16:58 +08:00
RuoYi 2a6761d47e Merge branch 'master' of https://gitee.com/y_project/RuoYi 2019-08-23 14:06:52 +08:00
gcii 18786fc669 删除多余提交的代码 2019-08-23 14:05:19 +08:00
gcii 67e6aa0067 修复添加用户页面使用搜索功能后不选择部门会默认选择根目录的bug 2019-08-23 11:55:05 +08:00
RuoYi 12e68fab27 新增本地资源通用下载方法 2019-08-23 10:36:03 +08:00
RuoYi 478520572c 操作日志记录新增请求方式 2019-08-22 21:54:35 +08:00
若依andGitee e7050f5a38 !119 代码生成单选按钮组bug修复
Merge pull request !119 from SnowFox/master
2019-08-22 21:45:14 +08:00
若依andGitee 79197b1977 !120 修复表格树bug
Merge pull request !120 from Lunaticf/master
2019-08-22 21:37:32 +08:00
center-liu bf68719e2e 修复表格树bug 2019-08-22 16:03:33 +08:00
jingjie520 9b45b78ba7 修复多组同类数据字典生成的单选按钮点击Label选择项的错误 2019-08-22 10:57:25 +08:00
RuoYi ca48d313a2 修改select2的下拉框的宽度不会随着浏览器的拖拉而改变 2019-08-18 11:01:21 +08:00
RuoYi d9fabe556c 生成模板默认值修改 2019-08-10 18:20:56 +08:00
RuoYi 12ef6d07cf 去掉多余字段 2019-08-10 11:09:41 +08:00
RuoYi bed647427b 修复代码生成树表异常 2019-08-10 11:00:14 +08:00
RuoYi d408e2bf54 主键标识换成大写,防止识别出现问题 2019-08-08 16:42:38 +08:00
RuoYi b5cef34426 未设置主键列默认首个字段为主键信息 2019-08-08 16:24:09 +08:00
若依andGitee 129cea08ce !116 代码生成文件名带空格
Merge pull request !116 from BreakLo0p/master
2019-08-08 14:14:48 +08:00
Rex cd10f48f53 代码生成文件名带空格问题 2019-08-08 13:47:19 +08:00
gcii a2c1bfef8f 修复代码生成模块查询条件忘记加where 2019-08-08 10:52:01 +08:00
RuoYi 47f4fce2ab 若依 4.0 2019-08-08 10:35:20 +08:00
RuoYi 1c3541cc05 若依 4.0 2019-08-08 08:53:12 +08:00
RuoYi 5f05734e46 滚动条样式调整 2019-08-05 09:57:16 +08:00
RuoYi e5ab665c57 检查属性是否改变修改为克隆方式(防止热部署出现强转异常) 2019-08-04 11:45:49 +08:00
RuoYi c3417792d9 修改样式名称 2019-08-04 11:01:50 +08:00
RuoYi 174ed02058 Excel支持设置导出类型&更换样式 2019-08-04 09:43:25 +08:00
RuoYi e944409f5e 个人中心手机端显示问题优化 2019-08-03 18:23:41 +08:00
若依andGitee 713ccf26e2 !115 浏览代码 解决数据权限只有本部门及以下时候,可能出现数据权限越界的情况
Merge pull request !115 from RACSU/master
2019-08-03 16:43:52 +08:00
RuoYi 3ee87354c8 弹出层指定shadeClose参数选项 2019-08-03 10:40:38 +08:00
RuoYi e942bcf033 修正角色KEY值错误 2019-07-31 20:40:29 +08:00
RACSU dea394a93d 解决数据权限只有本部门及以下时候,可能出现数据权限越界的情况 2019-07-29 22:23:48 +08:00
若依andGitee 54ce56564b !113 SysUserMapper.xml 查询语句sql字段重复
Merge pull request !113 from RACSU/master
2019-07-28 21:31:22 +08:00
RACSUandGitee ae1d354d4c 更新 SysUserMapper.xml
查询语句sql字段重复,可能引起分页插件报错
2019-07-28 21:27:12 +08:00
RuoYi 20c17d6077 更新演示图 2019-07-27 20:38:19 +08:00
RuoYi abb951a889 条件限制一级菜单href跳转 2019-07-27 18:12:40 +08:00
RuoYi 72a1585e26 树表格添加responseHandler(请求获取数据后处理回调函数,校验异常状态提醒) 2019-07-27 14:36:31 +08:00
RuoYi 38c84fbdc6 修正fileinput图路径 2019-07-27 13:36:36 +08:00
若依andGitee d67ff9bf2c !109 现有 ExcelUtil无法读取公式计算的值
Merge pull request !109 from 厚积薄发/master
2019-07-27 10:50:54 +08:00
RuoYi 986e5bb9bd 新增侧边栏浅色主题(参数管理配置) 2019-07-27 10:40:32 +08:00
RuoYi ba05c28bcf 防止表单重复提交注解移至common模块 2019-07-26 20:29:42 +08:00
RuoYi 71ff337ee0 多数据源支持类注解(允许继承父类的注解) 2019-07-26 20:19:47 +08:00
RuoYi 9e2c685870 支持配置一级菜单href跳转 2019-07-26 19:00:30 +08:00
厚积薄发andGitee 75d1872b02 更新 ExcelUtil.java
读取单元格公式的值
2019-07-25 09:17:52 +08:00
RuoYi 9cf4b8935f 冻结列去除选中背景 2019-07-24 19:21:59 +08:00
RuoYi aa5d2b9fe8 添加富文本编辑器示例 2019-07-22 11:59:49 +08:00
RuoYi 76b3c381c3 文件上传修改按钮背景及添加加载动画 2019-07-22 08:52:51 +08:00
RuoYi c923dae619 冻结列适配固定高度 2019-07-21 15:24:05 +08:00
RuoYi 7b0902477d 添加控制台管理用户名和密码 2019-07-21 11:35:36 +08:00
若依andGitee 126c4bc8c3 !108 部门修改bug修复
Merge pull request !108 from Ucer/master
2019-07-20 11:22:14 +08:00
ucer a9e300d063 修改部门-添加验证 2019-07-20 11:08:23 +08:00
cain 05331eb99d 新增table选中背景色
修复普通用户打开菜单管理内容为空(缺少字段)
2019-07-19 12:38:57 +08:00
RuoYi adbf5b05ec 新增后台校验 2019-07-19 10:13:11 +08:00
RuoYi bf6c66a77b 新增自定义数据校验 2019-07-19 09:53:45 +08:00
RuoYi 3fc965e0e7 新增@RepeatSubmit注解防止表单重复提交 2019-07-19 09:51:42 +08:00
RuoYi 7e10d16f6c 添加角色权限字符提示信息 2019-07-18 10:46:19 +08:00
RuoYi d9d63cc09d 数据权限为仅本人且没有userAlias别名不查询任何数据 2019-07-17 20:51:28 +08:00
RuoYi dcd6f2252f 文件路径更换 2019-07-17 09:28:15 +08:00
RuoYi 7922cabb5b 添加选卡页同一页签打开&关闭指定demo&更换可操作样式 2019-07-16 15:23:13 +08:00
RuoYi 900de5db80 当前用户重置密码修改缓存 2019-07-16 09:05:23 +08:00
RuoYi bf49b35978 添加选择菜单背景颜色 2019-07-15 08:51:45 +08:00
RuoYi 0df49fcfe8 新增角色数据权限配(仅本人数据权限) 2019-07-14 16:00:14 +08:00
RuoYi fcde715553 验证码参数调整 2019-07-14 12:06:23 +08:00
RuoYi 08ca506cfb 新增卡片列表demo 2019-07-13 19:19:50 +08:00
RuoYi b757c5b7b3 更新密码重置用户信息 2019-07-13 18:23:28 +08:00
RuoYi 9c927e621d IE用户管理界面右侧留白问题 2019-07-13 18:13:23 +08:00
RuoYi 8ebf1504de 修改表格汇总缺少像素问题 2019-07-13 17:16:44 +08:00
RuoYi e315357dd2 新增parentTab选卡页同一页签打开 2019-07-13 16:14:47 +08:00
RuoYi 7b96954b2f 手机端隐藏区域 2019-07-12 17:04:08 +08:00
RuoYi 0c3cac9537 字典类型增加任务分组 2019-07-12 14:51:25 +08:00
RuoYi 2a5065420c 新增firstLoad是否首次请求加载数据,对于查询数据较大可以配置false 2019-07-12 12:32:04 +08:00
RuoYi 3bc161366a 修改错误字眼 2019-07-12 11:40:20 +08:00
RuoYi 3be95bc577 任务日志增加分组条件查询 2019-07-12 10:11:42 +08:00
RuoYi 8c5d7fd336 更新sql脚本 2019-07-12 09:49:41 +08:00
RuoYi d21284f325 定时任务支持Class类调用&多类型参数 2019-07-12 09:37:19 +08:00
RuoYi e7a0f97315 新增列超出指定长度浮动提示(单击文本复制列) 2019-07-11 19:03:03 +08:00
RuoYi 2b20edeff8 上传文件windows去除盘符 2019-07-11 11:55:08 +08:00
RuoYi 304da21e6d 上传文件修改为返回完整路径 2019-07-11 10:53:18 +08:00
RuoYi 8dfa1834e3 表格图片预览支持设置宽高 2019-07-11 10:01:14 +08:00
RuoYi d01f35deeb 表格树新增showSearch是否显示检索信息 2019-07-11 09:24:52 +08:00
RuoYi a4da433a6d 修复对象包含多个Excels导出异常问题 2019-07-10 18:37:43 +08:00
gcii fbddde13c3 重置按钮刷新表格 2019-07-10 17:19:46 +08:00
RuoYi eb7ef55aab 树表格支持多层级访问 2019-07-10 09:07:24 +08:00
RuoYi 6c47f48e06 数据字典是否默认字段获取调整 2019-07-09 18:43:12 +08:00
RuoYi 9e67d8272e 添加用户页面岗位选择框提示 2019-07-09 17:54:18 +08:00
gcii fbe8e6997e 添加用户页面岗位选择框提示 2019-07-09 17:37:26 +08:00
RuoYi 8c912f3906 表格底部下边框防重叠 2019-07-09 17:17:56 +08:00
RuoYi 8caf674f94 添加summernote富文本字号fontsize 2019-07-08 11:14:20 +08:00
RuoYi 7d94c9fcb4 后台校验手机&邮箱不能重复 2019-07-08 08:55:59 +08:00
RuoYi ff878564e4 addr防止空地址校验 2019-06-30 19:47:32 +08:00
liuhulu da5cca0b90 fix,主要针对头像问题进行修复。1.创建账号不保存头像bug。2,查询账号信息时不查询头像bug。3,首页头像显示永远显示默认头像bug。 2019-06-29 22:20:01 +08:00
RuoYi e27297311c 解决表格列设置sortName无效问题 2019-06-27 14:05:40 +08:00
RuoYi 5593a7e7e6 main去掉多余的js 2019-06-26 10:55:05 +08:00
RuoYi a2a75a7fce 更换image表格图片地址 2019-06-25 10:56:33 +08:00
RuoYi 4ca9cb9bab 模板删除多余btn-del 2019-06-25 10:24:24 +08:00
RuoYi b743caeb6c 首页添加统计模板 2019-06-23 13:44:53 +08:00
RuoYi 2565627e7e 页面间隙调整 2019-06-21 19:28:43 +08:00
RuoYi d4096da4f5 修改树方法替换 2019-06-20 11:03:47 +08:00
RuoYi afb19d8ba6 表格树单元格超出部分隐藏显示省略号 2019-06-19 18:12:25 +08:00
RuoYi e7805c988b 修改刷新方法 2019-06-19 16:59:28 +08:00
RuoYi 911fb59e56 新增表格拖拽示例 2019-06-19 16:21:22 +08:00
gcii 080c66d12b 查询按钮bug修复 2019-06-19 14:45:42 +08:00
RuoYi 9dc5db7557 curd图标错误调整 2019-06-18 22:18:36 +08:00
RuoYi 370c047ff8 datetime示例3添加事件click 2019-06-18 22:06:47 +08:00
RuoYi 7d6cdabc09 添加表格动态增删改查示例 2019-06-18 21:56:08 +08:00
RuoYi 1c235dc7f6 优化获取地址方法请求两次 2019-06-18 18:49:41 +08:00
RuoYi ff67062c7f 修改菜单权限显示问题 2019-06-17 13:29:40 +08:00
RuoYi 91dd624048 导入修改为模板渲染 2019-06-15 11:24:03 +08:00
RuoYi ce18a9e86d 修改菜单选中状态失效问题 2019-06-15 10:18:57 +08:00
RuoYi d2e5bd1e43 修改用户更新描述空串不更新问题 2019-06-15 10:18:44 +08:00
RuoYi c7c7d40e4d 选项卡样式优化 2019-06-14 18:55:10 +08:00
RuoYi e0af01d16c 选项卡样式优化 2019-06-14 18:48:01 +08:00
若依andGitee 58673fa502 !102 浮点数运算类更新过期方法
Merge pull request !102 from GeBron/master
2019-06-13 17:40:36 +08:00
若依andGitee a1523e3bfd !100 单例模式
Merge pull request !100 from geekymv/master
2019-06-13 17:35:08 +08:00
若依andGitee 53fbd6c974 !104 启动时报错,日志目录需要配置,修改使用手册
Merge pull request !104 from jyking/master
2019-06-13 17:34:47 +08:00
jykingiMac f8165653b5 启动时报错,日志目录需要配置,修改使用手册增加:
3.1.4 日志配置
编辑src/main/ resources目录下的logback.yml 文件
<property name="log.path" value="/home/ruoyi/logs" />
改为自己需要的路径
<property name="log.path" value="/Users/jyking/project/logs" />
2019-06-13 08:45:24 +08:00
jykingiMac 2c31fc9e48 启动时报错,日志目录需要配置,修改使用手册增加:
3.1.3 日志配置
编辑src/main/ resources目录下的logback.yml 文件
<property name="log.path" value="/home/ruoyi/logs" />
改为自己需要的路径
<property name="log.path" value="/Users/jyking/project/logs" />
2019-06-13 08:43:13 +08:00
jykingiMac 1e665986a0 启动时报错,日志目录需要配置,修改使用手册增加:
3.1.3 日志配置
编辑src/main/ resources目录下的logback.yml 文件
<property name="log.path" value="/home/ruoyi/logs" />
改为自己需要的路径
<property name="log.path" value="/Users/jyking/project/logs" />
2019-06-13 08:35:58 +08:00
jykingiMac 2eec1a116c 启动时报错,日志目录需要配置,修改使用手册增加:
3.1.3 日志配置配置
编辑src/main/ resources目录下的logback.yml 文件
<property name="log.path" value="/home/ruoyi/logs" />
改为自己需要的路径
<property name="log.path" value="/Users/jyking/project/logs" />
2019-06-13 08:33:13 +08:00
GeBronandGitee fed4f1077d 更新过期的方法
BigDecimal.ROUND_HALF_UP 从 jdk9 开始标记为过期,替换为 RoundingMode.HALF_UP (since 1.5)
2019-06-12 17:28:18 +08:00
RuoYi d76c57a691 Excel导出子对象支持多个字段 2019-06-12 16:48:23 +08:00
RuoYi 90de1067d8 角色导出数据范围表达式添加部门 2019-06-12 10:51:05 +08:00
RuoYi 51b8bf85aa 移除select页面多余的js代码 2019-06-11 17:07:29 +08:00
RuoYi d74166f719 在线用户列表设置唯一列 2019-06-10 17:21:53 +08:00
RuoYi 0eeb5b8930 导航栏logo宽度调整 2019-06-06 09:07:50 +08:00
RuoYi f2b69c99e6 退出登录清理缓存 2019-06-05 19:02:07 +08:00
RuoYi f96aeca790 部门及以下数据权限(调整为以下及所有子节点) 2019-06-05 18:18:25 +08:00
geekymv 27283e75c3 单例模式 2019-06-05 16:46:36 +08:00
RuoYi 6bc852918e 详细操作样式调整 2019-06-05 15:29:33 +08:00
RuoYi fd3ffcbd89 收起菜单左侧浮动显示 2019-06-05 14:37:32 +08:00
RuoYi ea23976fde 添加新群号 2019-06-05 10:36:54 +08:00
RuoYi b46735fd78 新增同一个用户最大会话数控制 2019-06-04 16:34:11 +08:00
RuoYi d4b353d8f2 添加报表插件及示例 2019-06-04 09:22:41 +08:00
RuoYi 580ba66114 实例演示开关配置条件隐藏更换为成立才显示 2019-06-04 08:23:41 +08:00
RuoYi 77d41b279d 修改菜单及部门排序规则 2019-06-03 23:09:53 +08:00
RuoYi 9ce273c359 修改菜单及部门排序规则 2019-06-03 22:17:44 +08:00
326 changed files with 29963 additions and 12664 deletions
+29 -21
View File
@@ -4,13 +4,13 @@
性别男,若依是给还没有出生女儿取的名字(寓意:你若不离不弃,我必生死相依)
若依参考后台模板。有需要可自行到群内下载。
> 如需前后端分离版本,请移步 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue)
> 如需单应用,请移步 [RuoYi-fast](https://gitee.com/y_project/RuoYi-fast) `(保持同步更新)`,如需Oracle版本,请移步 [RuoYi-oracle](http://doc.ruoyi.vip/#/standard/xmkz) `(不定时更新)`
> 如需单应用,请移步 [RuoYi-fast](https://gitee.com/y_project/RuoYi-fast) `(保持同步更新)`,如需其他版本,请移步 [项目扩展](http://doc.ruoyi.vip/ruoyi/document/xmkz.html) `(不定时更新)`
> 阿里云通用云产品1888优惠券 :[点我领取](https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof)&nbsp;&nbsp;&nbsp;&nbsp;腾讯云通用云产品2860优惠券 [点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)&nbsp;&nbsp;`(仅限新用户)`
> 阿里云通用云产品1888优惠券 :[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof)&nbsp;&nbsp;&nbsp;&nbsp;腾讯云通用云产品2860优惠券 [点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)&nbsp;&nbsp;`(仅限新用户)`
> 阿里云Hi拼购 限量爆款 低至199元/年 [https://www.aliyun.com/acts/hi-group-buying?userCode=brki8iof](https://www.aliyun.com/acts/hi-group-buying?userCode=brki8iof)&nbsp;&nbsp;`(仅限新用户)`
> 阿里云Hi拼购 限量爆款 低至199元/年 [点我进入](https://www.aliyun.com/acts/hi-group-buying?userCode=brki8iof)&nbsp;&nbsp;`(仅限新用户)`
## 内置功能
@@ -26,7 +26,7 @@
10. 登录日志:系统登录日志记录查询包含登录异常。
11. 在线用户:当前系统中活跃用户状态监控。
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
13. 代码生成:前后端代码的生成(java、html、xml、sql支持CRUD下载 。
14. 系统接口:根据业务代码自动生成相关的api接口文档。
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
16. 在线构建器:拖动表单元素生成相应的HTML代码。
@@ -44,39 +44,47 @@
<table>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/25b5e333768d013d45a990c152dbe4d9d6e.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/5ac52ccc07a59f12205948c9408791f5c5b.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/e29fd81b2d43b517f99535564af41f9d1d5.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/66f8b5b24720dabe0e11ae84bd1ad4b038e.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/a46f34786bc9fc400697b6f3677be5bb3f0.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/629f1510fb6205f773c8c284863406b694f.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/9124eda87df0e72427cd63f458b813e3363.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/6010201b078dbc9e1d8c09c6a3e53f4344c.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/058928ad3a6e6de67b43d62d42dbf071355.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/438c59467afd0097cfbe9c89db932661687.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/72a015041db6843aca7f7b273688cb346f8.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/21acdcade5e306f2c5d7ae26993b4e6bd06.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/ad5ea3c4c2ea2e91d1f05f6cc384cbad2a1.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/ecb5f1c9929f1933f733f796749b2df73d9.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/e4283d500eb10e8dd8701e7742f7facb065.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/6ca845cca1701fbf71881efe4f341c82f99.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/e3aeb8fff585594f6e947218e14f2806ea1.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/2531dbf419a1b114e1177f8d2a120b8a9c3.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/8b740a42dddc1e5a8a150d97c5060df258b.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/197ddc2fdffc27020f8624bd7ca1a971f61.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/a2dabea752d7d70aede20908dee0b419829.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/00e642dc3515919b3760968cc496a12a849.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/f72d28a3e60413a4e1b5c7c2f45f962fd65.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/c5699c5726b5aebde71a37bb5163d840bc2.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/24740d59377e826d0d8664ebad66dc84abd.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/19222e495869a2a99fc31c5d2bd4539e1e7.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/264d25176f4e22b4b38e95fe6ce73775299.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/bbe7fe1048d29217ba73bd3ed88d6743b55.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/5f3d39a141f21f81b90536f391b8408f1fa.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/d85fbb59be27fb33f68bdbb6e8bc967c97b.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/bb902d2c54bad02a052e9a05e5f22a93df1.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/30cda883bb9a7f74f1454314e64f949942d.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/deebaaa8d6b14a419ed5911f49e3f222a6f.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/bed2b98a44e7ae820c2885329e711965c28.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-6d73c2140ce694e3de4c05035fdc1868d4c.png"/></td>
</tr>
</table>
## 若依交流群
QQ群: [![加入QQ群](https://img.shields.io/badge/已满-1389287-blue.svg)](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [![加入QQ群](https://img.shields.io/badge/已满-1679294-blue.svg)](https://jq.qq.com/?_wv=1027&k=5cHeRVW) [![加入QQ群](https://img.shields.io/badge/已满-1529866-blue.svg)](https://jq.qq.com/?_wv=1027&k=53R0L5Z) [![加入QQ群](https://img.shields.io/badge/已满-1772718-blue.svg)](https://jq.qq.com/?_wv=1027&k=5g75dCU) [![加入QQ群](https://img.shields.io/badge/1366522-blue.svg)](https://jq.qq.com/?_wv=1027&k=58cPoHA) 点击按钮入群。
QQ群: [![加入QQ群](https://img.shields.io/badge/已满-1389287-blue.svg)](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [![加入QQ群](https://img.shields.io/badge/已满-1679294-blue.svg)](https://jq.qq.com/?_wv=1027&k=5cHeRVW) [![加入QQ群](https://img.shields.io/badge/已满-1529866-blue.svg)](https://jq.qq.com/?_wv=1027&k=53R0L5Z) [![加入QQ群](https://img.shields.io/badge/已满-1772718-blue.svg)](https://jq.qq.com/?_wv=1027&k=5g75dCU) [![加入QQ群](https://img.shields.io/badge/已满-1366522-blue.svg)](https://jq.qq.com/?_wv=1027&k=58cPoHA) [![加入QQ群](https://img.shields.io/badge/已满-1382251-blue.svg)](https://jq.qq.com/?_wv=1027&k=5Ofd4Pb) [![加入QQ群](https://img.shields.io/badge/已满-1145125-blue.svg)](https://jq.qq.com/?_wv=1027&k=5yugASz) [![加入QQ群](https://img.shields.io/badge/已满-86752435-blue.svg)](https://jq.qq.com/?_wv=1027&k=5Rf3d2P) [![加入QQ群](https://img.shields.io/badge/已满-134072510-blue.svg)](https://jq.qq.com/?_wv=1027&k=5ZIjaeP) [![加入QQ群](https://img.shields.io/badge/已满-210336300-blue.svg)](https://jq.qq.com/?_wv=1027&k=5CJw1jY) [![加入QQ群](https://img.shields.io/badge/339522636-blue.svg)](https://jq.qq.com/?_wv=1027&k=5omzbKc)
Binary file not shown.
+12 -11
View File
@@ -6,18 +6,18 @@
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi</artifactId>
<version>3.4</version>
<version>4.2.0</version>
<name>ruoyi</name>
<url>http://www.ruoyi.vip</url>
<description>若依管理系统</description>
<properties>
<ruoyi.version>3.4</ruoyi.version>
<ruoyi.version>4.2.0</ruoyi.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<shiro.version>1.4.0</shiro.version>
<shiro.version>1.4.2</shiro.version>
<thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version>
<mybatis.boot.version>1.3.2</mybatis.boot.version>
<druid.version>1.1.14</druid.version>
@@ -25,10 +25,10 @@
<kaptcha.version>2.3.2</kaptcha.version>
<swagger.version>2.9.2</swagger.version>
<pagehelper.boot.version>1.2.5</pagehelper.boot.version>
<fastjson.version>1.2.60</fastjson.version>
<oshi.version>3.9.1</oshi.version>
<commons.io.version>2.5</commons.io.version>
<commons.fileupload.version>1.3.3</commons.fileupload.version>
<jsoup.version>1.11.3</jsoup.version>
<poi.version>3.17</poi.version>
<velocity.version>1.7</velocity.version>
</properties>
@@ -147,13 +147,6 @@
<version>${commons.fileupload.version}</version>
</dependency>
<!-- HTML解析器 -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>${jsoup.version}</version>
</dependency>
<!-- excel工具 -->
<dependency>
<groupId>org.apache.poi</groupId>
@@ -167,6 +160,13 @@
<artifactId>velocity</artifactId>
<version>${velocity.version}</version>
</dependency>
<!-- 阿里JSON解析器 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!-- 定时任务-->
<dependency>
@@ -228,6 +228,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
+4 -3
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.4</version>
<version>4.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
@@ -80,6 +80,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.1.RELEASE</version>
<configuration>
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
</configuration>
@@ -97,11 +98,11 @@
<version>3.0.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<warName>${artifactId}</warName>
<warName>${project.artifactId}</warName>
</configuration>
</plugin>
</plugins>
<finalName>${artifactId}</finalName>
<finalName>${project.artifactId}</finalName>
</build>
</project>
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.config.Global;
import com.ruoyi.common.config.ServerConfig;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileUploadUtils;
@@ -27,11 +28,6 @@ public class CommonController
{
private static final Logger log = LoggerFactory.getLogger(CommonController.class);
/**
* 文件上传路径
*/
public static final String UPLOAD_PATH = "/profile/upload/";
@Autowired
private ServerConfig serverConfig;
@@ -82,7 +78,7 @@ public class CommonController
String filePath = Global.getUploadPath();
// 上传并返回新文件名称
String fileName = FileUploadUtils.upload(filePath, file);
String url = serverConfig.getUrl() + UPLOAD_PATH + fileName;
String url = serverConfig.getUrl() + fileName;
AjaxResult ajax = AjaxResult.success();
ajax.put("fileName", fileName);
ajax.put("url", url);
@@ -93,4 +89,24 @@ public class CommonController
return AjaxResult.error(e.getMessage());
}
}
/**
* 本地资源通用下载
*/
@GetMapping("/common/download/resource")
public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
throws Exception
{
// 本地资源路径
String localPath = Global.getProfile();
// 数据库资源地址
String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
// 下载名称
String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
response.setCharacterEncoding("utf-8");
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition",
"attachment;fileName=" + FileUtils.setFileDownloadHeader(request, downloadName));
FileUtils.writeBytes(downloadPath, response.getOutputStream());
}
}
@@ -46,6 +46,15 @@ public class DemoFormController
return prefix + "/select";
}
/**
* 时间轴
*/
@GetMapping("/timeline")
public String timeline()
{
return prefix + "/timeline";
}
/**
* 表单校验
*/
@@ -136,6 +145,24 @@ public class DemoFormController
return prefix + "/basic";
}
/**
* 卡片列表
*/
@GetMapping("/cards")
public String cards()
{
return prefix + "/cards";
}
/**
* summernote 富文本编辑器
*/
@GetMapping("/summernote")
public String summernote()
{
return prefix + "/summernote";
}
/**
* 搜索自动补全
*/
@@ -103,6 +103,17 @@ public class DemoOperateController extends BaseController
}
}
}
else if (StringUtils.isNotEmpty(userModel.getUserName()))
{
userList.clear();
for (Map.Entry<Integer, UserOperateModel> entry : users.entrySet())
{
if (entry.getValue().getUserName().equals(userModel.getUserName()))
{
userList.add(entry.getValue());
}
}
}
PageDomain pageDomain = TableSupport.buildPageRequest();
if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize())
{
@@ -0,0 +1,53 @@
package com.ruoyi.web.controller.demo.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* 报表
*
* @author ruoyi
*/
@Controller
@RequestMapping("/demo/report")
public class DemoReportController
{
private String prefix = "demo/report";
/**
* 百度ECharts
*/
@GetMapping("/echarts")
public String echarts()
{
return prefix + "/echarts";
}
/**
* 图表插件
*/
@GetMapping("/peity")
public String peity()
{
return prefix + "/peity";
}
/**
* 线状图插件
*/
@GetMapping("/sparkline")
public String sparkline()
{
return prefix + "/sparkline";
}
/**
* 图表组合
*/
@GetMapping("/metrics")
public String metrics()
{
return prefix + "/metrics";
}
}
@@ -166,6 +166,15 @@ public class DemoTableController extends BaseController
{
return prefix + "/detail";
}
/**
* 表格父子视图
*/
@GetMapping("/child")
public String child()
{
return prefix + "/child";
}
/**
* 表格图片预览
@@ -176,6 +185,33 @@ public class DemoTableController extends BaseController
return prefix + "/image";
}
/**
* 动态增删改查
*/
@GetMapping("/curd")
public String curd()
{
return prefix + "/curd";
}
/**
* 表格拖拽操作
*/
@GetMapping("/reorder")
public String reorder()
{
return prefix + "/reorder";
}
/**
* 表格行内编辑操作
*/
@GetMapping("/editable")
public String editable()
{
return prefix + "/editable";
}
/**
* 表格其他操作
*/
@@ -15,7 +15,7 @@ import com.ruoyi.common.core.controller.BaseController;
@RequestMapping("/monitor/data")
public class DruidController extends BaseController
{
private String prefix = "/monitor/druid";
private String prefix = "/druid";
@RequiresPermissions("monitor:data:view")
@GetMapping()
@@ -1,6 +1,7 @@
package com.ruoyi.web.controller.monitor;
import java.util.List;
import com.ruoyi.framework.shiro.service.SysPasswordService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@@ -31,6 +32,9 @@ public class SysLogininforController extends BaseController
@Autowired
private ISysLogininforService logininforService;
@Autowired
private SysPasswordService passwordService;
@RequiresPermissions("monitor:logininfor:view")
@GetMapping()
public String logininfor()
@@ -77,4 +81,14 @@ public class SysLogininforController extends BaseController
logininforService.cleanLogininfor();
return success();
}
@RequiresPermissions("monitor:logininfor:unlock")
@Log(title = "账户解锁", businessType = BusinessType.OTHER)
@PostMapping("/unlock")
@ResponseBody
public AjaxResult unlock(String loginName)
{
passwordService.unlock(loginName);
return success();
}
}
@@ -5,12 +5,14 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
@@ -81,8 +83,12 @@ public class SysConfigController extends BaseController
@Log(title = "参数管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysConfig config)
public AjaxResult addSave(@Validated SysConfig config)
{
if (UserConstants.CONFIG_KEY_NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
{
return error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
}
config.setCreateBy(ShiroUtils.getLoginName());
return toAjax(configService.insertConfig(config));
}
@@ -104,8 +110,12 @@ public class SysConfigController extends BaseController
@Log(title = "参数管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysConfig config)
public AjaxResult editSave(@Validated SysConfig config)
{
if (UserConstants.CONFIG_KEY_NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
{
return error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
}
config.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(configService.updateConfig(config));
}
@@ -122,6 +132,19 @@ public class SysConfigController extends BaseController
return toAjax(configService.deleteConfigByIds(ids));
}
/**
* 清空缓存
*/
@RequiresPermissions("system:config:remove")
@Log(title = "参数管理", businessType = BusinessType.CLEAN)
@GetMapping("/clearCache")
@ResponseBody
public AjaxResult clearCache()
{
configService.clearCache();
return success();
}
/**
* 校验参数键名
*/
@@ -5,12 +5,14 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.Ztree;
@@ -43,7 +45,7 @@ public class SysDeptController extends BaseController
}
@RequiresPermissions("system:dept:list")
@GetMapping("/list")
@PostMapping("/list")
@ResponseBody
public List<SysDept> list(SysDept dept)
{
@@ -68,8 +70,12 @@ public class SysDeptController extends BaseController
@RequiresPermissions("system:dept:add")
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysDept dept)
public AjaxResult addSave(@Validated SysDept dept)
{
if (UserConstants.DEPT_NAME_NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
{
return error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在");
}
dept.setCreateBy(ShiroUtils.getLoginName());
return toAjax(deptService.insertDept(dept));
}
@@ -96,8 +102,16 @@ public class SysDeptController extends BaseController
@RequiresPermissions("system:dept:edit")
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysDept dept)
public AjaxResult editSave(@Validated SysDept dept)
{
if (UserConstants.DEPT_NAME_NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
{
return error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
}
else if (dept.getParentId().equals(dept.getDeptId()))
{
return error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
}
dept.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(deptService.updateDept(dept));
}
@@ -5,6 +5,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
@@ -79,7 +80,7 @@ public class SysDictDataController extends BaseController
@RequiresPermissions("system:dict:add")
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysDictData dict)
public AjaxResult addSave(@Validated SysDictData dict)
{
dict.setCreateBy(ShiroUtils.getLoginName());
return toAjax(dictDataService.insertDictData(dict));
@@ -102,7 +103,7 @@ public class SysDictDataController extends BaseController
@RequiresPermissions("system:dict:edit")
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysDictData dict)
public AjaxResult editSave(@Validated SysDictData dict)
{
dict.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(dictDataService.updateDictData(dict));
@@ -5,14 +5,17 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.Ztree;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
@@ -79,8 +82,12 @@ public class SysDictTypeController extends BaseController
@RequiresPermissions("system:dict:add")
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysDictType dict)
public AjaxResult addSave(@Validated SysDictType dict)
{
if (UserConstants.DICT_TYPE_NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
{
return error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
}
dict.setCreateBy(ShiroUtils.getLoginName());
return toAjax(dictTypeService.insertDictType(dict));
}
@@ -102,8 +109,12 @@ public class SysDictTypeController extends BaseController
@RequiresPermissions("system:dict:edit")
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysDictType dict)
public AjaxResult editSave(@Validated SysDictType dict)
{
if (UserConstants.DICT_TYPE_NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
{
return error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
}
dict.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(dictTypeService.updateDictType(dict));
}
@@ -114,14 +125,20 @@ public class SysDictTypeController extends BaseController
@ResponseBody
public AjaxResult remove(String ids)
{
try
{
return toAjax(dictTypeService.deleteDictTypeByIds(ids));
}
catch (Exception e)
{
return error(e.getMessage());
}
return toAjax(dictTypeService.deleteDictTypeByIds(ids));
}
/**
* 清空缓存
*/
@RequiresPermissions("system:dict:remove")
@Log(title = "字典类型", businessType = BusinessType.CLEAN)
@GetMapping("/clearCache")
@ResponseBody
public AjaxResult clearCache()
{
dictTypeService.clearCache();
return success();
}
/**
@@ -145,4 +162,27 @@ public class SysDictTypeController extends BaseController
{
return dictTypeService.checkDictTypeUnique(dictType);
}
/**
* 选择字典树
*/
@GetMapping("/selectDictTree/{columnId}/{dictType}")
public String selectDeptTree(@PathVariable("columnId") Long columnId, @PathVariable("dictType") String dictType,
ModelMap mmap)
{
mmap.put("columnId", columnId);
mmap.put("dict", dictTypeService.selectDictTypeByType(dictType));
return prefix + "/tree";
}
/**
* 加载字典列表树
*/
@GetMapping("/treeData")
@ResponseBody
public List<Ztree> treeData()
{
List<Ztree> ztrees = dictTypeService.selectDictTree(new SysDictType());
return ztrees;
}
}
@@ -10,6 +10,7 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysMenu;
import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysMenuService;
/**
@@ -23,6 +24,9 @@ public class SysIndexController extends BaseController
@Autowired
private ISysMenuService menuService;
@Autowired
private ISysConfigService configService;
// 系统首页
@GetMapping("/index")
public String index(ModelMap mmap)
@@ -33,11 +37,20 @@ public class SysIndexController extends BaseController
List<SysMenu> menus = menuService.selectMenusByUser(user);
mmap.put("menus", menus);
mmap.put("user", user);
mmap.put("sideTheme", configService.selectConfigByKey("sys.index.sideTheme"));
mmap.put("skinName", configService.selectConfigByKey("sys.index.skinName"));
mmap.put("copyrightYear", Global.getCopyrightYear());
mmap.put("demoEnabled", Global.isDemoEnabled());
return "index";
}
// 切换主题
@GetMapping("/system/switchSkin")
public String switchSkin(ModelMap mmap)
{
return "skin";
}
// 系统介绍
@GetMapping("/system/main")
public String main(ModelMap mmap)
@@ -5,12 +5,14 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.Ztree;
@@ -42,11 +44,12 @@ public class SysMenuController extends BaseController
}
@RequiresPermissions("system:menu:list")
@GetMapping("/list")
@PostMapping("/list")
@ResponseBody
public List<SysMenu> list(SysMenu menu)
{
List<SysMenu> menuList = menuService.selectMenuList(menu);
Long userId = ShiroUtils.getUserId();
List<SysMenu> menuList = menuService.selectMenuList(menu, userId);
return menuList;
}
@@ -99,8 +102,12 @@ public class SysMenuController extends BaseController
@RequiresPermissions("system:menu:add")
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysMenu menu)
public AjaxResult addSave(@Validated SysMenu menu)
{
if (UserConstants.MENU_NAME_NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
{
return error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
}
menu.setCreateBy(ShiroUtils.getLoginName());
ShiroUtils.clearCachedAuthorizationInfo();
return toAjax(menuService.insertMenu(menu));
@@ -123,8 +130,12 @@ public class SysMenuController extends BaseController
@RequiresPermissions("system:menu:edit")
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysMenu menu)
public AjaxResult editSave(@Validated SysMenu menu)
{
if (UserConstants.MENU_NAME_NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
{
return error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
}
menu.setUpdateBy(ShiroUtils.getLoginName());
ShiroUtils.clearCachedAuthorizationInfo();
return toAjax(menuService.updateMenu(menu));
@@ -156,7 +167,8 @@ public class SysMenuController extends BaseController
@ResponseBody
public List<Ztree> roleMenuTreeData(SysRole role)
{
List<Ztree> ztrees = menuService.roleMenuTreeData(role);
Long userId = ShiroUtils.getUserId();
List<Ztree> ztrees = menuService.roleMenuTreeData(role, userId);
return ztrees;
}
@@ -165,9 +177,10 @@ public class SysMenuController extends BaseController
*/
@GetMapping("/menuTreeData")
@ResponseBody
public List<Ztree> menuTreeData(SysRole role)
public List<Ztree> menuTreeData()
{
List<Ztree> ztrees = menuService.menuTreeData();
Long userId = ShiroUtils.getUserId();
List<Ztree> ztrees = menuService.menuTreeData(userId);
return ztrees;
}
@@ -5,12 +5,14 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
@@ -94,8 +96,16 @@ public class SysPostController extends BaseController
@Log(title = "岗位管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysPost post)
public AjaxResult addSave(@Validated SysPost post)
{
if (UserConstants.POST_NAME_NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
{
return error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在");
}
else if (UserConstants.POST_CODE_NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
{
return error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在");
}
post.setCreateBy(ShiroUtils.getLoginName());
return toAjax(postService.insertPost(post));
}
@@ -117,8 +127,16 @@ public class SysPostController extends BaseController
@Log(title = "岗位管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysPost post)
public AjaxResult editSave(@Validated SysPost post)
{
if (UserConstants.POST_NAME_NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
{
return error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
}
else if (UserConstants.POST_CODE_NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
{
return error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在");
}
post.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(postService.updatePost(post));
}
@@ -0,0 +1,46 @@
package com.ruoyi.web.controller.system;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.framework.shiro.service.SysRegisterService;
import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.service.ISysConfigService;
/**
* 注册验证
*
* @author ruoyi
*/
@Controller
public class SysRegisterController extends BaseController
{
@Autowired
private SysRegisterService registerService;
@Autowired
private ISysConfigService configService;
@GetMapping("/register")
public String register()
{
return "register";
}
@PostMapping("/register")
@ResponseBody
public AjaxResult ajaxRegister(SysUser user)
{
if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser"))))
{
return error("当前系统没有开启注册功能!");
}
String msg = registerService.register(user);
return StringUtils.isEmpty(msg) ? success() : error(msg);
}
}
@@ -5,12 +5,14 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
@@ -84,8 +86,16 @@ public class SysRoleController extends BaseController
@Log(title = "角色管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysRole role)
public AjaxResult addSave(@Validated SysRole role)
{
if (UserConstants.ROLE_NAME_NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
{
return error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
}
else if (UserConstants.ROLE_KEY_NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
{
return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
}
role.setCreateBy(ShiroUtils.getLoginName());
ShiroUtils.clearCachedAuthorizationInfo();
return toAjax(roleService.insertRole(role));
@@ -109,8 +119,17 @@ public class SysRoleController extends BaseController
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysRole role)
public AjaxResult editSave(@Validated SysRole role)
{
roleService.checkRoleAllowed(role);
if (UserConstants.ROLE_NAME_NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
{
return error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
}
else if (UserConstants.ROLE_KEY_NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
{
return error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
}
role.setUpdateBy(ShiroUtils.getLoginName());
ShiroUtils.clearCachedAuthorizationInfo();
return toAjax(roleService.updateRole(role));
@@ -135,6 +154,7 @@ public class SysRoleController extends BaseController
@ResponseBody
public AjaxResult authDataScopeSave(SysRole role)
{
roleService.checkRoleAllowed(role);
role.setUpdateBy(ShiroUtils.getLoginName());
if (roleService.authDataScope(role) > 0)
{
@@ -198,6 +218,7 @@ public class SysRoleController extends BaseController
@ResponseBody
public AjaxResult changeStatus(SysRole role)
{
roleService.checkRoleAllowed(role);
return toAjax(roleService.changeStatus(role));
}
@@ -5,6 +5,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
@@ -17,11 +18,11 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.shiro.service.SysPasswordService;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.domain.SysUserRole;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService;
@@ -117,15 +118,19 @@ public class SysUserController extends BaseController
@Log(title = "用户管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysUser user)
public AjaxResult addSave(@Validated SysUser user)
{
if (StringUtils.isNotNull(user.getUserId()) && SysUser.isAdmin(user.getUserId()))
{
return error("不允许修改超级管理员用户");
}
if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(user.getLoginName())))
{
return error("保存用户'" + user.getLoginName() + "'失败,登录账号已存在");
return error("新增用户'" + user.getLoginName() + "'失败,登录账号已存在");
}
else if (UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
{
return error("新增用户'" + user.getLoginName() + "'失败,手机号码已存在");
}
else if (UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
{
return error("新增用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
}
user.setSalt(ShiroUtils.randomSalt());
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
@@ -152,11 +157,16 @@ public class SysUserController extends BaseController
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysUser user)
public AjaxResult editSave(@Validated SysUser user)
{
if (StringUtils.isNotNull(user.getUserId()) && SysUser.isAdmin(user.getUserId()))
userService.checkUserAllowed(user);
if (UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
{
return error("不允许修改超级管理员用户");
return error("修改用户'" + user.getLoginName() + "'失败,手机号码已存在");
}
else if (UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
{
return error("修改用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
}
user.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(userService.updateUser(user));
@@ -177,9 +187,45 @@ public class SysUserController extends BaseController
@ResponseBody
public AjaxResult resetPwdSave(SysUser user)
{
userService.checkUserAllowed(user);
user.setSalt(ShiroUtils.randomSalt());
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
return toAjax(userService.resetUserPwd(user));
if (userService.resetUserPwd(user) > 0)
{
if (ShiroUtils.getUserId() == user.getUserId())
{
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
}
return success();
}
return error();
}
/**
* 进入授权角色页
*/
@GetMapping("/authRole/{userId}")
public String authRole(@PathVariable("userId") Long userId, ModelMap mmap)
{
SysUser user = userService.selectUserById(userId);
// 获取用户所属的角色列表
List<SysUserRole> userRoles = userService.selectUserRoleByUserId(userId);
mmap.put("user", user);
mmap.put("userRoles", userRoles);
return prefix + "/authRole";
}
/**
* 用户授权角色
*/
@RequiresPermissions("system:user:add")
@Log(title = "用户管理", businessType = BusinessType.GRANT)
@PostMapping("/authRole/insertAuthRole")
@ResponseBody
public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
{
userService.insertUserAuth(userId, roleIds);
return success();
}
@RequiresPermissions("system:user:remove")
@@ -237,6 +283,7 @@ public class SysUserController extends BaseController
@ResponseBody
public AjaxResult changeStatus(SysUser user)
{
userService.checkUserAllowed(user);
return toAjax(userService.changeStatus(user));
}
}
@@ -41,7 +41,10 @@ spring:
enabled: true
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /monitor/druid/*
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username:
login-password:
filter:
stat:
enabled: true
@@ -3,13 +3,13 @@ ruoyi:
# 名称
name: RuoYi
# 版本
version: 3.4.0
version: 4.2.0
# 版权年份
copyrightYear: 2019
# 实例演示开关
demoEnabled: true
# 文件路径
profile: D:/profile/
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: D:/ruoyi/uploadPath
# 获取ip地址开关
addressEnabled: true
@@ -73,7 +73,7 @@ spring:
# MyBatis
mybatis:
# 搜索指定包别名
typeAliasesPackage: com.ruoyi
typeAliasesPackage: com.ruoyi.**.domain
# 配置mapper的扫描,找到所有的mapper.xml映射文件
mapperLocations: classpath*:mapper/**/*Mapper.xml
# 加载全局的配置文件
@@ -109,12 +109,16 @@ shiro:
# 设置Cookie的过期时间,天为单位
maxAge: 30
session:
# Session超时时间(默认30分钟)
# Session超时时间-1代表永不过期(默认30分钟)
expireTime: 30
# 同步session到数据库的周期(默认1分钟)
dbSyncPeriod: 1
# 相隔多久检查一次session的有效性,默认就是10分钟
validationInterval: 10
# 同一个用户最大会话数,比如2的意思是同一个账号允许最多同时两个人登录(默认-1不限制)
maxSession: -1
# 踢出之前登录的/之后登录的用户,默认踢出之前登录的用户
kickoutAfter: false
# 防止XSS攻击
xss:
@@ -3,7 +3,15 @@
<!-- 磁盘缓存位置 -->
<diskStore path="java.io.tmpdir"/>
<!-- maxEntriesLocalHeap:堆内存中最大缓存对象数,0没有限制 -->
<!-- maxElementsInMemory 在内存中缓存的element的最大数目。-->
<!-- eternal:elements是否永久有效,如果为truetimeouts将被忽略,element将永不过期 -->
<!-- timeToIdleSeconds:失效前的空闲秒数,当eternal为false时,这个属性才有效,0为不限制 -->
<!-- timeToLiveSeconds:失效前的存活秒数,创建时间到失效时间的间隔为存活时间,当eternal为false时,这个属性才有效,0为不限制 -->
<!-- overflowToDisk: 如果内存中数据超过内存限制,是否要缓存到磁盘上 -->
<!-- statistics:是否收集统计信息。如果需要监控缓存使用情况,应该打开这个选项。默认为关闭(统计会影响性能)。设置statistics="true"开启统计 -->
<!-- 默认缓存 -->
<defaultCache
maxEntriesLocalHeap="1000"
@@ -23,5 +31,51 @@
statistics="true">
</cache>
<!-- 系统活跃用户缓存 -->
<cache name="sys-userCache"
maxEntriesLocalHeap="10000"
overflowToDisk="false"
eternal="false"
diskPersistent="false"
timeToLiveSeconds="0"
timeToIdleSeconds="0"
statistics="true">
</cache>
<!-- 系统缓存 -->
<cache name="sys-cache"
maxEntriesLocalHeap="1000"
eternal="true"
overflowToDisk="true"
statistics="true">
</cache>
<!-- 系统参数缓存 -->
<cache name="sys-config"
maxEntriesLocalHeap="1000"
eternal="true"
overflowToDisk="true"
statistics="true">
</cache>
<!-- 系统字典缓存 -->
<cache name="sys-dict"
maxEntriesLocalHeap="1000"
eternal="true"
overflowToDisk="true"
statistics="true">
</cache>
<!-- 系统会话缓存 -->
<cache name="shiro-activeSessionCache"
maxElementsInMemory="10000"
overflowToDisk="true"
eternal="true"
timeToLiveSeconds="0"
timeToIdleSeconds="0"
diskPersistent="true"
diskExpiryThreadIntervalSeconds="600">
</cache>
</ehcache>
@@ -61,7 +61,7 @@
}
.krajee-default .file-thumb-progress .progress, .krajee-default .file-thumb-progress .progress-bar {
height: 11px;
height: 20px;
font-family: Verdana, Helvetica, sans-serif;
font-size: 9px;
}
@@ -102,7 +102,7 @@
font-size: 13px;
font-variant: small-caps;
color: #999;
background: transparent url(../img/loading.gif) top left no-repeat;
background: transparent url(loading.gif) top left no-repeat;
}
.file-object {
@@ -397,7 +397,7 @@
}
.file-thumb-loading {
background: transparent url(../img/loading.gif) no-repeat scroll center center content-box !important;
background: transparent url(loading.gif) no-repeat scroll center center content-box !important;
}
.file-drop-zone {
@@ -434,7 +434,7 @@
}
.file-uploading {
background: url(../img/loading-sm.gif) no-repeat center bottom 10px;
background: url(loading-sm.gif) no-repeat center bottom 10px;
opacity: 0.65;
}
@@ -527,7 +527,7 @@
}
.file-loading[dir=rtl]:before {
background: transparent url(../img/loading.gif) top right no-repeat;
background: transparent url(loading.gif) top right no-repeat;
padding-left: 0;
padding-right: 20px;
}
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
/**
* 基于bootstrap-table-fixed-columns修改
* 支持左右列冻结
* 支持左右列冻结、支持固定高度
* Copyright (c) 2019 ruoyi
*/
(function ($) {
@@ -22,17 +22,25 @@
this.timeoutHeaderColumns_ = 0;
this.timeoutBodyColumns_ = 0;
if (this.options.fixedColumns) {
this.$fixedBody = $([
this.$fixedHeader = $([
'<div class="left-fixed-table-columns">',
'<table>',
'<thead></thead>',
'</table>',
'</div>'].join(''));
this.$fixedHeader.find('table').attr('class', this.$el.attr('class'));
this.$fixedHeaderColumns = this.$fixedHeader.find('thead');
this.$tableHeader.before(this.$fixedHeader);
this.$fixedBody = $([
'<div class="left-fixed-body-columns">',
'<table>',
'<tbody></tbody>',
'</table>',
'</div>'].join(''));
this.$fixedBody.find('table').attr('class', this.$el.attr('class'));
this.$fixedHeaderColumns = this.$fixedBody.find('thead');
this.$fixedBodyColumns = this.$fixedBody.find('tbody');
this.$tableBody.before(this.$fixedBody);
}
@@ -86,7 +94,8 @@
this.$selectAll = $ltr.find('[name="btSelectAll"]');
this.$selectAll.on('click', function () {
var checked = $(this).prop('checked');
$(".left-fixed-table-columns input[name=btSelectItem]").filter(':enabled').prop('checked', checked);
$(".left-fixed-body-columns input[name=btSelectItem]").filter(':enabled').prop('checked', checked);
$('.fixed-table-body input[name=btSelectItem]').closest('tr').removeClass('selected');
});
}
};
@@ -167,12 +176,11 @@
if (that.options.detailView && !that.options.cardView) {
index = i - 1;
}
that.$fixedBody.find('thead th[data-field="' + visibleFields[index] + '"]')
.find('.fht-cell').width($this.innerWidth() - 1);
that.$fixedHeader.find('thead th[data-field="' + visibleFields[index] + '"]')
.find('.fht-cell').width($this.innerWidth());
headerWidth += $this.outerWidth();
});
this.$fixedBody.width(headerWidth - 1).show();
this.$fixedHeader.width(headerWidth + 2).show();
}
if (that.options.rightFixedColumns) {
this.$body.find('tr:first-child:not(.no-records-found) > *').each(function (i) {
@@ -197,27 +205,43 @@
BootstrapTable.prototype.fitBodyColumns = function () {
var that = this,
top = -(parseInt(this.$el.css('margin-top')) - 2),
height = this.$tableBody.height() - 2;
top = -(parseInt(this.$el.css('margin-top'))),
height = this.$tableBody.height();
if (that.options.fixedColumns) {
if (!this.$body.find('> tr[data-index]').length) {
this.$fixedBody.hide();
return;
}
if (!this.options.height) {
top = this.$fixedHeader.height()- 1;
height = height - top;
}
this.$fixedBody.css({
width: this.$fixedHeader.width(),
height: height,
top: top + 1
}).show();
this.$body.find('> tr').each(function (i) {
that.$fixedBody.find('tbody tr:eq(' + i + ')').height($(this).height());
that.$fixedBody.find('tr:eq(' + i + ')').height($(this).height() - 0.5);
var thattds = this;
that.$fixedBody.find('tr:eq(' + i + ')').find('td').each(function (j) {
$(this).width($($(thattds).find('td')[j]).width() + 1);
});
});
$("#" + $.table._option.id).on("check.bs.table uncheck.bs.table", function (e, rows, $element) {
$("#" + table.options.id).on("check.bs.table uncheck.bs.table", function (e, rows, $element) {
var index= $element.data('index');
$(this).find('.bs-checkbox').find('input[data-index="' + index + '"]').prop("checked", true);
var selectFixedItem = $('.left-fixed-table-columns input[name=btSelectItem]');
var selectFixedItem = $('.left-fixed-body-columns input[name=btSelectItem]');
var checkAll = selectFixedItem.filter(':enabled').length &&
selectFixedItem.filter(':enabled').length ===
selectFixedItem.filter(':enabled').filter(':checked').length;
$(".left-fixed-table-columns input[name=btSelectAll]").prop('checked', checkAll);
$('.fixed-table-body input[name=btSelectItem]').closest('tr').removeClass('selected');
});
//// events
@@ -0,0 +1,663 @@
/*! X-editable - v1.5.1
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
* http://github.com/vitalets/x-editable
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
.editableform {
margin-bottom: 0; /* overwrites bootstrap margin */
}
.editableform .control-group {
margin-bottom: 0; /* overwrites bootstrap margin */
white-space: nowrap; /* prevent wrapping buttons on new line */
line-height: 20px; /* overwriting bootstrap line-height. See #133 */
}
/*
BS3 width:1005 for inputs breaks editable form in popup
See: https://github.com/vitalets/x-editable/issues/393
*/
.editableform .form-control {
width: auto;
}
.editable-buttons {
display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
vertical-align: top;
margin-left: 7px;
/* inline-block emulation for IE7*/
zoom: 1;
*display: inline;
}
.editable-buttons.editable-buttons-bottom {
display: block;
margin-top: 7px;
margin-left: 0;
}
.editable-input {
vertical-align: top;
display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
width: auto; /* bootstrap-responsive has width: 100% that breakes layout */
white-space: normal; /* reset white-space decalred in parent*/
/* display-inline emulation for IE7*/
zoom: 1;
*display: inline;
}
.editable-buttons .editable-cancel {
margin-left: 7px;
}
/*for jquery-ui buttons need set height to look more pretty*/
.editable-buttons button.ui-button-icon-only {
height: 24px;
width: 30px;
}
.editableform-loading {
background: url('loading.gif') center center no-repeat;
height: 25px;
width: auto;
min-width: 25px;
}
.editable-inline .editableform-loading {
background-position: left 5px;
}
.editable-error-block {
max-width: 300px;
margin: 5px 0 0 0;
width: auto;
white-space: normal;
}
/*add padding for jquery ui*/
.editable-error-block.ui-state-error {
padding: 3px;
}
.editable-error {
color: red;
}
/* ---- For specific types ---- */
.editableform .editable-date {
padding: 0;
margin: 0;
float: left;
}
/* move datepicker icon to center of add-on button. See https://github.com/vitalets/x-editable/issues/183 */
.editable-inline .add-on .icon-th {
margin-top: 3px;
margin-left: 1px;
}
/* checklist vertical alignment */
.editable-checklist label input[type="checkbox"],
.editable-checklist label span {
vertical-align: middle;
margin: 0;
}
.editable-checklist label {
white-space: nowrap;
}
/* set exact width of textarea to fit buttons toolbar */
.editable-wysihtml5 {
width: 566px;
height: 250px;
}
/* clear button shown as link in date inputs */
.editable-clear {
clear: both;
font-size: 0.9em;
text-decoration: none;
text-align: right;
}
/* IOS-style clear button for text inputs */
.editable-clear-x {
background: url('clear.png') center center no-repeat;
display: block;
width: 13px;
height: 13px;
position: absolute;
opacity: 0.6;
z-index: 100;
top: 50%;
right: 6px;
margin-top: -6px;
}
.editable-clear-x:hover {
opacity: 1;
}
.editable-pre-wrapped {
white-space: pre-wrap;
}
.editable-container.editable-popup {
max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
}
.editable-container.popover {
width: auto; /* without this rule popover does not stretch */
}
.editable-container.editable-inline {
display: inline-block;
vertical-align: middle;
width: auto;
/* inline-block emulation for IE7*/
zoom: 1;
*display: inline;
}
.editable-container.ui-widget {
font-size: inherit; /* jqueryui widget font 1.1em too big, overwrite it */
z-index: 9990; /* should be less than select2 dropdown z-index to close dropdown first when click */
}
.editable-click,
a.editable-click,
a.editable-click:hover {
text-decoration: none;
border-bottom: dashed 1px #0088cc;
}
.editable-click.editable-disabled,
a.editable-click.editable-disabled,
a.editable-click.editable-disabled:hover {
color: #585858;
cursor: default;
border-bottom: none;
}
.editable-empty, .editable-empty:hover, .editable-empty:focus{
font-style: italic;
color: #DD1144;
/* border-bottom: none; */
text-decoration: none;
}
.editable-unsaved {
font-weight: bold;
}
.editable-unsaved:after {
/* content: '*'*/
}
.editable-bg-transition {
-webkit-transition: background-color 1400ms ease-out;
-moz-transition: background-color 1400ms ease-out;
-o-transition: background-color 1400ms ease-out;
-ms-transition: background-color 1400ms ease-out;
transition: background-color 1400ms ease-out;
}
/*see https://github.com/vitalets/x-editable/issues/139 */
.form-horizontal .editable
{
padding-top: 5px;
display:inline-block;
}
/*!
* Datepicker for Bootstrap
*
* Copyright 2012 Stefan Petre
* Improvements by Andrew Rowls
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
.datepicker {
padding: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
direction: ltr;
/*.dow {
border-top: 1px solid #ddd !important;
}*/
}
.datepicker-inline {
width: 220px;
}
.datepicker.datepicker-rtl {
direction: rtl;
}
.datepicker.datepicker-rtl table tr td span {
float: right;
}
.datepicker-dropdown {
top: 0;
left: 0;
}
.datepicker-dropdown:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
top: -7px;
left: 6px;
}
.datepicker-dropdown:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #ffffff;
position: absolute;
top: -6px;
left: 7px;
}
.datepicker > div {
display: none;
}
.datepicker.days div.datepicker-days {
display: block;
}
.datepicker.months div.datepicker-months {
display: block;
}
.datepicker.years div.datepicker-years {
display: block;
}
.datepicker table {
margin: 0;
}
.datepicker td,
.datepicker th {
text-align: center;
width: 20px;
height: 20px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border: none;
}
.table-striped .datepicker table tr td,
.table-striped .datepicker table tr th {
background-color: transparent;
}
.datepicker table tr td.day:hover {
background: #eeeeee;
cursor: pointer;
}
.datepicker table tr td.old,
.datepicker table tr td.new {
color: #999999;
}
.datepicker table tr td.disabled,
.datepicker table tr td.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
.datepicker table tr td.today,
.datepicker table tr td.today:hover,
.datepicker table tr td.today.disabled,
.datepicker table tr td.today.disabled:hover {
background-color: #fde19a;
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
background-image: linear-gradient(top, #fdd49a, #fdf59a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
border-color: #fdf59a #fdf59a #fbed50;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #000;
}
.datepicker table tr td.today:hover,
.datepicker table tr td.today:hover:hover,
.datepicker table tr td.today.disabled:hover,
.datepicker table tr td.today.disabled:hover:hover,
.datepicker table tr td.today:active,
.datepicker table tr td.today:hover:active,
.datepicker table tr td.today.disabled:active,
.datepicker table tr td.today.disabled:hover:active,
.datepicker table tr td.today.active,
.datepicker table tr td.today:hover.active,
.datepicker table tr td.today.disabled.active,
.datepicker table tr td.today.disabled:hover.active,
.datepicker table tr td.today.disabled,
.datepicker table tr td.today:hover.disabled,
.datepicker table tr td.today.disabled.disabled,
.datepicker table tr td.today.disabled:hover.disabled,
.datepicker table tr td.today[disabled],
.datepicker table tr td.today:hover[disabled],
.datepicker table tr td.today.disabled[disabled],
.datepicker table tr td.today.disabled:hover[disabled] {
background-color: #fdf59a;
}
.datepicker table tr td.today:active,
.datepicker table tr td.today:hover:active,
.datepicker table tr td.today.disabled:active,
.datepicker table tr td.today.disabled:hover:active,
.datepicker table tr td.today.active,
.datepicker table tr td.today:hover.active,
.datepicker table tr td.today.disabled.active,
.datepicker table tr td.today.disabled:hover.active {
background-color: #fbf069 \9;
}
.datepicker table tr td.today:hover:hover {
color: #000;
}
.datepicker table tr td.today.active:hover {
color: #fff;
}
.datepicker table tr td.range,
.datepicker table tr td.range:hover,
.datepicker table tr td.range.disabled,
.datepicker table tr td.range.disabled:hover {
background: #eeeeee;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.datepicker table tr td.range.today,
.datepicker table tr td.range.today:hover,
.datepicker table tr td.range.today.disabled,
.datepicker table tr td.range.today.disabled:hover {
background-color: #f3d17a;
background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a));
background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -o-linear-gradient(top, #f3c17a, #f3e97a);
background-image: linear-gradient(top, #f3c17a, #f3e97a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0);
border-color: #f3e97a #f3e97a #edde34;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.datepicker table tr td.range.today:hover,
.datepicker table tr td.range.today:hover:hover,
.datepicker table tr td.range.today.disabled:hover,
.datepicker table tr td.range.today.disabled:hover:hover,
.datepicker table tr td.range.today:active,
.datepicker table tr td.range.today:hover:active,
.datepicker table tr td.range.today.disabled:active,
.datepicker table tr td.range.today.disabled:hover:active,
.datepicker table tr td.range.today.active,
.datepicker table tr td.range.today:hover.active,
.datepicker table tr td.range.today.disabled.active,
.datepicker table tr td.range.today.disabled:hover.active,
.datepicker table tr td.range.today.disabled,
.datepicker table tr td.range.today:hover.disabled,
.datepicker table tr td.range.today.disabled.disabled,
.datepicker table tr td.range.today.disabled:hover.disabled,
.datepicker table tr td.range.today[disabled],
.datepicker table tr td.range.today:hover[disabled],
.datepicker table tr td.range.today.disabled[disabled],
.datepicker table tr td.range.today.disabled:hover[disabled] {
background-color: #f3e97a;
}
.datepicker table tr td.range.today:active,
.datepicker table tr td.range.today:hover:active,
.datepicker table tr td.range.today.disabled:active,
.datepicker table tr td.range.today.disabled:hover:active,
.datepicker table tr td.range.today.active,
.datepicker table tr td.range.today:hover.active,
.datepicker table tr td.range.today.disabled.active,
.datepicker table tr td.range.today.disabled:hover.active {
background-color: #efe24b \9;
}
.datepicker table tr td.selected,
.datepicker table tr td.selected:hover,
.datepicker table tr td.selected.disabled,
.datepicker table tr td.selected.disabled:hover {
background-color: #9e9e9e;
background-image: -moz-linear-gradient(top, #b3b3b3, #808080);
background-image: -ms-linear-gradient(top, #b3b3b3, #808080);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080));
background-image: -webkit-linear-gradient(top, #b3b3b3, #808080);
background-image: -o-linear-gradient(top, #b3b3b3, #808080);
background-image: linear-gradient(top, #b3b3b3, #808080);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0);
border-color: #808080 #808080 #595959;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td.selected:hover,
.datepicker table tr td.selected:hover:hover,
.datepicker table tr td.selected.disabled:hover,
.datepicker table tr td.selected.disabled:hover:hover,
.datepicker table tr td.selected:active,
.datepicker table tr td.selected:hover:active,
.datepicker table tr td.selected.disabled:active,
.datepicker table tr td.selected.disabled:hover:active,
.datepicker table tr td.selected.active,
.datepicker table tr td.selected:hover.active,
.datepicker table tr td.selected.disabled.active,
.datepicker table tr td.selected.disabled:hover.active,
.datepicker table tr td.selected.disabled,
.datepicker table tr td.selected:hover.disabled,
.datepicker table tr td.selected.disabled.disabled,
.datepicker table tr td.selected.disabled:hover.disabled,
.datepicker table tr td.selected[disabled],
.datepicker table tr td.selected:hover[disabled],
.datepicker table tr td.selected.disabled[disabled],
.datepicker table tr td.selected.disabled:hover[disabled] {
background-color: #808080;
}
.datepicker table tr td.selected:active,
.datepicker table tr td.selected:hover:active,
.datepicker table tr td.selected.disabled:active,
.datepicker table tr td.selected.disabled:hover:active,
.datepicker table tr td.selected.active,
.datepicker table tr td.selected:hover.active,
.datepicker table tr td.selected.disabled.active,
.datepicker table tr td.selected.disabled:hover.active {
background-color: #666666 \9;
}
.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active.disabled:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td.active:hover,
.datepicker table tr td.active:hover:hover,
.datepicker table tr td.active.disabled:hover,
.datepicker table tr td.active.disabled:hover:hover,
.datepicker table tr td.active:active,
.datepicker table tr td.active:hover:active,
.datepicker table tr td.active.disabled:active,
.datepicker table tr td.active.disabled:hover:active,
.datepicker table tr td.active.active,
.datepicker table tr td.active:hover.active,
.datepicker table tr td.active.disabled.active,
.datepicker table tr td.active.disabled:hover.active,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active:hover.disabled,
.datepicker table tr td.active.disabled.disabled,
.datepicker table tr td.active.disabled:hover.disabled,
.datepicker table tr td.active[disabled],
.datepicker table tr td.active:hover[disabled],
.datepicker table tr td.active.disabled[disabled],
.datepicker table tr td.active.disabled:hover[disabled] {
background-color: #0044cc;
}
.datepicker table tr td.active:active,
.datepicker table tr td.active:hover:active,
.datepicker table tr td.active.disabled:active,
.datepicker table tr td.active.disabled:hover:active,
.datepicker table tr td.active.active,
.datepicker table tr td.active:hover.active,
.datepicker table tr td.active.disabled.active,
.datepicker table tr td.active.disabled:hover.active {
background-color: #003399 \9;
}
.datepicker table tr td span {
display: block;
width: 23%;
height: 54px;
line-height: 54px;
float: left;
margin: 1%;
cursor: pointer;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.datepicker table tr td span:hover {
background: #eeeeee;
}
.datepicker table tr td span.disabled,
.datepicker table tr td span.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
.datepicker table tr td span.active,
.datepicker table tr td span.active:hover,
.datepicker table tr td span.active.disabled,
.datepicker table tr td span.active.disabled:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td span.active:hover,
.datepicker table tr td span.active:hover:hover,
.datepicker table tr td span.active.disabled:hover,
.datepicker table tr td span.active.disabled:hover:hover,
.datepicker table tr td span.active:active,
.datepicker table tr td span.active:hover:active,
.datepicker table tr td span.active.disabled:active,
.datepicker table tr td span.active.disabled:hover:active,
.datepicker table tr td span.active.active,
.datepicker table tr td span.active:hover.active,
.datepicker table tr td span.active.disabled.active,
.datepicker table tr td span.active.disabled:hover.active,
.datepicker table tr td span.active.disabled,
.datepicker table tr td span.active:hover.disabled,
.datepicker table tr td span.active.disabled.disabled,
.datepicker table tr td span.active.disabled:hover.disabled,
.datepicker table tr td span.active[disabled],
.datepicker table tr td span.active:hover[disabled],
.datepicker table tr td span.active.disabled[disabled],
.datepicker table tr td span.active.disabled:hover[disabled] {
background-color: #0044cc;
}
.datepicker table tr td span.active:active,
.datepicker table tr td span.active:hover:active,
.datepicker table tr td span.active.disabled:active,
.datepicker table tr td span.active.disabled:hover:active,
.datepicker table tr td span.active.active,
.datepicker table tr td span.active:hover.active,
.datepicker table tr td span.active.disabled.active,
.datepicker table tr td span.active.disabled:hover.active {
background-color: #003399 \9;
}
.datepicker table tr td span.old,
.datepicker table tr td span.new {
color: #999999;
}
.datepicker th.datepicker-switch {
width: 145px;
}
.datepicker thead tr:first-child th,
.datepicker tfoot tr th {
cursor: pointer;
}
.datepicker thead tr:first-child th:hover,
.datepicker tfoot tr th:hover {
background: #eeeeee;
}
.datepicker .cw {
font-size: 10px;
width: 12px;
padding: 0 2px 0 5px;
vertical-align: middle;
}
.datepicker thead tr:first-child th.cw {
cursor: default;
background-color: transparent;
}
.input-append.date .add-on i,
.input-prepend.date .add-on i {
display: block;
cursor: pointer;
width: 16px;
height: 16px;
}
.input-daterange input {
text-align: center;
}
.input-daterange input:first-child {
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
.input-daterange input:last-child {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
.input-daterange .add-on {
display: inline-block;
width: auto;
min-width: 16px;
height: 18px;
padding: 4px 5px;
font-weight: normal;
line-height: 18px;
text-align: center;
text-shadow: 0 1px 0 #ffffff;
vertical-align: middle;
background-color: #eeeeee;
border: 1px solid #ccc;
margin-left: -5px;
margin-right: -5px;
}
File diff suppressed because one or more lines are too long
@@ -1,7 +0,0 @@
/*
* bootstrap-table - v1.11.0 - 2016-07-02
* https://github.com/wenzhixin/bootstrap-table
* Copyright (c) 2016 zhixin wen
* Licensed MIT License
*/
!function(a){"use strict";a.extend(a.fn.bootstrapTable.defaults,{editable:!0,onEditableInit:function(){return!1},onEditableSave:function(){return!1},onEditableShown:function(){return!1},onEditableHidden:function(){return!1}}),a.extend(a.fn.bootstrapTable.Constructor.EVENTS,{"editable-init.bs.table":"onEditableInit","editable-save.bs.table":"onEditableSave","editable-shown.bs.table":"onEditableShown","editable-hidden.bs.table":"onEditableHidden"});var b=a.fn.bootstrapTable.Constructor,c=b.prototype.initTable,d=b.prototype.initBody;b.prototype.initTable=function(){var b=this;c.apply(this,Array.prototype.slice.apply(arguments)),this.options.editable&&a.each(this.columns,function(c,d){if(d.editable){var e={},f=[],g="editable-",h=function(a,b){var c=a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()});if(c.slice(0,g.length)==g){var d=c.replace(g,"data-");e[d]=b}};a.each(b.options,h),d.formatter=d.formatter||function(a){return a},d._formatter=d._formatter?d._formatter:d.formatter,d.formatter=function(c,g,i){var j=d._formatter?d._formatter(c,g,i):c;a.each(d,h),a.each(e,function(a,b){f.push(" "+a+'="'+b+'"')});var k=!1;return d.editable.hasOwnProperty("noeditFormatter")&&(k=d.editable.noeditFormatter(c,g,i)),k===!1?['<a href="javascript:void(0)"',' data-name="'+d.field+'"',' data-pk="'+g[b.options.idField]+'"',' data-value="'+j+'"',f.join(""),"></a>"].join(""):k}}})},b.prototype.initBody=function(){var b=this;d.apply(this,Array.prototype.slice.apply(arguments)),this.options.editable&&(a.each(this.columns,function(c,d){d.editable&&(b.$body.find('a[data-name="'+d.field+'"]').editable(d.editable).off("save").on("save",function(c,e){var f=b.getData(),g=a(this).parents("tr[data-index]").data("index"),h=f[g],i=h[d.field];a(this).data("value",e.submitValue),h[d.field]=e.submitValue,b.trigger("editable-save",d.field,h,i,a(this)),b.resetFooter()}),b.$body.find('a[data-name="'+d.field+'"]').editable(d.editable).off("shown").on("shown",function(c,e){var f=b.getData(),g=a(this).parents("tr[data-index]").data("index"),h=f[g];b.trigger("editable-shown",d.field,h,a(this),e)}),b.$body.find('a[data-name="'+d.field+'"]').editable(d.editable).off("hidden").on("hidden",function(c,e){var f=b.getData(),g=a(this).parents("tr[data-index]").data("index"),h=f[g];b.trigger("editable-hidden",d.field,h,a(this),e)}))}),this.trigger("editable-init"))}}(jQuery);
Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -29,7 +29,7 @@
$.extend($.fn.bootstrapTable.locales, {
formatExport: function () {
return 'Export data';
return '导出';
}
});
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
@@ -0,0 +1,117 @@
/**
* @author: Dennis Hernández
* 实现表格拖拽功能
* @version: v1.0.1
*/
(function ($) {
'use strict';
var isSearch = false;
var rowAttr = function (row, index) {
return {
id: 'customId_' + index
};
};
$.extend($.fn.bootstrapTable.defaults, {
reorderableRows: false,
onDragStyle: null,
onDropStyle: null,
onDragClass: "reorder_rows_onDragClass",
dragHandle: null,
useRowAttrFunc: false,
onReorderRowsDrag: function (table, row) {
return false;
},
onReorderRowsDrop: function (table, row) {
return false;
},
onReorderRow: function (newData) {
return false;
}
});
$.extend($.fn.bootstrapTable.Constructor.EVENTS, {
'reorder-row.bs.table': 'onReorderRow'
});
var BootstrapTable = $.fn.bootstrapTable.Constructor,
_init = BootstrapTable.prototype.init,
_initSearch = BootstrapTable.prototype.initSearch;
BootstrapTable.prototype.init = function () {
if (!this.options.reorderableRows) {
_init.apply(this, Array.prototype.slice.apply(arguments));
return;
}
var that = this;
if (this.options.useRowAttrFunc) {
this.options.rowAttributes = rowAttr;
}
var onPostBody = this.options.onPostBody;
this.options.onPostBody = function () {
setTimeout(function () {
that.makeRowsReorderable();
onPostBody.apply();
}, 1);
};
_init.apply(this, Array.prototype.slice.apply(arguments));
};
BootstrapTable.prototype.initSearch = function () {
_initSearch.apply(this, Array.prototype.slice.apply(arguments));
if (!this.options.reorderableRows) {
return;
}
//Known issue after search if you reorder the rows the data is not display properly
//isSearch = true;
};
BootstrapTable.prototype.makeRowsReorderable = function () {
if (this.options.cardView) {
return;
}
var that = this;
this.$el.tableDnD({
onDragStyle: that.options.onDragStyle,
onDropStyle: that.options.onDropStyle,
onDragClass: that.options.onDragClass,
onDrop: that.onDrop,
onDragStart: that.options.onReorderRowsDrag,
dragHandle: that.options.dragHandle
});
};
BootstrapTable.prototype.onDrop = function (table, droppedRow) {
var tableBs = $(table),
tableBsData = tableBs.data('bootstrap.table'),
tableBsOptions = tableBs.data('bootstrap.table').options,
row = null,
newData = [];
for (var i = 0; i < table.tBodies[0].rows.length; i++) {
row = $(table.tBodies[0].rows[i]);
newData.push(tableBsOptions.data[row.data('index')]);
row.data('index', i).attr('data-index', i);
}
tableBsOptions.data = tableBsOptions.data.slice(0, tableBsData.pageFrom - 1)
.concat(newData)
.concat(tableBsOptions.data.slice(tableBsData.pageTo));
//Call the user defined function
tableBsOptions.onReorderRowsDrop.apply(table, [table, droppedRow]);
//Call the event reorder-row
tableBsData.trigger('reorder-row', newData);
};
})(jQuery);
@@ -0,0 +1,598 @@
/**
* TableDnD plug-in for JQuery, allows you to drag and drop table rows
* You can set up various options to control how the system will work
* Copyright (c) Denis Howlett <denish@isocra.com>
* License: MIT.
* See https://github.com/isocra/TableDnD
*/
!function ($, window, document, undefined) {
var startEvent = 'touchstart mousedown',
moveEvent = 'touchmove mousemove',
endEvent = 'touchend mouseup';
$(document).ready(function () {
function parseStyle(css) {
var objMap = {},
parts = css.match(/([^;:]+)/g) || [];
while (parts.length)
objMap[parts.shift()] = parts.shift().trim();
return objMap;
}
$('table').each(function () {
if ($(this).data('table') === 'dnd') {
$(this).tableDnD({
onDragStyle: $(this).data('ondragstyle') && parseStyle($(this).data('ondragstyle')) || null,
onDropStyle: $(this).data('ondropstyle') && parseStyle($(this).data('ondropstyle')) || null,
onDragClass: $(this).data('ondragclass') === undefined && "tDnD_whileDrag" || $(this).data('ondragclass'),
onDrop: $(this).data('ondrop') && new Function('table', 'row', $(this).data('ondrop')), // 'return eval("'+$(this).data('ondrop')+'");') || null,
onDragStart: $(this).data('ondragstart') && new Function('table', 'row' ,$(this).data('ondragstart')), // 'return eval("'+$(this).data('ondragstart')+'");') || null,
onDragStop: $(this).data('ondragstop') && new Function('table', 'row' ,$(this).data('ondragstop')),
scrollAmount: $(this).data('scrollamount') || 5,
sensitivity: $(this).data('sensitivity') || 10,
hierarchyLevel: $(this).data('hierarchylevel') || 0,
indentArtifact: $(this).data('indentartifact') || '<div class="indent">&nbsp;</div>',
autoWidthAdjust: $(this).data('autowidthadjust') || true,
autoCleanRelations: $(this).data('autocleanrelations') || true,
jsonPretifySeparator: $(this).data('jsonpretifyseparator') || '\t',
serializeRegexp: $(this).data('serializeregexp') && new RegExp($(this).data('serializeregexp')) || /[^\-]*$/,
serializeParamName: $(this).data('serializeparamname') || false,
dragHandle: $(this).data('draghandle') || null
});
}
});
});
jQuery.tableDnD = {
/** Keep hold of the current table being dragged */
currentTable: null,
/** Keep hold of the current drag object if any */
dragObject: null,
/** The current mouse offset */
mouseOffset: null,
/** Remember the old value of X and Y so that we don't do too much processing */
oldX: 0,
oldY: 0,
/** Actually build the structure */
build: function(options) {
// Set up the defaults if any
this.each(function() {
// This is bound to each matching table, set up the defaults and override with user options
this.tableDnDConfig = $.extend({
onDragStyle: null,
onDropStyle: null,
// Add in the default class for whileDragging
onDragClass: "tDnD_whileDrag",
onDrop: null,
onDragStart: null,
onDragStop: null,
scrollAmount: 5,
/** Sensitivity setting will throttle the trigger rate for movement detection */
sensitivity: 10,
/** Hierarchy level to support parent child. 0 switches this functionality off */
hierarchyLevel: 0,
/** The html artifact to prepend the first cell with as indentation */
indentArtifact: '<div class="indent">&nbsp;</div>',
/** Automatically adjust width of first cell */
autoWidthAdjust: true,
/** Automatic clean-up to ensure relationship integrity */
autoCleanRelations: true,
/** Specify a number (4) as number of spaces or any indent string for JSON.stringify */
jsonPretifySeparator: '\t',
/** The regular expression to use to trim row IDs */
serializeRegexp: /[^\-]*$/,
/** If you want to specify another parameter name instead of the table ID */
serializeParamName: false,
/** If you give the name of a class here, then only Cells with this class will be draggable */
dragHandle: null
}, options || {});
// Now make the rows draggable
$.tableDnD.makeDraggable(this);
// Prepare hierarchy support
this.tableDnDConfig.hierarchyLevel
&& $.tableDnD.makeIndented(this);
});
// Don't break the chain
return this;
},
makeIndented: function (table) {
var config = table.tableDnDConfig,
rows = table.rows,
firstCell = $(rows).first().find('td:first')[0],
indentLevel = 0,
cellWidth = 0,
longestCell,
tableStyle;
if ($(table).hasClass('indtd'))
return null;
tableStyle = $(table).addClass('indtd').attr('style');
$(table).css({whiteSpace: "nowrap"});
for (var w = 0; w < rows.length; w++) {
if (cellWidth < $(rows[w]).find('td:first').text().length) {
cellWidth = $(rows[w]).find('td:first').text().length;
longestCell = w;
}
}
$(firstCell).css({width: 'auto'});
for (w = 0; w < config.hierarchyLevel; w++)
$(rows[longestCell]).find('td:first').prepend(config.indentArtifact);
firstCell && $(firstCell).css({width: firstCell.offsetWidth});
tableStyle && $(table).css(tableStyle);
for (w = 0; w < config.hierarchyLevel; w++)
$(rows[longestCell]).find('td:first').children(':first').remove();
config.hierarchyLevel
&& $(rows).each(function () {
indentLevel = $(this).data('level') || 0;
indentLevel <= config.hierarchyLevel
&& $(this).data('level', indentLevel)
|| $(this).data('level', 0);
for (var i = 0; i < $(this).data('level'); i++)
$(this).find('td:first').prepend(config.indentArtifact);
});
return this;
},
/** This function makes all the rows on the table draggable apart from those marked as "NoDrag" */
makeDraggable: function(table) {
var config = table.tableDnDConfig;
config.dragHandle
// We only need to add the event to the specified cells
&& $(config.dragHandle, table).each(function() {
// The cell is bound to "this"
$(this).bind(startEvent, function(e) {
$.tableDnD.initialiseDrag($(this).parents('tr')[0], table, this, e, config);
return false;
});
})
// For backwards compatibility, we add the event to the whole row
// get all the rows as a wrapped set
|| $(table.rows).each(function() {
// Iterate through each row, the row is bound to "this"
if (! $(this).hasClass("nodrag")) {
$(this).bind(startEvent, function(e) {
if (e.target.tagName === "TD" && event.target.className !== "nodrag") {
$.tableDnD.initialiseDrag(this, table, this, e, config);
return false;
}
}).css("cursor", "move"); // Store the tableDnD object
} else {
$(this).css("cursor", ""); // Remove the cursor if we don't have the nodrag class
}
});
},
currentOrder: function() {
var rows = this.currentTable.rows;
return $.map(rows, function (val) {
return ($(val).data('level') + val.id).replace(/\s/g, '');
}).join('');
},
initialiseDrag: function(dragObject, table, target, e, config) {
this.dragObject = dragObject;
this.currentTable = table;
this.mouseOffset = this.getMouseOffset(target, e);
this.originalOrder = this.currentOrder();
// Now we need to capture the mouse up and mouse move event
// We can use bind so that we don't interfere with other event handlers
$(document)
.bind(moveEvent, this.mousemove)
.bind(endEvent, this.mouseup);
// Call the onDragStart method if there is one
config.onDragStart
&& config.onDragStart(table, target);
},
updateTables: function() {
this.each(function() {
// this is now bound to each matching table
if (this.tableDnDConfig)
$.tableDnD.makeDraggable(this);
});
},
/** Get the mouse coordinates from the event (allowing for browser differences) */
mouseCoords: function(e) {
if (e.originalEvent.changedTouches)
return {
x: e.originalEvent.changedTouches[0].clientX,
y: e.originalEvent.changedTouches[0].clientY
};
if(e.pageX || e.pageY)
return {
x: e.pageX,
y: e.pageY
};
return {
x: e.clientX + document.body.scrollLeft - document.body.clientLeft,
y: e.clientY + document.body.scrollTop - document.body.clientTop
};
},
/** Given a target element and a mouse eent, get the mouse offset from that element.
To do this we need the element's position and the mouse position */
getMouseOffset: function(target, e) {
var mousePos,
docPos;
e = e || window.event;
docPos = this.getPosition(target);
mousePos = this.mouseCoords(e);
return {
x: mousePos.x - docPos.x,
y: mousePos.y - docPos.y
};
},
/** Get the position of an element by going up the DOM tree and adding up all the offsets */
getPosition: function(element) {
var left = 0,
top = 0;
// Safari fix -- thanks to Luis Chato for this!
// Safari 2 doesn't correctly grab the offsetTop of a table row
// this is detailed here:
// http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari/
// the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild.
// note that firefox will return a text node as a first child, so designing a more thorough
// solution may need to take that into account, for now this seems to work in firefox, safari, ie
if (element.offsetHeight === 0)
element = element.firstChild; // a table cell
while (element.offsetParent) {
left += element.offsetLeft;
top += element.offsetTop;
element = element.offsetParent;
}
left += element.offsetLeft;
top += element.offsetTop;
return {
x: left,
y: top
};
},
autoScroll: function (mousePos) {
var config = this.currentTable.tableDnDConfig,
yOffset = window.pageYOffset,
windowHeight = window.innerHeight
? window.innerHeight
: document.documentElement.clientHeight
? document.documentElement.clientHeight
: document.body.clientHeight;
// Windows version
// yOffset=document.body.scrollTop;
if (document.all)
if (typeof document.compatMode !== 'undefined'
&& document.compatMode !== 'BackCompat')
yOffset = document.documentElement.scrollTop;
else if (typeof document.body !== 'undefined')
yOffset = document.body.scrollTop;
mousePos.y - yOffset < config.scrollAmount
&& window.scrollBy(0, - config.scrollAmount)
|| windowHeight - (mousePos.y - yOffset) < config.scrollAmount
&& window.scrollBy(0, config.scrollAmount);
},
moveVerticle: function (moving, currentRow) {
if (0 !== moving.vertical
// If we're over a row then move the dragged row to there so that the user sees the
// effect dynamically
&& currentRow
&& this.dragObject !== currentRow
&& this.dragObject.parentNode === currentRow.parentNode)
0 > moving.vertical
&& this.dragObject.parentNode.insertBefore(this.dragObject, currentRow.nextSibling)
|| 0 < moving.vertical
&& this.dragObject.parentNode.insertBefore(this.dragObject, currentRow);
},
moveHorizontal: function (moving, currentRow) {
var config = this.currentTable.tableDnDConfig,
currentLevel;
if (!config.hierarchyLevel
|| 0 === moving.horizontal
// We only care if moving left or right on the current row
|| !currentRow
|| this.dragObject !== currentRow)
return null;
currentLevel = $(currentRow).data('level');
0 < moving.horizontal
&& currentLevel > 0
&& $(currentRow).find('td:first').children(':first').remove()
&& $(currentRow).data('level', --currentLevel);
0 > moving.horizontal
&& currentLevel < config.hierarchyLevel
&& $(currentRow).prev().data('level') >= currentLevel
&& $(currentRow).children(':first').prepend(config.indentArtifact)
&& $(currentRow).data('level', ++currentLevel);
},
mousemove: function(e) {
var dragObj = $($.tableDnD.dragObject),
config = $.tableDnD.currentTable.tableDnDConfig,
currentRow,
mousePos,
moving,
x,
y;
e && e.preventDefault();
if (!$.tableDnD.dragObject)
return false;
// prevent touch device screen scrolling
e.type === 'touchmove'
&& event.preventDefault(); // TODO verify this is event and not really e
// update the style to show we're dragging
config.onDragClass
&& dragObj.addClass(config.onDragClass)
|| dragObj.css(config.onDragStyle);
mousePos = $.tableDnD.mouseCoords(e);
x = mousePos.x - $.tableDnD.mouseOffset.x;
y = mousePos.y - $.tableDnD.mouseOffset.y;
// auto scroll the window
$.tableDnD.autoScroll(mousePos);
currentRow = $.tableDnD.findDropTargetRow(dragObj, y);
moving = $.tableDnD.findDragDirection(x, y);
$.tableDnD.moveVerticle(moving, currentRow);
$.tableDnD.moveHorizontal(moving, currentRow);
return false;
},
findDragDirection: function (x,y) {
var sensitivity = this.currentTable.tableDnDConfig.sensitivity,
oldX = this.oldX,
oldY = this.oldY,
xMin = oldX - sensitivity,
xMax = oldX + sensitivity,
yMin = oldY - sensitivity,
yMax = oldY + sensitivity,
moving = {
horizontal: x >= xMin && x <= xMax ? 0 : x > oldX ? -1 : 1,
vertical : y >= yMin && y <= yMax ? 0 : y > oldY ? -1 : 1
};
// update the old value
if (moving.horizontal !== 0)
this.oldX = x;
if (moving.vertical !== 0)
this.oldY = y;
return moving;
},
/** We're only worried about the y position really, because we can only move rows up and down */
findDropTargetRow: function(draggedRow, y) {
var rowHeight = 0,
rows = this.currentTable.rows,
config = this.currentTable.tableDnDConfig,
rowY = 0,
row = null;
for (var i = 0; i < rows.length; i++) {
row = rows[i];
rowY = this.getPosition(row).y;
rowHeight = parseInt(row.offsetHeight) / 2;
if (row.offsetHeight === 0) {
rowY = this.getPosition(row.firstChild).y;
rowHeight = parseInt(row.firstChild.offsetHeight) / 2;
}
// Because we always have to insert before, we need to offset the height a bit
if (y > (rowY - rowHeight) && y < (rowY + rowHeight))
// that's the row we're over
// If it's the same as the current row, ignore it
if (draggedRow.is(row)
|| (config.onAllowDrop
&& !config.onAllowDrop(draggedRow, row))
// If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic)
|| $(row).hasClass("nodrop"))
return null;
else
return row;
}
return null;
},
processMouseup: function() {
if (!this.currentTable || !this.dragObject)
return null;
var config = this.currentTable.tableDnDConfig,
droppedRow = this.dragObject,
parentLevel = 0,
myLevel = 0;
// Unbind the event handlers
$(document)
.unbind(moveEvent, this.mousemove)
.unbind(endEvent, this.mouseup);
config.hierarchyLevel
&& config.autoCleanRelations
&& $(this.currentTable.rows).first().find('td:first').children().each(function () {
myLevel = $(this).parents('tr:first').data('level');
myLevel
&& $(this).parents('tr:first').data('level', --myLevel)
&& $(this).remove();
})
&& config.hierarchyLevel > 1
&& $(this.currentTable.rows).each(function () {
myLevel = $(this).data('level');
if (myLevel > 1) {
parentLevel = $(this).prev().data('level');
while (myLevel > parentLevel + 1) {
$(this).find('td:first').children(':first').remove();
$(this).data('level', --myLevel);
}
}
});
// If we have a dragObject, then we need to release it,
// The row will already have been moved to the right place so we just reset stuff
config.onDragClass
&& $(droppedRow).removeClass(config.onDragClass)
|| $(droppedRow).css(config.onDropStyle);
this.dragObject = null;
// Call the onDrop method if there is one
config.onDrop
&& this.originalOrder !== this.currentOrder()
&& $(droppedRow).hide().fadeIn('fast')
&& config.onDrop(this.currentTable, droppedRow);
// Call the onDragStop method if there is one
config.onDragStop
&& config.onDragStop(this.currentTable, droppedRow);
this.currentTable = null; // let go of the table too
},
mouseup: function(e) {
e && e.preventDefault();
$.tableDnD.processMouseup();
return false;
},
jsonize: function(pretify) {
var table = this.currentTable;
if (pretify)
return JSON.stringify(
this.tableData(table),
null,
table.tableDnDConfig.jsonPretifySeparator
);
return JSON.stringify(this.tableData(table));
},
serialize: function() {
return $.param(this.tableData(this.currentTable));
},
serializeTable: function(table) {
var result = "";
var paramName = table.tableDnDConfig.serializeParamName || table.id;
var rows = table.rows;
for (var i=0; i<rows.length; i++) {
if (result.length > 0) result += "&";
var rowId = rows[i].id;
if (rowId && table.tableDnDConfig && table.tableDnDConfig.serializeRegexp) {
rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0];
result += paramName + '[]=' + rowId;
}
}
return result;
},
serializeTables: function() {
var result = [];
$('table').each(function() {
this.id && result.push($.param($.tableDnD.tableData(this)));
});
return result.join('&');
},
tableData: function (table) {
var config = table.tableDnDConfig,
previousIDs = [],
currentLevel = 0,
indentLevel = 0,
rowID = null,
data = {},
getSerializeRegexp,
paramName,
currentID,
rows;
if (!table)
table = this.currentTable;
if (!table || !table.rows || !table.rows.length)
return {error: { code: 500, message: "Not a valid table."}};
if (!table.id && !config.serializeParamName)
return {error: { code: 500, message: "No serializable unique id provided."}};
rows = config.autoCleanRelations
&& table.rows
|| $.makeArray(table.rows);
paramName = config.serializeParamName || table.id;
currentID = paramName;
getSerializeRegexp = function (rowId) {
if (rowId && config && config.serializeRegexp)
return rowId.match(config.serializeRegexp)[0];
return rowId;
};
data[currentID] = [];
!config.autoCleanRelations
&& $(rows[0]).data('level')
&& rows.unshift({id: 'undefined'});
for (var i=0; i < rows.length; i++) {
if (config.hierarchyLevel) {
indentLevel = $(rows[i]).data('level') || 0;
if (indentLevel === 0) {
currentID = paramName;
previousIDs = [];
}
else if (indentLevel > currentLevel) {
previousIDs.push([currentID, currentLevel]);
currentID = getSerializeRegexp(rows[i-1].id);
}
else if (indentLevel < currentLevel) {
for (var h = 0; h < previousIDs.length; h++) {
if (previousIDs[h][1] === indentLevel)
currentID = previousIDs[h][0];
if (previousIDs[h][1] >= currentLevel)
previousIDs[h][1] = 0;
}
}
currentLevel = indentLevel;
if (!$.isArray(data[currentID]))
data[currentID] = [];
rowID = getSerializeRegexp(rows[i].id);
rowID && data[currentID].push(rowID);
}
else {
rowID = getSerializeRegexp(rows[i].id);
rowID && data[currentID].push(rowID);
}
}
return data;
}
};
jQuery.fn.extend(
{
tableDnD : $.tableDnD.build,
tableDnDUpdate : $.tableDnD.updateTables,
tableDnDSerialize : $.proxy($.tableDnD.serialize, $.tableDnD),
tableDnDSerializeAll : $.tableDnD.serializeTables,
tableDnDData : $.proxy($.tableDnD.tableData, $.tableDnD)
}
);
}(jQuery, window, window.document);
@@ -70,6 +70,12 @@
var $rightToolbar = $('<div class="btn-group tool-right">');
$toolbar.append($rightToolbar);
target.parent().before($toolbar);
// ruoyi 是否显示检索信息
if (options.showSearch) {
var $searchBtn = $('<button class="btn btn-default btn-outline" type="button" aria-label="search" title="搜索"><i class="glyphicon glyphicon-search"></i></button>');
$rightToolbar.append($searchBtn);
registerSearchBtnClickEvent($searchBtn);
}
// 是否显示刷新按钮
if (options.showRefresh) {
var $refreshBtn = $('<button class="btn btn-default btn-outline" type="button" aria-label="refresh" title="刷新"><i class="glyphicon glyphicon-repeat"></i></button>');
@@ -159,6 +165,7 @@
data: parms ? parms : options.ajaxParams,
dataType: "JSON",
success: function(data, textStatus, jqXHR) {
data = calculateObjectValue(options, options.responseHandler, [data], data);
renderTable(data);
},
error: function(xhr, textStatus) {
@@ -233,20 +240,27 @@
}
// 缓存并格式化数据
var formatData = function(data) {
var _root = options.rootIdValue ? options.rootIdValue : null
var _root = options.rootIdValue ? options.rootIdValue : null;
// 父节点属性列表
var parentCodes = [];
var rootFlag = false;
$.each(data, function(index, item) {
if($.inArray(item[options.parentCode], parentCodes) == -1){
parentCodes.push(item[options.parentCode]);
}
});
$.each(data, function(index, item) {
// 添加一个默认属性,用来判断当前节点有没有被显示
item.isShow = false;
// 这里兼容几种常见Root节点写法
// 默认的几种判断
var firstCode = (0 == index ? item[options.parentCode] : '-');
// 顶级节点校验判断,兼容0,'0','',null
var _defaultRootFlag = item[options.parentCode] == '0' ||
item[options.parentCode] == 0 ||
item[options.parentCode] == null ||
item[options.parentCode] == firstCode ||
item[options.parentCode] == '';
item[options.parentCode] == 0 ||
item[options.parentCode] == null ||
item[options.parentCode] == '' ||
$.inArray(item[options.code], parentCodes) > 0 && !rootFlag;
if (!item[options.parentCode] || (_root ? (item[options.parentCode] == options.rootIdValue) : _defaultRootFlag)) {
if (!target.data_list["_root_"]) {
rootFlag = true;
if (!target.data_list["_root_"]) {
target.data_list["_root_"] = [];
}
if (!target.data_obj["id_" + item[options.code]]) {
@@ -335,13 +349,13 @@
}
// 增加formatter渲染
if (column.formatter) {
$td.html(column.formatter.call(this, item[column.field], item, index));
$td.html(column.formatter.call(this, getItemField(item, column.field), item, index));
} else {
if(options.showTitle){
// 只在字段没有formatter时才添加title属性
$td.attr("title",item[column.field]);
}
$td.text(item[column.field]);
$td.text(getItemField(item, column.field));
}
if (options.expandColumn == index) {
if (!isP) {
@@ -358,6 +372,12 @@
});
return $tr;
}
// 检索信息按钮点击事件
var registerSearchBtnClickEvent = function(btn) {
$(btn).off('click').on('click', function () {
$(".search-collapse").slideToggle();
});
}
// 注册刷新按钮点击事件
var registerRefreshBtnClickEvent = function(btn) {
$(btn).off('click').on('click', function () {
@@ -583,6 +603,46 @@
$input.prop("checked", '');
}
}
// ruoyi 解析数据,支持多层级访问
var getItemField = function (item, field) {
var value = item;
if (typeof field !== 'string' || item.hasOwnProperty(field)) {
return item[field];
}
var props = field.split('.');
for (var p in props) {
value = value && value[props[p]];
}
return value;
};
// ruoyi 发起对目标(target)函数的调用
var calculateObjectValue = function (self, name, args, defaultValue) {
var func = name;
if (typeof name === 'string') {
var names = name.split('.');
if (names.length > 1) {
func = window;
$.each(names, function (i, f) {
func = func[f];
});
} else {
func = window[name];
}
}
if (typeof func === 'object') {
return func;
}
if (typeof func === 'function') {
return func.apply(self, args);
}
if (!func && typeof name === 'string' && sprintf.apply(this, [name].concat(args))) {
return sprintf.apply(this, [name].concat(args));
}
return defaultValue;
};
// 初始化
init();
return target;
@@ -671,10 +731,13 @@
toolbar: null, // 顶部工具条
height: 0, // 表格高度
showTitle: true, // 是否采用title属性显示字段内容(被formatter格式化的字段不会显示)
showSearch: true, // 是否显示检索信息
showColumns: true, // 是否显示内容列下拉框
showRefresh: true, // 是否显示刷新按钮
expanderExpandedClass: 'glyphicon glyphicon-chevron-down', // 展开的按钮的图标
expanderCollapsedClass: 'glyphicon glyphicon-chevron-right' // 缩起的按钮的图标
expanderCollapsedClass: 'glyphicon glyphicon-chevron-right', // 缩起的按钮的图标
responseHandler: function(res) {
return false;
}
};
})(jQuery);
@@ -23,7 +23,7 @@
top: 0;
width: 200px;
border: 1px #ddd solid;
height: 440px;
height: 450px;
padding: 4px;
box-shadow: 0px 0px 12px #ddd;
text-align: center;
@@ -0,0 +1,315 @@
/* The MIT License
Copyright (c) 2011 by Michael Zinsmaier and nergal.dev
Copyright (c) 2012 by Thomas Ritou
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/*
____________________________________________________
what it is:
____________________________________________________
curvedLines is a plugin for flot, that tries to display lines in a smoother way.
The plugin is based on nergal.dev's work https://code.google.com/p/flot/issues/detail?id=226
and further extended with a mode that forces the min/max points of the curves to be on the
points. Both modes are achieved through adding of more data points
=> 1) with large data sets you may get trouble
=> 2) if you want to display the points too, you have to plot them as 2nd data series over the lines
&& 3) consecutive x data points are not allowed to have the same value
This is version 0.5 of curvedLines so it will probably not work in every case. However
the basic form of use descirbed next works (:
Feel free to further improve the code
____________________________________________________
how to use it:
____________________________________________________
var d1 = [[5,5],[7,3],[9,12]];
var options = { series: { curvedLines: { active: true }}};
$.plot($("#placeholder"), [{data = d1, lines: { show: true}, curvedLines: {apply: true}}], options);
_____________________________________________________
options:
_____________________________________________________
active: bool true => plugin can be used
apply: bool true => series will be drawn as curved line
fit: bool true => forces the max,mins of the curve to be on the datapoints
curvePointFactor int defines how many "virtual" points are used per "real" data point to
emulate the curvedLines (points total = real points * curvePointFactor)
fitPointDist: int defines the x axis distance of the additional two points that are used
to enforce the min max condition.
+ line options (since v0.5 curved lines use flots line implementation for drawing
=> line options like fill, show ... are supported out of the box)
*/
/*
* v0.1 initial commit
* v0.15 negative values should work now (outcommented a negative -> 0 hook hope it does no harm)
* v0.2 added fill option (thanks to monemihir) and multi axis support (thanks to soewono effendi)
* v0.3 improved saddle handling and added basic handling of Dates
* v0.4 rewritten fill option (thomas ritou) mostly from original flot code (now fill between points rather than to graph bottom), corrected fill Opacity bug
* v0.5 rewritten instead of implementing a own draw function CurvedLines is now based on the processDatapoints flot hook (credits go to thomas ritou).
* This change breakes existing code however CurvedLines are now just many tiny straight lines to flot and therefore all flot lines options (like gradient fill,
* shadow) are now supported out of the box
* v0.6 flot 0.8 compatibility and some bug fixes
*/
(function($) {
var options = {
series : {
curvedLines : {
active : false,
apply: false,
fit : false,
curvePointFactor : 20,
fitPointDist : undefined
}
}
};
function init(plot) {
plot.hooks.processOptions.push(processOptions);
//if the plugin is active register processDatapoints method
function processOptions(plot, options) {
if (options.series.curvedLines.active) {
plot.hooks.processDatapoints.unshift(processDatapoints);
}
}
//only if the plugin is active
function processDatapoints(plot, series, datapoints) {
var nrPoints = datapoints.points.length / datapoints.pointsize;
var EPSILON = 0.5; //pretty large epsilon but save
if (series.curvedLines.apply == true && series.originSeries === undefined && nrPoints > (1 + EPSILON)) {
if (series.lines.fill) {
var pointsTop = calculateCurvePoints(datapoints, series.curvedLines, 1)
,pointsBottom = calculateCurvePoints(datapoints, series.curvedLines, 2); //flot makes sure for us that we've got a second y point if fill is true !
//Merge top and bottom curve
datapoints.pointsize = 3;
datapoints.points = [];
var j = 0;
var k = 0;
var i = 0;
var ps = 2;
while (i < pointsTop.length || j < pointsBottom.length) {
if (pointsTop[i] == pointsBottom[j]) {
datapoints.points[k] = pointsTop[i];
datapoints.points[k + 1] = pointsTop[i + 1];
datapoints.points[k + 2] = pointsBottom[j + 1];
j += ps;
i += ps;
} else if (pointsTop[i] < pointsBottom[j]) {
datapoints.points[k] = pointsTop[i];
datapoints.points[k + 1] = pointsTop[i + 1];
datapoints.points[k + 2] = k > 0 ? datapoints.points[k-1] : null;
i += ps;
} else {
datapoints.points[k] = pointsBottom[j];
datapoints.points[k + 1] = k > 1 ? datapoints.points[k-2] : null;
datapoints.points[k + 2] = pointsBottom[j + 1];
j += ps;
}
k += 3;
}
} else if (series.lines.lineWidth > 0) {
datapoints.points = calculateCurvePoints(datapoints, series.curvedLines, 1);
datapoints.pointsize = 2;
}
}
}
//no real idea whats going on here code mainly from https://code.google.com/p/flot/issues/detail?id=226
//if fit option is selected additional datapoints get inserted before the curve calculations in nergal.dev s code.
function calculateCurvePoints(datapoints, curvedLinesOptions, yPos) {
var points = datapoints.points, ps = datapoints.pointsize;
var num = curvedLinesOptions.curvePointFactor * (points.length / ps);
var xdata = new Array;
var ydata = new Array;
var curX = -1;
var curY = -1;
var j = 0;
if (curvedLinesOptions.fit) {
//insert a point before and after the "real" data point to force the line
//to have a max,min at the data point.
var fpDist;
if(typeof curvedLinesOptions.fitPointDist == 'undefined') {
//estimate it
var minX = points[0];
var maxX = points[points.length-ps];
fpDist = (maxX - minX) / (500 * 100); //x range / (estimated pixel length of placeholder * factor)
} else {
//use user defined value
fpDist = curvedLinesOptions.fitPointDist;
}
for (var i = 0; i < points.length; i += ps) {
var frontX;
var backX;
curX = i;
curY = i + yPos;
//add point X s
frontX = points[curX] - fpDist;
backX = points[curX] + fpDist;
var factor = 2;
while (frontX == points[curX] || backX == points[curX]) {
//inside the ulp
frontX = points[curX] - (fpDist * factor);
backX = points[curX] + (fpDist * factor);
factor++;
}
//add curve points
xdata[j] = frontX;
ydata[j] = points[curY];
j++;
xdata[j] = points[curX];
ydata[j] = points[curY];
j++;
xdata[j] = backX;
ydata[j] = points[curY];
j++;
}
} else {
//just use the datapoints
for (var i = 0; i < points.length; i += ps) {
curX = i;
curY = i + yPos;
xdata[j] = points[curX];
ydata[j] = points[curY];
j++;
}
}
var n = xdata.length;
var y2 = new Array();
var delta = new Array();
y2[0] = 0;
y2[n - 1] = 0;
delta[0] = 0;
for (var i = 1; i < n - 1; ++i) {
var d = (xdata[i + 1] - xdata[i - 1]);
if (d == 0) {
//point before current point and after current point need some space in between
return [];
}
var s = (xdata[i] - xdata[i - 1]) / d;
var p = s * y2[i - 1] + 2;
y2[i] = (s - 1) / p;
delta[i] = (ydata[i + 1] - ydata[i]) / (xdata[i + 1] - xdata[i]) - (ydata[i] - ydata[i - 1]) / (xdata[i] - xdata[i - 1]);
delta[i] = (6 * delta[i] / (xdata[i + 1] - xdata[i - 1]) - s * delta[i - 1]) / p;
}
for (var j = n - 2; j >= 0; --j) {
y2[j] = y2[j] * y2[j + 1] + delta[j];
}
// xmax - xmin / #points
var step = (xdata[n - 1] - xdata[0]) / (num - 1);
var xnew = new Array;
var ynew = new Array;
var result = new Array;
xnew[0] = xdata[0];
ynew[0] = ydata[0];
result.push(xnew[0]);
result.push(ynew[0]);
for ( j = 1; j < num; ++j) {
//new x point (sampling point for the created curve)
xnew[j] = xnew[0] + j * step;
var max = n - 1;
var min = 0;
while (max - min > 1) {
var k = Math.round((max + min) / 2);
if (xdata[k] > xnew[j]) {
max = k;
} else {
min = k;
}
}
//found point one to the left and one to the right of generated new point
var h = (xdata[max] - xdata[min]);
if (h == 0) {
//similar to above two points from original x data need some space between them
return [];
}
var a = (xdata[max] - xnew[j]) / h;
var b = (xnew[j] - xdata[min]) / h;
ynew[j] = a * ydata[min] + b * ydata[max] + ((a * a * a - a) * y2[min] + (b * b * b - b) * y2[max]) * (h * h) / 6;
result.push(xnew[j]);
result.push(ynew[j]);
}
return result;
}
}//end init
$.plot.plugins.push({
init : init,
options : options,
name : 'curvedLines',
version : '0.5'
});
})(jQuery);
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,750 @@
/*
Flot plugin for rendering pie charts. The plugin assumes the data is
coming is as a single data value for each series, and each of those
values is a positive value or zero (negative numbers don't make
any sense and will cause strange effects). The data values do
NOT need to be passed in as percentage values because it
internally calculates the total and percentages.
* Created by Brian Medendorp, June 2009
* Updated November 2009 with contributions from: btburnett3, Anthony Aragues and Xavi Ivars
* Changes:
2009-10-22: lineJoin set to round
2009-10-23: IE full circle fix, donut
2009-11-11: Added basic hover from btburnett3 - does not work in IE, and center is off in Chrome and Opera
2009-11-17: Added IE hover capability submitted by Anthony Aragues
2009-11-18: Added bug fix submitted by Xavi Ivars (issues with arrays when other JS libraries are included as well)
Available options are:
series: {
pie: {
show: true/false
radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto'
innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect
startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result
tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show)
offset: {
top: integer value to move the pie up or down
left: integer value to move the pie left or right, or 'auto'
},
stroke: {
color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF')
width: integer pixel width of the stroke
},
label: {
show: true/false, or 'auto'
formatter: a user-defined function that modifies the text/style of the label text
radius: 0-1 for percentage of fullsize, or a specified pixel length
background: {
color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000')
opacity: 0-1
},
threshold: 0-1 for the percentage value at which to hide labels (if they're too small)
},
combine: {
threshold: 0-1 for the percentage value at which to combine slices (if they're too small)
color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined
label: any text value of what the combined slice should be labeled
}
highlight: {
opacity: 0-1
}
}
}
More detail and specific examples can be found in the included HTML file.
*/
(function ($)
{
function init(plot) // this is the "body" of the plugin
{
var canvas = null;
var target = null;
var maxRadius = null;
var centerLeft = null;
var centerTop = null;
var total = 0;
var redraw = true;
var redrawAttempts = 10;
var shrink = 0.95;
var legendWidth = 0;
var processed = false;
var raw = false;
// interactive variables
var highlights = [];
// add hook to determine if pie plugin in enabled, and then perform necessary operations
plot.hooks.processOptions.push(checkPieEnabled);
plot.hooks.bindEvents.push(bindEvents);
// check to see if the pie plugin is enabled
function checkPieEnabled(plot, options)
{
if (options.series.pie.show)
{
//disable grid
options.grid.show = false;
// set labels.show
if (options.series.pie.label.show=='auto')
if (options.legend.show)
options.series.pie.label.show = false;
else
options.series.pie.label.show = true;
// set radius
if (options.series.pie.radius=='auto')
if (options.series.pie.label.show)
options.series.pie.radius = 3/4;
else
options.series.pie.radius = 1;
// ensure sane tilt
if (options.series.pie.tilt>1)
options.series.pie.tilt=1;
if (options.series.pie.tilt<0)
options.series.pie.tilt=0;
// add processData hook to do transformations on the data
plot.hooks.processDatapoints.push(processDatapoints);
plot.hooks.drawOverlay.push(drawOverlay);
// add draw hook
plot.hooks.draw.push(draw);
}
}
// bind hoverable events
function bindEvents(plot, eventHolder)
{
var options = plot.getOptions();
if (options.series.pie.show && options.grid.hoverable)
eventHolder.unbind('mousemove').mousemove(onMouseMove);
if (options.series.pie.show && options.grid.clickable)
eventHolder.unbind('click').click(onClick);
}
// debugging function that prints out an object
function alertObject(obj)
{
var msg = '';
function traverse(obj, depth)
{
if (!depth)
depth = 0;
for (var i = 0; i < obj.length; ++i)
{
for (var j=0; j<depth; j++)
msg += '\t';
if( typeof obj[i] == "object")
{ // its an object
msg += ''+i+':\n';
traverse(obj[i], depth+1);
}
else
{ // its a value
msg += ''+i+': '+obj[i]+'\n';
}
}
}
traverse(obj);
alert(msg);
}
function calcTotal(data)
{
for (var i = 0; i < data.length; ++i)
{
var item = parseFloat(data[i].data[0][1]);
if (item)
total += item;
}
}
function processDatapoints(plot, series, data, datapoints)
{
if (!processed)
{
processed = true;
canvas = plot.getCanvas();
target = $(canvas).parent();
options = plot.getOptions();
plot.setData(combine(plot.getData()));
}
}
function setupPie()
{
legendWidth = target.children().filter('.legend').children().width();
// calculate maximum radius and center point
maxRadius = Math.min(canvas.width,(canvas.height/options.series.pie.tilt))/2;
centerTop = (canvas.height/2)+options.series.pie.offset.top;
centerLeft = (canvas.width/2);
if (options.series.pie.offset.left=='auto')
if (options.legend.position.match('w'))
centerLeft += legendWidth/2;
else
centerLeft -= legendWidth/2;
else
centerLeft += options.series.pie.offset.left;
if (centerLeft<maxRadius)
centerLeft = maxRadius;
else if (centerLeft>canvas.width-maxRadius)
centerLeft = canvas.width-maxRadius;
}
function fixData(data)
{
for (var i = 0; i < data.length; ++i)
{
if (typeof(data[i].data)=='number')
data[i].data = [[1,data[i].data]];
else if (typeof(data[i].data)=='undefined' || typeof(data[i].data[0])=='undefined')
{
if (typeof(data[i].data)!='undefined' && typeof(data[i].data.label)!='undefined')
data[i].label = data[i].data.label; // fix weirdness coming from flot
data[i].data = [[1,0]];
}
}
return data;
}
function combine(data)
{
data = fixData(data);
calcTotal(data);
var combined = 0;
var numCombined = 0;
var color = options.series.pie.combine.color;
var newdata = [];
for (var i = 0; i < data.length; ++i)
{
// make sure its a number
data[i].data[0][1] = parseFloat(data[i].data[0][1]);
if (!data[i].data[0][1])
data[i].data[0][1] = 0;
if (data[i].data[0][1]/total<=options.series.pie.combine.threshold)
{
combined += data[i].data[0][1];
numCombined++;
if (!color)
color = data[i].color;
}
else
{
newdata.push({
data: [[1,data[i].data[0][1]]],
color: data[i].color,
label: data[i].label,
angle: (data[i].data[0][1]*(Math.PI*2))/total,
percent: (data[i].data[0][1]/total*100)
});
}
}
if (numCombined>0)
newdata.push({
data: [[1,combined]],
color: color,
label: options.series.pie.combine.label,
angle: (combined*(Math.PI*2))/total,
percent: (combined/total*100)
});
return newdata;
}
function draw(plot, newCtx)
{
if (!target) return; // if no series were passed
ctx = newCtx;
setupPie();
var slices = plot.getData();
var attempts = 0;
while (redraw && attempts<redrawAttempts)
{
redraw = false;
if (attempts>0)
maxRadius *= shrink;
attempts += 1;
clear();
if (options.series.pie.tilt<=0.8)
drawShadow();
drawPie();
}
if (attempts >= redrawAttempts) {
clear();
target.prepend('<div class="error">Could not draw pie with labels contained inside canvas</div>');
}
if ( plot.setSeries && plot.insertLegend )
{
plot.setSeries(slices);
plot.insertLegend();
}
// we're actually done at this point, just defining internal functions at this point
function clear()
{
ctx.clearRect(0,0,canvas.width,canvas.height);
target.children().filter('.pieLabel, .pieLabelBackground').remove();
}
function drawShadow()
{
var shadowLeft = 5;
var shadowTop = 15;
var edge = 10;
var alpha = 0.02;
// set radius
if (options.series.pie.radius>1)
var radius = options.series.pie.radius;
else
var radius = maxRadius * options.series.pie.radius;
if (radius>=(canvas.width/2)-shadowLeft || radius*options.series.pie.tilt>=(canvas.height/2)-shadowTop || radius<=edge)
return; // shadow would be outside canvas, so don't draw it
ctx.save();
ctx.translate(shadowLeft,shadowTop);
ctx.globalAlpha = alpha;
ctx.fillStyle = '#000';
// center and rotate to starting position
ctx.translate(centerLeft,centerTop);
ctx.scale(1, options.series.pie.tilt);
//radius -= edge;
for (var i=1; i<=edge; i++)
{
ctx.beginPath();
ctx.arc(0,0,radius,0,Math.PI*2,false);
ctx.fill();
radius -= i;
}
ctx.restore();
}
function drawPie()
{
startAngle = Math.PI*options.series.pie.startAngle;
// set radius
if (options.series.pie.radius>1)
var radius = options.series.pie.radius;
else
var radius = maxRadius * options.series.pie.radius;
// center and rotate to starting position
ctx.save();
ctx.translate(centerLeft,centerTop);
ctx.scale(1, options.series.pie.tilt);
//ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera
// draw slices
ctx.save();
var currentAngle = startAngle;
for (var i = 0; i < slices.length; ++i)
{
slices[i].startAngle = currentAngle;
drawSlice(slices[i].angle, slices[i].color, true);
}
ctx.restore();
// draw slice outlines
ctx.save();
ctx.lineWidth = options.series.pie.stroke.width;
currentAngle = startAngle;
for (var i = 0; i < slices.length; ++i)
drawSlice(slices[i].angle, options.series.pie.stroke.color, false);
ctx.restore();
// draw donut hole
drawDonutHole(ctx);
// draw labels
if (options.series.pie.label.show)
drawLabels();
// restore to original state
ctx.restore();
function drawSlice(angle, color, fill)
{
if (angle<=0)
return;
if (fill)
ctx.fillStyle = color;
else
{
ctx.strokeStyle = color;
ctx.lineJoin = 'round';
}
ctx.beginPath();
if (Math.abs(angle - Math.PI*2) > 0.000000001)
ctx.moveTo(0,0); // Center of the pie
else if ($.browser.msie)
angle -= 0.0001;
//ctx.arc(0,0,radius,0,angle,false); // This doesn't work properly in Opera
ctx.arc(0,0,radius,currentAngle,currentAngle+angle,false);
ctx.closePath();
//ctx.rotate(angle); // This doesn't work properly in Opera
currentAngle += angle;
if (fill)
ctx.fill();
else
ctx.stroke();
}
function drawLabels()
{
var currentAngle = startAngle;
// set radius
if (options.series.pie.label.radius>1)
var radius = options.series.pie.label.radius;
else
var radius = maxRadius * options.series.pie.label.radius;
for (var i = 0; i < slices.length; ++i)
{
if (slices[i].percent >= options.series.pie.label.threshold*100)
drawLabel(slices[i], currentAngle, i);
currentAngle += slices[i].angle;
}
function drawLabel(slice, startAngle, index)
{
if (slice.data[0][1]==0)
return;
// format label text
var lf = options.legend.labelFormatter, text, plf = options.series.pie.label.formatter;
if (lf)
text = lf(slice.label, slice);
else
text = slice.label;
if (plf)
text = plf(text, slice);
var halfAngle = ((startAngle+slice.angle) + startAngle)/2;
var x = centerLeft + Math.round(Math.cos(halfAngle) * radius);
var y = centerTop + Math.round(Math.sin(halfAngle) * radius) * options.series.pie.tilt;
var html = '<span class="pieLabel" id="pieLabel'+index+'" style="position:absolute;top:' + y + 'px;left:' + x + 'px;">' + text + "</span>";
target.append(html);
var label = target.children('#pieLabel'+index);
var labelTop = (y - label.height()/2);
var labelLeft = (x - label.width()/2);
label.css('top', labelTop);
label.css('left', labelLeft);
// check to make sure that the label is not outside the canvas
if (0-labelTop>0 || 0-labelLeft>0 || canvas.height-(labelTop+label.height())<0 || canvas.width-(labelLeft+label.width())<0)
redraw = true;
if (options.series.pie.label.background.opacity != 0) {
// put in the transparent background separately to avoid blended labels and label boxes
var c = options.series.pie.label.background.color;
if (c == null) {
c = slice.color;
}
var pos = 'top:'+labelTop+'px;left:'+labelLeft+'px;';
$('<div class="pieLabelBackground" style="position:absolute;width:' + label.width() + 'px;height:' + label.height() + 'px;' + pos +'background-color:' + c + ';"> </div>').insertBefore(label).css('opacity', options.series.pie.label.background.opacity);
}
} // end individual label function
} // end drawLabels function
} // end drawPie function
} // end draw function
// Placed here because it needs to be accessed from multiple locations
function drawDonutHole(layer)
{
// draw donut hole
if(options.series.pie.innerRadius > 0)
{
// subtract the center
layer.save();
innerRadius = options.series.pie.innerRadius > 1 ? options.series.pie.innerRadius : maxRadius * options.series.pie.innerRadius;
layer.globalCompositeOperation = 'destination-out'; // this does not work with excanvas, but it will fall back to using the stroke color
layer.beginPath();
layer.fillStyle = options.series.pie.stroke.color;
layer.arc(0,0,innerRadius,0,Math.PI*2,false);
layer.fill();
layer.closePath();
layer.restore();
// add inner stroke
layer.save();
layer.beginPath();
layer.strokeStyle = options.series.pie.stroke.color;
layer.arc(0,0,innerRadius,0,Math.PI*2,false);
layer.stroke();
layer.closePath();
layer.restore();
// TODO: add extra shadow inside hole (with a mask) if the pie is tilted.
}
}
//-- Additional Interactive related functions --
function isPointInPoly(poly, pt)
{
for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i)
((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || (poly[j][1] <= pt[1] && pt[1]< poly[i][1]))
&& (pt[0] < (poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0])
&& (c = !c);
return c;
}
function findNearbySlice(mouseX, mouseY)
{
var slices = plot.getData(),
options = plot.getOptions(),
radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
for (var i = 0; i < slices.length; ++i)
{
var s = slices[i];
if(s.pie.show)
{
ctx.save();
ctx.beginPath();
ctx.moveTo(0,0); // Center of the pie
//ctx.scale(1, options.series.pie.tilt); // this actually seems to break everything when here.
ctx.arc(0,0,radius,s.startAngle,s.startAngle+s.angle,false);
ctx.closePath();
x = mouseX-centerLeft;
y = mouseY-centerTop;
if(ctx.isPointInPath)
{
if (ctx.isPointInPath(mouseX-centerLeft, mouseY-centerTop))
{
//alert('found slice!');
ctx.restore();
return {datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i};
}
}
else
{
// excanvas for IE doesn;t support isPointInPath, this is a workaround.
p1X = (radius * Math.cos(s.startAngle));
p1Y = (radius * Math.sin(s.startAngle));
p2X = (radius * Math.cos(s.startAngle+(s.angle/4)));
p2Y = (radius * Math.sin(s.startAngle+(s.angle/4)));
p3X = (radius * Math.cos(s.startAngle+(s.angle/2)));
p3Y = (radius * Math.sin(s.startAngle+(s.angle/2)));
p4X = (radius * Math.cos(s.startAngle+(s.angle/1.5)));
p4Y = (radius * Math.sin(s.startAngle+(s.angle/1.5)));
p5X = (radius * Math.cos(s.startAngle+s.angle));
p5Y = (radius * Math.sin(s.startAngle+s.angle));
arrPoly = [[0,0],[p1X,p1Y],[p2X,p2Y],[p3X,p3Y],[p4X,p4Y],[p5X,p5Y]];
arrPoint = [x,y];
// TODO: perhaps do some mathmatical trickery here with the Y-coordinate to compensate for pie tilt?
if(isPointInPoly(arrPoly, arrPoint))
{
ctx.restore();
return {datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i};
}
}
ctx.restore();
}
}
return null;
}
function onMouseMove(e)
{
triggerClickHoverEvent('plothover', e);
}
function onClick(e)
{
triggerClickHoverEvent('plotclick', e);
}
// trigger click or hover event (they send the same parameters so we share their code)
function triggerClickHoverEvent(eventname, e)
{
var offset = plot.offset(),
canvasX = parseInt(e.pageX - offset.left),
canvasY = parseInt(e.pageY - offset.top),
item = findNearbySlice(canvasX, canvasY);
if (options.grid.autoHighlight)
{
// clear auto-highlights
for (var i = 0; i < highlights.length; ++i)
{
var h = highlights[i];
if (h.auto == eventname && !(item && h.series == item.series))
unhighlight(h.series);
}
}
// highlight the slice
if (item)
highlight(item.series, eventname);
// trigger any hover bind events
var pos = { pageX: e.pageX, pageY: e.pageY };
target.trigger(eventname, [ pos, item ]);
}
function highlight(s, auto)
{
if (typeof s == "number")
s = series[s];
var i = indexOfHighlight(s);
if (i == -1)
{
highlights.push({ series: s, auto: auto });
plot.triggerRedrawOverlay();
}
else if (!auto)
highlights[i].auto = false;
}
function unhighlight(s)
{
if (s == null)
{
highlights = [];
plot.triggerRedrawOverlay();
}
if (typeof s == "number")
s = series[s];
var i = indexOfHighlight(s);
if (i != -1)
{
highlights.splice(i, 1);
plot.triggerRedrawOverlay();
}
}
function indexOfHighlight(s)
{
for (var i = 0; i < highlights.length; ++i)
{
var h = highlights[i];
if (h.series == s)
return i;
}
return -1;
}
function drawOverlay(plot, octx)
{
//alert(options.series.pie.radius);
var options = plot.getOptions();
//alert(options.series.pie.radius);
var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;
octx.save();
octx.translate(centerLeft, centerTop);
octx.scale(1, options.series.pie.tilt);
for (i = 0; i < highlights.length; ++i)
drawHighlight(highlights[i].series);
drawDonutHole(octx);
octx.restore();
function drawHighlight(series)
{
if (series.angle < 0) return;
//octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString();
octx.fillStyle = "rgba(255, 255, 255, "+options.series.pie.highlight.opacity+")"; // this is temporary until we have access to parseColor
octx.beginPath();
if (Math.abs(series.angle - Math.PI*2) > 0.000000001)
octx.moveTo(0,0); // Center of the pie
octx.arc(0,0,radius,series.startAngle,series.startAngle+series.angle,false);
octx.closePath();
octx.fill();
}
}
} // end init (plugin body)
// define pie specific options and their default values
var options = {
series: {
pie: {
show: false,
radius: 'auto', // actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value)
innerRadius:0, /* for donut */
startAngle: 3/2,
tilt: 1,
offset: {
top: 0,
left: 'auto'
},
stroke: {
color: '#FFF',
width: 1
},
label: {
show: 'auto',
formatter: function(label, slice){
return '<div style="font-size:x-small;text-align:center;padding:2px;color:'+slice.color+';">'+label+'<br/>'+Math.round(slice.percent)+'%</div>';
}, // formatter function
radius: 1, // radius at which to place the labels (based on full calculated radius if <=1, or hard pixel value)
background: {
color: null,
opacity: 0
},
threshold: 0 // percentage at which to hide the label (i.e. the slice is too narrow)
},
combine: {
threshold: -1, // percentage at which to combine little slices into one larger slice
color: null, // color to give the new slice (auto-generated if null)
label: 'Other' // label to give the new slice
},
highlight: {
//color: '#FFF', // will add this functionality once parseColor is available
opacity: 0.5
}
}
}
};
$.plot.plugins.push({
init: init,
options: options,
name: "pie",
version: "1.0"
});
})(jQuery);
@@ -0,0 +1,60 @@
/* Flot plugin for automatically redrawing plots as the placeholder resizes.
Copyright (c) 2007-2013 IOLA and Ole Laursen.
Licensed under the MIT license.
It works by listening for changes on the placeholder div (through the jQuery
resize event plugin) - if the size changes, it will redraw the plot.
There are no options. If you need to disable the plugin for some plots, you
can just fix the size of their placeholders.
*/
/* Inline dependency:
* jQuery resize event - v1.1 - 3/14/2010
* http://benalman.com/projects/jquery-resize-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function($,h,c){var a=$([]),e=$.resize=$.extend($.resize,{}),i,k="setTimeout",j="resize",d=j+"-special-event",b="delay",f="throttleWindow";e[b]=250;e[f]=true;$.event.special[j]={setup:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.add(l);$.data(this,d,{w:l.width(),h:l.height()});if(a.length===1){g()}},teardown:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.not(l);l.removeData(d);if(!a.length){clearTimeout(i)}},add:function(l){if(!e[f]&&this[k]){return false}var n;function m(s,o,p){var q=$(this),r=$.data(this,d);r.w=o!==c?o:q.width();r.h=p!==c?p:q.height();n.apply(this,arguments)}if($.isFunction(l)){n=l;return m}else{n=l.handler;l.handler=m}}};function g(){i=h[k](function(){a.each(function(){var n=$(this),m=n.width(),l=n.height(),o=$.data(this,d);if(m!==o.w||l!==o.h){n.trigger(j,[o.w=m,o.h=l])}});g()},e[b])}})(jQuery,this);
(function ($) {
var options = { }; // no options
function init(plot) {
function onResize() {
var placeholder = plot.getPlaceholder();
// somebody might have hidden us and we can't plot
// when we don't have the dimensions
if (placeholder.width() == 0 || placeholder.height() == 0)
return;
plot.resize();
plot.setupGrid();
plot.draw();
}
function bindEvents(plot, eventHolder) {
plot.getPlaceholder().resize(onResize);
}
function shutdown(plot, eventHolder) {
plot.getPlaceholder().unbind("resize", onResize);
}
plot.hooks.bindEvents.push(bindEvents);
plot.hooks.shutdown.push(shutdown);
}
$.plot.plugins.push({
init: init,
options: options,
name: 'resize',
version: '1.0'
});
})(jQuery);
@@ -0,0 +1,212 @@
/**
* Flot plugin that provides spline interpolation for line graphs
* author: Alex Bardas < alex.bardas@gmail.com >
* modified by: Avi Kohn https://github.com/AMKohn
* based on the spline interpolation described at:
* http://scaledinnovation.com/analytics/splines/aboutSplines.html
*
* Example usage: (add in plot options series object)
* for linespline:
* series: {
* ...
* lines: {
* show: false
* },
* splines: {
* show: true,
* tension: x, (float between 0 and 1, defaults to 0.5),
* lineWidth: y (number, defaults to 2),
* fill: z (float between 0 .. 1 or false, as in flot documentation)
* },
* ...
* }
* areaspline:
* series: {
* ...
* lines: {
* show: true,
* lineWidth: 0, (line drawing will not execute)
* fill: x, (float between 0 .. 1, as in flot documentation)
* ...
* },
* splines: {
* show: true,
* tension: 0.5 (float between 0 and 1)
* },
* ...
* }
*
*/
(function($) {
'use strict'
/**
* @param {Number} x0, y0, x1, y1: coordinates of the end (knot) points of the segment
* @param {Number} x2, y2: the next knot (not connected, but needed to calculate p2)
* @param {Number} tension: control how far the control points spread
* @return {Array}: p1 -> control point, from x1 back toward x0
* p2 -> the next control point, returned to become the next segment's p1
*
* @api private
*/
function getControlPoints(x0, y0, x1, y1, x2, y2, tension) {
var pow = Math.pow,
sqrt = Math.sqrt,
d01, d12, fa, fb, p1x, p1y, p2x, p2y;
// Scaling factors: distances from this knot to the previous and following knots.
d01 = sqrt(pow(x1 - x0, 2) + pow(y1 - y0, 2));
d12 = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
fa = tension * d01 / (d01 + d12);
fb = tension - fa;
p1x = x1 + fa * (x0 - x2);
p1y = y1 + fa * (y0 - y2);
p2x = x1 - fb * (x0 - x2);
p2y = y1 - fb * (y0 - y2);
return [p1x, p1y, p2x, p2y];
}
var line = [];
function drawLine(points, ctx, height, fill, seriesColor) {
var c = $.color.parse(seriesColor);
c.a = typeof fill == "number" ? fill : .3;
c.normalize();
c = c.toString();
ctx.beginPath();
ctx.moveTo(points[0][0], points[0][1]);
var plength = points.length;
for (var i = 0; i < plength; i++) {
ctx[points[i][3]].apply(ctx, points[i][2]);
}
ctx.stroke();
ctx.lineWidth = 0;
ctx.lineTo(points[plength - 1][0], height);
ctx.lineTo(points[0][0], height);
ctx.closePath();
if (fill !== false) {
ctx.fillStyle = c;
ctx.fill();
}
}
/**
* @param {Object} ctx: canvas context
* @param {String} type: accepted strings: 'bezier' or 'quadratic' (defaults to quadratic)
* @param {Array} points: 2 points for which to draw the interpolation
* @param {Array} cpoints: control points for those segment points
*
* @api private
*/
function queue(ctx, type, points, cpoints) {
if (type === void 0 || (type !== 'bezier' && type !== 'quadratic')) {
type = 'quadratic';
}
type = type + 'CurveTo';
if (line.length == 0) line.push([points[0], points[1], cpoints.concat(points.slice(2)), type]);
else if (type == "quadraticCurveTo" && points.length == 2) {
cpoints = cpoints.slice(0, 2).concat(points);
line.push([points[0], points[1], cpoints, type]);
}
else line.push([points[2], points[3], cpoints.concat(points.slice(2)), type]);
}
/**
* @param {Object} plot
* @param {Object} ctx: canvas context
* @param {Object} series
*
* @api private
*/
function drawSpline(plot, ctx, series) {
// Not interested if spline is not requested
if (series.splines.show !== true) {
return;
}
var cp = [],
// array of control points
tension = series.splines.tension || 0.5,
idx, x, y, points = series.datapoints.points,
ps = series.datapoints.pointsize,
plotOffset = plot.getPlotOffset(),
len = points.length,
pts = [];
line = [];
// Cannot display a linespline/areaspline if there are less than 3 points
if (len / ps < 4) {
$.extend(series.lines, series.splines);
return;
}
for (idx = 0; idx < len; idx += ps) {
x = points[idx];
y = points[idx + 1];
if (x == null || x < series.xaxis.min || x > series.xaxis.max || y < series.yaxis.min || y > series.yaxis.max) {
continue;
}
pts.push(series.xaxis.p2c(x) + plotOffset.left, series.yaxis.p2c(y) + plotOffset.top);
}
len = pts.length;
// Draw an open curve, not connected at the ends
for (idx = 0; idx < len - 2; idx += 2) {
cp = cp.concat(getControlPoints.apply(this, pts.slice(idx, idx + 6).concat([tension])));
}
ctx.save();
ctx.strokeStyle = series.color;
ctx.lineWidth = series.splines.lineWidth;
queue(ctx, 'quadratic', pts.slice(0, 4), cp.slice(0, 2));
for (idx = 2; idx < len - 3; idx += 2) {
queue(ctx, 'bezier', pts.slice(idx, idx + 4), cp.slice(2 * idx - 2, 2 * idx + 2));
}
queue(ctx, 'quadratic', pts.slice(len - 2, len), [cp[2 * len - 10], cp[2 * len - 9], pts[len - 4], pts[len - 3]]);
drawLine(line, ctx, plot.height() + 10, series.splines.fill, series.color);
ctx.restore();
}
$.plot.plugins.push({
init: function(plot) {
plot.hooks.drawSeries.push(drawSpline);
},
options: {
series: {
splines: {
show: false,
lineWidth: 2,
tension: 0.5,
fill: false
}
}
},
name: 'spline',
version: '0.8.2'
});
})(jQuery);
@@ -0,0 +1,71 @@
/* Flot plugin that adds some extra symbols for plotting points.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.
The symbols are accessed as strings through the standard symbol options:
series: {
points: {
symbol: "square" // or "diamond", "triangle", "cross"
}
}
*/
(function ($) {
function processRawData(plot, series, datapoints) {
// we normalize the area of each symbol so it is approximately the
// same as a circle of the given radius
var handlers = {
square: function (ctx, x, y, radius, shadow) {
// pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2
var size = radius * Math.sqrt(Math.PI) / 2;
ctx.rect(x - size, y - size, size + size, size + size);
},
diamond: function (ctx, x, y, radius, shadow) {
// pi * r^2 = 2s^2 => s = r * sqrt(pi/2)
var size = radius * Math.sqrt(Math.PI / 2);
ctx.moveTo(x - size, y);
ctx.lineTo(x, y - size);
ctx.lineTo(x + size, y);
ctx.lineTo(x, y + size);
ctx.lineTo(x - size, y);
},
triangle: function (ctx, x, y, radius, shadow) {
// pi * r^2 = 1/2 * s^2 * sin (pi / 3) => s = r * sqrt(2 * pi / sin(pi / 3))
var size = radius * Math.sqrt(2 * Math.PI / Math.sin(Math.PI / 3));
var height = size * Math.sin(Math.PI / 3);
ctx.moveTo(x - size/2, y + height/2);
ctx.lineTo(x + size/2, y + height/2);
if (!shadow) {
ctx.lineTo(x, y - height/2);
ctx.lineTo(x - size/2, y + height/2);
}
},
cross: function (ctx, x, y, radius, shadow) {
// pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2
var size = radius * Math.sqrt(Math.PI) / 2;
ctx.moveTo(x - size, y - size);
ctx.lineTo(x + size, y + size);
ctx.moveTo(x - size, y + size);
ctx.lineTo(x + size, y - size);
}
};
var s = series.points.symbol;
if (handlers[s])
series.points.symbol = handlers[s];
}
function init(plot) {
plot.hooks.processDatapoints.push(processRawData);
}
$.plot.plugins.push({
init: init,
name: 'symbols',
version: '1.0'
});
})(jQuery);
@@ -0,0 +1,12 @@
/*
* jquery.flot.tooltip
*
* description: easy-to-use tooltips for Flot charts
* version: 0.6.2
* author: Krzysztof Urbas @krzysu [myviews.pl]
* website: https://github.com/krzysu/flot.tooltip
*
* build on 2013-09-30
* released under MIT License, 2012
*/
(function(t){var o={tooltip:!1,tooltipOpts:{content:"%s | X: %x | Y: %y",xDateFormat:null,yDateFormat:null,shifts:{x:10,y:20},defaultTheme:!0,onHover:function(){}}},i=function(t){this.tipPosition={x:0,y:0},this.init(t)};i.prototype.init=function(o){function i(t){var o={};o.x=t.pageX,o.y=t.pageY,s.updateTooltipPosition(o)}function e(t,o,i){var e=s.getDomElement();if(i){var n;n=s.stringFormat(s.tooltipOptions.content,i),e.html(n),s.updateTooltipPosition({x:o.pageX,y:o.pageY}),e.css({left:s.tipPosition.x+s.tooltipOptions.shifts.x,top:s.tipPosition.y+s.tooltipOptions.shifts.y}).show(),"function"==typeof s.tooltipOptions.onHover&&s.tooltipOptions.onHover(i,e)}else e.hide().html("")}var s=this;o.hooks.bindEvents.push(function(o,n){s.plotOptions=o.getOptions(),s.plotOptions.tooltip!==!1&&void 0!==s.plotOptions.tooltip&&(s.tooltipOptions=s.plotOptions.tooltipOpts,s.getDomElement(),t(o.getPlaceholder()).bind("plothover",e),t(n).bind("mousemove",i))}),o.hooks.shutdown.push(function(o,s){t(o.getPlaceholder()).unbind("plothover",e),t(s).unbind("mousemove",i)})},i.prototype.getDomElement=function(){var o;return t("#flotTip").length>0?o=t("#flotTip"):(o=t("<div />").attr("id","flotTip"),o.appendTo("body").hide().css({position:"absolute"}),this.tooltipOptions.defaultTheme&&o.css({background:"#fff","z-index":"100",padding:"0.4em 0.6em","border-radius":"0.5em","font-size":"0.8em",border:"1px solid #111",display:"none","white-space":"nowrap"})),o},i.prototype.updateTooltipPosition=function(o){var i=t("#flotTip").outerWidth()+this.tooltipOptions.shifts.x,e=t("#flotTip").outerHeight()+this.tooltipOptions.shifts.y;o.x-t(window).scrollLeft()>t(window).innerWidth()-i&&(o.x-=i),o.y-t(window).scrollTop()>t(window).innerHeight()-e&&(o.y-=e),this.tipPosition.x=o.x,this.tipPosition.y=o.y},i.prototype.stringFormat=function(t,o){var i=/%p\.{0,1}(\d{0,})/,e=/%s/,s=/%x\.{0,1}(?:\d{0,})/,n=/%y\.{0,1}(?:\d{0,})/;return"function"==typeof t&&(t=t(o.series.label,o.series.data[o.dataIndex][0],o.series.data[o.dataIndex][1],o)),o.series.percent!==void 0&&(t=this.adjustValPrecision(i,t,o.series.percent)),o.series.label!==void 0&&(t=t.replace(e,o.series.label)),this.isTimeMode("xaxis",o)&&this.isXDateFormat(o)&&(t=t.replace(s,this.timestampToDate(o.series.data[o.dataIndex][0],this.tooltipOptions.xDateFormat))),this.isTimeMode("yaxis",o)&&this.isYDateFormat(o)&&(t=t.replace(n,this.timestampToDate(o.series.data[o.dataIndex][1],this.tooltipOptions.yDateFormat))),"number"==typeof o.series.data[o.dataIndex][0]&&(t=this.adjustValPrecision(s,t,o.series.data[o.dataIndex][0])),"number"==typeof o.series.data[o.dataIndex][1]&&(t=this.adjustValPrecision(n,t,o.series.data[o.dataIndex][1])),o.series.xaxis.tickFormatter!==void 0&&(t=t.replace(s,o.series.xaxis.tickFormatter(o.series.data[o.dataIndex][0],o.series.xaxis))),o.series.yaxis.tickFormatter!==void 0&&(t=t.replace(n,o.series.yaxis.tickFormatter(o.series.data[o.dataIndex][1],o.series.yaxis))),t},i.prototype.isTimeMode=function(t,o){return o.series[t].options.mode!==void 0&&"time"===o.series[t].options.mode},i.prototype.isXDateFormat=function(){return this.tooltipOptions.xDateFormat!==void 0&&null!==this.tooltipOptions.xDateFormat},i.prototype.isYDateFormat=function(){return this.tooltipOptions.yDateFormat!==void 0&&null!==this.tooltipOptions.yDateFormat},i.prototype.timestampToDate=function(o,i){var e=new Date(o);return t.plot.formatDate(e,i)},i.prototype.adjustValPrecision=function(t,o,i){var e,s=o.match(t);return null!==s&&""!==RegExp.$1&&(e=RegExp.$1,i=i.toFixed(e),o=o.replace(t,i)),o};var e=function(t){new i(t)};t.plot.plugins.push({init:e,options:o,name:"tooltip",version:"0.6.1"})})(jQuery);
File diff suppressed because one or more lines are too long
@@ -18,7 +18,7 @@ body .layer-ext-moon .layui-layer-title {
font-size: 14px;
height: 42px;
line-height: 42px;
border-bottom: 1px solid #eee;
border: none;
}
body .layer-ext-moon .layui-layer-content .layui-layer-ico {
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
// Peity jQuery plugin version 2.0.3
// (c) 2014 Ben Pickles
//
// http://benpickles.github.io/peity
//
// Released under MIT license.
(function(e,q,h){var o=function(a,b){var c=q.createElementNS("http://www.w3.org/2000/svg",a);e.each(b,function(a,b){c.setAttribute(a,b)});return c},t="createElementNS"in q&&o("svg",{}).createSVGRect,r=1/(window.devicePixelRatio||1),j=e.fn.peity=function(a,b){t&&this.each(function(){var c=e(this),d=c.data("peity");if(d)a&&(d.type=a),e.extend(d.opts,b);else{var f=j.defaults[a],g={};e.each(c.data(),function(a,b){a in f&&(g[a]=b)});var h=e.extend({},f,g,b),d=new s(c,a,h);c.change(function(){d.draw()}).data("peity",
d)}d.draw()});return this},s=function(a,b,c){this.$el=a;this.type=b;this.opts=c},m=s.prototype;m.draw=function(){j.graphers[this.type].call(this,this.opts)};m.fill=function(){var a=this.opts.fill,b=a;e.isFunction(b)||(b=function(b,d){return a[d%a.length]});return b};m.prepare=function(a,b){var c;this.svg?c=e(this.svg).empty():(this.svg=o("svg",{"class":"peity"}),this.$el.hide().after(this.svg),c=e(this.svg).data("peity",this));this.svg.setAttribute("height",b);this.svg.setAttribute("width",a);return c};
m.values=function(){return e.map(this.$el.text().split(this.opts.delimiter),function(a){return parseFloat(a)})};j.defaults={};j.graphers={};j.register=function(a,b,c){this.defaults[a]=b;this.graphers[a]=c};j.register("pie",{delimiter:null,diameter:16,fill:["#ff9900","#fff4dd","#ffc66e"]},function(a){if(!a.delimiter){var b=this.$el.text().match(/[^0-9\.]/);a.delimiter=b?b[0]:","}b=this.values();if("/"==a.delimiter)var c=b[0],b=[c,h.max(0,b[1]-c)];for(var d=0,c=b.length,f=0;d<c;d++)f+=b[d];for(var a=
this.prepare(a.width||a.diameter,a.height||a.diameter),d=a.width(),g=a.height(),a=d/2,g=g/2,p=h.min(a,g),e=h.PI,j=this.fill(),i=-e/2,d=0;d<c;d++){var n=b[d],l=n/f,k;if(0!=l){if(1==l)k=o("circle",{cx:a,cy:g,r:p});else{k=2*l*e;var l=i+k,m=p*h.cos(i)+a,i=p*h.sin(i)+g,q=p*h.cos(l)+a,r=p*h.sin(l)+g;k=o("path",{d:["M",a,g,"L",m,i,"A",p,p,0,k>e?1:0,1,q,r,"Z"].join(" ")});i=l}k.setAttribute("fill",j.call(this,n,d,b));this.svg.appendChild(k)}}});j.register("line",{delimiter:",",fill:"#c6d9fd",height:16,max:null,
min:0,stroke:"#4d89f9",strokeWidth:1,width:32},function(a){var b=this.values();1==b.length&&b.push(b[0]);for(var c=h.max.apply(h,b.concat([a.max])),d=h.min.apply(h,b.concat([a.min])),f=this.prepare(a.width,a.height),g=f.width(),f=f.height()-a.strokeWidth,e=g/(b.length-1),c=c-d,j=0==c?f:f/c,m=f+d*j,c=[0,m],i=0;i<b.length;i++)c.push(i*e,f-j*(b[i]-d)+a.strokeWidth/2);c.push(g,m);b=o("polygon",{fill:a.fill,points:c.join(" ")});this.svg.appendChild(b);a.strokeWidth&&(a=o("polyline",{fill:"transparent",
points:c.slice(2,c.length-2).join(" "),stroke:a.stroke,"stroke-width":a.strokeWidth,"stroke-linecap":"square"}),this.svg.appendChild(a))});j.register("bar",{delimiter:",",fill:["#4D89F9"],gap:1,height:16,max:null,min:0,width:32},function(a){for(var b=this.values(),c=h.max.apply(h,b.concat([a.max])),d=h.min.apply(h,b.concat([a.min])),f=this.prepare(a.width,a.height),g=f.width(),f=f.height(),e=c-d,j=0==e?0:f/e,a=a.gap,g=(g+a)/b.length,m=this.fill(),i=0;i<b.length;i++){var n=b[i],l=f-j*(n-d),k=j*n;if(0==
k){if(k=r,0>=d&&0<c||0==e)l-=r}else 0>k&&(l+=k,k=-k);n=o("rect",{fill:m.call(this,n,i,b),x:i*g,y:l,width:g-a,height:k});this.svg.appendChild(n)}})})(jQuery,document,Math);
File diff suppressed because one or more lines are too long
@@ -4590,12 +4590,12 @@ S2.define('select2/i18n/en',[],function () {
// English
return {
errorLoading: function () {
return 'The results could not be loaded.';
return '无法载入结果';
},
inputTooLong: function (args) {
var overChars = args.input.length - args.maximum;
var message = 'Please delete ' + overChars + ' character';
var message = '请删除' + overChars + '个字符';
if (overChars != 1) {
message += 's';
@@ -4606,15 +4606,15 @@ S2.define('select2/i18n/en',[],function () {
inputTooShort: function (args) {
var remainingChars = args.minimum - args.input.length;
var message = 'Please enter ' + remainingChars + ' or more characters';
var message = '请再输入至少' + remainingChars + '个字符';
return message;
},
loadingMore: function () {
return 'Loading more results…';
return '载入更多结果…';
},
maximumSelected: function (args) {
var message = 'You can only select ' + args.maximum + ' item';
var message = '最多只能' + args.maximum + '个选项';
if (args.maximum != 1) {
message += 's';
@@ -4623,13 +4623,13 @@ S2.define('select2/i18n/en',[],function () {
return message;
},
noResults: function () {
return 'No results found';
return '未找到结果';
},
searching: function () {
return 'Searching…';
return '搜索中…';
},
removeAllItems: function () {
return 'Remove all items';
return '删除所有项目';
}
};
});
@@ -5012,7 +5012,7 @@ S2.define('select2/defaults',[
return selection.text;
},
theme: 'default',
width: 'resolve'
width: '100%'
};
};
File diff suppressed because one or more lines are too long
@@ -5778,7 +5778,7 @@ td.visible-lg {
display: table-cell !important;
}
}
.hidden-xs {
.summernote .hidden-xs {
display: block !important;
}
tr.hidden-xs {
@@ -1,155 +1,155 @@
(function($) {
$.extend($.summernote.lang, {
'zh-CN': {
font: {
bold: '粗体',
italic: '斜体',
underline: '下划线',
clear: '清除格式',
height: '行高',
name: '字体',
strikethrough: '删除线',
subscript: '下标',
superscript: '上标',
size: '字号'
},
image: {
image: '图片',
insert: '插入图片',
resizeFull: '缩放至 100%',
resizeHalf: '缩放至 50%',
resizeQuarter: '缩放至 25%',
floatLeft: '靠左浮动',
floatRight: '靠右浮动',
floatNone: '取消浮动',
shapeRounded: '形状: 圆角',
shapeCircle: '形状: 圆',
shapeThumbnail: '形状: 缩略图',
shapeNone: '形状: 无',
dragImageHere: '将图片拖拽至此处',
dropImage: '拖拽图片或文本',
selectFromFiles: '从本地上传',
maximumFileSize: '文件大小最大值',
maximumFileSizeError: '文件大小超出最大值。',
url: '图片地址',
remove: '移除图片',
original: '原始图片'
},
video: {
video: '视频',
videoLink: '视频链接',
insert: '插入视频',
url: '视频地址',
providers: '(优酷, 腾讯, Instagram, DailyMotion, Youtube等)'
},
link: {
link: '链接',
insert: '插入链接',
unlink: '去除链接',
edit: '编辑链接',
textToDisplay: '显示文本',
url: '链接地址',
openInNewWindow: '在新窗口打开'
},
table: {
table: '表格',
addRowAbove: '在上方插入行',
addRowBelow: '在下方插入行',
addColLeft: '在左侧插入列',
addColRight: '在右侧插入列',
delRow: '删除行',
delCol: '删除列',
delTable: '删除表格'
},
hr: {
insert: '水平线'
},
style: {
style: '样式',
p: '普通',
blockquote: '引用',
pre: '代码',
h1: '标题 1',
h2: '标题 2',
h3: '标题 3',
h4: '标题 4',
h5: '标题 5',
h6: '标题 6'
},
lists: {
unordered: '无序列表',
ordered: '有序列表'
},
options: {
help: '帮助',
fullscreen: '全屏',
codeview: '源代码'
},
paragraph: {
paragraph: '段落',
outdent: '减少缩进',
indent: '增加缩进',
left: '左对齐',
center: '居中对齐',
right: '右对齐',
justify: '两端对齐'
},
color: {
recent: '最近使用',
more: '更多',
background: '背景',
foreground: '前景',
transparent: '透明',
setTransparent: '透明',
reset: '重置',
resetToDefault: '默认'
},
shortcut: {
shortcuts: '快捷键',
close: '关闭',
textFormatting: '文本格式',
action: '动作',
paragraphFormatting: '段落格式',
documentStyle: '文档样式',
extraKeys: '额外按键'
},
help: {
insertParagraph: '插入段落',
undo: '撤销',
redo: '重做',
tab: '增加缩进',
untab: '减少缩进',
bold: '粗体',
italic: '斜体',
underline: '下划线',
strikethrough: '删除线',
removeFormat: '清除格式',
justifyLeft: '左对齐',
justifyCenter: '居中对齐',
justifyRight: '右对齐',
justifyFull: '两端对齐',
insertUnorderedList: '无序列表',
insertOrderedList: '有序列表',
outdent: '减少缩进',
indent: '增加缩进',
formatPara: '设置选中内容样式为 普通',
formatH1: '设置选中内容样式为 标题1',
formatH2: '设置选中内容样式为 标题2',
formatH3: '设置选中内容样式为 标题3',
formatH4: '设置选中内容样式为 标题4',
formatH5: '设置选中内容样式为 标题5',
formatH6: '设置选中内容样式为 标题6',
insertHorizontalRule: '插入水平线',
'linkDialog.show': '显示链接对话框'
},
history: {
undo: '撤销',
redo: '重做'
},
specialChar: {
specialChar: '特殊字符',
select: '选取特殊字符'
}
}
});
})(jQuery);
(function($) {
$.extend($.summernote.lang, {
'zh-CN': {
font: {
bold: '粗体',
italic: '斜体',
underline: '下划线',
clear: '清除格式',
height: '行高',
name: '字体',
strikethrough: '删除线',
subscript: '下标',
superscript: '上标',
size: '字号',
},
image: {
image: '图片',
insert: '插入图片',
resizeFull: '缩放至 100%',
resizeHalf: '缩放至 50%',
resizeQuarter: '缩放至 25%',
floatLeft: '靠左浮动',
floatRight: '靠右浮动',
floatNone: '取消浮动',
shapeRounded: '形状: 圆角',
shapeCircle: '形状: 圆',
shapeThumbnail: '形状: 缩略图',
shapeNone: '形状: 无',
dragImageHere: '将图片拖拽至此处',
dropImage: '拖拽图片或文本',
selectFromFiles: '从本地上传',
maximumFileSize: '文件大小最大值',
maximumFileSizeError: '文件大小超出最大值。',
url: '图片地址',
remove: '移除图片',
original: '原始图片',
},
video: {
video: '视频',
videoLink: '视频链接',
insert: '插入视频',
url: '视频地址',
providers: '(优酷, 腾讯, Instagram, DailyMotion, Youtube等)',
},
link: {
link: '链接',
insert: '插入链接',
unlink: '去除链接',
edit: '编辑链接',
textToDisplay: '显示文本',
url: '链接地址',
openInNewWindow: '在新窗口打开',
},
table: {
table: '表格',
addRowAbove: '在上方插入行',
addRowBelow: '在下方插入行',
addColLeft: '在左侧插入列',
addColRight: '在右侧插入列',
delRow: '删除行',
delCol: '删除列',
delTable: '删除表格',
},
hr: {
insert: '水平线',
},
style: {
style: '样式',
p: '普通',
blockquote: '引用',
pre: '代码',
h1: '标题 1',
h2: '标题 2',
h3: '标题 3',
h4: '标题 4',
h5: '标题 5',
h6: '标题 6',
},
lists: {
unordered: '无序列表',
ordered: '有序列表',
},
options: {
help: '帮助',
fullscreen: '全屏',
codeview: '源代码',
},
paragraph: {
paragraph: '段落',
outdent: '减少缩进',
indent: '增加缩进',
left: '左对齐',
center: '居中对齐',
right: '右对齐',
justify: '两端对齐',
},
color: {
recent: '最近使用',
more: '更多',
background: '背景',
foreground: '前景',
transparent: '透明',
setTransparent: '透明',
reset: '重置',
resetToDefault: '默认',
},
shortcut: {
shortcuts: '快捷键',
close: '关闭',
textFormatting: '文本格式',
action: '动作',
paragraphFormatting: '段落格式',
documentStyle: '文档样式',
extraKeys: '额外按键',
},
help: {
insertParagraph: '插入段落',
undo: '撤销',
redo: '重做',
tab: '增加缩进',
untab: '减少缩进',
bold: '粗体',
italic: '斜体',
underline: '下划线',
strikethrough: '删除线',
removeFormat: '清除格式',
justifyLeft: '左对齐',
justifyCenter: '居中对齐',
justifyRight: '右对齐',
justifyFull: '两端对齐',
insertUnorderedList: '无序列表',
insertOrderedList: '有序列表',
outdent: '减少缩进',
indent: '增加缩进',
formatPara: '设置选中内容样式为 普通',
formatH1: '设置选中内容样式为 标题1',
formatH2: '设置选中内容样式为 标题2',
formatH3: '设置选中内容样式为 标题3',
formatH4: '设置选中内容样式为 标题4',
formatH5: '设置选中内容样式为 标题5',
formatH6: '设置选中内容样式为 标题6',
insertHorizontalRule: '插入水平线',
'linkDialog.show': '显示链接对话框',
},
history: {
undo: '撤销',
redo: '重做',
},
specialChar: {
specialChar: '特殊字符',
select: '选取特殊字符',
},
},
});
})(jQuery);
@@ -1,3 +0,0 @@
/*! Summernote v0.8.11 | (c) 2013- Alan Hong and other contributors | MIT license */
!function(e){e.extend(e.summernote.lang,{"zh-CN":{font:{bold:"粗体",italic:"斜体",underline:"下划线",clear:"清除格式",height:"行高",name:"字体",strikethrough:"删除线",subscript:"下标",superscript:"上标",size:"字号"},image:{image:"图片",insert:"插入图片",resizeFull:"缩放至 100%",resizeHalf:"缩放至 50%",resizeQuarter:"缩放至 25%",floatLeft:"靠左浮动",floatRight:"靠右浮动",floatNone:"取消浮动",shapeRounded:"形状: 圆角",shapeCircle:"形状: 圆",shapeThumbnail:"形状: 缩略图",shapeNone:"形状: 无",dragImageHere:"将图片拖拽至此处",dropImage:"拖拽图片或文本",selectFromFiles:"从本地上传",maximumFileSize:"文件大小最大值",maximumFileSizeError:"文件大小超出最大值。",url:"图片地址",remove:"移除图片",original:"原始图片"},video:{video:"视频",videoLink:"视频链接",insert:"插入视频",url:"视频地址",providers:"(优酷, 腾讯, Instagram, DailyMotion, Youtube等)"},link:{link:"链接",insert:"插入链接",unlink:"去除链接",edit:"编辑链接",textToDisplay:"显示文本",url:"链接地址",openInNewWindow:"在新窗口打开"},table:{table:"表格",addRowAbove:"在上方插入行",addRowBelow:"在下方插入行",addColLeft:"在左侧插入列",addColRight:"在右侧插入列",delRow:"删除行",delCol:"删除列",delTable:"删除表格"},hr:{insert:"水平线"},style:{style:"样式",p:"普通",blockquote:"引用",pre:"代码",h1:"标题 1",h2:"标题 2",h3:"标题 3",h4:"标题 4",h5:"标题 5",h6:"标题 6"},lists:{unordered:"无序列表",ordered:"有序列表"},options:{help:"帮助",fullscreen:"全屏",codeview:"源代码"},paragraph:{paragraph:"段落",outdent:"减少缩进",indent:"增加缩进",left:"左对齐",center:"居中对齐",right:"右对齐",justify:"两端对齐"},color:{recent:"最近使用",more:"更多",background:"背景",foreground:"前景",transparent:"透明",setTransparent:"透明",reset:"重置",resetToDefault:"默认"},shortcut:{shortcuts:"快捷键",close:"关闭",textFormatting:"文本格式",action:"动作",paragraphFormatting:"段落格式",documentStyle:"文档样式",extraKeys:"额外按键"},help:{insertParagraph:"插入段落",undo:"撤销",redo:"重做",tab:"增加缩进",untab:"减少缩进",bold:"粗体",italic:"斜体",underline:"下划线",strikethrough:"删除线",removeFormat:"清除格式",justifyLeft:"左对齐",justifyCenter:"居中对齐",justifyRight:"右对齐",justifyFull:"两端对齐",insertUnorderedList:"无序列表",insertOrderedList:"有序列表",outdent:"减少缩进",indent:"增加缩进",formatPara:"设置选中内容样式为 普通",formatH1:"设置选中内容样式为 标题1",formatH2:"设置选中内容样式为 标题2",formatH3:"设置选中内容样式为 标题3",formatH4:"设置选中内容样式为 标题4",formatH5:"设置选中内容样式为 标题5",formatH6:"设置选中内容样式为 标题6",insertHorizontalRule:"插入水平线","linkDialog.show":"显示链接对话框"},history:{undo:"撤销",redo:"重做"},specialChar:{specialChar:"特殊字符",select:"选取特殊字符"}}})}(jQuery);
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -42,6 +42,12 @@ $(document).ready(function(){
var ip = /^(?:(?:2[0-4][0-9]\.)|(?:25[0-5]\.)|(?:1[0-9][0-9]\.)|(?:[1-9][0-9]\.)|(?:[0-9]\.)){3}(?:(?:2[0-4][0-9])|(?:25[0-5])|(?:1[0-9][0-9])|(?:[1-9][0-9])|(?:[0-9]))$/;
return this.optional(element) || (ip).test(value);
},"IP地址格式示例127.0.0.1");
jQuery.validator.addMethod("notEqual", function(value, element, param) {
return value != param;
}, $.validator.format("输入值不允许为{0}"));
jQuery.validator.addMethod("gt", function(value, element, param) {
return value > param;
}, $.validator.format("输入值必须大于{0}"));
//校验新旧密码是否相同
jQuery.validator.addMethod("isdiff",function(){
var p1=$("#pwdOld").val();
@@ -5,10 +5,16 @@
*
*/
/** 蓝色主题 skin-blue **/
.skin-blue .navbar {
.navbar, .skin-blue .navbar {
background-color: #3c8dbc
}
.skin-blue .navbar-default .nav>li.selected>a,
.skin-blue .navbar-default .nav>li.selected>a:focus {
background-color: #1890ff;
color: rgba(255,255,255,1);
}
.skin-blue .navbar .nav>li>a {
color: #fff
}
@@ -97,11 +103,6 @@
border-left: none;
}
.skin-blue .nav>li>.treeview-menu {
margin: 0 1px;
background: #2c3b41
}
.skin-blue .sidebar a {
color: #b8c7ce
}
@@ -110,15 +111,6 @@
text-decoration: none
}
.skin-blue .treeview-menu>li>a {
color: #8aa4af
}
.skin-blue .treeview-menu>li.active>a,
.skin-blue .treeview-menu>li>a:hover {
color: #fff
}
.skin-blue .sidebar-form {
border-radius: 3px;
border: 1px solid #374850;
@@ -170,7 +162,7 @@
}
.skin-blue .content-tabs {
border-bottom: solid 2px #e7eaec;
border-bottom: 1px solid #e5e5e5;
}
.skin-blue.layout-top-nav>.logo {
@@ -188,8 +180,14 @@
background-color: #00a65a;
}
.skin-green .navbar-default .nav>li.selected>a,
.skin-green .navbar-default .nav>li.selected>a:focus {
background-color: #52c41a;
color: rgba(255,255,255,1);
}
.skin-green .content-tabs {
border-bottom: solid 2px #e7eaec;
border-bottom: 1px solid #e5e5e5;
}
.skin-green .navbar .nav>li>a {
@@ -280,11 +278,6 @@
border-left: none;
}
.skin-green .nav>li>.treeview-menu {
margin: 0 1px;
background: #2c3b41
}
.skin-green .sidebar a {
color: #b8c7ce
}
@@ -293,15 +286,6 @@
text-decoration: none
}
.skin-green .treeview-menu>li>a {
color: #8aa4af
}
.skin-green .treeview-menu>li.active>a,
.skin-green .treeview-menu>li>a:hover {
color: #fff
}
.skin-green .sidebar-form {
border-radius: 3px;
border: 1px solid #374850;
@@ -347,6 +331,12 @@
background-color: #dd4b39
}
.skin-red .navbar-default .nav>li.selected>a,
.skin-red .navbar-default .nav>li.selected>a:focus {
background-color: #f5222d;
color: rgba(255,255,255,1);
}
.skin-red .navbar .nav>li>a {
color: #fff
}
@@ -436,12 +426,7 @@
}
.skin-red .content-tabs {
border-bottom: solid 2px #e7eaec;
}
.skin-red .nav>li>.treeview-menu {
margin: 0 1px;
background: #2c3b41
border-bottom: 1px solid #e5e5e5;
}
.skin-red .sidebar a {
@@ -452,15 +437,6 @@
text-decoration: none
}
.skin-red .treeview-menu>li>a {
color: #8aa4af
}
.skin-red .treeview-menu>li.active>a,
.skin-red .treeview-menu>li>a:hover {
color: #fff
}
.skin-red .sidebar-form {
border-radius: 3px;
border: 1px solid #374850;
@@ -506,6 +482,12 @@
background-color: #f39c12
}
.skin-yellow .navbar-default .nav>li.selected>a,
.skin-yellow .navbar-default .nav>li.selected>a:focus {
background-color: #faad14;
color: rgba(255,255,255,1);
}
.skin-yellow .navbar .nav>li>a {
color: #fff
}
@@ -595,13 +577,7 @@
}
.skin-yellow .content-tabs {
border-bottom: solid 2px #e7eaec;
}
.skin-yellow .nav>li>.treeview-menu {
margin: 0 1px;
background: #2c3b41
border-bottom: 1px solid #e5e5e5;
}
.skin-yellow .sidebar a {
@@ -612,15 +588,6 @@
text-decoration: none
}
.skin-yellow .treeview-menu>li>a {
color: #8aa4af
}
.skin-yellow .treeview-menu>li.active>a,
.skin-yellow .treeview-menu>li>a:hover {
color: #fff
}
.skin-yellow .sidebar-form {
border-radius: 3px;
border: 1px solid #374850;
@@ -666,6 +633,12 @@
background-color: #605ca8
}
.skin-purple .navbar-default .nav>li.selected>a,
.skin-purple .navbar-default .nav>li.selected>a:focus {
background-color: #722ed1;
color: rgba(255,255,255,1);
}
.skin-purple .navbar .nav>li>a {
color: #fff
}
@@ -755,13 +728,7 @@
}
.skin-purple .content-tabs {
border-bottom: solid 2px #e7eaec;
}
.skin-purple .nav>li>.treeview-menu {
margin: 0 1px;
background: #2c3b41
border-bottom: 1px solid #e5e5e5;
}
.skin-purple .sidebar a {
@@ -772,15 +739,6 @@
text-decoration: none
}
.skin-purple .treeview-menu>li>a {
color: #8aa4af
}
.skin-purple .treeview-menu>li.active>a,
.skin-purple .treeview-menu>li>a:hover {
color: #fff
}
.skin-purple .sidebar-form {
border-radius: 3px;
border: 1px solid #374850;
@@ -820,3 +778,207 @@
border-bottom-right-radius: 2px;
border-bottom-left-radius: 0
}
/*
*
* 侧边栏主题 若依管理系统
* NAME - .theme-dark/theme-light
*
*/
/** 深黑主题 .theme-dark **/
.theme-dark .user-panel>.info>p, .theme-dark .user-panel>.info, .theme-dark .user-panel>.info>a{
color: #fff
}
.theme-dark .nav>li.active {
background: #293846;
}
.theme-dark .navbar-static-side {
background-color: #2f4050;
}
.theme-dark .user-panel {
background-color: #2f4050;
}
.theme-dark .navbar-default .nav>li>a:hover,
.theme-dark .navbar-default .nav>li>a:focus {
background: #293846;
}
/** 浅色主题 theme-light **/
.theme-light .user-panel>.info>p, .theme-light .user-panel>.info, .theme-light .user-panel>.info>a{
color: #555
}
.theme-light .nav>li.active{
background: #f9fafc;
}
.theme-light .navbar-static-side {
background-color: #f9fafc;
box-shadow: 2px 0 2px 0 rgba(29,35,41,.05);
}
.theme-light .user-panel {
background-color: #f9fafc;
}
.theme-light .navbar-default .nav>li>a {
color: #777;
}
.theme-light.skin-blue .navbar-default .nav>li.active>a {
color: #1890ff;
}
.theme-light.skin-blue .navbar-default .nav>li.selected>a,
.theme-light.skin-blue .navbar-default .nav>li.selected>a:focus {
background-color: rgb(240, 245, 255);
color: rgb(47, 84, 235);
}
.theme-light.skin-green .navbar-default .nav>li.active>a {
color: #52c41a;
}
.theme-light.skin-green .navbar-default .nav>li.selected>a,
.theme-light.skin-green .navbar-default .nav>li.selected>a:focus {
background-color: rgb(246, 255, 237);
color: rgb(82, 196, 26);
}
.theme-light.skin-purple .navbar-default .nav>li.active>a {
color: rgb(114, 46, 209);
}
.theme-light.skin-purple .navbar-default .nav>li.selected>a,
.theme-light.skin-purple .navbar-default .nav>li.selected>a:focus {
background-color: #f9f0ff;
color: #722ed1;
}
.theme-light.skin-red .navbar-default .nav>li.active>a {
color: rgb(245, 34, 45);
}
.theme-light.skin-red .navbar-default .nav>li.selected>a,
.theme-light.skin-red .navbar-default .nav>li.selected>a:focus {
background-color: rgb(255, 241, 240);
color: rgb(245, 34, 45);
}
.theme-light.skin-yellow .navbar-default .nav>li.active>a {
color: rgb(250, 173, 20);
}
.theme-light.skin-yellow .navbar-default .nav>li.selected>a,
.theme-light.skin-yellow .navbar-default .nav>li.selected>a:focus {
background-color: #fffbe6;
color: #faad14;
}
.theme-light .navbar-default .nav>li>a:hover,
.theme-light .navbar-default .nav>li>a:focus {
background-color: rgb(240, 245, 255);
}
.fixed-sidebar.theme-light.mini-navbar .nav li:hover>a> span.nav-label {
background-color: #f9fafc;
}
.fixed-sidebar.theme-light.mini-navbar .nav li:hover>.nav-second-level {
background-color: #f9fafc;
}
/** 深蓝主题 theme-light **/
/**
.skin-blue.theme-blue .logo, .skin-white.theme-blue .logo {
background-color: rgba(15,41,80,1) !important;
color: #fff;
}
**/
.theme-blue .user-panel>.info>p, .theme-blue .user-panel>.info, .theme-blue .user-panel>.info>a{
color: #a3b1cc
}
.theme-blue .nav>li.active{
background-color: rgba(15,41,80,1);
}
.theme-blue .navbar-static-side {
background-color: rgba(15,41,80,1);
box-shadow: 2px 0 2px 0 rgba(29,35,41,.05);
}
.theme-blue .user-panel {
background-color: rgba(15,41,80,1);
}
.theme-blue .navbar-default .nav>li>a {
color: #a3b1cc;
}
.theme-blue.skin-blue .navbar-default .nav>li.active>a {
color: #1890ff;
}
.theme-blue.skin-blue .navbar-default .nav>li.selected>a,
.theme-blue.skin-blue .navbar-default .nav>li.selected>a:focus {
background-color: #1890ff;
}
.theme-blue.skin-green .navbar-default .nav>li.active>a {
color: #52c41a;
}
.theme-blue.skin-green .navbar-default .nav>li.selected>a,
.theme-blue.skin-green .navbar-default .nav>li.selected>a:focus {
background-color: #52c41a;
color: rgba(255,255,255,1);
}
.theme-blue.skin-purple .navbar-default .nav>li.active>a {
color: rgb(114, 46, 209);
}
.theme-blue.skin-purple .navbar-default .nav>li.selected>a,
.theme-blue.skin-purple .navbar-default .nav>li.selected>a:focus {
background-color: #722ed1;
color: rgba(255,255,255,1);
}
.theme-blue.skin-red .navbar-default .nav>li.active>a {
color: rgb(245, 34, 45);
}
.theme-blue.skin-red .navbar-default .nav>li.selected>a,
.theme-blue.skin-red .navbar-default .nav>li.selected>a:focus {
background-color: #f5222d;
color: rgba(255,255,255,1);
}
.theme-blue.skin-yellow .navbar-default .nav>li.active>a {
color: rgb(250, 173, 20);
}
.theme-blue.skin-yellow .navbar-default .nav>li.selected>a,
.theme-blue.skin-yellow .navbar-default .nav>li.selected>a:focus {
background-color: #faad14;
color: rgba(255,255,255,1);
}
.theme-blue .navbar-default .nav>li>a:hover,
.theme-blue .navbar-default .nav>li>a:focus {
background-color: rgba(15,41,80,1);
box-shadow: 2px 0 2px 0 rgba(29,35,41,.05);
}
.fixed-sidebar.theme-blue.mini-navbar .nav li:hover>a> span.nav-label {
background-color: rgba(15,41,80,1);
}
.fixed-sidebar.theme-blue.mini-navbar .nav li:hover>.nav-second-level {
background-color: rgba(15,41,80,1);
}
@@ -763,15 +763,15 @@ body.canvas-menu.mini-navbar nav.navbar-static-side {
}
.btn-default {
background-color: #c2c2c2;
border-color: #c2c2c2;
color: #FFFFFF;
background-color: #f4f4f4;
border-color: #ddd;
color: #444;
}
.btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open .dropdown-toggle.btn-default {
background-color: #bababa;
border-color: #bababa;
color: #FFFFFF;
background-color: #e7e7e7;
border-color: #e7e7e7;
color: #444;
}
.btn-default:active, .btn-default.active, .open .dropdown-toggle.btn-default {
@@ -3247,15 +3247,15 @@ body.body-small .footer.fixed {
/*CONTENTTABS*/
.content-tabs {
position: relative;
height: 42px;
height: 39px;
background: #fafafa;
line-height: 40px;
line-height: 38px;
}
.content-tabs .roll-nav, .page-tabs-list {
position: absolute;
width: 40px;
height: 40px;
width: 30px;
height: 38px;
text-align: center;
color: #999;
z-index: 2;
@@ -3285,9 +3285,9 @@ body.body-small .footer.fixed {
}
nav.page-tabs {
margin-left: 40px;
margin-left: 30px;
width: 100000px;
height: 40px;
height: 38px;
overflow: hidden;
}
@@ -3328,7 +3328,7 @@ nav.page-tabs .page-tabs-content {
.roll-right.tabReload {
background: #fff;
height: 40px;
height: 38px;
width: 60px;
outline: none;
}
@@ -3338,7 +3338,7 @@ nav.page-tabs .page-tabs-content {
}
#content-main {
height: calc(100% - 140px);
height: calc(100% - 127px);
overflow: hidden;
}
@@ -6858,42 +6858,6 @@ body.rtls .top-navigation .footer.fixed, body.rtls.top-navigation .footer.fixed
transition: all .3s ease-out 0s;
}
::-webkit-scrollbar-track {
background-color: #F5F5F5;
}
::-webkit-scrollbar {
width: 6px;
background-color: #F5F5F5;
}
::-webkit-scrollbar-thumb {
background-color: #999;
}
/*GO HOME*/
.gohome {
position: fixed;
top: 20px;
right: 20px;
z-index: 100;
}
.gohome a {
height: 38px;
width: 38px;
display: block;
background: #2f4050;
padding: 9px 8px;
text-align: center;
color: #fff;
border-radius: 50%;
opacity: .5;
}
.gohome a:hover {
opacity: 1;
}
@media only screen and (-webkit-min-device-pixel-ratio : 2) {
#content-main {
-webkit-overflow-scrolling: touch;
@@ -6975,7 +6939,7 @@ body.rtls .top-navigation .footer.fixed, body.rtls.top-navigation .footer.fixed
background: #f5f5f5;
}
.nav .logo {
nav .logo {
background-color: #367fa9;
color: #fff;
border-bottom: 0 solid transparent;
@@ -6987,7 +6951,7 @@ body.rtls .top-navigation .footer.fixed, body.rtls.top-navigation .footer.fixed
font-size: 20px;
line-height: 50px;
text-align: center;
width: 220px;
width: 200px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
padding: 0 15px;
font-weight: 300;
@@ -18,6 +18,7 @@ user.password.not.valid=* 5-50个字符
user.email.not.valid=邮箱格式错误
user.mobile.phone.number.not.valid=手机号格式错误
user.login.success=登录成功
user.register.success=注册成功
user.notfound=请重新登录
user.forcelogout=管理员强制退出,请重新登录
user.unknown.error=未知错误,请重新登录
@@ -0,0 +1,492 @@
/*!
* jQuery Templates Plugin 1.0.0pre
* http://github.com/jquery/jquery-tmpl
* Requires jQuery 1.4.2
*
* Copyright 2011, Software Freedom Conservancy, Inc.
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*/
(function( factory ) {
if (typeof define === 'function' && define.amd) {
// Loading from AMD script loader. Register as an anonymous module.
define( ['jquery'], factory );
} else {
// Browser using plain <script> tag
factory( jQuery );
}
}(function( jQuery ){
var oldManip = jQuery.fn.domManip, tmplItmAtt = "_tmplitem", htmlExpr = /^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,
newTmplItems = {}, wrappedItems = {}, appendToTmplItems, topTmplItem = { key: 0, data: {} }, itemKey = 0, cloneIndex = 0, stack = [];
function newTmplItem( options, parentItem, fn, data ) {
// Returns a template item data structure for a new rendered instance of a template (a 'template item').
// The content field is a hierarchical array of strings and nested items (to be
// removed and replaced by nodes field of dom elements, once inserted in DOM).
var newItem = {
data: data || (data === 0 || data === false) ? data : (parentItem ? parentItem.data : {}),
_wrap: parentItem ? parentItem._wrap : null,
tmpl: null,
parent: parentItem || null,
nodes: [],
calls: tiCalls,
nest: tiNest,
wrap: tiWrap,
html: tiHtml,
update: tiUpdate
};
if ( options ) {
jQuery.extend( newItem, options, { nodes: [], parent: parentItem });
}
if ( fn ) {
// Build the hierarchical content to be used during insertion into DOM
newItem.tmpl = fn;
newItem._ctnt = newItem._ctnt || newItem.tmpl( jQuery, newItem );
newItem.key = ++itemKey;
// Keep track of new template item, until it is stored as jQuery Data on DOM element
(stack.length ? wrappedItems : newTmplItems)[itemKey] = newItem;
}
return newItem;
}
// Override appendTo etc., in order to provide support for targeting multiple elements. (This code would disappear if integrated in jquery core).
jQuery.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function( name, original ) {
jQuery.fn[ name ] = function( selector ) {
var ret = [], insert = jQuery( selector ), elems, i, l, tmplItems,
parent = this.length === 1 && this[0].parentNode;
appendToTmplItems = newTmplItems || {};
if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
insert[ original ]( this[0] );
ret = this;
} else {
for ( i = 0, l = insert.length; i < l; i++ ) {
cloneIndex = i;
elems = (i > 0 ? this.clone(true) : this).get();
jQuery( insert[i] )[ original ]( elems );
ret = ret.concat( elems );
}
cloneIndex = 0;
ret = this.pushStack( ret, name, insert.selector );
}
tmplItems = appendToTmplItems;
appendToTmplItems = null;
jQuery.tmpl.complete( tmplItems );
return ret;
};
});
jQuery.fn.extend({
// Use first wrapped element as template markup.
// Return wrapped set of template items, obtained by rendering template against data.
tmpl: function( data, options, parentItem ) {
return jQuery.tmpl( this[0], data, options, parentItem );
},
// Find which rendered template item the first wrapped DOM element belongs to
tmplItem: function() {
return jQuery.tmplItem( this[0] );
},
// Consider the first wrapped element as a template declaration, and get the compiled template or store it as a named template.
template: function( name ) {
return jQuery.template( name, this[0] );
},
domManip: function( args, table, callback, options ) {
if ( args[0] && jQuery.isArray( args[0] )) {
var dmArgs = jQuery.makeArray( arguments ), elems = args[0], elemsLength = elems.length, i = 0, tmplItem;
while ( i < elemsLength && !(tmplItem = jQuery.data( elems[i++], "tmplItem" ))) {}
if ( tmplItem && cloneIndex ) {
dmArgs[2] = function( fragClone ) {
// Handler called by oldManip when rendered template has been inserted into DOM.
jQuery.tmpl.afterManip( this, fragClone, callback );
};
}
oldManip.apply( this, dmArgs );
} else {
oldManip.apply( this, arguments );
}
cloneIndex = 0;
if ( !appendToTmplItems ) {
jQuery.tmpl.complete( newTmplItems );
}
return this;
}
});
jQuery.extend({
// Return wrapped set of template items, obtained by rendering template against data.
tmpl: function( tmpl, data, options, parentItem ) {
var ret, topLevel = !parentItem;
if ( topLevel ) {
// This is a top-level tmpl call (not from a nested template using {{tmpl}})
parentItem = topTmplItem;
tmpl = jQuery.template[tmpl] || jQuery.template( null, tmpl );
wrappedItems = {}; // Any wrapped items will be rebuilt, since this is top level
} else if ( !tmpl ) {
// The template item is already associated with DOM - this is a refresh.
// Re-evaluate rendered template for the parentItem
tmpl = parentItem.tmpl;
newTmplItems[parentItem.key] = parentItem;
parentItem.nodes = [];
if ( parentItem.wrapped ) {
updateWrapped( parentItem, parentItem.wrapped );
}
// Rebuild, without creating a new template item
return jQuery( build( parentItem, null, parentItem.tmpl( jQuery, parentItem ) ));
}
if ( !tmpl ) {
return []; // Could throw...
}
if ( typeof data === "function" ) {
data = data.call( parentItem || {} );
}
if ( options && options.wrapped ) {
updateWrapped( options, options.wrapped );
}
ret = jQuery.isArray( data ) ?
jQuery.map( data, function( dataItem ) {
return dataItem ? newTmplItem( options, parentItem, tmpl, dataItem ) : null;
}) :
[ newTmplItem( options, parentItem, tmpl, data ) ];
return topLevel ? jQuery( build( parentItem, null, ret ) ) : ret;
},
// Return rendered template item for an element.
tmplItem: function( elem ) {
var tmplItem;
if ( elem instanceof jQuery ) {
elem = elem[0];
}
while ( elem && elem.nodeType === 1 && !(tmplItem = jQuery.data( elem, "tmplItem" )) && (elem = elem.parentNode) ) {}
return tmplItem || topTmplItem;
},
// Set:
// Use $.template( name, tmpl ) to cache a named template,
// where tmpl is a template string, a script element or a jQuery instance wrapping a script element, etc.
// Use $( "selector" ).template( name ) to provide access by name to a script block template declaration.
// Get:
// Use $.template( name ) to access a cached template.
// Also $( selectorToScriptBlock ).template(), or $.template( null, templateString )
// will return the compiled template, without adding a name reference.
// If templateString includes at least one HTML tag, $.template( templateString ) is equivalent
// to $.template( null, templateString )
template: function( name, tmpl ) {
if (tmpl) {
// Compile template and associate with name
if ( typeof tmpl === "string" ) {
// This is an HTML string being passed directly in.
tmpl = buildTmplFn( tmpl );
} else if ( tmpl instanceof jQuery ) {
tmpl = tmpl[0] || {};
}
if ( tmpl.nodeType ) {
// If this is a template block, use cached copy, or generate tmpl function and cache.
tmpl = jQuery.data( tmpl, "tmpl" ) || jQuery.data( tmpl, "tmpl", buildTmplFn( tmpl.innerHTML ));
// Issue: In IE, if the container element is not a script block, the innerHTML will remove quotes from attribute values whenever the value does not include white space.
// This means that foo="${x}" will not work if the value of x includes white space: foo="${x}" -> foo=value of x.
// To correct this, include space in tag: foo="${ x }" -> foo="value of x"
}
return typeof name === "string" ? (jQuery.template[name] = tmpl) : tmpl;
}
// Return named compiled template
return name ? (typeof name !== "string" ? jQuery.template( null, name ):
(jQuery.template[name] ||
// If not in map, and not containing at least on HTML tag, treat as a selector.
// (If integrated with core, use quickExpr.exec)
jQuery.template( null, htmlExpr.test( name ) ? name : jQuery( name )))) : null;
},
encode: function( text ) {
// Do HTML encoding replacing < > & and ' and " by corresponding entities.
return ("" + text).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;");
}
});
jQuery.extend( jQuery.tmpl, {
tag: {
"tmpl": {
_default: { $2: "null" },
open: "if($notnull_1){__=__.concat($item.nest($1,$2));}"
// tmpl target parameter can be of type function, so use $1, not $1a (so not auto detection of functions)
// This means that {{tmpl foo}} treats foo as a template (which IS a function).
// Explicit parens can be used if foo is a function that returns a template: {{tmpl foo()}}.
},
"wrap": {
_default: { $2: "null" },
open: "$item.calls(__,$1,$2);__=[];",
close: "call=$item.calls();__=call._.concat($item.wrap(call,__));"
},
"each": {
_default: { $2: "$index, $value" },
open: "if($notnull_1){$.each($1a,function($2){with(this){",
close: "}});}"
},
"if": {
open: "if(($notnull_1) && $1a){",
close: "}"
},
"else": {
_default: { $1: "true" },
open: "}else if(($notnull_1) && $1a){"
},
"html": {
// Unecoded expression evaluation.
open: "if($notnull_1){__.push($1a);}"
},
"=": {
// Encoded expression evaluation. Abbreviated form is ${}.
_default: { $1: "$data" },
open: "if($notnull_1){__.push($.encode($1a));}"
},
"!": {
// Comment tag. Skipped by parser
open: ""
}
},
// This stub can be overridden, e.g. in jquery.tmplPlus for providing rendered events
complete: function( items ) {
newTmplItems = {};
},
// Call this from code which overrides domManip, or equivalent
// Manage cloning/storing template items etc.
afterManip: function afterManip( elem, fragClone, callback ) {
// Provides cloned fragment ready for fixup prior to and after insertion into DOM
var content = fragClone.nodeType === 11 ?
jQuery.makeArray(fragClone.childNodes) :
fragClone.nodeType === 1 ? [fragClone] : [];
// Return fragment to original caller (e.g. append) for DOM insertion
callback.call( elem, fragClone );
// Fragment has been inserted:- Add inserted nodes to tmplItem data structure. Replace inserted element annotations by jQuery.data.
storeTmplItems( content );
cloneIndex++;
}
});
//========================== Private helper functions, used by code above ==========================
function build( tmplItem, nested, content ) {
// Convert hierarchical content into flat string array
// and finally return array of fragments ready for DOM insertion
var frag, ret = content ? jQuery.map( content, function( item ) {
return (typeof item === "string") ?
// Insert template item annotations, to be converted to jQuery.data( "tmplItem" ) when elems are inserted into DOM.
(tmplItem.key ? item.replace( /(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g, "$1 " + tmplItmAtt + "=\"" + tmplItem.key + "\" $2" ) : item) :
// This is a child template item. Build nested template.
build( item, tmplItem, item._ctnt );
}) :
// If content is not defined, insert tmplItem directly. Not a template item. May be a string, or a string array, e.g. from {{html $item.html()}}.
tmplItem;
if ( nested ) {
return ret;
}
// top-level template
ret = ret.join("");
// Support templates which have initial or final text nodes, or consist only of text
// Also support HTML entities within the HTML markup.
ret.replace( /^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/, function( all, before, middle, after) {
frag = jQuery( middle ).get();
storeTmplItems( frag );
if ( before ) {
frag = unencode( before ).concat(frag);
}
if ( after ) {
frag = frag.concat(unencode( after ));
}
});
return frag ? frag : unencode( ret );
}
function unencode( text ) {
// Use createElement, since createTextNode will not render HTML entities correctly
var el = document.createElement( "div" );
el.innerHTML = text;
return jQuery.makeArray(el.childNodes);
}
// Generate a reusable function that will serve to render a template against data
function buildTmplFn( markup ) {
return new Function("jQuery","$item",
// Use the variable __ to hold a string array while building the compiled template. (See https://github.com/jquery/jquery-tmpl/issues#issue/10).
"var $=jQuery,call,__=[],$data=$item.data;" +
// Introduce the data as local variables using with(){}
"with($data){__.push('" +
// Convert the template into pure JavaScript
jQuery.trim(markup)
.replace( /([\\'])/g, "\\$1" )
.replace( /[\r\t\n]/g, " " )
.replace( /\$\{([^\}]*)\}/g, "{{= $1}}" )
.replace( /\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,
function( all, slash, type, fnargs, target, parens, args ) {
var tag = jQuery.tmpl.tag[ type ], def, expr, exprAutoFnDetect;
if ( !tag ) {
throw "Unknown template tag: " + type;
}
def = tag._default || [];
if ( parens && !/\w$/.test(target)) {
target += parens;
parens = "";
}
if ( target ) {
target = unescape( target );
args = args ? ("," + unescape( args ) + ")") : (parens ? ")" : "");
// Support for target being things like a.toLowerCase();
// In that case don't call with template item as 'this' pointer. Just evaluate...
expr = parens ? (target.indexOf(".") > -1 ? target + unescape( parens ) : ("(" + target + ").call($item" + args)) : target;
exprAutoFnDetect = parens ? expr : "(typeof(" + target + ")==='function'?(" + target + ").call($item):(" + target + "))";
} else {
exprAutoFnDetect = expr = def.$1 || "null";
}
fnargs = unescape( fnargs );
return "');" +
tag[ slash ? "close" : "open" ]
.split( "$notnull_1" ).join( target ? "typeof(" + target + ")!=='undefined' && (" + target + ")!=null" : "true" )
.split( "$1a" ).join( exprAutoFnDetect )
.split( "$1" ).join( expr )
.split( "$2" ).join( fnargs || def.$2 || "" ) +
"__.push('";
}) +
"');}return __;"
);
}
function updateWrapped( options, wrapped ) {
// Build the wrapped content.
options._wrap = build( options, true,
// Suport imperative scenario in which options.wrapped can be set to a selector or an HTML string.
jQuery.isArray( wrapped ) ? wrapped : [htmlExpr.test( wrapped ) ? wrapped : jQuery( wrapped ).html()]
).join("");
}
function unescape( args ) {
return args ? args.replace( /\\'/g, "'").replace(/\\\\/g, "\\" ) : null;
}
function outerHtml( elem ) {
var div = document.createElement("div");
div.appendChild( elem.cloneNode(true) );
return div.innerHTML;
}
// Store template items in jQuery.data(), ensuring a unique tmplItem data data structure for each rendered template instance.
function storeTmplItems( content ) {
var keySuffix = "_" + cloneIndex, elem, elems, newClonedItems = {}, i, l, m;
for ( i = 0, l = content.length; i < l; i++ ) {
if ( (elem = content[i]).nodeType !== 1 ) {
continue;
}
elems = elem.getElementsByTagName("*");
for ( m = elems.length - 1; m >= 0; m-- ) {
processItemKey( elems[m] );
}
processItemKey( elem );
}
function processItemKey( el ) {
var pntKey, pntNode = el, pntItem, tmplItem, key;
// Ensure that each rendered template inserted into the DOM has its own template item,
if ( (key = el.getAttribute( tmplItmAtt ))) {
while ( pntNode.parentNode && (pntNode = pntNode.parentNode).nodeType === 1 && !(pntKey = pntNode.getAttribute( tmplItmAtt ))) { }
if ( pntKey !== key ) {
// The next ancestor with a _tmplitem expando is on a different key than this one.
// So this is a top-level element within this template item
// Set pntNode to the key of the parentNode, or to 0 if pntNode.parentNode is null, or pntNode is a fragment.
pntNode = pntNode.parentNode ? (pntNode.nodeType === 11 ? 0 : (pntNode.getAttribute( tmplItmAtt ) || 0)) : 0;
if ( !(tmplItem = newTmplItems[key]) ) {
// The item is for wrapped content, and was copied from the temporary parent wrappedItem.
tmplItem = wrappedItems[key];
tmplItem = newTmplItem( tmplItem, newTmplItems[pntNode]||wrappedItems[pntNode] );
tmplItem.key = ++itemKey;
newTmplItems[itemKey] = tmplItem;
}
if ( cloneIndex ) {
cloneTmplItem( key );
}
}
el.removeAttribute( tmplItmAtt );
} else if ( cloneIndex && (tmplItem = jQuery.data( el, "tmplItem" )) ) {
// This was a rendered element, cloned during append or appendTo etc.
// TmplItem stored in jQuery data has already been cloned in cloneCopyEvent. We must replace it with a fresh cloned tmplItem.
cloneTmplItem( tmplItem.key );
newTmplItems[tmplItem.key] = tmplItem;
pntNode = jQuery.data( el.parentNode, "tmplItem" );
pntNode = pntNode ? pntNode.key : 0;
}
if ( tmplItem ) {
pntItem = tmplItem;
// Find the template item of the parent element.
// (Using !=, not !==, since pntItem.key is number, and pntNode may be a string)
while ( pntItem && pntItem.key != pntNode ) {
// Add this element as a top-level node for this rendered template item, as well as for any
// ancestor items between this item and the item of its parent element
pntItem.nodes.push( el );
pntItem = pntItem.parent;
}
// Delete content built during rendering - reduce API surface area and memory use, and avoid exposing of stale data after rendering...
delete tmplItem._ctnt;
delete tmplItem._wrap;
// Store template item as jQuery data on the element
jQuery.data( el, "tmplItem", tmplItem );
}
function cloneTmplItem( key ) {
key = key + keySuffix;
tmplItem = newClonedItems[key] =
(newClonedItems[key] || newTmplItem( tmplItem, newTmplItems[tmplItem.parent.key + keySuffix] || tmplItem.parent ));
}
}
}
//---- Helper functions for template item ----
function tiCalls( content, tmpl, data, options ) {
if ( !content ) {
return stack.pop();
}
stack.push({ _: content, tmpl: tmpl, item:this, data: data, options: options });
}
function tiNest( tmpl, data, options ) {
// nested template, using {{tmpl}} tag
return jQuery.tmpl( jQuery.template( tmpl ), data, options, this );
}
function tiWrap( call, wrapped ) {
// nested template, using {{wrap}} tag
var options = call.options || {};
options.wrapped = wrapped;
// Apply the template, which may incorporate wrapped content,
return jQuery.tmpl( jQuery.template( call.tmpl ), call.data, options, call.item );
}
function tiHtml( filter, textOnly ) {
var wrapped = this._wrap;
return jQuery.map(
jQuery( jQuery.isArray( wrapped ) ? wrapped.join("") : wrapped ).filter( filter || "*" ),
function(e) {
return textOnly ?
e.innerText || e.textContent :
e.outerHTML || outerHtml(e);
});
}
function tiUpdate() {
var coll = this.nodes;
jQuery.tmpl( null, null, null, this).insertBefore( coll[0] );
jQuery( coll ).remove();
}
}));
@@ -5,12 +5,4 @@
* Version: 1.3.8
*
*/
(function(e){e.fn.extend({slimScroll:function(f){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},f);this.each(function(){function v(d){if(r){d=d||window.event;
var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&n(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function n(d,g,e){k=!1;var f=b.outerHeight()-c.outerHeight();g&&(g=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),g=Math.min(Math.max(g,0),f),g=0<d?Math.ceil(g):Math.floor(g),c.css({top:g+"px"}));l=parseInt(c.css("top"))/(b.outerHeight()-c.outerHeight());g=
l*(b[0].scrollHeight-b.outerHeight());e&&(g=d,d=g/b[0].scrollHeight*b.outerHeight(),d=Math.min(Math.max(d,0),f),c.css({top:d+"px"}));b.scrollTop(g);b.trigger("slimscrolling",~~g);w();p()}function x(){u=Math.max(b.outerHeight()/b[0].scrollHeight*b.outerHeight(),30);c.css({height:u+"px"});var a=u==b.outerHeight()?"none":"block";c.css({display:a})}function w(){x();clearTimeout(B);l==~~l?(k=a.allowPageScroll,C!=l&&b.trigger("slimscroll",0==~~l?"top":"bottom")):k=!1;C=l;u>=b.outerHeight()?k=!0:(c.stop(!0,
!0).fadeIn("fast"),a.railVisible&&m.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(B=setTimeout(function(){a.disableFadeOut&&r||y||z||(c.fadeOut("slow"),m.fadeOut("slow"))},1E3))}var r,y,z,B,A,u,l,C,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var q=b.scrollTop(),c=b.siblings("."+a.barClass),m=b.siblings("."+a.railClass);x();if(e.isPlainObject(f)){if("height"in f&&"auto"==f.height){b.parent().css("height","auto");b.css("height","auto");var h=b.parent().parent().height();b.parent().css("height",
h);b.css("height",h)}else"height"in f&&(h=f.height,b.parent().css("height",h),b.css("height",h));if("scrollTo"in f)q=parseInt(a.scrollTo);else if("scrollBy"in f)q+=parseInt(a.scrollBy);else if("destroy"in f){c.remove();m.remove();b.unwrap();return}n(q,!1,!0)}}else if(!(e.isPlainObject(f)&&"destroy"in f)){a.height="auto"==a.height?b.parent().height():a.height;q=e("<div></div>").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",
width:a.width,height:a.height});var m=e("<div></div>").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("<div></div>").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,
WebkitBorderRadius:a.borderRadius,zIndex:99}),h="right"==a.position?{right:a.distance}:{left:a.distance};m.css(h);c.css(h);b.wrap(q);b.parent().append(c);b.parent().append(m);a.railDraggable&&c.bind("mousedown",function(a){var b=e(document);z=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);n(0,c.position().top,!1)});b.bind("mouseup.slimscroll",function(a){z=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",
function(a){a.stopPropagation();a.preventDefault();return!1});m.hover(function(){w()},function(){p()});c.hover(function(){y=!0},function(){y=!1});b.hover(function(){r=!0;w();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(A=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&(n((A-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),A=b.originalEvent.touches[0].pageY)});
x();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),n(0,!0)):"top"!==a.start&&(n(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());window.addEventListener?(this.addEventListener("DOMMouseScroll",v,!1),this.addEventListener("mousewheel",v,!1)):document.attachEvent("onmousewheel",v)}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery);
(function(a){a.fn.extend({slimScroll:function(b){var c={width:"auto",height:"250px",size:"2px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:false,disableFadeOut:false,railVisible:false,railColor:"#333",railOpacity:0.2,railDraggable:true,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:false,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"};var d=a.extend(c,b);this.each(function(){var z,s,l,q,C,u,p,k,m="<div></div>",w=30,r=false;var D=a(this);if(D.parent().hasClass(d.wrapperClass)){var i=D.scrollTop();x=D.siblings("."+d.barClass);e=D.siblings("."+d.railClass);E();if(a.isPlainObject(b)){if("height" in b&&b.height=="auto"){D.parent().css("height","auto");D.css("height","auto");var o=D.parent().parent().height();D.parent().css("height",o);D.css("height",o)}else{if("height" in b){var v=b.height;D.parent().css("height",v);D.css("height",v)}}if("scrollTo" in b){i=parseInt(d.scrollTo)}else{if("scrollBy" in b){i+=parseInt(d.scrollBy)}else{if("destroy" in b){x.remove();e.remove();D.unwrap();return}}}y(i,false,true)}return}else{if(a.isPlainObject(b)){if("destroy" in b){return}}}d.height=(d.height=="auto")?D.parent().height():d.height;var j=a(m).addClass(d.wrapperClass).css({position:"relative",width:d.width,height:d.height});D.css({width:d.width,height:d.height});var e=a(m).addClass(d.railClass).css({width:d.size,height:"100%",position:"absolute",top:0,display:(d.alwaysVisible&&d.railVisible)?"block":"none","border-radius":d.railBorderRadius,background:d.railColor,opacity:d.railOpacity,zIndex:90});var x=a(m).addClass(d.barClass).css({background:d.color,width:d.size,position:"absolute",top:0,opacity:d.opacity,display:d.alwaysVisible?"block":"none","border-radius":d.borderRadius,BorderRadius:d.borderRadius,MozBorderRadius:d.borderRadius,WebkitBorderRadius:d.borderRadius,zIndex:99});var f=(d.position=="right")?{right:d.distance}:{left:d.distance};e.css(f);x.css(f);D.wrap(j);D.parent().append(x);D.parent().append(e);if(d.railDraggable){x.bind("mousedown",function(h){var F=a(document);l=true;t=parseFloat(x.css("top"));pageY=h.pageY;F.bind("mousemove.slimscroll",function(G){currTop=t+G.pageY-pageY;x.css("top",currTop);y(0,x.position().top,false)});F.bind("mouseup.slimscroll",function(G){l=false;n();F.unbind(".slimscroll")});return false}).bind("selectstart.slimscroll",function(h){h.stopPropagation();h.preventDefault();return false})}e.hover(function(){g()},function(){n()});x.hover(function(){s=true},function(){s=false});D.hover(function(){z=true;g();n()},function(){z=false;n()});D.bind("touchstart",function(F,h){if(F.originalEvent.touches.length){C=F.originalEvent.touches[0].pageY}});D.bind("touchmove",function(F){if(!r){F.originalEvent.preventDefault()}if(F.originalEvent.touches.length){var h=(C-F.originalEvent.touches[0].pageY)/d.touchScrollStep;y(h,true);C=F.originalEvent.touches[0].pageY}});E();if(d.start==="bottom"){x.css({top:D.outerHeight()-x.outerHeight()});y(0,true)}else{if(d.start!=="top"){y(a(d.start).position().top,null,true);if(!d.alwaysVisible){x.hide()}}}A(this);function B(F){if(!z){return}var F=F||window.event;var G=0;if(F.wheelDelta){G=-F.wheelDelta/120}if(F.detail){G=F.detail/3}var h=F.target||F.srcTarget||F.srcElement;if(a(h).closest("."+d.wrapperClass).is(D.parent())){y(G,true)}if(F.preventDefault&&!r){F.preventDefault()}if(!r){F.returnValue=false}}function y(J,G,h){r=false;var I=J;var H=D.outerHeight()-x.outerHeight();if(G){I=parseInt(x.css("top"))+J*parseInt(d.wheelStep)/100*x.outerHeight();I=Math.min(Math.max(I,0),H);I=(J>0)?Math.ceil(I):Math.floor(I);x.css({top:I+"px"})}p=parseInt(x.css("top"))/(D.outerHeight()-x.outerHeight());I=p*(D[0].scrollHeight-D.outerHeight());if(h){I=J;var F=I/D[0].scrollHeight*D.outerHeight();F=Math.min(Math.max(F,0),H);x.css({top:F+"px"})}D.scrollTop(I);D.trigger("slimscrolling",~~I);g();n()}function A(h){if(window.addEventListener){h.addEventListener("DOMMouseScroll",B,false);h.addEventListener("mousewheel",B,false)}else{document.attachEvent("onmousewheel",B)}}function E(){u=Math.max((D.outerHeight()/D[0].scrollHeight)*D.outerHeight(),w);x.css({height:u+"px"});var h=u==D.outerHeight()?"none":"block";x.css({display:h})}function g(){E();clearTimeout(q);if(p==~~p){r=d.allowPageScroll;if(k!=p){var h=(~~p==0)?"top":"bottom";D.trigger("slimscroll",h)}}else{r=false}k=p;if(u>=D.outerHeight()){r=true;return}x.stop(true,true).fadeIn("fast");if(d.railVisible){e.stop(true,true).fadeIn("fast")}}function n(){if(!d.alwaysVisible){q=setTimeout(function(){if(!(d.disableFadeOut&&z)&&!s&&!l){x.fadeOut("slow");e.fadeOut("slow")}},1000)}}});return this}});a.fn.extend({slimscroll:a.fn.slimScroll})})(jQuery);
@@ -146,6 +146,12 @@
margin-right: 5px
}
.nav-tabs-custom>.nav-tabs>li.header {
padding-left: 5px;
font-size: 16px;
line-height: 30px;
}
.nav-tabs-custom>.nav-tabs>li.disabled>a {
color: #777
}
@@ -288,6 +294,12 @@
margin: 5px 0 5px -25px
}
@media ( min-width : 768px) {
.section-content .about {
padding-left: 0px
}
}
/** select2 样式修改 **/
.select2-container--default .select2-selection--multiple .select2-selection__choice {
background-color: #1AB394;
@@ -310,12 +322,18 @@
}
/** 表单验证 样式布局 **/
.control-label.is-required:before {
content: '* ';
color: red;
}
label.error {
position: absolute;
right: 18px;
top: 10px;
color: #ef392b;
font-size: 12px
font-size: 12px;
z-index:99;
}
.input-group label.error {
@@ -323,6 +341,11 @@ label.error {
right: 42px
}
.input-group.date label.error {
z-index:99;
right: 3px
}
.Validform_error,input.error,select.error {
background-color: #fbe2e2;
border-color: #c66161;
@@ -556,14 +579,14 @@ label.error {
}
}
/** 表单查询条件 **/
ul {
/** 表单查询条件 **/
.select-list ul, .layui-layer-content ul {
margin: 0;
padding: 0;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
li {
.select-list li, .layui-layer-content li {
list-style: none;
}
@@ -578,7 +601,7 @@ label {
}
.container-div {
padding: 10px 35px;
padding: 0px 28px;
height: 100%;
}
@@ -621,10 +644,10 @@ label {
margin: 5px 15px 5px 0px;
}
.select-list li p{
.select-list li p, .select-list li label:not(.radio-box){
float: left;
width: 80px;
margin: 5px 15px 5px 0px;
width: 65px;
margin: 5px 5px 5px 0px;
text-align:right;
}
@@ -666,6 +689,12 @@ label {
background: #FFFFFF none
}
.file-input .btn-default {
color: inherit;
background: white;
border: 1px solid #e7eaec;
}
.select-list .btn-default {
color: #555;
padding: 5px 5px;
@@ -714,6 +743,20 @@ label {
background-color: #12889a
}
.select-list .select2-container--bootstrap {
width: 200px!important;
display: inline-block;
}
.select-list .select2-container--bootstrap .select2-selection {
border-radius: 6px;
}
.select-list .select2-container--bootstrap .select2-selection--single {
height: 30px!important;
padding: 5px 10px;
}
.select-list .select-time input {
width: 93px;
}
@@ -774,12 +817,34 @@ label {
border: 0px!important;
}
.table-striped .table, .fixed-table-container, table, .table-striped .table, .table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td {
.table-striped table>thead>tr>th, .table-striped table>tbody>tr>th, .table-striped table>tfoot>tr>th, .table-striped table>thead>tr>td, .table-striped table>tbody>tr>td, .table-striped table>tfoot>tr>td {
border-bottom: 1px solid #e7eaec!important;
background-color: transparent!important;
background-color: transparent;
border: 0px;
}
.table-bordered table>thead>tr>th:first-child, .table-bordered table>tbody>tr>td:first-child {
border-left: 1px solid #ddd;
}
.table-bordered table>thead>tr>th:last-child, .table-bordered table>tbody>tr>td:last-child {
border-right: 1px solid #ddd;
}
.table-bordered table>thead>tr>th, .table-bordered table>tbody>tr>td {
border-top: 1px solid #ddd!important;
border-bottom: 1px solid #ddd;
}
.fixed-table-footer {
border-top: 0px solid #ddd;
}
.fixed-table-container {
border: 0px solid #ddd;
}
.table-striped .table>thead>tr>th, .table-striped .table>tbody>tr>th {
border-bottom: 1px solid #ccc!important;
border-top: 0px!important;
@@ -793,23 +858,40 @@ label {
background-color: #eff3f8;
}
.table-bordered td,.table-bordered th {
border: 1px solid #ddd!important
}
.fixed-table-container thead th >.both{
display: inline-block
}
.editable-input .input-sm {
height: 32px!important;
}
/** 表格冻结列样式 **/
.left-fixed-table-columns{
.left-fixed-table-columns, .left-fixed-body-columns {
position: absolute;
background-color: #fff;
display: none;
border-right:1px solid #ddd;
box-sizing: border-box;
overflow: hidden;
}
.left-fixed-table-columns .table, .left-fixed-body-columns .table {
border-right: 1px solid #ddd;
}
.left-fixed-table-columns .table.table-no-bordered, .left-fixed-body-columns .table.table-no-bordered {
border-right: 1px solid transparent;
}
.left-fixed-body-columns table {
position: absolute;
animation: none;
}
.bootstrap-table .table-hover > tbody > tr.hover > td {
background-color: #f5f5f5;
}
.right-fixed-table-columns{
position: absolute;
right:63px;
@@ -833,7 +915,7 @@ label {
.bootstrap-tree-table .treetable-bars .tool-left{float: left;}
.bootstrap-tree-table .treetable-bars .tool-right{float: right;}
.bootstrap-tree-table .treetable-bars .columns li label{display: block;padding: 3px 20px;clear: both;font-weight: 400;line-height: 1.428571429;max-width: 100%;margin-bottom: 5px;cursor:pointer;}
.bootstrap-tree-table .table{border-bottom: 0px solid #e7eaec!important;}
/** 首页样式 **/
.ax_close_max {
@@ -886,7 +968,7 @@ label {
padding-bottom:5px
}
.form-content {
.main-content {
background-color: #ffffff;
color: inherit;
padding: 10px 15px 15px 15px;
@@ -911,4 +993,78 @@ label {
height: 32px;
display: block;
float:left;
}
/** 表格拖拽样式 **/
.reorder_rows_onDragClass td {
color:yellow!important;
background-color:#999!important;
text-shadow:0 0 10px black,0 0 10px black,0 0 8px black,0 0 6px black,0 0 6px black;
box-shadow:0 12px 14px -12px #111 inset,0 -2px 2px -1px #333 inset
}
/** 表格选中样式 **/
.fixed-table-container .selected {
background-color: #E8F7FD;
color: #1890ff;
}
/** 滚动条样式 **/
::-webkit-scrollbar-track {
background-color: #F5F5F5;
}
/** 气泡弹出框样式 **/
.popover {
font-size: 13px;
max-width: unset;
}
.popover-title {
padding: 8px 14px;
margin: 0 !important;
font-size: 14px;
background-color: #f7f7f7;
border-bottom: 1px solid #ebebeb;
border-radius: 5px 5px 0 0;
}
.popover-content {
padding: 5px;
}
/** 向上滚动样式 **/
#scroll-up {
border-width: 0;
position: fixed;
right: 2px;
z-index: 99;
-webkit-transition-duration: .3s;
transition-duration: .3s;
opacity: 0;
filter: alpha(opacity=0);
bottom: -24px;
visibility: hidden;
background-color: #aaa;
color: #fff;
font-size: 14px;
display: none;
}
#scroll-up.display {
opacity: .7;
filter: alpha(opacity=70);
bottom: 2px;
visibility: visible;
}
::-webkit-scrollbar {
width: 6px;
height: 10px;
background-color: #F5F5F5;
}
::-webkit-scrollbar-thumb {
border-radius: 6px;
background-color: #999;
}
@@ -7,14 +7,16 @@ layer.config({
skin: 'layer-ext-moon'
});
var isMobile = $.common.isMobile() || $(window).width() < 769;
$(function() {
// MetsiMenu
$('#side-menu').metisMenu();
//固定菜单栏
// 固定菜单栏
$(function() {
$('.sidebar-collapse').slimScroll({
height: '100%',
height: '96%',
railOpacity: 0.9,
alwaysVisible: false
});
@@ -22,16 +24,21 @@ $(function() {
// 菜单切换
$('.navbar-minimalize').click(function() {
$("body").toggleClass("mini-navbar");
if (isMobile) {
$("body").toggleClass("canvas-menu");
} else {
$("body").toggleClass("mini-navbar");
}
SmoothlyMenu();
});
$('#side-menu>li').click(function() {
if ($('body').hasClass('mini-navbar')) {
if ($('body').hasClass('canvas-menu mini-navbar')) {
NavToggle();
}
});
$('#side-menu>li li a').click(function() {
$('#side-menu>li li a:not(:has(span))').click(function() {
if ($(window).width() < 769) {
NavToggle();
}
@@ -49,9 +56,9 @@ $(function() {
$(window).bind("load resize",
function() {
if ($(this).width() < 769) {
$('body').addClass('mini-navbar');
$('.navbar-static-side').fadeIn();
$(".sidebar-collapse .logo").addClass("hide");
$('body').addClass('canvas-menu');
$("nav .logo").addClass("hide");
$(".slimScrollDiv").css({ "overflow":"hidden" })
}
});
@@ -59,21 +66,27 @@ function NavToggle() {
$('.navbar-minimalize').trigger('click');
}
function fixedSidebar() {
$('#side-menu').hide();
$("nav .logo").addClass("hide");
setTimeout(function() {
$('#side-menu').fadeIn(500);
},
100);
}
function SmoothlyMenu() {
if (!$('body').hasClass('mini-navbar')) {
$('#side-menu').hide();
$(".sidebar-collapse .logo").removeClass("hide");
setTimeout(function() {
$('#side-menu').fadeIn(500);
},
100);
} else if ($('body').hasClass('fixed-sidebar')) {
$('#side-menu').hide();
$(".sidebar-collapse .logo").addClass("hide");
setTimeout(function() {
$('#side-menu').fadeIn(500);
},
300);
if (isMobile && !$('body').hasClass('canvas-menu')) {
$('.navbar-static-side').fadeIn();
fixedSidebar();
} else if (!isMobile &&!$('body').hasClass('mini-navbar')) {
fixedSidebar();
$("nav .logo").removeClass("hide");
} else if (isMobile && $('body').hasClass('fixed-sidebar')) {
$('.navbar-static-side').fadeOut();
fixedSidebar();
} else if (!isMobile && $('body').hasClass('fixed-sidebar')) {
fixedSidebar();
} else {
$('#side-menu').removeAttr('style');
}
@@ -216,6 +229,9 @@ $(function() {
dataIndex = $(this).data('index'),
menuName = $.trim($(this).text()),
flag = true;
$(".nav ul li, .nav li").removeClass("selected");
$(this).parent("li").addClass("selected");
setIframeUrl($(this).attr("href"));
if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
// 选项卡菜单已存在
@@ -395,6 +411,13 @@ $(function() {
target.attr('src', url).ready();
}
// 页签全屏
function fullScreenTab() {
var currentId = $('.page-tabs-content').find('.active').attr('data-id');
var target = $('.RuoYi_iframe[data-id="' + currentId + '"]');
target.fullScreen(true);
}
// 关闭当前选项卡
function tabCloseCurrent() {
$('.page-tabs-content').find('.active i').trigger("click");
@@ -428,8 +451,11 @@ $(function() {
$(document).toggleFullScreen();
});
// 刷新按钮
// 页签刷新按钮
$('.tabReload').on('click', refreshTab);
// 页签全屏按钮
$('.tabFullScreen').on('click', fullScreenTab);
// 双击选项卡全屏显示
$('.menuTabs').on('dblclick', '.menuTab', activeTabMax);
@@ -466,6 +492,17 @@ $(function() {
$('#ax_close_max').show();
}
// 设置锚点
function setIframeUrl(href) {
if($.common.equals("history", mode)) {
storage.set('publicPath', href);
} else {
var nowUrl = window.location.href;
var newUrl = nowUrl.substring(0, nowUrl.indexOf("#"));
window.location.href = newUrl + "#" + href;
}
}
$(window).keydown(function(event) {
if (event.keyCode == 27) {
$('#content-main').removeClass('max');
@@ -473,6 +510,12 @@ $(function() {
}
});
window.onhashchange = function() {
var hash = location.hash;
var url = hash.substring(1, hash.length);
$('a[href$="' + url + '"]').click();
};
// 右键菜单实现
$.contextMenu({
selector: ".menuTab",
@@ -544,7 +587,6 @@ $(function() {
setActiveTab(this);
var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]');
var url = target.attr('src');
target.attr('src', url).ready();
$.modal.loading("数据加载中,请稍后...");
target.attr('src', url).load(function () {
$.modal.closeLoading();
@@ -561,4 +603,4 @@ $(function() {
},
}
})
});
});
@@ -3,6 +3,20 @@
* Copyright (c) 2019 ruoyi
*/
$(function() {
// layer扩展皮肤
if (window.layer !== undefined) {
layer.config({
extend: 'moon/style.css',
skin: 'layer-ext-moon'
});
}
// 回到顶部绑定
if ($.fn.toTop !== undefined) {
$('#scroll-up').toTop();
}
// select2复选框事件绑定
if ($.fn.select2 !== undefined) {
$.fn.select2.defaults.set( "theme", "bootstrap" );
@@ -57,9 +71,9 @@ $(function() {
startDate.config.max.month = date.month - 1;
startDate.config.max.date = date.date;
} else {
startDate.config.max.year = '';
startDate.config.max.month = '';
startDate.config.max.date = '';
startDate.config.max.year = '2099';
startDate.config.max.month = '12';
startDate.config.max.date = '31';
}
}
});
@@ -128,12 +142,12 @@ $(function() {
// tree表格树 展开/折叠
var expandFlag;
$("#expandAllBtn").click(function() {
var dataExpand = $.common.isEmpty($.table._option.expandAll) ? true : $.table._option.expandAll;
var dataExpand = $.common.isEmpty(table.options.expandAll) ? true : table.options.expandAll;
expandFlag = $.common.isEmpty(expandFlag) ? dataExpand : expandFlag;
if (!expandFlag) {
$('#' + $.table._option.id).bootstrapTreeTable('expandAll');
$.bttTable.bootstrapTreeTable('expandAll');
} else {
$('#' + $.table._option.id).bootstrapTreeTable('collapseAll');
$.bttTable.bootstrapTreeTable('collapseAll');
}
expandFlag = expandFlag ? false: true;
})
@@ -145,6 +159,49 @@ $(function() {
});
});
(function ($) {
'use strict';
$.fn.toTop = function(opt) {
var elem = this;
var win = $(window);
var doc = $('html, body');
var options = $.extend({
autohide: true,
offset: 50,
speed: 500,
position: true,
right: 15,
bottom: 5
}, opt);
elem.css({
'cursor': 'pointer'
});
if (options.autohide) {
elem.css('display', 'none');
}
if (options.position) {
elem.css({
'position': 'fixed',
'right': options.right,
'bottom': options.bottom,
});
}
elem.click(function() {
doc.animate({
scrollTop: 0
}, options.speed);
});
win.scroll(function() {
var scrolling = win.scrollTop();
if (options.autohide) {
if (scrolling > options.offset) {
elem.fadeIn(options.speed);
} else elem.fadeOut(options.speed);
}
});
};
})(jQuery);
/** 刷新选项卡 */
var refreshItem = function(){
var topWindow = $(window.parent.document);
@@ -155,8 +212,16 @@ var refreshItem = function(){
}
/** 关闭选项卡 */
var closeItem = function(){
var closeItem = function(dataId){
var topWindow = $(window.parent.document);
if($.common.isNotEmpty(dataId)){
window.parent.$.modal.closeLoading();
// 根据dataId关闭指定选项卡
$('.menuTab[data-id="' + dataId + '"]', topWindow).remove();
// 移除相应tab对应的内容区
$('.mainContent .RuoYi_iframe[data-id="' + dataId + '"]', topWindow).remove();
return;
}
var panelUrl = window.frameElement.getAttribute('data-panel');
$('.page-tabs-content .active i', topWindow).click();
if($.common.isNotEmpty(panelUrl)){
@@ -217,17 +282,33 @@ function createMenuItem(dataUrl, menuName) {
//日志打印封装处理
var log = {
log: function (msg) {
console.log(msg);
log: function(msg) {
console.log(msg);
},
info: function(msg) {
console.info(msg);
console.info(msg);
},
warn: function(msg) {
console.warn(msg);
console.warn(msg);
},
error: function(msg) {
console.error(msg);
console.error(msg);
}
};
//本地缓存处理
var storage = {
set: function(key, value) {
window.localStorage.setItem(key, value);
},
get: function(key) {
return window.localStorage.getItem(key);
},
remove: function(key) {
window.localStorage.removeItem(key);
},
clear: function() {
window.localStorage.clear();
}
};
@@ -245,7 +326,3 @@ $.ajaxSetup({
}
}
});
layer.config({
extend: 'moon/style.css',
skin: 'layer-ext-moon'
});
@@ -2,13 +2,37 @@
* 通用js方法封装处理
* Copyright (c) 2019 ruoyi
*/
// 当前table相关信息
var table = {
config: {},
// 当前实例配置
options: {},
// 设置实例配置
set: function(id) {
if($.common.getLength(table.config) > 1) {
var tableId = $.common.isEmpty(id) ? $(event.currentTarget).parents(".bootstrap-table").find(".table").attr("id") : id;
if ($.common.isNotEmpty(tableId)) {
table.options = table.get(tableId);
}
}
},
// 获取实例配置
get: function(id) {
return table.config[id];
},
// 记住选择实例组
rememberSelecteds: {},
// 记住选择ID组
rememberSelectedIds: {}
};
(function ($) {
$.extend({
_treeTable: {},
_tree: {},
bttTable: {},
// 表格封装处理
table: {
_option: {},
// 初始化表格参数
init: function(options) {
var defaults = {
@@ -24,6 +48,7 @@
toolbar: "toolbar",
striped: false,
escape: false,
firstLoad: true,
showFooter: false,
search: false,
showSearch: true,
@@ -33,6 +58,8 @@
showToggle: true,
showExport: false,
clickToSelect: false,
singleSelect: false,
mobileResponsive: true,
rememberSelected: false,
fixedColumns: false,
fixedNumber: 0,
@@ -42,9 +69,11 @@
rowStyle: {},
};
var options = $.extend(defaults, options);
$.table._option = options;
table.options = options;
table.config[options.id] = options;
$.table.initEvent();
$('#' + options.id).bootstrapTable({
id: options.id,
url: options.url, // 请求后台的URL*
contentType: "application/x-www-form-urlencoded", // 编码类型
method: 'post', // 请求方式(*
@@ -59,6 +88,7 @@
pageNumber: 1, // 初始化加载第一页,默认第一页
pageSize: options.pageSize, // 每页的记录行数(*
pageList: options.pageList, // 可供选择的每页的行数(*
firstLoad: options.firstLoad, // 是否首次请求加载数据,对于数据较大可以配置false
escape: options.escape, // 转义HTML字符串
showFooter: options.showFooter, // 是否显示表尾
iconSize: 'outline', // 图标大小:undefined默认的按钮尺寸 xs超小按钮sm小按钮lg大按钮
@@ -72,17 +102,23 @@
showColumns: options.showColumns, // 是否显示隐藏某列下拉框
showToggle: options.showToggle, // 是否显示详细视图和列表视图的切换按钮
showExport: options.showExport, // 是否支持导出文件
uniqueId: options.uniqueId, // 唯 一的标识符
clickToSelect: options.clickToSelect, // 是否启用点击选中行
singleSelect: options.singleSelect, // 是否单选checkbox
mobileResponsive: options.mobileResponsive, // 是否支持移动端适配
detailView: options.detailView, // 是否启用显示细节视图
onClickRow: options.onClickRow, // 点击某行触发的事件
onDblClickRow: options.onDblClickRow, // 双击某行触发的事件
onClickCell: options.onClickCell, // 单击某格触发的事件
onDblClickCell: options.onDblClickCell, // 双击某格触发的事件
onEditableSave: options.onEditableSave, // 行内编辑保存的事件
onExpandRow: options.onExpandRow, // 点击详细视图的事件
rememberSelected: options.rememberSelected, // 启用翻页记住前面的选择
fixedColumns: options.fixedColumns, // 是否启用冻结列(左侧)
fixedNumber: options.fixedNumber, // 列冻结的个数(左侧)
rightFixedColumns: options.rightFixedColumns, // 是否启用冻结列(右侧)
rightFixedNumber: options.rightFixedNumber, // 列冻结的个数(右侧)
onReorderRow: options.onReorderRow, // 当拖拽结束后处理函数
queryParams: options.queryParams, // 传递参数(*
rowStyle: options.rowStyle, // 通过自定义函数设置行样式
columns: options.columns, // 显示列信息(*
@@ -92,6 +128,15 @@
detailFormatter: options.detailFormatter, // 在行下面展示其他数据列表
});
},
// 获取实例ID,如存在多个返回#id1,#id2 delimeter分隔符
getOptionsIds: function(separator) {
var _separator = $.common.isEmpty(separator) ? "," : separator;
var optionsIds = "";
$.each(table.config, function(key, value){
optionsIds += "#" + key + _separator;
});
return optionsIds.substring(0, optionsIds.length - 1);
},
// 查询条件
queryParams: function(params) {
var curParams = {
@@ -102,22 +147,22 @@
orderByColumn: params.sort,
isAsc: params.order
};
var currentId = $.common.isEmpty($.table._option.formId) ? $('form').attr('id') : $.table._option.formId;
var currentId = $.common.isEmpty(table.options.formId) ? $('form').attr('id') : table.options.formId;
return $.extend(curParams, $.common.formToJSON(currentId));
},
// 请求获取数据后处理回调函数
responseHandler: function(res) {
if (typeof $.table._option.responseHandler == "function") {
$.table._option.responseHandler(res);
if (typeof table.options.responseHandler == "function") {
table.options.responseHandler(res);
}
if (res.code == 0) {
if ($.common.isNotEmpty($.table._option.sidePagination) && $.table._option.sidePagination == 'client') {
if ($.common.isNotEmpty(table.options.sidePagination) && table.options.sidePagination == 'client') {
return res.rows;
} else {
if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
var column = $.common.isEmpty($.table._option.uniqueId) ? $.table._option.columns[1].field : $.table._option.uniqueId;
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
var column = $.common.isEmpty(table.options.uniqueId) ? table.options.columns[1].field : table.options.uniqueId;
$.each(res.rows, function(i, row) {
row.state = $.inArray(row[column], selectionIds) !== -1;
row.state = $.inArray(row[column], table.rememberSelectedIds[table.options.id]) !== -1;
})
}
return { rows: res.rows, total: res.total };
@@ -128,28 +173,50 @@
}
},
// 初始化事件
initEvent: function(data) {
// 触发行点击事件 加载成功事件
$("#" + $.table._option.id).on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table load-success.bs.table", function () {
// 工具栏按钮控制
var rows = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
$('#' + $.table._option.toolbar + ' .btn-del').toggleClass('disabled', !rows.length);
$('#' + $.table._option.toolbar + ' .btn-edit').toggleClass('disabled', rows.length!=1);
$('#' + $.table._option.toolbar + ' .btn-detail').toggleClass('disabled', rows.length!=1);
initEvent: function() {
// 实例ID信息
var optionsIds = $.table.getOptionsIds();
// 监听事件处理
$(optionsIds).on(TABLE_EVENTS, function () {
table.set($(this).attr("id"));
});
// 绑定选中事件、取消事件、全部选中、全部取消
$("#" + $.table._option.id).on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rows) {
// 选中、取消、全部选中、全部取消(事件)
$(optionsIds).on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rows) {
// 复选框分页保留保存选中数组
var rowIds = $.table.affectedRowIds(rows);
if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
selectionIds = _[func](selectionIds, rowIds);
var selectedIds = table.rememberSelectedIds[table.options.id];
if($.common.isNotEmpty(selectedIds)) {
table.rememberSelectedIds[table.options.id] = _[func](selectedIds, rowIds);
} else {
table.rememberSelectedIds[table.options.id] = _[func]([], rowIds);
}
var selectedRows = table.rememberSelecteds[table.options.id];
if($.common.isNotEmpty(selectedRows)) {
table.rememberSelecteds[table.options.id] = _[func](selectedRows, rows);
} else {
table.rememberSelecteds[table.options.id] = _[func]([], rows);
}
}
});
// 加载成功、选中、取消、全部选中、全部取消(事件)
$(optionsIds).on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table load-success.bs.table", function () {
var toolbar = table.options.toolbar;
var uniqueId = table.options.uniqueId;
// 工具栏按钮控制
var rows = $.common.isEmpty(uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(uniqueId);
// 非多个禁用
$('#' + toolbar + ' .multiple').toggleClass('disabled', !rows.length);
// 非单个禁用
$('#' + toolbar + ' .single').toggleClass('disabled', rows.length!=1);
});
// 图片预览事件
$("#" + $.table._option.id).on('click', '.img-circle', function() {
$(optionsIds).off("click").on("click", '.img-circle', function() {
var src = $(this).attr('src');
var target = $(this).data('target');
var height = $(this).data('height');
var width = $(this).data('width');
if($.common.equals("self", target)) {
layer.open({
title: false,
@@ -157,41 +224,84 @@
closeBtn: true,
shadeClose: true,
area: ['auto', 'auto'],
content: "<img src='" + src + "' />"
content: "<img src='" + src + "' height='" + height + "' width='" + width + "'/>"
});
} else if ($.common.equals("blank", target)) {
window.open(src);
}
});
// 单击tooltip事件
$(optionsIds).on("click", '.tooltip-show', function() {
var target = $(this).data('target');
var input = $(this).prev();
if ($.common.equals("copy", target)) {
input.select();
document.execCommand("copy");
} else if ($.common.equals("open", target)) {
parent.layer.alert(input.val(), {
title: "信息内容",
shadeClose: true,
btn: ['确认'],
btnclass: ['btn btn-primary'],
});
}
});
},
// 当所有数据被加载时触发
onLoadSuccess: function(data) {
if (typeof $.table._option.onLoadSuccess == "function") {
$.table._option.onLoadSuccess(data);
if (typeof table.options.onLoadSuccess == "function") {
table.options.onLoadSuccess(data);
}
// 浮动提示框特效
$("[data-toggle='tooltip']").tooltip();
$(".table [data-toggle='tooltip']").tooltip();
// 气泡弹出框特效
$('.table [data-toggle="popover"]').each(function() {
$(this).popover({ trigger: "manual", html: true, animation: false, container: "body", placement: "left"
}).on("mouseenter",
function() {
var _this = this;
$(this).popover("show");
$(".popover").on("mouseleave", function() {
$(_this).popover('hide');
});
}).on("mouseleave",
function() {
var _this = this;
setTimeout(function() {
if (!$(".popover:hover").length)
$(_this).popover("hide");
}, 100);
});
});
},
// 表格销毁
destroy: function (tableId) {
var currentId = $.common.isEmpty(tableId) ? $.table._option.id : tableId;
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
$("#" + currentId).bootstrapTable('destroy');
},
// 序列号生成
serialNumber: function (index) {
var table = $('#' + $.table._option.id).bootstrapTable('getOptions');
var pageSize = table.pageSize;
var pageNumber = table.pageNumber;
serialNumber: function (index, tableId) {
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
var tableParams = $("#" + currentId).bootstrapTable('getOptions');
var pageSize = tableParams.pageSize;
var pageNumber = tableParams.pageNumber;
return pageSize * (pageNumber - 1) + index + 1;
},
// 列超出指定长度浮动提示
tooltip: function (value, length) {
// 列超出指定长度浮动提示 targetcopy单击复制文本 open弹窗打开文本)
tooltip: function (value, length, target) {
var _length = $.common.isEmpty(length) ? 20 : length;
var _text = "";
var _value = $.common.nullToStr(value);
var _target = $.common.isEmpty(target) ? 'copy' : target;
if (_value.length > _length) {
_text = _value.substr(0, _length) + "...";
return $.common.sprintf("<a href='#' class='tooltip-show' data-toggle='tooltip' title='%s'>%s</a>", _value, _text);
_value = _value.replace(/\'/g,"&apos;");
_value = _value.replace(/\"/g,"&quot;");
var actions = [];
actions.push($.common.sprintf('<input id="tooltip-show" style="opacity: 0;position: absolute;z-index:-1" type="text" value="%s"/>', _value));
actions.push($.common.sprintf('<a href="###" class="tooltip-show" data-toggle="tooltip" data-target="%s" title="%s">%s</a>', _target, _value, _text));
return actions.join('');
} else {
_text = _value;
return _text;
@@ -210,21 +320,27 @@
return actions.join('');
},
// 图片预览
imageView: function (value, path, target) {
var _path = $.common.isEmpty(path) ? '/profile/upload' : path;
imageView: function (value, height, width, target) {
if ($.common.isEmpty(width)) {
width = 'auto';
}
if ($.common.isEmpty(height)) {
height = 'auto';
}
// blank or self
var _target = $.common.isEmpty(target) ? 'self' : target;
if ($.common.isNotEmpty(value)) {
return $.common.sprintf("<img class='img-circle img-xs' data-target='%s' src='%s/%s'/>", _target, _path, value);
return $.common.sprintf("<img class='img-circle img-xs' data-height='%s' data-width='%s' data-target='%s' src='%s'/>", height, width, _target, value);
} else {
return $.common.nullToStr(value);
}
},
// 搜索-默认第一个form
search: function(formId, data) {
search: function(formId, tableId, data) {
table.set(tableId);
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
var params = $("#" + $.table._option.id).bootstrapTable('getOptions');
params.queryParams = function(params) {
var params = $.common.isEmpty(tableId) ? $("#" + table.options.id).bootstrapTable('getOptions') : $("#" + tableId).bootstrapTable('getOptions');
params.queryParams = function(params) {
var search = $.common.formToJSON(currentId);
if($.common.isNotEmpty(data)){
$.each(data, function(key) {
@@ -238,14 +354,23 @@
search.isAsc = params.order;
return search;
}
$("#" + $.table._option.id).bootstrapTable('refresh', params);
if($.common.isNotEmpty(tableId)){
$("#" + tableId).bootstrapTable('refresh', params);
} else{
$("#" + table.options.id).bootstrapTable('refresh', params);
}
},
// 导出数据
exportExcel: function(formId) {
$.modal.confirm("确定导出所有" + $.table._option.modalName + "吗?", function() {
table.set();
$.modal.confirm("确定导出所有" + table.options.modalName + "吗?", function() {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
var params = $("#" + table.options.id).bootstrapTable('getOptions');
var dataParam = $("#" + currentId).serializeArray();
dataParam.push({ "name": "orderByColumn", "value": params.sortName });
dataParam.push({ "name": "isAsc", "value": params.sortOrder });
$.modal.loading("正在导出数据,请稍后...");
$.post($.table._option.exportUrl, $("#" + currentId).serializeArray(), function(result) {
$.post(table.options.exportUrl, dataParam, function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
} else if (result.code == web_status.WARNING) {
@@ -259,7 +384,8 @@
},
// 下载模板
importTemplate: function() {
$.get($.table._option.importTemplateUrl, function(result) {
table.set();
$.get(table.options.importTemplateUrl, function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
} else if (result.code == web_status.WARNING) {
@@ -271,8 +397,8 @@
},
// 导入数据
importExcel: function(formId) {
var currentId = $.common.isEmpty(formId) ? 'importForm' : formId;
$.form.reset(currentId);
table.set();
var currentId = $.common.isEmpty(formId) ? 'importTpl' : formId;
layer.open({
type: 1,
area: ['400px', '230px'],
@@ -280,8 +406,8 @@
//不固定
maxmin: true,
shade: 0.3,
title: '导入' + $.table._option.modalName + '数据',
content: $('#' + currentId),
title: '导入' + table.options.modalName + '数据',
content: $('#' + currentId).html(),
btn: ['<i class="fa fa-check"></i> 导入', '<i class="fa fa-remove"></i> 取消'],
// 弹层外区域关闭
shadeClose: true,
@@ -293,11 +419,9 @@
}
var index = layer.load(2, {shade: false});
$.modal.disable();
var formData = new FormData();
formData.append("file", $('#file')[0].files[0]);
formData.append("updateSupport", $("input[name='updateSupport']").is(':checked'));
var formData = new FormData(layero.find('form')[0]);
$.ajax({
url: $.table._option.importUrl,
url: table.options.importUrl,
data: formData,
cache: false,
contentType: false,
@@ -323,24 +447,30 @@
});
},
// 刷新表格
refresh: function() {
$("#" + $.table._option.id).bootstrapTable('refresh', {
refresh: function(tableId) {
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
$("#" + currentId).bootstrapTable('refresh', {
silent: true
});
},
// 查询表格指定列值
selectColumns: function(column) {
var rows = $.map($('#' + $.table._option.id).bootstrapTable('getSelections'), function (row) {
var rows = $.map($("#" + table.options.id).bootstrapTable('getSelections'), function (row) {
return row[column];
});
if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
rows = rows.concat(selectionIds);
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
var selectedRows = table.rememberSelecteds[table.options.id];
if($.common.isNotEmpty(selectedRows)) {
rows = $.map(table.rememberSelecteds[table.options.id], function (row) {
return row[column];
});
}
}
return $.common.uniqueFn(rows);
},
// 获取当前页选中或者取消的行ID
affectedRowIds: function(rows) {
var column = $.common.isEmpty($.table._option.uniqueId) ? $.table._option.columns[1].field : $.table._option.uniqueId;
var column = $.common.isEmpty(table.options.uniqueId) ? table.options.columns[1].field : table.options.uniqueId;
var rowIds;
if ($.isArray(rows)) {
rowIds = $.map(rows, function(row) {
@@ -353,11 +483,16 @@
},
// 查询表格首列值
selectFirstColumns: function() {
var rows = $.map($('#' + $.table._option.id).bootstrapTable('getSelections'), function (row) {
return row[$.table._option.columns[1].field];
var rows = $.map($("#" + table.options.id).bootstrapTable('getSelections'), function (row) {
return row[table.options.columns[1].field];
});
if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
rows = rows.concat(selectionIds);
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
var selectedRows = table.rememberSelecteds[table.options.id];
if($.common.isNotEmpty(selectedRows)) {
rows = $.map(selectedRows, function (row) {
return row[table.options.columns[1].field];
});
}
}
return $.common.uniqueFn(rows);
},
@@ -366,7 +501,7 @@
var actions = [];
$.each(datas, function(index, dict) {
if (dict.dictValue == ('' + value)) {
var listClass = $.common.equals("default", dict.listClass) ? "" : "badge badge-" + dict.listClass;
var listClass = $.common.equals("default", dict.listClass) || $.common.isEmpty(dict.listClass) ? "" : "badge badge-" + dict.listClass;
actions.push($.common.sprintf("<span class='%s'>%s</span>", listClass, dict.dictLabel));
return false;
}
@@ -374,12 +509,14 @@
return actions.join('');
},
// 显示表格指定列
showColumn: function(column) {
$("#" + $.table._option.id).bootstrapTable('showColumn', column);
showColumn: function(column, tableId) {
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
$("#" + currentId).bootstrapTable('showColumn', column);
},
// 隐藏表格指定列
hideColumn: function(column) {
$("#" + $.table._option.id).bootstrapTable('hideColumn', column);
hideColumn: function(column, tableId) {
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
$("#" + currentId).bootstrapTable('hideColumn', column);
}
},
// 表格树封装处理
@@ -395,57 +532,87 @@
toolbar: "toolbar",
striped: false,
expandColumn: 1,
showSearch: true,
showRefresh: true,
showColumns: true,
expandAll: true,
expandFirst: true
};
var options = $.extend(defaults, options);
$.table._option = options;
var treeTable = $('#' + options.id).bootstrapTreeTable({
table.options = options;
table.config[options.id] = options;
$.bttTable = $('#' + options.id).bootstrapTreeTable({
code: options.code, // 用于设置父子关系
parentCode: options.parentCode, // 用于设置父子关系
type: 'get', // 请求方式(*
type: 'post', // 请求方式(*
url: options.url, // 请求后台的URL*
data: options.data, // 无url时用于渲染的数据
ajaxParams: options.ajaxParams, // 请求数据的ajax的data属性
rootIdValue: options.rootIdValue, // 设置指定根节点id值
height: options.height, // 表格树的高度
expandColumn: options.expandColumn, // 在哪一列上面显示展开按钮
striped: options.striped, // 是否显示行间隔色
bordered: true, // 是否显示边框
bordered: false, // 是否显示边框
toolbar: '#' + options.toolbar, // 指定工作栏
showSearch: options.showSearch, // 是否显示检索信息
showRefresh: options.showRefresh, // 是否显示刷新按钮
showColumns: options.showColumns, // 是否显示隐藏某列下拉框
expandAll: options.expandAll, // 是否全部展开
expandFirst: options.expandFirst, // 是否默认第一级展开--expandAll为false时生效
columns: options.columns
columns: options.columns, // 显示列信息(*
responseHandler: $.treeTable.responseHandler // 当所有数据被加载时触发处理函数
});
$._treeTable = treeTable;
},
// 条件查询
search: function(formId) {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
var params = $.common.formToJSON(currentId);
$._treeTable.bootstrapTreeTable('refresh', params);
$.bttTable.bootstrapTreeTable('refresh', params);
},
// 刷新
refresh: function() {
$._treeTable.bootstrapTreeTable('refresh');
$.bttTable.bootstrapTreeTable('refresh');
},
// 查询表格树指定列值
selectColumns: function(column) {
var rows = $.map($('#' + $.table._option.id).bootstrapTreeTable('getSelections'), function (row) {
var rows = $.map($.bttTable.bootstrapTreeTable('getSelections'), function (row) {
return row[column];
});
return $.common.uniqueFn(rows);
},
// 请求获取数据后处理回调函数,校验异常状态提醒
responseHandler: function(res) {
if (typeof table.options.responseHandler == "function") {
table.options.responseHandler(res);
}
if (res.code != undefined && res.code != 0) {
$.modal.alertWarning(res.msg);
return [];
} else {
return res;
}
},
},
// 表单封装处理
form: {
// 表单重置
reset: function(formId) {
reset: function(formId, tableId) {
table.set(tableId);
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
$("#" + currentId)[0].reset();
if (table.options.type == table_type.bootstrapTable) {
if($.common.isEmpty(tableId)){
$("#" + table.options.id).bootstrapTable('refresh');
} else{
$("#" + tableId).bootstrapTable('refresh');
}
} else if (table.options.type == table_type.bootstrapTreeTable) {
if($.common.isEmpty(tableId)){
$("#" + table.options.id).bootstrapTreeTable('refresh', []);
} else{
$("#" + tableId).bootstrapTreeTable('refresh', []);
}
}
},
// 获取选中复选框项
selectCheckeds: function(name) {
@@ -563,22 +730,22 @@
// 弹出层指定宽度
open: function (title, url, width, height, callback) {
//如果是移动端,就使用自适应大小弹窗
if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
if ($.common.isMobile()) {
width = 'auto';
height = 'auto';
}
if ($.common.isEmpty(title)) {
title = false;
};
}
if ($.common.isEmpty(url)) {
url = "/404.html";
};
}
if ($.common.isEmpty(width)) {
width = 800;
};
}
if ($.common.isEmpty(height)) {
height = ($(window).height() - 50);
};
}
if ($.common.isEmpty(callback)) {
callback = function(index, layero) {
var iframeWin = layero.find('iframe')[0];
@@ -623,7 +790,7 @@
fix: false,
area: [_width + 'px', _height + 'px'],
content: _url,
shadeClose: true,
shadeClose: $.common.isEmpty(options.shadeClose) ? true : options.shadeClose,
skin: options.skin,
btn: $.common.isEmpty(options.btn) ? _btn : options.btn,
yes: options.yes,
@@ -635,22 +802,22 @@
// 弹出层全屏
openFull: function (title, url, width, height) {
//如果是移动端,就使用自适应大小弹窗
if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
if ($.common.isMobile()) {
width = 'auto';
height = 'auto';
}
if ($.common.isEmpty(title)) {
title = false;
};
}
if ($.common.isEmpty(url)) {
url = "/404.html";
};
}
if ($.common.isEmpty(width)) {
width = 800;
};
}
if ($.common.isEmpty(height)) {
height = ($(window).height() - 50);
};
}
var index = layer.open({
type: 2,
area: [width + 'px', height + 'px'],
@@ -677,9 +844,15 @@
openTab: function (title, url) {
createMenuItem(url, title);
},
// 选卡页同一页签打开
parentTab: function (title, url) {
var dataId = window.frameElement.getAttribute('data-id');
createMenuItem(url, title);
closeItem(dataId);
},
// 关闭选项卡
closeTab: function () {
closeItem();
closeTab: function (dataId) {
closeItem(dataId);
},
// 禁用按钮
disable: function() {
@@ -737,13 +910,21 @@
},
// 详细信息
detail: function(id, width, height) {
table.set();
var _url = $.operate.detailUrl(id);
var _width = $.common.isEmpty(width) ? "800" : width;
var _height = $.common.isEmpty(height) ? ($(window).height() - 50) : height;
//如果是移动端,就使用自适应大小弹窗
if ($.common.isMobile()) {
_width = 'auto';
_height = 'auto';
}
var options = {
title: $.table._option.modalName + "详细",
width: width,
height: height,
url: $.operate.detailUrl(id),
skin: 'layui-layer-molv',
title: table.options.modalName + "详细",
width: _width,
height: _height,
url: _url,
skin: 'layui-layer-gray',
btn: ['关闭'],
yes: function (index, layero) {
layer.close(index);
@@ -755,22 +936,23 @@
detailUrl: function(id) {
var url = "/404.html";
if ($.common.isNotEmpty(id)) {
url = $.table._option.detailUrl.replace("{id}", id);
url = table.options.detailUrl.replace("{id}", id);
} else {
var id = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
var id = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
if (id.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
url = $.table._option.detailUrl.replace("{id}", id);
url = table.options.detailUrl.replace("{id}", id);
}
return url;
},
// 删除信息
remove: function(id) {
$.modal.confirm("确定删除该条" + $.table._option.modalName + "信息吗?", function() {
var url = $.common.isEmpty(id) ? $.table._option.removeUrl : $.table._option.removeUrl.replace("{id}", id);
if($.table._option.type == table_type.bootstrapTreeTable) {
table.set();
$.modal.confirm("确定删除该条" + table.options.modalName + "信息吗?", function() {
var url = $.common.isEmpty(id) ? table.options.removeUrl : table.options.removeUrl.replace("{id}", id);
if(table.options.type == table_type.bootstrapTreeTable) {
$.operate.get(url);
} else {
var data = { "ids": id };
@@ -781,83 +963,91 @@
},
// 批量删除信息
removeAll: function() {
var rows = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
table.set();
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
if (rows.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
$.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
var url = $.table._option.removeUrl;
var url = table.options.removeUrl;
var data = { "ids": rows.join() };
$.operate.submit(url, "post", "json", data);
});
},
// 清空信息
clean: function() {
$.modal.confirm("确定清空所有" + $.table._option.modalName + "吗?", function() {
var url = $.table._option.cleanUrl;
table.set();
$.modal.confirm("确定清空所有" + table.options.modalName + "吗?", function() {
var url = table.options.cleanUrl;
$.operate.submit(url, "post", "json", "");
});
},
// 添加信息
add: function(id) {
$.modal.open("添加" + $.table._option.modalName, $.operate.addUrl(id));
table.set();
$.modal.open("添加" + table.options.modalName, $.operate.addUrl(id));
},
// 添加信息,以tab页展现
addTab: function (id) {
$.modal.openTab("添加" + $.table._option.modalName, $.operate.addUrl(id));
table.set();
$.modal.openTab("添加" + table.options.modalName, $.operate.addUrl(id));
},
// 添加信息 全屏
addFull: function(id) {
var url = $.common.isEmpty(id) ? $.table._option.createUrl : $.table._option.createUrl.replace("{id}", id);
$.modal.openFull("添加" + $.table._option.modalName, url);
table.set();
var url = $.common.isEmpty(id) ? table.options.createUrl : table.options.createUrl.replace("{id}", id);
$.modal.openFull("添加" + table.options.modalName, url);
},
// 添加访问地址
addUrl: function(id) {
var url = $.common.isEmpty(id) ? $.table._option.createUrl : $.table._option.createUrl.replace("{id}", id);
var url = $.common.isEmpty(id) ? table.options.createUrl.replace("{id}", "") : table.options.createUrl.replace("{id}", id);
return url;
},
// 修改信息
edit: function(id) {
if($.common.isEmpty(id) && $.table._option.type == table_type.bootstrapTreeTable) {
var row = $('#' + $.table._option.id).bootstrapTreeTable('getSelections')[0];
table.set();
if($.common.isEmpty(id) && table.options.type == table_type.bootstrapTreeTable) {
var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0];
if ($.common.isEmpty(row)) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
var url = $.table._option.updateUrl.replace("{id}", row[$.table._option.uniqueId]);
$.modal.open("修改" + $.table._option.modalName, url);
var url = table.options.updateUrl.replace("{id}", row[table.options.uniqueId]);
$.modal.open("修改" + table.options.modalName, url);
} else {
$.modal.open("修改" + $.table._option.modalName, $.operate.editUrl(id));
$.modal.open("修改" + table.options.modalName, $.operate.editUrl(id));
}
},
// 修改信息,以tab页展现
editTab: function(id) {
$.modal.openTab("修改" + $.table._option.modalName, $.operate.editUrl(id));
table.set();
$.modal.openTab("修改" + table.options.modalName, $.operate.editUrl(id));
},
// 修改信息 全屏
editFull: function(id) {
table.set();
var url = "/404.html";
if ($.common.isNotEmpty(id)) {
url = $.table._option.updateUrl.replace("{id}", id);
url = table.options.updateUrl.replace("{id}", id);
} else {
var row = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
url = $.table._option.updateUrl.replace("{id}", row);
var row = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
url = table.options.updateUrl.replace("{id}", row);
}
$.modal.openFull("修改" + $.table._option.modalName, url);
$.modal.openFull("修改" + table.options.modalName, url);
},
// 修改访问地址
editUrl: function(id) {
var url = "/404.html";
if ($.common.isNotEmpty(id)) {
url = $.table._option.updateUrl.replace("{id}", id);
url = table.options.updateUrl.replace("{id}", id);
} else {
var id = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
var id = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
if (id.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
url = $.table._option.updateUrl.replace("{id}", id);
url = table.options.updateUrl.replace("{id}", id);
}
return url;
},
@@ -928,13 +1118,15 @@
},
// 保存结果弹出msg刷新table表格
ajaxSuccess: function (result) {
if (result.code == web_status.SUCCESS && $.table._option.type == table_type.bootstrapTable) {
if (result.code == web_status.SUCCESS && table.options.type == table_type.bootstrapTable) {
$.modal.msgSuccess(result.msg);
$.table.refresh();
} else if (result.code == web_status.SUCCESS && $.table._option.type == table_type.bootstrapTreeTable) {
} else if (result.code == web_status.SUCCESS && table.options.type == table_type.bootstrapTreeTable) {
$.modal.msgSuccess(result.msg);
$.treeTable.refresh();
} else if (result.code == web_status.WARNING) {
} else if (result.code == web_status.SUCCESS && table.option.type == undefined) {
$.modal.msgSuccess(result.msg)
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg)
} else {
$.modal.alertError(result.msg);
@@ -956,11 +1148,11 @@
successCallback: function(result) {
if (result.code == web_status.SUCCESS) {
var parent = window.parent;
if (parent.$.table._option.type == table_type.bootstrapTable) {
if (parent.table.options.type == table_type.bootstrapTable) {
$.modal.close();
parent.$.modal.msgSuccess(result.msg);
parent.$.table.refresh();
} else if (parent.$.table._option.type == table_type.bootstrapTreeTable) {
} else if (parent.table.options.type == table_type.bootstrapTreeTable) {
$.modal.close();
parent.$.modal.msgSuccess(result.msg);
parent.$.treeTable.refresh();
@@ -984,9 +1176,9 @@
$.modal.close();
$contentWindow.$.modal.msgSuccess(result.msg);
$contentWindow.$(".layui-layer-padding").removeAttr("style");
if ($contentWindow.$.table._option.type == table_type.bootstrapTable) {
if ($contentWindow.table.options.type == table_type.bootstrapTable) {
$contentWindow.$.table.refresh();
} else if ($contentWindow.$.table._option.type == table_type.bootstrapTreeTable) {
} else if ($contentWindow.table.options.type == table_type.bootstrapTreeTable) {
$contentWindow.$.treeTable.refresh();
}
$.modal.closeTab();
@@ -1011,6 +1203,11 @@
form: function (formId) {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
return $("#" + currentId).validate().form();
},
// 重置表单验证(清除提示信息)
reset: function (formId) {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
return $("#" + currentId).validate().resetForm();
}
},
// 树插件封装处理
@@ -1149,6 +1346,10 @@
// 不允许根父节点选择
notAllowParents: function(_tree) {
var nodes = _tree.getSelectedNodes();
if(nodes.length == 0){
$.modal.msgError("请选择节点后提交");
return false;
}
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].level == 0) {
$.modal.msgError("不能选择根节点(" + nodes[i].name + "");
@@ -1288,10 +1489,28 @@
formToJSON: function(formId) {
var json = {};
$.each($("#" + formId).serializeArray(), function(i, field) {
json[field.name] = field.value;
if(json[field.name]) {
json[field.name] += ("," + field.value);
} else {
json[field.name] = field.value;
}
});
return json;
}
},
// 获取obj对象长度
getLength: function(obj) {
var count = 0;  
for (var i in obj) {
if (obj.hasOwnProperty(i)) {
count++;
}  
}
return count;
},
// 判断移动端
isMobile: function () {
return navigator.userAgent.match(/(Android|iPhone|SymbianOS|Windows Phone|iPad|iPod)/i);
},
}
});
})(jQuery);
@@ -1,5 +1,6 @@
$(function() {
validateKickout();
validateRule();
$('.imgcode').click(function() {
var url = ctx + "captcha/captchaImage?type=" + captchaType + "&s=" + Math.random();
@@ -25,7 +26,7 @@ function login() {
data: {
"username": username,
"password": password,
"validateCode" : validateCode,
"validateCode": validateCode,
"rememberMe": rememberMe
},
success: function(r) {
@@ -62,3 +63,33 @@ function validateRule() {
}
})
}
function validateKickout() {
if (getParam("kickout") == 1) {
layer.alert("<font color='red'>您已在别处登录,请您修改密码或重新登录</font>", {
icon: 0,
title: "系统提示"
},
function(index) {
//关闭弹窗
layer.close(index);
if (top != self) {
top.location = self.location;
} else {
var url  =  location.search;
if (url) {
var oldUrl  = window.location.href;
var newUrl  = oldUrl.substring(0,  oldUrl.indexOf('?'));
self.location  = newUrl;
}
}
});
}
}
function getParam(paramName) {
var reg = new RegExp("(^|&)" + paramName + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return decodeURI(r[2]);
return null;
}
@@ -0,0 +1,82 @@
$(function() {
validateRule();
$('.imgcode').click(function() {
var url = ctx + "captcha/captchaImage?type=" + captchaType + "&s=" + Math.random();
$(".imgcode").attr("src", url);
});
});
$.validator.setDefaults({
submitHandler: function() {
register();
}
});
function register() {
$.modal.loading($("#btnSubmit").data("loading"));
var username = $.common.trim($("input[name='username']").val());
var password = $.common.trim($("input[name='password']").val());
var validateCode = $("input[name='validateCode']").val();
$.ajax({
type: "post",
url: ctx + "register",
data: {
"loginName": username,
"password": password,
"validateCode": validateCode
},
success: function(r) {
if (r.code == 0) {
layer.alert("<font color='red'>恭喜你,您的账号 " + username + " 注册成功!</font>", {
icon: 1,
title: "系统提示"
},
function(index) {
//关闭弹窗
layer.close(index);
location.href = ctx + 'login';
});
} else {
$.modal.closeLoading();
$('.imgcode').click();
$(".code").val("");
$.modal.msg(r.msg);
}
}
});
}
function validateRule() {
var icon = "<i class='fa fa-times-circle'></i> ";
$("#registerForm").validate({
rules: {
username: {
required: true,
minlength: 2
},
password: {
required: true,
minlength: 5
},
confirmPassword: {
required: true,
equalTo: "[name='password']"
}
},
messages: {
username: {
required: icon + "请输入您的用户名",
minlength: icon + "用户名不能小于2个字符"
},
password: {
required: icon + "请输入您的密码",
minlength: icon + "密码不能小于5个字符",
},
confirmPassword: {
required: icon + "请再次输入您的密码",
equalTo: icon + "两次密码输入不一致"
}
}
})
}
@@ -99,7 +99,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-suggest" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-suggest</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-suggest" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-suggest</a></div>
</div>
</div>
</div>
@@ -145,7 +145,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-typeahead" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-typeahead</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-typeahead" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-typeahead</a></div>
</div>
</div>
</div>
@@ -0,0 +1,319 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<th:block th:include="include :: header('卡片列表')" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-4">
<div class="ibox">
<div class="ibox-title">
<span class="label label-primary pull-right">NEW</span>
<h5>IT-01 - 设计部</h5>
</div>
<div class="ibox-content">
<h4>部门简介</h4>
<p>
平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。
</p>
<div>
<span>当前项目进度:</span>
<div class="stat-percent">48%</div>
<div class="progress progress-mini">
<div style="width: 48%;" class="progress-bar"></div>
</div>
</div>
<div class="row m-t-sm">
<div class="col-sm-4">
<div class="font-bold">项目</div>
12
</div>
<div class="col-sm-4">
<div class="font-bold">周期</div>
4个月
</div>
<div class="col-sm-4 text-right">
<div class="font-bold">预算</div>
&yen;200,913 <i class="fa fa-level-up text-navy"></i>
</div>
</div>
</div>
</div>
<div class="ibox">
<div class="ibox-title">
<h5>IT-04 - 市场部</h5>
</div>
<div class="ibox-content">
<h4>部门简介</h4>
<p>
平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。
</p>
<div>
<span>当前项目进度:</span>
<div class="stat-percent">32%</div>
<div class="progress progress-mini">
<div style="width: 32%;" class="progress-bar"></div>
</div>
</div>
<div class="row m-t-sm">
<div class="col-sm-4">
<div class="font-bold">项目</div>
24
</div>
<div class="col-sm-4">
<div class="font-bold">周期</div>
3个月
</div>
<div class="col-sm-4 text-right">
<div class="font-bold">预算</div>
&yen;190,325 <i class="fa fa-level-up text-navy"></i>
</div>
</div>
</div>
</div>
<div class="ibox">
<div class="ibox-title">
<h5>IT-07 - 财务部</h5>
</div>
<div class="ibox-content">
<h4>部门简介</h4>
<p>
平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。
</p>
<div>
<span>当前项目进度:</span>
<div class="stat-percent">73%</div>
<div class="progress progress-mini">
<div style="width: 73%;" class="progress-bar"></div>
</div>
</div>
<div class="row m-t-sm">
<div class="col-sm-4">
<div class="font-bold">项目</div>
11
</div>
<div class="col-sm-4">
<div class="font-bold">周期</div>
6个月
</div>
<div class="col-sm-4 text-right">
<div class="font-bold">预算</div>
&yen;560,105 <i class="fa fa-level-up text-navy"></i>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="ibox">
<div class="ibox-title">
<h5>IT-02 - 开发部</h5>
</div>
<div class="ibox-content">
<h4>部门简介</h4>
<p>
平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。
</p>
<div>
<span>当前项目进度:</span>
<div class="stat-percent">61%</div>
<div class="progress progress-mini">
<div style="width: 61%;" class="progress-bar"></div>
</div>
</div>
<div class="row m-t-sm">
<div class="col-sm-4">
<div class="font-bold">项目</div>
43
</div>
<div class="col-sm-4">
<div class="font-bold">周期</div>
1个月
</div>
<div class="col-sm-4 text-right">
<div class="font-bold">预算</div>
&yen;705,913 <i class="fa fa-level-up text-navy"></i>
</div>
</div>
</div>
</div>
<div class="ibox">
<div class="ibox-title">
<span class="label label-warning pull-right">截止</span>
<h5>IT-05 - 管理层</h5>
</div>
<div class="ibox-content">
<h4>部门简介</h4>
<p>
平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。
</p>
<div>
<span>当前项目进度:</span>
<div class="stat-percent">14%</div>
<div class="progress progress-mini">
<div style="width: 14%;" class="progress-bar"></div>
</div>
</div>
<div class="row m-t-sm">
<div class="col-sm-4">
<div class="font-bold">项目</div>
8
</div>
<div class="col-sm-4">
<div class="font-bold">周期</div>
7个月
</div>
<div class="col-sm-4 text-right">
<div class="font-bold">预算</div>
&yen;40,200 <i class="fa fa-level-up text-navy"></i>
</div>
</div>
</div>
</div>
<div class="ibox">
<div class="ibox-title">
<h5>IT-08 - 销售部</h5>
</div>
<div class="ibox-content">
<h4>部门简介</h4>
<p>
平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。
</p>
<div>
<span>当前项目进度:</span>
<div class="stat-percent">25%</div>
<div class="progress progress-mini">
<div style="width: 25%;" class="progress-bar"></div>
</div>
</div>
<div class="row m-t-sm">
<div class="col-sm-4">
<div class="font-bold">项目</div>
25
</div>
<div class="col-sm-4">
<div class="font-bold">周期</div>
4个月
</div>
<div class="col-sm-4 text-right">
<div class="font-bold">预算</div>
&yen;140,105 <i class="fa fa-level-up text-navy"></i>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="ibox">
<div class="ibox-title">
<h5>IT-02 - 销售部</h5>
</div>
<div class="ibox-content">
<h4>部门简介</h4>
<p>
平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。
</p>
<div>
<span>当前项目进度:</span>
<div class="stat-percent">82%</div>
<div class="progress progress-mini">
<div style="width: 82%;" class="progress-bar"></div>
</div>
</div>
<div class="row m-t-sm">
<div class="col-sm-4">
<div class="font-bold">项目</div>
68
</div>
<div class="col-sm-4">
<div class="font-bold">周期</div>
2个月
</div>
<div class="col-sm-4 text-right">
<div class="font-bold">预算</div>
&yen;701,400 <i class="fa fa-level-up text-navy"></i>
</div>
</div>
</div>
</div>
<div class="ibox">
<div class="ibox-title">
<h5>IT-06 - 销售部</h5>
</div>
<div class="ibox-content">
<h4>部门简介</h4>
<p>
平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。
</p>
<div>
<span>当前项目进度:</span>
<div class="stat-percent">26%</div>
<div class="progress progress-mini">
<div style="width: 26%;" class="progress-bar"></div>
</div>
</div>
<div class="row m-t-sm">
<div class="col-sm-4">
<div class="font-bold">项目</div>
16
</div>
<div class="col-sm-4">
<div class="font-bold">周期</div>
8个月
</div>
<div class="col-sm-4 text-right">
<div class="font-bold">预算</div>
&yen;160,100 <i class="fa fa-level-up text-navy"></i>
</div>
</div>
</div>
</div>
<div class="ibox">
<div class="ibox-title">
<h5>IT-09 - 销售部</h5>
</div>
<div class="ibox-content">
<h4>部门简介</h4>
<p>
平面设计(graphic design),也称为视觉传达设计,是以“视觉”作为沟通和表现的方式,透过多种方式来创造和结合符号、图片和文字,借此作出用来传达想法或讯息的视觉表现。
</p>
<div>
<span>当前项目进度:</span>
<div class="stat-percent">18%</div>
<div class="progress progress-mini">
<div style="width: 18%;" class="progress-bar"></div>
</div>
</div>
<div class="row m-t-sm">
<div class="col-sm-4">
<div class="font-bold">项目</div>
53
</div>
<div class="col-sm-4">
<div class="font-bold">周期</div>
9个月
</div>
<div class="col-sm-4 text-right">
<div class="font-bold">预算</div>
&yen;60,140 <i class="fa fa-level-up text-navy"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
</body>
</html>
@@ -57,7 +57,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-datetimepicker" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-datetimepicker</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-datetimepicker" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-datetimepicker</a></div>
</div>
</div>
</div>
@@ -111,7 +111,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=laydate" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=laydate</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#laydate" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#laydate</a></div>
</div>
</div>
</div>
@@ -183,7 +183,8 @@
laydate.render({
elem: '#laydate-demo-3',
type: 'datetime'
type: 'datetime',
trigger: 'click'
});
laydate.render({
@@ -33,6 +33,11 @@
<option value="12">若依12</option>
</select>
</form>
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-duallistbox" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-duallistbox</a></div>
</div>
</div>
</div>
</div>
@@ -62,7 +62,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=jasny-bootstrap" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=jasny-bootstrap</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jasny-bootstrap" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jasny-bootstrap</a></div>
</div>
</div>
</div>
@@ -105,7 +105,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=jasny-bootstrap" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=jasny-bootstrap</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jasny-bootstrap" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jasny-bootstrap</a></div>
</div>
</div>
</div>
@@ -69,7 +69,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=select2" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=select2</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#select2" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#select2</a></div>
</div>
</div>
</div>
@@ -133,7 +133,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-select" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-select</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-select" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-select</a></div>
</div>
</div>
</div>
@@ -144,116 +144,5 @@
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: bootstrap-select-js" />
<script type="text/javascript">
$(function(){
<!-- datetimepicker示例 -->
$("#datetimepicker-demo-1").datetimepicker();
$("#datetimepicker-demo-2").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("#datetimepicker-demo-3").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
autoclose: true
});
$('.form_date').datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("#datetimepicker-startTime").datetimepicker({
format: 'yyyy-mm-dd',
minView: "month",
todayBtn: true,
autoclose: true,
endDate : new Date(),
}).on('changeDate', function(event) {
event.preventDefault();
event.stopPropagation();
var startTime = event.date;
$('#datetimepicker-endTime').datetimepicker('setStartDate', startTime);
});
$("#datetimepicker-endTime").datetimepicker({
format: 'yyyy-mm-dd',
minView: "month",
todayBtn: true,
autoclose: true,
endDate : new Date(),
}).on('changeDate', function(event) {
event.preventDefault();
event.stopPropagation();
var endTime = event.date;
$("#datetimepicker-startTime").datetimepicker('setEndDate', endTime);
});
<!-- laydate示例 -->
layui.use('laydate', function(){
var laydate = layui.laydate;
laydate.render({
elem: '#laydate-demo-1'
});
laydate.render({
elem: '#laydate-demo-2',
type: 'date'
});
laydate.render({
elem: '#laydate-demo-3',
type: 'datetime'
});
laydate.render({
elem: '#laydate-demo-4',
range: true
});
var startDate = laydate.render({
elem: '#laydate-startTime',
max: $('#laydate-endTime').val(),
theme: 'molv',
trigger: 'click',
done: function(value, date) {
// 结束时间大于开始时间
if (value !== '') {
endDate.config.min.year = date.year;
endDate.config.min.month = date.month - 1;
endDate.config.min.date = date.date;
} else {
endDate.config.min.year = '';
endDate.config.min.month = '';
endDate.config.min.date = '';
}
}
});
var endDate = laydate.render({
elem: '#laydate-endTime',
min: $('#laydate-startTime').val(),
theme: 'molv',
trigger: 'click',
done: function(value, date) {
// 开始时间小于结束时间
if (value !== '') {
startDate.config.max.year = date.year;
startDate.config.max.month = date.month - 1;
startDate.config.max.date = date.date;
} else {
startDate.config.max.year = '';
startDate.config.max.month = '';
startDate.config.max.date = '';
}
}
});
});
});
</script>
</body>
</html>
@@ -0,0 +1,93 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<th:block th:include="include :: header('Summernote富文本编辑器')" />
<th:block th:include="include :: summernote-css" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>Summernote 富文本编辑器</h5>
</div>
<div class="ibox-content no-padding">
<div class="summernote">
<h2>若依后台管理系统</h2>
<p>ruoyi是一个完全响应式,基于Bootstrap3.3.6最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术,她提供了诸多的强大的可以重新组合的UI组件,并集成了最新的jQuery版本(v2.1.1),当然,也集成了很多功能强大,用途广泛的就jQuery插件,她可以用于所有的Web应用程序,如<b>网站管理后台</b><b>网站会员中心</b><b>CMS</b><b>CRM</b><b>OA</b>等等,当然,您也可以对她进行深度定制,以做出更强系统。</p>
<p>
<b>当前版本:</b>v4.2.0
</p>
<p>
<span class="label label-warning">免费开源</span>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-content">
<h2>Summernote</h2>
<p>
Summernote是一个简单的基于Bootstrap的WYSIWYG富文本编辑器
</p>
<div class="alert alert-warning"> 官方文档请参考:
<a href="https://github.com/summernote/summernote">https://github.com/summernote/summernote</a>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>编辑/保存为html代码示例</h5>
<button id="edit" class="btn btn-primary btn-xs m-l-sm" onclick="edit()" type="button">编辑</button>
<button id="save" class="btn btn-primary btn-xs" onclick="save()" type="button">保存</button>
</div>
<div class="ibox-content" id="eg">
<div class="click2edit wrapper">
<h3>你好,若依 </h3>
<p>H+是一个完全响应式,基于Bootstrap3.3.6最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术,她提供了诸多的强大的可以重新组合的UI组件,并集成了最新的jQuery版本(v2.1.1),当然,也集成了很多功能强大,用途广泛的就jQuery插件,她可以用于所有的Web应用程序,如<b>网站管理后台</b><b>网站会员中心</b><b>CMS</b><b>CRM</b><b>OA</b>等等,当然,您也可以对她进行深度定制,以做出更强系统。</p>
<p>
<b>当前版本:</b>v4.2.0
</p>
<p>
<span class="label label-warning">开源免费</span>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: summernote-js" />
<script>
$(document).ready(function () {
$('.summernote').summernote({
lang: 'zh-CN'
});
});
var edit = function () {
$("#eg").addClass("no-padding");
$('.click2edit').summernote({
lang: 'zh-CN',
focus: true
});
};
var save = function () {
$("#eg").removeClass("no-padding");
var aHTML = $('.click2edit').summernote('code');
$('.click2edit').summernote('destroy');
};
</script>
</body>
</html>
@@ -0,0 +1,113 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>时间轴</title>
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
<link href="../static/css/main/animate.min.css" th:href="@{/css/main/animate.min.css}" rel="stylesheet"/>
<link th:href="@{/css/style.css}" rel="stylesheet"/>
</head>
<body class="gray-bg">
<div class="row animated fadeInRight">
<div class="ibox float-e-margins">
<div class="text-center float-e-margins p-md">
<span>打开/关闭颜色/背景或方向版本: </span>
<a href="#" class="btn btn-xs btn-primary" id="lightVersion">轻型版本 </a>
<a href="#" class="btn btn-xs btn-primary" id="darkVersion">黑色版本 </a>
</div>
<div id="ibox-content">
<div id="vertical-timeline" class="vertical-container light-timeline">
<div class="vertical-timeline-block">
<div class="vertical-timeline-icon navy-bg">
<i class="fa fa-briefcase"></i>
</div>
<div class="vertical-timeline-content">
<h2>会议</h2>
<p>上一年的销售业绩发布会。总结产品营销和销售趋势及销售的现状。
</p>
<a href="#" class="btn btn-sm btn-primary"> 更多信息</a>
<span class="vertical-date">
今天 <br>
<small>2月3日</small>
</span>
</div>
</div>
<div class="vertical-timeline-block">
<div class="vertical-timeline-icon blue-bg">
<i class="fa fa-file-text"></i>
</div>
<div class="vertical-timeline-content">
<h2>给张三发送文档</h2>
<p>发送上年度《销售业绩报告》</p>
<a href="#" class="btn btn-sm btn-success"> 下载文档 </a>
<span class="vertical-date">
今天 <br>
<small>2月3日</small>
</span>
</div>
</div>
<div class="vertical-timeline-block">
<div class="vertical-timeline-icon lazur-bg">
<i class="fa fa-coffee"></i>
</div>
<div class="vertical-timeline-content">
<h2>喝咖啡休息</h2>
<p>喝咖啡啦,啦啦啦~~</p>
<a href="#" class="btn btn-sm btn-info">更多</a>
<span class="vertical-date"> 昨天 <br><small>2月2日</small></span>
</div>
</div>
<div class="vertical-timeline-block">
<div class="vertical-timeline-icon yellow-bg">
<i class="fa fa-phone"></i>
</div>
<div class="vertical-timeline-content">
<h2>给李四打电话</h2>
<p>给李四打电话分配本月工作任务</p>
<span class="vertical-date">昨天 <br><small>2月2日</small></span>
</div>
</div>
<div class="vertical-timeline-block">
<div class="vertical-timeline-icon lazur-bg">
<i class="fa fa-user-md"></i>
</div>
<div class="vertical-timeline-content">
<h2>公司年会</h2>
<p>发年终奖啦,啦啦啦~~</p>
<span class="vertical-date">前天 <br><small>2月1日</small></span>
</div>
</div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script>
$(document).ready(function(){
$('#lightVersion').click(function(event) {
event.preventDefault()
$('#ibox-content').removeClass('ibox-content');
$('#vertical-timeline').removeClass('dark-timeline');
$('#vertical-timeline').addClass('light-timeline');
});
$('#darkVersion').click(function(event) {
event.preventDefault()
$('#ibox-content').addClass('ibox-content');
$('#vertical-timeline').removeClass('light-timeline');
$('#vertical-timeline').addClass('dark-timeline');
});
});
</script>
</body>
</html>
@@ -29,7 +29,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=jasny-bootstrap" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=jasny-bootstrap</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-fileinput" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-fileinput</a></div>
</div>
</div>
</div>
@@ -71,7 +71,7 @@
<div class="ibox-content">
<p class="m-t">更多示例请访问官方示例页面:<a href="http://jqueryvalidation.org/files/demo/" target="_blank">查看</a>
</p>
<p>中文API可参考:<a href="http://doc.ruoyi.vip/#/standard/zjwd?id=jquery-validate" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=jquery-validate</a>
<p>中文API可参考:<a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jquery-validate" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jquery-validate</a>
</p>
</div>
</div>
@@ -74,7 +74,7 @@
下面这个示例展示了如何在表单向导中使用 jQuery Validation 插件
</p>
<form id="form" action="http://www.zi-han.net/theme/hplus/form_wizard.html#" class="wizard-big">
<form id="form" action="" class="wizard-big">
<h1>账户</h1>
<fieldset>
<h2>账户信息</h2>
@@ -4,12 +4,12 @@
<th:block th:include="include :: header('新增用户')" />
</head>
<body>
<div class="form-content">
<div class="main-content">
<form id="form-user-add" class="form-horizontal">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label"><span style="color: red; ">*</span>用户名称:</label>
<label class="col-sm-4 control-label is-required">用户名称:</label>
<div class="col-sm-8">
<input name="userName" placeholder="请输入用户名称" class="form-control" type="text">
</div>
@@ -17,7 +17,7 @@
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label"><span style="color: red; ">*</span>归属部门:</label>
<label class="col-sm-4 control-label is-required">归属部门:</label>
<div class="col-sm-8">
<div class="input-group">
<input name="deptName" type="text" placeholder="请选择归属部门" class="form-control">
@@ -30,7 +30,7 @@
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label"><span style="color: red; ">*</span>手机号码:</label>
<label class="col-sm-4 control-label is-required">手机号码:</label>
<div class="col-sm-8">
<input name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text">
</div>
@@ -38,7 +38,7 @@
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label"><span style="color: red; ">*</span>邮箱:</label>
<label class="col-sm-4 control-label is-required">邮箱:</label>
<div class="col-sm-8">
<input name="email" class="form-control" type="text" placeholder="请输入邮箱">
</div>
@@ -48,7 +48,7 @@
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label"><span style="color: red; ">*</span>登录账号:</label>
<label class="col-sm-4 control-label is-required">登录账号:</label>
<div class="col-sm-8">
<input name="loginName" placeholder="请输入登录账号" class="form-control" type="text">
</div>
@@ -56,7 +56,7 @@
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label"><span style="color: red; ">*</span>登录密码:</label>
<label class="col-sm-4 control-label is-required">登录密码:</label>
<div class="col-sm-8">
<input name="password" placeholder="请输入登录密码" class="form-control" type="password">
</div>
@@ -85,8 +85,10 @@
</div>
<div class="ibox-content">
<p>通过调用<code>$.modal.openTab()</code>实现。 </p>
<button type="button" class="btn btn-primary" id="button-open-6">打开</button>
<button type="button" class="btn btn-warning" id="button-open-7">关闭</button>
<button type="button" class="btn btn-primary" id="button-open-6">新窗口打开</button>
<button type="button" class="btn btn-warning" id="button-open-7">关闭当前</button>
<button type="button" class="btn btn-primary" id="button-open-14">选卡页同一页签打开</button>
<button type="button" class="btn btn-warning" id="button-open-15">关闭指定</button>
</div>
</div>
</div>
@@ -240,6 +242,15 @@
$("#button-open-13").click(function(){
layer.load(0, {shade: false}); // 0代表加载的风格,支持0-2
})
$("#button-open-14").click(function(){
$.modal.parentTab('添加用户', prefix + "/form");
})
$("#button-open-15").click(function(){
// 需要关闭窗口的url
$.modal.closeTab(prefix + "/form");
})
</script>
</body>
</html>
@@ -7,7 +7,7 @@
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -7,7 +7,7 @@
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -7,7 +7,7 @@
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -13,7 +13,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">用户姓名:</label>
<label class="col-sm-3 control-label">用户姓名:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="userName" id="userName" required>
</div>
@@ -44,7 +44,7 @@
<label class="col-sm-3 control-label">用户状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.isDefault == 'Y' ? true : false}">
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
@@ -11,7 +11,7 @@
<div class="form-control-static" th:text="${user.userCode}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">用户姓名:</label>
<label class="col-sm-3 control-label">用户姓名:</label>
<div class="col-sm-8">
<div class="form-control-static" th:text="${user.userName}"></div>
</div>
@@ -14,7 +14,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">用户姓名:</label>
<label class="col-sm-3 control-label">用户姓名:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="userName" id="userName" th:field="*{userName}" required>
</div>
@@ -3,7 +3,75 @@
<head>
<th:block th:include="include :: header('其他操作')" />
</head>
<body class="gray-bg">
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal" id="form-demo-1">
<div class="form-group">
<label class="col-sm-2 control-label">用户名称:</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="userName"placeholder="请输入用户名称">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">手机号码:</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="phonenumber" maxlength="11"placeholder="请输入手机号码">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="button" class="btn btn-sm btn-primary" onclick="submit1()"><i class="fa fa-check"></i>保 存(不刷新当前页)</button>&nbsp;
</div>
</div>
</form>
<hr/>
<form class="form-horizontal" id="form-demo-2">
<div class="form-group">
<label class="col-sm-2 control-label">用户名称:</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="userName"placeholder="请输入用户名称">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">手机号码:</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="phonenumber" maxlength="11"placeholder="请输入手机号码">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="button" class="btn btn-sm btn-primary" onclick="submit2()"><i class="fa fa-check"></i>保 存(刷新当前页)</button>&nbsp;
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "demo/operate";
function submit1(){
$.operate.saveModal(prefix + "/edit", $('#form-demo-1').serialize());
}
function submit2(){
$.ajax({
url: prefix + "/edit",
data: $('#form-demo-2').serialize(),
type: "post",
success: function(result) {
if (result.code == 0) {
layer.msg("保存成功,正在刷新数据请稍后……", {
icon: 1,
time: 500,
shade: [0.1, '#8F8F8F']
},function() {
location.reload();
});
} else {
alert(result.msg);
}
}
})
}
</script>
</body>
</html>
@@ -9,10 +9,10 @@
<a class="btn btn-success" onclick="$.operate.add()">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()">
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-info" onclick="$.table.importExcel()">
@@ -21,7 +21,7 @@
<a class="btn btn-warning" onclick="$.table.exportExcel()">
<i class="fa fa-download"></i> 导出
</a>
<a class="btn btn-info btn-detail disabled" onclick="$.operate.detail()">
<a class="btn btn-info single disabled" onclick="$.operate.detail()">
<i class="fa fa-search"></i> 详细
</a>
<a class="btn btn-danger" onclick="$.operate.clean()">
@@ -30,7 +30,7 @@
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -108,7 +108,8 @@
</script>
</body>
<!-- 导入区域 -->
<form id="importForm" enctype="multipart/form-data" class="mt20 mb10" style="display: none;">
<script id="importTpl" type="text/template">
<form enctype="multipart/form-data" class="mt20 mb10">
<div class="col-xs-offset-1">
<input type="file" id="file" name="file"/>
<div class="mt10 pt5">
@@ -120,4 +121,5 @@
</font>
</div>
</form>
</script>
</html>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,478 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('图表组合')" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5 class="m-b-md">Q1 销量</h5>
<h2 class="text-navy">
<i class="fa fa-play fa-rotate-270"></i> 上升
</h2>
<small>更新时间:12天以前</small>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content ">
<h5 class="m-b-md">Q2 销量</h5>
<h2 class="text-navy">
<i class="fa fa-play fa-rotate-270"></i> 上升
</h2>
<small>更新时间:12天以前</small>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5 class="m-b-md">Q3 销量</h5>
<h2 class="text-danger">
<i class="fa fa-play fa-rotate-90"></i> 下降
</h2>
<small>更新时间:12天以前</small>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5 class="m-b-md">Q4 销量</h5>
<h2 class="text-danger">
<i class="fa fa-play fa-rotate-90"></i> 下降
</h2>
<small>更新时间:12天以前</small>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>本日访问量</h5>
<h2>198 009</h2>
<div id="sparkline1"></div>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>本周访问量</h5>
<h2>65 000</h2>
<div id="sparkline2"></div>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>本月访问量</h5>
<h2>680 900</h2>
<div id="sparkline3"></div>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>平均停留时间</h5>
<h2>00:06:40</h2>
<div id="sparkline4"></div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>使用率</h5>
<h2>65%</h2>
<div class="progress progress-mini">
<div style="width: 68%;" class="progress-bar"></div>
</div>
<div class="m-t-sm small">4:32更新</div>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>使用率</h5>
<h2>50%</h2>
<div class="progress progress-mini">
<div style="width: 78%;" class="progress-bar"></div>
</div>
<div class="m-t-sm small">4:32更新</div>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>使用率</h5>
<h2>14%</h2>
<div class="progress progress-mini">
<div style="width: 38%;" class="progress-bar progress-bar-danger"></div>
</div>
<div class="m-t-sm small">4:32更新</div>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>使用率</h5>
<h2>20%</h2>
<div class="progress progress-mini">
<div style="width: 28%;" class="progress-bar progress-bar-danger"></div>
</div>
<div class="m-t-sm small">4:32更新</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>百分比</h5>
<h2>42/20</h2>
<div class="text-center">
<div id="sparkline5"></div>
</div>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>百分比</h5>
<h2>100/54</h2>
<div class="text-center">
<div id="sparkline6"></div>
</div>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>百分比</h5>
<h2>685/211</h2>
<div class="text-center">
<div id="sparkline7"></div>
</div>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>百分比</h5>
<h2>240/32</h2>
<div class="text-center">
<div id="sparkline8"></div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>收入</h5>
<h1 class="no-margins">886,200</h1>
<div class="stat-percent font-bold text-navy">98% <i class="fa fa-bolt"></i></div>
<small>总收入</small>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>本月收入</h5>
<h1 class="no-margins">1 738,200</h1>
<div class="stat-percent font-bold text-navy">98% <i class="fa fa-bolt"></i></div>
<small>总收入</small>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>本日收入</h5>
<h1 class="no-margins">-200,100</h1>
<div class="stat-percent font-bold text-danger">12% <i class="fa fa-level-down"></i></div>
<small>总收入</small>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>搜索有收入</h5>
<h1 class="no-margins">54,200</h1>
<div class="stat-percent font-bold text-danger">24% <i class="fa fa-level-down"></i></div>
<small>总收入</small>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>预警</h5>
<table class="table table-stripped small m-t-md">
<tbody>
<tr>
<td class="no-borders">
<i class="fa fa-circle text-navy"></i>
</td>
<td class="no-borders">
示例 01
</td>
</tr>
<tr>
<td>
<i class="fa fa-circle text-navy"></i>
</td>
<td>
示例 02
</td>
</tr>
<tr>
<td>
<i class="fa fa-circle text-navy"></i>
</td>
<td>
示例 03
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>项目</h5>
<table class="table table-stripped small m-t-md">
<tbody>
<tr>
<td class="no-borders">
<i class="fa fa-circle text-navy"></i>
</td>
<td class="no-borders">
示例 01
</td>
</tr>
<tr>
<td>
<i class="fa fa-circle text-navy"></i>
</td>
<td>
示例 02
</td>
</tr>
<tr>
<td>
<i class="fa fa-circle text-navy"></i>
</td>
<td>
示例 03
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>消息</h5>
<table class="table table-stripped small m-t-md">
<tbody>
<tr>
<td class="no-borders">
<i class="fa fa-circle text-danger"></i>
</td>
<td class="no-borders">
示例 01
</td>
</tr>
<tr>
<td>
<i class="fa fa-circle text-danger"></i>
</td>
<td>
示例 02
</td>
</tr>
<tr>
<td>
<i class="fa fa-circle text-danger"></i>
</td>
<td>
示例 03
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox">
<div class="ibox-content">
<h5>通知</h5>
<table class="table table-stripped small m-t-md">
<tbody>
<tr>
<td class="no-borders">
<i class="fa fa-circle text-danger"></i>
</td>
<td class="no-borders">
示例 01
</td>
</tr>
<tr>
<td>
<i class="fa fa-circle text-danger"></i>
</td>
<td>
示例 02
</td>
</tr>
<tr>
<td>
<i class="fa fa-circle text-danger"></i>
</td>
<td>
示例 03
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: peity-js" />
<th:block th:include="include :: sparkline-js" />
<script type="text/javascript">
$(document).ready(function () {
$("#sparkline1").sparkline([34, 43, 43, 35, 44, 32, 44, 52], {
type: 'line',
width: '100%',
height: '60',
lineColor: '#1ab394',
fillColor: "#ffffff"
});
$("#sparkline2").sparkline([24, 43, 43, 55, 44, 62, 44, 72], {
type: 'line',
width: '100%',
height: '60',
lineColor: '#1ab394',
fillColor: "#ffffff"
});
$("#sparkline3").sparkline([74, 43, 23, 55, 54, 32, 24, 12], {
type: 'line',
width: '100%',
height: '60',
lineColor: '#ed5565',
fillColor: "#ffffff"
});
$("#sparkline4").sparkline([24, 43, 33, 55, 64, 72, 44, 22], {
type: 'line',
width: '100%',
height: '60',
lineColor: '#ed5565',
fillColor: "#ffffff"
});
$("#sparkline5").sparkline([1, 4], {
type: 'pie',
height: '140',
sliceColors: ['#1ab394', '#F5F5F5']
});
$("#sparkline6").sparkline([5, 3], {
type: 'pie',
height: '140',
sliceColors: ['#1ab394', '#F5F5F5']
});
$("#sparkline7").sparkline([2, 2], {
type: 'pie',
height: '140',
sliceColors: ['#ed5565', '#F5F5F5']
});
$("#sparkline8").sparkline([2, 3], {
type: 'pie',
height: '140',
sliceColors: ['#ed5565', '#F5F5F5']
});
});
$(function() {
$("span.pie").peity("pie", {
fill: ['#1ab394', '#d7d7d7', '#ffffff']
})
$(".line").peity("line",{
fill: '#1ab394',
stroke:'#169c81',
})
$(".bar").peity("bar", {
fill: ["#1ab394", "#d7d7d7"]
})
$(".bar_dashboard").peity("bar", {
fill: ["#1ab394", "#d7d7d7"],
width:100
})
var updatingChart = $(".updating-chart").peity("line", { fill: '#1ab394',stroke:'#169c81', width: 64 })
setInterval(function() {
var random = Math.round(Math.random() * 10)
var values = updatingChart.text().split(",")
values.shift()
values.push(random)
updatingChart
.text(values.join(","))
.change()
}, 1000);
});
</script>
</body>
</html>
@@ -0,0 +1,206 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('图表')" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInDown">
<div class="row">
<div class="col-sm-5">
<div class="jumbotron">
<h1>Peity图表</h1>
<p>是一个内嵌数据图形可视化的图表库</p>
<p><a href="http://benpickles.github.io/peity/" target="_blank" class="btn btn-primary btn-lg" role="button">了解 Peity</a>
</p>
</div>
</div>
<div class="col-sm-7">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>饼状图 <small>自定义颜色</small></h5>
<div class="ibox-tools">
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div>
<table class="table table-bordered white-bg">
<thead>
<tr>
<th>图表</th>
<th>代码</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span class="pie">1/5</span>
</td>
<td>
<code>&lt;span class="pie"&gt;1/5&lt;/span&gt;</code>
</td>
</tr>
<tr>
<td>
<span class="pie">226/360</span>
</td>
<td>
<code>&lt;span class="pie"&gt;226/360&lt;/span&gt;</code>
</td>
</tr>
<tr>
<td>
<span class="pie">0.52/1.561</span>
</td>
<td>
<code>&lt;span class="pie"&gt;0.52/1.561&lt;/span&gt;</code>
</td>
</tr>
<tr>
<td>
<span class="pie">1,4</span>
</td>
<td>
<code>&lt;span class="pie"&gt;1,4&lt;/span&gt;</code>
</td>
</tr>
<tr>
<td>
<span class="pie">226,134</span>
</td>
<td>
<code>&lt;span class="pie"&gt;226,134&lt;/span&gt;</code>
</td>
</tr>
<tr>
<td>
<span class="pie">0.52,1.041</span>
</td>
<td>
<code>&lt;span class="pie"&gt;0.52,1.041&lt;/span&gt;</code>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>线性图</h5>
<div class="ibox-tools">
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div>
<table class="table table-bordered white-bg">
<thead>
<tr>
<th>图表</th>
<th>代码</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span data-diameter="40" class="updating-chart">5,3,9,6,5,9,7,3,5,2,5,3,9,6,5,9,7,3,5,2</span>
</td>
<td>
<code>&lt;span class="line"&gt;5,3,9,6,5,9,7,3,5,2&lt;/span&gt;</code>
</td>
</tr>
<tr>
<td>
<span class="line">5,3,9,6,5,9,7,3,5,2</span>
</td>
<td>
<code>&lt;span class="line"&gt;5,3,9,6,5,9,7,3,5,2&lt;/span&gt;</code>
</td>
</tr>
<tr>
<td>
<span class="line">5,3,2,-1,-3,-2,2,3,5,2</span>
</td>
<td>
<code>&lt;span class="line"&gt;5,3,2,-1,-3,-2,2,3,5,2&lt;/span&gt;</code>
</td>
</tr>
<tr>
<td>
<span class="line">0,-3,-6,-4,-5,-4,-7,-3,-5,-2</span>
</td>
<td>
<code>&lt;span class="line"&gt;0,-3,-6,-4,-5,-4,-7,-3,-5,-2&lt;/span&gt;</code>
</td>
</tr>
<tr>
<td>
<span class="bar">5,3,9,6,5,9,7,3,5,2</span>
</td>
<td>
<code>&lt;span class="bar"&gt;5,3,9,6,5,9,7,3,5,2&lt;/span&gt;</code>
</td>
</tr>
<tr>
<td>
<span class="bar">5,3,2,-1,-3,-2,2,3,5,2</span>
</td>
<td>
<code>&lt;span class="bar"&gt;5,3,2,-1,-3,-2,2,3,5,2&lt;/span&gt;</code>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: peity-js" />
<script type="text/javascript">
$(function() {
$("span.pie").peity("pie", {
fill: ['#1ab394', '#d7d7d7', '#ffffff']
})
$(".line").peity("line",{
fill: '#1ab394',
stroke:'#169c81',
})
$(".bar").peity("bar", {
fill: ["#1ab394", "#d7d7d7"]
})
$(".bar_dashboard").peity("bar", {
fill: ["#1ab394", "#d7d7d7"],
width:100
})
var updatingChart = $(".updating-chart").peity("line", { fill: '#1ab394',stroke:'#169c81', width: 64 })
setInterval(function() {
var random = Math.round(Math.random() * 10)
var values = updatingChart.text().split(",")
values.shift()
values.push(random)
updatingChart
.text(values.join(","))
.change()
}, 1000);
});
</script>
</body>
</html>
@@ -0,0 +1,232 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('线状图')" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInDown">
<div class="row">
<div class="col-sm-5">
<div class="jumbotron">
<h1>Sparkline</h1>
<p>这是另一个可视化图表库</p>
<p><a href="http://omnipotent.net/jquery.sparkline" target="_blank" class="btn btn-primary btn-lg" role="button">了解 Sparkline</a>
</p>
</div>
</div>
<div class="col-sm-7">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>Sparkline图表 <small>自定义颜色</small></h5>
<div class="ibox-tools">
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div>
<table class="table table-bordered white-bg">
<thead>
<tr>
<th>图表</th>
<th>类型</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span id="sparkline1"></span>
</td>
<td>
内联线性图
</td>
</tr>
<tr>
<td>
<span id="sparkline2"></span>
</td>
<td>
柱状图
</td>
</tr>
<tr>
<td>
<span id="sparkline3"></span>
</td>
<td>
饼状图
</td>
</tr>
<tr>
<td>
<span id="sparkline4"></span>
</td>
<td>
长线性图
</td>
</tr>
<tr>
<td>
<span id="sparkline5"></span>
</td>
<td>
三态图
</td>
</tr>
<tr>
<td>
<span id="sparkline6"></span>
</td>
<td>
散点图
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>自定义饼状图尺寸</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_sparkline.html#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="graph_sparkline.html#">选项1</a>
</li>
<li><a href="graph_sparkline.html#">选项2</a>
</li>
</ul>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content text-center h-200">
<span id="sparkline7"></span>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>自定义柱状图尺寸</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_sparkline.html#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="graph_sparkline.html#">选项1</a>
</li>
<li><a href="graph_sparkline.html#">选项2</a>
</li>
</ul>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content text-center h-200">
<span id="sparkline8"></span>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>自定义线性图尺寸</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_sparkline.html#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="graph_sparkline.html#">选项1</a>
</li>
<li><a href="graph_sparkline.html#">选项2</a>
</li>
</ul>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content text-center h-200">
<span id="sparkline9"></span>
</div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: sparkline-js" />
<script type="text/javascript">
$(function () {
$("#sparkline1").sparkline([34, 43, 43, 35, 44, 32, 44, 52, 25], {
type: 'line',
lineColor: '#17997f',
fillColor: '#1ab394',
});
$("#sparkline2").sparkline([5, 6, 7, 2, 0, -4, -2, 4], {
type: 'bar',
barColor: '#1ab394',
negBarColor: '#c6c6c6'});
$("#sparkline3").sparkline([1, 1, 2], {
type: 'pie',
sliceColors: ['#1ab394', '#b3b3b3', '#e4f0fb']});
$("#sparkline4").sparkline([34, 43, 43, 35, 44, 32, 15, 22, 46, 33, 86, 54, 73, 53, 12, 53, 23, 65, 23, 63, 53, 42, 34, 56, 76, 15, 54, 23, 44], {
type: 'line',
lineColor: '#17997f',
fillColor: '#ffffff',
});
$("#sparkline5").sparkline([1, 1, 0, 1, -1, -1, 1, -1, 0, 0, 1, 1], {
type: 'tristate',
posBarColor: '#1ab394',
negBarColor: '#bfbfbf'});
$("#sparkline6").sparkline([4, 6, 7, 7, 4, 3, 2, 1, 4, 4, 5, 6, 3, 4, 5, 8, 7, 6, 9, 3, 2, 4, 1, 5, 6, 4, 3, 7, ], {
type: 'discrete',
lineColor: '#1ab394'});
$("#sparkline7").sparkline([52, 12, 44], {
type: 'pie',
height: '150px',
sliceColors: ['#1ab394', '#b3b3b3', '#e4f0fb']});
$("#sparkline8").sparkline([5, 6, 7, 2, 0, 4, 2, 4, 5, 7, 2, 4, 12, 14, 4, 2, 14, 12, 7], {
type: 'bar',
barWidth: 8,
height: '150px',
barColor: '#1ab394',
negBarColor: '#c6c6c6'});
$("#sparkline9").sparkline([34, 43, 43, 35, 44, 32, 15, 22, 46, 33, 86, 54, 73, 53, 12, 53, 23, 65, 23, 63, 53, 42, 34, 56, 76, 15, 54, 23, 44], {
type: 'line',
lineWidth: 1,
height: '150px',
lineColor: '#17997f',
fillColor: '#ffffff',
});
});
</script>
</body>
</html>

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