商丘12345 前端

knowledgeReply.html 8.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <script src="../Script/Common/huayi.load.js"></script>
  6. <script src="../Script/Common/huayi.config.js"></script>
  7. <!--<link rel="stylesheet" href="../css/layer/need/layer.css" />-->
  8. <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
  9. <link rel="stylesheet" href="../css/init.css" />
  10. <title>知识库审核</title>
  11. <style>
  12. .toolBar {
  13. padding: 15px 0;
  14. border-bottom: 1px solid #ccc;
  15. }
  16. .boxCon table th {
  17. width: 20%;
  18. }
  19. .boxCon table td textarea {
  20. width: 100%;
  21. }
  22. .inpBox {
  23. border: 1px solid #a9a9a9;
  24. height: 27px;
  25. width: 55%;
  26. display: inline-block;
  27. position: relative;
  28. vertical-align: middle;
  29. }
  30. .inps1,
  31. .inps4 {
  32. width: 100%;
  33. height: 24px;
  34. outline: none;
  35. border: 0;
  36. border-image-width: 0;
  37. padding: 0;
  38. padding-left: 3px;
  39. }
  40. .changeTitle,
  41. .changeKey,
  42. .addTitle,
  43. .addKey {
  44. width: 55%;
  45. }
  46. .xl {
  47. display: inline-block;
  48. background: url(../img/dropDown.png) no-repeat;
  49. height: 100%;
  50. background-position: center center;
  51. width: 20px;
  52. position: absolute;
  53. right: 0;
  54. top: 0px;
  55. background-color: #f7bc8b;
  56. cursor: pointer;
  57. }
  58. .xl:hover {
  59. background-color: #e6d523;
  60. }
  61. .addTree {
  62. background: #fff;
  63. position: absolute;
  64. width: 100%;
  65. border: 1px solid darkgrey;
  66. right: 0;
  67. top: 26px;
  68. display: none;
  69. height: 220px;
  70. overflow-y: auto;
  71. }
  72. .treeTable {
  73. height: 400px;
  74. /*overflow-y: auto;*/
  75. }
  76. .tree {
  77. height: 100%;
  78. }
  79. .trTitle {
  80. width: 100%;
  81. height: 34px;
  82. line-height: 34px;
  83. border-bottom: 1px solid #ebebeb;
  84. color: red;
  85. font-weight: 700;
  86. margin-bottom: 15px;
  87. }
  88. .treeCon {
  89. border: 1px solid #ebebeb;
  90. overflow-y: auto;
  91. }
  92. .ztree li {
  93. width: 100%;
  94. overflow: hidden;
  95. white-space: nowrap;
  96. text-overflow: ellipsis;
  97. }
  98. .content {
  99. width: 270px;
  100. height: 25px;
  101. overflow: hidden;
  102. white-space: nowrap;
  103. text-overflow: ellipsis;
  104. text-align: left;
  105. }
  106. .detail {
  107. width: 80%;
  108. display: block;
  109. margin: 0 auto;
  110. }
  111. </style>
  112. </head>
  113. <body class="gray-bg">
  114. <div class="container-fluid wrapper-content animated fadeInRight">
  115. <div class="daoHang clearfix">
  116. <div class="dhLeft">
  117. <sapn><i class="syIcon"></i>位置:
  118. <a id="ReIndex">首页</a>&gt;
  119. <a href="javaScript:;">知识库</a>&gt;
  120. <a href="" class="nowPosition">知识库答复</a>
  121. </sapn>
  122. </div>
  123. <div class="dhRight">
  124. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  125. </div>
  126. </div>
  127. <div class="toolBar clearfix">
  128. <div class="toolRight">
  129. <span>
  130. 答复状态:<select name="" id="replyState" class="select_">
  131. <option value="-1">全部</option>
  132. <option value="0">新提问</option>
  133. <option value="1">已答复</option>
  134. <option value="2">拒绝答复</option>
  135. <option value="3">已退回</option>
  136. <option value="4">重新答复</option>
  137. </select>
  138. </span>
  139. <button class="btns searchGo">搜索</button>
  140. </div>
  141. </div>
  142. <div class="treeTable clearfix">
  143. <div class="tableCon col-md-12">
  144. <table id="table1" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  145. <thead>
  146. <tr>
  147. <th data-checkbox="true" data-align="center"></th>
  148. <th data-align="center" data-formatter="setCode">编号</th>
  149. <th data-field="KINFO_KNAME" data-align="left">知识库标题</th>
  150. <th data-field="KINFO_KCONTENT" data-align="left">知识库内容</th>
  151. <!--<th data-field="ReKINFO_KNAME" data-align="center">知识库回复标题</th>
  152. <th data-field="ReKINFO_KCONTENT" data-align="left">知识库回复内容</th>
  153. <th data-field="ReUser" data-align="center">回复人</th>-->
  154. <th data-field="F_State" data-formatter="states" data-align="center">状态</th>
  155. <th data-field="F_CreateTime" data-align="center">创建时间</th>
  156. <th data-align="center" data-formatter="caoZuo">操作</th>
  157. </tr>
  158. </thead>
  159. <tbody id="tbody"></tbody>
  160. </table>
  161. </div>
  162. </div>
  163. </div>
  164. <script src="../css/layer/layer.js"></script>
  165. <script src="../js/zTree/jquery.ztree.core.js"></script>
  166. <script src="../js/kindeditor/kindeditor-all-min.js"></script>
  167. <script src="../js/kindeditor/lang/zh-CN.js"></script>
  168. <script src="./js/common.js"></script>
  169. <script>
  170. var token = $.cookie("token");
  171. var table = $('#table1');
  172. var action = $('#action').val(); //动作
  173. var isPass = $('#isPass').val(); //是否审核
  174. //搜索
  175. $('.searchGo').click(function() {
  176. action = $('#action').val();
  177. isPass = $('#isPass').val();
  178. initTable(action, isPass);
  179. })
  180. initTable(action, isPass);
  181. function initTable(action, isPass) {
  182. //先销毁表格
  183. table.bootstrapTable('destroy');
  184. //初始化表格,动态从服务器加载数据
  185. table.bootstrapTable({
  186. method: "get", //使用get请求到服务器获取数据
  187. url: huayi.config.callcenter_url + "Affairs/GetKinfoList", //获取数据的Servlet地址
  188. contentType: "application/x-www-form-urlencoded",
  189. striped: true, //表格显示条纹
  190. pagination: true, //启动分页
  191. pageSize: 10, //每页显示的记录数
  192. pageNumber: 1, //当前第几页
  193. pageList: [10, 20, 50, 100], //记录数可选列表
  194. search: false, //是否启用查询
  195. showColumns: false, //显示下拉框勾选要显示的列
  196. showRefresh: false, //显示刷新按钮
  197. sidePagination: "server", //表示服务端请求
  198. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  199. //设置为limit可以获取limit, offset, search, sort, order
  200. queryParamsType: "undefined",
  201. queryParams: function queryParams(params) { //设置查询参数
  202. var param = {
  203. page: params.pageNumber,
  204. pagesize: params.pageSize,
  205. token: $.cookie("token"),
  206. state:$("#replyState").val()
  207. };
  208. return param;
  209. },
  210. onLoadSuccess: function() { //加载成功时执行
  211. //layer.msg("加载成功");
  212. },
  213. onLoadError: function() { //加载失败时执行
  214. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  215. }
  216. });
  217. }
  218. function setCode(val, row, index) {
  219. return index + 1;
  220. }
  221. function states(val) {
  222. return '<div class="imgs">'+getStateString(val)+'</div>';
  223. }
  224. function caoZuo(val, row) {
  225. var htm = ''
  226. if (row.F_State ==0) {
  227. htm = '<div><button class="btns" onclick="reply(' + row.F_ID + ')">回复按钮</button>'+
  228. '<button class="btns" onclick="refuseReply(' + row.F_ID + ')">拒绝回复</button>'
  229. } else if(row.F_State ==3){
  230. htm = '<div><button class="btns" onclick="reinstate(' + row.F_ID + ')">重新回复</button>'
  231. }
  232. htm += '<button class="btns" onclick="seeConDetail(' + row.F_ID + ')">查看详情</button></div>'
  233. return htm
  234. }
  235. //知识库答复
  236. function reply(id){
  237. layer.open({
  238. type: 2,
  239. content: "./commonHtml/addReply.html?id="+id+'&replyState=1', //iframe的url,no代表不显示滚动条
  240. title: '知识库答复',
  241. area: ['60%', '80%'], //宽高
  242. });
  243. }
  244. //拒绝回复
  245. function refuseReply(id){
  246. layer.open({
  247. type: 2,
  248. content: "./commonHtml/refuseReply.html?id="+id, //iframe的url,no代表不显示滚动条
  249. title: '知识库拒绝答复',
  250. area: ['60%', '80%'], //宽高
  251. });
  252. }
  253. // 重新回复
  254. function reinstate(id){
  255. layer.open({
  256. type: 2,
  257. content: "./commonHtml/addReply.html?id="+id+'&replyState=2', //iframe的url,no代表不显示滚动条
  258. title: '知识库重新答复',
  259. area: ['60%', '80%'], //宽高
  260. });
  261. }
  262. function seeConDetail(id) {
  263. layer.open({
  264. type: 2,
  265. content: "./commonHtml/replyDetail.html?id="+id, //iframe的url,no代表不显示滚动条
  266. title: '查看内容详情',
  267. area: ['60%', '70%'], //宽高
  268. });
  269. }
  270. </script>
  271. </body>
  272. </html>