centaline-data-driven 1.3.34 → 1.3.35

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.3.34",
3
+ "version": "1.3.35",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -414,10 +414,42 @@
414
414
  else if (field.isSeeVoice) {//看视频
415
415
  self.$common.browseVideo(field,submitData)
416
416
  }
417
- else if (field.isExport) {
417
+ else if (field.isExport || field.flagAsync) {
418
418
  submitData = field.getActionPara(submitData).para;
419
419
  if(field.flagAsync){
420
- self.model.export(field, submitData);
420
+ field.doAction(submitData, (res) => {
421
+ if(res.content && res.content.action){
422
+ var dialogOption = {
423
+ title: field.pageTitle || field.label,
424
+ content: [{
425
+ component: 'ct-progress',
426
+ attrs: {
427
+ progressAction: res.content.action,
428
+ progressKey: res.content.key,
429
+ progressType:'import',
430
+ width: '350px',
431
+ height: '165px'
432
+ },
433
+ on: {
434
+ finished(data) {
435
+ self.$common.closeDialog(dialogOption.dialog);
436
+ if(field && field.changeCallBackFunName){
437
+ self.changeCallBackHandler(field, field.changeCallBackFunName, data.content);
438
+ }
439
+ else{
440
+ self.model.doAction(data);
441
+ }
442
+ },
443
+ error(data) {
444
+ self.$common.closeDialog(dialogOption.dialog);
445
+ self.$message.warning(data.rtnMsg);
446
+ }
447
+ }
448
+ }]
449
+ };
450
+ self.$common.openDialog(dialogOption);
451
+ }
452
+ });
421
453
  }
422
454
  else{
423
455
  field.doAction(submitData, (data) => {
@@ -427,36 +459,6 @@
427
459
  });
428
460
  }
429
461
  }
430
- else if (field.flagAsync) {
431
- field.doAction(submitData, (res) => {
432
- if(res.content && res.content.action){
433
- var dialogOption = {
434
- title: field.pageTitle == undefined ? field.label : field.pageTitle,
435
- content: [{
436
- component: 'ct-progress',
437
- attrs: {
438
- progressAction: res.content.action,
439
- progressKey: res.content.key,
440
- progressType:'import',
441
- width: '350px',
442
- height: '165px'
443
- },
444
- on: {
445
- finished() {
446
- self.$common.closeDialog(dialogOption.dialog);
447
- self.getPage(1);
448
- },
449
- error(data) {
450
- self.$common.closeDialog(dialogOption.dialog);
451
- self.$message.warning(data.rtnMsg);
452
- }
453
- }
454
- }]
455
- };
456
- self.$common.openDialog(dialogOption);
457
- }
458
- });
459
- }
460
462
  else {
461
463
  submitData = field.getActionPara(submitData).para;
462
464
  field.doAction(submitData, (data) => {
@@ -519,7 +521,7 @@
519
521
  if(field.flagAsync){
520
522
  if(res.content && res.content.action){
521
523
  var dialogOption = {
522
- title: "导入",
524
+ title: field.pageTitle || field.label,
523
525
  content: [{
524
526
  component: 'ct-progress',
525
527
  attrs: {
@@ -908,9 +908,36 @@ export default {
908
908
  };
909
909
  self.$common.openDialog(dialogOption);
910
910
  }
911
- else if (field.isExport) {
911
+ else if (field.isExport || field.flagAsync) {
912
912
  if(field.flagAsync){
913
- self.model.export(field, submitData);
913
+ field.doAction(submitData, (res) => {
914
+ if(res.content && res.content.action){
915
+ var dialogOption = {
916
+ title: field.pageTitle || field.label,
917
+ content: [{
918
+ component: 'ct-progress',
919
+ attrs: {
920
+ progressAction: res.content.action,
921
+ progressKey: res.content.key,
922
+ progressType:'import',
923
+ width: '350px',
924
+ height: '165px'
925
+ },
926
+ on: {
927
+ finished() {
928
+ self.$common.closeDialog(dialogOption.dialog);
929
+ self.getPage(1);
930
+ },
931
+ error(data) {
932
+ self.$common.closeDialog(dialogOption.dialog);
933
+ self.$message.warning(data.rtnMsg);
934
+ }
935
+ }
936
+ }]
937
+ };
938
+ self.$common.openDialog(dialogOption);
939
+ }
940
+ });
914
941
  }
915
942
  else{
916
943
  if(field.action.indexOf("http://")===0 || field.action.indexOf("https://")===0){
@@ -929,36 +956,6 @@ export default {
929
956
  }
930
957
  }
931
958
  }
932
- else if (field.flagAsync) {
933
- field.doAction(submitData, (res) => {
934
- if(res.content && res.content.action){
935
- var dialogOption = {
936
- title: field.pageTitle == undefined ? field.label : field.pageTitle,
937
- content: [{
938
- component: 'ct-progress',
939
- attrs: {
940
- progressAction: res.content.action,
941
- progressKey: res.content.key,
942
- progressType:'import',
943
- width: '350px',
944
- height: '165px'
945
- },
946
- on: {
947
- finished() {
948
- self.$common.closeDialog(dialogOption.dialog);
949
- self.getPage(1);
950
- },
951
- error(data) {
952
- self.$common.closeDialog(dialogOption.dialog);
953
- self.$message.warning(data.rtnMsg);
954
- }
955
- }
956
- }]
957
- };
958
- self.$common.openDialog(dialogOption);
959
- }
960
- });
961
- }
962
959
  else {
963
960
  //self.operationLoading = true;
964
961
 
@@ -1438,8 +1435,9 @@ export default {
1438
1435
  var self=this;
1439
1436
  if(field.flagAsync){
1440
1437
  if(res.content && res.content.action){
1438
+ console.log(field.pageTitle || field.label)
1441
1439
  var dialogOption = {
1442
- title: "导入",
1440
+ title: field.pageTitle || field.label,
1443
1441
  content: [{
1444
1442
  component: 'ct-progress',
1445
1443
  attrs: {
@@ -839,12 +839,6 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
839
839
  }
840
840
  });
841
841
  },
842
- export (btn, submitData) {
843
- Vue.prototype.$api.postHandler(common.globalUri(), {
844
- action: btn.action,
845
- para: submitData
846
- });
847
- },
848
842
  _scripts: null,
849
843
  get scripts() {
850
844
  if (rtn._scripts !== null) {