367 Commits
Author SHA1 Message Date
RuoYi 7e259cd101 若依 4.3 2020-06-22 08:37:35 +08:00
RuoYi 3846329c82 代码生成主子表序号调整 2020-06-21 23:04:09 +08:00
RuoYi 326fe6a63f Excel支持readConverterExp读取字符串组内容 2020-06-21 11:19:15 +08:00
RuoYi 5321200c6e 修复jquery表单序列化时复选框未选中不会序列化到对象中去问题 2020-06-21 10:08:46 +08:00
RuoYi 82d913c7de 代码生成显示类型支持复选框 2020-06-20 17:52:05 +08:00
RuoYi 0df61a6336 新增回显数据字典(字符串数组) 2020-06-20 17:22:04 +08:00
RuoYi 68a4e6de5f 创建用户不允许选择系统管理员角色 2020-06-20 15:03:39 +08:00
RuoYi 84e447e170 用户信息添加输入框组图标&鼠标按下显示密码 2020-06-20 11:15:45 +08:00
RuoYi 4fcfe890c9 主子表生成模板多余逗号问题 2020-06-20 11:15:29 +08:00
RuoYi a3b51553fb 输入框组图标元素修改成圆角 2020-06-20 09:55:27 +08:00
RuoYi 7dc982aded 修复浏览器手动缩放比例后菜单无法自适应问题 2020-06-19 19:29:54 +08:00
Sxile 07c3a67b70 添加缺少的@ Override 2020-06-19 18:09:09 +08:00
Sxile 40333c6b16 添加{}使代码更容易理解 2020-06-19 18:02:35 +08:00
Sxile 942e609d36 常量接口修改为常量类 2020-06-19 16:00:42 +08:00
RuoYi 9f248e97f6 前端表单样式修改成圆角 2020-06-19 12:16:03 +08:00
RuoYi 9c763dceab ajaxSuccess判断修正 2020-06-18 13:33:54 +08:00
RuoYi 92d7c18879 HttpUtils.sendPost()方法,参数无需拼接参数到url 2020-06-18 10:36:24 +08:00
RuoYi e4919f1a62 HTML过滤器不替换&实体 2020-06-18 10:16:21 +08:00
RuoYi 052ab8866d 代码生成模板支持主子表 2020-06-17 09:43:15 +08:00
RuoYi 338138a0bc 代码生成浮点型改用BigDecimal 2020-06-17 08:56:06 +08:00
RuoYi fedb39c9ad 主子表示例添加序号&防止insertRow数据被初始化 2020-06-16 13:11:28 +08:00
RuoYi 128b35c2f6 新增示例(主子表提交) 2020-06-15 14:03:29 +08:00
RuoYi 57fed227f0 表单构建优化 2020-06-12 12:31:56 +08:00
RuoYi c3b9aa0daf 修复表单构建单选和多选框渲染问题 2020-06-10 20:27:02 +08:00
RuoYi e91adcc28d 添加是否开启swagger配置 2020-06-08 12:20:28 +08:00
RuoYi 83981138e0 代码生成模板调整,字段为String并且必填则加空串条件 2020-06-07 15:54:17 +08:00
RuoYi c29d766cd8 字典数据查询列表根据dictSort升序排序 2020-06-04 14:26:40 +08:00
RuoYi 3ede0313f2 首页菜单显示调整 2020-06-04 13:49:28 +08:00
RuoYi e7248da61a 修复树表对imageView和tooltip方法无效问题。 2020-06-02 19:40:43 +08:00
RuoYi 05638550d5 添加cxselect参数手册地址 2020-06-02 11:53:32 +08:00
RuoYi 004e5b8af6 新增多级联动下拉示例 2020-06-02 11:06:01 +08:00
RuoYi 0544581ab9 升级fastjson到最新版1.2.70 修复高危安全漏洞 2020-06-01 10:14:10 +08:00
RuoYi 6b22fb86cb 示例demo页面清除html链接,防止点击后跳转出现404 2020-05-30 22:04:30 +08:00
RuoYi 6d5830a235 新增表格列参数(是否列选项可见ignore) 2020-05-29 17:11:32 +08:00
RuoYi 6aed57056c 修复部分情况节点不展开问题。 2020-05-29 11:29:06 +08:00
RuoYi 3f17e54cf9 README 2020-05-29 09:23:46 +08:00
RuoYi aea691537b 在线用户强退方法合并 2020-05-28 09:37:25 +08:00
若依andGitee 8c88957b69 !167 SysUserOnlineController疑问和建议
Merge pull request !167 from JoseK43326/master
2020-05-28 09:33:16 +08:00
JoseK43326 bb9d504d40 用户在线监测 部分修改建议 2020-05-27 20:50:46 +08:00
RuoYi 30b3909fc4 修复selectColumns方法获取子对象数据无效问题。 2020-05-23 21:43:24 +08:00
RuoYi f72d399f9a 修复selectColumns方法获取子对象数据无效问题。 2020-05-23 09:34:58 +08:00
RuoYi cb6ca423f8 README 2020-05-19 11:43:10 +08:00
RuoYi 1cb1743445 修改数据源类型优先级,先根据方法,再根据类 2020-05-19 11:05:24 +08:00
若依andGitee f24da2fc98 !161 fix 类上数据源类型获取不到问题,修改优先级,先根据方法,再根据类
Merge pull request !161 from sdvdxl/master
2020-05-19 09:59:31 +08:00
杜龙少 0b85032ca8 Merge remote-tracking branch 'ruoyi-orgin/master' 2020-05-18 09:08:11 +08:00
RuoYi 9c54c5c37d 缺少 @Override 2020-05-16 17:16:44 +08:00
RuoYi 59e2d4a2df 修改上级部门(选择项排除本身和下级) 2020-05-15 15:30:08 +08:00
RuoYi dc6fe4c985 修复关闭标签页后刷新还是上次地址问题 2020-05-14 17:14:23 +08:00
RuoYi a8eeb652b2 通用http发送方法增加参数 contentType 编码类型 2020-05-14 14:36:22 +08:00
RuoYi 1af0fef99e 更换IP地址查询接口 2020-05-13 21:16:15 +08:00
RuoYi 7190516a27 淘宝IP接口不稳定,默认关闭。 2020-05-13 18:58:10 +08:00
RuoYi 7e34c2339f 新增表格参数(是否启用显示卡片视图cardView) 2020-05-07 14:07:18 +08:00
RuoYi 12f1ff894f 修复选择菜单后刷新页面,菜单箭头显示不对问题 2020-05-07 13:55:43 +08:00
RuoYi 8a9d298ffc 添加校验部门包含未停用的子部门 2020-05-07 12:15:04 +08:00
RuoYi 2c8365b605 针对性屏蔽Enter 2020-04-30 15:53:17 +08:00
RuoYi 27f40d0357 取消回车自动提交表单 2020-04-28 22:26:08 +08:00
RuoYi cb32d5cc90 新增表格参数(是否显示全屏按钮showFullscreen) 2020-04-23 14:24:49 +08:00
RuoYi 14bb9f3cba 'A','I','BUTTON' 标签忽略clickToSelect事件,防止点击操作按钮时选中。 2020-04-23 11:53:56 +08:00
RuoYi 0140de4546 新增表格参数(是否启用分页条无限循环的功能paginationLoop) 2020-04-23 11:10:18 +08:00
RuoYi e476fe6f5d Long类型比较相等问题调整 2020-04-21 19:50:36 +08:00
RuoYi 897ce6e3c2 表格添加显示/隐藏所有列方法 showAllColumns/hideAllColumns 2020-04-21 13:29:21 +08:00
杜龙少 6d115e602e fix 类上数据源类型获取不到问题,修改优先级,先根据方法,再根据类 2020-04-19 11:00:35 +08:00
RuoYi 2bba8c7b73 新增表格参数(是否显示表头showHeader) 2020-04-17 18:46:21 +08:00
RuoYi 1dbc11f708 邮箱显示截取部分字符串,防止低分辨率错位 2020-04-17 18:35:48 +08:00
RuoYi f9fbdb291b 优化查询条件label为时间对齐问题 2020-04-14 20:38:19 +08:00
若依andGitee a3b3332fdd !160 fix bug: 字典排序值=0时无效
Merge pull request !160 from Errors0/fix0414
2020-04-14 20:31:06 +08:00
200cc 384b58ca11 fix bug: 字典排序值=0时无效 2020-04-14 15:35:16 +08:00
RuoYi 52423edb24 升级fastjson到最新版1.2.68 修复安全加固 2020-04-13 11:55:25 +08:00
RuoYi fed849beed list*.vm模板优化 2020-04-08 12:02:26 +08:00
RuoYi fe296cc8ba 删除无用注解 2020-04-08 11:14:16 +08:00
Sxile 6c94fe8b82 删除无用注解 2020-04-08 11:02:06 +08:00
RuoYi febd69e2b3 添加data数据加载属性及示例 2020-04-01 11:11:12 +08:00
RuoYi 55512bdbec 代码生成列属性根据sort排序 2020-04-01 10:38:57 +08:00
RuoYi 22d1e5882a 气泡弹出框特效移至通用js 2020-03-31 11:53:49 +08:00
RuoYi 2f24ab1692 图片预览事件属性修正 2020-03-30 18:54:19 +08:00
RuoYi 025731a04c @Override 注解缺失 2020-03-30 18:40:48 +08:00
RuoYi 28c861c6df 修复冻结列排序样式无效问题 2020-03-30 18:23:41 +08:00
RuoYi dcbc77b403 修复更多操作部分浏览器不兼容情况 2020-03-30 17:14:43 +08:00
RuoYi 1e6b78c349 升级Bootstrap版本到v3.3.7 2020-03-30 16:46:48 +08:00
RuoYi 4f57c28f2f 修复context-path的情况下个人中心刷新导致样式问题 2020-03-25 18:04:37 +08:00
RuoYi 2a718ba4d6 驱动移至admin模块 2020-03-25 14:55:32 +08:00
RuoYi ca9f87bff4 去掉多余的依赖 2020-03-25 12:14:24 +08:00
RuoYi e517741f99 全屏editFull打开适配表树 2020-03-25 12:03:51 +08:00
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
359 changed files with 32653 additions and 12965 deletions
+32 -27
View File
@@ -4,13 +4,9 @@
性别男,若依是给还没有出生女儿取的名字(寓意:你若不离不弃,我必生死相依)
若依参考后台模板。有需要可自行到群内下载
> 如需单应用,请移步 [RuoYi-fast](https://gitee.com/y_project/RuoYi-fast) `(保持同步更新)`,如需Oracle版本,请移步 [RuoYi-oracle](http://doc.ruoyi.vip/#/standard/xmkz) `(不定时更新)`
> 阿里云通用云产品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;`(仅限新用户)`
> 阿里云Hi拼购 限量爆款 低至199元/年 [https://www.aliyun.com/acts/hi-group-buying?userCode=brki8iof](https://www.aliyun.com/acts/hi-group-buying?userCode=brki8iof)&nbsp;&nbsp;`(仅限新用户)`
* 感谢 [hplus](https://gitee.com/hplus_admin/hplus) 后台主题 UI 框架
* 前后端分离版本,请移步[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
* 阿里云优惠券:[点我进入](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)&nbsp;&nbsp;
## 内置功能
@@ -26,17 +22,18 @@
10. 登录日志:系统登录日志记录查询包含登录异常。
11. 在线用户:当前系统中活跃用户状态监控。
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
13. 代码生成:前后端代码的生成(java、html、xml、sql支持CRUD下载 。
14. 系统接口:根据业务代码自动生成相关的api接口文档。
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
16. 在线构建器:拖动表单元素生成相应的HTML代码。
17. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
## 在线体验
> admin/admin123
> 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
- admin/admin123
- 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
演示地址:http://ruoyi.vip
文档地址:http://doc.ruoyi.vip
## 演示图
@@ -44,39 +41,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.3.0</version>
<name>ruoyi</name>
<url>http://www.ruoyi.vip</url>
<description>若依管理系统</description>
<properties>
<ruoyi.version>3.4</ruoyi.version>
<ruoyi.version>4.3.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.70</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>
+10 -3
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.4</version>
<version>4.3.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
@@ -54,6 +54,12 @@
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
</dependency>
<!-- Mysql驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- 核心模块-->
<dependency>
@@ -80,6 +86,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 +104,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());
}
}
File diff suppressed because one or more lines are too long
@@ -21,6 +21,7 @@ import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.web.controller.demo.domain.CustomerModel;
import com.ruoyi.web.controller.demo.domain.UserOperateModel;
/**
@@ -103,6 +104,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())
{
@@ -142,6 +154,17 @@ public class DemoOperateController extends BaseController
return AjaxResult.success(users.put(userId, user));
}
/**
* 新增保存主子表信息
*/
@PostMapping("/customer/add")
@ResponseBody
public AjaxResult addSave(CustomerModel customerModel)
{
System.out.println(customerModel.toString());
return AjaxResult.success();
}
/**
* 修改用户
*/
@@ -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";
}
}
@@ -6,6 +6,7 @@ import java.util.Collections;
import java.util.Date;
import java.util.List;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -140,6 +141,16 @@ public class DemoTableController extends BaseController
return prefix + "/button";
}
/**
* 直接加载表格数据
*/
@GetMapping("/data")
public String data(ModelMap mmap)
{
mmap.put("users", users);
return prefix + "/data";
}
/**
* 表格冻结列
*/
@@ -167,6 +178,15 @@ public class DemoTableController extends BaseController
return prefix + "/detail";
}
/**
* 表格父子视图
*/
@GetMapping("/child")
public String child()
{
return prefix + "/child";
}
/**
* 表格图片预览
*/
@@ -176,6 +196,42 @@ 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";
}
/**
* 主子表提交
*/
@GetMapping("/subdata")
public String subdata()
{
return prefix + "/subdata";
}
/**
* 表格其他操作
*/
@@ -0,0 +1,116 @@
package com.ruoyi.web.controller.demo.domain;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 客户测试信息
*
* @author ruoyi
*/
public class CustomerModel
{
/**
* 客户姓名
*/
private String name;
/**
* 客户手机
*/
private String phonenumber;
/**
* 客户性别
*/
private String sex;
/**
* 客户生日
*/
private String birthday;
/**
* 客户描述
*/
private String remark;
/**
* 商品信息
*/
private List<GoodsModel> goods;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getPhonenumber()
{
return phonenumber;
}
public void setPhonenumber(String phonenumber)
{
this.phonenumber = phonenumber;
}
public String getSex()
{
return sex;
}
public void setSex(String sex)
{
this.sex = sex;
}
public String getBirthday()
{
return birthday;
}
public void setBirthday(String birthday)
{
this.birthday = birthday;
}
public String getRemark()
{
return remark;
}
public void setRemark(String remark)
{
this.remark = remark;
}
public List<GoodsModel> getGoods()
{
return goods;
}
public void setGoods(List<GoodsModel> goods)
{
this.goods = goods;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("name", getName())
.append("phonenumber", getPhonenumber())
.append("sex", getSex())
.append("birthday", getBirthday())
.append("goods", getGoods())
.append("remark", getRemark())
.toString();
}
}
@@ -0,0 +1,82 @@
package com.ruoyi.web.controller.demo.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 商品测试信息
*
* @author ruoyi
*/
public class GoodsModel
{
/**
* 商品名称
*/
private String name;
/**
* 商品重量
*/
private Integer weight;
/**
* 商品价格
*/
private Double price;
/**
* 商品种类
*/
private String type;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public Integer getWeight()
{
return weight;
}
public void setWeight(Integer weight)
{
this.weight = weight;
}
public Double getPrice()
{
return price;
}
public void setPrice(Double price)
{
this.price = price;
}
public String getType()
{
return type;
}
public void setType(String type)
{
this.type = type;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("name", getName())
.append("weight", getWeight())
.append("price", getPrice())
.append("type", getType())
.toString();
}
}
@@ -135,11 +135,13 @@ public class UserOperateModel extends BaseEntity
this.status = status;
}
@Override
public Date getCreateTime()
{
return createTime;
}
@Override
public void setCreateTime(Date createTime)
{
this.createTime = createTime;
@@ -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();
}
}
@@ -1,18 +1,19 @@
package com.ruoyi.web.controller.monitor;
import java.util.List;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
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.core.text.Convert;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.enums.OnlineStatus;
import com.ruoyi.framework.shiro.session.OnlineSession;
@@ -55,13 +56,13 @@ public class SysUserOnlineController extends BaseController
return getDataTable(list);
}
@RequiresPermissions("monitor:online:batchForceLogout")
@RequiresPermissions(value = { "monitor:online:batchForceLogout", "monitor:online:forceLogout" }, logical = Logical.OR)
@Log(title = "在线用户", businessType = BusinessType.FORCE)
@PostMapping("/batchForceLogout")
@ResponseBody
public AjaxResult batchForceLogout(@RequestParam("ids[]") String[] ids)
public AjaxResult batchForceLogout(String ids)
{
for (String sessionId : ids)
for (String sessionId : Convert.toStrArray(ids))
{
SysUserOnline online = userOnlineService.selectOnlineById(sessionId);
if (online == null)
@@ -84,31 +85,4 @@ public class SysUserOnlineController extends BaseController
}
return success();
}
@RequiresPermissions("monitor:online:forceLogout")
@Log(title = "在线用户", businessType = BusinessType.FORCE)
@PostMapping("/forceLogout")
@ResponseBody
public AjaxResult forceLogout(String sessionId)
{
SysUserOnline online = userOnlineService.selectOnlineById(sessionId);
if (sessionId.equals(ShiroUtils.getSessionId()))
{
return error("当前登陆用户无法强退");
}
if (online == null)
{
return error("用户已下线");
}
OnlineSession onlineSession = (OnlineSession) onlineSessionDAO.readSession(online.getSessionId());
if (onlineSession == null)
{
return error("用户已下线");
}
onlineSession.setStatus(OnlineStatus.off_line);
onlineSessionDAO.update(onlineSession);
online.setStatus(OnlineStatus.off_line);
userOnlineService.saveOnline(online);
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,21 @@ 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() + "'失败,上级部门不能是自己");
}
else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus())
&& deptService.selectNormalChildrenDeptById(dept.getDeptId()) > 0)
{
return AjaxResult.error("该部门包含未停用的子部门!");
}
dept.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(deptService.updateDept(dept));
}
@@ -134,11 +153,16 @@ public class SysDeptController extends BaseController
/**
* 选择部门树
*
* @param deptId 部门ID
* @param excludeId 排除ID
*/
@GetMapping("/selectDeptTree/{deptId}")
public String selectDeptTree(@PathVariable("deptId") Long deptId, ModelMap mmap)
@GetMapping(value = { "/selectDeptTree/{deptId}", "/selectDeptTree/{deptId}/{excludeId}" })
public String selectDeptTree(@PathVariable("deptId") Long deptId,
@PathVariable(value = "excludeId", required = false) String excludeId, ModelMap mmap)
{
mmap.put("dept", deptService.selectDeptById(deptId));
mmap.put("excludeId", excludeId);
return prefix + "/tree";
}
@@ -153,6 +177,19 @@ public class SysDeptController extends BaseController
return ztrees;
}
/**
* 加载部门列表树(排除下级)
*/
@GetMapping("/treeData/{excludeId}")
@ResponseBody
public List<Ztree> treeDataExcludeChild(@PathVariable(value = "excludeId", required = false) Long excludeId)
{
SysDept dept = new SysDept();
dept.setDeptId(excludeId);
List<Ztree> ztrees = deptService.selectDeptTreeExcludeChild(dept);
return ztrees;
}
/**
* 加载角色部门(数据权限)列表树
*/
@@ -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));
}
@@ -1,10 +1,12 @@
package com.ruoyi.web.controller.system;
import java.util.List;
import java.util.stream.Collectors;
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 +19,12 @@ 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.SysRole;
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;
@@ -105,7 +108,7 @@ public class SysUserController extends BaseController
@GetMapping("/add")
public String add(ModelMap mmap)
{
mmap.put("roles", roleService.selectRoleAll());
mmap.put("roles", roleService.selectRoleAll().stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
mmap.put("posts", postService.selectPostAll());
return prefix + "/add";
}
@@ -117,15 +120,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()));
@@ -139,8 +146,9 @@ public class SysUserController extends BaseController
@GetMapping("/edit/{userId}")
public String edit(@PathVariable("userId") Long userId, ModelMap mmap)
{
List<SysRole> roles = roleService.selectRolesByUserId(userId);
mmap.put("user", userService.selectUserById(userId));
mmap.put("roles", roleService.selectRolesByUserId(userId));
mmap.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
mmap.put("posts", postService.selectPostsByUserId(userId));
return prefix + "/edit";
}
@@ -152,11 +160,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 +190,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().longValue() == user.getUserId().longValue())
{
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 +286,7 @@ public class SysUserController extends BaseController
@ResponseBody
public AjaxResult changeStatus(SysUser user)
{
userService.checkUserAllowed(user);
return toAjax(userService.changeStatus(user));
}
}
@@ -1,5 +1,6 @@
package com.ruoyi.web.core.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.ruoyi.common.config.Global;
@@ -22,6 +23,10 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableSwagger2
public class SwaggerConfig
{
/** 是否开启swagger */
@Value("${swagger.enabled}")
private boolean enabled;
/**
* 创建API
*/
@@ -29,6 +34,8 @@ public class SwaggerConfig
public Docket createRestApi()
{
return new Docket(DocumentationType.SWAGGER_2)
// 是否启用Swagger
.enable(enabled)
// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
.apiInfo(apiInfo())
// 设置哪些接口暴露给Swagger展示
@@ -41,7 +41,10 @@ spring:
enabled: true
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /monitor/druid/*
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username:
login-password:
filter:
stat:
enabled: true
+15 -6
View File
@@ -3,15 +3,15 @@ ruoyi:
# 名称
name: RuoYi
# 版本
version: 3.4.0
version: 4.3.0
# 版权年份
copyrightYear: 2019
# 实例演示开关
demoEnabled: true
# 文件路径
profile: D:/profile/
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: D:/ruoyi/uploadPath
# 获取ip地址开关
addressEnabled: true
addressEnabled: false
# 开发环境配置
server:
@@ -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:
@@ -124,3 +128,8 @@ xss:
excludes: /system/notice/*
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
# Swagger配置
swagger:
# 是否开启swagger
enabled: true
@@ -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>
@@ -5,10 +5,10 @@ PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
<configuration>
<settings>
<setting name="cacheEnabled" value="true" /> <!-- 全局映射器启用缓存 -->
<setting name="useGeneratedKeys" value="true" /> <!-- 允许 JDBC 支持自动生成主键 -->
<setting name="defaultExecutorType" value="REUSE" /> <!-- 配置默认的执行器 -->
<setting name="logImpl" value="SLF4J" /> <!-- 指定 MyBatis 所用日志的具体实现 -->
<setting name="cacheEnabled" value="true" /> <!-- 全局映射器启用缓存 -->
<setting name="useGeneratedKeys" value="true" /> <!-- 允许 JDBC 支持自动生成主键 -->
<setting name="defaultExecutorType" value="REUSE" /> <!-- 配置默认的执行器 -->
<setting name="logImpl" value="SLF4J" /> <!-- 指定 MyBatis 所用日志的具体实现 -->
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> 驼峰式命名 -->
</settings>
@@ -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,30 +205,71 @@
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');
});
$("#" + table.options.id).off('click', '.fixed-table-body').on('click', '.th-inner', function (event) {
$.each(that.$fixedHeader.find('th'), function (i, th) {
$(th).find('.sortable').removeClass('desc asc').addClass('both');
});
});
//// events
// events
this.$fixedHeader.off('click', '.th-inner').on('click', '.th-inner', function (event) {
var target = $(this);
var $this = event.type === "keypress" ? $(event.currentTarget) : $(event.currentTarget).parent(), $this_ = that.$header.find('th').eq($this.index());
var sortOrder = "";
if (table.options.sortName === $this.data('field')) {
sortOrder = table.options.sortOrder === 'asc' ? 'desc' : 'asc';
} else {
sortOrder = $this.data('order') === 'asc' ? 'desc' : 'asc';
}
table.options.sortOrder = sortOrder;
var sortName = $this.data('sortName') ? $this.data('sortName') : $this.data('field');
if (target.parent().data().sortable) {
$.each(that.$fixedHeader.find('th'), function (i, th) {
$(th).find('.sortable').removeClass('desc asc').addClass(($(th).data('field') === sortName || $(th).data('sortName') === sortName) ? sortOrder : 'both');
});
}
});
this.$tableBody.on('scroll', function () {
that.$fixedBody.find('table').css('top', -$(this).scrollTop());
});
@@ -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,7 +165,9 @@
data: parms ? parms : options.ajaxParams,
dataType: "JSON",
success: function(data, textStatus, jqXHR) {
data = calculateObjectValue(options, options.responseHandler, [data], data);
renderTable(data);
calculateObjectValue(options, options.onLoadSuccess, [data], data);
},
error: function(xhr, textStatus) {
var _errorMsg = '<tr><td colspan="' + options.columns.length + '"><div style="display: block;text-align: center;">' + xhr.responseText + '</div></td></tr>'
@@ -233,20 +241,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 +350,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 +373,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 +604,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 +732,16 @@
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;
},
onLoadSuccess: 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,406 @@
/*!
* jQuery cxSelect
* @name jquery.cxselect.js
* @version 1.4.2
* @date 2017-09-26
* @author ciaoca
* @email ciaoca@gmail.com
* @site https://github.com/ciaoca/cxSelect
* @license Released under the MIT license
*/
(function(factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else {
factory(window.jQuery || window.Zepto || window.$);
};
}(function($) {
var cxSelect = function() {
var self = this;
var dom, settings, callback;
// 分配参数
for (var i = 0, l = arguments.length; i < l; i++) {
if (cxSelect.isJquery(arguments[i]) || cxSelect.isZepto(arguments[i])) {
dom = arguments[i];
} else if (cxSelect.isElement(arguments[i])) {
dom = $(arguments[i]);
} else if (typeof arguments[i] === 'function') {
callback = arguments[i];
} else if (typeof arguments[i] === 'object') {
settings = arguments[i];
};
};
var api = new cxSelect.init(dom, settings);
if (typeof callback === 'function') {
callback(api);
};
return api;
};
cxSelect.isElement = function(o){
if (o && (typeof HTMLElement === 'function' || typeof HTMLElement === 'object') && o instanceof HTMLElement) {
return true;
} else {
return (o && o.nodeType && o.nodeType === 1) ? true : false;
};
};
cxSelect.isJquery = function(o){
return (o && o.length && (typeof jQuery === 'function' || typeof jQuery === 'object') && o instanceof jQuery) ? true : false;
};
cxSelect.isZepto = function(o){
return (o && o.length && (typeof Zepto === 'function' || typeof Zepto === 'object') && Zepto.zepto.isZ(o)) ? true : false;
};
cxSelect.getIndex = function(n, required) {
return required ? n : n - 1;
};
cxSelect.getData = function(data, space) {
if (typeof space === 'string' && space.length) {
space = space.split('.');
for (var i = 0, l = space.length; i < l; i++) {
data = data[space[i]];
};
};
return data;
};
cxSelect.init = function(dom, settings) {
var self = this;
if (!cxSelect.isJquery(dom) && !cxSelect.isZepto(dom)) {return};
var theSelect = {
dom: {
box: dom
}
};
self.attach = cxSelect.attach.bind(theSelect);
self.detach = cxSelect.detach.bind(theSelect);
self.setOptions = cxSelect.setOptions.bind(theSelect);
self.clear = cxSelect.clear.bind(theSelect);
theSelect.changeEvent = function() {
cxSelect.selectChange.call(theSelect, this.className);
};
theSelect.settings = $.extend({}, $.cxSelect.defaults, settings, {
url: theSelect.dom.box.data('url'),
emptyStyle: theSelect.dom.box.data('emptyStyle'),
required: theSelect.dom.box.data('required'),
firstTitle: theSelect.dom.box.data('firstTitle'),
firstValue: theSelect.dom.box.data('firstValue'),
jsonSpace: theSelect.dom.box.data('jsonSpace'),
jsonName: theSelect.dom.box.data('jsonName'),
jsonValue: theSelect.dom.box.data('jsonValue'),
jsonSub: theSelect.dom.box.data('jsonSub')
});
var _dataSelects = theSelect.dom.box.data('selects');
if (typeof _dataSelects === 'string' && _dataSelects.length) {
theSelect.settings.selects = _dataSelects.split(',');
};
self.setOptions();
self.attach();
// 使用独立接口获取数据
if (!theSelect.settings.url && !theSelect.settings.data) {
cxSelect.start.apply(theSelect);
// 设置自定义数据
} else if ($.isArray(theSelect.settings.data)) {
cxSelect.start.call(theSelect, theSelect.settings.data);
// 设置 URL,通过 Ajax 获取数据
} else if (typeof theSelect.settings.url === 'string' && theSelect.settings.url.length) {
$.getJSON(theSelect.settings.url, function(json) {
cxSelect.start.call(theSelect, json);
});
};
};
// 设置参数
cxSelect.setOptions = function(opts) {
var self = this;
if (opts) {
$.extend(self.settings, opts);
};
// 初次或重设选择器组
if (!$.isArray(self.selectArray) || !self.selectArray.length || (opts && opts.selects)) {
self.selectArray = [];
if ($.isArray(self.settings.selects) && self.settings.selects.length) {
var _tempSelect;
for (var i = 0, l = self.settings.selects.length; i < l; i++) {
_tempSelect = self.dom.box.find('select.' + self.settings.selects[i]);
if (!_tempSelect || !_tempSelect.length) {break};
self.selectArray.push(_tempSelect);
};
};
};
if (opts) {
if (!$.isArray(opts.data) && typeof opts.url === 'string' && opts.url.length) {
$.getJSON(self.settings.url, function(json) {
cxSelect.start.call(self, json);
});
} else {
cxSelect.start.call(self, opts.data);
};
};
};
// 绑定
cxSelect.attach = function() {
var self = this;
if (!self.attachStatus) {
self.dom.box.on('change', 'select', self.changeEvent);
};
if (typeof self.attachStatus === 'boolean') {
cxSelect.start.call(self);
};
self.attachStatus = true;
};
// 移除绑定
cxSelect.detach = function() {
var self = this;
self.dom.box.off('change', 'select', self.changeEvent);
self.attachStatus = false;
};
// 清空选项
cxSelect.clear = function(index) {
var self = this;
var _style = {
display: '',
visibility: ''
};
index = isNaN(index) ? 0 : index;
// 清空后面的 select
for (var i = index, l = self.selectArray.length; i < l; i++) {
self.selectArray[i].empty().prop('disabled', true);
if (self.settings.emptyStyle === 'none') {
_style.display = 'none';
} else if (self.settings.emptyStyle === 'hidden') {
_style.visibility = 'hidden';
};
self.selectArray[i].css(_style);
};
};
cxSelect.start = function(data) {
var self = this;
if ($.isArray(data)) {
self.settings.data = cxSelect.getData(data, self.settings.jsonSpace);
};
if (!self.selectArray.length) {return};
// 保存默认值
for (var i = 0, l = self.selectArray.length; i < l; i++) {
if (typeof self.selectArray[i].attr('data-value') !== 'string' && self.selectArray[i][0].options.length) {
self.selectArray[i].attr('data-value', self.selectArray[i].val());
};
};
if (self.settings.data || (typeof self.selectArray[0].data('url') === 'string' && self.selectArray[0].data('url').length)) {
cxSelect.getOptionData.call(self, 0);
} else if (self.selectArray[0][0].options.length && typeof self.selectArray[0].attr('data-value') === 'string' && self.selectArray[0].attr('data-value').length) {
self.selectArray[0].val(self.selectArray[0].attr('data-value'));
cxSelect.getOptionData.call(self, 1);
} else {
self.selectArray[0].prop('disabled', false).css({
'display': '',
'visibility': ''
});
};
};
// 获取选项数据
cxSelect.getOptionData = function(index) {
var self = this;
if (typeof index !== 'number' || isNaN(index) || index < 0 || index >= self.selectArray.length) {return};
var _indexPrev = index - 1;
var _select = self.selectArray[index];
var _selectData;
var _valueIndex;
var _dataUrl = _select.data('url');
var _jsonSpace = typeof _select.data('jsonSpace') === 'undefined' ? self.settings.jsonSpace : _select.data('jsonSpace');
var _query = {};
var _queryName;
var _selectName;
var _selectValue;
cxSelect.clear.call(self, index);
// 使用独立接口
if (typeof _dataUrl === 'string' && _dataUrl.length) {
if (index > 0) {
for (var i = 0, j = 1; i < index; i++, j++) {
_queryName = self.selectArray[j].data('queryName');
_selectName = self.selectArray[i].attr('name');
_selectValue = self.selectArray[i].val();
if (typeof _queryName === 'string' && _queryName.length) {
_query[_queryName] = _selectValue;
} else if (typeof _selectName === 'string' && _selectName.length) {
_query[_selectName] = _selectValue;
};
};
};
$.getJSON(_dataUrl, _query, function(json) {
_selectData = cxSelect.getData(json, _jsonSpace);
cxSelect.buildOption.call(self, index, _selectData);
});
// 使用整合数据
} else if (self.settings.data && typeof self.settings.data === 'object') {
_selectData = self.settings.data;
for (var i = 0; i < index; i++) {
_valueIndex = cxSelect.getIndex(self.selectArray[i][0].selectedIndex, typeof self.selectArray[i].data('required') === 'boolean' ? self.selectArray[i].data('required') : self.settings.required);
if (typeof _selectData[_valueIndex] === 'object' && $.isArray(_selectData[_valueIndex][self.settings.jsonSub]) && _selectData[_valueIndex][self.settings.jsonSub].length) {
_selectData = _selectData[_valueIndex][self.settings.jsonSub];
} else {
_selectData = null;
break;
};
};
cxSelect.buildOption.call(self, index, _selectData);
};
};
// 构建选项列表
cxSelect.buildOption = function(index, data) {
var self = this;
var _select = self.selectArray[index];
var _required = typeof _select.data('required') === 'boolean' ? _select.data('required') : self.settings.required;
var _firstTitle = typeof _select.data('firstTitle') === 'undefined' ? self.settings.firstTitle : _select.data('firstTitle');
var _firstValue = typeof _select.data('firstValue') === 'undefined' ? self.settings.firstValue : _select.data('firstValue');
var _jsonName = typeof _select.data('jsonName') === 'undefined' ? self.settings.jsonName : _select.data('jsonName');
var _jsonValue = typeof _select.data('jsonValue') === 'undefined' ? self.settings.jsonValue : _select.data('jsonValue');
if (!$.isArray(data)) {return};
var _html = !_required ? '<option value="' + String(_firstValue) + '">' + String(_firstTitle) + '</option>' : '';
// 区分标题、值的数据
if (typeof _jsonName === 'string' && _jsonName.length) {
// 无值字段时使用标题作为值
if (typeof _jsonValue !== 'string' || !_jsonValue.length) {
_jsonValue = _jsonName;
};
for (var i = 0, l = data.length; i < l; i++) {
_html += '<option value="' + String(data[i][_jsonValue]) + '">' + String(data[i][_jsonName]) + '</option>';
};
// 数组即为值的数据
} else {
for (var i = 0, l = data.length; i < l; i++) {
_html += '<option value="' + String(data[i]) + '">' + String(data[i]) + '</option>';
};
};
_select.html(_html).prop('disabled', false).css({
'display': '',
'visibility': ''
});
// 初次加载设置默认值
if (typeof _select.attr('data-value') === 'string') {
_select.val(String(_select.attr('data-value'))).removeAttr('data-value');
if (_select[0].selectedIndex < 0) {
_select[0].options[0].selected = true;
};
};
if (_required || _select[0].selectedIndex > 0) {
_select.trigger('change');
};
};
// 改变选择时的处理
cxSelect.selectChange = function(name) {
var self = this;
if (typeof name !== 'string' || !name.length) {return};
var index;
name = name.replace(/\s+/g, ',');
name = ',' + name + ',';
// 获取当前 select 位置
for (var i = 0, l = self.selectArray.length; i < l; i++) {
if (name.indexOf(',' + self.settings.selects[i] + ',') > -1) {
index = i;
break;
};
};
if (typeof index === 'number' && index > -1) {
index += 1;
cxSelect.getOptionData.call(self, index);
};
};
$.cxSelect = function() {
return cxSelect.apply(this, arguments);
};
// 默认值
$.cxSelect.defaults = {
selects: [], // 下拉选框组
url: null, // 列表数据文件路径(URL)或数组数据
data: null, // 自定义数据
emptyStyle: null, // 无数据状态显示方式
required: false, // 是否为必选
firstTitle: '请选择', // 第一个选项的标题
firstValue: '', // 第一个选项的值
jsonSpace: '', // 数据命名空间
jsonName: 'n', // 数据标题字段名称
jsonValue: '', // 数据值字段名称
jsonSub: 's' // 子集数据字段名称
};
$.fn.cxSelect = function(settings, callback) {
this.each(function(i) {
$.cxSelect(this, settings, callback);
});
return this;
};
}));
File diff suppressed because one or more lines are too long
@@ -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
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();
File diff suppressed because one or more lines are too long
@@ -144,4 +144,18 @@ body.signin {
font-weight: normal; /*改变了rememberme的字体*/
margin-bottom: 0;
text-align: left;
}
.form-control, .form-control:focus, .has-error .form-control:focus, .has-success .form-control:focus, .has-warning .form-control:focus, .navbar-collapse, .navbar-form, .navbar-form-custom .form-control:focus, .navbar-form-custom .form-control:hover, .open .btn.dropdown-toggle, .panel, .popover, .progress, .progress-bar {
box-shadow: none;
}
.form-control{
border-radius: 1px!important;
padding: 6px 12px!important;
height: 34px!important;
}
.form-control:focus{
border-color: #1ab394 !important;
}
+1 -1
View File
@@ -1 +1 @@
html{height:100%}body.signin{height:auto;background:url(../img/login-background.jpg) no-repeat center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;color:rgba(255,255,255,.95)}.signinpanel{width:750px;margin:10% auto 0}.signinpanel .logopanel{float:none;width:auto;padding:0;background:0}.signinpanel .signin-info ul{list-style:none;padding:0;margin:20px 0}.signinpanel .form-control{display:block;margin-top:15px}.signinpanel .uname{background:#fff url(../img/user.png) no-repeat 95% center;color:#333}.signinpanel .pword{background:#fff url(../img/locked.png) no-repeat 95% center;color:#333}.signinpanel .code{background:#fff no-repeat 95% center;color:#333;margin:0 0 15px 0}.signinpanel .btn{margin-top:15px}.signinpanel form{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);box-shadow:0 3px 0 rgba(12,12,12,.03);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:30px}.signup-footer{border-top:solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top:15px}@media screen and (max-width:768px){.signinpanel,.signuppanel{margin:0 auto;width:420px!important;padding:20px}.signinpanel form{margin-top:20px}.signup-footer,.signuppanel .form-control{margin-bottom:10px}.signup-footer .pull-left,.signup-footer .pull-right{float:none!important;text-align:center}.signinpanel .signin-info ul{display:none}}@media screen and (max-width:320px){.signinpanel,.signuppanel{margin:0 20px;width:auto}}.checkbox-custom{position:relative;padding:0 15px 0 25px;margin-bottom:7px;display:inline-block}.checkbox-custom input[type="checkbox"]{opacity:0;position:absolute;cursor:pointer;z-index:2;margin:-6px 0 0 0;top:50%;left:3px}.checkbox-custom label:before{content:'';position:absolute;top:50%;left:0;margin-top:-9px;width:18px;height:17px;display:inline-block;border-radius:2px;border:1px solid #bbb;background:#fff}.checkbox-custom input[type="checkbox"]:checked+label:after{position:absolute;display:inline-block;font-family:'Glyphicons Halflings';content:"\e013";top:42%;left:3px;margin-top:-5px;font-size:11px;line-height:1;width:16px;height:16px;color:#333}.checkbox-custom label{cursor:pointer;line-height:1.2;font-weight:normal;margin-bottom:0;text-align:left}
html{height:100%}body.signin{height:auto;background:url(../img/login-background.jpg) no-repeat center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;color:rgba(255,255,255,.95)}.signinpanel{width:750px;margin:10% auto 0}.signinpanel .logopanel{float:none;width:auto;padding:0;background:0}.signinpanel .signin-info ul{list-style:none;padding:0;margin:20px 0}.signinpanel .form-control{display:block;margin-top:15px}.signinpanel .uname{background:#fff url(../img/user.png) no-repeat 95% center;color:#333}.signinpanel .pword{background:#fff url(../img/locked.png) no-repeat 95% center;color:#333}.signinpanel .code{background:#fff no-repeat 95% center;color:#333;margin:0 0 15px 0}.signinpanel .btn{margin-top:15px}.signinpanel form{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);box-shadow:0 3px 0 rgba(12,12,12,.03);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:30px}.signup-footer{border-top:solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top:15px}@media screen and (max-width:768px){.signinpanel,.signuppanel{margin:0 auto;width:420px!important;padding:20px}.signinpanel form{margin-top:20px}.signup-footer,.signuppanel .form-control{margin-bottom:10px}.signup-footer .pull-left,.signup-footer .pull-right{float:none!important;text-align:center}.signinpanel .signin-info ul{display:none}}@media screen and (max-width:320px){.signinpanel,.signuppanel{margin:0 20px;width:auto}}.checkbox-custom{position:relative;padding:0 15px 0 25px;margin-bottom:7px;display:inline-block}.checkbox-custom input[type="checkbox"]{opacity:0;position:absolute;cursor:pointer;z-index:2;margin:-6px 0 0 0;top:50%;left:3px}.checkbox-custom label:before{content:'';position:absolute;top:50%;left:0;margin-top:-9px;width:18px;height:17px;display:inline-block;border-radius:2px;border:1px solid #bbb;background:#fff}.checkbox-custom input[type="checkbox"]:checked+label:after{position:absolute;display:inline-block;font-family:'Glyphicons Halflings';content:"\e013";top:42%;left:3px;margin-top:-5px;font-size:11px;line-height:1;width:16px;height:16px;color:#333}.checkbox-custom label{cursor:pointer;line-height:1.2;font-weight:normal;margin-bottom:0;text-align:left}.form-control,.form-control:focus,.has-error .form-control:focus,.has-success .form-control:focus,.has-warning .form-control:focus,.navbar-collapse,.navbar-form,.navbar-form-custom .form-control:focus,.navbar-form-custom .form-control:hover,.open .btn.dropdown-toggle,.panel,.popover,.progress,.progress-bar{box-shadow:none}.form-control{border-radius:1px!important;padding:6px 12px!important;height:34px!important}.form-control:focus{border-color:#1ab394!important}
@@ -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 {
@@ -865,7 +865,7 @@ body.canvas-menu.mini-navbar nav.navbar-static-side {
color: #cacaca;
}
.form-control, .form-control:focus, .has-error .form-control:focus, .has-success .form-control:focus, .has-warning .form-control:focus, .navbar-collapse, .navbar-form, .navbar-form-custom .form-control:focus, .navbar-form-custom .form-control:hover, .open .btn.dropdown-toggle, .panel, .popover, .progress, .progress-bar {
.form-control, .has-error .form-control:focus, .has-success .form-control:focus, .has-warning .form-control:focus, .navbar-collapse, .navbar-form, .navbar-form-custom .form-control:focus, .navbar-form-custom .form-control:hover, .open .btn.dropdown-toggle, .panel, .popover, .progress, .progress-bar {
box-shadow: none;
}
@@ -1818,18 +1818,19 @@ table.dataTable thead .sorting:after {
.form-control, .single-line {
background: #FFFFFF none;
border: 1px solid #e5e6e7;
border-radius: 1px;
border-radius: 4px;
color: inherit;
display: block;
padding: 6px 12px;
padding: 3px 6px 4px;
-webkit-transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
width: 100%;
height: 31px;
font-size: 14px;
}
.form-control:focus, .single-line:focus {
border-color: #1ab394 !important;
border-color: #3c8dbc !important;
}
.has-success .form-control {
@@ -1858,8 +1859,8 @@ table.dataTable thead .sorting:after {
.input-group-addon {
background-color: #fff;
border: 1px solid #E5E6E7;
border-radius: 1px;
border: 1px solid #e5e6e7;
border-radius: 4px;
color: inherit;
font-size: 14px;
font-weight: 400;
@@ -3247,15 +3248,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 +3286,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 +3329,7 @@ nav.page-tabs .page-tabs-content {
.roll-right.tabReload {
background: #fff;
height: 40px;
height: 38px;
width: 60px;
outline: none;
}
@@ -3338,7 +3339,7 @@ nav.page-tabs .page-tabs-content {
}
#content-main {
height: calc(100% - 140px);
height: calc(100% - 127px);
overflow: hidden;
}
@@ -6858,42 +6859,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 +6940,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 +6952,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=未知错误,请重新登录
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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;
top: 6px;
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 0px 0px 0px;
text-align:right;
}
@@ -658,14 +681,20 @@ label {
.bootstrap-select.form-control .btn-default {
color: inherit;
padding: 6px 12px;
border-radius: 1px;
padding: 4px 6px 4px;
border-radius: 4px;
border: 1px solid #e5e6e7;
outline: none;
height: 34px;
height: 31px;
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;
@@ -818,6 +900,16 @@ label {
z-index:100;
}
/** 表格全屏样式 **/
.bootstrap-table.fullscreen {
position: fixed;
top: 0;
left: 0;
z-index: 1050;
width: 100%!important;
background: #FFF;
}
/** 表格树样式 **/
.bootstrap-tree-table .treetable-indent {width:16px; height: 16px; display: inline-block; position: relative;}
.bootstrap-tree-table .treetable-expander {width:16px; height: 16px; display: inline-block; position: relative; cursor: pointer;}
@@ -833,7 +925,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 +978,7 @@ label {
padding-bottom:5px
}
.form-content {
.main-content {
background-color: #ffffff;
color: inherit;
padding: 10px 15px 15px 15px;
@@ -911,4 +1003,96 @@ 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;
}
/* 设置placeholder样式 */
::-webkit-input-placeholder {
color: #b3b3b3!important;
}
:-moz-placeholder {
color: #b3b3b3!important;
}
::-moz-placeholder {
color: #b3b3b3!important;
}
:-ms-input-placeholder {
color: #b3b3b3!important;
}
@@ -7,31 +7,37 @@ layer.config({
skin: 'layer-ext-moon'
});
var isMobile = false;
var sidebarHeight = isMobile ? '100%' : '96%';
$(function() {
// MetsiMenu
$('#side-menu').metisMenu();
//固定菜单栏
$(function() {
$('.sidebar-collapse').slimScroll({
height: '100%',
railOpacity: 0.9,
alwaysVisible: false
});
// 固定菜单栏
$('.sidebar-collapse').slimScroll({
height: sidebarHeight,
railOpacity: 0.9,
alwaysVisible: false
});
// 菜单切换
$('.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();
}
@@ -46,12 +52,23 @@ $(function() {
});
$(window).bind("load resize",
function() {
if ($(this).width() < 769) {
$('body').addClass('mini-navbar');
$('.navbar-static-side').fadeIn();
$(".sidebar-collapse .logo").addClass("hide");
$(window).bind("load resize", function() {
isMobile = $.common.isMobile() || $(window).width() < 769;
if (isMobile) {
$('body').addClass('canvas-menu');
$("body").removeClass("mini-navbar");
$("nav .logo").addClass("hide");
$(".slimScrollDiv").css({ "overflow": "hidden" });
$('.navbar-static-side').fadeOut();
} else {
if($('body').hasClass('canvas-menu')) {
$('body').addClass('fixed-sidebar');
$('body').removeClass('canvas-menu');
$("body").removeClass("mini-navbar");
$("nav .logo").removeClass("hide");
$(".slimScrollDiv").css({ "overflow": "visible" });
$('.navbar-static-side').fadeIn();
}
}
});
@@ -59,21 +76,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 +239,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;
// 选项卡菜单已存在
@@ -357,6 +383,7 @@ $(function() {
});
}
scrollToTab($('.menuTab.active'));
setIframeUrl($('.page-tabs-content').find('.active').attr('data-id'));
return false;
}
@@ -395,6 +422,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");
@@ -407,6 +441,7 @@ $(function() {
$(this).remove();
});
$('.page-tabs-content').css("margin-left", "0");
setIframeUrl($('.page-tabs-content').find('.active').attr('data-id'));
}
// 关闭全部选项卡
@@ -420,6 +455,7 @@ $(function() {
$(this).addClass("active");
});
$('.page-tabs-content').css("margin-left", "0");
setIframeUrl($('.page-tabs-content').find('.active').attr('data-id'));
}
@@ -428,8 +464,11 @@ $(function() {
$(document).toggleFullScreen();
});
// 刷新按钮
// 页签刷新按钮
$('.tabReload').on('click', refreshTab);
// 页签全屏按钮
$('.tabFullScreen').on('click', fullScreenTab);
// 双击选项卡全屏显示
$('.menuTabs').on('dblclick', '.menuTab', activeTabMax);
@@ -466,6 +505,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 +523,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 +600,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 +616,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" );
@@ -22,6 +36,30 @@ $(function() {
})
})
}
// 气泡弹出框特效(移到元素时)
$(document).on("mouseenter", '.table [data-toggle="popover"]', function() {
var _this = this;
$(this).popover("show");
$(".popover").on("mouseleave", function() {
$(_this).popover('hide');
});
})
// 气泡弹出框特效(离开元素时)
$(document).on("mouseleave", '.table [data-toggle="popover"]', function() {
var _this = this;
setTimeout(function() {
if (!$(".popover:hover").length) $(_this).popover("hide");
}, 100);
});
// 取消回车自动提交表单
$(document).on("keypress", ":input:not(textarea):not([type=submit])", function(event) {
if (event.keyCode == 13) {
event.preventDefault();
}
});
// laydate 时间控件绑定
if ($(".select-time").length > 0) {
@@ -57,14 +95,15 @@ $(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';
}
}
});
});
}
// laydate time-input 时间控件绑定
if ($(".time-input").length > 0) {
layui.use('laydate', function () {
@@ -112,6 +151,7 @@ $(function() {
});
});
}
// tree 关键字搜索绑定
if ($("#keyword").length > 0) {
$("#keyword").bind("focus", function focusKey(e) {
@@ -125,18 +165,20 @@ $(function() {
$.tree.searchNode(e);
}).bind("input propertychange", $.tree.searchNode);
}
// 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;
})
// 按下ESC按钮关闭弹层
$('body', document).on('keyup', function(e) {
if (e.which === 27) {
@@ -145,6 +187,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 +240,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)){
@@ -215,19 +308,71 @@ function createMenuItem(dataUrl, menuName) {
return false;
}
//日志打印封装处理
// 日志打印封装处理
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();
}
};
// 主子表操作封装处理
var sub = {
editColumn: function() {
var count = $("#" + table.options.id).bootstrapTable('getData').length;
var params = new Array();
for (var dataIndex = 0; dataIndex <= count; dataIndex++) {
var columns = $('#' + table.options.id + ' tr[data-index="' + dataIndex + '"] td');
var obj = new Object();
for (var i = 0; i < columns.length; i++) {
var inputValue = $(columns[i]).find('input');
var selectValue = $(columns[i]).find('select');
var key = table.options.columns[i].field;
if ($.common.isNotEmpty(inputValue.val())) {
obj[key] = inputValue.val();
} else if ($.common.isNotEmpty(selectValue.val())) {
obj[key] = selectValue.val();
} else {
obj[key] = "";
}
}
params.push({ index: dataIndex, row: obj });
}
$("#" + table.options.id).bootstrapTable("updateRow", params);
},
delColumn: function(column) {
sub.editColumn();
var subColumn = $.common.isEmpty(column) ? "index" : column;
var ids = $.table.selectColumns(subColumn);
if (ids.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
$("#" + table.options.id).bootstrapTable('remove', { field: subColumn, values: ids });
}
};
@@ -245,7 +390,3 @@ $.ajaxSetup({
}
}
});
layer.config({
extend: 'moon/style.css',
skin: 'layer-ext-moon'
});
File diff suppressed because it is too large Load Diff
@@ -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>
@@ -14,13 +14,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="form_basic.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="form_basic.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -54,7 +54,7 @@
<h4>还不是会员?</h4>
<p>您可以注册一个新账户</p>
<p class="text-center">
<a href="form_basic.html"><i class="fa fa-sign-in big-icon"></i></a>
<a href="#"><i class="fa fa-sign-in big-icon"></i></a>
</p>
</div>
</div>
@@ -69,13 +69,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="form_basic.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="form_basic.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -119,13 +119,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="form_basic.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="form_basic.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -160,13 +160,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="form_basic.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="form_basic.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -176,7 +176,7 @@
</div>
<div class="ibox-content">
<div class="text-center">
<a data-toggle="modal" class="btn btn-primary" href="form_basic.html#modal-form">打开登录窗口</a>
<a data-toggle="modal" class="btn btn-primary" href="#modal-form">打开登录窗口</a>
</div>
</div>
</div>
@@ -191,13 +191,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="form_basic.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="form_basic.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -463,14 +463,14 @@
<button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">操作 <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="form_basic.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="form_basic.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
<li><a href="form_basic.html#">选项3</a>
<li><a href="#">选项3</a>
</li>
<li class="divider"></li>
<li><a href="form_basic.html#">选项4</a>
<li><a href="#">选项4</a>
</li>
</ul>
</div>
@@ -483,14 +483,14 @@
<button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">操作 <span class="caret"></span>
</button>
<ul class="dropdown-menu pull-right">
<li><a href="form_basic.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="form_basic.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
<li><a href="form_basic.html#">选项3</a>
<li><a href="#">选项3</a>
</li>
<li class="divider"></li>
<li><a href="form_basic.html#">选项4</a>
<li><a href="#">选项4</a>
</li>
</ul>
</div>
@@ -508,14 +508,14 @@
<button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button"><span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="form_basic.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="form_basic.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
<li><a href="form_basic.html#">选项3</a>
<li><a href="#">选项3</a>
</li>
<li class="divider"></li>
<li><a href="form_basic.html#">选项4</a>
<li><a href="#">选项4</a>
</li>
</ul>
</div>
@@ -580,7 +580,7 @@
<h4>还不是会员?</h4>
<p>您可以注册一个账户</p>
<p class="text-center">
<a href="form_basic.html"><i class="fa fa-sign-in big-icon"></i></a>
<a href="#"><i class="fa fa-sign-in big-icon"></i></a>
</p>
</div>
</div>
@@ -13,13 +13,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="buttons.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="buttons.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -56,13 +56,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="buttons.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="buttons.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -99,13 +99,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="buttons.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="buttons.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -143,13 +143,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="buttons.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="buttons.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -217,13 +217,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="buttons.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="buttons.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -241,14 +241,14 @@
<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle">操作 <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="buttons.html#">置顶</a>
<li><a href="#">置顶</a>
</li>
<li><a href="buttons.html#" class="font-bold">修改</a>
<li><a href="#" class="font-bold">修改</a>
</li>
<li><a href="buttons.html#">禁用</a>
<li><a href="#">禁用</a>
</li>
<li class="divider"></li>
<li><a href="buttons.html#">删除</a>
<li><a href="#">删除</a>
</li>
</ul>
</div>
@@ -256,14 +256,14 @@
<button data-toggle="dropdown" class="btn btn-warning dropdown-toggle">操作 <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="buttons.html#">置顶</a>
<li><a href="#">置顶</a>
</li>
<li><a href="buttons.html#">修改</a>
<li><a href="#">修改</a>
</li>
<li><a href="buttons.html#">禁用</a>
<li><a href="#">禁用</a>
</li>
<li class="divider"></li>
<li><a href="buttons.html#">删除</a>
<li><a href="#">删除</a>
</li>
</ul>
</div>
@@ -271,14 +271,14 @@
<button data-toggle="dropdown" class="btn btn-default dropdown-toggle">操作 <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="buttons.html#">置顶</a>
<li><a href="#">置顶</a>
</li>
<li><a href="buttons.html#" class="font-bold">修改</a>
<li><a href="#" class="font-bold">修改</a>
</li>
<li><a href="buttons.html#">禁用</a>
<li><a href="#">禁用</a>
</li>
<li class="divider"></li>
<li><a href="buttons.html#">删除</a>
<li><a href="#">删除</a>
</li>
</ul>
</div>
@@ -288,14 +288,14 @@
<button data-toggle="dropdown" class="btn btn-primary btn-sm dropdown-toggle">操作 <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="buttons.html#">置顶</a>
<li><a href="#">置顶</a>
</li>
<li><a href="buttons.html#" class="font-bold">修改</a>
<li><a href="#" class="font-bold">修改</a>
</li>
<li><a href="buttons.html#">禁用</a>
<li><a href="#">禁用</a>
</li>
<li class="divider"></li>
<li><a href="buttons.html#">删除</a>
<li><a href="#">删除</a>
</li>
</ul>
</div>
@@ -303,14 +303,14 @@
<button data-toggle="dropdown" class="btn btn-warning btn-sm dropdown-toggle">操作 <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="buttons.html#">置顶</a>
<li><a href="#">置顶</a>
</li>
<li><a href="buttons.html#" class="font-bold">修改</a>
<li><a href="#" class="font-bold">修改</a>
</li>
<li><a href="buttons.html#">禁用</a>
<li><a href="#">禁用</a>
</li>
<li class="divider"></li>
<li><a href="buttons.html#">删除</a>
<li><a href="#">删除</a>
</li>
</ul>
</div>
@@ -318,14 +318,14 @@
<button data-toggle="dropdown" class="btn btn-default btn-sm dropdown-toggle">操作 <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="buttons.html#">置顶</a>
<li><a href="#">置顶</a>
</li>
<li><a href="buttons.html#" class="font-bold">修改</a>
<li><a href="#" class="font-bold">修改</a>
</li>
<li><a href="buttons.html#">禁用</a>
<li><a href="#">禁用</a>
</li>
<li class="divider"></li>
<li><a href="buttons.html#">删除</a>
<li><a href="#">删除</a>
</li>
</ul>
</div>
@@ -334,14 +334,14 @@
<button data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">操作 <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="buttons.html#">置顶</a>
<li><a href="#">置顶</a>
</li>
<li><a href="buttons.html#" class="font-bold">修改</a>
<li><a href="#" class="font-bold">修改</a>
</li>
<li><a href="buttons.html#">禁用</a>
<li><a href="#">禁用</a>
</li>
<li class="divider"></li>
<li><a href="buttons.html#">删除</a>
<li><a href="#">删除</a>
</li>
</ul>
</div>
@@ -349,14 +349,14 @@
<button data-toggle="dropdown" class="btn btn-warning btn-xs dropdown-toggle">操作 <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="buttons.html#">置顶</a>
<li><a href="#">置顶</a>
</li>
<li><a href="buttons.html#" class="font-bold">修改</a>
<li><a href="#" class="font-bold">修改</a>
</li>
<li><a href="buttons.html#">禁用</a>
<li><a href="#">禁用</a>
</li>
<li class="divider"></li>
<li><a href="buttons.html#">删除</a>
<li><a href="#">删除</a>
</li>
</ul>
</div>
@@ -364,14 +364,14 @@
<button data-toggle="dropdown" class="btn btn-default btn-xs dropdown-toggle">操作 <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="buttons.html#">置顶</a>
<li><a href="#">置顶</a>
</li>
<li><a href="buttons.html#" class="font-bold">修改</a>
<li><a href="#" class="font-bold">修改</a>
</li>
<li><a href="buttons.html#">禁用</a>
<li><a href="#">禁用</a>
</li>
<li class="divider"></li>
<li><a href="buttons.html#">删除</a>
<li><a href="#">删除</a>
</li>
</ul>
</div>
@@ -386,13 +386,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="buttons.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="buttons.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -431,13 +431,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="buttons.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="buttons.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -513,13 +513,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="buttons.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="buttons.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -576,13 +576,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="buttons.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="buttons.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -597,16 +597,16 @@
<h3 class="font-bold">按钮组</h3>
<p>
<a class="btn btn-default btn-rounded" href="buttons.html#">默认</a>
<a class="btn btn-primary btn-rounded" href="buttons.html#">主要</a>
<a class="btn btn-success btn-rounded" href="buttons.html#">成果</a>
<a class="btn btn-info btn-rounded" href="buttons.html#">信息</a>
<a class="btn btn-warning btn-rounded" href="buttons.html#">警告</a>
<a class="btn btn-danger btn-rounded" href="buttons.html#">危险</a>
<a class="btn btn-danger btn-rounded btn-outline" href="buttons.html#">危险</a>
<a class="btn btn-default btn-rounded" href="#">默认</a>
<a class="btn btn-primary btn-rounded" href="#">主要</a>
<a class="btn btn-success btn-rounded" href="#">成果</a>
<a class="btn btn-info btn-rounded" href="#">信息</a>
<a class="btn btn-warning btn-rounded" href="#">警告</a>
<a class="btn btn-danger btn-rounded" href="#">危险</a>
<a class="btn btn-danger btn-rounded btn-outline" href="#">危险</a>
<br/>
<br/>
<a class="btn btn-primary btn-rounded btn-block" href="buttons.html#"><i class="fa fa-info-circle"></i> 圆角块级带图标按钮</a>
<a class="btn btn-primary btn-rounded btn-block" href="#"><i class="fa fa-info-circle"></i> 圆角块级带图标按钮</a>
</p>
</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>
@@ -0,0 +1,161 @@
<!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-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>多级联动下拉<small>https://github.com/ciaoca/cxSelect</small></h5>
</div>
<div class="ibox-content">
<p>简单联动示例。</p>
<div id="element" class="row">
<div class="col-sm-2">
<select class="type form-control m-b" data-first-title="请选择">
<option value="">请选择</option>
</select>
</div>
<div class="col-sm-2">
<select class="router form-control m-b" data-first-title="请选择">
<option value="">请选择</option>
</select>
</div>
</div>
<hr>
<p>国内省市区联动。</p>
<div id="element1" class="row">
<div class="col-sm-2">
<select class="province form-control m-b" data-first-title="选择省">
<option value="">请选择</option>
<option value="广东省" selected>广东省</option>
</select>
</div>
<div class="col-sm-2">
<select class="city form-control m-b" data-first-title="选择市">
<option value="">请选择</option>
<option value="深圳市" selected>深圳市</option>
</select>
</div>
<div class="col-sm-2">
<select class="area form-control m-b" data-first-title="选择地区">
<option value="">请选择</option>
<option value="南山区" selected>南山区</option>
</select>
</div>
</div>
<hr>
<p>自定义选项。</p>
<div id="element2" class="row">
<div class="col-sm-2">
<select class="first form-control m-b"></select>
</div>
<div class="col-sm-2">
<select class="second form-control m-b"></select>
</div>
<div class="col-sm-2">
<select class="third form-control m-b"></select>
</div>
<div class="col-sm-2">
<select class="fourth form-control m-b"></select>
</div>
<div class="col-sm-2">
<select class="fifth form-control m-b"></select>
</div>
</div>
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jquery-cxselect" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jquery-cxselect</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: jquery-cxselect-js" />
<script th:inline="javascript">
// 直接返回获取
var data = [[${data}]];
$('#element').cxSelect({
selects: ['type', 'router'],
jsonValue: 'v',
data: data
});
// 通过默认url获取
var urlChina = 'cityData';
$.cxSelect.defaults.url = urlChina;
$('#element1').cxSelect({
selects: ['province', 'city', 'area'],
nodata: 'none'
});
// 固定值获取
$('#element2').cxSelect({
selects: ['first', 'second', 'third', 'fourth', 'fifth'],
required: true,
jsonValue: 'v',
data: [
{'v': '1', 'n': '第一级 >', 's': [
{'v': '2', 'n': '第二级 >', 's': [
{'v': '3', 'n': '第三级 >', 's': [
{'v': '4', 'n': '第四级 >', 's': [
{'v': '5', 'n': '第五级 >', 's': [
{'v': '6', 'n': '第六级 >'}
]}
]}
]}
]}
]},
{'v': 'test number', 'n': '测试数字', 's': [
{'v': 'text', 'n': '文本类型', 's': [
{'v': '4', 'n': '4'},
{'v': '5', 'n': '5'},
{'v': '6', 'n': '6'},
{'v': '7', 'n': '7'},
{'v': '8', 'n': '8'},
{'v': '9', 'n': '9'},
{'v': '10', 'n': '10'}
]},
{'v': 'number', 'n': '数值类型', 's': [
{'v': 11, 'n': 11},
{'v': 12, 'n': 12},
{'v': 13, 'n': 13},
{'v': 14, 'n': 14},
{'v': 15, 'n': 15},
{'v': 16, 'n': 16},
{'v': 17, 'n': 17}
]}
]},
{'v': 'test boolean','n': '测试 Boolean 类型', 's': [
{'v': true ,'n': true},
{'v': false ,'n': false}
]},
{v: 'test quotes', n: '测试属性不加引号', s: [
{v: 'quotes', n: '引号'}
]},
{v: 'test other', n: '测试奇怪的值', s: [
{v: '[]', n: '数组(空)'},
{v: [1,2,3], n: '数组(数值)'},
{v: ['a','b','c'], n: '数组(文字)'},
{v: new Date(), n: '日期'},
{v: new RegExp('\\d+'), n: '正则对象'},
{v: /\d+/, n: '正则直接量'},
{v: {}, n: '对象'},
{v: document.getElementById('custom_data'), n: 'DOM'},
{v: null, n: 'Null'},
{n: '未设置 value'}
]},
{'v': '' , 'n': '无子级'}
]
});
</script>
</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>
@@ -14,13 +14,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="grid_options.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="grid_options.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -124,13 +124,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="grid_options.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="grid_options.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -183,13 +183,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="grid_options.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="grid_options.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -227,13 +227,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="grid_options.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="grid_options.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -270,13 +270,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="grid_options.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="grid_options.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -285,7 +285,7 @@
</div>
</div>
<div class="ibox-content">
<p>在等宽的4网格中,网格不等高会碰到问题,为了解决这个问题,可使用<code>.clearfix</code><a href="grid_options.html#responsive-utilities">响应实用工具类</a>
<p>在等宽的4网格中,网格不等高会碰到问题,为了解决这个问题,可使用<code>.clearfix</code><a href="#responsive-utilities">响应实用工具类</a>
</p>
<div class="row show-grid">
<div class="col-xs-6 col-sm-3">
@@ -315,13 +315,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="grid_options.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="grid_options.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -358,13 +358,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="grid_options.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="grid_options.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -401,13 +401,13 @@
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="grid_options.html#">选项1</a>
<li><a href="#">选项1</a>
</li>
<li><a href="grid_options.html#">选项2</a>
<li><a href="#">选项2</a>
</li>
</ul>
<a class="close-link">
@@ -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>

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