config.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. var systemCode = "adimanagerserver"; //系统编码 ,这个框架,这个意义不大。
  2. var systemName = "ADI管理平台"; //系统名称
  3. var copyRight = "<center><b>版权说明:</b>西安前沿动力软件开发有限责任公司</center>"; //版权所有
  4. var sysWebAppName = window.location.protocol+"//"+window.location.host+"/"+systemCode+"/";//应用路径 正式服
  5. // var sysWebAppName = window.location.protocol+"//"+window.location.hostname+":8080/"+systemCode+"/";//应用路径 测试服
  6. // var sysWebAppName = window.location.protocol+"//192.168.0.43:8080/"+systemCode+"/";//应用路径 测试服
  7. var successCode = '000000000'| '0000000'; //成功编码
  8. var ajaxTimeout = 10000; //ajax提交超时时间(毫秒)
  9. var signPlugId = 'isign';
  10. var serverUrl = sysWebAppName+'manager/trademark/TransServlet';//微服务地址要在内管做代理,匹配连接里的字段
  11. var serverGzlUrl = sysWebAppName+'manager/gzl/TransServlet';
  12. var gzlBrowser = sysWebAppName+'manager/browser/TransServlet';//区块链服务地址
  13. var xgitalser = "http://adicn.com/adi/service/TransServlet"
  14. var fileServerUrl =serverUrl+"/?"+"transCode=B00022&channelNo=manager&userId="+localStorage.getItem("userid")+"&clientToken="+localStorage.getItem("token")+"&id=";
  15. $.excludeUrlMap =null;//转发的transcode对应的网址
  16. //ztree缺省设置
  17. var ztreeSetting = {
  18. check: {
  19. enable: true,
  20. chkboxType: { "Y" : "ps", "N" : "ps" }
  21. },
  22. view: {
  23. dblClickExpand: false
  24. },
  25. data: {
  26. simpleData: {
  27. enable: true
  28. }
  29. }
  30. };
  31. $.__token = window.parent.$configs == undefined ? null : window.parent.$configs.token; //token全局配置
  32. $.mapData = window.parent.$configs == undefined ? null : window.parent.$configs.mapData; //mapData全局标准数据配置
  33. $.mapDataGrid = null; //存储grid的control数据
  34. var __mask = 0; //mask变量
  35. var __login = 0; //重新登录提示控制
  36. var __themes = ['blue','green','red','black']; //主题配置参数
  37. //datagrid扩展方法
  38. $.extend($.fn.datagrid.methods,{
  39. getValue:function(jq){
  40. //zhs
  41. var row = jq.datagrid('getSelected');
  42. if(row){
  43. var opts = jq.datagrid("options");
  44. if(opts && opts.idField){
  45. return row[opts.idField];
  46. }
  47. }
  48. return "";
  49. },
  50. getValues:function(jq){
  51. //zhs
  52. var rows = jq.datagrid('getSelections');
  53. if(rows){
  54. var opts = jq.datagrid("options");
  55. if(opts && opts.idField){
  56. var aa = [];
  57. for(i in rows){
  58. aa.push(rows[i][opts.idField]);
  59. }
  60. return aa;
  61. }
  62. }
  63. return [];
  64. },
  65. setValues:function(jq,values){
  66. //zhs
  67. jq.datagrid("unselectAll");
  68. values instanceof Array ? values = values : values = [values];
  69. for(i in values){
  70. jq.datagrid('setValue',values[i]);
  71. }
  72. },
  73. setValue:function(jq,value){
  74. //zhs
  75. return jq.each(function(){
  76. var opts = $.data(this, 'datagrid').options;
  77. if (opts.idField){
  78. if(opts.singleSelect){
  79. $(this).datagrid("unselectAll");
  80. }
  81. $(this).datagrid('selectRecord',value);
  82. }
  83. });
  84. }
  85. });
  86. //treegrid扩展方法
  87. $.extend($.fn.treegrid.methods,{
  88. setValue:function(jq,value){
  89. //zhs
  90. return jq.each(function(){
  91. $(this).datagrid('selectRow', value);
  92. });
  93. },
  94. setValues:function(jq,values){
  95. //zhs
  96. values instanceof Array ? values = values : values = [values];
  97. for(i in values){
  98. jq.treegrid('setValue',values[i]);
  99. }
  100. },
  101. getValue:function(jq){
  102. var node = jq.treegrid('getSelected');
  103. if(node){
  104. var opts = jq.treegrid('options');
  105. if(opts && opts.idField){
  106. return node[opts.idField];
  107. }
  108. }
  109. return "";
  110. },
  111. getValues:function(jq){
  112. var nodes = jq.treegrid('getSelections');
  113. if(nodes){
  114. var opts = jq.treegrid('options');
  115. if(opts && opts.idField){
  116. var aa = [];
  117. for(i in nodes){
  118. aa.push(nodes[i][opts.idField]);
  119. }
  120. return aa;
  121. }
  122. }
  123. return null;
  124. }
  125. });