event.vue 56 KB

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