|
发表于 2023-2-16 08:25:21
|
显示全部楼层
你好我通视图查到要导入的数据后选择要的数据,再次点击查询可以在数据表格添加行但是没有数据到数据表格,只是在数据表格添加了行而已 请大神给看看是否可以给个例子谢谢var view = this.form.get("view");
var filterList = [];
if(this.form.get("lb").getData()){
filterList.push({
"logic": "and",
"path": "lb",
"comparison": "like",
"value": this.form.get("lb").getData(),
"formatType": "textValue",
"type": "restrict",
"title": "",
"code": {"code":"return \""+this.form.get("lb").getData()+"\";","html":"return \""+this.form.get("lb").getData()+"\";"},
"otherValue": ""
});
}
if(this.form.get("kssj").getData()){
filterList.push({
"logic": "and",
"path": "gjsj",
"comparison": "greaterThan",
"value": this.form.get("kssj").getData(),
"formatType": "textValue",
"type": "restrict",
"title": "",
"code": {"code":"return \""+this.form.get("kssj").getData()+"\";","html":"return \""+this.form.get("kssj").getData()+"\";"},
"otherValue": ""
});
}
if(this.form.get("jssj").getData()){
filterList.push({
"logic": "and",
"path": "gjsj",
"comparison": "lessThan",
"value": this.form.get("jssj").getData(),
"formatType": "textValue",
"type": "restrict",
"title": "",
"code": {"code":"return \""+this.form.get("jssj").getData()+"\";","html":"return \""+this.form.get("jssj").getData()+"\";"},
"otherValue": ""
});
}
if(this.form.get("ssbm").getData().length>0){
filterList.push({
"logic": "and",
"path": "ssbm",
"comparison": "like",
"value": this.form.get("ssbm").getData()[0].distinguishedName,
"formatType": "textValue",
"type": "restrict",
"title": "",
"code": {"code":"return \""+this.form.get("ssbm").getData()[0].distinguishedName+"\";","html":"return \""+this.form.get("ssbm").getData()[0].distinguishedName+"\";"},
"otherValue": ""
});
}
view.json.loadView = "yes";
view.json.filterList = filterList;
debugger;
var data_list = view.getData()
for(i = 0; i < data_list.length; i++){
this.form.get("dt").addLine(data_list)
this.form.get('dtbh').setData(data_list)
}
this.form.get('dt').reload();
this.form.get("view").reload();
var line = this.form.get("bh").addLine("bh")
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|