diff --git a/src/moduleIOT/pages/iotCarePlan/iotCarePlan.tsx b/src/moduleIOT/pages/iotCarePlan/iotCarePlan.tsx index c84de6d..cdc576e 100644 --- a/src/moduleIOT/pages/iotCarePlan/iotCarePlan.tsx +++ b/src/moduleIOT/pages/iotCarePlan/iotCarePlan.tsx @@ -1607,7 +1607,7 @@ class IotCarePlan extends Component { /** 提交护理记录 */ PostNursingLogClock = async (data: any = null, isJump = true) => { - let { currentDevice, ActiveModeItem } = this.state; + let { currentDevice, ActiveModeItem, } = this.state; let params = {}; if (data) { @@ -1626,6 +1626,13 @@ class IotCarePlan extends Component { console.log("PostNursingLogClock", res); if (res.data.code === 200) { + let params = { + instrumentId: currentDevice.id, + }; + // 上传护理完成的仪器ID + let res = await InstrumentInfo.apiClock.addClockInstrument(params); + console.log(res,'护理完成'); + this.rmWL200NursingHistory(this.WL200NursingHistory); // 护理完成,删除记录 if (isJump) { this.setState({ diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 6224ad0..70192a5 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -739,8 +739,7 @@ class Index extends Component { // 跳转仪器介绍页 goNursing = (item) => { - console.log(item,'查看跳转对象'); - + if (item.status === 0) { setStorageSync("instrument_detail", item); this.setState({ connectInstrument: item }); diff --git a/src/pages/instrumentClickinUpload/index.tsx b/src/pages/instrumentClickinUpload/index.tsx index b75b3e7..8af1035 100644 --- a/src/pages/instrumentClickinUpload/index.tsx +++ b/src/pages/instrumentClickinUpload/index.tsx @@ -190,7 +190,7 @@ export default class InstrumentClickInUpload extends Component { // 提交打卡 handleSubmit = async () => { - let { punchInInfo } = this.state; + let { punchInInfo,instrumentDetail } = this.state; let obj = punchInInfo; if (obj.clockImageList.length === 0) { msg("至少上传一张图片"); @@ -232,6 +232,13 @@ export default class InstrumentClickInUpload extends Component { clockImageList: imgList, clockContent: obj.clockContent, }; + let params = { + instrumentId: instrumentDetail.id, + }; + // 上传护理完成的仪器ID + let instrumentRes = await InstrumentInfo.apiClock.addClockInstrument(params); + console.log(instrumentRes,'添加仪器成功'); + let res = await InstrumentInfo.apiClock.postInsertClockLog(clockParmas); if (res.data.code === 200) { msg("打卡成功");