Browse Source

fix: 流程

lxf 1 tuần trước cách đây
mục cha
commit
ad84098942

BIN
src/assets/img/monitor/upload-tip-img.png


+ 117 - 0
src/components/popup/uploadTips.vue

@@ -0,0 +1,117 @@
+<template>
+    <popup v-model:show="showValue" round class="upload-tips-popup" teleport="body">
+        <div class="title">上传提示</div>
+        <div class="tips-box">
+            <Highlight class="tips-text" source-string="请使用 水印相机 APP 进行拍摄照片照片需要显示 时间和位置 水印"
+                :keywords="['水印相机 APP', '时间和位置']" />
+        </div>
+        <div class="img-box">
+            <img src="@/assets/img/monitor/upload-tip-img.png" alt="">
+            <div class="img-text">示例图片</div>
+            <div class="img-info">
+                <span class="img-time">14:33</span>
+                <div class="info-text">
+                    <span>2026.03.11 星期三</span>
+                    <span class="address">广州市从化区江埔街九里步</span>
+                </div>
+            </div>
+        </div>
+    </popup>
+</template>
+
+<script setup>
+import { Popup, Highlight } from "vant";
+import { computed } from "vue";
+
+const props = defineProps({
+    show: {
+        type: Boolean,
+        default: false,
+    },
+});
+
+const emit = defineEmits(["update:show", "know", "next"]);
+
+const showValue = computed({
+    get: () => props.show,
+    set: (value) => emit("update:show", value),
+});
+
+const handleKnow = () => {
+    emit("know");
+    emit("update:show", false);
+};
+
+const handleNext = () => {
+    emit("next");
+    emit("update:show", false);
+};
+</script>
+
+<style scoped lang="scss">
+.upload-tips-popup {
+    width: 100%;
+    padding: 20px 18px;
+
+    .title {
+        font-size: 28px;
+        color: #2F2F2F;
+        font-family: "PangMenZhengDao";
+        text-align: center;
+    }
+
+    .tips-box {
+        padding: 12px 10px;
+        background: rgba(33, 153, 248, 0.1);
+        border-radius: 5px;
+        margin: 10px 0 12px 0;
+
+        .tips-text {
+            font-size: 16px;
+            line-height: 30px;
+            text-align: center;
+        }
+    }
+
+    .img-box {
+        width: 100%;
+        height: 210px;
+        position: relative;
+
+        img {
+            width: 100%;
+            height: 100%;
+        }
+
+        .img-text {
+            position: absolute;
+            top: 0;
+            left: 0;
+            background: rgba(0, 0, 0, 0.7);
+            color: #fff;
+            font-size: 12px;
+            padding: 4px 12px;
+            border-radius: 8px 0 8px 0;
+        }
+
+        .img-info {
+            position: absolute;
+            bottom: 15px;
+            left: 0;
+            color: #fff;
+            text-align: center;
+            width: 100%;
+            .img-time {
+                font-size: 36px;
+            }
+            .info-text {
+                font-size: 13px;
+                margin-top: 5px;
+                .address{
+                    margin-left: 12px;
+                }
+            }
+        }
+    }
+}
+</style>

+ 110 - 76
src/views/old_mini/growth_report/index.vue

@@ -2,90 +2,99 @@
     <div class="achievement-report-page">
         <custom-header name="报告详情"></custom-header>
         <div class="report-content-wrap" v-loading="loading">
-            <div class="report-content" ref="reportDom">
-                <!-- <img src="@/assets/img/home/qrcode.png" alt="" class="code-icon" /> -->
-                <img class="header-img" src="@/assets/img/home/report.png" alt="" />
-                <div class="report-header">
-                    <!-- <img class="header-book" src="@/assets/img/home/book.png" alt="" /> -->
-                    <div class="time-tag">{{ workItem?.reportDate }}</div>
-                    <div class="report-title">桂味长势报告</div>
-                    <div class="report-info">
-                        <div class="info-item">
-                            <img class="info-icon" src="@/assets/img/home/farm.png" alt="" />
-                            <span class="info-text">{{ workItem?.orchardName }}</span>
+            <swipe class="my-swipe" :loop="false" indicator-color="white">
+                <swipe-item v-for="(item, index) in 4" :key="index">
+
+                    <div class="report-content">
+                        <!-- <img src="@/assets/img/home/qrcode.png" alt="" class="code-icon" /> -->
+                        <img class="header-img" src="@/assets/img/home/report.png" alt="" />
+                        <div class="report-header">
+                            <!-- <img class="header-book" src="@/assets/img/home/book.png" alt="" /> -->
+                            <div class="time-tag">{{ workItem?.reportDate }}</div>
+                            <div class="report-title">桂味长势报告</div>
+                            <div class="report-info">
+                                <div class="info-item">
+                                    <img class="info-icon" src="@/assets/img/home/farm.png" alt="" />
+                                    <span class="info-text">{{ workItem?.orchardName }}</span>
+                                </div>
+                            </div>
+                            <!-- 左滑查看更多 -->
+                            <div class="swipe-more-tag">
+                                左滑查看更多
+                            </div>
                         </div>
