useRecordDetail.vue 6.1 KB

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