@kyfe/hroa-ui 1.0.6 → 1.0.7

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 (244) hide show
  1. package/dist/hroa-ui.common.js +133 -2576
  2. package/dist/hroa-ui.css +1 -1
  3. package/dist/hroa-ui.umd.js +133 -2576
  4. package/dist/hroa-ui.umd.min.js +2 -2
  5. package/lib/hr-add-list/index.js +1 -1
  6. package/lib/hr-bottom-button/index.js +1 -1
  7. package/lib/hr-breadcrumb/index.js +1 -1
  8. package/lib/hr-button/index.js +1 -1
  9. package/lib/hr-checkbox/index.js +1 -1
  10. package/lib/hr-checkbox-group/index.js +1 -1
  11. package/lib/hr-clipboard/index.js +1 -1
  12. package/lib/hr-collapse-card/index.js +1 -1
  13. package/lib/hr-condition-filtrate/index.js +1 -1
  14. package/lib/hr-condition-filtrate-popup/index.js +1 -1
  15. package/lib/hr-date-filter/index.css +1 -1
  16. package/lib/hr-date-filter/index.js +1 -1
  17. package/lib/hr-dropdown-date/index.css +1 -1
  18. package/lib/hr-dropdown-date/index.js +1 -1
  19. package/lib/hr-elasticity-box/index.js +1 -1
  20. package/lib/hr-elasticity-box-item/index.js +1 -1
  21. package/lib/hr-emotional-picture/index.js +1 -1
  22. package/lib/hr-employee-choose/index.js +1 -1
  23. package/lib/hr-file-list/index.js +1 -1
  24. package/lib/hr-full-screen/index.js +1 -1
  25. package/lib/hr-img-list/index.css +1 -1
  26. package/lib/hr-img-list/index.js +1 -1
  27. package/lib/hr-info-card/index.js +1 -1
  28. package/lib/hr-information/index.js +1 -1
  29. package/lib/hr-license-plate-number/index.js +1 -1
  30. package/lib/hr-module-card/index.js +1 -1
  31. package/lib/hr-multiterm-choose/index.css +1 -1
  32. package/lib/hr-multiterm-choose/index.js +1 -1
  33. package/lib/hr-no-data/index.js +1 -1
  34. package/lib/hr-notice-bar/index.js +1 -1
  35. package/lib/hr-notification-dialog/index.js +1 -1
  36. package/lib/hr-open-ks/index.js +1 -1
  37. package/lib/hr-pager/index.js +1 -1
  38. package/lib/hr-popup/index.js +1 -1
  39. package/lib/hr-preview-file/index.js +1 -1
  40. package/lib/hr-radiobox/index.js +1 -1
  41. package/lib/hr-radiobox-group/index.js +1 -1
  42. package/lib/hr-rate/index.js +1 -1
  43. package/lib/hr-reason-textarea/index.js +1 -1
  44. package/lib/hr-search-input/index.js +1 -1
  45. package/lib/hr-search-tips/index.js +1 -1
  46. package/lib/hr-select/index.js +1 -1
  47. package/lib/hr-select-list/index.js +1 -1
  48. package/lib/hr-single-choose/index.css +1 -1
  49. package/lib/hr-single-choose/index.js +1 -1
  50. package/lib/hr-slide-pager/index.js +1 -1
  51. package/lib/hr-sort/index.js +1 -1
  52. package/lib/hr-stack-image/index.js +1 -1
  53. package/lib/hr-tab-nav/index.js +1 -1
  54. package/lib/hr-time-picker/index.js +1 -1
  55. package/lib/hr-view-item/index.js +1 -1
  56. package/lib/hr-virtual-list/index.js +1 -1
  57. package/lib/index/index.css +1 -1
  58. package/lib/index/index.js +2 -2
  59. package/lib/utils/index.js +1 -1
  60. package/package.json +12 -9
  61. package/lib/getJsModule/index.css +0 -1
  62. package/lib/getJsModule/index.js +0 -9
  63. package/packages/getJsModule.js +0 -11
  64. package/packages/hr-add-list/image/add.svg +0 -1
  65. package/packages/hr-add-list/image/close.svg +0 -1
  66. package/packages/hr-add-list/index.js +0 -7
  67. package/packages/hr-add-list/src/index.vue +0 -125
  68. package/packages/hr-add-list//346/226/260/345/242/236/345/244/232/347/254/224/346/225/260/346/215/256.md +0 -0
  69. package/packages/hr-bottom-button/index.js +0 -7
  70. package/packages/hr-bottom-button/src/index.vue +0 -128
  71. package/packages/hr-breadcrumb/index.js +0 -3
  72. package/packages/hr-breadcrumb/src/index.vue +0 -87
  73. package/packages/hr-breadcrumb//351/235/242/345/214/205/345/261/221.md +0 -0
  74. package/packages/hr-button/index.js +0 -13
  75. package/packages/hr-button/src/hr-button.vue +0 -39
  76. package/packages/hr-checkbox/index.js +0 -8
  77. package/packages/hr-checkbox/src/active-icon.png +0 -0
  78. package/packages/hr-checkbox/src/checkbox-group.vue +0 -74
  79. package/packages/hr-checkbox/src/checkbox.vue +0 -226
  80. package/packages/hr-checkbox/src/data.js +0 -46
  81. package/packages/hr-checkbox//345/244/215/351/200/211/346/241/206-/345/215/225/351/200/211/346/241/206.md +0 -0
  82. package/packages/hr-checkbox-group/index.js +0 -8
  83. package/packages/hr-clipboard/index.js +0 -8
  84. package/packages/hr-clipboard/src/index.vue +0 -46
  85. package/packages/hr-clipboard/src/util.js +0 -9
  86. package/packages/hr-collapse-card/index.js +0 -3
  87. package/packages/hr-collapse-card/src/images/icon_up.png +0 -0
  88. package/packages/hr-collapse-card/src/index.vue +0 -151
  89. package/packages/hr-collapse-card//346/212/230/345/217/240/345/215/241/347/211/207.md +0 -0
  90. package/packages/hr-condition-filtrate/enum/index.js +0 -11
  91. package/packages/hr-condition-filtrate/image/arrow-right.png +0 -0
  92. package/packages/hr-condition-filtrate/index.js +0 -7
  93. package/packages/hr-condition-filtrate/src/employee-choose/index.vue +0 -101
  94. package/packages/hr-condition-filtrate/src/index.vue +0 -246
  95. package/packages/hr-condition-filtrate/src/multiterm-choose/index.vue +0 -167
  96. package/packages/hr-condition-filtrate/src/org-tree-choose/index.vue +0 -102
  97. package/packages/hr-condition-filtrate/src/single-choose/index.vue +0 -144
  98. package/packages/hr-condition-filtrate/src/text-input/index.vue +0 -60
  99. package/packages/hr-condition-filtrate/src/time-selector/date-range-select.vue +0 -154
  100. package/packages/hr-condition-filtrate/src/time-selector/images/date-icon.png +0 -0
  101. package/packages/hr-condition-filtrate/src/time-selector/index.vue +0 -380
  102. package/packages/hr-condition-filtrate/src/time-selector/utils/constant.js +0 -30
  103. package/packages/hr-condition-filtrate/src/time-selector/utils/tools.js +0 -213
  104. package/packages/hr-condition-filtrate-popup/index.js +0 -7
  105. package/packages/hr-condition-filtrate-popup/src/index.vue +0 -236
  106. package/packages/hr-date-filter/index.js +0 -7
  107. package/packages/hr-date-filter/src/date-select.vue +0 -153
  108. package/packages/hr-date-filter/src/index.vue +0 -243
  109. package/packages/hr-date-filter/src/style.less +0 -130
  110. package/packages/hr-date-filter/src/utils.js +0 -109
  111. package/packages/hr-dropdown-date/index.js +0 -7
  112. package/packages/hr-dropdown-date/src/calendar/calendar.js +0 -128
  113. package/packages/hr-dropdown-date/src/calendar/calendar.vue +0 -485
  114. package/packages/hr-dropdown-date/src/calendar/images/arrow@3x.png +0 -0
  115. package/packages/hr-dropdown-date/src/calendar/index.js +0 -5
  116. package/packages/hr-dropdown-date/src/date-picker/date-range-select.vue +0 -92
  117. package/packages/hr-dropdown-date/src/date-picker/month-range-select.vue +0 -128
  118. package/packages/hr-dropdown-date/src/date-picker/month-select.vue +0 -98
  119. package/packages/hr-dropdown-date/src/date-picker/style.less +0 -120
  120. package/packages/hr-dropdown-date/src/date-picker/utils.js +0 -109
  121. package/packages/hr-dropdown-date/src/index.vue +0 -482
  122. package/packages/hr-dropdown-date/src/week.js +0 -194
  123. package/packages/hr-elasticity-box/index.js +0 -7
  124. package/packages/hr-elasticity-box/src/elasticity-box-item.vue +0 -61
  125. package/packages/hr-elasticity-box/src/index.vue +0 -52
  126. package/packages/hr-elasticity-box-item/index.js +0 -7
  127. package/packages/hr-emotional-picture/index.js +0 -7
  128. package/packages/hr-emotional-picture/src/index.vue +0 -66
  129. package/packages/hr-emotional-picture//346/203/205/346/204/237/345/233/276/347/273/204/344/273/266.md +0 -0
  130. package/packages/hr-employee-choose/index.js +0 -7
  131. package/packages/hr-employee-choose/src/image/arrow-right.png +0 -0
  132. package/packages/hr-employee-choose/src/index.vue +0 -119
  133. package/packages/hr-file-list/index.js +0 -3
  134. package/packages/hr-file-list/src/file-type/other.vue +0 -45
  135. package/packages/hr-file-list/src/file-type/picture.vue +0 -38
  136. package/packages/hr-file-list/src/file-type/video.vue +0 -60
  137. package/packages/hr-file-list/src/index.vue +0 -246
  138. package/packages/hr-file-list/src/utils/enum.js +0 -95
  139. package/packages/hr-file-list/src/utils/fun.js +0 -16
  140. package/packages/hr-file-list//346/226/207/344/273/266/345/210/227/350/241/250.md +0 -0
  141. package/packages/hr-full-screen/index.js +0 -7
  142. package/packages/hr-full-screen/src/index.vue +0 -117
  143. package/packages/hr-img-list/index.js +0 -3
  144. package/packages/hr-img-list/src/index.vue +0 -144
  145. package/packages/hr-img-list//345/244/232/345/233/276/345/210/227/350/241/250.md +0 -0
  146. package/packages/hr-info-card/index.js +0 -7
  147. package/packages/hr-info-card/src/index.vue +0 -67
  148. package/packages/hr-information/index.js +0 -7
  149. package/packages/hr-information/src/index.vue +0 -72
  150. package/packages/hr-license-plate-number/index.js +0 -8
  151. package/packages/hr-license-plate-number/src/enum.js +0 -44
  152. package/packages/hr-license-plate-number/src/index.vue +0 -164
  153. package/packages/hr-license-plate-number/src/vnp-keyboard.vue +0 -182
  154. package/packages/hr-license-plate-number//350/275/246/347/211/214/345/217/267/345/274/271/347/252/227.md +0 -0
  155. package/packages/hr-module-card/index.js +0 -13
  156. package/packages/hr-module-card/src/index.vue +0 -132
  157. package/packages/hr-module-card//346/250/241/345/235/227/345/215/241/347/211/207/347/273/204/344/273/266.md +0 -29
  158. package/packages/hr-multiterm-choose/index.js +0 -8
  159. package/packages/hr-multiterm-choose/src/active-icon.png +0 -0
  160. package/packages/hr-multiterm-choose/src/index.vue +0 -224
  161. package/packages/hr-multiterm-choose//345/244/232/351/200/211/346/241/206.md +0 -0
  162. package/packages/hr-no-data/index.js +0 -7
  163. package/packages/hr-no-data/src/index.vue +0 -48
  164. package/packages/hr-notice-bar/index.js +0 -7
  165. package/packages/hr-notice-bar/src/bem.js +0 -38
  166. package/packages/hr-notice-bar/src/index.js +0 -52
  167. package/packages/hr-notice-bar//351/200/232/347/237/245/346/240/217/347/273/204/344/273/266.md +0 -3
  168. package/packages/hr-notification-dialog/images/header.png +0 -0
  169. package/packages/hr-notification-dialog/index.js +0 -7
  170. package/packages/hr-notification-dialog/src/index.vue +0 -293
  171. package/packages/hr-notification-dialog//345/274/271/347/252/227/346/217/220/347/244/272/347/273/204/344/273/266.md +0 -0
  172. package/packages/hr-open-ks/index.js +0 -7
  173. package/packages/hr-open-ks/src/icon.png +0 -0
  174. package/packages/hr-open-ks/src/index.vue +0 -97
  175. package/packages/hr-open-ks/src/util.js +0 -31
  176. package/packages/hr-pager/images/next-page.png +0 -0
  177. package/packages/hr-pager/images/prev-page.png +0 -0
  178. package/packages/hr-pager/index.js +0 -7
  179. package/packages/hr-pager/src/index.vue +0 -120
  180. package/packages/hr-pager//346/214/211/351/222/256/347/277/273/351/241/265/347/273/204/344/273/266.md +0 -0
  181. package/packages/hr-popup/index.js +0 -3
  182. package/packages/hr-popup/src/index.vue +0 -64
  183. package/packages/hr-popup//345/274/271/345/207/272/345/261/202.md +0 -0
  184. package/packages/hr-preview-file/index.js +0 -7
  185. package/packages/hr-preview-file/src/index.vue +0 -58
  186. package/packages/hr-preview-file/src/util.js +0 -50
  187. package/packages/hr-radiobox/index.js +0 -8
  188. package/packages/hr-radiobox/src/data.js +0 -46
  189. package/packages/hr-radiobox/src/radiobox-group.vue +0 -64
  190. package/packages/hr-radiobox/src/radiobox.vue +0 -191
  191. package/packages/hr-radiobox-group/index.js +0 -8
  192. package/packages/hr-rate/index.js +0 -7
  193. package/packages/hr-rate/src/index.vue +0 -42
  194. 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
  195. package/packages/hr-reason-textarea/index.js +0 -7
  196. package/packages/hr-reason-textarea/src/index.vue +0 -128
  197. package/packages/hr-search-input/image/input-close-icon.png +0 -0
  198. package/packages/hr-search-input/image/search-icon.png +0 -0
  199. package/packages/hr-search-input/index.js +0 -8
  200. package/packages/hr-search-input/src/index.vue +0 -144
  201. package/packages/hr-search-tips/index.js +0 -3
  202. package/packages/hr-search-tips/src/index.vue +0 -213
  203. package/packages/hr-search-tips//350/277/234/347/250/213/346/250/241/347/263/212/346/220/234/347/264/242.md +0 -0
  204. package/packages/hr-select/index.js +0 -7
  205. package/packages/hr-select/src/index.vue +0 -41
  206. package/packages/hr-select-list/index.js +0 -3
  207. package/packages/hr-select-list/src/index.vue +0 -214
  208. package/packages/hr-select-list//344/270/213/346/213/211/351/200/211/346/213/251(/351/273/230/350/256/244/345/244/232/351/200/211).md +0 -0
  209. package/packages/hr-single-choose/index.js +0 -8
  210. package/packages/hr-single-choose/src/index.vue +0 -195
  211. package/packages/hr-single-choose//345/215/225/351/200/211/346/241/206.md +0 -0
  212. package/packages/hr-slide-pager/guide/image/turn-left.png +0 -0
  213. package/packages/hr-slide-pager/guide/image/turn-right.png +0 -0
  214. package/packages/hr-slide-pager/guide/index.vue +0 -59
  215. package/packages/hr-slide-pager/guide//346/226/260/346/211/213/346/214/207/345/274/225.md +0 -0
  216. package/packages/hr-slide-pager/index.js +0 -7
  217. package/packages/hr-slide-pager/src/index.vue +0 -374
  218. package/packages/hr-slide-pager//346/273/221/345/212/250/347/277/273/351/241/265/347/273/204/344/273/266.md +0 -0
  219. package/packages/hr-sort/index.js +0 -3
  220. package/packages/hr-sort/src/main.vue +0 -133
  221. package/packages/hr-sort//346/216/222/345/272/217.md +0 -0
  222. package/packages/hr-stack-image/index.js +0 -3
  223. package/packages/hr-stack-image/src/main.vue +0 -77
  224. package/packages/hr-stack-image//345/261/202/345/217/240/345/233/276/347/211/207/347/273/204/344/273/266.md +0 -0
  225. package/packages/hr-tab-nav/index.js +0 -8
  226. package/packages/hr-tab-nav/src/index.vue +0 -190
  227. package/packages/hr-time-picker/index.js +0 -3
  228. package/packages/hr-time-picker/src/index.vue +0 -85
  229. package/packages/hr-time-picker//346/227/266/351/227/264/351/200/211/346/213/251/345/231/250.md +0 -0
  230. package/packages/hr-view-item/index.js +0 -13
  231. package/packages/hr-view-item/src/index.vue +0 -89
  232. package/packages/hr-view-item//350/241/250/345/215/225/351/241/271item/345/261/225/347/244/272.md +0 -0
  233. package/packages/hr-virtual-list/index.js +0 -7
  234. package/packages/hr-virtual-list/src/cc-item.vue +0 -105
  235. package/packages/hr-virtual-list/src/index.vue +0 -227
  236. package/packages/hr-virtual-list//350/231/232/346/213/237/345/210/227/350/241/250.md +0 -0
  237. package/packages/index.js +0 -23
  238. package/packages/utils/directive/common.js +0 -0
  239. package/packages/utils/directive/index.js +0 -2
  240. package/packages/utils/directive/specific.js +0 -54
  241. package/packages/utils/index.js +0 -7
  242. package/packages/utils/tool/common.js +0 -65
  243. package/packages/utils/tool/index.js +0 -2
  244. package/packages/utils/tool/specific.js +0 -0
