cnhis-design-vue 3.1.57-beta.2 → 3.1.57-beta.21

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 (164) hide show
  1. package/README.md +87 -87
  2. package/es/components/button-print/index.d.ts +8 -8
  3. package/es/components/button-print/src/ButtonPrint.vue.d.ts +8 -8
  4. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  5. package/es/components/button-print/src/components/EditFormat.vue.d.ts +3 -3
  6. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +7 -7
  7. package/es/components/button-print/style/index.css +1 -1
  8. package/es/components/calendar/index.d.ts +276 -0
  9. package/es/components/calendar/index.js +1 -0
  10. package/es/components/calendar/src/Calendar.vue.d.ts +265 -0
  11. package/es/components/calendar/src/Calendar.vue.js +1 -0
  12. package/es/components/calendar/src/Calendar.vue2.js +1 -0
  13. package/es/components/calendar/src/types/index.d.ts +6 -0
  14. package/es/components/calendar/src/types/index.js +1 -0
  15. package/es/components/calendar/style/index.css +1 -0
  16. package/es/components/callback/src/components/render/popupMaps.d.ts +233 -224
  17. package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
  18. package/es/components/classification/src/index.vue.d.ts +3 -3
  19. package/es/components/expand-field/index.d.ts +18 -27
  20. package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +15 -24
  21. package/es/components/expand-field/src/components/PersonModal.vue.d.ts +15 -24
  22. package/es/components/expand-field/src/components/form.vue.d.ts +18 -27
  23. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  24. package/es/components/expand-field/src/index.vue.d.ts +18 -27
  25. package/es/components/fabric-chart/index.d.ts +4 -2
  26. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +4 -2
  27. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  28. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
  29. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  30. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  31. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  32. package/es/components/fabric-chart/src/hooks/temperature/useOther.d.ts +1 -1
  33. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  34. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  35. package/es/components/fabric-chart/src/interface.d.ts +4 -3
  36. package/es/components/field-set/index.d.ts +107 -616
  37. package/es/components/field-set/index.js +1 -1
  38. package/es/components/field-set/src/FieldColor.vue.d.ts +1680 -0
  39. package/es/components/field-set/src/FieldColor.vue.js +1 -0
  40. package/es/components/field-set/src/FieldColor.vue2.js +1 -0
  41. package/es/components/field-set/src/FieldSet.vue.d.ts +58 -16
  42. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  43. package/es/components/field-set/src/Index.vue.d.ts +141 -0
  44. package/es/components/field-set/src/Index.vue.js +1 -0
  45. package/es/components/field-set/src/Index.vue2.js +1 -0
  46. package/es/components/field-set/src/components/Row.vue.d.ts +50 -9
  47. package/es/components/field-set/src/components/Row.vue2.js +1 -1
  48. package/es/components/field-set/src/components/condition.vue.d.ts +172 -0
  49. package/es/components/field-set/src/components/condition.vue.js +1 -0
  50. package/es/components/field-set/src/components/condition.vue2.js +1 -0
  51. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1194 -0
  52. package/es/components/field-set/src/components/edit-dialog.vue.js +1 -0
  53. package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -0
  54. package/es/components/field-set/src/components/edit-filter.vue.d.ts +286 -0
  55. package/es/components/field-set/src/components/edit-filter.vue.js +1 -0
  56. package/es/components/field-set/src/components/edit-filter.vue2.js +1 -0
  57. package/es/components/field-set/src/constants/index.d.ts +55 -0
  58. package/es/components/field-set/src/constants/index.js +1 -0
  59. package/es/components/field-set/src/types/index.d.ts +31 -1
  60. package/es/components/field-set/src/utils/index.d.ts +2 -1
  61. package/es/components/field-set/src/utils/index.js +1 -1
  62. package/es/components/field-set/style/index.css +1 -1
  63. package/es/components/form-config/index.d.ts +55 -30
  64. package/es/components/form-config/src/FormConfig.vue.d.ts +55 -30
  65. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +17 -8
  66. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +23 -11
  67. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +8 -8
  68. package/es/components/form-config/src/constants/index.d.ts +1 -1
  69. package/es/components/form-config/src/types/index.d.ts +2 -2
  70. package/es/components/form-render/index.d.ts +17 -8
  71. package/es/components/form-render/index.js +1 -1
  72. package/es/components/form-render/src/FormRender.vue.d.ts +17 -8
  73. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  74. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +17 -8
  75. package/es/components/form-render/src/components/renderer/combination/combination.d.ts +12 -0
  76. package/es/components/form-render/src/components/renderer/combination/combination.js +1 -1
  77. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.d.ts +1 -1
  78. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
  79. package/es/components/form-render/src/components/renderer/combination/jsonCombination.d.ts +12 -0
  80. package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -1
  81. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  82. package/es/components/form-render/src/hooks/index.d.ts +1 -0
  83. package/es/components/form-render/src/hooks/index.js +1 -1
  84. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  85. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -2
  86. package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +1 -1
  87. package/es/components/form-render/src/hooks/useNewLowCodeReactions.d.ts +6 -0
  88. package/es/components/form-render/src/hooks/useNewLowCodeReactions.js +1 -0
  89. package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
  90. package/es/components/form-render/src/types/index.d.ts +1 -1
  91. package/es/components/guide/src/renderer.d.ts +2 -2
  92. package/es/components/iho-table/index.d.ts +216 -216
  93. package/es/components/iho-table/src/IhoTable.vue.d.ts +216 -216
  94. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +3 -1
  95. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  96. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -1
  97. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  98. package/es/components/iho-table/src/types/index.d.ts +1 -0
  99. package/es/components/index.css +1 -1
  100. package/es/components/index.d.ts +2 -1
  101. package/es/components/index.js +1 -1
  102. package/es/components/info-header/index.d.ts +41 -23
  103. package/es/components/info-header/src/InfoHeader.vue.d.ts +41 -23
  104. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -1
  105. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -1
  106. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +18 -9
  107. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +17 -8
  108. package/es/components/keyboard/index.d.ts +1 -1
  109. package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
  110. package/es/components/quick-search/index.d.ts +3 -3
  111. package/es/components/quick-search/src/index.vue.d.ts +3 -3
  112. package/es/components/recommend-search/index.d.ts +6 -6
  113. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +6 -6
  114. package/es/components/recommend-search/src/components/BaseSearch.d.ts +1 -1
  115. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +1 -1
  116. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +1 -1
  117. package/es/components/scale-view/index.d.ts +3 -3
  118. package/es/components/scale-view/src/ScaleView.vue.d.ts +3 -3
  119. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  120. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
  121. package/es/components/scale-view/src/hooks/use-component.d.ts +1 -1
  122. package/es/components/select-label/index.d.ts +2 -2
  123. package/es/components/select-label/src/LabelFormContent.vue.d.ts +1 -1
  124. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  125. package/es/components/select-label/src/SelectLabel.vue.d.ts +1 -1
  126. package/es/components/select-label/src/index.vue.d.ts +1 -1
  127. package/es/components/select-person/index.d.ts +15 -24
  128. package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
  129. package/es/components/select-person/src/SelectPerson.vue.d.ts +15 -18
  130. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  131. package/es/components/select-person/style/index.css +1 -1
  132. package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -1
  133. package/es/components/shortcut-setter/index.d.ts +18 -8
  134. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +18 -8
  135. package/es/components/table-export-field/index.d.ts +3 -3
  136. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
  137. package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +3 -3
  138. package/es/components/table-export-field/src/index.vue.d.ts +3 -3
  139. package/es/components/time-line/index.d.ts +7 -7
  140. package/es/components/time-line/src/TimeLine.vue.d.ts +3 -3
  141. package/es/env.d.ts +25 -25
  142. package/es/shared/assets/img/failure.png.js +1 -1
  143. package/es/shared/assets/img/no-permission.png.js +1 -1
  144. package/es/shared/assets/img/nodata.png.js +1 -1
  145. package/es/shared/assets/img/notfound.png.js +1 -1
  146. package/es/shared/assets/img/qr.png.js +1 -1
  147. package/es/shared/assets/img/success.png.js +1 -1
  148. package/es/shared/assets/img/video.png.js +1 -1
  149. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  150. package/es/shared/assets/img/xb_big.png.js +1 -1
  151. package/es/shared/assets/img/xb_small.png.js +1 -1
  152. package/es/shared/package.json.js +1 -1
  153. package/es/shared/types/business.d.ts +23 -3
  154. package/es/shared/utils/business.d.ts +2 -1
  155. package/es/shared/utils/business.js +1 -1
  156. package/es/shared/utils/index.js +1 -1
  157. package/package.json +8 -2
  158. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  159. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  160. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  161. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  162. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  163. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  164. package/es/shared/utils/tapable/index.d.ts +0 -139
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
+ ```
@@ -309,7 +309,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
309
309
  readonly rule: import("vue").PropType<import("naive-ui").FormItemRule | import("naive-ui").FormItemRule[]>;
310
310
  readonly size: import("vue").PropType<"small" | "medium" | "large">;
311
311
  readonly ignorePathChange: BooleanConstructor;
312
- readonly validationStatus: import("vue").PropType<"error" | "success" | "warning">;
312
+ readonly validationStatus: import("vue").PropType<"success" | "error" | "warning">;
313
313
  readonly feedback: StringConstructor;
314
314
  readonly showLabel: {
315
315
  readonly type: import("vue").PropType<boolean | undefined>;
@@ -440,7 +440,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
440
440
  mergedLabelAlign: import("vue").ComputedRef<import("naive-ui/es/form/src/interface").LabelAlign | undefined>;
441
441
  mergedShowRequireMark: import("vue").ComputedRef<boolean | undefined>;
442
442
  mergedRequireMarkPlacement: import("vue").ComputedRef<"left" | "right" | "right-hanging">;
443
- mergedValidationStatus: import("vue").ComputedRef<"error" | "success" | "warning" | undefined>;
443
+ mergedValidationStatus: import("vue").ComputedRef<"success" | "error" | "warning" | undefined>;
444
444
  mergedShowFeedback: import("vue").ComputedRef<boolean>;
445
445
  mergedShowLabel: import("vue").ComputedRef<boolean>;
446
446
  isAutoLabelWidth: import("vue").ComputedRef<boolean>;
@@ -474,7 +474,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
474
474
  readonly rule: import("vue").PropType<import("naive-ui").FormItemRule | import("naive-ui").FormItemRule[]>;
475
475
  readonly size: import("vue").PropType<"small" | "medium" | "large">;
476
476
  readonly ignorePathChange: BooleanConstructor;
477
- readonly validationStatus: import("vue").PropType<"error" | "success" | "warning">;
477
+ readonly validationStatus: import("vue").PropType<"success" | "error" | "warning">;
478
478
  readonly feedback: StringConstructor;
479
479
  readonly showLabel: {
480
480
  readonly type: import("vue").PropType<boolean | undefined>;
@@ -669,7 +669,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
669
669
  readonly rule: import("vue").PropType<import("naive-ui").FormItemRule | import("naive-ui").FormItemRule[]>;
670
670
  readonly size: import("vue").PropType<"small" | "medium" | "large">;
671
671
  readonly ignorePathChange: BooleanConstructor;
672
- readonly validationStatus: import("vue").PropType<"error" | "success" | "warning">;
672
+ readonly validationStatus: import("vue").PropType<"success" | "error" | "warning">;
673
673
  readonly feedback: StringConstructor;
674
674
  readonly showLabel: {
675
675
  readonly type: import("vue").PropType<boolean | undefined>;
@@ -800,7 +800,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
800
800
  mergedLabelAlign: import("vue").ComputedRef<import("naive-ui/es/form/src/interface").LabelAlign | undefined>;
801
801
  mergedShowRequireMark: import("vue").ComputedRef<boolean | undefined>;
802
802
  mergedRequireMarkPlacement: import("vue").ComputedRef<"left" | "right" | "right-hanging">;
803
- mergedValidationStatus: import("vue").ComputedRef<"error" | "success" | "warning" | undefined>;
803
+ mergedValidationStatus: import("vue").ComputedRef<"success" | "error" | "warning" | undefined>;
804
804
  mergedShowFeedback: import("vue").ComputedRef<boolean>;
805
805
  mergedShowLabel: import("vue").ComputedRef<boolean>;
806
806
  isAutoLabelWidth: import("vue").ComputedRef<boolean>;
@@ -834,7 +834,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
834
834
  readonly rule: import("vue").PropType<import("naive-ui").FormItemRule | import("naive-ui").FormItemRule[]>;
835
835
  readonly size: import("vue").PropType<"small" | "medium" | "large">;
836
836
  readonly ignorePathChange: BooleanConstructor;
837
- readonly validationStatus: import("vue").PropType<"error" | "success" | "warning">;
837
+ readonly validationStatus: import("vue").PropType<"success" | "error" | "warning">;
838
838
  readonly feedback: StringConstructor;
839
839
  readonly showLabel: {
840
840
  readonly type: import("vue").PropType<boolean | undefined>;
@@ -1847,14 +1847,14 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
1847
1847
  required: false;
1848
1848
  };
1849
1849
  }>> & {
1850
- onClose?: ((...args: any[]) => any) | undefined;
1851
1850
  onSuccess?: ((...args: any[]) => any) | undefined;
1851
+ onClose?: ((...args: any[]) => any) | undefined;
1852
1852
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
1853
1853
  }, {
1854
1854
  verifyUser: Function;
1855
1855
  identityVerificationTitle: string;
1856
1856
  }>;
1857
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("success" | "error" | "clickoutside")[], "error" | "success" | "clickoutside", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1857
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("success" | "error" | "clickoutside")[], "success" | "error" | "clickoutside", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1858
1858
  printParams: {
1859
1859
  type: import("vue").PropType<import("../../shared/types").AnyObject[]>;
1860
1860
  };
@@ -316,7 +316,7 @@ declare const _default: import("vue").DefineComponent<{
316
316
  readonly rule: PropType<import("naive-ui").FormItemRule | import("naive-ui").FormItemRule[]>;
317
317
  readonly size: PropType<"small" | "medium" | "large">;
318
318
  readonly ignorePathChange: BooleanConstructor;
319
- readonly validationStatus: PropType<"error" | "success" | "warning">;
319
+ readonly validationStatus: PropType<"success" | "error" | "warning">;
320
320
  readonly feedback: StringConstructor;
321
321
  readonly showLabel: {
322
322
  readonly type: PropType<boolean | undefined>;
@@ -447,7 +447,7 @@ declare const _default: import("vue").DefineComponent<{
447
447
  mergedLabelAlign: import("vue").ComputedRef<import("naive-ui/es/form/src/interface").LabelAlign | undefined>;
448
448
  mergedShowRequireMark: import("vue").ComputedRef<boolean | undefined>;
449
449
  mergedRequireMarkPlacement: import("vue").ComputedRef<"left" | "right" | "right-hanging">;
450
- mergedValidationStatus: import("vue").ComputedRef<"error" | "success" | "warning" | undefined>;
450
+ mergedValidationStatus: import("vue").ComputedRef<"success" | "error" | "warning" | undefined>;
451
451
  mergedShowFeedback: import("vue").ComputedRef<boolean>;
452
452
  mergedShowLabel: import("vue").ComputedRef<boolean>;
453
453
  isAutoLabelWidth: import("vue").ComputedRef<boolean>;
@@ -481,7 +481,7 @@ declare const _default: import("vue").DefineComponent<{
481
481
  readonly rule: PropType<import("naive-ui").FormItemRule | import("naive-ui").FormItemRule[]>;
482
482
  readonly size: PropType<"small" | "medium" | "large">;
483
483
  readonly ignorePathChange: BooleanConstructor;
484
- readonly validationStatus: PropType<"error" | "success" | "warning">;
484
+ readonly validationStatus: PropType<"success" | "error" | "warning">;
485
485
  readonly feedback: StringConstructor;
486
486
  readonly showLabel: {
487
487
  readonly type: PropType<boolean | undefined>;
@@ -676,7 +676,7 @@ declare const _default: import("vue").DefineComponent<{
676
676
  readonly rule: PropType<import("naive-ui").FormItemRule | import("naive-ui").FormItemRule[]>;
677
677
  readonly size: PropType<"small" | "medium" | "large">;
678
678
  readonly ignorePathChange: BooleanConstructor;
679
- readonly validationStatus: PropType<"error" | "success" | "warning">;
679
+ readonly validationStatus: PropType<"success" | "error" | "warning">;
680
680
  readonly feedback: StringConstructor;
681
681
  readonly showLabel: {
682
682
  readonly type: PropType<boolean | undefined>;
@@ -807,7 +807,7 @@ declare const _default: import("vue").DefineComponent<{
807
807
  mergedLabelAlign: import("vue").ComputedRef<import("naive-ui/es/form/src/interface").LabelAlign | undefined>;
808
808
  mergedShowRequireMark: import("vue").ComputedRef<boolean | undefined>;
809
809
  mergedRequireMarkPlacement: import("vue").ComputedRef<"left" | "right" | "right-hanging">;
810
- mergedValidationStatus: import("vue").ComputedRef<"error" | "success" | "warning" | undefined>;
810
+ mergedValidationStatus: import("vue").ComputedRef<"success" | "error" | "warning" | undefined>;
811
811
  mergedShowFeedback: import("vue").ComputedRef<boolean>;
812
812
  mergedShowLabel: import("vue").ComputedRef<boolean>;
813
813
  isAutoLabelWidth: import("vue").ComputedRef<boolean>;
@@ -841,7 +841,7 @@ declare const _default: import("vue").DefineComponent<{
841
841
  readonly rule: PropType<import("naive-ui").FormItemRule | import("naive-ui").FormItemRule[]>;
842
842
  readonly size: PropType<"small" | "medium" | "large">;
843
843
  readonly ignorePathChange: BooleanConstructor;
844
- readonly validationStatus: PropType<"error" | "success" | "warning">;
844
+ readonly validationStatus: PropType<"success" | "error" | "warning">;
845
845
  readonly feedback: StringConstructor;
846
846
  readonly showLabel: {
847
847
  readonly type: PropType<boolean | undefined>;
@@ -1854,14 +1854,14 @@ declare const _default: import("vue").DefineComponent<{
1854
1854
  required: false;
1855
1855
  };
1856
1856
  }>> & {
1857
- onClose?: ((...args: any[]) => any) | undefined;
1858
1857
  onSuccess?: ((...args: any[]) => any) | undefined;
1858
+ onClose?: ((...args: any[]) => any) | undefined;
1859
1859
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
1860
1860
  }, {
1861
1861
  verifyUser: Function;
1862
1862
  identityVerificationTitle: string;
1863
1863
  }>;
1864
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("success" | "error" | "clickoutside")[], "error" | "success" | "clickoutside", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1864
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("success" | "error" | "clickoutside")[], "success" | "error" | "clickoutside", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1865
1865
  printParams: {
1866
1866
  type: PropType<AnyObject[]>;
1867
1867
  };
@@ -1 +1 @@
1
- import{defineComponent as t,reactive as e,computed as n,onMounted as i,watch as r,openBlock as a,createElementBlock as s,Fragment as o,createVNode as l,unref as p,withCtx as d,renderSlot as m,withModifiers as u,createTextVNode as c,toDisplayString as f,mergeProps as g}from"vue";import{isObject as y}from"@vue/shared";import{useMessage as v,NDropdown as b,NButton as I,NIcon as P}from"naive-ui";import{ChevronDown as h}from"@vicons/ionicons5";import{Print as w}from"./utils/print.js";import{isIReport as F}from"./utils/browserPrint.js";import k from"./components/IdentityVerification.vue.js";import{format as T}from"date-fns";import{savePrivateFormatApi as x,getPrivateFormatApi as S}from"./api.js";var L=t({__name:"ButtonPrint",props:{printParams:{type:Array},params:{default:()=>[],type:Array},btnText:{default:"打印",type:String},printText:{default:"直接打印",type:String},previewText:{default:"打印预览",type:String},pdfLoadText:{default:"下载pdf",type:String},formatEditText:{default:"格式编辑",type:String},prevFn:{default:()=>Promise.resolve(),type:Function},queryPrintFormatByNumber:{default:()=>Promise.resolve({}),type:Function},queryTemplateParams:{default:()=>Promise.resolve({}),type:Function},strategy:{default:"MULTI",type:String},clickPrevFn:{default:()=>Promise.resolve(!0),type:Function},noDataMsg:{default:"请选中需要打印的数据",type:String},token:{type:String},printdlgshow:{default:"0",type:String},btnprint:{type:String,default:"1"},directPrint:{type:Boolean,default:!1},externalOptionConfig:{type:Object,default:()=>({})},signature:{type:String},showLoading:{type:Boolean,default:!0}},emits:["success","error","clickoutside"],setup(t,{expose:L,emit:O}){var j;const D=t,E=v();let M;const N={},V=e({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null}),C=e([{label:D.printText,key:"printText"},{label:D.previewText,key:"previewText"},{label:D.pdfLoadText,key:"downloadPdf"},{label:D.formatEditText,key:"formatEditText"},...(null==(j=D.externalOptionConfig)?void 0:j.options)||[]]),B=n((()=>{if(!V.currentFormatId)return{};let t=V.currentFormatId;return V.formatList.find((e=>e.id===t))})),J=n((()=>{var t;return(null==(t=B.value)?void 0:t.name)||"格式选择"})),U=n((()=>{let t=V.formatList.find((t=>t.id===V.currentFormatId));return null==t?void 0:t.templateId})),A=async t=>{if(D.directPrint){if(V.spinning)return;return"button"===t?void await rt():et()}return et()},q=t=>l("span",{class:{active:t.key===V.currentFormatId}},[t.label]),R=(t,e)=>{V.spinning=!1;let n={type:e,formatId:V.currentFormatId,templateId:U.value};O("success",t,n)},_=t=>{V.spinning=!1,O("error",t),y(t)&&"notInstalledApp"===t.type&&E.error(t.message)},z=t=>{O("error",{message:"前置条件执行错误",type:t,preExecution:!0})},H=(t=0)=>{var e;const n=(null==(e=D.printParams)?void 0:e.length)?D.printParams[t]:V.printParams[t];return JSON.stringify({...n||{},...D.token?{token:D.token}:{}})},$=()=>{var t,e;let n={},i={};if(null==(t=V.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(V.printParams[0].datasetData||{}))?void 0:e[0])||"",n=JSON.stringify(V.printParams.map((e=>JSON.parse(e.datasetData[t]))));i={datasetData:{}},i.datasetData[t]=n}else Object.keys(V.printParams[0]).forEach((t=>{i[t]=[],V.printParams.forEach((e=>{i[t].includes(e[t])||i[t].push(e[t])})),i[t]=i[t].join(",")}));return n=Object.assign({},JSON.parse(H(0)),i),JSON.stringify(n)},G=()=>{let t=V.printParams.length;const e=async e=>{try{--t<=0&&R(e,"print")}catch(t){console.log("error",t)}};D.showLoading&&V.spinning||(V.spinning=!0,D.prevFn("print").then((()=>{const t={formatId:V.currentFormatId,templateId:U.value,printdlgshow:D.printdlgshow,signature:D.signature};if("MULTI"===D.strategy)for(let n=0;n<V.printParams.length;n++)n>0&&(t.printdlgshow="0"),M.printDirect({...t,params:H(n)},e,_);else M.printDirect({...t,params:$()},(t=>{R(t,"print")}),_)})).catch((()=>{z("print"),V.spinning=!1})).finally((()=>{V.visible=!1})))},K=async(t,e)=>{var n,i;switch(t){case"printText":G();break;case"previewText":(async()=>{D.showLoading&&V.spinning||(V.spinning=!0,D.prevFn("preview").then((()=>{const t="MULTI"===D.strategy?H():$(),e={formatId:V.currentFormatId,templateId:U.value,params:t,btnprint:D.btnprint,signature:D.signature};M.preview(e,(t=>{R(t,"preview")}),_)})).catch((()=>{z("preview"),V.spinning=!1})).finally((()=>{V.visible=!1})))})();break;case"formatEditText":D.showLoading&&V.spinning||(V.spinning=!0,D.prevFn("edit").then((()=>{V.identityVerification.visible=!0})).catch((()=>{z("edit")})).finally((()=>{V.visible=!1,V.spinning=!1})));break;case"downloadPdf":(async()=>{D.showLoading&&V.spinning||(V.spinning=!0,D.prevFn("download").then((()=>{const t="MULTI"===D.strategy?H():$(),e={formatId:V.currentFormatId,templateId:U.value,print:{print:"1",type:"1"},params:t,signature:D.signature};M.downloadPDF(e,(t=>R(t,"preview")),_)})).catch((()=>{z("download"),V.spinning=!1})).finally((()=>{V.visible=!1})))})();break;default:{V.visible=!1;const r=V.formatList.find((e=>e.id===t))||{};if(Object.keys(r).length>0){V.currentFormatId=t;const[e]=C;e.label=(null==r?void 0:r.name)||e.label,await x({formatForms:[{...r}],name:N.name||r.templateName,number:N.number||r.number,templateId:N.templateId||r.templateId,...N.id?{id:N.id}:{}},{token:D.token})}else null==(i=null==(n=D.externalOptionConfig)?void 0:n.onSelect)||i.call(n,t,e);break}}},Q=()=>{V.visible=!1,O("clickoutside")},W=()=>(V.isInited=!1,V.spinning=!1,setTimeout((()=>{V.visible=!1}),0),!1),X=(t,e,n)=>{const i={};return e.forEach((e=>{let r=((t,e)=>{const n={DATE:"yyyy-MM-dd",DATETIME:"yyyy-MM-dd HH:mm:ss"};let i=e;return Object.keys(n).includes(t.type)&&e&&e instanceof Date&&(i=T(e,n[t.type])),(null==t?void 0:t.defaultValue)||i})(e,t[e[n]]);t[e[n]]&&r&&(i[e[n]]=r)})),i},Y=({customizeDataset:t=[],param:e=[]},n=[])=>n.map((n=>{let i={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;i.datasetData={[t.name]:JSON.stringify(X(n,e,"fieldName"))}})),i=Object.assign({},i,X(n,e,"key")),i})),Z=async t=>{var e;if(V.formatList=t?(t=>{let e=[];return t&&t.forEach((t=>{if(!t.format)return!1;e.push(...t.format.map((e=>Object.assign({},e,{templateName:t.name}))))})),e})(t.obj):[],V.currentFormatId=await(async(t,e)=>{var n;if(!(null==t?void 0:t.length))return"";const{data:i}=await S({templateId:t[0].templateId},{token:D.token});if("SUCCESS"===i.result){const{formatForms:e=[]}=i.map||{};Object.assign(N,i.map||{});const r=null==(n=null==e?void 0:e[0])?void 0:n.id;if(r&&t.map((t=>t.id)).includes(r))return r}const r=t.find((t=>1==t[e]));return(null==r?void 0:r.id)||t[0].id})(V.formatList,"defaultFlag"),!V.currentFormatId)return E.error("获取打印格式失败,请联系管理员!"),W();(()=>{const t=V.formatList.map((t=>({label:t.name,key:t.id})));C.unshift({label:J.value,key:"format",children:t})})();let n=null==(e=await D.queryTemplateParams())?void 0:e.obj;if(!n||!U.value)return E.error("获取打印模板失败,请联系管理员!"),W();V.templateParams=n,V.printParams=Y(V.templateParams,D.params)},tt=async()=>{if(V.isInited)return!0;V.isInited=!0,V.spinning=!0,(()=>{if(M)return!1;M=new w})();const t=await D.queryPrintFormatByNumber();return await Z(t),V.spinning=!1,!0},et=async(t=!0)=>{var e,n;if(await D.clickPrevFn())if((null==(e=D.params)?void 0:e.length)||(null==(n=D.printParams)?void 0:n.length)){if(!V.visible){if(!await tt())return!1}t&&(V.visible=!V.visible)}else E.warning(D.noDataMsg)},nt=()=>{V.watchPrintParamsReformatFn&&V.watchPrintParamsReformatFn(),V.isInited?V.printParams=Y(V.templateParams,D.params):V.watchPrintParamsReformatFn=()=>r((()=>V.isInited),(t=>{if(!t)return!1;nt()}))},it=t=>{if(V.identityVerification.visible=!1,F(V.currentFormatId))return R(null,"edit");const e={formatId:V.currentFormatId,templateId:U.value,params:H(),token:t};M.editPrintFormat(e,(t=>{R(t,"edit")}),_)};async function rt(){await et(!1),G()}return i((()=>{V.isInited=!1})),r((()=>D.params),(t=>{if(!(null==t?void 0:t.length))return!1;nt()}),{deep:!0}),L({directPrint:rt}),(e,n)=>(a(),s(o,null,[l(p(b),{class:"c-dropdown",placement:"bottom-start",trigger:"click",show:V.visible,onClickoutside:Q,options:C,onSelect:K,"render-label":q},{default:d((()=>[m(e.$slots,"button",{handleClickPrintBtn:et,printSpinning:V.spinning,printbtnText:t.btnText,printVisible:V.visible},(()=>[l(p(I),{class:"dropdown-button",loading:t.showLoading&&V.spinning,onClick:n[1]||(n[1]=u((()=>A("button")),["stop"]))},{default:d((()=>[c(f(t.btnText)+" ",1),l(p(P),{component:p(h),style:{"margin-left":"5px"},onClick:n[0]||(n[0]=u((()=>A("icon")),["stop"]))},null,8,["component"])])),_:1},8,["loading"])]))])),_:3},8,["show","options"]),l(k,g(e.$attrs,{modelValue:V.identityVerification.visible,"onUpdate:modelValue":n[2]||(n[2]=t=>V.identityVerification.visible=t),formatId:V.currentFormatId,templateId:p(U),onSuccess:it}),null,16,["modelValue","formatId","templateId"])],64))}});export{L as default};
1
+ import{defineComponent as t,reactive as e,computed as n,onMounted as i,watch as r,openBlock as a,createElementBlock as s,Fragment as o,createVNode as l,unref as p,withCtx as d,renderSlot as m,withModifiers as u,createTextVNode as c,toDisplayString as f,mergeProps as g}from"vue";import{isObject as y}from"@vue/shared";import{useMessage as v,NDropdown as b,NButton as I,NIcon as P}from"naive-ui";import{ChevronDown as h}from"@vicons/ionicons5";import{Print as w}from"./utils/print.js";import{isIReport as F}from"./utils/browserPrint.js";import k from"./components/IdentityVerification.vue.js";import{format as T}from"date-fns";import{savePrivateFormatApi as x,getPrivateFormatApi as S}from"./api.js";var L=t({__name:"ButtonPrint",props:{printParams:{type:Array},params:{default:()=>[],type:Array},btnText:{default:"打印",type:String},printText:{default:"直接打印",type:String},previewText:{default:"打印预览",type:String},pdfLoadText:{default:"下载pdf",type:String},formatEditText:{default:"格式编辑",type:String},prevFn:{default:()=>Promise.resolve(),type:Function},queryPrintFormatByNumber:{default:()=>Promise.resolve({}),type:Function},queryTemplateParams:{default:()=>Promise.resolve({}),type:Function},strategy:{default:"MULTI",type:String},clickPrevFn:{default:()=>Promise.resolve(!0),type:Function},noDataMsg:{default:"请选中需要打印的数据",type:String},token:{type:String},printdlgshow:{default:"0",type:String},btnprint:{type:String,default:"1"},directPrint:{type:Boolean,default:!1},externalOptionConfig:{type:Object,default:()=>({})},signature:{type:String},showLoading:{type:Boolean,default:!0}},emits:["success","error","clickoutside"],setup(t,{expose:L,emit:O}){var j;const D=t,E=v();let M;const N={},V=e({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null}),C=e([{label:D.printText,key:"printText"},{label:D.previewText,key:"previewText"},{label:D.pdfLoadText,key:"downloadPdf"},{label:D.formatEditText,key:"formatEditText"},...(null==(j=D.externalOptionConfig)?void 0:j.options)||[]]),B=n((()=>{if(!V.currentFormatId)return{};let t=V.currentFormatId;return V.formatList.find((e=>e.id===t))})),J=n((()=>{var t;return(null==(t=B.value)?void 0:t.name)||"格式选择"})),U=n((()=>{let t=V.formatList.find((t=>t.id===V.currentFormatId));return null==t?void 0:t.templateId})),A=async t=>{if(D.directPrint){if(V.spinning)return;return"button"===t?void await rt():et()}return et()},q=t=>l("span",{class:{active:t.key===V.currentFormatId}},[t.label]),R=(t,e)=>{V.spinning=!1;let n={type:e,formatId:V.currentFormatId,templateId:U.value};O("success",t,n)},_=t=>{V.spinning=!1,O("error",t),y(t)&&"notInstalledApp"===t.type&&E.error(t.message)},z=t=>{O("error",{message:"前置条件执行错误",type:t,preExecution:!0})},H=(t=0)=>{var e;const n=(null==(e=D.printParams)?void 0:e.length)?D.printParams[t]:V.printParams[t];return JSON.stringify({...n||{},...D.token?{token:D.token}:{}})},$=()=>{var t,e;let n={},i={};if(null==(t=V.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(V.printParams[0].datasetData||{}))?void 0:e[0])||"",n=JSON.stringify(V.printParams.map((e=>JSON.parse(e.datasetData[t]))));i={datasetData:{}},i.datasetData[t]=n}else Object.keys(V.printParams[0]).forEach((t=>{i[t]=[],V.printParams.forEach((e=>{i[t].includes(e[t])||i[t].push(e[t])})),i[t]=i[t].join(",")}));return n=Object.assign({},JSON.parse(H(0)),i),JSON.stringify(n)},G=()=>{let t=V.printParams.length;const e=async e=>{try{--t<=0&&R(e,"print")}catch(t){console.log("error",t)}};D.showLoading&&V.spinning||(V.spinning=!0,D.prevFn("print").then((()=>{const t={formatId:V.currentFormatId,templateId:U.value,printdlgshow:D.printdlgshow,signature:D.signature};if("MULTI"===D.strategy)for(let n=0;n<V.printParams.length;n++)n>0&&(t.printdlgshow="0"),M.printDirect({...t,params:H(n)},e,_);else M.printDirect({...t,params:$()},(t=>{R(t,"print")}),_)})).catch((()=>{z("print"),V.spinning=!1})).finally((()=>{V.visible=!1})))},K=async(t,e)=>{var n,i;switch(t){case"printText":G();break;case"previewText":(async()=>{D.showLoading&&V.spinning||(V.spinning=!0,D.prevFn("preview").then((()=>{const t="MULTI"===D.strategy?H():$(),e={formatId:V.currentFormatId,templateId:U.value,params:t,btnprint:D.btnprint,signature:D.signature};M.preview(e,(t=>{R(t,"preview")}),_)})).catch((()=>{z("preview"),V.spinning=!1})).finally((()=>{V.visible=!1})))})();break;case"formatEditText":D.showLoading&&V.spinning||(V.spinning=!0,D.prevFn("edit").then((()=>{V.identityVerification.visible=!0})).catch((()=>{z("edit")})).finally((()=>{V.visible=!1,V.spinning=!1})));break;case"downloadPdf":(async()=>{D.showLoading&&V.spinning||(V.spinning=!0,D.prevFn("download").then((()=>{const t="MULTI"===D.strategy?H():$(),e={formatId:V.currentFormatId,templateId:U.value,print:{print:"1",type:"1"},params:t,signature:D.signature};M.downloadPDF(e,(t=>R(t,"preview")),_)})).catch((()=>{z("download"),V.spinning=!1})).finally((()=>{V.visible=!1})))})();break;default:{V.visible=!1;const r=V.formatList.find((e=>e.id===t))||{};if(Object.keys(r).length>0){V.currentFormatId=t;const[e]=C;e.label=(null==r?void 0:r.name)||e.label,await x({formatForms:[{...r}],name:N.name||r.templateName,number:N.number||r.number,templateId:N.templateId||r.templateId,...N.id?{id:N.id}:{}},{token:D.token})}else null==(i=null==(n=D.externalOptionConfig)?void 0:n.onSelect)||i.call(n,t,e);break}}},Q=()=>{V.visible=!1,O("clickoutside")},W=()=>(V.isInited=!1,V.spinning=!1,setTimeout((()=>{V.visible=!1}),0),!1),X=(t,e,n)=>{const i={};return e.forEach((e=>{let r=((t,e)=>{const n={DATE:"yyyy-MM-dd",DATETIME:"yyyy-MM-dd HH:mm:ss"};let i=e;return Object.keys(n).includes(t.type)&&e&&e instanceof Date&&(i=T(e,n[t.type])),(null==t?void 0:t.defaultValue)||i})(e,t[e[n]]);t[e[n]]&&r&&(i[e[n]]=r)})),i},Y=({customizeDataset:t=[],param:e=[]},n=[])=>n.map((n=>{let i={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;i.datasetData={[t.name]:JSON.stringify(X(n,e,"fieldName"))}})),i=Object.assign({},i,X(n,e,"key")),i})),Z=async t=>{var e;if(V.formatList=t?(t=>{let e=[];return t&&t.forEach((t=>{if(!t.format)return!1;e.push(...t.format.map((e=>Object.assign({},e,{templateName:t.name}))))})),e})(t.obj):[],V.currentFormatId=await(async(t,e)=>{var n;if(!(null==t?void 0:t.length))return"";const{data:i}=await S({templateId:t[0].templateId},{token:D.token});if("SUCCESS"===i.result){const{formatForms:e=[]}=i.map||{};Object.assign(N,i.map||{});const r=null==(n=null==e?void 0:e[0])?void 0:n.id;if(r&&t.map((t=>t.id)).includes(r))return r}const r=t.find((t=>1==t[e]));return(null==r?void 0:r.id)||t[0].id})(V.formatList,"defaultFlag"),!V.currentFormatId)return E.error("获取打印格式失败,请联系管理员!"),W();(()=>{const t=V.formatList.map((t=>({label:t.name,key:t.id})));C.unshift({label:J.value,key:"format",children:t})})();let n=null==(e=await D.queryTemplateParams())?void 0:e.obj;if(!n||!U.value)return E.error("获取打印模板失败,请联系管理员!"),W();V.templateParams=n,V.printParams=Y(V.templateParams,D.params)},tt=async()=>{if(V.isInited)return!0;V.isInited=!0,V.spinning=!0,(()=>{if(M)return!1;M=new w})();const t=await D.queryPrintFormatByNumber();return await Z(t),V.spinning=!1,!0},et=async(t=!0)=>{var e,n;if(await D.clickPrevFn())if((null==(e=D.params)?void 0:e.length)||(null==(n=D.printParams)?void 0:n.length)){if(!V.visible){if(!await tt())return!1}t&&(V.visible=!V.visible)}else E.warning(D.noDataMsg)},nt=()=>{V.watchPrintParamsReformatFn&&V.watchPrintParamsReformatFn(),V.isInited?V.printParams=Y(V.templateParams,D.params):V.watchPrintParamsReformatFn=()=>r((()=>V.isInited),(t=>{if(!t)return!1;nt()}))},it=t=>{if(V.identityVerification.visible=!1,F(V.currentFormatId))return R(null,"edit");const e={formatId:V.currentFormatId,templateId:U.value,params:H(),token:t};M.editPrintFormat(e,(t=>{R(t,"edit")}),_)};async function rt(){await et(!1),G()}return i((()=>{V.isInited=!1})),r((()=>D.params),(t=>{if(!(null==t?void 0:t.length))return!1;nt()}),{deep:!0}),L({directPrint:rt}),(e,n)=>(a(),s(o,null,[l(p(b),{class:"c-dropdown",placement:"bottom-start",trigger:"click",show:V.visible,onClickoutside:Q,options:C,onSelect:K,"render-label":q},{default:d((()=>[m(e.$slots,"button",{handleClickPrintBtn:et,printSpinning:V.spinning,printbtnText:t.btnText,printVisible:V.visible},(()=>[l(p(I),{class:"dropdown-button",loading:t.showLoading&&V.spinning,onClick:n[1]||(n[1]=u((()=>A("button")),["stop"]))},{default:d((()=>[c(f(t.btnText)+" ",1),l(p(P),{component:p(h),size:"18",style:{"margin-left":"5px"},onClick:n[0]||(n[0]=u((()=>A("icon")),["stop"]))},null,8,["component"])])),_:1},8,["loading"])]))])),_:3},8,["show","options"]),l(k,g(e.$attrs,{modelValue:V.identityVerification.visible,"onUpdate:modelValue":n[2]||(n[2]=t=>V.identityVerification.visible=t),formatId:V.currentFormatId,templateId:p(U),onSuccess:it}),null,16,["modelValue","formatId","templateId"])],64))}});export{L as default};
@@ -87,7 +87,7 @@ declare const _default: import("vue").DefineComponent<{
87
87
  readonly rule: import("vue").PropType<import("naive-ui").FormItemRule | import("naive-ui").FormItemRule[]>;
88
88
  readonly size: import("vue").PropType<"small" | "medium" | "large">;
89
89
  readonly ignorePathChange: BooleanConstructor;
90
- readonly validationStatus: import("vue").PropType<"error" | "success" | "warning">;
90
+ readonly validationStatus: import("vue").PropType<"success" | "error" | "warning">;
91
91
  readonly feedback: StringConstructor;
92
92
  readonly showLabel: {
93
93
  readonly type: import("vue").PropType<boolean | undefined>;
@@ -218,7 +218,7 @@ declare const _default: import("vue").DefineComponent<{
218
218
  mergedLabelAlign: import("vue").ComputedRef<import("naive-ui/es/form/src/interface").LabelAlign | undefined>;
219
219
  mergedShowRequireMark: import("vue").ComputedRef<boolean | undefined>;
220
220
  mergedRequireMarkPlacement: import("vue").ComputedRef<"left" | "right" | "right-hanging">;
221
- mergedValidationStatus: import("vue").ComputedRef<"error" | "success" | "warning" | undefined>;
221
+ mergedValidationStatus: import("vue").ComputedRef<"success" | "error" | "warning" | undefined>;
222
222
  mergedShowFeedback: import("vue").ComputedRef<boolean>;
223
223
  mergedShowLabel: import("vue").ComputedRef<boolean>;
224
224
  isAutoLabelWidth: import("vue").ComputedRef<boolean>;
@@ -252,7 +252,7 @@ declare const _default: import("vue").DefineComponent<{
252
252
  readonly rule: import("vue").PropType<import("naive-ui").FormItemRule | import("naive-ui").FormItemRule[]>;
253
253
  readonly size: import("vue").PropType<"small" | "medium" | "large">;
254
254
  readonly ignorePathChange: BooleanConstructor;
255
- readonly validationStatus: import("vue").PropType<"error" | "success" | "warning">;
255
+ readonly validationStatus: import("vue").PropType<"success" | "error" | "warning">;
256
256
  readonly feedback: StringConstructor;
257
257
  readonly showLabel: {
258
258
  readonly type: import("vue").PropType<boolean | undefined>;
@@ -84,7 +84,7 @@ declare const _default: import("vue").DefineComponent<{
84
84
  readonly rule: import("vue").PropType<import("naive-ui").FormItemRule | import("naive-ui").FormItemRule[]>;
85
85
  readonly size: import("vue").PropType<"small" | "medium" | "large">;
86
86
  readonly ignorePathChange: BooleanConstructor;
87
- readonly validationStatus: import("vue").PropType<"error" | "success" | "warning">;
87
+ readonly validationStatus: import("vue").PropType<"success" | "error" | "warning">;
88
88
  readonly feedback: StringConstructor;
89
89
  readonly showLabel: {
90
90
  readonly type: import("vue").PropType<boolean | undefined>;
@@ -215,7 +215,7 @@ declare const _default: import("vue").DefineComponent<{
215
215
  mergedLabelAlign: import("vue").ComputedRef<import("naive-ui/es/form/src/interface").LabelAlign | undefined>;
216
216
  mergedShowRequireMark: import("vue").ComputedRef<boolean | undefined>;
217
217
  mergedRequireMarkPlacement: import("vue").ComputedRef<"left" | "right" | "right-hanging">;
218
- mergedValidationStatus: import("vue").ComputedRef<"error" | "success" | "warning" | undefined>;
218
+ mergedValidationStatus: import("vue").ComputedRef<"success" | "error" | "warning" | undefined>;
219
219
  mergedShowFeedback: import("vue").ComputedRef<boolean>;
220
220
  mergedShowLabel: import("vue").ComputedRef<boolean>;
221
221
  isAutoLabelWidth: import("vue").ComputedRef<boolean>;
@@ -249,7 +249,7 @@ declare const _default: import("vue").DefineComponent<{
249
249
  readonly rule: import("vue").PropType<import("naive-ui").FormItemRule | import("naive-ui").FormItemRule[]>;
250
250
  readonly size: import("vue").PropType<"small" | "medium" | "large">;
251
251
  readonly ignorePathChange: BooleanConstructor;
252
- readonly validationStatus: import("vue").PropType<"error" | "success" | "warning">;
252
+ readonly validationStatus: import("vue").PropType<"success" | "error" | "warning">;
253
253
  readonly feedback: StringConstructor;
254
254
  readonly showLabel: {
255
255
  readonly type: import("vue").PropType<boolean | undefined>;
@@ -444,7 +444,7 @@ declare const _default: import("vue").DefineComponent<{
444
444
  readonly rule: import("vue").PropType<import("naive-ui").FormItemRule | import("naive-ui").FormItemRule[]>;
445
445
  readonly size: import("vue").PropType<"small" | "medium" | "large">;
446
446
  readonly ignorePathChange: BooleanConstructor;
447
- readonly validationStatus: import("vue").PropType<"error" | "success" | "warning">;
447
+ readonly validationStatus: import("vue").PropType<"success" | "error" | "warning">;
448
448
  readonly feedback: StringConstructor;
449
449
  readonly showLabel: {
450
450
  readonly type: import("vue").PropType<boolean | undefined>;
@@ -575,7 +575,7 @@ declare const _default: import("vue").DefineComponent<{
575
575
  mergedLabelAlign: import("vue").ComputedRef<import("naive-ui/es/form/src/interface").LabelAlign | undefined>;
576
576
  mergedShowRequireMark: import("vue").ComputedRef<boolean | undefined>;
577
577
  mergedRequireMarkPlacement: import("vue").ComputedRef<"left" | "right" | "right-hanging">;
578
- mergedValidationStatus: import("vue").ComputedRef<"error" | "success" | "warning" | undefined>;
578
+ mergedValidationStatus: import("vue").ComputedRef<"success" | "error" | "warning" | undefined>;
579
579
  mergedShowFeedback: import("vue").ComputedRef<boolean>;
580
580
  mergedShowLabel: import("vue").ComputedRef<boolean>;
581
581
  isAutoLabelWidth: import("vue").ComputedRef<boolean>;
@@ -609,7 +609,7 @@ declare const _default: import("vue").DefineComponent<{
609
609
  readonly rule: import("vue").PropType<import("naive-ui").FormItemRule | import("naive-ui").FormItemRule[]>;
610
610
  readonly size: import("vue").PropType<"small" | "medium" | "large">;
611
611
  readonly ignorePathChange: BooleanConstructor;
612
- readonly validationStatus: import("vue").PropType<"error" | "success" | "warning">;
612
+ readonly validationStatus: import("vue").PropType<"success" | "error" | "warning">;
613
613
  readonly feedback: StringConstructor;
614
614
  readonly showLabel: {
615
615
  readonly type: import("vue").PropType<boolean | undefined>;
@@ -1622,8 +1622,8 @@ declare const _default: import("vue").DefineComponent<{
1622
1622
  required: false;
1623
1623
  };
1624
1624
  }>> & {
1625
- onClose?: ((...args: any[]) => any) | undefined;
1626
1625
  onSuccess?: ((...args: any[]) => any) | undefined;
1626
+ onClose?: ((...args: any[]) => any) | undefined;
1627
1627
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
1628
1628
  }, {
1629
1629
  verifyUser: Function;
@@ -1 +1 @@
1
- .dropdown-button{border-color:#d5d5d5!important;color:#212121}.c-dropdown .n-dropdown-menu-wrapper span.active{color:#5585f5}.login-form-button{border-radius:24px;color:#fff;font-size:16px;height:50px;width:100%}.login-form-button-print{padding-top:15px}.login-form-button-print .n-input{border-radius:6px;color:#757575;font-size:14px;height:50px;line-height:50px}.c-button-print-modal .n-form-item-feedback-wrapper{display:none}.c-button-preview-modal{max-width:none!important}.c-button-preview-modal .n-dialog__content{height:98%}
1
+ .dropdown-button{border-color:#d5d5d5!important;color:#212121;padding-right:0}.dropdown-button .n-button__content{height:100%}.dropdown-button .n-button__content .n-icon{align-items:center;display:flex;height:100%;justify-content:center;padding-right:10px;width:30px}.c-dropdown .n-dropdown-menu-wrapper span.active{color:#5585f5}.login-form-button{border-radius:24px;color:#fff;font-size:16px;height:50px;width:100%}.login-form-button-print{padding-top:15px}.login-form-button-print .n-input{border-radius:6px;color:#757575;font-size:14px;height:50px;line-height:50px}.c-button-print-modal .n-form-item-feedback-wrapper{display:none}.c-button-preview-modal{max-width:none!important}.c-button-preview-modal .n-dialog__content{height:98%}