cnhis-design-vue 2.1.157 → 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.
- package/CHANGELOG.md +7 -0
- package/es/age/index.js +2 -2
- package/es/big-table/index.js +26 -26
- package/es/button/index.js +118 -70
- package/es/button/style.css +1 -1
- package/es/captcha/index.js +3 -3
- package/es/card-reader-sdk/index.js +1 -1
- package/es/checkbox/index.js +1 -1
- package/es/color-picker/index.js +1 -1
- package/es/drag-layout/index.js +3 -3
- package/es/editor/index.js +1 -1
- package/es/ellipsis/index.js +1 -1
- package/es/fabric-chart/index.js +9 -9
- package/es/form-table/index.js +20 -20
- package/es/full-calendar/index.js +4 -4
- package/es/index/index.js +341 -287
- package/es/index/style.css +1 -1
- package/es/input/index.js +1 -1
- package/es/map/index.js +1 -1
- package/es/multi-chat/index.js +25 -25
- package/es/multi-chat-client/index.js +19 -19
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +4 -4
- package/es/multi-chat-setting/index.js +20 -20
- package/es/multi-chat-sip/index.js +1 -1
- package/es/radio/index.js +1 -1
- package/es/scale-container/index.js +1 -1
- package/es/scale-view/index.js +27 -27
- package/es/select/index.js +4 -4
- package/es/select-label/index.js +3 -3
- package/es/select-person/index.js +2 -2
- package/es/select-tag/index.js +4 -4
- package/es/shortcut-setter/index.js +2 -2
- package/es/slider-tree/index.js +1 -1
- package/es/table-filter/index.js +188 -134
- package/es/table-filter/style.css +1 -1
- package/es/tag/index.js +1 -1
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +389 -335
- package/lib/cui.umd.js +389 -335
- package/lib/cui.umd.min.js +13 -13
- package/package.json +1 -1
- package/packages/button/src/ButtonPrint/new.vue +47 -12
- package/packages/button/src/ButtonPrint/old.vue +32 -12
- package/packages/table-filter/src/mixins/printNew.js +35 -29
package/package.json
CHANGED
|
@@ -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
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
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
|
-
|
|
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;
|