|
|
@@ -657,20 +657,24 @@ export default {
|
|
|
},
|
|
|
// 打开分享
|
|
|
clickShareFlag(index = -1) {
|
|
|
- // 重置分享图片状态
|
|
|
- this.reportTarget.photos.forEach((item) => {
|
|
|
- item.photos.forEach((val) => {
|
|
|
- this.$set(val, 'checked', false);
|
|
|
- });
|
|
|
- });
|
|
|
+ this.urlList = [];
|
|
|
this.reportRemarksIndex = index;
|
|
|
- // 选择分享的图片
|
|
|
- this.shareImgFlag = true;
|
|
|
+ if (this.reportTarget.photos && this.reportTarget.photos.length) {
|
|
|
+ // 重置分享图片状态
|
|
|
+ this.reportTarget.photos.forEach((item) => {
|
|
|
+ item.photos.forEach((val) => {
|
|
|
+ this.$set(val, 'checked', false);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ // 选择分享的图片
|
|
|
+ this.shareImgFlag = true;
|
|
|
+ } else {
|
|
|
+ this.setShareFlag = true;
|
|
|
+ }
|
|
|
},
|
|
|
// 确认分享
|
|
|
confirmShare() {
|
|
|
this.shareImgFlag = false;
|
|
|
- this.urlList = [];
|
|
|
this.reportTarget.photos.forEach((item) => {
|
|
|
item.photos.forEach((val) => {
|
|
|
if (val.checked) this.urlList.push(val.fileUrl);
|