| | |
| | | style="display: inline;margin-right: 8px" |
| | | :action="uploadAction1" |
| | | :before-upload="beforeUpload1" :headers="token" :on-error="onError1" |
| | | :on-success="handleSuccessUp" :show-file-list="false" accept='.doc,.docx,.xls,.xlsx'> |
| | | :on-success="handleSuccessUp1" :show-file-list="false" accept='.doc,.docx,.xls,.xlsx'> |
| | | <el-button size="small" type="primary">导入</el-button> |
| | | </el-upload> |
| | | <el-button size="small" type="primary" v-if="radio === 1" @click="uploadDia = true">导入</el-button> |
| | |
| | | return true; |
| | | } |
| | | }, |
| | | handleSuccessUp (response, file, fileList) { |
| | | this.$refs.upload.clearFiles() |
| | | if (response.code === 201) { |
| | | this.$message.error(response.message) |
| | | handleSuccessUp1 (response, file, fileList) { |
| | | this.$refs.upload1.clearFiles() |
| | | if (response.code !== 200) { |
| | | this.$message.error(response.msg) |
| | | return |
| | | } |
| | | this.$message.success('上传成功') |