imatrix-ui 0.0.1-dsn

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 (393) hide show
  1. package/README.md +7 -0
  2. package/index.html +13 -0
  3. package/lib/super-ui.css +1 -0
  4. package/lib/super-ui.js +117579 -0
  5. package/lib/super-ui.umd.cjs +204 -0
  6. package/lib/vite.svg +1 -0
  7. package/package.json +35 -0
  8. package/packages/IntervalSelection/index.js +6 -0
  9. package/packages/IntervalSelection/src/quarterScope.vue +405 -0
  10. package/packages/IntervalSelection/src/sectionDate.vue +475 -0
  11. package/packages/breadcrumb/index.js +6 -0
  12. package/packages/breadcrumb/src/breadcrumb.vue +81 -0
  13. package/packages/department-tree/index.js +6 -0
  14. package/packages/department-tree/src/department-tree.vue +114 -0
  15. package/packages/department-tree-inline/index.js +6 -0
  16. package/packages/department-tree-inline/src/department-multi-tree-inline.vue +494 -0
  17. package/packages/department-tree-inline/src/department-single-tree-inline.vue +367 -0
  18. package/packages/department-tree-inline/src/department-tree-inline.vue +86 -0
  19. package/packages/department-tree-inline/src/department-tree-service.js +344 -0
  20. package/packages/department-tree-inline/src/search-result.vue +238 -0
  21. package/packages/department-user-tree/index.js +6 -0
  22. package/packages/department-user-tree/src/department-user-multiple-tree.vue +133 -0
  23. package/packages/department-user-tree/src/department-user-single-tree.vue +96 -0
  24. package/packages/department-user-tree/src/department-user-tree.vue +115 -0
  25. package/packages/department-user-tree-inline/index.js +9 -0
  26. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +757 -0
  27. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +357 -0
  28. package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +87 -0
  29. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +309 -0
  30. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +180 -0
  31. package/packages/department-user-tree-inline/src/search-result.vue +277 -0
  32. package/packages/directives/prevent-reclick.js +22 -0
  33. package/packages/dynamic-source-select/index.js +6 -0
  34. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +106 -0
  35. package/packages/dynamic-source-select/src/dynamic-source-select.vue +701 -0
  36. package/packages/dynamic-source-select/src/events.js +78 -0
  37. package/packages/fs-preview/index.js +6 -0
  38. package/packages/fs-preview/src/fs-preview.vue +287 -0
  39. package/packages/fs-upload/index.js +6 -0
  40. package/packages/fs-upload/src/fs-upload-multi.vue +448 -0
  41. package/packages/fs-upload/src/fs-upload-single.vue +353 -0
  42. package/packages/fs-upload/src/fs-upload.vue +191 -0
  43. package/packages/fs-upload/src/see-big-picture.vue +67 -0
  44. package/packages/fs-upload-list/index.js +6 -0
  45. package/packages/fs-upload-list/src/fs-upload-list.vue +375 -0
  46. package/packages/hamburger/index.js +6 -0
  47. package/packages/hamburger/src/hamburger.vue +42 -0
  48. package/packages/index.js +124 -0
  49. package/packages/multipart-upload/index.js +6 -0
  50. package/packages/multipart-upload/src/index.vue +66 -0
  51. package/packages/multipart-upload/src/multipart-upload-form.vue +383 -0
  52. package/packages/multipart-upload/src/multipart-upload-list.vue +527 -0
  53. package/packages/organization-input/index.js +6 -0
  54. package/packages/organization-input/src/organization-input.vue +579 -0
  55. package/packages/plugins/export-data-new.js +630 -0
  56. package/packages/plugins/export-data.js +431 -0
  57. package/packages/plugins/index.js +15 -0
  58. package/packages/plugins/public-method.js +47 -0
  59. package/packages/remove-department/index.js +6 -0
  60. package/packages/remove-department/src/remove-department.vue +201 -0
  61. package/packages/remove-department/src/remove-dept-service.js +31 -0
  62. package/packages/remove-user/index.js +6 -0
  63. package/packages/remove-user/src/remove-user-service.js +31 -0
  64. package/packages/remove-user/src/remove-user.vue +227 -0
  65. package/packages/remove-workgroup/index.js +6 -0
  66. package/packages/remove-workgroup/src/remove-workgroup-service.js +31 -0
  67. package/packages/remove-workgroup/src/remove-workgroup.vue +184 -0
  68. package/packages/rich-editor/index.js +7 -0
  69. package/packages/rich-editor/index.vue +314 -0
  70. package/packages/rich-editor/tinymce/icons/default/icons.min.js +1 -0
  71. package/packages/rich-editor/tinymce/langs/README.md +3 -0
  72. package/packages/rich-editor/tinymce/langs/zh-Hans.js +1 -0
  73. package/packages/rich-editor/tinymce/license.txt +21 -0
  74. package/packages/rich-editor/tinymce/models/dom/model.min.js +4 -0
  75. package/packages/rich-editor/tinymce/plugins/accordion/plugin.min.js +4 -0
  76. package/packages/rich-editor/tinymce/plugins/advlist/plugin.min.js +4 -0
  77. package/packages/rich-editor/tinymce/plugins/anchor/plugin.min.js +4 -0
  78. package/packages/rich-editor/tinymce/plugins/autolink/plugin.min.js +4 -0
  79. package/packages/rich-editor/tinymce/plugins/autoresize/plugin.min.js +4 -0
  80. package/packages/rich-editor/tinymce/plugins/autosave/plugin.min.js +4 -0
  81. package/packages/rich-editor/tinymce/plugins/charmap/plugin.min.js +4 -0
  82. package/packages/rich-editor/tinymce/plugins/code/plugin.min.js +4 -0
  83. package/packages/rich-editor/tinymce/plugins/codesample/plugin.min.js +4 -0
  84. package/packages/rich-editor/tinymce/plugins/directionality/plugin.min.js +4 -0
  85. package/packages/rich-editor/tinymce/plugins/emoticons/js/emojiimages.js +1 -0
  86. package/packages/rich-editor/tinymce/plugins/emoticons/js/emojiimages.min.js +3 -0
  87. package/packages/rich-editor/tinymce/plugins/emoticons/js/emojis.js +1 -0
  88. package/packages/rich-editor/tinymce/plugins/emoticons/js/emojis.min.js +2 -0
  89. package/packages/rich-editor/tinymce/plugins/emoticons/plugin.min.js +4 -0
  90. package/packages/rich-editor/tinymce/plugins/fullscreen/plugin.min.js +4 -0
  91. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ar.js +90 -0
  92. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +90 -0
  93. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ca.js +90 -0
  94. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/cs.js +90 -0
  95. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/da.js +90 -0
  96. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/de.js +90 -0
  97. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/el.js +90 -0
  98. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/en.js +90 -0
  99. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/es.js +90 -0
  100. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/eu.js +90 -0
  101. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/fa.js +90 -0
  102. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/fi.js +90 -0
  103. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +90 -0
  104. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/he_IL.js +90 -0
  105. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/hi.js +90 -0
  106. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/hr.js +90 -0
  107. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +90 -0
  108. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/id.js +90 -0
  109. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/it.js +90 -0
  110. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ja.js +90 -0
  111. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/kk.js +90 -0
  112. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +90 -0
  113. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ms.js +90 -0
  114. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +90 -0
  115. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/nl.js +90 -0
  116. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/pl.js +90 -0
  117. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +90 -0
  118. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +90 -0
  119. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ro.js +90 -0
  120. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ru.js +90 -0
  121. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/sk.js +90 -0
  122. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +90 -0
  123. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +90 -0
  124. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/th_TH.js +90 -0
  125. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/tr.js +90 -0
  126. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/uk.js +90 -0
  127. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/vi.js +90 -0
  128. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +84 -0
  129. package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +90 -0
  130. package/packages/rich-editor/tinymce/plugins/help/plugin.min.js +4 -0
  131. package/packages/rich-editor/tinymce/plugins/image/plugin.min.js +4 -0
  132. package/packages/rich-editor/tinymce/plugins/importcss/plugin.min.js +4 -0
  133. package/packages/rich-editor/tinymce/plugins/insertdatetime/plugin.min.js +4 -0
  134. package/packages/rich-editor/tinymce/plugins/link/plugin.min.js +4 -0
  135. package/packages/rich-editor/tinymce/plugins/lists/plugin.min.js +4 -0
  136. package/packages/rich-editor/tinymce/plugins/media/plugin.min.js +4 -0
  137. package/packages/rich-editor/tinymce/plugins/nonbreaking/plugin.min.js +4 -0
  138. package/packages/rich-editor/tinymce/plugins/pagebreak/plugin.min.js +4 -0
  139. package/packages/rich-editor/tinymce/plugins/preview/plugin.min.js +4 -0
  140. package/packages/rich-editor/tinymce/plugins/quickbars/plugin.min.js +4 -0
  141. package/packages/rich-editor/tinymce/plugins/save/plugin.min.js +4 -0
  142. package/packages/rich-editor/tinymce/plugins/searchreplace/plugin.min.js +4 -0
  143. package/packages/rich-editor/tinymce/plugins/table/plugin.min.js +4 -0
  144. package/packages/rich-editor/tinymce/plugins/template/plugin.min.js +4 -0
  145. package/packages/rich-editor/tinymce/plugins/visualblocks/plugin.min.js +4 -0
  146. package/packages/rich-editor/tinymce/plugins/visualchars/plugin.min.js +4 -0
  147. package/packages/rich-editor/tinymce/plugins/wordcount/plugin.min.js +4 -0
  148. package/packages/rich-editor/tinymce/skins/content/dark/content.js +2 -0
  149. package/packages/rich-editor/tinymce/skins/content/dark/content.min.css +1 -0
  150. package/packages/rich-editor/tinymce/skins/content/default/content.js +2 -0
  151. package/packages/rich-editor/tinymce/skins/content/default/content.min.css +1 -0
  152. package/packages/rich-editor/tinymce/skins/content/document/content.js +2 -0
  153. package/packages/rich-editor/tinymce/skins/content/document/content.min.css +1 -0
  154. package/packages/rich-editor/tinymce/skins/content/tinymce-5/content.js +2 -0
  155. package/packages/rich-editor/tinymce/skins/content/tinymce-5/content.min.css +1 -0
  156. package/packages/rich-editor/tinymce/skins/content/tinymce-5-dark/content.js +2 -0
  157. package/packages/rich-editor/tinymce/skins/content/tinymce-5-dark/content.min.css +1 -0
  158. package/packages/rich-editor/tinymce/skins/content/writer/content.js +2 -0
  159. package/packages/rich-editor/tinymce/skins/content/writer/content.min.css +1 -0
  160. package/packages/rich-editor/tinymce/skins/ui/oxide/content.inline.js +2 -0
  161. package/packages/rich-editor/tinymce/skins/ui/oxide/content.inline.min.css +1 -0
  162. package/packages/rich-editor/tinymce/skins/ui/oxide/content.js +2 -0
  163. package/packages/rich-editor/tinymce/skins/ui/oxide/content.min.css +1 -0
  164. package/packages/rich-editor/tinymce/skins/ui/oxide/skin.js +2 -0
  165. package/packages/rich-editor/tinymce/skins/ui/oxide/skin.min.css +1 -0
  166. package/packages/rich-editor/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
  167. package/packages/rich-editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
  168. package/packages/rich-editor/tinymce/skins/ui/oxide-dark/content.inline.js +2 -0
  169. package/packages/rich-editor/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -0
  170. package/packages/rich-editor/tinymce/skins/ui/oxide-dark/content.js +2 -0
  171. package/packages/rich-editor/tinymce/skins/ui/oxide-dark/content.min.css +1 -0
  172. package/packages/rich-editor/tinymce/skins/ui/oxide-dark/skin.js +2 -0
  173. package/packages/rich-editor/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
  174. package/packages/rich-editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
  175. package/packages/rich-editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
  176. package/packages/rich-editor/tinymce/skins/ui/tinymce-5/content.inline.js +2 -0
  177. package/packages/rich-editor/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -0
  178. package/packages/rich-editor/tinymce/skins/ui/tinymce-5/content.js +2 -0
  179. package/packages/rich-editor/tinymce/skins/ui/tinymce-5/content.min.css +1 -0
  180. package/packages/rich-editor/tinymce/skins/ui/tinymce-5/skin.js +2 -0
  181. package/packages/rich-editor/tinymce/skins/ui/tinymce-5/skin.min.css +1 -0
  182. package/packages/rich-editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
  183. package/packages/rich-editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
  184. package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/content.inline.js +2 -0
  185. package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -0
  186. package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/content.js +2 -0
  187. package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -0
  188. package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/skin.js +2 -0
  189. package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -0
  190. package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
  191. package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
  192. package/packages/rich-editor/tinymce/themes/silver/theme.min.js +4 -0
  193. package/packages/rich-editor/tinymce/tinymce.d.ts +3238 -0
  194. package/packages/rich-editor/tinymce/tinymce.min.js +4 -0
  195. package/packages/rich-editor/tinymce/zh_CN.js +418 -0
  196. package/packages/rich-editor/viewer.vue +105 -0
  197. package/packages/scan-code-input/index.js +6 -0
  198. package/packages/scan-code-input/src/events.js +34 -0
  199. package/packages/scan-code-input/src/scan-code-input-colse.vue +140 -0
  200. package/packages/scan-code-input/src/scan-code-input.vue +132 -0
  201. package/packages/secret-info/index.js +7 -0
  202. package/packages/secret-info/index.vue +100 -0
  203. package/packages/super-grid/index.js +7 -0
  204. package/packages/super-grid/src/apis.js +1189 -0
  205. package/packages/super-grid/src/columns-config.vue +429 -0
  206. package/packages/super-grid/src/custom-formatter.js +430 -0
  207. package/packages/super-grid/src/dynamic-input.vue +1443 -0
  208. package/packages/super-grid/src/eventBus.js +10 -0
  209. package/packages/super-grid/src/events.js +56 -0
  210. package/packages/super-grid/src/formValidatorUtil.js +300 -0
  211. package/packages/super-grid/src/formatter.js +196 -0
  212. package/packages/super-grid/src/group-column.vue +99 -0
  213. package/packages/super-grid/src/header-context-menu.vue +82 -0
  214. package/packages/super-grid/src/index-column.vue +69 -0
  215. package/packages/super-grid/src/normal-column.vue +1233 -0
  216. package/packages/super-grid/src/public-methods.js +30 -0
  217. package/packages/super-grid/src/row-operation.vue +193 -0
  218. package/packages/super-grid/src/search-button.vue +79 -0
  219. package/packages/super-grid/src/search-condition-input.vue +74 -0
  220. package/packages/super-grid/src/search-condition-list.vue +70 -0
  221. package/packages/super-grid/src/search-form-advancedQuery.vue +833 -0
  222. package/packages/super-grid/src/search-form-dialog.vue +77 -0
  223. package/packages/super-grid/src/search-form-item.vue +496 -0
  224. package/packages/super-grid/src/search-form-number.vue +111 -0
  225. package/packages/super-grid/src/search-form-open.vue +178 -0
  226. package/packages/super-grid/src/search-form-ordinarySearch.vue +248 -0
  227. package/packages/super-grid/src/search-form.vue +767 -0
  228. package/packages/super-grid/src/search-methods.js +591 -0
  229. package/packages/super-grid/src/selection-column.vue +46 -0
  230. package/packages/super-grid/src/store.js +3 -0
  231. package/packages/super-grid/src/super-grid-service.js +728 -0
  232. package/packages/super-grid/src/super-grid.vue +2941 -0
  233. package/packages/super-grid/src/utils.js +880 -0
  234. package/packages/super-grid/src/view-image-dialog.vue +177 -0
  235. package/packages/super-nine-grid/index.js +7 -0
  236. package/packages/super-nine-grid/src/apis.js +108 -0
  237. package/packages/super-nine-grid/src/custom-formatter.js +73 -0
  238. package/packages/super-nine-grid/src/formatter.js +134 -0
  239. package/packages/super-nine-grid/src/search-form-number.vue +35 -0
  240. package/packages/super-nine-grid/src/search-form.vue +704 -0
  241. package/packages/super-nine-grid/src/search-methods.js +151 -0
  242. package/packages/super-nine-grid/src/store.js +3 -0
  243. package/packages/super-nine-grid/src/super-grid-service.js +107 -0
  244. package/packages/super-nine-grid/src/super-nine-grid.vue +1191 -0
  245. package/packages/super-nine-grid/src/utils.js +264 -0
  246. package/packages/svg-icon/index.js +6 -0
  247. package/packages/svg-icon/src/svg-icon.vue +43 -0
  248. package/packages/utils/date-util.js +292 -0
  249. package/packages/utils/dom.js +227 -0
  250. package/packages/utils/gogocodeTransfer.js +59 -0
  251. package/packages/utils/memory-cache-utils.js +117 -0
  252. package/packages/utils/utils.js +180 -0
  253. package/packages/utils/value-set.js +97 -0
  254. package/packages/valid-code/index.js +7 -0
  255. package/packages/valid-code/src/valid-code.vue +104 -0
  256. package/packages/workflow-button/index.js +6 -0
  257. package/packages/workflow-button/src/workflow-button.vue +553 -0
  258. package/packages/workflow-history-list/index.js +6 -0
  259. package/packages/workflow-history-list/src/api.js +7 -0
  260. package/packages/workflow-history-list/src/workflow-history-list.vue +291 -0
  261. package/packages/workgroup-tree/index.js +6 -0
  262. package/packages/workgroup-tree/src/workgroup-tree.vue +87 -0
  263. package/packages/workgroup-tree-inline/index.js +6 -0
  264. package/packages/workgroup-tree-inline/src/search-result.vue +226 -0
  265. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +539 -0
  266. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +93 -0
  267. package/packages/workgroup-user-tree/index.js +6 -0
  268. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +104 -0
  269. package/packages/workgroup-user-tree-inline/index.js +9 -0
  270. package/packages/workgroup-user-tree-inline/src/search-result.vue +270 -0
  271. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +239 -0
  272. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +681 -0
  273. package/packages/year-range-picker/index.js +6 -0
  274. package/packages/year-range-picker/src/year-range-picker.vue +53 -0
  275. package/public/vite.svg +1 -0
  276. package/src/api/sso-service.js +178 -0
  277. package/src/api/tab.js +36 -0
  278. package/src/api/user-service.js +11 -0
  279. package/src/assets/401/401.gif +0 -0
  280. package/src/assets/404/404-cloud.png +0 -0
  281. package/src/assets/404/404.png +0 -0
  282. package/src/assets/cloud.png +0 -0
  283. package/src/directives/permission/index.js +13 -0
  284. package/src/directives/permission/permission.js +20 -0
  285. package/src/i18n/i18n.js +16 -0
  286. package/src/i18n/langs/cn.js +265 -0
  287. package/src/i18n/langs/en.js +275 -0
  288. package/src/index.js +93 -0
  289. package/src/permission.js +182 -0
  290. package/src/plugins.js +18 -0
  291. package/src/router/index.js +92 -0
  292. package/src/store/getters.js +15 -0
  293. package/src/store/index.js +19 -0
  294. package/src/store/modules/app.js +54 -0
  295. package/src/store/modules/permission.js +145 -0
  296. package/src/store/modules/tab-content.js +36 -0
  297. package/src/store/modules/user.js +298 -0
  298. package/src/styles/display-layout.scss +34 -0
  299. package/src/styles/element-ui.scss +29 -0
  300. package/src/styles/index.scss +157 -0
  301. package/src/styles/mixin.scss +27 -0
  302. package/src/styles/theme/black/font-style.scss +70 -0
  303. package/src/styles/theme/black/index.scss +306 -0
  304. package/src/styles/theme/black/sidebar.scss +189 -0
  305. package/src/styles/theme/blue/font-style.scss +46 -0
  306. package/src/styles/theme/blue/index.scss +172 -0
  307. package/src/styles/theme/blue/sidebar.scss +171 -0
  308. package/src/styles/theme/blue2/font-style.scss +70 -0
  309. package/src/styles/theme/blue2/index.scss +188 -0
  310. package/src/styles/theme/blue2/sidebar.scss +201 -0
  311. package/src/styles/theme/dark-blue/button.scss +78 -0
  312. package/src/styles/theme/dark-blue/card.scss +62 -0
  313. package/src/styles/theme/dark-blue/checkbox.scss +10 -0
  314. package/src/styles/theme/dark-blue/dark-blue-var.scss +9 -0
  315. package/src/styles/theme/dark-blue/dialog.scss +21 -0
  316. package/src/styles/theme/dark-blue/element-variables.scss +7 -0
  317. package/src/styles/theme/dark-blue/font.scss +71 -0
  318. package/src/styles/theme/dark-blue/form.scss +51 -0
  319. package/src/styles/theme/dark-blue/index.scss +273 -0
  320. package/src/styles/theme/dark-blue/input.scss +15 -0
  321. package/src/styles/theme/dark-blue/message.scss +8 -0
  322. package/src/styles/theme/dark-blue/pagination.scss +18 -0
  323. package/src/styles/theme/dark-blue/radio.scss +13 -0
  324. package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
  325. package/src/styles/theme/dark-blue/sidebar.scss +268 -0
  326. package/src/styles/theme/dark-blue/tab.scss +83 -0
  327. package/src/styles/theme/dark-blue/table.scss +60 -0
  328. package/src/styles/theme/dark-blue/tree.scss +57 -0
  329. package/src/styles/theme/dark-blue/var.scss +1028 -0
  330. package/src/styles/theme/gray/card-style.scss +54 -0
  331. package/src/styles/theme/gray/font-style.scss +70 -0
  332. package/src/styles/theme/gray/index.scss +172 -0
  333. package/src/styles/theme/gray/input-style.scss +19 -0
  334. package/src/styles/theme/gray/scrollbar-style.scss +32 -0
  335. package/src/styles/theme/gray/sidebar.scss +243 -0
  336. package/src/styles/theme/gray/tab-style.scss +81 -0
  337. package/src/styles/transition.scss +47 -0
  338. package/src/utils/auth-api.js +206 -0
  339. package/src/utils/auth.js +85 -0
  340. package/src/utils/calculator/calculator-factory-wf.js +558 -0
  341. package/src/utils/calculator/calculator-factory.js +145 -0
  342. package/src/utils/calculator/calculator-util.js +166 -0
  343. package/src/utils/common-util.js +467 -0
  344. package/src/utils/eventBus.js +10 -0
  345. package/src/utils/iconUtils.js +37 -0
  346. package/src/utils/index.js +102 -0
  347. package/src/utils/jump-page-utils.js +824 -0
  348. package/src/utils/local-storage.js +33 -0
  349. package/src/utils/menu.js +19 -0
  350. package/src/utils/permission.js +31 -0
  351. package/src/utils/permissionAuth.js +98 -0
  352. package/src/utils/range-selector.js +188 -0
  353. package/src/utils/request.js +269 -0
  354. package/src/utils/restful-interface-utils.js +57 -0
  355. package/src/utils/util.js +742 -0
  356. package/src/utils/validate.js +34 -0
  357. package/src/utils/watermark.js +108 -0
  358. package/src/utils/workflow-util.js +104 -0
  359. package/src/views/404.vue +248 -0
  360. package/src/views/dsc-component/Sidebar/Item.vue +81 -0
  361. package/src/views/dsc-component/Sidebar/Link.vue +38 -0
  362. package/src/views/dsc-component/Sidebar/SidebarItem.vue +197 -0
  363. package/src/views/dsc-component/Sidebar/index.vue +229 -0
  364. package/src/views/dsc-component/tabs/tab-content.vue +203 -0
  365. package/src/views/error-page/401.vue +106 -0
  366. package/src/views/error-page/404.vue +248 -0
  367. package/src/views/layout/EmptyLayout.vue +3 -0
  368. package/src/views/layout/Layout.vue +81 -0
  369. package/src/views/layout/NewLayout.vue +18 -0
  370. package/src/views/layout/components/AppMain.vue +39 -0
  371. package/src/views/layout/components/Breadcrumb/index.vue +158 -0
  372. package/src/views/layout/components/Menubar/Item.vue +79 -0
  373. package/src/views/layout/components/Menubar/Link.vue +38 -0
  374. package/src/views/layout/components/Menubar/SidebarItem.vue +164 -0
  375. package/src/views/layout/components/Menubar/index.vue +210 -0
  376. package/src/views/layout/components/Sidebar/Item.vue +53 -0
  377. package/src/views/layout/components/Sidebar/Link.vue +38 -0
  378. package/src/views/layout/components/Sidebar/SidebarItem.vue +135 -0
  379. package/src/views/layout/components/Sidebar/index.vue +141 -0
  380. package/src/views/layout/components/iframe-page.vue +38 -0
  381. package/src/views/layout/components/index.js +4 -0
  382. package/src/views/layout/components/tabs/tab-content.vue +207 -0
  383. package/src/views/layout/mixin/ResizeHandler.js +41 -0
  384. package/src/views/layout/tab-content-iframe-index.vue +38 -0
  385. package/src/views/layout/tab-content-index.vue +93 -0
  386. package/src/views/login/authredirect.vue +10 -0
  387. package/src/views/login/index.vue +296 -0
  388. package/src/views/login/update-password.vue +243 -0
  389. package/src/views/redirect/index.vue +14 -0
  390. package/src/views/svg-icon/index.js +6 -0
  391. package/src/views/svg-icon/src/svg-icon.vue +46 -0
  392. package/src/views/wf-history/tache-subprocess-history.vue +45 -0
  393. package/vite.config.js +37 -0
