From df78271dc54f633388856247fa6fa13c9e2d92bf Mon Sep 17 00:00:00 2001 From: liujun Date: Sun, 4 Feb 2024 11:03:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=9B=91=E7=AE=A1=E7=AB=AF=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=A7=94=E6=89=98=E4=B9=A6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../train/synInfo/components/sendUtil.vue | 23 +++++++++++++++++-- src/views/util/uploadFile/index.vue | 2 +- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/views/train/synInfo/components/sendUtil.vue b/src/views/train/synInfo/components/sendUtil.vue index ef2a763..440bbb8 100644 --- a/src/views/train/synInfo/components/sendUtil.vue +++ b/src/views/train/synInfo/components/sendUtil.vue @@ -44,6 +44,17 @@ + + + + + @@ -59,9 +70,11 @@ import vueQr from 'vue-qr' import Treeselect from '@riophae/vue-treeselect' import { requestFN } from '@/utils/request' +import uploadFile from '../../../util/uploadFile/index.vue' +import { upload } from '@/utils/upload' export default { - components: { Treeselect, vueQr }, + components: { Treeselect, vueQr, uploadFile }, props: { appendToBody: { type: Boolean, @@ -95,6 +108,7 @@ export default { APPOINT_DEPARTMENT_NAME: '', APPOINT_USER_ID: '', APPOINT_USER_NAME: '', + APPOINT_ANNEX: [], user: '', tm: new Date().getTime(), list: [] @@ -172,7 +186,12 @@ export default { this.$message.error('请填写完整信息') } else { this.form.list = this.heirloom - requestFN('/trainingbatch/sendMessage', this.form + const formData = new FormData() + Object.keys(this.form).map(key => { + formData.append(key, this.form[key]) + }) + formData.append('chenNuoShu', this.form.APPOINT_ANNEX[0].raw) + upload('/trainingbatch/sendMessage', formData ).then((data) => { if (data.code !== '0') { this.$message.error(data.msg) diff --git a/src/views/util/uploadFile/index.vue b/src/views/util/uploadFile/index.vue index 6e8428c..ba25c46 100644 --- a/src/views/util/uploadFile/index.vue +++ b/src/views/util/uploadFile/index.vue @@ -39,7 +39,7 @@ export default { }, info: { type: String, - default: '文件大小不超过500kb' + default: '文件大小不超过500MB' } }, data() { From bc8ff65d07b8eca08f4f9966e4286f56e20bae8a Mon Sep 17 00:00:00 2001 From: liujun Date: Wed, 21 Feb 2024 11:25:46 +0800 Subject: [PATCH 2/3] =?UTF-8?q?1=E3=80=81=E6=89=BF=E8=AF=BA=E4=B9=A6?= =?UTF-8?q?=E3=80=81=E5=A7=94=E6=89=98=E4=B9=A6=E8=BD=AC=E5=8F=98=E5=BF=85?= =?UTF-8?q?=E4=BC=A0=202=E3=80=81bug=E4=BF=AE=E6=94=B9=EF=BC=88=E9=9B=86?= =?UTF-8?q?=E5=9B=A2=E5=8D=95=E4=BD=8D=E6=9F=A5=E7=9C=8B=E4=B8=8D=E5=88=B0?= =?UTF-8?q?=E5=BD=92=E5=B1=9E=E8=87=AA=E5=B7=B1=E7=9A=84=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=96=B9=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/train/synInfo/components/sendUtil.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/train/synInfo/components/sendUtil.vue b/src/views/train/synInfo/components/sendUtil.vue index 440bbb8..d707173 100644 --- a/src/views/train/synInfo/components/sendUtil.vue +++ b/src/views/train/synInfo/components/sendUtil.vue @@ -122,6 +122,9 @@ export default { ], APPOINT_CORP_ID: [ { required: true, message: '请选择企业', trigger: 'change' } + ], + APPOINT_ANNEX: [ + { required: true, message: '请上传文件', trigger: 'change' } ] } } @@ -190,7 +193,6 @@ export default { Object.keys(this.form).map(key => { formData.append(key, this.form[key]) }) - formData.append('chenNuoShu', this.form.APPOINT_ANNEX[0].raw) upload('/trainingbatch/sendMessage', formData ).then((data) => { if (data.code !== '0') { From 9f3953ed3f1c38c5b026e922e807be80bef57b62 Mon Sep 17 00:00:00 2001 From: liujun Date: Wed, 21 Feb 2024 17:16:11 +0800 Subject: [PATCH 3/3] =?UTF-8?q?1=E3=80=81=E6=89=BF=E8=AF=BA=E4=B9=A6?= =?UTF-8?q?=E9=94=99=E5=88=AB=E5=AD=97=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/train/synInfo/components/sendUtil.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/train/synInfo/components/sendUtil.vue b/src/views/train/synInfo/components/sendUtil.vue index d707173..444b5e2 100644 --- a/src/views/train/synInfo/components/sendUtil.vue +++ b/src/views/train/synInfo/components/sendUtil.vue @@ -193,6 +193,7 @@ export default { Object.keys(this.form).map(key => { formData.append(key, this.form[key]) }) + formData.append('chenNuoShu', this.form.APPOINT_ANNEX[0].raw) upload('/trainingbatch/sendMessage', formData ).then((data) => { if (data.code !== '0') {