centaline-data-driven-v3 0.0.56 → 0.0.58

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.
@@ -2,7 +2,7 @@ import { ref } from 'vue'
2
2
  import Field from '@/loader/src/Field';
3
3
  import common from './common';
4
4
  import Enum from './Enum';
5
- import { showLoadingToast,closeToast} from "vant";
5
+ import { showLoadingToast, closeToast } from "vant";
6
6
 
7
7
 
8
8
  //初始化数据
@@ -145,8 +145,8 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
145
145
  if (verified) {
146
146
  //action有值,提交到后台
147
147
  if (field.action) {
148
- if(common.flagApp()){
149
- showLoadingToast({ message: '正在处理',forbidClick: true, duration: 100000 });
148
+ if (common.flagApp()) {
149
+ showLoadingToast({ message: '正在处理', forbidClick: true, duration: 100000 });
150
150
  }
151
151
  field.disabled = true;//提交按钮禁用
152
152
  model.pageDisabled = true;
@@ -166,7 +166,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
166
166
  progressKey: res.content.key,
167
167
  progressType: field.isExport ? 'export' : 'import',
168
168
  onFinished(data) {
169
- if(common.flagApp()){
169
+ if (common.flagApp()) {
170
170
  closeToast()
171
171
  }
172
172
  field.disabled = false;
@@ -199,7 +199,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
199
199
  model.$vue.emit('submit', { formData: model, responseData: data });
200
200
  },
201
201
  onError(data) {
202
- if(common.flagApp()){
202
+ if (common.flagApp()) {
203
203
  closeToast()
204
204
  }
205
205
  field.disabled = false;
@@ -233,7 +233,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
233
233
  progressKey: res202.content.key,
234
234
  progressType: field.isExport ? 'export' : 'import',
235
235
  onFinished(data) {
236
- if(common.flagApp()){
236
+ if (common.flagApp()) {
237
237
  closeToast()
238
238
  }
239
239
  field.disabled = false;
@@ -266,7 +266,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
266
266
  model.$vue.emit('submit', { formData: model, responseData: data });
267
267
  },
268
268
  onError(data) {
269
- if(common.flagApp()){
269
+ if (common.flagApp()) {
270
270
  closeToast()
271
271
  }
272
272
  field.disabled = false;
@@ -282,7 +282,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
282
282
  }
283
283
  });
284
284
  }).catch(() => {
285
- if(common.flagApp()){
285
+ if (common.flagApp()) {
286
286
  closeToast()
287
287
  }
288
288
  field.disabled = false;
@@ -293,7 +293,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
293
293
  }
294
294
  else {
295
295
  field.doAction(model.$vue.getFormObj(), (data) => {
296
- if(common.flagApp()){
296
+ if (common.flagApp()) {
297
297
  closeToast()
298
298
  }
299
299
  field.disabled = false;
@@ -436,6 +436,10 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
436
436
  submitData = field.getActionPara(submitData).para;
437
437
  common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
438
438
  }
439
+ else if(field.isVueComponentInTab){
440
+ submitData = field.getActionPara(submitData).para;
441
+ common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
442
+ }
439
443
  else if (field.isOpenUrlInBrowse) {// 浏览器打开
440
444
  window.open(submitData[field.submitFormField], "_blank");
441
445
  }
@@ -761,7 +765,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
761
765
  common.closeDialog(dialogOption);
762
766
 
763
767
  },
764
-
768
+ isIframe: model.isIframe,
765
769
  },
766
770
  }]
767
771
  };
@@ -782,8 +786,50 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
782
786
  onSubmit: () => {
783
787
  common.closeDialog(dialogOption.dialog);
784
788
  },
785
-
786
-
789
+ isIframe: model.isIframe,
790
+ },
791
+ }]
792
+ };
793
+ common.openDialog(dialogOption);
794
+ }
795
+ else if (field.isVueComponentInLayer) {
796
+ var dialogOption = {
797
+ title: field.pageTitle,
798
+ pane: common.getParentPane(),
799
+ content: [{
800
+ component: field.vueComponentName,
801
+ width: field.pageWidth + 'px',
802
+ height: field.pageHeight + 'px',
803
+ attrs: {
804
+ apiParam: field.actionType == Enum.ActionType.None ? submitData : field.getActionPara(submitData).para,
805
+ onNew: (id) => {
806
+ field.flagAddRowAfterAction = true;
807
+ field.flagFreshCurrentRow = false;
808
+ var res = { responseData: { content: id } };
809
+ model.$vue.updateCurrentRow(field, res);
810
+ common.closeDialog(dialogOption);
811
+ },
812
+ onUpdate: (id) => {
813
+ field.flagAddRowAfterAction = false;
814
+ field.flagFreshCurrentRow = true;
815
+ var res = { responseData: { content: id } };
816
+ model.$vue.updateCurrentRow(field, res);
817
+ common.closeDialog(dialogOption);
818
+ },
819
+ onDelete: () => {
820
+ var res = {};
821
+ res.notification = 4;
822
+ res.content = model.listData[model.selectIndex][model.primaryKey];
823
+ model.$vue.doAction(res);
824
+ common.closeDialog(dialogOption);
825
+ },
826
+ onRefreshParent: () => {
827
+ model.$vue.getPage(1);
828
+ common.closeDialog(dialogOption);
829
+ },
830
+ onCloseDialog: () => {
831
+ common.closeDialog(dialogOption);
832
+ }
787
833
  },
788
834
  }]
789
835
  };
@@ -872,6 +918,9 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
872
918
  submitData = field.getActionPara(submitData).para;
873
919
  let title = field.pageTitle == undefined ? field.label : field.pageTitle;
874
920
  submitData.actionType = field.actionType;
921
+ if (model.isIframe) {
922
+ submitData.isIframe = model.isIframe;
923
+ }
875
924
  var fun = common.getDataDrivenOpts().handler[action];
876
925
  fun(submitData, title, model);
877
926
  }
@@ -236,6 +236,7 @@ const valid = {
236
236
  break;
237
237
  case Enum.ControlType.NumericRange:
238
238
  case Enum.ControlType.DateRange:
239
+ case Enum.ControlType.MonthRange:
239
240
  case Enum.ControlType.DateTimeRange:
240
241
  case Enum.ControlType.ComboBoxWithTextBox:
241
242
  case Enum.ControlType.PhoneNumberText: