eoss-ui 0.3.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/CHANGELOG.md +929 -0
  2. package/README.md +30 -0
  3. package/lib/button-group.js +2857 -0
  4. package/lib/button.js +2884 -0
  5. package/lib/card.js +603 -0
  6. package/lib/cascader.js +373 -0
  7. package/lib/checkbox-group.js +3099 -0
  8. package/lib/clients.js +375 -0
  9. package/lib/config/api.js +205 -0
  10. package/lib/data-table-form.js +3848 -0
  11. package/lib/data-table.js +6315 -0
  12. package/lib/date-picker.js +2821 -0
  13. package/lib/dialog.js +3730 -0
  14. package/lib/enterprise.js +372 -0
  15. package/lib/eoss-ui.common.js +65365 -0
  16. package/lib/error-page.js +293 -0
  17. package/lib/flow-group.js +4200 -0
  18. package/lib/flow-list.js +4350 -0
  19. package/lib/flow.js +12893 -0
  20. package/lib/form.js +15635 -0
  21. package/lib/handle-user.js +2900 -0
  22. package/lib/handler.js +3118 -0
  23. package/lib/index.js +1 -0
  24. package/lib/input-number.js +2743 -0
  25. package/lib/input.js +2935 -0
  26. package/lib/label.js +411 -0
  27. package/lib/login.js +5048 -0
  28. package/lib/main.js +5816 -0
  29. package/lib/mainComp.js +6530 -0
  30. package/lib/menu.js +529 -0
  31. package/lib/nav.js +3048 -0
  32. package/lib/notify.js +1079 -0
  33. package/lib/page.js +3036 -0
  34. package/lib/pagination.js +354 -0
  35. package/lib/player.js +2904 -0
  36. package/lib/qr-code.js +2860 -0
  37. package/lib/radio-group.js +3091 -0
  38. package/lib/select-ganged.js +3242 -0
  39. package/lib/select.js +3295 -0
  40. package/lib/selector-panel.js +4425 -0
  41. package/lib/selector.js +3722 -0
  42. package/lib/sizer.js +3067 -0
  43. package/lib/steps.js +2943 -0
  44. package/lib/switch.js +2784 -0
  45. package/lib/table-form.js +6211 -0
  46. package/lib/tabs-panel.js +274 -0
  47. package/lib/tabs.js +4988 -0
  48. package/lib/theme-chalk/base.css +1 -0
  49. package/lib/theme-chalk/button-group.css +1 -0
  50. package/lib/theme-chalk/button.css +0 -0
  51. package/lib/theme-chalk/card.css +1 -0
  52. package/lib/theme-chalk/cascader.css +0 -0
  53. package/lib/theme-chalk/checkbox-group.css +1 -0
  54. package/lib/theme-chalk/clients.css +1 -0
  55. package/lib/theme-chalk/data-table-form.css +1 -0
  56. package/lib/theme-chalk/data-table.css +1 -0
  57. package/lib/theme-chalk/date-picker.css +1 -0
  58. package/lib/theme-chalk/dialog.css +1 -0
  59. package/lib/theme-chalk/enterprise.css +1 -0
  60. package/lib/theme-chalk/error-page.css +1 -0
  61. package/lib/theme-chalk/flow-chart.css +0 -0
  62. package/lib/theme-chalk/flow-group.css +1 -0
  63. package/lib/theme-chalk/flow-list.css +1 -0
  64. package/lib/theme-chalk/flow.css +1 -0
  65. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  66. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  67. package/lib/theme-chalk/form.css +1 -0
  68. package/lib/theme-chalk/handle-user.css +1 -0
  69. package/lib/theme-chalk/handler.css +1 -0
  70. package/lib/theme-chalk/icon.css +1 -0
  71. package/lib/theme-chalk/index.css +1 -0
  72. package/lib/theme-chalk/input-number.css +0 -0
  73. package/lib/theme-chalk/input.css +1 -0
  74. package/lib/theme-chalk/label.css +1 -0
  75. package/lib/theme-chalk/login.css +1 -0
  76. package/lib/theme-chalk/main.css +1 -0
  77. package/lib/theme-chalk/mainComp.css +0 -0
  78. package/lib/theme-chalk/menu.css +1 -0
  79. package/lib/theme-chalk/nav.css +1 -0
  80. package/lib/theme-chalk/notify.css +0 -0
  81. package/lib/theme-chalk/page.css +1 -0
  82. package/lib/theme-chalk/pagination.css +1 -0
  83. package/lib/theme-chalk/player.css +1 -0
  84. package/lib/theme-chalk/qr-code.css +1 -0
  85. package/lib/theme-chalk/radio-group.css +1 -0
  86. package/lib/theme-chalk/radio.css +1 -0
  87. package/lib/theme-chalk/select-ganged.css +1 -0
  88. package/lib/theme-chalk/select.css +0 -0
  89. package/lib/theme-chalk/selector-panel.css +1 -0
  90. package/lib/theme-chalk/selector.css +1 -0
  91. package/lib/theme-chalk/sizer.css +1 -0
  92. package/lib/theme-chalk/steps.css +1 -0
  93. package/lib/theme-chalk/switch.css +1 -0
  94. package/lib/theme-chalk/table-form.css +0 -0
  95. package/lib/theme-chalk/tabs-panel.css +0 -0
  96. package/lib/theme-chalk/tabs.css +1 -0
  97. package/lib/theme-chalk/tips.css +1 -0
  98. package/lib/theme-chalk/toolbar.css +1 -0
  99. package/lib/theme-chalk/tree-group.css +1 -0
  100. package/lib/theme-chalk/tree.css +1 -0
  101. package/lib/theme-chalk/upload.css +1 -0
  102. package/lib/theme-chalk/wujie.css +0 -0
  103. package/lib/theme-chalk/wxlogin.css +1 -0
  104. package/lib/tips.js +2830 -0
  105. package/lib/toolbar.js +531 -0
  106. package/lib/tree-group.js +3373 -0
  107. package/lib/tree.js +3482 -0
  108. package/lib/upload.js +3913 -0
  109. package/lib/utils/bus.js +9 -0
  110. package/lib/utils/date-util.js +318 -0
  111. package/lib/utils/http.js +58 -0
  112. package/lib/utils/rules.js +19 -0
  113. package/lib/utils/store.js +22 -0
  114. package/lib/utils/util.js +2056 -0
  115. package/lib/wujie.js +2845 -0
  116. package/lib/wxlogin.js +2799 -0
  117. package/package.json +151 -0
  118. package/packages/button/index.js +5 -0
  119. package/packages/button/src/main.vue +264 -0
  120. package/packages/button-group/index.js +5 -0
  121. package/packages/button-group/src/main.vue +130 -0
  122. package/packages/card/index.js +5 -0
  123. package/packages/card/src/main.vue +144 -0
  124. package/packages/cascader/index.js +5 -0
  125. package/packages/cascader/src/main.vue +144 -0
  126. package/packages/checkbox-group/index.js +5 -0
  127. package/packages/checkbox-group/src/main.vue +285 -0
  128. package/packages/clients/index.js +5 -0
  129. package/packages/clients/src/main.vue +50 -0
  130. package/packages/data-table/index.js +5 -0
  131. package/packages/data-table/src/children.vue +40 -0
  132. package/packages/data-table/src/column.vue +796 -0
  133. package/packages/data-table/src/main copy.vue +1383 -0
  134. package/packages/data-table/src/main.vue +1229 -0
  135. package/packages/data-table/src/mixins/table.js +12 -0
  136. package/packages/data-table/src/sizer.vue +160 -0
  137. package/packages/data-table-form/index.js +5 -0
  138. package/packages/data-table-form/src/colgroup.vue +17 -0
  139. package/packages/data-table-form/src/main.vue +167 -0
  140. package/packages/data-table-form/src/table.vue +192 -0
  141. package/packages/data-table-form/src/tbody.vue +219 -0
  142. package/packages/data-table-form/src/thead.vue +68 -0
  143. package/packages/date-picker/index.js +5 -0
  144. package/packages/date-picker/src/main.vue +185 -0
  145. package/packages/dialog/index.js +5 -0
  146. package/packages/dialog/src/main.vue +442 -0
  147. package/packages/enterprise/index.js +5 -0
  148. package/packages/enterprise/src/main.vue +66 -0
  149. package/packages/error-page/index.js +5 -0
  150. package/packages/error-page/src/main.vue +44 -0
  151. package/packages/flow/index.js +5 -0
  152. package/packages/flow/src/component/CommonOpinions.vue +290 -0
  153. package/packages/flow/src/component/CustomPreset.vue +311 -0
  154. package/packages/flow/src/component/FileList.vue +97 -0
  155. package/packages/flow/src/component/Preset.vue +253 -0
  156. package/packages/flow/src/component/SendMsg.vue +221 -0
  157. package/packages/flow/src/component/TimeLimit.vue +190 -0
  158. package/packages/flow/src/component/taskUnionExamine.vue +507 -0
  159. package/packages/flow/src/form.vue +120 -0
  160. package/packages/flow/src/main.vue +2107 -0
  161. package/packages/flow/src/processForm.vue +866 -0
  162. package/packages/flow/src/processReject.vue +262 -0
  163. package/packages/flow/src/selectUser.vue +425 -0
  164. package/packages/flow/src/startTaskRead.vue +556 -0
  165. package/packages/flow/src/table.vue +51 -0
  166. package/packages/flow-group/index.js +5 -0
  167. package/packages/flow-group/src/main.vue +540 -0
  168. package/packages/flow-list/index.js +5 -0
  169. package/packages/flow-list/src/flow-table.vue +445 -0
  170. package/packages/flow-list/src/main.vue +456 -0
  171. package/packages/form/index.js +5 -0
  172. package/packages/form/src/main.vue +4429 -0
  173. package/packages/form/src/table.vue +1196 -0
  174. package/packages/handle-user/index.js +5 -0
  175. package/packages/handle-user/src/main.vue +122 -0
  176. package/packages/handler/index.js +5 -0
  177. package/packages/handler/src/main.vue +306 -0
  178. package/packages/input/index.js +5 -0
  179. package/packages/input/src/main.vue +307 -0
  180. package/packages/input-number/index.js +5 -0
  181. package/packages/input-number/src/main.vue +106 -0
  182. package/packages/label/index.js +5 -0
  183. package/packages/label/src/main.vue +208 -0
  184. package/packages/login/index.js +5 -0
  185. package/packages/login/src/main.vue +1193 -0
  186. package/packages/login/src/resetPassword.vue +332 -0
  187. package/packages/main/index.js +5 -0
  188. package/packages/main/src/main.vue +1496 -0
  189. package/packages/main/src/message.vue +239 -0
  190. package/packages/main/src/notice.vue +145 -0
  191. package/packages/main/src/settings.vue +105 -0
  192. package/packages/main/src/userinfo.vue +430 -0
  193. package/packages/mainComp/index.js +5 -0
  194. package/packages/mainComp/src/async-component/index.vue +85 -0
  195. package/packages/mainComp/src/main.vue +1934 -0
  196. package/packages/mainComp/src/message.vue +239 -0
  197. package/packages/mainComp/src/notice.vue +152 -0
  198. package/packages/mainComp/src/settings.vue +105 -0
  199. package/packages/mainComp/src/userinfo.vue +423 -0
  200. package/packages/menu/index.js +5 -0
  201. package/packages/menu/src/main.vue +401 -0
  202. package/packages/nav/index.js +5 -0
  203. package/packages/nav/src/main.vue +250 -0
  204. package/packages/notify/index.js +5 -0
  205. package/packages/notify/src/main.vue +538 -0
  206. package/packages/page/index.js +5 -0
  207. package/packages/page/src/main.vue +167 -0
  208. package/packages/pagination/index.js +5 -0
  209. package/packages/pagination/src/main.vue +77 -0
  210. package/packages/player/index.js +5 -0
  211. package/packages/player/src/main.vue +194 -0
  212. package/packages/qr-code/index.js +5 -0
  213. package/packages/qr-code/src/main.vue +154 -0
  214. package/packages/radio/index.js +5 -0
  215. package/packages/radio/src/main.vue +259 -0
  216. package/packages/radio-group/index.js +6 -0
  217. package/packages/radio-group/src/main.vue +267 -0
  218. package/packages/select/index.js +5 -0
  219. package/packages/select/src/main.vue +683 -0
  220. package/packages/select-ganged/index.js +5 -0
  221. package/packages/select-ganged/src/main.vue +686 -0
  222. package/packages/selector/index.js +5 -0
  223. package/packages/selector/src/main.vue +588 -0
  224. package/packages/selector-panel/index.js +5 -0
  225. package/packages/selector-panel/src/main.vue +968 -0
  226. package/packages/selector-panel/src/selection.vue +142 -0
  227. package/packages/selector-panel/src/tree.vue +129 -0
  228. package/packages/sizer/index.js +5 -0
  229. package/packages/sizer/src/main.vue +254 -0
  230. package/packages/steps/index.js +5 -0
  231. package/packages/steps/src/main.vue +175 -0
  232. package/packages/switch/index.js +5 -0
  233. package/packages/switch/src/main.vue +154 -0
  234. package/packages/table-form/index.js +5 -0
  235. package/packages/tabs/index.js +5 -0
  236. package/packages/tabs/src/main.vue +749 -0
  237. package/packages/tabs-panel/index.js +5 -0
  238. package/packages/tabs-panel/src/main.vue +18 -0
  239. package/packages/theme-chalk/README.md +33 -0
  240. package/packages/theme-chalk/lib/base.css +1 -0
  241. package/packages/theme-chalk/lib/button-group.css +1 -0
  242. package/packages/theme-chalk/lib/button.css +0 -0
  243. package/packages/theme-chalk/lib/card.css +1 -0
  244. package/packages/theme-chalk/lib/cascader.css +0 -0
  245. package/packages/theme-chalk/lib/checkbox-group.css +1 -0
  246. package/packages/theme-chalk/lib/clients.css +1 -0
  247. package/packages/theme-chalk/lib/data-table-form.css +1 -0
  248. package/packages/theme-chalk/lib/data-table.css +1 -0
  249. package/packages/theme-chalk/lib/date-picker.css +1 -0
  250. package/packages/theme-chalk/lib/dialog.css +1 -0
  251. package/packages/theme-chalk/lib/enterprise.css +1 -0
  252. package/packages/theme-chalk/lib/error-page.css +1 -0
  253. package/packages/theme-chalk/lib/flow-chart.css +0 -0
  254. package/packages/theme-chalk/lib/flow-group.css +1 -0
  255. package/packages/theme-chalk/lib/flow-list.css +1 -0
  256. package/packages/theme-chalk/lib/flow.css +1 -0
  257. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  258. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  259. package/packages/theme-chalk/lib/form.css +1 -0
  260. package/packages/theme-chalk/lib/handle-user.css +1 -0
  261. package/packages/theme-chalk/lib/handler.css +1 -0
  262. package/packages/theme-chalk/lib/icon.css +1 -0
  263. package/packages/theme-chalk/lib/index.css +1 -0
  264. package/packages/theme-chalk/lib/input-number.css +0 -0
  265. package/packages/theme-chalk/lib/input.css +1 -0
  266. package/packages/theme-chalk/lib/label.css +1 -0
  267. package/packages/theme-chalk/lib/login.css +1 -0
  268. package/packages/theme-chalk/lib/main.css +1 -0
  269. package/packages/theme-chalk/lib/mainComp.css +0 -0
  270. package/packages/theme-chalk/lib/menu.css +1 -0
  271. package/packages/theme-chalk/lib/nav.css +1 -0
  272. package/packages/theme-chalk/lib/notify.css +0 -0
  273. package/packages/theme-chalk/lib/page.css +1 -0
  274. package/packages/theme-chalk/lib/pagination.css +1 -0
  275. package/packages/theme-chalk/lib/player.css +1 -0
  276. package/packages/theme-chalk/lib/qr-code.css +1 -0
  277. package/packages/theme-chalk/lib/radio-group.css +1 -0
  278. package/packages/theme-chalk/lib/radio.css +1 -0
  279. package/packages/theme-chalk/lib/select-ganged.css +1 -0
  280. package/packages/theme-chalk/lib/select.css +0 -0
  281. package/packages/theme-chalk/lib/selector-panel.css +1 -0
  282. package/packages/theme-chalk/lib/selector.css +1 -0
  283. package/packages/theme-chalk/lib/sizer.css +1 -0
  284. package/packages/theme-chalk/lib/steps.css +1 -0
  285. package/packages/theme-chalk/lib/switch.css +1 -0
  286. package/packages/theme-chalk/lib/table-form.css +0 -0
  287. package/packages/theme-chalk/lib/tabs-panel.css +0 -0
  288. package/packages/theme-chalk/lib/tabs.css +1 -0
  289. package/packages/theme-chalk/lib/tips.css +1 -0
  290. package/packages/theme-chalk/lib/toolbar.css +1 -0
  291. package/packages/theme-chalk/lib/tree-group.css +1 -0
  292. package/packages/theme-chalk/lib/tree.css +1 -0
  293. package/packages/theme-chalk/lib/upload.css +1 -0
  294. package/packages/theme-chalk/lib/wujie.css +0 -0
  295. package/packages/theme-chalk/lib/wxlogin.css +1 -0
  296. package/packages/theme-chalk/package.json +35 -0
  297. package/packages/theme-chalk/src/base.scss +165 -0
  298. package/packages/theme-chalk/src/button-group.scss +9 -0
  299. package/packages/theme-chalk/src/button.scss +0 -0
  300. package/packages/theme-chalk/src/card.scss +55 -0
  301. package/packages/theme-chalk/src/cascader.scss +0 -0
  302. package/packages/theme-chalk/src/checkbox-group.scss +8 -0
  303. package/packages/theme-chalk/src/clients.scss +72 -0
  304. package/packages/theme-chalk/src/common/var.scss +1516 -0
  305. package/packages/theme-chalk/src/data-table-form.scss +55 -0
  306. package/packages/theme-chalk/src/data-table.scss +202 -0
  307. package/packages/theme-chalk/src/date-picker.scss +8 -0
  308. package/packages/theme-chalk/src/dialog.scss +52 -0
  309. package/packages/theme-chalk/src/enterprise.scss +5 -0
  310. package/packages/theme-chalk/src/error-page.scss +18 -0
  311. package/packages/theme-chalk/src/flow-chart.scss +0 -0
  312. package/packages/theme-chalk/src/flow-group.scss +101 -0
  313. package/packages/theme-chalk/src/flow-list.scss +41 -0
  314. package/packages/theme-chalk/src/flow.scss +285 -0
  315. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  316. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  317. package/packages/theme-chalk/src/form.scss +451 -0
  318. package/packages/theme-chalk/src/handle-user.scss +40 -0
  319. package/packages/theme-chalk/src/handler.scss +131 -0
  320. package/packages/theme-chalk/src/icon.scss +1714 -0
  321. package/packages/theme-chalk/src/index.scss +50 -0
  322. package/packages/theme-chalk/src/input-number.scss +0 -0
  323. package/packages/theme-chalk/src/input.scss +3 -0
  324. package/packages/theme-chalk/src/label.scss +24 -0
  325. package/packages/theme-chalk/src/login.scss +490 -0
  326. package/packages/theme-chalk/src/main.scss +483 -0
  327. package/packages/theme-chalk/src/mainComp.scss +0 -0
  328. package/packages/theme-chalk/src/menu.scss +201 -0
  329. package/packages/theme-chalk/src/mixins/color.scss +117 -0
  330. package/packages/theme-chalk/src/mixins/mixins.scss +25 -0
  331. package/packages/theme-chalk/src/nav.scss +73 -0
  332. package/packages/theme-chalk/src/notify.scss +0 -0
  333. package/packages/theme-chalk/src/page.scss +3 -0
  334. package/packages/theme-chalk/src/pagination.scss +14 -0
  335. package/packages/theme-chalk/src/player.scss +9 -0
  336. package/packages/theme-chalk/src/qr-code.scss +17 -0
  337. package/packages/theme-chalk/src/radio-group.scss +9 -0
  338. package/packages/theme-chalk/src/radio.scss +3 -0
  339. package/packages/theme-chalk/src/select-ganged.scss +9 -0
  340. package/packages/theme-chalk/src/select.scss +0 -0
  341. package/packages/theme-chalk/src/selector-panel.scss +203 -0
  342. package/packages/theme-chalk/src/selector.scss +85 -0
  343. package/packages/theme-chalk/src/sizer.scss +36 -0
  344. package/packages/theme-chalk/src/steps.scss +88 -0
  345. package/packages/theme-chalk/src/switch.scss +3 -0
  346. package/packages/theme-chalk/src/table-form.scss +1 -0
  347. package/packages/theme-chalk/src/tabs-panel.scss +0 -0
  348. package/packages/theme-chalk/src/tabs.scss +91 -0
  349. package/packages/theme-chalk/src/tips.scss +7 -0
  350. package/packages/theme-chalk/src/toolbar.scss +121 -0
  351. package/packages/theme-chalk/src/tree-group.scss +64 -0
  352. package/packages/theme-chalk/src/tree.scss +140 -0
  353. package/packages/theme-chalk/src/upload.scss +131 -0
  354. package/packages/theme-chalk/src/wujie.scss +0 -0
  355. package/packages/theme-chalk/src/wxlogin.scss +3 -0
  356. package/packages/tips/index.js +5 -0
  357. package/packages/tips/src/main.vue +126 -0
  358. package/packages/toolbar/index.js +5 -0
  359. package/packages/toolbar/src/main.vue +377 -0
  360. package/packages/tree/index.js +5 -0
  361. package/packages/tree/src/main.vue +636 -0
  362. package/packages/tree-group/index.js +5 -0
  363. package/packages/tree-group/src/main.vue +435 -0
  364. package/packages/upload/index.js +5 -0
  365. package/packages/upload/src/main.vue +1033 -0
  366. package/packages/upload/src/picture.js +15 -0
  367. package/packages/wujie/index.js +5 -0
  368. package/packages/wujie/src/main.vue +137 -0
  369. package/packages/wxlogin/index.js +5 -0
  370. package/packages/wxlogin/src/main.vue +110 -0
  371. package/src/config/api.js +211 -0
  372. package/src/index.js +167 -0
  373. package/src/utils/bus.js +3 -0
  374. package/src/utils/date-util.js +312 -0
  375. package/src/utils/http.js +50 -0
  376. package/src/utils/rules.js +18 -0
  377. package/src/utils/store.js +21 -0
  378. package/src/utils/util.js +2105 -0
