dictionary_list.jsp 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  3. <%@ taglib prefix="tms" uri="http://fzywtx.com/jsp/yw/tms" %>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  8. <title>数据字典</title>
  9. <link href="/shares/js/yw/master1/liger/skins/ynet/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  10. <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
  11. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  12. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  13. <script src="/shares/jquery.progressbar/js/jquery.progressbar.js" type="text/javascript"></script>
  14. <script type="text/javascript" src="/shares/js/common.js"></script>
  15. <script type="text/javascript" src="/shares/js/constant.js"></script>
  16. <script type="text/javascript" src="/shares/js/yw/master1/page.js"></script>
  17. <script type="text/javascript" src="/shares/js/yw/master1/common.js"></script>
  18. <script type="text/javascript" src="/shares/js/yw/master1/searchBox.js"></script>
  19. <script type="text/javascript">
  20. $(function(){
  21. searchByKword();
  22. });
  23. function search(url,s){
  24. var p = $("#p").val();
  25. var pSize = $("#pSize").val();
  26. var param={"p":p,"pSize":pSize};
  27. sendAsyncAjax(param, url+"&time="+ new Date().getTime()+s, "json", function(data) {
  28. var num = data.Total;
  29. page(num,pSize,p);
  30. var datas = data.Rows;
  31. var item_name = $('#contentDiv');
  32. $(item_name).empty();//初始化table,清空table
  33. var html = '';
  34. if(datas.length == 0){
  35. html = notquery();
  36. }else{
  37. var j=0;
  38. for (var i = 0; i < datas.length; i++){
  39. var arr = datas[i];
  40. var bdiv = 1;
  41. bdiv = 1 + j;
  42. if (j < 7) {
  43. j++
  44. } else {
  45. j = 0;
  46. }
  47. html+= '<div class="tr_cont_new mar4 f5_new">';
  48. html+= '<div class="wdrw_tiao_new bn'+bdiv+' fl"></div>';
  49. html += '<div class="tr_rw_d_new fl">';
  50. html+= '<p><img src="/shares/images/master1/rw_ico_menu.png" width="17" height="15" />';
  51. html+='[父类名称:'+ arr.p_dname+']&nbsp;&nbsp;[子类名称:'+arr.dname+']</p>';
  52. html+= '</div>';
  53. html+= '<div class="tr_rw_btn_new fr" style="width:270px;" >';
  54. html+= '<div class="div_btn">';
  55. html+='<input type="button" class="btn_c" value="删除" onclick="dictionary_del('+arr.universalid+')" />';
  56. html+='</div>';
  57. html+= '<div class="div_btn">';
  58. html+='<input type="button" class="btn_c" value="修改" onclick="dictionary_edit('+arr.universalid+','+arr.pid+')" />';
  59. html+='</div>';
  60. html+= '<div class="div_btn">';
  61. html+='<input type="button" class="btn_c" value="查看" onclick="dictionary_view('+arr.universalid+')" />';
  62. html+='</div>';
  63. html+= '</div>';
  64. html+= '</div>';
  65. }
  66. }
  67. $(item_name).html(html);
  68. });
  69. }
  70. function searchByKword(){
  71. var s = "";
  72. var parentId=$("#parent_type").val();
  73. if(parentId !="" && parentId !=null){
  74. s="&parentId="+parentId;
  75. }
  76. search("mtdictionary.do?task=dictionary_pagelist",s);
  77. }
  78. function dictionary_view(id){
  79. item('mtdictionary.do?task=dictionary_view&id='+id);
  80. }
  81. function dictionary_edit(id,pid){
  82. item('mtdictionary.do?task=to_edit&id='+id+"&parentId="+pid);
  83. }
  84. function dictionary_clear(){
  85. item('mtdictionary.do?task=dictionary_clear');
  86. }
  87. function dictionary_del(id){
  88. if(confirm("确定要删除?")){
  89. item('mtdictionary.do?task=dictionary_del&id='+id);
  90. }
  91. }
  92. function addSub(){
  93. var parentId=$("#parent_type").val();
  94. if(parentId==null || parentId==""){
  95. alert("请选择父类型");
  96. return ;
  97. }
  98. item('mtdictionary.do?task=to_add&parentId='+parentId);
  99. }
  100. </script>
  101. </head>
  102. <body>
  103. <div class="tc_b">
  104. <div id="left" style="float:left;width:100%;">
  105. <div class="tc_r">
  106. <div class="tr_con b5 f4">
  107. <div class="fl f4">
  108. <img src="/shares/images/master1/wdrw_ico.png" width="25" height="31" />&nbsp;数据字典
  109. </div>
  110. <div class="fl f4" style="margin-left:30px;">
  111. 父类型:
  112. </div>
  113. <div class="fl">
  114. <select style="width:150px; height:25px;" name="parent_type" id="parent_type" onchange="searchByKword()">
  115. <option value=""></option>
  116. <c:forEach items="${list}" var="obj" >
  117. <option value="${obj.universalid }" >${obj.dname }</option>
  118. </c:forEach>
  119. </select>
  120. <input style="margin-left:40px;width:80px;" type="button" onclick="addSub()" value="新增子类" class="btn" />
  121. <!-- <input style="margin-left:40px;width:80px;" type="button" onclick="eidtDic()" value="编辑父类" class="btn" /> -->
  122. <!-- <input style="margin-left:40px;width:80px;" type="button" onclick="dictionary_clear()" value="清理缓存" class="btn" /> -->
  123. </div>
  124. </div>
  125. <div class="tr_right_bg">
  126. <div id="contentDiv"></div>
  127. <jsp:include page="/yw/master1/page.jsp">
  128. <jsp:param name="functionName" value="searchByKword"/>
  129. </jsp:include>
  130. </div>
  131. </div>
  132. </div>
  133. <%@ include file="/yw/master1_ytpm/project/flow/left_pmflow.jsp"%>
  134. </div>
  135. </body>
  136. </html>