owl-cli 6.188.0 → 6.189.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.
|
@@ -328,6 +328,15 @@ var @projectCodeService = (function (pigeon) {
|
|
|
328
328
|
}
|
|
329
329
|
},
|
|
330
330
|
|
|
331
|
+
getField:function(fullKey){
|
|
332
|
+
var matchedField=null;
|
|
333
|
+
f.tranverseFields(formSpecs,function(field,ctx){
|
|
334
|
+
if(field.key===fullKey){
|
|
335
|
+
matchedField = field;
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
return matchedField;
|
|
339
|
+
},
|
|
331
340
|
tranverseFields: function (formSpec, callback, ctx) {
|
|
332
341
|
formSpec.fields.forEach(function (field) {
|
|
333
342
|
if (field['_ft'] == 'field') {
|
|
@@ -36,6 +36,12 @@ function main(modelService,spec){
|
|
|
36
36
|
if(!titleList){
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
+
titleList.forEach(function(title){
|
|
40
|
+
var fullKey = title.field;
|
|
41
|
+
var fullField = modelService.getField(fullKey);
|
|
42
|
+
title.fullField = fullField;
|
|
43
|
+
|
|
44
|
+
});
|
|
39
45
|
var recordList = ret.rows.map(function(row){
|
|
40
46
|
var record = {};
|
|
41
47
|
titleList.forEach(function(title){
|
|
@@ -47,6 +53,17 @@ function main(modelService,spec){
|
|
|
47
53
|
value = ts /86400000+25569; //这是excel的特殊的格式,用小数点表示
|
|
48
54
|
}
|
|
49
55
|
|
|
56
|
+
}
|
|
57
|
+
if(title.fullField && title.fullField.options && title.fullField.fieldType==='choice'){
|
|
58
|
+
var options = title.fullField.options;
|
|
59
|
+
for(var i=0;i<options.length;i++){
|
|
60
|
+
var option = options[i];
|
|
61
|
+
if(option[0] === value){
|
|
62
|
+
value = option[1];
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
50
67
|
}
|
|
51
68
|
record[field] = value;
|
|
52
69
|
});
|