cnhis-design-vue 2.1.158 → 2.1.159

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 (102) hide show
  1. package/CHANGELOG.md +55 -42
  2. package/es/affix/index.js +8 -8
  3. package/es/age/index.js +10 -10
  4. package/es/alert/index.js +8 -8
  5. package/es/anchor/index.js +8 -8
  6. package/es/auto-complete/index.js +8 -8
  7. package/es/avatar/index.js +8 -8
  8. package/es/back-top/index.js +8 -8
  9. package/es/badge/index.js +8 -8
  10. package/es/base/index.js +8 -8
  11. package/es/big-table/index.js +71 -71
  12. package/es/breadcrumb/index.js +8 -8
  13. package/es/button/index.js +117 -87
  14. package/es/button/style.css +1 -1
  15. package/es/calendar/index.js +8 -8
  16. package/es/captcha/index.js +3 -3
  17. package/es/card/index.js +8 -8
  18. package/es/card-reader-sdk/index.js +1 -1
  19. package/es/carousel/index.js +8 -8
  20. package/es/cascader/index.js +8 -8
  21. package/es/checkbox/index.js +9 -9
  22. package/es/col/index.js +8 -8
  23. package/es/collapse/index.js +8 -8
  24. package/es/color-picker/index.js +1 -1
  25. package/es/comment/index.js +8 -8
  26. package/es/config-provider/index.js +8 -8
  27. package/es/date-picker/index.js +8 -8
  28. package/es/descriptions/index.js +8 -8
  29. package/es/direct/index.js +16 -16
  30. package/es/divider/index.js +8 -8
  31. package/es/drag-layout/index.js +3 -3
  32. package/es/drawer/index.js +8 -8
  33. package/es/dropdown/index.js +8 -8
  34. package/es/editor/index.js +1 -1
  35. package/es/ellipsis/index.js +1 -1
  36. package/es/empty/index.js +8 -8
  37. package/es/fabric-chart/index.js +9 -9
  38. package/es/form/index.js +8 -8
  39. package/es/form-model/index.js +8 -8
  40. package/es/form-table/index.js +74 -74
  41. package/es/full-calendar/index.js +4 -4
  42. package/es/index/index.js +549 -517
  43. package/es/index/style.css +1 -1
  44. package/es/input/index.js +9 -9
  45. package/es/input-number/index.js +8 -8
  46. package/es/layout/index.js +8 -8
  47. package/es/list/index.js +8 -8
  48. package/es/locale-provider/index.js +8 -8
  49. package/es/map/index.js +9 -9
  50. package/es/mentions/index.js +8 -8
  51. package/es/menu/index.js +8 -8
  52. package/es/message/index.js +8 -8
  53. package/es/multi-chat/index.js +76 -76
  54. package/es/multi-chat-client/index.js +70 -70
  55. package/es/multi-chat-history/index.js +4 -4
  56. package/es/multi-chat-record/index.js +14 -14
  57. package/es/multi-chat-setting/index.js +22 -22
  58. package/es/multi-chat-sip/index.js +1 -1
  59. package/es/notification/index.js +8 -8
  60. package/es/page-header/index.js +8 -8
  61. package/es/pagination/index.js +8 -8
  62. package/es/popconfirm/index.js +8 -8
  63. package/es/popover/index.js +8 -8
  64. package/es/progress/index.js +8 -8
  65. package/es/radio/index.js +9 -9
  66. package/es/rate/index.js +8 -8
  67. package/es/result/index.js +8 -8
  68. package/es/row/index.js +8 -8
  69. package/es/scale-container/index.js +9 -9
  70. package/es/scale-view/index.js +56 -54
  71. package/es/scale-view/style.css +1 -1
  72. package/es/select/index.js +12 -12
  73. package/es/select-label/index.js +11 -11
  74. package/es/select-person/index.js +2 -2
  75. package/es/select-tag/index.js +4 -4
  76. package/es/shortcut-setter/index.js +10 -10
  77. package/es/skeleton/index.js +8 -8
  78. package/es/slider/index.js +8 -8
  79. package/es/slider-tree/index.js +9 -9
  80. package/es/space/index.js +8 -8
  81. package/es/spin/index.js +8 -8
  82. package/es/statistic/index.js +8 -8
  83. package/es/steps/index.js +8 -8
  84. package/es/switch/index.js +8 -8
  85. package/es/table-filter/index.js +159 -129
  86. package/es/table-filter/style.css +1 -1
  87. package/es/tabs/index.js +8 -8
  88. package/es/tag/index.js +9 -9
  89. package/es/time-picker/index.js +8 -8
  90. package/es/timeline/index.js +8 -8
  91. package/es/tooltip/index.js +8 -8
  92. package/es/transfer/index.js +8 -8
  93. package/es/tree/index.js +8 -8
  94. package/es/tree-select/index.js +8 -8
  95. package/es/upload/index.js +8 -8
  96. package/es/verification-code/index.js +2 -2
  97. package/lib/cui.common.js +502 -470
  98. package/lib/cui.umd.js +502 -470
  99. package/lib/cui.umd.min.js +16 -16
  100. package/package.json +1 -1
  101. package/packages/button/src/ButtonPrint/new.vue +47 -24
  102. package/packages/upload/chunk-upload/chunk-upload-new.vue +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "2.1.158",
