cnhis-design-vue 3.1.42-release.4 → 3.1.42-release.6

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 (151) hide show
  1. package/README.md +87 -87
  2. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  3. package/es/components/big-table/src/components/edit-form/edit-select-table.d.ts +1 -1
  4. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  5. package/es/components/big-table/src/hooks/useEvent.js +1 -1
  6. package/es/components/big-table/src/hooks/useFormat.js +1 -1
  7. package/es/components/big-table/src/hooks/useNestTable.js +1 -1
  8. package/es/components/big-table/src/hooks/useTableParse.js +1 -1
  9. package/es/components/big-table/src/utils.d.ts +11 -1
  10. package/es/components/big-table/src/utils.js +1 -1
  11. package/es/components/button-print/index.d.ts +28 -3
  12. package/es/components/button-print/src/ButtonPrint.vue.d.ts +28 -4
  13. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  14. package/es/components/button-print/src/utils/print.js +1 -1
  15. package/es/components/form-config/index.d.ts +48 -7
  16. package/es/components/form-config/src/FormConfig.vue.d.ts +48 -7
  17. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +14 -1
  18. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +26 -4
  19. package/es/components/form-config/src/constants/index.d.ts +8 -1
  20. package/es/components/form-config/src/constants/index.js +1 -1
  21. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  22. package/es/components/form-render/index.d.ts +14 -1
  23. package/es/components/form-render/src/FormRender.vue.d.ts +14 -1
  24. package/es/components/form-render/src/FormRender.vue.js +1 -1
  25. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +14 -1
  26. package/es/components/form-render/src/components/renderer/date.d.ts +4 -0
  27. package/es/components/form-render/src/components/renderer/date.js +1 -1
  28. package/es/components/form-render/src/components/renderer/searchCascade.d.ts +18 -0
  29. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  30. package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +1 -0
  31. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
  32. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  33. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
  34. package/es/components/form-render/src/hooks/useFormEvent.d.ts +1 -1
  35. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  36. package/es/components/form-render/src/types/fieldItem.d.ts +8 -1
  37. package/es/components/form-render/src/types/index.d.ts +2 -2
  38. package/es/components/form-render/style/index.css +1 -1
  39. package/es/components/iho-table/index.d.ts +17 -3
  40. package/es/components/iho-table/src/IhoTable.vue.d.ts +17 -3
  41. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  42. package/es/components/iho-table/src/constants/index.d.ts +3 -2
  43. package/es/components/iho-table/src/constants/index.js +1 -1
  44. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +2 -2
  45. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +19 -19
  46. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +60 -237
  47. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +1 -4
  48. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +4 -16
  49. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +2 -2
  50. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -1
  51. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  52. package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -1
  53. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  54. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +48 -0
  55. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.js +1 -0
  56. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/index.d.ts +1 -0
  57. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/index.js +1 -0
  58. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  59. package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
  60. package/es/components/iho-table/src/plugins/index.js +1 -1
  61. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  62. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +25 -3
  63. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  64. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  65. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +2 -1
  66. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -0
  67. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  68. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
  69. package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +1 -0
  70. package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +1 -0
  71. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  72. package/es/components/iho-table/src/types/index.d.ts +21 -2
  73. package/es/components/iho-table/src/types/pluginType.d.ts +13 -26
  74. package/es/components/iho-table/src/utils/index.d.ts +5 -3
  75. package/es/components/iho-table/src/utils/index.js +1 -1
  76. package/es/components/iho-table/style/index.css +1 -1
  77. package/es/components/index.css +1 -1
  78. package/es/components/index.d.ts +1 -0
  79. package/es/components/info-header/index.d.ts +29 -2
  80. package/es/components/info-header/src/InfoHeader.vue.d.ts +29 -2
  81. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  82. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
  83. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +14 -1
  84. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +15 -1
  85. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  86. package/es/components/info-header/style/index.css +1 -1
  87. package/es/components/scale-view/index.d.ts +9 -130
  88. package/es/components/scale-view/index.js +1 -1
  89. package/es/components/scale-view/src/ScaleView.vue.d.ts +8 -130
  90. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  91. package/es/components/scale-view/src/components/AnswerParse.vue.d.ts +1 -43
  92. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
  93. package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +0 -42
  94. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
  95. package/es/components/scale-view/src/components/formitem/r-address.js +1 -1
  96. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
  97. package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -1
  98. package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
  99. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
  100. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +4 -4
  101. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
  102. package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
  103. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  104. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
  105. package/es/components/scale-view/src/hooks/scaleview-submit.d.ts +5 -1
  106. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  107. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
  108. package/es/components/scale-view/src/hooks/use-evaluate.js +1 -1
  109. package/es/components/scale-view/src/hooks/use-event.js +1 -1
  110. package/es/components/scale-view/src/types/index.d.ts +7 -0
  111. package/es/components/scale-view/src/types/index.js +1 -0
  112. package/es/components/scale-view/style/index.css +1 -1
  113. package/es/components/scale-view/style/scale-view-iconfont.ttf +0 -0
  114. package/es/components/search-cascader/index.d.ts +12 -1
  115. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +12 -1
  116. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
  117. package/es/components/search-cascader/src/components/SearchMenu.d.ts +8 -1
  118. package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
  119. package/es/components/search-cascader/src/constants/index.d.ts +1 -0
  120. package/es/components/search-cascader/src/constants/index.js +1 -1
  121. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  122. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  123. package/es/components/select-person/index.d.ts +57 -9
  124. package/es/components/select-person/src/SearchMultiple.vue.d.ts +125 -0
  125. package/es/components/select-person/src/SelectPerson.vue.d.ts +43 -7
  126. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  127. package/es/components/select-person/src/utils/index.js +1 -1
  128. package/es/components/select-person/style/index.css +1 -1
  129. package/es/components/shortcut-setter/index.d.ts +18 -2
  130. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +18 -2
  131. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
  132. package/es/env.d.ts +25 -24
  133. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
  134. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
  135. package/es/shared/package.json.js +1 -0
  136. package/es/shared/utils/anime.d.ts +1 -1
  137. package/es/shared/utils/anime.js +1 -1
  138. package/es/shared/utils/index.d.ts +3 -14
  139. package/es/shared/utils/index.js +1 -1
  140. package/es/shared/utils/vexutils.d.ts +2 -2
  141. package/es/shared/utils/vexutils.js +1 -1
  142. package/es/shared/utils/vexutilsExpand.d.ts +254 -0
  143. package/es/shared/utils/vexutilsExpand.js +1 -0
  144. package/package.json +2 -2
  145. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  146. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  147. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  148. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  149. package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
  150. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  151. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -68,6 +68,13 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
68
68
  type: BooleanConstructor;
69
69
  default: boolean;
