rongweikang 2 years ago
commit 1b4607ab01

@ -71,13 +71,15 @@ export default defineAppConfig({
navigationBarBackgroundColor: "#fff", navigationBarBackgroundColor: "#fff",
navigationBarTitleText: "WeChat", navigationBarTitleText: "WeChat",
navigationBarTextStyle: "black", navigationBarTextStyle: "black",
// pageOrientation: "auto",
// enablePullDownRefresh: true // enablePullDownRefresh: true
}, },
requiredPrivateInfos: ["getLocation"], requiredPrivateInfos: ["getLocation"],
subPackages: [ subPackages: [
{ {
root: "moduleIOT", root: "moduleIOT",
pages: ["pages/iotCarePlan/WL200", "pages/iotCarePlan/FR200"], pages: ["pages/iotCarePlan/WL200", "pages/iotCarePlan/FR200", "pages/iotCarePlan/WE200",],
}, },
{ {
root: "recoding", root: "recoding",

@ -124,7 +124,7 @@ class ConnectionBluetoot extends Component<any, any> {
// "FR200", // FR200 // "FR200", // FR200
], ],
currentDeviceType: "", // 现在的设备类型: WE200 WL200 currentDeviceType: "", // 现在的设备类型: WE200 WL200 FR200当设备为WL200时它还可能是WE200
}; };
} }

@ -0,0 +1,100 @@
/**蓝牙命令合集*/
export const we200BleCommand = {
/**发送配对码*/
match: {
commandType: "BleMatch",
bleCommandType: "SendMatchCode",
},
InfoQuery: {
/**查询版本指令*/
versionInfo: {
commandType: "InfoQuery",
infoQueryType: "versionInfo",
otaDeviceType: "FR200",
},
/**时间同步*/
timeSync: {
commandType: "InfoQuery",
infoQueryType: "timeSync",
date: new Date(),
},
/**查询离线记录概要*/
clockSummary: {
commandType: "InfoQuery",
infoQueryType: "offlineClockInInfo",
dataType: "summary",
},
/**查询离线明细第一条*/
clockDetail: {
commandType: "InfoQuery",
infoQueryType: "offlineClockInInfo",
dataType: "detail",
dataIndex: 0,
},
},
};
/**控制设备命令合集*/
export const we200DeviceControlCommand = {
/**查询设备状态指令*/
queryDeviceStatus: {
commandType: "DeviceStatusSync",
deviceSyncCommandType: "onlySyncStatusToDevice",
},
/**控制设备暂停 pause暂停 working启动 end关闭*/
pause: {
commandType: "DeviceControl",
workStatus: "pause",
},
standby: {
commandType: "DeviceControl",
workStatus: "standby",
},
end: {
commandType: "DeviceControl",
workStatus: "end",
},
/**
* '进入水分测试模式' = 'switchTestMode',
* '启动水分测试模式' = 'startTestMode',
*
* face: "01", 面部
* eyes: "02", 眼部
*
* nasolabialFold: "03", 法令纹Pro
* mandibularLine: "04", 下颌线Pro
* led: "05", led
* headLiftingPro: "09", 抬头纹Pro
*
* moistureTest: "06", 水分测试
* maskPenetration: "07",面膜促渗
* essence: "08", 精华模式
*
* neck: "0A", 颈纹
* partition: "11", 分区模式 废弃VM1001
* ignore: "255", 不改变/无模式
*/
// 普通工作模式
work: {
commandType: "DeviceControl",
workStatus: "working",
workMode: "ignore", // face
},
// 切换/进入水分测试
switchTestMode: {
commandType: "DeviceControl",
workStatus: "working",
workMode: "moistureTest",
testStatus: "standby",
},
// 启动水分测试
startTestMode: {
commandType: "DeviceControl",
workStatus: "working",
workMode: "moistureTest",
testStatus: "start",
},
};

