|
|
@@ -244,8 +244,17 @@ export default {
|
|
|
collectionItemId: this.$refs.taskPhoto[0].collectionItemId, // 是 string 采集项id
|
|
|
objectType: this.$route.query.photoType, // 是 string 照片类型,取任务上的照片类型,如果没有则取手动选择的照片类型
|
|
|
locationRemark: this.$refs.taskPhoto[0].locationRemark, // 是 String 当前地址信息
|
|
|
- mediaInfos: this.$refs.taskPhoto[0].imgArr,
|
|
|
+ mediaInfos: [],
|
|
|
};
|
|
|
+ // 如果已经上传过照片了,则提交时以已上传的照片为准;如果没有上传过照片,则以当前页面的照片为准
|
|
|
+ if (
|
|
|
+ this.formData.collectionItemList[0].fileInfoList &&
|
|
|
+ this.formData.collectionItemList[0].fileInfoList.length > 0
|
|
|
+ ) {
|
|
|
+ formData.mediaInfos = this.formData.collectionItemList[0].fileInfoList;
|
|
|
+ } else {
|
|
|
+ formData.mediaInfos = this.$refs.taskPhoto[0].imgArr;
|
|
|
+ }
|
|
|
this.addCollection(formData);
|
|
|
},
|
|
|
addCollection(formData) {
|