| | |
| | | name: "list", |
| | | data() { |
| | | return { |
| | | rowFileName: '', |
| | | logList: [], |
| | | logVisible: false, |
| | | currentObj: null, |
| | |
| | | this.file = null; |
| | | this.file1 = null; |
| | | this.resObj = { rowId: row.id }; |
| | | this.rowFileName = row.fileName; |
| | | this.onlyXls = true; |
| | | this.uploadShow = true; |
| | | }, |
| | |
| | | this.$message.error("sop说明文件解析异常"); |
| | | return false; |
| | | } |
| | | // let info = this.resData[0]; |
| | | // if(!info.boardNumber || !info.type) { |
| | | // this.$error({ |
| | | // title: '系统提示', |
| | | // content: '缺少板号或软件类型,请输入板号和软件类型', |
| | | // }); |
| | | // return false; |
| | | // } |
| | | // 如果sop文件名称 != sop说明里的文件名称 + 文件版本 则报错拒绝 |
| | | let reg = /(.*)\..{1,5}$/; |
| | | let name1 = this.file.name.match(reg)[1]; |
| | | let { fileName, fileVersion } = this.resObj; |
| | | let name2 = fileName + fileVersion; |
| | | |
| | | if (name1.toLowerCase() != name2.toLowerCase()) { |
| | | this.$message.error("sop与说明文件可能不匹配"); |
| | | return false; |
| | | } |
| | | |
| | | let loading = this.$layer.loading(); |
| | | |
| | | const formData = new FormData(); |
| | |
| | | this.$message.success("上传成功"); |
| | | this.searchData(); |
| | | } else { |
| | | this.$message.error("解析失败"); |
| | | this.$message.error(msg); |
| | | } |
| | | this.$layer.close(loading); |
| | | }) |
| | |
| | | this.$message.error("sop说明文件解析异常"); |
| | | return false; |
| | | } |
| | | |
| | | if (this.rowFileName.toLowerCase() != this.resObj.fileName.toLowerCase()) { |
| | | this.$message.error("说明文件与该条记录可能不匹配"); |
| | | return false; |
| | | } |
| | | let loading = this.$layer.loading(); |
| | | updateSop(this.resObj) |
| | | .then((res) => { |