Forráskód Böngészése

fix: 隐藏农情相册,修改点位分布

lxf 1 hete
szülő
commit
908b660d17

+ 13 - 10
src/views/old_mini/agri_file/index.vue

@@ -208,11 +208,11 @@ const navCards = [
         labelKey: "agriFile.patrolRecord",
         icon: require("@/assets/img/agricultural/icon-1.png"),
     },
-    {
-        key: "album",
-        labelKey: "agriFile.agriAlbum",
-        icon: require("@/assets/img/agricultural/icon-2.png"),
-    },
+    // {
+    //     key: "album",
+    //     labelKey: "agriFile.agriAlbum",
+    //     icon: require("@/assets/img/agricultural/icon-2.png"),
+    // },
     {
         key: "report",
         labelKey: "agriFile.diagnosisReport",
@@ -882,11 +882,13 @@ watch(activeNav, (key) => {
         z-index: 2;
         display: flex;
         justify-content: space-around;
-        padding: 10px 10px;
+        padding: 10px 6px;
         margin-bottom: 10px;
+        gap: 6px;
 
         .nav-card-wrap {
             position: relative;
+            width: 100%;
 
             &--report {
                 z-index: 5;
@@ -896,19 +898,20 @@ watch(activeNav, (key) => {
         .nav-card {
             position: relative;
             display: flex;
-            flex-direction: column;
+            // flex-direction: column;
             align-items: center;
             justify-content: center;
             border-radius: 8px;
             background: #fff;
-            width: 90px;
-            height: 64px;
+            // width: 90px;
+            gap: 4px;
+            height: 40px;
             box-shadow: 0px 4px 4px 0px #0000000D;
 
             .nav-card__icon {
                 width: 26px;
                 height: 26px;
-                margin-bottom: 4px;
+                // margin-bottom: 4px;
             }
 
             &.is-active {

+ 8 - 2
src/views/old_mini/work_execute/index.vue

@@ -203,8 +203,14 @@ function mapUserWorkToTask(item, index, centerWkt) {
     const coord = convertPointToArray(centerWkt);
     const lng = Number(coord?.[0]);
     const lat = Number(coord?.[1]);
-    const dx = ((index % 3) - 1) * 0.0012;
-    const dy = (Math.floor(index / 3) - 0.5) * 0.001;
+    // 以 work_id/index 做种子,在中心附近随机抖动(刷新位置稳定)
+    const seed = Number(record.work_id ?? item.work_id ?? index) || index + 1;
+    const unit = (salt) => {
+        const x = Math.sin(seed * salt) * 10000;
+        return x - Math.floor(x);
+    };
+    const dx = (unit(12.9898) - 0.5) * 0.0024;
+    const dy = (unit(78.233) - 0.5) * 0.002;
     const hasCoord = Number.isFinite(lng) && Number.isFinite(lat);
     const baseName = detail.fw_name || record._parentFwName || item.fw_name || "";
     const title = baseName;