|
@ -113,6 +113,11 @@ Page({ |
|
|
beforeFlag: res.data[0].checkResultFlag |
|
|
beforeFlag: res.data[0].checkResultFlag |
|
|
}) |
|
|
}) |
|
|
console.log(this.data.beforeFlag); |
|
|
console.log(this.data.beforeFlag); |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
beforeFlag: res.data[0].checkResultFlag |
|
|
|
|
|
}) |
|
|
|
|
|
console.log(this.data.beforeFlag) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
@ -176,27 +181,29 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (this.data.hazardDesc2) { |
|
|
|
|
|
|
|
|
if (this.data.newContent) { |
|
|
let newArr = this.data.addHiddenDangeList.concat({ |
|
|
let newArr = this.data.addHiddenDangeList.concat({ |
|
|
hazardDesc: this.data.hazardDesc2, |
|
|
hazardDesc: this.data.newContent, |
|
|
hazardStatus: 2 |
|
|
hazardStatus: 0 |
|
|
}); |
|
|
}); |
|
|
console.log(newArr) |
|
|
console.log(newArr) |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
addHiddenDangeList: newArr, |
|
|
addHiddenDangeList: newArr, |
|
|
|
|
|
newContent:'' |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
if (this.data.newContent) { |
|
|
console.log(this.data.addHiddenDangeList); |
|
|
|
|
|
if (this.data.hazardDesc2) { |
|
|
let newArr = this.data.addHiddenDangeList.concat({ |
|
|
let newArr = this.data.addHiddenDangeList.concat({ |
|
|
hazardDesc: this.data.newContent, |
|
|
hazardDesc: this.data.hazardDesc2, |
|
|
hazardStatus: 0 |
|
|
hazardStatus: 2 |
|
|
}); |
|
|
}); |
|
|
console.log(newArr) |
|
|
console.log(newArr) |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
addHiddenDangeList: newArr, |
|
|
addHiddenDangeList: newArr, |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
console.log(this.data.addHiddenDangeList); |
|
|
|
|
|
let form={ |
|
|
let form={ |
|
|
companyId: this.data.companyId, |
|
|
companyId: this.data.companyId, |
|
|
checkTime: this.getCurrentDateTime(), |
|
|
checkTime: this.getCurrentDateTime(), |
|
@ -208,6 +215,9 @@ Page({ |
|
|
remark: this.data.remarks, |
|
|
remark: this.data.remarks, |
|
|
reviewAddress:this.data.addressContent |
|
|
reviewAddress:this.data.addressContent |
|
|
} |
|
|
} |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
checkboxValue:'' |
|
|
|
|
|
}) |
|
|
// if (!this.data.reviewTime) {
|
|
|
// if (!this.data.reviewTime) {
|
|
|
// form.reviewTime=null
|
|
|
// form.reviewTime=null
|
|
|
// }
|
|
|
// }
|
|
@ -389,13 +399,14 @@ Page({ |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
addAnother() { |
|
|
addAnother() { |
|
|
let newArr = this.data.addHiddenDangeList.concat({ hazardDesc: this.data.newContent, hazardStatus: 0, requirements:this.data.hazardDesc2}); |
|
|
let newArr = this.data.addHiddenDangeList.concat({ hazardDesc: this.data.newContent, hazardStatus: 2}); |
|
|
console.log() |
|
|
console.log() |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
addHiddenDangeList: newArr, |
|
|
addHiddenDangeList: newArr, |
|
|
newContent: '', // 清空输入框的值
|
|
|
newContent: '', // 清空输入框的值
|
|
|
}); |
|
|
}); |
|
|
console.log('添加后的数组:', this.data.addHiddenDangeList); |
|
|
console.log('添加后的数组:', this.data.addHiddenDangeList); |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
pickerChange: function (e) { |
|
|
pickerChange: function (e) { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|