/** * web调用接口方法 * @author weidy */ layui.define(['layer','element','form','table','util','element'],function(exports){ var Class = function(){ this.MODELNAME = "platform/objectService/OsWebMethods"; this.moduleKey = "OsWebMethods"; this.id='OsWebMethods'; this.sourceData={}; this.columns = []; this.backPath = configData.compatibility?path:configData.objectServicePath; this.url={ controller:'webApiController/', listMethods:'gridWebApiMethodByApiOid' }; this.buttonIconMap = { SEARCH:'layui-icon-refresh-2', SENIORSEARCH:'layui-icon-query', ADD:'layui-icon-add-1', EDIT:'layui-icon-edit', DELETE:'layui-icon-delete' }; this.prototalColor = { 'POST':'GREEN', 'GET':'BLUE', 'PUT':'GRAY', 'DELETE':'RED' }; this.javaTypeMap = { 'java.lang.String':'字符串', 'java.lang.Integer' :'数字', 'int':'数字', 'java.lang.Long':'长数字', 'long':'长数字', 'java.lang.Double':'高精度数字', 'double':'高精度数字', 'short':'数字', 'java.lang.Short':'数字', 'float':'浮点数', 'java.lang.Float':'浮点数', 'java.util.Date':'日期/时间' }; this.getContent=function(){//返回这个组件的基础html var that = this; var html = ""; html = [ '
'); if('java.lang.List' == param.classType){ paramHtml.push("[" + JSON.stringify(that.fieldToShowText(param.paramClassFields)) + "]"); }else{ paramHtml.push(JSON.stringify(that.fieldToShowText(param.paramClassFields)) ); } paramHtml.push(''); paramHtml.push('
'); if('java.lang.List' == param.classType){ paramHtml.push("[" + JSON.stringify(that.fieldToShowText(param.paramClassFields,null,4)) + "]"); }else{ paramHtml.push(JSON.stringify(that.fieldToShowText(param.paramClassFields),null,4) ); } paramHtml.push(''); paramHtml.push('
'); var baseResult = _item.returns.returnResult; if(baseResult.obj){ baseResult.obj = that.fieldToShowText(baseResult.obj); }else if(baseResult.data){ baseResult.data = that.fieldToShowText(baseResult.data); }else if(baseResult.treeData){ baseResult.treeData = that.getTreeField(); } that.switchBaseResult(baseResult); itemHtmls.push(JSON.stringify(baseResult,null, 4)); itemHtmls.push(''); itemHtmls.push('