|
|
@@ -1,3 +1,4 @@
|
|
|
+-+
|
|
|
<template>
|
|
|
<div class="base-container no-events">
|
|
|
<fnHeader showDate :autoGo="true" hideSwitch></fnHeader>
|
|
|
@@ -50,6 +51,40 @@
|
|
|
<time-line></time-line>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="warning-r right yes-events">
|
|
|
+ <chart-list></chart-list>
|
|
|
+ <!-- <farmInfoGroup></farmInfoGroup> -->
|
|
|
+ </div>
|
|
|
+ <!-- 地图图例 -->
|
|
|
+ <map-legend></map-legend>
|
|
|
+ <div class="warning-search yes-events">
|
|
|
+ <el-select
|
|
|
+ v-model="locationVal"
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ reserve-keyword
|
|
|
+ placeholder="搜索地区"
|
|
|
+ :remote-method="remoteMethod"
|
|
|
+ :loading="loading"
|
|
|
+ @change="handleSearchRes"
|
|
|
+ class="v-select"
|
|
|
+ popper-class="focus-farm-select"
|
|
|
+ style="width: 375px"
|
|
|
+ >
|
|
|
+ <template #prefix>
|
|
|
+ <el-icon class="el-input__icon"><search /></el-icon>
|
|
|
+ </template>
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in locationOptions.list"
|
|
|
+ :key="index"
|
|
|
+ :label="item.title"
|
|
|
+ :value="item.point"
|
|
|
+ >
|
|
|
+ <span>{{ item.title }}</span>
|
|
|
+ <span class="sub-title">{{ item.province }}{{ item.city }}{{ item.district }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
<div class="base-tabs yes-events">
|
|
|
<div
|
|
|
v-for="item in baseTabs"
|
|
|
@@ -61,14 +96,6 @@
|
|
|
{{ item }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="warning-r right yes-events">
|
|
|
- <farmInfoGroup></farmInfoGroup>
|
|
|
- </div>
|
|
|
- <!-- 地图图例 -->
|
|
|
- <map-legend></map-legend>
|
|
|
- <div class="warning-search yes-events">
|
|
|
- <img src="@/assets/images/warningHome/search-img.png" />
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div ref="mapRef" class="bottom-map"></div>
|
|
|
@@ -90,16 +117,12 @@
|
|
|
<script setup>
|
|
|
import "./map/mockFarmLayer";
|
|
|
import StaticMapLayers from "@/components/static_map_change/Layers.js";
|
|
|
-import StaticMapLegend from "@/components/static_map_change/legend.vue";
|
|
|
import StaticMapPointLayers from "@/components/static_map_change/pointLayer.js";
|
|
|
-import { onMounted, onUnmounted, ref } from "vue";
|
|
|
+import { onMounted, onUnmounted, ref, reactive } from "vue";
|
|
|
import fnHeader from "@/components/fnHeader.vue";
|
|
|
import WarningMap from "./warningMap";
|
|
|
import AlarmLayer from "./map/alarmLayer";
|
|
|
-import GardenPointLayer from "./map/gardenPointLayer";
|
|
|
-import album from "./components/album.vue";
|
|
|
import trackDialog from "./components/trackDialog.vue";
|
|
|
-import chat from "./components/chat_components/index.vue";
|
|
|
import alarmList from "./components/alarmList.vue";
|
|
|
import timeLine from "./components/timeLine.vue";
|
|
|
import { useRouter } from "vue-router";
|
|
|
@@ -108,12 +131,12 @@ import { areaListOptions } from "./area";
|
|
|
import { useStore } from "vuex";
|
|
|
import farmInfoGroup from "./components/farmInfoGroup.vue";
|
|
|
import mapLegend from "./components/mapLegend.vue";
|
|
|
+import chartList from "./components/chart_components/chartList.vue";
|
|
|
|
|
|
let store = useStore();
|
|
|
|
|
|
let warningMap = new WarningMap();
|
|
|
let alarmLayer = null;
|
|
|
-let gardenPointLayer = null;
|
|
|
let staticMapLayers = null;
|
|
|
let staticMapPointLayers = null;
|
|
|
const router = useRouter();
|
|
|
@@ -132,7 +155,6 @@ onMounted(() => {
|
|
|
alarmLayer = new AlarmLayer(warningMap.kmap);
|
|
|
staticMapLayers = new StaticMapLayers(warningMap.kmap);
|
|
|
staticMapPointLayers = new StaticMapPointLayers(warningMap.kmap);
|
|
|
- gardenPointLayer = new GardenPointLayer(warningMap.kmap);
|
|
|
// setTimeout(() => {
|
|
|
// staticMapLayers.show("testpng")
|
|
|
// },2000)
|
|
|
@@ -227,6 +249,49 @@ const toggleBox = (name) => {
|
|
|
legendImg.value = warningLayers.value[`${name}图例`];
|
|
|
eventBus.emit("warningHome:toggleMapLayer", name);
|
|
|
};
|
|
|
+
|
|
|
+// 搜索
|
|
|
+const locationVal = ref("");
|
|
|
+const loading = ref(false);
|
|
|
+const MAP_KEY = "CZLBZ-LJICQ-R4A5J-BN62X-YXCRJ-GNBUT";
|
|
|
+
|
|
|
+const handleSearchRes = (v) => {
|
|
|
+ warningMap.setMapCenter(v);
|
|
|
+ // onRest();
|
|
|
+};
|
|
|
+
|
|
|
+const locationOptions = reactive({
|
|
|
+ list: [],
|
|
|
+});
|
|
|
+const remoteMethod = async (keyword) => {
|
|
|
+ if (keyword) {
|
|
|
+ locationOptions.list = [];
|
|
|
+ loading.value = true;
|
|
|
+ const params = {
|
|
|
+ key: MAP_KEY,
|
|
|
+ keyword,
|
|
|
+ // location: location.value,
|
|
|
+ location: "22.574540836684672,113.1093017627431",
|
|
|
+ };
|
|
|
+ await VE_API.old_mini_map.getCtiyList({ word: keyword }).then(({ data }) => {
|
|
|
+ if (data && data.length) {
|
|
|
+ data.forEach((item) => {
|
|
|
+ item.point = item.location.lat + "," + item.location.lng;
|
|
|
+ locationOptions.list.push(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ VE_API.old_mini_map.search(params).then(({ data }) => {
|
|
|
+ loading.value = false;
|
|
|
+ data.forEach((item) => {
|
|
|
+ item.point = item.location.lat + "," + item.location.lng;
|
|
|
+ locationOptions.list.push(item);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ locationOptions.list = [];
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@@ -247,7 +312,7 @@ const toggleBox = (name) => {
|
|
|
.content {
|
|
|
width: 100%;
|
|
|
height: calc(100% - 74px - 48px);
|
|
|
- padding: 0 20px 0 27px;
|
|
|
+ padding: 16px 20px 0 27px;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
box-sizing: border-box;
|
|
|
@@ -256,14 +321,17 @@ const toggleBox = (name) => {
|
|
|
.right {
|
|
|
width: calc(376px + 54px);
|
|
|
height: 100%;
|
|
|
- padding-top: 10px;
|
|
|
box-sizing: border-box;
|
|
|
// display: flex;
|
|
|
}
|
|
|
.right {
|
|
|
// width: 395px;
|
|
|
- width: 500px;
|
|
|
+ width: 376px;
|
|
|
+ padding: 8px;
|
|
|
+ overflow: auto;
|
|
|
position: relative;
|
|
|
+ background: #101010;
|
|
|
+ border: 1px solid #444444;
|
|
|
.list {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
@@ -309,14 +377,35 @@ const toggleBox = (name) => {
|
|
|
}
|
|
|
}
|
|
|
.warning-search {
|
|
|
- position: absolute;
|
|
|
- right: 208px;
|
|
|
- top: -44px;
|
|
|
+ position: fixed;
|
|
|
+ right: 207px;
|
|
|
+ top: 28px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
.focus-farm {
|
|
|
padding-left: 15px;
|
|
|
}
|
|
|
+ ::v-deep {
|
|
|
+ .el-select__wrapper {
|
|
|
+ background: #1d1d1d;
|
|
|
+ box-shadow: 0 0 0 1px rgba(255, 212, 137, 0.3) inset;
|
|
|
+ height: 50px;
|
|
|
+ line-height: 50px;
|
|
|
+ .el-select__caret,
|
|
|
+ .el-select__prefix {
|
|
|
+ color: rgba(255, 212, 137, 0.6);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-select__input {
|
|
|
+ color: rgba(255, 212, 137, 0.6);
|
|
|
+ }
|
|
|
+ .el-select__placeholder {
|
|
|
+ color: rgba(255, 212, 137, 0.6);
|
|
|
+ font-size: 20px;
|
|
|
+ font-family: "PangMenZhengDao";
|
|
|
+ // text-align: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.warning-top {
|
|
|
display: flex;
|