|
|
@@ -12,7 +12,9 @@
|
|
|
<div class="line-title" @click="handlePage">作物档案</div>
|
|
|
<div class="header-right">
|
|
|
<div class="add-variety-btn" @click="handleAddVariety">
|
|
|
- <el-icon size="12"><Plus /></el-icon>
|
|
|
+ <el-icon size="12">
|
|
|
+ <Plus />
|
|
|
+ </el-icon>
|
|
|
<span>新增品种</span>
|
|
|
</div>
|
|
|
<el-date-picker style="width: 110px" v-model="date" type="year" placeholder="全部日期" />
|
|
|
@@ -20,16 +22,18 @@
|
|
|
</div>
|
|
|
<!-- 品种选择 -->
|
|
|
<div class="variety-tabs" v-if="varietyTabs.length > 0">
|
|
|
- <div
|
|
|
- v-for="(v, index) in varietyTabs"
|
|
|
- :key="index"
|
|
|
- class="variety-tab"
|
|
|
- :class="{ 'variety-tab--active': activeVariety === index }"
|
|
|
- @click="handleVarietyClick(v,index)"
|
|
|
- >
|
|
|
+ <div v-for="(v, index) in varietyTabs" :key="index" class="variety-tab"
|
|
|
+ :class="{ 'variety-tab--active': activeVariety === index }" @click="handleVarietyClick(v, index)">
|
|
|
{{ v.regionName }}
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <template v-if="!hasReport">
|
|
|
+ <div class="lock-img" @click="handleLockClick">
|
|
|
+ <img src="@/assets/img/home/lock-blue.png" alt="" class="lock-img-item" />
|
|
|
+ <div class="lock-text">解锁某某某某某,解锁某某某某某</div>
|
|
|
+ </div>
|
|
|
+ <img class="example-img" src="@/assets/img/monitor/example.png" alt="">
|
|
|
+ </template>
|
|
|
<div class="archives-time-line-content">
|
|
|
<div class="report-box" v-if="hasReport">
|
|
|
<div class="box-content">
|
|
|
@@ -50,35 +54,23 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <tip-popup
|
|
|
- v-model:show="showFarmPopup"
|
|
|
- type="success"
|
|
|
- text="农场领取成功"
|
|
|
- :overlay-style="{ 'backdrop-filter': 'blur(4px)' }"
|
|
|
- :closeOnClickOverlay="false"
|
|
|
- :zIndex="9999"
|
|
|
- />
|
|
|
+ <tip-popup v-model:show="showFarmPopup" type="success" text="农场领取成功"
|
|
|
+ :overlay-style="{ 'backdrop-filter': 'blur(4px)' }" :closeOnClickOverlay="false" :zIndex="9999" />
|
|
|
|
|
|
<!-- 勾选区域引导弹窗 -->
|
|
|
- <select-region-popup
|
|
|
- v-model:show="showSelectRegionPopup"
|
|
|
- :image="selectRegionImage"
|
|
|
- title="勾选 妃子笑 区域"
|
|
|
- sub-title="精准匹配农情信息,高效管理分区"
|
|
|
- @confirm="handleGoSelectRegion"
|
|
|
- @skip="handleSkipSelectRegion"
|
|
|
- />
|
|
|
+ <select-region-popup v-model:show="showSelectRegionPopup" :image="selectRegionImage" title="勾选 妃子笑 区域"
|
|
|
+ sub-title="精准匹配农情信息,高效管理分区" @confirm="handleGoSelectRegion" @skip="handleSkipSelectRegion" />
|
|
|
|
|
|
<!-- 农事执行弹窗 -->
|
|
|
- <agri-execute-popup v-model:show="showAgriExecutePopup" :popupData="agriExecuteData"
|
|
|
- @executed="handleAgriExecuted" @close="handleClosePopup" />
|
|
|
+ <agri-execute-popup v-model:show="showAgriExecutePopup" :popupData="agriExecuteData" @executed="handleAgriExecuted"
|
|
|
+ @close="handleClosePopup" />
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import { ref, computed, onActivated, onDeactivated, onMounted } from "vue";
|
|
|
import customHeader from "@/components/customHeader.vue";
|
|
|
import { useStore } from "vuex";
|
|
|
-import { Badge, List } from "vant";
|
|
|
+import wx from "weixin-js-sdk";
|
|
|
import weatherInfo from "@/components/weatherInfo.vue";
|
|
|
import { useRouter, useRoute } from "vue-router";
|
|
|
import tipPopup from "@/components/popup/tipPopup.vue";
|
|
|
@@ -104,16 +96,16 @@ const getVarietyTabs = async () => {
|
|
|
subjectId: gardenId.value,
|
|
|
});
|
|
|
varietyTabs.value = res.data || []
|
|
|
- if(varietyTabs.value.length > 0) {
|
|
|
- handleVarietyClick(varietyTabs.value[0],0)
|
|
|
+ if (varietyTabs.value.length > 0) {
|
|
|
+ handleVarietyClick(varietyTabs.value[0], 0)
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.error("获取主体分区列表失败:", error);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-const farmIdData= ref(null);
|
|
|
-const handleVarietyClick = (tab,index) => {
|
|
|
+const farmIdData = ref(null);
|
|
|
+const handleVarietyClick = (tab, index) => {
|
|
|
activeVariety.value = index;
|
|
|
farmIdData.value = tab.farmId;
|
|
|
};
|
|
|
@@ -194,44 +186,15 @@ function toFarmInfo() {
|
|
|
farmInfoRef.value.handleShow();
|
|
|
}
|
|
|
|
|
|
-// 功能卡片数据
|
|
|
-const functionCards = ref([
|
|
|
- {
|
|
|
- title: "农事规划",
|
|
|
- route: "/plan",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "农场报告",
|
|
|
- status: "最新",
|
|
|
- route: "/farm_report",
|
|
|
- className: "blue",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "农事方案",
|
|
|
- route: "/agricultural_plan",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "复核成效",
|
|
|
- status: "最新",
|
|
|
- route: "/review-results",
|
|
|
- className: "yellow",
|
|
|
- },
|
|
|
-]);
|
|
|
-
|
|
|
-const getStayCount = () => {
|
|
|
- VE_API.monitor
|
|
|
- .getCountByStatusAndFarmId({
|
|
|
- farmId: gardenId.value,
|
|
|
- startStatus: 1,
|
|
|
- endStatus: 3,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- functionCards.value[0].status = null;
|
|
|
- if (res.data && res.data != 0) {
|
|
|
- functionCards.value[0].status = res.data + " 待完成";
|
|
|
- }
|
|
|
- });
|
|
|
-};
|
|
|
+const handleLockClick = () => {
|
|
|
+ wx.miniProgram.navigateTo({
|
|
|
+ url: '/pages/subPages/phone_auth/index',
|
|
|
+ });
|
|
|
+
|
|
|
+ // wx.miniProgram.navigateTo({
|
|
|
+ // url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
|
|
|
+ // });
|
|
|
+}
|
|
|
|
|
|
// 实时播报数据
|
|
|
const broadcastList = ref([]);
|
|
|
@@ -330,7 +293,6 @@ const changeGarden = ({ id }) => {
|
|
|
currentPage.value = 1;
|
|
|
finished.value = false;
|
|
|
broadcastList.value = [];
|
|
|
- getStayCount();
|
|
|
getBroadcastList(1, false);
|
|
|
checkHasUnrepliedTriggeredInteraction();
|
|
|
getReport();
|
|
|
@@ -351,7 +313,7 @@ const handleClosePopup = () => {
|
|
|
}
|
|
|
|
|
|
const getReport = () => {
|
|
|
- VE_API.farm.growthReportBySubject({subjectId: gardenId.value, limit: 20}).then(({ data }) => {
|
|
|
+ VE_API.farm.growthReportBySubject({ subjectId: gardenId.value, limit: 20 }).then(({ data }) => {
|
|
|
if (data && data.length > 0) {
|
|
|
hasReport.value = true;
|
|
|
} else {
|
|
|
@@ -379,6 +341,38 @@ const getReport = () => {
|
|
|
z-index: 11;
|
|
|
}
|
|
|
|
|
|
+ .lock-img {
|
|
|
+ position: fixed;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%, -20%);
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ flex-direction: column;
|
|
|
+ gap: 16px;
|
|
|
+
|
|
|
+ .lock-img-item {
|
|
|
+ width: 57px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .lock-text {
|
|
|
+ font-size: 16px;
|
|
|
+ color: #000;
|
|
|
+ padding: 0 24px;
|
|
|
+ height: 34px;
|
|
|
+ line-height: 34px;
|
|
|
+ background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 50%, rgba(255, 255, 255, 0) 100%);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .example-img{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ object-fit: contain;
|
|
|
+ }
|
|
|
+
|
|
|
.weather-info {
|
|
|
width: calc(100% - 20px);
|
|
|
position: absolute;
|
|
|
@@ -412,10 +406,12 @@ const getReport = () => {
|
|
|
border-radius: 20px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.header-right {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
gap: 12px;
|
|
|
+
|
|
|
.add-variety-btn {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
@@ -493,6 +489,7 @@ const getReport = () => {
|
|
|
|
|
|
.time-line {
|
|
|
height: calc(100% - 100px);
|
|
|
+
|
|
|
&.no-report {
|
|
|
height: 100%;
|
|
|
}
|