2 Commits e9b56455dc ... c84b6ee02c

Author SHA1 Message Date
  lxf c84b6ee02c Merge branch 'farmer' of http://www.sysuimars.cn:3000/feiniao/feiniao-farm-h5 into farmer 3 days ago
  lxf fcaa2ac09f fix: 新增区域 3 days ago

+ 19 - 0
src/views/old_mini/growth_report/index.vue

@@ -60,6 +60,7 @@
                                         <!-- <badge class="status-badge" dot 
                                             :offset="[80, -10]">
                                         </badge> -->
+                                        <div class="tag-name" :style="{ borderColor: card.purposeColor, color: card.purposeColor }">限时 3 天</div>
                                         <div class="status-title">
                                             {{ card.name }}
                                         </div>
@@ -729,6 +730,22 @@ linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
 
                     &.pending-card {
                         color: #fff;
+                        position: relative;
+                        padding: 9px 0 7px 0;
+                        .tag-name {
+                            position: absolute;
+                            top: -8px;
+                            right: 0;
+                            background: #fff;
+                            color: #FF6A6A;
+                            font-size: 10px;
+                            height: 17px;
+                            line-height: 17px;
+                            padding: 0 3px;
+                            border-radius: 2px;
+                            box-sizing: border-box;
+                            border: 0.5px solid #FF6A6A;
+                        }
                     }
 
                     .status-badge {
@@ -739,6 +756,7 @@ linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
 
                     .status-title {
                         font-size: 16px;
+                        line-height: 24px;
                     }
 
                     .status-sub {
@@ -747,6 +765,7 @@ linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
 
                         &.pending-sub {
                             color: #fff;
+                            line-height: 13px;
                         }
                     }
 

+ 3 - 1
src/views/old_mini/interaction/index.vue

@@ -184,6 +184,7 @@ const showSelectRegionPopup = ref(false);
 const selectRegionImage = ref("");
 const selectRegionTitle = ref("勾选 区域");
 
+const varietyItemData = ref(null);
 // 获取第一个选择的品种名称用于弹窗标题
 const getFirstSelectedVariety = () => {
     for (const farm of farmData.value.farms) {
@@ -195,6 +196,7 @@ const getFirstSelectedVariety = () => {
                 (t) => String(t.id) === String(selectedRegion.regionId)
             );
             if (varietyItem?.name) {
+                varietyItemData.value = varietyItem;
                 return {
                     name: varietyItem.name,
                     id: varietyItem.id,
@@ -302,7 +304,7 @@ const handleSkipSelectRegion = () => {
 
 const handleGoSelectRegion = () => {
     showSelectRegionPopup.value = false;
-    router.push("/draw_area?targetUrl=growth_report&subjectId=" + route.query.subjectId);
+    router.push("/draw_area?targetUrl=growth_report&showTipPopup=true&subjectId=" + route.query.subjectId + '&varietyId=' + varietyItemData.value.id);
 };
 
 // 大物候期转换所需参数// 组装为后端所需的 farmDataList 结构

+ 20 - 2
src/views/old_mini/monitor/subPages/darwArea.vue

@@ -27,6 +27,10 @@
             :title="`${activeVarietyName} 区域已保存成功`"
             :has-next="varietyTabs.length > 0 && activeVariety < varietyTabs.length - 1" @know="handleKnow"
             @next="handleSelectNextVariety" />
+
+
+        <tip-popup v-model:show="showTipPopup" type="success" text="您的农情报告已生成" text2="请查看" buttonText="点击查看"
+        @confirm="handleTipConfirm" />
     </div>
 </template>
 
@@ -39,6 +43,7 @@ import DrawRegionMap from "../../interactionList/map/drawRegionMap.js";
 import { useRouter, useRoute } from "vue-router";
 import { convertPointToArray } from "@/utils/index";
 import { ElMessage, ElMessageBox } from "element-plus";
+import TipPopup from "@/components/popup/tipPopup.vue";
 
 const store = useStore();
 const router = useRouter();
@@ -256,8 +261,16 @@ const confirmArea = async () => {
     router.back();
 };
 
-const handleKnow = () => {
+const handleKnow = (isLast = false) => {
     showSuccessPopup.value = false;
+    if (route.query.showTipPopup && isLast) {
+        showTipPopup.value = true;
+        return;
+    }
+    if(route.query.targetUrl) {
+        router.replace(route.query.targetUrl);
+        return;
+    }
     router.back();
 };
 
@@ -279,7 +292,7 @@ const handleSelectNextVariety = () => {
         showSuccessPopup.value = false;
     } else {
         // 如果已经是最后一个品种,则直接返回上一页
-        handleKnow();
+        handleKnow(true);
     }
 };
 
@@ -306,6 +319,11 @@ const handleEditRegion = () => {
         }
     });
 };
+
+const showTipPopup = ref(false);
+const handleTipConfirm = () => {
+    router.push("/growth_report?hideInteraction=true");
+}
 </script>
 
 <style lang="scss" scoped>