processedDetail.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. <template>
  2. <view class="dealDetail">
  3. <view v-if="type==2" class="timeBox flex justify-between align-center padding-lr-sm">
  4. <view class="time">{{detailMessage2.time}}</view>
  5. <button class="cu-btn radius bg-green sm">已处理</button>
  6. </view>
  7. <view v-else class="timeBox flex justify-between align-top padding-sm " style="height:auto;">
  8. <view >
  9. <view>发生时间:{{detailMessage.time}}</view>
  10. <view>告警历时:{{detailMessage.duration}}</view>
  11. <view>关联告警:{{detailMessage.handlerTime}}</view>
  12. <view style="color:#4074E7">【{{detailMessage.route_name}}】设备低压-{{detailMessage.digitalValue=='1'?'动作':'复归'}}</view>
  13. <!-- <view class="time">{{detailMessage.time}}</view> -->
  14. <!-- <view>dfd</view> -->
  15. </view>
  16. <button v-if="handling_status==1" class="cu-btn radius bg-green sm margin-top-sm">已处理</button>
  17. <button v-if="handling_status==2" class="cu-btn radius bg-orange sm margin-top-sm">待确认</button>
  18. <button v-if="handling_status==3" class="cu-btn radius bg-blue sm margin-top-sm">自动恢复</button>
  19. <button v-if="handling_status==4" class="cu-btn radius bg-gray sm margin-top-sm">过期失效</button>
  20. </view>
  21. <view v-if="type==1">
  22. <!-- 基本信息start -->
  23. <view class="basic-info dealDetail">
  24. <view class="info-tit margin-left-xs">
  25. <text class="cuIcon-titles margin-right-xs"></text>
  26. 基本信息
  27. </view>
  28. <view class="info-content">
  29. <view class="info-one-info ">
  30. <text>站点名称:</text>
  31. <text>{{detailMessage.siteName}}</text>
  32. </view>
  33. <view class="info-one-info ">
  34. <text>台区展示:</text>
  35. <text>{{detailMessage.platform_area_name}}</text>
  36. </view>
  37. <view>
  38. <text>线路名称:</text>
  39. <text>{{detailMessage.deviceName}}</text>
  40. </view>
  41. <view>
  42. <text>警告信息:</text>
  43. <text>{{detailMessage.measValue}}</text>
  44. </view>
  45. <view>
  46. <text>警告状态:</text>
  47. <text>{{detailMessage.digitalValue=='1'?'动作':'复归'}}</text>
  48. </view>
  49. <view>
  50. <text>采集终端:</text>
  51. <text>{{detailMessage.deviceCode}}</text>
  52. </view>
  53. <view >
  54. <text>站点地址:</text>
  55. <text>{{detailMessage.address}}<i class="icon iconfont map" @click="mapLocation()">&#xe612;</i></text>
  56. </view>
  57. <view>
  58. <text>联系人:</text>
  59. <text>{{detailMessage.userName}}</text>
  60. </view>
  61. <view>
  62. <text>联系方式:</text>
  63. <text>{{detailMessage.phone}}<i class="phone icon iconfont" @click="submit()">&#xe61d;</i></text>
  64. </view>
  65. <view>
  66. <text>运行数据:</text>
  67. <text class="checkMore" @tap="goOpeDataDetail(detailMessage)">点击查看</text>
  68. </view>
  69. <view>
  70. <text>视频:</text>
  71. <text class="checkMore" @tap="goVideoDetail">点击查看</text>
  72. </view>
  73. <view>
  74. <text>现场档案:</text>
  75. <text class="checkMore" @tap="goArchiveDetail">点击查看</text>
  76. </view>
  77. </view>
  78. </view>
  79. <!-- 基本信息end -->
  80. <!-- 处理信息start -->
  81. <view class="processStatus" v-if="this.handling_status!=2">
  82. <view class="info-tit margin-left-xs">
  83. <text class="cuIcon-titles margin-right-xs"></text>
  84. 处理信息
  85. </view>
  86. <view class="info-content">
  87. <view>
  88. <text>处理人:</text>
  89. <text>{{detailMessage.handler}}</text>
  90. </view>
  91. <view>
  92. <text>处理时间:</text>
  93. <text>{{detailMessage.handlerTime}}</text>
  94. </view>
  95. <view>
  96. <text>处理内容:</text>
  97. <text>{{detailMessage.handlerContent}}</text>
  98. </view>
  99. </view>
  100. </view>
  101. <!-- 处理状态end -->
  102. <!-- 处理状态start -->
  103. <view class="processStatus" v-if="this.handling_status==2">
  104. <view class="info-tit margin-left-xs">
  105. <text class="cuIcon-titles margin-right-xs"></text>
  106. 处理内容
  107. </view>
  108. <view class="padding-lr padding-bottom-lg">
  109. <form action="">
  110. <view class="cu-form-group">
  111. <!-- <textarea maxlength="-1" :disabled="modalName!=null" @input="textareaAInput" placeholder="备注信息,最多可输入50个字..."></textarea>-->
  112. <textarea class="JTxtArea lg" v-model="msg" placeholder="备注信息,最多可输入50个字..." :maxlength="50" :data-maxnum="reason.length+'/50'"
  113. auto-height></textarea>
  114. </view>
  115. <view class="btn-area">
  116. <!-- <button class="bg-orange round missReport margin-top">误 报 </button> -->
  117. <button class="bg-blue round missReport margin-top" @click="powerSubmit()">告警确认 </button>
  118. </view>
  119. </form>
  120. </view>
  121. </view>
  122. <!-- 处理状态end -->
  123. </view>
  124. <view v-else>
  125. <!-- 基本信息start -->
  126. <view class="basic-info">
  127. <view class="info-tit margin-left-xs">
  128. <text class="cuIcon-titles margin-right-xs"></text>
  129. 基本信息
  130. </view>
  131. <view class="info-content">
  132. <view class="info-one-info ">
  133. <text>设备名称:</text>
  134. <text>{{detailMessage2.deviceName}}</text>
  135. </view>
  136. <view>
  137. <text>设备地址:</text>
  138. <text>{{detailMessage2.deviceAddress}}</text>
  139. </view>
  140. <view>
  141. <text>告警信息:</text>
  142. <text>{{detailMessage2.alarmInformation}}</text>
  143. </view>
  144. </view>
  145. </view>
  146. <!-- 基本信息end -->
  147. <!-- 报警当前情况截图start -->
  148. <view class="basic-info">
  149. <view class="info-tit margin-left-xs">
  150. <text class="cuIcon-titles margin-right-xs"></text>
  151. 报警当前情况截图
  152. </view>
  153. <view class="info-content padding-lr-lg">
  154. <image :src="detailMessage2.alarmPicture" style="width:100%"></image>
  155. </view>
  156. </view>
  157. <!-- 报警当前情况截图end -->
  158. <!-- 处理信息start -->
  159. <view class="processStatus">
  160. <view class="info-tit margin-left-xs">
  161. <text class="cuIcon-titles margin-right-xs"></text>
  162. 处理信息
  163. </view>
  164. <view class="info-content">
  165. <view class="info-one-info ">
  166. <text>是否误报:</text>
  167. <text>{{detailMessage2.alarmStatus?'误报':'非误报'}}</text>
  168. </view>
  169. <view>
  170. <text>处理人:</text>
  171. <text>{{detailMessage2.handler}}</text>
  172. </view>
  173. <view>
  174. <text>处理时间:</text>
  175. <text>{{detailMessage2.handlerTime}}</text>
  176. </view>
  177. <view>
  178. <text>处理内容:</text>
  179. <text>{{detailMessage2.handlerContent}}</text>
  180. </view>
  181. </view>
  182. </view>
  183. <!-- 处理状态end -->
  184. </view>
  185. </view>
  186. </template>
  187. <script>
  188. //引入js sdk的封装
  189. import * as jwx from '../../util/jssdk.js'
  190. export default {
  191. data() {
  192. return {
  193. msg:'',
  194. reason: '',
  195. radio: 'A',
  196. radio: 'B',
  197. modalName: null,
  198. type: '0',
  199. detailMessage:{},
  200. detailMessage2:{},
  201. handling_status:0
  202. }
  203. },
  204. onLoad: function(option) {
  205. this.handling_status=option.handling_status;
  206. this.type = option.type;
  207. this.companyCode = option.companyCode;
  208. this.processingStatus=option.handling_status;
  209. this.alarmId = option.id;
  210. if(this.type==1){
  211. this.getUnProcessDetail({"companyCode":option.companyCode,"processingStatus":option.handling_status,"alarmId":option.id})
  212. }else{
  213. this.getVideoDetail({"companyCode":option.companyCode,"processingStatus":option.processingStatus,"alarmId":option.id})
  214. }
  215. },
  216. methods: {
  217. powerSubmit() {
  218. if(!this.msg){
  219. uni.showToast({
  220. title: "请输入处理内容",
  221. icon:"none"
  222. });
  223. }else{
  224. this.powerSubmitRes({
  225. "type": 1,
  226. "deviceCode": this.detailMessage.deviceCode,
  227. "companyCode": this.companyCode,
  228. "id": this.detailMessage.id,
  229. "handlerContent": this.msg
  230. })
  231. }
  232. },
  233. async powerSubmitRes(params = {}) {
  234. const res = await this.$myRequest({
  235. url: 'IntegratedAlarm/setAlarmHandle',
  236. data: params
  237. })
  238. if(res.data.flag){
  239. uni.showToast({
  240. title: "提交成功",
  241. });
  242. }
  243. setTimeout(() => {
  244. uni.navigateTo({
  245. url: '/pages/processList/processList?companyCode=' + this.companyCode + '&type='+this.type+'',
  246. });
  247. }, 1000);
  248. },
  249. async getUnProcessDetail(ming={}) {
  250. const res= await this.$myRequest({
  251. url:'IntegratedAlarm/getPowerAlarmDetails',
  252. data:ming
  253. })
  254. console.log(res.data.data[0]);
  255. this.detailMessage=res.data.data[0]
  256. },
  257. async getVideoDetail(ming={}) {
  258. const res= await this.$myRequest({
  259. url:'IntegratedAlarm/getVideoAlarmDetails',
  260. data:ming
  261. })
  262. console.log(res.data.data[0]);
  263. this.detailMessage2=res.data.data[0]
  264. },
  265. submit() {
  266. uni.makePhoneCall({
  267. phoneNumber: this.detailMessage.phone
  268. });
  269. },
  270. mapLocation(){
  271. console.log(this.detailMessage)
  272. // window.location.href = 'http://apis.map.qq.com/uri/v1/marker?marker=coord:'+parseFloat(this.detailMessage.latitude)+','+parseFloat(this.detailMessage.longitude)+''
  273. // uni.openLocation({
  274. // latitude: parseInt(this.detailMessage.latitude),
  275. // longitude: parseInt(this.detailMessage.longitude),
  276. // success: function() {
  277. // console.log('success');
  278. // }
  279. // });
  280. // 微信公众号导航
  281. jwx.configWeiXin(jweixin => {
  282. let shareInfo = {
  283. latitude: parseFloat(this.detailMessage.latitude), // 纬度,浮点数,范围为90 ~ -90
  284. longitude: parseFloat(this.detailMessage.longitude), // 经度,浮点数,范围为180 ~ -180。
  285. name: this.detailMessage.siteName, // 位置名
  286. address: this.detailMessage.address, // 地址详情说明
  287. scale: 15, // 地图缩放级别,整型值,范围从1~28。默认为最大
  288. };
  289. jweixin.openLocation(shareInfo);
  290. });
  291. },
  292. // 页面跳转
  293. goOpeDataDetail(detailMessage) {
  294. uni.navigateTo({
  295. url: '/pages/unprocessDetail/opeDataDetail/opeDataDetail?companyCode='+this.companyCode+'&deviceCode='+detailMessage.deviceCode+'&deviceType='+this.type+'',
  296. success: res => {},
  297. fail: () => {},
  298. complete: () => {}
  299. });
  300. },
  301. goVideoDetail() {
  302. uni.navigateTo({
  303. url: '/pages/videoList/videoList?deviceType=2&companyCode=' + this.detailMessage.siteId + '',
  304. success: res => {},
  305. fail: () => {},
  306. complete: () => {}
  307. });
  308. },
  309. goArchiveDetail() {
  310. uni.navigateTo({
  311. url: '/pages/siteArchive/archiveDetail/archiveDetail?siteId='+this.detailMessage.siteId,
  312. success: res => {},
  313. fail: () => {},
  314. complete: () => {}
  315. });
  316. },
  317. RadioChange(e) {
  318. this.radio = e.detail.value
  319. },
  320. textareaAInput(e) {
  321. this.textareaAValue = e.detail.value
  322. },
  323. // textarea
  324. inputReason(e) {
  325. this.reason = e.detail.value;
  326. }
  327. }
  328. }
  329. </script>
  330. <style lang="scss">
  331. .timeBox {
  332. height: 88rpx;
  333. background: #EFF4FF;
  334. line-height: 88rpx;
  335. .time {
  336. color: #333
  337. }
  338. }
  339. .info-tit {
  340. color: #4074E7;
  341. line-height: 90rpx;
  342. height: 90rpx;
  343. }
  344. // 基本信息
  345. .info-content>view {
  346. margin-left: 24rpx;
  347. border-bottom: 1px solid #EDEDED;
  348. line-height: 92rpx;
  349. color: #666;
  350. }
  351. .info-content view text:first-child {
  352. width: 160rpx;
  353. display: inline-block
  354. }
  355. /* // 处理内容 */
  356. .cu-form-group {
  357. background: #f5f5f5;
  358. }
  359. .processStatus {
  360. textarea {
  361. background: #F5F5F5;
  362. color: #999999;
  363. }
  364. }
  365. // textarea
  366. .JTxtArea {
  367. position: relative;
  368. &.sm {
  369. min-height: 60rpx;
  370. }
  371. &.lg {
  372. min-height: 100rpx;
  373. }
  374. &:after {
  375. content: attr(data-maxnum);
  376. position: absolute;
  377. right: 10rpx;
  378. bottom: 0px;
  379. }
  380. }
  381. </style>