@kyfe/hroa-ui 0.0.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/README.md +77 -77
  2. package/dist/demo.html +10 -0
  3. package/dist/hroa-ui.common.js +31775 -0
  4. package/dist/hroa-ui.css +6 -0
  5. package/dist/hroa-ui.umd.js +31775 -0
  6. package/dist/hroa-ui.umd.min.js +9 -0
  7. package/lib/getJsModule/index.css +6 -0
  8. package/lib/getJsModule/index.js +9 -0
  9. package/lib/hr-at-input/index.css +6 -0
  10. package/lib/hr-at-input/index.js +1 -0
  11. package/lib/hr-bottom-button/index.css +1 -0
  12. package/lib/hr-bottom-button/index.js +1 -0
  13. package/lib/hr-button/index.css +1 -0
  14. package/lib/hr-button/index.js +1 -0
  15. package/lib/hr-clipboard/index.css +1 -0
  16. package/lib/hr-clipboard/index.js +1 -0
  17. package/lib/hr-condition-filtrate/index.css +1 -0
  18. package/lib/hr-condition-filtrate/index.js +1 -0
  19. package/lib/hr-condition-filtrate-popup/index.css +1 -0
  20. package/lib/hr-condition-filtrate-popup/index.js +1 -0
  21. package/lib/hr-elasticity-box/index.css +1 -0
  22. package/lib/hr-elasticity-box/index.js +1 -0
  23. package/lib/hr-elasticity-box-item/index.css +1 -0
  24. package/lib/hr-elasticity-box-item/index.js +1 -0
  25. package/lib/hr-emotional-picture/index.css +1 -0
  26. package/lib/hr-emotional-picture/index.js +1 -0
  27. package/lib/hr-employee-choose/index.css +1 -0
  28. package/lib/hr-employee-choose/index.js +1 -0
  29. package/lib/hr-img-list/index.css +1 -0
  30. package/lib/hr-img-list/index.js +1 -0
  31. package/lib/hr-info-card/index.css +1 -0
  32. package/lib/hr-info-card/index.js +1 -0
  33. package/lib/hr-license-plate-number/index.css +1 -0
  34. package/lib/hr-license-plate-number/index.js +1 -0
  35. package/lib/hr-module-card/index.css +1 -0
  36. package/lib/hr-module-card/index.js +1 -0
  37. package/lib/hr-multiterm-choose/index.css +1 -0
  38. package/lib/hr-multiterm-choose/index.js +1 -0
  39. package/lib/hr-no-data/index.css +1 -0
  40. package/lib/hr-no-data/index.js +1 -0
  41. package/lib/hr-notice-bar/index.js +1 -0
  42. package/lib/hr-open-ks/index.css +1 -0
  43. package/lib/hr-open-ks/index.js +1 -0
  44. package/lib/hr-pager/index.css +1 -0
  45. package/lib/hr-pager/index.js +1 -0
  46. package/lib/hr-popup/index.css +1 -0
  47. package/lib/hr-popup/index.js +1 -0
  48. package/lib/hr-preview-file/index.css +1 -0
  49. package/lib/hr-preview-file/index.js +1 -0
  50. package/lib/hr-rate/index.css +1 -0
  51. package/lib/hr-rate/index.js +1 -0
  52. package/lib/hr-reason-textarea/index.css +1 -0
  53. package/lib/hr-reason-textarea/index.js +1 -0
  54. package/lib/hr-search-input/index.css +1 -0
  55. package/lib/hr-search-input/index.js +1 -0
  56. package/lib/hr-select/index.js +1 -0
  57. package/lib/hr-select-list/index.css +1 -0
  58. package/lib/hr-select-list/index.js +9 -0
  59. package/lib/hr-single-choose/index.css +1 -0
  60. package/lib/hr-single-choose/index.js +1 -0
  61. package/lib/hr-slide-pager/index.css +1 -0
  62. package/lib/hr-slide-pager/index.js +1 -0
  63. package/lib/hr-sort/index.css +1 -0
  64. package/lib/hr-sort/index.js +1 -0
  65. package/lib/hr-stack-image/index.css +1 -0
  66. package/lib/hr-stack-image/index.js +1 -0
  67. package/lib/hr-tab-nav/index.css +1 -0
  68. package/lib/hr-tab-nav/index.js +1 -0
  69. package/lib/hr-view-item/index.css +1 -0
  70. package/lib/hr-view-item/index.js +1 -0
  71. package/lib/index/index.css +6 -0
  72. package/lib/index/index.js +9 -0
  73. package/lib/utils/index.js +1 -0
  74. package/package.json +7 -6
  75. package/packages/getJsModule.js +11 -0
  76. package/packages/hr-at-input/index.js +7 -0
  77. package/packages/hr-at-input/src/blot/atPerson.js +43 -0
  78. package/packages/hr-at-input/src/index.vue +472 -0
  79. package/packages/hr-at-input/src/quill.snow.css +945 -0
  80. package/packages/hr-at-input/src/utils/index.js +60 -0
  81. package/packages/hr-at-input//346/224/257/346/214/201@/351/200/211/344/272/272/350/276/223/345/205/245/346/241/206.md +0 -0
  82. package/packages/hr-bottom-button/index.js +6 -6
  83. package/packages/hr-bottom-button/src/index.vue +108 -84
  84. package/packages/hr-button/index.js +12 -12
  85. package/packages/hr-button/src/hr-button.vue +38 -38
  86. package/packages/hr-clipboard/index.js +8 -3
  87. package/packages/hr-clipboard/src/index.vue +46 -0
  88. package/packages/hr-clipboard/src/util.js +9 -9
  89. package/packages/hr-condition-filtrate/enum/index.js +10 -10
  90. package/packages/hr-condition-filtrate/index.js +6 -6
  91. package/packages/hr-condition-filtrate/src/employee-choose/index.vue +101 -101
  92. package/packages/hr-condition-filtrate/src/index.vue +245 -245
  93. package/packages/hr-condition-filtrate/src/multiterm-choose/index.vue +166 -166
  94. package/packages/hr-condition-filtrate/src/org-tree-choose/index.vue +101 -101
  95. package/packages/hr-condition-filtrate/src/single-choose/index.vue +143 -143
  96. package/packages/hr-condition-filtrate/src/text-input/index.vue +60 -60
  97. package/packages/hr-condition-filtrate/src/time-selector/date-range-select.vue +154 -154
  98. package/packages/hr-condition-filtrate/src/time-selector/index.vue +380 -380
  99. package/packages/hr-condition-filtrate/src/time-selector/utils/constant.js +30 -30
  100. package/packages/hr-condition-filtrate/src/time-selector/utils/tools.js +212 -212
  101. package/packages/hr-condition-filtrate-popup/index.js +7 -0
  102. package/packages/hr-condition-filtrate-popup/src/index.vue +236 -0
  103. package/packages/hr-elasticity-box/index.js +7 -0
  104. package/packages/hr-elasticity-box/src/elasticity-box-item.vue +61 -0
  105. package/packages/hr-elasticity-box/src/index.vue +52 -0
  106. package/packages/hr-elasticity-box-item/index.js +7 -0
  107. package/packages/hr-emotional-picture/index.js +6 -6
  108. package/packages/hr-emotional-picture/src/index.vue +66 -66
  109. package/packages/hr-employee-choose/index.js +7 -0
  110. package/packages/hr-employee-choose/src/image/arrow-right.png +0 -0
  111. package/packages/hr-employee-choose/src/index.vue +119 -0
  112. package/packages/hr-img-list/index.js +3 -3
  113. package/packages/hr-img-list/src/index.vue +143 -123
  114. package/packages/hr-info-card/index.js +7 -0
  115. package/packages/hr-info-card/src/index.vue +67 -0
  116. package/packages/hr-license-plate-number/index.js +8 -0
  117. package/packages/hr-license-plate-number/src/enum.js +44 -0
  118. package/packages/hr-license-plate-number/src/index.vue +164 -0
  119. package/packages/hr-license-plate-number/src/vnp-keyboard.vue +182 -0
  120. package/packages/hr-license-plate-number//350/275/246/347/211/214/345/217/267/345/274/271/347/252/227.md +0 -0
  121. package/packages/hr-module-card/index.js +12 -12
  122. package/packages/hr-module-card/src/index.vue +132 -132
  123. package/packages/hr-module-card//346/250/241/345/235/227/345/215/241/347/211/207/347/273/204/344/273/266.md +29 -29
  124. package/packages/hr-multiterm-choose/index.js +8 -0
  125. package/packages/hr-multiterm-choose/src/active-icon.png +0 -0
  126. package/packages/hr-multiterm-choose/src/index.vue +212 -0
  127. package/packages/hr-multiterm-choose//345/244/232/351/200/211/346/241/206.md +0 -0
  128. package/packages/hr-no-data/index.js +7 -0
  129. package/packages/hr-no-data/src/index.vue +48 -0
  130. package/packages/hr-notice-bar/index.js +6 -6
  131. package/packages/hr-notice-bar/src/bem.js +37 -37
  132. package/packages/hr-notice-bar/src/index.js +51 -51
  133. package/packages/hr-notice-bar//351/200/232/347/237/245/346/240/217/347/273/204/344/273/266.md +2 -2
  134. package/packages/hr-open-ks/index.js +7 -3
  135. package/packages/hr-open-ks/src/{main.vue → index.vue} +97 -85
  136. package/packages/hr-open-ks/src/util.js +31 -31
  137. package/packages/hr-pager/index.js +6 -6
  138. package/packages/hr-pager/src/index.vue +95 -95
  139. package/packages/hr-popup/index.js +3 -3
  140. package/packages/hr-popup/src/index.vue +59 -47
  141. package/packages/hr-preview-file/index.js +7 -0
  142. package/packages/hr-preview-file/src/index.vue +58 -0
  143. package/packages/hr-preview-file/src/util.js +50 -0
  144. package/packages/hr-rate/index.js +7 -0
  145. package/packages/hr-rate/src/index.vue +42 -0
  146. package/packages/hr-rate//350/257/204/345/210/206/347/273/204/344/273/266/357/274/210/345/270/246/346/226/207/346/241/210/357/274/211.md +0 -0
  147. package/packages/hr-reason-textarea/index.js +7 -0
  148. package/packages/hr-reason-textarea/src/index.vue +128 -0
  149. package/packages/hr-search-input/index.js +7 -7
  150. package/packages/hr-search-input/src/index.vue +144 -144
  151. package/packages/hr-select/index.js +7 -3
  152. package/packages/hr-select/src/index.vue +41 -0
  153. package/packages/hr-select-list/index.js +3 -3
  154. package/packages/hr-select-list/src/index.vue +167 -161
  155. package/packages/hr-single-choose/index.js +8 -0
  156. package/packages/hr-single-choose/src/index.vue +178 -0
  157. package/packages/hr-single-choose//345/215/225/351/200/211/346/241/206.md +0 -0
  158. package/packages/hr-slide-pager/guide/image/turn-left.png +0 -0
  159. package/packages/hr-slide-pager/guide/image/turn-right.png +0 -0
  160. package/packages/hr-slide-pager/guide/index.vue +58 -58
  161. package/packages/hr-slide-pager/index.js +6 -6
  162. package/packages/hr-slide-pager/src/index.vue +375 -370
  163. package/packages/hr-sort/index.js +3 -0
  164. package/packages/hr-sort/src/main.vue +133 -0
  165. package/packages/hr-sort//346/216/222/345/272/217.md +0 -0
  166. package/packages/hr-stack-image/index.js +3 -3
  167. package/packages/hr-stack-image/src/main.vue +76 -76
  168. package/packages/hr-tab-nav/index.js +7 -7
  169. package/packages/hr-tab-nav/src/index.vue +114 -96
  170. package/packages/hr-view-item/index.js +12 -12
  171. package/packages/hr-view-item/src/index.vue +89 -89
  172. package/packages/index.js +23 -53
  173. package/packages/utils/directive/common.js +0 -0
  174. package/packages/utils/directive/index.js +2 -0
  175. package/packages/utils/{directive.js → directive/specific.js} +54 -58
  176. package/packages/utils/index.js +7 -73
  177. package/packages/utils/tool/common.js +65 -0
  178. package/packages/utils/tool/index.js +2 -0
  179. package/packages/utils/tool/specific.js +0 -0
  180. package/dist/404.html +0 -20
  181. package/dist/ERP-components/index.html +0 -34
  182. package/dist/H5-components/custom//346/211/223/345/274/200/350/267/250/345/243/260/350/201/212/345/244/251.html +0 -34
  183. package/dist/H5-components/index.html +0 -34
  184. package/dist/H5-components/initial-stage/introduce.html +0 -71
  185. package/dist/H5-components/initial-stage/updateLog.html +0 -42
  186. package/dist/H5-components/views/hr-emotional-picture.html +0 -51
  187. package/dist/H5-components/views/hr-info-card.html +0 -53
  188. package/dist/H5-components/views/hr-no-data.html +0 -47
  189. package/dist/H5-components/views/hr-preview-file.html +0 -76
  190. package/dist/H5-components/views/hr-search-input.html +0 -50
  191. package/dist/H5-components/views/tic-rich-input.html +0 -95
  192. package/dist/H5-components/views//345/211/252/345/210/207/346/235/277/345/244/215/345/210/266.html +0 -59
  193. package/dist/H5-components/views//345/261/202/345/217/240/345/233/276/347/211/207.html +0 -62
  194. package/dist/H5-components/views//346/211/223/345/274/200/350/267/250/345/243/260/347/224/250/346/210/267.html +0 -66
  195. package/dist/H5-components/views//346/213/226/346/213/275dom/345/205/203/347/264/240.html +0 -52
  196. package/dist/H5-components/views//346/214/211/351/222/256/347/277/273/351/241/265/347/273/204/344/273/266.html +0 -48
  197. package/dist/H5-components/views//346/273/221/345/212/250/347/277/273/351/241/265/347/273/204/344/273/266.html +0 -55
  198. package/dist/H5-components/views//351/200/211/346/213/251/345/231/250/350/241/250/345/215/225.html +0 -111
  199. package/dist/assets/css/0.styles.89cafbc9.css +0 -8
  200. package/dist/assets/img/hr-emotional-picture.e7db80e6.png +0 -0
  201. package/dist/assets/img/hr-info-card.c50e7c33.png +0 -0
  202. package/dist/assets/img/hr-pager.34bafc88.png +0 -0
  203. package/dist/assets/img/hr-preview-file-1.3cb7c6ed.png +0 -0
  204. package/dist/assets/img/hr-preview-file-2.0fe45ea1.png +0 -0
  205. package/dist/assets/img/search.83621669.svg +0 -1
  206. package/dist/assets/img/select.acadd024.png +0 -0
  207. package/dist/assets/img/slide-pager.8e2433c6.png +0 -0
  208. package/dist/assets/img/tic-rich-input.8beff81a.png +0 -0
  209. package/dist/assets/img/v-dragable.b824e34a.png +0 -0
  210. package/dist/assets/js/1.1b9c091d.js +0 -1
  211. package/dist/assets/js/12.af649b9d.js +0 -1
  212. package/dist/assets/js/13.16dba19e.js +0 -1
  213. package/dist/assets/js/14.73f3c298.js +0 -1
  214. package/dist/assets/js/15.0a34e390.js +0 -1
  215. package/dist/assets/js/16.0cb2e2cf.js +0 -1
  216. package/dist/assets/js/17.ab78de8b.js +0 -1
  217. package/dist/assets/js/18.267c7007.js +0 -1
  218. package/dist/assets/js/19.879db5c0.js +0 -1
  219. package/dist/assets/js/2.c3a8a3e9.js +0 -16
  220. package/dist/assets/js/20.fe2689df.js +0 -1
  221. package/dist/assets/js/21.15a9e12c.js +0 -1
  222. package/dist/assets/js/22.8d5eaba3.js +0 -1
  223. package/dist/assets/js/23.333c4992.js +0 -1
  224. package/dist/assets/js/24.543262a0.js +0 -1
  225. package/dist/assets/js/25.657016f9.js +0 -1
  226. package/dist/assets/js/26.03bfb23b.js +0 -1
  227. package/dist/assets/js/27.3faf82a6.js +0 -1
  228. package/dist/assets/js/28.2bc37274.js +0 -1
  229. package/dist/assets/js/29.27882fc9.js +0 -1
  230. package/dist/assets/js/3.b50928b1.js +0 -1
  231. package/dist/assets/js/30.e682e7b5.js +0 -1
  232. package/dist/assets/js/31.711223cc.js +0 -1
  233. package/dist/assets/js/32.65c4dfd4.js +0 -1
  234. package/dist/assets/js/33.b3a7c2ea.js +0 -1
  235. package/dist/assets/js/34.159478bb.js +0 -1
  236. package/dist/assets/js/35.5dead2b1.js +0 -1
  237. package/dist/assets/js/36.b58af11f.js +0 -1
  238. package/dist/assets/js/37.86d4ed5a.js +0 -1
  239. package/dist/assets/js/38.af279c3f.js +0 -1
  240. package/dist/assets/js/39.89b34b70.js +0 -1
  241. package/dist/assets/js/4.5d6de21f.js +0 -1
  242. package/dist/assets/js/40.3e1516da.js +0 -1
  243. package/dist/assets/js/41.d021ff9e.js +0 -1
  244. package/dist/assets/js/42.cb50aa1c.js +0 -1
  245. package/dist/assets/js/43.5fded5c8.js +0 -1
  246. package/dist/assets/js/44.50f78d19.js +0 -1
  247. package/dist/assets/js/45.527386eb.js +0 -1
  248. package/dist/assets/js/46.9f784389.js +0 -1
  249. package/dist/assets/js/47.7553aa19.js +0 -1
  250. package/dist/assets/js/48.9fee02f5.js +0 -1
  251. package/dist/assets/js/49.25c724d7.js +0 -1
  252. package/dist/assets/js/5.b3e00557.js +0 -1
  253. package/dist/assets/js/50.aba60d25.js +0 -1
  254. package/dist/assets/js/51.01a0bacf.js +0 -1
  255. package/dist/assets/js/52.86012cbb.js +0 -1
  256. package/dist/assets/js/53.1563eb60.js +0 -1
  257. package/dist/assets/js/54.7e734114.js +0 -1
  258. package/dist/assets/js/55.28b96a29.js +0 -1
  259. package/dist/assets/js/56.81bd12a3.js +0 -1
  260. package/dist/assets/js/57.70cac198.js +0 -1
  261. package/dist/assets/js/58.cc1b357e.js +0 -1
  262. package/dist/assets/js/59.697472ae.js +0 -1
  263. package/dist/assets/js/6.2c85d2f8.js +0 -1
  264. package/dist/assets/js/60.36873359.js +0 -1
  265. package/dist/assets/js/61.0a367a50.js +0 -1
  266. package/dist/assets/js/62.1aaa7b15.js +0 -1
  267. package/dist/assets/js/63.52c8de07.js +0 -1
  268. package/dist/assets/js/64.25b51d76.js +0 -1
  269. package/dist/assets/js/65.462206d5.js +0 -1
  270. package/dist/assets/js/66.c336d9fe.js +0 -1
  271. package/dist/assets/js/67.1b7fa2b9.js +0 -1
  272. package/dist/assets/js/68.e0ebaf13.js +0 -1
  273. package/dist/assets/js/69.3e1b6d2e.js +0 -1
  274. package/dist/assets/js/7.d1b0af72.js +0 -1
  275. package/dist/assets/js/70.40431d36.js +0 -1
  276. package/dist/assets/js/71.64f24577.js +0 -1
  277. package/dist/assets/js/72.2cf8371b.js +0 -1
  278. package/dist/assets/js/73.88f7feb5.js +0 -1
  279. package/dist/assets/js/74.2d5471c0.js +0 -1
  280. package/dist/assets/js/8.9ab5ee55.js +0 -1
  281. package/dist/assets/js/9.aaca0f9d.js +0 -9
  282. package/dist/assets/js/app.7efea3c2.js +0 -16
  283. package/dist/assets/js/vendors~docsearch.6f3b450f.js +0 -3
  284. package/dist/guide/about//346/255/244/346/226/207/346/241/243/351/241/271/347/233/256.html +0 -41
  285. package/dist/guide/index.html +0 -34
  286. package/dist/index.html +0 -40
  287. package/dist/local-js/axios@0.19.0.min.js +0 -9
  288. package/dist/local-js/ks@3.0.7.umd.min.js +0 -1
  289. package/dist/local-js/ksui@3.0.37.umd.min.js +0 -10
  290. package/dist/local-js/quill.js +0 -3
  291. package/dist/local-js/vant@2.5.6.min.js +0 -7
  292. package/dist/local-js/vconsole.min.js +0 -10
  293. package/dist/local-js/vue-router@3.1.3.min.js +0 -6
  294. package/dist/local-js/vue@2.6.10.runtime.min.js +0 -6
  295. package/dist/local-js/vue@2.7.16.min.js +0 -11932
  296. package/dist/local-js/vuex@3.1.1.min.js +0 -6
  297. package/dist/utils/ERP/ERP/345/267/245/345/205/267/346/226/271/346/263/225.html +0 -38
  298. package/dist/utils/H5/H5/345/267/245/345/205/267/346/226/271/346/263/225.html +0 -55
  299. package/dist/utils/H5/copyText /345/244/215/345/210/266.html" +0 -45
  300. package/dist/utils/index.html +0 -34
  301. package/dist//346/226/207/346/241/243/345/272/223/346/226/207/344/273/266/345/244/271.html +0 -46
  302. package/lib/demo.html +0 -10
  303. package/lib/hrui@1.0.1.common.js +0 -7411
  304. package/lib/hrui@1.0.1.css +0 -1
  305. package/lib/hrui@1.0.1.umd.js +0 -7411
  306. package/lib/hrui@1.0.1.umd.min.js +0 -1
  307. package/packages/hr-clipboard/src/icon.png +0 -0
  308. package/packages/hr-clipboard/src/main.vue +0 -64
  309. package/packages/hr-select/src/main.vue +0 -62
