diff --git a/o2web/source/x_component_query_TableDesigner/Table.js b/o2web/source/x_component_query_TableDesigner/Table.js index 485d10aec8ee462c04a94b7aa83bdd13ca08c5af..844e79e0fd08db7f62585f8a19c51cd8169a3530 100644 --- a/o2web/source/x_component_query_TableDesigner/Table.js +++ b/o2web/source/x_component_query_TableDesigner/Table.js @@ -532,29 +532,34 @@ MWF.xApplication.query.TableDesigner.Table = new Class({ if (!e) e = this.node; this.designer.actions.listTable(this.designer.application.id, function (json) { - var bulidStr = ""; - var draftStr = ""; - debugger; - json.data.each(function(table){ - if( table.status === "build" ){ - bulidStr += "
" + table.name + "
"; - }else{ - draftStr += "
" + table.name + "
"; - } - }.bind(this)); - var html = ""; - if( bulidStr ){ - var h1 = MWF.APPDTBD.LP.buildCurrentAppInfor; - var h2 = "
"+bulidStr+"
"; - html += h1.replace("{buildlist}", h2); - } - if( draftStr ){ - var h3 = MWF.APPDTBD.LP.unbuildCurrentAppInfor; - var h4 = "
"+draftStr+"
"; - html += h3.replace("{draftList}", h4); + if( json.data.length === 0 ){ + this.designer.notice(this.designer.lp.buildNoTableError, "info", this.node, {"x": "left", "y": "bottom"}); + return; + }else{ + var bulidStr = ""; + var draftStr = ""; + debugger; + json.data.each(function(table){ + if( table.status === "build" ){ + bulidStr += "
" + table.name + "
"; + }else{ + draftStr += "
" + table.name + "
"; + } + }.bind(this)); + + if( bulidStr ){ + var h1 = MWF.APPDTBD.LP.buildCurrentAppInfor; + var h2 = "
"+bulidStr+"
"; + html += h1.replace("{buildlist}", h2); + } + if( draftStr ){ + var h3 = MWF.APPDTBD.LP.unbuildCurrentAppInfor; + var h4 = "
"+draftStr+"
"; + html += h3.replace("{draftList}", h4); + } + html += MWF.APPDTBD.LP.buildCurrentAppQuection; } - html += MWF.APPDTBD.LP.buildCurrentAppQuection; this.designer.confirm("warn", e, MWF.APPDTBD.LP.buildCurrentAppTitle, { "html": html diff --git a/o2web/source/x_component_query_TableDesigner/lp/en.js b/o2web/source/x_component_query_TableDesigner/lp/en.js index 419fb172452f9578561ef360929b24c3a33a317c..c7f9ba48242a7c517ee219b7ea2b22dcdadb0282 100644 --- a/o2web/source/x_component_query_TableDesigner/lp/en.js +++ b/o2web/source/x_component_query_TableDesigner/lp/en.js @@ -66,6 +66,7 @@ MWF.xApplication.query.TableDesigner.LP = { "tableExplodeInfo": "By default, up to 2000 rows can be exported. Are you sure you want to export?", "tableExplode_success": "Export successful", + "buildNoTableError": "The current application has no data table, no need to compile.", "buildCurrentAppTitle": "Build current application data table", "buildCurrentAppInfor": "The following data tables will be built:
{buildlist}", "unbuildCurrentAppInfor": "The following data tables are not compiled or uncompiled:
{draftList}", diff --git a/o2web/source/x_component_query_TableDesigner/lp/zh-cn.js b/o2web/source/x_component_query_TableDesigner/lp/zh-cn.js index eb3151e9b1c10978c4d3f609c846a8e943330e3d..f7768bd98b777b9d29b006af2a5bd862f556b562 100644 --- a/o2web/source/x_component_query_TableDesigner/lp/zh-cn.js +++ b/o2web/source/x_component_query_TableDesigner/lp/zh-cn.js @@ -66,6 +66,7 @@ MWF.xApplication.query.TableDesigner.LP = { "tableExplodeInfo": "默认最多导出2000行。确认是否导出?", "tableExplode_success": "导出成功", + "buildNoTableError": "当前应用还没有数据表,不需要编译。", "buildCurrentAppTitle": "编译当前应用数据表", "buildCurrentAppInfor": "下列数据表将被编译:
{buildlist}", "unbuildCurrentAppInfor": "下列数据表不编译或取消编译:
{draftList}",