-                    </div>
-                </div>
 
-                <!-- <div class="report-box">
-                    <div class="box-title">农情总结</div>
-                    <div class="box-text">
-                        {{ workItem?.summaryAgricultural || "--" }}
-                    </div>
-                </div> -->
-
-                <div class="report-box">
-                    <div class="box-title">物候与长势</div>
-                    <div class="box-text">
-                        <div class="box-bg">
-                            <span class="box-subtitle">背景描述:</span>
-                            <div v-html="workItem?.phenologyBackground"></div>
-                        </div>
-                        <div class="box-advice">
-                            <span class="box-subtitle">对策建议:</span>
-                            <div v-html="workItem?.phenologySuggestion"></div>
-                        </div>
-                        <div class="box-sum" v-html="workItem?.phenologySummary"></div>
-                    </div>
-                </div>
-
-                <!-- <div class="report-box">
-                    <div class="box-title">病虫害问题</div>
-                    <div class="box-text">
-                        <div class="box-bg">
-                            <span class="box-subtitle">背景描述:</span>
-                            <div v-html="workItem?.pestBackground"></div>
-                        </div>
-                        <div class="box-advice">
-                            <span class="box-subtitle">对策建议:</span>
-                            <div v-html="workItem?.pestSuggestion"></div>
-                        </div>
-                        <div class="box-sum">
-                            <div v-html="workItem?.pestSummary"></div>
+                        <!-- <div class="report-box">
+                            <div class="box-title">农情总结</div>
+                            <div class="box-text">
+                                {{ workItem?.summaryAgricultural || "--" }}
+                            </div>
+                        </div> -->
+
+                        <div class="report-box">
+                            <div class="box-title">物候与长势</div>
+                            <div class="box-text">
+                                <div class="box-bg">
+                                    <span class="box-subtitle">背景描述:</span>
+                                    <div v-html="workItem?.phenologyBackground"></div>
+                                </div>
+                                <div class="box-advice">
+                                    <span class="box-subtitle">对策建议:</span>
+                                    <div v-html="workItem?.phenologySuggestion"></div>
+                                </div>
+                                <div class="box-sum" v-html="workItem?.phenologySummary"></div>
+                            </div>
                         </div>
-                    </div>
-                </div>
-
-                <div class="report-box">
-                    <div class="box-title">未来预测</div>
-                    <div class="box-text">
-                        <div class="box-bg">
-                            <span class="box-subtitle">背景描述:</span>
-                            <div v-html="workItem?.forecastBackground"></div>
+
+                        <!-- <div class="report-box">
+                            <div class="box-title">病虫害问题</div>
+                            <div class="box-text">
+                                <div class="box-bg">
+                                    <span class="box-subtitle">背景描述:</span>
+                                    <div v-html="workItem?.pestBackground"></div>
+                                </div>
+                                <div class="box-advice">
+                                    <span class="box-subtitle">对策建议:</span>
+                                    <div v-html="workItem?.pestSuggestion"></div>
+                                </div>
+                                <div class="box-sum">
+                                    <div v-html="workItem?.pestSummary"></div>
+                                </div>
+                            </div>
                         </div>
-                        <div class="box-advice">
-                            <span class="box-subtitle">对策建议:</span>
-                            <div v-html="workItem?.forecastSuggestion"></div>
+
+                        <div class="report-box">
+                            <div class="box-title">未来预测</div>
+                            <div class="box-text">
+                                <div class="box-bg">
+                                    <span class="box-subtitle">背景描述:</span>
+                                    <div v-html="workItem?.forecastBackground"></div>
+                                </div>
+                                <div class="box-advice">
+                                    <span class="box-subtitle">对策建议:</span>
+                                    <div v-html="workItem?.forecastSuggestion"></div>
+                                </div>
+                            </div>
                         </div>
+
+                        <div class="report-box">
+                            <div class="box-text next-info">
+                                <div class="box-bg">
+                                    <span class="box-subtitle">下一次农情互动预告:</span>
+                                    <div v-html="workItem?.nextInteractionPreview"></div>
+                                </div>
+                            </div>
+                        </div> -->
                     </div>
-                </div>
 
-                <div class="report-box">
-                    <div class="box-text next-info">
-                        <div class="box-bg">
-                            <span class="box-subtitle">下一次农情互动预告:</span>
-                            <div v-html="workItem?.nextInteractionPreview"></div>
+                    <!-- 底部按钮 -->
+                    <div class="bottom-btn center-btn">
+                        <div class="btn-item warning" @click="showQrCodePopup">
+                            解锁详细报告
                         </div>
                     </div>
-                </div> -->
-            </div>
-
-            <!-- 底部按钮 -->
-            <div class="bottom-btn center-btn">
-                <div class="btn-item warning" @click="showQrCodePopup">
-                    解锁详细报告
-                </div>
-            </div>
+                </swipe-item>
+            </swipe>
         </div>
     </div>
 
