comprehensive-disposal.vue 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532
  1. <!--
  2. * @Descripttion:
  3. * @version:
  4. * @Author: wt
  5. * @Date: 2023-01-29 13:14:08
  6. * @LastEditors: wt
  7. * @LastEditTime: 2023-03-24 22:52:09
  8. -->
  9. <template>
  10. <el-row class="contentBox">
  11. <transition name="el-fade-in-linear">
  12. <el-col class="leftBox" v-show="stroes.$state.leftBtn">
  13. <div class="leftTop">
  14. <div style="display: flex">
  15. <h4>警情时段分布</h4>
  16. <div style="display: flex; border-bottom: 0.0125rem solid rgba(115, 251, 253, 0.5);margin-right:50px;">
  17. <el-form class="titleElForm" :inline="true" size="mini" :model="barForm" style="height: 0">
  18. <el-form-item label="场所分类:">
  19. <el-select v-model="barForm.fireType" @change="getHouse()" filterable clearable placeholder="场所">
  20. <el-option v-for="(item, ind) in fireTypeList" :key="ind" :label="item" :value="item"></el-option>
  21. </el-select>
  22. </el-form-item>
  23. </el-form>
  24. </div>
  25. </div>
  26. <div class="leftTopContent">
  27. <el-row class="fireBar">
  28. <line-smooth ref="lineSmooth" :dataMap="houseList"></line-smooth>
  29. </el-row>
  30. </div>
  31. </div>
  32. <div class="leftCenter">
  33. <div style="display: flex">
  34. <h4>历史警情趋势图</h4>
  35. <div style="display: flex; border-bottom: 0.0125rem solid rgba(115, 251, 253, 0.5)">
  36. <el-button size="mini" @click="searchTabs('历史警情趋势图', 1)" :class="{ btnClick: timeArea === 1 }">近一年</el-button>
  37. <el-button size="mini" @click="searchTabs('历史警情趋势图', 3)" :class="{ btnClick: timeArea === 3 }">近三年</el-button>
  38. <el-button size="mini" @click="searchTabs('历史警情趋势图', 5)" :class="{ btnClick: timeArea === 5 }">近五年</el-button>
  39. </div>
  40. </div>
  41. <div class="leftCenterContent">
  42. <div class="contentEcharts">
  43. <bar-chart ref="barChart" :dataMap="monthList"></bar-chart>
  44. </div>
  45. </div>
  46. </div>
  47. </el-col>
  48. </transition>
  49. <transition name="el-fade-in-linear">
  50. <el-col class="centerBox" style="width: 100%">
  51. <div :class="stroes.$state.leftBtn ? 'leftBtn btnW' : 'leftBtn0 btnW'" @click="stroes.leftBtnClick()">
  52. <img src="@/assets/img/svg/left.svg" alt="" class="img" />
  53. </div>
  54. <el-col class="centerContent" id="mapF"></el-col>
  55. <div :class="stroes.$state.rightBtn ? 'rightBtn btnW' : 'rightBtn0 btnW'" @click="stroes.rightBtnClick()">
  56. <img src="@/assets/img/svg/left.svg" alt="" class="img" />
  57. </div>
  58. <div class="mapTips_type">
  59. <img src="@/assets/img/svg/danweitop.svg" alt="" class="img" />
  60. <!-- <div class="content">
  61. <p>街镇筛选</p>
  62. <el-select class="mtb-12" v-model="stroes.$state.streetTown" placeholder="请选择街镇" @change="checkStreetTown">
  63. <el-option v-for="item in stroes.$state.streetTownList" :key="item.value" :label="item.label" :value="item.value"> </el-option>
  64. </el-select>
  65. <p>类型筛选</p>
  66. <el-checkbox-group v-model="checkedArray.checkedData" size="medium">
  67. <el-checkbox v-for="(item, index) in checkedArray.checkedList" :label="item.value" :key="index" @change="checkboxChange(item.value)">{{ item.label }}</el-checkbox>
  68. </el-checkbox-group>
  69. </div> -->
  70. </div>
  71. <div class="mapTips_type">
  72. <img src="@/assets/img/svg/danweitop.svg" alt="" class="img" />
  73. <div class="content">
  74. <p>街镇筛选</p>
  75. <el-select class="mtb-12" v-model="stroes.$state.streetTown" placeholder="请选择街镇" @change="checkStreetTown">
  76. <el-option v-for="item in stroes.$state.streetTownList" :key="item.value" :label="item.label" :value="item.value"> </el-option>
  77. </el-select>
  78. <p>类型筛选</p>
  79. <div class="selectType">
  80. <div
  81. :class="
  82. checkedArray.checkedData[0] == 4 ? 'checkTypeSelect' :
  83. checkedArray.checkedData[0] == 40 ? 'checkTypeSelect' :
  84. checkedArray.checkedData[0] == 41 ? 'checkTypeSelect' :
  85. checkedArray.checkedData[0] == 42 ? 'checkTypeSelect' :
  86. checkedArray.checkedData[0] == 43 ? 'checkTypeSelect' :
  87. checkedArray.checkedData[0] == 44 ? 'checkTypeSelect' :
  88. checkedArray.checkedData[0] == 45 ? 'checkTypeSelect' :
  89. checkedArray.checkedData[0] == 46 ? 'checkTypeSelect' :
  90. checkedArray.checkedData[0] == 47 ? 'checkTypeSelect' :
  91. ' '
  92. "
  93. >
  94. <img :src="
  95. checkedSelectValue=='40' ? stores.sadianIcon.xfz :
  96. checkedSelectValue=='41' ? stores.sadianIcon.zzd :
  97. checkedSelectValue=='42' ? stores.sadianIcon.jzwxxfz :
  98. checkedSelectValue=='43' ? stores.sadianIcon.csxfz :
  99. checkedSelectValue=='44' ? stores.sadianIcon.qyxfd :
  100. checkedSelectValue=='45' ? stores.sadianIcon.sqwxxfz :
  101. checkedSelectValue=='46' ? stores.sadianIcon.yjxfz :
  102. checkedSelectValue=='47' ? stores.sadianIcon.jzzzxfd :
  103. stores.sadianIcon.xfz
  104. " alt="" />
  105. <span>{{checkedSelectLabel}}</span>
  106. <el-select v-model="checkedSelectValue" placeholder="消防站" class="selectTypeIcon" style="display: inline-block; width:100%;position:absolute;right:0" @change="selectArray">
  107. <el-option
  108. v-for="item in checkedSelectArray"
  109. :key="item.value"
  110. :label="item.label"
  111. :value="item.value">
  112. </el-option>
  113. </el-select>
  114. </div>
  115. <div
  116. @click="checkboxChange(0)"
  117. :class="
  118. checkedArray.checkedData[0] == 0
  119. ? 'checkTypeSelect'
  120. : ''
  121. "
  122. >
  123. <img :src="stores.sadianIcon.xfc" alt="" />
  124. <span>消防车</span>
  125. </div>
  126. <div
  127. @click="checkboxChange(6)"
  128. :class="
  129. checkedArray.checkedData[0] == 6
  130. ? 'checkTypeSelect'
  131. : ''
  132. "
  133. >
  134. <img :src="stores.sadianIcon.jk" alt="" />
  135. <span>监控</span>
  136. </div>
  137. <div
  138. @click="checkboxChange(111)"
  139. :class="
  140. checkedArray.checkedData[0] == 111
  141. ? 'checkTypeSelect'
  142. : ''
  143. "
  144. >
  145. <img :src="stores.sadianIcon.ssjq" alt="" />
  146. <span>实时警情</span>
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. </el-col>
  152. </transition>
  153. <transition name="el-fade-in-linear">
  154. <el-col class="rightBox" v-show="stroes.$state.rightBtn">
  155. <div class="rightTop" v-if="!(checkedArray.checkedData[0] == 1 && stores.$state.mapSpotId)">
  156. <h4>警情处置情况</h4>
  157. <el-row class="rightTop2">
  158. <el-col :span="8" v-for="(item,index) in proptionList" :key="index">
  159. <div>
  160. <div style="text-align: center;font-size:0.18rem">
  161. {{ item.type }}
  162. </div>
  163. <div style="height: 1.5rem">
  164. <gauge ref="gauge1" :data="item" ></gauge>
  165. </div>
  166. <div style="text-align: center" v-if="item.radio">
  167. 同比<span :style="{'color':item.sameStatus ==2 ? '#C2020D' : '#00C31B'}">{{ item.sameStatus ==2 ? '+' + item.radio : '-' + item.radio}}%</span>
  168. </div>
  169. </div>
  170. </el-col>
  171. </el-row>
  172. </div>
  173. <div class="rightCenter" v-if="!(checkedArray.checkedData[0] == 1 && stores.$state.mapSpotId)">
  174. <h4>实时警情处理</h4>
  175. <div class="rightCenterContent">
  176. <el-table
  177. :data="tableData"
  178. class="transparentTableRow table1"
  179. height="100%"
  180. style="width: 100%; margin: 0 auto"
  181. >
  182. <el-table-column
  183. v-for="item in headerData"
  184. :key="item.prop"
  185. :prop="item.prop"
  186. align="center"
  187. style="margin: 0 auto"
  188. min-width="20"
  189. :label="item.name"
  190. >
  191. <template
  192. v-if="item.prop === 'type' ||
  193. item.prop === 'lasj2' ||
  194. item.prop === 'ajzt' ||
  195. item.prop === 'afdz' ||
  196. item.prop === 'czdx' ||
  197. item.prop ==='zhongdui' " #default="scope">
  198. <el-tooltip placement="left" >
  199. <template #content >
  200. <div class="tableTooltip" ref="ff">
  201. <div class="tableTitle">
  202. <div>案件详情</div>
  203. </div>
  204. <img src="~@a/img/icon/close.png" alt="" class="close" @click="closeIsTooltip" />
  205. <el-row class="tableContent">
  206. <el-col :span="20" v-if="scope.row.ajbh">案件编号:{{scope.row.ajbh}}</el-col>
  207. <el-col :span="24" v-if="scope.row.bcxx ">案件描述:{{scope.row.bcxx }}</el-col>
  208. <el-col :span="24" v-if="scope.row.tzsj">报警时间:{{scope.row.tzsj}}</el-col>
  209. <el-col :span="24" v-if="scope.row.ajlx">案件类型:{{scope.row.ajlx}}</el-col>
  210. <el-col :span="24" v-if="scope.row.type">警情类别:{{scope.row.type}}</el-col>
  211. <el-col :span="24" v-if="scope.row.ajdj">警情等级:{{scope.row.ajdj}}</el-col>
  212. <el-col :span="24" v-if="scope.row.afdz">案发地址:{{scope.row.afdz}}</el-col>
  213. <el-col :span="24" v-if="scope.row.cdcl">调动车辆:{{scope.row.cdcl}}</el-col>
  214. <el-col :span="24" v-if="scope.row.czdx">处置对象:{{scope.row.czdx}}</el-col>
  215. <el-col :span="12" v-if="scope.row.zhongdui">主责中队:{{scope.row.zhongdui}}</el-col>
  216. <el-col :span="12" v-if="scope.row.ajzt">案件状态:{{scope.row.ajzt}}</el-col>
  217. <el-col :span="24" v-if="scope.row.dcsj">到场时间:{{scope.row.dcsj}}</el-col>
  218. <el-col :span="24" v-if="scope.row.cssj">出水时间:{{scope.row.cssj}}</el-col>
  219. <el-col :span="24" v-if="scope.row.kzsj">控制时间:{{scope.row.kzsj}}</el-col>
  220. <el-col :span="24" v-if="scope.row.xmsj">熄灭时间:{{scope.row.xmsj}}</el-col>
  221. <el-col :span="24" v-if="scope.row.fdsj ">返队时间:{{scope.row.fdsj }}</el-col>
  222. <el-col :span="24" v-if="scope.row.streettown">所属街道:{{scope.row.streettown }}</el-col>
  223. </el-row>
  224. <el-row class="tablePersonnel">
  225. <el-col :span="7">
  226. </el-col>
  227. </el-row>
  228. </div>
  229. </template>
  230. <template>
  231. <i class="iconfont"
  232. :class="scope.row['ajlxdm'] == '1' ? 'icon-huozai' : scope.row['ajlxdm'] == '2' ? 'icon-jiuyuan' : scope.row['ajlxdm'] == '3' ? 'icon-shehuijiuzhu' : 'icon-pbaj'"
  233. :style="{color: scope.row['ajdj'] == '零级' ? '#49b8ff' : scope.row['ajdj'] == '一级' ? '#eec10d' : scope.row['ajdj'] == '二级' ? '#ff730c' : scope.row['ajdj'] == '三级' ? '#ff0012' : '#2e98f2'}"
  234. v-if="item.prop === 'type'"></i>
  235. <div class="name-wrapper" v-else>{{ scope.row[item.prop] }}</div>
  236. </template>
  237. </el-tooltip>
  238. </template>
  239. <template v-else #default="scope">
  240. {{ item.prop === 'type' ? '' : item.prop === 'lasj' ? scope.row[item.prop] && scope.row[item.prop].slice(5) : item.prop === 'afdz' ? scope.row[item.prop].replace(new RegExp("闵行区 ",""),"") : item.prop === 'status' ? (scope.row[item.prop] == 1 ? '可用' : '不可用') : scope.row[item.prop]}}
  241. </template>
  242. </el-table-column>
  243. </el-table>
  244. <el-card class="box-card" v-if="isVideo">
  245. <template #header>
  246. <div class="card-header">
  247. <div class="top">
  248. <span>实时视频</span>
  249. <i class="el-icon-close" @click="isVideo = false"></i>
  250. </div>
  251. <div class="iframe2">
  252. <video
  253. :id="video.videoId"
  254. class=" video-js vjs-default-skin videoPaly"
  255. preload="auto"
  256. autoplay="autoplay"
  257. src="http://32.0.15.107:80/mhvi" type="application/x-mpegURL">
  258. </video>
  259. </div>
  260. </div>
  261. </template>
  262. </el-card>
  263. </div>
  264. </div>
  265. <div class="rightBottom" v-if="!(checkedArray.checkedData[0] == 1 && stores.$state.mapSpotId)">
  266. <h4>4G图传</h4>
  267. <el-row class="monitor-list">
  268. <el-col :span="11" class="list">
  269. <el-select v-model="zfjly1" placeholder="请选择4G图传" class="videoSelect">
  270. <el-option v-for="item in selectVideoData" :key="item.url" :label="item.name" :value="item.url"> </el-option>
  271. </el-select>
  272. <iframe class="hlsVideo monitor-height" :src="zfjly1" allowfullscreen="true"></iframe>
  273. </el-col>
  274. <el-col :span="11" class="list" :offset="2">
  275. <el-select v-model="zfjly2" placeholder="请选择4G图传" class="videoSelect">
  276. <el-option v-for="item in selectVideoData" :key="item.url" :label="item.name" :value="item.url"> </el-option>
  277. </el-select>
  278. <iframe class="hlsVideo monitor-height" :src="zfjly2" allowfullscreen="true"></iframe>
  279. </el-col>
  280. </el-row>
  281. </div>
  282. <div class="rightTop1" v-if="checkedArray.checkedData[0] == 1 && stores.$state.mapSpotId">
  283. <div style="display: flex">
  284. <h4>消防站值班人员</h4>
  285. <div style="display: flex; border-bottom: 0.0125rem solid rgba(115, 251, 253, 0.5)">
  286. <el-button size="mini" @click="searchTabs('消防站值班人员', 'day')" :class="{ btnClick: timeArea1 === 'day' }">日</el-button>
  287. <el-button size="mini" @click="searchTabs('消防站值班人员', 'month')" :class="{ btnClick: timeArea1 === 'month' }">月</el-button>
  288. </div>
  289. </div>
  290. <div class="rightTopContent">
  291. <template v-if="timeArea1 === 'day'">
  292. <el-col v-for="item in unitBeOnDutyList" :key="item.name" class="day">
  293. <el-col class="rank">{{ item.postName }}</el-col>
  294. <el-col><img src="~@a/img/test/bg2.png" alt="" /></el-col>
  295. <el-col class="propName">{{ item.name }}</el-col>
  296. </el-col>
  297. </template>
  298. <div v-else style="margin-top: 0.1rem; height: calc(100% - 0.1rem)">
  299. <se-table ref="seTable" :dataMap="unitBeOnDutyListData" :headerData="unitBeOnDutyHeaderList" :key="windowWidth"></se-table>
  300. </div>
  301. </div>
  302. </div>
  303. <div class="rightCenter1" v-if="checkedArray.checkedData[0] == 1 && stores.$state.mapSpotId">
  304. <h4>战备力量</h4>
  305. <div class="rightCenterContent">
  306. <el-row>
  307. <el-row class="title">备勤(1辆车,6人)</el-row>
  308. <el-row class="data">
  309. <el-col :span="24">车牌号:沪X6565</el-col>
  310. <el-col :span="8">指挥员:张三1</el-col>
  311. <el-col :span="8">通讯员:王五1</el-col>
  312. <el-col :span="8">消防员:李四1</el-col>
  313. <el-col :span="8">驾驶员:张三2</el-col>
  314. <el-col :span="8">消防员:王五2</el-col>
  315. <el-col :span="8">消防员:王五3</el-col>
  316. </el-row>
  317. <el-row class="title">备勤(1辆车,6人)</el-row>
  318. <el-row class="data">
  319. <el-col :span="24">车牌号:沪X6565</el-col>
  320. <el-col :span="8">指挥员:张三1</el-col>
  321. <el-col :span="8">通讯员:王五1</el-col>
  322. <el-col :span="8">消防员:李四1</el-col>
  323. <el-col :span="8">驾驶员:张三2</el-col>
  324. <el-col :span="8">消防员:王五2</el-col>
  325. <el-col :span="8">消防员:王五3</el-col>
  326. </el-row>
  327. <el-row class="title">备勤(1辆车,6人)</el-row>
  328. <el-row class="data">
  329. <el-col :span="24">车牌号:沪X6565</el-col>
  330. <el-col :span="8">指挥员:张三1</el-col>
  331. <el-col :span="8">通讯员:王五1</el-col>
  332. <el-col :span="8">消防员:李四1</el-col>
  333. <el-col :span="8">驾驶员:张三2</el-col>
  334. <el-col :span="8">消防员:王五2</el-col>
  335. <el-col :span="8">消防员:王五3</el-col>
  336. </el-row>
  337. <el-row class="title">备勤(1辆车,6人)</el-row>
  338. <el-row class="data">
  339. <el-col :span="24">车牌号:沪X6565</el-col>
  340. <el-col :span="8">指挥员:张三1</el-col>
  341. <el-col :span="8">通讯员:王五1</el-col>
  342. <el-col :span="8">消防员:李四1</el-col>
  343. <el-col :span="8">驾驶员:张三2</el-col>
  344. <el-col :span="8">消防员:王五2</el-col>
  345. <el-col :span="8">消防员:王五3</el-col>
  346. </el-row>
  347. </el-row>
  348. </div>
  349. </div>
  350. </el-col>
  351. </transition>
  352. </el-row>
  353. </template>
  354. <script>
  355. import axios from "axios";
  356. import seTable from "@c/se-table/index2";
  357. import barChart from "@c/bar";
  358. import lineSmooth from "@c/line-smooth";
  359. import linstener from "@c/mixins/linstener";
  360. import map from "@c/mixins/map-data1";
  361. import gauge from "@c/gauge/index3";
  362. // import map from "@c/mixins/map-gaode-public";
  363. import {
  364. getYearMonthDateSFN,
  365. getMonthStartAndEnd,
  366. getMonthStartDate,
  367. getMonthEndDate,
  368. } from "../assets/js/dataFormate";
  369. import { includes } from 'lodash';
  370. export default {
  371. data() {
  372. return {
  373. stores: this.$useStore(),
  374. zfjly1: undefined,
  375. zfjly2: undefined,
  376. zfjly3: undefined,
  377. zfjly4: undefined,
  378. left1: false,
  379. left2: false,
  380. left3: false,
  381. right1: false,
  382. right2: false,
  383. spStatus: false,
  384. spData: {},
  385. selectVideoData: [],
  386. tableData: [],
  387. headerData: [
  388. { prop: "type", name: "警情类别" },
  389. { prop: "lasj2", name: "立案时间" },
  390. // { prop: "ajdj", name: "警情等级" },
  391. { prop: "afdz", name: "案发地址" },
  392. // { prop: "cdcl", name: "调动车辆" },
  393. // { prop: "bcxx", name: "原因" },
  394. // { prop: "czdx", name: "处置对象" },
  395. { prop: "zhongdui", name: "所属中队" },
  396. { prop: "ajzt", name: "状态" },
  397. // { prop: "sp", name: "" },
  398. ],
  399. // headerData: [
  400. // { prop: "type", name: "类型" },
  401. // { prop: "filingTime", name: "立案时间" },
  402. // { prop: "caseLevel", name: "警情等级" },
  403. // { prop: "address", name: "案发地址" },
  404. // { prop: "dispatchVehicle", name: "调动车辆" },
  405. // { prop: "supplement", name: "原因" },
  406. // { prop: "handleObject", name: "处置对象" },
  407. // { prop: "squadron", name: "所属中队" },
  408. // { prop: "caseStatus", name: "状况" },
  409. // ],
  410. isVideo: false,
  411. barForm: {
  412. fireType: "",
  413. address: "",
  414. },
  415. time:null,//实时告警计时器
  416. houseList: [], //警情时段分布-echarts图表数据存储
  417. fireTypeList: [], //警情时段分布-下拉选择框数据存储
  418. monthList: [], //历史警情趋势图-echarts图表数据存储
  419. timeArea: 1, //历史警情趋势图-时间tabs切换数据存储
  420. proptionList: [
  421. [],
  422. [],
  423. [],
  424. ], //警情处置情况-数据存储
  425. timeArea1: "day",
  426. unitBeOnDutyList: [],
  427. unitBeOnDutyListData: [],
  428. unitBeOnDutyHeaderList: [
  429. { prop: "date", name: "日期" },
  430. { prop: "attribute1", name: "指挥长" },
  431. { prop: "attribute2", name: "防火宣传" },
  432. { prop: "attribute3", name: "值班领导" },
  433. { prop: "attribute4", name: "带班领导" },
  434. { prop: "attribute5", name: "调度指挥员" },
  435. { prop: "attribute6", name: "作战助理" },
  436. { prop: "attribute7", name: "行政" },
  437. { prop: "attribute8", name: "政工战保" },
  438. ],
  439. checkedArray: {
  440. checkedData: [111],
  441. checkedList: [
  442. { value: 4, label: "消防站" },
  443. { value: 5, label: "消防车" },
  444. { value: 6, label: "监控" },
  445. { value: 111, label: "实时警情" },
  446. ],
  447. }, //类型筛选
  448. checkedSelectValue:"40",
  449. checkedSelectLabel:"消防站",
  450. checkedSelectArray:[
  451. { value: 40, label: "消防站" },
  452. { value: 41, label: "专职队" },
  453. // { value: 43, label: "城市消防站" },
  454. { value: 44, label: "企业消防队" },
  455. { value: 42, label: "街镇微型消防站" },
  456. { value: 45, label: "社区微型消防站" },
  457. { value: 46, label: "一级微型消防站" },
  458. { value: 47, label: "街镇专职消防队" },
  459. ],
  460. };
  461. },
  462. mixins: [linstener, map],
  463. components: { barChart,lineSmooth, seTable,gauge },
  464. created() {
  465. this.getData();
  466. },
  467. mounted() {
  468. window.addEventListener("resize", () => this.resizeTimeActions([
  469. this.$refs.gauge1,
  470. this.$refs.lineSmooth,
  471. this.$refs.barChart,
  472. ]), true);
  473. this.initMap();
  474. this.time = setInterval(()=>{
  475. this.getPageApi()
  476. },1000 * 60)
  477. },
  478. unmounted(){
  479. clearInterval(this.time)
  480. this.time = null
  481. },
  482. methods: {
  483. /**
  484. * 在线视频
  485. */
  486. async selectVideo(id) {
  487. axios({
  488. headers: {
  489. "Content-Type": "application/json;charset=UTF-8",
  490. },
  491. method: "get",
  492. url: "http://32.0.15.107:8080/video-api/kiop-gateway-core/4G/device/ext?apikey=643e6591-a489-4648-ba35-c15c39c64022",
  493. }).then((res) => {
  494. let arr = [];
  495. let zfjly = [];
  496. if (res.data.length > 0) {
  497. let data = res.data;
  498. for (let i = 0; i < data.length; i++) {
  499. if (data[i].otherNames?.status_name == "在线") {
  500. var num = {
  501. id: data[i].id,
  502. name: data[i]?.deviceName,
  503. groupName: data[i]?.groupName,
  504. gisX: data[i]?.longitude ? data[i]?.longitude : 0,
  505. gisY: data[i]?.latitude ? data[i]?.latitude : 0,
  506. type: "监控画面",
  507. gbid: data[i].gbid,
  508. url: "http://10.107.31.215:50080/dispatch-ms/#/conference/single_url?ipc_live=1&key=643e6591-a489-4648-ba35-c15c39c64022&gbids=" + data[i].gbid + "&nmediaid=121",
  509. };
  510. arr.push(num);
  511. }
  512. }
  513. for (let i = 0; i < arr.length; i++) {
  514. if (arr[i].name.indexOf("单兵") > -1 || arr[i].name.indexOf("无人机") > -1 || arr[i].name.indexOf("布控球") > -1) {
  515. zfjly.push(arr[i]);
  516. }
  517. }
  518. this.selectVideoData = zfjly;
  519. if (arr.length > 0 && id) {
  520. this.addMarker(arr, "comprehensive-disposal");
  521. }
  522. }
  523. })
  524. // axios({
  525. // headers: {
  526. // "Content-Type": "application/json;charset=UTF-8",
  527. // },
  528. // method: "get",
  529. // url: "http://32.0.15.107:8080/video-api/kiop-gateway-core/4G/device/ext?apikey=643e6591-a489-4648-ba35-c15c39c64022",
  530. // }).then((res) => {
  531. // let arr = [];
  532. // let zfjly = [];
  533. // if (res.data.length > 0) {
  534. // let data = res.data;
  535. // for (let i = 0; i < data.length; i++) {
  536. // if (data[i].otherNames?.status_name == "在线") {
  537. // var num = {
  538. // id: data[i].id,
  539. // name: data[i]?.deviceName,
  540. // groupName: data[i]?.groupName,
  541. // gisX: data[i]?.longitude ? data[i]?.longitude : 0,
  542. // gisY: data[i]?.latitude ? data[i]?.latitude : 0,
  543. // type: "监控画面",
  544. // gbid: data[i].gbid,
  545. // url: "http://10.107.31.215:50080/dispatch-ms/#/conference/single_url?ipc_live=1&key=643e6591-a489-4648-ba35-c15c39c64022&gbids=" + data[i].gbid + "&nmediaid=121",
  546. // };
  547. // arr.push(num);
  548. // }
  549. // }
  550. // for (let i = 0; i < arr.length; i++) {
  551. // if(arr[i].name.indexOf("单兵") >-1 || arr[i].name.indexOf("无人机") >-1 || arr[i].name.indexOf("布控球") >-1){
  552. // zfjly.push(arr[i]);
  553. // }
  554. // }
  555. // this.selectVideoData = zfjly;
  556. // if (arr.length > 0 && id) {
  557. // this.addMarker(arr, "comprehensive-disposal");
  558. // }
  559. // }
  560. // });
  561. },
  562. /**
  563. * @初始化
  564. */
  565. async getData() {
  566. this.sadianSelect(111); //撒点
  567. // this.checkboxChange(41)
  568. this.alertStatisticsByHouseApi(); //警情时段分布接口请求
  569. this.alertStatisticsByMonthApi(); //历史警情趋势图接口请求
  570. this.getPageApi(); //实时警情处理接口请求
  571. this.proptionApi(); //警情处置情况接口请求
  572. this.selectVideo(); //视频在线
  573. this.getXiangqingPage();
  574. this.getXiangqingOne();
  575. },
  576. /**
  577. * @点击街镇事件
  578. */
  579. async getStreetTownClick() {
  580. // this.sadianSelect(this.checkedArray.checkedData[0]); //撒点
  581. this.alertStatisticsByHouseApi(); //警情时段分布接口请求
  582. this.alertStatisticsByMonthApi(); //历史警情趋势图接口请求
  583. this.getPageApi(); //实时警情处理接口请求
  584. this.proptionApi(); //警情处置情况接口请求
  585. },
  586. /**
  587. * @历史警情趋势图
  588. * @消防站值班人员
  589. * @tabs切换
  590. * @param {传入值Bool} type
  591. * @param {传入值Sting} val
  592. */
  593. searchTabs(type, val) {
  594. if (type === "历史警情趋势图") {
  595. this.timeArea = val;
  596. this.alertStatisticsByMonthApi();
  597. } else if (type === "消防站值班人员") {
  598. this.timeArea1 = val;
  599. this.getSiAeAllCollect();
  600. }
  601. },
  602. /**
  603. * @街镇复选事件
  604. */
  605. checkboxChange(value) {
  606. if (this.stores.$state.mapSpotId) {
  607. this.stores.$state.mapSpotId = ""; //地图撒点id
  608. }
  609. this.checkedArray.checkedData[0] = value;
  610. this.sadianSelect(value);
  611. },
  612. /**
  613. * 撒点测绘院、高德
  614. */
  615. sadianSelect(id) {
  616. console.log(id)
  617. if (this.stroes.$state.mapBool == 1) {
  618. this.mapCluster();
  619. // this.warningInstanceScattererApi();
  620. } else {
  621. this.sadian(id);
  622. }
  623. },
  624. /**
  625. * @实时警情处理
  626. * @click事件
  627. */
  628. async rowClickMap(row) {
  629. row.longitude = row.gisX;
  630. row.latitude = row.gisY;
  631. // this.addMarker([row]);
  632. this.initMarkers([row], "警情综合处置", this.checkedArray.checkedData[0]);
  633. this.addMarkerInfo([row.longitude, row.latitude], row);
  634. },
  635. /**
  636. * @警情时段分布
  637. * @api接口请求
  638. */
  639. async alertStatisticsByHouseApi() {
  640. //下拉框接口请求
  641. let res = await this.$axios.get(this.$api.fire.fireType + "?" + this.$qs.stringify({}));
  642. if (res.data.length > 0) {
  643. this.fireTypeList = res.data;
  644. }
  645. //echarts图表接口请求
  646. let day = new Date().getDate().length>1 ? new Date().getDate() : '0' + new Date().getDate()
  647. let res1 = await this.$axios.get(
  648. this.$api.jqzhcz.alertStatisticsByHouse2 +
  649. "?" +
  650. this.$qs.stringify({
  651. // startTime: new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + day + " 00:00:00",
  652. // endTime: new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + day + " 23:59:59",
  653. // startTime: (dayjs().subtract(90, 'day').format('YYYY-MM-DD HH:mm:ss')).slice(0,10) + " 00:00:00",
  654. endTime: new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + day + " 23:59:59",
  655. startTime: (dayjs().subtract(30, 'day').format('YYYY-MM-DD HH:mm:ss')).slice(0,10) + " 00:00:00",
  656. // startTime: "2022-11-01 00:00:00",
  657. // endTime:"2022-11-31 23:59:59",
  658. streetTown: this.stroes.$state.streetTown, //街镇
  659. })
  660. );
  661. if (res1.status === "SUCCESS") {
  662. let data1 = []
  663. let data2 = []
  664. let data3 = []
  665. data1["抢险救援"] = res1.data["抢险救援"]
  666. data2["火灾"] = res1.data["火灾"]
  667. data3["社会救助"] = res1.data["社会救助"]
  668. // data1["抢险救援"][0].avg = data1["抢险救援"][0].avg + data1["抢险救援"][1].avg + data1["抢险救援"][2].avg
  669. // data1["抢险救援"][1].avg = data1["抢险救援"][3].avg + data1["抢险救援"][4].avg + data1["抢险救援"][5].avg
  670. // data1["抢险救援"][2].avg = data1["抢险救援"][6].avg + data1["抢险救援"][7].avg + data1["抢险救援"][8].avg
  671. // data1["抢险救援"][3].avg = data1["抢险救援"][9].avg + data1["抢险救援"][10].avg + data1["抢险救援"][11].avg
  672. // data1["抢险救援"][4].avg = data1["抢险救援"][12].avg + data1["抢险救援"][13].avg + data1["抢险救援"][14].avg
  673. // data1["抢险救援"][5].avg = data1["抢险救援"][15].avg + data1["抢险救援"][16].avg + data1["抢险救援"][17].avg
  674. // data1["抢险救援"][6].avg = data1["抢险救援"][18].avg + data1["抢险救援"][19].avg + data1["抢险救援"][20].avg
  675. // data1["抢险救援"][7].avg = data1["抢险救援"][21].avg + data1["抢险救援"][22].avg + data1["抢险救援"][23].avg
  676. // data1["抢险救援"][0].number = data1["抢险救援"][0].number + data1["抢险救援"][1].number + data1["抢险救援"][2].number
  677. // data1["抢险救援"][1].number = data1["抢险救援"][3].number + data1["抢险救援"][4].number + data1["抢险救援"][5].number
  678. // data1["抢险救援"][2].number = data1["抢险救援"][6].number + data1["抢险救援"][7].number + data1["抢险救援"][8].number
  679. // data1["抢险救援"][3].number = data1["抢险救援"][9].number + data1["抢险救援"][10].number + data1["抢险救援"][11].number
  680. // data1["抢险救援"][4].number = data1["抢险救援"][12].number + data1["抢险救援"][13].number + data1["抢险救援"][14].number
  681. // data1["抢险救援"][5].number = data1["抢险救援"][15].number + data1["抢险救援"][16].number + data1["抢险救援"][17].number
  682. // data1["抢险救援"][6].number = data1["抢险救援"][18].number + data1["抢险救援"][19].number + data1["抢险救援"][20].number
  683. // data1["抢险救援"][7].number = data1["抢险救援"][21].number + data1["抢险救援"][22].number + data1["抢险救援"][23].number
  684. // data1["抢险救援"][0].radio = data1["抢险救援"][0].radio + data1["抢险救援"][1].radio + data1["抢险救援"][2].radio
  685. // data1["抢险救援"][1].radio = data1["抢险救援"][3].radio + data1["抢险救援"][4].radio + data1["抢险救援"][5].radio
  686. // data1["抢险救援"][2].radio = data1["抢险救援"][6].radio + data1["抢险救援"][7].radio + data1["抢险救援"][8].radio
  687. // data1["抢险救援"][3].radio = data1["抢险救援"][9].radio + data1["抢险救援"][10].radio + data1["抢险救援"][11].radio
  688. // data1["抢险救援"][4].radio = data1["抢险救援"][12].radio + data1["抢险救援"][13].radio + data1["抢险救援"][14].radio
  689. // data1["抢险救援"][5].radio = data1["抢险救援"][15].radio + data1["抢险救援"][16].radio + data1["抢险救援"][17].radio
  690. // data1["抢险救援"][6].radio = data1["抢险救援"][18].radio + data1["抢险救援"][19].radio + data1["抢险救援"][20].radio
  691. // data1["抢险救援"][7].radio = data1["抢险救援"][21].radio + data1["抢险救援"][22].radio + data1["抢险救援"][23].radio
  692. // data2["火灾"][0].number = data2["火灾"][0].number + data2["火灾"][1].number + data2["火灾"][2].number
  693. // data2["火灾"][1].number = data2["火灾"][3].number + data2["火灾"][4].number + data2["火灾"][5].number
  694. // data2["火灾"][2].number = data2["火灾"][6].number + data2["火灾"][7].number + data2["火灾"][8].number
  695. // data2["火灾"][3].number = data2["火灾"][9].number + data2["火灾"][10].number + data2["火灾"][11].number
  696. // data2["火灾"][4].number = data2["火灾"][12].number + data2["火灾"][13].number + data2["火灾"][14].number
  697. // data2["火灾"][5].number = data2["火灾"][15].number + data2["火灾"][16].number + data2["火灾"][17].number
  698. // data2["火灾"][6].number = data2["火灾"][18].number + data2["火灾"][19].number + data2["火灾"][20].number
  699. // data2["火灾"][7].number = data2["火灾"][21].number + data2["火灾"][22].number + data2["火灾"][23].number
  700. // data2["火灾"][0].avg = data2["火灾"][0].avg + data2["火灾"][1].avg + data2["火灾"][2].avg
  701. // data2["火灾"][1].avg = data2["火灾"][3].avg + data2["火灾"][4].avg + data2["火灾"][5].avg
  702. // data2["火灾"][2].avg = data2["火灾"][6].avg + data2["火灾"][7].avg + data2["火灾"][8].avg
  703. // data2["火灾"][3].avg = data2["火灾"][9].avg + data2["火灾"][10].avg + data2["火灾"][11].avg
  704. // data2["火灾"][4].avg = data2["火灾"][12].avg + data2["火灾"][13].avg + data2["火灾"][14].avg
  705. // data2["火灾"][5].avg = data2["火灾"][15].avg + data2["火灾"][16].avg + data2["火灾"][17].avg
  706. // data2["火灾"][6].avg = data2["火灾"][18].avg + data2["火灾"][19].avg + data2["火灾"][20].avg
  707. // data2["火灾"][7].avg = data2["火灾"][21].avg + data2["火灾"][22].avg + data2["火灾"][23].avg
  708. // data2["火灾"][0].radio = data2["火灾"][0].radio + data2["火灾"][1].radio + data2["火灾"][2].radio
  709. // data2["火灾"][1].radio = data2["火灾"][3].radio + data2["火灾"][4].radio + data2["火灾"][5].radio
  710. // data2["火灾"][2].radio = data2["火灾"][6].radio + data2["火灾"][7].radio + data2["火灾"][8].radio
  711. // data2["火灾"][3].radio = data2["火灾"][9].radio + data2["火灾"][10].radio + data2["火灾"][11].radio
  712. // data2["火灾"][4].radio = data2["火灾"][12].radio + data2["火灾"][13].radio + data2["火灾"][14].radio
  713. // data2["火灾"][5].radio = data2["火灾"][15].radio + data2["火灾"][16].radio + data2["火灾"][17].radio
  714. // data2["火灾"][6].radio = data2["火灾"][18].radio + data2["火灾"][19].radio + data2["火灾"][20].radio
  715. // data2["火灾"][7].radio = data2["火灾"][21].radio + data2["火灾"][22].radio + data2["火灾"][23].radio
  716. // data3["社会救助"][1].avg = data3["社会救助"][3].avg + data3["社会救助"][4].avg + data3["社会救助"][5].avg
  717. // data3["社会救助"][2].avg = data3["社会救助"][6].avg + data3["社会救助"][7].avg + data3["社会救助"][8].avg
  718. // data3["社会救助"][3].avg = data3["社会救助"][9].avg + data3["社会救助"][10].avg + data3["社会救助"][11].avg
  719. // data3["社会救助"][4].avg = data3["社会救助"][12].avg + data3["社会救助"][13].avg + data3["社会救助"][14].avg
  720. // data3["社会救助"][5].avg = data3["社会救助"][15].avg + data3["社会救助"][16].avg + data3["社会救助"][17].avg
  721. // data3["社会救助"][6].avg = data3["社会救助"][18].avg + data3["社会救助"][19].avg + data3["社会救助"][20].avg
  722. // data3["社会救助"][7].avg = data3["社会救助"][21].avg + data3["社会救助"][22].avg + data3["社会救助"][23].avg
  723. // data3["社会救助"][1].number = data3["社会救助"][3].number + data3["社会救助"][4].number + data3["社会救助"][5].number
  724. // data3["社会救助"][2].number = data3["社会救助"][6].number + data3["社会救助"][7].number + data3["社会救助"][8].number
  725. // data3["社会救助"][3].number = data3["社会救助"][9].number + data3["社会救助"][10].number + data3["社会救助"][11].number
  726. // data3["社会救助"][4].number = data3["社会救助"][12].number + data3["社会救助"][13].number + data3["社会救助"][14].number
  727. // data3["社会救助"][5].number = data3["社会救助"][15].number + data3["社会救助"][16].number + data3["社会救助"][17].number
  728. // data3["社会救助"][6].number = data3["社会救助"][18].number + data3["社会救助"][19].number + data3["社会救助"][20].number
  729. // data3["社会救助"][7].number = data3["社会救助"][21].number + data3["社会救助"][22].number + data3["社会救助"][23].number
  730. // data3["社会救助"][1].radio = data3["社会救助"][3].radio + data3["社会救助"][4].radio + data3["社会救助"][5].radio
  731. // data3["社会救助"][2].radio = data3["社会救助"][6].radio + data3["社会救助"][7].radio + data3["社会救助"][8].radio
  732. // data3["社会救助"][3].radio = data3["社会救助"][9].radio + data3["社会救助"][10].radio + data3["社会救助"][11].radio
  733. // data3["社会救助"][4].radio = data3["社会救助"][12].radio + data3["社会救助"][13].radio + data3["社会救助"][14].radio
  734. // data3["社会救助"][5].radio = data3["社会救助"][15].radio + data3["社会救助"][16].radio + data3["社会救助"][17].radio
  735. // data3["社会救助"][6].radio = data3["社会救助"][18].radio + data3["社会救助"][19].radio + data3["社会救助"][20].radio
  736. // data3["社会救助"][7].radio = data3["社会救助"][21].radio + data3["社会救助"][22].radio + data3["社会救助"][23].radio
  737. data1["抢险救援"] = data1["抢险救援"].splice(0,8)
  738. data2["火灾"] = data2["火灾"].splice(0,8)
  739. data3["社会救助"]= data3["社会救助"].splice(0,8)
  740. let dataarr = []
  741. dataarr["抢险救援"] = data1["抢险救援"]
  742. dataarr["火灾"] = data2["火灾"]
  743. dataarr["社会救助"] = data3["社会救助"]
  744. this.houseList =dataarr
  745. }
  746. this.$refs.lineSmooth.getData();
  747. },
  748. /**
  749. * @历史警情趋势图
  750. * @api接口请求
  751. */
  752. async alertStatisticsByMonthApi() {
  753. let day = new Date().getDate().length>1 ? new Date().getDate() : '0' + new Date().getDate()
  754. let a = getYearMonthDateSFN().split(" ")[0].slice(5,7)
  755. let b =Math.abs(a)
  756. let c = getMonthStartAndEnd(b)[1].slice(-2)
  757. let res = await this.$axios.get(
  758. this.$api.jqzhcz.alertStatisticsByMonth2 +
  759. "?" +
  760. this.$qs.stringify({
  761. streetTown: this.stroes.$state.streetTown, //街镇
  762. startTime: new Date().getFullYear() - this.timeArea + "-" + (new Date().getMonth() + 1) + "-" + day + " 00:00:00",
  763. endTime: new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + c + " 00:00:00",
  764. })
  765. );
  766. if (res) {
  767. this.monthList = res.data;
  768. // this.$refs.barChart.getData();
  769. }
  770. },
  771. /**
  772. * @警情处置情况
  773. * @api接口请求
  774. */
  775. async proptionApi() {
  776. //旧
  777. let res = await this.$axios.get(this.$api.jqzhcz.alertStatisticsByMonth3 +
  778. "?" +
  779. this.$qs.stringify({
  780. // startTime: this.stores.$state.timeList[0] || "",
  781. // endTime: this.stores.$state.timeList[1] || "",
  782. startTime: getMonthStartDate(),
  783. endTime: getMonthEndDate(),
  784. // startTime: (dayjs().subtract(30, 'day').format('YYYY-MM-DD HH:mm:ss')).slice(0,10) + " 00:00:00" ,
  785. // endTime: (dayjs().subtract(0, 'day').format('YYYY-MM-DD HH:mm:ss')).slice(0,10) + " 00:00:00" ,
  786. }));
  787. if (res){
  788. // this.proptionList = res.data;
  789. // this.proptionList[4] = res.data.reduce((data, rel) => {
  790. // return data + rel.number;
  791. // }, 0);
  792. let total = 0
  793. let data = res.data
  794. for(let i =0;i<data.length -1;i++){
  795. data[i].radio = data[i].radio.toFixed(2)
  796. total += data.number
  797. data.total = total
  798. data[0].color = ["#BF4216 ","#F68E6A"]
  799. data[1].color = ["#06B1B9 ","#14E1EA"]
  800. data[2].color = ["#E4951E ","#F8ED41"]
  801. }
  802. this.proptionList = data.slice(0,3)
  803. }
  804. // let res1 = await this.$axios.get(
  805. // this.$api.jqzhcz.alertStatistics +
  806. // "?" +
  807. // this.$qs.stringify({
  808. // streetTown: this.stroes.$state.streetTown, //街镇
  809. // startTime: "2021-01-01",
  810. // endTime: "2021-12-31",
  811. // })
  812. // );
  813. // if (res1.data.length > 0) {
  814. // this.proptionList = res1.data;
  815. // }
  816. },
  817. /**
  818. * @实时警情处理
  819. * @api接口请求
  820. */
  821. getPageApi() {
  822. let a = getYearMonthDateSFN().split(" ")[0].slice(5,7)
  823. let b =Math.abs(a-1)
  824. let c = getMonthStartAndEnd(b)[1].slice(-2)
  825. let startTime = undefined
  826. let endTime = undefined
  827. startTime = getYearMonthDateSFN().split(" ")[0] + " 00:00:00"
  828. endTime = getYearMonthDateSFN().split(" ")[0]+ " 23:59:59"
  829. this.$axios.get(
  830. this.$api.jqzhcz.page2 +
  831. "?" +
  832. this.$qs.stringify({
  833. streetTown: this.stroes.$state.streetTown, //街镇
  834. current: 1,
  835. size: 150,
  836. startTime:startTime,
  837. // startTime:"2022-12-01 00:00:00",
  838. endTime:endTime,
  839. })
  840. ).then(res=>{
  841. let data = res.data.records
  842. for(let i =0;i<data.length;i++){
  843. data[i].lasj2 = data[i].lasj.slice(0,10)
  844. }
  845. this.tableData = data
  846. if(this.checkedArray.checkedData[0] == 111){
  847. this.sadian(111,data,1)
  848. }
  849. })
  850. },
  851. // 警情详情
  852. async getXiangqingPage() {
  853. let res = await this.$axios.get(
  854. this.$api.jqzhcz.page2 +
  855. "?" +
  856. this.$qs.stringify({
  857. // fireType: this.barForm.fireType,
  858. current: 1,
  859. size: 10,
  860. })
  861. );
  862. },
  863. async getXiangqingOne() {
  864. let res = await this.$axios.get(
  865. this.$api.jqzhcz.one +
  866. "?" +
  867. this.$qs.stringify({
  868. id: "00021f6556c34d44a75ea287f40bed42",
  869. })
  870. );
  871. },
  872. /**
  873. * @实时告警撒点
  874. * @api接口请求
  875. */
  876. async warningInstanceScattererApi() {
  877. let res = await this.$axios.get(
  878. this.$api.jqzhcz.warningInstanceScatterer +
  879. "?" +
  880. this.$qs.stringify({
  881. streetTown: this.stroes.$state.streetTown, //街镇
  882. })
  883. );
  884. if (res.data.length > 0) {
  885. this.initMarkers(res.data, "警情综合处置", 6);
  886. } else {
  887. this.initMarkers([], "警情综合处置", 6);
  888. }
  889. },
  890. /**
  891. * @高德地图聚合撒点
  892. */
  893. async mapCluster() {
  894. var label = "";
  895. this.checkedArray.checkedList.forEach((val) => {
  896. if (val.value == this.checkedArray.checkedData[0]) {
  897. label = val.label;
  898. }
  899. });
  900. let res = await this.$axios.get(
  901. this.$api.jqzhcz.pageMap +
  902. "?" +
  903. this.$qs.stringify({
  904. streetTown: this.stroes.$state.streetTown, //街镇
  905. scattererType: label,
  906. })
  907. );
  908. if (res.data.length > 0) {
  909. this.initMarkers(res.data, "警情综合处置", this.checkedArray.checkedData[0]);
  910. } else {
  911. this.initMarkers([], "警情综合处置", this.checkedArray.checkedData[0]);
  912. }
  913. },
  914. selectArray(id){
  915. this.checkedArray.checkedData[0] = 4
  916. let data = this.checkedSelectArray.filter((val)=>{
  917. if(val.value == id){
  918. return val.label
  919. }
  920. })
  921. this.checkedSelectLabel = data[0].label
  922. this.checkboxChange(id)
  923. },
  924. /**
  925. * 测绘院撒点
  926. */
  927. async sadian(id,data,T111) {
  928. let arr = []
  929. if(id == 40 ){
  930. this.$axios.post(this.$api.fireSite.demFireStationList,
  931. {
  932. streetTown:this.stroes.$state.streetTown,
  933. stationType:[1,2,3,4]
  934. }
  935. ).then((res) => {
  936. for(let i=0;i<res.data.length;i++){
  937. arr[i] = {}
  938. arr[i].id = res.data[i].id
  939. arr[i].stationName = res.data[i].stationName
  940. arr[i].stationAddress = res.data[i].stationAddress
  941. arr[i].stationType = res.data[i].stationType
  942. arr[i].longitude = res.data[i].longitude
  943. arr[i].latitude = res.data[i].latitude
  944. arr[i].type = "消防站"
  945. }
  946. console.log(arr)
  947. this.addMarker(arr, "rescue-station","消防站");
  948. });
  949. }
  950. if(id == 41 ){
  951. this.$axios.post(this.$api.fireSite.demFireStationList,
  952. {
  953. streetTown:this.stroes.$state.streetTown,
  954. stationType:[4]
  955. }
  956. ).then((res) => {
  957. for(let i=0;i<res.data.length;i++){
  958. arr[i] = {}
  959. arr[i].id = res.data[i].id
  960. arr[i].stationName = res.data[i].stationName
  961. arr[i].stationAddress = res.data[i].stationAddress
  962. arr[i].stationType = res.data[i].stationType
  963. arr[i].longitude = res.data[i].longitude
  964. arr[i].latitude = res.data[i].latitude
  965. arr[i].type = "专职队"
  966. }
  967. this.addMarker(arr, "rescue-station","专职队");
  968. });
  969. }
  970. if(id == 42 ){
  971. this.$axios.get(this.$api.fireSite.demStreetMicroStationList + "?" +
  972. this.$qs.stringify({
  973. streetTown:this.stroes.$state.streetTown,
  974. })).then((res) => {
  975. for(let i=0;i<res.data.length;i++){
  976. res.data[i].stationType = 5
  977. arr.push(res.data[i])
  978. }
  979. this.addMarker(arr, "rescue-station","微型消防站");
  980. });
  981. }
  982. if(id==44){
  983. this.$axios.post(this.$api.water.baseGgpFacilityList,{
  984. "facilityType": [
  985. 13,14
  986. ] ,
  987. streetTown:this.stroes.$state.streetTown,
  988. }).then((res) => {
  989. console.log(res)
  990. for(let i=0;i<res.data.length;i++){
  991. res.data[i].stationType = 112
  992. arr.push(res.data[i])
  993. }
  994. this.addMarker(arr, "rescue-station","企业消防");
  995. });
  996. }
  997. if(id==45){
  998. this.$axios.post(this.$api.water.baseGgpFacilityList,{
  999. "facilityType": [
  1000. 15,16
  1001. ] ,
  1002. streetTown:this.stroes.$state.streetTown,
  1003. }).then((res) => {
  1004. console.log(res)
  1005. for(let i=0;i<res.data.length;i++){
  1006. res.data[i].stationType = 112
  1007. arr.push(res.data[i])
  1008. }
  1009. this.addMarker(arr, "rescue-station","社区消防");
  1010. });
  1011. }
  1012. if(id == 46 ){
  1013. this.$axios.post(this.$api.water.baseGgpFacilityList,{
  1014. "facilityType": [
  1015. 17
  1016. ] ,
  1017. streetTown:this.stroes.$state.streetTown,
  1018. }).then((res) => {
  1019. console.log(res)
  1020. for(let i=0;i<res.data.length;i++){
  1021. res.data[i].stationType = 17
  1022. arr.push(res.data[i])
  1023. }
  1024. this.addMarker(arr, "rescue-station","一级微型消防站");
  1025. });
  1026. }
  1027. if(id == 47 ){
  1028. this.$axios.post(this.$api.water.baseGgpFacilityList,{
  1029. "facilityType": [
  1030. 18
  1031. ] ,
  1032. streetTown:this.stroes.$state.streetTown,
  1033. }).then((res) => {
  1034. for(let i=0;i<res.data.length;i++){
  1035. res.data[i].stationType = 18
  1036. arr.push(res.data[i])
  1037. }
  1038. this.addMarker(arr, "rescue-station","街镇专职消防队");
  1039. });
  1040. }
  1041. if(id == 111 ){
  1042. if(T111){
  1043. if(data){
  1044. for(let i =0;i<data.length;i++){
  1045. if(!data[i].fdsj){
  1046. arr.push(data[i])
  1047. }
  1048. }
  1049. this.addMarker(arr, "comprehensive-disposal","实时警情");
  1050. }else{
  1051. this.addMarker([], "comprehensive-disposal","实时警情");
  1052. }
  1053. }else{
  1054. this.getPageApi()
  1055. }
  1056. }
  1057. if(id == 5 || id == 6 ){
  1058. this.addMarker([], "comprehensive-disposal","监控");
  1059. }
  1060. // await this.$axios
  1061. // .get(
  1062. // this.$api.jqzhcz.pageMap +
  1063. // "?" +
  1064. // this.$qs.stringify({
  1065. // streetTown: this.stroes.$state.streetTown,
  1066. // scattererType: this.checkedArray.checkedList[this.checkedArray.checkedData[0]].label,
  1067. // })
  1068. // )
  1069. // .then((res) => {
  1070. // if (res.data.length > 0) {
  1071. // //点分布
  1072. // let data = res.data;
  1073. // let arr = [];
  1074. // for (let i = 0; i < data.length; i++) {
  1075. // if(data[i].stationName.includes("消防站")){
  1076. // arr.push(data[i])
  1077. // for(let i =0;i<arr.length;i++){
  1078. // arr[i].gisX = arr[i].longitude
  1079. // arr[i].gisY = arr[i].latitude
  1080. // }
  1081. // }
  1082. // }
  1083. // setTimeout(()=>{
  1084. // this.addMarker(arr.splice(0, 500), "comprehensive-disposal",this.checkedArray.checkedList[this.checkedArray.checkedData[0]].label);
  1085. // },1000)
  1086. // } else {
  1087. // this.addMarker([], "comprehensive-disposal",this.checkedArray.checkedList[this.checkedArray.checkedData[0]].label);
  1088. // }
  1089. // });
  1090. },
  1091. /**
  1092. * 撒点测绘院、高德
  1093. */
  1094. /**
  1095. * 撒点街镇选择
  1096. */
  1097. checkStreetTown(value) {
  1098. let data = undefined;
  1099. for (let i = 0; i < this.stroes.$state.mhjz.length; i++) {
  1100. if (this.stroes.$state.streetTown == this.stroes.$state.mhjz[i].streetTown) {
  1101. data = this.stroes.$state.mhjz[i];
  1102. break;
  1103. }
  1104. }
  1105. if(!this.stroes.$state.streetTown){
  1106. data = this.stroes.$state.mhjz[0]
  1107. }
  1108. if (this.stroes.$state.mapBool == 2) {
  1109. this.streetTownSwitch(data);
  1110. this.sadianSelect();
  1111. } else {
  1112. this.getStreetTownClick();
  1113. }
  1114. },
  1115. },
  1116. };
  1117. </script>
  1118. <style lang="scss" scoped>
  1119. .contentBox {
  1120. .leftBox {
  1121. .leftTop {
  1122. height: 50%;
  1123. max-height: 50%;
  1124. justify-content: center;
  1125. align-items: center;
  1126. .leftTopContent {
  1127. width: 100%;
  1128. height: calc(100% - 0.4375rem);
  1129. .fireBar {
  1130. padding-top: 0.125rem;
  1131. height: calc(100% - 0.125rem);
  1132. }
  1133. }
  1134. }
  1135. .leftCenter {
  1136. height: 50%;
  1137. max-height: 50%;
  1138. padding-top: 0.125rem;
  1139. box-sizing: border-box;
  1140. .leftCenterContent {
  1141. width: 100%;
  1142. height: calc(100% - 0.4375rem);
  1143. .contentEcharts {
  1144. height: calc(100% - 0.25rem);
  1145. padding: 0.125rem 0;
  1146. }
  1147. }
  1148. }
  1149. }
  1150. .rightBox {
  1151. .rightTop {
  1152. height: 35%;
  1153. max-height: 35%;
  1154. color: #ffffff;
  1155. .rightTop2{
  1156. >.el-col{
  1157. >div{
  1158. >div:nth-child(1){
  1159. margin:0.3rem 0;
  1160. }
  1161. >div:nth-child(3){
  1162. width:50%;
  1163. margin:0.2rem auto;
  1164. padding:.075rem;
  1165. border-radius: .25rem;
  1166. box-shadow: inset 0 0 0.05rem 0.05rem rgba(27, 79, 144, 1);
  1167. background: rgba(#132A5A, 0.2) !important;
  1168. span{
  1169. margin-left:0.075rem
  1170. }
  1171. }
  1172. }
  1173. }
  1174. }
  1175. // .rightTopContent {
  1176. // width: 100%;
  1177. // height: calc(100% - 0.4375rem);
  1178. // display: flex;
  1179. // align-items: center;
  1180. // & > .el-row {
  1181. // flex: 1;
  1182. // display: flex;
  1183. // flex-direction: column;
  1184. // .type {
  1185. // margin-top: 0.2rem;
  1186. // font-size: 0.2rem;
  1187. // text-align: center;
  1188. // justify-content: center;
  1189. // }
  1190. // .param {
  1191. // width: 100%;
  1192. // margin: 0.125rem auto;
  1193. // text-align: center;
  1194. // justify-content: center;
  1195. // span {
  1196. // font-size: 0.2rem;
  1197. // }
  1198. // .number {
  1199. // color: #66ffff;
  1200. // text-align: center;
  1201. // font-size: 0.3rem !important;
  1202. // display: block;
  1203. // top: -0.4rem;
  1204. // }
  1205. // }
  1206. // .img {
  1207. // img {
  1208. // width: 60%;
  1209. // margin: 0.1rem 20% 0;
  1210. // }
  1211. // }
  1212. // }
  1213. // }
  1214. }
  1215. .rightCenter {
  1216. height: calc(35% - 0.125rem);
  1217. max-height: calc(35% - 0.125rem);
  1218. margin-top: 0.125rem;
  1219. .rightCenterContent {
  1220. height: calc(100% - 0.4375rem);
  1221. }
  1222. :deep(.cell) {
  1223. text-align: center !important;
  1224. }
  1225. :deep(td) {
  1226. min-width: auto !important;
  1227. width: auto !important;
  1228. text-align: left !important;
  1229. padding: 0;
  1230. }
  1231. :deep(.box-card) {
  1232. position: absolute;
  1233. right: 0;
  1234. bottom: 0;
  1235. margin: auto;
  1236. border-radius: 3%;
  1237. width: 80%;
  1238. max-height: 100%;
  1239. box-shadow: inset 0 0 0.2rem 0.0125rem #30cfff;
  1240. background: rgba(0, 44, 110, 0.6);
  1241. border: none;
  1242. color: #fff;
  1243. .el-card__header {
  1244. padding: 0.125rem;
  1245. border-color: #30cfff;
  1246. .card-header {
  1247. display: flex;
  1248. font-size: 0.2rem;
  1249. justify-content: space-between;
  1250. align-items: center;
  1251. i {
  1252. font-size: 0.275rem;
  1253. }
  1254. }
  1255. }
  1256. img {
  1257. width: 100%;
  1258. height: auto;
  1259. }
  1260. }
  1261. }
  1262. .rightBottom {
  1263. height: calc(30% - 0.125rem);
  1264. max-height: calc(30% - 0.125rem);
  1265. margin-top: 0.125rem;
  1266. .monitor-list {
  1267. height: calc(100% - 0.4375rem);
  1268. overflow: hidden;
  1269. > .list {
  1270. border: 1px solid #3a7e8e;
  1271. margin-top: 0.2rem;
  1272. position: relative;
  1273. .videoSelect {
  1274. position: absolute;
  1275. width: 100%;
  1276. border: none !important;
  1277. }
  1278. }
  1279. .hlsVideo {
  1280. width: 100%;
  1281. }
  1282. }
  1283. iframe {
  1284. border: none;
  1285. }
  1286. }
  1287. .rightTop1 {
  1288. height: 50%;
  1289. max-height: 50%;
  1290. .rightTopContent {
  1291. flex: 1;
  1292. width: 100%;
  1293. height: calc(100% - 0.4375rem);
  1294. align-items: center;
  1295. overflow-y: scroll;
  1296. overflow-x: hidden;
  1297. scrollbar-width: none;
  1298. /* firefox */
  1299. -ms-overflow-style: none;
  1300. /* IE 10+ */
  1301. overflow-x: hidden;
  1302. overflow-y: auto;
  1303. &::-webkit-scrollbar {
  1304. display: none;
  1305. // opacity: 0;
  1306. /* Chrome Safari */
  1307. }
  1308. & > .el-col {
  1309. width: 28%;
  1310. height: 45%;
  1311. border-radius: 0.0625rem;
  1312. margin: 0.1rem;
  1313. flex: none;
  1314. box-shadow: inset 0 0 0.05rem 0.05rem rgba(27, 79, 144, 1);
  1315. background: rgba(#132a5a, 0.8) !important;
  1316. display: flex;
  1317. flex-direction: column;
  1318. font-size: 0.2rem;
  1319. color: #dbe9ea;
  1320. font-weight: 400;
  1321. // font-family: Microsoft YaHei Regular, Microsoft YaHei Regular-Regular;
  1322. .el-col {
  1323. flex: none;
  1324. overflow: hidden;
  1325. }
  1326. .rank {
  1327. padding: 0.125rem 0;
  1328. text-align: center;
  1329. box-sizing: border-box;
  1330. }
  1331. .propName {
  1332. padding: 0.125rem 0;
  1333. text-align: center;
  1334. box-sizing: border-box;
  1335. }
  1336. & .el-col:nth-child(2) {
  1337. flex: 1;
  1338. img {
  1339. // width: 100%;
  1340. height: 100%;
  1341. // objec-fit: cover;
  1342. margin: 0 auto;
  1343. display: block;
  1344. }
  1345. }
  1346. }
  1347. .day:nth-child(3n - 2) {
  1348. margin-left: 5%;
  1349. }
  1350. }
  1351. }
  1352. .rightCenter1 {
  1353. height: calc(50% - 0.125rem);
  1354. max-height: calc(50% - 0.125rem);
  1355. margin-top: 0.125rem;
  1356. color: #ffffff;
  1357. .rightCenterContent {
  1358. width: 100%;
  1359. height: calc(100% - 0.4375rem);
  1360. overflow: scroll;
  1361. position: relative;
  1362. & > .el-row {
  1363. overflow: hidden;
  1364. width: 100%;
  1365. height: auto;
  1366. & > .title {
  1367. width: 100%;
  1368. height: 0.4375rem;
  1369. line-height: 0.4375rem;
  1370. font-size: 0.175rem;
  1371. padding: 0 0.125rem;
  1372. background: rgba(115, 251, 253, 0.3) !important;
  1373. margin-bottom: 0.025rem;
  1374. }
  1375. & > .data {
  1376. width: 100%;
  1377. font-size: 0.175rem;
  1378. padding: 0 0.125rem;
  1379. background: rgba(115, 251, 253, 0.1) !important;
  1380. margin-bottom: 0.025rem;
  1381. white-space: initial;
  1382. .el-col {
  1383. line-height: 0.35rem;
  1384. }
  1385. }
  1386. }
  1387. &::-webkit-scrollbar {
  1388. display: none;
  1389. }
  1390. }
  1391. }
  1392. }
  1393. }
  1394. .tableTooltip {
  1395. width: 400px;
  1396. }
  1397. .liucheng {
  1398. width: 100%;
  1399. position: relative;
  1400. padding: 20px;
  1401. img {
  1402. width: 100%;
  1403. }
  1404. .jz {
  1405. font-size: 14px;
  1406. color: #fff;
  1407. list-style: 50%;
  1408. text-align: center;
  1409. position: absolute;
  1410. top: 35%;
  1411. width: 23%;
  1412. text-align: center;
  1413. }
  1414. }
  1415. .tipdan {
  1416. background: url("~@a/img/qyzz/baogao.png") no-repeat;
  1417. background-size: 100% 100%;
  1418. margin: 10px 10px 0 0;
  1419. font-size: 14px;
  1420. padding: 4px;
  1421. text-align: center;
  1422. }
  1423. ::v-deep .monitor-list .el-input__inner{
  1424. border-radius: 0 !important;
  1425. border:none;
  1426. border-bottom:1px solid #3a7e8e;
  1427. }
  1428. </style>