|
@@ -155,7 +155,6 @@ export default {
|
|
|
tasksOptions: [], // 关联任务
|
|
|
tasksDetailList: [], // 关联任务
|
|
|
selectTask: false,
|
|
|
- judge: false,
|
|
|
from: {
|
|
|
reportName: ''
|
|
|
},
|
|
@@ -193,8 +192,7 @@ export default {
|
|
|
console.log(newV, '111111')
|
|
|
if (newV[0]) {
|
|
|
newV.map(item => {
|
|
|
- this.judge = true
|
|
|
- this.remoteMethod(item)
|
|
|
+ this.remoteMethod_data(item)
|
|
|
})
|
|
|
this.reportdelivertestInitReportRelease(newV)
|
|
|
}
|
|
@@ -209,14 +207,12 @@ export default {
|
|
|
async reportdelivertestGetReportById(val) { // 获取提测报告数据
|
|
|
const res = await reportdelivertestGetReportById(val)
|
|
|
if (res.code === 200) {
|
|
|
- console.log(res.data, '2222')
|
|
|
const from = res.data
|
|
|
this.from.id = from.id
|
|
|
this.$set(this.from, 'reportName', from.reportName) // 报告名称
|
|
|
this.setFromData(from)
|
|
|
res.data.taskIds.map(item => {
|
|
|
- this.judge = true
|
|
|
- this.remoteMethod(item)
|
|
|
+ this.remoteMethod_data(item)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -265,16 +261,16 @@ export default {
|
|
|
this.$set(this.from, 'moduleName', res.data.moduleName)
|
|
|
}
|
|
|
},
|
|
|
+ async remoteMethod_data(query) { // 远程搜索任务
|
|
|
+ const res = await taskList({ name: query })
|
|
|
+ this.tasksDetailList.push(res.data[0])
|
|
|
+ this.taskId.push(res.data[0].id)
|
|
|
+ },
|
|
|
|
|
|
async remoteMethod(query) { // 远程搜索任务
|
|
|
const res = await taskList({ name: query })
|
|
|
if (res.code === 200) {
|
|
|
this.tasksOptions = res.data
|
|
|
- if (this.judge) {
|
|
|
- this.tasksDetailList.push(res.data[0])
|
|
|
- this.taskId.push(res.data[0].id)
|
|
|
- this.judge = false
|
|
|
- }
|
|
|
}
|
|
|
},
|
|
|
|