event.vue 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507
  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. window.choseLayerSwitchingList = this.choseLayerSwitchingList
  449. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  450. },
  451. mounted() {
  452. this.getTodayEvent()
  453. },
  454. data() {
  455. return {
  456. iconCurrentIndex1: '',
  457. iconCurrentIndex2: '',
  458. listCurrentIndex: '',
  459. /** ----------------------------------摄像头预览开始------------------------------------- */
  460. activePanel: 'key1',
  461. isLogin: false,
  462. cameraParams: [],
  463. ws:null,
  464. /** ----------------------------------摄像头预览结束------------------------------------- */
  465. markersList: [],
  466. todayEventCountList: [], //今日事件列表
  467. todayEventSourcetList: [], //今日事件列表
  468. todayEventCountDeptList: [], //事件分布
  469. todayEventCountTypeList: [], //事件分类
  470. eventChartData: [], //左侧eachar图表数据
  471. iframeBoo: true,
  472. open: false,
  473. iframeVue: null,
  474. eventInfoVisible_notProcessed: false,
  475. eventInfoVisible_Processed: false,
  476. eventInfoVisible2: false,
  477. activeName: 'info',
  478. radio: '1',
  479. eventList: [],//事件列表
  480. /** ----------------------------------事件弹窗开始-未处理------------------------------------- */
  481. listEventPic: [], //事件图片
  482. url: '',
  483. id: '',
  484. eventType: '',
  485. deptName: '',
  486. eventStatus: '',
  487. cameraId: '',
  488. reportTime: '',
  489. reportAddress: '',
  490. eventCode: null,
  491. eventSource: '',
  492. //事件详情弹出显隐
  493. eventTypeShow: false,
  494. listEventDept: [], //涉事单位List,
  495. listLog: [], //处理过程List,
  496. listoperateDept: [],
  497. optionsNotProcessed: [{
  498. value: 'wyc',
  499. label: '无异常'
  500. }, {
  501. value: 'qr',
  502. label: '确认'
  503. }],
  504. listeventType: [],
  505. updateEventStatusForm: {
  506. id: '',
  507. eventStatus: '',
  508. eventCode: '',
  509. deptId: '',
  510. deptName: '',
  511. eventType: '',
  512. zt: ''
  513. },
  514. /** ----------------------------------事件弹窗结束-未处理------------------------------------- */
  515. aniu: true,
  516. showZt: true,
  517. zt: null,
  518. fireReport: false,
  519. optionsProcessed: [],
  520. // 弹出层 基本信息
  521. information: [{
  522. name: '标题',
  523. id: '',
  524. content: '前段发现警情信息'
  525. },
  526. {
  527. name: '时间',
  528. id: '',
  529. content: '2022-02-14 14:30'
  530. },
  531. {
  532. name: '来源',
  533. id: '',
  534. content: '摄像头'
  535. },
  536. {
  537. name: '坐标',
  538. id: '',
  539. content: '125.78945646'
  540. },
  541. {
  542. name: '纬度',
  543. id: '',
  544. content: '43.987424'
  545. },
  546. {
  547. name: '上报人',
  548. id: '',
  549. content: '党校监控点位'
  550. },
  551. {
  552. name: '详细信息',
  553. id: '',
  554. content: '这里发现病虫害,需要立刻支援'
  555. }
  556. ],
  557. // 弹出层 基本信息 涉事单位
  558. srcList: [
  559. require('@/assets/images/visual/img-sample-3.jpg'),
  560. require('@/assets/images/visual/img-sample-2.jpg'),
  561. require('@/assets/images/visual/img-sample-1.jpg')
  562. ],
  563. srcList1: [
  564. require('@/assets/images/visual/林业病虫害抓拍2.png'),
  565. require('@/assets/images/visual/林业病虫害松墨天牛抓拍.png'),
  566. require('@/assets/images/visual/img-sample-3.jpg')
  567. ],
  568. //左右缩进
  569. indentStyle: '',
  570. indentleft: '',
  571. indentright: '',
  572. indentText: '收起左右栏',
  573. indentdisabled: false
  574. }
  575. },
  576. methods: {
  577. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  578. showDialog(click) {
  579. if (click == 'eventLocation') {
  580. this.$refs.eventLocation.showEventLocation()
  581. this.$refs.supermap.isEditableLayers = false
  582. this.$refs.bottomMenu.showChild = false
  583. } else if (click == 'editableLayers') {
  584. this.$refs.bottomMenu.showChild = false
  585. if (!this.$refs.supermap.isEditableLayers) {
  586. this.$refs.supermap.isEditableLayers = true
  587. } else {
  588. this.$refs.supermap.isEditableLayers = false
  589. }
  590. } else if (click == 'layerSwitching') {
  591. this.$refs.supermap.isEditableLayers = false
  592. if (!this.$refs.bottomMenu.showChild) {
  593. this.$refs.bottomMenu.showChild = true
  594. } else {
  595. this.$refs.bottomMenu.showChild = false
  596. }
  597. } else if (click == 'TVWall') {
  598. this.$refs.TVWall.showTVWall()
  599. this.$refs.supermap.isEditableLayers = false
  600. this.$refs.bottomMenu.showChild = false
  601. }
  602. },
  603. //选择图层
  604. choseLayerSwitching(url,isClear) {
  605. this.$refs.supermap.layerSwitching(url, isClear)
  606. },
  607. //选择图层(传递数组)
  608. choseLayerSwitchingList(urlList) {
  609. this.$refs.supermap.layerSwitchingList(urlList)
  610. },
  611. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  612. //事件chart
  613. eventChart() {
  614. // 基于准备好的dom,初始化echarts实例
  615. let myChart = echarts.init(document.getElementById('event-chart'))
  616. myChart.setOption({
  617. color: ['#2EACFF', '#FFA61C', '#2EC054', '#8C64D7'],
  618. tooltip: {
  619. trigger: 'item',
  620. formatter: '{a} <br/>{b} : {c} ({d}%)'
  621. },
  622. toolbox: {
  623. show: true
  624. },
  625. series: [{
  626. name: '事件分类',
  627. type: 'pie',
  628. roseType: true,
  629. radius: [30, 70],
  630. label: {
  631. show: true,
  632. formatter: '{b}\n{c} '
  633. },
  634. data: this.eventChartData
  635. }]
  636. })
  637. },
  638. //吉祥物收起左右框
  639. indent() {
  640. let list = document.getElementsByClassName('el-tooltip__popper')
  641. list[list.length - 1].style.display = 'none'
  642. if (this.indentStyle == '') {
  643. this.indentStyle = 'indent-style'
  644. this.indentleft = 'indent-left'
  645. this.indentright = 'indent-right'
  646. this.indentText = '展开左右栏'
  647. } else if (this.indentText == '展开左右栏') {
  648. this.indentStyle = ''
  649. this.indentleft = ''
  650. this.indentright = ''
  651. this.indentText = '收起左右栏'
  652. }
  653. },
  654. /** ----------------------------------事件弹窗开始-未处理------------------------------------- */
  655. editableLayers(processedState) {
  656. if (processedState == 'supermapNotProcessed') {
  657. let aa = this.$refs.supermapNotProcessed.isEditableLayers;
  658. if (!this.$refs.supermapNotProcessed.isEditableLayers) {
  659. this.$refs.supermapNotProcessed.isEditableLayers = true
  660. } else {
  661. this.$refs.supermapNotProcessed.isEditableLayers = false
  662. }
  663. } else {
  664. let bb = this.$refs.supermapProcessed.isEditableLayers;
  665. if (!this.$refs.supermapProcessed.isEditableLayers) {
  666. this.$refs.supermapProcessed.isEditableLayers = true
  667. } else {
  668. this.$refs.supermapProcessed.isEditableLayers = false
  669. }
  670. }
  671. },
  672. switchImage(url) {
  673. this.url = url
  674. },
  675. formLeaveTable() {
  676. let p = new Promise((resolve, reject) =>
  677. reject()
  678. );
  679. return p;
  680. },
  681. async beforeLeave(newactiveName, oldActiveName) {
  682. let that = this;
  683. if (newactiveName == 'frame') {
  684. return await that.formLeaveTable()
  685. }
  686. },
  687. // 弹层方法
  688. showEventInfo_notProcessed(id) {
  689. let that = this
  690. that.id = id;
  691. that.eventInfoVisible_notProcessed = true
  692. that.listEventPic = [],
  693. that.url = '',
  694. that.resetQuery()
  695. getWarm(id).then(res => {
  696. let data = res.data
  697. that.id = data.id;
  698. that.cameraId = data.reportById
  699. that.reportTime = data.reportTime
  700. that.reportAddress = data.reportAddress
  701. that.eventCode = data.eventCode
  702. that.eventSource = data.eventSource
  703. that.information[0].content = data.eventTitle
  704. that.information[1].content = data.reportTime
  705. that.information[2].content = that.selectDictLabel(that.dict.type.event_source, data
  706. .eventSource)
  707. that.information[3].content = data.longitude
  708. that.information[4].content = data.latitude
  709. that.information[5].content = data.reportBy
  710. that.information[6].content = data.eventContent
  711. selectByeventCode(data.eventCode).then(res1 => {
  712. let that = this
  713. that.listEventDept = res1.data.allDept
  714. that.listoperateDept = res1.data.operateDept
  715. })
  716. selectCentereventTLogListPC(data.eventCode).then(res2 => {
  717. let that = this
  718. that.listLog = res2.data
  719. })
  720. selectCameraEventByCameraId(data.reportById).then(res3 => {
  721. let that = this
  722. that.listeventType = res3.data
  723. })
  724. if (data.attachId != null) {
  725. listCenterdataTAttachByBusId(data.attachId).then(res4 => {
  726. let that = this
  727. that.listEventPic = res4.data
  728. if (that.listEventPic.length > 0) {
  729. that.url = that.listEventPic[0]
  730. } else {
  731. that.url = ""
  732. }
  733. })
  734. }
  735. })
  736. },
  737. updateEventStatusNotProcessed() {
  738. if (this.deptName == '') {
  739. this.$modal.msgError("请选择部门");
  740. return
  741. }
  742. if (this.eventStatus == '') {
  743. this.$modal.msgError("请选择状态");
  744. return
  745. }
  746. if (this.eventTypeShow) {
  747. if (this.eventType == '') {
  748. this.$modal.msgError("请选择事件类型");
  749. return
  750. }
  751. }
  752. this.updateEventStatusForm.id = this.id
  753. this.updateEventStatusForm.zt = this.eventStatus
  754. this.updateEventStatusForm.eventCode = this.eventCode
  755. this.updateEventStatusForm.deptId = this.deptId
  756. this.updateEventStatusForm.deptName = this.deptName
  757. this.updateEventStatusForm.eventType = this.eventType
  758. updateDeptEventStatus(this.updateEventStatusForm).then(response => {
  759. this.$modal.msgSuccess(response.msg)
  760. this.eventStatus = ''
  761. this.deptId = ''
  762. this.eventType = ''
  763. this.deptName = ''
  764. this.eventInfoVisible_notProcessed = false
  765. this.cancelEventShow();
  766. this.getTodayEvent();
  767. })
  768. },
  769. updateEventStatusProcessed() {
  770. if (this.eventStatus == '') {
  771. this.$modal.msgError("请选择状态");
  772. return
  773. }
  774. updateCentereventTForestfireStatus(this.id, this.eventStatus).then(response => {
  775. this.$modal.msgSuccess(response.msg)
  776. this.eventStatus = ''
  777. this.eventInfoVisible_Processed = false
  778. this.cancelEventShow();
  779. this.getTodayEvent();
  780. })
  781. },
  782. setXsYc() {
  783. let that = this
  784. if (this.eventStatus == 'qr') {
  785. this.eventTypeShow = true
  786. } else {
  787. this.eventTypeShow = false
  788. }
  789. },
  790. setValue(event) {
  791. this.deptId = event.value
  792. this.deptName = event.label
  793. },
  794. cancelEventShow() {
  795. this.activeName = 'info';
  796. this.listEventPic = []; //事件图片
  797. this.listEventDept = []; //涉事单位List,
  798. this.listLog = []; //处理过程List,
  799. this.listoperateDept = [];
  800. },
  801. handleClickNotProcessed: function(tab, oldActiveName) {
  802. let that = this
  803. if (tab.name == 'frame') {
  804. if (that.eventSource == 'event_source_2') {
  805. selectchannelCodeByCameraId(that.cameraId).then(res => {
  806. let channelCode = [];
  807. if (res.data != null && res.data.length > 0) {
  808. for (let i = 0; i < res.data.length; i++) {
  809. channelCode.push(res.data[i].channelCode);
  810. }
  811. }
  812. //this.preview("ZgVzqsjwA1DT3G85KJ7HH0");
  813. if (channelCode != null && channelCode.length > 0) {
  814. this.preview(channelCode);
  815. } else {
  816. this.$modal.msg("没有匹配到相对应摄像头!!!");
  817. }
  818. })
  819. } else {
  820. this.$modal.msg("没有匹配到相对应摄像头!!!");
  821. }
  822. } else if (tab.name == 'point') {
  823. setTimeout(() => {
  824. that.markersMapList = [];
  825. let information = {};
  826. information.lng = that.information[3].content;
  827. information.lat = that.information[4].content;
  828. let bindPopupHtml = '';
  829. for (let i = 0; i < that.information.length; i++) {
  830. bindPopupHtml += '<span>' +
  831. ' <div class="d-l-con">' +
  832. ' <div class="d-l-l-text">' +
  833. ' <h4>' + that.information[i].name + ':' + that.information[i]
  834. .content + '</h4>' +
  835. ' </div>' +
  836. ' </div>' +
  837. ' </span>';
  838. }
  839. information.bindPopupHtml = bindPopupHtml;
  840. information.click = "";
  841. information.keepBindPopup = false;
  842. information.isAggregation = false;
  843. information.icon = "marker";
  844. that.markersMapList.push(information)
  845. // 查询火点附近摄像头
  846. selectFjsxt(that.information[3].content, that.information[4].content).then(
  847. response => {
  848. console.log("vv", response.data)
  849. if (response.data != null && response.data.length > 0) {
  850. for (let i = 0; i < response.data.length; i++) {
  851. let marke = {};
  852. marke.lng = response.data[i].longitude;
  853. marke.lat = response.data[i].latitude;
  854. let code = response.data[i].channelCode.split(",");
  855. marke.bindPopupHtml = response.data[i].cameraName;
  856. marke.click = "preview";
  857. marke.parameter = code;
  858. marke.keepBindPopup = false;
  859. marke.isAggregation = false;
  860. marke.icon = "camera";
  861. that.markersMapList.push(marke)
  862. }
  863. }
  864. that.$refs.supermapNotProcessed.dropLocation(information.lat, information
  865. .lng)
  866. that.$refs.supermapNotProcessed.clearM(false)
  867. that.$refs.supermapNotProcessed.setMarkers(that.markersMapList)
  868. })
  869. }, 1000);
  870. }
  871. },
  872. /** 重置按钮操作 */
  873. resetQuery() {
  874. this.eventTypeShow = false
  875. this.eventType = ''
  876. this.deptName = ''
  877. this.eventStatus = ''
  878. },
  879. handleClickProcessed(tab, event) {
  880. let that = this
  881. if (tab.name == 'frame') {
  882. if (that.eventSource == 'event_source_2') {
  883. selectchannelCodeByCameraId(that.cameraId).then(res => {
  884. let channelCode = [];
  885. if (res.data != null && res.data.length > 0) {
  886. for (let i = 0; i < res.data.length; i++) {
  887. channelCode.push(res.data[i].channelCode);
  888. }
  889. }
  890. if (channelCode != null && channelCode.length > 0) {
  891. this.preview(channelCode);
  892. } else {
  893. this.$modal.msg("没有匹配到相对应摄像头!!!");
  894. }
  895. })
  896. } else {
  897. this.$modal.msg("没有匹配到相对应摄像头!!!");
  898. }
  899. } else if (tab.name == 'point') {
  900. setTimeout(() => {
  901. that.markersMapList = [];
  902. let information = {};
  903. information.lng = that.information[3].content;
  904. information.lat = that.information[4].content;
  905. let bindPopupHtml = '';
  906. for (let i = 0; i < that.information.length; i++) {
  907. bindPopupHtml += '<span>' +
  908. ' <div class="d-l-con">' +
  909. ' <div class="d-l-l-text">' +
  910. ' <h4>' + that.information[i].name + ':' + that.information[i]
  911. .content + '</h4>' +
  912. ' </div>' +
  913. ' </div>' +
  914. ' </span>';
  915. }
  916. information.bindPopupHtml = bindPopupHtml;
  917. information.click = "";
  918. information.keepBindPopup = false;
  919. information.isAggregation = false;
  920. information.icon = "marker";
  921. that.markersMapList.push(information)
  922. // 查询火点附近摄像头
  923. selectFjsxt(that.information[3].content, that.information[4].content).then(response => {
  924. console.log("vv", response.data)
  925. if (response.data != null && response.data.length > 0) {
  926. for (let i = 0; i < response.data.length; i++) {
  927. let marke = {};
  928. marke.lng = response.data[i].longitude;
  929. marke.lat = response.data[i].latitude;
  930. let code = response.data[i].channelCode.split(",");
  931. marke.bindPopupHtml = response.data[i].cameraName;
  932. marke.click = "preview";
  933. marke.parameter = code;
  934. marke.keepBindPopup = false;
  935. marke.isAggregation = false;
  936. marke.icon = "camera";
  937. that.markersMapList.push(marke)
  938. }
  939. }
  940. that.$refs.supermapProcessed.dropLocation(information.lat, information.lng)
  941. that.$refs.supermapProcessed.clearM(false)
  942. that.$refs.supermapProcessed.setMarkers(that.markersMapList)
  943. })
  944. }, 1000);
  945. }
  946. },
  947. showEventInfo_Processed(id) {
  948. let that = this
  949. that.id = id;
  950. that.eventInfoVisible_Processed = true;
  951. that.listEventPic = [];
  952. that.url = '';
  953. getForest(id).then(response => {
  954. this.showZt=true
  955. this.zt= null
  956. this.fireReport= false
  957. this.optionsProcessed=[{value: 'bj',label: '办结' }, {value: 'zy',label: '支援'},{value: 'gd',label: '归档'}]
  958. let data = response.data
  959. if (data.eventStatus != 'event_event_status_1') {
  960. this.aniu = false
  961. }
  962. if (data.eventStatus == 'event_event_status_6') {
  963. this.optionsProcessed.splice(1, 2)
  964. this.zt = 3
  965. }
  966. if (data.eventStatus == 'event_event_status_1') {
  967. this.optionsProcessed.splice(2, 1)
  968. this.zt = 2
  969. }
  970. if (data.eventStatus == 'event_event_status_2') {
  971. this.optionsProcessed.splice(0, 2)
  972. this.zt = 4
  973. }
  974. if (data.eventStatus == 'event_event_status_3') {
  975. this.showZt = false
  976. this.fireReport = true
  977. this.zt = 5
  978. }
  979. let that = this
  980. this.eventSource = data.eventSource
  981. this.id = data.id;
  982. this.reportTime = data.reportTime
  983. this.cameraId = data.reportById
  984. this.reportAddress = data.reportAddress
  985. this.eventCode = data.eventCode
  986. this.information[0].content = data.eventTitle
  987. this.information[1].content = data.reportTime
  988. this.information[2].content = that.selectDictLabel(that.dict.type.event_source, data
  989. .eventSource)
  990. this.information[3].content = data.longitude
  991. this.information[4].content = data.latitude
  992. this.information[5].content = data.reportBy
  993. this.information[6].content = data.eventContent
  994. selectByeventCode(data.eventCode).then(response => {
  995. that.listEventDept = response.data
  996. })
  997. selectCentereventTLogListPC(data.eventCode).then(response => {
  998. that.listLog = response.data
  999. })
  1000. if (data.attachId != null) {
  1001. listCenterdataTAttachByBusId(data.attachId).then(response => {
  1002. that.listEventPic = response.data
  1003. if (that.listEventPic.length > 0) {
  1004. that.url = that.listEventPic[0]
  1005. } else {
  1006. that.url = ""
  1007. }
  1008. })
  1009. }
  1010. })
  1011. },
  1012. /** ----------------------------------事件弹窗结束------------------------------------- */
  1013. getTodayEvent() {
  1014. let that = this
  1015. //获取左侧菜单列表
  1016. getTodayEvent().then(res => {
  1017. //今日事件
  1018. that.todayEventCountList = res.data.eventcountStatus
  1019. that.todayEventSourcetList = res.data.eventcountSource
  1020. res.data.eventcountStatus.forEach(function(data, index) {
  1021. that.$set(that.todayEventCountList[0], 'icon', 'sj-icon-wcl');
  1022. that.$set(that.todayEventCountList[1], 'icon', 'sj-icon-clz');
  1023. that.$set(that.todayEventCountList[2], 'icon', 'sj-icon-ywc');
  1024. });
  1025. res.data.eventcountSource.forEach(function(data, index) {
  1026. that.$set(that.todayEventSourcetList[0], 'icon', 'sj-icon-rg');
  1027. that.$set(that.todayEventSourcetList[1], 'icon', 'sj-icon-hx');
  1028. that.$set(that.todayEventSourcetList[2], 'icon', 'sj-icon-kk');
  1029. });
  1030. // 事件分布
  1031. that.todayEventCountDeptList = res.data.eventcountDept
  1032. // 事件分类
  1033. that.todayEventCountTypeList = res.data.eventcountType
  1034. this.eventChartData=[]
  1035. if (res.data.eventcountSource != null && res.data.eventcountSource.length > 0) {
  1036. for (let i = 0; i < res.data.eventcountSource.length; i++) {
  1037. let data = {}
  1038. data.name = res.data.eventcountSource[i].eventSourceName
  1039. data.value = res.data.eventcountSource[i].count
  1040. this.eventChartData.push(data)
  1041. }
  1042. }
  1043. this.eventChart()
  1044. that.markersList = [];
  1045. that.eventList = [];
  1046. if (res.data.eventListAll != null && res.data.eventListAll.length > 0) {
  1047. for (let i = 0; i < res.data.eventListAll.length; i++) {
  1048. let markersMap = {
  1049. lng: 124.59,
  1050. lat: 43.02,
  1051. icon: 'marker',
  1052. bindPopupHtml: '',
  1053. click: '',
  1054. parameter: '',
  1055. keepBindPopup: false,
  1056. isAggregation: false
  1057. }
  1058. if (res.data.eventListAll.length > 50) {
  1059. markersMap.isAggregation = true
  1060. }
  1061. if (res.data.eventListAll[i].eventStatus == "event_event_status_1" || res.data
  1062. .eventListAll[i].eventStatus == "event_event_status_2" || res.data.eventListAll[i]
  1063. .eventStatus == "event_event_status_6") {
  1064. markersMap.click = "showEventInfo_Processed"
  1065. markersMap.icon = "sj-icon-map-clz"
  1066. markersMap.isAggregation = false
  1067. } else if (res.data.eventListAll[i].eventStatus == "event_event_status_4") {
  1068. markersMap.click = "showEventInfo_notProcessed"
  1069. markersMap.icon = "sj-icon-map-wcl"
  1070. } else {
  1071. markersMap.icon = "sj-icon-map-ywc"
  1072. }
  1073. markersMap.parameter = res.data.eventListAll[i].id
  1074. markersMap.lng = res.data.eventListAll[i].longitude
  1075. markersMap.lat = res.data.eventListAll[i].latitude
  1076. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1077. '<span>' +
  1078. ' <div class="d-l-con">' +
  1079. ' <div class="d-l-l-text">' +
  1080. ' <h4>经纬度:' + res.data.eventListAll[i].longitude + ',' + res.data
  1081. .eventListAll[i]
  1082. .latitude + '</h4>' +
  1083. ' </div>' +
  1084. ' </div>' +
  1085. ' </span>' +
  1086. '<span>' +
  1087. ' <div class="d-l-con">' +
  1088. ' <div class="d-l-l-text">' +
  1089. ' <h4>事件名称:' + res.data.eventListAll[i].eventTitle + '</h4>' +
  1090. ' </div>' +
  1091. ' </div>' +
  1092. ' </span>' +
  1093. '<span>' +
  1094. ' <div class="d-l-con">' +
  1095. ' <div class="d-l-l-text">' +
  1096. ' <h4>事件时间:' + res.data.eventListAll[i].reportTime + '</h4>' +
  1097. ' </div>' +
  1098. ' </div>' +
  1099. ' </span>' +
  1100. '</div>';
  1101. that.markersList.push(markersMap)
  1102. }
  1103. that.eventList = res.data.eventListAll;
  1104. setTimeout(() => {
  1105. that.$refs.supermap.clearM(false)
  1106. that.$refs.supermap.clearM(true)
  1107. that.$refs.supermap.setMarkers(that.markersList)
  1108. }, 1000)
  1109. }else{
  1110. setTimeout(() => {
  1111. that.$refs.supermap.clearM(false)
  1112. that.$refs.supermap.clearM(true)
  1113. }, 1000)
  1114. }
  1115. })
  1116. },
  1117. todayEventCountSetMarkers(eventStatus) {
  1118. this.iconCurrentIndex1 = eventStatus
  1119. this.iconCurrentIndex2 = ''
  1120. //点击今日事件前三个按钮列表
  1121. let that = this
  1122. getEventStatusList(eventStatus).then(res => {
  1123. that.eventList = [];
  1124. that.markersList = [];
  1125. if (res.data.eventList != null && res.data.eventList.length > 0) {
  1126. for (let i = 0; i < res.data.eventList.length; i++) {
  1127. let markersMap = {
  1128. lng: 124.59,
  1129. lat: 43.02,
  1130. icon: 'marker',
  1131. bindPopupHtml: '',
  1132. click: '',
  1133. parameter: '',
  1134. keepBindPopup: false,
  1135. isAggregation: false
  1136. }
  1137. if (res.data.eventList.length > 50) {
  1138. markersMap.isAggregation = true
  1139. }
  1140. if (eventStatus == "event_event_status_1_2_6") {
  1141. markersMap.click = "showEventInfo_Processed"
  1142. markersMap.icon = "sj-icon-map-clz"
  1143. } else if (eventStatus == "event_event_status_4") {
  1144. markersMap.click = "showEventInfo_notProcessed"
  1145. markersMap.icon = "sj-icon-map-wcl"
  1146. } else {
  1147. markersMap.icon = "sj-icon-map-ywc"
  1148. markersMap.click = "showEventInfo_Processed"
  1149. }
  1150. markersMap.parameter = res.data.eventList[i].id
  1151. markersMap.lng = res.data.eventList[i].longitude
  1152. markersMap.lat = res.data.eventList[i].latitude
  1153. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1154. '<span>' +
  1155. ' <div class="d-l-con">' +
  1156. ' <div class="d-l-l-text">' +
  1157. ' <h4>经纬度:' + res.data.eventList[i].longitude + ',' + res.data
  1158. .eventList[i]
  1159. .latitude + '</h4>' +
  1160. ' </div>' +
  1161. ' </div>' +
  1162. ' </span>' +
  1163. '<span>' +
  1164. ' <div class="d-l-con">' +
  1165. ' <div class="d-l-l-text">' +
  1166. ' <h4>事件名称:' + res.data.eventList[i].eventTitle + '</h4>' +
  1167. ' </div>' +
  1168. ' </div>' +
  1169. ' </span>' +
  1170. '<span>' +
  1171. ' <div class="d-l-con">' +
  1172. ' <div class="d-l-l-text">' +
  1173. ' <h4>事件时间:' + res.data.eventList[i].reportTime + '</h4>' +
  1174. ' </div>' +
  1175. ' </div>' +
  1176. ' </span>' +
  1177. '</div>';
  1178. that.markersList.push(markersMap)
  1179. }
  1180. that.eventList = res.data.eventList;
  1181. }
  1182. setTimeout(() => {
  1183. that.$refs.supermap.clearM(true)
  1184. that.$refs.supermap.clearM(false)
  1185. that.$refs.supermap.setMarkers(that.markersList)
  1186. }, 500)
  1187. })
  1188. },
  1189. todayEventSourcetSetMarkers(eventSource) {
  1190. this.iconCurrentIndex1 = ''
  1191. this.iconCurrentIndex2 = eventSource
  1192. //点击今日事件后三个按钮列表
  1193. let that = this
  1194. getEventSourceList(eventSource).then(res => {
  1195. that.$refs.supermap.clearM(true)
  1196. that.$refs.supermap.clearM(false)
  1197. that.eventList = [];
  1198. that.markersList = [];
  1199. if (res.data.eventList != null && res.data.eventList.length > 0) {
  1200. for (let i = 0; i < res.data.eventList.length; i++) {
  1201. let markersMap = {
  1202. lng: 124.59,
  1203. lat: 43.02,
  1204. icon: 'marker',
  1205. bindPopupHtml: '',
  1206. click: '',
  1207. keepBindPopup: false,
  1208. isAggregation: false
  1209. }
  1210. if (res.data.eventList.length > 50) {
  1211. markersMap.isAggregation = true
  1212. }
  1213. if (eventSource = "event_source_1_3") {
  1214. markersMap.icon = "sj-icon-map-rg"
  1215. } else if (eventSource = "camera_type_1") {
  1216. markersMap.icon = "sj-icon-map-hx"
  1217. } else {
  1218. markersMap.icon = "sj-icon-map-kk"
  1219. }
  1220. if (res.data.eventList[i].eventStatus == "event_event_status_1" || res.data.eventList[
  1221. i].eventStatus == "event_event_status_2" || res.data.eventList[i]
  1222. .eventStatus == "event_event_status_6") {
  1223. markersMap.click = "showEventInfo_Processed"
  1224. } else if (res.data.eventList[i].eventStatus == "event_event_status_4") {
  1225. markersMap.click = "showEventInfo_notProcessed"
  1226. }
  1227. markersMap.lng = res.data.eventList[i].longitude
  1228. markersMap.lat = res.data.eventList[i].latitude
  1229. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1230. '<span>' +
  1231. ' <div class="d-l-con">' +
  1232. ' <div class="d-l-l-text">' +
  1233. ' <h4>经纬度:' + res.data.eventList[i].longitude + ',' + res.data
  1234. .eventList[i]
  1235. .latitude + '</h4>' +
  1236. ' </div>' +
  1237. ' </div>' +
  1238. ' </span>' +
  1239. '<span>' +
  1240. ' <div class="d-l-con">' +
  1241. ' <div class="d-l-l-text">' +
  1242. ' <h4>事件名称:' + res.data.eventList[i].eventTitle + '</h4>' +
  1243. ' </div>' +
  1244. ' </div>' +
  1245. ' </span>' +
  1246. '<span>' +
  1247. ' <div class="d-l-con">' +
  1248. ' <div class="d-l-l-text">' +
  1249. ' <h4>事件时间:' + res.data.eventList[i].reportTime + '</h4>' +
  1250. ' </div>' +
  1251. ' </div>' +
  1252. ' </span>' +
  1253. '</div>';
  1254. that.markersList.push(markersMap)
  1255. }
  1256. that.eventList = res.data.eventList;
  1257. that.$refs.supermap.setMarkers(that.markersList)
  1258. }
  1259. })
  1260. },
  1261. todayEventByDeptIdList(deptId) {
  1262. //点击事件分类
  1263. let that = this
  1264. getEventListByDeptIdList(deptId).then(res => {
  1265. that.$refs.supermap.clearM(true)
  1266. that.$refs.supermap.clearM(false)
  1267. that.markersList = [];
  1268. that.eventList = [];
  1269. if (res.data.eventList != null && res.data.eventList.length > 0) {
  1270. for (let i = 0; i < res.data.eventList.length; i++) {
  1271. let markersMap = {
  1272. lng: 124.59,
  1273. lat: 43.02,
  1274. icon: 'marker',
  1275. bindPopupHtml: '',
  1276. click: '',
  1277. keepBindPopup: false,
  1278. isAggregation: false
  1279. }
  1280. if (res.data.eventList.length > 50) {
  1281. markersMap.isAggregation = true
  1282. }
  1283. if (res.data.eventList[i].eventStatus == "event_event_status_1" || res.data.eventList[
  1284. i].eventStatus == "event_event_status_2" || res.data.eventList[i]
  1285. .eventStatus == "event_event_status_6") {
  1286. markersMap.click = "showEventInfo_Processed"
  1287. markersMap.icon = "sj-icon-map-clz"
  1288. } else if (res.data.eventList[i].eventStatus == "event_event_status_4") {
  1289. markersMap.click = "showEventInfo_notProcessed"
  1290. markersMap.icon = "sj-icon-map-wcl"
  1291. } else {
  1292. markersMap.icon = "sj-icon-map-ywc"
  1293. }
  1294. markersMap.lng = res.data.eventList[i].longitude
  1295. markersMap.lat = res.data.eventList[i].latitude
  1296. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1297. '<span>' +
  1298. ' <div class="d-l-con">' +
  1299. ' <div class="d-l-l-text">' +
  1300. ' <h4>经纬度:' + res.data.eventList[i].longitude + ',' + res.data
  1301. .eventList[i]
  1302. .latitude + '</h4>' +
  1303. ' </div>' +
  1304. ' </div>' +
  1305. ' </span>' +
  1306. '<span>' +
  1307. ' <div class="d-l-con">' +
  1308. ' <div class="d-l-l-text">' +
  1309. ' <h4>事件名称:' + res.data.eventList[i].eventTitle + '</h4>' +
  1310. ' </div>' +
  1311. ' </div>' +
  1312. ' </span>' +
  1313. '<span>' +
  1314. ' <div class="d-l-con">' +
  1315. ' <div class="d-l-l-text">' +
  1316. ' <h4>事件时间:' + res.data.eventList[i].reportTime + '</h4>' +
  1317. ' </div>' +
  1318. ' </div>' +
  1319. ' </span>' +
  1320. '</div>';
  1321. that.markersList.push(markersMap)
  1322. }
  1323. that.eventList = res.data.eventList;
  1324. that.$refs.supermap.setMarkers(that.markersList)
  1325. }
  1326. })
  1327. },
  1328. todayEventByTypeList(eventType) {
  1329. //点击事件分类
  1330. let that = this
  1331. getEventListByTypeList(eventType).then(res => {
  1332. that.$refs.supermap.clearM(true)
  1333. that.$refs.supermap.clearM(false)
  1334. that.markersList = [];
  1335. that.eventList = [];
  1336. if (res.data.eventList != null && res.data.eventList.length > 0) {
  1337. for (let i = 0; i < res.data.eventList.length; i++) {
  1338. let markersMap = {
  1339. lng: 124.59,
  1340. lat: 43.02,
  1341. icon: 'marker',
  1342. bindPopupHtml: '',
  1343. click: '',
  1344. keepBindPopup: false,
  1345. isAggregation: false
  1346. }
  1347. if (res.data.eventList.length > 50) {
  1348. markersMap.isAggregation = true
  1349. }
  1350. if (res.data.eventList[i].eventStatus == "event_event_status_1" || res.data.eventList[
  1351. i].eventStatus == "event_event_status_2" || res.data.eventList[i]
  1352. .eventStatus == "event_event_status_6") {
  1353. markersMap.click = "showEventInfo_Processed"
  1354. markersMap.icon = "sj-icon-map-clz"
  1355. } else if (res.data.eventList[i].eventStatus == "event_event_status_4") {
  1356. markersMap.click = "showEventInfo_notProcessed"
  1357. markersMap.icon = "sj-icon-map-wcl"
  1358. } else {
  1359. markersMap.icon = "sj-icon-map-ywc"
  1360. }
  1361. markersMap.lng = res.data.eventList[i].longitude
  1362. markersMap.lat = res.data.eventList[i].latitude
  1363. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1364. '<span>' +
  1365. ' <div class="d-l-con">' +
  1366. ' <div class="d-l-l-text">' +
  1367. ' <h4>经纬度:' + res.data.eventList[i].longitude + ',' + res.data
  1368. .eventList[i]
  1369. .latitude + '</h4>' +
  1370. ' </div>' +
  1371. ' </div>' +
  1372. ' </span>' +
  1373. '<span>' +
  1374. ' <div class="d-l-con">' +
  1375. ' <div class="d-l-l-text">' +
  1376. ' <h4>事件名称:' + res.data.eventList[i].eventTitle + '</h4>' +
  1377. ' </div>' +
  1378. ' </div>' +
  1379. ' </span>' +
  1380. '<span>' +
  1381. ' <div class="d-l-con">' +
  1382. ' <div class="d-l-l-text">' +
  1383. ' <h4>事件时间:' + res.data.eventList[i].reportTime + '</h4>' +
  1384. ' </div>' +
  1385. ' </div>' +
  1386. ' </span>' +
  1387. '</div>';
  1388. that.markersList.push(markersMap)
  1389. }
  1390. that.$refs.supermap.setMarkers(that.markersList)
  1391. }
  1392. that.eventList = res.data.eventList;
  1393. })
  1394. },
  1395. dropLocation(lat, lng , index) {
  1396. this.listCurrentIndex = index
  1397. this.$refs.supermap.dropLocation(lat, lng)
  1398. },
  1399. /** ----------------------------------摄像头预览开始------------------------------------- */
  1400. alertLogin: function() {
  1401. this.$modal.msg("登录中....");
  1402. },
  1403. alertLoginSuccess: function() {
  1404. this.$modal.msgSuccess("登录成功!");
  1405. },
  1406. alertLoginFailed: function() {
  1407. this.$modal.msgError("登陆失败!");
  1408. },
  1409. alertReinstall: function() {
  1410. this.$modal.msgWarning("请重新安装客户端");
  1411. },
  1412. /** 预览按钮操作 */
  1413. preview(channelCode) {
  1414. getDahuaVideoServer().then(newResponse => {
  1415. this.ws.detectConnectQt().then(res => {
  1416. if (res) { // 连接客户端成功
  1417. this.alertLogin();
  1418. this.ws.login({
  1419. loginIp: newResponse.loginIp,
  1420. loginPort: newResponse.loginPort,
  1421. userName: newResponse.userName,
  1422. userPwd: newResponse.userPwd,
  1423. token: '',
  1424. https: 1
  1425. });
  1426. this.ws.on('loginState', (res) => {
  1427. this.isLogin = res;
  1428. console.log('---res-----', res);
  1429. if (res) {
  1430. this.alertLoginSuccess()
  1431. this.activePanel = 'key2'
  1432. this.realTimeVideoDialog(channelCode);
  1433. } else {
  1434. this.alertLoginFailed();
  1435. }
  1436. });
  1437. } else { // 连接客户端失败
  1438. this.alertReinstall();
  1439. }
  1440. });
  1441. });
  1442. },
  1443. realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
  1444. if (!this.isLogin) {
  1445. this.$Message.info('正在登陆客户端,请稍等......');
  1446. return false;
  1447. }
  1448. this.ws.openVideo(cameraParams);
  1449. },
  1450. /** ----------------------------------摄像头预览结束------------------------------------- */
  1451. }
  1452. }
  1453. </script>
  1454. <style rel="stylesheet/scss" lang="scss" scoped>
  1455. @import '@/assets/styles/base.scss';
  1456. </style>