forest.vue 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636
  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. <!-- 1 基本情况 -->
  11. <div class="forthis">
  12. <dv-border-box-13 backgroundColor="#040b1f" style="padding-bottom: 1rem;">
  13. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  14. <div class="this-title">
  15. <span>基本情况</span>
  16. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  17. </div>
  18. <div class="i-list-con h-14">
  19. <div class="d-l-con">
  20. <div class="d-l-l-text w-100p">
  21. <h4 class="line-h-1 w-100p">{{ forestInfo }}</h4>
  22. </div>
  23. </div>
  24. </div>
  25. </dv-border-box-13>
  26. </div>
  27. <!-- 2 事件统计-->
  28. <div class="forthis">
  29. <dv-border-box-13 backgroundColor="#040b1f" style="padding-bottom: 1rem;">
  30. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  31. <div class="i-list-con h-29-5">
  32. <div class="d-l-con">
  33. <div class="event-count">
  34. <div class="count-number">{{ totalStr.charAt(0) }}</div>
  35. <div class="count-number">{{ totalStr.charAt(1) }}</div>
  36. <div class="count-number">{{ totalStr.charAt(2) }}</div>
  37. <div class="count-number">{{ totalStr.charAt(3) }}</div>
  38. <div class="count-number">{{ totalStr.charAt(4) }}</div>
  39. <div class="count-number">{{ totalStr.charAt(5) }}</div>
  40. <dv-decoration-5
  41. style="width:81%;height:15px;position: absolute; top:4.2rem;z-index: 0; " />
  42. </div>
  43. </div>
  44. <div class="d-l-con-icon">
  45. <div class="icon-con w-33 flex-d t-a-center">
  46. <dv-decoration-9
  47. style="width: 5.5rem;height: 5.5rem; color:#16e29e;font-size: 1rem;font-weight: bolder;">
  48. {{ newReport_pre }}%</dv-decoration-9>
  49. <div class="e-state"
  50. :style="{'background-image':`url(${require('@/assets/images/integrated/state-bg.png')})`}">
  51. <span>新上报</span> <span>{{newReport}}</span>
  52. </div>
  53. </div>
  54. <div class="icon-con w-33 flex-d t-a-center">
  55. <dv-decoration-9
  56. style="width: 5.5rem;height: 5.5rem; color:#f18425;font-size: 1rem;font-weight: bolder;">
  57. {{ readySure_pre }}%</dv-decoration-9>
  58. <div class="e-state"
  59. :style="{'background-image':`url(${require('@/assets/images/integrated/state-bg.png')})`}">
  60. <span>已确认</span> <span>{{ readySure }}</span>
  61. </div>
  62. </div>
  63. <div class="icon-con w-33 flex-d t-a-center">
  64. <dv-decoration-9
  65. style="width: 5.5rem;height: 5.5rem; color:#9179f1;font-size: 1rem;font-weight: bolder;">
  66. {{ readyFinish_pre }}%</dv-decoration-9>
  67. <div class="e-state"
  68. :style="{'background-image':`url(${require('@/assets/images/integrated/state-bg.png')})`}">
  69. <span>已完成</span> <span>{{ readyFinish }}</span>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="d-l-con">
  74. <div id="chart-event-ai" style="width: 100%;height:6vh;"></div>
  75. </div>
  76. </div>
  77. </dv-border-box-13>
  78. </div>
  79. <!-- 3 组织机构 -->
  80. <div class="forthis">
  81. <dv-border-box-13 backgroundColor="#040b1f" style="padding-bottom: 1rem;">
  82. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  83. <div class="i-list-con h-27" style="padding-left: 1rem;">
  84. <el-collapse accordion>
  85. <el-collapse-item v-for="(item,index) in forestFarm" :key="index">
  86. <!-- deptId -->
  87. <template slot="title">
  88. <div class="d-l-con sj-collapse" :class="{on:listCurrentIndex1==item.deptId}"
  89. v-on:click="selectCameraByDeptId(item.deptId)">
  90. <div class="d-l-l-text">
  91. <h4 class="collapse-title">{{item.deptName}}</h4>
  92. </div>
  93. <div class="d-l-l-count">{{item.eventCount}}</div>
  94. </div>
  95. </template>
  96. </el-collapse-item>
  97. </el-collapse>
  98. </div>
  99. </dv-border-box-13>
  100. </div>
  101. </div>
  102. <!-- 地图 -->
  103. <supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'forestMap'" :dynamicPlotting="false"
  104. :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false" @preview="preview"
  105. @showEventInfo_notProcessed="showEventInfo_notProcessed"
  106. @showEventInfo_Processed="showEventInfo_Processed"></supermap>
  107. <!-- 右侧 -->
  108. <div class="rightbar rightbar-index" :class="indentright" ref="right">
  109. <div class="right-item1">
  110. <!-- 天气 -->
  111. <div class="forthis">
  112. <dv-border-box-13 backgroundColor="#040b1f">
  113. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  114. <div class="i-list-con small-bottom-margin h-13">
  115. <el-row :gutter="20">
  116. <el-col :span="9">
  117. <div class="weather-img">
  118. <img src="../assets/images/integrated/weather/yin.png">
  119. <span>阿斯顿发生的发生</span>
  120. </div>
  121. </el-col>
  122. <el-col :span="15">
  123. <div class="weather-info">
  124. <ul>
  125. <li>风力:三级</li>
  126. <li>低温:15</li>
  127. <li>风向:东北</li>
  128. <li>高温:26</li>
  129. <li>火险:三级</li>
  130. <li>湿度:30</li>
  131. </ul>
  132. </div>
  133. </el-col>
  134. </el-row>
  135. <div class="firestate">
  136. <div class="state-block1"></div>
  137. <div class="state-block2"></div>
  138. <div class="state-block3 state-on"></div>
  139. <div class="state-block4"></div>
  140. <div class="state-block5"></div>
  141. </div>
  142. </div>
  143. </dv-border-box-13>
  144. </div>
  145. <!-- 曝光台 -->
  146. <div class="forthis">
  147. <dv-border-box-13 backgroundColor="#040b1f" style="padding-bottom: 1rem;">
  148. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  149. <div class="this-title">
  150. <span>曝光台</span>
  151. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  152. </div>
  153. <div class="i-list-con small-bottom-margin h-18">
  154. <div class="d-l-con padding-box nowrap" v-for="(item,index) in 5">
  155. <div class="bgt-state">
  156. <div class="bgt-state-frequency">3</div>
  157. <div class="bgt-state-minute">3分钟</div>
  158. </div>
  159. <div class="bgt-info">
  160. <div class="bgt-info-name">四平-梨树-三塔分场</div>
  161. <div class="bgt-info-place">
  162. <ul>
  163. <li>四海乡</li>
  164. <li>郭家店</li>
  165. <li>梨树</li>
  166. </ul>
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. </dv-border-box-13>
  172. </div>
  173. <!-- 事件列表 -->
  174. <div class="forthis">
  175. <dv-border-box-13 backgroundColor="#040b1f" style="padding-bottom: 1rem;">
  176. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  177. <div class="this-title">
  178. <span>事件列表</span>
  179. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  180. </div>
  181. <div class="i-list-con small-bottom-margin h-39">
  182. <div class="event-list-search">
  183. <el-input
  184. placeholder="请输入内容"
  185. prefix-icon="el-icon-search"
  186. v-model="eventSearch">
  187. </el-input>
  188. </div>
  189. <div class="d-l-con padding-box nowrap" v-for="(item,index) in 5">
  190. <div class="bgt-img">
  191. <img src="../assets/images/integrated/event-img-sub.png" />
  192. </div>
  193. <div class="bgt-info">
  194. <div class="event-state-xsb">
  195. <i class="el-icon-caret-left"></i>
  196. <div class="event-list-state-xsb">
  197. 新上报
  198. </div>
  199. </div>
  200. <!-- <div class="event-state-yqr">
  201. <i class="el-icon-caret-left"></i>
  202. <div class="event-list-state-yqr">
  203. 已确认
  204. </div>
  205. </div> -->
  206. <!-- <div class="event-state-ywc">
  207. <i class="el-icon-caret-left"></i>
  208. <div class="event-list-state-ywc">
  209. 已完成
  210. </div>
  211. </div> -->
  212. <div class="bgt-info-name">王某某</div>
  213. <div class="bgt-info-place">
  214. <ul>
  215. <li>2022-08-21 08:55</li>
  216. </ul>
  217. </div>
  218. </div>
  219. </div>
  220. </div>
  221. </dv-border-box-13>
  222. </div>
  223. </div>
  224. <div class="right-item2">
  225. <!-- 日历 -->
  226. <div class="forthis">
  227. <dv-border-box-13 backgroundColor="#040b1f" style="padding-bottom: 1rem;">
  228. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  229. <div class="i-list-con small-bottom-margin h-30">
  230. <dateChoose></dateChoose>
  231. </div>
  232. </dv-border-box-13>
  233. </div>
  234. <!-- 事件分类 -->
  235. <div class="forthis">
  236. <dv-border-box-13 backgroundColor="#040b1f" style="padding-bottom: 1rem;">
  237. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  238. <div class="this-title">
  239. <span>事件分类</span>
  240. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  241. </div>
  242. <div class="i-list-con small-bottom-margin h-19">
  243. <dv-capsule-chart :config="eventKind" style="width: 90%;height: 18vh; padding:.5rem 1rem" />
  244. </div>
  245. </dv-border-box-13>
  246. </div>
  247. <!-- 上报排行 -->
  248. <div class="forthis">
  249. <dv-border-box-13 backgroundColor="#040b1f" style="padding-bottom: 1rem;">
  250. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  251. <div class="this-title">
  252. <span>上报排行</span>
  253. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  254. </div>
  255. <div class="i-list-con small-bottom-margin h-19">
  256. <dv-scroll-ranking-board :config="reportList" style="width: 100%;height: 20vh; padding:.5rem 1rem" />
  257. </div>
  258. </dv-border-box-13>
  259. </div>
  260. </div>
  261. </div>
  262. <vBottomMenu ref="bottomMenu"></vBottomMenu>
  263. </div>
  264. <!--事件弹层-->
  265. <div class="event-info">
  266. <el-dialog title="事件信息-未处理" :visible.sync="eventInfoVisible_notProcessed"
  267. v-if="eventInfoVisible_notProcessed" width="80%" @close="cancelEventShow()">
  268. <div style="position:absolute; right: 0;top:60px; width:40%;">
  269. <el-steps :space="200" :active="1" finish-status="success" align-center>
  270. <el-step title="待处理"></el-step>
  271. <el-step title="处理中"></el-step>
  272. <el-step title="已办结"></el-step>
  273. <el-step title="已归档"></el-step>
  274. </el-steps>
  275. </div>
  276. <el-tabs v-model="activeName" @tab-click="handleClick" :before-leave="beforeLeave">
  277. <el-tab-pane label="基础信息" name="info">
  278. <div class="event-info-con">
  279. <div class="e-left">
  280. <div class="forthis">
  281. <div class="i-list-con h-35">
  282. <span v-for="(information,index) in information" :key="index">
  283. <div class="d-l-con">
  284. <div class="d-l-l-text">
  285. <i class="i-small"></i>
  286. <h4>{{ information.name }}:</h4>
  287. <h4>{{ information.content }}</h4>
  288. </div>
  289. </div>
  290. </span>
  291. </div>
  292. </div>
  293. <div class="forthis d-map h-30">
  294. <div class="this-title">
  295. <span>涉事单位</span>
  296. </div>
  297. <div class="i-list-con h-26">
  298. <span v-for="(company,index) in listEventDept" :key="index">
  299. <div class="d-l-con">
  300. <div class="d-l-l-text">
  301. <i class="i-small"></i>
  302. <h4>{{ company.deptName }}</h4>
  303. </div>
  304. <div class="d-l-l-count"
  305. :class="[company.eventStatus=='未处理'?'state-wcl':'state-wyc']">
  306. <!-- {{['未处理', '无异常'][company.state]}}-->{{ company.eventStatus }}
  307. </div>
  308. </div>
  309. </span>
  310. </div>
  311. </div>
  312. </div>
  313. <div class="e-center">
  314. <div class="forthis">
  315. <div class="i-list-con h-35">
  316. <el-image :src="url" :preview-src-list="listEventPic" class="img-company"
  317. style="height: 100%;" v-if="url!=''">
  318. </el-image>
  319. </div>
  320. </div>
  321. <div class="forthis h-30">
  322. <div class="i-list-con h-26">
  323. <el-image :src="item" style="width:3.9rem; height:3rem;margin: 2px;"
  324. v-for="(item,index) in listEventPic" @click="switchImage(item)">
  325. </el-image>
  326. </div>
  327. </div>
  328. </div>
  329. <div class="e-right">
  330. <div class="forthis h-67">
  331. <div class="this-title">
  332. <span>处理过程</span>
  333. </div>
  334. <div class="i-list-con">
  335. <div class="this-con">
  336. <span v-for="(company,index) in listLog" :key="index">
  337. <div class="z-begin" v-if="company.messageType=='sys_messageType_1'">
  338. {{ company.logContent }}
  339. </div>
  340. <div class="z-info-list"
  341. v-if="company.messageType=='sys_messageType_2'">
  342. <el-image :src="require('@/assets/images/visual/user-img.png')"
  343. style="width: 3rem; height: 3rem;margin:2px;">
  344. </el-image>
  345. <div class="z-info-list-con">
  346. <div class="user-and-time">
  347. <span>{{ company.createBy }}</span><span>
  348. {{ company.createTime }}</span>
  349. </div>
  350. <div class="z-info">
  351. <div class="this-con-list-info">
  352. {{ company.logContent }}
  353. </div>
  354. <div>
  355. <el-image :src="url" :preview-src-list="srcList"
  356. style="width:6.5rem; height:5rem;margin: 2px;"
  357. v-for="(item,index) in 4">
  358. </el-image>
  359. </div>
  360. </div>
  361. </div>
  362. </div>
  363. </span>
  364. </div>
  365. </div>
  366. </div>
  367. </div>
  368. </div>
  369. <div class="e-btm-btn">
  370. <el-form>
  371. <el-form-item>
  372. <el-select v-model="deptName" clearable placeholder="请选择部门" class="m-r-1rem"
  373. @change="setValue">
  374. <el-option v-for="item in listoperateDept" :key="item.deptId"
  375. :label="item.deptName" :value="{value:item.deptId,label:item.deptName}"
  376. :disabled="item.eventStatus=='未处理' ? false:true">
  377. </el-option>
  378. </el-select>
  379. <el-select v-model="eventStatus" clearable placeholder="请选择状态" class="m-r-1rem"
  380. @change="setXsYc">
  381. <el-option v-for="item in optionsNotProcessed" :key="item.value"
  382. :label="item.label" :value="item.value">
  383. </el-option>
  384. </el-select>
  385. <el-select v-model="eventType" clearable placeholder="请选择事件" class="m-r-1rem"
  386. v-if="eventTypeShow">
  387. <el-option v-for="item in listeventType" :key="item.id"
  388. :label="item.eventTypeName" :value="item.eventType">
  389. </el-option>
  390. </el-select>
  391. <!-- <el-radio v-model="radio" label="1">无异常</el-radio>
  392. <el-radio v-model="radio" label="2">确认火情</el-radio> -->
  393. <el-button type="success" @click="updateEventStatus">确定</el-button>
  394. </el-form-item>
  395. </el-form>
  396. </div>
  397. </el-tab-pane>
  398. <el-tab-pane label="实时画面" name="frame">
  399. </el-tab-pane>
  400. <el-tab-pane label="地理位置" name="point" style="height:75vh;">
  401. <div class="info-button-group">
  402. <button>视频联动</button>
  403. <button @click="editableLayers('supermapNotProcessed')">测量工具</button>
  404. </div>
  405. <supermapNotProcessed ref="supermapNotProcessed" v-if="'point' === activeName"
  406. style="width:100% ;height: 75vh;" :mapDiv="'forestWarmSuperMap'"
  407. :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" @preview="preview"
  408. :isSideBySide="false"></supermapNotProcessed>
  409. </el-tab-pane>
  410. <!-- <supermapNotProcessed ref="supermapNotProcessed" style="width: 1000px;height: 1000px;" :mapDiv="'forestWarmSuperMap'" :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" @preview="preview" :isSideBySide="false"></supermapNotProcessed> -->
  411. </el-tabs>
  412. </el-dialog>
  413. <el-dialog title="事件信息" :visible.sync="eventInfoVisible_Processed" v-if="eventInfoVisible_Processed"
  414. width="80%" @close="cancelEventShow()">
  415. <div style="position:absolute; right: 0;top:60px; width:40%;">
  416. <el-steps :space="200" :active=zt finish-status="success" align-center>
  417. <el-step title="待处理"></el-step>
  418. <el-step title="处理中"></el-step>
  419. <el-step title="支援"></el-step>
  420. <el-step title="已办结"></el-step>
  421. <el-step title="已归档"></el-step>
  422. </el-steps>
  423. </div>
  424. <el-tabs v-model="activeName" @tab-click="handleClickProcessed" :before-leave="beforeLeave">
  425. <el-tab-pane label="基础信息" name="info">
  426. <div class="event-info-con">
  427. <div class="e-left">
  428. <div class="forthis">
  429. <div class="i-list-con h-35">
  430. <span v-for="(information,index) in information" :key="index">
  431. <div class="d-l-con">
  432. <div class="d-l-l-text">
  433. <i class="i-small"></i>
  434. <h4>{{ information.name }}:</h4>
  435. <h4>{{ information.content }}</h4>
  436. </div>
  437. </div>
  438. </span>
  439. </div>
  440. </div>
  441. <div class="forthis d-map h-30">
  442. <div class="this-title">
  443. <span>涉事单位</span>
  444. </div>
  445. <div class="i-list-con h-26">
  446. <span v-for="(company,index) in listEventDept.allDept" :key="index">
  447. <div class="d-l-con">
  448. <div class="d-l-l-text">
  449. <i class="i-small"></i>
  450. <h4>{{ company.deptName }}</h4>
  451. </div>
  452. <div class="d-l-l-count"
  453. :class="[company.eventStatus=='未处理'?'state-wcl':'state-wyc']">
  454. <!-- {{['未处理', '无异常'][company.state]}}-->{{ company.eventStatus }}
  455. </div>
  456. </div>
  457. </span>
  458. </div>
  459. </div>
  460. </div>
  461. <div class="e-center">
  462. <div class="forthis">
  463. <div class="i-list-con h-35">
  464. <el-image :src="url" :preview-src-list=listEventPic class="img-company"
  465. style="height: 100%;" v-if="url!=''">
  466. </el-image>
  467. </div>
  468. </div>
  469. <div class="forthis h-30">
  470. <div class="i-list-con h-26">
  471. <el-image :src="item" style="width:3.9rem; height:3rem;margin: 2px;"
  472. v-for="(item,index) in listEventPic" @click="switchImage(item)">
  473. </el-image>
  474. </div>
  475. </div>
  476. </div>
  477. <div class="e-right">
  478. <div class="forthis h-67">
  479. <div class="this-title">
  480. <span>处理过程</span>
  481. </div>
  482. <div class="i-list-con">
  483. <div class="this-con">
  484. <span v-for="(company,index) in listLog" :key="index">
  485. <div class="z-begin" v-if="company.messageType=='sys_messageType_1'">
  486. {{ company.logContent }}
  487. </div>
  488. <div class="z-info-list"
  489. v-if="company.messageType=='sys_messageType_2'">
  490. <el-image :src="require('@/assets/images/visual/user-img.png')"
  491. style="width: 3rem; height: 3rem;margin:2px;">
  492. </el-image>
  493. <div class="z-info-list-con">
  494. <div class="user-and-time">
  495. <span>{{ company.createBy }}</span><span>
  496. {{ company.createTime }}</span>
  497. </div>
  498. <div class="z-info">
  499. <div class="this-con-list-info">
  500. {{ company.logContent }}
  501. </div>
  502. <div>
  503. <el-image :src="item"
  504. :preview-src-list="company.fileUrls"
  505. style="width:6.5rem; height:5rem;margin: 2px;"
  506. v-for="(item,index) in company.fileUrls">
  507. </el-image>
  508. </div>
  509. </div>
  510. </div>
  511. </div>
  512. </span>
  513. </div>
  514. </div>
  515. </div>
  516. </div>
  517. </div>
  518. <div class="e-btm-btn">
  519. <el-form>
  520. <el-form-item v-if=showZt>
  521. <el-select v-model="eventStatus" clearable placeholder="请选择状态" class="m-r-1rem">
  522. <el-option v-for="item in optionsProcessed" :key="item.value"
  523. :label="item.label" :value="item.value">
  524. </el-option>
  525. </el-select>
  526. <!-- <el-radio v-model="radio" label="1">无异常</el-radio>
  527. <el-radio v-model="radio" label="2">确认火情</el-radio> -->
  528. <el-button type="success" @click="updateEventStatusProcessed">确定</el-button>
  529. </el-form-item>
  530. </el-form>
  531. </div>
  532. </el-tab-pane>
  533. <el-tab-pane label="实时画面" name="frame">
  534. </el-tab-pane>
  535. <el-tab-pane label="地理位置" name="point">
  536. <div class="info-button-group">
  537. <button>视频联动</button>
  538. <button @click="editableLayers('supermapProcessed')">测量工具</button>
  539. </div>
  540. <supermapProcessed ref="supermapProcessed" v-if="'point' === activeName"
  541. style="width:100% ;height: 75vh" :mapDiv="'supermapProcessedSuperMap'"
  542. :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" @preview="preview"
  543. :isSideBySide="false"></supermapProcessed>
  544. </el-tab-pane>
  545. </el-tabs>
  546. </el-dialog>
  547. </div>
  548. <eventLocation ref="eventLocation"></eventLocation>
  549. <TVWall ref="TVWall"></TVWall>
  550. </div>
  551. </template>
  552. <script>
  553. import dateChoose from '@/views/date.vue'//日历
  554. /** ----------------------------------weosocket开始------------------------------------- */
  555. import Cookies from 'js-cookie'
  556. /** ----------------------------------weosocket结束------------------------------------- */
  557. import {
  558. getBaseInfo,
  559. getTodayEvents,
  560. getDeptEventCount,
  561. } from '@/api/forest'
  562. import supermap from '@/components/supermap' //超图
  563. import supermapNotProcessed from '@/components/supermap' //超图
  564. import supermapProcessed from '@/components/supermap' //超图
  565. import vheader from '@/components/v-header.vue' //一体化共用头部
  566. import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
  567. import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
  568. import TVWall from '@/components/TVWall.vue' //电视墙弹窗
  569. /** ----------------------------------摄像头预览开始------------------------------------- */
  570. import {
  571. getDahuaVideoServer
  572. } from '@/api/dahua/dahua'
  573. import DHWs from '@/dahua/lib/DHWs'
  574. /** ----------------------------------摄像头预览结束------------------------------------- */
  575. let echarts = require('echarts')
  576. export default {
  577. dicts: ['event_source'],
  578. components: {
  579. supermap,
  580. supermapNotProcessed,
  581. supermapProcessed,
  582. vheader,
  583. vBottomMenu,
  584. eventLocation,
  585. TVWall,
  586. dateChoose
  587. },
  588. created() {
  589. /** ----------------------------------摄像头预览开始------------------------------------- */
  590. const DHWsInstance = DHWs.getInstance()
  591. this.ws = DHWsInstance
  592. console.log(this.ws)
  593. /** ----------------------------------摄像头预览结束------------------------------------- */
  594. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  595. window.showDialog = this.showDialog
  596. window.choseLayerSwitching = this.choseLayerSwitching
  597. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  598. },
  599. mounted() {
  600. this.getBaseInfo()
  601. this.getTodayEvents("2022-08-29")
  602. this.getDeptEventCount("2022-08-29")
  603. /** ----------------------------------weosocket开始------------------------------------- */
  604. this.initWebSocket()
  605. /** ----------------------------------weosocket结束------------------------------------- */
  606. },
  607. data() {
  608. return {
  609. forestInfo: '', //基本情况
  610. totalStr:'',//左侧获取事件信息统计
  611. aiTotal:'',//左侧获取事件信息统计
  612. newReport:'',//左侧获取事件信息统计
  613. otherTotal:'',//左侧获取事件信息统计
  614. readyFinish:'',//左侧获取事件信息统计
  615. readySure:'',//左侧获取事件信息统计
  616. total:'',//左侧获取事件信息统计
  617. aiTotal_pre:'',//左侧获取事件信息统计
  618. newReport_pre:'',//左侧获取事件信息统计
  619. otherTotal_pre:'',//左侧获取事件信息统计
  620. readyFinish_pre:'',//左侧获取事件信息统计
  621. readySure_pre:'',//左侧获取事件信息统计
  622. forestFarm: [],//左侧部门事件数量
  623. listCurrentIndex1: '',
  624. // ----------------------------------事件分类柱状----------------------------------------
  625. eventKind:{
  626. data: [
  627. {
  628. name: '森林防火',
  629. value: 167
  630. },
  631. {
  632. name: '病虫灾害',
  633. value: 123
  634. },
  635. {
  636. name: '乱砍乱伐',
  637. value: 98
  638. },
  639. {
  640. name: '动物保护',
  641. value: 75
  642. },
  643. {
  644. name: '偷盗偷猎',
  645. value: 66
  646. },
  647. ],
  648. colors: ['#1ce0a9', '#d6333b', '#e68d3f', '#32c5e9', '#2abc65'],
  649. unit: '',
  650. showValue: true,
  651. },
  652. // ----------------------------------上报排行----------------------------------------
  653. reportList:{
  654. data: [
  655. {
  656. name: '周口',
  657. value: 55
  658. },
  659. {
  660. name: '南阳',
  661. value: 120
  662. },
  663. {
  664. name: '西峡',
  665. value: 78
  666. },
  667. {
  668. name: '驻马店',
  669. value: 66
  670. },
  671. {
  672. name: '新乡',
  673. value: 80
  674. },
  675. {
  676. name: '信阳',
  677. value: 45
  678. },
  679. {
  680. name: '漯河',
  681. value: 29
  682. }
  683. ]
  684. },
  685. /** ----------------------------------weosocket开始------------------------------------- */
  686. weosocket: false,
  687. websock: '',
  688. setIntervalWesocketPush: null,
  689. /** ----------------------------------weosocket结束------------------------------------- */
  690. eventSearch:'',//事件列表搜索
  691. /** ----------------------------------摄像头预览开始------------------------------------- */
  692. activePanel: 'key1',
  693. isLogin: false,
  694. cameraParams: [],
  695. ws: null,
  696. /** ----------------------------------摄像头预览结束------------------------------------- */
  697. markersList: [], //点位列表
  698. cameraList: [], //摄像头列表
  699. eventInfoVisible_notProcessed: false,
  700. eventInfoVisible_Processed: false,
  701. activeName: 'info',
  702. radio: '1',
  703. /** ----------------------------------事件弹窗开始------------------------------------- */
  704. listEventPic: [], //事件图片
  705. url: '',
  706. id: '',
  707. eventType: '',
  708. deptName: '',
  709. eventStatus: '',
  710. cameraId: '',
  711. reportTime: '',
  712. reportAddress: '',
  713. eventCode: null,
  714. eventSource: '',
  715. //事件详情弹出显隐
  716. eventTypeShow: false,
  717. listEventDept: [], //涉事单位List,
  718. listLog: [], //处理过程List,
  719. listoperateDept: [],
  720. optionsNotProcessed: [{
  721. value: 'wyc',
  722. label: '无异常'
  723. }, {
  724. value: 'qr',
  725. label: '确认'
  726. }],
  727. listeventType: [],
  728. updateEventStatusForm: {
  729. id: '',
  730. eventStatus: '',
  731. eventCode: '',
  732. deptId: '',
  733. deptName: '',
  734. eventType: '',
  735. zt: ''
  736. },
  737. /** ----------------------------------事件弹窗结束------------------------------------- */
  738. aniu: true,
  739. showZt: true,
  740. zt: null,
  741. fireReport: false,
  742. optionsProcessed: [],
  743. // 弹出层 基本信息
  744. information: [{
  745. name: '标题',
  746. id: '',
  747. content: '某某某某某发现疑似火情'
  748. },
  749. {
  750. name: '时间',
  751. id: '',
  752. content: '2022-02-14 14:30'
  753. },
  754. {
  755. name: '来源',
  756. id: '',
  757. content: '摄像头'
  758. },
  759. {
  760. name: '坐标',
  761. id: '',
  762. content: '125.78945646'
  763. },
  764. {
  765. name: '纬度',
  766. id: '',
  767. content: '43.987424'
  768. },
  769. {
  770. name: '上报人',
  771. id: '',
  772. content: '党校监控点位'
  773. },
  774. {
  775. name: '详细信息',
  776. id: '',
  777. content: '这里发生火灾,需要立刻支援'
  778. }
  779. ],
  780. // 弹出层 基本信息 涉事单位
  781. srcList: [
  782. require('@/assets/images/visual/img-sample-3.jpg'),
  783. require('@/assets/images/visual/img-sample-2.jpg'),
  784. require('@/assets/images/visual/img-sample-1.jpg')
  785. ],
  786. srcList1: [
  787. require('@/assets/images/visual/林业病虫害抓拍2.png'),
  788. require('@/assets/images/visual/林业病虫害松墨天牛抓拍.png'),
  789. require('@/assets/images/visual/img-sample-3.jpg')
  790. ],
  791. //左右缩进
  792. indentStyle: '',
  793. indentleft: '',
  794. indentright: '',
  795. indentText: '收起左右栏',
  796. indentdisabled: false
  797. }
  798. },
  799. /** ----------------------------------weosocket开始------------------------------------- */
  800. destroyed() { //离开页面关闭Socket连接
  801. if (this.websock) {
  802. clearInterval(this.setIntervalWesocketPush)
  803. this.websock.close()
  804. this.websock = null
  805. }
  806. },
  807. /** ----------------------------------weosocket结束------------------------------------- */
  808. methods: {
  809. /** ----------------------------------weosocket开始------------------------------------- */
  810. initWebSocket() { //初始化weosocket
  811. const wsuri = 'wss://www.hmzzxc.com:10012/websocket/forest-' + Cookies.get('username')
  812. this.websock = new WebSocket(wsuri)
  813. console.log('建立websocket连接')
  814. this.websock.onopen = this.websocketonopen
  815. this.websock.onmessage = this.websocketonmessage
  816. this.websock.onerror = this.websocketonerror
  817. this.websock.onclose = this.websocketclose
  818. this.websock.onclose = this.websocketclose
  819. },
  820. websocketonopen() { //连接建立之后执行send方法发送数据
  821. console.log('websocket连接成功')
  822. this.weosocket = true
  823. this.sendPing()
  824. },
  825. websocketonerror() { //连接建立失败重连
  826. this.initWebSocket()
  827. },
  828. websocketonmessage(e) { //数据接收
  829. console.log('接收数据', e.data)
  830. },
  831. websocketsend(Data) { //数据发送
  832. this.websock.send(Data)
  833. },
  834. websocketclose(e) { //关闭
  835. console.log('断开连接', e)
  836. // clearInterval(this.setIntervalWesocketPush)
  837. this.weosocket = false
  838. },
  839. /**发送心跳
  840. * @param {number} time 心跳间隔毫秒 默认5000
  841. * @param {string} ping 心跳名称 默认字符串ping
  842. */
  843. sendPing(time = 5000, ping = {
  844. 'fromId': 'forest',
  845. 'fromUserId': Cookies.get('username'),
  846. "toUserId": Cookies.get('username')
  847. }) {
  848. clearInterval(this.setIntervalWesocketPush)
  849. this.websock.send(JSON.stringify(ping))
  850. this.setIntervalWesocketPush = setInterval(() => {
  851. if (this.weosocket) {
  852. this.websock.send(JSON.stringify(ping))
  853. } else {
  854. this.initWebSocket()
  855. }
  856. }, time)
  857. },
  858. /** ----------------------------------weosocket结束------------------------------------- */
  859. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  860. showDialog(click) {
  861. if (click == 'eventLocation') {
  862. this.$refs.eventLocation.showEventLocation()
  863. this.$refs.supermap.isEditableLayers = false
  864. this.$refs.bottomMenu.showChild = false
  865. } else if (click == 'editableLayers') {
  866. this.$refs.bottomMenu.showChild = false
  867. if (!this.$refs.supermap.isEditableLayers) {
  868. this.$refs.supermap.isEditableLayers = true
  869. } else {
  870. this.$refs.supermap.isEditableLayers = false
  871. }
  872. } else if (click == 'layerSwitching') {
  873. this.$refs.supermap.isEditableLayers = false
  874. if (!this.$refs.bottomMenu.showChild) {
  875. this.$refs.bottomMenu.showChild = true
  876. } else {
  877. this.$refs.bottomMenu.showChild = false
  878. }
  879. } else if (click == 'TVWall') {
  880. this.$refs.TVWall.showTVWall()
  881. this.$refs.supermap.isEditableLayers = false
  882. this.$refs.bottomMenu.showChild = false
  883. }
  884. },
  885. //选择图层
  886. choseLayerSwitching(url) {
  887. this.$refs.supermap.layerSwitching(url, true)
  888. },
  889. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  890. //事件数量统计chart 样例地址http://192.144.199.210:8080/editor/index.html?chart_id=jTXf0Rv4A3oiBONB
  891. eventChartAi(data) {
  892. // 基于准备好的dom,初始化echarts实例
  893. let myChart = echarts.init(document.getElementById('chart-event-ai'))
  894. myChart.setOption({
  895. tooltip: {
  896. trigger: 'none'
  897. },
  898. grid: {
  899. top: "65%",
  900. left: "5%",
  901. right: "5%"
  902. },
  903. yAxis: {
  904. data: ["百分比"],
  905. axisTick: {
  906. show: false
  907. },
  908. axisLine: {
  909. show: false
  910. },
  911. axisLabel: {
  912. show: false,
  913. }
  914. },
  915. xAxis: {
  916. splitLine: {
  917. show: false
  918. },
  919. axisTick: {
  920. show: false
  921. },
  922. axisLine: {
  923. show: false
  924. },
  925. axisLabel: {
  926. show: false
  927. }
  928. },
  929. legend: {
  930. data: ["AI", "其他"],
  931. bottom: "5%",
  932. textStyle: {
  933. color: "#1FC3CE",
  934. fontSize: 14
  935. },
  936. },
  937. series: [{
  938. // name: '最上层立体圆',
  939. type: 'pictorialBar',
  940. symbolSize: [10, 20],
  941. symbolOffset: [2, 0],
  942. z: 12,
  943. itemStyle: {
  944. normal: {
  945. color: '#293CA0'
  946. }
  947. },
  948. data: [{
  949. value: 100,
  950. symbolPosition: 'end'
  951. }]
  952. }, {
  953. // name: '中间立体圆',
  954. type: 'pictorialBar',
  955. symbolSize: [10, 20],
  956. symbolOffset: [2, 0],
  957. z: 12,
  958. itemStyle: {
  959. normal: {
  960. color: '#45ac8d'
  961. }
  962. },
  963. data: [{
  964. value: data,
  965. symbolPosition: 'end'
  966. }]
  967. }, {
  968. // name: '最底部立体圆',
  969. type: 'pictorialBar',
  970. symbolSize: [10, 20],
  971. symbolOffset: [-4, 0],
  972. z: 12,
  973. itemStyle: {
  974. normal: {
  975. color: '#196d59'
  976. }
  977. },
  978. data: [100 - data]
  979. }, {
  980. name: 'AI',
  981. //底部立体柱
  982. stack: '1',
  983. type: 'bar',
  984. itemStyle: {
  985. normal: {
  986. color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
  987. offset: 0,
  988. color: '#29ac8f'
  989. }, {
  990. offset: 1,
  991. color: '#0a3f3f'
  992. }])
  993. },
  994. },
  995. label: {
  996. normal: {
  997. show: true,
  998. position: 'inside',
  999. offset: [0, 1],
  1000. formatter: function(obj) {
  1001. return (obj.value).toLocaleString() + '%';
  1002. },
  1003. textStyle: {
  1004. align: 'center',
  1005. baseline: 'middle',
  1006. fontSize: 14,
  1007. fontWeight: '400',
  1008. color: '#fff',
  1009. textShadowColor: '#000',
  1010. textShadowBlur: '0',
  1011. textShadowOffsetX: 1,
  1012. textShadowOffsetY: 1,
  1013. }
  1014. },
  1015. },
  1016. silent: true,
  1017. barWidth: 20,
  1018. barGap: '-100%', // Make series be overlap
  1019. data: [data]
  1020. }, {
  1021. name: '其他',
  1022. //上部立体柱
  1023. stack: '1',
  1024. type: 'bar',
  1025. itemStyle: {
  1026. normal: {
  1027. color: '#14257B',
  1028. opacity: .7
  1029. }
  1030. },
  1031. silent: true,
  1032. barWidth: 20,
  1033. barGap: '-100%', // Make series be overlap
  1034. data: [100 - data],
  1035. // itemStyle: {
  1036. // normal: {
  1037. // color: 'rgba(29,67,243,1)',
  1038. // }
  1039. // },
  1040. label: {
  1041. normal: {
  1042. show: true,
  1043. position: 'inside',
  1044. offset: [0, 1],
  1045. formatter: function(obj) {
  1046. return (obj.value).toLocaleString() + '%';
  1047. },
  1048. textStyle: {
  1049. align: 'center',
  1050. baseline: 'middle',
  1051. fontSize: 14,
  1052. fontWeight: '400',
  1053. color: '#fff',
  1054. textShadowColor: '#000',
  1055. textShadowBlur: '0',
  1056. textShadowOffsetX: 1,
  1057. textShadowOffsetY: 1,
  1058. }
  1059. },
  1060. },
  1061. }]
  1062. })
  1063. },
  1064. //吉祥物收起左右框
  1065. indent() {
  1066. let list = document.getElementsByClassName('el-tooltip__popper')
  1067. list[list.length - 1].style.display = 'none'
  1068. if (this.indentStyle == '') {
  1069. this.indentStyle = 'indent-style'
  1070. this.indentleft = 'indent-left'
  1071. this.indentright = 'indent-right'
  1072. this.indentText = '展开左右栏'
  1073. } else if (this.indentText == '展开左右栏') {
  1074. this.indentStyle = ''
  1075. this.indentleft = ''
  1076. this.indentright = ''
  1077. this.indentText = '收起左右栏'
  1078. }
  1079. },
  1080. /** ----------------------------------事件弹窗开始------------------------------------- */
  1081. editableLayers(processedState) {
  1082. if (processedState == 'supermapNotProcessed') {
  1083. let aa = this.$refs.supermapNotProcessed.isEditableLayers
  1084. if (!this.$refs.supermapNotProcessed.isEditableLayers) {
  1085. this.$refs.supermapNotProcessed.isEditableLayers = true
  1086. } else {
  1087. this.$refs.supermapNotProcessed.isEditableLayers = false
  1088. }
  1089. } else {
  1090. let bb = this.$refs.supermapProcessed.isEditableLayers
  1091. if (!this.$refs.supermapProcessed.isEditableLayers) {
  1092. this.$refs.supermapProcessed.isEditableLayers = true
  1093. } else {
  1094. this.$refs.supermapProcessed.isEditableLayers = false
  1095. }
  1096. }
  1097. },
  1098. switchImage(url) {
  1099. this.url = url
  1100. },
  1101. async beforeLeave(newactiveName, oldActiveName) {
  1102. let that = this
  1103. if (newactiveName == 'frame') {
  1104. return await that.formLeaveTable()
  1105. }
  1106. },
  1107. // 弹层方法
  1108. showEventInfo_notProcessed(id) {
  1109. let that = this
  1110. that.id = id
  1111. that.eventInfoVisible_notProcessed = true
  1112. that.listEventPic = [],
  1113. that.url = '',
  1114. that.resetQuery()
  1115. getWarm(id).then(res => {
  1116. let data = res.data
  1117. that.cameraId = data.reportById
  1118. that.reportTime = data.reportTime
  1119. that.reportAddress = data.reportAddress
  1120. that.eventCode = data.eventCode
  1121. that.eventSource = data.eventSource
  1122. that.information[0].content = data.eventTitle
  1123. that.information[1].content = data.reportTime
  1124. that.information[2].content = that.selectDictLabel(that.dict.type.event_source, data
  1125. .eventSource)
  1126. that.information[3].content = data.longitude
  1127. that.information[4].content = data.latitude
  1128. that.information[5].content = data.reportBy
  1129. that.information[6].content = data.eventContent
  1130. selectByeventCode(data.eventCode).then(res1 => {
  1131. let that = this
  1132. that.listEventDept = res1.data.allDept
  1133. that.listoperateDept = res1.data.operateDept
  1134. })
  1135. selectCentereventTLogListPC(data.eventCode).then(res2 => {
  1136. let that = this
  1137. that.listLog = res2.data
  1138. })
  1139. selectCameraEventByCameraId(data.reportById).then(res3 => {
  1140. let that = this
  1141. that.listeventType = res3.data
  1142. })
  1143. if (data.attachId != null) {
  1144. listCenterdataTAttachByBusId(data.attachId).then(res4 => {
  1145. let that = this
  1146. that.listEventPic = res4.data
  1147. if (that.listEventPic.length > 0) {
  1148. that.url = that.listEventPic[0]
  1149. } else {
  1150. that.url = ''
  1151. }
  1152. })
  1153. }
  1154. })
  1155. },
  1156. updateEventStatus() {
  1157. if (this.deptName == '') {
  1158. this.$modal.msgError('请选择部门')
  1159. return
  1160. }
  1161. if (this.eventStatus == '') {
  1162. this.$modal.msgError('请选择状态')
  1163. return
  1164. }
  1165. if (this.eventTypeShow) {
  1166. if (this.eventType == '') {
  1167. this.$modal.msgError('请选择事件类型')
  1168. return
  1169. }
  1170. }
  1171. this.updateEventStatusForm.id = this.id
  1172. this.updateEventStatusForm.zt = this.eventStatus
  1173. this.updateEventStatusForm.eventCode = this.eventCode
  1174. this.updateEventStatusForm.deptId = this.deptId
  1175. this.updateEventStatusForm.deptName = this.deptName
  1176. this.updateEventStatusForm.eventType = this.eventType
  1177. updateDeptEventStatus(this.updateEventStatusForm).then(response => {
  1178. this.$modal.msgSuccess(response.msg)
  1179. this.eventStatus = ''
  1180. this.deptId = ''
  1181. this.eventType = ''
  1182. this.deptName = ''
  1183. this.eventInfoVisible_notProcessed = false
  1184. this.cancelEventShow()
  1185. this.getTodayEvents()
  1186. })
  1187. },
  1188. setXsYc() {
  1189. let that = this
  1190. if (this.eventStatus == 'qr') {
  1191. this.eventTypeShow = true
  1192. } else {
  1193. this.eventTypeShow = false
  1194. }
  1195. },
  1196. setValue(event) {
  1197. this.deptId = event.value
  1198. this.deptName = event.label
  1199. },
  1200. cancelEventShow() {
  1201. this.activeName = 'info'
  1202. this.listEventPic = [] //事件图片
  1203. this.listEventDept = [] //涉事单位List,
  1204. this.listLog = [] //处理过程List,
  1205. this.listoperateDept = []
  1206. },
  1207. handleClick: function(tab, oldActiveName) {
  1208. let that = this
  1209. if (tab.name == 'frame') {
  1210. if (that.eventSource == 'event_source_2') {
  1211. selectchannelCodeByCameraId(that.cameraId).then(res => {
  1212. let channelCode = []
  1213. if (res.data != null && res.data.length > 0) {
  1214. for (let i = 0; i < res.data.length; i++) {
  1215. channelCode.push(res.data[i].channelCode)
  1216. }
  1217. }
  1218. if (channelCode != null && channelCode.length > 0) {
  1219. this.preview(channelCode)
  1220. } else {
  1221. this.$modal.msg('没有匹配到相对应摄像头!!!')
  1222. }
  1223. })
  1224. } else {
  1225. this.$modal.msg('没有匹配到相对应摄像头!!!')
  1226. }
  1227. } else if (tab.name == 'point') {
  1228. setTimeout(() => {
  1229. that.markersMapList = []
  1230. let information = {}
  1231. information.lng = that.information[3].content
  1232. information.lat = that.information[4].content
  1233. let bindPopupHtml = ''
  1234. for (let i = 0; i < that.information.length; i++) {
  1235. bindPopupHtml += '<div class="map-tip">' +
  1236. ' <div class="d-l-con">' +
  1237. ' <div class="d-l-l-text">' +
  1238. ' <h4>' + that.information[i].name + ':' + that.information[i]
  1239. .content + '</h4>' +
  1240. ' </div>' +
  1241. ' </div>' +
  1242. ' </div>'
  1243. }
  1244. information.bindPopupHtml = bindPopupHtml
  1245. information.click = ''
  1246. information.keepBindPopup = false
  1247. information.isAggregation = false
  1248. information.icon = 'marker'
  1249. that.markersMapList.push(information)
  1250. // 查询火点附近摄像头
  1251. selectFjsxt(that.information[3].content, that.information[4].content).then(
  1252. response => {
  1253. console.log('vv', response.data)
  1254. if (response.data != null && response.data.length > 0) {
  1255. for (let i = 0; i < response.data.length; i++) {
  1256. let marke = {}
  1257. marke.lng = response.data[i].longitude
  1258. marke.lat = response.data[i].latitude
  1259. let code = response.data[i].channelCode.split(',')
  1260. marke.bindPopupHtml = response.data[i].cameraName
  1261. marke.click = 'preview'
  1262. marke.parameter = code
  1263. marke.keepBindPopup = false
  1264. marke.isAggregation = false
  1265. marke.icon = 'camera'
  1266. that.markersMapList.push(marke)
  1267. }
  1268. }
  1269. that.$refs.supermapNotProcessed.dropLocation(information.lat, information
  1270. .lng)
  1271. that.$refs.supermapNotProcessed.clearM(false)
  1272. that.$refs.supermapNotProcessed.setMarkers(that.markersMapList)
  1273. })
  1274. }, 1000)
  1275. }
  1276. },
  1277. /** 重置按钮操作 */
  1278. resetQuery() {
  1279. this.eventTypeShow = false
  1280. this.eventType = ''
  1281. this.deptName = ''
  1282. this.eventStatus = ''
  1283. },
  1284. handleClickProcessed(tab, event) {
  1285. let that = this
  1286. if (tab.name == 'frame') {
  1287. if (that.eventSource == 'event_source_2') {
  1288. selectchannelCodeByCameraId(that.cameraId).then(res => {
  1289. let channelCode = []
  1290. if (res.data != null && res.data.length > 0) {
  1291. for (let i = 0; i < res.data.length; i++) {
  1292. channelCode.push(res.data[i].channelCode)
  1293. }
  1294. }
  1295. if (channelCode != null && channelCode.length > 0) {
  1296. this.preview(channelCode)
  1297. } else {
  1298. this.$modal.msg('没有匹配到相对应摄像头!!!')
  1299. }
  1300. })
  1301. } else {
  1302. this.$modal.msg('没有匹配到相对应摄像头!!!')
  1303. }
  1304. } else if (tab.name == 'point') {
  1305. setTimeout(() => {
  1306. that.markersMapList = []
  1307. let information = {}
  1308. information.lng = that.information[3].content
  1309. information.lat = that.information[4].content
  1310. let bindPopupHtml = ''
  1311. for (let i = 0; i < that.information.length; i++) {
  1312. bindPopupHtml += '<div class="map-tip">' +
  1313. ' <div class="d-l-con">' +
  1314. ' <div class="d-l-l-text">' +
  1315. ' <h4>' + that.information[i].name + ':' + that.information[i]
  1316. .content + '</h4>' +
  1317. ' </div>' +
  1318. ' </div>' +
  1319. ' </div>'
  1320. }
  1321. information.bindPopupHtml = bindPopupHtml
  1322. information.click = ''
  1323. information.keepBindPopup = false
  1324. information.isAggregation = false
  1325. information.icon = 'marker'
  1326. that.markersMapList.push(information)
  1327. // 查询火点附近摄像头
  1328. selectFjsxt(that.information[3].content, that.information[4].content).then(response => {
  1329. console.log('vv', response.data)
  1330. if (response.data != null && response.data.length > 0) {
  1331. for (let i = 0; i < response.data.length; i++) {
  1332. let marke = {}
  1333. marke.lng = response.data[i].longitude
  1334. marke.lat = response.data[i].latitude
  1335. let code = response.data[i].channelCode.split(',')
  1336. marke.bindPopupHtml = response.data[i].cameraName
  1337. marke.click = 'preview'
  1338. marke.parameter = code
  1339. marke.keepBindPopup = false
  1340. marke.isAggregation = false
  1341. marke.icon = 'camera'
  1342. that.markersMapList.push(marke)
  1343. }
  1344. }
  1345. that.$refs.supermapProcessed.dropLocation(information.lat, information.lng)
  1346. that.$refs.supermapProcessed.clearM(false)
  1347. that.$refs.supermapProcessed.setMarkers(that.markersMapList)
  1348. })
  1349. }, 1000)
  1350. }
  1351. },
  1352. showEventInfo_Processed(id) {
  1353. let that = this
  1354. that.eventInfoVisible_Processed = true
  1355. that.listEventPic = []
  1356. that.url = ''
  1357. that.id = id
  1358. getForest(id).then(response => {
  1359. this.showZt = true
  1360. this.zt = null
  1361. this.fireReport = false
  1362. this.optionsProcessed = [{
  1363. value: 'bj',
  1364. label: '办结'
  1365. }, {
  1366. value: 'zy',
  1367. label: '支援'
  1368. }, {
  1369. value: 'gd',
  1370. label: '归档'
  1371. }]
  1372. let data = response.data
  1373. if (data.eventStatus != 'event_event_status_1') {
  1374. this.aniu = false
  1375. }
  1376. if (data.eventStatus == 'event_event_status_6') {
  1377. this.optionsProcessed.splice(1, 2)
  1378. this.zt = 3
  1379. }
  1380. if (data.eventStatus == 'event_event_status_1') {
  1381. this.optionsProcessed.splice(2, 1)
  1382. this.zt = 2
  1383. }
  1384. if (data.eventStatus == 'event_event_status_2') {
  1385. this.optionsProcessed.splice(0, 2)
  1386. this.zt = 4
  1387. }
  1388. if (data.eventStatus == 'event_event_status_3') {
  1389. this.showZt = false
  1390. this.fireReport = true
  1391. this.zt = 5
  1392. }
  1393. console.log(this.optionsProcessed)
  1394. let that = this
  1395. this.eventSource = data.eventSource
  1396. this.id = data.id
  1397. this.reportTime = data.reportTime
  1398. this.cameraId = data.reportById
  1399. this.reportAddress = data.reportAddress
  1400. this.eventCode = data.eventCode
  1401. this.information[0].content = data.eventTitle
  1402. this.information[1].content = data.reportTime
  1403. this.information[2].content = that.selectDictLabel(that.dict.type.event_source, data
  1404. .eventSource)
  1405. this.information[3].content = data.longitude
  1406. this.information[4].content = data.latitude
  1407. this.information[5].content = data.reportBy
  1408. this.information[6].content = data.eventContent
  1409. selectByeventCode(data.eventCode).then(response => {
  1410. that.listEventDept = response.data
  1411. })
  1412. selectCentereventTLogListPC(data.eventCode).then(response => {
  1413. that.listLog = response.data
  1414. })
  1415. if (data.attachId != null) {
  1416. listCenterdataTAttachByBusId(data.attachId).then(response => {
  1417. that.listEventPic = response.data
  1418. if (that.listEventPic.length > 0) {
  1419. that.url = that.listEventPic[0]
  1420. } else {
  1421. that.url = ''
  1422. }
  1423. })
  1424. }
  1425. })
  1426. },
  1427. /** ----------------------------------事件弹窗结束------------------------------------- */
  1428. getBaseInfo() {
  1429. //左侧获取部门信息
  1430. getBaseInfo().then(res => {
  1431. this.forestInfo = res.data.baseinfo //基本情况
  1432. // this.cameraList = res.data.cameraList
  1433. })
  1434. },
  1435. getTodayEvents(date) {
  1436. let that = this
  1437. //左侧获取事件信息统计
  1438. getTodayEvents({ day:date }).then(res => {
  1439. this.aiTotal=res.data.aiTotal;
  1440. this.aiTotal_pre=res.data.aiTotal_pre;
  1441. this.newReport=res.data.newReport;
  1442. this.newReport_pre=res.data.newReport_pre;
  1443. this.otherTotal=res.data.otherTotal;
  1444. this.otherTotal_pre=res.data.otherTotal_pre;
  1445. this.readyFinish=res.data.readyFinish;
  1446. this.readyFinish_pre=res.data.readyFinish_pre;
  1447. this.readySure=res.data.readySure;
  1448. this.readySure_pre=res.data.readySure_pre;
  1449. this.totalStr=res.data.totalStr;
  1450. this.total=res.data.total;
  1451. this.eventChartAi(this.aiTotal_pre);
  1452. that.markersList = []
  1453. if (res.data.eventListAll != null && res.data.eventListAll.length > 0) {
  1454. for (let i = 0; i < res.data.eventListAll.length; i++) {
  1455. let markersMap = {
  1456. lng: 124.59,
  1457. lat: 43.02,
  1458. icon: 'marker',
  1459. bindPopupHtml: '',
  1460. click: '',
  1461. parameter: '',
  1462. keepBindPopup: false,
  1463. isAggregation: false
  1464. }
  1465. if (res.data.eventListAll.length > 50) {
  1466. markersMap.isAggregation = true
  1467. }
  1468. if (res.data.eventListAll[i].eventStatus == 'event_event_status_1' || res.data
  1469. .eventListAll[i].eventStatus == 'event_event_status_2' || res.data.eventListAll[i]
  1470. .eventStatus == 'event_event_status_6') {
  1471. markersMap.click = 'showEventInfo_Processed'
  1472. markersMap.icon = 'sj-icon-map-clz'
  1473. markersMap.isAggregation = false
  1474. } else if (res.data.eventListAll[i].eventStatus == 'event_event_status_4') {
  1475. markersMap.click = 'showEventInfo_notProcessed'
  1476. markersMap.icon = 'sj-icon-map-wcl'
  1477. } else {
  1478. markersMap.icon = 'sj-icon-map-ywc'
  1479. }
  1480. markersMap.parameter = res.data.eventListAll[i].id
  1481. markersMap.lng = res.data.eventListAll[i].longitude
  1482. markersMap.lat = res.data.eventListAll[i].latitude
  1483. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1484. '<span>' +
  1485. ' <div class="d-l-con">' +
  1486. ' <div class="d-l-l-text">' +
  1487. ' <h4>经纬度:' + res.data.eventListAll[i].longitude + ',' + res.data
  1488. .eventListAll[i]
  1489. .latitude + '</h4>' +
  1490. ' </div>' +
  1491. ' </div>' +
  1492. ' </span>' +
  1493. '<span>' +
  1494. ' <div class="d-l-con">' +
  1495. ' <div class="d-l-l-text">' +
  1496. ' <h4>事件名称:' + res.data.eventListAll[i].eventTitle + '</h4>' +
  1497. ' </div>' +
  1498. ' </div>' +
  1499. ' </span>' +
  1500. '<span>' +
  1501. ' <div class="d-l-con">' +
  1502. ' <div class="d-l-l-text">' +
  1503. ' <h4>事件时间:' + res.data.eventListAll[i].reportTime + '</h4>' +
  1504. ' </div>' +
  1505. ' </div>' +
  1506. ' </span>' +
  1507. '</div>'
  1508. that.markersList.push(markersMap)
  1509. }
  1510. that.eventList = res.data.eventListAll
  1511. setTimeout(() => {
  1512. that.$refs.supermap.clearM(false)
  1513. that.$refs.supermap.clearM(true)
  1514. that.$refs.supermap.setMarkers(that.markersList)
  1515. }, 1000)
  1516. } else {
  1517. setTimeout(() => {
  1518. that.$refs.supermap.clearM(false)
  1519. that.$refs.supermap.clearM(true)
  1520. }, 1000)
  1521. }
  1522. })
  1523. },
  1524. getDeptEventCount(date) {
  1525. let that = this
  1526. //左侧获取事件部门数量
  1527. getDeptEventCount({ day:date }).then(res => {
  1528. this.forestFarm=res.data;
  1529. })
  1530. },
  1531. /** ----------------------------------摄像头预览开始------------------------------------- */
  1532. alertLogin: function() {
  1533. this.$modal.msg('登录中....')
  1534. },
  1535. alertLoginSuccess: function() {
  1536. this.$modal.msgSuccess('登录成功!')
  1537. },
  1538. alertLoginFailed: function() {
  1539. this.$modal.msgError('登陆失败!')
  1540. },
  1541. alertReinstall: function() {
  1542. this.$modal.msgWarning('请重新安装客户端')
  1543. },
  1544. /** 预览按钮操作 */
  1545. preview(channelCode) {
  1546. getDahuaVideoServer().then(newResponse => {
  1547. this.ws.detectConnectQt().then(res => {
  1548. if (res) { // 连接客户端成功
  1549. this.alertLogin()
  1550. this.ws.login({
  1551. loginIp: newResponse.loginIp,
  1552. loginPort: newResponse.loginPort,
  1553. userName: newResponse.userName,
  1554. userPwd: newResponse.userPwd,
  1555. token: '',
  1556. https: 1
  1557. })
  1558. this.ws.on('loginState', (res) => {
  1559. this.isLogin = res
  1560. console.log('---res-----', res)
  1561. if (res) {
  1562. this.alertLoginSuccess()
  1563. this.activePanel = 'key2'
  1564. this.realTimeVideoDialog(channelCode)
  1565. } else {
  1566. this.alertLoginFailed()
  1567. }
  1568. })
  1569. } else { // 连接客户端失败
  1570. this.alertReinstall()
  1571. }
  1572. })
  1573. })
  1574. },
  1575. realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
  1576. if (!this.isLogin) {
  1577. this.$Message.info('正在登陆客户端,请稍等......')
  1578. return false
  1579. }
  1580. this.ws.openVideo(cameraParams)
  1581. }
  1582. /** ----------------------------------摄像头预览结束------------------------------------- */
  1583. }
  1584. }
  1585. </script>
  1586. <style rel="stylesheet/scss" lang="scss" scoped>
  1587. @import '@/assets/styles/base.scss';
  1588. </style>