unprocessDetail.vue 4.1 KB

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