3
+ "version": "2.1.159",
4
4
  "description": "前端业务UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -1062,15 +1062,35 @@ export default create({
1062
1062
  },
1063
1063
  handleClickPrint(curPrintParamList, templateCode, templateId, formatId, printToParam=[], needContinuePrint) {
1064
1064
  let len = curPrintParamList.length;
1065
- const callLocalServicesSuccessCb = async data => {
1065
+ const successParams = [];
1066
+ const errorParams = [];
1067
+ const callLocalServicesSuccessErrorCb = async data => {
1066
1068
  try {
1069
+ if (data.printCbStatus) {
1070
+ successParams.push(data);
1071
+ } else {
1072
+ errorParams.push(data);
1073
+ }
1067
1074
  if (--len <= 0) {
1068
- this.callLocalServicesSuccessCb(data, 'print');
1075
+ if (errorParams.length == curPrintParamList.length) {
1076
+ this.callLocalServicesErrorCb(data, {
1077
+ successList: [],
1078
+ errorList: errorParams,
1079
+ isMulti: true
1080
+ });
1081
+ } else {
1082
+ this.callLocalServicesSuccessCb(data, 'print', {
1083
+ successList: successParams,
1084
+ errorList: errorParams,
1085
+ isMulti: true
1086
+ });
1087
+ }
1069
1088
  }
1070
1089
  } catch (error) {
1071
1090
  console.log('error', error);
1072
1091
  }
1073
1092
  };
1093
+
1074
1094
  if (this.getCurrentLoading() && !needContinuePrint) return;
1075
1095
  this.toggleExpandLoading(true, formatId);
1076
1096
  this.prevFn()
@@ -1111,49 +1131,47 @@ export default create({
1111
1131
  printdlgshow: this.printdlgshow
1112
1132
  };
1113
1133
  if (this.strategy === 'MULTI') {
1114
- // 循环多条
1115
- // for (let i = 0; i < curPrintParamList.length; i++) {
1116
- // if (i > 0) queryParams.printdlgshow = '0';
1117
- // const params = JSON.stringify(Object.assign({}, JSON.parse(this.getPrintParams()), this.printCustomProps, curPrintParamList[i]));
1118
- // this.printInstance.printDirect(
1119
- // {
1120
- // ...queryParams,
1121
- // params
1122
- // },
1123
- // callLocalServicesSuccessCb,
1124
- // this.callLocalServicesErrorCb,
1125
- // this.callLocalServicesCancelCb
1126
- // );
1127
- // }
1128
1134
  // 循环剩余数据
1129
1135
  const multiOtherPrint = () => {
1130
1136
  for (let i = 1; i < curPrintParamList.length; i++) {
1131
1137
  queryParams.printdlgshow = '0';
1132
1138
  const params = JSON.stringify(Object.assign({}, JSON.parse(this.getPrintParams()), this.printCustomProps, curPrintParamList[i]));
1139
+ const originParam = this.findOriginParam(curPrintParamList[i], printToParam);
1133
1140
  this.printInstance.printDirect(
1134
1141
  {
1135
1142
  ...queryParams,
1136
1143
  params
1137
1144
  },
1138
- callLocalServicesSuccessCb,
1139
- this.callLocalServicesErrorCb,
1145
+ (res) => {
1146
+ res.originPrintParam = originParam || undefined;
1147
+ res.printCbStatus = true;
1148
+ callLocalServicesSuccessErrorCb(res);
1149
+ },
1150
+ (error) => {
1151
+ error.originPrintParam = originParam || undefined;
1152
+ callLocalServicesSuccessErrorCb(error);
1153
+ },
1140
1154
  this.callLocalServicesCancelCb
1141
1155
  );
1142
1156
  }
1143
1157
  }
1144
1158
  // 先执行第一条如果取消了,则不再往下执行
1145
1159
  const params = JSON.stringify(Object.assign({}, JSON.parse(this.getPrintParams()), this.printCustomProps, curPrintParamList[0]));
1160
+ const originParam = this.findOriginParam(curPrintParamList[0], printToParam);
1146
1161
  this.printInstance.printDirect(
1147
1162
  {
1148
1163
  ...queryParams,
1149
1164
  params
1150
1165
  },
1151
1166
  (res) => {
1152
- callLocalServicesSuccessCb(res);
1167
+ res.originPrintParam = originParam || undefined;
1168
+ res.printCbStatus = true;
1169
+ callLocalServicesSuccessErrorCb(res);
1153
1170
  multiOtherPrint();
1154
1171
  },
1155
1172
  (error) => {
1156
- this.callLocalServicesErrorCb(error);
1173
+ error.originPrintParam = originParam || undefined;
1174
+ callLocalServicesSuccessErrorCb(error);
1157
1175
  multiOtherPrint();
1158
1176
  },
1159
1177
  (res) => {
@@ -1180,6 +1198,11 @@ export default create({
1180
1198
  }
1181
1199
  })
1182
1200
  },
1201
+
1202
+ findOriginParam(printParam, originParams) {
1203
+ const keys = Object.keys(printParam);
1204
+ return originParams.find(param => keys.every(key => printParam[key] == param[key]));
1205
+ },
1183
1206
  getHisParams(index = 0) {
1184
1207
  const { templateParams, hisParams, params } = this;
1185
1208
  const { reportid = '280' } = hisParams;
@@ -1346,7 +1369,7 @@ export default create({
1346
1369
  this.visible = false;
1347
1370
  },
1348
1371
  /* */
1349
- callLocalServicesSuccessCb(res, type) {
1372
+ callLocalServicesSuccessCb(res, type, config) {
1350
1373
  this.toggleExpandLoading(false);
1351
1374
  let info = {
1352
1375
  type,
@@ -1354,11 +1377,11 @@ export default create({
1354
1377
  templateId: res?.templateId || this.getTemplateIdByFormatId(this.currentFormatId),
1355
1378
  templateCode: res?.templateCode || this.getTemplateCodeByFormatId(this.currentFormatId),
1356
1379
  };
1357
- this.$emit('success', res, info);
1380
+ this.$emit('success', res, info, config);
1358
1381
  },
1359
- callLocalServicesErrorCb(res) {
1382
+ callLocalServicesErrorCb(res, config) {
1360
1383
  this.toggleExpandLoading(false);
1361
- this.$emit('error', res);
1384
+ this.$emit('error', res, config);
1362
1385
  },
1363
1386
  callLocalServicesCancelCb(res) {
1364
1387
  this.toggleExpandLoading(false);
@@ -739,7 +739,8 @@ export default {
739
739
  return new Promise((resolve, reject) => {
740
740
  const obj = {
741
741
  ...data,
742
- ...this.uploadArguments
742
+ ...this.uploadArguments,
743
+ size: file.size,
743
744
  };
744
745
 
745
746
  instance