|
|
@@ -15,7 +15,7 @@
|
|
|
待提醒({{ taskCounts[3] || 0 }})
|
|
|
</div>
|
|
|
</div> -->
|
|
|
- <div class="select-group">
|
|
|
+ <!-- <div class="select-group">
|
|
|
<el-select
|
|
|
class="select-item"
|
|
|
v-model="selectParma.farmWorkTypeId"
|
|
|
@@ -32,100 +32,73 @@
|
|
|
>
|
|
|
<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="index">
|
|
|
- <div class="img-text-wrap" @click.stop="toDetail(item)">
|
|
|
- <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">
|
|
|
- {{ item?.farmName }}
|
|
|
- <div class="info-tag-wrap">
|
|
|
- <div class="tag-item primary">
|
|
|
- {{ item?.typeName }}
|
|
|
+ <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" @click.stop="toDetail(item)">
|
|
|
+ <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">
|
|
|
+ {{ item?.farmName }}
|
|
|
+ <div class="info-tag-wrap">
|
|
|
+ <div class="tag-item primary">
|
|
|
+ {{ item?.typeName }}
|
|
|
+ </div>
|
|
|
+ <div class="tag-item second">托管客户</div>
|
|
|
</div>
|
|
|
- <div class="tag-item second">托管客户</div>
|
|
|
</div>
|
|
|
+ <div class="farm-addr">{{ item?.address }}</div>
|
|
|
</div>
|
|
|
- <div class="farm-addr">{{ item?.address }}</div>
|
|
|
</div>
|
|
|
+ <div class="right-wrap" @click.stop="handleRemindCustomer(item)">提醒客户</div>
|
|
|
</div>
|
|
|
- <div class="right-wrap" @click.stop="handleRemindCustomer(item)">提醒客户</div>
|
|
|
- </div>
|
|
|
- <div class="item-bottom">
|
|
|
- <div class="bottom-tag">
|
|
|
- <div class="tag-card active">
|
|
|
- <div class="card-content">
|
|
|
- <div class="card-main-text">花芽分化</div>
|
|
|
- <div class="card-sub-text">
|
|
|
- 当前物候期
|
|
|
- <span class="card-icon" @click="handleSelectCurrentPhenology(item)">
|
|
|
- <el-icon><Edit /></el-icon>
|
|
|
- </span>
|
|
|
+ <div class="item-bottom">
|
|
|
+ <div class="bottom-tag">
|
|
|
+ <div class="tag-card active">
|
|
|
+ <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>
|
|
|
- <div class="tag-card">
|
|
|
- <div class="card-content">
|
|
|
- <div class="card-main-text">蒂蛀虫</div>
|
|
|
- <div class="card-sub-text">预计风险</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="tag-card">
|
|
|
- <div class="card-content">
|
|
|
- <div class="card-main-text">5天</div>
|
|
|
- <div class="card-sub-text">预计下次物候</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="timeline">
|
|
|
- <div class="timeline-item" v-for="item in timelineList" :key="item.id">
|
|
|
- <div class="timeline-left">
|
|
|
- <div class="dot"></div>
|
|
|
- <div class="line"></div>
|
|
|
+ <div class="tag-card">
|
|
|
+ <div class="card-content">
|
|
|
+ <div class="card-main-text">冲梢风险</div>
|
|
|
+ <div class="card-sub-text">预计风险</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="timeline-right">
|
|
|
- <div class="date">预计{{ item.date }}天后触发<span class="work-name">{{ item.workName }}</span></div>
|
|
|
- <div class="text">
|
|
|
- 预计报价<span class="price">{{ item.price }}元</span>
|
|
|
- <span @click.stop="showPriceSheetPopup(item)" class="action-detail">查看报价单</span>
|
|
|
+ <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 class="timeline-action" @click="handleTimelineAction(item)">转入农事任务</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 时间轴组件 -->
|
|
|
+ <AgriculturalInteractionCard :item="item" @updateList="resetAndLoad" />
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="empty-data" v-if="!loading && taskList.length === 0">暂无数据</div>
|
|
|
</div>
|
|
|
- <div class="empty-data" v-if="noData">暂无数据</div>
|
|
|
- </div>
|
|
|
+ </van-list>
|
|
|
</div>
|
|
|
</div>
|
|
|
<upload-execute ref="uploadExecuteRef" :onlyShare="onlyShare" @uploadSuccess="handleUploadSuccess" />
|
|
|
-
|
|
|
- <popup v-model:show="showTaskPopup" round class="task-tips-popup">
|
|
|
- <template v-if="taskPopupType === 'warning'">
|
|
|
- <img class="create-farm-icon" src="@/assets/img/home/create-farm-icon.png" alt="" />
|
|
|
- <div class="create-farm-text">
|
|
|
- <div>
|
|
|
- 您确认忽略 <span class="main-text">{{ currentTask?.farmName }}</span> 的
|
|
|
- <span class="main-text">{{ currentTask?.farmWorkName }}</span> 农事吗
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <img class="farm-check-icon" src="@/assets/img/home/right.png" alt="" />
|
|
|
- <div class="create-farm-text success-text">农事已下发成功</div>
|
|
|
- </template>
|
|
|
- <div class="create-farm-btn" @click="handlePopupBtn">
|
|
|
- {{ taskPopupType === "warning" ? "确认忽略" : "我知道了" }}
|
|
|
- </div>
|
|
|
- </popup>
|
|
|
<!-- 服务报价单 -->
|
|
|
<price-sheet-popup :key="activeIndex" ref="priceSheetPopupRef"></price-sheet-popup>
|
|
|
<!-- 新增:激活上传弹窗 -->
|
|
|
@@ -133,16 +106,16 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import eventBus from "@/api/eventBus";
|
|
|
import { computed, nextTick, onMounted, ref, watch } from "vue";
|
|
|
import { useStore } from "vuex";
|
|
|
-import { Popup } from "vant";
|
|
|
+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();
|
|
|
@@ -164,70 +137,22 @@ const taskCounts = ref([0, 0, 0]);
|
|
|
const activeIndex = ref(2);
|
|
|
const noData = ref(false);
|
|
|
const loading = ref(false);
|
|
|
-
|
|
|
-const showTaskPopup = ref(false);
|
|
|
-const taskPopupType = ref("warning");
|
|
|
-
|
|
|
-// 根据 activeIndex 计算 startFlowStatus
|
|
|
-const getStartFlowStatus = (index) => {
|
|
|
- const statusMap = {
|
|
|
- 1: 4, // 待完成
|
|
|
- 2: 4, // 待完成
|
|
|
- 3: 5, // 已完成
|
|
|
- };
|
|
|
- return statusMap[index] ?? 0;
|
|
|
+// 分页相关
|
|
|
+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 timelineList = ref([
|
|
|
- {
|
|
|
- date: "3",
|
|
|
- workName: "梢期杀虫",
|
|
|
- price: "1258"
|
|
|
- },
|
|
|
- {
|
|
|
- date: "5",
|
|
|
- workName: "梢期营养",
|
|
|
- price: "1758"
|
|
|
- },
|
|
|
-])
|
|
|
-
|
|
|
-// 获取单个状态的任务数量
|
|
|
-function getTaskCount(flowStatus, index, needReview) {
|
|
|
- const location = store.state.home.miniUserLocationPoint;
|
|
|
- return VE_API.z_farm_work_record
|
|
|
- .getSimpleList({ role: 2, location, flowStatus, needReview })
|
|
|
- .then(({ data }) => {
|
|
|
- if (Array.isArray(data)) {
|
|
|
- taskCounts.value[index] = data.length;
|
|
|
-
|
|
|
- if (index === 2) {
|
|
|
- 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 () => {
|
|
|
- // 先保存当前需要更新的 item id
|
|
|
- const currentItemIds = taskList.value.map((item) => item.id || item.workRecordId);
|
|
|
-
|
|
|
// 刷新列表
|
|
|
- await getSimpleList();
|
|
|
+ await resetAndLoad();
|
|
|
|
|
|
// 等待 DOM 更新完成,refs 被重新收集
|
|
|
await nextTick();
|
|
|
@@ -250,7 +175,7 @@ function getDistrictListByCity() {
|
|
|
cityCode.value = "";
|
|
|
districtList.value.unshift({ code: cityCode.value, name: "全部" });
|
|
|
selectParma.value.districtCode = cityCode.value;
|
|
|
- getSimpleList();
|
|
|
+ resetAndLoad();
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -263,26 +188,12 @@ function getFarmWorkTypeList() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-// 初始化时获取所有状态的任务数量
|
|
|
-function initTaskCounts() {
|
|
|
- const location = store.state.home.miniUserLocationPoint;
|
|
|
- // 并行请求三个状态的数量
|
|
|
- Promise.all([
|
|
|
- getTaskCount(4, 1), // 待确认
|
|
|
- getTaskCount(5, 2), // 待完成
|
|
|
- getTaskCount(5, 3, true), // 已完成
|
|
|
- ]);
|
|
|
-}
|
|
|
const mapPoint = ref(null);
|
|
|
|
|
|
onMounted(() => {
|
|
|
mapPoint.value = store.state.home.miniUserLocationPoint;
|
|
|
-
|
|
|
- // 初始化时获取所有状态的数量
|
|
|
- initTaskCounts();
|
|
|
- // 加载当前选中状态的数据列表
|
|
|
- getSimpleList();
|
|
|
- getDistrictListByCity();
|
|
|
+ // getDistrictListByCity();
|
|
|
+ resetAndLoad();
|
|
|
getFarmWorkTypeList();
|
|
|
nextTick(() => {
|
|
|
indexMap.initMap(mapPoint.value, mapContainer.value, true);
|
|
|
@@ -291,87 +202,113 @@ onMounted(() => {
|
|
|
|
|
|
// 监听 activeIndex 变化,重新加载数据
|
|
|
watch(activeIndex, () => {
|
|
|
- getSimpleList();
|
|
|
+ resetAndLoad();
|
|
|
});
|
|
|
|
|
|
-function getSimpleList() {
|
|
|
- loading.value = true;
|
|
|
- noData.value = false;
|
|
|
- // 清空refs数组,避免索引错乱
|
|
|
- taskItemRefs.value = [];
|
|
|
- const startFlowStatus = getStartFlowStatus(activeIndex.value);
|
|
|
- const needReview = activeIndex.value === 2 ? true : false;
|
|
|
+// 加载列表数据(支持分页)
|
|
|
+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,
|
|
|
- role: 2,
|
|
|
- location: mapPoint.value,
|
|
|
- flowStatus: startFlowStatus,
|
|
|
- farmWorkTypeId: selectParma.value.farmWorkTypeId || null,
|
|
|
- needReview: needReview,
|
|
|
+ page: page.value,
|
|
|
+ limit: limit.value,
|
|
|
+ flowStatus: 5,
|
|
|
};
|
|
|
|
|
|
- return VE_API.z_farm_work_record
|
|
|
- .getSimpleList(params)
|
|
|
- .then(({ data }) => {
|
|
|
+ try {
|
|
|
+ const { data } = await VE_API.home.listUnansweredFarms(params);
|
|
|
+
|
|
|
+ if (!isLoadMore) {
|
|
|
loading.value = false;
|
|
|
- // 假设返回的数据结构是 { list: [], total: 0 } 或者直接是数组
|
|
|
- let filteredData = data;
|
|
|
+ } else {
|
|
|
+ loadingMore.value = false;
|
|
|
+ }
|
|
|
|
|
|
- // 如果是"待确认"状态,过滤掉 isIgnored 为 1 的数据
|
|
|
- if (activeIndex.value === 0 && Array.isArray(data)) {
|
|
|
- filteredData = data.filter((item) => item.isIgnored !== 1);
|
|
|
+ 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]);
|
|
|
}
|
|
|
|
|
|
- if (Array.isArray(filteredData) && filteredData.length > 0) {
|
|
|
- taskList.value = filteredData;
|
|
|
- // 更新当前状态的数量
|
|
|
- taskCounts.value[activeIndex.value] = filteredData.length;
|
|
|
- if (activeIndex.value === 2) {
|
|
|
- // 地图使用筛选后的数据
|
|
|
- indexMap.initData(taskList.value);
|
|
|
- }
|
|
|
- } else {
|
|
|
+ // 追加数据
|
|
|
+ taskList.value = [...taskList.value, ...newItems];
|
|
|
+
|
|
|
+ // 更新分页
|
|
|
+ page.value += 1;
|
|
|
+
|
|
|
+ // 判断是否还有更多数据
|
|
|
+ if (data.length < limit.value) {
|
|
|
+ finished.value = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 更新地图数据
|
|
|
+ indexMap.initData(taskList.value);
|
|
|
+ } else {
|
|
|
+ finished.value = true;
|
|
|
+ if (taskList.value.length === 0) {
|
|
|
noData.value = true;
|
|
|
- taskList.value = [];
|
|
|
- taskCounts.value[activeIndex.value] = 0;
|
|
|
}
|
|
|
- })
|
|
|
- .catch((error) => {
|
|
|
- console.error("获取任务列表失败:", error);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error("获取任务列表失败:", error);
|
|
|
+ if (!isLoadMore) {
|
|
|
loading.value = false;
|
|
|
- taskList.value = [];
|
|
|
- taskCounts.value[activeIndex.value] = 0;
|
|
|
- if (activeIndex.value === 2) {
|
|
|
- indexMap.initData(taskList.value);
|
|
|
- }
|
|
|
+ } 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;
|
|
|
}
|
|
|
|
|
|
-function toPage(item) {
|
|
|
- // router.push("/servicZes_agri")
|
|
|
- // if (activeIndex.value === 2) {
|
|
|
- // } else {
|
|
|
- // // 下发农事请求
|
|
|
- // const data = {
|
|
|
- // id: item.id,
|
|
|
- // };
|
|
|
- // VE_API.z_farm_work_record.issueFarmWorkRecord(data).then((res) => {
|
|
|
- // if (res.code === 0) {
|
|
|
- // taskPopupType.value = "success";
|
|
|
- // showTaskPopup.value = true;
|
|
|
- // getSimpleList();
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }
|
|
|
-}
|
|
|
-
|
|
|
const showUploadExecutePopup = (item) => {
|
|
|
if (item?.executeEvidence.length) {
|
|
|
onlyShare.value = true;
|
|
|
@@ -397,98 +334,28 @@ function toDetail(item) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-const priceSheetPopupRef = ref(null);
|
|
|
-const showPriceSheetPopup = (item) => {
|
|
|
- console.log('item', 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);
|
|
|
-const currentTask = ref(null);
|
|
|
-function handleAction(item) {
|
|
|
- if (activeIndex.value === 0) {
|
|
|
- taskPopupType.value = "warning";
|
|
|
- showTaskPopup.value = true;
|
|
|
- currentTask.value = item;
|
|
|
- } else {
|
|
|
- onlyShare.value = true;
|
|
|
- setTimeout(() => {
|
|
|
- uploadExecuteRef.value.showPopup(item, "share-sheet");
|
|
|
- }, 10);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-function handlePopupBtn() {
|
|
|
- showTaskPopup.value = false;
|
|
|
- if (taskPopupType.value === "warning") {
|
|
|
- // 确认忽略
|
|
|
- VE_API.z_farm_work_record.ignoreFarmWorkRecord({ farmWorkRecordId: currentTask.value.id }).then((res) => {
|
|
|
- if (res.code === 0) {
|
|
|
- ElMessage.success("操作成功");
|
|
|
- getSimpleList();
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-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;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-const executorList = ref([{
|
|
|
- id: 1,
|
|
|
- name: "张三",
|
|
|
- phone: "13800138000",
|
|
|
-}, {
|
|
|
- id: 2,
|
|
|
- name: "李四",
|
|
|
- phone: "13800138001",
|
|
|
-}])
|
|
|
-
|
|
|
-function handleTimelineAction(item) {
|
|
|
- // activeUploadPopupRef.value.triggerFarmWork({
|
|
|
- // farmId: item.farmId,
|
|
|
- // workName: item.workName,
|
|
|
- // });
|
|
|
- eventBus.emit("activeUpload:show", {
|
|
|
- gardenIdVal: item.farmId,
|
|
|
- needExecutorVal: true,
|
|
|
- problemTitleVal: '请选择 ' + item.workName + ' 执行截止时间',
|
|
|
- imgDescVal: '请上传凭证(转入农事任务凭证)',
|
|
|
- arrangeIdVal: item.farmWorkArrangeId,
|
|
|
- executorListVal: executorList.value,
|
|
|
- });
|
|
|
-}
|
|
|
+const phenologyList = ref([
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ name: "花芽分化",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 2,
|
|
|
+ name: "开花",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 3,
|
|
|
+ name: "成熟",
|
|
|
+ },
|
|
|
+]);
|
|
|
|
|
|
-const phenologyList = ref([{
|
|
|
- id: 1,
|
|
|
- name: "花芽分化",
|
|
|
-}, {
|
|
|
- id: 2,
|
|
|
- name: "开花",
|
|
|
-}, {
|
|
|
- id: 3,
|
|
|
- name: "成熟",
|
|
|
-}]);
|
|
|
+const activeUploadPopupRef = ref(null);
|
|
|
function handleSelectCurrentPhenology(item) {
|
|
|
- eventBus.emit("activeUpload:show", {
|
|
|
+ activeUploadPopupRef.value.showPopup({
|
|
|
gardenIdVal: item.farmId,
|
|
|
- problemTitleVal: '进入 物候期 的时间',
|
|
|
- imgDescVal: '请上传凭证(转入农事任务凭证)',
|
|
|
+ problemTitleVal: "进入 物候期 的时间",
|
|
|
+ imgDescVal: "请上传凭证(转入农事任务凭证)",
|
|
|
arrangeIdVal: item.farmWorkArrangeId,
|
|
|
selectCurrentPhenologyVal: true,
|
|
|
phenologyListVal: phenologyList.value,
|
|
|
@@ -498,7 +365,7 @@ function handleSelectCurrentPhenology(item) {
|
|
|
function handleRemindCustomer(item) {
|
|
|
router.push({
|
|
|
path: "/remind_customer",
|
|
|
- query: { id: item.id },
|
|
|
+ query: { farmId: item.farmId },
|
|
|
});
|
|
|
}
|
|
|
</script>
|
|
|
@@ -560,7 +427,6 @@ function handleRemindCustomer(item) {
|
|
|
}
|
|
|
|
|
|
.task-content {
|
|
|
- border-top: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
min-height: 80px;
|
|
|
}
|
|
|
|
|
|
@@ -735,73 +601,6 @@ function handleRemindCustomer(item) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .timeline {
|
|
|
- padding-top: 10px;
|
|
|
- .timeline-item {
|
|
|
- display: flex;
|
|
|
- align-items: flex-start;
|
|
|
- font-size: 14px;
|
|
|
- color: #ffffff;
|
|
|
- line-height: 22px;
|
|
|
- & + .timeline-item {
|
|
|
- margin-top: 10px;
|
|
|
- }
|
|
|
- .timeline-left {
|
|
|
- width: 22px;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- .dot {
|
|
|
- width: 6px;
|
|
|
- height: 6px;
|
|
|
- border-radius: 50%;
|
|
|
- background: #A2D5FD;
|
|
|
- margin-top: 6px;
|
|
|
- }
|
|
|
- .line {
|
|
|
- border-left: 1px dashed #A2D5FD;
|
|
|
- margin-top: 4px;
|
|
|
- height: 28px;
|
|
|
- }
|
|
|
- }
|
|
|
- .timeline-right {
|
|
|
- padding-left: 5px;
|
|
|
- flex: 1;
|
|
|
- .date {
|
|
|
- color: #1D2129;
|
|
|
- font-weight: 500;
|
|
|
- font-size: 14px;
|
|
|
- line-height: 22px;
|
|
|
- }
|
|
|
- .text {
|
|
|
- font-size: 12px;
|
|
|
- color: #d7d7d7;
|
|
|
- .price {
|
|
|
- padding-left: 4px;
|
|
|
- }
|
|
|
- .action-detail {
|
|
|
- margin-left: 6px;
|
|
|
- color: #2199F8;
|
|
|
- border-bottom: 1px solid;
|
|
|
- }
|
|
|
- }
|
|
|
- .work-name {
|
|
|
- padding-left: 4px;
|
|
|
- }
|
|
|
- }
|
|
|
- .timeline-action {
|
|
|
- align-self: center;
|
|
|
- height: 28px;
|
|
|
- line-height: 28px;
|
|
|
- flex: none;
|
|
|
- background: rgba(33, 153, 248, 0.1);
|
|
|
- color: #2199F8;
|
|
|
- font-size: 12px;
|
|
|
- padding: 0px 11px;
|
|
|
- border-radius: 20px;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
.item-footer {
|
|
|
@@ -880,47 +679,4 @@ function handleRemindCustomer(item) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-.task-tips-popup {
|
|
|
- width: 75%;
|
|
|
- padding: 28px 28px 20px;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- .create-farm-icon {
|
|
|
- width: 40px;
|
|
|
- height: 40px;
|
|
|
- margin-bottom: 12px;
|
|
|
- }
|
|
|
- .farm-check-icon {
|
|
|
- width: 68px;
|
|
|
- height: 68px;
|
|
|
- margin-bottom: 12px;
|
|
|
- }
|
|
|
- .create-farm-text {
|
|
|
- font-size: 20px;
|
|
|
- font-weight: 500;
|
|
|
- line-height: 40px;
|
|
|
- margin-bottom: 32px;
|
|
|
- text-align: center;
|
|
|
- &.success-text {
|
|
|
- font-size: 23px;
|
|
|
- font-weight: 400;
|
|
|
- }
|
|
|
- }
|
|
|
- .main-text {
|
|
|
- color: #2199f8;
|
|
|
- }
|
|
|
- .create-farm-btn {
|
|
|
- width: 100%;
|
|
|
- box-sizing: border-box;
|
|
|
- padding: 8px;
|
|
|
- border-radius: 25px;
|
|
|
- font-size: 16px;
|
|
|
- background: #2199f8;
|
|
|
- color: #fff;
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
-}
|
|
|
</style>
|