eventLocation.vue 44 KB

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