cnhis-design-vue 3.3.3-beta.42 → 3.3.3-beta.46
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/README.md +87 -87
- package/es/components/button-print/index.d.ts +7 -2
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +7 -2
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +10 -3
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +100 -11
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +4 -1
- package/es/components/button-print/src/utils/print.d.ts +1 -1
- package/es/components/button-print/src/utils/print.js +7 -3
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/field-set/src/FieldColor.vue.d.ts +4 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +4 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +4 -1
- package/es/components/field-set/src/components/table-row.vue.d.ts +2 -1
- package/es/components/field-set/src/components/table-row.vue2.js +21 -6
- package/es/components/field-set/src/types/index.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +19 -6
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.js +32 -17
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +52 -23
- package/es/env.d.ts +25 -25
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
@@ -1,87 +1,87 @@
|
|
1
|
-
# 安装
|
2
|
-
|
3
|
-
```shell
|
4
|
-
npm i cnhis-design-vue@[版本号]
|
5
|
-
# or
|
6
|
-
yarn add cnhis-design-vue@[版本号] #推荐
|
7
|
-
```
|
8
|
-
|
9
|
-
## 1.全局引入
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
// main.ts
|
13
|
-
import { createApp } from 'vue';
|
14
|
-
import App from './App.vue';
|
15
|
-
import 'cnhis-design-vue/es/packages/index.css';
|
16
|
-
import cui from 'cnhis-design-vue';
|
17
|
-
|
18
|
-
const app = createApp(App);
|
19
|
-
app.use(cui).mount('#app');
|
20
|
-
```
|
21
|
-
|
22
|
-
## 2. 按需引入
|
23
|
-
|
24
|
-
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
25
|
-
|
26
|
-
### 2.1 样式处理方式1 (按需引入样式)
|
27
|
-
|
28
|
-
```shell
|
29
|
-
# 安装自动导入样式的插件
|
30
|
-
npm i -d vite-plugin-style-import
|
31
|
-
```
|
32
|
-
|
33
|
-
```typescript
|
34
|
-
// vite.config.ts
|
35
|
-
import { defineConfig } from 'vite';
|
36
|
-
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
37
|
-
|
38
|
-
export default defineConfig({
|
39
|
-
plugins: [
|
40
|
-
// ...otherPlugins
|
41
|
-
createStyleImportPlugin({
|
42
|
-
libs: [
|
43
|
-
{
|
44
|
-
libraryName: 'cnhis-design-vue',
|
45
|
-
esModule: true,
|
46
|
-
ensureStyleFile: true,
|
47
|
-
resolveStyle: name => {
|
48
|
-
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
49
|
-
}
|
50
|
-
}
|
51
|
-
]
|
52
|
-
})
|
53
|
-
]
|
54
|
-
});
|
55
|
-
```
|
56
|
-
|
57
|
-
### 2.2 样式处理方式2 (全局引入样式)
|
58
|
-
|
59
|
-
```typescript
|
60
|
-
// main.ts
|
61
|
-
import 'cnhis-design-vue/es/components/index.css';
|
62
|
-
```
|
63
|
-
|
64
|
-
## 3.FAQ
|
65
|
-
|
66
|
-
### 3.1 项目打包后样式丢失
|
67
|
-
|
68
|
-
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
69
|
-
|
70
|
-
```typescript
|
71
|
-
// vite.config.ts
|
72
|
-
import { defineConfig } from 'vite';
|
73
|
-
|
74
|
-
export default defineConfig({
|
75
|
-
build: {
|
76
|
-
rollupOptions: {
|
77
|
-
// ..otherOptions
|
78
|
-
output: {
|
79
|
-
dir: './dist',
|
80
|
-
manualChunks: {
|
81
|
-
'cnhis-vendor': ['cnhis-design-vue']
|
82
|
-
}
|
83
|
-
}
|
84
|
-
}
|
85
|
-
}
|
86
|
-
});
|
87
|
-
```
|
1
|
+
# 安装
|
2
|
+
|
3
|
+
```shell
|
4
|
+
npm i cnhis-design-vue@[版本号]
|
5
|
+
# or
|
6
|
+
yarn add cnhis-design-vue@[版本号] #推荐
|
7
|
+
```
|
8
|
+
|
9
|
+
## 1.全局引入
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
// main.ts
|
13
|
+
import { createApp } from 'vue';
|
14
|
+
import App from './App.vue';
|
15
|
+
import 'cnhis-design-vue/es/packages/index.css';
|
16
|
+
import cui from 'cnhis-design-vue';
|
17
|
+
|
18
|
+
const app = createApp(App);
|
19
|
+
app.use(cui).mount('#app');
|
20
|
+
```
|
21
|
+
|
22
|
+
## 2. 按需引入
|
23
|
+
|
24
|
+
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
25
|
+
|
26
|
+
### 2.1 样式处理方式1 (按需引入样式)
|
27
|
+
|
28
|
+
```shell
|
29
|
+
# 安装自动导入样式的插件
|
30
|
+
npm i -d vite-plugin-style-import
|
31
|
+
```
|
32
|
+
|
33
|
+
```typescript
|
34
|
+
// vite.config.ts
|
35
|
+
import { defineConfig } from 'vite';
|
36
|
+
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
37
|
+
|
38
|
+
export default defineConfig({
|
39
|
+
plugins: [
|
40
|
+
// ...otherPlugins
|
41
|
+
createStyleImportPlugin({
|
42
|
+
libs: [
|
43
|
+
{
|
44
|
+
libraryName: 'cnhis-design-vue',
|
45
|
+
esModule: true,
|
46
|
+
ensureStyleFile: true,
|
47
|
+
resolveStyle: name => {
|
48
|
+
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
]
|
52
|
+
})
|
53
|
+
]
|
54
|
+
});
|
55
|
+
```
|
56
|
+
|
57
|
+
### 2.2 样式处理方式2 (全局引入样式)
|
58
|
+
|
59
|
+
```typescript
|
60
|
+
// main.ts
|
61
|
+
import 'cnhis-design-vue/es/components/index.css';
|
62
|
+
```
|
63
|
+
|
64
|
+
## 3.FAQ
|
65
|
+
|
66
|
+
### 3.1 项目打包后样式丢失
|
67
|
+
|
68
|
+
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
69
|
+
|
70
|
+
```typescript
|
71
|
+
// vite.config.ts
|
72
|
+
import { defineConfig } from 'vite';
|
73
|
+
|
74
|
+
export default defineConfig({
|
75
|
+
build: {
|
76
|
+
rollupOptions: {
|
77
|
+
// ..otherOptions
|
78
|
+
output: {
|
79
|
+
dir: './dist',
|
80
|
+
manualChunks: {
|
81
|
+
'cnhis-vendor': ['cnhis-design-vue']
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
});
|
87
|
+
```
|
@@ -340,6 +340,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
340
340
|
buttonProps: {};
|
341
341
|
showMaxHeight: null;
|
342
342
|
initLoadPrintParams: boolean;
|
343
|
+
showPreviewDataList: boolean;
|
343
344
|
};
|
344
345
|
};
|
345
346
|
svrUpdateIp: {
|
@@ -459,6 +460,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
459
460
|
buttonProps: {};
|
460
461
|
showMaxHeight: null;
|
461
462
|
initLoadPrintParams: boolean;
|
463
|
+
showPreviewDataList: boolean;
|
462
464
|
};
|
463
465
|
};
|
464
466
|
svrUpdateIp: {
|
@@ -493,6 +495,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
493
495
|
showMaxHeight: import("vue").ComputedRef<any>;
|
494
496
|
printAllFormatIds: import("vue").ComputedRef<any>;
|
495
497
|
positionElement: import("vue").ComputedRef<any>;
|
498
|
+
showPreviewDataList: import("vue").ComputedRef<any>;
|
496
499
|
printAllShortcut: import("vue").ComputedRef<any>;
|
497
500
|
showSettingItems: import("vue").ComputedRef<import("../../shared/types").AnyObject[]>;
|
498
501
|
isSelectedAll: import("vue").WritableComputedRef<boolean>;
|
@@ -511,13 +514,13 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
511
514
|
callLocalServicesCancelCb: (res: unknown) => void;
|
512
515
|
prevFnError: (type: string) => void;
|
513
516
|
getPrintParams: () => string;
|
514
|
-
getOnceParams: (curPrintParamList: any[] | undefined, templateCode: string) => string;
|
517
|
+
getOnceParams: (curPrintParamList: any[] | undefined, templateCode: string, name?: string | undefined) => string;
|
515
518
|
handleClickPrintAll: () => void;
|
516
519
|
toggleExpandLoading: (isLoading: boolean, formatId?: string | undefined) => void;
|
517
520
|
getCurrentLoading: () => any;
|
518
521
|
handleOneTypePrint: (templateCode: string, templateId: string, formatId: string, isOuterClick: boolean) => void;
|
519
522
|
handleClickPrint: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string, printToParam?: never[], needContinuePrint?: boolean | undefined) => Promise<void>;
|
520
|
-
handleClickPreview: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string) => Promise<void>;
|
523
|
+
handleClickPreview: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string, name?: string | undefined) => Promise<void>;
|
521
524
|
handleClickPdf: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string) => Promise<void>;
|
522
525
|
handleClickEdit: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string) => void;
|
523
526
|
handleResetPrinter: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string) => Promise<void>;
|
@@ -557,6 +560,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
557
560
|
NCheckbox: any;
|
558
561
|
PrintOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
559
562
|
ChevronDownSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
563
|
+
ArrowForward: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
560
564
|
ArrowForwardOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
561
565
|
SettingsOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
562
566
|
IdentityVerification: import("vue").DefineComponent<{
|
@@ -838,6 +842,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
838
842
|
buttonProps: {};
|
839
843
|
showMaxHeight: null;
|
840
844
|
initLoadPrintParams: boolean;
|
845
|
+
showPreviewDataList: boolean;
|
841
846
|
};
|
842
847
|
};
|
843
848
|
svrUpdateIp: {
|
@@ -346,6 +346,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
346
346
|
buttonProps: {};
|
347
347
|
showMaxHeight: null;
|
348
348
|
initLoadPrintParams: boolean;
|
349
|
+
showPreviewDataList: boolean;
|
349
350
|
};
|
350
351
|
};
|
351
352
|
svrUpdateIp: {
|
@@ -465,6 +466,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
465
466
|
buttonProps: {};
|
466
467
|
showMaxHeight: null;
|
467
468
|
initLoadPrintParams: boolean;
|
469
|
+
showPreviewDataList: boolean;
|
468
470
|
};
|
469
471
|
};
|
470
472
|
svrUpdateIp: {
|
@@ -499,6 +501,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
499
501
|
showMaxHeight: import("vue").ComputedRef<any>;
|
500
502
|
printAllFormatIds: import("vue").ComputedRef<any>;
|
501
503
|
positionElement: import("vue").ComputedRef<any>;
|
504
|
+
showPreviewDataList: import("vue").ComputedRef<any>;
|
502
505
|
printAllShortcut: import("vue").ComputedRef<any>;
|
503
506
|
showSettingItems: import("vue").ComputedRef<AnyObject[]>;
|
504
507
|
isSelectedAll: import("vue").WritableComputedRef<boolean>;
|
@@ -517,13 +520,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
517
520
|
callLocalServicesCancelCb: (res: unknown) => void;
|
518
521
|
prevFnError: (type: string) => void;
|
519
522
|
getPrintParams: () => string;
|
520
|
-
getOnceParams: (curPrintParamList: any[] | undefined, templateCode: string) => string;
|
523
|
+
getOnceParams: (curPrintParamList: any[] | undefined, templateCode: string, name?: string | undefined) => string;
|
521
524
|
handleClickPrintAll: () => void;
|
522
525
|
toggleExpandLoading: (isLoading: boolean, formatId?: string | undefined) => void;
|
523
526
|
getCurrentLoading: () => any;
|
524
527
|
handleOneTypePrint: (templateCode: string, templateId: string, formatId: string, isOuterClick: boolean) => void;
|
525
528
|
handleClickPrint: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string, printToParam?: never[], needContinuePrint?: boolean | undefined) => Promise<void>;
|
526
|
-
handleClickPreview: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string) => Promise<void>;
|
529
|
+
handleClickPreview: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string, name?: string | undefined) => Promise<void>;
|
527
530
|
handleClickPdf: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string) => Promise<void>;
|
528
531
|
handleClickEdit: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string) => void;
|
529
532
|
handleResetPrinter: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string) => Promise<void>;
|
@@ -563,6 +566,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
563
566
|
NCheckbox: any;
|
564
567
|
PrintOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
565
568
|
ChevronDownSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
569
|
+
ArrowForward: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
566
570
|
ArrowForwardOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
567
571
|
SettingsOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
568
572
|
IdentityVerification: import("vue").DefineComponent<{
|
@@ -844,6 +848,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
844
848
|
buttonProps: {};
|
845
849
|
showMaxHeight: null;
|
846
850
|
initLoadPrintParams: boolean;
|
851
|
+
showPreviewDataList: boolean;
|
847
852
|
};
|
848
853
|
};
|
849
854
|
svrUpdateIp: {
|
@@ -105,6 +105,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
105
105
|
buttonProps: {};
|
106
106
|
showMaxHeight: null;
|
107
107
|
initLoadPrintParams: boolean;
|
108
|
+
showPreviewDataList: boolean;
|
108
109
|
};
|
109
110
|
};
|
110
111
|
svrUpdateIp: {
|
@@ -227,6 +228,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
227
228
|
buttonProps: {};
|
228
229
|
showMaxHeight: null;
|
229
230
|
initLoadPrintParams: boolean;
|
231
|
+
showPreviewDataList: boolean;
|
230
232
|
};
|
231
233
|
};
|
232
234
|
svrUpdateIp: {
|
@@ -261,6 +263,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
261
263
|
showMaxHeight: import("vue").ComputedRef<any>;
|
262
264
|
printAllFormatIds: import("vue").ComputedRef<any>;
|
263
265
|
positionElement: import("vue").ComputedRef<any>;
|
266
|
+
showPreviewDataList: import("vue").ComputedRef<any>;
|
264
267
|
printAllShortcut: import("vue").ComputedRef<any>;
|
265
268
|
showSettingItems: import("vue").ComputedRef<AnyObject[]>;
|
266
269
|
isSelectedAll: import("vue").WritableComputedRef<boolean>;
|
@@ -279,13 +282,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
279
282
|
callLocalServicesCancelCb: (res: unknown) => void;
|
280
283
|
prevFnError: (type: string) => void;
|
281
284
|
getPrintParams: () => string;
|
282
|
-
getOnceParams: (curPrintParamList: any[] | undefined, templateCode: string) => string;
|
285
|
+
getOnceParams: (curPrintParamList: any[] | undefined, templateCode: string, name?: string) => string;
|
283
286
|
handleClickPrintAll: () => void;
|
284
287
|
toggleExpandLoading: (isLoading: boolean, formatId?: string) => void;
|
285
288
|
getCurrentLoading: () => any;
|
286
289
|
handleOneTypePrint: (templateCode: string, templateId: string, formatId: string, isOuterClick: boolean) => void;
|
287
290
|
handleClickPrint: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string, printToParam?: never[], needContinuePrint?: boolean) => Promise<void>;
|
288
|
-
handleClickPreview: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string) => Promise<void>;
|
291
|
+
handleClickPreview: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string, name?: string) => Promise<void>;
|
289
292
|
handleClickPdf: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string) => Promise<void>;
|
290
293
|
handleClickEdit: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string) => void;
|
291
294
|
handleResetPrinter: (curPrintParamList: any[] | undefined, templateCode: string, templateId: string, formatId: string) => Promise<void>;
|
@@ -325,6 +328,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
325
328
|
NCheckbox: any;
|
326
329
|
PrintOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
327
330
|
ChevronDownSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
331
|
+
ArrowForward: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
328
332
|
ArrowForwardOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
329
333
|
SettingsOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
330
334
|
IdentityVerification: import("vue").DefineComponent<{
|
@@ -375,7 +379,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
375
379
|
};
|
376
380
|
rules: import("naive-ui").FormRules;
|
377
381
|
style: {
|
378
|
-
width: string;
|
382
|
+
width: string; /**
|
383
|
+
* 打印预览按钮文本
|
384
|
+
*/
|
379
385
|
};
|
380
386
|
formRef: import("vue").Ref<{
|
381
387
|
validate: import("naive-ui/es/form/src/interface").FormValidate;
|
@@ -609,6 +615,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
609
615
|
buttonProps: {};
|
610
616
|
showMaxHeight: null;
|
611
617
|
initLoadPrintParams: boolean;
|
618
|
+
showPreviewDataList: boolean;
|
612
619
|
};
|
613
620
|
};
|
614
621
|
svrUpdateIp: {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { createElementVNode, defineComponent, inject, ref, reactive, computed, onMounted, onBeforeUnmount, watch, openBlock, createElementBlock, Fragment, createCommentVNode, createVNode, unref, withCtx, renderList, createBlock, mergeProps, createTextVNode, toDisplayString, normalizeStyle, isRef, renderSlot, withModifiers, normalizeClass } from 'vue';
|
2
2
|
import { isObject } from '@vue/shared';
|
3
3
|
import { useMessage, NButtonGroup, NDropdown, NButton, NIcon, NPopover, NCheckbox, NDivider } from 'naive-ui';
|
4
|
-
import { PrintOutline, SettingsOutline, ChevronDownSharp, ArrowForwardOutline } from '@vicons/ionicons5';
|
4
|
+
import { PrintOutline, SettingsOutline, ChevronDownSharp, ArrowForwardOutline, ArrowForward } from '@vicons/ionicons5';
|
5
5
|
import { InjectionButtonPrintEmits } from '../constants/index.js';
|
6
6
|
import { Print } from '../utils/print.js';
|
7
7
|
import { isIReport } from '../utils/browserPrint.js';
|
@@ -10,6 +10,7 @@ import { format } from 'date-fns';
|
|
10
10
|
import '../api.js';
|
11
11
|
import '../../../shortcut-provider/index.js';
|
12
12
|
import { encapBrowserLog } from '../../../../shared/utils/index.js';
|
13
|
+
import { cloneDeep } from 'lodash-es';
|
13
14
|
import { useShortcuts } from '../../../shortcut-provider/src/hooks/useShortcuts.js';
|
14
15
|
|
15
16
|
const _hoisted_1 = {
|
@@ -82,7 +83,18 @@ const _hoisted_19 = {
|
|
82
83
|
"background": "transparent"
|
83
84
|
}
|
84
85
|
};
|
85
|
-
const _hoisted_20 =
|
86
|
+
const _hoisted_20 = {
|
87
|
+
class: "label"
|
88
|
+
};
|
89
|
+
const _hoisted_21 = ["onClick"];
|
90
|
+
const _hoisted_22 = {
|
91
|
+
key: 1,
|
92
|
+
class: "print-lite",
|
93
|
+
style: {
|
94
|
+
"background": "transparent"
|
95
|
+
}
|
96
|
+
};
|
97
|
+
const _hoisted_23 = ["onClick"];
|
86
98
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
87
99
|
__name: "NewPrintComponent",
|
88
100
|
props: {
|
@@ -223,7 +235,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
223
235
|
shortcut: {},
|
224
236
|
buttonProps: {},
|
225
237
|
showMaxHeight: null,
|
226
|
-
initLoadPrintParams: false
|
238
|
+
initLoadPrintParams: false,
|
239
|
+
showPreviewDataList: false
|
227
240
|
})
|
228
241
|
},
|
229
242
|
svrUpdateIp: {
|
@@ -384,6 +397,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
384
397
|
var _a;
|
385
398
|
return (_a = props.newPrintSetting) == null ? void 0 : _a.positionElement;
|
386
399
|
});
|
400
|
+
const showPreviewDataList = computed(() => {
|
401
|
+
var _a;
|
402
|
+
return (_a = props.newPrintSetting) == null ? void 0 : _a.showPreviewDataList;
|
403
|
+
});
|
387
404
|
const printAllShortcut = computed(() => {
|
388
405
|
var _a, _b;
|
389
406
|
const keys = Object.keys(shortcutSettings.value);
|
@@ -443,6 +460,32 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
443
460
|
if (isIReport(curOuter.key)) {
|
444
461
|
return targetList.filter((option) => option.key != "formatEditText");
|
445
462
|
}
|
463
|
+
if (props.strategy !== "MULTI" && showPreviewDataList.value) {
|
464
|
+
const printParamsItemList = state.printParams[curOuter.templateCode];
|
465
|
+
const aa = cloneDeep(targetList).map((item) => {
|
466
|
+
if (item.key === "previewText" && (printParamsItemList == null ? void 0 : printParamsItemList.length) > 1) {
|
467
|
+
const list = printParamsItemList.map((item2) => {
|
468
|
+
return {
|
469
|
+
label: item2.printPreviewBusinessName,
|
470
|
+
key: `previewText_${item2.printPreviewBusinessName}`
|
471
|
+
};
|
472
|
+
});
|
473
|
+
item.children = [{
|
474
|
+
label: function() {
|
475
|
+
var _a, _b, _c;
|
476
|
+
try {
|
477
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.123")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.123")) || "\u5168\u90E8";
|
478
|
+
} catch (e) {
|
479
|
+
return "\u5168\u90E8";
|
480
|
+
}
|
481
|
+
}(),
|
482
|
+
key: "previewText_all"
|
483
|
+
}, ...list];
|
484
|
+
}
|
485
|
+
return item;
|
486
|
+
});
|
487
|
+
return aa;
|
488
|
+
}
|
446
489
|
return targetList;
|
447
490
|
};
|
448
491
|
const handleTypeChange = (name, key) => {
|
@@ -521,7 +564,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
521
564
|
} : {}
|
522
565
|
});
|
523
566
|
};
|
524
|
-
const getOnceParams = (curPrintParamList = [], templateCode) => {
|
567
|
+
const getOnceParams = (curPrintParamList = [], templateCode, name) => {
|
525
568
|
var _a, _b;
|
526
569
|
let params = {};
|
527
570
|
let obj = {};
|
@@ -533,9 +576,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
533
576
|
};
|
534
577
|
obj.datasetData[key] = datasetDataKeyVal;
|
535
578
|
} else {
|
579
|
+
const filterParamsList = name && name !== "all" ? curPrintParamList.filter((item) => item.printPreviewBusinessName === name) : curPrintParamList;
|
536
580
|
Object.keys(curPrintParamList[0]).forEach((v) => {
|
537
581
|
obj[v] = [];
|
538
|
-
|
582
|
+
filterParamsList.forEach((k) => {
|
539
583
|
if (!obj[v].includes(k[v])) {
|
540
584
|
obj[v].push(k[v]);
|
541
585
|
}
|
@@ -543,7 +587,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
543
587
|
obj[v] = obj[v].join(",");
|
544
588
|
});
|
545
589
|
}
|
546
|
-
|
590
|
+
const {
|
591
|
+
printPreviewBusinessName,
|
592
|
+
...realObj
|
593
|
+
} = obj;
|
594
|
+
params = Object.assign({}, JSON.parse(getPrintParams()), realObj, printCustomProps.value);
|
547
595
|
return JSON.stringify(params);
|
548
596
|
};
|
549
597
|
const handleClickPrintAll = () => {
|
@@ -678,7 +726,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
678
726
|
state.visible = false;
|
679
727
|
});
|
680
728
|
};
|
681
|
-
const handleClickPreview = async (curPrintParamList = [], templateCode, templateId, formatId) => {
|
729
|
+
const handleClickPreview = async (curPrintParamList = [], templateCode, templateId, formatId, name) => {
|
682
730
|
if (props.showLoading && getCurrentLoading())
|
683
731
|
return;
|
684
732
|
toggleExpandLoading(true, formatId);
|
@@ -687,9 +735,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
687
735
|
templateId,
|
688
736
|
params: curPrintParamList
|
689
737
|
}).then(() => {
|
738
|
+
var _a;
|
690
739
|
state.curPrintParamList = curPrintParamList;
|
691
740
|
const paramsFirst = JSON.stringify(Object.assign({}, JSON.parse(getPrintParams()), curPrintParamList[0], printCustomProps.value));
|
692
|
-
const params = props.strategy === "MULTI" ? paramsFirst : getOnceParams(curPrintParamList, templateCode);
|
741
|
+
const params = props.strategy === "MULTI" ? paramsFirst : getOnceParams(curPrintParamList, templateCode, name);
|
742
|
+
const curFormatIdObj = (_a = state == null ? void 0 : state.formatList) == null ? void 0 : _a.find((item) => item.id == formatId);
|
693
743
|
const queryParams = {
|
694
744
|
formatId,
|
695
745
|
templateId,
|
@@ -699,7 +749,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
699
749
|
params,
|
700
750
|
btnprint: props.btnprint,
|
701
751
|
signature: props.signature,
|
702
|
-
hideButtons: props.hidePreviewBtns
|
752
|
+
hideButtons: props.hidePreviewBtns,
|
753
|
+
formatItem: curFormatIdObj
|
703
754
|
};
|
704
755
|
printInstance.preview(queryParams, (res) => {
|
705
756
|
callLocalServicesSuccessCb(res, "preview");
|
@@ -824,6 +875,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
824
875
|
case "resetPrinter":
|
825
876
|
handleResetPrinter(tmpParam, templateCode, templateId, key);
|
826
877
|
break;
|
878
|
+
default: {
|
879
|
+
if (type.includes("previewText_")) {
|
880
|
+
const name = type.split("_")[1];
|
881
|
+
handleClickPreview(tmpParam, templateCode, templateId, key, name);
|
882
|
+
return;
|
883
|
+
}
|
884
|
+
break;
|
885
|
+
}
|
827
886
|
}
|
828
887
|
};
|
829
888
|
const handleClickOutside = () => {
|
@@ -932,6 +991,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
932
991
|
obj[params[keyName]] = defaultVal;
|
933
992
|
}
|
934
993
|
});
|
994
|
+
if (showPreviewDataList.value) {
|
995
|
+
obj.printPreviewBusinessName = paramObj.printPreviewBusinessName;
|
996
|
+
}
|
935
997
|
return obj;
|
936
998
|
};
|
937
999
|
const formatItemParam = ({
|
@@ -1373,6 +1435,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1373
1435
|
class: "print-lite",
|
1374
1436
|
onClick: _cache[5] || (_cache[5] = ($event) => handleTwoShow("isOutSetting"))
|
1375
1437
|
}, [createElementVNode("span", _hoisted_10, toDisplayString(option.label), 1), createVNode(unref(NIcon), {
|
1438
|
+
class: "print-li-icon",
|
1376
1439
|
color: outerPrintItems.value.length > 0 ? "#2563F4" : "",
|
1377
1440
|
component: unref(SettingsOutline),
|
1378
1441
|
size: "18"
|
@@ -1450,6 +1513,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1450
1513
|
onClickoutside: ($event) => handleClickOutHide(option.key)
|
1451
1514
|
}, {
|
1452
1515
|
trigger: withCtx(() => [createVNode(unref(NIcon), {
|
1516
|
+
class: "print-li-icon",
|
1453
1517
|
component: unref(ArrowForwardOutline),
|
1454
1518
|
size: "18",
|
1455
1519
|
onClick: ($event) => handleTwoShow(option.key)
|
@@ -1460,10 +1524,35 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1460
1524
|
key: operation.key,
|
1461
1525
|
onMouseenter: ($event) => handleTypeChange("twoMouseType", operation.key),
|
1462
1526
|
onMouseleave: _cache[8] || (_cache[8] = ($event) => handleTypeChange("twoMouseType", ""))
|
1463
|
-
}, [
|
1527
|
+
}, [operation.children ? (openBlock(), createBlock(unref(NPopover), {
|
1528
|
+
key: 0,
|
1529
|
+
trigger: "hover",
|
1530
|
+
"show-arrow": false,
|
1531
|
+
to: false,
|
1532
|
+
placement: "right-start",
|
1533
|
+
show: downlistPopover[operation.key]
|
1534
|
+
}, {
|
1535
|
+
trigger: withCtx(() => [createElementVNode("div", _hoisted_19, [createElementVNode("span", _hoisted_20, toDisplayString(operation.label), 1), createVNode(unref(NIcon), {
|
1536
|
+
component: unref(ArrowForward),
|
1537
|
+
size: "18"
|
1538
|
+
}, null, 8, ["component"])])]),
|
1539
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(operation.children, (previewBtn) => {
|
1540
|
+
return openBlock(), createElementBlock("div", {
|
1541
|
+
class: "print-li print-preview-item",
|
1542
|
+
key: previewBtn.key
|
1543
|
+
}, [createElementVNode("div", {
|
1544
|
+
class: "print-lite",
|
1545
|
+
style: {
|
1546
|
+
"background": "transparent"
|
1547
|
+
},
|
1548
|
+
onClick: ($event) => handleSelect(previewBtn.key, option, false)
|
1549
|
+
}, toDisplayString(previewBtn.label), 9, _hoisted_21)]);
|
1550
|
+
}), 128))]),
|
1551
|
+
_: 2
|
1552
|
+
}, 1032, ["show"])) : (openBlock(), createElementBlock("div", _hoisted_22, [createElementVNode("span", {
|
1464
1553
|
class: "label",
|
1465
1554
|
onClick: ($event) => handleSelect(operation.key, option, false)
|
1466
|
-
}, toDisplayString(operation.label), 9,
|
1555
|
+
}, toDisplayString(operation.label), 9, _hoisted_23)]))], 42, _hoisted_18);
|
1467
1556
|
}), 128))])]),
|
1468
1557
|
_: 2
|
1469
1558
|
}, 1032, ["show", "onClickoutside"])) : createCommentVNode("v-if", true)], 2)], 2112))], 42, _hoisted_9);
|
@@ -393,7 +393,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
393
393
|
formatId: state.currentFormatId,
|
394
394
|
templateId: getTemplateIdByFormatId.value
|
395
395
|
}).then(() => {
|
396
|
+
var _a2;
|
396
397
|
const params = props.strategy === "MULTI" ? getPrintParams() : getOnceParams();
|
398
|
+
const curFormatIdObj = (_a2 = state == null ? void 0 : state.formatList) == null ? void 0 : _a2.find((item) => item.id == state.currentFormatId);
|
397
399
|
const queryParams = {
|
398
400
|
formatId: state.currentFormatId,
|
399
401
|
iReportExecuteMode: state.iReportExecuteMode,
|
@@ -403,7 +405,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
403
405
|
params,
|
404
406
|
btnprint: props.btnprint,
|
405
407
|
signature: props.signature,
|
406
|
-
hideButtons: props.hidePreviewBtns
|
408
|
+
hideButtons: props.hidePreviewBtns,
|
409
|
+
formatItem: curFormatIdObj
|
407
410
|
};
|
408
411
|
printInstance.preview(queryParams, (res) => {
|
409
412
|
callLocalServicesSuccessCb(res, "preview");
|
@@ -66,7 +66,7 @@ export declare class Print {
|
|
66
66
|
_queryPrintForPdf(templateId: string, formatId: string, params: string | undefined, authorizationKey: String): Promise<any>;
|
67
67
|
_browserPrint(result: AnyObject, mode: string): Promise<string | void>;
|
68
68
|
_base64ToBlob(fileBase64: string, fileType: string): Blob;
|
69
|
-
preview({ iReportExecuteMode, hideButtons, templateId, number, formatId: originFormatId, params, paramsArr, authorizationKey, signature, btnprint, messageTimeout }: AnyObject, successCallbackFn?: AnyFn, errorCallbackFn?: AnyFn): Promise<any>;
|
69
|
+
preview({ iReportExecuteMode, hideButtons, templateId, number, formatId: originFormatId, formatItem, params, paramsArr, authorizationKey, signature, btnprint, messageTimeout }: AnyObject, successCallbackFn?: AnyFn, errorCallbackFn?: AnyFn): Promise<any>;
|
70
70
|
printSync(data: AnyObject[], successCallbackFn: AnyFn, errorCallbackFn: AnyFn): Promise<void>;
|
71
71
|
printDirect({ iReportExecuteMode, templateId, number, formatId: originFormatId, formatItem, params, paramsArr, authorizationKey, print, signature, printdlgshow, nobillnode, copies, svrUpdateIp, isDownloadFile, messageTimeout }: AnyObject, successCallbackFn: AnyFn, errorCallbackFn: AnyFn, cancelCallbackFn?: AnyFn, mode?: string): Promise<false | undefined>;
|
72
72
|
printToHiPrint({ templateId, formatId, params, authorizationKey }: any, successCallbackFn: AnyFn, errorCallbackFn: AnyFn, cancelCallbackFn?: AnyFn): Promise<any>;
|