@@ -1,31 +1,31 @@
1
- /**
2
- * @description: 打开用户信息聊天
3
- * @param {String} num 工号
4
- */
5
- export async function openSession (num) {
6
- try {
7
- const res = await window.ksui.http('iaa.user.getOpenId', 10184, { employeeNumberList: [num] })
8
- window.ks.callFunc({
9
- method: 'openSession',
10
- params: { sessionId: res[num] }
11
- })
12
- } catch (err) {
13
- console.log(`🚀 ~ openSession ~ err:`, err)
14
- }
15
- }
16
-
17
- /**
18
- * @description: 打开用户详情页面
19
- * @param {String} num 工号
20
- */
21
- export async function openProfile (num) {
22
- try {
23
- const res = await window.ksui.http('iaa.user.getOpenId', 10184, { employeeNumberList: [num] })
24
- window.ks.callFunc({
25
- method: 'openProfile',
26
- params: { userId: res[num] }
27
- })
28
- } catch (err) {
29
- console.log(`🚀 ~ openProfile ~ err:`, err)
30
- }
31
- }
1
+ /**
2
+ * @description: 打开用户信息聊天
3
+ * @param {String} num 工号
4
+ */
5
+ export async function openSession (num) {
6
+ try {
7
+ const res = await window.ksui.http('iaa.user.getOpenId', 10184, { employeeNumberList: [num] })
8
+ window.ks.callFunc({
9
+ method: 'openSession',
10
+ params: { sessionId: res[num] }
11
+ })
12
+ } catch (err) {
13
+ console.log(`🚀 ~ openSession ~ err:`, err)
14
+ }
15
+ }
16
+
17
+ /**
18
+ * @description: 打开用户详情页面
19
+ * @param {String} num 工号
20
+ */
21
+ export async function openProfile (num) {
22
+ try {
23
+ const res = await window.ksui.http('iaa.user.getOpenId', 10184, { employeeNumberList: [num] })
24
+ window.ks.callFunc({
25
+ method: 'openProfile',
26
+ params: { userId: res[num] }
27
+ })
28
+ } catch (err) {
29
+ console.log(`🚀 ~ openProfile ~ err:`, err)
30
+ }
31
+ }
@@ -1,7 +1,7 @@
1
- import hrPager from './src/index.vue'
2
-
3
- hrPager.install = function (Vue) {
4
- Vue.component(hrPager.name, hrPager);
5
- };
6
-
1
+ import hrPager from './src/index.vue'
2
+
3
+ hrPager.install = function (Vue) {
4
+ Vue.component(hrPager.name, hrPager);
5
+ };
6
+
7
7
  export default hrPager;
