@utogether/udp-core 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/build/index.ts +90 -0
  2. package/build/plugins.ts +26 -0
  3. package/dist/403-B1R-4vXw.js +64 -0
  4. package/dist/404-fXPl8csw.js +64 -0
  5. package/dist/500-eI5842YB.js +66 -0
  6. package/dist/AuthorityInfo-CfVH6PaB.js +4 -0
  7. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-DbK-f8jH.js +102 -0
  8. package/dist/AuthorityPanel-BaLMwMgW.js +4 -0
  9. package/dist/AuthorityPanel.vue_vue_type_style_index_0_lang-C_bkqLD9.js +107 -0
  10. package/dist/Company-CYC9Avfz.js +25 -0
  11. package/dist/CompanyPanel-B4MzoqN_.js +206 -0
  12. package/dist/DataSet-DT-rGICv.js +147 -0
  13. package/dist/Department-B4BNSiYx.js +25 -0
  14. package/dist/DepartmentPanel-zJO89L2O.js +224 -0
  15. package/dist/DesignPanel-S8P0J97f.js +4 -0
  16. package/dist/DesignPanel.vue_vue_type_style_index_0_lang-DW-_Vqrr.js +1015 -0
  17. package/dist/DictView-bIS5-rK-.js +95 -0
  18. package/dist/InvOrganization-MuM2jtsG.js +66 -0
  19. package/dist/Org-kXHSjsgJ.js +35 -0
  20. package/dist/Preview-CRyiwUIR.js +48 -0
  21. package/dist/ReportDefine-WZYIx8Sm.js +10 -0
  22. package/dist/ReportDesign-D-7GKgpb.js +165 -0
  23. package/dist/ReportQuery-BIIJny6w.js +75 -0
  24. package/dist/ReportQueryFrom-OoUl7N2O.js +4 -0
  25. package/dist/ReportQueryFrom.vue_vue_type_style_index_0_lang-B878fgj8.js +177 -0
  26. package/dist/ReportTemplate-Cfeq9US-.js +161 -0
  27. package/dist/Role-BwTV2QMH.js +25 -0
  28. package/dist/RoleAssign-De1JjOun.js +26 -0
  29. package/dist/RolePanel-E3RcdByM.js +4 -0
  30. package/dist/RolePanel-pUBXsqCM.js +4 -0
  31. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-B2pQwHb0.js +148 -0
  32. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-CTIad9_Q.js +126 -0
  33. package/dist/ScrollPanel.vue_vue_type_style_index_0_lang-vMR1fBi0.js +100 -0
  34. package/dist/Staff-Czm7A8vI.js +25 -0
  35. package/dist/StaffInfo-DJzvBuxy.js +4 -0
  36. package/dist/StaffInfo.vue_vue_type_style_index_0_lang-DMTL7KCh.js +108 -0
  37. package/dist/StaffPanel-CHk60LEz.js +4 -0
  38. package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-iPKLb5wG.js +114 -0
  39. package/dist/SysUser-BGwbttRn.js +15 -0
  40. package/dist/SysUserPanel-BCbKoLKt.js +4 -0
  41. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-0QUjnhjF.js +289 -0
  42. package/dist/SystemMenu-BkqZSDKl.js +151 -0
  43. package/dist/UserInfo-BsyAcT2d.js +4 -0
  44. package/dist/UserInfo.vue_vue_type_style_index_0_lang-D0-KDxAh.js +158 -0
  45. package/dist/await-to-js.es5-BtRbN2QH.js +10 -0
  46. package/dist/childView-CF83nhxb.js +4 -0
  47. package/dist/childView-CyuLTUqC.js +4 -0
  48. package/dist/childView.vue_vue_type_style_index_0_lang-CNSgGda3.js +187 -0
  49. package/dist/childView.vue_vue_type_style_index_0_lang-Cch4lE-i.js +144 -0
  50. package/dist/code-rule-Bz-gnktN.js +147 -0
  51. package/dist/core.es.js +13 -0
  52. package/dist/core.umd.js +173 -0
  53. package/dist/cron-task-CIifSUdW.js +135 -0
  54. package/dist/frameView-_d2mqjjQ.js +43 -0
  55. package/dist/img/l_img.svg +1 -0
  56. package/dist/img/minicolors.png +0 -0
  57. package/dist/img/v_img.svg +1 -0
  58. package/dist/index-BKIw8tSn.js +9195 -0
  59. package/dist/layoutView-DLKVepB8.js +3317 -0
  60. package/dist/log-in-e7D5Ss1P.js +110 -0
  61. package/dist/log-out--RRncZhN.js +120 -0
  62. package/dist/login-LREiDfFU.js +251 -0
  63. package/dist/login-log-CvVnyGi3.js +68 -0
  64. package/dist/lov-view-DDrIVILB.js +97 -0
  65. package/dist/menuInfo-B1FUV-Sk.js +4 -0
  66. package/dist/menuInfo.vue_vue_type_style_index_0_lang-Cnk3vdtD.js +338 -0
  67. package/dist/pda-app-CRhVGijN.js +2209 -0
  68. package/dist/redirect-DiaNDu8F.js +15 -0
  69. package/dist/resource-BCwx9fEv.js +97 -0
  70. package/dist/su-welcome-189A7N4r.js +526 -0
  71. package/dist/sys-config-BZ3sejow.js +277 -0
  72. package/dist/udp-core.css +9 -0
  73. package/dist/utogether-r08LNiIZ.js +182 -0
  74. package/index.ts +36 -0
  75. package/package.json +16 -0
  76. package/public/img/l_img.svg +1 -0
  77. package/public/img/minicolors.png +0 -0
  78. package/public/img/v_img.svg +1 -0
  79. package/src/App.vue +70 -0
  80. package/src/api/http.ts +50 -0
  81. package/src/api/index.ts +31 -0
  82. package/src/api/mock.ts +20 -0
  83. package/src/api/user.ts +43 -0
  84. package/src/assets/images/avatars.jpg +0 -0
  85. package/src/assets/images/empty.png +0 -0
  86. package/src/assets/images/login.png +0 -0
  87. package/src/assets/images/logo.png +0 -0
  88. package/src/assets/images/mask-text.jpg +0 -0
  89. package/src/assets/images/minicolors.png +0 -0
  90. package/src/assets/images/utogether.png +0 -0
  91. package/src/assets/images/welcome.png +0 -0
  92. package/src/assets/status/403.svg +1 -0
  93. package/src/assets/status/404.svg +1 -0
  94. package/src/assets/status/500.svg +1 -0
  95. package/src/assets/svg/back_top.svg +1 -0
  96. package/src/assets/svg/bg.svg +1 -0
  97. package/src/assets/svg/close.svg +1 -0
  98. package/src/assets/svg/close_all.svg +1 -0
  99. package/src/assets/svg/close_left.svg +1 -0
  100. package/src/assets/svg/close_other.svg +1 -0
  101. package/src/assets/svg/close_right.svg +1 -0
  102. package/src/assets/svg/dark.svg +1 -0
  103. package/src/assets/svg/day.svg +1 -0
  104. package/src/assets/svg/enter_outlined.svg +1 -0
  105. package/src/assets/svg/exit_screen.svg +1 -0
  106. package/src/assets/svg/full_screen.svg +1 -0
  107. package/src/assets/svg/globalization.svg +1 -0
  108. package/src/assets/svg/loading.svg +17 -0
  109. package/src/assets/svg/mdi_keyboard_esc.svg +1 -0
  110. package/src/assets/svg/refresh.svg +1 -0
  111. package/src/assets/svg/system.svg +1 -0
  112. package/src/components/ReCountTo/README.md +2 -0
  113. package/src/components/ReCountTo/index.ts +18 -0
  114. package/src/components/ReCountTo/src/normal/index.tsx +165 -0
  115. package/src/components/ReCountTo/src/normal/props.ts +37 -0
  116. package/src/components/ReCountTo/src/rebound/index.tsx +67 -0
  117. package/src/components/ReCountTo/src/rebound/props.ts +14 -0
  118. package/src/components/ReCountTo/src/rebound/rebound.css +77 -0
  119. package/src/components/ReCropper/index.ts +14 -0
  120. package/src/components/ReCropper/src/index.tsx +141 -0
  121. package/src/components/ReFlicker/index.css +39 -0
  122. package/src/components/ReFlicker/index.ts +50 -0
  123. package/src/components/ReFlop/index.ts +14 -0
  124. package/src/components/ReFlop/src/Filpper.tsx +99 -0
  125. package/src/components/ReFlop/src/filpper.css +184 -0
  126. package/src/components/ReFlop/src/index.vue +126 -0
  127. package/src/components/ReFlowChart/index.ts +24 -0
  128. package/src/components/ReFlowChart/src/Control.vue +139 -0
  129. package/src/components/ReFlowChart/src/DataDialog.vue +12 -0
  130. package/src/components/ReFlowChart/src/NodePanel.vue +151 -0
  131. package/src/components/ReFlowChart/src/adpterForTurbo.ts +160 -0
  132. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.css +49 -0
  133. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.eot +0 -0
  134. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.js +61 -0
  135. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.json +58 -0
  136. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.svg +47 -0
  137. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.ttf +0 -0
  138. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff +0 -0
  139. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff2 +0 -0
  140. package/src/components/ReFlowChart/src/config.ts +62 -0
  141. package/src/components/ReIcon/index.ts +12 -0
  142. package/src/components/ReIcon/src/Icon.vue +81 -0
  143. package/src/components/ReIcon/src/hooks.ts +63 -0
  144. package/src/components/ReIcon/src/iconfont.ts +45 -0
  145. package/src/components/ReIcon/src/iconifyIconOffline.ts +36 -0
  146. package/src/components/ReIcon/src/iconifyIconOnline.ts +28 -0
  147. package/src/components/ReIcon/src/offlineIcon.ts +64 -0
  148. package/src/components/ReIcon/src/types.ts +20 -0
  149. package/src/components/ReSplitPane/index.css +49 -0
  150. package/src/components/ReSplitPane/index.tsx +119 -0
  151. package/src/components/ReSplitPane/resizer.css +45 -0
  152. package/src/components/ReSplitPane/resizer.tsx +30 -0
  153. package/src/components/SuCharts/index.ts +36 -0
  154. package/src/components/SuCharts/src/EchartBar.vue +134 -0
  155. package/src/components/SuCharts/src/UserInfo.vue +78 -0
  156. package/src/components/SuCharts/src/echart-line.vue +85 -0
  157. package/src/components/SuCharts/src/echart-pie.vue +95 -0
  158. package/src/components/SuCommon/card/components/Card.vue +148 -0
  159. package/src/components/SuCommon/card/components/DialogForm.vue +127 -0
  160. package/src/components/SuCommon/card/index.vue +142 -0
  161. package/src/components/SuCommon/icon-select/index.vue +241 -0
  162. package/src/components/SuCommon/table/index.vue +208 -0
  163. package/src/components/SuCommon/utils/index.ts +103 -0
  164. package/src/components/SuCommon/utils/slot.tsx +50 -0
  165. package/src/components/SuFloatButton/index.vue +159 -0
  166. package/src/components/SuQrcode/index.ts +14 -0
  167. package/src/components/SuQrcode/src/index.scss +9 -0
  168. package/src/components/SuQrcode/src/index.tsx +236 -0
  169. package/src/components/SuScrollTree/ScrollPanel.vue +175 -0
  170. package/src/components/SuTable/SuTable.vue +334 -0
  171. package/src/components/SuTypeit/index.ts +51 -0
  172. package/src/config/index.ts +35 -0
  173. package/src/contant/index.ts +20 -0
  174. package/src/directives/elResizeDetector/index.ts +33 -0
  175. package/src/directives/index.ts +11 -0
  176. package/src/directives/permission/index.ts +29 -0
  177. package/src/layout/components/lay-chrome/index.vue +30 -0
  178. package/src/layout/components/lay-content/index.vue +143 -0
  179. package/src/layout/components/lay-navbar/index.vue +237 -0
  180. package/src/layout/components/lay-notice/data.ts +59 -0
  181. package/src/layout/components/lay-notice/index.vue +83 -0
  182. package/src/layout/components/lay-notice/noticeItem.vue +160 -0
  183. package/src/layout/components/lay-notice/noticeList.vue +19 -0
  184. package/src/layout/components/lay-panel/index.vue +150 -0
  185. package/src/layout/components/lay-search/components/SearchFooter.vue +67 -0
  186. package/src/layout/components/lay-search/components/SearchModal.vue +189 -0
  187. package/src/layout/components/lay-search/components/SearchResult.vue +132 -0
  188. package/src/layout/components/lay-search/components/index.ts +10 -0
  189. package/src/layout/components/lay-search/index.vue +25 -0
  190. package/src/layout/components/lay-select-org/index.vue +69 -0
  191. package/src/layout/components/lay-setting/index.vue +510 -0
  192. package/src/layout/components/lay-sidebar/breadCrumb.vue +131 -0
  193. package/src/layout/components/lay-sidebar/extraIcon.vue +25 -0
  194. package/src/layout/components/lay-sidebar/hamBurger.vue +72 -0
  195. package/src/layout/components/lay-sidebar/horizontal.vue +191 -0
  196. package/src/layout/components/lay-sidebar/mixNav.vue +258 -0
  197. package/src/layout/components/lay-sidebar/sidebar-logo.vue +98 -0
  198. package/src/layout/components/lay-sidebar/sidebarItem.vue +205 -0
  199. package/src/layout/components/lay-sidebar/vertical.vue +94 -0
  200. package/src/layout/components/lay-tag/index.scss +375 -0
  201. package/src/layout/components/lay-tag/index.vue +625 -0
  202. package/src/layout/frameView.vue +71 -0
  203. package/src/layout/hooks/useBoolean.ts +33 -0
  204. package/src/layout/hooks/useDataThemeChange.ts +142 -0
  205. package/src/layout/hooks/useLayout.ts +65 -0
  206. package/src/layout/hooks/useNav.ts +173 -0
  207. package/src/layout/hooks/useTag.ts +233 -0
  208. package/src/layout/hooks/useTranslationLang.ts +51 -0
  209. package/src/layout/layoutView.vue +215 -0
  210. package/src/layout/redirect.vue +30 -0
  211. package/src/layout/routerView/parent.vue +23 -0
  212. package/src/layout/types.ts +92 -0
  213. package/src/main.ts +108 -0
  214. package/src/plugins/echarts/index.ts +58 -0
  215. package/src/plugins/echarts/theme.json +394 -0
  216. package/src/plugins/i18n/en.ts +289 -0
  217. package/src/plugins/i18n/index.ts +76 -0
  218. package/src/plugins/i18n/module/u-report.ts +64 -0
  219. package/src/plugins/i18n/module/u-workflow.ts +71 -0
  220. package/src/plugins/i18n/module/umsg.ts +28 -0
  221. package/src/plugins/i18n/zh.ts +337 -0
  222. package/src/plugins/vxe-table/index.ts +46 -0
  223. package/src/plugins/vxe-table/render.tsx +397 -0
  224. package/src/router/createComponent.tsx +25 -0
  225. package/src/router/index.ts +183 -0
  226. package/src/router/modules/error.ts +32 -0
  227. package/src/router/modules/home.ts +32 -0
  228. package/src/router/modules/nested.ts +93 -0
  229. package/src/router/modules/remaining.ts +83 -0
  230. package/src/router/modules/tabs.ts +55 -0
  231. package/src/router/utils.ts +377 -0
  232. package/src/store/index.ts +9 -0
  233. package/src/store/modules/app.ts +69 -0
  234. package/src/store/modules/epTheme.ts +49 -0
  235. package/src/store/modules/multiTags.ts +109 -0
  236. package/src/store/modules/permission.ts +103 -0
  237. package/src/store/modules/settings.ts +40 -0
  238. package/src/store/modules/system.ts +180 -0
  239. package/src/store/modules/types.ts +49 -0
  240. package/src/style/button.scss +78 -0
  241. package/src/style/clear-mixin.scss +28 -0
  242. package/src/style/dark.scss +218 -0
  243. package/src/style/element-plus.scss +206 -0
  244. package/src/style/index.scss +76 -0
  245. package/src/style/login.css +336 -0
  246. package/src/style/login2.css +106 -0
  247. package/src/style/print-lock.css +375 -0
  248. package/src/style/reset.scss +272 -0
  249. package/src/style/sidebar.scss +770 -0
  250. package/src/style/suprint.css +985 -0
  251. package/src/style/tailwind.css +68 -0
  252. package/src/style/theme.scss +143 -0
  253. package/src/style/transition.scss +42 -0
  254. package/src/style/vxetable.scss +256 -0
  255. package/src/utils/authority/index.ts +29 -0
  256. package/src/utils/browers.ts +59 -0
  257. package/src/utils/dataFormat/index.ts +223 -0
  258. package/src/utils/http/index.ts +297 -0
  259. package/src/utils/http/types.d.ts +46 -0
  260. package/src/utils/index.ts +47 -0
  261. package/src/utils/lifecycle.ts +20 -0
  262. package/src/utils/mitt.ts +19 -0
  263. package/src/utils/propTypes.ts +47 -0
  264. package/src/utils/storage/index.ts +51 -0
  265. package/src/views/components/contextmenu/basic.vue +74 -0
  266. package/src/views/components/contextmenu/context-menu.vue +40 -0
  267. package/src/views/components/contextmenu/menuDynamic.vue +99 -0
  268. package/src/views/components/contextmenu/menuGroup.vue +71 -0
  269. package/src/views/components/count-to/index.vue +43 -0
  270. package/src/views/components/cropping/index.vue +59 -0
  271. package/src/views/components/cropping/picture.jpeg +0 -0
  272. package/src/views/components/split-pane/index.vue +82 -0
  273. package/src/views/components/video/index.vue +57 -0
  274. package/src/views/error/403.vue +50 -0
  275. package/src/views/error/404.vue +50 -0
  276. package/src/views/error/500.vue +52 -0
  277. package/src/views/login/login-view.vue +314 -0
  278. package/src/views/login/utils/motion.ts +47 -0
  279. package/src/views/login/utils/rule.ts +70 -0
  280. package/src/views/login/utils/verifyCode.ts +52 -0
  281. package/src/views/organization/company/Company.vue +56 -0
  282. package/src/views/organization/company/CompanyPanel.vue +259 -0
  283. package/src/views/organization/department/Department.vue +58 -0
  284. package/src/views/organization/department/DepartmentPanel.vue +283 -0
  285. package/src/views/organization/inv-org/InvOrganization.vue +53 -0
  286. package/src/views/organization/org/Org.vue +43 -0
  287. package/src/views/organization/staff/Staff.vue +58 -0
  288. package/src/views/organization/staff/StaffInfo.vue +163 -0
  289. package/src/views/organization/staff/StaffPanel.vue +144 -0
  290. package/src/views/system/cron/cron-task.vue +157 -0
  291. package/src/views/system/menu/AuthorityPanel.vue +140 -0
  292. package/src/views/system/menu/SystemMenu.vue +191 -0
  293. package/src/views/system/menu/menuInfo.vue +368 -0
  294. package/src/views/system/role/AuthorityInfo.vue +147 -0
  295. package/src/views/system/role/Role.vue +57 -0
  296. package/src/views/system/role/RolePanel.vue +191 -0
  297. package/src/views/system/role/UserInfo.vue +193 -0
  298. package/src/views/system/role-assign/RoleAssign.vue +57 -0
  299. package/src/views/system/role-assign/RolePanel.vue +136 -0
  300. package/src/views/system/sys/sys-config.vue +291 -0
  301. package/src/views/system/sysUser/SysUser.vue +45 -0
  302. package/src/views/system/sysUser/SysUserPanel.vue +278 -0
  303. package/src/views/uapp/pda/pda-app.vue +176 -0
  304. package/src/views/udev/coderule/code-rule.vue +121 -0
  305. package/src/views/udev/dict/DictView.vue +106 -0
  306. package/src/views/udev/dict/childView.vue +222 -0
  307. package/src/views/udev/lov/childView.vue +180 -0
  308. package/src/views/udev/lov/lov-view.vue +91 -0
  309. package/src/views/ufile/aggregation/File.vue +87 -0
  310. package/src/views/ufile/file/water-mark.vue +103 -0
  311. package/src/views/uhome/components/menu-favorite.vue +331 -0
  312. package/src/views/uhome/su-welcome.vue +339 -0
  313. package/src/views/ulogin/login.vue +316 -0
  314. package/src/views/umsg/monitor/msg-monitor.vue +36 -0
  315. package/src/views/umsg/msg/TemplateContent.vue +103 -0
  316. package/src/views/umsg/msg/msg-template.vue +66 -0
  317. package/src/views/umsg/send/childView.vue +142 -0
  318. package/src/views/umsg/send/msg-send.vue +95 -0
  319. package/src/views/upms/interface/log-in.vue +106 -0
  320. package/src/views/upms/interface/log-out.vue +107 -0
  321. package/src/views/upms/user/login-log.vue +60 -0
  322. package/src/views/urpt/dataSet/DataSet.vue +139 -0
  323. package/src/views/urpt/design/DesignPanel.vue +526 -0
  324. package/src/views/urpt/design/Preview.vue +65 -0
  325. package/src/views/urpt/design/ReportDesign.vue +249 -0
  326. package/src/views/urpt/design/bg.png +0 -0
  327. package/src/views/urpt/design/panel.ts +841 -0
  328. package/src/views/urpt/design/print-data.ts +59 -0
  329. package/src/views/urpt/query/ReportQuery.vue +122 -0
  330. package/src/views/urpt/query/ReportQueryFrom.vue +252 -0
  331. package/src/views/urpt/report-request/ReportDefine.vue +10 -0
  332. package/src/views/urpt/static-resource/resource.vue +116 -0
  333. package/src/views/urpt/template/ReportTemplate.vue +198 -0
  334. package/tsconfig.json +30 -0
  335. package/types/env.d.ts +1 -0
  336. package/types/global-components.d.ts +12 -0
  337. package/types/global.d.ts +236 -0
  338. package/types/image.d.ts +7 -0
  339. package/types/index.d.ts +73 -0
  340. package/types/router.d.ts +107 -0
  341. package/types/shims-tsx.d.ts +22 -0
  342. package/types/shims-vue.d.ts +20 -0
  343. package/vite.config.ts +73 -0
