|
|
@@ -59,12 +59,12 @@
|
|
|
|
|
|
<div class="card-actions">
|
|
|
<div class="action-btn" @click="handleViewPrescription">
|
|
|
- <el-icon class="action-btn-icon" :class="{ 'rotate': showPrescription }" :size="16"><DArrowRight /></el-icon>
|
|
|
药物处方
|
|
|
+ <el-icon class="action-btn-icon" :class="{ 'rotate': showPrescription }" :size="16"><DArrowRight /></el-icon>
|
|
|
</div>
|
|
|
<div class="action-btn" @click="handleViewArea">
|
|
|
- <el-icon class="action-btn-icon" :class="{ 'rotate': showMapArea }" :size="16"><DArrowRight /></el-icon>
|
|
|
执行区域
|
|
|
+ <el-icon class="action-btn-icon" :class="{ 'rotate': showMapArea }" :size="16"><DArrowRight /></el-icon>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -259,7 +259,7 @@
|
|
|
import { useRouter, useRoute } from "vue-router";
|
|
|
import { showSuccessToast } from 'vant';
|
|
|
import { ElMessage } from "element-plus";
|
|
|
-import { ref, onActivated } from "vue";
|
|
|
+import { ref, onActivated, onDeactivated } from "vue";
|
|
|
import customHeader from "@/components/customHeader.vue";
|
|
|
import { Warning } from "@element-plus/icons-vue";
|
|
|
import upload from "@/components/upload";
|
|
|
@@ -341,7 +341,7 @@ const showMapArea = ref(false);
|
|
|
|
|
|
const detailData = ref({});
|
|
|
|
|
|
-const farmId = ref(94500);
|
|
|
+const farmId = ref();
|
|
|
|
|
|
const handleViewArea = () => {
|
|
|
// 收起药物处方
|
|
|
@@ -371,17 +371,29 @@ const handleShowQrCodePopup = (type) => {
|
|
|
|
|
|
const isLocked = ref(false);
|
|
|
|
|
|
+const miniJson = ref(null);
|
|
|
+
|
|
|
onActivated(() => {
|
|
|
- const id = route.query.miniJson ? JSON.parse(route.query.miniJson).id : null;
|
|
|
- if (id) {
|
|
|
- getDetail(id);
|
|
|
+ miniJson.value = route.query.miniJson ? JSON.parse(route.query.miniJson) : null;
|
|
|
+ farmId.value = miniJson.value?.farmId;
|
|
|
+ if (miniJson.value?.farmWorkLibId) {
|
|
|
+ getDetail(miniJson.value.farmWorkLibId);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
-const getDetail = async (id) => {
|
|
|
- const { data } = await VE_API.z_farm_work_record.getDetailById({ id });
|
|
|
+onDeactivated(() => {
|
|
|
+
|
|
|
+ // 收起执行区域地图
|
|
|
+ showMapArea.value = false;
|
|
|
+ // 收起药物处方
|
|
|
+ showPrescription.value = false;
|
|
|
+})
|
|
|
+
|
|
|
+
|
|
|
+const getDetail = async (farmWorkLibId) => {
|
|
|
+ const { data } = await VE_API.z_farm_work_record.getDetailById({ farmWorkLibId, farmWorkRecordId: miniJson.value.farmWorkRecordId, farmId: farmId.value });
|
|
|
detailData.value = data;
|
|
|
- status.value = data.detail?.flowStatus;
|
|
|
+ status.value = data?.detail?.flowStatus;
|
|
|
guideSrc.value = data?.post?.media ? JSON.parse(data?.post?.media)[0] : null;
|
|
|
};
|
|
|
</script>
|
|
|
@@ -419,7 +431,7 @@ const getDetail = async (id) => {
|
|
|
left: 0;
|
|
|
top: 0;
|
|
|
height: 144px;
|
|
|
- background: #2199f8;
|
|
|
+ background: #C7C7C7;
|
|
|
width: 100%;
|
|
|
}
|
|
|
|
|
|
@@ -566,7 +578,7 @@ const getDetail = async (id) => {
|
|
|
font-size: 14px;
|
|
|
cursor: pointer;
|
|
|
.action-btn-icon {
|
|
|
- margin-right: 4px;
|
|
|
+ margin-left: 4px;
|
|
|
transform: rotate(270deg);
|
|
|
transition: transform 0.3s ease;
|
|
|
&.rotate {
|
|
|
@@ -792,6 +804,11 @@ const getDetail = async (id) => {
|
|
|
}
|
|
|
.map-info-wrap {
|
|
|
padding-top: 12px;
|
|
|
+ ::v-deep {
|
|
|
+ .map-box {
|
|
|
+ height: 180px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.bottom-btn-wrap {
|