| | |
| | | let tableData = res1.data.tbBillList |
| | | //当已检验个数都不为空时按照检测结构排序 |
| | | tableData.sort((a, b) => { |
| | | if (a.result === '未完成' && b.result === '合格') { |
| | | if (a.result === '合格' && b.result === '未完成') { |
| | | return -1; |
| | | } else if (a.result === '未完成' && b.result === '未完成') { |
| | | } else if (a.result === '未完成' && b.result === '合格') { |
| | | return 1; |
| | | } else { |
| | | return 0; |
| | |
| | | const item = this.formData.itemNo; |
| | | console.log(this.formData.itemNo) |
| | | // console.log(item) |
| | | const url = "http://192.168.1.22:10054/api/PLM/RetrieveDrawings?ItemNo=" + item |
| | | const url = this.$store.state.serverInfo.serverAPI +"/PLM/RetrieveDrawings?ItemNo=" + item |
| | | |
| | | // const item = '5.06.04.4002'; |
| | | // const url = "http://192.168.0.100:10054/api/PLM/RetrieveDrawings?ItemNo=" + item |
| | | |
| | | |
| | | let _this = this; |
| | | |
| | | uni.request({ |
| | | url: url, |
| | | method: 'POST', |
| | | success: (response) => { |
| | | console.log(response) |
| | | if (response.data.data == '返回结果为空') { |
| | | this.drawing = null |
| | | _this.drawing = null |
| | | } else { |
| | | this.drawing = response.data.data |
| | | _this.drawing = response.data.data |
| | | // 遍历数据,判断文件后缀并添加字段 |
| | | this.drawing.forEach((file) => { |
| | | _this.drawing.forEach((file) => { |
| | | // 获取文件名的后缀 |
| | | const fileExtension = file.fName.split('.').pop() |
| | | .toLowerCase(); |
| | |
| | | if (item.fRelevantObject.length > 2) { |
| | | // 生成请求URL(简化编码逻辑) |
| | | const encodedName = encodeURIComponent(item.fName); |
| | | const url = `http://192.168.1.22:10054/api/PLM/OpenDrawingsGet?fileId=${item.fRelevantObject}&fName=${encodedName}`; |
| | | const url = this.$store.state.serverInfo.serverAPI+`/PLM/OpenDrawingsGet?fileId=${item.fRelevantObject}&fName=${encodedName}`; |
| | | console.log('请求URL:', url); |
| | | |
| | | const now = new Date(); |