@@ -0,0 +1,1443 @@
1
+ <template>
2
+ <div v-if="type && type.indexOf('custom:')>=0 && componentName != ''" :style="(row.validateErrorField && row.validateErrorField === column.prop) ?'border:1px solid red':''">
3
+ <component
4
+ :is="componentName"
5
+ ref="customItem"
6
+ :disabled="disabled"
7
+ :entity="row"
8
+ :grid-data="gridData"
9
+ :page-grid-data="pageGridData"
10
+ :parent="parentFormData"
11
+ :prop="column.prop"
12
+ :row="row"
13
+ :row-index="position?position.row:null"
14
+ :select-options="options"
15
+ :value="innerValue"
16
+ @change="cellEvent('change',$event)"
17
+ @input="cellEvent('input',$event)"
18
+ />
19
+ </div>
20
+ <div v-else :style="(row.validateErrorField && row.validateErrorField === column.prop) ?'border:1px solid red':''">
21
+ <!--必须有@input ,否则无法输入值-->
22
+ <el-date-picker
23
+ v-if="type==='year' || type==='month'"
24
+ ref="item"
25
+ v-model="innerValue"
26
+ :disabled="disabled"
27
+ :editable="false"
28
+ :format="isFormat()"
29
+ :placeholder="$t('imatrixUIMessage.selectTime')"
30
+ :type="type"
31
+ :value-format="isValueFormat()"
32
+ style="width: 100%;"
33
+ @blur="cellEvent('blur',$event)"
34
+ @change="cellEvent('change',$event)"
35
+ @focus="cellEvent('focus',$event)"
36
+ @input="cellEvent('input',$event)"
37
+ />
38
+ <el-date-picker
39
+ v-if="type==='yearRange'"
40
+ ref="item"
41
+ v-model="innerValue"
42
+ :disabled="disabled"
43
+ :editable="false"
44
+ :placeholder="$t('imatrixUIMessage.selectYear')"
45
+ style="width: 100%;"
46
+ type="year"
47
+ value-format="YYYY"
48
+ @blur="cellEvent('blur',$event)"
49
+ @change="cellEvent('change',$event)"
50
+ @focus="cellEvent('focus',$event)"
51
+ @input="cellEvent('input',$event)"
52
+ />
53
+ <!--必须有@input ,否则无法输入值-->
54
+ <el-date-picker
55
+ v-else-if="type==='dateTimePicker'"
56
+ ref="item"
57
+ v-model="innerValue"
58
+ :disabled="disabled"
59
+ :editable="false"
60
+ :format="isFormat()"
61
+ :placeholder="$t('imatrixUIMessage.selectTime')"
62
+ :value-format="isValueFormat()"
63
+ style="width: 100%;"
64
+ type="datetime"
65
+ @blur="cellEvent('blur',$event)"
66
+ @change="cellEvent('change',$event)"
67
+ @focus="cellEvent('focus',$event)"
68
+ @input="cellEvent('input',$event)"
69
+ />
70
+ <el-date-picker
71
+ v-else-if="type==='date' || column.dataType === 'DATE'"
72
+ ref="item"
73
+ v-model="innerValue"
74
+ :disabled="disabled"
75
+ :editable="false"
76
+ :format="isFormat()"
77
+ :picker-options="pickerOptions"
78
+ :placeholder="$t('imatrixUIMessage.selectionDate')"
79
+ :value-format="isValueFormat()"
80
+ style="width: 100%;"
81
+ type="date"
82
+ @blur="cellEvent('blur',$event)"
83
+ @change="cellEvent('change',$event)"
84
+ @focus="cellEvent('focus',$event)"
85
+ @input="cellEvent('input',$event)"
86
+ />
87
+ <!--必须有@input ,否则无法输入值-->
88
+ <el-date-picker
89
+ v-else-if="type==='time' || column.dataType === 'TIME'"
90
+ ref="item"
91
+ v-model="innerValue"
92
+ :disabled="disabled"
93
+ :editable="false"
94
+ :format="isFormat()"
95
+ :placeholder="$t('imatrixUIMessage.selectTime')"
96
+ :value-format="isValueFormat()"
97
+ style="width: 100%;"
98
+ type="datetime"
99
+ @blur="cellEvent('blur',$event)"
100
+ @change="cellEvent('change',$event)"
101
+ @focus="cellEvent('focus',$event)"
102
+ @input="cellEvent('input',$event)"
103
+ />
104
+ <el-time-picker
105
+ v-else-if="type==='timePicker'"
106
+ ref="item"
107
+ v-model="innerValue"
108
+ :disabled="disabled"
109
+ :format="isFormat()"
110
+ :placeholder="$t('imatrixUIMessage.pleaseEnterATimePoint')"
111
+ :value-format="isValueFormat()"
112
+ style="width: 100%;"
113
+ @blur="cellEvent('blur',$event)"
114
+ @change="cellEvent('change',$event)"
115
+ @focus="cellEvent('focus',$event)"
116
+ @input="cellEvent('input',$event)"
117
+ />
118
+
119
+ <!--必须有@input ,否则无法输入值,如果是数字类型需要加上.number修饰符-->
120
+ <el-input
121
+ v-else-if="type==='input' && (column.dataType === 'INTEGER' || column.dataType === 'LONG' )"
122
+ ref="item"
123
+ v-model.number="innerValue"
124
+ :disabled="disabled"
125
+ :placeholder="$t('imatrixUIMessage.pleaseEnterContent')"
126
+ :title="innerValue"
127
+ clearable
128
+ @blur="cellEvent('blur',$event)"
129
+ @change="cellEvent('change', $event)"
130
+ @clear="cellEvent('clear', $event)"
131
+ @focus="cellEvent('focus',$event)"
132
+ @input="cellEvent('input',$event,true)"
133
+ />
134
+ <!--必须有@input ,否则无法输入值-->
135
+ <el-input
136
+ v-else-if="type==='input'"
137
+ ref="item"
138
+ v-model="innerValue"
139
+ :disabled="disabled"
140
+ :maxlength="controlConfig.maxlength?controlConfig.maxlength:''"
141
+ :minlength="controlConfig.minlength?controlConfig.minlength:''"
142
+ :placeholder="$t('imatrixUIMessage.pleaseEnterContent')"
143
+ :title="innerValue"
144
+ clearable
145
+ @blur="cellEvent('blur',$event)"
146
+ @change="cellEvent('change', $event)"
147
+ @clear="cellEvent('clear', $event)"
148
+ @focus="cellEvent('focus',$event)"
149
+ @input="cellEvent('input',$event,true)"
150
+ />
151
+
152
+ <el-input
153
+ v-else-if="type==='textarea'"
154
+ ref="item"
155
+ v-model="innerValue"
156
+ :disabled="disabled"
157
+ :maxlength="controlConfig.maxlength?controlConfig.maxlength:''"
158
+ :minlength="controlConfig.minlength?controlConfig.minlength:''"
159
+ :placeholder="$t('imatrixUIMessage.pleaseEnterContent')"
160
+ :rows="1"
161
+ :title="innerValue"
162
+ clearable
163
+ type="textarea"
164
+ @blur="cellEvent('blur',$event)"
165
+ @change="cellEvent('change', $event)"
166
+ @clear="cellEvent('clear', $event)"
167
+ @focus="cellEvent('focus',$event)"
168
+ @input="cellEvent('input',$event)"
169
+ />
170
+ <fs-upload-list
171
+ v-else-if="type==='annex'"
172
+ :custom-view-url="true"
173
+ :disabled="disabled"
174
+ :file-info="fileInfo"
175
+ :file-list="fileList"
176
+ :file-set-obj="fileSetObj"
177
+ :is-sql="isSql"
178
+ :row="row"
179
+ :value="innerValue"
180
+ @delete="deleteFile"
181
+ @delete-success="deleteSuccess"
182
+ @upload-success="uploadOnSuccess"
183
+ />
184
+ <multipart-upload
185
+ v-else-if="type==='multipartUpload'"
186
+ :disabled="disabled"
187
+ :entity="row"
188
+ :file-info="fileInfo"
189
+ :file-list="fileList"
190
+ :file-set-obj="fileSetObj"
191
+ :value="innerValue"
192
+ type="list"
193
+ @delete="deleteFile"
194
+ @delete-success="deleteSuccess"
195
+ @upload-success="uploadOnSuccess"
196
+ />
197
+ <!-- <el-input
198
+ v-else-if="type==='annex' && !fileMultiple"
199
+ ref="item"
200
+ :value="innerValue"
201
+ :readonly="true"
202
+ :disabled="disabled"
203
+ :placeholder="$t('imatrixUIMessage.pleaseEnterContent')"
204
+ >
205
+ <el-button slot="append" size="default" :disabled="disabled" icon="el-icon-upload2" @click="openAnnexUpload" />
206
+ <el-button v-if="innerValue" slot="append" :disabled="disabled" size="default" icon="el-icon-zoom-in" @click="previewImg" />
207
+ </el-input>
208
+
209
+ <el-input
210
+ v-else-if="type==='annex' && fileMultiple"
211
+ ref="item"
212
+ :value="lastFileName"
213
+ :readonly="true"
214
+ :disabled="disabled"
215
+ :placeholder="$t('imatrixUIMessage.pleaseEnterContent')"
216
+ >
217
+ <el-button slot="append" size="default" :disabled="disabled" icon="el-icon-upload2" @click="openAnnexUpload" />
218
+ <el-button v-if="innerValue" slot="append" :disabled="disabled" size="default" icon="el-icon-zoom-in" @click="previewImg" />
219
+ </el-input> -->
220
+
221
+ <!-- <custom-fma v-if="type==null ||type === ''" /> -->
222
+ <!-- v-model="newValue" -->
223
+ <!--必须有@input ,否则无法输入值-->
224
+ <el-select
225
+ v-else-if="type==='select' && !isDynamicDataSourceSource()"
226
+ ref="item"
227
+ v-model="innerValue"
228
+ :allow-create="controlConfig.allowCreate?true:false"
229
+ :clearable="controlConfig.clearable?true:false"
230
+ :default-first-option="controlConfig.allowCreate?true:false"
231
+ :disabled="disabled"
232
+ :filterable="controlConfig.filterable?true:false"
233
+ :placeholder="$t('imatrixUIMessage.pleaseSelect')"
234
+ :title="getClassOptionTitle(innerValue)"
235
+ @blur="cellEvent('blur',$event)"
236
+ @change="cellEvent('change',$event)"
237
+ @clear="cellEvent('clear',$event)"
238
+ @focus="cellEvent('focus',$event)"
239
+ @input="cellEvent('input',$event)"
240
+ @visible-change="cellEvent('visible-change',$event)"
241
+ >
242
+ <el-option
243
+ v-for="item in options"
244
+ :key="item.value"
245
+ :label="item.label"
246
+ :value="item.value"
247
+ />
248
+ </el-select>
249
+ <!--必须有@input ,否则无法输入值-->
250
+ <el-select
251
+ v-else-if="type==='multiselect' && !isDynamicDataSourceSource()"
252
+ ref="item"
253
+ v-model="innerValue"
254
+ :disabled="disabled"
255
+ :placeholder="$t('imatrixUIMessage.pleaseSelect')"
256
+ :title="getClassOptionTitle(innerValue)"
257
+ clearable
258
+ collapse-tags
259
+ multiple
260
+ @blur="cellEvent('blur',$event)"
261
+ @change="multiselectChange"
262
+ @clear="cellEvent('clear',$event)"
263
+ @focus="cellEvent('focus',$event)"
264
+ @input="cellEvent('input',$event)"
265
+ @visible-change="cellEvent('visible-change',$event)"
266
+ @remove-tag="cellEvent('remove-tag',$event)"
267
+ >
268
+ <el-option :label="$t('superGrid.selectAll')" value="saveAll"/>
269
+ <el-option
270
+ v-for="item in options"
271
+ :key="item.value"
272
+ :label="item.label"
273
+ :value="item.value"
274
+ />
275
+ </el-select>
276
+ <dynamic-source-select
277
+ v-else-if="(type==='multiselect' || type==='select') && isDynamicDataSourceSource()"
278
+ v-model="innerValue"
279
+ :base-props="{
280
+ multiple: type==='multiselect'?true:false,
281
+ disabled:disabled
282
+ }"
283
+ :column="column"
284
+ :entity="row"
285
+ :is-join-table="isJoinTable"
286
+ :list-code="listCode"
287
+ :list-toolbar-form-data="listToolbarFormData"
288
+ :options="{
289
+ dynamicDataSourceCode:dynamicDataSourceCode,
290
+ valueSetOptions:valueSetOptions,
291
+ isSql:isSql,
292
+ additionalParameter: additionalParamMap?JSON.stringify(additionalParamMap):null
293
+ }"
294
+ :parent="parentFormData"
295
+ :table-name="tableName"
296
+ @blur="cellEvent('blur',$event)"
297
+ @change="multiselectChange"
298
+ @clear="cellEvent('clear',$event)"
299
+ @focus="cellEvent('focus',$event)"
300
+ @input="cellEvent('input',$event)"
301
+ @visible-change="cellEvent('visible-change',$event)"
302
+ @remove-tag="cellEvent('remove-tag',$event)"
303
+ @set-value="setDynamicSourceSelectValue"
304
+ />
305
+
306
+ <el-input-number
307
+ v-else-if="type==='inputNumber'"
308
+ ref="item"
309
+ v-model="innerValue"
310
+ :controls-position="inputNumberSet.position"
311
+ :disabled="disabled"
312
+ :max="inputNumberSet.max==0?0:(!inputNumberSet.max?Infinity:inputNumberSet.max)"
313
+ :min="inputNumberSet.min==0?0:(!inputNumberSet.min?-Infinity:inputNumberSet.min)"
314
+ :precision="inputNumberSet.precision"
315
+ :step="!inputNumberSet.step?1:inputNumberSet.step"
316
+ @blur="cellEvent('blur',$event)"
317
+ @change="cellEvent('change',$event)"
318
+ @focus="cellEvent('focus',$event)"
319
+ @input="cellEvent('input',$event)"
320
+ />
321
+ <!--mysql数据库--->
322
+ <el-switch
323
+ v-else-if="(type==='switch' || column.dataType === 'BOOLEAN') && dataSourceType === 'mysql'"
324
+ ref="item"
325
+ v-model="innerValue"
326
+ :disabled="disabled"
327
+ active-color="#13ce66"
328
+ inactive-color="#ff4949"
329
+ @change="cellEvent('change',$event)"
330
+ @input="cellEvent('input',$event,true)"
331
+ />
332
+ <!--oracle或sqlserver数据库--->
333
+ <el-switch
334
+ v-else-if="type==='switch' || column.dataType === 'BOOLEAN'"
335
+ ref="item"
336
+ v-model="innerValue"
337
+ :active-value="1"
338
+ :disabled="disabled"
339
+ :inactive-value="0"
340
+ active-color="#13ce66"
341
+ inactive-color="#ff4949"
342
+ @change="cellEvent('change',$event)"
343
+ @input="cellEvent('input',$event,true)"
344
+ />
345
+ <el-slider
346
+ v-else-if="type==='slider'"
347
+ ref="item"
348
+ v-model="innerValue"
349
+ :disabled="disabled"
350
+ @change="cellEvent('change',$event)"
351
+ @input="cellEvent('input',$event,true)"
352
+ />
353
+
354
+ <el-rate
355
+ v-else-if="type==='rate'"
356
+ ref="item"
357
+ v-model="innerValue"
358
+ :disabled="disabled"
359
+ @change="cellEvent('change',$event)"
360
+ @input="cellEvent('input',$event,true)"
361
+ />
362
+
363
+ <organization-input
364
+ v-else-if="deptManTree || deptTree || wgManTree || wgTree"
365
+ :check-strictly="isCheckStrictly"
366
+ :department-info="departmentInfo"
367
+ :disabled="disabled"
368
+ :fields="fields"
369
+ :is-join-table="isJoinTable"
370
+ :models="row"
371
+ :multiple="isMultiTree"
372
+ :table-name="tableName"
373
+ :tree-type="deptManTree?'DeptUserTree':deptTree?'DeptTree':wgManTree?'WgTree':wgTree?'WgUserTree':null"
374
+ :value="innerValue"
375
+ @append="appendOrganizationInputEvent"
376
+ @clear="clearOrganizationInputEvent"
377
+ @focus="showOrganizationTree"
378
+ @replace="replaceOrganizationInputEvent"
379
+ @setValue="organizationInputEvent"
380
+ />
381
+
382
+ <el-dialog
383
+ :append-to-body="true"
384
+ :show-close="true"
385
+ :title="$t('imatrixUIMessage.tips')"
386
+ :visible.sync="annexUploadFlag"
387
+ width="30%"
388
+ >
389
+ <el-upload
390
+ v-if="type==='annex' && annexUploadFlag"
391
+ :accept="fileSetObj&&fileSetObj.accept?fileSetObj.accept:null"
392
+ :action="defaultAction"
393
+ :before-upload="handleBeforeUpload"
394
+ :headers="headers"
395
+ :on-success="uploadOnSuccess"
396
+ :with-credentials="true"
397
+ name="file"
398
+ >
399
+ <el-button>{{ $t('imatrixUIMessage.upload') }}</el-button>
400
+ </el-upload>
401
+ </el-dialog>
402
+ <view-image-dialog
403
+ v-if="showSingleImgFlag"
404
+ :deleteable="!disabled"
405
+ :downloadable="!disabled"
406
+ :file-list="fileList"
407
+ @close="showSingleImgFlag = false"
408
+ @delete="deleteFile"
409
+ />
410
+ </div>
411
+ </template>
412
+ <script>
413
+ import store from './store'
414
+ import {
415
+ analysisFileSetObj,
416
+ getAdditionalParamMap,
417
+ getFileList,
418
+ isDisableEdit,
419
+ isDynamicDataSourceSource,
420
+ isEditOptionFunction,
421
+ otherFilesToStandard
422
+ } from './utils'
423
+ import dynamicSourceSelect from '../../dynamic-source-select/src/dynamic-source-select.vue'
424
+ import {getEntityFieldValue, setEntityFieldValue} from '../../../src/utils/util'
425
+ import {getToken} from '../../../src/utils/auth'
426
+ import apis from './apis'
427
+ import ViewImageDialog from './view-image-dialog.vue'
428
+ import {$emit} from '../../utils/gogocodeTransfer'
429
+
430
+ export default {
431
+ name: 'DynamicInput',
432
+ components: {
433
+ dynamicSourceSelect,
434
+ ViewImageDialog
435
+ },
436
+ props: {
437
+ value: {
438
+ type: [String, Boolean, Number, Date, Array],
439
+ default: null
440
+ },
441
+ type: {
442
+ type: String,
443
+ default: 'input'
444
+ },
445
+ position: {
446
+ type: Object,
447
+ default: null
448
+ },
449
+ lineEdit: {
450
+ type: Object,
451
+ default: null
452
+ },
453
+ options: {
454
+ type: Array,
455
+ default: null
456
+ },
457
+ // 字段配置
458
+ column: {
459
+ type: Object,
460
+ default: null
461
+ },
462
+ // 行数据
463
+ row: {
464
+ type: Object,
465
+ default: null
466
+ },
467
+ listCode: {
468
+ type: String,
469
+ default: null
470
+ },
471
+ isSql: {
472
+ type: Boolean,
473
+ default: false
474
+ },
475
+ listToolbarFormData: {
476
+ type: Object,
477
+ default: null
478
+ },
479
+ rowIndex: {
480
+ type: Number,
481
+ default: -1
482
+ }
483
+ },
484
+ data() {
485
+ let innerValue = this.value
486
+ if (this.type && this.type === 'select') {
487
+ // 单选下拉框时值处理
488
+ if (this.column.dataType !== 'TEXT') {
489
+ innerValue = this.value && this.value !== null && typeof (this.value) !== 'string' ? this.value + '' : this.value
490
+ $emit(this, 'update:value', innerValue)
491
+ }
492
+ }
493
+ const defaultValue = this.getDefaultValue(innerValue)
494
+ if (defaultValue !== undefined && defaultValue !== null) {
495
+ innerValue = defaultValue
496
+ }
497
+ const disabled = isDisableEdit(this.column.prop, this.listCode, this.row)
498
+ const defaultAction = window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/uploads'
499
+ if (!this.listCode) {
500
+ this.listCode = store.get('_list_code')
501
+ }
502
+ const gridParams = store.get(this.listCode)
503
+ let tableName
504
+ if (gridParams && gridParams.basicInfo && gridParams.basicInfo.tableName) {
505
+ tableName = gridParams.basicInfo.tableName
506
+ }
507
+ let isHasJoinTable
508
+ if (gridParams && gridParams.basicInfo && gridParams.basicInfo.hasJoinTable) {
509
+ isHasJoinTable = gridParams.basicInfo.hasJoinTable
510
+ }
511
+ let parentFormData
512
+ if (gridParams.options.extraParam && gridParams.options.extraParam.entityMap) {
513
+ parentFormData = gridParams.options.extraParam.entityMap
514
+ }
515
+ const headers = {Authorization: getToken()}
516
+ // 数据库类型,值为mysql、oracle、sqlserver,默认是mysql,el-switch组件值保存需要使用
517
+ let dataSourceType = 'mysql'
518
+ if (window.$vueApp.config.globalProperties.dataSourceType) {
519
+ dataSourceType = window.$vueApp.config.globalProperties.dataSourceType.toLowerCase()
520
+ }
521
+ const gridData = gridParams.gridData
522
+ const subTableData = gridParams.subTableData
523
+ const isSubTableShowPage = gridParams.isSubTableShowPage
524
+ let controlConfig = {}
525
+ if (this.column.controlConfig) {
526
+ controlConfig = JSON.parse(this.column.controlConfig)
527
+ }
528
+ const additionalParamMap = getAdditionalParamMap(gridParams)
529
+ return {
530
+ deptManTree: false, // 是否是部门人员树
531
+ isMultiTree: false, // 是否是多选树
532
+ isCheckStrictly: false, // 父子不互相关联也就是不选中子部门节点
533
+ deptTree: false, // 是否是部门树
534
+ wgManTree: false, // 是否是工作组人员树
535
+ wgTree: false, // 是否是工作组树
536
+ newValue: null,
537
+ disabled, // 当前用户是否禁止编辑该字段/ 是否新增行
538
+ componentName: '',
539
+ validateErrorField: '', // 保存行记录时,验证失败的字段名
540
+ annexUploadFlag: false,
541
+ defaultAction,
542
+ fileMultiple: false, // 文件是否多选
543
+ lastFileName: '',
544
+ fileList: [],
545
+ lastServerName: '',
546
+ fileSetObj: null,
547
+ showSingleImgFlag: false,
548
+ singleImgSrc: '',
549
+ fields: null,
550
+ innerValue, // 输入的内容
551
+ dynamicSourceSelectOptions: {},
552
+ valueSetOptions: null,
553
+ dynamicDataSourceCode: null,
554
+ tableName,
555
+ isJoinTable: isHasJoinTable, // 是否是关联表
556
+ departmentInfo: null, // 指定部门或分支
557
+ parentFormData,
558
+ headers,
559
+ dataSourceType,
560
+ inputNumberSet: {},
561
+ fileInfo: {showName: null, serverPath: null},
562
+ gridData: isSubTableShowPage ? subTableData : gridData,
563
+ pageGridData: isSubTableShowPage ? gridData : null,
564
+ additionalParamMap,
565
+ controlConfig,
566
+ // 设置日期选择器选择范围
567
+ pickerOptions: {
568
+ disabledDate: time => {
569
+ if (this.stateForbiddenTime && this.endForbiddenTime) {
570
+ return time.getTime() < this.stateForbiddenTime || time.getTime() > this.endForbiddenTime
571
+ } else if (this.stateForbiddenTime && !this.endForbiddenTime) {
572
+ return time.getTime() < this.stateForbiddenTime
573
+ } else if (!this.stateForbiddenTime && this.endForbiddenTime) {
574
+ return time.getTime() > this.endForbiddenTime
575
+ } else {
576
+ return false
577
+ }
578
+ }
579
+ },
580
+ stateForbiddenTime: null,
581
+ endForbiddenTime: null
582
+ }
583
+ },
584
+ computed: {},
585
+ watch: {
586
+ value: {
587
+ handler(newValue, oldValue) {
588
+ // this.value = newValue
589
+ // this.innerValue = this.value
590
+ if (this.type && this.type === 'multiselect') {
591
+ // 修改时多选下拉值回显 ,将字符串转换为数组
592
+ const tempMultData = this.value && this.value !== null && typeof (this.value) === 'string' ? this.value.split(',') : this.value
593
+ this.innerValue = tempMultData
594
+ } else {
595
+ if (this.type === 'yearRange') {
596
+ this.innerValue = '' + newValue
597
+ } else if (this.type === 'input' && newValue !== null) {
598
+ // 不允许输入框首尾有空格及全空格处理
599
+ if (newValue && typeof newValue === 'string') {
600
+ newValue = newValue.trim()
601
+ }
602
+ if (newValue === '') {
603
+ newValue = null
604
+ }
605
+ this.innerValue = newValue
606
+ } else {
607
+ this.innerValue = newValue
608
+ }
609
+ }
610
+ const gridParams = store.get(this.listCode)
611
+ if (gridParams.editProp === this.column.prop) {
612
+ // 如果是当前编辑的字段,且是自定义控件才需要手动获得一下焦点
613
+ this.$nextTick(() => {
614
+ if (this.$refs.customItem) {
615
+ this.$refs.customItem.focus()
616
+ }
617
+ })
618
+ }
619
+ },
620
+ deep: true,
621
+ immediate: true
622
+ }
623
+ },
624
+ created() {
625
+ const gridParams = store.get(this.listCode)
626
+ this.gridParams = gridParams
627
+ this.isCreateRow = gridParams.isCreateRow
628
+ this.setTreeType()
629
+ if (this.type && this.type.indexOf('custom:') >= 0) {
630
+ this.componentName = this.type.substring(this.type.indexOf(':') + 1)
631
+ }
632
+
633
+ if (this.column.fileSet && this.column.fileSet !== '' &&
634
+ (this.column.componentType === 'annex' || this.column.componentType === 'multipartUpload')) {
635
+ const fileSetObj = JSON.parse(this.column.fileSet)
636
+ this.fileInfo.showName = this.row[fileSetObj.showNameData.dbName]
637
+ this.fileInfo.serverPath = this.row[fileSetObj.serverNameData.dbName]
638
+ this.fileSetObj = fileSetObj
639
+ if (fileSetObj && fileSetObj.multiple) {
640
+ this.fileMultiple = true
641
+ }
642
+ this.fileList = getFileList(this.row, this.column, this.isSql)
643
+ this.packageFileNameWithFileList()
644
+ }
645
+
646
+ if (this.column.componentType === 'inputNumber') {
647
+ this.setInputNumberConfig()
648
+ }
649
+ // 如果是多选文件类型,需要解析(需要设置临时字段,判断文件还是图片,图片需要预览)
650
+ if (this.column.valueSetOptions && this.column.componentType !== 'inputNumber') {
651
+ const valueSetOptionsObj = JSON.parse(this.column.valueSetOptions)
652
+ if (valueSetOptionsObj && valueSetOptionsObj.valueSetOptions) {
653
+ this.valueSetOptions = valueSetOptionsObj.valueSetOptions
654
+ }
655
+ if (valueSetOptionsObj.dynamicDataSourceCode && valueSetOptionsObj.dynamicDataSourceCode !== '') {
656
+ this.dynamicDataSourceCode = valueSetOptionsObj.dynamicDataSourceCode
657
+ }
658
+ }
659
+ if (this.column.orgTreeSet) {
660
+ const orgTreeSet = JSON.parse(this.column.orgTreeSet)
661
+ if (this.type.indexOf('DeptTree') > 0 && orgTreeSet.checkStrictly) {
662
+ this.isCheckStrictly = orgTreeSet.checkStrictly
663
+ }
664
+ if (orgTreeSet.length) {
665
+ this.fields = orgTreeSet
666
+ } else {
667
+ if (orgTreeSet.orgTreeSetArr) {
668
+ this.fields = orgTreeSet.orgTreeSetArr
669
+ }
670
+ }
671
+ }
672
+ this.getDateAllowTime()
673
+ },
674
+ mounted() {
675
+ // 去掉该监听,否则导致焦点总是跳到第一个编辑框
676
+ // this.$watch('lineEdit.editingCell', function(newVal, oldVal) {
677
+ // this.focus()
678
+ // }, {
679
+ // immediate: true,
680
+ // deep: true
681
+ // })
682
+ },
683
+ methods: {
684
+ /**
685
+ * @author: 梁旭
686
+ * @description: 获取提示标题
687
+ * @Date: 2023-08-04 10:53:24
688
+ * @param {*}
689
+ * @return {*}
690
+ */
691
+ getClassOptionTitle(val) {
692
+ if (val !== null && val !== undefined && val !== '' && val.length > 0) {
693
+ let selectTittle = ''
694
+ if (typeof val === 'string') {
695
+ // 单选
696
+ this.options.forEach(item => {
697
+ if (item.value === val) {
698
+ selectTittle = item.label
699
+ }
700
+ })
701
+ } else {
702
+ // 多选
703
+ this.options.forEach(item => {
704
+ val.forEach(Vtem => {
705
+ if (item.value === Vtem) {
706
+ selectTittle = selectTittle + item.label + ','
707
+ }
708
+ })
709
+ })
710
+ selectTittle = selectTittle.slice(0, selectTittle.length - 1)
711
+ }
712
+ return selectTittle
713
+ }
714
+ },
715
+ /**
716
+ * @description: 获取日期选择器可选时间范围
717
+ * @Date: 2023-07-20 13:18:14
718
+ * @param {*}
719
+ * @return {*}
720
+ */
721
+ getDateAllowTime() {
722
+ if (this.column.valueSetOptions) {
723
+ const optionsObj = JSON.parse(this.column.valueSetOptions)
724
+ const nowTime = Date.now()
725
+ if (optionsObj.stateForbiddenTime) {
726
+ const stateDayNumber = optionsObj.stateForbiddenTime
727
+ this.stateForbiddenTime = nowTime - stateDayNumber * 24 * 60 * 60 * 1000
728
+ } else {
729
+ this.stateForbiddenTime = null
730
+ }
731
+ if (optionsObj.endForbiddenTime) {
732
+ const endDayNumber = optionsObj.endForbiddenTime
733
+ this.endForbiddenTime = nowTime + endDayNumber * 24 * 60 * 60 * 1000 - 24 * 60 * 60 * 1000
734
+ } else {
735
+ this.endForbiddenTime = null
736
+ }
737
+ }
738
+ },
739
+ focus() {
740
+ if (this.type !== 'slider' && this.type !== 'rate') {
741
+ // slider滑块组件 和 rate评分组件 没有focus方法
742
+ if (this.lineEdit.editingCell && this.position && this.position.row === this.lineEdit.editingCell.row && this.position.prop === this.lineEdit.editingCell.prop) {
743
+ if (this.$refs.item) {
744
+ this.$refs.item.focus()
745
+ }
746
+ }
747
+ }
748
+ },
749
+ handleBeforeUpload(file) {
750
+ let limitFileSize = this.fileSetObj.limitFileSize
751
+ if (limitFileSize === undefined) {
752
+ // 默认是30M
753
+ limitFileSize = 30
754
+ }
755
+ if (file.size > limitFileSize * 1024 * 1024) {
756
+ // 超过最大限制
757
+ this.$message({
758
+ type: 'warning',
759
+ message: this.$t('imatrixUIMessage.exceedFileSize', {fileSize: limitFileSize}),
760
+ showClose: true
761
+ })
762
+ // 返回false停止上传
763
+ return false
764
+ }
765
+ },
766
+ setTreeType() {
767
+ if (this.type) {
768
+ if (this.type.indexOf('single') >= 0 && this.type.indexOf('Tree') > 0) {
769
+ this.isMultiTree = false
770
+ } else {
771
+ this.isMultiTree = true
772
+ }
773
+ if (this.type.indexOf('DeptManTree') > 0) {
774
+ // 说明是部门人员树
775
+ this.deptManTree = true
776
+ }
777
+ if (this.type.indexOf('DeptTree') > 0) {
778
+ // 说明是部门树
779
+ this.deptTree = true
780
+ }
781
+ if (this.type.indexOf('WgManTree') > 0) {
782
+ // 说明是工作组人员树
783
+ this.wgManTree = true
784
+ }
785
+ if (this.type.indexOf('WgTree') > 0) {
786
+ // 说明是工作组树
787
+ this.wgTree = true
788
+ }
789
+ }
790
+ },
791
+ // 显示组织树时需要计算指定部门
792
+ showOrganizationTree() {
793
+ if (this.column.orgTreeSet) {
794
+ const orgTreeSet = JSON.parse(this.column.orgTreeSet)
795
+ if (orgTreeSet.length) {
796
+ this.fields = orgTreeSet
797
+ } else {
798
+ if (orgTreeSet.orgTreeSetArr) {
799
+ this.fields = orgTreeSet.orgTreeSetArr
800
+ }
801
+ if (orgTreeSet.specifyType) {
802
+ if (orgTreeSet.specifyType === 'dataTable') {
803
+ // 根据字段获取值
804
+ if (orgTreeSet.dataTableField) {
805
+ const dataTableFieldValue = getEntityFieldValue(this.row, orgTreeSet.dataTableField)
806
+ if (dataTableFieldValue && dataTableFieldValue !== '') {
807
+ this.departmentInfo = dataTableFieldValue.split(',')
808
+ }
809
+ }
810
+ } else if (orgTreeSet.specifyType === 'dept' || orgTreeSet.specifyType === 'workGroup') {
811
+ if (orgTreeSet.specifyDept && orgTreeSet.specifyDept !== '') {
812
+ if (typeof (orgTreeSet.specifyDept) === 'object') {
813
+ // 固定值
814
+ this.departmentInfo = orgTreeSet.specifyDept
815
+ } else {
816
+ this.departmentInfo = orgTreeSet.specifyDept.split(',')
817
+ }
818
+ }
819
+ }
820
+ }
821
+ }
822
+ }
823
+ },
824
+ // isInputEventUpdateValue input事件时是否更新value值
825
+ cellEvent(eventName, event, isInputEventUpdateValue) {
826
+ // console.log('cellEvent1---eventName=', eventName, 'this.innerValue=', this.innerValue)
827
+ let isInputVal = false
828
+ if (eventName === 'focus') {
829
+ $emit(this, 'focus', event)
830
+ }
831
+ if (eventName === 'input' && this.isDateControll()) {
832
+ // 如果是日期控件,如果使用blur事件来修改数据内容,清空文本框内容不会改变model的值,所以还是需要input事件时处理
833
+ let val = event
834
+ if (val === '') {
835
+ val = null
836
+ }
837
+ $emit(this, 'update:value', val)
838
+ isInputVal = true
839
+ // 在callCustomEvent方法中使用了innerValue属性
840
+ this.innerValue = val
841
+ } else if (eventName === 'input' && this.isSelectControll()) {
842
+ // 如果是下拉框选择器控件,如果使用blur事件来修改数据内容,有时会更新不到最新数据
843
+ // console.log('cellEvent2---this.innerValue=', this.innerValue)
844
+ if (this.type === 'multiselect' && this.innerValue && Object.prototype.toString.apply(this.innerValue) === '[object Array]') {
845
+ // 如果是多选下拉框,且值是数组
846
+ const saveAll = 'saveAll'
847
+ if (this.innerValue.indexOf(saveAll) < 0) {
848
+ // 不包含“全选”时才走input,全选是在multiselectchange中特殊处理的
849
+ $emit(this, 'update:value', this.innerValue.join(','))
850
+ }
851
+ } else {
852
+ $emit(this, 'update:value', this.innerValue)
853
+ }
854
+ isInputVal = true
855
+ } else if (eventName === 'input' && isInputEventUpdateValue !== undefined && isInputEventUpdateValue === true) {
856
+ // 表示input事件时更新值,switch、rate、slider组件时会走该分支
857
+ // 在callCustomEvent方法中使用了innerValue属性
858
+ this.innerValue = event
859
+ $emit(this, 'update:value', event)
860
+ isInputVal = true
861
+ } else if (eventName === 'blur' && !this.isSelectControll()) {
862
+ // 为了使输入时流畅,所以在blur时调用input,更改组件的数据
863
+ this.blurEvent()
864
+ isInputVal = true
865
+ }
866
+ if (!isInputVal && eventName === 'change') {
867
+ // 走完chang事件,触发一次失焦事件
868
+ // this.$refs.item.blur()
869
+ this.blurEvent()
870
+ // 验证是否是合法的小数
871
+ // 保存时后台给出数字类型转换错误的验证,前台不提供了,因为会同时出现两个类型错误提示信息的问题
872
+ // this.checkDecimal()
873
+ }
874
+ if (eventName === 'clear') {
875
+ if ((this.type === 'multiselect' || this.type === 'select') && isDynamicDataSourceSource(this.column)) {
876
+ for (let index = 0; index < this.valueSetOptions.length; index++) {
877
+ if (this.column.prop !== this.valueSetOptions[0].valueColumn.dbColumnName) {
878
+ this.setCellValue(this.valueSetOptions[0].valueColumn.dbColumnName, null, 'input')
879
+ }
880
+ }
881
+ }
882
+ // 清空时,必须这样调用input事件 ,否则组件无法输入值
883
+ $emit(this, 'update:value', null)
884
+ }
885
+ const gridParams = store.get(this.listCode)
886
+ gridParams.editProp = this.column.prop
887
+
888
+ // console.log('cellEvent4---this.innerValue=', this.innerValue)
889
+ if (this.column.events && this.column.events[eventName]) {
890
+ // 事件回调
891
+ this.callCustomEvent(eventName)
892
+ } else if (isEditOptionFunction(eventName, this.listCode)) {
893
+ // 为了兼容历史版本保留了该判断
894
+
895
+ gridParams.options.lineEditOptions[eventName].call(this, event, this.row, this.column, gridParams.additionalParamMap)
896
+ }
897
+ $emit(this, 'findIndex')
898
+ // console.log('cellEvent5---this.innerValue=', this.innerValue)
899
+ },
900
+ blurEvent() {
901
+ if (this.innerValue === null || this.innerValue === undefined) {
902
+ this.innerValue = null
903
+ this.val = null
904
+ }
905
+ // 必须这样调用input事件 ,否则组件无法输入值
906
+ $emit(this, 'update:value', this.innerValue) // 现在的用法
907
+ },
908
+ // 是否是日期时间选择器
909
+ isDateControll() {
910
+ return (this.type === 'date' || this.column.dataType === 'DATE') || (this.type === 'time' || this.column.dataType === 'TIME')
911
+ },
912
+ // 是否是下拉框选择器
913
+ isSelectControll() {
914
+ return this.type === 'select' || this.type === 'multiselect'
915
+ },
916
+ // 值设置是否是动态数据源类型的数据源
917
+ isDynamicDataSourceSource() {
918
+ return isDynamicDataSourceSource(this.column)
919
+ },
920
+ // 是否是小数类型字段
921
+ isDecimalDateType() {
922
+ return this.column.dataType && this.column.dataType === 'DOUBLE' || this.column.dataType === 'FLOAT'
923
+ },
924
+ // 调用自定义事件回调
925
+ callCustomEvent(eventName) {
926
+ this.callCustomEventWithParam(eventName, {
927
+ value: this.innerValue,
928
+ row: this.row,
929
+ column: this.column,
930
+ extendParams: this.extendParams
931
+ })
932
+ },
933
+ // 调用自定义事件回调
934
+ callCustomEventWithParam(eventName, param) {
935
+ // this.column.events 是个对象,key是事件名,value是options.eventCallBack中对应的方法名
936
+ if (this.column && this.column.events && this.column.events[eventName]) {
937
+ const funName = this.column.events[eventName]
938
+ if (!this.listCode) {
939
+ this.listCode = store.get('_list_code')
940
+ }
941
+ const gridParams = store.get(this.listCode)
942
+ if (gridParams.options && gridParams.options['eventCallBack'] &&
943
+ gridParams.options['eventCallBack'][funName] && typeof (gridParams.options['eventCallBack'][funName]) === 'function') {
944
+ if (!param) {
945
+ param = {}
946
+ }
947
+ param.formData = gridParams.options && gridParams.options.formData ? gridParams.options.formData : null
948
+ param.parent = this.parentFormData
949
+ param.rowIndex = this.rowIndex
950
+ param.additionalParamMap = gridParams.additionalParamMap
951
+ gridParams.options['eventCallBack'][funName].call(this, param)
952
+ }
953
+ }
954
+ },
955
+ // 验证是否是合法的小数
956
+ checkDecimal() {
957
+ if (this.isDecimalDateType() && this.innerValue && this.innerValue !== null) {
958
+ // 小数类型的字段,失去焦点时,判断输入的内容是否合法
959
+ const numberReg = /^(-?\d+)(\.\d+)?$/
960
+ if (!numberReg.test(this.innerValue + '')) {
961
+ // 表示该字段还未验证,或验证成功,需要再次验证
962
+ // 表示输入的不合法
963
+ this.$message({
964
+ type: 'warning',
965
+ message: this.$t('imatrixUIMessage.invalideDoubleValue', {num: this.innerValue}),
966
+ showClose: true
967
+ })
968
+ this.focus()
969
+ }
970
+ }
971
+ },
972
+ // 自定义编辑组件修改属性值
973
+ customFocus() {
974
+ apis.focus(this.position ? this.position.row : null)
975
+ },
976
+ openAnnexUpload() {
977
+ this.annexUploadFlag = true
978
+ },
979
+ previewImg() {
980
+ this.fileList = getFileList(this.row, this.column, this.isSql)
981
+ this.showSingleImgFlag = true
982
+ },
983
+ // 上传成功
984
+ uploadOnSuccess(response) {
985
+ if (response) {
986
+ const responseFile = {name: response.showName, serverPath: response.serverPath}
987
+ if (this.column.fileSet && this.column.fileSet !== '') {
988
+ const fileSetObj = JSON.parse(this.column.fileSet)
989
+ if (fileSetObj) {
990
+ // 判断单选还是多选
991
+ if (this.fileMultiple) {
992
+ this.multiStorage(fileSetObj, responseFile)
993
+ } else {
994
+ this.radioStorageFile(fileSetObj, responseFile)
995
+ }
996
+ this.fileList = getFileList(this.row, this.column, this.isSql)
997
+ }
998
+ }
999
+ }
1000
+ this.annexUploadFlag = false
1001
+ },
1002
+ // eventNames 事件名称值为input或clear,input表示值改变时触发的事件,clear表示值清空时触发的事件
1003
+ setCellValue(prop, value, eventNames) {
1004
+ this.row[prop] = value
1005
+ if (eventNames) {
1006
+ eventNames.split(',').forEach(eventName => {
1007
+ this.callCustomEventWithParam(eventName, {value, row: this.row, column: this.column, prop})
1008
+ })
1009
+ }
1010
+ },
1011
+ // 单选上传完成后存储
1012
+ radioStorageFile(fileSetObj, responseFile) {
1013
+ if (fileSetObj.showNameData) {
1014
+ if (this.isSql) {
1015
+ if (fileSetObj.showNameData.dbName) {
1016
+ this.setCellValue(fileSetObj.showNameData.dbName, responseFile.name, 'input')
1017
+ }
1018
+ } else {
1019
+ if (fileSetObj.showNameData.name) {
1020
+ this.setCellValue(fileSetObj.showNameData.name, responseFile.name, 'input')
1021
+ }
1022
+ }
1023
+ }
1024
+ if (fileSetObj.serverNameData) {
1025
+ if (this.isSql) {
1026
+ if (fileSetObj.serverNameData.dbName) {
1027
+ this.setCellValue(fileSetObj.serverNameData.dbName, responseFile.serverPath)
1028
+ }
1029
+ } else {
1030
+ if (fileSetObj.serverNameData.name) {
1031
+ this.setCellValue(fileSetObj.serverNameData.name, responseFile.serverPath)
1032
+ }
1033
+ }
1034
+ }
1035
+ this.packageFileNameWithFileList([{showName: responseFile.name, serverPath: responseFile.serverPath}])
1036
+ },
1037
+ // 多选上传完成后存储
1038
+ multiStorage(fileSetObj, responseFile) {
1039
+ const keyValueParam = analysisFileSetObj(fileSetObj, this.isSql)
1040
+ // 存储
1041
+ // 判断主表拼接还是子表保存
1042
+ if (fileSetObj.childAnnexDataTableCode) {
1043
+ // 存储子表
1044
+ // const lowerStr = fileSetObj.childAnnexDataTableCode.toLowerCase()
1045
+ let fileArr = this.row[this.column.prop]
1046
+ if (!fileArr) {
1047
+ fileArr = []
1048
+ }
1049
+ const fileObj = this.responseFileToFileObj(fileSetObj, responseFile)
1050
+ fileArr.push(fileObj)
1051
+ this.fileList = otherFilesToStandard(fileSetObj, keyValueParam, fileArr, null)
1052
+ this.setCellValue(this.column.prop, fileArr, 'input')
1053
+ } else {
1054
+ let showNameStr = ''
1055
+ let pathNameStr = ''
1056
+ // 存储主表
1057
+ if (fileSetObj.showNameData) {
1058
+ if (this.isSql) {
1059
+ if (fileSetObj.showNameData.dbName) {
1060
+ if (this.row) {
1061
+ if (this.row[fileSetObj.showNameData.dbName]) {
1062
+ let str = this.row[fileSetObj.showNameData.dbName]
1063
+ str += ',' + responseFile.name
1064
+ this.setCellValue(fileSetObj.showNameData.dbName, str, 'input')
1065
+ } else {
1066
+ this.setCellValue(fileSetObj.showNameData.dbName, responseFile.name, 'input')
1067
+ }
1068
+ showNameStr = this.row[fileSetObj.showNameData.dbName]
1069
+ }
1070
+ }
1071
+ } else {
1072
+ if (fileSetObj.showNameData.name) {
1073
+ if (this.row) {
1074
+ if (this.row[fileSetObj.showNameData.name]) {
1075
+ let str = this.row[fileSetObj.showNameData.name]
1076
+ str += ',' + responseFile.name
1077
+ this.setCellValue(fileSetObj.showNameData.name, str, 'input')
1078
+ } else {
1079
+ this.setCellValue(fileSetObj.showNameData.name, responseFile.name, 'input')
1080
+ }
1081
+ showNameStr = this.row[fileSetObj.showNameData.name]
1082
+ }
1083
+ }
1084
+ }
1085
+ }
1086
+ if (fileSetObj.serverNameData) {
1087
+ if (this.isSql) {
1088
+ if (fileSetObj.serverNameData.dbName) {
1089
+ if (this.row) {
1090
+ if (this.row[fileSetObj.serverNameData.dbName]) {
1091
+ let str = this.row[fileSetObj.serverNameData.dbName]
1092
+ str += ',' + responseFile.serverPath
1093
+ this.setCellValue(fileSetObj.serverNameData.dbName, str)
1094
+ } else {
1095
+ this.setCellValue(fileSetObj.serverNameData.dbName, responseFile.serverPath)
1096
+ }
1097
+ pathNameStr = this.row[fileSetObj.serverNameData.dbName]
1098
+ }
1099
+ }
1100
+ } else {
1101
+ if (fileSetObj.serverNameData.name) {
1102
+ if (this.row) {
1103
+ if (this.row[fileSetObj.serverNameData.name]) {
1104
+ let str = this.row[fileSetObj.serverNameData.name]
1105
+ str += ',' + responseFile.serverPath
1106
+ this.setCellValue(fileSetObj.serverNameData.name, str)
1107
+ } else {
1108
+ this.setCellValue(fileSetObj.serverNameData.name, responseFile.serverPath)
1109
+ }
1110
+ pathNameStr = this.row[fileSetObj.serverNameData.name]
1111
+ }
1112
+ }
1113
+ }
1114
+ }
1115
+ this.fileList = otherFilesToStandard(fileSetObj, keyValueParam, null, {
1116
+ 'showName': showNameStr,
1117
+ 'serverPath': pathNameStr
1118
+ })
1119
+ }
1120
+ this.packageFileNameWithFileList()
1121
+ },
1122
+ responseFileToFileObj(fileSetObj, responseFile) {
1123
+ const fileObj = {}
1124
+ if (fileSetObj.showNameData) {
1125
+ if (this.isSql) {
1126
+ if (fileSetObj.showNameData.dbName) {
1127
+ fileObj.fileSetObj.showNameData.dbName = responseFile.name
1128
+ }
1129
+ } else {
1130
+ if (fileSetObj.showNameData.name) {
1131
+ fileObj.fileSetObj.showNameData.name = responseFile.name
1132
+ }
1133
+ }
1134
+ }
1135
+ if (fileSetObj.serverNameData) {
1136
+ if (this.isSql) {
1137
+ if (fileSetObj.serverNameData.dbName) {
1138
+ fileObj.fileSetObj.serverNameData.dbName = responseFile.serverPath
1139
+ }
1140
+ } else {
1141
+ if (fileSetObj.serverNameData.name) {
1142
+ fileObj.fileSetObj.serverNameData.name = responseFile.serverPath
1143
+ }
1144
+ }
1145
+ }
1146
+ return fileObj
1147
+ },
1148
+ // 单选删除文件
1149
+ deleteAnnexFile(fileSetObj) {
1150
+ if (fileSetObj) {
1151
+ if (fileSetObj.showNameData) {
1152
+ if (this.isSql) {
1153
+ if (fileSetObj.showNameData.dbName) {
1154
+ this.setCellValue(fileSetObj.showNameData.dbName, null, 'input,clear')
1155
+ }
1156
+ } else {
1157
+ if (fileSetObj.showNameData.name) {
1158
+ this.setCellValue(fileSetObj.showNameData.name, null, 'input,clear')
1159
+ }
1160
+ }
1161
+ }
1162
+ if (fileSetObj.serverNameData) {
1163
+ if (this.isSql) {
1164
+ if (fileSetObj.serverNameData.dbName) {
1165
+ this.setCellValue(fileSetObj.serverNameData.dbName, null)
1166
+ }
1167
+ } else {
1168
+ if (fileSetObj.serverNameData.name) {
1169
+ this.setCellValue(fileSetObj.serverNameData.name, null)
1170
+ }
1171
+ }
1172
+ }
1173
+ }
1174
+ },
1175
+ deleteFile(fileList, index) {
1176
+ this.fileList = fileList
1177
+ if (index !== undefined && index !== -1) {
1178
+ this.fileList.splice(index, 1)
1179
+ }
1180
+ this.packageFileNameWithFileList()
1181
+ if (this.column.fileSet && this.column.fileSet !== '') {
1182
+ const fileSetObj = JSON.parse(this.column.fileSet)
1183
+ if (fileSetObj) {
1184
+ if (this.fileMultiple) {
1185
+ // 多选附件
1186
+ const keyValueParam = analysisFileSetObj(fileSetObj, this.isSql)
1187
+ this.standardToOtherFiles(fileSetObj, keyValueParam)
1188
+ } else {
1189
+ // 单选附件
1190
+ this.deleteAnnexFile(fileSetObj)
1191
+ }
1192
+ }
1193
+ }
1194
+ },
1195
+ packageFileNameWithFileList(fileList) {
1196
+ if (!fileList) {
1197
+ fileList = this.fileList
1198
+ }
1199
+ if (fileList && fileList.length > 0) {
1200
+ let fileNames = ''
1201
+ let fileServerName = ''
1202
+ fileList.forEach(item => {
1203
+ fileNames += item.showName + ','
1204
+ fileServerName += item.serverPath + ','
1205
+ })
1206
+ if (fileNames && fileNames.indexOf(',') > 0) {
1207
+ this.lastFileName = fileNames.substring(0, fileNames.lastIndexOf(','))
1208
+ this.lastServerName = fileServerName.substring(0, fileServerName.lastIndexOf(','))
1209
+ }
1210
+ } else {
1211
+ this.lastFileName = null
1212
+ this.lastServerName = null
1213
+ }
1214
+ },
1215
+ // fileList 赋值Row
1216
+ standardToOtherFiles(fileSetObj, keyValueParam) {
1217
+ if (fileSetObj.childAnnexDataTableCode) {
1218
+ // 子表
1219
+ let fileArr = null
1220
+ if (this.fileList && this.fileList.length > 0) {
1221
+ fileArr = []
1222
+ for (var i = 0; i < this.fileList.length; i++) {
1223
+ const file = this.fileList[i]
1224
+ const otherFile = {}
1225
+ otherFile.keyValueParam.showName = file.showName
1226
+ otherFile.keyValueParam.serverPath = file.serverPath
1227
+ fileArr.push(otherFile)
1228
+ }
1229
+ }
1230
+ this.setCellValue(this.column.prop, fileArr, 'input')
1231
+ } else {
1232
+ // 主表
1233
+ let showNameStr = null
1234
+ let serverNameStr = null
1235
+ if (this.fileList && this.fileList.length > 0) {
1236
+ showNameStr = ''
1237
+ serverNameStr = ''
1238
+ for (var k = 0; k < this.fileList.length; k++) {
1239
+ const file = this.fileList[k]
1240
+ if (showNameStr !== '') {
1241
+ showNameStr += ','
1242
+ }
1243
+ if (serverNameStr !== '') {
1244
+ serverNameStr += ','
1245
+ }
1246
+ showNameStr += file.showName
1247
+ serverNameStr += file.serverPath
1248
+ }
1249
+ }
1250
+ this.setCellValue(keyValueParam.showName, showNameStr, 'input')
1251
+ this.setCellValue(keyValueParam.serverPath, serverNameStr)
1252
+ }
1253
+ },
1254
+ // 组织结构树文本框值改变事件
1255
+ organizationInputEvent(prop, value) {
1256
+ // console.log('organizationInputEvent1---prop=', prop, 'this.column.prop=', this.column.prop, 'value=', value)
1257
+ if (this.isSql && prop && prop.indexOf('.') < 0) {
1258
+ if (prop !== this.column.prop && this.tableName) {
1259
+ const replaceDot = '__'
1260
+ prop = this.tableName + replaceDot + prop
1261
+ }
1262
+ }
1263
+ setEntityFieldValue(this.row, prop, value)
1264
+ if (prop && prop === this.column.prop) {
1265
+ // 必须手动调用一下input事件,否则不会更新组件的值
1266
+ // console.log('organizationInputEvent2---prop=', prop, 'value=', value)
1267
+ this.callCustomEventWithParam('input', {value, row: this.row, column: this.column, prop})
1268
+ }
1269
+ },
1270
+ // 组织结构树文本框值清空事件
1271
+ clearOrganizationInputEvent(prop) {
1272
+ if (this.isSql) {
1273
+ // sql处理时在后台会把空串当做null处理
1274
+ // this.$set(this.row, prop, '')
1275
+ setEntityFieldValue(this.row, prop, '')
1276
+ } else {
1277
+ // 非sql处理时需要设为null,否则保存时后台可能会报字段类型不正确,无法保存
1278
+ // this.$set(this.row, prop, null)
1279
+ setEntityFieldValue(this.row, prop, null)
1280
+ }
1281
+ if (prop && prop === this.column.prop) {
1282
+ // 必须手动调用一下input事件,否则不会更新组件的值
1283
+ this.callCustomEventWithParam('clear', {row: this.row, column: this.column, prop})
1284
+ }
1285
+ },
1286
+ // 组织结构树文本框值追加事件
1287
+ appendOrganizationInputEvent(prop, originalValue, appendValue, separator, finallyValue) {
1288
+ // this.$set(this.row, prop, finallyValue)
1289
+ setEntityFieldValue(this.row, prop, finallyValue)
1290
+ if (prop && prop === this.column.prop) {
1291
+ this.callCustomEventWithParam('append', {
1292
+ originalValue,
1293
+ appendValue,
1294
+ separator,
1295
+ finallyValue,
1296
+ row: this.row,
1297
+ column: this.column,
1298
+ prop
1299
+ })
1300
+ }
1301
+ },
1302
+ // 组织结构树文本框值替换事件
1303
+ replaceOrganizationInputEvent(prop, originalValue, newValue) {
1304
+ // this.$set(this.row, prop, newValue)
1305
+ setEntityFieldValue(this.row, prop, newValue)
1306
+ if (prop && prop === this.column.prop) {
1307
+ this.callCustomEventWithParam('replace', {originalValue, newValue, row: this.row, column: this.column, prop})
1308
+ }
1309
+ },
1310
+ setDynamicSourceSelectValue({value, sourceColumnName, targetColumnName, options, selectedItem}) {
1311
+ if (targetColumnName) {
1312
+ this.setCellValue(targetColumnName, value, 'input')
1313
+ this.callCustomEventWithParam('input', {
1314
+ value,
1315
+ extendParams: selectedItem,
1316
+ row: this.row,
1317
+ column: this.column,
1318
+ targetColumnName
1319
+ })
1320
+ }
1321
+ },
1322
+ multiselectChange(arr, selectedItem) {
1323
+ // console.log('multiselectChange1---arr=', arr)
1324
+ this.extendParams = selectedItem
1325
+ let isSaveAll = false
1326
+ if (arr && arr.length > 0) {
1327
+ const saveAll = 'saveAll'
1328
+ if (arr.indexOf(saveAll) !== -1) {
1329
+ const length = arr.length
1330
+ if (length - 1 >= this.options.length) {
1331
+ this.innerValue = null
1332
+ // 取消全选
1333
+ } else {
1334
+ // 全选
1335
+ if (!this.innerValue || this.innerValue.indexOf(saveAll) >= 0) {
1336
+ this.innerValue = []
1337
+ }
1338
+ this.options.forEach(item => {
1339
+ if (this.innerValue.indexOf(item.value) === -1) {
1340
+ this.innerValue.push(item.value)
1341
+ }
1342
+ })
1343
+ }
1344
+ isSaveAll = true
1345
+ }
1346
+ }
1347
+ // console.log('multiselectChange2---this.innerValue=', this.innerValue)
1348
+ if (this.innerValue && typeof this.innerValue !== 'number' && this.innerValue.indexOf('saveAll') !== -1) {
1349
+ this.innerValue.splice(this.innerValue.indexOf('saveAll'), 1)
1350
+ }
1351
+ // console.log('multiselectChange3---this.innerValue=', this.innerValue)
1352
+ if (isSaveAll) {
1353
+ this.cellEvent('input', this.innerValue)
1354
+ }
1355
+ this.cellEvent('change', arr)
1356
+ },
1357
+ getDefaultValue(val) {
1358
+ if (val === undefined || val === null || val === '') {
1359
+ // 没有值的时候才设置默认值
1360
+ if (this.column.defaultValue !== undefined && this.column.defaultValue !== null) {
1361
+ // 表示当前字段的是空的,但是有默认值时,给当前字段设置值
1362
+ setEntityFieldValue(this.row, this.column.prop, this.column.defaultValue)
1363
+ return this.column.defaultValue
1364
+ } else {
1365
+ if (this.column.componentType === 'select' && !isDynamicDataSourceSource(this.column) && this.column.valueSet) {
1366
+ // TODO 不知道为什么这个方法调用了三遍, 需要看下
1367
+ // 如果没有给字段设置默认值时,如果是选项组则选项组如果有默认选中,则将默认选中值赋值给当前字段
1368
+ // console.log(this.column.valueSet.find(element => element.selected === true), 'xxxxxxxxxxx')
1369
+ const defaultSelected = this.column.valueSet.find(element => element.selected === true)
1370
+ if (defaultSelected) {
1371
+ setEntityFieldValue(this.row, this.column.prop, defaultSelected.value)
1372
+ return defaultSelected.value
1373
+ }
1374
+ }
1375
+ }
1376
+ }
1377
+ },
1378
+ refresData(data) {
1379
+ $emit(this, 'refresData', data)
1380
+ },
1381
+ refresPortData(port, value) {
1382
+ $emit(this, 'refresPortData', port, value)
1383
+ },
1384
+ refresPortsData(map) {
1385
+ $emit(this, 'refresPortsData', map)
1386
+ },
1387
+ refresMainTableFields(map) {
1388
+ $emit(this, 'refresMainTableFields', map)
1389
+ },
1390
+ deleteSuccess(deleteFile) {
1391
+ console.log('deleteSuccess', deleteFile, this.fileInfo)
1392
+ },
1393
+ // 时间格式判断是否是字符串类型,如果是字符串类型使用格式化的数据,如果是时间格式的显示时间搓
1394
+ isValueFormat() {
1395
+ if (this.column.dataType === 'TEXT' || this.column.dataType === 'text') {
1396
+ return this.isFormat()
1397
+ }
1398
+ // timestamp毫秒值为x
1399
+ return 'x'
1400
+ },
1401
+ // 时间格式判断是否是字符串类型,显示格式
1402
+ isFormat() {
1403
+ if (this.type === 'time' && this.column.dataType === 'TIME') {
1404
+ return 'YYYY-MM-DD HH:mm:ss'
1405
+ } else if (this.type === 'dateTimePicker') {
1406
+ return 'YYYY-MM-DD HH:mm:ss'
1407
+ } else if (this.type === 'date' && this.column.dataType === 'DATE') {
1408
+ return 'YYYY-MM-DD'
1409
+ } else if (this.type === 'timePicker') {
1410
+ if (this.column.originalFormat) {
1411
+ return this.column.originalFormat
1412
+ }
1413
+ return 'hh:mm:ss'
1414
+ } else if (this.type === 'year') {
1415
+ return 'YYYY'
1416
+ } else if (this.type === 'month') {
1417
+ return 'MM'
1418
+ }
1419
+ return 'YYYY-MM-DD'
1420
+ },
1421
+ fnProhibitToEdit(entity) {
1422
+ $emit(this, 'prohibitToEdit', entity)
1423
+ },
1424
+ setInputNumberConfig() {
1425
+ if (this.column.componentType === 'inputNumber') {
1426
+ if (this.column.valueSetOptions && this.column.valueSetOptions !== '' && this.column.componentType === 'inputNumber') {
1427
+ const inputNumberSetting = JSON.parse(this.column.valueSetOptions)
1428
+ this.inputNumberSet = inputNumberSetting
1429
+ } else {
1430
+ this.inputNumberSet = {
1431
+ min: null,
1432
+ max: null,
1433
+ step: 1,
1434
+ precision: 0,
1435
+ position: ''
1436
+ }
1437
+ }
1438
+ }
1439
+ }
1440
+
1441
+ }
1442
+ }
1443
+ </script>