@@ -1,95 +1,95 @@
1
- <template>
2
- <div class="hr-pager"
3
- v-if="ids && ids.length">
4
- <img @click="prevPage"
5
- class="prev"
6
- v-if="!prevDisabled"
7
- src="../images/prev-page.png">
8
- <img @click="nextPage"
9
- class="next"
10
- v-if="!nextDisabled"
11
- src="../images/next-page.png">
12
- </div>
13
- </template>
14
-
15
- <script>
16
- export default {
17
- name: 'hr-pager', // 按钮分页组件
18
- props: {
19
- currentId: {
20
- type: [String, Number],
21
- default: ''
22
- },
23
- ids: {
24
- type: [Array],
25
- default: () => []
26
- },
27
- // 切换上下周周报时是否冻结分页器,用于保留当前分页id
28
- isFreeze: {
29
- default: false
30
- },
31
- },
32
- data () {
33
- return {
34
- currentIndex: 0,
35
- }
36
- },
37
- watch: {
38
- currentId: {
39
- handler () {
40
- // 切换上下周周报时,冻结分页器后不响应id变化处理
41
- if (this.ids.length && !this.isFreeze) {
42
- this.currentIndex = this.ids.findIndex(v => +v === +this.currentId)
43
- }
44
- },
45
- immediate: true
46
- }
47
- },
48
- computed: {
49
- prevDisabled () {
50
- return this.currentIndex <= 0
51
- },
52
- nextDisabled () {
53
- return this.currentIndex >= this.ids.length - 1
54
- }
55
- },
56
- methods: {
57
- nextPage () {
58
- if (this.nextDisabled) {
59
- return
60
- }
61
- this.currentIndex++
62
- this.$emit('turnPage', this.ids[this.currentIndex])
63
- },
64
- prevPage () {
65
- if (this.prevDisabled) {
66
- return
67
- }
68
- this.currentIndex--
69
- this.$emit('turnPage', this.ids[this.currentIndex])
70
- },
71
- }
72
- }
73
- </script>
74
-
75
- <style lang="less" scoped>
76
- .hr-pager {
77
- user-select: none;
78
- position: fixed;
79
- top: 45%;
80
- width: 100%;
81
- box-sizing: border-box;
82
- padding: 0 29px;
83
- > img {
84
- position: absolute;
85
- width: 97px;
86
- height: 97px;
87
- }
88
- .prev {
89
- left: 29px;
90
- }
91
- .next {
92
- right: 29px;
93
- }
94
- }
95
- </style>
1
+ <template>
2
+ <div class="hr-pager"
3
+ v-if="ids && ids.length">
4
+ <img @click="prevPage"
5
+ class="prev"
6
+ v-if="!prevDisabled"
7
+ src="../images/prev-page.png">
8
+ <img @click="nextPage"
9
+ class="next"
10
+ v-if="!nextDisabled"
11
+ src="../images/next-page.png">
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ export default {
17
+ name: 'hr-pager', // 按钮分页组件
18
+ props: {
19
+ currentId: {
20
+ type: [String, Number],
21
+ default: ''
22
+ },
23
+ ids: {
24
+ type: [Array],
25
+ default: () => []
26
+ },
27
+ // 切换上下周周报时是否冻结分页器,用于保留当前分页id
28
+ isFreeze: {
29
+ default: false
30
+ },
31
+ },
32
+ data () {
33
+ return {
34
+ currentIndex: 0,
35
+ }
36
+ },
37
+ watch: {
38
+ currentId: {
39
+ handler () {
40
+ // 切换上下周周报时,冻结分页器后不响应id变化处理
41
+ if (this.ids.length && !this.isFreeze) {
42
+ this.currentIndex = this.ids.findIndex(v => +v === +this.currentId)
43
+ }
44
+ },
45
+ immediate: true
46
+ }
47
+ },
48
+ computed: {
49
+ prevDisabled () {
50
+ return this.currentIndex <= 0
51
+ },
52
+ nextDisabled () {
53
+ return this.currentIndex >= this.ids.length - 1
54
+ }
55
+ },
56
+ methods: {
57
+ nextPage () {
58
+ if (this.nextDisabled) {
59
+ return
60
+ }
61
+ this.currentIndex++
62
+ this.$emit('turnPage', this.ids[this.currentIndex])
63
+ },
64
+ prevPage () {
65
+ if (this.prevDisabled) {
66
+ return
67
+ }
68
+ this.currentIndex--
69
+ this.$emit('turnPage', this.ids[this.currentIndex])
70
+ },
71
+ }
72
+ }
73
+ </script>
74
+
75
+ <style lang="less" scoped>
76
+ .hr-pager {
77
+ user-select: none;
78
+ position: fixed;
79
+ top: 45%;
80
+ width: 100%;
81
+ box-sizing: border-box;
82
+ padding: 0 29px;
83
+ > img {
84
+ position: absolute;
85
+ width: 97px;
86
+ height: 97px;
87
+ }
88
+ .prev {
89
+ left: 29px;
90
+ }
91
+ .next {
92
+ right: 29px;
93
+ }
94
+ }
95
+ </style>
@@ -1,3 +1,3 @@
1
- import HrPopup from './src/index.vue'
2
-
3
- export default HrPopup
1
+ import HrPopup from './src/index.vue'
2
+
3
+ export default HrPopup
@@ -1,48 +1,60 @@
1
- <template>
2
- <div class="hr-popup">
3
- <ks-popup v-model="show"
4
- v-bind="$attrs"
5
- class="hr-fe-together-build-hr-popup"
6
- @close="close">
7
- <div class="title"
8
- v-if="title">
9
- {{title}}
10
- </div>
11
- <slot></slot>
12
- </ks-popup>
13
- </div>
14
-
15
- </template>
16
-
17
- <script>
18
- export default {
19
- props: {
20
- show: {
21
- type: Boolean,
22
- default: false
23
- },
24
- title: {
25
- type: String,
26
- default: ''
27
- }
28
- },
29
- methods: {
30
- close () {
31
- this.$emit('close')
32
- }
33
- }
34
- }
35
- </script>
36
- <style lang="less">
37
- .hr-fe-together-build-hr-popup {
38
- border-radius: 10px 10px 0 0;
39
- .title {
40
- line-height: 16px;
41
- padding: 16px;
42
- color: #03050d;
43
- font-size: 16px;
44
- font-weight: bold;
45
- border-bottom: 0.5px solid #ebedf5;
46
- }
47
- }
1
+ <template>
2
+ <div class="hr-popup">
3
+ <ks-popup v-model="showPopup"
4
+ v-bind="$attrs"
5
+ class="hr-fe-together-build-hr-popup"
6
+ @close="close">
7
+ <div class="title"
8
+ v-if="title">
9
+ {{title}}
10
+ </div>
11
+ <slot></slot>
12
+ </ks-popup>
13
+ </div>
14
+
15
+ </template>
16
+
17
+ <script>
18
+ export default {
19
+ name: 'HrPopup',
20
+ props: {
21
+ show: {
22
+ type: Boolean,
23
+ default: false
24
+ },
25
+ title: {
26
+ type: String,
27
+ default: ''
28
+ }
29
+ },
30
+ data () {
31
+ return {
32
+ showPopup: false
33
+ }
34
+ },
35
+ watch: {
36
+ show (val) {
37
+ this.showPopup = val
38
+ },
39
+ immediate: true
40
+ },
41
+ methods: {
42
+ close () {
43
+ this.$emit('close')
44
+ }
45
+ }
46
+ }
47
+ </script>
48
+ <style lang="less">
49
+ .hr-fe-together-build-hr-popup {
50
+ border-radius: 10px 10px 0 0;
51
+ .title {
52
+ line-height: 16px;
53
+ padding: 16px;
54
+ color: #03050d;
55
+ font-size: 16px;
56
+ font-weight: bold;
57
+ border-bottom: 0.5px solid #ebedf5;
58
+ }
59
+ }
48
60
  </style>
