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,1191 @@
1
+ <template>
2
+ <div>
3
+ <search-form
4
+ v-if="hasLoadedColumns"
5
+ v-show="showSearch"
6
+ ref="sf"
7
+ :code="code"
8
+ :columns="columns"
9
+ :grid-id="gridId"
10
+ :init-search-props="initSearchProps"
11
+ :pagination="pagination"
12
+ :query="query"
13
+ :search-param="searchFormContent"
14
+ :url="url"
15
+ @reset="resetSearch"
16
+ @search="search"
17
+ />
18
+ <div class="nine-grid-area">
19
+ <div
20
+ :id="gridId"
21
+ :style="'height:' + height + 'px;overflow-y: auto;overflow-x: hidden;'"
22
+ >
23
+ <el-row :gutter="24">
24
+ <el-col
25
+ v-if="isHasCreate"
26
+ id="_addCardId_"
27
+ v-permission="createPermission"
28
+ :span="colSpan"
29
+ >
30
+ <el-card
31
+ :body-style="{ padding: '0px' }"
32
+ style="
33
+ border-radius: 4px;
34
+ background: #ffffff;
35
+ border: 1px solid #e5e8ef;
36
+ "
37
+ >
38
+ <div class="add-screen" @click="add">
39
+ <el-icon>
40
+ <Plus/>
41
+ </el-icon>
42
+ <span style="margin-top: 7px">
43
+ {{ $t('superNineGrid.add') }}</span
44
+ >
45
+ </div>
46
+ </el-card>
47
+ </el-col>
48
+ <el-col
49
+ v-for="(params, index) in gridData"
50
+ :key="params.id"
51
+ :span="colSpan"
52
+ >
53
+ <el-card
54
+ :body-style="{ padding: '0px' }"
55
+ :style="{
56
+ border:
57
+ selectionIds.indexOf(params.id) > -1
58
+ ? '1px solid #005EBA'
59
+ : '',
60
+ }"
61
+ shadow="hover"
62
+ >
63
+ <div
64
+ style="height: 160px"
65
+ @click="clickContent(params)"
66
+ @mouseenter="enter(index)"
67
+ @mouseleave="leave()"
68
+ >
69
+ <!-- <transition name="fade">
70
+ <div v-if="seen && index === current" class="popContainer">
71
+ <div class="else-button">
72
+ <template v-for="button in operations">
73
+ <template v-if="isShowButton(params, button)">
74
+ <el-tooltip v-if="button.icon" :key="button.name" v-permission="button.permission?button.permission:'true'" class="item" effect="dark" :content="button.name" placement="top">
75
+ <em :class="button.icon +' icons'" @click.stop="buttonClick(button.event, params)" />
76
+ </el-tooltip>
77
+ <em v-else :key="button.name" v-permission="button.permission?button.permission:'true'" :class="button.name +' icons'" @click.stop="buttonClick(button.event, params)">{{ button.name }} </em>
78
+ </template>
79
+ </template>
80
+ </div>
81
+ </div>
82
+ </transition> -->
83
+ <!-- <img v-if="props && props.imageUrl && objectPropValue(params, propCloumns.imageUrl, props.imageUrl)" :src="defaultShowImageAction+objectPropValue(params, propCloumns.imageUrl, props.imageUrl)" alt="加载失败" class="image"> -->
84
+ <!-- <img v-if="true || (props && props.imageUrl)" :src="defaultShowImageAction+'fa7ae05e-0f0e-4cc0-b24a-69aea4408233'" alt="加载失败" class="image"> -->
85
+ <!-- <div v-else class="image" style="padding: 20px; text-align: center;"> -->
86
+ <div
87
+ class="image"
88
+ style="padding: 15px; box-sizing: border-box"
89
+ >
90
+ <div>
91
+ <el-tooltip
92
+ :content="$t('imatrixUIPublicModel.systemCode') +':' + params.code"
93
+ effect="dark"
94
+ placement="top-start"
95
+ >
96
+ <div
97
+ v-if="props && props.content"
98
+ style="display: inline-block"
99
+ >
100
+ {{
101
+ getPropValue('content', params) +
102
+ getLength(params.code)
103
+ }}
104
+ </div>
105
+ <div
106
+ v-else-if="props && props.title"
107
+ style="display: inline-block"
108
+ >
109
+ {{
110
+ getPropValue('title', params) + getLength(params.code)
111
+ }}
112
+ </div>
113
+ </el-tooltip>
114
+ <div
115
+ v-if="showEnableButton(params)"
116
+ style="
117
+ margin-left: 2px;
118
+ color: #00b42a;
119
+ background-color: #e8ffea;
120
+ width: 68px;
121
+ text-align: center;
122
+ display: inline-block;
123
+ "
124
+ >
125
+ <el-icon>
126
+ <SuccessFilled/>
127
+ </el-icon>
128
+ <span
129
+ :title="getPropValue('subTitle', params)"
130
+ style="margin-left: 4px"
131
+ >{{ getPropValue('subTitle', params) }}</span
132
+ >
133
+ </div>
134
+ </div>
135
+ <div class="button-style">
136
+ {{ $t('imatrixUIPublicModel.edit') }}
137
+ <template v-for="button in operations">
138
+ <template v-if="isShowButton(params, button)">
139
+ <el-tooltip
140
+ v-if="button.icon"
141
+ v-permission="
142
+ button.permission ? button.permission : 'true'
143
+ "
144
+ :content="button.name"
145
+ class="item"
146
+ effect="dark"
147
+ placement="top"
148
+ style="background-color: red"
149
+ >
150
+ <el-icon :class="button.icon + ' icons'" @click.stop="buttonClick(button.event, params)">
151
+ <component :is="button.icon"/>
152
+ </el-icon>
153
+ </el-tooltip>
154
+ <em
155
+ v-else
156
+ v-permission="
157
+ button.permission ? button.permission : 'true'
158
+ "
159
+ :class="button.name + ' icons'"
160
+ @click.stop="buttonClick(button.event, params)"
161
+ >{{ button.name }}
162
+ </em>
163
+ </template>
164
+ </template>
165
+ </div>
166
+ <div
167
+ v-if="isShowEnableState"
168
+ style="float: right; margin-top: 28px"
169
+ >
170
+ <el-button
171
+ v-if="showEnableButton(params)"
172
+ class="button--default"
173
+ size="default"
174
+ @click.stop="changeState(params)"
175
+ >
176
+ {{ $t('imatrixUIPublicModel.forbidden') }}
177
+ </el-button>
178
+ <el-button
179
+ v-else
180
+ size="default"
181
+ type="primary"
182
+ @click.stop="changeState(params)"
183
+ >
184
+ {{ $t('imatrixUIPublicModel.startUsing') }}
185
+ </el-button>
186
+ </div>
187
+ </div>
188
+ </div>
189
+ <!-- <el-divider />
190
+ <div style="padding: 10px 10px 10px 10px;">
191
+ <div class="bottom clearfix">
192
+ <time class="name">
193
+ <span v-if="props && props.title">
194
+ <el-checkbox v-if="multiple" :value="selectionModels['select'+params.id]" :true-label="params.id" :false-label="'false-'+params.id" :title="getPropValue('title', params)" style="width: 100%" @change="changeChecked($event, index)">
195
+ {{ getPropValue('title', params) }}
196
+ <span :style="getTitleStyle(params)"> {{ getPropValue('title', params) }}</span>
197
+ </el-checkbox>
198
+ <el-radio v-else-if="isShowRadio" v-model="currentId" :label="params.id" :title="getPropValue('title', params)" style="width: 100%" @change="changeSelectWhenRadio($event, index)">
199
+ {{ getPropValue('title', params) }}
200
+ <span :style="getTitleStyle(params)"> {{ getPropValue('title', params) }}</span>
201
+ </el-radio>
202
+ <span v-else :style="getTitleStyle(params)" :title="getPropValue('title', params)"> {{ getPropValue('title', params) }}</span>
203
+ </span>
204
+ <span v-else-if="props && props.content">
205
+ <el-checkbox v-if="multiple" :value="selectionModels['select'+params.id]" :true-label="params.id" :false-label="'false-'+params.id" :title="getPropValue('content', params)" style="width: 100%" @change="changeChecked($event, index)">{{ getPropValue('content', params) }}</el-checkbox>
206
+ <el-radio v-else-if="isShowRadio" v-model="currentId" :label="params.id" :title="getPropValue('content', params)" style="width: 100%" @change="changeSelectWhenRadio($event, index)">{{ getPropValue('content', params) }}</el-radio>
207
+ <span v-else :title="getPropValue('content', params)" style="width: 100%"> {{ getPropValue('content', params) }}</span>
208
+ </span>
209
+ <span v-else>
210
+ <el-checkbox v-if="multiple" :value="selectionModels['select'+params.id]" :true-label="params.id" :false-label="'false-'+params.id" @change="changeChecked($event, index)">{{ index + 1 }}</el-checkbox>
211
+ <el-radio v-else-if="isShowRadio" v-model="currentId" :label="params.id" @change="changeSelectWhenRadio($event, index)">{{ index + 1 }}</el-radio>
212
+ <span v-else> {{ index + 1 }}</span>
213
+ </span>
214
+ </time>
215
+ <time v-if="props && props.subTitle" class="state">
216
+ <span :title="getPropValue('subTitle', params)" style="width: 100%">{{ getPropValue('subTitle', params) }}</span>
217
+ </time>
218
+ </div>
219
+ </div> -->
220
+ </el-card>
221
+ </el-col>
222
+ </el-row>
223
+ </div>
224
+ <el-pagination
225
+ v-if="pagination"
226
+ v-model:current-page="currentPage"
227
+ v-model:page-size="pagination.pageSize"
228
+ :layout="pagination.layout"
229
+ :page-sizes="pagination.pageSizes"
230
+ :total="pagination.total!==undefined&&pagination.total!==''&&pagination.total!==null?pagination.total:0"
231
+ @size-change="handleSizeChange"
232
+ @current-change="handleCurrentChange"
233
+ />
234
+ </div>
235
+ </div>
236
+ </template>
237
+
238
+ <script>
239
+ import {$emit} from '../../utils/gogocodeTransfer'
240
+ import customFormatter from './custom-formatter'
241
+ import SearchForm from './search-form.vue'
242
+ import {addDynamicProp, getGridParams, getTableHeight, isHasOptionFunction} from './utils'
243
+ import store from './store'
244
+ import superGridService from './super-grid-service'
245
+ import apis from './apis'
246
+ import Sortable from 'sortablejs'
247
+
248
+ export default {
249
+ name: 'SuperNineGrid',
250
+ components: {
251
+ SearchForm,
252
+ },
253
+ props: {
254
+ code: {
255
+ type: String,
256
+ default: '',
257
+ },
258
+ url: {
259
+ type: String,
260
+ default: '',
261
+ },
262
+ options: {
263
+ type: Object,
264
+ default: function () {
265
+ return {}
266
+ },
267
+ },
268
+ },
269
+ data() {
270
+ let mergeFields = []
271
+ if (
272
+ this.options &&
273
+ this.options.mergeFields &&
274
+ this.options.mergeFields !== ''
275
+ ) {
276
+ mergeFields = this.options.mergeFields.split(',')
277
+ }
278
+ const defaultShowImageAction =
279
+ window.$vueApp.config.globalProperties.baseAPI +
280
+ '/component/super-form/show-image?serverPath='
281
+ const gridId =
282
+ this.options && this.options.id ? this.options.id : '_nineGrid'
283
+ const storeId = this.code + '~' + gridId
284
+ const isShowRadio =
285
+ this.options && this.options.showRadio !== undefined
286
+ ? this.options.showRadio
287
+ : false
288
+ return {
289
+ isLoading: false,
290
+ currentPage: 1,
291
+ showColumnConfig: false,
292
+ basicInfo: {
293
+ summary: 'no',
294
+ },
295
+ columns: [],
296
+ pagination: null,
297
+ query: null,
298
+ lineEdit: null,
299
+ gridData: [],
300
+ sortInfo: null,
301
+ pageSize: null,
302
+ showSearch: false,
303
+ height: null,
304
+ isSql: false, // 是否是sql查询
305
+ hasLoadData: false,
306
+ mergeFields,
307
+ hasLoadedColumns: false, // 是否已经加载了列配置
308
+ seen: false,
309
+ current: null,
310
+ isHasCreate: true, // 是否需要新建按钮
311
+ screenBaseUrl: null,
312
+ props: null, // 属性配置
313
+ operations: [], // 指向格子时出现的操作按钮集合
314
+ propCloumns: null, // 属性字段配置详细信息
315
+ multiple: false, // 是否需要多选
316
+ createPermission: 'true', // 新建权限编码,默认是有权限的
317
+ urlToSaveOrder: null, // 拖动格子后台保存接口路径
318
+ selections: [], // 选中的记录集合
319
+ selectionIds: [], // 选中的记录id集合
320
+ selectionModels: {}, // 选中的记录对象
321
+ searchFormContent: null,
322
+ initSearchProps: [], // 初始查询的字段属性名集合
323
+ defaultShowImageAction, // 显示图片的路径
324
+ gridId,
325
+ storeId,
326
+ currentId: null, // 当前点击的记录id
327
+ isShowRadio, // 单选时是否显示单选按钮
328
+ titleStyle: null, // 标题的样式对象,格式为:{ color: 'green', fontWeight: 'bold'}
329
+ isShowEnableState: false,
330
+ colSpan: 6,
331
+ }
332
+ },
333
+ computed: {},
334
+ provide() {
335
+ return {}
336
+ },
337
+ created() {
338
+ store.set(this.code + '~' + this.gridId, getGridParams())
339
+ store.set('_nine_list_code', this.code + '~' + this.gridId)
340
+ this.initSetting()
341
+ this.initialize()
342
+ // this.showDemo()
343
+ console.log('%c描述-232041', 'color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px', this.operations);
344
+ },
345
+ mounted() {
346
+ this.$watch(
347
+ 'showSearch',
348
+ function (newVal, oldVal) {
349
+ this.$nextTick(() => {
350
+ let tableHeight = getTableHeight(newVal, this.$refs.sf)
351
+ const newHeight = this.resizeHeight()
352
+ if (newHeight) {
353
+ tableHeight = newHeight
354
+ }
355
+ this.height = tableHeight
356
+ })
357
+ },
358
+ {
359
+ immediate: true,
360
+ deep: true,
361
+ }
362
+ )
363
+
364
+ this.$watch(
365
+ 'hasLoadData',
366
+ function (newVal, oldVal) {
367
+ if (newVal === true) {
368
+ this.$nextTick(() => {
369
+ this.rowDrop()
370
+ const gridParams = store.get(this.storeId)
371
+ if (isHasOptionFunction('gridComplete', this.storeId)) {
372
+ gridParams.options.gridComplete.call(this, {
373
+ gridData: this.gridData,
374
+ columns: gridParams.columns,
375
+ superGrid: this.$refs.superGrid,
376
+ })
377
+ }
378
+ const newHeight = this.resizeHeight()
379
+ if (newHeight) {
380
+ this.height = newHeight
381
+ }
382
+ })
383
+ }
384
+ },
385
+ {
386
+ immediate: true,
387
+ deep: true,
388
+ }
389
+ )
390
+ },
391
+ methods: {
392
+ ...superGridService,
393
+ ...apis,
394
+ ...customFormatter,
395
+ getTitleStyle(entity) {
396
+ // 九宫格的标题自定义样式
397
+ if (this.options && this.options.titleStyle) {
398
+ return this.options.titleStyle.call(this, entity)
399
+ }
400
+ return {width: '100%'}
401
+ },
402
+ // 获得属性值
403
+ getPropValue(type, entity) {
404
+ let value = ''
405
+ const gridParams = store.get(this.storeId)
406
+ if (type === 'content') {
407
+ let content = ''
408
+ if (isHasOptionFunction('setContent', this.storeId)) {
409
+ content = gridParams.options.getContent.call(this, entity)
410
+ }
411
+ if (content === undefined || content === '') {
412
+ if (this.props && this.props.content) {
413
+ content = this.objectPropValue(
414
+ entity,
415
+ this.propCloumns.content,
416
+ this.props.content
417
+ )
418
+ } else if (this.props && this.props.title) {
419
+ content = this.objectPropValue(
420
+ entity,
421
+ this.propCloumns.title,
422
+ this.props.title
423
+ )
424
+ }
425
+ }
426
+ value = content
427
+ } else if (type === 'title') {
428
+ let content = ''
429
+ if (isHasOptionFunction('setTitle', this.storeId)) {
430
+ content = gridParams.options.setTitle.call(this, entity)
431
+ }
432
+ if (content === undefined || content === '') {
433
+ if (this.props && this.props.title) {
434
+ content = this.objectPropValue(
435
+ entity,
436
+ this.propCloumns.title,
437
+ this.props.title
438
+ )
439
+ } else if (this.props && this.props.content) {
440
+ content = this.objectPropValue(
441
+ entity,
442
+ this.propCloumns.content,
443
+ this.props.content
444
+ )
445
+ }
446
+ }
447
+ value = content
448
+ } else if (type === 'subTitle') {
449
+ let content = ''
450
+ if (isHasOptionFunction('setSubTitle', this.storeId)) {
451
+ content = gridParams.options.setSubTitle.call(this, entity)
452
+ }
453
+ if (content === undefined || content === '') {
454
+ if (this.props && this.props.subTitle) {
455
+ content = this.objectPropValue(
456
+ entity,
457
+ this.propCloumns.subTitle,
458
+ this.props.subTitle
459
+ )
460
+ }
461
+ }
462
+ value = content
463
+ }
464
+ if (value === undefined) {
465
+ value = ''
466
+ }
467
+ return value
468
+ },
469
+ resizeHeight() {
470
+ const gridParams = store.get(this.storeId)
471
+ if (isHasOptionFunction('resizeHeight', this.storeId)) {
472
+ let searchHeight = 0
473
+ if (this.showSearch === true) {
474
+ if (this.$refs.sf) {
475
+ // 获得查询区高度
476
+ searchHeight = this.$refs.sf.$el.offsetHeight
477
+ }
478
+ }
479
+ return gridParams.options.resizeHeight.call(this, {
480
+ code: this.code,
481
+ height: this.height,
482
+ searchHeight: searchHeight,
483
+ })
484
+ }
485
+ },
486
+ enter(index) {
487
+ this.seen = true
488
+ this.current = index
489
+ },
490
+ leave() {
491
+ this.seen = false
492
+ this.current = null
493
+ },
494
+ initSetting() {
495
+ const gridParams = store.get(this.storeId)
496
+ if (typeof this.options !== 'undefined') {
497
+ Object.assign(gridParams.options, this.options)
498
+ } else {
499
+ gridParams.options = {}
500
+ }
501
+ if (this.options && typeof this.options.isHasCreate !== 'undefined') {
502
+ this.isHasCreate = this.options.isHasCreate
503
+ }
504
+ if (this.options && typeof this.options.props !== 'undefined') {
505
+ this.props = this.options.props
506
+ }
507
+ if (this.options && typeof this.options.operations !== 'undefined') {
508
+ this.operations = this.options.operations
509
+ }
510
+ if (
511
+ this.options &&
512
+ typeof this.options.createPermission !== 'undefined'
513
+ ) {
514
+ this.createPermission = this.options.createPermission
515
+ }
516
+ if (this.options && typeof this.options.multiple !== 'undefined') {
517
+ this.multiple = this.options.multiple
518
+ }
519
+ if (
520
+ this.options &&
521
+ typeof this.options.isShowEnableState !== 'undefined'
522
+ ) {
523
+ this.isShowEnableState = this.options.isShowEnableState
524
+ }
525
+ if (this.options && typeof this.options.colSpan !== 'undefined') {
526
+ this.colSpan = this.options.colSpan
527
+ }
528
+ },
529
+ // 获得各属性对应的字段配置
530
+ getPropColumns() {
531
+ if (this.columns && this.columns.length > 0) {
532
+ // imageUrl:{column}, content: {column}, title: {}, subTitle:{}
533
+ this.propCloumns = {}
534
+ this.columns.forEach((column) => {
535
+ if (this.props.imageUrl && this.props.imageUrl === column.prop) {
536
+ this.propCloumns.imageUrl = column
537
+ }
538
+ if (this.props.content && this.props.content === column.prop) {
539
+ this.propCloumns.content = column
540
+ }
541
+ if (this.props.title && this.props.title === column.prop) {
542
+ this.propCloumns.title = column
543
+ }
544
+ if (this.props.subTitle && this.props.subTitle === column.prop) {
545
+ this.propCloumns.subTitle = column
546
+ }
547
+ })
548
+ }
549
+ },
550
+ fetchData(searchParam, isSearch) {
551
+ return new Promise((resolve, reject) => {
552
+ // 获得各属性对应的字段配置
553
+ this.getPropColumns()
554
+ this.isLoading = true
555
+ this.hasLoadData = false
556
+ if (isSearch === undefined || isSearch === false) {
557
+ // 如果不是查询时才需要从缓存中获得结果
558
+ // 如果是刷新当前列表,则需要获得缓存中的window.sessionStorage
559
+ const isRefreshList = window.sessionStorage.getItem(
560
+ 'refreshList-' + this.storeId
561
+ )
562
+ // console.log('fetchData--isRefreshList--', isRefreshList)
563
+ if (isRefreshList !== undefined && isRefreshList === 'true') {
564
+ const searchParamJson = window.sessionStorage.getItem(
565
+ 'searchParam-' + this.storeId
566
+ )
567
+ // console.log('fetchData--searchParamJson--', searchParamJson)
568
+ // console.log('fetchData--pagination--', this.pagination)
569
+ if (
570
+ searchParamJson !== undefined &&
571
+ searchParamJson !== null &&
572
+ searchParamJson !== ''
573
+ ) {
574
+ searchParam = JSON.parse(searchParamJson)
575
+ const pagination = searchParam.pagination
576
+ if (pagination) {
577
+ this.currentPage = pagination.currentPage
578
+ this.pagination.pageSize = pagination.pageSize
579
+ this.pagination.showTotal = pagination.showTotal
580
+ }
581
+ this.getInitSearchForm(searchParam.searchForm)
582
+ // this.searchFormContent = searchParam.searchForm
583
+ }
584
+ }
585
+ }
586
+ window.sessionStorage.removeItem('refreshList-' + this.storeId)
587
+ if (searchParam === undefined) {
588
+ searchParam = this.getSearchParam()
589
+ }
590
+ const gridParams = store.get(this.storeId)
591
+ let param = searchParam
592
+ if (gridParams.options.extraParam) {
593
+ param = {
594
+ searchParam: searchParam,
595
+ }
596
+ if (gridParams.options.extraParam) {
597
+ for (const paramName in gridParams.options.extraParam) {
598
+ param[paramName] = gridParams.options.extraParam[paramName]
599
+ }
600
+ }
601
+ }
602
+ // 导出需要这两个参数
603
+ gridParams.searchParam = searchParam
604
+ gridParams.url = this.url
605
+ const requestUrl = this.url
606
+ // 缓存查询条件及当前页数
607
+ window.sessionStorage.setItem(
608
+ 'searchParam-' + this.storeId,
609
+ JSON.stringify(param)
610
+ )
611
+ this.$http
612
+ .post(requestUrl, param)
613
+ .then((data) => {
614
+ // 对数据做序列化,比如:处理xss攻击
615
+ if (isHasOptionFunction('gridDataLoaded', this.storeId)) {
616
+ const gridData = gridParams.options.gridDataLoaded.call(this, {
617
+ gridData: data.data,
618
+ columns: gridParams.columns,
619
+ })
620
+ if (gridData) {
621
+ this.gridData = gridData
622
+ } else {
623
+ this.gridData = data.data
624
+ }
625
+ } else {
626
+ this.gridData = data.data
627
+ }
628
+ if (!this.gridData) {
629
+ this.gridData = []
630
+ }
631
+
632
+ if (this.pagination !== null) {
633
+ this.pagination.total = data.total
634
+ }
635
+
636
+ gridParams.gridData = this.gridData
637
+ // 完成深拷贝,复制一份对象,行编辑时使用
638
+ gridParams.orgGridData = [].concat(
639
+ JSON.parse(JSON.stringify(this.gridData))
640
+ )
641
+
642
+ gridParams.pagination = this.pagination
643
+ gridParams.loaded = true
644
+ this.hasLoadData = true
645
+ resolve()
646
+ })
647
+ .catch((error) => {
648
+ if (isHasOptionFunction('loadError', this.storeId)) {
649
+ gridParams.options.loadError.call(this, this.code, error)
650
+ }
651
+ reject(error)
652
+ })
653
+ })
654
+ },
655
+ getLength(paramsData) {
656
+ if (paramsData && paramsData.length > 5) {
657
+ return '(' + paramsData.substring(0, 5) + '...' + ')'
658
+ } else if (paramsData) {
659
+ return '(' + paramsData + ')'
660
+ } else {
661
+ return ''
662
+ }
663
+ },
664
+ // 获得初始查询条件对象
665
+ getInitSearchForm(searchFormArr) {
666
+ const gridParams = store.get(this.storeId)
667
+ if (searchFormArr && searchFormArr.length > 0) {
668
+ this.searchFormContent = {}
669
+ searchFormArr.forEach((item) => {
670
+ // 获得的是"isDeleted"
671
+ let prop = item.propName
672
+ // 获得的是“deleted”
673
+ const columnProp = item.columnProp
674
+ const dataType = item.dataType
675
+ if (dataType && dataType === 'BOOLEAN') {
676
+ prop = columnProp
677
+ }
678
+ this.initSearchProps.push(prop)
679
+ const propValue = item.propValue
680
+ if (prop.indexOf('.') > 0) {
681
+ // 动态给searchForm添加属性,包括多级嵌套属性,属性的初始值都为 null
682
+ addDynamicProp(this.searchFormContent, prop, propValue)
683
+ } else {
684
+ this.searchFormContent[prop] = propValue
685
+ }
686
+ })
687
+ gridParams.searchForm = searchFormArr
688
+ // 调用查询api方法,该方法中调用了@showSearch方法,用于控制“查询”按钮改名为“取消查询”
689
+ this.showSearchForm()
690
+ } else {
691
+ gridParams.searchForm = null
692
+ }
693
+ },
694
+ showDemo() {
695
+ this.isLoading = true
696
+ this.$http
697
+ .get(this.url)
698
+ .then((data) => {
699
+ Object.assign(this, data)
700
+ const gridParams = store.get(this.storeId)
701
+
702
+ gridParams.listCode = this.code
703
+
704
+ gridParams.columns = this.columns
705
+ if (gridParams.columns && this.options.dynamicColumns) {
706
+ for (var i = 0; i < this.options.dynamicColumns.length; i++) {
707
+ this.options.dynamicColumns[i].dynamic = true
708
+ gridParams.columns.push(this.options.dynamicColumns[i])
709
+ }
710
+ }
711
+ gridParams.lineEdit = this.lineEdit
712
+ gridParams.basicInfo = this.basicInfo
713
+ gridParams.pagination = this.pagination
714
+ gridParams.query = this.query
715
+
716
+ this.gridData = data.gridData
717
+ // 对数据做序列化,比如:处理xss攻击
718
+ if (isHasOptionFunction('gridDataLoaded', this.storeId)) {
719
+ const gridData = gridParams.options.gridDataLoaded.call(
720
+ this,
721
+ data.gridData
722
+ )
723
+ if (gridData) {
724
+ this.gridData = gridData
725
+ } else {
726
+ this.gridData = data.gridData
727
+ }
728
+ } else {
729
+ this.gridData = data.gridData
730
+ }
731
+
732
+ if (this.pagination != null) {
733
+ this.pagination.total = data.total
734
+ }
735
+ if (!this.gridData) {
736
+ this.gridData = []
737
+ }
738
+ gridParams.gridData = this.gridData
739
+ // 完成深拷贝,复制一份对象,行编辑时使用
740
+ gridParams.orgGridData = [].concat(
741
+ JSON.parse(JSON.stringify(this.gridData))
742
+ )
743
+ gridParams.pagination = this.pagination
744
+
745
+ if (isHasOptionFunction('gridComplete', this.storeId)) {
746
+ gridParams.options.gridComplete.call(
747
+ this,
748
+ this.gridData,
749
+ gridParams.columns
750
+ )
751
+ }
752
+ })
753
+ .catch((error) => {
754
+ if (isHasOptionFunction('loadError', this.storeId)) {
755
+ const gridParams = store.get(this.storeId)
756
+ gridParams.options.loadError.call(this, this.code, error)
757
+ }
758
+ })
759
+ },
760
+ search(searchForm) {
761
+ const vm = this
762
+ return new Promise((resolve, reject) => {
763
+ const gridParams = store.get(vm.storeId)
764
+ if (typeof searchForm !== 'undefined' && searchForm !== null) {
765
+ gridParams.searchForm = searchForm
766
+ } else {
767
+ gridParams.searchForm = null
768
+ }
769
+
770
+ vm.fetchData(vm.getSearchParam(), true)
771
+ .then((data) => {
772
+ if (
773
+ gridParams.options !== undefined &&
774
+ gridParams.options.isHiddenSearchForm !== undefined &&
775
+ gridParams.options.isHiddenSearchForm === true
776
+ ) {
777
+ // 查询时,是否隐藏查询区域,默认是不隐藏查询区域
778
+ vm.showSearch = false
779
+ $emit(vm, 'cancel-search')
780
+ }
781
+ if (vm.$refs.sf) {
782
+ vm.$refs.sf.loading = false
783
+ }
784
+ resolve(data)
785
+ })
786
+ .catch((error) => {
787
+ if (vm.$refs.sf) {
788
+ vm.$refs.sf.loading = false
789
+ }
790
+ reject(error)
791
+ })
792
+ })
793
+ },
794
+ getSearchParam() {
795
+ const searchParam = {
796
+ code: this.code,
797
+ }
798
+ const gridParams = store.get(this.storeId)
799
+ if (this.pagination !== null) {
800
+ const pagination = {
801
+ currentPage: this.currentPage,
802
+ pageSize: this.pagination.pageSize,
803
+ showTotal: this.pagination.showTotal,
804
+ }
805
+ if (this.pageSize !== null) {
806
+ // 表示更改了每页显示的数据条数
807
+ pagination.pageSize = this.pageSize
808
+ }
809
+ searchParam.pagination = pagination
810
+ }
811
+ // 排序信息
812
+ if (this.sortInfo !== null) {
813
+ // 表示更改了排序信息
814
+ searchParam.sorts = this.sortInfo
815
+ }
816
+ if (this.mergeFields && this.mergeFields.length > 0) {
817
+ if (!searchParam.sorts) {
818
+ searchParam.sorts = []
819
+ }
820
+ const mergeFieldsArr = []
821
+ for (const mergeField of this.mergeFields) {
822
+ let flag = true
823
+ for (const so of searchParam.sorts) {
824
+ if (so.prop === mergeField) {
825
+ flag = false
826
+ break
827
+ }
828
+ }
829
+ if (flag) {
830
+ mergeFieldsArr.push({
831
+ prop: mergeField,
832
+ order: 'ascending',
833
+ })
834
+ }
835
+ }
836
+ mergeFieldsArr.push(...searchParam.sorts)
837
+ searchParam.sorts = mergeFieldsArr
838
+ }
839
+ // 是否有初始过滤条件
840
+ if (
841
+ gridParams.options &&
842
+ typeof gridParams.options.initSearchForm !== 'undefined'
843
+ ) {
844
+ searchParam.initSearchForm = gridParams.options.initSearchForm
845
+ }
846
+ if (typeof gridParams.searchForm !== 'undefined') {
847
+ searchParam.searchForm = gridParams.searchForm
848
+ } else {
849
+ searchParam.searchForm = []
850
+ }
851
+ return searchParam
852
+ },
853
+ handleSizeChange(val) {
854
+ this.pageSize = val
855
+ this.fetchData(this.getSearchParam())
856
+ },
857
+ handleCurrentChange(val) {
858
+ this.fetchData(this.getSearchParam())
859
+ },
860
+ handleSortChange({column, prop, order}) {
861
+ if (prop !== null) {
862
+ // 当点击第3次时,prop会是空,表示清空排序字段,还原原顺序
863
+ this.sortInfo = [
864
+ {
865
+ prop: prop,
866
+ order: order,
867
+ },
868
+ ]
869
+ } else {
870
+ this.sortInfo = null
871
+ }
872
+ this.fetchData(this.getSearchParam())
873
+ $emit(this, 'sort-change', {column, prop, order})
874
+ },
875
+ resetSearch() {
876
+ this.search(null, false)
877
+ },
878
+ // 新建事件
879
+ add() {
880
+ $emit(this, 'add')
881
+ },
882
+ // 操作按钮的点击事件
883
+ buttonClick(event, data) {
884
+ if (event) {
885
+ if (typeof event === 'function') {
886
+ event.call(this, data)
887
+ } else {
888
+ $emit(this, event, data)
889
+ }
890
+ }
891
+ },
892
+ // 点击内容区域的事件
893
+ clickContent(data) {
894
+ this.changeSelect(data)
895
+ $emit(this, 'click', data)
896
+ },
897
+ // 格子拖拽
898
+ rowDrop() {
899
+ if (this.urlToSaveOrder) {
900
+ let urlToSaveOrder = this.urlToSaveOrder
901
+ if (
902
+ urlToSaveOrder.indexOf('http:') < 0 ||
903
+ urlToSaveOrder.indexOf('https:') < 0
904
+ ) {
905
+ // 表示是相对路径,需要拼接全路径
906
+ let baseURL = window.$vueApp.config.globalProperties.baseURL
907
+ if (baseURL.lastIndexOf('/') === baseURL.length - 1) {
908
+ // 表示以斜线结尾
909
+ // 去掉斜线
910
+ baseURL = baseURL.substring(0, baseURL.length - 1)
911
+ }
912
+ if (urlToSaveOrder.indexOf('/') > 0) {
913
+ // 表示不是以斜线开头,需要开头加“/”
914
+ urlToSaveOrder = '/' + urlToSaveOrder
915
+ }
916
+ urlToSaveOrder = baseURL + urlToSaveOrder
917
+ }
918
+ const tbody = document.querySelector('#' + this.gridId + ' .el-row')
919
+ if (tbody != null) {
920
+ const vm = this
921
+ Sortable.create(tbody, {
922
+ draggable: '.col-content',
923
+ onEnd({newIndex, oldIndex}) {
924
+ const addCardId = document.querySelector(
925
+ '#' + vm.gridId + ' #_addCardId_'
926
+ )
927
+ if (addCardId != null) {
928
+ // 表示存在新建区域,则序号需要减1
929
+ if (oldIndex > 0) {
930
+ oldIndex = oldIndex - 1
931
+ }
932
+ if (newIndex > 0) {
933
+ newIndex = newIndex - 1
934
+ }
935
+ }
936
+ const params = {
937
+ oldIndex: oldIndex,
938
+ newIndex: newIndex,
939
+ gridData: vm.gridData,
940
+ }
941
+ vm.$http.post(urlToSaveOrder, params).then((data) => {
942
+ const currRow = vm.gridData.splice(oldIndex, 1)[0]
943
+ vm.gridData.splice(newIndex, 0, currRow)
944
+ vm.refresh().then(() => {
945
+ $emit(vm, 'afterDrag', params)
946
+ })
947
+ })
948
+ },
949
+ })
950
+ }
951
+ }
952
+ },
953
+ // 多选按钮的change事件
954
+ changeChecked(label, index) {
955
+ const entity = this.gridData[index]
956
+ if ((label + '').indexOf('false-') >= 0) {
957
+ // 表示取消勾选记录
958
+ this.unselect(entity)
959
+ } else {
960
+ // 表示勾选记录
961
+ this.select(entity)
962
+ }
963
+ },
964
+ unselect(entity) {
965
+ const id = entity.id
966
+ const index = this.selectionIds.indexOf(id)
967
+ if (index > -1) {
968
+ this.selections.splice(index, 1)
969
+ this.selectionIds.splice(index, 1)
970
+ }
971
+ $emit(this, 'unselect', entity, this.selections)
972
+ this.selectionModels['select' + id] = 'false-' + id
973
+ // console.log('unselect---this.selections=', this.selections)
974
+ },
975
+ select(entity) {
976
+ const id = entity.id
977
+ if (this.selectionIds.indexOf(id) < 0) {
978
+ this.selectionIds[this.selectionIds.length] = id
979
+ this.selections[this.selections.length] = entity
980
+ }
981
+ $emit(this, 'select', entity, this.selections)
982
+ this.selectionModels['select' + id] = id
983
+ // console.log('select---this.selections=', this.selections)
984
+ },
985
+ // 单选按钮的change事件
986
+ changeSelectWhenRadio(label, index) {
987
+ const entity = this.gridData[index]
988
+ this.selectionIds = []
989
+ this.selections = []
990
+ this.selectionModels = {}
991
+ this.select(entity)
992
+ },
993
+ changeSelect(data) {
994
+ const id = data.id
995
+ if (this.multiple === true) {
996
+ // 多选时
997
+ if (this.selectionIds && this.selectionIds.indexOf(id) >= 0) {
998
+ // 表示需要取消选中
999
+ this.unselect(data)
1000
+ } else {
1001
+ // 表示需要选中
1002
+ this.select(data)
1003
+ }
1004
+ } else {
1005
+ // 单选时
1006
+ this.currentId = id
1007
+ this.selectionIds = []
1008
+ this.selections = []
1009
+ this.selectionModels = {}
1010
+ this.select(data)
1011
+ }
1012
+ },
1013
+ isShowButton(entity, button) {
1014
+ const val = this.isShowButtonFun(entity, button)
1015
+ if (val === undefined) {
1016
+ return true
1017
+ }
1018
+ return val
1019
+ },
1020
+ // 是否显示启用禁用按钮
1021
+ showEnableButton(entity) {
1022
+ const gridParams = store.get(this.storeId)
1023
+ if (isHasOptionFunction('showEnableButton', this.storeId)) {
1024
+ return gridParams.options.showEnableButton.call(this, entity)
1025
+ }
1026
+ return false
1027
+ },
1028
+ // 启用禁用按钮显示状态
1029
+ changeState(entity) {
1030
+ const gridParams = store.get(this.storeId)
1031
+ if (isHasOptionFunction('changeState', this.storeId)) {
1032
+ return gridParams.options.changeState.call(this, entity)
1033
+ }
1034
+ return false
1035
+ },
1036
+ },
1037
+ emits: [
1038
+ 'sort-change',
1039
+ ,
1040
+ 'click',
1041
+ 'afterDrag',
1042
+ 'unselect',
1043
+ 'select',
1044
+ 'cancel-search',
1045
+ 'add',
1046
+ ,
1047
+ ],
1048
+ }
1049
+ </script>
1050
+
1051
+ <style lang="scss" rel="stylesheet/scss" scoped>
1052
+ .nine-grid-area {
1053
+ padding: 10px;
1054
+
1055
+ .el-row {
1056
+ margin-bottom: 20px;
1057
+
1058
+ &:last-child {
1059
+ margin-bottom: 0;
1060
+ }
1061
+ }
1062
+
1063
+ .el-col-5 {
1064
+ width: 20%;
1065
+ max-width: 20%;
1066
+ padding-left: 12px;
1067
+ padding-right: 12px;
1068
+ }
1069
+
1070
+ .el-col {
1071
+ border-radius: 4px;
1072
+ margin-bottom: 10px;
1073
+ }
1074
+
1075
+ .name {
1076
+ font-size: 12px;
1077
+ color: #555;
1078
+ float: left;
1079
+ width: 80%;
1080
+ text-align: left;
1081
+ }
1082
+
1083
+ .bottom {
1084
+ // margin-top: 13px;
1085
+ line-height: 13px;
1086
+ // background: aquamarine;
1087
+ }
1088
+
1089
+ .state {
1090
+ font-size: 12px;
1091
+ margin-top: 1.5px;
1092
+ float: right;
1093
+ line-height: 1;
1094
+ display: flex;
1095
+ align-items: right;
1096
+ color: #999;
1097
+ width: 20%;
1098
+ text-align: right;
1099
+ }
1100
+
1101
+ .image {
1102
+ width: 100%;
1103
+ display: block;
1104
+ height: 200px;
1105
+ }
1106
+
1107
+ .clearfix:before,
1108
+ .clearfix:after {
1109
+ display: table;
1110
+ content: '';
1111
+ }
1112
+
1113
+ .clearfix:after {
1114
+ clear: both;
1115
+ }
1116
+
1117
+ .input-with-select {
1118
+ // background-color: #fff;
1119
+ width: 200px;
1120
+ float: right;
1121
+ }
1122
+
1123
+ .popContainer {
1124
+ position: absolute;
1125
+ width: 23.15%;
1126
+ display: block;
1127
+ height: 200px;
1128
+ background: rgba(0, 0, 0, 0.5);
1129
+ text-align: right;
1130
+ }
1131
+
1132
+ .fade-enter-active,
1133
+ .fade-leave-active {
1134
+ transition: opacity 0.5s;
1135
+ }
1136
+
1137
+ .fade-enter,
1138
+ .fade-leave-to {
1139
+ opacity: 0;
1140
+ }
1141
+
1142
+ .icons {
1143
+ color: #adb5bd;
1144
+ margin: 10px 10px 0px 0px;
1145
+ cursor: pointer;
1146
+ }
1147
+
1148
+ .release-status {
1149
+ display: block;
1150
+ width: 8px;
1151
+ height: 8px;
1152
+ margin-right: 8px;
1153
+ border-radius: 100%;
1154
+ }
1155
+
1156
+ .add-screen {
1157
+ display: flex;
1158
+ flex-direction: column;
1159
+ justify-content: center;
1160
+ align-items: center;
1161
+ cursor: pointer;
1162
+ height: 160px;
1163
+ // background-color: #fff;
1164
+ // border: 1px solid #7693f5;
1165
+ // box-shadow: 0 2px 8px 0 rgba(104,130,218,.4);
1166
+ font-size: 12px;
1167
+ color: #666666;
1168
+ font-family: Source Han Sans CN;
1169
+ font-weight: regular;
1170
+ font-size: 14px;
1171
+ line-height: 14px;
1172
+ letter-spacing: 0px;
1173
+ text-align: left;
1174
+ }
1175
+
1176
+ .el-divider--horizontal {
1177
+ margin: 5px 0;
1178
+ }
1179
+
1180
+ .button-style {
1181
+ margin-top: 28px;
1182
+ color: #606266;
1183
+ font-family: Source Han Sans CN;
1184
+ font-weight: regular;
1185
+ font-size: 14px;
1186
+ line-height: 14px;
1187
+ letter-spacing: 0px;
1188
+ text-align: left;
1189
+ }
1190
+ }
1191
+ </style>