diff --git a/src/pages/face_report/face_report.tsx b/src/pages/face_report/face_report.tsx index 7785e9a..e020971 100644 --- a/src/pages/face_report/face_report.tsx +++ b/src/pages/face_report/face_report.tsx @@ -21,6 +21,7 @@ export default class Index extends Component { constructor(props) { super(props); this.state = { + reportShow:true, name: "template模板页", statistics: {}, recordList: [], @@ -250,7 +251,15 @@ delImg(i) { return minute + "分" + second + "秒"; } } - async onLoad() { + async onLoad(options) { + let Bool = JSON.parse(options?.report) + console.log('传过来的东西',options,Bool); + if(!Bool ){ + this.setState({ + reportShow:Bool + }) + } + this.getRouteId(); this.getClockStatistics() } @@ -266,7 +275,7 @@ delImg(i) { }; render() { - let { name, statistics, recordList, recordData, show,clockStatistics,punchInInfo,monthTime } = this.state; + let { name, statistics, recordList, recordData, show,clockStatistics,punchInInfo,monthTime,reportShow } = this.state; return ( @@ -385,17 +394,18 @@ delImg(i) { ))} - - - 前往打卡 - - 跳过 - - - + {reportShow ? ( + + 前往打卡 + + 跳过 + + + + ): null} this.setState({ show: false })}> { }; // 跳转到护理报告 toReport(id, recordId) { - go("/pages/face_report/face_report?id=" + id + "&recordId=" + recordId); + let report =false + go("/pages/face_report/face_report?id=" + id + "&recordId=" + recordId+ "&report=" + report ); } // 上传图片 handleChooseImage() {