@@ -0,0 +1,7 @@
1
+ import HrPreviewFile from './src/index.vue'
2
+
3
+ HrPreviewFile.install = function (Vue) {
4
+ Vue.component(HrPreviewFile.name, HrPreviewFile)
5
+ }
6
+
7
+ export default HrPreviewFile
@@ -0,0 +1,58 @@
1
+ <script>
2
+ import {
3
+ isObjectEmpty,
4
+ createMap
5
+ } from './util.js'
6
+
7
+ export default {
8
+ name: 'HrPreviewFile',
9
+ props: {
10
+ file: {
11
+ type: Object,
12
+ default: () => ({
13
+ extendName: '',
14
+ url: '',
15
+ name: '',
16
+ size: ''
17
+ })
18
+ }
19
+ },
20
+ methods: {
21
+ preview (file) {
22
+ try {
23
+
24
+ if (isObjectEmpty(file) || !file.url) return window.vant.Toast('暂无附件,请检查')
25
+
26
+ const {
27
+ extendName = '',
28
+ url = '',
29
+ name = '',
30
+ size = ''
31
+ } = file || {}
32
+
33
+ const find = [...createMap()].find(([key]) => key.test(extendName))
34
+
35
+ if (find === void 0) return window.vant.Toast(`暂不支持${extendName}类型文件的预览`)
36
+
37
+ const [, fn] = find
38
+
39
+ fn({ url, name, size })
40
+
41
+ this.$emit('preview', file)
42
+ } catch (err) {
43
+ console.log(`🚀 ~ preview ~ err:`, err)
44
+ }
45
+ }
46
+ },
47
+ render () {
48
+ return (<div class="hr-preview-file" onClick={() => this.preview(this.file)}>{this.$slots.default ? this.$slots.default : null}</div>)
49
+ }
50
+ }
51
+ </script>
52
+ <style lang="less" scoped>
53
+ .hr-preview-file {
54
+ display: flex;
55
+ align-items: center;
56
+ cursor: pointer;
57
+ }
58
+ </style>
@@ -0,0 +1,50 @@
1
+ const ImagePreview = window.vant && window.vant.ImagePreview
2
+
3
+ /**
4
+ * @description: 空对象
5
+ */
6
+ export function isObjectEmpty (obj) {
7
+ return JSON.stringify(obj) === '{}'
8
+ }
9
+
10
+ export function createMap () {
11
+ //
12
+ const IMG_REG = /png|jpe?g|gif|svg|bmp/ig
13
+ // 可根据 ks.previewFile 的支持情况进行补充
14
+ const PDF_REG = /pdf|docx/ig
15
+
16
+ return new Map([
17
+ //
18
+ [IMG_REG, imgPre],
19
+ //
20
+ [PDF_REG, pdfPre]
21
+ ])
22
+ }
23
+
24
+ /**
25
+ * @description: 图片类型
26
+ * @param {String} url 路径
27
+ */
28
+ function imgPre ({ url }) {
29
+ ImagePreview({
30
+ images: [url],
31
+ startPosition: 0
32
+ })
33
+ }
34
+
35
+ /**
36
+ * @description: 文件类型
37
+ * @param {String} url 文件路径
38
+ * @param {String} name 文件名称
39
+ * @param {String} size 文件大小
40
+ */
41
+ function pdfPre ({ url, name, size }) {
42
+ window.ks.callFunc({
43
+ method: 'previewFile',
44
+ params: {
45
+ filePath: url,
46
+ fileName: name,
47
+ fileSize: String(size)
48
+ }
49
+ })
50
+ }
@@ -0,0 +1,7 @@
1
+ import HrRate from './src/index.vue'
2
+
3
+ HrRate.install = function (Vue) {
4
+ Vue.component(HrRate.name, HrRate)
5
+ }
6
+
7
+ export default HrRate
@@ -0,0 +1,42 @@
1
+ <template>
2
+ <div class="hr-rate">
3
+ <van-rate v-bind="$attrs"
4
+ v-on="$listeners" />
5
+ <span class="score-tips"
6
+ v-if="showText">{{ getScoreLabel($attrs.value) }}</span>
7
+ </div>
8
+ </template>
9
+
10
+ <script>
11
+ export default {
12
+ // 二次封装van-rate组件 支持showText功能
13
+ name: 'HrRate',
14
+ props: {
15
+ showText: {
16
+ type: Boolean,
17
+ default: false
18
+ },
19
+ texts: {
20
+ type: Array,
21
+ }
22
+ },
23
+ methods: {
24
+ getScoreLabel (score) {
25
+ let index = Math.round(score)
26
+ return this.texts[index - 1] || ''
27
+ }
28
+ }
29
+ }
30
+ </script>
31
+
32
+ <style lang="less" scoped>
33
+ .hr-rate {
34
+ display: flex;
35
+ align-items: center;
36
+ .score-tips {
37
+ font-size: 12px;
38
+ color: #b0b3bf;
39
+ margin-left: 12px;
40
+ }
41
+ }
42
+ </style>
@@ -0,0 +1,7 @@
1
+ import HrReasonTextarea from './src/index.vue'
2
+
3
+ HrReasonTextarea.install = function (Vue) {
4
+ Vue.component(HrReasonTextarea.name, HrReasonTextarea)
5
+ }
6
+
7
+ export default HrReasonTextarea
@@ -0,0 +1,128 @@
1
+ <script>
2
+ export default {
3
+ name: 'HrReasonTextarea',
4
+ props: {
5
+ ruleForm: {
6
+ type: Object,
7
+ default () {
8
+ return {
9
+ reason: {
10
+ value: '',
11
+ rules: [{ required: true, message: `请填写申请理由` }],
12
+ placeholder: '112',
13
+ key: '加班原因',
14
+ maxlength: 500,
15
+ maxHeight: 240
16
+ },
17
+ output: {
18
+ value: '',
19
+ rules: [{ required: true, message: `请填写申请理由` }],
20
+ placeholder: '11',
21
+ key: '加班产出',
22
+ maxlength: 500,
23
+ maxHeight: 240
24
+ }
25
+ }
26
+ }
27
+ },
28
+ readonly: {
29
+ type: Boolean,
30
+ default () {
31
+ return false
32
+ }
33
+ }
34
+ },
35
+ data () {
36
+ return {
37
+ }
38
+ },
39
+ created () {
40
+ },
41
+ methods: {
42
+ userInput (item, name, index) {
43
+ this.$emit('input', item, name, index)
44
+ }
45
+ },
46
+ render () {
47
+ const renderReasonTextarea = (item, name, index) => {
48
+ const {
49
+ rules = [],
50
+ placeholder = '请输入',
51
+ key = '原因',
52
+ maxlength = 500,
53
+ maxHeight = 240
54
+ } = item
55
+
56
+ return <div class="reason-textarea">
57
+ <div class="reason-textarea-title">
58
+ <span class="reason-textarea-title-order">{index + 1}</span>
59
+ <span class="reason-textarea-title-text">{key}</span>
60
+ </div>
61
+ <van-field
62
+ value={item.value}
63
+ onInput={(value) => {
64
+ item.value = value
65
+ this.userInput(name, item)
66
+ }}
67
+ rules={rules}
68
+ readonly={this.readonly}
69
+ error-message-align="right"
70
+ placeholder={placeholder}
71
+ class="input-textarea"
72
+ maxlength={maxlength}
73
+ type="textarea"
74
+ autosize={{ maxHeight }}
75
+ rows="2"
76
+ required />
77
+ </div>
78
+ }
79
+ return <div class="hr-reason-textarea">
80
+ {
81
+ Object.keys(this.ruleForm || {}).map((name, index) => {
82
+ return renderReasonTextarea(this.ruleForm[name], name, index)
83
+ })
84
+ }
85
+ </div>
86
+ }
87
+ }
88
+ </script>
89
+
90
+ <style scoped lang="less">
91
+ .hr-reason-textarea {
92
+ padding: 11px 16px;
93
+ .reason-textarea {
94
+ .reason-textarea-title {
95
+ display: flex;
96
+ .reason-textarea-title-order {
97
+ flex: 0 0 18px;
98
+ margin-top: 2px;
99
+ margin-right: 5px;
100
+ width: 18px;
101
+ height: 18px;
102
+ line-height: 18px;
103
+ text-align: center;
104
+ border-radius: 50%;
105
+ background: #f3f4f6;
106
+ border: 1px solid #9da4bb;
107
+ font-size: 12px;
108
+ color: #9da4bb;
109
+ }
110
+ .reason-textarea-title-text {
111
+ font-size: 15px;
112
+ font-weight: normal;
113
+ line-height: 22px;
114
+ color: #03050d;
115
+ }
116
+ }
117
+ /deep/ .input-textarea {
118
+ padding: 0 !important;
119
+ .van-cell__value {
120
+ background: none;
121
+ }
122
+ }
123
+ /deep/ .van-cell::after {
124
+ border-bottom: none;
125
+ }
126
+ }
127
+ }
128
+ </style>