html和js语法编写不同的占位符,减少IDE标红提示
This commit is contained in:
@@ -120,7 +120,7 @@
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
//# // 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
// 设置数据表格列
|
||||
@@ -131,7 +131,7 @@ $('#dataGrid').dataGrid({
|
||||
{header:'多行文本', name:'testTextarea', width:150, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}, unformat: function(val, obj, cell){return $('#'+obj.rowId+'_'+obj.colModel.name, cell).val();}},
|
||||
{header:'下拉框', name:'testSelect', width:100,
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.select2(element).on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
@@ -139,7 +139,7 @@ $('#dataGrid').dataGrid({
|
||||
},
|
||||
// {header:'下拉多选', name:'testSelectMultiple', width:100,
|
||||
// editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
|
||||
// items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
// items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
|
||||
// itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
// js.select2(element).on("change",function(){$(this).resetValid()});
|
||||
// }
|
||||
@@ -240,7 +240,7 @@ $('#dataGrid').dataGrid({
|
||||
editGridInputFormListName: 'testDataChildList', // 提交的数据列表名
|
||||
editGridInputFormListAttrs: 'status,id,testSort,testData.id,testInput,testTextarea,testSelect,testSelectMultiple,testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testOffice.officeCode,testAreaCode,testAreaName,', // 提交数据列表的属性字段
|
||||
|
||||
// 加载成功后执行事件
|
||||
//# // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
//# // 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
@@ -138,16 +138,16 @@ $('#dataGrid').dataGrid({
|
||||
return val;
|
||||
}, summaryTpl: "<em>{0}</em> ", summaryType: "sum"},
|
||||
{header:'下拉框', name:'testSelect', index:'a.test_select', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '未知', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '未知', true);
|
||||
}},
|
||||
{header:'下拉多选', name:'testSelectMultiple', index:'a.test_select_multiple', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '未知', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '未知', true);
|
||||
}},
|
||||
{header:'单选框', name:'testRadio', index:'a.test_radio', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '未知', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '未知', true);
|
||||
}},
|
||||
{header:'复选框', name:'testCheckbox', index:'a.test_checkbox', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '未知', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '未知', true);
|
||||
}},
|
||||
{header:'日期选择', name:'testDate', index:'a.test_date', width:150, align:"center"},
|
||||
{header:'日期时间', name:'testDatetime', index:'a.test_datetime', width:150, align:"center"},
|
||||
@@ -156,13 +156,13 @@ $('#dataGrid').dataGrid({
|
||||
{header:'区域选择', name:'testAreaName', index:'a.test_area_code', width:150, align:"center"},
|
||||
{header:'区域名称', name:'testAreaName', index:'a.test_area_name', width:150, align:"left"},
|
||||
{header:'状态', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '未知', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_search_status')}", val, '未知', true);
|
||||
}},
|
||||
{header:'创建时间', name:'createDate', index:'a.create_date', width:150, align:"center"},
|
||||
{header:'备注信息', name:'remarks', index:'a.remarks', width:150, align:"left"},
|
||||
{header:'操作', name:'actions', width:120, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
//<% if(hasPermi('test:testData:edit')){ %>
|
||||
//# if(hasPermi('test:testData:edit')){
|
||||
actions.push('<a href="${ctx}/test/testData/form?id='+row.id+'" class="btnList" title="编辑数据"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/test/testData/disable?id='+row.id+'" class="btnList" title="停用数据" data-confirm="确认要停用该数据吗?"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
@@ -170,7 +170,7 @@ $('#dataGrid').dataGrid({
|
||||
actions.push('<a href="${ctx}/test/testData/enable?id='+row.id+'" class="btnList" title="启用数据" data-confirm="确认要启用该数据吗?"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/test/testData/delete?id='+row.id+'" class="btnList" title="删除数据" data-confirm="确认要删除该数据吗?"><i class="fa fa-trash-o"></i></a> ');
|
||||
//<% } %>
|
||||
//# }
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
@@ -204,7 +204,7 @@ $('#dataGrid').dataGrid({
|
||||
},
|
||||
// ================ 分组,小计 END ==============
|
||||
|
||||
// 加载成功后执行事件
|
||||
//# // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
// 分组和冻结列情况下的合并单元格测试
|
||||
|
||||
@@ -50,14 +50,14 @@
|
||||
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化布局
|
||||
//# // 初始化布局
|
||||
$('body').layout({
|
||||
north__size: 300,
|
||||
onresize: function(){
|
||||
$(window).resize();
|
||||
}
|
||||
});
|
||||
// 初始化DataGrid对象
|
||||
//# // 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
dataGridPage: $('#dataGridPage'),
|
||||
@@ -69,24 +69,24 @@ $('#dataGrid').dataGrid({
|
||||
{header:'${text("岗位代码")}', name:'postCode', index:'a.post_code', width:200, align:"center"},
|
||||
{header:'${text("排序号")}', name:'postSort', index:'a.post_sort', width:80, align:"center"},
|
||||
{header:'${text("岗位分类")}', name:'postType', index:'a.post_type', width:100, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_post_type')}, val, '未知', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_post_type')}", val, '未知', true);
|
||||
}},
|
||||
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
|
||||
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:200, align:"left"},
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true);
|
||||
}}
|
||||
],
|
||||
onSelectRow: function(id, isSelect, event){
|
||||
$('#postCode').val(id);
|
||||
$('#dataGrid2').dataGrid('refresh');
|
||||
},
|
||||
// 加载成功后执行事件
|
||||
//# // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
// 初始化DataGrid对象
|
||||
//# // 初始化DataGrid对象
|
||||
$('#dataGrid2').dataGrid({
|
||||
searchForm: $("#searchForm2"),
|
||||
dataGridPage: $('#dataGrid2Page'),
|
||||
@@ -104,10 +104,10 @@ $('#dataGrid2').dataGrid({
|
||||
{header:'${text("办公电话")}', name:'phone', index:'a.phone', width:200, align:"center"},
|
||||
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_status')}", val, '未知', true);
|
||||
}}
|
||||
],
|
||||
// 加载成功后执行事件
|
||||
//# // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ function formatter(val, obj, row, act) {
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化DataGrid对象
|
||||
//# // 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
data: dataGridData.data,
|
||||
@@ -133,7 +133,7 @@ $('#dataGrid').dataGrid({
|
||||
},
|
||||
showRownum: true, // 是否显示行号,默认true
|
||||
showFooter: true, // 是否显示底部合计行,数据载入详见 ajaxSuccess
|
||||
// 加载成功后执行事件
|
||||
//# // 加载成功后执行事件
|
||||
ajaxSuccess: function (data) {
|
||||
$('#dataGrid').dataGrid('mergeCell', 'parentArea,childArea');
|
||||
$('#dataGrid').dataGrid("footerData", "set", {
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<% layout('/layouts/default.html', {title: '组件应用实例', libs: ['validate','fileupload','ueditor','dataGrid','inputmask']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header with-border">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-notebook"></i> 组件应用实例
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<#form:form id="inputForm" model="${testData}" action="${ctx}/test/testData/save" method="post" class="form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">基本信息</div>
|
||||
<% layout('/layouts/default.html', {title: '组件应用实例', libs: ['validate','fileupload','ueditor','dataGrid','inputmask']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header with-border">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-notebook"></i> 组件应用实例
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<#form:form id="inputForm" model="${testData}" action="${ctx}/test/testData/save" method="post" class="form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">基本信息</div>
|
||||
<#form:hidden path="id"/>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
@@ -96,36 +96,36 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 金额格式:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-fw fa-rmb"></i></span>
|
||||
<#form:input path="testInput_money" maxlength="200" class="form-control inputmask"
|
||||
data-inputmask-alias="money" data-inputmask="'digits':'2'"/>
|
||||
<span class="input-group-addon">(千分位,右对齐,保留2位小数)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 电子邮箱:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-fw fa-envelope"></i></span>
|
||||
<#form:input path="testInput_regex" maxlength="200" class="form-control inputmask"
|
||||
data-inputmask-regex="[a-zA-Z0-9._%-]+@[a-zA-Z0-9-]+\\.[a-zA-Z]{2,4}"/>
|
||||
<span class="input-group-addon">(正则表达式)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 金额格式:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-fw fa-rmb"></i></span>
|
||||
<#form:input path="testInput_money" maxlength="200" class="form-control inputmask"
|
||||
data-inputmask-alias="money" data-inputmask="'digits':'2'"/>
|
||||
<span class="input-group-addon">(千分位,右对齐,保留2位小数)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 电子邮箱:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-fw fa-envelope"></i></span>
|
||||
<#form:input path="testInput_regex" maxlength="200" class="form-control inputmask"
|
||||
data-inputmask-regex="[a-zA-Z0-9._%-]+@[a-zA-Z0-9-]+\\.[a-zA-Z]{2,4}"/>
|
||||
<span class="input-group-addon">(正则表达式)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
@@ -139,56 +139,56 @@
|
||||
class="" allowClear="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 用户多选:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:treeselect id="testUser2" title="用户选择"
|
||||
path="testUser.userCode" labelPath="testUser.userName"
|
||||
url="${ctx}/sys/office/treeData?isLoadUser=true"
|
||||
class="" allowClear="true" checkbox="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 用户列表选择:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:listselect id="testUser3" title="用户选择"
|
||||
url="${ctx}/sys/empUser/empUserSelect" allowClear="false"
|
||||
checkbox="false" itemCode="userCode" itemName="userName"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 用户列表多选:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:listselect id="testUser4" title="用户选择"
|
||||
url="${ctx}/sys/empUser/empUserSelect" allowClear="false"
|
||||
checkbox="true" itemCode="userCode" itemName="userName"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 城市选择(异步):<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:treeselect id="testAreaCode" title="区域选择"
|
||||
path="testAreaCode" labelPath="testAreaName"
|
||||
url="${ctx}/sys/area/treeData?parentCode=0"
|
||||
class="" allowClear="true" returnFullName="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 用户多选:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:treeselect id="testUser2" title="用户选择"
|
||||
path="testUser.userCode" labelPath="testUser.userName"
|
||||
url="${ctx}/sys/office/treeData?isLoadUser=true"
|
||||
class="" allowClear="true" checkbox="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 用户列表选择:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:listselect id="testUser3" title="用户选择"
|
||||
url="${ctx}/sys/empUser/empUserSelect" allowClear="false"
|
||||
checkbox="false" itemCode="userCode" itemName="userName"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 用户列表多选:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:listselect id="testUser4" title="用户选择"
|
||||
url="${ctx}/sys/empUser/empUserSelect" allowClear="false"
|
||||
checkbox="true" itemCode="userCode" itemName="userName"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 城市选择(异步):<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:treeselect id="testAreaCode" title="区域选择"
|
||||
path="testAreaCode" labelPath="testAreaName"
|
||||
url="${ctx}/sys/area/treeData?parentCode=0"
|
||||
class="" allowClear="true" returnFullName="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
@@ -202,39 +202,39 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 城市选择(联动):<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group" id="cascadeSelect"></div>
|
||||
<script src="${ctxStatic}/jquery-plugins/jquery.cascadeSelect.js?${_version}"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
js.ajaxSubmit(ctx + '/sys/area/treeData', function(data){
|
||||
$("#cascadeSelect").cascadeSelect({
|
||||
data: data, cssStyle: 'width:150px',
|
||||
change: function(vals, names){
|
||||
$('#areaSelectValue').val(vals.join(',') + ' | ' + names.join('/'))
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 联动选择结果:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="areaSelectValue" maxlength="200" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 城市选择(联动):<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group" id="cascadeSelect"></div>
|
||||
<script src="${ctxStatic}/jquery-plugins/jquery.cascadeSelect.js?${_version}"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
js.ajaxSubmit(ctx + '/sys/area/treeData', function(data){
|
||||
$("#cascadeSelect").cascadeSelect({
|
||||
data: data, cssStyle: 'width:150px',
|
||||
change: function(vals, names){
|
||||
$('#areaSelectValue').val(vals.join(',') + ' | ' + names.join('/'))
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> 联动选择结果:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="areaSelectValue" maxlength="200" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
@@ -242,7 +242,7 @@
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> 备注信息:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:ueditor path="remarks" maxlength="10000" height="200" class=""
|
||||
<#form:ueditor path="remarks" maxlength="10000" height="200" class=""
|
||||
simpleToolbars="true" readonly="false" outline="false"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -258,20 +258,20 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">返回路径:</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadImage2" returnPath="true"
|
||||
filePathInputId="uploadImage2Path" fileNameInputId="uploadImage2Name"
|
||||
uploadType="image" readonly="false" preview="true" maxUploadNum="3" isMini="false"/>
|
||||
<#form:input name="uploadImage2Path" value="/js/userfiles/fileupload/201812/1073024549485039616.png|/js/userfiles/fileupload/201812/1073043095867133952.png" class="form-control"/>
|
||||
<#form:input name="uploadImage2Name" value="0 (1).png|0 (2).png" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">返回路径:</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadImage2" returnPath="true"
|
||||
filePathInputId="uploadImage2Path" fileNameInputId="uploadImage2Name"
|
||||
uploadType="image" readonly="false" preview="true" maxUploadNum="3" isMini="false"/>
|
||||
<#form:input name="uploadImage2Path" value="/js/userfiles/fileupload/201812/1073024549485039616.png|/js/userfiles/fileupload/201812/1073043095867133952.png" class="form-control"/>
|
||||
<#form:input name="uploadImage2Name" value="0 (1).png|0 (2).png" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
@@ -291,26 +291,26 @@
|
||||
<a href="#" id="testDataChildDataGridAddRowBtn" class="btn btn-primary btn-sm mt10 mb10"><i class="fa fa-plus"></i> 增行</a>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<% if (hasPermi('test:testData:edit')){ %>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 保 存</button>
|
||||
<% } %>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#form:form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<% if (hasPermi('test:testData:edit')){ %>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 保 存</button>
|
||||
<% } %>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#form:form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
//初始化测试数据子表DataGrid对象
|
||||
$("#testDataChildDataGrid").dataGrid({
|
||||
|
||||
data: ${toJson(testData.testDataChildList)},
|
||||
data: "#{toJson(testData.testDataChildList)}",
|
||||
datatype: "local", // 设置本地数据
|
||||
autoGridHeight: function(){return 'auto'}, // 设置自动高度
|
||||
|
||||
@@ -318,20 +318,20 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
columnModel: [
|
||||
{header:'状态', name:'status', editable:true, hidden:true},
|
||||
{header:'主键', name:'id', editable:true, hidden:true},
|
||||
{header:'排序号', name:'testSort', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'11', 'class':'form-control digits',
|
||||
// 'data-inputmask-alias':"money", 'data-inputmask': "'digits':'2'",
|
||||
dataInit: function(element){
|
||||
// $(element).addClass('inputmask').attr('data-inputmask-alias', "money").attr('data-inputmask', "'digits':'2'").inputmask()
|
||||
$(element).addClass('inputmask').attr({'data-inputmask-alias': "money", 'data-inputmask': "'digits':'2'"}).inputmask()
|
||||
// $(element).inputmask();
|
||||
}
|
||||
{header:'排序号', name:'testSort', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'11', 'class':'form-control digits',
|
||||
// 'data-inputmask-alias':"money", 'data-inputmask': "'digits':'2'",
|
||||
dataInit: function(element){
|
||||
// $(element).addClass('inputmask').attr('data-inputmask-alias', "money").attr('data-inputmask', "'digits':'2'").inputmask()
|
||||
$(element).addClass('inputmask').attr({'data-inputmask-alias': "money", 'data-inputmask': "'digits':'2'"}).inputmask()
|
||||
// $(element).inputmask();
|
||||
}
|
||||
}},
|
||||
{header:'父表主键', name:'testData.id', editable:true, hidden:true},
|
||||
{header:'单行文本', name:'testInput', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'200', 'class':'form-control'}},
|
||||
{header:'多行文本', name:'testTextarea', width:150, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}},
|
||||
{header:'下拉框', name:'testSelect', width:100,
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.select2(element).on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
@@ -339,7 +339,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
},
|
||||
{header:'下拉多选', name:'testSelectMultiple', width:100,
|
||||
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.select2(element).on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
@@ -347,7 +347,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
},
|
||||
{header:'单选框', name:'testRadio', width:100,
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.select2(element).on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
@@ -355,7 +355,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
},
|
||||
{header:'复选框', name:'testCheckbox', width:100,
|
||||
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.select2(element).on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
@@ -364,17 +364,17 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
{header:'日期选择', name:'testDate', width:150,
|
||||
formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d'},
|
||||
editable:true, edittype:'text', editoptions:{'class':'form-control laydate ', 'readonly':'true',
|
||||
dataInit: function(element){
|
||||
dataInit: function(element){
|
||||
laydate.render({elem:element, type:'date', format:'yyyy-MM-dd'});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'日期时间', name:'testDatetime', width:150,
|
||||
formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d H:i:s'},
|
||||
editable:true, edittype:'text', editoptions:{'class':'form-control laydate ', 'readonly':'true',
|
||||
dataInit: function(element){
|
||||
dataInit: function(element){
|
||||
laydate.render({elem:element, type:'datetime', format:'yyyy-MM-dd HH:mm'});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'用户选择', name:'testUser', width:150,
|
||||
@@ -390,21 +390,21 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text("用户列表选择")}', name:'testUser2', width:150,
|
||||
formatter: function(val, obj, row, act){
|
||||
return js.val(row, 'testUser.userCode')+'|'+js.val(row, 'testUser.userName');
|
||||
}, editable: true, edittype: "custom", editoptions: {
|
||||
custom_element: function(val, editOptions) {
|
||||
return js.template('listselectTpl', {
|
||||
id: 'user_'+editOptions.id, title: '用户选择',
|
||||
name: 'testUser.userCode', value: val.split('|')[0],
|
||||
labelName: 'testUser.userName', labelValue: val.split('|')[1],
|
||||
url: '${ctx}/sys/empUser/empUserSelect', cssClass: '',
|
||||
itemCode: 'userCode', itemName: 'userName'
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'${text("用户列表选择")}', name:'testUser2', width:150,
|
||||
formatter: function(val, obj, row, act){
|
||||
return js.val(row, 'testUser.userCode')+'|'+js.val(row, 'testUser.userName');
|
||||
}, editable: true, edittype: "custom", editoptions: {
|
||||
custom_element: function(val, editOptions) {
|
||||
return js.template('listselectTpl', {
|
||||
id: 'user_'+editOptions.id, title: '用户选择',
|
||||
name: 'testUser.userCode', value: val.split('|')[0],
|
||||
labelName: 'testUser.userName', labelValue: val.split('|')[1],
|
||||
url: '${ctx}/sys/empUser/empUserSelect', cssClass: '',
|
||||
itemCode: 'userCode', itemName: 'userName'
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
{header:'机构选择', name:'testOffice', width:150,
|
||||
formatter: function(val, obj, row, act){
|
||||
@@ -455,7 +455,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
editGridInputFormListName: 'testDataChildList', // 提交的数据列表名
|
||||
editGridInputFormListAttrs: 'status,id,testSort,testData.id,testInput,testTextarea,testSelect,testSelectMultiple,testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testOffice.officeCode,testAreaCode,testAreaName,', // 提交数据列表的属性字段
|
||||
|
||||
// 加载成功后执行事件
|
||||
//# // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
@@ -465,37 +465,37 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
<#form:treeselect id="{{d.id}}" title="{{d.title}}" name="{{d.name}}" value="{{d.value}}"
|
||||
labelName="{{d.labelName}}" labelValue="{{d.labelValue}}" url="{{d.url}}"
|
||||
class="{{d.cssClass}}" btnClass="btn-sm" allowClear="true"/>
|
||||
</div>//--></script>
|
||||
<script id="listselectTpl" type="text/template">//<!--<div>
|
||||
<#form:listselect id="{{d.id}}" title="{{d.title}}" name="{{d.name}}" value="{{d.value}}"
|
||||
labelName="{{d.labelName}}" labelValue="{{d.labelValue}}" url="{{d.url}}"
|
||||
class="{{d.cssClass}}" btnClass="btn-sm" allowClear="true"
|
||||
itemCode="{{d.itemCode}}" itemName="{{d.itemName}}"/>
|
||||
</div>//--></script>
|
||||
<script>
|
||||
$("#inputForm").validate({
|
||||
submitHandler: function(form){
|
||||
|
||||
// 数据格式化恢复(表单提交之前调用)
|
||||
$('.inputmask').inputmask('remove');
|
||||
|
||||
// js.ajaxSubmitForm($(form), function(data){
|
||||
// js.showMessage(data.message);
|
||||
// if(data.result == Global.TRUE){
|
||||
// js.closeCurrentTabPage(function(contentWindow){
|
||||
// contentWindow.page();
|
||||
// });
|
||||
// }
|
||||
// }, "json");
|
||||
log($(form).serializeArray());
|
||||
js.showMessage('模拟保存成功');
|
||||
|
||||
// 数据格式化(初始化完成表单后调用)
|
||||
$(".inputmask").inputmask();
|
||||
}
|
||||
});
|
||||
|
||||
//数据格式化(初始化完成表单后调用)
|
||||
$(".inputmask").inputmask();
|
||||
|
||||
<script id="listselectTpl" type="text/template">//<!--<div>
|
||||
<#form:listselect id="{{d.id}}" title="{{d.title}}" name="{{d.name}}" value="{{d.value}}"
|
||||
labelName="{{d.labelName}}" labelValue="{{d.labelValue}}" url="{{d.url}}"
|
||||
class="{{d.cssClass}}" btnClass="btn-sm" allowClear="true"
|
||||
itemCode="{{d.itemCode}}" itemName="{{d.itemName}}"/>
|
||||
</div>//--></script>
|
||||
<script>
|
||||
$("#inputForm").validate({
|
||||
submitHandler: function(form){
|
||||
|
||||
// 数据格式化恢复(表单提交之前调用)
|
||||
$('.inputmask').inputmask('remove');
|
||||
|
||||
// js.ajaxSubmitForm($(form), function(data){
|
||||
// js.showMessage(data.message);
|
||||
// if(data.result == Global.TRUE){
|
||||
// js.closeCurrentTabPage(function(contentWindow){
|
||||
// contentWindow.page();
|
||||
// });
|
||||
// }
|
||||
// }, "json");
|
||||
log($(form).serializeArray());
|
||||
js.showMessage('模拟保存成功');
|
||||
|
||||
// 数据格式化(初始化完成表单后调用)
|
||||
$(".inputmask").inputmask();
|
||||
}
|
||||
});
|
||||
|
||||
//数据格式化(初始化完成表单后调用)
|
||||
$(".inputmask").inputmask();
|
||||
|
||||
</script>
|
||||
@@ -149,7 +149,7 @@
|
||||
//初始化测试数据子表DataGrid对象
|
||||
$("#testDataChildDataGrid").dataGrid({
|
||||
|
||||
data: ${toJson(testData.testDataChildList)},
|
||||
data: "#{toJson(testData.testDataChildList)}",
|
||||
datatype: "local", // 设置本地数据
|
||||
autoGridHeight: function(){return 'auto'}, // 设置自动高度
|
||||
|
||||
@@ -161,7 +161,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
{header:'多行文本', name:'testTextarea', width:100, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}},
|
||||
{header:'下拉框', name:'testSelect', width:100,
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.select2(element).on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
@@ -211,7 +211,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
editGridInputFormListName: 'testDataChildList', // 提交的数据列表名
|
||||
editGridInputFormListAttrs: 'status,id,testSort,testData.id,testInput,testTextarea,testSelect,testSelectMultiple,testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testOffice.officeCode,testAreaCode,testAreaName,', // 提交数据列表的属性字段
|
||||
|
||||
// 加载成功后执行事件
|
||||
//# // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
//初始化测试数据子表DataGrid对象
|
||||
$("#testDataChildDataGrid").dataGrid({
|
||||
|
||||
data: ${toJson(testData.testDataChildList)},
|
||||
data: "#{toJson(testData.testDataChildList)}",
|
||||
datatype: "local", // 设置本地数据
|
||||
autoGridHeight: function(){return 'auto'}, // 设置自动高度
|
||||
|
||||
@@ -221,7 +221,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
{header:'${text("多行文本")}', name:'testTextarea', width:100, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}},
|
||||
{header:'${text("下拉框")}', name:'testSelect', width:100,
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.select2(element).on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
@@ -229,7 +229,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
},
|
||||
{header:'${text("下拉多选")}', name:'testSelectMultiple', width:90, fixed: true,
|
||||
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.select2(element).on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
@@ -237,7 +237,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
},
|
||||
{header:'${text("单选框")}', name:'testRadio', width:135, fixed: true,
|
||||
editable:true, edittype:'radio', editoptions:{'class':'form-control icheck',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.iCheck(element).on("ifChanged",function(){$(this).resetValid()});
|
||||
}
|
||||
@@ -245,7 +245,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
},
|
||||
{header:'${text("复选框")}', name:'testCheckbox', width:135, fixed: true,
|
||||
editable:true, edittype:'checkbox', editoptions:{'class':'form-control icheck',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.iCheck(element).on("ifChanged",function(){$(this).resetValid()});
|
||||
}
|
||||
@@ -364,7 +364,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
+'testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testOffice.officeCode,'
|
||||
+'testAreaCode,testAreaName,testDataChild_file,testDataChild_file__del', // 提交数据列表的属性字段
|
||||
|
||||
// 加载成功后执行事件
|
||||
//# // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
// $('#jqgh_testDataChildDataGrid_rn').append('<a href="javascript:" onclick="'
|
||||
// + '$(\'#testDataChildDataGridAddRowBtn\').click();">'
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
//初始化测试数据子表DataGrid对象
|
||||
$("#testDataChildDataGrid").dataGrid({
|
||||
|
||||
data: ${toJson(testData.testDataChildList)},
|
||||
data: "#{toJson(testData.testDataChildList)}",
|
||||
datatype: "local", // 设置本地数据
|
||||
autoGridHeight: function(){return 'auto'}, // 设置自动高度
|
||||
|
||||
@@ -243,7 +243,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
return val;
|
||||
},
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.select2(element).on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
@@ -257,7 +257,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
return val;
|
||||
},
|
||||
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.select2(element).on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
@@ -271,7 +271,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
return val;
|
||||
},
|
||||
editable:true, edittype:'radio', editoptions:{'class':'form-control icheck',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.iCheck(element).on("ifChanged",function(){$(this).resetValid()});
|
||||
}
|
||||
@@ -279,13 +279,13 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
},
|
||||
{header:'${text("复选框")}', name:'testCheckbox', width:135, fixed: true,
|
||||
formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
|
||||
},
|
||||
unformat: function(val, obj, cell){
|
||||
return val;
|
||||
},
|
||||
editable:true, edittype:'checkbox', editoptions:{'class':'form-control icheck',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
items: $.merge([], "#{@DictUtils.getDictListJson('sys_menu_type')}"),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
js.iCheck(element).on("ifChanged",function(){$(this).resetValid()});
|
||||
}
|
||||
@@ -449,7 +449,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
+'testRadio,testCheckbox,testDate,testDatetime,testUser.userCode,testUser.userName,testOffice.officeCode,'
|
||||
+'testOffice.officeName,testAreaCode,testAreaName,testDataChild_file,testDataChild_file__del', // 提交数据列表的属性字段
|
||||
|
||||
// 加载成功后执行事件
|
||||
//# // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
// $('#jqgh_testDataChildDataGrid_rn').append('<a href="javascript:" onclick="'
|
||||
// + '$(\'#testDataChildDataGridAddRowBtn\').click();">'
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
//# // 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
@@ -129,16 +129,16 @@ $('#dataGrid').dataGrid({
|
||||
}}},
|
||||
{header:'${text("多行文本")}', name:'testTextarea', index:'a.test_textarea', width:150, align:"left"},
|
||||
{header:'${text("下拉框")}', name:'testSelect', index:'a.test_select', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("下拉多选")}', name:'testSelectMultiple', index:'a.test_select_multiple', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("单选框")}', name:'testRadio', index:'a.test_radio', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("复选框")}', name:'testCheckbox', index:'a.test_checkbox', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("日期选择")}', name:'testDate', index:'a.test_date', width:150, align:"center"},
|
||||
{header:'${text("日期时间")}', name:'testDatetime', index:'a.test_datetime', width:150, align:"center"},
|
||||
@@ -147,13 +147,13 @@ $('#dataGrid').dataGrid({
|
||||
{header:'${text("区域选择")}', name:'testAreaName', index:'a.test_area_code', width:150, align:"center"},
|
||||
{header:'${text("区域名称")}', name:'testAreaName', index:'a.test_area_name', width:150, align:"left"},
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_search_status')}", val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', firstsortorder:'desc', width:150, align:"center"},
|
||||
{header:'${text("备注")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
|
||||
{header:'${text("操作")}', name:'actions', width:100, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
//<% if(hasPermi('test:testData:edit')){ %>
|
||||
//# if(hasPermi('test:testData:edit')){
|
||||
actions.push('<a href="${ctx}/test/testData/form?id='+row.id+'" class="btnList" title="${text("编辑数据")}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/test/testData/disable?id='+row.id+'" class="btnList" title="${text("停用数据")}" data-confirm="${text("确认要停用该数据吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
@@ -161,7 +161,7 @@ $('#dataGrid').dataGrid({
|
||||
actions.push('<a href="${ctx}/test/testData/enable?id='+row.id+'" class="btnList" title="${text("启用数据")}" data-confirm="${text("确认要启用该数据吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/test/testData/delete?id='+row.id+'" class="btnList" title="${text("删除数据")}" data-confirm="${text("确认要删除该数据吗?")}"><i class="fa fa-trash-o"></i></a> ');
|
||||
//<% } %>
|
||||
//# }
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
@@ -185,16 +185,16 @@ $('#dataGrid').dataGrid({
|
||||
{header:'${text("单行文本")}', name:'testInput', width:150},
|
||||
{header:'${text("多行文本")}', name:'testTextarea', width:150},
|
||||
{header:'${text("下拉框")}', name:'testSelect', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("下拉多选")}', name:'testSelectMultiple', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("单选框")}', name:'testRadio', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("复选框")}', name:'testCheckbox', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_menu_type')}", val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("日期时间")}', name:'testDatetime', width:150, align:"center"},
|
||||
{header:'${text("用户名称")}', name:'testUser.userName', sortable:false, width:150, align:"center"},
|
||||
@@ -202,7 +202,7 @@ $('#dataGrid').dataGrid({
|
||||
{header:'${text("区域名称")}', name:'testAreaName', width:150, align:"center"}
|
||||
],
|
||||
emptyDataHint: true, // 表格内没有数据的时候提示 “无数据显示” v4.1.7
|
||||
// 加载成功后执行事件
|
||||
//# // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
$(window).resize();
|
||||
}
|
||||
@@ -212,7 +212,7 @@ $('#dataGrid').dataGrid({
|
||||
multiSort: true, // 是否支持多列排序,给列指定 firstsortorder 可设定初次排序方式
|
||||
emptyDataHint: true, // 表格内没有数据的时候提示 “无数据显示” v4.1.7
|
||||
|
||||
// 加载成功后执行事件
|
||||
//# // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
// // 无数据显示,v4.1.7 之前版本
|
||||
// if (data.count == 0){
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
//# // 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
@@ -58,13 +58,13 @@ $('#dataGrid').dataGrid({
|
||||
{header:'${text("排序号")}', name:'treeSort', index:'a.tree_sort', width:150, align:"center"},
|
||||
{header:'${text("节点名称")}', name:'treeName', index:'a.tree_name', width:150, align:"left"},
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_search_status')}", val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
|
||||
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
|
||||
{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
//<% if(hasPermi('test:testTree:edit')){ %>
|
||||
//# if(hasPermi('test:testTree:edit')){
|
||||
actions.push('<a href="${ctx}/test/testTree/form?treeCode='+row.treeCode+'" class="btnList" title="${text("编辑数据")}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/test/testTree/disable?treeCode='+row.treeCode+'" class="btnList" title="${text("停用数据")}" data-confirm="${text("确认要停用该数据吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
@@ -73,19 +73,20 @@ $('#dataGrid').dataGrid({
|
||||
}
|
||||
actions.push('<a href="${ctx}/test/testTree/delete?treeCode='+row.treeCode+'" class="btnList" title="${text("删除数据")}" data-confirm="${text("确认要删除该数据及所有子数据吗?")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="${ctx}/test/testTree/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级数据")}"><i class="fa fa-plus-square"></i></a> ');
|
||||
//<% } %>
|
||||
//# }
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
treeGrid: true, // 启用树结构表格
|
||||
defaultExpandLevel: 0, // 默认展开的层次
|
||||
expandNodeClearPostData: 'treeName,remarks,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据) // 加载成功后执行事件
|
||||
expandNodeClearPostData: 'treeName,remarks,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据)
|
||||
//# // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// 修复树表数据(包含字段:parentCodes、treeLeaf、treeLevel、treeSorts、treeNames)
|
||||
//# // 修复树表数据(包含字段:parentCodes、treeLeaf、treeLevel、treeSorts、treeNames)
|
||||
$("#btnFixTreeData").click(function(){
|
||||
js.ajaxSubmit("${ctx}/test/testTree/fixTreeData", function(data){
|
||||
js.showMessage(data.message);
|
||||
|
||||
Reference in New Issue
Block a user