提交 1641e635 编写于 作者: NoSubject's avatar NoSubject

Merge branch 'fix/gulpfile' into 'wrdp'

增加Table自键表操作的api

See merge request o2oa/o2oa!5896
......@@ -1929,7 +1929,7 @@ MWF.xScript.CMSEnvironment = function(ev){
MWF.xScript.createTable = function(){
return function(name){
this.name = name;
this.action = o2.Actions.get("x_query_assemble_surface");
this.action = o2.Actions.load("x_query_assemble_surface").TableAction;
this.listRowNext = function(id, count, success, error, async){
this.action.listRowNext(this.name, id, count, success, error, async);
......@@ -1937,8 +1937,8 @@ MWF.xScript.createTable = function(){
this.listRowPrev = function(id, count, success, error, async){
this.action.listRowPrev(this.name, id, count, success, error, async);
};
this.listRowPrev = function(id, count, success, error, async){
this.action.listRowPrev(this.name, id, count, success, error, async);
this.listRowSelect = function(where, orderBy, size, success, error, async){
this.action.listRowSelect(this.name, {"where": where, "orderBy": orderBy, "size": size || ""}, success, error, async);
};
this.listRowSelectWhere = function(where, success, error, async){
this.action.listRowSelectWhere(this.name, where, success, error, async);
......@@ -1947,19 +1947,19 @@ MWF.xScript.createTable = function(){
this.action.listRowCountWhere(this.name, where, success, error, async);
};
this.deleteRow = function(id, success, error, async){
this.action.deleteRow(this.name, id, success, error, async);
this.action.rowDelete(this.name, id, success, error, async);
};
this.deleteAllRow = function(success, error, async){
this.action.deleteAllRow(this.name, success, error, async);
this.action.rowDeleteAll(this.name, success, error, async);
};
this.getRow = function(id, success, error, async){
this.action.getRow(this.name, id, success, error, async);
this.action.rowGet(this.name, id, success, error, async);
};
this.insertRow = function(data, success, error, async){
this.action.insertRow(this.name, data, success, error, async);
this.action.rowInsert(this.name, data, success, error, async);
};
this.updateRow = function(id, data, success, error, async){
this.action.updateRow(this.name, id, data, success, error, async);
this.action.rowUpdate(this.name, id, data, success, error, async);
};
}
};
......
......@@ -3314,7 +3314,7 @@ MWF.xScript.Environment = function(ev){
MWF.xScript.createTable = function(){
return function(name){
this.name = name;
this.action = o2.Actions.get("x_query_assemble_surface");
this.action = o2.Actions.load("x_query_assemble_surface").TableAction;
this.listRowNext = function(id, count, success, error, async){
this.action.listRowNext(this.name, id, count, success, error, async);
......@@ -3322,8 +3322,8 @@ MWF.xScript.createTable = function(){
this.listRowPrev = function(id, count, success, error, async){
this.action.listRowPrev(this.name, id, count, success, error, async);
};
this.listRowPrev = function(id, count, success, error, async){
this.action.listRowPrev(this.name, id, count, success, error, async);
this.listRowSelect = function(where, orderBy, size, success, error, async){
this.action.listRowSelect(this.name, {"where": where, "orderBy": orderBy, "size": size || ""}, success, error, async);
};
this.listRowSelectWhere = function(where, success, error, async){
this.action.listRowSelectWhere(this.name, where, success, error, async);
......@@ -3332,19 +3332,19 @@ MWF.xScript.createTable = function(){
this.action.listRowCountWhere(this.name, where, success, error, async);
};
this.deleteRow = function(id, success, error, async){
this.action.deleteRow(this.name, id, success, error, async);
this.action.rowDelete(this.name, id, success, error, async);
};
this.deleteAllRow = function(success, error, async){
this.action.deleteAllRow(this.name, success, error, async);
this.action.rowDeleteAll(this.name, success, error, async);
};
this.getRow = function(id, success, error, async){
this.action.getRow(this.name, id, success, error, async);
this.action.rowGet(this.name, id, success, error, async);
};
this.insertRow = function(data, success, error, async){
this.action.insertRow(this.name, data, success, error, async);
this.action.rowInsert(this.name, data, success, error, async);
};
this.updateRow = function(id, data, success, error, async){
this.action.updateRow(this.name, id, data, success, error, async);
this.action.rowUpdate(this.name, id, data, success, error, async);
};
}
};
......
......@@ -2159,7 +2159,7 @@ if (!MWF.xScript || !MWF.xScript.PageEnvironment) {
if (!MWF.xScript.createTable) MWF.xScript.createTable = function(){
return function(name){
this.name = name;
this.action = o2.Actions.get("x_query_assemble_surface");
this.action = o2.Actions.load("x_query_assemble_surface").TableAction;
this.listRowNext = function(id, count, success, error, async){
this.action.listRowNext(this.name, id, count, success, error, async);
......@@ -2167,8 +2167,8 @@ if (!MWF.xScript.createTable) MWF.xScript.createTable = function(){
this.listRowPrev = function(id, count, success, error, async){
this.action.listRowPrev(this.name, id, count, success, error, async);
};
this.listRowPrev = function(id, count, success, error, async){
this.action.listRowPrev(this.name, id, count, success, error, async);
this.listRowSelect = function(where, orderBy, size, success, error, async){
this.action.listRowSelect(this.name, {"where": where, "orderBy": orderBy, "size": size || ""}, success, error, async);
};
this.listRowSelectWhere = function(where, success, error, async){
this.action.listRowSelectWhere(this.name, where, success, error, async);
......@@ -2177,19 +2177,19 @@ if (!MWF.xScript.createTable) MWF.xScript.createTable = function(){
this.action.listRowCountWhere(this.name, where, success, error, async);
};
this.deleteRow = function(id, success, error, async){
this.action.deleteRow(this.name, id, success, error, async);
this.action.rowDelete(this.name, id, success, error, async);
};
this.deleteAllRow = function(success, error, async){
this.action.deleteAllRow(this.name, success, error, async);
this.action.rowDeleteAll(this.name, success, error, async);
};
this.getRow = function(id, success, error, async){
this.action.getRow(this.name, id, success, error, async);
this.action.rowGet(this.name, id, success, error, async);
};
this.insertRow = function(data, success, error, async){
this.action.insertRow(this.name, data, success, error, async);
this.action.rowInsert(this.name, data, success, error, async);
};
this.updateRow = function(id, data, success, error, async){
this.action.updateRow(this.name, id, data, success, error, async);
this.action.rowUpdate(this.name, id, data, success, error, async);
};
}
};
......
......@@ -4784,7 +4784,45 @@ MWF.xScript.ViewEnvironment = function (ev) {
o2.Actions.get("x_query_assemble_surface").executeStatement(option.name, json, success, error, options.async);
}
};
// this.Table = MWF.xScript.createTable();
this.Table = MWF.xScript.createTable();
};
MWF.xScript.createTable = function(){
return function(name){
this.name = name;
this.action = o2.Actions.load("x_query_assemble_surface").TableAction;
this.listRowNext = function(id, count, success, error, async){
this.action.listRowNext(this.name, id, count, success, error, async);
};
this.listRowPrev = function(id, count, success, error, async){
this.action.listRowPrev(this.name, id, count, success, error, async);
};
this.listRowSelect = function(where, orderBy, size, success, error, async){
this.action.listRowSelect(this.name, {"where": where, "orderBy": orderBy, "size": size || ""}, success, error, async);
};
this.listRowSelectWhere = function(where, success, error, async){
this.action.listRowSelectWhere(this.name, where, success, error, async);
};
this.listRowCountWhere = function(where, success, error, async){
this.action.listRowCountWhere(this.name, where, success, error, async);
};
this.deleteRow = function(id, success, error, async){
this.action.rowDelete(this.name, id, success, error, async);
};
this.deleteAllRow = function(success, error, async){
this.action.rowDeleteAll(this.name, success, error, async);
};
this.getRow = function(id, success, error, async){
this.action.rowGet(this.name, id, success, error, async);
};
this.insertRow = function(data, success, error, async){
this.action.rowInsert(this.name, data, success, error, async);
};
this.updateRow = function(id, data, success, error, async){
this.action.rowUpdate(this.name, id, data, success, error, async);
};
}
};
......
......@@ -827,6 +827,43 @@ bind.Actions = _Actions;
print = function(str, type){}
bind.print = print;
var _Table = function(name){
this.name = name;
this.action = o2.Actions.load("x_query_assemble_surface").TableAction;
this.listRowNext = function(id, count, success, error, async){
this.action.listRowNext(this.name, id, count, success, error, async);
};
this.listRowPrev = function(id, count, success, error, async){
this.action.listRowPrev(this.name, id, count, success, error, async);
};
this.listRowSelect = function(where, orderBy, size, success, error, async){
this.action.listRowSelect(this.name, {"where": where, "orderBy": orderBy, "size": size || ""}, success, error, async);
};
this.listRowSelectWhere = function(where, success, error, async){
this.action.listRowSelectWhere(this.name, where, success, error, async);
};
this.listRowCountWhere = function(where, success, error, async){
this.action.listRowCountWhere(this.name, where, success, error, async);
};
this.deleteRow = function(id, success, error, async){
this.action.rowDelete(this.name, id, success, error, async);
};
this.deleteAllRow = function(success, error, async){
this.action.rowDeleteAll(this.name, success, error, async);
};
this.getRow = function(id, success, error, async){
this.action.rowGet(this.name, id, success, error, async);
};
this.insertRow = function(data, success, error, async){
this.action.rowInsert(this.name, data, success, error, async);
};
this.updateRow = function(id, data, success, error, async){
this.action.rowUpdate(this.name, id, data, success, error, async);
};
}
bind.Table = _Table;
bind.library = library;
bind.data = this.data;
bind.workContext = wrapWorkContext;
......
......@@ -1055,6 +1055,42 @@ bind.include = _include;
var work = wrapWorkContext.getWork();
bind.Dict = _createDict((work) ? work.application : "");
bind.Table = function(name){
this.name = name;
this.action = _Actions.load("x_query_assemble_surface").TableAction;
this.listRowNext = function(id, count, success, error, async){
this.action.listRowNext(this.name, id, count, success, error, async);
};
this.listRowPrev = function(id, count, success, error, async){
this.action.listRowPrev(this.name, id, count, success, error, async);
};
this.listRowSelect = function(where, orderBy, size, success, error, async){
this.action.listRowSelect(this.name, {"where": where, "orderBy": orderBy, "size": size || ""}, success, error, async);
};
this.listRowSelectWhere = function(where, success, error, async){
this.action.listRowSelectWhere(this.name, where, success, error, async);
};
this.listRowCountWhere = function(where, success, error, async){
this.action.listRowCountWhere(this.name, where, success, error, async);
};
this.deleteRow = function(id, success, error, async){
this.action.rowDelete(this.name, id, success, error, async);
};
this.deleteAllRow = function(success, error, async){
this.action.rowDeleteAll(this.name, success, error, async);
};
this.getRow = function(id, success, error, async){
this.action.rowGet(this.name, id, success, error, async);
};
this.insertRow = function(data, success, error, async){
this.action.rowInsert(this.name, data, success, error, async);
};
this.updateRow = function(id, data, success, error, async){
this.action.rowUpdate(this.name, id, data, success, error, async);
};
}
bind.library = library;
bind.data = this.data;
bind.workContext = wrapWorkContext;
......
......@@ -3301,6 +3301,42 @@ var _org = {
}
};
bind.Table = function(name){
this.name = name;
this.action = _Actions.load("x_query_assemble_surface").TableAction;
this.listRowNext = function(id, count, success, error, async){
this.action.listRowNext(this.name, id, count, success, error, async);
};
this.listRowPrev = function(id, count, success, error, async){
this.action.listRowPrev(this.name, id, count, success, error, async);
};
this.listRowSelect = function(where, orderBy, size, success, error, async){
this.action.listRowSelect(this.name, {"where": where, "orderBy": orderBy, "size": size || ""}, success, error, async);
};
this.listRowSelectWhere = function(where, success, error, async){
this.action.listRowSelectWhere(this.name, where, success, error, async);
};
this.listRowCountWhere = function(where, success, error, async){
this.action.listRowCountWhere(this.name, where, success, error, async);
};
this.deleteRow = function(id, success, error, async){
this.action.rowDelete(this.name, id, success, error, async);
};
this.deleteAllRow = function(success, error, async){
this.action.rowDeleteAll(this.name, success, error, async);
};
this.getRow = function(id, success, error, async){
this.action.rowGet(this.name, id, success, error, async);
};
this.insertRow = function(data, success, error, async){
this.action.rowInsert(this.name, data, success, error, async);
};
this.updateRow = function(id, data, success, error, async){
this.action.rowUpdate(this.name, id, data, success, error, async);
};
}
bind.org = _org;
bind.library = library;
bind.define = _define;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册