var datas={},root="",schemeRoot="",genTableListContentVm=new Vue({el:"#genTableListContent",data:function(){return{pageLoading:!0,pageDictMap:{}}},computed:{formBaseUrl:function(){return getRelativePath()+"getTableForm.html?editType="},dataLogicTypeDict:function(){return this.pageDictMap.data_logic_type},requestPrefix:function(){var e=window.__CODEGEN_CONFIG__;return e.gatewayRoute+e.direwolfAdmin+"/codegen"}},created:function(){var t=this;checkPagePermission(t.requestPrefix+"/checkGenTablePermission");var e=new ProjectConfig;root=e.proxyPath+t.requestPrefix,schemeRoot=e.proxyPath+window.__CODEGEN_CONFIG__.gatewayRoute+window.__CODEGEN_CONFIG__.direwolfAdmin+"/genScheme",initDicts();var o="获取字典信息";axios.get(dictUrl+"data_logic_type").then(function(e){t.pageDictMap=getDataFromAxiosResponse(e,o).data,t.pageLoading=!1}).catch(function(e){axiosErrorTips(e,o+"异常")})},mounted:function(){$("#searchBtn").on("click",queryProcess),$("#canSearchBtn").on("click",cancelSearch),$("#genCodeBtn").on("click",genCode),$("#editBtn").on("click",editTable),$("#importFromDb").on("click",importFromDb),$("#genMenuBtn").on("click",createMenu),$("#refreshBtn").on("click",queryProcess)}});function initDicts(){$.ajax({url:root+"/genTableDict",type:"post",contentType:"application/json; charset=UTF-8",success:function(e){datas=e,initTable()},error:function(){toastr.error("操作失败")}})}function initTable(){var e=root+"/genTableData";$("#gen-table").bootstrapTable({url:e,columns:[{checkbox:!0},{field:"name",title:"名称",sortable:!0,formatter:function(e,t,o){return'"+e+""}},{field:"tableAlias",title:"记录别名",sortable:!0},{field:"comments",title:"说明"},{field:"className",title:"类名",sortable:!0},{field:"dataLogicType",title:"数据类型",sortable:!0,formatter:function(e,t,o){return datas.data_logic_type[e]}},{field:"genDatasource.dsName",title:"数据源",sortable:!0},{title:"操作",formatter:function(e,t,o){return initLink(t)}}],pagination:!0,clickToSelect:!0,singleSelect:!0,pageSize:10,sortOrder:"desc",pageList:[10,20,30],queryParams:function(e){return queryProcessParam(e)},sidePagination:"server",silentSort:!1})}function queryProcess(){var e=queryProcessParam(null);$("#gen-table").bootstrapTable("refresh",{url:root+"/genTableData",query:e})}function cancelSearch(){$("#genTableForm .form-control").val(null),queryProcess()}function genCode(){var c=$("#gen-table").bootstrapTable("getSelections");0!==c.length?1";e.id,e.id;return t+("")+("")+("")}