cloud-web-corejs 1.0.54-dev.8 → 1.0.54-dev.800

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 (804) hide show
  1. package/package.json +203 -177
  2. package/src/App.vue +73 -75
  3. package/src/api/user.js +85 -40
  4. package/src/components/Qrcode/fileParse.vue +0 -1
  5. package/src/components/Tinymce/index.vue +112 -71
  6. package/src/components/VabUpload/fileLibraryDialog.vue +296 -0
  7. package/src/components/VabUpload/image-viewer.vue +2 -2
  8. package/src/components/VabUpload/index.js +69 -1
  9. package/src/components/VabUpload/index.vue +242 -230
  10. package/src/components/VabUpload/mixins/fileLibraryDialog.js +1112 -0
  11. package/src/components/VabUpload/mixins.js +1971 -9
  12. package/src/components/VabUpload/privateProfileDialog.vue +2 -2
  13. package/src/components/VabUpload/propertiesDialog.vue +1 -1
  14. package/src/components/VabUpload/view.vue +209 -119
  15. package/src/components/advancedSearchDialog/mixins.js +28 -1
  16. package/src/components/base-textarea/index.vue +104 -0
  17. package/src/components/baseAlert/index.js +44 -1
  18. package/src/components/baseAlert/index.vue +24 -20
  19. package/src/components/baseAlert/mixins.js +61 -1
  20. package/src/components/baseArea/index.vue +1628 -0
  21. package/src/components/baseAttachment/index.vue +49 -40
  22. package/src/components/baseAttachment/install.js +21 -5
  23. package/src/components/baseAttachment/mixins.js +310 -1
  24. package/src/components/baseInputBatch/mixins.js +58 -1
  25. package/src/components/baseInputExport/index.vue +21 -14
  26. package/src/components/baseInputExport/mixins.js +415 -8
  27. package/src/components/baseInputNumber/index.vue +9 -9
  28. package/src/components/baseTabs/index.vue +16 -8
  29. package/src/components/baseTabs/mixins.js +176 -1
  30. package/src/components/bizTab/BizBillActions.vue +129 -0
  31. package/src/components/bizTab/BizTabListPage.vue +391 -0
  32. package/src/components/bizTab/README.md +378 -0
  33. package/src/components/bizTab/billTableUtil.js +48 -0
  34. package/src/components/bizTab/billValidators.js +136 -0
  35. package/src/components/bizTab/bizBillDetailMixin.js +687 -0
  36. package/src/components/bizTab/index.js +24 -0
  37. package/src/components/cnPrint/index.js +44 -1
  38. package/src/components/cnPrint/mixins.js +189 -1
  39. package/src/components/code-editor/async.js +29 -0
  40. package/src/components/code-editor/index.vue +190 -62
  41. package/src/components/confirmDialog/index.js +41 -1
  42. package/src/components/confirmDialog/index.vue +24 -17
  43. package/src/components/confirmDialog/mixins.js +31 -1
  44. package/src/components/errorMsg/index.js +47 -3
  45. package/src/components/errorMsg/index.vue +78 -70
  46. package/src/components/errorMsg/mixins.js +103 -5
  47. package/src/components/excelExport/button.vue +86 -24
  48. package/src/components/excelExport/exportFieldDialog.vue +373 -113
  49. package/src/components/excelExport/exportType.js +49 -0
  50. package/src/components/excelExport/index.js +43 -9
  51. package/src/components/excelExport/index.vue +113 -28
  52. package/src/components/excelExport/mixins.js +1153 -722
  53. package/src/components/excelImport/index.js +75 -13
  54. package/src/components/excelImport/index.vue +2 -1
  55. package/src/components/excelImport/mixins.js +841 -8
  56. package/src/components/fileLibrary/categoryMoveDialog.vue +109 -109
  57. package/src/components/fileLibrary/fileHistoryDialog.vue +1 -1
  58. package/src/components/fileLibrary/fileObjAuthDialog.vue +297 -186
  59. package/src/components/fileLibrary/fileObjAuthEdit.vue +1 -1
  60. package/src/components/fileLibrary/fileObjAuthEditDialog.vue +7 -1
  61. package/src/components/fileLibrary/fileObjNotifyEdit.vue +192 -0
  62. package/src/components/fileLibrary/filterDialog.vue +454 -0
  63. package/src/components/fileLibrary/index.vue +1109 -687
  64. package/src/components/fileLibrary/mixins/categoryMoveDialogMixins.js +1 -1
  65. package/src/components/fileLibrary/mixins/fileCategoryDialogMixins.js +1 -1
  66. package/src/components/fileLibrary/mixins/fileHistoryDialogMixins.js +2 -2
  67. package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +341 -207
  68. package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +33 -26
  69. package/src/components/fileLibrary/mixins/fileObjAuthEditMixin.js +5 -5
  70. package/src/components/fileLibrary/mixins/indexMixins.js +255 -112
  71. package/src/components/fileLibrary/mixins/propertiesDialogMixins.js +64 -4
  72. package/src/components/fileLibrary/mixins/recycleBinDialogMixins.js +3 -3
  73. package/src/components/fileLibrary/propertiesDialog.vue +190 -145
  74. package/src/components/fileLibrary/recycleBinDialog.vue +237 -236
  75. package/src/components/fileLibrary/shareDialog.vue +1 -1
  76. package/src/components/formDialog/README.md +371 -0
  77. package/src/components/formDialog/actionButtons.js +90 -0
  78. package/src/components/formDialog/index.js +48 -0
  79. package/src/components/formDialog/index.vue +802 -0
  80. package/src/components/formDrawer/drawer.vue +722 -0
  81. package/src/components/formDrawer/index.js +50 -0
  82. package/src/components/formOplog/mixins.js +85 -4
  83. package/src/components/hiprint/css/bootstrap.min.css +6 -0
  84. package/src/components/hiprint/fonts/glyphicons-halflings-regular.eot +0 -0
  85. package/src/components/hiprint/fonts/glyphicons-halflings-regular.svg +288 -0
  86. package/src/components/hiprint/fonts/glyphicons-halflings-regular.ttf +0 -0
  87. package/src/components/hiprint/fonts/glyphicons-halflings-regular.woff +0 -0
  88. package/src/components/hiprint/fonts/glyphicons-halflings-regular.woff2 +0 -0
  89. package/src/components/hiprint/hiprint.bundle.js +15 -3
  90. package/src/components/hiprint/view/design/index.vue +146 -48
  91. package/src/components/hiprint/view/design/mixins.js +611 -1
  92. package/src/components/hiprint/view/design/preview.vue +75 -52
  93. package/src/components/hiprint/view/json-view.vue +31 -31
  94. package/src/components/jdPrint/index.js +44 -1
  95. package/src/components/jdPrint/mixins.js +208 -1
  96. package/src/components/jsonImport/exportUtil.js +106 -0
  97. package/src/components/jsonImport/index.js +212 -17
  98. package/src/components/jsonImport/mixins.js +350 -16
  99. package/src/components/langImport/index.js +80 -1
  100. package/src/components/langImport/mixins.js +487 -1
  101. package/src/components/langTag/mixins/addButton.js +51 -5
  102. package/src/components/langTag/mixins/deleteButton.js +55 -5
  103. package/src/components/langTag/mixins/view.js +47 -5
  104. package/src/components/luckysheet/dialog.vue +159 -0
  105. package/src/components/luckysheet/export.js +595 -0
  106. package/src/components/luckysheet/fileUtils.js +147 -0
  107. package/src/components/luckysheet/index.js +72 -0
  108. package/src/components/luckysheet/templateJson.js +12078 -0
  109. package/src/components/luckysheet/view.vue +210 -0
  110. package/src/components/micro-view-host/contract.js +66 -0
  111. package/src/components/micro-view-host/index.vue +148 -0
  112. package/src/components/mobile/file/index.vue +10 -0
  113. package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +51 -47
  114. package/src/components/obsUpload/index.js +34 -0
  115. package/src/components/obsUpload/index.vue +234 -0
  116. package/src/components/obsUpload/mixins.js +1542 -0
  117. package/src/components/onlineTalk/index.vue +328 -6
  118. package/src/components/onlineTalk/mixins.js +852 -1
  119. package/src/components/onlineTalk/talkUserDialog.vue +280 -0
  120. package/src/components/oplogTable/mixins.js +83 -4
  121. package/src/components/pddPrint/index.js +44 -1
  122. package/src/components/pddPrint/mixins.js +252 -1
  123. package/src/components/projectTag/mixins/addButton.js +52 -1
  124. package/src/components/projectTag/mixins/deleteButton.js +52 -1
  125. package/src/components/projectTag/mixins/view.js +43 -1
  126. package/src/components/scriptDescription/button.vue +12 -4
  127. package/src/components/scriptDescription/mixins.js +30 -1
  128. package/src/components/scriptTest/mixins.js +90 -1
  129. package/src/components/statusTag/mixins.js +66 -1
  130. package/src/components/table/CellSlot.vue +12 -9
  131. package/src/components/table/config.js +74 -1
  132. package/src/components/table/index.js +1220 -10
  133. package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js +11028 -0
  134. package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css +200 -0
  135. package/src/components/table/tableForm.vue +102 -64
  136. package/src/components/table/tableFormMixin.js +285 -1
  137. package/src/components/table/util/index.js +337 -0
  138. package/src/components/table/vxeFilter/index.js +153 -1
  139. package/src/components/table/vxeFilter/mixin.js +310 -6
  140. package/src/components/tempStorage/index.vue +76 -55
  141. package/src/components/tempStorage/tempStorageDialog.vue +179 -54
  142. package/src/components/vb-tabs/x-tabs.vue +167 -112
  143. package/src/components/vipPrint/index.js +44 -1
  144. package/src/components/vipPrint/mixins.js +268 -1
  145. package/src/components/wf/addOpinionButton.vue +57 -0
  146. package/src/components/wf/addTaskUserdialog.vue +1 -1
  147. package/src/components/wf/content.vue +834 -362
  148. package/src/components/wf/content2.vue +4 -2
  149. package/src/components/wf/mixins/addOpinionButton.js +53 -0
  150. package/src/components/wf/mixins/setCandidateButton.js +161 -0
  151. package/src/components/wf/mixins/setCandidateDialog.js +217 -5
  152. package/src/components/wf/mixins/setCandidateDialog2.js +252 -0
  153. package/src/components/wf/mixins/wfFlowEleScriptDialog.js +131 -0
  154. package/src/components/wf/mixins/wfTaskUserRangeDialog.js +69 -0
  155. package/src/components/wf/setCandidateButton.vue +40 -0
  156. package/src/components/wf/setCandidateDialog.vue +10 -0
  157. package/src/components/wf/setCandidateDialog2.vue +105 -0
  158. package/src/components/wf/wf.js +2242 -30
  159. package/src/components/wf/wfButtonName.js +60 -0
  160. package/src/components/wf/wfFlowEleScriptDialog.vue +89 -0
  161. package/src/components/wf/wfStartDialog.vue +66 -42
  162. package/src/components/wf/wfTaskUserRangeDialog.vue +65 -0
  163. package/src/components/wf/wfUtil.js +327 -13
  164. package/src/components/xform/XFormTabContainer//346/226/260/345/242/236/351/241/265/347/255/276/346/250/241/345/274/217-/346/234/200/347/273/210/345/256/236/347/216/260.md +195 -0
  165. package/src/components/xform/docs/2026-07 table/344/270/216excelExport/344/277/256/345/244/215/345/217/212/345/257/274/345/207/272/344/274/230/345/214/226.md" +57 -0
  166. package/src/components/xform/docs/2026-07 /346/216/222/346/237/245/344/277/256/345/244/215/350/256/260/345/275/225.md" +73 -0
  167. package/src/components/xform/docs/2026-08 /345/210/227/350/241/250/345/257/274/345/207/272/350/204/261/346/225/217/345/210/227/345/211/224/351/231/244/350/220/275/345/234/260/346/226/207/346/241/243.md" +173 -0
  168. package/src/components/xform/docs/autocomplete /350/207/252/345/212/250/345/256/214/346/210/220/347/273/204/344/273/266/350/257/264/346/230/216.md" +126 -0
  169. package/src/components/xform/docs//345/220/216/345/217/260/345/255/227/346/256/265/357/274/210/345/212/250/346/200/201/347/224/237/346/210/220/357/274/211JSON /350/257/264/346/230/216.md" +1286 -0
  170. package/src/components/xform/docs//345/257/271/346/257/224/345/212/237/350/203/275/350/220/275/345/234/260/346/226/271/346/241/210.md +986 -0
  171. package/src/components/xform/docs//346/225/260/346/215/256/350/241/250/346/240/274/345/212/250/346/200/201/345/210/227 JSON /350/257/264/346/230/216.md" +657 -0
  172. package/src/components/xform/docs//346/240/221/350/241/250rowField/346/224/266/346/225/233-/350/220/275/345/234/260/346/226/207/346/241/243.md +1427 -0
  173. package/src/components/xform/form-designer/designer.js +2080 -29
  174. package/src/components/xform/form-designer/form-widget/components/gantt/index.vue +434 -0
  175. package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +108 -1
  176. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +291 -8
  177. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +15 -2
  178. package/src/components/xform/form-designer/form-widget/container-widget/detail-pane-widget.vue +3 -2
  179. package/src/components/xform/form-designer/form-widget/container-widget/detail-plain-widget.vue +76 -0
  180. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +62 -8
  181. package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog copy.vue +971 -0
  182. package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog.vue +971 -0
  183. package/src/components/xform/form-designer/form-widget/dialog/exportDialog.vue +13 -0
  184. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +320 -0
  185. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +209 -50
  186. package/src/components/xform/form-designer/form-widget/dialog/formFieldDialog.vue +3 -3
  187. package/src/components/xform/form-designer/form-widget/dialog/formulaDialog.vue +799 -0
  188. package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +38 -7
  189. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1774 -17
  190. package/src/components/xform/form-designer/form-widget/dialog/preformDialog.vue +2 -2
  191. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +224 -77
  192. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +3 -3
  193. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +67 -54
  194. package/src/components/xform/form-designer/form-widget/field-widget/a-text-widget.vue +1 -1
  195. package/src/components/xform/form-designer/form-widget/field-widget/area-select-widget.vue +272 -0
  196. package/src/components/xform/form-designer/form-widget/field-widget/autocomplete-widget.vue +119 -0
  197. package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +273 -180
  198. package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +76 -66
  199. package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +209 -90
  200. package/src/components/xform/form-designer/form-widget/field-widget/census-widget.vue +41 -35
  201. package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +18 -7
  202. package/src/components/xform/form-designer/form-widget/field-widget/color-widget.vue +4 -1
  203. package/src/components/xform/form-designer/form-widget/field-widget/copy_button-widget.vue +104 -0
  204. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +15 -3
  205. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +70 -7
  206. package/src/components/xform/form-designer/form-widget/field-widget/download-button-widget.vue +133 -0
  207. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-item-widget.vue +86 -0
  208. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-widget.vue +170 -0
  209. package/src/components/xform/form-designer/form-widget/field-widget/echart-bar-widget.vue +1 -1
  210. package/src/components/xform/form-designer/form-widget/field-widget/echart-category-widget.vue +1 -1
  211. package/src/components/xform/form-designer/form-widget/field-widget/echart-pie-widget.vue +1 -1
  212. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1977 -16
  213. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +608 -108
  214. package/src/components/xform/form-designer/form-widget/field-widget/gantt-widget.vue +964 -0
  215. package/src/components/xform/form-designer/form-widget/field-widget/html-text-widget.vue +6 -2
  216. package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +22 -11
  217. package/src/components/xform/form-designer/form-widget/field-widget/import2-button-widget.vue +90 -0
  218. package/src/components/xform/form-designer/form-widget/field-widget/input-widget.vue +7 -2
  219. package/src/components/xform/form-designer/form-widget/field-widget/mixins/autocomplete-mixin.js +451 -0
  220. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +222 -0
  221. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +52 -17
  222. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +64 -97
  223. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +16 -9
  224. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +92 -0
  225. package/src/components/xform/form-designer/form-widget/field-widget/mixins/utc-transform-mixin.js +75 -0
  226. package/src/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin.js +192 -0
  227. package/src/components/xform/form-designer/form-widget/field-widget/multiSearch-widget.vue +53 -0
  228. package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +119 -81
  229. package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +186 -0
  230. package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +55 -28
  231. package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +119 -0
  232. package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +156 -54
  233. package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +26 -6
  234. package/src/components/xform/form-designer/form-widget/field-widget/save_submit_wf_button-widget.vue +115 -0
  235. package/src/components/xform/form-designer/form-widget/field-widget/script-input-widget.vue +149 -0
  236. package/src/components/xform/form-designer/form-widget/field-widget/search_button-widget.vue +2 -2
  237. package/src/components/xform/form-designer/form-widget/field-widget/select-export-button-widget.vue +86 -0
  238. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +120 -0
  239. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +24 -9
  240. package/src/components/xform/form-designer/form-widget/field-widget/singerSearch-widget.vue +53 -0
  241. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +145 -0
  242. package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +16 -1
  243. package/src/components/xform/form-designer/form-widget/field-widget/static-text-widget.vue +8 -3
  244. package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +93 -49
  245. package/src/components/xform/form-designer/form-widget/field-widget/switch-widget.vue +9 -1
  246. package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +42 -37
  247. package/src/components/xform/form-designer/form-widget/field-widget/tempStorage-widget.vue +147 -0
  248. package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +111 -34
  249. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +4 -3
  250. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +45 -5
  251. package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +3 -171
  252. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +338 -172
  253. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +753 -0
  254. package/src/components/xform/form-designer/form-widget/field-widget/vue-page-widget.vue +231 -0
  255. package/src/components/xform/form-designer/form-widget/index.vue +6 -1
  256. package/src/components/xform/form-designer/form-widget/indexMixin.js +184 -2
  257. package/src/components/xform/form-designer/index.vue +194 -191
  258. package/src/components/xform/form-designer/indexMixin.js +856 -24
  259. package/src/components/xform/form-designer/refMixinDesign.js +27 -28
  260. package/src/components/xform/form-designer/setting-panel/action-button-config-dialog.vue +241 -0
  261. package/src/components/xform/form-designer/setting-panel/dataSource-setting.vue +397 -397
  262. package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +602 -0
  263. package/src/components/xform/form-designer/setting-panel/form-setting.vue +1772 -626
  264. package/src/components/xform/form-designer/setting-panel/index.vue +313 -305
  265. package/src/components/xform/form-designer/setting-panel/indexMixin.js +370 -12
  266. package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +519 -236
  267. package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +5 -5
  268. package/src/components/xform/form-designer/setting-panel/property-editor/a-text-editor.vue +4 -4
  269. package/src/components/xform/form-designer/setting-panel/property-editor/alignType-editor.vue +1 -1
  270. package/src/components/xform/form-designer/setting-panel/property-editor/autoValueEnabled-editor.vue +38 -0
  271. package/src/components/xform/form-designer/setting-panel/property-editor/buttonIcon-editor.vue +14 -15
  272. package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +7 -1
  273. package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue +28 -0
  274. package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +41 -0
  275. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +124 -0
  276. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +737 -625
  277. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/edit-tree-button-group-config-dialog.vue +281 -0
  278. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +432 -0
  279. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/onCheckboxChange-editor.vue +1 -1
  280. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +1632 -579
  281. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +96 -74
  282. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-pane/detail-pane-editor.vue +3 -3
  283. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-plain/detail-plain-editor.vue +75 -0
  284. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/colHeight-editor.vue +1 -1
  285. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +1 -1
  286. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-height-editor.vue +1 -1
  287. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +2 -2
  288. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +2 -2
  289. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +2 -2
  290. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-span-editor.vue +4 -4
  291. package/src/components/xform/form-designer/setting-panel/property-editor/container-h5-card/h5-card-editor.vue +124 -124
  292. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +34 -46
  293. package/src/components/xform/form-designer/setting-panel/property-editor/container-panel/height-editor.vue +1 -1
  294. package/src/components/xform/form-designer/setting-panel/property-editor/container-panel/width-editor.vue +1 -1
  295. package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tab-customClass-editor.vue +119 -119
  296. package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tabClass-editor.vue +45 -45
  297. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +344 -0
  298. package/src/components/xform/form-designer/setting-panel/property-editor/container-table-cell/cellHeight-editor.vue +1 -1
  299. package/src/components/xform/form-designer/setting-panel/property-editor/container-table-cell/cellWidth-editor.vue +1 -1
  300. package/src/components/xform/form-designer/setting-panel/property-editor/container-tree/tree-customClass-editor.vue +32 -3
  301. package/src/components/xform/form-designer/setting-panel/property-editor/container-tree-pane/tree-pane-editor.vue +1 -1
  302. package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/cancelButtonLabel-editor.vue +1 -1
  303. package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/okButtonLabel-editor.vue +1 -1
  304. package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/title-editor.vue +1 -1
  305. package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/width-editor.vue +1 -1
  306. package/src/components/xform/form-designer/setting-panel/property-editor/containerClass-editor.vue +1 -1
  307. package/src/components/xform/form-designer/setting-panel/property-editor/copyButton-editor.vue +36 -0
  308. package/src/components/xform/form-designer/setting-panel/property-editor/customClass-editor.vue +1 -1
  309. package/src/components/xform/form-designer/setting-panel/property-editor/defaultValue-editor.vue +1 -1
  310. package/src/components/xform/form-designer/setting-panel/property-editor/descriptionsItems-editor.vue +4 -4
  311. package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +32 -0
  312. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +133 -0
  313. package/src/components/xform/form-designer/setting-panel/property-editor/dsName-editor.vue +1 -1
  314. package/src/components/xform/form-designer/setting-panel/property-editor/echartHeight-editor.vue +1 -1
  315. package/src/components/xform/form-designer/setting-panel/property-editor/endPlaceholder-editor.vue +1 -1
  316. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin.js +2 -2
  317. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onAfterConfirmFile-editor.vue +32 -0
  318. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +22 -7
  319. package/src/components/xform/form-designer/setting-panel/property-editor/field-accessUrl/accessUrl-editor.vue +2 -2
  320. package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaDataType-editor.vue +25 -0
  321. package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaMinLevel-editor.vue +50 -0
  322. package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaName-editor.vue +20 -0
  323. package/src/components/xform/form-designer/setting-panel/property-editor/field-autocomplete/autocomplete-vabSearchName-editor.vue +199 -0
  324. package/src/components/xform/form-designer/setting-panel/property-editor/field-baseAttachment/baseAttachment-fileTypes-editor.vue +23 -0
  325. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/addTableData-event-editor.vue +84 -85
  326. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/button-type-editor.vue +1 -1
  327. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindActions.js +262 -0
  328. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindEvent-editor.vue +97 -73
  329. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/form-host-event-editor.vue +188 -0
  330. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/icon-editor.vue +14 -15
  331. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -161
  332. package/src/components/xform/form-designer/setting-panel/property-editor/field-cascader/cascader-multiple-editor.vue +8 -3
  333. package/src/components/xform/form-designer/setting-panel/property-editor/field-cascader/checkStrictly-editor.vue +11 -13
  334. package/src/components/xform/form-designer/setting-panel/property-editor/field-cascader/showAllLevels-editor.vue +21 -0
  335. package/src/components/xform/form-designer/setting-panel/property-editor/field-common/keyName-editor.vue +74 -67
  336. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-dateLimit-editor.vue +179 -0
  337. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +21 -3
  338. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-format-editor.vue +1 -1
  339. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-type-editor.vue +1 -1
  340. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-valueFormat-editor.vue +1 -1
  341. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +27 -0
  342. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +1 -1
  343. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-format-editor.vue +1 -1
  344. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-type-editor.vue +1 -1
  345. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-valueFormat-editor.vue +1 -1
  346. package/src/components/xform/form-designer/setting-panel/property-editor/field-divider/contentPosition-editor.vue +1 -1
  347. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-item-editor.vue +21 -0
  348. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -0
  349. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +187 -71
  350. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +190 -88
  351. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +91 -46
  352. package/src/components/xform/form-designer/setting-panel/property-editor/field-file-upload/file-upload-fileTypes-editor.vue +44 -44
  353. package/src/components/xform/form-designer/setting-panel/property-editor/field-gantt/gantt-editor.vue +36 -0
  354. package/src/components/xform/form-designer/setting-panel/property-editor/field-html-text/htmlContent-editor.vue +29 -29
  355. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +79 -22
  356. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -0
  357. package/src/components/xform/form-designer/setting-panel/property-editor/field-number/controlsPosition-editor.vue +1 -1
  358. package/src/components/xform/form-designer/setting-panel/property-editor/field-picture-upload/picture-upload-fileTypes-editor.vue +44 -44
  359. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +115 -86
  360. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +115 -0
  361. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/highThreshold-editor.vue +1 -1
  362. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/lowThreshold-editor.vue +1 -1
  363. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +2 -2
  364. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-max-editor.vue +1 -1
  365. package/src/components/xform/form-designer/setting-panel/property-editor/field-script/script-editor.vue +4 -4
  366. package/src/components/xform/form-designer/setting-panel/property-editor/field-script-input/script-input-editor.vue +55 -0
  367. package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/fontSize-editor.vue +1 -1
  368. package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/preWrap-editor.vue +23 -0
  369. package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/textContent-editor.vue +2 -2
  370. package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +67 -41
  371. package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/activeText-editor.vue +1 -1
  372. package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/inactiveText-editor.vue +1 -1
  373. package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/switchWidth-editor.vue +1 -1
  374. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +56 -0
  375. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +74 -0
  376. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +28 -9
  377. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +21 -3
  378. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-format-editor.vue +1 -1
  379. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-timeLimit-editor.vue +53 -0
  380. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +1 -1
  381. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-format-editor.vue +1 -1
  382. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchField-editor.vue +2 -2
  383. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +15 -3
  384. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +33 -1
  385. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/vabUpload-fileTypes-editor.vue +23 -0
  386. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +66 -0
  387. package/src/components/xform/form-designer/setting-panel/property-editor/field-vue-page/vue-page-editor.vue +48 -0
  388. package/src/components/xform/form-designer/setting-panel/property-editor/fileMaxSize-editor.vue +1 -1
  389. package/src/components/xform/form-designer/setting-panel/property-editor/fileTypesEditorMixin.js +116 -0
  390. package/src/components/xform/form-designer/setting-panel/property-editor/fileTypesSelect.vue +176 -0
  391. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +108 -19
  392. package/src/components/xform/form-designer/setting-panel/property-editor/formatType-editor.vue +137 -0
  393. package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +972 -717
  394. package/src/components/xform/form-designer/setting-panel/property-editor/iconClass-editor.vue +1 -1
  395. package/src/components/xform/form-designer/setting-panel/property-editor/label-editor.vue +1 -1
  396. package/src/components/xform/form-designer/setting-panel/property-editor/labelAlign-editor.vue +1 -1
  397. package/src/components/xform/form-designer/setting-panel/property-editor/labelColor-editor.vue +21 -12
  398. package/src/components/xform/form-designer/setting-panel/property-editor/labelIconClass-editor.vue +17 -16
  399. package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +26 -26
  400. package/src/components/xform/form-designer/setting-panel/property-editor/labelTooltip-editor.vue +67 -13
  401. package/src/components/xform/form-designer/setting-panel/property-editor/labelWidth-editor.vue +1 -1
  402. package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +2 -2
  403. package/src/components/xform/form-designer/setting-panel/property-editor/max-editor.vue +1 -1
  404. package/src/components/xform/form-designer/setting-panel/property-editor/maxLength-editor.vue +1 -1
  405. package/src/components/xform/form-designer/setting-panel/property-editor/min-editor.vue +1 -1
  406. package/src/components/xform/form-designer/setting-panel/property-editor/minLength-editor.vue +1 -1
  407. package/src/components/xform/form-designer/setting-panel/property-editor/multiple-editor.vue +19 -14
  408. package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +2 -2
  409. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +178 -101
  410. package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +31 -0
  411. package/src/components/xform/form-designer/setting-panel/property-editor/placeholder-editor.vue +2 -2
  412. package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +2 -2
  413. package/src/components/xform/form-designer/setting-panel/property-editor/prefixIcon-editor.vue +14 -15
  414. package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +349 -0
  415. package/src/components/xform/form-designer/setting-panel/property-editor/required-editor.vue +10 -6
  416. package/src/components/xform/form-designer/setting-panel/property-editor/requiredHint-editor.vue +4 -4
  417. package/src/components/xform/form-designer/setting-panel/property-editor/rows-editor.vue +1 -1
  418. package/src/components/xform/form-designer/setting-panel/property-editor/showRuleFlag-editor.vue +1 -1
  419. package/src/components/xform/form-designer/setting-panel/property-editor/showViewButton-editor.vue +29 -0
  420. package/src/components/xform/form-designer/setting-panel/property-editor/space-editor-editor.vue +1 -1
  421. package/src/components/xform/form-designer/setting-panel/property-editor/startPlaceholder-editor.vue +1 -1
  422. package/src/components/xform/form-designer/setting-panel/property-editor/step-editor.vue +1 -1
  423. package/src/components/xform/form-designer/setting-panel/property-editor/styleTableClass-editor.vue +1 -1
  424. package/src/components/xform/form-designer/setting-panel/property-editor/styleTitClass-editor.vue +1 -1
  425. package/src/components/xform/form-designer/setting-panel/property-editor/suffixIcon-editor.vue +14 -15
  426. package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +42 -0
  427. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +304 -19
  428. package/src/components/xform/form-designer/setting-panel/property-editor/type-editor.vue +1 -1
  429. package/src/components/xform/form-designer/setting-panel/property-editor/uploadTip-editor.vue +1 -1
  430. package/src/components/xform/form-designer/setting-panel/property-editor/uploadURL-editor.vue +1 -1
  431. package/src/components/xform/form-designer/setting-panel/property-editor/urlValueEnabled-editor.vue +91 -0
  432. package/src/components/xform/form-designer/setting-panel/property-editor/utcTransformEnabled-editor.vue +19 -0
  433. package/src/components/xform/form-designer/setting-panel/property-editor/validation-editor.vue +3 -3
  434. package/src/components/xform/form-designer/setting-panel/property-editor/validationHint-editor.vue +3 -3
  435. package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +372 -50
  436. package/src/components/xform/form-designer/setting-panel/property-editor/widgetShowRuleFlag-editor.vue +263 -0
  437. package/src/components/xform/form-designer/setting-panel/property-editor/widgetWidth-editor.vue +1 -1
  438. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +372 -322
  439. package/src/components/xform/form-designer/setting-panel/widgetPropertyDialogMixin.js +186 -0
  440. package/src/components/xform/form-designer/toolbar-panel/index.vue +267 -103
  441. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +655 -24
  442. package/src/components/xform/form-designer/widget-panel/index.vue +391 -321
  443. package/src/components/xform/form-designer/widget-panel/indexMixin.js +335 -2
  444. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +4609 -3092
  445. package/src/components/xform/form-render/compareDelList.vue +83 -0
  446. package/src/components/xform/form-render/compareView.vue +76 -0
  447. package/src/components/xform/form-render/container-item/containerItemMixin.js +404 -11
  448. package/src/components/xform/form-render/container-item/data-table-item.vue +221 -202
  449. package/src/components/xform/form-render/container-item/data-table-mixin copy.js +5910 -0
  450. package/src/components/xform/form-render/container-item/data-table-mixin.js +5846 -12
  451. package/src/components/xform/form-render/container-item/detail-h5-item.vue +173 -172
  452. package/src/components/xform/form-render/container-item/detail-item.vue +450 -158
  453. package/src/components/xform/form-render/container-item/detail-pane-item.vue +17 -3
  454. package/src/components/xform/form-render/container-item/detail-plain-item.vue +92 -0
  455. package/src/components/xform/form-render/container-item/dynamicFieldEngine.js +285 -0
  456. package/src/components/xform/form-render/container-item/dynamicFieldMixin.js +416 -0
  457. package/src/components/xform/form-render/container-item/grid-col-item.vue +10 -3
  458. package/src/components/xform/form-render/container-item/grid-item.vue +1 -1
  459. package/src/components/xform/form-render/container-item/list-h5-item.vue +1198 -419
  460. package/src/components/xform/form-render/container-item/sub-form-item.vue +10 -2
  461. package/src/components/xform/form-render/container-item/tab-item.vue +129 -88
  462. package/src/components/xform/form-render/container-item/table-cell-item.vue +38 -32
  463. package/src/components/xform/form-render/container-item/table-item.vue +7 -7
  464. package/src/components/xform/form-render/container-item/table2-cell-item.vue +53 -34
  465. package/src/components/xform/form-render/container-item/table2-item.vue +198 -99
  466. package/src/components/xform/form-render/container-item/tree-item.vue +32 -11
  467. package/src/components/xform/form-render/dynamicDialogRender.js +238 -3
  468. package/src/components/xform/form-render/dynamicDrawerRender.js +229 -0
  469. package/src/components/xform/form-render/formDynamicFieldMixin.js +131 -0
  470. package/src/components/xform/form-render/index.vue +79 -21
  471. package/src/components/xform/form-render/indexMixin.js +5295 -59
  472. package/src/components/xform/form-render/refMixin.js +34 -3
  473. package/src/components/xform/icon-picker/icons.json +284 -0
  474. package/src/components/xform/icon-picker/index.vue +145 -0
  475. package/src/components/xform/lang/en-US.js +470 -438
  476. package/src/components/xform/lang/en-US_extension.js +4 -0
  477. package/src/components/xform/lang/zh-CN.js +643 -593
  478. package/src/components/xform/mixins/defaultHandle.js +689 -2
  479. package/src/components/xform/mixins/scriptHttp.js +179 -3
  480. package/src/components/xform/utils/attachmentValueUtil.js +239 -0
  481. package/src/components/xform/utils/dynamicSchemaUtil.js +361 -0
  482. package/src/components/xform/utils/emitter.js +4 -4
  483. package/src/components/xform/utils/formHttp.js +162 -0
  484. package/src/components/xform/utils/format.js +205 -172
  485. package/src/components/xform/utils/formula-util.js +969 -0
  486. package/src/components/xform/utils/queryParamUtil.js +84 -0
  487. package/src/components/xform/utils/sfc-generator.js +2 -2
  488. package/src/components/xform/utils/smart-vue-i18n/index.js +2 -1
  489. package/src/components/xform/utils/tableCellValidateUtil.js +148 -0
  490. package/src/components/xform/utils/tableColumnHelper.js +155 -0
  491. package/src/components/xform/utils/textMaskUtil.js +179 -0
  492. package/src/components/xform/utils/treeTableUtil.js +1265 -0
  493. package/src/components/xform/utils/util.js +1640 -1
  494. package/src/components/xform/utils/validators.js +185 -4
  495. package/src/components/xform/utils/vue2js-generator.js +2 -2
  496. package/src/components/xhsPrint/index.js +44 -1
  497. package/src/components/xhsPrint/mixins.js +269 -1
  498. package/src/directive/LimitNumber/index.js +144 -1
  499. package/src/directive/el-dialog-center/index.js +34 -1
  500. package/src/directive/el-drag-dialog/drag.js +86 -1
  501. package/src/directive/el-readonly/index.js +15 -1
  502. package/src/directive/permission/hasPermi.js +34 -1
  503. package/src/index.js +403 -85
  504. package/src/lang/index.js +56 -51
  505. package/src/lang/locale/en/login.js +27 -0
  506. package/src/lang/locale/zh/login.js +26 -0
  507. package/src/layout/components/AppMain.vue +147 -111
  508. package/src/layout/components/Sidebar/default.vue +1655 -1222
  509. package/src/layout/components/Sidebar/index.vue +6 -1
  510. package/src/layout/components/TagsView/index.vue +57 -15
  511. package/src/layout/components/createCompany/createCompanyDialog.vue +157 -0
  512. package/src/layout/components/extractedCode/createDialog.vue +92 -0
  513. package/src/layout/components/extractedCode/queryDialog.vue +103 -0
  514. package/src/layout/components/extractedCode/viewDialog.vue +207 -0
  515. package/src/layout/components/langTool.vue +128 -120
  516. package/src/layout/components/watermark/index.vue +83 -0
  517. package/src/layout/defaultLayout.vue +170 -150
  518. package/src/microRouter/index.js +447 -0
  519. package/src/mixins/selectDialog/index.js +266 -1
  520. package/src/mixins/tableTree/index.js +262 -4
  521. package/src/mixins/wf/index.js +40 -6
  522. package/src/permission.js +158 -16
  523. package/src/public-path.js +38 -0
  524. package/src/resources/js/base/common.js +109 -109
  525. package/src/router/index.js +4 -7
  526. package/src/router/modules/customer.js +72 -4
  527. package/src/router/modules/system.js +4 -0
  528. package/src/store/config/index.js +945 -3
  529. package/src/store/getters.js +4 -1
  530. package/src/store/modules/micro.js +57 -0
  531. package/src/store/modules/permission.js +517 -23
  532. package/src/store/modules/settings.js +26 -1
  533. package/src/store/modules/tagsView.js +208 -5
  534. package/src/store/modules/user.js +418 -28
  535. package/src/utils/aes.js +21 -1
  536. package/src/utils/auth.js +27 -1
  537. package/src/utils/componentDialog.js +339 -0
  538. package/src/utils/global.js +370 -8
  539. package/src/utils/index.js +579 -7
  540. package/src/utils/keepAlive.js +185 -1
  541. package/src/utils/lazyPlugin.js +66 -0
  542. package/src/utils/menuAdapter.js +277 -0
  543. package/src/utils/pddLog.js +92 -0
  544. package/src/utils/pdfUtil.js +71 -0
  545. package/src/utils/repeatOpen.js +48 -0
  546. package/src/utils/request.js +403 -14
  547. package/src/utils/resolveViewComponent.js +203 -0
  548. package/src/utils/scrollUtil.js +25 -0
  549. package/src/utils/vab.js +1279 -27
  550. package/src/utils/validate.js +104 -1
  551. package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
  552. package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
  553. package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
  554. package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
  555. package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
  556. package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
  557. package/src/views/bd/project/branch/form_script/list.vue +31 -0
  558. package/src/views/bd/project/branch/form_template/list.vue +30 -0
  559. package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
  560. package/src/views/bd/project/common/form_script/list.vue +16 -0
  561. package/src/views/bd/project/common/form_template/list.vue +15 -0
  562. package/src/views/bd/project/common/menu_kind/list.vue +15 -0
  563. package/src/views/bd/project/core/branchContext.js +100 -0
  564. package/src/views/bd/project/core/branchPage.js +78 -0
  565. package/src/views/bd/project/core/branchPageWrap.vue +225 -0
  566. package/src/views/bd/project/core/branchScope.js +44 -0
  567. package/src/views/bd/project/core/branchSearchPage.js +285 -0
  568. package/src/views/bd/project/core/branchSelect.vue +85 -0
  569. package/src/views/bd/project/core/branchTreeBar.vue +81 -0
  570. package/src/views/bd/project/core/httpBranchPatch.js +58 -0
  571. package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
  572. package/src/views/bd/project/datatable/table_model/list.vue +15 -0
  573. package/src/views/bd/setting/bd_attach_setting/dialog.vue +1 -1
  574. package/src/views/bd/setting/bd_attach_setting/edit.vue +5 -5
  575. package/src/views/bd/setting/bd_attach_setting/list.vue +28 -55
  576. package/src/views/bd/setting/bd_attach_setting/mixins/dialog.js +84 -1
  577. package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +116 -5
  578. package/src/views/bd/setting/bd_attach_setting/mixins/list.js +239 -1
  579. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -0
  580. package/src/views/bd/setting/bd_company_env/edit.vue +193 -0
  581. package/src/views/bd/setting/bd_company_env/list.vue +175 -0
  582. package/src/views/bd/setting/config_manage/list.vue +83 -0
  583. package/src/views/bd/setting/formVersion/button.vue +60 -0
  584. package/src/views/bd/setting/formVersion/compareBasicSection.vue +125 -0
  585. package/src/views/bd/setting/formVersion/compareCodeSection.vue +539 -0
  586. package/src/views/bd/setting/formVersion/compareContMixin.scss +65 -0
  587. package/src/views/bd/setting/formVersion/compareContent.vue +63 -0
  588. package/src/views/bd/setting/formVersion/compareDialog.vue +88 -0
  589. package/src/views/bd/setting/formVersion/compareMixin.js +93 -0
  590. package/src/views/bd/setting/formVersion/fieldCompare.vue +54 -0
  591. package/src/views/bd/setting/formVersion/formScriptCompareView.vue +94 -0
  592. package/src/views/bd/setting/formVersion/formTemplateCompareView.vue +74 -0
  593. package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +501 -0
  594. package/src/views/bd/setting/formVersion/link.vue +63 -0
  595. package/src/views/bd/setting/formVersion/preformDialog.vue +87 -0
  596. package/src/views/bd/setting/formVersion/reverButton.vue +82 -0
  597. package/src/views/bd/setting/formVersion/tableDetailDiff.js +99 -0
  598. package/src/views/bd/setting/formVersion/tableModelCompareView.vue +514 -0
  599. package/src/views/bd/setting/formVersion/textDiff.js +102 -0
  600. package/src/views/bd/setting/form_import_log/edit.vue +130 -0
  601. package/src/views/bd/setting/form_import_log/list.vue +211 -0
  602. package/src/views/bd/setting/form_script/dialog.vue +1 -1
  603. package/src/views/bd/setting/form_script/edit.vue +197 -74
  604. package/src/views/bd/setting/form_script/edit1.vue +411 -187
  605. package/src/views/bd/setting/form_script/form_list.vue +175 -85
  606. package/src/views/bd/setting/form_script/list.vue +96 -21
  607. package/src/views/bd/setting/form_script/list1.vue +207 -118
  608. package/src/views/bd/setting/form_script/mixins/dialog.js +130 -1
  609. package/src/views/bd/setting/form_script/mixins/edit.js +265 -7
  610. package/src/views/bd/setting/form_script/mixins/edit1.js +259 -9
  611. package/src/views/bd/setting/form_script/mixins/form_list.js +320 -4
  612. package/src/views/bd/setting/form_script/mixins/list.js +307 -4
  613. package/src/views/bd/setting/form_script/mixins/list1.js +512 -14
  614. package/src/views/bd/setting/form_script/mixins/list2.js +10 -1
  615. package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +194 -0
  616. package/src/views/bd/setting/form_script/mixins/preformDialog.js +34 -1
  617. package/src/views/bd/setting/form_script/otherAuthDialog.vue +83 -0
  618. package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +105 -0
  619. package/src/views/bd/setting/form_template/dialog.vue +1 -1
  620. package/src/views/bd/setting/form_template/edit.vue +356 -184
  621. package/src/views/bd/setting/form_template/editWfObjConfigDialog.vue +2 -2
  622. package/src/views/bd/setting/form_template/formDesignerDialog.vue +172 -0
  623. package/src/views/bd/setting/form_template/ftHistoryDialog.vue +1 -1
  624. package/src/views/bd/setting/form_template/itemList.vue +1 -1
  625. package/src/views/bd/setting/form_template/list.vue +303 -212
  626. package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +282 -0
  627. package/src/views/bd/setting/form_template/mixins/dialog.js +103 -1
  628. package/src/views/bd/setting/form_template/mixins/edit.js +280 -9
  629. package/src/views/bd/setting/form_template/mixins/editWfObjConfigDialog.js +92 -1
  630. package/src/views/bd/setting/form_template/mixins/ftHistoryDialog.js +91 -1
  631. package/src/views/bd/setting/form_template/mixins/itemEdit.js +104 -1
  632. package/src/views/bd/setting/form_template/mixins/itemList.js +234 -1
  633. package/src/views/bd/setting/form_template/mixins/list.js +721 -22
  634. package/src/views/bd/setting/form_template/mixins/list2.js +411 -0
  635. package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +193 -0
  636. package/src/views/bd/setting/form_template/mixins/preformDialog.js +28 -3
  637. package/src/views/bd/setting/form_template/mixins/wf_list.js +430 -0
  638. package/src/views/bd/setting/form_template/otherAuthDialog.vue +83 -0
  639. package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +253 -0
  640. package/src/views/bd/setting/form_template/wf_list.vue +161 -0
  641. package/src/views/bd/setting/logic_param/edit.vue +146 -0
  642. package/src/views/bd/setting/logic_param/edit1.vue +106 -0
  643. package/src/views/bd/setting/logic_param/edit2.vue +139 -0
  644. package/src/views/bd/setting/logic_param/list.vue +74 -0
  645. package/src/views/bd/setting/logic_param/list1.vue +12 -0
  646. package/src/views/bd/setting/logic_param/list2.vue +12 -0
  647. package/src/views/bd/setting/logic_param/mixins/edit.js +93 -0
  648. package/src/views/bd/setting/logic_param/mixins/list.js +376 -0
  649. package/src/views/bd/setting/menu_kind/authDialog.vue +1 -1
  650. package/src/views/bd/setting/menu_kind/dialog.vue +1 -1
  651. package/src/views/bd/setting/menu_kind/list.vue +172 -83
  652. package/src/views/bd/setting/menu_kind/mixins/authDialog.js +300 -7
  653. package/src/views/bd/setting/menu_kind/mixins/dialog.js +139 -1
  654. package/src/views/bd/setting/menu_kind/mixins/list.js +201 -1
  655. package/src/views/bd/setting/push_data/edit.vue +139 -0
  656. package/src/views/bd/setting/push_data/list.vue +283 -0
  657. package/src/views/bd/setting/push_data_h/edit.vue +153 -0
  658. package/src/views/bd/setting/push_data_h/list.vue +293 -0
  659. package/src/views/bd/setting/request_async_setting/edit.vue +320 -0
  660. package/src/views/bd/setting/request_async_setting/list.vue +372 -0
  661. package/src/views/bd/setting/request_setting/edit.vue +300 -0
  662. package/src/views/bd/setting/request_setting/list.vue +301 -0
  663. package/src/views/bd/setting/table_model/dialog.vue +1 -1
  664. package/src/views/bd/setting/table_model/edit.vue +1080 -426
  665. package/src/views/bd/setting/table_model/list.vue +219 -126
  666. package/src/views/bd/setting/table_model/mixins/dialog.js +71 -1
  667. package/src/views/bd/setting/table_model/mixins/edit.js +1309 -13
  668. package/src/views/bd/setting/table_model/mixins/list.js +475 -14
  669. package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +201 -0
  670. package/src/views/bd/setting/table_model/mixins/zdDialog.js +114 -3
  671. package/src/views/bd/setting/table_model/otherAuthDialog.vue +83 -0
  672. package/src/views/bd/setting/table_model/zdDialog.vue +1 -1
  673. package/src/views/bd/setting/utils/index.js +75 -1
  674. package/src/views/demo/bizTab/bill/billConfig.js +41 -0
  675. package/src/views/demo/bizTab/bill/detail.vue +436 -0
  676. package/src/views/demo/bizTab/bill/list.vue +288 -0
  677. package/src/views/demo/bizTab/bill/productDialog.vue +176 -0
  678. package/src/views/demo/bizTab/simple/billApi.js +123 -0
  679. package/src/views/demo/bizTab/simple/detail.vue +407 -0
  680. package/src/views/demo/bizTab/simple/list.vue +217 -0
  681. package/src/views/demo/bizTab/standalone/index.vue +121 -0
  682. package/src/views/demo/bizTab/wf/billConfig.js +44 -0
  683. package/src/views/demo/bizTab/wf/detail.vue +661 -0
  684. package/src/views/demo/bizTab/wf/list.vue +242 -0
  685. package/src/views/support/export_template/list.vue +1 -1
  686. package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
  687. package/src/views/support/form-dialog-demo/index.vue +537 -0
  688. package/src/views/user/access_log/list.vue +418 -349
  689. package/src/views/user/access_log/list2.vue +1 -1
  690. package/src/views/user/api_request/list.vue +1 -1
  691. package/src/views/user/area/dialog.vue +235 -116
  692. package/src/views/user/area/list.vue +318 -0
  693. package/src/views/user/bill_setting/edit.vue +1 -1
  694. package/src/views/user/bill_setting/list.vue +2 -2
  695. package/src/views/user/bill_setting/userDialog.vue +1 -1
  696. package/src/views/user/code_rules/list.vue +1 -1
  697. package/src/views/user/commMenu/index.vue +2 -2
  698. package/src/views/user/common_attribute/itemEdit.vue +2 -2
  699. package/src/views/user/common_attribute/list.vue +7 -4
  700. package/src/views/user/common_script/edit.vue +1 -1
  701. package/src/views/user/common_script/list.vue +2 -2
  702. package/src/views/user/company_info/dialog.vue +195 -154
  703. package/src/views/user/company_info/edit.vue +149 -88
  704. package/src/views/user/country/dialog.vue +1 -1
  705. package/src/views/user/country/list.vue +1 -1
  706. package/src/views/user/data_type_setting/dialog.vue +1 -1
  707. package/src/views/user/extend_datasource/dialog.vue +5 -1
  708. package/src/views/user/extend_datasource/edit.vue +5 -1
  709. package/src/views/user/extend_datasource/list.vue +6 -2
  710. package/src/views/user/fieldTranslation/editDialog.vue +8 -8
  711. package/src/views/user/fieldTranslation/list.vue +34 -34
  712. package/src/views/user/field_values_invisible/list.vue +1 -1
  713. package/src/views/user/file_type/edit.vue +30 -1
  714. package/src/views/user/file_type/list.vue +29 -1
  715. package/src/views/user/file_view_area/list.vue +1 -1
  716. package/src/views/user/file_view_ins/list.vue +22 -1
  717. package/src/views/user/form/form_template/dialog.vue +1 -1
  718. package/src/views/user/form/form_template/itemList.vue +1 -1
  719. package/src/views/user/form/form_template/list.vue +1 -1
  720. package/src/views/user/form/form_template_field/dialog.vue +1 -1
  721. package/src/views/user/form/form_type/dialog.vue +1 -1
  722. package/src/views/user/form/form_type/list.vue +1 -1
  723. package/src/views/user/form/report_requestaccess/dialog.vue +1 -1
  724. package/src/views/user/form/report_requestaccess/list.vue +1 -1
  725. package/src/views/user/form/vform/designer.vue +821 -749
  726. package/src/views/user/form/vform/formFieldMapping.js +2 -3
  727. package/src/views/user/form/vform/out_render.vue +1 -1
  728. package/src/views/user/form/vform/render.vue +80 -52
  729. package/src/views/user/form/view/edit.vue +56 -37
  730. package/src/views/user/form/view/list.vue +475 -54
  731. package/src/views/user/groups/dialog.vue +1 -1
  732. package/src/views/user/groups/edit.vue +2 -0
  733. package/src/views/user/groups/list.vue +2 -1
  734. package/src/views/user/home/default.vue +1117 -979
  735. package/src/views/user/home/default2.vue +1158 -0
  736. package/src/views/user/home/dev.vue +29 -0
  737. package/src/views/user/home/index.vue +20 -16
  738. package/src/views/user/lang_tag/dialog.vue +1 -1
  739. package/src/views/user/lang_tag/list.vue +1 -1
  740. package/src/views/user/language_setting/list.vue +1 -1
  741. package/src/views/user/login/default.vue +167 -44
  742. package/src/views/user/login/index.vue +4 -6
  743. package/src/views/user/login/indexMixin.js +582 -380
  744. package/src/views/user/menu/list.vue +51 -2
  745. package/src/views/user/menuFallback/index.vue +123 -0
  746. package/src/views/user/mobile_menu/list.vue +1 -1
  747. package/src/views/user/notify_message/dialog.vue +65 -22
  748. package/src/views/user/notify_message/list.vue +1 -1
  749. package/src/views/user/notify_template/edit.vue +188 -187
  750. package/src/views/user/notify_template/edit2.vue +176 -0
  751. package/src/views/user/notify_template/list.vue +5 -2
  752. package/src/views/user/notify_template/list2.vue +190 -0
  753. package/src/views/user/oplog/list.vue +1 -1
  754. package/src/views/user/outLink/cc_form_view.vue +185 -0
  755. package/src/views/user/outLink/form_view.vue +202 -184
  756. package/src/views/user/outLink/index.vue +72 -11
  757. package/src/views/user/outLink/view.vue +37 -19
  758. package/src/views/user/position/dialog.vue +1 -1
  759. package/src/views/user/position/list.vue +5 -5
  760. package/src/views/user/project_tag/dialog.vue +10 -5
  761. package/src/views/user/project_tag/edit.vue +2 -2
  762. package/src/views/user/project_tag/list.vue +10 -5
  763. package/src/views/user/push_setting/list.vue +3 -3
  764. package/src/views/user/request_setting/edit.vue +258 -0
  765. package/src/views/user/request_setting/list.vue +248 -0
  766. package/src/views/user/role/authConfig.vue +89 -0
  767. package/src/views/user/role/dialog.vue +70 -48
  768. package/src/views/user/role/edit.vue +609 -429
  769. package/src/views/user/role/list.vue +5 -5
  770. package/src/views/user/sale_org/dialog.vue +2 -2
  771. package/src/views/user/sale_org/list.vue +5 -2
  772. package/src/views/user/system_notice/infoDialog.vue +61 -1
  773. package/src/views/user/system_notice/list.vue +1 -1
  774. package/src/views/user/system_parameter/list.vue +1 -1
  775. package/src/views/user/user/dialog.vue +47 -24
  776. package/src/views/user/user/edit.vue +1485 -1021
  777. package/src/views/user/user/form_dialog.vue +158 -0
  778. package/src/views/user/user/form_edit.vue +117 -49
  779. package/src/views/user/user/form_info.vue +210 -0
  780. package/src/views/user/user/form_list.vue +2 -1
  781. package/src/views/user/user/info.vue +253 -140
  782. package/src/views/user/user/list.vue +652 -570
  783. package/src/views/user/user/modifyPasswordDialog.vue +64 -53
  784. package/src/views/user/user_log_classify/list.vue +1 -1
  785. package/src/views/user/wf/iframe/index.vue +6 -1
  786. package/src/views/user/wf/iframe/index2.vue +6 -1
  787. package/src/views/user/wf/wfReport/index.vue +648 -0
  788. package/src/views/user/wf/wf_auto_submit_data/list.vue +4 -2
  789. package/src/views/user/wf/wf_manage/list.vue +683 -256
  790. package/src/views/user/wf/wf_manage/list2.vue +875 -0
  791. package/src/views/user/wf/wf_manage/wfContentDialog.vue +47 -22
  792. package/src/views/user/wf/wf_obj_config/dialog.vue +1 -1
  793. package/src/views/user/wf/wf_obj_config/importItemDialog.vue +109 -0
  794. package/src/views/user/wf/wf_obj_config/itemEdit.vue +25 -1
  795. package/src/views/user/wf/wf_obj_config/list.vue +139 -6
  796. package/src/views/user/wf/wf_obj_config/list_form.vue +1 -1
  797. package/src/views/user/wf/wf_obj_config/wfBizDataSettingDialog.vue +292 -0
  798. package/src/views/user/wf/wf_transfer_setting/edit.vue +282 -0
  799. package/src/views/user/wf/wf_transfer_setting/list.vue +319 -0
  800. package/src/views/user/workbench_menu/list.vue +555 -0
  801. package/src/components/excelExport/export-panel.js +0 -458
  802. package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +0 -206
  803. package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1347
  804. package/src/utils/wf.js +0 -21
