|
发表于 2022-9-20 10:48:59
|
显示全部楼层
本帖最后由 s724520 于 2022-9-20 10:55 编辑
大佬,在麻烦一下 ,相应代码已增加,查询还是有问题,付上截图劳烦大佬看看。
感觉像是path不对,但是不太清楚在哪里确定path
增加代码:
var view = this.form.get("view");
var filterList = [];
if(this.form.get("zcbh").getData()){
filterList.push({
"logic": "and",
"path": "bh",
"comparison": "like",
"value": this.form.get("zcbh").getData(),
"formatType": "textValue",
"type": "restrict",
"title": "",
"code": {"code":"return \""+this.form.get("zcbh").getData()+"\";","html":"return \""+this.form.get("zcbh").getData()+"\";"},
"otherValue": ""
});
}
if(this.form.get("zcmc").getData()){
filterList.push({
"logic": "and",
"path": "zcmc",
"comparison": "like",
"value": this.form.get("zcmc").getData(),
"formatType": "textValue",
"type": "restrict",
"title": "",
"code": {"code":"return \""+this.form.get("zcmc").getData()+"\";","html":"return \""+this.form.get("zcmc").getData()+"\";"},
"otherValue": ""
});
}
if(this.form.get("zclx").getData()){
filterList.push({
"logic": "and",
"path": "lb",
"comparison": "like",
"value": this.form.get("zclx").getData(),
"formatType": "textValue",
"type": "restrict",
"title": "",
"code": {"code":"return \""+this.form.get("zclx").getData()+"\";","html":"return \""+this.form.get("zclx").getData()+"\";"},
"otherValue": ""
});
}
if(this.form.get("qzsj").getData()){
filterList.push({
"logic": "and",
"path": "lb",
"comparison": "like",
"value": this.form.get("qzsj").getData(),
"formatType": "textValue",
"type": "restrict",
"title": "",
"code": {"code":"return \""+this.form.get("qzsj").getData()+"\";","html":"return \""+this.form.get("qzsj").getData()+"\";"},
"otherValue": ""
});
}
if(this.form.get("dqsj").getData()){
filterList.push({
"logic": "and",
"path": "lb",
"comparison": "like",
"value": this.form.get("dqsj").getData(),
"formatType": "textValue",
"type": "restrict",
"title": "",
"code": {"code":"return \""+this.form.get("dqsj").getData()+"\";","html":"return \""+this.form.get("dqsj").getData()+"\";"},
"otherValue": ""
});
}
if(this.form.get("ddbh").getData()){
filterList.push({
"logic": "and",
"path": "lb",
"comparison": "like",
"value": this.form.get("ddbh").getData(),
"formatType": "textValue",
"type": "restrict",
"title": "",
"code": {"code":"return \""+this.form.get("ddbh").getData()+"\";","html":"return \""+this.form.get("ddbh").getData()+"\";"},
"otherValue": ""
});
}
view.json.loadView = "yes";
view.json.filterList = filterList;
debugger;
this.form.get("view").reload();
首页视图字段:
资产列表视图字段:
还请大佬有空指导一下
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|