@@ -103,6 +112,7 @@ import CustomHeader from "@/components/customHeader.vue";
 import { ref, onActivated, onDeactivated, onUnmounted } from "vue";
 import { useRoute } from "vue-router";
 import qrCodePopup from "@/components/popup/qrCodePopup.vue";
+import { Swipe, SwipeItem } from 'vant';
 
 const route = useRoute();
 const loading = ref(false);
@@ -190,10 +200,13 @@ onUnmounted(() => {
         overflow: auto;
         box-sizing: border-box;
         position: relative;
+        .my-swipe {
+            height: 100%;
+        }
 
         .bottom-btn {
             z-index: 2;
-            position: fixed;
+            position: absolute;
             bottom: 0;
             left: 0;
             width: 100%;
@@ -265,6 +278,27 @@ onUnmounted(() => {
         .report-header {
             position: relative;
 
+             // 左滑查看更多标签
+             .swipe-more-tag {
+                position: absolute;
+                top: 0;
+                right: -18px;
+                box-sizing: border-box;
+                width: 36px;
+                height: 116px;
+                padding: 10px 10px 2px 0;
+                background: rgba(0, 0, 0, 0.7);
+                border-radius: 16px 0 0 16px;
+                letter-spacing: 2px;
+                color: #ffffff;
+                font-size: 14px;
+                font-weight: 500;
+                text-align: center;
+                line-height: 20px;
+                writing-mode: vertical-rl;
+                text-orientation: mixed;
+            }
+
             .header-book {
                 position: absolute;
                 right: 0;

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

@@ -136,7 +136,7 @@ const handleAddClient = () => {
 };
 
 
-const isShowPl = ref(true);
+const isShowPl = ref(false);
 const value = ref('')
 const options = [
     {

+ 6 - 6
src/views/old_mini/interaction/index.vue

@@ -163,12 +163,12 @@ const handleConfirm = async () => {
     };
     console.log("params", params);
 
-    const { code, msg } = await VE_API.farm_v3.initFarmData(params);
-    if (code === 0) {
-        showTipPopup.value = true;
-    } else {
-        ElMessage.error(msg || "提交失败");
-    }
+    showTipPopup.value = true;
+    // const { code, msg } = await VE_API.farm_v3.initFarmData(params);
+    // if (code === 0) {
+    // } else {
+    //     ElMessage.error(msg || "提交失败");
+    // }
 
     // 大物候期转换所需参数// 组装为后端所需的 farmDataList 结构
     // const farmDataList = farmData.value

+ 10 - 0
src/views/old_mini/work_detail/components/executePopup.vue

@@ -14,6 +14,7 @@
             <div class="upload-wrap" :class="{ 'upload-cont': fileList.length }">
                 <div class="name">农事凭证</div>
                 <div class="sub-name">肥料使用照片或者执行照片</div>
+                <div class="tips-text">由于系统审核,您照片拍摄位置与农场相差超 3 公里,请在农场现场使用水印相机重新拍摄上传,谢谢配合</div>
                 <uploader class="uploader" v-model="fileList" multiple :max-count="5" :after-read="afterRead"
                     @click="handleClick('rg')">
                     <img class="img" v-show="!fileList.length" src="@/assets/img/home/example-4.png" alt="" />
@@ -180,6 +181,15 @@ defineExpose({
     padding-bottom: 12px;
 }
 
+.tips-text{
+    color: #FA7406;
+    padding: 5px 10px;
+    border: 1px solid #FA7406;
+    border-radius: 5px;
+    margin-bottom: 10px;
+    background: #fff;
+}
+
 .service-input {
     padding-top: 12px;
 }

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

@@ -142,6 +142,9 @@
             </div>
         </div>
         <ExecutePopup ref="executePopupRef" />
+
+        
+    <upload-tips v-model:show="showUploadTipsPopup" />
     </div>
 </template>
 
@@ -149,12 +152,14 @@
 import wx from "weixin-js-sdk";
 import customHeader from "@/components/customHeader.vue";
 import { ref, computed, onActivated } from "vue";
-import { useRoute, useRouter } from "vue-router";
+import { useRouter } from "vue-router";
 import { formatDate } from "@/common/commonFun";
 import ExecutePopup from "./components/executePopup.vue";
-import { base_img_url2, resize_300 } from "@/api/config";
+import { base_img_url2 } from "@/api/config";
+import UploadTips from "@/components/popup/uploadTips.vue";
+
+const showUploadTipsPopup = ref(true);
 
-const route = useRoute();
 const router = useRouter();
 // const info = JSON.parse(localStorage.getItem("localUserInfo") || "{}");
 const info = { appType: 1 };
@@ -401,10 +406,11 @@ const handleTagType = (tagType) => {
 }
 
 const handleExecute = () => {
-    wx.miniProgram.navigateTo({
-        url: `/pages/subPages/location_check/index?lng=113.264435&lat=23.129163`,
-    });
-    // executePopupRef.value.openPopup();
+
+    // wx.miniProgram.navigateTo({
+    //     url: `/pages/subPages/location_check/index?lng=113.264435&lat=23.129163`,
+    // });
+    executePopupRef.value.openPopup();
 };