forest.vue 65 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755
  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. this.$refs.supermap.isEditableLayers = false
  684. this.$refs.bottomMenu.showChild = false
  685. } else if (click == 'editableLayers') {
  686. this.$refs.bottomMenu.showChild = false
  687. if (!this.$refs.supermap.isEditableLayers) {
  688. this.$refs.supermap.isEditableLayers = true
  689. } else {
  690. this.$refs.supermap.isEditableLayers = false
  691. }
  692. } else if (click == 'layerSwitching') {
  693. this.$refs.supermap.isEditableLayers = false
  694. if (!this.$refs.bottomMenu.showChild) {
  695. this.$refs.bottomMenu.showChild = true
  696. } else {
  697. this.$refs.bottomMenu.showChild = false
  698. }
  699. }
  700. },
  701. //选择图层
  702. choseLayerSwitching(url) {
  703. this.$refs.supermap.layerSwitching(url, true);
  704. },
  705. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  706. //态势感知chart
  707. cameraChat() {
  708. // 基于准备好的dom,初始化echarts实例
  709. let myChart = echarts.init(document.getElementById('camera-chart'))
  710. // 绘制图表
  711. const dfColor = ['#92E1FF', '#0097FB', '#30ECA6', '#FFC227', '#FF4848'];
  712. myChart.setOption({
  713. dataset: {
  714. source: this.sourceData,
  715. },
  716. tooltip: {
  717. trigger: 'item',
  718. },
  719. grid: {
  720. top: "5%",
  721. left: "2%",
  722. // right: "4%",
  723. bottom: '-15%',
  724. width: '75%',
  725. containLabel: true,
  726. },
  727. xAxis: {
  728. show: false,
  729. type: "value",
  730. },
  731. yAxis: {
  732. type: "category", // 不设置类目轴,抽离的dataset数据展示不出来
  733. inverse: true,
  734. axisLabel: {
  735. show: true,
  736. textStyle: {
  737. color: '#5deaff',
  738. fontSize: '12'
  739. }
  740. },
  741. splitLine: {
  742. show: false
  743. },
  744. axisTick: {
  745. show: false
  746. },
  747. axisLine: {
  748. show: false
  749. },
  750. },
  751. series: [{
  752. type: "bar",
  753. animationCurve: "easeOutBack",
  754. barWidth: 5,
  755. label: {
  756. show: true,
  757. position: "right",
  758. offset: [0, 0],
  759. color: "#88dfd5",
  760. // fontSize: "12",
  761. style: {
  762. fill: "#fff"
  763. },
  764. },
  765. backgroundBar: {
  766. show: true,
  767. style: {
  768. fill: "rgba(97,152,255,0.20)",
  769. },
  770. },
  771. barStyle: {
  772. stroke: "rgba(41,244,236,1)",
  773. },
  774. gradient: {
  775. color: ["rgba(41,244,236,1)", "rgba(41,244,236,0)"],
  776. },
  777. itemStyle: {
  778. label: {
  779. show: true
  780. },
  781. labelLine: {
  782. show: false,
  783. },
  784. color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
  785. offset: 0,
  786. color: "rgba(41,244,236,0)"
  787. },
  788. {
  789. offset: 1,
  790. color: "rgba(41,244,236,.5)"
  791. },
  792. ]),
  793. borderColor: "#a2f9f7",
  794. shadowBlur: 16,
  795. shadowColor: "#a2f9f7",
  796. },
  797. }, ],
  798. });
  799. },
  800. //人员chart
  801. personnelChart() {
  802. // 基于准备好的dom,初始化echarts实例
  803. let myChart = echarts.init(document.getElementById('personnel-chart'))
  804. // 绘制图表
  805. const handred = 100
  806. let point = 66
  807. myChart.setOption({
  808. title: [{
  809. text: '总人数:' + handred + '人' + '\n' + '\n' + '在线人数:' + point + '人',
  810. x: '48%',
  811. y: '25%',
  812. textStyle: {
  813. fontWeight: 'normal',
  814. color: '#02d6fc',
  815. fontSize: '14'
  816. }
  817. }],
  818. series: [{
  819. name: 'circle',
  820. type: 'pie',
  821. center: ['22%', '50%'],
  822. radius: ['60%', '70%'],
  823. clockWise: true,
  824. label: {
  825. normal: {
  826. position: "center",
  827. }
  828. },
  829. itemStyle: {
  830. normal: {
  831. label: {
  832. show: false
  833. },
  834. labelLine: {
  835. show: false
  836. }
  837. },
  838. },
  839. data: [{
  840. value: point,
  841. name: '当前在线',
  842. label: {
  843. show: true, //单独显示该数据项
  844. formatter: "{c}人",
  845. labelLayout: {
  846. top: '50%'
  847. },
  848. textStyle: {
  849. color: '#02d6fc',
  850. fontSize: 14
  851. }
  852. },
  853. itemStyle: {
  854. normal: {
  855. color: { // 完成的圆环的颜色
  856. colorStops: [{
  857. offset: 0,
  858. color: '#02d6fc' // 0% 处的颜色
  859. }, {
  860. offset: 1,
  861. color: '#367bec' // 100% 处的颜色
  862. }]
  863. },
  864. label: {
  865. show: false
  866. },
  867. labelLine: {
  868. show: false
  869. }
  870. }
  871. }
  872. }, {
  873. value: handred - point,
  874. itemStyle: {
  875. color: '#666',
  876. },
  877. }]
  878. }, ]
  879. })
  880. },
  881. //事件chart
  882. eventChart() {
  883. // 基于准备好的dom,初始化echarts实例
  884. let myChart = echarts.init(document.getElementById('event-chart'))
  885. myChart.setOption({
  886. color: ['#2EACFF','#FFA61C','#2EC054','#8C64D7'],
  887. tooltip : {
  888. trigger: 'item',
  889. formatter: "{a} <br/>{b} : {c} ({d}%)"
  890. },
  891. toolbox: {
  892. show : true,
  893. },
  894. series : [
  895. {
  896. name:'事件分类',
  897. type:'pie',
  898. roseType: true,
  899. radius : [30, 70],
  900. label: {
  901. show: true,
  902. formatter: "{b}\n{c} "
  903. },
  904. data:this.eventChartData
  905. }
  906. ]
  907. })
  908. },
  909. //吉祥物收起左右框
  910. indent(){
  911. let list = document.getElementsByClassName('el-tooltip__popper')
  912. list[list.length - 1].style.display = 'none'
  913. if(this.indentStyle == ''){
  914. this.indentStyle = 'indent-style'
  915. this.indentleft = 'indent-left'
  916. this.indentright = 'indent-right'
  917. this.indentText = '展开左右栏'
  918. } else if (this.indentText == '展开左右栏'){
  919. this.indentStyle = ''
  920. this.indentleft = ''
  921. this.indentright = ''
  922. this.indentText = '收起左右栏'
  923. }
  924. },
  925. /** ----------------------------------事件弹窗开始------------------------------------- */
  926. editableLayers(processedState){
  927. if(processedState=='supermapNotProcessed'){
  928. let aa = this.$refs.supermapNotProcessed.isEditableLayers;
  929. if (!this.$refs.supermapNotProcessed.isEditableLayers) {
  930. this.$refs.supermapNotProcessed.isEditableLayers = true
  931. } else {
  932. this.$refs.supermapNotProcessed.isEditableLayers = false
  933. }
  934. }else{
  935. let bb = this.$refs.supermapProcessed.isEditableLayers ;
  936. if (!this.$refs.supermapProcessed.isEditableLayers) {
  937. this.$refs.supermapProcessed.isEditableLayers = true
  938. } else {
  939. this.$refs.supermapProcessed.isEditableLayers = false
  940. }
  941. }
  942. },
  943. switchImage(url) {
  944. this.url = url
  945. },
  946. async beforeLeave(newactiveName, oldActiveName) {
  947. let that = this;
  948. if (newactiveName == 'frame') {
  949. return await that.formLeaveTable()
  950. }
  951. },
  952. // 弹层方法
  953. showEventInfo_notProcessed(id) {
  954. let that = this
  955. that.id=id;
  956. that.eventInfoVisible_notProcessed = true
  957. that.listEventPic = [],
  958. that.url = '',
  959. that.resetQuery()
  960. getWarm(id).then(res => {
  961. let data = res.data
  962. that.cameraId = data.reportById
  963. that.reportTime = data.reportTime
  964. that.reportAddress = data.reportAddress
  965. that.eventCode = data.eventCode
  966. that.eventSource = data.eventSource
  967. that.information[0].content = data.eventTitle
  968. that.information[1].content = data.reportTime
  969. that.information[2].content = that.selectDictLabel(that.dict.type.event_source, data.eventSource)
  970. that.information[3].content = data.longitude
  971. that.information[4].content = data.latitude
  972. that.information[5].content = data.reportBy
  973. that.information[6].content = data.eventContent
  974. selectByeventCode(data.eventCode).then(res1 => {
  975. let that = this
  976. that.listEventDept = res1.data.allDept
  977. that.listoperateDept = res1.data.operateDept
  978. })
  979. listByEventCode(data.eventCode).then(res2 => {
  980. let that = this
  981. that.listLog = res2.data
  982. })
  983. selectCameraEventByCameraId(data.reportById).then(res3 => {
  984. let that = this
  985. that.listeventType = res3.data
  986. })
  987. if (data.attachId != null) {
  988. listCenterdataTAttachByBusId(data.attachId).then(res4 => {
  989. let that = this
  990. that.listEventPic = res4.data
  991. if (that.listEventPic.length > 0) {
  992. that.url = that.listEventPic[0]
  993. } else {
  994. that.url = ""
  995. }
  996. })
  997. }
  998. })
  999. },
  1000. updateEventStatus() {
  1001. if (this.deptName == '') {
  1002. this.$modal.msgError("请选择部门");
  1003. return
  1004. }
  1005. if (this.eventStatus == '') {
  1006. this.$modal.msgError("请选择状态");
  1007. return
  1008. }
  1009. if (this.eventTypeShow) {
  1010. if (this.eventType == '') {
  1011. this.$modal.msgError("请选择事件类型");
  1012. return
  1013. }
  1014. }
  1015. this.updateEventStatusForm.id = this.id
  1016. this.updateEventStatusForm.zt = this.eventStatus
  1017. this.updateEventStatusForm.eventCode = this.eventCode
  1018. this.updateEventStatusForm.deptId = this.deptId
  1019. this.updateEventStatusForm.deptName = this.deptName
  1020. this.updateEventStatusForm.eventType = this.eventType
  1021. updateDeptEventStatus(this.updateEventStatusForm).then(response => {
  1022. this.$modal.msgSuccess(response.msg)
  1023. this.eventStatus = ''
  1024. this.deptId = ''
  1025. this.eventType = ''
  1026. this.deptName = ''
  1027. this.eventInfoVisible_notProcessed = false
  1028. this.cancelEventShow();
  1029. })
  1030. },
  1031. setXsYc() {
  1032. let that = this
  1033. if (this.eventStatus == 'qr') {
  1034. this.eventTypeShow = true
  1035. } else {
  1036. this.eventTypeShow = false
  1037. }
  1038. },
  1039. setValue(event) {
  1040. this.deptId = event.value
  1041. this.deptName = event.label
  1042. },
  1043. cancelEventShow() {
  1044. this.activeName = 'info';
  1045. this.listEventPic = [];//事件图片
  1046. this.listEventDept = [];//涉事单位List,
  1047. this.listLog = [];//处理过程List,
  1048. this.listoperateDept = [];
  1049. },
  1050. handleClick: function (tab, oldActiveName) {
  1051. let that = this
  1052. if (tab.name == 'frame') {
  1053. if (that.eventSource == 'event_source_2') {
  1054. selectchannelCodeByCameraId(that.cameraId).then(res => {
  1055. let channelCode = [];
  1056. if (res.data != null && res.data.length > 0) {
  1057. for (let i = 0; i < res.data.length; i++) {
  1058. channelCode.push(res.data[i].channelCode);
  1059. }
  1060. }
  1061. if(channelCode!=null&&channelCode.length>0){
  1062. this.preview(channelCode);
  1063. }else{
  1064. this.$modal.msg("没有匹配到相对应摄像头!!!");
  1065. }
  1066. })
  1067. }else{
  1068. this.$modal.msg("没有匹配到相对应摄像头!!!");
  1069. }
  1070. } else if (tab.name == 'point') {
  1071. setTimeout(() => {
  1072. that.markersMapList=[];
  1073. let information={};
  1074. information.lng = that.information[3].content;
  1075. information.lat = that.information[4].content;
  1076. let bindPopupHtml = '';
  1077. for (let i = 0; i < that.information.length; i++) {
  1078. bindPopupHtml += '<span>' +
  1079. ' <div class="d-l-con">' +
  1080. ' <div class="d-l-l-text">' +
  1081. ' <h4>' + that.information[i].name + ':' + that.information[i].content + '</h4>' +
  1082. ' </div>' +
  1083. ' </div>' +
  1084. ' </span>';
  1085. }
  1086. information.bindPopupHtml = bindPopupHtml;
  1087. information.click = "";
  1088. information.keepBindPopup = false;
  1089. information.isAggregation = false;
  1090. information.icon = "marker";
  1091. that.markersMapList.push(information)
  1092. // 查询火点附近摄像头
  1093. selectFjsxt(that.information[3].content,that.information[4].content).then(response => {
  1094. console.log("vv",response.data)
  1095. if (response.data!=null&&response.data.length>0){
  1096. for(let i=0;i<response.data.length;i++)
  1097. {
  1098. let marke={};
  1099. marke.lng = response.data[i].longitude;
  1100. marke.lat = response.data[i].latitude;
  1101. let code=response.data[i].channelCode.split(",");
  1102. marke.bindPopupHtml = response.data[i].cameraName;
  1103. marke.click = "preview";
  1104. marke.parameter = code;
  1105. marke.keepBindPopup = false;
  1106. marke.isAggregation = false;
  1107. marke.icon = "camera";
  1108. that.markersMapList.push(marke)
  1109. }
  1110. }
  1111. that.$refs.supermapNotProcessed.dropLocation(information.lat ,information.lng)
  1112. that.$refs.supermapNotProcessed.clearM(false)
  1113. that.$refs.supermapNotProcessed.setMarkers(that.markersMapList)
  1114. })
  1115. }, 1000);
  1116. }
  1117. },
  1118. /** 重置按钮操作 */
  1119. resetQuery() {
  1120. this.eventTypeShow = false
  1121. this.eventType = ''
  1122. this.deptName = ''
  1123. this.eventStatus = ''
  1124. },
  1125. updateEventStatusProcessed() {
  1126. if(this.eventStatus==''){
  1127. this.$modal.msgError("请选择状态");
  1128. return
  1129. }
  1130. updateCentereventTForestfireStatus(this.id, this.eventStatus).then(response => {
  1131. this.$modal.msgSuccess(response.msg)
  1132. this.eventStatus=''
  1133. this.eventInfoVisible_Processed = false
  1134. cancelEventShow();
  1135. })
  1136. },
  1137. handleClickProcessed(tab, event) {
  1138. let that=this
  1139. if(tab.name == 'frame'){
  1140. if(that.eventSource=='event_source_2') {
  1141. selectchannelCodeByCameraId(that.cameraId).then(res => {
  1142. let channelCode=[];
  1143. if(res.data!=null&&res.data.length>0){
  1144. for (let i = 0; i < res.data.length; i++) {
  1145. channelCode.push(res.data[i].channelCode);
  1146. }
  1147. }
  1148. if(channelCode!=null&&channelCode.length>0){
  1149. this.preview(channelCode);
  1150. }else{
  1151. this.$modal.msg("没有匹配到相对应摄像头!!!");
  1152. }
  1153. })
  1154. }else{
  1155. this.$modal.msg("没有匹配到相对应摄像头!!!");
  1156. }
  1157. } else if (tab.name == 'point') {
  1158. setTimeout(() => {
  1159. that.markersMapList=[];
  1160. let information={};
  1161. information.lng = that.information[3].content;
  1162. information.lat = that.information[4].content;
  1163. let bindPopupHtml = '';
  1164. for (let i = 0; i < that.information.length; i++) {
  1165. bindPopupHtml += '<span>' +
  1166. ' <div class="d-l-con">' +
  1167. ' <div class="d-l-l-text">' +
  1168. ' <h4>' + that.information[i].name + ':' + that.information[i].content + '</h4>' +
  1169. ' </div>' +
  1170. ' </div>' +
  1171. ' </span>';
  1172. }
  1173. information.bindPopupHtml = bindPopupHtml;
  1174. information.click = "";
  1175. information.keepBindPopup = false;
  1176. information.isAggregation = false;
  1177. information.icon = "marker";
  1178. that.markersMapList.push(information)
  1179. // 查询火点附近摄像头
  1180. selectFjsxt(that.information[3].content,that.information[4].content).then(response => {
  1181. console.log("vv",response.data)
  1182. if (response.data!=null&&response.data.length>0){
  1183. for(let i=0;i<response.data.length;i++)
  1184. {
  1185. let marke={};
  1186. marke.lng = response.data[i].longitude;
  1187. marke.lat = response.data[i].latitude;
  1188. let code=response.data[i].channelCode.split(",");
  1189. marke.bindPopupHtml = response.data[i].cameraName;
  1190. marke.click = "preview";
  1191. marke.parameter = code;
  1192. marke.keepBindPopup = false;
  1193. marke.isAggregation = false;
  1194. marke.icon = "camera";
  1195. that.markersMapList.push(marke)
  1196. }
  1197. }
  1198. that.$refs.supermapProcessed.dropLocation(information.lat,information.lng)
  1199. that.$refs.supermapProcessed.clearM(false)
  1200. that.$refs.supermapProcessed.setMarkers(that.markersMapList)
  1201. })
  1202. }, 1000);
  1203. }
  1204. },
  1205. showEventInfo_Processed(id) {
  1206. let that = this
  1207. that.eventInfoVisible_Processed = true;
  1208. that.listEventPic = [];
  1209. that.url = '';
  1210. that.id=id;
  1211. getForest(id).then(response => {
  1212. let data = response.data
  1213. if (data.eventStatus != 'event_event_status_1') {
  1214. this.aniu = false
  1215. }
  1216. if(data.eventStatus=='event_event_status_6'){
  1217. this.optionsProcessed.splice(1,2)
  1218. this.zt=3
  1219. }
  1220. if(data.eventStatus=='event_event_status_1'){
  1221. this.optionsProcessed.splice(2,1)
  1222. this.zt=2
  1223. }
  1224. if(data.eventStatus=='event_event_status_2'){
  1225. this.optionsProcessed.splice(0,2)
  1226. this.zt=4
  1227. }
  1228. if(data.eventStatus=='event_event_status_3'){
  1229. this.showZt=false
  1230. this.fireReport=true
  1231. this.zt=5
  1232. }
  1233. console.log(this.optionsProcessed)
  1234. let that = this
  1235. this.eventSource=data.eventSource
  1236. this.id=data.id;
  1237. this.reportTime=data.reportTime
  1238. this.cameraId=data.reportById
  1239. this.reportAddress=data.reportAddress
  1240. this.eventCode=data.eventCode
  1241. this.information[0].content = data.eventTitle
  1242. this.information[1].content = data.reportTime
  1243. this.information[2].content = that.selectDictLabel(that.dict.type.event_source, data.eventSource)
  1244. this.information[3].content = data.longitude
  1245. this.information[4].content = data.latitude
  1246. this.information[5].content = data.reportBy
  1247. this.information[6].content = data.eventContent
  1248. selectByeventCode(data.eventCode).then(response => {
  1249. that.listEventDept=response.data
  1250. })
  1251. listByEventCode(data.eventCode).then(response => {
  1252. that.listLog=response.data
  1253. })
  1254. if(data.attachId != null){
  1255. listCenterdataTAttachByBusId(data.attachId).then(response => {
  1256. that.listEventPic=response.data
  1257. if(that.listEventPic.length>0) {
  1258. that.url = that.listEventPic[0]
  1259. }else{
  1260. that.url=""
  1261. }
  1262. })
  1263. }
  1264. })
  1265. },
  1266. /** ----------------------------------事件弹窗结束------------------------------------- */
  1267. getBaseInfo() {
  1268. let that = this
  1269. that.sourceData = [];
  1270. //获取左侧菜单列表
  1271. getBaseInfo().then(res => {
  1272. that.forestInfo = res.data.baseinfo.baseinfo;//基本情况
  1273. that.cameraList = res.data.cameraList;
  1274. that.visuForestCloudMapDeviceBOList=res.data.visuForestCloudMapDeviceBOList;
  1275. if (res.data.VisuForestCloudTodaySjfbBO!=null&&res.data.VisuForestCloudTodaySjfbBO.length>0){
  1276. for (let i = 0; i < res.data.VisuForestCloudTodaySjfbBO.length; i++) {
  1277. let aa=[res.data.VisuForestCloudTodaySjfbBO[i].deptName,Number(res.data.VisuForestCloudTodaySjfbBO[i].deptCount)];
  1278. that.sourceData.push(aa);
  1279. }
  1280. }
  1281. that.visuForestCloudRYBO=res.data.visuForestCloudRYBO;
  1282. this.cameraChat();
  1283. })
  1284. },
  1285. getTodayEvent() {
  1286. let that = this
  1287. //获取右侧菜单列表
  1288. getTodayEvent().then(res => {
  1289. //今日事件
  1290. that.todayEventCountList = res.data.eventcountStatus
  1291. that.todayEventSourcetList = res.data.eventcountSource
  1292. //插入图标
  1293. res.data.eventcountStatus.forEach(function(data, index) {
  1294. that.$set(that.todayEventCountList[0], 'icon', 'sj-icon-wcl');
  1295. that.$set(that.todayEventCountList[1], 'icon', 'sj-icon-clz');
  1296. that.$set(that.todayEventCountList[2], 'icon', 'sj-icon-ywc');
  1297. });
  1298. res.data.eventcountSource.forEach(function(data, index) {
  1299. that.$set(that.todayEventSourcetList[0], 'icon', 'sj-icon-rg');
  1300. that.$set(that.todayEventSourcetList[1], 'icon', 'sj-icon-hx');
  1301. that.$set(that.todayEventSourcetList[2], 'icon', 'sj-icon-kk');
  1302. });
  1303. // 事件分布
  1304. that.todayEventCountDeptList = res.data.eventcountDept
  1305. // 事件分类
  1306. that.todayEventCountTypeList = res.data.eventcountType
  1307. if (res.data.eventcountSource != null && res.data.eventcountSource.length > 0) {
  1308. for (let i = 0; i < res.data.eventcountSource.length; i++) {
  1309. let data = {}
  1310. data.name = res.data.eventcountSource[i].eventSourceName
  1311. data.value = res.data.eventcountSource[i].count
  1312. this.eventChartData.push(data)
  1313. }
  1314. }
  1315. this.eventChart()
  1316. that.markersList = [];
  1317. if (res.data.eventListAll != null && res.data.eventListAll.length > 0) {
  1318. for (let i = 0; i < res.data.eventListAll.length; i++) {
  1319. let markersMap = {
  1320. lng: 124.59,
  1321. lat: 43.02,
  1322. icon: 'marker',
  1323. bindPopupHtml: '',
  1324. click: '',
  1325. parameter: '',
  1326. keepBindPopup: false,
  1327. isAggregation: false
  1328. }
  1329. if (res.data.eventListAll.length > 50) {
  1330. markersMap.isAggregation = true
  1331. }
  1332. 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") {
  1333. markersMap.click = "showEventInfo_Processed"
  1334. markersMap.icon = "sj-icon-map-clz"
  1335. markersMap.isAggregation = false
  1336. } else if (res.data.eventListAll[i].eventStatus == "event_event_status_4") {
  1337. markersMap.click = "showEventInfo_notProcessed"
  1338. markersMap.icon = "sj-icon-map-wcl"
  1339. } else {
  1340. markersMap.icon = "sj-icon-map-ywc"
  1341. }
  1342. markersMap.parameter = res.data.eventListAll[i].id
  1343. markersMap.lng = res.data.eventListAll[i].longitude
  1344. markersMap.lat = res.data.eventListAll[i].latitude
  1345. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1346. '<span>' +
  1347. ' <div class="d-l-con">' +
  1348. ' <div class="d-l-l-text">' +
  1349. ' <h4>经纬度:' + res.data.eventListAll[i].longitude + ',' + res.data.eventListAll[i]
  1350. .latitude + '</h4>' +
  1351. ' </div>' +
  1352. ' </div>' +
  1353. ' </span>' +
  1354. '<span>' +
  1355. ' <div class="d-l-con">' +
  1356. ' <div class="d-l-l-text">' +
  1357. ' <h4>事件名称:' + res.data.eventListAll[i].eventTitle + '</h4>' +
  1358. ' </div>' +
  1359. ' </div>' +
  1360. ' </span>' +
  1361. '<span>' +
  1362. ' <div class="d-l-con">' +
  1363. ' <div class="d-l-l-text">' +
  1364. ' <h4>事件时间:' + res.data.eventListAll[i].reportTime + '</h4>' +
  1365. ' </div>' +
  1366. ' </div>' +
  1367. ' </span>' +
  1368. '</div>';
  1369. that.markersList.push(markersMap)
  1370. }
  1371. that.eventList = res.data.eventListAll;
  1372. setTimeout(() => {
  1373. that.$refs.supermap.clearM(false)
  1374. that.$refs.supermap.clearM(true)
  1375. that.$refs.supermap.setMarkers(that.markersList)
  1376. }, 1000)
  1377. }
  1378. })
  1379. },
  1380. todayEventCountSetMarkers(eventStatus) {
  1381. if(eventStatus=="event_event_status_3"){
  1382. return
  1383. }
  1384. //点击今日事件前三个按钮列表
  1385. let that = this
  1386. getEventStatusList(eventStatus).then(res => {
  1387. that.eventList=[];
  1388. that.markersList = [];
  1389. if(res.data.eventList!=null&&res.data.eventList.length>0){
  1390. for (let i = 0; i < res.data.eventList.length; i++) {
  1391. let markersMap = {
  1392. lng: 124.59,
  1393. lat: 43.02,
  1394. icon: 'marker',
  1395. bindPopupHtml: '',
  1396. click: '',
  1397. parameter: '',
  1398. keepBindPopup: false,
  1399. isAggregation: false
  1400. }
  1401. if(res.data.eventList.length>50){
  1402. markersMap.isAggregation = true
  1403. }
  1404. if(eventStatus=="event_event_status_1_2_6"){
  1405. markersMap.click = "showEventInfo_Processed"
  1406. markersMap.icon = "sj-icon-map-clz"
  1407. }else if(eventStatus=="event_event_status_4"){
  1408. markersMap.click = "showEventInfo_notProcessed"
  1409. markersMap.icon = "sj-icon-map-wcl"
  1410. }else{
  1411. markersMap.icon = "sj-icon-map-ywc"
  1412. }
  1413. markersMap.parameter = res.data.eventList[i].id
  1414. markersMap.lng = res.data.eventList[i].longitude
  1415. markersMap.lat =res.data.eventList[i].latitude
  1416. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1417. '<span>' +
  1418. ' <div class="d-l-con">' +
  1419. ' <div class="d-l-l-text">' +
  1420. ' <h4>经纬度:' +res.data.eventList[i].longitude + ',' +res.data.eventList[i]
  1421. .latitude + '</h4>' +
  1422. ' </div>' +
  1423. ' </div>' +
  1424. ' </span>' +
  1425. '<span>' +
  1426. ' <div class="d-l-con">' +
  1427. ' <div class="d-l-l-text">' +
  1428. ' <h4>事件名称:' +res.data.eventList[i].eventTitle + '</h4>' +
  1429. ' </div>' +
  1430. ' </div>' +
  1431. ' </span>' +
  1432. '<span>' +
  1433. ' <div class="d-l-con">' +
  1434. ' <div class="d-l-l-text">' +
  1435. ' <h4>事件时间:' +res.data.eventList[i].reportTime + '</h4>' +
  1436. ' </div>' +
  1437. ' </div>' +
  1438. ' </span>' +
  1439. '</div>';
  1440. that.markersList.push(markersMap)
  1441. }
  1442. that.eventList=res.data.eventList;
  1443. }
  1444. setTimeout(() => {
  1445. that.$refs.supermap.clearM(true)
  1446. that.$refs.supermap.clearM(false)
  1447. that.$refs.supermap.setMarkers(that.markersList)
  1448. },500)
  1449. })
  1450. },
  1451. todayEventSourcetSetMarkers(eventSource) {
  1452. //点击今日事件后三个按钮列表
  1453. let that = this
  1454. getEventSourceList(eventSource).then(res => {
  1455. that.markersList = [];
  1456. if(res.data.eventList!=null&&res.data.eventList.length>0){
  1457. for (let i = 0; i < res.data.eventList.length; i++) {
  1458. let markersMap = {
  1459. lng: 124.59,
  1460. lat: 43.02,
  1461. icon: 'marker',
  1462. bindPopupHtml: '',
  1463. click: '',
  1464. keepBindPopup: false,
  1465. isAggregation: false
  1466. }
  1467. if(eventSource="event_source_1_3"){
  1468. markersMap.icon = "sj-icon-map-rg"
  1469. }else if(eventSource="camera_type_1"){
  1470. markersMap.icon = "sj-icon-map-hx"
  1471. }else{
  1472. markersMap.icon = "sj-icon-map-kk"
  1473. }
  1474. if(res.data.eventList.length>50){
  1475. markersMap.isAggregation = true
  1476. }
  1477. 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"){
  1478. markersMap.click = "showEventInfo_Processed"
  1479. }else if(res.data.eventList[i].eventStatus=="event_event_status_4"){
  1480. markersMap.click = "showEventInfo_notProcessed"
  1481. }
  1482. markersMap.parameter = res.data.eventList[i].id
  1483. markersMap.lng = res.data.eventList[i].longitude
  1484. markersMap.lat =res.data.eventList[i].latitude
  1485. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1486. '<span>' +
  1487. ' <div class="d-l-con">' +
  1488. ' <div class="d-l-l-text">' +
  1489. ' <h4>经纬度:' +res.data.eventList[i].longitude + ',' +res.data.eventList[i]
  1490. .latitude + '</h4>' +
  1491. ' </div>' +
  1492. ' </div>' +
  1493. ' </span>' +
  1494. '<span>' +
  1495. ' <div class="d-l-con">' +
  1496. ' <div class="d-l-l-text">' +
  1497. ' <h4>事件名称:' +res.data.eventList[i].eventTitle + '</h4>' +
  1498. ' </div>' +
  1499. ' </div>' +
  1500. ' </span>' +
  1501. '<span>' +
  1502. ' <div class="d-l-con">' +
  1503. ' <div class="d-l-l-text">' +
  1504. ' <h4>事件时间:' +res.data.eventList[i].reportTime + '</h4>' +
  1505. ' </div>' +
  1506. ' </div>' +
  1507. ' </span>' +
  1508. '</div>';
  1509. that.markersList.push(markersMap)
  1510. }
  1511. }
  1512. setTimeout(() => {
  1513. that.$refs.supermap.clearM(true)
  1514. that.$refs.supermap.clearM(false)
  1515. that.$refs.supermap.setMarkers(that.markersList)
  1516. },500)
  1517. })
  1518. },
  1519. todayEventByDeptIdList(deptId) {
  1520. //点击事件分类
  1521. let that = this
  1522. getEventListByDeptIdList(deptId).then(res => {
  1523. that.eventList=[];
  1524. that.markersList = [];
  1525. if(res.data.eventList!=null&&res.data.eventList.length>0){
  1526. for (let i = 0; i < res.data.eventList.length; i++) {
  1527. let markersMap = {
  1528. lng: 124.59,
  1529. lat: 43.02,
  1530. icon: 'marker',
  1531. bindPopupHtml: '',
  1532. click: '',
  1533. keepBindPopup: false,
  1534. isAggregation: false
  1535. }
  1536. 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"){
  1537. markersMap.click = "showEventInfo_Processed"
  1538. markersMap.icon = "sj-icon-map-clz"
  1539. }else if(res.data.eventList[i].eventStatus=="event_event_status_4"){
  1540. markersMap.click = "showEventInfo_notProcessed"
  1541. markersMap.icon = "sj-icon-map-wcl"
  1542. }else{
  1543. markersMap.icon = "sj-icon-map-ywc"
  1544. }
  1545. if(res.data.eventList.length>50){
  1546. markersMap.isAggregation = true
  1547. }
  1548. markersMap.lng = res.data.eventList[i].longitude
  1549. markersMap.lat =res.data.eventList[i].latitude
  1550. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1551. '<span>' +
  1552. ' <div class="d-l-con">' +
  1553. ' <div class="d-l-l-text">' +
  1554. ' <h4>经纬度:' +res.data.eventList[i].longitude + ',' +res.data.eventList[i]
  1555. .latitude + '</h4>' +
  1556. ' </div>' +
  1557. ' </div>' +
  1558. ' </span>' +
  1559. '<span>' +
  1560. ' <div class="d-l-con">' +
  1561. ' <div class="d-l-l-text">' +
  1562. ' <h4>事件名称:' +res.data.eventList[i].eventTitle + '</h4>' +
  1563. ' </div>' +
  1564. ' </div>' +
  1565. ' </span>' +
  1566. '<span>' +
  1567. ' <div class="d-l-con">' +
  1568. ' <div class="d-l-l-text">' +
  1569. ' <h4>事件时间:' +res.data.eventList[i].reportTime + '</h4>' +
  1570. ' </div>' +
  1571. ' </div>' +
  1572. ' </span>' +
  1573. '</div>';
  1574. that.markersList.push(markersMap)
  1575. }
  1576. that.eventList=res.data.eventList;
  1577. }
  1578. setTimeout(() => {
  1579. that.$refs.supermap.clearM(true)
  1580. that.$refs.supermap.clearM(false)
  1581. that.$refs.supermap.setMarkers(that.markersList)
  1582. },500)
  1583. })
  1584. },
  1585. showDevice(deviceType){
  1586. this.cameraMarkersList=[];
  1587. if(deviceType=="sxt"){
  1588. this.$refs.supermap.clearM(true)
  1589. this.$refs.supermap.clearM(false)
  1590. if(this.cameraList!=null&&this.cameraList.length>0){
  1591. for (let i = 0; i < this.cameraList.length; i++) {
  1592. let markersMap = {
  1593. lng: 124.59,
  1594. lat: 43.02,
  1595. icon: 'camera',
  1596. bindPopupHtml: '',
  1597. click: 'preview',
  1598. parameter: '',
  1599. keepBindPopup: false,
  1600. isAggregation: false
  1601. }
  1602. if(this.cameraList.length>50){
  1603. markersMap.isAggregation = true
  1604. }
  1605. if(this.cameraList[i].channelCode!=null){
  1606. markersMap.parameter=this.cameraList[i].channelCode.split(",");
  1607. }else{
  1608. markersMap.parameter=[];
  1609. }
  1610. markersMap.lng=this.cameraList[i].longitude;
  1611. markersMap.lat=this.cameraList[i].latitude;
  1612. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1613. '<span>' +
  1614. ' <div class="d-l-con">' +
  1615. ' <div class="d-l-l-text">' +
  1616. ' <h4>经纬度:' +this.cameraList[i].longitude + ',' +this.cameraList[i].latitude + '</h4>' +
  1617. ' </div>' +
  1618. ' </div>' +
  1619. ' </span>' +
  1620. '<span>' +
  1621. ' <div class="d-l-con">' +
  1622. ' <div class="d-l-l-text">' +
  1623. ' <h4>摄像头名称:' +this.cameraList[i].cameraName + '</h4>' +
  1624. ' </div>' +
  1625. ' </div>' +
  1626. ' </span>' +
  1627. '</div>';
  1628. this.cameraMarkersList.push(markersMap);
  1629. }
  1630. this.$refs.supermap.setMarkers(this.cameraMarkersList)
  1631. }
  1632. }
  1633. },
  1634. /** ----------------------------------摄像头预览开始------------------------------------- */
  1635. alertLogin: function () {
  1636. this.$modal.msg("登录中....");
  1637. },
  1638. alertLoginSuccess: function () {
  1639. this.$modal.msgSuccess("登录成功!");
  1640. },
  1641. alertLoginFailed: function () {
  1642. this.$modal.msgError("登陆失败!");
  1643. },
  1644. alertReinstall: function () {
  1645. this.$modal.msgWarning("请重新安装客户端");
  1646. },
  1647. /** 预览按钮操作 */
  1648. preview(channelCode) {
  1649. getDahuaVideoServer().then(newResponse => {
  1650. this.ws.detectConnectQt().then(res => {
  1651. if (res) { // 连接客户端成功
  1652. this.alertLogin();
  1653. this.ws.login({
  1654. loginIp: newResponse.loginIp,
  1655. loginPort: newResponse.loginPort,
  1656. userName: newResponse.userName,
  1657. userPwd: newResponse.userPwd,
  1658. token: '',
  1659. https: 1
  1660. });
  1661. this.ws.on('loginState', (res) => {
  1662. this.isLogin = res;
  1663. console.log('---res-----', res);
  1664. if (res) {
  1665. this.alertLoginSuccess()
  1666. this.activePanel = 'key2'
  1667. this.realTimeVideoDialog(channelCode);
  1668. } else {
  1669. this.alertLoginFailed();
  1670. }
  1671. });
  1672. } else { // 连接客户端失败
  1673. this.alertReinstall();
  1674. }
  1675. });
  1676. });
  1677. },
  1678. realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
  1679. if (!this.isLogin) {
  1680. this.$Message.info('正在登陆客户端,请稍等......');
  1681. return false;
  1682. }
  1683. this.ws.openVideo(cameraParams);
  1684. },
  1685. /** ----------------------------------摄像头预览结束------------------------------------- */
  1686. }
  1687. }
  1688. </script>
  1689. <style rel="stylesheet/scss" lang="scss" scoped>
  1690. @import '@/assets/styles/base.scss';
  1691. </style>