|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="work-detail">
|
|
<div class="work-detail">
|
|
|
- <custom-header :name="$t('农事详情')" v-if="!miniJson?.hideDraw" :showClose="false" isGoBack @goback="handleBack" />
|
|
|
|
|
|
|
+ <custom-header :name="$t('workDetail.title')" v-if="!miniJson?.hideDraw" :showClose="false" isGoBack @goback="handleBack" />
|
|
|
|
|
|
|
|
<div class="work-detail-content">
|
|
<div class="work-detail-content">
|
|
|
<!-- 顶部状态 -->
|
|
<!-- 顶部状态 -->
|
|
@@ -17,7 +17,7 @@
|
|
|
预计{{ detail?.executeDate || "--" }}执行,执行时间需巡园校准
|
|
预计{{ detail?.executeDate || "--" }}执行,执行时间需巡园校准
|
|
|
</div> -->
|
|
</div> -->
|
|
|
<div class="status-sub">
|
|
<div class="status-sub">
|
|
|
- 已认证成功
|
|
|
|
|
|
|
+ {{ $t('workDetail.certifiedSuccess') }}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -39,7 +39,7 @@
|
|
|
|
|
|
|
|
<div class="stage-info">
|
|
<div class="stage-info">
|
|
|
<div class="form-item">
|
|
<div class="form-item">
|
|
|
- <div class="item-name">{{ $t('农事目的') }}</div>
|
|
|
|
|
|
|
+ <div class="item-name">{{ $t('workDetail.purpose') }}</div>
|
|
|
<div class="item-text">
|
|
<div class="item-text">
|
|
|
{{ prescription.purpose || prescription.purposeName || "--" }}
|
|
{{ prescription.purpose || prescription.purposeName || "--" }}
|
|
|
</div>
|
|
</div>
|
|
@@ -59,7 +59,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-item">
|
|
<div class="form-item">
|
|
|
- <div class="item-name">{{ $t('注意事项') }}</div>
|
|
|
|
|
|
|
+ <div class="item-name">{{ $t('workDetail.notes') }}</div>
|
|
|
<div class="item-text">
|
|
<div class="item-text">
|
|
|
{{ detail.remark || "--" }}
|
|
{{ detail.remark || "--" }}
|
|
|
</div>
|
|
</div>
|
|
@@ -138,15 +138,15 @@
|
|
|
<div class="box-wrap stage-card">
|
|
<div class="box-wrap stage-card">
|
|
|
<div class="work-info">
|
|
<div class="work-info">
|
|
|
<div class="map-box">
|
|
<div class="map-box">
|
|
|
- <div class="map-title">{{ $t('执行区域') }}</div>
|
|
|
|
|
|
|
+ <div class="map-title">{{ $t('workDetail.executionArea') }}</div>
|
|
|
<div class="map-container" ref="mapContainer"></div>
|
|
<div class="map-container" ref="mapContainer"></div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="area-list">
|
|
<div class="area-list">
|
|
|
<div class="area-item">
|
|
<div class="area-item">
|
|
|
<div class="area-l">
|
|
<div class="area-l">
|
|
|
- 权属田块1:{{ farmData.work_time }}
|
|
|
|
|
|
|
+ {{ $t('workDetail.ownedPlot') }}{{ farmData.work_time }}
|
|
|
<span class="area-tag"
|
|
<span class="area-tag"
|
|
|
- style="background: rgba(55, 193, 27, 0.1); color: #37C11B;">{{ $t('已认证') }}</span>
|
|
|
|
|
|
|
+ style="background: rgba(55, 193, 27, 0.1); color: #37C11B;">{{ $t('workDetail.verified') }}</span>
|
|
|
<!-- <span class="area-tag">{{ $t('未激活') }}</span> -->
|
|
<!-- <span class="area-tag">{{ $t('未激活') }}</span> -->
|
|
|
</div>
|
|
</div>
|
|
|
<!-- <div class="area-r">{{ $t('我已完成') }}</div> -->
|
|
<!-- <div class="area-r">{{ $t('我已完成') }}</div> -->
|
|
@@ -172,19 +172,19 @@
|
|
|
<div class="box-wrap stage-card">
|
|
<div class="box-wrap stage-card">
|
|
|
<div class="work-info">
|
|
<div class="work-info">
|
|
|
<div class="info-item">
|
|
<div class="info-item">
|
|
|
- <div class="info-title"><span class="title-block"></span>{{ $t('农事目的') }}</div>
|
|
|
|
|
|
|
+ <div class="info-title"><span class="title-block"></span>{{ $t('workDetail.purpose') }}</div>
|
|
|
<div class="info-value">{{ farmData.work_purpose }}</div>
|
|
<div class="info-value">{{ farmData.work_purpose }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="info-item">
|
|
<div class="info-item">
|
|
|
- <div class="info-title"><span class="title-block"></span>{{ $t('注意事项') }}</div>
|
|
|
|
|
|
|
+ <div class="info-title"><span class="title-block"></span>{{ $t('workDetail.notes') }}</div>
|
|
|
<div class="info-value">{{ farmData.precautions }}</div>
|
|
<div class="info-value">{{ farmData.precautions }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="info-item">
|
|
<div class="info-item">
|
|
|
- <div class="info-title"><span class="title-block"></span>{{ $t('药物处方') }}</div>
|
|
|
|
|
|
|
+ <div class="info-title"><span class="title-block"></span>{{ $t('workDetail.prescription') }}</div>
|
|
|
<div class="info-value">{{ farmData.drug_prescription }}</div>
|
|
<div class="info-value">{{ farmData.drug_prescription }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="info-item">
|
|
<div class="info-item">
|
|
|
- <div class="info-title"><span class="title-block"></span>{{ $t('执行方式') }}</div>
|
|
|
|
|
|
|
+ <div class="info-title"><span class="title-block"></span>{{ $t('workDetail.executionMethod') }}</div>
|
|
|
<div class="info-value">{{ farmData.execution_method }}</div>
|
|
<div class="info-value">{{ farmData.execution_method }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -228,7 +228,8 @@
|
|
|
import { ElMessage } from "element-plus";
|
|
import { ElMessage } from "element-plus";
|
|
|
import wx from "weixin-js-sdk";
|
|
import wx from "weixin-js-sdk";
|
|
|
import customHeader from "@/components/customHeader.vue";
|
|
import customHeader from "@/components/customHeader.vue";
|
|
|
-import { ref, computed, onMounted, onActivated, nextTick } from "vue";
|
|
|
|
|
|
|
+import { ref, computed, watch, onMounted, onActivated, nextTick } from "vue";
|
|
|
|
|
+import { useI18n } from "@/i18n";
|
|
|
import { useRouter } from "vue-router";
|
|
import { useRouter } from "vue-router";
|
|
|
import { formatDate } from "@/common/commonFun";
|
|
import { formatDate } from "@/common/commonFun";
|
|
|
import ExecutePopup from "./components/executePopup.vue";
|
|
import ExecutePopup from "./components/executePopup.vue";
|
|
@@ -248,6 +249,7 @@ import imgJf1 from "@/assets/img/common/jf-1.png";
|
|
|
import imgJf2 from "@/assets/img/common/jf-2.png";
|
|
import imgJf2 from "@/assets/img/common/jf-2.png";
|
|
|
|
|
|
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
|
|
+const { locale } = useI18n();
|
|
|
const showUploadTipsPopup = ref(false);
|
|
const showUploadTipsPopup = ref(false);
|
|
|
const headerTitle = ref('');
|
|
const headerTitle = ref('');
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
@@ -357,6 +359,7 @@ onActivated(() => {
|
|
|
|
|
|
|
|
const farmData = ref({})
|
|
const farmData = ref({})
|
|
|
const getDetail = () => {
|
|
const getDetail = () => {
|
|
|
|
|
+ if (!route.query.id) return;
|
|
|
VE_API.monitor.getWorkDetail({ id: route.query.id }).then(res => {
|
|
VE_API.monitor.getWorkDetail({ id: route.query.id }).then(res => {
|
|
|
if (res.code === 200 && res.data.length) {
|
|
if (res.code === 200 && res.data.length) {
|
|
|
farmData.value = res.data[0]
|
|
farmData.value = res.data[0]
|
|
@@ -385,6 +388,9 @@ const getDetail = () => {
|
|
|
// });
|
|
// });
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+watch(locale, () => {
|
|
|
|
|
+ getDetail();
|
|
|
|
|
+});
|
|
|
|
|
|
|
|
// 计算距离执行时间的天数差
|
|
// 计算距离执行时间的天数差
|
|
|
const daysDiff = computed(() => {
|
|
const daysDiff = computed(() => {
|