amendAir.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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="item.location" disabled type="text" >
  9. </view>
  10. <view class="register_li_min" style="border: none;">
  11. <view>编号:</view>
  12. <input v-model="item.airNumber" disabled type="text" >
  13. </view>
  14. </view>
  15. <view class="register_li2">
  16. <view class="register_li_min">
  17. <view></view>
  18. <view>实际气压:</view>
  19. <input v-model="form.afterEdit" type="text" placeholder="请输入实际气压">
  20. </view>
  21. </view>
  22. <view class="sub_btn" @click="submitForm()">提交</view>
  23. </view>
  24. </template>
  25. <script>
  26. import { gasBottleError } from '@/api/apiDemo/index.js'
  27. import { config } from '@/api/request/config.js'
  28. export default {
  29. name: "gasRecycle",
  30. data() {
  31. return {
  32. baseUrl:config.base_url,
  33. pageType:0,
  34. //列表请求参数
  35. getData:{
  36. pageNum:1,
  37. pageSize:20,
  38. },
  39. userType:uni.getStorageSync('userType'),
  40. form:{
  41. },
  42. dataList:[],
  43. imgList:[],
  44. item:{},
  45. item2:{},
  46. specificationName:{},
  47. }
  48. },
  49. onLoad(option) {
  50. this.item=JSON.parse(decodeURIComponent(option.item));
  51. this.item2=JSON.parse(decodeURIComponent(option.item2));
  52. this.specificationName=JSON.parse(this.item.specificationName)
  53. },
  54. onShow() {
  55. },
  56. mounted(){
  57. },
  58. methods: {
  59. //提交
  60. async submitForm(){
  61. let _this = this;
  62. _this.form.storageId=_this.item.id
  63. _this.form.location=_this.item.location
  64. _this.form.locationId=_this.item.locationId
  65. _this.form.beforeEdit=_this.item2.beforeUse
  66. const {data} = await gasBottleError(_this.form);
  67. if(data.code == 200){
  68. uni.showToast({
  69. title: '修改气压成功!',
  70. icon:"none",
  71. mask:true,
  72. duration: 2000
  73. });
  74. setTimeout(function(){
  75. uni.redirectTo({
  76. url: '/pages_student/gasManage/gasManage'
  77. });
  78. },2000);
  79. }
  80. },
  81. }
  82. }
  83. </script>
  84. <style lang="stylus" scoped>
  85. #gasRecycle {
  86. height: auto;
  87. width: 100%;
  88. flex :1;
  89. display flex;
  90. flex-direction column;
  91. overflow hidden;
  92. padding-bottom: 400rpx;
  93. .title{
  94. width: 750rpx;
  95. height: 100rpx;
  96. background: #FFFFFF;
  97. font-size: 28rpx;
  98. font-family: PingFang SC;
  99. font-weight: 500;
  100. color: #333333;
  101. line-height: 100rpx;
  102. padding-left: 40rpx;
  103. }
  104. .register_li{
  105. background #fff;
  106. border-radius:20rpx;
  107. margin:20rpx 20rpx 0;
  108. padding:20rpx 0;
  109. box-sizing: border-box;
  110. .register_li_min{
  111. margin:0 26rpx;
  112. display flex;
  113. align-items center;
  114. border-bottom: 1px solid #F5F5F5;
  115. .icon_img{
  116. width: 30rpx;
  117. height: 30rpx;
  118. margin-right: 12rpx;
  119. }
  120. view{
  121. //width:140rpx;
  122. font-size: 28rpx;
  123. font-family: PingFang SC;
  124. font-weight: 500;
  125. color: #999999;
  126. line-height: 100rpx;
  127. }
  128. >input{
  129. flex:1;
  130. text-align: right;
  131. font-size: 24rpx;
  132. font-family: PingFang SC;
  133. font-weight: 500;
  134. color: #333333;
  135. }
  136. }
  137. }
  138. .register_li2{
  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:nth-child(1){
  155. color:red;
  156. line-height:28rpx;
  157. margin-right: 12rpx;
  158. }
  159. view{
  160. //width:140rpx;
  161. font-size: 28rpx;
  162. font-family: PingFang SC;
  163. font-weight: 500;
  164. color: #333333;
  165. line-height: 100rpx;
  166. }
  167. >input{
  168. flex:1;
  169. text-align: right;
  170. font-size: 24rpx;
  171. font-family: PingFang SC;
  172. font-weight: 500;
  173. color: #999999;
  174. }
  175. .issue_img{
  176. width: 210rpx;
  177. height: 210rpx;
  178. border-radius: 10rpx;
  179. margin:36rpx 0 20rpx 280rpx;
  180. }
  181. }
  182. }
  183. /* 按钮 */
  184. .sub_btn{
  185. width: 650rpx;
  186. height: 100rpx;
  187. background: #0183FA;
  188. border-radius: 20rpx;
  189. font-size: 28rpx;
  190. font-family: PingFang SC;
  191. font-weight: 500;
  192. color: #FFFFFF;
  193. line-height: 100rpx;
  194. text-align: center;
  195. margin-left: 50rpx;
  196. position: fixed;
  197. bottom:30rpx;
  198. z-index: 1000;
  199. }
  200. }
  201. </style>