/** * 代码预览 * @author weidy * @date 2020/08/3 */ layui.define(['layer','element','code','util'],function(exports){ var Class = function(){ this.MODELNAME = "platform/objectService/OsCodePreview"; this.moduleKey = "OsCodePreview"; this.id='OsCodePreview'; this.sourceData={}; this.columns = []; this.backPath = configData.compatibility?path:configData.objectServicePath; this.url={ controller:'codeGenSchemaController/', preview:'previewCodeFile' }; this.getContent=function(){ var that = this; var html = ""; html = [ '
' + result.obj[key] + ""); } if(!"PO" in result.obj){ $("#" + that.id + "_PO").html(""); } layui.element.render(); }else{ $webUtil.showErrorMsg(result.msg); } },function(xhr,error){ $webUtil.showErrorMsg("查看代码内容失败,可能是服务器没有启动"); },that.backPath); } }; var cs = new Class(); exports(cs.MODELNAME,cs); });