storeDetail.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <template>
  2. <view class="container-body">
  3. <view class="box">
  4. <view class="storeInfo title">基础信息</view>
  5. <view class="storeInfo-item x-start">
  6. <view class="label" style="width: 4rem;">公司全称</view>
  7. <view class="val">{{storeInfo.fullName|| ''}}</view>
  8. </view>
  9. <view class="storeInfo-item x-start">
  10. <view class="label" style="width: 4rem;">联系电话</view>
  11. <view class="val">{{storeInfo.sendPhone|| ''}}</view>
  12. </view>
  13. <view class="storeInfo-item x-start">
  14. <view class="label" style="width: 4rem;">详细地址</view>
  15. <view class="val">{{storeInfo.address|| ''}}{{storeInfo.enterpriseAddress||''}}</view>
  16. </view>
  17. <view class="storeInfo-item x-start">
  18. <view class="label" style="width: 4rem;">经营范围</view>
  19. <view id="descbox-desc" :class="showDes|| !showExpandText? 'opacity descbox-desc':'descbox-desc' " :style="{height: isExpand ? 'auto': '84rpx'}">
  20. {{storeInfo.businessScope|| ''}}
  21. <!-- <view class="expand x-ac">
  22. {{!isExpand&&showExpandText ? '展开':'收起'}}
  23. <u-icon name="arrow-down" color="#333" size="14"></u-icon>
  24. <u-icon name="arrow-up" color="#333" size="14"></u-icon>
  25. </view> -->
  26. </view>
  27. </view>
  28. </view>
  29. <view class="box mb20">
  30. <view class="storeInfo title">资质信息</view>
  31. <view class="storeInfo-item mb20">
  32. <view class="label mb20">营业执照</view>
  33. <view class="val x-f">
  34. <u-image
  35. v-if="storeInfo.businessLicense"
  36. shape="square"
  37. lazyLoad
  38. :src="storeInfo.businessLicense"
  39. width="600rpx"
  40. height="auto"
  41. mode="widthFix"
  42. radius="6"
  43. @click="previewImage('businessLicense')"
  44. ></u-image>
  45. <view v-else>暂未上传</view>
  46. </view>
  47. </view>
  48. <view class="storeInfo-item mb20" v-if="storeInfo.medicalDevice2">
  49. <view class="label" mb20>2类器械生产备案</view>
  50. <view class="val x-f">
  51. <u-image
  52. v-if="storeInfo.medicalDevice2"
  53. shape="square"
  54. lazyLoad
  55. :src="storeInfo.medicalDevice2"
  56. width="600rpx"
  57. height="auto"
  58. mode="widthFix"
  59. radius="6"
  60. @click="previewImage('medicalDevice2')"
  61. ></u-image>
  62. <view v-else>暂未上传</view>
  63. </view>
  64. </view>
  65. <view class="storeInfo-item mb20" v-if="storeInfo.medicalDevice1">
  66. <view class="label mb20">1类医疗器械备案</view>
  67. <view class="val x-start">
  68. <u-image
  69. v-if="storeInfo.medicalDevice1"
  70. shape="square"
  71. lazyLoad
  72. :src="storeInfo.medicalDevice1"
  73. width="600rpx"
  74. height="auto"
  75. mode="widthFix"
  76. radius="6"
  77. @click="previewImage('medicalDevice1')"
  78. ></u-image>
  79. <view v-else>暂未上传</view>
  80. </view>
  81. </view>
  82. <view class="storeInfo-item mb20" v-if="storeInfo.medicalDevice3">
  83. <view class="label mb20">3类器械经营许可证</view>
  84. <view class="val x-f">
  85. <u-image
  86. v-if="storeInfo.medicalDevice3"
  87. shape="square"
  88. lazyLoad
  89. :src="storeInfo.medicalDevice3"
  90. width="600rpx"
  91. height="auto"
  92. mode="widthFix"
  93. radius="6"
  94. @click="previewImage('medicalDevice3')"
  95. ></u-image>
  96. <view v-else>暂未上传</view>
  97. </view>
  98. </view>
  99. <view class="storeInfo-item mb20" v-if="storeInfo.foodLicense">
  100. <view class="label mb20">食品经营许可证</view>
  101. <view class="val x-f">
  102. <u-image
  103. v-if="storeInfo.foodLicense"
  104. shape="square"
  105. lazyLoad
  106. :src="storeInfo.foodLicense"
  107. width="600rpx"
  108. height="auto"
  109. mode="widthFix"
  110. radius="6"
  111. @click="previewImage('foodLicense')"
  112. ></u-image>
  113. <view v-else>暂未上传</view>
  114. </view>
  115. </view>
  116. <view class="storeInfo-item mb20" v-if="storeInfo.medicalLicense">
  117. <view class="label mb20">医疗机构执业许可证</view>
  118. <view class="val x-f">
  119. <u-image
  120. v-if="storeInfo.medicalLicense"
  121. shape="square"
  122. lazyLoad
  123. :src="storeInfo.medicalLicense"
  124. width="600rpx"
  125. height="auto"
  126. mode="widthFix"
  127. radius="6"
  128. @click="previewImage('medicalLicense')"
  129. ></u-image>
  130. <view v-else>暂未上传</view>
  131. </view>
  132. </view>
  133. </view>
  134. </view>
  135. </template>
  136. <script>
  137. export default {
  138. props:['storeInfo','source'],
  139. data() {
  140. return {
  141. showDes: false,
  142. showExpandText: false,
  143. isExpand: true,
  144. textHeight: 0, //文本高度
  145. }
  146. },
  147. methods: {
  148. previewImage(type) {
  149. uni.previewImage({
  150. current: 0,
  151. urls: [this.storeInfo[type]]
  152. });
  153. },
  154. getDescHeight() {
  155. return
  156. this.$nextTick(() => {
  157. const query = uni.createSelectorQuery().in(this);
  158. query
  159. .select("#descbox-desc")
  160. .boundingClientRect((data) => {
  161. this.textHeight = data.height
  162. this.isExpand = this.textHeight > uni.upx2px(84) ? false : true
  163. this.showExpandText = this.textHeight >= uni.upx2px(84) ? true : false
  164. this.showDes = true
  165. })
  166. .exec();
  167. })
  168. },
  169. }
  170. }
  171. </script>
  172. <style scoped lang="scss">
  173. .mb20 {
  174. margin-bottom: 20rpx;
  175. }
  176. .box {
  177. padding: 0 32rpx 26rpx 32rpx;
  178. background-color: #fff;
  179. }
  180. .opacity {
  181. position: relative !important;
  182. opacity: 1 !important;
  183. z-index: 1 !important;
  184. }
  185. .descbox-desc {
  186. color: #222;
  187. font-weight: 400;
  188. font-size: 28rpx;
  189. color: #222222;
  190. word-break: break-all;
  191. overflow: hidden;
  192. line-height: 42rpx;
  193. position: absolute;
  194. opacity: 0;
  195. z-index: -1;
  196. }
  197. .container-body {
  198. font-family: PingFang SC, PingFang SC;
  199. font-weight: 400;
  200. font-size: 28rpx;
  201. color: #939599;
  202. }
  203. .businessLicense {
  204. height: 80rpx;
  205. width: 80rpx;
  206. border-radius: 8rpx;
  207. }
  208. .storeInfo {
  209. &-item {
  210. padding: 6rpx 0;
  211. .label {
  212. flex-shrink: 0;
  213. }
  214. .val {
  215. color: #222;
  216. }
  217. }
  218. }
  219. .title {
  220. font-family: PingFang SC, PingFang SC;
  221. font-weight: 600;
  222. font-size: 30rpx;
  223. color: #222222;
  224. padding: 24rpx 0;
  225. }
  226. </style>