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.
 
 
 
 
 
 

63 lines
2.4 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2024-09-12 09:46
  5. * 描 述:安全排查流程
  6. */
  7. var acceptClick;
  8. var keyValue = request('keyValue');
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. $('.lr-form-wrap').lrscroll();
  14. page.bind();
  15. page.initData();
  16. },
  17. bind: function () {
  18. $('#Name')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
  19. $('#Name').val(learun.clientdata.get(['userinfo']).realName);
  20. $('#Department')[0].lrvalue = learun.clientdata.get(['userinfo']).departmentId;
  21. $('#Department').lrselectSet(learun.clientdata.get(['userinfo']).departmentId);
  22. //$('#Department').val(learun.clientdata.get(['userinfo']).departmentId);
  23. learun.clientdata.getAsync('department', {
  24. key: learun.clientdata.get(['userinfo']).departmentId,
  25. callback: function (_data) {
  26. $('#Department').val(_data.name);
  27. }
  28. });
  29. $('#Path').lrUploader();
  30. },
  31. initData: function () {
  32. if (!!keyValue) {
  33. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/GetFormData?keyValue=' + keyValue, function (data) {
  34. for (var id in data) {
  35. if (!!data[id].length && data[id].length > 0) {
  36. $('#' + id ).jfGridSet('refreshdata', data[id]);
  37. }
  38. else {
  39. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  40. }
  41. }
  42. });
  43. }
  44. }
  45. };
  46. // 保存数据
  47. acceptClick = function (callBack) {
  48. if (!$('body').lrValidform()) {
  49. return false;
  50. }
  51. var postData = {
  52. strEntity: JSON.stringify($('body').lrGetFormData())
  53. };
  54. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/SaveForm?keyValue=' + keyValue, postData, function (res) {
  55. // 保存成功后才回调
  56. if (!!callBack) {
  57. callBack();
  58. }
  59. });
  60. };
  61. page.init();
  62. }