|
@@ -28,7 +28,7 @@
|
|
|
<div class="example-header">
|
|
<div class="example-header">
|
|
|
<div>示例照片</div>
|
|
<div>示例照片</div>
|
|
|
<div class="more" v-if="item.exampleImagesJson.length > 3"
|
|
<div class="more" v-if="item.exampleImagesJson.length > 3"
|
|
|
- @click="openMorePopup(item.exampleImagesJson)">查看更多</div>
|
|
|
|
|
|
|
+ @click="openMorePopup(item.exampleImagesJson,item)">查看更多</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="example-list" v-if="item.exampleImagesJson.length > 0">
|
|
<div class="example-list" v-if="item.exampleImagesJson.length > 0">
|
|
|
<div class="image-item-wrapper" v-for="(example, exIndex) in item.exampleImagesJson"
|
|
<div class="image-item-wrapper" v-for="(example, exIndex) in item.exampleImagesJson"
|
|
@@ -119,9 +119,9 @@
|
|
|
:style="{ justifyContent: item.expanded ? 'center' : 'space-between' }">
|
|
:style="{ justifyContent: item.expanded ? 'center' : 'space-between' }">
|
|
|
<template v-if="!item.expanded">
|
|
<template v-if="!item.expanded">
|
|
|
<span class="proportion-text">{{(item.questionList && item.questionList.length
|
|
<span class="proportion-text">{{(item.questionList && item.questionList.length
|
|
|
- ? item.questionList.map((q, i) => q + (item.answerValues[i] ?? '') + (item.indicators[i]?.unit
|
|
|
|
|
|
|
+ ? item.questionList.map((q, i) => q + ':' + (item.answerValues[i] ?? '') + (item.indicators[i]?.unit
|
|
|
?? item.indicators[0]?.unit ?? '%')).join('')
|
|
?? item.indicators[0]?.unit ?? '%')).join('')
|
|
|
- : item.question + (item.answerValues[0] ?? '') + (item.indicators[0]?.unit ?? '%')) }}</span>
|
|
|
|
|
|
|
+ : item.question + ':' + (item.answerValues[0] ?? '') + (item.indicators[0]?.unit ?? '%')) }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
<div class="toggle-btn" @click="toggleExpand(item)">
|
|
<div class="toggle-btn" @click="toggleExpand(item)">
|
|
|
<span>{{ item.expanded ? "收起" : "展开" }}</span>
|
|
<span>{{ item.expanded ? "收起" : "展开" }}</span>
|
|
@@ -146,7 +146,7 @@
|
|
|
<drone-consult-popup v-model:show="showDroneConsultPopup" @copy="onCopyWechatId" />
|
|
<drone-consult-popup v-model:show="showDroneConsultPopup" @copy="onCopyWechatId" />
|
|
|
|
|
|
|
|
<!-- 示例照片轮播组件 -->
|
|
<!-- 示例照片轮播组件 -->
|
|
|
- <example-popup v-model:show="showExamplePopup" :images="exampleList" :tips="exampleTips" :start-index="exampleStartIndex" :title="exampleTitle"
|
|
|
|
|
|
|
+ <example-popup v-model:show="showExamplePopup" :images="exampleList" :tips="currentPhotData?.shootingMethod" :start-index="exampleStartIndex" :title="currentPhotData?.exampleImageAnnotation"
|
|
|
:show-title-and-tips="exampleShowTitleAndTips" />
|
|
:show-title-and-tips="exampleShowTitleAndTips" />
|
|
|
<!-- 照片上传进度 -->
|
|
<!-- 照片上传进度 -->
|
|
|
|
|
|
|
@@ -318,7 +318,7 @@ const renderRegionFromItemWkt = (item) => {
|
|
|
.filter(wkt => wkt && typeof wkt === 'string' && wkt.trim().length > 10)
|
|
.filter(wkt => wkt && typeof wkt === 'string' && wkt.trim().length > 10)
|
|
|
.map(wkt => ({
|
|
.map(wkt => ({
|
|
|
geometry: wkt.trim(),
|
|
geometry: wkt.trim(),
|
|
|
- status: 'resolved' // 接口返回的区域默认显示为未解决状态
|
|
|
|
|
|
|
+ status: 'unresolved' // 接口返回的区域默认显示为未解决状态
|
|
|
}));
|
|
}));
|
|
|
if (regions.length > 0) {
|
|
if (regions.length > 0) {
|
|
|
drawRegionMap.setStatusRegions(regions);
|
|
drawRegionMap.setStatusRegions(regions);
|
|
@@ -451,13 +451,11 @@ const showExamplePopup = ref(false);
|
|
|
const exampleList = ref([]);
|
|
const exampleList = ref([]);
|
|
|
const exampleStartIndex = ref(0);
|
|
const exampleStartIndex = ref(0);
|
|
|
const exampleShowTitleAndTips = ref(true);
|
|
const exampleShowTitleAndTips = ref(true);
|
|
|
-const exampleTitle = ref('')
|
|
|
|
|
-const exampleTips = ref('')
|
|
|
|
|
|
|
+const currentPhotData = ref({})
|
|
|
const showExample = (item, list, index, options = {}) => {
|
|
const showExample = (item, list, index, options = {}) => {
|
|
|
- exampleTitle.value = item.exampleImageAnnotation;
|
|
|
|
|
|
|
+ currentPhotData.value = item;
|
|
|
exampleList.value = list || [];
|
|
exampleList.value = list || [];
|
|
|
exampleStartIndex.value = index || 0;
|
|
exampleStartIndex.value = index || 0;
|
|
|
- exampleTips.value = item.shootingMethod;
|
|
|
|
|
exampleShowTitleAndTips.value = options.hideLabel !== true;
|
|
exampleShowTitleAndTips.value = options.hideLabel !== true;
|
|
|
showExamplePopup.value = true;
|
|
showExamplePopup.value = true;
|
|
|
};
|
|
};
|
|
@@ -527,13 +525,13 @@ const handleConfirm = async (item, isConfirm) => {
|
|
|
if (isConfirm) {
|
|
if (isConfirm) {
|
|
|
const list = item.questionList || [];
|
|
const list = item.questionList || [];
|
|
|
const needFill = list.length || 1;
|
|
const needFill = list.length || 1;
|
|
|
- const hasEmpty = Array.from({ length: needFill }, (_, i) => i).some(
|
|
|
|
|
- (i) => item.answerValues[i] === '' || item.answerValues[i] === null || item.answerValues[i] === undefined
|
|
|
|
|
- );
|
|
|
|
|
- if (hasEmpty) {
|
|
|
|
|
- ElMessage.warning("请填写当前果园比例");
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // const hasEmpty = Array.from({ length: needFill }, (_, i) => i).some(
|
|
|
|
|
+ // (i) => item.answerValues[i] === '' || item.answerValues[i] === null || item.answerValues[i] === undefined
|
|
|
|
|
+ // );
|
|
|
|
|
+ // if (hasEmpty) {
|
|
|
|
|
+ // ElMessage.warning("请填写当前果园比例");
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
if (item.imagePaths.length === 0 && uploadData.value.length === 0) {
|
|
if (item.imagePaths.length === 0 && uploadData.value.length === 0) {
|
|
|
ElMessage.warning("请上传图片");
|
|
ElMessage.warning("请上传图片");
|
|
|
return;
|
|
return;
|
|
@@ -568,13 +566,13 @@ const handleConfirmUpload = async () => {
|
|
|
}
|
|
}
|
|
|
const item = currentItem.value;
|
|
const item = currentItem.value;
|
|
|
const len = item?.questionList?.length || 1;
|
|
const len = item?.questionList?.length || 1;
|
|
|
- const hasEmpty = Array.from({ length: len }, (_, i) => i).some(
|
|
|
|
|
- (i) => item.answerValues[i] === '' || item.answerValues[i] === null || item.answerValues[i] === undefined
|
|
|
|
|
- );
|
|
|
|
|
- if (hasEmpty) {
|
|
|
|
|
- ElMessage.warning("请填写占比数值");
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // const hasEmpty = Array.from({ length: len }, (_, i) => i).some(
|
|
|
|
|
+ // (i) => item.answerValues[i] === '' || item.answerValues[i] === null || item.answerValues[i] === undefined
|
|
|
|
|
+ // );
|
|
|
|
|
+ // if (hasEmpty) {
|
|
|
|
|
+ // ElMessage.warning("请填写占比数值");
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
const answerVals = (item.answerValues || []).slice(0, len);
|
|
const answerVals = (item.answerValues || []).slice(0, len);
|
|
|
const parmas = {
|
|
const parmas = {
|
|
|
interactionId: item.id,
|
|
interactionId: item.id,
|
|
@@ -639,8 +637,14 @@ const handleUploadSuccess = (data) => {
|
|
|
uploadedSuccessCount.value = len;
|
|
uploadedSuccessCount.value = len;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-const openMorePopup = (images) => {
|
|
|
|
|
- morePopupRef.value.setItems(images);
|
|
|
|
|
|
|
+const openMorePopup = (images, item) => {
|
|
|
|
|
+ const data = images.map(image => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ name: item.exampleImageAnnotation,
|
|
|
|
|
+ image: image
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ morePopupRef.value.setItems(data);
|
|
|
morePopupRef.value.openPopup();
|
|
morePopupRef.value.openPopup();
|
|
|
}
|
|
}
|
|
|
|
|
|