From 9ce273c3592335390b41d2262d17ecf5d9f60c17 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 3 Jun 2019 22:17:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8F=9C=E5=8D=95=E5=8F=8A?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E6=8E=92=E5=BA=8F=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ajax/libs/bootstrap-treetable/bootstrap-treetable.js | 4 ++-- .../static/ajax/libs/validate/jquery.validate.extend.js | 6 ++++++ .../src/main/resources/mapper/system/SysDeptMapper.xml | 2 +- .../src/main/resources/mapper/system/SysMenuMapper.xml | 8 ++++---- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js index 35e96331b..3bb3221e9 100644 --- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js @@ -233,13 +233,13 @@ } // 缓存并格式化数据 var formatData = function(data) { - var _root = options.rootIdValue ? options.rootIdValue : null + var _root = options.rootIdValue ? options.rootIdValue : null; + var firstCode = data[0][options.parentCode]; $.each(data, function(index, item) { // 添加一个默认属性,用来判断当前节点有没有被显示 item.isShow = false; // 这里兼容几种常见Root节点写法 // 默认的几种判断 - var firstCode = (0 == index ? item[options.parentCode] : '-'); var _defaultRootFlag = item[options.parentCode] == '0' || item[options.parentCode] == 0 || item[options.parentCode] == null || diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/validate/jquery.validate.extend.js b/ruoyi-admin/src/main/resources/static/ajax/libs/validate/jquery.validate.extend.js index 0dcca0f86..50cfa9dfd 100644 --- a/ruoyi-admin/src/main/resources/static/ajax/libs/validate/jquery.validate.extend.js +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/validate/jquery.validate.extend.js @@ -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(); diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml index b026331a3..02a1017c5 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -49,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ${params.dataScope} - order by d.order_num + order by d.parent_id, d.order_num