event.vue 51 KB

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