inspectionremainingproblemsclose.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <!--
  2. * @Title:
  3. * @Description: 巡检遗留问题关闭操作
  4. * @Author: swp
  5. * @Date: 2022-08-24 10:49:21
  6. * @LastEditors:
  7. * @LastEditTime: 2022-08-24 10:49:21
  8. -->
  9. <template>
  10. <view class="container">
  11. <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
  12. @clickLeft="toBack">
  13. <view class="nav-title">
  14. <text>{{title}}</text>
  15. </view>
  16. </uni-nav-bar>
  17. <uni-forms ref="baseForm">
  18. <uni-card title="处理意见" :is-shadow="false">
  19. <uni-easyinput type="textarea" v-model="remainQuestionResolution" placeholder="请输入处理意见" />
  20. </uni-card>
  21. </uni-forms>
  22. <view class="footer">
  23. <view class="control">
  24. <view style="display: flex;flex-direction: row;justify-content: flex-start;">
  25. <view
  26. style="display:flex;flex-direction: row;justify-content: center;width: 90px;height:28px;margin-right: 10px;border-radius:7px;background-color:lightpink"
  27. @click="toSubmit()">
  28. <view style="display:flex;flex-direction: column;justify-content: center;">
  29. <uni-icons class="input-uni-icon" type="location" size="18" color="#999" />
  30. </view>
  31. <view style="display:flex;flex-direction: column;justify-content: center;padding-left:5px;">
  32. <text style="color:black;font-size:0.6rem">立即提交</text>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import http from '@/http/api.js';
  42. import {
  43. pathToBase64,
  44. base64ToPath
  45. } from '@/js_sdk/mmmm-image-tools/index.js';
  46. import {
  47. oss,
  48. devUrl,
  49. prodUrl
  50. } from '@/common/setting';
  51. export default {
  52. components: {
  53. },
  54. onLoad(options) {
  55. this.id = options.id;
  56. },
  57. data() {
  58. return {
  59. title: '巡检遗留问题关闭处理',
  60. id: '',
  61. remainQuestionResolution: '',
  62. }
  63. },
  64. computed: {
  65. },
  66. onShow() {},
  67. created() {},
  68. methods: {
  69. toBack() {
  70. uni.navigateBack({
  71. delta: 1
  72. })
  73. },
  74. toSubmit() {
  75. let formdata = {};
  76. formdata['id'] = Number(this.id);
  77. formdata['remainQuestionResolution'] = this.remainQuestionResolution;
  78. console.log(JSON.stringify(formdata))
  79. http.request({
  80. url: '/galaxy-business/equipment/inspection/report/remainingproblems/close',
  81. method: 'POST',
  82. data: formdata
  83. }).then(res => {
  84. if (res.success) {
  85. uni.showModal({
  86. content: '关闭操作已提交',
  87. showCancel: false,
  88. success(res) {
  89. uni.navigateBack();
  90. }
  91. });
  92. } else {
  93. uni.showModal({
  94. content: '' + res.msg,
  95. showCancel: false
  96. });
  97. }
  98. }).catch(err => {
  99. console.log(err)
  100. })
  101. },
  102. formReset: function(e) {
  103. console.log('清空数据')
  104. },
  105. }
  106. }
  107. </script>
  108. <style>
  109. /* page {
  110. background-color: rgb(240, 242, 244);
  111. } */
  112. </style>
  113. <style lang="scss" scoped>
  114. .footer {
  115. position: fixed;
  116. bottom: 0;
  117. left: 0;
  118. right: 0;
  119. z-index: 1;
  120. height: 100rpx;
  121. padding: 20rpx;
  122. box-sizing: border-box;
  123. display: flex;
  124. align-items: center;
  125. justify-content: flex-end;
  126. background-color: #ffffff;
  127. .ipt {
  128. width: 380rpx;
  129. height: 77rpx;
  130. background: #f7f7f7;
  131. border-radius: 38px;
  132. padding: 0 37rpx;
  133. box-sizing: border-box;
  134. margin-right: 20rpx;
  135. }
  136. .control {
  137. flex: 1;
  138. display: flex;
  139. align-items: center;
  140. justify-content: flex-end;
  141. .block {
  142. display: flex;
  143. align-items: center;
  144. justify-content: center;
  145. flex: 1;
  146. }
  147. .icon {
  148. height: auto;
  149. }
  150. .c {
  151. width: 41rpx;
  152. margin-right: 10rpx;
  153. }
  154. .s {
  155. width: 36rpx;
  156. }
  157. .t {
  158. width: 31rpx;
  159. }
  160. }
  161. }
  162. </style>