safetyCard.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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>
  9. <img src="@/images/basicsModules/icon_14.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>
  17. <img src="@/images/basicsModules/icon_14.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. }
  92. </script>
  93. <style lang="stylus" scoped>
  94. .safetyCard {
  95. width: 750rpx;
  96. .liability-unit{
  97. width: 750rpx;
  98. height: 100rpx;
  99. font-family: PingFang SC;
  100. font-weight: 500;
  101. font-size: 30rpx;
  102. color: #222222;
  103. line-height: 100rpx;
  104. padding-left: 20rpx;
  105. box-sizing: border-box;
  106. background: #fff;
  107. }
  108. .small-title{
  109. width: 750rpx;
  110. height: 100rpx;
  111. font-family: PingFang SC;
  112. font-weight: 500;
  113. font-size: 32rpx;
  114. color: #222222;
  115. line-height: 100rpx;
  116. padding-left: 20rpx;
  117. box-sizing: border-box;
  118. }
  119. .sub-head{
  120. width: 750rpx;
  121. height: 100rpx;
  122. background: #fff;
  123. padding:0 20rpx;
  124. box-sizing: border-box;
  125. display: flex;
  126. justify-content: space-between;
  127. align-items: center;
  128. border-bottom: 1rpx solid #E0E0E0;
  129. >view:nth-of-type(1){
  130. font-family: PingFang SC;
  131. font-weight: 500;
  132. font-size: 28rpx;
  133. color: #999999;
  134. line-height: 30rpx;
  135. }
  136. >view:nth-of-type(2){
  137. display: flex;
  138. justify-content: flex-end;
  139. align-items: center;
  140. >img{
  141. width: 34rpx;
  142. height: 34rpx;
  143. margin-right: 14rpx;
  144. }
  145. >view{
  146. font-family: PingFang SC;
  147. font-weight: 500;
  148. font-size: 28rpx;
  149. color: #0183FA;
  150. line-height: 30rpx;
  151. }
  152. }
  153. }
  154. .sub-head:last-child{
  155. border-bottom: none;
  156. }
  157. .classify{
  158. .small-items{
  159. padding-left: 20rpx;
  160. box-sizing: border-box;
  161. background: #fff;
  162. display: flex;
  163. justify-content: flex-start;
  164. padding: 20rpx;
  165. box-sizing: border-box;
  166. >view:nth-of-type(1){
  167. color: #999999;
  168. margin-right: 12rpx;
  169. }
  170. >view:nth-of-type(2){
  171. display: block;
  172. font-family: PingFang SC;
  173. font-weight: 500;
  174. font-size: 28rpx;
  175. line-height: 34rpx;
  176. color: #999999;
  177. }
  178. }
  179. .logotype{
  180. width: 750rpx;
  181. height: 100rpx;
  182. font-family: PingFang SC;
  183. font-weight: 500;
  184. font-size: 32rpx;
  185. color: #333333;
  186. line-height: 100rpx;
  187. padding-left: 20rpx;
  188. box-sizing: border-box;
  189. background: #0183FA;
  190. }
  191. .logotype-img{
  192. padding: 26rpx 0 34rpx 0;
  193. box-sizing: border-box;
  194. background: #fff;
  195. >img{
  196. display: inline-block;
  197. width: 86rpx;
  198. height: 114rpx;
  199. margin-left: 30rpx;
  200. margin-bottom: 20rpx;
  201. }
  202. }
  203. }
  204. .code-img{
  205. width: 178rpx;
  206. height: 178rpx;
  207. margin: 22rpx 0 50rpx 276rpx;
  208. }
  209. }
  210. </style>