|
|
@@ -53,7 +53,7 @@
|
|
|
<div class="item-text light-text area-text">
|
|
|
{{ detail?.executionRegion?.regionName }}种植区域
|
|
|
<div class="area-btn" v-if="detail?.executionRegion?.regionRange" @click="handleViewArea">查看区域</div>
|
|
|
- <div class="area-btn area-btn-right" v-else @click="toDraw">建议勾选<el-icon><ArrowRight /></el-icon></div>
|
|
|
+ <div class="area-btn area-btn-right" @click="toDraw" v-if="!detail?.executionRegion?.regionRange && !miniJson?.hideDraw">建议勾选<el-icon><ArrowRight /></el-icon></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-item">
|
|
|
@@ -135,7 +135,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="fixed-btn-wrap execute-action" v-if="info?.appType === 1 && detail?.flowStatus === null">
|
|
|
+ <div class="fixed-btn-wrap execute-action" v-if="info?.appType === 1 && detail?.flowStatus === 3">
|
|
|
<div class="action-item second" @click="handleConvert">转发农事</div>
|
|
|
<div class="action-item primary" @click="handleExecute">溯源认证</div>
|
|
|
</div>
|
|
|
@@ -212,45 +212,6 @@ const normalizeCropAlbum = (album) => {
|
|
|
.filter(Boolean);
|
|
|
};
|
|
|
|
|
|
-/**
|
|
|
- * prescriptionList.pesticideFertilizerList → 含 params 三行执行方式
|
|
|
- */
|
|
|
-const mapFertilizerToPesticideItem = (f) => {
|
|
|
- if (!f || typeof f !== "object") return null;
|
|
|
- return {
|
|
|
- code: f.pesticideFertilizerCode || f.code,
|
|
|
- name: f.pesticideFertilizerName || f.defaultName || f.name || "",
|
|
|
- typeName: f.typeName || "",
|
|
|
- brand: f.brand || "",
|
|
|
- unit: f.unit,
|
|
|
- params: [
|
|
|
- {
|
|
|
- dosage:
|
|
|
- f.muUsage != null && f.muUsage !== ""
|
|
|
- ? String(f.muUsage)
|
|
|
- : "",
|
|
|
- executionMethod: 1,
|
|
|
- ratio:
|
|
|
- f.ratio != null && f.ratio !== "" ? String(f.ratio) : "",
|
|
|
- remark: f.remark || "",
|
|
|
- },
|
|
|
- {
|
|
|
- dosage:
|
|
|
- f.muUsage2 != null && f.muUsage2 !== ""
|
|
|
- ? String(f.muUsage2)
|
|
|
- : "",
|
|
|
- executionMethod: 2,
|
|
|
- ratio:
|
|
|
- f.ratio2 != null && f.ratio2 !== ""
|
|
|
- ? String(f.ratio2)
|
|
|
- : "",
|
|
|
- remark: "",
|
|
|
- },
|
|
|
- { dosage: "", executionMethod: 3, ratio: "", remark: "" },
|
|
|
- ],
|
|
|
- };
|
|
|
-};
|
|
|
-
|
|
|
|
|
|
const maybeShowUploadTips = () => {
|
|
|
if (detail.value?.flowStatus !== 1) return;
|
|
|
@@ -265,14 +226,22 @@ onMounted(() => {
|
|
|
maybeShowUploadTips();
|
|
|
});
|
|
|
|
|
|
+const miniJson = ref(null);
|
|
|
onActivated(() => {
|
|
|
+ if (route.query?.miniJson) {
|
|
|
+ const miniJsonObj = JSON.parse(route.query.miniJson);
|
|
|
+ miniJson.value = JSON.parse(miniJsonObj.paramsPage);
|
|
|
+ } else {
|
|
|
+ miniJson.value = null;
|
|
|
+ }
|
|
|
getDetail();
|
|
|
});
|
|
|
|
|
|
const getDetail = () => {
|
|
|
- const { farmWorkLibId, farmId, regionId } = route.query;
|
|
|
+ if (!miniJson.value) return;
|
|
|
+ const { farmWorkLibId, farmId, recordId } = miniJson.value;
|
|
|
VE_API.z_farm_work_record
|
|
|
- .getDetailById({ farmWorkLibId, farmId, regionId })
|
|
|
+ .getDetailById({ farmWorkLibId, farmId, farmWorkRecordId: recordId })
|
|
|
.then(({ data }) => {
|
|
|
const inner =
|
|
|
data?.detail && typeof data.detail === "object"
|
|
|
@@ -333,7 +302,6 @@ const triggerDateText = computed(() => {
|
|
|
*/
|
|
|
const stageList = computed(() => {
|
|
|
const d = detail.value;
|
|
|
- console.log("d", d);
|
|
|
if (!d) return [];
|
|
|
|
|
|
if (Array.isArray(d.pesticideList) && d.pesticideList.length) {
|
|
|
@@ -377,7 +345,7 @@ const handleExecute = () => {
|
|
|
// wx.miniProgram.navigateTo({
|
|
|
// url: `/pages/subPages/location_check/index?lng=113.264435&lat=23.129163`,
|
|
|
// });
|
|
|
- executePopupRef.value.openPopup(route.query.recordId);
|
|
|
+ executePopupRef.value.openPopup(miniJson.value.recordId);
|
|
|
};
|
|
|
|
|
|
|
|
|
@@ -392,7 +360,7 @@ const toDraw = () => {
|
|
|
path: "/draw_area",
|
|
|
query: {
|
|
|
subjectId: localStorage.getItem('selectedFarmId'),
|
|
|
- varietyId: route.query.typeId,
|
|
|
+ varietyId: miniJson.value.typeId,
|
|
|
},
|
|
|
});
|
|
|
}
|
|
|
@@ -402,11 +370,12 @@ const handleBack = () => {
|
|
|
};
|
|
|
|
|
|
const handleConvert = () => {
|
|
|
+ console.log('miniJson.value', miniJson.value);
|
|
|
const query = {
|
|
|
askInfo: { title: "农情互动", content: "是否分享该互动给好友" },
|
|
|
shareText: '邀请您农情互动,精准匹配种植方案',
|
|
|
targetUrl: `work_detail`,
|
|
|
- paramsPage: JSON.stringify({ id: detail.value.id }),
|
|
|
+ paramsPage: JSON.stringify({...miniJson.value, hideDraw: true}),
|
|
|
imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/work_img.png',
|
|
|
};
|
|
|
wx.miniProgram.navigateTo({
|
|
|
@@ -477,23 +446,23 @@ const changeExecutionMethod = (stageIndex, value) => {
|
|
|
|
|
|
&.status-0 {
|
|
|
&::after {
|
|
|
- background: #FF4F4F;
|
|
|
+ background: #C7C7C7;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- &.status-1 {
|
|
|
+ &.status-3 {
|
|
|
&::after {
|
|
|
background: #FF953D;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- &.status-2 {
|
|
|
+ &.status--1 {
|
|
|
&::after {
|
|
|
- background: #C7C7C7;
|
|
|
+ background: #FF4F4F;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- &.status-3 {
|
|
|
+ &.status-5 {
|
|
|
padding-top: 30px;
|
|
|
|
|
|
&::after {
|