官网 管理后台
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

history.html 11KB

il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
il y a 1 an
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <!DOCTYPE html>
  2. <html lang="zh-cn">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <title>河南星火燎原软件科技有限公司</title>
  8. <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
  9. <link rel="stylesheet" href="../librarys/bootstrap@3.4.1/bootstrap.css" />
  10. <link
  11. rel="stylesheet"
  12. href="../librarys/bootstrap@3.4.1/bootstrap-datepicker.css"
  13. />
  14. <link
  15. rel="stylesheet"
  16. href="../librarys/bootstrapValidator@0.5.3/bootstrapValidator.css"
  17. />
  18. <link rel="stylesheet" href="../css/comm.css" />
  19. <link rel="stylesheet" href="../css/header.css" />
  20. <style>
  21. body {
  22. background-color: #fff;
  23. }
  24. .history_main {
  25. margin: 20px auto;
  26. width: 1000px;
  27. }
  28. .history_main .header_box {
  29. display: flex;
  30. justify-content: space-between;
  31. align-items: center;
  32. margin-bottom: 10px;
  33. }
  34. .header_left {
  35. display: flex;
  36. justify-content: flex-start;
  37. align-items: center;
  38. }
  39. .header_left #dhyearPicker {
  40. margin-right: 16px;
  41. }
  42. .header_left .history_radio {
  43. cursor: pointer;
  44. }
  45. .header_left .searchBtn {
  46. margin-left: 16px;
  47. }
  48. .history_main .table.table-bordered th {
  49. text-align: center;
  50. background-color: #f7f7f7;
  51. }
  52. .history_main .table.table-bordered td {
  53. text-align: center;
  54. background-color: #fff;
  55. }
  56. .history_main .table.table-bordered .action_btn {
  57. margin: 0 10px;
  58. cursor: pointer;
  59. }
  60. </style>
  61. </head>
  62. <body>
  63. <div class="top_header_root" data-header_page="history">
  64. <div class="header_html_root">
  65. <div class="header_html_item" data-url="index">用户信息</div>
  66. <div class="header_html_item" data-url="history">发展历程</div>
  67. <div class="header_html_item" data-url="service">服务案例</div>
  68. <div class="header_html_item" data-url="school">学校图标</div>
  69. <div class="header_html_item" data-url="trial">申请试用</div>
  70. <div class="header_html_item" data-url="news">新闻资讯</div>
  71. <div class="header_html_item" data-url="log">登录日志</div>
  72. </div>
  73. </div>
  74. <div class="history_main">
  75. <div class="header_box">
  76. <div class="header_left">
  77. <div class="input-group date" id="dhyearPicker">
  78. <input type="text" class="form-control" name="dhyear" />
  79. <span class="input-group-addon">
  80. <span class="glyphicon glyphicon-calendar"></span>
  81. </span>
  82. </div>
  83. <div class="radio-inline">
  84. <input
  85. id="s_0"
  86. class="history_radio"
  87. name="history_type"
  88. type="radio"
  89. value="1"
  90. />
  91. <label for="s_0" class="history_radio">中文</label>
  92. </div>
  93. <div class="radio-inline">
  94. <input
  95. id="s_1"
  96. class="history_radio"
  97. name="history_type"
  98. type="radio"
  99. value="2"
  100. />
  101. <label for="s_1" class="history_radio">英文</label>
  102. </div>
  103. <div type="button" class="btn btn-primary searchBtn">搜索</div>
  104. </div>
  105. <div type="button" class="btn btn-primary history_add_btn">添加</div>
  106. </div>
  107. <table class="table table-bordered">
  108. <thead>
  109. <tr>
  110. <th style="width: 60px">序号</th>
  111. <th style="width: 80px">年份</th>
  112. <th style="width: 80px">月份</th>
  113. <th style="width: 80px">类型</th>
  114. <th>内容</th>
  115. <th style="width: 100px">创建人</th>
  116. <th style="width: 160px">创建时间</th>
  117. <th style="width: 140px">操作</th>
  118. </tr>
  119. </thead>
  120. <tbody class="historyTableBody"></tbody>
  121. </table>
  122. <div class="history_page page_box">
  123. <!-- <div class="page_prev disabled">&lt;</div>
  124. <div data-page="1" class="page_num selected">1</div>
  125. <div class="page_num">2</div>
  126. <div class="page_next">&gt;</div> -->
  127. </div>
  128. </div>
  129. <script src="../librarys/jquery@1.12.4/jquery.min.js"></script>
  130. <script src="../librarys/bootstrap@3.4.1/bootstrap.js"></script>
  131. <script src="../librarys/bootstrap@3.4.1/bootstrap-datepicker.js"></script>
  132. <script src="../librarys/bootstrapValidator@0.5.3/bootstrapValidator.js"></script>
  133. <script src="../utils/index.js"></script>
  134. <script>
  135. $(function () {
  136. let page_url = $(".top_header_root").data("header_page");
  137. $(
  138. '.header_html_root .header_html_item[data-url="' + page_url + '"]'
  139. ).addClass("selected");
  140. $(".header_html_root").on("click", ".header_html_item", function () {
  141. let _url = $(this).data("url");
  142. if (_url === "index") {
  143. window.location.href = "/index.html";
  144. } else {
  145. window.location.href = "/sections/" + _url + ".html";
  146. }
  147. });
  148. if (!$.isLogin()) {
  149. window.location.href = "/sections/login.html";
  150. return;
  151. }
  152. let historySearch = {
  153. page: Number($.getQueryletiable("page")) || 1,
  154. size: 10,
  155. dhyear:
  156. $.getQueryletiable("dhyear") || new Date().getFullYear().toString(),
  157. type: Number($.getQueryletiable("type")) || 1,
  158. total: 0,
  159. list: []
  160. };
  161. $(".header_left #dhyearPicker")
  162. .datepicker({
  163. autoclose: true,
  164. startView: 2,
  165. maxViewMode: 2,
  166. minViewMode: 2,
  167. format: "yyyy",
  168. language: "zh-CN"
  169. })
  170. .datepicker("setDate", String(historySearch.dhyear));
  171. $(".header_left #dhyearPicker input[name='dhyear']").on(
  172. "change",
  173. function () {
  174. historySearch.dhyear = $(this).val();
  175. window.location.href =
  176. "/sections/history.html?page=" +
  177. historySearch.page +
  178. "&dhyear=" +
  179. historySearch.dhyear +
  180. "&type=" +
  181. historySearch.type;
  182. }
  183. );
  184. $(".header_left input[name='history_type']").each(function (
  185. _index,
  186. _typeItem
  187. ) {
  188. if (Number($(_typeItem).val()) === historySearch.type) {
  189. $(_typeItem).attr("checked", true);
  190. } else {
  191. $(_typeItem).attr("checked", false);
  192. }
  193. });
  194. $(".header_left").on(
  195. "click",
  196. 'input:radio[name="history_type"]',
  197. function () {
  198. window.location.href =
  199. "/sections/history.html?page=" +
  200. historySearch.page +
  201. "&dhyear=" +
  202. historySearch.dhyear +
  203. "&type=" +
  204. $('.header_left input:radio[name="history_type"]:checked').val();
  205. }
  206. );
  207. $(".header_left .searchBtn").click(function () {
  208. window.location.href =
  209. "/sections/history.html?page=" +
  210. historySearch.page +
  211. "&dhyear=" +
  212. historySearch.dhyear +
  213. "&type=" +
  214. historySearch.type;
  215. });
  216. // 获取用户列表
  217. function getHistoryList() {
  218. $.ajax({
  219. type: "POST",
  220. url: $.baseUrl + "dh/list",
  221. dataType: "json",
  222. contentType: "application/json; charset=utf-8",
  223. data: JSON.stringify({
  224. page: historySearch.page,
  225. size: historySearch.size,
  226. dhyear: historySearch.dhyear,
  227. type: historySearch.type
  228. }),
  229. success: function (data) {
  230. if (data.code === 0) {
  231. historySearch.total = data.obj.total;
  232. historySearch.list = data.obj.list;
  233. setTableHtml();
  234. setPageList();
  235. } else {
  236. historySearch.total = 0;
  237. historySearch.list = [];
  238. alert(data.msg);
  239. }
  240. }
  241. });
  242. }
  243. // 设置表格信息
  244. function setTableHtml() {
  245. let historyTableBodyHtml = "";
  246. $.each(historySearch.list, function (_historyIndex, _historyItem) {
  247. historyTableBodyHtml +=
  248. "<tr><td>" +
  249. (_historyIndex +
  250. 1 +
  251. (historySearch.page - 1) * historySearch.size) +
  252. "</td><td>" +
  253. (_historyItem.dhyear ? _historyItem.dhyear : "") +
  254. "</td><td>" +
  255. (_historyItem.dhmonth ? _historyItem.dhmonth : "") +
  256. "</td><td>" +
  257. (_historyItem.ltype === 1 ? "中文" : "英文") +
  258. "</td><td>" +
  259. (_historyItem.content ? _historyItem.content : "") +
  260. "</td><td>" +
  261. (_historyItem.createname ? _historyItem.createname : "") +
  262. "</td><td>" +
  263. $.dateFormat(_historyItem.createtime) +
  264. '</td><td><span class="my_theme_color action_btn modify_btn" data-dhid="' +
  265. _historyItem.dhid +
  266. '">修改</span><span class="my_theme_color">|</span><span class="del_color action_btn del_btn" data-dhid="' +
  267. _historyItem.dhid +
  268. '">删除</span></td></tr>';
  269. });
  270. $(".historyTableBody").html(historyTableBodyHtml);
  271. let del_dhid = null;
  272. $(".historyTableBody").on("click", ".del_btn", function () {
  273. $("#userDelModal").modal("show");
  274. del_dhid = $(this).data("dhid");
  275. });
  276. $("#userDelModal .del_save").on("click", function () {
  277. $.ajax({
  278. type: "POST",
  279. url: $.baseUrl + "user/del",
  280. dataType: "json",
  281. contentType: "application/json; charset=utf-8",
  282. data: JSON.stringify({
  283. dhid: del_dhid
  284. }),
  285. success: function (data) {
  286. $("#userDelModal").modal("hide");
  287. if (data.code === 0) {
  288. window.location.href =
  289. "/index.html?page=" +
  290. historySearch.page +
  291. "&userstate=" +
  292. historySearch.userstate +
  293. "&username=" +
  294. historySearch.username;
  295. } else {
  296. alert(data.msg);
  297. }
  298. }
  299. });
  300. });
  301. }
  302. function setPageList() {}
  303. getHistoryList();
  304. });
  305. </script>
  306. </body>
  307. </html>