event.vue 51 KB

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