From 75832e6b0ab7910350a8379f7592af5acc9a158e Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Thu, 2 Jun 2022 14:49:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/report/Daily.vue | 24 ++++--------------- .../components/report/InspectLog.vue | 24 ++++--------------- .../components/report/MeetingMminutes.vue | 24 ++++--------------- .../components/report/WorkReport.vue | 24 ++++--------------- 4 files changed, 20 insertions(+), 76 deletions(-) diff --git a/src/saas/AppCountryAlbum/components/report/Daily.vue b/src/saas/AppCountryAlbum/components/report/Daily.vue index c36d3943..d55ab428 100644 --- a/src/saas/AppCountryAlbum/components/report/Daily.vue +++ b/src/saas/AppCountryAlbum/components/report/Daily.vue @@ -154,30 +154,16 @@ count: 9, sizeType: ['compressed'], success: res => { - res.tempFiles.forEach(v => { - this.upload(v) + res.tempFilePaths.forEach(v => { + this.richList.push({ + type: 'img', + value: v + }) }) } }) }, - upload (img) { - let formData = new FormData() - formData.append('file', img) - - this.$loading() - this.$http.post('/admin/file/add2?type=image', formData).then(res => { - if (res.code === 0) { - this.richList.push({ - type: 'img', - value: res.data.url - }) - } else { - this.$u.toast(res.msg) - } - }) - }, - confirm () { if (!this.content) { return this.$u.toast('文本不能为空') diff --git a/src/saas/AppCountryAlbum/components/report/InspectLog.vue b/src/saas/AppCountryAlbum/components/report/InspectLog.vue index cfb9071d..c030191a 100644 --- a/src/saas/AppCountryAlbum/components/report/InspectLog.vue +++ b/src/saas/AppCountryAlbum/components/report/InspectLog.vue @@ -163,30 +163,16 @@ count: 9, sizeType: ['compressed'], success: res => { - res.tempFiles.forEach(v => { - this.upload(v) + res.tempFilePaths.forEach(v => { + this.richList.push({ + type: 'img', + value: v + }) }) } }) }, - upload (img) { - let formData = new FormData() - formData.append('file', img) - - this.$loading() - this.$http.post('/admin/file/add2?type=image', formData).then(res => { - if (res.code === 0) { - this.richList.push({ - type: 'img', - value: res.data.url - }) - } else { - this.$u.toast(res.msg) - } - }) - }, - confirm () { if (!this.content) { return this.$u.toast('文本不能为空') diff --git a/src/saas/AppCountryAlbum/components/report/MeetingMminutes.vue b/src/saas/AppCountryAlbum/components/report/MeetingMminutes.vue index c7611517..1450fd5e 100644 --- a/src/saas/AppCountryAlbum/components/report/MeetingMminutes.vue +++ b/src/saas/AppCountryAlbum/components/report/MeetingMminutes.vue @@ -184,30 +184,16 @@ count: 9, sizeType: ['compressed'], success: res => { - res.tempFiles.forEach(v => { - this.upload(v) + res.tempFilePaths.forEach(v => { + this.richList.push({ + type: 'img', + value: v + }) }) } }) }, - upload (img) { - let formData = new FormData() - formData.append('file', img) - - this.$loading() - this.$http.post('/admin/file/add2?type=image', formData).then(res => { - if (res.code === 0) { - this.richList.push({ - type: 'img', - value: res.data.url - }) - } else { - this.$u.toast(res.msg) - } - }) - }, - confirm () { if (!this.content) { return this.$u.toast('文本不能为空') diff --git a/src/saas/AppCountryAlbum/components/report/WorkReport.vue b/src/saas/AppCountryAlbum/components/report/WorkReport.vue index 86174799..f8aadbb4 100644 --- a/src/saas/AppCountryAlbum/components/report/WorkReport.vue +++ b/src/saas/AppCountryAlbum/components/report/WorkReport.vue @@ -154,30 +154,16 @@ count: 9, sizeType: ['compressed'], success: res => { - res.tempFiles.forEach(v => { - this.upload(v) + res.tempFilePaths.forEach(v => { + this.richList.push({ + type: 'img', + value: v + }) }) } }) }, - upload (img) { - let formData = new FormData() - formData.append('file', img) - - this.$loading() - this.$http.post('/admin/file/add2?type=image', formData).then(res => { - if (res.code === 0) { - this.richList.push({ - type: 'img', - value: res.data.url - }) - } else { - this.$u.toast(res.msg) - } - }) - }, - confirm () { if (!this.content) { return this.$u.toast('文本不能为空')