@k3000/s1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (620) hide show
  1. package/README.md +2 -0
  2. package/RuoYi-Vue3/.env.development +8 -0
  3. package/RuoYi-Vue3/.env.production +11 -0
  4. package/RuoYi-Vue3/.env.staging +11 -0
  5. package/RuoYi-Vue3/.github/FUNDING.yml +1 -0
  6. package/RuoYi-Vue3/LICENSE +20 -0
  7. package/RuoYi-Vue3/README.md +109 -0
  8. package/RuoYi-Vue3/bin/build.bat +12 -0
  9. package/RuoYi-Vue3/bin/package.bat +12 -0
  10. package/RuoYi-Vue3/bin/run-web.bat +12 -0
  11. package/RuoYi-Vue3/html/ie.html +46 -0
  12. package/RuoYi-Vue3/index.html +215 -0
  13. package/RuoYi-Vue3/package.json +44 -0
  14. package/RuoYi-Vue3/public/favicon.ico +0 -0
  15. package/RuoYi-Vue3/src/App.vue +15 -0
  16. package/RuoYi-Vue3/src/api/login.js +60 -0
  17. package/RuoYi-Vue3/src/api/menu.js +9 -0
  18. package/RuoYi-Vue3/src/api/monitor/cache.js +57 -0
  19. package/RuoYi-Vue3/src/api/monitor/job.js +71 -0
  20. package/RuoYi-Vue3/src/api/monitor/jobLog.js +26 -0
  21. package/RuoYi-Vue3/src/api/monitor/logininfor.js +34 -0
  22. package/RuoYi-Vue3/src/api/monitor/online.js +18 -0
  23. package/RuoYi-Vue3/src/api/monitor/operlog.js +26 -0
  24. package/RuoYi-Vue3/src/api/monitor/server.js +9 -0
  25. package/RuoYi-Vue3/src/api/system/config.js +60 -0
  26. package/RuoYi-Vue3/src/api/system/dept.js +52 -0
  27. package/RuoYi-Vue3/src/api/system/dict/data.js +52 -0
  28. package/RuoYi-Vue3/src/api/system/dict/type.js +60 -0
  29. package/RuoYi-Vue3/src/api/system/menu.js +60 -0
  30. package/RuoYi-Vue3/src/api/system/notice.js +44 -0
  31. package/RuoYi-Vue3/src/api/system/post.js +44 -0
  32. package/RuoYi-Vue3/src/api/system/role.js +119 -0
  33. package/RuoYi-Vue3/src/api/system/user.js +136 -0
  34. package/RuoYi-Vue3/src/api/tool/gen.js +85 -0
  35. package/RuoYi-Vue3/src/assets/401_images/401.gif +0 -0
  36. package/RuoYi-Vue3/src/assets/404_images/404.png +0 -0
  37. package/RuoYi-Vue3/src/assets/404_images/404_cloud.png +0 -0
  38. package/RuoYi-Vue3/src/assets/icons/svg/404.svg +1 -0
  39. package/RuoYi-Vue3/src/assets/icons/svg/bug.svg +1 -0
  40. package/RuoYi-Vue3/src/assets/icons/svg/build.svg +1 -0
  41. package/RuoYi-Vue3/src/assets/icons/svg/button.svg +1 -0
  42. package/RuoYi-Vue3/src/assets/icons/svg/cascader.svg +1 -0
  43. package/RuoYi-Vue3/src/assets/icons/svg/chart.svg +1 -0
  44. package/RuoYi-Vue3/src/assets/icons/svg/checkbox.svg +1 -0
  45. package/RuoYi-Vue3/src/assets/icons/svg/clipboard.svg +1 -0
  46. package/RuoYi-Vue3/src/assets/icons/svg/code.svg +1 -0
  47. package/RuoYi-Vue3/src/assets/icons/svg/color.svg +1 -0
  48. package/RuoYi-Vue3/src/assets/icons/svg/component.svg +1 -0
  49. package/RuoYi-Vue3/src/assets/icons/svg/dashboard.svg +1 -0
  50. package/RuoYi-Vue3/src/assets/icons/svg/date-range.svg +1 -0
  51. package/RuoYi-Vue3/src/assets/icons/svg/date.svg +1 -0
  52. package/RuoYi-Vue3/src/assets/icons/svg/dict.svg +1 -0
  53. package/RuoYi-Vue3/src/assets/icons/svg/documentation.svg +1 -0
  54. package/RuoYi-Vue3/src/assets/icons/svg/download.svg +1 -0
  55. package/RuoYi-Vue3/src/assets/icons/svg/drag.svg +1 -0
  56. package/RuoYi-Vue3/src/assets/icons/svg/druid.svg +1 -0
  57. package/RuoYi-Vue3/src/assets/icons/svg/edit.svg +1 -0
  58. package/RuoYi-Vue3/src/assets/icons/svg/education.svg +1 -0
  59. package/RuoYi-Vue3/src/assets/icons/svg/email.svg +1 -0
  60. package/RuoYi-Vue3/src/assets/icons/svg/example.svg +1 -0
  61. package/RuoYi-Vue3/src/assets/icons/svg/excel.svg +1 -0
  62. package/RuoYi-Vue3/src/assets/icons/svg/exit-fullscreen.svg +1 -0
  63. package/RuoYi-Vue3/src/assets/icons/svg/eye-open.svg +1 -0
  64. package/RuoYi-Vue3/src/assets/icons/svg/eye.svg +1 -0
  65. package/RuoYi-Vue3/src/assets/icons/svg/form.svg +1 -0
  66. package/RuoYi-Vue3/src/assets/icons/svg/fullscreen.svg +1 -0
  67. package/RuoYi-Vue3/src/assets/icons/svg/github.svg +1 -0
  68. package/RuoYi-Vue3/src/assets/icons/svg/guide.svg +1 -0
  69. package/RuoYi-Vue3/src/assets/icons/svg/icon.svg +1 -0
  70. package/RuoYi-Vue3/src/assets/icons/svg/input.svg +1 -0
  71. package/RuoYi-Vue3/src/assets/icons/svg/international.svg +1 -0
  72. package/RuoYi-Vue3/src/assets/icons/svg/job.svg +1 -0
  73. package/RuoYi-Vue3/src/assets/icons/svg/language.svg +1 -0
  74. package/RuoYi-Vue3/src/assets/icons/svg/link.svg +1 -0
  75. package/RuoYi-Vue3/src/assets/icons/svg/list.svg +1 -0
  76. package/RuoYi-Vue3/src/assets/icons/svg/lock.svg +1 -0
  77. package/RuoYi-Vue3/src/assets/icons/svg/log.svg +1 -0
  78. package/RuoYi-Vue3/src/assets/icons/svg/logininfor.svg +1 -0
  79. package/RuoYi-Vue3/src/assets/icons/svg/message.svg +1 -0
  80. package/RuoYi-Vue3/src/assets/icons/svg/money.svg +1 -0
  81. package/RuoYi-Vue3/src/assets/icons/svg/monitor.svg +2 -0
  82. package/RuoYi-Vue3/src/assets/icons/svg/nested.svg +1 -0
  83. package/RuoYi-Vue3/src/assets/icons/svg/number.svg +1 -0
  84. package/RuoYi-Vue3/src/assets/icons/svg/online.svg +1 -0
  85. package/RuoYi-Vue3/src/assets/icons/svg/password.svg +1 -0
  86. package/RuoYi-Vue3/src/assets/icons/svg/pdf.svg +1 -0
  87. package/RuoYi-Vue3/src/assets/icons/svg/people.svg +1 -0
  88. package/RuoYi-Vue3/src/assets/icons/svg/peoples.svg +1 -0
  89. package/RuoYi-Vue3/src/assets/icons/svg/phone.svg +1 -0
  90. package/RuoYi-Vue3/src/assets/icons/svg/post.svg +1 -0
  91. package/RuoYi-Vue3/src/assets/icons/svg/qq.svg +1 -0
  92. package/RuoYi-Vue3/src/assets/icons/svg/question.svg +1 -0
  93. package/RuoYi-Vue3/src/assets/icons/svg/radio.svg +1 -0
  94. package/RuoYi-Vue3/src/assets/icons/svg/rate.svg +1 -0
  95. package/RuoYi-Vue3/src/assets/icons/svg/redis-list.svg +2 -0
  96. package/RuoYi-Vue3/src/assets/icons/svg/redis.svg +1 -0
  97. package/RuoYi-Vue3/src/assets/icons/svg/row.svg +1 -0
  98. package/RuoYi-Vue3/src/assets/icons/svg/search.svg +1 -0
  99. package/RuoYi-Vue3/src/assets/icons/svg/select.svg +1 -0
  100. package/RuoYi-Vue3/src/assets/icons/svg/server.svg +1 -0
  101. package/RuoYi-Vue3/src/assets/icons/svg/shopping.svg +1 -0
  102. package/RuoYi-Vue3/src/assets/icons/svg/size.svg +1 -0
  103. package/RuoYi-Vue3/src/assets/icons/svg/skill.svg +1 -0
  104. package/RuoYi-Vue3/src/assets/icons/svg/slider.svg +1 -0
  105. package/RuoYi-Vue3/src/assets/icons/svg/star.svg +1 -0
  106. package/RuoYi-Vue3/src/assets/icons/svg/swagger.svg +1 -0
  107. package/RuoYi-Vue3/src/assets/icons/svg/switch.svg +1 -0
  108. package/RuoYi-Vue3/src/assets/icons/svg/system.svg +2 -0
  109. package/RuoYi-Vue3/src/assets/icons/svg/tab.svg +1 -0
  110. package/RuoYi-Vue3/src/assets/icons/svg/table.svg +1 -0
  111. package/RuoYi-Vue3/src/assets/icons/svg/textarea.svg +1 -0
  112. package/RuoYi-Vue3/src/assets/icons/svg/theme.svg +1 -0
  113. package/RuoYi-Vue3/src/assets/icons/svg/time-range.svg +1 -0
  114. package/RuoYi-Vue3/src/assets/icons/svg/time.svg +1 -0
  115. package/RuoYi-Vue3/src/assets/icons/svg/tool.svg +1 -0
  116. package/RuoYi-Vue3/src/assets/icons/svg/tree-table.svg +1 -0
  117. package/RuoYi-Vue3/src/assets/icons/svg/tree.svg +1 -0
  118. package/RuoYi-Vue3/src/assets/icons/svg/upload.svg +1 -0
  119. package/RuoYi-Vue3/src/assets/icons/svg/user.svg +1 -0
  120. package/RuoYi-Vue3/src/assets/icons/svg/validCode.svg +1 -0
  121. package/RuoYi-Vue3/src/assets/icons/svg/wechat.svg +1 -0
  122. package/RuoYi-Vue3/src/assets/icons/svg/zip.svg +1 -0
  123. package/RuoYi-Vue3/src/assets/images/dark.svg +39 -0
  124. package/RuoYi-Vue3/src/assets/images/light.svg +39 -0
  125. package/RuoYi-Vue3/src/assets/images/login-background.jpg +0 -0
  126. package/RuoYi-Vue3/src/assets/images/pay.png +0 -0
  127. package/RuoYi-Vue3/src/assets/images/profile.jpg +0 -0
  128. package/RuoYi-Vue3/src/assets/logo/logo.png +0 -0
  129. package/RuoYi-Vue3/src/assets/styles/btn.scss +99 -0
  130. package/RuoYi-Vue3/src/assets/styles/element-ui.scss +96 -0
  131. package/RuoYi-Vue3/src/assets/styles/index.scss +184 -0
  132. package/RuoYi-Vue3/src/assets/styles/mixin.scss +66 -0
  133. package/RuoYi-Vue3/src/assets/styles/ruoyi.scss +281 -0
  134. package/RuoYi-Vue3/src/assets/styles/sidebar.scss +238 -0
  135. package/RuoYi-Vue3/src/assets/styles/transition.scss +49 -0
  136. package/RuoYi-Vue3/src/assets/styles/variables.module.scss +65 -0
  137. package/RuoYi-Vue3/src/components/Breadcrumb/index.vue +66 -0
  138. package/RuoYi-Vue3/src/components/Crontab/day.vue +174 -0
  139. package/RuoYi-Vue3/src/components/Crontab/hour.vue +133 -0
  140. package/RuoYi-Vue3/src/components/Crontab/index.vue +310 -0
  141. package/RuoYi-Vue3/src/components/Crontab/min.vue +126 -0
  142. package/RuoYi-Vue3/src/components/Crontab/month.vue +141 -0
  143. package/RuoYi-Vue3/src/components/Crontab/result.vue +540 -0
  144. package/RuoYi-Vue3/src/components/Crontab/second.vue +128 -0
  145. package/RuoYi-Vue3/src/components/Crontab/week.vue +197 -0
  146. package/RuoYi-Vue3/src/components/Crontab/year.vue +149 -0
  147. package/RuoYi-Vue3/src/components/DictTag/index.vue +82 -0
  148. package/RuoYi-Vue3/src/components/Editor/index.vue +251 -0
  149. package/RuoYi-Vue3/src/components/FileUpload/index.vue +207 -0
  150. package/RuoYi-Vue3/src/components/Hamburger/index.vue +41 -0
  151. package/RuoYi-Vue3/src/components/HeaderSearch/index.vue +187 -0
  152. package/RuoYi-Vue3/src/components/IconSelect/index.vue +111 -0
  153. package/RuoYi-Vue3/src/components/IconSelect/requireIcons.js +8 -0
  154. package/RuoYi-Vue3/src/components/ImagePreview/index.vue +92 -0
  155. package/RuoYi-Vue3/src/components/ImageUpload/index.vue +213 -0
  156. package/RuoYi-Vue3/src/components/Pagination/index.vue +105 -0
  157. package/RuoYi-Vue3/src/components/ParentView/index.vue +3 -0
  158. package/RuoYi-Vue3/src/components/RightToolbar/index.vue +134 -0
  159. package/RuoYi-Vue3/src/components/RuoYi/Doc/index.vue +13 -0
  160. package/RuoYi-Vue3/src/components/RuoYi/Git/index.vue +13 -0
  161. package/RuoYi-Vue3/src/components/Screenfull/index.vue +22 -0
  162. package/RuoYi-Vue3/src/components/SizeSelect/index.vue +45 -0
  163. package/RuoYi-Vue3/src/components/SvgIcon/index.vue +53 -0
  164. package/RuoYi-Vue3/src/components/SvgIcon/svgicon.js +10 -0
  165. package/RuoYi-Vue3/src/components/TopNav/index.vue +214 -0
  166. package/RuoYi-Vue3/src/components/TreeSelect/index.vue +156 -0
  167. package/RuoYi-Vue3/src/components/iFrame/index.vue +31 -0
  168. package/RuoYi-Vue3/src/directive/common/copyText.js +66 -0
  169. package/RuoYi-Vue3/src/directive/index.js +9 -0
  170. package/RuoYi-Vue3/src/directive/permission/hasPermi.js +28 -0
  171. package/RuoYi-Vue3/src/directive/permission/hasRole.js +28 -0
  172. package/RuoYi-Vue3/src/layout/components/AppMain.vue +68 -0
  173. package/RuoYi-Vue3/src/layout/components/IframeToggle/index.vue +25 -0
  174. package/RuoYi-Vue3/src/layout/components/InnerLink/index.vue +24 -0
  175. package/RuoYi-Vue3/src/layout/components/Navbar.vue +191 -0
  176. package/RuoYi-Vue3/src/layout/components/Settings/index.vue +209 -0
  177. package/RuoYi-Vue3/src/layout/components/Sidebar/Link.vue +40 -0
  178. package/RuoYi-Vue3/src/layout/components/Sidebar/Logo.vue +81 -0
  179. package/RuoYi-Vue3/src/layout/components/Sidebar/SidebarItem.vue +102 -0
  180. package/RuoYi-Vue3/src/layout/components/Sidebar/index.vue +54 -0
  181. package/RuoYi-Vue3/src/layout/components/TagsView/ScrollPane.vue +107 -0
  182. package/RuoYi-Vue3/src/layout/components/TagsView/index.vue +358 -0
  183. package/RuoYi-Vue3/src/layout/components/index.js +4 -0
  184. package/RuoYi-Vue3/src/layout/index.vue +114 -0
  185. package/RuoYi-Vue3/src/main.js +84 -0
  186. package/RuoYi-Vue3/src/permission.js +65 -0
  187. package/RuoYi-Vue3/src/plugins/auth.js +60 -0
  188. package/RuoYi-Vue3/src/plugins/cache.js +77 -0
  189. package/RuoYi-Vue3/src/plugins/download.js +79 -0
  190. package/RuoYi-Vue3/src/plugins/index.js +18 -0
  191. package/RuoYi-Vue3/src/plugins/modal.js +82 -0
  192. package/RuoYi-Vue3/src/plugins/tab.js +69 -0
  193. package/RuoYi-Vue3/src/router/index.js +175 -0
  194. package/RuoYi-Vue3/src/settings.js +47 -0
  195. package/RuoYi-Vue3/src/store/index.js +3 -0
  196. package/RuoYi-Vue3/src/store/modules/app.js +46 -0
  197. package/RuoYi-Vue3/src/store/modules/dict.js +57 -0
  198. package/RuoYi-Vue3/src/store/modules/permission.js +142 -0
  199. package/RuoYi-Vue3/src/store/modules/settings.js +38 -0
  200. package/RuoYi-Vue3/src/store/modules/tagsView.js +182 -0
  201. package/RuoYi-Vue3/src/store/modules/user.js +72 -0
  202. package/RuoYi-Vue3/src/utils/auth.js +15 -0
  203. package/RuoYi-Vue3/src/utils/dict.js +24 -0
  204. package/RuoYi-Vue3/src/utils/dynamicTitle.js +15 -0
  205. package/RuoYi-Vue3/src/utils/errorCode.js +6 -0
  206. package/RuoYi-Vue3/src/utils/index.js +390 -0
  207. package/RuoYi-Vue3/src/utils/jsencrypt.js +30 -0
  208. package/RuoYi-Vue3/src/utils/permission.js +51 -0
  209. package/RuoYi-Vue3/src/utils/request.js +152 -0
  210. package/RuoYi-Vue3/src/utils/ruoyi.js +246 -0
  211. package/RuoYi-Vue3/src/utils/scroll-to.js +58 -0
  212. package/RuoYi-Vue3/src/utils/theme.js +49 -0
  213. package/RuoYi-Vue3/src/utils/validate.js +93 -0
  214. package/RuoYi-Vue3/src/views/error/401.vue +82 -0
  215. package/RuoYi-Vue3/src/views/error/404.vue +227 -0
  216. package/RuoYi-Vue3/src/views/index.vue +1092 -0
  217. package/RuoYi-Vue3/src/views/login.vue +227 -0
  218. package/RuoYi-Vue3/src/views/monitor/cache/index.vue +132 -0
  219. package/RuoYi-Vue3/src/views/monitor/cache/list.vue +246 -0
  220. package/RuoYi-Vue3/src/views/monitor/druid/index.vue +13 -0
  221. package/RuoYi-Vue3/src/views/monitor/job/index.vue +501 -0
  222. package/RuoYi-Vue3/src/views/monitor/job/log.vue +283 -0
  223. package/RuoYi-Vue3/src/views/monitor/logininfor/index.vue +233 -0
  224. package/RuoYi-Vue3/src/views/monitor/online/index.vue +109 -0
  225. package/RuoYi-Vue3/src/views/monitor/operlog/index.vue +310 -0
  226. package/RuoYi-Vue3/src/views/monitor/server/index.vue +187 -0
  227. package/RuoYi-Vue3/src/views/redirect/index.vue +14 -0
  228. package/RuoYi-Vue3/src/views/register.vue +219 -0
  229. package/RuoYi-Vue3/src/views/system/config/index.vue +316 -0
  230. package/RuoYi-Vue3/src/views/system/dept/index.vue +283 -0
  231. package/RuoYi-Vue3/src/views/system/dict/data.vue +362 -0
  232. package/RuoYi-Vue3/src/views/system/dict/index.vue +323 -0
  233. package/RuoYi-Vue3/src/views/system/menu/index.vue +452 -0
  234. package/RuoYi-Vue3/src/views/system/notice/index.vue +292 -0
  235. package/RuoYi-Vue3/src/views/system/post/index.vue +287 -0
  236. package/RuoYi-Vue3/src/views/system/role/authUser.vue +179 -0
  237. package/RuoYi-Vue3/src/views/system/role/index.vue +584 -0
  238. package/RuoYi-Vue3/src/views/system/role/selectUser.vue +144 -0
  239. package/RuoYi-Vue3/src/views/system/user/authRole.vue +116 -0
  240. package/RuoYi-Vue3/src/views/system/user/index.vue +635 -0
  241. package/RuoYi-Vue3/src/views/system/user/profile/index.vue +87 -0
  242. package/RuoYi-Vue3/src/views/system/user/profile/resetPwd.vue +59 -0
  243. package/RuoYi-Vue3/src/views/system/user/profile/userAvatar.vue +180 -0
  244. package/RuoYi-Vue3/src/views/system/user/profile/userInfo.vue +67 -0
  245. package/RuoYi-Vue3/src/views/tool/build/index.vue +3 -0
  246. package/RuoYi-Vue3/src/views/tool/gen/basicInfoForm.vue +48 -0
  247. package/RuoYi-Vue3/src/views/tool/gen/createTable.vue +46 -0
  248. package/RuoYi-Vue3/src/views/tool/gen/editTable.vue +200 -0
  249. package/RuoYi-Vue3/src/views/tool/gen/genInfoForm.vue +306 -0
  250. package/RuoYi-Vue3/src/views/tool/gen/importTable.vue +126 -0
  251. package/RuoYi-Vue3/src/views/tool/gen/index.vue +310 -0
  252. package/RuoYi-Vue3/src/views/tool/swagger/index.vue +9 -0
  253. package/RuoYi-Vue3/vite/plugins/auto-import.js +12 -0
  254. package/RuoYi-Vue3/vite/plugins/compression.js +28 -0
  255. package/RuoYi-Vue3/vite/plugins/index.js +15 -0
  256. package/RuoYi-Vue3/vite/plugins/setup-extend.js +5 -0
  257. package/RuoYi-Vue3/vite/plugins/svg-icon.js +10 -0
  258. package/RuoYi-Vue3/vite.config.js +58 -0
  259. package/admin/README.MD +0 -0
  260. package/admin/base.mjs +447 -0
  261. package/admin/index.mjs +19 -0
  262. package/admin/monitor/job.mjs +24 -0
  263. package/admin/monitor/jobLog.mjs +8 -0
  264. package/admin/monitor/logininfor.mjs +23 -0
  265. package/admin/monitor/operlog.mjs +9 -0
  266. package/admin/monitor/server.mjs +54 -0
  267. package/admin/service.mjs +10 -0
  268. package/admin/system/component.mjs +16 -0
  269. package/admin/system/config.mjs +8 -0
  270. package/admin/system/dept.mjs +24 -0
  271. package/admin/system/dict.mjs +34 -0
  272. package/admin/system/login.mjs +119 -0
  273. package/admin/system/menu.mjs +33 -0
  274. package/admin/system/notice.mjs +8 -0
  275. package/admin/system/path.mjs +53 -0
  276. package/admin/system/post.mjs +8 -0
  277. package/admin/system/role.mjs +105 -0
  278. package/admin/system/user.mjs +93 -0
  279. package/admin/tool/gen.mjs +95 -0
  280. package/admin/tool/helper.mjs +1335 -0
  281. package/admin/tool/pm2.mjs +71 -0
  282. package/admin/tool/store.mjs +84 -0
  283. package/admin/tool/upload.mjs +112 -0
  284. package/app/README.MD +0 -0
  285. package/app/index.mjs +9 -0
  286. package/bin.mjs +211 -0
  287. package/build.mjs +25 -0
  288. package/common/README.MD +0 -0
  289. package/common/config.mjs +40 -0
  290. package/common/pm2.mjs +145 -0
  291. package/common/service.mjs +79 -0
  292. package/common/service0.mjs +468 -0
  293. package/common/tools.mjs +314 -0
  294. package/common/type.ts +498 -0
  295. package/file/README.MD +0 -0
  296. package/files/.env.production +11 -0
  297. package/files/gen.js +76 -0
  298. package/files/genImportTable.vue +120 -0
  299. package/files/genIndex.vue +309 -0
  300. package/files/genInfoForm.vue +302 -0
  301. package/files/login.vue +237 -0
  302. package/files/menu.js +68 -0
  303. package/files/menuIndex.vue +447 -0
  304. package/files/pm2.js +88 -0
  305. package/files/pm2Data.vue +335 -0
  306. package/files/pm2Index.vue +343 -0
  307. package/files/routerIndex.js +204 -0
  308. package/files/serverIndex.vue +215 -0
  309. package/files/store.js +96 -0
  310. package/files/storeData.vue +294 -0
  311. package/files/storeIndex.vue +245 -0
  312. package/files/upload.js +47 -0
  313. package/files/uploadIndex.vue +240 -0
  314. package/files/vite.config.js +58 -0
  315. package/index.mjs +28 -0
  316. package/jwt/README.MD +12 -0
  317. package/jwt/index.mjs +17 -0
  318. package/package.json +22 -0
  319. package/proxy/README.MD +0 -0
  320. package/proxy/index.mjs +16 -0
  321. package/static/README.MD +0 -0
  322. package/static/admin/assets/401-CYieuz9-.js +1 -0
  323. package/static/admin/assets/401-CYieuz9-.js.gz +0 -0
  324. package/static/admin/assets/401-DmT2Eyz6.css +1 -0
  325. package/static/admin/assets/401-HGF6Q5qM.gif +0 -0
  326. package/static/admin/assets/404-DFv5Zpvm.js +1 -0
  327. package/static/admin/assets/404-DFv5Zpvm.js.gz +0 -0
  328. package/static/admin/assets/404-Dy3nURRX.js +1 -0
  329. package/static/admin/assets/404-Dy3nURRX.js.gz +0 -0
  330. package/static/admin/assets/404-N4aRkdWY.png +0 -0
  331. package/static/admin/assets/404-uZCOR2Ze.css +1 -0
  332. package/static/admin/assets/404-uZCOR2Ze.css.gz +0 -0
  333. package/static/admin/assets/404_cloud-CPexjtDj.png +0 -0
  334. package/static/admin/assets/authRole-ma37t91O.js +1 -0
  335. package/static/admin/assets/authRole-ma37t91O.js.gz +0 -0
  336. package/static/admin/assets/authUser-C2Y6gkW3.js +1 -0
  337. package/static/admin/assets/authUser-C2Y6gkW3.js.gz +0 -0
  338. package/static/admin/assets/basicInfoForm-Cqv-g0Vq.js +1 -0
  339. package/static/admin/assets/basicInfoForm-Cqv-g0Vq.js.gz +0 -0
  340. package/static/admin/assets/bug-10dePVta.js +1 -0
  341. package/static/admin/assets/bug-10dePVta.js.gz +0 -0
  342. package/static/admin/assets/build-2jMyI6eP.js +1 -0
  343. package/static/admin/assets/build-2jMyI6eP.js.gz +0 -0
  344. package/static/admin/assets/button-BlSCM_GH.js +1 -0
  345. package/static/admin/assets/button-BlSCM_GH.js.gz +0 -0
  346. package/static/admin/assets/cache-CRGI5LFU.js +1 -0
  347. package/static/admin/assets/cascader-CXIOcY1C.js +1 -0
  348. package/static/admin/assets/cascader-CXIOcY1C.js.gz +0 -0
  349. package/static/admin/assets/chart-BsLMrzXU.js +1 -0
  350. package/static/admin/assets/checkbox-Bpiun3bf.js +1 -0
  351. package/static/admin/assets/checkbox-Bpiun3bf.js.gz +0 -0
  352. package/static/admin/assets/clipboard-DaV3cn7f.js +1 -0
  353. package/static/admin/assets/clipboard-DaV3cn7f.js.gz +0 -0
  354. package/static/admin/assets/code-DgJ8cT4a.js +1 -0
  355. package/static/admin/assets/color-y1Sshoou.js +1 -0
  356. package/static/admin/assets/color-y1Sshoou.js.gz +0 -0
  357. package/static/admin/assets/component-Djp9s69L.js +1 -0
  358. package/static/admin/assets/component-Djp9s69L.js.gz +0 -0
  359. package/static/admin/assets/createTable-CpixhIJI.js +1 -0
  360. package/static/admin/assets/createTable-CpixhIJI.js.gz +0 -0
  361. package/static/admin/assets/dashboard-Dy7qt_a2.js +1 -0
  362. package/static/admin/assets/dashboard-Dy7qt_a2.js.gz +0 -0
  363. package/static/admin/assets/data-B6ExfNCI.js +1 -0
  364. package/static/admin/assets/data-B6ExfNCI.js.gz +0 -0
  365. package/static/admin/assets/data-BNwnwlkO.js +34 -0
  366. package/static/admin/assets/data-BNwnwlkO.js.gz +0 -0
  367. package/static/admin/assets/data-C3FuPwta.css +1 -0
  368. package/static/admin/assets/data-DmSA0HcO.js +1 -0
  369. package/static/admin/assets/data-DmSA0HcO.js.gz +0 -0
  370. package/static/admin/assets/date-B1FSITvi.js +1 -0
  371. package/static/admin/assets/date-B1FSITvi.js.gz +0 -0
  372. package/static/admin/assets/date-range-B8MgYLb1.js +1 -0
  373. package/static/admin/assets/date-range-B8MgYLb1.js.gz +0 -0
  374. package/static/admin/assets/dict-Bi_GqSXR.js +1 -0
  375. package/static/admin/assets/dict-Bi_GqSXR.js.gz +0 -0
  376. package/static/admin/assets/documentation-uH9BvL5U.js +1 -0
  377. package/static/admin/assets/download-DeIzgQWH.js +1 -0
  378. package/static/admin/assets/download-DeIzgQWH.js.gz +0 -0
  379. package/static/admin/assets/drag-BG1_I1vT.js +1 -0
  380. package/static/admin/assets/druid-BybW_S_B.js +1 -0
  381. package/static/admin/assets/edit-D0DI9pAq.js +1 -0
  382. package/static/admin/assets/editTable-zr5bdAM7.js +1 -0
  383. package/static/admin/assets/editTable-zr5bdAM7.js.gz +0 -0
  384. package/static/admin/assets/education-47KsSYIl.js +1 -0
  385. package/static/admin/assets/email-Dig28Vt2.js +1 -0
  386. package/static/admin/assets/example-CnLLAFb9.js +1 -0
  387. package/static/admin/assets/excel-D3hj5F35.js +1 -0
  388. package/static/admin/assets/exit-fullscreen-dXhGKlQm.js +1 -0
  389. package/static/admin/assets/exit-fullscreen-dXhGKlQm.js.gz +0 -0
  390. package/static/admin/assets/eye-DqRz4sMZ.js +1 -0
  391. package/static/admin/assets/eye-DqRz4sMZ.js.gz +0 -0
  392. package/static/admin/assets/eye-open-BxlshWqB.js +1 -0
  393. package/static/admin/assets/eye-open-BxlshWqB.js.gz +0 -0
  394. package/static/admin/assets/form-BDTA_i-I.js +1 -0
  395. package/static/admin/assets/form-BDTA_i-I.js.gz +0 -0
  396. package/static/admin/assets/fullscreen-0JHt5yWX.js +1 -0
  397. package/static/admin/assets/gen-DLNrNhtb.js +1 -0
  398. package/static/admin/assets/genInfoForm-CMDsV5QX.js +1 -0
  399. package/static/admin/assets/genInfoForm-CMDsV5QX.js.gz +0 -0
  400. package/static/admin/assets/github-AJ0WQBa2.js +1 -0
  401. package/static/admin/assets/github-AJ0WQBa2.js.gz +0 -0
  402. package/static/admin/assets/guide-DZWUPi2j.js +1 -0
  403. package/static/admin/assets/icon-BtMv6Od8.js +1 -0
  404. package/static/admin/assets/icon-BtMv6Od8.js.gz +0 -0
  405. package/static/admin/assets/importTable-BsBsGfWB.js +1 -0
  406. package/static/admin/assets/importTable-BsBsGfWB.js.gz +0 -0
  407. package/static/admin/assets/index-1Gtzb1EG.css +1 -0
  408. package/static/admin/assets/index-1Gtzb1EG.css.gz +0 -0
  409. package/static/admin/assets/index-22TxXV_H.js +1 -0
  410. package/static/admin/assets/index-2PS_9Njt.js +1 -0
  411. package/static/admin/assets/index-2PS_9Njt.js.gz +0 -0
  412. package/static/admin/assets/index-2QWdVCKT.js +1 -0
  413. package/static/admin/assets/index-BH2yis6M.js +1 -0
  414. package/static/admin/assets/index-BYiWbDzj.js +137 -0
  415. package/static/admin/assets/index-BYiWbDzj.js.gz +0 -0
  416. package/static/admin/assets/index-BcoIBYYg.js +1 -0
  417. package/static/admin/assets/index-BcoIBYYg.js.gz +0 -0
  418. package/static/admin/assets/index-BdfyYxZX.css +1 -0
  419. package/static/admin/assets/index-BdfyYxZX.css.gz +0 -0
  420. package/static/admin/assets/index-BpFFXMK5.js +1 -0
  421. package/static/admin/assets/index-BpFFXMK5.js.gz +0 -0
  422. package/static/admin/assets/index-CKPU_AaL.js +1 -0
  423. package/static/admin/assets/index-CKPU_AaL.js.gz +0 -0
  424. package/static/admin/assets/index-CXsykB0X.js +1 -0
  425. package/static/admin/assets/index-CXsykB0X.js.gz +0 -0
  426. package/static/admin/assets/index-CfHRKVJR.js +1 -0
  427. package/static/admin/assets/index-CfHRKVJR.js.gz +0 -0
  428. package/static/admin/assets/index-ChrWcM7o.js +1 -0
  429. package/static/admin/assets/index-ChrWcM7o.js.gz +0 -0
  430. package/static/admin/assets/index-CyGqJLpz.css +1 -0
  431. package/static/admin/assets/index-Czuq8j-W.js +1 -0
  432. package/static/admin/assets/index-D5kEXJN3.js +1 -0
  433. package/static/admin/assets/index-D5kEXJN3.js.gz +0 -0
  434. package/static/admin/assets/index-D7sjRL--.js +1 -0
  435. package/static/admin/assets/index-D7sjRL--.js.gz +0 -0
  436. package/static/admin/assets/index-D9JRAPr4.js +1 -0
  437. package/static/admin/assets/index-D9JRAPr4.js.gz +0 -0
  438. package/static/admin/assets/index-DADWjT7Y.js +1 -0
  439. package/static/admin/assets/index-DADWjT7Y.js.gz +0 -0
  440. package/static/admin/assets/index-DUTtT4NU.js +1 -0
  441. package/static/admin/assets/index-DUTtT4NU.js.gz +0 -0
  442. package/static/admin/assets/index-DZR__uIb.js +1 -0
  443. package/static/admin/assets/index-DZR__uIb.js.gz +0 -0
  444. package/static/admin/assets/index-Da2r8G2b.js +1 -0
  445. package/static/admin/assets/index-Da2r8G2b.js.gz +0 -0
  446. package/static/admin/assets/index-DakybE_b.js +1 -0
  447. package/static/admin/assets/index-DakybE_b.js.gz +0 -0
  448. package/static/admin/assets/index-DdnU2rJ0.css +1 -0
  449. package/static/admin/assets/index-H21xXZr5.js +60 -0
  450. package/static/admin/assets/index-H21xXZr5.js.gz +0 -0
  451. package/static/admin/assets/index-PGDGQEbD.js +1 -0
  452. package/static/admin/assets/index-PGDGQEbD.js.gz +0 -0
  453. package/static/admin/assets/index-Rm6qYhrO.js +1 -0
  454. package/static/admin/assets/index-VG6ZkdYt.js +1 -0
  455. package/static/admin/assets/index-VG6ZkdYt.js.gz +0 -0
  456. package/static/admin/assets/index-YVnsjgTq.js +1 -0
  457. package/static/admin/assets/index-YVnsjgTq.js.gz +0 -0
  458. package/static/admin/assets/index-t3XJ47us.css +1 -0
  459. package/static/admin/assets/index-t3XJ47us.css.gz +0 -0
  460. package/static/admin/assets/index-xfai-fRy.js +1 -0
  461. package/static/admin/assets/index-xfai-fRy.js.gz +0 -0
  462. package/static/admin/assets/input-BJoPMnBW.js +1 -0
  463. package/static/admin/assets/international-CmzG1OHg.js +1 -0
  464. package/static/admin/assets/international-CmzG1OHg.js.gz +0 -0
  465. package/static/admin/assets/job-BcmuINx7.js +1 -0
  466. package/static/admin/assets/job-BcmuINx7.js.gz +0 -0
  467. package/static/admin/assets/job-COdMvNx2.js +1 -0
  468. package/static/admin/assets/language-CaW1LMEk.js +1 -0
  469. package/static/admin/assets/language-CaW1LMEk.js.gz +0 -0
  470. package/static/admin/assets/link-C93f4PgI.js +1 -0
  471. package/static/admin/assets/list-C7O8B4zW.js +1 -0
  472. package/static/admin/assets/list-C7O8B4zW.js.gz +0 -0
  473. package/static/admin/assets/list-DUaPnccL.js +1 -0
  474. package/static/admin/assets/list-DUaPnccL.js.gz +0 -0
  475. package/static/admin/assets/lock-Bexeb9hp.js +1 -0
  476. package/static/admin/assets/log-CF2F-nSs.js +1 -0
  477. package/static/admin/assets/log-CF2F-nSs.js.gz +0 -0
  478. package/static/admin/assets/log-g6qirYnf.js +1 -0
  479. package/static/admin/assets/log-g6qirYnf.js.gz +0 -0
  480. package/static/admin/assets/login-1ezV0PC1.css +1 -0
  481. package/static/admin/assets/login-1ezV0PC1.css.gz +0 -0
  482. package/static/admin/assets/login-BnkuYS6J.js +22 -0
  483. package/static/admin/assets/login-BnkuYS6J.js.gz +0 -0
  484. package/static/admin/assets/login-background-Yn3y1TP_.jpg +0 -0
  485. package/static/admin/assets/logininfor-Bm9ZYYR7.js +1 -0
  486. package/static/admin/assets/logininfor-Bm9ZYYR7.js.gz +0 -0
  487. package/static/admin/assets/logo-BjsPc2xl.png +0 -0
  488. package/static/admin/assets/menu-BIu3IsSF.js +1 -0
  489. package/static/admin/assets/message-UkR-VIBB.js +1 -0
  490. package/static/admin/assets/money-B1qqPuhn.js +1 -0
  491. package/static/admin/assets/monitor-gwnnVq4l.js +1 -0
  492. package/static/admin/assets/monitor-gwnnVq4l.js.gz +0 -0
  493. package/static/admin/assets/nested-B4d5u3hW.js +1 -0
  494. package/static/admin/assets/number-D4hB_nHC.js +1 -0
  495. package/static/admin/assets/number-D4hB_nHC.js.gz +0 -0
  496. package/static/admin/assets/online-C2ZP8pdY.js +1 -0
  497. package/static/admin/assets/online-C2ZP8pdY.js.gz +0 -0
  498. package/static/admin/assets/password-DfGvqQpB.js +1 -0
  499. package/static/admin/assets/password-DfGvqQpB.js.gz +0 -0
  500. package/static/admin/assets/pay-2ZbgPnxn.png +0 -0
  501. package/static/admin/assets/pdf-CD9mOGjJ.js +1 -0
  502. package/static/admin/assets/pdf-CD9mOGjJ.js.gz +0 -0
  503. package/static/admin/assets/people-CdGMHN63.js +1 -0
  504. package/static/admin/assets/people-CdGMHN63.js.gz +0 -0
  505. package/static/admin/assets/peoples-BRYsIqmI.js +1 -0
  506. package/static/admin/assets/phone-BpAUIz0g.js +1 -0
  507. package/static/admin/assets/phone-BpAUIz0g.js.gz +0 -0
  508. package/static/admin/assets/pm2-BkmkkE2A.js +1 -0
  509. package/static/admin/assets/post-DrLDyPY9.js +1 -0
  510. package/static/admin/assets/post-DrLDyPY9.js.gz +0 -0
  511. package/static/admin/assets/profile-DruvkrZU.jpg +0 -0
  512. package/static/admin/assets/qq-D8j4O83Y.js +1 -0
  513. package/static/admin/assets/qq-D8j4O83Y.js.gz +0 -0
  514. package/static/admin/assets/question-CvYWQbyW.js +1 -0
  515. package/static/admin/assets/question-CvYWQbyW.js.gz +0 -0
  516. package/static/admin/assets/radio-B0t9wPBQ.js +1 -0
  517. package/static/admin/assets/radio-B0t9wPBQ.js.gz +0 -0
  518. package/static/admin/assets/rate-CgnHQvKS.js +1 -0
  519. package/static/admin/assets/rate-CgnHQvKS.js.gz +0 -0
  520. package/static/admin/assets/redis-D4ECyT6a.js +1 -0
  521. package/static/admin/assets/redis-D4ECyT6a.js.gz +0 -0
  522. package/static/admin/assets/redis-list-BtKGPnqO.js +1 -0
  523. package/static/admin/assets/redis-list-BtKGPnqO.js.gz +0 -0
  524. package/static/admin/assets/register-B9RmZvjt.js +1 -0
  525. package/static/admin/assets/register-B9RmZvjt.js.gz +0 -0
  526. package/static/admin/assets/register-n3u7gqca.css +1 -0
  527. package/static/admin/assets/resetPwd-M0EIDnQk.js +1 -0
  528. package/static/admin/assets/resetPwd-M0EIDnQk.js.gz +0 -0
  529. package/static/admin/assets/role-XbHkNxnW.js +1 -0
  530. package/static/admin/assets/role-XbHkNxnW.js.gz +0 -0
  531. package/static/admin/assets/row-CRXKIHjm.js +1 -0
  532. package/static/admin/assets/row-CRXKIHjm.js.gz +0 -0
  533. package/static/admin/assets/search-CUfclCsR.js +1 -0
  534. package/static/admin/assets/select-DhuHHMxz.js +1 -0
  535. package/static/admin/assets/select-DhuHHMxz.js.gz +0 -0
  536. package/static/admin/assets/selectUser-DA_rE9J_.js +1 -0
  537. package/static/admin/assets/selectUser-DA_rE9J_.js.gz +0 -0
  538. package/static/admin/assets/server-unS7EyF7.js +1 -0
  539. package/static/admin/assets/shopping-CU1IRvxM.js +1 -0
  540. package/static/admin/assets/shopping-CU1IRvxM.js.gz +0 -0
  541. package/static/admin/assets/size-Cj9fB5Rp.js +1 -0
  542. package/static/admin/assets/skill-B8f_I4m_.js +1 -0
  543. package/static/admin/assets/skill-B8f_I4m_.js.gz +0 -0
  544. package/static/admin/assets/slider-BGfehM6X.js +1 -0
  545. package/static/admin/assets/star-kST8a72V.js +1 -0
  546. package/static/admin/assets/store-CX7IRN8X.js +1 -0
  547. package/static/admin/assets/swagger-BHGXZ2Jt.js +1 -0
  548. package/static/admin/assets/swagger-BHGXZ2Jt.js.gz +0 -0
  549. package/static/admin/assets/switch-CvaargRJ.js +1 -0
  550. package/static/admin/assets/system-DcNSH_Fq.js +1 -0
  551. package/static/admin/assets/system-DcNSH_Fq.js.gz +0 -0
  552. package/static/admin/assets/tab-nA3f0aBt.js +1 -0
  553. package/static/admin/assets/table-5PRh60AQ.js +1 -0
  554. package/static/admin/assets/test-CEJIIaDM.js +1 -0
  555. package/static/admin/assets/test-CEJIIaDM.js.gz +0 -0
  556. package/static/admin/assets/textarea-CJWXlgbJ.js +1 -0
  557. package/static/admin/assets/theme-CyGq941x.js +1 -0
  558. package/static/admin/assets/time-BVERp0sU.js +1 -0
  559. package/static/admin/assets/time-BVERp0sU.js.gz +0 -0
  560. package/static/admin/assets/time-range-D3dxgtLj.js +1 -0
  561. package/static/admin/assets/time-range-D3dxgtLj.js.gz +0 -0
  562. package/static/admin/assets/tool-D8kXk1l-.js +1 -0
  563. package/static/admin/assets/tool-D8kXk1l-.js.gz +0 -0
  564. package/static/admin/assets/tree-BCtS3oPD.js +1 -0
  565. package/static/admin/assets/tree-BCtS3oPD.js.gz +0 -0
  566. package/static/admin/assets/tree-table-CnOS99I9.js +1 -0
  567. package/static/admin/assets/tree-table-CnOS99I9.js.gz +0 -0
  568. package/static/admin/assets/type-BU7MsCG8.js +1 -0
  569. package/static/admin/assets/upload-BueI-Il1.js +1 -0
  570. package/static/admin/assets/upload-BueI-Il1.js.gz +0 -0
  571. package/static/admin/assets/user-DCGYGA9G.js +1 -0
  572. package/static/admin/assets/user-DCGYGA9G.js.gz +0 -0
  573. package/static/admin/assets/user-DqMuW5cU.js +1 -0
  574. package/static/admin/assets/userAvatar-BAmwMY1G.css +1 -0
  575. package/static/admin/assets/userAvatar-BAmwMY1G.css.gz +0 -0
  576. package/static/admin/assets/userAvatar-Bax34kaQ.js +7 -0
  577. package/static/admin/assets/userAvatar-Bax34kaQ.js.gz +0 -0
  578. package/static/admin/assets/userInfo-OvdBjEQX.js +1 -0
  579. package/static/admin/assets/userInfo-OvdBjEQX.js.gz +0 -0
  580. package/static/admin/assets/validCode-COB1iLxa.js +1 -0
  581. package/static/admin/assets/validCode-COB1iLxa.js.gz +0 -0
  582. package/static/admin/assets/wechat-lmQOcPZu.js +1 -0
  583. package/static/admin/assets/wechat-lmQOcPZu.js.gz +0 -0
  584. package/static/admin/assets/zip-DIOSZc69.js +1 -0
  585. package/static/admin/assets/zip-DIOSZc69.js.gz +0 -0
  586. package/static/admin/favicon.ico +0 -0
  587. package/static/admin/index.html +216 -0
  588. package/static/admin/index.html.gz +0 -0
  589. package/store1/README.MD +0 -0
  590. package/store1/generic.mjs +102 -0
  591. package/store1/index.mjs +30 -0
  592. package/store1/monitor.mjs +13 -0
  593. package/store1/role.mjs +137 -0
  594. package/store1/store/0/data +0 -0
  595. package/store1/store/0/index +0 -0
  596. package/store1/store/0/index.mjs +15 -0
  597. package/store1/store/1/buffer/464135 +1 -0
  598. package/store1/store/1/buffer/464587 +1 -0
  599. package/store1/store/1/data +0 -0
  600. package/store1/store/1/data-LAPTOP-S8G0S6EH +0 -0
  601. package/store1/store/1/index +0 -0
  602. package/store1/store/1/index-LAPTOP-S8G0S6EH +0 -0
  603. package/store1/store/1/index.mjs +4045 -0
  604. package/store1/store/1/type.ts +1492 -0
  605. package/store1/store/index.mjs +23 -0
  606. package/store1/store2/0/data +0 -0
  607. package/store1/store2/0/index +0 -0
  608. package/store1/store2/0/index.mjs +15 -0
  609. package/store1/store2/1/buffer/464135 +1 -0
  610. package/store1/store2/1/buffer/464587 +1 -0
  611. package/store1/store2/1/data +0 -0
  612. package/store1/store2/1/data-LAPTOP-S8G0S6EH +0 -0
  613. package/store1/store2/1/index +0 -0
  614. package/store1/store2/1/index-LAPTOP-S8G0S6EH +0 -0
  615. package/store1/store2/1/index.mjs +4045 -0
  616. package/store1/store2/1/type.ts +1492 -0
  617. package/store1/store2/index.mjs +23 -0
  618. package/store1/system.mjs +67 -0
  619. package/store1/tool.mjs +472 -0
  620. package/store1/user.mjs +228 -0
