|
|
@@ -17,7 +17,7 @@
|
|
|
<div class="abnormal-top">
|
|
|
<div class="abnormal-hero__tags">
|
|
|
<span class="abnormal-hero__tag abnormal-hero__tag--level">
|
|
|
- <el-icon><BellFilled /></el-icon>
|
|
|
+ <el-icon><WarningFilled /></el-icon>
|
|
|
{{ level }}
|
|
|
</span>
|
|
|
<span class="abnormal-hero__tag abnormal-hero__tag--zone">{{ zoneName }}</span>
|
|
|
@@ -37,15 +37,8 @@
|
|
|
</div>
|
|
|
<div class="analysis-card__desc">{{ assessmentDesc }}</div>
|
|
|
<div class="analysis-card__stats">
|
|
|
- <div
|
|
|
- v-for="(item, index) in analysisStats"
|
|
|
- :key="index"
|
|
|
- class="analysis-card__stat"
|
|
|
- >
|
|
|
- <div
|
|
|
- class="analysis-card__stat-value"
|
|
|
- :class="{ highlight: item.highlight }"
|
|
|
- >
|
|
|
+ <div v-for="(item, index) in analysisStats" :key="index" class="analysis-card__stat">
|
|
|
+ <div class="analysis-card__stat-value" :class="{ highlight: item.highlight }">
|
|
|
<template v-if="item.unit">
|
|
|
<span class="num">{{ item.value }}</span>
|
|
|
<span class="unit">{{ item.unit }}</span>
|
|
|
@@ -60,82 +53,71 @@
|
|
|
|
|
|
<!-- 异常排查互动 -->
|
|
|
<div class="interact-section-head">
|
|
|
- <span class="interact-section-head__text">
|
|
|
- 异常排查互动 · 共 {{ interactList.length }} 项
|
|
|
- </span>
|
|
|
+ <span class="interact-section-head__text"> 异常排查互动 · 共 {{ interactList.length }} 项 </span>
|
|
|
<span class="interact-section-head__line"></span>
|
|
|
</div>
|
|
|
|
|
|
- <div
|
|
|
- v-for="(item, index) in interactList"
|
|
|
- :key="item.fw_code || index"
|
|
|
- class="abnormal-item"
|
|
|
- >
|
|
|
- <div class="abnormal-item__title">
|
|
|
- <img
|
|
|
- class="abnormal-item__icon"
|
|
|
- src="@/assets/img/agricultural/gaojin.png"
|
|
|
- alt=""
|
|
|
- />
|
|
|
- <span>{{ item.abnormal_type || t("agriFile.rootAbnormal") }}</span>
|
|
|
- </div>
|
|
|
+ <div v-for="(item, index) in interactList" :key="item.fw_code || index" class="abnormal-item">
|
|
|
+ <div class="abnormal-item__wrap">
|
|
|
+ <div class="abnormal-item__title">
|
|
|
+ <img class="abnormal-item__icon" src="@/assets/img/agricultural/gaojin.png" alt="" />
|
|
|
+ <span>{{ item.abnormal_type || t("agriFile.rootAbnormal") }}</span>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="box-wrap stage-card interact-card">
|
|
|
- <div class="work-info">
|
|
|
- <div class="interact-card__head">
|
|
|
- <div class="section-title">
|
|
|
- <span class="title-bar"></span>
|
|
|
- {{ t("agriFile.interactQuestion") }}
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="interact-card__submit"
|
|
|
- :class="{ disabled: selectedMap[item.fw_code || index] == null }"
|
|
|
- @click="handleSubmit(item, index)"
|
|
|
- >
|
|
|
- 确认提交
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="interact-card__qa">
|
|
|
- <div class="interact-card__question">{{ item.interact_problem }}</div>
|
|
|
- <div class="interact-card__options">
|
|
|
+ <div class="stage-card interact-card">
|
|
|
+ <div class="work-info">
|
|
|
+ <div class="interact-card__head">
|
|
|
+ <div class="section-title interact-card__title">
|
|
|
+ <span class="title-bar"></span>
|
|
|
+ {{ t("agriFile.interactQuestion") }}
|
|
|
+ </div>
|
|
|
<div
|
|
|
- v-for="(opt, optIndex) in item.options"
|
|
|
- :key="`${item.fw_code || index}-${optIndex}`"
|
|
|
- class="interact-option"
|
|
|
- :class="{
|
|
|
- selected: selectedMap[item.fw_code || index] === optIndex,
|
|
|
- }"
|
|
|
- @click="selectedMap[item.fw_code || index] = optIndex"
|
|
|
+ class="interact-card__submit"
|
|
|
+ :class="{ disabled: selectedMap[item.fw_code || index] == null }"
|
|
|
+ @click="handleSubmit(item, index)"
|
|
|
>
|
|
|
- <span class="interact-option__text">{{ opt }}</span>
|
|
|
+ 确认提交
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="interact-card__qa">
|
|
|
+ <div class="interact-card__question">{{ item.interact_problem }}</div>
|
|
|
+ <div class="interact-card__options">
|
|
|
+ <div
|
|
|
+ v-for="(opt, optIndex) in item.options"
|
|
|
+ :key="`${item.fw_code || index}-${optIndex}`"
|
|
|
+ class="interact-option"
|
|
|
+ :class="{
|
|
|
+ selected: selectedMap[item.fw_code || index] === optIndex,
|
|
|
+ }"
|
|
|
+ @click="selectedMap[item.fw_code || index] = optIndex"
|
|
|
+ >
|
|
|
+ <span class="interact-option__text">{{ opt }}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 巡园向导 -->
|
|
|
- <div class="box-wrap stage-card guide-card">
|
|
|
- <div class="work-info">
|
|
|
- <div class="section-title">
|
|
|
- <img class="guide-icon" src="@/assets/img/farm/guide.png" alt="" />
|
|
|
- {{ t("agriFile.patrolGuide") }}
|
|
|
- </div>
|
|
|
- <photo-provider :photo-closable="true">
|
|
|
- <photo-consumer :src="guideImage">
|
|
|
- <img class="guide-card__img" :src="guideImage" alt="" />
|
|
|
- </photo-consumer>
|
|
|
- </photo-provider>
|
|
|
- </div>
|
|
|
+ <!-- 巡园向导 -->
|
|
|
+ <div class="guide-card">
|
|
|
+ <div class="work-info">
|
|
|
+ <div class="section-title">
|
|
|
+ <img class="guide-icon" src="@/assets/img/farm/guide.png" alt="" />
|
|
|
+ {{ t("agriFile.patrolGuide") }}
|
|
|
+ </div>
|
|
|
+ <div class="guide-card__img-box">
|
|
|
+ <photo-provider :photo-closable="true">
|
|
|
+ <photo-consumer :src="resolveGuideImage(item.pic_url)">
|
|
|
+ <img :src="resolveGuideImage(item.pic_url)" alt="" />
|
|
|
+ </photo-consumer>
|
|
|
+ </photo-provider>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="guide-card__upload-wrap">
|
|
|
- <div class="guide-card__upload" @click="handleUploadClick">
|
|
|
- <img
|
|
|
- class="guide-card__upload-icon"
|
|
|
- src="@/assets/img/common/camera.png"
|
|
|
- alt=""
|
|
|
- />
|
|
|
+ <div class="guide-card__upload-wrap">
|
|
|
+ <div class="guide-card__upload" @click="handleUploadClick">
|
|
|
+ <img class="guide-card__upload-icon" src="@/assets/img/common/camera.png" alt="" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -207,17 +189,11 @@ const zoneId = computed(() => route.query.zoneId || route.query.id);
|
|
|
|
|
|
const firstInteract = computed(() => interactList.value[0] || null);
|
|
|
/** interaction_theme */
|
|
|
-const theme = computed(
|
|
|
- () => firstInteract.value?.interaction_title || t("agriFile.interactTheme")
|
|
|
-);
|
|
|
+const theme = computed(() => firstInteract.value?.interaction_title || t("agriFile.interactTheme"));
|
|
|
/** interaction_title */
|
|
|
-const reason = computed(
|
|
|
- () => firstInteract.value?.interaction_theme || t("agriFile.interactReason")
|
|
|
-);
|
|
|
+const reason = computed(() => firstInteract.value?.interaction_theme || t("agriFile.interactReason"));
|
|
|
/** 农情研判说明 */
|
|
|
-const assessmentDesc = computed(
|
|
|
- () => firstInteract.value?.interaction_reason || t("agriFile.agriAssessmentDesc")
|
|
|
-);
|
|
|
+const assessmentDesc = computed(() => firstInteract.value?.interaction_reason || t("agriFile.agriAssessmentDesc"));
|
|
|
const guideImage = computed(() => resolveGuideImage(firstInteract.value?.pic_url));
|
|
|
/** stress_info.level */
|
|
|
const level = computed(() => {
|
|
|
@@ -303,6 +279,13 @@ function mapInteractItem(raw) {
|
|
|
};
|
|
|
}
|
|
|
|
|
|
+const formatLocalDate = (date) => {
|
|
|
+ const y = date.getFullYear();
|
|
|
+ const m = String(date.getMonth() + 1).padStart(2, "0");
|
|
|
+ const d = String(date.getDate()).padStart(2, "0");
|
|
|
+ return `${y}-${m}-${d}`;
|
|
|
+};
|
|
|
+
|
|
|
// ---------- 业务逻辑 ----------
|
|
|
const fetchAbnormalInteract = async () => {
|
|
|
const farm = getSelectedFarm();
|
|
|
@@ -314,9 +297,11 @@ const fetchAbnormalInteract = async () => {
|
|
|
stressInfo.value = {};
|
|
|
return;
|
|
|
}
|
|
|
- // 与 patrolPanel 调试参数保持一致;正式环境改回 farmId / zId / 当天日期
|
|
|
const params = {
|
|
|
crop_type: cropType,
|
|
|
+ // farm_id: farmId,
|
|
|
+ // zone_id: zId,
|
|
|
+ // calc_date: formatLocalDate(new Date()),
|
|
|
farm_id: 321,
|
|
|
zone_id: 46,
|
|
|
calc_date: "2025-08-30",
|
|
|
@@ -494,18 +479,17 @@ onActivated(() => {
|
|
|
flex: 1;
|
|
|
overflow-y: auto;
|
|
|
-webkit-overflow-scrolling: touch;
|
|
|
- padding-bottom: 100px;
|
|
|
+ padding-bottom: 10px;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.abnormal-hero {
|
|
|
position: relative;
|
|
|
- padding: 86px 70px 10px 12px;
|
|
|
+ padding: 86px 70px 0px 12px;
|
|
|
box-sizing: border-box;
|
|
|
z-index: 2;
|
|
|
- min-height: 250px;
|
|
|
- background:
|
|
|
- linear-gradient(
|
|
|
+ min-height: 240px;
|
|
|
+ background: linear-gradient(
|
|
|
180deg,
|
|
|
rgba(11, 11, 11, 0) 8.51%,
|
|
|
rgba(11, 11, 11, 0.416) 42.95%,
|
|
|
@@ -532,6 +516,7 @@ onActivated(() => {
|
|
|
.abnormal-top {
|
|
|
position: relative;
|
|
|
z-index: 2;
|
|
|
+ padding-bottom: 40px;
|
|
|
}
|
|
|
|
|
|
&__share {
|
|
|
@@ -564,24 +549,24 @@ onActivated(() => {
|
|
|
display: inline-flex;
|
|
|
align-items: center;
|
|
|
gap: 3px;
|
|
|
- height: 22px;
|
|
|
- padding: 0 8px;
|
|
|
- border-radius: 4px;
|
|
|
+ height: 20px;
|
|
|
+ padding: 0 7px;
|
|
|
+ border-radius: 24px;
|
|
|
font-size: 12px;
|
|
|
- line-height: 22px;
|
|
|
+ line-height: 20px;
|
|
|
box-sizing: border-box;
|
|
|
+ border: 1px solid rgba(138, 106, 46, 1);
|
|
|
}
|
|
|
|
|
|
&__tag--level {
|
|
|
- color: #fff;
|
|
|
- background: #822422;
|
|
|
- border: 1px solid rgba(208, 49, 46, 0.4);
|
|
|
+ background: linear-gradient(90deg, #7e2321 0%, #350302 100%);
|
|
|
+ color: #ff7d7b;
|
|
|
+ border-color: rgba(201, 53, 50, 0.41);
|
|
|
}
|
|
|
|
|
|
&__tag--zone {
|
|
|
- color: rgba(255, 255, 255, 0.85);
|
|
|
- background: rgba(0, 0, 0, 0.4);
|
|
|
- border: 1px solid rgba(255, 255, 255, 0.12);
|
|
|
+ color: #e8c27a;
|
|
|
+ background: #2a2418;
|
|
|
}
|
|
|
|
|
|
&__title {
|
|
|
@@ -638,6 +623,9 @@ onActivated(() => {
|
|
|
font-weight: 500;
|
|
|
color: #f2e9d8;
|
|
|
margin-bottom: 10px;
|
|
|
+ &.interact-card__title {
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
|
|
|
.title-bar {
|
|
|
width: 4px;
|
|
|
@@ -720,9 +708,9 @@ onActivated(() => {
|
|
|
|
|
|
&__text {
|
|
|
flex-shrink: 0;
|
|
|
- font-size: 13px;
|
|
|
+ font-size: 12px;
|
|
|
line-height: 18px;
|
|
|
- color: rgba(255, 255, 255, 0.45);
|
|
|
+ color: #727272;
|
|
|
}
|
|
|
|
|
|
&__line {
|
|
|
@@ -733,6 +721,18 @@ onActivated(() => {
|
|
|
}
|
|
|
|
|
|
.abnormal-item {
|
|
|
+ padding: 1px;
|
|
|
+ border-radius: 12px;
|
|
|
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 25%),
|
|
|
+ linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 25%);
|
|
|
+
|
|
|
+
|
|
|
+ &__wrap {
|
|
|
+ padding: 11px 13px;
|
|
|
+ border-radius: 12px;
|
|
|
+ background: linear-gradient(180deg, #1A191D 0%, #121216 100%);
|
|
|
+ }
|
|
|
+
|
|
|
& + .abnormal-item {
|
|
|
margin-top: 16px;
|
|
|
}
|
|
|
@@ -740,27 +740,32 @@ onActivated(() => {
|
|
|
&__title {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- gap: 8px;
|
|
|
- margin-bottom: 10px;
|
|
|
- font-size: 18px;
|
|
|
- font-weight: 600;
|
|
|
- color: #ffd489;
|
|
|
+ gap: 10px;
|
|
|
+ margin-bottom: 12px;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #FFD489;
|
|
|
}
|
|
|
|
|
|
&__icon {
|
|
|
- width: 20px;
|
|
|
- height: 20px;
|
|
|
+ width: 18px;
|
|
|
+ height: 23px;
|
|
|
object-fit: contain;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.interact-card {
|
|
|
+ padding: 10px 12px;
|
|
|
+ border-radius: 12px;
|
|
|
+ border: 1px solid rgba(255, 241, 217, 0.2);
|
|
|
+ background: linear-gradient(180deg, #1A191D 0%, #121216 100%);
|
|
|
+
|
|
|
&__head {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
gap: 8px;
|
|
|
- margin-bottom: 4px;
|
|
|
+ margin-bottom: 12px;
|
|
|
|
|
|
.section-title {
|
|
|
margin-bottom: 0;
|
|
|
@@ -769,13 +774,14 @@ onActivated(() => {
|
|
|
|
|
|
&__submit {
|
|
|
flex-shrink: 0;
|
|
|
- height: 28px;
|
|
|
- padding: 0 12px;
|
|
|
- border-radius: 14px;
|
|
|
- border: 1px solid rgba(255, 212, 137, 0.45);
|
|
|
- color: #ffd489;
|
|
|
+ height: 27px;
|
|
|
+ padding: 0 15px;
|
|
|
+ border-radius: 24px;
|
|
|
+ background: rgba(255, 212, 137, 0.1);
|
|
|
+ border: 1px solid rgba(255, 212, 137, 0.4);
|
|
|
+ color: #FFD489;
|
|
|
font-size: 12px;
|
|
|
- line-height: 26px;
|
|
|
+ line-height: 27px;
|
|
|
text-align: center;
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
@@ -785,29 +791,29 @@ onActivated(() => {
|
|
|
}
|
|
|
|
|
|
&__question {
|
|
|
- font-size: 15px;
|
|
|
- font-weight: 600;
|
|
|
- line-height: 22px;
|
|
|
- color: #ffd489;
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: "PangMenZhengDao";
|
|
|
+ line-height: 20px;
|
|
|
+ color: #FFD489;
|
|
|
margin-bottom: 12px;
|
|
|
}
|
|
|
|
|
|
&__options {
|
|
|
display: flex;
|
|
|
- gap: 8px;
|
|
|
+ gap: 12px;
|
|
|
}
|
|
|
|
|
|
.interact-option {
|
|
|
position: relative;
|
|
|
flex: 1;
|
|
|
min-width: 0;
|
|
|
- min-height: 44px;
|
|
|
+ min-height: 41px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
- border-radius: 10px;
|
|
|
+ border-radius: 8px;
|
|
|
background: rgba(255, 255, 255, 0.05);
|
|
|
- border: 1px solid rgba(255, 255, 255, 0.08);
|
|
|
+ border: 1px solid rgba(255, 255, 255, 0.12);
|
|
|
box-sizing: border-box;
|
|
|
cursor: pointer;
|
|
|
|
|
|
@@ -822,11 +828,11 @@ onActivated(() => {
|
|
|
}
|
|
|
|
|
|
&.selected {
|
|
|
- border-color: rgba(255, 212, 137, 0.55);
|
|
|
- background: rgba(255, 212, 137, 0.1);
|
|
|
+ border-color: rgba(255, 255, 255, 0.5);
|
|
|
+ background: rgba(255, 255, 255, 0.1);
|
|
|
|
|
|
.interact-option__text {
|
|
|
- color: #ffd489;
|
|
|
+ color: #fff;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -835,12 +841,21 @@ onActivated(() => {
|
|
|
.guide-card {
|
|
|
position: relative;
|
|
|
margin-top: 12px;
|
|
|
+ background: rgba(75, 74, 70, 0.2);
|
|
|
+ border-radius: 10px;
|
|
|
+ padding: 10px;
|
|
|
|
|
|
&__img {
|
|
|
display: block;
|
|
|
width: 100%;
|
|
|
border-radius: 8px;
|
|
|
}
|
|
|
+ .guide-card__img-box {
|
|
|
+ img {
|
|
|
+ display: block;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
.section-title {
|
|
|
gap: 6px;
|