cnhis-design-vue 2.1.156 → 2.1.158

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 (46) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/es/age/index.js +2 -2
  3. package/es/big-table/index.js +26 -26
  4. package/es/button/index.js +118 -70
  5. package/es/button/style.css +1 -1
  6. package/es/captcha/index.js +3 -3
  7. package/es/card-reader-sdk/index.js +1 -1
  8. package/es/checkbox/index.js +1 -1
  9. package/es/color-picker/index.js +1 -1
  10. package/es/drag-layout/index.js +3 -3
  11. package/es/editor/index.js +1 -1
  12. package/es/ellipsis/index.js +1 -1
  13. package/es/fabric-chart/index.js +9 -9
  14. package/es/form-table/index.js +20 -20
  15. package/es/full-calendar/index.js +4 -4
  16. package/es/index/index.js +372 -315
  17. package/es/index/style.css +1 -1
  18. package/es/input/index.js +1 -1
  19. package/es/map/index.js +1 -1
  20. package/es/multi-chat/index.js +25 -25
  21. package/es/multi-chat-client/index.js +19 -19
  22. package/es/multi-chat-history/index.js +4 -4
  23. package/es/multi-chat-record/index.js +4 -4
  24. package/es/multi-chat-setting/index.js +20 -20
  25. package/es/multi-chat-sip/index.js +1 -1
  26. package/es/radio/index.js +1 -1
  27. package/es/scale-container/index.js +1 -1
  28. package/es/scale-view/index.js +27 -27
  29. package/es/select/index.js +4 -4
  30. package/es/select-label/index.js +3 -3
  31. package/es/select-person/index.js +2 -2
  32. package/es/select-tag/index.js +4 -4
  33. package/es/shortcut-setter/index.js +2 -2
  34. package/es/slider-tree/index.js +1 -1
  35. package/es/table-filter/index.js +219 -162
  36. package/es/table-filter/style.css +1 -1
  37. package/es/tag/index.js +1 -1
  38. package/es/verification-code/index.js +2 -2
  39. package/lib/cui.common.js +443 -386
  40. package/lib/cui.umd.js +443 -386
  41. package/lib/cui.umd.min.js +19 -19
  42. package/package.json +1 -1
  43. package/packages/button/src/ButtonPrint/new.vue +47 -12
  44. package/packages/button/src/ButtonPrint/old.vue +32 -12
  45. package/packages/table-filter/src/base-search-com/BaseSearch.vue +3 -3
  46. package/packages/table-filter/src/mixins/printNew.js +35 -29
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "2.1.156",
3
+ "version": "2.1.158",
4
4
  "description": "前端业务UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -1112,19 +1112,54 @@ export default create({
1112
1112
  };
1113
1113
  if (this.strategy === 'MULTI') {
1114
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
- );
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
+ // 循环剩余数据
1129
+ const multiOtherPrint = () => {
1130
+ for (let i = 1; i < curPrintParamList.length; i++) {
1131
+ queryParams.printdlgshow = '0';
1132
+ const params = JSON.stringify(Object.assign({}, JSON.parse(this.getPrintParams()), this.printCustomProps, curPrintParamList[i]));
1133
+ this.printInstance.printDirect(
1134
+ {
1135
+ ...queryParams,
1136
+ params
1137
+ },
1138
+ callLocalServicesSuccessCb,
1139
+ this.callLocalServicesErrorCb,
1140
+ this.callLocalServicesCancelCb
1141
+ );
1142
+ }
1127
1143
  }
