Преглед на файлове

delete:删除没用到的文件

wangsisi преди 5 дни
родител
ревизия
2c26268ec7
променени са 34 файла, в които са добавени 0 реда и са изтрити 17060 реда
  1. 0 391
      src/components/pageComponents/ServiceInfo.vue
  2. 0 65
      src/components/pageComponents/StatsBox.vue
  3. 0 97
      src/router/globalRoutes.js
  4. 0 492
      src/views/old_mini/agri_services/components/farmDynamics.vue
  5. 0 618
      src/views/old_mini/agri_services/components/servicesHall.vue
  6. 0 75
      src/views/old_mini/agri_services/index.vue
  7. 0 159
      src/views/old_mini/agri_services/map/index.js
  8. 0 80
      src/views/old_mini/agri_work/components/infoText.vue
  9. 0 213
      src/views/old_mini/agri_work/components/prescriptionTable.vue
  10. 0 237
      src/views/old_mini/agri_work/components/priceTable.vue
  11. 0 13
      src/views/old_mini/agri_work/expertIndex.vue
  12. 0 13
      src/views/old_mini/agri_work/farmerIndex.vue
  13. 0 439
      src/views/old_mini/agri_work/newFarmMap.js
  14. 0 514
      src/views/old_mini/agri_work/servicesIndex.vue
  15. 0 531
      src/views/old_mini/farm_manage/components/demandHall.vue
  16. 0 212
      src/views/old_mini/farm_manage/components/farmManage.vue
  17. 0 134
      src/views/old_mini/farm_manage/components/systemReminder.vue
  18. 0 47
      src/views/old_mini/farm_manage/index.vue
  19. 0 244
      src/views/old_mini/farm_manage/map/index.js
  20. 0 1891
      src/views/old_mini/modify_work/addWork.vue
  21. 0 1193
      src/views/old_mini/modify_work/completedWork.vue
  22. 0 1078
      src/views/old_mini/modify_work/detailWork.vue
  23. 0 1553
      src/views/old_mini/modify_work/index.vue
  24. 0 2476
      src/views/old_mini/modify_work/modify.vue
  25. 0 416
      src/views/old_mini/modify_work/newFarmMap.js
  26. 0 1072
      src/views/old_mini/modify_work/reviewWork.vue
  27. 0 178
      src/views/old_mini/modify_work/sharePage.vue
  28. 0 743
      src/views/old_mini/offer_price/component/editPrice.vue
  29. 0 379
      src/views/old_mini/offer_price/component/fertilizerPrice.vue
  30. 0 252
      src/views/old_mini/offer_price/component/servicePrice.vue
  31. 0 60
      src/views/old_mini/offer_price/index.vue
  32. 0 567
      src/views/old_mini/price_detail/index.vue
  33. 0 388
      src/views/old_mini/report_detail/index.vue
  34. 0 240
      src/views/old_mini/service_manage/index.vue

+ 0 - 391
src/components/pageComponents/ServiceInfo.vue

@@ -1,391 +0,0 @@
-<template>
-    <div class="service-info">
-        <div class="main-content">
-            <div class="service-title">
-                <img class="label-icon" src="@/assets/img/home/label-icon.png" alt="">
-                服务信息
-            </div>
-            <div class="service-content">
-                <div class="service-item">
-                    <div class="sub-title">服务作物</div>
-                    <div class="tag-group" v-if="!isEdit">
-                        <div class="tag-item" :class="{ selected: item.selected && isEdit }" @click="handleSelect('crops', idx, $event)" v-for="(item, idx) in crops" :key="'c-'+idx">{{ item.name }}</div>
-                    </div>
-                    <div class="tag-group add-tag-group" v-else>
-                        <div class="tag-item" :class="{ self: item.isSelf === 1, selected: item.selected && isEdit }" @click="handleSelect('crops', idx, $event)" v-for="(item, idx) in crops" :key="'ce-'+idx">
-                            <span class="text">{{ item.name }}<el-icon @click.stop="handleEdit(item.name, 'crops')" v-if="item.isSelf===1" class="edit-icon"><Edit /></el-icon></span>
-                            <el-icon v-if="item.isSelf===1" class="del-icon" @click.stop="handleDelete('crops', idx)"><Close /></el-icon>
-                        </div>
-                        <div class="tag-item last-add" @click="handleAdd('作物')"><el-icon class="add-icon"><Plus /></el-icon>作物</div>
-                    </div>
-                </div>
-                <div class="service-item">
-                    <div class="sub-title">服务类型</div>
-                    <div class="tag-group" v-if="!isEdit">
-                        <div class="tag-item" :class="{ selected: item.selected && isEdit }" @click="handleSelect('serviceTypes', idx, $event)" v-for="(item, idx) in serviceTypes" :key="'t-'+idx">{{ item.name }}</div>
-                    </div>
-                    <div class="tag-group add-tag-group" v-else>
-                        <div class="tag-item" :class="{ self: item.isSelf === 1, selected: item.selected && isEdit }" @click="handleSelect('serviceTypes', idx, $event)" v-for="(item, idx) in serviceTypes" :key="'te-'+idx">
-                            <span class="text">{{ item.name }}<el-icon @click.stop="handleEdit(item.name, 'serviceTypes')" v-if="item.isSelf===1" class="edit-icon"><Edit /></el-icon></span>
-                            <el-icon v-if="item.isSelf===1" class="del-icon" @click.stop="handleDelete('serviceTypes', idx)"><Close /></el-icon>
-                        </div>
-                        <div class="tag-item last-add" @click="handleAdd('类型')"><el-icon class="add-icon"><Plus /></el-icon>类型</div>
-                    </div>
-                </div>
-                <div class="service-item">
-                    <div class="sub-title">农机设备</div>
-                    <div class="tag-group" v-if="!isEdit">
-                        <div class="tag-item" :class="{ selected: item.selected && isEdit }" @click="handleSelect('machines', idx, $event)" v-for="(item, idx) in machines" :key="'m-'+idx">{{ item.name }}</div>
-                    </div>
-                    <div class="tag-group add-tag-group" v-else>
-                        <div class="tag-item" :class="{ self: item.isSelf === 1, selected: item.selected && isEdit }" @click="handleSelect('machines', idx, $event)" v-for="(item, idx) in machines" :key="'me-'+idx">
-                            <span class="text">{{ item.name }}<el-icon @click.stop="handleEdit(item.name, 'machines')" v-if="item.isSelf===1" class="edit-icon"><Edit /></el-icon></span>
-                            <el-icon v-if="item.isSelf===1" class="del-icon" @click.stop="handleDelete('machines', idx)"><Close /></el-icon>
-                        </div>
-                        <div class="tag-item last-add" @click="handleAdd('设备')"><el-icon class="add-icon"><Plus /></el-icon>设备</div>
-                    </div>
-                </div>
-            </div>
-        </div>
-
-        <popup class="add-tag-popup" round v-model:show="showAddPopup">
-            <div class="popup-title" v-if="isEditPopup">编辑标签</div>
-            <div class="popup-title" v-else>添加{{addTypeName}}<span class="ml-2">标签</span></div>
-            <el-input class="popup-input" v-model="input" placeholder="标签" size="large" />
-            <div class="popup-button">
-                <div class="cancel" @click="showAddPopup = false">取消</div>
-                <div @click="handleConfirm">{{isEditPopup ? '确定' : '添加'}}</div>
-            </div>
-        </popup>
-    </div>
-</template>
-
-<script setup>
-import { ref } from "vue";
-import { Popup } from "vant";
-import { Edit, Close, Plus } from '@element-plus/icons-vue'
-
-const props = defineProps({
-    crops: {
-        type: Array,
-        default: () => []
-    },
-    serviceTypes: {
-        type: Array,
-        default: () => []
-    },
-    machines: {
-        type: Array,
-        default: () => []
-    },
-    isEdit: {
-        type: Boolean,
-        default: false
-    }
-});
-
-const emit = defineEmits(['update:crops', 'update:serviceTypes', 'update:machines', 'update:isEdit']);
-
-const showAddPopup = ref(false);
-const input = ref("");
-const addTypeName = ref("");
-const isEditPopup = ref(false);
-const currentCategory = ref('');
-const currentEditIndex = ref(-1);
-const currentEditName = ref('');
-
-function handleAdd(type) {
-    isEditPopup.value = false;
-    addTypeName.value = type;
-    input.value = "";
-    showAddPopup.value = true;
-    // 根据类型设置当前分类
-    if (type === '作物') {
-        currentCategory.value = 'crops';
-    } else if (type === '类型') {
-        currentCategory.value = 'serviceTypes';
-    } else if (type === '设备') {
-        currentCategory.value = 'machines';
-    }
-    currentEditIndex.value = -1;
-}
-
-function handleDelete(category, index) {
-    if (category === 'crops') {
-        const newCrops = [...props.crops];
-        newCrops.splice(index, 1);
-        emit('update:crops', newCrops);
-    }
-    if (category === 'serviceTypes') {
-        const newServiceTypes = [...props.serviceTypes];
-        newServiceTypes.splice(index, 1);
-        emit('update:serviceTypes', newServiceTypes);
-    }
-    if (category === 'machines') {
-        const newMachines = [...props.machines];
-        newMachines.splice(index, 1);
-        emit('update:machines', newMachines);
-    }
-}
-
-function handleEdit(val, category) {
-    isEditPopup.value = true;
-    input.value = val;
-    showAddPopup.value = true;
-    currentCategory.value = category;
-    currentEditName.value = val;
-    // 找到对应的索引
-    let targetArray = [];
-    if (category === 'crops') {
-        targetArray = props.crops;
-    } else if (category === 'serviceTypes') {
-        targetArray = props.serviceTypes;
-    } else if (category === 'machines') {
-        targetArray = props.machines;
-    }
-    currentEditIndex.value = targetArray.findIndex(item => item.name === val && item.isSelf === 1);
-}
-
-function handleSelect(category, index, event) {
-    // 如果点击的是编辑图标或删除图标,不触发选中
-    if (event && event.target) {
-        const target = event.target;
-        if (target.closest && (target.closest('.edit-icon') || target.closest('.del-icon'))) {
-            return;
-        }
-    }
-    
-    if (category === 'crops') {
-        const newCrops = [...props.crops];
-        if (newCrops[index]) {
-            if (newCrops[index].selected === undefined) {
-                newCrops[index].selected = false;
-            }
-            newCrops[index].selected = !newCrops[index].selected;
-            emit('update:crops', newCrops);
-        }
-    } else if (category === 'serviceTypes') {
-        const newServiceTypes = [...props.serviceTypes];
-        if (newServiceTypes[index]) {
-            if (newServiceTypes[index].selected === undefined) {
-                newServiceTypes[index].selected = false;
-            }
-            newServiceTypes[index].selected = !newServiceTypes[index].selected;
-            emit('update:serviceTypes', newServiceTypes);
-        }
-    } else if (category === 'machines') {
-        const newMachines = [...props.machines];
-        if (newMachines[index]) {
-            if (newMachines[index].selected === undefined) {
-                newMachines[index].selected = false;
-            }
-            newMachines[index].selected = !newMachines[index].selected;
-            emit('update:machines', newMachines);
-        }
-    }
-}
-
-function handleConfirm() {
-    if (!input.value.trim()) {
-        return;
-    }
-    
-    if (isEditPopup.value && currentEditIndex.value >= 0) {
-        // 编辑模式
-        if (currentCategory.value === 'crops') {
-            const newCrops = [...props.crops];
-            newCrops[currentEditIndex.value].name = input.value.trim();
-            emit('update:crops', newCrops);
-        } else if (currentCategory.value === 'serviceTypes') {
-            const newServiceTypes = [...props.serviceTypes];
-            newServiceTypes[currentEditIndex.value].name = input.value.trim();
-            emit('update:serviceTypes', newServiceTypes);
-        } else if (currentCategory.value === 'machines') {
-            const newMachines = [...props.machines];
-            newMachines[currentEditIndex.value].name = input.value.trim();
-            emit('update:machines', newMachines);
-        }
-    } else {
-        // 添加模式
-        const newItem = { name: input.value.trim(), isSelf: 1, selected: false };
-        if (currentCategory.value === 'crops') {
-            const newCrops = [...props.crops, newItem];
-            emit('update:crops', newCrops);
-        } else if (currentCategory.value === 'serviceTypes') {
-            const newServiceTypes = [...props.serviceTypes, newItem];
-            emit('update:serviceTypes', newServiceTypes);
-        } else if (currentCategory.value === 'machines') {
-            const newMachines = [...props.machines, newItem];
-            emit('update:machines', newMachines);
-        }
-    }
-    
-    showAddPopup.value = false;
-    input.value = "";
-    currentEditIndex.value = -1;
-    currentEditName.value = '';
-}
-
-function getServiceInfo() {
-    // 获取所有选中的项或自己新加的项的名称
-    const selectedCrops = props.crops.filter(item => item.selected || item.isSelf === 1).map(item => item.name);
-    const selectedServiceTypes = props.serviceTypes.filter(item => item.selected || item.isSelf === 1).map(item => item.name);
-    const selectedMachines = props.machines.filter(item => item.selected || item.isSelf === 1).map(item => item.name);
-    
-    // 返回所有选中项和自己新加的项
-    return {serviceCropsJson: selectedCrops, serviceTypeJson: selectedServiceTypes, agriculturalEquipmentJson: selectedMachines}
-}
-
-defineExpose({
-    getServiceInfo
-});
-</script>
-
-<style lang="scss" scoped>
-.service-info {
-    .main-content {
-        max-height: calc(100% - 40px);
-        overflow: auto;
-        padding: 15px 12px;
-        margin: 14px 12px;
-        border-radius: 12px;
-        background: #fff;
-        .service-title {
-            font-size: 18px;
-            color: #222222;
-            font-weight: 500;
-            margin-bottom: 10px;
-            .label-icon {
-                width: 14px;
-                padding-right: 5px;
-            }
-        }
-        .service-content {
-            margin-top: 12px;
-            padding-top: 12px;
-            border-top: 1px solid #F5F5F5;
-            .service-item {
-                .sub-title {
-                    font-size: 16px;
-                    font-weight: 500;
-                    color: rgba(0, 0, 0, 0.9);
-                }
-                    .tag-group {
-                    display: flex;
-                    align-items: center;
-                    flex-wrap: wrap;
-                    gap: 0 12px;
-                    font-size: 16px;
-                    .tag-item {
-                        margin-top: 10px;
-                        position: relative;
-                        background: #E8F5FF;
-                        border-radius: 8px;
-                        color: #2199f8;
-                        padding: 0 12px;
-                        box-sizing: border-box;
-                        min-width: 26vw;
-                        height: 48px;
-                        text-align: center;
-                        line-height: 48px;
-                        cursor: pointer;
-                        transition: all 0.3s;
-                        .text { display: inline-flex; align-items: center; }
-                        .edit-icon { margin-left: 8px; }
-                        .del-icon {
-                            position: absolute;
-                            right: -8px;
-                            top: -8px;
-                            background: #2199F8;
-                            border-radius: 50%;
-                            width: 16px; height: 16px;
-                            font-size: 10px;
-                            display: flex; align-items: center; justify-content: center;
-                            color: #fff;
-                        }
-                        &.selected {
-                            border: 1px solid #2199F8;
-                            background: #E8F5FF;
-                            color: #2199F8;
-                        }
-                    }
-                    &.add-tag-group {
-                        .tag-item {
-                            color: #000000;
-                            background: none;
-                            border: 1px solid #999999;
-                            cursor: pointer;
-                            &.self {
-                                border: 1px solid #2199F8;
-                                background: #E8F5FF;
-                                color: #2199F8;
-                            }
-                            &.selected {
-                                border: 1px solid #2199F8;
-                                background: #E8F5FF;
-                                color: #2199F8;
-                            }
-                            &.last-add {
-                                background: #F7F7F7;
-                                color: #343434;
-                                border: none;
-                                display: flex;
-                                align-items: center;
-                                justify-content: center;
-                                cursor: pointer;
-                                .add-icon {
-                                    font-size: 14px;
-                                    font-weight: bold;
-                                    margin-right: 3px;
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-            .service-item + .service-item {
-                margin-top: 20px;
-            }
-        }
-    }
-}
-
-.add-tag-popup{
-    width: 90%;
-    padding: 20px 16px;
-    .popup-title{
-        font-size: 18px;
-        font-weight: 500;
-        text-align: center;
-        margin-bottom: 12px;
-    }
-    .ml-2 {
-        margin-left: 3px;
-    }
-    .popup-input{
-        margin-bottom: 30px;
-    }
-    .popup-button{
-        display: flex;
-        padding-top: 20px;
-        border-top: 1px solid rgba(0, 0, 0, 0.1);
-        div{
-            flex: 1;
-            font-size: 16px;
-            padding: 9px;
-            border-radius: 20px;
-            background: #2199F8;
-            color: #fff;
-            text-align: center;
-            cursor: pointer;
-        }
-        .cancel{
-            margin-right: 20px;
-            color: #000;
-            background: #fff;
-            border: 1px solid #999999;
-        }
-    }
-}
-</style>
-

+ 0 - 65
src/components/pageComponents/StatsBox.vue

@@ -1,65 +0,0 @@
-<template>
-    <div class="stats">
-        <div v-for="(item, index) in statsData" :key="index" class="col">
-            <div class="num">
-                {{ item.value }}
-                <span class="unit"> {{ item.unit }}</span>
-            </div>
-            <div class="desc">{{ item.desc }}</div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-defineProps({
-    statsData: {
-        type: Array,
-        required: true,
-        default: () => [],
-    },
-});
-</script>
-
-<style scoped lang="scss">
-.stats {
-    display: flex;
-    align-items: stretch;
-    justify-content: space-between;
-    background: rgba(33, 153, 248, 0.1);
-    border: 1px solid rgba(33, 153, 248, 0.2);
-    border-radius: 10px;
-    padding: 10px 8px;
-    font-size: 14px;
-    margin-top: 12px;
-
-    .col {
-        flex: 1;
-        text-align: center;
-
-        .num {
-            color: #2199f8;
-            font-weight: 600;
-            font-size: 16px;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-
-            .unit {
-                margin-left: 4px;
-                font-size: 13px;
-                font-weight: 400;
-                color: rgba(0, 0, 0, 0.5);
-            }
-        }
-
-        .desc {
-            color: #000;
-            margin-top: 4px;
-        }
-    }
-
-    .col + .col {
-        border-left: 1px solid rgba(33, 153, 248, 0.4);
-    }
-}
-</style>

+ 0 - 97
src/router/globalRoutes.js

@@ -69,39 +69,12 @@ export default [
         name: "Recognize",
         component: () => import("@/views/old_mini/home/subPages/recognize.vue"),
     },
-    // 农场管理
-    {
-        path: "/farm_manage",
-        name: "FarmManage",
-        meta: { showTabbar: true, keepAlive: true },
-        component: () => import("@/views/old_mini/farm_manage/index.vue"),
-    },
     // 农场管理详情
     {
         path: "/farm_manage_detail",
         name: "FarmManageDetail",
         component: () => import("@/views/old_mini/home/index.vue"),
     },
-    // 编辑农事
-    {
-        path: "/modify_work",
-        name: "ModifyWork",
-        meta: { keepAlive: true },
-        component: () => import("@/views/old_mini/modify_work/index.vue"),
-    },
-    // 农资农服
-    {
-        path: "/agri_services",
-        name: "AgriServices",
-        meta: { showTabbar: true, keepAlive: true },
-        component: () => import("@/views/old_mini/agri_services/index.vue"),
-    },
-    // 农场报告
-    {
-        path: "/farm_report",
-        name: "ReportDetail",
-        component: () => import("@/views/old_mini/report_detail/index.vue"),
-    },
     // 专家-我的主页
     {
         path: "/expert_homepage",
@@ -109,63 +82,6 @@ export default [
         meta: { keepAlive: true },
         component: () => import("@/views/old_mini/expert_detail/index.vue"),
     },
-    // 农事详情--农户
-    {
-        path: "/farmer_agri",
-        name: "FarmerIndex",
-        component: () => import("@/views/old_mini/agri_work/farmerIndex.vue"),
-    },
-    // 农事详情--专家
-    {
-        path: "/expert_agri",
-        name: "ExpertIndex",
-        component: () => import("@/views/old_mini/agri_work/expertIndex.vue"),
-    },
-    // 农事详情--农资农服
-    {
-        path: "/services_agri",
-        name: "ServicesIndex",
-        component: () => import("@/views/old_mini/agri_work/servicesIndex.vue"),
-    },
-    // 新增农事
-    {
-        path: "/add_work",
-        name: "AddWork",
-        component: () => import("@/views/old_mini/modify_work/addWork.vue"),
-    },
-    // 分享好友页面
-    {
-        path: "/share_page",
-        name: "SharePage",
-        component: () => import("@/views/old_mini/modify_work/sharePage.vue"),
-    },
-    // 报价详情
-    {
-        path: "/price_detail",
-        name: "PriceDetail",
-        meta: { keepAlive: true },
-        component: () => import("@/views/old_mini/price_detail/index.vue"),
-    },
-    // 报价维护
-    {
-        path: "/offer_price",
-        name: "OfferPrice",
-        meta: { keepAlive: true },
-        component: () => import("@/views/old_mini/offer_price/index.vue"),
-    },
-    // 报价维护
-    {
-        path: "/edit_price",
-        name: "EditPrice",
-        meta: { keepAlive: true },
-        component: () => import("@/views/old_mini/offer_price/component/editPrice.vue"),
-    },
-    // 服务维护
-    {
-        path: "/service_manage",
-        name: "ServiceManage",
-        component: () => import("@/views/old_mini/service_manage/index.vue"),
-    },
     // 气象预警详情/农事预警详情
     {
         path: "/warning_detail",
@@ -199,12 +115,6 @@ export default [
         meta: { keepAlive: true },
         component: () => import("@/views/old_mini/monitor/subPages/agriculturalDetail.vue"),
     },
-    // 农事管理
-    {
-        path: "/agri_services_manage",
-        name: "AgriServicesManage",
-        component: () => import("@/views/old_mini/agri_services/index.vue"),
-    },
     // 相册识别
     {
         path: "/album_recognize",
@@ -212,13 +122,6 @@ export default [
         meta: { keepAlive: true },
         component: () => import("@/views/old_mini/album_recognize/index.vue"),
     },
-    // 编辑农事方案
-    {
-        path: "/modify",
-        name: "Modify",
-        meta: { keepAlive: true },
-        component: () => import("@/views/old_mini/modify_work/modify.vue"),
-    },
     // 处方页面
     {
         path: "/prescription",

+ 0 - 492
src/views/old_mini/agri_services/components/farmDynamics.vue

@@ -1,492 +0,0 @@
-<template>
-    <div class="farm-dynamics">
-        <tab-list v-model="activePlanIndex" :tabs="filterType" @change="handlePlanClick" />
-        <div class="task-content">
-            <div class="expert-content">
-                <empty
-                    v-if="contentData.length === 0"
-                    image="https://birdseye-img.sysuimars.com/birdseye-look-mini/custom-empty-image.png"
-                    image-size="80"
-                    description="暂无数据"
-                    class="empty-state"
-                />
-                <div v-for="(section, index) in contentData" :key="index" class="content-section">
-                    <div class="section-id" :id="section.targetId"></div>
-                    <record-item
-                        :record-item-data="section"
-                        title-mode="default"
-                        onlyRecipeName
-                        titleRightDotText="全区"
-                        titleRightType="dot"
-                        class="recipe-item"
-                        :showFarmImage="activePlanIndex == 5 ? true : false"
-                        :content-mode="activePlanIndex == 5 ? 'serviceDetail' : ''"
-                        @click="handleClick(section)"
-                    >
-                        <template #footer>
-                            <div class="action-group">
-                                <div class="action-l">查看详情</div>
-                                <div class="action-r" v-if="section.farmWorkDetail?.flowStatus === 0 && !section.isPublic">
-                                    <div class="action-item warning-item" @click.stop="handleApply(section)">
-                                        发起需求
-                                    </div>
-                                    <div class="action-item primary-item" @click.stop="handleUploadPhoto({ id: section.id, isSelfDone: true, section })">确认并完成</div>
-                                </div>
-                                <div class="action-r" v-else-if="section.farmWorkDetail?.flowStatus === 0 && section.isPublic">
-                                    <div
-                                        class="action-item second-item"
-                                        @click.stop="handleOperation(section, 'cancel')"
-                                    >
-                                        取消发起
-                                    </div>
-                                </div>
-                                <div class="action-r" v-else-if="section.farmWorkDetail?.flowStatus === 4">
-                                    <div class="action-item warning-item has-applied">已锁单</div>
-                                    <div
-                                        v-if="section.executeEvidence?.length"
-                                        class="action-item primary-item"
-                                        @click.stop="handleOperation(section, 'confirmComplete')"
-                                    >
-                                        确认执行完成
-                                    </div>
-                                    <div
-                                        v-else
-                                        class="action-item primary-item"
-                                        @click.stop="handleApply(section, 'remindExecute')"
-                                    >
-                                        提醒对方执行
-                                    </div>
-                                </div>
-                                <div class="action-r" v-else-if="activePlanIndex == 5">
-                                    <!-- <div
-                                        class="action-item warning-item"
-                                        :class="{ 'has-applied': section.hasApplied }"
-                                        @click="handleApply(section, index)"
-                                    >
-                                        {{ section.hasApplied ? "已发起需求" : "发起需求" }}
-                                    </div> -->
-                                    <div
-                                        class="action-item primary-item"
-                                        v-if="!section.farmWorkDetail?.reviewImage?.length"
-                                        @click.stop="handleUploadPhoto(section)"
-                                    >
-                                        上传照片
-                                    </div>
-                                </div>
-                            </div>
-                        </template>
-                    </record-item>
-                </div>
-            </div>
-        </div>
-    </div>
-    <!-- 需求发送成功弹窗 -->
-    <tip-popup v-model:show="showApplyPopup" type="success" text="需求发送成功" />
-    <!-- 发起需求成功弹窗 -->
-    <fn-share-sheet :class="type === 'manage' ? '' : 'share-sheet'" v-model:show="showShare" @select="onSelect" :options="options" />
-    <!-- 提醒对方执行弹窗 -->
-    <upload-execute ref="uploadExecuteRef" onlyShare />
-    <!-- 上传照片弹窗 -->
-    <review-upload-popup v-model="showUpload" :record-id="sectionId" @success="handleImgUpload" />
-</template>
-<script setup>
-import { ref, onActivated ,onMounted} from "vue";
-import recordItem from "@/components/recordItem.vue";
-import tabList from "@/components/pageComponents/TabList.vue";
-import { Popup, Empty } from "vant";
-import { useRouter } from "vue-router";
-import wx from "weixin-js-sdk";
-import uploadExecute from "@/views/old_mini/task_condition/components/uploadExecute.vue";
-import tipPopup from "@/components/popup/tipPopup.vue";
-import FnShareSheet from "@/components/pageComponents/FnShareSheet.vue";
-import { ElMessageBox, ElMessage } from "element-plus";
-import { base_img_url2 } from "@/api/config";
-import reviewUploadPopup from "@/components/popup/reviewUploadPopup.vue";
-const router = useRouter();
-
-const props = defineProps({
-    type: {
-        type: String,
-        default: "",
-    },
-    active: {
-        type: Number,
-        default: 0,
-    },
-});
-
-const handleImgUpload = () => {
-    if(selfDone.value){
-        VE_API.z_farm_work_record.updateFlowStatus({ id: currentSection.value.id, targetFlowStatus: 5 }).then((res) => {
-            if (res.code === 0) {
-                showUpload.value = false;
-                sectionId.value = null;
-                setTimeout(() => {
-                    router.push({
-                    path: "/review_work",
-                    query: {
-                            miniJson: JSON.stringify({ id: currentSection.value.id, goBack: true }),
-                        },
-                    });
-                }, 500)
-            }
-        })
-    }else{
-        getContentData();
-    }
-};
-
-const showApplyPopup = ref(false);
-const uploadExecuteRef = ref(null);
-
-const showShare = ref(false);
-const options = ref([
-    {
-        name: "需求大厅",
-        icon: "https://birdseye-img.sysuimars.com/birdseye-look-mini/xuqiu-icon.png",
-        type: "demandHall",
-    },
-    { name: "微信", icon: "wechat", type: "wechat" },
-]);
-
-// 获取触发图片
-const triggerImg = ref([]);
-const getTriggerImg = async () => {
-    const { data } = await VE_API.z_farm_work_record.getTriggerImg({ farmWorkRecordId: currentSection.value.id });
-    triggerImg.value = data || [];
-}
-
-const onSelect = async (option) => {
-    if (option.type === "wechat") {
-        await getTriggerImg();
-        const query = {
-            askInfo: { title: "农事需求", content: "是否分享该农事需求给好友" },
-            shareText: `发起了 ${currentSection.value.farmWorkName} 的接单需求 请查看!`,
-            id: currentSection.value.id,
-            farmWorkOrderId: currentSection.value.orderId,
-            postImg: triggerImg.value.length ? base_img_url2 + triggerImg.value[triggerImg.value.length - 1].cloudFilename : ''
-        };
-        wx.miniProgram.navigateTo({
-            url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=priceSheet`,
-        });
-    } else {
-        updatePublicStatus(1);
-    }
-};
-
-const updatePublicStatus = (isPublic) => {
-    return VE_API.z_farm_work_record.updatePublicStatus({ recordId: currentSection.value.id, isPublic }).then((res) => {
-        if (res.code === 0) {
-            getContentData();
-        }
-    });
-};
-
-const updateFlowStatus = (targetFlowStatus) => {
-    return VE_API.z_farm_work_record.updateFlowStatus({ id: currentSection.value.id, targetFlowStatus }).then((res) => {
-        if (res.code === 0) {
-            if (targetFlowStatus === 2) {
-                showApplyPopup.value = true;
-            }
-            getContentData();
-        }
-    });
-};
-
-// 取消发起需求/确认执行完成
-const handleOperation = (section, type) => {
-    currentSection.value = section;
-    ElMessageBox.confirm(type === "cancel" ? "确认取消发起需求吗?" : "确认执行完成吗?", "提示", {
-        confirmButtonText: "确认",
-        cancelButtonText: "取消",
-        type: "warning",
-    })
-        .then(() => {
-            if (type === "cancel") {
-                updatePublicStatus(0);
-            }else{
-                updateFlowStatus(5);
-            }
-        })
-        .catch(() => {});
-};
-
-const showUpload = ref(false);
-const sectionId = ref(null);
-const selfDone = ref(false);
-// 上传照片处理函数
-const handleUploadPhoto = ({ id, isSelfDone = false, section }) => {
-    currentSection.value = section;
-    showUpload.value = true;
-    sectionId.value = id;
-    selfDone.value = isSelfDone;
-};
-
-const filterType = ref([
-    {
-        title: "待确认",
-        value: '0',
-    },
-    {
-        title: "待完成",
-        value: 4,
-    },
-    {
-        title: "已完成",
-        value: 5,
-    },
-]);
-
-const activePlanIndex = ref('0');
-const handlePlanClick = (value) => {
-    activePlanIndex.value = value;
-    getContentData();
-};
-
-onMounted(() => {
-    getContentData();
-});
-
-onActivated(() => { 
-    if(props.active == 0){
-        getContentData();
-    }
-});
-
-const contentData = ref([]);
-const getContentData = async () => {
-    const res = await VE_API.z_farm_work_record.getSimpleList({
-        role: localStorage.getItem("SET_USER_CUR_ROLE"),
-        flowStatus:activePlanIndex.value,
-    });
-    contentData.value = res.data;
-
-    // 遍历数组,获取每一项的详情并合并
-    if (res.data && res.data.length > 0) {
-        const detailPromises = res.data.map((item) => getItemDetail(item.id));
-        const detailResults = await Promise.all(detailPromises);
-
-        // 将详情数据合并到对应的数组项中
-        contentData.value = res.data.map((item, index) => {
-            return {
-                ...item,
-                farmWorkDetail: detailResults[index][0],
-                prescriptionList: detailResults[index][0]?.prescriptionList,
-                reviewImage: detailResults[index][0]?.reviewImage,
-            };
-        });
-    }
-};
-
-defineExpose({
-    getContentData,
-});
-
-async function getItemDetail(id) {
-    const { data } = await VE_API.z_farm_work_record.getDetail({ id });
-    return data || {};
-}
-
-const currentSection = ref({});
-const handleApply = (section, type) => {
-    currentSection.value = section;
-    if (type === "remindExecute") {
-        const params = {
-            id: section.id,
-            farmMiniUserId: section.farmWorkDetail?.users[0]?.userId,
-            farmWorkOrderId: section?.orderId,
-            farmId: section?.farmId,
-            farmWorkName: section?.farmWorkName,
-            type: "remindExecute",
-        };
-        uploadExecuteRef.value.showPopup(params);
-    } else {
-        showShare.value = true;
-    }
-};
-
-const handleClick = (section) => {
-    if (activePlanIndex.value == 5) {
-        router.push(`/review_work?miniJson=${JSON.stringify({ id: section.id, goBack: true })}`);
-    } else {
-        router.push({
-            path: "/completed_work",
-            query: { miniJson: JSON.stringify({ id: section.id }) },
-        });
-    }
-};
-</script>
-<style lang="scss" scoped>
-.farm-dynamics {
-    width: 100%;
-    height: 100vh;
-    background: #f5f7fb;
-    .task-content {
-        display: flex;
-        height: calc(100% - 140px);
-        .expert-content {
-            width: 100%;
-            height: 100%;
-            overflow: auto;
-            padding: 10px;
-            box-sizing: border-box;
-            .empty-state {
-                ::v-deep .van-empty {
-                    padding: 40px 0;
-                }
-            }
-            .content-section {
-                position: relative;
-                .section-id {
-                    position: absolute;
-                    top: 0;
-                    width: 100%;
-                    height: 1px;
-                }
-                .recipe-item {
-                    border: 1px solid rgba(0, 0, 0, 0.1);
-                }
-            }
-            .box-title {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                padding-bottom: 8px;
-                .title-l {
-                    font-size: 16px;
-                    font-weight: 600;
-                    color: #000;
-                    .parent-text {
-                        margin-left: 5px;
-                        font-size: 12px;
-                        font-weight: normal;
-                        padding: 4px 6px;
-                        border-radius: 14px;
-                        background: rgba(119, 119, 119, 0.1);
-                    }
-                }
-                .title-btn {
-                    width: 24px;
-                    height: 24px;
-                    border-radius: 50%;
-                    background: #2199f8;
-                    display: flex;
-                    align-items: center;
-                    justify-content: center;
-                }
-                .title-r {
-                    display: flex;
-                    align-items: center;
-                    color: #393939;
-                    font-size: 12px;
-                    .r-dot {
-                        width: 6px;
-                        height: 6px;
-                        border-radius: 50%;
-                        background: #393939;
-                        margin-right: 5px;
-                    }
-                }
-            }
-            .content-info {
-                padding-top: 8px;
-                .info-line {
-                    font-size: 12px;
-                    color: #bbbbbb;
-                    margin-bottom: 8px;
-                    line-height: 1.4;
-                    .info-val {
-                        color: #666666;
-                    }
-                }
-                .review-title {
-                    .info-val {
-                        margin-top: 5px;
-                    }
-                }
-                .review-image {
-                    display: flex;
-                    align-items: center;
-                    gap: 8px;
-                    img {
-                        flex: 1;
-                        height: 82px;
-                        object-fit: cover;
-                        border-radius: 4px;
-                    }
-                }
-                .reminder-box {
-                    background: linear-gradient(90deg, #d9ebfc, transparent);
-                    border-radius: 4px;
-                    padding: 6px 8px;
-                    font-size: 12px;
-                    color: #2e2e2e;
-                    line-height: 1.4;
-                    margin-top: 8px;
-                    .highlight-number {
-                        color: #2199f8;
-                        font-weight: 500;
-                    }
-                }
-            }
-            .action-r {
-                color: #1d2129;
-            }
-            .action-group {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                padding-top: 8px;
-                margin-top: 8px;
-                border-top: 1px solid #f5f5f5;
-                .action-l {
-                    font-size: 12px;
-                }
-            }
-            .action-group {
-                .action-r {
-                    display: flex;
-                    align-items: center;
-                    .action-item {
-                        padding: 0 11px;
-                        height: 30px;
-                        line-height: 30px;
-                        border-radius: 20px;
-                        font-size: 12px;
-                        &.second-item {
-                            background: rgba(137, 137, 137, 0.1);
-                            color: #898989;
-                        }
-                        &.primary-item {
-                            background: #2199f8;
-                            color: #fff;
-                        }
-                        &.warning-item {
-                            background: rgba(255, 131, 29, 0.1);
-                            color: #ff831d;
-                            &.has-applied {
-                                background: transparent;
-                                color: #afafaf;
-                            }
-                        }
-                        &.cancel-item {
-                            color: #676767;
-                            border: 1px solid rgba(103, 103, 103, 0.2);
-                        }
-                    }
-                    .action-item + .action-item {
-                        margin-left: 5px;
-                    }
-                }
-                .apply-action {
-                    justify-content: flex-end;
-                    .default-item {
-                        border: 1px solid rgba(0, 0, 0, 0.4);
-                        color: rgba(0, 0, 0, 0.4);
-                    }
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 618
src/views/old_mini/agri_services/components/servicesHall.vue

@@ -1,618 +0,0 @@
-<template>
-    <div class="services-hall" :style="{ height: `calc(100vh - ${tabBarHeight}px - 50px)` }">
-        <!-- 地图 -->
-        <div class="map-container" ref="mapContainer"></div>
-
-        <div class="search-wrap">
-            <location-search
-                class="search"
-                :userLocation="userLocation"
-                @change="handleLocationChange"
-            />
-        </div>
-
-        <floating-panel
-            class="floating-panel"
-            v-model:height="height"
-            :anchors="anchors"
-            :content-draggable="false"
-            @height-change="handleHeightChange"
-        >
-            <template #header>
-                <div class="header-bar"></div>
-                <div class="select-group">
-                    <el-select class="select-item" v-model="paramsPage.distance" placeholder="距离" @change="resetList">
-                        <el-option
-                            v-for="item in distanceOptions"
-                            :key="item.value"
-                            :label="item.label"
-                            :value="item.value"
-                        />
-                    </el-select>
-                    <el-select class="select-item" v-model="paramsPage.serviceType" placeholder="服务类型" @change="resetList">
-                        <el-option
-                            v-for="item in serviceTypeList"
-                            :key="item.id"
-                            :label="item.name"
-                            :value="item.id"
-                        />
-                    </el-select>
-                </div>
-            </template>
-            <div class="hall-content">
-                <List
-                    v-model:loading="loading"
-                    :finished="finished"
-                    finished-text="没有更多了"
-                    :immediate-check="false"
-                    @load="onLoad"
-                    class="van-list-container"
-                    :style="{ height: `${cardContentHeight}px` }"
-                    ref="cardContentRef"
-                >
-                    <div class="farm-list">
-                        <div class="task-item" v-for="item in agriculturalStoreList" :key="item.id" @click="handleDetail(item)">
-                        <div class="task-content">
-                            <div class="content-t">
-                                <img class="content-img" :src="item.bgUrl || require('@/assets/img/home/nz.png')" alt="" />
-                                <div class="content-info">
-                                    <div class="content-name">{{ item.storeName }} <span>{{ item.score || 5 }}分</span></div>
-                                    <div class="content-text">
-                                        <div class="text-item van-ellipsis">
-                                            <span>服务类型:</span>
-                                            <span class="text-value" v-for="(ele, index) in item.serviceTypeList" :key="ele"
-                                                >{{ ele }}{{ index !== item.serviceTypeList.length - 1 ? "、" : "" }}</span>
-                                        </div>
-                                        <div class="text-item van-ellipsis">
-                                            <span>服务品种:</span>
-                                            <span class="text-value" v-for="(ele, index) in item.speciesList" :key="ele"
-                                                >{{ ele }}{{ index !== item.speciesList.length - 1 ? "、" : "" }}</span>
-                                        </div>
-                                        <div class="text-item van-ellipsis">
-                                            <span>服务区域:</span>
-                                            <span class="text-value">{{ item.address||'无' }}</span>
-                                        </div>
-                                        <div class="text-item van-ellipsis">
-                                            <span>服务设备:</span>
-                                            <span class="text-value" v-for="(ele, index) in item.equipmentList" :key="ele"
-                                                >{{ ele
-                                                }}{{ index !== item.equipmentList.length - 1 ? "、" : "" }}</span>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                            <!-- <div class="content-b">
-                                <div class="hot-evaluate">
-                                    <span>热门评价</span>
-                                    <el-icon><CaretRight /></el-icon>
-                                </div>
-                                <div class="evaluate-content">
-                                    <span class="van-ellipsis evaluate-text">“ 很用心,服务的很到位,下次还... ”</span>
-                                    <span class="more">查看更多</span>
-                                </div>
-                            </div> -->
-                        </div>
-                        <div class="btn-group">
-                            <div class="btn-group-l">查看详情</div>
-                            <div class="btn-group-r">
-                                <!-- <div class="r-item">
-                                    <Icon name="phone-o" />
-                                    <span>电话联系</span>
-                                </div> -->
-                                <div class="r-item" @click.stop="handleOnlineChat(item)">
-                                    <!-- <Icon name="chat-o" /> -->
-                                    <span>线上沟通</span>
-                                </div>
-                            </div>
-                        </div>
-                        </div>
-                    </div>
-                </List>
-            </div>
-        </floating-panel>
-    </div>
-</template>
-
-<script setup>
-import { FloatingPanel, Icon, List } from "vant";
-import { computed, nextTick, onMounted, ref, onActivated } from "vue";
-import { useStore } from "vuex";
-import IndexMap from "../map/index";
-import LocationSearch from "@/components/pageComponents/LocationSearch.vue";
-import { Point } from "ol/geom";
-import Feature from "ol/Feature";
-import * as util from "@/common/ol_common.js";
-import { useRouter } from "vue-router";
-const router = useRouter();
-const props = defineProps({
-    isCapital: {
-        type: Boolean,
-        default: false,
-    },
-    active: {
-        type: Number,
-        default: 0,
-    },
-});
-
-const store = useStore();
-const tabBarHeight = computed(() => store.state.home.tabBarHeight);
-
-const anchors = ref([310 + tabBarHeight.value, Math.round(1 * window.innerHeight) - 44]);
-const height = ref(anchors.value[0]);
-
-const indexMap = new IndexMap();
-const mapContainer = ref(null);
-const mapPoint = ref(null);
-const userLocation = localStorage.getItem("MINI_USER_LOCATION");
-
-onMounted(() => {
-    mapPoint.value = store.state.home.miniUserLocationPoint;
-    nextTick(() => {
-        indexMap.initMap(mapPoint.value, mapContainer.value, props.isCapital);
-        // 设置服务大厅图层点击事件回调
-        indexMap.setGardenHallClickCallback((featureData,) => {
-            router.push(`/expert_homepage?isStore=true&id=${featureData.id}`);
-        });
-        
-        // 添加初始位置图标
-        if (indexMap.clickPointLayer && mapPoint.value) {
-            const initialPoint = util.wktCastGeom(mapPoint.value).getFirstCoordinate();
-            const point = new Feature(new Point(initialPoint));
-            indexMap.clickPointLayer.addFeature(point);
-        }
-    });
-    // 手动触发首次加载
-    getStoreList(false);
-    initMap();
-});
-
-const initMap = async () => {
-    const params = {
-        limit: 999,
-        page: 1,
-        type: 1,
-    };
-    const res = await VE_API.farm.getStoreList(params);
-    if(res.data.length > 0){
-        indexMap.initDataHall(res.data);
-    }
-};
-
-onActivated(() => {
-    if(props.active == 1){
-        resetList();
-        initMap();
-    }
-});
-
-const handleDetail = (item) => {
-    router.push(`/expert_homepage?isStore=true&id=${item.id}`);
-};
-
-const paramsPage = ref({
-    serviceType: "全部类型",
-    distance:"不限范围"
-})
-
-const agriculturalStoreList = ref([]);
-const loading = ref(false);
-const finished = ref(false);
-const page = ref(1);
-const limit = ref(10); // 每页加载数量
-const resetTimer = ref(null); // 防抖定时器
-const currentRequestKey = ref(null); // 当前请求的唯一标识
-
-// 生成请求的唯一标识
-const generateRequestKey = (params) => {
-    return JSON.stringify({
-        point: params.point,
-        page: params.page,
-        limit: params.limit,
-        type: params.type,
-        serviceType: params.serviceType || '',
-        distance: params.distance || '',
-    });
-};
-
-// 加载列表数据
-const getStoreList = async (isLoadMore = false) => {
-    const params = {
-        point: mapPoint.value,
-        page: page.value,
-        limit: limit.value,
-        type: 1,
-        ...paramsPage.value,
-    };
-    
-    // 如果服务类型为空字符串,不传该参数
-    if (params.serviceType === "全部类型") {
-        delete params.serviceType;
-    }
-    if (params.distance === "不限范围") {
-        delete params.distance;
-    }
-    
-    // 生成请求的唯一标识
-    const requestKey = generateRequestKey(params);
-    // 如果正在加载相同的请求,直接返回
-    if (loading.value && currentRequestKey.value === requestKey) {
-        return;
-    }
-    
-    // 如果正在加载,直接返回(防止不同参数的请求重叠)
-    if (loading.value) {
-        return;
-    }
-    // 设置当前请求标识和加载状态
-    currentRequestKey.value = requestKey;
-    loading.value = true;
-    
-    try {
-        const res = await VE_API.farm.getStoreList(params);
-        // 获取总数和当前页数据
-        const totalCount = res.count || 0;
-        const currentData = res.data || [];
-        
-        if (currentData.length > 0) {
-            const newList = currentData.map((item) => {
-                return {
-                    ...item,
-                    speciesList: JSON.parse(item.serviceSpecies || "[\"--\"]"),
-                    equipmentList: JSON.parse(item.serviceEquipment || "[\"--\"]"),
-                    serviceTypeList: JSON.parse(item.serviceType || "[\"--\"]"),
-                };
-            });
-            
-            if (isLoadMore) {
-                // 加载更多时追加数据
-                agriculturalStoreList.value = [...agriculturalStoreList.value, ...newList];
-            } else {
-                // 首次加载或刷新时替换数据
-                agriculturalStoreList.value = newList;
-            }
-            
-            // 使用 count 判断是否还有更多数据
-            // 如果当前已加载的数据量 >= 总数,说明没有更多数据了
-            const loadedCount = agriculturalStoreList.value.length;
-            if (totalCount > 0 && loadedCount >= totalCount) {
-                finished.value = true;
-            } else if (totalCount === 0) {
-                // 如果没有总数信息,使用原来的判断方式
-                if (currentData.length < limit.value) {
-                    finished.value = true;
-                }
-            }
-            
-        } else {
-            finished.value = true;
-        }
-    } catch (error) {
-        console.error('获取列表失败:', error);
-        finished.value = true;
-    } finally {
-        // 加载完成后,设置 loading = false 告诉 List 组件加载完成
-        loading.value = false;
-        // 清除当前请求标识
-        currentRequestKey.value = null;
-    }
-};
-
-// 滚动加载更多
-const onLoad = async () => {
-    if (finished.value) return;
-    const isLoadMore = page.value > 1;
-    loading.value = false;
-    await getStoreList(isLoadMore);
-    // 加载完成后再增加页码
-    if (!finished.value) {
-        page.value++;
-    }
-};
-
-// 重置列表(筛选条件变化时调用)
-const resetList = () => {
-    // 清除之前的定时器
-    if (resetTimer.value) {
-        clearTimeout(resetTimer.value);
-        resetTimer.value = null;
-    }
-    
-    // 使用防抖,延迟执行,避免快速连续触发
-    resetTimer.value = setTimeout(() => {
-        // 清除当前请求标识,确保可以重新请求
-        currentRequestKey.value = null;
-        page.value = 1;
-        finished.value = false;
-        agriculturalStoreList.value = [];
-        getStoreList(false);
-        resetTimer.value = null;
-    }, 100);
-};
-
-// 更新地图位置和图标
-const updateMapLocation = (coordinateArray) => {
-    if (!indexMap || !indexMap.kmap) return;
-    
-    // 更新地图位置
-    indexMap.kmap.getView().animate({
-        center: coordinateArray,
-        zoom: 16,
-        duration: 500,
-    });
-    
-    // 更新点击点图标
-    if (indexMap.clickPointLayer) {
-        indexMap.clickPointLayer.source.clear();
-        const point = new Feature(new Point(coordinateArray));
-        indexMap.clickPointLayer.addFeature(point);
-    }
-};
-
-// 处理位置搜索变化
-function handleLocationChange(data) {
-    if (data && data.coordinateArray) {
-        // 搜索到新位置
-        mapPoint.value = data.point;
-        paramsPage.value.distance = "5000";
-        updateMapLocation(data.coordinateArray);
-        resetList();
-    } else {
-        // 重置为初始位置
-        mapPoint.value = store.state.home.miniUserLocationPoint;
-        paramsPage.value.distance = "不限范围";
-        
-        // 获取初始位置的坐标
-        const initialPoint = util.wktCastGeom(mapPoint.value).getFirstCoordinate();
-        updateMapLocation(initialPoint);
-        
-        resetList();
-        initMap();
-    }
-}
-
-const cardContentHeight = ref(245);
-
-const distanceOptions = [
-    { value: "不限范围", label: "不限范围" },
-    { value: "5000", label: "5km" },
-    { value: "3000", label: "3km" },
-    { value: "1000", label: "1km" },
-];
-const serviceTypeList = ref([
-    {id: "全部类型", name: "全部类型"},
-    {id: "嫁接", name: "嫁接"},
-    {id: "修剪", name: "修剪"},
-    {id: "施肥打药", name: "施肥打药"},
-]);
-
-const cardContentRef = ref(null);
-const handleHeightChange = ({ height }) => {
-    if (height === anchors.value[0]) {
-        cardContentHeight.value = 245;
-        if (cardContentRef.value && cardContentRef.value.$el) {
-            cardContentRef.value.$el.scrollTo({ top: 0, behavior: "smooth" });
-        }
-    } else if (height === anchors.value[1]) {
-        cardContentHeight.value = Math.round(1 * window.innerHeight) - (tabBarHeight.value - 40) - 170;
-    }
-};
-
-const handleOnlineChat = ({miniUserIds}) => {
-    router.push(`/chat_frame?userId=${miniUserIds[0]}`);
-};
-
-defineExpose({
-    getStoreList: resetList,
-});
-
-</script>
-
-<style lang="scss" scoped>
-.services-hall {
-    width: 100%;
-    height: 100%;
-    position: relative;
-    overflow: hidden;
-    .map-container {
-        width: 100%;
-        height: calc(100% - 290px);
-    }
-
-    .search {
-        position: absolute;
-        top: 8px;
-        width: calc(100% - 24px);
-        left: 12px;
-        ::v-deep {
-            .el-input__wrapper {
-                box-shadow: none;
-                border-radius: 20px;
-            }
-        }
-    }
-
-    .expand-btn-wrap {
-        position: absolute;
-        bottom: 12px;
-        left: 12px;
-        width: calc(100% - 24px);
-        background-image: linear-gradient(180deg, #d7eafc 0%, #ffffff 100%);
-        border-radius: 14px;
-        padding: 15px 12px;
-        box-sizing: border-box;
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        font-weight: 500;
-        font-size: 15px;
-        .expand-btn {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            gap: 4px;
-            font-size: 13px;
-            color: #2199f8;
-        }
-    }
-
-    .hall-content {
-        height: 100%;
-        position: relative;
-        .van-list-container {
-            overflow-y: auto;
-        }
-        .farm-list {
-            padding: 0 12px;
-            .task-item {
-                border-top: 1px solid rgba(0, 0, 0, 0.1);
-                padding-top: 10px;
-                .task-content {
-                    .content-t {
-                        display: flex;
-                        gap: 8px;
-                        .content-img {
-                            width: 90px;
-                            height: 90px;
-                            border-radius: 8px;
-                        }
-                        .content-info {
-                            width: calc(100% - 98px);
-                            .content-name {
-                                font-size: 16px;
-                                font-weight: 500;
-                                span {
-                                    color: #ff953d;
-                                }
-                            }
-                            .content-text {
-                                font-size: 12px;
-                                color: #bbbbbb;
-                                .text-item {
-                                    width: calc(100% - 10px);
-                                    .text-value {
-                                        color: #666666;
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    .content-b {
-                        margin: 10px 0;
-                        font-size: 12px;
-                        display: flex;
-                        font-weight: 500;
-                        .hot-evaluate {
-                            display: flex;
-                            align-items: center;
-                            color: #574300;
-                            padding: 5px 8px;
-                            border-radius: 6px;
-                            background: rgba(243, 193, 29, 0.1);
-                            margin-right: 8px;
-                        }
-                        .evaluate-content {
-                            width: calc(100% - 89px);
-                            display: flex;
-                            align-items: center;
-                            .evaluate-text {
-                                width: calc(100% - 62px);
-                            }
-                            .more {
-                                color: #b6b6b6;
-                                font-weight: 400;
-                                margin-left: 10px;
-                            }
-                        }
-                    }
-                }
-                .btn-group {
-                    display: flex;
-                    justify-content: space-between;
-                    align-items: center;
-                    font-size: 12px;
-                    margin-top: 10px;
-                    .btn-group-r {
-                        display: flex;
-                        align-items: center;
-                        gap: 10px;
-                        .r-item {
-                            border-radius: 25px;
-                            padding: 7px 12px;
-                            border: 1px solid #8b8b8b;
-                            color: #8b8b8b;
-
-                            display: flex;
-                            align-items: center;
-                            gap: 4px;
-                        }
-                    }
-                }
-            }
-            .task-item + .task-item {
-                margin-top: 10px;
-            }
-        }
-    }
-
-    .select-group {
-        display: flex;
-        padding: 0 12px;
-        .select-item {
-            width: 100%;
-            ::v-deep {
-                .el-select__wrapper {
-                    text-align: center;
-                    gap: 2px;
-                    box-shadow: none;
-                    justify-content: center;
-                    background: none;
-                }
-                .el-select__selection {
-                    flex: none;
-                    width: fit-content;
-                }
-                .el-select__placeholder {
-                    position: static;
-                    transform: none;
-                    width: fit-content;
-                    color: rgba(0, 0, 0, 0.2);
-                }
-                .el-select__caret {
-                    color: rgba(0, 0, 0, 0.2);
-                }
-            }
-        }
-    }
-
-    .header-bar {
-        width: 20px;
-        height: 3px;
-        margin: 10px auto 10px auto;
-        border-radius: 4px;
-        background: #969799;
-    }
-}
-
-.floating-panel {
-    width: 100%;
-    background: #ffffff;
-    ::v-deep {
-        .van-floating-panel__content {
-            background: transparent;
-            overflow: hidden;
-        }
-        .van-floating-panel__header {
-            position: relative;
-            &::after {
-                content: "";
-                height: 100px;
-                width: 100%;
-                position: absolute;
-                top: 0px;
-                left: 0;
-            }
-        }
-    }
-}
-</style>

+ 0 - 75
src/views/old_mini/agri_services/index.vue

@@ -1,75 +0,0 @@
-<template>
-    <div class="agri-services" :style="{ height: type !== 'manage' ? `calc(100vh - ${tabBarHeight}px - 50px)` : '100vh' }">
-        <custom-header name="农事管理" v-if="type === 'manage'"></custom-header>
-        <tabs v-model:active="active" class="tabs" v-if="type !== 'manage'" @change="handleTabChange">
-            <tab title="农事管理">
-                <farm-dynamics ref="farmDynamicsRef" :active="active" />
-            </tab>
-            <tab title="服务大厅">
-                <services-hall ref="servicesHallRef" :active="active" />
-            </tab>
-        </tabs>
-        <!-- <div v-else class="farm-dynamics-container">
-            <farm-dynamics ref="farmDynamicsRef" :type="type" />
-        </div> -->
-    </div>
-</template>
-
-<script setup>
-import { ref, computed } from "vue";
-import { useRoute } from "vue-router";
-import { useStore } from "vuex";
-import { Tab, Tabs } from "vant";
-import servicesHall from "./components/servicesHall.vue";
-// import farmDynamics from "./components/farmDynamics.vue";
-import customHeader from "@/components/customHeader.vue";
-
-const route = useRoute();
-const store = useStore();
-const tabBarHeight = computed(() => store.state.home.tabBarHeight);
-const active = ref(route.query.active ? 1 : 0);
-
-const type = ref(route.query.type);
-
-const servicesHallRef = ref(null);
-const farmDynamicsRef = ref(null);
-const handleTabChange = (index) => {
-    if (index === 1) {
-        servicesHallRef.value && servicesHallRef.value.getStoreList();
-    }else{
-        farmDynamicsRef.value && farmDynamicsRef.value.getContentData();
-    }
-}
-
-</script>
-<style lang="scss" scoped>
-.agri-services {
-    width: 100%;
-    height: 100vh;
-    .farm-dynamics-container {
-        ::v-deep{
-            .task-content{
-                height: calc(100% - 80px);
-            }
-        }
-    }
-    .tabs {
-        ::v-deep {
-            .van-tabs__wrap {
-                margin-bottom: 8px;
-            }
-            .van-tabs__line {
-                width: 24px;
-                height: 4px;
-            }
-            .van-tab {
-                width: 100px;
-                flex: none;
-            }
-            .van-tabs__nav {
-                justify-content: center;
-            }
-        }
-    }
-}
-</style>

+ 0 - 159
src/views/old_mini/agri_services/map/index.js

@@ -1,159 +0,0 @@
-import * as KMap from "@/utils/ol-map/KMap";
-import * as util from "@/common/ol_common.js";
-import config from "@/api/config.js";
-import { Point } from 'ol/geom';
-import Feature from "ol/Feature";
-import Style from "ol/style/Style";
-import Photo from "ol-ext/style/Photo";
-import { Fill, Text, Icon, Stroke } from "ol/style.js";
-import { newPoint } from "@/utils/map";
-import VectorLayer from "ol/layer/Vector";
-
-/**
- * @description 地图层对象
- */
-class IndexMap {
-  constructor() {
-    let that = this;
-    let vectorStyle = new KMap.VectorStyle();
-    this.vectorStyle = vectorStyle;
-    // 位置图标
-    this.clickPointLayer = new KMap.VectorLayer("clickPointLayer", 9999, {
-      style: (f) => {
-        return new Style({
-          image: new Icon({
-            src: require("@/assets/img/home/garden-point.png"),
-            scale: 0.5,
-            anchor: [0.5, 1],
-          }),
-        });
-      },
-    });
-
-    this.gardenHallLayer = new KMap.VectorLayer("gardenHallLayer", 99, {
-      minZoom: 6,
-      maxZoom: 22,
-      style: (feature) => {
-        let style2 = new Style({
-          image: new Icon({
-            src: require("@/assets/img/home/farm-point.png"),
-            scale: 0.5,
-            anchor: [0.5, 1],
-            displacement: [0, -36],
-          }),
-        });
-        let style3 = new Style({
-          text: new Text({
-            text: feature.get('shortName') || '--',
-            offsetX: 0,
-            offsetY: -30,
-            font: "bold 12px sans-serif",
-            fill: new Fill({ color: "#2199F8" }), // 字体颜色
-          }),
-        });
-
-        const canvas = document.createElement('canvas');
-        const ctx = canvas.getContext('2d');
-
-        // 矩形的参数
-        const x = 150; // 矩形中心点的x坐标
-        const y = 100; // 矩形中心点的y坐标
-        const width = 58; // 矩形的宽度
-        const height = 20; // 矩形的高度
-        const cornerRadius = 4; // 圆角半径
-
-        // 创建渐变
-        const gradient = ctx.createLinearGradient(x - width / 2, y, x + width / 2, y);
-        gradient.addColorStop(0, '#fff');   // 渐变起始颜色
-        gradient.addColorStop(1, '#fff');  // 渐变结束颜色
-
-        // 绘制圆角矩形
-        ctx.beginPath();
-        ctx.moveTo(x - width / 2 + cornerRadius, y - height / 2); // 左上角
-        ctx.lineTo(x + width / 2 - cornerRadius, y - height / 2); // 上边
-        ctx.arc(x + width / 2 - cornerRadius, y - height / 2 + cornerRadius, cornerRadius, -Math.PI / 2, 0); // 右上角
-        ctx.lineTo(x + width / 2, y + height / 2 - cornerRadius); // 右边
-        ctx.arc(x + width / 2 - cornerRadius, y + height / 2 - cornerRadius, cornerRadius, 0, Math.PI / 2); // 右下角
-        ctx.lineTo(x - width / 2 + cornerRadius, y + height / 2); // 下边
-        ctx.arc(x - width / 2 + cornerRadius, y + height / 2 - cornerRadius, cornerRadius, Math.PI / 2, Math.PI); // 左下角
-        ctx.lineTo(x - width / 2, y - height / 2 + cornerRadius); // 左边
-        ctx.arc(x - width / 2 + cornerRadius, y - height / 2 + cornerRadius, cornerRadius, Math.PI, -Math.PI / 2); // 左上角
-        ctx.closePath();
-
-        // 填充颜色
-        ctx.fillStyle = gradient;
-        ctx.fill();
-        const newStyle = new Style({
-          image: new Icon({
-            src: canvas.toDataURL(),
-            displacement: [0, 56],
-          }),
-        });
-
-
-        return [style2, newStyle, style3];
-      },
-    });
-  }
-
-  initMap(location, target, isCapital) {
-    let level = 16;
-    let coordinate = util.wktCastGeom(location).getFirstCoordinate();
-    this.kmap = new KMap.Map(target, level, coordinate[0], coordinate[1], null, 6, 22, isCapital ? "img" : "vec");
-    this.kmap.addLayer(this.clickPointLayer.layer);
-    this.kmap.addLayer(this.gardenHallLayer.layer);
-    if (isCapital) {
-      this.initData()
-      const point = ["113.61652616170711,23.58399613872042", "113.61767554789421, 23.590079887444034", "113.62757101477101, 23.590796948574365", "113.62240816252164, 23.59499176519138"]
-    } else {
-      let point = new Feature(new Point(coordinate))
-      this.clickPointLayer.addFeature(point)
-    }
-    
-    // 添加点击事件
-    this.addGardenHallClick();
-  }
-
-  // 添加服务大厅图层点击事件
-  addGardenHallClick() {
-    let that = this;
-    this.kmap.on("singleclick", (evt) => {
-      that.kmap.map.forEachFeatureAtPixel(evt.pixel, function (feature, layer) {
-        if (layer instanceof VectorLayer && layer.get("name") === "gardenHallLayer") {
-          // 获取点击的要素数据
-          const featureData = feature.getProperties();
-          // 触发点击事件回调
-          if (that.onGardenHallClick) {
-            that.onGardenHallClick(featureData, evt);
-          }
-          return feature;
-        }
-      });
-    });
-  }
-
-  // 设置点击事件回调
-  setGardenHallClickCallback(callback) {
-    this.onGardenHallClick = callback;
-  }
-
-  initDataHall(taskList) {
-    this.gardenHallLayer.source.clear();
-    if (taskList.length > 0) {  // 如果任务列表不为空,则添加任务点
-      for (let item of taskList) {
-        try{
-          this.gardenHallLayer.source.addFeature(newPoint(item, "point", "hallGarden"))
-        }catch(error){
-          console.log('error');
-        }
-      }
-      this.kmap.getView().fit(this.gardenHallLayer.source.getExtent(), { padding: [60, 40, 30, 40] });
-      const finalZoom = this.kmap.getView().getZoom();
-      if (finalZoom > 18) {
-        this.kmap.getView().setZoom(18);
-      }
-    }
-  }
-}
-
-export default IndexMap;

+ 0 - 80
src/views/old_mini/agri_work/components/infoText.vue

@@ -1,80 +0,0 @@
-<template>
-    <div class="box-wrap farm-data">
-        <div class="card-title">秋梢防虫<span class="type-tag">标准农事</span></div>
-        <div class="data-content">
-            <div class="form-item">
-                <div class="item-name">农事编号</div>
-                <div class="item-text">BZ-YY-04-SQYY-20</div>
-            </div>
-            <div class="form-item">
-                <div class="item-name">服务亩数</div>
-                <div class="item-text">100亩</div>
-            </div>
-            <div class="form-item">
-                <div class="item-name">服务区域</div>
-                <div class="item-text">广州市从化区荔枝博览园</div>
-            </div>
-            <div class="form-item">
-                <div class="item-name">触发条件</div>
-                <div class="item-text">单数花带叶40%</div>
-            </div>
-            <div class="form-item">
-                <div class="item-name">执行时间</div>
-                <div class="item-text">2025.02.18</div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup></script>
-
-<style lang="scss" scoped>
-.box-wrap {
-    background: #fff;
-    padding: 10px;
-    border-radius: 8px;
-}
-.farm-data {
-    margin-top: 10px;
-    .data-content {
-        margin-top: 8px;
-        border-top: 1px solid #f5f5f5;
-        padding: 8px 0;
-    }
-
-    .form-item {
-        display: flex;
-        align-items: center;
-        font-size: 14px;
-        color: #767676;
-        height: 24px;
-        .item-name {
-            width: 80px;
-            color: rgba(0, 0, 0, 0.2);
-        }
-    }
-    .form-item + .form-item {
-        padding-top: 2px;
-    }
-}
-
-.card-title {
-    font-size: 16px;
-    font-weight: bold;
-    color: #000;
-    display: flex;
-    align-items: center;
-
-    .type-tag {
-        margin-left: 5px;
-        font-size: 12px;
-        color: #000000;
-        padding: 0 10px;
-        background: rgba(119, 119, 119, 0.1);
-        border-radius: 20px;
-        font-weight: normal;
-        height: 26px;
-        line-height: 26px;
-    }
-}
-</style>

+ 0 - 213
src/views/old_mini/agri_work/components/prescriptionTable.vue

@@ -1,213 +0,0 @@
-<template>
-    <div class="box-wrap farm-table">
-        <div class="card-title">药物处方</div>
-        <div class="table-item">
-            <div class="form-item">
-                <div class="item-name">施用方式</div>
-                <div class="item-text">{{ usageMode }}</div>
-            </div>
-        </div>
-        <div class="new-wrap">
-            <div class="new-title">
-                <div class="title-1"><div class="table-name">药肥类型</div></div>
-                <div class="title-2"><div class="table-name">药肥名称</div></div>
-                <div class="title-3"><div class="table-name">执行方式</div></div>
-                <div class="title-4"><div class="table-name">亩兑水量</div></div>
-                <div class="title-5"><div class="table-name">单亩用量</div></div>
-            </div>
-            <div
-                class="new-table-wrap"
-                v-for="(prescriptionItem, prescriptionI) in prescriptionList"
-                :key="prescriptionI"
-            >
-                <div
-                    class="new-prescription"
-                    v-for="(subP, subI) in prescriptionItem.pesticideFertilizerList"
-                    :key="subI"
-                >
-                    <div class="new-table">
-                        <div class="line-l">
-                            <div class="line-1 title-1">{{ subP.typeName }}</div>
-                            <div class="line-2">{{ subP.name }}</div>
-                        </div>
-                        <div class="line-r" :class="{ 'has-border': usageMode === '叶面施' }">
-                            <div class="line-3">
-                                <div
-                                    class="sub-line title-3"
-                                    :class="{ 'execute-line': usageMode === '叶面施' }"
-                                >
-                                    人工
-                                </div>
-                                <div class="sub-line title-4">{{ subP.ratio }}{{ subP.unit || 'kg' }}</div>
-                                <div class="sub-line title-5">{{ subP.dosage }}{{ subP.unit || 'kg' }}</div>
-                            </div>
-                            <div class="line-4" v-if="usageMode === '叶面施'">
-                                <div class="sub-line title-3 execute-line">无人机</div>
-                                <div class="sub-line title-4">
-                                    {{ subP.ratio2 ? subP.ratio2 + subP.unit : "---" }}
-                                </div>
-                                <div class="sub-line title-5">
-                                    {{ subP.muUsage2 ? subP.muUsage2 + subP.unit : "---" }}
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="note-text" v-if="subP.remark">{{ subP.remark }}</div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { ref } from 'vue';
-const props = defineProps({
-    prescriptionList: {
-        type: Array,
-        default: () => [],
-    },
-    usageMode: {
-        type: String,
-        default: "",
-    },
-});
-
-</script>
-
-<style lang="scss" scoped>
-.box-wrap {
-    background: #fff;
-    padding: 10px;
-    border-radius: 8px;
-}
-
-.card-title {
-    font-size: 16px;
-    font-weight: bold;
-    color: #000;
-    display: flex;
-    align-items: center;
-
-    .type-tag {
-        margin-left: 5px;
-        font-size: 12px;
-        color: #000000;
-        padding: 0 10px;
-        background: rgba(119, 119, 119, 0.1);
-        border-radius: 20px;
-        font-weight: normal;
-        height: 26px;
-        line-height: 26px;
-    }
-}
-.farm-table {
-    margin-top: 10px;
-    .table-item {
-        padding: 10px 0 12px 0;
-    }
-
-    
-        .form-item {
-            display: flex;
-            align-items: center;
-            font-size: 14px;
-            color: #767676;
-            height: 24px;
-            .item-name {
-                width: 80px;
-                color: rgba(0, 0, 0, 0.2);
-            }
-        }
-}
-
-.new-wrap {
-    border-radius: 5px;
-    text-align: center;
-    border: 1px solid rgba(225, 225, 225, 0.5);
-    .new-title {
-        background: rgba(241, 241, 241, 0.4);
-        border-radius: 5px 5px 0 0;
-        border-bottom: 1px solid rgba(225, 225, 225, 0.5);
-        display: flex;
-        color: #767676;
-        // justify-content: space-around;
-        padding: 5px 6px;
-        font-size: 12px;
-        .table-name {
-            width: 24px;
-            font-size: 12px;
-            margin: 0 auto;
-        }
-    }
-
-    .title-1 {
-        width: 46px;
-    }
-    .title-2 {
-        flex: 1;
-    }
-    .title-3 {
-        width: 52px;
-    }
-    .title-4 {
-        width: 56px;
-    }
-    .title-5 {
-        width: 52px;
-    }
-    .new-table-wrap {
-        padding: 5px;
-        .new-prescription {
-            .new-table {
-                display: flex;
-                align-items: center;
-                border: 1px solid rgba(225, 225, 225, 0.8);
-                background: #fff;
-                border-radius: 5px;
-                color: rgba(0, 0, 0, 0.6);
-                font-size: 11px;
-                .line-l {
-                    display: flex;
-                    flex: 1;
-                    .line-2 {
-                        flex: 1;
-                        padding: 0 2px;
-                    }
-                }
-                .line-r {
-                    &.has-border {
-                        border-left: 1px solid rgba(225, 225, 225, 0.8);
-                    }
-                    .line-3 {
-                        display: flex;
-                        align-items: center;
-                    }
-                    .sub-line {
-                        padding: 10px 0;
-                    }
-                    .line-4 {
-                        display: flex;
-                        align-items: center;
-                        border-top: 1px solid rgba(225, 225, 225, 0.8);
-                    }
-                    .execute-line {
-                        border-right: 1px solid rgba(225, 225, 225, 0.8);
-                    }
-                }
-            }
-            .note-text {
-                margin: 8px 0 4px 0;
-                color: rgba(0, 0, 0, 0.4);
-                background: #fff;
-                padding: 6px 8px;
-                border-radius: 5px;
-                text-align: left;
-                font-size: 11px;
-            }
-        }
-        .new-prescription + .new-prescription {
-            padding-top: 8px;
-        }
-    }
-}
-</style>

+ 0 - 237
src/views/old_mini/agri_work/components/priceTable.vue

@@ -1,237 +0,0 @@
-<template>
-    <div class="farm-table">
-        <div class="new-wrap" v-if="(isArrList && prescriptionData?.length && prescriptionData[0]?.pesticideFertilizerList?.length > 0) || prescriptionData?.pesticideFertilizerList?.length">
-            <div class="new-title">
-                <div class="title-2"><div class="table-name">药肥名称</div></div>
-                <div class="title-3"><div class="table-name">药肥品牌</div></div>
-                <div class="title-4"><div class="table-name">药肥单价</div></div>
-                <div class="title-5"><div class="table-name">单亩用量</div></div>
-                <div class="title-6" v-if="area"><div class="table-name line-center">总价</div></div>
-            </div>
-            
-            <template v-if="isArrList && prescriptionData?.length">
-                <div
-                class="new-table-wrap"
-                v-for="(prescriptionItem, prescriptionI) in prescriptionData || []"
-                :key="prescriptionI"
-            >
-                <div
-                    class="new-prescription"
-                    v-for="(subP, subI) in prescriptionItem?.pesticideFertilizerList || []"
-                    :key="subI"
-                >
-                    <div class="new-table">
-                        <div class="line-l">
-                            <div class="line-2">{{ subP.defaultName || subP.pesticideFertilizerName }}</div>
-                            <div class="title-3">{{ subP.brand }}</div>
-                            <div class="title-4">{{ subP.price }}</div>
-                            <div class="title-5">{{ subP.dosage }}</div>
-                            <div class="title-6" v-if="area">¥{{ subP.total }}</div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            </template>
-            <template v-else-if="prescriptionData?.pesticideFertilizerList?.length">
-                <div
-                    class="new-prescription"
-                    v-for="(subP, subI) in prescriptionData?.pesticideFertilizerList || []"
-                    :key="subI"
-                >
-                    <div class="new-table">
-                        <div class="line-l">
-                            <div class="line-2">{{ subP.name || subP.defaultName || subP.pesticideFertilizerName }}</div>
-                            <div class="title-3">{{ subP.brand ? subP.brand : '--' }}</div>
-                            <div class="title-4">{{ subP.price ? (subP.price + '元/' + subP.unit) : '--' }}</div>
-                            <div class="title-5">{{ subP.dosage ? (subP.dosage + subP.unit) : '--' }}</div>
-                            <div class="title-6" v-if="area">¥{{ getTotal(subP) }}</div>
-                        </div>
-                    </div>
-                </div>
-            </template>
-        </div>
-
-        <slot name="bottomContent"></slot>
-    </div>
-</template>
-
-<script setup>
-
-const props = defineProps({
-    prescriptionData: {
-        default: () => ({}),
-    },
-    // 面积(亩数),用于计算总价:单价 * 用量 * 面积
-    area: {
-        type: [Number, String],
-        default: null,
-    },
-    isArrList: {
-        type: Boolean,
-        default: false,
-    },
-});
-
-// 计算单个药肥的总价:单价 * 用量 * 面积
-const getTotal = (item) => {
-    const price = Number(item?.price ?? 0);
-    const dosage = Number(item?.dosage ?? 0);
-    const area = props.area != null ? Number(props.area) : Number(item?.area ?? 0);
-
-    // 如果有现成的 total 字段且无法计算,则退回使用 total
-    if (!price || !dosage || !area) {
-        return item?.total ?? "--";
-    }
-
-    return (price * dosage * area).toFixed(2);
-};
-</script>
-
-<style lang="scss" scoped>
-.box-wrap {
-    background: #fff;
-    padding: 10px;
-    border-radius: 8px;
-}
-
-.card-title {
-    font-size: 16px;
-    font-weight: bold;
-    color: #000;
-    display: flex;
-    align-items: center;
-
-    .type-tag {
-        margin-left: 5px;
-        font-size: 12px;
-        color: #000000;
-        padding: 0 10px;
-        background: rgba(119, 119, 119, 0.1);
-        border-radius: 20px;
-        font-weight: normal;
-        height: 26px;
-        line-height: 26px;
-    }
-}
-.farm-table {
-    .table-item {
-        padding: 10px 0 12px 0;
-    }
-
-    .form-item {
-        display: flex;
-        align-items: center;
-        font-size: 14px;
-        color: #767676;
-        height: 24px;
-        .item-name {
-            width: 80px;
-            color: rgba(0, 0, 0, 0.2);
-        }
-    }
-}
-
-.new-wrap {
-    border-radius: 5px;
-    text-align: center;
-    border: 1px solid rgba(225, 225, 225, 0.5);
-    .new-title {
-        background: rgba(241, 241, 241, 0.4);
-        border-radius: 5px 5px 0 0;
-        border-bottom: 1px solid rgba(225, 225, 225, 0.5);
-        display: flex;
-        color: #767676;
-        // justify-content: space-around;
-        padding: 3px 0px;
-        font-size: 12px;
-        .table-name {
-            width: 24px;
-            font-size: 12px;
-            margin: 0 auto;
-        }
-        .line-center {
-            line-height: 34px;
-        }
-    }
-
-    .title-1 {
-        width: 40px;
-    }
-    .title-2 {
-        flex: 1;
-    }
-    .title-3 {
-        width: 52px;
-    }
-    .title-4 {
-        width: 66px;
-    }
-    .title-5 {
-        width: 52px;
-    }
-    .title-6 {
-        width: 60px;
-    }
-    .new-table-wrap {
-        padding: 5px;
-    }
-    .new-prescription {
-        .new-table {
-            display: flex;
-            align-items: center;
-            background: #fff;
-            border-radius: 5px;
-            color: rgba(0, 0, 0, 0.6);
-            font-size: 11px;
-            min-height: 45px;
-            .line-l {
-                display: flex;
-                align-items: center;
-                flex: 1;
-                .line-2 {
-                    flex: 1;
-                    padding: 0 2px;
-                }
-            }
-            .line-r {
-                &.has-border {
-                    border-left: 1px solid rgba(225, 225, 225, 0.8);
-                }
-                .line-3 {
-                    display: flex;
-                    align-items: center;
-                }
-                .sub-line {
-                    padding: 10px 0;
-                }
-                .line-4 {
-                    display: flex;
-                    align-items: center;
-                    border-top: 1px solid rgba(225, 225, 225, 0.8);
-                }
-                .execute-line {
-                    border-right: 1px solid rgba(225, 225, 225, 0.8);
-                }
-            }
-        }
-        .note-text {
-            margin: 8px 0 4px 0;
-            color: rgba(0, 0, 0, 0.4);
-            background: #fff;
-            padding: 6px 8px;
-            border-radius: 5px;
-            text-align: left;
-            font-size: 11px;
-        }
-    }
-    .new-prescription + .new-prescription {
-        // padding-top: 8px;
-        .new-table {
-            border-top: 1px solid rgba(0, 0, 0, 0.08);
-        }
-    }
-    .new-table-wrap + .new-table-wrap {
-        border-top: 1px solid rgba(0, 0, 0, 0.08);
-    }
-}
-</style>

+ 0 - 13
src/views/old_mini/agri_work/expertIndex.vue

@@ -1,13 +0,0 @@
-<template>
-    <div>
-
-    </div>
-</template>
-
-<script setup>
-
-</script>
-
-<style lang="scss" scoped>
-
-</style>

+ 0 - 13
src/views/old_mini/agri_work/farmerIndex.vue

@@ -1,13 +0,0 @@
-<template>
-    <div>
-
-    </div>
-</template>
-
-<script setup>
-
-</script>
-
-<style lang="scss" scoped>
-
-</style>

+ 0 - 439
src/views/old_mini/agri_work/newFarmMap.js

@@ -1,439 +0,0 @@
-
-import config from "@/api/config.js"
-import * as KMap from '@/utils/ol-map/KMap';
-import Style from "ol/style/Style";
-import * as util from "@/common/ol_common.js"
-import { newAreaFeature, newAreaPoint, newPolymerFeature, newPoint } from "@/utils/map";
-import { GARDEN_STATUS_ENUM as STATUS_ENUM } from "@/api/enum.js"
-import { Point } from 'ol/geom';
-import Feature from "ol/Feature";
-import Icon from "ol/style/Icon";
-import eventBus from '@/api/eventBus';
-import VectorLayer from "ol/layer/Vector.js";
-import { getArea } from 'ol/sphere.js';
-import * as proj from "ol/proj";
-import { register } from "ol/proj/proj4";
-import proj4 from "proj4"
-proj4.defs("EPSG:38572", "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs");
-register(proj4);
-
-/**
- * @description 智能巡园地图层对象
- */
-class EditNsMap {
-
-    constructor() {
-        let that = this
-        this.vectorStyle = new KMap.VectorStyle()
-        let pointSimpleStyle = this.vectorStyle.getPointSimpleStyle(8, "#999999", "#d5d5d0", "1")
-        this.areaLayer = new KMap.VectorLayer("areaLayer", 999, { style: (f) => that.vectorStyle.getPolygonStyle("#2199F81a", "#2199F833", 3) })
-        this.subAreaLayer = new KMap.VectorLayer("subAreaLayer", 1000, {
-            style: (f) => {
-                return that.vectorStyle.getPolygonStyle(f.get("fillColor"), f.get("strokeColor"), 2)
-            }
-        })
-        this.afterDayNum = 3
-        this.areaPointLayer = new KMap.VectorLayer("areaPointLayer", 1002, { style: (f) => that.vectorStyle.getPointTextStyle(f.get("name"), "#120046", "#FFFFFF", 2, 13) })
-        this.treeCacheStyle = {}
-        this.treeStyle = (f) => {
-            let key = f.get("imgSrc");
-            if (that.treeCacheStyle[key]) {
-                return that.treeCacheStyle[key]
-            }
-            let style = new Style({
-                image: new Icon({
-                    src: f.get("imgSrc"),
-                    scale: 1,
-                    anchor: [0.5, 1],
-                })
-            });
-            that.treeCacheStyle[key] = style
-            return style
-        }
-        this.treeLayer = new KMap.VectorLayer("statusPointLayer", 999, { style: that.treeStyle })
-        this.treeFeatures = []
-
-        this.curArea = null
-        this.blueRegionLayer = new KMap.VectorLayer("blueRegionLayer", 99, {
-            minZoom: 1,
-            maxZoom: 22,
-            style: function (f) {
-                const selected = f.get('selected');
-                if (selected) {
-                    return that.vectorStyle.getPolygonStyle("rgba(23, 99, 110, 0.43)", "rgba(37, 227, 255, 0.7)", 2)
-                }
-                return that.vectorStyle.getPolygonStyle("rgba(0, 0, 0, 0.5)", "rgba(255, 255, 255, 0.2)", 1)
-            }
-        });
-
-        this.areaVal = 0
-
-        // 位置图标
-        this.clickPointLayer = new KMap.VectorLayer("clickPointLayer", 9999, {
-            style: (f) => {
-                return new Style({
-                    image: new Icon({
-                        src: require("@/assets/img/home/garden-point.png"),
-                        scale: 0.5,
-                        anchor: [0.5, 1],
-                    }),
-                });
-            },
-        });
-    }
-
-    initMap(location, target, movable = true) {
-        let level = 18
-        let coordinate = util.wktCastGeom(location).getFirstCoordinate()
-        this.kmap = new KMap.Map(target, level, coordinate[0], coordinate[1], null, 10, 22, "img", movable, movable);
-        let xyz2 = config.base_img_url3 + 'map/lby/{z}/{x}/{y}.png';
-        this.kmap.addXYZLayer(xyz2, { minZoom: 12, maxZoom: 26 });
-        this.kmap.addLayer(this.areaLayer.layer)
-        this.kmap.addLayer(this.subAreaLayer.layer)
-        this.kmap.addLayer(this.treeLayer.layer)
-        this.kmap.addLayer(this.areaPointLayer.layer)
-        this.kmap.addLayer(this.blueRegionLayer.layer)
-
-        this.addMapSingerClick()
-
-        this.kmap.addLayer(this.clickPointLayer.layer);
-    }
-
-    destroyMap() {
-        // 销毁地图实例
-        if (this.kmap) {
-            this.kmap.destroy()
-        }
-    }
-
-    setMapPoint(coordinate) {
-        this.clickPointLayer.source.clear()
-        let point = new Feature(new Point(coordinate))
-        this.clickPointLayer.addFeature(point)
-    }
-
-    initArea(data, callback) {
-        let that = this
-        this.areaLayer.refresh()
-        for (let item of data) {
-            that.areaLayer.addFeature(newAreaFeature(item))
-            that.areaPointLayer.addFeature(newAreaPoint(item))
-        }
-        callback && callback()
-    }
-
-    initSubArea(organId, callback) {
-        let that = this
-        this.subAreaLayer.refresh()
-        VE_API.sub_area.list({ organId }).then(({ data, code }) => {
-            for (let item of data) {
-                // item.fillColor = that.handleStatusColor(item.status).fillColor
-                // item.strokeColor = that.handleStatusColor(item.status).strokeColor
-                that.subAreaLayer.addFeature(newPolymerFeature(item))
-            }
-            callback && callback()
-        })
-    }
-
-
-    initTree(organId, callback) {
-        let that = this
-        this.treeLayer.refresh()
-        that.treeFeatures = []
-        VE_API.sub_area.treeList({ farmId: organId }).then(({ data }) => {
-            for (let item of data) {
-                let result = that.handleStatusIcon(item)
-                if (result.hasStatus) {
-                    item.imgSrc = result.imgSrc
-                    let point = newPoint(item);
-                    that.treeLayer.addFeature(point)
-                    that.treeFeatures.push(point)
-                }
-            }
-            callback && callback()
-        })
-    }
-
-    getBlueRegion({ gardenId, regionId }, callback) {
-        this.blueRegionLayer.source && this.blueRegionLayer.source.clear()
-        const data = [
-            {
-                "farmCode": "LBY",
-                "farmId": "766",
-                "id": 2,
-                "isGenerateReport": 1,
-                "name": "",
-                "pointCount": 131,
-                "pointWkt": "POINT (113.6142086995688 23.585836479509055)",
-                "regionCode": "LBY-MR-2",
-                "wkt": "MULTIPOLYGON (((113.61348988377155 23.58617369800422, 113.61395837633405 23.58622555407246, 113.61414076654707 23.58622555407246, 113.61436964832843 23.5862774101407, 113.61478628474084 23.586468741036786, 113.61491681896747 23.58652417337007, 113.61512424307672 23.586449071517652, 113.61491503077356 23.585742756367924, 113.61479880177082 23.585596129050916, 113.61473800497858 23.585451289764112, 113.61438931780664 23.585286780835393, 113.61410858003889 23.585299297865365, 113.61385645239149 23.585249229909184, 113.61378135053907 23.585288569029306, 113.61357571446003 23.585283204611276, 113.61347200232355 23.585342213209604, 113.61338080721704 23.585506721974614, 113.61335934954492 23.585665866485304, 113.61342193444922 23.58616296916816, 113.61348988377155 23.58617369800422)))"
-            },
-            // {
-            //     "farmCode": "LBY",
-            //     "farmId": "766",
-            //     "id": 9,
-            //     "isGenerateReport": 1,
-            //     "name": "分区9",
-            //     "pointCount": 63,
-            //     "pointWkt": "POINT (113.61725048541882 23.585262743588892)",
-            //     "regionCode": "LBY-MR-9",
-            //     "wkt": "MULTIPOLYGON (((113.61697301904715 23.585749021838886, 113.617320420354 23.585742359348075, 113.61752600578478 23.585708095109652, 113.61772112158744 23.5856785897931, 113.61789720170187 23.58559102562808, 113.61787340709186 23.585330236701996, 113.61793812843106 23.58526932250014, 113.61795526055036 23.585167481569073, 113.61793146594025 23.585022810339957, 113.61790671954574 23.58491525870246, 113.61779345720193 23.58473346788171, 113.61779821612386 23.584601169849783, 113.61771921801855 23.584509798547092, 113.61763260563801 23.584517412822354, 113.61755741467023 23.584640193010298, 113.61736515422085 23.584823887399946, 113.61726902399624 23.58487623554194, 113.61709484745067 23.584864814129187, 113.61707105284067 23.584962847922696, 113.61699586187265 23.585023762124397, 113.61689877986377 23.585071351344393, 113.61675981934107 23.58515796372515, 113.61663132844662 23.585192227963518, 113.61646000725422 23.58524076896813, 113.61634484134152 23.585320718857897, 113.61628392713976 23.585360693802862, 113.6162163504473 23.585397813394497, 113.61601552393823 23.585480618637533, 113.61596127222741 23.585499654325552, 113.61597174185577 23.585538677485918, 113.61598125969975 23.585561520311693, 113.61608690776846 23.585591025628073, 113.61610689524092 23.585611013100582, 113.61619350762157 23.58557960421532, 113.6162886860618 23.58552820785755, 113.61632104673151 23.585492040050294, 113.61638196093314 23.585453968674216, 113.61646095903859 23.585480618637543, 113.6164771393734 23.585505365031985, 113.61649617506146 23.585564375664962, 113.61648760900198 23.58561006131614, 113.61645048941011 23.58567192730245, 113.61649807863034 23.585676686224392, 113.61662466595578 23.585595784550236, 113.61671698904298 23.585495847187836, 113.61676553004737 23.585587218490588, 113.61681787818966 23.585559616742817, 113.61689211737293 23.5854558722431, 113.61695588692798 23.585499654325556, 113.61697301904715 23.585749021838886)))"
-            // },
-            // {
-            //     "farmCode": "LBY",
-            //     "farmId": "766",
-            //     "id": 29,
-            //     "isGenerateReport": 1,
-            //     "name": "分区8",
-            //     "pointCount": 40,
-            //     "pointWkt": "POINT (113.61587084394066 23.58618878122994)",
-            //     "regionCode": "LBY-MR-8",
-            //     "wkt": "MULTIPOLYGON (((113.61516876894466 23.58617727723074, 113.6153952936325 23.58616014511155, 113.61551426668275 23.586215348606817, 113.61564275757719 23.586290539574595, 113.61565798612749 23.58640951262483, 113.61577695917796 23.58637905552401, 113.61584168051715 23.586392380505654, 113.615912112563 23.58637048946448, 113.61613483011318 23.586200120056528, 113.6162547549478 23.586365730542376, 113.61623762282863 23.586448535785365, 113.61615196223237 23.586476137533136, 113.61634435485792 23.586946782901485, 113.61654695275945 23.586932042261843, 113.61651364030526 23.58667220511998, 113.61648127963554 23.586552280285296, 113.61640894402115 23.58641903046899, 113.61636135480092 23.586292443143435, 113.6163308977001 23.586121121951034, 113.61631471736528 23.58605735239606, 113.61618622647107 23.586071629162152, 113.61612911940675 23.58603260600161, 113.61610342122786 23.58595265611185, 113.61601109814079 23.585864140162432, 113.61585310193013 23.585803225960632, 113.61557898802205 23.585730890346124, 113.6153714990225 23.585723276070855, 113.61520493675204 23.585882224066058, 113.61516591359151 23.586056400611785, 113.61516876894466 23.58617727723074)))"
-            // },
-            // {
-            //     "farmCode": "LBY",
-            //     "farmId": "766",
-            //     "id": 12828,
-            //     "isGenerateReport": 1,
-            //     "name": "分区5",
-            //     "pointCount": 45,
-            //     "pointWkt": "POINT (113.61692837797158 23.58435388968608)",
-            //     "regionCode": "LBY-MR-5",
-            //     "wkt": "MULTIPOLYGON (((113.61726902399624 23.584875938109313, 113.61732981922493 23.584649032707855, 113.61741785928217 23.58458954618279, 113.6176284415812 23.584287354634938, 113.61761892373723 23.584146966435544, 113.61762249292879 23.584041080420736, 113.61758442155264 23.584010147427676, 113.61752374529698 23.583939953328095, 113.6174499820059 23.583857861923292, 113.61723702024568 23.5839113997961, 113.61706331959229 23.583947091711153, 113.61689794705232 23.583967317129648, 113.61673019505157 23.58399468093132, 113.61659218631306 23.584025613924393, 113.61641848565968 23.584054167456387, 113.61624716446725 23.584093428562902, 113.61621623147425 23.584286164904498, 113.61622218012678 23.584531249388036, 113.6162186109351 23.58466211974327, 113.61629713314835 23.584684724622857, 113.6166052733487 23.58470970896351, 113.61669926205845 23.584731124112597, 113.61678016373266 23.584778713332653, 113.61680276861217 23.584819164169826, 113.61683846052725 23.58481916416982, 113.61689080866942 23.584775144141148, 113.61697884872665 23.58482035390024, 113.61709484745067 23.584864516696555, 113.61726902399624 23.584875938109313)))"
-            // },
-            // {
-            //     "farmCode": "LBY",
-            //     "farmId": "766",
-            //     "id": 172047,
-            //     "isGenerateReport": 1,
-            //     "name": "认养分区",
-            //     "pointCount": null,
-            //     "pointWkt": "POINT (113.61573550741103 23.586606696698798)",
-            //     "regionCode": "LBY认养分区",
-            //     "wkt": "MULTIPOLYGON (((113.61553138381385 23.586555391814727, 113.61578836560238 23.586770495089638, 113.61593018147823 23.586692924660838, 113.61571507820327 23.5864349910878, 113.61553138381385 23.586555391814727)))"
-            // },
-            // {
-            //     "farmCode": "LBY",
-            //     "farmId": "766",
-            //     "id": 175094,
-            //     "isGenerateReport": 1,
-            //     "name": "12",
-            //     "pointCount": null,
-            //     "pointWkt": "POINT (113.61860504330416 23.583859757151316)",
-            //     "regionCode": "LBY-MR-12",
-            //     "wkt": "MULTIPOLYGON (((113.61790764544605 23.58437349638575, 113.61810434755591 23.58448136528483, 113.61834039008784 23.58457781277093, 113.61887973458238 23.58461715319288, 113.61901298439875 23.584476289101246, 113.61925029597637 23.584407760624345, 113.61937973865497 23.58437349638575, 113.61932390063691 23.584164103817216, 113.61923506742585 23.5838836446801, 113.61920587937084 23.583660292607078, 113.61927060071025 23.58345216908441, 113.61940004338908 23.5832846550295, 113.6191449651692 23.58325927411221, 113.61896095351813 23.583223740827805, 113.61884166320624 23.58314759807564, 113.61873379430745 23.58305115058954, 113.6185180565094 23.583087952919755, 113.61840257333529 23.58318947658927, 113.61825028783096 23.583260543158076, 113.61815510939073 23.583216126552543, 113.61807262140928 23.583183131360045, 113.61779216227194 23.583299883580025, 113.61792541208831 23.58360953077215, 113.61817668317042 23.583615876001545, 113.61831374012445 23.583843035212283, 113.61829216634476 23.583925523193727, 113.61821348550086 23.5839014113223, 113.6179825191524 23.583770699597665, 113.6178530764738 23.583793542423393, 113.61783784792328 23.583905218459847, 113.617946985868 23.58400166594589, 113.61795713823494 23.584085422973374, 113.61786703597829 23.58419963710162, 113.61785815265716 23.58428847031246, 113.61790764544605 23.58437349638575)))"
-            // },
-            // {
-            //     "farmCode": "LBY",
-            //     "farmId": "766",
-            //     "id": 175095,
-            //     "isGenerateReport": 1,
-            //     "name": "13",
-            //     "pointCount": null,
-            //     "pointWkt": "POINT (113.61907779775447 23.582774628335315)",
-            //     "regionCode": "LBY-MR-13",
-            //     "wkt": "MULTIPOLYGON (((113.6185180565094 23.583087952919755, 113.61873379430756 23.58305115058954, 113.61884166320624 23.58314759807564, 113.61896095351813 23.583223740827805, 113.6191449651692 23.58325927411221, 113.61940004338908 23.5832846550295, 113.61952853428329 23.58303148037845, 113.61974554112703 23.582682175502953, 113.61942574156774 23.58233191884284, 113.61909737594897 23.58227005285653, 113.61872713181651 23.58242614549863, 113.61843207865172 23.58267265765886, 113.61843112686734 23.583051467850964, 113.6185180565094 23.583087952919755)))"
-            // },
-            // {
-            //     "farmCode": "LBY",
-            //     "farmId": "766",
-            //     "id": 175096,
-            //     "isGenerateReport": 1,
-            //     "name": "15",
-            //     "pointCount": null,
-            //     "pointWkt": "POINT (113.61729343325402 23.581078231145653)",
-            //     "regionCode": "LBY-MR-15",
-            //     "wkt": "MULTIPOLYGON (((113.61579634969576 23.580895993441118, 113.61623258421344 23.58139885286704, 113.61657522659812 23.581547965756727, 113.61743341886756 23.5818731587608, 113.61737155288142 23.58216345300349, 113.61798704012836 23.582252286214498, 113.61852479831566 23.58088806190449, 113.61799973058703 23.58035347633188, 113.61769991850042 23.580115530231183, 113.61644039047451 23.580399479244647, 113.61574558786083 23.580797642386187, 113.61579634969576 23.580895993441118)))"
-            // }
-        ]
-        for (let item of data) {
-            item.id = item.regionCode
-            try {
-                let feature = newAreaFeature(item);
-                this.blueRegionLayer.addFeature(feature)
-            } catch {
-                console.log('error');
-            }
-        }
-        this.kmap.fit(this.blueRegionLayer.source.getExtent(), [0, 0, 0, 0])
-        callback && callback(data.length)
-        // VE_API.farm.blueRegionList({ farmId: gardenId, regionId }).then(({ data, code }) => {
-        // })
-    }
-
-    setBlueRegion(data) {
-        this.blueRegionLayer.source.getFeatures().forEach(feature => {
-            // 检查 feature 的属性中是否有 selected 属性且为 true
-            data.map(item => {
-                if (item.id === feature.get('id')) {
-                    feature.set('selected', true)
-                }
-            })
-        });
-    }
-
-    toggleAllArea(val) {
-        let that = this
-        that.areaVal = 0
-        this.blueRegionLayer.source.getFeatures().forEach(feature => {
-            feature.set('selected', val)
-            if (val === true) {
-                let geom = feature.getGeometry().clone()
-                geom.transform(proj.get("EPSG:4326"), proj.get("EPSG:38572"))
-                let areaItem = getArea(geom)
-                areaItem = (areaItem + areaItem / 2) / 1000;
-                that.areaVal += areaItem
-            }
-            eventBus.emit("editNsMap:areaVal", that.areaVal)
-        });
-
-    }
-
-    // 状态图例
-    handleStatusIcon(obj) {
-        let key = this.afterDayNum == 3 ? "ycStatus" : this.afterDayNum == 5 ? "ycStatus5d" : "ycStatus7d"
-        let hasStatus = false
-        let imgSrc = null
-        if (obj[key] == 3) {
-            hasStatus = true
-            imgSrc = require('@/assets/img/status/status_bcyc.png')
-            return { hasStatus, imgSrc }
-        }
-        if (obj[key] == 2) {
-            hasStatus = true
-            imgSrc = require('@/assets/img/status/status_szyc.png')
-            return { hasStatus, imgSrc }
-        }
-        // if (obj[key] == 1) {
-        //     hasStatus = true
-        //     imgSrc = require('@/assets/status/status_dfh.png')
-        //     return { hasStatus, imgSrc }
-        // }
-        // if (obj[key] == 0) {
-        //     hasStatus = true
-        //     imgSrc = require('@/assets/status/status_xfdw.png')
-        //     return { hasStatus, imgSrc }
-        // }
-        return { hasStatus, imgSrc }
-    }
-
-    // 区级颜色
-    handleStatusColor(key) {
-        let fillColor = '#ffffff00'
-        let strokeColor = '#ffffff'
-        switch (key) {
-            case STATUS_ENUM.DONE:
-                fillColor = 'rgba(95,255,197,0)'
-                strokeColor = '#ffffff'
-                break;
-            case STATUS_ENUM.ABNORMAL_GROWTH:
-                fillColor = 'rgba(255,189,5,0.2)'
-                strokeColor = '#FFE44E'
-                break;
-            case STATUS_ENUM.ABNORMAL_Pest:
-                fillColor = 'rgba(51,11,3,0.52)'
-                strokeColor = '#F55A5A'
-                break;
-            case STATUS_ENUM.PENDING_REVIEW:
-                fillColor = 'rgba(3,40,51,0.2)'
-                strokeColor = '#032833'
-                break;
-            case STATUS_ENUM.REVIEWED:
-                fillColor = 'rgba(95,255,197,0.1)'
-                strokeColor = '#5FFFC5'
-                break;
-            default:
-                break;
-        }
-        return { fillColor, strokeColor }
-    }
-
-    addToggleTreeSelect(listener) {
-        let that = this
-        this.treeLayer.addToggleSelect(function ({ deselected, selected, preventDefault }) {
-            if (selected.length > 0) {
-                listener && listener(selected[0], deselected[0])
-            }
-            preventDefault()
-        }, this.kmap.map, that.treeStyle)
-    }
-
-    addToggleSubAreaSelect(listener) {
-        let that = this
-        this.subAreaLayer.addToggleSelect(function ({ deselected, selected, preventDefault }) {
-            if (selected.length > 0) {
-                that.treeLayer.source.forEachFeature((f) => {
-                    if (f.get("subAreaId") == selected[0].get("id")) {
-                        that.treeLayer.toggleSelect.getFeatures().remove(f)
-                    }
-                })
-                that.treeLayer.source.forEachFeature((f) => {
-                    if (f.get("subAreaId") == selected[0].get("id")) {
-                        that.treeLayer.toggleSelect.getFeatures().push(f)
-                    }
-                })
-            }
-            if (deselected.length > 0) {
-                that.treeLayer.source.forEachFeature((f) => {
-                    if (f.get("subAreaId") == deselected[0].get("id")) {
-                        that.treeLayer.toggleSelect.getFeatures().remove(f)
-                    }
-                })
-            }
-            listener && listener(selected[0], deselected[0])
-            preventDefault()
-        }, this.kmap.map)
-    }
-
-    refreshTree(organId, day, callback) {
-        this.afterDayNum = day
-        this.initTree(organId, callback)
-
-    }
-    fit(geomOrExtent) {
-        this.kmap.fit(geomOrExtent)
-    }
-
-
-    addMapSingerClick() {
-        let that = this
-        this.kmap.on("singleclick", (evt) => {
-            that.kmap.map.forEachFeatureAtPixel(evt.pixel, function (feature, layer) {
-                if (layer instanceof VectorLayer && layer.get("name") === "blueRegionLayer") {
-                    feature.set('selected', feature.get("selected") ? false : true);
-
-                    let geom = feature.getGeometry().clone()
-                    geom.transform(proj.get("EPSG:4326"), proj.get("EPSG:38572"))
-                    let areaItem = getArea(geom)
-                    areaItem = (areaItem + areaItem / 2) / 1000;
-                    if (feature.get('selected') === true) {
-                        that.areaVal += areaItem
-                    } else {
-                        that.areaVal -= areaItem
-                    }
-                    eventBus.emit("editNsMap:areaVal", that.areaVal)
-                }
-            })
-        })
-    }
-
-    getSelectedBlueRegion() {
-        // 用于存储 selected 为 true 的 feature 的 id
-        const selectedFeatureIds = [];
-        // 遍历所有 features
-        this.blueRegionLayer.source.getFeatures().forEach(feature => {
-            // 检查 feature 的属性中是否有 selected 属性且为 true
-            if (feature.get('selected') === true) {
-                // 获取 feature 的 id
-                const id = feature.get('id');
-                // 将 id 添加到数组中
-                selectedFeatureIds.push({ id });
-            }
-        });
-        return selectedFeatureIds;
-    }
-
-
-}
-
-export default EditNsMap

+ 0 - 514
src/views/old_mini/agri_work/servicesIndex.vue

@@ -1,514 +0,0 @@
-<template>
-    <div class="completed-work">
-        <custom-header name="农事详情"></custom-header>
-        <div class="work-content" :class="{ hasBottom: curRole == 0 }">
-            <div class="step-wrap">
-                <farm-steps :currentStep="0" />
-            </div>
-            <div class="content-status">
-                <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>
-                </div>
-                <div class="status-l" v-if="status === 1">
-                    <div class="stauts-text">
-                        <el-icon color="#2199F8" size="16" class="status-icon"><Select /></el-icon>
-                        该农事已完成
-                    </div>
-                </div>
-            </div>
-
-            <div class="work-wrap">
-                <div class="box-wrap farm-info">
-                    <div class="info-title">
-                        <div class="sub-title">药肥费用</div>
-                        <div class="info-more">1582<span class="unit-text">元</span></div>
-                    </div>
-                    <div class="info-content">
-                        <price-table>
-                            <template #bottomContent>
-                                <div class="price-bottom">
-                                    <div class="info-title">
-                                        <div class="sub-title">服务费用</div>
-                                        <div class="info-more">1582<span class="unit-text">元</span></div>
-                                    </div>
-                                    <div class="price-info">
-                                        <div class="info-l">执行方式<span class="main-text">无人机</span></div>
-                                        <div class="info-c">亩单价<span class="main-text">500元/亩</span></div>
-                                        <div class="info-r">亩数<span class="main-text">10亩</span></div>
-                                    </div>
-                                    <div class="price-total">报价合计:<span class="main-val">1258</span>元</div>
-                                    <div class="bottom-btn">
-                                        <div class="btn second" @click="toPage">编辑报价</div>
-                                        <div class="btn primary">确定报价</div>
-                                    </div>
-                                </div>
-                            </template>
-                        </price-table>
-                    </div>
-                </div>
-
-                <div class="box-wrap work-map">
-                    <div class="map-content">
-                        <div class="map-dom" ref="areaRef"></div>
-                    </div>
-                    <div class="info-content">
-                        <div class="title-wrap">
-                            <div class="title-l">
-                                <div class="item-title">未命名农场</div>
-                                <div class="setting-text">设为特别关注</div>
-                            </div>
-                            <div class="title-r">最近服务过</div>
-                        </div>
-                        <div class="item-desc">
-                            <div class="desc-info">
-                                <div class="desc-info-item">
-                                    <span>农场品种:</span>
-                                    <span class="value">荔枝-桂味</span>
-                                </div>
-                                <div class="desc-info-item">
-                                    <span>农场面积:</span>
-                                    <span class="value">500亩</span>
-                                </div>
-                            </div>
-                            <div class="desc-info copy-info">
-                                <div class="address van-ellipsis">
-                                    <span>农场位置:</span>
-                                    <span class="value">广东省广州市从化区市从化区从广东省广州市从化区市从化区从</span>
-                                </div>
-                                <span class="copy-text">点击复制</span>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-
-                <info-text></info-text>
-
-                <prescription-table> </prescription-table>
-            </div>
-
-            <div class="fixed-btn" v-if="curRole == 0">{{ status === 0 ? "确认完成" : "立即复核" }}</div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import customHeader from "@/components/customHeader.vue";
-import { onMounted, ref } from "vue";
-import NewFarmMap from "./newFarmMap";
-import { useStore } from "vuex";
-import infoText from "./components/infoText.vue";
-import prescriptionTable from "./components/prescriptionTable.vue";
-import priceTable from "./components/priceTable.vue";
-import farmSteps from "@/components/farmSteps.vue";
-import { useRouter } from "vue-router";
-
-const router = useRouter();
-const store = useStore();
-
-// 角色
-// const curRole = store.state.app.curRole
-const curRole = 1;
-
-// 0:执行, 1: 复核
-const status = ref(0);
-
-// 地图
-const areaRef = ref(null);
-let newFarmMap = new NewFarmMap();
-onMounted(() => {
-    const point = store.state.home.miniUserLocationPoint;
-    newFarmMap.initMap(point, areaRef.value, false);
-    newFarmMap.setMapPoint([113.6142086995688, 23.585836479509055])
-
-    getAreaList(() => {
-        console.log("areaList.value", areaList.value);
-        newFarmMap.initArea(areaList.value);
-    });
-});
-
-// 农场分区列表
-const areaList = ref([]);
-const regionId = ref(null);
-const getAreaList = (callback) => {
-    const data = [
-        {
-            farmCode: "LBY",
-            farmId: "766",
-            id: 2,
-            isGenerateReport: 1,
-            name: "",
-            pointCount: 131,
-            pointWkt: "POINT (113.6142086995688 23.585836479509055)",
-            regionCode: "LBY-MR-2",
-            wkt: "MULTIPOLYGON (((113.61348988377155 23.58617369800422, 113.61395837633405 23.58622555407246, 113.61414076654707 23.58622555407246, 113.61436964832843 23.5862774101407, 113.61478628474084 23.586468741036786, 113.61491681896747 23.58652417337007, 113.61512424307672 23.586449071517652, 113.61491503077356 23.585742756367924, 113.61479880177082 23.585596129050916, 113.61473800497858 23.585451289764112, 113.61438931780664 23.585286780835393, 113.61410858003889 23.585299297865365, 113.61385645239149 23.585249229909184, 113.61378135053907 23.585288569029306, 113.61357571446003 23.585283204611276, 113.61347200232355 23.585342213209604, 113.61338080721704 23.585506721974614, 113.61335934954492 23.585665866485304, 113.61342193444922 23.58616296916816, 113.61348988377155 23.58617369800422)))",
-        },
-    ];
-    areaList.value = data;
-    regionId.value = (data && data.length && data[0].id) || "";
-    changeRegion(regionId.value);
-    callback && callback();
-    // VE_API.region.list({ farmId: gardenId.value }).then(({ data, code }) => {
-    // });
-};
-
-// 切换分区
-const gardenId = ref(null);
-const changeRegion = (e) => {
-    newFarmMap.getBlueRegion({ gardenId: gardenId.value, regionId: e }, () => {
-        // newFarmMap.setBlueRegion([{id: "ws0y1me7h94u"}, {id: "ws0y1me545tg"}])
-        // serveArea.value = "3.72亩"
-    });
-};
-
-function toPage() {
-    router.push("/price_detail")
-}
-</script>
-
-<style lang="scss" scoped>
-.completed-work {
-    height: 100vh;
-    position: relative;
-    overflow: auto;
-    font-size: 14px;
-    background: #f2f3f5;
-    .work-content {
-        height: calc(100% - 40px);
-        overflow: auto;
-        box-sizing: border-box;
-        &.hasBottom {
-            padding-bottom: 60px;
-        }
-        .work-wrap {
-            position: relative;
-            z-index: 3;
-            padding: 0 12px;
-            top: -16px;
-        }
-        .fixed-btn {
-            position: absolute;
-            z-index: 10;
-            bottom: 26px;
-            left: 50%;
-            transform: translateX(-50%);
-            padding: 0 60px;
-            height: 42px;
-            line-height: 42px;
-            background: linear-gradient(180deg, #70bffe, #2199f8);
-            border-radius: 20px;
-            color: #fff;
-            font-size: 16px;
-        }
-        .card-title {
-            font-size: 16px;
-            font-weight: bold;
-            color: #000;
-            display: flex;
-            align-items: center;
-
-            .type-tag {
-                margin-left: 5px;
-                font-size: 12px;
-                color: #000000;
-                padding: 0 10px;
-                background: rgba(119, 119, 119, 0.1);
-                border-radius: 20px;
-                font-weight: normal;
-                height: 26px;
-                line-height: 26px;
-            }
-        }
-        .box-wrap {
-            background: #fff;
-            padding: 10px;
-            border-radius: 8px;
-        }
-
-        .step-wrap {
-            padding: 18px 0;
-        }
-        .content-status {
-            position: relative;
-            padding: 26px 12px 20px 12px;
-            color: #fff;
-            z-index: 2;
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
-            &::after {
-                content: "";
-                z-index: -1;
-                position: absolute;
-                left: 0;
-                top: 0;
-                height: 144px;
-                background: #2199f8;
-                width: 100%;
-            }
-            .status-l {
-                .stauts-text {
-                    font-size: 22px;
-                    display: flex;
-                    align-items: center;
-                    .status-icon {
-                        width: 24px;
-                        height: 24px;
-                        background: #ffffff;
-                        border-radius: 50%;
-                        margin-right: 8px;
-                    }
-                }
-                .stauts-sub-text {
-                    color: rgba(255, 255, 255, 0.51);
-                    font-size: 14px;
-                }
-                .time-text {
-                    color: #ffff;
-                }
-            }
-            .status-r {
-                height: 32px;
-                line-height: 32px;
-                padding: 0 16px;
-                color: #2199f8;
-                font-size: 16px;
-                background: #fff;
-                border-radius: 20px;
-            }
-        }
-
-        .info-content {
-            padding-top: 8px;
-            position: relative;
-            .price-bottom {
-                padding-top: 8px;
-                .price-info {
-                    padding: 8px 0;
-                    display: flex;
-                    align-items: center;
-                    justify-content: space-between;
-                    color: rgba(0, 0, 0, 0.2);
-                    .main-text {
-                        padding-left: 6px;
-                        color: rgba(0, 0, 0, 0.8);
-                    }
-                    .info-c {
-                        flex: 1;
-                        text-align: center;
-                    }
-                }
-                .price-total {
-                    height: 38px;
-                    display: flex;
-                    align-items: center;
-                    justify-content: center;
-                    border: 1px solid rgba(33, 153, 248, 0.5);
-                    background: rgba(33, 153, 248, 0.1);
-                    color: #000000;
-                    border-radius: 4px;
-                    .main-val {
-                        font-size: 20px;
-                        font-weight: bold;
-                        color: #2199f8;
-                        padding-right: 2px;
-                    }
-                }
-                .bottom-btn {
-                    padding-top: 16px;
-                    display: flex;
-                    align-items: center;
-                    .btn {
-                        flex: 1;
-                        border-radius: 20px;
-                        height: 40px;
-                        display: flex;
-                        align-items: center;
-                        justify-content: center;
-                        font-size: 16px;
-                        box-sizing: border-box;
-                        &.second {
-                            border: 1px solid #999999;
-                            color: #666666;
-                        }
-                        &.primary {
-                            background: #2199f8;
-                            color: #fff;
-                        }
-                    }
-                    .btn + .btn {
-                        margin-left: 12px;
-                    }
-                }
-            }
-        }
-        .farm-info {
-            color: rgba(0, 0, 0, 0.6);
-            font-size: 14px;
-            margin-top: 14px;
-            .info-title {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                color: #000;
-                .sub-title {
-                    font-size: 14px;
-                    font-weight: bold;
-                }
-                .info-more {
-                    display: flex;
-                    align-items: center;
-                    font-size: 16px;
-                    font-weight: bold;
-                    .unit-text {
-                        font-size: 12px;
-                    }
-                }
-            }
-        }
-        .farm-photo {
-            margin-top: 10px;
-            .photo-list {
-                display: flex;
-                align-items: center;
-                width: 100%;
-                overflow: auto;
-                padding-bottom: 10px;
-                .photo-item {
-                    width: 92px;
-                    height: 92px;
-                    border-radius: 8px;
-                    object-fit: cover;
-                }
-                .img-item + .img-item {
-                    margin-left: 12px;
-                }
-            }
-            .list-text {
-                text-align: center;
-                color: rgba(0, 0, 0, 0.5);
-                padding-top: 2px;
-            }
-        }
-
-        .farm-data {
-            margin-top: 10px;
-            .data-content {
-                margin-top: 8px;
-                border-top: 1px solid #f5f5f5;
-                padding: 8px 0;
-            }
-        }
-
-        .form-item {
-            display: flex;
-            align-items: center;
-            font-size: 14px;
-            color: #767676;
-            height: 24px;
-            .item-name {
-                width: 80px;
-                color: rgba(0, 0, 0, 0.2);
-            }
-        }
-        .form-item + .form-item {
-            padding-top: 2px;
-        }
-
-        .farm-table {
-            .table-item {
-                padding: 10px 0 12px 0;
-            }
-        }
-
-        .work-map {
-            margin-top: 10px;
-            padding: 0 10px 10px;
-            .map-content {
-                padding-top: 8px;
-                .map-dom {
-                    height: 166px;
-                    width: 100%;
-                    clip-path: inset(0px round 8px);
-                }
-            }
-            .info-content {
-                .title-wrap {
-                    display: flex;
-                    align-items: center;
-                    justify-content: space-between;
-                    .title-l {
-                        display: flex;
-                        align-items: center;
-                        .setting-text {
-                            padding-left: 11px;
-                            font-size: 12px;
-                            color: #2199f8;
-                        }
-                    }
-                    
-                    .item-title {
-                        font-size: 16px;
-                        font-weight: 500;
-                        margin: 2px 0 5px 0;
-                    }
-                    .title-r {
-                        color: rgba(255, 131, 29, 0.36);
-                        font-size: 12px;
-                    }
-                }
-
-                .item-desc {
-                    font-size: 13px;
-                    color: #bbbbbb;
-                    line-height: 18px;
-                    .desc-info {
-                        display: flex;
-                        .desc-info-item {
-                            flex: 1;
-                            .value {
-                                color: #666666;
-                            }
-                        }
-                    }
-                    .copy-info {
-                        margin-top: 4px;
-                        .address {
-                            max-width: 80%;
-                            .value {
-                                color: #666666;
-                            }
-                        }
-                        .copy-text {
-                            margin-left: 8px;
-                            color: #2199f8;
-                        }
-                    }
-                    .report-text {
-                        margin-top: 10px;
-                        color: #ff953d;
-                        font-size: 12px;
-                        height: 32px;
-                        line-height: 32px;
-                        border-radius: 5px;
-                        display: flex;
-                        align-items: center;
-                        padding-left: 11px;
-                        background: linear-gradient(90deg, rgba(255, 149, 61, 0.1), rgba(255, 149, 61, 0));
-                        .done-icon {
-                            background: #ff953d;
-                            width: 10px;
-                            height: 10px;
-                            border-radius: 50%;
-                            margin-right: 5px;
-                        }
-                        .right-icon {
-                            margin-left: 10px;
-                        }
-                    }
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 531
src/views/old_mini/farm_manage/components/demandHall.vue

@@ -1,531 +0,0 @@
-<template>
-    <div class="demand-hall" :style="{ height: `calc(100vh - ${tabBarHeight}px - 50px)` }">
-        <!-- 地图 -->
-        <div class="map-container" ref="mapContainer"></div>
-
-        <div class="search-wrap">
-            <location-search
-                class="search"
-                user-location="113.61702297075017,23.584863449735067"
-                @change="handleLocationChange"
-            />
-        </div>
-
-        <floating-panel
-            class="floating-panel"
-            v-model:height="height"
-            :anchors="anchors"
-            :content-draggable="false"
-            @height-change="handleHeightChange"
-        >
-            <template #header>
-                <div class="header-bar"></div>
-                <div class="select-group">
-                    <el-select
-                        class="select-item"
-                        v-model="selectParma.farmWorkTypeId"
-                        placeholder="农事类型"
-                        @change="getSimpleList"
-                    >
-                        <el-option
-                            v-for="item in farmWorkTypeList"
-                            :key="item.id"
-                            :label="item.name"
-                            :value="item.id"
-                        />
-                    </el-select>
-                    <el-select
-                        class="select-item"
-                        v-model="selectParma.districtCode"
-                        placeholder="区域筛选"
-                        @change="getSimpleList"
-                    >
-                        <el-option
-                            v-for="item in districtList"
-                            :key="item.code"
-                            :label="item.name"
-                            :value="item.code"
-                        />
-                    </el-select>
-                </div>
-                <div class="user-btn" v-if="height === anchors[0]" @click.stop="toPage">
-                    <img class="user-icon" src="@/assets/img/home/user-icon.png" alt="" />
-                    新增用户
-                </div>
-            </template>
-            <div class="hall-content">
-                <div class="farm-list" ref="cardContentRef" :style="{ height: `${cardContentHeight}px` }">
-                    <div class="task-item" v-for="item in taskList" :key="item">
-                        <task-item :item-data="item" :isHall="true" @handleFollowSuccess="getSimpleList">
-                            <template #footer>
-                                <div class="item-footer">
-                                    <div class="footer-l" @click="toDetail(item)">查看详情</div>
-                                    <div class="footer-r">
-                                        <div class="btn second" @click="showIgnore(item)">
-                                            忽略
-                                        </div>
-                                        <div class="btn primary" @click="showPriceSheetPopup(item)">确认并报价</div>
-                                    </div>
-                                </div>
-                            </template>
-                        </task-item>
-                    </div>
-
-                    <div class="no-data" v-if="taskList.length === 0">暂无数据</div>
-                </div>
-            </div>
-        </floating-panel>
-    </div>
-    <!-- 服务报价单 -->
-    <price-sheet-popup ref="priceSheetPopupRef"></price-sheet-popup>
-
-    <popup v-model:show="showIgnorePopup" round class="task-tips-popup">
-            <img class="create-farm-icon" src="@/assets/img/home/create-farm-icon.png" alt="" />
-            <div class="create-farm-text">
-                <div>
-                    您确认忽略 <span class="main-text">{{ currentTask?.farmName }}</span> 的
-                    <span class="main-text">{{ currentTask?.farmWorkName }}</span> 农事吗
-                </div>
-            </div>
-        <div class="create-farm-btn" @click="handleIgnore">
-            确认忽略
-        </div>
-    </popup>
-</template>
-
-<script setup>
-import { FloatingPanel } from "vant";
-import { computed, nextTick, onActivated, onDeactivated, onMounted, ref } from "vue";
-import { useStore } from "vuex";
-import IndexMap from "../map/index";
-// import taskItem from "@/components/taskItem.vue";
-import priceSheetPopup from "@/components/popup/priceSheetPopup.vue";
-import { useRouter } from "vue-router";
-import LocationSearch from "@/components/pageComponents/LocationSearch.vue";
-import { Point } from "ol/geom";
-import Feature from "ol/Feature";
-import { Popup } from "vant";
-import { ElMessage } from "element-plus";
-const props = defineProps({
-    isCapital: {
-        type: Boolean,
-        default: false,
-    },
-});
-
-const store = useStore();
-const tabBarHeight = computed(() => store.state.home.tabBarHeight);
-const router = useRouter();
-// const tabBarHeight = ref(localStorage.getItem("tabBarHeight") * 1 || 50);
-
-const anchors = ref([310 + tabBarHeight.value, Math.round(1 * window.innerHeight) - 44]);
-const height = ref(anchors.value[0]);
-
-const indexMap = new IndexMap();
-const mapContainer = ref(null);
-const mapPoint = ref(null);
-
-onMounted(() => {
-    mapPoint.value = store.state.home.miniUserLocationPoint;
-    getFarmWorkTypeList();
-    getDistrictListByCity();
-    nextTick(() => {
-        indexMap.initMap(mapPoint.value, mapContainer.value, props.isCapital);
-        getStatisticsAreaByDistrict();
-    });
-});
-
-onActivated(() => {
-    showIgnorePopup.value = false;
-    getSimpleList();
-});
-onDeactivated(() => {
-    showIgnorePopup.value = false;
-});
-
-defineExpose({
-    getSimpleList,
-});
-
-//根据城市的坐标返回区县列表
-const districtList = ref([]);
-function getDistrictListByCity() {
-    VE_API.z_farm_work_record.getDistrictListByCity({ point: mapPoint.value }).then(({ data }) => {
-        districtList.value = data || [];
-        if(data.length > 0){
-            const cityCode = data[0].code.slice(0, -2);
-            districtList.value.unshift({ code: cityCode, name: data[0].cityName });
-            selectParma.value.districtCode = cityCode;
-            getSimpleList()
-        }else{
-            selectParma.value.districtCode = null;
-            getSimpleList()
-        }
-    });
-}
-
-//农事类型列表
-const farmWorkTypeList = ref([]);
-function getFarmWorkTypeList() {
-    VE_API.z_farm_work_record.getFarmWorkTypeList().then(({ data }) => {
-        farmWorkTypeList.value = data;
-        farmWorkTypeList.value.unshift({ id: 0, name: "全部" });
-    });
-}
-const selectParma = ref({
-    farmWorkTypeId: null,
-    districtCode: null,
-});
-
-//需求大厅接单简单农事记录列表
-const taskList = ref([]);
-function getSimpleList() {
-    const params = {
-        ...selectParma.value,
-        farmWorkTypeId: selectParma.value.farmWorkTypeId || null,
-        location: mapPoint.value,
-    };
-    VE_API.z_farm_work_record
-        .getOrderReceivingSimpleList(params)
-        .then(({ data }) => {
-            const filteredData = data.filter(item => item.isIgnored !== 1);
-            taskList.value = filteredData || [];
-        })
-        .catch((error) => {
-            taskList.value = [];
-        });
-}
-
-const toPage = () => {
-    router.push("/create_farm?type=client&isReload=true&from=task_condition");
-};
-
-//按区县统计服务亩数
-function getStatisticsAreaByDistrict() {
-    VE_API.z_farm_work_record.statisticsAreaByDistrict({ flowStatus: "1,2,3" }).then(({ data }) => {
-        if (data && data.length > 0) {
-            indexMap.initDataHall(data);
-        }
-    });
-}
-
-function toDetail(item) {
-    router.push({
-        path: "/completed_work",
-        query: { miniJson: JSON.stringify({ id: item.id }) },
-    });
-}
-
-const cardContentHeight = ref(230);
-
-// 处理位置搜索变化
-function handleLocationChange(data) {
-    if (data && data.coordinateArray) {
-        mapPoint.value = data.point;
-        // 更新地图位置
-        if (indexMap && indexMap.kmap) {
-            indexMap.kmap.getView().animate({
-                center: data.coordinateArray,
-                zoom: 16,
-                duration: 500,
-            });
-            // 更新点击点
-            if (indexMap.clickPointLayer) {
-                indexMap.clickPointLayer.source.clear();
-                const point = new Feature(new Point(data.coordinateArray));
-                indexMap.clickPointLayer.addFeature(point);
-            }
-        }
-        // 更新区县列表
-        getDistrictListByCity();
-    } else {
-        // 重置为初始位置
-        mapPoint.value = store.state.home.miniUserLocationPoint;
-        indexMap.clickPointLayer.source.clear();
-        // 更新区县列表
-        getDistrictListByCity();
-        getStatisticsAreaByDistrict();
-    }
-}
-
-const cardContentRef = ref(null);
-const handleHeightChange = ({ height }) => {
-    if (height === anchors.value[0]) {
-        cardContentHeight.value = 230;
-        cardContentRef.value.scrollTo({ top: 0, behavior: "smooth" });
-    } else if (height === anchors.value[1]) {
-        cardContentHeight.value = Math.round(1 * window.innerHeight) - (tabBarHeight.value - 40) - 170;
-    }
-};
-
-const priceSheetPopupRef = ref(null);
-const showPriceSheetPopup = (item) => {
-    VE_API.z_farm_work_record.getDetail({ id: item.id }).then(({ data }) => {
-        const res = data[0];
-        priceSheetPopupRef.value.handleShowPopup(res);
-    });
-};
-
-const showIgnorePopup = ref(false);
-const showIgnore = (item) => {
-    currentTask.value = item;
-    showIgnorePopup.value = true;
-};
-
-const currentTask = ref({});
-const handleIgnore = () => {
-    showIgnorePopup.value = false;
-    VE_API.z_farm_work_record.ignoreFarmWorkRecord({ farmWorkRecordId: currentTask.value.id }).then((res) => {
-        if (res.code === 0) {
-            ElMessage.success("操作成功");
-            getSimpleList();
-        }
-    });
-};
-</script>
-
-<style lang="scss" scoped>
-.demand-hall {
-    width: 100%;
-    height: 100%;
-    position: relative;
-    overflow: hidden;
-    .map-container {
-        width: 100%;
-        height: calc(100% - 290px);
-    }
-
-    .search {
-        position: absolute;
-        top: 8px;
-        width: calc(100% - 24px);
-        left: 12px;
-        ::v-deep {
-            .el-input__wrapper,
-            .el-select__wrapper {
-                box-shadow: none;
-                border-radius: 20px;
-            }
-        }
-    }
-
-    .expand-btn-wrap {
-        position: absolute;
-        bottom: 12px;
-        left: 12px;
-        width: calc(100% - 24px);
-        background-image: linear-gradient(180deg, #d7eafc 0%, #ffffff 100%);
-        border-radius: 14px;
-        padding: 15px 12px;
-        box-sizing: border-box;
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        font-weight: 500;
-        font-size: 15px;
-        .expand-btn {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            gap: 4px;
-            font-size: 13px;
-            color: #2199f8;
-        }
-    }
-
-    .hall-content {
-        height: 100%;
-        position: relative;
-        .farm-list {
-            overflow: auto;
-            height: calc(100% - 60px);
-            border-top: 1px solid rgba(0, 0, 0, 0.1);
-            padding: 8px 12px 12px 12px;
-        }
-        .task-item + .task-item {
-            margin-top: 10px;
-        }
-        .no-data {
-            text-align: center;
-            font-size: 14px;
-            color: #999999;
-            padding-top: 20px;
-        }
-
-        .item-footer {
-            margin-top: 10px;
-            padding-top: 11px;
-            border-top: 1px solid rgba(0, 0, 0, 0.1);
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            font-size: 12px;
-            .footer-l {
-                // display: inline-flex;
-                // align-items: center;
-                // border: 1px solid #2199F8;
-                // background: rgba(33, 153, 248, 0.1);
-                // padding: 0 12px;
-                // height: 32px;
-                // box-sizing: border-box;
-                // display: flex;
-                // align-items: center;
-                // border-radius: 20px;
-                // color: #2199F8;
-                color: #8b8b8b;
-                font-size: 12px;
-                .share-icon {
-                    width: 12px;
-                    padding-right: 4px;
-                }
-            }
-            .footer-r {
-                display: flex;
-                align-items: center;
-                gap: 8px;
-                .btn {
-                    height: 32px;
-                    line-height: 32px;
-                    padding: 0 12px;
-                    border-radius: 20px;
-                    display: flex;
-                    align-items: center;
-                    box-sizing: border-box;
-                    &.second {
-                        // border: 1px solid #8B8B8B;
-                        // color: #8B8B8B;
-                        color: #2199f8;
-                        background: rgba(33, 153, 248, 0.1);
-                    }
-                    &.primary {
-                        background: #2199f8;
-                        color: #fff;
-                    }
-                }
-            }
-        }
-    }
-
-    .select-group {
-        display: flex;
-        padding: 0 12px;
-        .select-item {
-            width: 100%;
-            ::v-deep {
-                .el-select__wrapper {
-                    text-align: center;
-                    gap: 2px;
-                    box-shadow: none;
-                    justify-content: center;
-                    background: none;
-                }
-                .el-select__selection {
-                    flex: none;
-                    width: fit-content;
-                }
-                .el-select__placeholder {
-                    position: static;
-                    transform: none;
-                    width: fit-content;
-                    color: rgba(0, 0, 0, 0.2);
-                }
-                .el-select__caret {
-                    color: rgba(0, 0, 0, 0.2);
-                }
-            }
-        }
-    }
-
-    .header-bar {
-        width: 20px;
-        height: 3px;
-        margin: 10px auto 10px auto;
-        border-radius: 4px;
-        background: #969799;
-    }
-}
-.user-btn {
-    position: absolute;
-    z-index: 10;
-    top: -42px;
-    right: 12px;
-    background: #fff;
-    height: 32px;
-    display: flex;
-    align-items: center;
-    border-radius: 5px;
-    padding: 0 8px;
-    font-size: 12px;
-    color: #2199f8;
-    .user-icon {
-        width: 16px;
-        margin-right: 4px;
-    }
-}
-
-.floating-panel {
-    width: 100%;
-    background: #ffffff;
-    ::v-deep {
-        .van-floating-panel__content {
-            background: transparent;
-            overflow: hidden;
-        }
-        .van-floating-panel__header {
-            position: relative;
-            &::after {
-                content: "";
-                height: 100px;
-                width: 100%;
-                position: absolute;
-                top: 0px;
-                left: 0;
-            }
-        }
-    }
-}
-
-
-.task-tips-popup {
-    width: 75%;
-    padding: 28px 28px 20px;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-    .create-farm-icon {
-        width: 40px;
-        height: 40px;
-        margin-bottom: 12px;
-    }
-    .farm-check-icon {
-        width: 68px;
-        height: 68px;
-        margin-bottom: 12px;
-    }
-    .create-farm-text {
-        font-size: 20px;
-        font-weight: 500;
-        line-height: 40px;
-        margin-bottom: 32px;
-        text-align: center;
-        &.success-text {
-            font-size: 23px;
-            font-weight: 400;
-        }
-    }
-    .main-text {
-        color: #2199f8;
-    }
-    .create-farm-btn {
-        width: 100%;
-        box-sizing: border-box;
-        padding: 8px;
-        border-radius: 25px;
-        font-size: 16px;
-        background: #2199f8;
-        color: #fff;
-        text-align: center;
-    }
-}
-</style>

+ 0 - 212
src/views/old_mini/farm_manage/components/farmManage.vue

@@ -1,212 +0,0 @@
-<template>
-    <div class="farm-manage-content" :style="{ height: `calc(100vh - ${tabBarHeight}px - 50px)` }">
-        <div class="manage-top">
-            <el-input class="search" v-model="searchValue" placeholder="搜索位置" @search="search" :prefix-icon="Search" />
-            <div class="select-group">
-                <el-select class="select-item" v-model="dateValue" placeholder="Select">
-                    <el-option v-for="item in dateOptions" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-                <el-select class="select-item" v-model="areaValue" placeholder="Select">
-                    <el-option v-for="item in areaOptions" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-                <el-select class="select-item" v-model="areaValue1" placeholder="Select">
-                    <el-option v-for="item in areaOptions1" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-            </div>
-        </div>
-        <div class="farm-list">
-            <div :class="['farm-item', { 'is-default': item === 3 }]" v-for="item in 10" :key="item" @click="handleItemClick(item)">
-                <div class="item-top"><span class="num">2</span> 条农事待确认</div>
-                <div class="item-title">未命名农场</div>
-                <div class="item-desc">
-                    <div class="desc-info">
-                        <div class="desc-info-item">
-                            <span>农场品种:</span>
-                            <span class="value">荔枝-桂味</span>
-                        </div>
-                        <div class="desc-info-item">
-                            <span>农场面积:</span>
-                            <span class="value">500亩</span>
-                        </div>
-                    </div>
-                    <div class="desc-info copy-info">
-                        <div class="address van-ellipsis">
-                            <span>农场位置:</span>
-                            <span class="value">广东省广州市从化区市从化区从广东省广州市从化区市从化区从</span>
-                        </div>
-                        <span class="copy-text">点击复制</span>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { computed, ref } from "vue";
-import { Search } from "@element-plus/icons-vue";
-import { useRouter } from "vue-router";
-import { useStore } from "vuex";
-
-const store = useStore();
-const tabBarHeight = computed(() => store.state.home.tabBarHeight);
-
-const router = useRouter();
-const searchValue = ref("");
-const search = () => {
-    console.log(searchValue.value);
-};
-const dateValue = ref("1");
-const dateOptions = [
-    { value: "1", label: "农事类型" },
-    { value: "2", label: "2" },
-    { value: "3", label: "3" },
-];
-const areaValue = ref("1");
-const areaOptions = [
-    { value: "1", label: "距离" },
-    { value: "2", label: "2" },
-    { value: "3", label: "3" },
-];
-const areaValue1 = ref("1");
-const areaOptions1 = [
-    { value: "1", label: "区域筛选" },
-    { value: "2", label: "2" },
-    { value: "3", label: "3" },
-];
-
-const handleItemClick = (item) => {
-    console.log(item);
-    router.push(`/farm_manage_detail?type=EXPERT`);
-};
-</script>
-
-<style lang="scss" scoped>
-.farm-manage-content {
-    width: 100%;
-    height: calc(100vh - 52px - 50px);
-    background: #f5f7fb;
-    padding: 8px 0 0 12px;
-    overflow: auto;
-    box-sizing: border-box;
-    .search {
-        ::v-deep {
-            .el-input__wrapper {
-                box-shadow: none;
-                border-radius: 20px;
-            }
-        }
-    }
-    .select-group {
-        display: flex;
-        gap: 12px;
-        margin: 5px 0;
-        .select-item {
-            width: 100%;
-            ::v-deep {
-                .el-select__wrapper {
-                    text-align: center;
-                    gap: 2px;
-                    box-shadow: none;
-                    justify-content: center;
-                    background: none;
-                }
-                .el-select__selection {
-                    flex: none;
-                    width: fit-content;
-                }
-                .el-select__placeholder {
-                    position: static;
-                    transform: none;
-                    width: fit-content;
-                    color: rgba(0, 0, 0, 0.2);
-                }
-                .el-select__caret {
-                    color: rgba(0, 0, 0, 0.2);
-                }
-            }
-        }
-    }
-    .manage-top {
-        padding-right: 12px;
-    }
-    .farm-list {
-        height: calc(100% - 74px);
-        padding: 0 12px 26px 0;
-        box-sizing: border-box;
-        overflow: auto;
-        .farm-item {
-            background: #fff;
-            border-radius: 10px;
-            padding: 10px 12px;
-            border: 1px solid rgba(255, 149, 61, 0.5);
-            .item-top {
-                background-image: linear-gradient(90deg, rgba(255, 149, 61, 0.3) 0%, transparent 88%);
-                color: #bf5600;
-                padding: 5px 10px;
-                border-radius: 5px;
-                position: relative;
-                &::before {
-                    content: "";
-                    width: 6px;
-                    height: 6px;
-                    background: #ff953d;
-                    border-radius: 50%;
-                    top: 5px;
-                    left: 110px;
-                    position: absolute;
-                }
-                .num {
-                    font-size: 18px;
-                }
-            }
-            .item-title {
-                font-size: 16px;
-                font-weight: 500;
-                margin: 10px 0 5px 0;
-            }
-            .item-desc {
-                font-size: 13px;
-                color: #bbbbbb;
-                line-height: 18px;
-                .desc-info {
-                    display: flex;
-                    .desc-info-item {
-                        flex: 1;
-                        .value {
-                            color: #666666;
-                        }
-                    }
-                }
-                .copy-info {
-                    margin-top: 4px;
-                    .address {
-                        max-width: 80%;
-                        .value {
-                            color: #666666;
-                        }
-                    }
-                    .copy-text {
-                        margin-left: 8px;
-                        color: #2199f8;
-                    }
-                }
-            }
-
-            &.is-default {
-                border-color: transparent;
-                .item-top {
-                    color: #505050;
-                    background-image: linear-gradient(90deg, rgba(171, 171, 171, 0.2) 0%, transparent 88%);
-                    &::before {
-                        background: #909090;
-                    }
-                }
-            }
-        }
-        .farm-item + .farm-item {
-            margin-top: 10px;
-        }
-    }
-}
-</style>

+ 0 - 134
src/views/old_mini/farm_manage/components/systemReminder.vue

@@ -1,134 +0,0 @@
-<template>
-    <Popup v-model:show="show" class="system-reminder-popup">
-        <div class="system-reminder-title">
-            <img class="title-img" src="@/assets/img/home/bulb-icon.png" alt="" />
-            <span class="title-text">飞鸟系统提醒</span>
-        </div>
-        <div class="system-reminder-content">
-            <div class="content-text">
-                <span>从化荔博园</span> 8月8日有 <span>剪枝农事</span> 需求,快去联系看看吧!
-            </div>
-            <div class="content-box">
-                <div class="address">
-                    <span>位置:广东省广州市从化区</span>
-                    <div class="distance">距离2.0km</div>
-                </div>
-                <div class="map"></div>
-            </div>
-        </div>
-        <div class="bottom-buttons">
-            <div class="bottom-btn no-btn">查看详情</div>
-            <div class="bottom-btn yes-btn" @click="handleContact">立即联系</div>
-        </div>
-    </Popup>
-    <action-sheet
-        class="action-sheet"
-        style="bottom: 50px;padding-top: 10px;"
-        title=" "
-        closeable
-        v-model:show="contactShow"
-        :actions="actions"
-        @select="onSelect"
-    />
-</template>
-
-<script setup>
-import { Popup, ActionSheet } from "vant";
-import { ref } from "vue";
-const show = ref(false);
-const contactShow = ref(false);
-
-const handleContact = () => {
-    show.value = false;
-    contactShow.value = true;
-};
-
-const actions = [{ name: "在线联系" }, { name: "电话联系" }];
-const onSelect = (item) => {
-    contactShow.value = false;
-};
-</script>
-
-<style lang="scss" scoped>
-.system-reminder-popup {
-    width: 100%;
-    border-radius: 12px;
-    padding: 16px 12px;
-    background-image: linear-gradient(180deg, #d1e7fd 0%, #ffffff 25%);
-    .system-reminder-title {
-        display: flex;
-        align-items: center;
-        padding: 4px;
-        border-radius: 5px 0 0 5px;
-        background: linear-gradient(90deg, #2199f8 0%, transparent 100%);
-
-        .title-img {
-            width: 22px;
-            height: 22px;
-            margin-right: 4px;
-        }
-        .title-text {
-            font-size: 20px;
-            color: #fff;
-            font-family: "PangMenZhengDao";
-        }
-    }
-    .system-reminder-content {
-        .content-text {
-            font-size: 16px;
-            color: #1d1e1f;
-            font-weight: 500;
-            margin: 5px 0 12px 0;
-            span {
-                color: #2199f8;
-            }
-        }
-        .content-box {
-            border: 1px solid #ececec;
-            border-radius: 8px;
-            padding: 10px 8px;
-            .address {
-                display: flex;
-                justify-content: space-between;
-                color: #1d1e1f;
-                font-weight: 500;
-                .distance {
-                    background: #f2f2f2;
-                    color: #999999;
-                    padding: 3px 10px;
-                    border-radius: 25px;
-                    font-weight: 400;
-                }
-            }
-            .map {
-                width: 100%;
-                height: 140px;
-                border-radius: 6px;
-                background: #f5f5f5;
-                margin-top: 12px;
-            }
-        }
-    }
-    .bottom-buttons {
-        display: flex;
-        gap: 12px;
-        margin-top: 10px;
-
-        .bottom-btn {
-            flex: 1;
-            padding: 8px 0;
-            border-radius: 25px;
-            font-size: 16px;
-            text-align: center;
-            background: #fff;
-            border: 1px solid #e5e5e5;
-
-            &.yes-btn {
-                background-image: linear-gradient(180deg, #76c3ff 0%, #2199f8 100%);
-                color: #fff;
-                border: none;
-            }
-        }
-    }
-}
-</style>

+ 0 - 47
src/views/old_mini/farm_manage/index.vue

@@ -1,47 +0,0 @@
-<template>
-    <div class="farm-manage">
-        <tabs v-model:active="active" class="tabs">
-            <tab title="农场管理">
-                <farm-manage />
-            </tab>
-            <tab title="需求大厅">
-                <demand-hall />
-            </tab>
-        </tabs>
-        <system-reminder />
-    </div>
-</template>
-
-<script setup>
-import { ref } from "vue";
-import { Tab, Tabs } from "vant";
-import farmManage from "./components/farmManage.vue";
-import demandHall from "./components/demandHall.vue";
-import systemReminder from "./components/systemReminder.vue";
-const active = ref(0);
-</script>
-
-<style lang="scss" scoped>
-.farm-manage {
-    width: 100%;
-    height: 100%;
-    .tabs{
-        ::v-deep{
-            .van-tabs__wrap{
-                margin-bottom: 8px;
-            }
-            .van-tabs__line{
-                width: 24px;
-                height: 4px;
-            }
-            .van-tab {
-                width: 80px;
-                flex: none;
-            }
-            .van-tabs__nav {
-                justify-content: center;
-            }
-        }
-    }
-}
-</style>

+ 0 - 244
src/views/old_mini/farm_manage/map/index.js

@@ -1,244 +0,0 @@
-import * as KMap from "@/utils/ol-map/KMap";
-import * as util from "@/common/ol_common.js";
-import config from "@/api/config.js";
-import { Point } from 'ol/geom';
-import Feature from "ol/Feature";
-import Style from "ol/style/Style";
-import Photo from "ol-ext/style/Photo";
-import { Fill, Text, Icon, Stroke } from "ol/style.js";
-import { newPoint } from "@/utils/map";
-
-/**
- * @description 地图层对象
- */
-class IndexMap {
-  constructor() {
-    let that = this;
-    let vectorStyle = new KMap.VectorStyle();
-    this.vectorStyle = vectorStyle;
-    // 位置图标
-    this.clickPointLayer = new KMap.VectorLayer("clickPointLayer", 9999, {
-      style: (f) => {
-        return new Style({
-          image: new Icon({
-            src: require("@/assets/img/home/garden-point.png"),
-            scale: 0.5,
-            anchor: [0.5, 1],
-          }),
-        });
-      },
-    });
-
-    this.gardenPointLayer = new KMap.VectorLayer("gardenPointLayer", 99, {
-      minZoom: 6,
-      maxZoom: 22,
-      style: (feature) => {
-        let style1 = new Style({
-          image: new Photo({
-            src: "https://birdseye-img.sysuimars.com/ai_result/2023/11/20/tree_4414/img_27572.jpg" + '?imageView2/1/w/300/interlace/1',
-            radius: 19,
-            shadow: 0,
-            crop: true,
-            onload: function () {
-              that.gardenPointLayer.layer.changed();
-            },
-            displacement: [-1, -1],
-            stroke: new Stroke({
-              width: 2,
-              color: "#fdfcfc00",
-            }),
-          }),
-        });
-        let style2 = new Style({
-          image: new Photo({
-            src: require("@/assets/img/map/garden-border.png"),
-            radius: 24,
-            shadow: 0,
-            crop: false,
-            onload: function () {
-              that.gardenPointLayer.layer.changed();
-            },
-            displacement: [0, -6],
-            stroke: new Stroke({
-              width: 0,
-              color: "#fdfcfc00",
-            }),
-          }),
-        });
-        let style3 = new Style({
-          text: new Text({
-            text: feature.get('farmName') || feature.get('mapInfo'),
-            offsetX: 0,
-            offsetY: -30,
-            font: "bold 12px sans-serif",
-            fill: new Fill({ color: "#fff" }), // 字体颜色
-          }),
-        });
-
-        const canvas = document.createElement('canvas');
-        const ctx = canvas.getContext('2d');
-
-        // 矩形的参数
-        const x = 150; // 矩形中心点的x坐标
-        const y = 100; // 矩形中心点的y坐标
-        const width = 98; // 矩形的宽度
-        const height = 20; // 矩形的高度
-        const cornerRadius = 8; // 圆角半径
-
-        // 创建渐变
-        const gradient = ctx.createLinearGradient(x - width / 2, y, x + width / 2, y);
-        gradient.addColorStop(0, '#2199F8');   // 渐变起始颜色
-        gradient.addColorStop(1, '#2199F8');  // 渐变结束颜色
-
-        // 绘制圆角矩形
-        ctx.beginPath();
-        ctx.moveTo(x - width / 2 + cornerRadius, y - height / 2); // 左上角
-        ctx.lineTo(x + width / 2 - cornerRadius, y - height / 2); // 上边
-        ctx.arc(x + width / 2 - cornerRadius, y - height / 2 + cornerRadius, cornerRadius, -Math.PI / 2, 0); // 右上角
-        ctx.lineTo(x + width / 2, y + height / 2 - cornerRadius); // 右边
-        ctx.arc(x + width / 2 - cornerRadius, y + height / 2 - cornerRadius, cornerRadius, 0, Math.PI / 2); // 右下角
-        ctx.lineTo(x - width / 2 + cornerRadius, y + height / 2); // 下边
-        ctx.arc(x - width / 2 + cornerRadius, y + height / 2 - cornerRadius, cornerRadius, Math.PI / 2, Math.PI); // 左下角
-        ctx.lineTo(x - width / 2, y - height / 2 + cornerRadius); // 左边
-        ctx.arc(x - width / 2 + cornerRadius, y - height / 2 + cornerRadius, cornerRadius, Math.PI, -Math.PI / 2); // 左上角
-        ctx.closePath();
-
-        // 填充颜色
-        ctx.fillStyle = gradient;
-        ctx.fill();
-        const newStyle = new Style({
-          image: new Icon({
-            src: canvas.toDataURL(),
-            displacement: [0, 56],
-          }),
-        });
-
-
-        return [style1, style2, newStyle, style3];
-      },
-    });
-
-    this.gardenHallLayer = new KMap.VectorLayer("gardenHallLayer", 99, {
-      minZoom: 6,
-      maxZoom: 22,
-      style: (feature) => {
-        let style2 = new Style({
-          image: new Icon({
-            src: require("@/assets/img/map/hall.png"),
-            scale: 0.4,
-            anchor: [0.5, 1],
-            displacement: [0, -36],
-          }),
-        });
-        let style3 = new Style({
-          text: new Text({
-            text: feature.get('totalArea') ? feature.get('totalArea').toFixed(2) + '亩' : '--',
-            offsetX: 0,
-            offsetY: -30,
-            font: "bold 12px sans-serif",
-            fill: new Fill({ color: "#fff" }), // 字体颜色
-          }),
-        });
-        let style4 = new Style({
-          text: new Text({
-            text: feature.get('districtName'),
-            offsetX: 0,
-            offsetY: -6,
-            font: "bold 14px sans-serif",
-            fill: new Fill({ color: "#2199F8" }), // 字体颜色
-          }),
-        });
-
-        const canvas = document.createElement('canvas');
-        const ctx = canvas.getContext('2d');
-
-        // 矩形的参数
-        const x = 150; // 矩形中心点的x坐标
-        const y = 100; // 矩形中心点的y坐标
-        const width = 58; // 矩形的宽度
-        const height = 20; // 矩形的高度
-        const cornerRadius = 4; // 圆角半径
-
-        // 创建渐变
-        const gradient = ctx.createLinearGradient(x - width / 2, y, x + width / 2, y);
-        gradient.addColorStop(0, '#2199F8');   // 渐变起始颜色
-        gradient.addColorStop(1, '#2199F8');  // 渐变结束颜色
-
-        // 绘制圆角矩形
-        ctx.beginPath();
-        ctx.moveTo(x - width / 2 + cornerRadius, y - height / 2); // 左上角
-        ctx.lineTo(x + width / 2 - cornerRadius, y - height / 2); // 上边
-        ctx.arc(x + width / 2 - cornerRadius, y - height / 2 + cornerRadius, cornerRadius, -Math.PI / 2, 0); // 右上角
-        ctx.lineTo(x + width / 2, y + height / 2 - cornerRadius); // 右边
-        ctx.arc(x + width / 2 - cornerRadius, y + height / 2 - cornerRadius, cornerRadius, 0, Math.PI / 2); // 右下角
-        ctx.lineTo(x - width / 2 + cornerRadius, y + height / 2); // 下边
-        ctx.arc(x - width / 2 + cornerRadius, y + height / 2 - cornerRadius, cornerRadius, Math.PI / 2, Math.PI); // 左下角
-        ctx.lineTo(x - width / 2, y - height / 2 + cornerRadius); // 左边
-        ctx.arc(x - width / 2 + cornerRadius, y - height / 2 + cornerRadius, cornerRadius, Math.PI, -Math.PI / 2); // 左上角
-        ctx.closePath();
-
-        // 填充颜色
-        ctx.fillStyle = gradient;
-        ctx.fill();
-        const newStyle = new Style({
-          image: new Icon({
-            src: canvas.toDataURL(),
-            displacement: [0, 56],
-          }),
-        });
-
-
-        return [style2, newStyle, style3, style4];
-      },
-    });
-  }
-
-  initMap(location, target, isCapital) {
-    let level = 16;
-    let coordinate = util.wktCastGeom(location).getFirstCoordinate();
-    this.kmap = new KMap.Map(target, level, coordinate[0], coordinate[1], null, 6, 22, isCapital ? "img" : "vec");
-    let xyz2 = config.base_img_url3 + "map/lby/{z}/{x}/{y}.png";
-    this.kmap.addXYZLayer(xyz2, { minZoom: 6, maxZoom: 22 }, 2);
-    this.kmap.addLayer(this.clickPointLayer.layer);
-    this.kmap.addLayer(this.gardenPointLayer.layer);
-    this.kmap.addLayer(this.gardenHallLayer.layer);
-    if (isCapital) {
-      // this.initData()
-      const point = ["113.61652616170711,23.58399613872042", "113.61767554789421, 23.590079887444034", "113.62757101477101, 23.590796948574365", "113.62240816252164, 23.59499176519138"]
-    } else {
-      let point = new Feature(new Point(coordinate))
-      this.clickPointLayer.addFeature(point)
-    }
-  }
-
-  initData(taskList, label,pointType='point') {
-    this.gardenPointLayer.source.clear();
-    if (taskList.length > 0) {  // 如果任务列表不为空,则添加任务点
-      for (let item of taskList) {
-        item.mapInfo = label ? item[label] : (item.executeDeadlineDate || item.executeDate)?.replace(/^\d{4}-(\d{2})-(\d{2})$/, '$1.$2') + '  ' + item.farmWorkName
-        this.gardenPointLayer.source.addFeature(newPoint(item, pointType, "myGarden"))
-      }
-      this.kmap.getView().fit(this.gardenPointLayer.source.getExtent(), { padding: [42, 20, 30, 20] });
-      const finalZoom = this.kmap.getView().getZoom();
-      if (finalZoom > 18) {
-        this.kmap.getView().setZoom(18);
-      }
-    }
-  }
-
-  initDataHall(taskList) {
-    this.gardenHallLayer.source.clear();
-    if (taskList.length > 0) {  // 如果任务列表不为空,则添加任务点
-      for (let item of taskList) {
-        this.gardenHallLayer.source.addFeature(newPoint(item, "centerPoint", "hallGarden"))
-      }
-      this.kmap.getView().fit(this.gardenHallLayer.source.getExtent(), { padding: [60, 40, 30, 40] });
-      const finalZoom = this.kmap.getView().getZoom();
-      if (finalZoom > 18) {
-        this.kmap.getView().setZoom(18);
-      }
-    }
-  }
-}
-
-export default IndexMap;

+ 0 - 1891
src/views/old_mini/modify_work/addWork.vue

@@ -1,1891 +0,0 @@
-<template>
-    <div class="new-farming-page" ref="pageRef">
-        <custom-header name="新增农事"></custom-header>
-        <div class="new-farming-content">
-            <el-form
-                ref="formRef"
-                style="max-width: 600px"
-                label-position="left"
-                :rules="rules"
-                :model="dynamicValidateForm"
-                class="demo-dynamic"
-            >
-                <div class="farm-card">
-                    <div class="card-title between">
-                        基本信息
-                        <div>
-                            <el-select size="small" v-model="tagName" placeholder="标记为" style="width: 94px">
-                                <el-option
-                                v-for="item in tagList"
-                                :key="item.value"
-                                :label="item.label"
-                                :value="item.value"
-                                />
-                            </el-select>
-                        </div>
-                    </div>
-                    <div class="info-content">
-                        <el-form-item label-width="82px" class="form-item name-item" prop="name" label="农事名称"> 
-                            <el-input
-                                v-model="dynamicValidateForm.name"
-                                style="width: 100%"
-                                placeholder="请输入农事名称"
-                            />
-                        </el-form-item>
-                        <el-form-item label-width="82px" class="form-item" prop="executeDate" label="执行时间">
-                            <el-date-picker
-                                v-model="dynamicValidateForm.executeDate"
-                                value-format="YYYY-MM-DD"
-                                type="date"
-                                placeholder="请选择执行时间"
-                                style="width: 100%"
-                                :editable="false"
-                            />
-                        </el-form-item>
-                    </div>
-                </div>
-
-                <div class="farm-card">
-                    <!-- 农情互动 -->
-                    <div class="card-title border-bottom between">
-                        <div>农情互动</div>
-                        <!-- <span class="del-tag">删除互动</span> -->
-                    </div>
-                    <div class="interact-form">
-                        <div class="interact-form-item" data-interact-field="phenologyId">
-                            <div class="form-label">互动阶段</div>
-                            <div class="form-input-wrapper two-select">
-                                <div class="select-item">
-                                    <el-select
-                                        style="width: 100%"
-                                        v-model="interactFormData.phenologyId"
-                                        placeholder="请选择物候期"
-                                        @change="handlePhenologyChange"
-                                        :editable="false">
-                                        <el-option
-                                            v-for="item in phenologyList"
-                                            :key="item.id"
-                                            :label="item.name"
-                                            :value="item.id"
-                                        ></el-option>
-                                    </el-select>
-                                </div>
-                                <div class="select-item">
-                                    <el-select style="width: 100%" v-model="interactFormData.reproductiveId" placeholder="请选择物候期" :editable="false">
-                                        <el-option
-                                            v-for="item in reproductiveList"
-                                            :key="item.id"
-                                            :label="item.name"
-                                            :value="item.id"
-                                        ></el-option>
-                                    </el-select>
-                                </div>
-                            </div>
-                        </div>
-                        <!-- <div class="interact-form-item" data-interact-field="interactionTime">
-                            <div class="form-label">互动日期</div>
-                            <div class="form-input-wrapper">
-                                <el-date-picker
-                                    v-model="interactFormData.interactionTime"
-                                    style="width: 100%"
-                                    type="date"
-                                    placeholder="请选择日期"
-                                    :editable="false"
-                                />
-                            </div>
-                        </div> -->
-                        <div class="interact-form-item" data-interact-field="interactionQuestion">
-                            <div class="form-label">互动问题</div>
-                            <el-input
-                                v-model="interactFormData.interactionQuestion"
-                                type="textarea"
-                                :rows="4"
-                                placeholder="请设置互动问题"
-                                class="question-textarea"
-                            />
-                        </div>
-                    </div>
-                </div>
-
-                <div class="farm-card prescription-content common-inputs">
-                    <div class="card-title pb-12 between">
-                        药物处方
-                        <div class="add-tag" @click="addDomain()">
-                            <el-icon color="#2199F8"><Plus /></el-icon>新增药物
-                        </div>
-                    </div>
-                    <el-form-item label-width="82px" class="form-item" prop="usageMode" label="施用方式">
-                        <el-select
-                            v-model="dynamicValidateForm.usageMode"
-                            placeholder="请选择施用方式"
-                            style="width: 100%"
-                        >
-                            <el-option
-                                v-for="(usage, uId) in allUsageModeList"
-                                :key="uId"
-                                :label="usage"
-                                :value="usage"
-                            />
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item
-                        label-width="82px"
-                        class="form-item"
-                        prop="executeStyle"
-                        label="执行方式"
-                    >
-                        <el-select
-                            class="select-item"
-                            v-model="dynamicValidateForm.executeStyle"
-                            placeholder="执行方式"
-                            @change="handleExecutionMethodChange"
-                        >
-                            <el-option
-                                v-for="(item, index) in modeList"
-                                :key="index"
-                                :label="item.name"
-                                :value="item.value"
-                            />
-                        </el-select>
-                    </el-form-item>
-
-                    <div v-if="dynamicValidateForm.usageMode !== '人工'">
-                        <el-form-item
-                            v-for="(domain, index) in dynamicValidateForm.prescription.pesticideFertilizerList"
-                            :key="index"
-                            :prop="'prescription.pesticideFertilizerList.' + index + '.value'"
-                            class="prescription-item"
-                        >
-                            <div class="recipe-item">
-                                <div class="recipe-form">
-                                    <div class="form-box">
-                                        <div class="form-index">药肥{{ index + 1 }}</div>
-                                        <div class="box-item" v-if="domain.typeName">
-                                            <div class="form-l">药肥类型</div>
-                                            <div class="form-r r-text">
-                                                {{ domain.typeName }}
-                                            </div>
-                                        </div>
-                                        <div class="box-item">
-                                            <div class="form-l">药肥名称</div>
-                                            <div class="form-r">
-                                                <el-select
-                                                    filterable
-                                                    @change="handlePesticideFertilizerChange(index)"
-                                                    v-model="domain.code"
-                                                    placeholder="请选择"
-                                                    style="width: 150px"
-                                                >
-                                                    <el-option
-                                                        v-for="item in pesticideFertilizersOptions"
-                                                        :key="item.pesticideFertilizerCode"
-                                                        :label="item.defaultName || item.name"
-                                                        :value="item.pesticideFertilizerCode"
-                                                    />
-                                                </el-select>
-                                            </div>
-                                        </div>
-
-                                        <div class="mt-8">
-                                            <div class="box-item sub-item" :data-ratio-index="index">
-                                                <div class="form-l has-sub">
-                                                    <div class="main-name">药肥配比</div>
-                                                </div>
-                                                <div class="form-r input-box text-center input-unit">
-                                                    <el-input
-                                                        v-model="domain.ratio"
-                                                        type="number"
-                                                        step="0.01"
-                                                        style="width: 150px"
-                                                        placeholder="请输入"
-                                                    >
-                                                        <template #append>倍</template>
-                                                    </el-input>
-                                                </div>
-                                            </div>
-                                            <div class="box-item sub-item" :data-dosage-index="index">
-                                                <div class="form-l has-sub">
-                                                    <div class="main-name">单亩用量</div>
-                                                </div>
-                                                <div class="form-r input-box text-center">
-                                                    <el-input
-                                                        v-model="domain.dosage"
-                                                        type="number"
-                                                        step="0.01"
-                                                        style="width: 150px"
-                                                        placeholder="请输入"
-                                                    >
-                                                        <template #append>{{ domain.unit }}</template>
-                                                    </el-input>
-                                                </div>
-                                            </div>
-
-                                            
-                                            <div class="box-item">
-                                                        <div class="form-l">药肥品牌</div>
-                                                        <div class="form-r">
-                                                            <el-input
-                                                                v-model="domain.brand"
-                                                                placeholder="药肥品牌"
-                                                                style="width: 150px"
-                                                            />
-                                                        </div>
-                                                    </div>
-                                                    <div class="box-item">
-                                                        <div class="form-l">药肥单价</div>
-                                                        <div class="form-r">
-                                                            <el-input
-                                                                style="width: 150px"
-                                                                v-model="domain.price"
-                                                                type="number"
-                                                                step="0.01"
-                                                                placeholder="单价"
-                                                            >
-                                                                <template #append>元/{{ domain.unit }}</template>
-                                                            </el-input>
-                                                        </div>
-                                                    </div>
-                                        </div>
-                                        <!-- <div class="input-box mark-box">
-                                            <el-input
-                                                v-model="domain.remark"
-                                                style="width: 100%"
-                                                placeholder="备注:用药注意事项"
-                                            />
-                                        </div> -->
-                                        <div class="action-btn">
-                                            <el-button
-                                                class="btn delete-btn"
-                                                @click.prevent="removeDomain(prescriptionI, domain)"
-                                            >
-                                                删除
-                                            </el-button>
-                                            <el-button
-                                                type="default"
-                                                class="btn"
-                                                @click.prevent="resetItemForm(prescriptionI, index)"
-                                            >
-                                                重置
-                                            </el-button>
-                                        </div>
-                                    </div>
-                                    <!-- </el-form-item> -->
-                                </div>
-                            </div>
-                        </el-form-item>
-                    </div>
-                </div>
-
-                <div
-                    class="farm-card prescription-content common-inputs"
-                >
-                    <div class="medicine-wrap">
-                        <div class="medicine-box">
-                            <div class="form-index">服务报价</div>
-                            <div class="box-wrap">
-                                <div class="medicine-item mt-8">
-                                    <div class="item-name">单亩价格</div>
-                                    <div class="item-val">
-                                        <el-input
-                                            style="width: 150px"
-                                            v-model="servicePricePerMu"
-                                            type="number"
-                                            step="0.01"
-                                            placeholder="服务单价"
-                                        >
-                                            <template #append>元/亩</template>
-                                        </el-input>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-
-                <div class="submit-btn">
-                    <div class="btn second" @click.prevent="cancelEdit">取消</div>
-                    <div class="btn" @click.prevent="submitForm(formRef)">保存</div>
-                </div>
-            </el-form>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { onActivated, ref, reactive, onDeactivated, onBeforeUnmount, computed, onMounted, nextTick } from "vue";
-import { useRouter, useRoute } from "vue-router";
-import { ElMessage, ElMessageBox } from "element-plus";
-import customHeader from "@/components/customHeader.vue";
-import { useStore } from "vuex";
-import { formatArea } from "@/common/commonFun";
-import interactPopup from "@/components/popup/interactPopup.vue";
-
-import dayjs from "dayjs";
-const store = useStore();
-const pageRef = ref(null);
-const router = useRouter();
-const route = useRoute();
-
-const tagList = ref([
-    { label: "托管农事", value: 2 },
-    { label: "特别关注", value: 1 },
-]);
-
-const tagName = ref("");
-
-// 互动表单数据
-const interactFormData = ref({
-    phenologyId: "",
-    reproductiveId: "",
-    // interactionTime: "",
-    interactionQuestion: "",
-});
-const phenologyList = ref([]);
-const reproductiveList = ref([]);
-const handlePhenologyChange = async (val) => {
-    interactFormData.value.reproductiveId = "";
-    const { data } = await VE_API.farm.listByPhenologyId({ phenologyId: val });
-    if (!data || !Array.isArray(data)) return;
-    reproductiveList.value = data;
-};
-
-onMounted(() => {
-    getPhenologyList()
-});
-
-const statusMap = ref({
-    0: "取消关注",
-    1: "特别关注",
-    2: "托管农事",
-});
-const detailData = ref({});
-
-const getPriceList = async (schemeId, pesticideFertilizerCodes) => {
-    const { data } = await VE_API.farm.getPriceList({ schemeId, pesticideFertilizerCodes });
-    if (!data || !Array.isArray(data)) return;
-
-    dynamicValidateForm.prescription.pesticideFertilizerList.forEach((item) => {
-        const priceInfo = data.find((p) => p.pesticideFertilizerCode === item.code);
-        if (!priceInfo) return;
-        item.price = priceInfo.price ?? item.price;
-        item.brand = priceInfo.brand ?? item.brand;
-    });
-
-    quotationData.value = { ...detailData.value, ...dynamicValidateForm };
-};
-
-const quotationData = ref({});
-
-// 计算单个药肥的总计:单价 * 单亩用量 * 亩数
-const getPesticideTotal = (pesticide) => {
-    const price = Number(pesticide.price || 0);
-    const dosage = Number(pesticide.dosage || 0); // 单亩用量
-    const area = Number(detailData.value.farm?.mianji || 0); // 农场面积
-    if (!price || !dosage || !area) return "--";
-    const total = (price * dosage * area).toFixed(2);
-    return total;
-};
-
-function getServiceCost(cost, area) {
-    if (!cost || !area) return "--";
-    return (parseFloat(cost) * parseFloat(area)).toFixed(2);
-}
-
-const resetForm = (formEl) => {
-    if (!formEl) return;
-    formEl.resetFields();
-};
-
-// 清空所有数据
-const clearData = () => {
-    // 清空表单
-    resetForm(formRef.value);
-
-    // 清空详情数据
-    detailData.value = {};
-
-    // 清空表单数据
-    dynamicValidateForm.name = "";
-    dynamicValidateForm.purpose = "";
-    dynamicValidateForm.executeDate = dayjs().format("YYYY-MM-DD");
-    dynamicValidateForm.usageMode = "";
-    dynamicValidateForm.prescription = {
-        id: "",
-        usageMode: "",
-        farmWorkLibCode: "",
-        expertId: "",
-        phenology: "",
-        soil: "",
-        speed: null,
-        pesticideFertilizerList: [
-            {
-                code: "",
-                name: "",
-                dosage: "",
-                ratio: "",
-                typeName: "",
-                muPrice: 0,
-                executeStyle: 1,
-                unit: "",
-            },
-        ],
-    };
-};
-
-onDeactivated(() => {
-    clearData();
-});
-
-onBeforeUnmount(() => {
-    clearData();
-});
-
-const cancelEdit = () => {
-    router.back();
-};
-
-const modeList = ref([
-    { name: "无人机", value: 1 },
-    { name: "人工", value: 2 },
-    { name: "无人机+人工", value: 3 },
-]);
-
-const handleExecutionMethodChange = (index, val) => {
-    // if (val == 1) {
-    //     servicePricePerMu.value = detailData.value.uavServicePrice;
-    // } else {
-    //     servicePricePerMu.value = detailData.value.manualServicePrice;
-    // }
-};
-
-// 表单
-const formRef = ref();
-const dynamicValidateForm = reactive({
-    name: "",
-    executeDate: dayjs().format("YYYY-MM-DD"),
-    usageMode: "",
-    executeStyle: 2,
-    executionMethod: 2,
-    prescription: {
-        id: "",
-        usageMode: "",
-        farmWorkLibCode: "",
-        expertId: "",
-        phenology: "",
-        soil: "",
-        speed: null,
-        pesticideFertilizerList: [
-            {
-                code: "",
-                id: "",
-                name: "",
-                dosage: "",
-                ratio: "",
-                typeName: "",
-                muPrice: 0,
-                executeStyle: 1,
-                unit: "",
-            },
-        ],
-    },
-});
-
-const rules = {
-    name: [
-        {
-            required: true,
-            message: "请输入农事名称",
-            trigger: "blur",
-        },
-    ],
-    executeDate: [
-        {
-            required: false,
-            message: "请选择执行时间",
-            trigger: "blur",
-        },
-    ],
-};
-
-const addDomain = () => {
-    if (!dynamicValidateForm.prescription.pesticideFertilizerList) {
-        dynamicValidateForm.prescription.pesticideFertilizerList = [];
-    }
-    dynamicValidateForm.prescription.pesticideFertilizerList.unshift({
-        code: "",
-        name: "",
-        dosage: "",
-        ratio: "",
-        typeName: "",
-        muPrice: 0,
-        id: "",
-        executeStyle: 1,
-        unit: "",
-    });
-};
-
-let pesticideFertilizersOptions = ref([]);
-VE_API.z_farm_work_order.pesticideFertilizersList().then(({ data }) => {
-    pesticideFertilizersOptions.value = data;
-});
-
-const allUsageModeList = ["树冠+内膛", "地面喷施", "树冠喷施", "根部施", "叶面施", "内膛喷施", "其他"];
-
-/**
- * 选择药肥的时候修改订单中药肥pesticideFertilizerId 以外其他数据
- * @param index
- */
-const handlePesticideFertilizerChange = (index) => {
-    const currentItem = dynamicValidateForm.prescription.pesticideFertilizerList[index];
-    let obj = pesticideFertilizersOptions.value.filter((item) => currentItem.code === item.pesticideFertilizerCode)[0];
-    if (obj) {
-        dynamicValidateForm.prescription.pesticideFertilizerList[index] = {
-            ...currentItem,
-            code: obj.pesticideFertilizerCode,
-            id: obj.id,
-            name: obj.name || obj.defaultName,
-            typeName: obj.typeName,
-            unit: obj.unit,
-            ratio: "", // 清空亩兑水量
-            dosage: "", // 清空单亩用量
-            executeStyle: obj.executionMethod || 1,
-        };
-    }
-};
-
-const removeDomain = (index) => {
-    if (index !== -1 && dynamicValidateForm.prescription.pesticideFertilizerList) {
-        dynamicValidateForm.prescription.pesticideFertilizerList.splice(index, 1);
-    }
-};
-
-const resetItemForm = (index) => {
-    if (dynamicValidateForm.prescription.pesticideFertilizerList) {
-        dynamicValidateForm.prescription.pesticideFertilizerList[index] = {
-            code: "",
-            id: "",
-            name: "",
-            dosage: "",
-            ratio: "",
-            typeName: "",
-            muPrice: 0,
-            executeStyle: 1,
-            unit: "",
-        };
-    }
-};
-
-const servicePricePerMu = ref(null);
-
-// 服务费用总计(数值):亩单价 * 亩数
-const serviceCostTotal = computed(() => {
-    const price = Number(servicePricePerMu.value || 0);
-    const area = Number(detailData.value?.farm?.mianji || detailData.value?.area || 0);
-    if (!price || !area) return 0;
-    return Number((price * area).toFixed(2));
-});
-
-// 显示用的服务费用(字符串或 "--")
-const getServiceTotal = () => {
-    const total = serviceCostTotal.value;
-    return total ? total.toFixed(2) : "--";
-};
-
-// 药肥费用总计:∑(单价 * 单亩用量 * 亩数)
-const pesticideCostTotal = computed(() => {
-    const list = dynamicValidateForm.prescription?.pesticideFertilizerList || [];
-    const area = Number(detailData.value?.farm?.mianji || detailData.value?.area || 0);
-    if (!list.length || !area) return 0;
-
-    const sum = list.reduce((acc, item) => {
-        const price = Number(item?.price || 0);
-        const dosage = Number(item?.dosage || 0);
-        if (!price || !dosage) return acc;
-        return acc + price * dosage * area;
-    }, 0);
-
-    return Number(sum.toFixed(2));
-});
-
-// 报价合计 = 药肥费用 + 服务费用
-const totalCost = computed(() => {
-    const pesticide = Number(pesticideCostTotal.value || 0);
-    const service = Number(serviceCostTotal.value || 0);
-    if (!pesticide && !service) return '--';
-    return Number((pesticide + service).toFixed(2));
-});
-
-const submitForm = (formEl) => {
-    if (!formEl) return;
-    formEl.validate(async (valid) => {
-        if (valid) {
-            // 校验标记是否已选择
-            if (!validateTagName()) return;
-            // 校验农情互动,不通过,直接返回失败
-            if (!validateInteractForm()) return false;
-
-            // 校验药肥的亩兑水量和单亩用量是否填写
-            if (!validatePesticideDosage()) return;
-
-            // 保存报价信息前先校验是否填写完整
-            if (!validatePriceInfos()) return;
-
-            // 检验服务报价是否填写
-            if (!validateServicePrice()) return;
-            submit();
-        } else {
-            console.log("error submit!");
-        }
-    });
-};
-
-// 检验服务报价是否填写
-const validateServicePrice = () => {
-    if (!servicePricePerMu.value) {
-        ElMessage.warning("请完善服务报价信息");
-        return false;
-    }
-    return true;
-};
-
-// 校验药肥的亩兑水量和单亩用量是否填写
-const validatePesticideDosage = () => {
-    const list = dynamicValidateForm.prescription?.pesticideFertilizerList || [];
-    if (!list.length) return true; // 没有药肥就不校验
-
-    // 找到第一个未填写完整的药肥
-    for (let i = 0; i < list.length; i++) {
-        const item = list[i];
-        // 如果选择了药肥(有 code),就必须填写亩兑水量和单亩用量
-        if (item.code) {
-            const hasRatio = item.ratio !== undefined && item.ratio !== null && item.ratio !== "";
-            const hasDosage = item.dosage !== undefined && item.dosage !== null && item.dosage !== "";
-
-            if (!hasRatio || !hasDosage) {
-                ElMessage.warning("请完善药物处方信息");
-                return false;
-            }
-        }
-    }
-    return true;
-};
-
-// 校验报价信息是否填写完整
-const validatePriceInfos = () => {
-    const list = dynamicValidateForm.prescription?.pesticideFertilizerList || [];
-    if (!list.length) return true; // 没有药肥就不校验
-
-    // 找到第一个未填写完整的药肥
-    const invalidIndex = list.findIndex((item) => {
-        // 只要选择了药肥(有 id),就必须填写单价和品牌
-        if (!item.id) return false; // 没选择药肥不校验
-        const hasPrice = item.price !== undefined && item.price !== null && item.price !== "";
-        const hasBrand = !!item.brand;
-        return !hasPrice || !hasBrand;
-    });
-
-    if (invalidIndex !== -1) {
-        ElMessage.warning("请先完善报价信息");
-        return false;
-    }
-    return true;
-};
-
-const submit = async () => {
-    const params = {
-        ...dynamicValidateForm,
-        serviceMuPrice: servicePricePerMu.value,
-        prescription: dynamicValidateForm.prescription,
-    };
-    const { data, code } = await VE_API.monitor.saveFarmWorkLib(params);
-
-    if (code === 0) {
-        handleSaveInteract(data.id);
-    } else {
-        ElMessage.error(data.message || "保存失败");
-    }
-
-    // 保存报价信息
-    const priceList = {
-        schemeId: route.query.schemeId,
-        pesticideFertilizerInfos: dynamicValidateForm.prescription.pesticideFertilizerList.map((item) => {
-            return {
-                pesticideFertilizerId: item.id,
-                price: item.price,
-                brand: item.brand,
-            };
-        }),
-    };
-    VE_API.farm.updateBatchByScheme(priceList).then(async (res) => {
-        if (res.code === 0) {
-            ElMessage.success("保存成功");
-            router.back();
-        }
-    });
-
-    // 切换标记
-    // VE_API.container_farm_work_arrange.toggleFollow({ id: data.id, isFollow: tagName.value });
-};
-
-// 获取物候期列表
-const getPhenologyList = async () => {
-    const containerSpaceTimeId = route.query.containerSpaceTimeId;
-    if (!containerSpaceTimeId) {
-        phenologyList.value = [];
-        return;
-    }
-    const res = await VE_API.monitor.listPhenology({ containerSpaceTimeId });
-    if (res.code === 0) {
-        phenologyList.value = res.data || [];
-    }
-};
-
-// 获取互动设置详情
-const getFarmWorkArrangeDetail = async (id) => {
-    if (!id) return;
-    const { data, code } = await VE_API.farm.getFarmWorkArrangeDetail({ id });
-    if (code === 0) {
-        tagName.value = data.isFollow;
-        interactFormData.value = {
-            phenologyId: data.phenologyId || "",
-            reproductiveId: data.reproductiveId || "",
-            // interactionTime: data.interactionTime || "",
-            interactionQuestion: data.interactionQuestion || "",
-        };
-    }
-};
-
-// 格式化日期
-const formatInteractDate = (date) => {
-    // 如果已经是字符串格式 YYYY-MM-DD,直接返回
-    if (typeof date === "string" && /^\d{4}-\d{2}-\d{2}$/.test(date)) {
-        return date;
-    }
-    // 如果是 Date 对象,进行转换
-    if (date instanceof Date) {
-        let year = date.getFullYear();
-        let month = String(date.getMonth() + 1).padStart(2, "0");
-        let day = String(date.getDate()).padStart(2, "0");
-        return `${year}-${month}-${day}`;
-    }
-    // 其他情况返回原值
-    return date;
-};
-
-// 校验标记是否已选择
-const validateTagName = () => {
-    if (tagName.value !== 1 && tagName.value !== 2) {
-        ElMessage.warning("请选择标记类型");
-        return false;
-    }
-    return true;
-};
-
-// 验证互动表单
-const validateInteractForm = () => {
-    if (!interactFormData.value.phenologyId) {
-        ElMessage.warning("请选择互动阶段");
-        return false;
-    }
-    if (!interactFormData.value.reproductiveId) {
-        ElMessage.warning("请选择互动阶段");
-        return false;
-    }
-    // if (!interactFormData.value.interactionTime) {
-    //     ElMessage.warning("请选择互动时间");
-    //     return false;
-    // }
-    if (!interactFormData.value.interactionQuestion?.trim()) {
-        ElMessage.warning("请设置互动问题");
-        return false;
-    }
-    return true;
-};
-
-// 保存互动设置
-const handleSaveInteract = async (id) => {
-    const paramsObj = {
-        farmWorkId: id,
-        schemeId: route.query.schemeId,
-        ...interactFormData.value,
-        // interactionTime: formatInteractDate(interactFormData.value.interactionTime),
-    };
-
-    try {
-        const res = await VE_API.monitor.updateFarmWorkArrange(paramsObj);
-        if (res.code !== 0) {
-            ElMessage.error(res.message || "保存农情互动信息失败");
-            return false;
-        }
-        return true;
-    } catch (error) {
-        console.error("保存互动设置失败:", error);
-        ElMessage.error("保存失败,请重试");
-        return false;
-    }
-};
-
-// 删除互动设置
-const handleDeleteInteract = () => {
-    ElMessageBox.confirm("确定要删除该互动设置吗?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-    })
-        .then(async () => {
-            if (!detailData.value.id) return;
-            const res = await VE_API.monitor.deleteFarmWorkArrange({ id: detailData.value.id });
-            if (res.code === 0) {
-                ElMessage.success("删除成功");
-                // 清空表单数据
-                interactFormData.value = {
-                    phenologyId: "",
-                    reproductiveId: "",
-                    // interactionTime: "",
-                    interactionQuestion: "",
-                };
-            } else {
-                ElMessage.error(res.message || "删除失败");
-            }
-        })
-        .catch(() => {
-            // 用户取消,不做任何操作
-        });
-};
-</script>
-
-<style lang="scss" scoped>
-.new-farming-page {
-    height: 100vh;
-    position: relative;
-    overflow: auto;
-    font-size: 14px;
-    background: #f2f3f5;
-    ::v-deep {
-        .custom-header {
-            position: fixed;
-            top: 0;
-            padding-bottom: 1px;
-        }
-    }
-    .step-wrap {
-        padding: 12px 0;
-    }
-    .box-wrap {
-        background: #fff;
-        padding: 20px 10px 10px;
-        border-radius: 6px;
-    }
-    .new-farming-content {
-        margin: 41px 0 62px 0;
-        padding: 4px 12px 8px 12px;
-        width: 100%;
-        box-sizing: border-box;
-        &.no-permission {
-            margin-bottom: 12px;
-        }
-
-        // ::v-deep {
-        //     .el-select__input {
-        //         color: #2199F8;
-        //     }
-        //     .el-select__wrapper {
-        //         color: #2199F8;
-        //         min-height: 30px;
-        //         line-height: 28px;
-        //         box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-        //     }
-        //     .el-select__caret {
-        //         color: #2199F8;
-        //     }
-        //     .el-select__placeholder {
-        //         color: #2199F8;
-        //     }
-        //     .el-radio {
-        //         margin-right: 16px;
-        //     }
-        //     .el-input__wrapper {
-        //         box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-        //     }
-        //     .el-input__prefix {
-        //         color: #2199F8;
-        //     }
-        //     .el-input__inner {
-        //         color: #2199F8;
-        //         --el-input-placeholder-color: rgba(33, 153, 248, 0.43);
-        //     }
-        //     .el-tag.el-tag--info {
-        //         --el-tag-text-color: #2199F8;
-        //         --el-tag-bg-color: rgba(33, 153, 248, 0.1);
-        //     }
-        // }
-        .farm-info {
-            color: rgba(0, 0, 0, 0.6);
-            font-size: 14px;
-            margin-top: 14px;
-            .info-title {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                color: rgba(41, 41, 41, 0.3);
-                .info-more {
-                    display: flex;
-                    align-items: center;
-                }
-            }
-        }
-        .farm-photo {
-            margin-top: 10px;
-            .photo-list {
-                display: flex;
-                align-items: center;
-                width: 100%;
-                overflow: auto;
-                padding-bottom: 10px;
-                .photo-item {
-                    width: 92px;
-                    height: 92px;
-                    border-radius: 8px;
-                    object-fit: cover;
-                }
-                .img-item {
-                    img {
-                        width: 92px;
-                        height: 92px;
-                        border-radius: 8px;
-                        object-fit: cover;
-                        margin-right: 12px;
-                    }
-                }
-            }
-            .list-text {
-                text-align: center;
-                color: rgba(0, 0, 0, 0.5);
-                padding-top: 2px;
-            }
-        }
-        .submit-btn {
-            z-index: 10;
-            position: fixed;
-            bottom: 0px;
-            left: 0;
-            width: 100%;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            padding: 12px;
-            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);
-            &.center-btn {
-                justify-content: center;
-            }
-            .btn {
-                height: 40px;
-                border-radius: 25px;
-                line-height: 40px;
-                width: 110px;
-                text-align: center;
-                background: linear-gradient(180deg, #70bffe, #2199f8);
-                color: #ffffff;
-                font-size: 14px;
-                &.second {
-                    background: #ffffff;
-                    border: 1px solid rgba(153, 153, 153, 0.5);
-                    color: #666666;
-                }
-            }
-            .btn + .btn {
-                margin-left: 12px;
-            }
-        }
-    }
-    .card-title {
-        font-size: 16px;
-        font-weight: bold;
-        color: #000;
-        display: flex;
-        align-items: center;
-        &.between {
-            justify-content: space-between;
-            .del-tag {
-                color: #e04c4c;
-                border: 1px solid #e04c4c;
-                border-radius: 5px;
-                padding: 4px 14px;
-                font-size: 12px;
-                font-weight: normal;
-            }
-            .title-tag {
-                padding: 2px 10px;
-                height: 26px;
-                line-height: 26px;
-            }
-        }
-        // justify-content: space-between;
-        .add-tag {
-            font-size: 12px;
-            color: #2199f8;
-            padding: 0px 11px;
-            border: 1px solid #2199f8;
-            border-radius: 5px;
-            font-weight: normal;
-            height: 28px;
-            line-height: 28px;
-        }
-        .type-tag {
-            margin-left: 5px;
-            font-size: 12px;
-            color: #000000;
-            padding: 0 10px;
-            background: rgba(119, 119, 119, 0.1);
-            border-radius: 20px;
-            font-weight: normal;
-            height: 26px;
-            line-height: 26px;
-            display: inline-block;
-        }
-    }
-    .pb-12 {
-        padding-bottom: 12px;
-    }
-    .farm-card {
-        background: #ffffff;
-        border-radius: 8px;
-        padding: 12px 12px 0 12px;
-        width: 100%;
-        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;
-        }
-        &.prescription-content {
-            padding: 12px;
-        }
-        .border-bottom {
-            padding-bottom: 7px;
-            border-bottom: 1px solid rgba(245, 245, 245, 0.99);
-        }
-    }
-
-    .table-item {
-        padding: 6px 0 10px 0;
-        .form-item {
-            display: flex;
-            align-items: center;
-            font-size: 14px;
-            color: #767676;
-            height: 24px;
-            .item-name {
-                width: 80px;
-                color: rgba(0, 0, 0, 0.2);
-            }
-        }
-    }
-
-    .new-wrap {
-        border-radius: 5px;
-        text-align: center;
-        border: 1px solid rgba(225, 225, 225, 0.5);
-        .new-title {
-            background: rgba(241, 241, 241, 0.4);
-            border-radius: 5px 5px 0 0;
-            border-bottom: 1px solid rgba(225, 225, 225, 0.5);
-            display: flex;
-            color: #767676;
-            // justify-content: space-around;
-            padding: 5px 6px;
-            font-size: 12px;
-            .table-name {
-                width: 24px;
-                font-size: 12px;
-                margin: 0 auto;
-            }
-        }
-
-        .title-1 {
-            width: 46px;
-        }
-        .title-2 {
-            flex: 1;
-        }
-        .title-3 {
-            width: 52px;
-        }
-        .title-4 {
-            width: 56px;
-        }
-        .title-5 {
-            width: 52px;
-        }
-        .new-table-wrap {
-            padding: 5px 0;
-            .new-prescription + .new-prescription {
-                border-top: 1px solid rgba(225, 225, 225, 0.8);
-            }
-            // .new-prescription {
-            .new-table {
-                display: flex;
-                align-items: center;
-                // border: 1px solid rgba(225, 225, 225, 0.8);
-                background: #fff;
-                border-radius: 5px;
-                color: rgba(0, 0, 0, 0.6);
-                font-size: 11px;
-                .line-l {
-                    display: flex;
-                    flex: 1;
-                    .line-2 {
-                        flex: 1;
-                        padding: 0 2px;
-                    }
-                }
-                .line-r {
-                    &.has-border {
-                        border-left: 1px solid rgba(225, 225, 225, 0.8);
-                    }
-                    .line-3 {
-                        display: flex;
-                        align-items: center;
-                    }
-                    .sub-line {
-                        padding: 10px 0;
-                    }
-                    .line-4 {
-                        display: flex;
-                        align-items: center;
-                        border-top: 1px solid rgba(225, 225, 225, 0.8);
-                    }
-                    .execute-line {
-                        border-right: 1px solid rgba(225, 225, 225, 0.8);
-                    }
-                }
-            }
-            .note-text {
-                margin: 8px 0 4px 0;
-                color: rgba(0, 0, 0, 0.4);
-                background: #fff;
-                padding: 6px 8px;
-                border-radius: 5px;
-                text-align: left;
-                font-size: 11px;
-            }
-            // }
-            // .new-prescription + .new-prescription {
-            //     padding-top: 8px;
-            // }
-        }
-    }
-
-    .info-content-wrap {
-        ::v-deep {
-            .new-table-wrap {
-                padding: 5px 0;
-                .new-prescription + .new-prescription {
-                    border-top: 1px solid rgba(225, 225, 225, 0.8);
-                }
-            }
-        }
-    }
-    .price-bottom {
-        padding-top: 8px;
-
-        .info-title-wrap {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            color: #000;
-            .info-more {
-                font-size: 18px;
-            }
-            .unit-text {
-                font-size: 12px;
-            }
-        }
-        .price-info {
-            padding: 8px 0;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            color: rgba(0, 0, 0, 0.2);
-            .main-text {
-                padding-left: 6px;
-                color: rgba(0, 0, 0, 0.8);
-            }
-            .info-c {
-                flex: 1;
-                text-align: center;
-            }
-        }
-        .price-total {
-            height: 38px;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            border: 1px solid rgba(33, 153, 248, 0.5);
-            background: rgba(33, 153, 248, 0.1);
-            color: #000000;
-            border-radius: 4px;
-            .main-val {
-                font-size: 20px;
-                font-weight: bold;
-                color: #2199f8;
-                padding-right: 2px;
-            }
-        }
-    }
-    .pb-8 {
-        padding-bottom: 8px;
-    }
-
-    .common-inputs {
-        ::v-deep {
-            .el-input__wrapper {
-                box-shadow: none;
-            }
-            .el-input-group__append {
-                padding: 0 10px;
-                background: none;
-                box-shadow: none;
-            }
-            .el-input-group__append {
-                color: rgba(33, 153, 248, 0.5);
-            }
-            .el-input {
-                border: 1px solid rgba(33, 153, 248, 0.3);
-                border-radius: 5px;
-                height: 30px;
-                box-sizing: border-box;
-            }
-            .el-input__wrapper {
-                padding: 0 2px 0 10px;
-                height: 28px;
-                line-height: 28px;
-                min-height: 28px;
-            }
-            .el-input__inner {
-                --el-input-inner-height: 28px;
-                height: 28px;
-                line-height: 28px;
-                min-height: 28px;
-                color: #2199f8;
-                --el-input-placeholder-color: rgba(33, 153, 248, 0.43);
-            }
-
-            .el-select__wrapper {
-                box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-            }
-            .el-select__placeholder,
-            .el-select__caret {
-                color: #2199f8;
-            }
-        }
-    }
-
-    .medicine-box {
-        // padding-top: 10px;
-        border: 1px solid rgba(33, 153, 248, 0.8);
-        position: relative;
-        border-radius: 6px;
-        .item-title {
-            padding-left: 5px;
-            font-size: 16px;
-            color: #000000;
-            font-weight: 500;
-            padding-bottom: 10px;
-        }
-        .medicine-item {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            height: 32px;
-            .item-name {
-                color: rgba(0, 0, 0, 0.4);
-            }
-            .item-val {
-                min-width: 142px;
-                text-align: center;
-                color: #302f2f;
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                gap: 4px;
-                .price-unit {
-                    font-size: 12px;
-                    color: rgba(0, 0, 0, 0.4);
-                    white-space: nowrap;
-                }
-            }
-            .item-total {
-                font-size: 16px;
-                color: #000;
-            }
-            .item-price {
-                color: #2199f8;
-                font-size: 20px;
-                font-weight: bold;
-                .item-unit {
-                    font-size: 14px;
-                    font-weight: normal;
-                    padding-left: 2px;
-                    color: #474747;
-                }
-            }
-        }
-        .medicine-item + .medicine-item {
-            padding-top: 2px;
-        }
-        .mt-8 {
-            margin-top: 8px;
-        }
-    }
-
-    .usage-mode-wrap {
-        padding: 0 12px;
-        margin-top: 12px;
-        .info-content {
-            padding-top: 14px;
-            padding-bottom: 1px;
-        }
-
-        .el-form-item--default {
-            margin-bottom: 0;
-        }
-    }
-
-    ::v-deep {
-        .el-form-item__label {
-            height: 30px;
-            line-height: 30px;
-            color: rgba(0, 0, 0, 0.4);
-        }
-        .el-form-item.is-required:not(.is-no-asterisk).asterisk-left > .el-form-item__label:before {
-            display: none;
-        }
-    }
-    .interact-content {
-        padding: 10px 0;
-        line-height: 20px;
-        color: #919191;
-        font-size: 14px;
-    }
-    .interact-form {
-        padding: 8px 0 20px 0px;
-
-        .interact-form-item {
-            display: flex;
-            align-items: baseline;
-            margin-bottom: 12px;
-
-            &:last-child {
-                margin-bottom: 0;
-            }
-
-            .form-label {
-                width: 70px;
-                color: rgba(0, 0, 0, 0.4);
-                font-weight: normal;
-                margin-right: 10px;
-                font-size: 14px;
-                flex: none;
-            }
-
-            .form-input-wrapper {
-                position: relative;
-                width: calc(100% - 70px);
-                &.two-select {
-                    display: flex;
-                    gap: 10px;
-                    .select-item {
-                        flex: 1;
-                    }
-                }
-                ::v-deep {
-                    .el-input__inner {
-                        caret-color: transparent;
-                        padding-right: 40px;
-                    }
-
-                    .el-input__suffix {
-                        display: none;
-                    }
-                }
-            }
-
-            .question-textarea {
-                ::v-deep {
-                    .el-textarea__inner {
-                        resize: none;
-                        line-height: 1.5;
-                        min-height: 80px;
-                    }
-                }
-            }
-        }
-
-        .interact-buttons {
-            display: flex;
-            gap: 12px;
-            padding-top: 16px;
-
-            .btn-delete,
-            .btn-save {
-                flex: 1;
-                padding: 8px;
-                border-radius: 25px;
-                font-size: 16px;
-                text-align: center;
-                cursor: pointer;
-                transition: all 0.3s;
-                user-select: none;
-            }
-
-            .btn-delete {
-                background: #ffffff;
-                border: 1px solid #ff4d4f;
-                color: #ff4d4f;
-
-                &:hover {
-                    background: #fff5f5;
-                }
-
-                &:active {
-                    opacity: 0.8;
-                    transform: scale(0.98);
-                }
-            }
-
-            .btn-save {
-                background: #2199f8;
-                color: #fff;
-                border: none;
-
-                &:hover:not(.disabled) {
-                    background: #1a8ae6;
-                }
-
-                &:active:not(.disabled) {
-                    opacity: 0.9;
-                    transform: scale(0.98);
-                }
-
-                &.disabled {
-                    opacity: 0.6;
-                    cursor: not-allowed;
-                    pointer-events: none;
-                }
-            }
-        }
-    }
-    .edit-tag {
-        padding-left: 4px;
-        color: #2199f8;
-    }
-    .tag-text {
-        font-size: 12px;
-        font-weight: normal;
-    }
-    .info-content {
-        padding: 10px 0;
-        position: relative;
-
-        .condition-wrap {
-            display: flex;
-            align-items: center;
-            width: 100%;
-            .symbol {
-                width: 10px;
-                // text-align: center;
-                // padding: 0 4px;
-            }
-        }
-        .item-input {
-            // width: 60%;
-            min-width: 140px;
-            max-width: 240px;
-        }
-        .recheck-text {
-            padding-left: 6px;
-        }
-        .info-item {
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
-            width: 100%;
-        }
-        .info-item + .info-item {
-            margin-top: 12px;
-        }
-
-        .bottom-map {
-            width: 100%;
-            height: 250px;
-            clip-path: inset(0px round 8px);
-        }
-        .check-btn {
-            position: absolute;
-            bottom: 16px;
-            right: 6px;
-            background: rgba(0, 0, 0, 0.6);
-            padding: 0 8px;
-            border-radius: 8px;
-
-            ::v-deep {
-                .el-checkbox {
-                    color: #fff;
-                }
-            }
-        }
-        .area-select {
-            padding-bottom: 12px;
-            .block {
-                width: 12px;
-                display: inline-block;
-            }
-        }
-    }
-
-    ::v-deep {
-        .el-form-item--default {
-            margin-bottom: 8px;
-            
-            &.name-item {
-                margin-bottom: 14px;
-            }
-            &.text-item {
-                margin-bottom: 2px;
-                .el-form-item__content {
-                    line-height: 24px;
-                }
-                .el-form-item__label {
-                    height: 24px;
-                    line-height: 24px;
-                }
-            }
-        }
-    }
-    .sub-title {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        color: rgba(0, 0, 0, 0.6);
-        font-size: 14px;
-        .add-tag {
-            font-size: 12px;
-            color: #2199f8;
-            padding: 0 8px;
-            border: 1px solid #2199f8;
-            border-radius: 5px;
-            font-weight: normal;
-            height: 28px;
-            line-height: 28px;
-        }
-    }
-    .font-bold {
-        font-weight: 500;
-        color: #000000;
-    }
-    .form-index {
-        position: absolute;
-        left: 0;
-        top: 0;
-        padding: 0 6px;
-        background: #2199f8;
-        border-radius: 5px 0 4px 0;
-        height: 18px;
-        line-height: 18px;
-        font-size: 12px;
-        color: #fff;
-    }
-    .recipe-item {
-        width: 100%;
-        .recipe-form {
-            padding-top: 8px;
-            ::v-deep {
-                .el-form-item {
-                    &:last-child {
-                        margin-bottom: 0;
-                    }
-                }
-            }
-        }
-
-        .mt-8 {
-            margin-top: 8px;
-        }
-
-        .box-item {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            color: rgba(0, 0, 0, 0.4);
-            .r-text {
-                color: #302f2f;
-                width: 150px;
-                text-align: center;
-            }
-            .form-r {
-                width: 150px;
-                min-width: 140px;
-                max-width: 240px;
-            }
-        }
-        .form-box {
-            border: 1px solid rgba(33, 153, 248, 0.8);
-            border-radius: 6px;
-            padding: 20px 10px;
-            width: 100%;
-            box-sizing: border-box;
-            position: relative;
-            // background: rgb(209, 235, 255, 0.3);
-            // margin-bottom: 12px;
-            .input-box {
-                &.mark-box {
-                    padding: 8px 0 12px 0;
-                }
-            }
-
-            // .input-unit {
-            //     ::v-deep {
-            //         .el-input {
-            //             border: 1px solid #dcdfe6;
-            //             border-radius: 5px;
-            //             height: 32px;
-            //             box-sizing: border-box;
-            //         }
-            //         .el-input__wrapper {
-            //             padding: 0 2px 0 10px;
-            //             height: 30px;
-            //             line-height: 30px;
-            //             min-height: 30px;
-            //             box-shadow: none;
-            //         }
-            //         .el-input__inner {
-            //             --el-input-inner-height: 30px;
-            //             height: 30px;
-            //             line-height: 30px;
-            //             min-height: 30px;
-            //             color: #606266;
-            //             --el-input-placeholder-color: #a8abb2;
-            //         }
-            //         .el-input-group__append {
-            //             box-shadow: none;
-            //             border: none;
-            //             background: none;
-            //         }
-            //     }
-            // }
-            // .text-center {
-            //     ::v-deep {
-            //         .el-input__inner {
-            //             text-align: center;
-            //         }
-            //     }
-            // }
-            .action-btn {
-                margin-top: 12px;
-                display: flex;
-                justify-content: flex-end;
-                .btn {
-                    color: #8f8f8f;
-                    border-radius: 25px;
-                    padding: 5px 30px;
-                }
-                .delete-btn {
-                    color: rgba(255, 89, 89, 0.9);
-                    background: #fff;
-                    border: 1px solid rgba(255, 89, 89, 0.9);
-                }
-            }
-            .btn-group {
-                padding-top: 12px;
-            }
-            .sub-item {
-                // padding-left: 10px;
-                .has-sub {
-                    display: flex;
-                    flex-direction: column;
-                    align-items: center;
-                    .main-name {
-                        line-height: 20px;
-                    }
-                    .sub-name {
-                        font-size: 10px;
-                        color: rgba(129, 129, 129, 0.5);
-                        line-height: 14px;
-                    }
-                }
-                .colunm-sub {
-                    display: flex;
-                    align-items: center;
-                    .sub-name {
-                        font-size: 10px;
-                        color: rgba(129, 129, 129, 0.5);
-                    }
-                }
-                .r-text {
-                    width: 132px;
-                    text-align: center;
-                    font-size: 14px;
-                    color: #474747;
-                }
-                .price {
-                    ::v-deep {
-                        .el-input__wrapper {
-                            box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-                        }
-                        .el-input__inner {
-                            color: #2199f8;
-                        }
-                    }
-                }
-            }
-            .form-title {
-                font-size: 14px;
-                padding-top: 6px;
-                color: #000;
-                font-weight: 600;
-            }
-            .box-item + .box-item {
-                margin-top: 8px;
-            }
-        }
-        .form-box + .form-box {
-            margin-top: 8px;
-        }
-        .usageMode-wrap {
-            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;
-    }
-}
-
-.tag-list {
-    font-size: 14px;
-    .tag-item + .tag-item {
-        margin-top: 6px;
-    }
-    .tag-item {
-        padding: 2px 8px;
-        text-align: center;
-        &.active {
-            color: #2199f8;
-            background: rgba(33, 153, 248, 0.16);
-            border-radius: 4px;
-        }
-    }
-}
-.task-tips-popup {
-    width: 75%;
-    padding: 28px 28px 20px;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-    .create-farm-icon {
-        width: 40px;
-        height: 40px;
-        margin-bottom: 12px;
-    }
-    .farm-check-icon {
-        width: 68px;
-        height: 68px;
-        margin-bottom: 12px;
-    }
-    .create-farm-text {
-        font-size: 20px;
-        font-weight: 500;
-        line-height: 40px;
-        margin-bottom: 32px;
-        text-align: center;
-        &.success-text {
-            font-size: 24px;
-            font-weight: 500;
-        }
-    }
-    .main-text {
-        color: #2199f8;
-    }
-    .create-farm-btn {
-        width: 100%;
-        box-sizing: border-box;
-        padding: 8px;
-        border-radius: 25px;
-        font-size: 16px;
-        background: #2199f8;
-        color: #fff;
-        text-align: center;
-    }
-}
-</style>

+ 0 - 1193
src/views/old_mini/modify_work/completedWork.vue

@@ -1,1193 +0,0 @@
-<template>
-    <div class="completed-work">
-        <custom-header name="农事详情" isGoBack @goback="handleClose"></custom-header>
-        <div class="work-content">
-            <!-- <div class="step-wrap" v-show="query.status !== 'warning'">
-                <farm-steps :currentStep="currentStep" />
-            </div> -->
-            <div class="content-status">
-                <div class="status-l">
-                    <div class="stauts-text">待完成</div>
-                    <div class="stauts-sub-text" v-if="detailData?.executeDeadlineDate && !detailData?.expectedExecuteDate">
-                        截止到 <span class="time-text">{{ detailData?.executeDeadlineDate }}</span>
-                    </div>
-                    <div class="stauts-sub-text" v-if="detailData?.expectedExecuteDate">
-                        <template v-if="daysDiff > 0">
-                            距离执行时间还剩 <span class="time-text">{{ daysDiff }} 天</span>
-                        </template>
-                        <template v-else-if="daysDiff === 0">
-                            执行时间为今天
-                        </template>
-                        <template v-else>
-                            执行时间已过
-                        </template>
-                    </div>
-                </div>
-                <!-- <template v-if="query.status !== 'warning'">
-                    <div class="status-r" v-if="curRole == 0">{{ status === 0 ? "设置提醒" : "去评价" }}</div>
-                    <div class="status-r" v-if="curRole == 1">{{ status === 0 ? "提醒执行" : "提醒复核" }}</div>
-                    <div class="status-r" v-if="curRole == 2">{{ status === 0 ? "提醒执行" : "提醒复核" }}</div>
-                </template> -->
-            </div>
-            <div class="work-wrap" v-if="query?.farmWorkOrderId || detailData?.flowStatus === 4">
-                <div class="box-wrap executor-info" v-if="query.status === 'warning' || curRole == 0 || curRole == 2">
-                    <!-- <div class="executor-title">执行人</div> -->
-                    <div class="executor-content">
-                        <div class="executor-info mt-0">
-                            <div class="executor-avatar">
-                                <img
-                                    src="https://birdseye-img-ali-cdn.sysuimars.com/16926861-1e20-4cbd-8bf2-90208db5a2d0/806080da-1a30-4b5b-b64b-b22e722c6cb6/DJI_202509010800_001_806080da-1a30-4b5b-b64b-b22e722c6cb6/DJI_20250901080536_0045_V_code-ws0fsmge97gh.jpeg?x-oss-process=image/resize,w_500"
-                                    alt="执行人"
-                                />
-                            </div>
-                            <div class="executor-details">
-                                <div class="org-name">
-                                    <span class="name">{{ quotationData.agriculturalStoreName || "--" }}</span>
-                                    <span class="rating">{{
-                                        quotationData.score ? quotationData.score + "分" : ""
-                                    }}</span>
-                                </div>
-                                <div class="service-info">
-                                    <div class="service-item">
-                                        服务品种:
-                                        <span v-if="speciesList.length">
-                                            <span v-for="(sp, sIdx) in speciesList" :key="sIdx">
-                                                {{ sp }}<template v-if="sIdx < speciesList.length - 1">、</template>
-                                            </span>
-                                        </span>
-                                        <span v-else>--</span>
-                                    </div>
-                                    <div class="service-item">
-                                        服务设备:
-                                        <span v-if="equipmentList.length">
-                                            <span v-for="(eq, eIdx) in equipmentList" :key="eIdx">
-                                                {{ eq }}<template v-if="eIdx < equipmentList.length - 1">、</template>
-                                            </span>
-                                        </span>
-                                        <span v-else>--</span>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                        <div class="farm-info">
-                            <div class="info-title-wrap" v-if="quotationData.prescriptionList?.length && quotationData.prescriptionList[0]?.pesticideFertilizerList?.length > 0">
-                                <div class="sub-title">药肥费用</div>
-                                <div class="info-more">
-                                    {{ pesticideCostTotal ? formatArea(pesticideCostTotal) : "--"
-                                    }}<span class="unit-text">元</span>
-                                </div>
-                            </div>
-                            <div class="info-content-wrap">
-                                <price-table
-                                    :prescriptionData="quotationData.prescriptionList"
-                                    :area="detailData?.area"
-                                    :isArrList="true"
-                                >
-                                    <template #bottomContent>
-                                        <div class="price-bottom">
-                                            <div class="info-title-wrap">
-                                                <div class="sub-title">服务费用</div>
-                                                <div class="info-more">
-                                                    {{ detailData?.serviceMuPrice ? serviceCostTotal : "--" }}
-                                                    <span class="unit-text">元</span>
-                                                </div>
-                                            </div>
-                                            <div class="price-info">
-                                                <div class="info-l">
-                                                    单亩价格<span class="main-text">{{
-                                                        detailData?.serviceMuPrice
-                                                            ? detailData?.serviceMuPrice + "元/亩"
-                                                            : "--"
-                                                    }}</span>
-                                                </div>
-                                            </div>
-                                            <div class="price-total">
-                                                报价合计:<span class="main-val">
-                                                    {{ totalCost ? formatArea(totalCost) : "--" }} </span
-                                                >元
-                                            </div>
-                                        </div>
-                                    </template>
-                                </price-table>
-                            </div>
-                        </div>
-                        <!-- <div class="contact-buttons">
-                            <button class="contact-btn">电话联系</button>
-                            <button class="contact-btn">在线联系</button>
-                        </div> -->
-                    </div>
-                </div>
-            </div>
-            <div class="work-wrap info-wrap">
-                <div class="box-wrap farm-data">
-                    <div class="card-title">
-                        <div>{{ detailData?.farmWorkName }}<span class="type-tag">标准农事</span></div>
-                        <!-- <div class="point-wrap">
-                            <div class="point"></div>
-                            <span>2区</span>
-                        </div> -->
-                        <div class="tag-text">托管农事</div>
-                    </div>
-                    <div class="data-content">
-                        <div class="form-item">
-                            <div class="item-name">农事编号</div>
-                            <div class="item-text">{{ detailData?.code }}</div>
-                        </div>
-                        <div class="form-item">
-                            <div class="item-name">服务亩数</div>
-                            <div class="item-text">
-                                {{ detailData?.area ? formatArea(detailData?.area) + "亩" : "--" }}
-                            </div>
-                        </div>
-                        <div class="form-item">
-                            <div class="item-name">服务区域</div>
-                            <div class="item-text">{{ detailData?.serviceRegion }}</div>
-                        </div>
-                        <!-- <div class="form-item">
-                            <div class="item-name">触发条件</div>
-                            <div class="item-text">{{ detailData?.condition }}</div>
-                        </div> -->
-                        <div class="form-item" v-if="detailData?.expectedExecuteDate">
-                            <div class="item-name">执行时间</div>
-                            <div class="item-text">
-                                {{detailData?.expectedExecuteDate}}
-                            </div>
-                        </div>
-                        <div class="form-item" v-else-if="detailData?.executeDeadlineDate">
-                            <div class="item-name">截止日期</div>
-                            <div class="item-text">
-                                {{detailData?.executeDeadlineDate}}
-                            </div>
-                        </div>
-                    </div>
-                </div>
-
-                <div class="box-wrap farm-table">
-                    <div class="card-title">药物处方</div>
-                    <div class="table-item">
-                        <div class="form-item">
-                            <div class="item-name">施用方式</div>
-                            <div class="item-text">{{ detailData?.usageMode || '其他' }}</div>
-                        </div>
-                        <div class="form-item">
-                            <div class="item-name">执行方式</div>
-                            <div class="item-text">
-                                {{ quotationData?.executionMethodName }}
-                            </div>
-                        </div>
-                    </div>
-                    <div class="new-wrap" v-if="detailData?.prescriptionList?.length && detailData?.prescriptionList[0]?.pesticideFertilizerList?.length > 0">
-                        <div class="new-title">
-                            <div class="title-1"><div class="table-name">药肥类型</div></div>
-                            <div class="title-2"><div class="table-name">药肥名称</div></div>
-                            <div class="title-4"><div class="table-name">药肥配比</div></div>
-                            <div class="title-5"><div class="table-name">单亩用量</div></div>
-                        </div>
-                        <div
-                            class="new-table-wrap"
-                            v-for="(prescriptionItem, prescriptionI) in detailData?.prescriptionList"
-                            :key="prescriptionI"
-                        >
-                            <div
-                                class="new-prescription"
-                                v-for="(subP, subI) in prescriptionItem.pesticideFertilizerList"
-                                :key="subI"
-                            >
-                                <div class="new-table">
-                                    <div class="line-l">
-                                        <div class="line-1 title-1">{{ subP.typeName }}</div>
-                                        <div class="line-2">{{ subP.defaultName || subP.pesticideFertilizerName }}</div>
-                                    </div>
-                                    <div class="line-r">
-                                        <div class="line-3">
-                                            <div class="sub-line title-4">{{ quotationData.executionMethod === 1 ? subP.ratio2 : subP.ratio }}倍</div>
-                                            <div class="sub-line title-5">{{ quotationData.executionMethod === 1 ? subP.muUsage2 : subP.muUsage }}{{ subP.unit }}</div>
-                                        </div>
-                                    </div>
-                                </div>
-                                <div class="note-text" v-if="subP.remark">{{ subP.remark }}</div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-
-                <!-- <div class="work-map">
-                    <div class="card-title">执行农事区域</div>
-                    <div class="map-content">
-                        <div class="map-dom" ref="areaRef"></div>
-                    </div>
-                </div> -->
-            </div>
-
-            <!-- 农资,步骤:农资已执行,请求确认 -->
-            <div class="fixed-btn-wrap" :class="{'center': !getButtonText()}" v-if="curRole == 2 && !detailData?.expectedExecuteDate">
-                <div class="fixed-btn orange primary-text" @click="handleRemindExecuteTime" v-if="getButtonText()">提醒确认执行时间</div>
-                <div class="fixed-btn orange" @click="selectExecuteTime">确认执行时间</div>
-            </div>
-            <div class="fixed-btn-wrap" :class="{'center': !getButtonText()}" v-if="curRole == 2 && detailData?.expectedExecuteDate">
-                <div class="fixed-btn primary primary-text width-120" @click="handleExecute" v-if="getButtonText()">提醒执行</div>
-                <div class="fixed-btn primary" @click="showOfferPopup(detailData)">上传照片</div>
-            </div>
-
-            <!-- 农资,步骤:农事已确认 -->
-            <!-- <div class="fixed-btn-wrap" v-if="curRole == 2 && detailData?.expectedExecuteDate">
-                <div class="fixed-btn second" @click="showPriceSheetPopup">生成报价单</div>
-                <div class="fixed-btn" @click="handleTimelineAction(detailData)">转入农事任务</div>
-            </div> -->
-        </div>
-    </div>
-    <!-- 报价弹窗 -->
-    <!-- <offer-popup :showPopup="showPopup" :executionData="executionData"></offer-popup> -->
-    <!-- 服务报价单 -->
-    <price-sheet-popup ref="priceSheetPopupRef"></price-sheet-popup>
-    <!-- 需求发送成功 -->
-    <popup v-model:show="showTaskPopup" round class="task-tips-popup">
-        <template v-if="taskPopupType === 'warning'">
-            <img class="create-farm-icon" src="@/assets/img/home/create-farm-icon.png" alt="" />
-            <div class="create-farm-text">
-                <div>您确认取消已发起的农事需求吗</div>
-            </div>
-        </template>
-        <template v-else-if="taskPopupType === 'warningIgnore'">
-            <img class="create-farm-icon" src="@/assets/img/home/create-farm-icon.png" alt="" />
-            <div class="create-farm-text">
-                <div>
-                    您确认忽略 <span class="main-text">{{ detailData?.farmName }}</span> 的
-                    <span class="main-text">{{ detailData?.farmWorkName }}</span> 农事吗
-                </div>
-            </div>
-        </template>
-        <template v-else>
-            <img class="farm-check-icon" src="@/assets/img/home/right.png" alt="" />
-            <div class="create-farm-text success-text">{{ successText }}</div>
-        </template>
-        <div class="create-farm-btn" @click="handlePopupBtn">
-            {{ taskPopupType === "warning" ? "确认" : taskPopupType === "warningIgnore" ? "确认忽略" : "我知道了" }}
-        </div>
-    </popup>
-
-    <!-- 确认执行时间 -->
-    <calendar v-model:show="showCalendar" @confirm="onConfirmExecuteTime" :min-date="minDate" :max-date="maxDate" />
-
-    <!-- 上传照片弹窗 -->
-    <review-upload-popup :key="10" v-model="showUpload" :record-id="sectionId" @success="handleSelfDone" />
-
-    <!-- 新增:激活上传弹窗 -->
-    <active-upload-popup ref="activeUploadPopupRef" @handleUploadSuccess="handleUploadSuccess"></active-upload-popup>
-
-    <offer-popup ref="offerPopupRef" @uploadSuccess="handleUploadSuccess"></offer-popup>
-</template>
-
-<script setup>
-import customHeader from "@/components/customHeader.vue";
-import { ref, computed, onActivated, onDeactivated } from "vue";
-// import NewFarmMap from "./newFarmMap";
-import { useStore } from "vuex";
-import { Popup, Calendar } from "vant";
-import offerPopup from "@/components/popup/offerPopup.vue";
-import { useRouter, useRoute } from "vue-router";
-import farmSteps from "@/components/farmSteps.vue";
-import priceTable from "../agri_work/components/priceTable.vue";
-import priceSheetPopup from "@/components/popup/priceSheetPopup.vue";
-import uploadExecute from "@/views/old_mini/task_condition/components/uploadExecute.vue";
-import { base_img_url2 } from "@/api/config";
-import { ElMessage } from "element-plus";
-import { formatArea, formatDate } from "@/common/commonFun";
-import wx from "weixin-js-sdk";
-import reviewUploadPopup from "@/components/popup/reviewUploadPopup.vue";
-import FnShareSheet from "@/components/pageComponents/FnShareSheet.vue";
-import activeUploadPopup from "@/components/popup/activeUploadPopup.vue";
-import eventBus from "@/api/eventBus";
-
-const router = useRouter();
-const store = useStore();
-const query = ref({});
-// 角色
-// const curRole = store.state.app.curRole
-const curRole = ref(localStorage.getItem("SET_USER_CUR_ROLE"));
-// const curRole = 2;
-
-// 农资待生成报价单--currentStep:1;curRole:2
-// 农资已执行,有执行照片,请求确认--currentStep:2;curRole:2
-
-const showUpload = ref(false);
-const sectionId = ref(null);
-// 上传照片处理函数
-const handleUploadPhoto = ({ id }) => {
-    showUpload.value = true;
-    sectionId.value = id;
-};
-
-onDeactivated(() => {
-    showUpload.value = false;
-    sectionId.value = null;
-});
-
-const handleSelfDone = () => {
-    VE_API.z_farm_work_record.updateFlowStatus({ id: queryRecordId.value, targetFlowStatus: 5 }).then((res) => {
-        if (res.code === 0) {
-            showUpload.value = false;
-            sectionId.value = null;
-            setTimeout(() => {
-                router.replace({
-                    path: "/review_work",
-                    query: {
-                        miniJson: JSON.stringify({ id: queryRecordId.value, goBack: true }),
-                    },
-                });
-            }, 500);
-        }
-    });
-};
-
-const successText = ref("");
-const taskPopupActionType = ref(0);
-const showTaskPopup = ref(false);
-const taskPopupType = ref("");
-const handlePopupBtn = () => {
-    showTaskPopup.value = false;
-    if (taskPopupType.value === "warning") {
-        // 取消发起
-        VE_API.z_farm_work_record.updatePublicStatus({ recordId: queryRecordId.value, isPublic: 0 }).then((res) => {
-            if (res.code === 0) {
-                getDetail(queryRecordId.value);
-            }
-        });
-    } else if (taskPopupType.value === "warningIgnore") {
-        // 确认忽略
-        VE_API.z_farm_work_record.ignoreFarmWorkRecord({ farmWorkRecordId: queryRecordId.value }).then((res) => {
-            if (res.code === 0) {
-                ElMessage.success("操作成功");
-                router.back();
-            }
-        });
-    } else {
-        if (taskPopupActionType.value === 0) {
-            getDetail(queryRecordId.value);
-        } else {
-            showUpload.value = false;
-            sectionId.value = null;
-            setTimeout(() => {
-                router.replace({
-                    path: "/review_work",
-                    query: {
-                        miniJson: JSON.stringify({ id: queryRecordId.value, goBack: true }),
-                    },
-                });
-            }, 500);
-        }
-    }
-};
-
-const cancelDemand = () => {
-    taskPopupType.value = "warning";
-    showTaskPopup.value = true;
-};
-
-const priceSheetPopupRef = ref(null);
-const showPriceSheetPopup = () => {
-    priceSheetPopupRef.value.handleShowPopup(detailData.value);
-};
-
-const getButtonText = () => {
-    return agriculturalRole.value === 1 || (agriculturalRole.value === 2 && detailData.value.executorUserId != userId.value);
-};
-
-const offerPopupRef = ref(null);
-const isGoBack = ref(false);
-const showOfferPopup = (item) => {
-    isGoBack.value = true;
-    offerPopupRef.value.openPopup(item);
-};
-
-const handleExecute = () => {
-    const query = {
-        askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
-        shareText: '向您分享了一条农事执行提醒,请您尽快执行',
-        targetUrl: `completed_work`,
-        paramsPage: JSON.stringify({id: detailData.value.id}),
-        imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
-    };
-    wx.miniProgram.navigateTo({
-        url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
-    });
-};
-
-const showCalendar = ref(false);
-const maxDate = ref(new Date());
-// 最小日期设置为今天,今天可以选择
-const minDate = new Date();
-const selectExecuteTime = () => {
-    maxDate.value = new Date(detailData.value.executeDeadlineDate);
-    showCalendar.value = true;
-};
-
-const handleRemindExecuteTime = () => {
-    const query = {
-        askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
-        shareText: '向您分享了一条农事提醒,请您尽快确认执行时间',
-        targetUrl: `completed_work`,
-        paramsPage: JSON.stringify({id: detailData.value.id}),
-        imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
-    };
-    wx.miniProgram.navigateTo({
-        url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
-    });
-};
-
-const onConfirmExecuteTime = (date) => {
-    showCalendar.value = false;
-    VE_API.z_farm_work_record
-        .updateExpectedExecuteDate({ recordId: queryRecordId.value, expectedExecuteDate: formatDate(date) })
-        .then((res) => {
-            if (res.code === 0) {
-                ElMessage.success("操作成功");
-                getDetail(queryRecordId.value);
-            }
-        });
-};
-
-const handleUploadSuccess = () => {
-    if (isGoBack.value) {
-        isGoBack.value = false;
-        if(showBack.value){
-            router.replace({
-                path: "/task_condition",
-                query: { active: '1' }
-            });
-        }else{
-            router.back();
-        }
-    } else {
-        getDetail(queryRecordId.value);
-    }
-};
-
-const quotationData = ref({});
-const toList = (val) => {
-    if (!val) return [];
-    return JSON.parse(val);
-};
-
-const handleClose = () => {
-    if(showBack.value){
-        router.replace({
-            path: "/task_condition",
-            query: { active: '1' }
-        });
-    }else{
-        router.back();
-    }
-};
-
-const speciesList = computed(() => toList(quotationData.value.serviceSpecies));
-const equipmentList = computed(() => toList(quotationData.value.serviceEquipment));
-const agriculturalRole = ref(null);
-const userId = ref(null);
-const showBack = ref(false);
-const queryRecordId = ref(null);
-onActivated(async () => {
-    //
-    const userInfo = JSON.parse(localStorage.getItem("localUserInfo"));
-    agriculturalRole.value = userInfo.agriculturalRole;
-    userId.value = userInfo.id;
-    //
-    query.value = useRoute().query?.miniJson ? JSON.parse(useRoute().query?.miniJson) : {};
-    let id = null;
-    if(query.value?.id){
-        id = query.value?.id;
-        showBack.value = false;
-    }else{
-        const data = JSON.parse(query.value?.paramsPage);
-        id = data?.id;
-        showBack.value = true;
-    }
-    queryRecordId.value = id;
-    if (id) {
-        await getDetail(id);
-
-        //查询农场状态信息
-        getFarmWorkArrangeDetail(detailData.value.farmWorkArrangeId);
-    }
-});
-
-const farmStatusText = ref("");
-const getFarmWorkArrangeDetail = (id) => {
-    VE_API.farm.getFarmWorkArrangeDetail({ id }).then(({ data }) => {
-        farmStatusText.value = data.farmStatus;
-    });
-};
-
-// 药肥费用总计:∑(单价 * 单亩用量 * 亩数)
-const pesticideCostTotal = computed(() => {
-    const list = settingData();
-    const area = Number(detailData.value?.area || 0);
-    if (!list.length || !area) return 0;
-
-    const sum = list.reduce((acc, item) => {
-        const price = Number(item?.muPrice || 0);
-        const dosage = Number(quotationData.value.executionMethod === 1 ? item?.muUsage2 : item?.muUsage || 0);
-        if (!price || !dosage) return acc;
-        return acc + price * dosage * area;
-    }, 0);
-    return Number(sum.toFixed(2));
-});
-
-// 报价合计 = 药肥费用 + 服务费用
-const totalCost = computed(() => {
-    const pesticide = Number(pesticideCostTotal.value || 0);
-    const service = Number(serviceCostTotal.value || 0);
-    if (!pesticide && !service) return '--';
-    return Number((pesticide + service).toFixed(2));
-});
-
-// 服务费用总计(数值):亩单价 * 亩数
-const serviceCostTotal = computed(() => {
-    const price = Number(detailData.value?.serviceMuPrice || 0);
-    const area = Number(detailData.value?.area || 0);
-    if (!price || !area) return 0;
-    return Number((price * area).toFixed(2));
-});
-
-const settingData = () => {
-    return flattenDomains(quotationData.value.prescriptionList);
-};
-function flattenDomains(data) {
-    if (!data || !Array.isArray(data)) return [];
-    // 将所有 prescriptionList 中的 pesticideFertilizerList 合并成一个数组
-    return data.reduce((acc, item) => {
-        const list = item?.pesticideFertilizerList || [];
-        return acc.concat(list);
-    }, []);
-}
-
-const detailData = ref({});
-
-// 计算距离执行时间的天数差
-const daysDiff = computed(() => {
-    if (!detailData.value?.expectedExecuteDate) {
-        return 0;
-    }
-
-    const executeDate = new Date(detailData.value.expectedExecuteDate);
-    const today = new Date();
-
-    // 将时间设置为 00:00:00,只比较日期
-    executeDate.setHours(0, 0, 0, 0);
-    today.setHours(0, 0, 0, 0);
-
-    // 计算天数差(毫秒转天数)
-    const diffTime = executeDate.getTime() - today.getTime();
-    const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
-
-    return diffDays;
-});
-
-const getDetail = async (id) => {
-    const { data } = await VE_API.z_farm_work_record.getDetail({ id });
-    if (data && data.length > 0) {
-        detailData.value = data[0];
-        // 报价信息
-        handlePriceInfo();
-    }
-};
-
-const handlePriceInfo = async () => {
-    let priceDataObj = {};
-    const { data } = await VE_API.z_farm_work_record_cost.getByRecordId({ farmWorkRecordId: detailData.value.id });
-    priceDataObj = data;
-    // 执行方式为1:无人机,则使用无人机价格,否则使用人工价格
-    detailData.value.serviceMuPrice = data?.farmWorkServiceCost;
-    if (priceDataObj && Object.keys(priceDataObj).length > 0) {
-        // 合并外层字段
-        quotationData.value = {
-            ...detailData.value,
-            ...priceDataObj,
-        };
-
-        // 根据 itemsList 的 pesticideFertilizerId 匹配并赋值品牌和价格
-        if (priceDataObj.itemsList && Array.isArray(priceDataObj.itemsList) && detailData.value.prescriptionList) {
-            // 创建价格映射表
-            const priceMap = new Map();
-            priceDataObj.itemsList.forEach((item) => {
-                priceMap.set(String(item.pesticideFertilizerId), {
-                    brand: item.brand || "",
-                    price: item.price || 0,
-                });
-            });
-
-            // 遍历处方列表,赋值品牌和价格,并计算格式化字段供 price-table 使用
-            quotationData.value.prescriptionList = detailData.value.prescriptionList.map((prescription) => {
-                return {
-                    ...prescription,
-                    pesticideFertilizerList: prescription.pesticideFertilizerList.map((pesticide) => {
-                        const pesticideId = String(pesticide.pesticideFertilizerId || "");
-                        const priceInfo = priceMap.get(pesticideId);
-
-                        if (priceInfo) {
-                            const price = priceInfo.price || 0;
-                            const muUsage = pesticide.muUsage || 0;
-                            const unit = pesticide.unit || "";
-                            const area = detailData.value.area || 0;
-
-                            // 计算总价:优先使用 totalPrice,否则计算 price * muUsage * area
-                            const total = price * muUsage * area;
-
-                            return {
-                                ...pesticide,
-                                brand: priceInfo.brand || "--",
-                                // 格式化字段供 price-table 组件使用
-                                price: price > 0 ? `${price}元/${unit}` : "--", // 格式化单价显示
-                                dosage: muUsage > 0 ? `${muUsage}${unit}` : "--", // 格式化用量显示
-                                total: total > 0 ? total.toFixed(2) : "--", // 格式化总价显示
-                            };
-                        }
-                        return pesticide;
-                    }),
-                };
-            });
-        }
-    }
-};
-</script>
-
-<style lang="scss" scoped>
-.completed-work {
-    height: 100vh;
-    position: relative;
-    overflow: auto;
-    font-size: 14px;
-    background: #f2f3f5;
-    .work-content {
-        height: calc(100% - 40px);
-        overflow: auto;
-        box-sizing: border-box;
-        &.hasBottom {
-            padding-bottom: 60px;
-        }
-        .info-wrap {
-            margin-bottom: 80px;
-        }
-        .work-wrap {
-            position: relative;
-            z-index: 3;
-            padding: 0 12px;
-            top: -16px;
-        }
-        .pt-10 {
-            padding-top: 10px;
-        }
-        .fixed-btn-wrap {
-            position: fixed;
-            z-index: 10;
-            bottom: 0;
-            left: 0;
-            width: 100%;
-            padding: 10px 12px 25px;
-            box-sizing: border-box;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            background: #fff;
-            box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
-            &.center {
-                justify-content: center;
-            }
-            .fixed-btn {
-                width: 120px;
-                text-align: center;
-                height: 40px;
-                line-height: 40px;
-                background: linear-gradient(180deg, #70bffe, #2199f8);
-                border-radius: 25px;
-                color: #fff;
-                font-size: 14px;
-                box-sizing: border-box;
-                &.orange {
-                    color: #ff953d;
-                    border: 1px solid #ff953d;
-                    background: rgba(255, 149, 61, 0.1);
-                }
-                &.excute {
-                    background: linear-gradient(180deg, #ffd887, #ed9e1e);
-                }
-                &.second {
-                    background: #ffffff;
-                    border: 1px solid rgba(153, 153, 153, 0.5);
-                    color: #666666;
-                }
-                &.primary-text {
-                    width: 160px;
-                    background: rgba(33, 153, 248, 0.1);
-                    color: #2199f8;
-                    border: 1px solid #2199f8;
-                }
-                &.width-120 {
-                    width: 120px;
-                }
-            }
-        }
-        .card-title {
-            font-size: 16px;
-            font-weight: bold;
-            color: #000;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            .tag-text {
-                color: #2199f8;
-                font-size: 12px;
-                font-weight: normal;
-            }
-            .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: 4px 10px;
-                background: rgba(119, 119, 119, 0.1);
-                border-radius: 20px;
-                font-weight: normal;
-                height: 26px;
-                line-height: 26px;
-            }
-        }
-        .box-wrap {
-            background: #fff;
-            padding: 10px;
-            border-radius: 8px;
-        }
-
-        .step-wrap {
-            padding: 18px 0;
-        }
-
-        .content-status {
-            position: relative;
-            padding: 26px 12px 20px 12px;
-            color: #fff;
-            z-index: 2;
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
-            &::after {
-                content: "";
-                z-index: -1;
-                position: absolute;
-                left: 0;
-                top: 0;
-                height: 136px;
-                background: #2199f8;
-                width: 100%;
-            }
-            .status-l {
-                .stauts-text {
-                    font-size: 22px;
-                    display: flex;
-                    align-items: center;
-                    .status-icon {
-                        width: 24px;
-                        height: 24px;
-                        background: #ffffff;
-                        border-radius: 50%;
-                        margin-right: 8px;
-                    }
-                }
-                .stauts-sub-text {
-                    // color: rgba(255, 255, 255, 0.51);
-                    font-size: 14px;
-                }
-                .time-text {
-                    color: #ffff;
-                }
-            }
-            &.warning {
-                &::after {
-                    background: #ff953d;
-                }
-                .stauts-sub-text {
-                    color: #fff;
-                }
-            }
-            .status-r {
-                height: 32px;
-                line-height: 32px;
-                padding: 0 16px;
-                color: #2199f8;
-                font-size: 16px;
-                background: #fff;
-                border-radius: 20px;
-            }
-        }
-
-        .info-content {
-            padding: 10px 0;
-            position: relative;
-        }
-        .info-title-wrap {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            color: #000;
-            .info-more {
-                font-size: 18px;
-            }
-            .unit-text {
-                font-size: 12px;
-            }
-        }
-        .info-content-wrap {
-            .price-bottom {
-                padding-top: 8px;
-                .price-info {
-                    padding: 8px 0;
-                    display: flex;
-                    align-items: center;
-                    justify-content: space-between;
-                    color: rgba(0, 0, 0, 0.2);
-                    .main-text {
-                        padding-left: 20px;
-                        color: rgba(0, 0, 0, 0.8);
-                    }
-                    .info-c {
-                        flex: 1;
-                        text-align: center;
-                    }
-                }
-                .price-total {
-                    height: 38px;
-                    display: flex;
-                    align-items: center;
-                    justify-content: center;
-                    border: 1px solid rgba(33, 153, 248, 0.5);
-                    background: rgba(33, 153, 248, 0.1);
-                    color: #000000;
-                    border-radius: 4px;
-                    .main-val {
-                        font-size: 20px;
-                        font-weight: bold;
-                        color: #2199f8;
-                        padding-right: 2px;
-                    }
-                }
-            }
-        }
-        .executor-info {
-            margin-top: 14px;
-            &.mt-0 {
-                margin-top: 0;
-            }
-            .executor-title {
-                font-size: 18px;
-                font-weight: bold;
-                color: #000;
-                margin-bottom: 12px;
-            }
-            .executor-content {
-                .executor-info {
-                    display: flex;
-                    align-items: flex-start;
-                    gap: 12px;
-                }
-                .executor-avatar {
-                    flex-shrink: 0;
-                    img {
-                        width: 60px;
-                        height: 60px;
-                        border-radius: 8px;
-                        object-fit: cover;
-                    }
-                }
-                .executor-details {
-                    flex: 1;
-                    .org-name {
-                        display: flex;
-                        align-items: center;
-                        gap: 8px;
-                        margin-bottom: 3px;
-                        .name {
-                            font-size: 16px;
-                            font-weight: bold;
-                            color: #000;
-                        }
-                        .rating {
-                            font-size: 16px;
-                            color: #ff953d;
-                            font-weight: bold;
-                        }
-                    }
-                    .service-info {
-                        .service-item {
-                            font-size: 12px;
-                            color: #b6b6b6;
-                            line-height: 1.3;
-                            margin-bottom: 2px;
-                            span {
-                                color: #666666;
-                            }
-                        }
-                    }
-                }
-            }
-            .contact-buttons {
-                display: flex;
-                justify-content: flex-end;
-                gap: 8px;
-                margin-top: 16px;
-                .contact-btn {
-                    width: 88px;
-                    height: 32px;
-                    border-radius: 20px;
-                    color: rgba(0, 0, 0, 0.5);
-                    background: #fff;
-                    border: 1px solid rgba(0, 0, 0, 0.1);
-                }
-            }
-        }
-        .farm-info {
-            color: rgba(0, 0, 0, 0.6);
-            font-size: 14px;
-            margin-top: 14px;
-            .info-title {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                color: rgba(41, 41, 41, 0.3);
-                .info-more {
-                    display: flex;
-                    align-items: center;
-                }
-            }
-        }
-        .farm-photo {
-            margin-top: 10px;
-            .photo-list {
-                display: flex;
-                align-items: center;
-                width: 100%;
-                overflow: auto;
-                padding-bottom: 10px;
-                .photo-item {
-                    width: 92px;
-                    height: 92px;
-                    border-radius: 8px;
-                    object-fit: cover;
-                }
-
-                .img-item {
-                    img {
-                        width: 92px;
-                        height: 92px;
-                        border-radius: 8px;
-                        object-fit: cover;
-                        margin-right: 12px;
-                    }
-                }
-
-                .view-box {
-                    width: 92px;
-                    height: 92px;
-                    border-radius: 8px;
-                    object-fit: cover;
-                }
-            }
-            .list-text {
-                text-align: center;
-                color: rgba(0, 0, 0, 0.5);
-                padding-top: 2px;
-            }
-        }
-
-        .farm-data {
-            margin-top: 10px;
-            .data-content {
-                margin-top: 8px;
-                border-top: 1px solid #f5f5f5;
-                padding: 8px 0;
-            }
-        }
-
-        .form-item {
-            display: flex;
-            align-items: center;
-            font-size: 14px;
-            color: #767676;
-            height: 24px;
-            .item-name {
-                width: 80px;
-                color: rgba(0, 0, 0, 0.2);
-            }
-        }
-        .form-item + .form-item {
-            padding-top: 2px;
-        }
-
-        .farm-table {
-            margin-top: 10px;
-            .table-item {
-                padding: 10px 0 12px 0;
-            }
-        }
-
-        .new-wrap {
-            border-radius: 5px;
-            text-align: center;
-            border: 1px solid rgba(225, 225, 225, 0.5);
-            .new-title {
-                background: rgba(241, 241, 241, 0.4);
-                border-radius: 5px 5px 0 0;
-                border-bottom: 1px solid rgba(225, 225, 225, 0.5);
-                display: flex;
-                color: #767676;
-                // justify-content: space-around;
-                padding: 5px 6px;
-                font-size: 12px;
-                .table-name {
-                    width: 24px;
-                    font-size: 12px;
-                    margin: 0 auto;
-                }
-            }
-
-            .title-1 {
-                width: 46px;
-            }
-            .title-2 {
-                flex: 1;
-            }
-            .title-3 {
-                width: 52px;
-            }
-            .title-4 {
-                width: 56px;
-            }
-            .title-5 {
-                width: 52px;
-            }
-            .new-table-wrap {
-                .new-prescription {
-                    .new-table {
-                        height: 45px;
-                        display: flex;
-                        align-items: center;
-                        background: #fff;
-                        border-radius: 5px;
-                        color: rgba(0, 0, 0, 0.6);
-                        font-size: 11px;
-                        .line-l {
-                            display: flex;
-                            flex: 1;
-                            .line-2 {
-                                flex: 1;
-                                padding: 0 2px;
-                            }
-                        }
-                        .line-r {
-                            &.has-border {
-                                border-left: 1px solid rgba(225, 225, 225, 0.8);
-                            }
-                            .line-3 {
-                                display: flex;
-                                align-items: center;
-                            }
-                            .sub-line {
-                                padding: 10px 0;
-                            }
-                            .line-4 {
-                                display: flex;
-                                align-items: center;
-                                border-top: 1px solid rgba(225, 225, 225, 0.8);
-                            }
-                            .execute-line {
-                                border-right: 1px solid rgba(225, 225, 225, 0.8);
-                            }
-                        }
-                    }
-                    .note-text {
-                        margin: 8px 0 4px 0;
-                        color: rgba(0, 0, 0, 0.4);
-                        background: #fff;
-                        padding: 6px 8px;
-                        border-radius: 5px;
-                        text-align: left;
-                        font-size: 11px;
-                    }
-                }
-                .new-prescription + .new-prescription {
-                    .new-table {
-                        border-top: 1px solid rgba(0, 0, 0, 0.08);
-                    }
-                }
-            }
-        }
-
-        .work-map {
-            padding: 10px 0;
-            .map-content {
-                padding-top: 8px;
-                .map-dom {
-                    height: 166px;
-                    width: 100%;
-                    clip-path: inset(0px round 8px);
-                }
-            }
-        }
-    }
-}
-
-.task-tips-popup {
-    width: 75%;
-    padding: 28px 28px 20px;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-    .create-farm-icon {
-        width: 40px;
-        height: 40px;
-        margin-bottom: 12px;
-    }
-    .farm-check-icon {
-        width: 68px;
-        height: 68px;
-        margin-bottom: 12px;
-    }
-    .create-farm-text {
-        font-size: 20px;
-        font-weight: 500;
-        line-height: 40px;
-        margin-bottom: 32px;
-        text-align: center;
-        &.success-text {
-            font-size: 23px;
-            font-weight: 400;
-        }
-    }
-    .main-text {
-        color: #2199f8;
-    }
-    .create-farm-btn {
-        width: 100%;
-        box-sizing: border-box;
-        padding: 8px;
-        border-radius: 25px;
-        font-size: 16px;
-        background: #2199f8;
-        color: #fff;
-        text-align: center;
-    }
-}
-</style>

+ 0 - 1078
src/views/old_mini/modify_work/detailWork.vue

@@ -1,1078 +0,0 @@
-<template>
-    <div class="completed-work">
-        <custom-header name="农事详情" :showClose="false" isGoBack @goback="handleClose"></custom-header>
-        <div class="work-content">
-            <div
-                class="content-status"
-            >
-                <div class="status-l">
-                    <div class="stauts-text">待触发</div>
-                    <div class="stauts-sub-text" v-if="arrangeDetail?.interactionTime">
-                        <template v-if="daysDiff > 0">
-                            距离触发还剩 <span class="time-text">{{ daysDiff }} 天</span>
-                        </template>
-                        <template v-else-if="daysDiff === 0">
-                            触发时间为今天
-                        </template>
-                        <template v-else>
-                            触发时间已过
-                        </template>
-                    </div>
-                </div>
-                <!-- <template v-if="query.status !== 'warning'">
-                    <div class="status-r" v-if="curRole == 0">{{ status === 0 ? "设置提醒" : "去评价" }}</div>
-                    <div class="status-r" v-if="curRole == 1">{{ status === 0 ? "提醒执行" : "提醒复核" }}</div>
-                    <div class="status-r" v-if="curRole == 2">{{ status === 0 ? "提醒执行" : "提醒复核" }}</div>
-                </template> -->
-            </div>
-            <div class="work-wrap">
-                <div class="box-wrap executor-info">
-                    <!-- <div class="executor-title">执行人</div> -->
-                    <div class="executor-content">
-                        <div class="executor-info mt-0">
-                            <div class="executor-avatar">
-                                <img
-                                    src="https://birdseye-img-ali-cdn.sysuimars.com/16926861-1e20-4cbd-8bf2-90208db5a2d0/806080da-1a30-4b5b-b64b-b22e722c6cb6/DJI_202509010800_001_806080da-1a30-4b5b-b64b-b22e722c6cb6/DJI_20250901080536_0045_V_code-ws0fsmge97gh.jpeg?x-oss-process=image/resize,w_500"
-                                    alt="执行人"
-                                />
-                            </div>
-                            <div class="executor-details">
-                                <div class="org-name">
-                                    <span class="name">{{ detailData?.agriculturalName || "--" }}</span>
-                                    <span class="rating">{{
-                                        detailData.score ? detailData.score + "分" : ""
-                                    }}</span>
-                                </div>
-                                <div class="service-info">
-                                    <div class="service-item">
-                                        服务品种:
-                                        <span v-if="speciesList.length">
-                                            <span v-for="(sp, sIdx) in speciesList" :key="sIdx">
-                                                {{ sp }}<template v-if="sIdx < speciesList.length - 1">、</template>
-                                            </span>
-                                        </span>
-                                        <span v-else>--</span>
-                                    </div>
-                                    <div class="service-item">
-                                        服务设备:
-                                        <span v-if="equipmentList.length">
-                                            <span v-for="(eq, eIdx) in equipmentList" :key="eIdx">
-                                                {{ eq }}<template v-if="eIdx < equipmentList.length - 1">、</template>
-                                            </span>
-                                        </span>
-                                        <span v-else>--</span>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                        <div class="farm-info">
-                            <div class="info-title-wrap" v-if="detailData?.prescription?.pesticideFertilizerList?.length">
-                                <div class="sub-title">药肥费用</div>
-                                <div class="info-more">
-                                    {{ pesticideCostTotal ? formatArea(pesticideCostTotal) : "--" }}<span class="unit-text">元</span>
-                                </div>
-                            </div>
-                            <div class="info-content-wrap">
-                                <price-table :prescriptionData="detailData?.prescription" :area="detailData?.farm?.mianji">
-                                    <template #bottomContent>
-                                        <div class="price-bottom">
-                                            <div class="info-title-wrap">
-                                                <div class="sub-title">服务费用</div>
-                                                <div class="info-more">
-                                                    {{ detailData?.serviceMuPrice ? serviceCostTotal : '--' }}
-                                                    <span class="unit-text">元</span>
-                                                </div>
-                                            </div>
-                                            <div class="price-info">
-                                                <div class="info-l">
-                                                    单亩价格<span class="main-text">{{
-                                                        detailData?.serviceMuPrice
-                                                            ? detailData?.serviceMuPrice + "元/亩"
-                                                            : "--"
-                                                    }}</span>
-                                                </div>
-                                                <!-- <div class="info-l">
-                                                    执行方式<span class="main-text">{{
-                                                        detailData?.executionMethodName || "人工"
-                                                    }}</span>
-                                                </div>
-                                                <div class="info-c">
-                                                    亩单价<span class="main-text">{{
-                                                        detailData?.serviceMuPrice
-                                                            ? detailData?.serviceMuPrice + "元/亩"
-                                                            : "--"
-                                                    }}</span>
-                                                </div>
-                                                <div class="info-r">
-                                                    亩数<span class="main-text">{{
-                                                        detailData?.farm?.mianji
-                                                            ? formatArea(detailData?.farm?.mianji) + "亩"
-                                                            : "--"
-                                                    }}</span>
-                                                </div> -->
-                                            </div>
-                                            <div class="price-bottom-action">
-                                                <div class="price-total">
-                                                    报价合计:<span class="main-val">
-                                                        {{ totalCost ? formatArea(totalCost) : "--" }}</span
-                                                    >元
-                                                </div>
-                                                <div class="show-price-btn" v-if="curRole == 2" @click="showPriceSheetPopup">生成报价单</div>
-                                            </div>
-                                        </div>
-                                    </template>
-                                </price-table>
-                            </div>
-                        </div>
-                        <!-- <div class="contact-buttons">
-                            <button class="contact-btn">电话联系</button>
-                            <button class="contact-btn">在线联系</button>
-                        </div> -->
-                    </div>
-                </div>
-            </div>
-            <div class="work-wrap" :class="{ 'info-wrap': curRole == 2 }">
-
-                <div class="box-wrap farm-data">
-                    <div class="card-title">
-                        <div>{{ detailData?.name }}<span class="type-tag">标准农事</span></div>
-                        <!-- <div class="point-wrap">
-                            <div class="point"></div>
-                            <span>2区</span>
-                        </div> -->
-                        <div class="tag-text" v-if="arrangeDetail?.isFollow !== undefined">{{ statusMap[arrangeDetail?.isFollow] }}</div>
-                    </div>
-                    <div class="data-content">
-                        <div class="form-item">
-                            <div class="item-name">农事编号</div>
-                            <div class="item-text">{{ detailData?.code }}</div>
-                        </div>
-                        <div class="form-item">
-                            <div class="item-name">服务亩数</div>
-                            <div class="item-text">
-                                {{ detailData?.farm?.mianji ? formatArea(detailData?.farm?.mianji) + "亩" : "--" }}
-                            </div>
-                        </div>
-                        <div class="form-item">
-                            <div class="item-name">服务区域</div>
-                            <div class="item-text">{{ detailData?.farm?.district }}</div>
-                        </div>
-                        <!-- <div class="form-item">
-                            <div class="item-name">触发条件</div>
-                            <div class="item-text">{{ detailData?.condition }}</div>
-                        </div> -->
-                        <div class="form-item">
-                            <div class="item-name">执行日期</div>
-                            <div class="item-text">{{ detailData?.executeDate || detailData?.expectedExecuteDate || detailData?.executeDate }}</div>
-                        </div>
-                    </div>
-                </div>
-
-                <div class="box-wrap farm-table">
-                    <div class="card-title">药物处方</div>
-                    <div class="table-item">
-                        <div class="form-item">
-                            <div class="item-name">施用方式</div>
-                            <div class="item-text">{{ detailData?.prescription?.usageMode || '其他' }}</div>
-                        </div>
-                        <div class="form-item">
-                            <div class="item-name">执行方式</div>
-                            <div class="item-text">{{ detailData?.prescription?.pesticideFertilizerList[0]?.executeStyle === 1 ? '无人机' : detailData?.prescription?.pesticideFertilizerList[0]?.executeStyle === 3 ? '无人机+人工' : '人工' }}</div>
-                        </div>
-                    </div>
-                    <div class="new-wrap" v-if="detailData?.prescription?.pesticideFertilizerList?.length">
-                        <div class="new-title">
-                            <div class="title-1"><div class="table-name">使用功效</div></div>
-                            <div class="title-2"><div class="table-name">药肥名称</div></div>
-                            <div class="title-4"><div class="table-name">药肥配比</div></div>
-                            <div class="title-5"><div class="table-name">单亩用量</div></div>
-                        </div>
-                        <div
-                            class="new-table-wrap"
-                        >
-                            <div
-                                class="new-prescription"
-                                v-for="(subP, subI) in detailData?.prescription?.pesticideFertilizerList"
-                                :key="subI"
-                            >
-                                <div class="new-table">
-                                    <div class="line-l">
-                                        <div class="line-1 title-1">{{ subP.typeName || '--' }}</div>
-                                        <div class="line-2">{{ subP.name }}</div>
-                                    </div>
-                                    <div class="line-r">
-                                        <div class="line-3">
-                                            <div class="sub-line title-4">{{ subP.ratio }}倍</div>
-                                            <div class="sub-line title-5">{{ subP.dosage }}{{ subP.unit }}</div>
-                                        </div>
-                                    </div>
-                                </div>
-                                <div class="note-text" v-if="subP.remark">{{ subP.remark }}</div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-
-                <!-- <div class="work-map">
-                    <div class="card-title">执行农事区域</div>
-                    <div class="map-content">
-                        <div class="map-dom" ref="areaRef"></div>
-                    </div>
-                </div> -->
-            </div>
-
-
-            <!-- 农资,步骤:农事已确认 -->
-            <div class="fixed-btn-wrap" v-if="curRole == 2">
-                <div class="fixed-btn second" @click="editPrice">编辑报价</div>
-                <div class="fixed-btn" @click="handleTimelineAction">转入农事任务</div>
-            </div>
-        </div>
-    </div>
-    <!-- 报价弹窗 -->
-    <!-- <offer-popup :showPopup="showPopup" :executionData="executionData"></offer-popup> -->
-    <!-- 服务报价单 -->
-    <price-sheet-popup ref="priceSheetPopupRef"></price-sheet-popup>
- 
-    <!-- 新增:激活上传弹窗 -->
-    <active-upload-popup ref="activeUploadPopupRef" @handleUploadSuccess="handleUploadSuccess"></active-upload-popup>
-</template>
-
-<script setup>
-import customHeader from "@/components/customHeader.vue";
-import { ref, computed, onActivated, onDeactivated, onMounted } from "vue";
-// import NewFarmMap from "./newFarmMap";
-import { useStore } from "vuex";
-import { Popup, Calendar } from "vant";
-import offerPopup from "@/components/popup/offerPopup.vue";
-import { useRouter, useRoute } from "vue-router";
-import farmSteps from "@/components/farmSteps.vue";
-import priceTable from "../agri_work/components/priceTable.vue";
-import priceSheetPopup from "@/components/popup/priceSheetPopup.vue";
-import uploadExecute from "@/views/old_mini/task_condition/components/uploadExecute.vue";
-import { base_img_url2 } from "@/api/config";
-import { ElMessage } from "element-plus";
-import { formatArea, formatDate } from "@/common/commonFun";
-import wx from "weixin-js-sdk";
-import reviewUploadPopup from "@/components/popup/reviewUploadPopup.vue";
-import FnShareSheet from "@/components/pageComponents/FnShareSheet.vue";
-import activeUploadPopup from "@/components/popup/activeUploadPopup.vue";
-import eventBus from "@/api/eventBus";
-
-const router = useRouter();
-const store = useStore();
-const query = ref({});
-// 角色
-// const curRole = store.state.app.curRole
-const curRole = ref(localStorage.getItem("SET_USER_CUR_ROLE"));
-// const curRole = 2;
-
-// 农资待生成报价单--currentStep:1;curRole:2
-// 农资已执行,有执行照片,请求确认--currentStep:2;curRole:2
-
-// 0:执行, 1: 复核
-const status = ref(0);
-const uploadExecuteRef = ref(null);
-
-const showUpload = ref(false);
-const sectionId = ref(null);
-// 上传照片处理函数
-const handleUploadPhoto = ({ id }) => {
-    showUpload.value = true;
-    sectionId.value = id;
-};
-
-onDeactivated(() => {
-    showUpload.value = false;
-    sectionId.value = null;
-});
-
-const handleSelfDone = () => {
-    VE_API.z_farm_work_record.updateFlowStatus({ id: query.value.id, targetFlowStatus: 5 }).then((res) => {
-        if (res.code === 0) {
-            showUpload.value = false;
-            sectionId.value = null;
-            setTimeout(() => {
-                router.replace({
-                    path: "/review_work",
-                    query: {
-                        miniJson: JSON.stringify({ id: query.value.id, goBack: true }),
-                    },
-                });
-            }, 500)
-        }
-    });
-};
-
-
-const priceSheetPopupRef = ref(null);
-const showPriceSheetPopup = () => {
-    priceSheetPopupRef.value.handleShowPopup({ id: detailData.value.id, farmId: query.value.farmId });
-};
-
-const userInfoStr = localStorage.getItem("localUserInfo");
-const userInfo = userInfoStr ? JSON.parse(userInfoStr) : {};
-
-const executorList = ref([])
-
-// 检查是否有"转入农事"权限
-const hasPlanPermission = computed(() => {
-    try {
-        const userInfoStr = localStorage.getItem("localUserInfo");
-        if (!userInfoStr) return false;
-        const userInfo = JSON.parse(userInfoStr);
-        const permissions = userInfo.agriculturalPermissions || [];
-        return permissions.includes("转入农事");
-    } catch (error) {
-        console.error("解析用户信息失败:", error);
-        return false;
-    }
-});
-
-onMounted(() => {
-    getManagerList();
-});
-
-// 查询当前农资店的成员列表(只保留有"任务接单"权限的成员)
-const getManagerList = async () => {
-    const { data } = await VE_API.mine.listManagerList({ onlyExecutor: true });
-    if (data && data.length > 0) {
-        // 过滤 permissionList 中包含"任务接单"的成员,并过滤掉超管(role为1)
-        executorList.value = data.filter((item) => item.role !== 1);
-    }
-};
-
-const activeUploadPopupRef = ref(null);
-const handleTimelineAction = (item) => {
-    if (hasPlanPermission.value) {
-        activeUploadPopupRef.value.showPopup({
-            gardenIdVal: query.value.farmId,
-            needExecutorVal: true,
-            problemTitleVal: "请选择 " + detailData.value.name + " 执行截止时间",
-            imgDescVal: "请上传凭证(转入农事任务凭证)",
-            arrangeIdVal: query.value.arrangeId,
-            executorListVal: executorList.value,
-            farmWorkIdVal: query.value.id,
-            schemeIdVal: detailData.value.schemeId,
-        });
-    } else {
-        ElMessage.warning("您暂无权限操作");
-    }
-};
-
-const editPrice = () => {
-    if (!hasPlanPermission.value) {
-        ElMessage.warning("您暂无权限操作");
-        return;
-    }
-    router.push({
-        path: "/modify",
-        query: {
-            isEdit: true,
-            onlyPrice: true,
-            farmId: query.value.farmId,
-            arrangeId: query.value.arrangeId,
-            farmWorkId: query.value.id,
-        },
-    });
-};
-
-const handleUploadSuccess = () => {
-    router.back();
-};
-// 地图
-// const areaRef = ref(null);
-// let newFarmMap = new NewFarmMap();
-const quotationData = ref({});
-const parmasPage = ref({});
-const toList = (val) => {
-    if (!val) return [];
-    return JSON.parse(val);
-};
-
-const speciesList = computed(() => toList(detailData.value?.agricultural?.serviceSpecies));
-const equipmentList = computed(() => toList(detailData.value?.agricultural?.serviceEquipment));
-onActivated(async () => {
-    query.value = useRoute().query?.miniJson ? JSON.parse(useRoute().query?.miniJson) : {};
-    if (query.value?.paramsPage) {
-        const data = JSON.parse(query.value.paramsPage);
-        query.value.id = data.id;
-        query.value.farmId = data.farmId;
-        query.value.arrangeId = data.arrangeId;
-        query.value.goBack = true;
-    }
-    const id = query.value?.id;
-    if (id) {
-        await getDetail();
-    }
-});
-
-function getServiceCost(cost, area) {
-    if (!cost || !area) return "--";
-    return (parseFloat(cost) * parseFloat(area)).toFixed(2);
-}
-
-const detailData = ref({});
-
-// 计算距离执行时间的天数差
-const daysDiff = computed(() => {
-    if (!arrangeDetail.value?.interactionTime) {
-        return 0;
-    }
-    
-    const executeDate = new Date(arrangeDetail.value.interactionTime);
-    const today = new Date();
-    
-    // 将时间设置为 00:00:00,只比较日期
-    executeDate.setHours(0, 0, 0, 0);
-    today.setHours(0, 0, 0, 0);
-    
-    // 计算天数差(毫秒转天数)
-    const diffTime = executeDate.getTime() - today.getTime();
-    const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
-    
-    return diffDays;
-});
-
-// 药肥费用总计:∑(单价 * 单亩用量 * 亩数)
-const pesticideCostTotal = computed(() => {
-    const list = detailData.value?.prescription?.pesticideFertilizerList || [];
-    const area = Number(detailData.value?.farm?.mianji || 0);
-    if (!list.length || !area) return 0;
-
-    const sum = list.reduce((acc, item) => {
-        const price = Number(item?.price || 0);
-        const dosage = Number(item?.dosage || 0);
-        if (!price || !dosage) return acc;
-        return acc + price * dosage * area;
-    }, 0);
-
-    return Number(sum.toFixed(2));
-});
-
-
-// 报价合计 = 药肥费用 + 服务费用
-const totalCost = computed(() => {
-    const pesticide = Number(pesticideCostTotal.value || 0);
-    const service = Number(serviceCostTotal.value || 0);
-    if (!pesticide && !service) return '--';
-    return Number((pesticide + service).toFixed(2));
-});
-
-// 服务费用总计(数值):亩单价 * 亩数
-const serviceCostTotal = computed(() => {
-    const price = Number(detailData.value?.serviceMuPrice || 0);
-    const area = Number(detailData.value?.farm?.mianji || 0);
-    if (!price || !area) return 0;
-    return Number((price * area).toFixed(2));
-});
-
-
-const getDetail = async () => {
-    const { data } = await VE_API.farm.getFarmWorkLib({ id: query.value.id, farmId: query.value.farmId, agriculturalId: userInfo?.agriculturalId });
-    if (data) {
-        detailData.value = data;
-        const pesticideFertilizerCodes = data?.prescription?.pesticideFertilizerList?.map(item => item.code);
-        getPriceList(data.schemeId, pesticideFertilizerCodes);
-        getArrangeDetail(query.value.arrangeId);
-    }
-};
-const statusMap = ref({
-    0: "取消关注",
-    1: "特别关注",
-    2: "托管农事",
-});
-
-const arrangeDetail = ref({});
-const getArrangeDetail = async (id) => {
-    const { data } = await VE_API.container_farm_work_arrange.getArrangeDetail({ id });
-    if (data) {
-        arrangeDetail.value = data;
-    }
-};
-
-
-const getPriceList = async (schemeId, pesticideFertilizerCodes) => {
-    if (!schemeId || !pesticideFertilizerCodes || !Array.isArray(pesticideFertilizerCodes)) return;
-    const { data } = await VE_API.farm.getPriceList({ schemeId, pesticideFertilizerCodes });
-    if (!data || !Array.isArray(data)) return;
-
-    detailData.value.prescription.pesticideFertilizerList.forEach((item) => {
-        const priceInfo = data.find((p) => p.pesticideFertilizerCode === item.code);
-        if (!priceInfo) return;
-        item.price = priceInfo.price ?? item.price;
-        item.brand = priceInfo.brand ?? item.brand;
-    });
-};
-
-const handleClose = () => {
-    if(query.value.goBack){
-        router.replace({
-            path: "/home",
-        });
-    }else{
-        router.back();
-    }
-};
-
-</script>
-
-<style lang="scss" scoped>
-.completed-work {
-    height: 100vh;
-    position: relative;
-    overflow: auto;
-    font-size: 14px;
-    background: #f2f3f5;
-    .work-content {
-        height: calc(100% - 40px);
-        overflow: auto;
-        box-sizing: border-box;
-        &.hasBottom {
-            padding-bottom: 60px;
-        }
-        .info-wrap {
-            margin-bottom: 80px;
-        }
-        .work-wrap {
-            position: relative;
-            z-index: 3;
-            padding: 0 12px;
-            top: -16px;
-        }
-        .pt-10 {
-            padding-top: 10px;
-        }
-        .fixed-btn-wrap {
-            position: fixed;
-            z-index: 10;
-            bottom: 0;
-            left: 0;
-            width: 100%;
-            padding: 10px 12px 25px;
-            box-sizing: border-box;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            background: #fff;
-            box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
-            &.center {
-                justify-content: center;
-            }
-            .fixed-btn {
-                width: 120px;
-                text-align: center;
-                height: 40px;
-                line-height: 40px;
-                background: linear-gradient(180deg, #70bffe, #2199f8);
-                border-radius: 25px;
-                color: #fff;
-                font-size: 14px;
-                box-sizing: border-box;
-                &.expert {
-                    width: 180px;
-                }
-                &.orange {
-                    color: #ff953d;
-                    border: 1px solid #ff953d;
-                    background: rgba(255, 149, 61, 0.1);
-                }
-                &.excute {
-                    background: linear-gradient(180deg, #ffd887, #ed9e1e);
-                }
-                &.second {
-                    background: #ffffff;
-                    border: 1px solid rgba(153, 153, 153, 0.5);
-                    color: #666666;
-                }
-            }
-        }
-        .card-title {
-            font-size: 16px;
-            font-weight: bold;
-            color: #000;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            .tag-text {
-                color: #2199F8;
-                font-size: 12px;
-                font-weight: normal;
-            }
-            .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: 4px 10px;
-                background: rgba(119, 119, 119, 0.1);
-                border-radius: 20px;
-                font-weight: normal;
-                height: 26px;
-                line-height: 26px;
-            }
-        }
-        .box-wrap {
-            background: #fff;
-            padding: 10px;
-            border-radius: 8px;
-        }
-
-        .step-wrap {
-            padding: 18px 0;
-        }
-
-        .content-status {
-            position: relative;
-            padding: 26px 12px 20px 12px;
-            color: #fff;
-            z-index: 2;
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
-            &::after {
-                content: "";
-                z-index: -1;
-                position: absolute;
-                left: 0;
-                top: 0;
-                height: 136px;
-                background: #2199f8;
-                width: 100%;
-            }
-            .status-l {
-                .stauts-text {
-                    font-size: 22px;
-                    display: flex;
-                    align-items: center;
-                    .status-icon {
-                        width: 24px;
-                        height: 24px;
-                        background: #ffffff;
-                        border-radius: 50%;
-                        margin-right: 8px;
-                    }
-                }
-                .stauts-sub-text {
-                    // color: rgba(255, 255, 255, 0.51);
-                    font-size: 14px;
-                }
-                .time-text {
-                    color: #ffff;
-                }
-            }
-            &.warning {
-                &::after {
-                    background: #ff953d;
-                }
-                .stauts-sub-text {
-                    color: #fff;
-                }
-            }
-            .status-r {
-                height: 32px;
-                line-height: 32px;
-                padding: 0 16px;
-                color: #2199f8;
-                font-size: 16px;
-                background: #fff;
-                border-radius: 20px;
-            }
-        }
-
-        .info-content {
-            padding: 10px 0;
-            position: relative;
-        }
-        .info-title-wrap {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            color: #000;
-            .info-more {
-                font-size: 18px;
-            }
-            .unit-text {
-                font-size: 12px;
-            }
-        }
-        .info-content-wrap {
-            .price-bottom {
-                padding-top: 8px;
-                .price-info {
-                    padding: 8px 0;
-                    display: flex;
-                    align-items: center;
-                    justify-content: space-between;
-                    color: rgba(0, 0, 0, 0.2);
-                    .main-text {
-                        padding-left: 20px;
-                        color: rgba(0, 0, 0, 0.8);
-                    }
-                    .info-c {
-                        flex: 1;
-                        text-align: center;
-                    }
-                }
-                .price-bottom-action {
-                    display: flex;
-                    align-items: center;
-                    justify-content: space-between;
-                    gap: 8px;
-                    .show-price-btn {
-                        flex: none;
-                        width: 96px;
-                        height: 40px;
-                        line-height: 38px;
-                        line-height: 38px;
-                        border-radius: 4px;
-                        background: #2199f8;
-                        color: #fff;
-                        font-size: 14px;
-                        text-align: center;
-                    }
-                }
-                .price-total {
-                    flex: 1;
-                    height: 38px;
-                    display: flex;
-                    align-items: center;
-                    justify-content: center;
-                    border: 1px solid rgba(33, 153, 248, 0.5);
-                    background: rgba(33, 153, 248, 0.1);
-                    color: #000000;
-                    border-radius: 4px;
-                    .main-val {
-                        font-size: 20px;
-                        font-weight: bold;
-                        color: #2199f8;
-                        padding-right: 2px;
-                    }
-                }
-            }
-        }
-        .executor-info {
-            margin-top: 14px;
-            &.mt-0 {
-                margin-top: 0;
-            }
-            .executor-title {
-                font-size: 18px;
-                font-weight: bold;
-                color: #000;
-                margin-bottom: 12px;
-            }
-            .executor-content {
-                .executor-info {
-                    display: flex;
-                    align-items: flex-start;
-                    gap: 12px;
-                }
-                .executor-avatar {
-                    flex-shrink: 0;
-                    img {
-                        width: 60px;
-                        height: 60px;
-                        border-radius: 8px;
-                        object-fit: cover;
-                    }
-                }
-                .executor-details {
-                    flex: 1;
-                    .org-name {
-                        display: flex;
-                        align-items: center;
-                        gap: 8px;
-                        margin-bottom: 3px;
-                        .name {
-                            font-size: 16px;
-                            font-weight: bold;
-                            color: #000;
-                        }
-                        .rating {
-                            font-size: 16px;
-                            color: #ff953d;
-                            font-weight: bold;
-                        }
-                    }
-                    .service-info {
-                        .service-item {
-                            font-size: 12px;
-                            color: #b6b6b6;
-                            line-height: 1.3;
-                            margin-bottom: 2px;
-                            span {
-                                color: #666666;
-                            }
-                        }
-                    }
-                }
-            }
-            .contact-buttons {
-                display: flex;
-                justify-content: flex-end;
-                gap: 8px;
-                margin-top: 16px;
-                .contact-btn {
-                    width: 88px;
-                    height: 32px;
-                    border-radius: 20px;
-                    color: rgba(0, 0, 0, 0.5);
-                    background: #fff;
-                    border: 1px solid rgba(0, 0, 0, 0.1);
-                }
-            }
-        }
-        .farm-info {
-            color: rgba(0, 0, 0, 0.6);
-            font-size: 14px;
-            margin-top: 14px;
-            .info-title {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                color: rgba(41, 41, 41, 0.3);
-                .info-more {
-                    display: flex;
-                    align-items: center;
-                }
-            }
-        }
-        .farm-photo {
-            margin-top: 10px;
-            .photo-list {
-                display: flex;
-                align-items: center;
-                width: 100%;
-                overflow: auto;
-                padding-bottom: 10px;
-                .photo-item {
-                    width: 92px;
-                    height: 92px;
-                    border-radius: 8px;
-                    object-fit: cover;
-                }
-
-                .img-item {
-                    img {
-                        width: 92px;
-                        height: 92px;
-                        border-radius: 8px;
-                        object-fit: cover;
-                        margin-right: 12px;
-                    }
-                }
-
-                .view-box {
-                    width: 92px;
-                    height: 92px;
-                    border-radius: 8px;
-                    object-fit: cover;
-                }
-            }
-            .list-text {
-                text-align: center;
-                color: rgba(0, 0, 0, 0.5);
-                padding-top: 2px;
-            }
-        }
-
-        .farm-data {
-            margin-top: 10px;
-            .data-content {
-                margin-top: 8px;
-                border-top: 1px solid #f5f5f5;
-                padding: 8px 0;
-            }
-        }
-
-        .form-item {
-            display: flex;
-            align-items: center;
-            font-size: 14px;
-            color: #767676;
-            height: 24px;
-            .item-name {
-                width: 80px;
-                color: rgba(0, 0, 0, 0.2);
-            }
-        }
-        .form-item + .form-item {
-            padding-top: 2px;
-        }
-
-        .farm-table {
-            margin-top: 10px;
-            .table-item {
-                padding: 10px 0 12px 0;
-            }
-        }
-
-        .new-wrap {
-            border-radius: 5px;
-            text-align: center;
-            border: 1px solid rgba(225, 225, 225, 0.5);
-            .new-title {
-                background: rgba(241, 241, 241, 0.4);
-                border-radius: 5px 5px 0 0;
-                border-bottom: 1px solid rgba(225, 225, 225, 0.5);
-                display: flex;
-                color: #767676;
-                // justify-content: space-around;
-                padding: 2px 6px;
-                font-size: 12px;
-                .table-name {
-                    width: 24px;
-                    font-size: 12px;
-                    margin: 0 auto;
-                }
-            }
-
-            .title-1 {
-                width: 46px;
-            }
-            .title-2 {
-                flex: 1;
-            }
-            .title-3 {
-                width: 52px;
-            }
-            .title-4 {
-                width: 56px;
-            }
-            .title-5 {
-                width: 52px;
-            }
-            .new-table-wrap {
-                padding: 5px;
-                .new-prescription {
-                    height: 45px;
-                }
-                .new-prescription {
-                    .new-table {
-                        height: 100%;
-                        display: flex;
-                        align-items: center;
-                        // border: 1px solid rgba(225, 225, 225, 0.8);
-                        background: #fff;
-                        border-radius: 5px;
-                        color: rgba(0, 0, 0, 0.6);
-                        font-size: 11px;
-                        .line-l {
-                            display: flex;
-                            flex: 1;
-                            .line-2 {
-                                flex: 1;
-                                padding: 0 2px;
-                            }
-                        }
-                        .line-r {
-                            &.has-border {
-                                border-left: 1px solid rgba(225, 225, 225, 0.8);
-                            }
-                            .line-3 {
-                                display: flex;
-                                align-items: center;
-                            }
-                            .sub-line {
-                                padding: 10px 0;
-                            }
-                            .line-4 {
-                                display: flex;
-                                align-items: center;
-                                border-top: 1px solid rgba(225, 225, 225, 0.8);
-                            }
-                            .execute-line {
-                                border-right: 1px solid rgba(225, 225, 225, 0.8);
-                            }
-                        }
-                    }
-                    .note-text {
-                        margin: 8px 0 4px 0;
-                        color: rgba(0, 0, 0, 0.4);
-                        background: #fff;
-                        padding: 6px 8px;
-                        border-radius: 5px;
-                        text-align: left;
-                        font-size: 11px;
-                    }
-                }
-                .new-prescription + .new-prescription {
-                    // padding-top: 8px;
-                    .new-table {
-                        border-top: 1px solid rgba(0, 0, 0, 0.08);
-                    }
-                }
-            }
-        }
-
-        .work-map {
-            padding: 10px 0;
-            .map-content {
-                padding-top: 8px;
-                .map-dom {
-                    height: 166px;
-                    width: 100%;
-                    clip-path: inset(0px round 8px);
-                }
-            }
-        }
-    }
-}
-
-.task-tips-popup {
-    width: 75%;
-    padding: 28px 28px 20px;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-    .create-farm-icon {
-        width: 40px;
-        height: 40px;
-        margin-bottom: 12px;
-    }
-    .farm-check-icon {
-        width: 68px;
-        height: 68px;
-        margin-bottom: 12px;
-    }
-    .create-farm-text {
-        font-size: 20px;
-        font-weight: 500;
-        line-height: 40px;
-        margin-bottom: 32px;
-        text-align: center;
-        &.success-text {
-            font-size: 23px;
-            font-weight: 400;
-        }
-    }
-    .main-text {
-        color: #2199f8;
-    }
-    .create-farm-btn {
-        width: 100%;
-        box-sizing: border-box;
-        padding: 8px;
-        border-radius: 25px;
-        font-size: 16px;
-        background: #2199f8;
-        color: #fff;
-        text-align: center;
-    }
-}
-</style>

+ 0 - 1553
src/views/old_mini/modify_work/index.vue

@@ -1,1553 +0,0 @@
-<template>
-    <div class="new-farming-page">
-        <custom-header :name="isAdd ? '新增农事' : isEdit ? '编辑方案' : '农事详情'"></custom-header>
-        <div class="new-farming-content">
-            <div v-if="!isAdd && !isEdit">
-                <div class="step-wrap">
-                    <farm-steps :currentStep="0" />
-                </div>
-                <div class="box-wrap farm-info">
-                    <div class="info-title">
-                        <div class="card-title">农场现状</div>
-                        <!-- <div class="info-more">
-                            点击查看更多
-                            <el-icon><ArrowRight /></el-icon>
-                        </div> -->
-                    </div>
-                    <div class="info-content">
-                        {{ farmStatusText }}
-                    </div>
-                </div>
-                <div class="box-wrap farm-photo" v-if="triggerImg.length">
-                    <div class="photo-list">
-                        <photo-provider :photo-closable="true">
-                                <photo-consumer v-for="src in triggerImg" intro="触发照片" :key="src" :src="base_img_url2 + src.cloudFilename">
-                                    <div class="img-item">
-                                        <img :src="base_img_url2 + src.cloudFilename" class="view-box">
-                                    </div>
-                                </photo-consumer>
-                        </photo-provider>
-                    </div>
-                    <!-- <div class="list-text">点击查看更多</div> -->
-                </div>
-            </div>
-            <el-form
-                ref="formRef"
-                style="max-width: 600px"
-                label-position="left"
-                :rules="rules"
-                :model="dynamicValidateForm"
-                class="demo-dynamic"
-            >
-                <div class="farm-card" v-if="!isAdd">
-                    <div class="card-title">{{ detailData?.farmWorkName }}<span class="type-tag">标准农事</span></div>
-                    <div class="info-content">
-                        <el-form-item label-width="70px" class="form-item text-item" label="农事编号">
-                            <div class="info-text">
-                                {{ detailData?.code }}
-                            </div>
-                        </el-form-item>
-                        <el-form-item label-width="70px" class="form-item text-item" label="服务亩数">
-                            <div class="info-text">
-                                {{ detailData?.area ? formatArea(detailData?.area) + '亩' : '--' }}
-                            </div>
-                        </el-form-item>
-                        <el-form-item label-width="70px" class="form-item text-item" label="服务区域">
-                            <div class="info-text">
-                                {{ detailData?.serviceRegion }}
-                            </div>
-                        </el-form-item>
-                        <!-- <el-form-item label-width="70px" class="form-item" prop="conditionRate" label="触发条件">
-                            <div class="condition-wrap">
-                                {{ detailData?.condition }}
-                            </div>
-                        </el-form-item> -->
-                        <el-form-item label-width="70px" class="form-item" prop="executeDate" label="执行时间">
-                            <el-date-picker
-                                class="item-input"
-                                style="width: 100%"
-                                value-format="YYYY-MM-DD"
-                                v-model="dynamicValidateForm.executeDate"
-                                type="date"
-                                :clearable="false"
-                                placeholder="选择日期"
-                                :editable="false"
-                            />
-                        </el-form-item>
-                    </div>
-                </div>
-                <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="farmWorkName" label="农事名称">
-                                    <el-select v-model="dynamicValidateForm.farmWorkName" 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="执行时间">
-                                    <el-date-picker
-                                        v-model="dynamicValidateForm.checkDay"
-                                        value-format="YYYY-MM-DD"
-                                        type="date"
-                                        placeholder="请选择执行时间"
-                                        style="width: 100%"
-                                        :editable="false"
-                                    />
-                                </el-form-item>
-                        </div>
-                    </div>
-                </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%">
-                            <el-option
-                                v-for="(usage, uId) in allUsageModeList"
-                                :key="uId"
-                                :label="usage"
-                                :value="usage"
-                            />
-                        </el-select>
-                    </el-form-item>
-                    <div v-if="dynamicValidateForm.usageMode !== '人工农事'">
-                        <el-form-item
-                            v-for="(prescriptionItem, prescriptionI) in dynamicValidateForm.prescriptionList"
-                            :key="prescriptionI"
-                            :prop="'prescriptions.' + prescriptionI + '.value'"
-                            class="prescription-item"
-                        >
-                            <div class="recipe-item">
-                                <div class="sub-title">
-                                    <div>{{ prescriptionItem.name }}处方</div>
-                                    <div class="add-tag" @click="addDomain(prescriptionI)">
-                                        <el-icon color="#2199F8"><Plus /></el-icon>新增药物
-                                    </div>
-                                </div>
-                                <div class="recipe-form">
-                                    <el-form-item
-                                        v-for="(domain, index) in prescriptionItem.pesticideFertilizerList"
-                                        :key="domain.key"
-                                        :prop="'pesticideFertilizerList.' + index + '.value'"
-                                    >
-                                        <div class="form-box">
-                                            <div class="form-index">{{ formatIndex(index) }}</div>
-                                            <div class="box-item" v-if="domain.typeName">
-                                                <div class="form-l">药肥类型</div>
-                                                <div class="form-r r-text">
-                                                    {{ domain.typeName }}
-                                                    <!-- <el-select
-                                                    v-model="domain.typeName"
-                                                    placeholder="请选择"
-                                                    style="width: 100%"
-                                                    >
-                                                        <el-option :label="domain.typeName" :value="domain.typeName" />
-                                                </el-select> -->
-                                                </div>
-                                            </div>
-                                            <div class="box-item">
-                                                <div class="form-l">药肥名称</div>
-                                                <div class="form-r">
-                                                    <el-select
-                                                        filterable
-                                                        @change="handlePesticideFertilizerChange(prescriptionI, index)"
-                                                        v-model="domain.pesticideFertilizerId"
-                                                        placeholder="请选择"
-                                                        style="width: 100%"
-                                                    >
-                                                        <el-option
-                                                            v-for="item in pesticideFertilizersOptions"
-                                                            :key="item.id"
-                                                            :label="item.defaultName || item.name"
-                                                            :value="item.id"
-                                                        />
-                                                    </el-select>
-                                                </div>
-                                            </div>
-                                            <div class="form-title">人工方式</div>
-                                            <div class="box-item sub-item">
-                                                <div class="form-l has-sub">
-                                                    <div class="main-name">药肥配比</div>
-                                                </div>
-                                                <div class="form-r input-box text-center input-unit">
-                                                    <!-- <el-input
-                                                        v-model="domain.ratio"
-                                                        style="width: 100%"
-                                                        placeholder="请输入"
-                                                    /> -->
-
-                                                    <el-input v-model="domain.ratio" type="number" step="0.01" placeholder="请输入">
-                                                        <template #append>倍</template>
-                                                    </el-input>
-                                                </div>
-                                            </div>
-                                            <!-- <div class="box-item sub-item">
-                                                <div class="form-l">施用方式</div>
-                                                <div class="form-r">
-                                                    <el-select
-                                                        v-model="domain.usageMode"
-                                                        placeholder="请选择"
-                                                        style="width: 100%"
-                                                    >
-                                                        <el-option
-                                                            v-for="(usage, uId) in domain.usageModeList"
-                                                            :key="uId"
-                                                            :label="usage"
-                                                            :value="usage"
-                                                        />
-                                                    </el-select>
-                                                </div>
-                                            </div> -->
-                                            <div class="box-item sub-item">
-                                                <div class="form-l has-sub">
-                                                    <div class="main-name">单亩用量</div>
-                                                </div>
-                                                <div class="form-r input-box text-center">
-                                                    <!-- <el-input
-                                                        v-model="domain.muUsage"
-                                                        style="width: 100%"
-                                                        placeholder="请输入"
-                                                    /> -->
-                                                    <el-input v-model="domain.muUsage" type="number" step="0.01" placeholder="请输入">
-                                                        <template #append>{{ domain.unit }}</template>
-                                                    </el-input>
-                                                </div>
-                                            </div>
-                                            <div v-if="dynamicValidateForm.usageMode === '叶面施'">
-                                                <div class="form-title">无人机</div>
-                                                <div class="box-item sub-item">
-                                                    <div class="form-l has-sub">
-                                                        <div class="main-name">药肥配比</div>
-                                                    </div>
-                                                    <div class="form-r input-box text-center">
-                                                        <!-- <el-input
-                                                            v-model="domain.ratio2"
-                                                            style="width: 100%"
-                                                            placeholder="请输入"
-                                                        /> -->
-                                                        <el-input v-model="domain.ratio2" type="number" step="0.01" placeholder="请输入">
-                                                            <template #append>倍</template>
-                                                        </el-input>
-                                                    </div>
-                                                </div>
-                                                <div class="box-item sub-item">
-                                                    <div class="form-l has-sub">
-                                                        <div class="main-name">单亩用量</div>
-                                                    </div>
-                                                    <div class="form-r input-box text-center">
-                                                        <!-- <el-input
-                                                            v-model="domain.muUsage2"
-                                                            style="width: 100%"
-                                                            placeholder="请输入"
-                                                        /> -->
-                                                        <el-input v-model="domain.muUsage2" type="number" step="0.01" placeholder="请输入">
-                                                            <template #append>{{ domain.unit }}</template>
-                                                        </el-input>
-                                                    </div>
-                                                </div>
-                                            </div>
-                                            <div class="input-box mark-box">
-                                                <el-input
-                                                    v-model="domain.remark"
-                                                    style="width: 100%"
-                                                    placeholder="备注:用药注意事项"
-                                                />
-                                            </div>
-                                            <div class="action-btn">
-                                                <el-button
-                                                    class="btn delete-btn"
-                                                    @click.prevent="removeDomain(prescriptionI, domain)"
-                                                >
-                                                    删除
-                                                </el-button>
-                                                <el-button
-                                                    type="default"
-                                                    class="btn"
-                                                    @click.prevent="resetItemForm(prescriptionI, index)"
-                                                >
-                                                    重置
-                                                </el-button>
-                                            </div>
-                                        </div>
-                                    </el-form-item>
-                                </div>
-                            </div>
-                        </el-form-item>
-                    </div>
-                </div>
-                <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">
-                            执行分区:
-                            <span class="block"></span>
-                            <el-select
-                                popper-class="v-select-popper-ns"
-                                v-model="regionId"
-                                placeholder="请选择分区"
-                                style="width: 160px"
-                                @change="changeRegion"
-                            >
-                                <el-option
-                                    v-for="(area, index) in areaList"
-                                    :key="index"
-                                    :label="area.name"
-                                    :value="area.id"
-                                >
-                                </el-option>
-                            </el-select>
-                        </div>
-                        <div class="area-select">
-                            服务亩数:
-                            <span class="block"></span>{{ serveArea }}
-                        </div>
-                        <div class="bottom-map" ref="areaRef"></div>
-                        <div>
-                            <div class="check-btn">
-                                <el-checkbox v-model="checkedArea" @change="handleArea" label="全选" size="large" />
-                            </div>
-                        </div>
-                    </div>
-                </div>
-
-                <div class="submit-btn" v-if="isEdit">
-                    <div class="btn second" @click.prevent="cancelEdit">取消编辑</div>
-                    <div class="btn" @click.prevent="submitForm(formRef)">保存方案</div>
-                </div>
-                <div class="submit-btn" v-if="!isAdd && !isEdit">
-                    <div class="btn second" @click="handleIgnore">忽略</div>
-                    <div class="btn" @click.prevent="submitForm(formRef)">确认并报价</div>
-                </div>
-                <div class="submit-btn" v-if="isAdd && farmProgress === 0">
-                    <div class="btn second">取消</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>
-    </div>
-
-    <popup v-model:show="showTaskPopup" round class="task-tips-popup">
-        <template v-if="taskPopupType === 'warning'">
-            <img  class="create-farm-icon" src="@/assets/img/home/create-farm-icon.png" alt="" />
-            <div class="create-farm-text">
-                <div>您确认忽略 <span class="main-text">{{ detailData?.farmName }}</span> 的 <span class="main-text">{{ detailData?.farmWorkName }}</span> 农事吗</div>
-            </div>
-        </template>
-        <template v-else>
-            <img class="farm-check-icon" src="@/assets/img/home/right.png" alt="">
-            <div class="create-farm-text success-text">农事已下发成功</div>
-        </template>
-        <div class="create-farm-btn" @click="handlePopupBtn">{{ taskPopupType === 'warning' ? '确认忽略' : '我知道了' }}</div>
-    </popup>
-
-    
-    <!-- 服务报价单 -->
-    <price-sheet-popup ref="priceSheetPopupRef"></price-sheet-popup>
-</template>
-
-<script setup>
-import { onActivated, ref, reactive, onDeactivated, onBeforeUnmount, computed, onMounted } from "vue";
-import { useRouter, useRoute } from "vue-router";
-import { ElMessage ,ElMessageBox} from "element-plus";
-import customHeader from "@/components/customHeader.vue";
-import NewFarmMap from "./newFarmMap";
-import { useStore } from "vuex";
-import { Popup } from "vant";
-import farmSteps from "@/components/farmSteps.vue";
-import { base_img_url2 } from "@/api/config";
-import { formatArea } from "@/common/commonFun";
-import priceSheetPopup from "@/components/popup/priceSheetPopup.vue";
-import dayjs from "dayjs";
-const store = useStore();
-const router = useRouter();
-const route = useRoute();
-
-// 角色
-// const curRole = store.state.app.curRole
-const curRole = 0
-
-const gardenId = ref(null);
-const actionType = ref([]);
-const isAdd = ref(false)
-
-const showTaskPopup = ref(false);
-const taskPopupType = ref('warning');
-
-const isEdit = ref(false)
-isAdd.value = route.query.isAdd ? true : false
-isEdit.value = route.query.isEdit ? true : false
-onActivated(() => {
-    const id = route.query.id;
-    if (id) {
-        getDetail(id);
-        getTriggerImg(id);
-    }
-    window.scrollTo(0, 0);
-    getFarmWorkNameList();
-    getFarmWorkIndexNameList();
-    if (route.query.data) {
-        actionType.value = JSON.parse(route.query.data);
-    } else {
-        actionType.value = ["生长异常"];
-    }
-    dynamicValidateForm.prescriptionList = actionType.value.map((name) => ({
-        name,
-        pesticideFertilizerList: [
-            {
-                key: 1,
-                typeName: "",
-                muUsage: "",
-                muUsage2: "",
-                ratio: "",
-                ratio2: "",
-                remark: "",
-            },
-        ],
-    }));
-    if (!(curRole==1 && isAdd.value)) {
-        const point = store.state.home.miniUserLocationPoint;
-        // newFarmMap.initMap(point, areaRef.value);
-        // eventBus.on("editNsMap:areaVal", getArea);
-        gardenId.value = route.query.gardenId;
-        // getAreaList(() => {
-        //     newFarmMap.initArea(areaList.value);
-        // });
-    }
-
-    getWarningMsg();
-});
-
-const triggerImg = ref([]);
-const getTriggerImg = async (id) => {
-    const { data } = await VE_API.z_farm_work_record.getTriggerImg({ farmWorkRecordId: id });
-    triggerImg.value = data || [];
-}
-
-
-const priceSheetPopupRef = ref(null);
-const showPriceSheetPopup = () => {
-    priceSheetPopupRef.value.handleShowPopup(detailData.value);
-};
-
-const detailData = ref({});
-const getDetail = async (id) => {
-    const { data } = await VE_API.z_farm_work_record.getDetail({ id });
-        const res = data[0];
-        detailData.value = res;
-        dynamicValidateForm.executeDate = res.executeDate;
-        dynamicValidateForm.usageMode = res.usageMode;
-
-        res.prescriptionList.forEach(item => {
-            item.pesticideFertilizerList.forEach(pesticide => {
-                pesticide.typeName = item.name;
-            });
-        });
-
-        dynamicValidateForm.prescriptionList = res.prescriptionList;
-
-        getFarmWorkArrangeDetail(res.farmWorkArrangeId);
-};
-
-
-// 获取农场现状
-const farmStatusText = ref('');
-const getFarmWorkArrangeDetail = (id) => {
-    VE_API.farm.getFarmWorkArrangeDetail({ id }).then(({ data }) => {
-        farmStatusText.value = data.farmStatus;
-    });
-};
-
-function handleIgnore() {
-    taskPopupType.value = 'warning';
-    showTaskPopup.value = true;
-}
-
-function handlePopupBtn() {
-    showTaskPopup.value = false;
-    if (taskPopupType.value === 'warning') {
-        // 确认忽略
-        VE_API.z_farm_work_record.ignoreFarmWorkRecord({ farmWorkRecordId: route.query.id }).then((res) => {
-            if (res.code === 0) {
-                ElMessage.success("操作成功");
-                router.back();
-            }
-        });
-    } else {
-        router.replace({
-            path: "/completed_work",
-            query: {
-                miniJson: JSON.stringify({ id: route.query.id }),
-            },
-        });
-    }
-}
-
-const resetForm = (formEl) => {
-    if (!formEl) return;
-    formEl.resetFields();
-    serveArea.value = null;
-    regionId.value = null;
-};
-
-// 清空所有数据
-const clearData = () => {
-    // 清空表单
-    resetForm(formRef.value);
-    
-    // 清空详情数据
-    detailData.value = {};
-    
-    // 清空表单数据
-    dynamicValidateForm.farmWorkName = "";
-    dynamicValidateForm.conditionRate = "";
-    dynamicValidateForm.purpose = "";
-    dynamicValidateForm.executeDate = dayjs().format("YYYY-MM-DD");
-    dynamicValidateForm.checkDay = "";
-    dynamicValidateForm.usageMode = "";
-    dynamicValidateForm.prescriptionList = [{
-        name: "",
-        pesticideFertilizerList: [{
-            key: 1,
-            typeName: "",
-            muUsage: "",
-            muUsage2: "",
-            ratio: "",
-            ratio2: "",
-            remark: "",
-        }],
-    }];
-    
-    // 清空其他数据
-    serveArea.value = null;
-    regionId.value = null;
-    areaList.value = [];
-    farmProgress.value = 0;
-    situationDescription.value = '';
-    checkedArea.value = false;
-    actionType.value = [];
-    gardenId.value = null;
-    showTaskPopup.value = false;
-    taskPopupType.value = 'warning';
-};
-
-onDeactivated(() => {
-    // areaRef.value && newFarmMap.destroyMap();
-    clearData();
-});
-
-onBeforeUnmount(() => {
-    clearData();
-});
-
-const cancelEdit = () => {
-    ElMessageBox.confirm("确认要取消编辑吗?", "提示", {
-        confirmButtonText: "确认",
-        cancelButtonText: "取消",
-        type: "warning",
-    })
-        .then(() => {
-            router.back();
-        })
-        .catch(() => {
-            console.log("取消编辑");
-        });
-};
-
-// 表单
-const formRef = ref();
-const dynamicValidateForm = reactive({
-    farmWorkName: "",
-    conditionRate: "",
-    purpose: "",
-    executeDate: dayjs().format("YYYY-MM-DD"),
-    checkDay: "",
-    usageMode: "",
-    prescriptionList: [
-        {
-            name: "",
-            pesticideFertilizerList: [
-                {
-                    key: 1,
-                    typeName: "",
-                    muUsage: "",
-                    muUsage2: "",
-                    ratio: "",
-                    ratio2: "",
-                    remark: "",
-                },
-            ],
-        },
-    ],
-});
-
-const rules = {
-    farmWorkName: [
-        {
-            required: true,
-            message: "请输入农事名称",
-            trigger: "blur",
-        },
-    ],
-    conditionRate: [
-        {
-            required: false,
-            message: "请输入触发条件",
-            trigger: "blur",
-        },
-    ],
-    executeDate: [
-        {
-            required: false,
-            message: "请选择执行时间",
-            trigger: "blur",
-        },
-    ],
-    checkDay: [
-        {
-            required: true,
-            message: "请选择复核时间",
-            trigger: "blur",
-        },
-    ],
-};
-
-const formatIndex = (index) => {
-    return String(index + 1).padStart(2, "0");
-};
-
-const addDomain = (parentIndex) => {
-    dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList.unshift({
-        key: Date.now(),
-        muUsage: "",
-        muUsage2: "",
-        ratio: "",
-        ratio2: "",
-        remark: "",
-    });
-};
-
-let pesticideFertilizersOptions = ref([
-    // {
-    //     id: 'null',
-    //     name: "芸苔素内酯 15000倍",
-    //     typeName: "30",
-    //     defaultRatio: null,
-    //     defaultDroneRatio: null,
-    //     unit: 0,
-    //     defaultName: "调节",
-    // },
-    {
-        brand: "天润美满",
-        capacity: 1000,
-        count: null,
-        defaultDroneRatio: null,
-        defaultName: "生物活性酶",
-        defaultRatio: null,
-        ftl: "",
-        id: "185",
-        name: "生物活性酶",
-        pesticideFertilizerCode: "1185",
-        price: 220.0,
-        processUnit: "",
-        typeId: 1,
-        typeName: "调节",
-        unit: "ml",
-        unitUsage: null,
-        unitWaterAmount: null,
-        usageModeList: ["叶面施"],
-    },
-    {
-        brand: "",
-        capacity: null,
-        count: null,
-        defaultDroneRatio: null,
-        defaultName: "矮壮素",
-        defaultRatio: null,
-        ftl: "",
-        id: "145",
-        name: "矮壮素",
-        pesticideFertilizerCode: "1145",
-        price: null,
-        processUnit: "",
-        typeId: 1,
-        typeName: "调节",
-        unit: "ml",
-        unitUsage: null,
-        unitWaterAmount: null,
-        usageModeList: ["叶面施"],
-    },
-]);
-VE_API.z_farm_work_order.pesticideFertilizersList().then(({ data }) => {
-    pesticideFertilizersOptions.value = data;
-});
-
-const allUsageMode = ref(null);
-const allUsageModeList = ["叶面施", "根部施", "人工农事"];
-
-// 农事名称列表
-const farmWorkIndexNameList = ref([
-        "片区拔节率",
-        "园区花蕾率",
-        "单树花蕾率",
-        "片区雄穗抽出率",
-        "园区花量大率",
-        "单树花量大率",
-        "片区分蘖率",
-    ]);
-function getFarmWorkIndexNameList() {
-    farmWorkIndexNameList.value = [
-        "片区拔节率",
-        "园区花蕾率",
-        "单树花蕾率",
-        "片区雄穗抽出率",
-        "园区花量大率",
-        "单树花量大率",
-        "片区分蘖率",
-    ];
-    // VE_API.farm.fetchFarmWorkIndexNameList().then(({data}) => {
-    //     farmWorkIndexNameList.value = data
-    // })
-}
-// 触发指标列表
-const farmWorkNameList = ref([]);
-function getFarmWorkNameList() {
-    // VE_API.farm.fetchFarmWorkNameList().then(({data}) => {
-    //     farmWorkNameList.value = data
-    // })
-}
-
-// 预警文字信息
-const warningMsg = ref("");
-
-const getWarningMsg = () => {
-    // VE_API.farm.getFarmWorkWarningMsg({farmId: gardenId.value}).then(({data}) => {
-    //     warningMsg.value = data
-    // })
-};
-
-/**
- * 选择药肥的时候修改订单中药肥pesticideFertilizerId 以外其他数据
- * @param index
- */
-const handlePesticideFertilizerChange = (parentIndex, index) => {
-    let obj = pesticideFertilizersOptions.value.filter(
-        (item) =>
-            dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index].pesticideFertilizerId ===
-            item.id
-    )[0];
-    console.log('obj', obj)
-    dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index] = {
-        ...dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index],
-        typeName: obj.typeName,
-        unit: obj.unit,
-        defaultRatio: obj.defaultRatio,
-        usageModeList: obj.usageModeList,
-        ratio: obj.defaultRatio,
-        defaultName: obj.defaultName,
-        pesticideFertilizerName: obj.name,
-        pesticideFertilizerCode: obj.pesticideFertilizerCode,
-    };
-};
-
-const removeDomain = (parentIndex, item) => {
-    const index = dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList.indexOf(item);
-    if (index !== -1) {
-        dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList.splice(index, 1);
-    }
-};
-
-const resetItemForm = (parentIndex, index) => {
-    dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index] = {
-        typeName: "",
-        muUsage: "",
-        muUsage2: "",
-        ratio: "",
-        ratio2: "",
-        remark: "",
-    };
-};
-
-const submitForm = (formEl) => {
-    if (!formEl) return;
-    formEl.validate((valid) => {
-        if (valid) {
-
-            // router.push({
-            //     path: "/completed_work",
-            //     query: {
-            //         id: 1,
-            //         status: 1,
-            //     },
-            // });
-            submit();
-        } else {
-            console.log("error submit!");
-        }
-    });
-};
-
-const submit = () => {
-    // let executeBlueZones = null
-    // if (!(curRole==1 && isAdd.value)) {
-    //     executeBlueZones = newFarmMap.getSelectedBlueRegion();
-    // }
-    // if (!executeBlueZones || !executeBlueZones.length) {
-    //     ElMessage({
-    //         message: "请选择执行区域",
-    //         type: "warning",
-    //     });
-    //     return false
-    // }
-
-    // 检查药物所有项是否都包含特定的字段
-    // const hasRequiredFields = dynamicValidateForm.prescriptionList.every(item => {
-    //     return item.pesticideFertilizerList.every(domain  => {
-    //         const hasPesticideFertilizerCode  = 'pesticideFertilizerCode' in domain
-    //         const hasMuUsage = 'muUsage' in domain;
-    //         const hasRatio = 'ratio' in domain;
-
-    //         const isMuUsageValid = domain.muUsage !== '';
-    //         const isRatioValid = domain.ratio ? true : false;
-
-    //         return hasPesticideFertilizerCode && hasMuUsage && hasRatio && isMuUsageValid && isRatioValid
-    //     });
-    // })
-    // if (!hasRequiredFields) {
-    //     ElMessage({
-    //         message: "请完善药物信息",
-    //         type: "warning",
-    //     });
-    //     return false
-    // }
-
-    // const flattenedDomains = flattenDomains(dynamicValidateForm.prescription)
-    const data = {
-        id: route.query.id,
-        ...dynamicValidateForm,
-    };
-    VE_API.z_farm_work_record.issueFarmWorkRecord(data).then(async (res) => {
-        if (res.code === 0) {
-            // taskPopupType.value = 'success';
-            // showTaskPopup.value = true;
-            await getDetail(route.query.id);
-            showPriceSheetPopup()
-        }
-    })
-    // 新增农事
-    // VE_API.farm.saveFarmWork(data).then(({ code }) => {
-    //     if (code === 0) {
-    //         ElMessage({
-    //             message: "保存成功",
-    //             type: "success",
-    //         });
-    //         setTimeout(() => {
-    //             // router.go(-1);
-    //             router.replace("/expert_album?reload=true");
-    //         }, 500);
-    //     }
-    // });
-    // const data = {
-    //     orderId: props.prescriptioData.orderId,
-    //     orderStatus: 1,
-    //     pesticideFertilizers: dynamicValidateForm.domains,
-    // };
-    // VE_API.order.confirm(data).then(({ code }) => {
-    //     if (code == 0) {
-    //         console.log('专家下发处方成功');
-    //         eventBus.emit('discover:submitForm')
-    //         window.location.reload()
-    //     }
-    // });
-};
-
-const farmWorkTypeVal = computed(() => {
-    const valueMap = {
-        生长异常: 1,
-        病虫异常: 3,
-        营养农事: 2,
-    };
-
-    if (actionType.value.length === 1) {
-        return valueMap[actionType.value[0]] || null; // 如果只有一个元素,返回对应的值,否则返回 null
-    } else {
-        return 1;
-    }
-});
-
-function flattenDomains(data) {
-    return data.reduce((acc, item) => {
-        return acc.concat(item.pesticideFertilizerList);
-    }, []);
-}
-
-// 地图
-const areaRef = ref(null);
-let newFarmMap = new NewFarmMap();
-
-const serveArea = ref(null);
-// 农场分区列表
-const areaList = ref([]);
-const regionId = ref(null);
-
-const farmProgress = ref(0)
-
-// 状况描述相关数据
-const situationDescription = ref('')
-
-// 切换分区
-const changeRegion = (e) => {
-    checkedArea.value = false;
-    newFarmMap.getBlueRegion({ gardenId: gardenId.value, regionId: e }, () => {
-        // newFarmMap.setBlueRegion([{id: "ws0y1me7h94u"}, {id: "ws0y1me545tg"}])
-        // serveArea.value = "3.72亩"
-    });
-};
-
-// 所选蓝色分区的面积
-const getArea = (val) => {
-    serveArea.value = val.toFixed(2) + "亩";
-};
-
-const checkedArea = ref(false);
-const handleArea = (e) => {
-    newFarmMap.toggleAllArea(e);
-};
-
-// 处理上传图片
-const handleUploadImage = () => {
-    // 这里可以添加上传图片的逻辑
-    console.log('上传图片');
-};
-
-// 处理邀请专家诊断
-const handleExpertDiagnosis = () => {
-    // 这里可以添加邀请专家诊断的逻辑
-    console.log('邀请专家诊断');
-};
-</script>
-
-<style lang="scss" scoped>
-.new-farming-page {
-    height: 100vh;
-    position: relative;
-    overflow: auto;
-    font-size: 14px;
-    background: #f2f3f5;
-    ::v-deep {
-        .custom-header {
-            position: fixed;
-            top: 0;
-            padding-bottom: 1px;
-        }
-    }
-    .step-wrap {
-        padding: 12px 0;
-    }
-    .box-wrap {
-        background: #fff;
-        padding: 10px;
-        border-radius: 8px;
-    }
-    .new-farming-content {
-        margin: 41px 0 62px 0;
-        padding: 4px 12px 8px 12px;
-        width: 100%;
-        box-sizing: border-box;
-        
-        // ::v-deep {
-        //     .el-select__input {
-        //         color: #2199F8;
-        //     }
-        //     .el-select__wrapper {
-        //         color: #2199F8;
-        //         min-height: 30px;
-        //         line-height: 28px;
-        //         box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-        //     }
-        //     .el-select__caret {
-        //         color: #2199F8;
-        //     }
-        //     .el-select__placeholder {
-        //         color: #2199F8;
-        //     }
-        //     .el-radio {
-        //         margin-right: 16px;
-        //     }
-        //     .el-input__wrapper {
-        //         box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-        //     }
-        //     .el-input__prefix {
-        //         color: #2199F8;
-        //     }
-        //     .el-input__inner {
-        //         color: #2199F8;
-        //         --el-input-placeholder-color: rgba(33, 153, 248, 0.43);
-        //     }
-        //     .el-tag.el-tag--info {
-        //         --el-tag-text-color: #2199F8;
-        //         --el-tag-bg-color: rgba(33, 153, 248, 0.1);
-        //     }
-        // }
-        .farm-info {
-            color: rgba(0, 0, 0, 0.6);
-            font-size: 14px;
-            margin-top: 14px;
-            .info-title {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                color: rgba(41, 41, 41, 0.3);
-                .info-more {
-                    display: flex;
-                    align-items: center;
-                }
-            }
-        }
-        .farm-photo {
-            margin-top: 10px;
-            .photo-list {
-                display: flex;
-                align-items: center;
-                width: 100%;
-                overflow: auto;
-                padding-bottom: 10px;
-                .photo-item {
-                    width: 92px;
-                    height: 92px;
-                    border-radius: 8px;
-                    object-fit: cover;
-                }
-                .img-item {
-                    img {
-                        width: 92px;
-                        height: 92px;
-                        border-radius: 8px;
-                        object-fit: cover;
-                        margin-right: 12px;
-                    }
-                }
-            }
-            .list-text {
-                text-align: center;
-                color: rgba(0, 0, 0, 0.5);
-                padding-top: 2px;
-            }
-        }
-        .submit-btn {
-            z-index: 10;
-            position: fixed;
-            bottom: 0px;
-            left: 0;
-            width: 100%;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            padding: 12px;
-            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: 25px;
-                line-height: 40px;
-                width: 110px;
-                text-align: center;
-                background: linear-gradient(180deg, #70BFFE, #2199F8);
-                color: #FFFFFF;
-                font-size: 14px;
-                &.second {
-                    background: #FFFFFF;
-                    border: 1px solid rgba(153, 153, 153, 0.5);
-                    color: #666666;
-                }
-            }
-            .btn + .btn {
-                margin-left: 12px;
-            }
-        }
-    }
-    .card-title {
-        font-size: 16px;
-        font-weight: bold;
-        color: #000;
-        display: flex;
-        align-items: center;
-        // justify-content: space-between;
-        .add-tag {
-            font-size: 12px;
-            color: #2199f8;
-            padding: 4px 8px;
-            background: rgba(33, 153, 248, 0.16);
-            border-radius: 20px;
-            font-weight: normal;
-            height: 25px;
-            line-height: 25px;
-        }
-        .type-tag {
-            margin-left: 5px;
-            font-size: 12px;
-            color: #000000;
-            padding: 0 10px;
-            background: rgba(119, 119, 119, 0.1);
-            border-radius: 20px;
-            font-weight: normal;
-            height: 26px;
-            line-height: 26px;
-        }
-    }
-    .pb-12 {
-        padding-bottom: 12px;
-    }
-    .farm-card {
-        background: #ffffff;
-        border-radius: 8px;
-        padding: 12px 12px 0 12px;
-        width: 100%;
-        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;
-        }
-        &.prescription-content {
-            padding: 12px;
-        }
-    }
-
-    .usage-mode-wrap {
-        padding: 0 12px;
-        margin-top: 12px;
-        .info-content {
-            padding-top: 14px;
-            padding-bottom: 1px;
-        }
-
-        .el-form-item--default {
-            margin-bottom: 0;
-        }
-    }
-
-    ::v-deep {
-        .el-form-item__label {
-            height: 30px;
-            line-height: 30px;
-            color: rgba(0, 0, 0, 0.4);
-        }
-        .el-form-item.is-required:not(.is-no-asterisk).asterisk-left>.el-form-item__label:before {
-            display: none;
-        }
-    }
-    .info-content {
-        padding: 10px 0;
-        position: relative;
-
-        .condition-wrap {
-            display: flex;
-            align-items: center;
-            width: 100%;
-            .symbol {
-                width: 10px;
-                // text-align: center;
-                // padding: 0 4px;
-            }
-        }
-        .item-input {
-            // width: 60%;
-            min-width: 140px;
-            max-width: 240px;
-        }
-        .recheck-text {
-            padding-left: 6px;
-        }
-        .info-item {
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
-            width: 100%;
-        }
-        .info-item + .info-item {
-            margin-top: 12px;
-        }
-
-        .bottom-map {
-            width: 100%;
-            height: 250px;
-            clip-path: inset(0px round 8px);
-        }
-        .check-btn {
-            position: absolute;
-            bottom: 16px;
-            right: 6px;
-            background: rgba(0, 0, 0, 0.6);
-            padding: 0 8px;
-            border-radius: 8px;
-
-            ::v-deep {
-                .el-checkbox {
-                    color: #fff;
-                }
-            }
-        }
-        .area-select {
-            padding-bottom: 12px;
-            .block {
-                width: 12px;
-                display: inline-block;
-            }
-        }
-    }
-
-    ::v-deep {
-        .el-form-item--default {
-            margin-bottom: 8px;
-            &.text-item {
-                margin-bottom: 2px;
-                .el-form-item__content {
-                    line-height: 24px;
-                }
-                .el-form-item__label {
-                    height: 24px;
-                    line-height: 24px;
-                }
-            }
-        }
-    }
-    .sub-title {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        color: rgba(0, 0, 0, 0.6);
-        font-size: 14px;
-        .add-tag {
-            font-size: 12px;
-            color: #2199f8;
-            padding: 0 8px;
-            border: 1px solid #2199F8;
-            border-radius: 5px;
-            font-weight: normal;
-            height: 28px;
-            line-height: 28px;
-        }
-    }
-    .recipe-item {
-        width: 100%;
-        .recipe-form {
-            padding-top: 8px;
-            ::v-deep {
-                .el-form-item {
-                    &:last-child {
-                        margin-bottom: 0;
-                    }
-                }
-            }
-        }
-
-        .box-item {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            color: rgba(0, 0, 0, 0.4);
-            .r-text {
-                width: 140px;
-                text-align: center;
-            }
-            .form-r {
-                width: 60%;
-                min-width: 140px;
-                max-width: 240px;
-            }
-        }
-        .form-box {
-            border: 1px solid rgba(33, 153, 248, 0.8);
-            border-radius: 8px;
-            padding: 20px 10px;
-            width: 100%;
-            position: relative;
-            // background: rgb(209, 235, 255, 0.3);
-            // margin-bottom: 12px;
-            .form-index {
-                position: absolute;
-                left: 0;
-                top: 0;
-                padding: 0 6px;
-                background: #2199F8;
-                border-radius: 4px 0 4px 0;
-                height: 18px;
-                line-height: 18px;
-                font-size: 12px;
-                color: #fff;
-            }
-            .input-box {
-                &.mark-box {
-                    padding: 8px 0 12px 0;
-                }
-            }
-
-            
-            // .input-unit {
-            //     ::v-deep {
-            //         .el-input {
-            //             border: 1px solid #dcdfe6;
-            //             border-radius: 5px;
-            //             height: 32px;
-            //             box-sizing: border-box;
-            //         }
-            //         .el-input__wrapper {
-            //             padding: 0 2px 0 10px;
-            //             height: 30px;
-            //             line-height: 30px;
-            //             min-height: 30px;
-            //             box-shadow: none;
-            //         }
-            //         .el-input__inner {
-            //             --el-input-inner-height: 30px;
-            //             height: 30px;
-            //             line-height: 30px;
-            //             min-height: 30px;
-            //             color: #606266;
-            //             --el-input-placeholder-color: #a8abb2;
-            //         }
-            //         .el-input-group__append {
-            //             box-shadow: none;
-            //             border: none;
-            //             background: none;
-            //         }
-            //     }
-            // }
-            .text-center {
-                ::v-deep {
-                    .el-input__inner {
-                        text-align: center;
-                    }
-                }
-            }
-            .action-btn {
-                display: flex;
-                justify-content: flex-end;
-                .btn {
-                    color: #8F8F8F;
-                    border-radius: 25px;
-                    padding: 5px 30px;
-                }
-                .delete-btn {
-                    color: rgba(255, 89, 89, 0.9);
-                    background: #fff;
-                    border: 1px solid rgba(255, 89, 89, 0.9);
-                }
-            }
-            .btn-group {
-                padding-top: 12px;
-            }
-            .sub-item {
-                padding-left: 10px;
-                .has-sub {
-                    display: flex;
-                    flex-direction: column;
-                    align-items: center;
-                    .main-name {
-                        line-height: 20px;
-                    }
-                    .sub-name {
-                        font-size: 10px;
-                        color: rgba(129, 129, 129, 0.5);
-                        line-height: 14px;
-                    }
-                }
-                .colunm-sub {
-                    display: flex;
-                    align-items: center;
-                    .sub-name {
-                        font-size: 10px;
-                        color: rgba(129, 129, 129, 0.5);
-                    }
-                }
-                .r-text {
-                    width: 132px;
-                    text-align: center;
-                    font-size: 14px;
-                    color: #474747;
-                }
-                .price {
-                    ::v-deep {
-                        .el-input__wrapper {
-                            box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-                        }
-                        .el-input__inner {
-                            color: #2199f8;
-                        }
-                    }
-                }
-            }
-            .form-title {
-                font-size: 14px;
-                padding-top: 6px;
-                color: #000;
-                font-weight: 600;
-            }
-            .box-item + .box-item {
-                margin-top: 8px;
-            }
-        }
-        .form-box + .form-box {
-            margin-top: 8px;
-        }
-        .usageMode-wrap {
-            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;
-    }
-}
-.task-tips-popup {
-    width: 75%;
-    padding: 28px 28px 20px;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-    .create-farm-icon{
-        width: 40px;
-        height: 40px;
-        margin-bottom: 12px;
-    }
-    .farm-check-icon{
-        width: 68px;
-        height: 68px;
-        margin-bottom: 12px;
-    }
-    .create-farm-text{
-        font-size: 20px;
-        font-weight: 500;
-        line-height: 40px;
-        margin-bottom: 32px;
-        text-align: center;
-        &.success-text{
-            font-size: 24px;
-            font-weight: 500;
-        }
-    }
-    .main-text {
-        color: #2199F8;
-    }
-    .create-farm-btn{
-        width: 100%;
-        box-sizing: border-box;
-        padding: 8px;
-        border-radius: 25px;
-        font-size: 16px;
-        background: #2199F8;
-        color: #fff;
-        text-align: center;
-    }
-}
-</style>

+ 0 - 2476
src/views/old_mini/modify_work/modify.vue

@@ -1,2476 +0,0 @@
-<template>
-    <div class="new-farming-page" ref="pageRef">
-        <custom-header :name="isEdit ? (onlyPrice ? '编辑报价' : '编辑方案') : '查看详情'"></custom-header>
-        <div class="new-farming-content" :class="{ 'no-permission': !hasPlanPermission }">
-            <el-form
-                ref="formRef"
-                style="max-width: 600px"
-                label-position="left"
-                :rules="rules"
-                :model="dynamicValidateForm"
-                class="demo-dynamic"
-            >
-                <div class="farm-card">
-                    <div class="card-title between common-inputs">
-                        <div>{{ detailData?.name }}<span class="type-tag">标准农事</span></div>
-                        <el-select v-if="isEdit" size="small" v-model="tagName" placeholder="标记为" style="width: 94px">
-                            <el-option
-                                v-for="item in tagList"
-                                :key="item.value"
-                                :label="item.label"
-                                :value="item.value"
-                            />
-                        </el-select>
-                        <div class="edit-tag tag-text" v-else>{{ statusMap[tagName] }}</div>
-                        <!-- <el-tooltip
-                            effect="dark"
-                            placement="left"
-                        >
-                            <template #content>
-                                <div class="tag-item">全托管</div>
-                                <div class="tag-item">飞防托管</div>
-                                <div class="tag-item">营养托管</div>
-                            </template>
-                            <div class="title-tag add-tag">托管用户</div>
-                        </el-tooltip> -->
-                    </div>
-                    <div class="info-content">
-                        <el-form-item label-width="70px" class="form-item text-item" label="农事编号">
-                            <div class="info-text">
-                                {{ detailData?.code }}
-                            </div>
-                        </el-form-item>
-                        <el-form-item v-if="!noPrice" label-width="70px" class="form-item text-item" label="服务亩数">
-                            <div class="info-text">
-                                {{ detailData?.farm?.mianji ? formatArea(detailData?.farm?.mianji) + "亩" : "--" }}
-                            </div>
-                        </el-form-item>
-                        <el-form-item v-if="!noPrice" label-width="70px" class="form-item text-item" label="服务区域">
-                            <div class="info-text">
-                                {{ detailData?.farm?.address || "--" }}
-                            </div>
-                        </el-form-item>
-                        <el-form-item
-                            v-if="isEdit"
-                            label-width="70px"
-                            class="form-item"
-                            prop="executeDate"
-                            label="执行时间"
-                        >
-                            <el-date-picker
-                                class="item-input"
-                                style="width: 100%"
-                                value-format="YYYY-MM-DD"
-                                v-model="dynamicValidateForm.executeDate"
-                                type="date"
-                                :clearable="false"
-                                placeholder="选择日期"
-                                :editable="false"
-                            />
-                        </el-form-item>
-                        <el-form-item v-else label-width="70px" class="form-item text-item" label="执行时间">
-                            <div class="info-text">
-                                {{ detailData?.executeDate }}
-                            </div>
-                        </el-form-item>
-                    </div>
-                </div>
-
-                <div class="farm-card" v-if="!onlyPrice">
-                    <!-- 农情互动 -->
-                    <div class="card-title border-bottom between">
-                        <div>农情互动</div>
-                        <!-- <span class="del-tag">删除互动</span> -->
-                    </div>
-                    <div v-if="isEdit" class="interact-form">
-                        <div class="interact-form-item" data-interact-field="phenologyId">
-                            <div class="form-label">
-                                互动阶段
-                            </div>
-                            <div class="form-input-wrapper two-select">
-                                <div class="select-item">
-                                    <el-select
-                                        style="width: 100%"
-                                        v-model="interactFormData.phenologyId"
-                                        placeholder="请选择物候期"
-                                        @change="handlePhenologyChange"
-                                        :editable="false">
-                                        <el-option
-                                            v-for="item in phenologyList"
-                                            :key="item.id"
-                                            :label="item.name"
-                                            :value="item.id"
-                                        ></el-option>
-                                    </el-select>
-                                </div>
-                                <div class="select-item">
-                                    <el-select style="width: 100%" v-model="interactFormData.reproductiveId" placeholder="请选择物候期" :editable="false">
-                                        <el-option
-                                            v-for="item in reproductiveList"
-                                            :key="item.id"
-                                            :label="item.name"
-                                            :value="item.id"
-                                        ></el-option>
-                                    </el-select>
-                                </div>
-                            </div>
-                        </div>
-                        <div class="interact-form-item" data-interact-field="interactionTime">
-                            <div class="form-label">
-                                互动日期
-                            </div>
-                            <div class="form-input-wrapper">
-                                <el-date-picker
-                                    v-model="interactFormData.interactionTime"
-                                    disabled
-                                    style="width: 100%"
-                                    type="date"
-                                    placeholder="请选择日期"
-                                    :editable="false"
-                                />
-                            </div>
-                        </div>
-                        <div class="interact-form-item" data-interact-field="interactionQuestion">
-                            <div class="form-label">
-                                互动问题
-                            </div>
-                            <el-input
-                                v-model="interactFormData.interactionQuestion"
-                                type="textarea"
-                                :rows="3"
-                                show-word-limit
-                                maxlength="35"
-                                placeholder="请设置互动问题"
-                                class="question-textarea"
-                            />
-                        </div>
-                    </div>
-                    <div v-else class="interact-content">
-                        {{ interactFormData?.interactionQuestion }}
-                        <!-- <span class="edit-tag" @click="handleEditInteract(detailData)">点击编辑</span> -->
-                    </div>
-                </div>
-
-                <template v-if="isEdit">
-                    <div class="farm-card prescription-content common-inputs">
-                        <div class="card-title pb-12 between">
-                            药物处方
-                            <div class="add-tag" @click="addDomain()">
-                                <el-icon color="#2199F8"><Plus /></el-icon>新增药物
-                            </div>
-                        </div>
-                        <el-form-item label-width="82px" class="form-item" prop="usageMode" label="施用方式">
-                            <el-select
-                                v-model="dynamicValidateForm.prescription.usageMode"
-                                placeholder="请选择施用方式"
-                                style="width: 100%"
-                            >
-                                <el-option
-                                    v-for="(usage, uId) in allUsageModeList"
-                                    :key="uId"
-                                    :label="usage"
-                                    :value="usage"
-                                />
-                            </el-select>
-                        </el-form-item>
-                        <el-form-item label-width="82px" class="form-item" prop="executeStyle" label="执行方式">
-                            <el-select
-                                    class="select-item"
-                                    v-model="dynamicValidateForm.executeStyle"
-                                    placeholder="执行方式"
-                                    @change="handleExecutionMethodChange"
-                                >
-                                    <el-option
-                                        v-for="(item, index) in modeList"
-                                        :key="index"
-                                        :label="item.name"
-                                        :value="item.value"
-                                    />
-                                </el-select>
-                        </el-form-item>
-                        
-                        <div v-if="dynamicValidateForm.prescription.usageMode !== '人工'">
-                            <el-form-item
-                                v-for="(domain, index) in dynamicValidateForm.prescription.pesticideFertilizerList"
-                                :key="index"
-                                :prop="'prescription.pesticideFertilizerList.' + index + '.value'"
-                                class="prescription-item"
-                            >
-                                <div class="recipe-item">
-                                    <div class="recipe-form">
-                                            <div class="form-box">
-                                                <div class="form-index">药肥{{ index + 1 }}</div>
-                                                <div class="box-item" v-if="domain.typeName">
-                                                    <div class="form-l">药肥类型</div>
-                                                    <div class="form-r r-text">
-                                                        {{ domain.typeName }}
-                                                    </div>
-                                                </div>
-                                                <div class="box-item">
-                                                    <div class="form-l">药肥名称</div>
-                                                    <div class="form-r">
-                                                        <el-select
-                                                            filterable
-                                                            @change="
-                                                                handlePesticideFertilizerChange(index)
-                                                            "
-                                                            v-model="domain.code"
-                                                            placeholder="请选择"
-                                                            style="width: 150px"
-                                                        >
-                                                            <el-option
-                                                                v-for="item in pesticideFertilizersOptions"
-                                                                :key="item.pesticideFertilizerCode"
-                                                                :label="item.defaultName || item.name"
-                                                                :value="item.pesticideFertilizerCode"
-                                                            />
-                                                        </el-select>
-                                                    </div>
-                                                </div>
-
-                                                <div class="mt-8">
-                                                    <div class="box-item sub-item" :data-ratio-index="index">
-                                                        <div class="form-l has-sub">
-                                                            <div class="main-name">药肥配比</div>
-                                                        </div>
-                                                        <div class="form-r input-box text-center input-unit">
-                                                            <el-input
-                                                                v-model="domain.ratio"
-                                                                type="number"
-                                                                step="0.01"
-                                                                style="width: 150px"
-                                                                :placeholder="domain.placeholderRatio || '请输入'"
-                                                            >
-                                                                <template #append>倍</template>
-                                                            </el-input>
-                                                        </div>
-                                                    </div>
-                                                    <div class="box-item sub-item" :data-dosage-index="index">
-                                                        <div class="form-l has-sub">
-                                                            <div class="main-name">单亩用量</div>
-                                                        </div>
-                                                        <div class="form-r input-box text-center">
-                                                            <el-input
-                                                                v-model="domain.dosage"
-                                                                type="number"
-                                                                step="0.01"
-                                                                style="width: 150px"
-                                                                :placeholder="domain.placeholderDosage || '请输入'"
-                                                            >
-                                                                <template #append>{{ domain.unit }}</template>
-                                                            </el-input>
-                                                        </div>
-                                                    </div>
-
-                                                    
-                                                    <div class="box-item">
-                                                        <div class="form-l">药肥品牌</div>
-                                                        <div class="form-r">
-                                                            <el-input
-                                                                v-model="domain.brand"
-                                                                placeholder="药肥品牌"
-                                                                style="width: 150px"
-                                                            />
-                                                        </div>
-                                                    </div>
-                                                    <div class="box-item">
-                                                        <div class="form-l">药肥单价</div>
-                                                        <div class="form-r">
-                                                            <el-input
-                                                                style="width: 150px"
-                                                                v-model="domain.price"
-                                                                type="number"
-                                                                step="0.01"
-                                                                placeholder="单价"
-                                                            >
-                                                                <template #append>元/{{ domain.unit }}</template>
-                                                            </el-input>
-                                                        </div>
-                                                    </div>
-
-                                                    
-
-                                                    <div v-if="!noPrice" class="medicine-item">
-                                                        <div class="item-total">总计:</div>
-                                                        <div class="item-price">
-                                                            {{ getPesticideTotal(domain) }}<span class="item-unit">元</span>
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                                <!-- <div class="input-box mark-box">
-                                                    <el-input
-                                                        v-model="domain.remark"
-                                                        style="width: 100%"
-                                                        type="textarea"
-                                                        :rows="2"
-                                                        placeholder="备注:用药注意事项"
-                                                    />
-                                                </div> -->
-                                                <div class="action-btn">
-                                                    <el-button
-                                                        class="btn delete-btn"
-                                                        @click.prevent="removeDomain(prescriptionI, domain)"
-                                                    >
-                                                        删除
-                                                    </el-button>
-                                                    <el-button
-                                                        type="default"
-                                                        class="btn"
-                                                        @click.prevent="resetItemForm(prescriptionI, index)"
-                                                    >
-                                                        重置
-                                                    </el-button>
-                                                </div>
-                                            </div>
-                                        <!-- </el-form-item> -->
-                                    </div>
-                                </div>
-                            </el-form-item>
-                        </div>
-                    </div>
-
-                    <div class="farm-card prescription-content">
-                        <div class="medicine-box">
-                                <div class="form-index">服务报价</div>
-                                <div class="box-wrap">
-                                    <div class="medicine-item mt-8">
-                                        <div class="item-name">单亩价格</div>
-                                        <div class="item-val common-inputs">
-                                            <el-input
-                                                style="width: 150px"
-                                                v-model="servicePricePerMu"
-                                                type="number"
-                                                step="0.01"
-                                                placeholder="服务单价"
-                                            >
-                                                <template #append>元/亩</template>
-                                            </el-input>
-                                        </div>
-                                    </div>
-                                    <div v-if="!noPrice" class="medicine-item">
-                                        <div class="item-total">总计:</div>
-                                        <div class="item-price">
-                                            {{ getServiceTotal() }}<span class="item-unit">元</span>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                    </div>
-
-                    <div class="submit-btn" :class="{ 'center-btn': onlyPrice || defaultTagName === 0 }">
-                        <!-- <div v-if="!onlyPrice" class="btn second" @click.prevent="cancelEdit">取消编辑</div> -->
-                        <div v-if="!onlyPrice && defaultTagName !== 0" class="btn second" @click.prevent="handleCancelAttention">取消关注</div>
-                        <div class="btn" :style="{ opacity: isSaving ? 0.8 : 1 }" @click.prevent="submitForm(formRef)">{{ isSaving ? '保存中...' : '保存' }}</div>
-                    </div>
-                </template>
-
-                <template v-else>
-                    <div class="farm-card prescription-content">
-                        <div class="card-title">药物处方</div>
-                        <div class="table-item">
-                            <div class="form-item">
-                                <div class="item-name">施用方式</div>
-                                <div class="item-text">{{ dynamicValidateForm?.prescription?.usageMode }}</div>
-                            </div>
-                            <div class="form-item">
-                                <div class="item-name">执行方式</div>
-                                <div class="item-text">
-                                    {{ dynamicValidateForm?.prescription?.pesticideFertilizerList[0]?.executeStyle === 1 ? '无人机' : dynamicValidateForm?.prescription?.pesticideFertilizerList[0]?.executeStyle === 3 ? '无人机+人工' : '人工' }}
-                                </div>
-                            </div>
-                        </div>
-                        <div class="new-wrap" v-if="detailData?.prescription?.pesticideFertilizerList?.length">
-                            <div class="new-title">
-                                <div class="title-1"><div class="table-name">使用功效</div></div>
-                                <div class="title-2"><div class="table-name">药肥名称</div></div>
-                                <div class="title-4"><div class="table-name">药肥配比</div></div>
-                                <div class="title-5"><div class="table-name">单亩用量</div></div>
-                            </div>
-                            <div
-                                class="new-table-wrap"
-                                v-for="(subP, prescriptionI) in detailData?.prescription?.pesticideFertilizerList || []"
-                                :key="prescriptionI"
-                            >
-                                <!-- <div
-                                    class="new-prescription"
-                                    v-for="(subP, subI) in prescriptionItem.pesticideFertilizerList"
-                                    :key="subI"
-                                > -->
-                                    <div class="new-table">
-                                        <div class="line-l">
-                                            <div class="line-1 title-1">{{ subP.typeName || '--' }}</div>
-                                            <div class="line-2">
-                                                {{ subP.name || subP.pesticideFertilizerName }}
-                                            </div>
-                                        </div>
-                                        <div class="line-r">
-                                            <div class="line-3">
-                                                <div class="sub-line title-4">{{ subP.ratio ? (subP.ratio + '倍') : '--' }}</div>
-                                                <div class="sub-line title-5">{{ subP.dosage ? (subP.dosage + subP.unit) : '--' }}</div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <div class="note-text" v-if="subP.remark">{{ subP.remark }}</div>
-                                <!-- </div> -->
-                            </div>
-                        </div>
-                    </div>
-
-                    <div class="farm-card prescription-content">
-                        <div class="card-title">处方报价</div>
-
-                        <div class="price-bottom" v-if="!noPrice">
-                            <div class="info-title-wrap">
-                                <div class="sub-title font-bold">药肥费用</div>
-                                <div class="info-more">
-                                    {{ pesticideCostTotal ? formatArea(pesticideCostTotal) : "--" }}<span class="unit-text">元</span>
-                                </div>
-                            </div>
-                        </div>
-                        <div class="info-content-wrap pt-8">
-                            <price-table :prescriptionData="dynamicValidateForm.prescription" :area="detailData?.farm?.mianji">
-                                <template #bottomContent>
-                                    <div class="price-bottom">
-                                        <div class="info-title-wrap">
-                                            <div class="sub-title font-bold">服务费用</div>
-                                            <div class="info-more" v-if="!noPrice">
-                                                {{ detailData?.serviceMuPrice ? serviceCostTotal : '--' }}
-                                                <span class="unit-text">元</span>
-                                            </div>
-                                        </div>
-                                        <div class="price-info">
-                                            <div class="info-l">
-                                                单亩价格<span class="main-text">{{
-                                                    detailData?.serviceMuPrice
-                                                        ? detailData?.serviceMuPrice + "元/亩"
-                                                        : "--"
-                                                }}</span>
-                                            </div>
-                                        </div>
-                                        <div class="price-total" v-if="!noPrice">
-                                            报价合计:<span class="main-val">{{
-                                                totalCost ? formatArea(totalCost) : "--"
-                                            }}</span
-                                            >元
-                                        </div>
-                                    </div>
-                                </template>
-                            </price-table>
-                        </div>
-                    </div>
-                    <template v-if="!isDefault">
-                        <div class="submit-btn" :class="{ 'center-btn': defaultTagName === 0 }" v-has-permission="'农事规划'">
-                            <div v-if="defaultTagName !== 0" class="btn second" @click.prevent="handleCancelAttention">取消关注</div>
-                            <div class="btn" @click.prevent="toEditPrescription">编辑处方</div>
-                        </div>
-                    </template>
-                </template>
-            </el-form>
-        </div>
-    </div>
-
-    <!-- 服务报价单 -->
-    <price-sheet-popup ref="priceSheetPopupRef"></price-sheet-popup>
-
-    <!-- 互动设置弹窗 -->
-    <interact-popup
-        ref="interactPopupRef"
-        @handleSaveSuccess="handleSaveInteractSuccess"
-        @handleDeleteInteract="handleDeleteInteract"
-    ></interact-popup>
-
-    <!-- 取消关注提示 -->
-    <tip-popup
-        v-model:show="showTipPopup"
-        type="warning"
-        text="您确定要取消关注"
-        text2="农事吗?系统将不再为您推送该农事"
-        :highlightText="detailData.name"
-        :overlayStyle="{ 'z-index': 9999 }"
-        buttonText="确认取消关注"
-        @confirm="handleBtn"
-        :hasClose="true"
-        :closeOnClickOverlay="false"
-    />
-    <!-- 完善信息弹窗 -->
-    <popup 
-        v-model:show="showCompletePopup" 
-        round 
-        class="complete-tip-popup"
-        closeable
-    >
-    <img class="tip-icon success-icon" src="@/assets/img/home/right.png" alt="" />
-    <div class="tip-text success-text">
-        农事信息已完善
-    </div>
-        <div class="complete-content">
-        </div>
-        <div class="btn-wrap">
-            <div class="btn-item second" @click="handleViewDetail">查看详情</div>
-            <div class="btn-item primary" v-if="!allDone" @click="handleCompleteNext">完善下一个农事</div>
-            <div class="btn-item primary" v-else @click="handleBackToPlan">回到种植方案</div>
-        </div>
-    </popup>
-</template>
-
-<script setup>
-import { onActivated, ref, reactive, onDeactivated, onBeforeUnmount, computed, onMounted, nextTick } from "vue";
-import { useRouter, useRoute } from "vue-router";
-import { ElMessage, ElMessageBox } from "element-plus";
-import customHeader from "@/components/customHeader.vue";
-import { useStore } from "vuex";
-import { Popup } from "vant";
-import { formatArea } from "@/common/commonFun";
-import priceSheetPopup from "@/components/popup/priceSheetPopup.vue";
-import interactPopup from "@/components/popup/interactPopup.vue";
-import priceTable from "../agri_work/components/priceTable.vue";
-import tipPopup from "@/components/popup/tipPopup.vue";
-import dayjs from "dayjs";
-const store = useStore();
-const pageRef = ref(null);
-const router = useRouter();
-const route = useRoute();
-
-// 检查是否有"农事规划"权限
-const hasPlanPermission = computed(() => {
-    try {
-        const userInfoStr = localStorage.getItem("localUserInfo");
-        if (!userInfoStr) return false;
-        const userInfo = JSON.parse(userInfoStr);
-        const permissions = userInfo.agriculturalPermissions || [];
-        return permissions.includes("农事规划");
-    } catch (error) {
-        console.error("解析用户信息失败:", error);
-        return false;
-    }
-});
-
-const tagList = ref([
-    { label: "托管农事", value: 2 },
-    { label: "特别关注", value: 1 },
-    // { label: "取消关注", value: 0 },
-]);
-
-const tagName = ref("");
-const defaultTagName = ref("");
-
-// 互动表单数据
-const interactFormData = ref({
-    phenologyId: "",
-    reproductiveId: "",
-    interactionTime: "",
-    interactionQuestion: "",
-});
-const phenologyList = ref([]);
-const reproductiveList = ref([]);
-// 是否编辑
-const isEdit = ref(false);
-// 是否只显示价格,不需要农情互动
-const onlyPrice = ref(false);
-// 是否不显示价格,种植方案没有价格
-const noPrice = ref(false);
-// 是否标注方案
-const isDefault = ref(false);
-// 是否在完善信息弹窗中
-const isDoingComplete = ref(false);
-// 是否正在保存
-const isSaving = ref(false);
-
-const showCompletePopup = ref(false);
-onActivated(() => {
-    isDefault.value = route.query.isDefault == 'true' ? true : false;
-    isEdit.value = route.query.isEdit == 'true' ? true : false;
-    onlyPrice.value = route.query.onlyPrice == 'true' ? true : false;
-    noPrice.value = route.query.noPrice == 'true' ? true : false;
-    // enabled为0时,方案不可用,需要完善
-    isDoingComplete.value = route.query.enabled == 0 ? true : false;
-    // 方案列表中的ids数组
-    if (route.query.farmWorkId) {
-        getDetail();
-    }
-    if (isDoingComplete.value) {
-        let farmWorkAndArrangeIdIdsArray = (() => {
-                const stored = sessionStorage.getItem("farmWorkAndArrangeIds");
-                return stored ? JSON.parse(stored) : [];
-            })();
-        ids.value = farmWorkAndArrangeIdIdsArray;
-        if (ids.value.length === 0 || ids.value.length === 1) {
-            allDone.value = true;
-        }
-    }
-    nextTick(() => {
-        if (pageRef.value) {
-            pageRef.value.scrollTop = 0;
-        } else {
-            window.scrollTo(0, 0);
-        }
-    });
-    // 初始化 prescription 对象
-    if (!route.query.farmWorkId) {
-        dynamicValidateForm.prescription = {
-            usageMode: "",
-            pesticideFertilizerList: [
-                {
-                    code: "",
-                    name: "",
-                    dosage: "",
-                    ratio: "",
-                    typeName: "",
-                    muPrice: 0,
-                    executeStyle: 1,
-                    unit: "",
-                },
-            ],
-        };
-    }
-});
-
-const priceSheetPopupRef = ref(null);
-const showPriceSheetPopup = () => {
-    priceSheetPopupRef.value.handleShowPopup(detailData.value);
-};
-
-const handlePhenologyChange = async (val) => {
-    interactFormData.value.reproductiveId = "";
-    const { data } = await VE_API.farm.listByPhenologyId({ phenologyId: val });
-    if (!data || !Array.isArray(data)) return;
-    reproductiveList.value = data;
-};
-
-const statusMap = ref({
-    0: "",
-    1: "特别关注",
-    2: "托管农事",
-});
-const detailData = ref({});
-const userInfo = localStorage.getItem('localUserInfo');
-const userInfoObj = userInfo ? JSON.parse(userInfo) : {};
-const getDetail = async () => {
-    const { data, code } = await VE_API.farm.getFarmWorkLib({ id: route.query.farmWorkId, farmId: route.query.farmId, agriculturalId: userInfoObj?.agriculturalId });
-    if(code === 0) {
-        detailData.value = data;
-        dynamicValidateForm.executeDate = data.executeDate;
-        dynamicValidateForm.prescription.usageMode = data?.prescription?.usageMode === '其他' ? '根部施' : data?.prescription?.usageMode;
-        // 从 prescription 获取数据
-        dynamicValidateForm.prescription = data.prescription || {
-            usageMode: "",
-            pesticideFertilizerList: [],
-        };
-        dynamicValidateForm.executeStyle = data?.prescription?.pesticideFertilizerList[0]?.executeStyle;
-        servicePricePerMu.value = detailData.value.serviceMuPrice || null;
-        if (!isDefault.value) {
-            data?.prescription?.pesticideFertilizerList.forEach(item => {
-                item.placeholderRatio = item.ratio || '';
-                item.placeholderDosage = item.dosage || '';
-                if (isNaN(item.ratio)) {
-                    item.ratio = null;
-                }
-                if (isNaN(item.dosage)) {
-                    item.dosage = null;
-                }
-            });
-        }
-        const pesticideFertilizerCodes = data?.prescription?.pesticideFertilizerList.map(item => item.code);
-        getPriceList(data.schemeId, pesticideFertilizerCodes);
-        
-        // 加载互动表单数据
-        if (data.id) {
-            // 重置互动表单数据
-            interactFormData.value = {
-                phenologyId: "",
-                reproductiveId: "",
-                interactionTime: "",
-                interactionQuestion: "",
-            };
-            // 按照 interactPopup.vue 的方式获取数据
-            await getPhenologyList(data.containerSpaceTimeId || route.query.containerSpaceTimeId);
-            await getFarmWorkArrangeDetail(route.query.id || route.query.arrangeId);
-        }
-    }
-};
-
-const getPriceList = async (schemeId, pesticideFertilizerCodes) => {
-    const { data } = await VE_API.farm.getPriceList({ schemeId, pesticideFertilizerCodes });
-    if (!data || !Array.isArray(data)) return;
-
-    dynamicValidateForm.prescription.pesticideFertilizerList.forEach((item) => {
-        const priceInfo = data.find((p) => p.pesticideFertilizerCode === item.code);
-        if (!priceInfo) return;
-        item.price = priceInfo.price ?? item.price;
-        item.brand = priceInfo.brand ?? item.brand;
-    });
-
-    quotationData.value = {...detailData.value, ...dynamicValidateForm};
-};
-
-const showTipPopup = ref(false);
-// 取消关注弹窗
-const handleCancelAttention = () => {
-    showTipPopup.value = true;
-};
-
-const handleBtn = () => {
-    showTipPopup.value = false;
-    // 切换标记
-    VE_API.container_farm_work_arrange.toggleFollow({ id: route.query.id, isFollow: 0 }).then((res) => {
-        if (res.code === 0) {
-            ElMessage.success("操作成功");
-            router.back();
-        }
-    });
-};
-
-const toEditPrescription = () => {
-    isEdit.value = true;
-    if (tagName.value === 0) {
-        tagName.value = 1;
-    }
-    nextTick(() => {
-        if (pageRef.value) {
-            pageRef.value.scrollTo({ top: 0, behavior: "auto" });
-        } else {
-            window.scrollTo(0, 0);
-        }
-    });
-};
-
-const quotationData = ref({});
-
-
-// 计算单个药肥的总计:单价 * 单亩用量 * 亩数
-const getPesticideTotal = (pesticide) => {
-    const price = Number(pesticide.price || 0);
-    const dosage = Number(pesticide.dosage || 0); // 单亩用量
-    const area = Number(detailData.value.farm?.mianji || 0); // 农场面积
-    if (!price || !dosage || !area) return "--";
-    const total = (price * dosage * area).toFixed(2);
-    return total;
-};
-
-function getServiceCost(cost, area) {
-    if (!cost || !area) return "--";
-    return (parseFloat(cost) * parseFloat(area)).toFixed(2);
-}
-
-const handleViewDetail = () => {
-    showCompletePopup.value = false;
-    isEdit.value = false;
-    nextTick(() => {
-        if (pageRef.value) {
-            pageRef.value.scrollTo({ top: 0, behavior: "auto" });
-        } else {
-            window.scrollTo(0, 0);
-        }
-    });
-};
-const allDone = ref(false);
-const handleBackToPlan = () => {
-    router.back();
-};
-
-const ids = ref([]);
-const handleCompleteNext = () => {
-    showCompletePopup.value = false;
-    
-    // 如果数组为空,说明已经全部完成
-    if (!ids.value || ids.value.length === 0) {
-        allDone.value = true;
-        return;
-    }
-    
-    // 找到当前 farmWorkId 在数组中的索引
-    const currentFarmWorkId = route.query.farmWorkId;
-    const currentIndex = ids.value.findIndex(item => String(item.farmWorkId) === String(currentFarmWorkId));
-    
-    if (currentIndex === -1) {
-        // 如果找不到当前项,说明可能已经被删除或不存在
-        allDone.value = true;
-        console.log('未找到当前farmWorkId');
-        return;
-    }
-    
-    // 如果数组只剩一个(最后一个),标记为全部完成
-    if (ids.value.length === 1) {
-        // 从数组中删除当前项(已经完成的)
-        ids.value.splice(currentIndex, 1);
-        // 更新 sessionStorage
-        sessionStorage.setItem("farmWorkAndArrangeIds", JSON.stringify(ids.value));
-        allDone.value = true;
-        return;
-    }
-    
-    // 判断是否是最后一个
-    const isLast = currentIndex === ids.value.length - 1;
-    
-    // 如果是最后一个
-    if (isLast) {
-        // 从数组中删除当前项(已经完成的)
-        ids.value.splice(currentIndex, 1);
-        // 更新 sessionStorage
-        sessionStorage.setItem("farmWorkAndArrangeIds", JSON.stringify(ids.value));
-        
-        // 如果删除后数组为空,标记为全部完成
-        if (ids.value.length === 0) {
-            allDone.value = true;
-            return;
-        }
-        
-        // 如果删除后数组不为空,从第一个开始获取
-        const firstItem = ids.value[0];
-        if (firstItem && firstItem.farmWorkId && firstItem.arrangeId) {
-            router.replace({
-                path: "/modify",
-                query: {
-                    id: firstItem.arrangeId,
-                    farmWorkId: firstItem.farmWorkId,
-                    farmId: route.query.farmId,
-                    containerSpaceTimeId: route.query.containerSpaceTimeId,
-                    schemeId: route.query.schemeId,
-                    isEdit: route.query.isEdit,
-                    onlyPrice: route.query.onlyPrice,
-                },
-            });
-            return;
-        }
-        
-        // 如果第一个项无效,标记为全部完成
-        allDone.value = true;
-        return;
-    }
-    
-    // 获取下一个农事:取当前索引+1位置的值
-    const nextItem = ids.value[currentIndex + 1];
-    
-    if (nextItem && nextItem.farmWorkId && nextItem.arrangeId) {
-        // 从数组中删除当前项(已经完成的)
-        ids.value.splice(currentIndex, 1);
-        // 更新 sessionStorage
-        sessionStorage.setItem("farmWorkAndArrangeIds", JSON.stringify(ids.value));
-        
-        router.replace({
-            path: "/modify",
-            query: {
-                id: nextItem.arrangeId,
-                farmWorkId: nextItem.farmWorkId,
-                farmId: route.query.farmId,
-                containerSpaceTimeId: route.query.containerSpaceTimeId,
-                schemeId: route.query.schemeId,
-                enabled: 0,
-                isEdit: true,
-                onlyPrice: false,
-                noPrice: true,
-                isDefault: false,
-            },
-        });
-        setTimeout(() => {
-            window.location.reload();
-        }, 500);
-    } else {
-        // 从数组中删除当前项(已经完成的)
-        ids.value.splice(currentIndex, 1);
-        // 更新 sessionStorage
-        sessionStorage.setItem("farmWorkAndArrangeIds", JSON.stringify(ids.value));
-        allDone.value = true;
-        console.log('没有下一个农事需要完善');
-    }
-};
-const resetForm = (formEl) => {
-    if (!formEl) return;
-    formEl.resetFields();
-};
-
-// 清空所有数据
-const clearData = () => {
-    // 清空表单
-    resetForm(formRef.value);
-
-    // 清空详情数据
-    detailData.value = {};
-
-    // 清空表单数据
-    dynamicValidateForm.farmWorkName = "";
-    dynamicValidateForm.conditionRate = "";
-    dynamicValidateForm.purpose = "";
-    dynamicValidateForm.executeDate = dayjs().format("YYYY-MM-DD");
-    dynamicValidateForm.prescription = {
-        id: "",
-        usageMode: "",
-        farmWorkLibCode: "",
-        expertId: "",
-        phenology: "",
-        soil: "",
-        speed: null,
-        pesticideFertilizerList: [
-            {
-                code: "",
-                name: "",
-                dosage: "",
-                ratio: "",
-                typeName: "",
-                muPrice: 0,
-                executeStyle: 1,
-                unit: "",
-            },
-        ],
-    };
-};
-
-onDeactivated(() => {
-    clearData();
-});
-
-onBeforeUnmount(() => {
-    clearData();
-});
-
-const cancelEdit = () => {
-    ElMessageBox.confirm("确认要取消编辑吗?", "提示", {
-        confirmButtonText: "确认",
-        cancelButtonText: "取消",
-        type: "warning",
-    })
-        .then(() => {
-            isEdit.value = false;
-            nextTick(() => {
-                if (pageRef.value) {
-                    pageRef.value.scrollTop = 0;
-                } else {
-                    window.scrollTo(0, 0);
-                }
-            });
-        })
-        .catch(() => {
-            console.log("取消编辑");
-        });
-};
-
-const modeList = ref([
-    { name: "无人机", value: 1 },
-    { name: "人工", value: 2 },
-    { name: "无人机+人工", value: 3 },
-]);
-
-const handleExecutionMethodChange = (index, val) => {
-    // if (val == 1) {
-    //     servicePricePerMu.value = detailData.value.uavServicePrice;
-    // } else {
-    //     servicePricePerMu.value = detailData.value.manualServicePrice;
-    // }
-};
-
-// 表单
-const formRef = ref();
-const dynamicValidateForm = reactive({
-    farmWorkName: "",
-    conditionRate: "",
-    purpose: "",
-    executeDate: dayjs().format("YYYY-MM-DD"),
-    usageMode: "",
-    executeStyle: 2,
-    executionMethod: 2,
-    prescription: {
-        id: "",
-        usageMode: "",
-        farmWorkLibCode: "",
-        expertId: "",
-        phenology: "",
-        soil: "",
-        speed: null,
-        pesticideFertilizerList: [
-            {
-                code: "",
-                id: "",
-                name: "",
-                dosage: "",
-                ratio: "",
-                brand: "",
-                price: "",
-                typeName: "",
-                muPrice: 0,
-                executeStyle: 1,
-                unit: "",
-            },
-        ],
-    },
-});
-
-const rules = {
-    farmWorkName: [
-        {
-            required: true,
-            message: "请输入农事名称",
-            trigger: "blur",
-        },
-    ],
-    conditionRate: [
-        {
-            required: false,
-            message: "请输入触发条件",
-            trigger: "blur",
-        },
-    ],
-    executeDate: [
-        {
-            required: false,
-            message: "请选择执行时间",
-            trigger: "blur",
-        },
-    ],
-};
-
-const addDomain = () => {
-    if (!dynamicValidateForm.prescription.pesticideFertilizerList) {
-        dynamicValidateForm.prescription.pesticideFertilizerList = [];
-    }
-    dynamicValidateForm.prescription.pesticideFertilizerList.unshift({
-        code: "",
-        name: "",
-        dosage: "",
-        ratio: "",
-        brand: "",
-        price: "",
-        typeName: "",
-        muPrice: 0,
-        id: "",
-        executeStyle: 2,
-        unit: "",
-    });
-};
-
-let pesticideFertilizersOptions = ref([]);
-VE_API.z_farm_work_order.pesticideFertilizersList().then(({ data }) => {
-    pesticideFertilizersOptions.value = data;
-});
-
-const allUsageModeList = ["树冠+内膛", "地面喷施", "树冠喷施", "根部施", "叶面施", "内膛喷施", "其他"];
-
-/**
- * 选择药肥的时候修改订单中药肥pesticideFertilizerId 以外其他数据
- * @param index
- */
-const handlePesticideFertilizerChange = (index) => {
-    const currentItem = dynamicValidateForm.prescription.pesticideFertilizerList[index];
-    let obj = pesticideFertilizersOptions.value.filter(
-        (item) => currentItem.code === item.pesticideFertilizerCode
-    )[0];
-    if (obj) {
-        dynamicValidateForm.prescription.pesticideFertilizerList[index] = {
-            ...currentItem,
-            code: obj.pesticideFertilizerCode,
-            id: obj.id,
-            name: obj.name || obj.defaultName,
-            typeName: obj.typeName,
-            unit: obj.unit,
-            ratio: "", // 清空亩兑水量
-            dosage: "", // 清空单亩用量
-            executeStyle: obj.executionMethod || 1,
-        };
-    }
-};
-
-const removeDomain = (index) => {
-    if (index !== -1 && dynamicValidateForm.prescription.pesticideFertilizerList) {
-        dynamicValidateForm.prescription.pesticideFertilizerList.splice(index, 1);
-    }
-};
-
-const resetItemForm = (index) => {
-    if (dynamicValidateForm.prescription.pesticideFertilizerList) {
-        dynamicValidateForm.prescription.pesticideFertilizerList[index] = {
-            code: "",
-            id: "",
-            name: "",
-            dosage: "",
-            ratio: "",
-            brand: "",
-            price: "",
-            typeName: "",
-            muPrice: 0,
-            executeStyle: 1,
-            unit: "",
-        };
-    }
-};
-
-const servicePricePerMu = ref(null);
-
-// 服务费用总计(数值):亩单价 * 亩数
-const serviceCostTotal = computed(() => {
-    const price = Number(servicePricePerMu.value || 0);
-    const area = Number(detailData.value?.farm?.mianji || detailData.value?.area || 0);
-    if (!price || !area) return 0;
-    return Number((price * area).toFixed(2));
-});
-
-// 显示用的服务费用(字符串或 "--")
-const getServiceTotal = () => {
-    const total = serviceCostTotal.value;
-    return total ? total.toFixed(2) : "--";
-};
-
-// 药肥费用总计:∑(单价 * 单亩用量 * 亩数)
-const pesticideCostTotal = computed(() => {
-    const list = dynamicValidateForm.prescription?.pesticideFertilizerList || [];
-    const area = Number(detailData.value?.farm?.mianji || detailData.value?.area || 0);
-    if (!list.length || !area) return 0;
-
-    const sum = list.reduce((acc, item) => {
-        const price = Number(item?.price || 0);
-        const dosage = Number(item?.dosage || 0);
-        if (!price || !dosage) return acc;
-        return acc + price * dosage * area;
-    }, 0);
-
-    return Number(sum.toFixed(2));
-});
-
-// 报价合计 = 药肥费用 + 服务费用
-const totalCost = computed(() => {
-    const pesticide = Number(pesticideCostTotal.value || 0);
-    const service = Number(serviceCostTotal.value || 0);
-    if (!pesticide && !service) return '--';
-    return Number((pesticide + service).toFixed(2));
-});
-
-const submitForm = (formEl) => {
-    if (!formEl) return;
-    formEl.validate(async (valid) => {
-        if (valid) {
-            // 校验标记是否已选择
-            if (!validateTagName()) return;
-
-            // 校验施用方式是否已选择
-            if (!validateUsageMode()) return;
-
-            // 校验农情互动,不通过,直接返回失败
-            if (!onlyPrice.value && !validateInteractForm()) return false;
-
-            // 校验药肥的亩兑水量和单亩用量是否填写
-            if (!validatePesticideDosage()) return;
-
-            // 保存报价信息前先校验是否填写完整
-            if (!validatePriceInfos()) return;
-
-            // 检验服务报价是否填写
-            if (!validateServicePrice()) return;
-            submit();
-        } else {
-            console.log("error submit!");
-        }
-    });
-};
-
-// 校验标记是否已选择
-const validateTagName = () => {
-    if (tagName.value !== 1 && tagName.value !== 2) {
-        ElMessage.warning("请选择标记类型");
-        return false;
-    }
-    return true;
-};
-
-// 校验施用方式是否已选择
-const validateUsageMode = () => {
-    if (!dynamicValidateForm.prescription?.usageMode || dynamicValidateForm.prescription.usageMode === "") {
-        ElMessage.warning("请选择施用方式");
-        return false;
-    }
-    return true;
-};
-
-// 检验服务报价是否填写
-const validateServicePrice = () => {
-    if (!servicePricePerMu.value) {
-        ElMessage.warning("请完善服务报价信息");
-        return false;
-    }
-    return true;
-};
-
-// 校验药肥的亩兑水量和单亩用量是否填写
-const validatePesticideDosage = () => {
-    const list = dynamicValidateForm.prescription?.pesticideFertilizerList || [];
-    if (!list.length) return true; // 没有药肥就不校验
-
-    // 找到第一个未填写完整的药肥
-    for (let i = 0; i < list.length; i++) {
-        const item = list[i];
-        // 如果选择了药肥(有 code),就必须填写亩兑水量和单亩用量
-        if (item.code) {
-            const hasRatio = item.ratio !== undefined && item.ratio !== null && item.ratio !== "";
-            const hasDosage = item.dosage !== undefined && item.dosage !== null && item.dosage !== "";
-            
-            if (!hasRatio || !hasDosage) {
-                ElMessage.warning("请完善药物处方信息");
-                return false;
-            }
-        }
-    }
-    return true;
-};
-
-// 校验报价信息是否填写完整
-const validatePriceInfos = () => {
-    const list = dynamicValidateForm.prescription?.pesticideFertilizerList || [];
-    if (!list.length) return true; // 没有药肥就不校验
-
-    // 找到第一个未填写完整的药肥
-    const invalidIndex = list.findIndex((item) => {
-        // 只要选择了药肥(有 id),就必须填写单价和品牌
-        if (!item.id) return false; // 没选择药肥不校验
-        const hasPrice = item.price !== undefined && item.price !== null && item.price !== "";
-        const hasBrand = !!item.brand;
-        return !hasPrice || !hasBrand;
-    });
-
-    if (invalidIndex !== -1) {
-        ElMessage.warning("请先完善报价信息");
-        return false;
-    }
-    return true;
-};
-
-const submit = async () => {
-    // 设置保存状态
-    isSaving.value = true;
-    
-    try {
-        const data = {
-            id: route.query.farmWorkId,
-            ...dynamicValidateForm,
-            serviceMuPrice: servicePricePerMu.value,
-            prescription: dynamicValidateForm.prescription
-        };
-        await VE_API.monitor.saveFarmWorkLib(data);
-        
-        if (!onlyPrice.value) {
-            await handleSaveInteract();
-        }
-
-        // 保存报价信息
-        const priceList = {
-            schemeId: detailData.value.schemeId,
-            pesticideFertilizerInfos: dynamicValidateForm.prescription.pesticideFertilizerList.map(item => {
-                return {
-                    pesticideFertilizerId: item.id,
-                    price: item.price,
-                    brand: item.brand,
-                }
-            }),
-        }
-        const res = await VE_API.farm.updateBatchByScheme(priceList);
-        
-        // 切换标记
-        await VE_API.container_farm_work_arrange.toggleFollow({ id: route.query.id, isFollow: tagName.value });
-        
-        if (res.code === 0) {
-            await getDetail();
-            if (isDoingComplete.value) {
-                // 更新 sessionStorage(不删除当前项,保持数组完整)
-                sessionStorage.setItem("farmWorkAndArrangeIds", JSON.stringify(ids.value));
-                
-                showCompletePopup.value = true;
-                return;
-            }
-            ElMessage.success("保存成功");
-            if (onlyPrice.value) {
-                // router.push(`/task_condition?noReload=true`);
-                router.back();
-                return;
-            }
-            isEdit.value = false;
-            nextTick(() => {
-                if (pageRef.value) {
-                    pageRef.value.scrollTop = 0;
-                } else {
-                    window.scrollTo(0, 0);
-                }
-            });
-        } else {
-            // 不需要处方报价信息的农事
-            if (priceList.pesticideFertilizerInfos.length === 0) {
-                if (onlyPrice.value) {
-                    // router.push(`/task_condition?noReload=true`);
-                    router.back();
-                    return;
-                }
-                isEdit.value = false;
-                getDetail();
-                nextTick(() => {
-                    if (pageRef.value) {
-                        pageRef.value.scrollTop = 0;
-                    } else {
-                        window.scrollTo(0, 0);
-                    }
-                });
-            }
-        }
-    } catch (error) {
-        console.error("保存失败:", error);
-        ElMessage.error("保存失败,请重试");
-    } finally {
-        // 无论成功或失败,都要关闭保存状态
-        isSaving.value = false;
-    }
-};
-
-const handleSaveInteractSuccess = () => {
-    getDetail();
-};
-
-const interactPopupRef = ref(null);
-const handleEditInteract = (item) => {
-    if (interactPopupRef.value) {
-        interactPopupRef.value.showPopup({...item, containerSpaceTimeId: route.query.containerSpaceTimeId,id:route.query.id});
-    }
-};
-
-// 获取物候期列表
-const getPhenologyList = async (containerSpaceTimeId) => {
-    if (!containerSpaceTimeId) {
-        phenologyList.value = [];
-        return;
-    }
-    const res = await VE_API.monitor.listPhenology({ containerSpaceTimeId });
-    if (res.code === 0) {
-        phenologyList.value = res.data || [];
-    }
-};
-
-// 获取互动设置详情
-const getFarmWorkArrangeDetail = async (id) => {
-    if (!id) return;
-    const { data, code } = await VE_API.farm.getFarmWorkArrangeDetail({ id });
-    if(code === 0) {
-        tagName.value = data.isFollow;
-        defaultTagName.value = data.isFollow;
-        await handlePhenologyChange(data.phenologyId);
-        interactFormData.value = {
-            phenologyId: data.phenologyId || "",
-            reproductiveId: data.reproductiveId || "",
-            interactionTime: data.interactionTime || "",
-            interactionQuestion: data.interactionQuestion || "",
-        };
-    }
-};
-
-// 格式化日期
-const formatInteractDate = (date) => {
-    // 如果已经是字符串格式 YYYY-MM-DD,直接返回
-    if (typeof date === "string" && /^\d{4}-\d{2}-\d{2}$/.test(date)) {
-        return date;
-    }
-    // 如果是 Date 对象,进行转换
-    if (date instanceof Date) {
-        let year = date.getFullYear();
-        let month = String(date.getMonth() + 1).padStart(2, "0");
-        let day = String(date.getDate()).padStart(2, "0");
-        return `${year}-${month}-${day}`;
-    }
-    // 其他情况返回原值
-    return date;
-};
-
-// 验证互动表单
-const validateInteractForm = () => {
-    if (!interactFormData.value.phenologyId) {
-        ElMessage.warning("请选择互动阶段");
-        return false;
-    }
-    if (!interactFormData.value.reproductiveId) {
-        ElMessage.warning("请选择互动阶段");
-        return false;
-    }
-    if (!interactFormData.value.interactionTime) {
-        ElMessage.warning("请选择互动时间");
-        return false;
-    }
-    if (!interactFormData.value.interactionQuestion?.trim()) {
-        ElMessage.warning("请设置互动问题");
-        return false;
-    }
-    return true;
-};
-
-// 保存互动设置
-const handleSaveInteract = async () => {
-
-    const paramsObj = {
-        id: route.query.id,
-        ...interactFormData.value,
-        interactionTime: formatInteractDate(interactFormData.value.interactionTime),
-    };
-
-    try {
-        const res = await VE_API.monitor.updateFarmWorkArrange(paramsObj);
-        if (res.code !== 0) {
-            ElMessage.error(res.message || "保存农情互动信息失败");
-            return false;
-        }
-        return true;
-    } catch (error) {
-        console.error("保存互动设置失败:", error);
-        ElMessage.error("保存失败,请重试");
-        return false;
-    }
-};
-
-// 删除互动设置
-const handleDeleteInteract = () => {
-    ElMessageBox.confirm("确定要删除该互动设置吗?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-    })
-        .then(async () => {
-            if (!detailData.value.id) return;
-            const res = await VE_API.monitor.deleteFarmWorkArrange({ id: detailData.value.id });
-            if (res.code === 0) {
-                ElMessage.success("删除成功");
-                // 清空表单数据
-                interactFormData.value = {
-                    phenologyId: "",
-                    interactionTime: "",
-                    interactionQuestion: "",
-                };
-                await getDetail(); // 重新获取详情
-            } else {
-                ElMessage.error(res.message || "删除失败");
-            }
-        })
-        .catch(() => {
-            // 用户取消,不做任何操作
-        });
-};
-</script>
-
-<style lang="scss" scoped>
-.new-farming-page {
-    height: 100vh;
-    position: relative;
-    overflow: auto;
-    font-size: 14px;
-    background: #f2f3f5;
-    ::v-deep {
-        .custom-header {
-            position: fixed;
-            top: 0;
-            padding-bottom: 1px;
-        }
-    }
-    .step-wrap {
-        padding: 12px 0;
-    }
-    .box-wrap {
-        background: #fff;
-        padding: 20px 10px 10px;
-        border-radius: 6px;
-    }
-    .new-farming-content {
-        margin: 41px 0 62px 0;
-        padding: 4px 12px 8px 12px;
-        width: 100%;
-        box-sizing: border-box;
-        &.no-permission{
-            margin-bottom: 12px;
-        }
-
-        // ::v-deep {
-        //     .el-select__input {
-        //         color: #2199F8;
-        //     }
-        //     .el-select__wrapper {
-        //         color: #2199F8;
-        //         min-height: 30px;
-        //         line-height: 28px;
-        //         box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-        //     }
-        //     .el-select__caret {
-        //         color: #2199F8;
-        //     }
-        //     .el-select__placeholder {
-        //         color: #2199F8;
-        //     }
-        //     .el-radio {
-        //         margin-right: 16px;
-        //     }
-        //     .el-input__wrapper {
-        //         box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-        //     }
-        //     .el-input__prefix {
-        //         color: #2199F8;
-        //     }
-        //     .el-input__inner {
-        //         color: #2199F8;
-        //         --el-input-placeholder-color: rgba(33, 153, 248, 0.43);
-        //     }
-        //     .el-tag.el-tag--info {
-        //         --el-tag-text-color: #2199F8;
-        //         --el-tag-bg-color: rgba(33, 153, 248, 0.1);
-        //     }
-        // }
-        .farm-info {
-            color: rgba(0, 0, 0, 0.6);
-            font-size: 14px;
-            margin-top: 14px;
-            .info-title {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                color: rgba(41, 41, 41, 0.3);
-                .info-more {
-                    display: flex;
-                    align-items: center;
-                }
-            }
-        }
-        .farm-photo {
-            margin-top: 10px;
-            .photo-list {
-                display: flex;
-                align-items: center;
-                width: 100%;
-                overflow: auto;
-                padding-bottom: 10px;
-                .photo-item {
-                    width: 92px;
-                    height: 92px;
-                    border-radius: 8px;
-                    object-fit: cover;
-                }
-                .img-item {
-                    img {
-                        width: 92px;
-                        height: 92px;
-                        border-radius: 8px;
-                        object-fit: cover;
-                        margin-right: 12px;
-                    }
-                }
-            }
-            .list-text {
-                text-align: center;
-                color: rgba(0, 0, 0, 0.5);
-                padding-top: 2px;
-            }
-        }
-        .submit-btn {
-            z-index: 10;
-            position: fixed;
-            bottom: 0px;
-            left: 0;
-            width: 100%;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            padding: 12px;
-            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);
-            &.center-btn {
-                justify-content: center;
-            }
-            .btn {
-                height: 40px;
-                border-radius: 25px;
-                line-height: 40px;
-                width: 110px;
-                text-align: center;
-                background: linear-gradient(180deg, #70bffe, #2199f8);
-                color: #ffffff;
-                font-size: 14px;
-                &.second {
-                    background: #ffffff;
-                    border: 1px solid rgba(153, 153, 153, 0.5);
-                    color: #666666;
-                }
-            }
-            .btn + .btn {
-                margin-left: 12px;
-            }
-        }
-    }
-    .card-title {
-        font-size: 16px;
-        font-weight: bold;
-        color: #000;
-        display: flex;
-        align-items: center;
-        &.between {
-            justify-content: space-between;
-            .del-tag {
-                color: #e04c4c;
-                border: 1px solid #e04c4c;
-                border-radius: 5px;
-                padding: 4px 14px;
-                font-size: 12px;
-                font-weight: normal;
-            }
-            .title-tag {
-                padding: 2px 10px;
-                height: 26px;
-                line-height: 26px;
-            }
-        }
-        // justify-content: space-between;
-        .add-tag {
-            font-size: 12px;
-            color: #2199f8;
-            padding: 0px 11px;
-            border: 1px solid #2199F8;
-            border-radius: 5px;
-            font-weight: normal;
-            height: 28px;
-            line-height: 28px;
-        }
-        .type-tag {
-            margin-left: 5px;
-            font-size: 12px;
-            color: #000000;
-            padding: 0 10px;
-            background: rgba(119, 119, 119, 0.1);
-            border-radius: 20px;
-            font-weight: normal;
-            height: 26px;
-            line-height: 26px;
-            display: inline-block;
-        }
-    }
-    .pb-12 {
-        padding-bottom: 12px;
-    }
-    .farm-card {
-        background: #ffffff;
-        border-radius: 8px;
-        padding: 12px 12px 0 12px;
-        width: 100%;
-        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;
-        }
-        &.prescription-content {
-            padding: 12px;
-        }
-        .border-bottom {
-            padding-bottom: 7px;
-            border-bottom: 1px solid rgba(245, 245, 245, 0.99);
-        }
-    }
-
-    .table-item {
-        padding: 6px 0 10px 0;
-        .form-item {
-            display: flex;
-            align-items: center;
-            font-size: 14px;
-            color: #767676;
-            height: 24px;
-            .item-name {
-                width: 80px;
-                color: rgba(0, 0, 0, 0.2);
-            }
-        }
-    }
-
-    .new-wrap {
-        border-radius: 5px;
-        text-align: center;
-        border: 1px solid rgba(225, 225, 225, 0.5);
-        .new-title {
-            background: rgba(241, 241, 241, 0.4);
-            border-radius: 5px 5px 0 0;
-            border-bottom: 1px solid rgba(225, 225, 225, 0.5);
-            display: flex;
-            color: #767676;
-            // justify-content: space-around;
-            padding: 3px 0px;
-            font-size: 12px;
-            .table-name {
-                width: 24px;
-                font-size: 12px;
-                margin: 0 auto;
-            }
-        }
-
-        .title-1 {
-            width: 46px;
-        }
-        .title-2 {
-            flex: 1;
-        }
-        .title-3 {
-            width: 52px;
-        }
-        .title-4 {
-            width: 56px;
-        }
-        .title-5 {
-            width: 52px;
-        }
-        .new-table-wrap {
-            padding: 5px 0;
-            .new-prescription + .new-prescription {
-                border-top: 1px solid rgba(225, 225, 225, 0.8);
-            }
-            // .new-prescription {
-                .new-table {
-                    display: flex;
-                    align-items: center;
-                    // border: 1px solid rgba(225, 225, 225, 0.8);
-                    background: #fff;
-                    border-radius: 5px;
-                    color: rgba(0, 0, 0, 0.6);
-                    font-size: 11px;
-                    .line-l {
-                        display: flex;
-                        flex: 1;
-                        .line-2 {
-                            flex: 1;
-                            padding: 0 2px;
-                        }
-                    }
-                    .line-r {
-                        &.has-border {
-                            border-left: 1px solid rgba(225, 225, 225, 0.8);
-                        }
-                        .line-3 {
-                            display: flex;
-                            align-items: center;
-                        }
-                        .sub-line {
-                            padding: 10px 0;
-                        }
-                        .line-4 {
-                            display: flex;
-                            align-items: center;
-                            border-top: 1px solid rgba(225, 225, 225, 0.8);
-                        }
-                        .execute-line {
-                            border-right: 1px solid rgba(225, 225, 225, 0.8);
-                        }
-                    }
-                }
-                .note-text {
-                    margin: 8px 0 4px 0;
-                    color: rgba(0, 0, 0, 0.4);
-                    background: #fff;
-                    padding: 6px 8px;
-                    border-radius: 5px;
-                    text-align: left;
-                    font-size: 11px;
-                }
-            // }
-            // .new-prescription + .new-prescription {
-            //     padding-top: 8px;
-            // }
-        }
-    }
-
-    .info-content-wrap {
-        ::v-deep {
-            .new-table-wrap {
-                padding: 5px 0;
-                .new-prescription + .new-prescription {
-                    border-top: 1px solid rgba(225, 225, 225, 0.8);
-                }
-            }
-        }
-    }
-    .price-bottom {
-        padding-top: 8px;
-
-        .info-title-wrap {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            color: #000;
-            .info-more {
-                font-size: 18px;
-            }
-            .unit-text {
-                font-size: 12px;
-            }
-        }
-        .price-info {
-            padding: 8px 0;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            color: rgba(0, 0, 0, 0.2);
-            .main-text {
-                padding-left: 20px;
-                color: rgba(0, 0, 0, 0.8);
-            }
-            .info-c {
-                flex: 1;
-                text-align: center;
-            }
-        }
-        .price-total {
-            height: 38px;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            border: 1px solid rgba(33, 153, 248, 0.5);
-            background: rgba(33, 153, 248, 0.1);
-            color: #000000;
-            border-radius: 4px;
-            .main-val {
-                font-size: 20px;
-                font-weight: bold;
-                color: #2199f8;
-                padding-right: 2px;
-            }
-        }
-    }
-    .pt-8 {
-        padding-top: 8px;
-    }
-    .pb-8 {
-        padding-bottom: 8px;
-    }
-
-    .common-inputs {
-        ::v-deep {
-            .el-input__wrapper {
-                box-shadow: none;
-            }
-            .el-input-group__append {
-                padding: 0 10px;
-                background: none;
-                box-shadow: none;
-            }
-            .el-input-group__append {
-                color: rgba(33, 153, 248, 0.5);
-            }
-            .el-input {
-                border: 1px solid rgba(33, 153, 248, 0.3);
-                border-radius: 5px;
-                height: 30px;
-                box-sizing: border-box;
-            }
-            .el-input__wrapper {
-                padding: 0 2px 0 10px;
-                height: 28px;
-                line-height: 28px;
-                min-height: 28px;
-            }
-            .el-input__inner {
-                --el-input-inner-height: 28px;
-                height: 28px;
-                line-height: 28px;
-                min-height: 28px;
-                color: #2199f8;
-                --el-input-placeholder-color: rgba(33, 153, 248, 0.43);
-            }
-
-            .el-select__wrapper {
-                box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-            }
-            .el-select__placeholder,
-            .el-select__caret {
-                color: #2199f8;
-            }
-        }
-    }
-
-    .medicine-item {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        height: 32px;
-        .item-name {
-            color: rgba(0, 0, 0, 0.4);
-        }
-        .item-val {
-            min-width: 142px;
-            text-align: center;
-            color: #302f2f;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            gap: 4px;
-            .price-unit {
-                font-size: 12px;
-                color: rgba(0, 0, 0, 0.4);
-                white-space: nowrap;
-            }
-        }
-        .item-total {
-            font-size: 16px;
-            color: #000;
-        }
-        .item-price {
-            color: #2199f8;
-            font-size: 20px;
-            font-weight: bold;
-            .item-unit {
-                font-size: 14px;
-                font-weight: normal;
-                padding-left: 2px;
-                color: #474747;
-            }
-        }
-    }
-    .medicine-box {
-        // padding-top: 10px;
-        border: 1px solid rgba(33, 153, 248, 0.8);
-        position: relative;
-        border-radius: 6px;
-        .item-title {
-            padding-left: 5px;
-            font-size: 16px;
-            color: #000000;
-            font-weight: 500;
-            padding-bottom: 10px;
-        }
-        .medicine-item + .medicine-item {
-            padding-top: 2px;
-        }
-        .mt-8 {
-            margin-top: 8px;
-        }
-    }
-
-    .usage-mode-wrap {
-        padding: 0 12px;
-        margin-top: 12px;
-        .info-content {
-            padding-top: 14px;
-            padding-bottom: 1px;
-        }
-
-        .el-form-item--default {
-            margin-bottom: 0;
-        }
-    }
-
-    ::v-deep {
-        .el-form-item__label {
-            height: 30px;
-            line-height: 30px;
-            color: rgba(0, 0, 0, 0.4);
-        }
-        .el-form-item.is-required:not(.is-no-asterisk).asterisk-left > .el-form-item__label:before {
-            display: none;
-        }
-    }
-    .interact-content {
-        padding: 10px 0;
-        line-height: 20px;
-        color: #919191;
-        font-size: 14px;
-    }
-    .interact-form {
-        padding: 8px 0 20px 0px;
-
-        .interact-form-item {
-            display: flex;
-            align-items: baseline;
-            margin-bottom: 12px;
-
-            &:last-child {
-                margin-bottom: 0;
-            }
-
-            .form-label {
-                width: 70px;
-                color: rgba(0, 0, 0, 0.4);
-                font-weight: normal;
-                margin-right: 10px;
-                font-size: 14px;
-                flex: none;
-            }
-
-            .form-input-wrapper {
-                position: relative;
-                width: calc(100% - 70px);
-                &.two-select {
-                    display: flex;
-                    gap: 10px;
-                    .select-item {
-                        flex: 1;
-                    }
-                }
-                ::v-deep {
-                    .el-input__inner {
-                        caret-color: transparent;
-                        padding-right: 40px;
-                    }
-
-                    .el-input__suffix {
-                        display: none;
-                    }
-                }
-            }
-
-            .question-textarea {
-                ::v-deep {
-                    .el-textarea__inner {
-                        resize: none;
-                        line-height: 1.5;
-                        min-height: 80px;
-                    }
-                }
-            }
-        }
-
-        .interact-buttons {
-            display: flex;
-            gap: 12px;
-            padding-top: 16px;
-
-            .btn-delete,
-            .btn-save {
-                flex: 1;
-                padding: 8px;
-                border-radius: 25px;
-                font-size: 16px;
-                text-align: center;
-                cursor: pointer;
-                transition: all 0.3s;
-                user-select: none;
-            }
-
-            .btn-delete {
-                background: #ffffff;
-                border: 1px solid #ff4d4f;
-                color: #ff4d4f;
-
-                &:hover {
-                    background: #fff5f5;
-                }
-
-                &:active {
-                    opacity: 0.8;
-                    transform: scale(0.98);
-                }
-            }
-
-            .btn-save {
-                background: #2199f8;
-                color: #fff;
-                border: none;
-
-                &:hover:not(.disabled) {
-                    background: #1a8ae6;
-                }
-
-                &:active:not(.disabled) {
-                    opacity: 0.9;
-                    transform: scale(0.98);
-                }
-
-                &.disabled {
-                    opacity: 0.6;
-                    cursor: not-allowed;
-                    pointer-events: none;
-                }
-            }
-        }
-    }
-    .edit-tag {
-        padding-left: 4px;
-        color: #2199f8;
-    }
-    .tag-text {
-        font-size: 12px;
-        font-weight: normal;
-    }
-    .info-content {
-        padding: 10px 0;
-        position: relative;
-
-        .condition-wrap {
-            display: flex;
-            align-items: center;
-            width: 100%;
-            .symbol {
-                width: 10px;
-                // text-align: center;
-                // padding: 0 4px;
-            }
-        }
-        .item-input {
-            // width: 60%;
-            min-width: 140px;
-            max-width: 240px;
-        }
-        .recheck-text {
-            padding-left: 6px;
-        }
-        .info-item {
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
-            width: 100%;
-        }
-        .info-item + .info-item {
-            margin-top: 12px;
-        }
-
-        .bottom-map {
-            width: 100%;
-            height: 250px;
-            clip-path: inset(0px round 8px);
-        }
-        .check-btn {
-            position: absolute;
-            bottom: 16px;
-            right: 6px;
-            background: rgba(0, 0, 0, 0.6);
-            padding: 0 8px;
-            border-radius: 8px;
-
-            ::v-deep {
-                .el-checkbox {
-                    color: #fff;
-                }
-            }
-        }
-        .area-select {
-            padding-bottom: 12px;
-            .block {
-                width: 12px;
-                display: inline-block;
-            }
-        }
-    }
-
-    ::v-deep {
-        .el-form-item--default {
-            margin-bottom: 8px;
-            &.text-item {
-                margin-bottom: 2px;
-                .el-form-item__content {
-                    line-height: 24px;
-                }
-                .el-form-item__label {
-                    height: 24px;
-                    line-height: 24px;
-                }
-            }
-        }
-    }
-    .sub-title {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        color: rgba(0, 0, 0, 0.6);
-        font-size: 14px;
-        .add-tag {
-            font-size: 12px;
-            color: #2199f8;
-            padding: 0 8px;
-            border: 1px solid #2199f8;
-            border-radius: 5px;
-            font-weight: normal;
-            height: 28px;
-            line-height: 28px;
-        }
-    }
-    .font-bold {
-        font-weight: 500;
-        color: #000000;
-    }
-    .form-index {
-        position: absolute;
-        left: 0;
-        top: 0;
-        padding: 0 6px;
-        background: #2199f8;
-        border-radius: 5px 0 4px 0;
-        height: 18px;
-        line-height: 18px;
-        font-size: 12px;
-        color: #fff;
-    }
-    .recipe-item {
-        width: 100%;
-        .recipe-form {
-            padding-top: 8px;
-            ::v-deep {
-                .el-form-item {
-                    &:last-child {
-                        margin-bottom: 0;
-                    }
-                }
-            }
-        }
-
-        .mt-8 {
-            margin-top: 8px;
-        }
-
-        .box-item {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            color: rgba(0, 0, 0, 0.4);
-            .r-text {
-                color: #302f2f;
-                width: 150px;
-                text-align: center;
-            }
-            .form-r {
-                width: 150px;
-                min-width: 140px;
-                max-width: 240px;
-            }
-        }
-        .form-box {
-            border: 1px solid rgba(33, 153, 248, 0.8);
-            border-radius: 6px;
-            padding: 20px 10px;
-            width: 100%;
-            box-sizing: border-box;
-            position: relative;
-            // background: rgb(209, 235, 255, 0.3);
-            // margin-bottom: 12px;
-            .input-box {
-                &.mark-box {
-                    padding: 8px 0 12px 0;
-                }
-            }
-
-            // .input-unit {
-            //     ::v-deep {
-            //         .el-input {
-            //             border: 1px solid #dcdfe6;
-            //             border-radius: 5px;
-            //             height: 32px;
-            //             box-sizing: border-box;
-            //         }
-            //         .el-input__wrapper {
-            //             padding: 0 2px 0 10px;
-            //             height: 30px;
-            //             line-height: 30px;
-            //             min-height: 30px;
-            //             box-shadow: none;
-            //         }
-            //         .el-input__inner {
-            //             --el-input-inner-height: 30px;
-            //             height: 30px;
-            //             line-height: 30px;
-            //             min-height: 30px;
-            //             color: #606266;
-            //             --el-input-placeholder-color: #a8abb2;
-            //         }
-            //         .el-input-group__append {
-            //             box-shadow: none;
-            //             border: none;
-            //             background: none;
-            //         }
-            //     }
-            // }
-            // .text-center {
-            //     ::v-deep {
-            //         .el-input__inner {
-            //             text-align: center;
-            //         }
-            //     }
-            // }
-            .action-btn {
-                margin-top: 12px;
-                display: flex;
-                justify-content: flex-end;
-                .btn {
-                    color: #8f8f8f;
-                    border-radius: 25px;
-                    padding: 5px 30px;
-                }
-                .delete-btn {
-                    color: rgba(255, 89, 89, 0.9);
-                    background: #fff;
-                    border: 1px solid rgba(255, 89, 89, 0.9);
-                }
-            }
-            .btn-group {
-                padding-top: 12px;
-            }
-            .sub-item {
-                // padding-left: 10px;
-                .has-sub {
-                    display: flex;
-                    flex-direction: column;
-                    align-items: center;
-                    .main-name {
-                        line-height: 20px;
-                    }
-                    .sub-name {
-                        font-size: 10px;
-                        color: rgba(129, 129, 129, 0.5);
-                        line-height: 14px;
-                    }
-                }
-                .colunm-sub {
-                    display: flex;
-                    align-items: center;
-                    .sub-name {
-                        font-size: 10px;
-                        color: rgba(129, 129, 129, 0.5);
-                    }
-                }
-                .r-text {
-                    width: 132px;
-                    text-align: center;
-                    font-size: 14px;
-                    color: #474747;
-                }
-                .price {
-                    ::v-deep {
-                        .el-input__wrapper {
-                            box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-                        }
-                        .el-input__inner {
-                            color: #2199f8;
-                        }
-                    }
-                }
-            }
-            .form-title {
-                font-size: 14px;
-                padding-top: 6px;
-                color: #000;
-                font-weight: 600;
-            }
-            .box-item + .box-item {
-                margin-top: 8px;
-            }
-        }
-        .form-box + .form-box {
-            margin-top: 8px;
-        }
-        .usageMode-wrap {
-            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;
-    }
-}
-
-.complete-tip-popup {
-    width: 80%;
-    min-width: 294px;
-    padding: 28px 20px 20px;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-    .tip-icon {
-        margin-bottom: 12px;
-        &.create-icon {
-            width: 40px;
-            height: 40px;
-        }
-        &.success-icon {
-            width: 68px;
-            height: 68px;
-        }
-    }
-    .tip-text {
-        margin-bottom: 32px;
-        text-align: center;
-        &.success-text {
-            font-size: 24px;
-            font-weight: 400;
-        }
-    }
-    .btn-wrap {
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        gap: 10px;
-        width: 100%;
-        .btn-item {
-            height: 40px;
-            line-height: 40px;
-            border-radius: 20px;
-            font-size: 16px;
-            color: #2199F8;
-            text-align: center;
-            &.second {
-                flex: none;
-                width: 92px;
-                border: 1px solid #2199F8;
-            }
-            &.primary {
-                flex: 1;
-                background: #2199f8;
-                color: #fff;
-            }
-        }
-    }
-}
-</style>

+ 0 - 416
src/views/old_mini/modify_work/newFarmMap.js

@@ -1,416 +0,0 @@
-
-import config from "@/api/config.js"
-import * as KMap from '@/utils/ol-map/KMap';
-import Style from "ol/style/Style";
-import * as util from "@/common/ol_common.js"
-import { newAreaFeature, newAreaPoint, newPolymerFeature, newPoint} from "@/utils/map";
-import { GARDEN_STATUS_ENUM as STATUS_ENUM } from "@/api/enum.js"
-import Icon from "ol/style/Icon";
-import eventBus from '@/api/eventBus';
-import VectorLayer from "ol/layer/Vector.js";
-import {getArea} from 'ol/sphere.js';
-import * as proj from "ol/proj";
-import { register } from "ol/proj/proj4";
-import proj4 from "proj4"
-proj4.defs("EPSG:38572","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs");
-register(proj4);
-
-/**
- * @description 智能巡园地图层对象
- */
-class EditNsMap {
-
-    constructor() {
-        let that = this
-        this.vectorStyle = new KMap.VectorStyle()
-        let pointSimpleStyle = this.vectorStyle.getPointSimpleStyle(8, "#999999", "#d5d5d0", "1")
-        this.areaLayer = new KMap.VectorLayer("areaLayer", 999, { style: (f) => that.vectorStyle.getPolygonStyle("#0000001a", "#00000033", 3) })
-        this.subAreaLayer = new KMap.VectorLayer("subAreaLayer", 1000, {
-            style: (f) => {
-                return that.vectorStyle.getPolygonStyle(f.get("fillColor"), f.get("strokeColor"), 2)
-            }
-        })
-        this.afterDayNum = 3
-        this.areaPointLayer = new KMap.VectorLayer("areaPointLayer", 1002, { style: (f) => that.vectorStyle.getPointTextStyle(f.get("name"), "#120046", "#FFFFFF", 2, 13) })
-        this.treeCacheStyle = {}
-        this.treeStyle = (f) => {
-            let key = f.get("imgSrc");
-            if (that.treeCacheStyle[key]) {
-                return that.treeCacheStyle[key]
-            }
-            let style = new Style({
-                image: new Icon({
-                    src: f.get("imgSrc"),
-                    scale: 1,
-                    anchor: [0.5, 1],
-                })
-            });
-            that.treeCacheStyle[key] = style
-            return style
-        }
-        this.treeLayer = new KMap.VectorLayer("statusPointLayer", 999, { style: that.treeStyle })
-        this.treeFeatures = []
-
-        this.curArea = null
-        this.blueRegionLayer = new KMap.VectorLayer("blueRegionLayer", 99, {
-            minZoom: 1,
-            maxZoom: 22,
-            style: function (f) {
-                const selected = f.get('selected');
-                if (selected) {
-                    return that.vectorStyle.getPolygonStyle("rgba(23, 99, 110, 0.43)", "rgba(37, 227, 255, 0.7)", 2)
-                }
-                return that.vectorStyle.getPolygonStyle("rgba(0, 0, 0, 0.5)", "rgba(255, 255, 255, 0.2)", 1)
-            }
-        });
-
-        this.areaVal = 0
-    }
-
-    initMap(location, target, movable = true) {
-        let level = 18
-        let coordinate = util.wktCastGeom(location).getFirstCoordinate()
-        this.kmap = new KMap.Map(target, level, coordinate[0], coordinate[1], null, 10, 22, "img", movable, movable);
-        let xyz2 = config.base_img_url3 + 'map/lby/{z}/{x}/{y}.png';
-        this.kmap.addXYZLayer(xyz2, { minZoom: 12, maxZoom: 26 });
-        this.kmap.addLayer(this.areaLayer.layer)
-        this.kmap.addLayer(this.subAreaLayer.layer)
-        this.kmap.addLayer(this.treeLayer.layer)
-        this.kmap.addLayer(this.areaPointLayer.layer)
-        this.kmap.addLayer(this.blueRegionLayer.layer)
-
-        this.addMapSingerClick()
-    }
-
-    destroyMap() {
-        // 销毁地图实例
-        if (this.kmap) {
-            this.kmap.destroy()
-        }
-    }
-
-    initArea(data, callback) {
-        let that = this
-        this.areaLayer.refresh()
-        for (let item of data) {
-            that.areaLayer.addFeature(newAreaFeature(item))
-            that.areaPointLayer.addFeature(newAreaPoint(item))
-        }
-        callback && callback()
-    }
-
-    initSubArea(organId, callback) {
-        let that = this
-        this.subAreaLayer.refresh()
-        VE_API.sub_area.list({ organId }).then(({ data, code }) => {
-            for (let item of data) {
-                // item.fillColor = that.handleStatusColor(item.status).fillColor
-                // item.strokeColor = that.handleStatusColor(item.status).strokeColor
-                that.subAreaLayer.addFeature(newPolymerFeature(item))
-            }
-            callback && callback()
-        })
-    }
-
-
-    initTree(organId, callback) {
-        let that = this
-        this.treeLayer.refresh()
-        that.treeFeatures = []
-        VE_API.sub_area.treeList({ farmId: organId }).then(({ data }) => {
-            for (let item of data) {
-                let result = that.handleStatusIcon(item)
-                if (result.hasStatus) {
-                    item.imgSrc = result.imgSrc
-                    let point = newPoint(item);
-                    that.treeLayer.addFeature(point)
-                    that.treeFeatures.push(point)
-                }
-            }
-            callback && callback()
-        })
-    }
-
-    getBlueRegion({gardenId, regionId}, callback) {
-        this.blueRegionLayer.source && this.blueRegionLayer.source.clear()
-        const data = [
-        {
-            "farmCode": "LBY",
-            "farmId": "766",
-            "id": 2,
-            "isGenerateReport": 1,
-            "name": "分区2",
-            "pointCount": 131,
-            "pointWkt": "POINT (113.6142086995688 23.585836479509055)",
-            "regionCode": "LBY-MR-2",
-            "wkt": "MULTIPOLYGON (((113.61348988377155 23.58617369800422, 113.61395837633405 23.58622555407246, 113.61414076654707 23.58622555407246, 113.61436964832843 23.5862774101407, 113.61478628474084 23.586468741036786, 113.61491681896747 23.58652417337007, 113.61512424307672 23.586449071517652, 113.61491503077356 23.585742756367924, 113.61479880177082 23.585596129050916, 113.61473800497858 23.585451289764112, 113.61438931780664 23.585286780835393, 113.61410858003889 23.585299297865365, 113.61385645239149 23.585249229909184, 113.61378135053907 23.585288569029306, 113.61357571446003 23.585283204611276, 113.61347200232355 23.585342213209604, 113.61338080721704 23.585506721974614, 113.61335934954492 23.585665866485304, 113.61342193444922 23.58616296916816, 113.61348988377155 23.58617369800422)))"
-        },
-        {
-            "farmCode": "LBY",
-            "farmId": "766",
-            "id": 9,
-            "isGenerateReport": 1,
-            "name": "分区9",
-            "pointCount": 63,
-            "pointWkt": "POINT (113.61725048541882 23.585262743588892)",
-            "regionCode": "LBY-MR-9",
-            "wkt": "MULTIPOLYGON (((113.61697301904715 23.585749021838886, 113.617320420354 23.585742359348075, 113.61752600578478 23.585708095109652, 113.61772112158744 23.5856785897931, 113.61789720170187 23.58559102562808, 113.61787340709186 23.585330236701996, 113.61793812843106 23.58526932250014, 113.61795526055036 23.585167481569073, 113.61793146594025 23.585022810339957, 113.61790671954574 23.58491525870246, 113.61779345720193 23.58473346788171, 113.61779821612386 23.584601169849783, 113.61771921801855 23.584509798547092, 113.61763260563801 23.584517412822354, 113.61755741467023 23.584640193010298, 113.61736515422085 23.584823887399946, 113.61726902399624 23.58487623554194, 113.61709484745067 23.584864814129187, 113.61707105284067 23.584962847922696, 113.61699586187265 23.585023762124397, 113.61689877986377 23.585071351344393, 113.61675981934107 23.58515796372515, 113.61663132844662 23.585192227963518, 113.61646000725422 23.58524076896813, 113.61634484134152 23.585320718857897, 113.61628392713976 23.585360693802862, 113.6162163504473 23.585397813394497, 113.61601552393823 23.585480618637533, 113.61596127222741 23.585499654325552, 113.61597174185577 23.585538677485918, 113.61598125969975 23.585561520311693, 113.61608690776846 23.585591025628073, 113.61610689524092 23.585611013100582, 113.61619350762157 23.58557960421532, 113.6162886860618 23.58552820785755, 113.61632104673151 23.585492040050294, 113.61638196093314 23.585453968674216, 113.61646095903859 23.585480618637543, 113.6164771393734 23.585505365031985, 113.61649617506146 23.585564375664962, 113.61648760900198 23.58561006131614, 113.61645048941011 23.58567192730245, 113.61649807863034 23.585676686224392, 113.61662466595578 23.585595784550236, 113.61671698904298 23.585495847187836, 113.61676553004737 23.585587218490588, 113.61681787818966 23.585559616742817, 113.61689211737293 23.5854558722431, 113.61695588692798 23.585499654325556, 113.61697301904715 23.585749021838886)))"
-        },
-        {
-            "farmCode": "LBY",
-            "farmId": "766",
-            "id": 29,
-            "isGenerateReport": 1,
-            "name": "分区8",
-            "pointCount": 40,
-            "pointWkt": "POINT (113.61587084394066 23.58618878122994)",
-            "regionCode": "LBY-MR-8",
-            "wkt": "MULTIPOLYGON (((113.61516876894466 23.58617727723074, 113.6153952936325 23.58616014511155, 113.61551426668275 23.586215348606817, 113.61564275757719 23.586290539574595, 113.61565798612749 23.58640951262483, 113.61577695917796 23.58637905552401, 113.61584168051715 23.586392380505654, 113.615912112563 23.58637048946448, 113.61613483011318 23.586200120056528, 113.6162547549478 23.586365730542376, 113.61623762282863 23.586448535785365, 113.61615196223237 23.586476137533136, 113.61634435485792 23.586946782901485, 113.61654695275945 23.586932042261843, 113.61651364030526 23.58667220511998, 113.61648127963554 23.586552280285296, 113.61640894402115 23.58641903046899, 113.61636135480092 23.586292443143435, 113.6163308977001 23.586121121951034, 113.61631471736528 23.58605735239606, 113.61618622647107 23.586071629162152, 113.61612911940675 23.58603260600161, 113.61610342122786 23.58595265611185, 113.61601109814079 23.585864140162432, 113.61585310193013 23.585803225960632, 113.61557898802205 23.585730890346124, 113.6153714990225 23.585723276070855, 113.61520493675204 23.585882224066058, 113.61516591359151 23.586056400611785, 113.61516876894466 23.58617727723074)))"
-        },
-        {
-            "farmCode": "LBY",
-            "farmId": "766",
-            "id": 12828,
-            "isGenerateReport": 1,
-            "name": "分区5",
-            "pointCount": 45,
-            "pointWkt": "POINT (113.61692837797158 23.58435388968608)",
-            "regionCode": "LBY-MR-5",
-            "wkt": "MULTIPOLYGON (((113.61726902399624 23.584875938109313, 113.61732981922493 23.584649032707855, 113.61741785928217 23.58458954618279, 113.6176284415812 23.584287354634938, 113.61761892373723 23.584146966435544, 113.61762249292879 23.584041080420736, 113.61758442155264 23.584010147427676, 113.61752374529698 23.583939953328095, 113.6174499820059 23.583857861923292, 113.61723702024568 23.5839113997961, 113.61706331959229 23.583947091711153, 113.61689794705232 23.583967317129648, 113.61673019505157 23.58399468093132, 113.61659218631306 23.584025613924393, 113.61641848565968 23.584054167456387, 113.61624716446725 23.584093428562902, 113.61621623147425 23.584286164904498, 113.61622218012678 23.584531249388036, 113.6162186109351 23.58466211974327, 113.61629713314835 23.584684724622857, 113.6166052733487 23.58470970896351, 113.61669926205845 23.584731124112597, 113.61678016373266 23.584778713332653, 113.61680276861217 23.584819164169826, 113.61683846052725 23.58481916416982, 113.61689080866942 23.584775144141148, 113.61697884872665 23.58482035390024, 113.61709484745067 23.584864516696555, 113.61726902399624 23.584875938109313)))"
-        },
-        {
-            "farmCode": "LBY",
-            "farmId": "766",
-            "id": 172047,
-            "isGenerateReport": 1,
-            "name": "认养分区",
-            "pointCount": null,
-            "pointWkt": "POINT (113.61573550741103 23.586606696698798)",
-            "regionCode": "LBY认养分区",
-            "wkt": "MULTIPOLYGON (((113.61553138381385 23.586555391814727, 113.61578836560238 23.586770495089638, 113.61593018147823 23.586692924660838, 113.61571507820327 23.5864349910878, 113.61553138381385 23.586555391814727)))"
-        },
-        {
-            "farmCode": "LBY",
-            "farmId": "766",
-            "id": 175094,
-            "isGenerateReport": 1,
-            "name": "12",
-            "pointCount": null,
-            "pointWkt": "POINT (113.61860504330416 23.583859757151316)",
-            "regionCode": "LBY-MR-12",
-            "wkt": "MULTIPOLYGON (((113.61790764544605 23.58437349638575, 113.61810434755591 23.58448136528483, 113.61834039008784 23.58457781277093, 113.61887973458238 23.58461715319288, 113.61901298439875 23.584476289101246, 113.61925029597637 23.584407760624345, 113.61937973865497 23.58437349638575, 113.61932390063691 23.584164103817216, 113.61923506742585 23.5838836446801, 113.61920587937084 23.583660292607078, 113.61927060071025 23.58345216908441, 113.61940004338908 23.5832846550295, 113.6191449651692 23.58325927411221, 113.61896095351813 23.583223740827805, 113.61884166320624 23.58314759807564, 113.61873379430745 23.58305115058954, 113.6185180565094 23.583087952919755, 113.61840257333529 23.58318947658927, 113.61825028783096 23.583260543158076, 113.61815510939073 23.583216126552543, 113.61807262140928 23.583183131360045, 113.61779216227194 23.583299883580025, 113.61792541208831 23.58360953077215, 113.61817668317042 23.583615876001545, 113.61831374012445 23.583843035212283, 113.61829216634476 23.583925523193727, 113.61821348550086 23.5839014113223, 113.6179825191524 23.583770699597665, 113.6178530764738 23.583793542423393, 113.61783784792328 23.583905218459847, 113.617946985868 23.58400166594589, 113.61795713823494 23.584085422973374, 113.61786703597829 23.58419963710162, 113.61785815265716 23.58428847031246, 113.61790764544605 23.58437349638575)))"
-        },
-        {
-            "farmCode": "LBY",
-            "farmId": "766",
-            "id": 175095,
-            "isGenerateReport": 1,
-            "name": "13",
-            "pointCount": null,
-            "pointWkt": "POINT (113.61907779775447 23.582774628335315)",
-            "regionCode": "LBY-MR-13",
-            "wkt": "MULTIPOLYGON (((113.6185180565094 23.583087952919755, 113.61873379430756 23.58305115058954, 113.61884166320624 23.58314759807564, 113.61896095351813 23.583223740827805, 113.6191449651692 23.58325927411221, 113.61940004338908 23.5832846550295, 113.61952853428329 23.58303148037845, 113.61974554112703 23.582682175502953, 113.61942574156774 23.58233191884284, 113.61909737594897 23.58227005285653, 113.61872713181651 23.58242614549863, 113.61843207865172 23.58267265765886, 113.61843112686734 23.583051467850964, 113.6185180565094 23.583087952919755)))"
-        },
-        {
-            "farmCode": "LBY",
-            "farmId": "766",
-            "id": 175096,
-            "isGenerateReport": 1,
-            "name": "15",
-            "pointCount": null,
-            "pointWkt": "POINT (113.61729343325402 23.581078231145653)",
-            "regionCode": "LBY-MR-15",
-            "wkt": "MULTIPOLYGON (((113.61579634969576 23.580895993441118, 113.61623258421344 23.58139885286704, 113.61657522659812 23.581547965756727, 113.61743341886756 23.5818731587608, 113.61737155288142 23.58216345300349, 113.61798704012836 23.582252286214498, 113.61852479831566 23.58088806190449, 113.61799973058703 23.58035347633188, 113.61769991850042 23.580115530231183, 113.61644039047451 23.580399479244647, 113.61574558786083 23.580797642386187, 113.61579634969576 23.580895993441118)))"
-        }
-    ]
-    for (let item of data) {
-        item.id = item.regionCode
-        try {
-            let feature = newAreaFeature(item);
-            this.blueRegionLayer.addFeature(feature)
-        } catch {
-            console.log('error');
-        }
-    }
-    this.kmap.fit(this.blueRegionLayer.source.getExtent(), [0, 0, 0, 0])
-    callback && callback(data.length)
-        // VE_API.farm.blueRegionList({ farmId: gardenId, regionId }).then(({ data, code }) => {
-        // })
-    }
-
-    setBlueRegion(data) {
-        this.blueRegionLayer.source.getFeatures().forEach(feature => {
-            // 检查 feature 的属性中是否有 selected 属性且为 true
-            data.map(item => {
-                if (item.id === feature.get('id')) {
-                    feature.set('selected', true)
-                }
-            })
-        });
-    }
-
-    toggleAllArea(val) {
-        let that = this
-        that.areaVal = 0
-        this.blueRegionLayer.source.getFeatures().forEach(feature => {
-            feature.set('selected', val)
-            if (val === true) {
-                let geom = feature.getGeometry().clone()
-                geom.transform(proj.get("EPSG:4326"), proj.get("EPSG:38572"))
-                let areaItem = getArea(geom)
-                areaItem = (areaItem + areaItem / 2) / 1000;
-                that.areaVal += areaItem
-            }
-            eventBus.emit("editNsMap:areaVal", that.areaVal)
-        });
-
-    }
-
-    // 状态图例
-    handleStatusIcon(obj) {
-        let key = this.afterDayNum == 3 ? "ycStatus" : this.afterDayNum == 5 ? "ycStatus5d" : "ycStatus7d"
-        let hasStatus = false
-        let imgSrc = null
-        if (obj[key] == 3) {
-            hasStatus = true
-            imgSrc = require('@/assets/img/status/status_bcyc.png')
-            return { hasStatus, imgSrc }
-        }
-        if (obj[key] == 2) {
-            hasStatus = true
-            imgSrc = require('@/assets/img/status/status_szyc.png')
-            return { hasStatus, imgSrc }
-        }
-        // if (obj[key] == 1) {
-        //     hasStatus = true
-        //     imgSrc = require('@/assets/status/status_dfh.png')
-        //     return { hasStatus, imgSrc }
-        // }
-        // if (obj[key] == 0) {
-        //     hasStatus = true
-        //     imgSrc = require('@/assets/status/status_xfdw.png')
-        //     return { hasStatus, imgSrc }
-        // }
-        return { hasStatus, imgSrc }
-    }
-
-    // 区级颜色
-    handleStatusColor(key) {
-        let fillColor = '#ffffff00'
-        let strokeColor = '#ffffff'
-        switch (key) {
-            case STATUS_ENUM.DONE:
-                fillColor = 'rgba(95,255,197,0)'
-                strokeColor = '#ffffff'
-                break;
-            case STATUS_ENUM.ABNORMAL_GROWTH:
-                fillColor = 'rgba(255,189,5,0.2)'
-                strokeColor = '#FFE44E'
-                break;
-            case STATUS_ENUM.ABNORMAL_Pest:
-                fillColor = 'rgba(51,11,3,0.52)'
-                strokeColor = '#F55A5A'
-                break;
-            case STATUS_ENUM.PENDING_REVIEW:
-                fillColor = 'rgba(3,40,51,0.2)'
-                strokeColor = '#032833'
-                break;
-            case STATUS_ENUM.REVIEWED:
-                fillColor = 'rgba(95,255,197,0.1)'
-                strokeColor = '#5FFFC5'
-                break;
-            default:
-                break;
-        }
-        return { fillColor, strokeColor }
-    }
-
-    addToggleTreeSelect(listener) {
-        let that = this
-        this.treeLayer.addToggleSelect(function ({ deselected, selected, preventDefault }) {
-            if (selected.length > 0) {
-                listener && listener(selected[0], deselected[0])
-            }
-            preventDefault()
-        }, this.kmap.map, that.treeStyle)
-    }
-
-    addToggleSubAreaSelect(listener) {
-        let that = this
-        this.subAreaLayer.addToggleSelect(function ({ deselected, selected, preventDefault }) {
-            if (selected.length > 0) {
-                that.treeLayer.source.forEachFeature((f) => {
-                    if (f.get("subAreaId") == selected[0].get("id")) {
-                        that.treeLayer.toggleSelect.getFeatures().remove(f)
-                    }
-                })
-                that.treeLayer.source.forEachFeature((f) => {
-                    if (f.get("subAreaId") == selected[0].get("id")) {
-                        that.treeLayer.toggleSelect.getFeatures().push(f)
-                    }
-                })
-            }
-            if (deselected.length > 0) {
-                that.treeLayer.source.forEachFeature((f) => {
-                    if (f.get("subAreaId") == deselected[0].get("id")) {
-                        that.treeLayer.toggleSelect.getFeatures().remove(f)
-                    }
-                })
-            }
-            listener && listener(selected[0], deselected[0])
-            preventDefault()
-        }, this.kmap.map)
-    }
-
-    refreshTree(organId, day, callback) {
-        this.afterDayNum = day
-        this.initTree(organId, callback)
-
-    }
-    fit(geomOrExtent) {
-        this.kmap.fit(geomOrExtent)
-    }
-
-
-    addMapSingerClick() {
-        let that = this
-        this.kmap.on("singleclick", (evt) => {
-            that.kmap.map.forEachFeatureAtPixel(evt.pixel, function (feature, layer) {
-                if (layer instanceof VectorLayer && layer.get("name") === "blueRegionLayer") {
-                    feature.set('selected', feature.get("selected") ? false : true);
-
-                    let geom = feature.getGeometry().clone()
-                    geom.transform(proj.get("EPSG:4326"), proj.get("EPSG:38572"))
-                    let areaItem = getArea(geom)
-                    areaItem = (areaItem + areaItem / 2) / 1000;
-                    if (feature.get('selected') === true) {
-                        that.areaVal += areaItem
-                    } else {
-                        that.areaVal -= areaItem
-                    }
-                    eventBus.emit("editNsMap:areaVal", that.areaVal)
-                }
-            })
-        })
-    }
-
-    getSelectedBlueRegion() {
-        // 用于存储 selected 为 true 的 feature 的 id
-        const selectedFeatureIds = [];
-        // 遍历所有 features
-        this.blueRegionLayer.source.getFeatures().forEach(feature => {
-            // 检查 feature 的属性中是否有 selected 属性且为 true
-            if (feature.get('selected') === true) {
-                // 获取 feature 的 id
-                const id = feature.get('id');
-                // 将 id 添加到数组中
-                selectedFeatureIds.push({ id });
-            }
-        });
-        return selectedFeatureIds;
-    }
-
-
-}
-
-export default EditNsMap

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

@@ -1,1072 +0,0 @@
-<template>
-    <div class="work-wrap">
-        <custom-header name="农事详情" isGoBack @goback="handleClose"></custom-header>
-        <div
-            class="work-content recheck-title"
-            v-loading="loading"
-        >
-            <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 info-farm">
-                    <div class="info-l">
-                        <img class="farm-img" src="@/assets/img/home/farm.png" alt="" />
-                    </div>
-                    <div class="info-r">
-                        <div class="farm-name">{{ workItem.farmName }}</div>
-                        <div class="info-item">
-                            <div class="info-name">农事名称:</div>
-                            <div class="info-value">{{ workItem.farmWorkName }}</div>
-                        </div>
-                        <div class="info-item">
-                            <div class="info-name">执行时间:</div>
-                            <div class="info-value">{{ workItem.executeDate || "--" }}</div>
-                        </div>
-                        <div class="info-item line-item">
-                            <div class="info-name">药物处方:</div>
-                            <div class="info-value">
-                                <div class="rescription" v-if="workItem?.prescriptionList">
-                                    <span
-                                        v-for="(fertilizer, fertilizerI) in workItem.prescriptionList"
-                                        :key="fertilizerI"
-                                    >
-                                        <span
-                                            v-for="(pest, pestI) in fertilizer.pesticideFertilizerList"
-                                            :key="'sub' + pestI"
-                                        >
-                                            {{ pest.defaultName || pest.pesticideFertilizerName }}
-                                            <span
-                                                v-if="
-                                                    pestI !== fertilizer.pesticideFertilizerList.length - 1 ||
-                                                    fertilizerI !== workItem.prescriptionList.length - 1
-                                                "
-                                            >
-                                                +
-                                            </span>
-                                        </span>
-                                    </span>
-                                </div>
-                                <div class="rescription" v-if="!workItem?.prescriptionList || !workItem?.prescriptionList?.length|| workItem?.prescriptionList[0]?.pesticideFertilizerList?.length === 0">无处方</div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-
-                <div class="info-box subject-content">
-                    <div class="subject-box">
-                        <div class="subject-item cost-l">
-                            <img class="subject-img" :src="workItem.agriculturalIcon || 'https://birdseye-img.sysuimars.com/dinggou-mini/defalut-icon.png'" alt="" />
-                            <div class="subject-tag">
-                                {{ workItem.serviceMain }}
-                            </div>
-                        </div>
-                        <div class="subject-item">
-                            <img class="subject-img" :src="workItem.executorIcon || 'https://birdseye-img.sysuimars.com/dinggou-mini/defalut-icon.png'" alt="" />
-                            <div class="subject-tag">
-                                {{ workItem.executeName }}
-                            </div>
-                        </div>
-                    </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>{{ workItem?.needReview ? '复核成效' : '服务成效' }}</span>
-                </div>
-                <div class="info-box bottom-box">
-                    <div class="recheck-box">
-                        <div class="recheck-ablum">
-
-                            <div class="img-list over-img-box">
-                                <album-carousel
-                                    class="execute-img"
-                                    :key="1"
-                                    labelText="执行照片"
-                                    :imgData="workItem"
-                                    :images="workItem.executeEvidence"
-                                ></album-carousel>
-                            </div>
-                            <div
-                                class="img-list over-img-box"
-                                v-if="workItem.reviewImage && workItem.reviewImage.length && workItem?.needReview"
-                            >
-                                <album-carousel
-                                    :key="2"
-                                    labelText="复核照片"
-                                    :isAchievementImgs="true"
-                                    :imgData="workItem"
-                                    :images="workItem.reviewImage"
-                                ></album-carousel>
-                            </div>
-
-                            <div class="img-list" v-if="(!workItem.reviewImage || !workItem.reviewImage.length) && workItem?.needReview && curRole.value == '2'">
-                                <div
-                                    class="recheck-text-wrap active"
-                                    :class="{
-                                        'center-wrap': !imageArr.length,
-                                    }"
-                                >
-                                    <div class="date" v-show="workItem.reviewDate">{{ workItem.reviewDate }}</div>
-                                    <upload
-                                        exampleImg
-                                        @handleUpload="handleUpload"
-                                        class="upload-wrap"
-                                        :style="{
-                                            height:
-                                                imageArr.length && !diffInDays(workItem.reviewDate) > 0
-                                                    ? 'auto'
-                                                    : '254px',
-                                        }"
-                                    >
-                                        <template
-                                            v-if="
-                                                diffInDays(workItem.reviewDate) == 0 ||
-                                                diffInDays(workItem.reviewDate) == null
-                                            "
-                                        >
-                                            <img
-                                                class="img-icon"
-                                                :src="require(`@/assets/img/gallery/img-icon-act.png`)"
-                                                alt=""
-                                            />
-                                            <div class="recheck-text">点击上传照片</div>
-                                        </template>
-                                        <!-- <template v-else>
-                                            <img class="img-icon" src="@/assets/img/gallery/img-icon.png" alt="" />
-                                            <div class="recheck-text">等待复核</div>
-                                            <div class="recheck-desc" v-show="diffInDays(workItem.reviewDate) >= 0">
-                                                (剩余{{ diffInDays(workItem.reviewDate) }}天)
-                                            </div>
-                                        </template> -->
-                                    </upload>
-                                    <div
-                                        class="submit"
-                                        v-show="imageArr.length && !diffInDays(workItem.reviewDate) > 0"
-                                        @click="handleSubmit('reviewImage2')"
-                                    >
-                                        确认上传
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-
-            <!-- 按钮 -->
-            <div class="up-btn-group" v-show="isPlan">
-                <template v-if="curRole == '2'">
-                    <div
-                        class="up-btn"
-                        :class="{ btn: workItem.executeEvidence && workItem.executeEvidence.length }"
-                        v-show="workItem.reviewImage && !workItem.reviewImage.length"
-                    >
-                        提醒农户拍照
-                    </div>
-                </template>
-                <template v-else>
-                    <div
-                        class="up-btn btn"
-                        @click="handleContact"
-                        v-show="workItem.reviewImage && workItem.reviewImage.length && !imageArr.length"
-                    >
-                        联系专家
-                    </div>
-                </template>
-            </div>
-
-            <div class="fixed-btn-wrap" :class="{ center: !paramsPage.isBtn && !getButtonText() }">
-                <div class="fixed-btn-wrap-left">
-                    <div class="fixed-btn more second" @click="handleRemindUser" v-if="getButtonText()">提醒复核</div>
-                    <div class="fixed-btn more" @click="handleMore" v-if="paramsPage.isBtn">更多农事</div>
-                </div>
-                <div class="fixed-btn excute" @click="generateReport">生成成果报告</div>
-            </div>
-
-            <!-- 组合照片(用于生成合成图片) -->
-            <div class="review-hide-box">
-                <div class="review-image" ref="reviewComboRef">
-                    <div class="review-mask">
-                        <div class="review-text">复核成效</div>
-                        <div class="review-content">
-                            {{ workItem?.reCheckText }}
-                        </div>
-                    </div>
-                    <div class="vs-wrap" v-if="workItem?.reviewImage && workItem?.reviewImage?.length">
-                        <img src="@/assets/img/home/vs.png" alt="" />
-                    </div>
-                    <div class="review-image-item" v-if="triggerImg?.length">
-                        <div class="review-image-item-title">复核照片</div>
-                        <img
-                        class="review-image-item-img left-img"
-                        :src="leftCoverImg"
-                        style="
-                            width: 100%;
-                            height: 255px;
-                            display: block;
-                            image-rendering: auto;
-                        "
-                        />
-
-                    </div>
-                    <div class="review-image-item" v-if="workItem?.reviewImage?.length">
-                        <img
-                        class="review-image-item-img right-img"
-                        :src="rightCoverImg"
-                        style="
-                            width: 100%;
-                            height: 255px;
-                            display: block;
-                            image-rendering: auto;
-                        "
-                        />
-
-                    </div>
-                </div>
-            </div>
-        </div>
-        <!-- 上传图片弹窗 -->
-        <upload-popup :executionData="workItem"></upload-popup>
-        <!-- 分享农事成效弹窗 -->
-        <review-popup ref="reviewPopupRef" />
-
-        <!-- 上传农事成效弹窗 -->
-        <upload-execute ref="uploadExecuteRef" :onlyShare="true" />
-    </div>
-</template>
-
-<script setup>
-import { Tab, Tabs } from "vant";
-import customHeader from "@/components/customHeader.vue";
-import { onMounted, ref, onDeactivated, onActivated, onUnmounted, nextTick, watch } from "vue";
-import { useRoute, useRouter } from "vue-router";
-import upload from "@/components/upload";
-import AlbumCarousel from "@/components/album_compoents/albumCarousel";
-import { ElMessage } from "element-plus";
-import uploadPopup from "@/components/popup/uploadPopup.vue";
-import { base_img_url2 } from "@/api/config";
-import wx from "weixin-js-sdk";
-import reviewPopup from "@/views/old_mini/task_condition/components/reviewPopup.vue";
-import uploadExecute from "@/views/old_mini/task_condition/components/uploadExecute.vue";
-import html2canvas from "html2canvas";
-
-const route = useRoute();
-const router = useRouter();
-const uploadExecuteRef = ref(null);
-const workItem = ref({});
-const curRole = ref(localStorage.getItem("SET_USER_CUR_ROLE"));
-// 农事规划页面-显示上传农事凭证按钮
-const isPlan = ref(false);
-const loading = ref(false);
-const reviewComboRef = ref(null);
-const combinedReviewImages = ref([]);
-
-const diffInDays = (date, type = "minus") => {
-    const targetDate = new Date(date);
-    const currentDate = new Date(); // 获取当前系统时间
-    let diffInMs;
-    if (type === "minus") {
-        diffInMs = targetDate - currentDate;
-    } else {
-        diffInMs = currentDate - targetDate;
-    }
-    const day = Math.floor(diffInMs / (1000 * 60 * 60 * 24));
-    return day + 1 >= 0 ? day + 1 : null;
-};
-
-const paramsPage = ref({});
-const agriculturalRole = ref(null);
-const userId = ref(null);
-const userType = ref(localStorage.getItem("USER_TYPE"));
-onActivated(() => {
-    const userInfo = JSON.parse(localStorage.getItem("localUserInfo"));
-    agriculturalRole.value = userInfo.agriculturalRole;
-    userId.value = userInfo.id;
-
-    window.scrollTo(0, 0);
-    paramsPage.value = route.query.miniJson ? JSON.parse(route.query.miniJson) : {};
-    if(paramsPage.value.paramsPage) {
-        const data = JSON.parse(paramsPage.value.paramsPage);
-        paramsPage.value.id = data.id;
-        paramsPage.value.goBack = true;
-    }else{
-        paramsPage.value.goBack = false;
-    }
-    getDetail();
-    getTriggerImg(paramsPage.value.id);
-});
-
-const getButtonText = () => {
-    return (agriculturalRole.value === 1 || (agriculturalRole.value === 2 && workItem.value.executorUserId != userId.value)) && !workItem.value?.reviewImage?.length && workItem.value?.needReview && userType.value != '2';
-};
-
-const getDetail = () => {
-    if (!paramsPage.value.id) return;
-    loading.value = true;
-    VE_API.z_farm_work_record
-        .getDetail({ id: paramsPage.value.id })
-        .then(({ data }) => {
-            workItem.value = data[0];
-        })
-        .finally(() => {
-            loading.value = false;
-        });
-};
-
-const handleClose = () => {
-    if(paramsPage.value.goBack){
-        router.replace({
-            path: "/task_condition",
-        });
-    }else{
-        router.back();
-    }
-};
-
-const triggerImg = ref([]);
-const getTriggerImg = (farmWorkRecordId) => {
-    VE_API.z_farm_work_record.getTriggerImg({ farmWorkRecordId }).then(({ data }) => {
-        triggerImg.value = data || [];
-    });
-};
-
-// 生成组合照片,传给相册组件
-const generateCombinedReviewImage = async () => {
-  try {
-    await prepareCoverImages()
-    await nextTick()
-
-    const canvas = await html2canvas(reviewComboRef.value, {
-      backgroundColor: null,
-      useCORS: true,
-      allowTaint: true,
-      scale: window.devicePixelRatio || 2,
-    })
-
-    combinedReviewImages.value = [canvas.toDataURL('image/png')]
-  } catch (e) {
-    console.error('生成组合照片失败', e)
-  }
-}
-const prepareCoverImages = async () => {
-  await nextTick()
-
-  const itemEl =
-    reviewComboRef.value.querySelector('.review-image-item')
-
-  const cssWidth = itemEl.offsetWidth
-  const cssHeight = 255
-
-  if (triggerImg.value?.length) {
-    leftCoverImg.value = await coverImageToBase64HD(
-      base_img_url2 + triggerImg.value.at(-1).cloudFilename,
-      cssWidth,
-      cssHeight
-    )
-  }
-
-  if (workItem.value?.reviewImage?.length) {
-    rightCoverImg.value = await coverImageToBase64HD(
-      base_img_url2 + workItem.value.reviewImage.at(-1),
-      cssWidth,
-      cssHeight
-    )
-  }
-}
-
-const leftCoverImg = ref('')
-const rightCoverImg = ref('')
-
-
-function coverImageToBase64HD(imgUrl, cssWidth, cssHeight) {
-  return new Promise((resolve, reject) => {
-    const dpr = window.devicePixelRatio || 2
-
-    const img = new Image()
-    img.crossOrigin = 'anonymous'
-    img.src = imgUrl
-
-    img.onload = () => {
-      // ⚠️ 用“物理像素”创建 canvas
-      const canvas = document.createElement('canvas')
-      canvas.width = cssWidth * dpr
-      canvas.height = cssHeight * dpr
-
-      const ctx = canvas.getContext('2d')
-      ctx.scale(dpr, dpr)
-
-      const imgRatio = img.width / img.height
-      const targetRatio = cssWidth / cssHeight
-
-      let sx = 0, sy = 0, sw = img.width, sh = img.height
-
-      if (imgRatio > targetRatio) {
-        sw = img.height * targetRatio
-        sx = (img.width - sw) / 2
-      } else {
-        sh = img.width / targetRatio
-        sy = (img.height - sh) / 2
-      }
-
-      ctx.drawImage(
-        img,
-        sx, sy, sw, sh,
-        0, 0, cssWidth, cssHeight
-      )
-
-      resolve(canvas.toDataURL('image/png'))
-    }
-
-    img.onerror = reject
-  })
-}
-
-
-
-watch(
-    () => [triggerImg.value, workItem.value.reviewImage],
-    ([preImgs, reviewImgs]) => {
-        if (preImgs && preImgs.length && reviewImgs && reviewImgs.length) {
-            generateCombinedReviewImage();
-        }
-    },
-    { deep: true }
-);
-
-//确认上传
-const handleSubmit = () => {
-    const params = {
-        executeEvidence: imageArr.value,
-        recordId: workItem.value.id,
-    };
-    VE_API.monitor.addReviewImg(params).then(({ code }) => {
-        if (code === 0) {
-            getDetail();
-            ElMessage.success("您已上传成功");
-            imageArr.value = [];
-        }
-    });
-};
-
-const reviewPopupRef = ref(null);
-const handleShare = () => {
-    const preImg = triggerImg.value.length
-        ? base_img_url2 + triggerImg.value[triggerImg.value.length - 1].cloudFilename
-        : "";
-    const resImg = workItem.value?.reviewImage?.length
-        ? base_img_url2 + workItem.value.reviewImage[workItem.value.reviewImage.length - 1]
-        : "";
-    reviewPopupRef.value.handleShowPopup(workItem.value.id, preImg, resImg);
-};
-
-const generateReport = () => {
-    router.push({
-        path: "/achievement_report",
-        query: { miniJson: JSON.stringify({ id: workItem.value.id }) },
-    });
-};
-
-const handleRemindUser = () => {
-    const query = {
-        askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
-        shareText: '向您分享了一条农事复核提醒,请您尽快复核',
-        targetUrl: `review_work`,
-        paramsPage: JSON.stringify({id: workItem.value.id}),
-        imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
-    };
-    wx.miniProgram.navigateTo({
-        url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
-    });
-};
-
-const handleMore = () => {
-    router.push(`/service_detail?farmId=${workItem.value.farmId}`);
-};
-
-// 清理数据的函数
-const clearData = () => {
-    workItem.value = {};
-    triggerImg.value = [];
-    imageArr.value = [];
-    paramsPage.value = {};
-    isPlan.value = false;
-    loading.value = false;
-};
-
-onDeactivated(() => {
-    clearData();
-});
-
-onUnmounted(() => {
-    clearData();
-});
-
-// //联系专家
-// const handleContact = () => {
-//     router.push(`/dialogue?userId=${workItem.value.expert}&name=${workItem.value.expertUserName}`);
-// };
-
-const imageArr = ref([]);
-const handleUpload = ({ imgArr }) => {
-    imageArr.value = imgArr;
-};
-</script>
-
-<style lang="scss" scoped>
-.work-wrap {
-    .center-wrap {
-        ::v-deep {
-            .van-uploader__wrapper {
-                justify-content: center;
-            }
-        }
-    }
-    .work-content {
-        padding-top: 1px;
-        background: #f5f5f5;
-        padding-bottom: 12px;
-        font-size: 14px;
-        height: calc(100vh - 40px);
-        box-sizing: border-box;
-        overflow: auto;
-        &.recheck-title {
-            padding-bottom: 86px;
-            .common-card-title {
-                font-size: 16px;
-                display: flex;
-                align-items: center;
-                border-bottom: 1px solid #f5f5f5;
-                padding-bottom: 10px;
-                .icon {
-                    width: 14px;
-                    height: 8px;
-                    padding-right: 6px;
-                }
-            }
-            &.no-bottom {
-                padding-bottom: 26px;
-            }
-        }
-        .up-btn-group {
-            position: fixed;
-            bottom: 80px;
-            left: 12px;
-            display: flex;
-            justify-content: center;
-            width: calc(100% - 24px);
-            .up-btn {
-                background: linear-gradient(45deg, #9fd5ff, #2199f8);
-                flex: 1;
-                height: 40px;
-                border: 2px solid rgba(255, 255, 255, 0.66);
-                color: #fff;
-                font-size: 14px;
-                border-radius: 40px;
-                line-height: 38px;
-                text-align: center;
-                box-sizing: border-box;
-            }
-            .orange {
-                margin-left: 12px;
-                background: linear-gradient(45deg, #ffd887, #ed9e1e);
-            }
-            .btn {
-                width: 200px;
-                flex: none;
-            }
-        }
-
-        .fixed-btn-wrap {
-            position: fixed;
-            z-index: 10;
-            bottom: 0;
-            left: 0;
-            width: 100%;
-            padding: 10px 12px 25px;
-            box-sizing: border-box;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            background: #fff;
-            box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
-            .fixed-btn-wrap-left{
-                display: flex;
-                align-items: center;
-                gap: 10px;
-            }
-            &.center {
-                justify-content: center;
-            }
-            .fixed-btn {
-                width: 120px;
-                text-align: center;
-                height: 40px;
-                line-height: 40px;
-                background: linear-gradient(180deg, #70bffe, #2199f8);
-                border-radius: 25px;
-                color: #fff;
-                font-size: 14px;
-                box-sizing: border-box;
-                &.expert {
-                    width: 180px;
-                }
-                &.orange {
-                    color: #ff953d;
-                    border: 1px solid #ff953d;
-                    background: #fff;
-                }
-                &.excute {
-                    background: linear-gradient(180deg, #ffd887, #ed9e1e);
-                }
-                &.more {
-                    background: #ffffff;
-                    border: 1px solid rgba(153, 153, 153, 0.5);
-                    color: #666666;
-                    width: 100px;
-                }
-                &.second {
-                    background: #ffffff;
-                    border: 1px solid #2199f8;
-                    color: #2199f8;
-                }
-            }
-        }
-        .tabs-content-item {
-            padding: 12px 12px 16px 12px;
-            margin: 0 12px;
-            border-radius: 8px;
-            background: #fff;
-            margin-top: 12px;
-            position: relative;
-            .execute-img {
-                margin-top: 12px;
-            }
-            .card-title {
-                display: flex;
-                justify-content: space-between;
-                align-items: center;
-                padding-bottom: 10px;
-                .card-title-l {
-                    display: flex;
-                    align-items: center;
-                    font-size: 16px;
-
-                    .icon {
-                        width: 14px;
-                        height: 8px;
-                        padding-right: 6px;
-                    }
-                }
-                .card-title-r {
-                    font-size: 14px;
-                    color: #2199f8;
-                }
-            }
-            .info-farm {
-                padding: 12px 0;
-            }
-            .info-box {
-                // padding-top: 12px;
-                display: flex;
-                align-items: center;
-                &.subject-content {
-                    border: none;
-                }
-                &.cost-wrap {
-                    padding-top: 8px;
-                }
-                &.bottom-box {
-                    flex-direction: column;
-                }
-                .info-l {
-                    .farm-img {
-                        width: 78px;
-                        width: 78px;
-                        border-radius: 8px;
-                        object-fit: scale-down;
-                    }
-                }
-                .info-r {
-                    padding-left: 12px;
-                }
-                .farm-name {
-                    font-weight: bold;
-                    font-size: 14px;
-                    color: #000;
-                    padding-bottom: 4px;
-                }
-                .info-item {
-                    display: flex;
-                    align-items: center;
-                    font-size: 12px;
-                    &.line-item {
-                        align-items: flex-start;
-                    }
-                    .info-name {
-                        color: #bbbbbb;
-                        flex: none;
-                    }
-                    .info-value {
-                        color: #666666;
-                    }
-                }
-                .info-item + .info-item {
-                    margin-top: 4px;
-                }
-            }
-            .subject-box {
-                width: 100%;
-                display: flex;
-                align-items: center;
-                justify-content: space-around;
-                background: #fafafa;
-                .subject-item {
-                    border-radius: 8px;
-                    padding: 4px 4px;
-                    display: flex;
-                    flex-direction: column;
-                    align-items: center;
-                    justify-content: center;
-                    width: 33%;
-                    .subject-img {
-                        width: 30px;
-                        height: 30px;
-                        object-fit: cover;
-                        border-radius: 50%;
-                        padding-bottom: 4px;
-                    }
-                    .subject-tag {
-                        font-size: 12px;
-                        padding: 2px 8px;
-                        background: #e0efff;
-                        color: #2199f8;
-                        border-radius: 4px;
-
-                        &.cost-text {
-                            margin-left: 8px;
-                            font-size: 16px;
-                            color: #2199f8;
-                            padding: 1px 8px;
-                        }
-                    }
-                }
-                .subject-item + .subject-item {
-                    margin-left: 6px;
-                }
-
-                .cost-l {
-                    position: relative;
-                    &::after {
-                        content: "";
-                        position: absolute;
-                        right: 0;
-                        top: 16px;
-                        height: calc(100% - 32px);
-                        width: 1px;
-                        background: rgba(0, 0, 0, 0.05);
-                    }
-                }
-            }
-            .cost-box {
-                border-radius: 5px;
-                background: none;
-                .cost-item {
-                    display: flex;
-                    align-items: center;
-                    flex-direction: row;
-                }
-                .subject-item {
-                    background: none;
-                    width: 50%;
-                }
-                .cost-l {
-                    position: relative;
-                    &::after {
-                        content: "";
-                        position: absolute;
-                        right: 0;
-                        top: 0;
-                        height: 100%;
-                        width: 1px;
-                        background: rgba(0, 0, 0, 0.05);
-                    }
-                }
-                .cost-text {
-                    font-size: 16px;
-                    color: #2199f8;
-                    padding-bottom: 5px;
-                }
-            }
-            .recheck-box,
-            .recheck-ablum {
-                width: 100%;
-            }
-            .evaluate {
-                background: #fff;
-                border-radius: 5px;
-                padding: 4px 8px 10px 8px;
-                margin-right: 8px;
-                .evaluate-title {
-                    font-size: 16px;
-                    font-weight: 500;
-                    display: flex;
-                    align-items: center;
-                    justify-content: space-between;
-                    margin-bottom: 8px;
-                    .more {
-                        font-size: 14px;
-                        color: #999999;
-                        font-weight: 400;
-                        display: flex;
-                        align-items: center;
-                    }
-                }
-                .rate {
-                    display: flex;
-                    justify-content: space-between;
-                    ::v-deep {
-                        .el-rate {
-                            --el-rate-icon-margin: 0;
-                        }
-                        .el-rate--small .el-rate__icon {
-                            font-size: 12px;
-                        }
-                    }
-                    .rate-item {
-                        display: flex;
-                        align-items: center;
-                        border-radius: 4px;
-                        padding: 4px 0px;
-                        font-size: 11px;
-                        .name {
-                            margin-right: 2px;
-                            color: #666666;
-                            position: relative;
-                            top: 2px;
-                        }
-                        .num {
-                            color: #f3c11d;
-                            margin-left: 2px;
-                        }
-                    }
-                    .line {
-                        width: 1px;
-                        height: 12px;
-                        background: #cdd7e1;
-                        position: relative;
-                        top: 13px;
-                        margin: 0 3px;
-                    }
-                }
-                .comment {
-                    .user-info {
-                        display: flex;
-                        align-items: center;
-                        margin-bottom: 2px;
-                        .user-name {
-                            font-weight: 500;
-                            margin-left: 8px;
-                            span {
-                                font-weight: 400;
-                                font-size: 12px;
-                                color: #999999;
-                            }
-                        }
-                    }
-                }
-            }
-            .img-list + .img-list,
-            .upload-wrap {
-                margin-top: 12px;
-            }
-            // .over-img-box {
-            //     ::v-deep {
-            //         img {
-            //             border-radius: 8px;
-            //         }
-            //     }
-            // }
-            .img-list {
-                width: 100%;
-            }
-            .upload-wrap {
-                display: flex;
-                flex-direction: column;
-                justify-content: center;
-                height: 254px;
-                width: 100%;
-                padding: 25px 0 12px 10px;
-                box-sizing: border-box;
-            }
-            .recheck-text-wrap {
-                width: 100%;
-                border-radius: 8px;
-                background: #f2f3f5;
-                color: #666666;
-                font-size: 14px;
-                position: relative;
-                &.active {
-                    background: rgba(33, 153, 248, 0.1);
-                    border: 1px solid #2199f8;
-                    color: #2199f8;
-                    .date {
-                        background: linear-gradient(170deg, #9fd5ff, #2199f8);
-                    }
-                    .recheck-desc {
-                        color: #2199f8;
-                    }
-                }
-                .submit {
-                    background: #2199f8;
-                    border-radius: 4px;
-                    padding: 8px;
-                    font-size: 16px;
-                    color: #fff;
-                    margin: 0 10px 16px;
-                    text-align: center;
-                }
-                .date {
-                    position: absolute;
-                    top: 0;
-                    left: 0;
-                    background: #bebebe;
-                    border-radius: 8px 0 8px 0;
-                    color: #fff;
-                    font-size: 12px;
-                    padding: 3px 6px;
-                    font-family: "PangMenZhengDao";
-                }
-                .recheck-text {
-                    padding: 8px 0 2px 0;
-                }
-                .recheck-desc {
-                    font-size: 12px;
-                    color: #999999;
-                }
-                .img-icon {
-                    width: 40px;
-                    height: 40px;
-                }
-            }
-            .sub-title {
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                .sub-line {
-                    width: 12px;
-                    height: 2px;
-                    border-radius: 1px;
-                    background: #d9d9d9;
-                }
-                .sub-name {
-                    padding: 0 5px;
-                    font-size: 14px;
-                    color: #666666;
-                }
-            }
-        }
-    }
-
-    .review-hide-box {
-        position: absolute;
-        left: 0;
-        width: 100%;
-        height: 100%;
-        z-index: -1;
-        bottom: 0;
-    }
-
-    .review-image {
-        position: relative;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        gap: 8px;
-        margin: 12px;
-        background: #fff;
-        border-radius: 8px;
-        .review-mask {
-            z-index: 1;
-            pointer-events: none;
-            position: absolute;
-            left: 0;
-            top: 0;
-            width: 100%;
-            height: 100%;
-            border-radius: 8px;
-            background: linear-gradient(
-                360deg,
-                rgba(0, 0, 0, 0.78) 0%,
-                rgba(0, 0, 0, 0.437208) 19.87%,
-                rgba(0, 0, 0, 0) 33.99%
-            );
-            display: flex;
-            flex-direction: column;
-            align-items: baseline;
-            justify-content: end;
-            padding: 12px;
-            box-sizing: border-box;
-            color: #fff;
-            .review-text {
-                font-family: "PangMenZhengDao";
-                font-size: 16px;
-                margin-bottom: 1px;
-            }
-            .review-content {
-                font-size: 10px;
-                line-height: 15px;
-            }
-        }
-        .vs-wrap {
-            position: absolute;
-            left: 50%;
-            top: 50%;
-            transform: translate(-50%, -50%);
-            width: 40px;
-            height: 40px;
-            z-index: 10;
-            img {
-                width: 100%;
-                height: 100%;
-                object-fit: cover;
-            }
-        }
-        .review-image-item {
-            position: relative;
-            flex: 1;
-            .review-image-item-title {
-                position: absolute;
-                top: 0;
-                left: 0;
-                background: rgba(54, 52, 52, 0.6);
-                padding: 4px 10px;
-                border-radius: 8px 0 8px 0;
-                backdrop-filter: 4px;
-                font-size: 12px;
-                color: #fff;
-            }
-            // .review-image-item-img {
-            //     width: 100%;
-            //     height: 250px;
-            //     object-fit: cover;
-            // }
-            .review-image-item-img {
-                width: 100%;
-                height: 100%;
-                object-fit: cover;
-                object-position: center;
-            }
-            .left-img {
-                border-radius: 8px 0 0 8px;
-            }
-            .right-img {
-                border-radius: 0 8px 8px 0;
-            }
-        }
-    }
-}
-</style>

+ 0 - 178
src/views/old_mini/modify_work/sharePage.vue

@@ -1,178 +0,0 @@
-<template>
-    <div class="share-page">
-        <custom-header name="选择发送到" />
-        <div class="share-content">
-            <div class="search-wrap">
-                <div class="search-input">
-                    <el-input v-model="search" placeholder="搜索昵称">
-                        <template #prefix>
-                            <el-icon><Search /></el-icon>
-                        </template>
-                    </el-input>
-                </div>
-            </div>
-            <div class="recent-chat-wrap">
-                <div class="recent-title">最近聊天</div>
-                <div class="recent-list">
-                    <div class="recent-item" v-for="(item, index) in recentList" :key="index">
-                        <img class="recent-img" src="" alt="" />
-                        <div class="recent-name">{{ item.name }}</div>
-                        <checkbox class="recent-checkbox" v-model="item.checked"></checkbox>
-                    </div>
-                </div>
-            </div>
-            <div class="chat-list">
-                <div class="chat-item" v-for="(item, index) in chatList" :key="index">
-                    <checkbox @change="changeCheck(item)" v-model="item.checked"></checkbox>
-                    <div class="chat-info" :class="{'checked': item.checked}">
-                        <img class="chat-img" src="" alt="" />
-                        <span class="chat-name">{{ item.name }}</span>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-    <div class="bottom-btn" v-show="checkedList.length > 0">
-        <div class="btn">取消</div>
-        <div class="btn primary">完成</div>
-    </div>
-</template>
-
-<script setup>
-import customHeader from "@/components/customHeader.vue";
-import { Checkbox } from "vant";
-import { ref } from "vue";
-
-const search = ref("");
-
-const chatList = ref([
-    {
-        name: "张三",
-        checked: false,
-    },
-    {
-        name: "张三",
-        checked: false,
-    },
-]);
-
-const recentList = ref([
-    {
-        name: "农资11",
-        checked: false,
-    },
-    {
-        name: "农资12",
-        checked: false,
-    },
-]);
-
-const checkedList = ref([]);
-const changeCheck = (item) => {
-    console.log(item,chatList.value);
-    checkedList.value = chatList.value.filter((item) => item.checked);
-};
-</script>
-
-<style lang="scss" scoped>
-.share-page {
-    width: 100%;
-    height: 100vh;
-    background-color: #f5f7fb;
-    .share-content {
-        .search-wrap {
-            padding: 20px 20px 0 20px;
-            .search-input {
-                width: 100%;
-                ::v-deep {
-                    .el-input__wrapper {
-                        box-shadow: none;
-                        border-radius: 25px;
-                    }
-                }
-            }
-        }
-        .recent-chat-wrap {
-            padding: 0 20px 20px 20px;
-            .recent-title {
-                font-weight: 500;
-                margin: 12px 0;
-            }
-            .recent-list {
-                display: flex;
-                flex-wrap: wrap;
-                gap: 10px;
-                .recent-item {
-                    position: relative;
-                    .recent-img {
-                        width: 54px;
-                        height: 54px;
-                        border-radius: 2px;
-                        background: red;
-                    }
-                    .recent-name {
-                        text-align: center;
-                        margin-top: 5px;
-                    }
-                    .recent-checkbox{
-                        position: absolute;
-                        right: 3px;
-                        top: 3px;
-                    }
-                }
-            }
-        }
-        .chat-list {
-            background-color: #fff;
-            padding-top: 6px;
-            .chat-item {
-                padding: 10px 20px;
-                display: flex;
-                align-items: center;
-                gap: 12px;
-                .chat-info {
-                    display: flex;
-                    align-items: center;
-                    gap: 10px;
-                    .chat-img {
-                        width: 46px;
-                        height: 46px;
-                        border-radius: 2px;
-                    }
-                    &.checked {
-                        .chat-name {
-                            color: #2199F8;
-                            font-weight: 500;
-                        }
-                    }
-                }
-            }
-        }
-    }
-}
-
-.bottom-btn {
-    position: fixed;
-    bottom: 10px;
-    left: 20px;    
-    width: calc(100% - 40px);
-    display: flex;
-
-    .btn {
-        flex: 1;
-        text-align: center;
-        color: #2199F8;
-        padding: 10px;
-        border-radius: 25px;
-        border: 1px solid #2199F8;
-        font-size: 16px;
-        &.primary{
-            background: #2199F8;
-            color: #fff;
-        }
-    }
-    .btn + .btn {
-        margin-left: 15px;
-    }
-}
-</style>

+ 0 - 743
src/views/old_mini/offer_price/component/editPrice.vue

@@ -1,743 +0,0 @@
-<template>
-    <div class="edit-price">
-        <custom-header name="飞鸟管家"></custom-header>
-        <div class="edit-form">
-            <el-form ref="formRef" :model="form" :rules="rules" label-width="80px">
-                <el-form-item label="药肥名称" prop="id" required>
-                    <el-select v-model="form.id" placeholder="请选择" filterable clearable style="width: 100%">
-                        <el-option v-for="opt in pesticideOptions" :key="opt.id" :label="opt.name" :value="opt.id" />
-                    </el-select>
-                </el-form-item>
-
-                <el-form-item label="药肥品牌" prop="brand" required>
-                    <el-input class="has-border" v-model="form.brand" placeholder="请输入" />
-                </el-form-item>
-
-                <el-form-item label="药肥类型" required prop="typeId">
-                    <div class="row-3-selects">
-                        <field
-                            v-model="fieldValue"
-                            is-link
-                            readonly
-                            label=""
-                            placeholder="请选择药肥类型"
-                            @click="showCascader = true"
-                        />
-                        <popup v-model:show="showCascader" round position="bottom">
-                            <cascader
-                                v-model="cascaderValue"
-                                aria-hidden="false"
-                                title="请选择药肥类型"
-                                :options="typeOptions"
-                                :field-names="cascaderProps"
-                                @close="showCascader = false"
-                                @finish="onFinish"
-                            />
-                        </popup>
-                    </div>
-                </el-form-item>
-
-                <el-form-item label="计量单位" prop="unit" required>
-                    <el-radio-group v-model="form.unit">
-                        <el-radio value="克">克</el-radio>
-                        <el-radio value="千克">千克</el-radio>
-                        <el-radio value="毫升">毫升</el-radio>
-                        <el-radio value="升">升</el-radio>
-                    </el-radio-group>
-                </el-form-item>
-
-                <el-form-item label="施用方式" prop="method" required>
-                    <el-radio-group v-model="form.method">
-                        <el-radio value="1">叶面施</el-radio>
-                        <el-radio value="2">根部施</el-radio>
-                    </el-radio-group>
-                </el-form-item>
-
-                <el-form-item label="药肥成本" prop="cost" required class="input-unit">
-                    <el-input v-model="form.cost" type="number" step="0.01" placeholder="请输入">
-                        <template #append>元/{{ form.unit }}</template>
-                    </el-input>
-                </el-form-item>
-
-                <el-form-item label="药肥报价" prop="price" required class="input-unit">
-                    <el-input v-model="form.price" type="number" step="0.01" placeholder="请输入">
-                        <template #append>元/{{ form.unit }}</template>
-                    </el-input>
-                </el-form-item>
-
-                <el-form-item label="药肥库存" prop="stock" required class="input-unit">
-                    <el-input v-model="form.stock" type="number" step="0.01" placeholder="请输入">
-                        <template #append>{{ form.unit }}</template>
-                    </el-input>
-                </el-form-item>
-
-                <el-form-item label="单位兑水" class="input-unit">
-                    <div class="water-row">
-                        <el-input v-model="form.waterMin" type="number" step="0.01" placeholder="请输入兑水量">
-                            <template #append>{{ form.unit }}</template>
-                        </el-input>
-                        <span>-</span>
-                        <el-input v-model="form.waterMax" type="number" step="0.01" placeholder="请输入兑水量">
-                            <template #append>{{ form.unit }}</template>
-                        </el-input>
-                    </div>
-                </el-form-item>
-
-                <el-form-item label="适用品类">
-                    <el-select
-                        v-model="form.speciesIds"
-                        multiple
-                        placeholder="请选择"
-                        filterable
-                        clearable
-                        style="width: 100%"
-                    >
-                        <el-option v-for="(opt, optI) in specieList" :key="optI" :label="opt.name" :value="opt.id" />
-                    </el-select>
-                </el-form-item>
-            </el-form>
-        </div>
-
-        <div class="page-action">
-            <div class="btn-item del" v-if="!isAdd" @click="openDelete">删除</div>
-            <div class="btn-item cancel" v-if="isAdd" @click="goBack">取消</div>
-            <div class="btn-right">
-                <div class="btn-item cancel" v-if="!isAdd" @click="goBack">取消编辑</div>
-                <div class="btn-item primary" @click="handleSave">{{ isAdd ? "新增报价" : "保存报价" }}</div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import customHeader from "@/components/customHeader.vue";
-import { ElMessage, ElMessageBox } from "element-plus";
-import { useRouter, useRoute } from "vue-router";
-import { ref, reactive, onMounted, onActivated, onUnmounted, onDeactivated, watch } from "vue";
-import { Cascader, Popup, Field } from "vant";
-
-const router = useRouter();
-const route = useRoute();
-const isAdd = ref(false);
-const goBack = () => {
-    router.back();
-};
-
-const showCascader = ref(false);
-const fieldValue = ref("");
-const cascaderValue = ref("");
-// 全部选项选择完毕后,会触发 finish 事件
-const onFinish = ({ selectedOptions }) => {
-    showCascader.value = false;
-    fieldValue.value = selectedOptions.map((option) => option.name).join(" / ");
-    form.typeId = selectedOptions[selectedOptions.length - 1].id;
-};
-
-const openDelete = () => {
-    ElMessageBox.confirm("确认要删除该报价吗?", "提示", {
-        confirmButtonText: "确认",
-        cancelButtonText: "取消",
-        type: "warning",
-    })
-        .then(() => {
-            VE_API.z_farm_work_pesticide_fertilizer.deleteFertilizer({ agriculturalStoreId: detailData.value.agriculturalStoreId, pesticideFertilizerId: detailData.value.id }).then((res) => {
-                if (res.code === 0) {
-                    ElMessage.success("删除成功");
-                    router.back();
-                }
-            });
-        })
-        .catch(() => {});
-};
-
-// 表单模型与选项
-const formRef = ref();
-const form = reactive({
-    id: "",
-    typeId: null,
-    brand: "",
-    type1: "",
-    type2: "",
-    type3: "",
-    unit: "克",
-    method: "1",
-    cost: null,
-    price: null,
-    stock: null,
-    waterMin: null,
-    waterMax: null,
-    speciesIds: [],
-});
-
-const rules = {
-    id: [{ required: true, message: "请选择药肥名称", trigger: "change" }],
-    brand: [{ required: true, message: "请选择药肥品牌", trigger: "change" }],
-    typeId: [{ required: true, message: "请选择药肥类型", trigger: "change" }],
-    unit: [{ required: true, message: "请选择计量单位", trigger: "change" }],
-    method: [{ required: true, message: "请选择施用方式", trigger: "change" }],
-    cost: [{ required: true, message: "请输入成本", trigger: "blur" }],
-    price: [{ required: true, message: "请输入报价", trigger: "blur" }],
-    stock: [{ required: true, message: "请输入库存", trigger: "blur" }],
-};
-
-// 单位转换映射
-const unitMap = {
-    kg: "千克",
-    g: "克",
-    ml: "毫升",
-    l: "升",
-    千克: "千克",
-    克: "克",
-    毫升: "毫升",
-    升: "升",
-};
-
-// 施用方式转换映射
-const methodMap = {
-    叶面施: "1",
-    根部施: "2",
-};
-
-const cascaderProps = {
-    value: "id",
-    text: "name",
-    children: "children",
-};
-
-onMounted(() => {
-    getSpecieList();
-    fetchPesticideOptions();
-    fetchTypeOptions();
-    
-    // 首次加载时初始化表单
-    if (isAdd.value) {
-        initForm();
-    } else {
-        getDetail();
-    }
-});
-
-const specieList = ref([]);
-function getSpecieList() {
-    VE_API.farm.fetchSpecieList().then(({ data }) => {
-        specieList.value = data;
-    });
-}
-
-
-// 递归清理空的 children 属性
-const cleanEmptyChildren = (data) => {
-    if (!Array.isArray(data)) {
-        return data;
-    }
-    return data.map((item) => {
-        const newItem = { ...item };
-        if (newItem.children) {
-            if (Array.isArray(newItem.children) && newItem.children.length > 0) {
-                // 递归处理子项
-                newItem.children = cleanEmptyChildren(newItem.children);
-            } else {
-                // 如果 children 为空数组或不存在,删除该属性
-                delete newItem.children;
-            }
-        }
-        return newItem;
-    });
-};
-
-// 用途类型选项
-const typeOptions = ref([]);
-function fetchTypeOptions() {
-    if (typeOptions.value.length === 0) {
-        VE_API.z_farm_work_pesticide_fertilizer.typeList().then((res) => {
-            if (res.code === 0) {
-                // 清理空的 children 属性
-                typeOptions.value = cleanEmptyChildren(res.data || []);
-            }
-        });
-    }
-}
-/**
- * 获取药肥选项
- */
-const pesticideOptions = ref([]);
-function fetchPesticideOptions() {
-    // 每次都重新获取药肥选项,确保数据是最新的
-    VE_API.z_farm_work_pesticide_fertilizer
-        .selectOption()
-        .then((res) => {
-            if (res.code === 0) {
-                pesticideOptions.value = res.data || [];
-            }
-        })
-        .catch(() => {
-            // 获取药肥选项失败
-        });
-}
-
-// 根据 typeId 查找路径数组
-const findPathByTypeId = (options, targetId, path = []) => {
-    for (const option of options) {
-        const currentPath = [...path, option.id];
-        if (option.id === targetId) {
-            return currentPath;
-        }
-        if (option.children && option.children.length > 0) {
-            const found = findPathByTypeId(option.children, targetId, currentPath);
-            if (found) return found;
-        }
-    }
-    return null;
-};
-
-// 根据 typeId 查找显示文本
-const findTextByTypeId = (options, targetId) => {
-    for (const option of options) {
-        if (option.id === targetId) {
-            return option.name;
-        }
-        if (option.children && option.children.length > 0) {
-            const found = findTextByTypeId(option.children, targetId);
-            if (found) return found;
-        }
-    }
-    return "";
-};
-
-// 根据 typeId 设置级联选择器的默认值
-const setCascaderDefaultValue = (typeId) => {
-    if (!typeId || !typeOptions.value.length) {
-        return;
-    }
-    
-    // 查找路径数组
-    const path = findPathByTypeId(typeOptions.value, typeId);
-    if (path && path.length > 0) {
-        cascaderValue.value = path;
-        
-        // 查找显示文本(完整路径)
-        const pathNames = [];
-        let current = typeOptions.value;
-        for (const id of path) {
-            const option = current.find(opt => opt.id === id);
-            if (option) {
-                pathNames.push(option.name);
-                current = option.children || [];
-            }
-        }
-        if (pathNames.length > 0) {
-            fieldValue.value = pathNames.join(" / ");
-        }
-    }
-};
-
-// 监听 typeOptions 变化,当数据加载完成后自动设置默认值
-watch(
-    () => typeOptions.value,
-    (newOptions) => {
-        if (newOptions.length > 0 && form.typeId) {
-            setCascaderDefaultValue(form.typeId);
-        }
-    },
-    { deep: true }
-);
-
-// 获取详情数据
-const detailData = ref({});
-const getDetail = () => {
-    const id = route.query.id;
-    if (!id || isAdd.value) {
-        return;
-    }
-
-    VE_API.z_farm_work_pesticide_fertilizer
-        .fertilizerDetail({ id })
-        .then(({ data }) => {
-            if (data) {
-                detailData.value = data;
-                // 赋值表单数据
-                form.id = data.id || "";
-                form.brand = data.brand || "";
-                form.typeId = data.typeId || null;
-
-                // 转换单位
-                form.unit = unitMap[data.unit] || data.unit || "克";
-
-                // 转换施用方式
-                if (data.usageModeList && data.usageModeList.length > 0) {
-                    const firstMode = data.usageModeList[0];
-                    form.method = methodMap[firstMode] || firstMode;
-                }
-
-                form.cost = data.cost || null;
-                form.price = data.price || null;
-                form.stock = data.stock || null;
-                form.waterMin = data.unitWaterAmount || null;
-                form.waterMax = data.unitWaterAmountMax || null;
-                // 适用品种
-                if (data.speciesList && Array.isArray(data.speciesList) && data.speciesList.length > 0) {
-                    form.speciesIds = data.speciesList.map(item => item.id);
-                } else {
-                    form.speciesIds = [];
-                }
-                console.log("form.speciesIds", form.speciesIds, data.speciesList);
-                // 设置级联选择器的默认值(watch 会自动处理)
-                if (form.typeId && typeOptions.value.length > 0) {
-                    setCascaderDefaultValue(form.typeId);
-                }
-            }
-        })
-        .catch(() => {
-            ElMessage.error("获取详情失败");
-        });
-};
-
-// 重置表单数据
-const resetForm = () => {
-    form.id = "";
-    form.typeId = null;
-    form.brand = "";
-    form.type1 = "";
-    form.type2 = "";
-    form.type3 = "";
-    form.unit = "克";
-    form.method = "1";
-    form.cost = null;
-    form.price = null;
-    form.stock = null;
-    form.waterMin = null;
-    form.waterMax = null;
-    form.speciesIds = [];
-    
-    // 重置级联选择器
-    showCascader.value = false;
-    fieldValue.value = "";
-    cascaderValue.value = "";
-    
-    // 清除表单验证状态
-    if (formRef.value) {
-        formRef.value.resetFields();
-        // formRef.value.clearValidate();
-    }
-};
-
-// 初始化表单数据(新增模式)
-const initForm = () => {
-    resetForm();
-    // 新增模式下的默认值
-    form.unit = "克";
-    form.method = "1";
-};
-
-onActivated(() => {
-    isAdd.value = route.query.isAdd ? true : false;
-    // 进入页面时,如果是新增模式,初始化表单;如果是编辑模式,获取详情
-    if (isAdd.value) {
-        initForm();
-    } else {
-        getDetail();
-    }
-});
-
-onDeactivated(() => {
-    // 离开页面时清除数据
-    resetForm();
-});
-
-onUnmounted(() => {
-    // 组件卸载时也清除数据
-    resetForm();
-});
-
-// 根据路径数组获取三级分类名称
-const getCategoryNamesByPath = (path) => {
-    if (!path || path.length === 0 || !typeOptions.value.length) {
-        return {
-            categoryLevel1Name: "",
-            categoryLevel2Name: "",
-            categoryLevel3Name: "",
-        };
-    }
-    
-    const names = [];
-    let current = typeOptions.value;
-    
-    for (let i = 0; i < path.length && i < 3; i++) {
-        const option = current.find(opt => opt.id === path[i]);
-        if (option) {
-            names.push(option.name);
-            current = option.children || [];
-        } else {
-            break;
-        }
-    }
-    
-    return {
-        categoryLevel1Name: names[0] || "",
-        categoryLevel2Name: names[1] || "",
-        categoryLevel3Name: names[2] || "",
-    };
-};
-
-// 获取选中的药肥信息
-const getSelectedPesticideFertilizer = () => {
-    const selected = pesticideOptions.value.find(opt => opt.id === form.id);
-    if (!selected) {
-        return null;
-    }
-    return selected;
-};
-
-// 单位反向转换(将中文单位转换为英文)
-const reverseUnitMap = {
-    千克: "kg",
-    克: "g",
-    毫升: "ml",
-    升: "l",
-};
-
-// 保存方法
-const handleSave = async () => {
-    // 表单验证
-    try {
-        await formRef.value.validate();
-    } catch (error) {
-        ElMessage.warning("请完善表单信息");
-        return;
-    }
-    
-    // 获取选中的药肥信息
-    const selectedPesticide = getSelectedPesticideFertilizer();
-    if (!selectedPesticide) {
-        ElMessage.warning("请选择药肥名称");
-        return;
-    }
-    
-    // 获取三级分类名称
-    const categoryNames = getCategoryNamesByPath(cascaderValue.value);
-    
-    // 转换施用方式
-    const usageModeList = form.method === "1" ? ["叶面施"] : ["根部施"];
-    
-    // 转换单位(如果需要英文单位)
-    const unit = reverseUnitMap[form.unit] || form.unit;
-    
-    // 转换适用品种(数组转字符串,用逗号分隔)
-    // const speciesIds = Array.isArray(form.crops) 
-    //     ? form.crops.join(",") 
-    //     : (form.crops || "");
-    // 构建请求参数
-    const params = {
-        pesticideFertilizer: {
-            id: selectedPesticide.id || form.id,
-            name: selectedPesticide.name || "",
-            // pesticideFertilizerCode: selectedPesticide.code || "",
-            // typeName: selectedPesticide.typeName || "",
-            typeId: form.typeId,
-            defaultName: selectedPesticide.name || "",
-            unit: unit,
-            // price: selectedPesticide.price || form.price || null,
-            unitWaterAmount: form.waterMin ? Number(form.waterMin) : null,
-            unitWaterAmountMax: form.waterMax ? Number(form.waterMax) : null,
-            speciesIds: form.speciesIds,
-            usageModeList: usageModeList,
-            categoryLevel1Name: categoryNames.categoryLevel1Name,
-            categoryLevel2Name: categoryNames.categoryLevel2Name,
-            categoryLevel3Name: categoryNames.categoryLevel3Name,
-        },
-        price: form.price ? Number(form.price) : null,
-        cost: form.cost ? Number(form.cost) : null,
-        stock: form.stock ? Number(form.stock) : null,
-        remark: selectedPesticide.remark || "",
-        brand: form.brand,
-    };
-    // 调用保存接口
-    VE_API.z_farm_work_pesticide_fertilizer
-        .saveFertilizer(params)
-        .then((res) => {
-            if (res.code === 0) {
-                ElMessage.success(isAdd.value ? "新增报价成功" : "保存报价成功");
-                // 延迟返回,让用户看到成功提示
-                setTimeout(() => {
-                    router.back();
-                }, 1000);
-            } else {
-                ElMessage.error(res.message || "保存失败");
-            }
-        })
-        .catch(() => {
-            ElMessage.error("保存失败,请重试");
-        });
-};
-</script>
-
-<style lang="scss" scoped>
-.edit-price {
-    width: 100%;
-    height: 100vh;
-    background: #f5f7fb;
-    .edit-form {
-        margin: 12px;
-        padding: 12px;
-        background: #ffffff;
-        .row-3-selects {
-            width: 100%;
-            display: flex;
-            gap: 5px;
-            ::v-deep {
-                .van-cell {
-                    padding: 4px 10px;
-                    border: 1px solid rgba(33, 153, 248, 0.3);
-                    border-radius: 5px;
-                    box-sizing: border-box;
-                }
-                .van-field__control {
-                    color: #2199f8;
-                    &::placeholder {
-                        color: rgba(33, 153, 248, 0.43) !important;
-                    }
-                }
-                .van-cell__right-icon {
-                    color: #2199f8;
-                    transform: rotate(90deg);
-                    font-size: 14px;
-                }
-                .el-select__wrapper {
-                    padding: 2px 6px;
-                }
-            }
-            > .el-select {
-                flex: 1;
-            }
-        }
-        .water-row {
-            color: rgba(0, 0, 0, 0.1);
-            display: flex;
-            gap: 2px;
-            > .el-input {
-                flex: 1;
-            }
-        }
-
-        ::v-deep {
-            .el-form-item__label {
-                color: rgba(29, 33, 41, 0.2);
-                font-size: 14px;
-            }
-            .el-form-item--default {
-                margin-bottom: 16px;
-            }
-            .el-select__input {
-                color: #2199f8;
-            }
-            .el-select__wrapper {
-                // height: 30px;
-                color: #2199f8;
-                min-height: 30px;
-                line-height: 28px;
-                box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-            }
-            .el-select__caret {
-                color: #2199f8;
-            }
-            .el-select__placeholder {
-                color: #2199f8;
-            }
-            .el-radio {
-                margin-right: 16px;
-            }
-            .has-border,
-            .el-cascader {
-                .el-input__wrapper {
-                    box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-                }
-            }
-            .el-tag.el-tag--info {
-                --el-tag-text-color: #2199f8;
-                --el-tag-bg-color: rgba(33, 153, 248, 0.1);
-            }
-            .el-input__wrapper {
-                box-shadow: none;
-            }
-            .el-input__inner {
-                color: #2199f8;
-                --el-input-placeholder-color: rgba(33, 153, 248, 0.43);
-            }
-            .el-input-group__append {
-                padding: 0 6px;
-                background: none;
-                box-shadow: none;
-            }
-            .el-input-group__append {
-                color: rgba(33, 153, 248, 0.5);
-            }
-            .input-unit {
-                .el-input {
-                    border: 1px solid rgba(33, 153, 248, 0.3);
-                    border-radius: 5px;
-                    height: 30px;
-                    box-sizing: border-box;
-                }
-                .el-input__wrapper {
-                    padding: 0 2px 0 10px;
-                    height: 28px;
-                    line-height: 28px;
-                    min-height: 28px;
-                }
-                .el-input__inner {
-                    --el-input-inner-height: 28px;
-                    height: 28px;
-                    line-height: 28px;
-                    min-height: 28px;
-                    color: #2199f8;
-                    --el-input-placeholder-color: rgba(33, 153, 248, 0.43);
-                }
-            }
-        }
-    }
-
-    .page-action {
-        position: fixed;
-        left: 0;
-        right: 0;
-        bottom: 0;
-        padding: 12px 12px;
-        background: #fff;
-        box-shadow: 2px 2px 4.5px rgba(0, 0, 0, 0.4);
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        .btn-item {
-            height: 40px;
-            line-height: 41px;
-            border-radius: 20px;
-            width: fit-content;
-            padding: 0 20px;
-            color: #666666;
-            font-size: 14px;
-            &.del {
-                color: #ff943d;
-                background: rgba(255, 148, 61, 0.1);
-            }
-            &.cancel {
-                border: 1px solid rgba(153, 153, 153, 0.5);
-            }
-            &.primary {
-                color: #fff;
-                background: linear-gradient(#76c3ff, #2199f8);
-            }
-        }
-        .btn-right {
-            display: flex;
-            gap: 10px;
-        }
-    }
-}
-</style>
-
-<style lang="scss">
-// 针对特定作用域设置
-.edit-price {
-    --van-field-placeholder-text-color: rgba(33, 153, 248, 0.43);
-}
-</style>

+ 0 - 379
src/views/old_mini/offer_price/component/fertilizerPrice.vue

@@ -1,379 +0,0 @@
-<template>
-    <div class="fertilizer-price">
-        <search v-model="searchVal" clearable @clear="handleClear" @change="handleChange" placeholder="搜索药肥" />
-        <div class="record-filter">
-            <div
-                class="filter-item"
-                v-for="(item, index) in filterType"
-                :key="index"
-                @click="handlePlanClick(index, item.id)"
-                :class="{ active: activePlanIndex === index }"
-            >
-                {{ item.name }}
-            </div>
-        </div>
-        <div class="fertilizer-list">
-            <list
-                v-model:loading="loading"
-                :finished="finished"
-                finished-text="没有更多了"
-                @load="onLoad"
-                >
-                <div class="fertilizer-card" @click.stop="handleEdit(item)" v-for="(item, index) in priceList" :key="index">
-                    <div class="card-header">
-                        <div class="title">{{ item.name }}</div>
-                        <div class="action-btn">
-                            <el-icon @click.stop="handleEdit(item)" color="#2199F8" size="18"><Edit /></el-icon>
-                            <!-- <el-icon @click.stop="openDelete" color="#E04C4C" size="18"><Delete /></el-icon> -->
-                        </div>
-                    </div>
-                    <div class="info">
-                        <div class="row">
-                            <span class="label">药物品牌</span>
-                            <span class="value">{{ item.brand || "--" }}</span>
-                        </div>
-                        <div class="row">
-                            <span class="label">药肥类型</span>
-                            <span class="value">{{ item.typeName }}</span>
-                        </div>
-                        <div class="row">
-                            <span class="label">施用方式</span>
-                            <span class="value">{{ getArrText(item.usageModeList) }}</span>
-                        </div>
-                        <transition name="collapse">
-                            <div class="extra-info" v-show="isExpanded(index)">
-                                <div class="row">
-                                    <span class="label">计量单位</span>
-                                    <span class="value">{{ item.unit }}</span>
-                                </div>
-                                <div class="row">
-                                    <span class="label">单位兑水量</span>
-                                    <span class="value">{{ item.unitWaterAmount }}{{ item.unit }}<span>-</span>{{ item.unitWaterAmountMax }}{{ item.unit }}</span>
-                                </div>
-                                <div class="row">
-                                    <span class="label">适用品类</span>
-                                    <span class="value tag-group" v-if="item.speciesList && item.speciesList.length > 0">
-                                        <span class="tag-item">{{ getArrNameText(item.speciesList) }}</span>
-                                    </span>
-                                    <span class="value" v-else>--</span>
-                                </div>
-                            </div>
-                        </transition>
-                    </div>
-                    <div class="expand" @click.stop="toggleExpand(index)">
-                        <span>{{ isExpanded(index) ? '收起' : '展开更多' }}</span>
-                        <el-icon :class="{ rotate: isExpanded(index) }"><ArrowDown /></el-icon>
-                    </div>
-                    <div class="stats">
-                        <div class="col">
-                            <div class="num">{{ item.cost }}<span class="unit">元/{{ item.unit }}</span></div>
-                            <div class="desc">成本</div>
-                        </div>
-                        <div class="col">
-                            <div class="num">{{ item.price }}<span class="unit">元/{{ item.unit }}</span></div>
-                            <div class="desc">报价</div>
-                        </div>
-                        <div class="col">
-                            <div class="num">{{ item.stock }}<span class="unit">{{ item.unit }}</span></div>
-                            <div class="desc">库存</div>
-                        </div>
-                    </div>
-                </div>
-            </list>
-            <div class="page-action">
-                <div class="btn-primary" @click="handleAdd">新增药肥报价</div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { ref, onMounted, onActivated } from "vue";
-import { Search, List } from 'vant';
-import { useRouter } from "vue-router";
-import { ElMessageBox } from 'element-plus'
-
-const router = useRouter();
-const searchVal = ref("");
-
-const filterType = ref(["全部"]);
-
-const activePlanIndex = ref(0);
-// 记录已展开卡片索引的集合
-const expandedSet = ref(new Set());
-
-const priceList = ref([]);
-
-onMounted(() => {
-    fetchPesticideCount()
-});
-
-onActivated(() => {
-    getFertilizerList();
-});
-
-const fetchPesticideCount = () => {
-    VE_API.z_farm_work_pesticide_fertilizer.firstLevelOptions({}, { skipMessage: true }).then((res) => {
-        if (res.code === 0) {
-            filterType.value = [{ name: "全部", id: null }, ...res.data] || [];
-            getFertilizerList();
-        }
-    });
-};
-
-const handlePlanClick = (index, id) => {
-    activePlanIndex.value = index;
-    getFertilizerList(1, false, id);
-};
-const isExpanded = (index) => expandedSet.value.has(index);
-const toggleExpand = (index) => {
-    const next = new Set(expandedSet.value);
-    if (next.has(index)) {
-        next.delete(index);
-    } else {
-        next.add(index);
-    }
-    expandedSet.value = next;
-};
-const handleEdit = (item) => {
-    router.push({
-        path: "/edit_price",
-        query: { id: item.id }
-    });
-};
-
-const getArrText = (arr) => {
-    return arr && arr.length > 0 ? arr.map(item => item).join('、') : '--';
-}
-
-const getArrNameText = (arr) => {
-    return arr && arr.length > 0 ? arr.map(item => item.name).join('、') : '--';
-}
-
-const openDelete = () => {
-  ElMessageBox.confirm(
-    '确认要删除该报价吗?',
-    '提示',
-    {
-      confirmButtonText: '确认',
-      cancelButtonText: '取消',
-      type: 'warning',
-    }
-  )
-    .then(() => {
-    })
-    .catch(() => {
-    })
-}
-const handleAdd = () => {
-    router.push({
-        path: "/edit_price",
-        query: { isAdd: true }
-    });
-};
-
-// 滚动加载
-const loading = ref(false);
-const finished = ref(false);
-const currentPage = ref(1);
-const pageSize = ref(10);
-const getFertilizerList = (page = 1, isLoadMore = false, id = null) => {
-    loading.value = true;
-    // 首次加载或切换筛选时,需要重置 finished
-    if (!isLoadMore && page === 1) {
-        finished.value = false;
-    }
-    VE_API.z_farm_work_pesticide_fertilizer.fertilizerList({
-        name: searchVal.value,
-        page: page,
-        limit: pageSize.value,
-        typeId: id,
-    }).then(({ data }) => {
-        const list = Array.isArray(data) ? data : (data?.list || []);
-        if (isLoadMore) {
-            priceList.value = [...priceList.value, ...list];
-        } else {
-            priceList.value = list;
-        }
-        // 如果返回为空数组或少于分页大小,标记为已加载完成,避免继续触发请求
-        if (!Array.isArray(list) || list.length === 0 || list.length < pageSize.value) {
-            finished.value = true;
-        }
-        loading.value = false;
-    })
-    .finally(() => {
-        loading.value = false;
-    });
-}
-const onLoad = () => {
-    if (finished.value) return;
-
-    currentPage.value += 1;
-    getFertilizerList(currentPage.value, true);
-};
-const handleClear = () => {
-    currentPage.value = 1;
-    priceList.value = [];
-    getFertilizerList();
-};
-const handleChange = () => {
-    currentPage.value = 1;
-    priceList.value = [];
-    getFertilizerList();
-};
-</script>
-
-<style lang="scss" scoped>
-.fertilizer-price {
-    ::v-deep {
-        .van-search {
-            background: #F5F7FB;
-            .van-search__content {
-                background: #FFFFFF;
-                border-radius: 16px;
-            }
-        }
-    }
-    .record-filter {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        padding: 5px 0;
-        .filter-item {
-            color: rgba(0, 0, 0, 0.5);
-            padding: 0 16px;
-            height: 32px;
-            line-height: 32px;
-            border-radius: 20px;
-            color: #8B8B8B;
-            &.active {
-                color: #fff;
-                background: #2199F8;
-            }
-        }
-        .filter-item + .filter-item {
-            margin-left: 8px;
-        }
-    }
-    .fertilizer-list {
-        padding: 8px 12px 80px;
-        .fertilizer-card {
-            margin-bottom: 10px;
-            background: #FFFFFF;
-            border-radius: 8px;
-            // box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
-            padding: 12px 10px;
-            .card-header {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                .title {
-                    font-size: 16px;
-                    font-weight: 600;
-                    color: #000;
-                }
-                .action-btn {
-                    display: flex;
-                    gap: 10px;
-                }
-            }
-            .info {
-                padding-top: 4px;
-                border-top: 1px solid #F5F5F5;
-                margin-top: 8px;
-                font-size: 14px;
-                .row {
-                    display: flex;
-                    align-items: center;
-                    padding: 4px 0;
-                    .label {
-                        width: 80px;
-                        color: rgba(0, 0, 0, 0.2);
-                        flex-shrink: 0;
-                    }
-                    .value {
-                        color: #767676;
-                    }
-                }
-                .extra-info {
-                    overflow: hidden;
-                }
-            }
-            .tag-group {
-                display: flex;
-                align-items: center;
-                gap: 4px;
-                .tag-item {
-                    font-size: 12px;
-                    color: #2199F8;
-                    background: #E8F3FF;
-                    border-radius: 2px;
-                    padding: 0 8px;
-                    height: 20px;
-                    line-height: 20px;
-                }
-            }
-            .expand {
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                color: rgba(0, 0, 0, 0.2);
-                font-size: 12px;
-                margin: 6px 0 12px;
-                span { margin-right: 4px; }
-                cursor: pointer;
-                .el-icon { transition: transform .3s ease; }
-                .el-icon.rotate { transform: rotate(180deg); }
-            }
-            .stats {
-                display: flex;
-                align-items: stretch;
-                justify-content: space-between;
-                background: rgba(33, 153, 248, 0.1);
-                border: 1px solid rgba(33, 153, 248, 0.2);
-                border-radius: 10px;
-                padding: 10px 8px;
-                font-size: 14px;
-                .col {
-                    flex: 1;
-                    text-align: center;
-                    .num {
-                        color: #2199F8;
-                        font-weight: 600;
-                        font-size: 16px;
-                        .unit { padding-left: 2px; font-size: 12px; font-weight: 400; color: rgba(0, 0, 0, 0.5); }
-                    }
-                    .desc { color: #000; margin-top: 4px; }
-                }
-                .col + .col { border-left: 1px solid rgba(33, 153, 248, 0.4); }
-            }
-        }
-        .page-action {
-            position: fixed;
-            left: 0; right: 0; bottom: 0;
-            padding: 10px 16px;
-            background: #fff;
-            box-shadow: 2px 2px 4.5px rgba(0, 0, 0, 0.4);
-            .btn-primary {
-                margin: 0 auto;
-                height: 40px;
-                line-height: 40px;
-                border-radius: 20px;
-                width: fit-content;
-                padding: 0 20px;
-                color: #fff;
-                font-size: 14px;
-                background: linear-gradient(#76C3FF, #2199F8);
-            }
-        }
-    }
-}
-
-/* 折叠动画:使用 max-height + 透明度 以获得平滑过渡 */
-.collapse-enter-active,
-.collapse-leave-active { transition: max-height .3s cubic-bezier(0.4, 0, 0.2, 1), opacity .3s cubic-bezier(0.4, 0, 0.2, 1); }
-.collapse-enter-from,
-.collapse-leave-to { max-height: 0; opacity: 0; }
-.collapse-enter-to,
-.collapse-leave-from { max-height: 90px; opacity: 1; }
-</style>

+ 0 - 252
src/views/old_mini/offer_price/component/servicePrice.vue

@@ -1,252 +0,0 @@
-<template>
-    <div class="service-price">
-        <div class="service-form">
-            <div class="service-form-title">服务报价</div>
-            <el-form ref="formRef" :model="form" label-width="86px">
-                <el-form-item label="人工服务" prop="manualServicePrice" class="input-unit">
-                    <el-input v-if="isEdit" v-model="form.manualServicePrice" type="number" step="0.01" placeholder="请输入数字">
-                        <template #append>元/亩</template>
-                    </el-input>
-                    <div v-else class="service-form-value">
-                        {{ form.manualServicePrice || "--" }}<span class="unit" v-if="form.manualServicePrice">元/亩</span>
-                    </div>
-                </el-form-item>
-                <el-form-item label="无人机服务" prop="uavServicePrice" class="input-unit">
-                    <el-input v-if="isEdit" v-model="form.uavServicePrice" type="number" step="0.01" placeholder="请输入数字">
-                        <template #append>元/亩</template>
-                    </el-input>
-                    <div v-else class="service-form-value">
-                        {{ form.uavServicePrice || "--" }}<span class="unit" v-if="form.uavServicePrice">元/亩</span>
-                    </div>
-                </el-form-item>
-            </el-form>
-        </div>
-        <div class="page-action" v-if="isEdit">
-            <div class="btn-item cancel" @click="handleCancel">取消</div>
-            <div class="btn-right">
-                <div class="btn-item primary" @click="handleSave">保存服务报价</div>
-            </div>
-        </div>
-        <div class="page-action" v-else>
-            <div class="btn-item primary center-btn" @click="handleEdit">编辑服务报价</div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { ref, reactive, onMounted, onActivated } from "vue";
-import { ElMessage } from "element-plus";
-
-// 表单模型与选项
-const formRef = ref();
-const form = reactive({
-    manualServicePrice: null,
-    uavServicePrice: null,
-});
-
-// 保存原始值,用于取消编辑时恢复
-const originalForm = reactive({
-    manualServicePrice: null,
-    uavServicePrice: null,
-});
-
-const isEdit = ref(false);
-const loading = ref(false);
-
-// 获取服务报价
-const getServicePrice = () => {
-    loading.value = true;
-    VE_API.z_agricultural_store
-        .service_price()
-        .then((res) => {
-            if (res.code === 0 && res.data) {
-                form.manualServicePrice = res.data.manualServicePrice || null;
-                form.uavServicePrice = res.data.uavServicePrice || null;
-                // 保存原始值
-                originalForm.manualServicePrice = res.data.manualServicePrice || null;
-                originalForm.uavServicePrice = res.data.uavServicePrice || null;
-            }
-        })
-        .catch((error) => {
-            console.error("获取服务报价失败:", error);
-            ElMessage.error("获取服务报价失败");
-        })
-        .finally(() => {
-            loading.value = false;
-        });
-};
-
-// 保存服务报价
-const handleSave = () => {
-    // 表单验证
-    if (form.manualServicePrice === null || form.manualServicePrice === "" || form.uavServicePrice === null || form.uavServicePrice === "") {
-        ElMessage.warning("请填写完整信息");
-        return;
-    }
-
-    if (form.manualServicePrice < 0 || form.uavServicePrice < 0) {
-        ElMessage.warning("价格不能为负数");
-        return;
-    }
-
-    loading.value = true;
-    VE_API.z_agricultural_store
-        .updatePrice({
-            manualServicePrice: form.manualServicePrice,
-            uavServicePrice: form.uavServicePrice,
-        })
-        .then((res) => {
-            if (res.code === 0) {
-                ElMessage.success("保存成功");
-                // 更新原始值
-                originalForm.manualServicePrice = form.manualServicePrice;
-                originalForm.uavServicePrice = form.uavServicePrice;
-                // 退出编辑模式
-                isEdit.value = false;
-            } else {
-                ElMessage.error(res.message || "保存失败");
-            }
-        })
-        .catch((error) => {
-            console.error("保存失败:", error);
-            ElMessage.error("保存失败,请重试");
-        })
-        .finally(() => {
-            loading.value = false;
-        });
-};
-
-// 取消编辑
-const handleCancel = () => {
-    // 恢复原始值
-    form.manualServicePrice = originalForm.manualServicePrice;
-    form.uavServicePrice = originalForm.uavServicePrice;
-    // 退出编辑模式
-    isEdit.value = false;
-};
-
-// 进入编辑模式
-const handleEdit = () => {
-    isEdit.value = true;
-};
-
-onMounted(() => {
-    getServicePrice();
-});
-
-onActivated(() => {
-    // 页面激活时重新获取数据
-    getServicePrice();
-});
-</script>
-
-<style lang="scss" scoped>
-.service-price {
-    width: 100%;
-    height: 100%;
-
-    .service-form {
-        margin: 12px;
-        padding: 12px 12px 2px 12px;
-        background: #ffffff;
-        border-radius: 8px;
-        .service-form-title {
-            font-size: 16px;
-            color: #000000;
-            margin-bottom: 10px;
-        }
-        .service-form-value {
-            border: 1px solid rgba(24, 24, 24, 0.1);
-            border-radius: 5px;
-            padding: 0 10px;
-            width: 100%;
-            height: 30px;
-            line-height: 30px;
-            .unit {
-                color: rgba(0, 0, 0, 0.3);
-                padding-left: 8px;
-            }
-        }
-        ::v-deep {
-            .el-form-item__label {
-                color: rgba(0, 0, 0, 0.4);
-                font-size: 14px;
-            }
-            .el-form-item--default {
-                margin-bottom: 16px;
-            }
-            .el-input__wrapper {
-                box-shadow: none;
-            }
-            .el-input-group__append {
-                padding: 0 10px;
-                background: none;
-                box-shadow: none;
-                color: rgba(0, 0, 0, 0.3);
-            }
-            .input-unit {
-                .el-input {
-                    border: 1px solid rgba(24, 24, 24, 0.3);
-                    border-radius: 5px;
-                    height: 30px;
-                    box-sizing: border-box;
-                }
-                .el-input__wrapper {
-                    padding: 0 2px 0 10px;
-                    height: 28px;
-                    line-height: 28px;
-                    min-height: 28px;
-                }
-                .el-input__inner {
-                    --el-input-inner-height: 28px;
-                    height: 28px;
-                    line-height: 28px;
-                    min-height: 28px;
-                    color: #000000;
-                    // --el-input-placeholder-color: rgba(33, 153, 248, 0.43);
-                }
-            }
-        }
-    }
-
-    .page-action {
-        position: fixed;
-        left: 0;
-        right: 0;
-        bottom: 0;
-        padding: 12px 12px;
-        background: #fff;
-        box-shadow: 2px 2px 4.5px rgba(0, 0, 0, 0.4);
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        .btn-item {
-            height: 40px;
-            line-height: 41px;
-            border-radius: 20px;
-            width: fit-content;
-            padding: 0 20px;
-            color: #666666;
-            font-size: 14px;
-            &.del {
-                color: #ff943d;
-                background: rgba(255, 148, 61, 0.1);
-            }
-            &.cancel {
-                border: 1px solid rgba(153, 153, 153, 0.5);
-            }
-            &.primary {
-                color: #fff;
-                background: linear-gradient(#76c3ff, #2199f8);
-            }
-        }
-        .center-btn {
-            margin: 0 auto;
-        }
-        .btn-right {
-            display: flex;
-            gap: 10px;
-        }
-    }
-}
-</style>

+ 0 - 60
src/views/old_mini/offer_price/index.vue

@@ -1,60 +0,0 @@
-<template>
-    <div class="agri-services">
-        <custom-header name="报价维护"></custom-header>
-        <tabs v-model:active="active" class="tabs">
-            <tab title="药肥报价">
-                <fertilizer-price />
-            </tab>
-            <tab title="服务报价">
-                <service-price />
-            </tab>
-        </tabs>
-    </div>
-</template>
-
-<script setup>
-import { ref, onMounted } from "vue";
-import { Tab, Tabs } from "vant";
-import fertilizerPrice from "./component/fertilizerPrice.vue";
-import servicePrice from "./component/servicePrice.vue";
-import customHeader from "@/components/customHeader.vue";
-const active = ref(0);
-
-</script>
-<style lang="scss" scoped>
-.agri-services {
-    width: 100%;
-    height: 100vh;
-    .farm-dynamics-container {
-        ::v-deep{
-            .task-content{
-                height: calc(100% - 80px);
-            }
-        }
-    }
-    .tabs {
-        height: calc(100% - 40px);
-        ::v-deep {
-            .van-tabs__wrap {
-                margin-bottom: 8px;
-            }
-            .van-tabs__line {
-                width: 24px;
-                height: 4px;
-            }
-            .van-tab {
-                width: 100px;
-                flex: none;
-            }
-            .van-tabs__nav {
-                justify-content: center;
-            }
-            .van-tabs__content {
-                overflow: auto;
-                height: calc(100% - 44px);
-                background: #F5F7FB;
-            }
-        }
-    }
-}
-</style>

+ 0 - 567
src/views/old_mini/price_detail/index.vue

@@ -1,567 +0,0 @@
-<template>
-    <div class="price-detail">
-        <custom-header name="报价详情"></custom-header>
-        <div class="price-content">
-            <div class="box-wrap">
-                <div class="price-info">
-                    <div class="info-title">执行时间</div>
-                    <div class="info-val">
-                        <el-date-picker
-                            class="item-input"
-                            style="width: 132px"
-                            value-format="YYYY-MM-DD"
-                            v-model="executeDate"
-                            type="date"
-                            :clearable="false"
-                            placeholder="选择日期"
-                            :editable="false"
-                        />
-                    </div>
-                </div>
-                <div class="price-info">
-                    <div class="info-title">施肥方式</div>
-                    <div class="info-val">{{ detailData?.usageMode }}</div>
-                </div>
-            </div>
-            <div class="service-wrap">
-                <div class="medicine-box">
-                    <div class="item-title">服务费用</div>
-                    <div class="box-wrap">
-                        <div class="medicine-item">
-                            <div class="item-name">执行方式</div>
-                            <div class="item-val" v-if="detailData?.usageMode === '叶面施'">
-                                <el-select
-                                    class="select-item"
-                                    v-model="executionMethod"
-                                    placeholder="执行方式"
-                                    style="width: 132px"
-                                    @change="handleExecutionMethodChange"
-                                >
-                                    <el-option
-                                        v-for="(item, index) in modeList"
-                                        :key="index"
-                                        :label="item.name"
-                                        :value="item.value"
-                                    />
-                                </el-select>
-                            </div>
-                            <div class="item-val" v-else>人工</div>
-                        </div>
-                        <div class="medicine-item mt-8">
-                            <div class="item-name">亩单价</div>
-                            <div class="item-val">
-                                <!-- <el-input-number 
-                                     style="width: 132px"
-                                     placeholder="服务单价"
-                                     v-model="servicePricePerMu" 
-                                     :min="0.0001"
-                                 /> -->
-                                <!-- <span class="price-unit">元/亩</span> -->
-
-                                <el-input
-                                    style="width: 132px"
-                                    v-model="servicePricePerMu"
-                                    type="number"
-                                    step="0.01"
-                                    placeholder="服务单价"
-                                >
-                                    <template #append>元/亩</template>
-                                </el-input>
-                            </div>
-                        </div>
-                        <div class="medicine-item">
-                            <div class="item-name">亩数</div>
-                            <div class="item-val">{{ formatArea(detailData?.area) }}亩</div>
-                        </div>
-                        <div class="medicine-item">
-                            <div class="item-total">总计:</div>
-                            <div class="item-price">{{ getServiceTotal() }}<span class="item-unit">元</span></div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <div class="medicine-wrap">
-                <template v-for="(prescription, pIndex) in detailData?.prescriptionList" :key="pIndex">
-                    <div
-                        class="medicine-box"
-                        v-for="(pesticide, mIndex) in prescription.pesticideFertilizerList"
-                        :key="mIndex"
-                    >
-                        <div class="item-title">药肥{{ mIndex + 1 }}</div>
-                        <div class="box-wrap">
-                            <div class="medicine-item">
-                                <div class="item-name">药肥名称</div>
-                                <div class="item-val">{{ pesticide.pesticideFertilizerName }}</div>
-                            </div>
-                            <div class="medicine-item">
-                                <div class="item-name">药肥品牌</div>
-                                <div class="item-val">
-                                    <el-input v-model="pesticide.brand" placeholder="药肥品牌" style="width: 132px" />
-                                    <!-- <el-select
-                                        class="select-item"
-                                        v-model="pesticide.brand"
-                                        placeholder="药肥品牌"
-                                        style="width: 132px"
-                                    >
-                                        <el-option
-                                            v-for="(brand, bIndex) in brandList"
-                                            :key="bIndex"
-                                            :label="brand.name"
-                                            :value="brand.value"
-                                        />
-                                    </el-select> -->
-                                </div>
-                            </div>
-                            <div class="medicine-item mt-8">
-                                <div class="item-name">药肥单价</div>
-                                <div class="item-val">
-                                    <!-- <el-input-number
-                                        style="width: 132px"
-                                        placeholder="单价"
-                                        v-model="pesticide.price"
-                                        :min="0.0000000001"
-                                    /> -->
-                                    <!-- <span class="price-unit">元/{{ pesticide.unit }}</span> -->
-
-                                    <el-input
-                                        style="width: 132px"
-                                        v-model="pesticide.price"
-                                        type="number"
-                                        step="0.01"
-                                        placeholder="单价"
-                                    >
-                                        <template #append>元/{{ pesticide.unit }}</template>
-                                    </el-input>
-                                </div>
-                            </div>
-                            <div class="medicine-item">
-                                <div class="item-name">单亩用量</div>
-                                <div class="item-val">{{ getMuUsage(pesticide) }}{{ pesticide.unit }}</div>
-                            </div>
-                            <div class="medicine-item">
-                                <div class="item-name">亩数</div>
-                                <div class="item-val">{{ formatArea(detailData?.area) }}亩</div>
-                            </div>
-                            <div class="medicine-item">
-                                <div class="item-total">总计:</div>
-                                <div class="item-price">
-                                    {{ getPesticideTotal(pesticide) }}<span class="item-unit">元</span>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </template>
-            </div>
-        </div>
-        <div class="bottom-btn">
-            <div class="bottom-l">
-                合计:<span class="main-val">{{ getTotalCost() }}</span
-                >元
-            </div>
-            <div class="bottom-r" @click="confirmPrice">确认报价</div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import customHeader from "@/components/customHeader.vue";
-import { ElMessage } from "element-plus";
-import { ref, onMounted, onActivated, onBeforeUnmount, onDeactivated } from "vue";
-import { useRoute, useRouter } from "vue-router";
-import { formatArea } from "@/common/commonFun";
-
-const router = useRouter();
-const executeDate = ref(null);
-let query = useRoute().query;
-const detailData = ref(JSON.parse(query.data));
-const priceData = ref({});
-
-const servicePricePerMu = ref(null);
-const executionMethod = ref(null);
-const modeList = ref([
-    { name: "无人机", value: 1 },
-    { name: "人工", value: 2 },
-]);
-
-// 初始化数据
-onActivated(() => {
-    query = useRoute().query;
-    detailData.value = JSON.parse(query.data);
-    if (detailData.value.usageMode === "根部施") {
-        executionMethod.value = 2;
-    }
-    priceData.value = JSON.parse(query?.priceData || "{}");
-    executeDate.value = priceData.value.executeDate;
-
-    // 从 priceData 中匹配价格和品牌到对应的药肥
-    if (priceData.value?.itemsList && detailData.value?.prescriptionList) {
-        executionMethod.value = priceData.value.executionMethod;
-        if (detailData.value.usageMode === "根部施") {
-            executionMethod.value = 2;
-        }
-        detailData.value.prescriptionList.forEach((prescription) => {
-            if (prescription.pesticideFertilizerList) {
-                prescription.pesticideFertilizerList.forEach((pesticide) => {
-                    const priceItem = priceData.value.itemsList.find(
-                        (item) => item.pesticideFertilizerId === pesticide.pesticideFertilizerId
-                    );
-                    if (priceItem) {
-                        pesticide.price = Number(priceItem.price) || null;
-                        pesticide.brand = priceItem.brand || "";
-                    } else {
-                        pesticide.price = null;
-                        pesticide.brand = "";
-                    }
-                });
-            }
-        });
-    }
-
-    // 初始化服务费用
-    if (priceData.value?.farmWorkServiceCost && detailData.value?.area) {
-        servicePricePerMu.value = priceData.value.farmWorkServiceCost || null;
-    }
-});
-
-// 清空数据
-const clearData = () => {
-    executeDate.value = null;
-    detailData.value = {};
-    priceData.value = {};
-    servicePricePerMu.value = null;
-    executionMethod.value = null;
-};
-
-// 离开页面时清空数据
-onBeforeUnmount(() => {
-    clearData();
-});
-
-onDeactivated(() => {
-    clearData();
-});
-
-// 根据执行方式获取单亩用量:1=无人机用muUsage2,2=人工用muUsage
-const getMuUsage = (pesticide) => {
-    if (!pesticide) return 0;
-    // 如果是叶面施且有执行方式选择,根据执行方式判断
-    if (
-        detailData.value?.usageMode === "叶面施" &&
-        executionMethod.value !== null &&
-        executionMethod.value !== undefined
-    ) {
-        // 1 = 无人机,使用 muUsage2
-        if (executionMethod.value == 1) {
-            return pesticide.muUsage2 || pesticide.muUsage || 0;
-        }
-        // 2 = 人工,使用 muUsage
-        if (executionMethod.value == 2) {
-            return pesticide.muUsage || 0;
-        }
-    }
-    // 默认使用 muUsage(非叶面施的情况)
-    return pesticide.muUsage || 0;
-};
-
-// 计算单个药肥的总计:单价 * 单亩用量 * 亩数
-const getPesticideTotal = (pesticide) => {
-    const muUsage = getMuUsage(pesticide);
-    if (!pesticide.price || !muUsage || !detailData.value.area) return "0.00";
-    const total = (pesticide.price * muUsage * detailData.value.area).toFixed(2);
-    return total;
-};
-
-// 计算服务费用总计:亩单价 * 亩数
-const getServiceTotal = () => {
-    if (!servicePricePerMu.value || !detailData.value.area) return "0.00";
-    const total = (servicePricePerMu.value * detailData.value.area).toFixed(2);
-    return total;
-};
-
-// 计算总合计:所有药肥总计 + 服务费用总计
-const getTotalCost = () => {
-    let pesticideTotal = 0;
-    if (detailData.value.prescriptionList) {
-        detailData.value.prescriptionList.forEach((prescription) => {
-            if (prescription.pesticideFertilizerList) {
-                prescription.pesticideFertilizerList.forEach((pesticide) => {
-                    const muUsage = getMuUsage(pesticide);
-                    if (pesticide.price && muUsage && detailData.value.area) {
-                        pesticideTotal += pesticide.price * muUsage * detailData.value.area;
-                    }
-                });
-            }
-        });
-    }
-
-    const serviceTotal =
-        servicePricePerMu.value && detailData.value.area ? servicePricePerMu.value * detailData.value.area : 0;
-
-    return (pesticideTotal + serviceTotal).toFixed(2);
-};
-
-const confirmPrice = () => {
-    if (!executionMethod.value) {
-        ElMessage.error("请选择执行方式");
-        return;
-    }
-
-    // 检查服务费用是否有价格
-    if (!servicePricePerMu.value || servicePricePerMu.value <= 0) {
-        ElMessage.error("请填写服务费用");
-        return;
-    }
-
-    // 检查是否所有药肥都有价格和品牌
-    if (detailData.value?.prescriptionList) {
-        const emptyItems = [];
-        detailData.value.prescriptionList.forEach((prescription) => {
-            (prescription.pesticideFertilizerList || []).forEach((pesticide) => {
-                const pesticideName = pesticide.pesticideFertilizerName || "药肥";
-                const hasPrice = pesticide.price && pesticide.price > 0;
-                const hasBrand = pesticide.brand && pesticide.brand.trim() !== "";
-
-                if (!hasPrice || !hasBrand) {
-                    let errorMsg = "";
-                    if (!hasPrice && !hasBrand) {
-                        errorMsg = `${pesticideName}的品牌和单价`;
-                    } else if (!hasPrice) {
-                        errorMsg = `${pesticideName}的单价`;
-                    } else if (!hasBrand) {
-                        errorMsg = `${pesticideName}的品牌`;
-                    }
-                    emptyItems.push(errorMsg);
-                }
-            });
-        });
-
-        if (emptyItems.length > 0) {
-            ElMessage.error(`请填写${emptyItems[0]}`);
-            return;
-        }
-    }
-
-    const pesticideFertilizerQuoteList = [];
-    if (detailData.value?.prescriptionList) {
-        detailData.value.prescriptionList.forEach((prescription) => {
-            (prescription.pesticideFertilizerList || []).forEach((pesticide) => {
-                pesticideFertilizerQuoteList.push({
-                    pesticideFertilizerId: pesticide.pesticideFertilizerId,
-                    price: Number(pesticide.price || 0),
-                    brand: pesticide.brand || "",
-                });
-            });
-        });
-    }
-    const payload = {
-        farmWorkRecordId: detailData.value?.id,
-        pesticideFertilizerQuoteList,
-        executeDate: executeDate.value,
-        servicePrice: servicePricePerMu.value,
-        executionMethod: executionMethod.value,
-    };
-    VE_API.z_farm_work_record.acceptFarmWorkRecord(payload).then(({ data, code, msg }) => {
-        if (code === 0) {
-            ElMessage.success("确认报价成功");
-            // router.push({
-            //     path: "/task_condition",
-            // });
-            router.back();
-        } else {
-            ElMessage.error(msg);
-        }
-    });
-};
-
-const handleExecutionMethodChange = (val) => {
-    if (val == 1) {
-        servicePricePerMu.value = priceData.value.uavServicePrice;
-    } else {
-        servicePricePerMu.value = priceData.value.manualServicePrice;
-    }
-};
-</script>
-
-<style lang="scss" scoped>
-.price-detail {
-    height: 100vh;
-    position: relative;
-    font-size: 14px;
-    background: #f2f3f5;
-    color: #000;
-    .price-content {
-        padding: 12px;
-        box-sizing: border-box;
-        height: calc(100% - 40px - 74px);
-        overflow: auto;
-        ::v-deep {
-            .el-input__wrapper,
-            .el-select__wrapper {
-                box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
-            }
-            .el-input__inner {
-                color: #2199f8;
-                text-align: center;
-            }
-            .el-select__placeholder {
-                color: #2199f8;
-                &.is-transparent {
-                    color: rgba(33, 153, 248, 0.6);
-                }
-                text-align: center;
-            }
-            .el-input__prefix {
-                color: #2199f8;
-            }
-            .el-select__caret {
-                color: #2199f8;
-            }
-            .el-input {
-                --el-input-placeholder-color: rgba(33, 153, 248, 0.6);
-            }
-            .el-input-number__decrease,
-            .el-input-number__increase {
-                display: none;
-            }
-            .el-input-number .el-input__wrapper {
-                padding-left: 12px;
-                padding-right: 12px;
-            }
-        }
-    }
-    .box-wrap {
-        background: #fff;
-        padding: 10px;
-        border-radius: 8px;
-    }
-    .price-info {
-        height: 32px;
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        .info-val {
-            color: #474747;
-            width: 132px;
-            text-align: center;
-        }
-    }
-    .price-info + .price-info {
-        padding-top: 6px;
-    }
-
-    .medicine-box {
-        padding-top: 10px;
-        .item-title {
-            padding-left: 5px;
-            font-size: 16px;
-            color: #000000;
-            font-weight: 500;
-            padding-bottom: 10px;
-        }
-        .medicine-item {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            height: 32px;
-            .item-name {
-                color: rgba(0, 0, 0, 0.4);
-            }
-            .item-val {
-                min-width: 142px;
-                text-align: center;
-                color: #474747;
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                gap: 4px;
-                .price-unit {
-                    font-size: 12px;
-                    color: rgba(0, 0, 0, 0.4);
-                    white-space: nowrap;
-                }
-                ::v-deep {
-                    .el-input__wrapper {
-                        box-shadow: none;
-                    }
-                    .el-input-group__append {
-                        padding: 0 10px;
-                        background: none;
-                        box-shadow: none;
-                    }
-                    .el-input-group__append {
-                        color: rgba(33, 153, 248, 0.5);
-                    }
-                    .el-input {
-                        border: 1px solid rgba(33, 153, 248, 0.3);
-                        border-radius: 5px;
-                        height: 30px;
-                        box-sizing: border-box;
-                    }
-                    .el-input__wrapper {
-                        padding: 0 2px 0 10px;
-                        height: 28px;
-                        line-height: 28px;
-                        min-height: 28px;
-                    }
-                    .el-input__inner {
-                        --el-input-inner-height: 28px;
-                        height: 28px;
-                        line-height: 28px;
-                        min-height: 28px;
-                        color: #2199f8;
-                        --el-input-placeholder-color: rgba(33, 153, 248, 0.43);
-                    }
-                }
-            }
-            .item-total {
-                font-size: 16px;
-                color: #000;
-            }
-            .item-price {
-                color: #2199f8;
-                font-size: 20px;
-                font-weight: bold;
-                .item-unit {
-                    font-size: 14px;
-                    font-weight: normal;
-                    padding-left: 2px;
-                    color: #474747;
-                }
-            }
-        }
-        .medicine-item + .medicine-item {
-            padding-top: 2px;
-        }
-        .mt-8 {
-            margin-top: 8px;
-        }
-    }
-
-    .bottom-btn {
-        height: 74px;
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        background: #fff;
-        padding: 12px;
-        box-sizing: border-box;
-        box-shadow: 0 -1px 11px rgba(0, 0, 0, 0.1);
-        .bottom-l {
-            color: #000000;
-            font-size: 16px;
-            .main-val {
-                color: #2199f8;
-                font-size: 24px;
-                font-weight: bold;
-                padding-right: 4px;
-            }
-        }
-        .bottom-r {
-            background: linear-gradient(136deg, #9fd5ff, #2199f8);
-            padding: 8px 32px;
-            border-radius: 20px;
-            color: #fff;
-        }
-    }
-}
-</style>

+ 0 - 388
src/views/old_mini/report_detail/index.vue

@@ -1,388 +0,0 @@
-<template>
-    <div class="report-detail-page">
-        <custom-header name="农场报告" :isClose="!isMiniPage ? false : true"></custom-header>
-        <div class="report-content">
-            <div class="report-header" v-if="!showFilter">
-                <el-select class="header-item" v-model="value" placeholder="时间筛选" style="width: 240px">
-                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-                <el-select class="header-item" v-model="value1" placeholder="区域筛选" style="width: 240px">
-                    <el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-            </div>
-            <tabs v-model:active="active" class="tabs" scrollspy sticky offset-top="40" background="#f5f7fb">
-                <!-- <tab title="果园总览" class="tab-item">
-                    <div class="item-title">果园总览</div>
-                    <div class="item-content">
-                        <div class="item-text">果园面积共XX亩,共有XX棵生产树。</div>
-                        <div class="item-text">
-                            本次飞巡拍摄了XX张照片,包括了XX棵树,目前为施用根部有机肥阶段,根据树体冠幅大小,果园预计施用有机肥XXkg。
-                        </div>
-                        <div class="item-text">
-                            目前XX%的树体暂未萌动新梢,需要进行剪枝农事,提高树体光合效率与通风效率。
-                        </div>
-                    </div>
-                    <div class="item-content">
-                        <div class="photo-list">
-                            <div class="img-item" v-for="(item, index) in 6" :key="index">
-                                <img
-                                    class="photo-item"
-                                    src="https://birdseye-img-ali-cdn.sysuimars.com/16926861-1e20-4cbd-8bf2-90208db5a2d0/806080da-1a30-4b5b-b64b-b22e722c6cb6/DJI_202509010800_001_806080da-1a30-4b5b-b64b-b22e722c6cb6/DJI_20250901080536_0045_V_code-ws0fsmge97gh.jpeg"
-                                    alt=""
-                                />
-                            </div>
-                        </div>
-                        <div class="list-text" @click="handleSeeMore">点击查看更多</div>
-                    </div>
-                </tab> -->
-                <!-- <tab title="整体园相" class="tab-item">
-                    <div class="item-title">整体园相</div>
-                    <div class="item-content">
-                        <div class="item-name">透光率</div>
-                        <div class="item-value">
-                            透光率体现树体自身郁闭程度,当前XX%的树体透光性较差,可能造成整体减产XX%,需立即执行剪枝农事;XX%的树体透光正常,建议继续保持现有管理措施并及时巡园。
-                        </div>
-                    </div>
-                    <div class="item-content">
-                        <div class="item-name">通风率</div>
-                        <div class="item-value">
-                            透光率体现树体自身郁闭程度,当前XX%的树体透光性较差,可能造成整体减产XX%,需立即执行剪枝农事;XX%的树体透光正常,建议继续保持现有管理措施并及时巡园。
-                        </div>
-                        <div class="map-wrap">
-                            <img class="map-img" src="@/assets/img/home/map.png" alt="" />
-                            <div class="map-text">剪枝农事地图</div>
-                        </div>
-                    </div>
-                </tab> -->
-                <tab title="营养管理" class="tab-item">
-                    <div class="item-title">营养管理</div>
-                    <template v-if="nutritionManagementInfo && nutritionManagementInfo.length > 0">
-                        <div class="item-content" v-for="item in nutritionManagementInfo" :key="item.id">
-                            <!-- <div class="item-name">根肥</div> -->
-                            <div class="item-value">
-                                {{ item.content.renderedContent }}
-                            </div>
-                            <!-- <div class="map-wrap">
-                            <img class="map-img" src="@/assets/img/home/map.png" alt="" />
-                            <div class="map-text">根肥农事地图</div>
-                        </div> -->
-                        </div>
-                    </template>
-                    <div class="item-content" v-else>暂无数据</div>
-                </tab>
-                <tab title="病虫管理" class="tab-item">
-                    <div class="item-title">病虫管理</div>
-                    <template v-if="pestManagementInfo && pestManagementInfo.length > 0">
-                        <div class="item-content" v-for="item in pestManagementInfo" :key="item.id">
-                            <div class="item-value">
-                                {{ item.content.renderedContent }}
-                            </div>
-                            <!-- <div class="map-wrap">
-                            <img class="map-img" src="@/assets/img/home/map.png" alt="" />
-                            <div class="map-text">防虫农事地图</div>
-                        </div> -->
-                        </div>
-                    </template>
-                    <div class="item-content" v-else>暂无数据</div>
-                </tab>
-                <tab title="农事记录" class="tab-item">
-                    <div class="item-title">农事记录</div>
-                    <template v-if="contentData && contentData.length > 0">
-                        <div v-for="(section, index) in contentData" :key="index" class="item-farm">
-                            <record-item
-                                :record-item-data="section"
-                                content-mode="serviceDetail"
-                                title-mode="default"
-                                class="recipe-item"
-                                titleRightDotText="全区"
-                                titleRightType="dot"
-                                showFarmImage
-                                @click="handleClick(section, index)"
-                            >
-                            </record-item>
-                        </div>
-                        <div class="view-more" @click.stop="handleSeeMore">查看更多</div>
-                    </template>
-                    <div class="item-content" v-else>暂无数据</div>
-                </tab>
-            </tabs>
-        </div>
-        <!-- 底部 -->
-        <div class="custom-bottom-fixed-btns">
-            <!-- <div class="bottom-btn secondary-btn" @click="sharePopup">保存报告</div> -->
-            <div class="bottom-btn primary-btn" @click="shareReport">转发报告</div>
-        </div>
-    </div>
-    <!-- 报告弹窗 -->
-    <report-popup ref="reportPopupRef"></report-popup>
-</template>
-
-<script setup>
-import customHeader from "@/components/customHeader.vue";
-import { Tab, Tabs } from "vant";
-import wx from "weixin-js-sdk";
-import { ref, onMounted } from "vue";
-import recordItem from "@/components/recordItem.vue";
-import reportPopup from "@/components/reportPopup.vue";
-import { useRouter, useRoute } from "vue-router";
-
-const route = useRoute();
-const farmId = ref(null);
-const isMiniPage = ref(false);
-const showFilter = ref(false);
-onMounted(() => {
-    const pageParams = route.query.miniJson ? JSON.parse(route.query.miniJson) : {};
-    if(pageParams.farmId){
-        farmId.value = pageParams.farmId;
-    }
-    if(pageParams.goBack){
-        isMiniPage.value = true;
-    }
-    if(pageParams.paramsPage){
-        const paramsPage = JSON.parse(pageParams.paramsPage);
-        if(paramsPage.showFilter){
-            showFilter.value = true;
-        }
-    }
-    if(pageParams.showFilter){
-        showFilter.value = true;
-    }
-    getFarmSpeakInfo();
-    getFarmWorkList();
-});
-
-const pestManagementInfo = ref([]);
-const nutritionManagementInfo = ref([]);
-
-const getFarmSpeakInfo = () => {
-    VE_API.monitor.getFarmSpeakInfo({ farmId: farmId.value, code: "病虫管理" }).then((res) => {
-        pestManagementInfo.value = res.data || [];
-    });
-
-    VE_API.monitor.getFarmSpeakInfo({ farmId: farmId.value, code: "营养管理" }).then((res) => {
-        nutritionManagementInfo.value = res.data || [];
-    });
-};
-
-const contentData = ref([]);
-const getFarmWorkList = () => {
-    const params = {
-        farmId: farmId.value,
-        flowStatus: 5,
-        page: 1,
-        limit: 5,
-    };
-    VE_API.user.getDetailList(params).then((res) => {
-        contentData.value = res.data || [];
-    });
-};
-
-const router = useRouter();
-
-const value = ref("");
-const options = [];
-const value1 = ref("");
-const options1 = [
-    {
-        value: "Option1",
-        label: "全区",
-    },
-];
-
-const active = ref(0);
-
-const reportPopupRef = ref(null);
--+
-function sharePopup() {
-    reportPopupRef.value.handleShow();
-}
-
-const handleSeeMore = () => {
-    router.push("/review-results?farmId=" + farmId.value);
-};
-
-const handleClick = (section) => {
-    router.push({
-        path: "/review_work",
-        query: {
-            miniJson: JSON.stringify({ id: section.id, goBack: true }),
-        },
-    });
-};
-
-const shareReport = () => {
-    const query = {
-        askInfo: { title: "分享报告", content: "是否分享该报告给好友" },
-        shareText: "我分享了农场报告,快来查看吧~",
-        farmId: farmId.value,
-        targetUrl: `farm_report`,
-        goBack: true,
-        paramsPage: JSON.stringify({
-            showFilter: showFilter.value,
-        }),
-        imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/share-report-bg.png',
-    };
-    wx.miniProgram.navigateTo({
-        url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
-    });
-};
-</script>
-
-<style lang="scss" scoped>
-.report-detail-page {
-    width: 100%;
-    height: 100vh;
-    background-color: #f5f7fb;
-    .report-content {
-        height: calc(100% - 40px - 76px);
-        overflow: auto;
-        padding: 12px;
-        box-sizing: border-box;
-        .report-header {
-            display: flex;
-            align-items: center;
-            gap: 10px;
-            margin-bottom: 16px;
-            .header-item {
-                flex: 1;
-                ::v-deep {
-                    .el-select__wrapper {
-                        padding: 5px 0;
-                        justify-content: center;
-                        background: #fff;
-                    }
-                    .el-select__selection {
-                        flex: none;
-                        width: fit-content;
-                    }
-                    .el-select__placeholder {
-                        position: static;
-                        transform: none;
-                        width: fit-content;
-                        color: #4e5969;
-                    }
-                    .el-select__caret {
-                        color: #4e5969;
-                    }
-                }
-            }
-        }
-        .tabs {
-            ::v-deep {
-                .van-tabs__nav {
-                    height: 70%;
-                    .van-tab {
-                        border-bottom: 2px solid #e5e6eb;
-                    }
-                    .van-tab--active {
-                        color: #2199f8;
-                        border-bottom: 2px solid #2199f8;
-                    }
-                }
-                .van-tabs__line {
-                    display: none;
-                }
-            }
-            .tab-item {
-                border-radius: 14px;
-                padding: 12px;
-                background: #fff;
-                color: #171717;
-
-                .item-title {
-                    font-size: 16px;
-                    font-weight: 500;
-                    text-align: center;
-                    position: relative;
-                    &::before {
-                        content: "";
-                        position: absolute;
-                        left: 50%;
-                        transform: translateX(-50%);
-                        bottom: -1px;
-                        width: 66px;
-                        height: 8px;
-                        background: rgba(33, 153, 248, 0.3);
-                        border-radius: 4px;
-                    }
-                }
-                .item-content {
-                    margin-top: 12px;
-                    border-radius: 8px;
-                    background: rgba(238, 238, 238, 0.3);
-                    padding: 10px;
-                    line-height: 21px;
-                    .photo-list {
-                        display: flex;
-                        align-items: center;
-                        width: 100%;
-                        overflow: auto;
-                        padding-bottom: 10px;
-                        .photo-item {
-                            width: 92px;
-                            height: 92px;
-                            border-radius: 8px;
-                            object-fit: cover;
-                        }
-                        .img-item + .img-item {
-                            margin-left: 12px;
-                        }
-                    }
-                    .list-text {
-                        text-align: center;
-                        color: rgba(0, 0, 0, 0.5);
-                        padding-top: 2px;
-                    }
-                    .item-name {
-                        font-weight: 500;
-                    }
-                    .item-value {
-                        font-size: 12px;
-                        color: rgba(23, 23, 23, 0.6);
-                    }
-                    .map-wrap {
-                        margin-top: 10px;
-                        .map-img {
-                            width: 100%;
-                            height: 137px;
-                        }
-                        .map-text {
-                            font-size: 12px;
-                            color: rgba(23, 23, 23, 0.6);
-                            text-align: center;
-                            margin-top: 5px;
-                        }
-                    }
-                    .item-text + .item-text {
-                        margin-top: 5px;
-                    }
-                }
-                .item-farm {
-                    margin-top: 10px;
-                    ::v-deep {
-                        .record-item {
-                            margin: 0;
-                            padding: 10px;
-                            background: rgba(238, 238, 238, 0.3);
-                        }
-                    }
-                }
-                .view-more {
-                    margin-top: 10px;
-                    text-align: center;
-                }
-            }
-            .tab-item + .tab-item {
-                margin-top: 10px;
-            }
-        }
-    }
-    .custom-bottom-fixed-btns {
-        justify-content: center;
-        padding: 16px 12px 20px 12px;
-        .primary-btn {
-            padding: 10px 50px;
-        }
-    }
-}
-</style>

+ 0 - 240
src/views/old_mini/service_manage/index.vue

@@ -1,240 +0,0 @@
-<template>
-    <div class="service-manage">
-        <custom-header name="服务维护"></custom-header>
-        <ServiceInfo 
-            ref="serviceInfoRef"
-            v-model:crops="crops"
-            v-model:serviceTypes="serviceTypes"
-            v-model:machines="machines"
-            v-model:isEdit="isEdit"
-        />
-        
-        <div class="page-action" v-if="isEdit">
-            <div class="btn-item cancel" @click="isEdit = false">取消</div>
-            <div class="btn-right">
-                <div class="btn-item primary" @click="handleSave">保存服务类型</div>
-            </div>
-        </div>
-        <div class="page-action" v-else>
-            <div class="btn-item primary center-btn" @click="isEdit = true">编辑服务类型</div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { ref, onMounted, onActivated, watch } from "vue";
-import customHeader from "@/components/customHeader.vue";
-import ServiceInfo from "@/components/pageComponents/ServiceInfo.vue";
-import { ElMessage } from "element-plus";
-
-const isEdit = ref(false);
-const serviceInfoRef = ref(null);
-
-// 默认数据
-const defaultCrops = [
-    { name: "荔枝", isSelf: 0 },
-    { name: "水稻", isSelf: 0 },
-    { name: "菠萝", isSelf: 0 },
-    { name: "柚子", isSelf: 0 },
-    { name: "蔬菜", isSelf: 0 },
-    { name: "小麦", isSelf: 0 },
-];
-const defaultServiceTypes = [
-    { name: "嫁接", isSelf: 0 },
-    { name: "施肥打药", isSelf: 0 },
-    { name: "修剪", isSelf: 0 },
-];
-const defaultMachines = [
-    { name: "植保机", isSelf: 0 },
-    { name: "喷药车", isSelf: 0 },
-    { name: "收割机", isSelf: 0 }
-];
-
-// 三类数据:数组对象形式
-const crops = ref([]);
-const serviceTypes = ref([]);
-const machines = ref([]);
-
-// 将接口返回的字符串数组转换为对象数组(默认显示时使用)
-function convertApiDataToItems(apiList) {
-    if (!Array.isArray(apiList)) {
-        return [];
-    }
-    return apiList.map(item => {
-        const name = typeof item === 'string' ? item : (item.name || item);
-        // 检查是否是默认数据中的项
-        const isDefault = defaultCrops.some(d => d.name === name) || 
-                         defaultServiceTypes.some(d => d.name === name) || 
-                         defaultMachines.some(d => d.name === name);
-        return {
-            name: name,
-            isSelf: isDefault ? 0 : 1, // 如果是默认数据中的,isSelf=0,否则是用户自定义的
-            selected: true // 接口返回的都是已保存的,所以都选中
-        };
-    });
-}
-
-// 合并数据:编辑时将默认数据与接口数据合并,name相同的设置为选中
-function mergeDataForEdit(defaultList, apiList) {
-    // 创建 API 返回数据的名称集合(用于判断是否选中)
-    const apiNameSet = new Set(apiList.map(item => typeof item === 'string' ? item : (item.name || item)));
-    
-    // 合并逻辑:默认数据 + API 数据(去重)
-    const merged = [...defaultList];
-    
-    // 标记默认数据中哪些被选中(name 在 API 数据中存在)
-    merged.forEach(item => {
-        if (apiNameSet.has(item.name)) {
-            item.selected = true;
-        } else {
-            item.selected = false;
-        }
-    });
-    
-    // 添加 API 中存在但默认数据中不存在的项(这些是用户自定义的)
-    apiList.forEach(apiItem => {
-        const apiName = typeof apiItem === 'string' ? apiItem : (apiItem.name || apiItem);
-        const exists = merged.some(item => item.name === apiName);
-        if (!exists) {
-            merged.push({
-                name: apiName,
-                isSelf: 1, // 标记为用户自定义
-                selected: true
-            });
-        }
-    });
-    
-    return merged;
-}
-
-// 获取服务详情
-function getServiceDetail() {
-    VE_API.z_agricultural_store.getServiceDetail().then(({ data }) => {
-        if (data) {
-            // 默认情况下,只显示接口返回的数据
-            crops.value = convertApiDataToItems(data.serviceCropsJson || []);
-            serviceTypes.value = convertApiDataToItems(data.serviceTypeJson || []);
-            machines.value = convertApiDataToItems(data.agriculturalEquipmentJson || []);
-        } else {
-            // 如果没有数据,显示空数组
-            crops.value = [];
-            serviceTypes.value = [];
-            machines.value = [];
-        }
-    }).catch(() => {
-        // 获取失败,显示空数组
-        crops.value = [];
-        serviceTypes.value = [];
-        machines.value = [];
-    });
-}
-
-// 监听编辑状态,编辑时合并默认数据
-watch(isEdit, (newVal) => {
-    if (newVal) {
-        // 进入编辑模式,合并默认数据
-        VE_API.z_agricultural_store.getServiceDetail().then(({ data }) => {
-            if (data) {
-                crops.value = mergeDataForEdit(defaultCrops, data.serviceCropsJson || []);
-                serviceTypes.value = mergeDataForEdit(defaultServiceTypes, data.serviceTypeJson || []);
-                machines.value = mergeDataForEdit(defaultMachines, data.agriculturalEquipmentJson || []);
-            } else {
-                // 如果没有数据,使用默认数据(都不选中)
-                crops.value = defaultCrops.map(item => ({ ...item, selected: false }));
-                serviceTypes.value = defaultServiceTypes.map(item => ({ ...item, selected: false }));
-                machines.value = defaultMachines.map(item => ({ ...item, selected: false }));
-            }
-        }).catch(() => {
-            // 获取失败,使用默认数据(都不选中)
-            crops.value = defaultCrops.map(item => ({ ...item, selected: false }));
-            serviceTypes.value = defaultServiceTypes.map(item => ({ ...item, selected: false }));
-            machines.value = defaultMachines.map(item => ({ ...item, selected: false }));
-        });
-    } else {
-        // 退出编辑模式,重新获取数据(只显示接口返回的数据)
-        getServiceDetail();
-    }
-});
-
-// 保存服务类型
-function handleSave() {
-    if (!serviceInfoRef.value) {
-        return;
-    }
-    
-    const serviceInfo = serviceInfoRef.value.getServiceInfo();
-    
-    VE_API.z_agricultural_store.updateService({
-        serviceCropsJson: serviceInfo.serviceCropsJson,
-        serviceTypeJson: serviceInfo.serviceTypeJson,
-        agriculturalEquipmentJson: serviceInfo.agriculturalEquipmentJson
-    }).then(({ code, msg }) => {
-        if (code === 0) {
-            ElMessage.success("保存成功");
-            isEdit.value = false;
-            // 重新获取数据
-            getServiceDetail();
-        } else {
-            ElMessage.error(msg || "保存失败");
-        }
-    }).catch(() => {
-        ElMessage.error("保存失败,请重试");
-    });
-}
-
-onMounted(() => {
-    getServiceDetail();
-});
-
-onActivated(() => {
-    getServiceDetail();
-});
-</script>
-
-<style lang="scss" scoped>
-.service-manage {
-    width: 100%;
-    height: 100vh;
-    background: #F5F7FB;
-    
-    .page-action {
-        position: fixed;
-        left: 0;
-        right: 0;
-        bottom: 0;
-        padding: 12px 12px;
-        background: #fff;
-        box-shadow: 2px 2px 4.5px rgba(0, 0, 0, 0.4);
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        .btn-item {
-            height: 40px;
-            line-height: 41px;
-            border-radius: 20px;
-            width: fit-content;
-            padding: 0 20px;
-            color: #666666;
-            font-size: 14px;
-            &.del {
-                color: #ff943d;
-                background: rgba(255, 148, 61, 0.1);
-            }
-            &.cancel {
-                border: 1px solid rgba(153, 153, 153, 0.5);
-            }
-            &.primary {
-                color: #fff;
-                background: linear-gradient(#76c3ff, #2199f8);
-            }
-        }
-        .center-btn {
-            margin: 0 auto;
-        }
-        .btn-right {
-            display: flex;
-            gap: 10px;
-        }
-    }
-}
-</style>