detail.vue 15 KB

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