浏览代码

发展历程

gzb
wangzhonglu 1年前
父节点
当前提交
18c0ae3d41
共有 3 个文件被更改,包括 503 次插入38 次删除
  1. 23
    24
      index.html
  2. 1
    0
      librarys/bootstrap@3.4.1/bootstrap-datepicker.zh-CN.min.js
  3. 479
    14
      sections/history.html

+ 23
- 24
index.html 查看文件

@@ -141,7 +141,7 @@
141 141
       id="userAddModal"
142 142
       tabindex="-1"
143 143
       role="dialog"
144
-      aria-labelledby="AddTitle"
144
+      aria-labelledby="addTitle"
145 145
     >
146 146
       <div class="modal-dialog" role="document">
147 147
         <div class="modal-content">
@@ -154,10 +154,10 @@
154 154
             >
155 155
               <span aria-hidden="true">&times;</span>
156 156
             </button>
157
-            <h4 class="modal-title" id="AddTitle">添加用户信息</h4>
157
+            <h4 class="modal-title" id="addTitle">添加用户信息</h4>
158 158
           </div>
159 159
           <div class="modal-body">
160
-            <form class="form-horizontal" id="UserAddForm">
160
+            <form class="form-horizontal" id="userAddForm">
161 161
               <div class="form-group">
162 162
                 <label for="usernameInput" class="col-sm-2 control-label"
163 163
                   >用户姓名</label
@@ -545,15 +545,15 @@
545 545
         });
