forest.vue 65 KB

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