unprocessDetail.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  1. <template>
  2. <view>
  3. <view class="timeBox flex justify-between align-center padding-lr-sm">
  4. <view v-if="type==1" class="time">{{detailMessage.time}}</view>
  5. <view v-else class="time">{{detailMessage2.time}}</view>
  6. <button class="cu-btn radius bg-red sm">未处理</button>
  7. </view>
  8. <!-- 电力start -->
  9. <view v-if="type==1">
  10. <view class="basic-info">
  11. <view class="info-tit margin-left-xs">
  12. <text class="cuIcon-titles margin-right-xs"></text>
  13. 基本信息
  14. </view>
  15. <view class="info-content">
  16. <view class="info-one-info ">
  17. <text>站点名称:</text>
  18. <text>{{detailMessage.siteName}}</text>
  19. </view>
  20. <view>
  21. <text>线路名称:</text>
  22. <text>{{detailMessage.deviceName}}</text>
  23. </view>
  24. <view>
  25. <text>警告信息:</text>
  26. <text>{{detailMessage.measValue}}</text>
  27. </view>
  28. <view>
  29. <text>警告状态:</text>
  30. <text>{{detailMessage.measValue?'动作':'复归'}}</text>
  31. </view>
  32. <view>
  33. <text>采集终端:</text>
  34. <text>{{detailMessage.deviceCode}}</text>
  35. </view>
  36. <view>
  37. <text>站点地址:</text>
  38. <text>{{detailMessage.address}}<text class="icon iconfont map" @click="mapLocation()">&#xe612;</text></text>
  39. </view>
  40. <view>
  41. <text>联系人:</text>
  42. <text>{{detailMessage.userName}}</text>
  43. </view>
  44. <view>
  45. <text>联系方式:</text>
  46. <text>
  47. {{detailMessage.phone}}
  48. <text class="phone icon iconfont" @click="submit()">&#xe61d;</text>
  49. </text>
  50. </view>
  51. <view>
  52. <text>运行数据:</text>
  53. <text class="checkMore" @tap="goOpeDataDetail(detailMessage)">点击查看</text>
  54. </view>
  55. <view>
  56. <text>视频:</text>
  57. <text class="checkMore" @tap="goVideoDetail">点击查看</text>
  58. </view>
  59. </view>
  60. </view>
  61. <!-- 处理状态start -->
  62. <view class="processStatus">
  63. <view class="info-tit margin-left-xs">
  64. <text class="cuIcon-titles margin-right-xs"></text>
  65. 处理内容
  66. </view>
  67. <view class="padding-lr padding-bottom-lg">
  68. <form action="">
  69. <view class="cu-form-group">
  70. <!-- <textarea maxlength="-1" :disabled="modalName!=null" @input="textareaAInput" placeholder="备注信息,最多可输入50个字..."></textarea>-->
  71. <textarea class="JTxtArea lg" v-model="msg" placeholder="备注信息,最多可输入50个字..." :maxlength="50" :data-maxnum="reason.length+'/50'"
  72. auto-height></textarea>
  73. </view>
  74. <view class="btn-area">
  75. <!-- <button class="bg-orange round missReport margin-top">误 报 </button> -->
  76. <button class="bg-blue round missReport margin-top" @click="powerSubmit()">告警确认 </button>
  77. </view>
  78. </form>
  79. </view>
  80. </view>
  81. <!-- 处理状态end -->
  82. </view>
  83. <!-- 电力end-->
  84. <view v-else>
  85. <view class="basic-info">
  86. <view class="info-tit margin-left-xs">
  87. <text class="cuIcon-titles margin-right-xs"></text>
  88. 基本信息
  89. </view>
  90. <view class="info-content">
  91. <view class="info-one-info ">
  92. <text>设备名称:</text>
  93. <text>{{detailMessage2.deviceName}}</text>
  94. </view>
  95. <view>
  96. <text>设备地址:</text>
  97. <text>{{detailMessage2.deviceAddress}}</text>
  98. </view>
  99. <view>
  100. <text>告警信息:</text>
  101. <text>{{detailMessage2.alarmInformation}}</text>
  102. </view>
  103. </view>
  104. </view>
  105. <!-- 报警当前情况截图start -->
  106. <view class="basic-info">
  107. <view class="info-tit margin-left-xs">
  108. <text class="cuIcon-titles margin-right-xs"></text>
  109. 报警当前情况截图
  110. </view>
  111. <view class="info-content padding-lr-lg">
  112. <image :src="detailMessage2.alarmPicture" style="width:100%"></image>
  113. </view>
  114. </view>
  115. <!-- 报警当前情况截图end -->
  116. <!-- 处理状态start -->
  117. <view class="processStatus">
  118. <view class="info-tit margin-left-xs">
  119. <text class="cuIcon-titles margin-right-xs"></text>
  120. 处理内容
  121. </view>
  122. <view class="padding-lr padding-bottom-lg">
  123. <form action="">
  124. <view class="cu-form-group">
  125. <!-- <textarea maxlength="-1" :disabled="modalName!=null" @input="textareaAInput" placeholder="备注信息,最多可输入50个字..."></textarea>-->
  126. <textarea class="JTxtArea lg" placeholder="备注信息,最多可输入50个字..." :maxlength="50" :data-maxnum="reason.length+'/50'"
  127. auto-height v-model="msg2"></textarea>
  128. </view>
  129. <view class="btn-area">
  130. <button class="bg-orange round missReport margin-top" @click="videoMissSubmit()">误 报 </button>
  131. <button class="bg-blue round missReport margin-top " @click="videoSubmit()">告警确认 </button>
  132. </view>
  133. </form>
  134. </view>
  135. </view>
  136. <!-- 处理状态end -->
  137. </view>
  138. </view>
  139. </template>
  140. <script>
  141. export default {
  142. data() {
  143. return {
  144. radio: 'A',
  145. radio: 'B',
  146. modalName: null,
  147. reason: '',
  148. type: '0',
  149. detailMessage: {},
  150. detailMessage2: {},
  151. msg: '',
  152. msg2: '',
  153. flag:false,
  154. companyCode:0
  155. }
  156. },
  157. onLoad: function(option) {
  158. this.type = option.type;
  159. this.companyCode = option.companyCode;
  160. this.processingStatus = option.processingStatus;
  161. this.alarmId = option.id;
  162. if (this.type == 1) {
  163. this.getUnProcessDetail({
  164. "companyCode": option.companyCode,
  165. "processingStatus": option.processingStatus,
  166. "alarmId": option.id
  167. })
  168. } else {
  169. this.getUnProcessDetail2({
  170. "companyCode": option.companyCode,
  171. "processingStatus": option.processingStatus,
  172. "alarmId": option.id
  173. })
  174. }
  175. },
  176. methods: {
  177. async getUnProcessDetail(params = {}) {
  178. const res = await this.$myRequest({
  179. url: 'IntegratedAlarm/getPowerAlarmDetails',
  180. data: params
  181. })
  182. console.log(res.data.data[0]);
  183. this.detailMessage = res.data.data[0]
  184. },
  185. async getUnProcessDetail2(params = {}) {
  186. const res = await this.$myRequest({
  187. url: 'IntegratedAlarm/getVideoAlarmDetails',
  188. data: params
  189. })
  190. console.log(res.data.data[0]);
  191. this.detailMessage2 = res.data.data[0]
  192. },
  193. async powerSubmitRes(params = {}) {
  194. const res = await this.$myRequest({
  195. url: 'IntegratedAlarm/setAlarmHandle',
  196. data: params
  197. })
  198. if(res.data.flag){
  199. uni.showToast({
  200. title: "提交成功",
  201. });
  202. }
  203. setTimeout(() => {
  204. uni.navigateTo({
  205. url: '/pages/processList/processList?companyCode=' + this.companyCode + '&type='+this.type+'',
  206. });
  207. }, 1000);
  208. },
  209. powerSubmit() {
  210. if(!this.msg){
  211. uni.showToast({
  212. title: "请输入处理内容",
  213. icon:"none"
  214. });
  215. }else{
  216. this.powerSubmitRes({
  217. "type": 1,
  218. "deviceCode": this.detailMessage.deviceCode,
  219. "companyCode": this.companyCode,
  220. "id": this.detailMessage.id,
  221. "handlerContent": this.msg
  222. })
  223. }
  224. },
  225. videoSubmit() {
  226. if(!this.msg2){
  227. uni.showToast({
  228. title: "请输入处理内容",
  229. icon:"none"
  230. });
  231. }else{
  232. this.powerSubmitRes({
  233. "alarmStatus": 0,
  234. "type": 2,
  235. "deviceCode": this.detailMessage2.deviceCode,
  236. "companyCode": this.companyCode,
  237. "id": this.detailMessage2.id,
  238. "handlerContent": this.msg2
  239. })
  240. }
  241. },
  242. videoMissSubmit() {
  243. if(!this.msg2){
  244. uni.showToast({
  245. title: "请输入处理内容",
  246. icon:"none"
  247. });
  248. }else{
  249. this.powerSubmitRes({
  250. "alarmStatus": 1,
  251. "type": 2,
  252. "deviceCode": this.detailMessage2.deviceCode,
  253. "companyCode": this.companyCode,
  254. "id": this.detailMessage2.id,
  255. "handlerContent": this.msg2
  256. })
  257. }
  258. },
  259. submit() {
  260. uni.makePhoneCall({
  261. phoneNumber: '15122423833' //仅为示例
  262. });
  263. },
  264. mapLocation() {
  265. window.location.href = 'http://apis.map.qq.com/uri/v1/marker?marker=coord:'+parseFloat(this.detailMessage.latitude)+','+parseFloat(this.detailMessage.longitude)+''
  266. // uni.openLocation({
  267. // latitude: parseFloat(this.detailMessage.latitude),
  268. // longitude: parseFloat(this.detailMessage.longitude),
  269. // success: function() {
  270. // console.log('success');
  271. // }
  272. // });
  273. },
  274. // 页面跳转
  275. goOpeDataDetail(detailMessage) {
  276. uni.navigateTo({
  277. url: '/pages/unprocessDetail/opeDataDetail/opeDataDetail?companyCode=' + this.companyCode + '&deviceCode=' +
  278. detailMessage.deviceCode + '&deviceType=' + this.type + '',
  279. success: res => {},
  280. fail: () => {},
  281. complete: () => {}
  282. });
  283. },
  284. goVideoDetail() {
  285. uni.navigateTo({
  286. url: '/pages/unprocessDetail/videoDetail/videoDetail',
  287. success: res => {},
  288. fail: () => {},
  289. complete: () => {}
  290. });
  291. },
  292. RadioChange(e) {
  293. this.radio = e.detail.value
  294. },
  295. textareaAInput(e) {
  296. this.textareaAValue = e.detail.value
  297. },
  298. // textarea
  299. inputReason(e) {
  300. this.reason = e.detail.value;
  301. }
  302. }
  303. }
  304. </script>
  305. <style lang="scss">
  306. /* // 处理内容 */
  307. .cu-form-group {
  308. background: #f5f5f5;
  309. }
  310. .processStatus {
  311. textarea {
  312. background: #F5F5F5;
  313. color: #999999;
  314. }
  315. }
  316. // textarea
  317. .JTxtArea {
  318. position: relative;
  319. &.sm {
  320. min-height: 60rpx;
  321. }
  322. &.lg {
  323. min-height: 100rpx;
  324. }
  325. &:after {
  326. content: attr(data-maxnum);
  327. position: absolute;
  328. right: 10rpx;
  329. bottom: 0px;
  330. }
  331. }
  332. </style>