Quellcode durchsuchen

feat:新建农场详情页面

wangsisi vor 3 Tagen
Ursprung
Commit
0893074ff3

+ 0 - 254
src/components/pageComponents/FarmInfoCard.vue

@@ -1,254 +0,0 @@
-<template>
-    <div class="farm-info-card" :class="{ 'has-footer': showFooter }" @click="handleClick">
-        <div class="item-content">
-            <div class="item-left" :class="{'no-action': data.noAction}">
-            <!-- <div class="item-left" :style="{ width: data.maxWidth ? 'calc(100% - 80px)' : 'auto' }"> -->
-                <img class="map-img" src="@/assets/img/home/farm.png" alt="地图" />
-                <div class="item-info">
-                    <div class="item-header">
-                        <div class="farm-name van-ellipsis" :style="{ maxWidth: data.maxWidth || 'calc(100% - 90px)' }">
-                            {{ data.farmName || data.name }}
-                        </div>
-                        <div class="tags">
-                            <span
-                                class="tag"
-                                :class="data.className || 'tag-variety'"
-                                v-show="data.variety || data.roleName"
-                                >{{ data.variety || data.roleName }}</span
-                            >
-                            <span
-                                class="tag"
-                                :class="data.className || data.area ? 'tag-gray' : 'tag-role'"
-                                v-show="data.area || data.userType"
-                                >{{ data.area || data.userType == 1 ? '普通客户' : '托管客户' }}</span
-                            >
-                        </div>
-                    </div>
-                    <div class="farm-address van-ellipsis">
-                        {{ data.address || '手机号:'+ data.phone || '--' }}
-                    </div>
-                </div>
-            </div>
-            <!-- 右侧按钮插槽 -->
-            <div v-if="hasRightSlot" :class="data.customRight ? data.customRight : 'item-right-btn'" @click.stop>
-                <slot name="right"></slot>
-            </div>
-        </div>
-        <slot name="footerData"></slot>
-        <!-- 底部内容:服务次数或自定义内容 -->
-        <div v-if="showFooter" :class="{ 'item-footer': data.serviceCount != 0 }">
-            <slot name="footer">
-                <template v-if="data.serviceCount != 0">
-                    农事服务过<span class="service-count">{{ data.serviceCount }}</span
-                    >次
-                    <span class="view-detail">查看详情</span>
-                </template>
-            </slot>
-        </div>
-        <!-- 底部提示框:需求信息和预计收益 -->
-        <template v-if="data.broadcasts && data.broadcasts.length > 0">
-            <slot name="bottomTip">
-                <div class="item-footer remind-footer">
-                    <div class="remind-cont" v-html="data.broadcasts[0].content"></div>
-                    <span class="remind-text" @click.stop="handleRemind">提醒他</span>
-                </div>
-            </slot>
-        </template>
-        <upload-execute ref="uploadExecuteRef" :onlyShare="true" />
-    </div>
-</template>
-
-<script setup>
-import { computed, useSlots, ref } from "vue";
-import uploadExecute from "@/views/old_mini/task_condition/components/uploadExecute.vue";
-const props = defineProps({
-    data: {
-        type: Object,
-        default: () => ({}),
-    },
-});
-
-const emit = defineEmits(["click"]);
-const slots = useSlots();
-const showFooter = computed(() => {
-    return props.data.serviceCount !== undefined || !!slots.footer;
-});
-
-const hasRightSlot = computed(() => {
-    return !!slots.right;
-});
-
-const handleClick = () => {
-    emit("click", props.data);
-};
-
-const uploadExecuteRef = ref(null);
-const handleRemind = () => {
-    // const data = {
-    //     ...props.data,
-    //     farmMiniUserId: props.data.receiveUserId,
-    //     farmId: props.data.id,
-    //     type: "remindUser"
-    // }
-    // uploadExecuteRef.value.showPopup(data);
-};
-</script>
-
-<style lang="scss" scoped>
-.farm-info-card {
-    background: #fff;
-    border-radius: 8px;
-    position: relative;
-
-    &.has-footer {
-        padding: 12px 10px;
-        border-radius: 5px;
-    }
-
-    &:not(.has-footer) {
-        padding: 12px 12px;
-        display: flex;
-        flex-direction: column;
-        align-items: stretch;
-    }
-
-    .item-content {
-        width: 100%;
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-
-        .map-img {
-            width: 40px;
-            height: 40px;
-            border-radius: 6px;
-            object-fit: cover;
-        }
-        .item-left {
-            display: flex;
-            align-items: center;
-            gap: 8px;
-            width: calc(100% - 80px);
-            &.no-action {
-                width: 100%;
-            }
-        }
-        .item-info {
-            width: 100%;
-            .item-header {
-                display: flex;
-                gap: 10px;
-                font-size: 14px;
-                margin-bottom: 4px;
-                .farm-name {
-                    font-weight: 600;
-                    color: #000;
-                    max-width: calc(100% - 90px);
-                    // max-width: 100px;
-                }
-                .tags {
-                    flex: none;
-                    display: flex;
-                    gap: 6px;
-                    align-items: center;
-                    .tag {
-                        padding: 1px 8px;
-                        border-radius: 2px;
-                        font-size: 12px;
-                        &.tag-gray {
-                            background: rgba(243, 243, 243, 0.5);
-                            color: #7d7d7d;
-                        }
-                        &.tag-role {
-                            background: rgba(255, 149, 61, 0.2);
-                            color: #ff953d;
-                        }
-                        &.tag-variety {
-                            background: rgba(232, 243, 255, 1);
-                            color: #2199f8;
-                        }
-                    }
-                }
-            }
-            .farm-address {
-                font-size: 12px;
-                color: #86909c;
-                width: auto;
-                max-width: 190px;
-            }
-        }
-    }
-
-    .item-footer {
-        background: linear-gradient(90deg, rgba(33, 153, 248, 0.2) 0%, transparent 100%);
-        padding: 6px 8px;
-        display: flex;
-        align-items: center;
-        border-radius: 4px;
-        margin-top: 10px;
-        color: #2e2e2e;
-        font-size: 12px;
-        &.remind-footer {
-            justify-content: space-between;
-        }
-        .remind-cont {
-            width: calc(100% - 42px);
-            ::v-deep {
-                p {
-                    margin: 0;
-                }
-            }
-        }
-        .remind-text {
-            color: #2199f8;
-            font-weight: 500;
-            width: 40px;
-        }
-        .service-count {
-            margin: 0 2px;
-        }
-        .view-detail {
-            margin-left: 10px;
-        }
-        .remind-text {
-            font-weight: 400;
-        }
-    }
-
-    .tag-right {
-        align-self: baseline;
-    }
-
-    .item-right-btn {
-        text-align: center;
-        color: #888b8d;
-        font-size: 12px;
-        padding: 5px 12px;
-        border-radius: 20px;
-        border: 1px solid #888b8d;
-    }
-
-    .item-bottom-tip {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        background: linear-gradient(90deg, rgba(254, 164, 94, 0.2) 0%, transparent 100%);
-        span {
-            color: #eb7b20;
-            font-weight: 500;
-        }
-        .income-text {
-            color: #efb789;
-        }
-    }
-}
-
-.farm-info-card + .farm-info-card {
-    margin-top: 12px;
-}
-</style>
-<style>
-.share-sheet {
-    bottom: 50px;
-}
-</style>

+ 0 - 782
src/components/taskItem.vue

@@ -1,782 +0,0 @@
-<template>
-    <div class="farm-item" :class="{ done: props.status, ['farm-item-' + itemIndex]: itemIndex }">
-        <div class="item-top">
-            <div class="top-l">
-                <el-popover
-                    placement="top"
-                    trigger="click"
-                >
-                    <template #reference>
-                        <div class="item-name">{{ itemData?.farmWorkName }}</div>
-                    </template>
-                    <div class="popover-content">{{ itemData?.farmWorkName }}</div>
-                </el-popover>
-                <div class="item-time" v-if="itemIndex === 0">
-                    {{
-                        itemData?.expectedExecuteDate
-                            ? itemData?.expectedExecuteDate
-                            : itemData?.executeDeadlineDate
-                            ? "截止到" + itemData?.executeDeadlineDate
-                            : ""
-                    }}
-                </div>
-                <div class="item-time" v-if="itemIndex !== 3">{{ itemData?.executeDate }}</div>
-                <div class="item-tag" v-if="itemIndex === 3">
-                    {{ farmWorkType[itemData?.farmWorkType || 0] }}
-                </div>
-            </div>
-            <div class="top-r" @click="toDetail(props.status, itemData.id, itemData.farmWorkLibId)">
-                {{ props.status === 0 ? "" : "查看详情" }}
-            </div>
-        </div>
-        <div class="item-box" v-if="props.status === 0">
-            <div class="img-text-wrap">
-                <div class="left-wrap">
-                    <div class="left-img">
-                        <img src="@/assets/img/home/farm.png" alt="" />
-                    </div>
-                    <div class="right-text">
-                        <div class="farm-info">
-                            {{ itemData?.farmName }}
-                            <div class="info-tag-wrap">
-                                <!-- <div class="tag-item second" v-if="itemData?.farmArea">
-                                    {{ formatArea(itemData?.farmArea) }}亩
-                                </div> -->
-                                <div class="tag-item primary">{{ itemData?.typeName }}</div>
-                                <!-- <div class="tag-item second">
-                                    普通客户
-                                </div> -->
-                                <div class="tag-item warning">托管客户</div>
-                            </div>
-                        </div>
-                        <div class="farm-addr">{{ itemData?.address }}</div>
-                    </div>
-                </div>
-            </div>
-            <slot name="footer"></slot>
-        </div>
-        <div class="item-box" v-else>
-            <div class="item-desc">
-                <div class="desc-info">
-                    <div class="desc-info-item">
-                        <span>药物处方:</span>
-                        <span class="value">{{ prescriptionText }}</span>
-                    </div>
-                </div>
-                <div class="desc-info" v-if="(itemIndex === 1 || itemIndex === 3) && itemData?.reviewDate">
-                    <div class="desc-info-item">
-                        <span>复核时间:</span>
-                        <span class="value">{{ itemData?.reviewDate }}</span>
-                    </div>
-                </div>
-                <div class="desc-info" v-if="(itemIndex === 2 && itemData?.reviewIntervalDays) || (itemIndex === 3 && itemData?.reviewIntervalDays && !itemData?.reviewDate)">
-                    <div class="desc-info-item">
-                        <span>复核时间:</span>
-                        <span class="value">{{ reviewDate }}</span>
-                    </div>
-                </div>
-                <div class="desc-info" v-if="itemIndex === 2 && !itemData.reviewImage?.length && daysDiff > 0">
-                    <div class="desc-info-item expired-text">
-                        <span
-                            >距离农事执行已 <span class="val-text">{{ daysDiff }}</span
-                            >天,请抓紧时间复核!</span
-                        >
-                    </div>
-                </div>
-                <div v-if="(itemIndex === 1 || itemIndex === 3) && itemData.reviewImage?.length" class="review-image two-image">
-                    <!-- 第一张:执行照片 -->
-                    <div class="review-image-item" v-if="itemData.executeEvidenceList?.length">
-                        <photo-provider :photo-closable="true">
-                            <photo-consumer
-                                :key="itemData.executeEvidenceList[0]"
-                                :src="base_img_url2 + itemData.executeEvidenceList[0]"
-                            >
-                                <div class="review-image-item-title">执行照片</div>
-                                <div class="img-item">
-                                    <img :src="base_img_url2 + itemData.executeEvidenceList[0] + resize" class="view-box" />
-                                </div>
-                            </photo-consumer>
-                        </photo-provider>
-                    </div>
-                    <!-- 第二张:复核照片 -->
-                    <div class="review-image-item" v-if="itemData.reviewImage?.length">
-                        <photo-provider :photo-closable="true">
-                            <photo-consumer
-                                :key="itemData.reviewImage[0]"
-                                :src="base_img_url2 + itemData.reviewImage[0]"
-                            >
-                                <div class="review-image-item-title">复核照片</div>
-                                <div class="img-item">
-                                    <img :src="base_img_url2 + itemData.reviewImage[0] + resize" class="view-box" />
-                                </div>
-                            </photo-consumer>
-                        </photo-provider>
-                    </div>
-                </div>
-                <div class="review-image" v-else-if="itemData?.executeEvidenceList?.length">
-                    <div class="review-image-item">
-                        <photo-provider :photo-closable="true">
-                            <photo-consumer
-                                v-for="src in itemData.executeEvidenceList.slice(0, 2)"
-                                :key="src"
-                                :src="base_img_url2 + src"
-                            >
-                                <div class="review-image-item-title">执行照片</div>
-                                <div class="img-item">
-                                    <img :src="base_img_url2 + src + resize" class="view-box" />
-                                </div>
-                            </photo-consumer>
-                        </photo-provider>
-                    </div>
-                </div>
-            </div>
-
-            <slot name="footer"></slot>
-
-            <!-- <div class="item-footer" v-if="props.status === 1">
-                <div
-                    class="footer-l farm-name-text van-ellipsis"
-                    :style="{ width: detailItem?.reviewImage?.length ? 'calc(100% - 100px)' : 'calc(100% - 180px)' }"
-                >
-                    来自<span class="name-text">{{ itemData.farmName || "未知农场" }}</span>
-                </div>
-                <div class="footer-r">
-                    <div class="btn warning" @click="generateReport">生成成果报告</div>
-                </div>
-            </div> -->
-        </div>
-    </div>
-
-    <!-- 处方卡片 -->
-    <Teleport to="body">
-        <detail-dialog ref="detailDialogRef" />
-    </Teleport>
-
-    <!-- 分享农事成效弹窗 -->
-    <review-popup ref="reviewPopupRef" />
-
-    <upload-execute ref="uploadExecuteRef" :onlyShare="true" />
-
-    <!-- 上传照片弹窗 -->
-    <review-upload-popup v-model="showUpload" :record-id="sectionId" @success="handleUploadSuccess" />
-</template>
-
-<script setup>
-import { onMounted, ref, computed } from "vue";
-import { useRouter } from "vue-router";
-import { base_img_url2 } from "@/api/config";
-import { ElMessage, ElMessageBox } from "element-plus";
-import detailDialog from "@/components/detailDialog.vue";
-import uploadExecute from "@/views/old_mini/task_condition/components/uploadExecute.vue";
-import reviewPopup from "@/views/old_mini/task_condition/components/reviewPopup.vue";
-import reviewUploadPopup from "@/components/popup/reviewUploadPopup.vue";
-
-const resize = "?x-oss-process=image/resize,p_120/format,webp/quality,q_100";
-
-const props = defineProps({
-    status: {
-        type: Number,
-        default: 0,
-    },
-    itemData: {
-        type: Object,
-        default: () => ({}),
-    },
-    // 0: 待完成,1:已完成,2:待复核,3:农户版已完成
-    itemIndex: {
-        type: Number,
-        default: 0,
-    },
-});
-
-const uploadExecuteRef = ref(null);
-const router = useRouter();
-const detailDialogRef = ref(null);
-const reviewPopupRef = ref(null);
-const toPage = () => {
-    router.push("/report_detail");
-};
-
-const farmWorkType = {
-    0: "预警农事",
-    1: "标准农事",
-    2: "建议农事",
-    3: "自建农事",
-};
-
-const handleFollow = ({ farmId, isFollow }) => {
-    ElMessageBox.confirm(`${isFollow ? "确定要取消关注该农场吗?" : "确定要关注该农场吗?"}`, "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-    })
-        .then(() => {
-            const api = isFollow ? VE_API.z_farm_work_record.unfollowFarm : VE_API.z_farm_work_record.followFarm;
-            api({ farmId }).then(({ code, msg }) => {
-                if (code === 0) {
-                    ElMessage.success(msg);
-                    emit("handleFollowSuccess");
-                } else {
-                    ElMessage.error(msg);
-                }
-            });
-        })
-        .catch(() => {});
-};
-
-// 计算距离执行时间的天数差
-const daysDiff = computed(() => {
-    if (!props.itemData?.executeDate) {
-        return 0;
-    }
-
-    const executeDate = new Date(props.itemData.executeDate);
-    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;
-});
-
-// 计算复核时间:executeDate + reviewIntervalDays
-const reviewDate = computed(() => {
-    if (!props.itemData?.executeDate) {
-        return "--";
-    }
-
-    const executeDate = new Date(props.itemData.executeDate);
-    const reviewIntervalDays = Number(props.itemData?.reviewIntervalDays || 0);
-
-    // 将执行日期加上间隔天数
-    executeDate.setDate(executeDate.getDate() + reviewIntervalDays);
-
-    // 格式化为 YYYY-MM-DD
-    const year = executeDate.getFullYear();
-    const month = String(executeDate.getMonth() + 1).padStart(2, "0");
-    const day = String(executeDate.getDate()).padStart(2, "0");
-
-    return `${year}-${month}-${day}`;
-});
-
-const remindUser = () => {
-    uploadExecuteRef.value.showPopup({ ...props.itemData, type: "remindUser" });
-};
-
-const showUpload = ref(false);
-const sectionId = ref(null);
-const handleUploadPhoto = () => {
-    showUpload.value = true;
-    sectionId.value = props.itemData.id;
-};
-
-const emit = defineEmits(["handleUploadSuccess", "handleFollowSuccess"]);
-
-const detailItem = ref({});
-
-// 更新触发图片(上传成功后调用)
-const updateTriggerImg = async () => {
-    if (!props.itemData?.id) return;
-
-    // 重新获取详情
-    await getItemDetail(props.itemData.id);
-    // 如果是待完成状态(status === 0),详情已经更新,itemData 会在 getSimpleList 后更新
-};
-
-const handleUploadSuccess = async () => {
-    emit("handleUploadSuccess");
-};
-
-onMounted(async () => {
-    // 若已带处方列表,直接生成;否则在需要时拉取详情后生成
-    if (props.itemData && Array.isArray(props.itemData.prescriptionList)) {
-        prescriptionText.value = buildPrescriptionText(props.itemData.prescriptionList);
-    } else if (props.status === 1 && props.itemData?.id) {
-        await getItemDetail(props.itemData.id);
-        if (Array.isArray(detailItem.value?.prescriptionList)) {
-            prescriptionText.value = buildPrescriptionText(detailItem.value.prescriptionList);
-        }
-    }
-});
-
-// 将所有需要暴露的方法放在 defineExpose 中
-defineExpose({
-    updateTriggerImg,
-});
-const prescriptionText = ref("");
-function buildPrescriptionText(list) {
-    if (!list || !Array.isArray(list) || list.length === 0 || list[0]?.pesticideFertilizerList?.length === 0) {
-        return "无处方";
-    }
-    try {
-        return list
-            .map((group) =>
-                (group.pesticideFertilizerList || [])
-                    .map((p) => p.defaultName || p.pesticideFertilizerName || "")
-                    .filter(Boolean)
-                    .join("+")
-            )
-            .filter(Boolean)
-            .join("+");
-    } catch {
-        return "无处方";
-    }
-}
-async function getItemDetail(id) {
-    const { data } = await VE_API.z_farm_work_record.getDetail({ id });
-    detailItem.value = data[0];
-}
-
-// 保留方法名以兼容,但同步返回已生成的文案
-const getPrescriptionInfo = () => prescriptionText.value;
-
-function formatArea(val) {
-    const num = typeof val === "number" ? val : parseFloat(val);
-    if (Number.isNaN(num)) return val;
-    return Number.isInteger(num) ? num : num.toFixed(2);
-}
-
-const toDetail = (status, id, farmWorkId) => {
-    if (status === 1 || status === 3) {
-        // 复核成效
-        router.push({
-            path: "/review_work",
-            query: { miniJson: JSON.stringify({ id, goBack: true }) },
-        });
-    } else {
-        detailDialogRef.value.showDialog(farmWorkId, "", false);
-    }
-};
-</script>
-
-<style lang="scss" scoped>
-.farm-item {
-    background: #cfe9ff;
-    border-radius: 14px;
-    &.done {
-        background: #ebebeb;
-        .item-top {
-            .item-name {
-                background: #c5c5c5;
-                border: none;
-                color: #fff;
-            }
-        }
-        .item-desc .copy-info .copy-text {
-            color: #000000;
-        }
-        .top-r {
-            color: rgba(0, 0, 0, 0.6);
-        }
-    }
-    &.farm-item-3 {
-        background: #fff;
-        border: 1px solid rgba(0, 0, 0, 0.1);
-        border-radius: 5px;
-        .item-top {
-            .item-name {
-                padding: 0;
-                background: none;
-                border: none;
-                color: #000000;
-            }
-        }
-        .item-box {
-            border-color: #F5F5F5;
-        }
-    }
-    .top-r {
-        flex: none;
-    }
-    &.hall {
-        background: #cfe9ff;
-        .item-top {
-            .item-name {
-                color: #ffffff;
-                border: none;
-                background: linear-gradient(180deg, #7bc5ff, #2199f8);
-            }
-        }
-    }
-    .item-top {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        padding: 8px 12px;
-        color: #2199f8;
-        font-size: 14px;
-        .top-l {
-            display: flex;
-            align-items: center;
-            font-size: 16px;
-            color: #000000;
-        }
-        .item-time {
-            padding-right: 8px;
-            flex: none;
-        }
-        .item-tag {
-            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;
-        }
-        .item-name {
-            margin-right: 8px;
-            color: #2199f8;
-            padding: 0 10px;
-            height: 29px;
-            border-radius: 4px;
-            border: 1px solid #2199f8;
-            line-height: 29px;
-            background: #fff;
-            max-width: 200px;
-            overflow: hidden;
-            text-overflow: ellipsis;
-            white-space: nowrap;
-            cursor: pointer;
-        }
-    }
-    .item-box {
-        background: #fff;
-        border-radius: 10px 10px 14px 14px;
-        border: 1px solid rgba(183, 183, 183, 0.1);
-        padding: 10px 12px;
-    }
-    .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 {
-            color: #8b8b8b;
-            font-size: 12px;
-            &.primary-btn {
-                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;
-                .share-icon {
-                    width: 12px;
-                    padding-right: 4px;
-                }
-            }
-            &.farm-name-text {
-                font-size: 14px;
-                color: #6f7274;
-                width: calc(100% - 180px);
-                .name-text {
-                    padding-left: 4px;
-                }
-            }
-        }
-        .footer-r {
-            display: flex;
-            align-items: center;
-            .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;
-                }
-                .btn-icon {
-                    padding-right: 4px;
-                }
-                &.warning {
-                    color: #ff953d;
-                    background: #fff;
-                    border: 1px solid #ff953d;
-                }
-                &.secondary-text {
-                    color: #2199f8;
-                    border: 1px solid #2199f8;
-                }
-                &.photo-text {
-                    background: #2199f8;
-                    color: #fff;
-                }
-            }
-            .btn + .btn {
-                margin-left: 8px;
-            }
-        }
-    }
-    .farm-text {
-        margin-bottom: 10px;
-        background: rgba(183, 183, 183, 0.1);
-        padding: 6px 8px;
-        border-radius: 5px;
-        font-size: 12px;
-        color: #909090;
-        line-height: 1.5;
-        overflow: hidden;
-        display: -webkit-box;
-        -webkit-line-clamp: 2;
-        -webkit-box-orient: vertical;
-        line-clamp: 2;
-        word-break: break-all;
-        .text-title {
-            color: #424242;
-        }
-        .text-more {
-            padding-left: 10px;
-            color: #2199f8;
-            white-space: nowrap;
-        }
-    }
-    .img-text-wrap {
-        display: flex;
-        align-items: flex-start;
-        justify-content: space-between;
-        .left-wrap {
-            display: flex;
-            align-items: center;
-            .left-img {
-                width: 40px;
-                height: 40px;
-                border-radius: 6px;
-                img {
-                    width: 100%;
-                    height: 100%;
-                    object-fit: contain;
-                }
-            }
-            .right-text {
-                padding-left: 8px;
-                .farm-info {
-                    font-size: 14px;
-                    color: #1d2129;
-                    display: flex;
-                    align-items: center;
-                    .info-tag-wrap {
-                        margin-left: 10px;
-                        display: flex;
-                        align-items: center;
-                        gap: 4px;
-                        .tag-item {
-                            height: 20px;
-                            line-height: 20px;
-                            padding: 0 8px;
-                            border-radius: 2px;
-                            font-size: 12px;
-                            &.second {
-                                color: #848282;
-                                background: rgba(148, 148, 148, 0.1);
-                            }
-                            &.primary {
-                                color: #2199f8;
-                                background: #e8f3ff;
-                            }
-                            &.warning {
-                                color: #ff953d;
-                                background: rgba(255, 149, 61, 0.1);
-                            }
-                        }
-                    }
-                }
-                .farm-addr {
-                    padding-top: 2px;
-                    font-size: 12px;
-                    color: #86909c;
-                }
-            }
-        }
-        .right-wrap {
-            display: flex;
-            align-items: center;
-            color: #ff953d;
-            font-size: 12px;
-            flex: none;
-            .click-item {
-                display: flex;
-                align-items: center;
-                gap: 2px;
-            }
-            .follow-text {
-                color: #d0d0d0;
-            }
-        }
-    }
-    .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;
-            }
-        }
-        .title-r {
-            color: rgba(255, 131, 29, 0.36);
-            font-size: 12px;
-        }
-    }
-    .item-title {
-        font-size: 16px;
-        font-weight: 500;
-        margin: 2px 0 5px 0;
-    }
-    .item-desc {
-        font-size: 14px;
-        color: #bbbbbb;
-        line-height: 18px;
-        .desc-info {
-            display: flex;
-            .desc-info-item {
-                flex: 1;
-                .value {
-                    color: #666666;
-                }
-            }
-            .expired-text {
-                background: linear-gradient(90deg, rgba(33, 153, 248, 0.2) 0%, rgba(33, 153, 248, 0) 100%);
-            }
-            &.two-text {
-                .value {
-                    font-size: 12px;
-                    padding-top: 4px;
-                }
-            }
-            .expired-day {
-                color: #ff953d;
-            }
-            .expired-text {
-                margin-top: 4px;
-                padding: 6px 8px;
-                background: linear-gradient(90deg, rgba(33, 153, 248, 0.2), rgba(33, 153, 248, 0));
-                border-radius: 4px;
-                color: #2e2e2e;
-                font-size: 12px;
-                width: 100%;
-                .val-text {
-                    color: #2199f8;
-                }
-            }
-        }
-        .desc-info + .desc-info {
-            padding-top: 6px;
-        }
-        .pt-10 {
-            padding-top: 10px;
-        }
-
-        .two-image {
-            display: flex;
-            align-items: center;
-            gap: 8px;
-        }
-
-        .review-image {
-            padding-top: 6px;
-            .review-image-item {
-                display: flex;
-                align-items: center;
-                gap: 8px;
-                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;
-                }
-                ::v-deep {
-                    .PhotoConsumer {
-                        width: 100%;
-                        height: 100%;
-                        position: relative;
-                    }
-                }
-            }
-            img {
-                width: 100%;
-                height: 106px;
-                object-fit: cover;
-                border-radius: 8px;
-            }
-        }
-        .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;
-            }
-        }
-    }
-}
-
-.popover-content {
-    font-size: 14px;
-    color: #000;
-    line-height: 1.5;
-    word-break: break-all;
-}
-</style>

