From c594eef54b6a7ae813ac3aede5ff6207d60b92e7 Mon Sep 17 00:00:00 2001 From: pyt <626651354@qq.com> Date: 星期四, 20 三月 2025 14:35:03 +0800 Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/chongzhouResettle --- src/views/applicationBatchList/components/UploadDialog.vue | 32 +++++++++++--------------------- 1 files changed, 11 insertions(+), 21 deletions(-) diff --git a/src/views/applicationBatchList/components/UploadDialog.vue b/src/views/applicationBatchList/components/UploadDialog.vue index 9b456c5..adb48ab 100644 --- a/src/views/applicationBatchList/components/UploadDialog.vue +++ b/src/views/applicationBatchList/components/UploadDialog.vue @@ -1,15 +1,15 @@ <template> <el-dialog - :title="type === 'add' ? '新增申请批次' : '批量导入'" + :title="'导入自主购房安置申请'" :visible.sync="dialogVisible" width="40%" @close="handleClose" > - <el-form ref="uploadForm" :model="form" :rules="rules" label-width="80px"> - <el-form-item label="批次号" prop="batchNo"> - <el-input v-model="form.batchNo" placeholder="请输入" /> + <el-form ref="uploadForm" :model="form" :rules="rules" label-width="180px"> + <el-form-item label="批次号" prop="batchNumber"> + <el-input v-model="form.batchNumber" placeholder="请输入" /> </el-form-item> - <el-form-item :label="type === 'add' ? '导入文件' : '批量文件'" prop="file"> + <el-form-item :label="'导入安置申请表'" prop="file"> <el-upload class="upload-demo" drag @@ -21,7 +21,7 @@ <i class="el-icon-upload"></i> <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> <div class="el-upload__tip" slot="tip"> - 支持扩展名:.doc .docx .pdf .jpg .png .xlsx .xls + 支持扩展名:.doc .docx .xlsx .xls </div> </el-upload> </el-form-item> @@ -34,6 +34,7 @@ </template> <script> +import { importBatch } from "@/api/application-batch"; export default { name: 'UploadDialog', props: { @@ -41,23 +42,16 @@ type: Boolean, default: false }, - type: { - type: String, - default: 'add', - validator: function(value) { - return ['add', 'batch'].indexOf(value) !== -1 - } - } }, data() { return { dialogVisible: false, form: { - batchNo: '', + batchNumber: '', file: null }, rules: { - batchNo: [ + batchNumber: [ { required: true, message: '请输入批次号', trigger: 'blur' } ], file: [ @@ -76,7 +70,7 @@ }, methods: { handleClose() { - this.form.batchNo = ''; + this.form.batchNumber = ''; this.form.file = null; this.$refs.uploadForm && this.$refs.uploadForm.resetFields(); }, @@ -94,10 +88,6 @@ // 这里添加实际的上传逻辑 const formData = new FormData(); formData.append('file', this.form.file); - if (this.type === 'add') { - formData.append('batchNo', this.form.batchNo); - } - // 模拟上传 this.$message.info('正在上传,请稍候...'); setTimeout(() => { @@ -112,7 +102,7 @@ <style scoped> .upload-demo { - text-align: center; + text-align: left; } .el-upload { width: 100%; -- Gitblit v1.7.1