|
@@ -9,7 +9,7 @@
|
|
<div class="overview-file">
|
|
<div class="overview-file">
|
|
<div class="box-title">总体档案</div>
|
|
<div class="box-title">总体档案</div>
|
|
<div class="base-data">
|
|
<div class="base-data">
|
|
- <div class="base-item" v-for="(item, index) in photoBaseData" :key="item.label">
|
|
|
|
|
|
+ <div class="base-item" v-for="(item, index) in photoBaseData" :key="item.label" @click.stop="toggleFileItem(item.label, index)">
|
|
<span class="label">{{ item.label }}</span>
|
|
<span class="label">{{ item.label }}</span>
|
|
<div v-if="index === 0" class="value">
|
|
<div v-if="index === 0" class="value">
|
|
<el-select
|
|
<el-select
|
|
@@ -48,7 +48,7 @@
|
|
class="box-item"
|
|
class="box-item"
|
|
v-for="(item, index) in outputBox"
|
|
v-for="(item, index) in outputBox"
|
|
:key="index"
|
|
:key="index"
|
|
- @click="toggleAcitve(item.name)"
|
|
|
|
|
|
+ @click="toggleAcitve(item.name, item.field)"
|
|
:class="{ active: activeOuput === item.name }"
|
|
:class="{ active: activeOuput === item.name }"
|
|
>
|
|
>
|
|
<div class="item-name">{{ item.name }}</div>
|
|
<div class="item-name">{{ item.name }}</div>
|
|
@@ -64,7 +64,7 @@
|
|
class="box-item"
|
|
class="box-item"
|
|
v-for="(item, index) in qualityBox"
|
|
v-for="(item, index) in qualityBox"
|
|
:key="index"
|
|
:key="index"
|
|
- @click="toggleQualityAcitve(item.name)"
|
|
|
|
|
|
+ @click="toggleAcitve(item.name, item.field)"
|
|
:class="{ active: activeOuput === item.name }"
|
|
:class="{ active: activeOuput === item.name }"
|
|
>
|
|
>
|
|
<div class="item-name">{{ item.name }}</div>
|
|
<div class="item-name">{{ item.name }}</div>
|
|
@@ -81,14 +81,14 @@
|
|
import eventBus from "@/api/eventBus";
|
|
import eventBus from "@/api/eventBus";
|
|
import { onMounted, ref, } from "vue";
|
|
import { onMounted, ref, } from "vue";
|
|
const outputBox = ref([
|
|
const outputBox = ref([
|
|
- { id: 1, name: "产量估计", value: "--", unit: "斤/亩" },
|
|
|
|
- { id: 2, name: "高质果率", value: "--", unit: "%" },
|
|
|
|
- { id: 3, name: "雄花比例", value: "--", unit: "%" },
|
|
|
|
|
|
+ { id: 1, name: "产量估计", field: "cl", value: "--", unit: "斤/亩" },
|
|
|
|
+ { id: 2, name: "高质果率", field: "spgl", value: "--", unit: "%" },
|
|
|
|
+ { id: 3, name: "雌花比例", value: "--", unit: "%" },
|
|
]);
|
|
]);
|
|
|
|
|
|
const qualityBox = ref([
|
|
const qualityBox = ref([
|
|
- { id: 5, name: "通风率", value: "--", unit: "%" },
|
|
|
|
- { id: 6, name: "透光率", value: "--", unit: "%" },
|
|
|
|
|
|
+ { id: 5, name: "通风率", field: "tfl", value: "--", unit: "%" },
|
|
|
|
+ { id: 6, name: "透光率", field: "tgl", value: "--", unit: "%" },
|
|
{ id: 7, name: "病虫等级", value: "--", unit: "" },
|
|
{ id: 7, name: "病虫等级", value: "--", unit: "" },
|
|
]);
|
|
]);
|
|
|
|
|
|
@@ -138,45 +138,66 @@ const getSpeciesItemList = (farmId,regionId) =>{
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
-function changeSelect() {}
|
|
|
|
|
|
+function changeSelect(e) {
|
|
|
|
+ console.log('eee', e);
|
|
|
|
+ setFileData(e)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function toggleFileItem(name, index) {
|
|
|
|
+ if (index !== 0) {
|
|
|
|
+ toggleAcitve(name)
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
// 产量详情
|
|
// 产量详情
|
|
-function toggleAcitve(name) {
|
|
|
|
|
|
+function toggleAcitve(name, field) {
|
|
activeOuput.value = name;
|
|
activeOuput.value = name;
|
|
- eventBus.emit("change:mapPoint", name)
|
|
|
|
|
|
+ console.log('产量详情产量详情产量详情', name);
|
|
|
|
+ // eventBus.emit("change:mapPoint", name)
|
|
|
|
+ if (name === "透光率" || name === "通风率") {
|
|
|
|
+ eventBus.emit('handleActive',{name,key:"生态指标",index: 1})
|
|
|
|
+ // eventBus.emit('handleTab',"透光率")
|
|
|
|
+ } else {
|
|
|
|
+ eventBus.emit("change:mapPoint", field)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
const regionId = ref(null)
|
|
const regionId = ref(null)
|
|
function toggleAreaId({ areaId, farmId }) {
|
|
function toggleAreaId({ areaId, farmId }) {
|
|
- console.log('22222aaaaareid', areaId, farmId);
|
|
|
|
regionId.value = areaId
|
|
regionId.value = areaId
|
|
getSpeciesItemList(farmId, areaId)
|
|
getSpeciesItemList(farmId, areaId)
|
|
getFileData(farmId, areaId)
|
|
getFileData(farmId, areaId)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const allTypeData = ref([])
|
|
function getFileData(farmId,regionId) {
|
|
function getFileData(farmId,regionId) {
|
|
VE_API.farm.getFarmFiles({farmId,regionId: regionId ? regionId: undefined}).then(({data}) =>{
|
|
VE_API.farm.getFarmFiles({farmId,regionId: regionId ? regionId: undefined}).then(({data}) =>{
|
|
- const res = data.find(item => item.type_id == photoBaseData.value[0].speciesItemId)
|
|
|
|
- photoBaseData.value[1].value = res.meta_info.avg_crown + "平方米"
|
|
|
|
- photoBaseData.value[2].value = res.meta_info.avg_branch_num
|
|
|
|
- photoBaseData.value[3].value = res.meta_info.avg_age + "年"
|
|
|
|
- photoList.value[0].key = res.meta_info.phenology_info.key
|
|
|
|
- photoList.value[0].statement = res.meta_info.phenology_info.statement
|
|
|
|
- photoList.value[1].key = res.meta_info.dp_alert_info.key
|
|
|
|
- photoList.value[1].statement = res.meta_info.dp_alert_info.statement
|
|
|
|
- photoList.value[2].key = res.meta_info.grow_alert_info.key
|
|
|
|
- photoList.value[2].statement = res.meta_info.grow_alert_info.statement
|
|
|
|
- photoList.value[3].key = res.meta_info.prescription_info.key
|
|
|
|
- photoList.value[3].statement = res.meta_info.prescription_info.statement
|
|
|
|
- outputBox.value[0].value = res.production_info.production
|
|
|
|
- outputBox.value[1].value = res.production_info.quality.toFixed(0)
|
|
|
|
- outputBox.value[2].value = res.production_info.xionghua_ratio.toFixed(0)
|
|
|
|
- qualityBox.value[0].value = res.ecology_info.ventilation
|
|
|
|
- qualityBox.value[1].value = res.ecology_info.transmittance
|
|
|
|
- qualityBox.value[2].value = res.ecology_info.dp_situation
|
|
|
|
|
|
+ allTypeData.value = data
|
|
|
|
+ setFileData(photoBaseData.value[0].speciesItemId)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+function setFileData(type_id) {
|
|
|
|
+ const res = allTypeData.value.find(item => item.type_id == type_id)
|
|
|
|
+ photoBaseData.value[1].value = res.meta_info.avg_crown + "平方米"
|
|
|
|
+ photoBaseData.value[2].value = res.meta_info.avg_branch_num
|
|
|
|
+ photoBaseData.value[3].value = res.meta_info.avg_age + "年"
|
|
|
|
+ photoList.value[0].key = res.meta_info.phenology_info.key
|
|
|
|
+ photoList.value[0].statement = res.meta_info.phenology_info.statement
|
|
|
|
+ photoList.value[1].key = res.meta_info.dp_alert_info.key
|
|
|
|
+ photoList.value[1].statement = res.meta_info.dp_alert_info.statement
|
|
|
|
+ photoList.value[2].key = res.meta_info.grow_alert_info.key
|
|
|
|
+ photoList.value[2].statement = res.meta_info.grow_alert_info.statement
|
|
|
|
+ photoList.value[3].key = res.meta_info.prescription_info.key
|
|
|
|
+ photoList.value[3].statement = res.meta_info.prescription_info.statement
|
|
|
|
+ outputBox.value[0].value = res.production_info.production
|
|
|
|
+ outputBox.value[1].value = res.production_info.quality.toFixed(0)
|
|
|
|
+ outputBox.value[2].value = res.production_info.cihua_ratio.toFixed(0)
|
|
|
|
+ qualityBox.value[0].value = res.ecology_info.ventilation
|
|
|
|
+ qualityBox.value[1].value = res.ecology_info.transmittance
|
|
|
|
+ qualityBox.value[2].value = res.ecology_info.dp_situation
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|