qsj 2 years ago
commit 557fb4226c

@ -63,13 +63,14 @@ export const fr200DeviceControlCommand = {
* face: "01", 面部
* eyes: "02", 眼部
*
* nasolabialFold: "03", 法令纹
* mandibularLine: "04", 下颌线
* nasolabialFold: "03", 法令纹Pro
* mandibularLine: "04", 下颌线Pro
* led: "05", led
* headLiftingPro: "09", 抬头纹Pro
*
* moistureTest: "06", 水分测试
* maskPenetration: "07",面膜促渗
* essence: "08", 精华模式
* headLiftingPro: "09", 抬头纹Pro
*
* neck: "0A", 颈纹
* partition: "11", 分区模式 废弃VM1001

@ -347,7 +347,7 @@ class Instrument extends Component<any, any> {
// this.openBindingVisible();
msg("绑定成功");
setTimeout(() => {
setStorageSync("instrument_detail", JSON.stringify(channelInfo));
setStorageSync("instrument_detail", channelInfo);
this.getInstrumentIntroInfo(channelInfo.id);
}, 500);
} else if (code === 202) {
@ -384,6 +384,7 @@ class Instrument extends Component<any, any> {
Taro.setStorageSync("isScan", true);
Taro.setStorageSync("serial", channelInfo.serialCode);
Taro.switchTab({ url: "/pages/index/index" });
return;
// this.openBindingVisible();
} else if (res.data.code === 202) {
this.changeBindBox();
@ -414,7 +415,7 @@ class Instrument extends Component<any, any> {
this.setState({ isVisibleBinding: false });
msg("绑定成功");
setTimeout(() => {
setStorageSync("instrument_detail", JSON.stringify(channelInfo));
setStorageSync("instrument_detail", channelInfo);
this.getInstrumentIntroInfo(channelInfo.id);
}, 500);
} else if (res.data.code === 202) {
@ -444,7 +445,7 @@ class Instrument extends Component<any, any> {
if (data.code === 200) {
msg("换绑成功");
setTimeout(() => {
setStorageSync("instrument_detail", JSON.stringify(channelInfo));
setStorageSync("instrument_detail", channelInfo);
this.getInstrumentIntroInfo(channelInfo.id);
}, 500);
}
@ -457,7 +458,7 @@ class Instrument extends Component<any, any> {
});
if (res.data.code === 200) {
if (res.data.data.length > 0) {
go("/instrument/pages/instrument/intro??customBack=true&id=" + id);
go("/instrument/pages/instrument/intro?customBack=true&id=" + id);
} else {
Taro.switchTab({ url: "/pages/index/index" });
}

@ -67,6 +67,7 @@ class Intro extends Component<any, any> {
}
componentDidMount() {
let strObj = getStorageSync("instrument_detail");
console.log("strObj", strObj);
if (strObj) {
let instrument = strObj;
this.getInstrumentInfo(instrument.id);

@ -143,6 +143,8 @@ class IotCarePlanFR200 extends Component<any, any> {
/** 护理过程 END*/
// 模式列表
TestModeStepIndex: 0,
currentWorkModeType: 1,
isModeLock: false, // 模式是否锁定
isSwitchActiveMode: false, // 是否显示弹窗切换模式
ModeList: [],
@ -232,9 +234,7 @@ class IotCarePlanFR200 extends Component<any, any> {
console.log(option,'跳转过来的数据');
if (option.modeId) {
this.setState({ activeModeID: option.modeId })
setTimeout(() => {
console.log(this.state,'查看');
})
}
// 保持屏幕常亮
Taro.setKeepScreenOn({
@ -245,9 +245,9 @@ class IotCarePlanFR200 extends Component<any, any> {
this.getInstrumentClockDetail();
}
componentDidMount() { }
componentDidMount() {}
componentWillUnmount() { }
componentWillUnmount() {}
componentDidShow() {
console.log("页面显示了");
@ -370,6 +370,7 @@ class IotCarePlanFR200 extends Component<any, any> {
});
};
// 获取模式列表
GetModeList = async (id) => {
let params = {
instrumentId: id,
@ -379,7 +380,6 @@ class IotCarePlanFR200 extends Component<any, any> {
if (res.data.code === 200) {
if (res.data.data.length > 0) {
this.setState({
ActiveModeItem: res.data.data[0],
ModeList: res.data.data,
});
@ -432,7 +432,9 @@ class IotCarePlanFR200 extends Component<any, any> {
}, 0);
}
/** 选中护理模式 */
/**
* @name /
* */
modeCurrentFun = async (data, isNotCheck = false) => {
let { isShowNurse,activeModeID } = this.state;
// 护理检查改变模式,是否提示切换护理模式
@ -461,15 +463,27 @@ class IotCarePlanFR200 extends Component<any, any> {
}
let currentTime = data.modeTimeStr;
// 根据模式,动态设置底部按钮样式
let currentWorkModeType = 1;
if (data.modeType === "moistureTest") {
currentWorkModeType = 3;
} else if (
data.modeType === "maskPenetration" ||
data.modeType === "essence"
) {
currentWorkModeType = 2;
}
this.setState({
ActiveModeItem: data,
activeModeID: data.id,
ModeID: "mode_" + data.id,
currentServiceData,
ModeStepIndex: 0,
currentTime,
ModeType: this.ModeTypeArray[data.modeClass],
currentTime,
currentWorkModeType,
});
setTimeout(() => {
@ -593,12 +607,12 @@ class IotCarePlanFR200 extends Component<any, any> {
onStartNurse = async () => {
this.stepNext();
setTimeout(() => {
this.onNursingTap();
// 倒计时弹窗: 倒计时完成后,自动开始,并判断弹窗
let downNum = CountDownTime[this.state.ActiveModeItem.modeType] || 3;
this.showCountdownFun(downNum, () => { });
}, 500);
setTimeout(() => {
this.onNursingTap();
// // 倒计时弹窗: 倒计时完成后,自动开始,并判断弹窗
// let downNum = CountDownTime[this.state.ActiveModeItem.modeType] || 3;
// this.showCountdownFun(downNum, () => {});
}, 500);
// 如果检查失败,则报错
this.onEmitErrorTips();
@ -618,7 +632,7 @@ class IotCarePlanFR200 extends Component<any, any> {
};
// 绘制能量图
drawProwerPicture() { }
drawProwerPicture() {}
/** 切换光照 */
onSwitchChange = async () => {
@ -731,6 +745,18 @@ class IotCarePlanFR200 extends Component<any, any> {
case "working":
//设备的运行中状态
console.log("设备状态同步 运行中状态", jsonStatus);
if (jsonStatus.workMode === "moistureTest") {
// 水分测试
// teststatus:success
}
// 脸部模式
if (jsonStatus.workMode === "face") {
// impedance
// totalWorkingMinutes: 0
// totalWorkingSeconds: 24
}
// this.judgementWorkStatus(
// MODE_WORKING_ENUM.WORKING,
// jsonStatus.workMode
@ -1207,9 +1233,11 @@ class IotCarePlanFR200 extends Component<any, any> {
};
// 水分测试需要特殊处理
// 水分测试准备 水分测试工作 水分测试启动
if (ActiveModeItem.modeType === "moistureTest") {
sendParams.testStatus = "standby"; // 切换为准备
if (isBtnClick) {
// 水分测试启动
sendParams.testStatus = "start"; // 点击开始再开始
}
}
@ -1480,7 +1508,10 @@ class IotCarePlanFR200 extends Component<any, any> {
/** 获取小程序本地缓存的历史记录 */
getFR200NursingHistory() {
this.FR200NursingHistory = Taro.getStorageSync("FR200NursingHistory");
console.log(this.FR200NursingHistory, '获取本地数据++++++++++++++++++++++++++++++++++++++++++');
console.log(
this.FR200NursingHistory,
"获取本地数据++++++++++++++++++++++++++++++++++++++++++"
);
// 是否同步历史记录
let isSyncHistory = Taro.getStorageSync("isSyncHistory");
@ -1557,6 +1588,11 @@ class IotCarePlanFR200 extends Component<any, any> {
}
Taro.setStorageSync("FR200NursingHistory", params);
console.log("更新updateFR200NursingHistory");
// 基础模式可在这里调用函数更新图标Echarts
// 最新一条数据jsonStatus
// 注意事项只拿working状态
// todo
} else {
this.setFR200NursingHistory(jsonStatus);
}
@ -1595,29 +1631,31 @@ class IotCarePlanFR200 extends Component<any, any> {
todoPromise = async () => {
const nowFR200NursingHistory = Taro.getStorageSync("FR200NursingHistory");
// 护理脸部
if (nowFR200NursingHistory.workMode === 'face') {
if (nowFR200NursingHistory.workMode === "face") {
// 把working=工作中的状态数据筛选出来
let filtered = nowFR200NursingHistory.dataArray.filter(item => item.workStatus === 'working');
let filtered = nowFR200NursingHistory.dataArray.filter(
(item) => item.workStatus === "working"
);
// 能量发数
filtered = filtered.slice(0, 360);
// 脸部能量
let faceEnergy = 0
filtered.forEach(item => {
faceEnergy += item.joulePerSecond
})
let faceEnergy = 0;
filtered.forEach((item) => {
faceEnergy += item.joulePerSecond;
});
// 计算平均数
// let sum = filtered.reduce((accumulator, currentValue) => accumulator + currentValue.impedance, 0);
// let average = sum / filtered.length;
// 最大
let max: any = Math.max(...filtered.map(item => item.impedance));
max = this.determineTier(max)
let max: any = Math.max(...filtered.map((item) => item.impedance));
max = this.determineTier(max);
// 最小
let min: any = Math.min(...filtered.map(item => item.impedance));
min = this.determineTier(min)
let min: any = Math.min(...filtered.map((item) => item.impedance));
min = this.determineTier(min);
// 平均数最大等级处于2
let average: any = max / 2
average = this.determineTier(average)
let average: any = max / 2;
average = this.determineTier(average);
// 能量图里面的图谱每10秒为一个数组
// 创建一个空数组用于存储分组后的结果
@ -1629,14 +1667,14 @@ class IotCarePlanFR200 extends Component<any, any> {
let group = filtered.slice(i, i + 10);
// 找到组中最大的 name 值
let maxName = Math.max(...group.map(obj => obj.impedance));
let maxName = Math.max(...group.map((obj) => obj.impedance));
// 计算并存储每组的平均数
let average:any = this.determineTier(maxName / 2);
let average: any = this.determineTier(maxName / 2);
// let average = maxName / 2;
if(average >=1) {
average=average-1
average=average *10
if (average >= 1) {
average = average - 1;
average = average * 10;
}
// 将包含该组对象和平均数的对象添加到 groupedAa 数组中
groupedAa.push(average);
@ -1645,30 +1683,35 @@ class IotCarePlanFR200 extends Component<any, any> {
let nursingData = {
// nursingTime:result,
nursingData: JSON.stringify({
faceEnergy, max, min, average, groupedAa, filtered: filtered.length, workMode: nowFR200NursingHistory.workMode
})
}
faceEnergy,
max,
min,
average,
groupedAa,
filtered: filtered.length,
workMode: nowFR200NursingHistory.workMode,
}),
};
return nursingData
return nursingData;
} else {
let GearData = this.state.GearData;
// 肌肤报告
let Allnum = 0
GearData.forEach(e => {
Allnum = +e.forehead
let Allnum = 0;
GearData.forEach((e) => {
Allnum = +e.forehead;
});
// 向下取整
Allnum = Math.floor(Allnum / 3);
let nursingData = {
nursingData: JSON.stringify({
Allnum, GearData
})
}
return nursingData
Allnum,
GearData,
}),
};
return nursingData;
}
}
};
// 计算挡位
determineTier = (sun) => {
@ -1683,8 +1726,8 @@ class IotCarePlanFR200 extends Component<any, any> {
}
// 如果 sun 不在任何一档范围内,返回默认档或处理错误
return '10';
}
return "10";
};
/** 提交护理记录:完成护理后自动调用,会跳转页面 */
PostNursingLogClock = async (data: any = null, isJump = true) => {
// todo 建议写一个Promise异步函数用 await 执行,在提交前处理好数据
@ -1695,19 +1738,17 @@ class IotCarePlanFR200 extends Component<any, any> {
if (data) {
params = data;
} else {
params = {
instrumentId: currentDevice.id,
instrumentName: currentDevice.name,
modeId: ActiveModeItem.id,
modeName: ActiveModeItem.modeName,
nursingTime: s_to_hms(this.elapsedTime),
};
}
let res1: any = await this.todoPromise()
console.log(res1, '查看返回数据');
params = { ...params, ...res1 }
let res1: any = await this.todoPromise();
console.log(res1, "查看返回数据");
params = { ...params, ...res1 };
let res: any = await InstrumentInfo.apiNursingLog.addLog(params);
console.log("PostNursingLogClock", res);
if (res.data.code === 200) {
@ -1728,7 +1769,6 @@ class IotCarePlanFR200 extends Component<any, any> {
isShowNursingSuccess: false,
});
this.goFaceReport(res1, ActiveModeItem.id); // 跳转
}, 2000);
}
@ -1886,30 +1926,36 @@ class IotCarePlanFR200 extends Component<any, any> {
/** 完成护理提交:跳转护理报告页 */
goFaceReport = (data, id) => {
let nursingData = JSON.parse(data.nursingData)
let nursingData = JSON.parse(data.nursingData);
// 跳转前置空定时器,防止重复提交
if (currentTimeTimer) clearInterval(currentTimeTimer);
if (['face', 'eyes', 'nasolabialFold', 'mandibularLine', 'headLiftingPro'].includes(nursingData.workMode)) {
if (
[
"face",
"eyes",
"nasolabialFold",
"mandibularLine",
"headLiftingPro",
].includes(nursingData.workMode)
) {
let obj = {
modeName: nursingData.modeName,
data: nursingData
}
data: nursingData,
};
let report = true;
go(
"/recoding/pages/face_report_one/face_report_one?id=" +
id +
"&report=" +
report + "&obj=" +
JSON.stringify(obj)
id +
"&report=" +
report +
"&obj=" +
JSON.stringify(obj)
);
} else if ('moistureTest' === nursingData.workMode) {
console.log('水分测试');
} else if ("moistureTest" === nursingData.workMode) {
console.log("水分测试");
} else {
go("/pages/face_report/face_report?id=" + this.state.currentDevice.id);
}
};
// 完成配对
@ -2011,6 +2057,7 @@ class IotCarePlanFR200 extends Component<any, any> {
ModeStepIndex,
currentServiceData,
ActiveModeItem,
currentWorkModeType,
isSwitchActiveMode,
ModeID,
activeModeID,
@ -2035,6 +2082,7 @@ class IotCarePlanFR200 extends Component<any, any> {
isRuningTest,
isShowHistoryMsg,
isModeLock,
TestModeStepIndex,
} = this.state;
return (
@ -2180,9 +2228,9 @@ class IotCarePlanFR200 extends Component<any, any> {
deviceInfo={currentDevice}
close={this.connectionClose}
isDisconnect={!isConnectionBlutoot}
offlineChange={() => { }}
offlineChange={() => {}}
pairingChange={this.pairingChange}
upgradeFun={() => { }}
upgradeFun={() => {}}
/>
)}
@ -2278,12 +2326,15 @@ class IotCarePlanFR200 extends Component<any, any> {
)}
{ActiveModeItem.modeType === "moistureTest" && (
<WaterTest></WaterTest>
<WaterTest
isRuningTest={isRuningTest}
TestModeStepIndex={TestModeStepIndex}
></WaterTest>
)}
</View>
<Footer
currentWorkMode={ActiveModeItem.modeType}
currentWorkModeType={currentWorkModeType}
isRuningTest={isRuningTest}
isStopNurse={isStopNurse}
onEmitStartNurse={this.onStartNurse}

@ -3,7 +3,7 @@ import "./FR200.less";
interface Props {
// isShowNurse: boolean;
currentWorkMode: string; // 当前工作模式
currentWorkModeType: number; // 当前工作模式 1基础脸部等只有结束按钮 2.促渗,可以开始暂停和结束 3.水分测试
isStopNurse: boolean;
isRuningTest: boolean; // 是否在运行测试
onEmitStartNurse: Function; // 每次点击item回调事件和数据给父组件
@ -11,7 +11,7 @@ interface Props {
onEmitEndPlan: Function;
}
function Index({
currentWorkMode,
currentWorkModeType,
isStopNurse,
isRuningTest,
onEmitStartNurse,
@ -33,7 +33,7 @@ function Index({
return (
<Block>
<View className="iot-footer">
{currentWorkMode === "moistureTest" && (
{currentWorkModeType === 3 && (
<Block>
{!isRuningTest ? (
<View className="btn " onClick={onStartNurse}>
@ -45,7 +45,7 @@ function Index({
</Block>
)}
{currentWorkMode !== "moistureTest" && (
{currentWorkModeType === 2 && (
<View className="switch-btn-box">
<View className="btn-item border-right" onClick={onSwitchChange}>
{isStopNurse ? (
@ -79,6 +79,19 @@ function Index({
</View>
</View>
)}
{currentWorkModeType === 1 && (
<View className="switch-btn-box">
<View className="btn-item" onClick={onEndPlan}>
<Image
className="btn-icon"
src={require("@/img/iot/over_nurse.png")}
mode="aspectFill"
/>
<Text className="btn-text"></Text>
</View>
</View>
)}
</View>
</Block>
);

@ -6,12 +6,11 @@ import { Popup, Progress, Slider } from "@antmjs/vantui";
import "./index.less";
interface Props {
Electricity: any;
matrixElectricity: any;
facialMaskConnectStatus: any;
isRuningTest: boolean; // 是否已开始水分测试
TestModeStepIndex: number; // 当前测试步骤
}
function Index() {
function Index(isRuningTest, TestModeStepIndex) {
const stepIndex = 0;
const testIndex = 1;
@ -33,53 +32,56 @@ function Index() {
},
];
return (
<Block>
<View>
<View className='water_test'>
<View className='test_step flex aitems sb'>
<Block>
<View>
{!isRuningTest && (
<View className="water_test">
<View className="test_step flex aitems sb">
{stepList.map((item, index) => {
return (
<View className='step_block flex aitems' key={index}>
<View className='step_top flex aitems'>
<View className='drop'></View>
<View className='step_num'>{item.value}</View>
{index != 2 && <View className='line'></View>}
<View className="step_block flex aitems" key={index}>
<View className="step_top flex aitems">
<View className="drop"></View>
<View className="step_num">{item.value}</View>
{index != 2 && <View className="line"></View>}
</View>
<View className='step_name'>{item.name}</View>
<View className="step_name">{item.name}</View>
</View>
);
})}
</View>
<View className='test_txt'>
<View className="test_txt">
</View>
</View>
)}
<View className='testing'>
<View className='testing_header flex aitems'>
{isRuningTest && (
<View className="testing">
<View className="testing_header flex aitems">
{stepList.map((item, index) => {
return (
<View
className='items flex aitems jcenter'
className="items flex aitems jcenter"
key={index}
style={stepIndex == index ? "background: #fff" : ""}
>
{stepIndex > index && (
<Image
className='finish_img'
className="finish_img"
src={require("@/img/full-scran.png")}
mode='aspectFill'
mode="aspectFill"
></Image>
)}
<View className='value'>{item.value}</View>
<View className='name'>{item.name}</View>
<View className="value">{item.value}</View>
<View className="name">{item.name}</View>
</View>
);
})}
</View>
<View className='testing_content'>
<View className='progress_box flex aitems'>
<View className='title'>
<View className="testing_content">
<View className="progress_box flex aitems">
<View className="title">
{stepList[stepIndex].name + "水分测试"}
</View>
{/* <view class='progress_block flex aitems'> */}
@ -87,22 +89,22 @@ function Index() {
style={{
width: "300rpx",
}}
percentage='80'
strokeWidth='14'
percentage="80"
strokeWidth="14"
showPivot={false}
color='#C2E5F3'
color="#C2E5F3"
></Progress>
{stepList[stepIndex].finish && 80 >= 99 ? (
<Image
className='finish_img'
className="finish_img"
src={require("@/img/finished.png")}
mode='aspectFill'
mode="aspectFill"
></Image>
) : (
<Image
className='finish_img'
className="finish_img"
src={require("@/img/no-finish.png")}
mode='aspectFill'
mode="aspectFill"
></Image>
)}
{/* </view> */}
@ -110,7 +112,7 @@ function Index() {
{/* <view class='tips' wx:if='{{!finish}}'> */}
{/* 请参考视频指引,将仪器紧贴<text style='color: #000000'>额头区域</text> */}
{/* </view> */}
<View className='tips flex sb'>
<View className="tips flex sb">
<View>
{(testIndex == 1 || testIndex == 2 || testIndex == 4) && (
@ -129,10 +131,9 @@ function Index() {
</View>
</View>
</View>
</View>
</Block>
)}
</View>
</Block>
);
}

@ -674,11 +674,8 @@ class Index extends Component<any, any> {
}
// 0已绑定 1未绑定 2已解绑
if (instrumentInfo.bindingStatus === 0) {
setTimeout(() => {
this.isBindingSerial();
}, 100);
let isBind = this.state.instrumentList.find(
(item) => item.id === instrumentInfo.id
(item) => item.id === instrumentInfo.instrumentId
);
if (isBind) {
msg("序列号已绑定");
@ -688,7 +685,6 @@ class Index extends Component<any, any> {
BeforeBindingErrorText: "序列号已被其他用户绑定",
});
}
return;
} else if (
instrumentInfo.bindingStatus === 1 ||
@ -749,7 +745,7 @@ class Index extends Component<any, any> {
msg("绑定成功");
let obj = unbindingInstrumentList.find(
(item) => item.id === instrumentInfo.id
(item) => item.id === instrumentInfo.instrumentId
);
if (obj) {
setStorageSync("instrument_detail", obj);
@ -757,8 +753,8 @@ class Index extends Component<any, any> {
setTimeout(() => {
// 绑定成功后,先查询设备介绍页,有数据则跳转,没数据则刷新已绑定数据
this.getInstrumentIntroInfo(instrumentInfo.id);
}, 1000);
this.getInstrumentIntroInfo(instrumentInfo.instrumentId);
}, 500);
return;
} else if (data.code === 204) {
this.setState({
@ -780,9 +776,10 @@ class Index extends Component<any, any> {
let res = await InstrumentInfo.instructionInfo({
instrumentId: id,
});
console.log("res", res);
if (res.data.code === 200) {
if (res.data.data.length > 0) {
go("/instrument/pages/instrument/intro??customBack=true&id=" + id);
go("/instrument/pages/instrument/intro?customBack=true&id=" + id);
} else {
this.bindingInstrumentList();
}
@ -804,8 +801,13 @@ class Index extends Component<any, any> {
if (data.code === 200) {
msg("换绑成功");
setTimeout(() => {
setStorageSync("instrument_detail", JSON.stringify(instrumentInfo));
this.getInstrumentIntroInfo(instrumentInfo.id);
let obj = this.state.unbindingInstrumentList.find(
(item) => item.id === instrumentInfo.instrumentId
);
if (obj) {
setStorageSync("instrument_detail", obj);
}
this.getInstrumentIntroInfo(instrumentInfo.instrumentId);
}, 500);
}
};

@ -16,7 +16,6 @@ page {
color: #666;
padding: 0 32rpx;
position: sticky;
top: 174rpx;
z-index: 9;
}
@ -74,8 +73,6 @@ page {
background: #f8f8f8;
padding-top: 25rpx;
padding-bottom: 29rpx;
position: sticky;
top: 286rpx;
z-index: 9;
}

@ -61,6 +61,8 @@ export default class Recording extends Component<any, any> {
clockImageList: [],
clockContent: "",
},
navigationBarHeight: '',
statusBarHeight: ''
};
}
@ -267,13 +269,16 @@ export default class Recording extends Component<any, any> {
this.getLatestClockRecord();
this.getClockStatistics();
this.DayTime();
this.setStatusBar();
}
componentDidShow() { }
componentDidHide() { }
async initData() { }
async initData() {
}
// 选择年份
onChangeYear(event) {
this.setState({ year: event.detail.value });
@ -410,6 +415,25 @@ export default class Recording extends Component<any, any> {
delta: 1,
});
}
setStatusBar() {
Taro.getSystemInfoAsync({
success: (res) => {
const statusBarHeight = res.statusBarHeight || 0;
// 获取微信胶囊的位置信息 width,height,top,right,left,bottom
const custom = Taro.getMenuButtonBoundingClientRect();
// 导航栏高度(标题栏高度) = 胶囊高度 + (顶部距离 - 状态栏高度) * 2
const navigationBarHeight =
custom.height + (custom.top - statusBarHeight) * 2;
this.setState({
statusBarHeight,
navigationBarHeight,
});
},
});
}
render() {
let {
current,
@ -427,12 +451,19 @@ export default class Recording extends Component<any, any> {
monthTime,
show,
punchInInfo,
navigationBarHeight,
statusBarHeight
} = this.state;
const statusBarHeightRpx = statusBarHeight * 2;
const navigationBarHeightRpx = navigationBarHeight * 2;
const height = statusBarHeightRpx + navigationBarHeightRpx
return (
<Block>
<Navbar isBack titleSlot="护理记录"></Navbar>
<View className="tabs">
<Navbar isBack titleSlot='护理记录'></Navbar>
<View className='tabs' style={{
top: height + "rpx", position: 'sticky'
}}
>
<View
className={classnames("tab", {
tab_active: current === 0,
@ -453,7 +484,10 @@ export default class Recording extends Component<any, any> {
</View>
</View>
{current === 0 && (
<ScrollView className="products_list" scroll-x="true">
<ScrollView className='products_list' scroll-x='true' style={{
top: height + 110 + 'rpx', position: 'sticky'
}}
>
<View
className={classnames("all", {
products_item_active: !curIndex,
@ -471,11 +505,11 @@ export default class Recording extends Component<any, any> {
onClick={this.onChangeProduct.bind(this, item.id)}
>
<Image
className="products_cover"
className='products_cover'
src={item.logo}
mode="aspectFill"
mode='aspectFill'
></Image>
<View className="products_title">{item.name}</View>
<View className='products_title'>{item.name}</View>
</View>
))}
</ScrollView>
@ -483,17 +517,17 @@ export default class Recording extends Component<any, any> {
{current === 0 && recordList.length === 0 && (
<View>
<View className="nodata">
<View className='nodata'>
<Image
className="nodata_img"
className='nodata_img'
src={require("@/img/nodata.png")}
></Image>
<View className="nodata_text"></View>
<View className='nodata_text'></View>
</View>
</View>
)}
{current === 0 && (
<View style="padding-bottom:200px">
<View style='padding-bottom:200px'>
{/* <View className='instrument_item' >
<View className='instrument_top flex sb aitems'>
<View className='time_box flex aitems'>
@ -520,12 +554,12 @@ export default class Recording extends Component<any, any> {
</View>
</View> */}
<View className="instrument_list ">
<View className='instrument_list '>
{recordList.map((item: any, index: any) => (
<View className="recording-box" key={item.id}>
<View className="box-top">
<View className="top-left">
<View className="date">{item.createTime}</View>
<View className='recording-box' key={item.id}>
<View className='box-top'>
<View className='top-left'>
<View className='date'>{item.createTime}</View>
<View
className={classnames("tip", {
tag_active: item.online === 2,
@ -536,7 +570,7 @@ export default class Recording extends Component<any, any> {
</View>
{item.instrumentType === 2 && (
<View
className="top-right"
className='top-right'
onClick={this.toReport.bind(
this,
item.instrumentId,
@ -546,23 +580,23 @@ export default class Recording extends Component<any, any> {
>
<Image
className="arrow_icon"
className='arrow_icon'
src={require("@/img/index/right.png")}
mode="aspectFill"
mode='aspectFill'
></Image>
</View>
)}
</View>
<View className="box-bottom">
<View className='box-bottom'>
<Image
className="recording_img"
className='recording_img'
src={item.modeImage}
></Image>
<View className="bottom-right">
<View className="title">{item.instrumentName}</View>
<View className="subtitle-box">
<View className="subtitle">{item.modeName}</View>
<View className="subtitle">
<View className='bottom-right'>
<View className='title'>{item.instrumentName}</View>
<View className='subtitle-box'>
<View className='subtitle'>{item.modeName}</View>
<View className='subtitle'>
{item.nursingTime}
</View>
</View>
@ -574,7 +608,7 @@ export default class Recording extends Component<any, any> {
</View>
)}
{current === 1 && (
<View style="padding-bottom:200px">
<View style='padding-bottom:200px'>
{/* <View className='nodata'>
<Image
className='nodata_img'
@ -582,52 +616,52 @@ export default class Recording extends Component<any, any> {
></Image>
<View className='nodata_text'></View>
</View> */}
<View style="height: 30rpx; background: #F8F8F8"></View>
<View className="clock_in_statistics m-x-30 flex sb">
<View className="flex sb ab">
<View className="clock_in_statistics_title"></View>
<View style='height: 30rpx; background: #F8F8F8'></View>
<View className='clock_in_statistics m-x-30 flex sb'>
<View className='flex sb ab'>
<View className='clock_in_statistics_title'></View>
<Picker
mode="date"
fields="year"
mode='date'
fields='year'
onChange={this.onChangeYear.bind(this)}
value="{{year}}"
end="{{today}}"
value='{{year}}'
end='{{today}}'
>
<View className="clock_in_statistics_date flex aitems">
<View className='clock_in_statistics_date flex aitems'>
<View>{year}</View>
<Image
className="more_icon"
className='more_icon'
src={require("@/img/arrow-down.png")}
mode="widthFix"
mode='widthFix'
></Image>
</View>
</Picker>
</View>
<View className="chart flex sb">
<View className='chart flex sb'>
{monthTime.map((item) => (
<View className="flex fc aitems" key={item.month}>
<View className='flex fc aitems' key={item.month}>
{item.time > 0 && (
<View className="buoy">{item.time}</View>
<View className='buoy'>{item.time}</View>
)}
<View
className="column"
className='column'
style={{ height: `calc(186/31*${item.time}rpx)` }}
></View>
<View className="month">{item.month}</View>
<View className='month'>{item.month}</View>
</View>
))}
</View>
</View>
<View style="padding-bottom: env(safe-area-inset-bottom)">
<View className="month_box m-x-30">
<View style='padding-bottom: env(safe-area-inset-bottom)'>
<View className='month_box m-x-30'>
{clockStatistics.map((item) => (
<View className="month_statistics" key={item.id}>
<View className="flex aitems sb">
<View className="time">
<View className='month_statistics' key={item.id}>
<View className='flex aitems sb'>
<View className='time'>
{item.year}{item.month}
</View>
<View
className="more_box flex aitems"
className='more_box flex aitems'
onClick={this.onChangeMore.bind(
this,
item.id,
@ -635,7 +669,7 @@ export default class Recording extends Component<any, any> {
item.month
)}
>
<View className="more_text">
<View className='more_text'>
{" "}
{!item.isMore ? "展开更多" : "收起更多"}
</View>
@ -645,51 +679,51 @@ export default class Recording extends Component<any, any> {
? "rotate(180deg)"
: "rotate(0deg)",
}}
className="more_icon"
className='more_icon'
src={require("@/img/arrow-down.png")}
mode="widthFix"
mode='widthFix'
></Image>
</View>
</View>
<View style="height: 59rpx"></View>
<View className="statistic">
<View className="statistic_item">
<View className="statistic_num">{item.clockNum}</View>
<View className="statistic_desc"></View>
<View style='height: 59rpx'></View>
<View className='statistic'>
<View className='statistic_item'>
<View className='statistic_num'>{item.clockNum}</View>
<View className='statistic_desc'></View>
</View>
<View className="statistic_item">
<View className="statistic_num">
<View className='statistic_item'>
<View className='statistic_num'>
{(item.percentage * 100).toFixed(2)}%
</View>
<View className="statistic_desc"></View>
<View className='statistic_desc'></View>
</View>
<View className="border"></View>
<View className='border'></View>
</View>
{item.isMore && item.detail && (
<View>
{item.detail.map((obj) => (
<View key={obj.id}>
<View style="height: 57rpx"></View>
<View className="month_item">
<View className="month_item_date">
<View style='height: 57rpx'></View>
<View className='month_item'>
<View className='month_item_date'>
{obj.updateTime}
</View>
<View className="month_image_box flex sb">
<View className='month_image_box flex sb'>
{obj.clockImg.map((img) => (
<Image
key={img}
className="month_item_cover"
className='month_item_cover'
src={img}
></Image>
))}
</View>
<View className="month_item_date">
<View className='month_item_date'>
{/* 小紫弹智能射频仪、花至抗老射频仪PRO{" "} */}
{obj.instrumentName === null
? ""
: obj.instrumentName}
</View>
<View className="month_item_note">
<View className='month_item_note'>
{obj.clockContent}
</View>
</View>
@ -704,8 +738,8 @@ export default class Recording extends Component<any, any> {
</View>
)}
{!clockShow && ViewAddInstrument === "true" && (
<View className="footer flex aitems">
<View className="btn" onClick={this.setShow.bind(this, true)}>
<View className='footer flex aitems'>
<View className='btn' onClick={this.setShow.bind(this, true)}>
</View>
{/* <View className="text" onClick={this.back}>
@ -715,64 +749,64 @@ export default class Recording extends Component<any, any> {
)}
<Popup show={show} onClose={() => this.setState({ show: false })}>
<View className="popBox">
<View className='popBox'>
<Image
className="close_icon"
className='close_icon'
src={require("@/img/close.png")}
mode="widthFix"
mode='widthFix'
onClick={this.setShow.bind(this, false)}
></Image>
<View className="popTitle"></View>
<View className="popSubtitle">
<View className='popTitle'></View>
<View className='popSubtitle'>
<View className="bold">{clockStatistics[0]?.clockNum}</View>{" "}
<View className='bold'>{clockStatistics[0]?.clockNum}</View>{" "}
<View className="bold">
<View className='bold'>
{(clockStatistics[0]?.percentage * 100).toFixed(1)}%
</View>
</View>
<View className="img_box">
<View className='img_box'>
{punchInInfo.clockImageList.map((item, index) => (
<View key={item} className="img">
<Image className="showImg" src={item} mode="widthFix"></Image>
<View key={item} className='img'>
<Image className='showImg' src={item} mode='widthFix'></Image>
<Image
className="closeImg"
className='closeImg'
src={require("@/img/close1.png")}
mode="widthFix"
mode='widthFix'
onClick={this.delImg.bind(this, index)}
></Image>
</View>
))}
{punchInInfo.clockImageList.length < 3 && (
<View
className="addBox"
className='addBox'
onClick={this.handleChooseImage.bind(this)}
>
<Image
className="showImg"
className='showImg'
src={require("@/img/clock_in_upload/add-image.png")}
mode="widthFix"
mode='widthFix'
></Image>
</View>
)}
</View>
<View className="info4">
<View className="content">
<View className='info4'>
<View className='content'>
<Textarea
placeholderStyle="color: #ccc; font-size: 26rpx;font-weight: 400;font-family: PingFang SC;"
placeholder="请记录一下今天的护理心得吧"
placeholderStyle='color: #ccc; font-size: 26rpx;font-weight: 400;font-family: PingFang SC;'
placeholder='请记录一下今天的护理心得吧'
maxlength={120}
onInput={this.handleTextareaInput.bind(this)}
value={punchInInfo.clockContent}
></Textarea>
</View>
<View className="tip">
<View className='tip'>
{"" + (punchInInfo.clockContent.length || 0) + "/120"}
</View>
</View>
<View className="popbtnbox flex aitems jcenter">
<View className="btn1" onClick={this.submit.bind(this)}>
<View className='popbtnbox flex aitems jcenter'>
<View className='btn1' onClick={this.submit.bind(this)}>
</View>
</View>

Loading…
Cancel
Save