|
|
@@ -42,8 +42,8 @@
|
|
|
</div>
|
|
|
</div> -->
|
|
|
|
|
|
- <div class="farm-text" v-if="status === 0 && !isHall">
|
|
|
- <span class="text-title">农场现状:</span>水稻移栽后返青成活(新根萌发、心叶展开),进入分蘖始期
|
|
|
+ <div class="farm-text" v-if="status === 0 && !isHall && itemIndex === 0">
|
|
|
+ <span class="text-title">农场现状:</span>{{ farmStatusText }}
|
|
|
<!-- <span class="text-more">点击查看照片</span> -->
|
|
|
</div>
|
|
|
<div class="img-text-wrap">
|
|
|
@@ -199,6 +199,10 @@ const props = defineProps({
|
|
|
type: Boolean,
|
|
|
default: false,
|
|
|
},
|
|
|
+ itemIndex: {
|
|
|
+ type: Number,
|
|
|
+ default: 0,
|
|
|
+ },
|
|
|
});
|
|
|
|
|
|
const expiredDay = ref(0); // 过期天数
|
|
|
@@ -293,8 +297,19 @@ onMounted(async () => {
|
|
|
|
|
|
getTriggerImg();
|
|
|
}
|
|
|
+ if (props.itemIndex === 0 && props.itemData?.farmWorkArrangeId) {
|
|
|
+ getFarmWorkArrangeDetail(props.itemData.farmWorkArrangeId);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
+// 获取农场现状
|
|
|
+const farmStatusText = ref('');
|
|
|
+const getFarmWorkArrangeDetail = (id) => {
|
|
|
+ VE_API.farm.getFarmWorkArrangeDetail({ id }).then(({ data }) => {
|
|
|
+ farmStatusText.value = data.farmStatus;
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
// 将所有需要暴露的方法放在 defineExpose 中
|
|
|
defineExpose({
|
|
|
updateTriggerImg,
|