|
|
@@ -360,6 +360,7 @@ export default {
|
|
|
taskPhotoRecognitionResult: null,
|
|
|
yfNumFlage: false,
|
|
|
wuliaoPhotoImg: [], //任务包含的图片信息(只针对于物料任务)
|
|
|
+ activatedSfaTask: null,
|
|
|
};
|
|
|
},
|
|
|
activated() {
|
|
|
@@ -431,21 +432,23 @@ export default {
|
|
|
getVisitsDetail({ visitsId: this.visitId }).then((res) => {
|
|
|
this.toastLoading().clear();
|
|
|
this.infoData = res.data;
|
|
|
- this.taskPhotoRecognitionResult =
|
|
|
- res.data.sfaTaskList[this.$route.query.ids].taskPhotoRecognitionResult;
|
|
|
- var collectionItemLists = res.data.sfaTaskList[this.$route.query.ids].collectionItemList;
|
|
|
- if (res.data.sfaTaskList[this.$route.query.ids].checkUnManage == 'Y') {
|
|
|
+ let filterSfaTask = res.data.sfaTaskList.filter((val) => val.taskId == this.taskId);
|
|
|
+ this.activatedSfaTask = filterSfaTask.length ? filterSfaTask[0] : null;
|
|
|
+ if (!this.activatedSfaTask) return false;
|
|
|
+ this.taskPhotoRecognitionResult = this.activatedSfaTask.taskPhotoRecognitionResult;
|
|
|
+ var collectionItemLists = this.activatedSfaTask.collectionItemList;
|
|
|
+ if (this.activatedSfaTask.checkUnManage == 'Y') {
|
|
|
this.checkShow = true;
|
|
|
} else {
|
|
|
this.checkShow = false;
|
|
|
}
|
|
|
// this.deviceCode=res.data.deviceCode;
|
|
|
// this.putInCode=res.data.putInCode;
|
|
|
- this.deviceCode = res.data.sfaTaskList[this.$route.query.ids].deviceCode || ''; // 设备编号
|
|
|
- this.putInCode = res.data.sfaTaskList[this.$route.query.ids].putInCode || ''; // 投放编号
|
|
|
- this.equipmentCode = res.data.sfaTaskList[this.$route.query.ids].equipmentCode || ''; // 机资产编号
|
|
|
- this.inspectionType = res.data.sfaTaskList[this.$route.query.ids].inspectionType;
|
|
|
- // if (res.data.sfaTaskList[this.$route.query.ids].inspectionType == 'buy') {
|
|
|
+ this.deviceCode = this.activatedSfaTask.deviceCode || ''; // 设备编号
|
|
|
+ this.putInCode = this.activatedSfaTask.putInCode || ''; // 投放编号
|
|
|
+ this.equipmentCode = this.activatedSfaTask.equipmentCode || ''; // 机资产编号
|
|
|
+ this.inspectionType = this.activatedSfaTask.inspectionType;
|
|
|
+ // if (this.activatedSfaTask.inspectionType == 'buy') {
|
|
|
// this.showCode = true;
|
|
|
// } else {
|
|
|
// this.showCode = false;
|
|
|
@@ -526,7 +529,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.wuliaoPhotoImg = res.data.sfaTaskList[this.$route.query.ids].fileInfoList;
|
|
|
+ this.wuliaoPhotoImg = this.activatedSfaTask.fileInfoList;
|
|
|
this.tableData1 = collectionItemLists;
|
|
|
let yfNumArr = this.tableData1.filter((val) => val.yfNum);
|
|
|
this.yfNumFlage = yfNumArr.length ? true : false;
|