proceDetailEle1.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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 sm" :class="[clzt=='1'?'bg-green':'bg-red']" >{{clzt=='1'?'已处理':'未处理'}}</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" v-if="clzt==0">
  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"
  51. @click="$noMultipleClicks(alarmSubmit,1)">误 报
  52. </button>
  53. <button class="bg-blue round missReport margin-top "
  54. @click="$noMultipleClicks(alarmSubmit,0)">非 误 报
  55. </button>
  56. </view>
  57. </form>
  58. </view>
  59. </view>
  60. <!-- 处理内容end -->
  61. <!-- 处理信息start -->
  62. <view class="processStatus" v-else>
  63. <view class="info-tit margin-left-xs">
  64. <text class="cuIcon-titles margin-right-xs"></text>
  65. 处理信息
  66. </view>
  67. <view class="info-content">
  68. <view class="info-one-info ">
  69. <text>是否误报:</text>
  70. <text>{{getData.clwb!='0'?'是':'否'}}</text>
  71. </view>
  72. <view>
  73. <text>处理人:</text>
  74. <text>{{getData.clr}}</text>
  75. </view>
  76. <view>
  77. <text>处理时间:</text>
  78. <text>{{getData.clsj}}</text>
  79. </view>
  80. <view>
  81. <text>处理内容:</text>
  82. <text>{{getData.clnr}}</text>
  83. </view>
  84. </view>
  85. </view>
  86. <!-- 处理状态end -->
  87. </view>
  88. </view>
  89. </template>
  90. <script>
  91. export default {
  92. data() {
  93. return {
  94. noClick: true,
  95. modalName: null,
  96. reason: '',
  97. type: 1,
  98. textareaMsg: '',
  99. getData: {},
  100. radioOne: 0,
  101. clzt: 0,
  102. url:''
  103. }
  104. },
  105. onLoad: function(option) {
  106. this.type = option.type;
  107. this.getDetailData({
  108. "type": option.type,
  109. "id": option.id
  110. });
  111. // let url = "";
  112. switch (parseInt(option.type)) {
  113. case 1:
  114. this.url = "报警主机"
  115. break;
  116. case 2:
  117. this.url = "水系统"
  118. break;
  119. case 4:
  120. this.url = "消防栓监测"
  121. break;
  122. case 6:
  123. this.url = "RTU测控终端"
  124. break;
  125. case 7:
  126. this.url = "电气火灾"
  127. break;
  128. case 16:
  129. this.url = "视频告警"
  130. break;
  131. case 17:
  132. this.url = "电梯报警"
  133. break;
  134. case 128:
  135. this.url = "井盖监测"
  136. break;
  137. case 129:
  138. this.url = "地磁"
  139. break;
  140. case 130:
  141. this.url = "门磁"
  142. break;
  143. case 131:
  144. this.url = "可燃气体"
  145. break;
  146. default:
  147. break;
  148. }
  149. // uni.setNavigationBarTitle({
  150. // title: this.url + '(未处理)'
  151. // });
  152. },
  153. mounted(){
  154. document.querySelector('.uni-page-head-hd').style.display = 'none'
  155. },
  156. methods: {
  157. async getDetailData(params = {}) {
  158. const res = await this.$myRequest({
  159. url: 'ComprehensiveAlarm/getAlarmDetails',
  160. data: params,
  161. showLoading: true
  162. })
  163. this.getData = res.data.data[0];
  164. this.clzt=this.getData.clzt;
  165. if (this.clzt!=0) {
  166. uni.setNavigationBarTitle({
  167. title: this.url+'(已处理)'
  168. });
  169. } else {
  170. uni.setNavigationBarTitle({
  171. title: this.url+'(未处理)'
  172. });
  173. }
  174. console.log(this.getData)
  175. },
  176. async powerSubmitRes(params = {}) {
  177. const res = await this.$myRequest({
  178. url: 'ComprehensiveAlarm/setAlarmHandling',
  179. data: params
  180. })
  181. if (res.data.flag) {
  182. uni.showToast({
  183. title: "提交成功",
  184. });
  185. setTimeout(() => {
  186. uni.navigateTo({
  187. url: '/pages/processList/processList?type=' + this.type,
  188. });
  189. }, 1000);
  190. }
  191. },
  192. //误报 非误报
  193. alarmSubmit(params) {
  194. if (!this.textareaMsg.replace(/^\s*/g, '')) {
  195. uni.showToast({
  196. title: "请输入处理内容",
  197. icon: "none"
  198. });
  199. } else {
  200. let queryParam = {};
  201. queryParam.id = this.getData.id;
  202. queryParam.type = this.getData.dwtype;
  203. queryParam.device_code = this.getData.device_code;
  204. queryParam.if_batch = this.radioOne;
  205. queryParam.clwb = params;
  206. queryParam.ncmd = this.getData.ncmd;
  207. queryParam.clnr = this.textareaMsg;
  208. if (this.getData.dwtype == 1) {
  209. queryParam.data3 = this.getData.data3;
  210. queryParam.data5 = this.getData.data5;
  211. this.powerSubmitRes(queryParam);
  212. return;
  213. }
  214. if (this.getData.dwtype == 2) {
  215. queryParam.data1 = this.getData.data1;
  216. this.powerSubmitRes(queryParam);
  217. return;
  218. }
  219. if (this.getData.dwtype == 7) {
  220. queryParam.data1 = this.getData.data1;
  221. this.powerSubmitRes(queryParam);
  222. return;
  223. }
  224. if (this.getData.dwtype == 3) {
  225. queryParam.data2 = this.getData.data2;
  226. this.powerSubmitRes(queryParam);
  227. return;
  228. }
  229. if (this.getData.dwtype == 6) {
  230. queryParam.data2 = this.getData.data2;
  231. queryParam.data4 = this.getData.data4;
  232. this.powerSubmitRes(queryParam);
  233. return;
  234. }
  235. this.powerSubmitRes(queryParam)
  236. }
  237. },
  238. RadioChange(e) {
  239. this.radioOne = e.detail.value;
  240. console.log(this.radioOne)
  241. },
  242. textareaAInput(e) {
  243. this.textareaAValue = e.detail.value
  244. },
  245. inputReason(e) {
  246. this.reason = e.detail.value;
  247. }
  248. }
  249. }
  250. </script>
  251. <style lang="scss">
  252. </style>