owl-cli 6.189.0 → 6.191.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -45,8 +45,8 @@ function main(modelService,spec){
|
|
|
45
45
|
var recordList = ret.rows.map(function(row){
|
|
46
46
|
var record = {};
|
|
47
47
|
titleList.forEach(function(title){
|
|
48
|
-
var field = title.field
|
|
49
|
-
var value = modelService.getValue(field,row);
|
|
48
|
+
var field = title.fieldKey|| title.field
|
|
49
|
+
var value = modelService.getValue(title.field,row);
|
|
50
50
|
if(title.type==="date"){
|
|
51
51
|
if(value){
|
|
52
52
|
var ts = new Date(value).getTime();
|
|
@@ -65,6 +65,25 @@ function main(modelService,spec){
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
}
|
|
68
|
+
if(title.type==="imgUrls"){
|
|
69
|
+
if(value && value.length>0){
|
|
70
|
+
var urls = value.map(function(imgObj){
|
|
71
|
+
return imgObj.url;
|
|
72
|
+
});
|
|
73
|
+
value = urls.join("\n");
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if(title.type==="img"){
|
|
77
|
+
if(value && value.length>0){
|
|
78
|
+
var imgIdx = title.imgIdx || 0;
|
|
79
|
+
if(value.length>imgIdx){
|
|
80
|
+
value = value[imgIdx].url;
|
|
81
|
+
}
|
|
82
|
+
else{
|
|
83
|
+
value = "";
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
68
87
|
record[field] = value;
|
|
69
88
|
});
|
|
70
89
|
return record;
|