546 546
         $("#userAddModal .add_save").on("click", function () {
547 547
           // 添加表单验证
548
-          $("#UserAddForm").bootstrapValidator({
548
+          $("#userAddForm").bootstrapValidator({
549 549
             // 默认的提示消息
550 550
             message: "请输入内容",
551 551
             // 表单框里右侧的icon
552
-            feedbackIcons: {
553
-              valid: "glyphicon glyphicon-ok",
554
-              invalid: "glyphicon glyphicon-remove",
555
-              validating: "glyphicon glyphicon-refresh",
556
-            },
552
+            // feedbackIcons: {
553
+            //   valid: "glyphicon glyphicon-ok",
554
+            //   invalid: "glyphicon glyphicon-remove",
555
+            //   validating: "glyphicon glyphicon-refresh",
556
+            // },
557 557
             fields: {
558 558
               username: {
559 559
                 validators: {
@@ -602,9 +602,9 @@
602 602
             },
603 603
           });
604 604
           //先校验,在调是否通过校验的方法
605
-          $("#UserAddForm").data("bootstrapValidator").validate();
605
+          $("#userAddForm").data("bootstrapValidator").validate();
606 606
           //校验表单是否通过
607
-          let flag = $("#UserAddForm").data("bootstrapValidator").isValid();
607
+          let flag = $("#userAddForm").data("bootstrapValidator").isValid();
608 608
           if (flag) {
609 609
             let _url = $.baseUrl + "user/save";
610 610
             $.ajax({
@@ -613,11 +613,11 @@
613 613
               dataType: "json",
614 614
               contentType: "application/json; charset=utf-8",
615 615
               data: JSON.stringify({
616
-                username: $("#UserAddForm #usernameInput").val(),
617
-                loginname: $("#UserAddForm #loginnameInput").val(),
618
-                loginpwd: $("#UserAddForm #loginpwdInput").val(),
616
+                username: $("#userAddForm #usernameInput").val(),
617
+                loginname: $("#userAddForm #loginnameInput").val(),
618
+                loginpwd: $("#userAddForm #loginpwdInput").val(),
619 619
                 createid: $.userInfo.userid,
620
-                userphone: $("#UserAddForm #userphoneInput").val(),
620
+                userphone: $("#userAddForm #userphoneInput").val(),
621 621
               }),
622 622
               success: function (data) {
623 623
                 if (data.code === 0) {
@@ -639,7 +639,6 @@
639 639
           $("#userModifyModal").modal("show");
640 640
           $.each(userSearch.list, function (_index, _userItem) {
641 641
             if (_userItem.userid === modify_userid) {
642
-              console.log("modify_userid", _userItem);
643 642
               $("#userModifyForm #m_usernameInput").val(_userItem.username);
644 643
               $("#userModifyForm #m_loginnameInput").val(_userItem.loginname);
645 644
               $("#userModifyForm #m_loginpwdInput").val(_userItem.loginpwd);
@@ -653,11 +652,11 @@
653 652
             // 默认的提示消息
654 653
             message: "请输入内容",
655 654
             // 表单框里右侧的icon
656
-            feedbackIcons: {
657
-              valid: "glyphicon glyphicon-ok",
658
-              invalid: "glyphicon glyphicon-remove",
659
-              validating: "glyphicon glyphicon-refresh",
660
-            },
655
+            // feedbackIcons: {
656
+            //   valid: "glyphicon glyphicon-ok",
657
+            //   invalid: "glyphicon glyphicon-remove",
658
+            //   validating: "glyphicon glyphicon-refresh",
659
+            // },
661 660
             fields: {
662 661
               username: {
663 662
                 validators: {
@@ -681,9 +680,9 @@
681 680
               },
682 681
               loginpwd: {
683 682
                 validators: {
684
-                  notEmpty: {
685
-                    message: "请输入登录密码",
686
-                  },
683
+                  // notEmpty: {
684
+                  //   message: "请输入登录密码",
685
+                  // },
687 686
                   stringLength: {
688 687
                     //长度限制
689 688
                     min: 6,

+ 1
- 0
librarys/bootstrap@3.4.1/bootstrap-datepicker.zh-CN.min.js 查看文件

@@ -0,0 +1 @@
1
+!function(a){a.fn.datepicker.dates["zh-CN"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],daysShort:["周日","周一","周二","周三","周四","周五","周六"],daysMin:["日","一","二","三","四","五","六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今天",monthsTitle:"选择月份",clear:"清除",format:"yyyy-mm-dd",titleFormat:"yyyy年mm月",weekStart:1}}(jQuery);

+ 479
- 14
sections/history.html 查看文件

@@ -39,7 +39,7 @@
39 39
       .header_left #dhyearPicker {
40 40
         margin-right: 16px;
41 41
       }
42
-      .header_left .history_radio {
42
+      .history_radio {
43 43
         cursor: pointer;
44 44
       }
45 45
       .header_left .searchBtn {
@@ -126,10 +126,223 @@
126 126
         <div class="page_next">&gt;</div> -->
127 127
       </div>
128 128
     </div>
129
-
129
+    <!-- 添加发展历程 -->
130
+    <div
131
+      class="modal fade"
132
+      id="historyAddModal"
133
+      tabindex="-1"
134
+      role="dialog"
135
+      aria-labelledby="addTitle"
136
+    >
137
+      <div class="modal-dialog" role="document">
138
+        <div class="modal-content">
139
+          <div class="modal-header">
140
+            <button
141
+              type="button"
142
+              class="close"
143
+              data-dismiss="modal"
144
+              aria-label="Close"
145
+            >
146
+              <span aria-hidden="true">&times;</span>
147
+            </button>
148
+            <h4 class="modal-title" id="addTitle">添加发展历程</h4>
149
+          </div>
150
+          <div class="modal-body">
151
+            <form class="form-horizontal" id="historyAddForm">
152
+              <div class="form-group">
153
+                <label class="col-sm-2 control-label">类型</label>
154
+                <div class="col-sm-10">
155
+                  <div class="radio-inline">
156
+                    <input
157
+                      id="add_0"
158
+                      class="history_radio"
159
+                      name="history_ltype"
160
+                      type="radio"
161
+                      value="1"
162
+                      checked
163
+                    />
164
+                    <label for="add_0" class="history_radio">中文</label>
165
+                  </div>
166
+                  <div class="radio-inline">
167
+                    <input
168
+                      id="add_1"
169
+                      class="history_radio"
170
+                      name="history_ltype"
171
+                      type="radio"
172
+                      value="2"
173
+                    />
174
+                    <label for="add_1" class="history_radio">英文</label>
175
+                  </div>
176
+                </div>
177
+              </div>
178
+              <div class="form-group">
179
+                <label for="addDhyearPicker" class="col-sm-2 control-label"
180
+                  >日期</label
181
+                >
182
+                <div class="col-sm-10">
183
+                  <div class="input-group date" id="addDhyearPicker">
184
+                    <input
185
+                      type="text"
186
+                      class="form-control"
187
+                      name="history_dhyear"
188
+                    />
189
+                    <span class="input-group-addon">
190
+                      <span class="glyphicon glyphicon-calendar"></span>
191
+                    </span>
192
+                  </div>
193
+                </div>
194
+              </div>
195
+              <div class="form-group">
196
+                <label for="contentInput" class="col-sm-2 control-label"
197
+                  >内容</label
198
+                >
199
+                <div class="col-sm-10">
200
+                  <textarea
201
+                    type="text"
202
+                    class="form-control"
203
+                    id="contentInput"
204
+                    name="history_content"
205
+                    placeholder="请输入内容"
206
+                  ></textarea>
207
+                </div>
208
+              </div>
209
+            </form>
210
+          </div>
211
+          <div class="modal-footer">
212
+            <div type="button" class="btn btn-default" data-dismiss="modal">
213
+              取消
214
+            </div>
215
+            <div type="button" class="btn btn-primary add_save">确定</div>
216
+          </div>
217
+        </div>
218
+      </div>
219
+    </div>
220
+    <!-- 修改发展历程 -->
221
+    <div
222
+      class="modal fade"
223
+      id="historyModifyModal"
224
+      tabindex="-1"
225
+      role="dialog"
226
+      aria-labelledby="modifyTitle"
227
+    >
228
+      <div class="modal-dialog" role="document">
229
+        <div class="modal-content">
230
+          <div class="modal-header">
231
+            <button
232
+              type="button"
233
+              class="close"
234
+              data-dismiss="modal"
235
+              aria-label="Close"
236
+            >
237
+              <span aria-hidden="true">&times;</span>
238
+            </button>
239
+            <h4 class="modal-title" id="modifyTitle">修改发展历程</h4>
240
+          </div>
241
+          <div class="modal-body">
242
+            <form class="form-horizontal" id="historyModifyForm">
243
+              <div class="form-group">
244
+                <label class="col-sm-2 control-label">类型</label>
245
+                <div class="col-sm-10">
246
+                  <div class="radio-inline">
247
+                    <input
248
+                      id="modify_0"
249
+                      class="history_radio"
250
+                      name="m_history_ltype"
251
+                      type="radio"
252
+                      value="1"
253
+                      checked
254
+                    />
255
+                    <label for="modify_0" class="history_radio">中文</label>
256
+                  </div>
257
+                  <div class="radio-inline">
258
+                    <input
259
+                      id="modify_1"
260
+                      class="history_radio"
261
+                      name="m_history_ltype"
262
+                      type="radio"
263
+                      value="2"
264
+                    />
265
+                    <label for="modify_1" class="history_radio">英文</label>
266
+                  </div>
267
+                </div>
268
+              </div>
269
+              <div class="form-group">
270
+                <label for="modifyDhyearPicker" class="col-sm-2 control-label"
271
+                  >日期</label
272
+                >
273
+                <div class="col-sm-10">
274
+                  <div class="input-group date" id="modifyDhyearPicker">
275
+                    <input
276
+                      type="text"
277
+                      class="form-control"
278
+                      name="m_history_dhyear"
279
+                    />
280
+                    <span class="input-group-addon">
281
+                      <span class="glyphicon glyphicon-calendar"></span>
282
+                    </span>
283
+                  </div>
284
+                </div>
285
+              </div>
286
+              <div class="form-group">
287
+                <label for="m_contentInput" class="col-sm-2 control-label"
288
+                  >内容</label
289
+                >
290
+                <div class="col-sm-10">
291
+                  <textarea
292
+                    type="text"
293
+                    class="form-control"
294
+                    id="m_contentInput"
295
+                    name="m_history_content"
296
+                    placeholder="请输入内容"
297
+                  ></textarea>
298
+                </div>
299
+              </div>
300
+            </form>
301
+          </div>
302
+          <div class="modal-footer">
303
+            <div type="button" class="btn btn-default" data-dismiss="modal">
304
+              取消
305
+            </div>
306
+            <div type="button" class="btn btn-primary modify_save">确定</div>
307
+          </div>
308
+        </div>
309
+      </div>
310
+    </div>
311
+    <!-- 删除发展历程弹窗 -->
312
+    <div
313
+      class="modal fade"
314
+      id="historyDelModal"
315
+      tabindex="-1"
316
+      role="dialog"
317
+      aria-labelledby="delTitle"
318
+    >
319
+      <div class="modal-dialog tip_modal" role="document">
320
+        <div class="modal-content">
321
+          <div class="modal-header">
322
+            <button
323
+              type="button"
324
+              class="close"
325
+              data-dismiss="modal"
326
+              aria-label="Close"
327
+            >
328
+              <span aria-hidden="true">&times;</span>
329
+            </button>
330
+            <h4 class="modal-title" id="delTitle">提示</h4>
331
+          </div>
332
+          <div class="modal-body">确定删除选中信息?</div>
333
+          <div class="modal-footer">
334
+            <div type="button" class="btn btn-default" data-dismiss="modal">
335
+              取消
336
+            </div>
337
+            <div type="button" class="btn btn-primary del_save">保存</div>
338
+          </div>
339
+        </div>
340
+      </div>
341
+    </div>
130 342
     <script src="../librarys/jquery@1.12.4/jquery.min.js"></script>
131 343
     <script src="../librarys/bootstrap@3.4.1/bootstrap.js"></script>
132 344
     <script src="../librarys/bootstrap@3.4.1/bootstrap-datepicker.js"></script>
345
+    <script src="../librarys/bootstrap@3.4.1/bootstrap-datepicker.zh-CN.min.js"></script>
133 346
     <script src="../librarys/bootstrapValidator@0.5.3/bootstrapValidator.js"></script>
134 347
     <script src="../utils/index.js"></script>
135 348
     <script>
@@ -214,6 +427,189 @@
214 427
             "&type=" +
215 428
             historySearch.type;
216 429
         });
430
+        $(".history_main .header_box .history_add_btn").click(function () {
431
+          $("#historyAddModal").modal("show");
432
+          $("#historyAddModal #addDhyearPicker")
433
+            .datepicker({
434
+              autoclose: true,
435
+              startView: 1,
436
+              maxViewMode: 2,
437
+              minViewMode: 1,
438
+              format: "yyyy-mm",
439
+              language: "zh-CN",
440
+            })
441
+            .datepicker("setDate", "now");
442
+        });
443
+        $("#historyAddModal .add_save").on("click", function () {
444
+          // 添加表单验证
445
+          $("#historyAddForm").bootstrapValidator({
446
+            // 默认的提示消息
447
+            message: "请输入内容",
448
+            // 表单框里右侧的icon
449
+            // feedbackIcons: {
450
+            //   valid: "glyphicon glyphicon-ok",
451
+            //   invalid: "glyphicon glyphicon-remove",
452
+            //   validating: "glyphicon glyphicon-refresh",
453
+            // },
454
+            fields: {
455
+              history_ltype: {
456
+                validators: {
457
+                  notEmpty: {
458
+                    message: "请选择类型",
459
+                  },
460
+                },
461
+              },
462
+              history_dhyear: {
463
+                validators: {
464
+                  notEmpty: {
465
+                    format: "YYYY-MM",
466
+                    message: "请选择日期",
467
+                  },
468
+                },
469
+              },
470
+              history_content: {
471
+                validators: {
472
+                  notEmpty: {
473
+                    message: "请输入内容",
474
+                  },
475
+                },
476
+              },
477
+            },
478
+          });
479
+          //先校验,在调是否通过校验的方法
480
+          $("#historyAddForm").data("bootstrapValidator").validate();
481
+          //校验表单是否通过
482
+          let flag = $("#historyAddForm").data("bootstrapValidator").isValid();
483
+          if (flag) {
484
+            let _url = $.baseUrl + "dh/save";
485
+            let _dhyear = $("#historyAddForm input[name='history_dhyear']").val();
486
+            let _dhmonth = _dhyear && _dhyear.split("-")[1];
487
+            $.ajax({
488
+              type: "POST",
489
+              url: _url,
490
+              dataType: "json",
491
+              contentType: "application/json; charset=utf-8",
492
+              data: JSON.stringify({
493
+                dhyear: _dhyear && _dhyear.split("-")[0],
494
+                dhmonth: Number(_dhmonth) + "月",
495
+                content: $(
496
+                  "#historyAddForm textarea[name='history_content']"
497
+                ).val(),
498
+                ltype: $(
499
+                  "#historyAddForm input[name='history_ltype']:checked"
500
+                ).val(),
501
+                createid: $.userInfo.userid,
502
+              }),
503
+              success: function (data) {
504
+                if (data.code === 0) {
505
+                  window.location.href =
506
+                    "/sections/history.html?page=1&dhyear=" +
507
+                    historySearch.dhyear +
508
+                    "&type=" +
509
+                    historySearch.type;
510
+                } else {
511
+                  alert(data.msg);
512
+                }
513
+              },
514
+            });
515
+          }
516
+        });
517
+        let modify_dhid = null;
518
+        $(".historyTableBody").on("click", ".modify_btn", function () {
519
+          modify_dhid = $(this).data("dhid");
520
+          $("#historyModifyModal").modal("show");
521
+          $.each(historySearch.list, function (_index, _historyItem) {
522
+            if (_historyItem.dhid === modify_dhid) {
523
+              $("#historyModifyForm input[name='m_history_ltype'][value='" + _historyItem.ltype + "']").attr("checked", true);
524
+              let _monthStr = _historyItem.dhyear && _historyItem.dhmonth ? _historyItem.dhmonth.split("月")[0] : "";
525
+              $("#historyModifyModal #modifyDhyearPicker")
526
+              .datepicker({
527
+                autoclose: true,
528
+                startView: 1,
529
+                maxViewMode: 2,
530
+                minViewMode: 1,
531
+                format: "yyyy-mm",
532
+                language: "zh-CN",
533
+              })
534
+              .datepicker("setDate", _monthStr ? _historyItem.dhyear + "-" + (Number(_monthStr) < 9 ? "0" + _monthStr : _monthStr) : "now");
535
+              $("#historyModifyForm textarea[name='m_history_content']").val(_historyItem.content);
536
+            }
537
+          });
538
+        });
539
+        $("#historyModifyModal .modify_save").on("click", function () {
540
+          // 添加表单验证
541
+          $("#historyModifyForm").bootstrapValidator({
542
+            // 默认的提示消息
543
+            message: "请输入内容",
544
+            // 表单框里右侧的icon
545
+            // feedbackIcons: {
546
+            //   valid: "glyphicon glyphicon-ok",
547
+            //   invalid: "glyphicon glyphicon-remove",
548
+            //   validating: "glyphicon glyphicon-refresh",
549
+            // },
550
+            fields: {
551
+              history_ltype: {
552
+                validators: {
553
+                  notEmpty: {
554
+                    message: "请选择类型",
555
+                  },
556
+                },
557
+              },
558
+              history_dhyear: {
559
+                validators: {
560
+                  notEmpty: {
561
+                    format: "YYYY-MM",
562
+                    message: "请选择日期",
563
+                  },
564
+                },
565
+              },
566
+              history_content: {
567
+                validators: {
568
+                  notEmpty: {
569
+                    message: "请输入内容",
570
+                  },
571
+                },
572
+              },
573
+            },
574
+          });
575
+          //先校验,在调是否通过校验的方法
576
+          $("#historyModifyForm").data("bootstrapValidator").validate();
577
+          //校验表单是否通过
578
+          let flag = $("#historyModifyForm").data("bootstrapValidator").isValid();
579
+          if (flag) {
580
+            let _url = $.baseUrl + "dh/update";
581
+            let _dhyear = $("#historyModifyForm input[name='m_history_dhyear']").val();
582
+            let _dhmonth = _dhyear && _dhyear.split("-")[1];
583
+            $.ajax({
584
+              type: "POST",
585
+              url: _url,
586
+              dataType: "json",
587
+              contentType: "application/json; charset=utf-8",
588
+              data: JSON.stringify({
589
+                dhid: modify_dhid,
590
+                dhyear: _dhyear && _dhyear.split("-")[0],
591
+                dhmonth: Number(_dhmonth) + "月",
592
+                content: $(
593
+                  "#historyModifyForm textarea[name='m_history_content']"
594
+                ).val(),
595
+                ltype: $(
596
+                  "#historyModifyForm input[name='m_history_ltype']:checked"
597
+                ).val(),
598
+              }),
599
+              success: function (data) {
600
+                if (data.code === 0) {
601
+                  window.location.href =
602
+                    "/sections/history.html?page=1&dhyear=" +
603
+                    historySearch.dhyear +
604
+                    "&type=" +
605
+                    historySearch.type;
606
+                } else {
607
+                  alert(data.msg);
608
+                }
609
+              },
610
+            });
611
+          }
612
+        });
217 613
         // 获取用户列表
218 614
         function getHistoryList() {
219 615
           $.ajax({
@@ -247,7 +643,9 @@
247 643
           $.each(historySearch.list, function (_historyIndex, _historyItem) {
248 644
             historyTableBodyHtml +=
249 645
               "<tr><td>" +
250
-              (_historyIndex + 1 + (historySearch.page - 1) * historySearch.size) +
646
+              (_historyIndex +
647
+                1 +
648
+                (historySearch.page - 1) * historySearch.size) +
251 649
               "</td><td>" +
252 650
               (_historyItem.dhyear ? _historyItem.dhyear : "") +
253 651
               "</td><td>" +
@@ -255,7 +653,7 @@
255 653
               "</td><td>" +
256 654
               (_historyItem.ltype === 1 ? "中文" : "英文") +
257 655
               "</td><td>" +
258
-                (_historyItem.content ? _historyItem.content : "") +
656
+              (_historyItem.content ? _historyItem.content : "") +
259 657
               "</td><td>" +
260 658
               (_historyItem.createname ? _historyItem.createname : "") +
261 659
               "</td><td>" +
@@ -269,28 +667,28 @@
269 667
           $(".historyTableBody").html(historyTableBodyHtml);
270 668
           let del_dhid = null;
271 669
           $(".historyTableBody").on("click", ".del_btn", function () {
272
-            $("#userDelModal").modal("show");
670
+            $("#historyDelModal").modal("show");
273 671
             del_dhid = $(this).data("dhid");
274 672
           });
275
-          $("#userDelModal .del_save").on("click", function () {
673
+          $("#historyDelModal .del_save").on("click", function () {
276 674
             $.ajax({
277 675
               type: "POST",
278
-              url: $.baseUrl + "user/del",
676
+              url: $.baseUrl + "dh/remove",
279 677
               dataType: "json",
280 678
               contentType: "application/json; charset=utf-8",
281 679
               data: JSON.stringify({
282 680
                 dhid: del_dhid,
283 681
               }),
284 682
               success: function (data) {
285
-                $("#userDelModal").modal("hide");
683
+                $("#historyDelModal").modal("hide");
286 684
                 if (data.code === 0) {
287 685
                   window.location.href =
288
-                    "/index.html?page=" +
686
+                    "/sections/history.html?page=" +
289 687
                     historySearch.page +
290
-                    "&userstate=" +
291
-                    historySearch.userstate +
292
-                    "&username=" +
293
-                    historySearch.username;
688
+                    "&dhyear=" +
689
+                    historySearch.dhyear +
690
+                    "&type=" +
691
+                    historySearch.type;
294 692
                 } else {
295 693
                   alert(data.msg);
296 694
                 }
@@ -298,8 +696,75 @@
298 696
             });
299 697
           });
300 698
         }
699
+        // 设置页码信息
301 700
         function setPageList() {
302
-          
701
+          let pageBoxHtml =
702
+            '<div class="page_prev ' +
703
+            (historySearch.page === 1 ? "disabled" : "") +
704
+            '">&lt;</div>';
705
+          for (
706
+            let _pageIndex = 0;
707
+            _pageIndex < Math.ceil(historySearch.total / historySearch.size);
708
+            _pageIndex++
709
+          ) {
710
+            pageBoxHtml +=
711
+              '<div data-page="' +
712
+              (_pageIndex + 1) +
713
+              '" class="page_num ' +
714
+              (_pageIndex + 1 === historySearch.page ? "selected" : "") +
715
+              '">' +
716
+              (_pageIndex + 1) +
717
+              "</div>";
718
+          }
719
+          pageBoxHtml +=
720
+            '<div class="page_next ' +
721
+            (historySearch.page ===
722
+            Math.ceil(historySearch.total / historySearch.size)
723
+              ? "disabled"
724
+              : "") +
725
+            '">&gt;</div>';
726
+          if (historySearch.total > 0) {
727
+            $(".history_page.page_box").html(pageBoxHtml);
728
+            $(".history_page.page_box").on("click", ".page_prev", function () {
729
+              if (historySearch.page > 1) {
730
+                historySearch.page--;
731
+                window.location.href =
732
+                  "/sections/history.html?page=" +
733
+                  historySearch.page +
734
+                  "&dhyear=" +
735
+                  historySearch.dhyear +
736
+                  "&type=" +
737
+                  historySearch.type;
738
+              }
739
+            });
740
+            $(".history_page.page_box").on("click", ".page_num", function () {
741
+              historySearch.page = $(this).data("page");
742
+              window.location.href =
743
+                "/sections/history.html?page=" +
744
+                historySearch.page +
745
+                "&dhyear=" +
746
+                historySearch.dhyear +
747
+                "&type=" +
748
+                historySearch.type;
749
+            });
750
+            $(".history_page.page_box").on("click", ".page_next", function () {
751
+              if (
752
+                historySearch.page <
753
+                Math.ceil(historySearch.total / historySearch.size)
754
+              ) {
755
+                historySearch.page++;
756
+                window.location.href =
757
+                  "/sections/history.html?page=" +
758
+                  historySearch.page +
759
+                  "&dhyear=" +
760
+                  historySearch.dhyear +
761
+                  "&type=" +
762
+                  historySearch.type;
763
+              }
764
+            });
765
+          } else {
766
+            $(".history_page.page_box").html("");
767
+          }
303 768
         }
304 769
         getHistoryList();
305 770
       });

正在加载...
取消
保存