From 19c98e589b98b5f6e6dab4f7c3d20779dac01230 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Tue, 9 Aug 2022 10:30:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../worklog/icworklog-add-or-update.vue | 18 +++++++----------- src/views/modules/worklog/icworklog.vue | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/views/modules/worklog/icworklog-add-or-update.vue b/src/views/modules/worklog/icworklog-add-or-update.vue index c83b21d45..0e2b90212 100644 --- a/src/views/modules/worklog/icworklog-add-or-update.vue +++ b/src/views/modules/worklog/icworklog-add-or-update.vue @@ -48,12 +48,12 @@ 点击上传
支持图片、word、pdf
+ class="el-upload__tip">支持jpg、png、bmp
@@ -114,15 +114,9 @@ export default { computed: { dataRule () { return { - customerId: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } - ], agencyId: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } ], - pids: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } - ], gridId: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } ], @@ -200,7 +194,7 @@ export default { const array = file.name.split('.') const extension = array[array.length - 1] - const formatarray = ['jpg', 'png', 'jpeg', 'bmp', 'mp4', 'wma', 'm4a', 'mp3', 'doc', 'docx', 'xls', 'xlsx', 'pdf'] + const formatarray = ['jpg', 'png', 'jpeg', 'bmp'] if (formatarray.indexOf(extension) === -1) { this.$message.error('只支持图片、word、pdf') @@ -242,7 +236,6 @@ export default { file.fileName = file.name file.fileType = file.type - file.url = file.url this.dataForm.fileList.push(file) console.log(this.dataForm.fileList) @@ -265,6 +258,9 @@ export default { if (this.dataForm.content.length < 70) { return this.$message.error("内容不能少于70字") } + if (this.dataForm.fileList.length < 1) { + return this.$message.error("照片不能为空") + } this.$refs['dataForm'].validate((valid) => { if (!valid) { return false diff --git a/src/views/modules/worklog/icworklog.vue b/src/views/modules/worklog/icworklog.vue index a2c6392ed..4b80ef30e 100644 --- a/src/views/modules/worklog/icworklog.vue +++ b/src/views/modules/worklog/icworklog.vue @@ -129,7 +129,7 @@ export default { mixinViewModuleOptions: { getDataListURL: '/gov/org/icWorkLog/page', getDataListIsPage: true, - deleteURL: '/gov/org/icWorkLog', + deleteURL: '/gov/org/icWorkLog/delete', deleteIsBatch: true, exportURL: '/gov/org/icWorkLog/export' },