|
@@ -3,120 +3,126 @@
|
|
|
<div class="task-top">
|
|
<div class="task-top">
|
|
|
<div class="map-container" ref="mapContainer"></div>
|
|
<div class="map-container" ref="mapContainer"></div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="calendar-container">
|
|
|
|
|
+ <customCalendar ref="calendarRef" @dateSelect="handleDateSelect"></customCalendar>
|
|
|
|
|
+ </div>
|
|
|
<div class="task-list">
|
|
<div class="task-list">
|
|
|
<div class="list-filter">
|
|
<div class="list-filter">
|
|
|
<div class="filter-item" :class="{ active: activeIndex === 0 }" @click="handleActiveFilter(0)">
|
|
<div class="filter-item" :class="{ active: activeIndex === 0 }" @click="handleActiveFilter(0)">
|
|
|
- 待确认({{ taskCounts[0] || 0 }})
|
|
|
|
|
|
|
+ 待接受({{ taskCounts[0] || 0 }})
|
|
|
</div>
|
|
</div>
|
|
|
<div class="filter-item" :class="{ active: activeIndex === 2 }" @click="handleActiveFilter(2)">
|
|
<div class="filter-item" :class="{ active: activeIndex === 2 }" @click="handleActiveFilter(2)">
|
|
|
- 已确认({{ taskCounts[2] || 0 }})
|
|
|
|
|
|
|
+ 已接受({{ taskCounts[2] || 0 }})
|
|
|
</div>
|
|
</div>
|
|
|
<div class="filter-item" :class="{ active: activeIndex === 3 }" @click="handleActiveFilter(3)">
|
|
<div class="filter-item" :class="{ active: activeIndex === 3 }" @click="handleActiveFilter(3)">
|
|
|
- 待提醒({{ taskCounts[3] || 0 }})
|
|
|
|
|
|
|
+ 执行中({{ taskCounts[3] || 0 }})
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="filter-item" :class="{ active: activeIndex === 4 }" @click="handleActiveFilter(3)">
|
|
|
|
|
+ 已完成({{ taskCounts[4] || 0 }})
|
|
|
</div>
|
|
</div>
|
|
|
</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="work-task-list" v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.3)">
|
|
|
|
|
- <div class="task-item" v-for="(item, index) in taskList" :key="index" :class="isTimeoutItem(index) ? 'timeout-item' : ''" @click="handleItem(item, index)">
|
|
|
|
|
- <div class="item-title">
|
|
|
|
|
- <img class="task-icon" src="@/assets/img/home/task.png" alt="">
|
|
|
|
|
- <span class="title-text">{{ item.operation?.name }}</span>
|
|
|
|
|
- <span class="task-status" :class="`task-status--${item.operation?.type}`">{{ item.operation?.typeName }}</span>
|
|
|
|
|
|
|
+ <div class="list-box">
|
|
|
|
|
+ <div class="list-header">
|
|
|
|
|
+ <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>
|
|
|
- <span class="task-tag timeout" v-if="isTimeoutItem(index)">
|
|
|
|
|
- <el-icon><WarningFilled /></el-icon>
|
|
|
|
|
- {{ getTimeoutText() }}
|
|
|
|
|
- </span>
|
|
|
|
|
- <span class="task-tag" v-else>
|
|
|
|
|
- {{ activeStatus }}
|
|
|
|
|
- </span>
|
|
|
|
|
- <div class="item-content">
|
|
|
|
|
- <div class="item-info">
|
|
|
|
|
- <div class="info-item">
|
|
|
|
|
- <div class="info-name">负责人:</div><span class="val-text">
|
|
|
|
|
- 某某某、某某某</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="info-item">
|
|
|
|
|
- <div class="info-name">农情研判:</div><span class="val-text">
|
|
|
|
|
- {{ item.operation?.work_reason }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="info-item" v-if="mode !== 'review'">
|
|
|
|
|
- <div class="info-name">药物处方:</div><span class="val-text">
|
|
|
|
|
- {{ item.operation?.drug }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div class="action-btn">批量接受</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 任务列表 -->
|
|
|
|
|
+ <div class="work-task-list" v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.3)">
|
|
|
|
|
+ <div class="task-item" v-for="(item, index) in taskList" :key="index"
|
|
|
|
|
+ :class="isTimeoutItem(index) ? 'timeout-item' : ''" @click="handleItem(item, index)">
|
|
|
|
|
+ <div class="item-title">
|
|
|
|
|
+ <img class="task-icon" src="@/assets/img/home/task.png" alt="">
|
|
|
|
|
+ <span class="title-text">{{ item.operation?.name }}</span>
|
|
|
|
|
+ <span class="task-status" :class="`task-status--${item.operation?.type}`">{{
|
|
|
|
|
+ item.operation?.typeName }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="excutor-info">
|
|
|
|
|
- <div class="excutor-info-top">
|
|
|
|
|
- <executor-header :name="getExecutorName(index)" :phone="getExecutorPhone(index)"
|
|
|
|
|
- :avatar="getExecutorAvatar(index)" />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="executor-stats">
|
|
|
|
|
- <div class="stat-cell">
|
|
|
|
|
- <div class="stat-value">
|
|
|
|
|
- {{ item.time ? formatGMTToYMD(item.time) : "--" }}
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="stat-label">执行时间</div>
|
|
|
|
|
|
|
+ <span class="task-tag timeout" v-if="isTimeoutItem(index)">
|
|
|
|
|
+ <el-icon>
|
|
|
|
|
+ <WarningFilled />
|
|
|
|
|
+ </el-icon>
|
|
|
|
|
+ {{ getTimeoutText() }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span class="task-tag" v-else>
|
|
|
|
|
+ {{ activeStatus }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <div class="item-content">
|
|
|
|
|
+ <div class="item-info">
|
|
|
|
|
+ <div class="info-item">
|
|
|
|
|
+ <div class="info-name">负责人:</div><span class="val-text">
|
|
|
|
|
+ 某某某、某某某</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="cell-line"></div>
|
|
|
|
|
- <div class="stat-cell">
|
|
|
|
|
- <div class="stat-value">{{ item.geohash_sample || "--" }}</div>
|
|
|
|
|
- <div class="stat-label">执行区域</div>
|
|
|
|
|
|
|
+ <div class="info-item" v-if="mode !== 'review'">
|
|
|
|
|
+ <div class="info-name">农事详情:</div><span class="val-text">
|
|
|
|
|
+ {{ item.operation?.drug }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="cell-line"></div>
|
|
|
|
|
- <div class="stat-cell">
|
|
|
|
|
- <div class="stat-value">{{ item.operation?.machine_code || "--" }}</div>
|
|
|
|
|
- <div class="stat-label">执行农机</div>
|
|
|
|
|
|
|
+ <div class="info-item">
|
|
|
|
|
+ <div class="info-name">农情研判:</div><span class="val-text">
|
|
|
|
|
+ {{ item.operation?.work_reason }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="excutor-info">
|
|
|
|
|
+ <div class="executor-stats">
|
|
|
|
|
+ <div class="stat-cell">
|
|
|
|
|
+ <div class="stat-value">
|
|
|
|
|
+ {{ item.time ? formatGMTToYMD(item.time) : "--" }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="stat-label">执行时间</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="cell-line"></div>
|
|
|
|
|
+ <div class="stat-cell">
|
|
|
|
|
+ <div class="stat-value">{{ item.geohash_sample || "--" }}</div>
|
|
|
|
|
+ <div class="stat-label">执行区域</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="cell-line"></div>
|
|
|
|
|
+ <div class="stat-cell">
|
|
|
|
|
+ <div class="stat-value">{{ item.operation?.machine_code || "--" }}</div>
|
|
|
|
|
+ <div class="stat-label">执行农机</div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
- <div class="unqualified-reason" v-if="activeStatus === '未达标'">
|
|
|
|
|
- 未达标原因:{{ item.operation?.reason || "未在合适时间执行,药液未充分喷撒吸收" }}
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div
|
|
|
|
|
- class="compare-imgs"
|
|
|
|
|
- v-if="activeStatus === '未达标' && (item.beforeImage || item.afterImage)"
|
|
|
|
|
- @click.stop
|
|
|
|
|
- >
|
|
|
|
|
- <div class="img-tag">前</div>
|
|
|
|
|
- <div class="img-tag right-tag">后</div>
|
|
|
|
|
- <div class="img-item" v-if="item.beforeImage">
|
|
|
|
|
- <img :src="getWorkImageUrl(item.beforeImage)" alt="" />
|
|
|
|
|
|
|
+ <div class="unqualified-reason" v-if="activeStatus === '未达标'">
|
|
|
|
|
+ 未达标原因:{{ item.operation?.reason || "未在合适时间执行,药液未充分喷撒吸收" }}
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="img-item" v-if="item.afterImage">
|
|
|
|
|
- <img :src="getWorkImageUrl(item.afterImage)" alt="" />
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div class="compare-imgs" v-if="activeStatus === '未达标' && (item.beforeImage || item.afterImage)"
|
|
|
|
|
+ @click.stop>
|
|
|
|
|
+ <div class="img-tag">前</div>
|
|
|
|
|
+ <div class="img-tag right-tag">后</div>
|
|
|
|
|
+ <div class="img-item" v-if="item.beforeImage">
|
|
|
|
|
+ <img :src="getWorkImageUrl(item.beforeImage)" alt="" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="img-item" v-if="item.afterImage">
|
|
|
|
|
+ <img :src="getWorkImageUrl(item.afterImage)" alt="" />
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
- <div class="btn-group" v-if="getItemStatusButtons(index).length">
|
|
|
|
|
- <div v-for="btn in getItemStatusButtons(index)" :key="btn.label" class="edit-btn" :class="btn.type"
|
|
|
|
|
- @click.stop="handleStatusBtn(btn, item, index)">
|
|
|
|
|
- {{ btn.label }}
|
|
|
|
|
|
|
+ <div class="task-footer">
|
|
|
|
|
+ <div class="farm-info">来自某某农场农场</div>
|
|
|
|
|
+ <div class="btn-group" v-if="getItemStatusButtons(index).length">
|
|
|
|
|
+ <div v-for="btn in getItemStatusButtons(index)" :key="btn.label" class="edit-btn"
|
|
|
|
|
+ :class="btn.type" @click.stop="handleStatusBtn(btn, item, index)">
|
|
|
|
|
+ {{ btn.label }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
- <div class="empty-tip" v-if="!loading && taskList.length === 0">暂无数据</div>
|
|
|
|
|
|
|
+ <div class="empty-tip" v-if="!loading && taskList.length === 0">暂无数据</div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -131,12 +137,12 @@
|
|
|
import { computed, nextTick, onActivated, onMounted, ref, watch } from "vue";
|
|
import { computed, nextTick, onActivated, onMounted, ref, watch } from "vue";
|
|
|
import { useRoute } from "vue-router";
|
|
import { useRoute } from "vue-router";
|
|
|
import { useStore } from "vuex";
|
|
import { useStore } from "vuex";
|
|
|
-import IndexMap from "../farm_manage/map/index";
|
|
|
|
|
|
|
+import IndexMap from "./index";
|
|
|
import { useRouter } from "vue-router";
|
|
import { useRouter } from "vue-router";
|
|
|
import { WarningFilled } from "@element-plus/icons-vue";
|
|
import { WarningFilled } from "@element-plus/icons-vue";
|
|
|
import { ElMessage } from "element-plus";
|
|
import { ElMessage } from "element-plus";
|
|
|
-import ExecutorHeader from "./components/ExecutorHeader.vue";
|
|
|
|
|
import config from "@/api/config.js";
|
|
import config from "@/api/config.js";
|
|
|
|
|
+import customCalendar from "./components/calendar.vue";
|
|
|
|
|
|
|
|
const store = useStore();
|
|
const store = useStore();
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
@@ -154,6 +160,16 @@ const taskList = ref([
|
|
|
{
|
|
{
|
|
|
time: "Fri, 22 May 2026 00:00:00 GMT",
|
|
time: "Fri, 22 May 2026 00:00:00 GMT",
|
|
|
geohash_sample: "ws0gs49ns213",
|
|
geohash_sample: "ws0gs49ns213",
|
|
|
|
|
+ farmName: "冬季清园",
|
|
|
|
|
+ typeName: "荔枝",
|
|
|
|
|
+ userType: 1,
|
|
|
|
|
+ address: "广东省广州市从化区太平镇凤凰路88号",
|
|
|
|
|
+ farmPoint: "POINT(113.61652616170711 23.58399613872042)",
|
|
|
|
|
+ sourceData: {
|
|
|
|
|
+ currentPhenologyName: "花芽分化",
|
|
|
|
|
+ currentPhenologyStartDate: "2026-01-15",
|
|
|
|
|
+ daysUntilNext: 3,
|
|
|
|
|
+ },
|
|
|
operation: {
|
|
operation: {
|
|
|
name: "冬季清园",
|
|
name: "冬季清园",
|
|
|
type: "1",
|
|
type: "1",
|
|
@@ -167,6 +183,16 @@ const taskList = ref([
|
|
|
{
|
|
{
|
|
|
time: "Mon, 26 May 2026 00:00:00 GMT",
|
|
time: "Mon, 26 May 2026 00:00:00 GMT",
|
|
|
geohash_sample: "ws0gefxm68u5",
|
|
geohash_sample: "ws0gefxm68u5",
|
|
|
|
|
+ farmName: "施肥促花",
|
|
|
|
|
+ typeName: "柑橘",
|
|
|
|
|
+ userType: 2,
|
|
|
|
|
+ address: "广东省肇庆市德庆县官圩镇果园示范区",
|
|
|
|
|
+ farmPoint: "POINT(113.62757101477101 23.590796948574365)",
|
|
|
|
|
+ sourceData: {
|
|
|
|
|
+ currentPhenologyName: "开花期",
|
|
|
|
|
+ currentPhenologyStartDate: "2026-02-20",
|
|
|
|
|
+ daysUntilNext: 12,
|
|
|
|
|
+ },
|
|
|
operation: {
|
|
operation: {
|
|
|
name: "施肥促花",
|
|
name: "施肥促花",
|
|
|
type: "2",
|
|
type: "2",
|
|
@@ -180,6 +206,17 @@ const taskList = ref([
|
|
|
{
|
|
{
|
|
|
time: "Wed, 28 May 2026 00:00:00 GMT",
|
|
time: "Wed, 28 May 2026 00:00:00 GMT",
|
|
|
geohash_sample: "ws0gefzjqqqw",
|
|
geohash_sample: "ws0gefzjqqqw",
|
|
|
|
|
+ farmId: 1003,
|
|
|
|
|
+ farmName: "病虫害防治",
|
|
|
|
|
+ typeName: "水稻",
|
|
|
|
|
+ userType: 1,
|
|
|
|
|
+ address: "广东省清远市清城区龙塘镇农业科技园",
|
|
|
|
|
+ farmPoint: "POINT(113.62240816252164 23.59499176519138)",
|
|
|
|
|
+ sourceData: {
|
|
|
|
|
+ currentPhenologyName: "分蘖期",
|
|
|
|
|
+ currentPhenologyStartDate: "2026-03-01",
|
|
|
|
|
+ daysUntilNext: 8,
|
|
|
|
|
+ },
|
|
|
operation: {
|
|
operation: {
|
|
|
name: "病虫害防治",
|
|
name: "病虫害防治",
|
|
|
type: "1",
|
|
type: "1",
|
|
@@ -208,18 +245,6 @@ const STATUS_BTN_MAP = {
|
|
|
未达标: [{ label: "重新下发", type: "primary", action: "redispatch" }],
|
|
未达标: [{ label: "重新下发", type: "primary", action: "redispatch" }],
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-const nameArr = ["张扬", "王明", "詹金华"];
|
|
|
|
|
-const phoneArr = ["13939189356", "13800138000", "13712345678"];
|
|
|
|
|
-const avatarArr = [
|
|
|
|
|
- "https://birdseye-img.sysuimars.com/shuichan/image.png",
|
|
|
|
|
- "",
|
|
|
|
|
- "",
|
|
|
|
|
-];
|
|
|
|
|
-
|
|
|
|
|
-const getExecutorName = (index) => nameArr[index % nameArr.length];
|
|
|
|
|
-const getExecutorPhone = (index) => phoneArr[index % phoneArr.length];
|
|
|
|
|
-const getExecutorAvatar = (index) => avatarArr[index % avatarArr.length] || "";
|
|
|
|
|
-
|
|
|
|
|
const isTimeoutItem = (index) => index === 0;
|
|
const isTimeoutItem = (index) => index === 0;
|
|
|
|
|
|
|
|
const getTimeoutRemindBtn = () => {
|
|
const getTimeoutRemindBtn = () => {
|
|
@@ -278,9 +303,6 @@ const handleItem = (item, index) => {
|
|
|
query: {
|
|
query: {
|
|
|
miniJson: JSON.stringify({
|
|
miniJson: JSON.stringify({
|
|
|
id: item.operation?.work_id,
|
|
id: item.operation?.work_id,
|
|
|
- name: getExecutorName(index),
|
|
|
|
|
- phone: getExecutorPhone(index),
|
|
|
|
|
- avatar: getExecutorAvatar(index),
|
|
|
|
|
status: activeStatus.value,
|
|
status: activeStatus.value,
|
|
|
time: item.time,
|
|
time: item.time,
|
|
|
geohash_sample: item.geohash_sample,
|
|
geohash_sample: item.geohash_sample,
|
|
@@ -297,6 +319,36 @@ const handleStatusBtn = (btn, item, index) => {
|
|
|
ElMessage.success("提醒成功!");
|
|
ElMessage.success("提醒成功!");
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+const calendarRef = ref(null);
|
|
|
|
|
+const filterDate = ref(null);
|
|
|
|
|
+const fullTaskList = ref([]);
|
|
|
|
|
+
|
|
|
|
|
+const getCalendarTaskList = (list) => {
|
|
|
|
|
+ return list.map((item) => ({
|
|
|
|
|
+ expectedExecuteDate: item.time,
|
|
|
|
|
+ executeDeadlineDate: item.time,
|
|
|
|
|
+ }));
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const syncCalendarData = () => {
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ calendarRef.value?.setSolarTerm(getCalendarTaskList(fullTaskList.value));
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const handleDateSelect = (date) => {
|
|
|
|
|
+ filterDate.value = date;
|
|
|
|
|
+ // if (!date) {
|
|
|
|
|
+ // taskList.value = [...fullTaskList.value];
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // taskList.value = fullTaskList.value.filter((item) => {
|
|
|
|
|
+ // if (!item.time) return false;
|
|
|
|
|
+ // return formatGMTToYMD(item.time) === date;
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ syncCalendarData();
|
|
|
|
|
+};
|
|
|
// 各状态任务数量
|
|
// 各状态任务数量
|
|
|
const taskCounts = ref([0, 0, 0]);
|
|
const taskCounts = ref([0, 0, 0]);
|
|
|
// 当前选中的筛选索引
|
|
// 当前选中的筛选索引
|
|
@@ -318,16 +370,6 @@ const getFutureFarmWorkWarning = async (item) => {
|
|
|
const cityCode = ref("");
|
|
const cityCode = ref("");
|
|
|
//根据城市的坐标返回区县列表
|
|
//根据城市的坐标返回区县列表
|
|
|
const districtList = 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([]);
|
|
const farmWorkTypeList = ref([]);
|
|
@@ -342,11 +384,16 @@ const mapPoint = ref(null);
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
mapPoint.value = store.state.home.miniUserLocationPoint;
|
|
mapPoint.value = store.state.home.miniUserLocationPoint;
|
|
|
|
|
+ fullTaskList.value = [...taskList.value];
|
|
|
// getDistrictListByCity();
|
|
// getDistrictListByCity();
|
|
|
resetAndLoad();
|
|
resetAndLoad();
|
|
|
getFarmWorkTypeList();
|
|
getFarmWorkTypeList();
|
|
|
|
|
+ syncCalendarData();
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
indexMap.initMap(mapPoint.value, mapContainer.value, true);
|
|
indexMap.initMap(mapPoint.value, mapContainer.value, true);
|
|
|
|
|
+
|
|
|
|
|
+ // 更新地图数据
|
|
|
|
|
+ indexMap.initData(taskList.value, '', 'farmPoint');
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -448,17 +495,17 @@ async function getSimpleList(isLoadMore = false) {
|
|
|
// 追加数据
|
|
// 追加数据
|
|
|
// const newTaskList = [...taskList.value, ...newItems];
|
|
// const newTaskList = [...taskList.value, ...newItems];
|
|
|
// taskList.value = newTaskList.filter(item => item.timelineList.length > 0);
|
|
// taskList.value = newTaskList.filter(item => item.timelineList.length > 0);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 更新分页
|
|
// 更新分页
|
|
|
page.value += 1;
|
|
page.value += 1;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 判断是否还有更多数据
|
|
// 判断是否还有更多数据
|
|
|
if (data.length < limit.value) {
|
|
if (data.length < limit.value) {
|
|
|
finished.value = true;
|
|
finished.value = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 更新地图数据
|
|
// 更新地图数据
|
|
|
- indexMap.initData(taskList.value,'','farmPoint');
|
|
|
|
|
|
|
+ indexMap.initData(taskList.value, '', 'farmPoint');
|
|
|
} else {
|
|
} else {
|
|
|
finished.value = true;
|
|
finished.value = true;
|
|
|
if (taskList.value.length === 0) {
|
|
if (taskList.value.length === 0) {
|
|
@@ -504,6 +551,10 @@ function handleActiveFilter(i) {
|
|
|
selectParma.value.farmWorkTypeId = null;
|
|
selectParma.value.farmWorkTypeId = null;
|
|
|
const statusMap = { 0: "待接受", 2: "已接受", 3: "执行中" };
|
|
const statusMap = { 0: "待接受", 2: "已接受", 3: "执行中" };
|
|
|
activeStatus.value = statusMap[i] || "待接受";
|
|
activeStatus.value = statusMap[i] || "待接受";
|
|
|
|
|
+ filterDate.value = null;
|
|
|
|
|
+ taskList.value = [...fullTaskList.value];
|
|
|
|
|
+ calendarRef.value?.clearSelection();
|
|
|
|
|
+ syncCalendarData();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function handleRemindCustomer(item) {
|
|
function handleRemindCustomer(item) {
|
|
@@ -514,21 +565,48 @@ function handleRemindCustomer(item) {
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
.task-page {
|
|
.task-page {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- height: calc(100vh - 50px - 50px);
|
|
|
|
|
|
|
+ height: calc(100vh - 50px);
|
|
|
overflow: auto;
|
|
overflow: auto;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
- background: #f5f7fb;
|
|
|
|
|
|
|
+ background: #FFFFFF;
|
|
|
|
|
+
|
|
|
.map-container {
|
|
.map-container {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 162px;
|
|
height: 162px;
|
|
|
clip-path: inset(0px round 8px);
|
|
clip-path: inset(0px round 8px);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ .list-box {
|
|
|
|
|
+ background: #F1F3F4;
|
|
|
|
|
+ padding: 12px 12px 8px 12px;
|
|
|
|
|
+
|
|
|
|
|
+ .list-header {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+
|
|
|
|
|
+ .action-btn {
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ height: 32px;
|
|
|
|
|
+ line-height: 30px;
|
|
|
|
|
+ color: #2199F8;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ border-radius: 5px;
|
|
|
|
|
+ padding: 0 10px;
|
|
|
|
|
+ background: #FFFFFF;
|
|
|
|
|
+ border: 1px solid #2199F8;
|
|
|
|
|
+ color: #2199F8;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.select-group {
|
|
.select-group {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
padding: 0px 12px 0 12px;
|
|
padding: 0px 12px 0 12px;
|
|
|
|
|
+
|
|
|
.select-item {
|
|
.select-item {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
|
|
+
|
|
|
::v-deep {
|
|
::v-deep {
|
|
|
.el-select__wrapper {
|
|
.el-select__wrapper {
|
|
|
text-align: center;
|
|
text-align: center;
|
|
@@ -537,16 +615,19 @@ function handleRemindCustomer(item) {
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
background: none;
|
|
background: none;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.el-select__selection {
|
|
.el-select__selection {
|
|
|
flex: none;
|
|
flex: none;
|
|
|
width: fit-content;
|
|
width: fit-content;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.el-select__placeholder {
|
|
.el-select__placeholder {
|
|
|
position: static;
|
|
position: static;
|
|
|
transform: none;
|
|
transform: none;
|
|
|
width: fit-content;
|
|
width: fit-content;
|
|
|
color: rgba(0, 0, 0, 0.2);
|
|
color: rgba(0, 0, 0, 0.2);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.el-select__caret {
|
|
.el-select__caret {
|
|
|
color: rgba(0, 0, 0, 0.2);
|
|
color: rgba(0, 0, 0, 0.2);
|
|
|
}
|
|
}
|
|
@@ -554,6 +635,10 @@ function handleRemindCustomer(item) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ .calendar-container {
|
|
|
|
|
+ padding: 4px 12px 8px 12px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.task-top {
|
|
.task-top {
|
|
|
padding: 10px 12px 0 12px;
|
|
padding: 10px 12px 0 12px;
|
|
|
}
|
|
}
|
|
@@ -577,28 +662,42 @@ function handleRemindCustomer(item) {
|
|
|
color: #6f7274;
|
|
color: #6f7274;
|
|
|
padding: 20px 0;
|
|
padding: 20px 0;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.task-list {
|
|
.task-list {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
background: #fff;
|
|
background: #fff;
|
|
|
- padding: 12px 12px 8px 12px;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.list-filter {
|
|
.list-filter {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: space-around;
|
|
justify-content: space-around;
|
|
|
|
|
+ margin-top: 10px;
|
|
|
|
|
+
|
|
|
.filter-item {
|
|
.filter-item {
|
|
|
padding: 0 12px;
|
|
padding: 0 12px;
|
|
|
- height: 28px;
|
|
|
|
|
- color: rgba(0, 0, 0, 0.5);
|
|
|
|
|
|
|
+ height: 32px;
|
|
|
|
|
+ color: #1D2129;
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
- line-height: 28px;
|
|
|
|
|
border-radius: 20px;
|
|
border-radius: 20px;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+
|
|
|
&.active {
|
|
&.active {
|
|
|
color: #2199f8;
|
|
color: #2199f8;
|
|
|
- background: rgba(33, 153, 248, 0.2);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ &::after {
|
|
|
|
|
+ content: "";
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ bottom: 0;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 2px;
|
|
|
|
|
+ background: #2199f8;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.work-task-list {
|
|
.work-task-list {
|
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
|
|
|
|
|
@@ -634,7 +733,7 @@ function handleRemindCustomer(item) {
|
|
|
margin-left: 8px;
|
|
margin-left: 8px;
|
|
|
border-radius: 2px;
|
|
border-radius: 2px;
|
|
|
height: 20px;
|
|
height: 20px;
|
|
|
- line-height: 18px;
|
|
|
|
|
|
|
+ line-height: 20px;
|
|
|
padding: 1px 6px;
|
|
padding: 1px 6px;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
@@ -645,10 +744,12 @@ function handleRemindCustomer(item) {
|
|
|
background: rgba(33, 153, 248, 0.1);
|
|
background: rgba(33, 153, 248, 0.1);
|
|
|
color: #2199f8;
|
|
color: #2199f8;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
&.task-status--2 {
|
|
&.task-status--2 {
|
|
|
background: rgba(255, 179, 47, 0.1);
|
|
background: rgba(255, 179, 47, 0.1);
|
|
|
color: #FFB32F;
|
|
color: #FFB32F;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
&.task-status--3 {
|
|
&.task-status--3 {
|
|
|
background: rgba(58, 173, 148, 0.1);
|
|
background: rgba(58, 173, 148, 0.1);
|
|
|
color: #3AAD94;
|
|
color: #3AAD94;
|
|
@@ -660,17 +761,17 @@ function handleRemindCustomer(item) {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
right: 0;
|
|
right: 0;
|
|
|
top: 0;
|
|
top: 0;
|
|
|
- background: rgba(33, 153, 248, 0.1);
|
|
|
|
|
- color: #2199f8;
|
|
|
|
|
|
|
+ background: rgba(255, 149, 61, 0.1);
|
|
|
|
|
+ color: #F46E00;
|
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
|
- padding: 0 6px;
|
|
|
|
|
|
|
+ padding: 0 10px;
|
|
|
height: 25px;
|
|
height: 25px;
|
|
|
line-height: 25px;
|
|
line-height: 25px;
|
|
|
border-radius: 0 8px 0 8px;
|
|
border-radius: 0 8px 0 8px;
|
|
|
|
|
|
|
|
&.timeout {
|
|
&.timeout {
|
|
|
- background: #ff4747;
|
|
|
|
|
- color: #fff;
|
|
|
|
|
|
|
+ background: rgba(255, 106, 106, 0.1);
|
|
|
|
|
+ color: #FF6A6A;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
gap: 2px;
|
|
gap: 2px;
|
|
@@ -707,22 +808,23 @@ function handleRemindCustomer(item) {
|
|
|
.stat-value {
|
|
.stat-value {
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
- color: #1d2129;
|
|
|
|
|
|
|
+ color: #0B0B0B;
|
|
|
margin-bottom: 4px;
|
|
margin-bottom: 4px;
|
|
|
word-break: break-all;
|
|
word-break: break-all;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.stat-label {
|
|
.stat-label {
|
|
|
- font-size: 10px;
|
|
|
|
|
|
|
+ font-size: 12px;
|
|
|
line-height: 20px;
|
|
line-height: 20px;
|
|
|
- color: #86909c;
|
|
|
|
|
|
|
+ color: rgba(107, 107, 107, 0.5);
|
|
|
|
|
+ text-align: center;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.item-info {
|
|
.item-info {
|
|
|
- color: #86909c;
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
- line-height: 18px;
|
|
|
|
|
|
|
+ color: rgba(111, 114, 116, 0.6);
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ line-height: 21px;
|
|
|
|
|
|
|
|
.info-item {
|
|
.info-item {
|
|
|
display: flex;
|
|
display: flex;
|
|
@@ -733,11 +835,22 @@ function handleRemindCustomer(item) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.val-text {
|
|
.val-text {
|
|
|
- color: #1d2129;
|
|
|
|
|
|
|
+ // color: #1d2129;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .info-item + .info-item {
|
|
|
|
|
- padding-top: 12px;
|
|
|
|
|
|
|
+ .info-item+.info-item {
|
|
|
|
|
+ padding-top: 6px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .task-footer {
|
|
|
|
|
+ padding-top: 4px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ .farm-info {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ color: rgba(32, 32, 32, 0.4);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -745,30 +858,24 @@ function handleRemindCustomer(item) {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: end;
|
|
justify-content: end;
|
|
|
- width: 100%;
|
|
|
|
|
gap: 10px;
|
|
gap: 10px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.edit-btn {
|
|
.edit-btn {
|
|
|
- flex: 1;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
height: 30px;
|
|
height: 30px;
|
|
|
- border-radius: 4px;
|
|
|
|
|
|
|
+ padding: 0 16px;
|
|
|
|
|
+ border-radius: 24px;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
line-height: 30px;
|
|
line-height: 30px;
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
- border: 0.5px solid transparent;
|
|
|
|
|
|
|
|
|
|
&.normal {
|
|
&.normal {
|
|
|
- flex: none;
|
|
|
|
|
- width: 131px;
|
|
|
|
|
- background: #fff;
|
|
|
|
|
- border: 0.5px solid rgba(0, 0, 0, 0.2);
|
|
|
|
|
- color: #1d2129;
|
|
|
|
|
|
|
+ background: #F6F6F6;
|
|
|
|
|
+ color: #000000;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&.primary {
|
|
&.primary {
|
|
|
- background: #2199f8;
|
|
|
|
|
|
|
+ background: #FF953D;
|
|
|
color: #fff;
|
|
color: #fff;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|