safetyCard.vue 4.3 KB

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