Bladeren bron

feat:修改农事状态UI和新增农事功能

wangsisi 2 weken geleden
bovenliggende
commit
c5c7ed330a

+ 0 - 1
src/components/farmSteps.vue

@@ -29,7 +29,6 @@ const props = defineProps({
 const steps = ref([
     { label: "触发农事" },
     { label: "专家确认" },
-    { label: "服务报价" },
     { label: "农事执行" },
     { label: "农事复核" },
 ]);

+ 2 - 2
src/views/old_mini/agri_services/components/farmDynamics.vue

@@ -102,8 +102,8 @@ import { Popup } from "vant";
 
 const showApplyPopup = ref(false);
 
-const filterType = ref(["待执行", "已完成"]);
-const activePlanIndex = ref(1);
+const filterType = ref(["待完成", "已完成"]);
+const activePlanIndex = ref(0);
 
 const handlePlanClick = (index) => {
     activePlanIndex.value = index;

+ 2 - 2
src/views/old_mini/agri_work/servicesIndex.vue

@@ -3,7 +3,7 @@
         <custom-header name="农事详情"></custom-header>
         <div class="work-content" :class="{ hasBottom: curRole == 0 }">
             <div class="step-wrap">
-                <farm-steps :currentStep="1" />
+                <farm-steps :currentStep="0" />
             </div>
             <div class="content-status">
                 <div class="status-l" v-if="status === 0">
@@ -226,7 +226,7 @@ function toPage() {
         }
 
         .step-wrap {
-            padding: 16px 0;
+            padding: 18px 0;
         }
         .content-status {
             position: relative;

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

@@ -25,7 +25,7 @@
                             </div>
                         </div>
                     </div>
-                    <div class="top-r">编辑信息</div>
+                    <!-- <div class="top-r">编辑信息</div> -->
                 </div>
                 <div class="expert-list">
                     <div class="page-title">

+ 2 - 1
src/views/old_mini/home/subPages/expertList.vue

@@ -154,7 +154,8 @@ onMounted(() => {
 function toPage(containerId) {
     // userId=${id}&name=${name}
     if (isToSelect) {
-        router.replace(`/expert_homepage?containerId=${containerId}`)
+        router.push(`/expert_homepage?containerId=${containerId}`)
+        // router.replace(`/expert_homepage?containerId=${containerId}`)
     } else {
         router.push(`/chat_frame?userId=91754&name=咨询专家`)
     }

+ 61 - 19
src/views/old_mini/modify_work/completedWork.vue

@@ -2,7 +2,10 @@
     <div class="completed-work">
         <custom-header name="农事详情"></custom-header>
         <div class="work-content" :class="{'hasBottom': curRole == 0}">
-            <div class="content-status">
+            <div class="step-wrap">
+                <farm-steps :currentStep="currentStep" />
+            </div>
+            <div class="content-status" v-if="currentStep !== 0">
                 <div class="status-l" v-if="status === 0">
                     <div class="stauts-text">待执行</div>
                     <div class="stauts-sub-text">距离预计执行时间还差 <span class="time-text">3</span> 天</div>
@@ -44,7 +47,13 @@
                 </div>
 
                 <div class="box-wrap farm-data">
-                    <div class="card-title">秋梢防虫<span class="type-tag">标准农事</span></div>
+                    <div class="card-title">
+                        <div>秋梢防虫<span class="type-tag">标准农事</span></div>
+                        <div class="point-wrap">
+                            <div class="point"></div>
+                            <span>2区</span>
+                        </div>
+                    </div>
                     <div class="data-content">
                         <div class="form-item">
                             <div class="item-name">农事编号</div>
@@ -138,9 +147,10 @@
                     </div>
                 </div>
             </div>
-            <div class="fixed-btn-wrap">
-                <div class="fixed-btn orange" v-if="curRole == 0" @click="handleDemand">发起需求</div>
-                <div class="fixed-btn" v-if="curRole == 0" @click="handleOk">{{ status === 0 ? "我已完成" : "立即复核" }}</div>
+            <div class="fixed-btn-wrap" :class="{'center': currentStep == 0}" v-if="curRole === 0">
+                <div class="fixed-btn expert" v-if="currentStep == 0">提醒专家确认</div>
+                <div class="fixed-btn orange" v-if="currentStep == 1" @click="handleDemand">发起需求</div>
+                <div class="fixed-btn" v-if="currentStep == 1" @click="handleOk">{{ status === 0 ? "我已完成" : "立即复核" }}</div>
             </div>
         </div>
     </div>
@@ -155,13 +165,15 @@ import NewFarmMap from "./newFarmMap";
 import { useStore } from "vuex";
 import offerPopup from "@/components/popup/offerPopup.vue";
 import { useRouter } from "vue-router";
+import farmSteps from "@/components/farmSteps.vue";
 
 const router = useRouter();
 const store = useStore();
 
 // 角色
 // const curRole = store.state.app.curRole
-const curRole = 0
+const currentStep = ref(1);
+const curRole = 1
 
 // 0:执行, 1: 复核
 const status = ref(0);
@@ -361,25 +373,37 @@ const changeRegion = (e) => {
             top: -16px;
         }
         .fixed-btn-wrap{
-            position: absolute;
+            position: fixed;
             z-index: 10;
-            bottom: 26px;
-            left: 24px;
-            width: calc(100% - 48px);
+            bottom: 0;
+            left: 0;
+            width: 100%;
+            padding: 10px 12px 25px;
+            box-sizing: border-box;
             display: flex;
             align-items: center;
-            gap: 20px;
+            justify-content: space-between;
+            background: #fff;
+            &.center{
+                justify-content: center;
+            }
             .fixed-btn {
+                width: 120px;
                 text-align: center;
-                flex: 1;
-                height: 42px;
-                line-height: 42px;
+                height: 40px;
+                line-height: 40px;
                 background: linear-gradient(180deg, #70BFFE, #2199F8);
-                border-radius: 20px;
+                border-radius: 25px;
                 color: #fff;
-                font-size: 16px;
+                font-size: 14px;
+                box-sizing: border-box;
+                &.expert{
+                    width: 180px;
+                }
                 &.orange{
-                    background: #FF953D;
+                    color: #FF953D;
+                    border: 1px solid #FF953D;
+                    background: #fff;
                 }
             }
         }
@@ -389,12 +413,26 @@ const changeRegion = (e) => {
             color: #000;
             display: flex;
             align-items: center;
-
+            justify-content: space-between;
+            .point-wrap {
+                display: flex;
+                align-items: center;
+                color: #393939;
+                font-size: 12px;
+                font-weight: normal;
+                .point {
+                    width: 6px;
+                    height: 6px;
+                    border-radius: 50%;
+                    background: #393939;
+                    margin-right: 4px;
+                }
+            }
             .type-tag {
                 margin-left: 5px;
                 font-size: 12px;
                 color: #000000;
-                padding: 0 10px;
+                padding: 4px 10px;
                 background: rgba(119, 119, 119, 0.1);
                 border-radius: 20px;
                 font-weight: normal;
@@ -408,6 +446,10 @@ const changeRegion = (e) => {
             border-radius: 8px;
         }
 
+        .step-wrap {
+            padding: 18px 0;
+        }
+
         .content-status {
             position: relative;
             padding: 26px 12px 20px 12px;

+ 195 - 100
src/views/old_mini/modify_work/index.vue

@@ -80,43 +80,61 @@
                         </el-form-item>
                     </div>
                 </div>
-                <div class="farm-card" v-else>
-                    <div class="card-title">基本信息</div>
-                    <div class="info-content">
-                            <el-form-item label-width="82px" class="form-item" prop="name" label="农事名称">
-                                <el-select v-model="dynamicValidateForm.name" placeholder="请选择农事名称" style="width: 100%">
-                                    <el-option v-for="(item, index) in farmWorkNameList" :key="index" :value="item" :label="item" />
-                                </el-select>
-                            </el-form-item>
-                            <el-form-item label-width="82px" class="form-item" prop="name" label="农事目的">
-                                <el-input
-                                    v-model="dynamicValidateForm.purpose"
-                                    style="width: 100%"
-                                    :rows="2"
-                                    type="textarea"
-                                    placeholder="请输入农事目的"
-                                />
-                            </el-form-item>
-                            <el-form-item label-width="82px" class="form-item" prop="conditionRate" label="触发条件">
-                                <div class="condition-wrap">
-                                    <el-select v-model="dynamicValidateForm.condition" placeholder="请选择触发条件" style="width: 58%">
-                                        <el-option v-for="(item, index) in farmWorkIndexNameList" :key="index" :value="item" :label="item" />
-                                    </el-select>
-                                    <span class="symbol"></span>
-                                    <el-select v-model="dynamicValidateForm.conditionRate" placeholder="请选择" style="width: 38%">
-                                        <el-option :value="0" label="0%" />
-                                        <el-option :value="5" label="5%" />
-                                        <el-option :value="10" label="10%" />
-                                        <el-option :value="20" label="20%" />
-                                        <el-option :value="40" label="40%" />
-                                        <el-option :value="60" label="60%" />
-                                        <el-option :value="80" label="80%" />
+                <template v-else>
+                    <div class="farm-card progress">
+                        <span class="progress-title">农事进度</span>
+                        <el-radio-group v-model="farmProgress">
+                            <el-radio :value="0">已做</el-radio>
+                            <el-radio :value="1">未做</el-radio>
+                        </el-radio-group>
+                    </div>
+                    <div class="farm-card" v-if="farmProgress === 0">
+                        <div class="card-title">基本信息</div>
+                        <div class="info-content">
+                                <el-form-item label-width="82px" class="form-item" prop="name" label="农事名称">
+                                    <el-select v-model="dynamicValidateForm.name" placeholder="请选择农事名称" style="width: 100%">
+                                        <el-option v-for="(item, index) in farmWorkNameList" :key="index" :value="item" :label="item" />
                                     </el-select>
-                                </div>
-                            </el-form-item>
+                                </el-form-item>
+                                <el-form-item label-width="82px" class="form-item" prop="name" label="农事目的">
+                                    <el-input
+                                        v-model="dynamicValidateForm.purpose"
+                                        style="width: 100%"
+                                        :rows="2"
+                                        type="textarea"
+                                        placeholder="请输入农事目的"
+                                    />
+                                </el-form-item>
+                                <el-form-item label-width="82px" class="form-item" prop="conditionRate" label="执行时间">
+                                    <el-date-picker
+                                        v-model="dynamicValidateForm.checkDay"
+                                        value-format="YYYY-MM-DD"
+                                        type="date"
+                                        placeholder="请选择执行时间"
+                                        style="width: 100%"
+                                    />
+                                </el-form-item>
+                                <!-- <el-form-item label-width="82px" class="form-item" prop="conditionRate" label="触发条件">
+                                    <div class="condition-wrap">
+                                        <el-select v-model="dynamicValidateForm.condition" placeholder="请选择触发条件" style="width: 58%">
+                                            <el-option v-for="(item, index) in farmWorkIndexNameList" :key="index" :value="item" :label="item" />
+                                        </el-select>
+                                        <span class="symbol"></span>
+                                        <el-select v-model="dynamicValidateForm.conditionRate" placeholder="请选择" style="width: 38%">
+                                            <el-option :value="0" label="0%" />
+                                            <el-option :value="5" label="5%" />
+                                            <el-option :value="10" label="10%" />
+                                            <el-option :value="20" label="20%" />
+                                            <el-option :value="40" label="40%" />
+                                            <el-option :value="60" label="60%" />
+                                            <el-option :value="80" label="80%" />
+                                        </el-select>
+                                    </div>
+                                </el-form-item> -->
+                        </div>
                     </div>
-                </div>
-                <div class="farm-card prescription-content">
+                </template>
+                <div class="farm-card prescription-content" v-if="farmProgress === 0">
                     <div class="card-title pb-12">药物处方</div>
                     <el-form-item label-width="82px" class="form-item" prop="usageMode" label="施用方式">
                         <el-select v-model="dynamicValidateForm.usageMode" placeholder="请选择施用方式" style="width: 100%">
@@ -227,7 +245,7 @@
                                                 </div>
                                             </div>
                                             <div v-if="dynamicValidateForm.usageMode === '叶面施'">
-                                                <div class="form-title">无人机方式</div>
+                                                <div class="form-title">无人机</div>
                                                 <div class="box-item sub-item">
                                                     <div class="form-l has-sub">
                                                         <div class="main-name">肥药配比</div>
@@ -270,7 +288,7 @@
                                                     删除
                                                 </el-button>
                                                 <el-button
-                                                    type="primary"
+                                                    type="default"
                                                     class="btn"
                                                     @click.prevent="resetItemForm(prescriptionI, index)"
                                                 >
@@ -284,7 +302,29 @@
                         </el-form-item>
                     </div>
                 </div>
-                <div class="farm-card map-content" v-if="!(curRole==1 && isAdd)">
+                <div class="farm-card progress" v-else>
+                    <div class="situation-description">
+                        <div class="description-title">状况描述</div>
+                        <div class="description-content">
+                            <el-input
+                                v-model="situationDescription"
+                                type="textarea"
+                                :rows="3"
+                                placeholder="请输入目前农场状况"
+                                class="description-textarea"
+                            />
+                            <div class="upload-section">
+                                <el-button class="upload-btn" @click="handleUploadImage">
+                                    <el-icon><Upload /></el-icon>
+                                    上传图片
+                                </el-button>
+                                <div class="upload-tip">上传图片,专家诊断更清晰</div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="farm-card map-content" v-if="false">
+                <!-- <div class="farm-card map-content" v-if="!(curRole==1 && isAdd)"> -->
                     <div class="card-title">执行农事区域</div>
                     <div class="info-content">
                         <div class="area-select">
@@ -322,9 +362,12 @@
                     <div class="btn second">驳回</div>
                     <div class="btn" @click.prevent="submitForm(formRef)">立即下发</div>
                 </div>
-                <div class="submit-btn" v-else>
+                <div class="submit-btn" v-if="isAdd && farmProgress === 0">
                     <div class="btn second">取消</div>
-                    <div class="btn" @click.prevent="submitForm(formRef)">新增</div>
+                    <div class="btn" @click.prevent="submitForm(formRef)">确定新增</div>
+                </div>
+                <div v-if="isAdd && farmProgress === 1">
+                    <div class="expert-diagnosis-btn" @click="handleExpertDiagnosis">邀请专家诊断</div>
                 </div>
             </el-form>
         </div>
@@ -377,19 +420,19 @@ onMounted(() => {
     }));
     if (!(curRole==1 && isAdd.value)) {
         const point = store.state.home.miniUserLocationPoint;
-        newFarmMap.initMap(point, areaRef.value);
+        // newFarmMap.initMap(point, areaRef.value);
         // eventBus.on("editNsMap:areaVal", getArea);
         gardenId.value = route.query.gardenId;
-        getAreaList(() => {
-            newFarmMap.initArea(areaList.value);
-        });
+        // getAreaList(() => {
+        //     newFarmMap.initArea(areaList.value);
+        // });
     }
 
     getWarningMsg();
 });
 
 onDeactivated(() => {
-    areaRef.value && newFarmMap.destroyMap();
+    // areaRef.value && newFarmMap.destroyMap();
     resetForm(formRef.value);
 });
 
@@ -836,6 +879,11 @@ const getAreaList = (callback) => {
     // });
 };
 
+const farmProgress = ref(0)
+
+// 状况描述相关数据
+const situationDescription = ref('')
+
 // 切换分区
 const changeRegion = (e) => {
     checkedArea.value = false;
@@ -854,6 +902,18 @@ const checkedArea = ref(false);
 const handleArea = (e) => {
     newFarmMap.toggleAllArea(e);
 };
+
+// 处理上传图片
+const handleUploadImage = () => {
+    // 这里可以添加上传图片的逻辑
+    console.log('上传图片');
+};
+
+// 处理邀请专家诊断
+const handleExpertDiagnosis = () => {
+    // 这里可以添加邀请专家诊断的逻辑
+    console.log('邀请专家诊断');
+};
 </script>
 
 <style lang="scss" scoped>
@@ -862,6 +922,7 @@ const handleArea = (e) => {
     position: relative;
     overflow: auto;
     font-size: 14px;
+    background: #f2f3f5;
     ::v-deep {
         .custom-header {
             position: fixed;
@@ -877,7 +938,6 @@ const handleArea = (e) => {
     .new-farming-content {
         margin: 41px 0 62px 0;
         padding: 4px 12px 8px 12px;
-        background: #f2f3f5;
         width: 100%;
         box-sizing: border-box;
         .farm-info {
@@ -927,22 +987,25 @@ const handleArea = (e) => {
             width: 100%;
             display: flex;
             align-items: center;
+            justify-content: space-between;
             padding: 12px;
-            background: #F2F3F5;
+            background: #fff;
             box-sizing: border-box;
             box-shadow: 0 4px 4px rgba(0, 0, 0, 0.4);
+            border-top: 1px solid rgba(0, 0, 0, 0.1);
             .btn {
                 height: 40px;
-                border-radius: 20px;
+                border-radius: 25px;
                 line-height: 40px;
-                flex: 1;
+                width: 110px;
                 text-align: center;
-                background: #2199F8;
+                background: linear-gradient(180deg, #70BFFE, #2199F8);
                 color: #FFFFFF;
-                font-size: 16px;
+                font-size: 14px;
                 &.second {
                     background: #FFFFFF;
-                    color: #737373;
+                    border: 1px solid rgba(0, 0, 0, 0.2);
+                    color: rgba(0, 0, 0, 0.2);
                 }
             }
             .btn + .btn {
@@ -990,6 +1053,19 @@ const handleArea = (e) => {
         box-sizing: border-box;
         margin-top: 10px;
         color: rgba(0, 0, 0, 0.4);
+        &.progress{
+            display: flex;
+            align-items: center;
+            padding: 12px;
+            .progress-title{
+                margin-right: 12px;
+            }
+            ::v-deep{
+                .el-radio{
+                    margin-right: 10px;
+                }
+            }
+        }
         &.map-content {
             margin-top: 12px;
         }
@@ -1012,33 +1088,11 @@ const handleArea = (e) => {
     }
 
     ::v-deep {
-        .el-input__wrapper {
-            box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-        }
-        .el-input__inner {
-            color: #2199f8;
-        }
-        .el-input__prefix {
-            color: #2199f8;
-        }
-        .el-select__caret {
-            color: #2199f8;
-        }
         .el-form-item__label {
             height: 30px;
             line-height: 30px;
             color: rgba(0, 0, 0, 0.4);
         }
-        .el-textarea__inner {
-            color: #2199f8;
-            box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-        }
-        .el-textarea {
-            --el-input-placeholder-color: #2199f8;
-        }
-        .el-input {
-            --el-input-placeholder-color: #2199f8;
-        }
         .el-form-item.is-required:not(.is-no-asterisk).asterisk-left>.el-form-item__label:before {
             display: none;
         }
@@ -1104,17 +1158,6 @@ const handleArea = (e) => {
     }
 
     ::v-deep {
-        .el-select__wrapper {
-            box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-            .el-select__placeholder {
-                color: #2199f8;
-                text-align: center;
-            }
-            .el-select__input {
-                color: #2199f8;
-            }
-        }
-        
         .el-form-item--default {
             margin-bottom: 8px;
             &.text-item {
@@ -1198,15 +1241,6 @@ const handleArea = (e) => {
                 &.mark-box {
                     padding: 8px 0 12px 0;
                 }
-
-                ::v-deep {
-                    .el-input__wrapper {
-                        box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-                    }
-                    .el-input__inner {
-                        color: #2199f8;
-                    }
-                }
             }
             .text-center {
                 ::v-deep {
@@ -1216,14 +1250,17 @@ const handleArea = (e) => {
                 }
             }
             .action-btn {
+                display: flex;
+                justify-content: flex-end;
                 .btn {
-                    flex: 1;
-                    width: calc(50% - 6px);
+                    color: #8F8F8F;
+                    border-radius: 25px;
+                    padding: 5px 30px;
                 }
                 .delete-btn {
-                    color: #ff943d;
-                    background: rgba(255, 148, 61, 0.1);
-                    border: 1px solid #ff943d;
+                    color: rgba(255, 89, 89, 0.9);
+                    background: #fff;
+                    border: 1px solid rgba(255, 89, 89, 0.9);
                 }
             }
             .btn-group {
@@ -1270,9 +1307,10 @@ const handleArea = (e) => {
                 }
             }
             .form-title {
-                color: #008eff;
                 font-size: 14px;
                 padding-top: 6px;
+                color: #000;
+                font-weight: 600;
             }
             .box-item + .box-item {
                 margin-top: 8px;
@@ -1285,5 +1323,62 @@ const handleArea = (e) => {
             padding-top: 8px;
         }
     }
+    
+    // 状况描述样式
+    .situation-description {
+        width: 100%;
+        .description-title {
+            font-size: 16px;
+            font-weight: bold;
+            color: #000;
+            margin-bottom: 12px;
+        }
+        
+        .description-content {
+            .description-textarea {
+                margin-bottom: 10px;
+                width: 100%;
+            }
+            
+            .upload-section {
+                .upload-btn {
+                    width: 112px;
+                    height: 32px;
+                    border-radius: 3px;
+                    border: 1px solid #e0e0e0;
+                    background: #fff;
+                    color: #000;
+                    font-size: 14px;
+                    display: flex;
+                    align-items: center;
+                    justify-content: center;
+                    margin-bottom: 8px;
+                    
+                    .el-icon {
+                        margin-right: 6px;
+                    }
+                }
+                
+                .upload-tip {
+                    font-size: 12px;
+                    color: #999;
+                    line-height: 1.4;
+                }
+            }
+        }
+    }
+    
+    // 专家诊断按钮样式
+    .expert-diagnosis-btn {
+        width: 180px;
+        height: 40px;
+        border-radius: 24px;
+        background: linear-gradient(180deg, #70BFFE 0%, #2199F8 100%);
+        color: #FFFFFF;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        margin: 30px auto 0;
+    }
 }
 </style>

+ 9 - 65
src/views/old_mini/modify_work/reviewWork.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="work-wrap">
-        <custom-header name="农事成效" bgColor="#f2f3f5"></custom-header>
+        <custom-header name="农事成效"></custom-header>
         <div class="work-content recheck-title">
             <div class="tabs-content-item">
                 <div class="common-card-title">
@@ -76,57 +76,8 @@
                     </div>
                 </div>
             </div>
-            <!-- 农事成效 -->
-            <div class="tabs-content-item">
-                <div class="common-card-title">
-                    <img class="icon" src="@/assets/img/home/label-icon.png" alt="" />
-                    <span>复核成效</span>
-                </div>
-                <div class="info-box bottom-box">
-                    <div class="result-box">
-                        <div class="result-text">
-                            通过精准农业技术的应用,作物产量实现了两位数的增长,病虫害的发生率大幅下降,土壤肥力的提升
-                        </div>
-                    </div>
-                    <div class="recheck-box">
-                        <div class="recheck-ablum">
-                            <div>农事前</div>
-                            <img class="img-box" src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png" alt="">
-                            <div>农事后</div>
-                            <img class="img-box" src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png" alt="">
-                            <!-- <div class="img-list over-img-box">
-                                <album-carousel7d
-                                    :key="1"
-                                    :farmId="workItem.farmId"
-                                    :farmWork="{
-                                        beforeExecuteDate: workItem.beforeExecuteDate,
-                                        executeDate: workItem.executeDate,
-                                    }"
-                                ></album-carousel7d>
-                            </div> -->
-                            <!-- <div class="img-list over-img-box" v-if="workItem.reviewImage.length">
-                                <album-carousel
-                                    :key="2"
-                                    :farmId="workItem.farmId"
-                                    :lock="false"
-                                    :images="handleConversion(workItem.reviewImage)"
-                                ></album-carousel>
-                            </div>
-                            <div class="img-list over-img-box" v-if="workItem.reviewImage2.length">
-                                <album-carousel
-                                    :key="2"
-                                    :farmId="workItem.farmId"
-                                    :lock="false"
-                                    :images="handleConversion(workItem.reviewImage2)"
-                                ></album-carousel>
-                            </div> -->
-                        </div>
-                    </div>
-                </div>
-            </div>
 
-            <!-- 农事成效 -->
-            <!-- <div class="tabs-content-item">
+            <div class="tabs-content-item">
                 <div class="common-card-title">
                     <img class="icon" src="@/assets/img/home/label-icon.png" alt="" />
                     <span>复核成效</span>
@@ -138,7 +89,7 @@
                         </div>
                     </div>
                     <div class="recheck-box" v-if="workItem?.farmId">
-                        <div class="recheck-ablum"> -->
+                        <div class="recheck-ablum">
                             <!-- <div class="img-list over-img-box">
                                 <album-carousel7d
                                     :key="1"
@@ -149,7 +100,7 @@
                                     }"
                                 ></album-carousel7d>
                             </div> -->
-                            <!-- <div class="img-list" v-if="!workItem.reviewImage.length && workItem.activeStatus === 0">
+                            <div class="img-list" v-if="!workItem.reviewImage.length && workItem.activeStatus === 0">
                                 <div
                                     class="recheck-text-wrap no-events"
                                     :class="{
@@ -294,10 +245,10 @@
                         </div>
                     </div>
                 </div>
-            </div> -->
+            </div>
 
             <!-- 按钮 -->
-            <!-- <div class="up-btn-group" v-show="isPlan">
+            <div class="up-btn-group" v-show="isPlan">
                 <template v-if="curRole === '2'">
                     <div
                         class="up-btn"
@@ -324,10 +275,10 @@
                         联系专家
                     </div>
                 </template>
-            </div> -->
+            </div>
         </div>
         <!-- 上传图片弹窗 -->
-        <!-- <upload-popup :executionData="workItem"></upload-popup> -->
+        <upload-popup :executionData="workItem"></upload-popup>
     </div>
 </template>
 
@@ -381,7 +332,7 @@ const workItem = ref({
     uniqueId: 1,
     isPlan: false,
     curRole: "",
-    farmId: 90264,
+    farmId: 766,
     libId: 1,
     uniqueId: null,
 });
@@ -724,13 +675,6 @@ function toUpload() {
             .recheck-box,
             .recheck-ablum {
                 width: 100%;
-                .img-box{
-                    width: 100%;
-                    height: 255px;
-                    object-fit: cover;
-                    border-radius: 8px;
-                    margin: 12px 0;
-                }
             }
             .evaluate {
                 background: #fff;

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

@@ -20,12 +20,12 @@
                         :key="rowIndex"
                         class="cycle-row"
                         :class="{ 'odd-index': rowIndex % 2 === 1 }"
-                        @click="handleRowClick(rowIndex)"
                     >
                         <div
                             v-for="(item, itemIndex) in row.items"
                             :key="itemIndex"
                             class="cycle-item"
+                            @click="handleRowClick(item)"
                             :class="[item.type + '-item', item.status]"
                         >
                             <!-- 任务框 -->
@@ -66,19 +66,21 @@
             </div>
         </div>
     </div>
+    <!-- 农事信息弹窗 -->
+    <detail-dialog ref="detailDialogRef"></detail-dialog>
 </template>
 
 <script setup>
 import { reactive, ref } from "vue";
 import customHeader from "@/components/customHeader.vue";
 import { useRouter } from "vue-router";
-
+import detailDialog from "@/components/detailDialog.vue";
 const router = useRouter();
 
 // 状态列表数据
 const statusList = reactive([
     { value: "pending", label: "待触发", color: "gray" },
-    { value: "executing", label: "待执行", color: "blue" },
+    { value: "executing", label: "待完成", color: "blue" },
     { value: "completed", label: "已完成", color: "green" },
     { value: "expired", label: "已过期", color: "orange" },
 ]);
@@ -178,18 +180,33 @@ const toggleDefault = () => {
 // 新增农事
 const addNewTask = () => {
     console.log("新增农事");
-    // 这里可以添加新增农事的逻辑
-};
-
-const handleRowClick = (rowIndex) => {
-    console.log(rowIndex);
     router.push({
-        path: "/services_agri",
-        // query: {
-        //     rowIndex: rowIndex,
-        // },
+        path: "/modify_work",
+        query: { data: JSON.stringify(['生长异常']), gardenId: 766, isAdd: true },
     });
 };
+
+const detailDialogRef = ref(null);
+
+const handleRowClick = (item) => {
+    if(item.status === "complete"){
+        router.push({
+            path: "/review_work",
+            query: {
+                id: item.id,
+            },
+        });
+    }else if(item.status === "normal"){//services_agri
+        router.push({
+            path: "/completed_work",
+            query: {
+                id: item.id,
+            },
+        });
+    }else if(item.status === "default"){
+        detailDialogRef.value.showDialog();
+    }
+};
 </script>
 
 <style scoped lang="scss">