eoss-mobiles 0.1.13

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 (285) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +28 -0
  3. package/lib/action-sheet.js +313 -0
  4. package/lib/button-group.js +421 -0
  5. package/lib/button.js +278 -0
  6. package/lib/calendar.js +301 -0
  7. package/lib/cascader.js +336 -0
  8. package/lib/cell.js +366 -0
  9. package/lib/checkbox.js +2170 -0
  10. package/lib/circle.js +299 -0
  11. package/lib/config/api.js +31 -0
  12. package/lib/count-down.js +299 -0
  13. package/lib/date.js +956 -0
  14. package/lib/empty.js +274 -0
  15. package/lib/eoss-mobile.common.js +15072 -0
  16. package/lib/field.js +440 -0
  17. package/lib/flow.js +5664 -0
  18. package/lib/form.js +714 -0
  19. package/lib/grid-item.js +274 -0
  20. package/lib/grid.js +317 -0
  21. package/lib/image-preview.js +325 -0
  22. package/lib/index.js +1 -0
  23. package/lib/list.js +315 -0
  24. package/lib/loading.js +279 -0
  25. package/lib/nav-bar.js +283 -0
  26. package/lib/pagination.js +323 -0
  27. package/lib/picker.js +2714 -0
  28. package/lib/popover.js +306 -0
  29. package/lib/popup.js +297 -0
  30. package/lib/radio.js +2137 -0
  31. package/lib/rate.js +300 -0
  32. package/lib/search.js +316 -0
  33. package/lib/selector.js +3496 -0
  34. package/lib/skeleton.js +277 -0
  35. package/lib/stepper.js +300 -0
  36. package/lib/switch.js +304 -0
  37. package/lib/tab.js +274 -0
  38. package/lib/table-column.js +2991 -0
  39. package/lib/table.js +2652 -0
  40. package/lib/tabs.js +315 -0
  41. package/lib/tag.js +281 -0
  42. package/lib/theme-chalk/action-sheet.css +0 -0
  43. package/lib/theme-chalk/base.css +1 -0
  44. package/lib/theme-chalk/button-group.css +1 -0
  45. package/lib/theme-chalk/button.css +1 -0
  46. package/lib/theme-chalk/calendar.css +1 -0
  47. package/lib/theme-chalk/cascader.css +1 -0
  48. package/lib/theme-chalk/cell.css +1 -0
  49. package/lib/theme-chalk/checkbox.css +1 -0
  50. package/lib/theme-chalk/circle.css +1 -0
  51. package/lib/theme-chalk/count-down.css +0 -0
  52. package/lib/theme-chalk/date.css +0 -0
  53. package/lib/theme-chalk/empty.css +0 -0
  54. package/lib/theme-chalk/field.css +1 -0
  55. package/lib/theme-chalk/flow.css +1 -0
  56. package/lib/theme-chalk/fonts/iconfont.scss +530 -0
  57. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  58. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  59. package/lib/theme-chalk/form.css +0 -0
  60. package/lib/theme-chalk/grid-item.css +1 -0
  61. package/lib/theme-chalk/grid.css +0 -0
  62. package/lib/theme-chalk/icon.css +1 -0
  63. package/lib/theme-chalk/image-preview.css +0 -0
  64. package/lib/theme-chalk/index.css +1 -0
  65. package/lib/theme-chalk/list.css +0 -0
  66. package/lib/theme-chalk/loading.css +0 -0
  67. package/lib/theme-chalk/nav-bar.css +0 -0
  68. package/lib/theme-chalk/navbar.css +1 -0
  69. package/lib/theme-chalk/pagination.css +1 -0
  70. package/lib/theme-chalk/picker.css +1 -0
  71. package/lib/theme-chalk/popover.css +0 -0
  72. package/lib/theme-chalk/popup.css +0 -0
  73. package/lib/theme-chalk/radio.css +1 -0
  74. package/lib/theme-chalk/rate.css +0 -0
  75. package/lib/theme-chalk/search.css +0 -0
  76. package/lib/theme-chalk/selector.css +1 -0
  77. package/lib/theme-chalk/skeleton.css +0 -0
  78. package/lib/theme-chalk/stepper.css +1 -0
  79. package/lib/theme-chalk/switch.css +1 -0
  80. package/lib/theme-chalk/tab.css +0 -0
  81. package/lib/theme-chalk/table-column.css +0 -0
  82. package/lib/theme-chalk/table.css +1 -0
  83. package/lib/theme-chalk/tabs.css +1 -0
  84. package/lib/theme-chalk/tag.css +1 -0
  85. package/lib/theme-chalk/theme.css +0 -0
  86. package/lib/theme-chalk/tree.css +1 -0
  87. package/lib/theme-chalk/uploader.css +0 -0
  88. package/lib/uploader.js +307 -0
  89. package/lib/utils/axios.js +199 -0
  90. package/lib/utils/date-util.js +320 -0
  91. package/lib/utils/http.js +74 -0
  92. package/lib/utils/rules.js +21 -0
  93. package/lib/utils/store.js +24 -0
  94. package/lib/utils/util.js +1315 -0
  95. package/package.json +153 -0
  96. package/packages/action-sheet/index.js +5 -0
  97. package/packages/action-sheet/src/main.vue +32 -0
  98. package/packages/button/index.js +5 -0
  99. package/packages/button/src/main.vue +15 -0
  100. package/packages/button-group/index.js +5 -0
  101. package/packages/button-group/src/main.vue +80 -0
  102. package/packages/calendar/index.js +5 -0
  103. package/packages/calendar/src/main.vue +34 -0
  104. package/packages/cascader/index.js +5 -0
  105. package/packages/cascader/src/main.vue +40 -0
  106. package/packages/cell/index.js +5 -0
  107. package/packages/cell/src/main.vue +72 -0
  108. package/packages/checkbox/index.js +5 -0
  109. package/packages/checkbox/src/main.vue +149 -0
  110. package/packages/circle/index.js +5 -0
  111. package/packages/circle/src/main.vue +27 -0
  112. package/packages/count-down/index.js +5 -0
  113. package/packages/count-down/src/main.vue +27 -0
  114. package/packages/date/index.js +5 -0
  115. package/packages/date/src/date-time.vue +290 -0
  116. package/packages/date/src/main.vue +319 -0
  117. package/packages/empty/index.js +5 -0
  118. package/packages/empty/src/main.vue +16 -0
  119. package/packages/field/index.js +5 -0
  120. package/packages/field/src/main.vue +130 -0
  121. package/packages/flow/index.js +5 -0
  122. package/packages/flow/src/components/Handle.vue +1031 -0
  123. package/packages/flow/src/components/Message.vue +96 -0
  124. package/packages/flow/src/components/Opinion.vue +112 -0
  125. package/packages/flow/src/components/Reject.vue +202 -0
  126. package/packages/flow/src/components/StartFlow.vue +440 -0
  127. package/packages/flow/src/components/TaskRead.vue +237 -0
  128. package/packages/flow/src/main.vue +43 -0
  129. package/packages/form/index.js +5 -0
  130. package/packages/form/src/main.vue +158 -0
  131. package/packages/grid/index.js +5 -0
  132. package/packages/grid/src/main.vue +28 -0
  133. package/packages/grid-item/index.js +5 -0
  134. package/packages/grid-item/src/main.vue +16 -0
  135. package/packages/image-preview/index.js +5 -0
  136. package/packages/image-preview/src/main.vue +34 -0
  137. package/packages/list/index.js +5 -0
  138. package/packages/list/src/main.vue +32 -0
  139. package/packages/loading/index.js +5 -0
  140. package/packages/loading/src/main.vue +20 -0
  141. package/packages/nav-bar/index.js +5 -0
  142. package/packages/nav-bar/src/main.vue +16 -0
  143. package/packages/pagination/index.js +5 -0
  144. package/packages/pagination/src/main.vue +29 -0
  145. package/packages/picker/index.js +5 -0
  146. package/packages/picker/src/main.vue +500 -0
  147. package/packages/popover/index.js +5 -0
  148. package/packages/popover/src/main.vue +32 -0
  149. package/packages/popup/index.js +5 -0
  150. package/packages/popup/src/main.vue +27 -0
  151. package/packages/radio/index.js +5 -0
  152. package/packages/radio/src/main.vue +147 -0
  153. package/packages/rate/index.js +5 -0
  154. package/packages/rate/src/main.vue +27 -0
  155. package/packages/search/index.js +5 -0
  156. package/packages/search/src/main.vue +39 -0
  157. package/packages/selector/index.js +5 -0
  158. package/packages/selector/src/main.vue +77 -0
  159. package/packages/selector/src/selector-field.vue +225 -0
  160. package/packages/selector/src/selector-tree.vue +472 -0
  161. package/packages/selector/src/tree.vue +179 -0
  162. package/packages/skeleton/index.js +5 -0
  163. package/packages/skeleton/src/main.vue +17 -0
  164. package/packages/stepper/index.js +5 -0
  165. package/packages/stepper/src/main.vue +25 -0
  166. package/packages/switch/index.js +5 -0
  167. package/packages/switch/src/main.vue +29 -0
  168. package/packages/tab/index.js +5 -0
  169. package/packages/tab/src/main.vue +16 -0
  170. package/packages/table/index.js +5 -0
  171. package/packages/table/src/main.vue +830 -0
  172. package/packages/table-column/index.js +5 -0
  173. package/packages/table-column/src/main.vue +742 -0
  174. package/packages/table-column/src/mixins/table.js +12 -0
  175. package/packages/tabs/index.js +5 -0
  176. package/packages/tabs/src/main.vue +34 -0
  177. package/packages/tag/index.js +5 -0
  178. package/packages/tag/src/main.vue +16 -0
  179. package/packages/theme-chalk/README.md +33 -0
  180. package/packages/theme-chalk/lib/action-sheet.css +0 -0
  181. package/packages/theme-chalk/lib/base.css +1 -0
  182. package/packages/theme-chalk/lib/button-group.css +1 -0
  183. package/packages/theme-chalk/lib/button.css +1 -0
  184. package/packages/theme-chalk/lib/calendar.css +1 -0
  185. package/packages/theme-chalk/lib/cascader.css +1 -0
  186. package/packages/theme-chalk/lib/cell.css +1 -0
  187. package/packages/theme-chalk/lib/checkbox.css +1 -0
  188. package/packages/theme-chalk/lib/circle.css +1 -0
  189. package/packages/theme-chalk/lib/count-down.css +0 -0
  190. package/packages/theme-chalk/lib/date.css +0 -0
  191. package/packages/theme-chalk/lib/empty.css +0 -0
  192. package/packages/theme-chalk/lib/field.css +1 -0
  193. package/packages/theme-chalk/lib/flow.css +1 -0
  194. package/packages/theme-chalk/lib/fonts/iconfont.scss +530 -0
  195. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  196. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  197. package/packages/theme-chalk/lib/form.css +0 -0
  198. package/packages/theme-chalk/lib/grid-item.css +1 -0
  199. package/packages/theme-chalk/lib/grid.css +0 -0
  200. package/packages/theme-chalk/lib/icon.css +1 -0
  201. package/packages/theme-chalk/lib/image-preview.css +0 -0
  202. package/packages/theme-chalk/lib/index.css +1 -0
  203. package/packages/theme-chalk/lib/list.css +0 -0
  204. package/packages/theme-chalk/lib/loading.css +0 -0
  205. package/packages/theme-chalk/lib/nav-bar.css +0 -0
  206. package/packages/theme-chalk/lib/navbar.css +1 -0
  207. package/packages/theme-chalk/lib/pagination.css +1 -0
  208. package/packages/theme-chalk/lib/picker.css +1 -0
  209. package/packages/theme-chalk/lib/popover.css +0 -0
  210. package/packages/theme-chalk/lib/popup.css +0 -0
  211. package/packages/theme-chalk/lib/radio.css +1 -0
  212. package/packages/theme-chalk/lib/rate.css +0 -0
  213. package/packages/theme-chalk/lib/search.css +0 -0
  214. package/packages/theme-chalk/lib/selector.css +1 -0
  215. package/packages/theme-chalk/lib/skeleton.css +0 -0
  216. package/packages/theme-chalk/lib/stepper.css +1 -0
  217. package/packages/theme-chalk/lib/switch.css +1 -0
  218. package/packages/theme-chalk/lib/tab.css +0 -0
  219. package/packages/theme-chalk/lib/table-column.css +0 -0
  220. package/packages/theme-chalk/lib/table.css +1 -0
  221. package/packages/theme-chalk/lib/tabs.css +1 -0
  222. package/packages/theme-chalk/lib/tag.css +1 -0
  223. package/packages/theme-chalk/lib/theme.css +0 -0
  224. package/packages/theme-chalk/lib/tree.css +1 -0
  225. package/packages/theme-chalk/lib/uploader.css +0 -0
  226. package/packages/theme-chalk/package.json +35 -0
  227. package/packages/theme-chalk/src/action-sheet.scss +0 -0
  228. package/packages/theme-chalk/src/base.scss +182 -0
  229. package/packages/theme-chalk/src/button-group.scss +26 -0
  230. package/packages/theme-chalk/src/button.scss +3 -0
  231. package/packages/theme-chalk/src/calendar.scss +12 -0
  232. package/packages/theme-chalk/src/cascader.scss +12 -0
  233. package/packages/theme-chalk/src/cell.scss +14 -0
  234. package/packages/theme-chalk/src/checkbox.scss +10 -0
  235. package/packages/theme-chalk/src/circle.scss +7 -0
  236. package/packages/theme-chalk/src/common/var.scss +1525 -0
  237. package/packages/theme-chalk/src/count-down.scss +0 -0
  238. package/packages/theme-chalk/src/date.scss +0 -0
  239. package/packages/theme-chalk/src/empty.scss +0 -0
  240. package/packages/theme-chalk/src/field.scss +28 -0
  241. package/packages/theme-chalk/src/flow.scss +542 -0
  242. package/packages/theme-chalk/src/fonts/iconfont.scss +530 -0
  243. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  244. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  245. package/packages/theme-chalk/src/form.scss +15 -0
  246. package/packages/theme-chalk/src/grid-item.scss +8 -0
  247. package/packages/theme-chalk/src/grid.scss +0 -0
  248. package/packages/theme-chalk/src/icon.scss +1661 -0
  249. package/packages/theme-chalk/src/image-preview.scss +0 -0
  250. package/packages/theme-chalk/src/index.scss +38 -0
  251. package/packages/theme-chalk/src/list.scss +0 -0
  252. package/packages/theme-chalk/src/loading.scss +0 -0
  253. package/packages/theme-chalk/src/mixins/color.scss +117 -0
  254. package/packages/theme-chalk/src/mixins/mixins.scss +25 -0
  255. package/packages/theme-chalk/src/nav-bar.scss +0 -0
  256. package/packages/theme-chalk/src/navbar.scss +6 -0
  257. package/packages/theme-chalk/src/pagination.scss +10 -0
  258. package/packages/theme-chalk/src/picker.scss +27 -0
  259. package/packages/theme-chalk/src/popover.scss +0 -0
  260. package/packages/theme-chalk/src/popup.scss +0 -0
  261. package/packages/theme-chalk/src/radio.scss +7 -0
  262. package/packages/theme-chalk/src/rate.scss +0 -0
  263. package/packages/theme-chalk/src/search.scss +0 -0
  264. package/packages/theme-chalk/src/selector.scss +218 -0
  265. package/packages/theme-chalk/src/skeleton.scss +0 -0
  266. package/packages/theme-chalk/src/stepper.scss +10 -0
  267. package/packages/theme-chalk/src/switch.scss +6 -0
  268. package/packages/theme-chalk/src/tab.scss +0 -0
  269. package/packages/theme-chalk/src/table-column.scss +0 -0
  270. package/packages/theme-chalk/src/table.scss +42 -0
  271. package/packages/theme-chalk/src/tabs.scss +21 -0
  272. package/packages/theme-chalk/src/tag.scss +13 -0
  273. package/packages/theme-chalk/src/theme.scss +2 -0
  274. package/packages/theme-chalk/src/tree.scss +115 -0
  275. package/packages/theme-chalk/src/uploader.scss +0 -0
  276. package/packages/uploader/index.js +5 -0
  277. package/packages/uploader/src/main.vue +31 -0
  278. package/src/config/api.js +29 -0
  279. package/src/index.js +130 -0
  280. package/src/utils/axios.js +198 -0
  281. package/src/utils/date-util.js +312 -0
  282. package/src/utils/http.js +66 -0
  283. package/src/utils/rules.js +18 -0
  284. package/src/utils/store.js +21 -0
  285. package/src/utils/util.js +1346 -0
