1
This commit is contained in:
@@ -193,7 +193,9 @@ export default {
|
||||
isDeleteShow: false,
|
||||
deleteShow: '1',
|
||||
row1: [],
|
||||
operationType: '0'
|
||||
operationType: '0',
|
||||
str: '',
|
||||
arr: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -263,11 +265,22 @@ export default {
|
||||
this.getFileList(row.零件图号)
|
||||
},
|
||||
uploadSuccess(res, file, fileList) {
|
||||
console.log(res[0].result, 12345)
|
||||
if (res[0].result === '1') {
|
||||
const index = fileList.indexOf(file)
|
||||
fileList.splice(index, 1)
|
||||
} else {
|
||||
this.$message.error(`${file.name}文件上传失败,请检查上传文件是否正确!`)
|
||||
this.str = res[0].result
|
||||
this.arr = this.str.split('|')
|
||||
console.log(this.arr[0], 0)
|
||||
console.log(this.arr[1], 1)
|
||||
if (this.arr[1] === '0') {
|
||||
this.$notify.error(`${this.arr[0]}该零件不存在,请检查上传文件名称是否正确!`)
|
||||
}
|
||||
if (this.arr[1] === '2') {
|
||||
this.$notify.error(`${this.arr[0]}请勿重复上传!`)
|
||||
}
|
||||
// this.$message.error(`${file.name}该零件不存在,请检查上传文件名称是否正确!`)
|
||||
}
|
||||
if (fileList.length === 0) {
|
||||
this.$message.success('文件上传成功')
|
||||
|
||||
Reference in New Issue
Block a user