facilitydistribute.vue 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418
  1. <!-- -->
  2. <template>
  3. <div
  4. class="pestbox"
  5. v-loading="pestboxloading"
  6. element-loading-text="拼命加载中"
  7. element-loading-spinner="el-icon-loading"
  8. element-loading-background="rgba(0, 0, 0, 0.8)"
  9. >
  10. <!-- <div
  11. :style="{ height: '100%', width: '100%' }"
  12. id="mychart"
  13. ref="mychart"
  14. ></div> -->
  15. <div class="amap-demo" id="mapContainer2"></div>
  16. <div class="searchbox">
  17. <el-select
  18. v-model="point_type"
  19. placeholder="请选择"
  20. size="mini"
  21. clearable
  22. @change="handlePointTypeChange"
  23. >
  24. <el-option
  25. v-for="item in pointTypeOptions"
  26. :key="item.id"
  27. :label="item.name"
  28. :value="item.id"
  29. >
  30. </el-option>
  31. </el-select>
  32. <el-select
  33. v-model="typevalue"
  34. placeholder="请选择设备类型"
  35. size="mini"
  36. clearable
  37. @change="search"
  38. >
  39. <el-option
  40. v-for="item in typeoptions"
  41. :key="item.type_id"
  42. :label="item.type_name"
  43. :value="item.type_id"
  44. >
  45. </el-option>
  46. </el-select>
  47. <el-select
  48. v-model="versionsvalue2"
  49. placeholder="请选择隶属组织"
  50. size="mini"
  51. clearable
  52. filterable
  53. @change="search"
  54. >
  55. <el-option
  56. v-for="item in versionsoptions2"
  57. :key="item.org_id"
  58. :label="item.org_name"
  59. :value="item.org_id"
  60. >
  61. </el-option>
  62. </el-select>
  63. <el-select
  64. v-model="statevalue"
  65. placeholder="请选择设备状态"
  66. size="mini"
  67. clearable
  68. @change="search"
  69. >
  70. <el-option
  71. v-for="item in stateoptions"
  72. :key="item.value"
  73. :label="item.label"
  74. :value="item.value"
  75. >
  76. </el-option>
  77. </el-select>
  78. <el-select
  79. v-model="inoffvalue"
  80. placeholder="请选择所在监测点"
  81. size="mini"
  82. clearable
  83. filterable
  84. @change="search"
  85. >
  86. <el-option
  87. v-for="item in inoffoptions"
  88. :key="item.point_id"
  89. :label="item.point_name"
  90. :value="item.point_id"
  91. >
  92. </el-option>
  93. </el-select>
  94. <div class="inputbox">
  95. <el-input
  96. v-model="idinput"
  97. placeholder="请输入设备编号"
  98. size="mini"
  99. ></el-input>
  100. </div>
  101. <el-button type="info" @click="search" size="mini">搜索</el-button>
  102. <el-button @click="reset" size="mini">重置</el-button>
  103. </div>
  104. <div class="tallybox">
  105. <div
  106. class="tallybox_item"
  107. v-for="(item, key) in deviceTypeDataSource"
  108. :key="key"
  109. >
  110. <!-- <img src="../../../static/images/homepage/cbd.png" alt="" /> -->
  111. <!-- <d-icon type="location"></d-icon> -->
  112. <i
  113. class="minggao-iconfont minggao-icontuding"
  114. :style="{ color: item.colour }"
  115. ></i>
  116. <p>
  117. {{ item.type_name }}:<span
  118. :style="{ color: item.colour || '#27c2ff' }"
  119. >{{ item.num }}台</span
  120. >
  121. </p>
  122. </div>
  123. <!-- <div class="tallybox_item">
  124. <img src="../../../static/images/homepage/ybq.png" alt="" />
  125. <p>
  126. 实蝇诱捕器:<span style="color: #ff00ff">{{ ybqnum }}台</span>
  127. </p>
  128. </div>
  129. <div class="tallybox_item" v-if="isShowMonitorInfo">
  130. <img src="../../../static/images/homepage/jk.png" alt="" />
  131. <p>
  132. 监控设备:<span style="color: #e94c3e">{{ jknum }}台</span>
  133. </p>
  134. </div> -->
  135. </div>
  136. <div class="path-box">
  137. <div
  138. class="tracklistbox"
  139. :class="{ hide: !pathBoxVisible }"
  140. v-loading="trackloading"
  141. element-loading-text="拼命加载中"
  142. element-loading-spinner="el-icon-loading"
  143. element-loading-background="rgba(0, 0, 0, 0.8)"
  144. >
  145. <el-date-picker
  146. v-model="tracktime"
  147. type="date"
  148. size="mini"
  149. placeholder="选择日期"
  150. @change="timechange"
  151. >
  152. </el-date-picker>
  153. <div class="tracklist">
  154. <div class="tracklist_tilte" v-if="tracklistdata.length == 0">
  155. 暂无数据
  156. </div>
  157. <div
  158. class="tracklist_item"
  159. v-for="(item, index) in tracklistdata"
  160. :key="index"
  161. >
  162. <div class="tracklist_item_text">
  163. <p
  164. :style="{
  165. 'background-color':
  166. tracklistdata_backups[trackpage] &&
  167. tracklistdata_backups[trackpage][index] &&
  168. tracklistdata_backups[trackpage][index].color
  169. }"
  170. >
  171. {{ item.user_name.slice(0, 1) }}
  172. </p>
  173. <p>{{ item.user_name }}</p>
  174. </div>
  175. <div
  176. :class="
  177. (tracklistdata_backups[trackpage] &&
  178. tracklistdata_backups[trackpage][index] &&
  179. tracklistdata_backups[trackpage][index].type &&
  180. 'tracklist_btn tracklist_btn_none') ||
  181. 'tracklist_btn'
  182. "
  183. @click="seeteack(item, index)"
  184. >
  185. {{
  186. (tracklistdata_backups[trackpage] &&
  187. tracklistdata_backups[trackpage][index] &&
  188. tracklistdata_backups[trackpage][index].type &&
  189. '关闭') ||
  190. '查看轨迹'
  191. }}
  192. </div>
  193. </div>
  194. </div>
  195. <el-pagination
  196. v-if="tracklistdata.length"
  197. background
  198. layout="prev, pager, next"
  199. :total="total"
  200. :key="pagekey"
  201. :page-size="5"
  202. :small="true"
  203. :pager-count="3"
  204. @current-change="handleCurrentChange"
  205. >
  206. </el-pagination>
  207. </div>
  208. <img
  209. src="~@/assets/images/home/path.png"
  210. alt=""
  211. class="path-box__action"
  212. @click="pathBoxVisible = !pathBoxVisible"
  213. />
  214. </div>
  215. <div class="piebox">
  216. <p
  217. :class="
  218. pietf ? 'iconbox el-icon-arrow-right' : 'iconbox el-icon-arrow-left'
  219. "
  220. @click="pietf = !pietf"
  221. style="cursor: pointer"
  222. ></p>
  223. <div class="tishi" :style="{ width: width }" v-if="baseinfo.length == 0">
  224. <!-- <p>请点击设备标点,查看设备详情</p> -->
  225. <p>暂无数据</p>
  226. </div>
  227. <div
  228. v-else
  229. :style="{ width: width }"
  230. id="mychartpie"
  231. ref="mychartpie"
  232. v-loading="loading"
  233. element-loading-text="拼命加载中"
  234. element-loading-spinner="el-icon-loading"
  235. element-loading-background="rgba(0, 0, 0, 0.8)"
  236. >
  237. <div class="infobox">
  238. <h3>设备信息</h3>
  239. <p>
  240. <span>设备名称:</span
  241. ><span>{{
  242. baseinfo[0].device_name == '' ? '诱捕器' : baseinfo[0].device_name
  243. }}</span>
  244. </p>
  245. <p>
  246. <span>设备编号:</span><span>{{ baseinfo[0].device_id }}</span>
  247. </p>
  248. <p>
  249. <span>所属监测点:</span><span>{{ baseinfo[0].poin_name }}</span>
  250. </p>
  251. <p>
  252. <span>隶属组织:</span
  253. ><span
  254. v-for="item in baseinfo[0].temp_org_list"
  255. :key="item.org_id"
  256. style="margin-rignt: 10px"
  257. >{{ item.org_name }}</span
  258. >
  259. </p>
  260. </div>
  261. <div class="wornbox" v-if="device_type_id == 4">
  262. <h3>有害生物监测信息(统计)</h3>
  263. <div class="wornbox_item">
  264. <p v-for="(item, index) in baseinfo[0].pest_list" :key="index">
  265. <span>{{ item.pest_name }}</span
  266. ><span>{{ item.sum }}</span>
  267. </p>
  268. <p
  269. style="color: #ccc; width: 100%; text-align: center"
  270. v-if="baseinfo[0].pest_list.length == 0"
  271. >
  272. 暂无数据
  273. </p>
  274. </div>
  275. </div>
  276. <div class="cbdinfobox" v-if="device_type_id == 3">
  277. <h3>设备状态</h3>
  278. <div class="cbdinfobox_item">
  279. <p>
  280. 环境温度:<span>{{ baseinfo[0].device_data.at }} ℃</span>
  281. </p>
  282. <p>
  283. 环境湿度:<span>{{ baseinfo[0].device_data.ah }} %RH</span>
  284. </p>
  285. </div>
  286. <div class="cbdinfobox_item">
  287. <p>
  288. 设备开关:<span>{{
  289. baseinfo[0].device_data.ds == 0 ? '关机' : '开机'
  290. }}</span>
  291. </p>
  292. <p>
  293. 工作状态:<span>{{
  294. baseinfo[0].device_data.ws == 0 ? '待机' : '工作'
  295. }}</span>
  296. </p>
  297. </div>
  298. <div class="cbdinfobox_item">
  299. <p>
  300. 信号强度:<span>{{ baseinfo[0].device_data.csq }}</span>
  301. </p>
  302. <p>
  303. 最新上报时间:<span>{{ baseinfo[0].uptime }}</span>
  304. </p>
  305. </div>
  306. </div>
  307. <div class="cbdimg" v-if="device_type_id == 3">
  308. <h3 class="title">最新虫情图片</h3>
  309. <el-carousel :interval="5000" arrow="always">
  310. <el-carousel-item
  311. v-for="(item, index) in baseinfo[0].photo_data"
  312. :key="index"
  313. >
  314. <img :src="item.addr" alt="" />
  315. </el-carousel-item>
  316. </el-carousel>
  317. </div>
  318. <div class="videoBonbox" v-if="device_type_id == 6">
  319. <h3 class="title">实时监控</h3>
  320. <div id="videoBon"></div>
  321. </div>
  322. </div>
  323. </div>
  324. <div class="measurebox">
  325. <div
  326. :class="
  327. measure_index == 1 ? 'measurebox_item selmea' : 'measurebox_item'
  328. "
  329. @click="measure_distance"
  330. >
  331. <i class="iconfont icon-ceju"></i>
  332. <p>测距</p>
  333. </div>
  334. <p class="measurebox_line"></p>
  335. <div
  336. :class="
  337. measure_index == 2 ? 'measurebox_item selmea' : 'measurebox_item'
  338. "
  339. @click="measure_area"
  340. >
  341. <i class="iconfont icon-mianji"></i>
  342. <p>测面</p>
  343. </div>
  344. <!-- <p @click="measure_close">关闭</p> -->
  345. </div>
  346. </div>
  347. </template>
  348. <script>
  349. //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  350. import * as echarts from 'echarts';
  351. import '../../../node_modules/echarts/map/js/china';
  352. import DIcon from '@/components/Icon';
  353. import { normalization } from '@/util/helpers';
  354. import { map, assign, filter } from 'lodash-es';
  355. import { pointTypeOptions } from '@/util/constants';
  356. export default {
  357. //import引入的组件需要注入到对象中才能使用
  358. components: { DIcon },
  359. data() {
  360. //这里存放数据
  361. return {
  362. pietf: false,
  363. width: '0px',
  364. point_type: '', //监测点类型 1 表示 林木害虫监测点。2 表示 实蝇监测点
  365. pointTypeOptions: pointTypeOptions,
  366. inoffvalue: '', //监测点 选择
  367. inoffoptions: [], //监测点列表
  368. versionsvalue2: '', //隶属组织 选择
  369. versionsoptions2: [], //隶属组织列表
  370. statevalue: '', //设备状态
  371. stateoptions: [
  372. {
  373. value: '0',
  374. label: '停用(离线)'
  375. },
  376. {
  377. value: '1',
  378. label: '正常(在线)'
  379. }
  380. ], //设备状态列表
  381. typevalue: '', //设备类型
  382. typeoptions: [], //设备类型 列表
  383. idinput: '', //设备编号
  384. baseinfo: [
  385. {
  386. device_data: {
  387. at: '',
  388. ah: '',
  389. ds: '',
  390. ws: '',
  391. csq: ''
  392. },
  393. uptime: '',
  394. pest_list: []
  395. }
  396. ], //设备详情
  397. loading: false,
  398. device_type_id: 0,
  399. myVideo2: {},
  400. pestboxloading: false,
  401. center: [114.052758, 22.545817],
  402. cbdnum: 0,
  403. jknum: 0,
  404. ybqnum: 0,
  405. measure_index: 0,
  406. mouseTool: null,
  407. tracktime: '',
  408. tracklistdata: [],
  409. color: [
  410. 'rgb(197, 92, 142)',
  411. 'rgb(197, 32, 157)',
  412. 'rgb(206, 12, 55)',
  413. 'rgb(146, 78, 23)',
  414. 'rgb(173, 64, 221)',
  415. 'rgb(234, 169, 70)',
  416. 'rgb(123, 133, 244)',
  417. 'rgb(107, 27, 92)',
  418. 'rgb(13, 165, 14)',
  419. 'rgb(53, 52, 106)',
  420. 'rgb(237, 169, 161)',
  421. 'rgb(157, 84, 17)',
  422. 'rgb(14, 187, 149)',
  423. 'rgb(46, 11, 221)',
  424. 'rgb(208, 202, 126)',
  425. 'rgb(17, 118, 32)',
  426. 'rgb(7, 31, 67)',
  427. 'rgb(75, 40, 99)',
  428. 'rgb(224, 98, 40)',
  429. 'rgb(234, 3, 190)',
  430. 'rgb(97, 76, 115)',
  431. 'rgb(9, 117, 139)',
  432. 'rgb(165, 7, 62)',
  433. 'rgb(7, 107, 42)'
  434. ],
  435. trackpage: 1,
  436. pagekey: 1,
  437. total: 8,
  438. tracklistdata_backups: {},
  439. arealistmouse: {},
  440. trackloading: true,
  441. isShowMonitorInfo: false,
  442. // 新增字段
  443. deviceTypeDataSource: {},
  444. pathBoxVisible: false
  445. };
  446. },
  447. //监听属性 类似于data概念
  448. computed: {},
  449. //监控data中的数据变化
  450. watch: {
  451. pietf: function(val) {
  452. // console.log(this.width)
  453. if (val) {
  454. this.width = '500px';
  455. } else {
  456. this.width = '0';
  457. if (this.myVideo2[`myPlayer`]) {
  458. this.myVideo2[`myPlayer`].stop();
  459. setTimeout(() => {
  460. console.log('关闭关闭关闭');
  461. this.myVideo2[`myPlayer`].stop();
  462. }, 5000);
  463. } else {
  464. // setTimeout(() => {
  465. // console.log('关闭关闭关闭');
  466. // this.myVideo2[`myPlayer`].stop();
  467. // }, 5000);
  468. }
  469. }
  470. // console.log(this.width)
  471. },
  472. device_type_id: function(val) {
  473. // console.log(val);
  474. if (val != 6) {
  475. if (this.myVideo2[`myPlayer`]) {
  476. this.myVideo2[`myPlayer`].stop();
  477. }
  478. }
  479. }
  480. },
  481. //方法集合
  482. methods: {
  483. ToDigital(lnglat) {
  484. // console.log(lnglat);
  485. if (!isNaN(lnglat)) {
  486. return lnglat;
  487. }
  488. lnglat = lnglat.toString();
  489. var strDu, strFen, strMiao;
  490. var duindex = lnglat.indexOf('°'); //字符度的下标
  491. var fenindex = lnglat.indexOf('′'); //字符分的下标
  492. var miaoindex = lnglat.indexOf('″'); //字符秒的下标
  493. strDu = lnglat.slice(0, duindex);
  494. strFen = lnglat.slice(duindex + 1, fenindex);
  495. strMiao = lnglat.slice(fenindex + 1, miaoindex);
  496. // len = len > 6 || typeof len == "undefined" ? 6 : len; //精确到小数点后最多六位
  497. strDu =
  498. typeof strDu == 'undefined' || strDu == '' ? 0 : parseFloat(strDu);
  499. strFen =
  500. typeof strFen == 'undefined' || strFen == ''
  501. ? 0
  502. : parseFloat(strFen) / 60;
  503. strMiao =
  504. typeof strMiao == 'undefined' || strMiao == ''
  505. ? 0
  506. : parseFloat(strMiao) / 3600;
  507. var digital = strDu + strFen + strMiao;
  508. if (digital == 0) {
  509. return '';
  510. } else {
  511. return digital.toFixed(6);
  512. }
  513. },
  514. initmap() {
  515. console.log('----------- init map');
  516. var map = new AMap.Map(document.getElementById('mapContainer2'), {
  517. center: this.center,
  518. resizeEnable: true,
  519. zoom: 12.5,
  520. // lang: 'en',
  521. mapStyle: 'amap://styles/fresh',
  522. layers: []
  523. });
  524. console.log(map, 'init map -------------------- init sdsdsa');
  525. //new AMap.TileLayer.Satellite(),new AMap.TileLayer.RoadNet()
  526. AMap.plugin(['AMap.ToolBar', 'AMap.Geocoder'], () => {
  527. map.addControl(new AMap.ToolBar());
  528. this.geocoder = new AMap.Geocoder({
  529. city: '全国',
  530. radius: 1000
  531. });
  532. });
  533. AMap.plugin(['AMap.MouseTool'], () => {
  534. this.mouseTool = new AMap.MouseTool(map);
  535. this.mouseTool.on('draw', this.drawend());
  536. });
  537. // map.on("click", (e) => {
  538. // console.log(e);
  539. // });
  540. this.map = map;
  541. this.getbaselist();
  542. },
  543. getbaselist() {
  544. this.pestboxloading = true;
  545. this.$axios({
  546. method: 'POST',
  547. url:
  548. '/api/api_gateway?method=monitor_manage.home_map.device_distribute_new',
  549. data: this.qs.stringify({
  550. trap_number: this.idinput, // 非必传(string) 设备编号 搜索项
  551. point_id: this.inoffvalue, // 非必传(string) 设备所属监测点id 搜索项
  552. org_id: this.versionsvalue2, // 非必传(string) 设备所属组织id 搜索项
  553. trap_status: this.statevalue, // 非必传(num) 诱捕器状态 0停用 1正常 搜索项
  554. type_id: this.typevalue // 非必传(num) 3测报灯 4诱捕器 6监控 搜索项
  555. })
  556. }).then(res => {
  557. this.pestboxloading = false;
  558. // this.init(res.data.data);
  559. console.log(res.data.data);
  560. var resdata = res.data.data;
  561. // var data = [];
  562. this.cbdnum = 0;
  563. this.jknum = 0;
  564. this.ybqnum = 0;
  565. // this.map.clearMap();
  566. this.map && this.map.clearMap();
  567. this.mouseTool.close(true);
  568. //rest pestNum
  569. this.resetdeviceTypeNum();
  570. if (resdata.huizhou) {
  571. for (var i = 0; i < resdata.huizhou.length; i++) {
  572. this.setmak(resdata.huizhou[i]);
  573. }
  574. }
  575. if (resdata.shenzhen) {
  576. for (var i = 0; i < resdata.shenzhen.length; i++) {
  577. this.setmak(resdata.shenzhen[i]);
  578. }
  579. }
  580. if (resdata.shanwei) {
  581. for (var i = 0; i < resdata.shanwei.length; i++) {
  582. this.setmak(resdata.shanwei[i]);
  583. }
  584. }
  585. for (var key in this.tracklistdata_backups) {
  586. var list = this.tracklistdata_backups[key];
  587. for (var j = 0; j < list.length; j++) {
  588. list[j].type = false;
  589. }
  590. }
  591. // this.map.add(marker);
  592. });
  593. },
  594. resetdeviceTypeNum() {
  595. for (const key in this.deviceTypeDataSource) {
  596. this.deviceTypeDataSource[key].num = 0;
  597. }
  598. },
  599. setmak(data) {
  600. // console.log(
  601. // data.device_type_id,
  602. // 'set mark',
  603. // !this.deviceTypeDataSource[data.device_type_id],
  604. // this.deviceTypeDataSource
  605. // );
  606. if (
  607. data.device_type_id === 6 ||
  608. !this.deviceTypeDataSource[data.device_type_id]
  609. ) {
  610. return;
  611. }
  612. var icon = '';
  613. if (
  614. data.device_type_id &&
  615. this.deviceTypeDataSource[data.device_type_id]
  616. ) {
  617. this.deviceTypeDataSource[data.device_type_id].num++;
  618. }
  619. if (data.device_type_id == 2) {
  620. // 风吸式太阳诱虫灯
  621. icon = require('../../assets/images/home/location-fengxi.png');
  622. // this.cbdnum++;
  623. } else if (data.device_type_id == 3) {
  624. //智能测报灯
  625. icon = require('../../assets/images/home/location-zhinengcebaodeng.png');
  626. // this.ybqnum++;
  627. } else if (data.device_type_id == 8) {
  628. //林木害虫诱捕器
  629. icon = require('../../assets/images/home/location-linmu.png');
  630. // this.ybqnum++;
  631. } else if (data.device_type_id == 9) {
  632. //实蝇诱捕器
  633. icon = require('../../assets/images/home/location-shiying.png');
  634. // this.ybqnum++;
  635. } else if (data.device_type_id == 10) {
  636. //实蝇监测智能诱捕器
  637. icon = require('../../assets/images/home/location-shiyingjiance.png');
  638. // this.ybqnum++;
  639. }
  640. // else if (data.device_type_id == 6) {
  641. // //监控
  642. // icon = '../../../static/images/homepage/jk.png';
  643. // this.jknum++;
  644. // if (!this.isShowMonitorInfo) {
  645. // this.isShowMonitorInfo = true;
  646. // }
  647. // }
  648. var iconInstance = new AMap.Icon({
  649. size: new AMap.Size(20, 20), // 图标尺寸
  650. imageSize: new AMap.Size(20, 20),
  651. image: icon // Icon的图像
  652. });
  653. var marker = new AMap.Marker({
  654. position: new AMap.LngLat(
  655. this.ToDigital(data.lng),
  656. this.ToDigital(data.lat)
  657. ),
  658. offset: new AMap.Pixel(-10, -10),
  659. icon: iconInstance, // 添加 Icon 图标 URL
  660. title: '设备标点',
  661. d_id: data.d_id,
  662. type_id: data.device_type_id
  663. });
  664. marker.on('click', e => {
  665. console.log(e.target._originOpts.title);
  666. this.device_type_id = e.target._originOpts.type_id;
  667. this.pietf = true;
  668. // if(this.device_type_id == 6){
  669. this.getbaseinfo(e.target._originOpts.d_id);
  670. });
  671. this.map.add(marker);
  672. },
  673. search() {
  674. this.getbaselist();
  675. },
  676. handlePointTypeChange() {
  677. this.typevalue = '';
  678. this.gettype().then(() => {
  679. this.search();
  680. });
  681. },
  682. reset() {
  683. this.inoffvalue = '';
  684. this.versionsvalue2 = '';
  685. this.statevalue = '';
  686. this.typevalue = '';
  687. this.idinput = '';
  688. this.point_type = '';
  689. this.getbaselist();
  690. },
  691. // getmon() {
  692. // //获取监测点列表 组织列表
  693. // this.$axios({
  694. // method: "POST",
  695. // url: "/api/api_gateway?method=sysmenage.usermanager.org_list",
  696. // }).then((res) => {
  697. // console.log(res.data.data);
  698. // this.inoffoptions = res.data.data.point_data;
  699. // });
  700. // },
  701. getmon2() {
  702. this.$axios({
  703. method: 'POST',
  704. url: '/api/api_gateway?method=monitor_manage.trap_manage.trap_org',
  705. data: this.qs.stringify({
  706. page_item: '1000000'
  707. })
  708. }).then(res => {
  709. // console.log(res.data.data);
  710. this.versionsoptions2 = res.data.data.org_data;
  711. this.inoffoptions = res.data.data.point_data;
  712. });
  713. },
  714. gettype() {
  715. return this.$axios({
  716. method: 'POST',
  717. url:
  718. '/api/api_gateway?method=monitor_manage.home_map.home_map_device_type',
  719. data: this.qs.stringify({
  720. point_type: this.point_type
  721. })
  722. }).then(res => {
  723. // console.log(res.data.data);
  724. this.typeoptions =
  725. filter(res.data.data, item => item.type_id !== 6) || [];
  726. const deviceData = map(
  727. filter(this.typeoptions, item => item.type_id !== 6),
  728. item => {
  729. return assign({}, item, { num: 0 });
  730. }
  731. );
  732. this.deviceTypeDataSource = normalization(deviceData, 'type_id');
  733. });
  734. },
  735. getbaseinfo(d_id) {
  736. this.loading = true;
  737. this.$axios({
  738. method: 'POST',
  739. url:
  740. '/api/api_gateway?method=monitor_manage.home_map.device_distribute_details',
  741. data: this.qs.stringify({
  742. d_id: d_id
  743. })
  744. }).then(res => {
  745. // console.log(res.data.data);
  746. this.loading = false;
  747. this.baseinfo = res.data.data;
  748. if (!this.baseinfo.length) {
  749. return;
  750. }
  751. if (this.baseinfo[0].device_info) {
  752. // console.log(this.baseinfo[0].device_info.hlsHd)
  753. let hlsHd = this.baseinfo[0].device_info.hlsHd;
  754. hlsHd = 'https' + hlsHd.toString().slice(4);
  755. console.log(hlsHd);
  756. let playHtml = `<video id="myPlayer" muted autoplay poster='' controls playsInline webkit-playsinline src="${hlsHd}" style="width:100%; height:100%;"></video>`;
  757. // console.log(hlsHd);
  758. this.$nextTick(() => {
  759. document.getElementById('videoBon').innerHTML = playHtml;
  760. this.myVideo2[`myPlayer`] = new EZUIKit.EZUIPlayer(`myPlayer`);
  761. setTimeout(() => {
  762. this.myVideo2[`myPlayer`].play();
  763. }, 150);
  764. });
  765. } else {
  766. var dom = document.getElementById('myPlayer');
  767. if (dom) {
  768. dom.style.display = 'none';
  769. }
  770. }
  771. });
  772. },
  773. //距离测量
  774. measure_distance() {
  775. this.mouseTool.close();
  776. this.measure_index = 1;
  777. this.draw('rule');
  778. window.addEventListener('dblclick', () => {
  779. this.measure_index = 0;
  780. this.mouseTool.close();
  781. });
  782. window.addEventListener('contextmenu', () => {
  783. this.measure_index = 0;
  784. this.mouseTool.close();
  785. });
  786. },
  787. //面积测量
  788. measure_area() {
  789. this.mouseTool.close();
  790. this.measure_index = 2;
  791. this.draw('measureArea');
  792. window.addEventListener('dblclick', () => {
  793. this.measure_index = 0;
  794. this.mouseTool.close();
  795. });
  796. window.addEventListener('contextmenu', () => {
  797. this.measure_index = 0;
  798. this.mouseTool.close();
  799. });
  800. },
  801. measure_close() {
  802. this.measure_index = 0;
  803. this.mouseTool.close(true);
  804. },
  805. draw(type) {
  806. var mouseTool = this.mouseTool;
  807. switch (type) {
  808. case 'rule': {
  809. mouseTool.rule({
  810. startMarkerOptions: {
  811. //可缺省
  812. icon: new AMap.Icon({
  813. size: new AMap.Size(19, 31), //图标大小
  814. imageSize: new AMap.Size(19, 31),
  815. image: '//webapi.amap.com/theme/v1.3/markers/b/start.png'
  816. }),
  817. offset: new AMap.Pixel(-9, -31)
  818. },
  819. endMarkerOptions: {
  820. //可缺省
  821. icon: new AMap.Icon({
  822. size: new AMap.Size(19, 31), //图标大小
  823. imageSize: new AMap.Size(19, 31),
  824. image: '//webapi.amap.com/theme/v1.3/markers/b/end.png'
  825. }),
  826. offset: new AMap.Pixel(-9, -31)
  827. },
  828. midMarkerOptions: {
  829. //可缺省
  830. icon: new AMap.Icon({
  831. size: new AMap.Size(19, 31), //图标大小
  832. imageSize: new AMap.Size(19, 31),
  833. image: '//webapi.amap.com/theme/v1.3/markers/b/mid.png'
  834. }),
  835. offset: new AMap.Pixel(-9, -31)
  836. },
  837. lineOptions: {
  838. //可缺省
  839. strokeStyle: 'solid',
  840. strokeColor: '#FF33FF',
  841. strokeOpacity: 1,
  842. strokeWeight: 2
  843. }
  844. //同 RangingTool 的 自定义 设置,缺省为默认样式
  845. });
  846. break;
  847. }
  848. case 'measureArea': {
  849. // mouseTool.measureArea({
  850. // strokeColor: '#4f71ff',
  851. // fillColor: '#1791fc',
  852. // fillOpacity: 0.3,
  853. // //同 Polygon 的 Option 设置
  854. // });
  855. mouseTool.polygon({
  856. strokeColor: '#4f71ff',
  857. strokeOpacity: 1,
  858. strokeWeight: 3,
  859. strokeOpacity: 0.5,
  860. fillColor: '#1791fc',
  861. fillOpacity: 0.4,
  862. strokeStyle: 'solid'
  863. });
  864. break;
  865. }
  866. }
  867. },
  868. drawend() {
  869. var mouseTool = this.mouseTool;
  870. mouseTool.on('draw', ev => {
  871. // 确定时测量面积鼠标工具
  872. if (ev.obj.CLASS_NAME === 'Overlay.Polygon') {
  873. const id = ev.obj._amap_id;
  874. // console.log(mouseTool);
  875. // 获取路径结束点坐标
  876. const position = ev.obj._opts.path[ev.obj._opts.path.length - 1];
  877. var marker = null;
  878. marker = new AMap.Marker({
  879. position: new AMap.LngLat(position[0], position[1]),
  880. icon: 'https://webapi.amap.com/images/destroy.png',
  881. offset: new AMap.Pixel(-7, 7),
  882. id: id
  883. });
  884. // 计算区域面积
  885. var area =
  886. Math.round(AMap.GeometryUtil.ringArea(ev.obj._opts.path)) / 1000000;
  887. area = area.toFixed(2);
  888. var center = this.getCenter(ev.obj._opts.path);
  889. var text = null;
  890. text = new AMap.Text({
  891. position: center,
  892. text: area + '平方公里',
  893. offset: new AMap.Pixel(-20, -20)
  894. });
  895. this.map.add(text);
  896. this.map.add(marker);
  897. marker.on('click', e => {
  898. var ids = e.target._originOpts.id;
  899. this.map.remove(this.arealistmouse[ids].text);
  900. this.map.remove(this.arealistmouse[ids].marker);
  901. this.map.remove(this.arealistmouse[ids].mouse);
  902. });
  903. var obj = {
  904. text: text,
  905. marker: marker,
  906. mouse: ev.obj
  907. };
  908. this.arealistmouse[id] = obj;
  909. }
  910. });
  911. },
  912. // 取面对象 中心点
  913. getCenter(PolygonArr) {
  914. let total = PolygonArr.length;
  915. let X = 0;
  916. let Y = 0;
  917. let Z = 0;
  918. PolygonArr.forEach(lnglat => {
  919. let lng = (lnglat[0] * Math.PI) / 180;
  920. let lat = (lnglat[1] * Math.PI) / 180;
  921. let x, y, z;
  922. x = Math.cos(lat) * Math.cos(lng);
  923. y = Math.cos(lat) * Math.sin(lng);
  924. z = Math.sin(lat);
  925. X += x;
  926. Y += y;
  927. Z += z;
  928. });
  929. X = X / total;
  930. Y = Y / total;
  931. Z = Z / total;
  932. let Lng = Math.atan2(Y, X);
  933. let Hyp = Math.sqrt(X * X + Y * Y);
  934. let Lat = Math.atan2(Z, Hyp);
  935. // console.log(Lng, Lat, Hyp);
  936. return [(Lng * 180) / Math.PI, (Lat * 180) / Math.PI];
  937. },
  938. //获取路径数据
  939. gettracklist_data() {
  940. this.trackloading = true;
  941. this.$axios({
  942. method: 'POST',
  943. url: '/api/api_gateway?method=monitor_manage.home_map.user_walk_list',
  944. data: this.qs.stringify({
  945. create_time: this.tracktime,
  946. page: this.trackpage,
  947. page_item: '5'
  948. })
  949. }).then(res => {
  950. console.log(res.data.data);
  951. var data = res.data.data.page_list;
  952. // if(data.length){
  953. // return
  954. // }
  955. this.total = res.data.data.total_item;
  956. var arr = [];
  957. var index = this.trackpage;
  958. index = index % 3 == 0 ? 3 : index % 3;
  959. var colorlist = this.color.slice((index - 1) * 8, 8 * index);
  960. if (!this.tracklistdata_backups[this.trackpage]) {
  961. for (var i = 0; i < data.length; i++) {
  962. var obj = {
  963. type: false,
  964. color: colorlist[i],
  965. walk_list_arr: []
  966. };
  967. arr.push(obj);
  968. }
  969. this.$set(this.tracklistdata_backups, this.trackpage, arr);
  970. // this.tracklistdata_backups[this.trackpage] = arr;
  971. }
  972. this.tracklistdata = data;
  973. this.trackloading = false;
  974. console.log(this.tracklistdata_backups);
  975. });
  976. },
  977. //时间切换
  978. timechange(e) {
  979. console.log(e);
  980. console.log(this.tracklistdata_backups);
  981. for (var key in this.tracklistdata_backups) {
  982. var list = this.tracklistdata_backups[key];
  983. for (var j = 0; j < list.length; j++) {
  984. var walk_list_arr = list[j].walk_list_arr;
  985. for (var k = 0; k < walk_list_arr.length; k++) {
  986. this.map.remove(walk_list_arr[k]);
  987. }
  988. }
  989. }
  990. if (e) {
  991. this.tracktime = this.timetag(e);
  992. this.trackpage = 1;
  993. this.pagekey = Math.random() * 10 + 1;
  994. this.tracklistdata_backups = {};
  995. this.gettracklist_data();
  996. } else {
  997. var time = new Date();
  998. this.tracktime = this.timetag(time);
  999. }
  1000. },
  1001. //分页
  1002. handleCurrentChange(e) {
  1003. this.trackpage = e;
  1004. this.gettracklist_data();
  1005. },
  1006. //绘制or关闭路径
  1007. seeteack(data, index) {
  1008. if (this.tracklistdata_backups[this.trackpage][index].type) {
  1009. console.log(
  1010. this.tracklistdata_backups[this.trackpage][index].walk_list_arr
  1011. );
  1012. var walk_list_arr = this.tracklistdata_backups[this.trackpage][index]
  1013. .walk_list_arr;
  1014. for (var i = 0; i < walk_list_arr.length; i++) {
  1015. this.map.remove(walk_list_arr[i]);
  1016. }
  1017. this.tracklistdata_backups[this.trackpage][index].walk_list_arr = [];
  1018. } else {
  1019. console.log(this.tracklistdata_backups[this.trackpage][index].type);
  1020. this.initteack_info(data.walk_list, index);
  1021. }
  1022. this.tracklistdata_backups[this.trackpage][index].type = !this
  1023. .tracklistdata_backups[this.trackpage][index].type;
  1024. },
  1025. //绘制路径
  1026. initteack_info(walk_list, index) {
  1027. console.log(walk_list);
  1028. for (var i = 0; i < walk_list.length; i++) {
  1029. console.log(walk_list[i]);
  1030. var arr = [];
  1031. for (var j = 0; j < walk_list[i].length; j++) {
  1032. var list = [walk_list[i][j].lng, walk_list[i][j].lat];
  1033. arr.push(list);
  1034. }
  1035. var polyline2 = new AMap.Polyline({
  1036. map: this.map,
  1037. path: arr,
  1038. showDir: true,
  1039. strokeColor: this.tracklistdata_backups[this.trackpage][index].color, //线颜色
  1040. strokeOpacity: 1, //线透明度
  1041. strokeWeight: 6, //线宽
  1042. zIndex: 51
  1043. });
  1044. this.tracklistdata_backups[this.trackpage][index].walk_list_arr.push(
  1045. polyline2
  1046. );
  1047. }
  1048. },
  1049. timetag(time) {
  1050. var years = time.getFullYear();
  1051. var month = time.getMonth() + 1;
  1052. var day = time.getDate();
  1053. month = month < 10 ? '0' + month : month;
  1054. day = day < 10 ? '0' + day : day;
  1055. return years + '-' + month + '-' + day;
  1056. }
  1057. },
  1058. beforeCreate() {}, //生命周期 - 创建之前
  1059. //生命周期 - 创建完成(可以访问当前this实例)
  1060. created() {},
  1061. beforeMount() {}, //生命周期 - 挂载之前
  1062. //生命周期 - 挂载完成(可以访问DOM元素)
  1063. mounted() {
  1064. // this.getmon();
  1065. // this.init()
  1066. var time = new Date();
  1067. this.tracktime = this.timetag(time);
  1068. this.gettype();
  1069. this.getmon2();
  1070. this.gettracklist_data();
  1071. setTimeout(() => {
  1072. this.initmap();
  1073. }, 1000);
  1074. },
  1075. beforeUpdate() {}, //生命周期 - 更新之前
  1076. updated() {}, //生命周期 - 更新之后
  1077. beforeDestroy() {
  1078. this.map && this.map.destroy();
  1079. if (this.myVideo2[`myPlayer`]) {
  1080. this.myVideo2[`myPlayer`].stop();
  1081. }
  1082. }, //生命周期 - 销毁之前
  1083. destroyed() {
  1084. if (this.myVideo2[`myPlayer`]) {
  1085. this.myVideo2[`myPlayer`].stop();
  1086. }
  1087. }, //生命周期 - 销毁完成
  1088. activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
  1089. };
  1090. </script>
  1091. <style lang="less" scoped>
  1092. .pestbox {
  1093. width: 100%;
  1094. height: 97%;
  1095. position: relative;
  1096. overflow: hidden;
  1097. background-color: #252b45;
  1098. #mapContainer2 {
  1099. width: 100%;
  1100. height: 100%;
  1101. /deep/.amap-logo {
  1102. display: none !important;
  1103. }
  1104. /deep/.amap-copyright {
  1105. display: none !important;
  1106. }
  1107. }
  1108. .tishi {
  1109. // width: 500px;
  1110. height: 50px;
  1111. color: #fff;
  1112. line-height: 50px;
  1113. background-color: #04243e;
  1114. text-align: center;
  1115. transition: width 1s ease;
  1116. overflow: hidden;
  1117. }
  1118. .searchbox {
  1119. position: absolute;
  1120. top: 10px;
  1121. left: 15px;
  1122. display: flex;
  1123. /deep/.el-select {
  1124. margin-right: 10px;
  1125. }
  1126. /deep/.el-date-editor {
  1127. margin-right: 10px;
  1128. }
  1129. /deep/.el-button--info {
  1130. background-color: #409eff;
  1131. border-color: #409eff;
  1132. }
  1133. .inputbox {
  1134. margin-right: 10px;
  1135. /deep/.el-input {
  1136. width: 200px;
  1137. }
  1138. }
  1139. }
  1140. .tallybox {
  1141. position: absolute;
  1142. top: 50px;
  1143. left: 15px;
  1144. background-color: rgba(255, 255, 255, 0.8);
  1145. padding: 10px;
  1146. max-height: 220px;
  1147. overflow-y: auto;
  1148. .tallybox_item {
  1149. margin-bottom: 10px;
  1150. display: flex;
  1151. color: #333;
  1152. align-items: center;
  1153. img {
  1154. margin-right: 10px;
  1155. }
  1156. }
  1157. }
  1158. .tracklistbox {
  1159. position: absolute;
  1160. top: 266px;
  1161. left: 15px;
  1162. background-color: rgba(255, 255, 255, 0.8);
  1163. padding: 10px;
  1164. width: 200px;
  1165. &.hide {
  1166. width: 0;
  1167. padding: 0;
  1168. }
  1169. // height: 500px;
  1170. .el-date-editor {
  1171. width: 200px;
  1172. }
  1173. .tracklist {
  1174. width: 100%;
  1175. height: 245px;
  1176. margin-top: 15px;
  1177. .tracklist_tilte {
  1178. text-align: center;
  1179. font-size: 14px;
  1180. }
  1181. .tracklist_item {
  1182. display: flex;
  1183. font-size: 14px;
  1184. justify-content: space-between;
  1185. padding-bottom: 10px;
  1186. border-bottom: 1px solid #409eff;
  1187. margin-bottom: 10px;
  1188. .tracklist_item_text {
  1189. display: flex;
  1190. line-height: 30px;
  1191. p:first-child {
  1192. width: 30px;
  1193. height: 30px;
  1194. background-color: chocolate;
  1195. line-height: 30px;
  1196. text-align: center;
  1197. border-radius: 50%;
  1198. color: #fff;
  1199. }
  1200. p:nth-child(2) {
  1201. margin-left: 10px;
  1202. }
  1203. }
  1204. .tracklist_btn {
  1205. width: 50px;
  1206. height: 18px;
  1207. color: #409eff;
  1208. padding: 5px;
  1209. font-size: 12px;
  1210. text-align: center;
  1211. cursor: pointer;
  1212. user-select: none;
  1213. }
  1214. .tracklist_btn_none {
  1215. color: #ff4949;
  1216. }
  1217. }
  1218. .tracklist_item:last-child {
  1219. border-bottom: none;
  1220. }
  1221. }
  1222. }
  1223. .path-box {
  1224. display: flex;
  1225. position: absolute;
  1226. transition: width 1s ease;
  1227. left: 0;
  1228. top: 280px;
  1229. overflow: hidden;
  1230. &__action {
  1231. width: 20px;
  1232. height: 20px;
  1233. padding: 20px 10px;
  1234. background-color: chocolate;
  1235. color: #fff;
  1236. line-height: 50px;
  1237. text-align: center;
  1238. font-size: 25px;
  1239. background: chocolate;
  1240. cursor: pointer;
  1241. }
  1242. .tracklistbox {
  1243. position: static;
  1244. top: 0px;
  1245. left: 0px;
  1246. transition: all 1s ease;
  1247. background-color: rgba(255, 255, 255, 1);
  1248. overflow: hidden;
  1249. }
  1250. }
  1251. .piebox {
  1252. position: absolute;
  1253. top: 0;
  1254. right: 0;
  1255. display: flex;
  1256. // height: 100%;
  1257. transition: width 1s ease;
  1258. overflow: hidden;
  1259. .iconbox {
  1260. width: 30px;
  1261. height: 50px;
  1262. background-color: chocolate;
  1263. color: #fff;
  1264. line-height: 50px;
  1265. text-align: center;
  1266. font-size: 25px;
  1267. }
  1268. #mychartpie {
  1269. transition: all 1s ease;
  1270. background-color: rgba(255, 255, 255, 1);
  1271. // padding: 20px;
  1272. box-sizing: border-box;
  1273. overflow: hidden;
  1274. border-radius: 10px;
  1275. .infobox {
  1276. width: 450px;
  1277. padding: 20px 20px 0 20px;
  1278. h3 {
  1279. margin-top: 0;
  1280. color: #333;
  1281. }
  1282. p {
  1283. margin-bottom: 15px;
  1284. color: #333;
  1285. font-size: 14px;
  1286. span {
  1287. color: #04d5e8;
  1288. }
  1289. span:first-child {
  1290. display: inline-block;
  1291. width: 85px;
  1292. color: #333;
  1293. }
  1294. }
  1295. }
  1296. .wornbox {
  1297. width: 450px;
  1298. padding: 0 20px 20px;
  1299. h3 {
  1300. margin-top: 0;
  1301. color: #333;
  1302. }
  1303. .wornbox_item {
  1304. display: flex;
  1305. flex-wrap: wrap;
  1306. p {
  1307. width: 40%;
  1308. margin-bottom: 15px;
  1309. color: #333;
  1310. display: flex;
  1311. justify-content: space-between;
  1312. font-size: 14px;
  1313. margin-right: 20px;
  1314. span:nth-child(2) {
  1315. color: #04d5e8;
  1316. }
  1317. }
  1318. }
  1319. }
  1320. .cbdinfobox {
  1321. width: 450px;
  1322. padding: 0 20px 20px;
  1323. h3 {
  1324. margin-top: 0;
  1325. color: #333;
  1326. }
  1327. .cbdinfobox_item {
  1328. display: flex;
  1329. width: 100%;
  1330. margin: 0 15px 10px 0;
  1331. p {
  1332. color: #333;
  1333. font-size: 14px;
  1334. margin-right: 20px;
  1335. span {
  1336. color: #04d5e8;
  1337. }
  1338. }
  1339. p:first-child {
  1340. width: 150px;
  1341. }
  1342. }
  1343. }
  1344. .cbdimg {
  1345. width: 450px;
  1346. padding: 0px 20px 10px 20px;
  1347. .title {
  1348. margin-top: 0;
  1349. color: #333;
  1350. }
  1351. img {
  1352. width: 100%;
  1353. height: 100%;
  1354. }
  1355. }
  1356. .videoBonbox {
  1357. width: 450px;
  1358. padding: 0 20px 20px;
  1359. h3 {
  1360. margin-top: 0;
  1361. color: #333;
  1362. }
  1363. }
  1364. }
  1365. }
  1366. .measurebox {
  1367. position: absolute;
  1368. right: 20px;
  1369. bottom: 20px;
  1370. background-color: #fff;
  1371. border-radius: 4px;
  1372. box-shadow: 0 0 3px rgb(0 0 0 / 50%);
  1373. padding: 10px 5px;
  1374. .measurebox_item {
  1375. text-align: center;
  1376. font-size: 14px;
  1377. cursor: pointer;
  1378. user-select: none;
  1379. }
  1380. .measurebox_line {
  1381. margin: 10px 0;
  1382. border-bottom: 1px solid;
  1383. }
  1384. .selmea {
  1385. color: #409eff;
  1386. }
  1387. }
  1388. }
  1389. /deep/.amap-controls {
  1390. display: none !important;
  1391. }
  1392. </style>