|
@@ -20,7 +20,7 @@
|
|
|
<div class="top-r yes-events">
|
|
<div class="top-r yes-events">
|
|
|
<div class="data-box" @click="toggleBox('面积')" :class="{ active: activeBoxName === '面积' }">
|
|
<div class="data-box" @click="toggleBox('面积')" :class="{ active: activeBoxName === '面积' }">
|
|
|
<div class="data-value">
|
|
<div class="data-value">
|
|
|
- <span>{{ areaVal.includes("3186") ? 31.2 : 419.89 }}</span
|
|
|
|
|
|
|
+ <span>{{ regionCropData.plantArea }}</span
|
|
|
>万亩
|
|
>万亩
|
|
|
</div>
|
|
</div>
|
|
|
<div class="data-name">种植面积</div>
|
|
<div class="data-name">种植面积</div>
|
|
@@ -36,7 +36,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="data-box" @click="toggleBox('产量')" :class="{ active: activeBoxName === '产量' }">
|
|
<div class="data-box" @click="toggleBox('产量')" :class="{ active: activeBoxName === '产量' }">
|
|
|
<div class="data-value">
|
|
<div class="data-value">
|
|
|
- <span>{{ areaVal.includes("3186") ? 10.4 : 192.12 }}</span
|
|
|
|
|
|
|
+ <span>{{ regionCropData.expectYield }}</span
|
|
|
>万吨
|
|
>万吨
|
|
|
</div>
|
|
</div>
|
|
|
<div class="data-name">预估产量</div>
|
|
<div class="data-name">预估产量</div>
|
|
@@ -171,6 +171,12 @@ const areaVal = ref(["3"]);
|
|
|
const mapRef = ref(null);
|
|
const mapRef = ref(null);
|
|
|
const showDetail = ref(false);
|
|
const showDetail = ref(false);
|
|
|
const treeRef = ref(null);
|
|
const treeRef = ref(null);
|
|
|
|
|
+
|
|
|
|
|
+// 区域作物面积和产量数据
|
|
|
|
|
+const regionCropData = ref({
|
|
|
|
|
+ plantArea: 0, // 种植面积(亩)
|
|
|
|
|
+ expectYield: 0, // 预估产量(吨)
|
|
|
|
|
+});
|
|
|
const defaultProps = {
|
|
const defaultProps = {
|
|
|
children: "items",
|
|
children: "items",
|
|
|
label: "name",
|
|
label: "name",
|
|
@@ -550,8 +556,26 @@ onMounted(async () => {
|
|
|
// ai与地图交互
|
|
// ai与地图交互
|
|
|
eventBus.off("chat:showMapLayer", handleMapLayer);
|
|
eventBus.off("chat:showMapLayer", handleMapLayer);
|
|
|
eventBus.on("chat:showMapLayer", handleMapLayer);
|
|
eventBus.on("chat:showMapLayer", handleMapLayer);
|
|
|
|
|
+
|
|
|
|
|
+ getRegionCropAreaYield();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+const getRegionCropAreaYield = async () => {
|
|
|
|
|
+ const res = await VE_API.warning.fetchRegionCropAreaYield({
|
|
|
|
|
+ adminCode: 156440000,
|
|
|
|
|
+ speciesId: 222,
|
|
|
|
|
+ year:'',
|
|
|
|
|
+ quarter:'',
|
|
|
|
|
+ });
|
|
|
|
|
+ if (res.code === 0 && res.data) {
|
|
|
|
|
+ // 更新区域作物数据
|
|
|
|
|
+ regionCropData.value = {
|
|
|
|
|
+ plantArea: res.data.plantArea && Number(res.data.plantArea).toFixed(2) || 0, // 种植面积(亩)
|
|
|
|
|
+ expectYield: res.data.expectYield && Number(res.data.expectYield).toFixed(2) || 0, // 预估产量(吨)
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
sessionStorage.removeItem("farmId");
|
|
sessionStorage.removeItem("farmId");
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|