|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="growth-track-page">
|
|
<div class="growth-track-page">
|
|
|
- <custom-header :name="t('agriFile.workName')" />
|
|
|
|
|
|
|
+ <custom-header :name="t('agriFile.workName')" :isGoBack="true" @goback="handleBack" />
|
|
|
<div class="growth-track-body">
|
|
<div class="growth-track-body">
|
|
|
<div class="growth-hero">
|
|
<div class="growth-hero">
|
|
|
<div class="growth-hero__top">
|
|
<div class="growth-hero__top">
|
|
@@ -79,6 +79,10 @@
|
|
|
<span>{{ t("agriFile.uploadPhoto") }}</span>
|
|
<span>{{ t("agriFile.uploadPhoto") }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<album-upload-popup v-model:show="showUploadPopup" />
|
|
<album-upload-popup v-model:show="showUploadPopup" />
|
|
|
|
|
+ <leave-confirm-popup
|
|
|
|
|
+ v-model:show="showLeavePopup"
|
|
|
|
|
+ @confirm="confirmLeave"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -89,6 +93,7 @@ import { Icon } from 'vant';
|
|
|
import { ElMessage } from "element-plus";
|
|
import { ElMessage } from "element-plus";
|
|
|
import customHeader from "@/components/customHeader.vue";
|
|
import customHeader from "@/components/customHeader.vue";
|
|
|
import albumUploadPopup from "../components/albumUploadPopup.vue";
|
|
import albumUploadPopup from "../components/albumUploadPopup.vue";
|
|
|
|
|
+import leaveConfirmPopup from "@/components/popup/leaveConfirmPopup.vue";
|
|
|
import { useI18n } from "@/i18n";
|
|
import { useI18n } from "@/i18n";
|
|
|
|
|
|
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
@@ -102,6 +107,7 @@ const reason = computed(() => t("agriFile.interactReason"));
|
|
|
const zoneName = computed(() => t("agriFile.zoneOne"));
|
|
const zoneName = computed(() => t("agriFile.zoneOne"));
|
|
|
const ratio = ref("");
|
|
const ratio = ref("");
|
|
|
const showUploadPopup = ref(false);
|
|
const showUploadPopup = ref(false);
|
|
|
|
|
+const showLeavePopup = ref(false);
|
|
|
const situationList = [
|
|
const situationList = [
|
|
|
{ nameKey: "agriFile.growthAbnormal" },
|
|
{ nameKey: "agriFile.growthAbnormal" },
|
|
|
{ nameKey: "agriFile.rootAbnormal" },
|
|
{ nameKey: "agriFile.rootAbnormal" },
|
|
@@ -122,6 +128,20 @@ const handleUploadClick = () => {
|
|
|
}
|
|
}
|
|
|
showUploadPopup.value = true;
|
|
showUploadPopup.value = true;
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+const hasRatio = () => ratio.value !== "" && ratio.value != null;
|
|
|
|
|
+
|
|
|
|
|
+const handleBack = () => {
|
|
|
|
|
+ // if (!isAbnormal.value && !hasRatio()) {
|
|
|
|
|
+ // showLeavePopup.value = true;
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+ router.back();
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const confirmLeave = () => {
|
|
|
|
|
+ router.back();
|
|
|
|
|
+};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|