护理报告

master
qsj 2 years ago
parent 924638c3c9
commit e8468ce3bd

@ -85,7 +85,7 @@ export default defineAppConfig({
"pages/recording/recording", "pages/recording/recording",
"pages/face_report_one/face_report_one", "pages/face_report_one/face_report_one",
"pages/moisture_test_report/moisture_test_report", "pages/moisture_test_report/moisture_test_report",
"pages/face_report/face_report",
], ],
}, },
{ {

@ -290,9 +290,9 @@ class IotCarePlanFR200 extends Component<any, any> {
this.getInstrumentClockSummary(); this.getInstrumentClockSummary();
this.getInstrumentClockDetail(); this.getInstrumentClockDetail();
} }
componentDidMount() {} componentDidMount() { }
componentWillUnmount() {} componentWillUnmount() { }
componentDidShow() { componentDidShow() {
console.log("页面显示了"); console.log("页面显示了");
@ -660,8 +660,8 @@ class IotCarePlanFR200 extends Component<any, any> {
}); });
// return; // return;
let { currentDevice, ActiveModeItem } = this.state; let { currentDevice, ActiveModeItem } = this.state;
let params:any = {}; let params: any = {};
params = { params = {
instrumentId: currentDevice.id, instrumentId: currentDevice.id,
instrumentName: currentDevice.name, instrumentName: currentDevice.name,
@ -672,14 +672,14 @@ class IotCarePlanFR200 extends Component<any, any> {
GearData: [...waterStepList], GearData: [...waterStepList],
}) })
}; };
// params = { ...params, ...nursingData }; // params = { ...params, ...nursingData };
let res: any = await InstrumentInfo.apiNursingLog.addLog( let res: any = await InstrumentInfo.apiNursingLog.addLog(
JSON.stringify( JSON.stringify(
params params
) )
); );
setTimeout(async() => { setTimeout(async () => {
this.setState({ this.setState({
isShowNursingSuccess: false, isShowNursingSuccess: false,
}); });
@ -688,9 +688,9 @@ class IotCarePlanFR200 extends Component<any, any> {
let year = date.getFullYear(); let year = date.getFullYear();
let month = (date.getMonth() + 1).toString().padStart(2, '0'); let month = (date.getMonth() + 1).toString().padStart(2, '0');
let day = date.getDate().toString().padStart(2, '0'); let day = date.getDate().toString().padStart(2, '0');
let formattedDate = `${year}.${month}.${day}`; let formattedDate = `${year}.${month}.${day}`;
go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${params.nursingData}&date=${formattedDate}&modeId=${ActiveModeItem.id}&id=${currentDevice.id}`); go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${params.nursingData}&date=${formattedDate}&modeId=${ActiveModeItem.id}&id=${currentDevice.id}`);
}, 2000); }, 2000);
}; };
@ -720,10 +720,10 @@ class IotCarePlanFR200 extends Component<any, any> {
} }
}, 1000); }, 1000);
} }
updata() {} updata() { }
// 绘制能量图 // 绘制能量图
drawProwerPicture() {} drawProwerPicture() { }
/** 切换光照 */ /** 切换光照 */
onSwitchChange = async () => { onSwitchChange = async () => {
@ -1313,7 +1313,7 @@ class IotCarePlanFR200 extends Component<any, any> {
* @description +1 * @description +1
*/ */
waterTestNext(index) { waterTestNext(index) {
let ActiveModeItem =this.state.ActiveModeItem let ActiveModeItem = this.state.ActiveModeItem
if (index === 0 && ActiveModeItem.stepOneVideo) { if (index === 0 && ActiveModeItem.stepOneVideo) {
this.VideoSrcLoad(ActiveModeItem.stepOneVideo); this.VideoSrcLoad(ActiveModeItem.stepOneVideo);
} else if (index === 1 && ActiveModeItem.stepTwoVideo) { } else if (index === 1 && ActiveModeItem.stepTwoVideo) {
@ -1563,7 +1563,7 @@ class IotCarePlanFR200 extends Component<any, any> {
// 水分测试需要特殊处理 // 水分测试需要特殊处理
// 水分测试准备 水分测试工作 水分测试启动 // 水分测试准备 水分测试工作 水分测试启动
if (ActiveModeItem.modeType === "moistureTest") { if (ActiveModeItem.modeType === "moistureTest") {
let that =this let that = this
sendParams.testStatus = "standby"; // 切换为准备 sendParams.testStatus = "standby"; // 切换为准备
let waterStepList = this.state.waterStepList; let waterStepList = this.state.waterStepList;
let waterStepIndex = this.state.waterStepIndex; let waterStepIndex = this.state.waterStepIndex;
@ -1970,8 +1970,8 @@ class IotCarePlanFR200 extends Component<any, any> {
// 脸部one // 脸部one
todoPromise = async () => { todoPromise = async () => {
const nowFR200NursingHistory = Taro.getStorageSync("FR200NursingHistory"); const nowFR200NursingHistory = Taro.getStorageSync("FR200NursingHistory");
console.log(nowFR200NursingHistory,'nowFR200NursingHistory'); console.log(nowFR200NursingHistory, 'nowFR200NursingHistory');
// 护理脸部 // 护理脸部
if (nowFR200NursingHistory.jsonStatus.workMode === "face") { if (nowFR200NursingHistory.jsonStatus.workMode === "face") {
// 把working=工作中的状态数据筛选出来 // 把working=工作中的状态数据筛选出来
@ -2036,7 +2036,8 @@ class IotCarePlanFR200 extends Component<any, any> {
}; };
return nursingData; return nursingData;
} }
return { nursingData:JSON.stringify({workMode: nowFR200NursingHistory.workMode,}) }
}; };
// 计算挡位 // 计算挡位
@ -2073,11 +2074,14 @@ class IotCarePlanFR200 extends Component<any, any> {
}; };
} }
let res1: any = await this.todoPromise(); let res1: any = await this.todoPromise();
if(res1){
params = { ...params, ...res1 };
}
console.log(res1, "查看返回数据"); console.log(res1, "查看返回数据");
params = { ...params, ...res1 };
let res: any = await InstrumentInfo.apiNursingLog.addLog(params); let res2: any = await InstrumentInfo.apiNursingLog.addLog(params);
console.log("PostNursingLogClock", res); console.log("PostNursingLogClock", res2);
if (res.data.code === 200) { if (res2.data.code === 200) {
let params = { let params = {
instrumentId: currentDevice.id, instrumentId: currentDevice.id,
}; };
@ -2095,7 +2099,7 @@ class IotCarePlanFR200 extends Component<any, any> {
isShowNursingSuccess: false, isShowNursingSuccess: false,
}); });
this.goFaceReport(res1, ActiveModeItem.id); // 跳转 this.goFaceReport(res1, ActiveModeItem.id, res2.data.data, currentDevice.id); // 跳转
}, 2000); }, 2000);
} }
} }
@ -2191,7 +2195,7 @@ class IotCarePlanFR200 extends Component<any, any> {
}; };
/** 完成护理提交:跳转护理报告页 */ /** 完成护理提交:跳转护理报告页 */
goFaceReport = (data, id) => { goFaceReport = async (data, id, deviceid, currentDevice) => {
let nursingData = JSON.parse(data.nursingData); let nursingData = JSON.parse(data.nursingData);
// 跳转前置空定时器,防止重复提交 // 跳转前置空定时器,防止重复提交
if (currentTimeTimer) clearInterval(currentTimeTimer); if (currentTimeTimer) clearInterval(currentTimeTimer);
@ -2204,31 +2208,39 @@ class IotCarePlanFR200 extends Component<any, any> {
"headLiftingPro", "headLiftingPro",
].includes(nursingData.workMode) ].includes(nursingData.workMode)
) { ) {
// let obj = { let ids = Number(deviceid)
// modeName: nursingData.modeName, // 获取echarts数据 这个是获取接口更新echarts页面
// data: nursingData, let res2 = await InstrumentInfo.apiNursingLog.getStatiCDE(ids);
// };
let nursingDatas = JSON.parse(res2.data.data.nursingData)
let obj = {
modeName: res2.data.data.modeName,
data: nursingDatas
}
let report = true; let report = true;
go( go(
"/recoding/pages/face_report_one/face_report_one?id=" + "/recoding/pages/face_report_one/face_report_one?id=" +
id + ids +
"&report=" + "&report=" +
report report + "&obj=" +
JSON.stringify(obj)
); );
} else if ("moistureTest" === nursingData.workMode) { } else if ("moistureTest" === nursingData.workMode) {
console.log("水分测试"); console.log("水分测试");
} else { } else {
console.log('跳转11111111');
let report = true; let report = true;
go( go(
"/recoding/pages/face_report/face_report?id=" + "/recoding/pages/face_report/face_report?id=" +
this.state.currentDevice.id+ deviceid +
"&report=" + "&recordId=" + currentDevice +
report "&report=" +
report
); );
// go(
// "/recoding/pages/face_report/face_report?id=" +
// this.state.currentDevice.id
// );
} }
}; };
@ -2540,9 +2552,9 @@ class IotCarePlanFR200 extends Component<any, any> {
deviceInfo={currentDevice} deviceInfo={currentDevice}
close={this.connectionClose} close={this.connectionClose}
isDisconnect={!isConnectionBlutoot} isDisconnect={!isConnectionBlutoot}
offlineChange={() => {}} offlineChange={() => { }}
pairingChange={this.pairingChange} pairingChange={this.pairingChange}
upgradeFun={() => {}} upgradeFun={() => { }}
/> />
)} )}
@ -2625,12 +2637,12 @@ class IotCarePlanFR200 extends Component<any, any> {
{(ActiveModeItem.modeType === "maskPenetration" || {(ActiveModeItem.modeType === "maskPenetration" ||
ActiveModeItem.modeType === "essence") && ( ActiveModeItem.modeType === "essence") && (
<Gears <Gears
onEmitMinus={this.handleMinus} onEmitMinus={this.handleMinus}
onEmitAdd={this.handleAdd} onEmitAdd={this.handleAdd}
GearData={GearData} GearData={GearData}
></Gears> ></Gears>
)} )}
{ActiveModeItem.modeType === "moistureTest" && ( {ActiveModeItem.modeType === "moistureTest" && (
<WaterTest <WaterTest

@ -299,8 +299,8 @@ export default class Recording extends Component<any, any> {
setStorageSync("instrument_detail", instrument); setStorageSync("instrument_detail", instrument);
} }
}) })
console.log(item,'查看'); console.log(item, '查看');
if ([1, 2, 3, 4, 5].includes(item.jumpType)) { if ([1, 2, 3, 4, 5].includes(item.jumpType)) {
this.One(item); this.One(item);
} else if (item.jumpType === 0) { } else if (item.jumpType === 0) {
@ -316,24 +316,22 @@ export default class Recording extends Component<any, any> {
} }
// 打开第一种类型 // 打开第一种类型
One = async (item) => { One = async (item) => {
let ids =Number(item.id) let ids = Number(item.id)
// 获取echarts数据 这个是获取接口更新echarts页面 // 获取echarts数据 这个是获取接口更新echarts页面
let res2 = await InstrumentInfo.apiNursingLog.getStatiCDE(ids); let res2 = await InstrumentInfo.apiNursingLog.getStatiCDE(ids);
let nursingData=JSON.parse(res2.data.data.nursingData) let nursingData = JSON.parse(res2.data.data.nursingData)
let obj = {
let obj ={ modeName: res2.data.data.modeName,
modeName:res2.data.data.modeName, data: nursingData
data:nursingData }
}
let report = false; let report = false;
go( go(
"/recoding/pages/face_report_one/face_report_one?id=" + "/recoding/pages/face_report_one/face_report_one?id=" +
item.id + item.id +
"&report=" + "&report=" +
report+ "&obj=" + report + "&obj=" +
JSON.stringify(obj) JSON.stringify(obj)
); );
}; };
// 打开第二种类型 // 打开第二种类型
@ -342,15 +340,15 @@ export default class Recording extends Component<any, any> {
let report = false; let report = false;
go( go(
"/recoding/pages/face_report/face_report?id=" + "/recoding/pages/face_report/face_report?id=" +
item.id + item.id +
"&recordId=" + item.instrumentId+ "&recordId=" + item.instrumentId +
"&report=" + "&report=" +
report report
); );
}; };
// 打开第三种类型 // 打开第三种类型
three = async (item) => { three = async (item) => {
go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${item.nursingData}&date=${item.createTime}&modeId=${item.modeId}&id=${item.instrumentId}`); go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${item.nursingData}&date=${item.createTime}&modeId=${item.modeId}&id=${item.instrumentId}`);
}; };
// 打开其他类型 // 打开其他类型

Loading…
Cancel
Save