|
|
@@ -10,30 +10,29 @@
|
|
|
</div>
|
|
|
<div class="task-time">执行时间 {{ task.executionTime }}</div>
|
|
|
</div>
|
|
|
- <div class="task-action">上传照片</div>
|
|
|
+ <div class="task-action" @click="handleTaskAction(task)" :class="{ orange: index === 1 }">
|
|
|
+ {{ index === 0 ? "上传照片" : "确认执行时间" }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="title">农情互动</div>
|
|
|
<!-- 内容区域 -->
|
|
|
<div class="agricultural-list">
|
|
|
- <div class="agricultural-item">
|
|
|
+ <div class="agricultural-item" v-for="(item, index) in unansweredList" :key="index">
|
|
|
<!-- 头部区域 -->
|
|
|
<div class="header-section">
|
|
|
<div class="header-left">
|
|
|
- <div class="farm-name">水稻园</div>
|
|
|
+ <div class="farm-name">{{ item.farmName }}</div>
|
|
|
<div class="tag-group">
|
|
|
- <div class="tag tag-blue">桂味</div>
|
|
|
+ <div class="tag tag-blue">{{ item.typeName }}</div>
|
|
|
<div class="tag tag-orange">托管客户</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="remind-btn" @click="handleRemind">提醒客户</div>
|
|
|
</div>
|
|
|
<!-- 警告通知块 -->
|
|
|
- <div class="warning-block">
|
|
|
- 当前处于<span class="highlight">梢期</span>,可能会有<span class="highlight">蒂蛀虫</span
|
|
|
- >风险,预计<span class="highlight">5天</span>后进入物候期
|
|
|
- </div>
|
|
|
+ <div class="warning-block" v-html="item.latestPhenologyProgressBroadcast?.content"></div>
|
|
|
|
|
|
<div class="timeline">
|
|
|
<div class="timeline-item" v-for="item in timelineList" :key="item.id">
|
|
|
@@ -56,17 +55,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <offer-popup ref="offerPopupRef"></offer-popup>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+import router from "@/router";
|
|
|
import { ref, onMounted } from "vue";
|
|
|
-
|
|
|
-// 气象/农事预警数据
|
|
|
-const warningList = ref([]);
|
|
|
-
|
|
|
-// 专家问答数据
|
|
|
-const expertQAList = ref([]);
|
|
|
-
|
|
|
+import offerPopup from "@/components/popup/offerPopup.vue";
|
|
|
// 任务列表数据
|
|
|
const taskList = ref([
|
|
|
{ id: 1, title: "梢期杀虫", executionTime: "2025.05.06", status: "pending" },
|
|
|
@@ -86,33 +81,57 @@ const timelineList = ref([
|
|
|
// },
|
|
|
]);
|
|
|
|
|
|
+const offerPopupRef = ref(null);
|
|
|
+const handleTaskAction = (item) => {
|
|
|
+ const data = {
|
|
|
+ address: "岭南印象园东南",
|
|
|
+ executeDate: "2025-11-19",
|
|
|
+ executeEvidence: '["birdseye-look-mini/91754/1763544788985.jpg"]',
|
|
|
+ farmArea: "50.089606952166854",
|
|
|
+ farmId: 93684,
|
|
|
+ farmMiniUserId: 91429,
|
|
|
+ farmMiniUserName: "丝丝1",
|
|
|
+ farmName: "17ss籼稻农场",
|
|
|
+ farmWorkArrangeId: "124",
|
|
|
+ farmWorkLibId: "2220005",
|
|
|
+ farmWorkName: "蘖末防治",
|
|
|
+ id: "276567",
|
|
|
+ isFollow: null,
|
|
|
+ isIgnored: 0,
|
|
|
+ isPublic: 0,
|
|
|
+ mapInfo: "11.19 蘖末防治",
|
|
|
+ orderId: "778948195706212352",
|
|
|
+ point: "POINT(113.407189 23.032344)",
|
|
|
+ quoteCount: "1",
|
|
|
+ solarTerm: null,
|
|
|
+ typeId: "223",
|
|
|
+ typeName: "丝苗米",
|
|
|
+ };
|
|
|
+ offerPopupRef.value.openPopup(data);
|
|
|
+};
|
|
|
+
|
|
|
const handleTimelineAction = (item) => {
|
|
|
// 处理转入农事任务逻辑
|
|
|
console.log("转入农事任务", item);
|
|
|
};
|
|
|
|
|
|
const handleRemind = () => {
|
|
|
- // 处理提醒客户逻辑
|
|
|
- console.log("提醒客户");
|
|
|
+ router.push("/remind_customer");
|
|
|
};
|
|
|
|
|
|
onMounted(() => {
|
|
|
- // getWarningList();
|
|
|
+ getUnansweredFarms();
|
|
|
});
|
|
|
|
|
|
-const getWarningList = () => {
|
|
|
+const unansweredList = ref([]);
|
|
|
+const getUnansweredFarms = () => {
|
|
|
const params = {
|
|
|
- page: 1,
|
|
|
- limit: 10,
|
|
|
- topicId: 2,
|
|
|
+ page: 0,
|
|
|
+ limit: 3,
|
|
|
};
|
|
|
- // VE_API.home.warningPageList(params).then((res) => {
|
|
|
- // if (activeTab.value === 4) {
|
|
|
- // expertQAList.value = res.data || [];
|
|
|
- // } else {
|
|
|
- // warningList.value = res.data || [];
|
|
|
- // }
|
|
|
- // });
|
|
|
+ VE_API.home.listUnansweredFarms(params).then((res) => {
|
|
|
+ unansweredList.value = res.data || [];
|
|
|
+ });
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
@@ -139,6 +158,7 @@ const getWarningList = () => {
|
|
|
right: 0;
|
|
|
width: 72px;
|
|
|
height: 72px;
|
|
|
+ pointer-events: none;
|
|
|
background: url("@/assets/img/home/task-icon.png") no-repeat center center / 100% 100%;
|
|
|
}
|
|
|
|
|
|
@@ -176,6 +196,10 @@ const getWarningList = () => {
|
|
|
border-radius: 25px;
|
|
|
padding: 7px 14px;
|
|
|
font-size: 12px;
|
|
|
+ &.orange {
|
|
|
+ color: #ff953d;
|
|
|
+ background: rgba(255, 149, 61, 0.1);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -250,10 +274,11 @@ const getWarningList = () => {
|
|
|
margin: 8px 0;
|
|
|
font-size: 12px;
|
|
|
color: #252525;
|
|
|
-
|
|
|
- .highlight {
|
|
|
- color: #2199f8;
|
|
|
- font-weight: 500;
|
|
|
+ ::v-deep{
|
|
|
+ p{
|
|
|
+ padding: 0;
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|