unprocessDetail.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view>
  3. <view class="timeBox flex justify-between align-center padding-lr-sm">
  4. <view class="time">{{this.getData.cl_time}}</view>
  5. <button class="cu-btn radius bg-green sm">{{this.getData.wtype}}</button>
  6. </view>
  7. <view >
  8. <!-- 基本信息start -->
  9. <view class="basic-info">
  10. <view class="info-tit margin-left-xs">
  11. <text class="cuIcon-titles margin-right-xs"></text>
  12. 基本信息
  13. </view>
  14. <view class="info-content">
  15. <view class="info-one-info ">
  16. <text>{{type==1?this.getData.artificial_code:this.getData.supervise_code}}</text>
  17. </view>
  18. <view>
  19. <text>{{this.getData.content}}</text>
  20. </view>
  21. </view>
  22. </view>
  23. <!-- 基本信息end -->
  24. <!-- 处理信息start -->
  25. <view class="processStatus">
  26. <view class="info-tit margin-left-xs">
  27. <text class="cuIcon-titles margin-right-xs"></text>
  28. 处理内容
  29. </view>
  30. <view class="padding-lr padding-bottom-lg">
  31. <form action="">
  32. <radio-group name="gender" class="" @change="RadioChange">
  33. <label class="margin-right">
  34. <radio value="0" checked /><text>单个处理</text>
  35. </label>
  36. <label>
  37. <radio value="1" /><text>批量处理</text>
  38. </label>
  39. </radio-group>
  40. <view class="cu-form-group">
  41. <textarea class="JTxtArea lg"
  42. :maxlength="50"
  43. v-model="msg"
  44. :data-maxnum="reason.length+'/50'" placeholder="备注信息,最多可输入50个字..."
  45. auto-height
  46. @input="inputReason"
  47. :name="reason"></textarea>
  48. </view>
  49. <view class="btn-area">
  50. <button class="bg-blue round margin-top" @click="$noMultipleClicks(powerSubmit())">提 交 </button>
  51. </view>
  52. </form>
  53. </view>
  54. </view>
  55. <!-- 处理状态end -->
  56. </view>
  57. </view>
  58. </template>
  59. <script>
  60. export default {
  61. data() {
  62. return {
  63. noClick:true,
  64. reason: '',
  65. type: 0,
  66. msg: '',
  67. getData:{},
  68. radioOne: 0,
  69. }
  70. },
  71. onLoad: function(option) {
  72. this.type=option.type;
  73. if(option.type==1){
  74. uni.setNavigationBarTitle({
  75. title: "消防支队人工督察单详情页",
  76. });
  77. }else{
  78. uni.setNavigationBarTitle({
  79. title: "消防支队电子督察单详情页",
  80. });
  81. }
  82. this.getDetailData({
  83. "id": option.id,
  84. "company_code": uni.getStorageSync('selectedCode')
  85. })
  86. },
  87. methods: {
  88. RadioChange(e) {
  89. this.radioOne = e.detail.value;
  90. console.log(this.radioOne)
  91. },
  92. powerSubmit() {
  93. if(!this.msg.replace(/^\s*/g,'')){
  94. uni.showToast({
  95. title: "请输入处理内容",
  96. icon:"none"
  97. });
  98. }else{
  99. this.powerSubmitRes({
  100. "id": this.getData.id,
  101. "company_code":this.getData.company_code,
  102. "plcl": this.radioOne,
  103. "artificial_code": this.type==1?this.getData.artificial_id:this.getData.supervise_id,
  104. "clnr": this.msg,
  105. })
  106. }
  107. },
  108. async powerSubmitRes(params = {}) {
  109. const res = await this.$myRequest({
  110. url: this.type==1?'FireInspector/setManualInspector':'FireInspector/setElectronicInspector',
  111. data: params
  112. })
  113. if(res.data.flag){
  114. uni.showToast({
  115. title: "提交成功",
  116. });
  117. setTimeout(() => {
  118. uni.navigateTo({
  119. url: '/pages/inspectList/processList/processList?type='+this.type,
  120. });
  121. }, 1000);
  122. }
  123. },
  124. //回显信息
  125. async getDetailData(params = {}) {
  126. const res = await this.$myRequest({
  127. url: this.type==1?'FireInspector/getManualInspectorDetails':'FireInspector/getElectronicInspectorDetails',
  128. data: params,
  129. showLoading: true
  130. })
  131. this.getData = res.data.data[0];
  132. console.log(this.getData)
  133. },
  134. inputReason(e) {
  135. this.reason = e.detail.value;
  136. },
  137. textareaAInput(e) {
  138. this.textareaAValue = e.detail.value
  139. },
  140. }
  141. }
  142. </script>
  143. <style lang="scss">
  144. .timeBox {
  145. height: 88rpx;
  146. background: #EFF4FF;
  147. line-height: 88rpx;
  148. .time {
  149. color: #333
  150. }
  151. }
  152. .info-tit {
  153. color: #4074E7;
  154. line-height: 90rpx;
  155. height: 90rpx;
  156. }
  157. // 基本信息
  158. .info-content>view {
  159. margin-left: 24rpx;
  160. border-bottom: 1px solid #EDEDED;
  161. line-height: 92rpx;
  162. color: #666;
  163. }
  164. .info-content view text:first-child {
  165. width: 160rpx;
  166. display: inline-block
  167. }
  168. </style>