| | |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <!-- <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | |
| | | v-hasPermi="['system:user:add']" |
| | | >新增</el-button |
| | | > |
| | | </el-col> |
| | | </el-col> --> |
| | | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | |
| | | <el-row v-if="!amendtag"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="出生地" prop="idcardno"> |
| | | <el-form-item label="出生地" prop="birthplace"> |
| | | <el-input |
| | | v-model="form.birthplace" |
| | | placeholder="国、省、地市、区县、街道等详细信息" |
| | |
| | | /> |
| | | </el-form-item> </el-col |
| | | ><el-col :span="12"> |
| | | <el-form-item label="居住地" prop="idcardno"> |
| | | <el-form-item label="居住地" prop="placeOfResidence"> |
| | | <el-input |
| | | v-model="form.placeOfResidence" |
| | | placeholder="国、省、地市、区县、街道等详细信息" |
| | |
| | | :limit="1" |
| | | accept=".xlsx, .xls" |
| | | :headers="upload.headers" |
| | | :action="upload.url + '?updateSupport=' + upload.updateSupport" |
| | | :action="upload.url" |
| | | :disabled="upload.isUploading" |
| | | :on-progress="handleFileUploadProgress" |
| | | :on-success="handleFileSuccess" |
| | | :auto-upload="false" |
| | | drag |
| | | > |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
| | | <div class="el-upload__tip text-center" slot="tip"> |
| | | <div class="el-upload__tip" slot="tip"> |
| | | <!-- <div class="el-upload__tip" slot="tip"> |
| | | <el-checkbox v-model="upload.updateSupport" /> |
| | | 是否更新已经存在的用户数据 |
| | | </div> |
| | | </div> --> |
| | | <span>仅允许导入xls、xlsx格式文件。</span> |
| | | <el-link |
| | | type="primary" |
| | |
| | | @click="importTemplate" |
| | | >下载模板 |
| | | </el-link> |
| | | <el-link |
| | | <!-- <el-link |
| | | type="success" |
| | | :underline="false" |
| | | style="font-size: 24px; vertical-align: baseline" |
| | |
| | | target="_blank" |
| | | > |
| | | 查看模板</el-link |
| | | > |
| | | > --> |
| | | </div> |
| | | </el-upload> |
| | | </div> |
| | |
| | | // 设置上传的请求头部 |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | // 上传的地址 |
| | | url: process.env.VUE_APP_BASE_API + "/system/user/importData", |
| | | url: process.env.VUE_APP_BASE_API + "/smartor/import/importPatInfo", |
| | | }, |
| | | // 查询参数 |
| | | queryParams: { |
| | |
| | | ], |
| | | |
| | | idcardno: [ |
| | | { required: true, message: "证件号能为空", trigger: "blur" }, |
| | | { required: true, message: "证件号可能为空", trigger: "blur" }, |
| | | { |
| | | pattern: |
| | | /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/, |
| | |
| | | ], |
| | | placeOfResidence: [ |
| | | { required: true, message: "居住地不能为空", trigger: "blur" }, |
| | | ], |
| | | birthplace: [ |
| | | { required: true, message: "出生地不能为空", trigger: "blur" }, |
| | | ], |
| | | }, |
| | | }; |
| | |
| | | /** 下载模板操作 */ |
| | | importTemplate() { |
| | | this.download( |
| | | "system/user/importTemplate", |
| | | "smartor/import/getImportPatTemplate", |
| | | {}, |
| | | `user_template_${new Date().getTime()}.xlsx` |
| | | ); |