kz-ui-base 1.0.2 → 1.0.4

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 (283) hide show
  1. package/package.json +1 -1
  2. package/common/package-lock.json +0 -18
  3. package/common/package.json +0 -51
  4. package/common/src/api/common/cacher.js +0 -15
  5. package/common/src/api/common/common.js +0 -299
  6. package/common/src/api/common/material.js +0 -71
  7. package/common/src/api/login.js +0 -103
  8. package/common/src/api/menu.js +0 -18
  9. package/common/src/assets/401_images/401.gif +0 -0
  10. package/common/src/assets/404_images/404.png +0 -0
  11. package/common/src/assets/404_images/404_cloud.png +0 -0
  12. package/common/src/assets/icons/file-config.png +0 -0
  13. package/common/src/assets/icons/file-doc.png +0 -0
  14. package/common/src/assets/icons/file-exe.png +0 -0
  15. package/common/src/assets/icons/file-ini.png +0 -0
  16. package/common/src/assets/icons/file-jpg.png +0 -0
  17. package/common/src/assets/icons/file-mpg.png +0 -0
  18. package/common/src/assets/icons/file-none.png +0 -0
  19. package/common/src/assets/icons/file-pdf.png +0 -0
  20. package/common/src/assets/icons/file-png.png +0 -0
  21. package/common/src/assets/icons/file-ppt.png +0 -0
  22. package/common/src/assets/icons/file-rar.png +0 -0
  23. package/common/src/assets/icons/file-txt.png +0 -0
  24. package/common/src/assets/icons/file-wav.png +0 -0
  25. package/common/src/assets/icons/file-xls.png +0 -0
  26. package/common/src/assets/icons/index.js +0 -9
  27. package/common/src/assets/icons/svg/404.svg +0 -1
  28. package/common/src/assets/icons/svg/bug.svg +0 -1
  29. package/common/src/assets/icons/svg/build.svg +0 -1
  30. package/common/src/assets/icons/svg/button.svg +0 -1
  31. package/common/src/assets/icons/svg/cascader.svg +0 -1
  32. package/common/src/assets/icons/svg/chart.svg +0 -1
  33. package/common/src/assets/icons/svg/checkbox.svg +0 -1
  34. package/common/src/assets/icons/svg/client.svg +0 -1
  35. package/common/src/assets/icons/svg/clipboard.svg +0 -1
  36. package/common/src/assets/icons/svg/code.svg +0 -1
  37. package/common/src/assets/icons/svg/color.svg +0 -1
  38. package/common/src/assets/icons/svg/component.svg +0 -1
  39. package/common/src/assets/icons/svg/dashboard.svg +0 -1
  40. package/common/src/assets/icons/svg/date-range.svg +0 -1
  41. package/common/src/assets/icons/svg/date.svg +0 -1
  42. package/common/src/assets/icons/svg/dict.svg +0 -1
  43. package/common/src/assets/icons/svg/documentation.svg +0 -1
  44. package/common/src/assets/icons/svg/download.svg +0 -1
  45. package/common/src/assets/icons/svg/drag.svg +0 -1
  46. package/common/src/assets/icons/svg/druid.svg +0 -1
  47. package/common/src/assets/icons/svg/edit.svg +0 -1
  48. package/common/src/assets/icons/svg/education.svg +0 -1
  49. package/common/src/assets/icons/svg/email.svg +0 -1
  50. package/common/src/assets/icons/svg/example.svg +0 -1
  51. package/common/src/assets/icons/svg/excel.svg +0 -1
  52. package/common/src/assets/icons/svg/exit-fullscreen.svg +0 -1
  53. package/common/src/assets/icons/svg/eye-open.svg +0 -1
  54. package/common/src/assets/icons/svg/eye.svg +0 -1
  55. package/common/src/assets/icons/svg/form.svg +0 -1
  56. package/common/src/assets/icons/svg/fullscreen.svg +0 -1
  57. package/common/src/assets/icons/svg/github.svg +0 -1
  58. package/common/src/assets/icons/svg/guide.svg +0 -1
  59. package/common/src/assets/icons/svg/icon.svg +0 -1
  60. package/common/src/assets/icons/svg/input.svg +0 -1
  61. package/common/src/assets/icons/svg/international.svg +0 -1
  62. package/common/src/assets/icons/svg/job.svg +0 -1
  63. package/common/src/assets/icons/svg/kz_authority.svg +0 -1
  64. package/common/src/assets/icons/svg/kz_build.svg +0 -1
  65. package/common/src/assets/icons/svg/kz_code.svg +0 -1
  66. package/common/src/assets/icons/svg/kz_config.svg +0 -1
  67. package/common/src/assets/icons/svg/kz_creatTime.svg +0 -1
  68. package/common/src/assets/icons/svg/kz_dept.svg +0 -1
  69. package/common/src/assets/icons/svg/kz_dept_profile.svg +0 -1
  70. package/common/src/assets/icons/svg/kz_dict.svg +0 -1
  71. package/common/src/assets/icons/svg/kz_edit.svg +0 -1
  72. package/common/src/assets/icons/svg/kz_enlarge.svg +0 -1
  73. package/common/src/assets/icons/svg/kz_enterprise.svg +0 -1
  74. package/common/src/assets/icons/svg/kz_fold.svg +0 -2
  75. package/common/src/assets/icons/svg/kz_job.svg +0 -1
  76. package/common/src/assets/icons/svg/kz_layout.svg +0 -1
  77. package/common/src/assets/icons/svg/kz_log.svg +0 -1
  78. package/common/src/assets/icons/svg/kz_log_loginInfo.svg +0 -1
  79. package/common/src/assets/icons/svg/kz_log_operation.svg +0 -1
  80. package/common/src/assets/icons/svg/kz_master-slave.svg +0 -2
  81. package/common/src/assets/icons/svg/kz_menu.svg +0 -1
  82. package/common/src/assets/icons/svg/kz_menu_analyse.svg +0 -22
  83. package/common/src/assets/icons/svg/kz_message.svg +0 -1
  84. package/common/src/assets/icons/svg/kz_monitor.svg +0 -1
  85. package/common/src/assets/icons/svg/kz_nacos.svg +0 -1
  86. package/common/src/assets/icons/svg/kz_narrow.svg +0 -1
  87. package/common/src/assets/icons/svg/kz_notice.svg +0 -2
  88. package/common/src/assets/icons/svg/kz_online.svg +0 -1
  89. package/common/src/assets/icons/svg/kz_open.svg +0 -2
  90. package/common/src/assets/icons/svg/kz_organization.svg +0 -1
  91. package/common/src/assets/icons/svg/kz_post.svg +0 -1
  92. package/common/src/assets/icons/svg/kz_post_profile.svg +0 -1
  93. package/common/src/assets/icons/svg/kz_productCenter.svg +0 -1
  94. package/common/src/assets/icons/svg/kz_rabbit.svg +0 -1
  95. package/common/src/assets/icons/svg/kz_refresh.svg +0 -2
  96. package/common/src/assets/icons/svg/kz_renovation.svg +0 -1
  97. package/common/src/assets/icons/svg/kz_role.svg +0 -1
  98. package/common/src/assets/icons/svg/kz_roleGroup.svg +0 -1
  99. package/common/src/assets/icons/svg/kz_search.svg +0 -1
  100. package/common/src/assets/icons/svg/kz_sentinel.svg +0 -1
  101. package/common/src/assets/icons/svg/kz_server.svg +0 -1
  102. package/common/src/assets/icons/svg/kz_setting.svg +0 -1
  103. package/common/src/assets/icons/svg/kz_sex.svg +0 -1
  104. package/common/src/assets/icons/svg/kz_source.svg +0 -2
  105. package/common/src/assets/icons/svg/kz_strategy.svg +0 -2
  106. package/common/src/assets/icons/svg/kz_swagger.svg +0 -1
  107. package/common/src/assets/icons/svg/kz_system.svg +0 -1
  108. package/common/src/assets/icons/svg/kz_tenant.svg +0 -1
  109. package/common/src/assets/icons/svg/kz_tool.svg +0 -1
  110. package/common/src/assets/icons/svg/kz_user.svg +0 -1
  111. package/common/src/assets/icons/svg/language.svg +0 -1
  112. package/common/src/assets/icons/svg/link.svg +0 -1
  113. package/common/src/assets/icons/svg/list.svg +0 -1
  114. package/common/src/assets/icons/svg/lock.svg +0 -1
  115. package/common/src/assets/icons/svg/log.svg +0 -1
  116. package/common/src/assets/icons/svg/logininfor.svg +0 -1
  117. package/common/src/assets/icons/svg/mes-ad.svg +0 -21
  118. package/common/src/assets/icons/svg/mes-ic.svg +0 -16
  119. package/common/src/assets/icons/svg/mes-mfg-order.svg +0 -22
  120. package/common/src/assets/icons/svg/mes-tm.svg +0 -15
  121. package/common/src/assets/icons/svg/message.svg +0 -1
  122. package/common/src/assets/icons/svg/money.svg +0 -1
  123. package/common/src/assets/icons/svg/monitor.svg +0 -2
  124. package/common/src/assets/icons/svg/nacos.svg +0 -1
  125. package/common/src/assets/icons/svg/nested.svg +0 -1
  126. package/common/src/assets/icons/svg/number.svg +0 -1
  127. package/common/src/assets/icons/svg/online.svg +0 -1
  128. package/common/src/assets/icons/svg/password.svg +0 -1
  129. package/common/src/assets/icons/svg/pdf.svg +0 -1
  130. package/common/src/assets/icons/svg/people.svg +0 -1
  131. package/common/src/assets/icons/svg/peoples.svg +0 -1
  132. package/common/src/assets/icons/svg/phone.svg +0 -1
  133. package/common/src/assets/icons/svg/post.svg +0 -1
  134. package/common/src/assets/icons/svg/qq.svg +0 -1
  135. package/common/src/assets/icons/svg/question.svg +0 -1
  136. package/common/src/assets/icons/svg/radio.svg +0 -1
  137. package/common/src/assets/icons/svg/rate.svg +0 -1
  138. package/common/src/assets/icons/svg/row.svg +0 -1
  139. package/common/src/assets/icons/svg/search.svg +0 -1
  140. package/common/src/assets/icons/svg/select.svg +0 -1
  141. package/common/src/assets/icons/svg/sentinel.svg +0 -1
  142. package/common/src/assets/icons/svg/server.svg +0 -1
  143. package/common/src/assets/icons/svg/shop-call.svg +0 -14
  144. package/common/src/assets/icons/svg/shopping.svg +0 -1
  145. package/common/src/assets/icons/svg/size.svg +0 -1
  146. package/common/src/assets/icons/svg/skill.svg +0 -1
  147. package/common/src/assets/icons/svg/slider.svg +0 -1
  148. package/common/src/assets/icons/svg/star.svg +0 -1
  149. package/common/src/assets/icons/svg/stock-query.svg +0 -14
  150. package/common/src/assets/icons/svg/stock-report.svg +0 -14
  151. package/common/src/assets/icons/svg/stock-take.svg +0 -14
  152. package/common/src/assets/icons/svg/swagger.svg +0 -1
  153. package/common/src/assets/icons/svg/switch.svg +0 -1
  154. package/common/src/assets/icons/svg/system.svg +0 -2
  155. package/common/src/assets/icons/svg/tab.svg +0 -1
  156. package/common/src/assets/icons/svg/table.svg +0 -1
  157. package/common/src/assets/icons/svg/textarea.svg +0 -1
  158. package/common/src/assets/icons/svg/theme.svg +0 -1
  159. package/common/src/assets/icons/svg/time-range.svg +0 -1
  160. package/common/src/assets/icons/svg/time.svg +0 -1
  161. package/common/src/assets/icons/svg/tool.svg +0 -1
  162. package/common/src/assets/icons/svg/tree-table.svg +0 -1
  163. package/common/src/assets/icons/svg/tree.svg +0 -1
  164. package/common/src/assets/icons/svg/upload.svg +0 -1
  165. package/common/src/assets/icons/svg/user.svg +0 -1
  166. package/common/src/assets/icons/svg/validCode.svg +0 -1
  167. package/common/src/assets/icons/svg/wechat.svg +0 -1
  168. package/common/src/assets/icons/svg/xy-cancel.svg +0 -1
  169. package/common/src/assets/icons/svg/xy-choice.svg +0 -1
  170. package/common/src/assets/icons/svg/xy-choice2.svg +0 -31
  171. package/common/src/assets/icons/svg/zip.svg +0 -1
  172. package/common/src/assets/icons/svgo.yml +0 -22
  173. package/common/src/assets/images/dark.svg +0 -39
  174. package/common/src/assets/images/light.svg +0 -39
  175. package/common/src/assets/images/login-background.jpg +0 -0
  176. package/common/src/assets/images/logo.jpg +0 -0
  177. package/common/src/assets/images/profile.jpg +0 -0
  178. package/common/src/assets/images/xy-folder.png +0 -0
  179. package/common/src/assets/images/xy_email.png +0 -0
  180. package/common/src/assets/images/xy_message.png +0 -0
  181. package/common/src/assets/images/xy_notice.png +0 -0
  182. package/common/src/assets/logo/logo.png +0 -0
  183. package/common/src/assets/styles/btn.scss +0 -99
  184. package/common/src/assets/styles/element-ui.scss +0 -84
  185. package/common/src/assets/styles/element-variables.scss +0 -31
  186. package/common/src/assets/styles/index.scss +0 -207
  187. package/common/src/assets/styles/kezhi.scss +0 -100
  188. package/common/src/assets/styles/mixin.scss +0 -66
  189. package/common/src/assets/styles/ruoyi.scss +0 -350
  190. package/common/src/assets/styles/sidebar.scss +0 -185
  191. package/common/src/assets/styles/transition.scss +0 -48
  192. package/common/src/assets/styles/variables.scss +0 -52
  193. package/common/src/components/base/dialog/BaseDialog.vue +0 -140
  194. package/common/src/components/base/dialog/Dialog.js +0 -118
  195. package/common/src/components/base/dialog/dialogSetting.js +0 -65
  196. package/common/src/components/base/dialog/dialogType.js +0 -80
  197. package/common/src/components/base/dialog/index.js +0 -42
  198. package/common/src/components/base/dialog/printDialog.vue +0 -324
  199. package/common/src/components/base/dialog/tableDialog.vue +0 -187
  200. package/common/src/components/base/dialog/uploadDialog.vue +0 -149
  201. package/common/src/components/base/menuTab.js +0 -130
  202. package/common/src/components/basics/Breadcrumb/index.vue +0 -77
  203. package/common/src/components/basics/Crontab/day.vue +0 -179
  204. package/common/src/components/basics/Crontab/hour.vue +0 -122
  205. package/common/src/components/basics/Crontab/index.vue +0 -425
  206. package/common/src/components/basics/Crontab/min.vue +0 -120
  207. package/common/src/components/basics/Crontab/mouth.vue +0 -128
  208. package/common/src/components/basics/Crontab/result.vue +0 -566
  209. package/common/src/components/basics/Crontab/second.vue +0 -133
  210. package/common/src/components/basics/Crontab/week.vue +0 -167
  211. package/common/src/components/basics/Crontab/year.vue +0 -144
  212. package/common/src/components/basics/DictData/index.js +0 -24
  213. package/common/src/components/basics/DictTag/index.vue +0 -52
  214. package/common/src/components/basics/Editor/index.vue +0 -286
  215. package/common/src/components/basics/FileUpload/index.vue +0 -197
  216. package/common/src/components/basics/Hamburger/index.vue +0 -35
  217. package/common/src/components/basics/HeaderSearch/index.vue +0 -206
  218. package/common/src/components/basics/IconSelect/index.vue +0 -84
  219. package/common/src/components/basics/IconSelect/requireIcons.js +0 -10
  220. package/common/src/components/basics/Iframe/index.vue +0 -36
  221. package/common/src/components/basics/ImageUpload/index.vue +0 -204
  222. package/common/src/components/basics/Pagination/index.vue +0 -107
  223. package/common/src/components/basics/PanThumb/index.vue +0 -142
  224. package/common/src/components/basics/ParentView/index.vue +0 -3
  225. package/common/src/components/basics/RightPanel/index.vue +0 -149
  226. package/common/src/components/basics/RightToolbar/index.vue +0 -111
  227. package/common/src/components/basics/Screenfull/index.vue +0 -60
  228. package/common/src/components/basics/SizeSelect/index.vue +0 -60
  229. package/common/src/components/basics/SvgIcon/index.vue +0 -61
  230. package/common/src/components/basics/ThemePicker/index.vue +0 -183
  231. package/common/src/components/basics/TopNav/index.vue +0 -476
  232. package/common/src/components/custom/Editor/index.vue +0 -267
  233. package/common/src/components/custom/FileBox/index.vue +0 -293
  234. package/common/src/components/custom/FileBox/indexTs.vue +0 -280
  235. package/common/src/components/custom/ImageBox/index.vue +0 -208
  236. package/common/src/components/custom/Material/fileNameHelper.js +0 -38
  237. package/common/src/components/custom/Material/index.vue +0 -893
  238. package/common/src/components/custom/Material/indexTs.vue +0 -890
  239. package/common/src/components/custom/Notice/index.vue +0 -244
  240. package/common/src/plugins/auth.js +0 -60
  241. package/common/src/plugins/cache.js +0 -77
  242. package/common/src/plugins/download.js +0 -31
  243. package/common/src/plugins/index.js +0 -82
  244. package/common/src/plugins/modal.js +0 -75
  245. package/common/src/plugins/tab.js +0 -66
  246. package/common/src/utils/auth.js +0 -29
  247. package/common/src/utils/cache/bdCache.js +0 -202
  248. package/common/src/utils/cache/fdCache.js +0 -407
  249. package/common/src/utils/common.js +0 -141
  250. package/common/src/utils/dateHelper.js +0 -122
  251. package/common/src/utils/dialog.js +0 -35
  252. package/common/src/utils/dict/Dict.js +0 -82
  253. package/common/src/utils/dict/DictConverter.js +0 -17
  254. package/common/src/utils/dict/DictData.js +0 -13
  255. package/common/src/utils/dict/DictMeta.js +0 -38
  256. package/common/src/utils/dict/DictOptions.js +0 -51
  257. package/common/src/utils/dict/index.js +0 -33
  258. package/common/src/utils/element.js +0 -49
  259. package/common/src/utils/errorCode.js +0 -6
  260. package/common/src/utils/eventHub.js +0 -3
  261. package/common/src/utils/file.js +0 -38
  262. package/common/src/utils/index.js +0 -390
  263. package/common/src/utils/jsencrypt.js +0 -30
  264. package/common/src/utils/kezhi.js +0 -311
  265. package/common/src/utils/kezhiToolLibrary.js +0 -51
  266. package/common/src/utils/permission.js +0 -51
  267. package/common/src/utils/printService.js +0 -749
  268. package/common/src/utils/request.js +0 -209
  269. package/common/src/utils/ruoyi.js +0 -317
  270. package/common/src/utils/scroll-to.js +0 -58
  271. package/common/src/utils/supers.js +0 -25
  272. package/common/src/utils/utils.js +0 -614
  273. package/common/src/utils/validate.js +0 -105
  274. package/common/src/utils/websoketservice.js +0 -161
  275. package/common/src/utils/zipdownload.js +0 -42
  276. package/common/src/views/authorize.vue +0 -270
  277. package/common/src/views/error/401.vue +0 -88
  278. package/common/src/views/error/404.vue +0 -248
  279. package/common/src/views/login.vue +0 -350
  280. package/common/src/views/register.vue +0 -208
  281. package/common/src/views/sample/dialog/sampleEditDialog.vue +0 -279
  282. package/common/src/views/tenantLogin.vue +0 -331
  283. package/common/vue.config.js +0 -130
