提交 74bbaa47 编写于 作者: 蔡祥熠

Merge branch 'hotfix/query_search' into 'master'

Merge of hotfix/query_search 视图、查询视图数据中增加序号,修复查询视图搜索条件为数字时报错的问题  to develop

See merge request o2oa/o2oa!359

(cherry picked from commit 2192dd12)

5fb74f8c 视图、查询视图数据中增加序号,修复查询视图搜索条件为数字时报错的问题
上级 b1ddcaf0
......@@ -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) {
......
......@@ -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){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册