centaline-data-driven 1.3.38 → 1.3.41

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.
Files changed (31) hide show
  1. package/package.json +1 -1
  2. package/src/Form.vue +5 -1
  3. package/src/SearchList.vue +2 -2
  4. package/src/centaline/dynamicComboBoxWithTextBox/src/dynamicComboBoxWithTextBox.vue +16 -14
  5. package/src/centaline/dynamicContact/src/dynamicContact.vue +4 -2
  6. package/src/centaline/dynamicDetail/src/dynamicContactList.vue +1 -1
  7. package/src/centaline/dynamicDetail/src/dynamicPropertyDetailOFI.vue +164 -9
  8. package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +28 -23
  9. package/src/centaline/dynamicForm/src/dynamicForm.vue +3 -2
  10. package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +2 -2
  11. package/src/centaline/dynamicInputNumber/src/dynamicInputNumber.vue +11 -9
  12. package/src/centaline/dynamicIti/src/dynamicIti.vue +4 -4
  13. package/src/centaline/dynamicL/src/dynamicL.vue +6 -1
  14. package/src/centaline/dynamicMo/src/dynamicMo.vue +8 -4
  15. package/src/centaline/dynamicPopupSearchList/src/dynamicPopupSearchList.vue +2 -1
  16. package/src/centaline/dynamicSearchList/src/dynamicSearchList.vue +4 -1
  17. package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +8 -7
  18. package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +3 -4
  19. package/src/centaline/dynamicSeg/src/dynamicSeg.vue +10 -0
  20. package/src/centaline/dynamicSo/src/dynamicSo.vue +8 -4
  21. package/src/centaline/dynamicSos/src/dynamicSos.vue +8 -4
  22. package/src/centaline/dynamicSosTt/src/dynamicSosTt.vue +8 -4
  23. package/src/centaline/dynamicT/src/dynamicT.vue +1 -0
  24. package/src/centaline/dynamicTags/src/dynamicTags.vue +8 -4
  25. package/src/centaline/loader/src/ctl/ContactList.js +119 -109
  26. package/src/centaline/loader/src/ctl/Detail.js +19 -0
  27. package/src/centaline/loader/src/ctl/Form.js +43 -33
  28. package/src/centaline/loader/src/ctl/FormList.js +2 -0
  29. package/src/main.js +1 -1
  30. package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
  31. package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
@@ -813,10 +813,12 @@ export default {
813
813
  if (field.pageStyle) {
814
814
  submitData.pageStyle = field.pageStyle;
815
815
  }
816
+ self.$emit('doClosePopoverHandle');
816
817
  self.$common.getDataDrivenOpts().handler.openTab(action,submitData,field.pageTitle,self.model,field.dialogWidth);
817
818
  }
818
819
  else if (field.isSearchPageInTab) {// 外部框架tab页打开
819
820
  submitData = field.getActionPara(submitData).para;
821
+ self.$emit('doClosePopoverHandle');
820
822
  self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
821
823
  }
