|
@@ -7,14 +7,14 @@
|
|
<tool-list direction="left" :list="leftToolList" @handleActive="handleActiveLeft"></tool-list>
|
|
<tool-list direction="left" :list="leftToolList" @handleActive="handleActiveLeft"></tool-list>
|
|
<component :is="components[currentComponent]" />
|
|
<component :is="components[currentComponent]" />
|
|
<!-- 箭头 -->
|
|
<!-- 箭头 -->
|
|
- <div class="arrow" @click="handleShrink">
|
|
|
|
|
|
+ <div class="arrow" @click="handleShrink('left')">
|
|
<el-icon class="icon" color="#141414"><DArrowLeft /></el-icon>
|
|
<el-icon class="icon" color="#141414"><DArrowLeft /></el-icon>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="home-bottom">
|
|
<div class="home-bottom">
|
|
- <!-- <time-line class="time-wrap yes-events"></time-line>
|
|
|
|
|
|
+ <!-- <time-line class="time-wrap yes-events"></time-line>
|
|
<img class="fly-icon" src="@/assets/images/home/fly-icon.png" alt=""> -->
|
|
<img class="fly-icon" src="@/assets/images/home/fly-icon.png" alt=""> -->
|
|
- <!-- <div class="log-box yes-events">
|
|
|
|
|
|
+ <!-- <div class="log-box yes-events">
|
|
<chart-box class="overflow">
|
|
<chart-box class="overflow">
|
|
<template #title-name>
|
|
<template #title-name>
|
|
<div class="box-name" @click="handleSelectArea">果园日志</div>
|
|
<div class="box-name" @click="handleSelectArea">果园日志</div>
|
|
@@ -38,15 +38,16 @@
|
|
<file-bar></file-bar>
|
|
<file-bar></file-bar>
|
|
</chart-box>
|
|
</chart-box>
|
|
</div> -->
|
|
</div> -->
|
|
- <div class="garden-file yes-events">
|
|
|
|
- <home-file></home-file><!-- 箭头 -->
|
|
|
|
- <div class="arrow" @click="handleShrink">
|
|
|
|
|
|
+ <div class="garden-file yes-events" :class="{ isShrink: isShrink }">
|
|
|
|
+ <home-file></home-file
|
|
|
|
+ ><!-- 箭头 -->
|
|
|
|
+ <div class="arrow" @click="handleShrink('bottom')">
|
|
<el-icon class="icon" color="#141414"><DArrowLeft /></el-icon>
|
|
<el-icon class="icon" color="#141414"><DArrowLeft /></el-icon>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="right yes-events">
|
|
<div class="right yes-events">
|
|
- <div class="list">
|
|
|
|
|
|
+ <div class="list album-r">
|
|
<chart-box name="农事列表" arrow="arrow-left" :class="{ 'list-wrap': rightIndex === 0 }">
|
|
<chart-box name="农事列表" arrow="arrow-left" :class="{ 'list-wrap': rightIndex === 0 }">
|
|
<template v-if="rightIndex === 0">
|
|
<template v-if="rightIndex === 0">
|
|
<album></album>
|
|
<album></album>
|
|
@@ -87,21 +88,20 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 图例 -->
|
|
<!-- 图例 -->
|
|
- <img class="legend yes-events" src="@/assets/images/home/legend-img.png" alt="">
|
|
|
|
- <img class="fly-btn yes-events" src="@/assets/images/home/fly-btn.png" alt="">
|
|
|
|
- <!-- <div class="map-bg map-legend yes-events"> -->
|
|
|
|
- <!-- <div class="legend-item legend-title">
|
|
|
|
|
|
+ <!-- <img class="legend yes-events" src="@/assets/images/home/legend-img.png" alt="" /> -->
|
|
|
|
+ <div class="map-bg map-legend yes-events">
|
|
|
|
+ <!-- <div class="legend-item legend-title">
|
|
<el-checkbox v-model="showMapLegend" @change="handleLegend" label="分区状态" size="large" />
|
|
<el-checkbox v-model="showMapLegend" @change="handleLegend" label="分区状态" size="large" />
|
|
</div> -->
|
|
</div> -->
|
|
- <!-- <div class="item">
|
|
|
|
|
|
+ <div class="item">
|
|
<img src="@/assets/images/map/status/status-zc.png" alt="" />
|
|
<img src="@/assets/images/map/status/status-zc.png" alt="" />
|
|
- 小农户
|
|
|
|
|
|
+ 有照片
|
|
</div>
|
|
</div>
|
|
<div class="item">
|
|
<div class="item">
|
|
- <img src="@/assets/images/map/status/status-szyc.png" alt="" />
|
|
|
|
- 托管区域
|
|
|
|
- </div> -->
|
|
|
|
- <!-- <div class="item">
|
|
|
|
|
|
+ <img src="@/assets/images/map/status/defalut-icon.png" alt="" />
|
|
|
|
+ 无照片
|
|
|
|
+ </div>
|
|
|
|
+ <!-- <div class="item">
|
|
<img src="@/assets/images/map/status/status-bh.png" alt="" />
|
|
<img src="@/assets/images/map/status/status-bh.png" alt="" />
|
|
病害异常
|
|
病害异常
|
|
</div>
|
|
</div>
|
|
@@ -114,7 +114,7 @@
|
|
万年树
|
|
万年树
|
|
</div>
|
|
</div>
|
|
-->
|
|
-->
|
|
- <!-- </div> -->
|
|
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div ref="mapRef" class="bottom-map"></div>
|
|
<div ref="mapRef" class="bottom-map"></div>
|
|
@@ -127,9 +127,8 @@
|
|
<!-- 对比 -->
|
|
<!-- 对比 -->
|
|
<compareDialog></compareDialog>
|
|
<compareDialog></compareDialog>
|
|
|
|
|
|
-
|
|
|
|
<div class="compare-start-btn yes-events" v-show="showCompareBtn" @click="showCompare">
|
|
<div class="compare-start-btn yes-events" v-show="showCompareBtn" @click="showCompare">
|
|
- <img src="@/assets/images/home/compare-btn.png" alt="">
|
|
|
|
|
|
+ <img src="@/assets/images/home/compare-btn.png" alt="" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -195,34 +194,50 @@ onMounted(() => {
|
|
eventBus.on("area:id", areaId);
|
|
eventBus.on("area:id", areaId);
|
|
//选项卡子项事件监听
|
|
//选项卡子项事件监听
|
|
eventBus.on("handleTabItem", handleTabItem);
|
|
eventBus.on("handleTabItem", handleTabItem);
|
|
|
|
+ // 是否开启指标对比
|
|
|
|
+ eventBus.on("compareTree", handleCompare)
|
|
|
|
+ eventBus.on("clickToCompare:point", toggleCompare);
|
|
});
|
|
});
|
|
|
|
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
eventBus.off("area:id", areaId);
|
|
eventBus.off("area:id", areaId);
|
|
eventBus.off("handleTabItem", handleTabItem);
|
|
eventBus.off("handleTabItem", handleTabItem);
|
|
|
|
+ eventBus.off("compareTree", handleCompare)
|
|
|
|
+ eventBus.off("clickToCompare:point", toggleCompare);
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+
|
|
|
|
+function handleCompare(v) {
|
|
|
|
+ isShrink.value = v
|
|
|
|
+ if (v === false) {
|
|
|
|
+ showCompareBtn.value = v
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
const blueList = ref([]);
|
|
const blueList = ref([]);
|
|
const getBlueRegionList = (callback) => {
|
|
const getBlueRegionList = (callback) => {
|
|
- let selectAll = undefined
|
|
|
|
- if(regionId.value===0){
|
|
|
|
- selectAll = 1
|
|
|
|
|
|
+ let selectAll = undefined;
|
|
|
|
+ if (regionId.value === 0) {
|
|
|
|
+ selectAll = 1;
|
|
}
|
|
}
|
|
- const areaId = selectAll?undefined:regionId.value
|
|
|
|
|
|
+ const areaId = selectAll ? undefined : regionId.value;
|
|
VE_API.farm.blueRegionList({ farmId: organId.value, regionId: areaId, selectAll }).then(({ data }) => {
|
|
VE_API.farm.blueRegionList({ farmId: organId.value, regionId: areaId, selectAll }).then(({ data }) => {
|
|
blueList.value = data.map((item) => {
|
|
blueList.value = data.map((item) => {
|
|
let color = "rgba(255, 255, 255, 0.5)"; //失效区域
|
|
let color = "rgba(255, 255, 255, 0.5)"; //失效区域
|
|
if (item.status === 2) {
|
|
if (item.status === 2) {
|
|
//物候期风险
|
|
//物候期风险
|
|
- color = "rgba(63, 255, 53, 0.5)";
|
|
|
|
|
|
+ // color = "rgba(63, 255, 53, 0.5)";
|
|
|
|
+ color = "#2BFE00";
|
|
}
|
|
}
|
|
if (item.status === 3) {
|
|
if (item.status === 3) {
|
|
//生长异常
|
|
//生长异常
|
|
- color = "rgba(255, 252, 61, 0.5)";
|
|
|
|
|
|
+ // color = "rgba(255, 252, 61, 0.5)";
|
|
|
|
+ color = "#FF7410";
|
|
}
|
|
}
|
|
if (item.status === 4) {
|
|
if (item.status === 4) {
|
|
//病虫害
|
|
//病虫害
|
|
- color = "rgba(255, 73, 73, 0.5)";
|
|
|
|
|
|
+ // color = "rgba(255, 73, 73, 0.5)";
|
|
|
|
+ color = "#F82121";
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
...item,
|
|
...item,
|
|
@@ -534,39 +549,44 @@ const toFilePage = () => {
|
|
router.push("/garden-file");
|
|
router.push("/garden-file");
|
|
};
|
|
};
|
|
|
|
|
|
-
|
|
|
|
// 地图图例
|
|
// 地图图例
|
|
const showMapLegend = ref(true);
|
|
const showMapLegend = ref(true);
|
|
const handleLegend = (e) => {
|
|
const handleLegend = (e) => {
|
|
- blueRegionLayer.toggleLayer(e);
|
|
|
|
|
|
+ blueRegionLayer.toggleLayer(e);
|
|
};
|
|
};
|
|
|
|
|
|
-eventBus.off("clickToCompare:point", toggleCompare)
|
|
|
|
-eventBus.on("clickToCompare:point", toggleCompare)
|
|
|
|
// 对比
|
|
// 对比
|
|
-const compareData = ref([])
|
|
|
|
-const showCompareBtn = ref(false)
|
|
|
|
|
|
+const compareData = ref([]);
|
|
|
|
+const showCompareBtn = ref(false);
|
|
function toggleCompare(arr) {
|
|
function toggleCompare(arr) {
|
|
// eventBus.emit("clickToCompare:point",{farmId:fs.get("farmId"),sampleId:fs.get("sampleId"), data: fs.getProperties()})
|
|
// eventBus.emit("clickToCompare:point",{farmId:fs.get("farmId"),sampleId:fs.get("sampleId"), data: fs.getProperties()})
|
|
- compareData.value = []
|
|
|
|
- arr.map(fs => {
|
|
|
|
- compareData.value.push({farmId: fs.get("farmId"),sampleId:fs.get("sampleId"), data: fs.getProperties()})
|
|
|
|
- })
|
|
|
|
- console.log('compareData', compareData.value);
|
|
|
|
- showCompareBtn.value = compareData.value.length>1 ? true : false
|
|
|
|
|
|
+ compareData.value = [];
|
|
|
|
+ arr.map((fs) => {
|
|
|
|
+ compareData.value.push({ farmId: fs.get("farmId"), sampleId: fs.get("id"), data: fs.getProperties() });
|
|
|
|
+ });
|
|
|
|
+ console.log("compareData", compareData.value);
|
|
|
|
+ showCompareBtn.value = compareData.value.length > 1 ? true : false;
|
|
}
|
|
}
|
|
function showCompare() {
|
|
function showCompare() {
|
|
- eventBus.emit("showCompareDialog", compareData.value)
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-eventBus.off("closeCompare", clsoeCompareFun)
|
|
|
|
-eventBus.on("closeCompare", clsoeCompareFun)
|
|
|
|
-function clsoeCompareFun() {
|
|
|
|
- showCompareBtn.value = false
|
|
|
|
- compareData.value = []
|
|
|
|
- console.log('resetett');
|
|
|
|
|
|
+ eventBus.emit("showCompareDialog", compareData.value);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const isShrink = ref(false);
|
|
|
|
+const isLeftShrink = ref(false);
|
|
|
|
+const isRightShrink = ref(false);
|
|
|
|
+const handleShrink = (position) => {
|
|
|
|
+ switch (position) {
|
|
|
|
+ case "bottom":
|
|
|
|
+ isShrink.value = !isShrink.value;
|
|
|
|
+ break;
|
|
|
|
+ case "left":
|
|
|
|
+ isLeftShrink.value = !isLeftShrink.value;
|
|
|
|
+ break;
|
|
|
|
+ case "rigth":
|
|
|
|
+ isRightShrink.value = !isRightShrink.value;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -611,6 +631,12 @@ function clsoeCompareFun() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.right {
|
|
.right {
|
|
|
|
+ width: calc(376px + 54px + 10px);
|
|
|
|
+ .album-r {
|
|
|
|
+ .list-wrap {
|
|
|
|
+ width: 375px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.list {
|
|
.list {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|
|
@@ -729,6 +755,15 @@ function clsoeCompareFun() {
|
|
// height: 30%;
|
|
// height: 30%;
|
|
// min-height: 210px;
|
|
// min-height: 210px;
|
|
// width: 640px;
|
|
// width: 640px;
|
|
|
|
+ transition: all 0.3s;
|
|
|
|
+ width: 800px;
|
|
|
|
+ height: 320px;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ &.isShrink {
|
|
|
|
+ height: 66px;
|
|
|
|
+ width: 450px;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ }
|
|
.arrow {
|
|
.arrow {
|
|
position: absolute;
|
|
position: absolute;
|
|
right: 56px;
|
|
right: 56px;
|
|
@@ -782,18 +817,13 @@ function clsoeCompareFun() {
|
|
// width: 525px;
|
|
// width: 525px;
|
|
height: 20px;
|
|
height: 20px;
|
|
}
|
|
}
|
|
- .fly-btn {
|
|
|
|
- position: fixed;
|
|
|
|
- bottom: 34px;
|
|
|
|
- right: 444px;
|
|
|
|
- }
|
|
|
|
.map-bg {
|
|
.map-bg {
|
|
position: fixed;
|
|
position: fixed;
|
|
z-index: 2;
|
|
z-index: 2;
|
|
background: rgba(35, 35, 35, 0.8);
|
|
background: rgba(35, 35, 35, 0.8);
|
|
border-radius: 18px;
|
|
border-radius: 18px;
|
|
padding: 7px 16px;
|
|
padding: 7px 16px;
|
|
- right: 440px;
|
|
|
|
|
|
+ right: 460px;
|
|
}
|
|
}
|
|
.map-btn {
|
|
.map-btn {
|
|
top: 19px;
|
|
top: 19px;
|
|
@@ -829,11 +859,11 @@ function clsoeCompareFun() {
|
|
.compare-start-btn {
|
|
.compare-start-btn {
|
|
position: absolute;
|
|
position: absolute;
|
|
z-index: 2;
|
|
z-index: 2;
|
|
- bottom: 56px;
|
|
|
|
- // right: 568px;
|
|
|
|
- left: 50%;
|
|
|
|
- transform: translateX(-50%);
|
|
|
|
|
|
+ // left: 50%;
|
|
|
|
+ // transform: translateX(-50%);
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
|
+ bottom: 40px;
|
|
|
|
+ right: 445px;
|
|
img {
|
|
img {
|
|
height: 55px;
|
|
height: 55px;
|
|
}
|
|
}
|