detail.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. <template>
  2. <div class="device-detail">
  3. <template v-if="productInfo">
  4. <div class="detail-title">设备认证</div>
  5. <div class="page-top">
  6. <div class="swiper-body">
  7. <img :src="productInfo.pcImage" class="device-image" />
  8. <div class="auth-seal"></div>
  9. <img class="auth-card" :src="authCardImage" @click="onShowAuthCard" v-if="!showAuthCard" />
  10. <img class="auth-logo" :src="brandLogoImage" />
  11. </div>
  12. <div class="device-info">
  13. <div class="logo">
  14. <div class="logo-swiper" v-if="clubLogo.length > 1">
  15. <SimpleSwiper :imageList="clubLogo" :pagination="false"></SimpleSwiper>
  16. </div>
  17. <img :src="clubLogo[0]" alt="logo" v-else />
  18. </div>
  19. <div class="section">
  20. <div class="name" v-text="productInfo.productName"></div>
  21. <div class="sncode mobile">
  22. SN码:<span>{{ productInfo.snCode | snCodeRender }}</span>
  23. </div>
  24. <div class="row">
  25. <!-- <span>产地:{{ productInfo.producePlace }}</span> -->
  26. <span>品牌:{{ productInfo.brandName }}</span
  27. ><i></i>
  28. <span v-if="productInfo.producePlaceType === 1">产地:{{ productInfo.producePlace }}</span>
  29. <span v-if="productInfo.producePlaceType === 2">技术授权方:{{ productInfo.producePlace }}</span>
  30. </div>
  31. <div class="sncode pc">
  32. SN码:<span>{{ productInfo.snCode | snCodeRender }}</span>
  33. </div>
  34. <div class="maker" v-if="productInfo.manufacturerType === 1">制造商:{{ productInfo.manufacturer }}</div>
  35. <div class="maker" v-if="productInfo.manufacturerType === 2">制造委托方:{{ productInfo.manufacturer }}</div>
  36. <div class="supplier">供应商:{{ productInfo.shopName }}</div>
  37. <!-- <div class="supplier">供应商:ACEBELLE生物科技(深圳)有限公司</div> -->
  38. </div>
  39. <div class="auth" v-if="productInfo">
  40. <div class="auth-icon"></div>
  41. <template v-for="item in productInfo.clubList">
  42. <div class="auth-info" :key="item.authId">
  43. <span>该设备由</span>
  44. <span class="font-bold">ROS'S</span>
  45. <span>官方授权</span>
  46. <span>{{ item.authParty }}</span>
  47. </div>
  48. </template>
  49. </div>
  50. </div>
  51. </div>
  52. <div class="page-content">
  53. <div class="device-params">
  54. <div class="title">相关参数</div>
  55. <div class="line"></div>
  56. <SimpleParamList :paramList="paramListRender" />
  57. </div>
  58. </div>
  59. </template>
  60. <!-- 设备为空 -->
  61. <SimpleEmpty
  62. v-else
  63. name="icon-empty-device.png"
  64. description="暂无关联设备信息~"
  65. />
  66. <!-- 授权牌弹窗 -->
  67. <div class="mask" v-if="showAuthCard" @click="onHideAuthCard"></div>
  68. <transition enter-active-class="animate__zoomIn" leave-active-class="animate__zoomOut">
  69. <div class="auth-card-content animate__animated" v-if="showAuthCard">
  70. <div class="auth-card-popup">
  71. <span class="el-icon-circle-close" @click="onHideAuthCard"></span>
  72. <img :src="authCardImage" />
  73. </div>
  74. </div>
  75. </transition>
  76. </div>
  77. </template>
  78. <script>
  79. import deviceDetailMixin from '@/mixins/deviceDetail'
  80. export default {
  81. layout: 'app-ross',
  82. mixins: [deviceDetailMixin],
  83. }
  84. </script>
  85. <style lang="scss" scoped>
  86. ::v-deep {
  87. .swiper-pagination-bullet {
  88. background: #f3920d !important;
  89. }
  90. .simple-swiper {
  91. .swiper-pagination-bullet-active {
  92. background: #f3920d;
  93. }
  94. }
  95. }
  96. .mask {
  97. width: 100vw;
  98. height: 100vh;
  99. position: fixed;
  100. left: 0;
  101. top: 0;
  102. z-index: 8;
  103. background: rgba(0, 0, 0, 0.5);
  104. }
  105. // pc 端
  106. @media screen and (min-width: 768px) {
  107. .device-detail {
  108. margin-bottom: 48px;
  109. .auth-card-content {
  110. width: 100vw;
  111. height: 100vh;
  112. position: fixed;
  113. left: 0;
  114. top: 0;
  115. display: flex;
  116. justify-content: center;
  117. align-items: center;
  118. z-index: 9;
  119. .auth-card-popup {
  120. position: relative;
  121. width: 622px;
  122. img {
  123. display: block;
  124. width: 100%;
  125. height: auto;
  126. }
  127. .el-icon-circle-close {
  128. position: absolute;
  129. top: -50px;
  130. right: 0;
  131. font-size: 32px;
  132. color: #fff;
  133. cursor: pointer;
  134. }
  135. }
  136. }
  137. .detail-title {
  138. font-size: 24px;
  139. color: #282828;
  140. margin: 32px auto 24px;
  141. width: 1200px;
  142. }
  143. .page-top,
  144. .page-content {
  145. width: 1200px;
  146. margin: 0 auto;
  147. background: #fff;
  148. }
  149. .page-top {
  150. display: flex;
  151. justify-content: space-between;
  152. align-items: flex-start;
  153. padding: 24px;
  154. padding-right: 40px;
  155. .swiper-body {
  156. position: relative;
  157. width: 540px;
  158. height: 540px;
  159. background: #f7f7f7;
  160. .device-image {
  161. width: 100%;
  162. height: 100%;
  163. }
  164. .auth-seal {
  165. position: absolute;
  166. width: 70px;
  167. height: 70px;
  168. background: url(~assets/theme-images/ross/pc-icon-auth-seal.png) no-repeat center;
  169. background-size: 70px;
  170. right: 24px;
  171. bottom: 24px;
  172. z-index: 2;
  173. }
  174. .auth-card {
  175. position: absolute;
  176. width: auto;
  177. height: 110px;
  178. display: block;
  179. bottom: 24px;
  180. left: 24px;
  181. z-index: 2;
  182. cursor: pointer;
  183. }
  184. .auth-logo {
  185. position: absolute;
  186. max-width: 120px;
  187. max-height: 120px;
  188. top: 24px;
  189. left: 24px;
  190. z-index: 2;
  191. }
  192. }
  193. .device-info {
  194. width: 572px;
  195. position: relative;
  196. .section {
  197. width: 440px;
  198. word-break: break-all;
  199. }
  200. .logo {
  201. width: 114px;
  202. height: 114px;
  203. border-radius: 50%;
  204. // background: #d8d8d8;
  205. border: 1px solid #d8d8d8;
  206. // box-sizing: border-box;
  207. position: absolute;
  208. right: 0;
  209. top: 0;
  210. .logo-swiper {
  211. width: 112px;
  212. height: 112px;
  213. overflow: hidden;
  214. border-radius: 50%;
  215. }
  216. ::v-deep {
  217. img {
  218. width: 112px;
  219. height: 112px;
  220. border-radius: 50%;
  221. }
  222. }
  223. &::after {
  224. content: '';
  225. position: absolute;
  226. z-index: 1;
  227. right: 6px;
  228. bottom: 0;
  229. display: block;
  230. width: 24px;
  231. height: 24px;
  232. background: url(~assets/theme-images/ross/pc-icon-auth-ren.png) no-repeat center;
  233. background-size: 23px;
  234. }
  235. img {
  236. display: block;
  237. width: 100%;
  238. height: 100%;
  239. // background: pink;
  240. border-radius: 50%;
  241. }
  242. }
  243. .name {
  244. font-size: 24px;
  245. color: #282828;
  246. line-height: 1.6;
  247. margin-bottom: 24px;
  248. font-weight: bold;
  249. }
  250. .row,
  251. .sncode,
  252. .maker {
  253. margin-bottom: 16px;
  254. }
  255. .row {
  256. line-height: 24px;
  257. i {
  258. position: relative;
  259. margin: 0 16px;
  260. &::after {
  261. content: '';
  262. display: block;
  263. width: 1px;
  264. height: 16px;
  265. background: #999999;
  266. position: absolute;
  267. top: 0;
  268. left: 0;
  269. }
  270. }
  271. span {
  272. font-size: 18px;
  273. color: #999999;
  274. }
  275. }
  276. .sncode.mobile {
  277. display: none;
  278. }
  279. .sncode.pc {
  280. font-size: 18px;
  281. color: #282828;
  282. }
  283. .supplier,
  284. .maker {
  285. font-size: 20px;
  286. color: #282828;
  287. }
  288. .auth {
  289. width: 100%;
  290. min-height: 114px;
  291. background: #f3920d;
  292. margin-top: 56px;
  293. box-sizing: border-box;
  294. padding: 24px;
  295. .auth-icon {
  296. height: 28px;
  297. background: url(~assets/theme-images/ross/pc-icon-auth2.png) no-repeat left center;
  298. background-size: auto 28px;
  299. margin-bottom: 10px;
  300. }
  301. .auth-info {
  302. font-size: 0;
  303. span {
  304. font-size: 20px;
  305. color: #fff;
  306. }
  307. }
  308. }
  309. }
  310. }
  311. .page-content {
  312. margin-top: 16px;
  313. box-sizing: border-box;
  314. padding: 24px;
  315. .device-params {
  316. .title {
  317. font-size: 28px;
  318. color: #282828;
  319. font-weight: bold;
  320. }
  321. .line {
  322. height: 1px;
  323. background: #ececec;
  324. position: relative;
  325. margin-top: 10px;
  326. margin-bottom: 20px;
  327. &::after {
  328. content: '';
  329. position: absolute;
  330. width: 73px;
  331. height: 2px;
  332. background: #f3920d;
  333. left: 0;
  334. bottom: 0;
  335. }
  336. }
  337. }
  338. }
  339. }
  340. }
  341. // 移动端
  342. @media screen and (max-width: 768px) {
  343. .device-detail {
  344. .detail-title {
  345. display: none;
  346. }
  347. .auth-card-content {
  348. width: 100vw;
  349. height: 100vh;
  350. position: fixed;
  351. left: 0;
  352. top: 0;
  353. display: flex;
  354. justify-content: center;
  355. align-items: center;
  356. z-index: 9;
  357. .auth-card-popup {
  358. position: relative;
  359. width: 86vw;
  360. img {
  361. display: block;
  362. width: 100%;
  363. height: auto;
  364. }
  365. .el-icon-circle-close {
  366. position: absolute;
  367. top: -8vw;
  368. right: 0;
  369. font-size: 7vw;
  370. color: #fff;
  371. cursor: pointer;
  372. }
  373. }
  374. }
  375. .page-top,
  376. .page-content {
  377. margin: 0 auto;
  378. background: #fff;
  379. }
  380. .page-top {
  381. .swiper-body {
  382. position: relative;
  383. width: 100vw;
  384. height: 100vw;
  385. background: #f7f7f7;
  386. .device-image {
  387. width: 100%;
  388. height: 100%;
  389. }
  390. ::v-deep {
  391. img {
  392. width: 100vw;
  393. height: 100vw;
  394. }
  395. }
  396. .auth-seal {
  397. position: absolute;
  398. width: 13.8vw;
  399. height: 13.8vw;
  400. background: url(~assets/theme-images/ross/h5-icon-auth-seal.png) no-repeat center;
  401. background-size: 13.8vw;
  402. right: 4vw;
  403. bottom: 4vw;
  404. z-index: 2;
  405. }
  406. .auth-card {
  407. position: absolute;
  408. width: auto;
  409. height: 20.6vw;
  410. display: block;
  411. bottom: 4vw;
  412. left: 4vw;
  413. z-index: 2;
  414. }
  415. .auth-logo {
  416. position: absolute;
  417. max-width: 18vw;
  418. max-height: 18vw;
  419. top: 4vw;
  420. left: 4vw;
  421. z-index: 2;
  422. }
  423. }
  424. .device-info {
  425. position: relative;
  426. .section {
  427. word-break: break-all;
  428. padding: 4vw 4vw 0;
  429. }
  430. .logo {
  431. width: 18vw;
  432. height: 18vw;
  433. border-radius: 50%;
  434. // background: #d8d8d8;
  435. border: 0.1vw solid #d8d8d8;
  436. box-sizing: border-box;
  437. position: absolute;
  438. right: 4vw;
  439. top: 5.8vw;
  440. .logo-swiper {
  441. width: 18vw;
  442. height: 18vw;
  443. overflow: hidden;
  444. border-radius: 50%;
  445. }
  446. ::v-deep {
  447. img {
  448. width: 18vw;
  449. height: 18vw;
  450. border-radius: 50%;
  451. }
  452. }
  453. &::after {
  454. content: '';
  455. position: absolute;
  456. z-index: 1;
  457. right: 0.7vw;
  458. bottom: 0;
  459. display: block;
  460. width: 3.6vw;
  461. height: 3.6vw;
  462. background: url(~assets/theme-images/ross/h5-icon-auth-ren.png) no-repeat center;
  463. background-size: 3.6vw;
  464. }
  465. img {
  466. display: block;
  467. width: 100%;
  468. height: 100%;
  469. // background: pink;
  470. border-radius: 50%;
  471. }
  472. }
  473. .name {
  474. font-size: 5.4vw;
  475. color: #282828;
  476. line-height: 7.4vw;
  477. margin-bottom: 2.4vw;
  478. font-weight: bold;
  479. }
  480. .sncode.pc {
  481. display: none;
  482. }
  483. .sncode.mobile {
  484. margin: 2.4vw 0 5.6vw;
  485. color: #282828;
  486. font-size: 4vw;
  487. }
  488. .row {
  489. line-height: 4.7vw;
  490. i {
  491. position: relative;
  492. margin: 0 4vw;
  493. &::after {
  494. content: '';
  495. display: block;
  496. width: 0.2vw;
  497. height: 3vw;
  498. background: #282828;
  499. position: absolute;
  500. top: 1vw;
  501. left: 0;
  502. }
  503. }
  504. span {
  505. font-size: 3.6vw;
  506. color: #282828;
  507. }
  508. }
  509. .row,
  510. .maker {
  511. margin-bottom: 1.2vw;
  512. }
  513. .supplier,
  514. .maker {
  515. font-size: 3.6vw;
  516. color: #282828;
  517. }
  518. .auth {
  519. // width: 100%;
  520. margin: 0 4vw;
  521. min-height: 20vw;
  522. background: #f3920d;
  523. margin-top: 4vw;
  524. box-sizing: border-box;
  525. padding: 5.2vw 4vw;
  526. border-radius: 1.2vw;
  527. .auth-icon {
  528. height: 4.9vw;
  529. background: url(~assets/theme-images/ross/h5-icon-auth2.png) no-repeat left center;
  530. background-size: auto 4.9vw;
  531. margin-bottom: 1vw;
  532. }
  533. .auth-info {
  534. font-size: 0;
  535. span {
  536. font-size: 3.6vw;
  537. line-height: 6.4vw;
  538. color: #fff;
  539. font-weight: bold;
  540. }
  541. }
  542. }
  543. }
  544. }
  545. .page-content {
  546. .device-params {
  547. padding: 8vw 4vw;
  548. box-sizing: border-box;
  549. .title {
  550. font-size: 4.6vw;
  551. color: #282828;
  552. font-weight: bold;
  553. }
  554. .line {
  555. // height: 0.2vw;
  556. // background: #ececec;
  557. position: relative;
  558. margin-top: 4.7vw;
  559. margin-bottom: 1.2vw;
  560. }
  561. }
  562. }
  563. }
  564. }
  565. </style>