@@ -1,246 +0,0 @@
1
- <script>
2
- import { IMG_FORMAT, VIDEO_FORMAT, FILE_TYPE, PREVIEW_FORMAT } from './utils/enum.js'
3
- import { getFileTypeByExtendName } from './utils/fun.js'
4
- // 图片类型
5
- import ImgType from './file-type/picture.vue'
6
- // 视频类型
7
- import VideoType from './file-type/video.vue'
8
- // 其它类型
9
- import OtherType from './file-type/other.vue'
10
-
11
- export default {
12
- name: 'HrFileList',
13
- components: {
14
- ImgType,
15
- VideoType,
16
- OtherType,
17
- },
18
- props: {
19
- fileList: {
20
- type: Array,
21
- default: () => ([])
22
- },
23
- // 是否需要删除
24
- canRemove: {
25
- type: Boolean,
26
- default: false
27
- },
28
- // 是否可预览
29
- canPreview: {
30
- type: Boolean,
31
- default: true
32
- },
33
- // 展示文件名
34
- showFileName: {
35
- type: Boolean,
36
- default: false
37
- }
38
- },
39
- data () {
40
- return {
41
- curFileList: []
42
- }
43
- },
44
- watch: {
45
- fileList: {
46
- handler (val) {
47
- this.setFileData(val)
48
- },
49
- immediate: true,
50
- deep: true
51
- }
52
- },
53
- render () {
54
- const delDom = (item, index) => {
55
- return <div class="del-icon" onClick={(e) => {
56
- e.stopPropagation()
57
- this.removeFileHandler(item, index, this.curFileList)
58
- }}>
59
- <ks-icon name="clear" class="icon-cls" />
60
- </div>
61
- }
62
-
63
- const imgDom = (item) => {
64
- return (this.getFileType(item) === FILE_TYPE.IMG ? <ImgType fileData={item}></ImgType> : '')
65
- }
66
-
67
- const videoDom = (item) => {
68
- return (this.getFileType(item) === FILE_TYPE.VIDEO ? <VideoType fileData={item}></VideoType> : '')
69
- }
70
-
71
- const otherDom = (item) => {
72
- return (![FILE_TYPE.IMG, FILE_TYPE.VIDEO].includes(this.getFileType(item)) ? <OtherType fileData={item}></OtherType> : '')
73
- }
74
-
75
- const fileNameDom = (item) => {
76
- const { name } = item || {}
77
- return (name && <div class="file-name">{name}</div>)
78
- }
79
-
80
- return (<div class="hr-file-list">
81
- {
82
- this.curFileList.map((item, index) => {
83
- return item.url ? <div class="file-item"
84
- onClick={() => this.fileItemClick(item, index, this.curFileList)}>
85
- {(this.canRemove || item.canRemove) ? delDom(item, index) : ''}
86
- {imgDom(item)}
87
- {videoDom(item)}
88
- {otherDom(item)}
89
- {this.showFileName && fileNameDom(item)}
90
- </div> : ''
91
- })
92
- }
93
- </div>)
94
- },
95
- methods: {
96
- // 判断文件类型
97
- getFileType (item) {
98
- const { extendName } = item || {}
99
- return getFileTypeByExtendName(extendName)
100
- },
101
- // 设置文件数据
102
- setFileData (file) {
103
- this.curFileList = file || []
104
- },
105
- // 过滤出指定格式文件
106
- getSpecifyFormatFile (fileFormat) {
107
- return (this.curFileList || []).filter(i => fileFormat.includes(i.extendName ? i.extendName.toLowerCase() : i.extendName))
108
- },
109
- // 选项点击事件
110
- fileItemClick (item, index, fileList) {
111
- this.$emit('fileItemClick', item, index, fileList)
112
- if (!this.canPreview) return
113
- if (!(window.ks && window.ks.callFunc)) {
114
- this.$toast('当前环境不支持跨声原生能力')
115
- return
116
- }
117
- const { url, name, size, extendName } = item || {}
118
- const newExtendName = extendName ? extendName.toLowerCase() : extendName
119
- const isCanPreviewFormat = PREVIEW_FORMAT.includes(newExtendName)
120
- if (!isCanPreviewFormat) {
121
- this.$toast('该文件暂不支持预览')
122
- return
123
- }
124
- // 点击图片类型,预览图片
125
- if (IMG_FORMAT.includes(newExtendName)) {
126
- const urls = this.getSpecifyFormatFile(IMG_FORMAT).map(i => i.url)
127
- this.previewPicture({
128
- filePaths: urls,
129
- index
130
- })
131
- } else if (VIDEO_FORMAT.includes(newExtendName)) {
132
- const httpType = (url && (url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1))
133
- this.previewVideo({
134
- url,
135
- type: httpType ? 0 : 1
136
- })
137
- } else {
138
- this.previewFile({
139
- filePath: url,
140
- fileName: name,
141
- fileSize: size
142
- })
143
- }
144
- },
145
- // 移除附件事件
146
- removeFileHandler (item, index, fileList) {
147
- this.$emit('removeFileItem', item, index, fileList)
148
- },
149
- /**
150
- * @description: 预览图片
151
- * @param {Array} filePaths 图片路径集合
152
- * @param {Number} index 图片索引
153
- * @param {Boolean} forbidMore 允许图片下载
154
- * @param {Boolean} forbidDownload 显示三个点更多控件,可以拉起工具栏
155
- * @return {void}
156
- */
157
- previewPicture ({ filePaths = [], index = 0, forbidMore = false, forbidDownload = false }) {
158
- window.ks.callFunc({
159
- method: 'previewAssets',
160
- params: {
161
- filePaths,
162
- index,
163
- forbidMore,
164
- forbidDownload
165
- }
166
- })
167
- },
168
- /**
169
- * @description: 预览视频
170
- * @param {String} url 视频路径
171
- * @param {Number} type 路径类型(0-在线链接 1-本地路径 3-813司庆)
172
- * @return {void}
173
- */
174
- previewVideo ({ url, type }) {
175
- window.ks.callFunc({
176
- method: 'playVideo',
177
- params: {
178
- url,
179
- type
180
- }
181
- })
182
- },
183
- /**
184
- * @description: 预览文件
185
- * @param {String} filePath 文件路径
186
- * @param {String} fileName 文件名称
187
- * @param {String} fileSize 文件大小(注:跨声原生方法预览文件,fileSize必须string类型,否则iPhone预览不了)
188
- * @return {void}
189
- */
190
- previewFile ({ filePath, fileName, fileSize }) {
191
- window.ks.callFunc({
192
- method: 'previewFile',
193
- params: {
194
- filePath,
195
- fileName,
196
- fileSize: (fileSize || fileSize === 0) ? String(fileSize) : fileSize
197
- }
198
- })
199
- },
200
- }
201
- }
202
- </script>
203
-
204
- <style lang="less" scoped>
205
- .hr-file-list {
206
- // width: 100%;
207
- display: inline-block;
208
- .file-item {
209
- position: relative;
210
- width: 70px;
211
- height: 70px;
212
- margin-bottom: 8px;
213
- margin-right: 10px;
214
- float: left;
215
- .del-icon {
216
- position: absolute;
217
- top: -7px;
218
- right: -7px;
219
- z-index: 99;
220
- width: 14px;
221
- height: 14px;
222
- color: #b0b3bf;
223
- background: #ffffff;
224
- border-radius: 50%;
225
- display: flex;
226
- justify-content: center;
227
- align-items: center;
228
- .icon-cls {
229
- font-size: 14px;
230
- }
231
- }
232
- .file-name {
233
- position: absolute;
234
- left: 0;
235
- bottom: 0;
236
- width: 100%;
237
- height: 16px;
238
- line-height: 16px;
239
- font-size: 11px;
240
- text-align: center;
241
- color: #ffffff;
242
- background: rgba(0, 0, 0, 0.5);
243
- }
244
- }
245
- }
246
- </style>
@@ -1,95 +0,0 @@
1
- const imgIcon = 'https://erphostjs.kye-erp.com/hr-oa-kts/ks-app/hr-fe-together-build/file-type/img.svg'
2
- export const videoIcon = 'https://erphostjs.kye-erp.com/hr-oa-kts/ks-app/hr-fe-together-build/file-type/video.svg'
3
- const pdfIcon = 'https://erphostjs.kye-erp.com/hr-oa-kts/ks-app/hr-fe-together-build/file-type/pdf.svg'
4
- const pptIcon = 'https://erphostjs.kye-erp.com/hr-oa-kts/ks-app/hr-fe-together-build/file-type/ppt.svg'
5
- const wordIcon = 'https://erphostjs.kye-erp.com/hr-oa-kts/ks-app/hr-fe-together-build/file-type/word.svg'
6
- const xlsIcon = 'https://erphostjs.kye-erp.com/hr-oa-kts/ks-app/hr-fe-together-build/file-type/word.svg'
7
- const txtIcon = 'https://erphostjs.kye-erp.com/hr-oa-kts/ks-app/hr-fe-together-build/file-type/txt.svg'
8
- const zipIcon = 'https://erphostjs.kye-erp.com/hr-oa-kts/ks-app/hr-fe-together-build/file-type/zip.svg'
9
- export const defaultIcon = 'https://erphostjs.kye-erp.com/hr-oa-kts/ks-app/hr-fe-together-build/file-type/default.svg'
10
- export const noFormatIcon = 'https://erphostjs.kye-erp.com/hr-oa-kts/ks-app/hr-fe-together-build/file-type/no-format.svg'
11
-
12
- export const FILE_TYPE = {
13
- IMG: 'img',
14
- VIDEO: 'video',
15
- OTHER: 'other',
16
- UNKNOWN: 'unknown'
17
- }
18
-
19
- // 图片格式
20
- export const IMG_FORMAT = ['png', 'jpg', 'jpeg', 'bmp', 'webp', 'gif']
21
-
22
- // 视频格式
23
- export const VIDEO_FORMAT = ['mp4', 'avi', 'mkv', 'mov', 'wmv', 'flv', 'mpeg', 'webm']
24
-
25
- // PDF格式
26
- export const PDF_FORMAT = ['pdf']
27
-
28
- // PPT格式
29
- export const PPT_FORMAT = ['ppt', 'pptx', 'pps', 'ppsx']
30
-
31
- // WORD格式
32
- export const WORD_FORMAT = ['doc', 'docx']
33
-
34
- // XLS格式
35
- export const XLS_FORMAT = ['xls', 'xlsx']
36
-
37
- // TXT格式
38
- export const TXT_FORMAT = ['txt']
39
-
40
- // ZIP格式
41
- export const ZIP_FORMAT = ['zip', 'rar', '7z', 'tar', 'gz']
42
-
43
- // 可预览格式
44
- export const PREVIEW_FORMAT = [
45
- ...IMG_FORMAT,
46
- ...VIDEO_FORMAT,
47
- ...PDF_FORMAT,
48
- ...PPT_FORMAT,
49
- ...WORD_FORMAT,
50
- ...XLS_FORMAT
51
- ]
52
-
53
- // 文件格式数据
54
- export const FILE_FORMAT_DATA = [
55
- {
56
- type: 'IMG',
57
- format: IMG_FORMAT,
58
- formatIcon: imgIcon
59
- },
60
- {
61
- type: 'VIDEO',
62
- format: VIDEO_FORMAT,
63
- formatIcon: videoIcon
64
- },
65
- {
66
- type: 'PDF',
67
- format: PDF_FORMAT,
68
- formatIcon: pdfIcon
69
- },
70
- {
71
- type: 'PPT',
72
- format: PPT_FORMAT,
73
- formatIcon: pptIcon
74
- },
75
- {
76
- type: 'WORD',
77
- format: WORD_FORMAT,
78
- formatIcon: wordIcon
79
- },
80
- {
81
- type: 'XLS',
82
- format: XLS_FORMAT,
83
- formatIcon: xlsIcon
84
- },
85
- {
86
- type: 'TXT',
87
- format: TXT_FORMAT,
88
- formatIcon: txtIcon
89
- },
90
- {
91
- type: 'ZIP',
92
- format: ZIP_FORMAT,
93
- formatIcon: zipIcon
94
- }
95
- ]
@@ -1,16 +0,0 @@
1
- import { FILE_TYPE, IMG_FORMAT, VIDEO_FORMAT } from './enum.js'
2
-
3
- // 根据文件拓展名获取文件类型
4
- export const getFileTypeByExtendName = (extendName) => {
5
- if (!extendName) {
6
- return FILE_TYPE.UNKNOWN
7
- }
8
- const newExtendName = extendName.toLowerCase()
9
- const isImgType = IMG_FORMAT.includes(newExtendName)
10
- const isVideoType = VIDEO_FORMAT.includes(newExtendName)
11
- return (
12
- (isImgType && FILE_TYPE.IMG) ||
13
- (isVideoType && FILE_TYPE.VIDEO) ||
14
- FILE_TYPE.OTHER
15
- )
16
- }
@@ -1,7 +0,0 @@
1
- import HrFullScreen from './src/index.vue'
2
-
3
- HrFullScreen.install = function (Vue) {
4
- Vue.component(HrFullScreen.name, HrFullScreen)
5
- }
6
-
7
- export default HrFullScreen
@@ -1,117 +0,0 @@
1
- <script>
2
- export default {
3
- name: 'HrFullScreen',
4
- props: {
5
- show: {
6
- type: Boolean,
7
- default: false
8
- },
9
- title: {
10
- type: String,
11
- default: '标题'
12
- }
13
- },
14
- computed: {
15
- showPop: {
16
- get () {
17
- return this.show
18
- },
19
- set (val) {
20
- this.$emit('update:show', val)
21
- }
22
- },
23
- },
24
- methods: {
25
- changePopup (val) {
26
- this.showPop = val
27
- }
28
- },
29
- render () {
30
- const myHeader = () => {
31
- return (
32
- <div class="screen-title">
33
- <div onClick={() => this.showPop = false} class="title-left">
34
- <div class="title-back">
35
- <ks-icon name="arrow-left" />
36
- </div>
37
- <div class="title-text">{this.title}</div>
38
- </div>
39
- </div>
40
- )
41
- }
42
- const popupAttrs = {
43
- props: {
44
- value: this.showPop,
45
- overlay: false,
46
- duration: 0,
47
- getContainer: 'body'
48
- },
49
- style: {
50
- width: '100%',
51
- height: '100%'
52
- },
53
- on: {
54
- input: this.changePopup,
55
- },
56
- }
57
- return (
58
- <van-popup {...popupAttrs}>
59
- <div class="hr-full-screen">
60
- {myHeader()}
61
- <div class="page">{this.$slots.default}</div>
62
- </div>
63
- </van-popup>
64
- )
65
- }
66
- }
67
- </script>
68
- <style lang="less" scoped>
69
- .hr-full-screen {
70
- width: 100%;
71
- height: 100%;
72
- overflow: hidden;
73
- display: flex;
74
- flex-direction: column;
75
- background: #7972fe;
76
- .screen-title {
77
- padding-left: 16px;
78
- padding-bottom: 8px;
79
- box-sizing: content-box;
80
- display: flex;
81
- background: #7972fe;
82
- height: 44px;
83
- line-height: 44px;
84
- color: #fff;
85
- .title-left {
86
- display: flex;
87
- .title-back {
88
- font-size: 22px;
89
- font-weight: 500;
90
- display: flex;
91
- align-items: center;
92
- }
93
- .title-text {
94
- margin-left: 4px;
95
- font-size: 16px;
96
- font-weight: 500;
97
- }
98
- }
99
- }
100
- .page {
101
- flex: 1;
102
- display: flex;
103
- flex-direction: column;
104
- background-color: #ffffff;
105
- color: #03050d;
106
- min-height: calc(100% - 52px);
107
- }
108
- }
109
- .ios .hr-full-screen .screen-title,
110
- .ipx .hr-full-screen .screen-title {
111
- padding-top: 44px !important;
112
- }
113
- .ios .hr-full-screen .page,
114
- .ipx .hr-full-screen .page {
115
- min-height: calc(100% - 96px) !important;
116
- }
117
- </style>
@@ -1,3 +0,0 @@
1
- import HrImgList from './src/index.vue'
2
-
3
- export default HrImgList
@@ -1,144 +0,0 @@
1
- <template>
2
- <HrPopup :show="isShowPopup"
3
- closeable
4
- position="bottom"
5
- safe-area-inset-bottom
6
- v-bind="$attrs"
7
- :title="title"
8
- @close="close">
9
- <div ref="hrImgListRef"
10
- class="hr-img-list">
11
- <HrElasticityBox v-if="showImgList.length > 1"
12
- :lineNumber="2"
13
- :margin="6">
14
- <HrElasticityBoxItem v-for="(item, index) in showImgList"
15
- :key="index"
16
- :index="index">
17
- <div class="img-item"
18
- :class="{'item-single': showImgList.length === 1, 'active': checksIndex.includes(index)}"
19
- @click="() => preview(index)">
20
- <img :src="item.url"
21
- alt="" />
22
- <slot :item="item"
23
- :index="index"></slot>
24
- </div>
25
- </HrElasticityBoxItem>
26
- </HrElasticityBox>
27
- <template v-else>
28
- <div v-for="(item, index) in showImgList"
29
- :key="index"
30
- class="img-item"
31
- :class="{'item-single': showImgList.length === 1, 'active': checksIndex.includes(index)}"
32
- @click="() => preview(index)">
33
- <img :src="item.url"
34
- alt="" />
35
- <slot :item="item"
36
- :index="index"></slot>
37
- </div>
38
- </template>
39
- <slot v-if="!showImgList.length"
40
- name="no-data"></slot>
41
- </div>
42
- <slot name="list-footer"></slot>
43
- </HrPopup>
44
- </template>
45
-
46
- <script>
47
- import HrPopup from '../../hr-popup'
48
- import HrElasticityBox from '../../hr-elasticity-box'
49
- import HrElasticityBoxItem from '../../hr-elasticity-box/src/elasticity-box-item.vue'
50
-
51
- export default {
52
- name: 'HrImgList',
53
- components: {
54
- HrPopup,
55
- HrElasticityBox,
56
- HrElasticityBoxItem
57
- },
58
- props: {
59
- show: {
60
- type: Boolean,
61
- default: false
62
- },
63
- // 标题
64
- title: String,
65
- // 图片列表
66
- imgList: {
67
- type: Array,
68
- default: () => ([])
69
- },
70
- // 需要添加选中效果的索引集合
71
- checksIndex: {
72
- type: Array,
73
- default: () => ([])
74
- }
75
- },
76
- data () {
77
- return {
78
- isShowPopup: false,
79
- showImgList: [],
80
- }
81
- },
82
- watch: {
83
- show: {
84
- handler (val) {
85
- this.isShowPopup = val
86
- },
87
- immediate: true
88
- },
89
- imgList: {
90
- handler (val) {
91
- this.showImgList = val || []
92
- },
93
- deep: true,
94
- immediate: true
95
- },
96
- },
97
- methods: {
98
- preview (index) {
99
- const images = this.showImgList.map(item => item.url)
100
- vant.ImagePreview({
101
- images,
102
- startPosition: index
103
- })
104
- },
105
- close () {
106
- this.isShowPopup = false
107
- this.$emit('close')
108
- },
109
- }
110
- }
111
- </script>
112
-
113
- <style lang="less" scoped>
114
- .hr-img-list {
115
- max-height: 70vh;
116
- overflow: auto;
117
- display: flex;
118
- flex-wrap: wrap;
119
- padding: 10px;
120
- .img-item {
121
- position: relative;
122
- width: 100%;
123
- height: 100%;
124
- // width: calc(50% - 16px);
125
- // height: 200px;
126
- // height: calc(50vw - 16px - 20px);
127
- margin: 6px;
128
- overflow: hidden;
129
- border-radius: 8px;
130
- border: 2px solid transparent;
131
- &.item-single {
132
- width: 100%;
133
- height: auto;
134
- }
135
- &.active {
136
- border: 2px solid #7972fe;
137
- }
138
- img {
139
- width: 100%;
140
- min-height: 100%;
141
- }
142
- }
143
- }
144
- </style>
@@ -1,7 +0,0 @@
1
- import HrInfoCard from './src/index.vue'
2
-
3
- HrInfoCard.install = function (Vue) {
4
- Vue.component(HrInfoCard.name, HrInfoCard)
5
- }
6
-
7
- export default HrInfoCard