You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Index.js 4.4 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2020-02-10 19:21
  5. * 描 述:疫情接触外人
  6. */
  7. var selectedRow;
  8. var refreshGirdData;
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. page.initGird();
  14. page.bind();
  15. },
  16. bind: function () {
  17. // 查询
  18. $('#btn_Search').on('click', function () {
  19. var keyword = $('#txt_Keyword').val();
  20. page.search({ keyword: keyword });
  21. });
  22. // 刷新
  23. $('#lr_refresh').on('click', function () {
  24. location.reload();
  25. });
  26. // 新增
  27. $('#lr_add').on('click', function () {
  28. selectedRow = null;
  29. learun.layerForm({
  30. id: 'form',
  31. title: '新增',
  32. url: top.$.rootUrl + '/PersonnelManagement/EpiPeopleDetails/Form',
  33. width: 700,
  34. height: 400,
  35. callBack: function (id) {
  36. return top[id].acceptClick(refreshGirdData);
  37. }
  38. });
  39. });
  40. // 编辑
  41. $('#lr_edit').on('click', function () {
  42. var keyValue = $('#gridtable').jfGridValue('ID');
  43. selectedRow = $('#gridtable').jfGridGet('rowdata');
  44. if (learun.checkrow(keyValue)) {
  45. learun.layerForm({
  46. id: 'form',
  47. title: '编辑',
  48. url: top.$.rootUrl + '/PersonnelManagement/EpiPeopleDetails/Form?keyValue=' + keyValue,
  49. width: 700,
  50. height: 400,
  51. callBack: function (id) {
  52. return top[id].acceptClick(refreshGirdData);
  53. }
  54. });
  55. }
  56. });
  57. // 删除
  58. $('#lr_delete').on('click', function () {
  59. var keyValue = $('#gridtable').jfGridValue('ID');
  60. if (learun.checkrow(keyValue)) {
  61. learun.layerConfirm('是否确认删除该项!', function (res) {
  62. if (res) {
  63. learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/EpiPeopleDetails/DeleteForm', { keyValue: keyValue}, function () {
  64. });
  65. }
  66. });
  67. }
  68. });
  69. },
  70. initGird: function () {
  71. $('#gridtable').lrAuthorizeJfGrid({
  72. url: top.$.rootUrl + '/PersonnelManagement/EpiPeopleDetails/GetPageList',
  73. headData: [
  74. { label: '编号', name: 'ID', width: 200, align: "left" },
  75. { label: '姓名', name: 'Name', width: 200, align: "left" },
  76. { label: '性别', name: 'Gender', width: 200, align: "left" },
  77. { label: '联系方式', name: 'Mobile', width: 200, align: "left" },
  78. { label: '隔离方式', name: 'QTType', width: 200, align: "left" },
  79. { label: '隔离地点', name: 'QTAddress', width: 200, align: "left" },
  80. { label: '隔离时间', name: 'QTTime', width: 200, align: "left" },
  81. { label: '接触隔离时间', name: 'QTContactTime', width: 200, align: "left" },
  82. { label: '异常表现', name: 'Fever', width: 200, align: "left" },
  83. { label: '主表ID', name: 'EID', width: 200, align: "left" },
  84. { label: '省', name: 'Province', width: 200, align: "left" },
  85. { label: '市', name: 'City', width: 200, align: "left" },
  86. { label: '区', name: 'Area', width: 200, align: "left" },
  87. ],
  88. mainId:'ID',
  89. isPage: true
  90. });
  91. page.search();
  92. },
  93. search: function (param) {
  94. param = param || {};
  95. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  96. }
  97. };
  98. refreshGirdData = function () {
  99. page.search();
  100. };
  101. page.init();
  102. }