70
70
  };
71
+ externalOptionConfig: {
72
+ type: import("vue").PropType<Partial<{
73
+ options: import("../../../es/shared/types").AnyObject[];
74
+ onSelect: (key: string | number, option: import("../../../es/shared/types").AnyObject) => void;
75
+ }>>;
76
+ default: () => {};
77
+ };
71
78
  }, {
72
79
  $message: import("naive-ui").MessageApi;
73
80
  printInstance: import("./src/utils").Print | null;
@@ -138,6 +145,13 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
138
145
  type: BooleanConstructor;
139
146
  default: boolean;
140
147
  };
148
+ externalOptionConfig: {
149
+ type: import("vue").PropType<Partial<{
150
+ options: import("../../../es/shared/types").AnyObject[];
151
+ onSelect: (key: string | number, option: import("../../../es/shared/types").AnyObject) => void;
152
+ }>>;
153
+ default: () => {};
154
+ };
141
155
  }>> & {
142
156
  onError?: ((...args: any[]) => any) | undefined;
143
157
  onSuccess?: ((...args: any[]) => any) | undefined;
@@ -159,12 +173,12 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
159
173
  watchPrintParamsReformatFn: null;
160
174
  spinTimer: null;
161
175
  };
162
- options: import("naive-ui").MenuOption[];
176
+ options: import("../../../es/shared/types").AnyObject[];
163
177
  currentFormatItem: import("vue").ComputedRef<{} | undefined>;
164
178
  formatTitle: import("vue").ComputedRef<any>;
165
179
  getTemplateIdByFormatId: import("vue").ComputedRef<any>;
166
180
  buttonClick: (origin: string) => Promise<false | undefined>;
167
- renderLabel: (option: import("naive-ui").MenuOption) => JSX.Element;
181
+ renderLabel: (option: import("../../../es/shared/types").AnyObject) => JSX.Element;
168
182
  callLocalServicesSuccessCb: (res: any, type: any) => void;
169
183
  callLocalServicesErrorCb: (res: unknown) => void;
170
184
  prevFnError: () => void;
@@ -174,7 +188,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
174
188
  handleClickPreview: () => Promise<void>;
175
189
  handleClickPdf: () => Promise<void>;
176
190
  handleClickEdit: () => void;
177
- handleSelect: (key: string) => Promise<void>;
191
+ handleSelect: (key: string, option: import("../../../es/shared/types").AnyObject) => Promise<void>;
178
192
  handleClickOutside: () => void;
179
193
  instantiatePrintSDK: () => false | undefined;
180
194
  getDefaultFormatId: (list: any[], key: string | number) => Promise<any>;
@@ -1893,6 +1907,13 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
1893
1907
  type: BooleanConstructor;
1894
1908
  default: boolean;
1895
1909
  };
1910
+ externalOptionConfig: {
1911
+ type: import("vue").PropType<Partial<{
1912
+ options: import("../../../es/shared/types").AnyObject[];
1913
+ onSelect: (key: string | number, option: import("../../../es/shared/types").AnyObject) => void;
1914
+ }>>;
1915
+ default: () => {};
1916
+ };
1896
1917
  }>> & {
1897
1918
  onError?: ((...args: any[]) => any) | undefined;
1898
1919
  onSuccess?: ((...args: any[]) => any) | undefined;
@@ -1913,5 +1934,9 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
1913
1934
  printdlgshow: string;
1914
1935
  btnprint: string;
1915
1936
  directPrint: boolean;
1937
+ externalOptionConfig: Partial<{
1938
+ options: import("../../../es/shared/types").AnyObject[];
1939
+ onSelect: (key: string | number, option: import("../../../es/shared/types").AnyObject) => void;
1940
+ }>;
1916
1941
  }>>;
1917
1942
  export default ButtonPrint;
@@ -1,7 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { AnyObject } from '../../../../es/shared/types';
3
3
  import { PropType } from 'vue';
4
- import type { DropdownOption } from 'naive-ui';
5
4
  import { Print } from './utils';
