| | |
| | | this.progressValue = 0 |
| | | this.showProgress = false |
| | | this.$emit('successFN', result) |
| | | // let errorArr = [] |
| | | // // 根据与后台约定data数组返回的都是存在业务意义错误的对象 |
| | | // if (result.data && result.data.length) { |
| | | // errorArr = result.data.map(file => { |
| | | // // 遍历前台抛给后台的fileList 进行比对赋值file文件及message |
| | | // for (var i = 0; i < this.suFileList.length; i++) { |
| | | // const iteam = this.suFileList[i] |
| | | // if ( |
| | | // file.upload.fileName && |
| | | // iteam.name === file.upload.fileName |
| | | // ) { |
| | | // return { |
| | | // uuId: guid(), |
| | | // file: iteam, |
| | | // photos: file.upload.path, |
| | | // baseList: file.baseList ? file.baseList : null, |
| | | // errorMsg: { |
| | | // type: 'error', |
| | | // errorType: '上传异常', |
| | | // message: file.reason ? file.reason : result.msg |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // }) |
| | | // } |
| | | /* 回调传值 */ |
| | | // 处理错误文件列表 如果为0说明全部成功,(通过校验,并在后台成功完成注册添加) |
| | | // let erFileList = |
| | | // result && result.success |
| | | // ? this.erFileList |
| | | // : [...this.erFileList, ...errorArr] |
| | | // // 全部成功无需打开业务弹窗 |
| | | // if (erFileList.length > 0) { |
| | | // this.$emit('addFilesBaBackFN', { |
| | | // suFileList: result && result.success ? this.suFileList : [], |
| | | // erFileList: erFileList, |
| | | // fileList: this.fileList, |
| | | // result: res |
| | | // }) |
| | | // } |
| | | // if (erFileList.length === 0) { |
| | | // this.$emit('successFN') |
| | | // } |
| | | } |
| | | } catch (error) { |
| | | // this.$notify({ |
| | | // type: 'error', |
| | | // message: '服务器错误!请联系管理员' // + error.message |
| | | // }) |
| | | this.progressValue = 0 |
| | | this.showProgress = false |
| | | console.log('catch---', error) |
| | | const errorArr = this.suFileList.map(file => { |
| | | return { |
| | | uuId: guid(), |
| | |
| | | errorMsg: { |
| | | type: 'error', |
| | | errorType: '上传服务器错误', |
| | | message: '图片不是单人脸照片,请重新上传' |
| | | message: '上传服务器错误' |
| | | } |
| | | } |
| | | }) |