_fileId.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. <template>
  2. <div class="page">
  3. <div class="page-top flex flex-col justify-center items-center">
  4. <img
  5. class="logo"
  6. src="https://static.caimei365.com/www/authentic/pc/ldm-logo-rect.png"
  7. />
  8. <div class="name mt-2">
  9. Bring you into a new era<br />
  10. of high-tech non-invasive beauty care
  11. </div>
  12. </div>
  13. <div class="page-content">
  14. <!-- 面包屑 -->
  15. <el-breadcrumb separator-class="el-icon-arrow-right">
  16. <el-breadcrumb-item :to="{ path: `${routePrefix}/docs/0` }"
  17. >全部文件</el-breadcrumb-item
  18. >
  19. <template v-for="(item, index) in crumbList">
  20. <template v-if="index === crumbList.length - 1">
  21. <el-breadcrumb-item :key="item.id">
  22. <span class="cell">{{ item.fileName }}</span>
  23. </el-breadcrumb-item>
  24. </template>
  25. <template v-else>
  26. <el-breadcrumb-item
  27. :key="item.id"
  28. :to="{ path: `${routePrefix}/docs/${item.id}` }"
  29. >
  30. <span>{{ item.fileName | crumbFormat }}</span>
  31. </el-breadcrumb-item>
  32. </template>
  33. </template>
  34. </el-breadcrumb>
  35. <!-- 列表 -->
  36. <div class="list-header">
  37. <div class="row">
  38. <div class="col">文件名</div>
  39. <div class="col">时间</div>
  40. <div class="col">大小</div>
  41. <div class="col">操作</div>
  42. </div>
  43. </div>
  44. <div class="list-body">
  45. <div class="row" v-for="item in list" :key="item.id">
  46. <div class="section pc">
  47. <div class="col">
  48. <doc-icon :type="item.fileType" :src="item.screenshot" />
  49. <span
  50. class="file-name"
  51. @click="onRowClick(item)"
  52. v-text="item.fileName"
  53. ></span>
  54. </div>
  55. <div class="col">{{ item.saveTime | dateFormat }}</div>
  56. <div class="col">
  57. <span v-if="item.packageType > 0">{{
  58. item.fileSize | fileSize
  59. }}</span>
  60. <span v-else>-</span>
  61. </div>
  62. <div class="col control">
  63. <div class="download" @click="onDownload(item, $event)"></div>
  64. </div>
  65. </div>
  66. <div class="section mobile">
  67. <div class="col file-cover">
  68. <doc-icon :type="item.fileType" :src="item.screenshot" />
  69. </div>
  70. <div class="col file-content" @click="onRowClick(item)">
  71. <div class="file-name" v-if="item.fileType === 'article'">
  72. {{ item.fileName | fileNameFormat }}
  73. </div>
  74. <div class="file-name" v-else>{{ item.fileName }}</div>
  75. <div class="file-info">
  76. <span class="date">{{ item.saveTime | dateFormat }}</span>
  77. <span class="size">
  78. <span v-if="item.packageType > 0">{{
  79. item.fileSize | fileSize
  80. }}</span>
  81. <span v-else>-</span>
  82. </span>
  83. </div>
  84. </div>
  85. <div class="col control">
  86. <div class="download" @click="onDownload(item, $event)"></div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </template>
  94. <script>
  95. import fileListMixin from '@/mixins/fileList'
  96. export default {
  97. layout: 'app-ldm',
  98. mixins: [fileListMixin],
  99. }
  100. </script>
  101. <style lang="scss" scoped>
  102. // pc 端
  103. @media screen and (min-width: 768px) {
  104. ::v-deep {
  105. .el-breadcrumb {
  106. white-space: nowrap;
  107. overflow-y: scroll;
  108. padding-bottom: 16px;
  109. .el-breadcrumb__item {
  110. float: unset !important;
  111. }
  112. }
  113. }
  114. .page {
  115. margin-bottom: 16px;
  116. }
  117. .page-top {
  118. height: 466px;
  119. .logo {
  120. height: 61px;
  121. width: 311px;
  122. display: block;
  123. background: #fff;
  124. }
  125. .name {
  126. font-size: 19px;
  127. color: #221815;
  128. margin-top: 80px;
  129. text-align: center;
  130. line-height: 36px;
  131. text-transform: uppercase;
  132. }
  133. }
  134. .page-content {
  135. width: 1000px;
  136. margin: 0 auto;
  137. background-color: #fff;
  138. margin-top: 16px;
  139. box-sizing: border-box;
  140. overflow: hidden;
  141. padding: 32px 0;
  142. .el-breadcrumb {
  143. margin: 0 24px 32px;
  144. }
  145. .list-header,
  146. .list-body {
  147. font-size: 14px;
  148. color: #282828;
  149. .col {
  150. &:nth-child(1) {
  151. flex: 1;
  152. }
  153. &:nth-child(2),
  154. &:nth-child(3),
  155. &:nth-child(4) {
  156. width: 120px;
  157. text-align: center;
  158. }
  159. }
  160. }
  161. .list-header {
  162. .row {
  163. display: flex;
  164. justify-content: space-between;
  165. padding: 0 24px 16px;
  166. }
  167. }
  168. .list-body {
  169. .row {
  170. line-height: 70px;
  171. color: #666666;
  172. padding: 0 24px;
  173. transition: all 0.4s;
  174. &:hover {
  175. background: #fff1f2;
  176. }
  177. .section {
  178. display: flex;
  179. justify-content: space-between;
  180. border-top: 1px solid #f7f7f7;
  181. &.mobile {
  182. display: none;
  183. }
  184. }
  185. img {
  186. display: inline-block;
  187. width: 32px;
  188. height: 32px;
  189. background: #eee;
  190. margin-right: 24px;
  191. }
  192. .file-name {
  193. cursor: pointer;
  194. transition: all 0.4s;
  195. margin-left: 24px;
  196. &:hover {
  197. color: #bc1724;
  198. }
  199. }
  200. .control {
  201. display: flex;
  202. justify-content: center;
  203. align-items: center;
  204. .download {
  205. display: block;
  206. width: 24px;
  207. height: 24px;
  208. background: url(~assets/theme-images/common/pc-icon-download.png)
  209. no-repeat center;
  210. background-size: 24px;
  211. margin: 0 auto;
  212. cursor: pointer;
  213. &:hover {
  214. background-image: url(~assets/theme-images/common/pc-icon-download-hover.png);
  215. }
  216. }
  217. }
  218. }
  219. }
  220. }
  221. }
  222. // 移动 端
  223. @media screen and (max-width: 768px) {
  224. ::v-deep {
  225. .el-breadcrumb {
  226. white-space: nowrap;
  227. overflow-y: scroll;
  228. padding-bottom: 2.4vw;
  229. .el-breadcrumb__item {
  230. float: unset !important;
  231. }
  232. }
  233. }
  234. .page-top {
  235. height: 76.4vw;
  236. .logo {
  237. height: 11.5vw;
  238. width: 59vw;
  239. display: block;
  240. background: #fff;
  241. }
  242. .name {
  243. font-size: 3.5vw;
  244. color: #221815;
  245. margin-top: 15vw;
  246. text-align: center;
  247. line-height: 6.6vw;
  248. text-transform: uppercase;
  249. }
  250. }
  251. .page-content {
  252. position: relative;
  253. padding: 8vw 0;
  254. .el-breadcrumb {
  255. margin: 0 4vw 4vw;
  256. }
  257. .list-header {
  258. display: none;
  259. }
  260. .list-body {
  261. font-size: 3.6vw;
  262. color: #282828;
  263. .row {
  264. color: #666666;
  265. padding: 0 4vw;
  266. .section {
  267. display: flex;
  268. justify-content: space-between;
  269. align-items: center;
  270. border-bottom: 0.1vw solid #f7f7f7;
  271. height: 17.6vw;
  272. &.pc {
  273. display: none;
  274. }
  275. .file-cover {
  276. img {
  277. width: 8.8vw;
  278. height: 8.8vw;
  279. background: #eee;
  280. }
  281. }
  282. .file-content {
  283. flex: 1;
  284. margin: 0 4.8vw;
  285. .file-name {
  286. font-size: 3.6vw;
  287. @include ellipsis(1);
  288. }
  289. .file-info {
  290. font-size: 3vw;
  291. color: #999999;
  292. margin-top: 1.6vw;
  293. .size {
  294. margin-left: 4vw;
  295. }
  296. }
  297. }
  298. .control {
  299. width: 6.4vw;
  300. height: 6.4vw;
  301. .download {
  302. display: block;
  303. width: 6.4vw;
  304. height: 6.4vw;
  305. background: url(~assets/theme-images/common/h5-icon-download.png)
  306. no-repeat center;
  307. background-size: 6.4vw;
  308. margin: 0 auto;
  309. }
  310. }
  311. }
  312. }
  313. }
  314. }
  315. }
  316. </style>