gasUseDetail.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <!--气瓶列表-->
  2. <template>
  3. <view id="gasRecycle">
  4. <view class="title">{{specificationName.airName}}-{{specificationName.gasLevel}}</view>
  5. <view class="register_li">
  6. <view class="register_li_min">
  7. <view>实验地点:</view>
  8. <input v-model="form.location" disabled type="text" >
  9. </view>
  10. <view class="register_li_min" style="border: none;">
  11. <view>编号:</view>
  12. <input v-model="form.storageVo.airNumber" disabled type="text" >
  13. </view>
  14. </view>
  15. <view class="register_li">
  16. <view class="register_li_min">
  17. <view>使用人:</view>
  18. <input v-model="form.contacts" disabled type="text" >
  19. </view>
  20. <!-- 使用时间 -->
  21. <view class="register_li_min2">
  22. <view>使用时间:</view>
  23. <picker mode="date" disabled @change="startChange($event)">
  24. <input class="picker-text" v-model="form.useTimeApp" disabled type="text" placeholder="开始时间">
  25. </picker>
  26. <view>-</view>
  27. <picker mode="date" disabled @change="endChange($event)">
  28. <input class="picker-text2" v-model="form.backTimeApp" disabled type="text" placeholder="结束时间">
  29. </picker>
  30. </view>
  31. <view class="register_li_min">
  32. <view>使用量:</view>
  33. <view>{{form.amount+'Mpa'}}</view>
  34. </view>
  35. <view v-if="form.beforeUse" class="register_li_min">
  36. <view>使用前气压:</view>
  37. <view>{{form.beforeUse+'Mpa'}}</view>
  38. </view>
  39. <view v-if="form.beforeUsePic" class="meter_img" :style="!form.afterUse?'border:none;':''" @click="lookItem(form.beforeUsePic)">
  40. <view>气表照片:</view>
  41. <img :src="baseUrl+form.beforeUsePic" >
  42. </view>
  43. <view v-if="form.afterUse" class="register_li_min">
  44. <view>使用后气压:</view>
  45. <view>{{form.afterUse+'Mpa'}}</view>
  46. </view>
  47. <view v-if="form.afterUsePic" class="meter_img" style="border:0;" @click="lookItem(form.afterUsePic)">
  48. <view>气表照片:</view>
  49. <img :src="baseUrl+form.afterUsePic" >
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. import { gasDetailRecordDetail } from '@/api/apiDemo/index.js'
  56. import { config } from '@/api/request/config.js'
  57. export default {
  58. name: "gasRecycle",
  59. data() {
  60. return {
  61. baseUrl:config.base_url,
  62. pageType:0,
  63. //列表请求参数
  64. getData:{
  65. pageNum:1,
  66. pageSize:20,
  67. },
  68. userType:uni.getStorageSync('userType'),
  69. form:{
  70. name:'C123(第一实验室)',
  71. },
  72. dataList:[],
  73. item:{},
  74. specificationName:{},
  75. }
  76. },
  77. onLoad(option) {
  78. this.item=JSON.parse(decodeURIComponent(option.item));
  79. },
  80. onShow() {
  81. },
  82. mounted(){
  83. this.getInfo();
  84. },
  85. methods: {
  86. lookItem(item){
  87. //查看图片
  88. wx.previewImage({
  89. urls: [config.base_url+item], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  90. current: '', // 当前显示图片的http链接,默认是第一个
  91. success: function(res) {},
  92. fail: function(res) {},
  93. complete: function(res) {},
  94. })
  95. },
  96. async getInfo(){
  97. let _this=this;
  98. const {data} = await gasDetailRecordDetail(_this.item.id);
  99. if(data.code==200){
  100. let res = data.data;
  101. _this.form=res;
  102. _this.specificationName=JSON.parse(res.storageVo.specificationName)
  103. }
  104. },
  105. }
  106. }
  107. </script>
  108. <style lang="stylus" scoped>
  109. #gasRecycle {
  110. height: auto;
  111. width: 100%;
  112. flex :1;
  113. display flex;
  114. flex-direction column
  115. overflow hidden;
  116. padding-bottom: 220rpx;
  117. .title{
  118. width: 750rpx;
  119. height: 100rpx;
  120. background: #FFFFFF;
  121. font-size: 28rpx;
  122. font-family: PingFang SC;
  123. font-weight: 500;
  124. color: #333333;
  125. line-height: 100rpx;
  126. padding-left: 40rpx;
  127. }
  128. .register_li{
  129. background #fff;
  130. border-radius:20rpx;
  131. margin:20rpx 20rpx 0;
  132. padding:20rpx 0;
  133. box-sizing: border-box;
  134. .register_li_min{
  135. margin:0 26rpx;
  136. display flex;
  137. align-items center;
  138. border-bottom: 1px solid #F5F5F5;
  139. .icon_img{
  140. width: 30rpx;
  141. height: 30rpx;
  142. margin-right: 12rpx;
  143. }
  144. view{
  145. //width:140rpx;
  146. font-size: 28rpx;
  147. font-family: PingFang SC;
  148. font-weight: 500;
  149. color: #999999;
  150. line-height: 100rpx;
  151. }
  152. >view:nth-child(2){
  153. flex: 1;
  154. text-align: right;
  155. font-size: 24rpx;
  156. font-family: PingFang SC;
  157. font-weight: 500;
  158. color: #333333;
  159. }
  160. >input{
  161. flex:1;
  162. text-align: right;
  163. font-size: 24rpx;
  164. font-family: PingFang SC;
  165. font-weight: 500;
  166. color: #333333;
  167. }
  168. }
  169. /* 时间 */
  170. .register_li_min2{
  171. margin:0 26rpx;
  172. border-bottom: 1px solid #f5f5f5;
  173. height: 100rpx;
  174. display: flex;
  175. justify-content: flex-start;
  176. align-items: center;
  177. >view:nth-child(1){
  178. font-size: 28rpx;
  179. font-family: PingFang SC;
  180. font-weight: 500;
  181. color: #999999;
  182. line-height: 100rpx;
  183. margin-right: 46rpx;
  184. }
  185. .picker-text{
  186. font-size: 24rpx;
  187. font-family: PingFang SC;
  188. font-weight: 500;
  189. color: #333333;
  190. line-height: 100rpx;
  191. width: 240rpx;
  192. }
  193. >view:nth-child(2){
  194. font-size: 24rpx;
  195. font-family: PingFang SC;
  196. font-weight: 500;
  197. color: #333333;
  198. line-height: 100rpx;
  199. }
  200. .picker-text2{
  201. font-size: 24rpx;
  202. font-family: PingFang SC;
  203. font-weight: 500;
  204. color: #333333;
  205. line-height: 100rpx;
  206. width: 240rpx;
  207. text-align: right;
  208. }
  209. }
  210. .meter_img{
  211. margin:0 26rpx;
  212. display flex;
  213. justify-content: space-between;
  214. border-bottom: 1px solid #F5F5F5;
  215. view{
  216. //width:140rpx;
  217. font-size: 28rpx;
  218. font-family: PingFang SC;
  219. font-weight: 500;
  220. color: #999999;
  221. line-height: 100rpx;
  222. }
  223. >img{
  224. width: 150rpx;
  225. height: 150rpx;
  226. border-radius: 10rpx;
  227. margin:42rpx 0 20rpx 0;
  228. }
  229. }
  230. }
  231. }
  232. </style>