eventLocation.vue 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169
  1. <template>
  2. <div>
  3. <el-dialog title="事件定位" :visible.sync="eventLocationVisible" v-if="eventLocationVisible" width="80%"
  4. @close="cancelEventLocationShow()">
  5. <div class="event-info">
  6. <div class="event-info-top">
  7. <el-form>
  8. <div class="event-info-top-grp">
  9. <el-input placeholder="输入经度" v-model="longitude" class="m-l-none">
  10. </el-input>
  11. <el-input placeholder="输入纬度" v-model="latitude">
  12. </el-input>
  13. <el-button type="success" size="mini" @click="getNearEvent()">定位</el-button>
  14. </div>
  15. </el-form>
  16. </div>
  17. <div class="event-info-con">
  18. <div class="e-location-left">
  19. <el-tabs v-model="activeName" @tab-click="handleClick">
  20. <el-tab-pane label="事件" name="event">
  21. <div class="forthis">
  22. <div class="i-list-con overflow-y" style="height: 50vh;">
  23. <div class="d-l-con d-evnet-list-con" v-for="(item,index) in eventList"
  24. v-on:click="dropLocation(item.latitude,item.longitude)">
  25. <!-- <img :src="" v-if="item.picturePath!=null&&item.picturePath!=''" class="event-list-img"> -->
  26. <img :src="item.picturePath" v-if="item.picturePath!=null&&item.picturePath!=''"
  27. class="event-list-img">
  28. <img src="@/assets/images/visual/img-sample.png" v-else class="event-list-img">
  29. <div class="event-list-text">
  30. <h3>{{item.eventTitle}}</h3>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. </el-tab-pane>
  36. <el-tab-pane label="探头" name="monitor">
  37. <div class="forthis">
  38. <div class="i-list-con overflow-y" style="height: 50vh;">
  39. <span v-for="(item,index) in cameraList" v-on:click="dropLocation(item.latitude,item.longitude)">
  40. <div class="d-l-con" @click="">
  41. <div class="d-l-l-text">
  42. <i class="iconfont sj-icon-jkzx icon-sxt"></i>
  43. <h4>{{item.cameraName}}</h4>
  44. </div>
  45. </div>
  46. </span>
  47. </div>
  48. </div>
  49. </el-tab-pane>
  50. </el-tabs>
  51. </div>
  52. <div class="e-location-right" style="height: 57.8vh;">
  53. <!-- 地图 -->
  54. <eventLocationSupermap ref="eventLocationSupermap" style="width: 100%;height: 57.8vh;"
  55. :mapDiv="'eventLocationMap'" :mapSite="{doubleClickZoom:false,zoom:8}"
  56. :codes="['9fa5']" :isSideBySide="false" @preview="preview" @showEventInfo_notProcessed="showEventInfo_notProcessed" @showEventInfo_Processed="showEventInfo_Processed"></eventLocationSupermap>
  57. </div>
  58. </div>
  59. </div>
  60. </el-dialog>
  61. <!--事件弹层-->
  62. <div class="event-info">
  63. <el-dialog title="事件信息-未处理" :visible.sync="eventInfoVisible_notProcessed" v-if="eventInfoVisible_notProcessed" width="80%" hight="1000px" @close="cancelEventShow()" append-to-body>
  64. <div style="position:absolute; right: 0;top:60px; width:40%;">
  65. <el-steps :space="200" :active="1" finish-status="success" align-center>
  66. <el-step title="待处理"></el-step>
  67. <el-step title="处理中"></el-step>
  68. <el-step title="已办结"></el-step>
  69. <el-step title="已归档"></el-step>
  70. </el-steps>
  71. </div>
  72. <el-tabs v-model="eventInfoVisibleActiveName" @tab-click="handleClickNotProcessed" :before-leave="beforeLeave" >
  73. <el-tab-pane label="基础信息" name="info" >
  74. <div class="event-info-con">
  75. <div class="e-left">
  76. <div class="forthis">
  77. <div class="i-list-con h-35">
  78. <span v-for="(information,index) in information" :key="index">
  79. <div class="d-l-con" >
  80. <div class="d-l-l-text">
  81. <i class="i-small"></i>
  82. <h4>{{information.name}}:</h4>
  83. <h4>{{information.content}}</h4>
  84. </div>
  85. </div>
  86. </span>
  87. </div>
  88. </div>
  89. <div class="forthis d-map h-30">
  90. <div class="this-title">
  91. <span>涉事单位</span>
  92. </div>
  93. <div class="i-list-con h-26">
  94. <span v-for="(company,index) in listEventDept" :key="index">
  95. <div class="d-l-con" >
  96. <div class="d-l-l-text">
  97. <i class="i-small"></i>
  98. <h4>{{company.deptName}}</h4>
  99. </div>
  100. <div class="d-l-l-count"
  101. :class="[company.eventStatus=='未处理'?'state-wcl':'state-wyc']">
  102. <!-- {{['未处理','无异常'][company.state]}}-->{{company.eventStatus}}
  103. </div>
  104. </div>
  105. </span>
  106. </div>
  107. </div>
  108. </div>
  109. <div class="e-center">
  110. <div class="forthis">
  111. <div class="i-list-con h-35">
  112. <el-image :src="url" :preview-src-list="listEventPic" class="img-company" style="height: 100%;" v-if="url!=''">
  113. </el-image>
  114. </div>
  115. </div>
  116. <div class="forthis h-30">
  117. <div class="i-list-con h-26">
  118. <el-image :src="item"
  119. style="width:3.9rem; height:3rem;margin: 2px;"
  120. v-for="(item,index) in listEventPic" @click="switchImage(item)">
  121. </el-image>
  122. </div>
  123. </div>
  124. </div>
  125. <div class="e-right">
  126. <div class="forthis h-67">
  127. <div class="this-title">
  128. <span>处理过程</span>
  129. </div>
  130. <div class="i-list-con">
  131. <div class="this-con">
  132. <span v-for="(company,index) in listLog" :key="index">
  133. <div class="z-begin" v-if="company.messageType=='sys_messageType_1'">
  134. {{company.logContent}}
  135. </div>
  136. <div class="z-info-list" v-if="company.messageType=='sys_messageType_2'">
  137. <el-image :src="require('@/assets/images/visual/user-img.png')"
  138. style="width: 3rem; height: 3rem;margin:2px;">
  139. </el-image>
  140. <div class="z-info-list-con">
  141. <div class="user-and-time">
  142. <span>{{company.createBy}}</span><span> {{company.createTime}}</span>
  143. </div>
  144. <div class="z-info">
  145. <div class="this-con-list-info">
  146. {{company.logContent}}
  147. </div>
  148. <div>
  149. <el-image :src="url" :preview-src-list="srcList"
  150. style="width:6.5rem; height:5rem;margin: 2px;"
  151. v-for="(item,index) in 4">
  152. </el-image>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. </span>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. <div class="e-btm-btn">
  164. <el-form>
  165. <el-form-item>
  166. <el-select v-model="deptName" clearable placeholder="请选择部门" class="m-r-1rem" @change="setValue" >
  167. <el-option
  168. v-for="item in listoperateDept"
  169. :key="item.deptId"
  170. :label="item.deptName"
  171. :value="{value:item.deptId,label:item.deptName}" :disabled="item.eventStatus=='未处理' ? false:true">
  172. </el-option>
  173. </el-select>
  174. <el-select v-model="eventStatus" clearable placeholder="请选择状态" class="m-r-1rem" @change="setXsYc">
  175. <el-option
  176. v-for="item in optionsNotProcessed"
  177. :key="item.value"
  178. :label="item.label"
  179. :value="item.value">
  180. </el-option>
  181. </el-select>
  182. <el-select v-model="eventType" clearable placeholder="请选择事件" class="m-r-1rem" v-if="eventTypeShow" >
  183. <el-option
  184. v-for="item in listeventType"
  185. :key="item.id"
  186. :label="item.eventTypeName"
  187. :value="item.eventType">
  188. </el-option>
  189. </el-select>
  190. <!-- <el-radio v-model="radio" label="1">无异常</el-radio>
  191. <el-radio v-model="radio" label="2">确认火情</el-radio> -->
  192. <el-button type="success" @click="updateEventStatusNotProcessed">确定</el-button>
  193. </el-form-item>
  194. </el-form>
  195. </div>
  196. </el-tab-pane>
  197. <el-tab-pane label="实时画面" name="frame">
  198. </el-tab-pane>
  199. <el-tab-pane label="地理位置" name="point">
  200. <div class="info-button-group"> <button>视频联动</button>
  201. <button>矢量标记</button>
  202. <button>测面</button>
  203. <button>测距</button>
  204. </div>
  205. <notProcessedSupermap ref="notProcessedSupermap" v-if="'point' === eventInfoVisibleActiveName" style="width:100% ;height: 75vh;" :mapDiv="'notProcessedSupermap'" :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" @preview="preview" :isSideBySide="false"></notProcessedSupermap>
  206. </el-tab-pane>
  207. </el-tabs>
  208. </el-dialog>
  209. <el-dialog title="事件信息-处理中" :visible.sync="eventInfoVisible_Processed" v-if="eventInfoVisible_Processed" width="80%" hight="1000px" @close="cancelEventShow()" append-to-body>
  210. <div style="position:absolute; right: 0;top:60px; width:40%;">
  211. <el-steps :space="200" :active=zt finish-status="success" align-center>
  212. <el-step title="待处理"></el-step>
  213. <el-step title="处理中"></el-step>
  214. <el-step title="支援"></el-step>
  215. <el-step title="已办结"></el-step>
  216. <el-step title="已归档"></el-step>
  217. </el-steps>
  218. </div>
  219. <el-tabs v-model="eventInfoVisibleActiveName" @tab-click="handleClickProcessed" :before-leave="beforeLeave">
  220. <el-tab-pane label="基础信息" name="info">
  221. <div class="event-info-con">
  222. <div class="e-left">
  223. <div class="forthis">
  224. <div class="i-list-con h-35">
  225. <span v-for="(information,index) in information" :key="index">
  226. <div class="d-l-con" >
  227. <div class="d-l-l-text">
  228. <i class="i-small"></i>
  229. <h4>{{information.name}}:</h4>
  230. <h4>{{information.content}}</h4>
  231. </div>
  232. </div>
  233. </span>
  234. </div>
  235. </div>
  236. <div class="forthis d-map h-30">
  237. <div class="this-title">
  238. <span>涉事单位</span>
  239. </div>
  240. <div class="i-list-con h-26">
  241. <span v-for="(company,index) in listEventDept.allDept" :key="index">
  242. <div class="d-l-con" >
  243. <div class="d-l-l-text">
  244. <i class="i-small"></i>
  245. <h4>{{company.deptName}}</h4>
  246. </div>
  247. <div class="d-l-l-count"
  248. :class="[company.eventStatus=='未处理'?'state-wcl':'state-wyc']">
  249. <!-- {{['未处理','无异常'][company.state]}}-->{{company.eventStatus}}
  250. </div>
  251. </div>
  252. </span>
  253. </div>
  254. </div>
  255. </div>
  256. <div class="e-center">
  257. <div class="forthis">
  258. <div class="i-list-con h-35">
  259. <el-image :src="url" :preview-src-list=listEventPic class="img-company" style="height: 100%;" v-if="url!=''">
  260. </el-image>
  261. </div>
  262. </div>
  263. <div class="forthis h-30">
  264. <div class="i-list-con h-26">
  265. <el-image :src="item"
  266. style="width:3.9rem; height:3rem;margin: 2px;"
  267. v-for="(item,index) in listEventPic" @click="switchImage(item)">
  268. </el-image>
  269. </div>
  270. </div>
  271. </div>
  272. <div class="e-right">
  273. <div class="forthis h-67">
  274. <div class="this-title">
  275. <span>处理过程</span>
  276. </div>
  277. <div class="i-list-con">
  278. <div class="this-con">
  279. <span v-for="(company,index) in listLog" :key="index">
  280. <div class="z-begin" v-if="company.messageType=='sys_messageType_1'">
  281. {{company.logContent}}
  282. </div>
  283. <div class="z-info-list" v-if="company.messageType=='sys_messageType_2'">
  284. <el-image :src="require('@/assets/images/visual/user-img.png')"
  285. style="width: 3rem; height: 3rem;margin:2px;">
  286. </el-image>
  287. <div class="z-info-list-con">
  288. <div class="user-and-time">
  289. <span>{{company.createBy}}</span><span> {{company.createTime}}</span>
  290. </div>
  291. <div class="z-info">
  292. <div class="this-con-list-info">
  293. {{company.logContent}}
  294. </div>
  295. <div>
  296. <el-image :src="url" :preview-src-list="srcList"
  297. style="width:6.5rem; height:5rem;margin: 2px;"
  298. v-for="(item,index) in 4">
  299. </el-image>
  300. </div>
  301. </div>
  302. </div>
  303. </div>
  304. </span>
  305. </div>
  306. </div>
  307. </div>
  308. </div>
  309. </div>
  310. <div class="e-btm-btn">
  311. <el-form>
  312. <el-form-item v-if=showZt>
  313. <el-select v-model="eventStatus" clearable placeholder="请选择状态" class="m-r-1rem">
  314. <el-option
  315. v-for="item in optionsProcessed"
  316. :key="item.value"
  317. :label="item.label"
  318. :value="item.value">
  319. </el-option>
  320. </el-select>
  321. <!-- <el-radio v-model="radio" label="1">无异常</el-radio>
  322. <el-radio v-model="radio" label="2">确认火情</el-radio> -->
  323. <el-button type="success" @click="updateEventStatusProcessed">确定</el-button>
  324. </el-form-item>
  325. </el-form>
  326. </div>
  327. </el-tab-pane>
  328. <el-tab-pane label="实时画面" name="frame" >
  329. </el-tab-pane>
  330. <el-tab-pane label="地理位置" name="point">
  331. <div class="info-button-group">
  332. <button>视频联动</button>
  333. <button>矢量标记</button>
  334. <button>测面</button>
  335. <button>测距</button>
  336. </div>
  337. <processedSupermap v-if="'point' === eventInfoVisibleActiveName" ref="processedSupermap" style="width:100% ;height: 75vh;" :mapDiv="'processedSuperMap'" :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" @preview="preview" :isSideBySide="false"></processedSupermap>
  338. </el-tab-pane>
  339. </el-tabs>
  340. </el-dialog>
  341. </div>
  342. </div>
  343. </template>
  344. <script>
  345. import {
  346. getForest,updateCentereventTForestfireStatus,getNearEvent, getNearCamera
  347. } from '@/api/event'
  348. import {
  349. selectByeventCode,getWarm,updateDeptEventStatus,listByEventCode,selectCameraEventByCameraId,listCenterdataTAttachByBusId,selectchannelCodeByCameraId,selectFjsxt
  350. } from '@/api/forest'
  351. import eventLocationSupermap from '@/components/supermap' //超图
  352. import notProcessedSupermap from '@/components/supermap' //超图
  353. import processedSupermap from '@/components/supermap' //超图
  354. /** ----------------------------------摄像头预览开始------------------------------------- */
  355. import { getDahuaVideoServer } from '@/api/dahua/dahua'
  356. import DHWs from '@/dahua/lib/DHWs'
  357. /** ----------------------------------摄像头预览结束------------------------------------- */
  358. export default {
  359. dicts: ['event_source'],
  360. components: {
  361. eventLocationSupermap,
  362. notProcessedSupermap,
  363. processedSupermap
  364. },
  365. data() {
  366. return {
  367. /** ----------------------------------事件弹窗开始-未处理------------------------------------- */
  368. eventInfoVisibleActiveName: 'info',
  369. eventInfoVisible_notProcessed: false,
  370. eventInfoVisible_Processed: false,
  371. listEventPic: [],//事件图片
  372. url: '',
  373. id: '',
  374. eventType : '',
  375. deptName : '',
  376. eventStatus : '',
  377. cameraId: '',
  378. reportTime: '',
  379. reportAddress: '',
  380. eventCode: null,
  381. eventSource: '',
  382. //事件详情弹出显隐
  383. eventTypeShow: false,
  384. listEventDept: [],//涉事单位List,
  385. listLog: [],//处理过程List,
  386. listoperateDept:[],
  387. optionsNotProcessed: [{
  388. value: 'wyc',
  389. label: '无异常'
  390. }, {
  391. value: 'qr',
  392. label: '确认'
  393. }],
  394. listeventType: [],
  395. updateEventStatusForm: {
  396. id: '',
  397. eventStatus: '',
  398. eventCode: '',
  399. deptId: '',
  400. deptName: '',
  401. eventType: '',
  402. zt: ''
  403. },
  404. /** ----------------------------------事件弹窗结束-未处理------------------------------------- */
  405. aniu: true,
  406. showZt: true,
  407. zt: null,
  408. fireReport:false,
  409. optionsProcessed: [
  410. {
  411. value: 'bj',
  412. label: '办结'
  413. }, {
  414. value: 'zy',
  415. label: '支援'
  416. },
  417. {
  418. value: 'gd',
  419. label: '归档'
  420. }
  421. ],
  422. // 弹出层 基本信息
  423. information: [
  424. {
  425. name: '标题',
  426. id: '',
  427. content: '前段发现警情信息'
  428. },
  429. {
  430. name: '时间',
  431. id: '',
  432. content: '2022-02-14 14:30'
  433. },
  434. {
  435. name: '来源',
  436. id: '',
  437. content: '摄像头'
  438. },
  439. {
  440. name: '坐标',
  441. id: '',
  442. content: '125.78945646'
  443. },
  444. {
  445. name: '纬度',
  446. id: '',
  447. content: '43.987424'
  448. },
  449. {
  450. name: '上报人',
  451. id: '',
  452. content: '党校监控点位'
  453. },
  454. {
  455. name: '详细信息',
  456. id: '',
  457. content: '这里发现病虫害,需要立刻支援'
  458. }
  459. ],
  460. eventLocationVisible: false,
  461. longitude: '',
  462. latitude: '',
  463. activeName: 'event',
  464. eventList: [],
  465. markersList: [],
  466. cameraList: [],
  467. cameraMarkersList: []
  468. }
  469. },
  470. created() {
  471. /** ----------------------------------摄像头预览开始------------------------------------- */
  472. const DHWsInstance = DHWs.getInstance()
  473. this.ws = DHWsInstance
  474. console.log(this.ws)
  475. /** ----------------------------------摄像头预览结束------------------------------------- */
  476. },
  477. methods: {
  478. cancelEventLocationShow() {
  479. this.longitude = ''
  480. this.latitude = ''
  481. this.activeName = 'event'
  482. this.eventList = []
  483. this.markersList = []
  484. this.cameraList = []
  485. this.cameraMarkersList = []
  486. },
  487. getNearEvent() {
  488. this.activeName = 'event'
  489. let marker = [{
  490. lng: this.longitude,
  491. lat: this.latitude,
  492. icon: 'marker',
  493. bindPopupHtml: '定位',
  494. click: '',
  495. parameter: '',
  496. keepBindPopup: false,
  497. isAggregation: false
  498. }]
  499. let that = this
  500. getNearEvent(this.longitude, this.latitude).then(res => {
  501. that.markersList = []
  502. that.eventList = []
  503. if (res.data != null && res.data.length > 0) {
  504. for (let i = 0; i < res.data.length; i++) {
  505. let markersMap = {
  506. lng: 124.59,
  507. lat: 43.02,
  508. icon: 'marker',
  509. bindPopupHtml: '',
  510. click: '',
  511. parameter: '',
  512. keepBindPopup: false,
  513. isAggregation: false
  514. }
  515. if (res.data.length > 50) {
  516. markersMap.isAggregation = true
  517. }
  518. if (res.data[i].eventStatus == "event_event_status_1" || res.data[i].eventStatus == "event_event_status_2" || res.data[i].eventStatus == "event_event_status_6") {
  519. markersMap.click = "showEventInfo_Processed"
  520. markersMap.icon = "sj-icon-map-clz"
  521. } else if (res.data[i].eventStatus == "event_event_status_4") {
  522. markersMap.click = "showEventInfo_notProcessed"
  523. markersMap.icon = "sj-icon-map-wcl"
  524. } else {
  525. markersMap.icon = "sj-icon-map-ywc"
  526. }
  527. markersMap.parameter = res.data[i].id
  528. markersMap.lng = res.data[i].longitude
  529. markersMap.lat = res.data[i].latitude
  530. markersMap.bindPopupHtml = '<div class="map-tip">' +
  531. '<span>' +
  532. ' <div class="d-l-con">' +
  533. ' <div class="d-l-l-text">' +
  534. ' <h4>经纬度:' + res.data[i].longitude + ',' + res.data[i]
  535. .latitude + '</h4>' +
  536. ' </div>' +
  537. ' </div>' +
  538. ' </span>' +
  539. '<span>' +
  540. ' <div class="d-l-con">' +
  541. ' <div class="d-l-l-text">' +
  542. ' <h4>事件名称:' + res.data[i].eventTitle + '</h4>' +
  543. ' </div>' +
  544. ' </div>' +
  545. ' </span>' +
  546. '<span>' +
  547. ' <div class="d-l-con">' +
  548. ' <div class="d-l-l-text">' +
  549. ' <h4>事件时间:' + res.data[i].reportTime + '</h4>' +
  550. ' </div>' +
  551. ' </div>' +
  552. ' </span>' +
  553. '</div>'
  554. that.markersList.push(markersMap)
  555. }
  556. that.eventList = res.data
  557. setTimeout(() => {
  558. that.$refs.eventLocationSupermap.clearM(true)
  559. that.$refs.eventLocationSupermap.clearM(false)
  560. that.$refs.eventLocationSupermap.setMarkers(that.markersList)
  561. that.$refs.eventLocationSupermap.setMarkers(marker)
  562. }, 1000)
  563. }
  564. })
  565. },
  566. handleClick(tab, event) {
  567. let that = this
  568. that.$refs.eventLocationSupermap.controlLevel(8)
  569. let marker = [{
  570. lng: this.longitude,
  571. lat: this.latitude,
  572. icon: 'marker',
  573. bindPopupHtml: '定位',
  574. click: '',
  575. parameter: '',
  576. keepBindPopup: false,
  577. isAggregation: false
  578. }]
  579. if (tab.name == 'monitor') {
  580. that.cameraMarkersList = []
  581. that.cameraList = []
  582. getNearCamera(this.longitude, this.latitude).then(res => {
  583. //根据设备类型查看列表
  584. that.cameraList = res.data
  585. if (res.data != null && res.data.length > 0) {
  586. for (let i = 0; i < res.data.length; i++) {
  587. let markersMap = {
  588. lng: 124.59,
  589. lat: 43.02,
  590. icon: 'camera',
  591. bindPopupHtml: '',
  592. click: 'preview',
  593. parameter: '',
  594. keepBindPopup: false,
  595. isAggregation: false
  596. }
  597. if (res.data.length > 50) {
  598. markersMap.isAggregation = true
  599. }
  600. if (res.data[i].channelCode != null) {
  601. markersMap.parameter = res.data[i].channelCode.split(',')
  602. } else {
  603. markersMap.parameter = []
  604. }
  605. markersMap.lng = res.data[i].longitude
  606. markersMap.lat = res.data[i].latitude
  607. markersMap.bindPopupHtml = '<div class="map-tip">' +
  608. '<span>' +
  609. ' <div class="d-l-con">' +
  610. ' <div class="d-l-l-text">' +
  611. ' <h4>经纬度:' + res.data[i].longitude + ',' + res.data[i].latitude + '</h4>' +
  612. ' </div>' +
  613. ' </div>' +
  614. ' </span>' +
  615. '<span>' +
  616. ' <div class="d-l-con">' +
  617. ' <div class="d-l-l-text">' +
  618. ' <h4>摄像头名称:' + res.data[i].cameraName + '</h4>' +
  619. ' </div>' +
  620. ' </div>' +
  621. ' </span>' +
  622. '</div>'
  623. this.cameraMarkersList.push(markersMap)
  624. }
  625. setTimeout(() => {
  626. that.$refs.eventLocationSupermap.clearM(true)
  627. that.$refs.eventLocationSupermap.clearM(false)
  628. that.$refs.eventLocationSupermap.setMarkers(this.cameraMarkersList)
  629. that.$refs.eventLocationSupermap.setMarkers(marker)
  630. }, 1000)
  631. }
  632. })
  633. } else {
  634. that.getNearEvent()
  635. }
  636. },
  637. dropLocation(lat, lng) {
  638. this.$refs.eventLocationSupermap.dropLocation(lat, lng)
  639. },
  640. showEventLocation() {
  641. this.eventLocationVisible = true
  642. },
  643. /** ----------------------------------摄像头预览开始------------------------------------- */
  644. alertLogin: function() {
  645. this.$modal.msg('登录中....')
  646. },
  647. alertLoginSuccess: function() {
  648. this.$modal.msgSuccess('登录成功!')
  649. },
  650. alertLoginFailed: function() {
  651. this.$modal.msgError('登陆失败!')
  652. },
  653. alertReinstall: function() {
  654. this.$modal.msgWarning('请重新安装客户端')
  655. },
  656. /** 预览按钮操作 */
  657. preview(channelCode) {
  658. getDahuaVideoServer().then(newResponse => {
  659. this.ws.detectConnectQt().then(res => {
  660. if (res) { // 连接客户端成功
  661. this.alertLogin()
  662. this.ws.login({
  663. loginIp: newResponse.loginIp,
  664. loginPort: newResponse.loginPort,
  665. userName: newResponse.userName,
  666. userPwd: newResponse.userPwd,
  667. token: '',
  668. https: 1
  669. })
  670. this.ws.on('loginState', (res) => {
  671. this.isLogin = res
  672. console.log('---res-----', res)
  673. if (res) {
  674. this.alertLoginSuccess()
  675. this.activePanel = 'key2'
  676. this.realTimeVideoDialog(channelCode)
  677. } else {
  678. this.alertLoginFailed()
  679. }
  680. })
  681. } else { // 连接客户端失败
  682. this.alertReinstall()
  683. }
  684. })
  685. })
  686. },
  687. realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
  688. if (!this.isLogin) {
  689. this.$Message.info('正在登陆客户端,请稍等......')
  690. return false
  691. }
  692. this.ws.openVideo(cameraParams)
  693. },
  694. /** ----------------------------------摄像头预览结束------------------------------------- */
  695. /** ----------------------------------事件弹窗开始-未处理------------------------------------- */
  696. switchImage(url) {
  697. this.url = url
  698. },
  699. formLeaveTable(){
  700. let p=new Promise((resolve, reject) =>
  701. reject()
  702. );
  703. return p;
  704. },
  705. async beforeLeave(newactiveName, oldActiveName) {
  706. let that = this;
  707. if (newactiveName == 'frame') {
  708. return await that.formLeaveTable()
  709. }
  710. },
  711. // 弹层方法
  712. showEventInfo_notProcessed(id) {
  713. let that = this
  714. that.id=id;
  715. that.eventInfoVisible_notProcessed = true
  716. that.listEventPic = [],
  717. that.url = '',
  718. that.resetQuery()
  719. getWarm(id).then(res => {
  720. let data = res.data
  721. that.id = data.id;
  722. that.cameraId = data.reportById
  723. that.reportTime = data.reportTime
  724. that.reportAddress = data.reportAddress
  725. that.eventCode = data.eventCode
  726. that.eventSource = data.eventSource
  727. that.information[0].content = data.eventTitle
  728. that.information[1].content = data.reportTime
  729. that.information[2].content = that.selectDictLabel(that.dict.type.event_source, data.eventSource)
  730. that.information[3].content = data.longitude
  731. that.information[4].content = data.latitude
  732. that.information[5].content = data.reportBy
  733. that.information[6].content = data.eventContent
  734. selectByeventCode(data.eventCode).then(res1 => {
  735. let that = this
  736. that.listEventDept = res1.data.allDept
  737. that.listoperateDept = res1.data.operateDept
  738. })
  739. listByEventCode(data.eventCode).then(res2 => {
  740. let that = this
  741. that.listLog = res2.data
  742. })
  743. selectCameraEventByCameraId(data.reportById).then(res3 => {
  744. let that = this
  745. that.listeventType = res3.data
  746. })
  747. if (data.attachId != null) {
  748. listCenterdataTAttachByBusId(data.attachId).then(res4 => {
  749. let that = this
  750. that.listEventPic = res4.data
  751. if (that.listEventPic.length > 0) {
  752. that.url = that.listEventPic[0]
  753. } else {
  754. that.url = ""
  755. }
  756. })
  757. }
  758. })
  759. },
  760. updateEventStatusNotProcessed() {
  761. if (this.deptName == '') {
  762. this.$modal.msgError("请选择部门");
  763. return
  764. }
  765. if (this.eventStatus == '') {
  766. this.$modal.msgError("请选择状态");
  767. return
  768. }
  769. if (this.eventTypeShow) {
  770. if (this.eventType == '') {
  771. this.$modal.msgError("请选择事件类型");
  772. return
  773. }
  774. }
  775. this.updateEventStatusForm.id = this.id
  776. this.updateEventStatusForm.zt = this.eventStatus
  777. this.updateEventStatusForm.eventCode = this.eventCode
  778. this.updateEventStatusForm.deptId = this.deptId
  779. this.updateEventStatusForm.deptName = this.deptName
  780. this.updateEventStatusForm.eventType = this.eventType
  781. updateDeptEventStatus(this.updateEventStatusForm).then(response => {
  782. this.$modal.msgSuccess(response.msg)
  783. this.eventStatus = ''
  784. this.deptId = ''
  785. this.eventType = ''
  786. this.deptName = ''
  787. this.eventInfoVisible_notProcessed = false
  788. cancelEventShow();
  789. })
  790. },
  791. updateEventStatusProcessed() {
  792. if(this.eventStatus==''){
  793. this.$modal.msgError("请选择状态");
  794. return
  795. }
  796. updateCentereventTForestfireStatus(this.id, this.eventStatus).then(response => {
  797. this.$modal.msgSuccess(response.msg)
  798. this.eventStatus=''
  799. this.eventInfoVisible_Processed = false
  800. cancelEventShow();
  801. })
  802. },
  803. setXsYc() {
  804. let that = this
  805. if (this.eventStatus == 'qr') {
  806. this.eventTypeShow = true
  807. } else {
  808. this.eventTypeShow = false
  809. }
  810. },
  811. setValue(event) {
  812. this.deptId = event.value
  813. this.deptName = event.label
  814. },
  815. cancelEventShow() {
  816. this.eventInfoVisibleActiveName = 'info';
  817. this.listEventPic = [];//事件图片
  818. this.listEventDept = [];//涉事单位List,
  819. this.listLog = [];//处理过程List,
  820. this.listoperateDept = [];
  821. },
  822. handleClickNotProcessed: function (tab, oldActiveName) {
  823. let that = this
  824. if (tab.name == 'frame') {
  825. if (that.eventSource == 'event_source_2') {
  826. selectchannelCodeByCameraId(that.cameraId).then(res => {
  827. let channelCode = [];
  828. if (res.data != null && res.data.length > 0) {
  829. for (let i = 0; i < res.data.length; i++) {
  830. channelCode.push(res.data[i].channelCode);
  831. }
  832. }
  833. //this.preview("ZgVzqsjwA1DT3G85KJ7HH0");
  834. if(channelCode!=null&&channelCode.length>0){
  835. this.preview(channelCode);
  836. }else{
  837. this.$modal.msg("没有匹配到相对应摄像头!!!");
  838. }
  839. })
  840. }else{
  841. this.$modal.msg("没有匹配到相对应摄像头!!!");
  842. }
  843. } else if (tab.name == 'point') {
  844. setTimeout(() => {
  845. that.markersMapList=[];
  846. let information={};
  847. information.lng = that.information[3].content;
  848. information.lat = that.information[4].content;
  849. let bindPopupHtml = '';
  850. for (let i = 0; i < that.information.length; i++) {
  851. bindPopupHtml += '<span>' +
  852. ' <div class="d-l-con">' +
  853. ' <div class="d-l-l-text">' +
  854. ' <h4>' + that.information[i].name + ':' + that.information[i].content + '</h4>' +
  855. ' </div>' +
  856. ' </div>' +
  857. ' </span>';
  858. }
  859. information.bindPopupHtml = bindPopupHtml;
  860. information.click = "";
  861. information.keepBindPopup = false;
  862. information.isAggregation = false;
  863. information.icon = "marker";
  864. that.markersMapList.push(information)
  865. // 查询火点附近摄像头
  866. selectFjsxt(that.information[3].content,that.information[4].content).then(response => {
  867. console.log("vv",response.data)
  868. if (response.data!=null&&response.data.length>0){
  869. for(let i=0;i<response.data.length;i++)
  870. {
  871. let marke={};
  872. marke.lng = response.data[i].longitude;
  873. marke.lat = response.data[i].latitude;
  874. let code=response.data[i].channelCode.split(",");
  875. marke.bindPopupHtml = response.data[i].cameraName;
  876. marke.click = "preview";
  877. marke.parameter = code;
  878. marke.keepBindPopup = false;
  879. marke.isAggregation = false;
  880. marke.icon = "camera";
  881. that.markersMapList.push(marke)
  882. }
  883. }
  884. that.$refs.notProcessedSupermap.dropLocation(information.lat ,information.lng)
  885. that.$refs.notProcessedSupermap.clearM(false)
  886. that.$refs.notProcessedSupermap.setMarkers(that.markersMapList)
  887. })
  888. }, 1000);
  889. }
  890. },
  891. /** 重置按钮操作 */
  892. resetQuery() {
  893. this.eventTypeShow = false
  894. this.eventType = ''
  895. this.deptName = ''
  896. this.eventStatus = ''
  897. },
  898. /** ----------------------------------事件弹窗结束-未处理------------------------------------- */
  899. /** ----------------------------------事件弹窗开始-处理中------------------------------------- */
  900. handleClickProcessed(tab, event) {
  901. let that=this
  902. if(tab.name == 'frame'){
  903. if(that.eventSource=='event_source_2') {
  904. selectchannelCodeByCameraId(that.cameraId).then(res => {
  905. let channelCode=[];
  906. if(res.data!=null&&res.data.length>0){
  907. for (let i = 0; i < res.data.length; i++) {
  908. channelCode.push(res.data[i].channelCode);
  909. }
  910. }
  911. if(channelCode!=null&&channelCode.length>0){
  912. this.preview(channelCode);
  913. }else{
  914. this.$modal.msg("没有匹配到相对应摄像头!!!");
  915. }
  916. })
  917. }else{
  918. this.$modal.msg("没有匹配到相对应摄像头!!!");
  919. }
  920. } else if (tab.name == 'point') {
  921. setTimeout(() => {
  922. that.markersMapList=[];
  923. let information={};
  924. information.lng = that.information[3].content;
  925. information.lat = that.information[4].content;
  926. let bindPopupHtml = '';
  927. for (let i = 0; i < that.information.length; i++) {
  928. bindPopupHtml += '<span>' +
  929. ' <div class="d-l-con">' +
  930. ' <div class="d-l-l-text">' +
  931. ' <h4>' + that.information[i].name + ':' + that.information[i].content + '</h4>' +
  932. ' </div>' +
  933. ' </div>' +
  934. ' </span>';
  935. }
  936. information.bindPopupHtml = bindPopupHtml;
  937. information.click = "";
  938. information.keepBindPopup = false;
  939. information.isAggregation = false;
  940. information.icon = "marker";
  941. that.markersMapList.push(information)
  942. // 查询火点附近摄像头
  943. selectFjsxt(that.information[3].content,that.information[4].content).then(response => {
  944. console.log("vv",response.data)
  945. if (response.data!=null&&response.data.length>0){
  946. for(let i=0;i<response.data.length;i++)
  947. {
  948. let marke={};
  949. marke.lng = response.data[i].longitude;
  950. marke.lat = response.data[i].latitude;
  951. let code=response.data[i].channelCode.split(",");
  952. marke.bindPopupHtml = response.data[i].cameraName;
  953. marke.click = "preview";
  954. marke.parameter = code;
  955. marke.keepBindPopup = false;
  956. marke.isAggregation = false;
  957. marke.icon = "camera";
  958. that.markersMapList.push(marke)
  959. }
  960. }
  961. that.$refs.processedSupermap.dropLocation(information.lat,information.lng)
  962. that.$refs.processedSupermap.clearM(false)
  963. that.$refs.processedSupermap.setMarkers(that.markersMapList)
  964. })
  965. }, 1000);
  966. }
  967. },
  968. showEventInfo_Processed(id) {
  969. let that = this
  970. that.id=id;
  971. that.eventInfoVisible_Processed = true;
  972. that.listEventPic = [];
  973. that.url = '';
  974. getForest(id).then(response => {
  975. let data = response.data
  976. if (data.eventStatus != 'event_event_status_1') {
  977. this.aniu = false
  978. }
  979. if(data.eventStatus=='event_event_status_6'){
  980. this.optionsProcessed.splice(1,2)
  981. this.zt=3
  982. }
  983. if(data.eventStatus=='event_event_status_1'){
  984. this.optionsProcessed.splice(2,1)
  985. this.zt=2
  986. }
  987. if(data.eventStatus=='event_event_status_2'){
  988. this.optionsProcessed.splice(0,2)
  989. this.zt=4
  990. }
  991. if(data.eventStatus=='event_event_status_3'){
  992. this.showZt=false
  993. this.fireReport=true
  994. this.zt=5
  995. }
  996. let that = this
  997. this.eventSource=data.eventSource
  998. this.id=data.id;
  999. this.reportTime=data.reportTime
  1000. this.cameraId=data.reportById
  1001. this.reportAddress=data.reportAddress
  1002. this.eventCode=data.eventCode
  1003. this.information[0].content = data.eventTitle
  1004. this.information[1].content = data.reportTime
  1005. this.information[2].content = that.selectDictLabel(that.dict.type.event_source, data.eventSource)
  1006. this.information[3].content = data.longitude
  1007. this.information[4].content = data.latitude
  1008. this.information[5].content = data.reportBy
  1009. this.information[6].content = data.eventContent
  1010. selectByeventCode(data.eventCode).then(response => {
  1011. that.listEventDept=response.data
  1012. })
  1013. listByEventCode(data.eventCode).then(response => {
  1014. that.listLog=response.data
  1015. })
  1016. if(data.attachId != null){
  1017. listCenterdataTAttachByBusId(data.attachId).then(response => {
  1018. that.listEventPic=response.data
  1019. if(that.listEventPic.length>0) {
  1020. that.url = that.listEventPic[0]
  1021. }else{
  1022. that.url=""
  1023. }
  1024. })
  1025. }
  1026. })
  1027. },
  1028. /** ----------------------------------事件弹窗结束-处理中------------------------------------- */
  1029. }
  1030. }
  1031. </script>
  1032. <style rel="stylesheet/scss" lang="scss" scoped>
  1033. @import '@/assets/styles/base.scss';
  1034. .event-info-con{
  1035. width: 100%;
  1036. display: flex;
  1037. .e-left{
  1038. width: 32%;
  1039. }
  1040. .e-center{
  1041. width: 30%;
  1042. margin-left: 1%;
  1043. .img-company{
  1044. width: 100%;
  1045. height: 18.3vh;
  1046. img{}
  1047. }
  1048. }
  1049. .e-right{
  1050. margin-left: 1%;
  1051. width: 45%;
  1052. }
  1053. .e-location-left{
  1054. width: 28%;
  1055. margin-top: 1rem;
  1056. }
  1057. .e-location-right{
  1058. width: 71%;
  1059. margin-top: 1.3rem;
  1060. margin-left: 1rem;
  1061. }
  1062. }
  1063. .el-dialog:not(.is-fullscreen) {
  1064. margin-top: 5.5vh !important;
  1065. }
  1066. .bottom-menu-normal {
  1067. max-width: 90%;
  1068. padding: 0 3rem;
  1069. position: absolute;
  1070. left: 50%;
  1071. transform: translateX(-50%);
  1072. bottom: 0;
  1073. z-index: 100000;
  1074. border-radius: 5px;
  1075. display: flex;
  1076. justify-content: center;
  1077. align-items: center;
  1078. background: url(../assets/images/integrated/btm-menu.png) center no-repeat;
  1079. background-size: cover;
  1080. overflow: hidden;
  1081. .btm-m-con {
  1082. position: relative;
  1083. color: $inBlue;
  1084. font-size: .5rem;
  1085. padding: 1rem 1.5rem;
  1086. display: flex;
  1087. align-items: center;
  1088. justify-content: center;
  1089. -webkit-transform: translateY(0);
  1090. transform: translateY(0);
  1091. transition: all 0.2s ease-in-out;
  1092. cursor: pointer;
  1093. white-space: nowrap;
  1094. i {
  1095. font-size: 1rem;
  1096. color: $inBlue;
  1097. text-shadow: 0 0 10px rgba($color: $inBlue, $alpha: .6);
  1098. margin-right: 0.2rem;
  1099. }
  1100. }
  1101. .btm-m-con:hover {
  1102. text-shadow: 0 0 20px rgba($color: $inBlueHover, $alpha: 1.0);
  1103. filter: brightness(2.3);
  1104. -webkit-transform: translateX(0.2rem);
  1105. transform: translateX(0.2rem);
  1106. transition: all 0.2s ease-in-out;
  1107. i {
  1108. color: $inBlueHover;
  1109. text-shadow: 0 0 20px rgba($color: $inBlueHover, $alpha: 1.0);
  1110. }
  1111. }
  1112. .m-l-none{
  1113. .el-input__inner{
  1114. margin-left:0 !important;
  1115. }
  1116. }
  1117. }
  1118. </style>