chemicalCabinetQRcode.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  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">规格:{{infoData.cabinetNorms}}门</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" @click="handleClick('door')"><view></view><view>{{infoData.cabinetName}}</view></view>
  31. <view class="cabinet_b">
  32. <view class="cabinet_l">
  33. <view class="cabinet_l_li" v-for="(item,index) in infoData.leftList" :key="index">
  34. <view class="cabinet_l_li_t">{{item.doorName}}</view>
  35. <view class="cabinet_l_li_m">数 量:{{item.chemicalNum}}</view>
  36. <view class="cabinet_l_li_b">
  37. <view class="cabinet_l_li_b_l">管理员:</view>
  38. <view class="cabinet_l_li_b_r">
  39. <view v-for="(item2,index2) in item.cabinetAdminModelList" :key="index2">{{item2.userName}}</view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="cabinet_r">
  45. <view class="cabinet_l_li" v-for="(item,index) in infoData.rightList" :key="index">
  46. <view class="cabinet_l_li_t">{{item.doorName}}</view>
  47. <view class="cabinet_l_li_m">数 量:{{item.chemicalNum}}</view>
  48. <view class="cabinet_l_li_b">
  49. <view class="cabinet_l_li_b_l">管理员:</view>
  50. <view class="cabinet_l_li_b_r">
  51. <view v-for="(item2,index2) in item.cabinetAdminModelList" :key="index2">{{item2.userName}}</view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <img v-if="infoData.cabinetDoorModelList.length==1" class="left-handle" src="@/pages/images/handle-icon.png">
  57. <img v-if="infoData.cabinetDoorModelList.length<=2" class="right-handle" src="@/pages/images/handle-icon.png">
  58. </view>
  59. </view>
  60. </view>
  61. </scroll-view>
  62. </view>
  63. </template>
  64. <script>
  65. import { config } from '@/api/request/config.js'
  66. import {chemicalAppletCabinetDetail} from '@/pages/api/index.js'
  67. export default {
  68. name: "rectifyList",
  69. components: {
  70. },
  71. data() {
  72. return {
  73. circularLogo:uni.getStorageSync('circularLogo'),
  74. baseUrl:config.base_url,
  75. pageType:0,
  76. form:{
  77. },
  78. id:'',//化学品柜id
  79. infoData:{
  80. cabinetDoorModelList:[],
  81. },
  82. }
  83. },
  84. onLoad(option) {
  85. this.id=option.code;
  86. },
  87. onShow() {
  88. },
  89. mounted(){
  90. this.chemicalAppletCabinetDetail();
  91. },
  92. methods: {
  93. //滚动事件
  94. scrollGet(){},
  95. handleClick(doType){
  96. let self=this;
  97. if(doType=='door'){
  98. uni.navigateTo({
  99. url: '/pages/views/pages_patrolInspector/chemicalCatalogue'
  100. });
  101. }
  102. },
  103. //详情
  104. async chemicalAppletCabinetDetail(){
  105. let _this = this;
  106. const {data} = await chemicalAppletCabinetDetail({cabinetId:this.id});
  107. if(data.code == 200){
  108. let leftList=[];
  109. let rightList=[];
  110. if(data.data.cabinetDoorModelList.length<=2){
  111. for(let i=0;i<data.data.cabinetDoorModelList.length;i++){
  112. leftList.push(data.data.cabinetDoorModelList[i])
  113. }
  114. }
  115. if(data.data.cabinetDoorModelList.length>2){
  116. for(let i=0;i<data.data.cabinetDoorModelList.length;i++){
  117. if(i%2==0){
  118. leftList.push(data.data.cabinetDoorModelList[i])
  119. }else{
  120. rightList.push(data.data.cabinetDoorModelList[i])
  121. }
  122. }
  123. }
  124. data.data.leftList=leftList;
  125. data.data.rightList=rightList;
  126. this.$set(this, 'infoData', data.data);
  127. }
  128. },
  129. }
  130. }
  131. </script>
  132. <style lang="stylus" scoped>
  133. .course{
  134. height:100%;
  135. display flex;
  136. box-sizing: border-box;
  137. .info-max-box{
  138. flex: 1;
  139. overflow: scroll;
  140. }
  141. .header{
  142. width: 750rpx;
  143. min-height: 275rpx;
  144. background: #0096F3;
  145. display: flex;
  146. justify-content: flex-start;
  147. .header_l{
  148. width: 150rpx;
  149. height: 150rpx;
  150. background: #FFFFFF;
  151. border-radius: 75rpx;
  152. margin:62rpx 40rpx 62rpx 30rpx;
  153. >img{
  154. width: 150rpx;
  155. height: 150rpx;
  156. }
  157. }
  158. .header_r{
  159. .header_r_t{
  160. font-size: 34rpx;
  161. font-family: PingFang SC-Bold, PingFang SC;
  162. font-weight: 400;
  163. color: #FFFFFF;
  164. line-height: 48rpx;
  165. margin-top: 68rpx;
  166. }
  167. .header_r_b{
  168. font-size: 30rpx;
  169. font-family: PingFang SC-Medium, PingFang SC;
  170. font-weight: 400;
  171. color: #FFFFFF;
  172. line-height: 42rpx;
  173. margin-top: 36rpx;
  174. margin-bottom: 20rpx;
  175. }
  176. }
  177. }
  178. .basics{
  179. width: 750rpx;
  180. background: #FFFFFF;
  181. padding: 30rpx 30rpx 0rpx;
  182. box-sizing: border-box;
  183. .basics_li{
  184. width: 690rpx;
  185. height: auto;
  186. border-bottom: 1rpx solid #D8D8D8;
  187. padding: 20rpx 0;
  188. box-sizing: border-box;
  189. display: flex;
  190. justify-content: space-between;
  191. .basics_li_l{
  192. font-size: 28rpx;
  193. font-family: PingFang SC-Medium, PingFang SC;
  194. font-weight: 400;
  195. color: #666666;
  196. line-height: 40rpx;
  197. }
  198. .basics_li_r{
  199. flex: 1;
  200. font-size: 28rpx;
  201. font-family: PingFang SC-Medium, PingFang SC;
  202. font-weight: 400;
  203. color: #333333;
  204. line-height: 40rpx;
  205. text-align: right;
  206. }
  207. }
  208. }
  209. .cabinet_y{
  210. width: 750rpx;
  211. background: #FFFFFF;
  212. padding: 40rpx 125rpx 78rpx;
  213. box-sizing: border-box;
  214. margin-top: 20rpx;
  215. .cabinet{
  216. position: relative;
  217. width: 500rpx;
  218. height: 650rpx;
  219. background: url("@/pages/images/doors-icon.png") no-repeat center 0px;
  220. background-position: center 0px;
  221. background-size: cover;
  222. padding: 12rpx 16rpx 0;
  223. box-sizing: border-box;
  224. .cabinet_t{
  225. height: 86rpx;
  226. display: flex;
  227. justify-content: flex-start;
  228. align-items: center;
  229. >view:nth-of-type(1){
  230. width: 24rpx;
  231. height: 24rpx;
  232. background: #FFFFFF;
  233. border-radius: 12rpx;
  234. margin-right: 16rpx;
  235. margin-left: 26rpx;
  236. }
  237. >view:nth-of-type(2){
  238. font-weight: 400;
  239. font-size: 30rpx;
  240. color: #FFFFFF;
  241. line-height: 43rpx;
  242. text-align: left;
  243. font-style: normal;
  244. text-transform: none;
  245. }
  246. }
  247. .cabinet_b{
  248. display: flex;
  249. justify-content: flex-start;
  250. .cabinet_l{
  251. height: 516rpx;
  252. padding: 40rpx 0 0 24rpx;
  253. box-sizing: border-box;
  254. overflow-y: auto;
  255. .cabinet_l_li{
  256. width: 198rpx;
  257. padding: 0 20rpx 16rpx;
  258. box-sizing: border-box;
  259. background: rgba(255,255,255,0.2);
  260. border-radius: 10rpx;
  261. margin-bottom: 20rpx;
  262. .cabinet_l_li_t{
  263. font-weight: 500;
  264. font-size: 24rpx;
  265. color: #FFFFFF;
  266. line-height: 60rpx;
  267. text-align: center;
  268. border-bottom: 2rpx solid #FFFFFF;
  269. }
  270. .cabinet_l_li_m{
  271. font-weight: 400;
  272. font-size: 20rpx;
  273. color: #FFFFFF;
  274. line-height: 29rpx;
  275. margin-top: 26rpx;
  276. }
  277. .cabinet_l_li_b{
  278. display: flex;
  279. justify-content: flex-start;
  280. margin-top: 22rpx;
  281. .cabinet_l_li_b_l{
  282. font-weight: 400;
  283. font-size: 20rpx;
  284. color: #FFFFFF;
  285. line-height: 29rpx;
  286. }
  287. .cabinet_l_li_b_r{
  288. >view{
  289. font-weight: 400;
  290. font-size: 20rpx;
  291. color: #FFFFFF;
  292. line-height: 29rpx;
  293. margin-bottom: 10rpx;
  294. }
  295. }
  296. }
  297. }
  298. }
  299. .cabinet_r{
  300. height: 516rpx;
  301. padding: 40rpx 0 0 24rpx;
  302. box-sizing: border-box;
  303. overflow-y: auto;
  304. .cabinet_l_li{
  305. width: 198rpx;
  306. padding: 0 20rpx 16rpx;
  307. box-sizing: border-box;
  308. background: rgba(255,255,255,0.2);
  309. border-radius: 10rpx;
  310. margin-bottom: 20rpx;
  311. .cabinet_l_li_t{
  312. font-weight: 500;
  313. font-size: 24rpx;
  314. color: #FFFFFF;
  315. line-height: 60rpx;
  316. text-align: center;
  317. border-bottom: 2rpx solid #FFFFFF;
  318. }
  319. .cabinet_l_li_m{
  320. font-weight: 400;
  321. font-size: 20rpx;
  322. color: #FFFFFF;
  323. line-height: 29rpx;
  324. margin-top: 26rpx;
  325. }
  326. .cabinet_l_li_b{
  327. display: flex;
  328. justify-content: flex-start;
  329. margin-top: 22rpx;
  330. .cabinet_l_li_b_l{
  331. font-weight: 400;
  332. font-size: 20rpx;
  333. color: #FFFFFF;
  334. line-height: 29rpx;
  335. }
  336. .cabinet_l_li_b_r{
  337. >view{
  338. font-weight: 400;
  339. font-size: 20rpx;
  340. color: #FFFFFF;
  341. line-height: 29rpx;
  342. margin-bottom: 10rpx;
  343. }
  344. }
  345. }
  346. }
  347. }
  348. }
  349. .left-handle{
  350. width: 26rpx;
  351. height: 100rpx;
  352. position: absolute;
  353. left: 210rpx;
  354. top: 274rpx;
  355. }
  356. .right-handle{
  357. width: 26rpx;
  358. height: 100rpx;
  359. position: absolute;
  360. left: 262rpx;
  361. top: 274rpx;
  362. }
  363. }
  364. }
  365. }
  366. </style>