@@ -0,0 +1,198 @@
1
+ <!--
2
+ * @Author: wei.li
3
+ * @Date: 2021-11-27 20:29:59
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2025-04-08 15:41:55
6
+ * @Description: 打印模板配置
7
+ -->
8
+ <template>
9
+ <div>
10
+ <ut-grid
11
+ ref="xgrid"
12
+ :items="formItems"
13
+ :buttons="buttons"
14
+ :columns="columns"
15
+ :events="onEvents"
16
+ :url="url"
17
+ />
18
+
19
+ <ut-modal-form
20
+ v-if="showModal"
21
+ ref="xmodal"
22
+ :record="record"
23
+ :items="subItems"
24
+ width="400"
25
+ height="170"
26
+ data-status="update"
27
+ title="单据复制"
28
+ @confirm="onConfirm"
29
+ @close="showModal = false"
30
+ />
31
+
32
+ <ut-modal-grid
33
+ v-if="showModalTable"
34
+ ref="xmgrid"
35
+ :default-value="subParam"
36
+ :columns="subColumns"
37
+ url="/upms/v1/printTemplateConfigOgn"
38
+ title="库存组织"
39
+ width="45%"
40
+ @close="showModalTable = false"
41
+ />
42
+ </div>
43
+ </template>
44
+
45
+ <script setup lang="tsx">
46
+ import { ref } from 'vue';
47
+ import { useI18n } from 'vue-i18n';
48
+ import { clone } from 'xe-utils';
49
+ import { successMessage, useRender, warnMessage } from '@utogether/utils';
50
+ import { useSystemStoreHook } from '../../../store/modules/system';
51
+ import { getServiceApi } from '../../../api';
52
+
53
+ const { t } = useI18n();
54
+ const renderHook = useRender();
55
+
56
+ const xgrid = ref(null);
57
+ const showModal = ref(false);
58
+ const showModalTable = ref(false);
59
+ const subParam = ref({});
60
+ const subItems = ref([]);
61
+ const record = ref<IRecord>({});
62
+
63
+ const url = '/upms/v1/printTemplateConfig';
64
+ const formItems = [
65
+ { field: 'templateCode', title: 'message.file.templateCode' },
66
+ { field: 'templateName', title: 'message.file.templateName' },
67
+ { field: 'printPosition', title: 'message.file.printPosition', code: 'SU.PRINT.VIEW' }
68
+ ];
69
+
70
+ // 列字段
71
+ const columns = [
72
+ { type: 'checkbox', width: 40, align: 'center' },
73
+ {
74
+ field: 'templateCode',
75
+ title: 'message.file.templateCode',
76
+ required: true,
77
+ width: 120,
78
+ editRender: renderHook.renderLov({
79
+ field: 'templateCode',
80
+ code: 'SU.PRINT.CODE',
81
+ mapField: { templateName: 'templateName' }
82
+ })
83
+ },
84
+ { field: 'templateName', title: 'message.file.templateName', width: 180 },
85
+ {
86
+ field: 'printPosition',
87
+ title: 'message.file.printPosition',
88
+ required: true,
89
+ width: 120,
90
+ formatter: ['formatDict', 'SU.PRINT.VIEW'],
91
+ editRender: renderHook.renderDict('SU.PRINT.VIEW')
92
+ },
93
+ {
94
+ field: 'buttonCode',
95
+ title: 'message.file.buttonCode',
96
+ width: 120,
97
+ required: true,
98
+ editRender: renderHook.renderInput()
99
+ },
100
+ { field: 'url', title: 'message.baseUrl', editRender: renderHook.renderInput() },
101
+ { field: 'remark', editRender: renderHook.renderInput() },
102
+ {
103
+ field: 'operate',
104
+ width: 100,
105
+ fixed: 'right',
106
+ slots: {
107
+ default: ({ row }) => {
108
+ return [
109
+ <>
110
+ <ut-button content="inv" icon="ri-edit-line" onTap={() => handleInvOrg(row)} />
111
+ </>
112
+ ];
113
+ }
114
+ }
115
+ }
116
+ ];
117
+
118
+ const handleCopy = () => {
119
+ const checkboxRecords = xgrid.value.getInstance().getCheckboxRecords();
120
+ if (!checkboxRecords.length) {
121
+ return warnMessage(t('message.selectedRecord'));
122
+ }
123
+ subItems.value = [];
124
+ subItems.value.push({
125
+ field: 'orgName',
126
+ required: true,
127
+ itemRender: {
128
+ name: '$checkbox',
129
+ options: useSystemStoreHook().getOrglist.map(m => {
130
+ return { value: m.id, label: m.orgName };
131
+ })
132
+ }
133
+ });
134
+ record.value = {};
135
+ showModal.value = true;
136
+ };
137
+
138
+ const onConfirm = () => {
139
+ if (record.value.orgName) {
140
+ const checkboxRecords = xgrid.value.getInstance().getCheckboxRecords();
141
+ const body = [];
142
+ console.log(record.value.orgName);
143
+ checkboxRecords.forEach(item => {
144
+ record.value.orgName.forEach(orgId => {
145
+ const data = clone(item, true);
146
+ data.orgId = orgId;
147
+ data.id = null;
148
+ body.push(data);
149
+ });
150
+ });
151
+ getServiceApi()
152
+ .post(url, body)
153
+ .then(() => {
154
+ showModal.value = false;
155
+ successMessage();
156
+ });
157
+ }
158
+ };
159
+ /**
160
+ * @description:监听grid事件
161
+ * @return {*}
162
+ */
163
+ const onEvents = {
164
+ toolbarButtonClick({ code }) {
165
+ 'copy' === code && handleCopy();
166
+ }
167
+ };
168
+
169
+ const subColumns = [
170
+ {
171
+ field: 'organizationName',
172
+ required: true,
173
+ editRender: renderHook.renderInvOrg({ orgId: useSystemStoreHook().getOrgId })
174
+ },
175
+ { field: 'remark', editRender: renderHook.renderInput() }
176
+ ];
177
+
178
+ const handleInvOrg = row => {
179
+ subParam.value = { headerId: row.id };
180
+ showModalTable.value = true;
181
+ };
182
+
183
+ const buttons = [{ code: 'copy', icon: 'ri-file-copy-line', status: 'warning', auth: 'copy' }];
184
+
185
+ // let invOrgLsit;
186
+ // const getOnvOrg = () => {
187
+ // serviceApi.get('/uums/cusOrganization', { pageSize: 100, pageNum: 1 }).then((res: IResponseData) => {
188
+ // invOrgLsit = res.list.map(item => {
189
+ // return {
190
+ // value: item.id,
191
+ // label: item.organizationName
192
+ // };
193
+ // });
194
+ // });
195
+ // };
196
+
197
+ // getOnvOrg();
198
+ </script>
package/tsconfig.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "strict": false,
7
+ "jsx": "preserve",
8
+ "importHelpers": true,
9
+ "experimentalDecorators": true,
10
+ "strictFunctionTypes": false,
11
+ "skipLibCheck": true,
12
+ "esModuleInterop": true,
13
+ "isolatedModules": true,
14
+ "allowSyntheticDefaultImports": true,
15
+ "forceConsistentCasingInFileNames": true,
16
+ "sourceMap": true,
17
+ "baseUrl": ".",
18
+ "allowJs": false,
19
+ "resolveJsonModule": true,
20
+ "lib": ["dom", "esnext"],
21
+ "incremental": true,
22
+ "paths": {
23
+ "@/*": ["src/*"],
24
+ "@build/*": ["build/*"]
25
+ },
26
+ "types": ["node", "vite/client", "element-plus/global", "jquery"]
27
+ },
28
+ "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "types/*.d.ts", "vite.config.ts"],
29
+ "exclude": ["node_modules", "dist", "**/*.js"]
30
+ }
package/types/env.d.ts ADDED
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,12 @@
1
+ declare module 'vue' {
2
+ /**
3
+ * 自定义全局组件获得 Volar 提示(自定义的全局组件需要在这里声明下才能获得 Volar 类型提示哦)
4
+ */
5
+ export interface GlobalComponents {
6
+ IconifyIconOffline: (typeof import('../src/components/ReIcon'))['IconifyIconOffline'];
7
+ IconifyIconOnline: (typeof import('../src/components/ReIcon'))['IconifyIconOnline'];
8
+ FontIcon: (typeof import('../src/components/ReIcon'))['FontIcon'];
9
+ }
10
+ }
11
+
12
+ export {};
@@ -0,0 +1,236 @@
1
+ import type { PropType as VuePropType } from 'vue';
2
+ import type { ECharts } from 'echarts';
3
+ // import type { ResponsiveStorage } from './index';
4
+
5
+ /**
6
+ * 全局类型声明,无需引入直接在 `.vue` 、`.ts` 、`.tsx` 文件使用即可获得类型提示
7
+ */
8
+
9
+ // GlobalComponents for Volar
10
+
11
+ declare module '@utogether/components';
12
+
13
+ import type { VxeColumnProps, VxeFormItemProps, VxeToolbarProps } from 'vxe-table';
14
+
15
+ declare global {
16
+ /**
17
+ * 平台的名称、版本、依赖、最后构建时间的类型提示
18
+ */
19
+ const __APP_INFO__: {
20
+ pkg: {
21
+ version: string;
22
+ };
23
+ lastBuildTime: string;
24
+ };
25
+
26
+ /**
27
+ * Window 的类型提示
28
+ */
29
+ interface Window {
30
+ // Global vue app instance
31
+ __APP__: App<Element>;
32
+ webkitCancelAnimationFrame: (handle: number) => void;
33
+ mozCancelAnimationFrame: (handle: number) => void;
34
+ oCancelAnimationFrame: (handle: number) => void;
35
+ msCancelAnimationFrame: (handle: number) => void;
36
+ webkitRequestAnimationFrame: (callback: FrameRequestCallback) => number;
37
+ mozRequestAnimationFrame: (callback: FrameRequestCallback) => number;
38
+ oRequestAnimationFrame: (callback: FrameRequestCallback) => number;
39
+ msRequestAnimationFrame: (callback: FrameRequestCallback) => number;
40
+ }
41
+
42
+ // vue
43
+ type PropType<T> = VuePropType<T>;
44
+
45
+ type Writable<T> = {
46
+ -readonly [P in keyof T]: T[P];
47
+ };
48
+
49
+ type Nullable<T> = T | null;
50
+ type NonNullable<T> = T extends null | undefined ? never : T;
51
+ type Recordable<T = any> = Record<string, T>;
52
+ type ReadonlyRecordable<T = any> = {
53
+ readonly [key: string]: T;
54
+ };
55
+ type Indexable<T = any> = {
56
+ [key: string]: T;
57
+ };
58
+ type DeepPartial<T> = {
59
+ [P in keyof T]?: DeepPartial<T[P]>;
60
+ };
61
+ type TimeoutHandle = ReturnType<typeof setTimeout>;
62
+ type IntervalHandle = ReturnType<typeof setInterval>;
63
+
64
+ interface ChangeEvent extends Event {
65
+ target: HTMLInputElement;
66
+ }
67
+
68
+ interface WheelEvent {
69
+ path?: EventTarget[];
70
+ }
71
+ interface ImportMetaEnv extends ViteEnv {
72
+ __: unknown;
73
+ }
74
+
75
+ type ViteCompression =
76
+ | 'none'
77
+ | 'gzip'
78
+ | 'brotli'
79
+ | 'both'
80
+ | 'gzip-clear'
81
+ | 'brotli-clear'
82
+ | 'both-clear';
83
+
84
+ interface ViteEnv {
85
+ VITE_PORT: number;
86
+ VITE_PUBLIC_PATH: string;
87
+ VITE_BASE_URL: string;
88
+ VITE_ROUTER_HISTORY: string;
89
+ VITE_TITLE: string;
90
+ VITE_COMPRESSION: ViteCompression;
91
+ }
92
+
93
+ /**
94
+ * 对应 `public/serverConfig.json` 文件的类型声明
95
+ */
96
+ interface ServerConfigs {
97
+ Version?: string;
98
+ Title?: string;
99
+ FixedHeader?: boolean;
100
+ HiddenSideBar?: boolean;
101
+ MultiTagsCache?: boolean;
102
+ KeepAlive?: boolean;
103
+ Locale?: string;
104
+ Layout?: string;
105
+ Theme?: string;
106
+ DarkMode?: boolean;
107
+ OverallStyle?: string;
108
+ Grey?: boolean;
109
+ Weak?: boolean;
110
+ HideTabs?: boolean;
111
+ SidebarStatus?: boolean;
112
+ EpThemeColor?: string;
113
+ ShowLogo?: boolean;
114
+ ShowModel?: string;
115
+ MenuArrowIconNoTransition?: boolean;
116
+ CachingAsyncRoutes?: boolean;
117
+ ResponsiveStorageNameSpace?: string;
118
+ MapConfigure?: {
119
+ amapKey?: string;
120
+ options: {
121
+ resizeEnable?: boolean;
122
+ center?: number[];
123
+ zoom?: number;
124
+ };
125
+ };
126
+ }
127
+
128
+ interface ISystemEnv {
129
+ VITE_BASE_URL?: string;
130
+ VITE_PUBLIC_PATH?: string;
131
+ VITE_ROUTER_HISTORY?: string;
132
+ MODE?: string;
133
+ }
134
+
135
+ /**
136
+ * 与 `ServerConfigs` 类型不同,这里是缓存到浏览器本地存储的类型声明
137
+ */
138
+ interface StorageConfigs {
139
+ version?: string;
140
+ title?: string;
141
+ fixedHeader?: boolean;
142
+ hiddenSideBar?: boolean;
143
+ multiTagsCache?: boolean;
144
+ keepAlive?: boolean;
145
+ locale?: string;
146
+ layout?: string;
147
+ theme?: string;
148
+ darkMode?: boolean;
149
+ overallStyle?: string;
150
+ grey?: boolean;
151
+ weak?: boolean;
152
+ hideTabs?: boolean;
153
+ sidebarStatus?: boolean;
154
+ epThemeColor?: string;
155
+ showLogo?: boolean;
156
+ showModel?: string;
157
+ mapConfigure?: {
158
+ amapKey?: string;
159
+ options: {
160
+ resizeEnable?: boolean;
161
+ center?: number[];
162
+ zoom?: number;
163
+ };
164
+ };
165
+ username?: string;
166
+ }
167
+
168
+ /**
169
+ * `responsive-storage` 本地响应式 `storage` 的类型声明
170
+ */
171
+ interface ResponsiveStorage {
172
+ locale: {
173
+ locale?: string;
174
+ };
175
+ layout: {
176
+ layout?: string;
177
+ theme?: string;
178
+ darkMode?: boolean;
179
+ sidebarStatus?: boolean;
180
+ epThemeColor?: string;
181
+ overallStyle?: string;
182
+ };
183
+ configure: {
184
+ grey?: boolean;
185
+ weak?: boolean;
186
+ hideTabs?: boolean;
187
+ showLogo?: boolean;
188
+ showModel?: string;
189
+ multiTagsCache?: boolean;
190
+ };
191
+ tags?: Array<any>;
192
+ }
193
+
194
+ declare interface IRecord {
195
+ [ele: string]: any;
196
+ }
197
+ declare interface IServiceData {
198
+ code: string;
199
+ data: any;
200
+ msg: tring;
201
+ }
202
+ // axios 返回数据结构
203
+ declare interface IResponseData {
204
+ list: [IRecord];
205
+ total: number;
206
+ data: object | sting;
207
+ }
208
+ declare interface IProps {
209
+ type?: string;
210
+ required?: boolean;
211
+ isHidden?: boolean;
212
+ }
213
+ declare interface IFormItemProps extends VxeFormItemProps, IProps {
214
+ [x: string]: any;
215
+ fromField?: string;
216
+ toField?: string;
217
+ disabled?: boolean;
218
+ }
219
+ declare interface ITableColProps extends VxeColumnProps, IProps {
220
+ [x: string]: any;
221
+ }
222
+
223
+ declare interface IButtonProps extends VxeToolbarProps.buttons {
224
+ auth: string | Array;
225
+ code: string;
226
+ }
227
+
228
+ /**
229
+ * 平台里所有组件实例都能访问到的全局属性对象的类型声明
230
+ */
231
+ interface GlobalPropertiesApi {
232
+ $echarts: ECharts;
233
+ $storage: ResponsiveStorage;
234
+ $config: ServerConfigs;
235
+ }
236
+ }
@@ -0,0 +1,7 @@
1
+ declare module '*.svg';
2
+ declare module '*.png';
3
+ declare module '*.jpg';
4
+ declare module '*.jpeg';
5
+ declare module '*.gif';
6
+ declare module '*.bmp';
7
+ declare module '*.tiff';
@@ -0,0 +1,73 @@
1
+ // 此文件跟同级目录的 global.d.ts 文件一样也是全局类型声明,只不过这里存放一些零散的全局类型,无需引入直接在 .vue 、.ts 、.tsx 文件使用即可获得类型提示
2
+
3
+ type RefType<T> = T | null;
4
+
5
+ type EmitType = (event: string, ...args: any[]) => void;
6
+
7
+ type TargetContext = '_self' | '_blank';
8
+
9
+ type ComponentRef<T extends HTMLElement = HTMLDivElement> = ComponentElRef<T> | null;
10
+
11
+ type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>;
12
+
13
+ type ForDataType<T> = {
14
+ [P in T]?: ForDataType<T[P]>;
15
+ };
16
+
17
+ type AnyFunction<T> = (...args: any[]) => T;
18
+
19
+ type PropType<T> = VuePropType<T>;
20
+
21
+ type Writable<T> = {
22
+ -readonly [P in keyof T]: T[P];
23
+ };
24
+
25
+ type Nullable<T> = T | null;
26
+
27
+ type NonNullable<T> = T extends null | undefined ? never : T;
28
+
29
+ type Recordable<T = any> = Record<string, T>;
30
+
31
+ type ReadonlyRecordable<T = any> = {
32
+ readonly [key: string]: T;
33
+ };
34
+
35
+ type Indexable<T = any> = {
36
+ [key: string]: T;
37
+ };
38
+
39
+ type DeepPartial<T> = {
40
+ [P in keyof T]?: DeepPartial<T[P]>;
41
+ };
42
+
43
+ type TimeoutHandle = ReturnType<typeof setTimeout>;
44
+
45
+ type IntervalHandle = ReturnType<typeof setInterval>;
46
+
47
+ interface ChangeEvent extends Event {
48
+ target: HTMLInputElement;
49
+ }
50
+
51
+ interface WheelEvent {
52
+ path?: EventTarget[];
53
+ }
54
+
55
+ interface ImportMetaEnv extends ViteEnv {
56
+ __: unknown;
57
+ }
58
+
59
+ interface Fn<T = any, R = T> {
60
+ (...arg: T[]): R;
61
+ }
62
+
63
+ interface PromiseFn<T = any, R = T> {
64
+ (...arg: T[]): Promise<R>;
65
+ }
66
+
67
+ interface ComponentElRef<T extends HTMLElement = HTMLDivElement> {
68
+ $el: T;
69
+ }
70
+
71
+ function parseInt(s: string | number, radix?: number): number;
72
+
73
+ function parseFloat(string: string | number): number;
@@ -0,0 +1,107 @@
1
+ // 全局路由类型声明
2
+
3
+ import type { RouteComponent, RouteLocationNormalized } from 'vue-router';
4
+
5
+ declare global {
6
+ interface ToRouteType extends RouteLocationNormalized {
7
+ meta: CustomizeRouteMeta;
8
+ }
9
+
10
+ /**
11
+ * @description 完整子路由的`meta`配置表
12
+ */
13
+ interface CustomizeRouteMeta {
14
+ /** 菜单名称(兼容国际化、非国际化,如何用国际化的写法就必须在根目录的`locales`文件夹下对应添加) `必填` */
15
+ title: string;
16
+ /** 菜单图标 `可选` */
17
+ icon?: string | FunctionalComponent | IconifyIcon;
18
+ /** 菜单名称右侧的额外图标 */
19
+ extraIcon?: string | FunctionalComponent | IconifyIcon;
20
+ /** 是否在菜单中显示(默认`true`)`可选` */
21
+ showLink?: boolean;
22
+ /** 是否显示父级菜单 `可选` */
23
+ showParent?: boolean;
24
+ /** 页面级别权限设置 `可选` */
25
+ roles?: Array<string>;
26
+ /** 按钮级别权限设置 `可选` */
27
+ auths?: Array<string>;
28
+ /** 路由组件缓存(开启 `true`、关闭 `false`)`可选` */
29
+ keepAlive?: boolean;
30
+ /** 内嵌的`iframe`链接 `可选` */
31
+ frameSrc?: string;
32
+ /** `iframe`页是否开启首次加载动画(默认`true`)`可选` */
33
+ frameLoading?: boolean;
34
+ /** 页面加载动画(有两种形式,一种直接采用vue内置的`transitions`动画,另一种是使用`animate.css`写进、离场动画)`可选` */
35
+ transition?: {
36
+ /**
37
+ * @description 当前路由动画效果
38
+ * @see {@link https://next.router.vuejs.org/guide/advanced/transitions.html#transitions}
39
+ * @see animate.css {@link https://animate.style}
40
+ */
41
+ name?: string;
42
+ /** 进场动画 */
43
+ enterTransition?: string;
44
+ /** 离场动画 */
45
+ leaveTransition?: string;
46
+ };
47
+ // 是否不添加信息到标签页,(默认`false`)
48
+ hiddenTag?: boolean;
49
+ /** 当前菜单名称是否固定显示在标签页且不可关闭(默认`false`) */
50
+ fixedTag?: boolean;
51
+ /** 动态路由可打开的最大数量 `可选` */
52
+ dynamicLevel?: number;
53
+ /** 将某个菜单激活
54
+ * (主要用于通过`query`或`params`传参的路由,当它们通过配置`showLink: false`后不在菜单中显示,就不会有任何菜单高亮,
55
+ * 而通过设置`activePath`指定激活菜单即可获得高亮,`activePath`为指定激活菜单的`path`)
56
+ */
57
+ activePath?: string;
58
+ }
59
+
60
+ /**
61
+ * @description 完整子路由配置表
62
+ */
63
+ interface RouteChildrenConfigsTable {
64
+ /** 子路由地址 `必填` */
65
+ path: string;
66
+ /** 路由名字(对应不要重复,和当前组件的`name`保持一致)`必填` */
67
+ name?: string;
68
+ /** 路由重定向 `可选` */
69
+ redirect?: string;
70
+ /** 按需加载组件 `可选` */
71
+ component?: RouteComponent;
72
+ meta?: CustomizeRouteMeta;
73
+ /** 子路由配置项 */
74
+ children?: Array<RouteChildrenConfigsTable>;
75
+ }
76
+
77
+ /**
78
+ * @description 整体路由配置表(包括完整子路由)
79
+ */
80
+ interface RouteConfigsTable {
81
+ /** 路由地址 `必填` */
82
+ path: string;
83
+ /** 路由名字(保持唯一)`可选` */
84
+ name?: string;
85
+ /** `Layout`组件 `可选` */
86
+ component?: RouteComponent;
87
+ /** 路由重定向 `可选` */
88
+ redirect?: string;
89
+ meta?: {
90
+ /** 菜单名称(兼容国际化、非国际化,如何用国际化的写法就必须在根目录的`locales`文件夹下对应添加)`必填` */
91
+ title: string;
92
+ /** 菜单图标 `可选` */
93
+ icon?: string | FunctionalComponent | IconifyIcon;
94
+ /** 是否在菜单中显示(默认`true`)`可选` */
95
+ showLink?: boolean;
96
+ /** 菜单升序排序,值越高排的越后(只针对顶级路由)`可选` */
97
+ rank?: number;
98
+ };
99
+ /** 子路由配置项 */
100
+ children?: Array<RouteChildrenConfigsTable>;
101
+ }
102
+ }
103
+
104
+ // https://router.vuejs.org/zh/guide/advanced/meta.html#typescript
105
+ declare module 'vue-router' {
106
+ interface RouteMeta extends CustomizeRouteMeta {}
107
+ }
@@ -0,0 +1,22 @@
1
+ import Vue, { VNode } from 'vue';
2
+
3
+ declare module '*.tsx' {
4
+ import Vue from 'compatible-vue';
5
+ export default Vue;
6
+ }
7
+
8
+ declare global {
9
+ namespace JSX {
10
+ interface Element extends VNode {}
11
+ interface ElementClass extends Vue {}
12
+ interface ElementAttributesProperty {
13
+ $props: any;
14
+ }
15
+ interface IntrinsicElements {
16
+ [elem: string]: any;
17
+ }
18
+ interface IntrinsicAttributes {
19
+ [elem: string]: any;
20
+ }
21
+ }
22
+ }