event.vue 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502
  1. <!--事件中心-->
  2. <template>
  3. <div class="visual-con">
  4. <!--头部-->
  5. <vheader></vheader>
  6. <!--主体-->
  7. <div class="visual-body">
  8. <!-- 左侧 -->
  9. <div class="leftbar" :class="indentleft" ref="left">
  10. <div class="forthis">
  11. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  12. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  13. <div class="this-title">
  14. <span>今日事件</span>
  15. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  16. </div>
  17. <div class="i-list-con h-73">
  18. <div class="d-l-con-icon">
  19. <div class="icon-con w-33 flex-d t-a-center"
  20. :class="{on:iconCurrentIndex1==item.eventStatus}"
  21. v-for="(item,index) in todayEventCountList"
  22. v-on:click="todayEventCountSetMarkers(item.eventStatus)">
  23. <div class="icon iconfont icon-mid" :class="item.icon"></div>
  24. <div class="icon-text">
  25. <h5 class="m-r-none icon-text-col">{{item.eventStatusName}}</h5>
  26. <h6 class="m-r-none">{{item.count}}</h6>
  27. </div>
  28. </div>
  29. <div class="icon-con w-33 flex-d t-a-center"
  30. :class="{on:iconCurrentIndex2==item.eventSource}"
  31. v-for="(item,index) in todayEventSourcetList"
  32. v-on:click="todayEventSourcetSetMarkers(item.eventSource)">
  33. <div class="icon iconfont icon-mid" :class="item.icon"></div>
  34. <div class="icon-text">
  35. <h5 class="m-r-none icon-text-col">{{item.eventSourceName}}</h5>
  36. <h6 class="m-r-none">{{item.count}}</h6>
  37. </div>
  38. </div>
  39. </div>
  40. <div class="d-tit">
  41. <h4>事件分布</h4>
  42. </div>
  43. <div class="h-16 overflow-y">
  44. <div class="d-l-con" v-for="(item,index) in todayEventCountDeptList"
  45. v-on:click="todayEventByDeptIdList(item.deptId)">
  46. <div class="d-l-l-text">
  47. <i class="i-small"></i>
  48. <h4>{{item.deptName}}</h4>
  49. </div>
  50. <div class="d-l-l-count">{{item.count}}</div>
  51. </div>
  52. </div>
  53. <div class="d-tit">
  54. <h4>事件分类</h4>
  55. </div>
  56. <div id="event-chart" style="width: 100%;height:24.2vh;"></div>
  57. <div class="d-l-con" v-for="(item,index) in todayEventCountTypeList"
  58. v-on:click="todayEventByTypeList(item.eventType)">
  59. <div class="d-l-l-text">
  60. <i class="i-small"></i>
  61. <h4>{{item.eventTypeName}}</h4>
  62. </div>
  63. <div class="d-l-l-count"> {{item.count}}</div>
  64. </div>
  65. </div>
  66. </dv-border-box-13>
  67. </div>
  68. </div>
  69. <!-- 地图 -->
  70. <supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'forestMap'"
  71. :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"
  72. @showEventInfo_notProcessed="showEventInfo_notProcessed"
  73. @showEventInfo_Processed="showEventInfo_Processed"></supermap>
  74. <!-- 右侧 -->
  75. <div class="rightbar" :class="indentright" ref="right">
  76. <div class="forthis">
  77. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  78. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  79. <div class="this-title">
  80. <span>今日列表</span>
  81. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  82. </div>
  83. <div class="i-list-con h-73">
  84. <div class="d-l-con d-evnet-list-con" :class="{on:listCurrentIndex == index}" :key="index" v-for="(item,index) in eventList"
  85. v-on:click="dropLocation(item.latitude,item.longitude , index)">
  86. <img :src="item.picturePath" v-if="item.picturePath!=null&&item.picturePath!=''"
  87. class="event-list-img" onerror="javascript:this.src='/img-sample.png'">
  88. <img src="@/assets/images/visual/img-sample.png" v-else class="event-list-img">
  89. <div class="event-list-text">
  90. <h3>{{item.eventTitle}}</h3>
  91. <!-- <h4><span-->
  92. <!-- :class="[item.state==0?'state-wcl':'state-wyc']">{{['新上报','处理中'][item.state]}}</span><span>{{item.source}}</span><span>{{item.time}}</span>-->
  93. <!-- </h4>-->
  94. <!-- <h4>{{item.phoneNum}}</h4>-->
  95. </div>
  96. </div>
  97. </div>
  98. </dv-border-box-13>
  99. </div>
  100. </div>
  101. <vBottomMenu ref="bottomMenu"></vBottomMenu>
  102. <el-tooltip :content="indentText" placement="top" :disabled="indentdisabled">
  103. <div class="mascot" ref="mascot" :class="indentStyle" @click="indent"><img
  104. src="@/assets/images/mascot.png" /></div>
  105. </el-tooltip>
  106. </div>
  107. <!--事件弹层-->
  108. <div class="event-info">
  109. <el-dialog title="事件信息-未处理" :visible.sync="eventInfoVisible_notProcessed"
  110. v-if="eventInfoVisible_notProcessed" width="80%" @close="cancelEventShow()">
  111. <div style="position:absolute; right: 0;top:60px; width:40%;">
  112. <el-steps :space="200" :active="1" finish-status="success" align-center>
  113. <el-step title="待处理"></el-step>
  114. <el-step title="处理中"></el-step>
  115. <el-step title="已办结"></el-step>
  116. <el-step title="已归档"></el-step>
  117. </el-steps>
  118. </div>
  119. <el-tabs v-model="activeName" @tab-click="handleClickNotProcessed" :before-leave="beforeLeave">
  120. <el-tab-pane label="基础信息" name="info">
  121. <div class="event-info-con">
  122. <div class="e-left">
  123. <div class="forthis">
  124. <div class="i-list-con h-35">
  125. <span v-for="(information,index) in information" :key="index">
  126. <div class="d-l-con">
  127. <div class="d-l-l-text">
  128. <i class="i-small"></i>
  129. <h4>{{information.name}}:</h4>
  130. <h4>{{information.content}}</h4>
  131. </div>
  132. </div>
  133. </span>
  134. </div>
  135. </div>
  136. <div class="forthis d-map h-30">
  137. <div class="this-title">
  138. <span>涉事单位</span>
  139. </div>
  140. <div class="i-list-con h-26">
  141. <span v-for="(company,index) in listEventDept" :key="index">
  142. <div class="d-l-con">
  143. <div class="d-l-l-text">
  144. <i class="i-small"></i>
  145. <h4>{{company.deptName}}</h4>
  146. </div>
  147. <div class="d-l-l-count"
  148. :class="[company.eventStatus=='未处理'?'state-wcl':'state-wyc']">
  149. <!-- {{['未处理','无异常'][company.state]}}-->{{company.eventStatus}}
  150. </div>
  151. </div>
  152. </span>
  153. </div>
  154. </div>
  155. </div>
  156. <div class="e-center">
  157. <div class="forthis">
  158. <div class="i-list-con h-35">
  159. <el-image :src="url" :preview-src-list="listEventPic" class="img-company"
  160. style="height: 100%;" v-if="url!=''">
  161. </el-image>
  162. </div>
  163. </div>
  164. <div class="forthis h-30">
  165. <div class="i-list-con h-26">
  166. <el-image :src="item" style="width:3.9rem; height:3rem;margin: 2px;"
  167. v-for="(item,index) in listEventPic" @click="switchImage(item)">
  168. </el-image>
  169. </div>
  170. </div>
  171. </div>
  172. <div class="e-right">
  173. <div class="forthis h-67">
  174. <div class="this-title">
  175. <span>处理过程</span>
  176. </div>
  177. <div class="i-list-con">
  178. <div class="this-con">
  179. <span v-for="(company,index) in listLog" :key="index">
  180. <div class="z-begin" v-if="company.messageType=='sys_messageType_1'">
  181. {{company.logContent}}
  182. </div>
  183. <div class="z-info-list"
  184. v-if="company.messageType=='sys_messageType_2'">
  185. <el-image :src="require('@/assets/images/visual/user-img.png')"
  186. style="width: 3rem; height: 3rem;margin:2px;">
  187. </el-image>
  188. <div class="z-info-list-con">
  189. <div class="user-and-time">
  190. <span>{{company.createBy}}</span><span>
  191. {{company.createTime}}</span>
  192. </div>
  193. <div class="z-info">
  194. <div class="this-con-list-info">
  195. {{company.logContent}}
  196. </div>
  197. <div>
  198. <el-image :src="url" :preview-src-list="srcList"
  199. style="width:6.5rem; height:5rem;margin: 2px;"
  200. v-for="(item,index) in 4">
  201. </el-image>
  202. </div>
  203. </div>
  204. </div>
  205. </div>
  206. </span>
  207. </div>
  208. </div>
  209. </div>
  210. </div>
  211. </div>
  212. <div class="e-btm-btn">
  213. <el-form>
  214. <el-form-item>
  215. <el-select v-model="deptName" clearable placeholder="请选择部门" class="m-r-1rem"
  216. @change="setValue">
  217. <el-option v-for="item in listoperateDept" :key="item.deptId"
  218. :label="item.deptName" :value="{value:item.deptId,label:item.deptName}"
  219. :disabled="item.eventStatus=='未处理' ? false:true">
  220. </el-option>
  221. </el-select>
  222. <el-select v-model="eventStatus" clearable placeholder="请选择状态" class="m-r-1rem"
  223. @change="setXsYc">
  224. <el-option v-for="item in optionsNotProcessed" :key="item.value"
  225. :label="item.label" :value="item.value">
  226. </el-option>
  227. </el-select>
  228. <el-select v-model="eventType" clearable placeholder="请选择事件" class="m-r-1rem"
  229. v-if="eventTypeShow">
  230. <el-option v-for="item in listeventType" :key="item.id"
  231. :label="item.eventTypeName" :value="item.eventType">
  232. </el-option>
  233. </el-select>
  234. <!-- <el-radio v-model="radio" label="1">无异常</el-radio>
  235. <el-radio v-model="radio" label="2">确认火情</el-radio> -->
  236. <el-button type="success" @click="updateEventStatusNotProcessed">确定</el-button>
  237. </el-form-item>
  238. </el-form>
  239. </div>
  240. </el-tab-pane>
  241. <el-tab-pane label="实时画面" name="frame">
  242. </el-tab-pane>
  243. <el-tab-pane label="地理位置" name="point">
  244. <div class="info-button-group">
  245. <button>视频联动</button>
  246. <button @click="editableLayers('supermapNotProcessed')">测量工具</button>
  247. </div>
  248. <supermapNotProcessed ref="supermapNotProcessed" v-if="'point' === activeName"
  249. style="width:100% ;height: 75vh;" :mapDiv="'supermapNotProcessedSuperMap'"
  250. :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" @preview="preview"
  251. :isSideBySide="false"></supermapNotProcessed>
  252. </el-tab-pane>
  253. </el-tabs>
  254. </el-dialog>
  255. <el-dialog title="事件信息" :visible.sync="eventInfoVisible_Processed" v-if="eventInfoVisible_Processed"
  256. width="80%" @close="cancelEventShow()">
  257. <div style="position:absolute; right: 0;top:60px; width:40%;">
  258. <el-steps :space="200" :active=zt finish-status="success" align-center>
  259. <el-step title="待处理"></el-step>
  260. <el-step title="处理中"></el-step>
  261. <el-step title="支援"></el-step>
  262. <el-step title="已办结"></el-step>
  263. <el-step title="已归档"></el-step>
  264. </el-steps>
  265. </div>
  266. <el-tabs v-model="activeName" @tab-click="handleClickProcessed" :before-leave="beforeLeave">
  267. <el-tab-pane label="基础信息" name="info">
  268. <div class="event-info-con">
  269. <div class="e-left">
  270. <div class="forthis">
  271. <div class="i-list-con h-35">
  272. <span v-for="(information,index) in information" :key="index">
  273. <div class="d-l-con">
  274. <div class="d-l-l-text">
  275. <i class="i-small"></i>
  276. <h4>{{information.name}}:</h4>
  277. <h4>{{information.content}}</h4>
  278. </div>
  279. </div>
  280. </span>
  281. </div>
  282. </div>
  283. <div class="forthis d-map h-30">
  284. <div class="this-title">
  285. <span>涉事单位</span>
  286. </div>
  287. <div class="i-list-con h-26">
  288. <span v-for="(company,index) in listEventDept.allDept" :key="index">
  289. <div class="d-l-con">
  290. <div class="d-l-l-text">
  291. <i class="i-small"></i>
  292. <h4>{{company.deptName}}</h4>
  293. </div>
  294. <div class="d-l-l-count"
  295. :class="[company.eventStatus=='未处理'?'state-wcl':'state-wyc']">
  296. <!-- {{['未处理','无异常'][company.state]}}-->{{company.eventStatus}}
  297. </div>
  298. </div>
  299. </span>
  300. </div>
  301. </div>
  302. </div>
  303. <div class="e-center">
  304. <div class="forthis">
  305. <div class="i-list-con h-35">
  306. <el-image :src="url" :preview-src-list=listEventPic class="img-company"
  307. style="height: 100%;" v-if="url!=''">
  308. </el-image>
  309. </div>
  310. </div>
  311. <div class="forthis h-30">
  312. <div class="i-list-con h-26">
  313. <el-image :src="item" style="width:3.9rem; height:3rem;margin: 2px;"
  314. v-for="(item,index) in listEventPic" @click="switchImage(item)">
  315. </el-image>
  316. </div>
  317. </div>
  318. </div>
  319. <div class="e-right">
  320. <div class="forthis h-67">
  321. <div class="this-title">
  322. <span>处理过程</span>
  323. </div>
  324. <div class="i-list-con">
  325. <div class="this-con">
  326. <span v-for="(company,index) in listLog" :key="index">
  327. <div class="z-begin" v-if="company.messageType=='sys_messageType_1'">
  328. {{company.logContent}}
  329. </div>
  330. <div class="z-info-list"
  331. v-if="company.messageType=='sys_messageType_2'">
  332. <el-image :src="require('@/assets/images/visual/user-img.png')"
  333. style="width: 3rem; height: 3rem;margin:2px;">
  334. </el-image>
  335. <div class="z-info-list-con">
  336. <div class="user-and-time">
  337. <span>{{company.createBy}}</span><span>
  338. {{company.createTime}}</span>
  339. </div>
  340. <div class="z-info">
  341. <div class="this-con-list-info">
  342. {{company.logContent}}
  343. </div>
  344. <div>
  345. <el-image :src="item" :preview-src-list="company.fileUrls"
  346. style="width:6.5rem; height:5rem;margin: 2px;"
  347. v-for="(item,index) in company.fileUrls">
  348. </el-image>
  349. </div>
  350. </div>
  351. </div>
  352. </div>
  353. </span>
  354. </div>
  355. </div>
  356. </div>
  357. </div>
  358. </div>
  359. <div class="e-btm-btn">
  360. <el-form>
  361. <el-form-item v-if=showZt>
  362. <el-select v-model="eventStatus" clearable placeholder="请选择状态" class="m-r-1rem">
  363. <el-option v-for="item in optionsProcessed" :key="item.value"
  364. :label="item.label" :value="item.value">
  365. </el-option>
  366. </el-select>
  367. <!-- <el-radio v-model="radio" label="1">无异常</el-radio>
  368. <el-radio v-model="radio" label="2">确认火情</el-radio> -->
  369. <el-button type="success" @click="updateEventStatusProcessed">确定</el-button>
  370. </el-form-item>
  371. </el-form>
  372. </div>
  373. </el-tab-pane>
  374. <el-tab-pane label="实时画面" name="frame">
  375. </el-tab-pane>
  376. <el-tab-pane label="地理位置" name="point">
  377. <div class="info-button-group">
  378. <button>视频联动</button>
  379. <button @click="editableLayers('supermapProcessed')">测量工具</button>
  380. </div>
  381. <supermapProcessed v-if="'point' === activeName" ref="supermapProcessed"
  382. style="width:100% ;height: 75vh;" :mapDiv="'supermapProcessedSuperMap'"
  383. :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" @preview="preview"
  384. :isSideBySide="false"></supermapProcessed>
  385. </el-tab-pane>
  386. </el-tabs>
  387. </el-dialog>
  388. </div>
  389. <eventLocation ref="eventLocation"></eventLocation>
  390. <TVWall ref="TVWall"></TVWall>
  391. </div>
  392. </template>
  393. <script>
  394. import {
  395. getTodayEvent,
  396. getEventStatusList,
  397. getEventSourceList,
  398. getEventListByDeptIdList,
  399. getEventListByTypeList,
  400. getForest,
  401. updateCentereventTForestfireStatus
  402. } from '@/api/event'
  403. import {
  404. selectByeventCode,
  405. getWarm,
  406. updateDeptEventStatus,
  407. listByEventCode,
  408. selectCentereventTLogListPC,
  409. selectCameraEventByCameraId,
  410. listCenterdataTAttachByBusId,
  411. selectchannelCodeByCameraId,
  412. selectFjsxt
  413. } from '@/api/forest'
  414. /** ----------------------------------摄像头预览开始------------------------------------- */
  415. import {
  416. getDahuaVideoServer
  417. } from "@/api/dahua/dahua";
  418. import DHWs from '@/dahua/lib/DHWs'
  419. /** ----------------------------------摄像头预览结束------------------------------------- */
  420. import supermap from '@/components/supermap' //超图
  421. import supermapNotProcessed from '@/components/supermap' //超图
  422. import supermapProcessed from '@/components/supermap' //超图
  423. import vheader from '@/components/v-header.vue' //一体化共用头部
  424. import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
  425. import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
  426. import TVWall from '@/components/TVWall.vue' //电视墙弹窗
  427. // import echarts from 'echarts'
  428. let echarts = require('echarts')
  429. export default {
  430. dicts: ['event_source'],
  431. components: {
  432. supermap,
  433. supermapNotProcessed,
  434. supermapProcessed,
  435. vheader,
  436. vBottomMenu,
  437. eventLocation,
  438. TVWall,
  439. },
  440. created() {
  441. /** ----------------------------------摄像头预览开始------------------------------------- */
  442. const DHWsInstance = DHWs.getInstance();
  443. this.ws = DHWsInstance;
  444. /** ----------------------------------摄像头预览结束------------------------------------- */
  445. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  446. window.showDialog = this.showDialog
  447. window.choseLayerSwitching = this.choseLayerSwitching
  448. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  449. },
  450. mounted() {
  451. this.getTodayEvent()
  452. },
  453. data() {
  454. return {
  455. iconCurrentIndex1: '',
  456. iconCurrentIndex2: '',
  457. listCurrentIndex: '',
  458. /** ----------------------------------摄像头预览开始------------------------------------- */
  459. activePanel: 'key1',
  460. isLogin: false,
  461. cameraParams: [],
  462. ws:null,
  463. /** ----------------------------------摄像头预览结束------------------------------------- */
  464. markersList: [],
  465. todayEventCountList: [], //今日事件列表
  466. todayEventSourcetList: [], //今日事件列表
  467. todayEventCountDeptList: [], //事件分布
  468. todayEventCountTypeList: [], //事件分类
  469. eventChartData: [], //左侧eachar图表数据
  470. iframeBoo: true,
  471. open: false,
  472. iframeVue: null,
  473. eventInfoVisible_notProcessed: false,
  474. eventInfoVisible_Processed: false,
  475. eventInfoVisible2: false,
  476. activeName: 'info',
  477. radio: '1',
  478. eventList: [],//事件列表
  479. /** ----------------------------------事件弹窗开始-未处理------------------------------------- */
  480. listEventPic: [], //事件图片
  481. url: '',
  482. id: '',
  483. eventType: '',
  484. deptName: '',
  485. eventStatus: '',
  486. cameraId: '',
  487. reportTime: '',
  488. reportAddress: '',
  489. eventCode: null,
  490. eventSource: '',
  491. //事件详情弹出显隐
  492. eventTypeShow: false,
  493. listEventDept: [], //涉事单位List,
  494. listLog: [], //处理过程List,
  495. listoperateDept: [],
  496. optionsNotProcessed: [{
  497. value: 'wyc',
  498. label: '无异常'
  499. }, {
  500. value: 'qr',
  501. label: '确认'
  502. }],
  503. listeventType: [],
  504. updateEventStatusForm: {
  505. id: '',
  506. eventStatus: '',
  507. eventCode: '',
  508. deptId: '',
  509. deptName: '',
  510. eventType: '',
  511. zt: ''
  512. },
  513. /** ----------------------------------事件弹窗结束-未处理------------------------------------- */
  514. aniu: true,
  515. showZt: true,
  516. zt: null,
  517. fireReport: false,
  518. optionsProcessed: [],
  519. // 弹出层 基本信息
  520. information: [{
  521. name: '标题',
  522. id: '',
  523. content: '前段发现警情信息'
  524. },
  525. {
  526. name: '时间',
  527. id: '',
  528. content: '2022-02-14 14:30'
  529. },
  530. {
  531. name: '来源',
  532. id: '',
  533. content: '摄像头'
  534. },
  535. {
  536. name: '坐标',
  537. id: '',
  538. content: '125.78945646'
  539. },
  540. {
  541. name: '纬度',
  542. id: '',
  543. content: '43.987424'
  544. },
  545. {
  546. name: '上报人',
  547. id: '',
  548. content: '党校监控点位'
  549. },
  550. {
  551. name: '详细信息',
  552. id: '',
  553. content: '这里发现病虫害,需要立刻支援'
  554. }
  555. ],
  556. // 弹出层 基本信息 涉事单位
  557. srcList: [
  558. require('@/assets/images/visual/img-sample-3.jpg'),
  559. require('@/assets/images/visual/img-sample-2.jpg'),
  560. require('@/assets/images/visual/img-sample-1.jpg')
  561. ],
  562. srcList1: [
  563. require('@/assets/images/visual/林业病虫害抓拍2.png'),
  564. require('@/assets/images/visual/林业病虫害松墨天牛抓拍.png'),
  565. require('@/assets/images/visual/img-sample-3.jpg')
  566. ],
  567. //左右缩进
  568. indentStyle: '',
  569. indentleft: '',
  570. indentright: '',
  571. indentText: '收起左右栏',
  572. indentdisabled: false
  573. }
  574. },
  575. methods: {
  576. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  577. showDialog(click) {
  578. if (click == 'eventLocation') {
  579. this.$refs.eventLocation.showEventLocation()
  580. this.$refs.supermap.isEditableLayers = false
  581. this.$refs.bottomMenu.showChild = false
  582. } else if (click == 'editableLayers') {
  583. this.$refs.bottomMenu.showChild = false
  584. if (!this.$refs.supermap.isEditableLayers) {
  585. this.$refs.supermap.isEditableLayers = true
  586. } else {
  587. this.$refs.supermap.isEditableLayers = false
  588. }
  589. } else if (click == 'layerSwitching') {
  590. this.$refs.supermap.isEditableLayers = false
  591. if (!this.$refs.bottomMenu.showChild) {
  592. this.$refs.bottomMenu.showChild = true
  593. } else {
  594. this.$refs.bottomMenu.showChild = false
  595. }
  596. } else if (click == 'TVWall') {
  597. this.$refs.TVWall.showTVWall()
  598. this.$refs.supermap.isEditableLayers = false
  599. this.$refs.bottomMenu.showChild = false
  600. }
  601. },
  602. //选择图层
  603. choseLayerSwitching(url) {
  604. this.$refs.supermap.layerSwitching(url, true);
  605. },
  606. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  607. //事件chart
  608. eventChart() {
  609. // 基于准备好的dom,初始化echarts实例
  610. let myChart = echarts.init(document.getElementById('event-chart'))
  611. myChart.setOption({
  612. color: ['#2EACFF', '#FFA61C', '#2EC054', '#8C64D7'],
  613. tooltip: {
  614. trigger: 'item',
  615. formatter: '{a} <br/>{b} : {c} ({d}%)'
  616. },
  617. toolbox: {
  618. show: true
  619. },
  620. series: [{
  621. name: '事件分类',
  622. type: 'pie',
  623. roseType: true,
  624. radius: [30, 70],
  625. label: {
  626. show: true,
  627. formatter: '{b}\n{c} '
  628. },
  629. data: this.eventChartData
  630. }]
  631. })
  632. },
  633. //吉祥物收起左右框
  634. indent() {
  635. let list = document.getElementsByClassName('el-tooltip__popper')
  636. list[list.length - 1].style.display = 'none'
  637. if (this.indentStyle == '') {
  638. this.indentStyle = 'indent-style'
  639. this.indentleft = 'indent-left'
  640. this.indentright = 'indent-right'
  641. this.indentText = '展开左右栏'
  642. } else if (this.indentText == '展开左右栏') {
  643. this.indentStyle = ''
  644. this.indentleft = ''
  645. this.indentright = ''
  646. this.indentText = '收起左右栏'
  647. }
  648. },
  649. /** ----------------------------------事件弹窗开始-未处理------------------------------------- */
  650. editableLayers(processedState) {
  651. if (processedState == 'supermapNotProcessed') {
  652. let aa = this.$refs.supermapNotProcessed.isEditableLayers;
  653. if (!this.$refs.supermapNotProcessed.isEditableLayers) {
  654. this.$refs.supermapNotProcessed.isEditableLayers = true
  655. } else {
  656. this.$refs.supermapNotProcessed.isEditableLayers = false
  657. }
  658. } else {
  659. let bb = this.$refs.supermapProcessed.isEditableLayers;
  660. if (!this.$refs.supermapProcessed.isEditableLayers) {
  661. this.$refs.supermapProcessed.isEditableLayers = true
  662. } else {
  663. this.$refs.supermapProcessed.isEditableLayers = false
  664. }
  665. }
  666. },
  667. switchImage(url) {
  668. this.url = url
  669. },
  670. formLeaveTable() {
  671. let p = new Promise((resolve, reject) =>
  672. reject()
  673. );
  674. return p;
  675. },
  676. async beforeLeave(newactiveName, oldActiveName) {
  677. let that = this;
  678. if (newactiveName == 'frame') {
  679. return await that.formLeaveTable()
  680. }
  681. },
  682. // 弹层方法
  683. showEventInfo_notProcessed(id) {
  684. let that = this
  685. that.id = id;
  686. that.eventInfoVisible_notProcessed = true
  687. that.listEventPic = [],
  688. that.url = '',
  689. that.resetQuery()
  690. getWarm(id).then(res => {
  691. let data = res.data
  692. that.id = data.id;
  693. that.cameraId = data.reportById
  694. that.reportTime = data.reportTime
  695. that.reportAddress = data.reportAddress
  696. that.eventCode = data.eventCode
  697. that.eventSource = data.eventSource
  698. that.information[0].content = data.eventTitle
  699. that.information[1].content = data.reportTime
  700. that.information[2].content = that.selectDictLabel(that.dict.type.event_source, data
  701. .eventSource)
  702. that.information[3].content = data.longitude
  703. that.information[4].content = data.latitude
  704. that.information[5].content = data.reportBy
  705. that.information[6].content = data.eventContent
  706. selectByeventCode(data.eventCode).then(res1 => {
  707. let that = this
  708. that.listEventDept = res1.data.allDept
  709. that.listoperateDept = res1.data.operateDept
  710. })
  711. selectCentereventTLogListPC(data.eventCode).then(res2 => {
  712. let that = this
  713. that.listLog = res2.data
  714. })
  715. selectCameraEventByCameraId(data.reportById).then(res3 => {
  716. let that = this
  717. that.listeventType = res3.data
  718. })
  719. if (data.attachId != null) {
  720. listCenterdataTAttachByBusId(data.attachId).then(res4 => {
  721. let that = this
  722. that.listEventPic = res4.data
  723. if (that.listEventPic.length > 0) {
  724. that.url = that.listEventPic[0]
  725. } else {
  726. that.url = ""
  727. }
  728. })
  729. }
  730. })
  731. },
  732. updateEventStatusNotProcessed() {
  733. if (this.deptName == '') {
  734. this.$modal.msgError("请选择部门");
  735. return
  736. }
  737. if (this.eventStatus == '') {
  738. this.$modal.msgError("请选择状态");
  739. return
  740. }
  741. if (this.eventTypeShow) {
  742. if (this.eventType == '') {
  743. this.$modal.msgError("请选择事件类型");
  744. return
  745. }
  746. }
  747. this.updateEventStatusForm.id = this.id
  748. this.updateEventStatusForm.zt = this.eventStatus
  749. this.updateEventStatusForm.eventCode = this.eventCode
  750. this.updateEventStatusForm.deptId = this.deptId
  751. this.updateEventStatusForm.deptName = this.deptName
  752. this.updateEventStatusForm.eventType = this.eventType
  753. updateDeptEventStatus(this.updateEventStatusForm).then(response => {
  754. this.$modal.msgSuccess(response.msg)
  755. this.eventStatus = ''
  756. this.deptId = ''
  757. this.eventType = ''
  758. this.deptName = ''
  759. this.eventInfoVisible_notProcessed = false
  760. this.cancelEventShow();
  761. this.getTodayEvent();
  762. })
  763. },
  764. updateEventStatusProcessed() {
  765. if (this.eventStatus == '') {
  766. this.$modal.msgError("请选择状态");
  767. return
  768. }
  769. updateCentereventTForestfireStatus(this.id, this.eventStatus).then(response => {
  770. this.$modal.msgSuccess(response.msg)
  771. this.eventStatus = ''
  772. this.eventInfoVisible_Processed = false
  773. this.cancelEventShow();
  774. this.getTodayEvent();
  775. })
  776. },
  777. setXsYc() {
  778. let that = this
  779. if (this.eventStatus == 'qr') {
  780. this.eventTypeShow = true
  781. } else {
  782. this.eventTypeShow = false
  783. }
  784. },
  785. setValue(event) {
  786. this.deptId = event.value
  787. this.deptName = event.label
  788. },
  789. cancelEventShow() {
  790. this.activeName = 'info';
  791. this.listEventPic = []; //事件图片
  792. this.listEventDept = []; //涉事单位List,
  793. this.listLog = []; //处理过程List,
  794. this.listoperateDept = [];
  795. },
  796. handleClickNotProcessed: function(tab, oldActiveName) {
  797. let that = this
  798. if (tab.name == 'frame') {
  799. if (that.eventSource == 'event_source_2') {
  800. selectchannelCodeByCameraId(that.cameraId).then(res => {
  801. let channelCode = [];
  802. if (res.data != null && res.data.length > 0) {
  803. for (let i = 0; i < res.data.length; i++) {
  804. channelCode.push(res.data[i].channelCode);
  805. }
  806. }
  807. //this.preview("ZgVzqsjwA1DT3G85KJ7HH0");
  808. if (channelCode != null && channelCode.length > 0) {
  809. this.preview(channelCode);
  810. } else {
  811. this.$modal.msg("没有匹配到相对应摄像头!!!");
  812. }
  813. })
  814. } else {
  815. this.$modal.msg("没有匹配到相对应摄像头!!!");
  816. }
  817. } else if (tab.name == 'point') {
  818. setTimeout(() => {
  819. that.markersMapList = [];
  820. let information = {};
  821. information.lng = that.information[3].content;
  822. information.lat = that.information[4].content;
  823. let bindPopupHtml = '';
  824. for (let i = 0; i < that.information.length; i++) {
  825. bindPopupHtml += '<span>' +
  826. ' <div class="d-l-con">' +
  827. ' <div class="d-l-l-text">' +
  828. ' <h4>' + that.information[i].name + ':' + that.information[i]
  829. .content + '</h4>' +
  830. ' </div>' +
  831. ' </div>' +
  832. ' </span>';
  833. }
  834. information.bindPopupHtml = bindPopupHtml;
  835. information.click = "";
  836. information.keepBindPopup = false;
  837. information.isAggregation = false;
  838. information.icon = "marker";
  839. that.markersMapList.push(information)
  840. // 查询火点附近摄像头
  841. selectFjsxt(that.information[3].content, that.information[4].content).then(
  842. response => {
  843. console.log("vv", response.data)
  844. if (response.data != null && response.data.length > 0) {
  845. for (let i = 0; i < response.data.length; i++) {
  846. let marke = {};
  847. marke.lng = response.data[i].longitude;
  848. marke.lat = response.data[i].latitude;
  849. let code = response.data[i].channelCode.split(",");
  850. marke.bindPopupHtml = response.data[i].cameraName;
  851. marke.click = "preview";
  852. marke.parameter = code;
  853. marke.keepBindPopup = false;
  854. marke.isAggregation = false;
  855. marke.icon = "camera";
  856. that.markersMapList.push(marke)
  857. }
  858. }
  859. that.$refs.supermapNotProcessed.dropLocation(information.lat, information
  860. .lng)
  861. that.$refs.supermapNotProcessed.clearM(false)
  862. that.$refs.supermapNotProcessed.setMarkers(that.markersMapList)
  863. })
  864. }, 1000);
  865. }
  866. },
  867. /** 重置按钮操作 */
  868. resetQuery() {
  869. this.eventTypeShow = false
  870. this.eventType = ''
  871. this.deptName = ''
  872. this.eventStatus = ''
  873. },
  874. handleClickProcessed(tab, event) {
  875. let that = this
  876. if (tab.name == 'frame') {
  877. if (that.eventSource == 'event_source_2') {
  878. selectchannelCodeByCameraId(that.cameraId).then(res => {
  879. let channelCode = [];
  880. if (res.data != null && res.data.length > 0) {
  881. for (let i = 0; i < res.data.length; i++) {
  882. channelCode.push(res.data[i].channelCode);
  883. }
  884. }
  885. if (channelCode != null && channelCode.length > 0) {
  886. this.preview(channelCode);
  887. } else {
  888. this.$modal.msg("没有匹配到相对应摄像头!!!");
  889. }
  890. })
  891. } else {
  892. this.$modal.msg("没有匹配到相对应摄像头!!!");
  893. }
  894. } else if (tab.name == 'point') {
  895. setTimeout(() => {
  896. that.markersMapList = [];
  897. let information = {};
  898. information.lng = that.information[3].content;
  899. information.lat = that.information[4].content;
  900. let bindPopupHtml = '';
  901. for (let i = 0; i < that.information.length; i++) {
  902. bindPopupHtml += '<span>' +
  903. ' <div class="d-l-con">' +
  904. ' <div class="d-l-l-text">' +
  905. ' <h4>' + that.information[i].name + ':' + that.information[i]
  906. .content + '</h4>' +
  907. ' </div>' +
  908. ' </div>' +
  909. ' </span>';
  910. }
  911. information.bindPopupHtml = bindPopupHtml;
  912. information.click = "";
  913. information.keepBindPopup = false;
  914. information.isAggregation = false;
  915. information.icon = "marker";
  916. that.markersMapList.push(information)
  917. // 查询火点附近摄像头
  918. selectFjsxt(that.information[3].content, that.information[4].content).then(response => {
  919. console.log("vv", response.data)
  920. if (response.data != null && response.data.length > 0) {
  921. for (let i = 0; i < response.data.length; i++) {
  922. let marke = {};
  923. marke.lng = response.data[i].longitude;
  924. marke.lat = response.data[i].latitude;
  925. let code = response.data[i].channelCode.split(",");
  926. marke.bindPopupHtml = response.data[i].cameraName;
  927. marke.click = "preview";
  928. marke.parameter = code;
  929. marke.keepBindPopup = false;
  930. marke.isAggregation = false;
  931. marke.icon = "camera";
  932. that.markersMapList.push(marke)
  933. }
  934. }
  935. that.$refs.supermapProcessed.dropLocation(information.lat, information.lng)
  936. that.$refs.supermapProcessed.clearM(false)
  937. that.$refs.supermapProcessed.setMarkers(that.markersMapList)
  938. })
  939. }, 1000);
  940. }
  941. },
  942. showEventInfo_Processed(id) {
  943. let that = this
  944. that.id = id;
  945. that.eventInfoVisible_Processed = true;
  946. that.listEventPic = [];
  947. that.url = '';
  948. getForest(id).then(response => {
  949. this.showZt=true
  950. this.zt= null
  951. this.fireReport= false
  952. this.optionsProcessed=[{value: 'bj',label: '办结' }, {value: 'zy',label: '支援'},{value: 'gd',label: '归档'}]
  953. let data = response.data
  954. if (data.eventStatus != 'event_event_status_1') {
  955. this.aniu = false
  956. }
  957. if (data.eventStatus == 'event_event_status_6') {
  958. this.optionsProcessed.splice(1, 2)
  959. this.zt = 3
  960. }
  961. if (data.eventStatus == 'event_event_status_1') {
  962. this.optionsProcessed.splice(2, 1)
  963. this.zt = 2
  964. }
  965. if (data.eventStatus == 'event_event_status_2') {
  966. this.optionsProcessed.splice(0, 2)
  967. this.zt = 4
  968. }
  969. if (data.eventStatus == 'event_event_status_3') {
  970. this.showZt = false
  971. this.fireReport = true
  972. this.zt = 5
  973. }
  974. let that = this
  975. this.eventSource = data.eventSource
  976. this.id = data.id;
  977. this.reportTime = data.reportTime
  978. this.cameraId = data.reportById
  979. this.reportAddress = data.reportAddress
  980. this.eventCode = data.eventCode
  981. this.information[0].content = data.eventTitle
  982. this.information[1].content = data.reportTime
  983. this.information[2].content = that.selectDictLabel(that.dict.type.event_source, data
  984. .eventSource)
  985. this.information[3].content = data.longitude
  986. this.information[4].content = data.latitude
  987. this.information[5].content = data.reportBy
  988. this.information[6].content = data.eventContent
  989. selectByeventCode(data.eventCode).then(response => {
  990. that.listEventDept = response.data
  991. })
  992. selectCentereventTLogListPC(data.eventCode).then(response => {
  993. that.listLog = response.data
  994. })
  995. if (data.attachId != null) {
  996. listCenterdataTAttachByBusId(data.attachId).then(response => {
  997. that.listEventPic = response.data
  998. if (that.listEventPic.length > 0) {
  999. that.url = that.listEventPic[0]
  1000. } else {
  1001. that.url = ""
  1002. }
  1003. })
  1004. }
  1005. })
  1006. },
  1007. /** ----------------------------------事件弹窗结束------------------------------------- */
  1008. getTodayEvent() {
  1009. let that = this
  1010. //获取左侧菜单列表
  1011. getTodayEvent().then(res => {
  1012. //今日事件
  1013. that.todayEventCountList = res.data.eventcountStatus
  1014. that.todayEventSourcetList = res.data.eventcountSource
  1015. res.data.eventcountStatus.forEach(function(data, index) {
  1016. that.$set(that.todayEventCountList[0], 'icon', 'sj-icon-wcl');
  1017. that.$set(that.todayEventCountList[1], 'icon', 'sj-icon-clz');
  1018. that.$set(that.todayEventCountList[2], 'icon', 'sj-icon-ywc');
  1019. });
  1020. res.data.eventcountSource.forEach(function(data, index) {
  1021. that.$set(that.todayEventSourcetList[0], 'icon', 'sj-icon-rg');
  1022. that.$set(that.todayEventSourcetList[1], 'icon', 'sj-icon-hx');
  1023. that.$set(that.todayEventSourcetList[2], 'icon', 'sj-icon-kk');
  1024. });
  1025. // 事件分布
  1026. that.todayEventCountDeptList = res.data.eventcountDept
  1027. // 事件分类
  1028. that.todayEventCountTypeList = res.data.eventcountType
  1029. this.eventChartData=[]
  1030. if (res.data.eventcountSource != null && res.data.eventcountSource.length > 0) {
  1031. for (let i = 0; i < res.data.eventcountSource.length; i++) {
  1032. let data = {}
  1033. data.name = res.data.eventcountSource[i].eventSourceName
  1034. data.value = res.data.eventcountSource[i].count
  1035. this.eventChartData.push(data)
  1036. }
  1037. }
  1038. this.eventChart()
  1039. that.markersList = [];
  1040. that.eventList = [];
  1041. if (res.data.eventListAll != null && res.data.eventListAll.length > 0) {
  1042. for (let i = 0; i < res.data.eventListAll.length; i++) {
  1043. let markersMap = {
  1044. lng: 124.59,
  1045. lat: 43.02,
  1046. icon: 'marker',
  1047. bindPopupHtml: '',
  1048. click: '',
  1049. parameter: '',
  1050. keepBindPopup: false,
  1051. isAggregation: false
  1052. }
  1053. if (res.data.eventListAll.length > 50) {
  1054. markersMap.isAggregation = true
  1055. }
  1056. if (res.data.eventListAll[i].eventStatus == "event_event_status_1" || res.data
  1057. .eventListAll[i].eventStatus == "event_event_status_2" || res.data.eventListAll[i]
  1058. .eventStatus == "event_event_status_6") {
  1059. markersMap.click = "showEventInfo_Processed"
  1060. markersMap.icon = "sj-icon-map-clz"
  1061. markersMap.isAggregation = false
  1062. } else if (res.data.eventListAll[i].eventStatus == "event_event_status_4") {
  1063. markersMap.click = "showEventInfo_notProcessed"
  1064. markersMap.icon = "sj-icon-map-wcl"
  1065. } else {
  1066. markersMap.icon = "sj-icon-map-ywc"
  1067. }
  1068. markersMap.parameter = res.data.eventListAll[i].id
  1069. markersMap.lng = res.data.eventListAll[i].longitude
  1070. markersMap.lat = res.data.eventListAll[i].latitude
  1071. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1072. '<span>' +
  1073. ' <div class="d-l-con">' +
  1074. ' <div class="d-l-l-text">' +
  1075. ' <h4>经纬度:' + res.data.eventListAll[i].longitude + ',' + res.data
  1076. .eventListAll[i]
  1077. .latitude + '</h4>' +
  1078. ' </div>' +
  1079. ' </div>' +
  1080. ' </span>' +
  1081. '<span>' +
  1082. ' <div class="d-l-con">' +
  1083. ' <div class="d-l-l-text">' +
  1084. ' <h4>事件名称:' + res.data.eventListAll[i].eventTitle + '</h4>' +
  1085. ' </div>' +
  1086. ' </div>' +
  1087. ' </span>' +
  1088. '<span>' +
  1089. ' <div class="d-l-con">' +
  1090. ' <div class="d-l-l-text">' +
  1091. ' <h4>事件时间:' + res.data.eventListAll[i].reportTime + '</h4>' +
  1092. ' </div>' +
  1093. ' </div>' +
  1094. ' </span>' +
  1095. '</div>';
  1096. that.markersList.push(markersMap)
  1097. }
  1098. that.eventList = res.data.eventListAll;
  1099. setTimeout(() => {
  1100. that.$refs.supermap.clearM(false)
  1101. that.$refs.supermap.clearM(true)
  1102. that.$refs.supermap.setMarkers(that.markersList)
  1103. }, 1000)
  1104. }else{
  1105. setTimeout(() => {
  1106. that.$refs.supermap.clearM(false)
  1107. that.$refs.supermap.clearM(true)
  1108. }, 1000)
  1109. }
  1110. })
  1111. },
  1112. todayEventCountSetMarkers(eventStatus) {
  1113. this.iconCurrentIndex1 = eventStatus
  1114. this.iconCurrentIndex2 = ''
  1115. //点击今日事件前三个按钮列表
  1116. let that = this
  1117. getEventStatusList(eventStatus).then(res => {
  1118. that.eventList = [];
  1119. that.markersList = [];
  1120. if (res.data.eventList != null && res.data.eventList.length > 0) {
  1121. for (let i = 0; i < res.data.eventList.length; i++) {
  1122. let markersMap = {
  1123. lng: 124.59,
  1124. lat: 43.02,
  1125. icon: 'marker',
  1126. bindPopupHtml: '',
  1127. click: '',
  1128. parameter: '',
  1129. keepBindPopup: false,
  1130. isAggregation: false
  1131. }
  1132. if (res.data.eventList.length > 50) {
  1133. markersMap.isAggregation = true
  1134. }
  1135. if (eventStatus == "event_event_status_1_2_6") {
  1136. markersMap.click = "showEventInfo_Processed"
  1137. markersMap.icon = "sj-icon-map-clz"
  1138. } else if (eventStatus == "event_event_status_4") {
  1139. markersMap.click = "showEventInfo_notProcessed"
  1140. markersMap.icon = "sj-icon-map-wcl"
  1141. } else {
  1142. markersMap.icon = "sj-icon-map-ywc"
  1143. markersMap.click = "showEventInfo_Processed"
  1144. }
  1145. markersMap.parameter = res.data.eventList[i].id
  1146. markersMap.lng = res.data.eventList[i].longitude
  1147. markersMap.lat = res.data.eventList[i].latitude
  1148. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1149. '<span>' +
  1150. ' <div class="d-l-con">' +
  1151. ' <div class="d-l-l-text">' +
  1152. ' <h4>经纬度:' + res.data.eventList[i].longitude + ',' + res.data
  1153. .eventList[i]
  1154. .latitude + '</h4>' +
  1155. ' </div>' +
  1156. ' </div>' +
  1157. ' </span>' +
  1158. '<span>' +
  1159. ' <div class="d-l-con">' +
  1160. ' <div class="d-l-l-text">' +
  1161. ' <h4>事件名称:' + res.data.eventList[i].eventTitle + '</h4>' +
  1162. ' </div>' +
  1163. ' </div>' +
  1164. ' </span>' +
  1165. '<span>' +
  1166. ' <div class="d-l-con">' +
  1167. ' <div class="d-l-l-text">' +
  1168. ' <h4>事件时间:' + res.data.eventList[i].reportTime + '</h4>' +
  1169. ' </div>' +
  1170. ' </div>' +
  1171. ' </span>' +
  1172. '</div>';
  1173. that.markersList.push(markersMap)
  1174. }
  1175. that.eventList = res.data.eventList;
  1176. }
  1177. setTimeout(() => {
  1178. that.$refs.supermap.clearM(true)
  1179. that.$refs.supermap.clearM(false)
  1180. that.$refs.supermap.setMarkers(that.markersList)
  1181. }, 500)
  1182. })
  1183. },
  1184. todayEventSourcetSetMarkers(eventSource) {
  1185. this.iconCurrentIndex1 = ''
  1186. this.iconCurrentIndex2 = eventSource
  1187. //点击今日事件后三个按钮列表
  1188. let that = this
  1189. getEventSourceList(eventSource).then(res => {
  1190. that.$refs.supermap.clearM(true)
  1191. that.$refs.supermap.clearM(false)
  1192. that.eventList = [];
  1193. that.markersList = [];
  1194. if (res.data.eventList != null && res.data.eventList.length > 0) {
  1195. for (let i = 0; i < res.data.eventList.length; i++) {
  1196. let markersMap = {
  1197. lng: 124.59,
  1198. lat: 43.02,
  1199. icon: 'marker',
  1200. bindPopupHtml: '',
  1201. click: '',
  1202. keepBindPopup: false,
  1203. isAggregation: false
  1204. }
  1205. if (res.data.eventList.length > 50) {
  1206. markersMap.isAggregation = true
  1207. }
  1208. if (eventSource = "event_source_1_3") {
  1209. markersMap.icon = "sj-icon-map-rg"
  1210. } else if (eventSource = "camera_type_1") {
  1211. markersMap.icon = "sj-icon-map-hx"
  1212. } else {
  1213. markersMap.icon = "sj-icon-map-kk"
  1214. }
  1215. if (res.data.eventList[i].eventStatus == "event_event_status_1" || res.data.eventList[
  1216. i].eventStatus == "event_event_status_2" || res.data.eventList[i]
  1217. .eventStatus == "event_event_status_6") {
  1218. markersMap.click = "showEventInfo_Processed"
  1219. } else if (res.data.eventList[i].eventStatus == "event_event_status_4") {
  1220. markersMap.click = "showEventInfo_notProcessed"
  1221. }
  1222. markersMap.lng = res.data.eventList[i].longitude
  1223. markersMap.lat = res.data.eventList[i].latitude
  1224. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1225. '<span>' +
  1226. ' <div class="d-l-con">' +
  1227. ' <div class="d-l-l-text">' +
  1228. ' <h4>经纬度:' + res.data.eventList[i].longitude + ',' + res.data
  1229. .eventList[i]
  1230. .latitude + '</h4>' +
  1231. ' </div>' +
  1232. ' </div>' +
  1233. ' </span>' +
  1234. '<span>' +
  1235. ' <div class="d-l-con">' +
  1236. ' <div class="d-l-l-text">' +
  1237. ' <h4>事件名称:' + res.data.eventList[i].eventTitle + '</h4>' +
  1238. ' </div>' +
  1239. ' </div>' +
  1240. ' </span>' +
  1241. '<span>' +
  1242. ' <div class="d-l-con">' +
  1243. ' <div class="d-l-l-text">' +
  1244. ' <h4>事件时间:' + res.data.eventList[i].reportTime + '</h4>' +
  1245. ' </div>' +
  1246. ' </div>' +
  1247. ' </span>' +
  1248. '</div>';
  1249. that.markersList.push(markersMap)
  1250. }
  1251. that.eventList = res.data.eventList;
  1252. that.$refs.supermap.setMarkers(that.markersList)
  1253. }
  1254. })
  1255. },
  1256. todayEventByDeptIdList(deptId) {
  1257. //点击事件分类
  1258. let that = this
  1259. getEventListByDeptIdList(deptId).then(res => {
  1260. that.$refs.supermap.clearM(true)
  1261. that.$refs.supermap.clearM(false)
  1262. that.markersList = [];
  1263. that.eventList = [];
  1264. if (res.data.eventList != null && res.data.eventList.length > 0) {
  1265. for (let i = 0; i < res.data.eventList.length; i++) {
  1266. let markersMap = {
  1267. lng: 124.59,
  1268. lat: 43.02,
  1269. icon: 'marker',
  1270. bindPopupHtml: '',
  1271. click: '',
  1272. keepBindPopup: false,
  1273. isAggregation: false
  1274. }
  1275. if (res.data.eventList.length > 50) {
  1276. markersMap.isAggregation = true
  1277. }
  1278. if (res.data.eventList[i].eventStatus == "event_event_status_1" || res.data.eventList[
  1279. i].eventStatus == "event_event_status_2" || res.data.eventList[i]
  1280. .eventStatus == "event_event_status_6") {
  1281. markersMap.click = "showEventInfo_Processed"
  1282. markersMap.icon = "sj-icon-map-clz"
  1283. } else if (res.data.eventList[i].eventStatus == "event_event_status_4") {
  1284. markersMap.click = "showEventInfo_notProcessed"
  1285. markersMap.icon = "sj-icon-map-wcl"
  1286. } else {
  1287. markersMap.icon = "sj-icon-map-ywc"
  1288. }
  1289. markersMap.lng = res.data.eventList[i].longitude
  1290. markersMap.lat = res.data.eventList[i].latitude
  1291. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1292. '<span>' +
  1293. ' <div class="d-l-con">' +
  1294. ' <div class="d-l-l-text">' +
  1295. ' <h4>经纬度:' + res.data.eventList[i].longitude + ',' + res.data
  1296. .eventList[i]
  1297. .latitude + '</h4>' +
  1298. ' </div>' +
  1299. ' </div>' +
  1300. ' </span>' +
  1301. '<span>' +
  1302. ' <div class="d-l-con">' +
  1303. ' <div class="d-l-l-text">' +
  1304. ' <h4>事件名称:' + res.data.eventList[i].eventTitle + '</h4>' +
  1305. ' </div>' +
  1306. ' </div>' +
  1307. ' </span>' +
  1308. '<span>' +
  1309. ' <div class="d-l-con">' +
  1310. ' <div class="d-l-l-text">' +
  1311. ' <h4>事件时间:' + res.data.eventList[i].reportTime + '</h4>' +
  1312. ' </div>' +
  1313. ' </div>' +
  1314. ' </span>' +
  1315. '</div>';
  1316. that.markersList.push(markersMap)
  1317. }
  1318. that.eventList = res.data.eventList;
  1319. that.$refs.supermap.setMarkers(that.markersList)
  1320. }
  1321. })
  1322. },
  1323. todayEventByTypeList(eventType) {
  1324. //点击事件分类
  1325. let that = this
  1326. getEventListByTypeList(eventType).then(res => {
  1327. that.$refs.supermap.clearM(true)
  1328. that.$refs.supermap.clearM(false)
  1329. that.markersList = [];
  1330. that.eventList = [];
  1331. if (res.data.eventList != null && res.data.eventList.length > 0) {
  1332. for (let i = 0; i < res.data.eventList.length; i++) {
  1333. let markersMap = {
  1334. lng: 124.59,
  1335. lat: 43.02,
  1336. icon: 'marker',
  1337. bindPopupHtml: '',
  1338. click: '',
  1339. keepBindPopup: false,
  1340. isAggregation: false
  1341. }
  1342. if (res.data.eventList.length > 50) {
  1343. markersMap.isAggregation = true
  1344. }
  1345. if (res.data.eventList[i].eventStatus == "event_event_status_1" || res.data.eventList[
  1346. i].eventStatus == "event_event_status_2" || res.data.eventList[i]
  1347. .eventStatus == "event_event_status_6") {
  1348. markersMap.click = "showEventInfo_Processed"
  1349. markersMap.icon = "sj-icon-map-clz"
  1350. } else if (res.data.eventList[i].eventStatus == "event_event_status_4") {
  1351. markersMap.click = "showEventInfo_notProcessed"
  1352. markersMap.icon = "sj-icon-map-wcl"
  1353. } else {
  1354. markersMap.icon = "sj-icon-map-ywc"
  1355. }
  1356. markersMap.lng = res.data.eventList[i].longitude
  1357. markersMap.lat = res.data.eventList[i].latitude
  1358. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1359. '<span>' +
  1360. ' <div class="d-l-con">' +
  1361. ' <div class="d-l-l-text">' +
  1362. ' <h4>经纬度:' + res.data.eventList[i].longitude + ',' + res.data
  1363. .eventList[i]
  1364. .latitude + '</h4>' +
  1365. ' </div>' +
  1366. ' </div>' +
  1367. ' </span>' +
  1368. '<span>' +
  1369. ' <div class="d-l-con">' +
  1370. ' <div class="d-l-l-text">' +
  1371. ' <h4>事件名称:' + res.data.eventList[i].eventTitle + '</h4>' +
  1372. ' </div>' +
  1373. ' </div>' +
  1374. ' </span>' +
  1375. '<span>' +
  1376. ' <div class="d-l-con">' +
  1377. ' <div class="d-l-l-text">' +
  1378. ' <h4>事件时间:' + res.data.eventList[i].reportTime + '</h4>' +
  1379. ' </div>' +
  1380. ' </div>' +
  1381. ' </span>' +
  1382. '</div>';
  1383. that.markersList.push(markersMap)
  1384. }
  1385. that.$refs.supermap.setMarkers(that.markersList)
  1386. }
  1387. that.eventList = res.data.eventList;
  1388. })
  1389. },
  1390. dropLocation(lat, lng , index) {
  1391. this.listCurrentIndex = index
  1392. this.$refs.supermap.dropLocation(lat, lng)
  1393. },
  1394. /** ----------------------------------摄像头预览开始------------------------------------- */
  1395. alertLogin: function() {
  1396. this.$modal.msg("登录中....");
  1397. },
  1398. alertLoginSuccess: function() {
  1399. this.$modal.msgSuccess("登录成功!");
  1400. },
  1401. alertLoginFailed: function() {
  1402. this.$modal.msgError("登陆失败!");
  1403. },
  1404. alertReinstall: function() {
  1405. this.$modal.msgWarning("请重新安装客户端");
  1406. },
  1407. /** 预览按钮操作 */
  1408. preview(channelCode) {
  1409. getDahuaVideoServer().then(newResponse => {
  1410. this.ws.detectConnectQt().then(res => {
  1411. if (res) { // 连接客户端成功
  1412. this.alertLogin();
  1413. this.ws.login({
  1414. loginIp: newResponse.loginIp,
  1415. loginPort: newResponse.loginPort,
  1416. userName: newResponse.userName,
  1417. userPwd: newResponse.userPwd,
  1418. token: '',
  1419. https: 1
  1420. });
  1421. this.ws.on('loginState', (res) => {
  1422. this.isLogin = res;
  1423. console.log('---res-----', res);
  1424. if (res) {
  1425. this.alertLoginSuccess()
  1426. this.activePanel = 'key2'
  1427. this.realTimeVideoDialog(channelCode);
  1428. } else {
  1429. this.alertLoginFailed();
  1430. }
  1431. });
  1432. } else { // 连接客户端失败
  1433. this.alertReinstall();
  1434. }
  1435. });
  1436. });
  1437. },
  1438. realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
  1439. if (!this.isLogin) {
  1440. this.$Message.info('正在登陆客户端,请稍等......');
  1441. return false;
  1442. }
  1443. this.ws.openVideo(cameraParams);
  1444. },
  1445. /** ----------------------------------摄像头预览结束------------------------------------- */
  1446. }
  1447. }
  1448. </script>
  1449. <style rel="stylesheet/scss" lang="scss" scoped>
  1450. @import '@/assets/styles/base.scss';
  1451. </style>