package/lib/picker.js ADDED
@@ -0,0 +1,2714 @@
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 = 20);
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ([
89
+ /* 0 */
90
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
91
+
92
+ "use strict";
93
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
94
+ /* globals __VUE_SSR_CONTEXT__ */
95
+
96
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
97
+ // This module is a runtime utility for cleaner component module output and will
98
+ // be included in the final webpack user bundle.
99
+
100
+ function normalizeComponent(
101
+ scriptExports,
102
+ render,
103
+ staticRenderFns,
104
+ functionalTemplate,
105
+ injectStyles,
106
+ scopeId,
107
+ moduleIdentifier /* server only */,
108
+ shadowMode /* vue-cli only */
109
+ ) {
110
+ // Vue.extend constructor export interop
111
+ var options =
112
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
113
+
114
+ // render functions
115
+ if (render) {
116
+ options.render = render
117
+ options.staticRenderFns = staticRenderFns
118
+ options._compiled = true
119
+ }
120
+
121
+ // functional template
122
+ if (functionalTemplate) {
123
+ options.functional = true
124
+ }
125
+
126
+ // scopedId
127
+ if (scopeId) {
128
+ options._scopeId = 'data-v-' + scopeId
129
+ }
130
+
131
+ var hook
132
+ if (moduleIdentifier) {
133
+ // server build
134
+ hook = function (context) {
135
+ // 2.3 injection
136
+ context =
137
+ context || // cached call
138
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
139
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
140
+ // 2.2 with runInNewContext: true
141
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
142
+ context = __VUE_SSR_CONTEXT__
143
+ }
144
+ // inject component styles
145
+ if (injectStyles) {
146
+ injectStyles.call(this, context)
147
+ }
148
+ // register component module identifier for async chunk inferrence
149
+ if (context && context._registeredComponents) {
150
+ context._registeredComponents.add(moduleIdentifier)
151
+ }
152
+ }
153
+ // used by ssr in case component is cached and beforeCreate
154
+ // never gets called
155
+ options._ssrRegister = hook
156
+ } else if (injectStyles) {
157
+ hook = shadowMode
158
+ ? function () {
159
+ injectStyles.call(
160
+ this,
161
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
162
+ )
163
+ }
164
+ : injectStyles
165
+ }
166
+
167
+ if (hook) {
168
+ if (options.functional) {
169
+ // for template-only hot-reload because in that case the render fn doesn't
170
+ // go through the normalizer
171
+ options._injectStyles = hook
172
+ // register for functional component in vue file
173
+ var originalRender = options.render
174
+ options.render = function renderWithStyleInjection(h, context) {
175
+ hook.call(context)
176
+ return originalRender(h, context)
177
+ }
178
+ } else {
179
+ // inject component registration as beforeCreate hook
180
+ var existing = options.beforeCreate
181
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
182
+ }
183
+ }
184
+
185
+ return {
186
+ exports: scriptExports,
187
+ options: options
188
+ }
189
+ }
190
+
191
+
192
+ /***/ }),
193
+ /* 1 */
194
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
195
+
196
+ "use strict";
197
+ /* harmony import */ var _eoss_design_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
198
+ /* harmony import */ var _eoss_design_color__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_eoss_design_color__WEBPACK_IMPORTED_MODULE_0__);
199
+ 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; };
200
+
201
+ /* eslint-disable indent */
202
+ // import { authCenter } from '../config/api';
203
+
204
+
205
+ var sm2 = __webpack_require__(8).sm2;
206
+
207
+ /**
208
+ * esEncrypt
209
+ * @desc:sm2加密
210
+ * @author huangbo
211
+ * @date 2022年5月7日
212
+ * @param {string} [data] - 被加密的字符串
213
+ * @param {string} [key] - 公钥
214
+ **/
215
+ var esEncrypt = function esEncrypt(data, key, mode) {
216
+ var cipherMode = mode ? mode : 1;
217
+ if (!new RegExp('^04').test(key)) {
218
+ key = '04' + key;
219
+ }
220
+ var result = sm2.doEncrypt(data, key, cipherMode);
221
+ return result;
222
+ };
223
+
224
+ /**
225
+ * esDecode
226
+ * @desc:sm2解密
227
+ * @author huangbo
228
+ * @date 2022年5月7日
229
+ * @param {string} [data] - 被解密的加密字符串
230
+ * @param {string} [key] - 私钥
231
+ **/
232
+ var esDecode = function esDecode(data, key, mode) {
233
+ var cipherMode = mode ? mode : 1;
234
+ var result = sm2.doDecrypt(data, key, cipherMode);
235
+ return result;
236
+ };
237
+ /**
238
+ * startWith
239
+ * @desc:判断是否以指定字符开头
240
+ * @author huangbo
241
+ * @date 2022年5月7日
242
+ * @param {string} [str] - 被查找的字符串
243
+ * @param {string} [reg] - 指定字符串
244
+ **/
245
+ var startWith = function startWith(str, reg) {
246
+ if (new RegExp('^' + reg).test(str)) {
247
+ return true;
248
+ }
249
+ return false;
250
+ };
251
+ /**
252
+ * jointUrl
253
+ * @desc:判断url地址是否以字符开头,没有则添加
254
+ * @author huangbo
255
+ * @date 2022年5月7日
256
+ * @param {string} [str] - 域名或者路径
257
+ * @param {string} [url] - 地址
258
+ **/
259
+ var jointUrl = function jointUrl(url, str) {
260
+ if (startWith(url, 'http') || startWith(url, 'blob:') || !str) {
261
+ return url;
262
+ }
263
+ return startWith(url, str) ? url : str + url;
264
+ };
265
+ /**
266
+ * queryParams
267
+ * @desc:对象转url拼接参数
268
+ * @author huangbo
269
+ * @date 2022年5月7日
270
+ * @param {Object} [obj] - 被转换的对象
271
+ **/
272
+ var queryParams = function queryParams(obj) {
273
+ var arry = [];
274
+ for (var i in obj) {
275
+ arry.push(i + '=' + obj[i]);
276
+ }
277
+ if (arry.length) {
278
+ return arry.join('&');
279
+ }
280
+ return false;
281
+ };
282
+ /**
283
+ * queryParams
284
+ * @desc:对象转url拼接参数
285
+ * @author huangbo
286
+ * @date 2022年5月7日
287
+ * @param {Object} [url] - url地址
288
+ * @param {Object} [obj] - 被转换的对象
289
+ **/
290
+ var urlJoinParams = function urlJoinParams(url, obj) {
291
+ var arry = decodeURI(url).split('?');
292
+ var params = {};
293
+ if (arry.length > 1) {
294
+ var search = arry[1].split('&');
295
+ search.forEach(function (item) {
296
+ var items = item.split('=');
297
+ params[items[0]] = items[1];
298
+ });
299
+ }
300
+ params = extend(true, params, obj);
301
+ var str = queryParams(params);
302
+ if (str) {
303
+ return arry[0] + '?' + str;
304
+ }
305
+ return arry[0];
306
+ };
307
+ /**
308
+ * arrUnique
309
+ * @desc:数组元素对象去重
310
+ * @author huangbo
311
+ * @date 2022年5月7日
312
+ * @param {Object} [arr] - 原始数组
313
+ * @param {String} [key] - 对象子元素的属性名
314
+ **/
315
+ var arrUnique = function arrUnique(arr, key) {
316
+ var newArr = [];
317
+ if (key === undefined) {
318
+ arr.sort();
319
+ newArr = [arr[0]];
320
+ for (var i = 1; i < arr.length; i++) {
321
+ if (arr[i] !== newArr[newArr.length - 1]) {
322
+ newArr.push(arr[i]);
323
+ }
324
+ }
325
+ } else {
326
+ var obj = {};
327
+ for (var _i = 0; _i < arr.length; _i++) {
328
+ if (!obj[arr[_i][key]]) {
329
+ newArr.push(arr[_i]);
330
+ obj[arr[_i][key]] = true;
331
+ }
332
+ }
333
+ }
334
+ return newArr;
335
+ };
336
+ /**
337
+ * isObject
338
+ * @desc:判断是否是对象
339
+ * @author huangbo
340
+ * @date 2022年5月7日
341
+ * @param {Object} [obj] - 对象
342
+ **/
343
+ var isObject = function isObject(obj) {
344
+ var proto = void 0;
345
+ var Ctor = void 0;
346
+ var hasOwn = {}.hasOwnProperty;
347
+ if (!obj || toString.call(obj) !== '[object Object]') {
348
+ return false;
349
+ }
350
+
351
+ proto = Object.getPrototypeOf(obj);
352
+ if (!proto) {
353
+ return true;
354
+ }
355
+ var fnToString = hasOwn.toString;
356
+ var ObjectFunctionString = fnToString.call(Object);
357
+ Ctor = hasOwn.call(proto, 'constructor') && proto.constructor;
358
+ return typeof Ctor === 'function' && fnToString.call(Ctor) === ObjectFunctionString;
359
+ };
360
+ /**
361
+ * isFunction
362
+ * @desc:判断是否是函数
363
+ * @author huangbo
364
+ * @date 2022年5月7日
365
+ * @param {Object} [obj] - 对象
366
+ **/
367
+ var isFunction = function isFunction(obj) {
368
+ return typeof obj === 'function' && typeof obj.nodeType !== 'number' && typeof obj.item !== 'function';
369
+ };
370
+ /**
371
+ * extend
372
+ * @desc:对象拷贝
373
+ * @author huangbo
374
+ * @date 2022年5月7日
375
+ * @param {Object} [target] - 被扩展的对象
376
+ * @param {Boolean}} [deep] - 是否深度操作
377
+ **/
378
+ var extend = function extend() {
379
+ var options = void 0;
380
+ var name = void 0;
381
+ var src = void 0;
382
+ var copy = void 0;
383
+ var copyIsArray = void 0;
384
+ var clone = void 0;
385
+ var target = arguments[0] || {};
386
+ var i = 1;
387
+ var length = arguments.length;
388
+ var deep = false;
389
+ if (typeof target === 'boolean') {
390
+ deep = target;
391
+ target = arguments[i] || {};
392
+ i++;
393
+ }
394
+ if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) !== 'object' && !isFunction(target)) {
395
+ target = {};
396
+ }
397
+ if (i === length) {
398
+ target = this;
399
+ i--;
400
+ }
401
+ for (; i < length; i++) {
402
+ if ((options = arguments[i]) != null) {
403
+ for (name in options) {
404
+ copy = options[name];
405
+ if (name === '__proto__' || target === copy) {
406
+ continue;
407
+ }
408
+ if (deep && copy && (isObject(copy) || (copyIsArray = Array.isArray(copy)))) {
409
+ src = target[name];
410
+ if (copyIsArray && !Array.isArray(src)) {
411
+ clone = [];
412
+ } else if (!copyIsArray && !isObject(src)) {
413
+ clone = {};
414
+ } else {
415
+ clone = src;
416
+ }
417
+ copyIsArray = false;
418
+ target[name] = extend(deep, clone, copy);
419
+ } else if (copy !== undefined) {
420
+ target[name] = copy;
421
+ }
422
+ }
423
+ }
424
+ }
425
+ return target;
426
+ };
427
+ /**
428
+ * getObjectType
429
+ * @desc:获取数据类型
430
+ * @author tangdaibing
431
+ * @date 2022年5月7日
432
+ **/
433
+ var getObjectType = function getObjectType(data) {
434
+ var type = Object.prototype.toString.call(data).toLowerCase();
435
+ var typeFormat = {
436
+ '[object string]': 'string',
437
+ '[object number]': 'number',
438
+ '[object null]': 'null',
439
+ '[object boolean]': 'boolean',
440
+ '[object undefined]': 'undefined',
441
+ '[object object]': 'object',
442
+ '[object array]': 'array',
443
+ '[object function]': 'function',
444
+ '[object date]': 'date'
445
+ };
446
+ return typeFormat[type];
447
+ };
448
+ /**
449
+ * getParams
450
+ * @desc:获取url地址指定参数
451
+ * @author huangbo
452
+ * @date 2022年5月7日
453
+ * @param {String} [name] - 参数名称
454
+ **/
455
+ var getParams = function getParams(name) {
456
+ var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
457
+ var r = window.location.search ? decodeURI(window.location.search).substr(1).match(reg) : decodeURI(window.location.hash).slice(decodeURI(window.location.hash).indexOf('?') + 1).match(reg);
458
+ if (r != null) {
459
+ return unescape(r[2]);
460
+ } else {
461
+ return null;
462
+ }
463
+ };
464
+ /**
465
+ * getScript
466
+ * @desc:获取js文件并执行
467
+ * @author huangbo
468
+ * @date 2022年5月7日
469
+ * @param {String} [url] - js文件地址
470
+ **/
471
+ var getScript = function getScript(url) {
472
+ // eslint-disable-next-line no-undef
473
+ return new Promise(function (resolve, reject) {
474
+ var xmlHttp = null;
475
+ if (window.XMLHttpRequest) {
476
+ xmlHttp = new XMLHttpRequest();
477
+ } else if (window.ActiveXObject) {
478
+ xmlHttp = new window.ActiveXObject('Microsoft.XMLHTTP');
479
+ }
480
+ if (xmlHttp == null) {
481
+ alert('浏览器不支持xmlHttp');
482
+ return;
483
+ }
484
+ xmlHttp.open('GET', url, false);
485
+ xmlHttp.onreadystatechange = function () {
486
+ if (xmlHttp.readyState === 4 && xmlHttp.status === 200) {
487
+ var res = xmlHttp.responseText;
488
+ domEval(res);
489
+ resolve(true);
490
+ } else {
491
+ reject(false);
492
+ }
493
+ };
494
+ xmlHttp.send();
495
+ }).catch(function onRejected() {});
496
+ };
497
+ /**
498
+ * domEval
499
+ * @desc:添加js内容
500
+ * @author huangbo
501
+ * @date 2022年5月7日
502
+ * @param {String} [code] - js内容
503
+ **/
504
+ function domEval(code) {
505
+ var script = document.createElement('script');
506
+ script.text = code;
507
+ document.head.appendChild(script).parentNode.removeChild(script);
508
+ }
509
+
510
+ /**
511
+ * indexOfObj
512
+ * @desc:查找数组对象下标
513
+ * @author huangbo
514
+ * @date 2022年5月7日
515
+ * @param {Array} [arry] - 被查找的数组
516
+ * @param {Object} [item] - 目标对象
517
+ * @param {String} [key] - 目标对象的属性名
518
+ **/
519
+ var indexOfObj = function indexOfObj(arry, item, key) {
520
+ for (var i = 0; i < arry.length; i++) {
521
+ if (key) {
522
+ if (typeof item === 'string' && arry[i][key] === item) {
523
+ return i;
524
+ }
525
+ if (item[key] === arry[i][key]) {
526
+ return i;
527
+ }
528
+ } else {
529
+ if (JSON.stringify(item) === JSON.stringify(arry[i])) {
530
+ return i;
531
+ }
532
+ }
533
+ }
534
+ return -1;
535
+ };
536
+
537
+ /**
538
+ * overbrim
539
+ * @desc:判断是否文字溢出
540
+ * @author huangbo
541
+ * @date 2022年5月7日
542
+ * @param {String} [el] - 文字所在的dom
543
+ **/
544
+ var overbrim = function overbrim(el) {
545
+ var w = el.offsetWidth;
546
+ var s = el.scrollWidth;
547
+ if (s > w) {
548
+ return true;
549
+ } else {
550
+ return false;
551
+ }
552
+ };
553
+
554
+ /**
555
+ * setStorage
556
+ * @desc:设置本地储存数据
557
+ * @author huangbo
558
+ * @date 2022年5月7日
559
+ * @param {String} [type] - 储存类型
560
+ * @param {String, Array, Object} [key] - 数据的名称,array类型表示多个key保存同一个value,object类型时对象的属性名称作为key属性值作为value
561
+ * @param {String} [value] - 数据的值
562
+ **/
563
+ var setStorage = function setStorage(type, key, value) {
564
+ if (type === undefined || type === 'sessionStorage') {
565
+ if (typeof key === 'string') {
566
+ sessionStorage.setItem(key, value);
567
+ } else if (Array.isArray(key)) {
568
+ for (var i in key) {
569
+ sessionStorage.setItem(key[i], value);
570
+ }
571
+ } else {
572
+ for (var _i2 in key) {
573
+ sessionStorage.setItem(_i2, key[_i2]);
574
+ }
575
+ }
576
+ } else {
577
+ if (typeof key === 'string') {
578
+ localStorage.setItem(key, value);
579
+ } else if (Array.isArray(key)) {
580
+ for (var _i3 in key) {
581
+ localStorage.setItem(key[_i3], value);
582
+ }
583
+ } else {
584
+ for (var _i4 in key) {
585
+ localStorage.setItem(_i4, key[_i4]);
586
+ }
587
+ }
588
+ }
589
+ };
590
+ /**
591
+ * removeStorage
592
+ * @desc:删除本地储存数据
593
+ * @author huangbo
594
+ * @date 2022年5月7日
595
+ * @param {String, Array} [key] - 获取的名称
596
+ **/
597
+ var removeStorage = function removeStorage(key) {
598
+ if (Array.isArray(key)) {
599
+ for (var i = 0; i < key.length; i++) {
600
+ sessionStorage.removeItem(key[i]);
601
+ localStorage.removeItem(key[i]);
602
+ }
603
+ } else if (key) {
604
+ sessionStorage.removeItem(key);
605
+ localStorage.removeItem(key);
606
+ } else {
607
+ sessionStorage.clear();
608
+ localStorage.clear();
609
+ }
610
+ };
611
+ /**
612
+ * getStorage
613
+ * @desc:获取本地储存数据
614
+ * @author huangbo
615
+ * @date 2022年5月7日
616
+ * @param {String} [key] - 获取的名称
617
+ **/
618
+ var getStorage = function getStorage(key) {
619
+ if (key) {
620
+ var res = sessionStorage.getItem(key) || localStorage.getItem(key) || window[key];
621
+ if (key === 'host' && !res) {
622
+ return window.origin;
623
+ }
624
+ return res;
625
+ }
626
+ var defaults = {};
627
+ var token = sessionStorage.getItem('token') || localStorage.getItem('token') || window.token;
628
+ var ssId = sessionStorage.getItem('ssId') || localStorage.getItem('ssId') || window.ssId;
629
+ var deviceUnique = sessionStorage.getItem('deviceUnique') || localStorage.getItem('deviceUnique') || window.deviceUnique;
630
+ if (token) {
631
+ defaults.Authorization = token;
632
+ }
633
+ if (ssId) {
634
+ defaults.ssId = ssId;
635
+ }
636
+ if (deviceUnique) {
637
+ defaults.deviceUnique = deviceUnique;
638
+ }
639
+ return defaults;
640
+ };
641
+ var getValues = function getValues(obj, flag) {
642
+ var val = {};
643
+ obj.forEach(function (items) {
644
+ if (items.contents) {
645
+ items.contents.forEach(function (item) {
646
+ if (item.name && item.type !== 'button' && item.type !== 'submit') {
647
+ if (item.type === 'table' && item.form) {
648
+ val[item.name] = item.data;
649
+ } else if (item.name && !flag && !item.hide) {
650
+ if (item.value !== undefined && item.value !== '') {
651
+ if (Array.isArray(val)) {
652
+ if (val.length) {
653
+ val[item.name] = item.value;
654
+ }
655
+ } else {
656
+ val[item.name] = item.value;
657
+ }
658
+ }
659
+ }
660
+ }
661
+ });
662
+ } else if (items.name && items.type !== 'button' && items.type !== 'submit') {
663
+ if (items.value !== undefined && items.value !== '') {
664
+ if (Array.isArray(val)) {
665
+ if (val.length) {
666
+ val[items.name] = items.value;
667
+ }
668
+ } else {
669
+ val[items.name] = items.value;
670
+ }
671
+ }
672
+ } else if (items.type === 'table' && items.form) {
673
+ val[items.type] = items.data;
674
+ }
675
+ });
676
+ return val;
677
+ };
678
+
679
+ /**
680
+ * loading 需全局引入element-ui
681
+ * @desc:loading
682
+ * @author huangbo
683
+ * @date 2022年5月7日
684
+ * @param {String} [text] - 显示的文本内容
685
+ **/
686
+ var loading = function loading($loading, res) {
687
+ if (isObject(res)) {
688
+ var config = extend({}, {
689
+ fullscreen: true,
690
+ background: 'rgba(0, 0, 0, 0.65)',
691
+ spinner: 'el-icon-loading',
692
+ text: '加载中...'
693
+ }, res);
694
+ return $loading(config);
695
+ } else {
696
+ window.loading = $loading({
697
+ fullscreen: true,
698
+ background: 'rgba(0, 0, 0, 0.65)',
699
+ spinner: 'el-icon-loading',
700
+ text: res ? res : '加载中...'
701
+ });
702
+ return window.loading;
703
+ }
704
+ };
705
+
706
+ /**
707
+ * formatDate
708
+ * @desc:格式化时间
709
+ * @author huangbo
710
+ * @date 2022年5月7日
711
+ * @param {String, Number} [date] - 时间字符串或时间戳
712
+ * @param {String} [fmt] - 格式
713
+ **/
714
+ var formatDate = function formatDate(date, fmt) {
715
+ var obj = void 0;
716
+ if (date) {
717
+ obj = new Date(date);
718
+ } else {
719
+ obj = new Date();
720
+ }
721
+ var quarter = ['一', '二', '三', '四'];
722
+ var o = {
723
+ 'b+': Math.ceil((obj.getMonth() + 1) / 6), // 半年
724
+ 'M+': obj.getMonth() + 1, // 月份
725
+ 'd+': obj.getDate(), // 日
726
+ 'H+': obj.getHours(), // 小时
727
+ 'm+': obj.getMinutes(), // 分
728
+ 's+': obj.getSeconds(), // 秒
729
+ 'q+': quarter[Math.ceil((obj.getMonth() + 1) / 3) - 1], // 季度
730
+ S: obj.getMilliseconds() // 毫秒
731
+ };
732
+ if (/(y+)/.test(fmt)) {
733
+ fmt = fmt.replace(RegExp.$1, (obj.getFullYear() + '').substr(4 - RegExp.$1.length));
734
+ }
735
+ for (var k in o) {
736
+ if (new RegExp('(' + k + ')').test(fmt)) {
737
+ fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
738
+ }
739
+ }
740
+ return fmt;
741
+ };
742
+ /**
743
+ * timeFrame
744
+ * @desc:格式化时间
745
+ * @author huangbo
746
+ * @date 2022年5月7日
747
+ * @param {String, Number} [date] - 时间字符串或时间戳
748
+ **/
749
+ var timeFrame = function timeFrame(date) {
750
+ var obj = void 0;
751
+ if (date) {
752
+ obj = new Date(date);
753
+ } else {
754
+ obj = new Date();
755
+ }
756
+ var h = obj.getHours(); // 获取小时
757
+ var period = '';
758
+ h < 12 ? period = '上午好!' : h < 18 ? period = '下午好!' : period = '晚上好!';
759
+ return period;
760
+ };
761
+ /**
762
+ * getStyle
763
+ * @desc:获取元素样式(含非行内样式)
764
+ * @author huangbo
765
+ * @date 2022年5月7日
766
+ * @param {String} [dom] - dom元素
767
+ * @param {String} [attr] - 样式属性名
768
+ **/
769
+
770
+ var getStyle = function getStyle(dom, attr) {
771
+ if (dom.style[attr]) {
772
+ return dom.style[attr];
773
+ }
774
+ if (window.getComputedStyle) {
775
+ return getComputedStyle(dom, null)[attr];
776
+ }
777
+ return dom.currentStyle[attr];
778
+ };
779
+
780
+ /**
781
+ * handlerUrl
782
+ * @desc:更新url参数中的时间戳
783
+ * @author huangbo
784
+ * @date 2022年5月7日
785
+ * @param {String} [url] - url地址
786
+ **/
787
+
788
+ var handlerUrl = function handlerUrl(url, host) {
789
+ var arry = url.split('?');
790
+ if (arry.length > 1) {
791
+ if (arry[1].indexOf('_tt') > -1) {
792
+ var search = arry[1].split('&');
793
+ for (var i in search) {
794
+ if (search[i].indexOf('_tt') > -1) {
795
+ search[i] = '_tt=' + new Date().getTime();
796
+ }
797
+ }
798
+ arry[1] = search.join('&');
799
+ } else {
800
+ arry[1] += '&_tt=' + new Date().getTime();
801
+ }
802
+ url = arry.join('?');
803
+ } else {
804
+ url += '?_tt=' + new Date().getTime();
805
+ }
806
+ url = jointUrl(url, host);
807
+ return encodeURI(url);
808
+ };
809
+
810
+ /**
811
+ * getRgb
812
+ * @desc:获取颜色值的rgb值
813
+ * @author huangbo
814
+ * @date 2022年5月7日
815
+ * @param {string} [$color] - 颜色值
816
+ **/
817
+ var getRgb = function getRgb($color) {
818
+ var rgb = [];
819
+ // 16进制颜色值的正则
820
+ var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
821
+ // 把颜色值变成小写
822
+ $color = $color.toLowerCase();
823
+ if (reg.test($color)) {
824
+ // 如果只有三位的值,需变成六位,如:#fff => #ffffff
825
+ if ($color.length === 4) {
826
+ var colorNew = '#';
827
+ for (var i = 1; i < 4; i++) {
828
+ colorNew += $color.slice(i, i + 1).concat($color.slice(i, i + 1));
829
+ }
830
+ $color = colorNew;
831
+ }
832
+ // 处理六位的颜色值,转为RGB
833
+ for (var _i5 = 1; _i5 < 7; _i5 += 2) {
834
+ rgb.push(parseInt('0x' + $color.slice(_i5, _i5 + 2), 16));
835
+ }
836
+ } else {
837
+ rgb = $color.replace(/(?:\(|\)|rgb|RGB)*/g, '').split(',');
838
+ }
839
+ return rgb;
840
+ };
841
+
842
+ /**
843
+ * rgbToHsv
844
+ * @desc:rgb转化成hsv
845
+ * @author huangbo
846
+ * @date 2022年5月7日
847
+ * @param {string} [$color] - 颜色值
848
+ **/
849
+ var rgbToHsv = function rgbToHsv($color) {
850
+ var rgb = getRgb($color);
851
+ var $red = rgb[0];
852
+ var $green = rgb[1];
853
+ var $blue = rgb[2];
854
+ var $max = Math.max($red, $green, $blue);
855
+ var $min = Math.min($red, $green, $blue);
856
+ var $diff = $max - $min;
857
+ var $h = 0;
858
+ if ($max === $min) {
859
+ $h = 0;
860
+ } else if ($max === $red) {
861
+ $h = 60 * ($green - $blue) / $diff + ($green > $blue - 1 ? 0 : 360);
862
+ } else if ($max === $green) {
863
+ $h = 60 * ($blue - $red) / $diff + 120;
864
+ } else if ($max === $blue) {
865
+ $h = 60 * ($red - $green) / $diff + 240;
866
+ }
867
+ var $s = $max === 0 ? 0 : $diff / $max;
868
+ var $v = $max / 255;
869
+ return [$h, $s, $v];
870
+ };
871
+ /**
872
+ * hsvTorgb
873
+ * @desc:hsv转化成rgb
874
+ * @author huangbo
875
+ * @date 2022年5月7日
876
+ * @param {string} [$color] - 颜色值
877
+ **/
878
+ function hsvTorgb($h, $s, $v) {
879
+ var $th = Math.floor($h / 60);
880
+ var $t1 = $h / 60 - $th;
881
+ var $t2 = $v * (1 - $s);
882
+ var $t3 = $v * (1 - $t1 * $s);
883
+ var $t4 = $v * (1 - (1 - $t1) * $s);
884
+ var $r = [$v, $t3, $t2, $t2, $t4, $v][$th % 6];
885
+ var $g = [$t4, $v, $v, $t3, $t2, $t2][$th % 6];
886
+ var $b = [$t2, $t2, $t4, $v, $v, $t3][$th % 6];
887
+ // return `rgb(${Math.round($r * 255)}, ${Math.round($g * 255)}, ${Math.round($b * 255)})`;
888
+ var red = Math.round($r * 255);
889
+ var green = Math.round($g * 255);
890
+ var blue = Math.round($b * 255);
891
+ red = red.toString(16);
892
+ green = green.toString(16);
893
+ blue = blue.toString(16);
894
+ red = red.length === 1 ? '0' + red : red;
895
+ green = green.length === 1 ? '0' + green : green;
896
+ blue = blue.length === 1 ? '0' + blue : blue;
897
+ return '#' + red + green + blue;
898
+ }
899
+ /**
900
+ * toFixed
901
+ * @desc:浮点数保留小数位
902
+ * @author huangbo
903
+ * @date 2022年5月7日
904
+ * @param {number} [$float] - 要转换的数值
905
+ * @param {number} [$digits] - 小数位数
906
+ **/
907
+ function toFixed($float, $digits) {
908
+ var $pow = Math.pow(10, $digits);
909
+ return Math.round($float * $pow) / $pow;
910
+ }
911
+
912
+ /**
913
+ * getHue
914
+ * @desc:转换色相
915
+ * @author huangbo
916
+ * @date 2022年5月7日
917
+ **/
918
+ function getHue($h, $i, $isLight) {
919
+ var $hue = void 0;
920
+ if ($h >= 60 && $h <= 240) {
921
+ $hue = $isLight ? $h - $hueStep * $i : $h + $hueStep * $i;
922
+ } else {
923
+ $hue = $isLight ? $h + $hueStep * $i : $h - $hueStep * $i;
924
+ }
925
+ $hue = ($hue + 360) % 360;
926
+ return Math.round($hue);
927
+ }
928
+
929
+ /**
930
+ * getSaturation
931
+ * @desc:转换饱和度
932
+ * @author huangbo
933
+ * @date 2022年5月7日
934
+ **/
935
+ function getSaturation($s, $i, $isLight) {
936
+ var $saturation = void 0;
937
+ if ($isLight) {
938
+ $saturation = $s - $saturationStep1 * $i;
939
+ } else if ($i === $darkColorCount) {
940
+ $saturation = $s + $saturationStep1;
941
+ } else {
942
+ $saturation = $s + $saturationStep2 * $i;
943
+ }
944
+ $saturation = $saturation < 1 ? $saturation : 1;
945
+
946
+ if ($isLight && $i === $lightColorCount && $saturation > 0.1) {
947
+ $saturation = 0.1;
948
+ }
949
+ $saturation = $saturation > 0.06 ? $saturation : 0.06;
950
+ return toFixed($saturation, 2);
951
+ }
952
+
953
+ /**
954
+ * getValue
955
+ * @desc:转换明度
956
+ * @author huangbo
957
+ * @date 2022年5月7日
958
+ **/
959
+ function getValue($v, $i, $isLight) {
960
+ var $value = $isLight ? $v + $brightnessStep1 * $i : $v - $brightnessStep2 * $i;
961
+ $value = $value < 1 ? $value : 1;
962
+ return toFixed($value, 2);
963
+ }
964
+ var $hueStep = 2;
965
+ var $saturationStep1 = 0.16;
966
+ var $saturationStep2 = 0.05;
967
+ var $brightnessStep1 = 0.05;
968
+ var $brightnessStep2 = 0.15;
969
+ var $lightColorCount = 5;
970
+ var $darkColorCount = 4;
971
+
972
+ /**
973
+ * getColor
974
+ * @desc:根据颜色和对应的色板位置,计算出对应的色板颜色
975
+ * @author huangbo
976
+ * @date 2022年5月7日
977
+ **/
978
+ function getColor($color, $n) {
979
+ var $isLight = $n < 7;
980
+ var $hsv = rgbToHsv($color);
981
+ // 这里将i转换成以主色为中心,两侧的i值逐渐增大
982
+ var $i = $isLight ? $lightColorCount + 1 - $n : $n - $lightColorCount - 1;
983
+ var color = hsvTorgb(getHue($hsv[0], $i, $isLight), getSaturation($hsv[1], $i, $isLight), getValue($hsv[2], $i, $isLight));
984
+ return color;
985
+ }
986
+ /**
987
+ * mixColor
988
+ * @desc:生成混合色
989
+ * @author huangbo
990
+ * @date 2022年5月7日
991
+ * @param {string} [$color1] - 颜色值
992
+ * @param {string} [$color2] - 颜色值
993
+ * @param {string} [$n] - 百分比 0~1
994
+ **/
995
+ var mixColor = function mixColor($color1, $color2, $n) {
996
+ var rgb1 = getRgb($color1);
997
+ var rgb2 = getRgb($color2);
998
+ var r = rgb1[0] * $n + rgb2[0] * (1 - $n);
999
+ var g = rgb1[1] * $n + rgb2[1] * (1 - $n);
1000
+ var b = rgb1[2] * $n + rgb2[2] * (1 - $n);
1001
+ return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
1002
+ };
1003
+ /**
1004
+ * updateTheme
1005
+ * @desc:更新主题色
1006
+ * @author huangbo
1007
+ * @date 2022年5月7日
1008
+ * @param {string} [$color] - 颜色值
1009
+ **/
1010
+ var updateTheme = function updateTheme($color, send) {
1011
+ $color = $color ? $color : '#409eff';
1012
+ if (send === undefined) {
1013
+ send = true;
1014
+ }
1015
+ document.documentElement.style.setProperty('--theme-primary', $color);
1016
+ for (var i = 1; i < 11; i++) {
1017
+ if (i === 6) {
1018
+ document.documentElement.style.setProperty('--theme-primary-light-' + i, $color);
1019
+ } else {
1020
+ var light = getColor($color, i);
1021
+ document.documentElement.style.setProperty('--theme-primary-light-' + i, light);
1022
+ }
1023
+ }
1024
+ if (send) {
1025
+ sendMessage({ data: { type: 'setTheme' } });
1026
+ }
1027
+ };
1028
+ /**
1029
+ * sendMessage
1030
+ * @desc:向iframe发送信息
1031
+ * @author huangbo
1032
+ * @date 2022年5月7日
1033
+ * @param {object} [data] - 数据---其中type必须表示操作类型
1034
+ * @param {string} [url] - 指定的消息发送URI地址
1035
+ **/
1036
+ var sendMessage = function sendMessage(_ref) {
1037
+ var _ref$data = _ref.data,
1038
+ data = _ref$data === undefined ? {} : _ref$data,
1039
+ url = _ref.url;
1040
+
1041
+ var iframes = document.getElementsByTagName('iframe');
1042
+ for (var i = 0; i < iframes.length; i++) {
1043
+ if (url !== undefined) {
1044
+ if (iframes[i].contentWindow.location.href === url) {
1045
+ iframes[i].contentWindow.postMessage(data, url);
1046
+ return;
1047
+ }
1048
+ } else {
1049
+ iframes[i].contentWindow.postMessage(data);
1050
+ }
1051
+ }
1052
+ };
1053
+
1054
+ /**
1055
+ * receiveMessage
1056
+ * @desc:接收发送信息
1057
+ * @author huangbo
1058
+ * @date 2022年5月7日
1059
+ * @param {object} [data] - 数据---其中type必须表示操作类型
1060
+ * @param {string} [url] - 消息源的 URI
1061
+ * @param {function} [callback] - 回调函数
1062
+ **/
1063
+ var receiveMessage = function receiveMessage(_ref2) {
1064
+ var _ref2$data = _ref2.data,
1065
+ data = _ref2$data === undefined ? {} : _ref2$data,
1066
+ url = _ref2.url,
1067
+ callback = _ref2.callback;
1068
+
1069
+ window.addEventListener('message', function (e) {
1070
+ if (url !== undefined) {
1071
+ if (e.origin !== url) {
1072
+ // 验证消息来源地址
1073
+ return;
1074
+ }
1075
+ }
1076
+ callback(e.data);
1077
+ });
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
+ * replenish
1155
+ * @desc:补全小数位数
1156
+ * @author huangbo
1157
+ * @date 2022年5月7日
1158
+ * @param {string、number} [num] - 数字或字符串型数字
1159
+ * @param {number} [precision] - 需要的小数位数
1160
+ **/
1161
+ var replenish = function replenish(num, precision) {
1162
+ if (num && precision && precision > 0) {
1163
+ var power = Math.pow(10, precision);
1164
+ var res = num === 'string' ? Number(num) : num;
1165
+ res = String(Math.round(res * power) / power);
1166
+ var len = res.indexOf('.');
1167
+ if (len < 0) {
1168
+ len = res.length;
1169
+ res += '.';
1170
+ }
1171
+ while (res.length <= len + precision) {
1172
+ res += '0';
1173
+ }
1174
+ return parseFloat(res);
1175
+ }
1176
+ return num;
1177
+ };
1178
+ /**
1179
+ * identical
1180
+ * @desc:form验证两个值是否相同(确认密码)
1181
+ * @author huangbo
1182
+ * @date 2022年5月7日
1183
+ * @param {val} [string] - 当前值
1184
+ * @param {callback} [function] - 回调函数
1185
+ * @param {val} [string] - 被验证的原值
1186
+ **/
1187
+ var identical = function identical(value, callback, val) {
1188
+ if (value === '' || value === null || value === undefined) {
1189
+ if (val === '' || val === null || val === undefined) {
1190
+ callback();
1191
+ } else {
1192
+ callback(new Error('请再次输入'));
1193
+ }
1194
+ } else if (value !== val) {
1195
+ callback(new Error('两次输入不一致!'));
1196
+ } else {
1197
+ callback();
1198
+ }
1199
+ };
1200
+
1201
+ /**
1202
+ * exportXls
1203
+ * @desc:导出表格数据
1204
+ * @author huangbo
1205
+ * @date 2022年5月7日
1206
+ * @param {thead} [array] - 表单头部
1207
+ * @param {data} [array] - 导出的数据
1208
+ * @param {name} [string] - 导出文件名
1209
+ * @param {numbers} [boolean] - 序号
1210
+ **/
1211
+ var exportXls = function exportXls(_ref3) {
1212
+ var _ref3$thead = _ref3.thead,
1213
+ thead = _ref3$thead === undefined ? [] : _ref3$thead,
1214
+ _ref3$data = _ref3.data,
1215
+ data = _ref3$data === undefined ? [] : _ref3$data,
1216
+ name = _ref3.name,
1217
+ numbers = _ref3.numbers;
1218
+
1219
+ var tbody = '';
1220
+ var aligns = [];
1221
+ var fields = [];
1222
+ var alink = document.createElement('a');
1223
+ for (var i = 0; i < thead.length; i++) {
1224
+ tbody += '<tr style="text-align: center;">';
1225
+ if (numbers) {
1226
+ tbody += '<th rowspan="' + thead.length + '"></th>';
1227
+ }
1228
+ var tr = thead[i];
1229
+ for (var _x = 0; _x < tr.length; _x++) {
1230
+ var td = tr[_x];
1231
+ tbody += '<th rowspan="' + td.rowspan + '" colspan="' + td.colspan + '" align="' + td.align + '">' + td.label + '</th>';
1232
+ if (td.property) {
1233
+ fields.push(td.property);
1234
+ aligns.push(td.align);
1235
+ }
1236
+ }
1237
+ tbody += '</tr>';
1238
+ }
1239
+ for (var _i6 = 0; _i6 < data.length; _i6++) {
1240
+ tbody += '<tr>';
1241
+ for (var x in fields) {
1242
+ tbody += '<td align="' + aligns[x] + '">' + data[_i6][fields[x]] + '</td>';
1243
+ }
1244
+ tbody += '</tr>';
1245
+ }
1246
+ if (!name) {
1247
+ name = 'table_' + new Date().getTime();
1248
+ }
1249
+ var uri = 'data:application/vnd.ms-excel;base64,';
1250
+ 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>';
1251
+ alink.href = uri + window.btoa(unescape(encodeURIComponent(template)));
1252
+ alink.download = name + '.xls';
1253
+ document.body.appendChild(alink);
1254
+ alink.click();
1255
+ document.body.removeChild(alink);
1256
+ };
1257
+ /**
1258
+ * 获取色彩列表的方法
1259
+ * @function themeTools#handlerGetThemeCluster
1260
+ * @param {String} color - 主题色
1261
+ * @param {String} mode - 风格模式light | dark
1262
+ * @param {String} backgroundColor - mode = dark时的页面背景颜色
1263
+ *
1264
+ * @example
1265
+ * ```js
1266
+ * handlerGetThemeCluster('#0e91ef','dark','#000000');
1267
+ * ```
1268
+ * @return {Array} ['#e6f9ff','#0e91ef',...]
1269
+ */
1270
+ var handlerGetThemeCluster = function handlerGetThemeCluster(color) {
1271
+ var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'light';
1272
+ var backgroundColor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '#000000';
1273
+
1274
+ return Object(_eoss_design_color__WEBPACK_IMPORTED_MODULE_0__["generate"])(color, mode === 'dark' ? { theme: 'dark', backgroundColor: backgroundColor } : {});
1275
+ };
1276
+
1277
+ /**
1278
+ * H5TokenInvalid
1279
+ * @desc 原生app重新登录
1280
+ * @date 2023年3月2日
1281
+ * @author liufan
1282
+ */
1283
+ var H5TokenInvalid = function H5TokenInvalid() {
1284
+ var u = navigator.userAgent;
1285
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1286
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1287
+ if (isAndroid) {
1288
+ window.AndroidWebView.H5TokenInvalid();
1289
+ } else if (isiOS) {
1290
+ var info = {};
1291
+ window.webkit.messageHandlers.H5TokenInvalid.postMessage(info);
1292
+ }
1293
+ };
1294
+ /**
1295
+ * JSCallNativeShowTabbar
1296
+ * @desc:原生app隐藏或显示底部tabbar
1297
+ * @date 2023年3月2日
1298
+ * @author liufan
1299
+ * @param {Boolean} res -是否展示底部导航
1300
+ */
1301
+ var JSCallNativeShowTabbar = function JSCallNativeShowTabbar(res) {
1302
+ var u = navigator.userAgent;
1303
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1304
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1305
+ var data = {
1306
+ showState: res
1307
+ };
1308
+ if (isAndroid) {
1309
+ window.AndroidWebView.JSCallNativeShowTabbar(JSON.stringify(data));
1310
+ } else if (isiOS) {
1311
+ window.webkit.messageHandlers.JSCallNativeShowTabbar.postMessage(data);
1312
+ }
1313
+ };
1314
+ /**
1315
+ * JSCallNativeShowNaviBar
1316
+ * @desc:原生app隐藏或者显示头部导航栏
1317
+ * @date 2023年3月2日
1318
+ * @author liufan
1319
+ * @param {Boolean} res -是否展示头部导航栏
1320
+ */
1321
+ var JSCallNativeShowNaviBar = function JSCallNativeShowNaviBar(res) {
1322
+ var u = navigator.userAgent;
1323
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1324
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1325
+ if (isAndroid) {
1326
+ var data = {
1327
+ showState: res
1328
+ };
1329
+ window.AndroidWebView.JSCallNativeShowNaviBar(JSON.stringify(data));
1330
+ } else if (isiOS) {
1331
+ window.webkit.messageHandlers.JSCallNativeShowNaviBar({
1332
+ showState: JSON.stringify(res)
1333
+ });
1334
+ }
1335
+ };
1336
+ /**
1337
+ * JSCallNativeOpenUrl
1338
+ * @desc:原生app打开外部链接
1339
+ * @date 2023年3月2日
1340
+ * @author liufan
1341
+ * @param {Object} data -链接参数
1342
+ */
1343
+ var JSCallNativeOpenUrl = function JSCallNativeOpenUrl(data) {
1344
+ var u = navigator.userAgent;
1345
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1346
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1347
+ if (isAndroid) {
1348
+ window.AndroidWebView.JSCallNativeOpenUrl(JSON.stringify(data));
1349
+ } else if (isiOS) {
1350
+ window.webkit.messageHandlers.JSCallNativeOpenUrl.postMessage(data);
1351
+ }
1352
+ };
1353
+ /**
1354
+ * openMainBodyFile
1355
+ * @desc:原生app打开正文
1356
+ * @date 2023年3月2日
1357
+ * @author liufan
1358
+ * @param {Object} data 正文参数
1359
+ */
1360
+ var openMainBodyFile = function openMainBodyFile(data) {
1361
+ var u = navigator.userAgent;
1362
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1363
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1364
+ if (isAndroid) {
1365
+ window.AndroidWebView.JSCallOpenMainBodyFile(JSON.stringify(data));
1366
+ } else if (isiOS) {
1367
+ window.webkit.messageHandlers.JSCallOpenMainBodyFile.postMessage(data);
1368
+ }
1369
+ };
1370
+ /**
1371
+ * openUrl
1372
+ * @desc 打开外网地址
1373
+ * @date 2023年3月2日
1374
+ * @author liufan
1375
+ * @param {String} url 调整地址
1376
+ */
1377
+ var openUrl = function openUrl(url) {
1378
+ var u = navigator.userAgent;
1379
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1380
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1381
+ if (isAndroid) {
1382
+ window.open(url);
1383
+ } else if (isiOS) {
1384
+ window.location.href = url;
1385
+ }
1386
+ };
1387
+ /**
1388
+ * openAttachment
1389
+ * @desc:原生app通用打开附件
1390
+ * @date 2023年3月2日
1391
+ * @author liufan
1392
+ * @param {Object} data -附件信息
1393
+ */
1394
+ var openAttachment = function openAttachment(data) {
1395
+ if (window.isCh) {
1396
+ window.uexPDF.openOther(data);
1397
+ } else {
1398
+ var u = navigator.userAgent;
1399
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1400
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1401
+ if (isAndroid) {
1402
+ window.AndroidWebView.jsOpenAccessory(JSON.stringify(data));
1403
+ } else if (isiOS) {
1404
+ window.webkit.messageHandlers.jsOpenAccessory.postMessage(data);
1405
+ }
1406
+ }
1407
+ };
1408
+ /**
1409
+ * deepClone
1410
+ * @desc:深拷贝
1411
+ * @date 2023年3月2日
1412
+ * @author liufan
1413
+ * @param {Object、Array} target
1414
+ */
1415
+ var deepClone = function deepClone(target) {
1416
+ var result = void 0;
1417
+ // 如果当前需要深拷贝的是一个对象的话
1418
+ if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object') {
1419
+ // 如果是一个数组的话
1420
+ if (Array.isArray(target)) {
1421
+ result = [];
1422
+ for (var i in target) {
1423
+ result.push(deepClone(target[i]));
1424
+ }
1425
+ } else if (target === null) {
1426
+ result = null;
1427
+ } else if (target.constructor === RegExp) {
1428
+ result = target;
1429
+ } else {
1430
+ result = {};
1431
+ for (var _i7 in target) {
1432
+ result[_i7] = deepClone(target[_i7]);
1433
+ }
1434
+ }
1435
+ } else {
1436
+ result = target;
1437
+ }
1438
+ return result;
1439
+ };
1440
+
1441
+ /**
1442
+ * 排除属性
1443
+ * @desc:exclAttribute
1444
+ * @author huangbo
1445
+ * @date 2022年5月7日
1446
+ * @param {String/Array} [attrs] - 要排除的属性
1447
+ **/
1448
+ var exclAttribute = function exclAttribute(_ref4) {
1449
+ var _ref4$attrs = _ref4.attrs,
1450
+ attrs = _ref4$attrs === undefined ? 'value' : _ref4$attrs,
1451
+ data = _ref4.data;
1452
+
1453
+ var obj = extend(true, {}, data);
1454
+ if (Array.isArray(attrs)) {
1455
+ attrs.forEach(function (item) {
1456
+ if (obj[item] !== undefined) {
1457
+ delete obj[item];
1458
+ }
1459
+ });
1460
+ } else {
1461
+ delete obj[attrs];
1462
+ }
1463
+ return obj;
1464
+ };
1465
+ /* harmony default export */ __webpack_exports__["a"] = ({
1466
+ esEncrypt: esEncrypt,
1467
+ esDecode: esDecode,
1468
+ startWith: startWith,
1469
+ jointUrl: jointUrl,
1470
+ queryParams: queryParams,
1471
+ exclAttribute: exclAttribute,
1472
+ urlJoinParams: urlJoinParams,
1473
+ arrUnique: arrUnique,
1474
+ isObject: isObject,
1475
+ isFunction: isFunction,
1476
+ extend: extend,
1477
+ getObjectType: getObjectType,
1478
+ getParams: getParams,
1479
+ getScript: getScript,
1480
+ indexOfObj: indexOfObj,
1481
+ overbrim: overbrim,
1482
+ deepClone: deepClone,
1483
+ setStorage: setStorage,
1484
+ handlerGetThemeCluster: handlerGetThemeCluster,
1485
+ JSCallNativeShowNaviBar: JSCallNativeShowNaviBar,
1486
+ removeStorage: removeStorage,
1487
+ openAttachment: openAttachment,
1488
+ openUrl: openUrl,
1489
+ JSCallNativeOpenUrl: JSCallNativeOpenUrl,
1490
+ openMainBodyFile: openMainBodyFile,
1491
+ JSCallNativeShowTabbar: JSCallNativeShowTabbar,
1492
+ H5TokenInvalid: H5TokenInvalid,
1493
+ getStorage: getStorage,
1494
+ getValues: getValues,
1495
+ loading: loading,
1496
+ formatDate: formatDate,
1497
+ timeFrame: timeFrame,
1498
+ getStyle: getStyle,
1499
+ handlerUrl: handlerUrl,
1500
+ mixColor: mixColor,
1501
+ getRgb: getRgb,
1502
+ updateTheme: updateTheme,
1503
+ sendMessage: sendMessage,
1504
+ receiveMessage: receiveMessage,
1505
+ getTypeName: getTypeName,
1506
+ replenish: replenish,
1507
+ identical: identical,
1508
+ exportXls: exportXls
1509
+ });
1510
+
1511
+ /***/ }),
1512
+ /* 2 */
1513
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1514
+
1515
+ "use strict";
1516
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return selectObject; });
1517
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return findSysCode; });
1518
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return commonOpion; });
1519
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getHandleInfoHtml; });
1520
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getNodeInfoHtml; });
1521
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return taskHandleHtml; });
1522
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return registerNew; });
1523
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getNodeInfo; });
1524
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return toStartFlow; });
1525
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return taskRejectHtml; });
1526
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return toTaskRejectHtml; });
1527
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return handleTaskRead; });
1528
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return taskReadHtml; });
1529
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return toStartTaskReadHtml; });
1530
+ // 获取机构/用户/角色/群组等选择器
1531
+ var selectObject = '/api/v1/mecpSys/selectObject.json';
1532
+ // 获取代码表数据
1533
+ var findSysCode = '/api/v1/mecpSys/findSysCode.json';
1534
+ // 获取常用意见
1535
+ var commonOpion = '/api/v1/mecpIpending/commonOpion.json';
1536
+ // 获取审核页面信息
1537
+ var getHandleInfoHtml = '/api/mecp/v1/mecpItask/getHandleInfoHtml.json';
1538
+ // 获取节点信息(获取节点属性及办理人,审核)
1539
+ var getNodeInfoHtml = '/api/mecp/v1/mecpItask/getNodeInfoHtml.json';
1540
+ // 提交办理(为H5提供接口)
1541
+ var taskHandleHtml = '/api/mecp/v1/mecpItask/taskHandleHtml.json';
1542
+ // 发起流程
1543
+ var registerNew = '/api/v1/mecpItask/registerNew.json';
1544
+ // 获取节点信息(获取节点属性及办理人,发起)
1545
+ var getNodeInfo = '/api/mecp/v1/mecpItask/getNodeInfo.json';
1546
+ // 获取发起流程信息
1547
+ var toStartFlow = '/api/mecp/v1/mecpItask/toStartFlow.json';
1548
+ // 驳回(为H5提供接口)
1549
+ var taskRejectHtml = '/api/mecp/v1/mecpItask/taskRejectHtml.json';
1550
+ // 获取驳回页面信息
1551
+ var toTaskRejectHtml = '/api/mecp/v1/mecpItask/toTaskRejectHtml.json';
1552
+ // 分阅阅结(为H5提供接口)
1553
+ var handleTaskRead = '/api/mecp/v1/mecpItask/handleTaskRead.json';
1554
+ // 分阅(为H5提供接口)
1555
+ var taskReadHtml = '/api/mecp/v1/mecpItask/taskReadHtml.json';
1556
+ // 获取分阅页面信息
1557
+ var toStartTaskReadHtml = '/api/mecp/v1/mecpItask/toStartTaskReadHtml.json';
1558
+
1559
+ /***/ }),
1560
+ /* 3 */
1561
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1562
+
1563
+ "use strict";
1564
+
1565
+ // EXTERNAL MODULE: external "axios"
1566
+ var external_axios_ = __webpack_require__(6);
1567
+ var external_axios_default = /*#__PURE__*/__webpack_require__.n(external_axios_);
1568
+
1569
+ // EXTERNAL MODULE: external "eoss-mobile-vant"
1570
+ var external_eoss_mobile_vant_ = __webpack_require__(7);
1571
+
1572
+ // EXTERNAL MODULE: ./src/utils/util.js
1573
+ var util = __webpack_require__(1);
1574
+
1575
+ // EXTERNAL MODULE: external "qs"
1576
+ var external_qs_ = __webpack_require__(4);
1577
+ var external_qs_default = /*#__PURE__*/__webpack_require__.n(external_qs_);
1578
+
1579
+ // CONCATENATED MODULE: ./src/utils/axios.js
1580
+
1581
+ // import Vue from 'vue';
1582
+
1583
+
1584
+
1585
+ var apiUrl = util["a" /* default */].getStorage('host');
1586
+ var http = external_axios_default.a.create({
1587
+ headers: {
1588
+ clientKey: util["a" /* default */].getStorage('clientKey') || 'csjk'
1589
+ },
1590
+ baseURL: apiUrl,
1591
+ timeout: 60000,
1592
+ withCredentials: false
1593
+ });
1594
+ http.interceptors.request.use(function (config) {
1595
+ var data = {};
1596
+ if (config.method === 'post') {
1597
+ // 特殊处理在线考试接口1
1598
+ if (config.url.search('HGtest') !== -1) {
1599
+ config.headers['Content-Type'] = 'application/json;';
1600
+ // config.data = qs.stringify(data);
1601
+ Object.assign(data, config.data);
1602
+ } else if (config.url.search('/outsidedirector/business/update') !== -1) {
1603
+
1604
+ delete config.data.userId;
1605
+ } else if (config.url.indexOf('decisionSuperviseMeet') !== -1) {
1606
+ config.headers['Content-Type'] = 'application/x-www-form-urlencoded';
1607
+ Object.assign(data, config.data);
1608
+ config.data = external_qs_default.a.stringify(data);
1609
+ } else {
1610
+ config.headers['Content-Type'] = 'application/x-www-form-urlencoded';
1611
+ Object.assign(data, config.data);
1612
+ config.data = external_qs_default.a.stringify(data);
1613
+ }
1614
+ } else {
1615
+ Object.assign(config.params, data);
1616
+ config.headers['Content-Type'] = 'application/json;';
1617
+ }
1618
+ if (util["a" /* default */].getStorage('token')) {
1619
+ config.headers.Authorization = util["a" /* default */].getStorage('token');
1620
+ }
1621
+ if (util["a" /* default */].getStorage('deviceId')) {
1622
+ config.headers.deviceId = util["a" /* default */].getStorage('deviceId');
1623
+ }
1624
+
1625
+ var a = '/config/';
1626
+
1627
+ if (config.url.search(a) !== -1 && config.url.search('appInfo') === -1) {
1628
+ config.headers.clientKey = util["a" /* default */].getStorage('clientKey') || 'csjk2';
1629
+ }
1630
+ if (config.url.search('api/financePhone/') !== -1) {
1631
+ config.baseURL = 'https://release.cdgzjg.cn/';
1632
+ }
1633
+ if (config.url.search('/getmyAccount.json') !== -1) {
1634
+ delete config.params.userId;
1635
+ }
1636
+ if (config.url.search('/sso2/authCenter') !== -1) {
1637
+ delete config.headers.clientKey;
1638
+ delete config.headers.deviceId;
1639
+ }
1640
+ if (config.url.search('/appInfo') !== -1) {
1641
+ config.headers.deviceId = util["a" /* default */].getStorage('deviceId');
1642
+ delete config.headers.clientKey;
1643
+ }
1644
+ if (config.url.search('getPresetCustomInfo') !== -1 || config.url.search('registerNew') !== -1) {
1645
+ // config.baseURL = "/api";
1646
+ config.headers.token = util["a" /* default */].getStorage('token');
1647
+ }
1648
+ if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
1649
+ delete config.headers.deviceId;
1650
+ }
1651
+ // if(config.url.search('getVehicleMaintenanceInfoForAPP') !== -1 ) {
1652
+ // delete config.headers.deviceId
1653
+ // delete config.headers.Authorization
1654
+ // delete config.headers.clientKey
1655
+ // }
1656
+ return config;
1657
+ }, function (error) {
1658
+ return Promise.error(error);
1659
+ });
1660
+ // 响应拦截器
1661
+ http.interceptors.response.use(function (response) {
1662
+ if (response.status === 200) {
1663
+ if (response.data.rCode === 64 || response.data.rCode === 27) {
1664
+ util["a" /* default */].H5TokenInvalid();
1665
+ } else {
1666
+ return Promise.resolve(response.data);
1667
+ }
1668
+ } else {
1669
+ return Promise.reject(response);
1670
+ }
1671
+ }, function (error) {
1672
+ if (error && error.response) {
1673
+ if (error.response.status) {
1674
+ switch (error.response.status) {
1675
+ case 400:
1676
+ error.message = '错误请求';
1677
+ break;
1678
+ case 401:
1679
+ error.message = '未授权,请重新登录';
1680
+ break;
1681
+ case 403:
1682
+ error.message = '登录过期,请重新登录';
1683
+ util["a" /* default */].removeStorage('userId');
1684
+ break;
1685
+ case 404:
1686
+ error.message = '网络请求不存在';
1687
+ break;
1688
+ case 405:
1689
+ error.message = '请求方法错误';
1690
+ break;
1691
+ case 408:
1692
+ error.message = '请求超时';
1693
+ break;
1694
+ case 500:
1695
+ error.message = '服务器端出错';
1696
+ break;
1697
+ case 501:
1698
+ error.message = '网络未实现';
1699
+ break;
1700
+ case 502:
1701
+ error.message = '网络错误';
1702
+ break;
1703
+ case 503:
1704
+ error.message = '服务不可用';
1705
+ break;
1706
+ case 504:
1707
+ error.message = '网络超时';
1708
+ break;
1709
+ case 505:
1710
+ error.message = 'http版本不支持该请求';
1711
+ break;
1712
+ default:
1713
+ error.message = '\u8FDE\u63A5\u9519\u8BEF' + error.response.status;
1714
+ }
1715
+ } else {
1716
+ error.message = '接口出现问题,无法请求';
1717
+ }
1718
+ }
1719
+ Object(external_eoss_mobile_vant_["Toast"])({
1720
+ message: error.message,
1721
+ duration: 1500,
1722
+ forbidClick: true
1723
+ });
1724
+ return Promise.reject(error);
1725
+ });
1726
+
1727
+ var base = {
1728
+ get: function get(url) {
1729
+ var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1730
+
1731
+ if (params.params && url.search('registerNew') === -1) {
1732
+ params.params.userId = params.params.userId ? params.params.userId : util["a" /* default */].getStorage('userId');
1733
+ } else if (url.search('registerNew') === -1) {
1734
+ params.userId = params.userId ? params.userId : util["a" /* default */].getStorage('userId');
1735
+ }
1736
+ if (url.search('mecpSys/login') !== -1) {
1737
+ delete params.userId;
1738
+ }
1739
+ if (url.search('mecp.invest') !== -1) {
1740
+ if (params.params) {
1741
+ params.params.userId = 'u1b9f3ce4731649e0b665af015d74c19b';
1742
+ } else {
1743
+ params.userId = 'u1b9f3ce4731649e0b665af015d74c19b';
1744
+ }
1745
+ }
1746
+ return http.get(url, {
1747
+ params: params
1748
+ });
1749
+ },
1750
+ post: function post(url) {
1751
+ var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1752
+
1753
+ if (params.params) {
1754
+ params.params.userId = util["a" /* default */].getStorage('userId');
1755
+ } else {
1756
+ params.userId = util["a" /* default */].getStorage('userId');
1757
+ }
1758
+ return http.post(url, params);
1759
+ }
1760
+ };
1761
+ /* harmony default export */ var axios = (base);
1762
+ // CONCATENATED MODULE: ./src/utils/http.js
1763
+
1764
+
1765
+ var http_request = function request(options) {
1766
+ var fn = void 0;
1767
+ switch (options.type) {
1768
+ case 'post':
1769
+ fn = axios.post(options.url, options.params);
1770
+ break;
1771
+ case 'get':
1772
+ fn = axios.get(options.url, options.params);
1773
+ break;
1774
+ default:
1775
+ fn = axios.get(options.url, options.params);
1776
+ }
1777
+ return fn;
1778
+ };
1779
+ /* harmony default export */ var utils_http = __webpack_exports__["a"] = (http_request);
1780
+
1781
+ // // 封装请求参数
1782
+ // import qs from 'qs';
1783
+ // import http from './axios.js';
1784
+ // import $ from './util.js';
1785
+
1786
+ // function request({
1787
+ // method = 'get',
1788
+ // url,
1789
+ // data = {},
1790
+ // params = {},
1791
+ // headers = {},
1792
+ // format = true,
1793
+ // mix = true
1794
+ // }) {
1795
+ // if (
1796
+ // method.toLowerCase() === 'post' &&
1797
+ // !Object.prototype.hasOwnProperty.call(data, 'userId') &&
1798
+ // $.getStorage('userId')
1799
+ // ) {
1800
+ // data.userId = $.getStorage('userId');
1801
+ // }
1802
+ // if (
1803
+ // (method === 'get' || method === 'GET') &&
1804
+ // !Object.prototype.hasOwnProperty.call(params, 'userId') &&
1805
+ // $.getStorage('userId')
1806
+ // ) {
1807
+ // params.userId = $.getStorage('userId');
1808
+ // }
1809
+ // if (format && (method === 'post' || method === 'POST')) {
1810
+ // data = qs.stringify(data);
1811
+ // headers['content-type'] = 'application/x-www-form-urlencoded';
1812
+ // }
1813
+ // if (!mix && (method === 'get' || method === 'GET')) {
1814
+ // data = {};
1815
+ // }
1816
+ // if (!mix && (method === 'post' || method === 'POST')) {
1817
+ // params = {};
1818
+ // }
1819
+ // return http({
1820
+ // method,
1821
+ // url,
1822
+ // data,
1823
+ // params,
1824
+ // headers
1825
+ // });
1826
+ // }
1827
+
1828
+ // export default request;
1829
+
1830
+ /***/ }),
1831
+ /* 4 */
1832
+ /***/ (function(module, exports) {
1833
+
1834
+ module.exports = require("qs");
1835
+
1836
+ /***/ }),
1837
+ /* 5 */
1838
+ /***/ (function(module, exports) {
1839
+
1840
+ module.exports = require("@eoss-design/color");
1841
+
1842
+ /***/ }),
1843
+ /* 6 */
1844
+ /***/ (function(module, exports) {
1845
+
1846
+ module.exports = require("axios");
1847
+
1848
+ /***/ }),
1849
+ /* 7 */
1850
+ /***/ (function(module, exports) {
1851
+
1852
+ module.exports = require("eoss-mobile-vant");
1853
+
1854
+ /***/ }),
1855
+ /* 8 */
1856
+ /***/ (function(module, exports) {
1857
+
1858
+ module.exports = require("sm-crypto");
1859
+
1860
+ /***/ }),
1861
+ /* 9 */,
1862
+ /* 10 */,
1863
+ /* 11 */,
1864
+ /* 12 */,
1865
+ /* 13 */,
1866
+ /* 14 */,
1867
+ /* 15 */,
1868
+ /* 16 */,
1869
+ /* 17 */,
1870
+ /* 18 */,
1871
+ /* 19 */,
1872
+ /* 20 */
1873
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1874
+
1875
+ "use strict";
1876
+ // ESM COMPAT FLAG
1877
+ __webpack_require__.r(__webpack_exports__);
1878
+
1879
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/picker/src/main.vue?vue&type=template&id=7adb5da2&
1880
+ var render = function () {
1881
+ var _vm = this
1882
+ var _h = _vm.$createElement
1883
+ var _c = _vm._self._c || _h
1884
+ return _c(
1885
+ "div",
1886
+ { staticClass: "em-picker" },
1887
+ [
1888
+ !_vm.isCheck
1889
+ ? _c(
1890
+ "em-input",
1891
+ _vm._b(
1892
+ {
1893
+ attrs: {
1894
+ readonly: "",
1895
+ clickable: "",
1896
+ label: _vm.label,
1897
+ value: _vm.pickerValue,
1898
+ required: _vm.required,
1899
+ "label-width": _vm.labelWidth,
1900
+ disabled: _vm.disabled,
1901
+ hideLabel: _vm.hideLabel,
1902
+ },
1903
+ on: { click: _vm.handlePicker },
1904
+ },
1905
+ "em-input",
1906
+ _vm.$attrs,
1907
+ false
1908
+ ),
1909
+ [
1910
+ _c("template", { slot: "input" }, [
1911
+ _c(
1912
+ "span",
1913
+ {
1914
+ style:
1915
+ "color:" + (!_vm.pickerValue ? "rgb(150, 151, 153)" : ""),
1916
+ },
1917
+ [
1918
+ _vm._v(
1919
+ _vm._s(
1920
+ _vm.pickerValue
1921
+ ? _vm.pickerValue
1922
+ : _vm.disabled
1923
+ ? "暂无数据"
1924
+ : _vm.placeholder
1925
+ ? _vm.placeholder
1926
+ : "请选择" + _vm.label
1927
+ )
1928
+ ),
1929
+ ]
1930
+ ),
1931
+ ]),
1932
+ ],
1933
+ 2
1934
+ )
1935
+ : _c(
1936
+ "em-input",
1937
+ {
1938
+ attrs: {
1939
+ readonly: "",
1940
+ clickable: "",
1941
+ label: _vm.label,
1942
+ required: _vm.required,
1943
+ disabled: _vm.disabled,
1944
+ "label-width": _vm.labelWidth,
1945
+ hideLabel: _vm.hideLabel,
1946
+ },
1947
+ on: { click: _vm.handlePicker },
1948
+ },
1949
+ [
1950
+ _c("template", { slot: "input" }, [
1951
+ _c(
1952
+ "div",
1953
+ { staticStyle: { width: "100%" } },
1954
+ [
1955
+ _vm._t("textTop"),
1956
+ _vm.pickerValue.length > 0
1957
+ ? _c(
1958
+ "div",
1959
+ _vm._l(_vm.pickerValue, function (r, i) {
1960
+ return _c(
1961
+ "em-tag",
1962
+ {
1963
+ key: i,
1964
+ attrs: {
1965
+ closeable: !_vm.disabled,
1966
+ type: "primary",
1967
+ },
1968
+ on: {
1969
+ click: function ($event) {
1970
+ $event.stopPropagation()
1971
+ _vm.handleClick(r)
1972
+ },
1973
+ close: function ($event) {
1974
+ _vm.deleteList(i, r)
1975
+ },
1976
+ },
1977
+ },
1978
+ [_vm._v(_vm._s(r[_vm.labelKey] || r.name))]
1979
+ )
1980
+ }),
1981
+ 1
1982
+ )
1983
+ : _c("div", { staticStyle: { color: "#969799" } }, [
1984
+ _vm._v(
1985
+ "\n " +
1986
+ _vm._s(
1987
+ _vm.disabled
1988
+ ? " 暂无数据"
1989
+ : !_vm.placeholder
1990
+ ? "请选择" + _vm.label
1991
+ : _vm.placeholder
1992
+ ) +
1993
+ "\n "
1994
+ ),
1995
+ ]),
1996
+ ],
1997
+ 2
1998
+ ),
1999
+ ]),
2000
+ ],
2001
+ 2
2002
+ ),
2003
+ _c(
2004
+ "van-popup",
2005
+ {
2006
+ attrs: { round: "", position: "bottom" },
2007
+ model: {
2008
+ value: _vm.showPicker,
2009
+ callback: function ($$v) {
2010
+ _vm.showPicker = $$v
2011
+ },
2012
+ expression: "showPicker",
2013
+ },
2014
+ },
2015
+ [
2016
+ !_vm.isCheck
2017
+ ? _c(
2018
+ "van-picker",
2019
+ _vm._g(
2020
+ _vm._b(
2021
+ {
2022
+ attrs: {
2023
+ "show-toolbar": "",
2024
+ loading: _vm.newLoading,
2025
+ columns: _vm.newColumns,
2026
+ valueKey: _vm.labelKey,
2027
+ defaultIndex: _vm.newDefaultIndex,
2028
+ },
2029
+ on: {
2030
+ cancel: function ($event) {
2031
+ _vm.showPicker = false
2032
+ },
2033
+ confirm: function ($event) {
2034
+ _vm.onConfirm($event, true)
2035
+ },
2036
+ },
2037
+ },
2038
+ "van-picker",
2039
+ _vm.$attrs,
2040
+ false
2041
+ ),
2042
+ _vm.$listeners
2043
+ ),
2044
+ [
2045
+ _vm._l(_vm.$slots, function (index, name) {
2046
+ return _c("template", { slot: name }, [_vm._t(name)], 2)
2047
+ }),
2048
+ ],
2049
+ 2
2050
+ )
2051
+ : _c(
2052
+ "van-picker",
2053
+ _vm._g(
2054
+ _vm._b(
2055
+ {
2056
+ staticClass: "check-picker",
2057
+ attrs: {
2058
+ "show-toolbar": "",
2059
+ loading: _vm.newLoading,
2060
+ columns: _vm.newColumns,
2061
+ valueKey: _vm.labelKey,
2062
+ defaultIndex: _vm.newDefaultIndex,
2063
+ },
2064
+ on: {
2065
+ cancel: _vm.onConfirm,
2066
+ confirm: function ($event) {
2067
+ _vm.onConfirm($event, true)
2068
+ },
2069
+ },
2070
+ },
2071
+ "van-picker",
2072
+ _vm.$attrs,
2073
+ false
2074
+ ),
2075
+ _vm.$listeners
2076
+ ),
2077
+ [
2078
+ _c("template", { slot: "columns-top" }, [
2079
+ _c(
2080
+ "div",
2081
+ { staticClass: "em-picker__columns" },
2082
+ [
2083
+ _c(
2084
+ "em-list",
2085
+ {
2086
+ attrs: {
2087
+ finished: _vm.listFinished,
2088
+ "finished-text":
2089
+ _vm.sysAppCode || _vm.url ? "没有更多了" : "",
2090
+ offset: 50,
2091
+ },
2092
+ on: { load: _vm.onLoad },
2093
+ model: {
2094
+ value: _vm.listLoading,
2095
+ callback: function ($$v) {
2096
+ _vm.listLoading = $$v
2097
+ },
2098
+ expression: "listLoading",
2099
+ },
2100
+ },
2101
+ [
2102
+ _c(
2103
+ "van-checkbox-group",
2104
+ {
2105
+ model: {
2106
+ value: _vm.checkList,
2107
+ callback: function ($$v) {
2108
+ _vm.checkList = $$v
2109
+ },
2110
+ expression: "checkList",
2111
+ },
2112
+ },
2113
+ _vm._l(_vm.newColumns, function (item, index) {
2114
+ return _c(
2115
+ "em-cell",
2116
+ {
2117
+ key: item[_vm.valueKey],
2118
+ attrs: {
2119
+ clickable: "",
2120
+ isGroup: false,
2121
+ title: item[_vm.labelKey],
2122
+ },
2123
+ on: {
2124
+ click: function ($event) {
2125
+ _vm.toggle(index)
2126
+ },
2127
+ },
2128
+ },
2129
+ [
2130
+ [
2131
+ _c("van-checkbox", {
2132
+ ref: "checkboxes",
2133
+ refInFor: true,
2134
+ attrs: { name: item[_vm.valueKey] },
2135
+ }),
2136
+ ],
2137
+ ],
2138
+ 2
2139
+ )
2140
+ }),
2141
+ 1
2142
+ ),
2143
+ ],
2144
+ 1
2145
+ ),
2146
+ ],
2147
+ 1
2148
+ ),
2149
+ ]),
2150
+ ],
2151
+ 2
2152
+ ),
2153
+ ],
2154
+ 1
2155
+ ),
2156
+ ],
2157
+ 1
2158
+ )
2159
+ }
2160
+ var staticRenderFns = []
2161
+ render._withStripped = true
2162
+
2163
+
2164
+ // CONCATENATED MODULE: ./packages/picker/src/main.vue?vue&type=template&id=7adb5da2&
2165
+
2166
+ // EXTERNAL MODULE: ./src/config/api.js
2167
+ var api = __webpack_require__(2);
2168
+
2169
+ // EXTERNAL MODULE: ./src/utils/http.js + 1 modules
2170
+ var http = __webpack_require__(3);
2171
+
2172
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/picker/src/main.vue?vue&type=script&lang=js&
2173
+ 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; };
2174
+
2175
+ 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; };
2176
+
2177
+ //
2178
+ //
2179
+ //
2180
+ //
2181
+ //
2182
+ //
2183
+ //
2184
+ //
2185
+ //
2186
+ //
2187
+ //
2188
+ //
2189
+ //
2190
+ //
2191
+ //
2192
+ //
2193
+ //
2194
+ //
2195
+ //
2196
+ //
2197
+ //
2198
+ //
2199
+ //
2200
+ //
2201
+ //
2202
+ //
2203
+ //
2204
+ //
2205
+ //
2206
+ //
2207
+ //
2208
+ //
2209
+ //
2210
+ //
2211
+ //
2212
+ //
2213
+ //
2214
+ //
2215
+ //
2216
+ //
2217
+ //
2218
+ //
2219
+ //
2220
+ //
2221
+ //
2222
+ //
2223
+ //
2224
+ //
2225
+ //
2226
+ //
2227
+ //
2228
+ //
2229
+ //
2230
+ //
2231
+ //
2232
+ //
2233
+ //
2234
+ //
2235
+ //
2236
+ //
2237
+ //
2238
+ //
2239
+ //
2240
+ //
2241
+ //
2242
+ //
2243
+ //
2244
+ //
2245
+ //
2246
+ //
2247
+ //
2248
+ //
2249
+ //
2250
+ //
2251
+ //
2252
+ //
2253
+ //
2254
+ //
2255
+ //
2256
+ //
2257
+ //
2258
+ //
2259
+ //
2260
+ //
2261
+ //
2262
+ //
2263
+ //
2264
+ //
2265
+ //
2266
+ //
2267
+ //
2268
+ //
2269
+ //
2270
+ //
2271
+ //
2272
+ //
2273
+ //
2274
+ //
2275
+ //
2276
+ //
2277
+ //
2278
+ //
2279
+ //
2280
+ //
2281
+ //
2282
+ //
2283
+ //
2284
+ //
2285
+ //
2286
+ //
2287
+ //
2288
+ //
2289
+ //
2290
+ //
2291
+ //
2292
+ //
2293
+ //
2294
+ //
2295
+ //
2296
+ //
2297
+ //
2298
+ //
2299
+ //
2300
+ //
2301
+ //
2302
+ //
2303
+
2304
+
2305
+
2306
+ /* harmony default export */ var mainvue_type_script_lang_js_ = ({
2307
+ name: 'EmPicker',
2308
+ inheritAttrs: false,
2309
+ data: function data() {
2310
+ return {
2311
+ showPicker: false,
2312
+ newLoading: false,
2313
+ newLabelKey: '',
2314
+ newValueKey: '',
2315
+ listLoading: false,
2316
+ listFinished: false,
2317
+ newColumns: [],
2318
+ checkList: [],
2319
+ newDefaultIndex: 0,
2320
+ pageIndex: 1,
2321
+ total: -1
2322
+ };
2323
+ },
2324
+
2325
+ props: {
2326
+ // 绑定值
2327
+ value: {
2328
+ type: [String, Array, Object],
2329
+ default: ''
2330
+ },
2331
+ hideLabel: {
2332
+ type: Boolean,
2333
+ default: false
2334
+ },
2335
+ isCheck: {
2336
+ type: Boolean,
2337
+ default: false
2338
+ },
2339
+ required: {
2340
+ type: Boolean,
2341
+ default: false
2342
+ },
2343
+ disabled: {
2344
+ type: Boolean,
2345
+ default: false
2346
+ },
2347
+ // 展示标题
2348
+ label: {
2349
+ type: String,
2350
+ default: '城市'
2351
+ },
2352
+ // 输入框占位提示文字
2353
+ placeholder: {
2354
+ type: String,
2355
+ default: undefined
2356
+ },
2357
+ // 多级选择展示拼接字符
2358
+ joinStr: {
2359
+ type: String,
2360
+ default: '/'
2361
+ },
2362
+ valueKey: {
2363
+ type: String,
2364
+ default: 'value'
2365
+ },
2366
+ labelKey: {
2367
+ type: String,
2368
+ default: 'name'
2369
+ },
2370
+ sysAppCode: {
2371
+ type: String,
2372
+ default: ''
2373
+ },
2374
+ resultsName: {
2375
+ type: String,
2376
+ default: ''
2377
+ },
2378
+ method: {
2379
+ type: String,
2380
+ default: 'get'
2381
+ },
2382
+ url: {
2383
+ type: String
2384
+ },
2385
+ param: {
2386
+ type: Object,
2387
+ default: function _default() {}
2388
+ },
2389
+ columns: {
2390
+ type: Array,
2391
+ default: function _default() {
2392
+ return [];
2393
+ }
2394
+ },
2395
+ loading: {
2396
+ type: Boolean,
2397
+ default: false
2398
+ },
2399
+ defaultIndex: {
2400
+ type: [Number, String]
2401
+ },
2402
+ labelWidth: {
2403
+ type: [Number, String],
2404
+ default: '4em'
2405
+ },
2406
+ isTable: {
2407
+ type: Boolean,
2408
+ default: false
2409
+ }
2410
+ },
2411
+ computed: {
2412
+ pickerValue: {
2413
+ get: function get() {
2414
+ return this.getValue();
2415
+ },
2416
+ set: function set(val) {
2417
+ this.$emit('input', val);
2418
+ }
2419
+ }
2420
+ },
2421
+ watch: {
2422
+ labelKey: {
2423
+ handler: function handler(val) {
2424
+ this.newLabelKey = val;
2425
+ },
2426
+
2427
+ deep: true,
2428
+ immediate: true
2429
+ },
2430
+ valueKey: {
2431
+ handler: function handler(val) {
2432
+ this.newValueKey = val;
2433
+ },
2434
+
2435
+ deep: true,
2436
+ immediate: true
2437
+ },
2438
+ columns: {
2439
+ handler: function handler(val) {
2440
+ if (this.sysAppCode) return;
2441
+ this.newColumns = val;
2442
+ },
2443
+
2444
+ deep: true,
2445
+ immediate: true
2446
+ },
2447
+ defaultIndex: {
2448
+ handler: function handler(val) {
2449
+ this.newDefaultIndex = val;
2450
+ },
2451
+
2452
+ deep: true,
2453
+ immediate: true
2454
+ },
2455
+ loading: {
2456
+ handler: function handler(val) {
2457
+ this.newLoading = val;
2458
+ },
2459
+
2460
+ deep: true,
2461
+ immediate: true
2462
+ }
2463
+ },
2464
+ mounted: function mounted() {
2465
+ var _this = this;
2466
+
2467
+ if ((this.sysAppCode || this.url) && this.newColumns.length == 0 && !this.isCheck) {
2468
+ this.getSysCode();
2469
+ }
2470
+ if (this.defaultIndex != undefined) {
2471
+ var data = this.columns[this.defaultIndex];
2472
+ if (typeof data === 'string' && data) {
2473
+ this.pickerValue = data;
2474
+ } else if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object') {
2475
+ this.pickerValue = data[this.newValueKey];
2476
+ }
2477
+ } else if (this.isCheck) {
2478
+ var _data = this.value;
2479
+ _data.map(function (item) {
2480
+ _this.checkList.push(item[_this.valueKey] || item.value || item);
2481
+ });
2482
+ }
2483
+ },
2484
+
2485
+ methods: {
2486
+ handleClick: function handleClick(val) {
2487
+ this.$emit('tagClick', val);
2488
+ },
2489
+ onLoad: function onLoad() {
2490
+ if ((this.sysAppCode || this.url) && this.newColumns.length != this.total && this.isCheck) {
2491
+ this.getSysCode();
2492
+ } else {
2493
+ this.listFinished = true;
2494
+ }
2495
+ },
2496
+
2497
+ /**
2498
+ * deleteList
2499
+ * @desc:删除选中的数据
2500
+ * @date 2023年4月20日
2501
+ * @author liufan
2502
+ * @param {String} val 当前数据的下标
2503
+ */
2504
+ deleteList: function deleteList(val, res) {
2505
+ if (this.disabled) return;
2506
+ this.pickerValue.splice(val, 1);
2507
+ this.checkList = this.checkList.filter(function (x) {
2508
+ return x != res.value;
2509
+ });
2510
+ this.$emit('input', this.pickerValue);
2511
+ this.$emit('tagDelete', this.pickerValue);
2512
+ },
2513
+ toggle: function toggle(index) {
2514
+ this.$refs.checkboxes[index].toggle();
2515
+ },
2516
+ onConfirm: function onConfirm(value, isConfirm) {
2517
+ var _this2 = this;
2518
+
2519
+ if (isConfirm) {
2520
+ if (this.isCheck) {
2521
+ var data = [];
2522
+ this.newColumns.filter(function (x) {
2523
+ _this2.checkList.find(function (y) {
2524
+ if (x.value === y) {
2525
+ data.push(x);
2526
+ }
2527
+ });
2528
+ });
2529
+ this.pickerValue = data;
2530
+ } else {
2531
+ this.pickerValue = value;
2532
+ }
2533
+ } else {
2534
+ this.checkList = [];
2535
+ this.pickerValue.map(function (x) {
2536
+ _this2.checkList.push(x.value);
2537
+ });
2538
+ }
2539
+
2540
+ this.showPicker = false;
2541
+ },
2542
+ getValue: function getValue() {
2543
+ var _this3 = this;
2544
+
2545
+ var value = '';
2546
+ if (this.isCheck) {
2547
+ var val = [];
2548
+ if (this.newColumns && this.newColumns.length > 0) {
2549
+ this.newColumns.filter(function (x) {
2550
+ _this3.value.find(function (y) {
2551
+ if (x[_this3.valueKey] == y || x[_this3.valueKey] == y.value) {
2552
+ val.push(x);
2553
+ }
2554
+ });
2555
+ });
2556
+ } else {
2557
+ val = this.value;
2558
+ }
2559
+ value = val;
2560
+ } else {
2561
+ if (Array.isArray(this.value) || this.value instanceof Object) {
2562
+ if (!Array.isArray(this.value)) {
2563
+ value = this.value[this.labelKey] || this.value[this.newValueKey];
2564
+ var index = 0;
2565
+ value && (value = value.replace(/<[^>]+>/g, ''));
2566
+ this.newColumns.map(function (x, i) {
2567
+ if (typeof x === 'string' && value.indexOf(x) != -1) {
2568
+ index = i;
2569
+ } else if (x[_this3.newValueKey] == value || x[_this3.newValueKey].indexOf(value) != -1) {
2570
+ index = i;
2571
+ }
2572
+ });
2573
+ this.newDefaultIndex = index;
2574
+ } else {
2575
+ var list = [];
2576
+ this.value.map(function (item) {
2577
+ if (item[_this3.labelKey] || item[_this3.newValueKey]) {
2578
+ list.push(item[_this3.labelKey] || item[_this3.newValueKey]);
2579
+ } else if (typeof item === 'string') {
2580
+ list.push(item);
2581
+ }
2582
+ });
2583
+ value = list.join(this.joinStr);
2584
+ var _index = 0;
2585
+ this.newColumns.map(function (x, i) {
2586
+ if (typeof x === 'string' && value.indexOf(x) != -1) {
2587
+ _index = i;
2588
+ } else if (x[_this3.newValueKey] === value) {
2589
+ _index = i;
2590
+ }
2591
+ });
2592
+ this.newDefaultIndex = _index;
2593
+ }
2594
+ } else {
2595
+ var _index2 = 0;
2596
+ value = this.value;
2597
+ this.newColumns.map(function (x, i) {
2598
+ if (typeof x === 'string' && value.indexOf(x) != -1) {
2599
+ _index2 = i;
2600
+ value = x;
2601
+ } else if (x[_this3.newValueKey] === value) {
2602
+ _index2 = i;
2603
+ value = x[_this3.labelKey] || x[_this3.newValueKey];
2604
+ }
2605
+ });
2606
+ this.newDefaultIndex = _index2;
2607
+ }
2608
+ value && (value = value.replace(/<[^>]+>/g, ''));
2609
+ }
2610
+ return value;
2611
+ },
2612
+ getSysCode: function getSysCode() {
2613
+ var _this4 = this;
2614
+
2615
+ var url = this.url,
2616
+ method = this.method,
2617
+ sysAppCode = this.sysAppCode,
2618
+ param = this.param;
2619
+
2620
+ var params = {
2621
+ url: url || api["b" /* findSysCode */],
2622
+ type: method,
2623
+ params: _extends({
2624
+ sysAppCode: sysAppCode,
2625
+ pageIndex: this.pageIndex
2626
+ }, param)
2627
+ };
2628
+ this.newLoading = true;
2629
+ Object(http["a" /* default */])(params).then(function (res) {
2630
+ var rCode = res.rCode,
2631
+ results = res.results,
2632
+ msg = res.msg;
2633
+
2634
+ _this4.listLoading = false;
2635
+ if (rCode == 0) {
2636
+ var info = _this4.resultsName ? results[_this4.resultsName] : results;
2637
+ info.map(function (x) {
2638
+ if (_this4.isCheck) {
2639
+ x.name = x[_this4.labelKey != 'name' && _this4.labelKey || 'shortName'] && x[_this4.labelKey != 'name' && _this4.labelKey || 'shortName'].replace(/<[^>]+>/g, '');
2640
+ } else {
2641
+ x.name = x[_this4.labelKey != 'name' && _this4.labelKey || 'shortName'];
2642
+ }
2643
+ x.value = x[_this4.valueKey != 'value' && _this4.valueKey || 'cciValue'];
2644
+ });
2645
+ if (results.totalCount) {
2646
+ _this4.total = results.totalCount;
2647
+ if (results.totalCount === _this4.newColumns.length) {
2648
+ _this4.listFinished = true;
2649
+ } else {
2650
+ if (_this4.newColumns.length != 0) {
2651
+ _this4.newColumns.push.apply(_this4.newColumns, info);
2652
+ } else {
2653
+ _this4.newColumns = info;
2654
+ }
2655
+ _this4.pageIndex = res.results.nextPageNo;
2656
+ }
2657
+ } else {
2658
+ _this4.listFinished = true;
2659
+ _this4.newColumns = info;
2660
+ }
2661
+ if (_this4.isTable) _this4.$emit('tableColumns', _this4.newColumns);
2662
+ _this4.getValue();
2663
+ } else {
2664
+ _this4.$toast(msg);
2665
+ }
2666
+ _this4.newLoading = false;
2667
+ }).catch(function (err) {
2668
+ _this4.$toast(err.message);
2669
+ });
2670
+ },
2671
+ handlePicker: function handlePicker() {
2672
+ if (this.disabled) return;
2673
+ this.showPicker = true;
2674
+
2675
+ this.$emit('showPicker');
2676
+ }
2677
+ }
2678
+ });
2679
+ // CONCATENATED MODULE: ./packages/picker/src/main.vue?vue&type=script&lang=js&
2680
+ /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
2681
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2682
+ var componentNormalizer = __webpack_require__(0);
2683
+
2684
+ // CONCATENATED MODULE: ./packages/picker/src/main.vue
2685
+
2686
+
2687
+
2688
+
2689
+
2690
+ /* normalize component */
2691
+
2692
+ var component = Object(componentNormalizer["a" /* default */])(
2693
+ src_mainvue_type_script_lang_js_,
2694
+ render,
2695
+ staticRenderFns,
2696
+ false,
2697
+ null,
2698
+ null,
2699
+ null
2700
+
2701
+ )
2702
+
2703
+ /* harmony default export */ var main = (component.exports);
2704
+ // CONCATENATED MODULE: ./packages/picker/index.js
2705
+
2706
+
2707
+ main.install = function (Vue) {
2708
+ return Vue.component(main.name, main);
2709
+ };
2710
+
2711
+ /* harmony default export */ var picker = __webpack_exports__["default"] = (main);
2712
+
2713
+ /***/ })
2714
+ /******/ ]);