| | |
| | | <el-upload |
| | | ref="upload" |
| | | :limit="1" |
| | | accept=".xlsx, .xls" |
| | | :key="uploadKey" |
| | | accept=".xls" |
| | | :headers="upload.headers" |
| | | :data="data" |
| | | :action="upload.url" |
| | |
| | | <el-checkbox v-model="upload.updateSupport" /> |
| | | 是否更新已经存在的用户数据 |
| | | </div> |
| | | <span>仅允许导入xls、xlsx格式文件。</span> |
| | | <span>仅允许导入xls格式文件。</span> |
| | | <el-link |
| | | type="primary" |
| | | :underline="false" |
| | |
| | | ], |
| | | }, |
| | | ListObj: {}, |
| | | uploadKey:0, |
| | | // 遮罩层 |
| | | loading: true, |
| | | pacStatus: "启用", |
| | |
| | | /** 导入按钮操作 */ |
| | | handleImport() { |
| | | if (this.objs.drugManufacturerId && this.objs.reservationTime) { |
| | | this.$refs.upload?.clearFiles(); |
| | | this.uploadKey = Date.now(); // 改变 key 强制重新渲染组件 |
| | | this.upload.title = "用户导入"; |
| | | this.upload.open = true; |
| | | } else { |
| | |
| | | // 文件上传成功处理 |
| | | handleFileSuccess(response, file, fileList) { |
| | | if (response.code == 500) { |
| | | console.log(22222222222); |
| | | this.isdisabled = true; |
| | | // Message.warning(response.msg); |
| | | // this.$modal.msgError(response.msg); |
| | | // this.$modal.msgError("人员"+ response.data.list + "信息错误"); |
| | |
| | | dangerouslyUseHTMLString: true, |
| | | }); |
| | | }else{ |
| | | this.isdisabled = false; |
| | | this.ListObj = response.data; |
| | | this.userList = response.data.list; |
| | | |