firespread.vue 66 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795
  1. <template>
  2. <div class="visual-con">
  3. <!--头部-->
  4. <vheader></vheader>
  5. <!--主体-->
  6. <div class="visual-body">
  7. <button @click="showEventDialog"
  8. style="position: absolute; left:50%;top: 50vh; transform: translateX(-50%);">触发事件详情
  9. </button>
  10. <!-- 弹层 -->
  11. <el-dialog title="事件详情" :visible.sync="eventDialog" customClass="customWidth" v-if="eventDialog"
  12. @close="cancelEventShow()">
  13. <div class="dia-event-info">
  14. <el-row>
  15. <!-- 左侧 -->
  16. <el-col :span="18" class="dia-left">
  17. <div ref="imageTofile" style="height: 75vh;">
  18. <!-- 应急预案 -->
  19. <div class="dia-left-top">
  20. <div class="dia-left-top-tit">应急预案</div>
  21. <div class="dia-left-top-carousel">
  22. <el-carousel height="30px" direction="vertical" :interval="2000">
  23. <el-carousel-item v-if="visuForestCloudYuAnBo!=null">
  24. <a :href="visuForestCloudYuAnBo.fileUrl">{{ visuForestCloudYuAnBo.reserveName }}</a>
  25. </el-carousel-item>
  26. <el-carousel-item v-else>
  27. <a href="#">暂未关联预案</a>
  28. </el-carousel-item>
  29. </el-carousel>
  30. </div>
  31. <el-button size="mini" type="primary" class="yatz_button" @click="showUpdateYjYuAn">预案调整
  32. </el-button>
  33. </div>
  34. <!-- 应急预案end -->
  35. <div class="fire-m">
  36. <el-button size="small" icon="el-icon-upload" @click="showEventdetailsdialog()">动态标绘</el-button>
  37. <el-button size="small" icon="el-icon-upload" @click="showheatPlotting()">火灾蔓延</el-button>
  38. </div>
  39. <!-- 地图 -->
  40. <supermapDialog1 ref="supermapDialog1"
  41. style="position: absolute; top:0;left: 0;"
  42. :mapDiv="'forestWarmSuperMap'"
  43. :mapSite="{zoom:16,doubleClickZoom:true,dragging:true,scrollWheelZoom:true}"
  44. :codes="['9fa5']"
  45. :isSideBySide="false"
  46. @preview="preview"/>
  47. <!-- 地图end -->
  48. </div>
  49. </el-col>
  50. <!-- 左侧end -->
  51. <!-- 右侧 -->
  52. <el-col :span="6" class="dia-right">
  53. <div class="e-right">
  54. <div class="forthis1" style="height: 785px;">
  55. <dv-border-box-7 backgroundColor="#040b1f" :color="['#0e7957', '#0da24c']"
  56. style="padding-bottom:1rem ;">
  57. <div class="i-list-con">
  58. <div class="this-con">
  59. <div class="z-info-list" style="margin-top: 0;">
  60. <el-timeline>
  61. <el-timeline-item color="#2bacf7" :timestamp="item.createTime"
  62. placement="top" v-for="(item,index) in eventLogList">
  63. <el-card style="width: 40vh">
  64. <div class="z-info-list-con">
  65. <div class="user-and-time flex-d">
  66. <span>{{ item.createName }}</span>
  67. <span v-if="eventLogList.length - 1 == index&&address!=null&&address!=''"><i
  68. class="el-icon-location"></i> {{ address }}</span>
  69. <span v-else></span>
  70. </div>
  71. <div class="z-info">
  72. <div class="this-con-list-info">
  73. {{ item.logContent }}
  74. </div>
  75. <div>
  76. <router-link to="#"
  77. @click.native="clickFile(itemfile.fileUrl,itemfile.fileName,itemfile.fileType)"
  78. v-for="(itemfile,indexfile) in item.fileVOs">
  79. <el-image :src="itemfile.fileUrl" v-if="itemfile.fileType=='image'"
  80. :preview-src-list="assetTypeAnImage(item.fileVOs)"
  81. style="width:3rem; height:3rem;margin: 2px;"
  82. :title="itemfile.fileName">
  83. </el-image>
  84. <img v-else-if="itemfile.fileType=='video'"
  85. style="width:3rem; height:3rem;margin: 2px;"
  86. :src="require('@/assets/fileTypeImage/mp4.png')"
  87. :title="itemfile.fileName">
  88. </img>
  89. <img v-else-if="itemfile.fileType=='word'"
  90. style="width:3rem; height:3rem;margin: 2px;"
  91. :src="require('@/assets/fileTypeImage/word.png')"
  92. :title="itemfile.fileName">
  93. </img>
  94. <img v-else-if="itemfile.fileType=='excel'"
  95. style="width:3rem; height:3rem;margin: 2px;"
  96. :src="require('@/assets/fileTypeImage/excel.png')"
  97. :title="itemfile.fileName">
  98. </img>
  99. <img v-else
  100. style="width:3rem; height:3rem;margin: 2px;"
  101. :src="require('@/assets/fileTypeImage/file.png')"
  102. :title="itemfile.fileName">
  103. </img>
  104. </router-link>
  105. </div>
  106. </div>
  107. </div>
  108. </el-card>
  109. </el-timeline-item>
  110. </el-timeline>
  111. </div>
  112. </div>
  113. </div>
  114. </dv-border-box-7>
  115. </div>
  116. </div>
  117. </el-col>
  118. <!-- 左侧end -->
  119. </el-row>
  120. </div>
  121. </el-dialog>
  122. </div>
  123. <vBottomMenu ref="bottomMenu"></vBottomMenu>
  124. <eventLogUpload ref="eventLogUpload"></eventLogUpload>
  125. <!-- 添加区域标记 -->
  126. <el-dialog title="火灾区域" :visible.sync="regionalFlagOpen" width="1000px">
  127. <areaSupermap ref="fireAreaSupermap" v-if="regionalFlagOpen" style="width: 100%;height:74vh"
  128. :mapDiv="'fireAreaSuperMap'" :mapSite="{doubleClickZoom:false}" :codes="['9fa5']"
  129. :isSideBySide="false" :showAreaLatLng="showAreaLatLng"></areaSupermap>
  130. </el-dialog>
  131. <!-- 图片,视频预览 -->
  132. <el-dialog title="视频预览" :visible.sync="showTcPlayer" width="40%" customClass="customWidthMp4">
  133. <TcPlayer ref="TcPlayer" :playVideo="playVideo" :widthHeigt="[100,100]"></TcPlayer>
  134. </el-dialog>
  135. <el-dialog :title="cameraTitle" :visible.sync="cameraVisible" v-if="cameraVisible" customClass="videoCustomWidth"
  136. @close="cancelEventLocationShow()">
  137. <div style="width:1020px;height:625px;position:relative;">
  138. <!--视频窗口展示---海康-->
  139. <div id="playWnd" class="playWnd" style="left: 0px; top: 0px;"></div>
  140. </div>
  141. </el-dialog>
  142. </div>
  143. </template>
  144. <script>
  145. import html2canvas from 'html2canvas'//截图组件
  146. import supermapDialog1 from '@/components/supermap' //超图
  147. import vheader from '@/components/v-header.vue' //一体化共用头部
  148. import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
  149. import eventLogUpload from '@/views/eventLogUpload.vue' //日志上传文件
  150. import areaSupermap from '@/components/supermap'//区域标记地图
  151. import TcPlayer from '@/components/TcPlayer' //视频预览
  152. import {
  153. getEventDetail,
  154. sendEventLog,
  155. listSJfl,
  156. listYuAn,
  157. selectByeventCode,
  158. updateCentereventTEventcatalogueStatus,
  159. sendTask,
  160. listResourceByWz,
  161. updateYjYuAn,
  162. uploadBase64,
  163. centereventtdepteventList,
  164. dutysystemList,
  165. dutysystemAdd,
  166. dutysystemRemove,
  167. userFeginlist
  168. } from '@/api/forest'
  169. import {
  170. treeselectAll as deptTreeselect
  171. } from '@/api/system/dept'
  172. import {
  173. getHaiKangVideoServer
  174. } from '@/api/haikang/haikang'
  175. import {
  176. hasConferences,
  177. createConferences, getUserInfo
  178. } from "@/api/meeting"
  179. import {
  180. getDahuaVideoServer
  181. } from '@/api/dahua/dahua'
  182. import DHWs from '@/dahua/lib/DHWs'
  183. export default {
  184. dicts: ['task_source'],
  185. watch: {
  186. filterText(val) {
  187. this.$refs.LiandongDept.filter(val)
  188. }
  189. },
  190. components: {
  191. vheader,
  192. vBottomMenu,
  193. supermapDialog1,
  194. eventLogUpload,
  195. areaSupermap,
  196. TcPlayer
  197. },
  198. data() {
  199. return {
  200. //海康
  201. cameraTitle: '',
  202. cameraCode:'',
  203. cameraVisible: false,
  204. initCount: 0,
  205. pubKey: '',
  206. oWebControl: null,
  207. playVideo: '',//视频预览地址
  208. showTcPlayer: false,//视频预览弹窗
  209. regionalFlagOpen: false,//区域标记
  210. //区域标记
  211. regionalFlagObj: {
  212. array: []
  213. },
  214. filterText: '',//树搜索
  215. /** *****************事件流程***************************/
  216. deptNameitem: '签收部门',
  217. sendDeptId: null,//签收部门/发起部门
  218. sendDeptName: null,//签收部门/发起部门
  219. sendEventType: null,//事件类型
  220. sendHuoZaiBanJing: null,//火灾报告
  221. sendGuanLianYuAn: null,//关联预案
  222. sendUserFegin: [],//联系人
  223. sendTaskSource: null,//任务来源
  224. sendTaskTitle: null,//联动标题
  225. sendTaskContent: null,//联动内容
  226. sendLianDongDept: [],//联动部门
  227. eventTypeList: [],//事件类型列表
  228. guanLianYuAnList: [],//关联预案列表
  229. userFeginList: [],//联系人列表
  230. deptOptions: [],//签收部门
  231. deptOptionsLiandong: [],//联动部门
  232. eventStatusButton: null,//流程按钮标识
  233. eventConfirmTitle: null,//弹窗标题 ---签收 误报 重复
  234. defaultProps: {
  235. children: 'children',
  236. label: 'label'
  237. },
  238. table1: {
  239. reportUnit: null,
  240. reportTimeY: null,
  241. reportTimeM: null,
  242. reportTimeD: null,
  243. forestFireLossTotal: null,
  244. fireLossTotal: null,
  245. forestArea: null,
  246. forestPrice: null,
  247. treesNumber: null,
  248. treesPrice: null,
  249. minorInjuriesNumber: null,
  250. minorInjuriesPrice: null,
  251. seriouslyInjuredNumber: null,
  252. seriouslyInjuredPrice: null,
  253. deathNumber: null,
  254. deathPrice: null,
  255. elseFireLossPrice: null,
  256. blazesPriceTotal: null,
  257. artificialDays: null,
  258. artificialPrice: null,
  259. vehicleNumber: null,
  260. carNumber: null,
  261. vehiclePrice: null,
  262. planeNumber: null,
  263. planePrice: null,
  264. elseBlazesPrice: null,
  265. note: null
  266. },
  267. table2: {
  268. fireTime: null,
  269. foundTime: null,
  270. blazesTime: null,
  271. address: null,
  272. firePlace: null,
  273. foundType: null,
  274. longitudeD: null,
  275. longitudeM: null,
  276. longitudeS: null,
  277. latitudeD: null,
  278. latitudeM: null,
  279. latitudeS: null,
  280. fireSource: null,
  281. fireType: null,
  282. fireLevel: null,
  283. areaTotal: null,
  284. forestLossAreaTotal: null,
  285. originalForestArea: null,
  286. artificialForestArea: null,
  287. peopleTotal: null,
  288. blazesTeamNumber: null,
  289. policeNumber: null,
  290. armyNumber: null,
  291. crowdNumber: null,
  292. windExtinguisher: null,
  293. secondTool: null,
  294. waterGun: null,
  295. elseThings: null,
  296. forestComposition: null,
  297. forestToken: null,
  298. porosities: null,
  299. weather: null,
  300. temperature: null,
  301. fireInsuranceLevel: null,
  302. windLevel: null,
  303. windDirection: null,
  304. commandUnit: null,
  305. commandName: null,
  306. commandPosition: null,
  307. surveyUnit: null,
  308. surveyName: null,
  309. surveyPosition: null,
  310. accidentName: null,
  311. accidentSex: null,
  312. accidentAge: null,
  313. accidentPosition: null,
  314. accidentUnit: null,
  315. dealType: null,
  316. dealNumber: null,
  317. criminalDealNumber: null,
  318. accidentDealSituation: null,
  319. responsibilityDealSituation: null,
  320. leadershipDealSituation: null,
  321. townForm: null,
  322. townAudit: null,
  323. cityForm: null,
  324. cityAudit: null
  325. },
  326. /** *****************事件流程***************************/
  327. showEventConfirm: false,//事件签收弹窗
  328. showGuanLianYuAnConfirm: false,//调整关联预案弹窗
  329. showEventConfirm_gd: false,//事件火险报告弹窗
  330. address: null,//事件上报地址
  331. eventStatusValue: null,//事件状态
  332. eventId: null,//事件ID
  333. eventType: null,//事件类型-大类
  334. dataStatus: null,//事件流程按钮
  335. deptId: null,//事件流程部门
  336. eventCode: null,
  337. eventName: null,
  338. longitude: null,
  339. latitude: null,
  340. eventLog: null,
  341. eventLogList: [],
  342. visuForestCloudYuAnBo: null,
  343. eventDialog: false,
  344. showResponsibilityDialog: false,//责任制弹窗
  345. depteventList: [],//责任制部门列表
  346. iconCurrentIndex: '',
  347. dutysystemDeptName: '',
  348. depteventId: '',
  349. dutysystemTableData: [],
  350. radius: 50,//资源搜索半径
  351. resourcesList: [
  352. {
  353. resourceName: '取水口',
  354. type: 'qsk',
  355. count: '1',
  356. icon: 'sj-icon-waterintake'
  357. },
  358. {
  359. resourceName: '水鹤',
  360. type: 'sh',
  361. icon: 'sj-icon-watercrane'
  362. },
  363. {
  364. resourceName: '消防栓',
  365. type: 'xfs',
  366. count: '1',
  367. icon: 'sj-icon-firehydrant'
  368. },
  369. {
  370. resourceName: '起降点',
  371. type: 'qjd',
  372. count: '1',
  373. icon: 'sj-icon-landing'
  374. },
  375. {
  376. resourceName: '检查站',
  377. type: 'jcz',
  378. count: '1',
  379. icon: 'sj-icon-checkpoint'
  380. },
  381. {
  382. resourceName: '防火队',
  383. type: 'fhd',
  384. count: '1',
  385. icon: 'sj-icon-fireteam'
  386. },
  387. {
  388. resourceName: '重点区域',
  389. type: 'zdqy',
  390. count: '1',
  391. icon: 'sj-icon-keyAreas'
  392. },
  393. {
  394. resourceName: '摄像头',
  395. type: 'sxt',
  396. count: '1',
  397. icon: 'sj-icon-jkzx'
  398. }
  399. ],
  400. resourcesListCheck: [],
  401. //文本域
  402. feedback: '',
  403. }
  404. },
  405. props: {
  406. calendarDay: null//首页日历选择
  407. },
  408. created() {
  409. /** ----------------------------------摄像头预览开始------------------------------------- */
  410. const DHWsInstance = DHWs.getInstance()
  411. this.ws = DHWsInstance
  412. /** ----------------------------------摄像头预览结束------------------------------------- */
  413. },
  414. methods: {
  415. /************************************责任制-开始****************************************/
  416. addLine: function() {//添加负责人行数
  417. var newValue = {
  418. id: '',//主键
  419. dept: '',//部门名称
  420. depteventId: '',//事件部门关联责任人
  421. name: '',//姓名
  422. post: '',//岗位
  423. telphone: ''//手机号
  424. }
  425. //添加新的行数
  426. this.dutysystemTableData.push(newValue)
  427. },
  428. handleDelete: function(index, row) {//删除负责人行数
  429. if (row.id != null && row.id != '') {
  430. let param = { ids: row.id }
  431. dutysystemRemove(param).then(res => {
  432. this.$message.success(`删除成功!`)
  433. this.dutysystemSelect(this.iconCurrentIndex, this.dutysystemDeptName, this.depteventId)
  434. })
  435. } else {
  436. this.dutysystemTableData.splice(index, 1)
  437. }
  438. },
  439. handleSave: function(index, rowData) {//保存负责人行数
  440. rowData.dept = this.dutysystemDeptName
  441. rowData.depteventId = this.depteventId
  442. dutysystemAdd(rowData).then(res => {
  443. this.$message.success(`保存成功!`)
  444. this.dutysystemSelect(this.iconCurrentIndex, this.dutysystemDeptName, this.depteventId)
  445. })
  446. },
  447. dutysystemSelect: function(deptId, dutysystemDeptName, depteventId) {//通过部门查询负责人信息
  448. this.dutysystemDeptName = dutysystemDeptName
  449. this.depteventId = depteventId
  450. this.iconCurrentIndex = deptId
  451. let param = { depteventId: depteventId }
  452. dutysystemList(param).then(res => {
  453. if (res.data != null && res.data.length > 0) {
  454. this.dutysystemTableData = res.data
  455. } else {
  456. this.dutysystemTableData = [{
  457. id: '',//主键
  458. dept: this.dutysystemDeptName,//部门名称
  459. depteventId: this.depteventId,//事件部门关联责任人
  460. name: '',//姓名
  461. post: '',//岗位
  462. telphone: ''//手机号
  463. }]
  464. }
  465. })
  466. },
  467. showResponsibility() {//弹出责任制弹窗
  468. let param = { eventCode: this.eventCode }
  469. centereventtdepteventList(param).then(res => {
  470. this.depteventList = res.data
  471. this.showResponsibilityDialog = true
  472. })
  473. },
  474. closeResponsibilityDialog() {//责任制关闭
  475. this.dutysystemTableData = []
  476. this.dutysystemDeptName = ''
  477. this.depteventId = ''
  478. this.iconCurrentIndex = ''
  479. this.showResponsibilityDialog = false
  480. },
  481. addResponsibilityDialog() {//责任制保存
  482. let reg_user = /^[\u4e00-\u9fa5]{2,4}$/; //2-4个中文字符正则
  483. let reg_tel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; //11位手机号码正则
  484. for(let i in this.dutysystemTableData){
  485. if(!reg_user.test(this.dutysystemTableData[i].name)){
  486. this.$message.error(`请输入正确姓名!`)
  487. return;
  488. }
  489. if(!reg_tel.test(this.dutysystemTableData[i].telphone)){
  490. this.$message.error(`请输入正确手机号码!`)
  491. return;
  492. }
  493. if(this.dutysystemTableData[i].id==null || this.dutysystemTableData[i].id==''){
  494. this.dutysystemTableData[i].dept = this.dutysystemDeptName;
  495. this.dutysystemTableData[i].depteventId = this.depteventId;
  496. }
  497. }
  498. const param = {centereventTDutySystemList:this.dutysystemTableData,eventCode:this.eventCode,eventName:this.eventName}
  499. dutysystemAdd(param).then(res => {
  500. this.$message.success(`保存成功!`)
  501. this.dutysystemSelect(this.iconCurrentIndex, this.dutysystemDeptName, this.depteventId);
  502. this.closeResponsibilityDialog();
  503. })
  504. },
  505. /************************************责任制-结束****************************************/
  506. showEventdetailsdialog() {
  507. this.eventDialog = false;
  508. this.$emit('showEventDialog', this.eventCode);
  509. },
  510. showheatPlotting() {
  511. if (!this.$refs.supermapDialog1.isheatPlotting) {
  512. this.$refs.supermapDialog1.showheatPlotting(this.latitude, this.longitude)
  513. } else {
  514. this.$refs.supermapDialog1.isheatPlotting = false
  515. }
  516. },
  517. showUpdateYjYuAn() {
  518. listYuAn().then(res => {
  519. //关联预案列表
  520. if (res.code == 200) {
  521. this.guanLianYuAnList = res.data
  522. this.showGuanLianYuAnConfirm = true
  523. }
  524. })
  525. },
  526. updateYjYuAn() {
  527. if(this.eventStatusValue=='forest_event_status_1'){
  528. this.$message.error(`未签收事件无法修改预案信息,请先签收!`)
  529. return
  530. }else{
  531. let param = { eventCode: this.eventCode, reserve: this.sendGuanLianYuAn }
  532. updateYjYuAn(param).then(res => {
  533. //事件调整关联预案
  534. if (res.code == 200) {
  535. this.$message.success(`预案调整成功!`)
  536. this.refreshEventDialog(this.eventCode)
  537. this.sendGuanLianYuAn = null
  538. this.showGuanLianYuAnConfirm = false
  539. }
  540. })
  541. }
  542. },
  543. listResourceByWz(type) {
  544. if (this.resourcesListCheck.indexOf(type) > -1) {
  545. this.resourcesListCheck.splice(this.resourcesListCheck.indexOf(type), 1)
  546. setTimeout(() => {
  547. this.$refs.supermapDialog1.clearMByType(type)
  548. }, 1000)
  549. } else {
  550. //搜索物资
  551. let param = { longitude: this.longitude, latitude: this.latitude, type: type, radius: this.radius }
  552. listResourceByWz(param).then(res => {
  553. if (res.data != null && res.data.length > 0) {
  554. this.resourcesListCheck.push(type)
  555. var markersList = []
  556. for (let i = 0; i < res.data.length; i++) {
  557. let markersMap = {
  558. lng: 124.59,
  559. lat: 43.02,
  560. icon: 'marker',
  561. bindPopupHtml: '',
  562. click: '',
  563. parameter: '',
  564. keepBindPopup: false,
  565. isAggregation: false
  566. }
  567. if (res.data.length > 50) {
  568. markersMap.isAggregation = true
  569. }
  570. if (type == 'qsk') {
  571. markersMap.icon = 'sj-icon-waterintake'
  572. } else if (type == 'sh') {
  573. markersMap.icon = 'sj-icon-watercrane'
  574. } else if (type == 'xfs') {
  575. markersMap.icon = 'sj-icon-firehydrant'
  576. } else if (type == 'qjd') {
  577. markersMap.icon = 'sj-icon-landing'
  578. } else if (type == 'jcz') {
  579. markersMap.icon = 'sj-icon-checkpoint'
  580. } else if (type == 'fhd') {
  581. markersMap.icon = 'sj-icon-fireteam'
  582. } else if (type == 'zdqy') {
  583. markersMap.icon = 'sj-icon-keyAreas'
  584. } else if (type == 'sxt') {
  585. markersMap.icon = 'camera'
  586. if (res.data[i].cameraCode != null) {
  587. markersMap.click = 'preview'
  588. // markersMap.parameter = res.data[i].cameraCode
  589. markersMap.parameter = {code:res.data.data[i].cameraCode,
  590. type:res.data.data[i].cameraFactory}
  591. }
  592. }
  593. markersMap.lng = res.data[i].longitude
  594. markersMap.lat = res.data[i].latitude
  595. markersMap.bindPopupHtml = '<div class="map-tip">' +
  596. '<span>' +
  597. ' <div class="d-l-con">' +
  598. ' <div class="d-l-l-text">' +
  599. ' <h4>资源名称:' + res.data[i].name + '</h4>' +
  600. ' </div>' +
  601. ' </div>' +
  602. ' </span>' +
  603. '</div>'
  604. markersList.push(markersMap)
  605. }
  606. setTimeout(() => {
  607. this.$refs.supermapDialog1.setMarkersByType(markersList, type)
  608. }, 1000)
  609. }
  610. })
  611. }
  612. },
  613. // 返回图片列表
  614. assetTypeAnImage(filePath) {
  615. let imageList = []
  616. if (filePath != null && filePath.length > 0) {
  617. for (let i = 0; i < filePath.length; i++) {
  618. if (filePath[i].fileType == 'image') {
  619. imageList.push(filePath[i].fileUrl)
  620. }
  621. }
  622. }
  623. return imageList
  624. },
  625. clickFile(fileUrl, fileName, fileType) {
  626. if (fileType == 'image') {
  627. return
  628. } else if (fileType == 'video') {
  629. this.showTcPlayer = true
  630. setTimeout(() => {
  631. this.playVideo = fileUrl
  632. }, 500)
  633. } else {
  634. let a = document.createElement('a')
  635. a.download = fileName
  636. a.href = fileUrl
  637. a.target = '_blank'
  638. a.click()
  639. }
  640. },
  641. setValue(event) {
  642. //签收选择部门
  643. this.sendDeptName = event.label
  644. this.sendDeptId = event.value
  645. },
  646. cancelEventConfirm() {
  647. //关闭事件签收弹窗
  648. this.sendDeptId = null
  649. this.sendDeptName = null
  650. this.sendUserFegin = []
  651. this.sendEventType = null
  652. this.sendHuoZaiBanJing = null
  653. this.sendGuanLianYuAn = null
  654. this.longitude = null
  655. this.latitude = null
  656. this.sendTaskTitle = null
  657. this.sendTaskSource = null
  658. this.sendTaskContent = null
  659. this.sendLianDongDept = []
  660. this.eventTypeList = []//事件类型列表
  661. this.guanLianYuAnList = []//关联预案列表
  662. this.deptOptions = []//签收部门
  663. this.deptOptionsLiandong = []//联动部门
  664. this.eventStatusButton = null//流程按钮标识
  665. this.eventConfirmTitle = null//流程按钮标识
  666. this.resourcesListCheck = []
  667. this.userFeginList = [] //联系人列表
  668. },
  669. cancelEventConfirm_send() {
  670. //清空表单数据
  671. this.sendDeptId = null
  672. this.sendDeptName = null
  673. this.sendUserFegin = []
  674. this.sendEventType = null
  675. this.sendHuoZaiBanJing = null
  676. this.sendGuanLianYuAn = null
  677. this.sendTaskTitle = null
  678. this.sendTaskSource = null
  679. this.sendTaskContent = null
  680. this.sendLianDongDept = []
  681. this.eventTypeList = []//事件类型列表
  682. this.guanLianYuAnList = []//关联预案列表
  683. this.deptOptions = []//签收部门
  684. this.deptOptionsLiandong = []//联动部门
  685. this.userFeginList = [] //联系人列表
  686. },
  687. cancelEventConfirm_gd() {
  688. //关闭事件火险报告窗口
  689. this.resetTable1()
  690. this.resetTable2()
  691. },
  692. cancelEventConfirm_mp4() {
  693. //关闭视频窗口
  694. this.playVideo = ''
  695. this.$refs.TcPlayer.destroyed()
  696. },
  697. resetTable1() {
  698. this.table1 = {
  699. reportUnit: null,
  700. reportTimeY: null,
  701. reportTimeM: null,
  702. reportTimeD: null,
  703. forestFireLossTotal: null,
  704. fireLossTotal: null,
  705. forestArea: null,
  706. forestPrice: null,
  707. treesNumber: null,
  708. treesPrice: null,
  709. minorInjuriesNumber: null,
  710. minorInjuriesPrice: null,
  711. seriouslyInjuredNumber: null,
  712. seriouslyInjuredPrice: null,
  713. deathNumber: null,
  714. deathPrice: null,
  715. elseFireLossPrice: null,
  716. blazesPriceTotal: null,
  717. artificialDays: null,
  718. artificialPrice: null,
  719. vehicleNumber: null,
  720. carNumber: null,
  721. vehiclePrice: null,
  722. planeNumber: null,
  723. planePrice: null,
  724. elseBlazesPrice: null,
  725. note: null
  726. }
  727. },
  728. resetTable2() {
  729. this.table2 = {
  730. fireTime: null,
  731. foundTime: null,
  732. blazesTime: null,
  733. address: null,
  734. firePlace: null,
  735. foundType: null,
  736. longitudeD: null,
  737. longitudeM: null,
  738. longitudeS: null,
  739. latitudeD: null,
  740. latitudeM: null,
  741. latitudeS: null,
  742. fireSource: null,
  743. fireType: null,
  744. fireLevel: null,
  745. areaTotal: null,
  746. forestLossAreaTotal: null,
  747. originalForestArea: null,
  748. artificialForestArea: null,
  749. peopleTotal: null,
  750. blazesTeamNumber: null,
  751. policeNumber: null,
  752. armyNumber: null,
  753. crowdNumber: null,
  754. windExtinguisher: null,
  755. secondTool: null,
  756. waterGun: null,
  757. elseThings: null,
  758. forestComposition: null,
  759. forestToken: null,
  760. porosities: null,
  761. weather: null,
  762. temperature: null,
  763. fireInsuranceLevel: null,
  764. windLevel: null,
  765. windDirection: null,
  766. commandUnit: null,
  767. commandName: null,
  768. commandPosition: null,
  769. surveyUnit: null,
  770. surveyName: null,
  771. surveyPosition: null,
  772. accidentName: null,
  773. accidentSex: null,
  774. accidentAge: null,
  775. accidentPosition: null,
  776. accidentUnit: null,
  777. dealType: null,
  778. dealNumber: null,
  779. criminalDealNumber: null,
  780. accidentDealSituation: null,
  781. responsibilityDealSituation: null,
  782. leadershipDealSituation: null,
  783. townForm: null,
  784. townAudit: null,
  785. cityForm: null,
  786. cityAudit: null
  787. }
  788. },
  789. /**
  790. * eventStatusValue 事件状态
  791. * isSend 是否办理
  792. * */
  793. async updateCentereventTEventcatalogueStatus(eventStatus, isSend) {
  794. this.eventStatusButton = eventStatus
  795. let that=this
  796. if (!isSend) {//事件弹窗
  797. if (eventStatus == 'qs') {//签收
  798. that.eventConfirmTitle = '事件签收'
  799. let param = { parentId: that.eventType }
  800. await listSJfl(param).then(res => {
  801. //事件类型
  802. if (res.code == 200) {
  803. that.eventTypeList = res.data
  804. }
  805. })
  806. await listYuAn().then(res => {
  807. //关联预案
  808. if (res.code == 200) {
  809. that.guanLianYuAnList = res.data
  810. }
  811. })
  812. await selectByeventCode(that.eventCode).then(res => {
  813. //签收部门
  814. if (res.code == 200) {
  815. that.deptOptions = res.data
  816. that.deptNameitem = '签收部门'
  817. }
  818. })
  819. that.showEventConfirm = true
  820. } else if (eventStatus == 'qr') {//确认
  821. that.eventConfirmTitle = '事件确认'
  822. } else if (eventStatus == 'wb') {//误报
  823. that.eventConfirmTitle = '事件误报'
  824. await selectByeventCode(that.eventCode).then(res => {
  825. //签收部门
  826. if (res.code == 200) {
  827. that.deptOptions = res.data
  828. that.deptNameitem = '签收部门'
  829. }
  830. })
  831. that.showEventConfirm = true
  832. } else if (eventStatus == 'cf') {//重复
  833. that.eventConfirmTitle = '事件重复'
  834. await selectByeventCode(that.eventCode).then(res => {
  835. //签收部门
  836. if (res.code == 200) {
  837. that.deptOptions = res.data
  838. that.deptNameitem = '签收部门'
  839. }
  840. })
  841. that.showEventConfirm = true
  842. } else if (eventStatus == 'ld') {//联动
  843. await selectByeventCode(that.eventCode).then(res => {
  844. //签收部门
  845. if (res.code == 200) {
  846. that.deptOptions = res.data
  847. that.deptNameitem = '发起部门'
  848. }
  849. })
  850. that.eventConfirmTitle = '事件联动'
  851. /** 查询部门树结构 */
  852. await deptTreeselect().then(response => {
  853. that.deptOptionsLiandong = response.data
  854. })
  855. that.showEventConfirm = true
  856. } else if (eventStatus == 'gd') {//归档填报
  857. that.showEventConfirm_gd = true
  858. }
  859. } else {//事件提交后台
  860. if (eventStatus == 'ld') {
  861. //事件处理流程--联动
  862. let array = that.$refs.LiandongDept.getCheckedNodes()
  863. if (array != null && array.length > 0) {
  864. for (let i = 0; i < array.length; i++) {
  865. that.sendLianDongDept.push({ 'taskDeptId': array[i].id, 'taskDeptName': array[i].label })
  866. }
  867. }
  868. if (that.sendTaskSource == '' || that.sendTaskSource == null) {
  869. that.$message.error(`请选择任务来源!`)
  870. return
  871. }
  872. if (that.sendTaskContent == '' || that.sendTaskContent == null) {
  873. that.$message.error(`请输入任务内容!`)
  874. return
  875. }
  876. if (that.sendTaskTitle == '' || that.sendTaskTitle == null) {
  877. that.$message.error(`请输入任务标题!`)
  878. return
  879. }
  880. if (that.sendLianDongDept == '' || that.sendLianDongDept == null) {
  881. that.$message.error(`请选择任务联动部门!`)
  882. return
  883. }
  884. if (that.sendDeptId == '' || that.sendDeptId == null || that.sendDeptName == '' || that.sendDeptName == null) {
  885. that.$message.error(`请选择任务发起部门!`)
  886. return
  887. }
  888. let param = {
  889. sendDeptId: that.sendDeptId,
  890. sendDept: that.sendDeptName,
  891. eventCode: that.eventCode,
  892. longitude: that.longitude,
  893. latitude: that.latitude,
  894. taskTitle: that.sendTaskTitle,
  895. taskSource: that.sendTaskSource,
  896. taskContent: that.sendTaskContent,
  897. taskDept: that.sendLianDongDept
  898. }
  899. sendTask(param).then(res => {
  900. if (res.code == 200) {
  901. that.$message.success(`联动发起成功!`)
  902. that.refreshEventDialog(that.eventCode)
  903. that.cancelEventConfirm_send()
  904. that.showEventConfirm = false
  905. }
  906. })
  907. } else if (eventStatus == 'gd') {
  908. let double = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/; //数字和两位小数
  909. let number = /^[+]{0,1}(\d+)$/g; //正整数
  910. if(!double.test(that.table2.areaTotal)){
  911. that.$message.error(`面积只能填写到小数后两位!`)
  912. return
  913. }
  914. if(!number.test(that.table2.peopleTotal)){
  915. that.$message.error(`人员请填写正整数!`)
  916. return
  917. }
  918. if(that.table2.forestComposition == '' || that.table2.forestComposition==null){
  919. that.$message.error(`林木组成不能为空!`)
  920. return
  921. }
  922. if(that.table2.forestToken == '' || that.table2.forestToken==null){
  923. that.$message.error(`林令不能为空!`)
  924. return
  925. }
  926. if(that.table2.porosities == '' || that.table2.porosities==null){
  927. that.$message.error(`疏密度不能为空!`)
  928. return
  929. }
  930. //事件处理流程--归档
  931. let param = {
  932. deptId: that.deptId,
  933. eventCode: that.eventCode,
  934. eventStatus: eventStatus,
  935. id: that.eventId,
  936. czlx: '',
  937. forestFireLoss: { eventId: that.eventCode, table1: that.table1 },
  938. fireInformation: { eventId: that.eventCode, table2: that.table2 },
  939. array: that.regionalFlagObj.array
  940. }
  941. updateCentereventTEventcatalogueStatus(param).then(res => {
  942. if (res.code == 200) {
  943. that.$message.success(`处理成功!`)
  944. that.refreshEvent(that.eventCode)
  945. that.cancelEventConfirm_send()
  946. that.showEventConfirm_gd = false
  947. that.$emit('getEventList', that.calendarDay,10,1)
  948. that.$emit('getSupermap', that.calendarDay)
  949. }
  950. })
  951. } else {
  952. if (eventStatus == 'qs' || eventStatus == 'wb' || eventStatus == 'cf') {
  953. if (that.sendDeptId == '' || that.sendDeptId == null || that.sendDeptName == '' || that.sendDeptName == null) {
  954. that.$message.error(`请选择部门!`)
  955. return
  956. }
  957. if (eventStatus == 'qs') {
  958. if (that.sendHuoZaiBanJing == '' || that.sendHuoZaiBanJing == null) {
  959. that.$message.error(`请输入火灾半径!`)
  960. return
  961. }
  962. if (that.sendEventType == '' || that.sendEventType == null) {
  963. that.$message.error(`请选择事件类型!`)
  964. return
  965. }
  966. }
  967. } else {
  968. that.sendDeptId = that.deptId
  969. }
  970. //事件处理流程
  971. let param = {
  972. phones:that.sendUserFegin,
  973. eventCode: that.eventCode,
  974. deptId: that.sendDeptId,
  975. deptName: that.sendDeptName,
  976. eventStatus: eventStatus,
  977. eventType: that.sendEventType,
  978. id: that.eventId,
  979. czlx: '',
  980. cameraCode: that.cameraCode,
  981. fireRadius: that.sendHuoZaiBanJing,
  982. reserve: that.sendGuanLianYuAn
  983. }
  984. updateCentereventTEventcatalogueStatus(param).then(res => {
  985. if (res.code == 200) {
  986. that.$message.success(`处理成功!`)
  987. that.refreshEvent(that.eventCode)
  988. that.cancelEventConfirm_send()
  989. that.showEventConfirm = false
  990. that.$emit('getEventList', that.calendarDay,10,1)
  991. that.$emit('getSupermap', that.calendarDay)
  992. }
  993. })
  994. }
  995. }
  996. },
  997. filterNode(value, data) {
  998. //树搜索
  999. if (!value) return true
  1000. return data.label.indexOf(value) !== -1
  1001. },
  1002. sendEventLog() {
  1003. //日志发送
  1004. let param = { eventCode: this.eventCode, logContent: this.eventLog,operation:"bus_oper_type_2",operationType:"log_oper_type_1"}
  1005. sendEventLog(param).then(res => {
  1006. if (res.code == 200) {
  1007. this.$message.success(`发送成功!`)
  1008. this.eventLog = null
  1009. this.refreshEventDialog(this.eventCode)
  1010. }
  1011. })
  1012. },
  1013. showEventLogUpload() {
  1014. this.$refs.eventLogUpload.eventLogUpload(this.eventCode)
  1015. },
  1016. cancelEventShow() {
  1017. this.dataStatus = null
  1018. this.deptId = null
  1019. console.log('关闭事件弹窗')
  1020. this.eventLogList = []
  1021. },
  1022. showEventDialog(eventCode) {
  1023. this.eventCode = eventCode
  1024. let that = this
  1025. //获取事件详情
  1026. getEventDetail({ eventCode: eventCode }).then(res => {
  1027. that.eventDialog = true
  1028. that.eventLogList = res.data.eventlog//日志列表
  1029. that.visuForestCloudYuAnBo = res.data.visuForestCloudYuAnBo//应急预案
  1030. that.address = res.data.catalogue.address
  1031. that.eventStatusValue = res.data.catalogue.eventStatusValue
  1032. that.eventType = res.data.catalogue.eventType
  1033. that.dataStatus = res.data.catalogue.dataStatus
  1034. that.deptId = res.data.catalogue.deptId
  1035. that.eventId = res.data.catalogue.id
  1036. that.longitude = res.data.catalogue.longitude
  1037. that.latitude = res.data.catalogue.latitude
  1038. that.eventName = res.data.catalogue.eventName
  1039. let markersMap = {
  1040. lng: 124.59,
  1041. lat: 43.02,
  1042. icon: 'marker',
  1043. bindPopupHtml: '',
  1044. click: '',
  1045. parameter: '',
  1046. keepBindPopup: false,
  1047. isAggregation: false,
  1048. radius: 0
  1049. }
  1050. if (res.data.catalogue.eventStatusValue == 'forest_event_status_1' && res.data.catalogue.urgeCount == 0) {
  1051. markersMap.icon = 'sj-icon-map-xinshangbao'
  1052. }
  1053. if (res.data.catalogue.eventStatusValue == 'forest_event_status_1' && res.data.catalogue.urgeCount > 0) {
  1054. markersMap.icon = 'sj-icon-map-cuiban'
  1055. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_2') {
  1056. markersMap.icon = 'sj-icon-map-qianshou'
  1057. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_5') {
  1058. markersMap.icon = 'sj-icon-map-banjie'
  1059. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_6') {
  1060. markersMap.icon = 'sj-icon-map-guidang'
  1061. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_7') {
  1062. markersMap.icon = 'sj-icon-map-queren'
  1063. }
  1064. markersMap.lng = res.data.catalogue.longitude
  1065. markersMap.lat = res.data.catalogue.latitude
  1066. if (res.data.eventdetail != null && res.data.eventdetail.length > 0 && res.data.eventdetail[0].fireRadius != null && res.data.eventdetail[0].fireRadius != '' && res.data.eventdetail[0].fireRadius > 0) {
  1067. markersMap.radius = res.data.eventdetail[0].fireRadius
  1068. }
  1069. setTimeout(() => {
  1070. that.$refs.supermapDialog1.dynamicPlotting()//弹出动态绘制窗口,防止截图位置改变
  1071. that.$refs.supermapDialog1.clearM(false)
  1072. that.$refs.supermapDialog1.setMarkersRadius([markersMap])
  1073. that.$refs.supermapDialog1.dropLocation10(res.data.catalogue.latitude, res.data.catalogue.longitude)
  1074. }, 2000)
  1075. if (res.data.centermonitorTCamera != null) {
  1076. that.cameraCode = res.data.centermonitorTCamera.cameraCode;
  1077. let markersMap = {
  1078. lng: 124.59,
  1079. lat: 43.02,
  1080. icon: 'camera',
  1081. bindPopupHtml: '',
  1082. click: 'preview',
  1083. parameter: {code:res.data.centermonitorTCamera.cameraCode,type:res.data.centermonitorTCamera.cameraFactory},
  1084. keepBindPopup: false,
  1085. isAggregation: false,
  1086. radius: 0
  1087. }
  1088. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1089. '<span>' +
  1090. ' <div class="d-l-con">' +
  1091. ' <div class="d-l-l-text">' +
  1092. ' <h4>摄像头名称:' + res.data.centermonitorTCamera.cameraName + '</h4>' +
  1093. ' </div>' +
  1094. ' </div>' +
  1095. ' </span>' +
  1096. '<span>' +
  1097. '</div>'
  1098. markersMap.lng = res.data.centermonitorTCamera.longitude
  1099. markersMap.lat = res.data.centermonitorTCamera.latitude
  1100. setTimeout(() => {
  1101. that.$refs.supermapDialog1.setMarkers([markersMap])
  1102. }, 2000)
  1103. }
  1104. })
  1105. },
  1106. refreshEvent(eventCode) {
  1107. this.eventCode = eventCode
  1108. let that = this
  1109. //刷新--事件详情
  1110. getEventDetail({ eventCode: eventCode }).then(res => {
  1111. that.eventDialog = true
  1112. that.eventLogList = res.data.eventlog
  1113. that.visuForestCloudYuAnBo = res.data.visuForestCloudYuAnBo//应急预案
  1114. that.address = res.data.catalogue.address
  1115. that.eventStatusValue = res.data.catalogue.eventStatusValue
  1116. that.eventType = res.data.catalogue.eventType
  1117. that.dataStatus = res.data.catalogue.dataStatus
  1118. that.deptId = res.data.catalogue.deptId
  1119. that.eventId = res.data.catalogue.id
  1120. that.latitude = res.data.catalogue.latitude
  1121. that.longitude = res.data.catalogue.longitude
  1122. that.eventName = res.data.catalogue.eventName
  1123. let markersMap = {
  1124. lng: 124.59,
  1125. lat: 43.02,
  1126. icon: 'marker',
  1127. bindPopupHtml: '',
  1128. click: '',
  1129. parameter: '',
  1130. keepBindPopup: false,
  1131. isAggregation: false,
  1132. radius: 0
  1133. }
  1134. if (res.data.catalogue.eventStatusValue == 'forest_event_status_1' && res.data.catalogue.urgeCount == 0) {
  1135. markersMap.icon = 'sj-icon-map-xinshangbao'
  1136. }
  1137. if (res.data.catalogue.eventStatusValue == 'forest_event_status_1' && res.data.catalogue.urgeCount > 0) {
  1138. markersMap.icon = 'sj-icon-map-cuiban'
  1139. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_2') {
  1140. markersMap.icon = 'sj-icon-map-qianshou'
  1141. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_5') {
  1142. markersMap.icon = 'sj-icon-map-banjie'
  1143. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_6') {
  1144. markersMap.icon = 'sj-icon-map-guidang'
  1145. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_7') {
  1146. markersMap.icon = 'sj-icon-map-queren'
  1147. }
  1148. markersMap.lng = res.data.catalogue.longitude
  1149. markersMap.lat = res.data.catalogue.latitude
  1150. if (res.data.eventdetail != null && res.data.eventdetail.length > 0 && res.data.eventdetail[0].fireRadius != null && res.data.eventdetail[0].fireRadius != '' && res.data.eventdetail[0].fireRadius > 0) {
  1151. markersMap.radius = res.data.eventdetail[0].fireRadius
  1152. }
  1153. setTimeout(() => {
  1154. that.$refs.supermapDialog1.clearM(false)
  1155. if (res.data.eventdetail != null && res.data.eventdetail.length > 0 && res.data.eventdetail[0].fireRadius != null && res.data.eventdetail[0].fireRadius != '' && res.data.eventdetail[0].fireRadius > 0) {
  1156. that.$refs.supermapDialog1.setMarkersRadius([markersMap])
  1157. } else {
  1158. that.$refs.supermapDialog1.setMarkers([markersMap])
  1159. }
  1160. that.$refs.supermapDialog1.dropLocation10(res.data.catalogue.latitude, res.data.catalogue.longitude)
  1161. }, 2000)
  1162. if (res.data.centermonitorTCamera != null) {
  1163. let markersMap = {
  1164. lng: 124.59,
  1165. lat: 43.02,
  1166. icon: 'camera',
  1167. bindPopupHtml: '',
  1168. click: 'preview',
  1169. parameter: {code:res.data.centermonitorTCamera.cameraCode,type:res.data.centermonitorTCamera.cameraFactory},
  1170. keepBindPopup: false,
  1171. isAggregation: false,
  1172. radius: 0
  1173. }
  1174. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1175. '<span>' +
  1176. ' <div class="d-l-con">' +
  1177. ' <div class="d-l-l-text">' +
  1178. ' <h4>摄像头名称:' + res.data.centermonitorTCamera.cameraName + '</h4>' +
  1179. ' </div>' +
  1180. ' </div>' +
  1181. ' </span>' +
  1182. '<span>' +
  1183. '</div>'
  1184. markersMap.lng = res.data.centermonitorTCamera.longitude
  1185. markersMap.lat = res.data.centermonitorTCamera.latitude
  1186. setTimeout(() => {
  1187. that.$refs.supermapDialog1.setMarkers([markersMap])
  1188. }, 2000)
  1189. }
  1190. })
  1191. },
  1192. refreshEventDialog(eventCode) {
  1193. //刷新--事件日志
  1194. getEventDetail({ eventCode: eventCode }).then(res => {
  1195. this.eventLogList = res.data.eventlog
  1196. this.visuForestCloudYuAnBo = res.data.visuForestCloudYuAnBo//应急预案
  1197. })
  1198. },
  1199. // 页面元素转图片
  1200. toImage() {
  1201. this.$message.success(`正在上传!请稍后...`)
  1202. // 手动创建一个 canvas 标签
  1203. const canvas = document.createElement('canvas')
  1204. // 获取父标签,意思是这个标签内的 DOM 元素生成图片
  1205. // imageTofile是给截图范围内的父级元素自定义的ref名称
  1206. // let canvasBox = this.$refs.imageTofile
  1207. let canvasBox = document.getElementById('forestWarmSuperMap')
  1208. let toolbar = document.getElementById('toolbar')
  1209. canvasBox.removeChild(toolbar)
  1210. // 获取父级的宽高
  1211. const width = parseInt(window.getComputedStyle(canvasBox).width)
  1212. const height = parseInt(window.getComputedStyle(canvasBox).height)
  1213. // 宽高 * 2 并放大 2 倍 是为了防止图片模糊
  1214. canvas.width = width * 2
  1215. canvas.height = height * 2
  1216. canvas.style.width = width + 'px'
  1217. canvas.style.height = height + 'px'
  1218. const context = canvas.getContext('2d')
  1219. context.scale(2, 2)
  1220. const options = {
  1221. backgroundColor: null,
  1222. canvas: canvas,
  1223. useCORS: true
  1224. }
  1225. html2canvas(canvasBox, options).then((canvas) => {
  1226. // toDataURL 图片格式转成 base64
  1227. let dataBase64 = canvas.toDataURL('image/png')
  1228. this.uploadBase64(dataBase64)
  1229. })
  1230. canvasBox.appendChild(toolbar)
  1231. },
  1232. uploadBase64(dataBase64) {
  1233. //事件详情截图直接上传日志
  1234. uploadBase64({ eventCode: this.eventCode, base64: dataBase64 }).then(res => {
  1235. if (res.code == 200) {
  1236. this.$message.success(`截图上传成功!`)
  1237. this.refreshEventDialog(this.eventCode)
  1238. }
  1239. })
  1240. },
  1241. regionalFlagAdd: function() {//火灾区域
  1242. this.regionalFlagObj.array = []
  1243. this.regionalFlagOpen = true
  1244. },
  1245. showAreaLatLng: function(latlng) {//获取火灾区域经纬度
  1246. this.regionalFlagObj.array = latlng
  1247. this.$modal.msgSuccess('获取坐标成功!')
  1248. },
  1249. /** ----------------------------------摄像头预览开始------------------------------------- */
  1250. alertLogin: function() {
  1251. this.$modal.msg('登录中....')
  1252. },
  1253. alertLoginSuccess: function() {
  1254. this.$modal.msgSuccess('登录成功!')
  1255. },
  1256. alertLoginFailed: function() {
  1257. this.$modal.msgError('登陆失败!')
  1258. },
  1259. alertReinstall: function() {
  1260. this.$modal.msgWarning('请重新安装客户端')
  1261. },
  1262. cancelEventLocationShow() {
  1263. if (this.oWebControl != null) {
  1264. this.oWebControl.JS_HideWnd() // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
  1265. this.oWebControl.JS_Disconnect().then(function() { // 断开与插件服务连接成功
  1266. },
  1267. function() { // 断开与插件服务连接失败
  1268. })
  1269. }
  1270. },
  1271. /** 预览按钮操作 */
  1272. preview(cameraParam) {
  1273. if(cameraParam.type=='1'){
  1274. getDahuaVideoServer().then(newResponse => {
  1275. console.log(newResponse)
  1276. this.ws.detectConnectQt().then(res => {
  1277. if (res) { // 连接客户端成功
  1278. this.alertLogin()
  1279. this.ws.login({
  1280. loginIp: newResponse.loginIp,
  1281. loginPort: newResponse.loginPort,
  1282. userName: newResponse.userName,
  1283. userPwd: newResponse.userPwd,
  1284. token: '',
  1285. https: 1
  1286. })
  1287. this.ws.on('loginState', (res) => {
  1288. this.isLogin = res
  1289. console.log('---res-----', res)
  1290. if (res) {
  1291. this.alertLoginSuccess()
  1292. this.activePanel = 'key2'
  1293. this.realTimeVideoDialog(cameraParam.code)
  1294. } else {
  1295. this.alertLoginFailed()
  1296. }
  1297. })
  1298. } else { // 连接客户端失败
  1299. this.alertReinstall()
  1300. }
  1301. })
  1302. })
  1303. }else if(cameraParam.type=='0'){
  1304. let that = this
  1305. that.cameraVisible = true
  1306. getHaiKangVideoServer({cameraCode:cameraParam.code}).then(newResponse => {
  1307. that.cameraTitle = '摄像头-'+newResponse.data.cameraName
  1308. that.initPlugin(newResponse.data.appkey,newResponse.data.loginIp,newResponse.data.secret,newResponse.data.loginPort)
  1309. setTimeout(function() {
  1310. that.playhk(newResponse.data.channelCode)
  1311. }, 5000)
  1312. })
  1313. }
  1314. },
  1315. realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
  1316. if (!this.isLogin) {
  1317. this.$Message.info('正在登陆客户端,请稍等......')
  1318. return false
  1319. }
  1320. this.ws.openVideo(cameraParams)
  1321. },
  1322. /** ----------------------------------摄像头预览结束------------------------------------- */
  1323. /** ----------------------------------海康摄像头预览开始------------------------------------- */
  1324. // 创建播放实例
  1325. initPlugin(newappkey, newloginIp, newsecret, newloginPort) {
  1326. let that = this
  1327. that.oWebControl = new WebControl({
  1328. szPluginContainer: 'playWnd', // 指定容器id
  1329. iServicePortStart: 15900, // 指定起止端口号,建议使用该值
  1330. iServicePortEnd: 15909,
  1331. szClassId: '23BF3B0A-2C56-4D97-9C03-0CB103AA8F11', // 用于IE10使用ActiveX的clsid
  1332. cbConnectSuccess: function() { // 创建WebControl实例成功
  1333. that.oWebControl.JS_StartService('window', { // WebControl实例创建成功后需要启动服务
  1334. dllPath: './VideoPluginConnect.dll' // 值"./VideoPluginConnect.dll"写死
  1335. }).then(function() { // 启动插件服务成功
  1336. that.oWebControl.JS_SetWindowControlCallback({ // 设置消息回调
  1337. cbIntegrationCallBack: cbIntegrationCallBack
  1338. })
  1339. that.oWebControl.JS_CreateWnd('playWnd', 1020, 600).then(function() { //JS_CreateWnd创建视频播放窗口,宽高可设定
  1340. that.init(newappkey, newloginIp, newsecret, newloginPort) // 创建播放实例成功后初始化
  1341. })
  1342. }, function() { // 启动插件服务失败
  1343. })
  1344. },
  1345. cbConnectError: function() { // 创建WebControl实例失败
  1346. that.oWebControl = null
  1347. $('#playWnd').html('插件未启动,正在尝试启动,请稍候...<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
  1348. WebControl.JS_WakeUp('VideoWebPlugin://') // 程序未启动时执行error函数,采用wakeup来启动程序
  1349. that.initCount++
  1350. if (that.initCount < 3) {
  1351. setTimeout(function() {
  1352. that.initPlugin(newappkey, newloginIp, newsecret, newloginPort)
  1353. }, 3000)
  1354. } else {
  1355. $('#playWnd').html('插件启动失败,请检查插件是否安装!<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
  1356. }
  1357. },
  1358. cbConnectClose: function(bNormalClose) {
  1359. // 异常断开:bNormalClose = false
  1360. // JS_Disconnect正常断开:bNormalClose = true
  1361. that.oWebControl = null
  1362. }
  1363. })
  1364. },
  1365. //播放海康摄像头
  1366. playhk(channelCode) {
  1367. var cameraIndexCode = channelCode //获取输入的监控点编号值,必填
  1368. var streamMode = 0 //主子码流标识:0-主码流,1-子码流
  1369. var transMode = 1 //传输协议:0-UDP,1-TCP
  1370. var gpuMode = 0 //是否启用GPU硬解,0-不启用,1-启用
  1371. var wndId = -1 //播放窗口序号(在2x2以上布局下可指定播放窗口)
  1372. cameraIndexCode = cameraIndexCode.replace(/(^\s*)/g, '')
  1373. cameraIndexCode = cameraIndexCode.replace(/(\s*$)/g, '')
  1374. this.oWebControl.JS_RequestInterface({
  1375. funcName: 'startPreview',
  1376. argument: JSON.stringify({
  1377. cameraIndexCode: cameraIndexCode, //监控点编号
  1378. streamMode: streamMode, //主子码流标识
  1379. transMode: transMode, //传输协议
  1380. gpuMode: gpuMode, //是否开启GPU硬解
  1381. wndId: wndId //可指定播放窗口
  1382. })
  1383. })
  1384. },
  1385. //初始化
  1386. init(newappkey, newloginIp, newsecret, newloginPort) {
  1387. let that = this
  1388. that.getPubKey(function() {
  1389. ////////////////////////////////// 请自行修改以下变量值 ////////////////////////////////////
  1390. var appkey = newappkey //综合安防管理平台提供的appkey,必填
  1391. var secret = that.setEncrypt(newsecret) //综合安防管理平台提供的secret,必填
  1392. var ip = newloginIp //综合安防管理平台IP地址,必填
  1393. var playMode = 0 //初始播放模式:0-预览,1-回放
  1394. var port = Number(newloginPort) //综合安防管理平台端口,若启用HTTPS协议,默认443
  1395. var snapDir = 'D:\\SnapDir' //抓图存储路径
  1396. var videoDir = 'D:\\VideoDir' //紧急录像或录像剪辑存储路径
  1397. var layout = '1x1' //playMode指定模式的布局
  1398. var enableHTTPS = 1 //是否启用HTTPS协议与综合安防管理平台交互,这里总是填1
  1399. var encryptedFields = 'secret' //加密字段,默认加密领域为secret
  1400. var showToolbar = 1 //是否显示工具栏,0-不显示,非0-显示
  1401. var showSmart = 1 //是否显示智能信息(如配置移动侦测后画面上的线框),0-不显示,非0-显示
  1402. var buttonIDs = '0,16,256,257,258,259,260,512,513,514,515,516,517,768,769' //自定义工具条按钮
  1403. ////////////////////////////////// 请自行修改以上变量值 ////////////////////////////////////
  1404. that.oWebControl.JS_RequestInterface({
  1405. funcName: 'init',
  1406. argument: JSON.stringify({
  1407. appkey: appkey, //API网关提供的appkey
  1408. secret: secret, //API网关提供的secret
  1409. ip: ip, //API网关IP地址
  1410. playMode: playMode, //播放模式(决定显示预览还是回放界面)
  1411. port: port, //端口
  1412. snapDir: snapDir, //抓图存储路径
  1413. videoDir: videoDir, //紧急录像或录像剪辑存储路径
  1414. layout: layout, //布局
  1415. enableHTTPS: enableHTTPS, //是否启用HTTPS协议
  1416. encryptedFields: encryptedFields, //加密字段
  1417. showToolbar: showToolbar, //是否显示工具栏
  1418. showSmart: showSmart, //是否显示智能信息
  1419. buttonIDs: buttonIDs //自定义工具条按钮
  1420. })
  1421. }).then(function(oData) {
  1422. that.oWebControl.JS_Resize(1020, 600) // 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
  1423. })
  1424. })
  1425. },
  1426. //获取公钥
  1427. getPubKey(callback) {
  1428. let that = this
  1429. that.oWebControl.JS_RequestInterface({
  1430. funcName: 'getRSAPubKey',
  1431. argument: JSON.stringify({
  1432. keyLength: 1024
  1433. })
  1434. }).then(function(oData) {
  1435. console.log(oData)
  1436. if (oData.responseMsg.data) {
  1437. that.pubKey = oData.responseMsg.data
  1438. callback()
  1439. }
  1440. })
  1441. },
  1442. //RSA加密
  1443. setEncrypt(value) {
  1444. var encrypt = new JSEncrypt()
  1445. encrypt.setPublicKey(this.pubKey)
  1446. return encrypt.encrypt(value)
  1447. },
  1448. //加入华为视频会议方法
  1449. joinMeeting(){
  1450. let eventId = this.eventId;
  1451. let subject = "视频会议";
  1452. let nickName;
  1453. getUserInfo().then(res => {
  1454. nickName = res.data.nickName;
  1455. });
  1456. hasConferences(eventId).then(res => {
  1457. let data = res.data;
  1458. /**如果没有正在开启的会议会返回空对象**/
  1459. if(res.code == 200 && Object.keys(data).length === 0){
  1460. createConferences(eventId,subject).then(res => {
  1461. let data = res.data;
  1462. if(res.code == 200){
  1463. window.open("/hwMeeting/meeting.html?nickName="+encodeURI(encodeURI(nickName))+"&conferenceID="+data.conferenceID+"&password="+data.password);
  1464. }
  1465. });
  1466. }else{
  1467. window.open("/hwMeeting/meeting.html?nickName="+encodeURI(encodeURI(nickName))+"&conferenceID="+data.conferenceID+"&password="+data.password);
  1468. }
  1469. });
  1470. }
  1471. /** ----------------------------------海康摄像头预览结束------------------------------------- */
  1472. }
  1473. }
  1474. // 推送消息
  1475. function cbIntegrationCallBack(oData) {
  1476. console.log(JSON.stringify(oData.responseMsg))
  1477. }
  1478. </script>
  1479. <style lang="scss" scoped>
  1480. @import '@/assets/styles/base.scss';
  1481. //弹层样式
  1482. //.customWidthMp4 {
  1483. // width: 70px !important;
  1484. // height: 70px !important;
  1485. //}
  1486. .tree-border {
  1487. border: 1px $barBorder;
  1488. }
  1489. button {
  1490. padding: .5rem;
  1491. }
  1492. /** 火灾报告**/
  1493. //@font-face {
  1494. // font-family: 'fontnameRegular';
  1495. // src: url('../../../../assets/styles/FZYTJW_0.TTF');
  1496. //}
  1497. body,
  1498. html,
  1499. * {
  1500. padding: 0px;
  1501. margin: 0px;
  1502. font-family: "fontnameRegular";
  1503. }
  1504. .table-container {
  1505. width: 100%;
  1506. }
  1507. .txt_right {
  1508. text-align: right !important;
  1509. }
  1510. .txt_left {
  1511. text-align: left !important;
  1512. }
  1513. table {
  1514. border-spacing: 0;
  1515. border-collapse: collapse;
  1516. width: 99%;
  1517. margin: 0 auto;
  1518. color: $inBlue;
  1519. }
  1520. table input {
  1521. font-size: 1rem;
  1522. border: 0px;
  1523. outline: 0px;
  1524. font-family: "微软雅黑";
  1525. background: none;
  1526. color: $inBlue;
  1527. }
  1528. table th input:hover {
  1529. background: $eventBG;
  1530. }
  1531. table thead th {
  1532. font-size: 1rem;
  1533. font-family: "宋体";
  1534. height: 2rem;
  1535. border-top: 0px;
  1536. border-left: 0px;
  1537. border-right: 0px;
  1538. outline: 0px;
  1539. }
  1540. table tr td {
  1541. font-size: 1rem;
  1542. font-family: "fontnameRegular";
  1543. height: 2rem;
  1544. border: 1px $searchBorder;
  1545. text-align: center;
  1546. }
  1547. .font1 {
  1548. font-size: 1.7rem;
  1549. font-weight: bolder;
  1550. }
  1551. .border0 {
  1552. width: 100% !important;
  1553. }
  1554. .border0 tr td {
  1555. border: 0px !important;
  1556. }
  1557. table tr td input {
  1558. width: 100%;
  1559. /* display: inline-block;*/
  1560. outline: 0px;
  1561. text-align: left;
  1562. height: 94%;
  1563. color: $inBlue;
  1564. background: none;
  1565. float: left;
  1566. padding: 0 .5rem;
  1567. }
  1568. table tr td input:hover {
  1569. background: $eventBG;
  1570. }
  1571. .int_tr td input {
  1572. text-align: center !important;
  1573. }
  1574. .table2 tr th {
  1575. font-size: 1.7rem;
  1576. padding: .5rem 0;
  1577. font-family: 'fontnameRegular';
  1578. }
  1579. .table2 tr td {
  1580. font-size: 1rem;
  1581. }
  1582. .table2 tr td select {
  1583. border: 0px !important;
  1584. outline: 0px;
  1585. width: 100%;
  1586. font-family: "微软雅黑";
  1587. font-size: 1rem;
  1588. padding-left: 1%;
  1589. color: $inBlue;
  1590. background: none;
  1591. }
  1592. .table2 tr td select:hover {
  1593. background: $eventBG;
  1594. }
  1595. .table2 tr td select option {
  1596. font-size: 1rem;
  1597. font-family: "微软雅黑";
  1598. }
  1599. .border_l0 {
  1600. // border-right: 1px solid #ececec !important;
  1601. }
  1602. .table2 tr td textarea {
  1603. border: 0px !important;
  1604. outline: 0px;
  1605. width: 98%;
  1606. padding: .5rem;
  1607. font-size: 1rem;
  1608. resize: none;
  1609. background: none;
  1610. color: $inBlue;
  1611. }
  1612. .table2 tr td textarea:hover {
  1613. background: $eventBG;
  1614. }
  1615. .tr_border td {
  1616. border-right: 0px !important;
  1617. border-left: 0px !important;
  1618. border-bottom: 0px !important;
  1619. font-size: 15px;
  1620. }
  1621. .btm-btn-group {
  1622. padding: 1rem 0;
  1623. width: 100%;
  1624. display: flex;
  1625. button {
  1626. padding: .5rem 2rem;
  1627. }
  1628. }
  1629. // 20220928
  1630. .yatz_button {
  1631. padding: 0.5rem 0.5rem;
  1632. color: #409EFF;
  1633. background: none;
  1634. border-color: #409EFF;
  1635. }
  1636. .yatz_button:hover {
  1637. color: #fff;
  1638. background: #409EFF;
  1639. border-color: #409EFF;
  1640. }
  1641. .fr_button {
  1642. float: right;
  1643. padding: 0.5rem 1.5rem;
  1644. }
  1645. .bottom {
  1646. width: 100%;
  1647. height: calc(100% - 80px);
  1648. display: flex;
  1649. .bottomLeft {
  1650. width: 288px;
  1651. height: 500px;
  1652. overflow-y: auto;
  1653. .leftItem {
  1654. width: 100%;
  1655. height: 50px;
  1656. line-height: 50px;
  1657. text-align: center;
  1658. cursor: pointer;
  1659. }
  1660. }
  1661. .bottomRight {
  1662. width: calc(100% - 288px);
  1663. height: 500px;
  1664. box-sizing: border-box;
  1665. padding: 36px 36px 0 36px;
  1666. overflow-y: auto;
  1667. .bottomRightContent {
  1668. width: 100%;
  1669. box-sizing: border-box;
  1670. padding-bottom: 36px;
  1671. .bottomRightContentHead {
  1672. height: 25px;
  1673. font-family: PingFang SC;
  1674. font-style: normal;
  1675. font-weight: 600;
  1676. font-size: 24px;
  1677. line-height: 25px;
  1678. text-transform: capitalize;
  1679. color: rgba(0, 0, 0, 0.85);
  1680. margin-bottom: 32px;
  1681. }
  1682. .bottomRightContentBody {
  1683. .el-col {
  1684. position: relative;
  1685. margin-bottom: 18px;
  1686. .circle {
  1687. display: inline-block;
  1688. width: 6px;
  1689. height: 6px;
  1690. background: #4677f6;
  1691. border-radius: 50%;
  1692. position: absolute;
  1693. top: 8px;
  1694. left: 0;
  1695. }
  1696. .word {
  1697. margin-left: 12px;
  1698. font-family: PingFang SC;
  1699. font-style: normal;
  1700. font-weight: normal;
  1701. font-size: 14px;
  1702. color: #4677f6;
  1703. cursor: pointer;
  1704. }
  1705. .word:hover {
  1706. text-decoration: underline;
  1707. }
  1708. .topPlace {
  1709. position: absolute;
  1710. top: 1px;
  1711. margin-left: 8px;
  1712. }
  1713. }
  1714. }
  1715. .bottomRightContentFooter {
  1716. height: 1px;
  1717. width: 100%;
  1718. margin-top: 14px;
  1719. }
  1720. }
  1721. }
  1722. }
  1723. </style>