diff --git a/o2web/source/x_component_query_Query/Statement.js b/o2web/source/x_component_query_Query/Statement.js index 0bab6829733a8f060c52a24294d656e00818a53a..3c0d807040a1b6027d01e3df4f8ce5822075b27d 100644 --- a/o2web/source/x_component_query_Query/Statement.js +++ b/o2web/source/x_component_query_Query/Statement.js @@ -512,6 +512,55 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({ this.searchCustomView(); } }, + searchView: function(){ + debugger; + if (this.viewJson.customFilterList) { + var key = this.viewSearchInputNode.get("value"); + if (key && key !== this.lp.searchKeywork) { + var filterData = []; + this.filterItems = []; + this.viewJson.customFilterList.each(function (entry) { + if (entry.formatType === "textValue") { + var d = { + "path": entry.path, + "value": key, + "formatType": entry.formatType, + "logic": "or", + "comparison": "like" + }; + filterData.push(d); + this.filterItems.push({"data":d}); + } + if (entry.formatType === "numberValue") { + var v = key.toFloat(); + if (!isNaN(v)) { + var d = { + "path": entry.path, + "value": v, + "formatType": entry.formatType, + "logic": "or", + "comparison": "equals" + }; + filterData.push(d); + this.filterItems.push({"data":d}); + } + } + }.bind(this)); + + if( this.json.filter ){ + this.json.filter.clone().each(function(f){ + filterData.push(f); + }) + } + + this.createViewNode({"filterList": filterData}); + }else{ + this.filterItems = []; + var filterData = this.json.filter ? this.json.filter.clone() : []; + this.createViewNode( {"filterList": filterData} ); + } + } + }, //搜索相关结束 getStatementInfor: function () { debugger; @@ -737,15 +786,14 @@ MWF.xApplication.query.Query.Statement.Item = new Class({ //} //序号 + var sequence = 1 + this.view.json.pageSize * (this.view.currentPage - 1) + this.idx; + this.data["$sequence"] = sequence; if (this.view.viewJson.isSequence === "yes") { this.sequenceTd = new Element("td", {"styles": viewContentTdNode}).inject(this.node); this.sequenceTd.setStyle("width", "10px"); - var s = 1 + this.view.json.pageSize * (this.view.currentPage - 1) + this.idx; - this.sequenceTd.set("text", s); + this.sequenceTd.set("text", sequence); } - debugger; - Object.each(this.view.entries, function (c, k) { //if (cell){ if (this.view.hideColumns.indexOf(k) === -1) { diff --git a/o2web/source/x_component_query_Query/Viewer.js b/o2web/source/x_component_query_Query/Viewer.js index 2aa260d18ea39ee4da04b6dafeb9284948a6a5e1..0db4b34e1b8ed3eca8cc90dbcf7aaee11d397e2d 100644 --- a/o2web/source/x_component_query_Query/Viewer.js +++ b/o2web/source/x_component_query_Query/Viewer.js @@ -1814,11 +1814,12 @@ MWF.xApplication.query.Query.Viewer.Item = new Class({ //} //序号 + var sequence = 1+this.view.json.pageSize*(this.view.currentPage-1)+this.idx; + this.data["$sequence"] = sequence; if (this.view.viewJson.isSequence==="yes"){ this.sequenceTd = new Element("td", {"styles": viewContentTdNode}).inject(this.node); this.sequenceTd.setStyle("width", "10px"); - var s= 1+this.view.json.pageSize*(this.view.currentPage-1)+this.idx; - this.sequenceTd.set("text", s); + this.sequenceTd.set("text", sequence); } Object.each(this.view.entries, function(c, k){