chemicalCabinetQRcode.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. <!-- 化学品柜-扫码 -->
  2. <template>
  3. <view class="course">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <view class="header">
  6. <view class="header_l">
  7. <img :src="circularLogo">
  8. </view>
  9. <view class="header_r">
  10. <view class="header_r_t">{{infoData.cabinetName}}</view>
  11. <view class="header_r_b">规格:2门</view>
  12. </view>
  13. </view>
  14. <view class="basics">
  15. <view class="basics_li">
  16. <view class="basics_li_l">学院:</view>
  17. <view class="basics_li_r">{{infoData.deptName}}</view>
  18. </view>
  19. <view class="basics_li">
  20. <view class="basics_li_l">楼栋:</view>
  21. <view class="basics_li_r">{{infoData.buildName?infoData.buildName:'-'}}</view>
  22. </view>
  23. <view class="basics_li" style="border: none;">
  24. <view class="basics_li_l">实验室:</view>
  25. <view class="basics_li_r">{{infoData.subName?infoData.subName:'-'}}</view>
  26. </view>
  27. </view>
  28. <view class="cabinet_y">
  29. <view class="cabinet">
  30. <view class="cabinet_t">{{infoData.cabinetName}}({{infoData.chemicalCount}})</view>
  31. <view class="cabinet_b" @click="handleClick('door')">
  32. <view class="cabinet_b_l">
  33. <view class="small_title"><img src="@/images/Version3.3.7/icon_hxpg_gly.png"><text>管理员:</text></view>
  34. <view class="cabinet_b_l_li">{{infoData.adminSafeName}}</view>
  35. <view class="small_title"><img src="@/images/Version3.3.7/icon_hxpg_hxp.png"><text>化学品数量:</text></view>
  36. <view class="cabinet_b_l_li">{{infoData.chemicalCount}}个</view>
  37. </view>
  38. <view class="cabinet_b_r">
  39. <img src="@/images/Version3.3.7/icon_hxpgm.png"><text>{{infoData.cabinetName}}</text>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </scroll-view>
  45. </view>
  46. </template>
  47. <script>
  48. import { config } from '@/api/request/config.js'
  49. import {hxpCabinetApp} from '@/api/index.js'
  50. export default {
  51. name: "rectifyList",
  52. components: {
  53. },
  54. data() {
  55. return {
  56. circularLogo:uni.getStorageSync('circularLogo'),
  57. baseUrl:config.base_url,
  58. pageType:0,
  59. form:{
  60. },
  61. dialogVisible:false,
  62. isCourse:false,//是否在当前课程名单中
  63. isSucceed:false,//签到成功失败
  64. shadeStatus:0,//遮罩层状态 0是否确认签到 1签到成功或失败
  65. id:7,//化学品柜id
  66. infoData:{},
  67. }
  68. },
  69. onLoad(option) {
  70. this.id=option.code;
  71. },
  72. onShow() {
  73. },
  74. mounted(){
  75. this.hxpCabinetApp();
  76. },
  77. methods: {
  78. //滚动事件
  79. scrollGet(){},
  80. handleClick(doType){
  81. let self=this;
  82. if(doType=='sign'){//签到遮罩层
  83. this.dialogVisible=true;
  84. }else if(doType=='signSubmit'){//确认签到
  85. this.shadeStatus=1;
  86. setTimeout(function () {
  87. self.dialogVisible=false;
  88. }, 3000);
  89. }else if(doType=='door'){//柜门
  90. // uni.navigateTo({
  91. // url: '/pages/pages_patrolInspector/chemicalCatalogue?pageType=1'
  92. // });
  93. }else if(doType=='cancel'){//取消返回小程序首页
  94. }
  95. },
  96. //关闭弹窗
  97. dialogOutfire() {
  98. this.dialogVisible = !this.dialogVisible
  99. },
  100. //详情
  101. async hxpCabinetApp(){
  102. let _this = this;
  103. const {data} = await hxpCabinetApp(this.id);
  104. if(data.code == 200){
  105. this.infoData=data.data;
  106. }
  107. },
  108. //提交
  109. async submitForm(){
  110. let _this = this;
  111. const {data} = await checkClapRectify(_this.form);
  112. if(data.code == 200){
  113. uni.showToast({
  114. title: '提交成功',
  115. icon:"none",
  116. mask:true,
  117. duration: 2000
  118. });
  119. uni.redirectTo({
  120. url: '/pages_safetyExamine/snapshotManage/snapshotList?pageType='+this.pageType
  121. });
  122. }
  123. },
  124. }
  125. }
  126. </script>
  127. <style lang="stylus" scoped>
  128. .course{
  129. height:100%;
  130. display flex;
  131. box-sizing: border-box;
  132. .info-max-box{
  133. flex: 1;
  134. overflow: scroll;
  135. }
  136. .header{
  137. width: 750rpx;
  138. min-height: 275rpx;
  139. background: #0096F3;
  140. display: flex;
  141. justify-content: flex-start;
  142. .header_l{
  143. width: 150rpx;
  144. height: 150rpx;
  145. background: #FFFFFF;
  146. border-radius: 75rpx;
  147. margin:62rpx 40rpx 62rpx 30rpx;
  148. >img{
  149. width: 150rpx;
  150. height: 150rpx;
  151. }
  152. }
  153. .header_r{
  154. .header_r_t{
  155. font-size: 34rpx;
  156. font-family: PingFang SC-Bold, PingFang SC;
  157. font-weight: 400;
  158. color: #FFFFFF;
  159. line-height: 48rpx;
  160. margin-top: 68rpx;
  161. }
  162. .header_r_b{
  163. font-size: 30rpx;
  164. font-family: PingFang SC-Medium, PingFang SC;
  165. font-weight: 400;
  166. color: #FFFFFF;
  167. line-height: 42rpx;
  168. margin-top: 36rpx;
  169. margin-bottom: 20rpx;
  170. }
  171. }
  172. }
  173. .basics{
  174. width: 750rpx;
  175. background: #FFFFFF;
  176. padding: 30rpx 30rpx 0rpx;
  177. box-sizing: border-box;
  178. .basics_li{
  179. width: 690rpx;
  180. height: auto;
  181. border-bottom: 1rpx solid #D8D8D8;
  182. padding: 20rpx 0;
  183. box-sizing: border-box;
  184. display: flex;
  185. justify-content: space-between;
  186. .basics_li_l{
  187. font-size: 28rpx;
  188. font-family: PingFang SC-Medium, PingFang SC;
  189. font-weight: 400;
  190. color: #666666;
  191. line-height: 40rpx;
  192. }
  193. .basics_li_r{
  194. flex: 1;
  195. font-size: 28rpx;
  196. font-family: PingFang SC-Medium, PingFang SC;
  197. font-weight: 400;
  198. color: #333333;
  199. line-height: 40rpx;
  200. text-align: right;
  201. }
  202. }
  203. }
  204. .cabinet_y{
  205. width: 750rpx;
  206. height: auto;
  207. background: #FFFFFF;
  208. padding: 40rpx 125rpx 78rpx;
  209. box-sizing: border-box;
  210. margin-top: 20rpx;
  211. .cabinet{
  212. .cabinet_t{
  213. width: 500rpx;
  214. height: 80rpx;
  215. background: #FDAF5C;
  216. border-radius: 20rpx 20rpx 0rpx 0rpx;
  217. font-size: 28rpx;
  218. font-family: PingFang SC-Medium, PingFang SC;
  219. font-weight: 400;
  220. color: #FFFFFF;
  221. line-height: 80rpx;
  222. text-align: center;
  223. }
  224. .cabinet_b{
  225. display: flex;
  226. justify-content:flex-start;
  227. .cabinet_b_l{
  228. width: 250rpx;
  229. height: 500rpx;
  230. background: #FDAF5C;
  231. border-radius: 0rpx 0rpx 0rpx 20rpx;
  232. border-right: 1rpx solid #E0E0E0;
  233. padding: 0 0 0 26rpx;
  234. box-sizing: border-box;
  235. border-top: 1rpx solid #E0E0E0;
  236. .small_title{
  237. display: flex;
  238. align-items: center;
  239. margin-top:42rpx;
  240. >img{
  241. width: 30rpx;
  242. height: 30rpx;
  243. margin-right: 6rpx;
  244. }
  245. >text{
  246. font-size: 28rpx;
  247. font-family: PingFang SC-Medium, PingFang SC;
  248. font-weight: 400;
  249. color: #FFFFFF;
  250. line-height: 40rpx;
  251. }
  252. }
  253. .cabinet_b_l_li{
  254. font-size: 24rpx;
  255. font-family: PingFang SC-Medium, PingFang SC;
  256. font-weight: 400;
  257. color: #FFFFFF;
  258. line-height: 34rpx;
  259. margin-top: 12rpx;
  260. padding-left: 42rpx;
  261. box-sizing: border-box;
  262. }
  263. }
  264. .cabinet_b_r{
  265. width: 250rpx;
  266. height: 500rpx;
  267. background: #FDAF5C;
  268. border-radius: 0rpx 0rpx 20rpx 0rpx;
  269. display: flex;
  270. align-items: center;
  271. border-top: 1rpx solid #E0E0E0;
  272. >img{
  273. width: 30rpx;
  274. height: 80rpx;
  275. margin: 0 20rpx;
  276. }
  277. >text{
  278. font-size: 28rpx;
  279. font-family: PingFang SC-Medium, PingFang SC;
  280. font-weight: 400;
  281. color: #FFFFFF;
  282. line-height: 40rpx;
  283. }
  284. }
  285. }
  286. }
  287. }
  288. }
  289. </style>