822
824
  else if (field.isBrowserNewTab) {// 浏览器打开
@@ -1358,10 +1360,7 @@ export default {
1358
1360
  closeCallTel(VueCom) {
1359
1361
  var self = this;
1360
1362
  if (self.model.currentCallTelrouter) {
1361
- if (
1362
- typeof VueCom.$refs[self.model.currentCallTelrouter] !== "undefined"
1363
- ) {
1364
- console.log(VueCom);
1363
+ if ( typeof VueCom.$refs[self.model.currentCallTelrouter] !== "undefined") {
1365
1364
  VueCom.closeCallTel();
1366
1365
  return true;
1367
1366
  }
@@ -35,6 +35,16 @@
35
35
 
36
36
  };
37
37
  },
38
+ created() {
39
+ this.$watch('model.value', (n, o) => {
40
+ if (typeof this.model.child !== 'undefined') {
41
+ for (var item of this.model.child) {
42
+ item.value = item.defaultValue || '';
43
+ item.text = item.defaultText || '';
44
+ }
45
+ }
46
+ });
47
+ },
38
48
  mounted() {
39
49
  var self = this;
40
50
  this.$nextTick(function () {
@@ -76,8 +76,10 @@
76
76
  }
77
77
  this.$watch('model.value', (n, o) => {
78
78
  if (typeof this.model.child !== 'undefined') {
79
- this.model.child.value = this.model.child.defaultValue || '';
80
- this.model.child.text = this.model.child.defaultText || '';
79
+ for (var item of this.model.child) {
80
+ item.value = item.defaultValue || '';
81
+ item.text = item.defaultText || '';
82
+ }
81
83
  }
82
84
  });
83
85
  this.inputHeight = this.inputLineHeight;
@@ -139,8 +141,10 @@
139
141
  soChange: function () {
140
142
  var self = this;
141
143
  if (typeof this.model.child !== 'undefined') {
142
- this.model.child.value = this.model.child.defaultValue || '';
143
- this.model.child.text = this.model.child.defaultText || '';
144
+ for (var item of this.model.child) {
145
+ item.value = item.defaultValue || '';
146
+ item.text = item.defaultText || '';
147
+ }
144
148
  }
145
149
  var currentOption = this.model.options.find((value) => {
146
150
  return self.model.value === value[self.model.optionAttrs.value];
@@ -80,8 +80,10 @@
80
80
  }
81
81
  this.$watch('model.value', (n, o) => {
82
82
  if (typeof this.model.child !== 'undefined') {
83
- this.model.child.value = this.model.child.defaultValue || '';
84
- this.model.child.text = this.model.child.defaultText || '';
83
+ for (var item of this.model.child) {
84
+ item.value = item.defaultValue || '';
85
+ item.text = item.defaultText || '';
86
+ }
85
87
  }
86
88
  });
87
89
  this.inputHeight = this.inputLineHeight;
@@ -145,8 +147,10 @@
145
147
  soChange: function () {
146
148
  var self = this;
147
149
  if (typeof this.model.child !== 'undefined') {
148
- this.model.child.value = this.model.child.defaultValue || '';
149
- this.model.child.text = this.model.child.defaultText || '';
150
+ for (var item of this.model.child) {
151
+ item.value = item.defaultValue || '';
152
+ item.text = item.defaultText || '';
153
+ }
150
154
  }
151
155
  var currentOption = this.model.options.find((value) => {
152
156
  return self.model.value === value[self.model.optionAttrs.value];
@@ -92,8 +92,10 @@
92
92
  }
93
93
  this.$watch('model.value', (n, o) => {
94
94
  if (typeof this.model.child !== 'undefined') {
95
- this.model.child.value = this.model.child.defaultValue || '';
96
- this.model.child.text = this.model.child.defaultText || '';
95
+ for (var item of this.model.child) {
96
+ item.value = item.defaultValue || '';
97
+ item.text = item.defaultText || '';
98
+ }
97
99
  }
98
100
  });
99
101
  this.inputHeight = this.inputLineHeight;
@@ -157,8 +159,10 @@
157
159
  soChange: function () {
158
160
  var self = this;
159
161
  if (typeof this.model.child !== 'undefined') {
160
- this.model.child.value = this.model.child.defaultValue || '';
161
- this.model.child.text = this.model.child.defaultText || '';
162
+ for (var item of this.model.child) {
163
+ item.value = item.defaultValue || '';
164
+ item.text = item.defaultText || '';
165
+ }
162
166
  }
163
167
  var currentOption = this.model.options.find((value) => {
164
168
  return self.model.value === value[self.model.optionAttrs.value];
@@ -55,6 +55,7 @@
55
55
  else {
56
56
  this.model = this.vmodel;
57
57
  }
58
+ this.model.self=this;
58
59
  },
59
60
  methods: {
60
61
  mouseOverHandle: function () {
@@ -92,8 +92,10 @@
92
92
  }
93
93
  this.$watch('model.value', (n, o) => {
94
94
  if (typeof this.model.child !== 'undefined') {
95
- this.model.child.value = this.model.child.defaultValue || '';
96
- this.model.child.text = this.model.child.defaultText || '';
95
+ for (var item of this.model.child) {
96
+ item.value = item.defaultValue || '';
97
+ item.text = item.defaultText || '';
98
+ }
97
99
  }
98
100
  });
99
101
  this.inputHeight = this.inputLineHeight;
@@ -161,8 +163,10 @@
161
163
  tagsChange: function () {
162
164
  var self = this;
163
165
  if (typeof this.model.child !== 'undefined') {
164
- this.model.child.value = this.model.child.defaultValue || '';
165
- this.model.child.text = this.model.child.defaultText || '';
166
+ for (var item of this.model.child) {
167
+ item.value = item.defaultValue || '';
168
+ item.text = item.defaultText || '';
169
+ }
166
170
  }
167
171
  var currentOptions = this.globalOptions.filter((value) => {
168
172
  return self.model.value.indexOf(value[self.model.optionAttrs.value]) >= 0;
@@ -5,10 +5,10 @@ import common from '../../../common';
5
5
  import Router from './Router';
6
6
  import Vue from 'vue';
7
7
  import formData from '../../../formData';
8
- const ContactList = function (source,para ,callBack) {
8
+ const ContactList = function (source, para, callBack) {
9
9
  var init = function (data) {
10
10
  var rtn = {
11
- $vue: null,
11
+ $vue: null,
12
12
  _buttons: null,
13
13
  _actionRouter: null,
14
14
  _rowRouter: null,
@@ -21,10 +21,10 @@ const ContactList = function (source,para ,callBack) {
21
21
  isMergeTitle: false,//是否合并标题
22
22
  selectIndex: 0,
23
23
  formData: formData,
24
- rowHiddenKey:'contactID',
25
- rowHiddenColumns:['contactNameDesc','propertyIdentityTypeID'],
26
- columnShow:'contactNoTypeDesc',
27
- rowHiddenKeyData:[],
24
+ rowHiddenKey: 'contactID',
25
+ rowHiddenColumns: ['contactNameDesc', 'propertyIdentityTypeID'],
26
+ columnShow: 'contactNoTypeDesc',
27
+ rowHiddenKeyData: [],
28
28
  attrs: {
29
29
  size: 'mini'
30
30
  },
@@ -43,6 +43,7 @@ const ContactList = function (source,para ,callBack) {
43
43
  rtn._buttons = [];
44
44
  data.content.toolButtons.forEach((v) => {
45
45
  var button = Router(v);
46
+ button.key = Math.random().toString();
46
47
  button.is = "ct-btn";
47
48
  button.attrs = { size: "mini", class: 'max-btn-gray' }
48
49
  rtn._buttons.push(button);
@@ -50,7 +51,7 @@ const ContactList = function (source,para ,callBack) {
50
51
  }
51
52
  return rtn._buttons;
52
53
  }
53
- },
54
+ },
54
55
  get actionRouter() {
55
56
  if (rtn._actionRouter !== null) {
56
57
  return rtn._actionRouter;
@@ -83,20 +84,20 @@ const ContactList = function (source,para ,callBack) {
83
84
  }
84
85
  return rtn._rowRouter;
85
86
  }
86
- },
87
+ },
87
88
  get listData() {
88
- if (rtn._listData.length<=0) {
89
- if(data.content.rows && data.content.rows.length>0){
90
- data.content.rows.forEach((v,i) => {
89
+ if (rtn._listData.length <= 0) {
90
+ if (data.content.rows && data.content.rows.length > 0) {
91
+ data.content.rows.forEach((v, i) => {
91
92
  rtn._listData.push(v);
92
- if(v.descNewRow){
93
- var newRow = {};
94
- newRow[rtn.rowHiddenKey]=v[rtn.rowHiddenKey];
95
- newRow.descNewRow = v.descNewRow;
96
- newRow.colspan = rtn.dataFieldcolumnsShow.length-rtn.rowMergedColumns.length;
97
- newRow.columnShow=rtn.columnShow;
98
- newRow.flagRow=true;
99
- rtn._listData.push(newRow);
93
+ if (v.descNewRow) {
94
+ var newRow = {};
95
+ newRow[rtn.rowHiddenKey] = v[rtn.rowHiddenKey];
96
+ newRow.descNewRow = v.descNewRow;
97
+ newRow.colspan = rtn.dataFieldcolumnsShow.length - rtn.rowMergedColumns.length;
98
+ newRow.columnShow = rtn.columnShow;
99
+ newRow.flagRow = true;
100
+ rtn._listData.push(newRow);
100
101
  }
101
102
  });
102
103
  }
@@ -105,7 +106,7 @@ const ContactList = function (source,para ,callBack) {
105
106
  },
106
107
  set listData(v) {
107
108
  if (v) {
108
- rtn._listData=v;
109
+ rtn._listData = v;
109
110
  }
110
111
  },
111
112
  get columns() {
@@ -180,7 +181,7 @@ const ContactList = function (source,para ,callBack) {
180
181
  if (col._router !== null) {
181
182
  return col._router;
182
183
  }
183
- if (typeof v.routerKey !== "undefined" && v.routerKey && v.routerKey.indexOf(',')===-1) {
184
+ if (typeof v.routerKey !== "undefined" && v.routerKey && v.routerKey.indexOf(',') === -1) {
184
185
  let router = rtn.actionRouter.find(b => {
185
186
  return b.id === v.routerKey;
186
187
  });
@@ -194,8 +195,8 @@ const ContactList = function (source,para ,callBack) {
194
195
  return col._routers;
195
196
  }
196
197
  if (typeof v.routerKey !== "undefined" && v.routerKey) {
197
- col._routers=[];
198
- v.routerKey.split(',').forEach((v) => {
198
+ col._routers = [];
199
+ v.routerKey.split(',').forEach((v) => {
199
200
  let router = rtn.actionRouter.find(b => {
200
201
  return b.id === v;
201
202
  });
@@ -308,7 +309,7 @@ const ContactList = function (source,para ,callBack) {
308
309
  self._dataFieldcolumns = arr;
309
310
  return self._dataFieldcolumns;
310
311
  }
311
- },
312
+ },
312
313
  get dataFieldcolumnsShow() {
313
314
  var self = this;
314
315
  if (self._dataFieldcolumnsShow.length > 0) {
@@ -329,10 +330,10 @@ const ContactList = function (source,para ,callBack) {
329
330
  get apiRouter() {
330
331
  return source.apiRouter;
331
332
  },
332
- getCurrentRowApiData(rtnData,router) {
333
+ getCurrentRowApiData(rtnData, router, callBack) {
333
334
  var self = this;
334
335
  var searchFields = self.apiRouter.getSearchPara();
335
- var searchValue1=router.flagAddRowAfterAction? rtnData.content: rtn.listData[rtn.selectIndex][self.primaryKey];
336
+ var searchValue1 = router.flagAddRowAfterAction ? rtnData.content : rtn.listData[rtn.selectIndex][self.primaryKey];
336
337
  if (self.primaryKey) {
337
338
  searchFields.fields.push({
338
339
  fieldName1: self.primaryFieldMappingDBName ? self.primaryFieldMappingDBName : self.primaryKey,
@@ -350,41 +351,47 @@ const ContactList = function (source,para ,callBack) {
350
351
  flagSearch: true
351
352
  }
352
353
  })
353
- .then(function (response) {
354
- if (response.rtnCode === Enum.ReturnCode.Successful) {
355
- if (response.content.rows.length > 0) {
356
- if(router.flagAddRowAfterAction){
357
- rtn.doNew(response.content.rows);
354
+ .then(function (response) {
355
+ if (response.rtnCode === Enum.ReturnCode.Successful) {
356
+ if (response.notification == Enum.ActionType.Refersh) {
357
+ var rtn = init(response);
358
+ if (callBack) {
359
+ callBack(rtn);
360
+ }
358
361
  }
359
- else{
360
- rtn.doUpdate(response.content.rows,searchValue1);
362
+ else if (response.content.rows.length > 0) {
363
+ if (router.flagAddRowAfterAction) {
364
+ rtn.doNew(response.content.rows);
365
+ }
366
+ else {
367
+ rtn.doUpdate(response.content.rows, searchValue1);
368
+ }
361
369
  }
362
370
  }
363
- }
364
- })
365
- .catch((error) => {
366
- });
371
+ })
372
+ .catch((error) => {
373
+ });
367
374
  },
368
- doAction(response,field) {
375
+ doAction(response, field) {
369
376
  if (response.responseData) {
370
377
  response = response.responseData;
371
378
  }
372
- if(field.flagFreshCurrentRow || field.flagAddRowAfterAction){
373
- rtn.getCurrentRowApiData(response,field);
379
+ if (field.flagFreshCurrentRow || field.flagAddRowAfterAction) {
380
+ rtn.getCurrentRowApiData(response, field);
374
381
  }
375
- else{
382
+ else {
376
383
  switch (response.notification) {
377
384
  case Enum.ActionType.Delete://删除
378
385
  case Enum.ActionType.CloseTabThenDelete://删除
379
386
  var deleteRow = response.content.split(',');
380
387
  if (deleteRow) {
381
388
  deleteRow.forEach((r) => {
382
- let strat=-1;
383
- let count=0;
384
- rtn._listData.forEach((v,i) => {
385
- if(v[rtn.rowHiddenKey]===r){
386
- if(strat===-1)strat=i;
387
- count=count+1;
389
+ let strat = -1;
390
+ let count = 0;
391
+ rtn._listData.forEach((v, i) => {
392
+ if (v[rtn.rowHiddenKey] === r) {
393
+ if (strat === -1) strat = i;
394
+ count = count + 1;
388
395
  }
389
396
  });
390
397
  rtn._listData.splice(strat, count);
@@ -393,12 +400,15 @@ const ContactList = function (source,para ,callBack) {
393
400
  break;
394
401
  case Enum.ActionType.New://新增
395
402
  case Enum.ActionType.CloseTabThenNew://新增
396
- rtn.doNew(response.content);
403
+ rtn.doNew(response.content);
404
+ break;
405
+ case Enum.ActionType.Refersh: //刷新
406
+ rtn.getCurrentRowApiData(response, field, rtn.$vue.load);
397
407
  break;
398
408
  case Enum.ActionType.Update://修改
399
409
  case Enum.ActionType.CloseTabThenUpdate://修改
400
- var searchValue1=rtn.listData[rtn.selectIndex][self.primaryKey];
401
- rtn.doUpdate(response.content,searchValue1);
410
+ var searchValue1 = rtn.listData[rtn.selectIndex][self.primaryKey];
411
+ rtn.doUpdate(response.content, searchValue1);
402
412
  break;
403
413
  default:
404
414
  break;
@@ -406,60 +416,60 @@ const ContactList = function (source,para ,callBack) {
406
416
  }
407
417
  rtn.$vue.$forceUpdate();
408
418
  },
409
- doNew(data){
419
+ doNew(data) {
410
420
  data.forEach((v) => {
411
- if(v.descNewRow){
421
+ if (v.descNewRow) {
412
422
  var newRow = {};
413
- newRow[rtn.rowHiddenKey]=v[rtn.rowHiddenKey];
423
+ newRow[rtn.rowHiddenKey] = v[rtn.rowHiddenKey];
414
424
  newRow.descNewRow = v.descNewRow;
415
- newRow.colspan = rtn.dataFieldcolumnsShow.length-rtn.rowMergedColumns.length;
416
- newRow.columnShow=rtn.columnShow;
417
- newRow.flagRow=true;
425
+ newRow.colspan = rtn.dataFieldcolumnsShow.length - rtn.rowMergedColumns.length;
426
+ newRow.columnShow = rtn.columnShow;
427
+ newRow.flagRow = true;
418
428
  rtn._listData.unshift(newRow);
419
429
  }
420
430
  rtn._listData.unshift(v);
421
431
  });
422
432
  rtn.setHiddenRow();
423
433
  },
424
- doUpdate(data,searchValue1){
425
- let updateData=[];
434
+ doUpdate(data, searchValue1) {
435
+ let updateData = [];
426
436
  data.forEach((v) => {
427
437
  updateData.push(v);
428
- if(v.descNewRow){
438
+ if (v.descNewRow) {
429
439
  var newRow = {};
430
- newRow[rtn.rowHiddenKey]=v[rtn.rowHiddenKey];
440
+ newRow[rtn.rowHiddenKey] = v[rtn.rowHiddenKey];
431
441
  newRow.descNewRow = v.descNewRow;
432
- newRow.colspan = rtn.dataFieldcolumnsShow.length-rtn.rowMergedColumns.length;
433
- newRow.columnShow=rtn.columnShow;
434
- newRow.flagRow=true;
442
+ newRow.colspan = rtn.dataFieldcolumnsShow.length - rtn.rowMergedColumns.length;
443
+ newRow.columnShow = rtn.columnShow;
444
+ newRow.flagRow = true;
435
445
  updateData.push(newRow);
436
446
  }
437
447
  });
438
- let strat=-1;
439
- let count=0;
440
- rtn._listData.forEach((v,i) => {
441
- if(v[rtn.rowHiddenKey]===searchValue1){
442
- if(strat===-1)strat=i;
443
- count=count+1;
448
+ let strat = -1;
449
+ let count = 0;
450
+ rtn._listData.forEach((v, i) => {
451
+ if (v[rtn.rowHiddenKey] === searchValue1) {
452
+ if (strat === -1) strat = i;
453
+ count = count + 1;
444
454
  }
445
455
  });
446
- if(updateData.length===1){
447
- rtn._listData.splice(strat, count,updateData[0]);
448
- }
449
- else if(updateData.length===2){
450
- rtn._listData.splice(strat, count,updateData[0],updateData[1]);
451
- }
452
- else if(updateData.length===3){
453
- rtn._listData.splice(strat, count,updateData[0],updateData[1],updateData[2]);
454
- }
455
- else if(updateData.length===4){
456
- rtn._listData.splice(strat, count,updateData[0],updateData[1],updateData[2],updateData[3]);
457
- }
458
- else if(updateData.length===5){
459
- rtn._listData.splice(strat, count,updateData[0],updateData[1],updateData[2],updateData[3],updateData[4]);
460
- }
461
- else if(updateData.length===6){
462
- rtn._listData.splice(strat, count,updateData[0],updateData[1],updateData[2],updateData[3],updateData[4],updateData[5]);
456
+ if (updateData.length === 1) {
457
+ rtn._listData.splice(strat, count, updateData[0]);
458
+ }
459
+ else if (updateData.length === 2) {
460
+ rtn._listData.splice(strat, count, updateData[0], updateData[1]);
461
+ }
462
+ else if (updateData.length === 3) {
463
+ rtn._listData.splice(strat, count, updateData[0], updateData[1], updateData[2]);
464
+ }
465
+ else if (updateData.length === 4) {
466
+ rtn._listData.splice(strat, count, updateData[0], updateData[1], updateData[2], updateData[3]);
467
+ }
468
+ else if (updateData.length === 5) {
469
+ rtn._listData.splice(strat, count, updateData[0], updateData[1], updateData[2], updateData[3], updateData[4]);
470
+ }
471
+ else if (updateData.length === 6) {
472
+ rtn._listData.splice(strat, count, updateData[0], updateData[1], updateData[2], updateData[3], updateData[4], updateData[5]);
463
473
  }
464
474
  rtn.setHiddenRow();
465
475
  },
@@ -494,39 +504,39 @@ const ContactList = function (source,para ,callBack) {
494
504
  return c;
495
505
  },
496
506
  setHiddenRow() {
497
- if (rtn.rowHiddenColumns.length===0) {
507
+ if (rtn.rowHiddenColumns.length === 0) {
498
508
  return;
499
509
  }
500
- let lastKey='';
501
- let count=1;
502
- let firstIndex=0;
503
- rtn.rowHiddenKeyData=[];
510
+ let lastKey = '';
511
+ let count = 1;
512
+ let firstIndex = 0;
513
+ rtn.rowHiddenKeyData = [];
504
514
  for (let i = 0; i < rtn.listData.length; i++) {
505
- if(!rtn.rowHiddenKeyData.includes(rtn.listData[i][rtn.rowHiddenKey])){
515
+ if (!rtn.rowHiddenKeyData.includes(rtn.listData[i][rtn.rowHiddenKey])) {
506
516
  rtn.rowHiddenKeyData.push(rtn.listData[i][rtn.rowHiddenKey])
507
517
  }
508
- rtn.listData[i].$rowspan=0;
509
- if(lastKey){
510
- if(rtn.listData[i][rtn.rowHiddenKey]){
511
- if(rtn.listData[i][rtn.rowHiddenKey]===lastKey){
512
- rtn.listData[i].rowHiddenColumns=rtn.rowHiddenColumns;
518
+ rtn.listData[i].$rowspan = 0;
519
+ if (lastKey) {
520
+ if (rtn.listData[i][rtn.rowHiddenKey]) {
521
+ if (rtn.listData[i][rtn.rowHiddenKey] === lastKey) {
522
+ rtn.listData[i].rowHiddenColumns = rtn.rowHiddenColumns;
513
523
  count++;
514
- if(i===rtn.listData.length-1){
515
- rtn.listData[firstIndex].$rowspan=count;
524
+ if (i === rtn.listData.length - 1) {
525
+ rtn.listData[firstIndex].$rowspan = count;
516
526
  }
517
527
  }
518
- else{
519
- rtn.listData[firstIndex].$rowspan=count;
520
- lastKey=rtn.listData[i][rtn.rowHiddenKey];
521
- count=1;
522
- firstIndex=i;
528
+ else {
529
+ rtn.listData[firstIndex].$rowspan = count;
530
+ lastKey = rtn.listData[i][rtn.rowHiddenKey];
531
+ count = 1;
532
+ firstIndex = i;
523
533
  }
524
534
  }
525
535
  }
526
- else{
527
- lastKey=rtn.listData[i][rtn.rowHiddenKey];
528
- count=1;
529
- firstIndex=i;
536
+ else {
537
+ lastKey = rtn.listData[i][rtn.rowHiddenKey];
538
+ count = 1;
539
+ firstIndex = i;
530
540
  }
531
541
  }
532
542
  },
@@ -534,7 +544,7 @@ const ContactList = function (source,para ,callBack) {
534
544
  return rtn;
535
545
  }
536
546
  if (typeof source === 'string') {
537
- Vue.prototype.$api.postHandler(common.globalUri(), { action: source,para:para}).then(
547
+ Vue.prototype.$api.postHandler(common.globalUri(), { action: source, para: para }).then(
538
548
  function (response) {
539
549
  if (response.rtnCode === Enum.ReturnCode.Successful) {
540
550
  var rtn = init(response);
@@ -469,6 +469,25 @@ const Detail = function (source, para, callBack) {
469
469
  get shortcutFollowForm() {
470
470
  return data.shortcutFollowForm;
471
471
  },
472
+ getAction(api, submitData, callback) {
473
+ Vue.prototype.$api.postHandler(common.globalUri(), {
474
+ action: api,
475
+ para: submitData
476
+ })
477
+ .then(function (response) {
478
+ if (response.rtnCode === Enum.ReturnCode.Successful) {
479
+ if (typeof callback !== 'undefined') {
480
+ callback(response.content);
481
+ }
482
+ }
483
+ })
484
+ .catch((error) => {
485
+ console.error(error);
486
+ if (typeof callback !== 'undefined') {
487
+ callback();
488
+ }
489
+ });
490
+ },
472
491
  doAction(response, field) {
473
492
  if (response.responseData) {
474
493
  response = response.responseData;
@@ -400,7 +400,7 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
400
400
  && data.listData.currentRow.data.$sourceIndex === data.listData.source.rows[rowNum].$sourceIndex) {
401
401
  let currentField = data.listData.currentRow.data[fiedlId];
402
402
  currentField.source[attrName] = value;
403
- data.listData.currentRow.data[fiedlId].rowKey=Math.random();
403
+ currentField.rowKey=Math.random();
404
404
  //校验自己
405
405
  if (currentField.self && currentField.self.validExcute) {
406
406
  currentField.self.validExcute();
@@ -706,39 +706,49 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
706
706
  },
707
707
  //处理必填关联组件
708
708
  requiredHandle(item, update, doMrf) {
709
- if (item.id) {
710
- let field = null;
711
-
712
- for (var i in rtn.source.fields) {
713
- if (rtn.source.fields[i].requiredRelationField === item.id) {
714
- field = rtn.source.fields[i];
715
- let f = rtn.fieldsDic[field.fieldName1];
709
+ if (item.id) {
710
+ let field = null;
711
+ let value= rtn.getFieldValue(item);
712
+ for (var i in rtn.source.fields) {
713
+ if (rtn.source.fields[i].requiredRelationField === item.id) {
714
+ field = rtn.source.fields[i];
715
+ let f = rtn.fieldsDic[field.fieldName1];
716
+
717
+ if (field) {
718
+ let hiddenValueArr = field.requiredRelationFieldValue.split(',');
719
+ if (hiddenValueArr.indexOf(value) > -1) {
720
+ field.required = true;
721
+ }
722
+ else {
723
+ field.required = false;
724
+ }
725
+
726
+ if (f && f.self && f.self.$forceUpdate) {
727
+ f.self.$forceUpdate();
728
+ }
729
+
730
+ if (update && rtn.self) {
731
+ rtn.self.$forceUpdate();
732
+ }
733
+ }
734
+ }
735
+ }
736
+
737
+ if (doMrf !== false) {
738
+ rtn.validMrf(item);
739
+ }
740
+ }
741
+ },
742
+
743
+ getFieldValue(field)
744
+ {
745
+ if(field.type==Enum.ControlType.Switch)
746
+ {
747
+ return field.value?'1':'0';
748
+ }
749
+ return field.value;
750
+ },
716
751
 
717
- if (field) {
718
- let hiddenValueArr = field.requiredRelationFieldValue.split(',');
719
- if (hiddenValueArr.indexOf(item.value) > -1) {
720
- field.required = true;
721
- }
722
- else {
723
- field.required = false;
724
- }
725
-
726
- if (f && f.self && f.self.$forceUpdate) {
727
- f.self.$forceUpdate();
728
- }
729
-
730
- if (update && rtn.self) {
731
- rtn.self.$forceUpdate();
732
- }
733
- }
734
- }
735
- }
736
-
737
- if (doMrf !== false) {
738
- rtn.validMrf(item);
739
- }
740
- }
741
- },
742
752
  //绑定联动参数组件
743
753
  getRefFieldPara(refFieldNameArr) {
744
754
  let submitData = {};