123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- <%@ page pageEncoding="UTF-8"%>
- <%@ page contentType="text/html; charset=UTF-8" language="java"%>
- <%@ page language="java" import="model.setup.constant.Collection" %>
- <%@ page language="java"
- import="com.sysmodel.datamodel.xmlmodel.ModelFactory,
- com.sysmodel.datamodel.xmlmodel.DataContent,
- com.sysmodel.datamodel.xmlmodel.able.MdpConstant,
- com.sysmodel.datamodel.xmlmodel.able.Property,
- com.sysmodel.datamodel.xmlmodel.able.Template,
- com.sysmodel.datamodel.xmlmodel.impl.PropertyImpl,
- java.util.*"%>
- <%
- String nodeID = request.getParameter("nodeID")==null?"":(String)request.getParameter("nodeID") ;
- String codeName = request.getParameter("codeName")==null ? "TB_BM$_CONFIGURATION" : request.getParameter("codeName");
- Collection cs = new Collection(nodeID,codeName,request.getContextPath());
- String listHtml = cs.getChildNodeHTML();
- MdpConstant constant = null;
- constant = ModelFactory.getSysmodel().getMdpConstantByName(codeName);
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <SCRIPT language="JavaScript" src="../../../scripts/checkinput.js"></SCRIPT>
- <script>
- <%
- String refreshNode = request.getParameter("refreshNode")==null ? "" : (String)request.getParameter("refreshNode");
- if(!refreshNode.equals("")){
- %>
- var loadTip = "<div>数据装载中,请稍候...</div>";
- var treeImagePath = "../../../images/tree_images/";
- var url = "<%=request.getContextPath()%>/admin/setup/constantinit/tree/divTreeService.jsp?codeName=<%=codeName%>";
- var treeCloseImg = "plus.gif";
- var treeOpenImg = "minus.gif";
- parent.frames["constantTreeFrame"].refreshNode('<%=nodeID%>');
- <%
- }
- %>
-
- function submitAction(codeName,nodeID,cmd){
- form1.action = "../editExc.jsp?codeName="+codeName+"&nodeID="+nodeID+"&cmd="+cmd ;
- form1.submit();
- }
- function deleteChildList(codeName,nodeID,myParentID,cmd){
- form1.action = "editExc.jsp?codeName="+codeName+"&nodeID="+nodeID+"&cmd="+cmd+"&myParentID="+myParentID ;
- form1.submit();
- }
- function newChildNode(codeName,parentID){
- window.document.location="newChildNode.jsp?codeName="+codeName+"&parentID="+parentID;
- }
-
- function turnto(url){
- window.document.location= url;
- }
- function checkinput(){
- return true;
- }
- function saveTreeButton(codeName,nodeID,cmd){
- $('#consTree_save').form('submit',{
- url: 'editExc.jsp?codeName='+codeName+'&nodeID='+nodeID+'&cmd='+cmd,
- onSubmit: function(){
- return $(this).form('validate');
- },
- success: function(result){
- var result = eval('('+result+')');
- if (!result.success){
- $.messager.show({
- title: 'Error',
- msg: result.success
- });
- } else {
- $('#consTreeList').datagrid('reload'); // reload the user data
- }
- }
- });
- }
- function destroyTreeButton(codeName,nodeID,cmd){
-
- $.messager.confirm('常量删除','确定要删除常量吗?',
- function(r){
- if (r){
- $.post('editExc.jsp',{codeName:codeName,nodeID:nodeID,cmd:cmd},function(result){
- if (result.success){
- $('#consTreeList').datagrid('reload'); // reload the user data
- } else {
- $.messager.show({ // show error message
- title: 'Error',
- msg: result.errorMsg
- });
- }
- },'json');
- }
- });
-
- };
-
- </script>
- <link rel="stylesheet" href="../../../styles/css.css" type="text/css">
- <link rel="stylesheet" type="text/css" href="../../../../scripts/easyui/themes/default/easyui.css">
- <link rel="stylesheet" type="text/css" href="../../../../scripts/easyui/themes/icon.css">
- <link rel="stylesheet" type="text/css" href="../../../../scripts/easyui/themes/color.css">
- <link rel="stylesheet" type="text/css" href="../../../../scripts/easyui/demo/demo.css">
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.min.js"></script>
- <script type="text/javascript" src="../../../../scripts/easyui/jquery.easyui.min.js"></script>
- <script type="text/javascript" src="../../../../scripts/easyui/locale/easyui-lang-zh_CN.js"></script>
- </head>
- <body bgcolor="#FFFFFF" topmargin="0" leftmargin="0" >
- <div class="easyui-panel" title="<%=constant.getDescription()%>维护">
- <form name="form1" method="post" action="" id="consTree_save">
- <div style="padding:0px 0px 0px 0px">
- <%=cs.createDetailHTML()%>
- </div>
- <div style="text-align:center;padding:5px">
- <%if(!nodeID.equals("")){%>
- <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveTreeButton('<%=codeName%>','<%=nodeID%>','modify')">修改</a>
- <input name="button2" type="button" class="button" onClick="document.form1.reset();" value="重置" >
- <%if(cs.isTree()){%>
- <input name="button2" type="button" class="button" onClick="if(checkinput())newChildNode('<%=codeName%>','<%=nodeID%>')" value="新增" >
- <%}%>
- <%}
- if((listHtml.length())==0&&(!nodeID.equals(""))){%>
- <input name="button2" type="button" class="button" onClick="if(checkinput())submitAction('<%=codeName%>','<%=nodeID%>','delete')" value="删除" >
- <%}%>
- </div>
- </div>
- </form>
- <br>
- <%
- //增加此处用于功能常量表的维护
- if(codeName.equals("BM$_Menu")){
- %>
- <div id="total">
- <div class="whiteborder">
- <div class="titback">
- <div class="floatleft"><img src="../../../images/index/arrow1.gif" width="20" height="24" /></div>
- <div class="dropshadow"> 功能设置</div>
- <div class="clear"></div>
- <div style="color:#000000" align="center">
- <form name="fun" action="newFunction.jsp?codeName=<%=codeName%>" method="post">
- <input type="hidden" name="node_id" value="<%=nodeID%>">
- 功能编号:<input type="text" name="fun_code" size="15"> 功能名称:<input type="text" name="fun_name" size="15"> 功能类别:<select name="fun_type"><option value="button">按钮</option><option value="link">链接</option></select> <input type="button" value="修改"> <input type="submit" value="保存">
- </form>
- </div>
- </div>
- <div class="report">
-
- <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="DefTableStyles">
- <tr class="TableBgColorAsh">
- <td height="21" align="center">没有功能属性!</td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- <br>
- <%
- }
- %>
-
- <%-- <div class="easyui-panel" title="下级节点信息" fit = "true" fitColumns="true">
- <div class="report">
- <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="datagrid-btable">
- <%if(listHtml.equals("")){%>
- <tr class="TableBgColorAsh">
- <td height="21" align="center">没有下级节点!</td>
- </tr>
- <%}else{
- out.print(listHtml);
- }%>
- </table>
- </div>
- </div> --%>
- <div class="report">
- <%
- List array_elements = null;
- //if(constant.isTree()){
-
- array_elements = constant.getChildDataContentByNodeID(nodeID);
- Iterator<DataContent> it = array_elements.iterator();
- Template template = constant.getTemplate();
- ArrayList<PropertyImpl> listProperty = (ArrayList<PropertyImpl>)template.getListproperty();
- Iterator<PropertyImpl> itField = listProperty.iterator();
-
-
-
- %>
- <div style="height:500px;">
- <table id="consTreeList" title="常量列表" class="easyui-datagrid"
- data-options="singleSelect:false,url:'json_data.jsp?nodeID=<%=nodeID %>&codeName=<%=codeName %>'"
- pagination="true"
- rownumbers="true"
- fit = "true"
- fitColumns="true">
- <thead>
- <tr>
- <%
- while (itField.hasNext()) {
- PropertyImpl property = itField.next();
-
-
- %>
- <th field="<%=property.getName() %>" width="50"><%=property.getDescription() %></th>
- <%} %>
- <th field="delete" width="50">删除</th>
-
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <br>
- </body>
- </html>
|