Browse Source

fix: 点击跳转填品种

lxf 1 day ago
parent
commit
490e4ae9ba

+ 11 - 4
src/views/old_mini/agri_record/index.vue

@@ -161,14 +161,21 @@ const tabBarHeight = computed(() => store.state.home.tabBarHeight);
 const router = useRouter();
 const route = useRoute();
 
+const userInfo = localStorage.getItem("localUserInfo");
+const userInfoObj = userInfo ? JSON.parse(userInfo) : {};
+
 const handleLockClick = () => {
+    if (gardenId.value) {
+        router.push("/interaction?subjectId=" + localStorage.getItem("selectedFarmId"));
+        return;
+    }
+    if (userInfoObj?.tel) {
+        router.push(`/create_farm?from=growth_report&isReload=true`);
+        return;
+    }
     wx.miniProgram.navigateTo({
         url: '/pages/subPages/phone_auth/index',
     });
-
-    // wx.miniProgram.navigateTo({
-    //     url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
-    // });
 }
 
 // 播报相关事件

+ 5 - 5
src/views/old_mini/growth_report/index.vue

@@ -239,17 +239,17 @@ const userInfo = localStorage.getItem("localUserInfo");
 const userInfoObj = userInfo ? JSON.parse(userInfo) : {};
 
 const handleLockClick = () => {
-    if (userInfoObj.tel) {
+    if (currentFarmName.value) {
+        router.push("/interaction?subjectId=" + localStorage.getItem("selectedFarmId"));
+        return;
+    }
+    if (userInfoObj?.tel) {
         router.push(`/create_farm?from=growth_report&isReload=true`);
         return;
     }
     wx.miniProgram.navigateTo({
         url: '/pages/subPages/phone_auth/index',
     });
-
-    // wx.miniProgram.navigateTo({
-    //     url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
-    // });
 }
 
 const handleAddFarm = () => {

+ 10 - 4
src/views/old_mini/monitor/index.vue

@@ -179,14 +179,20 @@ const tabBarHeight = computed(() => store.state.home.tabBarHeight);
 const router = useRouter();
 const route = useRoute();
 
+const userInfo = localStorage.getItem("localUserInfo");
+const userInfoObj = userInfo ? JSON.parse(userInfo) : {};
 const handleLockClick = () => {
+    if (gardenId.value) {
+        router.push("/interaction?subjectId=" + localStorage.getItem("selectedFarmId"));
+        return;
+    }
+    if (userInfoObj?.tel) {
+        router.push(`/create_farm?from=growth_report&isReload=true`);
+        return;
+    }
     wx.miniProgram.navigateTo({
         url: '/pages/subPages/phone_auth/index',
     });
-
-    // wx.miniProgram.navigateTo({
-    //     url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
-    // });
 }
 
 

+ 7 - 1
src/views/old_mini/work_detail/index.vue

@@ -7,7 +7,7 @@
             <div class="content-status" :class="'status-' + detail?.flowStatus">
                 <div class="status-l">
                     <div class="status-title">{{ handleTagType(detail?.flowStatus) }}</div>
-                    <div class="status-sub" v-if="triggerDateText && detail?.flowStatus == -1">
+                    <div class="status-sub" v-if="triggerDateText && (detail?.flowStatus == -1 || detail?.flowStatus == -2)">
                         执行时间已经过去 {{ daysDiff }} 天了
                     </div>
                     <div class="status-sub" v-if="detail?.flowStatus === 3">
@@ -332,6 +332,7 @@ const hasRemark = (prescription, stageIndex) => {
 const handleTagType = (tagType) => {
     if (tagType == 0) return "待触发";
     if (tagType == -1) return "已过期";
+    if (tagType == -2) return "已过期";
     if (tagType == 3) return "待认证";
     if (tagType == 5) return "已完成";
     return "待触发"
@@ -459,6 +460,11 @@ const changeExecutionMethod = (stageIndex, value) => {
             background: #FF4F4F;
         }
     }
+    &.status--2 {
+        &::after {
+            background: #C7C7C7;
+        }
+    }
 
     &.status-5 {
         padding-top: 30px;