cnhis-design-vue 3.1.55-beta.6 → 3.1.55-release.0

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 (191) hide show
  1. package/README.md +87 -87
  2. package/es/components/body-select/src/hooks/renderCanvas.js +1 -1
  3. package/es/components/body-select/src/index.vue2.js +1 -1
  4. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  5. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  6. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  7. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  8. package/es/components/button-print/index.d.ts +0 -13
  9. package/es/components/button-print/src/ButtonPrint.vue.d.ts +0 -13
  10. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  11. package/es/components/callback/src/components/render/popupMaps.d.ts +6 -26
  12. package/es/components/classification/index.d.ts +1 -486
  13. package/es/components/classification/src/components/search-filter/index.vue.d.ts +1 -473
  14. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  15. package/es/components/classification/src/components/set-classification/index.vue.d.ts +1 -473
  16. package/es/components/classification/src/index.vue.d.ts +1 -486
  17. package/es/components/classification/src/index.vue2.js +1 -1
  18. package/es/components/classification/style/index.css +1 -1
  19. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  20. package/es/components/fabric-chart/index.d.ts +0 -1
  21. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +0 -1
  22. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  23. package/es/components/fabric-chart/src/constants/index.d.ts +0 -1
  24. package/es/components/fabric-chart/src/constants/index.js +1 -1
  25. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  26. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
  27. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  28. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +0 -5
  29. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  30. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  31. package/es/components/fabric-chart/src/hooks/temperature/useCenter.d.ts +1 -1
  32. package/es/components/fabric-chart/src/hooks/temperature/useLeft.d.ts +1 -1
  33. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  34. package/es/components/fabric-chart/src/hooks/useCumputedPoint.d.ts +3 -3
  35. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  36. package/es/components/form-config/index.d.ts +57 -104
  37. package/es/components/form-config/src/FormConfig.vue.d.ts +57 -104
  38. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +6 -26
  39. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +21 -44
  40. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +5 -5
  41. package/es/components/form-render/index.d.ts +6 -26
  42. package/es/components/form-render/index.js +1 -1
  43. package/es/components/form-render/src/FormRender.vue.d.ts +6 -26
  44. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  45. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +6 -26
  46. package/es/components/form-render/src/components/renderer/complex.js +1 -1
  47. package/es/components/form-render/src/components/renderer/date.js +1 -1
  48. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  49. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
  50. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +1 -1
  51. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
  52. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  53. package/es/components/form-render/src/components/renderer/select.js +1 -1
  54. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  55. package/es/components/form-render/src/components/renderer/textarea.js +1 -1
  56. package/es/components/form-render/src/constants/index.d.ts +1 -0
  57. package/es/components/form-render/src/constants/index.js +1 -1
  58. package/es/components/form-render/src/hooks/index.d.ts +9 -20
  59. package/es/components/form-render/src/hooks/index.js +1 -1
  60. package/es/components/form-render/src/hooks/useAnchor.js +1 -1
  61. package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +1 -1
  62. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
  63. package/es/components/form-render/src/hooks/useFieldVisitor.js +1 -1
  64. package/es/components/form-render/src/hooks/useFormEvent.d.ts +3 -14
  65. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  66. package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +4 -4
  67. package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -1
  68. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +10 -11
  69. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  70. package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
  71. package/es/components/form-render/src/hooks/useOperationalForm.d.ts +2 -3
  72. package/es/components/form-render/src/hooks/useOperationalForm.js +1 -1
  73. package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
  74. package/es/components/form-render/src/hooks/useWordbookSetting.d.ts +4 -13
  75. package/es/components/form-render/src/hooks/useWordbookSetting.js +1 -1
  76. package/es/components/form-render/src/types/fieldItem.d.ts +0 -1
  77. package/es/components/form-render/src/types/index.d.ts +5 -10
  78. package/es/components/form-render/src/utils/index.d.ts +16 -3
  79. package/es/components/form-render/src/utils/index.js +1 -1
  80. package/es/components/iho-table/src/plugins/bindEventSettingPlugin/index.js +1 -1
  81. package/es/components/iho-table/src/plugins/index.js +1 -1
  82. package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +1 -1
  83. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -1
  84. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  85. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  86. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  87. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +3 -7
  88. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  89. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  90. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/htmlRendererPlugin.js +1 -1
  91. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -1
  92. package/es/components/iho-table/src/types/index.d.ts +0 -2
  93. package/es/components/iho-table/src/utils/index.d.ts +1 -1
  94. package/es/components/iho-table/src/utils/index.js +1 -1
  95. package/es/components/iho-table/style/index.css +1 -1
  96. package/es/components/index.css +1 -1
  97. package/es/components/index.d.ts +2 -3
  98. package/es/components/index.js +1 -1
  99. package/es/components/info-header/index.d.ts +12 -52
  100. package/es/components/info-header/src/InfoHeader.vue.d.ts +12 -52
  101. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +6 -26
  102. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +6 -26
  103. package/es/components/{biunique-chat → multi-chat}/index.d.ts +2 -2
  104. package/es/components/multi-chat/index.js +1 -0
  105. package/es/components/multi-chat/src/MultiChat.vue.js +1 -0
  106. package/es/components/multi-chat/src/MultiChat.vue2.js +1 -0
  107. package/es/components/quick-search/style/index.css +1 -1
  108. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  109. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  110. package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
  111. package/es/components/shortcut-setter/index.d.ts +11 -32
  112. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +11 -32
  113. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
  114. package/es/components/table-filter/src/constants/index.d.ts +0 -1
  115. package/es/components/table-filter/src/constants/index.js +1 -1
  116. package/es/env.d.ts +25 -25
  117. package/es/shared/assets/img/failure.png.js +1 -1
  118. package/es/shared/assets/img/no-permission.png.js +1 -1
  119. package/es/shared/assets/img/nodata.png.js +1 -1
  120. package/es/shared/assets/img/notfound.png.js +1 -1
  121. package/es/shared/assets/img/qr.png.js +1 -1
  122. package/es/shared/assets/img/success.png.js +1 -1
  123. package/es/shared/assets/img/video.png.js +1 -1
  124. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  125. package/es/shared/assets/img/xb_big.png.js +1 -1
  126. package/es/shared/assets/img/xb_small.png.js +1 -1
  127. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  128. package/es/shared/package.json.js +1 -1
  129. package/es/shared/utils/business.d.ts +0 -1
  130. package/es/shared/utils/business.js +1 -1
  131. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  132. package/es/shared/utils/index.js +1 -1
  133. package/es/shared/utils/tapable/index.d.ts +139 -0
  134. package/package.json +2 -3
  135. package/es/components/audio-sdk/index.d.ts +0 -2
  136. package/es/components/audio-sdk/index.js +0 -1
  137. package/es/components/audio-sdk/src/audioSDK.d.ts +0 -24
  138. package/es/components/audio-sdk/src/audioSDK.js +0 -1
  139. package/es/components/audio-sdk/src/components/recordingDialog.vue.d.ts +0 -26
  140. package/es/components/audio-sdk/src/components/recordingDialog.vue.js +0 -1
  141. package/es/components/audio-sdk/src/components/recordingDialog.vue2.js +0 -1
  142. package/es/components/audio-sdk/src/utils/recordingDialog.d.ts +0 -8
  143. package/es/components/audio-sdk/src/utils/recordingDialog.js +0 -1
  144. package/es/components/audio-sdk/style/index.css +0 -1
  145. package/es/components/biunique-chat/index.js +0 -1
  146. package/es/components/biunique-chat/src/BiuniqueChat.vue.js +0 -1
  147. package/es/components/biunique-chat/src/BiuniqueChat.vue2.js +0 -1
  148. package/es/components/iho-table/src/plugins/colorAndIconPlugin.d.ts +0 -1
  149. package/es/components/iho-table/src/plugins/colorAndIconPlugin.js +0 -1
  150. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +0 -320
  151. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.js +0 -1
  152. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue2.js +0 -1
  153. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +0 -127
  154. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.js +0 -1
  155. package/es/components/table-filter/src/components/bi-filter/components/Date.vue2.js +0 -1
  156. package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue.d.ts +0 -41
  157. package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue.js +0 -1
  158. package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue2.js +0 -1
  159. package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue.d.ts +0 -28
  160. package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue.js +0 -1
  161. package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue2.js +0 -1
  162. package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.d.ts +0 -51
  163. package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.js +0 -1
  164. package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue2.js +0 -1
  165. package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +0 -244
  166. package/es/components/table-filter/src/components/bi-filter/components/index.js +0 -1
  167. package/es/components/table-filter/src/components/bi-filter/helpers/options.d.ts +0 -14
  168. package/es/components/table-filter/src/components/bi-filter/helpers/options.js +0 -1
  169. package/es/components/table-filter/src/components/bi-filter/hooks/useBiConditions.d.ts +0 -13
  170. package/es/components/table-filter/src/components/bi-filter/hooks/useBiConditions.js +0 -1
  171. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +0 -474
  172. package/es/components/table-filter/src/components/bi-filter/index.vue.js +0 -1
  173. package/es/components/table-filter/src/components/bi-filter/index.vue2.js +0 -1
  174. /package/es/components/{biunique-chat/src/BiuniqueChat.vue.d.ts → multi-chat/src/MultiChat.vue.d.ts} +0 -0
  175. /package/es/components/{biunique-chat → multi-chat}/src/api/index.d.ts +0 -0
  176. /package/es/components/{biunique-chat → multi-chat}/src/api/index.js +0 -0
  177. /package/es/components/{biunique-chat → multi-chat}/src/components/ChatFooter.vue.d.ts +0 -0
  178. /package/es/components/{biunique-chat → multi-chat}/src/components/ChatFooter.vue.js +0 -0
  179. /package/es/components/{biunique-chat → multi-chat}/src/components/ChatFooter.vue2.js +0 -0
  180. /package/es/components/{biunique-chat → multi-chat}/src/components/ChatHeader.vue.d.ts +0 -0
  181. /package/es/components/{biunique-chat → multi-chat}/src/components/ChatHeader.vue.js +0 -0
  182. /package/es/components/{biunique-chat → multi-chat}/src/components/ChatHeader.vue2.js +0 -0
  183. /package/es/components/{biunique-chat → multi-chat}/src/components/ChatMain.vue.d.ts +0 -0
  184. /package/es/components/{biunique-chat → multi-chat}/src/components/ChatMain.vue.js +0 -0
  185. /package/es/components/{biunique-chat → multi-chat}/src/components/ChatMain.vue2.js +0 -0
  186. /package/es/components/{biunique-chat → multi-chat}/src/components/SiderList.vue.d.ts +0 -0
  187. /package/es/components/{biunique-chat → multi-chat}/src/components/SiderList.vue.js +0 -0
  188. /package/es/components/{biunique-chat → multi-chat}/src/components/SiderList.vue2.js +0 -0
  189. /package/es/components/{biunique-chat → multi-chat}/src/utils/chatSock.d.ts +0 -0
  190. /package/es/components/{biunique-chat → multi-chat}/src/utils/chatSock.js +0 -0
  191. /package/es/components/{biunique-chat → multi-chat}/style/index.css +0 -0
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
+ ```
@@ -1 +1 @@
1
- import{ref as e}from"vue";import{fabric as t}from"../../../../shared/utils/fabricjs/index.js";function o(o,l,n,{props:r,emits:s}){const i=e({}),c={};return function(){if(o){const e=[];Object.keys(l).forEach((o=>{!function(e,o){const l=new t.Path(o,{fill:"",stroke:"#333",strokeWidth:2,hoverCursor:"pointer",evented:!0,selectable:!1,name:e});l.isSelectMode=!1,i.value[e]=l}(o,l[o]),e.push(i.value[o])}));const u=new t.Group(e,{originX:"left",originY:"top",left:0,scaleX:n,scaleY:n,evented:!0,selectable:!1,hoverCursor:"pointer",subTargetCheck:!0});return u.forEachObject((e=>{e.on("mouseover",(function(){e.set("fill",r.fillColor),c[e.name]=e,setTimeout((()=>{var t,l;t=c,l=e.name,Object.keys(t).filter((e=>!t[e].isSelectMode&&t[e].name!==l)).forEach((e=>{t[e].set("fill",""),delete t[e]})),o.requestRenderAll()}),10)})),e.on("mouseout",(function(){e.fill&&(e.isSelectMode||(e.set("fill",""),delete c[e.name],o.requestRenderAll()))})),e.on("mousedown",(function(){const t=!e.isSelectMode;s("select",e.name,t)}))})),u.on("mouseout",(function(){Object.keys(c).filter((e=>!c[e].isSelectMode)).forEach((e=>{c[e].fill&&(c[e].set("fill",""),delete c[e])})),o.requestRenderAll()})),o.add(u),o.centerObject(u),{canvas:o,data:i.value}}return null}()}export{o as default};
1
+ import{ref as e}from"vue";import{fabric as t}from"../../../../shared/utils/fabricjs/index.js";function o(o,n,r,{props:l,emits:s}){const c=e({});return function(){if(o){const e=[];Object.keys(n).forEach((o=>{!function(e,o){const n=new t.Path(o,{fill:"",stroke:"#333",strokeWidth:2,hoverCursor:"default",evented:!0,selectable:!1,name:e});n.isSelectMode=!1,c.value[e]=n}(o,n[o]),e.push(c.value[o])}));const u=new t.Group(e,{originX:"left",originY:"top",left:0,scaleX:r,scaleY:r,evented:!0,selectable:!1,hoverCursor:"default",subTargetCheck:!0});return u.forEachObject((e=>{e.on("mouseover",(function(){e.set("fill",l.fillColor),o.renderAll()})),e.on("mouseout",(function(){e.isSelectMode||(e.set("fill",""),o.renderAll())})),e.on("mousedown",(function(){const t=!e.isSelectMode;s("select",e.name,t)}))})),o.add(u),o.centerObject(u),{canvas:o,data:c.value}}return null}()}export{o as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as a,watch as l,onMounted as s,onBeforeUnmount as t,openBlock as n,createElementBlock as c,createElementVNode as o}from"vue";import{isObject as r}from"lodash-es";import{fabric as i}from"../../../shared/utils/fabricjs/index.js";import{frontCanvasParams as u,palmCanvasParams as v,backCanvasParams as f}from"./config/index.js";import d from"./hooks/renderCanvas.js";const m={class:"c-body-select"},p={class:"canvas-module"},h=o("span",null,"正面",-1),g={class:"canvas-module"},b=o("span",null,"手",-1),k={class:"canvas-module"},j=o("span",null,"背面",-1);var y=e({__name:"index",props:{setting:{type:Object,default:()=>({})},fillColor:{type:String,default:"#E5E5E5"},canvasWidth:{type:Number,default:920}},emits:["select"],setup(e,{emit:y}){const w=e,C=a(null),O=a(),S=a(null),x=a(),E=a(null),_=a(),R=a([]),F=Number((w.canvasWidth/920).toFixed(2));function M(e,a){R.value.forEach((l=>{const s=l.data,t=Object.keys(s),n=Object.keys(e);t.forEach((l=>{a&&a(s,l),s[l].set("fill",""),s[l].set("isSelectMode",!1),n.includes(l)&&e[l]&&(s[l].set("fill",w.fillColor),s[l].set("isSelectMode",!0))})),l.canvas.requestRenderAll()}))}return l((()=>w.setting),(e=>{e&&r(e)&&M(e)}),{deep:!0}),s((async()=>{const e={props:w,emits:y};O.value=new i.Canvas(C.value,{width:360*F,height:700*F,backgroundColor:"#fff",selection:!1,preserveObjectStacking:!0}),_.value=new i.Canvas(E.value,{width:200*F,height:150*F,backgroundColor:"#fff",selection:!1,preserveObjectStacking:!0}),x.value=new i.Canvas(S.value,{width:360*F,height:700*F,backgroundColor:"#fff",selection:!1,preserveObjectStacking:!0});const a=await d(O.value,u,F,e),l=await d(_.value,v,F,e),s=await d(x.value,f,F,e);a&&s&&l&&(R.value=[a,l,s],M(w.setting,((e,a)=>{["1","4","8","22","18"].includes(a)&&e[a].moveTo(100)})))})),t((()=>{O.value.clear(),x.value.clear(),_.value.clear()})),(e,a)=>(n(),c("div",m,[o("div",p,[o("canvas",{ref_key:"canvasFrontRef",ref:C},null,512),h]),o("div",g,[o("canvas",{ref_key:"canvasPalmsRef",ref:E},null,512),b]),o("div",k,[o("canvas",{ref_key:"canvasBackRef",ref:S},null,512),j])]))}});export{y as default};
1
+ import{defineComponent as e,ref as a,watch as l,onMounted as s,onBeforeUnmount as t,openBlock as n,createElementBlock as c,createElementVNode as o}from"vue";import{isObject as r}from"lodash-es";import{fabric as i}from"../../../shared/utils/fabricjs/index.js";import{frontCanvasParams as u,palmCanvasParams as v,backCanvasParams as f}from"./config/index.js";import d from"./hooks/renderCanvas.js";const m={class:"c-body-select"},p={class:"canvas-module"},h=o("span",null,"正面",-1),g={class:"canvas-module"},b=o("span",null,"手",-1),k={class:"canvas-module"},j=o("span",null,"背面",-1);var y=e({__name:"index",props:{setting:{type:Object,default:()=>({})},fillColor:{type:String,default:"#E5E5E5"},canvasWidth:{type:Number,default:920}},emits:["select"],setup(e,{emit:y}){const w=e,C=a(null),O=a(),S=a(null),x=a(),E=a(null),_=a(),R=a([]),F=Number((w.canvasWidth/920).toFixed(2));function M(e,a){R.value.forEach((l=>{const s=l.data,t=Object.keys(s),n=Object.keys(e);t.forEach((l=>{a&&a(s,l),s[l].set("fill",""),s[l].set("isSelectMode",!1),n.includes(l)&&e[l]&&(s[l].set("fill",w.fillColor),s[l].set("isSelectMode",!0))})),l.canvas.renderAll()}))}return l((()=>w.setting),(e=>{e&&r(e)&&M(e)}),{deep:!0}),s((async()=>{const e={props:w,emits:y};O.value=new i.Canvas(C.value,{width:360*F,height:700*F,backgroundColor:"#fff",selection:!1,preserveObjectStacking:!0}),_.value=new i.Canvas(E.value,{width:200*F,height:150*F,backgroundColor:"#fff",selection:!1,preserveObjectStacking:!0}),x.value=new i.Canvas(S.value,{width:360*F,height:700*F,backgroundColor:"#fff",selection:!1,preserveObjectStacking:!0});const a=await d(O.value,u,F,e),l=await d(_.value,v,F,e),s=await d(x.value,f,F,e);a&&s&&l&&(R.value=[a,l,s],M(w.setting,((e,a)=>{["1","4","8","22","18"].includes(a)&&e[a].moveTo(100)})))})),t((()=>{O.value.clear(),x.value.clear(),_.value.clear()})),(e,a)=>(n(),c("div",m,[o("div",p,[o("canvas",{ref_key:"canvasFrontRef",ref:C},null,512),h]),o("div",g,[o("canvas",{ref_key:"canvasPalmsRef",ref:E},null,512),b]),o("div",k,[o("canvas",{ref_key:"canvasBackRef",ref:S},null,512),j])]))}});export{y as default};
@@ -0,0 +1 @@
1
+ declare module 'bpmn-js/lib/Viewer';
@@ -0,0 +1 @@
1
+ declare module 'bpmn-js/lib/features/modeling';
@@ -0,0 +1 @@
1
+ declare module 'diagram-js/lib/navigation/movecanvas';
@@ -78,10 +78,6 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
78
78
  signature: {
79
79
  type: StringConstructor;
80
80
  };
81
- showLoading: {
82
- type: BooleanConstructor;
83
- default: boolean;
84
- };
85
81
  }, {
86
82
  $message: import("naive-ui").MessageApi;
87
83
  printInstance: import("./src/utils").Print | null;
@@ -162,10 +158,6 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
162
158
  signature: {
163
159
  type: StringConstructor;
164
160
  };
165
- showLoading: {
166
- type: BooleanConstructor;
167
- default: boolean;
168
- };
169
161
  }>> & {
170
162
  onError?: ((...args: any[]) => any) | undefined;
171
163
  onSuccess?: ((...args: any[]) => any) | undefined;
@@ -1931,10 +1923,6 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
1931
1923
  signature: {
1932
1924
  type: StringConstructor;
1933
1925
  };
1934
- showLoading: {
1935
- type: BooleanConstructor;
1936
- default: boolean;
1937
- };
1938
1926
  }>> & {
1939
1927
  onError?: ((...args: any[]) => any) | undefined;
1940
1928
  onSuccess?: ((...args: any[]) => any) | undefined;
@@ -1959,6 +1947,5 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
1959
1947
  options: import("../../../es/shared/types").AnyObject[];
1960
1948
  onSelect: (key: string | number, option: import("../../../es/shared/types").AnyObject) => void;
1961
1949
  }>;
1962
- showLoading: boolean;
1963
1950
  }>>;
1964
1951
  export default ButtonPrint;
@@ -82,10 +82,6 @@ declare const _default: import("vue").DefineComponent<{
82
82
  signature: {
83
83
  type: StringConstructor;
84
84
  };
85
- showLoading: {
86
- type: BooleanConstructor;
87
- default: boolean;
88
- };
89
85
  }, {
90
86
  $message: import("naive-ui").MessageApi;
91
87
  printInstance: Print | null;
@@ -169,10 +165,6 @@ declare const _default: import("vue").DefineComponent<{
169
165
  signature: {
170
166
  type: StringConstructor;
171
167
  };
172
- showLoading: {
173
- type: BooleanConstructor;
174
- default: boolean;
175
- };
176
168
  }>> & {
177
169
  onError?: ((...args: any[]) => any) | undefined;
178
170
  onSuccess?: ((...args: any[]) => any) | undefined;
@@ -1941,10 +1933,6 @@ declare const _default: import("vue").DefineComponent<{
1941
1933
  signature: {
1942
1934
  type: StringConstructor;
1943
1935
  };
1944
- showLoading: {
1945
- type: BooleanConstructor;
1946
- default: boolean;
1947
- };
1948
1936
  }>> & {
1949
1937
  onError?: ((...args: any[]) => any) | undefined;
1950
1938
  onSuccess?: ((...args: any[]) => any) | undefined;
@@ -1969,6 +1957,5 @@ declare const _default: import("vue").DefineComponent<{
1969
1957
  options: AnyObject[];
1970
1958
  onSelect: (key: string | number, option: AnyObject) => void;
1971
1959
  }>;
1972
- showLoading: boolean;
1973
1960
  }>;
1974
1961
  export default _default;
@@ -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 v}from"@vue/shared";import{useMessage as y,NDropdown as b,NButton as I,NIcon as w}from"naive-ui";import{ChevronDown as P}from"@vicons/ionicons5";import{Print as h}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 D=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:D,emit:L}){var O;const j=t,E=y();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:j.printText,key:"printText"},{label:j.previewText,key:"previewText"},{label:j.pdfLoadText,key:"downloadPdf"},{label:j.formatEditText,key:"formatEditText"},...(null==(O=j.externalOptionConfig)?void 0:O.options)||[]]),Y=n((()=>{if(!V.currentFormatId)return{};let t=V.currentFormatId;return V.formatList.find((e=>e.id===t))})),B=n((()=>{var t;return(null==(t=Y.value)?void 0:t.name)||"格式选择"})),J=n((()=>{let t=V.formatList.find((t=>t.id===V.currentFormatId));return null==t?void 0:t.templateId})),U=async t=>{if(j.directPrint){if(V.spinning)return;return"button"===t?void await rt():et()}return et()},A=t=>l("span",{class:{active:t.key===V.currentFormatId}},[t.label]),q=(t,e)=>{V.spinning=!1;let n={type:e,formatId:V.currentFormatId,templateId:J.value};L("success",t,n)},R=t=>{V.spinning=!1,L("error",t),v(t)&&"notInstalledApp"===t.type&&E.error(t.message)},_=t=>{L("error",{message:"前置条件执行错误",type:t,preExecution:!0})},z=(t=0)=>{var e;const n=(null==(e=j.printParams)?void 0:e.length)?j.printParams[t]:V.printParams[t];return JSON.stringify({...n||{},...j.token?{token:j.token}:{}})},H=()=>{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].push(e[t])})),i[t]=i[t].join(",")}));return n=Object.assign({},JSON.parse(z(0)),i),JSON.stringify(n)},$=()=>{let t=V.printParams.length;const e=async e=>{try{--t<=0&&q(e,"print")}catch(t){console.log("error",t)}};j.showLoading&&V.spinning||(V.spinning=!0,j.prevFn("print").then((()=>{const t={formatId:V.currentFormatId,templateId:J.value,printdlgshow:j.printdlgshow,signature:j.signature};if("MULTI"===j.strategy)for(let n=0;n<V.printParams.length;n++)n>0&&(t.printdlgshow="0"),M.printDirect({...t,params:z(n)},e,R);else M.printDirect({...t,params:H()},(t=>{q(t,"print")}),R)})).catch((()=>{_("print"),V.spinning=!1})).finally((()=>{V.visible=!1})))},G=async(t,e)=>{var n,i;switch(t){case"printText":$();break;case"previewText":(async()=>{j.showLoading&&V.spinning||(V.spinning=!0,j.prevFn("preview").then((()=>{const t="MULTI"===j.strategy?z():H(),e={formatId:V.currentFormatId,templateId:J.value,params:t,btnprint:j.btnprint,signature:j.signature};M.preview(e,(t=>{q(t,"preview")}),R)})).catch((()=>{_("preview"),V.spinning=!1})).finally((()=>{V.visible=!1})))})();break;case"formatEditText":j.showLoading&&V.spinning||(V.spinning=!0,j.prevFn("edit").then((()=>{V.identityVerification.visible=!0})).catch((()=>{_("edit")})).finally((()=>{V.visible=!1,V.spinning=!1})));break;case"downloadPdf":(async()=>{j.showLoading&&V.spinning||(V.spinning=!0,j.prevFn("download").then((()=>{const t="MULTI"===j.strategy?z():H(),e={formatId:V.currentFormatId,templateId:J.value,print:{print:"1",type:"1"},params:t,signature:j.signature};M.downloadPDF(e,(t=>q(t,"preview")),R)})).catch((()=>{_("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:j.token})}else null==(i=null==(n=j.externalOptionConfig)?void 0:n.onSelect)||i.call(n,t,e);break}}},K=()=>{V.visible=!1,L("clickoutside")},Q=()=>(V.isInited=!1,V.spinning=!1,setTimeout((()=>{V.visible=!1}),0),!1),W=(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;if(Object.keys(n).includes(t.type)&&e){const r=e instanceof Date?e:new Date(e);i=T(r,n[t.type])}return(null==t?void 0:t.defaultValue)||i})(e,t[e[n]]);t[e[n]]&&r&&(i[e[n]]=r)})),i},X=({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(W(n,e,"fieldName"))}})),i=Object.assign({},i,W(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:j.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("获取打印格式失败,请联系管理员!"),Q();(()=>{const t=V.formatList.map((t=>({label:t.name,key:t.id})));C.unshift({label:B.value,key:"format",children:t})})();let n=null==(e=await j.queryTemplateParams())?void 0:e.obj;if(!n||!J.value)return E.error("获取打印模板失败,请联系管理员!"),Q();V.templateParams=n,V.printParams=X(V.templateParams,j.params)},tt=async()=>{if(V.isInited)return!0;V.isInited=!0,V.spinning=!0,(()=>{if(M)return!1;M=new h})();const t=await j.queryPrintFormatByNumber();return await Z(t),V.spinning=!1,!0},et=async(t=!0)=>{var e,n;if(await j.clickPrevFn())if((null==(e=j.params)?void 0:e.length)&&(null==(n=j.printParams)?void 0:n.length)){if(!V.visible){if(!await tt())return!1}t&&(V.visible=!V.visible)}else E.warning(j.noDataMsg)},nt=()=>{V.watchPrintParamsReformatFn&&V.watchPrintParamsReformatFn(),V.isInited?V.printParams=X(V.templateParams,j.params):V.watchPrintParamsReformatFn=()=>r((()=>V.isInited),(t=>{if(!t)return!1;nt()}))},it=t=>{if(V.identityVerification.visible=!1,F(V.currentFormatId))return q(null,"edit");const e={formatId:V.currentFormatId,templateId:J.value,params:z(),token:t};M.editPrintFormat(e,(t=>{q(t,"edit")}),R)};async function rt(){await et(!1),$()}return i((()=>{V.isInited=!1})),r((()=>j.params),(t=>{if(!(null==t?void 0:t.length))return!1;nt()}),{deep:!0}),D({directPrint:rt}),(e,n)=>(a(),s(o,null,[l(p(b),{class:"c-dropdown",placement:"bottom-start",trigger:"click",show:V.visible,onClickoutside:K,options:C,onSelect:G,"render-label":A},{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((()=>U("button")),["stop"]))},{default:d((()=>[c(f(t.btnText)+" ",1),l(p(w),{component:p(P),style:{"margin-left":"5px"},onClick:n[0]||(n[0]=u((()=>U("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(J),onSuccess:it}),null,16,["modelValue","formatId","templateId"])],64))}});export{D as default};
1
+ import{defineComponent as t,reactive as e,computed as r,onMounted as a,watch as n,openBlock as i,createElementBlock as s,Fragment as o,createVNode as l,unref as m,withCtx as p,renderSlot as d,withModifiers as u,createTextVNode as c,toDisplayString as f,mergeProps as v}from"vue";import{isObject as y}from"@vue/shared";import{useMessage as b,NDropdown as g,NButton as I,NIcon as P}from"naive-ui";import{ChevronDown as w}from"@vicons/ionicons5";import{Print as h}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 D=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}},emits:["success","error","clickoutside"],setup(t,{expose:D,emit:O}){var j;const E=t,L=b();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:E.printText,key:"printText"},{label:E.previewText,key:"previewText"},{label:E.pdfLoadText,key:"downloadPdf"},{label:E.formatEditText,key:"formatEditText"},...(null==(j=E.externalOptionConfig)?void 0:j.options)||[]]),Y=r((()=>{if(!V.currentFormatId)return{};let t=V.currentFormatId;return V.formatList.find((e=>e.id===t))})),J=r((()=>{var t;return(null==(t=Y.value)?void 0:t.name)||"格式选择"})),U=r((()=>{let t=V.formatList.find((t=>t.id===V.currentFormatId));return null==t?void 0:t.templateId})),A=async t=>{if(E.directPrint){if(V.spinning)return;return"button"===t?void await nt():et()}return et()},B=t=>l("span",{class:{active:t.key===V.currentFormatId}},[t.label]),q=(t,e)=>{let r={type:e,formatId:V.currentFormatId,templateId:U.value};O("success",t,r)},R=t=>{O("error",t),y(t)&&"notInstalledApp"===t.type&&L.error(t.message)},_=t=>{O("error",{message:"前置条件执行错误",type:t,preExecution:!0})},z=(t=0)=>{var e;const r=(null==(e=E.printParams)?void 0:e.length)?E.printParams[t]:V.printParams[t];return JSON.stringify({...r||{},...E.token?{token:E.token}:{}})},H=()=>{var t,e;let r={},a={};if(null==(t=V.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(V.printParams[0].datasetData||{}))?void 0:e[0])||"",r=JSON.stringify(V.printParams.map((e=>JSON.parse(e.datasetData[t]))));a={datasetData:{}},a.datasetData[t]=r}else Object.keys(V.printParams[0]).forEach((t=>{a[t]=[],V.printParams.forEach((e=>{a[t].push(e[t])})),a[t]=a[t].join(",")}));return r=Object.assign({},JSON.parse(z(0)),a),JSON.stringify(r)},$=()=>{let t=V.printParams.length;const e=async e=>{try{--t<=0&&q(e,"print")}catch(t){console.log("error",t)}};E.prevFn("print").then((()=>{const t={formatId:V.currentFormatId,templateId:U.value,printdlgshow:E.printdlgshow,signature:E.signature};if("MULTI"===E.strategy)for(let r=0;r<V.printParams.length;r++)r>0&&(t.printdlgshow="0"),M.printDirect({...t,params:z(r)},e,R);else M.printDirect({...t,params:H()},(t=>{q(t,"print")}),R)})).catch((()=>{_("print")})).finally((()=>{V.visible=!1}))},G=async(t,e)=>{var r,a;switch(t){case"printText":$();break;case"previewText":(async()=>{E.prevFn("preview").then((()=>{const t="MULTI"===E.strategy?z():H(),e={formatId:V.currentFormatId,templateId:U.value,params:t,btnprint:E.btnprint,signature:E.signature};M.preview(e,(t=>{q(t,"preview")}),R)})).catch((()=>{_("preview")})).finally((()=>{V.visible=!1}))})();break;case"formatEditText":E.prevFn("edit").then((()=>{V.identityVerification.visible=!0})).catch((()=>{_("edit")})).finally((()=>{V.visible=!1}));break;case"downloadPdf":(async()=>{E.prevFn("download").then((()=>{const t="MULTI"===E.strategy?z():H(),e={formatId:V.currentFormatId,templateId:U.value,print:{print:"1",type:"1"},params:t,signature:E.signature};M.downloadPDF(e,(t=>q(t,"preview")),R)})).catch((()=>{_("download")})).finally((()=>{V.visible=!1}))})();break;default:{V.visible=!1;const n=V.formatList.find((e=>e.id===t))||{};if(Object.keys(n).length>0){V.currentFormatId=t;const[e]=C;e.label=(null==n?void 0:n.name)||e.label,await x({formatForms:[{...n}],name:N.name||n.templateName,number:N.number||n.number,templateId:N.templateId||n.templateId,...N.id?{id:N.id}:{}},{token:E.token})}else null==(a=null==(r=E.externalOptionConfig)?void 0:r.onSelect)||a.call(r,t,e);break}}},K=()=>{V.visible=!1,O("clickoutside")},Q=()=>(V.isInited=!1,V.spinning=!1,setTimeout((()=>{V.visible=!1}),0),!1),W=(t,e,r)=>{const a={};return e.forEach((e=>{let n=((t,e)=>{const r={DATE:"YYYY-MM-DD",DATETIME:"YYYY-MM-DD HH:mm:ss"};let a=e;return Object.keys(r).includes(t.type)&&e&&(a=T(e,r[t.type])),(null==t?void 0:t.defaultValue)||a})(e,t[e[r]]);t[e[r]]&&n&&(a[e[r]]=n)})),a},X=({customizeDataset:t=[],param:e=[]},r=[])=>r.map((r=>{let a={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;a.datasetData={[t.name]:JSON.stringify(W(r,e,"fieldName"))}})),a=Object.assign({},a,W(r,e,"key")),a})),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 r;if(!(null==t?void 0:t.length))return"";const{data:a}=await S({templateId:t[0].templateId},{token:E.token});if("SUCCESS"===a.result){const{formatForms:e=[]}=a.map||{};Object.assign(N,a.map||{});const n=null==(r=null==e?void 0:e[0])?void 0:r.id;if(n&&t.map((t=>t.id)).includes(n))return n}const n=t.find((t=>1==t[e]));return(null==n?void 0:n.id)||t[0].id})(V.formatList,"defaultFlag"),!V.currentFormatId)return L.error("获取打印格式失败,请联系管理员!"),Q();(()=>{const t=V.formatList.map((t=>({label:t.name,key:t.id})));C.unshift({label:J.value,key:"format",children:t})})();let r=null==(e=await E.queryTemplateParams())?void 0:e.obj;if(!r||!U.value)return L.error("获取打印模板失败,请联系管理员!"),Q();V.templateParams=r,V.printParams=X(V.templateParams,E.params)},tt=async()=>{if(V.isInited)return!0;V.isInited=!0,V.spinning=!0,(()=>{if(M)return!1;M=new h})();const t=await E.queryPrintFormatByNumber();return await Z(t),V.spinning=!1,!0},et=async(t=!0)=>{var e;if(await E.clickPrevFn())if(null==(e=E.params)?void 0:e.length){if(!V.visible){if(!await tt())return!1}t&&(V.visible=!V.visible)}else L.warning(E.noDataMsg)},rt=()=>{V.watchPrintParamsReformatFn&&V.watchPrintParamsReformatFn(),V.isInited?V.printParams=X(V.templateParams,E.params):V.watchPrintParamsReformatFn=()=>n((()=>V.isInited),(t=>{if(!t)return!1;rt()}))},at=t=>{if(V.identityVerification.visible=!1,F(V.currentFormatId))return q(null,"edit");const e={formatId:V.currentFormatId,templateId:U.value,params:z(),token:t};M.editPrintFormat(e,(t=>{q(t,"edit")}),R)};async function nt(){await et(!1),$()}return a((()=>{V.isInited=!1})),n((()=>E.params),(t=>{if(!(null==t?void 0:t.length))return!1;rt()}),{deep:!0}),D({directPrint:nt}),(e,r)=>(i(),s(o,null,[l(m(g),{class:"c-dropdown",placement:"bottom-start",trigger:"click",show:V.visible,onClickoutside:K,options:C,onSelect:G,"render-label":B},{default:p((()=>[d(e.$slots,"button",{handleClickPrintBtn:et,printSpinning:V.spinning,printbtnText:t.btnText,printVisible:V.visible},(()=>[l(m(I),{class:"dropdown-button",onClick:r[1]||(r[1]=u((()=>A("button")),["stop"]))},{default:p((()=>[c(f(t.btnText)+" ",1),l(m(P),{component:m(w),style:{"margin-left":"5px"},onClick:r[0]||(r[0]=u((()=>A("icon")),["stop"]))},null,8,["component"])])),_:1})]))])),_:3},8,["show","options"]),l(k,v(e.$attrs,{modelValue:V.identityVerification.visible,"onUpdate:modelValue":r[2]||(r[2]=t=>V.identityVerification.visible=t),formatId:V.currentFormatId,templateId:m(U),onSuccess:at}),null,16,["modelValue","formatId","templateId"])],64))}});export{D as default};
@@ -140,10 +140,6 @@ export declare const CallbackMaps: Map<string, {
140
140
  dateOperationalForm: {
141
141
  type: import("vue").PropType<import("../../../..").LowCodeTypes.dateOperationalConfig[]>;
142
142
  };
143
- operationalFormInit: {
144
- type: BooleanConstructor;
145
- default: boolean;
146
- };
147
143
  linebarAutoHidden: {
148
144
  type: BooleanConstructor;
149
145
  };
@@ -296,10 +292,6 @@ export declare const CallbackMaps: Map<string, {
296
292
  dateOperationalForm: {
297
293
  type: import("vue").PropType<import("../../../..").LowCodeTypes.dateOperationalConfig[]>;
298
294
  };
299
- operationalFormInit: {
300
- type: BooleanConstructor;
301
- default: boolean;
302
- };
303
295
  linebarAutoHidden: {
304
296
  type: BooleanConstructor;
305
297
  };
@@ -380,12 +372,12 @@ export declare const CallbackMaps: Map<string, {
380
372
  }>;
381
373
  lowCodeReactionsHandler: (field: string) => void;
382
374
  triggerAllReactionsHandler: () => void;
383
- operationalFormHandler: {
384
- trigger(fieldKey: string): void;
385
- triggerAll(): void;
386
- triggerDisabled: string | boolean;
375
+ operationalFormHandler: (fieldKey: string) => void;
376
+ triggerAllOperationalFormHandler: () => void;
377
+ wordbookSettingHandler: {
378
+ trigger: (fieldKey: string, value: unknown) => void;
379
+ setDisabled: (value: boolean) => void;
387
380
  };
388
- wordbookSettingHandler: import("../../../../../../es/components/form-render").wordbookSettingHandler;
389
381
  schemaAdaptor: (fieldList: import("../../../../../../es/components/form-render").FieldItem[], options?: Partial<{
390
382
  fieldList: import("../../../../../../es/components/form-render").FieldItem[];
391
383
  initialData: import("../../../..").AnyObject;
@@ -598,14 +590,7 @@ export declare const CallbackMaps: Map<string, {
598
590
  force?: boolean | undefined;
599
591
  }): Promise<void>;
600
592
  getFormValues(needCombineExtendKey?: boolean): any;
601
- setFormValues(values: import("../../../..").AnyObject, options?: boolean | {
602
- needSplitExtendKey?: boolean | undefined;
603
- avoidBusinessConnection?: string | boolean | undefined;
604
- avoidDependKeyConnection?: string | boolean | undefined;
605
- avoidWordbookSettingConnection?: string | boolean | undefined;
606
- avoidOperationalFormConnection?: string | boolean | undefined;
607
- overwrite?: boolean | undefined;
608
- }, avoidBusinessConnection?: string | boolean, overwrite?: boolean): Promise<void>;
593
+ setFormValues(values: import("../../../..").AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
609
594
  setFieldState(path: string, setter: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
610
595
  match: (pattern: import("@formily/path").Pattern) => boolean;
611
596
  validate: (triggerType?: import("@formily/validator").ValidatorTriggerType | undefined) => any;
@@ -902,10 +887,6 @@ export declare const CallbackMaps: Map<string, {
902
887
  dateOperationalForm: {
903
888
  type: import("vue").PropType<import("../../../..").LowCodeTypes.dateOperationalConfig[]>;
904
889
  };
905
- operationalFormInit: {
906
- type: BooleanConstructor;
907
- default: boolean;
908
- };
909
890
  linebarAutoHidden: {
910
891
  type: BooleanConstructor;
911
892
  };
@@ -941,7 +922,6 @@ export declare const CallbackMaps: Map<string, {
941
922
  bordered: string | boolean;
942
923
  uniqueCacheData: boolean;
943
924
  outBordered: boolean;
944
- operationalFormInit: boolean;
945
925
  }>;
946
926
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
947
927
  props: {