firespread.vue 66 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791
  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">
  55. <dv-border-box-7 backgroundColor="#040b1f" :color="['#0c4b53', '#18caca']"
  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: 0,//火灾报告
  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 = 0
  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 = 0
  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.sendEventType == '' || that.sendEventType == null) {
  959. that.$message.error(`请选择事件类型!`)
  960. return
  961. }
  962. }
  963. } else {
  964. that.sendDeptId = that.deptId
  965. }
  966. //事件处理流程
  967. let param = {
  968. phones:that.sendUserFegin,
  969. eventCode: that.eventCode,
  970. deptId: that.sendDeptId,
  971. deptName: that.sendDeptName,
  972. eventStatus: eventStatus,
  973. eventType: that.sendEventType,
  974. id: that.eventId,
  975. czlx: '',
  976. cameraCode: that.cameraCode,
  977. fireRadius: that.sendHuoZaiBanJing,
  978. reserve: that.sendGuanLianYuAn
  979. }
  980. updateCentereventTEventcatalogueStatus(param).then(res => {
  981. if (res.code == 200) {
  982. that.$message.success(`处理成功!`)
  983. that.refreshEvent(that.eventCode)
  984. that.cancelEventConfirm_send()
  985. that.showEventConfirm = false
  986. that.$emit('getEventList', that.calendarDay,10,1)
  987. that.$emit('getSupermap', that.calendarDay)
  988. }
  989. })
  990. }
  991. }
  992. },
  993. filterNode(value, data) {
  994. //树搜索
  995. if (!value) return true
  996. return data.label.indexOf(value) !== -1
  997. },
  998. sendEventLog() {
  999. //日志发送
  1000. let param = { eventCode: this.eventCode, logContent: this.eventLog,operation:"bus_oper_type_2",operationType:"log_oper_type_1"}
  1001. sendEventLog(param).then(res => {
  1002. if (res.code == 200) {
  1003. this.$message.success(`发送成功!`)
  1004. this.eventLog = null
  1005. this.refreshEventDialog(this.eventCode)
  1006. }
  1007. })
  1008. },
  1009. showEventLogUpload() {
  1010. this.$refs.eventLogUpload.eventLogUpload(this.eventCode)
  1011. },
  1012. cancelEventShow() {
  1013. this.dataStatus = null
  1014. this.deptId = null
  1015. console.log('关闭事件弹窗')
  1016. this.eventLogList = []
  1017. },
  1018. showEventDialog(eventCode) {
  1019. this.eventCode = eventCode
  1020. let that = this
  1021. //获取事件详情
  1022. getEventDetail({ eventCode: eventCode }).then(res => {
  1023. that.eventDialog = true
  1024. that.eventLogList = res.data.eventlog//日志列表
  1025. that.visuForestCloudYuAnBo = res.data.visuForestCloudYuAnBo//应急预案
  1026. that.address = res.data.catalogue.address
  1027. that.eventStatusValue = res.data.catalogue.eventStatusValue
  1028. that.eventType = res.data.catalogue.eventType
  1029. that.dataStatus = res.data.catalogue.dataStatus
  1030. that.deptId = res.data.catalogue.deptId
  1031. that.eventId = res.data.catalogue.id
  1032. that.longitude = res.data.catalogue.longitude
  1033. that.latitude = res.data.catalogue.latitude
  1034. that.eventName = res.data.catalogue.eventName
  1035. let markersMap = {
  1036. lng: 124.59,
  1037. lat: 43.02,
  1038. icon: 'marker',
  1039. bindPopupHtml: '',
  1040. click: '',
  1041. parameter: '',
  1042. keepBindPopup: false,
  1043. isAggregation: false,
  1044. radius: 0
  1045. }
  1046. if (res.data.catalogue.eventStatusValue == 'forest_event_status_1' && res.data.catalogue.urgeCount == 0) {
  1047. markersMap.icon = 'sj-icon-map-xinshangbao'
  1048. }
  1049. if (res.data.catalogue.eventStatusValue == 'forest_event_status_1' && res.data.catalogue.urgeCount > 0) {
  1050. markersMap.icon = 'sj-icon-map-cuiban'
  1051. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_2') {
  1052. markersMap.icon = 'sj-icon-map-qianshou'
  1053. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_5') {
  1054. markersMap.icon = 'sj-icon-map-banjie'
  1055. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_6') {
  1056. markersMap.icon = 'sj-icon-map-guidang'
  1057. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_7') {
  1058. markersMap.icon = 'sj-icon-map-queren'
  1059. }
  1060. markersMap.lng = res.data.catalogue.longitude
  1061. markersMap.lat = res.data.catalogue.latitude
  1062. 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) {
  1063. markersMap.radius = res.data.eventdetail[0].fireRadius
  1064. }
  1065. setTimeout(() => {
  1066. that.$refs.supermapDialog1.dynamicPlotting()//弹出动态绘制窗口,防止截图位置改变
  1067. that.$refs.supermapDialog1.clearM(false)
  1068. that.$refs.supermapDialog1.setMarkersRadius([markersMap])
  1069. that.$refs.supermapDialog1.dropLocation10(res.data.catalogue.latitude, res.data.catalogue.longitude)
  1070. }, 2000)
  1071. if (res.data.centermonitorTCamera != null) {
  1072. that.cameraCode = res.data.centermonitorTCamera.cameraCode;
  1073. let markersMap = {
  1074. lng: 124.59,
  1075. lat: 43.02,
  1076. icon: 'camera',
  1077. bindPopupHtml: '',
  1078. click: 'preview',
  1079. parameter: {code:res.data.centermonitorTCamera.cameraCode,type:res.data.centermonitorTCamera.cameraFactory},
  1080. keepBindPopup: false,
  1081. isAggregation: false,
  1082. radius: 0
  1083. }
  1084. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1085. '<span>' +
  1086. ' <div class="d-l-con">' +
  1087. ' <div class="d-l-l-text">' +
  1088. ' <h4>摄像头名称:' + res.data.centermonitorTCamera.cameraName + '</h4>' +
  1089. ' </div>' +
  1090. ' </div>' +
  1091. ' </span>' +
  1092. '<span>' +
  1093. '</div>'
  1094. markersMap.lng = res.data.centermonitorTCamera.longitude
  1095. markersMap.lat = res.data.centermonitorTCamera.latitude
  1096. setTimeout(() => {
  1097. that.$refs.supermapDialog1.setMarkers([markersMap])
  1098. }, 2000)
  1099. }
  1100. })
  1101. },
  1102. refreshEvent(eventCode) {
  1103. this.eventCode = eventCode
  1104. let that = this
  1105. //刷新--事件详情
  1106. getEventDetail({ eventCode: eventCode }).then(res => {
  1107. that.eventDialog = true
  1108. that.eventLogList = res.data.eventlog
  1109. that.visuForestCloudYuAnBo = res.data.visuForestCloudYuAnBo//应急预案
  1110. that.address = res.data.catalogue.address
  1111. that.eventStatusValue = res.data.catalogue.eventStatusValue
  1112. that.eventType = res.data.catalogue.eventType
  1113. that.dataStatus = res.data.catalogue.dataStatus
  1114. that.deptId = res.data.catalogue.deptId
  1115. that.eventId = res.data.catalogue.id
  1116. that.latitude = res.data.catalogue.latitude
  1117. that.longitude = res.data.catalogue.longitude
  1118. that.eventName = res.data.catalogue.eventName
  1119. let markersMap = {
  1120. lng: 124.59,
  1121. lat: 43.02,
  1122. icon: 'marker',
  1123. bindPopupHtml: '',
  1124. click: '',
  1125. parameter: '',
  1126. keepBindPopup: false,
  1127. isAggregation: false,
  1128. radius: 0
  1129. }
  1130. if (res.data.catalogue.eventStatusValue == 'forest_event_status_1' && res.data.catalogue.urgeCount == 0) {
  1131. markersMap.icon = 'sj-icon-map-xinshangbao'
  1132. }
  1133. if (res.data.catalogue.eventStatusValue == 'forest_event_status_1' && res.data.catalogue.urgeCount > 0) {
  1134. markersMap.icon = 'sj-icon-map-cuiban'
  1135. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_2') {
  1136. markersMap.icon = 'sj-icon-map-qianshou'
  1137. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_5') {
  1138. markersMap.icon = 'sj-icon-map-banjie'
  1139. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_6') {
  1140. markersMap.icon = 'sj-icon-map-guidang'
  1141. } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_7') {
  1142. markersMap.icon = 'sj-icon-map-queren'
  1143. }
  1144. markersMap.lng = res.data.catalogue.longitude
  1145. markersMap.lat = res.data.catalogue.latitude
  1146. 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) {
  1147. markersMap.radius = res.data.eventdetail[0].fireRadius
  1148. }
  1149. setTimeout(() => {
  1150. that.$refs.supermapDialog1.clearM(false)
  1151. 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) {
  1152. that.$refs.supermapDialog1.setMarkersRadius([markersMap])
  1153. } else {
  1154. that.$refs.supermapDialog1.setMarkers([markersMap])
  1155. }
  1156. that.$refs.supermapDialog1.dropLocation10(res.data.catalogue.latitude, res.data.catalogue.longitude)
  1157. }, 2000)
  1158. if (res.data.centermonitorTCamera != null) {
  1159. let markersMap = {
  1160. lng: 124.59,
  1161. lat: 43.02,
  1162. icon: 'camera',
  1163. bindPopupHtml: '',
  1164. click: 'preview',
  1165. parameter: {code:res.data.centermonitorTCamera.cameraCode,type:res.data.centermonitorTCamera.cameraFactory},
  1166. keepBindPopup: false,
  1167. isAggregation: false,
  1168. radius: 0
  1169. }
  1170. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1171. '<span>' +
  1172. ' <div class="d-l-con">' +
  1173. ' <div class="d-l-l-text">' +
  1174. ' <h4>摄像头名称:' + res.data.centermonitorTCamera.cameraName + '</h4>' +
  1175. ' </div>' +
  1176. ' </div>' +
  1177. ' </span>' +
  1178. '<span>' +
  1179. '</div>'
  1180. markersMap.lng = res.data.centermonitorTCamera.longitude
  1181. markersMap.lat = res.data.centermonitorTCamera.latitude
  1182. setTimeout(() => {
  1183. that.$refs.supermapDialog1.setMarkers([markersMap])
  1184. }, 2000)
  1185. }
  1186. })
  1187. },
  1188. refreshEventDialog(eventCode) {
  1189. //刷新--事件日志
  1190. getEventDetail({ eventCode: eventCode }).then(res => {
  1191. this.eventLogList = res.data.eventlog
  1192. this.visuForestCloudYuAnBo = res.data.visuForestCloudYuAnBo//应急预案
  1193. })
  1194. },
  1195. // 页面元素转图片
  1196. toImage() {
  1197. this.$message.success(`正在上传!请稍后...`)
  1198. // 手动创建一个 canvas 标签
  1199. const canvas = document.createElement('canvas')
  1200. // 获取父标签,意思是这个标签内的 DOM 元素生成图片
  1201. // imageTofile是给截图范围内的父级元素自定义的ref名称
  1202. // let canvasBox = this.$refs.imageTofile
  1203. let canvasBox = document.getElementById('forestWarmSuperMap')
  1204. let toolbar = document.getElementById('toolbar')
  1205. canvasBox.removeChild(toolbar)
  1206. // 获取父级的宽高
  1207. const width = parseInt(window.getComputedStyle(canvasBox).width)
  1208. const height = parseInt(window.getComputedStyle(canvasBox).height)
  1209. // 宽高 * 2 并放大 2 倍 是为了防止图片模糊
  1210. canvas.width = width * 2
  1211. canvas.height = height * 2
  1212. canvas.style.width = width + 'px'
  1213. canvas.style.height = height + 'px'
  1214. const context = canvas.getContext('2d')
  1215. context.scale(2, 2)
  1216. const options = {
  1217. backgroundColor: null,
  1218. canvas: canvas,
  1219. useCORS: true
  1220. }
  1221. html2canvas(canvasBox, options).then((canvas) => {
  1222. // toDataURL 图片格式转成 base64
  1223. let dataBase64 = canvas.toDataURL('image/png')
  1224. this.uploadBase64(dataBase64)
  1225. })
  1226. canvasBox.appendChild(toolbar)
  1227. },
  1228. uploadBase64(dataBase64) {
  1229. //事件详情截图直接上传日志
  1230. uploadBase64({ eventCode: this.eventCode, base64: dataBase64 }).then(res => {
  1231. if (res.code == 200) {
  1232. this.$message.success(`截图上传成功!`)
  1233. this.refreshEventDialog(this.eventCode)
  1234. }
  1235. })
  1236. },
  1237. regionalFlagAdd: function() {//火灾区域
  1238. this.regionalFlagObj.array = []
  1239. this.regionalFlagOpen = true
  1240. },
  1241. showAreaLatLng: function(latlng) {//获取火灾区域经纬度
  1242. this.regionalFlagObj.array = latlng
  1243. this.$modal.msgSuccess('获取坐标成功!')
  1244. },
  1245. /** ----------------------------------摄像头预览开始------------------------------------- */
  1246. alertLogin: function() {
  1247. this.$modal.msg('登录中....')
  1248. },
  1249. alertLoginSuccess: function() {
  1250. this.$modal.msgSuccess('登录成功!')
  1251. },
  1252. alertLoginFailed: function() {
  1253. this.$modal.msgError('登陆失败!')
  1254. },
  1255. alertReinstall: function() {
  1256. this.$modal.msgWarning('请重新安装客户端')
  1257. },
  1258. cancelEventLocationShow() {
  1259. if (this.oWebControl != null) {
  1260. this.oWebControl.JS_HideWnd() // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
  1261. this.oWebControl.JS_Disconnect().then(function() { // 断开与插件服务连接成功
  1262. },
  1263. function() { // 断开与插件服务连接失败
  1264. })
  1265. }
  1266. },
  1267. /** 预览按钮操作 */
  1268. preview(cameraParam) {
  1269. if(cameraParam.type=='1'){
  1270. getDahuaVideoServer().then(newResponse => {
  1271. console.log(newResponse)
  1272. this.ws.detectConnectQt().then(res => {
  1273. if (res) { // 连接客户端成功
  1274. this.alertLogin()
  1275. this.ws.login({
  1276. loginIp: newResponse.loginIp,
  1277. loginPort: newResponse.loginPort,
  1278. userName: newResponse.userName,
  1279. userPwd: newResponse.userPwd,
  1280. token: '',
  1281. https: 0
  1282. })
  1283. this.ws.on('loginState', (res) => {
  1284. this.isLogin = res
  1285. console.log('---res-----', res)
  1286. if (res) {
  1287. this.alertLoginSuccess()
  1288. this.activePanel = 'key2'
  1289. this.realTimeVideoDialog(cameraParam.code)
  1290. } else {
  1291. this.alertLoginFailed()
  1292. }
  1293. })
  1294. } else { // 连接客户端失败
  1295. this.alertReinstall()
  1296. }
  1297. })
  1298. })
  1299. }else if(cameraParam.type=='0'){
  1300. let that = this
  1301. that.cameraVisible = true
  1302. getHaiKangVideoServer({cameraCode:cameraParam.code}).then(newResponse => {
  1303. that.cameraTitle = '摄像头-'+newResponse.data.cameraName
  1304. that.initPlugin(newResponse.data.appkey,newResponse.data.loginIp,newResponse.data.secret,newResponse.data.loginPort)
  1305. setTimeout(function() {
  1306. that.playhk(newResponse.data.channelCode)
  1307. }, 5000)
  1308. })
  1309. }
  1310. },
  1311. realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
  1312. if (!this.isLogin) {
  1313. this.$Message.info('正在登陆客户端,请稍等......')
  1314. return false
  1315. }
  1316. this.ws.openVideo(cameraParams)
  1317. },
  1318. /** ----------------------------------摄像头预览结束------------------------------------- */
  1319. /** ----------------------------------海康摄像头预览开始------------------------------------- */
  1320. // 创建播放实例
  1321. initPlugin(newappkey, newloginIp, newsecret, newloginPort) {
  1322. let that = this
  1323. that.oWebControl = new WebControl({
  1324. szPluginContainer: 'playWnd', // 指定容器id
  1325. iServicePortStart: 15900, // 指定起止端口号,建议使用该值
  1326. iServicePortEnd: 15909,
  1327. szClassId: '23BF3B0A-2C56-4D97-9C03-0CB103AA8F11', // 用于IE10使用ActiveX的clsid
  1328. cbConnectSuccess: function() { // 创建WebControl实例成功
  1329. that.oWebControl.JS_StartService('window', { // WebControl实例创建成功后需要启动服务
  1330. dllPath: './VideoPluginConnect.dll' // 值"./VideoPluginConnect.dll"写死
  1331. }).then(function() { // 启动插件服务成功
  1332. that.oWebControl.JS_SetWindowControlCallback({ // 设置消息回调
  1333. cbIntegrationCallBack: cbIntegrationCallBack
  1334. })
  1335. that.oWebControl.JS_CreateWnd('playWnd', 1020, 600).then(function() { //JS_CreateWnd创建视频播放窗口,宽高可设定
  1336. that.init(newappkey, newloginIp, newsecret, newloginPort) // 创建播放实例成功后初始化
  1337. })
  1338. }, function() { // 启动插件服务失败
  1339. })
  1340. },
  1341. cbConnectError: function() { // 创建WebControl实例失败
  1342. that.oWebControl = null
  1343. $('#playWnd').html('插件未启动,正在尝试启动,请稍候...<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
  1344. WebControl.JS_WakeUp('VideoWebPlugin://') // 程序未启动时执行error函数,采用wakeup来启动程序
  1345. that.initCount++
  1346. if (that.initCount < 3) {
  1347. setTimeout(function() {
  1348. that.initPlugin(newappkey, newloginIp, newsecret, newloginPort)
  1349. }, 3000)
  1350. } else {
  1351. $('#playWnd').html('插件启动失败,请检查插件是否安装!<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
  1352. }
  1353. },
  1354. cbConnectClose: function(bNormalClose) {
  1355. // 异常断开:bNormalClose = false
  1356. // JS_Disconnect正常断开:bNormalClose = true
  1357. that.oWebControl = null
  1358. }
  1359. })
  1360. },
  1361. //播放海康摄像头
  1362. playhk(channelCode) {
  1363. var cameraIndexCode = channelCode //获取输入的监控点编号值,必填
  1364. var streamMode = 0 //主子码流标识:0-主码流,1-子码流
  1365. var transMode = 1 //传输协议:0-UDP,1-TCP
  1366. var gpuMode = 0 //是否启用GPU硬解,0-不启用,1-启用
  1367. var wndId = -1 //播放窗口序号(在2x2以上布局下可指定播放窗口)
  1368. cameraIndexCode = cameraIndexCode.replace(/(^\s*)/g, '')
  1369. cameraIndexCode = cameraIndexCode.replace(/(\s*$)/g, '')
  1370. this.oWebControl.JS_RequestInterface({
  1371. funcName: 'startPreview',
  1372. argument: JSON.stringify({
  1373. cameraIndexCode: cameraIndexCode, //监控点编号
  1374. streamMode: streamMode, //主子码流标识
  1375. transMode: transMode, //传输协议
  1376. gpuMode: gpuMode, //是否开启GPU硬解
  1377. wndId: wndId //可指定播放窗口
  1378. })
  1379. })
  1380. },
  1381. //初始化
  1382. init(newappkey, newloginIp, newsecret, newloginPort) {
  1383. let that = this
  1384. that.getPubKey(function() {
  1385. ////////////////////////////////// 请自行修改以下变量值 ////////////////////////////////////
  1386. var appkey = newappkey //综合安防管理平台提供的appkey,必填
  1387. var secret = that.setEncrypt(newsecret) //综合安防管理平台提供的secret,必填
  1388. var ip = newloginIp //综合安防管理平台IP地址,必填
  1389. var playMode = 0 //初始播放模式:0-预览,1-回放
  1390. var port = Number(newloginPort) //综合安防管理平台端口,若启用HTTPS协议,默认443
  1391. var snapDir = 'D:\\SnapDir' //抓图存储路径
  1392. var videoDir = 'D:\\VideoDir' //紧急录像或录像剪辑存储路径
  1393. var layout = '1x1' //playMode指定模式的布局
  1394. var enableHTTPS = 1 //是否启用HTTPS协议与综合安防管理平台交互,这里总是填1
  1395. var encryptedFields = 'secret' //加密字段,默认加密领域为secret
  1396. var showToolbar = 1 //是否显示工具栏,0-不显示,非0-显示
  1397. var showSmart = 1 //是否显示智能信息(如配置移动侦测后画面上的线框),0-不显示,非0-显示
  1398. var buttonIDs = '0,16,256,257,258,259,260,512,513,514,515,516,517,768,769' //自定义工具条按钮
  1399. ////////////////////////////////// 请自行修改以上变量值 ////////////////////////////////////
  1400. that.oWebControl.JS_RequestInterface({
  1401. funcName: 'init',
  1402. argument: JSON.stringify({
  1403. appkey: appkey, //API网关提供的appkey
  1404. secret: secret, //API网关提供的secret
  1405. ip: ip, //API网关IP地址
  1406. playMode: playMode, //播放模式(决定显示预览还是回放界面)
  1407. port: port, //端口
  1408. snapDir: snapDir, //抓图存储路径
  1409. videoDir: videoDir, //紧急录像或录像剪辑存储路径
  1410. layout: layout, //布局
  1411. enableHTTPS: enableHTTPS, //是否启用HTTPS协议
  1412. encryptedFields: encryptedFields, //加密字段
  1413. showToolbar: showToolbar, //是否显示工具栏
  1414. showSmart: showSmart, //是否显示智能信息
  1415. buttonIDs: buttonIDs //自定义工具条按钮
  1416. })
  1417. }).then(function(oData) {
  1418. that.oWebControl.JS_Resize(1020, 600) // 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
  1419. })
  1420. })
  1421. },
  1422. //获取公钥
  1423. getPubKey(callback) {
  1424. let that = this
  1425. that.oWebControl.JS_RequestInterface({
  1426. funcName: 'getRSAPubKey',
  1427. argument: JSON.stringify({
  1428. keyLength: 1024
  1429. })
  1430. }).then(function(oData) {
  1431. console.log(oData)
  1432. if (oData.responseMsg.data) {
  1433. that.pubKey = oData.responseMsg.data
  1434. callback()
  1435. }
  1436. })
  1437. },
  1438. //RSA加密
  1439. setEncrypt(value) {
  1440. var encrypt = new JSEncrypt()
  1441. encrypt.setPublicKey(this.pubKey)
  1442. return encrypt.encrypt(value)
  1443. },
  1444. //加入华为视频会议方法
  1445. joinMeeting(){
  1446. let eventId = this.eventId;
  1447. let subject = "视频会议";
  1448. let nickName;
  1449. getUserInfo().then(res => {
  1450. nickName = res.data.nickName;
  1451. });
  1452. hasConferences(eventId).then(res => {
  1453. let data = res.data;
  1454. /**如果没有正在开启的会议会返回空对象**/
  1455. if(res.code == 200 && Object.keys(data).length === 0){
  1456. createConferences(eventId,subject).then(res => {
  1457. let data = res.data;
  1458. if(res.code == 200){
  1459. window.open("/hwMeeting/meeting.html?nickName="+encodeURI(encodeURI(nickName))+"&conferenceID="+data.conferenceID+"&password="+data.password);
  1460. }
  1461. });
  1462. }else{
  1463. window.open("/hwMeeting/meeting.html?nickName="+encodeURI(encodeURI(nickName))+"&conferenceID="+data.conferenceID+"&password="+data.password);
  1464. }
  1465. });
  1466. }
  1467. /** ----------------------------------海康摄像头预览结束------------------------------------- */
  1468. }
  1469. }
  1470. // 推送消息
  1471. function cbIntegrationCallBack(oData) {
  1472. console.log(JSON.stringify(oData.responseMsg))
  1473. }
  1474. </script>
  1475. <style lang="scss" scoped>
  1476. @import '@/assets/styles/base.scss';
  1477. //弹层样式
  1478. //.customWidthMp4 {
  1479. // width: 70px !important;
  1480. // height: 70px !important;
  1481. //}
  1482. .tree-border {
  1483. border: 1px $barBorder;
  1484. }
  1485. button {
  1486. padding: .5rem;
  1487. }
  1488. /** 火灾报告**/
  1489. //@font-face {
  1490. // font-family: 'fontnameRegular';
  1491. // src: url('../../../../assets/styles/FZYTJW_0.TTF');
  1492. //}
  1493. body,
  1494. html,
  1495. * {
  1496. padding: 0px;
  1497. margin: 0px;
  1498. font-family: "fontnameRegular";
  1499. }
  1500. .table-container {
  1501. width: 100%;
  1502. }
  1503. .txt_right {
  1504. text-align: right !important;
  1505. }
  1506. .txt_left {
  1507. text-align: left !important;
  1508. }
  1509. table {
  1510. border-spacing: 0;
  1511. border-collapse: collapse;
  1512. width: 99%;
  1513. margin: 0 auto;
  1514. color: $inBlue;
  1515. }
  1516. table input {
  1517. font-size: 1rem;
  1518. border: 0px;
  1519. outline: 0px;
  1520. font-family: "微软雅黑";
  1521. background: none;
  1522. color: $inBlue;
  1523. }
  1524. table th input:hover {
  1525. background: $eventBG;
  1526. }
  1527. table thead th {
  1528. font-size: 1rem;
  1529. font-family: "宋体";
  1530. height: 2rem;
  1531. border-top: 0px;
  1532. border-left: 0px;
  1533. border-right: 0px;
  1534. outline: 0px;
  1535. }
  1536. table tr td {
  1537. font-size: 1rem;
  1538. font-family: "fontnameRegular";
  1539. height: 2rem;
  1540. border: 1px $searchBorder;
  1541. text-align: center;
  1542. }
  1543. .font1 {
  1544. font-size: 1.7rem;
  1545. font-weight: bolder;
  1546. }
  1547. .border0 {
  1548. width: 100% !important;
  1549. }
  1550. .border0 tr td {
  1551. border: 0px !important;
  1552. }
  1553. table tr td input {
  1554. width: 100%;
  1555. /* display: inline-block;*/
  1556. outline: 0px;
  1557. text-align: left;
  1558. height: 94%;
  1559. color: $inBlue;
  1560. background: none;
  1561. float: left;
  1562. padding: 0 .5rem;
  1563. }
  1564. table tr td input:hover {
  1565. background: $eventBG;
  1566. }
  1567. .int_tr td input {
  1568. text-align: center !important;
  1569. }
  1570. .table2 tr th {
  1571. font-size: 1.7rem;
  1572. padding: .5rem 0;
  1573. font-family: 'fontnameRegular';
  1574. }
  1575. .table2 tr td {
  1576. font-size: 1rem;
  1577. }
  1578. .table2 tr td select {
  1579. border: 0px !important;
  1580. outline: 0px;
  1581. width: 100%;
  1582. font-family: "微软雅黑";
  1583. font-size: 1rem;
  1584. padding-left: 1%;
  1585. color: $inBlue;
  1586. background: none;
  1587. }
  1588. .table2 tr td select:hover {
  1589. background: $eventBG;
  1590. }
  1591. .table2 tr td select option {
  1592. font-size: 1rem;
  1593. font-family: "微软雅黑";
  1594. }
  1595. .border_l0 {
  1596. // border-right: 1px solid #ececec !important;
  1597. }
  1598. .table2 tr td textarea {
  1599. border: 0px !important;
  1600. outline: 0px;
  1601. width: 98%;
  1602. padding: .5rem;
  1603. font-size: 1rem;
  1604. resize: none;
  1605. background: none;
  1606. color: $inBlue;
  1607. }
  1608. .table2 tr td textarea:hover {
  1609. background: $eventBG;
  1610. }
  1611. .tr_border td {
  1612. border-right: 0px !important;
  1613. border-left: 0px !important;
  1614. border-bottom: 0px !important;
  1615. font-size: 15px;
  1616. }
  1617. .btm-btn-group {
  1618. padding: 1rem 0;
  1619. width: 100%;
  1620. display: flex;
  1621. button {
  1622. padding: .5rem 2rem;
  1623. }
  1624. }
  1625. // 20220928
  1626. .yatz_button {
  1627. padding: 0.5rem 0.5rem;
  1628. color: #409EFF;
  1629. background: none;
  1630. border-color: #409EFF;
  1631. }
  1632. .yatz_button:hover {
  1633. color: #fff;
  1634. background: #409EFF;
  1635. border-color: #409EFF;
  1636. }
  1637. .fr_button {
  1638. float: right;
  1639. padding: 0.5rem 1.5rem;
  1640. }
  1641. .bottom {
  1642. width: 100%;
  1643. height: calc(100% - 80px);
  1644. display: flex;
  1645. .bottomLeft {
  1646. width: 288px;
  1647. height: 500px;
  1648. overflow-y: auto;
  1649. .leftItem {
  1650. width: 100%;
  1651. height: 50px;
  1652. line-height: 50px;
  1653. text-align: center;
  1654. cursor: pointer;
  1655. }
  1656. }
  1657. .bottomRight {
  1658. width: calc(100% - 288px);
  1659. height: 500px;
  1660. box-sizing: border-box;
  1661. padding: 36px 36px 0 36px;
  1662. overflow-y: auto;
  1663. .bottomRightContent {
  1664. width: 100%;
  1665. box-sizing: border-box;
  1666. padding-bottom: 36px;
  1667. .bottomRightContentHead {
  1668. height: 25px;
  1669. font-family: PingFang SC;
  1670. font-style: normal;
  1671. font-weight: 600;
  1672. font-size: 24px;
  1673. line-height: 25px;
  1674. text-transform: capitalize;
  1675. color: rgba(0, 0, 0, 0.85);
  1676. margin-bottom: 32px;
  1677. }
  1678. .bottomRightContentBody {
  1679. .el-col {
  1680. position: relative;
  1681. margin-bottom: 18px;
  1682. .circle {
  1683. display: inline-block;
  1684. width: 6px;
  1685. height: 6px;
  1686. background: #4677f6;
  1687. border-radius: 50%;
  1688. position: absolute;
  1689. top: 8px;
  1690. left: 0;
  1691. }
  1692. .word {
  1693. margin-left: 12px;
  1694. font-family: PingFang SC;
  1695. font-style: normal;
  1696. font-weight: normal;
  1697. font-size: 14px;
  1698. color: #4677f6;
  1699. cursor: pointer;
  1700. }
  1701. .word:hover {
  1702. text-decoration: underline;
  1703. }
  1704. .topPlace {
  1705. position: absolute;
  1706. top: 1px;
  1707. margin-left: 8px;
  1708. }
  1709. }
  1710. }
  1711. .bottomRightContentFooter {
  1712. height: 1px;
  1713. width: 100%;
  1714. margin-top: 14px;
  1715. }
  1716. }
  1717. }
  1718. }
  1719. </style>