添加checkbox选择处理配置功能,
添加checkbox全部选择处理配置功能 字典级别配置参数写入配置文件,超过配置级别将不能添加;
This commit is contained in:
@@ -21,6 +21,7 @@ import com.google.common.collect.Lists;
|
|||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
import com.nis.domain.basics.ServiceDictInfo;
|
import com.nis.domain.basics.ServiceDictInfo;
|
||||||
|
import com.nis.util.Configurations;
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.util.StringUtils;
|
import com.nis.util.StringUtils;
|
||||||
import com.nis.web.controller.BaseController;
|
import com.nis.web.controller.BaseController;
|
||||||
@@ -437,17 +438,19 @@ public class ServiceDictInfoController extends BaseController {
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping(value = "isLevelTotalSure")
|
@RequestMapping(value = "isLevelTotalSure")
|
||||||
public boolean isLevelTotalSure(Integer parentId,Integer currentId) {
|
public boolean isLevelTotalSure(Integer parentId,Integer currentId) {
|
||||||
|
//获取层级配置
|
||||||
|
int max = Integer.valueOf(Configurations.getIntProperty("maxLevelNo", 4));
|
||||||
if(parentId==-1||parentId==0){
|
if(parentId==-1||parentId==0){
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
ServiceDictInfo p = serviceDictInfoService.getDictById(parentId);
|
ServiceDictInfo p = serviceDictInfoService.getDictById(parentId);
|
||||||
if(currentId==null){
|
if(currentId==null){
|
||||||
if(p.getLevelNo()<4){
|
if(p.getLevelNo()<max){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
ServiceDictInfo c = serviceDictInfoService.getDictById(currentId);
|
ServiceDictInfo c = serviceDictInfoService.getDictById(currentId);
|
||||||
if((p.getLevelNo()+c.getLevelNo())<5){
|
if((p.getLevelNo()+c.getLevelNo())<(max+1)){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import com.google.common.collect.Lists;
|
|||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
import com.nis.domain.basics.SysDictInfo;
|
import com.nis.domain.basics.SysDictInfo;
|
||||||
|
import com.nis.util.Configurations;
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.util.StringUtils;
|
import com.nis.util.StringUtils;
|
||||||
import com.nis.web.controller.BaseController;
|
import com.nis.web.controller.BaseController;
|
||||||
@@ -454,17 +455,19 @@ public class SysDictInfoController extends BaseController {
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping(value = "isLevelTotalSure")
|
@RequestMapping(value = "isLevelTotalSure")
|
||||||
public boolean isLevelTotalSure(Integer parentId,Integer currentId) {
|
public boolean isLevelTotalSure(Integer parentId,Integer currentId) {
|
||||||
|
//获取层级配置
|
||||||
|
int max = Integer.valueOf(Configurations.getIntProperty("maxLevelNo", 4));
|
||||||
if(parentId==-1||parentId==0){
|
if(parentId==-1||parentId==0){
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
SysDictInfo p = sysDictInfoService.getDictById(parentId);
|
SysDictInfo p = sysDictInfoService.getDictById(parentId);
|
||||||
if(currentId==null){
|
if(currentId==null){
|
||||||
if(p.getLevelNo()<4){
|
if(p.getLevelNo()<max){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
SysDictInfo c = sysDictInfoService.getDictById(currentId);
|
SysDictInfo c = sysDictInfoService.getDictById(currentId);
|
||||||
if((p.getLevelNo()+c.getLevelNo())<5){
|
if((p.getLevelNo()+c.getLevelNo())<(max+1)){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,3 +235,5 @@ jdbc.hive.AName=xa_dfbhit_hive
|
|||||||
jdbc.hive.BName=xa_z2_mesalog_hive
|
jdbc.hive.BName=xa_z2_mesalog_hive
|
||||||
|
|
||||||
maxPageSize=100000
|
maxPageSize=100000
|
||||||
|
|
||||||
|
maxLevelNo=4
|
||||||
@@ -27,27 +27,23 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
//层级校验
|
//层级校验
|
||||||
jQuery.validator.addMethod("isLevelNoSure",function(value,element){
|
jQuery.validator.addMethod("isLevelNoSure",function(value,element){
|
||||||
//var flagIsLevelNoSure = true;
|
var flagIsLevelNoSure = false;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
async:true,
|
async:false,
|
||||||
cache:false,
|
cache:false,
|
||||||
url:'${ctx}/basics/serviceDictInfo/isLevelTotalSure',
|
url:'${ctx}/basics/serviceDictInfo/isLevelTotalSure',
|
||||||
data:{parentId:$(".singleClass").val(),currentId:'${serviceDictInfo.serviceDictId}'},
|
data:{parentId:$(".singleClass").val(),currentId:'${serviceDictInfo.serviceDictId}'},
|
||||||
success:function(data){
|
success:function(data){
|
||||||
/* flagIsLevelNoSure=data;
|
|
||||||
alert(flagIsLevelNoSure);
|
|
||||||
return flagIsLevelNoSure; */
|
|
||||||
flagIsLevelNoSure = data;
|
flagIsLevelNoSure = data;
|
||||||
return flagIsLevelNoSure;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/* alert(flagIsLevelNoSure);
|
return flagIsLevelNoSure;
|
||||||
return flagIsLevelNoSure; */
|
|
||||||
|
|
||||||
},"选择此配置上下层级数将超过四级");
|
},"选择此配置上下层级数将超过最大层级");
|
||||||
|
|
||||||
//类型选择与上级是否冲突
|
//类型选择与上级是否冲突
|
||||||
jQuery.validator.addMethod("typeSame",function(value,element){
|
jQuery.validator.addMethod("typeSame",function(value,element){
|
||||||
@@ -113,10 +109,9 @@
|
|||||||
//ignore:[],
|
//ignore:[],
|
||||||
//需验证 item_code item_value
|
//需验证 item_code item_value
|
||||||
rules: {
|
rules: {
|
||||||
/* 'jafrkwajrow':{
|
'parent.itemValue':{
|
||||||
isLevelNoSure:true
|
isLevelNoSure:true
|
||||||
//remote:'${ctx}/basics/serviceDictInfo/isLevelTotalSure?parentId='+$(".singleClass").val()+'¤tId=${serviceDictInfo.serviceDictId}'
|
},
|
||||||
}, */
|
|
||||||
|
|
||||||
'itemCode':{
|
'itemCode':{
|
||||||
//isLevelNoSure:true,
|
//isLevelNoSure:true,
|
||||||
@@ -137,10 +132,9 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
messages: {
|
messages: {
|
||||||
/* 'jafrkwajrow':{
|
'parent.itemValue':{
|
||||||
//remote:"选择此配置上下层级数将超过四级"
|
isLevelNoSure:"选择此配置上下层级数将超过最大层级"
|
||||||
isLevelNoSure:"选择此配置上下层级数将超过四级"
|
},
|
||||||
}, */
|
|
||||||
'itemCode':{
|
'itemCode':{
|
||||||
//isLevelNoSure:"选择此配置上下层级数将超过四级",
|
//isLevelNoSure:"选择此配置上下层级数将超过四级",
|
||||||
required:'请填写配置编码',
|
required:'请填写配置编码',
|
||||||
@@ -220,7 +214,6 @@
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<sys:treeselect id="serviceDictInfo" name="parent.serviceDictId" value="${serviceDictInfo.parent.serviceDictId}" labelName="parent.itemValue" labelValue="${serviceDictInfo.parent.itemValue eq '根节点'?'根节点':fns:getServiceDictInfoById(serviceDictInfo.parent.serviceDictId).itemValue}"
|
<sys:treeselect id="serviceDictInfo" name="parent.serviceDictId" value="${serviceDictInfo.parent.serviceDictId}" labelName="parent.itemValue" labelValue="${serviceDictInfo.parent.itemValue eq '根节点'?'根节点':fns:getServiceDictInfoById(serviceDictInfo.parent.serviceDictId).itemValue}"
|
||||||
title="菜单" url="/basics/serviceDictInfo/treeData?itType=${itType}" extId="${serviceDictInfo.serviceDictId}" cssClass="required form-control"/>
|
title="菜单" url="/basics/serviceDictInfo/treeData?itType=${itType}" extId="${serviceDictInfo.serviceDictId}" cssClass="required form-control"/>
|
||||||
<input style="width:50px;height:20px;" name="jafrkwajrow" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -44,12 +44,12 @@
|
|||||||
<input value="${serviceDictInfo.parent.serviceDictId == 0?'根节点':fns:getServiceDictInfoById(serviceDictInfo.parent.serviceDictId).itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
|
<input value="${serviceDictInfo.parent.serviceDictId == 0?'根节点':fns:getServiceDictInfoById(serviceDictInfo.parent.serviceDictId).itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<%-- <div class="form-group">
|
||||||
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> 配置ID:</label>
|
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> 配置ID:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<input value="${serviceDictInfo.serviceDictId}" maxlength="50" class="form-control" readonly="readonly"/>
|
<input value="${serviceDictInfo.serviceDictId}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> --%>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> <spring:message code="item_type"/>:</label>
|
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> <spring:message code="item_type"/>:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="is_leaf"/>:</label>
|
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="is_leaf"/>:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<input value="${fns:getDictLabel('SYS_YES_NO',serviceDictInfo.isValid,'0')}" maxlength="50" class="form-control" readonly="readonly"/>
|
<input value="${fns:getDictLabel('SYS_YES_NO',serviceDictInfo.isLeaf,'0')}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%-- <div class="form-group">
|
<%-- <div class="form-group">
|
||||||
|
|||||||
@@ -11,6 +11,28 @@
|
|||||||
function reset(){
|
function reset(){
|
||||||
$("#searchForm").reset();
|
$("#searchForm").reset();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
处理全选、全取消
|
||||||
|
**/
|
||||||
|
function selectAll(){
|
||||||
|
//alert($("#selAll").prop("checked"));
|
||||||
|
if($("#selAll").prop("checked")){
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").attr("checked","checked");
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").each(function(){
|
||||||
|
$("input[name='check']:checkbox").each(function(){
|
||||||
|
$(this).prop("checked",true);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").attr("checked",false);
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").each(function(){
|
||||||
|
$("input[name='check']:checkbox").each(function(){
|
||||||
|
//$(this).attr("checked",false);
|
||||||
|
$(this).removeProp("checked");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
系统通用方法,根据参数来决定处理的url和参数
|
系统通用方法,根据参数来决定处理的url和参数
|
||||||
*/
|
*/
|
||||||
@@ -51,7 +73,7 @@
|
|||||||
|
|
||||||
$("#seltype").find("option[value=${searchType==null?11:searchType}]").attr("selected",true);
|
$("#seltype").find("option[value=${searchType==null?11:searchType}]").attr("selected",true);
|
||||||
$("#intype").attr("name",$("#seltype").find("option:selected").val());
|
$("#intype").attr("name",$("#seltype").find("option:selected").val());
|
||||||
$("#intype").val(${searchContent});
|
$("#intype").val('${searchContent}');
|
||||||
|
|
||||||
|
|
||||||
//筛选功能初始化
|
//筛选功能初始化
|
||||||
@@ -228,7 +250,7 @@
|
|||||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><input type="checkbox" class="ckboxs"></th>
|
<th><input type="checkbox" class="ckboxs" id="selAll" onclick="selectAll()"></th>
|
||||||
<th>序号</th>
|
<th>序号</th>
|
||||||
<th><spring:message code="item_code"/></th>
|
<th><spring:message code="item_code"/></th>
|
||||||
<th><spring:message code="config_content"/></th>
|
<th><spring:message code="config_content"/></th>
|
||||||
|
|||||||
@@ -11,6 +11,28 @@
|
|||||||
function reset(){
|
function reset(){
|
||||||
$("#searchForm").reset();
|
$("#searchForm").reset();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
处理全选、全取消
|
||||||
|
**/
|
||||||
|
function selectAll(){
|
||||||
|
//alert($("#selAll").prop("checked"));
|
||||||
|
if($("#selAll").prop("checked")){
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").attr("checked","checked");
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").each(function(){
|
||||||
|
$("input[name='check']:checkbox").each(function(){
|
||||||
|
$(this).prop("checked",true);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").attr("checked",false);
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").each(function(){
|
||||||
|
$("input[name='check']:checkbox").each(function(){
|
||||||
|
//$(this).attr("checked",false);
|
||||||
|
$(this).removeProp("checked");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
系统通用方法,根据参数来决定处理的url和参数
|
系统通用方法,根据参数来决定处理的url和参数
|
||||||
*/
|
*/
|
||||||
@@ -51,9 +73,9 @@
|
|||||||
//$("#showTotalCount").text();
|
//$("#showTotalCount").text();
|
||||||
//设定selected,设定name 设定value
|
//设定selected,设定name 设定value
|
||||||
|
|
||||||
$("#seltype").find("option[value='"+${searchType==null?"11":searchType}+"']").attr("selected",true);
|
$("#seltype").find("option[value='${searchType==null?11:searchType}']").attr("selected",true);
|
||||||
$("#intype").attr("name",$("#seltype").find("option:selected").val());
|
$("#intype").attr("name",$("#seltype").find("option:selected").val());
|
||||||
$("#intype").val(${serviceDictInfo.itemValue});
|
$("#intype").val('${searchContent}');
|
||||||
|
|
||||||
|
|
||||||
//筛选功能初始化
|
//筛选功能初始化
|
||||||
@@ -230,7 +252,7 @@
|
|||||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><input type="checkbox" class="ckboxs"></th>
|
<th><input type="checkbox" class="ckboxs" id="selAll" onclick="selectAll()"></th>
|
||||||
<th>序号</th>
|
<th>序号</th>
|
||||||
<th><spring:message code="item_code"/></th>
|
<th><spring:message code="item_code"/></th>
|
||||||
<th><spring:message code="config_content"/></th>
|
<th><spring:message code="config_content"/></th>
|
||||||
|
|||||||
@@ -38,6 +38,21 @@
|
|||||||
});
|
});
|
||||||
return flag;
|
return flag;
|
||||||
},"请选择正确的数据类型");
|
},"请选择正确的数据类型");
|
||||||
|
//选择此配置上下层级数将超过四级
|
||||||
|
jQuery.validator.addMethod("isLevelNoSure",function(value,element){
|
||||||
|
var flag=false;
|
||||||
|
$.ajax({
|
||||||
|
type:'post',
|
||||||
|
async:false,
|
||||||
|
url:'${ctx}/basics/sysDictInfo/isLevelTotalSure',
|
||||||
|
data:{parentId:$(".singleClass").val(),currentId:'${sysDictInfo.sysDictId}'},
|
||||||
|
success:function(data){
|
||||||
|
flag=data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return flag;
|
||||||
|
},"选择此配置上下层级数将超过最大层级");
|
||||||
|
|
||||||
//校验更改数据类型后校验数据类型是否与下级冲突
|
//校验更改数据类型后校验数据类型是否与下级冲突
|
||||||
jQuery.validator.addMethod("typeChild",function(value,element){
|
jQuery.validator.addMethod("typeChild",function(value,element){
|
||||||
var flag=false;
|
var flag=false;
|
||||||
@@ -88,6 +103,9 @@
|
|||||||
$("#inputForm").validate({
|
$("#inputForm").validate({
|
||||||
//需验证 item_code item_value
|
//需验证 item_code item_value
|
||||||
rules: {
|
rules: {
|
||||||
|
'parent.itemValue':{
|
||||||
|
isLevelNoSure:true
|
||||||
|
},
|
||||||
'itemCode':{
|
'itemCode':{
|
||||||
required:true,
|
required:true,
|
||||||
remote:'${ctx}/basics/sysDictInfo/isItemCodeRepeat?oldItemCode=${sysDictInfo.itemCode}'
|
remote:'${ctx}/basics/sysDictInfo/isItemCodeRepeat?oldItemCode=${sysDictInfo.itemCode}'
|
||||||
@@ -106,6 +124,9 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
messages: {
|
messages: {
|
||||||
|
'parent.itemValue':{
|
||||||
|
isLevelNoSure:"选择此配置上下层级数将超过最大层级"
|
||||||
|
},
|
||||||
'itemCode':{
|
'itemCode':{
|
||||||
required:'请填写配置编码',
|
required:'请填写配置编码',
|
||||||
remote:'该配置编码已存在'
|
remote:'该配置编码已存在'
|
||||||
|
|||||||
@@ -44,12 +44,12 @@
|
|||||||
<input value="${sysDictInfo.parent.sysDictId == 0?'根节点':fns:getSysDictInfoById(sysDictInfo.parent.sysDictId).itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
|
<input value="${sysDictInfo.parent.sysDictId == 0?'根节点':fns:getSysDictInfoById(sysDictInfo.parent.sysDictId).itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<%-- <div class="form-group">
|
||||||
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> 配置ID:</label>
|
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> 配置ID:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<input value="${sysDictInfo.sysDictId}" maxlength="50" class="form-control" readonly="readonly"/>
|
<input value="${sysDictInfo.sysDictId}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> --%>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> <spring:message code="item_type"/>:</label>
|
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> <spring:message code="item_type"/>:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="is_leaf"/>:</label>
|
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="is_leaf"/>:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<input value="${fns:getDictLabel('SYS_YES_NO',sysDictInfo.isValid,'0')}" maxlength="50" class="form-control" readonly="readonly"/>
|
<input value="${fns:getDictLabel('SYS_YES_NO',sysDictInfo.isLeaf,'0')}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%-- <div class="form-group">
|
<%-- <div class="form-group">
|
||||||
|
|||||||
@@ -11,6 +11,28 @@
|
|||||||
function reset(){
|
function reset(){
|
||||||
$("#searchForm").reset();
|
$("#searchForm").reset();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
处理全选、全取消
|
||||||
|
**/
|
||||||
|
function selectAll(){
|
||||||
|
//alert($("#selAll").prop("checked"));
|
||||||
|
if($("#selAll").prop("checked")){
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").attr("checked","checked");
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").each(function(){
|
||||||
|
$("input[name='check']:checkbox").each(function(){
|
||||||
|
$(this).prop("checked",true);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").attr("checked",false);
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").each(function(){
|
||||||
|
$("input[name='check']:checkbox").each(function(){
|
||||||
|
//$(this).attr("checked",false);
|
||||||
|
$(this).removeProp("checked");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
系统通用方法,根据参数来决定处理的url和参数
|
系统通用方法,根据参数来决定处理的url和参数
|
||||||
*/
|
*/
|
||||||
@@ -31,7 +53,7 @@
|
|||||||
|
|
||||||
//查询
|
//查询
|
||||||
function page(n,s){
|
function page(n,s){
|
||||||
$("#intype").attr("name",$("#seltype").val());
|
//$("#intype").attr("name",$("#seltype").val());
|
||||||
$("#pageNo").val(n);
|
$("#pageNo").val(n);
|
||||||
$("#pageSize").val(s);
|
$("#pageSize").val(s);
|
||||||
$("#searchForm").attr("action","${ctx}/basics/sysDictInfo/searchList?itType=${itType}");
|
$("#searchForm").attr("action","${ctx}/basics/sysDictInfo/searchList?itType=${itType}");
|
||||||
@@ -39,7 +61,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
function page2(n,s){
|
function page2(n,s){
|
||||||
$("#intype").attr("name",$("#seltype").val());
|
//$("#intype").attr("name",$("#seltype").val());
|
||||||
$("#pageNo").val(n);
|
$("#pageNo").val(n);
|
||||||
$("#pageSize").val(s);
|
$("#pageSize").val(s);
|
||||||
$("#searchForm").attr("action","${ctx}/basics/sysDictInfo/searchList?itType=${itType}");
|
$("#searchForm").attr("action","${ctx}/basics/sysDictInfo/searchList?itType=${itType}");
|
||||||
@@ -51,9 +73,9 @@
|
|||||||
//$("#showTotalCount").text();
|
//$("#showTotalCount").text();
|
||||||
//设定selected,设定name 设定value
|
//设定selected,设定name 设定value
|
||||||
|
|
||||||
$("#seltype").find("option[value='"+${searchType==null?"11":searchType}+"']").attr("selected",true);
|
$("#seltype").find("option[value=${searchType==null?11:searchType}]").attr("selected",true);
|
||||||
$("#intype").attr("name",$("#seltype").find("option:selected").val());
|
$("#intype").attr("name",$("#seltype").find("option:selected").val());
|
||||||
$("#intype").val(${sysDictInfo.itemValue});
|
$("#intype").val('${searchContent}');
|
||||||
|
|
||||||
|
|
||||||
//筛选功能初始化
|
//筛选功能初始化
|
||||||
@@ -228,7 +250,7 @@
|
|||||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><input type="checkbox" class="ckboxs"></th>
|
<th><input type="checkbox" class="ckboxs" id="selAll" onclick="selectAll()"></th>
|
||||||
<th>序号</th>
|
<th>序号</th>
|
||||||
<th><spring:message code="item_code"/></th>
|
<th><spring:message code="item_code"/></th>
|
||||||
<th><spring:message code="config_content"/></th>
|
<th><spring:message code="config_content"/></th>
|
||||||
|
|||||||
@@ -11,6 +11,32 @@
|
|||||||
function reset(){
|
function reset(){
|
||||||
$("#searchForm").reset();
|
$("#searchForm").reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
处理全选、全取消
|
||||||
|
**/
|
||||||
|
function selectAll(){
|
||||||
|
//alert($("#selAll").prop("checked"));
|
||||||
|
if($("#selAll").prop("checked")){
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").attr("checked","checked");
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").each(function(){
|
||||||
|
$("input[name='check']:checkbox").each(function(){
|
||||||
|
$(this).prop("checked",true);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").attr("checked",false);
|
||||||
|
//$("#treeTable").find(":checkbox[name='check']").each(function(){
|
||||||
|
$("input[name='check']:checkbox").each(function(){
|
||||||
|
//$(this).attr("checked",false);
|
||||||
|
$(this).removeProp("checked");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
系统通用方法,根据参数来决定处理的url和参数
|
系统通用方法,根据参数来决定处理的url和参数
|
||||||
*/
|
*/
|
||||||
@@ -51,9 +77,9 @@
|
|||||||
//$("#showTotalCount").text();
|
//$("#showTotalCount").text();
|
||||||
//设定selected,设定name 设定value
|
//设定selected,设定name 设定value
|
||||||
|
|
||||||
$("#seltype").find("option[value='"+${searchType==null?"11":searchType}+"']").attr("selected",true);
|
$("#seltype").find("option[value='${searchType==null?11:searchType}']").attr("selected",true);
|
||||||
$("#intype").attr("name",$("#seltype").find("option:selected").val());
|
$("#intype").attr("name",$("#seltype").find("option:selected").val());
|
||||||
$("#intype").val(${sysDictInfo.itemValue});
|
$("#intype").val('${sysDictInfo.itemValue}');
|
||||||
|
|
||||||
|
|
||||||
//筛选功能初始化
|
//筛选功能初始化
|
||||||
@@ -69,6 +95,7 @@
|
|||||||
$("#intype").attr("name",$(this).find("option:selected").val());
|
$("#intype").attr("name",$(this).find("option:selected").val());
|
||||||
});
|
});
|
||||||
$("#treeTable").treeTable({expandLevel : 3}).show();
|
$("#treeTable").treeTable({expandLevel : 3}).show();
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@@ -228,7 +255,7 @@
|
|||||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><input type="checkbox" class="ckboxs"></th>
|
<th><input type="checkbox" id="selAll" class="ckboxs" onclick="selectAll()"></th>
|
||||||
<th>序号</th>
|
<th>序号</th>
|
||||||
<th><spring:message code="item_code"/></th>
|
<th><spring:message code="item_code"/></th>
|
||||||
<th><spring:message code="config_content"/></th>
|
<th><spring:message code="config_content"/></th>
|
||||||
|
|||||||
Reference in New Issue
Block a user