|
|
@@ -3,28 +3,33 @@
|
|
|
<fnHeader showDate></fnHeader>
|
|
|
<div class="content">
|
|
|
<navigation style="margin-left: 50px" @handleTab="handleTab"></navigation>
|
|
|
- <div class="left yes-events">
|
|
|
- <tool-list direction="left" :list="leftToolList" @handleActive="handleActiveLeft"></tool-list>
|
|
|
+ <div class="left yes-events" :class="{ 'collapsed-left': isLeftShrink }">
|
|
|
+ <div class="home-btn">
|
|
|
+ <div class="btn" @click="changeLeftComponent(0)" :class="{active: activeBtn === 0}">实时感知</div>
|
|
|
+ <div class="btn" @click="changeLeftComponent(1)" :class="{active: activeBtn === 1}">诊断识别</div>
|
|
|
+ </div>
|
|
|
+ <tool-list direction="left" ref="leftTool" :list="leftToolList[activeBtn]" @handleActive="handleActiveLeft"></tool-list>
|
|
|
<component :is="components[currentComponent]" />
|
|
|
<!-- 箭头 -->
|
|
|
<div class="arrow" @click="handleShrink('left')">
|
|
|
- <el-icon class="icon" color="#141414"><DArrowLeft /></el-icon>
|
|
|
+ <el-icon class="icon" :class="{ 'arrow-left': isLeftShrink }" color="#141414"><DArrowLeft /></el-icon>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="home-bottom">
|
|
|
- <div class="garden-file" :class="{ isShrink: isShrink }">
|
|
|
+ <img class="img yes-events" @click="handlePage" src="@/assets/images/home/table-btn-sk.png" alt="">
|
|
|
+ <!-- <div class="garden-file" :class="{ isShrink: isShrink }">
|
|
|
<home-file></home-file>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
- <div class="right yes-events">
|
|
|
+ <div class="right yes-events" :class="{ 'collapsed-right': isRightShrink }">
|
|
|
+ <div class="home-btn">
|
|
|
+ <div class="btn" @click="changeRightComponent(0)" :class="{active: activeRightBtn === 0}">精细农事</div>
|
|
|
+ <div class="btn" @click="changeRightComponent(1)" :class="{active: activeRightBtn === 1}">人机执行</div>
|
|
|
+ </div>
|
|
|
<div class="list album-r">
|
|
|
<chart-box name="农事列表" arrow="arrow-left" :class="{ 'list-wrap': rightIndex === 0 }">
|
|
|
<template v-if="rightIndex === 0">
|
|
|
<album></album>
|
|
|
- <!-- <img class="tabs" src="@/assets/images/home/ns-tabs.png" alt="">
|
|
|
- <div class="img-box">
|
|
|
- <img @click="handleAct(item)" v-for="item in 2" :key="item" :src="require(`@/assets/images/home/0${act<=2&&act==item?item+'-act':item}.png`)" alt="">
|
|
|
- </div> -->
|
|
|
</template>
|
|
|
<template v-if="rightIndex === 1">
|
|
|
<div class="img-box1">
|
|
|
@@ -32,29 +37,13 @@
|
|
|
<img src="@/assets/images/home/fh02.png" alt="" />
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template v-if="rightIndex === 2">
|
|
|
- <div class="btn-wrap">
|
|
|
- <div :class="{ active: btnIndex === 0 }" @click="handleBtn(0)">
|
|
|
- {{ btnIndex === 0 && btnName != "" ? "采样分区:" + btnName : "选择采样分区" }}
|
|
|
- </div>
|
|
|
- <div :class="{ active: btnIndex === 1 }" @click="handleBtn(1)">
|
|
|
- {{ btnIndex === 1 && btnName != "" ? "单树编号:" + btnName : "选择树" }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="img-box2" v-show="showPoint">
|
|
|
- <img v-if="showType === 'point'" src="@/assets/images/home/line-chart.png" alt="" />
|
|
|
- <img v-else src="@/assets/images/home/line-chart2.png" alt="" />
|
|
|
- <img src="@/assets/images/home/fh01.png" alt="" />
|
|
|
- </div>
|
|
|
- <div class="img-box2" v-show="!showPoint">
|
|
|
- <img v-if="showType === 'point'" src="@/assets/images/home/line-chart1.png" alt="" />
|
|
|
- <img v-else src="@/assets/images/home/line-chart3.png" alt="" />
|
|
|
- <img src="@/assets/images/home/fh02.png" alt="" />
|
|
|
- </div>
|
|
|
- </template>
|
|
|
</chart-box>
|
|
|
</div>
|
|
|
- <tool-list direction="right" :list="rightToolList" @handleActive="handleActiveRight"></tool-list>
|
|
|
+ <tool-list direction="right" ref="rightTool" :list="rightToolList[activeRightBtn]" @handleActive="handleActiveRight"></tool-list>
|
|
|
+ <!-- 箭头 -->
|
|
|
+ <!-- <div class="arrow" @click="handleShrink('right')">
|
|
|
+ <el-icon class="icon" :class="{ 'arrow-right': isRightShrink }" color="#141414"><DArrowRight /></el-icon>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
|
|
|
<!-- 图例 -->
|
|
|
@@ -174,9 +163,37 @@ import album from "./album/index.vue";
|
|
|
import PdfDialog from "../../components/PdfDialog";
|
|
|
import StaticMapLayers from "@/components/static_map_change/Layers.js"
|
|
|
import FarmFightTask from "./components/farmFightTask";
|
|
|
+import leftFly from "./components/leftComponents/leftFly.vue";
|
|
|
+import leftWeather from "./components/leftComponents/leftWeather.vue";
|
|
|
+import leftStation from "./components/leftComponents/leftStation.vue";
|
|
|
+
|
|
|
+const activeBtn = ref(0)
|
|
|
+const leftTool = ref(null)
|
|
|
+function changeLeftComponent(i) {
|
|
|
+ activeBtn.value = i
|
|
|
+ handleActiveLeft(leftToolList[i][0])
|
|
|
+ // if(i){
|
|
|
+ // isDisable.value = false
|
|
|
+ // }else{
|
|
|
+ // isDisable.value = true
|
|
|
+ // }
|
|
|
+ leftTool.value.resetActive(0)
|
|
|
+}
|
|
|
+
|
|
|
+const rightTool = ref(null)
|
|
|
+const activeRightBtn = ref(0)
|
|
|
+function changeRightComponent(i) {
|
|
|
+ activeRightBtn.value = i
|
|
|
+ handleActiveRight(rightToolList[i][0])
|
|
|
+ rightTool.value.resetActive(0)
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
let store = useStore();
|
|
|
const components = {
|
|
|
+ leftFly,
|
|
|
+ leftWeather,
|
|
|
+ leftStation,
|
|
|
homePage,
|
|
|
weatherPage,
|
|
|
phenologyPage,
|
|
|
@@ -533,33 +550,51 @@ eventBus.on("click:updateArea", (e) => {
|
|
|
//getFarmLog()
|
|
|
});
|
|
|
|
|
|
-const currentComponent = ref("homePage");
|
|
|
+const currentComponent = ref("leftFly");
|
|
|
const handleActiveLeft = (e) => {
|
|
|
currentComponent.value = e.componentName;
|
|
|
- if (e.title === "首页") {
|
|
|
- router.push("/warningHome");
|
|
|
- }
|
|
|
};
|
|
|
-const leftToolList = [
|
|
|
- {
|
|
|
- title: "首页",
|
|
|
- name: "home",
|
|
|
- componentName: "homePage",
|
|
|
+const leftToolList = [[
|
|
|
+ {
|
|
|
+ title: "飞巡感知",
|
|
|
+ componentName: "leftFly",
|
|
|
},
|
|
|
{
|
|
|
- title: "气象预警",
|
|
|
- componentName: "weatherPage",
|
|
|
+ title: "气象感知",
|
|
|
+ componentName: "leftWeather"
|
|
|
},
|
|
|
{
|
|
|
- title: "物候调节",
|
|
|
+ title: "人工感知",
|
|
|
componentName: "phenologyPage",
|
|
|
},
|
|
|
{
|
|
|
- title: "病虫测报",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "营养评估",
|
|
|
+ title: "站点感知",
|
|
|
+ componentName: "leftStation",
|
|
|
},
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ title: "首页",
|
|
|
+ name:'home',
|
|
|
+ componentName: "homePage"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "气象预警",
|
|
|
+ componentName: "weatherPage"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "物候调节",
|
|
|
+ componentName: "phenologyPage"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "病虫指标",
|
|
|
+ componentName: "rightWeather"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "营养评估",
|
|
|
+ componentName: "rightWeather"
|
|
|
+ },
|
|
|
+ ]
|
|
|
];
|
|
|
|
|
|
const rightIndex = ref(0);
|
|
|
@@ -578,19 +613,35 @@ const hanleRightIndex = (num) => {
|
|
|
rightIndex.value = num;
|
|
|
eventBus.emit("tool:updateAct", num);
|
|
|
};
|
|
|
-const rightToolList = [
|
|
|
- {
|
|
|
- title: "农事列表",
|
|
|
- index: 0,
|
|
|
- },
|
|
|
- {
|
|
|
- title: "处方分析",
|
|
|
- index: 2,
|
|
|
- },
|
|
|
- {
|
|
|
- title: "复核对比",
|
|
|
- index: 1,
|
|
|
- },
|
|
|
+const rightToolList = [[
|
|
|
+ {
|
|
|
+ title: "农事列表",
|
|
|
+ componentName: "leftFly",
|
|
|
+ index: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "认证评估",
|
|
|
+ componentName: "leftFly",
|
|
|
+ index: 1,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ title: "无人机",
|
|
|
+ componentName: "leftFly",
|
|
|
+ index: 2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "农机设备",
|
|
|
+ componentName: "leftFly",
|
|
|
+ index: 2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "人工巡园",
|
|
|
+ componentName: "leftFly",
|
|
|
+ index: 2,
|
|
|
+ },
|
|
|
+ ]
|
|
|
];
|
|
|
|
|
|
// 跳转果园档案
|
|
|
@@ -656,10 +707,43 @@ const photoList = ref([
|
|
|
|
|
|
.content {
|
|
|
width: 100%;
|
|
|
- height: calc(100% - 74px - 48px);
|
|
|
+ height: calc(100% - 74px - 48px - 54px);
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
box-sizing: border-box;
|
|
|
+ margin-top: 60px;
|
|
|
+ .home-btn {
|
|
|
+ position: absolute;
|
|
|
+ top: -60px;
|
|
|
+ left: 0;
|
|
|
+ height: 54px;
|
|
|
+ display: flex;
|
|
|
+ border: 1px solid #444444;
|
|
|
+ background: #101010;
|
|
|
+ border-radius: 0 8px 8px 0;
|
|
|
+ padding: 8px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ width: 429px;
|
|
|
+ .btn {
|
|
|
+ flex: 1;
|
|
|
+ background: rgba(79, 79, 79, 0.6);
|
|
|
+ border-radius: 4px;
|
|
|
+ font-size: 20px;
|
|
|
+ font-family: "PangMenZhengDao";
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
+ height: 38px;
|
|
|
+ line-height: 38px;
|
|
|
+ cursor: pointer;
|
|
|
+ &.active {
|
|
|
+ background: linear-gradient(180deg, #FFD887, #ED9E1E);
|
|
|
+ color: #1D1D1D;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .btn + .btn {
|
|
|
+ margin-left: 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
.left,
|
|
|
.right {
|
|
|
width: calc(376px + 54px);
|
|
|
@@ -668,6 +752,16 @@ const photoList = ref([
|
|
|
box-sizing: border-box;
|
|
|
display: flex;
|
|
|
position: relative;
|
|
|
+ transition: transform 0.3s;
|
|
|
+ }
|
|
|
+ .collapsed-left{
|
|
|
+ transform: translateX(-430px);
|
|
|
+ }
|
|
|
+ .collapsed-right{
|
|
|
+ transform: translateX(430px);
|
|
|
+ }
|
|
|
+ .arrow-left{
|
|
|
+ transform: rotate(180deg);
|
|
|
}
|
|
|
.left {
|
|
|
background: #101010;
|
|
|
@@ -684,6 +778,7 @@ const photoList = ref([
|
|
|
border-radius: 0 5px 5px 0;
|
|
|
text-align: center;
|
|
|
cursor: pointer;
|
|
|
+ transition: transform 0.3s;
|
|
|
}
|
|
|
}
|
|
|
.right {
|
|
|
@@ -764,6 +859,12 @@ const photoList = ref([
|
|
|
width: calc(100% - 20px - 430px * 2);
|
|
|
height: 152px;
|
|
|
align-self: flex-end;
|
|
|
+ justify-content: center;
|
|
|
+ .img{
|
|
|
+ width: 268px;
|
|
|
+ height: 66px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
.time-wrap {
|
|
|
height: 85px;
|
|
|
}
|