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.5 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-11-19 09:47
  5. * 描 述:实习基地建设
  6. */
  7. var refreshGirdData;
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var page = {
  11. init: function () {
  12. page.initGird();
  13. page.bind();
  14. },
  15. bind: function () {
  16. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  17. page.search(queryJson);
  18. }, 220, 400);
  19. // 刷新
  20. $('#lr_refresh').on('click', function () {
  21. location.reload();
  22. });
  23. // 新增
  24. $('#lr_add').on('click', function () {
  25. learun.layerForm({
  26. id: 'form',
  27. title: '新增',
  28. url: top.$.rootUrl + '/EducationalAdministration/PracticeBase/Form',
  29. width: 600,
  30. height: 400,
  31. callBack: function (id) {
  32. return top[id].acceptClick(refreshGirdData);
  33. }
  34. });
  35. });
  36. // 编辑
  37. $('#lr_edit').on('click', function () {
  38. var keyValue = $('#gridtable').jfGridValue('ID');
  39. if (learun.checkrow(keyValue)) {
  40. learun.layerForm({
  41. id: 'form',
  42. title: '编辑',
  43. url: top.$.rootUrl + '/EducationalAdministration/PracticeBase/Form?keyValue=' + keyValue,
  44. width: 600,
  45. height: 400,
  46. callBack: function (id) {
  47. return top[id].acceptClick(refreshGirdData);
  48. }
  49. });
  50. }
  51. });
  52. //岗位管理
  53. $('#lr_post').on('click',
  54. function() {
  55. var keyValue = $('#gridtable').jfGridValue('ID');
  56. if (learun.checkrow(keyValue)) {
  57. learun.layerFormForPercent({
  58. id: 'formIndex',
  59. title: '岗位管理',
  60. url: top.$.rootUrl + '/EducationalAdministration/PBPost/Index?PBID=' + keyValue,
  61. width: '80%',
  62. height: '80%',
  63. callBack: function (id) {
  64. return top[id].acceptClick(refreshGirdData);
  65. }
  66. });
  67. }
  68. });
  69. // 删除
  70. $('#lr_delete').on('click', function () {
  71. var keyValue = $('#gridtable').jfGridValue('ID');
  72. if (learun.checkrow(keyValue)) {
  73. learun.layerConfirm('是否确认删除该项!', function (res) {
  74. if (res) {
  75. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/PracticeBase/DeleteForm', { keyValue: keyValue}, function () {
  76. refreshGirdData();
  77. });
  78. }
  79. });
  80. }
  81. });
  82. },
  83. // 初始化列表
  84. initGird: function () {
  85. $('#gridtable').lrAuthorizeJfGrid({
  86. url: top.$.rootUrl + '/EducationalAdministration/PracticeBase/GetPageList',
  87. headData: [
  88. { label: "名称", name: "Name", width: 100, align: "left"},
  89. { label: "地址", name: "Address", width: 100, align: "left"},
  90. { label: "规模", name: "Scale", width: 100, align: "left"},
  91. { label: "支持项目", name: "SupportProjets", width: 100, align: "left"},
  92. { label: "负责人", name: "Head", width: 100, align: "left"},
  93. { label: "联系方式", name: "Mobile", width: 100, align: "left"},
  94. { label: "备注", name: "Remark", width: 100, align: "left"},
  95. ],
  96. mainId:'ID',
  97. isPage: true
  98. });
  99. page.search();
  100. },
  101. search: function (param) {
  102. param = param || {};
  103. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  104. }
  105. };
  106. refreshGirdData = function () {
  107. page.search();
  108. };
  109. page.init();
  110. }