|
@@ -58,7 +58,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<!-- <div class="tracking-item__issue">{{ item.issue }}</div> -->
|
|
<!-- <div class="tracking-item__issue">{{ item.issue }}</div> -->
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="tracking-item__btn" @click.stop="openUploadPopup">
|
|
|
|
|
|
|
+ <div class="tracking-item__btn" @click.stop="handleUploadClick(item)">
|
|
|
<el-icon>
|
|
<el-icon>
|
|
|
<Plus />
|
|
<Plus />
|
|
|
</el-icon>
|
|
</el-icon>
|
|
@@ -380,10 +380,35 @@ const handleShare = (item) => {
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+const needDraw = ref(true);
|
|
|
|
|
+
|
|
|
const openUploadPopup = () => {
|
|
const openUploadPopup = () => {
|
|
|
showUploadPopup.value = true;
|
|
showUploadPopup.value = true;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+/** 与 growthTrack 上传一致:需勾画 → add_zone;异常 → pest_interact;否则弹上传 */
|
|
|
|
|
+const handleUploadClick = (item) => {
|
|
|
|
|
+ const isAbnormal = item?.type === "abnormal";
|
|
|
|
|
+ if (needDraw.value) {
|
|
|
|
|
+ router.push({
|
|
|
|
|
+ path: "/add_zone",
|
|
|
|
|
+ query: {
|
|
|
|
|
+ type: "farm",
|
|
|
|
|
+ targetUrl: isAbnormal ? "/pest_interact" : "/growth_track",
|
|
|
|
|
+ ...(isAbnormal ? { isAbnormal: "true" } : {}),
|
|
|
|
|
+ ...(item?.id != null ? { trackId: item.id } : {}),
|
|
|
|
|
+ ...(item?.type ? { trackType: item.type } : {}),
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (isAbnormal) {
|
|
|
|
|
+ router.push({ path: "/pest_interact" });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ showUploadPopup.value = true;
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
const dismissGuide = () => {
|
|
const dismissGuide = () => {
|
|
|
if (!guideVisible.value) return;
|
|
if (!guideVisible.value) return;
|
|
|
guideVisible.value = false;
|
|
guideVisible.value = false;
|