safetyCard.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <!-- 安全信息牌 -->
  2. <template>
  3. <view class="safetyCard">
  4. <view class="liability-unit">责任单位:{{newData.deptName}}</view>
  5. <view class="small-title">实验室负责人</view>
  6. <view class="sub-head" style="border:none;">
  7. <view>{{newData.adminName}}</view>
  8. <view @click="callPhone(newData.adminPhone)">
  9. <img src="@/pages_manage/images/icon_aqxxp_dh.png">
  10. <view>{{newData.adminPhone}}</view>
  11. </view>
  12. </view>
  13. <view class="small-title">安全员</view>
  14. <view class="sub-head" v-for="(item,index) in newData.safeUserList" :key="index">
  15. <view>{{item.safeUserName}}</view>
  16. <view @click="callPhone(item.safeUserPhone)">
  17. <img src="@/pages_manage/images/icon_aqxxp_dh.png">
  18. <view>{{item.safeUserPhone}}</view>
  19. </view>
  20. </view>
  21. <view class="classify" v-for="(item,index) in newData.labInfoBrandModels" :key="index">
  22. <view v-if="item.privateList.length>0 && item.brandType==1" class="small-title">{{item.brandName}}</view>
  23. <view v-if="item.privateList.length>0 && item.brandType==1 && !item.isSpecial" class="small-items" v-for="(item2,index2) in item.privateList" :key="index2">
  24. <view>● </view>
  25. <view>{{item2.infoName}}</view>
  26. </view>
  27. <view v-if="item.privateList.length>0 && item.brandType==1 && item.isSpecial" class="small-items" v-for="(item2,index2) in item.privateList" :key="index2">
  28. <view></view>
  29. <view>{{item2.infoName}}</view>
  30. </view>
  31. <view v-if="item.privateList.length>0 && item.brandType==2" class="logotype">{{item.brandName}}</view>
  32. <view v-if="item.privateList.length>0 && item.brandType==2" class="logotype-img">
  33. <img v-for="(item3,index3) in item.privateList" :key="index3" :src="baseUrl+item3.infoContent">
  34. </view>
  35. </view>
  36. <!-- 二维码 -->
  37. <img v-if="newData.qrCode" class="code-img" :src="newData.qrCode">
  38. </view>
  39. </template>
  40. <script>
  41. import { config } from '@/api/request/config.js'
  42. export default {
  43. name: "safetyCard",
  44. props: {
  45. subjectData: {},
  46. },
  47. data() {
  48. return {
  49. baseUrl:config.base_url,
  50. newData:{}
  51. }
  52. },
  53. created() {
  54. },
  55. mounted() {
  56. this.$set(this, 'newData',this.subjectData);
  57. },
  58. methods: {
  59. //拨打电话
  60. callPhone(tel){
  61. uni.makePhoneCall({
  62. phoneNumber: tel
  63. })
  64. },
  65. },
  66. }
  67. </script>
  68. <style lang="stylus" scoped>
  69. .safetyCard {
  70. width: 750rpx;
  71. .liability-unit{
  72. width: 750rpx;
  73. height: 100rpx;
  74. font-family: PingFang SC;
  75. font-weight: 500;
  76. font-size: 30rpx;
  77. color: #222222;
  78. line-height: 100rpx;
  79. padding-left: 20rpx;
  80. box-sizing: border-box;
  81. background: #fff;
  82. }
  83. .small-title{
  84. width: 750rpx;
  85. height: 100rpx;
  86. font-family: PingFang SC;
  87. font-weight: 500;
  88. font-size: 32rpx;
  89. color: #222222;
  90. line-height: 100rpx;
  91. padding-left: 20rpx;
  92. box-sizing: border-box;
  93. }
  94. .sub-head{
  95. width: 750rpx;
  96. height: 100rpx;
  97. background: #fff;
  98. padding:0 20rpx;
  99. box-sizing: border-box;
  100. display: flex;
  101. justify-content: space-between;
  102. align-items: center;
  103. border-bottom: 1rpx solid #E0E0E0;
  104. >view:nth-of-type(1){
  105. font-family: PingFang SC;
  106. font-weight: 500;
  107. font-size: 28rpx;
  108. color: #999999;
  109. line-height: 30rpx;
  110. }
  111. >view:nth-of-type(2){
  112. display: flex;
  113. justify-content: flex-end;
  114. align-items: center;
  115. >img{
  116. width: 34rpx;
  117. height: 34rpx;
  118. margin-right: 14rpx;
  119. }
  120. >view{
  121. font-family: PingFang SC;
  122. font-weight: 500;
  123. font-size: 28rpx;
  124. color: #0183FA;
  125. line-height: 30rpx;
  126. }
  127. }
  128. }
  129. .sub-head:last-child{
  130. border-bottom: none;
  131. }
  132. .classify{
  133. .small-items{
  134. padding-left: 20rpx;
  135. box-sizing: border-box;
  136. background: #fff;
  137. display: flex;
  138. justify-content: flex-start;
  139. padding: 20rpx;
  140. box-sizing: border-box;
  141. >view:nth-of-type(1){
  142. color: #999999;
  143. margin-right: 12rpx;
  144. }
  145. >view:nth-of-type(2){
  146. display: block;
  147. font-family: PingFang SC;
  148. font-weight: 500;
  149. font-size: 28rpx;
  150. line-height: 34rpx;
  151. color: #999999;
  152. }
  153. }
  154. .logotype{
  155. width: 750rpx;
  156. height: 100rpx;
  157. font-family: PingFang SC;
  158. font-weight: 500;
  159. font-size: 32rpx;
  160. color: #333333;
  161. line-height: 100rpx;
  162. padding-left: 20rpx;
  163. box-sizing: border-box;
  164. background: #0183FA;
  165. }
  166. .logotype-img{
  167. padding: 26rpx 0 34rpx 0;
  168. box-sizing: border-box;
  169. background: #fff;
  170. >img{
  171. display: inline-block;
  172. width: 86rpx;
  173. height: 114rpx;
  174. margin-left: 30rpx;
  175. margin-bottom: 20rpx;
  176. }
  177. }
  178. }
  179. .code-img{
  180. width: 178rpx;
  181. height: 178rpx;
  182. margin: 22rpx 0 50rpx 276rpx;
  183. }
  184. }
  185. </style>