You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
172 lines
5.7 KiB
172 lines
5.7 KiB
<%@page import="org.wdk.module.auth.mount.bean.BaseSessionUser"%>
|
|
<%@page import="org.wdk.WDK"%>
|
|
<%@page import="org.wdk.module.auth.source.bean.TokenBean"%>
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%
|
|
String path = request.getContextPath();
|
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
|
BaseSessionUser su = WDK.getSessionUser(request, response);
|
|
if(null==su){
|
|
su = new BaseSessionUser();
|
|
}
|
|
String WDK_ROOT = WDKCore.WDK_ROOT;
|
|
String RSS_ROOT = WDK_ROOT +"/"+WDKConstant.Theme+"/"+WDKCore.THEME;
|
|
String commonURL = "/"+RSS_ROOT+"/module/public/common.jsp";
|
|
%>
|
|
<!DOCTYPE html>
|
|
<%@page import="org.wdk.WDKConstant"%>
|
|
<%@page import="org.wdk.WDKCore"%>
|
|
<html>
|
|
|
|
<head>
|
|
<base href="<%=basePath%>" target="_self">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<jsp:include page='<%=commonURL %>'></jsp:include>
|
|
<script type="text/javascript" src="<%=RSS_ROOT%>/core/js/wdk.js"></script>
|
|
<title>系统运行参数管理</title>
|
|
|
|
<script type="text/javascript">
|
|
<% if(null==su){%>
|
|
$.timeout();
|
|
<%}%>
|
|
|
|
var _gridcode = "wdk.module.sys.sysparamgrid";
|
|
var _gridid = $.getUUID();
|
|
window.onload = function(){
|
|
$.grid({
|
|
id:_gridid,
|
|
containerid:'layout_grid',
|
|
gridcode:_gridcode,
|
|
fit: true,//自动大小
|
|
url:'wdk?action=wdk.public&method=sysparam_load&ajaxparam='+new Date().getTime(),
|
|
idField:'pcode',
|
|
editor:[
|
|
{
|
|
field : 'pvalue',
|
|
editor : {
|
|
type : 'text'
|
|
}
|
|
}
|
|
,{
|
|
field : 'ordercode',
|
|
editor : {
|
|
type : 'text'
|
|
}
|
|
}
|
|
]
|
|
});
|
|
|
|
};
|
|
|
|
//新增一行
|
|
function _append(){
|
|
$("#dlg_pcode").val('');
|
|
$("#dlg_pname").val('');
|
|
$("#dlg_pvalue").val('');
|
|
$("#dlg_ordercode").val('');
|
|
$("#dlg_remark").val('');
|
|
$('#dlg').dialog('open');
|
|
}
|
|
function _addnew(){
|
|
$('#dlg').dialog('close');
|
|
var _data = {
|
|
pcode:$("#dlg_pcode").val(),
|
|
pname:$("#dlg_pname").val(),
|
|
pvalue:$("#dlg_pvalue").val(),
|
|
ordercode:$("#dlg_ordercode").val(),
|
|
remark:$("#dlg_remark").val()
|
|
};
|
|
$.cuajax({
|
|
url: 'wdk?action=wdk.public&method=sysparam_add&ajaxparam='+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:_data,
|
|
success:function(result) {
|
|
var jres = $.str2json(result);
|
|
$.grid_reload({id:_gridid});
|
|
alert(jres.desc);
|
|
},
|
|
error:function(result){
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
}
|
|
|
|
//删除一行
|
|
function _remove(){
|
|
$.grid_editor_remove({id:_gridid});
|
|
}
|
|
//结束编辑
|
|
function _ending(){
|
|
$.grid_editor_ending({id:_gridid});
|
|
}
|
|
//撤销修改
|
|
function _reject(){
|
|
$.grid_editor_reject({id:_gridid});
|
|
}
|
|
|
|
//保存提交
|
|
function _update(){
|
|
var jrows = $.grid_getData({id:_gridid});
|
|
//保存提交
|
|
var _data = {jrows:$.encode($.json2str(jrows))};
|
|
$.cuajax({
|
|
url: 'wdk?action=wdk.public&method=sysparam_update&ajaxparam='+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:_data,
|
|
success:function(result) {
|
|
var jres = $.str2json(result);
|
|
alert(jres.desc);
|
|
$.grid_reload({id:_gridid});
|
|
},
|
|
error:function(result){
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body class="easyui-layout" data-options="fit:true" style="padding:0px;margin:0px;background-color:#FF0000;">
|
|
<div id="layout_grid" data-options="region:'center',border:false,collapsed:false" style="overflow:hidden;border:1px solid #ddd;" >
|
|
|
|
</div>
|
|
<div id="layout_grid_toolbar" data-options="region:'north',border:false,collapsed:false" style="height:30px;overflow:hidden;border:1px solid #ddd;text-align:left;" >
|
|
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="_append()">新增</a>
|
|
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="_remove()">删除</a>
|
|
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-ok',plain:true" onclick="_ending()">完成</a>
|
|
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" onclick="_reject()">撤销</a>
|
|
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" onclick="_update()">保存提交</a>
|
|
</div>
|
|
|
|
<div id="dlg" class="easyui-dialog" style="width:350px;height:350px;padding:10px 10px" title="新增grid" closed="true" buttons="#dlg-buttons">
|
|
<table>
|
|
<tr>
|
|
<td> <label>参数标识:</label></td>
|
|
<td><input id="dlg_pcode" name="dlg_pcode" class="easyui-validatebox" style="width:200px" required="true"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>参数名称:</label></td>
|
|
<td><input id="dlg_pname" name="dlg_pname" class="easyui-validatebox" style="width:200px" required="true"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>参数值:</label></td>
|
|
<td><input id="dlg_pvalue" name="dlg_pvalue" class="easyui-validatebox" style="width:200px" required="true"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>排序序号:</label></td>
|
|
<td><input id="dlg_ordercode" name="dlg_ordercode" class="txt" style="width:200px"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>参数说明:</label></td>
|
|
<td><input id="dlg_remark" name="dlg_remark" class="txt" style="width:200px" ></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="dlg-buttons">
|
|
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="_addnew()">确定</a>
|
|
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">关闭</a>
|
|
</div>
|
|
</body>
|
|
</html>
|