cnhis-design-vue 2.1.157 → 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.
- package/CHANGELOG.md +55 -35
- package/es/affix/index.js +8 -8
- package/es/age/index.js +10 -10
- package/es/alert/index.js +8 -8
- package/es/anchor/index.js +8 -8
- package/es/auto-complete/index.js +8 -8
- package/es/avatar/index.js +8 -8
- package/es/back-top/index.js +8 -8
- package/es/badge/index.js +8 -8
- package/es/base/index.js +8 -8
- package/es/big-table/index.js +71 -71
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +185 -107
- package/es/button/style.css +1 -1
- package/es/calendar/index.js +8 -8
- package/es/captcha/index.js +3 -3
- package/es/card/index.js +8 -8
- package/es/card-reader-sdk/index.js +1 -1
- package/es/carousel/index.js +8 -8
- package/es/cascader/index.js +8 -8
- package/es/checkbox/index.js +9 -9
- package/es/col/index.js +8 -8
- package/es/collapse/index.js +8 -8
- package/es/color-picker/index.js +1 -1
- package/es/comment/index.js +8 -8
- package/es/config-provider/index.js +8 -8
- package/es/date-picker/index.js +8 -8
- package/es/descriptions/index.js +8 -8
- package/es/direct/index.js +16 -16
- package/es/divider/index.js +8 -8
- package/es/drag-layout/index.js +3 -3
- package/es/drawer/index.js +8 -8
- package/es/dropdown/index.js +8 -8
- package/es/editor/index.js +1 -1
- package/es/ellipsis/index.js +1 -1
- package/es/empty/index.js +8 -8
- package/es/fabric-chart/index.js +9 -9
- package/es/form/index.js +8 -8
- package/es/form-model/index.js +8 -8
- package/es/form-table/index.js +74 -74
- package/es/full-calendar/index.js +4 -4
- package/es/index/index.js +659 -573
- package/es/index/style.css +1 -1
- package/es/input/index.js +9 -9
- package/es/input-number/index.js +8 -8
- package/es/layout/index.js +8 -8
- package/es/list/index.js +8 -8
- package/es/locale-provider/index.js +8 -8
- package/es/map/index.js +9 -9
- package/es/mentions/index.js +8 -8
- package/es/menu/index.js +8 -8
- package/es/message/index.js +8 -8
- package/es/multi-chat/index.js +76 -76
- package/es/multi-chat-client/index.js +70 -70
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +14 -14
- package/es/multi-chat-setting/index.js +22 -22
- package/es/multi-chat-sip/index.js +1 -1
- package/es/notification/index.js +8 -8
- package/es/page-header/index.js +8 -8
- package/es/pagination/index.js +8 -8
- package/es/popconfirm/index.js +8 -8
- package/es/popover/index.js +8 -8
- package/es/progress/index.js +8 -8
- package/es/radio/index.js +9 -9
- package/es/rate/index.js +8 -8
- package/es/result/index.js +8 -8
- package/es/row/index.js +8 -8
- package/es/scale-container/index.js +9 -9
- package/es/scale-view/index.js +56 -54
- package/es/scale-view/style.css +1 -1
- package/es/select/index.js +12 -12
- package/es/select-label/index.js +11 -11
- package/es/select-person/index.js +2 -2
- package/es/select-tag/index.js +4 -4
- package/es/shortcut-setter/index.js +10 -10
- package/es/skeleton/index.js +8 -8
- package/es/slider/index.js +8 -8
- package/es/slider-tree/index.js +9 -9
- package/es/space/index.js +8 -8
- package/es/spin/index.js +8 -8
- package/es/statistic/index.js +8 -8
- package/es/steps/index.js +8 -8
- package/es/switch/index.js +8 -8
- package/es/table-filter/index.js +269 -185
- package/es/table-filter/style.css +1 -1
- package/es/tabs/index.js +8 -8
- package/es/tag/index.js +9 -9
- package/es/time-picker/index.js +8 -8
- package/es/timeline/index.js +8 -8
- package/es/tooltip/index.js +8 -8
- package/es/transfer/index.js +8 -8
- package/es/tree/index.js +8 -8
- package/es/tree-select/index.js +8 -8
- package/es/upload/index.js +8 -8
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +637 -551
- package/lib/cui.umd.js +637 -551
- package/lib/cui.umd.min.js +18 -18
- package/package.json +1 -1
- package/packages/button/src/ButtonPrint/new.vue +77 -19
- package/packages/button/src/ButtonPrint/old.vue +32 -12
- package/packages/table-filter/src/mixins/printNew.js +35 -29
- package/packages/upload/chunk-upload/chunk-upload-new.vue +2 -1
package/package.json
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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,20 +1131,53 @@ export default create({
|
|
|
1111
1131
|
printdlgshow: this.printdlgshow
|
|
1112
1132
|
};
|
|
1113
1133
|
if (this.strategy === 'MULTI') {
|
|
1114
|
-
//
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1134
|
+
// 循环剩余数据
|
|
1135
|
+
const multiOtherPrint = () => {
|
|
1136
|
+
for (let i = 1; i < curPrintParamList.length; i++) {
|
|
1137
|
+
queryParams.printdlgshow = '0';
|
|
1138
|
+
const params = JSON.stringify(Object.assign({}, JSON.parse(this.getPrintParams()), this.printCustomProps, curPrintParamList[i]));
|
|
1139
|
+
const originParam = this.findOriginParam(curPrintParamList[i], printToParam);
|
|
1140
|
+
this.printInstance.printDirect(
|
|
1141
|
+
{
|
|
1142
|
+
...queryParams,
|
|
1143
|
+
params
|
|
1144
|
+
},
|
|
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
|
+
},
|
|
1154
|
+
this.callLocalServicesCancelCb
|
|
1155
|
+
);
|
|
1156
|
+
}
|
|
1127
1157
|
}
|
|
1158
|
+
// 先执行第一条如果取消了,则不再往下执行
|
|
1159
|
+
const params = JSON.stringify(Object.assign({}, JSON.parse(this.getPrintParams()), this.printCustomProps, curPrintParamList[0]));
|
|
1160
|
+
const originParam = this.findOriginParam(curPrintParamList[0], printToParam);
|
|
1161
|
+
this.printInstance.printDirect(
|
|
1162
|
+
{
|
|
1163
|
+
...queryParams,
|
|
1164
|
+
params
|
|
1165
|
+
},
|
|
1166
|
+
(res) => {
|
|
1167
|
+
res.originPrintParam = originParam || undefined;
|
|
1168
|
+
res.printCbStatus = true;
|
|
1169
|
+
callLocalServicesSuccessErrorCb(res);
|
|
1170
|
+
multiOtherPrint();
|
|
1171
|
+
},
|
|
1172
|
+
(error) => {
|
|
1173
|
+
error.originPrintParam = originParam || undefined;
|
|
1174
|
+
callLocalServicesSuccessErrorCb(error);
|
|
1175
|
+
multiOtherPrint();
|
|
1176
|
+
},
|
|
1177
|
+
(res) => {
|
|
1178
|
+
this.callLocalServicesCancelCb(res);
|
|
1179
|
+
}
|
|
1180
|
+
);
|
|
1128
1181
|
} else {
|
|
1129
1182
|
// 聚合一条
|
|
1130
1183
|
this.printInstance.printDirect(
|
|
@@ -1145,6 +1198,11 @@ export default create({
|
|
|
1145
1198
|
}
|
|
1146
1199
|
})
|
|
1147
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
|
+
},
|
|
1148
1206
|
getHisParams(index = 0) {
|
|
1149
1207
|
const { templateParams, hisParams, params } = this;
|
|
1150
1208
|
const { reportid = '280' } = hisParams;
|
|
@@ -1311,7 +1369,7 @@ export default create({
|
|
|
1311
1369
|
this.visible = false;
|
|
1312
1370
|
},
|
|
1313
1371
|
/* */
|
|
1314
|
-
callLocalServicesSuccessCb(res, type) {
|
|
1372
|
+
callLocalServicesSuccessCb(res, type, config) {
|
|
1315
1373
|
this.toggleExpandLoading(false);
|
|
1316
1374
|
let info = {
|
|
1317
1375
|
type,
|
|
@@ -1319,11 +1377,11 @@ export default create({
|
|
|
1319
1377
|
templateId: res?.templateId || this.getTemplateIdByFormatId(this.currentFormatId),
|
|
1320
1378
|
templateCode: res?.templateCode || this.getTemplateCodeByFormatId(this.currentFormatId),
|
|
1321
1379
|
};
|
|
1322
|
-
this.$emit('success', res, info);
|
|
1380
|
+
this.$emit('success', res, info, config);
|
|
1323
1381
|
},
|
|
1324
|
-
callLocalServicesErrorCb(res) {
|
|
1382
|
+
callLocalServicesErrorCb(res, config) {
|
|
1325
1383
|
this.toggleExpandLoading(false);
|
|
1326
|
-
this.$emit('error', res);
|
|
1384
|
+
this.$emit('error', res, config);
|
|
1327
1385
|
},
|
|
1328
1386
|
callLocalServicesCancelCb(res) {
|
|
1329
1387
|
this.toggleExpandLoading(false);
|
|
@@ -578,19 +578,39 @@ export default create({
|
|
|
578
578
|
printdlgshow: this.printdlgshow
|
|
579
579
|
};
|
|
580
580
|
if (this.strategy === 'MULTI') {
|
|
581
|
-
//
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
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(
|
|
@@ -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
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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;
|