owl-cli 6.187.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.
@@ -6,7 +6,6 @@
6
6
  //#import session.js
7
7
  //#import $@projectCode:services/modelService.jsx
8
8
  //#import @handlers/include/checklogin.jsx
9
- //#import @handlers/include/diff.jsx
10
9
  (function(){
11
10
  var spec = @spec;
12
11
  var env = checklogin();
@@ -80,7 +79,7 @@
80
79
  });
81
80
  }
82
81
  modelObject._orgIds = _orgIds;
83
- diffResult = diff(oldObj,modelObject,"");
82
+ // diffResult = diff(oldObj,modelObject,"");
84
83
  if(roleId!=='internal' && roleId!='0') {
85
84
  checkUpdatePermission(modelObject, diffResult, permissions, orgId);
86
85
  }
@@ -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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owl-cli",
3
- "version": "6.187.0",
3
+ "version": "6.189.0",
4
4
  "main": "index.js",
5
5
  "preferGlobal": true,
6
6
  "bin": {