unprocessDetail.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <template>
  2. <view>
  3. <view class="timeBox flex justify-between align-center padding-lr-sm">
  4. <view class="time">{{getData.time}}</view>
  5. <button class="cu-btn radius bg-red sm">未处理</button>
  6. </view>
  7. <view>
  8. <view class="basic-info">
  9. <view class="info-tit margin-left-xs">
  10. <text class="cuIcon-titles margin-right-xs"></text>
  11. 基本信息
  12. </view>
  13. <view class="info-content">
  14. <view class="info-one-info ">
  15. <text>设备名称:</text>
  16. <text>{{getData.device_name}}</text>
  17. </view>
  18. <view class="info-one-info ">
  19. <text>设备地址:</text>
  20. <text>{{getData.unitinfo}}</text>
  21. </view>
  22. <view class="info-one-info ">
  23. <text>告警信息:</text>
  24. <text>{{getData.alarm_information}}</text>
  25. </view>
  26. </view>
  27. </view>
  28. <!-- 处理内容start -->
  29. <view class="processStatus">
  30. <view class="info-tit margin-left-xs">
  31. <text class="cuIcon-titles margin-right-xs"></text>
  32. 处理内容
  33. </view>
  34. <view class="padding-lr padding-bottom-lg">
  35. <form action="">
  36. <radio-group name="gender" class="" @change="RadioChange">
  37. <label class="margin-right">
  38. <radio value="0" checked /><text>单个处理</text>
  39. </label>
  40. <label>
  41. <radio value="1" /><text>批量处理</text>
  42. </label>
  43. </radio-group>
  44. <view class="cu-form-group">
  45. <textarea class="JTxtArea lg" :maxlength="50" :data-maxnum="reason.length+'/50'"
  46. placeholder="备注信息,最多可输入50个字..." auto-height v-model="textareaMsg" @input="inputReason"
  47. :name="reason"></textarea>
  48. </view>
  49. <view class="btn-area">
  50. <button class="bg-orange round missReport margin-top" @click="$noMultipleClicks(alarmSubmit,1)" >误 报
  51. </button>
  52. <button class="bg-blue round missReport margin-top " @click="$noMultipleClicks(alarmSubmit,0)">非 误 报
  53. </button>
  54. </view>
  55. </form>
  56. </view>
  57. </view>
  58. <!-- 处理内容end -->
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. export default {
  64. data() {
  65. return {
  66. noClick:true,
  67. modalName: null,
  68. reason: '',
  69. type: 1,
  70. textareaMsg: '',
  71. getData: {},
  72. radioOne: 0,
  73. clzt:0
  74. }
  75. },
  76. onLoad: function(option) {
  77. this.type = option.type;
  78. this.getDetailData({
  79. "type": option.type,
  80. "id": option.id
  81. });
  82. let url = "";
  83. switch (parseInt(option.type)) {
  84. case 1:
  85. url = "报警主机"
  86. break;
  87. case 2:
  88. url = "水系统"
  89. break;
  90. case 4:
  91. url = "消防栓监测"
  92. break;
  93. case 6:
  94. url = "RTU测控终端"
  95. break;
  96. case 7:
  97. url = "电气火灾"
  98. break;
  99. case 16:
  100. url = "视频告警"
  101. break;
  102. case 17:
  103. url = "电梯报警"
  104. break;
  105. case 128:
  106. url = "井盖监测"
  107. break;
  108. case 129:
  109. url = "地磁"
  110. break;
  111. case 130:
  112. url = "门磁"
  113. break;
  114. case 131:
  115. url = "可燃气体"
  116. break;
  117. default:
  118. break;
  119. }
  120. uni.setNavigationBarTitle({
  121. title: url+'(未处理)'
  122. });
  123. },
  124. methods: {
  125. async getDetailData(params = {}) {
  126. const res = await this.$myRequest({
  127. url: 'ComprehensiveAlarm/getAlarmDetails',
  128. data: params,
  129. showLoading: true
  130. })
  131. this.getData = res.data.data[0];
  132. console.log(this.getData)
  133. },
  134. async powerSubmitRes(params = {}) {
  135. const res = await this.$myRequest({
  136. url: 'ComprehensiveAlarm/setAlarmHandling',
  137. data: params
  138. })
  139. if (res.data.flag) {
  140. uni.showToast({
  141. title: "提交成功",
  142. });
  143. setTimeout(() => {
  144. uni.navigateTo({
  145. url: '/pages/processList/processList?type=' + this.type,
  146. });
  147. }, 1000);
  148. }
  149. },
  150. //误报 非误报
  151. alarmSubmit(params) {
  152. if (!this.textareaMsg.replace(/^\s*/g,'')) {
  153. uni.showToast({
  154. title: "请输入处理内容",
  155. icon: "none"
  156. });
  157. } else {
  158. let queryParam = {};
  159. queryParam.id = this.getData.id;
  160. queryParam.type = this.getData.dwtype;
  161. queryParam.device_code = this.getData.device_code;
  162. queryParam.if_batch = this.radioOne;
  163. queryParam.clwb = params;
  164. queryParam.ncmd = this.getData.ncmd;
  165. queryParam.clnr = this.textareaMsg;
  166. if (this.getData.dwtype == 1) {
  167. queryParam.data3 = this.getData.data3;
  168. queryParam.data5 = this.getData.data5;
  169. this.powerSubmitRes(queryParam);
  170. return;
  171. }
  172. if (this.getData.dwtype == 2) {
  173. queryParam.data1 = this.getData.data1;
  174. this.powerSubmitRes(queryParam);
  175. return;
  176. }
  177. if (this.getData.dwtype == 7) {
  178. queryParam.data1 = this.getData.data1;
  179. this.powerSubmitRes(queryParam);
  180. return;
  181. }
  182. if (this.getData.dwtype == 3) {
  183. queryParam.data2=this.getData.data2;
  184. this.powerSubmitRes(queryParam);
  185. return;
  186. }
  187. if (this.getData.dwtype == 6) {
  188. queryParam.data2=this.getData.data2;
  189. queryParam.data4=this.getData.data4;
  190. this.powerSubmitRes(queryParam);
  191. return;
  192. }
  193. this.powerSubmitRes(queryParam)
  194. }
  195. },
  196. RadioChange(e) {
  197. this.radioOne = e.detail.value;
  198. console.log(this.radioOne)
  199. },
  200. textareaAInput(e) {
  201. this.textareaAValue = e.detail.value
  202. },
  203. inputReason(e) {
  204. this.reason = e.detail.value;
  205. }
  206. }
  207. }
  208. </script>
  209. <style lang="scss">
  210. </style>