@@ -0,0 +1,968 @@
1
+ <template>
2
+ <es-tabs
3
+ v-model="activeName"
4
+ class="es-selector-panel"
5
+ mold="border-card"
6
+ :style="style"
7
+ @tab-click="handleClick"
8
+ >
9
+ <el-tab-pane
10
+ v-for="items in trees"
11
+ :key="items.label"
12
+ :label="items.label"
13
+ :name="items.name"
14
+ class="es-selector-content"
15
+ >
16
+ <div class="es-selector-view">
17
+ <tree
18
+ v-if="isShowTree"
19
+ :data="items.data"
20
+ :loading="loading"
21
+ @loadsub="loadsub"
22
+ @search="searchTree"
23
+ ></tree>
24
+ <div class="es-selector-selection">
25
+ <el-form
26
+ ref="form"
27
+ :inline="true"
28
+ :model="form"
29
+ class="es-selector-selection-toolbar"
30
+ >
31
+ <el-form-item>
32
+ <el-checkbox
33
+ v-show="multiple && !max"
34
+ v-model="checkAll"
35
+ @change="handleCheckAll"
36
+ >
37
+ 全选
38
+ </el-checkbox>
39
+ </el-form-item>
40
+ <div class="es-float-right">
41
+ <el-form-item v-if="showSelect && activeName == 'enterprise'">
42
+ <es-select
43
+ v-model="selectValue"
44
+ placeholder="请选择"
45
+ @change="handleSelect"
46
+ >
47
+ <el-option
48
+ v-for="item in filtrate.options"
49
+ :key="item.value"
50
+ :label="item.name"
51
+ :value="item.value"
52
+ ></el-option>
53
+ </es-select>
54
+ </el-form-item>
55
+ <el-form-item>
56
+ <el-input
57
+ v-model="search"
58
+ placeholder="请输入搜索关键字"
59
+ @change="handleChangeSearch"
60
+ >
61
+ <template slot="append">
62
+ <el-button
63
+ icon="el-icon-search"
64
+ type="primary"
65
+ @click="handleSearch"
66
+ ></el-button>
67
+ </template>
68
+ </el-input>
69
+ </el-form-item>
70
+ </div>
71
+ </el-form>
72
+ <selection
73
+ v-model="checkeds"
74
+ :data="checkboxs"
75
+ :value-key="valueKey"
76
+ :label-key="labelKey"
77
+ :multiple="mix ? mix : multiple"
78
+ :max="max"
79
+ ></selection>
80
+ <selection
81
+ v-model="checkeds"
82
+ genre="delete"
83
+ :data="Array.isArray(checkeds) ? checkeds : [checkeds]"
84
+ :value-key="valueKey"
85
+ :label-key="labelKey"
86
+ :multiple="multiple"
87
+ :max="max"
88
+ :mix="mix"
89
+ :isSort="true"
90
+ @sort="handleSort"
91
+ ></selection>
92
+ </div>
93
+ </div>
94
+ <div class="es-selector-handle">
95
+ <el-button type="primary" size="small" @click="handleConfirm"
96
+ >确定</el-button
97
+ >
98
+ <el-button size="small" @click="handleCancel">取消</el-button>
99
+ </div>
100
+ </el-tab-pane>
101
+ </es-tabs>
102
+ </template>
103
+ <script>
104
+ import tree from './tree.vue';
105
+ import selection from './selection.vue';
106
+ import {
107
+ getSelectorOrgTree,
108
+ getSelectorOrgDetail
109
+ } from 'eoss-ui/src/config/api.js';
110
+ import util from 'eoss-ui/src/utils/util.js';
111
+ export default {
112
+ name: 'EsSelectorPanel',
113
+ inheritAttrs: false,
114
+ components: {
115
+ tree,
116
+ selection
117
+ },
118
+ props: {
119
+ isShowLevel3: {
120
+ type: Boolean,
121
+ default: true
122
+ },
123
+ method: {
124
+ type: String,
125
+ default: 'get'
126
+ },
127
+ host: {
128
+ type: String,
129
+ default: ''
130
+ },
131
+ value: [Array, Object, String],
132
+ width: {
133
+ type: String,
134
+ default: '900px'
135
+ },
136
+ height: {
137
+ type: String,
138
+ default: '560px'
139
+ },
140
+ //树结构
141
+ tree: {
142
+ type: Boolean,
143
+ default: true
144
+ },
145
+ type: {
146
+ type: Array,
147
+ default() {
148
+ return ['enterprise', 'person'];
149
+ }
150
+ },
151
+ active: String,
152
+ //是否替换页签
153
+ replace: {
154
+ type: Boolean,
155
+ default: false
156
+ },
157
+ //页签
158
+ tabs: {
159
+ type: Object,
160
+ default() {
161
+ return;
162
+ }
163
+ },
164
+ filtrate: {
165
+ type: [Boolean, Object],
166
+ default() {
167
+ return {
168
+ show: true,
169
+ value: '1',
170
+ options: [
171
+ {
172
+ value: '1',
173
+ name: '直接下级'
174
+ },
175
+ {
176
+ value: '2',
177
+ name: '所有下级'
178
+ }
179
+ ]
180
+ };
181
+ }
182
+ },
183
+ selection: {
184
+ type: [String, Array],
185
+ default: getSelectorOrgDetail
186
+ },
187
+ param: {
188
+ type: Object,
189
+ default() {
190
+ return {};
191
+ }
192
+ },
193
+ valueKey: {
194
+ type: String,
195
+ default: 'showid'
196
+ },
197
+ labelKey: {
198
+ type: String,
199
+ default: 'showname'
200
+ },
201
+ form: {
202
+ type: Object,
203
+ default() {
204
+ return {};
205
+ }
206
+ },
207
+ multiple: {
208
+ type: Boolean,
209
+ default: true
210
+ },
211
+ max: Number,
212
+ mix: Boolean
213
+ },
214
+ data() {
215
+ return {
216
+ style: { width: this.width, height: this.height },
217
+ loading: true,
218
+ search: '',
219
+ defaults: '',
220
+ trees: '',
221
+ checkAll: false,
222
+ selectValue: this.filtrate.value,
223
+ orgpath: false,
224
+ nodeData: '',
225
+ activeName: '',
226
+ selections: [],
227
+ checkboxs: [],
228
+ checkeds: null
229
+ };
230
+ },
231
+ computed: {
232
+ //是否显示树结构
233
+ isShowTree() {
234
+ if (typeof this.selection === 'object' && Array.isArray(this.selection)) {
235
+ return false;
236
+ } else {
237
+ return this.tree;
238
+ }
239
+ },
240
+ showSelect() {
241
+ if (typeof this.filtrate === 'object') {
242
+ return this.filtrate.show;
243
+ } else {
244
+ return false;
245
+ }
246
+ },
247
+ actived: {
248
+ get() {
249
+ return this.active ? this.active : this.type[0];
250
+ },
251
+ set(val) {
252
+ return val;
253
+ }
254
+ },
255
+ newTabs() {
256
+ const tabs = {
257
+ enterprise: {
258
+ label: '选择单位',
259
+ name: 'enterprise',
260
+ url: getSelectorOrgTree,
261
+ data: [],
262
+ nodeData: '',
263
+ selection: [],
264
+ value: [],
265
+ param: {
266
+ showarea: 1,
267
+ id: 0,
268
+ filid: 'all'
269
+ }
270
+ },
271
+ department: {
272
+ label: '选择部门',
273
+ name: 'department',
274
+ url: getSelectorOrgTree,
275
+ data: [],
276
+ nodeData: '',
277
+ selection: [],
278
+ value: [],
279
+ param: {
280
+ showarea: 0,
281
+ id: 0,
282
+ filid: 'all'
283
+ }
284
+ },
285
+ employee: {
286
+ label: '选择用户',
287
+ name: 'employee',
288
+ url: getSelectorOrgTree,
289
+ data: [],
290
+ nodeData: '',
291
+ selection: [],
292
+ value: [],
293
+ param: {
294
+ showarea: 0,
295
+ id: 0,
296
+ filid: 'all'
297
+ }
298
+ },
299
+ myemployee: {
300
+ label: '本单位用户',
301
+ name: 'myemployee',
302
+ url: getSelectorOrgTree,
303
+ data: [],
304
+ nodeData: '',
305
+ selection: [],
306
+ value: [],
307
+ param: {
308
+ showarea: 2,
309
+ id: 0,
310
+ filid: 'all'
311
+ }
312
+ },
313
+ otheremployee: {
314
+ label: '外单位用户',
315
+ name: 'otheremployee',
316
+ url: getSelectorOrgTree,
317
+ data: [],
318
+ nodeData: '',
319
+ selection: [],
320
+ value: [],
321
+ param: {
322
+ showarea: 2,
323
+ id: 0,
324
+ filid: 'all'
325
+ }
326
+ },
327
+ person: {
328
+ label: '选择人员',
329
+ name: 'person',
330
+ url: getSelectorOrgTree,
331
+ data: [],
332
+ nodeData: '',
333
+ selection: [],
334
+ value: [],
335
+ param: {
336
+ showarea: 0,
337
+ id: 0,
338
+ filid: 'all'
339
+ }
340
+ },
341
+ otherperson: {
342
+ label: '外单位人员',
343
+ name: 'otherperson',
344
+ url: getSelectorOrgTree,
345
+ data: [],
346
+ nodeData: '',
347
+ selection: [],
348
+ value: [],
349
+ param: {
350
+ showarea: 2,
351
+ id: 0,
352
+ filid: 'all'
353
+ }
354
+ },
355
+ persongroup: {
356
+ label: '员工群组成员',
357
+ name: 'persongroup',
358
+ url: getSelectorOrgTree,
359
+ data: [],
360
+ nodeData: '',
361
+ selection: [],
362
+ value: [],
363
+ param: {
364
+ showarea: 3,
365
+ id: 0,
366
+ filid: 'all'
367
+ }
368
+ },
369
+ filgroup: {
370
+ label: '单位群组成员',
371
+ data: [],
372
+ nodeData: '',
373
+ selection: [],
374
+ value: [],
375
+ name: 'filgroup',
376
+ url: getSelectorOrgTree,
377
+ param: {
378
+ showarea: 3,
379
+ id: 0,
380
+ filid: 'all'
381
+ }
382
+ },
383
+ depgroup: {
384
+ label: '部门群组成员',
385
+ name: 'depgroup',
386
+ url: getSelectorOrgTree,
387
+ data: [],
388
+ nodeData: '',
389
+ selection: [],
390
+ value: [],
391
+ param: {
392
+ showarea: 4,
393
+ id: 0,
394
+ filid: 'all'
395
+ }
396
+ },
397
+ persongroupobj: {
398
+ label: '人员群组',
399
+ name: 'persongroupobj',
400
+ url: getSelectorOrgTree,
401
+ data: [],
402
+ nodeData: '',
403
+ selection: [],
404
+ value: [],
405
+ param: {
406
+ showarea: 11,
407
+ id: 0,
408
+ filid: 'all'
409
+ }
410
+ },
411
+ filgroupobj: {
412
+ label: '单位群组',
413
+ name: 'filgroupobj',
414
+ url: getSelectorOrgTree,
415
+ data: [],
416
+ nodeData: '',
417
+ selection: [],
418
+ value: [],
419
+ param: {
420
+ showarea: 13,
421
+ id: 0,
422
+ filid: 'all'
423
+ }
424
+ },
425
+ depgroupobj: {
426
+ label: '部门群组',
427
+ name: 'depgroupobj',
428
+ url: getSelectorOrgTree,
429
+ data: [],
430
+ nodeData: '',
431
+ selection: [],
432
+ value: [],
433
+ param: {
434
+ showarea: 13,
435
+ id: 0,
436
+ filid: 'all'
437
+ }
438
+ },
439
+ role: {
440
+ label: '选择角色',
441
+ name: 'role',
442
+ url: getSelectorOrgTree,
443
+ data: [],
444
+ nodeData: '',
445
+ selection: [],
446
+ value: [],
447
+ param: {
448
+ showarea: 6,
449
+ id: 0,
450
+ filid: 'all'
451
+ }
452
+ },
453
+ post: {
454
+ label: '选择岗位',
455
+ name: 'post',
456
+ url: getSelectorOrgTree,
457
+ data: [],
458
+ nodeData: '',
459
+ selection: [],
460
+ value: [],
461
+ param: {
462
+ showarea: 8,
463
+ id: 0,
464
+ filid: 'all'
465
+ }
466
+ },
467
+ codetable: {
468
+ label: '代码表',
469
+ name: 'codetable',
470
+ url: getSelectorOrgTree,
471
+ data: [],
472
+ nodeData: '',
473
+ selection: [],
474
+ value: [],
475
+ param: {
476
+ showarea: 10,
477
+ id: 0,
478
+ filid: 'all'
479
+ }
480
+ },
481
+ topcontacts: {
482
+ label: '常用联系人',
483
+ name: 'topcontacts',
484
+ url: getSelectorOrgTree,
485
+ data: [],
486
+ nodeData: '',
487
+ selection: [],
488
+ value: [],
489
+ param: {
490
+ showarea: 9,
491
+ id: 0,
492
+ filid: 'all'
493
+ }
494
+ }
495
+ };
496
+ if (this.tabs) {
497
+ if (this.replace) {
498
+ return this.tabs;
499
+ } else {
500
+ return util.extend(true, tabs, this.tabs);
501
+ }
502
+ }
503
+ return tabs;
504
+ }
505
+ },
506
+ watch: {
507
+ type: {
508
+ immediate: true,
509
+ deep: true,
510
+ handler(val, old) {
511
+ if (
512
+ old === undefined ||
513
+ new Set([...val, ...old]).size !== val.length
514
+ ) {
515
+ var obj = {};
516
+ this.activeName = this.actived;
517
+ if (this.isShowTree) {
518
+ for (let i in val) {
519
+ obj[val[i]] = this.newTabs[val[i]];
520
+ }
521
+ } else {
522
+ obj[this.activeName] = this.newTabs[this.activeName];
523
+ }
524
+ this.trees = obj;
525
+ this.defaults = JSON.parse(JSON.stringify(obj));
526
+ }
527
+ }
528
+ },
529
+ activeName: {
530
+ handler(val) {
531
+ this.ajaxActive(val);
532
+ }
533
+ },
534
+ value: {
535
+ immediate: true,
536
+ handler(val) {
537
+ if (val !== undefined) {
538
+ this.trees[this.activeName].value = JSON.parse(JSON.stringify(val));
539
+ } else {
540
+ this.trees[this.activeName].value = '';
541
+ }
542
+ this.checkeds = this.trees[this.activeName].value || [];
543
+ }
544
+ },
545
+ checkboxs(val) {
546
+ let flag = this.checkboxs.length ? true : false;
547
+ this.checkboxs.forEach(item => {
548
+ if (util.isObject(item)) {
549
+ if (util.indexOfObj(this.checkeds, item) === -1) {
550
+ flag = false;
551
+ return;
552
+ }
553
+ } else {
554
+ if (this.checkeds.indexOf(item) === -1) {
555
+ flag = false;
556
+ return;
557
+ }
558
+ }
559
+ });
560
+ this.checkAll = flag;
561
+ },
562
+ checkeds(val, old) {
563
+ if (old.length > 0) {
564
+ if (val.length < old.length) {
565
+ this.checkAll = false;
566
+ } else {
567
+ let flag = true;
568
+ this.checkboxs.forEach(item => {
569
+ if (util.isObject(item)) {
570
+ if (util.indexOfObj(val, item) === -1) {
571
+ flag = false;
572
+ return;
573
+ }
574
+ } else {
575
+ if (val.indexOf(item) === -1) {
576
+ flag = false;
577
+ return;
578
+ }
579
+ }
580
+ });
581
+ this.checkAll = flag;
582
+ }
583
+ }
584
+ this.trees[this.activeName].value = val;
585
+ }
586
+ },
587
+ created() {},
588
+ mounted() {
589
+ this.ajaxActive(this.activeName);
590
+ },
591
+ methods: {
592
+ ajaxActive(active) {
593
+ if (this.isShowTree) {
594
+ if (
595
+ (!this.trees[active].data ||
596
+ (this.trees[active].data &&
597
+ this.trees[active].data.length === 0)) &&
598
+ this.newTabs[active].url
599
+ ) {
600
+ this.loading = true;
601
+ this.getTreeData(
602
+ this.host + this.newTabs[active].url,
603
+ this.newTabs[active].param
604
+ );
605
+ }
606
+ if (
607
+ !this.trees[active].value ||
608
+ (this.trees[active].value && this.trees[active].value.length === 0)
609
+ ) {
610
+ if (this.value !== undefined) {
611
+ this.trees[active].value = JSON.parse(JSON.stringify(this.value));
612
+ }
613
+ }
614
+ this.checkboxs = this.trees[active].selection || [];
615
+ if (!this.mix) {
616
+ this.checkeds = this.trees[active].value || [];
617
+ }
618
+ this.nodeData = this.trees[active].nodeData;
619
+ } else {
620
+ if (typeof this.selection === 'string') {
621
+ util
622
+ .ajax({
623
+ method: this.method,
624
+ url: this.host + this.selection,
625
+ params: this.param,
626
+ data: this.param
627
+ })
628
+ .then(res => {
629
+ if (res.rCode === 0) {
630
+ this.selections = JSON.parse(JSON.stringify(res.results));
631
+ this.checkboxs = JSON.parse(JSON.stringify(res.results)) || [];
632
+ }
633
+ })
634
+ .catch(err => {
635
+ if (err.message && err.message !== 'canceled') {
636
+ this.$message.error(err.message);
637
+ }
638
+ });
639
+ } else {
640
+ this.selections = this.selection;
641
+ this.checkboxs = this.selection || [];
642
+ }
643
+ }
644
+ },
645
+ getTreeData(url, params, id) {
646
+ let data = util.extend({}, params, this.param);
647
+ if (id !== undefined) {
648
+ data.id = id;
649
+ }
650
+ util
651
+ .ajax({ method: this.method, url: url, params: data, data: data })
652
+ .then(res => {
653
+ if (res.rCode === 0) {
654
+ this.loading = false;
655
+ if (!Object.prototype.hasOwnProperty.call(params, 'seachkey')) {
656
+ this.$set(
657
+ this.defaults[this.activeName],
658
+ 'data',
659
+ JSON.parse(JSON.stringify(res.results))
660
+ );
661
+ }
662
+ if (res.results.length && res.results[0].name === '无搜索数据') {
663
+ this.$set(this.trees[this.activeName], 'data', null);
664
+ } else {
665
+ this.$set(
666
+ this.trees[this.activeName],
667
+ 'data',
668
+ JSON.parse(JSON.stringify(res.results))
669
+ );
670
+ }
671
+ }
672
+ })
673
+ .catch(err => {
674
+ if (err.message && err.message !== 'canceled') {
675
+ this.$message.error(err.message);
676
+ }
677
+ });
678
+ },
679
+ loadsub(data, node, flag) {
680
+ node;
681
+ if (flag) {
682
+ if (data.selection === undefined || data.selection.length === 0) {
683
+ this.checkAll = false;
684
+ let params = util.extend({}, this.param);
685
+ params.type = this.activeName;
686
+ params.mid = data.id;
687
+ if (this.activeName === 'enterprise') {
688
+ params.querymode = this.selectValue;
689
+ if (this.selectValue === '2' || this.selectValue === 2) {
690
+ params.orgpath =
691
+ data.attributes && data.attributes.orgpath
692
+ ? data.attributes.orgpath
693
+ : '';
694
+ }
695
+ }
696
+ // if (this.activeName === 'department') {
697
+ // params.querymode = 0;
698
+ // }
699
+ util
700
+ .ajax({
701
+ method: this.method,
702
+ url: this.host + this.selection,
703
+ params: params,
704
+ data: params
705
+ })
706
+ .then(res => {
707
+ if (res.rCode === 0) {
708
+ data.selection = JSON.parse(JSON.stringify(res.results));
709
+ this.$set(
710
+ this.trees[this.activeName],
711
+ 'selection',
712
+ JSON.parse(JSON.stringify(res.results))
713
+ );
714
+ this.$set(this.trees[this.activeName], 'nodeData', data);
715
+ this.nodeData = this.trees[this.activeName].nodeData;
716
+ this.checkboxs = this.trees[this.activeName].selection;
717
+ }
718
+ })
719
+ .catch(err => {
720
+ if (err.message && err.message !== 'canceled') {
721
+ this.$message.error(err.message);
722
+ }
723
+ });
724
+ } else {
725
+ this.trees[this.activeName].selection = data.selection;
726
+ this.trees[this.activeName].nodeData = data;
727
+ this.nodeData = this.trees[this.activeName].nodeData;
728
+ this.checkboxs = this.trees[this.activeName].selection;
729
+ }
730
+ } else {
731
+ if (!this.isShowLevel3) {
732
+ data.state = '';
733
+ }
734
+ if (
735
+ data.state !== '' &&
736
+ (!data.children || data.children.length === 0)
737
+ ) {
738
+ let params = util.extend(
739
+ {},
740
+ this.newTabs[this.activeName].param,
741
+ this.param
742
+ );
743
+ params.id = data.id;
744
+ util
745
+ .ajax({
746
+ method: this.method,
747
+ url: this.host + this.newTabs[this.activeName].url,
748
+ data: params,
749
+ params: params
750
+ })
751
+ .then(res => {
752
+ if (res.rCode === 0) {
753
+ this.loading = false;
754
+ this.$set(
755
+ data,
756
+ 'children',
757
+ JSON.parse(JSON.stringify(res.results))
758
+ );
759
+ this.$set(
760
+ this.defaults[this.activeName],
761
+ 'data',
762
+ JSON.parse(JSON.stringify(this.trees[this.activeName].data))
763
+ );
764
+ }
765
+ })
766
+ .catch(err => {
767
+ if (err.message && err.message !== 'canceled') {
768
+ this.$message.error(err.message);
769
+ }
770
+ });
771
+ }
772
+ }
773
+ },
774
+ searchTree(res) {
775
+ if (res) {
776
+ this.loading = true;
777
+ let params = util.extend({}, this.newTabs[this.activeName].param, {
778
+ seachkey: res
779
+ });
780
+ this.getTreeData(this.host + this.newTabs[this.activeName].url, params);
781
+ } else {
782
+ this.$set(
783
+ this.trees[this.activeName],
784
+ 'data',
785
+ this.defaults[this.activeName].data
786
+ );
787
+ }
788
+ },
789
+ handleCheckAll(res) {
790
+ if (this.checkboxs.length > 0) {
791
+ let isObject = util.isObject(this.checkboxs[0]);
792
+ if (res) {
793
+ if (this.isShowTree) {
794
+ this.nodeData.checkAll = true;
795
+ let checkeds = this.checkeds.concat(this.checkboxs);
796
+ if (checkeds.length > 0) {
797
+ this.checkeds = util.arrUnique(
798
+ checkeds,
799
+ isObject ? this.valueKey : undefined
800
+ );
801
+ }
802
+ } else {
803
+ this.checkeds = this.checkboxs;
804
+ }
805
+ } else {
806
+ if (this.isShowTree) {
807
+ this.nodeData.checkAll = false;
808
+ this.checkboxs.forEach(element => {
809
+ for (let i in this.checkeds) {
810
+ if (
811
+ (isObject &&
812
+ this.checkeds[i][this.valueKey] ===
813
+ element[this.valueKey]) ||
814
+ this.checkeds[i] === element
815
+ ) {
816
+ this.checkeds.splice(i, 1);
817
+ break;
818
+ }
819
+ }
820
+ });
821
+ } else {
822
+ this.checkeds = [];
823
+ }
824
+ }
825
+ }
826
+ },
827
+ handleSelect(res) {
828
+ if (this.nodeData) {
829
+ this.nodeData.selection = '';
830
+ this.loadsub(this.nodeData, '', true);
831
+ }
832
+ this.$emit('filtratechage', this.trees, this.activeName);
833
+ },
834
+ handleChangeSearch() {
835
+ if (this.search === '') {
836
+ if (this.isShowTree) {
837
+ this.checkboxs = this.nodeData.selection;
838
+ } else {
839
+ this.checkboxs = this.selections;
840
+ }
841
+ } else {
842
+ if (this.isShowTree) {
843
+ if (this.nodeData && this.nodeData.selection) {
844
+ let arry = [];
845
+ this.nodeData.selection.forEach(item => {
846
+ if (util.isObject(item)) {
847
+ if (item[this.labelKey].indexOf(this.search) > -1) {
848
+ arry.push(item);
849
+ }
850
+ } else {
851
+ if (item.indexOf(this.search) > -1) {
852
+ arry.push(item);
853
+ }
854
+ }
855
+ });
856
+ this.checkboxs = arry;
857
+ }
858
+ } else {
859
+ let arry = [];
860
+ this.selections.forEach(item => {
861
+ if (util.isObject(item)) {
862
+ if (item[this.labelKey].indexOf(this.search) > -1) {
863
+ arry.push(item);
864
+ }
865
+ } else {
866
+ if (item.indexOf(this.search) > -1) {
867
+ arry.push(item);
868
+ }
869
+ }
870
+ });
871
+ this.checkboxs = arry;
872
+ }
873
+ }
874
+ },
875
+ handleSearch() {
876
+ if (this.isShowTree) {
877
+ if (this.nodeData && this.nodeData.selection) {
878
+ if (this.search !== '') {
879
+ let arry = [];
880
+ this.nodeData.selection.forEach(item => {
881
+ if (util.isObject(item)) {
882
+ if (item[this.labelKey].indexOf(this.search) > -1) {
883
+ arry.push(item);
884
+ }
885
+ } else {
886
+ if (item.indexOf(this.search) > -1) {
887
+ arry.push(item);
888
+ }
889
+ }
890
+ });
891
+ this.checkboxs = arry;
892
+ }
893
+ } else {
894
+ let mid = '0-0-0-0-0';
895
+ if (this.nodeData) {
896
+ mid = this.nodeData.id;
897
+ }
898
+ util
899
+ .ajax({
900
+ url: this.selection,
901
+ params: {
902
+ mid: mid,
903
+ querymode: this.selectValue,
904
+ type: this.activeName,
905
+ namelike: this.search
906
+ }
907
+ })
908
+ .then(res => {
909
+ if (res.rCode === 0) {
910
+ this.checkboxs = JSON.parse(JSON.stringify(res.results));
911
+ }
912
+ })
913
+ .catch(err => {
914
+ if (err.message && err.message !== 'canceled') {
915
+ this.$message.error(err.message);
916
+ }
917
+ });
918
+ }
919
+ } else {
920
+ if (this.search !== '') {
921
+ let arry = [];
922
+ this.selections.forEach(item => {
923
+ if (util.isObject(item)) {
924
+ if (item[this.labelKey].indexOf(this.search) > -1) {
925
+ arry.push(item);
926
+ }
927
+ } else {
928
+ if (item.indexOf(this.search) > -1) {
929
+ arry.push(item);
930
+ }
931
+ }
932
+ });
933
+ this.checkboxs = arry;
934
+ }
935
+ }
936
+ },
937
+ handleClick() {
938
+ this.$emit('tabschage', this.trees, this.activeName);
939
+ },
940
+ handleChange() {},
941
+ handleConfirm() {
942
+ if (!this.checkeds || (this.multiple && this.checkeds.length === 0)) {
943
+ this.$message({
944
+ message: '请选择',
945
+ type: 'warning'
946
+ });
947
+ } else {
948
+ this.$emit('input', this.checkeds);
949
+ this.$emit('confirm', this.checkeds);
950
+ }
951
+ },
952
+ handleCancel() {
953
+ this.$emit('cancel', false);
954
+ },
955
+ handleSort(res) {
956
+ let oldIndex = res.oldIndex;
957
+ let newIndex = res.newIndex;
958
+
959
+ this.checkeds.splice(newIndex, 0, this.checkeds[oldIndex]);
960
+ if (oldIndex > newIndex) {
961
+ this.checkeds.splice(oldIndex + 1, 1);
962
+ } else {
963
+ this.checkeds.splice(oldIndex, 1);
964
+ }
965
+ }
966
+ }
967
+ };
968
+ </script>