safetyCard.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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="@/images/basicsModules/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">
  15. <view>{{item.safeUserName}}</view>
  16. <view @click="callPhone(item.safeUserPhone)">
  17. <img src="@/images/basicsModules/icon_aqxxp_dh.png">
  18. <view>{{item.safeUserPhone}}</view>
  19. </view>
  20. </view>
  21. <view class="classify" v-for="(item,index) in newData.labInfoBrandModels">
  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">
  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" :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 {} from '@/api/basicsModules/index.js'
  38. import { config } from '@/api/request/config.js'
  39. export default {
  40. name: "safetyCard",
  41. props: {
  42. subjectData: {},
  43. },
  44. data() {
  45. return {
  46. baseUrl:config.base_url,
  47. newData:{
  48. data1:'学院名称',
  49. data2:'曹秀康',
  50. data3:'155222663355',
  51. data4:[{name:'曹秀康',phone:'155222663355'},{name:'曹秀康',phone:'155222663355'},],
  52. data5:[
  53. { type:1,
  54. name:'主要危险类别',
  55. child:[{name:'火灾'},{name:'盗窃'},{name:'高温'},{name:'化学试剂使用不当引发的燃烧、爆炸等风险化学试剂使用不当引发的燃烧、爆炸等风险'},]
  56. },
  57. { type:1,
  58. name:'风险防控措施',
  59. child:[{name:'配备灭火器、灭火毯'},{name:'安装监控、无人时关闭门窗'}]
  60. },
  61. { type:1,
  62. name:'灭火要点',
  63. child:[{name:'干粉灭火'},{name:'灭火毯灭火'}]
  64. },
  65. { type:2,
  66. name:'安全警示标识',
  67. child:[
  68. {img: require('@/images/basicsModules/icon_yw_yc.png')},
  69. {img: require('@/images/basicsModules/icon_yw_yc.png')},
  70. {img: require('@/images/basicsModules/icon_yw_yc.png')},
  71. {img: require('@/images/basicsModules/icon_yw_yc.png')},
  72. {img: require('@/images/basicsModules/icon_yw_yc.png')},
  73. {img: require('@/images/basicsModules/icon_yw_yc.png')},
  74. {img: require('@/images/basicsModules/icon_yw_yc.png')},
  75. {img: require('@/images/basicsModules/icon_yw_yc.png')},
  76. {img: require('@/images/basicsModules/icon_yw_yc.png')},
  77. ]
  78. },
  79. ],
  80. qrCode:require('@/images/basicsModules/icon_yw_yc.png'),
  81. }
  82. }
  83. },
  84. created() {
  85. },
  86. mounted() {
  87. this.$set(this, 'newData',this.subjectData);
  88. },
  89. methods: {
  90. //拨打电话
  91. callPhone(tel){
  92. uni.makePhoneCall({
  93. phoneNumber: tel
  94. })
  95. },
  96. },
  97. }
  98. </script>
  99. <style lang="stylus" scoped>
  100. .safetyCard {
  101. width: 750rpx;
  102. .liability-unit{
  103. width: 750rpx;
  104. height: 100rpx;
  105. font-family: PingFang SC;
  106. font-weight: 500;
  107. font-size: 30rpx;
  108. color: #222222;
  109. line-height: 100rpx;
  110. padding-left: 20rpx;
  111. box-sizing: border-box;
  112. background: #fff;
  113. }
  114. .small-title{
  115. width: 750rpx;
  116. height: 100rpx;
  117. font-family: PingFang SC;
  118. font-weight: 500;
  119. font-size: 32rpx;
  120. color: #222222;
  121. line-height: 100rpx;
  122. padding-left: 20rpx;
  123. box-sizing: border-box;
  124. }
  125. .sub-head{
  126. width: 750rpx;
  127. height: 100rpx;
  128. background: #fff;
  129. padding:0 20rpx;
  130. box-sizing: border-box;
  131. display: flex;
  132. justify-content: space-between;
  133. align-items: center;
  134. border-bottom: 1rpx solid #E0E0E0;
  135. >view:nth-of-type(1){
  136. font-family: PingFang SC;
  137. font-weight: 500;
  138. font-size: 28rpx;
  139. color: #999999;
  140. line-height: 30rpx;
  141. }
  142. >view:nth-of-type(2){
  143. display: flex;
  144. justify-content: flex-end;
  145. align-items: center;
  146. >img{
  147. width: 34rpx;
  148. height: 34rpx;
  149. margin-right: 14rpx;
  150. }
  151. >view{
  152. font-family: PingFang SC;
  153. font-weight: 500;
  154. font-size: 28rpx;
  155. color: #0183FA;
  156. line-height: 30rpx;
  157. }
  158. }
  159. }
  160. .sub-head:last-child{
  161. border-bottom: none;
  162. }
  163. .classify{
  164. .small-items{
  165. padding-left: 20rpx;
  166. box-sizing: border-box;
  167. background: #fff;
  168. display: flex;
  169. justify-content: flex-start;
  170. padding: 20rpx;
  171. box-sizing: border-box;
  172. >view:nth-of-type(1){
  173. color: #999999;
  174. margin-right: 12rpx;
  175. }
  176. >view:nth-of-type(2){
  177. display: block;
  178. font-family: PingFang SC;
  179. font-weight: 500;
  180. font-size: 28rpx;
  181. line-height: 34rpx;
  182. color: #999999;
  183. }
  184. }
  185. .logotype{
  186. width: 750rpx;
  187. height: 100rpx;
  188. font-family: PingFang SC;
  189. font-weight: 500;
  190. font-size: 32rpx;
  191. color: #333333;
  192. line-height: 100rpx;
  193. padding-left: 20rpx;
  194. box-sizing: border-box;
  195. background: #0183FA;
  196. }
  197. .logotype-img{
  198. padding: 26rpx 0 34rpx 0;
  199. box-sizing: border-box;
  200. background: #fff;
  201. >img{
  202. display: inline-block;
  203. width: 86rpx;
  204. height: 114rpx;
  205. margin-left: 30rpx;
  206. margin-bottom: 20rpx;
  207. }
  208. }
  209. }
  210. .code-img{
  211. width: 178rpx;
  212. height: 178rpx;
  213. margin: 22rpx 0 50rpx 276rpx;
  214. }
  215. }
  216. </style>