processDetailEle.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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 sm" :class="[this.clzt=='1'?'bg-green':'bg-red']" >{{this.clzt=='1'?'已处理':'未处理'}}</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 style="width:100%!important">{{type==1?this.getData.artificial_code:this.getData.supervise_code}}:</text>
  17. <text style="width:100%!important">{{this.getData.content}}</text>
  18. </view>
  19. </view>
  20. </view>
  21. <!-- 基本信息end -->
  22. <!-- 处理信息start -->
  23. <view class="processStatus" v-if="this.clzt=='0'">
  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. <!-- 处理信息start -->
  55. <view class="processStatus" v-else>
  56. <view class="info-tit margin-left-xs">
  57. <text class="cuIcon-titles margin-right-xs"></text>
  58. 处理信息
  59. </view>
  60. <view class="info-content">
  61. <view class="info-one-info ">
  62. <text style="width:140px!important">处理账号/电话:</text>
  63. <text>{{this.getData.clr_phone}}</text>
  64. </view>
  65. <view>
  66. <text>处理时间:</text>
  67. <text>{{this.getData.cl_time}}</text>
  68. </view>
  69. <view>
  70. <text>处理内容:</text>
  71. <text>{{this.getData.clnr}}</text>
  72. </view>
  73. </view>
  74. </view>
  75. <!-- 处理状态end -->
  76. </view>
  77. </view>
  78. </template>
  79. <script>
  80. export default {
  81. data() {
  82. return {
  83. noClick:true,
  84. reason: '',
  85. type: 0,
  86. msg: '',
  87. getData:{},
  88. radioOne: 0,
  89. clzt:0
  90. }
  91. },
  92. onLoad: function(option) {
  93. this.type=option.type;
  94. if(option.type==1){
  95. uni.setNavigationBarTitle({
  96. title: "消防支队人工督察单详情页",
  97. });
  98. }else{
  99. uni.setNavigationBarTitle({
  100. title: "消防支队电子督察单详情页",
  101. });
  102. }
  103. this.getDetailData({
  104. "id": option.id,
  105. "company_code": uni.getStorageSync('selectedCode')
  106. })
  107. },
  108. methods: {
  109. RadioChange(e) {
  110. this.radioOne = e.detail.value;
  111. console.log(this.radioOne)
  112. },
  113. powerSubmit() {
  114. if(!this.msg.replace(/^\s*/g,'')){
  115. uni.showToast({
  116. title: "请输入处理内容",
  117. icon:"none"
  118. });
  119. }else{
  120. this.powerSubmitRes({
  121. "id": this.getData.id,
  122. "company_code":this.getData.company_code,
  123. "plcl": this.radioOne,
  124. "artificial_code": this.type==1?this.getData.artificial_id:this.getData.supervise_id,
  125. "clnr": this.msg,
  126. })
  127. }
  128. },
  129. async powerSubmitRes(params = {}) {
  130. const res = await this.$myRequest({
  131. url: this.type==1?'FireInspector/setManualInspector':'FireInspector/setElectronicInspector',
  132. data: params
  133. })
  134. if(res.data.flag){
  135. uni.showToast({
  136. title: "提交成功",
  137. });
  138. setTimeout(() => {
  139. uni.navigateTo({
  140. url: '/pages/inspectList/processList/processList?type='+this.type,
  141. });
  142. }, 1000);
  143. }
  144. },
  145. //回显信息
  146. async getDetailData(params = {}) {
  147. const res = await this.$myRequest({
  148. url: this.type==1?'FireInspector/getManualInspectorDetails':'FireInspector/getElectronicInspectorDetails',
  149. data: params,
  150. showLoading: true
  151. })
  152. this.getData = res.data.data[0];
  153. this.clzt=this.getData.clzt
  154. console.log(this.getData)
  155. },
  156. inputReason(e) {
  157. this.reason = e.detail.value;
  158. },
  159. textareaAInput(e) {
  160. this.textareaAValue = e.detail.value
  161. },
  162. }
  163. }
  164. </script>
  165. <style lang="scss">
  166. .timeBox {
  167. height: 88rpx;
  168. background: #EFF4FF;
  169. line-height: 88rpx;
  170. .time {
  171. color: #333
  172. }
  173. }
  174. .info-tit {
  175. color: #4074E7;
  176. line-height: 90rpx;
  177. height: 90rpx;
  178. }
  179. // 基本信息
  180. .info-content>view {
  181. margin-left: 24rpx;
  182. border-bottom: 1px solid #EDEDED;
  183. line-height: 92rpx;
  184. color: #666;
  185. }
  186. .info-content view text:first-child {
  187. width: 160rpx;
  188. display: inline-block
  189. }
  190. </style>