eoss-ui 0.3.97

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 (378) hide show
  1. package/CHANGELOG.md +929 -0
  2. package/README.md +30 -0
  3. package/lib/button-group.js +2857 -0
  4. package/lib/button.js +2884 -0
  5. package/lib/card.js +603 -0
  6. package/lib/cascader.js +373 -0
  7. package/lib/checkbox-group.js +3099 -0
  8. package/lib/clients.js +375 -0
  9. package/lib/config/api.js +205 -0
  10. package/lib/data-table-form.js +3848 -0
  11. package/lib/data-table.js +6315 -0
  12. package/lib/date-picker.js +2821 -0
  13. package/lib/dialog.js +3730 -0
  14. package/lib/enterprise.js +372 -0
  15. package/lib/eoss-ui.common.js +65365 -0
  16. package/lib/error-page.js +293 -0
  17. package/lib/flow-group.js +4200 -0
  18. package/lib/flow-list.js +4350 -0
  19. package/lib/flow.js +12893 -0
  20. package/lib/form.js +15635 -0
  21. package/lib/handle-user.js +2900 -0
  22. package/lib/handler.js +3118 -0
  23. package/lib/index.js +1 -0
  24. package/lib/input-number.js +2743 -0
  25. package/lib/input.js +2935 -0
  26. package/lib/label.js +411 -0
  27. package/lib/login.js +5048 -0
  28. package/lib/main.js +5816 -0
  29. package/lib/mainComp.js +6530 -0
  30. package/lib/menu.js +529 -0
  31. package/lib/nav.js +3048 -0
  32. package/lib/notify.js +1079 -0
  33. package/lib/page.js +3036 -0
  34. package/lib/pagination.js +354 -0
  35. package/lib/player.js +2904 -0
  36. package/lib/qr-code.js +2860 -0
  37. package/lib/radio-group.js +3091 -0
  38. package/lib/select-ganged.js +3242 -0
  39. package/lib/select.js +3295 -0
  40. package/lib/selector-panel.js +4425 -0
  41. package/lib/selector.js +3722 -0
  42. package/lib/sizer.js +3067 -0
  43. package/lib/steps.js +2943 -0
  44. package/lib/switch.js +2784 -0
  45. package/lib/table-form.js +6211 -0
  46. package/lib/tabs-panel.js +274 -0
  47. package/lib/tabs.js +4988 -0
  48. package/lib/theme-chalk/base.css +1 -0
  49. package/lib/theme-chalk/button-group.css +1 -0
  50. package/lib/theme-chalk/button.css +0 -0
  51. package/lib/theme-chalk/card.css +1 -0
  52. package/lib/theme-chalk/cascader.css +0 -0
  53. package/lib/theme-chalk/checkbox-group.css +1 -0
  54. package/lib/theme-chalk/clients.css +1 -0
  55. package/lib/theme-chalk/data-table-form.css +1 -0
  56. package/lib/theme-chalk/data-table.css +1 -0
  57. package/lib/theme-chalk/date-picker.css +1 -0
  58. package/lib/theme-chalk/dialog.css +1 -0
  59. package/lib/theme-chalk/enterprise.css +1 -0
  60. package/lib/theme-chalk/error-page.css +1 -0
  61. package/lib/theme-chalk/flow-chart.css +0 -0
  62. package/lib/theme-chalk/flow-group.css +1 -0
  63. package/lib/theme-chalk/flow-list.css +1 -0
  64. package/lib/theme-chalk/flow.css +1 -0
  65. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  66. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  67. package/lib/theme-chalk/form.css +1 -0
  68. package/lib/theme-chalk/handle-user.css +1 -0
  69. package/lib/theme-chalk/handler.css +1 -0
  70. package/lib/theme-chalk/icon.css +1 -0
  71. package/lib/theme-chalk/index.css +1 -0
  72. package/lib/theme-chalk/input-number.css +0 -0
  73. package/lib/theme-chalk/input.css +1 -0
  74. package/lib/theme-chalk/label.css +1 -0
  75. package/lib/theme-chalk/login.css +1 -0
  76. package/lib/theme-chalk/main.css +1 -0
  77. package/lib/theme-chalk/mainComp.css +0 -0
  78. package/lib/theme-chalk/menu.css +1 -0
  79. package/lib/theme-chalk/nav.css +1 -0
  80. package/lib/theme-chalk/notify.css +0 -0
  81. package/lib/theme-chalk/page.css +1 -0
  82. package/lib/theme-chalk/pagination.css +1 -0
  83. package/lib/theme-chalk/player.css +1 -0
  84. package/lib/theme-chalk/qr-code.css +1 -0
  85. package/lib/theme-chalk/radio-group.css +1 -0
  86. package/lib/theme-chalk/radio.css +1 -0
  87. package/lib/theme-chalk/select-ganged.css +1 -0
  88. package/lib/theme-chalk/select.css +0 -0
  89. package/lib/theme-chalk/selector-panel.css +1 -0
  90. package/lib/theme-chalk/selector.css +1 -0
  91. package/lib/theme-chalk/sizer.css +1 -0
  92. package/lib/theme-chalk/steps.css +1 -0
  93. package/lib/theme-chalk/switch.css +1 -0
  94. package/lib/theme-chalk/table-form.css +0 -0
  95. package/lib/theme-chalk/tabs-panel.css +0 -0
  96. package/lib/theme-chalk/tabs.css +1 -0
  97. package/lib/theme-chalk/tips.css +1 -0
  98. package/lib/theme-chalk/toolbar.css +1 -0
  99. package/lib/theme-chalk/tree-group.css +1 -0
  100. package/lib/theme-chalk/tree.css +1 -0
  101. package/lib/theme-chalk/upload.css +1 -0
  102. package/lib/theme-chalk/wujie.css +0 -0
  103. package/lib/theme-chalk/wxlogin.css +1 -0
  104. package/lib/tips.js +2830 -0
  105. package/lib/toolbar.js +531 -0
  106. package/lib/tree-group.js +3373 -0
  107. package/lib/tree.js +3482 -0
  108. package/lib/upload.js +3913 -0
  109. package/lib/utils/bus.js +9 -0
  110. package/lib/utils/date-util.js +318 -0
  111. package/lib/utils/http.js +58 -0
  112. package/lib/utils/rules.js +19 -0
  113. package/lib/utils/store.js +22 -0
  114. package/lib/utils/util.js +2056 -0
  115. package/lib/wujie.js +2845 -0
  116. package/lib/wxlogin.js +2799 -0
  117. package/package.json +151 -0
  118. package/packages/button/index.js +5 -0
  119. package/packages/button/src/main.vue +264 -0
  120. package/packages/button-group/index.js +5 -0
  121. package/packages/button-group/src/main.vue +130 -0
  122. package/packages/card/index.js +5 -0
  123. package/packages/card/src/main.vue +144 -0
  124. package/packages/cascader/index.js +5 -0
  125. package/packages/cascader/src/main.vue +144 -0
  126. package/packages/checkbox-group/index.js +5 -0
  127. package/packages/checkbox-group/src/main.vue +285 -0
  128. package/packages/clients/index.js +5 -0
  129. package/packages/clients/src/main.vue +50 -0
  130. package/packages/data-table/index.js +5 -0
  131. package/packages/data-table/src/children.vue +40 -0
  132. package/packages/data-table/src/column.vue +796 -0
  133. package/packages/data-table/src/main copy.vue +1383 -0
  134. package/packages/data-table/src/main.vue +1229 -0
  135. package/packages/data-table/src/mixins/table.js +12 -0
  136. package/packages/data-table/src/sizer.vue +160 -0
  137. package/packages/data-table-form/index.js +5 -0
  138. package/packages/data-table-form/src/colgroup.vue +17 -0
  139. package/packages/data-table-form/src/main.vue +167 -0
  140. package/packages/data-table-form/src/table.vue +192 -0
  141. package/packages/data-table-form/src/tbody.vue +219 -0
  142. package/packages/data-table-form/src/thead.vue +68 -0
  143. package/packages/date-picker/index.js +5 -0
  144. package/packages/date-picker/src/main.vue +185 -0
  145. package/packages/dialog/index.js +5 -0
  146. package/packages/dialog/src/main.vue +442 -0
  147. package/packages/enterprise/index.js +5 -0
  148. package/packages/enterprise/src/main.vue +66 -0
  149. package/packages/error-page/index.js +5 -0
  150. package/packages/error-page/src/main.vue +44 -0
  151. package/packages/flow/index.js +5 -0
  152. package/packages/flow/src/component/CommonOpinions.vue +290 -0
  153. package/packages/flow/src/component/CustomPreset.vue +311 -0
  154. package/packages/flow/src/component/FileList.vue +97 -0
  155. package/packages/flow/src/component/Preset.vue +253 -0
  156. package/packages/flow/src/component/SendMsg.vue +221 -0
  157. package/packages/flow/src/component/TimeLimit.vue +190 -0
  158. package/packages/flow/src/component/taskUnionExamine.vue +507 -0
  159. package/packages/flow/src/form.vue +120 -0
  160. package/packages/flow/src/main.vue +2107 -0
  161. package/packages/flow/src/processForm.vue +866 -0
  162. package/packages/flow/src/processReject.vue +262 -0
  163. package/packages/flow/src/selectUser.vue +425 -0
  164. package/packages/flow/src/startTaskRead.vue +556 -0
  165. package/packages/flow/src/table.vue +51 -0
  166. package/packages/flow-group/index.js +5 -0
  167. package/packages/flow-group/src/main.vue +540 -0
  168. package/packages/flow-list/index.js +5 -0
  169. package/packages/flow-list/src/flow-table.vue +445 -0
  170. package/packages/flow-list/src/main.vue +456 -0
  171. package/packages/form/index.js +5 -0
  172. package/packages/form/src/main.vue +4429 -0
  173. package/packages/form/src/table.vue +1196 -0
  174. package/packages/handle-user/index.js +5 -0
  175. package/packages/handle-user/src/main.vue +122 -0
  176. package/packages/handler/index.js +5 -0
  177. package/packages/handler/src/main.vue +306 -0
  178. package/packages/input/index.js +5 -0
  179. package/packages/input/src/main.vue +307 -0
  180. package/packages/input-number/index.js +5 -0
  181. package/packages/input-number/src/main.vue +106 -0
  182. package/packages/label/index.js +5 -0
  183. package/packages/label/src/main.vue +208 -0
  184. package/packages/login/index.js +5 -0
  185. package/packages/login/src/main.vue +1193 -0
  186. package/packages/login/src/resetPassword.vue +332 -0
  187. package/packages/main/index.js +5 -0
  188. package/packages/main/src/main.vue +1496 -0
  189. package/packages/main/src/message.vue +239 -0
  190. package/packages/main/src/notice.vue +145 -0
  191. package/packages/main/src/settings.vue +105 -0
  192. package/packages/main/src/userinfo.vue +430 -0
  193. package/packages/mainComp/index.js +5 -0
  194. package/packages/mainComp/src/async-component/index.vue +85 -0
  195. package/packages/mainComp/src/main.vue +1934 -0
  196. package/packages/mainComp/src/message.vue +239 -0
  197. package/packages/mainComp/src/notice.vue +152 -0
  198. package/packages/mainComp/src/settings.vue +105 -0
  199. package/packages/mainComp/src/userinfo.vue +423 -0
  200. package/packages/menu/index.js +5 -0
  201. package/packages/menu/src/main.vue +401 -0
  202. package/packages/nav/index.js +5 -0
  203. package/packages/nav/src/main.vue +250 -0
  204. package/packages/notify/index.js +5 -0
  205. package/packages/notify/src/main.vue +538 -0
  206. package/packages/page/index.js +5 -0
  207. package/packages/page/src/main.vue +167 -0
  208. package/packages/pagination/index.js +5 -0
  209. package/packages/pagination/src/main.vue +77 -0
  210. package/packages/player/index.js +5 -0
  211. package/packages/player/src/main.vue +194 -0
  212. package/packages/qr-code/index.js +5 -0
  213. package/packages/qr-code/src/main.vue +154 -0
  214. package/packages/radio/index.js +5 -0
  215. package/packages/radio/src/main.vue +259 -0
  216. package/packages/radio-group/index.js +6 -0
  217. package/packages/radio-group/src/main.vue +267 -0
  218. package/packages/select/index.js +5 -0
  219. package/packages/select/src/main.vue +683 -0
  220. package/packages/select-ganged/index.js +5 -0
  221. package/packages/select-ganged/src/main.vue +686 -0
  222. package/packages/selector/index.js +5 -0
  223. package/packages/selector/src/main.vue +588 -0
  224. package/packages/selector-panel/index.js +5 -0
  225. package/packages/selector-panel/src/main.vue +968 -0
  226. package/packages/selector-panel/src/selection.vue +142 -0
  227. package/packages/selector-panel/src/tree.vue +129 -0
  228. package/packages/sizer/index.js +5 -0
  229. package/packages/sizer/src/main.vue +254 -0
  230. package/packages/steps/index.js +5 -0
  231. package/packages/steps/src/main.vue +175 -0
  232. package/packages/switch/index.js +5 -0
  233. package/packages/switch/src/main.vue +154 -0
  234. package/packages/table-form/index.js +5 -0
  235. package/packages/tabs/index.js +5 -0
  236. package/packages/tabs/src/main.vue +749 -0
  237. package/packages/tabs-panel/index.js +5 -0
  238. package/packages/tabs-panel/src/main.vue +18 -0
  239. package/packages/theme-chalk/README.md +33 -0
  240. package/packages/theme-chalk/lib/base.css +1 -0
  241. package/packages/theme-chalk/lib/button-group.css +1 -0
  242. package/packages/theme-chalk/lib/button.css +0 -0
  243. package/packages/theme-chalk/lib/card.css +1 -0
  244. package/packages/theme-chalk/lib/cascader.css +0 -0
  245. package/packages/theme-chalk/lib/checkbox-group.css +1 -0
  246. package/packages/theme-chalk/lib/clients.css +1 -0
  247. package/packages/theme-chalk/lib/data-table-form.css +1 -0
  248. package/packages/theme-chalk/lib/data-table.css +1 -0
  249. package/packages/theme-chalk/lib/date-picker.css +1 -0
  250. package/packages/theme-chalk/lib/dialog.css +1 -0
  251. package/packages/theme-chalk/lib/enterprise.css +1 -0
  252. package/packages/theme-chalk/lib/error-page.css +1 -0
  253. package/packages/theme-chalk/lib/flow-chart.css +0 -0
  254. package/packages/theme-chalk/lib/flow-group.css +1 -0
  255. package/packages/theme-chalk/lib/flow-list.css +1 -0
  256. package/packages/theme-chalk/lib/flow.css +1 -0
  257. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  258. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  259. package/packages/theme-chalk/lib/form.css +1 -0
  260. package/packages/theme-chalk/lib/handle-user.css +1 -0
  261. package/packages/theme-chalk/lib/handler.css +1 -0
  262. package/packages/theme-chalk/lib/icon.css +1 -0
  263. package/packages/theme-chalk/lib/index.css +1 -0
  264. package/packages/theme-chalk/lib/input-number.css +0 -0
  265. package/packages/theme-chalk/lib/input.css +1 -0
  266. package/packages/theme-chalk/lib/label.css +1 -0
  267. package/packages/theme-chalk/lib/login.css +1 -0
  268. package/packages/theme-chalk/lib/main.css +1 -0
  269. package/packages/theme-chalk/lib/mainComp.css +0 -0
  270. package/packages/theme-chalk/lib/menu.css +1 -0
  271. package/packages/theme-chalk/lib/nav.css +1 -0
  272. package/packages/theme-chalk/lib/notify.css +0 -0
  273. package/packages/theme-chalk/lib/page.css +1 -0
  274. package/packages/theme-chalk/lib/pagination.css +1 -0
  275. package/packages/theme-chalk/lib/player.css +1 -0
  276. package/packages/theme-chalk/lib/qr-code.css +1 -0
  277. package/packages/theme-chalk/lib/radio-group.css +1 -0
  278. package/packages/theme-chalk/lib/radio.css +1 -0
  279. package/packages/theme-chalk/lib/select-ganged.css +1 -0
  280. package/packages/theme-chalk/lib/select.css +0 -0
  281. package/packages/theme-chalk/lib/selector-panel.css +1 -0
  282. package/packages/theme-chalk/lib/selector.css +1 -0
  283. package/packages/theme-chalk/lib/sizer.css +1 -0
  284. package/packages/theme-chalk/lib/steps.css +1 -0
  285. package/packages/theme-chalk/lib/switch.css +1 -0
  286. package/packages/theme-chalk/lib/table-form.css +0 -0
  287. package/packages/theme-chalk/lib/tabs-panel.css +0 -0
  288. package/packages/theme-chalk/lib/tabs.css +1 -0
  289. package/packages/theme-chalk/lib/tips.css +1 -0
  290. package/packages/theme-chalk/lib/toolbar.css +1 -0
  291. package/packages/theme-chalk/lib/tree-group.css +1 -0
  292. package/packages/theme-chalk/lib/tree.css +1 -0
  293. package/packages/theme-chalk/lib/upload.css +1 -0
  294. package/packages/theme-chalk/lib/wujie.css +0 -0
  295. package/packages/theme-chalk/lib/wxlogin.css +1 -0
  296. package/packages/theme-chalk/package.json +35 -0
  297. package/packages/theme-chalk/src/base.scss +165 -0
  298. package/packages/theme-chalk/src/button-group.scss +9 -0
  299. package/packages/theme-chalk/src/button.scss +0 -0
  300. package/packages/theme-chalk/src/card.scss +55 -0
  301. package/packages/theme-chalk/src/cascader.scss +0 -0
  302. package/packages/theme-chalk/src/checkbox-group.scss +8 -0
  303. package/packages/theme-chalk/src/clients.scss +72 -0
  304. package/packages/theme-chalk/src/common/var.scss +1516 -0
  305. package/packages/theme-chalk/src/data-table-form.scss +55 -0
  306. package/packages/theme-chalk/src/data-table.scss +202 -0
  307. package/packages/theme-chalk/src/date-picker.scss +8 -0
  308. package/packages/theme-chalk/src/dialog.scss +52 -0
  309. package/packages/theme-chalk/src/enterprise.scss +5 -0
  310. package/packages/theme-chalk/src/error-page.scss +18 -0
  311. package/packages/theme-chalk/src/flow-chart.scss +0 -0
  312. package/packages/theme-chalk/src/flow-group.scss +101 -0
  313. package/packages/theme-chalk/src/flow-list.scss +41 -0
  314. package/packages/theme-chalk/src/flow.scss +285 -0
  315. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  316. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  317. package/packages/theme-chalk/src/form.scss +451 -0
  318. package/packages/theme-chalk/src/handle-user.scss +40 -0
  319. package/packages/theme-chalk/src/handler.scss +131 -0
  320. package/packages/theme-chalk/src/icon.scss +1714 -0
  321. package/packages/theme-chalk/src/index.scss +50 -0
  322. package/packages/theme-chalk/src/input-number.scss +0 -0
  323. package/packages/theme-chalk/src/input.scss +3 -0
  324. package/packages/theme-chalk/src/label.scss +24 -0
  325. package/packages/theme-chalk/src/login.scss +490 -0
  326. package/packages/theme-chalk/src/main.scss +483 -0
  327. package/packages/theme-chalk/src/mainComp.scss +0 -0
  328. package/packages/theme-chalk/src/menu.scss +201 -0
  329. package/packages/theme-chalk/src/mixins/color.scss +117 -0
  330. package/packages/theme-chalk/src/mixins/mixins.scss +25 -0
  331. package/packages/theme-chalk/src/nav.scss +73 -0
  332. package/packages/theme-chalk/src/notify.scss +0 -0
  333. package/packages/theme-chalk/src/page.scss +3 -0
  334. package/packages/theme-chalk/src/pagination.scss +14 -0
  335. package/packages/theme-chalk/src/player.scss +9 -0
  336. package/packages/theme-chalk/src/qr-code.scss +17 -0
  337. package/packages/theme-chalk/src/radio-group.scss +9 -0
  338. package/packages/theme-chalk/src/radio.scss +3 -0
  339. package/packages/theme-chalk/src/select-ganged.scss +9 -0
  340. package/packages/theme-chalk/src/select.scss +0 -0
  341. package/packages/theme-chalk/src/selector-panel.scss +203 -0
  342. package/packages/theme-chalk/src/selector.scss +85 -0
  343. package/packages/theme-chalk/src/sizer.scss +36 -0
  344. package/packages/theme-chalk/src/steps.scss +88 -0
  345. package/packages/theme-chalk/src/switch.scss +3 -0
  346. package/packages/theme-chalk/src/table-form.scss +1 -0
  347. package/packages/theme-chalk/src/tabs-panel.scss +0 -0
  348. package/packages/theme-chalk/src/tabs.scss +91 -0
  349. package/packages/theme-chalk/src/tips.scss +7 -0
  350. package/packages/theme-chalk/src/toolbar.scss +121 -0
  351. package/packages/theme-chalk/src/tree-group.scss +64 -0
  352. package/packages/theme-chalk/src/tree.scss +140 -0
  353. package/packages/theme-chalk/src/upload.scss +131 -0
  354. package/packages/theme-chalk/src/wujie.scss +0 -0
  355. package/packages/theme-chalk/src/wxlogin.scss +3 -0
  356. package/packages/tips/index.js +5 -0
  357. package/packages/tips/src/main.vue +126 -0
  358. package/packages/toolbar/index.js +5 -0
  359. package/packages/toolbar/src/main.vue +377 -0
  360. package/packages/tree/index.js +5 -0
  361. package/packages/tree/src/main.vue +636 -0
  362. package/packages/tree-group/index.js +5 -0
  363. package/packages/tree-group/src/main.vue +435 -0
  364. package/packages/upload/index.js +5 -0
  365. package/packages/upload/src/main.vue +1033 -0
  366. package/packages/upload/src/picture.js +15 -0
  367. package/packages/wujie/index.js +5 -0
  368. package/packages/wujie/src/main.vue +137 -0
  369. package/packages/wxlogin/index.js +5 -0
  370. package/packages/wxlogin/src/main.vue +110 -0
  371. package/src/config/api.js +211 -0
  372. package/src/index.js +167 -0
  373. package/src/utils/bus.js +3 -0
  374. package/src/utils/date-util.js +312 -0
  375. package/src/utils/http.js +50 -0
  376. package/src/utils/rules.js +18 -0
  377. package/src/utils/store.js +21 -0
  378. package/src/utils/util.js +2105 -0