@@ -1,890 +0,0 @@
1
- <template>
2
- <div class="">
3
- <el-dialog
4
- class="dialogTop"
5
- :visible.sync="visible"
6
- width="80%"
7
- :close-on-click-modal="false"
8
- :modal="true"
9
- append-to-body
10
- :before-close="handleClose"
11
- >
12
- <template slot="title">
13
- <div class="title-text">
14
- <span class="title-main">添加文件</span
15
- ><span class="title-supplement"
16
- >(只能添加"jpg", "jpeg", "bmp", "png", "gif", "pdf", "doc", "docx",
17
- "md", "xmind", "mp4", "xlsx"
18
- ,"bmp","tif","avi","wmv","xls"大小不超过5M。)</span
19
- >
20
- </div>
21
- </template>
22
- <div class="tabs-card">
23
- <el-tabs
24
- v-model="activeName"
25
- type="card"
26
- tabPosition="left"
27
- class="material"
28
- style="height: 500px"
29
- >
30
- <el-tab-pane label="我的文件" name="first">
31
- <el-container>
32
- <el-header class="container-header">
33
- <el-row :gutter="20" type="flex" justify="space-between">
34
- <el-col :xs="9" :sm="9" :md="9" :lg="9" :xl="9">
35
- <el-row type="flex" justify="space-between">
36
- <el-col>
37
- <el-upload
38
- ref="upload"
39
- :limit="5"
40
- accept=".*"
41
- :action="upload.url"
42
- :headers="upload.headers"
43
- :file-list="upload.fileList"
44
- :data="{ folderId: form.folderId }"
45
- :before-upload="beforeUpload"
46
- :on-progress="handleFileUploadProgress"
47
- :on-success="handleFileSuccess"
48
- :on-error="handleFileError"
49
- :show-file-list="false"
50
- >
51
- <el-button
52
- slot="trigger"
53
- size="medium"
54
- icon="el-icon-upload2"
55
- :loading="upload.isUploading"
56
- >
57
- 直接上传
58
- </el-button>
59
- </el-upload>
60
- </el-col>
61
- <el-col>
62
- <el-button
63
- class="hidden-xs-only"
64
- size="medium"
65
- icon="el-icon-folder-add"
66
- @click="handleAddFolder"
67
- :loading="upload.isUploading"
68
- >新增文件夹
69
- </el-button>
70
- </el-col>
71
- </el-row>
72
- </el-col>
73
- <el-col :xs="4" :sm="4" :md="4" :lg="4" :xl="4" :pull="2">
74
- <el-input
75
- placeholder="搜索所有文件"
76
- v-model="form.folderName"
77
- class="header-search"
78
- @change="searchChange"
79
- >
80
- <i
81
- :class="
82
- search.searchVisible
83
- ? 'el-icon-search el-input__icon'
84
- : 'el-icon-error el-input__icon'
85
- "
86
- slot="suffix"
87
- @click="searchIconClick"
88
- />
89
- </el-input>
90
- </el-col>
91
- </el-row>
92
- </el-header>
93
- <el-main class="container-main">
94
- <el-breadcrumb
95
- separator-class="el-icon-arrow-right"
96
- class="div-breadcrumb"
97
- >
98
- <el-breadcrumb-item
99
- v-for="(item, index) in breadcrumbList"
100
- v-if="breadcrumbList.length > 1"
101
- >
102
- <span
103
- :style="
104
- index < breadcrumbList.length - 1 ? item.cssStyle : null
105
- "
106
- :class="
107
- index < breadcrumbList.length - 1
108
- ? 'breadcrumb-item'
109
- : null
110
- "
111
- @mouseenter="item.cssStyle = 'cursor: pointer;'"
112
- @mouseleave="item.cssStyle = ''"
113
- @click="breadcrumbJump(item, index)"
114
- >{{ item.folderName }}</span
115
- ></el-breadcrumb-item
116
- >
117
- </el-breadcrumb>
118
- <el-scrollbar
119
- style="height: 425px"
120
- :native="false"
121
- wrapStyle=""
122
- wrapClass=""
123
- viewClass=""
124
- viewStyle=""
125
- :noresize="false"
126
- tag="section"
127
- >
128
- <el-row>
129
- <el-col
130
- v-for="(item, index) in materialFolder.children"
131
- style="width: 100px"
132
- >
133
- <div class="material-div">
134
- <div
135
- class="image-div"
136
- @mouseenter="item.hiddenVisible = true"
137
- @mouseleave="item.hiddenVisible = false"
138
- >
139
- <el-image
140
- :class="
141
- item.hiddenVisible === true
142
- ? 'folder-style image-hand'
143
- : 'folder-style'
144
- "
145
- :src="upload.folderImg"
146
- fit="contain"
147
- @click="breadcrumbJump(item, index)"
148
- >
149
- </el-image>
150
- <svg-icon
151
- slot="prefix"
152
- icon-class="xy-cancel"
153
- :class="
154
- item.hiddenVisible
155
- ? 'folder-cancel image-hand'
156
- : 'folder-cancel'
157
- "
158
- v-if="item.hiddenVisible"
159
- @click="imageDelete(0, item, index)"
160
- v-hasPermi="['system:material:remove']"
161
- />
162
- </div>
163
- <div class="image-box">
164
- <el-input
165
- class="image-input"
166
- v-model="item.folderName"
167
- @change="updateMaterialNick(0, item, index)"
168
- ref="ImageNickInput"
169
- size="mini"
170
- >
171
- </el-input>
172
- </div>
173
- </div>
174
- </el-col>
175
- <el-col
176
- v-for="(item, index) in materialFolder.materialList"
177
- style="width: 100px"
178
- >
179
- <div class="material-div">
180
- <div
181
- class="image-div"
182
- @mouseenter="item.hiddenVisible = true"
183
- @mouseleave="item.hiddenVisible = false"
184
- >
185
- <div @click="imageChoiceClick(item, index)">
186
- <el-image
187
- :class="
188
- item.imageChoice === true
189
- ? 'image-style image-border image-hand'
190
- : item.hiddenVisible === true
191
- ? 'image-style image-border image-hand'
192
- : 'image-style'
193
- "
194
- :src="getImageIcon(item.materialUrl)"
195
- fit="contain"
196
- >
197
- </el-image>
198
- <svg-icon
199
- slot="prefix"
200
- icon-class="xy-choice2"
201
- class="image-choice"
202
- v-if="item.imageChoice"
203
- />
204
- </div>
205
- <svg-icon
206
- slot="prefix"
207
- icon-class="xy-cancel"
208
- :class="
209
- item.hiddenVisible
210
- ? 'image-cancel image-hand'
211
- : 'image-cancel'
212
- "
213
- v-if="item.hiddenVisible"
214
- @click="imageDelete(1, item, index)"
215
- v-hasPermi="['system:material:remove']"
216
- />
217
- </div>
218
- <div class="image-box">
219
- <el-input
220
- class="image-input"
221
- :title="item.materialNick"
222
- v-model="item.materialNick"
223
- @change="updateMaterialNick(1, item, index)"
224
- ref="ImageNickInput"
225
- size="mini"
226
- >
227
- </el-input>
228
- </div>
229
- </div>
230
- </el-col>
231
- </el-row>
232
- </el-scrollbar>
233
- </el-main>
234
- </el-container>
235
- </el-tab-pane>
236
- <el-tab-pane label="图库中心" name="second"></el-tab-pane>
237
- </el-tabs>
238
- </div>
239
- <div slot="footer" class="dialog-footer dialogTop-footer">
240
- <el-button class="dialogTop-footer-button" @click="handleClose"
241
- >取 消</el-button
242
- >
243
- <el-button
244
- class="dialogTop-footer-button"
245
- type="primary"
246
- @click="onSubmit"
247
- >确 定</el-button
248
- >
249
- </div>
250
- </el-dialog>
251
-
252
- <!-- <el-dialog
253
- class="minor-dialogTop"
254
- :visible.sync="visible"
255
- width="149px"
256
- :close-on-click-modal="false"
257
- :show-close="false"
258
- :modal="false"
259
- v-if="max > 1"
260
- append-to-body
261
- >
262
- <template slot="title">
263
- <div class="minor-title-text">
264
- <span class="minor-increase"
265
- >待添加({{ choiceList.length }}/{{ max }})</span
266
- >
267
- </div>
268
- </template>
269
- <div class="tabs-card minor-panel">
270
- <el-scrollbar
271
- style="height: 500px"
272
- :native="false"
273
- wrapStyle=""
274
- wrapClass=""
275
- viewClass=""
276
- viewStyle=""
277
- :noresize="false"
278
- tag="section"
279
- >
280
- <div style="margin-bottom: 10px" />
281
- <draggable :list="choiceList" v-bind="$attrs" animation="300">
282
- <div class="choice-div" v-for="(item, index) in choiceList">
283
- <div
284
- class="choice-image-div"
285
- @mouseenter="item.hiddenVisible = true"
286
- @mouseleave="item.hiddenVisible = false"
287
- >
288
- <el-image
289
- :class="
290
- item.hiddenVisible === true
291
- ? 'choice-image-style choice-image-border choice-image-hand'
292
- : 'choice-image-style'
293
- "
294
- :src="item.materialUrl"
295
- fit="contain"
296
- />
297
- <svg-icon
298
- slot="prefix"
299
- icon-class="xy-cancel"
300
- :class="
301
- item.hiddenVisible
302
- ? 'choice-image-cancel choice-image-hand'
303
- : 'choice-image-cancel'
304
- "
305
- v-if="item.hiddenVisible"
306
- @click="imageDeselectClick(item, index)"
307
- />
308
- </div>
309
- </div>
310
- </draggable>
311
- <div style="margin-top: 10px" />
312
- </el-scrollbar>
313
- </div>
314
- <div slot="footer" class="dialog-footer minor-dialog-footer"></div>
315
- </el-dialog> -->
316
- </div>
317
- </template>
318
-
319
- <script lang="ts">
320
- import {
321
- Component,
322
- Prop,
323
- Vue,
324
- Watch,
325
- Emit,
326
- Mixins,
327
- } from "vue-property-decorator";
328
- import {
329
- listMaterial,
330
- addFolder,
331
- delFolder,
332
- delMaterial,
333
- parentFolder,
334
- updateFolder,
335
- updateMaterial,
336
- } from "../../../api/common/material";
337
- import { getToken } from "../../../utils/auth";
338
- import { getImageIcon } from "./fileNameHelper";
339
- // import folderImg from "../../../assets/images/xy-folder.png";
340
- import "~../../element-ui/lib/theme-chalk/display.css";
341
- import draggable from "~../../vuedraggable";
342
-
343
- @Component({
344
- components: {
345
- draggable,
346
- },
347
- })
348
- export default class material extends Vue {
349
- // model: {
350
- // prop: "list",
351
- // event: "change",
352
- // }
353
- @Prop({
354
- default: () => {
355
- return [];
356
- },
357
- })
358
- readonly list: {}[];
359
- @Prop({ default: false }) readonly visible!: boolean;
360
- @Prop({ default: 1 }) readonly max!: number;
361
- @Prop({ default: false }) readonly clear!: boolean;
362
- //活跃单元
363
- public activeName = "first";
364
- //list接收转换参数
365
- public imageList = [];
366
- // 上传参数
367
- public upload = {
368
- // 是否禁用上传
369
- isUploading: false,
370
- // 设置上传的请求头部
371
- headers: { Authorization: "Bearer " + getToken() },
372
- // 上传的地址
373
- url: process.env.VUE_APP_BASE_API + "/system/material/upload",
374
- // 上传的文件列表
375
- fileList: [],
376
- //白名单
377
- whiteList: [
378
- "jpg",
379
- "jpeg",
380
- "bmp",
381
- "png",
382
- "gif",
383
- "pdf",
384
- "doc",
385
- "docx",
386
- "md",
387
- "xmind",
388
- "mp4",
389
- "xlsx",
390
- "bmp",
391
- "tif",
392
- "avi",
393
- "wmv",
394
- "xls",
395
- ],
396
- //文件夹位置
397
- // folderImg: folderImg,
398
- };
399
- public search = {
400
- searchVisible: true,
401
- hiddenVisible: false,
402
- };
403
- public materialFolder = {
404
- children: [],
405
- materialFolder: [],
406
- materialList: [],
407
- };
408
- public choiceList = [];
409
- public breadcrumbList = [];
410
- public form = {
411
- folderId: 0,
412
- folderName: "",
413
- };
414
- public currentItem = { imageChoice: {} };
415
-
416
- mounted() {
417
- this.init();
418
- }
419
-
420
- @Watch("list")
421
- watchlist(val, oldVal) {
422
- this.init();
423
- }
424
-
425
- public getImageIcon = getImageIcon;
426
- /** 初始化方法 */
427
- public init() {
428
- this.creatChoiceList();
429
- this.getList();
430
- }
431
- public creatChoiceList() {
432
- this.choiceList = [];
433
- this.imageList = JSON.parse(JSON.stringify(this.list));
434
- if (this.list !== null && this.clear !== true) {
435
- for (let i = 0; i < this.imageList.length; i++) {
436
- this.choiceList.push({
437
- materialId: this.imageList[i].materialId,
438
- materialUrl: this.imageList[i].materialUrl,
439
- materialOriginalUrl: this.imageList[i].materialOriginalUrl,
440
- hiddenVisible: false,
441
- });
442
- }
443
- }
444
- }
445
- /** 查询素材信息列表 */
446
- public getList() {
447
- listMaterial(this.form).then((response) => {
448
- this.materialFolder = response.data;
449
- for (let i = 0; i < this.choiceList.length; i++) {
450
- for (let j = 0; j < this.materialFolder.materialList.length; j++) {
451
- if (
452
- this.choiceList[i].materialId ===
453
- this.materialFolder.materialList[j].materialId
454
- ) {
455
- this.materialFolder.materialList[j].imageChoice = true;
456
- }
457
- }
458
- }
459
- });
460
- parentFolder(this.form).then((response) => {
461
- this.breadcrumbList = response.data;
462
- });
463
- }
464
- /** 新建文件夹 */
465
- public handleAddFolder() {
466
- this.upload.isUploading = true;
467
- addFolder(this.form).then((response) => {
468
- (this as any).msgSuccess("新增成功");
469
- this.getList();
470
- this.upload.isUploading = false;
471
- });
472
- }
473
- /** 搜索内容变动进行查询 */
474
- public searchChange() {
475
- this.search.searchVisible = this.form.folderName === "";
476
- this.getList();
477
- }
478
- /** true 搜索/false 重置 */
479
- public searchIconClick() {
480
- if (this.search.searchVisible) {
481
- this.getList();
482
- } else {
483
- this.form.folderName = null;
484
- this.getList();
485
- this.search.searchVisible = true;
486
- }
487
- }
488
- public breadcrumbJump(item, index) {
489
- this.form.folderName = null;
490
- this.form.folderId = item.folderId;
491
- this.getList();
492
- }
493
- public imageChoiceClick(item, index) {
494
- //取消选择
495
- if (item.imageChoice) {
496
- for (let i = 0; i < this.choiceList.length; i++) {
497
- if (this.choiceList[i].materialId === item.materialId) {
498
- this.choiceList.splice(i, 1);
499
- }
500
- }
501
- item.imageChoice = false;
502
- } //选择
503
- else {
504
- if (this.max === 1) {
505
- this.currentItem.imageChoice = false;
506
- for (let i = 0; i < this.choiceList.length; i++) {
507
- this.choiceList.splice(i, 1);
508
- }
509
- }
510
- if (this.choiceList.length < this.max) {
511
- this.choiceList.push({
512
- materialId: item.materialId,
513
- materialNick: item.materialNick,
514
- materialUrl: item.materialUrl,
515
- materialOriginalUrl: item.materialOriginalUrl,
516
- hiddenVisible: false,
517
- });
518
- item.imageChoice = true;
519
- this.currentItem = item;
520
- }
521
- }
522
- }
523
- public imageDeselectClick(item, index) {
524
- for (let i = 0; i < this.choiceList.length; i++) {
525
- if (this.choiceList[i].materialId === item.materialId) {
526
- this.choiceList.splice(i, 1);
527
- }
528
- }
529
- for (let i = 0; i < this.materialFolder.materialList.length; i++) {
530
- if (this.materialFolder.materialList[i].materialId === item.materialId) {
531
- this.materialFolder.materialList[i].imageChoice = false;
532
- }
533
- }
534
- }
535
- /** type 0文件夹 1图片 */
536
- public updateMaterialNick(type, item, index) {
537
- if (type === 0) {
538
- updateFolder(item).then((response) => {
539
- (this as any).msgSuccess("修改成功");
540
- this.getList();
541
- });
542
- } else if (type === 1) {
543
- updateMaterial(item).then((response) => {
544
- (this as any).msgSuccess("修改成功");
545
- this.getList();
546
- });
547
- }
548
- }
549
- /** type 0文件夹 1图片 */
550
- public imageDelete(type, item, index) {
551
- (this as any)
552
- .$confirm(
553
- type === 0
554
- ? "您确定将该文件夹以及该文件夹内的所有文件放入回收站吗?"
555
- : "将文件放入回收站会影响使用该文件的地方,确定放入回收站吗?",
556
- "提示",
557
- {
558
- confirmButtonText: "确定",
559
- cancelButtonText: "取消",
560
- type: "warning",
561
- center: true,
562
- }
563
- )
564
- .then(function () {
565
- if (type === 0) {
566
- return delFolder(item.folderId);
567
- } else if (type === 1) {
568
- return delMaterial(item.materialId);
569
- }
570
- })
571
- .then(() => {
572
- this.getList();
573
- (this as any).$message({
574
- type: "success",
575
- message: "删除成功!",
576
- });
577
- })
578
- .catch(() => {
579
- (this as any).$message({
580
- type: "info",
581
- message: "已取消删除",
582
- });
583
- });
584
- }
585
- /** 上传文件之前 */
586
- public beforeUpload(file) {
587
- const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
588
- if (this.upload.whiteList.indexOf(fileSuffix) === -1) {
589
- (this as any).$message({
590
- message: "您上传的文件暂不支持,请联系管理员",
591
- type: "warning",
592
- });
593
- return false;
594
- }
595
- const isLt2M = file.size / 1024 / 1024 < 100;
596
- if (!isLt2M) {
597
- (this as any).$message({
598
- message: "上传文件大小不能超过 100MB",
599
- type: "warning",
600
- });
601
- return false;
602
- }
603
- return false;
604
- }
605
- /** 文件上传中处理 */
606
- public handleFileUploadProgress(event, file, fileList) {
607
- this.upload.isUploading = true;
608
- }
609
- /** 文件上传成功处理 */
610
- public handleFileSuccess(response, file, fileList) {
611
- this.upload.fileList = [];
612
- this.upload.isUploading = false;
613
- if (response.code != 200) {
614
- (this as any).$message.error("上传失败:" + response.msg);
615
- } else {
616
- (this as any).$message({
617
- message: "上传成功!",
618
- type: "success",
619
- });
620
- }
621
- this.getList();
622
- }
623
- /** 文件上传失败处理 */
624
- public handleFileError(err, file, fileList) {
625
- this.upload.fileList = [];
626
- this.upload.isUploading = false;
627
- (this as any).$message.error("上传失败:" + err);
628
- }
629
- /** 确定 */
630
- public onSubmit() {
631
- this.imageList = [];
632
- for (let i = 0; i < this.choiceList.length; i++) {
633
- this.imageList.push({
634
- materialId: this.choiceList[i].materialId,
635
- materialNick: this.choiceList[i].materialNick,
636
- materialUrl: this.choiceList[i].materialUrl,
637
- materialOriginalUrl: this.choiceList[i].materialOriginalUrl,
638
- hiddenVisible: false,
639
- });
640
- }
641
- this.$emit("change", JSON.parse(JSON.stringify(this.imageList)));
642
- this.$emit("update:visible", false);
643
- }
644
- /** 关闭 */
645
- public handleClose(done) {
646
- this.$emit("update:visible", false);
647
- }
648
- }
649
- </script>
650
-
651
- <style lang="scss" scoped>
652
- .title-text {
653
- text-align: left;
654
- height: 10px;
655
-
656
- .title-main {
657
- font-size: 16px;
658
- color: #333333;
659
- }
660
-
661
- .title-supplement {
662
- font-size: 12px;
663
- color: #666666;
664
- }
665
- }
666
-
667
- .dialogTop {
668
- // top: 9vh;
669
- left: 22%;
670
- @media screen and (max-width: 1920px) {
671
- left: 22%;
672
- }
673
- @media screen and (min-width: 1921px) and (max-width: 2560px) {
674
- left: 30%;
675
- }
676
- @media screen and (min-width: 2561px) {
677
- left: 38%;
678
- }
679
- position: fixed;
680
- }
681
-
682
- .minor-dialogTop {
683
- top: 9vh;
684
- left: calc(22% + 960px);
685
- @media screen and (max-width: 1920px) {
686
- left: calc(22% + 960px);
687
- }
688
- @media screen and (min-width: 1921px) and (max-width: 2560px) {
689
- left: calc(30% + 960px);
690
- }
691
- @media screen and (min-width: 2561px) {
692
- left: calc(38% + 960px);
693
- }
694
- position: fixed;
695
-
696
- .minor-title-text {
697
- text-align: center;
698
- height: 10px;
699
-
700
- .minor-increase {
701
- font-size: 12px;
702
- color: #000000;
703
- text-align: center;
704
- font-family: "Helvetica Neue", Helvetica, "PingFang SC",
705
- "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
706
- }
707
- }
708
-
709
- .minor-panel {
710
- //width: auto;
711
- border-bottom: 1px solid #e4e7ed;
712
-
713
- .choice-div {
714
- margin: 10px 38px;
715
-
716
- .choice-image-div {
717
- width: 70px;
718
- height: 70px;
719
- position: relative;
720
-
721
- .choice-image-style {
722
- width: 70px;
723
- height: 70px;
724
- border: 1px solid #e4e7ed;
725
- background-color: #ffffff;
726
- }
727
-
728
- .choice-image-border {
729
- border: 1px solid #5874d8;
730
- }
731
-
732
- .choice-image-hand {
733
- cursor: pointer; //鼠标变手
734
- }
735
-
736
- .choice-image-cancel {
737
- position: absolute;
738
- width: 18px;
739
- height: 18px;
740
- top: -8px;
741
- right: -8px;
742
- }
743
- }
744
- }
745
- }
746
-
747
- .minor-dialog-footer {
748
- height: 37px;
749
- }
750
- }
751
-
752
- .container-header {
753
- padding-top: 20px;
754
-
755
- .header-search {
756
- width: 162px;
757
- }
758
- }
759
-
760
- .dialogTop-footer {
761
- text-align: center;
762
-
763
- .dialogTop-footer-button {
764
- position: relative;
765
- margin: 0 25px 0 25px;
766
- top: -10px;
767
- }
768
- }
769
-
770
- .container-main {
771
- .div-breadcrumb {
772
- margin: 6px 0 11px 0;
773
- }
774
-
775
- .breadcrumb-item {
776
- color: #557ce1;
777
- }
778
-
779
- .material-div {
780
- margin: 10px 40px 20px 0;
781
- }
782
-
783
- .image-div {
784
- width: 82px;
785
- height: 82px;
786
- position: relative;
787
-
788
- .image-style {
789
- width: 82px;
790
- height: 82px;
791
- border: 1px solid #e4e7ed;
792
- background-color: #f3f3f3;
793
- }
794
-
795
- .folder-style {
796
- width: 82px;
797
- height: 82px;
798
- }
799
-
800
- .image-border {
801
- border: 1px solid #5874d8;
802
- }
803
-
804
- .image-hand {
805
- cursor: pointer; //鼠标变手
806
- }
807
-
808
- .image-choice {
809
- position: absolute;
810
- width: 28px;
811
- height: 28px;
812
- top: 54px;
813
- right: 0;
814
- }
815
-
816
- .folder-cancel {
817
- position: absolute;
818
- width: 18px;
819
- height: 18px;
820
- top: 0;
821
- right: -6px;
822
- }
823
-
824
- .image-cancel {
825
- position: absolute;
826
- width: 18px;
827
- height: 18px;
828
- top: -8px;
829
- right: -8px;
830
- }
831
- }
832
-
833
- .image-box {
834
- margin-top: 5px;
835
-
836
- .image-input {
837
- width: 82px;
838
- vertical-align: bottom;
839
- }
840
- }
841
- }
842
-
843
- .item {
844
- margin-top: 10px;
845
- margin-right: 40px;
846
- }
847
- </style>
848
-
849
- <style scoped>
850
- .image-box >>> .el-input--mini .el-input__inner {
851
- height: 19px !important;
852
- line-height: 19px !important;
853
- }
854
-
855
- .image-box >>> .el-input__inner {
856
- padding: 0 !important;
857
- border: 1px solid #ffffff !important;
858
- }
859
-
860
- .image-box >>> .el-input__inner:focus {
861
- border-color: #fe714b !important;
862
- }
863
-
864
- .image-box >>> .el-input__inner:hover {
865
- border-color: #5874d8 !important;
866
- }
867
-
868
- .image-box >>> input {
869
- text-align: center !important;
870
- }
871
-
872
- .minor-panel >>> .el-scrollbar__wrap {
873
- overflow-x: hidden;
874
- }
875
-
876
- .dialogTop >>> .el-dialog {
877
- margin-left: 0 !important;
878
- margin-right: 0 !important;
879
- }
880
-
881
- .material >>> .el-tabs__item {
882
- height: 66px;
883
- line-height: 66px;
884
- }
885
-
886
- .minor-dialogTop >>> .el-dialog {
887
- margin-left: 0 !important;
888
- margin-right: 0 !important;
889
- }
890
- </style>