@@ -1,722 +1,1153 @@
1
- /**version-1.0*/
2
- let tmixins = {};
3
- import {
4
- getToken
5
- } from '../../utils/auth'
6
- import indexUtil from '../../utils/index.js'
7
- import exportFieldDialog from "./exportFieldDialog.vue";
8
-
9
-
10
- let configUtil = {
11
- baseUrl: process.env.VUE_APP_BASE_API,
12
- getToken,
13
- indexUtil
14
- };
15
-
16
- function getGrid(that, tableRef) {
17
- let $grid;
18
- if (Array.isArray(that.$refs[tableRef])) {
19
- $grid = that.$refs[tableRef][0];
20
- } else {
21
- $grid = that.$refs[tableRef];
22
- }
23
- return $grid;
24
- }
25
-
26
- (function () {
27
- let exportTimer, exportMtTimer, countTimer;
28
- tmixins = {
29
- props: ['param'],
30
- components:{
31
- exportFieldDialog
32
- },
33
- data() {
34
- return {
35
- showImportDialog: false,
36
- showImportDialog2: false,
37
- falseValue: false,
38
- fileRaw: false,
39
- tTotalPage: 0,
40
- tTotalSize: 0,
41
- CURRENT_PREFIX: '',
42
- option: {},
43
- uuid: '',
44
- fileRows: [],
45
- title: this.$t2('导出', 'components.excelExport.title'),
46
- tableTarget: null,
47
- showContent: true,
48
- percentageNum: 0,
49
- exportGrid: {
50
- className: "list-table",
51
- resizable: true,
52
- height: 120,
53
- stripe: true,
54
- highlightCurrentRow: true,
55
- highlightHoverRow: true,
56
- columns: [{
57
- field: 'name',
58
- minWidth: 140,
59
- title: this.$t2('文件名', 'components.excelExport.fileName'),
60
- sortable: true,
61
- slots: {
62
- default: ({
63
- row
64
- }) => {
65
- return row.title + "-" + row.uuid;
66
- }
67
- }
68
- },
69
- {
70
- field: 'fileSize',
71
- minWidth: 140,
72
- title: this.$t2('大小', 'components.excelExport.fileSize'),
73
- sortable: true
74
- },
75
- {
76
- field: 'oper',
77
- width: 140,
78
- fixed: 'right',
79
- title: '',
80
- sortable: false,
81
- slots: {
82
- default: 'row_edit'
83
- }
84
- },
85
- ],
86
- },
87
- excTime: 0,
88
- showExportFieldDialog:false
89
- }
90
- },
91
- created() {
92
-
93
- },
94
- mounted() {
95
-
96
- },
97
- beforeDestroy() {
98
- this.clearExportTimer()
99
- },
100
- methods: {
101
- exc() {
102
- this.option = this.param;
103
- let $grid = getGrid(this.option.vue, this.option.targetRef);
104
- let datas = [];
105
- if (this.option.type == "selected") {
106
- datas = $grid.getCheckboxRecords(true);
107
- if (!datas.length) {
108
- this.$baseAlert(this.$t2('请选择导出的数据', 'components.excelExport.warmMsg1'));
109
- return;
110
- }
111
- } else if (this.option.type == "current") {
112
- datas = $grid.getTableData().fullData;
113
- if (!datas.length) {
114
- this.$baseAlert(this.$t2('不存在可导出的数据', 'components.excelExport.warmMsg2'));
115
- return;
116
- }
117
- }
118
-
119
- let flag = this.option.type == "selected" || this.option.type == "current";
120
- this.$baseConfirm(this.$t2('您确定要导出吗?', 'components.excelExport.submitTip')).then(() => {
121
-
122
- this.showExportFieldDialog = true;
123
- return
124
- if (!flag) {
125
- this.showImportDialog2 = true;
126
- }
127
- this.$nextTick(() => {
128
- if (flag) {
129
- this.startProcess2(datas);
130
- } else {
131
- this.startProcess();
132
- }
133
- });
134
- }).catch(() => {
135
- this.showContent = false;
136
- this.$emit("update:visiable", false);
137
- });
138
- },
139
- dialogClose2() {
140
- this.$emit("update:visiable", false);
141
- this.clearExportTimer();
142
- this.showContent = false;
143
- },
144
- dialogPrimary2() {
145
- // this.showUserDialog=false
146
- this.$emit("confirm");
147
- this.$emit("close");
148
- this.clearExportTimer();
149
- },
150
- startProcess() {
151
- this.createCountTimer();
152
- this.tableTarget = getGrid(this.option.vue, this.option.targetRef);
153
- let dialogObj = this.$refs.exportDialog.$el;
154
- let doneNumObj = dialogObj.querySelector(".doneNum");
155
- let dataSizeObj = dialogObj.querySelector(".dataSize");
156
-
157
- let that = this;
158
- let options = this.option;
159
- let title = options.title || this.$t2('导出', 'components.excelExport.title');
160
- if (!options.prefix && options.prefix !== '') {
161
- let originOption = this.tableTarget.originOption;
162
- let path = originOption.exportPath || originOption.path;
163
- let os = path.split("/");
164
- if (path.indexOf("http://") >= 0 || path.indexOf("https://") >= 0) {
165
- options.prefix = "/" + os[3];
166
- } else {
167
- options.prefix = "/" + os[1];
168
- }
169
- }
170
- this.CURRENT_PREFIX = options.prefix;
171
-
172
- this.title = title;
173
- that.tTotalPage = 0;
174
- that.tTotalSize = 0;
175
- let pPageSize = options.pageSize || 5000;
176
- let limitFileSize = options.limitFileSize || 200000;
177
- let limitThreadNum = options.limitThreadNum || 5;
178
- // let target = $(options.target)[0];
179
- // let dialog = options.dialog;
180
-
181
- let uuid;
182
- let num = 0;
183
-
184
- /**处理返回值*/
185
- let excedNum = 0;
186
- let cSize = 0;
187
- let handleData = function (resultMsg) {
188
- let data = resultMsg.objx;
189
- let total = data.total;
190
-
191
- let pageNumber = data.pageNumber || 1;
192
- let totalPages = that.tTotalPage || 1;
193
- /*if(data.totalPages > totalPages){
194
- totalPages = data.totalPages;
195
- }
196
- if(data.total > tTotalSize){
197
- tTotalSize = data.total;
198
- }*/
199
-
200
- that.addExcelData({
201
- rows: data.records,
202
- pageNumber: pageNumber,
203
- }).then(function (resultMsg2) {
204
- if (resultMsg2.type == "success") {
205
- excedNum++;
206
- let pageNumber = data.pageNumber || 1;
207
- let k = excedNum * 100 / totalPages;
208
- if (k > 0 && k < 1) {
209
- k = 1;
210
- }
211
- if (k > 100) k = 100;
212
- let cTotal = that.tTotalSize;
213
- let pageSize = data.pageSize;
214
- let datas = data.records;
215
- let size = datas.length;
216
- cSize = cSize + size;
217
-
218
- let ttNum = cSize + "/" + cTotal;
219
- let percentageStr = parseInt(k) + "%";
220
-
221
- let percentageNum = k;
222
- if (percentageNum >= 100) {
223
- percentageNum = 99;
224
- }
225
- doneNumObj.innerText = cSize;
226
- that.$set(that, "percentageNum", parseInt(percentageNum));
227
-
228
- if (totalPages == 0 || (excedNum >= totalPages)) {
229
-
230
- let kTotalPages = parseInt(limitFileSize / data.pageSize);
231
-
232
- let fileNum = parseInt(totalPages / kTotalPages);
233
- if (totalPages % kTotalPages != 0) {
234
- fileNum = fileNum + 1;
235
- }
236
-
237
- let currentIndex = 0;
238
- let excingNum = 0;
239
- let mtExcedNum = 0;
240
- let mtExcedSuccessNum = 0;
241
-
242
- let fileRows = [];
243
-
244
- exportMtTimer = setInterval(function () {
245
- let startPage = currentIndex + 1;
246
- if (mtExcedNum < fileNum) {
247
- if (excingNum >= limitThreadNum) return false;
248
- excingNum++;
249
- mtExcedNum++;
250
-
251
- let endPage = currentIndex + kTotalPages;
252
- if (endPage > totalPages) {
253
- endPage = totalPages;
254
- }
255
- if (startPage > endPage) {
256
- that.clearExportTimer();
257
- }
258
- currentIndex = endPage;
259
-
260
- that.mergeExcel(startPage, endPage).then(function (resultMsg3) {
261
- if (resultMsg3.type == "success") {
262
- excingNum--;
263
- mtExcedSuccessNum++;
264
- let fileInfo = resultMsg3.objx;
265
- let fileName = fileInfo.fileName;
266
- let fileSize = fileInfo.fileSize;
267
-
268
- let dataMap = {};
269
- dataMap["startPage"] = startPage;
270
- dataMap["endPage"] = endPage;
271
- dataMap["title"] = title;
272
- dataMap["uuid"] = fileName;
273
- dataMap["fileSize"] = fileSize;
274
- fileRows.push(dataMap);
275
-
276
- that.$refs["exportTable"].insertAt(
277
- dataMap, -1);
278
-
279
- let fileSizeStr = fileSize;
280
-
281
- that.fileRows.push(dataMap);
282
-
283
- if (mtExcedNum >= fileNum && mtExcedSuccessNum >= fileNum) {
284
- setTimeout(function () {
285
- that.percentageNum =
286
- parseInt(100);
287
- }, 100);
288
- that.clearExportTimer();
289
- } else if (mtExcedSuccessNum >= fileNum) {
290
- setTimeout(function () {
291
- that.percentageNum = parseInt(100);
292
- }, 100);
293
- that.clearExportTimer();
294
- }
295
- } else {
296
- that.clearExportTimer();
297
- }
298
- }).catch(function (e) {
299
- that.clearExportTimer();
300
- });
301
- }
302
- }, 10);
303
- return false;
304
- }
305
- } else {
306
- that.clearExportTimer();
307
- }
308
- }).catch(function (e) {
309
- that.clearExportTimer();
310
- });
311
- }
312
-
313
- let waitReqNum = 0;
314
- let loopToDo = function (flag, pageNumber) {
315
- let maxWaitNum = limitThreadNum;
316
- let nowDate = options.nowDate;
317
- if (flag == 1) {
318
- if (num > that.tTotalPage) {
319
- let datas = page.records;
320
- let size = datas.length;
321
- if (size == 0 || page.totalPages == 0 || (page.pageNumber >= page.totalPages)) {
322
- that.clearExportTimer();
323
- return;
324
- }
325
- }
326
- } else {
327
- waitReqNum = 0;
328
- }
329
-
330
- let target = that.tableTarget;
331
- let originOption = target.originOption;
332
- let url = originOption.exportPath || originOption.path;
333
-
334
- let params = originOption.param() || {};
335
- let aParam = {
336
- current: pageNumber,
337
- size: pPageSize,
338
- nowDate: nowDate,
339
- searchCount: flag !== 1
340
- }
341
- let cpParam;
342
- if (originOption.vform === true) {
343
- params.conditions = params.conditions || {};
344
- cpParam = params.conditions
345
- } else {
346
- cpParam = params;
347
- }
348
- Object.assign(cpParam, aParam);
349
- let promise;
350
- if (!originOption.exportAjax) {
351
- let turl = url.replace("searchCount=false", "1=1");
352
- promise = that.$commonHttp({
353
- aes: originOption.aes || false,
354
- url: turl,
355
- method: "post",
356
- data: params,
357
- modal: false,
358
- queryCreateInfo: originOption.queryCreateInfo,
359
- addCreateInfo: originOption.addCreateInfo
360
- });
361
- } else {
362
- promise = originOption.exportAjax(aParam);
363
- }
364
-
365
- /*cpParam["current"] = pageNumber;
366
- cpParam["size"] = pPageSize;
367
- cpParam["nowDate"] = nowDate;
368
- if (flag == 1) {
369
- cpParam["searchCount"] = false;
370
- } else {
371
- cpParam["searchCount"] = true;
372
- }*/
373
- promise.then(function (resultMsg) {
374
-
375
- if (resultMsg.type == 'success') {
376
- let objx = resultMsg.objx;
377
- objx.pageNumber = objx.current || 1;
378
- objx.totalPages = objx.pages || 1;
379
- objx.pageSize = objx.size;
380
- let datas = objx.records;
381
- let size = datas.length;
382
- if (flag == 0) {
383
- dataSizeObj.innerText = objx.total || 0;
384
-
385
- that.tTotalPage = objx.pages;
386
- that.tTotalSize = objx.total;
387
- let tTotalPage = objx.pages;
388
- let tTotalSize = objx.total;
389
- let ttNum = 0 + "/" + objx.total;
390
-
391
- let opNum = limitFileSize;
392
- let kTotalPages = parseInt(opNum / objx.size);
393
-
394
- let fileNum = parseInt(tTotalPage / kTotalPages);
395
- if (tTotalPage % kTotalPages != 0) {
396
- fileNum = fileNum + 1;
397
- }
398
- if (size > 0 || objx.totalPages > 0 || (objx.pageNumber < objx
399
- .totalPages)) {
400
- exportTimer = setInterval(function () {
401
- if (waitReqNum < maxWaitNum && num < tTotalPage) {
402
- waitReqNum++;
403
- num++;
404
- let pageNumber = num;
405
- loopToDo(1, pageNumber);
406
- }
407
- }, 10);
408
- } else {
409
- that.clearExportTimer();
410
- }
411
- } else {
412
- if (waitReqNum > 0) waitReqNum--;
413
- }
414
-
415
- //doneNumObj.innerText = (objx.pageNumber - 1) * objx.pageSize + size;
416
- setTimeout(function () {
417
- handleData(resultMsg, flag);
418
- }, 1);
419
- } else {
420
- that.clearExportTimer();
421
- }
422
-
423
- }).catch(function (e) {
424
- that.clearExportTimer();
425
- });
426
- }
427
-
428
- that.createExcelFile().then(resultMsg => {
429
- if (resultMsg.type == "success") {
430
- let aObj = resultMsg.objx;
431
- that.uuid = aObj.uuid;
432
- that.nowDate = aObj.nowDate;
433
- that.ippaaapp = aObj.ippaaapp;
434
- setTimeout(function () {
435
- num = 1;
436
- loopToDo(0, num);
437
- }, 300);
438
- } else {
439
- that.showImportDialog = false;
440
- that.showImportDialog2 = false;
441
- }
442
- }).catch(error => {
443
- that.showImportDialog = false;
444
- that.showImportDialog2 = false;
445
- });
446
- },
447
- createExcelFile(loading) {
448
- let url1 = this.CURRENT_PREFIX + '/excel/createExcelTemplate';
449
- let datas = this.getHeadTitleJson();
450
- return this.$http({
451
- url: url1,
452
- method: "post",
453
- headers: {
454
- 'Content-Type': 'application/json;charset=utf-8'
455
- },
456
- data: datas,
457
- modal: loading || false,
458
- isLoading: loading
459
- });
460
- },
461
- getExportTitleJson() {
462
- let target = this.tableTarget;
463
- let columns = target.getColumns();
464
- let titles = [];
465
- columns.forEach(column => {
466
- if (column.title && column.visible) {
467
- // titles.push(column.title)
468
- titles.push({
469
- colspan: 1,
470
- rowspan: 1,
471
- title: column.title
472
- });
473
- }
474
- });
475
- return [titles];
476
- },
477
- getHeadTitleJson() {
478
- let that = this;
479
- let target = this.tableTarget;
480
- let columns = target.getTableColumn().collectColumn;
481
-
482
- let maxRowNum = 0;
483
- let loop = function (column, n) {
484
- if (column.children && column.children.length > 0) {
485
- let num = n + 1;
486
- column.children.forEach(child => {
487
- return loop(child, num);
488
- });
489
- } else {
490
- let num = n;
491
- if (num > maxRowNum) maxRowNum = num;
492
- }
493
- }
494
-
495
- columns.forEach((column) => {
496
- if (column.title && column.visible) {
497
- loop(column, 0);
498
- }
499
- });
500
- maxRowNum = maxRowNum + 1;
501
-
502
- let titleArr = [];
503
- let columnsArr = [columns];
504
- for (let i = 0; i < maxRowNum; i++) {
505
- let contents = [];
506
- let items = columnsArr[i];
507
- let nextArr = [];
508
- let colspan = 1;
509
- let rowspan = 1;
510
- items.forEach((column, index) => {
511
- if (column.title && column.visible) {
512
- if (column.children && column.children.length > 0) {
513
- nextArr = nextArr.concat(column.children);
514
- }
515
-
516
- contents.push({
517
- colspan: column.colSpan,
518
- rowspan: column.rowSpan,
519
- title: column.title != null ? column.title : ''
520
- });
521
- }
522
- });
523
- titleArr.push(contents);
524
- if (nextArr.length > 0) columnsArr.push(nextArr);
525
- }
526
- return titleArr;
527
- },
528
- addExcelData(opts, loading) {
529
- let target = opts.target;
530
- let rows = opts.rows;
531
- let pageNumber = opts.pageNumber || 1;
532
- let callback = opts.callback;
533
- let datas = this.getExcelData(rows);
534
- let cUUid = this.uuid;
535
- let ippaaapp = this.ippaaapp;
536
- let url1 = this.CURRENT_PREFIX + "/excel/appendExcelData?uuid=" + cUUid + "&ippaaapp=" +
537
- ippaaapp + "&pageNumber=" + pageNumber;
538
- return this.$http({
539
- url: url1,
540
- method: "post",
541
- headers: {
542
- 'Content-Type': 'application/json;charset=utf-8'
543
- },
544
- data: datas,
545
- modal: loading || false,
546
- isLoading: loading || false
547
- });
548
- },
549
- mergeExcel(startPage, endPage, loading) {
550
- let url1 = this.CURRENT_PREFIX + "/excel/mergeExcel?uuid=" + this.uuid + "&ippaaapp=" + this.ippaaapp;
551
- return this.$http({
552
- url: url1 + "&startPage=" + startPage + "&endPage=" + endPage,
553
- method: "post",
554
- modal: loading || false,
555
- isLoading: loading || false
556
- })
557
- },
558
- createCountTimer() {
559
- this.excTime = 0;
560
- let beginTime = new Date().getTime();
561
- countTimer = setInterval(() => {
562
- let nowTime = new Date().getTime();
563
- let diffTime = (nowTime - beginTime) / 1000;
564
- this.$set(this, 'excTime', this.$baseLodash.round(diffTime, 2));
565
- }, 100);
566
- },
567
- clearExportTimer() {
568
- clearInterval(exportTimer);
569
- clearInterval(exportMtTimer);
570
- clearInterval(countTimer);
571
- },
572
- getExcelData(rows) {
573
- let that = this;
574
-
575
- let target = this.option.vue.$refs[this.option.targetRef];
576
- let $table = target.$refs.xTable;
577
-
578
- let h = this.$createElement;
579
- let columns = target.getColumns();
580
-
581
- let arr = [];
582
-
583
- rows.forEach(function (row, index) {
584
- let contents = [];
585
- columns.forEach(column => {
586
- if (column.title && column.visible) {
587
- let params = {
588
- '$table': $table,
589
- row: row,
590
- rowIndex: index,
591
- '$rowIndex': index,
592
- column: column,
593
- // columnIndex: 0,
594
- // $columnIndex: 0,
595
- // _columnIndex
596
- }
597
- let exportType = column.params?.exportType;
598
- let exportVal = column.params && column.params.exportVal ? column.params.exportVal : null;
599
- let resultStr;
600
- if (exportVal) {
601
- resultStr = exportVal(params);
602
- } else {
603
- resultStr = $table.getCellValue(params);
604
- }
605
- if (exportType == "Number") {
606
- if (resultStr !== null && resultStr !== undefined && resultStr !== "" && !(resultStr + "").startsWith("[EXPNUM]")) {
607
- resultStr = "[EXPNUM]" + resultStr;
608
- }
609
- }
610
-
611
- contents.push(resultStr);
612
- }
613
- });
614
- arr.push(contents);
615
- });
616
-
617
- return arr;
618
- },
619
- exportAll(row) {
620
- let cUUid = row.uuid;
621
- let fileName = row.title;
622
- let fileUrl = configUtil.baseUrl + this.CURRENT_PREFIX + '/excel/download?uuid=' + cUUid;
623
-
624
- function downLoadFile2() {
625
- let params = {
626
- n: fileName
627
- };
628
- params['access_token'] = configUtil.getToken();
629
-
630
- let form = document.createElement('form');
631
-
632
- let randomNum = (new Date()).valueOf() + Math.floor(Math.random() * 1000000);
633
- let formId = "formId-" + randomNum;
634
- let formName = "formName-" + randomNum;
635
-
636
- form.id = formId;
637
- form.name = formName;
638
- form.target = "_blank";
639
- document.body.appendChild(form);
640
- for (let obj in params) {
641
- if (params.hasOwnProperty(obj)) {
642
- let input = document.createElement('input');
643
- input.tpye = 'hidden';
644
- input.name = obj;
645
- input.value = params[obj];
646
- form.appendChild(input);
647
- }
648
- }
649
- form.method = "post"; //请求方式
650
- form.action = fileUrl;
651
- form.submit();
652
- document.body.removeChild(form);
653
-
654
- }
655
-
656
- downLoadFile2();
657
- },
658
- startProcess2(datas) {
659
- this.tableTarget = getGrid(this.option.vue, this.option.targetRef);
660
- let that = this;
661
- let options = this.option;
662
- let title = options.title || this.$t2('导出', 'components.excelExport.title');
663
- if (!options.prefix && options.prefix !== '') {
664
- let originOption = this.tableTarget.originOption;
665
- let path = originOption.exportPath || originOption.path;
666
- if (path) {
667
- let os = path.split("/");
668
- if (path.indexOf("http://") >= 0 || path.indexOf("https://") >= 0) {
669
- options.prefix = "/" + os[3];
670
- } else {
671
- options.prefix = "/" + os[1];
672
- }
673
- }
674
- }
675
- if (!options.prefix) {
676
- return;
677
- }
678
- this.CURRENT_PREFIX = options.prefix;
679
-
680
- let handleData = function () {
681
- let total = datas.length;
682
- that.addExcelData({
683
- rows: datas,
684
- pageNumber: 1,
685
- }, true).then(resultMsg2 => {
686
- if (resultMsg2.type == "success") {
687
- that.mergeExcel(1, 1, true).then(resultMsg3 => {
688
- if (resultMsg3.type == "success") {
689
- let fileInfo = resultMsg3.objx;
690
- let fileName = fileInfo.fileName;
691
- let fileSize = fileInfo.fileSize;
692
-
693
- let dataMap = {};
694
- dataMap["startPage"] = 1;
695
- dataMap["endPage"] = 1;
696
- dataMap["title"] = title;
697
- dataMap["uuid"] = fileName;
698
- dataMap["fileSize"] = fileSize;
699
- that.exportAll(dataMap);
700
- }
701
- })
702
- }
703
- })
704
- }
705
- that.createExcelFile(true).then(resultMsg => {
706
- if (resultMsg.type == "success") {
707
- let aObj = resultMsg.objx;
708
- that.uuid = aObj.uuid;
709
- that.nowDate = aObj.nowDate;
710
- that.ippaaapp = aObj.ippaaapp;
711
- handleData();
712
- }
713
- })
714
- },
715
- confirmExportFieldDialog(columns){
716
-
717
- }
718
- }
719
- };
720
- })();
721
-
722
- export const mixins = tmixins
1
+ /**version-1.0*/
2
+ let tmixins = {};
3
+ import { getToken } from "../../utils/auth";
4
+ import indexUtil from "../../utils/index.js";
5
+ import exportFieldDialog from "./exportFieldDialog.vue";
6
+ import { getCellValue } from "@base/components/table/util/index";
7
+ import { isItemExport, isRowExport, requiresCheckedRows } from "./exportType";
8
+
9
+ let configUtil = {
10
+ baseUrl: process.env.VUE_APP_BASE_API,
11
+ getToken,
12
+ indexUtil,
13
+ };
14
+
15
+ function getGrid(that, tableRef) {
16
+ let $grid;
17
+ if (Array.isArray(that.$refs[tableRef])) {
18
+ $grid = that.$refs[tableRef][0];
19
+ } else {
20
+ $grid = that.$refs[tableRef];
21
+ }
22
+ return $grid;
23
+ }
24
+
25
+ (function () {
26
+ tmixins = {
27
+ props: ["param"],
28
+ components: {
29
+ exportFieldDialog,
30
+ },
31
+ data() {
32
+ return {
33
+ showImportDialog: false,
34
+ showImportDialog2: false,
35
+ falseValue: false,
36
+ fileRaw: false,
37
+ tTotalPage: 0,
38
+ tTotalSize: 0,
39
+ doneSize: 0,
40
+ CURRENT_PREFIX: "",
41
+ option: {},
42
+ uuid: "",
43
+ fileRows: [],
44
+ title: this.$t2("导出", "components.excelExport.title"),
45
+ tableTarget: null,
46
+ showContent: true,
47
+ percentageNum: 0,
48
+ exportGrid: {
49
+ className: "list-table",
50
+ resizable: true,
51
+ height: 120,
52
+ stripe: true,
53
+ highlightCurrentRow: true,
54
+ highlightHoverRow: true,
55
+ columns: [
56
+ {
57
+ field: "name",
58
+ minWidth: 140,
59
+ title: this.$t2("文件名", "components.excelExport.fileName"),
60
+ sortable: true,
61
+ slots: {
62
+ default: ({ row }) => {
63
+ return row.title + "-" + row.uuid;
64
+ },
65
+ },
66
+ },
67
+ {
68
+ field: "fileSize",
69
+ minWidth: 140,
70
+ title: this.$t2("大小", "components.excelExport.fileSize"),
71
+ sortable: true,
72
+ },
73
+ {
74
+ field: "oper",
75
+ width: 140,
76
+ fixed: "right",
77
+ title: "",
78
+ sortable: false,
79
+ slots: {
80
+ default: "row_edit",
81
+ },
82
+ },
83
+ ],
84
+ },
85
+ excTime: 0,
86
+ showExportFieldDialog: false,
87
+ leafColumns: [],
88
+ columns: [],
89
+ queryParam: {},
90
+ isMinimize: false,
91
+ // 定时器必须放实例上:模块级共享会导致并发导出互相清除对方的定时器
92
+ exportTimer: null,
93
+ countTimer: null,
94
+ exportError: false,
95
+ };
96
+ },
97
+ created() {},
98
+ mounted() {
99
+ // this.exc();
100
+ },
101
+ beforeDestroy() {
102
+ this.clearExportTimer();
103
+ this.unlockMenu();
104
+ },
105
+ methods: {
106
+ exc() {
107
+ this.option = this.param;
108
+ let $grid = getGrid(this.option.vue, this.option.targetRef);
109
+ let datas = [];
110
+ // 明细导出的列来自 exportItemConfig,未维护时字段树为空、表头 JSON 也无从生成,
111
+ // 必须在此拦掉:这里是所有导出的唯一入口,放行下去会在字段选择弹框里抛异常。
112
+ if (isItemExport(this.option.type)) {
113
+ let originOption = $grid.params.originOption || {};
114
+ if (!originOption.exportItemConfig?.columns?.length) {
115
+ this.$baseAlert(
116
+ this.$t1("未维护明细导出列,请先在数据表格属性中配置")
117
+ );
118
+ this.param.destroyComponent();
119
+ return;
120
+ }
121
+ }
122
+ if (requiresCheckedRows(this.option.type)) {
123
+ datas = $grid.getCheckboxRecords(true);
124
+ if (!datas.length) {
125
+ this.$baseAlert(
126
+ this.$t2("请选择导出的数据", "components.excelExport.warmMsg1")
127
+ );
128
+ this.param.destroyComponent();
129
+ return;
130
+ }
131
+ } else if (this.option.type === "current") {
132
+ datas = $grid.getTableData().fullData;
133
+ if (!datas.length) {
134
+ this.$baseAlert(
135
+ this.$t2("不存在可导出的数据", "components.excelExport.warmMsg2")
136
+ );
137
+ this.param.destroyComponent();
138
+ return;
139
+ }
140
+ }
141
+
142
+ this.isMinimize = false;
143
+ this.showExportFieldDialog = true;
144
+ },
145
+ handleMinimize() {
146
+ let result = !this.showImportDialog2;
147
+ this.isMinimize = !result;
148
+ this.showImportDialog2 = result;
149
+ },
150
+ dialogClose2() {
151
+ if (this.isMinimize) return;
152
+ let loadingObj = window.$vueRoot.$baseLoading({
153
+ target: document.body,
154
+ background: "unset",
155
+ });
156
+
157
+ this.$emit("update:visiable", false);
158
+ this.clearExportTimer();
159
+ // this.showImportDialog2 = false;
160
+ this.showExportFieldDialog = false;
161
+ // this.showContent = false;
162
+ setTimeout(() => {
163
+ this.param.destroyComponent(loadingObj);
164
+ }, 0);
165
+ },
166
+ dialogPrimary2() {
167
+ // this.showUserDialog=false
168
+ this.$emit("confirm");
169
+ this.$emit("close");
170
+ this.clearExportTimer();
171
+ },
172
+ startProcess() {
173
+ this.lockMenu();
174
+ this.createCountTimer();
175
+ this.tableTarget = getGrid(this.option.vue, this.option.targetRef);
176
+
177
+ //获取查询条件
178
+ let originOption = this.tableTarget.params.originOption;
179
+ this.queryParam = this.$baseLodash.cloneDeep(
180
+ originOption.param() || {}
181
+ );
182
+
183
+ let that = this;
184
+ let options = this.option;
185
+ let title = options.title
186
+ ? this.$t1(options.title)
187
+ : this.$t2("导出", "components.excelExport.title");
188
+ if (!options.prefix && options.prefix !== "") {
189
+ let originOption = this.tableTarget.params.originOption;
190
+ let path = originOption.exportPath || originOption.path;
191
+ if (typeof path === "function") path = path();
192
+ if (path && typeof path === "string" && path !== "#") {
193
+ let os = path.split("/");
194
+ if (path.indexOf("http://") >= 0 || path.indexOf("https://") >= 0) {
195
+ options.prefix = "/" + os[3];
196
+ } else {
197
+ options.prefix = "/" + os[1];
198
+ }
199
+ }
200
+ }
201
+ if (!options.prefix) {
202
+ this.abortExport(
203
+ this.$t1("无法确定导出服务前缀,请在导出配置中指定 prefix")
204
+ );
205
+ this.unlockMenu();
206
+ return;
207
+ }
208
+ this.CURRENT_PREFIX = options.prefix;
209
+
210
+ this.title = title;
211
+ that.tTotalPage = 0;
212
+ that.tTotalSize = 0;
213
+ that
214
+ .createExcelFile()
215
+ .then((resultMsg) => {
216
+ if (resultMsg.type === "success") {
217
+ let aObj = resultMsg.objx;
218
+ that.uuid = aObj.uuid;
219
+ that.nowDate = aObj.nowDate;
220
+ that.ippaaapp = aObj.ippaaapp;
221
+ setTimeout(function () {
222
+ /*num = 1;
223
+ loopToDo(0, num);*/
224
+ that.handleLoopToDo();
225
+ }, 300);
226
+ } else {
227
+ that.abortExport();
228
+ that.showImportDialog = false;
229
+ that.showImportDialog2 = false;
230
+ }
231
+ })
232
+ .catch((error) => {
233
+ console.error(error);
234
+ that.abortExport(that.$t1("创建导出文件失败,导出已中止"));
235
+ that.showImportDialog = false;
236
+ that.showImportDialog2 = false;
237
+ });
238
+ },
239
+ getExportPageSize() {
240
+ let pageSize = Math.min(this.option.pageSize || 1000, 1000);
241
+ let showImageAtTable = this.option.showImageAtTable || false;
242
+ let hasExportImage = !!this.leafColumns.find((item) => {
243
+ let exportType = item?.params?.exportType;
244
+ return exportType === "Image";
245
+ });
246
+ let hasExportImage2 = !!this.leafColumns.find((item) => {
247
+ let exportType = item?.params?.exportType;
248
+ return exportType === "Image2";
249
+ });
250
+ if (hasExportImage || (hasExportImage2 && showImageAtTable)) {
251
+ pageSize = Math.min(pageSize, 150);
252
+ }
253
+ return pageSize;
254
+ },
255
+ hadleMergeExcel(pPageSize) {
256
+ let that = this;
257
+ let title = this.title;
258
+ let options = this.option;
259
+ // let pPageSize = this.getExportPageSize();
260
+ let limitFileSize = options.limitFileSize || 100000;
261
+ let limitThreadNum = options.limitThreadNum || 5;
262
+ let totalPages = this.tTotalPage || 1;
263
+
264
+ let kTotalPages = parseInt(limitFileSize / pPageSize);
265
+
266
+ let fileNum = parseInt(totalPages / kTotalPages);
267
+ if (totalPages % kTotalPages !== 0) {
268
+ fileNum = fileNum + 1;
269
+ }
270
+
271
+ let currentIndex = 0;
272
+ let mtExcedNum = 0;
273
+ let mtExcedSuccessNum = 0;
274
+ const loopDo = () => {
275
+ let startPage = currentIndex + 1;
276
+ if (mtExcedNum < fileNum) {
277
+ mtExcedNum++;
278
+
279
+ let endPage = currentIndex + kTotalPages;
280
+ if (endPage > totalPages) {
281
+ endPage = totalPages;
282
+ }
283
+ if (startPage > endPage) {
284
+ // 页码越界属异常状态,中止并不再发出非法页码的合并请求
285
+ that.abortExport();
286
+ return;
287
+ }
288
+ currentIndex = endPage;
289
+
290
+ that
291
+ .mergeExcel(startPage, endPage)
292
+ .then(function (resultMsg3) {
293
+ if (resultMsg3.type === "success") {
294
+ mtExcedSuccessNum++;
295
+ let fileInfo = resultMsg3.objx;
296
+ let fileName = fileInfo.fileName;
297
+ let fileSize = fileInfo.fileSize;
298
+
299
+ let dataMap = {};
300
+ dataMap["startPage"] = startPage;
301
+ dataMap["endPage"] = endPage;
302
+ dataMap["title"] = title;
303
+ dataMap["uuid"] = fileName;
304
+ dataMap["fileSize"] = fileSize;
305
+ // fileRows.push(dataMap);
306
+
307
+ that.$refs["exportTable"].insertAt(dataMap, -1);
308
+
309
+ let fileSizeStr = fileSize;
310
+
311
+ // that.fileRows.push(dataMap);
312
+ if (mtExcedNum < fileNum) {
313
+ loopDo();
314
+ } else if (
315
+ mtExcedNum >= fileNum &&
316
+ mtExcedSuccessNum >= fileNum
317
+ ) {
318
+ setTimeout(function () {
319
+ that.percentageNum = parseInt(100);
320
+ }, 100);
321
+ that.clearExportTimer();
322
+ } else if (mtExcedSuccessNum >= fileNum) {
323
+ setTimeout(function () {
324
+ that.percentageNum = parseInt(100);
325
+ }, 100);
326
+ that.clearExportTimer();
327
+ }
328
+ } else {
329
+ that.abortExport();
330
+ }
331
+ })
332
+ .catch(function (e) {
333
+ console.error(e);
334
+ that.abortExport(that.$t1("文件合并异常,导出已中止"));
335
+ });
336
+ // 注意:此处不能同步 clearExportTimer,否则计时统计会在合并完成前被提前停掉
337
+ }
338
+ };
339
+ loopDo();
340
+ },
341
+ handleLoopToDo() {
342
+ let that = this;
343
+ let uuid;
344
+ let num = 0;
345
+ let title = this.title;
346
+
347
+ let options = this.option;
348
+
349
+ let pPageSize = this.getExportPageSize();
350
+ let limitFileSize = options.limitFileSize || 100000;
351
+ let limitThreadNum = options.limitThreadNum || 5;
352
+
353
+ /**处理返回值*/
354
+ this.doneSize = 0;
355
+ let excedNum = 0;
356
+ let cSize = this.doneSize;
357
+
358
+ let handleData = function (resultMsg) {
359
+ let pageNumber = resultMsg.objx.pageNumber || 1;
360
+ that
361
+ .addExcelData({
362
+ rows: resultMsg.objx.records,
363
+ pageNumber: pageNumber,
364
+ })
365
+ .then(function (resultMsg2) {
366
+ let data = resultMsg.objx;
367
+ let total = data.total;
368
+
369
+ let pageNumber = data.pageNumber || 1;
370
+ let totalPages = that.tTotalPage || 1;
371
+ if (resultMsg2.type === "success") {
372
+ excedNum++;
373
+ let pageNumber = data.pageNumber || 1;
374
+ let k = (excedNum * 100) / totalPages;
375
+ if (k > 0 && k < 1) {
376
+ k = 1;
377
+ }
378
+ if (k > 100) k = 100;
379
+ let cTotal = that.tTotalSize;
380
+ let pageSize = data.pageSize;
381
+ // let datas = data.records;
382
+ let size = data.records.length;
383
+ cSize = cSize + size;
384
+
385
+ let ttNum = cSize + "/" + cTotal;
386
+ let percentageStr = parseInt(k) + "%";
387
+
388
+ let percentageNum = k;
389
+ if (percentageNum >= 100) {
390
+ percentageNum = 99;
391
+ }
392
+ // that.$set(that, "doneSize", parseInt(cSize));
393
+ // that.$set(that, "percentageNum", parseInt(percentageNum));
394
+
395
+ that.doneSize = parseInt(cSize);
396
+ that.percentageNum = parseInt(percentageNum);
397
+
398
+ if (totalPages === 0 || excedNum >= totalPages) {
399
+ that.hadleMergeExcel(data.pageSize);
400
+ return;
401
+
402
+ /*let kTotalPages = parseInt(limitFileSize / data.pageSize);
403
+
404
+ let fileNum = parseInt(totalPages / kTotalPages);
405
+ if (totalPages % kTotalPages !== 0) {
406
+ fileNum = fileNum + 1;
407
+ }
408
+
409
+ let currentIndex = 0;
410
+ let excingNum = 0;
411
+ let mtExcedNum = 0;
412
+ let mtExcedSuccessNum = 0;
413
+
414
+ let fileRows = [];
415
+
416
+ setTimeout(function () {
417
+ let startPage = currentIndex + 1;
418
+ if (mtExcedNum < fileNum) {
419
+ if (excingNum >= limitThreadNum) return false;
420
+ excingNum++;
421
+ mtExcedNum++;
422
+
423
+ let endPage = currentIndex + kTotalPages;
424
+ if (endPage > totalPages) {
425
+ endPage = totalPages;
426
+ }
427
+ if (startPage > endPage) {
428
+ that.clearExportTimer();
429
+ }
430
+ currentIndex = endPage;
431
+
432
+ that.mergeExcel(startPage, endPage).then(function (resultMsg3) {
433
+ if (resultMsg3.type === "success") {
434
+ excingNum--;
435
+ mtExcedSuccessNum++;
436
+ let fileInfo = resultMsg3.objx;
437
+ let fileName = fileInfo.fileName;
438
+ let fileSize = fileInfo.fileSize;
439
+
440
+ let dataMap = {};
441
+ dataMap["startPage"] = startPage;
442
+ dataMap["endPage"] = endPage;
443
+ dataMap["title"] = title;
444
+ dataMap["uuid"] = fileName;
445
+ dataMap["fileSize"] = fileSize;
446
+ // fileRows.push(dataMap);
447
+
448
+ that.$refs["exportTable"].insertAt(
449
+ dataMap, -1);
450
+
451
+ let fileSizeStr = fileSize;
452
+
453
+ // that.fileRows.push(dataMap);
454
+
455
+ if (mtExcedNum >= fileNum && mtExcedSuccessNum >= fileNum) {
456
+ setTimeout(function () {
457
+ that.percentageNum =
458
+ parseInt(100);
459
+ }, 100);
460
+ that.clearExportTimer();
461
+ } else if (mtExcedSuccessNum >= fileNum) {
462
+ setTimeout(function () {
463
+ that.percentageNum = parseInt(100);
464
+ }, 100);
465
+ that.clearExportTimer();
466
+ }
467
+ } else {
468
+ that.clearExportTimer();
469
+ }
470
+ }).catch(function (e) {
471
+ console.error(e);
472
+ that.clearExportTimer();
473
+ });
474
+ that.clearExportTimer();
475
+ }
476
+ }, 100);*/
477
+ return false;
478
+ }
479
+ } else {
480
+ that.abortExport();
481
+ }
482
+ })
483
+ .catch(function (e) {
484
+ console.error(e);
485
+ that.abortExport(that.$t1("导出数据写入失败,导出已中止"));
486
+ });
487
+ };
488
+
489
+ let waitReqNum = 0;
490
+ let promise;
491
+ let loopToDo = function (flag, pageNumber, retryCount = 0) {
492
+ let maxWaitNum = limitThreadNum;
493
+ let nowDate = options.nowDate;
494
+ if (flag === 1) {
495
+ /*if (num > that.tTotalPage) {
496
+ let size = page.records.length;
497
+ if (size === 0 || page.totalPages === 0 || (page.pageNumber >= page.totalPages)) {
498
+ that.clearExportTimer();
499
+ return;
500
+ }
501
+ }*/
502
+ } else {
503
+ waitReqNum = 0;
504
+ }
505
+
506
+ let target = that.tableTarget;
507
+ let originOption = target.params.originOption;
508
+ let url = originOption.exportPath || originOption.path;
509
+
510
+ // let params = originOption.param() || {};
511
+ let params = that.queryParam;
512
+ let aParam = {
513
+ current: pageNumber,
514
+ size: pPageSize,
515
+ nowDate: nowDate,
516
+ searchCount: flag !== 1,
517
+ };
518
+ let cpParam;
519
+ if (originOption.vform === true) {
520
+ params.conditions = params.conditions || {};
521
+ cpParam = params.conditions;
522
+ } else {
523
+ cpParam = params;
524
+ }
525
+ Object.assign(cpParam, aParam);
526
+
527
+ if (!originOption.exportAjax) {
528
+ let turl = url.replace("searchCount=false", "1=1");
529
+ let finaParams = params;
530
+ if (originOption.paramHandle) {
531
+ finaParams = originOption.paramHandle
532
+ ? originOption.paramHandle(params) || {}
533
+ : {};
534
+ }
535
+ promise = that.$commonHttp({
536
+ aes: originOption.aes || false,
537
+ url: turl,
538
+ method: "post",
539
+ data: finaParams,
540
+ modal: false,
541
+ queryCreateInfo: originOption.queryCreateInfo,
542
+ addCreateInfo: originOption.addCreateInfo,
543
+ });
544
+ } else {
545
+ promise = originOption.exportAjax(aParam, options);
546
+ }
547
+
548
+ promise
549
+ .then(function (resultMsg) {
550
+ if (resultMsg.type === "success") {
551
+ let objx = resultMsg.objx;
552
+ objx.pageNumber = objx.current || 1;
553
+ objx.totalPages = objx.pages || 1;
554
+ objx.pageSize = objx.size;
555
+ let size = objx.records.length;
556
+ if (flag === 0) {
557
+ that.tTotalPage = objx.pages;
558
+ // that.tTotalSize = objx.total;
559
+ setTimeout(function () {
560
+ that.$set(that, "tTotalSize", objx.total);
561
+ }, 0);
562
+ let tTotalPage = objx.pages;
563
+ let tTotalSize = objx.total;
564
+ let ttNum = 0 + "/" + objx.total;
565
+
566
+ let opNum = limitFileSize;
567
+ let kTotalPages = parseInt(opNum / objx.size);
568
+
569
+ let fileNum = parseInt(tTotalPage / kTotalPages);
570
+ if (tTotalPage % kTotalPages !== 0) {
571
+ fileNum = fileNum + 1;
572
+ }
573
+ if (
574
+ size > 0 ||
575
+ objx.totalPages > 0 ||
576
+ objx.pageNumber < objx.totalPages
577
+ ) {
578
+ that.exportTimer = setInterval(function () {
579
+ if (waitReqNum < maxWaitNum && num < tTotalPage) {
580
+ waitReqNum++;
581
+ num++;
582
+ let pageNumber = num;
583
+ loopToDo(1, pageNumber);
584
+ }
585
+ if (num >= tTotalPage) {
586
+ // 所有页已派发,停掉调度器(数据写入完成与否由 handleData 计数判断)
587
+ clearInterval(that.exportTimer);
588
+ that.exportTimer = null;
589
+ }
590
+ }, 100);
591
+ } else {
592
+ clearInterval(that.exportTimer);
593
+ that.exportTimer = null;
594
+ }
595
+ } else {
596
+ if (waitReqNum > 0) waitReqNum--;
597
+ }
598
+
599
+ setTimeout(function () {
600
+ handleData(resultMsg, flag);
601
+ }, 1);
602
+ } else {
603
+ // 单页拉取失败自动重试一次;仍失败则中止(缺页合并会静默丢数据,必须中止)
604
+ if (retryCount < 1) {
605
+ setTimeout(function () {
606
+ loopToDo(flag, pageNumber, retryCount + 1);
607
+ }, 500);
608
+ } else {
609
+ that.abortExport();
610
+ }
611
+ }
612
+ })
613
+ .catch(function (e) {
614
+ console.error(e);
615
+ if (retryCount < 1) {
616
+ setTimeout(function () {
617
+ loopToDo(flag, pageNumber, retryCount + 1);
618
+ }, 500);
619
+ } else {
620
+ that.abortExport(
621
+ that.$t1("第{n}页数据拉取失败,导出已中止", {
622
+ n: pageNumber,
623
+ })
624
+ );
625
+ }
626
+ });
627
+ };
628
+
629
+ num = 1;
630
+ loopToDo(0, num);
631
+ },
632
+ createExcelFile(loading) {
633
+ let url1 = this.CURRENT_PREFIX + "/excel/createExcelTemplate";
634
+ let datas = this.getHeadTitleJson();
635
+ return this.$http({
636
+ url: url1,
637
+ method: "post",
638
+ headers: {
639
+ "Content-Type": "application/json;charset=utf-8",
640
+ },
641
+ data: datas,
642
+ modal: loading || false,
643
+ isLoading: loading,
644
+ });
645
+ },
646
+ /*getExportTitleJson() {
647
+ let target = this.tableTarget;
648
+ // let columns = target.getColumns();
649
+ let columns = this.columns;
650
+ let titles = [];
651
+ columns.forEach(column => {
652
+ if (column.title) {
653
+ // titles.push(column.title)
654
+ titles.push({
655
+ colspan: 1,
656
+ rowspan: 1,
657
+ title: column.title
658
+ });
659
+ }
660
+ });
661
+ return [titles];
662
+ },*/
663
+ computeRealColSpan(columns) {
664
+ // 深拷贝避免修改原数据(可选)
665
+ // const result = JSON.parse(JSON.stringify(columns));
666
+
667
+ function traverse(node) {
668
+ if (!node.children || node.children.length === 0) {
669
+ // 叶子节点:realColSpan = 原始 colSpan
670
+ node.realColSpan = node.colSpan || 1;
671
+ } else {
672
+ // 非叶子节点:递归处理子节点,然后求和
673
+ let sum = 0;
674
+ for (const child of node.children) {
675
+ traverse(child);
676
+ sum += child.realColSpan;
677
+ }
678
+ node.realColSpan = sum;
679
+ }
680
+ }
681
+
682
+ for (const col of columns) {
683
+ traverse(col);
684
+ }
685
+
686
+ return columns;
687
+ },
688
+ getHeadTitleJson() {
689
+ let that = this;
690
+ let target = this.tableTarget;
691
+ // let columns = target.getTableColumn().collectColumn;
692
+ let columns = this.columns;
693
+
694
+ this.computeRealColSpan(columns);
695
+
696
+ let maxRowNum = 0;
697
+ let loop = function (column, n) {
698
+ if (column.children && column.children.length > 0) {
699
+ let num = n + 1;
700
+ column.children.forEach((child) => {
701
+ return loop(child, num);
702
+ });
703
+ } else {
704
+ let num = n;
705
+ if (num > maxRowNum) maxRowNum = num;
706
+ }
707
+ };
708
+
709
+ columns.forEach((column) => {
710
+ if (column.title) {
711
+ loop(column, 0);
712
+ }
713
+ });
714
+ maxRowNum = maxRowNum + 1;
715
+
716
+ let titleArr = [];
717
+ let columnsArr = [columns];
718
+ for (let i = 0; i < maxRowNum; i++) {
719
+ let contents = [];
720
+ let items = columnsArr[i];
721
+ let nextArr = [];
722
+ let colspan = 1;
723
+ let rowspan = 1;
724
+ items.forEach((column, index) => {
725
+ if (column.title) {
726
+ if (column.children && column.children.length > 0) {
727
+ nextArr = nextArr.concat(column.children);
728
+ }
729
+
730
+ contents.push({
731
+ colspan: column.realColSpan,
732
+ rowspan: column.rowSpan,
733
+ title:
734
+ column.title !== null && column.title !== undefined
735
+ ? column.title
736
+ : "",
737
+ });
738
+ }
739
+ });
740
+ titleArr.push(contents);
741
+ if (nextArr.length > 0) columnsArr.push(nextArr);
742
+ }
743
+ return titleArr;
744
+ },
745
+ addExcelData(opts, loading) {
746
+ let target = opts.target;
747
+ let pageNumber = opts.pageNumber || 1;
748
+ let callback = opts.callback;
749
+ let datas = this.getExcelData(opts.rows);
750
+ let cUUid = this.uuid;
751
+ let ippaaapp = this.ippaaapp;
752
+ let url1 =
753
+ this.CURRENT_PREFIX +
754
+ "/excel/appendExcelData?uuid=" +
755
+ cUUid +
756
+ "&ippaaapp=" +
757
+ ippaaapp +
758
+ "&pageNumber=" +
759
+ pageNumber;
760
+ return this.$http({
761
+ url: url1,
762
+ method: "post",
763
+ headers: {
764
+ "Content-Type": "application/json;charset=utf-8",
765
+ },
766
+ data: datas,
767
+ modal: loading || false,
768
+ isLoading: loading || false,
769
+ });
770
+ },
771
+ mergeExcel(startPage, endPage, loading) {
772
+ let url1 =
773
+ this.CURRENT_PREFIX +
774
+ "/excel/mergeExcel?uuid=" +
775
+ this.uuid +
776
+ "&ippaaapp=" +
777
+ this.ippaaapp;
778
+ return this.$http({
779
+ url: url1 + "&startPage=" + startPage + "&endPage=" + endPage,
780
+ method: "post",
781
+ modal: loading || false,
782
+ isLoading: loading || false,
783
+ });
784
+ },
785
+ createCountTimer() {
786
+ this.excTime = 0;
787
+ let beginTime = new Date().getTime();
788
+ this.countTimer = setInterval(() => {
789
+ let nowTime = new Date().getTime();
790
+ let diffTime = (nowTime - beginTime) / 1000;
791
+ this.$set(this, "excTime", this.$baseLodash.round(diffTime, 2));
792
+ }, 100);
793
+ },
794
+ clearExportTimer() {
795
+ if (this.exportTimer) clearInterval(this.exportTimer);
796
+ if (this.countTimer) clearInterval(this.countTimer);
797
+ this.exportTimer = null;
798
+ this.countTimer = null;
799
+ },
800
+ /**
801
+ * 中止导出:停止全部定时器并把进度条置为错误态。
802
+ * @param {String} [msg] 需要额外弹给用户的提示;服务端已 toast 过的失败不传,避免重复提示。
803
+ */
804
+ abortExport(msg) {
805
+ this.clearExportTimer();
806
+ this.exportError = true;
807
+ if (msg) this.$baseAlert(msg);
808
+ },
809
+ isPicture: function (suffix) {
810
+ if (!suffix || suffix === "") {
811
+ return false;
812
+ }
813
+ suffix = suffix.toLowerCase();
814
+ let fileTypeMap = {
815
+ jpg: true,
816
+ jpeg: true,
817
+ png: true,
818
+ // gif: true,
819
+ bmp: true,
820
+ mpg: true,
821
+ };
822
+
823
+ let type = fileTypeMap[suffix];
824
+ if (undefined === type) {
825
+ return false;
826
+ }
827
+
828
+ return true;
829
+ },
830
+ /**
831
+ * 导出取值快路径:优先纯函数取值(filterVal → formatter → 原始字段),
832
+ * 只有真正配置了自定义渲染(renderCell/函数型 slots.default)的列才走
833
+ * getCellValue 的 vNode 挂载渲染兜底 —— 后者每个单元格要挂载一次 Vue
834
+ * 组件再爬 DOM,是导出耗时的大头。
835
+ * 字符串型 slots.default(具名插槽,如 xform 的 "widget")由 getCellValue
836
+ * 从 grid 作用域插槽解析后渲染;解析不到时其内部回退原始字段。
837
+ */
838
+ getExportCellValue(params) {
839
+ let column = params.column;
840
+ if (column.slots && typeof column.slots.filterVal === "function") {
841
+ return column.slots.filterVal(params);
842
+ }
843
+ let slotDefault = column.slots && column.slots.default;
844
+ let hasRenderFn =
845
+ !!column.renderCell ||
846
+ typeof slotDefault === "function" ||
847
+ typeof slotDefault === "string";
848
+ if (!hasRenderFn) {
849
+ let cellValue = params.row[column.field];
850
+ if (typeof column.formatter === "function") {
851
+ return column.formatter({
852
+ cellValue,
853
+ row: params.row,
854
+ column,
855
+ });
856
+ }
857
+ return cellValue;
858
+ }
859
+ return getCellValue(params);
860
+ },
861
+ getExcelData(rows) {
862
+ let that = this;
863
+
864
+ let showImageAtTable = this.option.showImageAtTable || false;
865
+ // let target = this.option.vue.$refs[this.option.targetRef];
866
+ let target = getGrid(this.option.vue, this.option.targetRef);
867
+ let $table = target.$refs.xTable;
868
+
869
+ // let columns = target.getColumns();
870
+ let columns = this.leafColumns.filter(
871
+ (column) => !column.params?.exportDisabled
872
+ );
873
+
874
+ let arr = [];
875
+ let contents;
876
+ let params;
877
+ let resultStr;
878
+ // 批量取值期间复用 vNode 渲染的临时实例,结束时统一销毁
879
+ rows.forEach(function (row, index) {
880
+ contents = [];
881
+ columns.forEach((column) => {
882
+ if (column.title) {
883
+ params = {
884
+ $table: $table,
885
+ row: row,
886
+ rowIndex: index,
887
+ $rowIndex: index,
888
+ column: column,
889
+ // columnIndex: 0,
890
+ // $columnIndex: 0,
891
+ // _columnIndex
892
+ };
893
+ let exportType = column.params?.exportType;
894
+ let exportVal =
895
+ column.params && column.params.exportVal
896
+ ? column.params.exportVal
897
+ : null;
898
+ if (exportVal) {
899
+ resultStr = exportVal(params);
900
+ } else if (exportType === "Number") {
901
+ resultStr = that.getExportCellValue(params);
902
+ if (
903
+ resultStr !== null &&
904
+ resultStr !== undefined &&
905
+ resultStr !== "" &&
906
+ !(resultStr + "").startsWith("[EXPNUM]")
907
+ ) {
908
+ resultStr = "[EXPNUM]" + resultStr;
909
+ }
910
+ } else if (
911
+ exportType === "Image" ||
912
+ (showImageAtTable && exportType === "Image2")
913
+ ) {
914
+ resultStr = that.getExportCellValue(params);
915
+ let attachments = row[column.field];
916
+ if (attachments) {
917
+ if (Array.isArray(attachments)) {
918
+ let items = attachments.filter((item) =>
919
+ that.isPicture(item.extension)
920
+ );
921
+ if (items.length > 0) {
922
+ resultStr =
923
+ "[EXPIMG]" +
924
+ items
925
+ .map((item) => {
926
+ let url = item.large || item.medium;
927
+ return item.domain + url;
928
+ })
929
+ .join(",");
930
+ } else {
931
+ resultStr = null;
932
+ }
933
+ } else {
934
+ if (
935
+ that.isPicture(
936
+ that.$commonFileUtil.getFileSuffix(resultStr)
937
+ )
938
+ ) {
939
+ if (
940
+ resultStr !== null &&
941
+ resultStr !== undefined &&
942
+ resultStr !== "" &&
943
+ !(resultStr + "").startsWith("[EXPIMG]")
944
+ ) {
945
+ resultStr = "[EXPIMG]" + resultStr;
946
+ }
947
+ } else {
948
+ resultStr = null;
949
+ }
950
+ }
951
+ } else {
952
+ resultStr = null;
953
+ }
954
+ } else {
955
+ resultStr = that.getExportCellValue(params);
956
+ }
957
+ contents.push(resultStr);
958
+ resultStr = null;
959
+ }
960
+ });
961
+ arr.push(contents);
962
+ });
963
+ return arr;
964
+ },
965
+ exportAll(row) {
966
+ let cUUid = encodeURIComponent(row.uuid);
967
+ let ippaaapp = this.ippaaapp;
968
+ let fileName = row.title;
969
+ let fileUrl =
970
+ configUtil.baseUrl +
971
+ this.CURRENT_PREFIX +
972
+ "/excel/download?uuid=" +
973
+ cUUid +
974
+ "&ippaaapp=" +
975
+ ippaaapp;
976
+
977
+ function downLoadFile2() {
978
+ let params = {
979
+ n: fileName,
980
+ };
981
+ params["access_token"] = configUtil.getToken();
982
+
983
+ let form = document.createElement("form");
984
+
985
+ let randomNum =
986
+ new Date().valueOf() + Math.floor(Math.random() * 1000000);
987
+ let formId = "formId-" + randomNum;
988
+ let formName = "formName-" + randomNum;
989
+
990
+ form.id = formId;
991
+ form.name = formName;
992
+ form.target = "_blank";
993
+ document.body.appendChild(form);
994
+ for (let obj in params) {
995
+ if (params.hasOwnProperty(obj)) {
996
+ let input = document.createElement("input");
997
+ input.type = "hidden";
998
+ input.name = obj;
999
+ input.value = params[obj];
1000
+ form.appendChild(input);
1001
+ }
1002
+ }
1003
+ form.method = "post"; //请求方式
1004
+ form.action = fileUrl;
1005
+ form.submit();
1006
+ document.body.removeChild(form);
1007
+ }
1008
+
1009
+ downLoadFile2();
1010
+ },
1011
+ startProcess2(datas) {
1012
+ this.tableTarget = getGrid(this.option.vue, this.option.targetRef);
1013
+ let that = this;
1014
+ let options = this.option;
1015
+ let title =
1016
+ options.title || this.$t2("导出", "components.excelExport.title");
1017
+ if (!options.prefix && options.prefix !== "") {
1018
+ let originOption = this.tableTarget.params.originOption;
1019
+ let path = originOption.exportPath || originOption.path;
1020
+ if (typeof path === "function") path = path();
1021
+ if (path && typeof path === "string" && path !== "#") {
1022
+ let os = path.split("/");
1023
+ if (path.indexOf("http://") >= 0 || path.indexOf("https://") >= 0) {
1024
+ options.prefix = "/" + os[3];
1025
+ } else {
1026
+ options.prefix = "/" + os[1];
1027
+ }
1028
+ }
1029
+ }
1030
+ if (!options.prefix) {
1031
+ this.$baseAlert(
1032
+ this.$t1("无法确定导出服务前缀,请在导出配置中指定 prefix")
1033
+ );
1034
+ return;
1035
+ }
1036
+ this.CURRENT_PREFIX = options.prefix;
1037
+
1038
+ let handleData = function () {
1039
+ let total = datas.length;
1040
+ that
1041
+ .addExcelData(
1042
+ {
1043
+ rows: datas,
1044
+ pageNumber: 1,
1045
+ },
1046
+ true
1047
+ )
1048
+ .then((resultMsg2) => {
1049
+ if (resultMsg2.type === "success") {
1050
+ setTimeout(() => {
1051
+ that.mergeExcel(1, 1, true).then((resultMsg3) => {
1052
+ if (resultMsg3.type === "success") {
1053
+ let fileInfo = resultMsg3.objx;
1054
+ let fileName = fileInfo.fileName;
1055
+ let fileSize = fileInfo.fileSize;
1056
+
1057
+ let dataMap = {};
1058
+ dataMap["startPage"] = 1;
1059
+ dataMap["endPage"] = 1;
1060
+ dataMap["title"] = title;
1061
+ dataMap["uuid"] = fileName;
1062
+ dataMap["fileSize"] = fileSize;
1063
+ that.exportAll(dataMap);
1064
+ }
1065
+ });
1066
+ }, 0);
1067
+ }
1068
+ });
1069
+ };
1070
+ that.createExcelFile(true).then((resultMsg) => {
1071
+ if (resultMsg.type === "success") {
1072
+ let aObj = resultMsg.objx;
1073
+ that.uuid = aObj.uuid;
1074
+ that.nowDate = aObj.nowDate;
1075
+ that.ippaaapp = aObj.ippaaapp;
1076
+ setTimeout(() => {
1077
+ handleData();
1078
+ }, 0);
1079
+ }
1080
+ });
1081
+ },
1082
+ closeExportFieldDialog() {
1083
+ this.dialogClose2();
1084
+ },
1085
+ confirmExportFieldDialog({ columns, leafColumns }) {
1086
+ this.columns = columns;
1087
+ this.leafColumns = leafColumns;
1088
+ let flag = isRowExport(this.option.type);
1089
+ if (!flag) {
1090
+ this.showImportDialog2 = true;
1091
+ }
1092
+ this.$nextTick(() => {
1093
+ if (flag) {
1094
+ let $grid = getGrid(this.option.vue, this.option.targetRef);
1095
+ let datas = [];
1096
+ if (this.option.type === "selected") {
1097
+ datas = $grid.getCheckboxRecords(true);
1098
+ if (!datas.length) {
1099
+ this.$baseAlert(
1100
+ this.$t2(
1101
+ "请选择导出的数据",
1102
+ "components.excelExport.warmMsg1"
1103
+ )
1104
+ );
1105
+ return;
1106
+ }
1107
+ } else if (this.option.type === "current") {
1108
+ datas = $grid.getTableData().fullData;
1109
+ if (!datas.length) {
1110
+ this.$baseAlert(
1111
+ this.$t2(
1112
+ "不存在可导出的数据",
1113
+ "components.excelExport.warmMsg2"
1114
+ )
1115
+ );
1116
+ return;
1117
+ }
1118
+ }
1119
+ this.startProcess2(datas);
1120
+ } else {
1121
+ this.startProcess();
1122
+ }
1123
+ });
1124
+ },
1125
+ lockMenu() {
1126
+ let vueTarget = window.$vueRoot;
1127
+ let path = vueTarget.$route.path;
1128
+ let visitedViews = vueTarget.$store.state.tagsView.visitedViews;
1129
+ if (visitedViews) {
1130
+ let currentItem = visitedViews.find((item) => item.path === path);
1131
+ if (currentItem && !currentItem.meta.affix) {
1132
+ this.$set(currentItem.meta, "affix", true);
1133
+ this.$set(currentItem.meta, "user_affix", true);
1134
+ }
1135
+ }
1136
+ },
1137
+ unlockMenu() {
1138
+ let vueTarget = window.$vueRoot;
1139
+ let path = vueTarget.$route.path;
1140
+ let visitedViews = vueTarget.$store.state.tagsView.visitedViews;
1141
+ if (visitedViews) {
1142
+ let currentItem = visitedViews.find((item) => item.path === path);
1143
+ if (currentItem && currentItem.meta.user_affix) {
1144
+ currentItem.meta.affix = false;
1145
+ currentItem.meta.user_affix = false;
1146
+ }
1147
+ }
1148
+ },
1149
+ },
1150
+ };
1151
+ })();
1152
+
1153
+ export const mixins = tmixins;