package/lib/select.js ADDED
@@ -0,0 +1,3295 @@
1
+ module.exports =
2
+ /******/ (function(modules) { // webpackBootstrap
3
+ /******/ // The module cache
4
+ /******/ var installedModules = {};
5
+ /******/
6
+ /******/ // The require function
7
+ /******/ function __webpack_require__(moduleId) {
8
+ /******/
9
+ /******/ // Check if module is in cache
10
+ /******/ if(installedModules[moduleId]) {
11
+ /******/ return installedModules[moduleId].exports;
12
+ /******/ }
13
+ /******/ // Create a new module (and put it into the cache)
14
+ /******/ var module = installedModules[moduleId] = {
15
+ /******/ i: moduleId,
16
+ /******/ l: false,
17
+ /******/ exports: {}
18
+ /******/ };
19
+ /******/
20
+ /******/ // Execute the module function
21
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
+ /******/
23
+ /******/ // Flag the module as loaded
24
+ /******/ module.l = true;
25
+ /******/
26
+ /******/ // Return the exports of the module
27
+ /******/ return module.exports;
28
+ /******/ }
29
+ /******/
30
+ /******/
31
+ /******/ // expose the modules object (__webpack_modules__)
32
+ /******/ __webpack_require__.m = modules;
33
+ /******/
34
+ /******/ // expose the module cache
35
+ /******/ __webpack_require__.c = installedModules;
36
+ /******/
37
+ /******/ // define getter function for harmony exports
38
+ /******/ __webpack_require__.d = function(exports, name, getter) {
39
+ /******/ if(!__webpack_require__.o(exports, name)) {
40
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
+ /******/ }
42
+ /******/ };
43
+ /******/
44
+ /******/ // define __esModule on exports
45
+ /******/ __webpack_require__.r = function(exports) {
46
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
+ /******/ }
49
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
+ /******/ };
51
+ /******/
52
+ /******/ // create a fake namespace object
53
+ /******/ // mode & 1: value is a module id, require it
54
+ /******/ // mode & 2: merge all properties of value into the ns
55
+ /******/ // mode & 4: return value when already ns object
56
+ /******/ // mode & 8|1: behave like require
57
+ /******/ __webpack_require__.t = function(value, mode) {
58
+ /******/ if(mode & 1) value = __webpack_require__(value);
59
+ /******/ if(mode & 8) return value;
60
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
+ /******/ var ns = Object.create(null);
62
+ /******/ __webpack_require__.r(ns);
63
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
+ /******/ return ns;
66
+ /******/ };
67
+ /******/
68
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
69
+ /******/ __webpack_require__.n = function(module) {
70
+ /******/ var getter = module && module.__esModule ?
71
+ /******/ function getDefault() { return module['default']; } :
72
+ /******/ function getModuleExports() { return module; };
73
+ /******/ __webpack_require__.d(getter, 'a', getter);
74
+ /******/ return getter;
75
+ /******/ };
76
+ /******/
77
+ /******/ // Object.prototype.hasOwnProperty.call
78
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
+ /******/
80
+ /******/ // __webpack_public_path__
81
+ /******/ __webpack_require__.p = "/dist/";
82
+ /******/
83
+ /******/
84
+ /******/ // Load entry module and return exports
85
+ /******/ return __webpack_require__(__webpack_require__.s = 69);
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ 0:
91
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
+
93
+ "use strict";
94
+ /* harmony import */ var _config_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
95
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
96
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);
97
+ /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
98
+ /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_2__);
99
+ /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
100
+ /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(json_bigint__WEBPACK_IMPORTED_MODULE_3__);
101
+ /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
102
+ /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(eoss_element__WEBPACK_IMPORTED_MODULE_4__);
103
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
104
+
105
+ /**
106
+ * 新封装公告方法规范:
107
+ * 1.方法顺序按字母顺序排列
108
+ * 2.参数超过2个且有的参数是非必传的最好用对象形式传参
109
+ *
110
+ **/
111
+
112
+ /* eslint-disable indent */
113
+ var sm2 = __webpack_require__(7).sm2;
114
+
115
+
116
+
117
+
118
+
119
+ var win = window.__WUJIE_RAW_WINDOW__ ? window.__WUJIE_RAW_WINDOW__ : window;
120
+
121
+ var $hueStep = 2;
122
+ var $saturationStep1 = 0.16;
123
+ var $saturationStep2 = 0.05;
124
+ var $brightnessStep1 = 0.05;
125
+ var $brightnessStep2 = 0.15;
126
+ var $lightColorCount = 5;
127
+ var $darkColorCount = 4;
128
+ var publicKey = 'abcdefghijklmnopqrstuvwxyz12345678';
129
+
130
+ var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ storeAsString: true });
131
+
132
+
133
+ /**
134
+ * ajax
135
+ * @desc:ajax请求
136
+ * @author huangbo
137
+ * @date 2022年5月7日
138
+ * @param {Object} [headers] - headers
139
+ * @param {String} [method] - 请求类型
140
+ * @param {String} [url] - 请求地址
141
+ * @param {String} [host] - host
142
+ * @param {Object} [data] - 请求参数
143
+ * @param {Object} [params] - 请求参数
144
+ * @param {Boolean} [format] - post请求是否使用表单类型
145
+ * @param {Boolean} [mix] - 是否混合传参
146
+ * @param {Boolean} [defaults] - 是否传入默认参数userId
147
+ * @param {Object} [loading] - loading加载对象
148
+ **/
149
+ // 请求
150
+ var _timer = null;
151
+ var pendingRequest = new Map();
152
+ function getRequestKey(config) {
153
+ var method = config.method,
154
+ url = config.url,
155
+ params = config.params,
156
+ data = config.data;
157
+
158
+ return [method, url, qs__WEBPACK_IMPORTED_MODULE_2___default.a.stringify(params), qs__WEBPACK_IMPORTED_MODULE_2___default.a.stringify(data)].join('&');
159
+ };
160
+ function delPendingRequest(config) {
161
+ var requestKey = getRequestKey(config);
162
+ if (pendingRequest.has(requestKey)) {
163
+ pendingRequest.delete(requestKey);
164
+ }
165
+ }
166
+ var ajax = function ajax(_ref) {
167
+ var _ref$headers = _ref.headers,
168
+ headers = _ref$headers === undefined ? {} : _ref$headers,
169
+ method = _ref.method,
170
+ url = _ref.url,
171
+ _ref$host = _ref.host,
172
+ host = _ref$host === undefined ? true : _ref$host,
173
+ _ref$data = _ref.data,
174
+ data = _ref$data === undefined ? {} : _ref$data,
175
+ _ref$params = _ref.params,
176
+ params = _ref$params === undefined ? {} : _ref$params,
177
+ _ref$format = _ref.format,
178
+ format = _ref$format === undefined ? true : _ref$format,
179
+ _ref$mix = _ref.mix,
180
+ mix = _ref$mix === undefined ? false : _ref$mix,
181
+ _ref$defaults = _ref.defaults,
182
+ defaults = _ref$defaults === undefined ? false : _ref$defaults,
183
+ loading = _ref.loading;
184
+
185
+ if (!method) {
186
+ if (format) {
187
+ method = 'get';
188
+ } else {
189
+ method = 'post';
190
+ }
191
+ } else {
192
+ method = method.toLowerCase();
193
+ }
194
+ var baseURL = host === true ? getStorage('host') : host === false ? '' : host;
195
+ var http = axios__WEBPACK_IMPORTED_MODULE_1___default.a.create({
196
+ baseURL: baseURL,
197
+ timeout: 99000,
198
+ transformResponse: [function (data) {
199
+ try {
200
+ return JSONbigToString.parse(data);
201
+ } catch (err) {
202
+ return data;
203
+ }
204
+ }]
205
+ });
206
+ // 请求拦截
207
+ http.interceptors.request.use(function (config) {
208
+ config.headers.common = getStorage();
209
+ // 根据请求的信息(请求方式,url,请求get/post数据),产生map的key
210
+ var requestKey = getRequestKey(config);
211
+ // 判断请求是否重复
212
+ if (pendingRequest.has(requestKey)) {
213
+ // 取消上次请求
214
+ var cancel = pendingRequest.get(requestKey);
215
+ cancel();
216
+ // 删除请求信息
217
+ pendingRequest.delete(requestKey);
218
+ }
219
+ // 把请求信息,添加请求到map当中
220
+ // 生成取消方法
221
+ config.cancelToken = config.cancelToken || new axios__WEBPACK_IMPORTED_MODULE_1___default.a.CancelToken(function (cancel) {
222
+ // 把取消方法添加到map
223
+ if (!pendingRequest.has(requestKey)) {
224
+ pendingRequest.set(requestKey, cancel);
225
+ }
226
+ });
227
+ return config;
228
+ }, function (err) {
229
+ return err;
230
+ });
231
+ // 响应拦截
232
+ http.interceptors.response.use(function (response) {
233
+ delPendingRequest(response.config);
234
+ loading && loading.close();
235
+ if (response.headers.authorization && response.headers.authorization !== getStorage('token')) {
236
+ if (localStorage.getItem('storage') === 'localStorage' || localStorage.getItem('ssId') || localStorage.getItem('token') || localStorage.getItem('Authorization')) {
237
+ localStorage.setItem('ssId', response.headers.ssid);
238
+ localStorage.setItem('token', response.headers.authorization);
239
+ localStorage.setItem('Authorization', response.headers.authorization);
240
+ } else {
241
+ sessionStorage.setItem('ssId', response.headers.ssid);
242
+ sessionStorage.setItem('token', response.headers.authorization);
243
+ sessionStorage.setItem('Authorization', response.headers.authorization);
244
+ }
245
+ }
246
+ if (response.status === 200) {
247
+ if (response.data.rCode === 64 || response.data.rCode === 65 || response.data.rCode === 67 || response.data.rCode === 69) {
248
+ removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'menus', 'useCaseCodes', 'mainConfig']);
249
+
250
+ var timer = getStorage('timer') || 0;
251
+ timer = parseInt(timer, 10);
252
+ if (win.top.location.href.indexOf('#/login') === -1 && win.top.location.href.indexOf('/login.html') === -1 && !timer) {
253
+ sessionStorage.setItem('timer', 1);
254
+ eoss_element__WEBPACK_IMPORTED_MODULE_4__["MessageBox"].confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
255
+ confirmButtonText: '确定',
256
+ closeOnClickModal: false,
257
+ type: 'warning'
258
+ } : {
259
+ confirmButtonText: '确定',
260
+ cancelButtonText: '取消',
261
+ closeOnClickModal: false,
262
+ type: 'warning'
263
+ }).then(function () {
264
+ var loginPage = getStorage('login') || getStorage('loginPage');
265
+ if (loginPage) {
266
+ win.top.location.href = loginPage;
267
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
268
+ win.top.location.href = './login.html';
269
+ } else {
270
+ var hash = win.top.location.hash;
271
+ if (hash || win.top.location.indexOf('model=') && win.top.location.indexOf('view=') && win.top.location.indexOf('render.html')) {
272
+ var len = win.top.location.href.indexOf(hash);
273
+ var href = win.top.location.href.slice(0, len) + '#/login';
274
+ win.top.location.href = href;
275
+ } else {
276
+ win.top.location.href = '/login.html';
277
+ }
278
+ }
279
+ }).catch(function (e) {
280
+ _timer && clearTimeout(_timer);
281
+ _timer = setTimeout(function () {
282
+ removeStorage('timer');
283
+ clearTimeout(_timer);
284
+ _timer = null;
285
+ }, 1000);
286
+ });
287
+ }
288
+ return Promise.reject(response.data);
289
+ } else {
290
+ // eslint-disable-next-line no-undef
291
+ return Promise.resolve(response.data);
292
+ }
293
+ }
294
+ }, function (error) {
295
+ loading && loading.close();
296
+ if (!axios__WEBPACK_IMPORTED_MODULE_1___default.a.isCancel(error)) {
297
+ delPendingRequest(error.config || {});
298
+ }
299
+ if (error && error.response) {
300
+ if (error.response.status) {
301
+ switch (error.response.status) {
302
+ case 400:
303
+ error.message = '错误请求';
304
+ break;
305
+ case 401:
306
+ error.message = '未授权,请重新登录';
307
+ break;
308
+ case 403:
309
+ error.message = '登录过期,请重新登录';
310
+ break;
311
+ case 404:
312
+ error.message = '网络请求不存在';
313
+ break;
314
+ case 405:
315
+ error.message = '请求方法错误';
316
+ break;
317
+ case 408:
318
+ error.message = '请求超时';
319
+ break;
320
+ case 500:
321
+ error.message = '服务器端出错';
322
+ break;
323
+ case 501:
324
+ error.message = '网络未实现';
325
+ break;
326
+ case 502:
327
+ error.message = '网络错误';
328
+ break;
329
+ case 503:
330
+ error.message = '服务不可用';
331
+ break;
332
+ case 504:
333
+ error.message = '网络超时';
334
+ break;
335
+ case 505:
336
+ error.message = 'http版本不支持该请求';
337
+ break;
338
+ default:
339
+ error.message = '\u8FDE\u63A5\u9519\u8BEF' + error.response.status;
340
+ }
341
+ } else {
342
+ error.message = '无法请求,请联系管理员';
343
+ }
344
+ }
345
+ // eslint-disable-next-line no-undef
346
+ return Promise.reject(error);
347
+ });
348
+ var userId = getStorage('userId');
349
+ if (!Object.prototype.hasOwnProperty.call(data, 'userId') && userId && defaults) {
350
+ data.userId = userId;
351
+ }
352
+ if (!Object.prototype.hasOwnProperty.call(params, 'userId') && userId && defaults) {
353
+ params.userId = getStorage('userId');
354
+ }
355
+ if (!mix && method === 'get') {
356
+ data = {};
357
+ }
358
+ if (method === 'post') {
359
+ if (!mix) {
360
+ params = {};
361
+ }
362
+ if (format) {
363
+ data = qs__WEBPACK_IMPORTED_MODULE_2___default.a.stringify(data);
364
+ headers['content-type'] = 'application/x-www-form-urlencoded';
365
+ }
366
+ }
367
+ return http({
368
+ method: method,
369
+ url: url,
370
+ data: data,
371
+ params: params,
372
+ headers: headers
373
+ });
374
+ };
375
+
376
+ /**
377
+ * arrUnique
378
+ * @desc:数组元素对象去重
379
+ * @author huangbo
380
+ * @date 2022年5月7日
381
+ * @param {Object} [data] - 原始数组
382
+ * @param {String} [key] - 对象子元素的属性名
383
+ **/
384
+ var arrUnique = function arrUnique(data, key) {
385
+ var newArr = [];
386
+ if (key === undefined) {
387
+ data.sort();
388
+ newArr = [data[0]];
389
+ for (var i = 1; i < data.length; i++) {
390
+ if (data[i] !== newArr[newArr.length - 1]) {
391
+ newArr.push(data[i]);
392
+ }
393
+ }
394
+ } else {
395
+ var obj = {};
396
+ for (var _i = 0; _i < data.length; _i++) {
397
+ if (!obj[data[_i][key]]) {
398
+ newArr.push(data[_i]);
399
+ obj[data[_i][key]] = true;
400
+ }
401
+ }
402
+ }
403
+ return newArr;
404
+ };
405
+ /**
406
+ * browser
407
+ * @desc:浏览器类型
408
+ * @author huangbo
409
+ * @date 2022年5月7日
410
+ **/
411
+ var browser = function browser() {
412
+ var reg = { ie: /msie/, moz: /gecko/, opera: /opera/, safari: /safari/ };
413
+ for (var i in reg) {
414
+ if (reg[i].test(win.navigator.userAgent.toLowerCase())) {
415
+ return i;
416
+ }
417
+ }
418
+ };
419
+
420
+ /**
421
+ * debounce
422
+ * @desc:添加js内容
423
+ * @author huangbo
424
+ * @date 2022年5月7日
425
+ * @param {Function} [fn] - 函数
426
+ * @param {Number} [wait] - 延迟毫秒数
427
+ * @param {Boolean} [immediate] - 是否首次触发执行
428
+ **/
429
+
430
+ var debounce = function debounce(fn, wait, immediate) {
431
+ var timeout = void 0;
432
+ return function () {
433
+ var self = this;
434
+ var args = arguments;
435
+
436
+ if (timeout) clearTimeout(timeout);
437
+ // 是否在某一批事件中首次执行
438
+ if (immediate) {
439
+ var callNow = !timeout;
440
+ timeout = setTimeout(function () {
441
+ timeout = null;
442
+ fn.apply(self, args);
443
+ immediate = true;
444
+ }, wait);
445
+ if (callNow) {
446
+ fn.apply(self, args);
447
+ }
448
+ immediate = false;
449
+ } else {
450
+ timeout = setTimeout(function () {
451
+ fn.apply(self, args);
452
+ immediate = true;
453
+ }, wait);
454
+ }
455
+ };
456
+ };
457
+ /**
458
+ * delUrlParam
459
+ * @desc:删除url指定参数
460
+ * @author huangbo
461
+ * @date 2022年5月7日
462
+ * @param {String} [url] - url地址
463
+ * @param {String} [key] - 参数名
464
+ **/
465
+ var delUrlParam = function delUrlParam(_ref2) {
466
+ var url = _ref2.url,
467
+ key = _ref2.key;
468
+
469
+ var src = url ? decodeURI(url) : decodeURI(win.top.location.href);
470
+ var param = getParams({ url: src });
471
+ if (param && param.hasOwnProperty(key)) {
472
+ var reg = key + '=' + param[key];
473
+ if (Object.keys(param).length > 1) {
474
+ if (src.indexOf(reg + '&') > -1) {
475
+ src = src.replace(reg + '&', '');
476
+ }
477
+ if (src.indexOf('&' + reg) > -1) {
478
+ src = src.replace('&' + reg, '');
479
+ }
480
+ } else {
481
+ src = src.replace('?' + reg, '');
482
+ }
483
+ }
484
+ return src;
485
+ };
486
+
487
+ /**
488
+ * domEval
489
+ * @desc:添加js内容
490
+ * @author huangbo
491
+ * @date 2022年5月7日
492
+ * @param {String} [code] - js内容
493
+ **/
494
+ var domEval = function domEval(code) {
495
+ var script = document.createElement('script');
496
+ script.text = code;
497
+ document.head.appendChild(script);
498
+ };
499
+
500
+ /**
501
+ * esEncode
502
+ * @desc:加密
503
+ * @author huangbo
504
+ * @date 2022年5月7日
505
+ * @param {string} [data] - 被加密的字符串
506
+ **/
507
+ var esEncode = function esEncode(value) {
508
+ var kleng = publicKey.length;
509
+ var kstr = publicKey.split('');
510
+ var result = '';
511
+ var cat = void 0;
512
+ var cat1 = void 0;
513
+ var cat2 = void 0;
514
+ var cat3 = void 0;
515
+ for (var i = 0; i < value.length; i++) {
516
+ cat = value.charCodeAt(i);
517
+ cat1 = cat % kleng;
518
+ cat = (cat - cat1) / kleng;
519
+ cat2 = cat % kleng;
520
+ cat = (cat - cat2) / kleng;
521
+ cat3 = cat % kleng;
522
+ result += kstr[cat3] + kstr[cat2] + kstr[cat1];
523
+ }
524
+ return result;
525
+ };
526
+
527
+ /**
528
+ * esDecode
529
+ * @desc:解密
530
+ * @author huangbo
531
+ * @date 2022年5月7日
532
+ * @param {string} [value] - 被解密的加密字符串
533
+ * @param {string} [key] - 私钥
534
+ **/
535
+ var esDecode = function esDecode(value) {
536
+ var kleng = publicKey.length;
537
+ var result;
538
+ var cat1 = void 0;
539
+ var cat2 = void 0;
540
+ var cat3 = void 0;
541
+ var num = 0;
542
+ var arr = void 0;
543
+ arr = new Array(Math.floor(value.length / 3));
544
+ result = arr.length;
545
+ for (var i = 0; i < result; i++) {
546
+ cat1 = publicKey.indexOf(value.charAt(num));
547
+ num++;
548
+ cat2 = publicKey.indexOf(value.charAt(num));
549
+ num++;
550
+ cat3 = publicKey.indexOf(value.charAt(num));
551
+ num++;
552
+ arr[i] = cat1 * kleng * kleng + cat2 * kleng + cat3;
553
+ }
554
+ // eslint-disable-next-line no-eval
555
+ result = eval('String.fromCharCode(' + arr.join(',') + ')');
556
+ return result;
557
+ };
558
+
559
+ /**
560
+ * esmEncrypt
561
+ * @desc:sm2加密
562
+ * @author huangbo
563
+ * @date 2022年5月7日
564
+ * @param {string} [data] - 被加密的字符串
565
+ * @param {string} [key] - 公钥
566
+ **/
567
+ var esmEncrypt = function esmEncrypt(_ref3) {
568
+ var data = _ref3.data,
569
+ key = _ref3.key,
570
+ mode = _ref3.mode;
571
+
572
+ var cipherMode = mode ? mode : 1;
573
+ if (!new RegExp('^04').test(key)) {
574
+ key = '04' + key;
575
+ }
576
+ var result = sm2.doEncrypt(data, key, cipherMode);
577
+ return result;
578
+ };
579
+
580
+ /**
581
+ * esmDecode
582
+ * @desc:sm2解密
583
+ * @author huangbo
584
+ * @date 2022年5月7日
585
+ * @param {string} [data] - 被解密的加密字符串
586
+ * @param {string} [key] - 私钥
587
+ **/
588
+ var esmDecode = function esmDecode(_ref4) {
589
+ var data = _ref4.data,
590
+ key = _ref4.key,
591
+ mode = _ref4.mode;
592
+
593
+ var cipherMode = mode ? mode : 1;
594
+ if (new RegExp('^04').test(key)) {
595
+ key = key.slice(2);
596
+ }
597
+ var result = sm2.doDecrypt(data, key, cipherMode);
598
+ return result;
599
+ };
600
+
601
+ /**
602
+ * 排除属性
603
+ * @desc:exclAttribute
604
+ * @author huangbo
605
+ * @date 2022年5月7日
606
+ * @param {String/Array} [attrs] - 要排除的属性
607
+ **/
608
+ var exclAttribute = function exclAttribute(_ref5) {
609
+ var _ref5$attrs = _ref5.attrs,
610
+ attrs = _ref5$attrs === undefined ? 'value' : _ref5$attrs,
611
+ data = _ref5.data;
612
+
613
+ var obj = extend(true, {}, data);
614
+ if (Array.isArray(attrs)) {
615
+ attrs.forEach(function (item) {
616
+ if (obj[item] !== undefined) {
617
+ delete obj[item];
618
+ }
619
+ });
620
+ } else {
621
+ delete obj[attrs];
622
+ }
623
+ return obj;
624
+ };
625
+
626
+ /**
627
+ * exportXls
628
+ * @desc:导出表格数据
629
+ * @author huangbo
630
+ * @date 2022年5月7日
631
+ * @param {thead} [array] - 表单头部
632
+ * @param {data} [array] - 导出的数据
633
+ * @param {name} [string] - 导出文件名
634
+ * @param {numbers} [boolean] - 序号
635
+ **/
636
+ var exportXls = function exportXls(_ref6) {
637
+ var _ref6$thead = _ref6.thead,
638
+ thead = _ref6$thead === undefined ? [] : _ref6$thead,
639
+ _ref6$data = _ref6.data,
640
+ data = _ref6$data === undefined ? [] : _ref6$data,
641
+ name = _ref6.name,
642
+ numbers = _ref6.numbers;
643
+
644
+ var tbody = '';
645
+ var aligns = [];
646
+ var fields = [];
647
+ var others = {};
648
+ var alink = document.createElement('a');
649
+ for (var i = 0; i < thead.length; i++) {
650
+ tbody += '<tr style="text-align: center;">';
651
+ if (numbers) {
652
+ tbody += '<th rowspan="' + thead.length + '"></th>';
653
+ }
654
+ var tr = thead[i];
655
+ var col = 0;
656
+ for (var _x = 0; _x < tr.length; _x++) {
657
+ var td = tr[_x];
658
+ if (td.property) {
659
+ if (col === _x) {
660
+ fields.push(td.property);
661
+ aligns.push(td.align);
662
+ } else {
663
+ others[String(col)] = [td.property, td.align];
664
+ }
665
+ }
666
+ tbody += '<th rowspan="' + td.rowspan + '" colspan="' + td.colspan + '" align="' + td.align + '">' + td.label + '</th>';
667
+ if (td.colspan) {
668
+ col += parseInt(td.colspan, 10);
669
+ } else {
670
+ col++;
671
+ }
672
+ }
673
+ tbody += '</tr>';
674
+ }
675
+ for (var _i2 in others) {
676
+ fields.splice(_i2, 0, others[_i2][0]);
677
+ aligns.splice(_i2, 0, others[_i2][1]);
678
+ }
679
+ for (var _i3 = 0; _i3 < data.length; _i3++) {
680
+ tbody += '<tr>';
681
+ for (var x in fields) {
682
+ tbody += '<td align="' + aligns[x] + '">' + data[_i3][fields[x]] + '</td>';
683
+ }
684
+ tbody += '</tr>';
685
+ }
686
+ if (!name) {
687
+ name = 'table_' + new Date().getTime();
688
+ }
689
+ var uri = 'data:application/vnd.ms-excel;base64,';
690
+ var template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><meta charset="UTF-8"><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table style="vnd.ms-excel.numberformat:@">' + tbody + '</table></body></html>';
691
+ alink.href = uri + win.btoa(unescape(encodeURIComponent(template)));
692
+ alink.download = name + '.xls';
693
+ document.body.appendChild(alink);
694
+ alink.click();
695
+ document.body.removeChild(alink);
696
+ };
697
+
698
+ /**
699
+ * extend
700
+ * @desc:对象拷贝
701
+ * @author huangbo
702
+ * @date 2022年5月7日
703
+ * @param {Object} [target] - 被扩展的对象
704
+ * @param {Boolean}} [deep] - 是否深度操作
705
+ **/
706
+ var extend = function extend() {
707
+ var options = void 0;
708
+ var name = void 0;
709
+ var src = void 0;
710
+ var copy = void 0;
711
+ var copyIsArray = void 0;
712
+ var clone = void 0;
713
+ var target = arguments[0] || {};
714
+ var i = 1;
715
+ var length = arguments.length;
716
+ var deep = false;
717
+ if (typeof target === 'boolean') {
718
+ deep = target;
719
+ target = arguments[i] || {};
720
+ i++;
721
+ }
722
+ if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) !== 'object' && !isFunction(target)) {
723
+ target = {};
724
+ }
725
+ if (i === length) {
726
+ target = this;
727
+ i--;
728
+ }
729
+ for (; i < length; i++) {
730
+ if ((options = arguments[i]) != null) {
731
+ for (name in options) {
732
+ copy = options[name];
733
+ if (name === '__proto__' || target === copy) {
734
+ continue;
735
+ }
736
+ if (deep && copy && (isObject(copy) || (copyIsArray = Array.isArray(copy)))) {
737
+ src = target[name];
738
+ if (copyIsArray && !Array.isArray(src)) {
739
+ clone = [];
740
+ } else if (!copyIsArray && !isObject(src)) {
741
+ clone = {};
742
+ } else {
743
+ clone = src;
744
+ }
745
+ copyIsArray = false;
746
+ target[name] = extend(deep, clone, copy);
747
+ } else if (copy !== undefined) {
748
+ target[name] = copy;
749
+ }
750
+ }
751
+ }
752
+ }
753
+ return target;
754
+ };
755
+
756
+ /**
757
+ * formatDate
758
+ * @desc:格式化时间
759
+ * @author huangbo
760
+ * @date 2022年5月7日
761
+ * @param {String, Number} [date] - 时间字符串或时间戳
762
+ * @param {String} [fmt] - 格式
763
+ **/
764
+ var formatDate = function formatDate(date, fmt) {
765
+ var obj = void 0;
766
+ if (date) {
767
+ obj = new Date(date);
768
+ } else {
769
+ obj = new Date();
770
+ }
771
+ var quarter = ['一', '二', '三', '四'];
772
+ var o = {
773
+ 'b+': Math.ceil((obj.getMonth() + 1) / 6), // 半年
774
+ 'M+': obj.getMonth() + 1, // 月份
775
+ 'd+': obj.getDate(), // 日
776
+ 'H+': obj.getHours(), // 小时
777
+ 'm+': obj.getMinutes(), // 分
778
+ 's+': obj.getSeconds(), // 秒
779
+ 'q+': quarter[Math.ceil((obj.getMonth() + 1) / 3) - 1], // 季度
780
+ S: obj.getMilliseconds() // 毫秒
781
+ };
782
+ if (/(y+)/.test(fmt)) {
783
+ fmt = fmt.replace(RegExp.$1, (obj.getFullYear() + '').substr(4 - RegExp.$1.length));
784
+ }
785
+ for (var k in o) {
786
+ if (new RegExp('(' + k + ')').test(fmt)) {
787
+ fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
788
+ }
789
+ }
790
+ return fmt;
791
+ };
792
+
793
+ /**
794
+ * getColor
795
+ * @desc:根据颜色和对应的色板位置,计算出对应的色板颜色
796
+ * @author huangbo
797
+ * @date 2022年5月7日
798
+ **/
799
+ var getColor = function getColor($color, $n) {
800
+ var $isLight = $n < 7;
801
+ var $hsv = rgbToHsv($color);
802
+ // 这里将i转换成以主色为中心,两侧的i值逐渐增大
803
+ var $i = $isLight ? $lightColorCount + 1 - $n : $n - $lightColorCount - 1;
804
+ var color = hsvTorgb(getHue($hsv[0], $i, $isLight), getSaturation($hsv[1], $i, $isLight), getLightness($hsv[2], $i, $isLight));
805
+ return color;
806
+ };
807
+
808
+ /**
809
+ * getHue
810
+ * @desc:转换色相
811
+ * @author huangbo
812
+ * @date 2022年5月7日
813
+ **/
814
+ var getHue = function getHue($h, $i, $isLight) {
815
+ var $hue = void 0;
816
+ if ($h >= 60 && $h <= 240) {
817
+ $hue = $isLight ? $h - $hueStep * $i : $h + $hueStep * $i;
818
+ } else {
819
+ $hue = $isLight ? $h + $hueStep * $i : $h - $hueStep * $i;
820
+ }
821
+ $hue = ($hue + 360) % 360;
822
+ return Math.round($hue);
823
+ };
824
+
825
+ /**
826
+ * getLightness
827
+ * @desc:转换明度
828
+ * @author huangbo
829
+ * @date 2022年5月7日
830
+ **/
831
+ var getLightness = function getLightness($v, $i, $isLight) {
832
+ var $value = $isLight ? $v + $brightnessStep1 * $i : $v - $brightnessStep2 * $i;
833
+ $value = $value < 1 ? $value : 1;
834
+ return toFixed($value, 2);
835
+ };
836
+
837
+ /**
838
+ * getObjectType
839
+ * @desc:获取数据类型
840
+ * @author tangdaibing
841
+ * @date 2022年5月7日
842
+ **/
843
+ var getObjectType = function getObjectType(data) {
844
+ var type = Object.prototype.toString.call(data).toLowerCase();
845
+ var typeFormat = {
846
+ '[object string]': 'string',
847
+ '[object number]': 'number',
848
+ '[object null]': 'null',
849
+ '[object boolean]': 'boolean',
850
+ '[object undefined]': 'undefined',
851
+ '[object object]': 'object',
852
+ '[object array]': 'array',
853
+ '[object function]': 'function',
854
+ '[object date]': 'date'
855
+ };
856
+ return typeFormat[type];
857
+ };
858
+
859
+ /**
860
+ * getParams
861
+ * @desc:获取url地址指定参数
862
+ * @author huangbo
863
+ * @date 2022年5月7日
864
+ * @param {String/Object} [res] - String:参数名称;Object:name参数名称,url:需要查询的地址
865
+ * @param {String/Boolean} [url] - Boolean:是否返回不带参数的url地址,String:返回不带参数的url地址的属性名
866
+ **/
867
+ var getParams = function getParams(res, baseUrl) {
868
+ var name = void 0;
869
+ var url = void 0;
870
+ if (typeof res === 'string') {
871
+ name = res;
872
+ } else if ((typeof res === 'undefined' ? 'undefined' : _typeof(res)) === 'object') {
873
+ name = res.name;
874
+ url = res.url ? decodeURI(res.url) : '';
875
+ }
876
+ var search = void 0;
877
+ var _url = void 0;
878
+ if (url) {
879
+ if (startWith(url, ['/', './'], true) || url.indexOf('html') > -1 || url.indexOf('dhtml') > -1 || url.indexOf('/#/') > -1) {
880
+ if (url.indexOf('?') === -1) {
881
+ _url = url.slice(0);
882
+ } else {
883
+ _url = url.slice(0, url.indexOf('?'));
884
+ search = url.slice(url.indexOf('?') + 1);
885
+ }
886
+ }
887
+ } else if (win.location.search) {
888
+ search = decodeURI(win.location.search).slice(1);
889
+ } else {
890
+ search = decodeURI(win.location.hash);
891
+ if (search.indexOf('?') > -1) {
892
+ search = search.slice(search.indexOf('?') + 1);
893
+ } else {
894
+ search = null;
895
+ }
896
+ }
897
+ if (search) {
898
+ if (name) {
899
+ var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
900
+ var r = search.match(reg);
901
+ if (r != null) {
902
+ return unescape(r[2]).replace(new RegExp('/+', 'gm'), '&');
903
+ } else {
904
+ return null;
905
+ }
906
+ }
907
+ var obj = {};
908
+ if (baseUrl) {
909
+ if (typeof baseUrl === 'string') {
910
+ obj[baseUrl] = _url;
911
+ } else {
912
+ obj['_baseUrl'] = _url;
913
+ }
914
+ }
915
+ if (search.indexOf('&') > -1) {
916
+ search.split('&').forEach(function (item) {
917
+ var val = item;
918
+ var param = void 0;
919
+ if (val.indexOf('?') > -1) {
920
+ var ary = val.split('?');
921
+ val = ary[0];
922
+ param = ary[1].replace(new RegExp('/+', 'gm'), '&');
923
+ }
924
+ var items = val.split('=');
925
+ obj[items[0]] = items[1] + (param ? '?' + param : '');
926
+ });
927
+ } else {
928
+ var items = search.split('=');
929
+ obj[items[0]] = items[1];
930
+ }
931
+ return obj;
932
+ }
933
+ return null;
934
+ };
935
+
936
+ /**
937
+ * getRgb
938
+ * @desc:获取颜色值的rgb值
939
+ * @author huangbo
940
+ * @date 2022年5月7日
941
+ * @param {string} [$color] - 颜色值
942
+ **/
943
+ var getRgb = function getRgb($color) {
944
+ var rgb = [];
945
+ // 16进制颜色值的正则
946
+ var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
947
+ // 把颜色值变成小写
948
+ $color = $color.toLowerCase();
949
+ if (reg.test($color)) {
950
+ // 如果只有三位的值,需变成六位,如:#fff => #ffffff
951
+ if ($color.length === 4) {
952
+ var colorNew = '#';
953
+ for (var i = 1; i < 4; i++) {
954
+ colorNew += $color.slice(i, i + 1).concat($color.slice(i, i + 1));
955
+ }
956
+ $color = colorNew;
957
+ }
958
+ // 处理六位的颜色值,转为RGB
959
+ for (var _i4 = 1; _i4 < 7; _i4 += 2) {
960
+ rgb.push(parseInt('0x' + $color.slice(_i4, _i4 + 2), 16));
961
+ }
962
+ } else {
963
+ rgb = $color.replace(/(?:\(|\)|rgb|RGB)*/g, '').split(',');
964
+ }
965
+ return rgb;
966
+ };
967
+
968
+ /**
969
+ * getSaturation
970
+ * @desc:转换饱和度
971
+ * @author huangbo
972
+ * @date 2022年5月7日
973
+ **/
974
+ var getSaturation = function getSaturation($s, $i, $isLight) {
975
+ var $saturation = void 0;
976
+ if ($isLight) {
977
+ $saturation = $s - $saturationStep1 * $i;
978
+ } else if ($i === $darkColorCount) {
979
+ $saturation = $s + $saturationStep1;
980
+ } else {
981
+ $saturation = $s + $saturationStep2 * $i;
982
+ }
983
+ $saturation = $saturation < 1 ? $saturation : 1;
984
+
985
+ if ($isLight && $i === $lightColorCount && $saturation > 0.1) {
986
+ $saturation = 0.1;
987
+ }
988
+ $saturation = $saturation > 0.06 ? $saturation : 0.06;
989
+ return toFixed($saturation, 2);
990
+ };
991
+
992
+ /**
993
+ * getScript
994
+ * @desc:获取js文件并执行
995
+ * @author huangbo
996
+ * @date 2022年5月7日
997
+ * @param {String} [url] - js文件地址
998
+ **/
999
+ var getScript = function getScript(url, callback) {
1000
+ // eslint-disable-next-line no-undef
1001
+ return new Promise(function (resolve, reject) {
1002
+ var xmlHttp = null;
1003
+ if (win.XMLHttpRequest) {
1004
+ xmlHttp = new XMLHttpRequest();
1005
+ } else if (win.ActiveXObject) {
1006
+ xmlHttp = new win.ActiveXObject('Microsoft.XMLHTTP');
1007
+ }
1008
+ if (xmlHttp == null) {
1009
+ alert('浏览器不支持xmlHttp');
1010
+ return;
1011
+ }
1012
+ xmlHttp.open('GET', url, false);
1013
+ xmlHttp.onreadystatechange = function () {
1014
+ if (xmlHttp.readyState === 4 && xmlHttp.status === 200) {
1015
+ var res = xmlHttp.responseText;
1016
+ if (callback) {
1017
+ typeof callback === 'function' && callback(res);
1018
+ } else {
1019
+ domEval(res);
1020
+ }
1021
+ resolve(res);
1022
+ } else {
1023
+ reject(false);
1024
+ }
1025
+ };
1026
+ xmlHttp.send();
1027
+ });
1028
+ };
1029
+
1030
+ /**
1031
+ * getStorage
1032
+ * @desc:获取本地储存数据
1033
+ * @author huangbo
1034
+ * @date 2022年5月7日
1035
+ * @param {String} [key] - 获取的名称
1036
+ **/
1037
+ var getStorage = function getStorage(key) {
1038
+ if (key) {
1039
+ var res = sessionStorage.getItem(key) || localStorage.getItem(key) || win[key];
1040
+ if (key === 'host' && !res) {
1041
+ return win.location.origin;
1042
+ }
1043
+ return res;
1044
+ }
1045
+ var defaults = {};
1046
+ var token = sessionStorage.getItem('token') || localStorage.getItem('token') || win.token;
1047
+ var ssId = sessionStorage.getItem('ssId') || localStorage.getItem('ssId') || win.ssId;
1048
+ var deviceUnique = sessionStorage.getItem('deviceUnique') || localStorage.getItem('deviceUnique') || win.deviceUnique;
1049
+ if (token) {
1050
+ defaults.Authorization = token;
1051
+ }
1052
+ if (ssId) {
1053
+ defaults.ssId = ssId;
1054
+ }
1055
+ if (deviceUnique) {
1056
+ defaults.deviceUnique = deviceUnique;
1057
+ }
1058
+ return defaults;
1059
+ };
1060
+
1061
+ /**
1062
+ * getStyle
1063
+ * @desc:获取元素样式(含非行内样式)
1064
+ * @author huangbo
1065
+ * @date 2022年5月7日
1066
+ * @param {String} [dom] - dom元素
1067
+ * @param {String} [attr] - 样式属性名
1068
+ **/
1069
+
1070
+ var getStyle = function getStyle(dom, attr) {
1071
+ if (dom.style[attr]) {
1072
+ return dom.style[attr];
1073
+ }
1074
+ if (win.getComputedStyle) {
1075
+ return getComputedStyle(dom, null)[attr];
1076
+ }
1077
+ return dom.currentStyle[attr];
1078
+ };
1079
+
1080
+ /**
1081
+ * getTypeName
1082
+ * @desc:转换类型文本
1083
+ * @author huangbo
1084
+ * @date 2022年5月7日
1085
+ * @param {string} [type] - 类型
1086
+ **/
1087
+ var getTypeName = function getTypeName(type) {
1088
+ var typeName = '';
1089
+ var sysorgname = getStorage('sysorgname');
1090
+ var sysdepname = getStorage('sysdepname');
1091
+ if (type === 'enterprise') {
1092
+ if (sysorgname) {
1093
+ typeName = '[' + sysorgname + ']';
1094
+ } else {
1095
+ typeName = '[公司]';
1096
+ }
1097
+ } else if (type === 'department') {
1098
+ if (sysdepname) {
1099
+ typeName = '[' + sysdepname + ']';
1100
+ } else {
1101
+ typeName = '[部门]';
1102
+ }
1103
+ } else if (type === 'role') {
1104
+ typeName = '[角色]';
1105
+ } else if (type === 'post') {
1106
+ typeName = '[岗位]';
1107
+ } else if (type === 'otheremployee' || type === 'employee') {
1108
+ if (sysdepname) {
1109
+ typeName = '[' + sysdepname + '员工]';
1110
+ } else {
1111
+ typeName = '[部门员工]';
1112
+ }
1113
+ } else if (type === 'postemployee') {
1114
+ typeName = '[岗位员工]';
1115
+ } else if (type === 'persongroup') {
1116
+ typeName = '[人员群组成员]';
1117
+ } else if (type === 'filgroup') {
1118
+ if (sysorgname) {
1119
+ typeName = '[' + sysorgname + '群组成员]';
1120
+ } else {
1121
+ typeName = '[公司群组成员]';
1122
+ }
1123
+ } else if (type === 'depgroup') {
1124
+ if (sysdepname) {
1125
+ typeName = '[' + sysdepname + '群组成员]';
1126
+ } else {
1127
+ typeName = '[部门群组成员]';
1128
+ }
1129
+ } else if (type === 'persongroupobj') {
1130
+ typeName = '[人员群组]';
1131
+ } else if (type === 'filgroupobj') {
1132
+ if (sysorgname) {
1133
+ typeName = '[' + sysorgname + '群组]';
1134
+ } else {
1135
+ typeName = '[公司群组]';
1136
+ }
1137
+ } else if (type === 'depgroupobj') {
1138
+ if (sysdepname) {
1139
+ typeName = '[' + sysdepname + '群组]';
1140
+ } else {
1141
+ typeName = '[部门群组]';
1142
+ }
1143
+ } else if (type === 'otherperson' || type === 'topcontacts' || type === 'person') {
1144
+ typeName = '[人员]';
1145
+ } else if (type === 'codetable') {
1146
+ typeName = '[代码表]';
1147
+ } else if (type === 'organizecentreobj') {
1148
+ typeName = '[组织中心]';
1149
+ }
1150
+ return typeName;
1151
+ };
1152
+
1153
+ /**
1154
+ * getValues
1155
+ * @desc:获取value值
1156
+ * @author huangbo
1157
+ * @date 2022年5月7日
1158
+ * @param {object} [obj] - json对象
1159
+ * @param {boolean} [flag] - 是否不重复获取
1160
+ **/
1161
+ var getValues = function getValues(obj, flag) {
1162
+ var val = {};
1163
+ obj.forEach(function (items) {
1164
+ if (items.contents) {
1165
+ items.contents.forEach(function (item) {
1166
+ if (item.name && item.type !== 'button' && item.type !== 'submit') {
1167
+ if (item.type === 'table' && item.form) {
1168
+ val[item.name] = item.data;
1169
+ } else if (item.name && !flag && !item.hide) {
1170
+ if (item.value !== undefined && item.value !== '') {
1171
+ if (Array.isArray(val)) {
1172
+ if (val.length) {
1173
+ val[item.name] = item.value;
1174
+ }
1175
+ } else {
1176
+ val[item.name] = item.value;
1177
+ }
1178
+ }
1179
+ }
1180
+ }
1181
+ });
1182
+ } else if (items.name && items.type !== 'button' && items.type !== 'submit') {
1183
+ if (items.value !== undefined && items.value !== '') {
1184
+ if (Array.isArray(val)) {
1185
+ if (val.length) {
1186
+ val[items.name] = items.value;
1187
+ }
1188
+ } else {
1189
+ val[items.name] = items.value;
1190
+ }
1191
+ }
1192
+ } else if (items.type === 'table' && items.form) {
1193
+ val[items.type] = items.data;
1194
+ }
1195
+ });
1196
+ return val;
1197
+ };
1198
+
1199
+ /**
1200
+ * handlerUrl
1201
+ * @desc:更新url参数中的时间戳
1202
+ * @author huangbo
1203
+ * @date 2022年5月7日
1204
+ * @param {String} [url] - url地址
1205
+ **/
1206
+
1207
+ var handlerUrl = function handlerUrl(url, before) {
1208
+ var arry = url.split('?');
1209
+ if (arry.length > 2) {
1210
+ var ary = arry.splice(1, arry.length);
1211
+ arry.push(ary.join('?'));
1212
+ }
1213
+ if (arry.length > 1) {
1214
+ if (arry[1].indexOf('_tt') > -1) {
1215
+ var search = arry[1].split('&');
1216
+ for (var i in search) {
1217
+ if (search[i].indexOf('_tt') > -1) {
1218
+ search[i] = '_tt=' + new Date().getTime();
1219
+ }
1220
+ }
1221
+ arry[1] = search.join('&');
1222
+ } else {
1223
+ arry[1] += '&_tt=' + new Date().getTime();
1224
+ }
1225
+ url = arry.join('?');
1226
+ } else {
1227
+ url += '?_tt=' + new Date().getTime();
1228
+ }
1229
+ if (before && before === arry[0]) {
1230
+ var pathname = win.location.pathname;
1231
+ if (pathname === '/') {
1232
+ url = pathname + url;
1233
+ } else {
1234
+ url = pathname.replace('index.html', url);
1235
+ }
1236
+ }
1237
+ return encodeURI(url);
1238
+ };
1239
+ /**
1240
+ * hasChars
1241
+ * @desc: 检测指定字符串是否含有目标字符
1242
+ * @author huangbo
1243
+ * @date 2022年5月7日
1244
+ * @param {String} [str] - 指定字符
1245
+ * @param {String,Array} [res] - 检测目标
1246
+ **/
1247
+ var hasChars = function hasChars(res, str) {
1248
+ if (typeof res === 'string') {
1249
+ return str.indexOf(res) > -1;
1250
+ }
1251
+ if (Array.isArray(res)) {
1252
+ var flag = true;
1253
+ for (var i = 0; i < res.length; i++) {
1254
+ if (str.indexOf(res[i]) === -1) {
1255
+ flag = false;
1256
+ }
1257
+ }
1258
+ return flag;
1259
+ }
1260
+ return false;
1261
+ };
1262
+
1263
+ var hasClass = function hasClass(element, name) {
1264
+ return element && (' ' + element.className + ' ').indexOf(' ' + name + ' ') > -1;
1265
+ };
1266
+ /**
1267
+ * hsvTorgb
1268
+ * @desc:hsv转化成rgb
1269
+ * @author huangbo
1270
+ * @date 2022年5月7日
1271
+ * @param {string} [$color] - 颜色值
1272
+ **/
1273
+ var hsvTorgb = function hsvTorgb($h, $s, $v) {
1274
+ var $th = Math.floor($h / 60);
1275
+ var $t1 = $h / 60 - $th;
1276
+ var $t2 = $v * (1 - $s);
1277
+ var $t3 = $v * (1 - $t1 * $s);
1278
+ var $t4 = $v * (1 - (1 - $t1) * $s);
1279
+ var $r = [$v, $t3, $t2, $t2, $t4, $v][$th % 6];
1280
+ var $g = [$t4, $v, $v, $t3, $t2, $t2][$th % 6];
1281
+ var $b = [$t2, $t2, $t4, $v, $v, $t3][$th % 6];
1282
+ // return `rgb(${Math.round($r * 255)}, ${Math.round($g * 255)}, ${Math.round($b * 255)})`;
1283
+ var red = Math.round($r * 255);
1284
+ var green = Math.round($g * 255);
1285
+ var blue = Math.round($b * 255);
1286
+ red = red.toString(16);
1287
+ green = green.toString(16);
1288
+ blue = blue.toString(16);
1289
+ red = red.length === 1 ? '0' + red : red;
1290
+ green = green.length === 1 ? '0' + green : green;
1291
+ blue = blue.length === 1 ? '0' + blue : blue;
1292
+ return '#' + red + green + blue;
1293
+ };
1294
+
1295
+ /**
1296
+ * identical
1297
+ * @desc:验证值是否相同
1298
+ * @author huangbo
1299
+ * @date 2022年5月7日
1300
+ * @param {value} [array] - 需要对比的值的数组集合
1301
+ * @param {callback} [function] - 回调函数
1302
+ **/
1303
+ var identical = function identical(_ref7) {
1304
+ var value = _ref7.value,
1305
+ callback = _ref7.callback,
1306
+ _ref7$msg = _ref7.msg,
1307
+ msg = _ref7$msg === undefined ? ['请输入值', '请再次输入', '输入不一致!'] : _ref7$msg;
1308
+
1309
+ if (value && value.length > 1) {
1310
+ var val = value[0];
1311
+ if (val === '' || val === undefined || val === null) {
1312
+ callback(new Error(msg[0]));
1313
+ return false;
1314
+ }
1315
+ for (var i = 1; i < value.length; i++) {
1316
+ if (val === '' || val === undefined || val === null) {
1317
+ callback(new Error(msg[1]));
1318
+ return false;
1319
+ } else if (value[i] !== val) {
1320
+ callback(new Error(msg[2]));
1321
+ return false;
1322
+ }
1323
+ }
1324
+ callback();
1325
+ return true;
1326
+ }
1327
+ return false;
1328
+ };
1329
+
1330
+ /**
1331
+ * indexOfObj
1332
+ * @desc:查找数组对象下标
1333
+ * @author huangbo
1334
+ * @date 2022年5月7日
1335
+ * @param {Array} [arry] - 被查找的数组
1336
+ * @param {Object} [target] - 目标对象
1337
+ * @param {String} [key] - 目标对象的属性名
1338
+ **/
1339
+ var indexOfObj = function indexOfObj(arry, target, key) {
1340
+ for (var i = 0; i < arry.length; i++) {
1341
+ if (key) {
1342
+ if (typeof target === 'string' && arry[i][key] === target) {
1343
+ return i;
1344
+ }
1345
+ if (target[key] === arry[i][key]) {
1346
+ return i;
1347
+ }
1348
+ } else {
1349
+ if (JSON.stringify(target) === JSON.stringify(arry[i])) {
1350
+ return i;
1351
+ }
1352
+ }
1353
+ }
1354
+ return -1;
1355
+ };
1356
+
1357
+ /**
1358
+ * isFunction
1359
+ * @desc:判断是否是函数
1360
+ * @author huangbo
1361
+ * @date 2022年5月7日
1362
+ * @param {Object} [obj] - 对象
1363
+ **/
1364
+ var isFunction = function isFunction(obj) {
1365
+ return typeof obj === 'function' && typeof obj.nodeType !== 'number' && typeof obj.item !== 'function';
1366
+ };
1367
+
1368
+ /**
1369
+ * isLogged
1370
+ * @desc:是否登录(用于路由守卫中)
1371
+ * @author huangbo
1372
+ * @date 2022年5月7日
1373
+ * @param {object} [to] - 路由跳转信息
1374
+ * @param {object} [from] - 路由来源信息
1375
+ * @param {function} [next] - 跳转函数
1376
+ * @param {function} [exclude] - 不拦截的路由
1377
+ * @param {boolean} [open] - 是否新窗口打开
1378
+ * @param {boolean} [cookie] - 是否尝试采用
1379
+ * @param {sting} [loginPage] - 第三方登录页面地址
1380
+ * @param {boolean} [redirect] - 是否重定向(用于新脚手架)
1381
+ **/
1382
+ var isLogged = function isLogged(_ref8) {
1383
+ var to = _ref8.to,
1384
+ from = _ref8.from,
1385
+ next = _ref8.next,
1386
+ exclude = _ref8.exclude,
1387
+ open = _ref8.open,
1388
+ cookie = _ref8.cookie,
1389
+ loginPage = _ref8.loginPage,
1390
+ redirect = _ref8.redirect;
1391
+
1392
+ var logined = getStorage('logined');
1393
+ if (cookie === undefined) {
1394
+ cookie = getParams({ name: 'cookie' });
1395
+ }
1396
+ // eslint-disable-next-line eqeqeq
1397
+ if (logined || cookie == true || cookie == 1) {
1398
+ if (loginPage) {
1399
+ sessionStorage.setItem('loginPage', loginPage);
1400
+ }
1401
+ next();
1402
+ } else {
1403
+ var token = getStorage('token') || getStorage('Authorization');
1404
+ if (Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1405
+ var url = win.top.location.href;
1406
+ ajax({
1407
+ method: 'post',
1408
+ url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* authCenter */ "b"],
1409
+ data: to.query
1410
+ }).then(function (res) {
1411
+ if (res.rCode === 0) {
1412
+ switch (res.results.statusCode) {
1413
+ case 0:
1414
+ var storage = getStorage('storage');
1415
+ setStorage({
1416
+ type: storage,
1417
+ key: {
1418
+ ssId: res.results.ssId,
1419
+ token: res.results.token,
1420
+ Authorization: res.results.token,
1421
+ deviceUnique: res.results.deviceUnique
1422
+ }
1423
+ });
1424
+ next();
1425
+ break;
1426
+ case 1:
1427
+ break;
1428
+ case 2:
1429
+ break;
1430
+ case 3:
1431
+ var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1432
+ if (open) {
1433
+ win.open(href);
1434
+ } else {
1435
+ win.top.location.href = href;
1436
+ }
1437
+ break;
1438
+ }
1439
+ } else {
1440
+ if (token) {
1441
+ next();
1442
+ } else {
1443
+ alert(res.msg);
1444
+ }
1445
+ }
1446
+ }).catch(function (e) {});
1447
+ } else if (token || to.path === '/' || to.path === '/login' || to.path === '/404' || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1) {
1448
+ if (redirect && to.name && (to.name === 'login' || to.name === 'main')) {
1449
+ window.location.replace(urlJoinParams({ url: './' + to.name + '.html', param: to.query }));
1450
+ } else {
1451
+ next();
1452
+ }
1453
+ } else {
1454
+ if (loginPage) {
1455
+ win.top.location.replace(loginPage);
1456
+ } else if (document.referrer) {
1457
+ win.top.location.replace(document.referrer);
1458
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
1459
+ win.top.location.href = './login.html';
1460
+ } else {
1461
+ next('/login');
1462
+ }
1463
+ }
1464
+ }
1465
+ };
1466
+
1467
+ /**
1468
+ * isObject
1469
+ * @desc:判断是否是对象
1470
+ * @author huangbo
1471
+ * @date 2022年5月7日
1472
+ * @param {Object} [obj] - 对象
1473
+ **/
1474
+ var isObject = function isObject(obj) {
1475
+ var proto = void 0;
1476
+ var Ctor = void 0;
1477
+
1478
+ if (!obj || {}.toString.call(obj) !== '[object Object]') {
1479
+ return false;
1480
+ }
1481
+
1482
+ proto = Object.getPrototypeOf(obj);
1483
+ if (!proto) {
1484
+ return true;
1485
+ }
1486
+ var ObjectFunctionString = Object.prototype.hasOwnProperty.toString.call(Object);
1487
+ Ctor = Object.prototype.hasOwnProperty.call(proto, 'constructor') && proto.constructor;
1488
+ return typeof Ctor === 'function' && Object.prototype.hasOwnProperty.toString.call(Ctor) === ObjectFunctionString;
1489
+ };
1490
+
1491
+ /**
1492
+ * jointUrl
1493
+ * @desc:判断url地址是否以字符开头,没有则添加
1494
+ * @author huangbo
1495
+ * @date 2022年5月7日
1496
+ * @param {string} [reg] - 域名或者路径
1497
+ * @param {string/array} [url] - 地址
1498
+ * @param {boolean} [single] - 是否做js沙箱隔离
1499
+ **/
1500
+ var jointUrl = function jointUrl(_ref9) {
1501
+ var url = _ref9.url,
1502
+ reg = _ref9.reg;
1503
+
1504
+ if (startWith(url, ['https', 'http', 'blob:'], true) || !reg || !reg.length) {
1505
+ return url;
1506
+ }
1507
+ if (Array.isArray(reg)) {
1508
+ var newUrl = '';
1509
+ reg.forEach(function (item) {
1510
+ newUrl = startWith(url, item) ? url : item + url;
1511
+ });
1512
+ return newUrl;
1513
+ }
1514
+ return startWith(url, reg) ? url : reg + url;
1515
+ };
1516
+
1517
+ var loadJs = function loadJs(_ref10) {
1518
+ var url = _ref10.url,
1519
+ _ref10$type = _ref10.type,
1520
+ type = _ref10$type === undefined ? 'text/javascript' : _ref10$type,
1521
+ id = _ref10.id,
1522
+ _ref10$single = _ref10.single,
1523
+ single = _ref10$single === undefined ? true : _ref10$single;
1524
+
1525
+ return new Promise(function (resolve, reject) {
1526
+ var script = document.getElementById(id) || document.createElement('script');
1527
+ var src = script.getAttribute('src');
1528
+ if (src && src === url) {
1529
+ console.warn(id + '已存在');
1530
+ resolve();
1531
+ } else {
1532
+ id && script.setAttribute('id', id);
1533
+ script.setAttribute('type', type);
1534
+ script.setAttribute('src', url);
1535
+ document.getElementsByTagName('head')[0].appendChild(script);
1536
+ script.onreadystatechange = function () {
1537
+ resolve();
1538
+ };
1539
+ script.onload = function () {
1540
+ resolve();
1541
+ };
1542
+ script.onerror = function () {
1543
+ reject();
1544
+ };
1545
+ }
1546
+ });
1547
+ };
1548
+
1549
+ /**
1550
+ * loading
1551
+ * @desc:loading
1552
+ * @author huangbo
1553
+ * @date 2022年5月7日
1554
+ * @param {String} [text] - 显示的文本内容
1555
+ **/
1556
+ var loading = function loading($loading, res) {
1557
+ if (!$loading) {
1558
+ $loading = eoss_element__WEBPACK_IMPORTED_MODULE_4__["Loading"].service;
1559
+ }
1560
+ if (isObject(res)) {
1561
+ var config = extend({}, {
1562
+ target: win.top.document.body,
1563
+ fullscreen: true,
1564
+ background: 'rgba(0, 0, 0, 0.65)',
1565
+ spinner: 'el-icon-loading',
1566
+ text: '加载中...'
1567
+ }, res);
1568
+ return $loading(config);
1569
+ } else {
1570
+ var _loading = $loading({
1571
+ target: win.top.document.body,
1572
+ fullscreen: true,
1573
+ background: 'rgba(0, 0, 0, 0.65)',
1574
+ spinner: 'el-icon-loading',
1575
+ text: res ? res : '加载中...'
1576
+ });
1577
+ return _loading;
1578
+ }
1579
+ };
1580
+
1581
+ /**
1582
+ * mixColor
1583
+ * @desc:生成混合色
1584
+ * @author huangbo
1585
+ * @date 2022年5月7日
1586
+ * @param {string} [$color1] - 颜色值
1587
+ * @param {string} [$color2] - 颜色值
1588
+ * @param {string} [$n] - 百分比 0~1
1589
+ **/
1590
+ var mixColor = function mixColor($color1, $color2, $n) {
1591
+ var rgb1 = getRgb($color1);
1592
+ var rgb2 = getRgb($color2);
1593
+ var r = rgb1[0] * $n + rgb2[0] * (1 - $n);
1594
+ var g = rgb1[1] * $n + rgb2[1] * (1 - $n);
1595
+ var b = rgb1[2] * $n + rgb2[2] * (1 - $n);
1596
+ return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
1597
+ };
1598
+
1599
+ /**
1600
+ * overbrim
1601
+ * @desc:判断是否文字溢出
1602
+ * @author huangbo
1603
+ * @date 2022年5月7日
1604
+ * @param {String} [el] - 文字所在的dom
1605
+ **/
1606
+ var overbrim = function overbrim(el) {
1607
+ var w = el.offsetWidth;
1608
+ var s = el.scrollWidth;
1609
+ if (s > w) {
1610
+ return true;
1611
+ } else {
1612
+ return false;
1613
+ }
1614
+ };
1615
+
1616
+ /**
1617
+ * queryParams
1618
+ * @desc:对象转url地址的拼接参数
1619
+ * @author huangbo
1620
+ * @date 2022年5月7日
1621
+ * @param {Object} [obj] - 被转换的对象
1622
+ **/
1623
+ var queryParams = function queryParams(obj) {
1624
+ var arry = [];
1625
+ for (var i in obj) {
1626
+ arry.push(i + '=' + obj[i]);
1627
+ }
1628
+ if (arry.length) {
1629
+ return arry.join('&');
1630
+ }
1631
+ return false;
1632
+ };
1633
+
1634
+ /**
1635
+ * receiveMessage
1636
+ * @desc:接收发送信息
1637
+ * @author huangbo
1638
+ * @date 2022年5月7日
1639
+ * @param {object} [data] - 数据---其中type必须表示操作类型
1640
+ * @param {string} [url] - 消息源的 URI
1641
+ * @param {function} [callback] - 回调函数
1642
+ **/
1643
+ var receiveMessage = function receiveMessage(_ref11) {
1644
+ var _ref11$data = _ref11.data,
1645
+ data = _ref11$data === undefined ? {} : _ref11$data,
1646
+ url = _ref11.url,
1647
+ callback = _ref11.callback;
1648
+
1649
+ win.addEventListener('message', function (e) {
1650
+ if (url !== undefined) {
1651
+ var origin = e.origin || e.location.origin;
1652
+ if (origin !== url) {
1653
+ // 验证消息来源地址
1654
+ return;
1655
+ }
1656
+ }
1657
+ callback(e.data);
1658
+ });
1659
+ };
1660
+
1661
+ /**
1662
+ * removeStorage
1663
+ * @desc:删除本地储存数据
1664
+ * @author huangbo
1665
+ * @date 2022年5月7日
1666
+ * @param {String, Array} [key] - 获取的名称
1667
+ **/
1668
+ var removeStorage = function removeStorage(key) {
1669
+ if (Array.isArray(key)) {
1670
+ for (var i = 0; i < key.length; i++) {
1671
+ sessionStorage.removeItem(key[i]);
1672
+ localStorage.removeItem(key[i]);
1673
+ }
1674
+ } else if (key) {
1675
+ sessionStorage.removeItem(key);
1676
+ localStorage.removeItem(key);
1677
+ } else {
1678
+ sessionStorage.clear();
1679
+ localStorage.clear();
1680
+ }
1681
+ };
1682
+
1683
+ /**
1684
+ * replenish
1685
+ * @desc:补全小数位数
1686
+ * @author huangbo
1687
+ * @date 2022年5月7日
1688
+ * @param {string、number} [data] - 数字或字符串型数字
1689
+ * @param {number} [precision] - 需要的小数位数
1690
+ **/
1691
+ var replenish = function replenish(_ref12) {
1692
+ var data = _ref12.data,
1693
+ precision = _ref12.precision;
1694
+
1695
+ if (data && precision && precision > 0) {
1696
+ var power = Math.pow(10, precision);
1697
+ var res = data === 'string' ? Number(data) : data;
1698
+ res = String(Math.round(res * power) / power);
1699
+ var len = res.indexOf('.');
1700
+ if (len < 0) {
1701
+ len = res.length;
1702
+ res += '.';
1703
+ }
1704
+ while (res.length <= len + precision) {
1705
+ res += '0';
1706
+ }
1707
+ return parseFloat(res);
1708
+ }
1709
+ return data;
1710
+ };
1711
+
1712
+ /**
1713
+ * rgbToHsv
1714
+ * @desc:rgb转化成hsv
1715
+ * @author huangbo
1716
+ * @date 2022年5月7日
1717
+ * @param {string} [$color] - 颜色值
1718
+ **/
1719
+ var rgbToHsv = function rgbToHsv($color) {
1720
+ var rgb = getRgb($color);
1721
+ var $red = rgb[0];
1722
+ var $green = rgb[1];
1723
+ var $blue = rgb[2];
1724
+ var $max = Math.max($red, $green, $blue);
1725
+ var $min = Math.min($red, $green, $blue);
1726
+ var $diff = $max - $min;
1727
+ var $h = 0;
1728
+ if ($max === $min) {
1729
+ $h = 0;
1730
+ } else if ($max === $red) {
1731
+ $h = 60 * ($green - $blue) / $diff + ($green > $blue - 1 ? 0 : 360);
1732
+ } else if ($max === $green) {
1733
+ $h = 60 * ($blue - $red) / $diff + 120;
1734
+ } else if ($max === $blue) {
1735
+ $h = 60 * ($red - $green) / $diff + 240;
1736
+ }
1737
+ var $s = $max === 0 ? 0 : $diff / $max;
1738
+ var $v = $max / 255;
1739
+ return [$h, $s, $v];
1740
+ };
1741
+
1742
+ /**
1743
+ * sendMessage
1744
+ * @desc:向iframe发送信息
1745
+ * @author huangbo
1746
+ * @date 2022年5月7日
1747
+ * @param {object} [data] - 数据---其中type必须表示操作类型
1748
+ * @param {string} [url] - 指定的消息发送URI地址
1749
+ **/
1750
+ var sendMessage = function sendMessage(_ref13) {
1751
+ var _ref13$data = _ref13.data,
1752
+ data = _ref13$data === undefined ? {} : _ref13$data,
1753
+ url = _ref13.url;
1754
+
1755
+ var iframes = document.getElementsByTagName('iframe');
1756
+ for (var i = 0; i < iframes.length; i++) {
1757
+ if (url !== undefined) {
1758
+ if (iframes[i].contentWindow.location.href === url) {
1759
+ iframes[i].contentWindow.postMessage(data, url);
1760
+ return;
1761
+ }
1762
+ } else {
1763
+ iframes[i].contentWindow.postMessage(data);
1764
+ }
1765
+ }
1766
+ };
1767
+
1768
+ /**
1769
+ * setFavicon
1770
+ * @desc:设置浏览器页签窗口图标
1771
+ * @author huangbo
1772
+ * @date 2022年5月7日
1773
+ * @param {String} [url] - 图标地址
1774
+ **/
1775
+ var setFavicon = function setFavicon(url) {
1776
+ var link = document.querySelector("link[rel*='icon']");
1777
+ if (link) {
1778
+ link.href = url;
1779
+ } else {
1780
+ link = document.createElement('link');
1781
+ link.type = 'image/x-icon';
1782
+ link.rel = 'shortcut icon';
1783
+ link.href = url;
1784
+ document.getElementsByTagName('head')[0].appendChild(link);
1785
+ }
1786
+ };
1787
+
1788
+ /**
1789
+ * setStorage
1790
+ * @desc:设置本地储存数据
1791
+ * @author huangbo
1792
+ * @date 2022年5月7日
1793
+ * @param {String} [type] - 储存类型
1794
+ * @param {String, Array, Object} [key] - 数据的名称,array类型表示多个key保存同一个value,object类型时对象的属性名称作为key属性值作为value
1795
+ * @param {String} [value] - 数据的值
1796
+ **/
1797
+ var setStorage = function setStorage(_ref14) {
1798
+ var type = _ref14.type,
1799
+ key = _ref14.key,
1800
+ value = _ref14.value;
1801
+
1802
+ if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
1803
+ value = JSON.stringify(value);
1804
+ }
1805
+ if (type === undefined || type === 'sessionStorage') {
1806
+ if (typeof key === 'string') {
1807
+ sessionStorage.setItem(key, value);
1808
+ } else if (Array.isArray(key)) {
1809
+ for (var i in key) {
1810
+ sessionStorage.setItem(key[i], value);
1811
+ }
1812
+ } else {
1813
+ for (var _i5 in key) {
1814
+ var val = _typeof(key[_i5]) === 'object' ? JSON.stringify(key[_i5]) : key[_i5];
1815
+ sessionStorage.setItem(_i5, val);
1816
+ }
1817
+ }
1818
+ } else {
1819
+ if (typeof key === 'string') {
1820
+ localStorage.setItem(key, value);
1821
+ } else if (Array.isArray(key)) {
1822
+ for (var _i6 in key) {
1823
+ localStorage.setItem(key[_i6], value);
1824
+ }
1825
+ } else {
1826
+ for (var _i7 in key) {
1827
+ var _val = _typeof(key[_i7]) === 'object' ? JSON.stringify(key[_i7]) : key[_i7];
1828
+ localStorage.setItem(_i7, _val);
1829
+ }
1830
+ }
1831
+ }
1832
+ };
1833
+ /**
1834
+ * startWith
1835
+ * @desc:判断值是否以指定字符开头
1836
+ * @author huangbo
1837
+ * @date 2022年5月7日
1838
+ * @param {string} [value] - 被查找的字符串
1839
+ * @param {string,array} [reg] - 指定字符串
1840
+ * @param {boolean} [or] - 或者(等同于||)
1841
+ **/
1842
+ var startWith = function startWith(value, reg) {
1843
+ var or = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1844
+
1845
+ if (Array.isArray(reg)) {
1846
+ var flag = true;
1847
+ for (var i = 0; i < reg.length; i++) {
1848
+ var item = reg[i];
1849
+ if (new RegExp('^' + item).test(value)) {
1850
+ if (or) {
1851
+ flag = true;
1852
+ return true;
1853
+ }
1854
+ } else {
1855
+ flag = false;
1856
+ }
1857
+ }
1858
+ return flag;
1859
+ }
1860
+ if (new RegExp('^' + reg).test(value)) {
1861
+ return true;
1862
+ }
1863
+ return false;
1864
+ };
1865
+
1866
+ /**
1867
+ * throttle
1868
+ * @desc:添加js内容
1869
+ * @author huangbo
1870
+ * @date 2022年5月7日
1871
+ * @param {Function} [fn] - 函数
1872
+ * @param {Number} [wait] - 延迟毫秒数
1873
+ **/
1874
+ var throttle = function throttle(fn, wait) {
1875
+ var timer = null;
1876
+ var startTime = Date.now();
1877
+ return function () {
1878
+ var curTime = Date.now();
1879
+ var remaining = wait - (curTime - startTime);
1880
+ var context = this;
1881
+ var args = arguments;
1882
+ clearTimeout(timer);
1883
+ if (remaining <= 0) {
1884
+ fn.apply(context, args);
1885
+ startTime = Date.now();
1886
+ } else {
1887
+ timer = setTimeout(fn, remaining); // 如果小于wait 保证在差值时间后执行
1888
+ }
1889
+ };
1890
+ };
1891
+
1892
+ /**
1893
+ * timeCycle
1894
+ * @desc:时间转换成上午下午晚上
1895
+ * @author huangbo
1896
+ * @date 2022年5月7日
1897
+ * @param {String, Number} [date] - 时间字符串或时间戳
1898
+ **/
1899
+ var timeCycle = function timeCycle(date) {
1900
+ var obj = void 0;
1901
+ if (date) {
1902
+ obj = new Date(date);
1903
+ } else {
1904
+ obj = new Date();
1905
+ }
1906
+ var h = obj.getHours(); // 获取小时
1907
+ var period = '';
1908
+ h < 12 ? period = '上午' : h < 18 ? period = '下午' : period = '晚上';
1909
+ return period;
1910
+ };
1911
+
1912
+ /**
1913
+ * toFixed
1914
+ * @desc:浮点数保留小数位
1915
+ * @author huangbo
1916
+ * @date 2022年5月7日
1917
+ * @param {number} [$float] - 要转换的数值
1918
+ * @param {number} [$digits] - 小数位数
1919
+ **/
1920
+ var toFixed = function toFixed($float, $digits) {
1921
+ var $pow = Math.pow(10, $digits);
1922
+ return Math.round($float * $pow) / $pow;
1923
+ };
1924
+ /**
1925
+ * toFunction
1926
+ * 兼容ie
1927
+ * @desc:函数字符串转函数
1928
+ * @author huangbo
1929
+ * @date 2022年5月7日
1930
+ * @param {string} [str] - 函数字符串
1931
+ **/
1932
+ var toFunction = function toFunction(str) {
1933
+ if (str.indexOf('=>') > -1) {
1934
+ var renders = str.split('=>');
1935
+ var args = renders[0].replace('(', '').replace(')', '').split(',');
1936
+ // eslint-disable-next-line no-control-regex
1937
+ var fnStr = renders[1].trim().replace(new RegExp('\n', 'gm'), '').replace(new RegExp('\t', 'gm'), '').replace(new RegExp('^\\{+|\\}+$', 'g'), '');
1938
+ var fn = void 0;
1939
+ if (args.length) {
1940
+ fn = new (Function.prototype.bind.apply(Function, [null].concat(args, [fnStr])))();
1941
+ } else {
1942
+ fn = new Function(fnStr);
1943
+ }
1944
+ return fn;
1945
+ } else {
1946
+ // eslint-disable-next-line no-eval
1947
+ return eval(str);
1948
+ }
1949
+ };
1950
+
1951
+ /**
1952
+ * updateTheme
1953
+ * @desc:更新主题色
1954
+ * @author huangbo
1955
+ * @date 2022年5月7日
1956
+ * @param {string} [$color] - 颜色值
1957
+ **/
1958
+ var updateTheme = function updateTheme($color, send) {
1959
+ $color = $color ? $color : '#409eff';
1960
+ if (send === undefined) {
1961
+ send = true;
1962
+ }
1963
+ document.documentElement.style.setProperty('--theme-primary', $color);
1964
+ for (var i = 1; i < 11; i++) {
1965
+ if (i === 6) {
1966
+ document.documentElement.style.setProperty('--theme-primary-light-' + i, $color);
1967
+ } else {
1968
+ var light = getColor($color, i);
1969
+ document.documentElement.style.setProperty('--theme-primary-light-' + i, light);
1970
+ }
1971
+ }
1972
+ if (send) {
1973
+ sendMessage({ data: { type: 'setTheme' } });
1974
+ }
1975
+ };
1976
+
1977
+ /**
1978
+ * urlJoinParams
1979
+ * @desc:对象转url拼接参数
1980
+ * @author huangbo
1981
+ * @date 2022年5月7日
1982
+ * @param {Object} [url] - url地址
1983
+ * @param {Object} [param] - 被转换的对象
1984
+ **/
1985
+ var urlJoinParams = function urlJoinParams(_ref15) {
1986
+ var url = _ref15.url,
1987
+ param = _ref15.param,
1988
+ timestamp = _ref15.timestamp;
1989
+
1990
+ var arry = decodeURI(url).split('?');
1991
+ var times = new Date().getTime();
1992
+ var params = timestamp ? { _tt: times } : {};
1993
+ if (arry.length > 1) {
1994
+ var search = arry[1].split('&');
1995
+ search.forEach(function (item) {
1996
+ var items = item.split('=');
1997
+ params[items[0]] = items[1];
1998
+ });
1999
+ }
2000
+ '&_tt=' + new Date().getTime();
2001
+ params = extend(true, params, param);
2002
+ var str = queryParams(params);
2003
+ if (str) {
2004
+ return arry[0] + '?' + str;
2005
+ }
2006
+ return arry[0];
2007
+ };
2008
+ /**
2009
+ * uuid
2010
+ * @desc:唯一id
2011
+ * @author huangbo
2012
+ * @date 2022年5月7日
2013
+ * @param {number} [len] - 长度
2014
+ **/
2015
+ var uuid = function uuid(len) {
2016
+ len = len || 32;
2017
+ var s = 4;
2018
+ var str = '';
2019
+ function S4() {
2020
+ return ((1 + Math.random()) * 0x10000 | 0).toString(16).substring(1);
2021
+ }
2022
+ for (var i = 0; i < Math.ceil(len / s); i++) {
2023
+ str += S4();
2024
+ }
2025
+ return str.substring(0, len);
2026
+ };
2027
+
2028
+ /**
2029
+ * watermark
2030
+ * @desc:水印
2031
+ * @author huangbo
2032
+ * @date 2022年5月7日
2033
+ * @param {object} [option] - 配置参数
2034
+ **/
2035
+ var watermark = function watermark(option) {
2036
+ // 默认设置
2037
+ var config = {
2038
+ rows: 5, // 水印行数
2039
+ cols: 5,
2040
+ html: '水印示例', // 水印文本内容
2041
+ angle: -15, // 旋转角度
2042
+ color: '#000', // 水印文字颜色
2043
+ width: 100, // 水印宽度
2044
+ height: 20, // 水印高度
2045
+ lineHeight: 20, // 水印行高
2046
+ opacity: 0.1, // 水印透明度
2047
+ fontSize: 14, // 水印文字字体大小
2048
+ fontWeight: 400, // 水印字体粗细
2049
+ fontFamily: '微软雅黑', // 水印文字字体类型
2050
+ textAlign: 'center', // 水印文字居中类型
2051
+ zIndex: 999999 // 水印文字的层级
2052
+ };
2053
+ var options = option ? extend(true, config, typeof option === 'string' ? { html: option } : option) : config;
2054
+ var wrap = document.createElement('div');
2055
+ // 禁止选择和复制
2056
+ wrap.onselectstart = wrap.oncontextmenu = function () {
2057
+ return false;
2058
+ };
2059
+ var docFrag = document.createDocumentFragment();
2060
+ var rows = options.rows,
2061
+ cols = options.cols,
2062
+ html = options.html,
2063
+ angle = options.angle,
2064
+ color = options.color,
2065
+ height = options.height,
2066
+ lineHeight = options.lineHeight,
2067
+ opacity = options.opacity,
2068
+ fontSize = options.fontSize,
2069
+ fontWeight = options.fontWeight,
2070
+ fontFamily = options.fontFamily,
2071
+ textAlign = options.textAlign,
2072
+ zIndex = options.zIndex;
2073
+
2074
+
2075
+ wrap.style.cssText = 'display: flex;align-items: center;justify-content: flex-start;flex-wrap: wrap;align-content: space-between;position: fixed;left: 50%;top: 50%;transform: translate(-50%, -50%);height: 100vh;width: 100vw;pointer-events: none;overflow: hidden;background: transparent;z-index: ' + zIndex + ';';
2076
+ var num = rows * cols;
2077
+ for (var i = 0; i < num; i++) {
2078
+ var item = document.createElement('div');
2079
+ item.innerHTML = html;
2080
+ item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + 100 / cols + '%;height: ' + height + 'px;line-height: ' + lineHeight + 'px;font-size:' + fontSize + 'px;font-weight: ' + fontWeight + ';font-family: ' + fontFamily + ';text-align: ' + textAlign + ';transform: rotate(' + angle + 'deg);opacity: ' + opacity + ';';
2081
+ docFrag.appendChild(item);
2082
+ }
2083
+ wrap.appendChild(docFrag);
2084
+ document.body.appendChild(wrap);
2085
+ };
2086
+ /* harmony default export */ __webpack_exports__["a"] = ({
2087
+ ajax: ajax,
2088
+ arrUnique: arrUnique,
2089
+ browser: browser,
2090
+ debounce: debounce,
2091
+ delUrlParam: delUrlParam,
2092
+ domEval: domEval,
2093
+ esDecode: esDecode,
2094
+ esEncode: esEncode,
2095
+ esmEncrypt: esmEncrypt,
2096
+ esmDecode: esmDecode,
2097
+ exclAttribute: exclAttribute,
2098
+ exportXls: exportXls,
2099
+ extend: extend,
2100
+ formatDate: formatDate,
2101
+ getObjectType: getObjectType,
2102
+ getParams: getParams,
2103
+ getRgb: getRgb,
2104
+ getScript: getScript,
2105
+ getStorage: getStorage,
2106
+ getStyle: getStyle,
2107
+ getTypeName: getTypeName,
2108
+ getValues: getValues,
2109
+ handlerUrl: handlerUrl,
2110
+ hasChars: hasChars,
2111
+ hasClass: hasClass,
2112
+ hsvTorgb: hsvTorgb,
2113
+ identical: identical,
2114
+ indexOfObj: indexOfObj,
2115
+ isFunction: isFunction,
2116
+ isLogged: isLogged,
2117
+ isObject: isObject,
2118
+ jointUrl: jointUrl,
2119
+ loadJs: loadJs,
2120
+ loading: loading,
2121
+ mixColor: mixColor,
2122
+ overbrim: overbrim,
2123
+ queryParams: queryParams,
2124
+ receiveMessage: receiveMessage,
2125
+ removeStorage: removeStorage,
2126
+ replenish: replenish,
2127
+ rgbToHsv: rgbToHsv,
2128
+ sendMessage: sendMessage,
2129
+ setFavicon: setFavicon,
2130
+ setStorage: setStorage,
2131
+ startWith: startWith,
2132
+ throttle: throttle,
2133
+ timeCycle: timeCycle,
2134
+ toFixed: toFixed,
2135
+ toFunction: toFunction,
2136
+ updateTheme: updateTheme,
2137
+ urlJoinParams: urlJoinParams,
2138
+ uuid: uuid,
2139
+ watermark: watermark,
2140
+ win: win
2141
+ });
2142
+
2143
+ /***/ }),
2144
+
2145
+ /***/ 1:
2146
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2147
+
2148
+ "use strict";
2149
+ /* unused harmony export doCaLogin */
2150
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return doUserLogin; });
2151
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return doQrLogin; });
2152
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return logout; });
2153
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return initLogin; });
2154
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jb", function() { return switchUserTo; });
2155
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return changeImg; });
2156
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return getLoginCode; });
2157
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return doCodeLogin; });
2158
+ /* unused harmony export updateCode */
2159
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return getModifyPassCode; });
2160
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return codeModifyPass; });
2161
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return authCenter; });
2162
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return initModifyPassword; });
2163
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return doWechatQrLogin; });
2164
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return mainConfig; });
2165
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return initUserSet; });
2166
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Mb", function() { return updateUserInfo; });
2167
+ /* unused harmony export getUserImgUrl */
2168
+ /* unused harmony export getDoorIndex */
2169
+ /* unused harmony export refreshOnlineUsers */
2170
+ /* unused harmony export getQuickMenuIds */
2171
+ /* unused harmony export getApplicationIdArray */
2172
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return getComplexApplications; });
2173
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return getComplexApplicationsNew; });
2174
+ /* unused harmony export getUserCustomInfo */
2175
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lb", function() { return updateUserCustomInfo; });
2176
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "kb", function() { return sysMsgPage; });
2177
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return ignoreSysMsg; });
2178
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return ignoreAllSysMsg; });
2179
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return getAdjunctProperties; });
2180
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Qb", function() { return uploads; });
2181
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ob", function() { return uploadOnlyOne; });
2182
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return getAdjunctFileInfos; });
2183
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Pb", function() { return uploadSort; });
2184
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return downloadByAdjunctId; });
2185
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Nb", function() { return uploadDownloads; });
2186
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return previewAdjunct; });
2187
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ab", function() { return previewAdjunct2; });
2188
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bb", function() { return previewAdjunctOffice; });
2189
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return delAdjunct; });
2190
+ /* unused harmony export upload_updateClassify */
2191
+ /* unused harmony export getDeleteAdjunctFileInfos */
2192
+ /* unused harmony export getPictureBase64 */
2193
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return getSelectorOrgTree; });
2194
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return getSelectorOrgDetail; });
2195
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return getOrgMainTree; });
2196
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return getSelectOrgsubids; });
2197
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return findSysCode; });
2198
+ /* unused harmony export findUserBaseInfo */
2199
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return gethelpdoc; });
2200
+ /* unused harmony export getCurrentuser */
2201
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return mainDetail; });
2202
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "xb", function() { return toStartFlow; });
2203
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ub", function() { return tempSave; });
2204
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return commonOpion; });
2205
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addCommonOpion; });
2206
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return editCommonOpion; });
2207
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eb", function() { return saveCommonOpinion; });
2208
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Kb", function() { return updateCommonOpinion; });
2209
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return deleteCommonOpion; });
2210
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return getProcessDefList; });
2211
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return getNodeInfo; });
2212
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return findCodeValues; });
2213
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return findSysCodes; });
2214
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return getNotificationMsg; });
2215
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return getHandleInfoHtml; });
2216
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lb", function() { return taskHandleHtml; });
2217
+ /* unused harmony export getView */
2218
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cb", function() { return register; });
2219
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return pendedhistoryList; });
2220
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ab", function() { return toTaskRejectHtml; });
2221
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nb", function() { return taskRejectHtml; });
2222
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "yb", function() { return toStartTaskRead; });
2223
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zb", function() { return toStartTaskReadIndex; });
2224
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mb", function() { return taskReadHtml; });
2225
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "db", function() { return rejectAndEnd; });
2226
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wb", function() { return toSendMsg; });
2227
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ib", function() { return sendMsg; });
2228
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return endFlowHtml; });
2229
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return handleInfo; });
2230
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return loginUserInfo; });
2231
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rb", function() { return wss; });
2232
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ib", function() { return topic; });
2233
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return getPresetCustomInfo; });
2234
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return getPresetNodeInfo; });
2235
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Eb", function() { return toTaskTransferIndex; });
2236
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rb", function() { return taskTransfer; });
2237
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "vb", function() { return toPresetInfoListIndex; });
2238
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return deletePresetInfo; });
2239
+ /* unused harmony export historyListJson */
2240
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return pendedhistoryListJson; });
2241
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return pressListJson; });
2242
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return deleteFlow; });
2243
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return isCanStartSubFlow; });
2244
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fb", function() { return toTaskUnionExamine; });
2245
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sb", function() { return taskUnionExamine; });
2246
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Db", function() { return toTaskTakeAdvice; });
2247
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "qb", function() { return taskTakeAdvice; });
2248
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cb", function() { return toTaskStartDraft; });
2249
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pb", function() { return taskStartDraft; });
2250
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bb", function() { return toTaskReview; });
2251
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ob", function() { return taskReview; });
2252
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Gb", function() { return toTaskUnionSeal; });
2253
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tb", function() { return taskUnionSeal; });
2254
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hb", function() { return toTwoOfficesDispatch; });
2255
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Jb", function() { return twoOfficesDispatch; });
2256
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hb", function() { return sendList; });
2257
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gb", function() { return sendInfo; });
2258
+ /* unused harmony export sendSave */
2259
+ /* unused harmony export sendUpdate */
2260
+ /* unused harmony export sendDelete */
2261
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fb", function() { return sendBatch; });
2262
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return formContents; });
2263
+ // 登录
2264
+ var doCaLogin = '/sso2/signIn/auth/doCaLogin'; // ca登录认证
2265
+ var doUserLogin = '/sso2/signIn/auth/doUserLogin'; // 一般的账号密码认证含验证码验证
2266
+ var doQrLogin = '/sso2/signIn/auth/doQrLogin'; // 扫码登录
2267
+ var logout = '/sso2/signIn/auth/logout'; // 退出登录
2268
+ var initLogin = '/sso2/signIn/auth/initLogin'; // 初始化登录页面参数
2269
+ var switchUserTo = '/sso2/signIn/auth/switchTo'; // 切换登录用户; 身份切换
2270
+ var changeImg = '/sso2/signIn/auth/changeImg'; // 获取图片验证码
2271
+ var getLoginCode = '/sso2/signIn/auth/getLoginCode'; // 登录获取短信、邮箱验证码
2272
+ var doCodeLogin = '/sso2/signIn/auth/doCodeLogin'; // 短信、邮箱验证码登录
2273
+ var updateCode = '/sso2/signIn/assembly/getSmsModifyPassVerificationCode'; // 获取短信验证码(修改密码)
2274
+ var getModifyPassCode = '/sso2/signIn/assembly/getModifyPassCode'; // 获取修改密码的短信、邮箱验证码
2275
+ var codeModifyPass = '/sso2/signIn/assembly/codeModifyPass'; // 验证码重置密码
2276
+ var authCenter = '/sso2/authCenter/login'; // 单点登录认证中心
2277
+ var initModifyPassword = '/sso2/signIn/assembly/initModifyPassword'; // 初始化密码修改信息
2278
+ var doWechatQrLogin = '/sso2/signIn/auth/doWechatQrLogin'; // 微信扫码登录
2279
+ // 框架
2280
+ var mainConfig = '/main2/main/mainConfig'; // 获取主页面配置
2281
+ var initUserSet = '/main2/main/initUserSet'; // 获取用户信息
2282
+ var updateUserInfo = '/main2/main/updateUserInfo'; // 更新用户信息
2283
+ var getUserImgUrl = '/main2/main/getUserImgUrl'; // 获取当前用户头像地址
2284
+ var getDoorIndex = '/main2/main/getDoorIndex'; // 获取当前用户所在机构门户地址
2285
+ var refreshOnlineUsers = '/main/user/refreshOnlineUsers.dhtml'; // 在线人数
2286
+ var getQuickMenuIds = '/main2/main/getQuickMenuIds'; // 获取已绑定的快捷菜单ids; 返回; 分割的字符串
2287
+ var getApplicationIdArray = '/main2/main/getApplicationIdArray'; // 获取应用父id数组
2288
+ var getComplexApplications = '/main2/menu/getComplexApplications'; // 获取当前用户菜单; 含页签菜单格式的数据
2289
+ var getComplexApplicationsNew = '/main2/menu/getComplexApplicationsNew'; // 获取当前用户应用菜单; 含页签菜单格式的数据
2290
+ var getUserCustomInfo = '/main2/main/getUserCustomInfo'; // 获取主题样式
2291
+ var updateUserCustomInfo = '/main2/main/updateUserCustomInfo'; // 更新主题样式
2292
+ // 框架 - 系统消息
2293
+ var sysMsgPage = '/main2/notify/sysMsgPage'; // 获取系统消息
2294
+ var ignoreSysMsg = '/main2/notify/ignoreSysMsg'; // 忽略系统消息
2295
+ var ignoreAllSysMsg = '/main2/notify/ignoreAllSysMsg'; // 忽略全部系统消息
2296
+ // 附件相关
2297
+ var getAdjunctProperties = '/main2/mecpfileManagement/getAdjunctProperties'; // 获取附件扩展类型大小
2298
+ var uploads = '/main2/mecpfileManagement/upload'; // 上传接口
2299
+ var uploadOnlyOne = '/main2/mecpfileManagement/uploadOnlyOne'; // 上传接口(覆盖之前文件)
2300
+ var getAdjunctFileInfos = '/main2/mecpfileManagement/getAdjunctFileInfos'; // 附件列表
2301
+ var uploadSort = '/main2/mecpfileManagement/sort'; // 根据附件的ids排序附件
2302
+ var downloadByAdjunctId = '/main2/mecpfileManagement/downloadByAdjunctId'; // 下载附件
2303
+ var uploadDownloads = '/main2/mecpfileManagement/uploadDownloads'; // 批量下载//
2304
+ var previewAdjunct = '/main2/mecpfileManagement/previewAdjunct'; // 预览附件
2305
+ var previewAdjunct2 = '/main2/mecpfileManagement/previewAdjunct2/'; // 预览附件(带文件名)
2306
+ var previewAdjunctOffice = '/document/webDocument/documentIndex.dhtml'; // 预览附件word excel ppt
2307
+ var delAdjunct = '/main2/mecpfileManagement/delAdjunct'; // 删除附件
2308
+ var upload_updateClassify = '/main2/mecpfileManagement/updateClassify'; // 根据附件id保存该附件的分类信息
2309
+ var getDeleteAdjunctFileInfos = '/main2/mecpfileManagement/getDeleteAdjunctFileInfos'; // 根据业务id和附件code获取相关已删除附件的元数据列表
2310
+ var getPictureBase64 = '/main2/mecpfileManagement/getPictureBase64'; // 获取图片的base64编码
2311
+ // 组织机构树
2312
+ var getSelectorOrgTree = '/sys/v1/mecpSys/getSelectorOrgTree.dhtml';
2313
+ // 选择器选择内容
2314
+ var getSelectorOrgDetail = '/sys/v1/mecpSys/getSelectorOrgDetail.dhtml';
2315
+ // 业务组织中心树
2316
+ var getOrgMainTree = '/sys/v1/mecpSys/getOrgMainTree.dhtml';
2317
+ // 业务组织中心树下级
2318
+ var getSelectOrgsubids = '/sys/v1/mecpSys/getSelectOrgsubids.dhtml';
2319
+ // 代码表
2320
+ var findSysCode = '/sys/v1/mecpSys/findSysCode.dhtml';
2321
+ // 获取用户基本信息
2322
+ var findUserBaseInfo = '/sys/v1/mecpSys/findUserBaseInfo.dhtml';
2323
+ // 说明文档
2324
+ var gethelpdoc = '/sys/v1/mecpSys/gethelpdoc.json';
2325
+ // 获取当前用户信息
2326
+ var getCurrentuser = '/sys/api/getCurrentuser.dhtml';
2327
+ // 获取主题JSON
2328
+ var mainDetail = '/config/configLayoutTheme/detail';
2329
+ // -------------------- 流程接口 --------------------------
2330
+ // 获取节点信息
2331
+ // export const toStartFlow = '/api/mecp/v1/mecpItask/toStartFlow.json';
2332
+ var toStartFlow = '/bpm/bpmBackend/toStartFlow';
2333
+ // 暂存数据
2334
+ var tempSave = '/oa/task/taskHandle/tempSave.dhtml';
2335
+ // 获取常用意见
2336
+ // /oa/commonOpinionsManager/getOpinionsList.dhtml /api/v1/mecpIpending/commonOpion.json
2337
+ // /api/v1/mecpIpending/commonOpion.json
2338
+ var commonOpion = '/bpm/commonOpinionsManager/list';
2339
+ // 添加常用意见
2340
+ var addCommonOpion = '/bpm/commonOpinionsManager/add';
2341
+ // 获取常用意见编辑信息
2342
+ var editCommonOpion = '/bpm/commonOpinionsManager/edit';
2343
+ // 常用意见新增
2344
+ var saveCommonOpinion = '/oa/commonOpinionsManager/save.dhtml';
2345
+ // 常用意见修改
2346
+ var updateCommonOpinion = '/oa/commonOpinionsManager/update.dhtml';
2347
+ var deleteCommonOpion = '/oa/commonOpinionsManager/delete.dhtml';
2348
+ // 获取选择流程
2349
+ // export const getProcessDefList =
2350
+ // '/api/mecp/v1/mecpItask/getProcessDefList.json';
2351
+ var getProcessDefList = '/bpm/bpmBackend/toStartFlowIndex';
2352
+ // 获取下步办理人 /api/mecp/v1/mecpItask/getNodeInfo.json
2353
+ var getNodeInfo = '/oa/task/taskHandle/getNodeInfo.dhtml';
2354
+
2355
+ // 系统消息
2356
+ // 通知方式
2357
+ var findCodeValues = '/bpm/bpmCommon/findCodeValues';
2358
+ var findSysCodes = '/oa/task/taskHandle/getDefaultNotificationType.dhtml';
2359
+ // 获取通知消息
2360
+ var getNotificationMsg = '/oa/task/taskHandle/getNotificationMsg.dhtml';
2361
+ // 获取审核页面数据
2362
+ var getHandleInfoHtml = '/bpm/bpmBackend/toTaskHandleIndex.dhtml';
2363
+ // export const getHandleInfoHtml =
2364
+ // '/bpm/bpmBackend/toTaskHandleIndex.dhtml';
2365
+ // 获取节点信息(获取节点属性及办理人)
2366
+ // export const getNodeInfoHtml = '/api/mecp/v1/mecpItask/getNodeInfoHtml.json';
2367
+ // 提交办理
2368
+ var taskHandleHtml = '/oa/task/taskHandle/taskHandle.dhtml';
2369
+ // 获取流程图
2370
+ var getView = '/bpm/service/diagram/view.html';
2371
+ // 开始流程
2372
+ var register = '/oa/task/taskHandle/startFlow.dhtml';
2373
+ // 获取流程列表
2374
+ var pendedhistoryList = '/api/v1/mecpIpending/pendedhistoryList.json';
2375
+ // 获取审核按钮信息
2376
+ // export const getHandleButtonHtml =
2377
+ // '/api/mecp/v1/mecpItask/getHandleButtonHtml.json';
2378
+ // 获取驳回页面信息
2379
+ var toTaskRejectHtml = '/bpm/bpmBackend/toTaskReject';
2380
+ // 驳回提交
2381
+ var taskRejectHtml = '/bpm/bpmBackend/taskReject';
2382
+ // 获取分阅信息
2383
+ var toStartTaskRead = '/bpm/bpmBackend/toStartTaskRead';
2384
+ // 获取分阅办理页面
2385
+ var toStartTaskReadIndex = '/bpm/bpmBackend/toTaskReadIndex';
2386
+ // 分阅提交
2387
+ var taskReadHtml = 'bpm/task/taskHandle/taskRead.dhtml';
2388
+ // 驳回并办结
2389
+ var rejectAndEnd = '/bpm/task/taskHandle/rejectAndEnd.dhtml';
2390
+ // 核稿通知
2391
+ var toSendMsg = '/bpm/bpmBackend/toSendMsgIndex';
2392
+ // 核稿通知提交
2393
+ var sendMsg = 'bpm/task/taskHandle/sendMsg.dhtml';
2394
+ // 直接办结
2395
+ var endFlowHtml = '/bpm/task/taskHandle/endFlow.dhtml';
2396
+ // 获取用户信息
2397
+ // export const findUserBaseInfos = '/api/v1/mecpSys/findUserBaseInfo.dhtml';
2398
+ // 搜索用户信息
2399
+ var handleInfo = '/oa/task/taskHandle/handleInfo.dhtml';
2400
+ // 获取当前用户信息
2401
+ var loginUserInfo = '/bpm/bpmCommon/loginUserInfo';
2402
+
2403
+ // WebSocket
2404
+ var wss = window.wss || '/main2/ws';
2405
+ // 订阅
2406
+ var topic = '/user/topic/all';
2407
+ // 流程预设
2408
+ var getPresetCustomInfo = '/oa/task/taskHandle/getPresetCustomInfo.dhtml';
2409
+ // 办理人预设
2410
+ var getPresetNodeInfo = '/oa/task/taskHandle/getPresetNodeInfo.dhtml';
2411
+ // 获取转办页面数据
2412
+ var toTaskTransferIndex = '/bpm/bpmBackend/toTaskTransferIndex';
2413
+ // 转办提交按钮
2414
+ var taskTransfer = '/bpm/task/taskHandle/taskTransfer.dhtml';
2415
+ // 流程预设列表
2416
+ var toPresetInfoListIndex = '/bpm/bpmBackend/toPresetInfoListIndex';
2417
+ // 流程预设置为失效
2418
+ var deletePresetInfo = '/bpm/task/taskHandle/deletePresetInfo.dhtml';
2419
+ // 流程列表
2420
+ var historyListJson = '/oa/pendedhistoryManager/historyListJson.dhtml';
2421
+ // 获取流程列表配置
2422
+ var pendedhistoryListJson = '/oa/pendedhistoryManager/pendedhistoryListJson';
2423
+ // 获取催办列表
2424
+ var pressListJson = '/oa/wfUrgeRecord/listJson.dhtml';
2425
+ // 删除流程列表节点
2426
+ var deleteFlow = '/oa/pendedhistoryManager/delete.dhtml';
2427
+ // 是否允许启动子流程(必经节点)
2428
+ var isCanStartSubFlow = '/bpm/task/taskHandle/isCanStartSubFlow.dhtml';
2429
+ // 联合审核
2430
+ var toTaskUnionExamine = '/bpm/bpmBackend/toTaskUnionExamine';
2431
+ // 联合审核提交
2432
+ var taskUnionExamine = '/bpm/task/taskHandle/taskUnionExamine.dhtml';
2433
+ // 征求意见
2434
+ var toTaskTakeAdvice = '/bpm/bpmBackend/toTaskTakeAdvice';
2435
+ // 征求意见提交
2436
+ var taskTakeAdvice = '/bpm/task/taskHandle/taskTakeAdvice.dhtml';
2437
+ // 稿件递送
2438
+ var toTaskStartDraft = '/bpm/bpmBackend/totaskStartDraft';
2439
+
2440
+ // 稿件递送提交接口
2441
+ // export const taskStartDraft = '/oa/task/taskHandle/taskStartDraft.dhtml';
2442
+ var taskStartDraft = '/archives/task/taskHandle/taskStartDraft.dhtml';
2443
+ // 复核
2444
+ var toTaskReview = '/bpm/bpmBackend/toTaskReview';
2445
+ // 复核提交
2446
+ var taskReview = '/oa/task/taskHandle/taskReview.dhtml';
2447
+ // 联合用印
2448
+ var toTaskUnionSeal = '/bpm/bpmBackend/toTaskUnionSeal';
2449
+ // 联合用印提交
2450
+ var taskUnionSeal = '/bpm/task/taskHandle/taskUnionSeal.dhtml';
2451
+ // 报送两办
2452
+ var toTwoOfficesDispatch = '/bpm/bpmBackend/toTwoOfficesDispatch';
2453
+ // 报送两办提交
2454
+ var twoOfficesDispatch = 'task/taskHandle/twoOfficesDispatch.dhtml';
2455
+
2456
+ // notifySend 消息发送
2457
+ var sendList = '/notify2/notifySendRecord/listJson';
2458
+ var sendInfo = '/notify2/notifySendRecord/info';
2459
+ var sendSave = '/notify2/notifySendRecord/save';
2460
+ var sendUpdate = '/notify2/notifySendRecord/update';
2461
+ var sendDelete = '/notify2/notifySendRecord/deleteById';
2462
+ // 重发
2463
+ var sendBatch = '/notify2/sendRecord/reSendNotifyMessageBatch';
2464
+
2465
+ // 表单结构
2466
+ var formContents = '/config/admin/online/onlineForm/render';
2467
+
2468
+ /***/ }),
2469
+
2470
+ /***/ 2:
2471
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2472
+
2473
+ "use strict";
2474
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
2475
+ /* globals __VUE_SSR_CONTEXT__ */
2476
+
2477
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
2478
+ // This module is a runtime utility for cleaner component module output and will
2479
+ // be included in the final webpack user bundle.
2480
+
2481
+ function normalizeComponent(
2482
+ scriptExports,
2483
+ render,
2484
+ staticRenderFns,
2485
+ functionalTemplate,
2486
+ injectStyles,
2487
+ scopeId,
2488
+ moduleIdentifier /* server only */,
2489
+ shadowMode /* vue-cli only */
2490
+ ) {
2491
+ // Vue.extend constructor export interop
2492
+ var options =
2493
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
2494
+
2495
+ // render functions
2496
+ if (render) {
2497
+ options.render = render
2498
+ options.staticRenderFns = staticRenderFns
2499
+ options._compiled = true
2500
+ }
2501
+
2502
+ // functional template
2503
+ if (functionalTemplate) {
2504
+ options.functional = true
2505
+ }
2506
+
2507
+ // scopedId
2508
+ if (scopeId) {
2509
+ options._scopeId = 'data-v-' + scopeId
2510
+ }
2511
+
2512
+ var hook
2513
+ if (moduleIdentifier) {
2514
+ // server build
2515
+ hook = function (context) {
2516
+ // 2.3 injection
2517
+ context =
2518
+ context || // cached call
2519
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
2520
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
2521
+ // 2.2 with runInNewContext: true
2522
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
2523
+ context = __VUE_SSR_CONTEXT__
2524
+ }
2525
+ // inject component styles
2526
+ if (injectStyles) {
2527
+ injectStyles.call(this, context)
2528
+ }
2529
+ // register component module identifier for async chunk inferrence
2530
+ if (context && context._registeredComponents) {
2531
+ context._registeredComponents.add(moduleIdentifier)
2532
+ }
2533
+ }
2534
+ // used by ssr in case component is cached and beforeCreate
2535
+ // never gets called
2536
+ options._ssrRegister = hook
2537
+ } else if (injectStyles) {
2538
+ hook = shadowMode
2539
+ ? function () {
2540
+ injectStyles.call(
2541
+ this,
2542
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
2543
+ )
2544
+ }
2545
+ : injectStyles
2546
+ }
2547
+
2548
+ if (hook) {
2549
+ if (options.functional) {
2550
+ // for template-only hot-reload because in that case the render fn doesn't
2551
+ // go through the normalizer
2552
+ options._injectStyles = hook
2553
+ // register for functional component in vue file
2554
+ var originalRender = options.render
2555
+ options.render = function renderWithStyleInjection(h, context) {
2556
+ hook.call(context)
2557
+ return originalRender(h, context)
2558
+ }
2559
+ } else {
2560
+ // inject component registration as beforeCreate hook
2561
+ var existing = options.beforeCreate
2562
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
2563
+ }
2564
+ }
2565
+
2566
+ return {
2567
+ exports: scriptExports,
2568
+ options: options
2569
+ }
2570
+ }
2571
+
2572
+
2573
+ /***/ }),
2574
+
2575
+ /***/ 3:
2576
+ /***/ (function(module, exports) {
2577
+
2578
+ module.exports = require("qs");
2579
+
2580
+ /***/ }),
2581
+
2582
+ /***/ 4:
2583
+ /***/ (function(module, exports) {
2584
+
2585
+ module.exports = require("axios");
2586
+
2587
+ /***/ }),
2588
+
2589
+ /***/ 5:
2590
+ /***/ (function(module, exports) {
2591
+
2592
+ module.exports = require("eoss-element");
2593
+
2594
+ /***/ }),
2595
+
2596
+ /***/ 6:
2597
+ /***/ (function(module, exports) {
2598
+
2599
+ module.exports = require("json-bigint");
2600
+
2601
+ /***/ }),
2602
+
2603
+ /***/ 69:
2604
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2605
+
2606
+ "use strict";
2607
+ // ESM COMPAT FLAG
2608
+ __webpack_require__.r(__webpack_exports__);
2609
+
2610
+ // EXTERNAL MODULE: ./src/config/api.js
2611
+ var api = __webpack_require__(1);
2612
+
2613
+ // EXTERNAL MODULE: ./src/utils/store.js
2614
+ var store = __webpack_require__(8);
2615
+
2616
+ // EXTERNAL MODULE: ./src/utils/util.js
2617
+ var util = __webpack_require__(0);
2618
+
2619
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/main.vue?vue&type=script&lang=js&
2620
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2621
+
2622
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
2623
+
2624
+
2625
+
2626
+
2627
+ /* harmony default export */ var mainvue_type_script_lang_js_ = ({
2628
+ name: 'EsSelect',
2629
+ componentName: 'EsSelect',
2630
+ inheritAttrs: false,
2631
+ provide: function provide() {
2632
+ return {
2633
+ esSelect: this
2634
+ };
2635
+ },
2636
+
2637
+ props: {
2638
+ value: [String, Array, Object, Number],
2639
+ method: {
2640
+ type: String,
2641
+ default: 'get'
2642
+ },
2643
+ param: {
2644
+ type: Object,
2645
+ default: function _default() {
2646
+ return {};
2647
+ }
2648
+ },
2649
+ // 显示隐藏组件
2650
+ display: {
2651
+ type: Boolean,
2652
+ default: true
2653
+ },
2654
+ // 是否不渲染组件
2655
+ hide: {
2656
+ type: Boolean,
2657
+ default: false
2658
+ },
2659
+ valueType: String,
2660
+ // 选择项的值字段
2661
+ valueKey: {
2662
+ type: String,
2663
+ default: 'value'
2664
+ },
2665
+ // 指定选择项显示值的键名,data元素是对象类型时必填
2666
+ labelKey: {
2667
+ type: String,
2668
+ default: 'name'
2669
+ },
2670
+ data: {
2671
+ type: Array,
2672
+ default: function _default() {
2673
+ return [];
2674
+ }
2675
+ },
2676
+ // 远程搜索
2677
+ remote: Boolean,
2678
+ remoteKey: {
2679
+ type: String,
2680
+ default: 'searchKey'
2681
+ },
2682
+ remoteMethod: Function,
2683
+ // 选择项远程地址
2684
+ url: String,
2685
+ wait: {
2686
+ type: Boolean,
2687
+ default: true
2688
+ },
2689
+ // 选择项获取代码表数据(优先级大于url)
2690
+ sysCode: String,
2691
+ filtrate: [String, Object, Array],
2692
+ filtrateKey: {
2693
+ type: String,
2694
+ default: 'pid'
2695
+ },
2696
+ readonly: Boolean,
2697
+ separator: {
2698
+ type: String,
2699
+ default: '-'
2700
+ },
2701
+ symbol: {
2702
+ type: String,
2703
+ default: ','
2704
+ },
2705
+ plain: Boolean,
2706
+ where: Object,
2707
+ parseData: Function,
2708
+ disabled: Boolean,
2709
+ // 是否下拉树选择
2710
+ tree: {
2711
+ type: [Boolean, Object],
2712
+ default: false
2713
+ },
2714
+ // 父级是否可选
2715
+ parentCheck: {
2716
+ type: Boolean,
2717
+ default: true
2718
+ },
2719
+ // 父级可选时父级是否作为单独的值
2720
+ parentAsValue: {
2721
+ type: Boolean,
2722
+ default: true
2723
+ },
2724
+ group: Boolean,
2725
+ multiple: Boolean,
2726
+ defaultValue: Boolean,
2727
+ onExpand: Function,
2728
+ onLoadsub: Function,
2729
+ subParamKey: Object,
2730
+ lazy: Boolean,
2731
+ //是否请求代码表
2732
+ ajax: {
2733
+ type: Boolean,
2734
+ default: true
2735
+ },
2736
+ isNoParamRequest: {
2737
+ type: Boolean,
2738
+ default: true
2739
+ }
2740
+ },
2741
+ data: function data() {
2742
+ return {
2743
+ loading: false,
2744
+ options: '',
2745
+ valKey: this.valueKey,
2746
+ label: this.labelKey,
2747
+ hidden: false
2748
+ };
2749
+ },
2750
+
2751
+ computed: {
2752
+ isObject: function isObject() {
2753
+ if (this.valueType === 'object') {
2754
+ return true;
2755
+ }
2756
+ if (util["a" /* default */].isObject(this.value) || this.value && this.value[0] && util["a" /* default */].isObject(this.value[0])) {
2757
+ return true;
2758
+ }
2759
+ return false;
2760
+ },
2761
+ isRemote: function isRemote() {
2762
+ return new Boolean(this.remote);
2763
+ },
2764
+ results: function results() {
2765
+ var _this = this;
2766
+
2767
+ if (this.options.length) {
2768
+ return this.options;
2769
+ }
2770
+ if (this.filtrate) {
2771
+ if (Array.isArray(this.filtrate) && this.filtrate.length) {
2772
+ var ary = [];
2773
+ this.filtrate.forEach(function (items) {
2774
+ var val = typeof items === 'string' ? items : items[_this.valKey];
2775
+ ary.concat(_this.data.filter(function (item) {
2776
+ return item[_this.filtrateKey] == val;
2777
+ }));
2778
+ });
2779
+ } else {
2780
+ var val = typeof this.filtrate === 'string' ? this.filtrate : this.filtrate[this.valKey];
2781
+ return this.data.filter(function (item) {
2782
+ return item[_this.filtrateKey] == val;
2783
+ });
2784
+ }
2785
+ }
2786
+ return this.data;
2787
+ },
2788
+
2789
+ models: {
2790
+ get: function get() {
2791
+ return this.value;
2792
+ },
2793
+ set: function set(val) {
2794
+ return val;
2795
+ }
2796
+ }
2797
+ },
2798
+ watch: {
2799
+ sysCode: {
2800
+ immediate: true,
2801
+ handler: function handler(val, old) {
2802
+ if (val && val !== old) {
2803
+ this.label = 'shortName';
2804
+ this.valKey = 'cciValue';
2805
+ var options = store["a" /* default */].get(val);
2806
+ if (options) {
2807
+ this.options = JSON.parse(JSON.stringify(options));
2808
+ } else {
2809
+ this.getData(val);
2810
+ }
2811
+ }
2812
+ }
2813
+ },
2814
+ url: {
2815
+ handler: function handler(val, old) {
2816
+ if (val && old !== val && !this.sysCode) {
2817
+ this.getData();
2818
+ }
2819
+ }
2820
+ },
2821
+ param: {
2822
+ deep: true,
2823
+ handler: function handler(val, old) {
2824
+ if (this.url && JSON.stringify(val) !== JSON.stringify(old)) {
2825
+ this.options = [];
2826
+ this.getData(this.sysCode);
2827
+ }
2828
+ }
2829
+ }
2830
+ },
2831
+ mounted: function mounted() {
2832
+ if (this.wait) {
2833
+ this.getData();
2834
+ }
2835
+ },
2836
+
2837
+ methods: {
2838
+ createOption: function createOption(_ref) {
2839
+ var _this2 = this;
2840
+
2841
+ var filtrate = _ref.filtrate,
2842
+ data = _ref.data,
2843
+ _ref$readonly = _ref.readonly,
2844
+ readonly = _ref$readonly === undefined ? false : _ref$readonly,
2845
+ h = _ref.h;
2846
+
2847
+ var filte = filtrate && util["a" /* default */].isObject(filtrate) ? filtrate[this.valKey] : filtrate;
2848
+ var eles = [];
2849
+ data.forEach(function (item) {
2850
+ if (_this2.models === undefined && item.selected) {
2851
+ _this2.$emit('input', _this2.valueType === 'object' ? item : item[_this2.valKey]);
2852
+ }
2853
+ if ((Object.prototype.hasOwnProperty.call(item, 'children') || Object.prototype.hasOwnProperty.call(item, 'options')) && (item.children || item.options)) {
2854
+ var children = item.children || item.options;
2855
+ if (readonly) {
2856
+ eles.push(_this2.createOption({ filtrate: filtrate, data: children, readonly: readonly, h: h }));
2857
+ } else {
2858
+ eles.push(h('el-option-group', { attrs: { label: item[_this2.label] || item.label } }, _this2.createOption({ filtrate: filtrate, data: children, readonly: readonly, h: h })));
2859
+ }
2860
+ } else {
2861
+ if (readonly) {
2862
+ if (item[_this2.valKey] === filte) {
2863
+ eles.push(item[_this2.label] || item.label);
2864
+ }
2865
+ } else {
2866
+ if (filte === null || filte === undefined || filte === '' || filte === item[_this2.filtrateKey]) {
2867
+ if (typeof item === 'string') {
2868
+ eles.push(h('el-option', {
2869
+ attrs: {
2870
+ label: item,
2871
+ value: item
2872
+ }
2873
+ }));
2874
+ } else {
2875
+ eles.push(h('el-option', {
2876
+ attrs: {
2877
+ label: item[_this2.label] || item.label,
2878
+ value: _this2.isObject ? item : item[_this2.valKey]
2879
+ }
2880
+ }));
2881
+ }
2882
+ }
2883
+ }
2884
+ }
2885
+ });
2886
+ return eles;
2887
+ },
2888
+ getData: function getData(sysCode, param) {
2889
+ var _this3 = this;
2890
+
2891
+ if (!this.ajax || !this.isNoParamRequest && Object.keys(this.param).length == 0) {
2892
+ return false;
2893
+ }
2894
+ var params = {};
2895
+ if (this.results.length === 0) {
2896
+ params = util["a" /* default */].extend({}, this.param, sysCode ? { sysAppCode: sysCode } : {}, param ? param : {});
2897
+ } else {
2898
+ return false;
2899
+ }
2900
+ if (!sysCode && !this.url) {
2901
+ return false;
2902
+ }
2903
+ this.loading = true;
2904
+ util["a" /* default */].ajax({
2905
+ url: sysCode ? api["r" /* findSysCode */] : this.url,
2906
+ method: this.method,
2907
+ params: params,
2908
+ data: params
2909
+ }).then(function (res) {
2910
+ _this3.loading = false;
2911
+ if (res.rCode === 0) {
2912
+ if (_this3.parseData) {
2913
+ _this3.options = _this3.parseData(res.results);
2914
+ } else {
2915
+ _this3.options = JSON.parse(JSON.stringify(res.results));
2916
+ }
2917
+ if (sysCode) {
2918
+ store["a" /* default */].set(sysCode, JSON.parse(JSON.stringify(_this3.options)));
2919
+ }
2920
+ }
2921
+ }).catch(function (err) {
2922
+ _this3.loading = false;
2923
+ if (err.message && err.message !== 'canceled') {
2924
+ _this3.$message.error(err.message);
2925
+ }
2926
+ });
2927
+ },
2928
+ search: function search(query) {
2929
+ var _this4 = this;
2930
+
2931
+ if (query !== '') {
2932
+ if (this.url !== '') {
2933
+ this.loading = true;
2934
+ var params = {};
2935
+ params[this.remoteKey] = query;
2936
+ params = util["a" /* default */].extend({}, this.param, params);
2937
+ util["a" /* default */].ajax({
2938
+ url: this.url,
2939
+ method: this.method,
2940
+ params: params,
2941
+ data: params
2942
+ }).then(function (res) {
2943
+ _this4.loading = false;
2944
+ if (res.rCode === 0) {
2945
+ _this4.options = res.results.filter(function (item) {
2946
+ if (item[_this4.label]) {
2947
+ return item[_this4.label].toLowerCase().indexOf(query.toLowerCase()) > -1;
2948
+ } else {
2949
+ return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
2950
+ }
2951
+ });
2952
+ }
2953
+ }).catch(function (err) {
2954
+ _this4.loading = false;
2955
+ if (err.message && err.message !== 'canceled') {
2956
+ _this4.$message.error(err.message);
2957
+ }
2958
+ });
2959
+ } else {
2960
+ this.options = [];
2961
+ }
2962
+ } else {
2963
+ this.options = this.data;
2964
+ }
2965
+ },
2966
+ renderd: function renderd(doms, h, type) {
2967
+ var _this5 = this;
2968
+
2969
+ if (typeof this.$attrs[type] === 'boolean') {
2970
+ if (this.$attrs.render) {
2971
+ if (typeof this.$attrs.render == 'string') {
2972
+ try {
2973
+ doms.push(h('template', { slot: type }, util["a" /* default */].toFunction(this.$attrs.render)(h, this)));
2974
+ } catch (error) {
2975
+ throw error;
2976
+ }
2977
+ } else {
2978
+ doms.push(h('template', { slot: type }, this.$attrs.render(h, this)));
2979
+ }
2980
+ }
2981
+ } else if (_typeof(this.$attrs[type]) === 'object') {
2982
+ doms.push(h('es-button', {
2983
+ slot: type,
2984
+ class: ['el-primeval', this.$attrs[type].class],
2985
+ props: _extends({}, this.$attrs[type].props, {
2986
+ size: this.$attrs[type].size ? this.$attrs[type].size : type === 'prefix' || type === 'suffix' ? 'small' : '',
2987
+ type: 'primary'
2988
+ }),
2989
+ domProps: this.$attrs[type].icon ? { innerHTML: this.$attrs[type].icon } : {},
2990
+ on: {
2991
+ click: function click(e) {
2992
+ _this5.$attrs[type].click && _this5.$attrs[type].click(_this5, _this5.model);
2993
+ _this5.$attrs[type].event && _this5.$attrs[type].event(_this5, _this5.model);
2994
+ }
2995
+ },
2996
+ ref: 'selectBtn'
2997
+ }, [this.$attrs[type].text]));
2998
+ } else {
2999
+ doms.push(h('template', { slot: type }, [this.$attrs[type]]));
3000
+ }
3001
+ },
3002
+ getLabel: function getLabel(value, data) {
3003
+ if (value && data) {
3004
+ if (util["a" /* default */].isObject(data)) {
3005
+ if (value === data[this.valKey]) {
3006
+ return data[this.label];
3007
+ } else if (value === data[this.label]) {
3008
+ return value;
3009
+ } else if (Object.prototype.hasOwnProperty.call(data, 'children') && data.children && data.children.length) {
3010
+ var val = this.getLabel(value, data.children);
3011
+ if (val) {
3012
+ return val;
3013
+ }
3014
+ }
3015
+ } else {
3016
+ if (typeof data === 'string' || !data.length) {
3017
+ return value;
3018
+ }
3019
+ if (Array.isArray(data) && data.length) {
3020
+ for (var i = 0; i < data.length; i++) {
3021
+ var _val = this.getLabel(value, data[i]);
3022
+ if (_val) {
3023
+ return _val;
3024
+ }
3025
+ }
3026
+ }
3027
+ }
3028
+ }
3029
+ return '';
3030
+ },
3031
+ reload: function reload(param) {
3032
+ this.getData(null, param);
3033
+ },
3034
+ handleExpand: function handleExpand(data, node) {
3035
+ if (this.onExpand) {
3036
+ this.onExpand(data, node);
3037
+ } else {
3038
+ if (this.lazy) {
3039
+ this.loadsub(data, node);
3040
+ }
3041
+ this.$emit('node-expand', data, node);
3042
+ }
3043
+ },
3044
+
3045
+ //请求子节点数据
3046
+ loadsub: function loadsub(data, node) {
3047
+ var _this6 = this;
3048
+
3049
+ if (data.state !== '' && (!data.children || data.children.length === 0)) {
3050
+ var param = {};
3051
+ if (this.subParamKey) {
3052
+ for (var i in this.subParamKey) {
3053
+ param[i] = data[this.subParamKey[i]];
3054
+ }
3055
+ } else {
3056
+ param[this.valKey] = data[this.valKey];
3057
+ }
3058
+ var params = util["a" /* default */].extend({}, this.param, this.where, param);
3059
+ if (this.parseParams) {
3060
+ params = this.parseParams({ data: data, params: params, node: node });
3061
+ }
3062
+ if (this.onLoadsub) {
3063
+ this.onLoadsub({ data: data, params: params, node: node }).then(function (res) {
3064
+ _this6.loading = false;
3065
+ _this6.$set(data, 'children', JSON.parse(JSON.stringify(res)));
3066
+ }).catch(function (e) {
3067
+ _this6.loading = false;
3068
+ });
3069
+ } else {
3070
+ util["a" /* default */].ajax({
3071
+ method: this.method,
3072
+ url: this.url,
3073
+ data: params,
3074
+ params: params
3075
+ }).then(function (res) {
3076
+ if (res.rCode === 0) {
3077
+ _this6.loading = false;
3078
+ var results = JSON.parse(JSON.stringify(res.results));
3079
+ if (Array.isArray(results)) {
3080
+ if (data.id === results[0].id) {
3081
+ _this6.$set(data, 'children', results[0].children);
3082
+ } else {
3083
+ _this6.$set(data, 'children', results);
3084
+ }
3085
+ } else if (data.id === results.id) {
3086
+ _this6.$set(data, 'children', results.children);
3087
+ } else {
3088
+ console.error('tree数据格式错误');
3089
+ }
3090
+ }
3091
+ }).catch(function (err) {
3092
+ _this6.loading = false;
3093
+ if (err.message && err.message !== 'canceled') {
3094
+ _this6.$message.error(err.message);
3095
+ }
3096
+ });
3097
+ }
3098
+ }
3099
+ },
3100
+ toggleMenu: function toggleMenu() {
3101
+ this.$refs.elSelect.toggleMenu();
3102
+ }
3103
+ },
3104
+ render: function render(h) {
3105
+ var _this7 = this;
3106
+
3107
+ if (!this.hide) {
3108
+ if (this.readonly) {
3109
+ var dom = [];
3110
+ if (Array.isArray(this.models)) {
3111
+ dom = this.models.map(function (item) {
3112
+ if (util["a" /* default */].isObject(item)) {
3113
+ if (!item[_this7.label] && !item.label) {
3114
+ return _this7.getLabel(value[_this7.valKey], data);
3115
+ }
3116
+ return item[_this7.label] || item.label;
3117
+ }
3118
+ return _this7.getLabel(item, _this7.results);
3119
+ });
3120
+ } else if (util["a" /* default */].isObject(this.models)) {
3121
+ if (!this.models[this.label] && !this.models.label) {
3122
+ dom = [this.getLabel(this.models[this.valKey], this.results)];
3123
+ } else {
3124
+ dom = [this.models[this.label] || this.models.label];
3125
+ }
3126
+ } else {
3127
+ dom = [this.getLabel(this.models, this.results)];
3128
+ }
3129
+ return h('div', {
3130
+ class: [{
3131
+ 'es-plain': this.plain,
3132
+ 'es-textarea__inner el-textarea__inner': this.multiple,
3133
+ 'el-input__inner es-input__inner': !this.multiple
3134
+ }]
3135
+ }, [dom.join(this.symbol)]);
3136
+ }
3137
+ var doms = [];
3138
+ var cls = [];
3139
+ if (this.results.length && !this.tree) {
3140
+ if (this.filtrate && Array.isArray(this.filtrate)) {
3141
+ doms = this.filtrate.map(function (item) {
3142
+ return h('el-option-group', {
3143
+ attrs: {
3144
+ label: item[_this7.label] || item.label,
3145
+ key: item[_this7.valKey]
3146
+ }
3147
+ }, _this7.createOption({ filtrate: item, data: _this7.results, h: h }));
3148
+ });
3149
+ } else {
3150
+ doms = this.createOption({
3151
+ filtrate: this.filtrate,
3152
+ data: this.results,
3153
+ h: h
3154
+ });
3155
+ }
3156
+ }
3157
+ if (this.$slots.prefix) {
3158
+ doms.push(h('template', { slot: 'prefix' }, this.$slots.prefix));
3159
+ } else if (this.$attrs.prefix) {
3160
+ this.renderd(doms, h, 'prefix');
3161
+ cls.push('es-select-button-prefix');
3162
+ }
3163
+ if (this.$slots.suffix) {
3164
+ doms.push(h('template', { slot: 'suffix' }, this.$slots.suffix));
3165
+ } else if (this.$attrs.suffix) {
3166
+ this.renderd(doms, h, 'suffix');
3167
+ cls.push('es-select-button-suffix');
3168
+ }
3169
+ if (this.$slots.prepend) {
3170
+ doms.push(h('template', { slot: 'prepend' }, this.$slots.prepend));
3171
+ } else if (this.$attrs.prepend) {
3172
+ this.renderd(doms, h, 'prepend');
3173
+ }
3174
+ if (this.$slots.append) {
3175
+ doms.push(h('template', { slot: 'append' }, this.$slots.append));
3176
+ } else if (this.$attrs.append) {
3177
+ this.renderd(doms, h, 'append');
3178
+ }
3179
+ if (!this.models && this.results.length && this.defaultValue) {
3180
+ if (this.valueType === 'object') {
3181
+ this.models = this.results[0];
3182
+ //this.$emit('input', this.results[0]);
3183
+ } else {
3184
+ this.models = this.results[0][this.valKey];
3185
+ //this.$emit('input', this.results[0][this.valKey]);
3186
+ }
3187
+ this.$emit('change', this.results[0], 0);
3188
+ }
3189
+ return h('el-select', {
3190
+ class: cls,
3191
+ ref: 'elSelect',
3192
+ directives: [{
3193
+ name: 'show',
3194
+ value: this.display
3195
+ }],
3196
+ props: _extends({}, this.$attrs, {
3197
+ multiple: this.multiple,
3198
+ valueType: this.valueType,
3199
+ valueKey: this.valKey,
3200
+ labelKey: this.label,
3201
+ loading: this.loading,
3202
+ disabled: this.disabled,
3203
+ tree: typeof this.tree === 'boolean' ? this.tree : _extends({}, this.tree, { lazy: this.label }),
3204
+ data: this.results,
3205
+ // 父级是否可选
3206
+ parentCheck: this.parentCheck,
3207
+ // 父级可选时父级是否作为单独的值
3208
+ parentAsValue: this.parentAsValue,
3209
+ value: this.models
3210
+ }),
3211
+ attrs: {
3212
+ remoteMethod: !this.remoteMethod ? this.search : this.remoteMethod,
3213
+ remote: this.remote
3214
+ },
3215
+ on: _extends({}, this.$listeners, {
3216
+ 'node-expand': this.handleExpand
3217
+ })
3218
+ }, this.$slots.default ? this.$slots.default : doms);
3219
+ } else {
3220
+ return '';
3221
+ }
3222
+ }
3223
+ });
3224
+ // CONCATENATED MODULE: ./packages/select/src/main.vue?vue&type=script&lang=js&
3225
+ /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
3226
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
3227
+ var componentNormalizer = __webpack_require__(2);
3228
+
3229
+ // CONCATENATED MODULE: ./packages/select/src/main.vue
3230
+ var main_render, staticRenderFns
3231
+
3232
+
3233
+
3234
+
3235
+ /* normalize component */
3236
+
3237
+ var component = Object(componentNormalizer["a" /* default */])(
3238
+ src_mainvue_type_script_lang_js_,
3239
+ main_render,
3240
+ staticRenderFns,
3241
+ false,
3242
+ null,
3243
+ null,
3244
+ null
3245
+
3246
+ )
3247
+
3248
+ /* harmony default export */ var main = (component.exports);
3249
+ // CONCATENATED MODULE: ./packages/select/index.js
3250
+
3251
+
3252
+ main.install = function (Vue) {
3253
+ return Vue.component(main.name, main);
3254
+ };
3255
+
3256
+ /* harmony default export */ var packages_select = __webpack_exports__["default"] = (main);
3257
+
3258
+ /***/ }),
3259
+
3260
+ /***/ 7:
3261
+ /***/ (function(module, exports) {
3262
+
3263
+ module.exports = require("sm-crypto");
3264
+
3265
+ /***/ }),
3266
+
3267
+ /***/ 8:
3268
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3269
+
3270
+ "use strict";
3271
+ var store = {
3272
+ state: {},
3273
+ set: function set(name, value) {
3274
+ this.state[name] = value;
3275
+ },
3276
+ get: function get(name) {
3277
+ return this.state[name];
3278
+ },
3279
+ clear: function clear(name) {
3280
+ this.state[name] = null;
3281
+ },
3282
+ remove: function remove(name) {
3283
+ if (name) {
3284
+ delete this.state[name];
3285
+ } else {
3286
+ this.state = {};
3287
+ }
3288
+ }
3289
+ };
3290
+ window.__store = store;
3291
+ /* harmony default export */ __webpack_exports__["a"] = (store);
3292
+
3293
+ /***/ })
3294
+
3295
+ /******/ });