流程结束后无法插入数据表-按照教程
本帖最后由 rr61162576 于 2023-3-10 10:37 编辑表格手动插入可以
数据结构如上
var table = new this.Table("baoxiaoTable");
var values =[];
this.data.datagrid.data.forEach(function(item){
var par = {
"workID": this.workContext.getWork().id,
"title": this.data.title,
"startTime": this.workContext.getWork().startTime,
"createrPerson": this.workContext.getWork.createrPerson,
"createrUnit": this.workContext.getWork().createrUnit,
"place": this.data.place,
"projectName": this.data.projectName,
"type": this.data.bxzl,
"number": parseInt(this,data,number),
"subjectName": item.kmmc,
"startDate": item.calendarStart,
"endDate": item.calendarEnd,
"costDescription": item.note
}
values.push(par);
}.bind(this));
table.insertRow(values);
var par1 = {
"workID": this.workContext.getWork().id,
"title": this.data.title,
"startTime": this.workContext.getWork().startTime,
"createrPerson": this.workContext.getWork.createrPerson,
"createrUnit": this.workContext.getWork().createrUnit,
"place": this.data.place,
"projectName": this.data.projectName,
"type": this.data.bxzl,
"number": parseInt(this,data,number),
"subjectName": item.kmmc,
"startDate": item.calendarStart,
"endDate": item.calendarEnd,
"costDescription": item.note
}
table.addRow(par1)
这样了还是插入不进去数据。。。。。
这里是后端脚本,alert时报错了,删掉这句 论坛管理员 发表于 2023-3-10 09:47
这里是后端脚本,alert时报错了,删掉这句
这是不是js脚本么,删除了也没效果,就是因为没效果,才加入调试一下看看的,现在删除了,任然没有数据插入,按理每循环的第二个插入肯定能插入才对的 是js脚本,这里是后端执行的js脚本,浏览器上不能调试,您可以print,在日志查看器里查看打印信息。 论坛管理员 发表于 2023-3-10 10:05
是js脚本,这里是后端执行的js脚本,浏览器上不能调试,您可以print,在日志查看器里查看打印信息。 ...
已经解决,数据插入示例的json格式本来就有错误,应该是bug,有些this.data.xxx 它给了this.data,xxx 看了后台报错查出来的 :handshake
页:
[1]