|
|
@@ -59,9 +59,9 @@
|
|
|
</el-icon>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="title-wrap van-ellipsis" v-show="shouldShowBlue(p)">
|
|
|
- <div class="title-text" v-if="fw.flowStatus != null">{{ fw.flowStatus ==
|
|
|
- 3 ? '待认证' : '已过期' }}</div>
|
|
|
+ <div class="title-wrap van-ellipsis">
|
|
|
+ <div class="title-text" v-if="fw.flowStatus != null && fw.flowStatus != 0">{{ flowStatusStr[fw.flowStatus] }}</div>
|
|
|
+ <div class="title-text blue-tag" v-if="fw.flowStatus != null && fw.flowStatus != 0">限时溯源</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="card-right"
|
|
|
@@ -566,7 +566,7 @@ const getArrangeStatusClass = (fw) => {
|
|
|
const t = props.pageType === 'agri_record' ? fw?.flowStatus : fw?.sourceType;
|
|
|
if (props.pageType === 'agri_record') {
|
|
|
if (t == null || t == 0) return "status-default";
|
|
|
- if (t == 3) return "status-complete";
|
|
|
+ if (t == 3) return "status-warning-bg";
|
|
|
return "status-act";
|
|
|
} else {
|
|
|
if (t == 10) return "status-complete";
|
|
|
@@ -826,14 +826,17 @@ const handleStatusDetail = (fw) => {
|
|
|
// 跳转前记录当前滚动位置
|
|
|
saveTimelineScrollTop();
|
|
|
if (props.pageType === 'agri_plan') {
|
|
|
- router.push({
|
|
|
- path: "/agricultural_detail",
|
|
|
- query: {
|
|
|
- farmId: props.farmId,
|
|
|
- regionId: props.regionId,
|
|
|
- date: fw?.createTime?.slice(0, 10)
|
|
|
- },
|
|
|
- });
|
|
|
+ if (fw?.sourceData && fw?.id) {
|
|
|
+ router.push({
|
|
|
+ path: "/agricultural_detail",
|
|
|
+ query: {
|
|
|
+ farmId: props.farmId,
|
|
|
+ regionId: props.regionId,
|
|
|
+ date: fw?.createTime?.slice(0, 10),
|
|
|
+ content: fw?.content
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
router.push({
|
|
|
path: "/work_detail",
|
|
|
@@ -925,8 +928,24 @@ const getPhenologyTermProgress = (phenologyProgress) => {
|
|
|
return matchedTermProgress;
|
|
|
};
|
|
|
|
|
|
+const flowStatusStr = {
|
|
|
+ '3': '待认证',
|
|
|
+ '-1': '已过期',
|
|
|
+ '2': '已认证',
|
|
|
+}
|
|
|
+
|
|
|
// 判断物候期是否应该显示蓝色(已过或当前节气的物候期)
|
|
|
const shouldShowBlue = (phenology) => {
|
|
|
+ // 农事记录页兼容:只要该物候期下存在待认证农事,左侧生育期/物候期均高亮为蓝色
|
|
|
+ if (props.pageType === "agri_record") {
|
|
|
+ const hasPendingAuth = (Array.isArray(phenology?.reproductiveList) ? phenology.reproductiveList : []).some((reproductive) =>
|
|
|
+ (Array.isArray(reproductive?.farmWorkArrangeList) ? reproductive.farmWorkArrangeList : []).some((fw) => Number(fw?.flowStatus) === 3)
|
|
|
+ );
|
|
|
+ if (hasPendingAuth) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 优先使用物候期真实日期判断:未来日期不应显示蓝色
|
|
|
const phenologyTimeMs =
|
|
|
Number(phenology?.startTimeMs) ||
|
|
|
@@ -1243,6 +1262,11 @@ watch(
|
|
|
font-size: 12px;
|
|
|
color: #B7B7B7;
|
|
|
}
|
|
|
+
|
|
|
+ .blue-tag{
|
|
|
+ color: #2199F8;
|
|
|
+ background: rgba(33, 153, 248, 0.1);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1347,6 +1371,28 @@ watch(
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .arrange-card.status-warning-bg {
|
|
|
+ border-color: #FF943D;
|
|
|
+
|
|
|
+ .card-left {
|
|
|
+ .left-info {
|
|
|
+ .left-date {
|
|
|
+ color: #FF943D;
|
|
|
+ border-color: #FF943D;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .title-text {
|
|
|
+ color: #fff;
|
|
|
+ background: #FF943D;;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ border-right-color: #FF943D;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.arrange-card.status-act {
|
|
|
border-color: #FF953D;
|
|
|
|