+ 6 - 19
src/router/globalRoutes.js

@@ -17,6 +17,12 @@ export default [
         name: "Home",
         component: () => import("@/views/old_mini/home/index.vue"),
     },
+    // 农情详情
+    {
+        path: "/agricultural_details",
+        name: "AgriculturalDetails",
+        component: () => import("@/views/old_mini/agriculturalDetails/index.vue"),
+    },
     {
         path: "/monitor",
         name: "Monitor",
@@ -146,13 +152,6 @@ export default [
         name: "FarmRecords",
         component: () => import("@/views/old_mini/mine/pages/farmRecords.vue"),
     },
-    // 农资农服-农情需求
-    {
-        path: "/task_condition",
-        name: "TaskCondition",
-        meta: { showTabbar: true, keepAlive: true },
-        component: () => import("@/views/old_mini/task_condition/index.vue"),
-    },
     // 用户管理
     {
         path: "/user",
@@ -271,12 +270,6 @@ export default [
         meta: { keepAlive: true },
         component: () => import("@/views/old_mini/home/subPages/expertDetail.vue"),
     },
-    //项目管理员
-    {
-        path: "/project_manager",
-        name: "ProjectManager",
-        component: () => import("@/views/old_mini/mine/pages/projectManager.vue"),
-    },
     //注册页面
     {
         path: "/register",
@@ -398,12 +391,6 @@ export default [
         meta: { keepAlive: true },
         component: () => import("@/views/old_mini/home/subPages/prescriptionPage.vue"),
     },
-    // 提醒客户
-    {
-        path: "/remind_customer",
-        name: "RemindCustomer",
-        component: () => import("@/views/old_mini/task_condition/components/remindCustomer.vue"),
-    },
     // 知识库
     {
         path: "/knowledge_list",

+ 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>

+ 3 - 3
src/views/old_mini/agri_services/index.vue

@@ -9,9 +9,9 @@
                 <services-hall ref="servicesHallRef" :active="active" />
             </tab>
         </tabs>
-        <div v-else class="farm-dynamics-container">
+        <!-- <div v-else class="farm-dynamics-container">
             <farm-dynamics ref="farmDynamicsRef" :type="type" />
-        </div>
+        </div> -->
     </div>
 </template>
 
@@ -21,7 +21,7 @@ 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 farmDynamics from "./components/farmDynamics.vue";
 import customHeader from "@/components/customHeader.vue";
 
 const route = useRoute();

+ 14 - 0
src/views/old_mini/agriculturalDetails/index.vue

@@ -0,0 +1,14 @@
+<template>
+    <div class="agricultural-details">
+        <custom-header name="农情详情"></custom-header>
+        123
+    </div>
+</template>
+
+<script setup>
+import customHeader from "@/components/customHeader.vue";
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 3 - 3
src/views/old_mini/farm_manage/components/demandHall.vue

@@ -56,7 +56,7 @@
             <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">
+                        <!-- <task-item :item-data="item" :isHall="true" @handleFollowSuccess="getSimpleList">
                             <template #footer>
                                 <div class="item-footer">
                                     <div class="footer-l" @click="toDetail(item)">查看详情</div>
@@ -68,7 +68,7 @@
                                     </div>
                                 </div>
                             </template>
-                        </task-item>
+                        </task-item> -->
                     </div>
 
                     <div class="no-data" v-if="taskList.length === 0">暂无数据</div>
@@ -98,7 +98,7 @@ 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 taskItem from "@/components/taskItem.vue";
 import priceSheetPopup from "@/components/popup/priceSheetPopup.vue";
 import { useRouter } from "vue-router";
 import LocationSearch from "@/components/pageComponents/LocationSearch.vue";

+ 0 - 455
src/views/old_mini/home/components/AgriculturalDynamics.vue

@@ -1,455 +0,0 @@
-<template>
-    <div class="agricultural-dynamics">
-        <!-- 任务列表 -->
-        <div class="task-list">
-            <div v-for="(task, index) in taskList" :key="index" class="task-item">
-                <div class="task-content" @click="handleTaskAction(task)">
-                    <div class="task-header">
-                        <div class="task-status-tag">{{ task.flowStatus === 4 ? '待完成' : '待复核' }}</div>
-                        <div class="task-title">{{ task.farmWorkName }}</div>
-                    </div>
-                    <div class="task-time" v-if="task.flowStatus === 5">
-                        复核时间 
-                    {{ task.reviewDate }}</div>
-                    <div class="task-time" v-if="task.flowStatus === 4 && task.expectedExecuteDate">执行时间 {{ task.expectedExecuteDate }}</div>
-                    <div class="task-time deadline" v-if="task.flowStatus === 4 && !task.expectedExecuteDate">截止时间 {{ task.executeDeadlineDate }}</div>
-                </div>
-                <div v-if="task.flowStatus === 5" class="task-action" :class="{ 'call-text': getButtonText(task) }" @click="handleAction(task)">
-                    {{ getButtonText(task) ? '提醒复核' : '上传复核照片' }}
-                </div>
-                <div v-else-if="task.flowStatus === 4 && task.expectedExecuteDate" class="task-action" :class="{ 'call-text': getButtonText(task) }" @click="showOfferPopup(task)">
-                    {{ getButtonText(task) ? "提醒执行" : "上传照片" }}
-                </div>
-                <div v-else-if="task.flowStatus === 4 && !task.expectedExecuteDate" class="task-action orange" :class="{ 'call-text': getButtonText(task) }" @click="selectExecuteTime(task)">
-                    {{ getButtonText(task) ? "提醒确认执行时间" : "确认执行时间" }}
-                </div>
-            </div>
-        </div>
-
-        <div class="title">农情互动</div>
-        <!-- 内容区域 -->
-        <div class="agricultural-list">
-            <div v-if="!unansweredList.length" class="empty-block">暂无数据</div>
-            <template v-else>
-                <div class="agricultural-item" v-for="(item, index) in unansweredList" :key="index">
-                    <!-- 头部区域 -->
-                    <div class="header-section">
-                        <div class="header-left">
-                            <div class="farm-name van-ellipsis">{{ item.farmName }}</div>
-                            <div class="tag-group">
-                                <div class="tag tag-blue">{{ item.typeName }}</div>
-                                <div class="tag" :class="{'tag-orange': item.userType === 2}">{{ item.userType === 1 ? '普通客户' : '托管客户' }}</div>
-                            </div>
-                        </div>
-                        <div class="remind-btn" @click="handleRemind(item)">提醒客户</div>
-                    </div>
-                    <!-- 警告通知块 -->
-                    <div
-                        class="warning-block"
-                        v-if="item.latestPhenologyProgressBroadcast"
-                        v-html="item.latestPhenologyProgressBroadcast?.content"
-                    ></div>
-
-                    <!-- 时间轴组件,只负责时间轴区域 -->
-                    <AgriculturalInteractionCard :item="item" @updateList="updateAllData" />
-                </div>
-            </template>
-        </div>
-    </div>
-    <offer-popup ref="offerPopupRef" @uploadSuccess="getTaskList"></offer-popup>
-
-    <!-- 确认执行时间 -->
-    <calendar
-        teleport="#app"
-        v-model:show="showCalendar"
-        @confirm="onConfirmExecuteTime"
-        :min-date="minDate"
-        :max-date="maxDate"
-    />
-
-    <!-- 上传复核照片 -->
-    <upload-execute ref="uploadExecuteRef" :onlyShare="false" @uploadSuccess="handleUploadSuccess" />
-</template>
-
-<script setup>
-import router from "@/router";
-import { ref, onMounted, onActivated } from "vue";
-import { Calendar } from "vant";
-import wx from "weixin-js-sdk";
-import { ElMessage } from "element-plus";
-import offerPopup from "@/components/popup/offerPopup.vue";
-import AgriculturalInteractionCard from "@/components/pageComponents/AgriculturalInteractionCard.vue";
-import { formatDate } from "@/common/commonFun";
-import uploadExecute from "@/views/old_mini/task_condition/components/uploadExecute.vue";
-// 任务列表数据
-const taskList = ref([]);
-
-const handleTaskAction = (item) => {
-    router.push({
-        path: "/completed_work",
-        query: { miniJson: JSON.stringify({ id: item.id }) },
-    });
-};
-
-// 计算复核时间:executeDate + reviewIntervalDays
-const calculateReviewDate = (task) => {
-    if (!task?.executeDate) {
-        return "--";
-    }
-
-    const executeDate = new Date(task.executeDate);
-    const reviewIntervalDays = Number(task?.reviewIntervalDays || 0);
-
-    // 将执行日期加上间隔天数
-    executeDate.setDate(executeDate.getDate() + reviewIntervalDays);
-
-    // 格式化为 YYYY-MM-DD
-    const year = executeDate.getFullYear();
-    const month = String(executeDate.getMonth() + 1).padStart(2, "0");
-    const day = String(executeDate.getDate()).padStart(2, "0");
-
-    return `${year}-${month}-${day}`;
-};
-
-onMounted(() => {
-    const userInfo = JSON.parse(localStorage.getItem("localUserInfo"));
-    agriculturalRole.value = userInfo.agriculturalRole;
-    userId.value = userInfo.id;
-});
-
-const agriculturalRole = ref(null);
-const userId = ref(null);
-
-const offerPopupRef = ref(null);
-const showOfferPopup = (item) => {
-    if(getButtonText(item)) {
-        const query = {
-            askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
-            shareText: '向您分享了一条农事执行提醒,请您尽快执行',
-            targetUrl: `completed_work`,
-            paramsPage: JSON.stringify({id: item.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`,
-        });
-    }else{
-        offerPopupRef.value.openPopup(item);
-    }
-};
-
-const uploadExecuteRef = ref(null);
-function handleAction(item) {
-    if(getButtonText(item)) {
-        const query = {
-            askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
-            shareText: '向您分享了一条农事复核提醒,请您尽快复核',
-            targetUrl: `review_work`,
-            paramsPage: JSON.stringify({id: item.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`,
-        });
-    }else{
-        setTimeout(() => {
-            uploadExecuteRef.value.showPopup(item, "share-sheet");
-        }, 10);
-    }
-}
-
-function handleUploadSuccess() {
-    getTaskList();
-}
-
-const selectExecuteTime = (item) => {
-    if (getButtonText(item)) {
-        const query = {
-            askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
-            shareText: '向您分享了一条农事提醒,请您尽快确认执行时间',
-            targetUrl: `completed_work`,
-            paramsPage: JSON.stringify({id: item.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`,
-        });
-    } else {
-        executeItem.value = item;
-        maxDate.value = new Date(item.executeDeadlineDate);
-        showCalendar.value = true;
-    }
-};
-
-// 获取上传按钮的文本(计算属性方式)
-const getButtonText = (item) => {
-    return agriculturalRole.value === 1 || (agriculturalRole.value === 2 && item.executorUserId != userId.value);
-};
-
-const showCalendar = ref(false);
-const maxDate = ref();
-// 最小日期设置为今天,今天可以选择
-const minDate = new Date();
-const executeItem = ref(null);
-
-const onConfirmExecuteTime = (date) => {
-    showCalendar.value = false;
-    VE_API.z_farm_work_record
-        .updateExpectedExecuteDate({ recordId: executeItem.value.id, expectedExecuteDate: formatDate(date) })
-        .then((res) => {
-            if (res.code === 0) {
-                ElMessage.success("操作成功");
-                getTaskList();
-            }
-        });
-};
-
-const handleRemind = (item) => {
-    router.push(`/remind_customer?farmId=${item.farmId}`);
-};
-
-onActivated(() => {
-    updateAllData();
-});
-
-const updateAllData = () => {
-    getUnansweredFarms();
-    getTaskList();
-};
-//农情互动的农场列表接口(分页)
-const getTaskList = async () => {
-    // 同时获取待完成(4)和待复核(5)的任务
-    const [res4, res5] = await Promise.all([
-        VE_API.z_farm_work_record.generalPendingFarmWork({ role: 2, flowStatus: 4 }),
-        VE_API.z_farm_work_record.generalPendingFarmWork({ role: 2, flowStatus: 5 })
-    ]);
-    
-    const tasks4 = (res4.data || []).map(task => ({
-        ...task,
-        reviewDate: calculateReviewDate(task)
-    }));
-    
-    const tasks5 = (res5.data || []).map(task => ({
-        ...task,
-        reviewDate: calculateReviewDate(task)
-    }));
-    
-    // 合并两种状态的任务,总共取前2个
-    taskList.value = [...tasks4, ...tasks5].slice(0, 2);
-};
-
-const unansweredList = ref([]);
-const getUnansweredFarms = async () => {
-    const params = {
-        page: 0,
-        limit: 3,
-        flowStatus: 5,
-    };
-    const res = await VE_API.home.listUnansweredFarms(params);
-    unansweredList.value = (res.data || []).map((item) => ({
-        ...item,
-        timelineList: [],
-    }));
-
-    // 串行请求,一个完成后再请求下一个
-    if (unansweredList.value.length) {
-        for (let i = 0; i < unansweredList.value.length; i++) {
-            await getFutureFarmWorkWarning(unansweredList.value[i]);
-        }
-    }
-
-    unansweredList.value = unansweredList.value.filter(item => item.timelineList.length > 0);
-};
-
-//查询未来农事预警
-const getFutureFarmWorkWarning = async (item) => {
-    const res = await VE_API.home.listFutureFarmWorkWarning({ farmId: item.farmId });
-    item.timelineList = res.data || [];
-};
-</script>
-
-<style scoped lang="scss">
-.agricultural-dynamics {
-    padding: 0 10px;
-
-    // 任务列表样式
-    .task-list {
-        .task-item {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            background-color: #ffffff;
-            border-radius: 8px;
-            padding: 12px;
-            margin-top: 10px;
-            position: relative;
-            overflow: hidden;
-            &::after {
-                content: "";
-                position: absolute;
-                top: -10px;
-                right: 0;
-                width: 72px;
-                height: 72px;
-                pointer-events: none;
-                background: url("@/assets/img/home/task-icon.png") no-repeat center center / 100% 100%;
-            }
-
-            .task-content {
-                flex: 1;
-                .task-header {
-                    display: flex;
-                    align-items: center;
-                    margin-bottom: 4px;
-                    gap: 8px;
-                }
-
-                .task-status-tag {
-                    background-color: rgba(33, 153, 248, 0.1);
-                    color: #2199f8;
-                    font-size: 12px;
-                    padding: 1px 6px;
-                    border-radius: 2px;
-                }
-
-                .task-title {
-                    font-size: 16px;
-                    font-weight: 500;
-                    color: #1d2129;
-                }
-
-                .task-time {
-                    font-size: 12px;
-                    color: rgba(78, 89, 105, 0.5);
-                    &.deadline {
-                        color: rgba(255, 85, 85, 0.7);
-                    }
-                }
-            }
-
-            .task-action {
-                flex: none;
-                background-color: rgba(33, 153, 248, 0.1);
-                color: #2199f8;
-                border-radius: 25px;
-                padding: 0px 14px;
-                font-size: 12px;
-                height: 28px;
-                box-sizing: border-box;
-                line-height: 28px;
-                &.orange {
-                    color: #ff953d;
-                    background: rgba(255, 149, 61, 0.1);
-                }
-                &.call-text {
-                    color: #868686;
-                    background: none;
-                    border: 0.5px solid #D1D1D1;
-                }
-            }
-        }
-    }
-
-    .title {
-        font-size: 16px;
-        font-weight: 500;
-        color: #1d2129;
-        margin-top: 10px;
-    }
-
-    .agricultural-list {
-        .empty-block {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            height: 120px;
-            color: #a0a0a0;
-            font-size: 14px;
-            background-color: #ffffff;
-            border-radius: 8px;
-            margin-top: 8px;
-        }
-
-        .agricultural-item {
-            background-color: #ffffff;
-            border-radius: 8px;
-            padding: 8px 12px;
-            margin-top: 8px;
-
-            // 头部区域样式
-            .header-section {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                padding-bottom: 5px;
-                border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
-
-                .header-left {
-                    display: flex;
-                    align-items: center;
-                    gap: 8px;
-                    width: calc(100% - 80px);
-                    .farm-name {
-                        font-size: 16px;
-                        font-weight: 500;
-                        color: #1d2129;
-                        max-width: calc(100% - 130px);
-                    }
-
-                    .tag-group {
-                        display: flex;
-                        gap: 4px;
-                        .tag {
-                            padding: 2px 8px;
-                            border-radius: 2px;
-                            font-size: 12px;
-                            color: #848282;
-                            background-color: rgba(148, 148, 148, 0.1);
-
-                            &.tag-blue {
-                                background-color: #e8f3ff;
-                                color: #2199f8;
-                            }
-
-                            &.tag-orange {
-                                background-color: rgba(255, 149, 61, 0.1);
-                                color: #ff953d;
-                            }
-                        }
-                    }
-                }
-
-                .remind-btn {
-                    background-color: #2199f8;
-                    color: #ffffff;
-                    border-radius: 25px;
-                    padding: 7px 12px;
-                    font-size: 12px;
-                }
-            }
-
-            // 警告通知块样式
-            .warning-block {
-                background-color: rgba(33, 153, 248, 0.1);
-                border-radius: 5px;
-                padding: 5px;
-                margin-top: 8px;
-                font-size: 12px;
-                color: #252525;
-                ::v-deep {
-                    p {
-                        padding: 0;
-                        margin: 0;
-                    }
-                }
-            }
-        }
-    }
-}
-</style>
-
-<style lang="scss">
-.van-calendar__popup {
-    z-index: 9999 !important;
-}
-</style>

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

@@ -29,7 +29,7 @@
                     </div>
                     <div class="farm-subtitle">{{ farmInfo.address }}</div>
                 </div>
-                <div class="farm-more">详情</div>
+                <div class="farm-more" @click="handleMoreClick">详情</div>
             </div>
 
             <div class="content-grid">
@@ -120,6 +120,10 @@ const handleBlockClick = (block) => {
     // 预留点击跳转/弹窗逻辑
     console.log("点击卡片:", block);
 };
+
+const handleMoreClick = () => {
+    console.log("点击详情");
+};
 </script>
 
 <style scoped lang="scss">

+ 0 - 101
src/views/old_mini/mine/pages/projectManager.vue

@@ -1,101 +0,0 @@
-<template>
-    <div class="authentication-page">
-        <custom-header name="项目管理员"></custom-header>
-        <div class="team-content">
-            <template v-if="teamList && teamList.length">
-                <div class="team-list">
-                    <farm-info-card
-                        v-for="ele in teamList"
-                        :key="ele.id"
-                        class="list-item"
-                        :data="{
-                            ...ele,
-                            maxWidth: 'fit-content',
-                            roleName: '项目管理员',
-                        }"
-                    >
-                        <template #right>
-                            <div @click.stop="handleRemoveProjectManager(ele)">移除</div>
-                        </template>
-                    </farm-info-card>
-                </div>
-            </template>
-            <div v-else class="empty-wrap">
-                <div class="empty-text">暂无数据</div>
-            </div>
-        </div>
-        <div class="custom-bottom-fixed-btns">
-            <div class="bottom-btn primary-btn" @click="handleAddProjectManager">添加项目管理员</div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import customHeader from "@/components/customHeader.vue";
-import FarmInfoCard from "@/components/pageComponents/FarmInfoCard.vue";
-import { ref, onMounted } from "vue";
-import { useRouter } from "vue-router";
-import { ElMessage, ElMessageBox } from "element-plus";
-const router = useRouter();
-
-const handleRemoveProjectManager = async (item) => {
-    ElMessageBox.confirm('确定移除该成员吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-    }).then(async () => {
-        const { code,msg } = await VE_API.mine.saveManager({id: item.id, role: 3,permissions:["TASK_ORDER"]});
-        if (code === 0) {
-            ElMessage.success("移除成功");
-            getManagerList();
-        } else {
-            ElMessage.error(msg);
-        }
-    }).catch(() => {});
-};
-
-const handleAddProjectManager = () => {
-    router.push("/team_manage?add=true");
-};
-
-onMounted(() => {
-    getManagerList();
-});
-
-const teamList = ref([]);
-const getManagerList = async () => {
-    const { data } = await VE_API.mine.listManagerList();
-    if (data && data.length > 0) {
-        const list = Array.isArray(data) ? data.filter((item) => item.role == 2) : [];
-        teamList.value = list;
-    }
-};
-</script>
-
-<style lang="scss" scoped>
-.authentication-page {
-    width: 100%;
-    height: 100vh;
-    background-color: #f5f7fb;
-    .team-content {
-        width: 100%;
-        height: 100%;
-        padding: 10px 12px;
-        box-sizing: border-box;
-        .team-list {
-            width: 100%;
-        }
-        .empty-wrap {
-            padding-top: 40px;
-            text-align: center;
-            .empty-text {
-                font-size: 14px;
-                color: #86909c;
-            }
-        }
-    }
-    .custom-bottom-fixed-btns {
-        justify-content: center;
-    }
-}
-</style>

+ 3 - 3
src/views/old_mini/mine/pages/serviceDetail.vue

@@ -2,7 +2,7 @@
     <div class="service-detail-page">
         <custom-header name="农场详情"></custom-header>
         <div class="service-detail-content">
-            <farm-info-card
+            <!-- <farm-info-card
                 v-if="
                     farmInfoData.farmName !== '' ||
                     farmInfoData.area !== '' ||
@@ -12,7 +12,7 @@
                 class="record-box"
                 :data="farmInfoData"
             >
-            </farm-info-card>
+            </farm-info-card> -->
             <div class="farm-service-box">
                 <div class="service-title">
                     <img src="@/assets/img/home/label-icon.png" alt="" />
@@ -48,7 +48,7 @@
 
 <script setup>
 import customHeader from "@/components/customHeader.vue";
-import FarmInfoCard from "@/components/pageComponents/FarmInfoCard.vue";
+// import FarmInfoCard from "@/components/pageComponents/FarmInfoCard.vue";
 import StatsBox from "@/components/pageComponents/StatsBox.vue";
 import { ref, onMounted, computed } from "vue";
 import { useRoute, useRouter } from "vue-router";

+ 3 - 3
src/views/old_mini/mine/pages/teamManage.vue

@@ -6,7 +6,7 @@
             <div class="team-list" v-if="teamList && teamList.length">
                 <div class="list-item" v-for="ele in teamList" :key="ele.id">
                     <Checkbox v-if="route.query.add" @change="changeCheck" v-model="ele.checked"></Checkbox>
-                    <farm-info-card
+                    <!-- <farm-info-card
                         class="item-info"
                         @click="handleItem(ele)"
                         :style="{ width: !route.query.add ? '100%' : 'calc(100% - 55px)' }"
@@ -21,7 +21,7 @@
                         <template #right v-if="ele.role === 2 && !route.query.add && currentUserRole === 1">
                             <div @click.stop="handlePermission(ele)">权限设置</div>
                         </template>
-                    </farm-info-card>
+                    </farm-info-card> -->
                 </div>
             </div>
             <div v-else class="empty-wrap">
@@ -142,7 +142,7 @@ import { useRouter, useRoute } from "vue-router";
 import { Popup, Checkbox } from "vant";
 import wx from "weixin-js-sdk";
 import { ElMessage, ElMessageBox } from "element-plus";
-import FarmInfoCard from "@/components/pageComponents/FarmInfoCard.vue";
+// import FarmInfoCard from "@/components/pageComponents/FarmInfoCard.vue";
 
 const router = useRouter();
 const formRef = ref(null);

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

@@ -289,7 +289,6 @@ 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";

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

@@ -249,7 +249,6 @@ 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";

+ 3 - 3
src/views/old_mini/modify_work/reviewWork.vue

@@ -235,7 +235,7 @@
         <review-popup ref="reviewPopupRef" />
 
         <!-- 上传农事成效弹窗 -->
-        <upload-execute ref="uploadExecuteRef" :onlyShare="true" />
+        <!-- <upload-execute ref="uploadExecuteRef" :onlyShare="true" /> -->
     </div>
 </template>
 
@@ -250,8 +250,8 @@ 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 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();

+ 0 - 415
src/views/old_mini/task_condition/components/calendar.vue

@@ -1,415 +0,0 @@
-<template>
-    <div class="calendar">
-        <div class="header-wrap">
-            <div class="header-l">
-                <div class="top-l">
-                    <el-icon class="icon icon-l" color="#999999" size="11" @click="prevPeriod"><ArrowLeftBold /></el-icon>
-                    <!-- <span class="top-tag red" v-if="expiredCounts">{{ expiredCounts }}过期</span> -->
-                </div>
-                <div class="top-c">
-                    <span class="header-text">
-                        {{ dateRange.start }} <span class="center-line">-</span> {{ dateRange.end }}
-                    </span>
-                </div>
-                <div class="top-r">
-                    <!-- <span class="top-tag orange" v-if="completedCounts">{{ completedCounts }}待完成</span> -->
-                    <el-icon class="icon icon-r" color="#999999" size="11" @click="nextPeriod"><ArrowRightBold /></el-icon>
-                </div>
-
-            </div>
-            <!-- <div class="header-r">
-                <span class="line"></span>
-                高温预警
-            </div> -->
-        </div>
-        <div class="days">
-            <div
-                class="days-item"
-                v-for="(day, index) in calendarDays"
-                :key="index"
-                :class="[{ activeDay: activeDay === day.date, today: day.isToday && !day.solarTerm }]"
-                @click="selectDate(day.date, day)"
-            >
-                <div class="day-box">
-                    <span class="days-week">{{ day.isToday ? "今天" : `周${day.dayOfWeek}` }}</span>
-                    <span class="days-one">{{ day.day }}</span>
-                </div>
-                <div v-if="day.solarTerm" class="solar-term">{{ day.solarTerm }}</div>
-                <div v-if="day.typeName" class="type-num">{{ day.typeName.lengthVal }}</div>
-                <!-- <div v-if="day.isHeatWarning" class="heat-warning"></div>
-                <div v-if="day.typeName" class="type-name">
-                    <div class="type-text">{{ day.typeName.farmWorkName }}</div>
-                </div> -->
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { ref, computed, onDeactivated, onMounted } from "vue";
-import solarLunar from "solarlunar";
-// const props = defineProps({
-//     calendarWorkList: {
-//         type: Array,
-//         required: true,
-//     },
-// });
-
-const today = new Date();
-// const startDate = ref(getAlignedStartDate(today));
-const startDate = ref(new Date(today));
-// 定义星期几的名称
-const weekdays = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"];
-const weekdaysShort = ["一", "二", "三", "四", "五", "六", "日"];
-// 存储任务列表数据
-const taskListData = ref([]);
-
-const days = computed(() => {
-    return Array.from({ length: 7 }, (_, i) => {
-        const date = new Date(startDate.value);
-        date.setDate(startDate.value.getDate() + i);
-        return date;
-    });
-});
-
-const calendarDays = computed(() => {
-    const daysList = [];
-    for (let i = 0; i < days.value.length; i++) {
-        const date = days.value[i];
-        const dayOfWeek = date.getDay(); // 0是周日,1是周一,...,6是周六
-        // 调整显示:周一显示为"一",周二显示为"二",...,周日显示为"日"
-        const displayDayOfWeek = dayOfWeek === 0 ? "日" : weekdaysShort[dayOfWeek - 1];
-
-        // 获取该日期的节气
-        const solarTerm = getSolarTerm(date);
-        // 获取该日期的农事数据
-        const typeName = getTaskByDate(formatDate(date));
-
-        daysList.push({
-            day: date.getDate(),
-            date: formatDate(date),
-            isToday: formatDate(date) === formatDate(today),
-            dayOfWeek: displayDayOfWeek,
-            solarTerm: solarTerm, // 使用真实计算的节气数据
-            isHeatWarning: i === 5,
-            typeName: typeName, // 使用传入的任务数据
-        });
-    }
-    return daysList;
-});
-
-// 根据日期获取农事数据
-function getTaskByDate(dateStr) {
-    if (!taskListData.value || taskListData.value.length === 0) {
-        return null;
-    }
-    // 查找匹配日期的农事
-    const matchedTasks = taskListData.value.filter(task => {
-        if (!task.expectedExecuteDate && !task.executeDeadlineDate) return false;
-        // 格式化日期字符串进行比较(确保格式一致)
-        const taskDate = formatDate(new Date(task.expectedExecuteDate || task.executeDeadlineDate));
-        return taskDate === dateStr;
-    });
-
-    if (matchedTasks.length === 0) {
-        return null;
-    }
-
-    // const farmWorkNames = matchedTasks.map(task => task.farmWorkName || '').filter(Boolean);
-    return {
-        lengthVal: matchedTasks.length,
-        // farmWorkName: farmWorkNames.length > 1 ? farmWorkNames.join('、') : farmWorkNames[0] || ''
-    };
-}
-
-function setSolarTerm(taskList) {
-    // 存储任务列表数据
-    taskListData.value = taskList || [];
-    // 为每个任务计算节气
-    for (let task of taskListData.value) {
-        if (task.expectedExecuteDate || task.executeDeadlineDate) {
-            task.solarTerm = getSolarTerm(new Date(task.expectedExecuteDate || task.executeDeadlineDate));
-        }
-    }
-}
-
-const expiredCounts = ref(0);
-const completedCounts = ref(0);
-function setCounts(index, counts) {
-    if (index === 2) {
-        completedCounts.value = counts;
-    } else if (index === 3) {
-        expiredCounts.value = counts;
-    }
-}
-
-// 清除选中状态
-const clearSelection = () => {
-    activeDay.value = null;
-    selectedDate.value = null;
-};
-
-defineExpose({
-    setSolarTerm,
-    setCounts,
-    clearSelection
-});
-
-const dateRange = computed(() => {
-    let start = calendarDays.value[0].date;
-    start = start.replace(/-/g, ".");
-    let end = calendarDays.value[6].date;
-    end = end.replace(/^\d{4}-(\d{2})-(\d{2})$/, "$1.$2");
-    return { start, end };
-});
-
-function getAlignedStartDate(referenceDate) {
-    const start = new Date(referenceDate);
-    const dayOfWeek = start.getDay();
-    start.setDate(start.getDate() - dayOfWeek + (dayOfWeek === 0 ? -13 : 1)); // 对齐至周一,确保21天周期合理
-    return start;
-}
-
-function formatDate(date) {
-    // String(currentMonth.value).padStart(2, "0")
-    return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(
-        2,
-        "0"
-    )}`;
-}
-
-// 获取指定日期的节气
-function getSolarTerm(date) {
-    try {
-        const year = date.getFullYear();
-        const month = date.getMonth() + 1; // getMonth() 返回 0-11,需要加1
-        const day = date.getDate();
-        const lunar = solarLunar.solar2lunar(year, month, day);
-        // lunar.term 返回节气名称,如果没有节气则返回空字符串
-        return lunar.term || null;
-    } catch (error) {
-        console.error("获取节气失败:", error);
-        return null;
-    }
-}
-
-function prevPeriod() {
-    startDate.value.setDate(startDate.value.getDate() - 7);
-    startDate.value = new Date(startDate.value);
-}
-
-function nextPeriod() {
-    startDate.value.setDate(startDate.value.getDate() + 7);
-    startDate.value = new Date(startDate.value);
-}
-
-const activeDay = ref(null);
-const emit = defineEmits(['dateSelect']);
-
-const selectDate = (date, day) => {
-    // 如果点击的是已选中的日期,取消选中
-    if (activeDay.value === date) {
-        activeDay.value = null;
-        selectedDate.value = null;
-        emit('dateSelect', null); // 传递 null 表示取消筛选
-    } else {
-        activeDay.value = date;
-        selectedDate.value = `${date} (${day.dayOfWeek})`;
-        emit('dateSelect', date); // 传递选中的日期
-    }
-};
-
-// 初始化时不选择任何日期(默认不选中)
-// onMounted(() => {
-//     selectDate(formatDate(today), {
-//         day: today.getDate(),
-//         dayOfWeek: weekdaysShort[today.getDay() === 0 ? 6 : today.getDay() - 1],
-//     });
-// });
-
-function closeDialog() {
-    activeDay.value = null;
-}
-const selectedDate = ref(null);
-</script>
-
-<style lang="scss" scoped>
-.calendar {
-    width: 100%;
-    text-align: center;
-    box-sizing: border-box;
-    .header-wrap {
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        margin-bottom: 10px;
-        .header-l {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            width: 100%;
-            .top-c {
-                flex: 1;
-                text-align: center;
-            }
-            .header-text {
-                color: #000;
-                font-size: 16px;
-                font-weight: bold;
-                .center-line {
-                    position: relative;
-                    top: -3px;
-                }
-            }
-            .icon {
-                width: 20px;
-                height: 20px;
-                background: #F2F3F5;
-                border-radius: 50%;
-                text-align: center;
-                line-height: 20px;
-                &.icon-l {
-                    margin-right: 2px;
-                }
-                &.icon-r {
-                    margin-left: 2px;
-                }
-            }
-            .top-tag {
-                font-size: 12px;
-                padding: 0 8px;
-                height: 20px;
-                line-height: 20px;
-                border-radius: 20px;
-                &.red {
-                    color: #FF0000;
-                    background: rgba(255, 0, 0, 0.1);
-                }
-                &.orange {
-                    color: #FF790B;
-                    background: rgba(255, 149, 61, 0.2);
-                }
-            }
-        }
-        .header-r {
-            background: rgba(252, 138, 44, 0.12);
-            padding: 6px 10px;
-            border-radius: 28px;
-            color: #fc8a2c;
-            display: inline-flex;
-            align-items: center;
-            font-size: 10px;
-            .line {
-                width: 12px;
-                height: 1px;
-                margin-right: 5px;
-                background: #fc8a2c;
-            }
-        }
-    }
-}
-
-.weekdays {
-    display: grid;
-    grid-template-columns: repeat(7, 1fr);
-    font-size: 12px;
-}
-.days {
-    display: grid;
-    grid-template-columns: repeat(7, 1fr);
-    // gap: 5px;
-    font-size: 12px;
-    .days-item + .days-item {
-        margin-left: 6px;
-    }
-    .days-item {
-        cursor: pointer;
-        position: relative;
-        &.today {
-            min-height: 70px;
-            .day-box {
-                color: #2199f8;
-            }
-        }
-
-        &.activeDay {
-            .day-box {
-                color: #fff;
-                background: linear-gradient(136deg, #9fd5ff, #2199f8);
-            }
-        }
-        .day-box {
-            background: #ffffff;
-            color: #000;
-            border-radius: 8px;
-            padding: 7px 0;
-            position: relative;
-            .days-week {
-                font-size: 12px;
-            }
-        }
-        .solar-term {
-            padding-top: 3px;
-            color: #8D8D8D;
-            font-size: 12px;
-        }
-        .type-num {
-            position: absolute;
-            top: -5px;
-            right: -5px;
-            color: #fff;
-            font-size: 10px;
-            background: #2199F8;
-            width: 14px;
-            height: 14px;
-            line-height: 16px;
-            border-radius: 50%;
-        }
-        .days-one {
-            text-align: center;
-            display: block;
-            margin: 0 auto;
-            font-size: 14px;
-            line-height: 16px;
-            font-weight: bold;
-            padding-top: 2px;
-            // width: 32px;
-            // height: 32px;
-            // line-height: 32px;
-            // border-radius: 50%;
-        }
-        .type-name {
-            font-size: 10px;
-            position: relative;
-            top: -4px;
-            border-radius: 12px;
-            position: relative;
-            background: #fff;
-            padding-top: 2px;
-            .type-text {
-                border-radius: 12px;
-                padding: 2px;
-            }
-        }
-    }
-}
-.today {
-    position: relative;
-    &::after {
-        content: "";
-        position: absolute;
-        left: 0;
-        right: 0;
-        bottom: 0;
-        margin: 0 auto;
-        width: 10px;
-        height: 10px;
-        background: url("@/assets/img/home/today.png") no-repeat center center / 100% 100%;
-    }
-    &.no-type {
-        &::after {
-            bottom: 14px;
-        }
-    }
-}
-</style>

+ 0 - 738
src/views/old_mini/task_condition/components/interact.vue

@@ -1,738 +0,0 @@
-<template>
-    <div class="task-page" :style="{ height: `calc(100vh - ${tabBarHeight}px - 50px)` }">
-        <div class="task-top">
-            <div class="map-container" ref="mapContainer"></div>
-        </div>
-        <div class="task-list">
-            <!-- <div class="list-filter">
-                <div class="filter-item" :class="{ active: activeIndex === 0 }" @click="handleActiveFilter(0)">
-                    待确认({{ taskCounts[0] || 0 }})
-                </div>
-                <div class="filter-item" :class="{ active: activeIndex === 2 }" @click="handleActiveFilter(2)">
-                    已确认({{ taskCounts[2] || 0 }})
-                </div>
-                <div class="filter-item" :class="{ active: activeIndex === 3 }" @click="handleActiveFilter(3)">
-                    待提醒({{ taskCounts[3] || 0 }})
-                </div>
-            </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> -->
-            <van-list
-                v-model:loading="loadingMore"
-                :finished="finished"
-                finished-text=""
-                @load="onLoad"
-                :immediate-check="false"
-            >
-                <div class="task-content" v-loading="loading && taskList.length === 0">
-                    <div class="task-item" v-for="(item, index) in taskList" :key="item.id || index">
-                        <div class="img-text-wrap">
-                            <div class="left-wrap">
-                                <div class="left-img">
-                                    <img src="@/assets/img/home/farm.png" alt="" />
-                                </div>
-                                <div class="right-text">
-                                    <div  class="farm-info">
-                                        <div class="farm-name van-ellipsis">{{ item?.farmName }}</div>
-                                        <div class="info-tag-wrap">
-                                            <div class="tag-item primary">
-                                                {{ item?.typeName }}
-                                            </div>
-                                            <div class="tag-item" :class="{ 'second': item.userType === 2 }">{{ item.userType === 1 ? '普通客户' : '托管客户' }}</div>
-                                        </div>
-                                    </div>
-                                    <div class="farm-addr">{{ item?.address }}</div>
-                                </div>
-                            </div>
-                            <div class="right-wrap" @click.stop="handleRemindCustomer(item)">提醒客户</div>
-                        </div>
-                        <div class="item-bottom">
-                            <div class="bottom-tag">
-                                <div class="tag-card" :class="{ active: item.sourceData?.daysUntilNext < 5 }">
-                                    <div class="card-content">
-                                        <div class="card-main-text">{{ item.sourceData?.currentPhenologyName || '--' }}</div>
-                                        <div class="card-sub-text">
-                                            当前物候期
-                                            <!-- <span class="card-icon" @click="handleSelectCurrentPhenology(item)">
-                                                <el-icon><Edit /></el-icon>
-                                            </span> -->
-                                        </div>
-                                    </div>
-                                </div>
-                                <div class="tag-card">
-                                    <div class="card-content">
-                                        <div class="card-main-text">{{ item.sourceData?.currentPhenologyStartDate || '--' }}</div>
-                                        <div class="card-sub-text">起始时间</div>
-                                    </div>
-                                </div>
-                                <div class="tag-card">
-                                    <div class="card-content">
-                                        <div class="card-main-text">{{ item.sourceData?.daysUntilNext || '--' }}天</div>
-                                        <div class="card-sub-text">预计下次物候</div>
-                                    </div>
-                                </div>
-                            </div>
-
-                            <!-- 时间轴组件 -->
-                            <AgriculturalInteractionCard :item="item" @updateList="resetAndLoad" />
-                        </div>
-                    </div>
-                    <div class="empty-data" v-if="!loading && taskList.length === 0">暂无数据</div>
-                </div>
-            </van-list>
-        </div>
-    </div>
-    <upload-execute ref="uploadExecuteRef" :onlyShare="onlyShare" @uploadSuccess="handleUploadSuccess" />
-    <!-- 服务报价单 -->
-    <price-sheet-popup :key="activeIndex" ref="priceSheetPopupRef"></price-sheet-popup>
-    <!-- 新增:激活上传弹窗 -->
-    <active-upload-popup ref="activeUploadPopupRef" @handleUploadSuccess="handleUploadSuccess"></active-upload-popup>
-</template>
-
-<script setup>
-import { computed, nextTick, onActivated, onMounted, ref, watch } from "vue";
-import { useRoute } from "vue-router";
-import { useStore } from "vuex";
-import { List as VanList } from "vant";
-import IndexMap from "../../farm_manage/map/index";
-import { useRouter } from "vue-router";
-import uploadExecute from "./uploadExecute.vue";
-import priceSheetPopup from "@/components/popup/priceSheetPopup.vue";
-import { ElMessage } from "element-plus";
-import activeUploadPopup from "@/components/popup/activeUploadPopup.vue";
-import AgriculturalInteractionCard from "@/components/pageComponents/AgriculturalInteractionCard.vue";
-
-const store = useStore();
-const router = useRouter();
-const route = useRoute();
-const indexMap = new IndexMap();
-const mapContainer = ref(null);
-const tabBarHeight = computed(() => store.state.home.tabBarHeight);
-const uploadExecuteRef = ref(null);
-
-const selectParma = ref({
-    farmWorkTypeId: null,
-    districtCode: null,
-});
-
-// 任务列表数据(用于显示,可能被筛选)
-const taskList = ref([]);
-// 各状态任务数量
-const taskCounts = ref([0, 0, 0]);
-// 当前选中的筛选索引
-const activeIndex = ref(2);
-const noData = ref(false);
-const loading = ref(true);
-// 分页相关
-const page = ref(0);
-const limit = ref(10);
-const loadingMore = ref(false);
-const finished = ref(false);
-
-// 查询未来农事预警
-const getFutureFarmWorkWarning = async (item) => {
-    const res = await VE_API.home.listFutureFarmWorkWarning({ farmId: item.farmId });
-    item.timelineList = res.data || [];
-};
-
-const taskItemRefs = ref([]);
-const handleUploadSuccess = async () => {
-    // 刷新列表
-    await resetAndLoad();
-
-    // 等待 DOM 更新完成,refs 被重新收集
-    await nextTick();
-
-    // 更新所有task-item的triggerImg
-    taskItemRefs.value.forEach((ref) => {
-        if (ref && ref.updateTriggerImg) {
-            ref.updateTriggerImg();
-        }
-    });
-};
-
-const cityCode = ref("");
-//根据城市的坐标返回区县列表
-const districtList = ref([]);
-function getDistrictListByCity() {
-    VE_API.z_farm_work_record.getDistrictListByCity({ point: mapPoint.value }).then(({ data }) => {
-        districtList.value = data || [];
-        // cityCode.value = data[0].code.slice(0, -2);
-        cityCode.value = "";
-        districtList.value.unshift({ code: cityCode.value, name: "全部" });
-        selectParma.value.districtCode = cityCode.value;
-        resetAndLoad();
-    });
-}
-
-//农事类型列表
-const farmWorkTypeList = ref([]);
-function getFarmWorkTypeList() {
-    VE_API.z_farm_work_record.getFarmWorkTypeList().then(({ data }) => {
-        farmWorkTypeList.value = data;
-        farmWorkTypeList.value.unshift({ id: 0, name: "全部" });
-    });
-}
-
-const mapPoint = ref(null);
-
-onMounted(() => {
-    mapPoint.value = store.state.home.miniUserLocationPoint;
-    // getDistrictListByCity();
-    resetAndLoad();
-    getFarmWorkTypeList();
-    nextTick(() => {
-        indexMap.initMap(mapPoint.value, mapContainer.value, true);
-    });
-});
-
-onActivated(() => {
-    if (route.query.noReload) {
-        return;
-    }
-    // 确保地图已初始化,使用 nextTick 等待 DOM 更新
-    nextTick(() => {
-        // 检查地图实例是否已初始化
-        if (!indexMap.kmap) {
-            // 如果地图未初始化,重新初始化
-            if (mapContainer.value) {
-                mapPoint.value = store.state.home.miniUserLocationPoint;
-                indexMap.initMap(mapPoint.value, mapContainer.value, true);
-                // 等待地图初始化完成后再加载数据
-                setTimeout(() => {
-                    resetAndLoad();
-                }, 300);
-                return;
-            }
-        } else {
-            // 如果地图已初始化,需要等待 tab 切换完成,容器完全可见后再更新尺寸
-            // Tab 切换时容器可能被隐藏,需要更长的延迟确保容器可见
-            if (mapContainer.value && indexMap.kmap.map) {
-                // 检查容器是否可见
-                const checkAndUpdateSize = () => {
-                    const container = mapContainer.value;
-                    if (container) {
-                        const rect = container.getBoundingClientRect();
-                        // 如果容器可见(有宽度和高度),更新地图尺寸
-                        if (rect.width > 0 && rect.height > 0) {
-                            indexMap.kmap.map.updateSize();
-                        } else {
-                            // 如果容器不可见,继续等待
-                            setTimeout(checkAndUpdateSize, 100);
-                        }
-                    }
-                };
-                // 延迟检查,确保 tab 切换完成
-                setTimeout(checkAndUpdateSize, 200);
-            }
-        }
-        resetAndLoad();
-    });
-});
-
-// 监听 activeIndex 变化,重新加载数据
-watch(activeIndex, () => {
-    resetAndLoad();
-});
-
-// 加载列表数据(支持分页)
-async function getSimpleList(isLoadMore = false) {
-    if (!isLoadMore) {
-        // 重置分页
-        page.value = 0;
-        finished.value = false;
-        taskList.value = [];
-        taskItemRefs.value = [];
-        loading.value = true;
-    } else {
-        loadingMore.value = true;
-    }
-
-    const params = {
-        ...selectParma.value,
-        page: page.value,
-        limit: limit.value,
-        flowStatus: 5,
-    };
-
-    try {
-        const { data } = await VE_API.home.listUnansweredFarms(params);
-
-        if (data && data.length > 0) {
-            // 为每个item初始化timelineList
-            const newItems = data.map((item) => {
-                let sourceData = item?.latestPhenologyProgressBroadcast?.sourceData;
-                if (sourceData) {
-                    try {
-                        sourceData = JSON.parse(sourceData);
-                    } catch (e) {
-                        console.error("解析sourceData失败:", e);
-                        sourceData = null;
-                    }
-                }
-                return {
-                    ...item,
-                    sourceData,
-                    timelineList: [],
-                };
-            });
-
-            // 串行请求,为每个农场获取时间轴数据
-            for (let i = 0; i < newItems.length; i++) {
-                await getFutureFarmWorkWarning(newItems[i]);
-            }
-
-            // 追加数据
-            const newTaskList = [...taskList.value, ...newItems];
-            taskList.value = newTaskList.filter(item => item.timelineList.length > 0);
-            
-            // 更新分页
-            page.value += 1;
-            
-            // 判断是否还有更多数据
-            if (data.length < limit.value) {
-                finished.value = true;
-            }
-
-            // 更新地图数据
-            indexMap.initData(taskList.value,'','farmPoint');
-        } else {
-            finished.value = true;
-            if (taskList.value.length === 0) {
-                noData.value = true;
-            }
-        }
-
-        // 数据处理完成后再设置loading为false
-        if (!isLoadMore) {
-            loading.value = false;
-        } else {
-            loadingMore.value = false;
-        }
-    } catch (error) {
-        console.error("获取任务列表失败:", error);
-        if (!isLoadMore) {
-            loading.value = false;
-        } else {
-            loadingMore.value = false;
-        }
-        finished.value = true;
-        if (taskList.value.length === 0) {
-            noData.value = true;
-        }
-    }
-}
-
-// 滚动加载更多
-const onLoad = () => {
-    if (!finished.value && !loadingMore.value) {
-        getSimpleList(true);
-    }
-};
-
-// 重置并重新加载
-const resetAndLoad = () => {
-    getSimpleList(false);
-};
-
-function handleActiveFilter(i) {
-    activeIndex.value = i;
-    selectParma.value.districtCode = cityCode.value;
-    selectParma.value.farmWorkTypeId = null;
-}
-
-const showUploadExecutePopup = (item) => {
-    if (item?.executeEvidence.length) {
-        onlyShare.value = true;
-    } else {
-        onlyShare.value = false;
-    }
-    setTimeout(() => {
-        uploadExecuteRef.value.showPopup(item);
-    }, 10);
-};
-
-function toDetail(item) {
-    // if (activeIndex.value === 0) {
-    //     router.push({
-    //         path: "/modify_work",
-    //         query: { id: item.id },
-    //     });
-    // } else {
-    // }
-    router.push({
-        path: "/completed_work",
-        query: { miniJson: JSON.stringify({ id: item.id }) },
-    });
-}
-
-const onlyShare = ref(false);
-const phenologyList = ref([
-    {
-        id: 1,
-        name: "花芽分化",
-    },
-    {
-        id: 2,
-        name: "开花",
-    },
-    {
-        id: 3,
-        name: "成熟",
-    },
-]);
-
-const activeUploadPopupRef = ref(null);
-function handleSelectCurrentPhenology(item) {
-    activeUploadPopupRef.value.showPopup({
-        gardenIdVal: item.farmId,
-        problemTitleVal: "进入 物候期 的时间",
-        imgDescVal: "请上传凭证(转入农事任务凭证)",
-        arrangeIdVal: item.farmWorkArrangeId,
-        selectCurrentPhenologyVal: true,
-        phenologyListVal: phenologyList.value,
-    });
-}
-
-function handleRemindCustomer(item) {
-    router.push({
-        path: "/remind_customer",
-        query: { farmId: item.farmId },
-    });
-}
-</script>
-
-<style lang="scss" scoped>
-.task-page {
-    width: 100%;
-    height: calc(100vh - 50px - 50px);
-    overflow: auto;
-    box-sizing: border-box;
-    background: #f5f7fb;
-    .map-container {
-        width: 100%;
-        height: 162px;
-        clip-path: inset(0px round 8px);
-    }
-
-    .select-group {
-        display: flex;
-        padding: 0px 12px 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);
-                }
-            }
-        }
-    }
-
-    .task-top {
-        padding: 10px 12px 0 12px;
-    }
-
-    .task-content-loading {
-        height: 80px;
-        border-radius: 8px;
-        position: absolute;
-        top: 60px;
-        left: 0;
-        width: 100%;
-    }
-
-    .task-content {
-        min-height: 80px;
-    }
-
-    .empty-data {
-        text-align: center;
-        font-size: 14px;
-        color: #6f7274;
-        padding: 20px 0;
-    }
-    .task-list {
-        position: relative;
-        background: #fff;
-        padding: 12px 12px 8px 12px;
-    }
-    .list-filter {
-        display: flex;
-        align-items: center;
-        justify-content: space-around;
-        .filter-item {
-            padding: 0 12px;
-            height: 28px;
-            color: rgba(0, 0, 0, 0.5);
-            font-size: 14px;
-            line-height: 28px;
-            border-radius: 20px;
-            &.active {
-                color: #2199f8;
-                background: rgba(33, 153, 248, 0.2);
-            }
-        }
-    }
-    .task-item {
-        border-radius: 12px;
-        border: 0.3px solid rgba(0, 0, 0, 0.2);
-        padding: 12px;
-    }
-
-    .task-item + .task-item {
-        margin-top: 10px;
-    }
-
-    .img-text-wrap {
-        display: flex;
-        align-items: flex-start;
-        justify-content: space-between;
-        padding-bottom: 10px;
-        border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
-        .left-wrap {
-            display: flex;
-            align-items: center;
-            width: calc(100% - 45px);
-            .left-img {
-                width: 40px;
-                height: 40px;
-                border-radius: 6px;
-                img {
-                    width: 100%;
-                    height: 100%;
-                    object-fit: contain;
-                }
-            }
-            .right-text {
-                padding-left: 8px;
-                width: calc(100% - 50px);
-                .farm-info {
-                    font-size: 14px;
-                    color: #1d2129;
-                    display: flex;
-                    align-items: center;
-                    .farm-name{
-                        max-width: calc(100% - 133px);
-                    }
-                    .info-tag-wrap {
-                        margin-left: 10px;
-                        display: flex;
-                        align-items: center;
-                        gap: 4px;
-                        .tag-item {
-                            height: 20px;
-                            line-height: 20px;
-                            padding: 0 8px;
-                            border-radius: 2px;
-                            font-size: 12px;
-                            color: #848282;
-                            background-color: rgba(148, 148, 148, 0.1);
-                            &.second {
-                                color: #ff953d;
-                                background: rgba(255, 149, 61, 0.1);
-                            }
-                            &.primary {
-                                color: #2199f8;
-                                background: #e8f3ff;
-                            }
-                        }
-                    }
-                }
-                .farm-addr {
-                    padding-top: 2px;
-                    font-size: 12px;
-                    color: #86909c;
-                }
-            }
-        }
-        .right-wrap {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            text-align: center;
-            color: #fff;
-            background: #2199f8;
-            font-size: 12px;
-            flex: none;
-            width: 44px;
-            height: 44px;
-            padding: 8px;
-            border-radius: 5px;
-            box-sizing: border-box;
-            .click-item {
-                display: flex;
-                align-items: center;
-                gap: 2px;
-            }
-            .follow-text {
-                color: #d0d0d0;
-            }
-        }
-    }
-
-    .item-bottom {
-        padding-top: 10px;
-        .bottom-tag {
-            display: flex;
-            gap: 10px;
-            .tag-card {
-                flex: 1;
-                border-radius: 2px;
-                padding: 4px;
-                box-sizing: border-box;
-                border: 0.4px solid rgba(215, 215, 215, 0.5);
-                .card-content {
-                    display: flex;
-                    flex-direction: column;
-                    align-items: center;
-                    justify-content: center;
-                    text-align: center;
-                    height: 100%;
-                    .card-main-text {
-                        font-size: 16px;
-                        font-weight: 500;
-                        color: #202020;
-                        margin-bottom: 2px;
-                    }
-                    .card-sub-text {
-                        font-size: 10px;
-                        color: rgba(32, 32, 32, 0.4);
-                        display: flex;
-                        align-items: center;
-                        gap: 4px;
-                        .card-icon {
-                            display: inline-flex;
-                            align-items: center;
-                            justify-content: center;
-                            width: 12px;
-                            height: 12px;
-                            color: #2199f8;
-                        }
-                    }
-                }
-                &.active {
-                    background: rgba(33, 153, 248, 0.1);
-                    border: 0.5px solid #2199f8;
-                    .card-content {
-                        .card-main-text {
-                            color: #2199f8;
-                        }
-                        .card-sub-text {
-                            color: #2199f8;
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    .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 {
-            color: #8b8b8b;
-            font-size: 12px;
-            &.primary-btn {
-                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;
-                .share-icon {
-                    width: 12px;
-                    padding-right: 4px;
-                }
-            }
-            &.farm-name-text {
-                font-size: 14px;
-                color: #6f7274;
-                .name-text {
-                    padding-left: 4px;
-                }
-            }
-        }
-        .footer-r {
-            display: flex;
-            align-items: center;
-            .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;
-                }
-                .btn-icon {
-                    padding-right: 4px;
-                }
-                &.warning {
-                    color: #ff953d;
-                    background: #fff;
-                    border: 1px solid #ff953d;
-                }
-                &.secondary-text {
-                    color: #2199f8;
-                    border: 1px solid #2199f8;
-                }
-            }
-            .btn + .btn {
-                margin-left: 8px;
-            }
-        }
-    }
-}
-</style>

+ 0 - 155
src/views/old_mini/task_condition/components/remindCustomer.vue

@@ -1,155 +0,0 @@
-<template>
-    <div class="service-records-page">
-        <custom-header name="提醒客户"></custom-header>
-        <div class="record-list" v-if="recordList && recordList.length">
-            <div v-for="(item, index) in recordList" :key="index" class="record-card">
-                <img class="thumb" :src="item.postInfo.media && item.postInfo.media[0]" alt="暂无图片" />
-                <div class="card-body" @click="handleItemClick(item)">
-                    <div class="card-body-left">
-                        <div class="title van-multi-ellipsis--l2">{{ item.postInfo.title }}</div>
-                        <div class="date">{{item.interactionTime }}</div>
-                    </div>
-                    <div class="forward-btn" @click.stop="handleShare(item)">转发</div>
-                </div>
-            </div>
-        </div>
-        <div v-else class="empty-wrap">
-            <div class="empty-text">暂无数据</div>
-        </div>
-    </div>
-    <fn-share-sheet v-model:show="showShareSheet" :options="shareOptions" @select="handleShareSelect" />
-</template>
-<script setup>
-import { ref, onMounted } from "vue";
-import customHeader from "@/components/customHeader.vue";
-import { useRouter, useRoute } from "vue-router";
-import wx from "weixin-js-sdk";
-import FnShareSheet from "@/components/pageComponents/FnShareSheet.vue";
-const router = useRouter();
-const route = useRoute();
-// 服务记录列表数据
-const recordList = ref([]);
-const showShareSheet = ref(false);
-const shareOptions = ref([{ name: "微信", icon: "wechat", type: "wechat" }]);
-const handleShareSelect = () => {
-    const query = {
-        askInfo: { title: "提醒客户", content: "是否分享该提醒给好友" },
-        shareText: shareParams.value.title,
-        targetUrl: `warning_detail`,
-        paramsPage: JSON.stringify(shareParams.value),
-        imageUrl: shareParams.value.imageUrl,
-    };
-    wx.miniProgram.navigateTo({
-        url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
-    });
-};
-
-const shareParams = ref({});
-const handleShare = (data) => {
-    shareParams.value = {
-        id: data.postInfo.postId,
-        title: data.postInfo.title,
-        questTitle: data.interactionQuestion,
-        arrangeId: data.arrangeId,
-        farmId: route.query.farmId,
-        imageUrl: data.postInfo.media[0],
-    };
-    showShareSheet.value = true;
-};
-
-onMounted(() => {
-    getListWithAnswer();
-});
-
-const getListWithAnswer = async () => {
-    const { data } = await VE_API.user.listWithAnswer({ farmId: route.query.farmId });
-    if (data.length) {
-        recordList.value = data;
-    }
-};
-const formatDate = (dateStr) => {
-    if (!dateStr) return "--";
-    const date = new Date(dateStr);
-    if (Number.isNaN(date.getTime())) return dateStr;
-    const y = date.getFullYear();
-    const m = `${date.getMonth() + 1}`.padStart(2, "0");
-    const d = `${date.getDate()}`.padStart(2, "0");
-    return `${y}-${m}-${d}`;
-};
-
-// 处理列表项点击
-const handleItemClick = (data) => {
-    router.push({
-        path: "/warning_detail",
-        query: {
-            id: data.postInfo.postId,
-            questTitle: data.interactionQuestion,
-            arrangeId: data.arrangeId,
-            farmId: route.query.farmId,
-        },
-    });
-};
-</script>
-<style lang="scss" scoped>
-.service-records-page {
-    width: 100%;
-    min-height: 100vh;
-    background: #f5f5f5;
-    .record-list {
-        padding: 10px 12px;
-        display: flex;
-        flex-direction: column;
-        gap: 10px;
-    }
-    .record-card {
-        display: flex;
-        gap: 12px;
-        padding: 12px 10px;
-        background: #ffffff;
-        border-radius: 12px;
-        align-items: center;
-        height: 98px;
-        box-sizing: border-box;
-        .thumb {
-            width: 80px;
-            height: 74px;
-            border-radius: 8px;
-            object-fit: cover;
-        }
-        .card-body {
-            width: calc(100% - 80px - 12px);
-            height: 100%;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            .card-body-left {
-                width: calc(100% - 62px - 12px);
-                height: 95%;
-                display: flex;
-                flex-direction: column;
-                justify-content: space-between;
-                .date {
-                    font-size: 13px;
-                    color: #86909c;
-                    margin-top: 4px;
-                }
-            }
-        }
-        .forward-btn {
-            padding: 6px 19px;
-            background: rgba(33, 153, 248, 0.1);
-            color: #2199f8;
-            border-radius: 25px;
-            font-size: 12px;
-        }
-    }
-    .empty-wrap {
-        padding-top: 40px;
-        text-align: center;
-        .empty-text {
-            font-size: 14px;
-            color: #86909c;
-        }
-    }
-}
-</style>

+ 0 - 699
src/views/old_mini/task_condition/components/reviewPopup.vue

@@ -1,699 +0,0 @@
-<template>
-    <popup class="price-sheet-popup" :overlay-style="{'z-index': 9999}" teleport="body" v-model:show="showPopup">
-        <div class="price-sheet-content">
-            <div class="price-sheet-content-inner">
-                <div class="sheet-content">
-                    <div class="review-image">
-                        <div class="vs-wrap" v-if="preImg">
-                            <img src="@/assets/img/home/vs.png" alt="" />
-                        </div>
-                        <div class="review-image-item" v-if="preImg">
-                            <div class="review-image-item-title">农事前</div>
-                            <img class="review-image-item-img" :src="preImg" alt="" />
-                        </div>
-                        <div class="review-image-item" v-if="resImg">
-                            <div class="review-image-item-title">农事后</div>
-                            <img class="review-image-item-img" :src="resImg" alt="" />
-                        </div>
-                    </div>
-                    <!-- 报价详情区域 -->
-                    <div class="quotation-info">
-                        <div class="info-item">
-                            <span class="info-label">执行农资</span>
-                            <span class="info-value">{{ quotationData.serviceMain || "--" }}</span>
-                        </div>
-                        <div class="info-item">
-                            <span class="info-label">农事名称</span>
-                            <span class="info-value">{{ quotationData?.farmWorkName || "--" }}</span>
-                        </div>
-                        <!-- <div class="info-item flex-wrap">
-                            <div class="info-label">复核成效</div>
-                            <div class="info-value">
-                                促进分蘖芽萌发、加快分蘖生长,同时补充氮素等关键养分,增强植株长势,为形成足够穗数、提高群体产量打基础。
-                            </div>
-                        </div> -->
-
-                        <div class="info-item flex-wrap">
-                            <div class="info-label">药肥处方</div>
-                            <div class="info-value">
-                                <div class="rescription" v-if="quotationData?.prescriptionList">
-                                    <span
-                                        v-for="(fertilizer, fertilizerI) in quotationData.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 !== quotationData.prescriptionList.length - 1
-                                                "
-                                            >
-                                                +
-                                            </span>
-                                        </span>
-                                    </span>
-                                </div>
-                                <div class="rescription" v-else>无处方</div>
-                            </div>
-                        </div>
-                    </div>
-
-                    <div class="bottom-info">
-                        <div class="bottom-l">
-                            <div class="l-img">
-                                <img src="@/assets/img/home/bird.png" alt="" />
-                            </div>
-                            <div class="l-text">
-                                <div class="l-text-title">飞鸟管家</div>
-                                <div class="l-text-time">扫描二维码,查看更多详情</div>
-                            </div>
-                        </div>
-                        <div class="bottom-r">
-                            <img src="@/assets/img/home/qrcode.png" alt="" />
-                        </div>
-                    </div>
-                </div>
-            </div>
-
-            <!-- 底部操作按钮 -->
-            <div class="bottom-actions" @click.stop="showPopup = false">
-                <div class="action-buttons">
-                    <div class="action-btn blue-btn" @click.stop="handleShare">
-                        <div class="icon-circle">
-                            <img src="@/assets/img/home/bird.png" alt="" />
-                        </div>
-                        <span class="btn-label">飞鸟用户</span>
-                    </div>
-                    <div class="action-btn green-btn" @click.stop="handleWechat">
-                        <div class="icon-circle">
-                            <img src="@/assets/img/home/wechat.png" alt="" />
-                        </div>
-                        <span class="btn-label">微信</span>
-                    </div>
-                    <!-- <div class="action-btn orange-btn">
-                        <div class="icon-circle">
-                            <el-icon :size="24"><Download /></el-icon>
-                        </div>
-                        <span class="btn-label">保存图片</span>
-                    </div> -->
-                </div>
-                <div class="cancel-btn" @click="handleCancel">取消</div>
-            </div>
-        </div>
-    </popup>
-</template>
-
-<script setup>
-import { Popup } from "vant";
-import { ref, computed, onActivated } from "vue";
-import { useRouter } from "vue-router";
-import { ElMessage } from "element-plus";
-import wx from "weixin-js-sdk";
-import html2canvas from "html2canvas";
-
-const router = useRouter();
-const showPopup = ref(false);
-const contentEl = ref(null);
-const preImg = ref("");
-const resImg = ref("");
-// 报价数据
-const quotationData = ref({});
-
-onActivated(() => {});
-const recordId = ref("");
-const handleShowPopup = async (id, preImgVal, resImgVal) => {
-    recordId.value = id;
-    await getDetail();
-    preImg.value = preImgVal;
-    resImg.value = resImgVal;
-    showPopup.value = true;
-};
-
-async function getDetail() {
-    const { data } = await VE_API.z_farm_work_record.getDetail({ id: recordId.value });
-    quotationData.value = data[0];
-}
-
-const handleShare = () => {
-    const userId = quotationData.value.farmMiniUserId;
-    const parmasPage = {
-        farmWorkOrderId: quotationData.value.orderId,
-        farmMiniUserId: userId,
-        farmMiniUserName: quotationData.value.farmMiniUserName,
-        farmId: quotationData.value.farmId,
-        farmWorkName: quotationData.value.farmWorkName,
-        id: quotationData.value.id,
-        imageList: [resImg.value],
-        type: "reviewWork",
-    };
-    if (userId) {
-        router.push(
-            `/chat_frame?userId=${userId}&farmId=${
-                parmasPage.farmId
-            }&pageParams=${JSON.stringify(parmasPage)}`
-        );
-    } else {
-        ElMessage.warning("尚未绑定用户,暂时无法分享");
-    }
-};
-
-const handleWechat = () => {
-    console.log("handleWechat");
-    // router.push({
-    //     path: "/completed_work",
-    //     query: { id: quotationData.value.id, farmWorkOrderId: quotationData.value.orderId, isAssign: true },
-    // });
-    const query = {
-        askInfo: { title: "农事执行成果", content: "是否分享该农事执行成果给好友" },
-        shareText: "向您分享了农事执行成果",
-        id: recordId.value,
-        postImg: resImg.value,
-    };
-
-    wx.miniProgram.navigateTo({
-        url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=reviewWork`,
-    });
-};
-
-const handleSaveImage = async () => {
-    try {
-        if (!contentEl.value) return;
-        const element = contentEl.value;
-        const scroller = element.querySelector(".sheet-content");
-
-        // 记录原样式
-        const prev = {
-            elementOverflow: element.style.overflow,
-            elementMaxHeight: element.style.maxHeight,
-            elementHeight: element.style.height,
-            scrollerOverflow: scroller ? scroller.style.overflow : undefined,
-            scrollerMaxHeight: scroller ? scroller.style.maxHeight : undefined,
-            scrollerHeight: scroller ? scroller.style.height : undefined,
-        };
-
-        // 展开内容,去除滚动限制,确保截图包含全部内容
-        element.style.overflow = "visible";
-        element.style.maxHeight = "none";
-        element.style.height = "auto";
-        if (scroller) {
-            scroller.style.overflow = "visible";
-            scroller.style.maxHeight = "none";
-            scroller.style.height = "auto";
-        }
-
-        // 计算完整尺寸
-        const width = element.scrollWidth;
-        const height = element.scrollHeight;
-
-        const canvas = await html2canvas(element, {
-            backgroundColor: "#ffffff",
-            useCORS: true,
-            allowTaint: true,
-            scale: Math.min(2, window.devicePixelRatio || 2),
-            width,
-            height,
-            windowWidth: width,
-            windowHeight: height,
-            scrollX: 0,
-            scrollY: 0,
-        });
-        const dataUrl = canvas.toDataURL("image/png");
-        const link = document.createElement("a");
-        link.href = dataUrl;
-        link.download = "服务报价单.png";
-        document.body.appendChild(link);
-        link.click();
-        document.body.removeChild(link);
-
-        // 还原样式
-        element.style.overflow = prev.elementOverflow;
-        element.style.maxHeight = prev.elementMaxHeight;
-        element.style.height = prev.elementHeight;
-        if (scroller) {
-            scroller.style.overflow = prev.scrollerOverflow;
-            scroller.style.maxHeight = prev.scrollerMaxHeight;
-            scroller.style.height = prev.scrollerHeight;
-        }
-    } catch (e) {
-        console.error("保存图片失败", e);
-    }
-};
-
-const handleCancel = () => {
-    showPopup.value = false;
-};
-
-defineExpose({
-    handleShowPopup,
-});
-</script>
-
-<style lang="scss" scoped>
-.price-sheet-popup {
-    z-index: 9999 !important;
-    width: 90%;
-    max-height: 90vh;
-    background: none;
-    border-radius: 12px;
-    overflow: hidden;
-    display: flex;
-    flex-direction: column;
-    backdrop-filter: 4px;
-
-    ::v-deep {
-        .van-popup__close-icon {
-            color: #000;
-            font-size: 18px;
-            top: 12px;
-            right: 12px;
-        }
-    }
-}
-
-.price-sheet-content {
-    display: flex;
-    flex-direction: column;
-    max-height: 90vh;
-    // height: 95vh;
-    .price-sheet-content-inner {
-        background: #fff;
-        border-radius: 12px;
-        display: flex;
-        flex-direction: column;
-        height: 100%;
-        overflow: hidden;
-    }
-}
-
-.sheet-content {
-    padding: 12px 12px 10px 12px;
-    flex: 1;
-    overflow-y: auto;
-    overflow-x: hidden;
-    position: relative;
-}
-.bottom-info {
-    padding: 16px 16px 16px 16px;
-    border-top: 1px dotted rgba(0, 0, 0, 0.3);
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    .bottom-l {
-        display: flex;
-        align-items: center;
-        gap: 8px;
-        .l-img {
-            img {
-                width: 40px;
-            }
-        }
-        .l-text-time {
-            font-size: 12px;
-        }
-    }
-    .bottom-r {
-        width: 40px;
-        height: 40px;
-        img {
-            width: 100%;
-            height: 100%;
-            object-fit: cover;
-        }
-    }
-}
-.review-image {
-    position: relative;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    gap: 8px;
-    .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;
-        }
-    }
-}
-
-// 报价详情区域
-.quotation-info {
-    margin-top: 12px;
-
-    .flex-wrap {
-        display: flex;
-        .info-label {
-            flex: none;
-        }
-    }
-
-    .info-item {
-        font-size: 14px;
-        color: #000;
-        margin-bottom: 8px;
-
-        .info-label {
-            padding-right: 8px;
-            color: rgba(0, 0, 0, 0.5);
-        }
-
-        .info-value {
-            color: #000;
-        }
-
-        &.catalog-label {
-            font-weight: bold;
-            margin-top: 10px;
-            margin-bottom: 10px;
-            position: relative;
-
-            .info-label {
-                color: #000;
-            }
-        }
-    }
-
-    .total-bar {
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        background: rgba(33, 153, 248, 0.1);
-        border: 1px solid rgba(33, 153, 248, 0.5);
-        height: 38px;
-        border-radius: 4px;
-
-        .total-label {
-            font-size: 14px;
-            color: #000000;
-        }
-
-        .total-value {
-            font-size: 22px;
-            font-weight: bold;
-            color: #2199f8;
-        }
-
-        .total-unit {
-            font-size: 14px;
-            color: #000;
-            margin-left: 4px;
-        }
-    }
-}
-
-// 药肥费用区域
-.fertilizer-cost-section {
-    margin-bottom: 10px;
-
-    .section-header {
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        margin-bottom: 8px;
-
-        .section-title {
-            font-size: 14px;
-            color: #000;
-        }
-
-        .section-total {
-            font-size: 16px;
-            font-weight: bold;
-            color: #000;
-
-            .unit-text {
-                padding-left: 2px;
-                font-size: 12px;
-                font-weight: normal;
-            }
-        }
-    }
-
-    .cost-table {
-        border: 1px solid rgba(225, 225, 225, 0.5);
-        border-radius: 5px;
-        overflow: hidden;
-
-        .table-header {
-            display: flex;
-            background: rgba(241, 241, 241, 0.4);
-            padding: 8px 6px;
-            font-size: 12px;
-            color: #767676;
-            border-bottom: 1px solid rgba(225, 225, 225, 0.5);
-
-            .col-1 {
-                width: 40px;
-                text-align: center;
-            }
-
-            .col-2 {
-                flex: 1;
-                text-align: center;
-            }
-
-            .col-3 {
-                width: 52px;
-                text-align: center;
-            }
-
-            .col-4 {
-                width: 56px;
-                text-align: center;
-            }
-
-            .col-5 {
-                width: 52px;
-                text-align: center;
-            }
-
-            .col-6 {
-                width: 52px;
-                text-align: center;
-            }
-        }
-
-        .table-row {
-            display: flex;
-            padding: 8px 6px;
-            font-size: 11px;
-            color: rgba(0, 0, 0, 0.6);
-            background: #fff;
-            border-bottom: 1px solid rgba(225, 225, 225, 0.3);
-
-            &:last-child {
-                border-bottom: none;
-            }
-
-            .col-1,
-            .col-2,
-            .col-3,
-            .col-4,
-            .col-5,
-            .col-6 {
-                display: flex;
-                align-items: center;
-                justify-content: center;
-            }
-
-            .col-1 {
-                width: 40px;
-            }
-
-            .col-2 {
-                flex: 1;
-            }
-
-            .col-3 {
-                width: 52px;
-            }
-
-            .col-4 {
-                width: 56px;
-            }
-
-            .col-5 {
-                width: 52px;
-            }
-
-            .col-6 {
-                width: 52px;
-            }
-        }
-    }
-}
-
-// 服务费用区域
-.service-cost-section {
-    position: relative;
-
-    .section-header {
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        margin-bottom: 12px;
-
-        .section-title {
-            font-size: 14px;
-            color: #000;
-        }
-
-        .section-total {
-            font-size: 16px;
-            font-weight: bold;
-            color: #000;
-
-            .unit-text {
-                padding-left: 2px;
-                font-size: 12px;
-                font-weight: normal;
-            }
-        }
-    }
-
-    .service-details {
-        display: flex;
-        align-items: center;
-        border: 1px solid rgba(206, 206, 206, 0.5);
-        padding: 8px 0;
-        border-radius: 4px;
-        margin-bottom: 10px;
-
-        .detail-item {
-            font-size: 14px;
-            flex: 1;
-            text-align: center;
-
-            .detail-label {
-                color: rgba(0, 0, 0, 0.2);
-                margin-top: 6px;
-            }
-
-            .detail-value {
-                color: rgba(0, 0, 0, 0.8);
-            }
-        }
-        .detail-item + .detail-item {
-            position: relative;
-            &::before {
-                content: "";
-                position: absolute;
-                left: 0;
-                top: 50%;
-                transform: translateY(-50%);
-                width: 1px;
-                height: 20px;
-                background: rgba(0, 0, 0, 0.1);
-            }
-        }
-    }
-}
-.edit-btn-box {
-    display: flex;
-    justify-content: end;
-    position: absolute;
-    right: 0;
-    top: -8px;
-    z-index: 10;
-}
-.edit-btn {
-    background: rgba(33, 153, 248, 0.1);
-    color: #2199f8;
-    padding: 6px 16px;
-    border-radius: 20px;
-    font-size: 14px;
-    width: fit-content;
-    cursor: pointer;
-}
-
-// 底部操作按钮
-.bottom-actions {
-    flex-shrink: 0;
-
-    .action-buttons {
-        padding: 16px;
-        display: flex;
-        justify-content: space-around;
-
-        .action-btn {
-            display: flex;
-            flex-direction: column;
-            align-items: center;
-            cursor: pointer;
-
-            .icon-circle {
-                width: 48px;
-                height: 48px;
-                border-radius: 50%;
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                color: #fff;
-                margin-bottom: 4px;
-
-                .el-icon {
-                    color: #fff;
-                }
-                img {
-                    width: 50px;
-                }
-            }
-
-            &.blue-btn .icon-circle {
-                background: #2199f8;
-            }
-
-            &.green-btn .icon-circle {
-                background: #07c160;
-            }
-
-            &.orange-btn .icon-circle {
-                background: #ff790b;
-            }
-
-            .btn-label {
-                font-size: 12px;
-                color: #fff;
-            }
-        }
-    }
-
-    .cancel-btn {
-        text-align: center;
-        font-size: 18px;
-        color: #fff;
-        cursor: pointer;
-    }
-}
-</style>

+ 0 - 758
src/views/old_mini/task_condition/components/task.vue

@@ -1,758 +0,0 @@
-<template>
-    <div class="task-page" :style="{ height: `calc(100vh - ${tabBarHeight}px - 50px)` }">
-        <div class="task-top">
-            <div class="map-container" ref="mapContainer"></div>
-            <div class="calendar-wrap">
-                <customCalendar ref="calendarRef" @dateSelect="handleDateSelect"></customCalendar>
-            </div>
-        </div>
-        <div class="task-list">
-            <div class="list-filter">
-                <div class="filter-item" :class="{ active: activeIndex === 0 }" @click="handleActiveFilter(0)">
-                    待完成({{ taskCounts[0] || 0 }})
-                </div>
-                <div class="filter-item" :class="{ active: activeIndex === 1 }" @click="handleActiveFilter(1)">
-                    已完成({{ taskCounts[1] || 0 }})
-                </div>
-                <div class="filter-item" :class="{ active: activeIndex === 2 }" @click="handleActiveFilter(2)">
-                    待复核({{ taskCounts[2] || 0 }})
-                </div>
-            </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="task-content-loading" v-if="loading && noData" v-loading="loading">
-            </div> -->
-            <div class="task-content" v-loading="loading">
-                <div class="task-item" v-for="(item, index) in taskList" :key="item.id || item.workRecordId">
-                    <task-item
-                        :key="activeIndex + '-' + index"
-                        :itemIndex="activeIndex"
-                        :status="activeIndex === 0 ? 0 : 1"
-                        :item-data="item"
-                        @handleUploadSuccess="handleUploadSuccess"
-                        :ref="(el) => setTaskItemRef(el, index)"
-                    >
-                        <template #footer>
-                            <div class="execute-wrap" v-if="activeIndex === 0">
-                                <img class="execute-icon" src="@/assets/img/monitor/execute-icon.png" alt="" />
-                                <span>{{ item.executorName }}</span>
-                            </div>
-                            <div class="item-footer" v-if="activeIndex === 2">
-                                <div class="footer-l farm-name-text van-ellipsis">
-                                    来自<span class="name-text">{{ item.farmName || "--" }}</span>
-                                </div>
-
-                                <div class="footer-r" v-if="item.reviewImage && item.reviewImage.length">
-                                    <div class="btn warning" @click="generateReport(item)">生成成果报告</div>
-                                </div>
-                                <div class="footer-r" v-else>
-                                    <div class="btn primary" :class="{ 'primary-text': getButtonText(item) }" @click="handleAction(item)">{{ getButtonText(item) ? '提醒复核' : '上传复核照片' }}</div>
-                                </div>
-                            </div>
-                            <div v-else-if="activeIndex === 1" class="item-footer">
-                                <div class="footer-l farm-name-text van-ellipsis">
-                                    来自<span class="name-text">{{ item.farmName || "--" }}</span>
-                                </div>
-                                <div class="footer-r">
-                                    <div class="btn warning" @click="generateReport(item)">生成成果报告</div>
-                                </div>
-                            </div>
-                            <div v-else-if="activeIndex === 0" class="item-footer">
-                                <div class="footer-l" @click="toDetail(item)">查看详情</div>
-                                <div class="footer-r" v-if="item.expectedExecuteDate">
-                                    <div
-                                        class="btn primary"
-                                        :class="{ 'primary-text': getButtonText(item) }"
-                                        @click="showUploadExecutePopup(item)"
-                                    >
-                                        {{ getButtonText(item) ? "提醒执行" : "上传照片" }}
-                                    </div>
-                                </div>
-                                <div class="footer-r" v-else>
-                                    <div
-                                        class="btn warning"
-                                        :class="{ 'primary-text': getButtonText(item) }"
-                                        @click="selectExecuteTime(item)"
-                                    >
-                                        {{ getButtonText(item) ? "提醒确认执行时间" : "确认执行时间" }}
-                                    </div>
-                                </div>
-                            </div>
-                        </template>
-                    </task-item>
-                </div>
-                <div class="empty-data" v-if="noData">暂无数据</div>
-            </div>
-        </div>
-    </div>
-    <upload-execute ref="uploadExecuteRef" :onlyShare="onlyShare" @uploadSuccess="handleUploadSuccess" />
-
-    <!-- 服务报价单 -->
-    <price-sheet-popup :key="activeIndex" ref="priceSheetPopupRef"></price-sheet-popup>
-    <offer-popup ref="offerPopupRef" @uploadSuccess="handleUploadSuccess"></offer-popup>
-
-    <!-- 确认执行时间 -->
-    <calendar
-        teleport="#app"
-        v-model:show="showCalendar"
-        @confirm="onConfirmExecuteTime"
-        :min-date="minDate"
-        :max-date="maxDate"
-    />
-</template>
-
-<script setup>
-import { computed, nextTick, onActivated, onMounted, ref, watch } from "vue";
-import { useStore } from "vuex";
-import { Popup, Calendar } from "vant";
-import IndexMap from "../../farm_manage/map/index";
-import taskItem from "@/components/taskItem.vue";
-import wx from "weixin-js-sdk";
-import customCalendar from "./calendar.vue";
-import { useRouter } from "vue-router";
-import uploadExecute from "./uploadExecute.vue";
-import priceSheetPopup from "@/components/popup/priceSheetPopup.vue";
-import { ElMessage } from "element-plus";
-import offerPopup from "@/components/popup/offerPopup.vue";
-import { formatDate } from "@/common/commonFun";
-
-const store = useStore();
-const router = useRouter();
-const indexMap = new IndexMap();
-const mapContainer = ref(null);
-const tabBarHeight = computed(() => store.state.home.tabBarHeight);
-const uploadExecuteRef = ref(null);
-const dateValue = ref("1");
-const calendarRef = ref(null);
-const showPopup = ref(false);
-const executionData = ref(null);
-const selectParma = ref({
-    farmWorkTypeId: null,
-    districtCode: null,
-});
-
-// 任务列表数据(用于显示,可能被筛选)
-const taskList = ref([]);
-// 完整的任务列表数据(用于日历显示,不被筛选影响)
-const fullTaskList = ref([]);
-// 各状态任务数量
-const taskCounts = ref([0, 0, 0]);
-// 当前选中的筛选索引
-const activeIndex = ref(0);
-// 筛选日期(用于按日期筛选)
-const filterDate = ref(null);
-const noData = ref(false);
-const loading = ref(false);
-
-// 根据 activeIndex 计算 startFlowStatus
-const getStartFlowStatus = (index) => {
-    const statusMap = {
-        0: 4, // 待完成
-        1: 5, // 已完成
-        2: 5, // 待复核
-    };
-    return statusMap[index] ?? 4;
-};
-
-// 获取单个状态的任务数量
-function getTaskCount(flowStatus, index) {
-    const location = store.state.home.miniUserLocationPoint;
-    // 根据传入的 index 参数来设置 needReview 和 includePrescription,而不是根据 activeIndex.value
-    const needReview = index === 2 ? 1 : null; // 待复核需要 needReview=1
-    const includePrescription = index === 0 ? false : true; // 待完成不需要处方,其他需要
-    return VE_API.z_farm_work_record
-        .getSimpleList({ role: 2, location, flowStatus, needReview, includePrescription })
-        .then(({ data }) => {
-            if (Array.isArray(data)) {
-                taskCounts.value[index] = data.length;
-                calendarRef.value && calendarRef.value.setCounts(index, taskCounts.value[index]);
-
-                if (index === 0) {
-                    calendarRef.value && calendarRef.value.setSolarTerm(data);
-                    indexMap.initData(data);
-                }
-            } else if (data?.total !== undefined) {
-                taskCounts.value[index] = data.total;
-            } else {
-                taskCounts.value[index] = 0;
-            }
-        })
-        .catch((error) => {
-            console.error(`获取状态${index}任务数量失败:`, error);
-            taskCounts.value[index] = 0;
-        });
-}
-
-const taskItemRefs = ref([]);
-const setTaskItemRef = (el, index) => {
-    if (el) {
-        taskItemRefs.value[index] = el;
-    }
-};
-
-const handleUploadSuccess = async () => {
-    // 刷新列表
-    await initTaskCounts();
-    // 加载当前选中状态的数据列表
-    getSimpleList();
-};
-
-const cityCode = ref("");
-//根据城市的坐标返回区县列表
-const districtList = ref([]);
-function getDistrictListByCity() {
-    VE_API.z_farm_work_record.getDistrictListByCity({ point: mapPoint.value }).then(({ data }) => {
-        districtList.value = data || [];
-        // cityCode.value = data[0].code.slice(0, -2);
-        cityCode.value = "";
-        districtList.value.unshift({ code: cityCode.value, name: "全部" });
-        selectParma.value.districtCode = cityCode.value;
-        getSimpleList();
-    });
-}
-
-//农事类型列表
-const farmWorkTypeList = ref([]);
-function getFarmWorkTypeList() {
-    VE_API.z_farm_work_record.getFarmWorkTypeList().then(({ data }) => {
-        farmWorkTypeList.value = data;
-        farmWorkTypeList.value.unshift({ id: 0, name: "全部" });
-    });
-}
-
-// 初始化时获取所有状态的任务数量
-function initTaskCounts() {
-    // 并行请求状态的数量
-    Promise.all([
-        getTaskCount(4, 0), // 待完成
-        getTaskCount(5, 1), // 已完成
-        getTaskCount(5, 2), // 待复核
-    ]);
-}
-const mapPoint = ref(null);
-
-const agriculturalRole = ref(null);
-const userId = ref(null);
-onMounted(() => {
-    mapPoint.value = store.state.home.miniUserLocationPoint;
-    const userInfo = JSON.parse(localStorage.getItem("localUserInfo"));
-    agriculturalRole.value = userInfo.agriculturalRole;
-    userId.value = userInfo.id;
-    // 初始化时获取所有状态的数量
-    initTaskCounts();
-    // 加载当前选中状态的数据列表
-    getSimpleList();
-    getDistrictListByCity();
-    getFarmWorkTypeList();
-    nextTick(() => {
-        indexMap.initMap(mapPoint.value, mapContainer.value, true);
-    });
-});
-
-onActivated(() => {
-    // 确保地图已初始化,使用 nextTick 等待 DOM 更新
-    nextTick(() => {
-        // 检查地图实例是否已初始化
-        if (!indexMap.kmap) {
-            // 如果地图未初始化,重新初始化
-            if (mapContainer.value) {
-                mapPoint.value = store.state.home.miniUserLocationPoint;
-                indexMap.initMap(mapPoint.value, mapContainer.value, true);
-                // 等待地图初始化完成后再加载数据
-                setTimeout(() => {
-                    initTaskCounts();
-                    getSimpleList();
-                }, 300);
-                return;
-            }
-        } else {
-            // 如果地图已初始化,需要等待 tab 切换完成,容器完全可见后再更新尺寸
-            // Tab 切换时容器可能被隐藏,需要更长的延迟确保容器可见
-            if (mapContainer.value && indexMap.kmap.map) {
-                // 检查容器是否可见
-                const checkAndUpdateSize = () => {
-                    const container = mapContainer.value;
-                    if (container) {
-                        const rect = container.getBoundingClientRect();
-                        // 如果容器可见(有宽度和高度),更新地图尺寸
-                        if (rect.width > 0 && rect.height > 0) {
-                            indexMap.kmap.map.updateSize();
-                        } else {
-                            // 如果容器不可见,继续等待
-                            setTimeout(checkAndUpdateSize, 100);
-                        }
-                    }
-                };
-                // 延迟检查,确保 tab 切换完成
-                setTimeout(checkAndUpdateSize, 200);
-            }
-        }
-        // 初始化时获取所有状态的数量
-        initTaskCounts();
-        getSimpleList();
-    });
-});
-
-// 标记是否正在通过日期选择切换筛选(避免 watch 清除日期筛选)
-const isDateSelecting = ref(false);
-
-// 监听 activeIndex 变化,重新加载数据
-watch(activeIndex, () => {
-    // 如果正在通过日期选择切换,不清除日期筛选
-    if (isDateSelecting.value) {
-        isDateSelecting.value = false;
-        getSimpleList();
-        return;
-    }
-    // 切换筛选时清除日期筛选
-    filterDate.value = null;
-    // 清除日历选中状态
-    if (calendarRef.value) {
-        calendarRef.value.clearSelection();
-    }
-    getSimpleList();
-});
-
-function getSimpleList() {
-    loading.value = true;
-    noData.value = false;
-    // 清空refs数组,避免索引错乱
-    taskItemRefs.value = [];
-    const startFlowStatus = getStartFlowStatus(activeIndex.value);
-    const needReview = activeIndex.value === 2 ? 1 : null;
-    const params = {
-        ...selectParma.value,
-        role: 2,
-        location: mapPoint.value,
-        flowStatus: startFlowStatus,
-        farmWorkTypeId: selectParma.value.farmWorkTypeId || null,
-        needReview: needReview,
-        includePrescription: activeIndex.value === 0 ? false : true,
-    };
-
-    return VE_API.z_farm_work_record
-        .getSimpleList(params)
-        .then(({ data }) => {
-            loading.value = false;
-            // 假设返回的数据结构是 { list: [], total: 0 } 或者直接是数组
-            let filteredData = data;
-
-            // 保存完整数据(用于日历显示)
-            if (activeIndex.value === 0) {
-                // 如果是"待完成"状态,保存完整数据用于日历
-                fullTaskList.value = Array.isArray(data) ? data : [];
-            }
-
-            // 如果有日期筛选,在前端再次过滤(确保数据准确)
-            if (filterDate.value && Array.isArray(filteredData)) {
-                filteredData = filteredData.filter((item) => {
-                    if (!item.expectedExecuteDate && !item.executeDeadlineDate) return false;
-                    const itemDate = formatDate(new Date(item.expectedExecuteDate || item.executeDeadlineDate));
-                    return itemDate === filterDate.value;
-                });
-            }
-
-            if (Array.isArray(filteredData) && filteredData.length > 0) {
-                taskList.value = filteredData;
-                // 更新当前状态的数量
-                taskCounts.value[activeIndex.value] = filteredData.length;
-                if (activeIndex.value === 0) {
-                    // 传递给日历的数据应该是完整的未筛选数据
-                    const calendarData = filterDate.value ? fullTaskList.value : taskList.value;
-                    calendarRef.value && calendarRef.value.setSolarTerm(calendarData);
-                    // 地图使用筛选后的数据
-                    indexMap.initData(taskList.value);
-                }
-            } else {
-                noData.value = true;
-                taskList.value = [];
-                taskCounts.value[activeIndex.value] = 0;
-            }
-        })
-        .catch((error) => {
-            console.error("获取任务列表失败:", error);
-            loading.value = false;
-            taskList.value = [];
-            taskCounts.value[activeIndex.value] = 0;
-            if (activeIndex.value === 0) {
-                // 即使筛选后没有数据,日历也应该显示完整数据
-                const calendarData = filterDate.value ? fullTaskList.value : [];
-                indexMap.initData(taskList.value);
-                calendarRef.value && calendarRef.value.setSolarTerm(calendarData);
-            }
-            noData.value = true;
-        });
-}
-
-// 处理日历日期选择
-const handleDateSelect = (date) => {
-    if (date) {
-        // 有日期选择,切换到"待完成"筛选并设置筛选日期
-        filterDate.value = date;
-        // 如果当前不是"待完成"状态,切换到"待完成"
-        if (activeIndex.value !== 0) {
-            isDateSelecting.value = true; // 标记正在通过日期选择切换
-            activeIndex.value = 0;
-            // watch 会处理 getSimpleList
-        } else {
-            // 如果已经是"待完成"状态,直接重新加载列表
-            getSimpleList();
-        }
-    } else {
-        // 取消日期筛选
-        filterDate.value = null;
-        // 重新加载列表
-        getSimpleList();
-    }
-};
-
-function handleActiveFilter(i) {
-    activeIndex.value = i;
-    // watch 会自动处理清除日期筛选和日历选中状态
-    selectParma.value.districtCode = cityCode.value;
-    selectParma.value.farmWorkTypeId = null;
-}
-
-const offerPopupRef = ref(null);
-const showUploadExecutePopup = (item) => {
-    if(getButtonText(item)) {
-        const query = {
-            askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
-            shareText: '向您分享了一条农事执行提醒,请您尽快执行',
-            targetUrl: `completed_work`,
-            paramsPage: JSON.stringify({id: item.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`,
-        });
-    }else{
-        offerPopupRef.value.openPopup(item);
-    }
-};
-
-const generateReport = (item) => {
-    router.push({
-        path: "/achievement_report",
-        query: { miniJson: JSON.stringify({ id: item.id }) },
-    });
-};
-
-function toDetail(item) {
-    // router.push({
-    //         path: "/modify",
-    //         query: { id: item.id },
-    //     });
-    router.push({
-        path: "/completed_work",
-        query: { miniJson: JSON.stringify({ id: item.id }) },
-    });
-}
-
-const showCalendar = ref(false);
-const maxDate = ref();
-// 最小日期设置为今天,今天可以选择
-const minDate = new Date();
-const executeItem = ref(null);
-const selectExecuteTime = (item) => {
-    if (getButtonText(item)) {
-        const query = {
-            askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
-            shareText: '向您分享了一条农事提醒,请您尽快确认执行时间',
-            targetUrl: `completed_work`,
-            paramsPage: JSON.stringify({id: item.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`,
-        });
-    } else {
-        executeItem.value = item;
-        maxDate.value = new Date(item.executeDeadlineDate);
-        showCalendar.value = true;
-    }
-};
-
-const onConfirmExecuteTime = (date) => {
-    showCalendar.value = false;
-    VE_API.z_farm_work_record
-        .updateExpectedExecuteDate({ recordId: executeItem.value.id, expectedExecuteDate: formatDate(date) })
-        .then((res) => {
-            if (res.code === 0) {
-                ElMessage.success("操作成功");
-                getSimpleList();
-            }
-        });
-};
-
-// 获取上传按钮的文本(计算属性方式)
-const getButtonText = (item) => {
-    return agriculturalRole.value === 1 || (agriculturalRole.value === 2 && item.executorUserId != userId.value);
-};
-
-// const isShowPermission = (item) => {
-//     return agriculturalRole.value === 1 || agriculturalRole.value === 2 || item.executorUserId === userId.value;
-// };
-
-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 onlyShare = ref(false);
-function handleAction(item) {
-    if(getButtonText(item)) {
-        const query = {
-            askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
-            shareText: '向您分享了一条农事复核提醒,请您尽快复核',
-            targetUrl: `review_work`,
-            paramsPage: JSON.stringify({id: item.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`,
-        });
-    }else{
-        setTimeout(() => {
-            uploadExecuteRef.value.showPopup(item, "share-sheet");
-        }, 10);
-    }
-}
-
-function handleForward(item) {
-    if (item.quoteCount && item.quoteCount != 0) {
-        onlyShare.value = true;
-        setTimeout(() => {
-            uploadExecuteRef.value.showPopup(
-                { ...item, type: "quotation", farmWorkOrderId: item.orderId },
-                "share-sheet"
-            );
-        }, 10);
-    } else {
-        ElMessage.warning("暂无报价数据,无法分享");
-        return;
-    }
-}
-</script>
-
-<style lang="scss" scoped>
-.task-page {
-    width: 100%;
-    height: calc(100vh - 50px - 50px);
-    overflow: auto;
-    box-sizing: border-box;
-    background: #f5f7fb;
-    .map-container {
-        width: 100%;
-        height: 162px;
-        clip-path: inset(0px round 8px);
-    }
-
-    .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);
-                }
-            }
-        }
-    }
-
-    .calendar-wrap {
-        padding: 10px 0 4px 0;
-    }
-
-    .task-top {
-        padding: 10px 12px;
-    }
-
-    .task-content-loading {
-        height: 80px;
-        border-radius: 8px;
-        position: absolute;
-        top: 60px;
-        left: 0;
-        width: 100%;
-    }
-
-    .task-content {
-        min-height: 80px;
-    }
-
-    .empty-data {
-        text-align: center;
-        font-size: 14px;
-        color: #6f7274;
-        padding: 20px 0;
-    }
-    .task-list {
-        position: relative;
-        background: #fff;
-        padding: 8px 12px;
-    }
-    .list-filter {
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        gap: 20px;
-        .filter-item {
-            padding: 0 12px;
-            height: 28px;
-            color: rgba(0, 0, 0, 0.5);
-            font-size: 14px;
-            line-height: 28px;
-            border-radius: 20px;
-            &.active {
-                color: #2199f8;
-                background: rgba(33, 153, 248, 0.2);
-            }
-        }
-    }
-
-    .task-item + .task-item {
-        margin-top: 10px;
-    }
-
-    .execute-wrap {
-        background: rgba(153, 153, 153, 0.1);
-        border: 1px solid rgba(153, 153, 153, 0.2);
-        border-radius: 2px;
-        padding: 6px 10px;
-        color: #999999;
-        display: flex;
-        align-items: center;
-        gap: 5px;
-        margin-top: 10px;
-        .execute-icon {
-            width: 14px;
-            height: 14px;
-        }
-    }
-
-    .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 {
-            color: #8b8b8b;
-            font-size: 12px;
-            &.primary-btn {
-                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;
-                .share-icon {
-                    width: 12px;
-                    padding-right: 4px;
-                }
-            }
-            &.farm-name-text {
-                font-size: 14px;
-                color: #6f7274;
-                .name-text {
-                    padding-left: 4px;
-                }
-            }
-        }
-        .footer-r {
-            display: flex;
-            align-items: center;
-            .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;
-                }
-                .btn-icon {
-                    padding-right: 4px;
-                }
-                &.warning {
-                    color: #ff953d;
-                    background: #fff;
-                    border: 1px solid #ff953d;
-                }
-                &.secondary-text {
-                    color: #2199f8;
-                    border: 1px solid #2199f8;
-                }
-                &.primary-text {
-                    background: rgba(33, 153, 248, 0.1);
-                    color: #2199f8;
-                    border: 1px solid #2199f8;
-                }
-            }
-            .btn + .btn {
-                margin-left: 8px;
-            }
-        }
-    }
-}
-</style>
-
-<style lang="scss">
-.van-calendar__popup {
-    z-index: 9999 !important;
-}
-</style>

+ 0 - 203
src/views/old_mini/task_condition/components/uploadExecute.vue

@@ -1,203 +0,0 @@
-<template>
-    <popup
-        class="active-upload-popup"
-        v-model:show="show"
-        closeable
-        :close-on-click-overlay="false"
-    >
-        <div class="header">
-            <div class="title">
-                <span class="required">*</span>
-                请上传复核照片
-            </div>
-        </div>
-        <upload ref="uploadRef" exampleImg class="upload-wrap" @handleUpload="handleUpload">
-            <img class="example" src="@/assets/img/home/example-4.png" alt="" />
-            <img class="example" src="@/assets/img/home/plus.png" alt="">
-        </upload>
-        <div class="btn" @click="handleConfirm">确认上传</div>
-    </popup>
-    <!-- <FnShareSheet v-model:show="showShare" @select="onSelect" :class="className" /> -->
-</template>
-
-<script setup>
-import wx from 'weixin-js-sdk';
-import { Popup } from "vant";
-import { ref } from "vue";
-import upload from "@/components/upload";
-import { useRouter } from "vue-router";
-import { ElMessage } from "element-plus";
-import FnShareSheet from "@/components/pageComponents/FnShareSheet.vue";
-import { base_img_url2 } from "@/api/config";
-
-const router = useRouter();
-const props = defineProps({
-    onlyShare: {
-        type: Boolean,
-        default: false,
-    },
-});
-
-const emit = defineEmits(['uploadSuccess']);
-
-const show = ref(false);
-const className = ref(null);
-const farmWorkRecordId = ref(null);
-const farmData = ref({});
-function showPopup(data,classNameVal) {
-    // if (props.onlyShare) {
-    //     showShare.value = true;
-    //     className.value = classNameVal;
-    // } else {
-    // }
-    show.value = true;
-    farmWorkRecordId.value = data.id;
-    farmData.value = data;
-}
-const images = ref([]);
-function handleUpload({imgArr}) {
-    images.value = imgArr;
-}
-
-const uploadRef = ref(null);
-
-function handleConfirm() {
-    if (images.value.length === 0) return ElMessage.warning("请上传图片");
-    const params = {
-        recordId: farmWorkRecordId.value,
-        executeEvidence: images.value,
-    };
-    VE_API.monitor.addReviewImg(params).then((res) => {
-        if (res.code === 0) {
-            ElMessage.success('上传成功');
-            show.value = false;
-            VE_API.z_farm_work_record.getDetail({ id: farmData.value.id }).then(({ data }) => {
-                const dataItem = data[0];
-                farmData.value = {
-                    farmMiniUserId: dataItem.farmMiniUserId || (dataItem.users && dataItem.users.length > 0 ? dataItem.users[0]?.userId : null),
-                    farmWorkOrderId: dataItem.orderId,
-                    farmId: dataItem.farmId,
-                    executeEvidence:JSON.stringify(dataItem.executeEvidence),
-                    farmWorkName: dataItem.farmWorkName,
-                    id: dataItem.id,
-                }
-                farmData.value.type = 'confirmExecute'
-                uploadRef.value.uploadReset();
-                emit('uploadSuccess', farmData.value.id);
-                showShare.value = true;
-            });
-        }
-    });
-}
-
-const showShare = ref(false);
-const onSelect = async ({type}) => {
-    if(farmData.value.type === 'remindExecute' || farmData.value.type === 'remindUser') {
-        await getTriggerImg();
-    }
-    if(type === 'birdseye') {
-        if(farmData.value.farmMiniUserId){
-            if(triggerImg.value.length) {
-                farmData.value.imageList = triggerImg.value;
-            }
-            router.push(`/chat_frame?userId=${farmData.value.farmMiniUserId}&farmId=${farmData.value.farmId}&pageParams=${JSON.stringify(farmData.value)}`);
-        }else{
-            ElMessage.warning('尚未绑定用户,暂时无法分享')
-        }
-    } else {
-        if (farmData.value.type === 'quotation') {
-            const query = { askInfo: {title: "服务报价单", content: "是否分享该服务报价单给好友"}, shareText: "向您发送了一张 服务报价单", id: farmData.value.id, farmWorkOrderId: farmData.value.orderId, isAssign: true }
-            wx.miniProgram.navigateTo({
-                url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=priceSheet`,
-            });
-        } else if (farmData.value.type === 'remindExecute') {
-            const query = { askInfo: {title: "提醒执行", content: "是否分享该提示给好友"}, shareText: " 请您尽快执行" + farmData.value.farmWorkName + "农事", id: farmData.value.id, farmWorkOrderId: farmData.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 if (farmData.value.type === 'remindUser') {
-            const query = { askInfo: {title: "提醒拍照", content: "是否分享该提示给好友"}, shareText: " 请您尽快完成复核", id: farmData.value.id, farmWorkOrderId: farmData.value.orderId, postImg: triggerImg.value.length ? base_img_url2 + triggerImg.value[triggerImg.value.length - 1].cloudFilename : '' }
-            // reviewWork跳转到农事复核
-            wx.miniProgram.navigateTo({
-                url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=reviewWork`,
-            });
-        } else {
-            const img = JSON.parse(farmData.value.executeEvidence);
-            const imgUrl = base_img_url2 + img[img.length - 1];
-            const query = { askInfo: {title: "农事确认单", content: "是否分享该农事确认单给好友"}, shareText: farmData.value.farmWorkName + " 农事已完成,请您确认", id: farmData.value.id, farmWorkOrderId: farmData.value.orderId, postImg: imgUrl }
-            wx.miniProgram.navigateTo({
-                url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=priceSheet`,
-            });
-        }
-    }
-};
-
-const triggerImg = ref([]);
-const getTriggerImg = async () => {
-    const { data } = await VE_API.z_farm_work_record.getTriggerImg({ farmWorkRecordId: farmData.value.id });
-    triggerImg.value = data || [];
-}
-
-defineExpose({
-    showPopup,
-});
-
-</script>
-
-<style lang="scss" scoped>
-.active-upload-popup {
-    width: 90%;
-    box-sizing: border-box;
-    padding: 24px 18px 20px;
-    background: linear-gradient(0deg, #ffffff 70%, #d1ebff 100%);
-    border-radius: 10px;
-    ::v-deep {
-        .van-popup__close-icon {
-            color: #000;
-        }
-    }
-    .header {
-        .title {
-            font-size: 16px;
-            font-weight: 500;
-            display: flex;
-            align-items: center;
-            .required {
-                color: #ff4d4f;
-                margin-right: 4px;
-            }
-        }
-        .date-input {
-            margin: 12px 0;
-        }
-    }
-    .tips-text {
-        font-weight: 500;
-    }
-    .upload-wrap {
-        margin: 12px 0 24px;
-        .example {
-            width: 80px;
-            height: 80px;
-        }
-        .example + .example {
-            margin-left: 12px;
-        }
-    }
-}
-
-.btn {
-    padding: 8px;
-    background: #2199f8;
-    border-radius: 25px;
-    color: #fff;
-    font-size: 16px;
-    text-align: center;
-}
-
-</style>
-<style>
-.share-sheet{
-    bottom: 50px;
-}
-</style>

+ 0 - 69
src/views/old_mini/task_condition/index.vue

@@ -1,69 +0,0 @@
-<template>
-    <div class="farm-manage">
-        <tabs v-model:active="active" class="tabs">
-            <tab title="农情互动">
-                <!-- <demand-hall :isCapital="true" ref="demandHallRef" /> -->
-                <interact></interact>
-            </tab>
-            <tab title="我的任务">
-                <task></task>
-            </tab>
-        </tabs>
-        <system-reminder />
-    </div>
-</template>
-
-<script setup>
-import { ref, onMounted, onActivated } from "vue";
-import { Tab, Tabs } from "vant";
-// import demandHall from "../farm_manage/components/demandHall.vue";
-import interact from "./components/interact.vue";
-import systemReminder from "../farm_manage/components/systemReminder.vue";
-import task from "./components/task.vue"
-import { useRoute } from "vue-router";
-const route = useRoute();
-
-const active = ref(0);
-const getManagerList = async () => {
-    const { data } = await VE_API.mine.listManagerList({ onlyExecutor: true });
-    if (data && data.length > 0) {
-        // 过滤 permissionList 中包含"任务接单"的成员,并过滤掉超管(role为1)
-        const executorList = data.filter((item) => item.role !== 1);
-        sessionStorage.setItem("executorList", JSON.stringify(executorList));
-    }
-};
-onMounted(() => {
-    getManagerList();
-});
-
-onActivated(() => {
-    if(route.query.active){
-        active.value = Number(route.query.active);
-    }
-});
-</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>

+ 3 - 18
src/views/old_mini/user/farmDetails.vue

@@ -2,7 +2,7 @@
     <div class="farm-details-page">
         <custom-header name="农场详情"></custom-header>
         <div class="farm-details-content">
-            <farm-info-card
+            <!-- <farm-info-card
                 v-if="farmDetail.name"
                 :data="{
                     farmName: farmDetail.name || '',
@@ -15,22 +15,7 @@
                 <template #right>
                     <div @click="handleDetail('plan')">农事规划</div>
                 </template>
-                <!-- <template #footerData>
-                    <div class="footer-data">
-                        <div class="footer-l">
-                            <div class="farm-info-footer-item">
-                                <div class="farm-info-footer-item-label">农事服务</div>
-                                <div class="farm-info-footer-item-value">10<span class="unit">次</span></div>
-                            </div>
-                            <div class="farm-info-footer-item">
-                                <div class="farm-info-footer-item-label">总收益</div>
-                                <div class="farm-info-footer-item-value">1450<span class="unit">元</span></div>
-                            </div>
-                        </div>
-                        <div class="footer-action" @click.stop="handleDetail('plan')">农事规划</div>
-                    </div>
-                </template> -->
-            </farm-info-card>
+            </farm-info-card> -->
             <tabs v-model:active="activeTab" class="custom-tabs" scrollspy sticky offset-top="40" background="#F2F3F5">
                 <tab title="作物档案" class="tab-item">
                     <common-box title="作物档案">
@@ -150,7 +135,7 @@ import { Tab, Tabs, Empty } from "vant";
 import { base_img_url2, resize_300 } from "@/api/config";
 import wx from "weixin-js-sdk";
 import customHeader from "@/components/customHeader.vue";
-import FarmInfoCard from "@/components/pageComponents/FarmInfoCard.vue";
+// import FarmInfoCard from "@/components/pageComponents/FarmInfoCard.vue";
 import tabList from "@/components/pageComponents/TabList.vue";
 import commonBox from "@/components/pageComponents/CommonBox.vue";
 import StatsBox from "@/components/pageComponents/StatsBox.vue";

+ 3 - 19
src/views/old_mini/user/index.vue

@@ -21,10 +21,7 @@
                         {{ item.name }}
                         <span class="span">{{ item.children?.length || 0 }}</span>
                     </template>
-                    <!-- <template #value>
-                        <div @click.stop="hadnleManage(item)" class="text">管理</div>
-                    </template> -->
-                    <farm-info-card
+                    <!-- <farm-info-card
                         v-for="ele in item.children"
                         :key="ele.agriculturalStoreId"
                         class="list-item"
@@ -40,19 +37,6 @@
                         }"
                         @click="handleItemClick(ele)"
                     >
-                        <!-- <template #right>
-                            <el-popover title="" :popper-style="'min-width: 110px;'" :width="110" placement="left-start" trigger="click">
-                                <div class="tag-list">
-                                    <div class="tag-item">全托管</div>
-                                    <div class="tag-item">飞防托管</div>
-                                    <div class="tag-item">营养托管</div>
-                                    <div class="tag-item active">优质客户</div>
-                                </div>
-                                <template #reference>
-                                    <div class="title-tag add-tag">标记为</div>
-                                </template>
-                            </el-popover>
-                        </template> -->
                         <template #footerData>
                             <div class="footer-data">
                                 <div class="footer-l">
@@ -68,7 +52,7 @@
                                 <div class="footer-action" @click.stop="handleDetail('plan', ele.id, ele.agriculturalStoreId, ele.schemeId)">农事规划</div>
                             </div>
                         </template>
-                    </farm-info-card>
+                    </farm-info-card> -->
                 </collapse-item>
             </collapse>
         </div>
@@ -87,7 +71,7 @@ import { ref, onMounted, computed, nextTick, onActivated } from "vue";
 import wx from "weixin-js-sdk";
 import { useRouter } from "vue-router";
 import addPopup from "./components/addPopup.vue";
-import FarmInfoCard from "@/components/pageComponents/FarmInfoCard.vue";
+// import FarmInfoCard from "@/components/pageComponents/FarmInfoCard.vue";
 import { useStore } from "vuex";
 import FnShareSheet from "@/components/pageComponents/FnShareSheet.vue";
 import IndexMap from "../farm_manage/map/index";