index.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <% layout('/layouts/default.html', {title: '咨询帮助首页', bodyClass: ''}){ %>
  2. <div id="pageayout" class="border" style="overflow: auto; padding: 0px;">
  3. <div id='help' class="help" style="margin: 10px;background: #fff; ">
  4. <div style="width: 100%;height: 100%;display: flex;justify-content: space-around;padding-top: 20px;">
  5. <div style="width:98%;height: 100%;margin:1%">
  6. <input type="text" id="searchType" value="全部">
  7. <div style="width: 100%;padding: 10px 0; display: flex;align-items: center;justify-content: space-between;">
  8. <div style="display: flex;align-items: center;">
  9. <div>状态:</div>
  10. <div class="dropdown">
  11. <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
  12. <span class="dataLabel">所有</span>
  13. <span class="caret"></span>
  14. </button>
  15. <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
  16. <li><a href="javascript:void(0);" onclick="changeLabel(this)" data="全部">所有</a></li>
  17. <li><a href="javascript:void(0);" onclick="changeLabel(this)" data="me">我的</a></li>
  18. </ul>
  19. </div>
  20. </div>
  21. <div style="display: flex;align-items: center;">
  22. <div>回复:</div>
  23. <div class="dropdown">
  24. <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
  25. 所有
  26. <span class="caret"></span>
  27. </button>
  28. <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
  29. <li><a href="http://192.168.1.56:8081/fwzx/zxbz#">所有</a></li>
  30. <li><a href="http://192.168.1.56:8081/fwzx/zxbz#">已回复</a></li>
  31. <li><a href="http://192.168.1.56:8081/fwzx/zxbz#">未回复</a></li>
  32. </ul>
  33. </div>
  34. </div>
  35. <div class="input-group">
  36. <input type="text" class="form-control" placeholder="请输入相关键词" aria-describedby="basic-addon2">
  37. <span class="input-group-addon" id="basic-addon2">
  38. <button style="border: none;" onclick="fetchData()">搜索</button>
  39. </span>
  40. </div>
  41. <div class="btn-group" role="group" aria-label="...">
  42. <button type="button" class="btn btn-default" onclick="toAddConsult()">我要咨询</button>
  43. </div>
  44. </div>
  45. <div style="width: 100%;height: 85%;overflow: auto;" class="frameBody">
  46. <div style="width: 100%;height: auto;background-color: #eee;padding: 10px 20px;margin-bottom: 15px;">
  47. <div class="media">
  48. <div class="media-left">
  49. <a href="http://192.168.1.56:8081/fwzx/zxbz#">
  50. <div style="width:50px;height:50px;border-radius:50%;background-color:#fff;display: flex;justify-content: space-around;align-items: center;overflow: hidden; ">
  51. <img class="media-object" src="./Document_files/wd1.png" width="40px">
  52. </div>
  53. </a>
  54. </div>
  55. <div class="media-body" style="">
  56. <h4 class="media-heading">${data}</h4>
  57. <div>怎么报英语四六级</div>
  58. </div>
  59. </div>
  60. <div style="width: 100%;display: flex;justify-content: flex-end;">
  61. <a>回复</a> <span>|</span> <a>评论(20)</a>
  62. </div>
  63. <div style="width:85%;margin-left: 15%;border-top: 1px solid #ccc;margin-top: 5px;">
  64. <div style="width: 100%;padding:10px 0 10px 20px;border-bottom: 1px solid #ccc;">
  65. <div style="width: 100%;display: flex;justify-content: space-between;align-items: center;">
  66. <div style="font-size: 16px;color:#2766b3;">
  67. 教务处:
  68. </div>
  69. <div style="color: #888;">2022-3-14 13:00 <a>评论</a></div>
  70. </div>
  71. <div style="margin-top: 4px;">需要用校园网,考试成绩达标</div>
  72. </div>
  73. <div style="width: 100%;padding:10px 0 10px 20px;border-bottom: 1px solid #ccc;">
  74. <div style="width: 100%;display: flex;justify-content: space-between;align-items: center;">
  75. <div style="font-size: 16px;color:#2766b3;">
  76. 小王同学:
  77. </div>
  78. <div style="color: #888;">2022-3-14 13:00 <a>评论</a></div>
  79. </div>
  80. <div style="margin-top: 4px;">英语成绩要70分及以上</div>
  81. </div>
  82. </div>
  83. <div style="width: 100%;display: flex;justify-content: flex-end;align-items: baseline;margin-top:10px;">
  84. <div style="color: #888;margin-right: 4px;">剩余3条评论</div>
  85. <a>点击查看</a>
  86. <button onclick="toAddComment()" style="border-color: #ccc;color: #2766b3;background-color: #fff;margin-left: 4px;">我要评论</button>
  87. </div>
  88. </div>
  89. </div>
  90. <div style="bottom: 0;width: 100%;text-align: center;">
  91. <nav aria-label="Page navigation">
  92. <ul class="pagination">
  93. <li>
  94. <a href="http://192.168.1.56:8081/fwzx/zxbz#" aria-label="Previous">
  95. <span aria-hidden="true">«</span>
  96. </a>
  97. </li>
  98. <li class="active"><a href="http://192.168.1.56:8081/fwzx/zxbz#">1</a></li>
  99. <li><a href="http://192.168.1.56:8081/fwzx/zxbz#">2</a></li>
  100. <li><a href="http://192.168.1.56:8081/fwzx/zxbz#">3</a></li>
  101. <li><a href="http://192.168.1.56:8081/fwzx/zxbz#">4</a></li>
  102. <li><a href="http://192.168.1.56:8081/fwzx/zxbz#">5</a></li>
  103. <li>
  104. <a href="http://192.168.1.56:8081/fwzx/zxbz#" aria-label="Next">
  105. <span aria-hidden="true">»</span>
  106. </a>
  107. </li>
  108. </ul>
  109. </nav>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. <% } %>
  116. <style>
  117. html,body{
  118. background-color: white;
  119. height: auto;
  120. }
  121. </style>
  122. <script src="${ctxStatic}/schedule/fullcalendar/js/jquery-1.7.2.min.js"></script>
  123. <script src="${ctxStatic}/schedule/jquery-ui/jquery-ui.min.js"></script>
  124. <script type='text/javascript'>
  125. var tempDataList = null;
  126. $(document).ready(function () {
  127. // js.showErrorMessage('hello');
  128. fetchData()
  129. });
  130. //获取遍历的list数据
  131. function fetchData(){
  132. var searchType = $("#searchType").val();
  133. js.ajaxSubmit("${ctx}/consult/consultHelp/allDataList?searchType="+searchType, function(data){
  134. tempDataList = data.list
  135. initDomEle(tempDataList)
  136. });
  137. }
  138. function initDomEle(list){
  139. console.log(list)
  140. //todo 使用freemarker遍历渲染dom
  141. $(".frameBody").empty();
  142. var domEleOld = '<div style="width: 100%;height: auto;background-color: #eee;padding: 10px 20px;margin-bottom: 15px;">\n' +
  143. '<div class="media">\n' +
  144. '<div class="media-left">\n' +
  145. '<a href="http://192.168.1.56:8081/fwzx/zxbz#">\n' +
  146. '<div style="width:50px;height:50px;border-radius:50%;background-color:#fff;display: flex;justify-content: space-around;align-items: center;overflow: hidden; ">\n' +
  147. '<img class="media-object" src="./Document_files/wd1.png" width="40px">\n' +
  148. '</div>\n' +
  149. '</a>\n' +
  150. '</div>\n' +
  151. '<div class="media-body" style="">\n' +
  152. '<h4 class="media-heading">${data}</h4>\n' +
  153. ' <div>怎么报英语四六级</div>\n' +
  154. '</div>\n' +
  155. '</div>\n' +
  156. '<div style="width: 100%;display: flex;justify-content: flex-end;">\n' +
  157. '<a>回复</a> <span>|</span> <a>评论(20)</a>\n' +
  158. '</div>\n' +
  159. '<div style="width:85%;margin-left: 15%;border-top: 1px solid #ccc;margin-top: 5px;">\n' +
  160. '<div style="width: 100%;padding:10px 0 10px 20px;border-bottom: 1px solid #ccc;">\n' +
  161. '<div style="width: 100%;display: flex;justify-content: space-between;align-items: center;">\n' +
  162. '<div style="font-size: 16px;color:#2766b3;">\n' +
  163. '教务处:\n' +
  164. '</div>\n' +
  165. '<div style="color: #888;">2022-3-14 13:00 <a>评论</a></div>\n' +
  166. '</div>\n' +
  167. '<div style="margin-top: 4px;">需要用校园网,考试成绩达标</div>\n' +
  168. '</div>\n' +
  169. '<div style="width: 100%;padding:10px 0 10px 20px;border-bottom: 1px solid #ccc;">\n' +
  170. '<div style="width: 100%;display: flex;justify-content: space-between;align-items: center;">\n' +
  171. '<div style="font-size: 16px;color:#2766b3;">\n' +
  172. '小王同学:\n' +
  173. '</div>\n' +
  174. '<div style="color: #888;">2022-3-14 13:00 <a>评论</a></div>\n' +
  175. '</div>\n' +
  176. '<div style="margin-top: 4px;">英语成绩要70分及以上</div>\n' +
  177. '</div>\n' +
  178. '</div>\n' +
  179. '<div style="width: 100%;display: flex;justify-content: flex-end;align-items: baseline;margin-top:10px;">\n' +
  180. '<div style="color: #888;margin-right: 4px;">剩余3条评论</div>\n' +
  181. '<a>点击查看</a>\n' +
  182. '<button onclick="toAddComment()" style="border-color: #ccc;color: #2766b3;background-color: #fff;margin-left: 4px;">我要评论</button>\n' +
  183. '</div>\n' +
  184. '</div>';
  185. var domEle = '<div style="width: 100%;height: auto;background-color: #eee;padding: 10px 20px;margin-bottom: 15px;">\n' +
  186. '\t\t\t\t\t\t<div class="media">\n' +
  187. '\t\t\t\t\t\t\t<div class="media-left">\n' +
  188. '\t\t\t\t\t\t\t\t<a href="http://192.168.1.56:8081/fwzx/zxbz#">\n' +
  189. '\t\t\t\t\t\t\t\t\t<div style="width:50px;height:50px;border-radius:50%;background-color:#fff;display: flex;justify-content: space-around;align-items: center;overflow: hidden; ">\n' +
  190. '\t\t\t\t\t\t\t\t\t\t<img class="media-object" src="./Document_files/wd1.png" width="40px">\n' +
  191. '\t\t\t\t\t\t\t\t\t</div>\n' +
  192. '\t\t\t\t\t\t\t\t</a>\n' +
  193. '\t\t\t\t\t\t\t</div>\n' +
  194. '\t\t\t\t\t\t\t<div class="media-body" style="">\n' +
  195. '\t\t\t\t\t\t\t\t<h4 class="media-heading">${data}</h4>\n' +
  196. '\t\t\t\t\t\t\t\t<div>怎么报英语四六级</div>\n' +
  197. '\t\t\t\t\t\t\t</div>\n' +
  198. '\t\t\t\t\t\t</div>\n' +
  199. '\t\t\t\t\t\t<div style="width: 100%;display: flex;justify-content: flex-end;">\n' +
  200. '\t\t\t\t\t\t\t<a>回复</a> <span>|</span> <a>评论(20)</a>\n' +
  201. '\t\t\t\t\t\t</div>\n' +
  202. '\t\t\t\t\t\t<div style="width:85%;margin-left: 15%;border-top: 1px solid #ccc;margin-top: 5px;">\n' +
  203. '\t\t\t\t\t\t\t<div style="width: 100%;padding:10px 0 10px 20px;border-bottom: 1px solid #ccc;">\n' +
  204. '\t\t\t\t\t\t\t\t<div style="width: 100%;display: flex;justify-content: space-between;align-items: center;">\n' +
  205. '\t\t\t\t\t\t\t\t\t<div style="font-size: 16px;color:#2766b3;">\n' +
  206. '\t\t\t\t\t\t\t\t\t\t教务处:\n' +
  207. '\t\t\t\t\t\t\t\t\t</div>\n' +
  208. '\t\t\t\t\t\t\t\t\t<div style="color: #888;">2022-3-14 13:00 <a>评论</a></div>\n' +
  209. '\t\t\t\t\t\t\t\t</div>\n' +
  210. '\t\t\t\t\t\t\t\t<div style="margin-top: 4px;">需要用校园网,考试成绩达标</div>\n' +
  211. '\t\t\t\t\t\t\t</div>\n' +
  212. '\t\t\t\t\t\t\t<div style="width: 100%;padding:10px 0 10px 20px;border-bottom: 1px solid #ccc;">\n' +
  213. '\t\t\t\t\t\t\t\t<div style="width: 100%;display: flex;justify-content: space-between;align-items: center;">\n' +
  214. '\t\t\t\t\t\t\t\t\t<div style="font-size: 16px;color:#2766b3;">\n' +
  215. '\t\t\t\t\t\t\t\t\t\t小王同学:\n' +
  216. '\t\t\t\t\t\t\t\t\t</div>\n' +
  217. '\t\t\t\t\t\t\t\t\t<div style="color: #888;">2022-3-14 13:00 <a>评论</a></div>\n' +
  218. '\t\t\t\t\t\t\t\t</div>\n' +
  219. '\t\t\t\t\t\t\t\t<div style="margin-top: 4px;">英语成绩要70分及以上</div>\n' +
  220. '\t\t\t\t\t\t\t</div>\n' +
  221. '\t\t\t\t\t\t</div>\n' +
  222. '\t\t\t\t\t\t<div style="width: 100%;display: flex;justify-content: flex-end;align-items: baseline;margin-top:10px;">\n' +
  223. '\t\t\t\t\t\t\t<div style="color: #888;margin-right: 4px;">剩余3条评论</div>\n' +
  224. '\t\t\t\t\t\t\t<a>点击查看</a>\n' +
  225. '\t\t\t\t\t\t\t<button onclick="toAddComment()" style="border-color: #ccc;color: #2766b3;background-color: #fff;margin-left: 4px;">我要评论</button>\n' +
  226. '\t\t\t\t\t\t</div>\n' +
  227. '\t\t\t\t\t</div>';
  228. $(".frameBody").append($(domEle))
  229. }
  230. //跳转到添加咨询页面处
  231. function toAddConsult(){
  232. js.addTabPage(null, "新增咨询帮助", "${ctx}/consult/consultHelp/form2")
  233. }
  234. //发表评论
  235. function toAddComment(id){
  236. id="1534367119269007360"
  237. js.addTabPage(null, "新增咨询评论", "${ctx}/consult/consultHelpSlave/form?consultId="+id)
  238. }
  239. //状态下拉修改数据
  240. function changeLabel(obj){
  241. $("#dropdownMenu1 .dataLabel").text($(obj).text());
  242. $("#searchType").val($(obj).attr('data'))
  243. }
  244. </script>