@ -110,26 +110,69 @@ export default class DeviceConnectPopup extends Component<any, any> {
<View <View
className={classnames("common-popup-title", "margin-samll")} className={classnames("common-popup-title", "margin-samll")}
> >
{data.bluetoothConnectingTitle} {data.model === "WL200" && (
<Block>
{currentDeviceType !== "WE200"
? data.bluetoothConnectingTitle
: data.we200BluetoothConnectingTitle}
</Block>
)}
{data.model !== "WL200" && (
<Block>{data.bluetoothConnectingTitle}</Block>
)}
</View> </View>
<View className="device-popup-content-box"> <View className="device-popup-content-box">
{!this.isImage(data.bluetoothConnecting) ? ( {data.model === "WL200" && (
<Video <Block>
className="videos" {!this.isImage(data.bluetoothConnecting) ? (
autoplay <Video
loop className="videos"
objectFit="cover" autoplay
enablePlayGesture loop
showFullscreenBtn={false} objectFit="cover"
playBtnPosition="center" enablePlayGesture
src={encodeURIComponent(data.bluetoothConnecting)} showFullscreenBtn={false}
/> playBtnPosition="center"
) : ( src={
<Image currentDeviceType !== "WE200"
className="images" ? data.bluetoothConnecting
src={data.bluetoothConnecting} : data.we200BluetoothConnecting
mode="aspectFill" }
/> />
) : (
<Image
className="images"
src={
currentDeviceType !== "WE200"
? data.bluetoothConnecting
: data.we200BluetoothConnecting
}
mode="aspectFill"
/>
)}
</Block>
)}
{data.model !== "WL200" && (
<Block>
{!this.isImage(data.bluetoothConnecting) ? (
<Video
className="videos"
autoplay
loop
objectFit="cover"
enablePlayGesture
showFullscreenBtn={false}
playBtnPosition="center"
src={data.bluetoothConnecting}
/>
) : (
<Image
className="images"
src={data.bluetoothConnecting}
mode="aspectFill"
/>
)}
</Block>
)} )}
<View className="blue-device-tips"> <View className="blue-device-tips">

@ -191,10 +191,15 @@ export default class InstrumentClickInUpload extends Component<any, any> {
let { punchInInfo, instrumentDetail } = this.state; let { punchInInfo, instrumentDetail } = this.state;
let obj = punchInInfo; let obj = punchInInfo;
if (obj.clockImageList.length === 0) { if (obj.clockImageList.length === 0) {
msg("至少上传一张图片"); msg("至少上传一张图片!");
return;
}
if (!obj.clockContent) {
msg("请输入打卡心得!");
return; return;
} }
// 批量上传图片
let promiseTasks: any = []; let promiseTasks: any = [];
let imgList: any[] = []; let imgList: any[] = [];
obj.clockImageList.map((imgUrl: string) => { obj.clockImageList.map((imgUrl: string) => {
@ -226,6 +231,11 @@ export default class InstrumentClickInUpload extends Component<any, any> {
} }
} }
Taro.showLoading({
title: "请求中...",
mask: true,
});
let clockParmas = { let clockParmas = {
clockImageList: imgList, clockImageList: imgList,
clockContent: obj.clockContent, clockContent: obj.clockContent,
@ -238,8 +248,13 @@ export default class InstrumentClickInUpload extends Component<any, any> {
params params
); );
console.log(instrumentRes, "添加仪器成功"); console.log(instrumentRes, "添加仪器成功");
// 上传护理记录
await this.PostNursingLogClock();
// 上传打卡记录
let res = await InstrumentInfo.apiClock.postInsertClockLog(clockParmas); let res = await InstrumentInfo.apiClock.postInsertClockLog(clockParmas);
Taro.hideLoading();
// 打卡完成
if (res.data.code === 200) { if (res.data.code === 200) {
msg("打卡成功"); msg("打卡成功");
setTimeout(() => { setTimeout(() => {
@ -250,6 +265,32 @@ export default class InstrumentClickInUpload extends Component<any, any> {
} }
}; };
/** 提交护理记录 */
PostNursingLogClock = async (data: any = null) => {
let { instrumentDetail, currentInfo } = this.state;
let params = {
instrumentId: instrumentDetail.id,
instrumentName: instrumentDetail.name,
modeId: currentInfo.id,
modeName: currentInfo.modeName,
nursingTime: "00:01:00",
};
let res: any = await InstrumentInfo.apiNursingLog.addLog(params);
console.log("PostNursingLogClock", res);
if (res.data.code === 200) {
let params = {
instrumentId: instrumentDetail.id,
};
// 上传护理完成的仪器ID
let res = await InstrumentInfo.apiClock.addClockInstrument(params);
console.log(res, "护理完成");
}
};
/*** 护理记录 END ***/
onPlayTap = async () => { onPlayTap = async () => {
let { videoContext } = this.state; let { videoContext } = this.state;
videoContext.play(); videoContext.play();

@ -204,7 +204,7 @@ export default class InstrumentManage extends Component<any, any> {
<Block> <Block>
<View className="title"></View> <View className="title"></View>
<View className="scroll"> <View className="scroll">
<ScrollView scroll-x="true" className="un_bind_list"> <ScrollView scrollX={true} className="un_bind_list">
{unBindList.map((item, index) => { {unBindList.map((item, index) => {
if (item.status === 0) { if (item.status === 0) {
return ( return (

File diff suppressed because it is too large Load Diff

@ -0,0 +1,5 @@
export default definePageConfig({
navigationBarTitleText: '首页',
enablePullDownRefresh: false,
enablePageMeta: true
})

@ -0,0 +1 @@
@import url(./WL200.less);

File diff suppressed because it is too large Load Diff

@ -0,0 +1,357 @@
import Taro from "@tarojs/taro";
import { debounce } from "lodash";
import {
notifyBLECharacteristicValueChange,
sendCommand,
} from "@/utils/bluetoothWXAPI";
import {
deviceCommandSamples,
bleCommandSamples,
} from "@/components/bluetoot/connection/wl200";
/** 基础版:脸部/眼部/PRO 设备使用时,会自动开启暂停 */
const BaseModeType: string[] = [
"face",
"eyes",
"nasolabialFold",
"mandibularLine",
"headLiftingPro",
];
/**
* @name
* @description
*/
export default class BluetoothContainer {
bluetoothInfo: any;
deviceToolKitInstance: any;
that: any;
counter: number = 0; // 初始化后,同步执行次数
constructor(bluetoothInfo: any, deviceToolKitInstance: any, that: any) {
this.bluetoothInfo = bluetoothInfo;
this.deviceToolKitInstance = deviceToolKitInstance;
this.that = that;
}
/** @name 设备响应:待机 */
private syncStandby(jsonStatus) {
if (BaseModeType.includes(jsonStatus.workMode)) {
this.that.openTips("检测到您的设备没有紧贴肌肤,请紧贴肌肤");
}
}
/** @name 设备响应:工作 */
private syncWorking(jsonStatus) {
// 脸部模式
if (BaseModeType.includes(jsonStatus.workMode)) {
this.that.closeTips();
}
}
/** @name 设备响应:暂停 */
private syncPause(jsonStatus) {
if (BaseModeType.includes(jsonStatus.workMode)) {
this.that.openTips(
"检测到您的设备没有紧贴肌肤,请紧贴肌肤后重新尝试"
);
}
}
/** @name 查询信息响应 */
private InfoQuery = {
/** @name 设备响应:离线记录 */
syncOfflineClockInInfo: function (jsonStatus) {
console.log("离线记录", jsonStatus);
},
/** @name 设备响应:版本信息 */
syncVersionInfo: function (jsonStatus) {
console.log("版本信息", jsonStatus);
},
/** @name 设备响应:时间同步 */
syncTimeSync: function (jsonStatus) {
console.log("时间同步", jsonStatus);
}
}
/** @name 设备响应:通用状态响应 */
private syncCommonStatus(jsonStatus) {
// 1.判断是否水分测试
if (jsonStatus.workMode === "moistureTest") {
if (jsonStatus.testStatus === "success") {
let waterStepList = this.that.state.waterStepList;
// 到达第几个step
let waterStepIndex = this.that.state.waterStepIndex;
// 代表5秒以后最后拿到的结果
if (waterStepList[waterStepIndex].finish) {
// 获取等级
waterStepList[waterStepIndex].forehead =
jsonStatus.waterLevel;
// 检测完成
if (waterStepIndex === 2) {
this.that.setState({
isRuningTest: 4,
});
} else {
// 启动检测
this.that.setState({
isRuningTest: 1,
});
}
// 一共有3条数据
let num = waterStepIndex;
if (waterStepIndex < 2) {
num = waterStepIndex + 1;
this.that.waterTestNext(num);
}
this.that.setState({
waterStepIndex: num,
waterStepList,
});
}
} else {
let waterStepList = this.that.state.waterStepList;
let waterStepIndex = this.that.state.waterStepIndex;
// 5秒后获取的结果
if (waterStepList[waterStepIndex].finish) {
// 获取失败后把进度条清理0
waterStepList[waterStepIndex].schedule = 0;
waterStepList[waterStepIndex].finish = false;
this.that.setState({
waterStepList,
isRuningTest: 3,
});
}
}
}
// 2.判断工作状态是否与选中仪器一致
if (jsonStatus?.workMode === this.that.state.ActiveModeItem.modeType) {
if (this.that.state.workMode !== jsonStatus?.workMode) {
this.that.setState({
workMode: jsonStatus?.workMode, // 仅当设备上报模式与小程序一致时,才允许改变小程序变量缓存
});
}
// 判断设备是否在运行中(护理中)
// 仅当设备模式与小程序是否一致,才允许更改设备运行时间
if (this.that.isRuning) {
if (
this.that.state.DeviceConnectStatus === 1 &&
jsonStatus.workStatus !== 'end'
) {
// 水分测试手动检测时间,不自动计算倒计时
if (jsonStatus?.workMode !== "moistureTest")
this.that.updateDeviceSyncData(
{
totalWorkingMinutes: jsonStatus.totalWorkingMinutes,
totalWorkingSeconds: jsonStatus.totalWorkingSeconds,
},
jsonStatus
);
}
}
}
}
/** @name 设备响应:控制指令响应 */
private syncDeviceControl(jsonStatus) {
console.log("设备控制响应", jsonStatus);
if (jsonStatus.responseStatus == "OK") {
console.log("发送控制指令成功");
this.that.workJsonStatus = jsonStatus;
this.that.workStatus = jsonStatus.workStatus;
setTimeout(() => console.log("this.workStatus", this.that.workStatus));
if (jsonStatus.battery) {
this.that.setState({
Electricity: jsonStatus.battery,
});
}
// 判断设备主动上报的关机事件
if (jsonStatus.workStatus === 'end') {
// 判断id是否一致, 一致的话则生成护理报表, 并提示
if (jsonStatus.id == this.that.FR200NursingHistory.id) {
debounce(
this.that.checkInstrumentRecord.bind(this, jsonStatus),
500
);
}
return;
}
if (jsonStatus?.workMode === this.that.state.ActiveModeItem.modeType) {
this.that.setState({
workMode: jsonStatus?.workMode, // 仅当设备上报模式与小程序一致时,才允许改变小程序变量缓存
});
// 判断是否在isRuning(护理中)
// 仅当设备模式与小程序是否一致,才允许更改设备运行时间
if (
this.that.state.DeviceConnectStatus === 1 &&
this.that.isRuning &&
jsonStatus.workStatus !== 'end'
) {
this.that.updateDeviceSyncData(
{
totalWorkingMinutes: jsonStatus.totalWorkingMinutes,
totalWorkingSeconds: jsonStatus.totalWorkingSeconds,
},
jsonStatus
);
}
}
if (
jsonStatus.workMode === 'working' &&
this.that.isRuning
) {
const { ActiveModeItem } = this.that.state;
const item = ActiveModeItem;
if (jsonStatus.workMode !== item.modeType) {
// clearTimeout(loadingTipsTimer);
this.that.setState({
isShowCountdown: false,
});
}
}
}
}
notifyBLECharacteristicValueChange() {
notifyBLECharacteristicValueChange({
deviceId: this.bluetoothInfo.deviceId,
servicesuuid: this.bluetoothInfo.servicesuuid,
characteristicsuuid1: this.bluetoothInfo.characteristicsuuid1,
characteristicsuuid0: this.bluetoothInfo.characteristicsuuid0,
}).then((res) => {
Taro.onBLECharacteristicValueChange((value) => {
const jsonStatus: any = this.deviceToolKitInstance.toJsonStatus(value.value);
console.log("onBLECharacteristicValueChange 订阅改变:", jsonStatus);
if (!jsonStatus || jsonStatus == null) {
return;
}
this.that.workStatus = jsonStatus.workStatus; // 记录工作状态
// end 和 endWork 都是护理结束, endWork不关机, end 关机, 对小程序而言处理流程都一样
if (jsonStatus.workStatus && jsonStatus.workStatus == "endWork") {
jsonStatus.workStatus = "end";
console.log(jsonStatus.workStatus, "护理结束");
}
switch (jsonStatus?.commandType) {
//设备配对和连接的返回
case "BleMatch":
// 蓝牙相关指令
this.that.switchBLEMatch(jsonStatus);
break;
//设备状态同步
case "DeviceStatusSync":
if (jsonStatus.battery) {
// 防止抖动
this.that.setState({
Electricity: jsonStatus.battery,
});
}
switch (jsonStatus.workStatus) {
case "standby":
//设备的待机状态 可能workMode字段为空
this.syncStandby(jsonStatus)
break;
case "pause":
this.syncPause(jsonStatus)
break;
case "working":
this.syncWorking(jsonStatus)
break;
default:
break;
}
this.syncCommonStatus(jsonStatus);
break;
//设备对控制指令的响应
case "DeviceControl":
this.syncDeviceControl(jsonStatus);
break;
// 设备对信息查询指令的响应
case "InfoQuery":
console.log("设备对信息查询指令的响应 InfoQuery", jsonStatus);
switch (jsonStatus.infoQueryType) {
// 离线记录
case "offlineClockInInfo":
this.InfoQuery.syncOfflineClockInInfo(jsonStatus);
break;
// 版本信息
case "versionInfo":
this.InfoQuery.syncVersionInfo(jsonStatus);
break;
// 时间同步
case "timeSync":
this.InfoQuery.syncTimeSync(jsonStatus);
break;
default:
break;
}
break;
default:
break;
}
});
if (this.counter < 3) {
/**
* 600
*/
const querySubDeviceArrayBuffer = this.deviceToolKitInstance.toBleCommand({
...bleCommandSamples.querySubDevice,
queryType: "WL200",
} as any);
setTimeout(() => {
console.log("发送查询附属设备指令 querySubDeviceArrayBuffer");
sendCommand({
value: querySubDeviceArrayBuffer,
});
}, 600);
/**
* 500
*/
const queryDeviceArrayBuffer = this.deviceToolKitInstance.toBleCommand(
bleCommandSamples.queryDeviceStatus as any
);
setTimeout(() => {
console.log("发送查询设备电量指令");
sendCommand({
value: queryDeviceArrayBuffer,
});
}, 500);
this.counter++;
} else {
/**
* 500
*/
const queryDeviceArrayBuffer = this.deviceToolKitInstance.toBleCommand(
bleCommandSamples.queryDeviceStatus as any
);
setTimeout(() => {
console.log("发送查询设备电量指令");
sendCommand({
value: queryDeviceArrayBuffer,
});
}, 20000);
}
});
}
}

@ -9,7 +9,7 @@ interface Props {
onEmitStartNurse: Function; // 每次点击item回调事件和数据给父组件 onEmitStartNurse: Function; // 每次点击item回调事件和数据给父组件
onEmitSwitchChange: Function; onEmitSwitchChange: Function;
onEmitEndPlan: Function; onEmitEndPlan: Function;
onsuccess:Function onsuccess: Function;
} }
function Index({ function Index({
currentWorkModeType, currentWorkModeType,
@ -18,7 +18,7 @@ function Index({
onEmitStartNurse, onEmitStartNurse,
onEmitSwitchChange, onEmitSwitchChange,
onEmitEndPlan, onEmitEndPlan,
onsuccess onsuccess,
}: Props) { }: Props) {
const onStartNurse = () => { const onStartNurse = () => {
onEmitStartNurse(); onEmitStartNurse();
@ -31,24 +31,31 @@ function Index({
const onEndPlan = () => { const onEndPlan = () => {
onEmitEndPlan(); onEmitEndPlan();
}; };
const onSuccessNurse = () => {
onsuccess();
};
return ( return (
<Block> <Block>
<View className="iot-footer"> <View className="iot-footer">
{currentWorkModeType === 3 && ( {currentWorkModeType === 3 && (
<Block> <Block>
{isRuningTest === 1 ? ( {isRuningTest === 1 ? (
<View className="btn" onClick={onStartNurse}> <View className="btn" onClick={onStartNurse}>
</View> </View>
) : isRuningTest === 2 ? ( ) : isRuningTest === 2 ? (
<View className="btn">...</View> <View className="btn">...</View>
) : isRuningTest === 3 ? ( ) : isRuningTest === 3 ? (
<View className="btn" onClick={onStartNurse}></View> <View className="btn" onClick={onStartNurse}>
) : (
<View className="btn" onClick={onsuccess}></View> </View>
)} ) : (
</Block> <View className="btn" onClick={onSuccessNurse}>
</View>
)}
</Block>
)} )}
{currentWorkModeType === 2 && ( {currentWorkModeType === 2 && (

@ -31,7 +31,6 @@ function Index({
let PermeationList = ModeList.filter((item) => item.modeClass === 3); // 专研促渗 let PermeationList = ModeList.filter((item) => item.modeClass === 3); // 专研促渗
let SensitiveList = ModeList.filter((item) => item.modeClass === 4); // 敏感期护理 let SensitiveList = ModeList.filter((item) => item.modeClass === 4); // 敏感期护理
let IntelligenceList = ModeList.filter((item) => item.modeClass === 5); // 智能测肤 let IntelligenceList = ModeList.filter((item) => item.modeClass === 5); // 智能测肤
console.log(activeModeID, "查看id", BaseList, ModeList);
const onItemClick = (item) => { const onItemClick = (item) => {
if (item.lock) { if (item.lock) {
onModeLockOpen(); // 点击了锁定模式 onModeLockOpen(); // 点击了锁定模式
@ -85,7 +84,9 @@ function Index({
<View className="mode-info"> <View className="mode-info">
<View className="mode-info-title">{item.modeName}</View> <View className="mode-info-title">{item.modeName}</View>
<View className="mode-info-time"> <View className="mode-info-time">
{item.modeTimeStr} {item.modeTimeStr === "00:00"
? "--:--"
: item.modeTimeStr}
</View> </View>
<View <View
className={classnames("mode-info-select", { className={classnames("mode-info-select", {

@ -1,4 +1,5 @@
export default definePageConfig({ export default definePageConfig({
navigationBarTitleText: '首页', navigationBarTitleText: '首页',
enablePullDownRefresh: false, enablePullDownRefresh: false,
enablePageMeta: true
}) })

@ -516,7 +516,44 @@ page {
border-radius: 30rpx; border-radius: 30rpx;
background: #fff; background: #fff;
} }
.MembraneCloth {
position: relative;
width: 670rpx;
height: 840rpx;
border-radius: 30rpx;
background: #fff;
.btn1 {
font-style: normal;
width: 270rpx;
height: 90rpx;
line-height: 90rpx;
background: #000000;
text-align: center;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
margin-top: 55rpx;
color: #ffffff;
}
.center{
height: 70%;
background-color: red;
.list{
width: 100%;
height: 117rpx;
background-color: #41a9fc;
border-bottom: 2rpx solid black;
display: flex;
}
}
}
.MembraneCloth .title {
font-weight: bold;
text-align: center;
font-size: 36rpx;
color: #030000;
padding-top: 39rpx;
}
.popbox .title { .popbox .title {
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;

@ -11,8 +11,9 @@ import {
Swiper, Swiper,
SwiperItem, SwiperItem,
RichText, RichText,
PageMeta,
} from "@tarojs/components"; } from "@tarojs/components";
import { Popup } from "@antmjs/vantui"; import { Popup,Radio } from "@antmjs/vantui";
/*** redux ***/ /*** redux ***/
import { connect } from "react-redux"; import { connect } from "react-redux";
import { userRefresh, tokenRefresh } from "@/store/features/userInfo"; import { userRefresh, tokenRefresh } from "@/store/features/userInfo";
@ -82,8 +83,24 @@ class Index extends Component<any, any> {
userinfo: { userinfo: {
mobile: Taro.getStorageSync("mobile"), mobile: Taro.getStorageSync("mobile"),
}, },
// 膜布列表
MembraneClothList:[ {
name:'mox名字'
},
{
name:'mox名字'
},
{
name:'mox名字'
}, {
name:'mox名字'
}, {
name:'mox名字'
},],
checkedMembraneCloth:'',
list: [
list: [], ],
params: "", params: "",
messageCount: Taro.getStorageSync("messageCount") || 0, messageCount: Taro.getStorageSync("messageCount") || 0,
offlineDialogType: 1, //1离线弹窗 2升级弹窗 offlineDialogType: 1, //1离线弹窗 2升级弹窗
@ -934,7 +951,12 @@ class Index extends Component<any, any> {
this.connectionClose(); this.connectionClose();
}; };
// 开发者工具跳转函数
async goIot() { async goIot() {
if (this.state.connectInstrument.name.indexOf("WE200") > -1) {
go("/moduleIOT/pages/iotCarePlan/WE200");
return;
}
if (this.state.connectInstrument.model === "FR200") { if (this.state.connectInstrument.model === "FR200") {
go("/moduleIOT/pages/iotCarePlan/FR200"); // 画页面直接跳转 go("/moduleIOT/pages/iotCarePlan/FR200"); // 画页面直接跳转
} else { } else {
@ -943,6 +965,10 @@ class Index extends Component<any, any> {
// return; // return;
} }
goTest() {
go("/pages/consultant/consultant");
}
//连接完成时数据的回调 //连接完成时数据的回调
offlineChange = async (e) => { offlineChange = async (e) => {
console.log("offlineChange", e); console.log("offlineChange", e);
@ -1082,6 +1108,7 @@ class Index extends Component<any, any> {
show, show,
isCommonError, isCommonError,
commonErrorText, commonErrorText,
MembraneClothList,
calendarComplete, calendarComplete,
calendarInComplete, calendarInComplete,
currentDate, currentDate,
@ -1122,6 +1149,7 @@ class Index extends Component<any, any> {
return ( return (
<Block> <Block>
{/* <PageMeta pageOrientation="landscape"> */}
<View catchMove> <View catchMove>
<PopupAlert <PopupAlert
isShow={isCommonError} isShow={isCommonError}
@ -1446,6 +1474,39 @@ class Index extends Component<any, any> {
<Popup show={show} className="custom-popup" overlay={false}> <Popup show={show} className="custom-popup" overlay={false}>
<View className="popBox"></View> <View className="popBox"></View>
</Popup> </Popup>
<Popup show={false} >
<View className="MembraneCloth">
<View className="title"></View>
<View className="center">
{MembraneClothList.map((item, index) => {
return (
<View
key={index}
className="list"
>
<Radio name="1" v-model={this.state.checkedMembraneCloth}>{item.name}</Radio>
</View>
);
})}
</View>
<View className="popbtnbox flex aitems jcenter">
<View className="btn1" >
</View>
</View>
</View>
</Popup>
{/* </PageMeta> */}
{/* <View
style="position:fixed;width:100vw;height:100vh"
onClick={this.goTest}
>
</View> */}
</Block> </Block>
); );
} }

@ -139,6 +139,10 @@ page {
height: 100% !important; height: 100% !important;
border-radius: 20rpx; border-radius: 20rpx;
} }
.showImg:last-child{
width: 40rpx !important;
height: 40rpx !important;
}
} }
.info4 { .info4 {
position: relative; position: relative;

@ -67,9 +67,9 @@ export default class Index extends Component<any, any> {
async getStatistics(id) { async getStatistics(id) {
let data = {}; let data = {};
if (id != null) { if (id != null) {
data["instrumentId"] = id; data["nursingId"] = id;
} }
let res = await InstrumentInfo.apiNursingLog.getStatistics(data); let res = await InstrumentInfo.apiNursingLog.getStatisticsFace(data);
if (res.data.code === 200) { if (res.data.code === 200) {
this.setState({ statistics: res.data.data }); this.setState({ statistics: res.data.data });
@ -193,7 +193,6 @@ export default class Index extends Component<any, any> {
}; };
let res = await InstrumentInfo.apiClock.getList(data); let res = await InstrumentInfo.apiClock.getList(data);
if (res.data.code === 200) { if (res.data.code === 200) {
console.log(this.state.clockStatistics, 88888);
this.state.clockStatistics.map((item) => { this.state.clockStatistics.map((item) => {
if (item.id === id) { if (item.id === id) {
@ -241,12 +240,20 @@ export default class Index extends Component<any, any> {
punchInInfo.clockImageList.splice(i, 1); punchInInfo.clockImageList.splice(i, 1);
this.setState({ punchInInfo }); this.setState({ punchInInfo });
} }
getRouteId() { async getRouteId() {
let punchInInfo =this.state.punchInInfo
const searchParams = new URLSearchParams(window.location.search); const searchParams = new URLSearchParams(window.location.search);
const id = searchParams.get("id"); const id = searchParams.get("id");
const recordId = searchParams.get("recordId"); const recordId = searchParams.get("recordId");
this.getStatistics(id); this.getStatistics(id);
this.getRecord(id, recordId); this.getRecord(id, recordId);
let res1 = await InstrumentInfo.apiClock.getLatestClockRecord();
punchInInfo.clockContent =res1.data.data.clockContent
punchInInfo.clockImageList =res1.data.data.clockImg
this.setState({ punchInInfo });
// 获取图片和文本
console.log(recordId); console.log(recordId);
} }
getTime(time) { getTime(time) {

@ -82,6 +82,7 @@ page {
.text-title{ .text-title{
font-size: 18rpx; font-size: 18rpx;
color: #999999; color: #999999;
margin: 8rpx 0rpx;
} }
.main { .main {
border-radius: 30rpx; border-radius: 30rpx;
@ -179,6 +180,10 @@ page {
height: 100% !important; height: 100% !important;
border-radius: 20rpx; border-radius: 20rpx;
} }
.showImg:last-child{
width: 40rpx !important;
height: 40rpx !important;
}
} }
.info4 { .info4 {
position: relative; position: relative;
@ -309,18 +314,18 @@ page {
// background-color: red; // background-color: red;
} }
.content { // .content {
display: flex; // display: flex;
flex-flow: column; // flex-flow: column;
justify-content: space-between; // justify-content: space-between;
background-color: #f8f8f8; // background-color: #f8f8f8;
border-radius: 30rpx; // border-radius: 30rpx;
padding: 21rpx; // padding: 21rpx;
border-radius: 20rpx; // border-radius: 20rpx;
width: 457rpx; // width: 457rpx;
height: 195rpx; // height: 195rpx;
} // }
.content_top{ .content_top{
height: 140rpx; height: 140rpx;

@ -17,7 +17,6 @@ import { InstrumentInfo } from "@/utils/Interface";
// 引入ecahrts图表 // 引入ecahrts图表
// import EchartsForm from '@/moduleIOT/pages/iotCarePlan/components/Echart_face' // import EchartsForm from '@/moduleIOT/pages/iotCarePlan/components/Echart_face'
import EchartsForm from '../../../moduleIOT/pages/iotCarePlan/components/Echart_face' import EchartsForm from '../../../moduleIOT/pages/iotCarePlan/components/Echart_face'
import Echarts1 from '../../../moduleIOT/pages/iotCarePlan/components/Echart'
/** 自定义组件 **/ /** 自定义组件 **/
@ -82,16 +81,7 @@ export default class Index extends Component<any, any> {
data["nursingId"] = ids; data["nursingId"] = ids;
} }
let res = await InstrumentInfo.apiNursingLog.getStatisticsFace(data); let res = await InstrumentInfo.apiNursingLog.getStatisticsFace(data);
// // 获取echarts数据 这个是获取接口更新echarts页面
// let res2 = await InstrumentInfo.apiNursingLog.getStatiCDE(ids);
// let nursingData=JSON.parse(res2.data.data.nursingData)
// let obj ={
// modeName:res2.data.data.modeName,
// data:nursingData
// }
// this.init({
// obj:JSON.stringify(obj)
// })
if (res.data.code === 200) { if (res.data.code === 200) {
this.setState({ statistics: res.data.data }); this.setState({ statistics: res.data.data });
} }
@ -169,38 +159,13 @@ export default class Index extends Component<any, any> {
res.data.data.reverse(); res.data.data.reverse();
if (res.data.data.length > 0) { if (res.data.data.length > 0) {
res.data.data.map((item, index) => { let clockStatistics = this.state.clockStatistics
item.isMore = false; clockStatistics=res.data.data
item.detail = [];
if (index === 0) {
item.isMore = true; this.setState({ clockStatistics });
this.getList(item.id, item.year, item.month);
}
this.state.monthTime.map((monthItem) => {
if (monthItem.month == item.month) {
monthItem.time = item.clockNum;
}
});
});
this.setState({ monthTime: this.state.monthTime });
} else {
let monthTime = [
{ month: 1, time: 0 },
{ month: 2, time: 0 },
{ month: 3, time: 0 },
{ month: 4, time: 0 },
{ month: 5, time: 0 },
{ month: 6, time: 0 },
{ month: 7, time: 0 },
{ month: 8, time: 0 },
{ month: 9, time: 0 },
{ month: 10, time: 0 },
{ month: 11, time: 0 },
{ month: 12, time: 0 },
];
this.setState({ monthTime });
} }
this.setState({ clockStatistics: res.data.data });
} }
} }
// 获取当月打卡记录 // 获取当月打卡记录
@ -213,6 +178,7 @@ export default class Index extends Component<any, any> {
if (res.data.code === 200) { if (res.data.code === 200) {
this.state.clockStatistics.map((item) => { this.state.clockStatistics.map((item) => {
if (item.id === id) { if (item.id === id) {
item.detail = res.data.data; item.detail = res.data.data;
item.detail.map((obj) => { item.detail.map((obj) => {
@ -258,13 +224,24 @@ export default class Index extends Component<any, any> {
punchInInfo.clockImageList.splice(i, 1); punchInInfo.clockImageList.splice(i, 1);
this.setState({ punchInInfo }); this.setState({ punchInInfo });
} }
getRouteId() { async getRouteId() {
let punchInInfo =this.state.punchInInfo
const searchParams = new URLSearchParams(window.location.search); const searchParams = new URLSearchParams(window.location.search);
const id = searchParams.get("id"); const id = searchParams.get("id");
const recordId = searchParams.get("recordId"); const recordId = searchParams.get("recordId");
this.getStatistics(id); this.getStatistics(id);
// this.getRecord(id, recordId); let res1 = await InstrumentInfo.apiClock.getLatestClockRecord();
// console.log(recordId); punchInInfo.clockContent =res1.data.data.clockContent
punchInInfo.clockImageList =res1.data.data.clockImg
this.setState({ punchInInfo });
setTimeout(function() {
}, )
} }
getTime(time) { getTime(time) {
const hour = time.slice(0, 2); const hour = time.slice(0, 2);
@ -287,7 +264,7 @@ export default class Index extends Component<any, any> {
} }
this.init(options) this.init(options)
this.getRouteId(); this.getRouteId();
// this.getClockStatistics() this.getClockStatistics()
} }
init(options){ init(options){
@ -348,11 +325,10 @@ export default class Index extends Component<any, any> {
<View className='statistic_title'>{statistics.nursingTime}</View> <View className='statistic_title'>{statistics.nursingTime}</View>
<View className='statistic_desc'></View> <View className='statistic_desc'></View>
</View> </View>
{/* </block> */}
</View> </View>
<View className='main m-x-30'> <View className='main m-x-30'>
<View className='products_item' style='border: none'> <View className='products_item' style='border: none'>
<View className='products_middle flex'> <View className='products_middle flex'>
<View className='left'> <View className='left'>
<Image <Image
@ -385,7 +361,7 @@ export default class Index extends Component<any, any> {
<View className='main_title'>-{recordData.modeName}</View> <View className='main_title'>-{recordData.modeName}</View>
<View className='eacharts'> <View className='eacharts'>
<EchartsForm EchartsData={EchartsData}></EchartsForm> <EchartsForm EchartsData={EchartsData}></EchartsForm>
{/* <Echarts1></Echarts1> */}
</View> </View>
</View> </View>

@ -1,4 +1,12 @@
import { Block, View, Text, Image, Input, Button, PageMeta } from "@tarojs/components"; import {
Block,
View,
Text,
Image,
Input,
Button,
PageMeta,
} from "@tarojs/components";
import { Component, PropsWithChildren, useEffect, useState } from "react"; import { Component, PropsWithChildren, useEffect, useState } from "react";
import { go } from "@/utils/traoAPI"; import { go } from "@/utils/traoAPI";
import { InstrumentInfo } from "@/utils/Interface"; import { InstrumentInfo } from "@/utils/Interface";
@ -21,87 +29,110 @@ class MoistureTestReport extends Component<any, any> {
super(props); super(props);
this.state = { this.state = {
name: "重新登录", name: "重新登录",
imgUrl: '', imgUrl: "",
reportShow: true,
reportData: { reportData: {
curDate: '', curDate: "",
shuifenLevel: { shuifenLevel: {
head: 2, head: 2,
leftFace: 3, leftFace: 3,
rightFace: 7 rightFace: 7,
}, },
shuifenList: [], shuifenList: [],
shuifenGear: { shuifenGear: {
head: 0, head: 0,
leftFace: 0, leftFace: 0,
rightFace: 0 rightFace: 0,
} },
}, },
isClock: false, isClock: false,
xinde: '', xinde: "",
imglist: [], imglist: [],
id: 0, id: 0,
show: false, show: false,
modeId: 0, modeId: 0,
echartsData: {}, echartsData: {},
showEcharts: false showEcharts: false,
}; };
} }
componentDidMount() {}
componentDidMount() { } componentWillUnmount() {}
componentWillUnmount() { }
componentDidShow() { } componentDidShow() {}
componentDidHide() { } componentDidHide() {}
onLoad(option) { onLoad(option) {
console.log(option); console.log(option);
let Bool = JSON.parse(option?.report);
let data = JSON.parse(option.data) if (!Bool) {
let { reportData } = this.state this.setState({
reportData.curDate = option.date reportShow: Bool,
data.GearData.map(item => { });
if (item.name == '额头') { }
reportData.shuifenLevel.head = item.forehead let data = JSON.parse(option.data);
let gear = Math.ceil((11 - reportData.shuifenLevel.head) / 2) let { reportData } = this.state;
reportData.shuifenGear.head = gear reportData.curDate = option.date;
reportData.curDate = option.report;
} else if (item.name == '左脸颊') { data.GearData.map((item) => {
reportData.shuifenLevel.leftFace = item.forehead if (item.name == "额头") {
let gear = Math.ceil((11 - reportData.shuifenLevel.leftFace) / 2) reportData.shuifenLevel.head = item.forehead;
reportData.shuifenGear.leftFace = gear let gear = Math.ceil((11 - reportData.shuifenLevel.head) / 2);
} else if (item.name == '右脸颊') { reportData.shuifenGear.head = gear;
reportData.shuifenLevel.rightFace = item.forehead } else if (item.name == "左脸颊") {
let gear = Math.ceil((11 - reportData.shuifenLevel.rightFace) / 2) reportData.shuifenLevel.leftFace = item.forehead;
reportData.shuifenGear.rightFace = gear let gear = Math.ceil((11 - reportData.shuifenLevel.leftFace) / 2);
reportData.shuifenGear.leftFace = gear;
} else if (item.name == "右脸颊") {
reportData.shuifenLevel.rightFace = item.forehead;
let gear = Math.ceil((11 - reportData.shuifenLevel.rightFace) / 2);
reportData.shuifenGear.rightFace = gear;
} }
}) });
this.setState({ reportData, modeId: option.modeId, echartsData: JSON.parse(option.echartsData) }); this.setState({
reportData,
modeId: option.modeId,
echartsData: JSON.parse(option.echartsData),
});
// this.moistureTest(option.id, reportData.curDate) // this.moistureTest(option.id, reportData.curDate)
} }
async initData() { } async initData() {}
toIndex() { toIndex() {
Taro.reLaunch({ url: "/pages/index/index" }); Taro.reLaunch({ url: "/pages/index/index" });
} }
toNursing() { toNursing() {
go(`/moduleIOT/pages/iotCarePlan/FR200?modeId=${this.state.modeId}`) go(`/moduleIOT/pages/iotCarePlan/FR200?modeId=${this.state.modeId}`);
} }
render() { render() {
let { name, imgUrl, reportData, reportData1, isClock, xinde, imglist, id, show, modeId, echartsData, showEcharts } = this.state let {
name,
imgUrl,
reportData,
reportData1,
reportShow,
isClock,
xinde,
imglist,
id,
show,
modeId,
echartsData,
showEcharts,
} = this.state;
const getStatusData = (level) => { const getStatusData = (level) => {
var bgCssData = { var bgCssData = {
serious: 'background: #FFE3E3', serious: "background: #FFE3E3",
moderate: 'background: #FFEBDC', moderate: "background: #FFEBDC",
slight: 'background: #F6FCFF', slight: "background: #F6FCFF",
normal: 'background: #F8F8F8', normal: "background: #F8F8F8",
sufficient: 'background: #F8F8F8' sufficient: "background: #F8F8F8",
} };
// var progressBgData = { // var progressBgData = {
// serious: 'background: #FF9393', // serious: 'background: #FF9393',
// moderate: 'background: #FFC58C', // moderate: 'background: #FFC58C',
@ -110,202 +141,312 @@ class MoistureTestReport extends Component<any, any> {
// sufficient: 'background: #9FDBF3' // sufficient: 'background: #9FDBF3'
// } // }
var progressBgData = { var progressBgData = {
serious: '#FF9393', serious: "#FF9393",
moderate: '#FFC58C', moderate: "#FFC58C",
slight: '#E5F3F9', slight: "#E5F3F9",
normal: '#C2E5F3', normal: "#C2E5F3",
sufficient: '#9FDBF3' sufficient: "#9FDBF3",
} };
if (level >= 1 && level <= 2) { if (level >= 1 && level <= 2) {
return { return {
bg: bgCssData.serious, bg: bgCssData.serious,
title: '严重缺水', title: "严重缺水",
gear: 5, gear: 5,
img: 'serious', img: "serious",
progressBg: progressBgData.serious progressBg: progressBgData.serious,
} };
} else if (level >= 3 && level <= 4) { } else if (level >= 3 && level <= 4) {
return { return {
bg: bgCssData.moderate, bg: bgCssData.moderate,
title: '中度缺水', title: "中度缺水",
gear: 4, gear: 4,
img: 'moderate', img: "moderate",
progressBg: progressBgData.moderate progressBg: progressBgData.moderate,
} };
} else if (level >= 5 && level <= 6) { } else if (level >= 5 && level <= 6) {
return { return {
bg: bgCssData.slight, bg: bgCssData.slight,
title: '轻微缺水', title: "轻微缺水",
gear: 3, gear: 3,
img: 'slight', img: "slight",
progressBg: progressBgData.slight progressBg: progressBgData.slight,
} };
} else if (level >= 7 && level <= 8) { } else if (level >= 7 && level <= 8) {
return { return {
bg: bgCssData.normal, bg: bgCssData.normal,
title: '水分正常', title: "水分正常",
gear: 2, gear: 2,
img: 'normal', img: "normal",
progressBg: progressBgData.normal progressBg: progressBgData.normal,
} };
} else if (level >= 9 && level <= 10) { } else if (level >= 9 && level <= 10) {
return { return {
bg: bgCssData.sufficient, bg: bgCssData.sufficient,
title: '水分充足', title: "水分充足",
gear: 1, gear: 1,
img: 'sufficient', img: "sufficient",
progressBg: progressBgData.sufficient progressBg: progressBgData.sufficient,
} };
} }
} };
return ( return (
<Block>
// <Block> <Navbar isBack titleSlot='水分测试报告'></Navbar>
<PageMeta <View className='moisture_test_report'>
pageOrientation='portrait' <View className='time'>{reportData.curDate}</View>
> <View className='report_data'>
<Navbar isBack titleSlot='水分测试报告'></Navbar> <View
<View className='moisture_test_report'> className='forehead moisture_block flex'
<View className='time'>{reportData.curDate}</View> style={getStatusData(reportData.shuifenLevel.head)!.bg}
<View className='report_data'> >
<View className='forehead moisture_block flex' style={getStatusData(reportData.shuifenLevel.head)!.bg}> <Image
<Image className='moisture_img' src={require(`@/img/fr200/${getStatusData(reportData.shuifenLevel.head)!.img}.png`)} mode='aspectFill'></Image> className='moisture_img'
<View className='pos_info'> src={require(`@/img/fr200/${
<View className='top'></View> getStatusData(reportData.shuifenLevel.head)!.img
<View className='bottom'>{getStatusData(reportData.shuifenLevel.head)!.title}</View> }.png`)}
<View className='bottom'></View> mode='aspectFill'
></Image>
<View className='pos_info'>
<View className='top'></View>
<View className='bottom'>
{getStatusData(reportData.shuifenLevel.head)!.title}
</View> </View>
<View className='bottom'></View>
</View> </View>
<View className='left_face moisture_block flex' style={getStatusData(reportData.shuifenLevel.leftFace)!.bg}> </View>
<Image className='moisture_img' src={require(`@/img/fr200/${getStatusData(reportData.shuifenLevel.leftFace)!.img}.png`)} mode='aspectFill'></Image> <View
<View className='pos_info'> className='left_face moisture_block flex'
<View className='top'></View> style={getStatusData(reportData.shuifenLevel.leftFace)!.bg}
<View className='bottom'>{getStatusData(reportData.shuifenLevel.leftFace)!.title}</View> >
<View className='bottom'></View> <Image
className='moisture_img'
src={require(`@/img/fr200/${
getStatusData(reportData.shuifenLevel.leftFace)!.img
}.png`)}
mode='aspectFill'
></Image>
<View className='pos_info'>
<View className='top'></View>
<View className='bottom'>
{getStatusData(reportData.shuifenLevel.leftFace)!.title}
</View> </View>
<View className='bottom'></View>
</View> </View>
<View className='right_face moisture_block flex' style={getStatusData(reportData.shuifenLevel.rightFace)!.bg}> </View>
<Image className='moisture_img' src={require(`@/img/fr200/${getStatusData(reportData.shuifenLevel.rightFace)!.img}.png`)} mode='aspectFill'></Image> <View
<View className='pos_info'> className='right_face moisture_block flex'
<View className='top'></View> style={getStatusData(reportData.shuifenLevel.rightFace)!.bg}
<View className='bottom'>{getStatusData(reportData.shuifenLevel.rightFace)!.title}</View> >
<View className='bottom'></View> <Image
className='moisture_img'
src={require(`@/img/fr200/${
getStatusData(reportData.shuifenLevel.rightFace)!.img
}.png`)}
mode='aspectFill'
></Image>
<View className='pos_info'>
<View className='top'></View>
<View className='bottom'>
{getStatusData(reportData.shuifenLevel.rightFace)!.title}
</View> </View>
<View className='bottom'></View>
</View> </View>
<View className='example_box'> </View>
<Image className='banner_img' src='@/img/fr200/shuifen.png' mode='aspectFill'></Image> <View className='example_box'>
<View className='line1'></View> <Image
<View className='line2'></View> className='banner_img'
<View className='line3'></View> src='@/img/fr200/shuifen.png'
mode='aspectFill'
></Image>
<View className='line1'></View>
<View className='line2'></View>
<View className='line3'></View>
</View>
<View className='moisture_level_info'>
<View className='level_info'>
<View className='items flex aitems'>
<View className='pos_name'></View>
<View className='progress'>
<View
className='progress_width'
style={{
width: `${reportData.shuifenLevel.head * 10}%`,
backgroundColor: getStatusData(
reportData.shuifenLevel.head
)!.progressBg,
}}
></View>
{/* style='{width: {reportData.shuifenLevel.head * 10}%;{util.getStatusData(reportData.shuifenLevel.head).progressBg}}' */}
</View>
<View className='level'>
{reportData.shuifenLevel.head}
</View>
</View>
<View className='items flex aitems'>
<View className='pos_name'></View>
<View className='progress'>
<View
className='progress_width left_face_progress'
style={{
width: `${reportData.shuifenLevel.leftFace * 10}%`,
backgroundColor: getStatusData(
reportData.shuifenLevel.leftFace
)!.progressBg,
}}
></View>
</View>
<View className='level'>
{reportData.shuifenLevel.leftFace}
</View>
</View>
<View className='items flex aitems'>
<View className='pos_name'></View>
<View className='progress'>
<View
className='progress_width right_face_progress'
style={{
width: `${reportData.shuifenLevel.rightFace * 10}%`,
backgroundColor: getStatusData(
reportData.shuifenLevel.rightFace
)!.progressBg,
}}
></View>
</View>
<View className='level'>
{reportData.shuifenLevel.rightFace}
</View>
</View>
</View> </View>
<View className='moisture_level_info'> <View className='moisture_level'>
<View className='level_info'> <View className='level_txt flex aitems jcenter'>
<View className='circle normal'></View>
<View className='txt'></View>
</View>
<View className='level_list flex'>
<View className='items flex aitems'> <View className='items flex aitems'>
<View className='pos_name'></View> <View className='circle serious'></View>
<View className='progress'> <View className='txt'>1-2</View>
<View className='progress_width' style={{ width: `${reportData.shuifenLevel.head * 10}%`, backgroundColor: getStatusData(reportData.shuifenLevel.head)!.progressBg }}></View>
{/* style='{width: {reportData.shuifenLevel.head * 10}%;{util.getStatusData(reportData.shuifenLevel.head).progressBg}}' */}
</View>
<View className='level'>{reportData.shuifenLevel.head}</View>
</View> </View>
<View className='items flex aitems'> <View className='items flex aitems'>
<View className='pos_name'></View> <View className='circle moderate'></View>
<View className='progress'> <View className='txt'>3-4</View>
<View className='progress_width left_face_progress' style={{ width: `${reportData.shuifenLevel.leftFace * 10}%`, backgroundColor: getStatusData(reportData.shuifenLevel.leftFace)!.progressBg }}></View>
</View>
<View className='level'>{reportData.shuifenLevel.leftFace}</View>
</View> </View>
<View className='items flex aitems'> <View className='items flex aitems'>
<View className='pos_name'></View> <View className='circle slight'></View>
<View className='progress'> <View className='txt'>5-6</View>
<View className='progress_width right_face_progress' style={{ width: `${reportData.shuifenLevel.rightFace * 10}%`, backgroundColor: getStatusData(reportData.shuifenLevel.rightFace)!.progressBg }}></View>
</View>
<View className='level'>{reportData.shuifenLevel.rightFace}</View>
</View> </View>
</View> <View className='items flex aitems'>
<View className='moisture_level'>
<View className='level_txt flex aitems jcenter'>
<View className='circle normal'></View> <View className='circle normal'></View>
<View className='txt'></View> <View className='txt'>7-8</View>
</View> </View>
<View className='level_list flex'> <View className='items flex aitems'>
<View className='items flex aitems'> <View className='circle sufficient'></View>
<View className='circle serious'></View> <View className='txt'>9-10</View>
<View className='txt'>1-2</View>
</View>
<View className='items flex aitems'>
<View className='circle moderate'></View>
<View className='txt'>3-4</View>
</View>
<View className='items flex aitems'>
<View className='circle slight'></View>
<View className='txt'>5-6</View>
</View>
<View className='items flex aitems'>
<View className='circle normal'></View>
<View className='txt'>7-8</View>
</View>
<View className='items flex aitems'>
<View className='circle sufficient'></View>
<View className='txt'>9-10</View>
</View>
</View> </View>
<View className='pour'></View> </View>
<View className='pour'>
</View> </View>
</View> </View>
</View> </View>
</View>
</View>
<View className='report_chart'>
<View className='chart_title common_title'></View>
<View className='container'>
<Echarts echartsData={echartsData}></Echarts>
</View>
</View>
<View className='report_chart'> <View className='gear_recommend'>
<View className='chart_title common_title'></View> <View className='gear_header flex aitems sb'>
<View className='container'> <View className='gear_title common_title'></View>
<Echarts echartsData={echartsData}></Echarts> {reportShow ? <View className='gear_btn'></View> : null}
</View> </View>
<View className='gear_content flex aitems sb'>
<View className='left_content'>
<Image
className='banner_img'
src='@/img/fr200/mian-mo.png'
mode='aspectFill'
></Image>
<View className='type'></View>
</View> </View>
</View>
<View className='gear_recommend'> <View className='gear_recommend'>
<View className='gear_header flex aitems sb'> <View className='gear_header flex aitems sb'>
<View className='gear_title common_title'></View> <View className='gear_title common_title'></View>
<View className='gear_btn'></View> <View className='gear_btn'></View>
</View>
<View className='gear_content flex aitems sb'>
<View className='left_content'>
<Image
className='banner_img'
src='@/img/fr200/mian-mo.png'
mode='aspectFill'
></Image>
<View className='type'></View>
</View> </View>
<View className='gear_content flex aitems sb'> <View className='right_content flex aitems'>
<View className='left_content'> <View className='gear_list flex aitems sa'>
<Image className='banner_img' src='@/img/fr200/mian-mo.png' mode='aspectFill'></Image> <View className='items flex aitems jcenter'>
<View className='type'></View> <Image
</View> className='gear_img'
<View className='right_content flex aitems'> src={require(`@/img/fr200/${
<View className='gear_list flex aitems sa'> getStatusData(reportData.shuifenLevel.head)!.gear
<View className='items flex aitems jcenter'> }.png`)}
<Image className='gear_img' src={require(`@/img/fr200/${getStatusData(reportData.shuifenLevel.head)!.gear}.png`)} mode='aspectFill'></Image> mode='aspectFill'
<View className='name'></View> ></Image>
<View className='level'>{reportData.shuifenGear.head}</View> <View className='name'></View>
<View className='level'>
{reportData.shuifenGear.head}
</View> </View>
<View className='items flex aitems jcenter'> </View>
<Image className='gear_img' src={require(`@/img/fr200/${getStatusData(reportData.shuifenLevel.leftFace)!.gear}.png`)} mode='aspectFill'></Image> <View className='items flex aitems jcenter'>
<View className='name'></View> <Image
<View className='level'>{reportData.shuifenGear.leftFace}</View> className='gear_img'
src={require(`@/img/fr200/${
getStatusData(reportData.shuifenLevel.leftFace)!.gear
}.png`)}
mode='aspectFill'
></Image>
<View className='name'></View>
<View className='level'>
{reportData.shuifenGear.leftFace}
</View> </View>
<View className='items flex aitems jcenter'> </View>
<Image className='gear_img' src={require(`@/img/fr200/${getStatusData(reportData.shuifenLevel.rightFace)!.gear}.png`)} mode='aspectFill'></Image> <View className='items flex aitems jcenter'>
<View className='name'></View> <Image
<View className='level'>{reportData.shuifenGear.rightFace}</View> className='gear_img'
src={require(`@/img/fr200/${
getStatusData(reportData.shuifenLevel.rightFace)!.gear
}.png`)}
mode='aspectFill'
></Image>
<View className='name'></View>
<View className='level'>
{reportData.shuifenGear.rightFace}
</View> </View>
</View> </View>
</View> </View>
</View> </View>
</View> </View>
</View> </View>
</View>
<View className='go_clock_in flex sb aitems' > {reportShow ? (
<View className='go_clock_btn' onClick={this.toNursing.bind(this)}></View> <View className='go_clock_in flex sb aitems'>
<View className='go_clock_btn' onClick={this.toNursing.bind(this)}>
</View>
<View className='jump_box flex aitems' onClick={this.toIndex}> <View className='jump_box flex aitems' onClick={this.toIndex}>
<View className='txt'></View> <View className='txt'></View>
<Image src='@/img/fr200/right.png' mode='aspectFill'></Image> <Image src='@/img/fr200/right.png' mode='aspectFill'></Image>
</View> </View>
</View> </View>
</PageMeta> ) : null}
// </Block > </Block>
); );
} }
} }

@ -1,5 +1,6 @@
import Taro, { setStorageSync } from "@tarojs/taro"; import Taro, { setStorageSync } from "@tarojs/taro";
import classnames from "classnames"; import classnames from "classnames";
import dayjs from "dayjs";
import { Component, PropsWithChildren, useEffect, useState } from "react"; import { Component, PropsWithChildren, useEffect, useState } from "react";
import { import {
@ -40,8 +41,11 @@ export default class Recording extends Component<any, any> {
curIndex: null, curIndex: null,
clockStatistics: [], clockStatistics: [],
statistics: [], statistics: [],
yearValue: dayjs().format("YYYY-MM-DD"),
year: new Date().getFullYear(), year: new Date().getFullYear(),
today: new Date(),
startYear: "2000-01-01",
endYear: dayjs().format("YYYY-MM-DD"),
monthTime: [ monthTime: [
{ month: 1, time: 0 }, { month: 1, time: 0 },
{ month: 2, time: 0 }, { month: 2, time: 0 },
@ -61,8 +65,8 @@ export default class Recording extends Component<any, any> {
clockImageList: [], clockImageList: [],
clockContent: "", clockContent: "",
}, },
navigationBarHeight: '', navigationBarHeight: "",
statusBarHeight: '' statusBarHeight: "",
}; };
} }
@ -264,23 +268,31 @@ export default class Recording extends Component<any, any> {
ViewAddInstrument: ViewAddInstrument, ViewAddInstrument: ViewAddInstrument,
}); });
this.getRecord(null); this.initData();
this.getBindingInstrumentList();
this.getLatestClockRecord();
this.getClockStatistics();
this.DayTime();
this.setStatusBar();
} }
componentDidShow() { } componentDidShow() { }
componentDidHide() { } componentDidHide() { }
async initData() { initData = async () => {
} this.getRecord(null);
Taro.showLoading({
title: "请求中...",
mask: true,
});
await Promise.all([
this.getBindingInstrumentList(),
this.getLatestClockRecord(),
this.getClockStatistics(),
this.DayTime(),
this.setStatusBar(),
]);
Taro.hideLoading();
};
// 选择年份 // 选择年份
onChangeYear(event) { onChangeYear(event) {
console.log("event", event);
this.setState({ year: event.detail.value }); this.setState({ year: event.detail.value });
this.getClockStatistics(event.detail.value); this.getClockStatistics(event.detail.value);
} }
@ -294,12 +306,12 @@ export default class Recording extends Component<any, any> {
}; };
// 跳转到护理报告 // 跳转到护理报告
toReport(id, recordId, item) { toReport(id, recordId, item) {
this.state.bindingInstrumentList.map(instrument => { this.state.bindingInstrumentList.map((instrument) => {
if (instrument.id == id) { if (instrument.id == id) {
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);
@ -316,21 +328,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)
); );
}; };
@ -341,57 +354,67 @@ export default class Recording extends Component<any, any> {
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) => {
this.moistureTest(item) this.moistureTest(item);
}; };
async moistureTest(allData) { async moistureTest(allData) {
let data = { let data = {
queryDate: allData.createTime, queryDate: allData.createTime,
instrumentId: allData.instrumentId instrumentId: allData.instrumentId,
} };
let res = await InstrumentInfo.fr200.moistureTest(data); let res = await InstrumentInfo.fr200.moistureTest(data);
let echartsData = res.data.rows let echartsData = res.data.rows;
for (let i = 0; i < echartsData.length; i++) { for (let i = 0; i < echartsData.length; i++) {
for (let j = i + 1; j < echartsData.length; j++) { for (let j = i + 1; j < echartsData.length; j++) {
if (echartsData[i].createTime.split(' ')[0] == echartsData[j].createTime.split(' ')[0]) { if (
let result = Date.parse(echartsData[i].createTime) - Date.parse(echartsData[j].createTime) echartsData[i].createTime.split(" ")[0] ==
echartsData[j].createTime.split(" ")[0]
) {
let result =
Date.parse(echartsData[i].createTime) -
Date.parse(echartsData[j].createTime);
if (result < 0) { if (result < 0) {
echartsData.splice(i, 1) echartsData.splice(i, 1);
} else { } else {
echartsData.splice(j, 1) echartsData.splice(j, 1);
} }
} }
} }
} }
let gears: any = [] let gears: any = [];
let eDate: any = [] let eDate: any = [];
echartsData.map(item => { echartsData.map((item) => {
const result = item.createTime.split(" ")[0].substring(5);
const result = item.createTime.split(' ')[0].substring(5); eDate.push(result);
eDate.push(result) item.nursingData = JSON.parse(item.nursingData);
item.nursingData = JSON.parse(item.nursingData) let level: any = 0;
let level: any = 0 item.nursingData?.GearData?.map((gear) => {
item.nursingData?.GearData?.map(gear => { level = level + gear.forehead;
level = level + gear.forehead });
}) level = Math.floor(level / 3);
level = Math.floor(level / 3) gears.push(level);
gears.push(level) });
})
echartsData = { echartsData = {
gears, eDate gears,
} eDate,
go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${allData.nursingData}&date=${allData.createTime}&modeId=${allData.modeId}&id=${allData.instrumentId}&echartsData=${JSON.stringify(echartsData)}`); };
setStorageSync("moistureEachtsData", JSON.stringify(echartsData));
let report = false;
go(
`/recoding/pages/moisture_test_report/moisture_test_report?data=${allData.nursingData
}&date=${allData.createTime}&modeId=${allData.modeId}&id=${allData.instrumentId
}&echartsData=${JSON.stringify(echartsData)}&report=${report}`
);
} }
// 打开其他类型 // 打开其他类型
AllDevice = async (item) => { AllDevice = async (item) => {
console.log("打开其他类型", item); console.log("打开其他类型", item);
@ -470,7 +493,6 @@ export default class Recording extends Component<any, any> {
} }
setStatusBar() { setStatusBar() {
Taro.getSystemInfoAsync({ Taro.getSystemInfoAsync({
success: (res) => { success: (res) => {
const statusBarHeight = res.statusBarHeight || 0; const statusBarHeight = res.statusBarHeight || 0;
@ -500,22 +522,26 @@ export default class Recording extends Component<any, any> {
clockStatistics, clockStatistics,
statistics, statistics,
year, year,
today,
monthTime, monthTime,
show, show,
punchInInfo, punchInInfo,
navigationBarHeight, navigationBarHeight,
statusBarHeight statusBarHeight,
startYear,
endYear,
} = this.state; } = this.state;
const statusBarHeightRpx = statusBarHeight * 2; const statusBarHeightRpx = statusBarHeight * 2;
const navigationBarHeightRpx = navigationBarHeight * 2; const navigationBarHeightRpx = navigationBarHeight * 2;
const height = statusBarHeightRpx + navigationBarHeightRpx const height = statusBarHeightRpx + navigationBarHeightRpx;
return ( return (
<Block> <Block>
<Navbar isBack titleSlot='护理记录'></Navbar> <Navbar isBack titleSlot="护理记录"></Navbar>
<View className='tabs' style={{ <View
top: height + "rpx", position: 'sticky' className="tabs"
}} style={{
top: height + "rpx",
position: "sticky",
}}
> >
<View <View
className={classnames("tab", { className={classnames("tab", {
@ -536,132 +562,130 @@ export default class Recording extends Component<any, any> {
</View> </View>
</View> </View>
{current === 0 && ( <View>
<ScrollView className='products_list' scroll-x='true' style={{ {current === 0 && (
top: height + 110 + 'rpx', position: 'sticky' <Block>
}} <ScrollView
> className="products_list"
<View scrollX={true}
className={classnames("all", { enhanced={true}
products_item_active: !curIndex, bounces={false}
})} // scrollIntoView={"products_item_" + curIndex}
onClick={this.onChangeProduct.bind(this, null)} style={{
> top: height + 110 + "rpx",
position: "sticky",
</View> }}
{bindingInstrumentList.map((item: any, index: any) => (
<View
key={item.id}
className={classnames("products_item", {
products_item_active: curIndex === item.id,
})}
onClick={this.onChangeProduct.bind(this, item.id)}
> >
<Image <View>
className='products_cover' <View
src={item.logo} id={"products_item_0"}
mode='aspectFill' className={classnames("all", {
></Image> products_item_active: !curIndex,
<View className='products_title'>{item.name}</View> })}
</View> onClick={this.onChangeProduct.bind(this, null)}
))} >
</ScrollView>
)}
{current === 0 && recordList.length === 0 && (
<View>
<View className='nodata'>
<Image
className='nodata_img'
src={require("@/img/nodata.png")}
></Image>
<View className='nodata_text'></View>
</View>
</View>
)}
{current === 0 && (
<View style='padding-bottom:200px'>
{/* <View className='instrument_item' >
<View className='instrument_top flex sb aitems'>
<View className='time_box flex aitems'>
<View className='time'>2024.1.23</View>
<View className={classnames("tag", {
tag_active: current === 1,
})}
> 线</View>
</View>
<View className='report_btn flex'>
<View></View>
<Image className='arrow_icon' src={require("../../img/index/right.png")} mode='aspectFill'></Image>
</View>
</View>
<View className='instrument_middle flex'>
<Image className='instrument_cover' src={require("../../img/test/1706667011027.jpg")}></Image>
<View className='instrument_content'>
<View className='instrument_title'></View>
<View className='instrument_desc_box flex fc sb'>
<View className='instrument_desc'></View>
<View className='instrument_desc'>1500</View>
</View> </View>
</View> {bindingInstrumentList.map((item: any, index: any) => {
</View> return (
</View> */}
<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 <View
className={classnames("tip", { key={item.id}
tag_active: item.online === 2, id={"products_item_" + item.id}
className={classnames("products_item", {
products_item_active: curIndex === item.id,
})} })}
onClick={this.onChangeProduct.bind(this, item.id)}
> >
{item.online === 1 ? "在线" : "离线"}
</View>
</View>
{item.instrumentType === 2 && (
<View
className='top-right'
onClick={this.toReport.bind(
this,
item.instrumentId,
item.id,
item
)}
>
<Image <Image
className='arrow_icon' className="products_cover"
src={require("@/img/index/right.png")} src={item.logo}
mode='aspectFill' mode="aspectFill"
></Image> ></Image>
<View className="products_title">{item.name}</View>
</View> </View>
)} );
})}
</View>
</ScrollView>
<View>
{recordList.length === 0 && (
<View>
<View className="nodata">
<Image
className="nodata_img"
src={require("@/img/nodata.png")}
></Image>
<View className="nodata_text"></View>
</View>
</View> </View>
<View className='box-bottom'> )}
<Image {recordList.length > 0 && (
className='recording_img' <View style="padding-bottom:200px">
src={item.modeImage} <View className="instrument_list ">
></Image> {recordList.map((item: any, index: any) => (
<View className='bottom-right'> <View className="recording-box" key={item.id}>
<View className='title'>{item.instrumentName}</View> <View className="box-top">
<View className='subtitle-box'> <View className="top-left">
<View className='subtitle'>{item.modeName}</View> <View className="date">{item.createTime}</View>
<View className='subtitle'> <View
{item.nursingTime} className={classnames("tip", {
tag_active: item.online === 2,
})}
>
{item.online === 1 ? "在线" : "离线"}
</View>
</View>
{item.instrumentType === 2 && (
<View
className="top-right"
onClick={this.toReport.bind(
this,
item.instrumentId,
item.id,
item
)}
>
<Image
className="arrow_icon"
src={require("@/img/index/right.png")}
mode="aspectFill"
></Image>
</View>
)}
</View>
<View className="box-bottom">
<Image
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">
{item.instrumentType === 2 && (
<Text>{item.nursingTime}</Text>
)}
</View>
</View>
</View>
</View>
</View> </View>
</View> ))}
</View> </View>
</View> </View>
</View> )}
))} </View>
</View> </Block>
</View> )}
)} </View>
{current === 1 && ( {current === 1 && (
<View style='padding-bottom:200px'> <View style="padding-bottom:200px">
{/* <View className='nodata'> {/* <View className='nodata'>
<Image <Image
className='nodata_img' className='nodata_img'
@ -669,52 +693,54 @@ export default class Recording extends Component<any, any> {
></Image> ></Image>
<View className='nodata_text'></View> <View className='nodata_text'></View>
</View> */} </View> */}
<View style='height: 30rpx; background: #F8F8F8'></View> <View style="height: 30rpx; background: #F8F8F8"></View>
<View className='clock_in_statistics m-x-30 flex sb'> <View className="clock_in_statistics m-x-30 flex sb">
<View className='flex sb ab'> <View className="flex sb ab">
<View className='clock_in_statistics_title'></View> <View className="clock_in_statistics_title"></View>
<Picker <Picker
mode='date' style="color:#000"
fields='year' mode="date"
fields="year"
onChange={this.onChangeYear.bind(this)} onChange={this.onChangeYear.bind(this)}
value='{{year}}' value={this.state.yearValue}
end='{{today}}' start={startYear}
end={endYear}
> >
<View className='clock_in_statistics_date flex aitems'> <View className="clock_in_statistics_date flex aitems">
<View>{year}</View> <View>{year}</View>
<Image <Image
className='more_icon' className="more_icon"
src={require("@/img/arrow-down.png")} src={require("@/img/arrow-down.png")}
mode='widthFix' mode="widthFix"
></Image> ></Image>
</View> </View>
</Picker> </Picker>
</View> </View>
<View className='chart flex sb'> <View className="chart flex sb">
{monthTime.map((item) => ( {monthTime.map((item) => (
<View className='flex fc aitems' key={item.month}> <View className="flex fc aitems" key={item.month}>
{item.time > 0 && ( {item.time > 0 && (
<View className='buoy'>{item.time}</View> <View className="buoy">{item.time}</View>
)} )}
<View <View
className='column' className="column"
style={{ height: `calc(186/31*${item.time}rpx)` }} style={{ height: `calc(186/31*${item.time}rpx)` }}
></View> ></View>
<View className='month'>{item.month}</View> <View className="month">{item.month}</View>
</View> </View>
))} ))}
</View> </View>
</View> </View>
<View style='padding-bottom: env(safe-area-inset-bottom)'> <View style="padding-bottom: env(safe-area-inset-bottom)">
<View className='month_box m-x-30'> <View className="month_box m-x-30">
{clockStatistics.map((item) => ( {clockStatistics.map((item) => (
<View className='month_statistics' key={item.id}> <View className="month_statistics" key={item.id}>
<View className='flex aitems sb'> <View className="flex aitems sb">
<View className='time'> <View className="month_item_date">
{item.year}{item.month} {item.year}{item.month}
</View> </View>
<View <View
className='more_box flex aitems' className="more_box flex aitems"
onClick={this.onChangeMore.bind( onClick={this.onChangeMore.bind(
this, this,
item.id, item.id,
@ -722,7 +748,7 @@ export default class Recording extends Component<any, any> {
item.month item.month
)} )}
> >
<View className='more_text'> <View className="more_text">
{" "} {" "}
{!item.isMore ? "展开更多" : "收起更多"} {!item.isMore ? "展开更多" : "收起更多"}
</View> </View>
@ -732,51 +758,51 @@ export default class Recording extends Component<any, any> {
? "rotate(180deg)" ? "rotate(180deg)"
: "rotate(0deg)", : "rotate(0deg)",
}} }}
className='more_icon' className="more_icon"
src={require("@/img/arrow-down.png")} src={require("@/img/arrow-down.png")}
mode='widthFix' mode="widthFix"
></Image> ></Image>
</View> </View>
</View> </View>
<View style='height: 59rpx'></View> <View style="height: 59rpx"></View>
<View className='statistic'> <View className="statistic">
<View className='statistic_item'> <View className="statistic_item">
<View className='statistic_num'>{item.clockNum}</View> <View className="statistic_num">{item.clockNum}</View>
<View className='statistic_desc'></View> <View className="statistic_desc"></View>
</View> </View>
<View className='statistic_item'> <View className="statistic_item">
<View className='statistic_num'> <View className="statistic_num">
{(item.percentage * 100).toFixed(2)}% {(item.percentage * 100).toFixed(2)}%
</View> </View>
<View className='statistic_desc'></View> <View className="statistic_desc"></View>
</View> </View>
<View className='border'></View> <View className="border"></View>
</View> </View>
{item.isMore && item.detail && ( {item.isMore && item.detail && (
<View> <View>
{item.detail.map((obj) => ( {item.detail.map((obj) => (
<View key={obj.id}> <View key={obj.id}>
<View style='height: 57rpx'></View> <View style="height: 57rpx"></View>
<View className='month_item'> <View className="month_item">
<View className='month_item_date'> <View className="month_item_date">
{obj.updateTime} {obj.updateTime}
</View> </View>
<View className='month_image_box flex sb'> <View className="month_image_box flex sb">
{obj.clockImg.map((img) => ( {obj.clockImg.map((img) => (
<Image <Image
key={img} key={img}
className='month_item_cover' className="month_item_cover"
src={img} src={img}
></Image> ></Image>
))} ))}
</View> </View>
<View className='month_item_date'> <View className="month_item_date">
{/* 小紫弹智能射频仪、花至抗老射频仪PRO{" "} */} {/* 小紫弹智能射频仪、花至抗老射频仪PRO{" "} */}
{obj.instrumentName === null {obj.instrumentName === null
? "" ? ""
: obj.instrumentName} : obj.instrumentName}
</View> </View>
<View className='month_item_note'> <View className="month_item_note">
{obj.clockContent} {obj.clockContent}
</View> </View>
</View> </View>
@ -791,8 +817,8 @@ export default class Recording extends Component<any, any> {
</View> </View>
)} )}
{!clockShow && ViewAddInstrument === "true" && ( {!clockShow && ViewAddInstrument === "true" && (
<View className='footer flex aitems'> <View className="footer flex aitems">
<View className='btn' onClick={this.setShow.bind(this, true)}> <View className="btn" onClick={this.setShow.bind(this, true)}>
</View> </View>
{/* <View className="text" onClick={this.back}> {/* <View className="text" onClick={this.back}>
@ -802,64 +828,64 @@ export default class Recording extends Component<any, any> {
)} )}
<Popup show={show} onClose={() => this.setState({ show: false })}> <Popup show={show} onClose={() => this.setState({ show: false })}>
<View className='popBox'> <View className="popBox">
<Image <Image
className='close_icon' className="close_icon"
src={require("@/img/close.png")} src={require("@/img/close.png")}
mode='widthFix' mode="widthFix"
onClick={this.setShow.bind(this, false)} onClick={this.setShow.bind(this, false)}
></Image> ></Image>
<View className='popTitle'></View> <View className="popTitle"></View>
<View className='popSubtitle'> <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)}% {(clockStatistics[0]?.percentage * 100).toFixed(1)}%
</View> </View>
</View> </View>
<View className='img_box'> <View className="img_box">
{punchInInfo.clockImageList.map((item, index) => ( {punchInInfo.clockImageList.map((item, index) => (
<View key={item} className='img'> <View key={item} className="img">
<Image className='showImg' src={item} mode='widthFix'></Image> <Image className="showImg" src={item} mode="widthFix"></Image>
<Image <Image
className='closeImg' className="closeImg"
src={require("@/img/close1.png")} src={require("@/img/close1.png")}
mode='widthFix' mode="widthFix"
onClick={this.delImg.bind(this, index)} onClick={this.delImg.bind(this, index)}
></Image> ></Image>
</View> </View>
))} ))}
{punchInInfo.clockImageList.length < 3 && ( {punchInInfo.clockImageList.length < 3 && (
<View <View
className='addBox' className="addBox"
onClick={this.handleChooseImage.bind(this)} onClick={this.handleChooseImage.bind(this)}
> >
<Image <Image
className='showImg' className="showImg"
src={require("@/img/clock_in_upload/add-image.png")} src={require("@/img/clock_in_upload/add-image.png")}
mode='widthFix' mode="widthFix"
></Image> ></Image>
</View> </View>
)} )}
</View> </View>
<View className='info4'> <View className="info4">
<View className='content'> <View className="content">
<Textarea <Textarea
placeholderStyle='color: #ccc; font-size: 26rpx;font-weight: 400;font-family: PingFang SC;' placeholderStyle="color: #ccc; font-size: 26rpx;font-weight: 400;font-family: PingFang SC;"
placeholder='请记录一下今天的护理心得吧' placeholder="请记录一下今天的护理心得吧"
maxlength={120} maxlength={120}
onInput={this.handleTextareaInput.bind(this)} onInput={this.handleTextareaInput.bind(this)}
value={punchInInfo.clockContent} value={punchInInfo.clockContent}
></Textarea> ></Textarea>
</View> </View>
<View className='tip'> <View className="tip">
{"" + (punchInInfo.clockContent.length || 0) + "/120"} {"" + (punchInInfo.clockContent.length || 0) + "/120"}
</View> </View>
</View> </View>
<View className='popbtnbox flex aitems jcenter'> <View className="popbtnbox flex aitems jcenter">
<View className='btn1' onClick={this.submit.bind(this)}> <View className="btn1" onClick={this.submit.bind(this)}>
</View> </View>
</View> </View>

Loading…
Cancel
Save