|
@@ -36,7 +36,7 @@
|
|
|
v-for="(card, cardI) in todayPatrolFocus"
|
|
v-for="(card, cardI) in todayPatrolFocus"
|
|
|
:key="cardI"
|
|
:key="cardI"
|
|
|
class="status-card"
|
|
class="status-card"
|
|
|
- :class="card.type"
|
|
|
|
|
|
|
+ :class="'today-'+card.color"
|
|
|
@click="handleTodayPatrolFocusClick(card)"
|
|
@click="handleTodayPatrolFocusClick(card)"
|
|
|
>
|
|
>
|
|
|
<!-- <badge class="status-badge" dot
|
|
<!-- <badge class="status-badge" dot
|
|
@@ -202,7 +202,7 @@ const handleMaskClick = () => {
|
|
|
|
|
|
|
|
const currentFarmName = ref('');
|
|
const currentFarmName = ref('');
|
|
|
// 切换农场时,更新报告数据
|
|
// 切换农场时,更新报告数据
|
|
|
-const changeGarden = ({ id, name }) => {
|
|
|
|
|
|
|
+const changeGarden = async ({ id, name }) => {
|
|
|
if (!id) return;
|
|
if (!id) return;
|
|
|
currentFarmName.value = name;
|
|
currentFarmName.value = name;
|
|
|
swipeRef.value && swipeRef.value.swipeTo(0, {immediate:true});
|
|
swipeRef.value && swipeRef.value.swipeTo(0, {immediate:true});
|
|
@@ -213,10 +213,7 @@ const changeGarden = ({ id, name }) => {
|
|
|
};
|
|
};
|
|
|
// 初始化品种/大物候期转换
|
|
// 初始化品种/大物候期转换
|
|
|
startInteractPopupRef.value.getPhenologyInitOrConfirmStatus();
|
|
startInteractPopupRef.value.getPhenologyInitOrConfirmStatus();
|
|
|
- getRegions();
|
|
|
|
|
- if(regionsData.value.length && !route.query.hideInteraction) {
|
|
|
|
|
- agriExecutePopupRef.value.showPopup(regionsData.value[currentIndex.value].farmId);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ await getRegions();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
onActivated(() => {
|
|
onActivated(() => {
|
|
@@ -286,7 +283,8 @@ const handlePendingFarmWorkClick = (card) => {
|
|
|
}
|
|
}
|
|
|
// 点击今日巡园重点
|
|
// 点击今日巡园重点
|
|
|
const handleTodayPatrolFocusClick = (card) => {
|
|
const handleTodayPatrolFocusClick = (card) => {
|
|
|
- router.push(`/interaction_list?farmId=${paramsPage.value.farmId}®ionId=${paramsPage.value.regionId}&interactionTypeId=${card.interactionTypeId || 1}`);
|
|
|
|
|
|
|
+ if (!card.interactionTypeId) return;
|
|
|
|
|
+ router.push(`/interaction_list?farmId=${paramsPage.value.farmId}®ionId=${paramsPage.value.regionId}&interactionTypeId=${card.interactionTypeId}`);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const getTodayPatrolFocus = () => {
|
|
const getTodayPatrolFocus = () => {
|
|
@@ -342,6 +340,12 @@ const getRegions = async () => {
|
|
|
localStorage.setItem(guideKey, "1");
|
|
localStorage.setItem(guideKey, "1");
|
|
|
}
|
|
}
|
|
|
hasReport.value = true;
|
|
hasReport.value = true;
|
|
|
|
|
+
|
|
|
|
|
+ // 如果不是点击农情报告已生成弹窗过来的,则显示农情互动弹窗
|
|
|
|
|
+ if(!route.query.hideInteraction) {
|
|
|
|
|
+ agriExecutePopupRef.value.showPopup(regionsData.value[currentIndex.value].farmId);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
paramsPage.value = {
|
|
paramsPage.value = {
|
|
|
...(paramsPage.value || {}),
|
|
...(paramsPage.value || {}),
|
|
|
farmId: regionsData.value[currentIndex.value].farmId,
|
|
farmId: regionsData.value[currentIndex.value].farmId,
|
|
@@ -785,6 +789,14 @@ linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
|
|
|
|
|
|
|
+ &.today-red {
|
|
|
|
|
+ background: #FF6A6A;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ .status-sub {
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
&.pending-card {
|
|
&.pending-card {
|
|
|
color: #fff;
|
|
color: #fff;
|
|
|
position: relative;
|
|
position: relative;
|