dataFunction.jsp 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title>数据权限</title>
  7. <t:base type="jquery,easyui,tools"></t:base>
  8. <script type="text/javascript">
  9. $(function() {
  10. $('#cc').combotree({
  11. url : 'functionController.do?setPFunction&type=1&selfId=${function.id}',
  12. // update-start--Author:zhangguoming Date:20140901 for:为combotree下拉框的添加滚动条
  13. panelHeight: 200,
  14. width: 157,
  15. // update-end--Author:zhangguoming Date:20140901 for:为combotree下拉框的添加滚动条
  16. onClick: function(node){
  17. $("#functionId").val(node.id);
  18. }
  19. });
  20. if($('#functionLevel').val()=='1'){
  21. $('#pfun').show();
  22. }else{
  23. $('#pfun').hide();
  24. }
  25. $('#functionLevel').change(function(){
  26. if($(this).val()=='1'){
  27. $('#pfun').show();
  28. var t = $('#cc').combotree('tree');
  29. var nodes = t.tree('getRoots');
  30. if(nodes.length>0){
  31. $('#cc').combotree('setValue', nodes[0].id);
  32. $("#functionId").val(nodes[0].id);
  33. }
  34. }else{
  35. var t = $('#cc').combotree('tree');
  36. var node = t.tree('getSelected');
  37. if(node){
  38. $('#cc').combotree('setValue', null);
  39. }
  40. $("#functionId").val(null);
  41. $('#pfun').hide();
  42. }
  43. });
  44. });
  45. function viewStyle(param) {
  46. var url = "<%=basePath%>/functionIconStyle.jsp?style = "+ param;
  47. //add("图标样式预览",url,'functionIconStyle',700,450);
  48. window.open(url,"_blank");
  49. }
  50. </script>
  51. </head>
  52. <body style="overflow-y: hidden" scroll="no">
  53. <t:formvalid formid="formobj" layout="div" dialog="true" refresh="true" action="functionController.do?saveFunction">
  54. <input name="id" type="hidden" value="${function.id}">
  55. <input name="functionType" id="functionType" type="hidden" value="1">
  56. <fieldset class="step">
  57. <div class="form">
  58. <label class="Validform_label"> <t:mutiLang langKey="menu.name"/>: </label>
  59. <input name="functionName" class="inputxt" value="${function.functionName}" datatype="*2-50">
  60. <span class="Validform_checktip"> <t:mutiLang langKey="menuname.rang4to15"/> </span>
  61. </div>
  62. <div class="form">
  63. <label class="Validform_label"> <t:mutiLang langKey="menu.level"/>: </label>
  64. <select name="functionLevel" id="functionLevel" datatype="*">
  65. <option value="0" <c:if test="${function.functionLevel eq 0}">selected="selected"</c:if>>
  66. <t:mutiLang langKey="main.function"/>
  67. </option>
  68. <option value="1" <c:if test="${function.functionLevel>0}"> selected="selected"</c:if>>
  69. <t:mutiLang langKey="sub.function"/>
  70. </option>
  71. </select>
  72. <span class="Validform_checktip"></span>
  73. </div>
  74. <div class="form" id="pfun">
  75. <label class="Validform_label"> <t:mutiLang langKey="parent.function"/>: </label>
  76. <input id="cc" <c:if test="${function.TSFunction.functionLevel eq 0}"> value="${function.TSFunction.id}"</c:if>
  77. <c:if test="${function.TSFunction.functionLevel > 0}"> value="${function.TSFunction.functionName}"</c:if>>
  78. <input id="functionId" name="TSFunction.id" style="display: none;" value="${function.TSFunction.id}">
  79. </div>
  80. <div class="form" id="funurl">
  81. <label class="Validform_label">
  82. <t:mutiLang langKey="menu.url"/>:
  83. </label>
  84. <input name="functionUrl" class="inputxt" value="${function.functionUrl}">
  85. </div>
  86. <div class="form" id="funorder">
  87. <label class="Validform_label">
  88. <t:mutiLang langKey="menu.order"/>: </label> <input name="functionOrder" class="inputxt" value="${function.functionOrder}" datatype="n1-3"></div>
  89. </fieldset>
  90. </t:formvalid>
  91. </body>
  92. </html>