|
@@ -35,7 +35,7 @@
|
|
|
<tab title="作物档案" class="tab-item">
|
|
<tab title="作物档案" class="tab-item">
|
|
|
<common-box title="作物档案">
|
|
<common-box title="作物档案">
|
|
|
<template #right>
|
|
<template #right>
|
|
|
- <span @click="handleDetail('farm_list')">查看详情</span>
|
|
|
|
|
|
|
+ <span @click="handleDetail('crop_record')">查看详情</span>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="farmWorkData.length">
|
|
<template v-if="farmWorkData.length">
|
|
|
<div class="farm-work-timeline">
|
|
<div class="farm-work-timeline">
|
|
@@ -50,11 +50,13 @@
|
|
|
<div class="timeline-line"></div>
|
|
<div class="timeline-line"></div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="timeline-right">
|
|
<div class="timeline-right">
|
|
|
- <div class="farm-work-card">
|
|
|
|
|
|
|
+ <div class="farm-work-card" :class="['card-' + item.recordType, { 'is-future': item.isFuture }]">
|
|
|
|
|
+ <div class="type-box">{{ getRecordTypeText(item.recordType) }}</div>
|
|
|
<div class="farm-work-date">{{ item.time }}</div>
|
|
<div class="farm-work-date">{{ item.time }}</div>
|
|
|
<div class="farm-work-desc">
|
|
<div class="farm-work-desc">
|
|
|
<span class="farm-work-action">{{ item.action }}</span>
|
|
<span class="farm-work-action">{{ item.action }}</span>
|
|
|
<span class="farm-work-content">{{ item.content }}</span>
|
|
<span class="farm-work-content">{{ item.content }}</span>
|
|
|
|
|
+ <span>{{ item.text }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -207,6 +209,15 @@ const getFarmDetail = () => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const farmWorkData = ref([]);
|
|
const farmWorkData = ref([]);
|
|
|
|
|
+const typeObj = {
|
|
|
|
|
+ 1: '物候进程',
|
|
|
|
|
+ 2: '农事',
|
|
|
|
|
+ 3: '异常',
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const getRecordTypeText = (recordType) => {
|
|
|
|
|
+ return typeObj[recordType];
|
|
|
|
|
+}
|
|
|
const getFarmWorkList = () => {
|
|
const getFarmWorkList = () => {
|
|
|
// VE_API.user.getFarmWorkList(paramsPage.value).then(({ data }) => {
|
|
// VE_API.user.getFarmWorkList(paramsPage.value).then(({ data }) => {
|
|
|
// if (data && data.length > 0) {
|
|
// if (data && data.length > 0) {
|
|
@@ -218,16 +229,27 @@ const getFarmWorkList = () => {
|
|
|
time: "8/8",
|
|
time: "8/8",
|
|
|
action: "进入",
|
|
action: "进入",
|
|
|
content: "花芽分化期",
|
|
content: "花芽分化期",
|
|
|
|
|
+ recordType: 1,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
time: "8/1",
|
|
time: "8/1",
|
|
|
action: "做了",
|
|
action: "做了",
|
|
|
- content: "杀虫 农事",
|
|
|
|
|
|
|
+ content: "杀虫",
|
|
|
|
|
+ text: "农事",
|
|
|
|
|
+ recordType: 2,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ time: "7/30",
|
|
|
|
|
+ action: "出现",
|
|
|
|
|
+ content: "蒂蛀虫",
|
|
|
|
|
+ recordType: 3,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
time: "7/25",
|
|
time: "7/25",
|
|
|
action: "预计进入",
|
|
action: "预计进入",
|
|
|
content: "果实膨大期",
|
|
content: "果实膨大期",
|
|
|
|
|
+ isFuture: true,
|
|
|
|
|
+ recordType: 1,
|
|
|
},
|
|
},
|
|
|
];
|
|
];
|
|
|
};
|
|
};
|
|
@@ -587,6 +609,52 @@ const onSelect = () => {
|
|
|
line-height: 22px;
|
|
line-height: 22px;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
+ &.card-1 {
|
|
|
|
|
+ border: 1px solid #8BCCFF;
|
|
|
|
|
+ .type-box {
|
|
|
|
|
+ background: #2199F8;
|
|
|
|
|
+ }
|
|
|
|
|
+ .farm-work-content {
|
|
|
|
|
+ color: #2199F8;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ &.card-2 {
|
|
|
|
|
+ border: 1px solid #FFBB83;
|
|
|
|
|
+ .type-box {
|
|
|
|
|
+ background: #FF953D;
|
|
|
|
|
+ }
|
|
|
|
|
+ .farm-work-content {
|
|
|
|
|
+ color: #FF953D;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ &.card-3 {
|
|
|
|
|
+ border: 1px solid #FF9C9C;
|
|
|
|
|
+ .type-box {
|
|
|
|
|
+ background: #FD7676;
|
|
|
|
|
+ }
|
|
|
|
|
+ .farm-work-content {
|
|
|
|
|
+ color: #FD7676;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ &.is-future {
|
|
|
|
|
+ // opacity: 0.5;
|
|
|
|
|
+ background: rgba(246, 250, 255, 0.5);
|
|
|
|
|
+ .type-box {
|
|
|
|
|
+ background: rgba(33, 153, 248, 0.5);
|
|
|
|
|
+ }
|
|
|
|
|
+ .farm-work-content {
|
|
|
|
|
+ color: rgba(29, 33, 41, 0.5);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .type-box {
|
|
|
|
|
+ margin-right: 12px;
|
|
|
|
|
+ padding: 0 5px;
|
|
|
|
|
+ height: 20px;
|
|
|
|
|
+ line-height: 20px;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ border-radius: 0 4px 0 4px;
|
|
|
|
|
+ }
|
|
|
.farm-work-date {
|
|
.farm-work-date {
|
|
|
padding-right: 4px;
|
|
padding-right: 4px;
|
|
|
}
|
|
}
|
|
@@ -594,6 +662,9 @@ const onSelect = () => {
|
|
|
.farm-work-action {
|
|
.farm-work-action {
|
|
|
padding-right: 4px;
|
|
padding-right: 4px;
|
|
|
}
|
|
}
|
|
|
|
|
+ .farm-work-content {
|
|
|
|
|
+ padding-right: 4px;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|