1144
+ // 先执行第一条如果取消了,则不再往下执行
1145
+ const params = JSON.stringify(Object.assign({}, JSON.parse(this.getPrintParams()), this.printCustomProps, curPrintParamList[0]));
1146
+ this.printInstance.printDirect(
1147
+ {
1148
+ ...queryParams,
1149
+ params
1150
+ },
1151
+ (res) => {
1152
+ callLocalServicesSuccessCb(res);
1153
+ multiOtherPrint();
1154
+ },
1155
+ (error) => {
1156
+ this.callLocalServicesErrorCb(error);
1157
+ multiOtherPrint();
1158
+ },
1159
+ (res) => {
1160
+ this.callLocalServicesCancelCb(res);
1161
+ }
1162
+ );
1128
1163
  } else {
1129
1164
  // 聚合一条
1130
1165
  this.printInstance.printDirect(
@@ -578,19 +578,39 @@ export default create({
578
578
  printdlgshow: this.printdlgshow
579
579
  };
580
580
  if (this.strategy === 'MULTI') {
581
- // 循环多条
582
- for (let i = 0; i < this.printParams.length; i++) {
583
- if (i > 0) queryParams.printdlgshow = '0';
584
- this.printInstance.printDirect(
585
- {
586
- ...queryParams,
587
- params: this.getPrintParams(i)
588
- },
589
- callLocalServicesSuccessCb,
590
- this.callLocalServicesErrorCb,
591
- this.callLocalServicesCancelCb
592
- );
581
+ // 循环剩余数据
582
+ const multiOtherPrint = () => {
583
+ for (let i = 1; i < this.printParams.length; i++) {
584
+ queryParams.printdlgshow = '0';
585
+ this.printInstance.printDirect(
586
+ {
587
+ ...queryParams,
588
+ params: this.getPrintParams(i)
589
+ },
590
+ callLocalServicesSuccessCb,
591
+ this.callLocalServicesErrorCb,
592
+ this.callLocalServicesCancelCb
593
+ );
594
+ }
593
595
  }
596
+ // 先执行第一条如果取消了,则不再往下执行
597
+ this.printInstance.printDirect(
598
+ {
599
+ ...queryParams,
600
+ params: this.getPrintParams()
601
+ },
602
+ (res) => {
603
+ callLocalServicesSuccessCb(res);
604
+ multiOtherPrint();
605
+ },
606
+ (error) => {
607
+ this.callLocalServicesErrorCb(error);
608
+ multiOtherPrint();
609
+ },
610
+ (res) => {
611
+ this.callLocalServicesCancelCb(res);
612
+ }
613
+ );
594
614
  } else {
595
615
  // 聚合一条
596
616
  this.printInstance.printDirect(
@@ -1346,7 +1346,7 @@ export default create({
1346
1346
  this.$refs.quicksearch?.clearData();
1347
1347
  this.$emit('reloadList', item);
1348
1348
  },
1349
- clickBtn(data, item, index, skip, j) {
1349
+ clickBtn(data, item, index, skip, j, config={}) {
1350
1350
  this.$emit('clearTeamTitleName');
1351
1351
  if ((item.name.includes('批量') && item.type == 'ADD' && !skip) || (item.type == 'BATCH' && !skip)) {
1352
1352
  this.showDrawer(item, j);
@@ -1360,7 +1360,7 @@ export default create({
1360
1360
  Object.assign(item, {
1361
1361
  _index_: j
1362
1362
  });
1363
- this.$emit('clickBtn', data, item, index);
1363
+ this.$emit('clickBtn', data, item, index, j, config);
1364
1364
  },
1365
1365
  clickGroupBtn(btn, j) {
1366
1366
  this.clickBtn(this.clickRowData, btn, this.clickRowData.my_index, undefined, j);
@@ -2065,7 +2065,7 @@ export default create({
2065
2065
  触发原按钮流程,在EditTable中触发原打印按钮节点时,修改[printPrevFinish]状态
2066
2066
  触发watch,再执行Promise.resolve()
2067
2067
  */
2068
- this.clickBtn(clickBtn, btn, clickBtn.my_index, true, j);
2068
+ this.clickBtn(clickBtn, btn, clickBtn.my_index, true, j, {printBtnTrigger: true});
2069
2069
  const timestamp = Date.now();
2070
2070
 
2071
2071
  this.resetAllPrintFnWatch();
@@ -143,39 +143,45 @@ export default {
143
143
  }
144
144
  return list;
145
145
  },
146
+ setBtnItemSetting(item, cItem, configObj) {
147
+ let printConfig = {
148
+ number: item.number,
149
+ authorizationKey: item.authorizationKey,
150
+ port: item.port,
151
+ versionType: item.versionType,
152
+ hisParams: { reportid: item.number },
153
+ id: item.id
154
+ };
155
+ cItem.__printConfig = printConfig;
156
+ if (!this.isLowCode) return;
157
+ let configItem = configObj[item.id] || {};
158
+ let outerPrintKeys = (configItem.formatIds && configItem.formatIds?.split(',').filter(Boolean)) || [];
159
+ let formatList = item.__printFormatByNumberData?.obj?.[0]?.format || [];
160
+ // 如果仅存在一个格式,哪怕没默认格式,按钮也展示 打印{格式名称},点击名称就是直接打印
161
+ let defaultFormatId = formatList.find(v => v.defaultFlag == 1)?.id || '';
162
+ // 低代码都走新的打印逻辑
163
+ let newPrintSetting = {
164
+ isShowPrintAll: false,
165
+ isShowOutSetting: true,
166
+ customProps: {},
167
+ outerPrintKeys,
168
+ defaultFormatId
169
+ };
170
+ cItem.__configItem = configItem || {};
171
+ cItem.__newPrintSetting = newPrintSetting;
172
+ cItem.__printFormatByNumberData = item.__printFormatByNumberData;
173
+ },
174
+
146
175
  setPrintNumberToBtnList(printNumberList = [], btnList = [], configObj = {}) {
147
176
  let cloneList = cloneDeep(btnList);
148
177
 
149
178
  printNumberList.forEach((item, index) => {
150
- const i = cloneList.findIndex(v => v.settingObj[0].trigger_id == item.id);
151
- if (!~i) return;
152
- let cItem = cloneList[i];
153
- let printConfig = {
154
- number: item.number,
155
- authorizationKey: item.authorizationKey,
156
- port: item.port,
157
- versionType: item.versionType,
158
- hisParams: { reportid: item.number },
159
- id: item.id
160
- };
161
- cItem.__printConfig = printConfig;
162
- if (!this.isLowCode) return;
163
- let configItem = configObj[item.id] || {};
164
- let outerPrintKeys = (configItem.formatIds && configItem.formatIds?.split(',').filter(Boolean)) || [];
165
- let formatList = item.__printFormatByNumberData?.obj?.[0]?.format || [];
166
- // 如果仅存在一个格式,哪怕没默认格式,按钮也展示 打印{格式名称},点击名称就是直接打印
167
- let defaultFormatId = formatList.find(v => v.defaultFlag == 1)?.id || '';
168
- // 低代码都走新的打印逻辑
169
- let newPrintSetting = {
170
- isShowPrintAll: false,
171
- isShowOutSetting: true,
172
- customProps: {},
173
- outerPrintKeys,
174
- defaultFormatId
175
- };
176
- cItem.__configItem = configItem || {};
177
- cItem.__newPrintSetting = newPrintSetting;
178
- cItem.__printFormatByNumberData = item.__printFormatByNumberData;
179
+ // 不能直接找index,因为可能多个print按钮配置了同一个trigger_id, 导致第二个一直无法赋值
180
+ const filterCList = cloneList.filter(v => v.settingObj?.[0]?.trigger_id == item.id);
181
+ if (!filterCList?.length) return;
182
+ filterCList.forEach(v => {
183
+ this.setBtnItemSetting(item, v, configObj);
184
+ });
179
185
  });
180
186
 
181
187
  return cloneList;