6
5
  declare const _default: import("vue").DefineComponent<{
7
6
  printParams: {
@@ -73,6 +72,13 @@ declare const _default: import("vue").DefineComponent<{
73
72
  type: BooleanConstructor;
74
73
  default: boolean;
75
74
  };
75
+ externalOptionConfig: {
76
+ type: PropType<Partial<{
77
+ options: AnyObject[];
78
+ onSelect: (key: string | number, option: AnyObject) => void;
79
+ }>>;
80
+ default: () => {};
81
+ };
76
82
  }, {
77
83
  $message: import("naive-ui").MessageApi;
78
84
  printInstance: Print | null;
@@ -146,6 +152,13 @@ declare const _default: import("vue").DefineComponent<{
146
152
  type: BooleanConstructor;
147
153
  default: boolean;
148
154
  };
155
+ externalOptionConfig: {
156
+ type: PropType<Partial<{
157
+ options: AnyObject[];
158
+ onSelect: (key: string | number, option: AnyObject) => void;
159
+ }>>;
160
+ default: () => {};
161
+ };
149
162
  }>> & {
150
163
  onError?: ((...args: any[]) => any) | undefined;
151
164
  onSuccess?: ((...args: any[]) => any) | undefined;
@@ -167,12 +180,12 @@ declare const _default: import("vue").DefineComponent<{
167
180
  watchPrintParamsReformatFn: null;
168
181
  spinTimer: null;
169
182
  };
170
- options: import("naive-ui").MenuOption[];
183
+ options: AnyObject[];
171
184
  currentFormatItem: import("vue").ComputedRef<{} | undefined>;
172
185
  formatTitle: import("vue").ComputedRef<any>;
173
186
  getTemplateIdByFormatId: import("vue").ComputedRef<any>;
174
187
  buttonClick: (origin: string) => Promise<false | undefined>;
175
- renderLabel: (option: DropdownOption) => JSX.Element;
188
+ renderLabel: (option: AnyObject) => JSX.Element;
176
189
  callLocalServicesSuccessCb: (res: any, type: any) => void;
177
190
  callLocalServicesErrorCb: (res: unknown) => void;
178
191
  prevFnError: () => void;
@@ -182,7 +195,7 @@ declare const _default: import("vue").DefineComponent<{
182
195
  handleClickPreview: () => Promise<void>;
183
196
  handleClickPdf: () => Promise<void>;
184
197
  handleClickEdit: () => void;
185
- handleSelect: (key: string) => Promise<void>;
198
+ handleSelect: (key: string, option: AnyObject) => Promise<void>;
186
199
  handleClickOutside: () => void;
187
200
  instantiatePrintSDK: () => false | undefined;
188
201
  getDefaultFormatId: (list: any[], key: string | number) => Promise<any>;
@@ -1904,6 +1917,13 @@ declare const _default: import("vue").DefineComponent<{
1904
1917
  type: BooleanConstructor;
1905
1918
  default: boolean;
1906
1919
  };
1920
+ externalOptionConfig: {
1921
+ type: PropType<Partial<{
1922
+ options: AnyObject[];
1923
+ onSelect: (key: string | number, option: AnyObject) => void;
1924
+ }>>;
1925
+ default: () => {};
1926
+ };
1907
1927
  }>> & {
1908
1928
  onError?: ((...args: any[]) => any) | undefined;
1909
1929
  onSuccess?: ((...args: any[]) => any) | undefined;
@@ -1924,5 +1944,9 @@ declare const _default: import("vue").DefineComponent<{
1924
1944
  printdlgshow: string;
1925
1945
  btnprint: string;
1926
1946
  directPrint: boolean;
1947
+ externalOptionConfig: Partial<{
1948
+ options: AnyObject[];
1949
+ onSelect: (key: string | number, option: AnyObject) => void;
1950
+ }>;
1927
1951
  }>;
1928
1952
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as t,reactive as e,computed as r,onMounted as a,onUnmounted as i,watch as n,openBlock as s,createElementBlock as o,Fragment as l,createVNode as m,unref as p,withCtx as d,renderSlot as u,withModifiers as c,createCommentVNode as f,createTextVNode as v,toDisplayString as y,mergeProps as b}from"vue";import{isObject as g}from"@vue/shared";import{useMessage as P,NDropdown as I,NButton as h,NIcon as F}from"naive-ui";import{ChevronDown as w}from"@vicons/ionicons5";import{Print as k}from"./utils/print.js";import{isIReport as T}from"./utils/browserPrint.js";import S from"./components/IdentityVerification.vue.js";import{format as x}from"date-fns";import{savePrivateFormatApi as D,getPrivateFormatApi as j}from"./api.js";var E=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}},emits:["success","error","clickoutside"],setup(t,{expose:E,emit:L}){const N=t,M=P();let O;const V={},Y=e({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null}),U=e([{label:N.printText,key:"printText"},{label:N.previewText,key:"previewText"},{label:N.pdfLoadText,key:"downloadPdf"},{label:N.formatEditText,key:"formatEditText"}]),B=r((()=>{if(!Y.currentFormatId)return{};let t=Y.currentFormatId;return Y.formatList.find((e=>e.id===t))})),C=r((()=>{var t;return(null==(t=B.value)?void 0:t.name)||"格式选择"})),J=r((()=>{let t=Y.formatList.find((t=>t.id===Y.currentFormatId));return null==t?void 0:t.templateId})),A=async t=>{if(N.directPrint){if(Y.spinning)return;return"button"===t?void await nt():rt()}return rt()},R=t=>m("span",{class:{active:t.key===Y.currentFormatId}},[t.label]),q=(t,e)=>{let r={type:e,formatId:Y.currentFormatId,templateId:J.value};L("success",t,r)},_=t=>{L("error",t),g(t)&&"notInstalledApp"===t.type&&M.error(t.message)},z=()=>{L("error",{message:"前置条件执行错误"})},H=(t=0)=>{var e;const r=(null==(e=N.printParams)?void 0:e.length)?N.printParams[t]:Y.printParams[t];return JSON.stringify({...r||{},...N.token?{token:N.token}:{}})},$=()=>{var t,e;let r={},a={};if(null==(t=Y.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(Y.printParams[0].datasetData||{}))?void 0:e[0])||"",r=JSON.stringify(Y.printParams.map((e=>JSON.parse(e.datasetData[t]))));a={datasetData:{}},a.datasetData[t]=r}else Object.keys(Y.printParams[0]).forEach((t=>{a[t]=[],Y.printParams.forEach((e=>{a[t].push(e[t])})),a[t]=a[t].join(",")}));return r=Object.assign({},JSON.parse(H(0)),a),JSON.stringify(r)},G=()=>{let t=Y.printParams.length;const e=async e=>{try{--t<=0&&q(e,"print")}catch(t){console.log("error",t)}};N.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{const t={formatId:Y.currentFormatId,templateId:J.value,printdlgshow:N.printdlgshow};if("MULTI"===N.strategy)for(let r=0;r<Y.printParams.length;r++)r>0&&(t.printdlgshow="0"),O.printDirect({...t,params:H(r)},e,_);else O.printDirect({...t,params:$()},(t=>{q(t,"print")}),_)})).finally((()=>{Y.visible=!1}))},K=async t=>{switch(t){case"printText":G();break;case"previewText":(async()=>{N.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{const t="MULTI"===N.strategy?H():$(),e={formatId:Y.currentFormatId,templateId:J.value,params:t,btnprint:N.btnprint};O.preview(e,(t=>{q(t,"preview")}),_)})).finally((()=>{Y.visible=!1}))})();break;case"formatEditText":N.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{Y.identityVerification.visible=!0})).finally((()=>{Y.visible=!1}));break;case"downloadPdf":(async()=>{N.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{const t="MULTI"===N.strategy?H():$(),e={formatId:Y.currentFormatId,templateId:J.value,print:{print:"1",type:"1"},params:t};O.downloadPDF(e,(t=>q(t,"preview")),_)})).finally((()=>{Y.visible=!1}))})();break;default:{Y.currentFormatId=t,Y.visible=!1;const[e]=U,r=Y.formatList.find((e=>e.id===t));e.label=(null==r?void 0:r.name)||e.label,await D({formatForms:[{...r}],name:V.name||r.templateName,number:V.number||r.number,templateId:V.templateId||r.templateId,...V.id?{id:V.id}:{}},{token:N.token});break}}},Q=()=>{Y.visible=!1,L("clickoutside")},W=()=>(Y.isInited=!1,Y.spinning=!1,setTimeout((()=>{Y.visible=!1}),0),!1),X=(t,e,r)=>{const a={};return e.forEach((e=>{let i=((t,e)=>{let r=t.defaultValue||"",a=e;return"NUMBER"===t.type&&(a=Number(e)||0),"DATE"===t.type&&(a=e?x(e,"YYYY-MM-DD"):""),"DATETIME"===t.type&&(a=e?x(e,"YYYY-MM-DD HH:mm:ss"):""),r||a})(e,t[e[r]]);t[e[r]]&&i&&(a[e[r]]=i)})),a},Z=({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(X(r,e,"fieldName"))}})),a=Object.assign({},a,X(r,e,"key")),a})),tt=async t=>{var e;if(Y.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):[],Y.currentFormatId=await(async(t,e)=>{var r;if(!(null==t?void 0:t.length))return"";const{data:a}=await j({templateId:t[0].templateId},{token:N.token});if("SUCCESS"===a.result){const{formatForms:e=[]}=a.map||{};Object.assign(V,a.map||{});const i=null==(r=null==e?void 0:e[0])?void 0:r.id;if(i&&t.map((t=>t.id)).includes(i))return i}const i=t.find((t=>1==t[e]));return(null==i?void 0:i.id)||t[0].id})(Y.formatList,"defaultFlag"),!Y.currentFormatId)return M.error("获取打印格式失败,请联系管理员!"),W();(()=>{const t=Y.formatList.map((t=>({label:t.name,key:t.id})));U.unshift({label:C.value,key:"format",children:t})})();let r=null==(e=await N.queryTemplateParams())?void 0:e.obj;if(!r||!J.value)return M.error("获取打印模板失败,请联系管理员!"),W();Y.templateParams=r,Y.printParams=Z(Y.templateParams,N.params)},et=async()=>{if(Y.isInited)return!0;Y.isInited=!0,Y.spinning=!0,(()=>{if(O)return!1;O=new k})();const t=await N.queryPrintFormatByNumber();return await tt(t),Y.spinning=!1,!0},rt=async(t=!0)=>{var e;if(await N.clickPrevFn())if(null==(e=N.params)?void 0:e.length){if(!Y.visible){if(!await et())return!1}t&&(Y.visible=!Y.visible)}else M.warning(N.noDataMsg)},at=()=>{Y.watchPrintParamsReformatFn&&Y.watchPrintParamsReformatFn(),Y.isInited?Y.printParams=Z(Y.templateParams,N.params):Y.watchPrintParamsReformatFn=()=>n((()=>Y.isInited),(t=>{if(!t)return!1;at()}))},it=t=>{if(Y.identityVerification.visible=!1,T(Y.currentFormatId))return q(null,"edit");const e={formatId:Y.currentFormatId,templateId:J.value,params:H(),token:t};O.editPrintFormat(e,(t=>{q(t,"edit")}),_)};async function nt(){await rt(!1),G()}return a((()=>{Y.isInited=!1})),i((()=>{null==O||O.destroy()})),n((()=>N.params),(t=>{if(!(null==t?void 0:t.length))return!1;at()}),{deep:!0}),E({directPrint:nt}),(e,r)=>(s(),o(l,null,[m(p(I),{class:"c-dropdown",placement:"bottom-start",trigger:"click",show:Y.visible,onClickoutside:Q,options:U,onSelect:K,"render-label":R},{default:d((()=>[u(e.$slots,"button",{handleClickPrintBtn:rt,printSpinning:Y.spinning,printbtnText:t.btnText,printVisible:Y.visible},(()=>[m(p(h),{class:"dropdown-button",onClick:r[1]||(r[1]=c((()=>A("button")),["stop"]))},{default:d((()=>[f(' <n-spin v-show="state.spinning" size="small"></n-spin> '),v(y(t.btnText)+" ",1),m(p(F),{component:p(w),style:{"margin-left":"5px"},onClick:r[0]||(r[0]=c((()=>A("icon")),["stop"]))},null,8,["component"])])),_:1})]))])),_:3},8,["show","options"]),m(S,b(e.$attrs,{modelValue:Y.identityVerification.visible,"onUpdate:modelValue":r[2]||(r[2]=t=>Y.identityVerification.visible=t),formatId:Y.currentFormatId,templateId:p(J),onSuccess:it}),null,16,["modelValue","formatId","templateId"])],64))}});export{E as default};
1
+ import{defineComponent as t,reactive as e,computed as r,onMounted as a,onUnmounted as n,watch as i,openBlock as o,createElementBlock as s,Fragment as l,createVNode as m,unref as p,withCtx as d,renderSlot as u,withModifiers as c,createTextVNode as f,toDisplayString as v,mergeProps as y}from"vue";import{isObject as b}from"@vue/shared";import{useMessage as g,NDropdown as P,NButton as I,NIcon as h}from"naive-ui";import{ChevronDown as F}from"@vicons/ionicons5";import{Print as w}from"./utils/print.js";import{isIReport as k}from"./utils/browserPrint.js";import T from"./components/IdentityVerification.vue.js";import{format as x}from"date-fns";import{savePrivateFormatApi as S,getPrivateFormatApi as j}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:()=>({})}},emits:["success","error","clickoutside"],setup(t,{expose:D,emit:O}){var E;const L=t,N=g();let M;const V={},C=e({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null}),Y=e([{label:L.printText,key:"printText"},{label:L.previewText,key:"previewText"},{label:L.pdfLoadText,key:"downloadPdf"},{label:L.formatEditText,key:"formatEditText"},...(null==(E=L.externalOptionConfig)?void 0:E.options)||[]]),U=r((()=>{if(!C.currentFormatId)return{};let t=C.currentFormatId;return C.formatList.find((e=>e.id===t))})),B=r((()=>{var t;return(null==(t=U.value)?void 0:t.name)||"格式选择"})),J=r((()=>{let t=C.formatList.find((t=>t.id===C.currentFormatId));return null==t?void 0:t.templateId})),A=async t=>{if(L.directPrint){if(C.spinning)return;return"button"===t?void await it():rt()}return rt()},R=t=>m("span",{class:{active:t.key===C.currentFormatId}},[t.label]),q=(t,e)=>{let r={type:e,formatId:C.currentFormatId,templateId:J.value};O("success",t,r)},_=t=>{O("error",t),b(t)&&"notInstalledApp"===t.type&&N.error(t.message)},z=()=>{O("error",{message:"前置条件执行错误"})},H=(t=0)=>{var e;const r=(null==(e=L.printParams)?void 0:e.length)?L.printParams[t]:C.printParams[t];return JSON.stringify({...r||{},...L.token?{token:L.token}:{}})},$=()=>{var t,e;let r={},a={};if(null==(t=C.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(C.printParams[0].datasetData||{}))?void 0:e[0])||"",r=JSON.stringify(C.printParams.map((e=>JSON.parse(e.datasetData[t]))));a={datasetData:{}},a.datasetData[t]=r}else Object.keys(C.printParams[0]).forEach((t=>{a[t]=[],C.printParams.forEach((e=>{a[t].push(e[t])})),a[t]=a[t].join(",")}));return r=Object.assign({},JSON.parse(H(0)),a),JSON.stringify(r)},G=()=>{let t=C.printParams.length;const e=async e=>{try{--t<=0&&q(e,"print")}catch(t){console.log("error",t)}};L.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{const t={formatId:C.currentFormatId,templateId:J.value,printdlgshow:L.printdlgshow};if("MULTI"===L.strategy)for(let r=0;r<C.printParams.length;r++)r>0&&(t.printdlgshow="0"),M.printDirect({...t,params:H(r)},e,_);else M.printDirect({...t,params:$()},(t=>{q(t,"print")}),_)})).finally((()=>{C.visible=!1}))},K=async(t,e)=>{var r,a;switch(t){case"printText":G();break;case"previewText":(async()=>{L.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{const t="MULTI"===L.strategy?H():$(),e={formatId:C.currentFormatId,templateId:J.value,params:t,btnprint:L.btnprint};M.preview(e,(t=>{q(t,"preview")}),_)})).finally((()=>{C.visible=!1}))})();break;case"formatEditText":L.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{C.identityVerification.visible=!0})).finally((()=>{C.visible=!1}));break;case"downloadPdf":(async()=>{L.prevFn().catch((()=>(z(),Promise.reject()))).then((()=>{const t="MULTI"===L.strategy?H():$(),e={formatId:C.currentFormatId,templateId:J.value,print:{print:"1",type:"1"},params:t};M.downloadPDF(e,(t=>q(t,"preview")),_)})).finally((()=>{C.visible=!1}))})();break;default:{C.visible=!1;const n=C.formatList.find((e=>e.id===t))||{};if(Object.keys(n).length>0){C.currentFormatId=t;const[e]=Y;e.label=(null==n?void 0:n.name)||e.label,await S({formatForms:[{...n}],name:V.name||n.templateName,number:V.number||n.number,templateId:V.templateId||n.templateId,...V.id?{id:V.id}:{}},{token:L.token})}else null==(a=null==(r=L.externalOptionConfig)?void 0:r.onSelect)||a.call(r,t,e);break}}},Q=()=>{C.visible=!1,O("clickoutside")},W=()=>(C.isInited=!1,C.spinning=!1,setTimeout((()=>{C.visible=!1}),0),!1),X=(t,e,r)=>{const a={};return e.forEach((e=>{let n=((t,e)=>{let r=t.defaultValue||"",a=e;return"NUMBER"===t.type&&(a=Number(e)||0),"DATE"===t.type&&(a=e?x(e,"YYYY-MM-DD"):""),"DATETIME"===t.type&&(a=e?x(e,"YYYY-MM-DD HH:mm:ss"):""),r||a})(e,t[e[r]]);t[e[r]]&&n&&(a[e[r]]=n)})),a},Z=({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(X(r,e,"fieldName"))}})),a=Object.assign({},a,X(r,e,"key")),a})),tt=async t=>{var e;if(C.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):[],C.currentFormatId=await(async(t,e)=>{var r;if(!(null==t?void 0:t.length))return"";const{data:a}=await j({templateId:t[0].templateId},{token:L.token});if("SUCCESS"===a.result){const{formatForms:e=[]}=a.map||{};Object.assign(V,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})(C.formatList,"defaultFlag"),!C.currentFormatId)return N.error("获取打印格式失败,请联系管理员!"),W();(()=>{const t=C.formatList.map((t=>({label:t.name,key:t.id})));Y.unshift({label:B.value,key:"format",children:t})})();let r=null==(e=await L.queryTemplateParams())?void 0:e.obj;if(!r||!J.value)return N.error("获取打印模板失败,请联系管理员!"),W();C.templateParams=r,C.printParams=Z(C.templateParams,L.params)},et=async()=>{if(C.isInited)return!0;C.isInited=!0,C.spinning=!0,(()=>{if(M)return!1;M=new w})();const t=await L.queryPrintFormatByNumber();return await tt(t),C.spinning=!1,!0},rt=async(t=!0)=>{var e;if(await L.clickPrevFn())if(null==(e=L.params)?void 0:e.length){if(!C.visible){if(!await et())return!1}t&&(C.visible=!C.visible)}else N.warning(L.noDataMsg)},at=()=>{C.watchPrintParamsReformatFn&&C.watchPrintParamsReformatFn(),C.isInited?C.printParams=Z(C.templateParams,L.params):C.watchPrintParamsReformatFn=()=>i((()=>C.isInited),(t=>{if(!t)return!1;at()}))},nt=t=>{if(C.identityVerification.visible=!1,k(C.currentFormatId))return q(null,"edit");const e={formatId:C.currentFormatId,templateId:J.value,params:H(),token:t};M.editPrintFormat(e,(t=>{q(t,"edit")}),_)};async function it(){await rt(!1),G()}return a((()=>{C.isInited=!1})),n((()=>{null==M||M.destroy()})),i((()=>L.params),(t=>{if(!(null==t?void 0:t.length))return!1;at()}),{deep:!0}),D({directPrint:it}),(e,r)=>(o(),s(l,null,[m(p(P),{class:"c-dropdown",placement:"bottom-start",trigger:"click",show:C.visible,onClickoutside:Q,options:Y,onSelect:K,"render-label":R},{default:d((()=>[u(e.$slots,"button",{handleClickPrintBtn:rt,printSpinning:C.spinning,printbtnText:t.btnText,printVisible:C.visible},(()=>[m(p(I),{class:"dropdown-button",onClick:r[1]||(r[1]=c((()=>A("button")),["stop"]))},{default:d((()=>[f(v(t.btnText)+" ",1),m(p(h),{component:p(F),style:{"margin-left":"5px"},onClick:r[0]||(r[0]=c((()=>A("icon")),["stop"]))},null,8,["component"])])),_:1})]))])),_:3},8,["show","options"]),m(T,y(e.$attrs,{modelValue:C.identityVerification.visible,"onUpdate:modelValue":r[2]||(r[2]=t=>C.identityVerification.visible=t),formatId:C.currentFormatId,templateId:p(J),onSuccess:nt}),null,16,["modelValue","formatId","templateId"])],64))}});export{D as default};
@@ -1 +1 @@
1
- import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as n}from"./dialog.js";import{getFileUrl as s,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{format as l}from"date-fns";const d=t.create({timeout:1e3,withCredentials:!1}),h=`${window.location.protocol}//${window.location.host}`,c=`${h}/fdp-api/print/assembly/printIReport`,p=`${h}/bi-api/reprot/print/open/client/getRemote`,u=`${h}/printService/file`;let m=null;class w{constructor(){var t;if(this.webview=null,this.dialog=new i,this.dialogPreview=new n,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.messageHandlerQueue=[],m)return m;m=this;const e=window;this.webview=null==(t=e.chrome)?void 0:t.webview,this.webview&&(this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler),this.postMessage({exec:"config",data:""}))}messageHandler(t){var e;const i=this.messageHandlerQueue.shift();if(!i)return console.log("当前回执",t,"没有可用的handler");const{resolve:n,reject:s}=i;try{const{exec:i}=JSON.parse(t.data);"config"===i&&(this.downloadPath=(null==(e=JSON.parse(t.data).res)?void 0:e.downloadpath)||""),console.log(t),n(JSON.parse(t.data).res)}catch(t){s(t)}}async postMessage(t){return this.webview?new Promise(((e,i)=>{this.messageHandlerQueue.push({resolve:e,reject:i}),this.webview.postMessage(t)})):Promise.reject()}destroy(){this.webview&&this.currentMessageHandler&&(this.webview.removeEventListener("message",this.currentMessageHandler),this.currentMessageHandler=void 0)}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{d({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}}):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:n(i)}):d({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[n]}).then((({data:t})=>t));function n(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleResult(t,e){if("success"!==t.result){const i={type:"printError",message:t.message||t.Message,result:t.result,errinfo:t.errinfo};return null==e||e(i),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,n){const s={templateId:t,formatId:e,params:i,cmdid:"7"},r=await this._queryServicesPrint(s);return this._handleQueryPrintDataResult(r,e,n)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:n,print:s,printdlgshow:r="1",nobillnode:a="1",btnprint:o="1"}){const d={templateId:t,formatId:e,params:i,cmdid:n,nobillnode:a,printdlgshow:r,btnprint:o};if(s){try{s=JSON.parse(s)}catch(t){}d.print=s}else if(this.isRemote){const t=l(new Date,"yyyyMMddHHmmss");d.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return await this._queryServicesPrint(d)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:n}){const s={};let r={};try{r=Object.assign({},s,JSON.parse(i))}catch(t){r=s}const a={templateId:t,formatId:e,cmdid:"9",token:n,params:JSON.stringify(r)};return await this._queryServicesPrint(a)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await d({method:"get",url:p})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=h+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await d({method:"post",url:c,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,n=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=n[n.length-2],o=n[n.length-1],l=await s(`${u}/${a}/${o}`),d=r(null,e,l);if("preview"===e)return d}}async preview({templateId:t,formatId:e,params:i="",btnprint:n},s,l){if(a(e)){const t=await this._queryPrintFile(e,i);if(!t)return null==l?void 0:l("获取文件失败!");const n=r(t,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,n),void(null==s||s({file:t}))}await this._queryProxyOrigin();const d=await this._testConnection();if(!this._handleResultTest(d,l))return!1;const h=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",btnprint:n});if(!h)return!1;const c=this._handleResult(h,l);if(!c)return!1;if(this.isRemote){const t=await this._browserPrint(c,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}s&&s(c)}async printDirect({templateId:t,formatId:e,params:i="",print:n,printdlgshow:s,nobillnode:o,isDownloadFile:l=!0},d,h,c="printDirect"){if(a(e)){const t=await this._queryPrintFile(e,i);return t?(r(t,c),void(null==d||d({file:t}))):null==h?void 0:h("获取文件失败!")}await this._queryProxyOrigin();const p=await this._testConnection();if(!this._handleResultTest(p,h))return!1;const u=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:n,printdlgshow:s,nobillnode:o});if(!u)return!1;const m=this._handleResult(u,h);if(!m)return!1;l&&["downloadPDF"].includes(c)&&await this._browserPrint(m,c),null==d||d(m)}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):d.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}downloadPDF(t,i,n){this.webview&&this.downloadPath&&(t.print.filename=this.downloadPath.replace(/\\/g,"/")),this.printDirect(t,(async s=>{if(s||n(null),a(t.formatId))return i(s);const r=this,o=await async function(t){const i=[],n=JSON.parse(t);if(!e(n))return await r._downloadPDF("");if(1===n.length)return await r._downloadPDF(n[0]||"");for(let t=0,e=n.length;t<e;t++)i.push(await r._downloadPDF(n[t]||""));return i}(s.filedir);i(o,s)}),(t=>n(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this.queryPrintData({templateId:t,formatId:e,params:i},void 0,s);if(!a)return!1;const o=this.printFileData({formatId:e,file:a.file,printerName:a.printerName},void 0,s);if(!o)return!1;n&&n(o)}async queryPrintData({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventQueryPrintData(t,e,i,s);return!!a&&(n&&n(a),a)}async printFileData({formatId:t,file:e,printerName:i="Default"},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,s);return!!o&&(n&&n(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:n},s,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:n}),l=this._handleResult(o,r);if(!l)return!1;s&&s(l)}async addPrintFormat({templateId:t,params:e,token:i},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,s);if(!o)return!1;n&&n(o)}}export{w as Print};
1
+ import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as n}from"./dialog.js";import{getFileUrl as s,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{format as l}from"date-fns";const d=t.create({timeout:1e3,withCredentials:!1}),h=`${window.location.protocol}//${window.location.host}`,c=`${h}/fdp-api/print/assembly/printIReport`,p=`${h}/bi-api/reprot/print/open/client/getRemote`,u=`${h}/printService/file`;let m=null;class w{constructor(){var t;if(this.webview=null,this.dialog=new i,this.dialogPreview=new n,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.messageHandlerQueue=[],m)return m;m=this;const e=window;this.webview=null==(t=e.chrome)?void 0:t.webview,this.webview&&(this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler),this.postMessage({exec:"config",data:""}))}messageHandler(t){var e;const i=this.messageHandlerQueue.shift();if(!i)return console.log("当前回执",t,"没有可用的handler");const{resolve:n,reject:s}=i;try{console.log(t);const i=JSON.parse(t.data||"{}");"config"===i.exec&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||""),i.res?n(i.res):s(t)}catch(t){s(t)}}async postMessage(t){return this.webview?new Promise(((e,i)=>{this.messageHandlerQueue.push({resolve:e,reject:i}),this.webview.postMessage(t)})):Promise.reject()}destroy(){this.webview&&this.currentMessageHandler&&(this.webview.removeEventListener("message",this.currentMessageHandler),this.currentMessageHandler=void 0)}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{d({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}}):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:n(i)}):d({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[n]}).then((({data:t})=>t));function n(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleResult(t,e){if("success"!==t.result){const i={type:"printError",message:t.message||t.Message,result:t.result,errinfo:t.errinfo};return null==e||e(i),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,n){const s={templateId:t,formatId:e,params:i,cmdid:"7"},r=await this._queryServicesPrint(s);return this._handleQueryPrintDataResult(r,e,n)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:n,print:s,printdlgshow:r="1",nobillnode:a="1",btnprint:o="1"}){const d={templateId:t,formatId:e,params:i,cmdid:n,nobillnode:a,printdlgshow:r,btnprint:o};if(s){try{s=JSON.parse(s)}catch(t){}d.print=s}else if(this.isRemote){const t=l(new Date,"yyyyMMddHHmmss");d.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return await this._queryServicesPrint(d)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:n}){const s={};let r={};try{r=Object.assign({},s,JSON.parse(i))}catch(t){r=s}const a={templateId:t,formatId:e,cmdid:"9",token:n,params:JSON.stringify(r)};return await this._queryServicesPrint(a)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await d({method:"get",url:p})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=h+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await d({method:"post",url:c,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,n=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=n[n.length-2],o=n[n.length-1],l=await s(`${u}/${a}/${o}`),d=r(null,e,l);if("preview"===e)return d}}async preview({templateId:t,formatId:e,params:i="",btnprint:n},s,l){if(a(e)){const t=await this._queryPrintFile(e,i);if(!t)return null==l?void 0:l("获取文件失败!");const n=r(t,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,n),void(null==s||s({file:t}))}await this._queryProxyOrigin();const d=await this._testConnection();if(!this._handleResultTest(d,l))return!1;const h=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",btnprint:n});if(!h)return!1;const c=this._handleResult(h,l);if(!c)return!1;if(this.isRemote){const t=await this._browserPrint(c,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}s&&s(c)}async printDirect({templateId:t,formatId:e,params:i="",print:n,printdlgshow:s,nobillnode:o,isDownloadFile:l=!0},d,h,c="printDirect"){if(a(e)){const t=await this._queryPrintFile(e,i);return t?(r(t,c),void(null==d||d({file:t}))):null==h?void 0:h("获取文件失败!")}await this._queryProxyOrigin();const p=await this._testConnection();if(!this._handleResultTest(p,h))return!1;const u=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:n,printdlgshow:s,nobillnode:o});if(!u)return!1;const m=this._handleResult(u,h);if(!m)return!1;l&&["downloadPDF"].includes(c)&&await this._browserPrint(m,c),null==d||d(m)}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):d.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}downloadPDF(t,i,n){this.webview&&this.downloadPath&&(t.print.filename=this.downloadPath.replace(/\\/g,"/")),this.printDirect(t,(async s=>{if(s||n(null),a(t.formatId))return i(s);const r=this,o=await async function(t){const i=[],n=JSON.parse(t);if(!e(n))return await r._downloadPDF("");if(1===n.length)return await r._downloadPDF(n[0]||"");for(let t=0,e=n.length;t<e;t++)i.push(await r._downloadPDF(n[t]||""));return i}(s.filedir);i(o,s)}),(t=>n(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this.queryPrintData({templateId:t,formatId:e,params:i},void 0,s);if(!a)return!1;const o=this.printFileData({formatId:e,file:a.file,printerName:a.printerName},void 0,s);if(!o)return!1;n&&n(o)}async queryPrintData({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventQueryPrintData(t,e,i,s);return!!a&&(n&&n(a),a)}async printFileData({formatId:t,file:e,printerName:i="Default"},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,s);return!!o&&(n&&n(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:n},s,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:n}),l=this._handleResult(o,r);if(!l)return!1;s&&s(l)}async addPrintFormat({templateId:t,params:e,token:i},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,s);if(!o)return!1;n&&n(o)}}export{w as Print};
@@ -60,7 +60,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
60
60
  originalSetting?: {
61
61
  [x: string]: any;
62
62
  val_key: string;
63
- html_type: "LINEBAR" | ({} & string) | "INPUT" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
63
+ html_type: "LINEBAR" | ({} & string) | "INPUT" | "TEXTAREA" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
64
64
  annotation?: boolean | undefined;
65
65
  val_key_unit?: string | undefined;
66
66
  is_edit?: import("..").FormCommonState | undefined;
@@ -79,6 +79,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
79
79
  vali_obj?: string | undefined;
80
80
  max_value?: string | number | undefined;
81
81
  min_value?: string | number | undefined;
82
+ min_date?: string | undefined;
83
+ max_date?: string | undefined;
82
84
  min_length?: string | number | undefined;
83
85
  max_length?: string | number | undefined;
84
86
  decimal_length?: string | number | undefined;
@@ -161,6 +163,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
161
163
  is_not_fold?: string | undefined;
162
164
  remark?: string | undefined;
163
165
  free_entry?: import("..").FormCommonState | undefined;
166
+ initialize_high?: number | undefined;
164
167
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
165
168
  content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
166
169
  lazyRequest?: boolean | undefined;
@@ -1753,7 +1756,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
1753
1756
  originalSetting?: {
1754
1757
  [x: string]: any;
1755
1758
  val_key: string;
1756
- html_type: "LINEBAR" | ({} & string) | "INPUT" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
1759
+ html_type: "LINEBAR" | ({} & string) | "INPUT" | "TEXTAREA" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
1757
1760
  annotation?: boolean | undefined;
1758
1761
  val_key_unit?: string | undefined;
1759
1762
  is_edit?: import("..").FormCommonState | undefined;
@@ -1772,6 +1775,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
1772
1775
  vali_obj?: string | undefined;
1773
1776
  max_value?: string | number | undefined;
1774
1777
  min_value?: string | number | undefined;
1778
+ min_date?: string | undefined;
1779
+ max_date?: string | undefined;
1775
1780
  min_length?: string | number | undefined;
1776
1781
  max_length?: string | number | undefined;
1777
1782
  decimal_length?: string | number | undefined;
@@ -1854,6 +1859,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
1854
1859
  is_not_fold?: string | undefined;
1855
1860
  remark?: string | undefined;
1856
1861
  free_entry?: import("..").FormCommonState | undefined;
1862
+ initialize_high?: number | undefined;
1857
1863
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
1858
1864
  content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
1859
1865
  lazyRequest?: boolean | undefined;
@@ -3655,6 +3661,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3655
3661
  linebarAutoHidden: {
3656
3662
  type: BooleanConstructor;
3657
3663
  };
3664
+ bordered: {
3665
+ type: BooleanConstructor;
3666
+ default: boolean;
3667
+ };
3658
3668
  }, {
3659
3669
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
3660
3670
  fieldList: {
@@ -3783,6 +3793,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3783
3793
  linebarAutoHidden: {
3784
3794
  type: BooleanConstructor;
3785
3795
  };
3796
+ bordered: {
3797
+ type: BooleanConstructor;
3798
+ default: boolean;
3799
+ };
3786
3800
  }>> & {
3787
3801
  onFormChange?: ((...args: any[]) => any) | undefined;
3788
3802
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -3938,7 +3952,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3938
3952
  exposeEvent: {
3939
3953
  validate(path?: string): Promise<void>;
3940
3954
  getFormValues(needCombineExtendKey?: boolean): any;
3941
- setFormValues(values: import("../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean): void;
3955
+ setFormValues(values: import("../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
3942
3956
  setFieldState(path: string, handler: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
3943
3957
  match: (pattern: import("@formily/path").Pattern) => boolean;
3944
3958
  validate: (triggerType?: import("@formily/validator").ValidatorTriggerType | undefined) => any;
@@ -4226,6 +4240,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4226
4240
  linebarAutoHidden: {
4227
4241
  type: BooleanConstructor;
4228
4242
  };
4243
+ bordered: {
4244
+ type: BooleanConstructor;
4245
+ default: boolean;
4246
+ };
4229
4247
  }>> & {
4230
4248
  onFormChange?: ((...args: any[]) => any) | undefined;
4231
4249
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -4241,6 +4259,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4241
4259
  consumer: boolean;
4242
4260
  enterToNextWidget: boolean | ((fieldItem: import("..").FieldItem) => boolean | void);
4243
4261
  linebarAutoHidden: boolean;
4262
+ bordered: boolean;
4244
4263
  }>;
4245
4264
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
4246
4265
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -4377,7 +4396,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4377
4396
  fieldList: import("vue").Ref<{
4378
4397
  [x: string]: any;
4379
4398
  val_key: string;
4380
- html_type: "LINEBAR" | ({} & string) | "INPUT" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
4399
+ html_type: "LINEBAR" | ({} & string) | "INPUT" | "TEXTAREA" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
4381
4400
  annotation?: boolean | undefined;
4382
4401
  val_key_unit?: string | undefined;
4383
4402
  is_edit?: import("..").FormCommonState | undefined;
@@ -4396,6 +4415,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4396
4415
  vali_obj?: string | undefined;
4397
4416
  max_value?: string | number | undefined;
4398
4417
  min_value?: string | number | undefined;
4418
+ min_date?: string | undefined;
4419
+ max_date?: string | undefined;
4399
4420
  min_length?: string | number | undefined;
4400
4421
  max_length?: string | number | undefined;
4401
4422
  decimal_length?: string | number | undefined;
@@ -4478,6 +4499,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4478
4499
  is_not_fold?: string | undefined;
4479
4500
  remark?: string | undefined;
4480
4501
  free_entry?: import("..").FormCommonState | undefined;
4502
+ initialize_high?: number | undefined;
4481
4503
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
4482
4504
  content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
4483
4505
  lazyRequest?: boolean | undefined;
@@ -6082,7 +6104,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
6082
6104
  originalSetting?: {
6083
6105
  [x: string]: any;
6084
6106
  val_key: string;
6085
- html_type: "LINEBAR" | ({} & string) | "INPUT" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
6107
+ html_type: "LINEBAR" | ({} & string) | "INPUT" | "TEXTAREA" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
6086
6108
  annotation?: boolean | undefined;
6087
6109
  val_key_unit?: string | undefined;
6088
6110
  is_edit?: import("..").FormCommonState | undefined;
@@ -6101,6 +6123,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
6101
6123
  vali_obj?: string | undefined;
6102
6124
  max_value?: string | number | undefined;
6103
6125
  min_value?: string | number | undefined;
6126
+ min_date?: string | undefined;
6127
+ max_date?: string | undefined;
6104
6128
  min_length?: string | number | undefined;
6105
6129
  max_length?: string | number | undefined;
6106
6130
  decimal_length?: string | number | undefined;
@@ -6183,6 +6207,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
6183
6207
  is_not_fold?: string | undefined;
6184
6208
  remark?: string | undefined;
6185
6209
  free_entry?: import("..").FormCommonState | undefined;
6210
+ initialize_high?: number | undefined;
6186
6211
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
6187
6212
  content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
6188
6213
  lazyRequest?: boolean | undefined;
@@ -7759,7 +7784,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
7759
7784
  originalSetting?: {
7760
7785
  [x: string]: any;
7761
7786
  val_key: string;
7762
- html_type: "LINEBAR" | ({} & string) | "INPUT" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
7787
+ html_type: "LINEBAR" | ({} & string) | "INPUT" | "TEXTAREA" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
7763
7788
  annotation?: boolean | undefined;
7764
7789
  val_key_unit?: string | undefined;
7765
7790
  is_edit?: import("..").FormCommonState | undefined;
@@ -7778,6 +7803,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
7778
7803
  vali_obj?: string | undefined;
7779
7804
  max_value?: string | number | undefined;
7780
7805
  min_value?: string | number | undefined;
7806
+ min_date?: string | undefined;
7807
+ max_date?: string | undefined;
7781
7808
  min_length?: string | number | undefined;
7782
7809
  max_length?: string | number | undefined;
7783
7810
  decimal_length?: string | number | undefined;
@@ -7860,6 +7887,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
7860
7887
  is_not_fold?: string | undefined;
7861
7888
  remark?: string | undefined;
7862
7889
  free_entry?: import("..").FormCommonState | undefined;
7890
+ initialize_high?: number | undefined;
7863
7891
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
7864
7892
  content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
7865
7893
  lazyRequest?: boolean | undefined;
@@ -9572,6 +9600,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
9572
9600
  linebarAutoHidden: {
9573
9601
  type: BooleanConstructor;
9574
9602
  };
9603
+ bordered: {
9604
+ type: BooleanConstructor;
9605
+ default: boolean;
9606
+ };
9575
9607
  }, {
9576
9608
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
9577
9609
  fieldList: {
@@ -9700,6 +9732,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
9700
9732
  linebarAutoHidden: {
9701
9733
  type: BooleanConstructor;
9702
9734
  };
9735
+ bordered: {
9736
+ type: BooleanConstructor;
9737
+ default: boolean;
9738
+ };
9703
9739
  }>> & {
9704
9740
  onFormChange?: ((...args: any[]) => any) | undefined;
9705
9741
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -9855,7 +9891,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
9855
9891
  exposeEvent: {
9856
9892
  validate(path?: string): Promise<void>;
9857
9893
  getFormValues(needCombineExtendKey?: boolean): any;
9858
- setFormValues(values: import("../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean): void;
9894
+ setFormValues(values: import("../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
9859
9895
  setFieldState(path: string, handler: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
9860
9896
  match: (pattern: import("@formily/path").Pattern) => boolean;
9861
9897
  validate: (triggerType?: import("@formily/validator").ValidatorTriggerType | undefined) => any;
@@ -10143,6 +10179,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
10143
10179
  linebarAutoHidden: {
10144
10180
  type: BooleanConstructor;
10145
10181
  };
10182
+ bordered: {
10183
+ type: BooleanConstructor;
10184
+ default: boolean;
10185
+ };
10146
10186
  }>> & {
10147
10187
  onFormChange?: ((...args: any[]) => any) | undefined;
10148
10188
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -10158,6 +10198,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
10158
10198
  consumer: boolean;
10159
10199
  enterToNextWidget: boolean | ((fieldItem: import("..").FieldItem) => boolean | void);
10160
10200
  linebarAutoHidden: boolean;
10201
+ bordered: boolean;
10161
10202
  }>;
10162
10203
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
10163
10204
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{