大数据展示系统-前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

247 lines
6.5 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div>
  3. <el-dialog
  4. title="图书详情"
  5. :visible.sync="dialogVisible"
  6. width="80%"
  7. >
  8. <!-- :before-close="handleClose" -->
  9. <div class="dialog-setting">
  10. <div v-if="bookData" class="book-details-box">
  11. <div class="book-details">
  12. <div class="book-cover">
  13. <img :src="bookData.srcUrl ? bookData.srcUrl : ''" :onerror="defaultImg">
  14. </div>
  15. <div class="book-desc">
  16. <h3>{{ bookData.bookName }}</h3>
  17. <p class="book-from">作者{{ bookData.bookAuthor }}</p>
  18. <p v-if="bookData.Publish" class="book-from">出版社{{ bookData.Publish }}</p>
  19. <p class="book-brief"> 简介{{ bookData.gist ? bookData.gist : '暂无简介' }}</p>
  20. </div>
  21. </div>
  22. <div class="book-local">
  23. <!-- <span v-if="bookData.bookPlace">所在位置{{ bookData.bookPlace }}</span> -->
  24. <!-- 待定热门图书/新书推荐跳转到 场馆导航操作 -->
  25. <!-- <span v-else>所在位置</span> -->
  26. <div class="local-title" @click="test">
  27. 所在位置
  28. </div>
  29. <ul class="local-list">
  30. <li>
  31. <svg class="icon svg-icon" aria-hidden="true">
  32. <use xlink:href="#icon-weizhi" />
  33. </svg>
  34. <span>一楼西区......</span>
  35. </li>
  36. <!-- -->
  37. <li>
  38. <svg class="icon svg-icon" aria-hidden="true">
  39. <use xlink:href="#icon-weizhi" />
  40. </svg>
  41. <span>一楼西区......</span>
  42. </li>
  43. <li>
  44. <svg class="icon svg-icon" aria-hidden="true">
  45. <use xlink:href="#icon-weizhi" />
  46. </svg>
  47. <span>一楼西区......</span>
  48. </li>
  49. <li>
  50. <svg class="icon svg-icon" aria-hidden="true">
  51. <use xlink:href="#icon-weizhi" />
  52. </svg>
  53. <span>一楼西区......</span>
  54. </li>
  55. <li>
  56. <svg class="icon svg-icon" aria-hidden="true">
  57. <use xlink:href="#icon-weizhi" />
  58. </svg>
  59. <span>一楼西区......</span>
  60. </li>
  61. <li>
  62. <svg class="icon svg-icon" aria-hidden="true">
  63. <use xlink:href="#icon-weizhi" />
  64. </svg>
  65. <span>一楼西区......</span>
  66. </li>
  67. <li>
  68. <svg class="icon svg-icon" aria-hidden="true">
  69. <use xlink:href="#icon-weizhi" />
  70. </svg>
  71. <span>一楼西区......</span>
  72. </li>
  73. </ul>
  74. </div>
  75. </div>
  76. </div>
  77. </el-dialog>
  78. </div>
  79. </template>
  80. <script>
  81. export default {
  82. name: 'BookDetails',
  83. data() {
  84. return {
  85. dialogVisible: false,
  86. bookData: null,
  87. defaultImg: 'this.src="' + require('@/assets/images/default-img.png') + '"'
  88. }
  89. },
  90. created() {
  91. },
  92. methods: {
  93. test() {
  94. console.log(this.bookData)
  95. }
  96. }
  97. }
  98. </script>
  99. <style lang="scss" scoped>
  100. ::v-deep .el-dialog{
  101. position: fixed;
  102. top: 50%;
  103. left: 50%;
  104. transform: translate(-50%,-50%);
  105. border-radius: 24px;
  106. margin-top: 0 !important;
  107. .el-dialog__body{
  108. padding: 0 40px 40px 40px ;
  109. }
  110. }
  111. ::v-deep .el-dialog__header{
  112. text-align: center;
  113. padding-top:0 ;
  114. padding-bottom:4px ;
  115. .el-dialog__title{
  116. display: inline-block;
  117. font-family: "ZhenyanGB";
  118. font-size: 40px;
  119. width: 494px;
  120. height: 76px;
  121. line-height: 76px;
  122. background: url('~@/assets/images/list/list-title.png') no-repeat 0 0;
  123. }
  124. }
  125. ::v-deep .el-dialog__headerbtn{
  126. background-color: #3F92F6;
  127. width: 40px;
  128. height: 40px;
  129. border-radius: 50%;
  130. .el-dialog__close{
  131. color: #fff;
  132. font-size: 30px;
  133. }
  134. }
  135. .book-details-box{
  136. .book-details{
  137. display: flex;
  138. justify-content: space-between;
  139. padding: 30px 0;
  140. .book-cover{
  141. display: flex;
  142. align-items: center;
  143. width: 318px;
  144. height: 382px;
  145. margin-right: 40px;
  146. overflow: hidden;
  147. img{
  148. display: block;
  149. width: 100%;
  150. max-height: calc(100%);
  151. object-fit: contain;
  152. }
  153. }
  154. .book-desc{
  155. flex: 1;
  156. color: #333;
  157. overflow: hidden;
  158. h3{
  159. font-size: 40px;
  160. font-weight: normal;
  161. }
  162. .book-from{
  163. width: 100%;
  164. font-size: 30px;
  165. }
  166. h3,.book-from{
  167. text-overflow: -o-ellipsis-lastline;
  168. overflow: hidden;
  169. text-overflow: ellipsis;
  170. display: -webkit-box;
  171. -webkit-line-clamp: 2;
  172. line-clamp: 2;
  173. -webkit-box-orient: vertical;
  174. margin-bottom: 20px;
  175. }
  176. .book-brief{
  177. font-size: 24px;
  178. margin-bottom: 20px;
  179. text-overflow: -o-ellipsis-lastline;
  180. overflow: hidden;
  181. text-overflow: ellipsis;
  182. display: -webkit-box;
  183. -webkit-line-clamp: 4;
  184. line-clamp: 4;
  185. -webkit-box-orient: vertical;
  186. }
  187. }
  188. }
  189. .book-local{
  190. height: 343px;
  191. color: #333;
  192. display: flex;
  193. // border-radius: 52px;
  194. // line-height: 64px;
  195. // text-align: center;
  196. // font-size: 30px;
  197. // overflow: hidden;
  198. // white-space: nowrap;
  199. // text-overflow: ellipsis;
  200. .local-title{
  201. width: 83px;
  202. height: 100%;
  203. background: url('~@/assets/images/local-bg.png') no-repeat;
  204. writing-mode:vertical-rl;
  205. text-align: center;
  206. line-height: 83px;
  207. font-size: 30px;
  208. color: #fff;
  209. }
  210. .local-list{
  211. flex: 1;
  212. border: 1px solid #3F92F6;
  213. border-left: none;
  214. background: #D0E0F9;
  215. overflow: hidden;
  216. overflow-y: auto;
  217. li{
  218. height: 56px;
  219. line-height: 56px;
  220. background-color: #fff;
  221. // margin-right: 8px;
  222. margin-bottom: 15px;
  223. padding-left: 13px;
  224. font-size: 26px;
  225. span{
  226. margin-left: 19px;
  227. }
  228. }
  229. }
  230. }
  231. }
  232. /**滚动条的宽度*/
  233. ::-webkit-scrollbar {
  234. width: 8px;
  235. height: 4px;
  236. }
  237. //滚动条的滑块
  238. ::-webkit-scrollbar-thumb {
  239. background-color: #3F92F6;
  240. border-radius: 4px;
  241. }
  242. </style>