@@ -0,0 +1,7 @@
1
+ import{B as U,o as Y,c as M,H as E,I as T,m,X as S,n as I,M as R,z as $,_ as D,b as F,r as L,C as V,d as H,h as y,e as C,f as x,l as j,p as N,D as q,s as G,t as Z,v as J}from"./index-BYiWbDzj.js";import{b as K}from"./user-DCGYGA9G.js";const A={};A.getData=t=>new Promise((e,i)=>{let s={};Q(t).then(o=>{s.arrayBuffer=o;try{s.orientation=st(o)}catch{s.orientation=-1}e(s)}).catch(o=>{i(o)})});function Q(t){let e=null;return new Promise((i,s)=>{if(t.src)if(/^data\:/i.test(t.src))e=et(t.src),i(e);else if(/^blob\:/i.test(t.src)){var o=new FileReader;o.onload=function(h){e=h.target.result,i(e)},tt(t.src,function(h){o.readAsArrayBuffer(h)})}else{var r=new XMLHttpRequest;r.onload=function(){if(this.status==200||this.status===0)e=r.response,i(e);else throw"Could not load image";r=null},r.open("GET",t.src,!0),r.responseType="arraybuffer",r.send(null)}else s("img error")})}function tt(t,e){var i=new XMLHttpRequest;i.open("GET",t,!0),i.responseType="blob",i.onload=function(s){(this.status==200||this.status===0)&&e(this.response)},i.send()}function et(t,e){e=e||t.match(/^data\:([^\;]+)\;base64,/mi)[1]||"",t=t.replace(/^data\:([^\;]+)\;base64,/gmi,"");for(var i=atob(t),s=i.length%2==0?i.length:i.length+1,o=new ArrayBuffer(s),r=new Uint16Array(o),h=0;h<s;h++)r[h]=i.charCodeAt(h);return o}function it(t,e,i){var s="",o;for(o=e,i+=e;o<i;o++)s+=String.fromCharCode(t.getUint8(o));return s}function st(t){var e=new DataView(t),i=e.byteLength,s,o,r,h,c,p,n,a,l,u;if(e.getUint8(0)===255&&e.getUint8(1)===216)for(l=2;l<i;){if(e.getUint8(l)===255&&e.getUint8(l+1)===225){n=l;break}l++}if(n&&(o=n+4,r=n+10,it(e,o,4)==="Exif"&&(p=e.getUint16(r),c=p===18761,(c||p===19789)&&e.getUint16(r+2,c)===42&&(h=e.getUint32(r+4,c),h>=8&&(a=r+h)))),a){for(i=e.getUint16(a,c),u=0;u<i;u++)if(l=a+u*12+2,e.getUint16(l,c)===274){l+=8,s=e.getUint16(l,c);break}}return s}const ot=(t,e)=>{const i=t.__vccOpts||t;for(const[s,o]of e)i[s]=o;return i},ht=U({data:function(){return{w:0,h:0,scale:1,x:0,y:0,loading:!0,trueWidth:0,trueHeight:0,move:!0,moveX:0,moveY:0,crop:!1,cropping:!1,cropW:0,cropH:0,cropOldW:0,cropOldH:0,canChangeX:!1,canChangeY:!1,changeCropTypeX:1,changeCropTypeY:1,cropX:0,cropY:0,cropChangeX:0,cropChangeY:0,cropOffsertX:0,cropOffsertY:0,support:"",touches:[],touchNow:!1,rotate:0,isIos:!1,orientation:0,imgs:"",coe:.2,scaling:!1,scalingSet:"",coeStatus:"",isCanShow:!0}},props:{img:{type:[String,Blob,null,File],default:""},outputSize:{type:Number,default:1},outputType:{type:String,default:"jpeg"},info:{type:Boolean,default:!0},canScale:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!1},autoCropWidth:{type:[Number,String],default:0},autoCropHeight:{type:[Number,String],default:0},fixed:{type:Boolean,default:!1},fixedNumber:{type:Array,default:()=>[1,1]},fixedBox:{type:Boolean,default:!1},full:{type:Boolean,default:!1},canMove:{type:Boolean,default:!0},canMoveBox:{type:Boolean,default:!0},original:{type:Boolean,default:!1},centerBox:{type:Boolean,default:!1},high:{type:Boolean,default:!0},infoTrue:{type:Boolean,default:!1},maxImgSize:{type:[Number,String],default:2e3},enlarge:{type:[Number,String],default:1},preW:{type:[Number,String],default:0},mode:{type:String,default:"contain"},limitMinSize:{type:[Number,Array,String],default:()=>10,validator:function(t){return Array.isArray(t)?Number(t[0])>=0&&Number(t[1])>=0:Number(t)>=0}},fillColor:{type:String,default:""}},computed:{cropInfo(){let t={};if(t.top=this.cropOffsertY>21?"-21px":"0px",t.width=this.cropW>0?this.cropW:0,t.height=this.cropH>0?this.cropH:0,this.infoTrue){let e=1;this.high&&!this.full&&(e=window.devicePixelRatio),this.enlarge!==1&!this.full&&(e=Math.abs(Number(this.enlarge))),t.width=t.width*e,t.height=t.height*e,this.full&&(t.width=t.width/this.scale,t.height=t.height/this.scale)}return t.width=t.width.toFixed(0),t.height=t.height.toFixed(0),t},isIE(){return!!window.ActiveXObject||"ActiveXObject"in window},passive(){return this.isIE?null:{passive:!1}}},watch:{img(){this.checkedImg()},imgs(t){t!==""&&this.reload()},cropW(){this.showPreview()},cropH(){this.showPreview()},cropOffsertX(){this.showPreview()},cropOffsertY(){this.showPreview()},scale(t,e){this.showPreview()},x(){this.showPreview()},y(){this.showPreview()},autoCrop(t){t&&this.goAutoCrop()},autoCropWidth(){this.autoCrop&&this.goAutoCrop()},autoCropHeight(){this.autoCrop&&this.goAutoCrop()},mode(){this.checkedImg()},rotate(){this.showPreview(),this.autoCrop?this.goAutoCrop(this.cropW,this.cropH):(this.cropW>0||this.cropH>0)&&this.goAutoCrop(this.cropW,this.cropH)}},methods:{getVersion(t){var e=navigator.userAgent.split(" "),i="";let s=0;const o=new RegExp(t,"i");for(var r=0;r<e.length;r++)o.test(e[r])&&(i=e[r]);return i?s=i.split("/")[1].split("."):s=["0","0","0"],s},checkOrientationImage(t,e,i,s){if(this.getVersion("chrome")[0]>=81)e=-1;else if(this.getVersion("safari")[0]>=605){const h=this.getVersion("version");h[0]>13&&h[1]>1&&(e=-1)}else{const h=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(h){let c=h[1];c=c.split("_"),(c[0]>13||c[0]>=13&&c[1]>=4)&&(e=-1)}}let o=document.createElement("canvas"),r=o.getContext("2d");switch(r.save(),e){case 2:o.width=i,o.height=s,r.translate(i,0),r.scale(-1,1);break;case 3:o.width=i,o.height=s,r.translate(i/2,s/2),r.rotate(180*Math.PI/180),r.translate(-i/2,-s/2);break;case 4:o.width=i,o.height=s,r.translate(0,s),r.scale(1,-1);break;case 5:o.height=i,o.width=s,r.rotate(.5*Math.PI),r.scale(1,-1);break;case 6:o.width=s,o.height=i,r.translate(s/2,i/2),r.rotate(90*Math.PI/180),r.translate(-i/2,-s/2);break;case 7:o.height=i,o.width=s,r.rotate(.5*Math.PI),r.translate(i,-s),r.scale(-1,1);break;case 8:o.height=i,o.width=s,r.translate(s/2,i/2),r.rotate(-90*Math.PI/180),r.translate(-i/2,-s/2);break;default:o.width=i,o.height=s}r.drawImage(t,0,0,i,s),r.restore(),o.toBlob(h=>{let c=URL.createObjectURL(h);URL.revokeObjectURL(this.imgs),this.imgs=c},"image/"+this.outputType,1)},checkedImg(){if(this.img===null||this.img===""){this.imgs="",this.clearCrop();return}this.loading=!0,this.scale=1,this.rotate=0,this.clearCrop();let t=new Image;if(t.onload=()=>{if(this.img==="")return this.$emit("img-load",new Error("图片不能为空")),!1;let i=t.width,s=t.height;A.getData(t).then(o=>{this.orientation=o.orientation||1;let r=Number(this.maxImgSize);if(!this.orientation&&i<r&s<r){this.imgs=this.img;return}i>r&&(s=s/i*r,i=r),s>r&&(i=i/s*r,s=r),this.checkOrientationImage(t,this.orientation,i,s)}).catch(o=>{this.$emit("img-load","error"),this.$emit("img-load-error",o)})},t.onerror=i=>{this.$emit("img-load","error"),this.$emit("img-load-error",i)},this.img.substr(0,4)!=="data"&&(t.crossOrigin=""),this.isIE){var e=new XMLHttpRequest;e.onload=function(){var i=URL.createObjectURL(this.response);t.src=i},e.open("GET",this.img,!0),e.responseType="blob",e.send()}else t.src=this.img},startMove(t){if(t.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=("clientX"in t?t.clientX:t.touches[0].clientX)-this.x,this.moveY=("clientY"in t?t.clientY:t.touches[0].clientY)-this.y,t.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),t.touches.length==2&&(this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale))):(window.addEventListener("mousemove",this.moveImg),window.addEventListener("mouseup",this.leaveImg)),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}else this.cropping=!0,window.addEventListener("mousemove",this.createCrop),window.addEventListener("mouseup",this.endCrop),window.addEventListener("touchmove",this.createCrop),window.addEventListener("touchend",this.endCrop),this.cropOffsertX=t.offsetX?t.offsetX:t.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=t.offsetY?t.offsetY:t.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale(t){t.preventDefault();let e=this.scale;var i={x:this.touches[0].clientX,y:this.touches[0].clientY},s={x:t.touches[0].clientX,y:t.touches[0].clientY},o={x:this.touches[1].clientX,y:this.touches[1].clientY},r={x:t.touches[1].clientX,y:t.touches[1].clientY},h=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),c=Math.sqrt(Math.pow(s.x-r.x,2)+Math.pow(s.y-r.y,2)),p=c-h,n=1;n=n/this.trueWidth>n/this.trueHeight?n/this.trueHeight:n/this.trueWidth,n=n>.1?.1:n;var a=n*p;if(!this.touchNow){if(this.touchNow=!0,p>0?e+=Math.abs(a):p<0&&e>Math.abs(a)&&(e-=Math.abs(a)),this.touches=t.touches,setTimeout(()=>{this.touchNow=!1},8),!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e}},cancelTouchScale(t){window.removeEventListener("touchmove",this.touchScale)},moveImg(t){if(t.preventDefault(),t.touches&&t.touches.length===2)return this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;let e="clientX"in t?t.clientX:t.touches[0].clientX,i="clientY"in t?t.clientY:t.touches[0].clientY,s,o;s=e-this.moveX,o=i-this.moveY,this.$nextTick(()=>{if(this.centerBox){let r=this.getImgAxis(s,o,this.scale),h=this.getCropAxis(),c=this.trueHeight*this.scale,p=this.trueWidth*this.scale,n,a,l,u;switch(this.rotate){case 1:case-1:case 3:case-3:n=this.cropOffsertX-this.trueWidth*(1-this.scale)/2+(c-p)/2,a=this.cropOffsertY-this.trueHeight*(1-this.scale)/2+(p-c)/2,l=n-c+this.cropW,u=a-p+this.cropH;break;default:n=this.cropOffsertX-this.trueWidth*(1-this.scale)/2,a=this.cropOffsertY-this.trueHeight*(1-this.scale)/2,l=n-p+this.cropW,u=a-c+this.cropH;break}r.x1>=h.x1&&(s=n),r.y1>=h.y1&&(o=a),r.x2<=h.x2&&(s=l),r.y2<=h.y2&&(o=u)}this.x=s,this.y=o,this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})})},leaveImg(t){window.removeEventListener("mousemove",this.moveImg),window.removeEventListener("touchmove",this.moveImg),window.removeEventListener("mouseup",this.leaveImg),window.removeEventListener("touchend",this.leaveImg),this.$emit("img-moving",{moving:!1,axis:this.getImgAxis()})},scaleImg(){this.canScale&&window.addEventListener(this.support,this.changeSize,this.passive)},cancelScale(){this.canScale&&window.removeEventListener(this.support,this.changeSize)},changeSize(t){t.preventDefault();let e=this.scale;var i=t.deltaY||t.wheelDelta,s=navigator.userAgent.indexOf("Firefox");i=s>0?i*30:i,this.isIE&&(i=-i);var o=this.coe;o=o/this.trueWidth>o/this.trueHeight?o/this.trueHeight:o/this.trueWidth;var r=o*i;r<0?e+=Math.abs(r):e>Math.abs(r)&&(e-=Math.abs(r));let h=r<0?"add":"reduce";if(h!==this.coeStatus&&(this.coeStatus=h,this.coe=.2),this.scaling||(this.scalingSet=setTimeout(()=>{this.scaling=!1,this.coe=this.coe+=.01},50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e},changeScale(t){let e=this.scale;t=t||1;var i=20;if(i=i/this.trueWidth>i/this.trueHeight?i/this.trueHeight:i/this.trueWidth,t=t*i,t>0?e+=Math.abs(t):e>Math.abs(t)&&(e-=Math.abs(t)),!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e},createCrop(t){t.preventDefault();var e="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,i="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0;this.$nextTick(()=>{var s=e-this.cropX,o=i-this.cropY;if(s>0?(this.cropW=s+this.cropChangeX>this.w?this.w-this.cropChangeX:s,this.cropOffsertX=this.cropChangeX):(this.cropW=this.w-this.cropChangeX+Math.abs(s)>this.w?this.cropChangeX:Math.abs(s),this.cropOffsertX=this.cropChangeX+s>0?this.cropChangeX+s:0),!this.fixed)o>0?(this.cropH=o+this.cropChangeY>this.h?this.h-this.cropChangeY:o,this.cropOffsertY=this.cropChangeY):(this.cropH=this.h-this.cropChangeY+Math.abs(o)>this.h?this.cropChangeY:Math.abs(o),this.cropOffsertY=this.cropChangeY+o>0?this.cropChangeY+o:0);else{var r=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];r+this.cropOffsertY>this.h?(this.cropH=this.h-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],s>0?this.cropOffsertX=this.cropChangeX:this.cropOffsertX=this.cropChangeX-this.cropW):this.cropH=r,this.cropOffsertY=this.cropOffsertY}})},changeCropSize(t,e,i,s,o){t.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=e,this.canChangeY=i,this.changeCropTypeX=s,this.changeCropTypeY=o,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropOldW=this.cropW,this.cropOldH=this.cropH,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.fixed&&this.canChangeX&&this.canChangeY&&(this.canChangeY=0),this.$emit("change-crop-size",{width:this.cropW,height:this.cropH})},changeCropNow(t){t.preventDefault();var e="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,i="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0;let s=this.w,o=this.h,r=0,h=0;if(this.centerBox){let n=this.getImgAxis(),a=n.x2,l=n.y2;r=n.x1>0?n.x1:0,h=n.y1>0?n.y1:0,s>a&&(s=a),o>l&&(o=l)}const[c,p]=this.checkCropLimitSize();this.$nextTick(()=>{var n=e-this.cropX,a=i-this.cropY;if(this.canChangeX&&(this.changeCropTypeX===1?this.cropOldW-n<c?(this.cropW=c,this.cropOffsertX=this.cropOldW+this.cropChangeX-r-c):this.cropOldW-n>0?(this.cropW=s-this.cropChangeX-n<=s-r?this.cropOldW-n:this.cropOldW+this.cropChangeX-r,this.cropOffsertX=s-this.cropChangeX-n<=s-r?this.cropChangeX+n:r):(this.cropW=Math.abs(n)+this.cropChangeX<=s?Math.abs(n)-this.cropOldW:s-this.cropOldW-this.cropChangeX,this.cropOffsertX=this.cropChangeX+this.cropOldW):this.changeCropTypeX===2&&(this.cropOldW+n<c?this.cropW=c:this.cropOldW+n>0?(this.cropW=this.cropOldW+n+this.cropOffsertX<=s?this.cropOldW+n:s-this.cropOffsertX,this.cropOffsertX=this.cropChangeX):(this.cropW=s-this.cropChangeX+Math.abs(n+this.cropOldW)<=s-r?Math.abs(n+this.cropOldW):this.cropChangeX-r,this.cropOffsertX=s-this.cropChangeX+Math.abs(n+this.cropOldW)<=s-r?this.cropChangeX-Math.abs(n+this.cropOldW):r))),this.canChangeY&&(this.changeCropTypeY===1?this.cropOldH-a<p?(this.cropH=p,this.cropOffsertY=this.cropOldH+this.cropChangeY-h-p):this.cropOldH-a>0?(this.cropH=o-this.cropChangeY-a<=o-h?this.cropOldH-a:this.cropOldH+this.cropChangeY-h,this.cropOffsertY=o-this.cropChangeY-a<=o-h?this.cropChangeY+a:h):(this.cropH=Math.abs(a)+this.cropChangeY<=o?Math.abs(a)-this.cropOldH:o-this.cropOldH-this.cropChangeY,this.cropOffsertY=this.cropChangeY+this.cropOldH):this.changeCropTypeY===2&&(this.cropOldH+a<p?this.cropH=p:this.cropOldH+a>0?(this.cropH=this.cropOldH+a+this.cropOffsertY<=o?this.cropOldH+a:o-this.cropOffsertY,this.cropOffsertY=this.cropChangeY):(this.cropH=o-this.cropChangeY+Math.abs(a+this.cropOldH)<=o-h?Math.abs(a+this.cropOldH):this.cropChangeY-h,this.cropOffsertY=o-this.cropChangeY+Math.abs(a+this.cropOldH)<=o-h?this.cropChangeY-Math.abs(a+this.cropOldH):h))),this.canChangeX&&this.fixed){var l=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];l<p?(this.cropH=p,this.cropW=this.fixedNumber[0]*p/this.fixedNumber[1],this.changeCropTypeX===1&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):l+this.cropOffsertY>o?(this.cropH=o-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],this.changeCropTypeX===1&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):this.cropH=l}if(this.canChangeY&&this.fixed){var u=this.cropH/this.fixedNumber[1]*this.fixedNumber[0];u<c?(this.cropW=c,this.cropH=this.fixedNumber[1]*c/this.fixedNumber[0],this.cropOffsertY=this.cropOldH+this.cropChangeY-this.cropH):u+this.cropOffsertX>s?(this.cropW=s-this.cropOffsertX,this.cropH=this.cropW/this.fixedNumber[0]*this.fixedNumber[1]):this.cropW=u}})},checkCropLimitSize(){let{cropW:t,cropH:e,limitMinSize:i}=this,s=new Array;return Array.isArray(i)?s=i:s=[i,i],t=parseFloat(s[0]),e=parseFloat(s[1]),[t,e]},changeCropEnd(t){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},calculateSize(t,e,i,s,o,r){const h=t/e;let c=o,p=r;return c<i&&(c=i,p=Math.ceil(c/h)),p<s&&(p=s,c=Math.ceil(p*h),c<i&&(c=i,p=Math.ceil(c/h))),c<o&&(c=o,p=Math.ceil(c/h)),p<r&&(p=r,c=Math.ceil(p*h)),{width:c,height:p}},endCrop(){this.cropW===0&&this.cropH===0&&(this.cropping=!1);let[t,e]=this.checkCropLimitSize();const{width:i,height:s}=this.fixed?this.calculateSize(this.fixedNumber[0],this.fixedNumber[1],t,e,this.cropW,this.cropH):{width:t,height:e};i>this.cropW&&(this.cropW=i,this.cropOffsertX+i>this.w&&(this.cropOffsertX=this.w-i)),s>this.cropH&&(this.cropH=s,this.cropOffsertY+s>this.h&&(this.cropOffsertY=this.h-s)),window.removeEventListener("mousemove",this.createCrop),window.removeEventListener("mouseup",this.endCrop),window.removeEventListener("touchmove",this.createCrop),window.removeEventListener("touchend",this.endCrop)},startCrop(){this.crop=!0},stopCrop(){this.crop=!1},clearCrop(){this.cropping=!1,this.cropW=0,this.cropH=0},cropMove(t){if(t.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(t),!1;if(t.touches&&t.touches.length===2)return this.crop=!1,this.startMove(t),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);let e="clientX"in t?t.clientX:t.touches[0].clientX,i="clientY"in t?t.clientY:t.touches[0].clientY,s,o;s=e-this.cropOffsertX,o=i-this.cropOffsertY,this.cropX=s,this.cropY=o,this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop(t,e){let i=0,s=0;t&&(t.preventDefault(),i="clientX"in t?t.clientX:t.touches[0].clientX,s="clientY"in t?t.clientY:t.touches[0].clientY),this.$nextTick(()=>{let o,r,h=i-this.cropX,c=s-this.cropY;if(e&&(h=this.cropOffsertX,c=this.cropOffsertY),h<=0?o=0:h+this.cropW>this.w?o=this.w-this.cropW:o=h,c<=0?r=0:c+this.cropH>this.h?r=this.h-this.cropH:r=c,this.centerBox){let p=this.getImgAxis();o<=p.x1&&(o=p.x1),o+this.cropW>p.x2&&(o=p.x2-this.cropW),r<=p.y1&&(r=p.y1),r+this.cropH>p.y2&&(r=p.y2-this.cropH)}this.cropOffsertX=o,this.cropOffsertY=r,this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})})},getImgAxis(t,e,i){t=t||this.x,e=e||this.y,i=i||this.scale;let s={x1:0,x2:0,y1:0,y2:0},o=this.trueWidth*i,r=this.trueHeight*i;switch(this.rotate){case 0:s.x1=t+this.trueWidth*(1-i)/2,s.x2=s.x1+this.trueWidth*i,s.y1=e+this.trueHeight*(1-i)/2,s.y2=s.y1+this.trueHeight*i;break;case 1:case-1:case 3:case-3:s.x1=t+this.trueWidth*(1-i)/2+(o-r)/2,s.x2=s.x1+this.trueHeight*i,s.y1=e+this.trueHeight*(1-i)/2+(r-o)/2,s.y2=s.y1+this.trueWidth*i;break;default:s.x1=t+this.trueWidth*(1-i)/2,s.x2=s.x1+this.trueWidth*i,s.y1=e+this.trueHeight*(1-i)/2,s.y2=s.y1+this.trueHeight*i;break}return s},getCropAxis(){let t={x1:0,x2:0,y1:0,y2:0};return t.x1=this.cropOffsertX,t.x2=t.x1+this.cropW,t.y1=this.cropOffsertY,t.y2=t.y1+this.cropH,t},leaveCrop(t){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.$emit("crop-moving",{moving:!1,axis:this.getCropAxis()})},getCropChecked(t){let e=document.createElement("canvas"),i=new Image,s=this.rotate,o=this.trueWidth,r=this.trueHeight,h=this.cropOffsertX,c=this.cropOffsertY;i.onload=()=>{if(this.cropW!==0){let a=e.getContext("2d"),l=1;this.high&!this.full&&(l=window.devicePixelRatio),this.enlarge!==1&!this.full&&(l=Math.abs(Number(this.enlarge)));let u=this.cropW*l,O=this.cropH*l,g=o*this.scale*l,f=r*this.scale*l,v=(this.x-h+this.trueWidth*(1-this.scale)/2)*l,d=(this.y-c+this.trueHeight*(1-this.scale)/2)*l;switch(n(u,O),a.save(),this.fillColor&&(a.fillStyle=this.fillColor,a.fillRect(0,0,e.width,e.height)),s){case 0:this.full?(n(u/this.scale,O/this.scale),a.drawImage(i,v/this.scale,d/this.scale,g/this.scale,f/this.scale)):a.drawImage(i,v,d,g,f);break;case 1:case-3:this.full?(n(u/this.scale,O/this.scale),v=v/this.scale+(g/this.scale-f/this.scale)/2,d=d/this.scale+(f/this.scale-g/this.scale)/2,a.rotate(s*90*Math.PI/180),a.drawImage(i,d,-v-f/this.scale,g/this.scale,f/this.scale)):(v=v+(g-f)/2,d=d+(f-g)/2,a.rotate(s*90*Math.PI/180),a.drawImage(i,d,-v-f,g,f));break;case 2:case-2:this.full?(n(u/this.scale,O/this.scale),a.rotate(s*90*Math.PI/180),v=v/this.scale,d=d/this.scale,a.drawImage(i,-v-g/this.scale,-d-f/this.scale,g/this.scale,f/this.scale)):(a.rotate(s*90*Math.PI/180),a.drawImage(i,-v-g,-d-f,g,f));break;case 3:case-1:this.full?(n(u/this.scale,O/this.scale),v=v/this.scale+(g/this.scale-f/this.scale)/2,d=d/this.scale+(f/this.scale-g/this.scale)/2,a.rotate(s*90*Math.PI/180),a.drawImage(i,-d-g/this.scale,v,g/this.scale,f/this.scale)):(v=v+(g-f)/2,d=d+(f-g)/2,a.rotate(s*90*Math.PI/180),a.drawImage(i,-d-g,v,g,f));break;default:this.full?(n(u/this.scale,O/this.scale),a.drawImage(i,v/this.scale,d/this.scale,g/this.scale,f/this.scale)):a.drawImage(i,v,d,g,f)}a.restore()}else{let a=o*this.scale,l=r*this.scale,u=e.getContext("2d");switch(u.save(),this.fillColor&&(u.fillStyle=this.fillColor,u.fillRect(0,0,e.width,e.height)),s){case 0:n(a,l),u.drawImage(i,0,0,a,l);break;case 1:case-3:n(l,a),u.rotate(s*90*Math.PI/180),u.drawImage(i,0,-l,a,l);break;case 2:case-2:n(a,l),u.rotate(s*90*Math.PI/180),u.drawImage(i,-a,-l,a,l);break;case 3:case-1:n(l,a),u.rotate(s*90*Math.PI/180),u.drawImage(i,-a,0,a,l);break;default:n(a,l),u.drawImage(i,0,0,a,l)}u.restore()}t(e)};var p=this.img.substr(0,4);p!=="data"&&(i.crossOrigin="Anonymous"),i.src=this.imgs;function n(a,l){e.width=Math.round(a),e.height=Math.round(l)}},getCropData(t){this.getCropChecked(e=>{t(e.toDataURL("image/"+this.outputType,this.outputSize))})},getCropBlob(t){this.getCropChecked(e=>{e.toBlob(i=>t(i),"image/"+this.outputType,this.outputSize)})},showPreview(){if(this.isCanShow)this.isCanShow=!1,setTimeout(()=>{this.isCanShow=!0},16);else return!1;let t=this.cropW,e=this.cropH,i=this.scale;var s={};s.div={width:`${t}px`,height:`${e}px`};let o=(this.x-this.cropOffsertX)/i,r=(this.y-this.cropOffsertY)/i,h=0;s.w=t,s.h=e,s.url=this.imgs,s.img={width:`${this.trueWidth}px`,height:`${this.trueHeight}px`,transform:`scale(${i})translate3d(${o}px, ${r}px, ${h}px)rotateZ(${this.rotate*90}deg)`},s.html=`
2
+ <div class="show-preview" style="width: ${s.w}px; height: ${s.h}px,; overflow: hidden">
3
+ <div style="width: ${t}px; height: ${e}px">
4
+ <img src=${s.url} style="width: ${this.trueWidth}px; height: ${this.trueHeight}px; transform:
5
+ scale(${i})translate3d(${o}px, ${r}px, ${h}px)rotateZ(${this.rotate*90}deg)">
6
+ </div>
7
+ </div>`,this.$emit("real-time",s)},reload(){let t=new Image;t.onload=()=>{this.w=parseFloat(window.getComputedStyle(this.$refs.cropper).width),this.h=parseFloat(window.getComputedStyle(this.$refs.cropper).height),this.trueWidth=t.width,this.trueHeight=t.height,this.original?this.scale=1:this.scale=this.checkedMode(),this.$nextTick(()=>{this.x=-(this.trueWidth-this.trueWidth*this.scale)/2+(this.w-this.trueWidth*this.scale)/2,this.y=-(this.trueHeight-this.trueHeight*this.scale)/2+(this.h-this.trueHeight*this.scale)/2,this.loading=!1,this.autoCrop&&this.goAutoCrop(),this.$emit("img-load","success"),setTimeout(()=>{this.showPreview()},20)})},t.onerror=()=>{this.$emit("img-load","error")},t.src=this.imgs},checkedMode(){let t=1,e=this.trueWidth,i=this.trueHeight;const s=this.mode.split(" ");switch(s[0]){case"contain":this.trueWidth>this.w&&(t=this.w/this.trueWidth),this.trueHeight*t>this.h&&(t=this.h/this.trueHeight);break;case"cover":e=this.w,t=e/this.trueWidth,i=i*t,i<this.h&&(i=this.h,t=i/this.trueHeight);break;default:try{let o=s[0];if(o.search("px")!==-1){o=o.replace("px",""),e=parseFloat(o);const r=e/this.trueWidth;let h=1,c=s[1];c.search("px")!==-1&&(c=c.replace("px",""),i=parseFloat(c),h=i/this.trueHeight),t=Math.min(r,h)}if(o.search("%")!==-1&&(o=o.replace("%",""),e=parseFloat(o)/100*this.w,t=e/this.trueWidth),s.length===2&&o==="auto"){let r=s[1];r.search("px")!==-1&&(r=r.replace("px",""),i=parseFloat(r),t=i/this.trueHeight),r.search("%")!==-1&&(r=r.replace("%",""),i=parseFloat(r)/100*this.h,t=i/this.trueHeight)}}catch{t=1}}return t},goAutoCrop(t,e){if(this.imgs===""||this.imgs===null)return;this.clearCrop(),this.cropping=!0;let i=this.w,s=this.h;if(this.centerBox){const h=Math.abs(this.rotate)%2>0;let c=(h?this.trueHeight:this.trueWidth)*this.scale,p=(h?this.trueWidth:this.trueHeight)*this.scale;i=c<i?c:i,s=p<s?p:s}var o=t||parseFloat(this.autoCropWidth),r=e||parseFloat(this.autoCropHeight);(o===0||r===0)&&(o=i*.8,r=s*.8),o=o>i?i:o,r=r>s?s:r,this.fixed&&(r=o/this.fixedNumber[0]*this.fixedNumber[1]),r>this.h&&(r=this.h,o=r/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(o,r)},changeCrop(t,e){if(this.centerBox){let i=this.getImgAxis();t>i.x2-i.x1&&(t=i.x2-i.x1,e=t/this.fixedNumber[0]*this.fixedNumber[1]),e>i.y2-i.y1&&(e=i.y2-i.y1,t=e/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=t,this.cropH=e,this.checkCropLimitSize(),this.$nextTick(()=>{this.cropOffsertX=(this.w-this.cropW)/2,this.cropOffsertY=(this.h-this.cropH)/2,this.centerBox&&this.moveCrop(null,!0)})},refresh(){this.img,this.imgs="",this.scale=1,this.crop=!1,this.rotate=0,this.w=0,this.h=0,this.trueWidth=0,this.trueHeight=0,this.clearCrop(),this.$nextTick(()=>{this.checkedImg()})},rotateLeft(){this.rotate=this.rotate<=-3?0:this.rotate-1},rotateRight(){this.rotate=this.rotate>=3?0:this.rotate+1},rotateClear(){this.rotate=0},checkoutImgAxis(t,e,i){t=t||this.x,e=e||this.y,i=i||this.scale;let s=!0;if(this.centerBox){let o=this.getImgAxis(t,e,i),r=this.getCropAxis();o.x1>=r.x1&&(s=!1),o.x2<=r.x2&&(s=!1),o.y1>=r.y1&&(s=!1),o.y2<=r.y2&&(s=!1)}return s}},mounted(){this.support="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";let t=this;var e=navigator.userAgent;this.isIOS=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(i,s,o){for(var r=atob(this.toDataURL(s,o).split(",")[1]),h=r.length,c=new Uint8Array(h),p=0;p<h;p++)c[p]=r.charCodeAt(p);i(new Blob([c],{type:t.type||"image/png"}))}}),this.showPreview(),this.checkedImg()},unmounted(){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.cancelScale()}}),rt={key:0,class:"cropper-box"},at=["src"],ct={class:"cropper-view-box"},nt=["src"],pt={key:1};function lt(t,e,i,s,o,r){return Y(),M("div",{class:"vue-cropper",ref:"cropper",onMouseover:e[28]||(e[28]=(...h)=>t.scaleImg&&t.scaleImg(...h)),onMouseout:e[29]||(e[29]=(...h)=>t.cancelScale&&t.cancelScale(...h))},[t.imgs?(Y(),M("div",rt,[E(m("div",{class:"cropper-box-canvas",style:S({width:t.trueWidth+"px",height:t.trueHeight+"px",transform:"scale("+t.scale+","+t.scale+") translate3d("+t.x/t.scale+"px,"+t.y/t.scale+"px,0)rotateZ("+t.rotate*90+"deg)"})},[m("img",{src:t.imgs,alt:"cropper-img",ref:"cropperImg"},null,8,at)],4),[[T,!t.loading]])])):I("",!0),m("div",{class:R(["cropper-drag-box",{"cropper-move":t.move&&!t.crop,"cropper-crop":t.crop,"cropper-modal":t.cropping}]),onMousedown:e[0]||(e[0]=(...h)=>t.startMove&&t.startMove(...h)),onTouchstart:e[1]||(e[1]=(...h)=>t.startMove&&t.startMove(...h))},null,34),E(m("div",{class:"cropper-crop-box",style:S({width:t.cropW+"px",height:t.cropH+"px",transform:"translate3d("+t.cropOffsertX+"px,"+t.cropOffsertY+"px,0)"})},[m("span",ct,[m("img",{style:S({width:t.trueWidth+"px",height:t.trueHeight+"px",transform:"scale("+t.scale+","+t.scale+") translate3d("+(t.x-t.cropOffsertX)/t.scale+"px,"+(t.y-t.cropOffsertY)/t.scale+"px,0)rotateZ("+t.rotate*90+"deg)"}),src:t.imgs,alt:"cropper-img"},null,12,nt)]),m("span",{class:"cropper-face cropper-move",onMousedown:e[2]||(e[2]=(...h)=>t.cropMove&&t.cropMove(...h)),onTouchstart:e[3]||(e[3]=(...h)=>t.cropMove&&t.cropMove(...h))},null,32),t.info?(Y(),M("span",{key:0,class:"crop-info",style:S({top:t.cropInfo.top})},$(t.cropInfo.width)+" × "+$(t.cropInfo.height),5)):I("",!0),t.fixedBox?I("",!0):(Y(),M("span",pt,[m("span",{class:"crop-line line-w",onMousedown:e[4]||(e[4]=h=>t.changeCropSize(h,!1,!0,0,1)),onTouchstart:e[5]||(e[5]=h=>t.changeCropSize(h,!1,!0,0,1))},null,32),m("span",{class:"crop-line line-a",onMousedown:e[6]||(e[6]=h=>t.changeCropSize(h,!0,!1,1,0)),onTouchstart:e[7]||(e[7]=h=>t.changeCropSize(h,!0,!1,1,0))},null,32),m("span",{class:"crop-line line-s",onMousedown:e[8]||(e[8]=h=>t.changeCropSize(h,!1,!0,0,2)),onTouchstart:e[9]||(e[9]=h=>t.changeCropSize(h,!1,!0,0,2))},null,32),m("span",{class:"crop-line line-d",onMousedown:e[10]||(e[10]=h=>t.changeCropSize(h,!0,!1,2,0)),onTouchstart:e[11]||(e[11]=h=>t.changeCropSize(h,!0,!1,2,0))},null,32),m("span",{class:"crop-point point1",onMousedown:e[12]||(e[12]=h=>t.changeCropSize(h,!0,!0,1,1)),onTouchstart:e[13]||(e[13]=h=>t.changeCropSize(h,!0,!0,1,1))},null,32),m("span",{class:"crop-point point2",onMousedown:e[14]||(e[14]=h=>t.changeCropSize(h,!1,!0,0,1)),onTouchstart:e[15]||(e[15]=h=>t.changeCropSize(h,!1,!0,0,1))},null,32),m("span",{class:"crop-point point3",onMousedown:e[16]||(e[16]=h=>t.changeCropSize(h,!0,!0,2,1)),onTouchstart:e[17]||(e[17]=h=>t.changeCropSize(h,!0,!0,2,1))},null,32),m("span",{class:"crop-point point4",onMousedown:e[18]||(e[18]=h=>t.changeCropSize(h,!0,!1,1,0)),onTouchstart:e[19]||(e[19]=h=>t.changeCropSize(h,!0,!1,1,0))},null,32),m("span",{class:"crop-point point5",onMousedown:e[20]||(e[20]=h=>t.changeCropSize(h,!0,!1,2,0)),onTouchstart:e[21]||(e[21]=h=>t.changeCropSize(h,!0,!1,2,0))},null,32),m("span",{class:"crop-point point6",onMousedown:e[22]||(e[22]=h=>t.changeCropSize(h,!0,!0,1,2)),onTouchstart:e[23]||(e[23]=h=>t.changeCropSize(h,!0,!0,1,2))},null,32),m("span",{class:"crop-point point7",onMousedown:e[24]||(e[24]=h=>t.changeCropSize(h,!1,!0,0,2)),onTouchstart:e[25]||(e[25]=h=>t.changeCropSize(h,!1,!0,0,2))},null,32),m("span",{class:"crop-point point8",onMousedown:e[26]||(e[26]=h=>t.changeCropSize(h,!0,!0,2,2)),onTouchstart:e[27]||(e[27]=h=>t.changeCropSize(h,!0,!0,2,2))},null,32)]))],4),[[T,t.cropping]])],544)}const ut=ot(ht,[["render",lt],["__scopeId","data-v-69939069"]]),dt=t=>(G("data-v-eff62896"),t=t(),Z(),t),gt=["src"],ft={class:"avatar-upload-preview"},mt=["src"],vt=dt(()=>m("br",null,null,-1)),wt={__name:"userAvatar",setup(t){const e=F(),{proxy:i}=J(),s=L(!1),o=L(!1),r=L("修改头像"),h=V({img:e.avatar,autoCrop:!0,autoCropWidth:200,autoCropHeight:200,fixedBox:!0,outputType:"png",filename:"avatar",previews:{}});function c(){s.value=!0}function p(){o.value=!0}function n(){}function a(){i.$refs.cropper.rotateLeft()}function l(){i.$refs.cropper.rotateRight()}function u(d){d=d||1,i.$refs.cropper.changeScale(d)}function O(d){if(d.type.indexOf("image/")==-1)i.$modal.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。");else{const w=new FileReader;w.readAsDataURL(d),w.onload=()=>{h.img=w.result,h.filename=d.name}}}function g(){i.$refs.cropper.getCropBlob(d=>{let w=new FormData;w.append("avatarfile",d,h.filename),K(w).then(b=>{s.value=!1,h.img="/api"+b.imgUrl,e.avatar=h.img,i.$modal.msgSuccess("修改成功"),o.value=!1})})}function f(d){h.previews=d}function v(){h.img=e.avatar,h.visible=!1}return(d,w)=>{const b=H("el-col"),k=H("el-row"),_=H("Upload"),z=H("el-icon"),W=H("el-button"),B=H("el-upload"),P=H("el-dialog");return Y(),M("div",{class:"user-info-head",onClick:w[6]||(w[6]=X=>c())},[m("img",{src:y(h).img,title:"点击上传头像",class:"img-circle img-lg"},null,8,gt),C(P,{title:y(r),modelValue:y(s),"onUpdate:modelValue":w[5]||(w[5]=X=>q(s)?s.value=X:null),width:"800px","append-to-body":"",onOpened:p,onClose:v},{default:x(()=>[C(k,null,{default:x(()=>[C(b,{xs:24,md:12,style:{height:"350px"}},{default:x(()=>[y(o)?(Y(),j(y(ut),{key:0,ref:"cropper",img:y(h).img,info:!0,autoCrop:y(h).autoCrop,autoCropWidth:y(h).autoCropWidth,autoCropHeight:y(h).autoCropHeight,fixedBox:y(h).fixedBox,outputType:y(h).outputType,onRealTime:f},null,8,["img","autoCrop","autoCropWidth","autoCropHeight","fixedBox","outputType"])):I("",!0)]),_:1}),C(b,{xs:24,md:12,style:{height:"350px"}},{default:x(()=>[m("div",ft,[m("img",{src:y(h).previews.url,style:S(y(h).previews.img)},null,12,mt)])]),_:1})]),_:1}),vt,C(k,null,{default:x(()=>[C(b,{lg:2,md:2},{default:x(()=>[C(B,{action:"#","http-request":n,"show-file-list":!1,"before-upload":O},{default:x(()=>[C(W,null,{default:x(()=>[N(" 选择 "),C(z,{class:"el-icon--right"},{default:x(()=>[C(_)]),_:1})]),_:1})]),_:1})]),_:1}),C(b,{lg:{span:1,offset:2},md:2},{default:x(()=>[C(W,{icon:"Plus",onClick:w[0]||(w[0]=X=>u(1))})]),_:1}),C(b,{lg:{span:1,offset:1},md:2},{default:x(()=>[C(W,{icon:"Minus",onClick:w[1]||(w[1]=X=>u(-1))})]),_:1}),C(b,{lg:{span:1,offset:1},md:2},{default:x(()=>[C(W,{icon:"RefreshLeft",onClick:w[2]||(w[2]=X=>a())})]),_:1}),C(b,{lg:{span:1,offset:1},md:2},{default:x(()=>[C(W,{icon:"RefreshRight",onClick:w[3]||(w[3]=X=>l())})]),_:1}),C(b,{lg:{span:2,offset:6},md:2},{default:x(()=>[C(W,{type:"primary",onClick:w[4]||(w[4]=X=>g())},{default:x(()=>[N("提 交")]),_:1})]),_:1})]),_:1})]),_:1},8,["title","modelValue"])])}}},yt=D(wt,[["__scopeId","data-v-eff62896"]]);export{yt as default};
@@ -0,0 +1 @@
1
+ import{c as N}from"./user-DCGYGA9G.js";import{r as _,w as v,d as u,o as y,l as C,f as o,e as l,h as a,p as s,v as U}from"./index-BYiWbDzj.js";const q={__name:"userInfo",props:{user:{type:Object}},setup(b){const p=b,{proxy:i}=U(),e=_({}),g=_({nickName:[{required:!0,message:"用户昵称不能为空",trigger:"blur"}],email:[{required:!0,message:"邮箱地址不能为空",trigger:"blur"},{type:"email",message:"请输入正确的邮箱地址",trigger:["blur","change"]}],phonenumber:[{required:!0,message:"手机号码不能为空",trigger:"blur"},{pattern:/^1[3|4|5|6|7|8|9][0-9]\d{8}$/,message:"请输入正确的手机号码",trigger:"blur"}]});function V(){i.$refs.userRef.validate(n=>{n&&N(e.value).then(t=>{i.$modal.msgSuccess("修改成功"),p.user.phonenumber=e.value.phonenumber,p.user.email=e.value.email})})}function x(){i.$tab.closePage()}return v(()=>p.user,n=>{n&&(e.value={nickName:n.nickName,phonenumber:n.phonenumber,email:n.email,sex:n.sex})},{immediate:!0}),(n,t)=>{const d=u("el-input"),m=u("el-form-item"),f=u("el-radio"),h=u("el-radio-group"),c=u("el-button"),k=u("el-form");return y(),C(k,{ref:"userRef",model:a(e),rules:a(g),"label-width":"80px"},{default:o(()=>[l(m,{label:"用户昵称",prop:"nickName"},{default:o(()=>[l(d,{modelValue:a(e).nickName,"onUpdate:modelValue":t[0]||(t[0]=r=>a(e).nickName=r),maxlength:"30"},null,8,["modelValue"])]),_:1}),l(m,{label:"手机号码",prop:"phonenumber"},{default:o(()=>[l(d,{modelValue:a(e).phonenumber,"onUpdate:modelValue":t[1]||(t[1]=r=>a(e).phonenumber=r),maxlength:"11"},null,8,["modelValue"])]),_:1}),l(m,{label:"邮箱",prop:"email"},{default:o(()=>[l(d,{modelValue:a(e).email,"onUpdate:modelValue":t[2]||(t[2]=r=>a(e).email=r),maxlength:"50"},null,8,["modelValue"])]),_:1}),l(m,{label:"性别"},{default:o(()=>[l(h,{modelValue:a(e).sex,"onUpdate:modelValue":t[3]||(t[3]=r=>a(e).sex=r)},{default:o(()=>[l(f,{label:"0"},{default:o(()=>[s("男")]),_:1}),l(f,{label:"1"},{default:o(()=>[s("女")]),_:1})]),_:1},8,["modelValue"])]),_:1}),l(m,null,{default:o(()=>[l(c,{type:"primary",onClick:V},{default:o(()=>[s("保存")]),_:1}),l(c,{type:"danger",onClick:x},{default:o(()=>[s("关闭")]),_:1})]),_:1})]),_:1},8,["model","rules"])}}};export{q as default};
@@ -0,0 +1 @@
1
+ const e="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1569580729849'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1939'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cdefs%3e%3cstyle%20type='text/css'%3e%3c/style%3e%3c/defs%3e%3cpath%20d='M513.3%20958.5c-142.2%200-397.9-222.1-401.6-440.5V268c1.7-39.6%2031.7-72.3%2071.1-77.3%2049-4.6%2097.1-16.5%20142.7-35.3%2047.8-14%2091.9-38.3%20129.4-71.1%2030.3-24.4%2072.9-26.3%20105.3-4.6%2039.9%2030.7%2083.8%2055.9%20130.5%2074.6%2048.6%2014.7%2098.2%2025.9%20148.4%2033.7%2038.5%207.6%2067.1%2040.3%2069.5%2079.5%203.3%2084.9%202.5%20169.9-2.6%20254.7-33.7%20281.6-253.7%20436.4-392.7%20436.3z%20m-0.1-813.7c-7.2-0.2-14.3%202-20%206.4-39.7%2035.2-86.8%2061.1-137.7%2075.7-46.8%2019.2-96.2%2031-146.6%2035.2-11%203.2-18.8%2013-19.5%2024.4v230.1c3.5%20180.3%20223.3%20361%20323.9%20361s287.3-120.2%20317.6-360.5c7.3-142.7%200-228.6%200-229.6-1.3-13.3-11-24.3-24-27.3-49.6-7.7-98.6-19-146.5-33.7-46.3-19.5-89.7-45.3-129-76.7-5.8-3.8-12.7-5.5-19.5-4.9l1.3-0.1z'%20fill='%23C6CCDA'%20p-id='1940'%3e%3c/path%3e%3cpath%20d='M750.1%20428L490.7%20673.2c-11.7%2011.1-29.5%2012.9-43.1%204.2l-6.8-5.8-141.2-149.4c-9.3-9.3-12.7-22.9-9-35.5%203.8-12.6%2014.1-22.1%2027-24.8%2012.9-2.7%2026.1%201.9%2034.6%2011.9L469%20597.5l233.7-221c14.6-12.8%2036.8-11.6%2049.9%202.7%2013.2%2014.2%2011.5%2035.3-2.5%2048.8'%20fill='%23C6CCDA'%20p-id='1941'%3e%3c/path%3e%3c/svg%3e";export{e as default};
@@ -0,0 +1 @@
1
+ const c="data:image/svg+xml,%3csvg%20width='128'%20height='110'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M86.635%2033.334c1.467%200%202.917.113%204.358.283C87.078%2014.392%2067.58.111%2045.321.111%2020.44.111.055%2017.987.055%2040.687c0%2013.104%206.781%2023.863%2018.115%2032.209l-4.527%2014.352%2015.82-8.364c5.666%201.182%2010.207%202.395%2015.858%202.395%201.42%200%202.829-.073%204.227-.189-.886-3.19-1.398-6.53-1.398-9.996%200-20.845%2016.98-37.76%2038.485-37.76zm-24.34-12.936c3.407%200%205.665%202.363%205.665%205.954%200%203.576-2.258%205.97-5.666%205.97-3.392%200-6.795-2.395-6.795-5.97%200-3.591%203.403-5.954%206.795-5.954zM30.616%2032.323c-3.393%200-6.818-2.395-6.818-5.971%200-3.591%203.425-5.954%206.818-5.954%203.392%200%205.65%202.363%205.65%205.954%200%203.576-2.258%205.97-5.65%205.97z'/%3e%3cpath%20d='M127.945%2070.52c0-19.075-18.108-34.623-38.448-34.623-21.537%200-38.5%2015.548-38.5%2034.623%200%2019.108%2016.963%2034.622%2038.5%2034.622%204.508%200%209.058-1.2%2013.584-2.395l12.414%207.167-3.404-11.923c9.087-7.184%2015.854-16.712%2015.854-27.471zm-50.928-5.97c-2.254%200-4.53-2.362-4.53-4.773%200-2.378%202.276-4.771%204.53-4.771%203.422%200%205.665%202.393%205.665%204.771%200%202.41-2.243%204.773-5.665%204.773zm24.897%200c-2.24%200-4.498-2.362-4.498-4.773%200-2.378%202.258-4.771%204.498-4.771%203.392%200%205.665%202.393%205.665%204.771%200%202.41-2.273%204.773-5.665%204.773z'/%3e%3c/svg%3e";export{c as default};
@@ -0,0 +1 @@
1
+ const v="data:image/svg+xml,%3csvg%20width='128'%20height='128'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M78.527%20116.793c.178.008.348.024.527.024h40.233c4.711-.005%208.53-3.677%208.534-8.21V18.895c-.004-4.532-3.823-8.204-8.534-8.209H79.054c-.179%200-.353.016-.527.024V0L0%2010.082v107.406l78.527%2010.342v-11.037zm0-101.362c.174-.024.348-.052.527-.052h40.233c2.018%200%203.659%201.578%203.659%203.52v89.713c-.003%201.942-1.64%203.517-3.659%203.519H79.054c-.179%200-.353-.028-.527-.052V15.431zM30.262%2075.757l-18.721-.46V72.37l11.3-16.673v-.148l-10.266.164v-4.51l17.504-.44v3.264L18.696%2070.76v.144l11.566.176v4.678zm9.419.231l-5.823-.144V50.671l5.823-.144v25.461zm22.255-11.632c-2.168%201.922-5.353%202.76-9.02%202.736-.702.004-1.402-.04-2.097-.131v9.303l-5.997-.148V50.743c1.852-.352%204.473-.647%208.218-.743%203.838-.096%206.608.539%208.48%201.913%201.807%201.306%203.032%203.5%203.032%206.112s-.926%204.833-2.612%206.331h-.004zM53.36%2054.45c-.856-.01-1.71.083-2.541.275v7.682c.523.116%201.167.152%202.06.152%203.301-.004%205.36-1.614%205.36-4.314%200-2.425-1.772-3.843-4.875-3.791l-.004-.004zm39.847-37.066h9.564v3.795h-9.564v-3.795zm-9.568%205.68h9.564v3.8h-9.564v-3.8zm9.568%206.216h9.564v3.799h-9.564V29.28zm0%2012h9.564v3.794h-9.564V41.28zm-9.568-6.096h9.564v3.795h-9.564v-3.795zm9.472%2047.064c2.512%200%204.921-.96%206.697-2.67%201.776-1.708%202.773-4.026%202.772-6.442l-1.748-15.263c0-5.033-2.492-9.112-7.725-9.112-5.232%200-7.72%204.079-7.72%209.112l-1.752%2015.263c-.001%202.417.996%204.735%202.773%206.444%201.777%201.71%204.187%202.669%206.7%202.668h.003zm-3.135-16.75h6.27v12.743h-6.27V65.5z'/%3e%3c/svg%3e";export{v as default};
Binary file
@@ -0,0 +1,216 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7
+ <meta name="renderer" content="webkit">
8
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
9
+ <link rel="icon" href="./favicon.ico">
10
+ <title>若依管理系统</title>
11
+ <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
12
+ <style>
13
+ html,
14
+ body,
15
+ #app {
16
+ height: 100%;
17
+ margin: 0px;
18
+ padding: 0px;
19
+ }
20
+
21
+ .chromeframe {
22
+ margin: 0.2em 0;
23
+ background: #ccc;
24
+ color: #000;
25
+ padding: 0.2em 0;
26
+ }
27
+
28
+ #loader-wrapper {
29
+ position: fixed;
30
+ top: 0;
31
+ left: 0;
32
+ width: 100%;
33
+ height: 100%;
34
+ z-index: 999999;
35
+ }
36
+
37
+ #loader {
38
+ display: block;
39
+ position: relative;
40
+ left: 50%;
41
+ top: 50%;
42
+ width: 150px;
43
+ height: 150px;
44
+ margin: -75px 0 0 -75px;
45
+ border-radius: 50%;
46
+ border: 3px solid transparent;
47
+ border-top-color: #FFF;
48
+ -webkit-animation: spin 2s linear infinite;
49
+ -ms-animation: spin 2s linear infinite;
50
+ -moz-animation: spin 2s linear infinite;
51
+ -o-animation: spin 2s linear infinite;
52
+ animation: spin 2s linear infinite;
53
+ z-index: 1001;
54
+ }
55
+
56
+ #loader:before {
57
+ content: "";
58
+ position: absolute;
59
+ top: 5px;
60
+ left: 5px;
61
+ right: 5px;
62
+ bottom: 5px;
63
+ border-radius: 50%;
64
+ border: 3px solid transparent;
65
+ border-top-color: #FFF;
66
+ -webkit-animation: spin 3s linear infinite;
67
+ -moz-animation: spin 3s linear infinite;
68
+ -o-animation: spin 3s linear infinite;
69
+ -ms-animation: spin 3s linear infinite;
70
+ animation: spin 3s linear infinite;
71
+ }
72
+
73
+ #loader:after {
74
+ content: "";
75
+ position: absolute;
76
+ top: 15px;
77
+ left: 15px;
78
+ right: 15px;
79
+ bottom: 15px;
80
+ border-radius: 50%;
81
+ border: 3px solid transparent;
82
+ border-top-color: #FFF;
83
+ -moz-animation: spin 1.5s linear infinite;
84
+ -o-animation: spin 1.5s linear infinite;
85
+ -ms-animation: spin 1.5s linear infinite;
86
+ -webkit-animation: spin 1.5s linear infinite;
87
+ animation: spin 1.5s linear infinite;
88
+ }
89
+
90
+
91
+ @-webkit-keyframes spin {
92
+ 0% {
93
+ -webkit-transform: rotate(0deg);
94
+ -ms-transform: rotate(0deg);
95
+ transform: rotate(0deg);
96
+ }
97
+
98
+ 100% {
99
+ -webkit-transform: rotate(360deg);
100
+ -ms-transform: rotate(360deg);
101
+ transform: rotate(360deg);
102
+ }
103
+ }
104
+
105
+ @keyframes spin {
106
+ 0% {
107
+ -webkit-transform: rotate(0deg);
108
+ -ms-transform: rotate(0deg);
109
+ transform: rotate(0deg);
110
+ }
111
+
112
+ 100% {
113
+ -webkit-transform: rotate(360deg);
114
+ -ms-transform: rotate(360deg);
115
+ transform: rotate(360deg);
116
+ }
117
+ }
118
+
119
+
120
+ #loader-wrapper .loader-section {
121
+ position: fixed;
122
+ top: 0;
123
+ width: 51%;
124
+ height: 100%;
125
+ background: #7171C6;
126
+ z-index: 1000;
127
+ -webkit-transform: translateX(0);
128
+ -ms-transform: translateX(0);
129
+ transform: translateX(0);
130
+ }
131
+
132
+ #loader-wrapper .loader-section.section-left {
133
+ left: 0;
134
+ }
135
+
136
+ #loader-wrapper .loader-section.section-right {
137
+ right: 0;
138
+ }
139
+
140
+
141
+ .loaded #loader-wrapper .loader-section.section-left {
142
+ -webkit-transform: translateX(-100%);
143
+ -ms-transform: translateX(-100%);
144
+ transform: translateX(-100%);
145
+ -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
146
+ transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
147
+ }
148
+
149
+ .loaded #loader-wrapper .loader-section.section-right {
150
+ -webkit-transform: translateX(100%);
151
+ -ms-transform: translateX(100%);
152
+ transform: translateX(100%);
153
+ -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
154
+ transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
155
+ }
156
+
157
+ .loaded #loader {
158
+ opacity: 0;
159
+ -webkit-transition: all 0.3s ease-out;
160
+ transition: all 0.3s ease-out;
161
+ }
162
+
163
+ .loaded #loader-wrapper {
164
+ visibility: hidden;
165
+ -webkit-transform: translateY(-100%);
166
+ -ms-transform: translateY(-100%);
167
+ transform: translateY(-100%);
168
+ -webkit-transition: all 0.3s 1s ease-out;
169
+ transition: all 0.3s 1s ease-out;
170
+ }
171
+
172
+ .no-js #loader-wrapper {
173
+ display: none;
174
+ }
175
+
176
+ .no-js h1 {
177
+ color: #222222;
178
+ }
179
+
180
+ #loader-wrapper .load_title {
181
+ font-family: 'Open Sans';
182
+ color: #FFF;
183
+ font-size: 19px;
184
+ width: 100%;
185
+ text-align: center;
186
+ z-index: 9999999999999;
187
+ position: absolute;
188
+ top: 60%;
189
+ opacity: 1;
190
+ line-height: 30px;
191
+ }
192
+
193
+ #loader-wrapper .load_title span {
194
+ font-weight: normal;
195
+ font-style: italic;
196
+ font-size: 13px;
197
+ color: #FFF;
198
+ opacity: 0.5;
199
+ }
200
+ </style>
201
+ <script type="module" crossorigin src="./assets/index-BYiWbDzj.js"></script>
202
+ <link rel="stylesheet" crossorigin href="./assets/index-1Gtzb1EG.css">
203
+ </head>
204
+
205
+ <body>
206
+ <div id="app">
207
+ <div id="loader-wrapper">
208
+ <div id="loader"></div>
209
+ <div class="loader-section section-left"></div>
210
+ <div class="loader-section section-right"></div>
211
+ <div class="load_title">正在加载系统资源,请耐心等待</div>
212
+ </div>
213
+ </div>
214
+ </body>
215
+
216
+ </html>
Binary file
File without changes
@@ -0,0 +1,102 @@
1
+ import {page, Pools} from "../common/tools.mjs";
2
+ import store, {getStruct} from "./store/index.mjs";
3
+ import {cloneObjByKey} from "@k3000/store/architect.mjs";
4
+
5
+ const map = new Pools()
6
+
7
+ map.set('/genericFilter', data => {
8
+
9
+ const {name, key, value} = data
10
+
11
+ // console.log(name, key, value)
12
+
13
+ return store[name].filter(m => m[key] == value)
14
+ })
15
+
16
+ map.set('/genericFind', data => {
17
+
18
+ const {name, key, value} = data
19
+
20
+ // console.log(name, key, value)
21
+
22
+ const result = store[name].find(m => m[key] == value)
23
+
24
+ if (result) return result
25
+
26
+ return Promise.reject()
27
+ })
28
+
29
+ map.set('/genericRemove', data => {
30
+
31
+ const {name, key, values} = data
32
+
33
+ for (const value of values.split(',')) {
34
+
35
+ store[name].remove(store[name].find(m => m[key] == value))
36
+ }
37
+ })
38
+
39
+ map.set('/genericRemove2', data => {
40
+
41
+ const {name, key, values} = data
42
+
43
+ for (const value of values.split(',')) {
44
+
45
+ store[name].remove(...store[name].filter(m => m[key] == value))
46
+ }
47
+ })
48
+
49
+ map.set('/genericClean', name => {
50
+
51
+ store[name].remove(store[name])
52
+ })
53
+
54
+ map.set('/genericChangeStatus', data => {
55
+
56
+ const {name, key, value, status} = data
57
+
58
+ return store[name].filter(m => m[key] === value).forEach(m => m.status = status)
59
+ })
60
+
61
+ map.set('/genericPush', data => {
62
+
63
+ const {name, body} = data
64
+
65
+ store[name].push(body)
66
+ })
67
+
68
+ map.set('/genericUpdate', data => {
69
+
70
+ const {name, key, body} = data
71
+
72
+ const m = store[name].find(m => m[key] == body[key])
73
+
74
+ if (m === undefined) return Promise.reject()
75
+
76
+ for (const [key, value] of Object.entries(body)) {
77
+
78
+ if (!Reflect.has(m, key)) continue
79
+
80
+ Reflect.set(m, key, value)
81
+ }
82
+ })
83
+
84
+ map.set('/genericPage', data => {
85
+
86
+ const {name, timeKey, query, all} = data
87
+
88
+ return page(store[name], query, timeKey, all)
89
+ })
90
+
91
+ map.set('/genericTable', data => {
92
+
93
+ const {name, keys = []} = data
94
+
95
+ if (keys.length === 0) return store[name]
96
+
97
+ return store[name].map(m => cloneObjByKey(m, ...keys))
98
+ })
99
+
100
+ map.set('/getStruct', _ => getStruct())
101
+
102
+ export default map
@@ -0,0 +1,30 @@
1
+ import createServer from 'tools2/server.mjs'
2
+ import {store1Port as port} from "../common/config.mjs";
3
+ import store from "./store/index.mjs";
4
+ import {Pools} from "../common/tools.mjs";
5
+
6
+ const map = new Pools()
7
+
8
+ createServer({port, map})
9
+
10
+ map.set('/getSetList', data => Object.keys(store).join(','))
11
+
12
+ map.set('/checkJWT', data => {
13
+
14
+ return store.sysUser.find(user => user.userId === data.userId && user.jti === data.jti)
15
+ ? '' : Promise.reject({msg: '登录失效'})
16
+ })
17
+
18
+ map.set('/log', data => store.sysOperLog.push(data))
19
+
20
+ map.set('/log2', data => store.sysLogininfor.push(data))
21
+
22
+ map
23
+ .append(import('./generic.mjs'))
24
+ .append(import('./user.mjs'))
25
+ .append(import('./system.mjs'))
26
+ .append(import('./role.mjs'))
27
+ .append(import('./monitor.mjs'))
28
+ .append(import('./tool.mjs'))
29
+
30
+ console.log('running on ' + port)
@@ -0,0 +1,13 @@
1
+ import {Pools} from "../common/tools.mjs";
2
+ import store from "./store/index.mjs";
3
+
4
+ const map = new Pools()
5
+
6
+ map.set('/LogininforUnlock', usn => {
7
+
8
+ usn = usn.toString()
9
+
10
+ store.sysUser.filter(user => user.userName === usn).forEach(user => user.status = '0')
11
+ })
12
+
13
+ export default map
@@ -0,0 +1,137 @@
1
+ import {buildDeptTree, colIncludes, Pools, rowSlice, update} from "../common/tools.mjs";
2
+ import store from "./store/index.mjs";
3
+
4
+ const map = new Pools()
5
+
6
+ map.set('/addRole', data => {
7
+
8
+ let role = store.sysRole.find(role => role.roleKey === data.roleKey && role.delFlag === '0')
9
+
10
+ if (role) return Promise.reject('权限字符已存在')
11
+
12
+ store.sysRole.push(data)
13
+
14
+ role = store.sysRole.find(role => role.roleKey === data.roleKey && role.delFlag === '0')
15
+
16
+ for (const mid of data.menuIds) {
17
+
18
+ store.sysRoleMenu.push({
19
+ roleId: role.roleId,
20
+ menuId: mid,
21
+ })
22
+ }
23
+ })
24
+
25
+ map.set('/updateRole', data => {
26
+
27
+ const role = store.sysRole.find(role => role.roleId === data.roleId && role.delFlag === '0')
28
+
29
+ if (role === undefined) return Promise.reject('角色不存在,请刷新数据')
30
+
31
+ update(role, data)
32
+
33
+ store.sysRoleMenu.remove(...store.sysRoleMenu.filter(r => r.roleId === role.roleId))
34
+
35
+ for (const mid of data.menuIds) {
36
+
37
+ store.sysRoleMenu.push({
38
+ roleId: role.roleId,
39
+ menuId: mid,
40
+ })
41
+ }
42
+ })
43
+
44
+ map.set('/deleteRole', list => {
45
+
46
+ for (const id of list) {
47
+
48
+ store.sysRole.filter(role => role.roleId == id)
49
+ .forEach(role => role.delFlag = '1')
50
+ }
51
+ })
52
+
53
+ map.set('/changeRoleStatus', data => {
54
+
55
+ store.sysRole.filter(role => role.roleId === data.roleId).forEach(role => role.status = data.status)
56
+ })
57
+
58
+ map.set('/getRoleDataScope', data => {
59
+
60
+ store.sysRole.filter(role => role.roleId === data.roleId).forEach(role => role.dataScope = data.dataScope)
61
+
62
+ store.sysRoleDept.remove(...store.sysRoleDept.filter(roleDept => roleDept.roleId === data.roleId))
63
+
64
+ for (const deptId of data.deptIds) {
65
+
66
+ store.sysRoleDept.push({
67
+ roleId: data.roleId,
68
+ deptId,
69
+ })
70
+ }
71
+ })
72
+
73
+ map.set('/roleAuthUserAllocatedList', data => {
74
+
75
+ const rows = store.sysUser.eachFlat(store.sysDept, 'deptId')
76
+ .eachFlat(store.sysUserRole, 'userId').eachFlat(store.sysRole, 'roleId')
77
+ .filter(item => item.delFlag === '0' && item.roleId == data.roleId
78
+ && colIncludes(data.userName, item.userName)
79
+ && colIncludes(data.phonenumber, item.phonenumber))
80
+
81
+ return {
82
+ code: 200,
83
+ rows: rowSlice(rows, data),
84
+ total: rows.length
85
+ }
86
+ })
87
+
88
+ map.set('/roleAuthUserUnallocatedList', data => {
89
+
90
+ const rows = store.sysUser.filter(item => item.delFlag === '0')
91
+ .eachFlat(store.sysDept.filter(item => item.delFlag === '0'), 'deptId')
92
+ .eachFlat(store.sysUserRole, 'userId').eachFlat(store.sysRole.filter(item => item.delFlag === '0'), 'roleId')
93
+ .filter(item => item.delFlag === '0'
94
+ && (!item.roleId || item.roleId != data.roleId)
95
+ && !store.sysUser.filterFlat(store.sysUserRole, (u, ur) => u.userId === ur.userId
96
+ && ur.roleId === data.roleId).some(u => u.userId === item.userId)
97
+ && colIncludes(data.userName, item.userName)
98
+ && colIncludes(data.phonenumber, item.phonenumber))
99
+
100
+ return {
101
+ code: 200,
102
+ rows: rowSlice(rows, data),
103
+ total: rows.length
104
+ }
105
+ })
106
+
107
+ map.set('/roleAuthUserSelectAll', data => {
108
+
109
+ const roleId = data.roleId
110
+
111
+ for (const userId of data.userIds.split(',')) {
112
+
113
+ if (store.sysUserRole.some(ur => ur.userId == userId && ur.roleId == roleId)) continue
114
+
115
+ store.sysUserRole.push({userId, roleId})
116
+ }
117
+
118
+ return {code: 200, msg: '设置成功'}
119
+ })
120
+
121
+ map.set('/roleAuthUserCancel', data => {
122
+
123
+ const id = Number.parseInt(data.roleId)
124
+ const ids = data.userIds.split(',').map(id => Number.parseInt(id))
125
+
126
+ store.sysUserRole.remove(...store.sysUserRole.filter(ur => ur.roleId === id && ids.includes(ur.userId)))
127
+ })
128
+
129
+ map.set('/getRoleDeptTree', id => {
130
+
131
+ return {
132
+ checkedKeys: store.sysRoleDept.filter(roleDept => roleDept.roleId == id).map(roleDept => roleDept.deptId),
133
+ depts: buildDeptTree(store.sysDept)
134
+ }
135
+ })
136
+
137
+ export default map
File without changes
Binary file
@@ -0,0 +1,15 @@
1
+
2
+ import {Storage, Store} from '@k3000/store/architect.mjs'
3
+ import {struct} from '@k3000/store'
4
+
5
+ const storage = new Storage(import.meta.url)
6
+
7
+ export const remark = Symbol('remark')
8
+
9
+ export const close = () => storage.close()
10
+
11
+ export const getStruct = () => struct(storage, remark)
12
+
13
+ export default new class extends Store {
14
+
15
+ }
@@ -0,0 +1 @@
1
+ 新版本内容
@@ -0,0 +1 @@
1
+ 维护内容
Binary file