detail.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  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. doctorInfo: {
  54. tagList: [],
  55. paramList: [],
  56. },
  57. }
  58. },
  59. mounted() {
  60. this.initData()
  61. },
  62. methods: {
  63. initData() {
  64. const doctorInfo = localStorage.getItem('doctorInfo')
  65. if (doctorInfo) {
  66. this.doctorInfo = JSON.parse(doctorInfo)
  67. this.fetchDetail()
  68. }
  69. },
  70. async fetchDetail() {
  71. try {
  72. const res = await this.$http.api.fetchDoctorDetail({
  73. doctorId: this.doctorInfo.doctorId,
  74. })
  75. this.doctorInfo = { ...this.clubInfo, ...res.data }
  76. } catch (error) {
  77. console.log(error)
  78. }
  79. if (this.doctorInfo.bannerList.length <= 0) {
  80. this.doctorInfo.bannerList.push('/placeholder.png')
  81. }
  82. },
  83. },
  84. }
  85. </script>
  86. <style scoped lang="scss">
  87. // pc 端
  88. @media screen and (min-width: 768px) {
  89. .page {
  90. position: relative;
  91. width: 1200px;
  92. height: 612px;
  93. margin-left: auto;
  94. margin-right: auto;
  95. margin-top: 80px;
  96. background-color: #fff;
  97. box-sizing: border-box;
  98. padding: 16px;
  99. padding-right: 0;
  100. }
  101. .page-title {
  102. position: absolute;
  103. font-size: 24px;
  104. color: #333;
  105. top: -50px;
  106. left: 0;
  107. }
  108. .page-top {
  109. .swiper {
  110. width: 580px;
  111. height: 580px;
  112. }
  113. }
  114. .page-content {
  115. width: 580px;
  116. padding: 0 24px;
  117. overflow-y: auto;
  118. .doctor-info {
  119. line-height: 1.6;
  120. .name {
  121. font-size: 24px;
  122. color: #101010;
  123. font-weight: bold;
  124. &::after {
  125. content: '';
  126. display: inline-block;
  127. width: 76px;
  128. height: 28px;
  129. background: url(https://static.caimei365.com/www/authentic/pc/icon-doctor-level.png);
  130. background-size: 76px 28px;
  131. vertical-align: -5px;
  132. margin-left: 8px;
  133. }
  134. }
  135. .tag {
  136. font-size: 14px;
  137. color: #909399;
  138. }
  139. .code,
  140. .club-name {
  141. font-size: 14px;
  142. color: #404040;
  143. }
  144. }
  145. .param-list {
  146. .param {
  147. .name {
  148. font-size: 18px;
  149. color: #101010;
  150. font-weight: bold;
  151. }
  152. .content {
  153. font-size: 14px;
  154. color: #404040;
  155. line-height: 1.6;
  156. text-align: justify;
  157. }
  158. }
  159. }
  160. .device-list {
  161. .title {
  162. padding: 16px;
  163. font-size: 20px;
  164. font-weight: bold;
  165. color: #404040;
  166. background-color: #f3f5f6;
  167. }
  168. .list {
  169. display: flex;
  170. align-items: center;
  171. flex-direction: column;
  172. .device {
  173. width: 100%;
  174. box-sizing: border-box;
  175. border-bottom: 1px solid #d8d8d8;
  176. .cover {
  177. width: 84px;
  178. height: 84px;
  179. display: block;
  180. }
  181. .info {
  182. margin-left: 16px;
  183. width: 300px;
  184. .name {
  185. font-size: 18px;
  186. color: #101010;
  187. text-overflow: ellipsis;
  188. overflow: hidden;
  189. white-space: nowrap;
  190. }
  191. .brand {
  192. font-size: 14px;
  193. color: #666666;
  194. text-overflow: ellipsis;
  195. overflow: hidden;
  196. white-space: nowrap;
  197. }
  198. }
  199. }
  200. }
  201. }
  202. }
  203. }
  204. // 移动 端
  205. @media screen and (max-width: 768px) {
  206. .page-title {
  207. display: none;
  208. }
  209. .page-top {
  210. .swiper {
  211. width: 100vw;
  212. height: 100vw;
  213. }
  214. }
  215. .page-content {
  216. .divider {
  217. height: 3.2vw;
  218. background-color: #f7f7f7;
  219. }
  220. .doctor-info {
  221. line-height: 1.6;
  222. .name {
  223. font-size: 5vw;
  224. color: #101010;
  225. font-weight: bold;
  226. &::after {
  227. content: '';
  228. display: inline-block;
  229. width: 13.6vw;
  230. height: 5vw;
  231. background: url(https://static.caimei365.com/www/authentic/h5/icon-doctor-level.png);
  232. background-size: 13.6vw 5vw;
  233. vertical-align: -0.8vw;
  234. margin-left: 1.2vw;
  235. }
  236. }
  237. .tag {
  238. font-size: 3vw;
  239. color: #909399;
  240. }
  241. .code,
  242. .club-name {
  243. font-size: 3.2vw;
  244. color: #404040;
  245. }
  246. }
  247. .param-list {
  248. .param {
  249. .name {
  250. font-size: 3.8vw;
  251. color: #101010;
  252. font-weight: bold;
  253. }
  254. .content {
  255. font-size: 3.2vw;
  256. color: #404040;
  257. line-height: 1.6;
  258. text-align: justify;
  259. }
  260. }
  261. }
  262. .device-list {
  263. .title {
  264. font-size: 4vw;
  265. color: #101010;
  266. font-weight: bold;
  267. }
  268. .list {
  269. display: flex;
  270. align-items: center;
  271. flex-direction: column;
  272. .device {
  273. width: 100%;
  274. box-sizing: border-box;
  275. border-bottom: 0.1vw solid #d8d8d8;
  276. .cover {
  277. width: 19.6vw;
  278. height: 19.6vw;
  279. display: block;
  280. }
  281. .info {
  282. margin-left: 3.2vw;
  283. width: 66vw;
  284. .name {
  285. font-size: 3.6vw;
  286. color: #101010;
  287. text-overflow: ellipsis;
  288. overflow: hidden;
  289. white-space: nowrap;
  290. }
  291. .brand {
  292. font-size: 3vw;
  293. color: #666666;
  294. text-overflow: ellipsis;
  295. overflow: hidden;
  296. white-space: nowrap;
  297. }
  298. }
  299. }
  300. }
  301. }
  302. }
  303. }
  304. </style>