appDetailJs.jsp 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
  2. <%@include file="/WEB-INF/ehr/commons/jsp/commonInclude.jsp" %>
  3. <script type="text/javascript">
  4. /* *************************** 模块初始化 ***************************** */
  5. var editorParam = {
  6. //form
  7. init: function () {
  8. this.initForm();
  9. this.bindEvents();
  10. },
  11. initForm: function () {
  12. var me = this;
  13. var data;
  14. var modelString = "${model.id}";
  15. if(modelString!=undefined && modelString!=null && modelString.length>0)
  16. {
  17. data={
  18. id: "${model.id}",
  19. name: "${model.name}",
  20. code: "${model.code}",
  21. status: "${model.status}",
  22. developer: "${model.developer}",
  23. icon: "${model.icon}",
  24. appUrl: "${model.appUrl}",
  25. appKey: "${model.appKey}",
  26. appSecret: "${model.appSecret}",
  27. };
  28. }
  29. $("#div_info_form").ligerAutoForm({
  30. data:data,
  31. validate:{
  32. name:"required",
  33. appUrl:"required",
  34. appKey:"required",
  35. appSecret: {
  36. required:true
  37. }
  38. },
  39. });
  40. },
  41. bindEvents: function () {
  42. var me = this;
  43. $(".m-form-bottom").on("click","#btnCancel",function () {
  44. parent.app.dialog.close();
  45. });
  46. $(".m-form-bottom").on("click","#btnEditor",function () {
  47. //TODO 详情页面变编辑
  48. parent.app.dialog.close();
  49. });
  50. $("#status").ligerComboBox({data : [{"value":"有效","code":"1"},{"value":"无效","code":"0"}],
  51. cancelable:false,
  52. onSuccess:function(data){
  53. }});
  54. liger.get("status")._setValue(${model.status});
  55. }
  56. };
  57. $(function () {
  58. editorParam.init();
  59. });
  60. </script>