forest.vue 66 KB

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