Преглед изворни кода

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

lxf пре 2 недеља
родитељ
комит
3d6e89ab67

+ 0 - 29
src/views/old_mini/modify_work/reviewWork.vue

@@ -55,13 +55,6 @@
                         <div class="subject-item cost-l">
                             <img class="subject-img" src="@/assets/img/gallery/capital.png" alt="" />
                             <div class="subject-tag">
-                                {{ workItem.executeMain }}
-                                <el-icon class="right-icon" size="10"><ArrowRight /></el-icon>
-                            </div>
-                        </div>
-                        <div class="subject-item cost-l">
-                            <img class="subject-img" src="@/assets/img/gallery/capital.png" alt="" />
-                            <div class="subject-tag">
                                 {{ workItem.serviceMain }}
                                 <el-icon class="right-icon" size="10"><ArrowRight /></el-icon>
                             </div>
@@ -82,16 +75,6 @@
                     <img class="icon" src="@/assets/img/home/label-icon.png" alt="" />
                     <span>复核成效</span>
                 </div>
-                <div class="result-box">
-                    <div class="result-text" v-if="workItem.reviewImage && workItem.reviewImage.length">
-                        促进分蘖芽萌发、加快分蘖生长,同时补充氮素等关键养分,增强植株长势,为形成足够穗数、提高群体产量打基础。
-                        <!-- 通过精准农业技术的应用,作物产量实现了两位数的增长,病虫害的发生率大幅下降,土壤肥力的提升 -->
-                    </div>
-                    <div class="result-text time-text" v-else>
-                        请抓紧时间上传照片!系统为您生成农事成效分析!
-                        <!-- 距离农事执行已 15 天,请抓紧时间上传照片!系统为您生成农事成效分析! -->
-                    </div>
-                </div>
                 <div class="info-box bottom-box">
                     <div class="recheck-box">
                         <div class="recheck-ablum">
@@ -741,18 +724,6 @@ const handleUpload = ({ imgArr }) => {
                     }
                 }
             }
-            .result-text {
-                font-size: 12px;
-                color: #666666;
-                line-height: 18px;
-                margin-top: 12px;
-            }
-            .time-text {
-                color: #ff953d;
-                padding: 4px 12px;
-                border-radius: 5px;
-                background: rgba(255, 149, 61, 0.1);
-            }
             .img-list + .img-list,
             .upload-wrap {
                 margin-top: 12px;

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

@@ -190,6 +190,8 @@ const handleFarm = (optionType) => {
                     ElMessage.success(optionType === "delete" ? "删除成功" : "设为默认农场成功");
                     if (optionType === "delete") {
                         router.back();
+                        localStorage.removeItem('selectedFarmId');
+                        localStorage.removeItem('selectedFarmName');
                     } else {
                         isDefaultFarm.value = true;
                         // 刷新 weatherInfo 组件的农场列表,确保显示最新的默认农场状态
@@ -287,7 +289,7 @@ const getBroadcastList = (page = 1, isLoadMore = false) => {
             loading.value = false;
         })
         .finally(() => {
-            loading.value = false;
+            loading.value = true;
         });
 };
 

+ 12 - 3
src/views/old_mini/monitor/subPages/plan.vue

@@ -61,7 +61,7 @@
                                         ]"
                                         @click="handleRowClick(fw)"
                                     >
-                                        <span class="arrange-text">{{ fw.farmWorkName }}</span>
+                                        <span class="arrange-text">{{ formatTextWithLineBreak(fw.farmWorkName) }}</span>
                                         <div
                                             v-if="
                                                 getArrangeStatusClass(fw) === 'status-complete' ||
@@ -401,6 +401,13 @@ const getTextLengthClass = (text) => {
     return "";
 };
 
+// 处理文本,在括号前换行
+const formatTextWithLineBreak = (text) => {
+    if (!text || typeof text !== "string") return text;
+    // 在左括号前添加换行符
+    return text.replace(/([((])/g, "\n$1");
+};
+
 </script>
 
 <style scoped lang="scss">
@@ -585,17 +592,18 @@ const getTextLengthClass = (text) => {
                                     width: 35px;
                                 }
                                 &.text-4-6 {
-                                    width: 64px;
+                                    width: 65px;
                                 }
                                 &.text-7-8 {
                                     width: 66px;
                                 }
                                 .arrange-text {
                                     writing-mode: vertical-lr;
+                                    white-space: pre-line;
                                 }
                             }
                             &.text-4-6 {
-                                width: 64px;
+                                width: 65px;
                             }
                             &.text-7-8 {
                                 width: 66px;
@@ -605,6 +613,7 @@ const getTextLengthClass = (text) => {
                                 line-height: 14px;
                                 text-align: center;
                                 padding-left: 3px;
+                                white-space: pre-line;
                             }
                             .status-icon {
                                 position: absolute;