添加用户使用仪器记录

master
qsj 2 years ago
parent 4e0c52b3b9
commit 1f4f7d3ab8

@ -1607,7 +1607,7 @@ class IotCarePlan extends Component<any, any> {
/** 提交护理记录 */
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<any, any> {
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({

@ -739,8 +739,7 @@ class Index extends Component<any, any> {
// 跳转仪器介绍页
goNursing = (item) => {
console.log(item,'查看跳转对象');
if (item.status === 0) {
setStorageSync("instrument_detail", item);
this.setState({ connectInstrument: item });

@ -190,7 +190,7 @@ export default class InstrumentClickInUpload extends Component<any, any> {
// 提交打卡
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<any, any> {
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("打卡成功");

Loading…
Cancel
Save