市长热线演示版

knowledgesearch.aspx 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="knowledgesearch.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.knowledgemanage.knowledgesearch" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head runat="server">
  5. <title>知识库查询</title>
  6. <script src="../scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  7. <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
  8. <link href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  9. <link href="../images/style.css" rel="stylesheet" type="text/css" />
  10. <link href="../scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
  11. <script type="text/javascript">
  12. var actionNodeID;
  13. var gridlist;
  14. var singleClick;
  15. var count = 0;
  16. var counts = 0;
  17. $(function () {
  18. // $("#layout1").ligerLayout({
  19. // leftWidth: 200,
  20. // allowCenterBottomResize: false
  21. // });
  22. try {
  23. var vheight = document.body.clientHeight;
  24. document.getElementById("tableMessage").style.height = vheight - 130;
  25. document.getElementById("divTree").style.height = vheight - 130;
  26. }
  27. catch (e)
  28. { }
  29. $("#tree1").ligerTree({
  30. nodeWidth: 135,
  31. checkbox: false,
  32. url: 'ajax/knowledge.ashx?action=gettreelist',
  33. onClick: function (node, e) {
  34. actionNodeID = node.data.id;
  35. LoadList();
  36. }
  37. });
  38. LoadList();
  39. });
  40. function getWhereStr() {
  41. var keyWords = "";
  42. if (document.getElementById("txtKeywords").value != "") {
  43. keyWords += document.getElementById("txtKeywords").value;
  44. }
  45. return keyWords;
  46. }
  47. function LoadList() {
  48. count += 1;
  49. counts = count;
  50. if (actionNodeID == undefined) {
  51. actionNodeID = "";
  52. }
  53. try {
  54. gridlist = $("#divDataList").ligerGrid({
  55. height: '97%',
  56. columns: [
  57. { display: 'Id', name: '_f_repositoryid', width: '1%', hide: 'Id' },
  58. { display: '标题', name: '_f_title', align: 'left', width: '20%' },
  59. { display: '内容', name: '_f_description', align: 'left', width: '40%', render: cutContent },
  60. { display: '关键字', name: '_f_keywords', width: '20%' },
  61. { display: '创建时间', name: '_f_createon', width: '16%', type: 'date', format: 'yyyy-MM-dd hh:mm:ss' }
  62. ],
  63. url: 'ajax/knowledge.ashx?action=getKnowledgeList' + '&keyWords=' + getWhereStr() + '&categoryId=' + actionNodeID, pageSize: 10, rownumbers: true,
  64. onSelectRow: function (data, rowindex, rowobj) {
  65. singleClick = data._f_repositoryid;
  66. },
  67. onDblClickRow: function (data, rowindex, rowobj) {
  68. if (count > 1) {
  69. count -= 1;
  70. return;
  71. } else {
  72. count = counts;
  73. View();
  74. }
  75. },
  76. onAfterShowData: function (data) {
  77. var vheight = $("#divDataList").height();
  78. document.getElementById("divTree").style.height = vheight;
  79. }
  80. });
  81. }
  82. catch (e) {
  83. alert(e.Message);
  84. }
  85. gridlist.changePage('first');
  86. $("#pageloading").hide();
  87. }
  88. function cutContent(rowdata, index, value) {
  89. if (value.length < 20) return value;
  90. else return value.substr(0, 20) + "...";
  91. }
  92. function View() {
  93. if (singleClick == null || singleClick == undefined || singleClick == "") {
  94. alert("请选择查看行!");
  95. }
  96. else {
  97. var vheight = $("#form1").height();
  98. var vwidth = $("#form1").width();
  99. $.ligerDialog.open({ url: 'knowledgeview.aspx?action=view&singleFlage=' + singleClick, title: '查看知识库', height: vheight, width: vwidth, isResize: true
  100. });
  101. }
  102. }
  103. document.onkeydown = function (event) {
  104. var e = event || window.event || arguments.callee.caller.arguments[0];
  105. if (e && e.keyCode == 13) {
  106. LoadList();
  107. }
  108. };
  109. </script>
  110. </head>
  111. <body>
  112. <form id="form1" runat="server">
  113. <div class="tools_box">
  114. <div class="tools_bar">
  115. <a class="tools_btn" href="#" onclick="View();"><span><b>查看</b></span></a>
  116. <div class="search_box">
  117. 搜索内容:<asp:TextBox ID="txtKeywords" runat="server" CssClass="txtInput"></asp:TextBox>&nbsp;&nbsp;
  118. <input id="btnSearch" type="button" value="搜 索" class="btnSearch" onclick="LoadList();" />
  119. </div>
  120. </div>
  121. </div>
  122. <table id="tableMessage" cellpadding="3" cellspacing="3" border="0" style="width: 100%;">
  123. <tr>
  124. <td valign="top" style="width: 230px; padding: 0px 2px 5px 2px;">
  125. <div class="tools_box" style="height: 30px;">
  126. <div class="tools_bar">
  127. <div style="float: left; padding-top: 6px; padding-left: 1px; font-weight: bold;
  128. color: red;">
  129. <img src="../images/icon_site.gif" />&nbsp;知识库分类</div>
  130. </div>
  131. </div>
  132. <table id="tableTree" cellpadding="0" cellspacing="0" style="width: 100%; border: 1px solid #D6D6D6;">
  133. <tr>
  134. <td valign="top">
  135. <div id="divTree" style="overflow: auto;">
  136. <ul id="tree1">
  137. <li isexpand="false" id="-1"><span>知识库信息</span>
  138. <ul>
  139. </ul>
  140. </li>
  141. </ul>
  142. </div>
  143. </td>
  144. </tr>
  145. </table>
  146. </td>
  147. <td valign="top" style="padding: 0px 2px 5px 2px;">
  148. <div class="tools_box" style="height: 30px;">
  149. <div class="tools_bar">
  150. <div style="float: left; padding-top: 6px; padding-left: 1px; font-weight: bold;
  151. color: red;">
  152. <img src="../images/ico_16_2.gif" />&nbsp;知识库列表</div>
  153. </div>
  154. </div>
  155. <div id="divDataList">
  156. </div>
  157. </td>
  158. </tr>
  159. </table>
  160. </form>
  161. </body>
  162. </html>