Browse Source

Merge branch 'farmer' of http://www.sysuimars.cn:3000/feiniao/feiniao-farm-h5 into farmer

lxf 2 days ago
parent
commit
0cb3ca9920

+ 5 - 1
src/components/weatherInfo.vue

@@ -87,6 +87,10 @@ const props = defineProps({
     gardenId: {
         type: [Number, String],
         default: null
+    },
+    from: {
+        type: String,
+        default: null
     }
 });
 
@@ -299,7 +303,7 @@ const handleFarmInfo = () => {
     router.push(`/farm_info?subjectId=${farmId.value}`);
 }
 const handleAddFarm = () => {
-    router.push(`/create_farm?type=farmer`);
+    router.push(`/create_farm?from=${props.from}&isReload=true`);
 }
 
 // 获取天气数据

+ 1 - 1
src/views/old_mini/agri_record/index.vue

@@ -4,7 +4,7 @@
         <!-- 天气遮罩 -->
         <div class="weather-mask" v-show="isExpanded" @click="handleMaskClick"></div>
         <!-- 天气 -->
-        <weather-info ref="weatherInfoRef" class="weather-info" @weatherExpanded="weatherExpanded"
+        <weather-info ref="weatherInfoRef" from="agri_record" class="weather-info" @weatherExpanded="weatherExpanded"
             @changeGarden="changeGarden" :isGarden="true" :gardenId="defaultGardenId"></weather-info>
         <!-- 作物档案 -->
         <div class="archives-time-line">

+ 7 - 7
src/views/old_mini/create_farm/index.vue

@@ -271,6 +271,7 @@ onActivated(() => {
         isFarmNameManuallyModified.value = false;
         // 清空上一次地块缓存
         store.commit("home/SET_FARM_POLYGON", null);
+        getSpecieList();
     }
     // 确保地图已初始化,使用 nextTick 等待 DOM 更新
     nextTick(() => {
@@ -288,7 +289,6 @@ onActivated(() => {
             }, 100);
             return;
         }
-
         handleMapUpdate();
     });
 });
@@ -822,7 +822,6 @@ function updateFarmNameIfNeeded() {
 
 // 回填编辑数据
 function populateEditData() {
-    console.log('populateEditData');
     const editData = store.state.home.editFarmData;
     if (!editData) {
         return;
@@ -1158,10 +1157,10 @@ function handleMianjiInput(value) {
                             justify-content: center;
                         }
 
-                        .el-select__selection {
-                            flex: none;
-                            width: fit-content;
-                        }
+                        // .el-select__selection {
+                        //     flex: none;
+                        //     width: min-content;
+                        // }
 
                         .el-select__placeholder {
                             color: #000;
@@ -1180,7 +1179,8 @@ function handleMianjiInput(value) {
                     }
 
                     .select-item {
-                        min-width: 100px;
+                        min-width: 80px;
+                        margin-left: 10px;
                     }
                 }
 

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

@@ -3,7 +3,7 @@
         <!-- 天气遮罩 -->
         <div class="weather-mask" v-show="isExpanded" @click="handleMaskClick"></div>
         <!-- 组件:天气 -->
-        <weather-info ref="weatherInfoRef" class="weather-info" @weatherExpanded="weatherExpanded"
+        <weather-info ref="weatherInfoRef" from="growth_report" class="weather-info" @weatherExpanded="weatherExpanded"
             @changeGarden="changeGarden" :isGarden="true"></weather-info>
         <div class="report-content-wrap" v-if="hasReport" v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.1)">
             <swipe class="my-swipe" :loop="false" indicator-color="white" @change="handleSwipeChange">
@@ -253,7 +253,7 @@ const handleLockClick = () => {
 }
 
 const handleAddFarm = () => {
-    router.push(`/create_farm?from=growth_report`);
+    router.push(`/create_farm?from=growth_report&isReload=true`);
 }
 
 const todayPatrolFocus = ref([]);

+ 1 - 0
src/views/old_mini/home/subPages/prescriptionPage.vue

@@ -463,6 +463,7 @@ const goBack = () => {
     if (route.query.subjectId) {
         router.go(-1);
     } else {
+        // router.replace(`/create_farm?from=${route.query.from}&type=edit`);
         router.replace(`/create_farm?from=${route.query.from}&type=${route.query.type}`);
     }
 };

+ 1 - 1
src/views/old_mini/monitor/index.vue

@@ -4,7 +4,7 @@
         <!-- 天气遮罩 -->
         <div class="weather-mask" v-show="isExpanded" @click="handleMaskClick"></div>
         <!-- 天气 -->
-        <weather-info ref="weatherInfoRef" class="weather-info" @weatherExpanded="weatherExpanded"
+        <weather-info ref="weatherInfoRef" from="monitor" class="weather-info" @weatherExpanded="weatherExpanded"
             @changeGarden="changeGarden" :isGarden="true" :gardenId="defaultGardenId"></weather-info>
         <!-- 作物档案 -->
         <div class="archives-time-line">