|
|
@@ -2,13 +2,21 @@
|
|
|
<div class="plan-page">
|
|
|
<custom-header name="农事规划"></custom-header>
|
|
|
<div class="plan-content">
|
|
|
+ <div class="season-tabs">
|
|
|
+ <div
|
|
|
+ v-for="s in seasons"
|
|
|
+ :key="s.value"
|
|
|
+ class="season-tab"
|
|
|
+ :class="{ active: s.value === activeSeason }"
|
|
|
+ @click="activeSeason = s.value"
|
|
|
+ >
|
|
|
+ {{ s.label }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="status-filter">
|
|
|
- <div class="status-label">农事状态</div>
|
|
|
- <div class="status-items">
|
|
|
- <div v-for="status in statusList" :key="status.value" class="status-item" :class="status.color">
|
|
|
- <div class="status-dot"></div>
|
|
|
- <span class="status-text">{{ status.label }}</span>
|
|
|
- </div>
|
|
|
+ <div v-for="status in statusList" :key="status.value" class="status-item" :class="status.color">
|
|
|
+ <div class="status-dot"></div>
|
|
|
+ <span class="status-text">{{ status.label }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -33,8 +41,12 @@
|
|
|
<div class="cycle-task-text">梢期</div>
|
|
|
<div class="cycle-task-text">杀虫</div>
|
|
|
<div v-if="item.icon" class="status-icon" :class="item.icon.type">
|
|
|
- <el-icon v-if="item.icon.type === 'complete'" size="16" color="#1CA900"><SuccessFilled /></el-icon>
|
|
|
- <el-icon v-if="item.icon.type === 'warning'" size="18" color="#FF953D"><WarnTriangleFilled /></el-icon>
|
|
|
+ <el-icon v-if="item.icon.type === 'complete'" size="16" color="#1CA900"
|
|
|
+ ><SuccessFilled
|
|
|
+ /></el-icon>
|
|
|
+ <el-icon v-if="item.icon.type === 'warning'" size="18" color="#FF953D"
|
|
|
+ ><WarnTriangleFilled
|
|
|
+ /></el-icon>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 任务连接器 -->
|
|
|
@@ -60,7 +72,7 @@
|
|
|
<div class="control-section">
|
|
|
<div class="toggle-group">
|
|
|
<el-switch v-model="isDefaultEnabled" />
|
|
|
- <span class="toggle-label">{{ isDefaultEnabled ? '默认' : '' }}发起农情需求</span>
|
|
|
+ <span class="toggle-label">{{ isDefaultEnabled ? "默认" : "" }}发起农情需求</span>
|
|
|
</div>
|
|
|
<div class="add-button-group">
|
|
|
<div class="add-button button" @click="addNewTask">新增农事</div>
|
|
|
@@ -84,6 +96,14 @@ import activeUploadPopup from "@/components/popup/activeUploadPopup.vue";
|
|
|
const router = useRouter();
|
|
|
|
|
|
// 状态列表数据
|
|
|
+const seasons = reactive([
|
|
|
+ { value: "spring", label: "春季" },
|
|
|
+ { value: "summer", label: "夏季" },
|
|
|
+ { value: "autumn", label: "秋季" },
|
|
|
+ { value: "winter", label: "冬季" },
|
|
|
+]);
|
|
|
+const activeSeason = ref("spring");
|
|
|
+
|
|
|
const statusList = reactive([
|
|
|
{ value: "pending", label: "待触发", color: "gray" },
|
|
|
{ value: "executing", label: "待完成", color: "blue" },
|
|
|
@@ -187,7 +207,7 @@ const toggleDefault = () => {
|
|
|
const addNewTask = () => {
|
|
|
router.push({
|
|
|
path: "/modify_work",
|
|
|
- query: { data: JSON.stringify(['生长异常']), gardenId: 766, isAdd: true },
|
|
|
+ query: { data: JSON.stringify(["生长异常"]), gardenId: 766, isAdd: true },
|
|
|
});
|
|
|
};
|
|
|
|
|
|
@@ -203,16 +223,16 @@ const manageTask = () => {
|
|
|
const detailDialogRef = ref(null);
|
|
|
|
|
|
const handleRowClick = (item) => {
|
|
|
- if(item.status === "complete"){
|
|
|
+ if (item.status === "complete") {
|
|
|
router.push({
|
|
|
path: "/review_work",
|
|
|
query: {
|
|
|
id: item.id,
|
|
|
},
|
|
|
});
|
|
|
- }else if(item.type !== "term" && item.status === "default"){
|
|
|
+ } else if (item.type !== "term" && item.status === "default") {
|
|
|
detailDialogRef.value.showDialog();
|
|
|
- }else if (item.status === "warning" || item.status === "normal"){
|
|
|
+ } else if (item.status === "warning" || item.status === "normal") {
|
|
|
router.push({
|
|
|
path: "/completed_work",
|
|
|
query: {
|
|
|
@@ -249,53 +269,65 @@ const handleRowClick = (item) => {
|
|
|
gap: 16px;
|
|
|
font-size: 12px;
|
|
|
|
|
|
- .status-label {
|
|
|
- font-size: 12px;
|
|
|
- white-space: nowrap;
|
|
|
- }
|
|
|
-
|
|
|
- .status-items {
|
|
|
+ .status-item {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- gap: 20px;
|
|
|
-
|
|
|
- .status-item {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- gap: 6px;
|
|
|
- &.gray {
|
|
|
- color: #c4c6c9;
|
|
|
- .status-dot {
|
|
|
- background-color: #c4c6c9;
|
|
|
- }
|
|
|
+ justify-content: center;
|
|
|
+ gap: 6px;
|
|
|
+ flex: 1;
|
|
|
+ &.gray {
|
|
|
+ color: #c4c6c9;
|
|
|
+ .status-dot {
|
|
|
+ background-color: #c4c6c9;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- &.blue {
|
|
|
- color: #2199f8;
|
|
|
- .status-dot {
|
|
|
- background-color: #2199f8;
|
|
|
- }
|
|
|
+ &.blue {
|
|
|
+ color: #2199f8;
|
|
|
+ .status-dot {
|
|
|
+ background-color: #2199f8;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- &.green {
|
|
|
- color: #1ca900;
|
|
|
- .status-dot {
|
|
|
- background-color: #1ca900;
|
|
|
- }
|
|
|
+ &.green {
|
|
|
+ color: #1ca900;
|
|
|
+ .status-dot {
|
|
|
+ background-color: #1ca900;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- &.orange {
|
|
|
- color: #ff953d;
|
|
|
- .status-dot {
|
|
|
- background-color: #ff953d;
|
|
|
- }
|
|
|
- }
|
|
|
+ &.orange {
|
|
|
+ color: #ff953d;
|
|
|
.status-dot {
|
|
|
- width: 6px;
|
|
|
- height: 6px;
|
|
|
- border-radius: 50%;
|
|
|
+ background-color: #ff953d;
|
|
|
}
|
|
|
}
|
|
|
+ .status-dot {
|
|
|
+ width: 6px;
|
|
|
+ height: 6px;
|
|
|
+ border-radius: 50%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .season-tabs {
|
|
|
+ display: flex;
|
|
|
+ gap: 8px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ .season-tab {
|
|
|
+ flex: 1;
|
|
|
+ padding: 7px;
|
|
|
+ text-align: center;
|
|
|
+ background: #F3F3F3;
|
|
|
+ color: #898A8A;
|
|
|
+ border-radius: 3px;
|
|
|
+ border: 1px solid transparent;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+ .season-tab.active {
|
|
|
+ background: #ffffff;
|
|
|
+ color: #2199f8;
|
|
|
+ border-color: #2199f8;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -376,37 +408,37 @@ const handleRowClick = (item) => {
|
|
|
border-bottom: 4px solid #dde1e7;
|
|
|
}
|
|
|
|
|
|
- &.warning{
|
|
|
- .cycle-task-box{
|
|
|
- border-color: #FF953D;
|
|
|
+ &.warning {
|
|
|
+ .cycle-task-box {
|
|
|
+ border-color: #ff953d;
|
|
|
}
|
|
|
.cycle-task-text {
|
|
|
- color: #FF953D;
|
|
|
+ color: #ff953d;
|
|
|
}
|
|
|
- .cycle-task-connector{
|
|
|
- border-bottom-color: #FF953D;
|
|
|
+ .cycle-task-connector {
|
|
|
+ border-bottom-color: #ff953d;
|
|
|
}
|
|
|
}
|
|
|
- &.complete{
|
|
|
- .cycle-task-box{
|
|
|
- border-color: #1CA900;
|
|
|
+ &.complete {
|
|
|
+ .cycle-task-box {
|
|
|
+ border-color: #1ca900;
|
|
|
}
|
|
|
.cycle-task-text {
|
|
|
- color: #1CA900;
|
|
|
+ color: #1ca900;
|
|
|
}
|
|
|
- .cycle-task-connector{
|
|
|
- border-bottom-color: #1CA900;
|
|
|
+ .cycle-task-connector {
|
|
|
+ border-bottom-color: #1ca900;
|
|
|
}
|
|
|
}
|
|
|
- &.normal{
|
|
|
- .cycle-task-box{
|
|
|
- border-color: #2199F8;
|
|
|
+ &.normal {
|
|
|
+ .cycle-task-box {
|
|
|
+ border-color: #2199f8;
|
|
|
}
|
|
|
.cycle-task-text {
|
|
|
- color: #2199F8;
|
|
|
+ color: #2199f8;
|
|
|
}
|
|
|
- .cycle-task-connector{
|
|
|
- border-bottom-color: #2199F8;
|
|
|
+ .cycle-task-connector {
|
|
|
+ border-bottom-color: #2199f8;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -430,7 +462,7 @@ const handleRowClick = (item) => {
|
|
|
color: #c7c7c7;
|
|
|
}
|
|
|
|
|
|
- &.active{
|
|
|
+ &.active {
|
|
|
.cycle-term-dot {
|
|
|
background: #858383;
|
|
|
}
|
|
|
@@ -494,15 +526,15 @@ const handleRowClick = (item) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .add-button-group{
|
|
|
+ .add-button-group {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
gap: 8px;
|
|
|
.button {
|
|
|
- color: #2199F8;
|
|
|
+ color: #2199f8;
|
|
|
border-radius: 25px;
|
|
|
padding: 9px 15px;
|
|
|
- border: 1px solid #2199F8;
|
|
|
+ border: 1px solid #2199f8;
|
|
|
}
|
|
|
.add-button {
|
|
|
background: linear-gradient(120deg, #76c3ff 0%, #2199f8 100%);
|