detail.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. <template>
  2. <div class="page md:flex md:justify-between">
  3. <div class="page-title">医师认证</div>
  4. <div class="page-top">
  5. <div class="swiper">
  6. <SimpleSwiper :imageList="doctorInfo.bannerList"></SimpleSwiper>
  7. </div>
  8. </div>
  9. <div class="page-content">
  10. <div class="doctor-info px-4 pt-4 md:pt-0">
  11. <div class="name pb-4">{{ doctorInfo.doctorName }}</div>
  12. <div class="tag pb-1">{{ doctorInfo.tagList.join(' | ') }}</div>
  13. <div class="code pb-1">
  14. 从业资格证编号:{{ doctorInfo.certificateNo }}
  15. </div>
  16. <div class="club-name">所在机构:{{ doctorInfo.clubName }}</div>
  17. </div>
  18. <div class="section param-list pb-4">
  19. <div
  20. class="param px-4 pt-4"
  21. v-for="(param, index) in doctorInfo.paramList"
  22. :key="index"
  23. >
  24. <div class="name py-2" v-text="param.name"></div>
  25. <div class="content" v-text="param.content"></div>
  26. </div>
  27. </div>
  28. <div class="divider"></div>
  29. <div class="device-list p-4">
  30. <div class="title">具备操作资格设备</div>
  31. <div class="list">
  32. <div
  33. class="device flex items-center py-4"
  34. v-for="item in doctorInfo.equipmentList"
  35. :key="item.productId"
  36. >
  37. <img class="cover" :src="item.image" />
  38. <div class="info">
  39. <div class="name" v-text="item.equipmentName"></div>
  40. <div class="brand mt-2">品牌:{{ item.brand }}</div>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </template>
  48. <script>
  49. export default {
  50. layout: 'app',
  51. data() {
  52. return {
  53. doctorId: '',
  54. doctorInfo: {
  55. tagList: [],
  56. paramList: [],
  57. },
  58. }
  59. },
  60. mounted() {
  61. this.initData()
  62. },
  63. methods: {
  64. initData() {
  65. this.doctorId = this.$route.query.id
  66. this.fetchDetail()
  67. },
  68. async fetchDetail() {
  69. try {
  70. const res = await this.$http.api.fetchDoctorDetail({
  71. doctorId: this.doctorId,
  72. })
  73. this.doctorInfo = { ...this.clubInfo, ...res.data }
  74. } catch (error) {
  75. console.log(error)
  76. }
  77. if (this.doctorInfo.bannerList.length <= 0) {
  78. this.doctorInfo.bannerList.push('/placeholder.png')
  79. }
  80. },
  81. },
  82. }
  83. </script>
  84. <style scoped lang="scss">
  85. // pc 端
  86. @media screen and (min-width: 768px) {
  87. .page {
  88. position: relative;
  89. width: 1200px;
  90. height: 612px;
  91. margin-left: auto;
  92. margin-right: auto;
  93. margin-top: 80px;
  94. background-color: #fff;
  95. box-sizing: border-box;
  96. padding: 16px;
  97. padding-right: 0;
  98. }
  99. .page-title {
  100. position: absolute;
  101. font-size: 24px;
  102. color: #333;
  103. top: -50px;
  104. left: 0;
  105. }
  106. .page-top {
  107. .swiper {
  108. width: 580px;
  109. height: 580px;
  110. }
  111. }
  112. .page-content {
  113. width: 580px;
  114. padding: 0 24px;
  115. overflow-y: auto;
  116. .doctor-info {
  117. line-height: 1.6;
  118. .name {
  119. font-size: 24px;
  120. color: #101010;
  121. font-weight: bold;
  122. &::after {
  123. content: '';
  124. display: inline-block;
  125. width: 76px;
  126. height: 28px;
  127. background: url(https://static.caimei365.com/www/authentic/pc/icon-doctor-level.png);
  128. background-size: 76px 28px;
  129. vertical-align: -5px;
  130. margin-left: 8px;
  131. }
  132. }
  133. .tag {
  134. font-size: 14px;
  135. color: #909399;
  136. }
  137. .code,
  138. .club-name {
  139. font-size: 14px;
  140. color: #404040;
  141. }
  142. }
  143. .param-list {
  144. .param {
  145. .name {
  146. font-size: 18px;
  147. color: #101010;
  148. font-weight: bold;
  149. }
  150. .content {
  151. font-size: 14px;
  152. color: #404040;
  153. line-height: 1.6;
  154. text-align: justify;
  155. }
  156. }
  157. }
  158. .device-list {
  159. .title {
  160. padding: 16px;
  161. font-size: 20px;
  162. font-weight: bold;
  163. color: #404040;
  164. background-color: #f3f5f6;
  165. }
  166. .list {
  167. display: flex;
  168. align-items: center;
  169. flex-direction: column;
  170. .device {
  171. width: 100%;
  172. box-sizing: border-box;
  173. border-bottom: 1px solid #d8d8d8;
  174. .cover {
  175. width: 84px;
  176. height: 84px;
  177. display: block;
  178. }
  179. .info {
  180. margin-left: 16px;
  181. width: 300px;
  182. .name {
  183. font-size: 18px;
  184. color: #101010;
  185. text-overflow: ellipsis;
  186. overflow: hidden;
  187. white-space: nowrap;
  188. }
  189. .brand {
  190. font-size: 14px;
  191. color: #666666;
  192. text-overflow: ellipsis;
  193. overflow: hidden;
  194. white-space: nowrap;
  195. }
  196. }
  197. }
  198. }
  199. }
  200. }
  201. }
  202. // 移动 端
  203. @media screen and (max-width: 768px) {
  204. .page-title {
  205. display: none;
  206. }
  207. .page-top {
  208. .swiper {
  209. width: 100vw;
  210. height: 100vw;
  211. }
  212. }
  213. .page-content {
  214. .divider {
  215. height: 3.2vw;
  216. background-color: #f7f7f7;
  217. }
  218. .doctor-info {
  219. line-height: 1.6;
  220. .name {
  221. font-size: 5vw;
  222. color: #101010;
  223. font-weight: bold;
  224. &::after {
  225. content: '';
  226. display: inline-block;
  227. width: 13.6vw;
  228. height: 5vw;
  229. background: url(https://static.caimei365.com/www/authentic/h5/icon-doctor-level.png);
  230. background-size: 13.6vw 5vw;
  231. vertical-align: -0.8vw;
  232. margin-left: 1.2vw;
  233. }
  234. }
  235. .tag {
  236. font-size: 3vw;
  237. color: #909399;
  238. }
  239. .code,
  240. .club-name {
  241. font-size: 3.2vw;
  242. color: #404040;
  243. }
  244. }
  245. .param-list {
  246. .param {
  247. .name {
  248. font-size: 3.8vw;
  249. color: #101010;
  250. font-weight: bold;
  251. }
  252. .content {
  253. font-size: 3.2vw;
  254. color: #404040;
  255. line-height: 1.6;
  256. text-align: justify;
  257. }
  258. }
  259. }
  260. .device-list {
  261. .title {
  262. font-size: 4vw;
  263. color: #101010;
  264. font-weight: bold;
  265. }
  266. .list {
  267. display: flex;
  268. align-items: center;
  269. flex-direction: column;
  270. .device {
  271. width: 100%;
  272. box-sizing: border-box;
  273. border-bottom: 0.1vw solid #d8d8d8;
  274. .cover {
  275. width: 19.6vw;
  276. height: 19.6vw;
  277. display: block;
  278. }
  279. .info {
  280. margin-left: 3.2vw;
  281. width: 66vw;
  282. .name {
  283. font-size: 3.6vw;
  284. color: #101010;
  285. text-overflow: ellipsis;
  286. overflow: hidden;
  287. white-space: nowrap;
  288. }
  289. .brand {
  290. font-size: 3vw;
  291. color: #666666;
  292. text-overflow: ellipsis;
  293. overflow: hidden;
  294. white-space: nowrap;
  295. }
  296. }
  297. }
  298. }
  299. }
  300. }
  301. }
  302. </style>