chemicalCabinetQRcode.vue 9.5 KB

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