diff --git a/assets/langs/en_US.json b/assets/langs/en_US.json index 25e8c88..43ac062 100644 --- a/assets/langs/en_US.json +++ b/assets/langs/en_US.json @@ -1,8 +1,8 @@ -{ +{ "语言名称":"English", "菜单": { "首页": "Home", - "报告": "Reports", + "报告": "Report", "小e": "Little e", "消息": "Messages", "我的": "Me" @@ -10,51 +10,49 @@ "首页": { "登录": "Login", "提示标题": "Dear user, please note the following before binding:", - "提示内容1": "1. Is the sensor powered on successfully, with the control box in fast green blinking state?", - "提示内容2": "2. Grant Bluetooth and location (positioning service) permissions to the APP;", - "提示内容3": "3. If using the scan function, please grant camera permission.", + "提示内容1": "1. Is the sensor powered on successfully with the control box flashing green rapidly?", + "提示内容2": "2. Grant Bluetooth and location permissions to the app", + "提示内容3": "3. If using the scan function, grant camera permission", "扫一扫绑定": "Scan to add new device", "蓝牙绑定": "Search nearby devices via Bluetooth", "已关联体征监测设备": "Bound vital sign monitoring devices", "我的e护": "My eCare", "云关爱": "Cloud Care", - "报告详情": "Report Details" + "报告详情": "Report details" }, "我的": { - "个人信息": "Personal Information", + "个人信息": "Personal information", "未登录": "Not logged in", "账号": "Account:", - "我的设备": "My Devices", - "设备报修": "Device Repair", - "操作说明": "User Manual", - "关注我们": "Follow Us", - "当前版本": "Current Version", + "我的设备": "My devices", + "设备报修": "Device repair", + "操作说明": "Instructions", + "关注我们": "Follow us", + "当前版本": "Current version", "未命名": "Unnamed", - "去登录": "Go to Login", + "去登录": "Go to login", "头像限制": "Avatar image cannot exceed 5MB", - "头像上传失败": "Avatar upload failed", - "未选择图片": "No image selected", - "上传成功": "Upload successful", - "保存失败": "Save failed", - "保存成功": "Save successful", - "昵称为空": "Nickname cannot be empty", - "查询失败": "Failed to query user information" - }, - "设备类型": { - "我的设备": "My Devices", - "请选择设备类型": "Please select device type", - "体征监测设备": "Vital Sign Monitoring Device", - "智能床/床垫": "Smart Bed/Mattress", - "摄像头": "Camera" + "头像上传失败":"Avatar upload failed", + "未选择图片":"No image selected", + "上传成功":"Upload successful", + "保存失败":"Save failed", + "保存成功":"Save successful", + "昵称为空":"Nickname cannot be empty", + "查询失败":"Failed to query user information" }, + "我的设备": "My devices", + "请选择设备类型": "Please select device type", + "体征监测设备": "Vital sign monitoring device", + "智能床/床垫": "Smart bed/mattress", + "摄像头": "Camera", "绑定引导":{ - "说明标题": "Device Placement Instructions:", - "说明正文": "This vital sign monitoring device is used under the mattress (note: the side with the label should face upward), preferably placed directly below the user's chest. After placement, connect to power. When the control box blinks green rapidly, you can proceed with the binding process.", + "说明标题": "Device placement instructions:", + "说明正文": "This vital sign monitoring device should be placed under the mattress (label side facing up), preferably directly below the user's chest area. After placement, connect to power. When the control box flashes green rapidly, you can begin the binding process.", "不再提示": "Don't show again", "跳过": "Skip" }, "蓝牙绑定":{ - "标题":"Bluetooth", + "标题":"Bluetooth Binding", "扫描":"Scanning Bluetooth devices...", "信号":"Minimum signal strength", "搜索提示":"Search devices", @@ -70,24 +68,24 @@ "版本":"Version", "默认设备名称":"Unknown device", "传感器":"Sensor", - "可绑定":"Bindable", - "已被绑定":"Already bound", + "可绑定":"Available", + "已被绑定":"Bound", "双人版绑定标题":"This is a dual-user device, please select", "绑定全部":"Bind all", - "主设备":"Main device:", + "主设备":"Primary device:", "从设备":"Secondary device:", "确定":"Confirm", "取消":"Cancel", "无法绑定":"Cannot bind!", "无法绑定1":"Detected that this device", "无法绑定2":"has been bound", - "无法绑定3":", please unbind before binding again. Contact customer service if you have questions", + "无法绑定3":", please unbind first before binding. Contact customer service if you have questions", "知道了":"Got it", "是":"Yes", "否":"No", - "确定绑定提示":"Confirm to bind this device?", - "连接成功":"Connection successful", - "连接异常":"Connection exception", + "确定绑定提示":"Confirm binding this device?", + "连接成功":"Bluetooth connected successfully", + "连接异常":"Bluetooth connection exception", "连接":"Connect", "输入wifi密码":"Please enter WiFi password", "显示密码":"Show", @@ -95,34 +93,34 @@ }, "登录页":{ "欢迎使用太和e护":"Welcome to Taihe eCare", - "科技睡眠 洞悉万千":"Technological Sleep, Insightful Monitoring", + "科技睡眠 洞悉万千":"Tech sleep, insightful data", "本机号码一键登录/注册":"One-click login/registration with this device's number", - "其他手机号码":"Other phone number", - "协议1":"Login means automatic registration and represents your agreement to", + "其他手机号码":"Other account login", + "协议1":"By logging in you automatically register and agree to", "协议2":"User Agreement", "协议3":"and", "协议4":"Privacy Policy", "协议5":"as well as", "协议6":"Terms of Use", "其他登录方式":"Welcome to Taihe eCare", - "未同意协议":"Please confirm agreement" + "未同意协议":"Please agree to the terms" }, "人员资料":{ "标题":"User Information", "保存":"Save", - "名字输入提示":"User name", - "生日输入提示":"Birthday", - "体重输入提示":"Weight", - "疾病标题":"Chronic Disease Management", - "提示":"Note: Providing accurate user information can make sleep report monitoring data more precise!" + "名字输入提示":"User name (required)", + "生日输入提示":"Birthday (required)", + "体重输入提示":"Weight kg (required)", + "疾病标题":"Chronic disease management", + "提示":"Tip: Providing accurate user information can make sleep report monitoring data more precise!" }, "绑定成功":{ - "标题":"Binding Completed", - "绑定成功":"Binding successful! ", + "标题":"Binding Complete", + "绑定成功":"Binding successful!", "分享标题":"Share now?", - "分享内容":"After successful device binding, if you want to share your sleep status with friends or family, you can share immediately. After successful sharing, the recipient will have access to view this device's data and receive sleep reports.", - "立即分享":"Share Now", - "返回":"Return to Home" + "分享内容":"After successful device binding, you can share your sleep data with friends or family. After sharing, they will have access to view this device's sleep reports.", + "立即分享":"Share now", + "返回":"Back" }, "日期":{ "取消":"Cancel", @@ -134,47 +132,47 @@ "wifi页":{ "标题":"WiFi Configuration", "跳过":"Skip", - "WLAN":"WLAN", + "WLAN":"Network", "未连接":"Not connected", "已连接":"Connected", - "可用WLAN":"Available WLAN", + "可用WLAN":"Available WiFi", "刷新":"Refresh", "密码为空":"Password cannot be empty", - "配网成功":"Network configuration successful", + "配网成功":"Network configured successfully", "配网失败":"Network configuration failed", "配网中":"Configuring network", - "需配网":"Please configure network for the device!" + "需配网":"Please configure network for device!" }, "其他手机登录页":{ "输入内容":"Enter phone number/email", "输入验证码":"Enter verification code", - "获取验证码":"code", + "获取验证码":"Get verification code", "登录":"Login", "请输入手机号":"Please enter phone number/email", - "不正确手机号":"Please enter correct phone number or email", + "不正确手机号":"Please enter valid phone number or email", "请输入验证码":"Please enter verification code", "登录成功":"Login successful", - "秒":"s", + "秒":"seconds", "发送成功":"Verification code sent successfully", - "发送失败":"Verification code sending failed", + "发送失败":"Failed to send verification code", "登录失败":"Login failed" }, "修改资料页":{ "个人信息":"Personal Information", "保存":"Save", "点击更换头像":"Click to change avatar", - "保存成功":"Save successful!", + "保存成功":"Saved successfully!", "保存失败":"Save failed!" }, "设置页":{ "标题":"Settings", - "主题模式":"Theme Mode", - "选择语言":"Language", - "关于我们":"About Us", + "主题模式":"Theme mode", + "选择语言":"Language selection", + "关于我们":"About us", "用户协议":"User Agreement", "隐私协议":"Privacy Policy", "退出登录":"Logout", - "注销账号":"Delete Account", + "注销账号":"Delete account", "退出成功":"Logout successful", "退出失败":"Logout failed" }, @@ -182,7 +180,7 @@ "标题":"About Us" }, "服务器":{ - "失败":"Server internal error, please contact administrator" + "失败":"Server error, please contact administrator" }, "体征检测设备":{ "标题":"Vital Sign Monitoring Device", @@ -193,13 +191,13 @@ "设备ID":"Device ID", "更新时间":"Update time", "设备来源":"Device source", - "设备状态":"Device status status", - "人员资料":"person", - "实时体征":"bodyData", - "消息回看":"message", - "健康报告":"report", - "首页展示":"Show on Home", - "设备详情":"Device Details", + "设备状态":"Device status", + "人员资料":"User information", + "实时体征":"Real-time vitals", + "消息回看":"Message review", + "健康报告":"Health report", + "首页展示":"Home display", + "设备详情":"Device details", "重命名":"Rename", "删除":"Delete" }, @@ -216,12 +214,12 @@ "故障状态":"Fault status" }, "实时体征":{ - "标题":"Real-time Data", + "标题":"Real-time Vitals", "姓名":"Name", "年龄":"Age", "设备ID":"Device ID", "体重":"Weight", - "提示":"Note: During real-time vital sign analysis, the user should lie on the designated bed with the device functioning normally. Keep the body still for about 10-30 seconds to display real-time vital sign data." + "提示":"Tip: For real-time vital analysis, the user should lie on the designated bed with the device functioning normally. Keep still for 10-30 seconds to display real-time vital data." }, "待开发":{ "提示":"Feature in development..." @@ -237,13 +235,13 @@ "设备列表请求成功":"Device list request successful" }, "未命名":"Unnamed", - "未知时间":"-", - "设备ID":"ID", + "未知时间":"Unknown", + "设备ID":"Device ID", "更新时间":"Update time", "已分享":"Shared", "设备来源":"Device source", "云关爱":"Cloud Care", - "是否确认解绑":"Confirm to unbind?", + "是否确认解绑":"Confirm unbinding?", "请求失败":"Request failed!", "操作成功":"Operation successful!", "操作失败":"Operation failed!", @@ -252,54 +250,54 @@ "请选择生日":"Please select birthday", "请输入体重":"Please enter weight", "必须登录提示":"Please login first!", - "待开发功能":"Feature in development...", - "未知数据":"-", - "在离床":"On/Off Bed", - "体动":"Movement", - "心率":"Heart Rate", + "待开发功能":"New feature coming soon", + "未知数据":"Unknown", + "在离床":"In/Out of bed", + "体动":"Body movement", + "心率":"Heart rate", "打鼾":"Snoring", - "呼吸":"Breathing", + "呼吸":"Respiration", "呼吸暂停":"Apnea", - "请保持静止":"Please keep still", - "健康报告":"Health Report", + "请保持静止":"Please remain still", + "健康报告":"Health report", "修改人员名称":"Modify user name", "在线":"Online", "离线":"Offline", "有更新":"Update available", - "无更新":"No update", - "有故障":"Fault detected", - "无故障":"No fault", - "人":"Person", + "无更新":"Up to date", + "有故障":"Malfunction", + "无故障":"Normal", + "人":"person", "WIFI配置":"WiFi Configuration", - "分享设备":"Share Device", - "消息设置":"Message Settings", - "设备分享":"Device Sharing", - "请输入对方手机号或邮箱":"Please enter recipient's phone number or email", - "微信好友一键分享":"Share with WeChat friends", - "发送邀请":"Send Invitation", + "分享设备":"Share device", + "消息设置":"Message settings", + "设备分享":"Device sharing", + "请输入对方手机号或邮箱":"Please enter recipient's phone/email", + "微信好友一键分享":"Share via WeChat", + "发送邀请":"Send invitation", "要分享的设备":"Device to share", - "主设备":"Main device:", + "主设备":"Primary device:", "从设备":"Secondary device:", - "邀请成功":"Invitation sent successfully!", + "邀请成功":"Invitation sent!", "邀请失败":"Invitation failed!", "请输入手机号或者邮箱":"Please enter phone number or email", - "请输入正确的手机号或者邮箱":"Please enter correct phone number or email", - "体征消息":"Vital Sign Messages", - "系统消息":"System Messages", + "请输入正确的手机号或者邮箱":"Please enter valid phone number or email", + "体征消息":"Vital messages", + "系统消息":"System messages", "无需处理":"No action needed", "待处理":"Pending", - "已处理":"Done", + "已处理":"Processed", "已超时":"Timeout", - "是否确认接受该设备":"Confirm to accept this device?", + "是否确认接受该设备":"Confirm accepting this device?", "信号强度":"Signal strength:", - "设备升级":"Device Upgrade", + "设备升级":"Device upgrade", "设备故障":"Device malfunction!", - "是否在床":"On bed:", - "在床":"On", - "离床":"Off", - "较弱":"Very weak", - "弱":"Weak", - "一般":"Normal", + "是否在床":"In bed:", + "在床":"In bed", + "离床":"Out of bed", + "较弱":"Weak", + "弱":"Fair", + "一般":"Average", "强":"Strong", "网络状态":"Network status:", "确认":"Confirm", @@ -307,49 +305,121 @@ "搜索":"Search", "名称":"Name:", "账号":"Account:", - "分享时间":"Share time:", - "设备校准":"Device Calibration", - "离床校准":"Off-bed Calibration", + "分享时间":"Share time", + "设备校准":"Device calibration", + "离床校准":"Out-of-bed calibration", "未完成":"Incomplete", - "已完成":"Completed", - "位置校准":"Position Calibration", + "已完成":"Complete", + "位置校准":"Position calibration", "床头":"Bed head", - "离床校准提示":"Please have the calibrator temporarily leave the bed and keep the surroundings quiet during calibration", - "位置校准提示":"Please have the calibrator lie flat on the designated side (indicated by arrow) for 10 seconds before clicking start", - "开始校准":"Start Calibration", - "校准完成":"Calibration completed!", - "微信安装提示":"Please install WeChat APP first to use WeChat login", + "离床校准提示":"Please have the calibrator temporarily leave the bed and keep quiet during calibration", + "位置校准提示":"Please have the calibrator lie on the designated side (arrow) for 10 seconds before starting", + "开始校准":"Start calibration", + "校准完成":"Calibration complete!", + "微信安装提示":"Please install WeChat APP first", "安卓启用网络提示":"", "ios启用网络提示":"", - "设备报修":"Device Repair", + "设备报修":"Device repair", "联系人":"Contact", "手机号":"Phone number", - "名称输入提示":"Please enter contact name", - "手机号输入提示":"Please enter contact phone number", + "名称输入提示":"Enter contact name", + "手机号输入提示":"Enter contact phone number", "提交":"Submit", - "设备参数":"Parameters", - "问题描述":"Problem description (within 60 characters)", - "上传提示":"Click to upload device fault photos or videos", - "设备参数提示":"Please enter device parameters", - "选择设备":"Please select device", + "设备参数":"Device parameters", + "问题描述":"Issue description (within 60 characters)", + "上传提示":"Click to upload malfunction photos", + "设备参数提示":"Enter device parameters", + "选择设备":"Select device", "上传限制":"File cannot exceed 5MB", - "选择语言":"Select Language", - "设备列表":"device list", - "图片未上传": "Image not uploaded", - "设备未选择": "Device not selected", - "参数未填写": "Parameters not filled in", - "问题描述未填写": "Please upload an image or video", - "编辑":"edit", - "滑动退出提醒": "Press again to exit the app", - "操作说明":"help guide", - "关注我们":"Follow Us", - "申请记录": "Application Record", - "设备类型": "Device Type", - "发生时间": "Time of Occurrence", - "最小信号强度": "Minimum RSSI", - "匹配出的外围设备": "Matched Peripheral Device", - "连接中...": "connecting", - "刷新":"refresh", - "版本":"version:" + "选择语言":"Select language", + "设备列表":"Device list", + "图片未上传":"Image not uploaded", + "设备未选择":"Device not selected", + "参数未填写":"Parameters not filled", + "问题描述未填写":"Issue not described", + "编辑":"Edit", + "滑动退出提醒":"Press again to exit", + "操作说明":"Instructions", + "关注我们":"Follow us", + "申请记录":"Application records", + "设备类型":"Device type", + "发生时间":"Occurrence time", + "最小信号强度":"Minimum signal strength", + "匹配出的外围设备":"Matched peripheral devices", + "连接中...": "Connecting", + "刷新":"Refresh", + "版本":"Version:", + "日报":"Daily", + "月报":"Monthly", + "周报":"Weekly", + "4g设备配置wifi提示":"4G device doesn't require WiFi configuration", + "微信客服提示":"Please install WeChat APP first to contact support", + "打开微信客服提示":"Opening WeChat support...", + "身高":"Height", + "身高输入提示":"Enter height cm (required)", + "用户协议":"User Agreement", + "隐私协议":"Privacy Policy", + "呼吸基准":"Respiration baseline", + "呼吸基准介绍":"Respiration baseline introduction.", + "删除错误提示":"Please select at least one item", + "解绑":"Unbind", + "删除":"Delete", + "校准未完成提示":"Calibration incomplete, confirm exit?", + "确定":"Confirm", + "查看":"View", + "报修成功标题":"Repair request submitted", + "报修成功":"Repair request successful!", + "查看报修历史":"View repair history", + "报修成功标语":"After submission, our support will contact you. Please keep your phone available. Thank you for your support!", + "问题描述字数限制":"Description exceeds character limit", + "30天平均分":"30-day ave", + "睡眠等级":"Sleep grade", + "睡眠评分":"Sleep score", + "睡眠规律性":"Sleep regularity", + "入睡时间":"Sleep time", + "睡眠时长":"Sleep duration", + "起床时间":"Wake time", + "小时":"hours", + "分钟":"minutes", + "消息提醒设置":"Message notification settings", + "APP消息":"APP messages", + "APP消息介绍":"Open 'Taihe eCare' APP to view device messages", + "通用APP消息介绍":"Open 'Taihe eCare' APP to view messages", + "服务号消息":"Service account messages", + "服务号消息介绍":"No need to open 'Taihe eCare' APP. After following Taihe eCare service account, receive device message notifications directly in WeChat", + "通用服务号消息介绍":"No need to open 'Taihe eCare' APP. After following Taihe eCare service account, receive message notifications directly in WeChat", + "消息通知":"Message notifications", + "绑定操作提示":"Device placement instructions", + "绑定操作提示介绍":"Enable device placement instructions prompt", + "设备升级通知":"Device upgrade notifications", + "设备升级通知介绍":"Enable device upgrade prompts", + "设备故障通知":"Device malfunction notifications", + "设备故障通知介绍":"Enable device malfunction prompts", + "全部消息":"All messages", + "请先在设置里的消息通知打开全部消息配置":"Please enable all message notifications in settings first", + "请先打开全部消息配置":"Please enable all message notifications first", + "正常值":"Normal range:", + "今日":"Today", + "深色":"Dark", + "皮肤指数":"Skin index", + "皮肤指数介绍":"The skin index calculates galvanic skin response during sleep to generate comprehensive evaluation metrics for physiological stress or autonomic nervous system activity.", + "自主神经平衡指数":"Autonomic nervous balance index", + "自主神经平衡指数监测介绍":"The Autonomic Nervous Balance Index is an important metric for assessing the functional state of the human autonomic nervous system (ANS), primarily reflecting the activity balance between sympathetic and parasympathetic nerves.", + "慢性病风险指数":"Chronic disease risk index", + "慢性病风险指数介绍":"The chronic disease risk index is a quantitative assessment model that integrates physiological indicators, lifestyle and other multidimensional data to predict users' future risk probability of chronic non-communicable diseases (such as hypertension, diabetes, coronary heart disease, cancer, etc.).", + "心理健康评估":"Mental health assessment", + "心理健康评估介绍":"Heart rate health assessment primarily uses sleep report timestamps, vital signs data and HRV data to determine mental health levels and fatigue degree.", + "呼吸暂停监测":"Apnea monitoring", + "呼吸暂停监测介绍":"Apnea monitoring refers to graphical explanation of apnea events during user's sleep.", + "打鼾监测":"Snoring monitoring", + "打鼾监测监测介绍":"Snoring monitoring refers to graphical explanation of snoring frequency during user's sleep.", + "呼吸数据":"Respiration data", + "呼吸数据介绍":"Respiration data refers to basic respiration metrics during sleep, serving as core indicators for evaluating sleep respiration quality and screening sleep breathing disorders.", + "心率散点图":"Heart rate scatter plot", + "心率散点图介绍":"The ECG scatter plot is a nonlinear graphical method for recording continuous heart rate RR interval diagrams, also called scatter plots as they consist of scattered points.", + "今日数据":"yesterday", + "昨日数据":"today", + "次":"times", + "秒":"sec" } \ No newline at end of file diff --git a/assets/langs/zh_CN.json b/assets/langs/zh_CN.json index c0d3f74..5d6ea38 100644 --- a/assets/langs/zh_CN.json +++ b/assets/langs/zh_CN.json @@ -120,7 +120,7 @@ "分享标题":"是否进行分享?", "分享内容":"设备绑定成功后,如需对朋友或家人共享我的睡眠情况,可以进行立即分享,分享成功后,对方即可享受查看该设备权限,可以收到该设备的睡眠报告。", "立即分享":"立即分享", - "返回":"返回首页 开启体验" + "返回":"返回" }, "日期":{ "取消":"取消", @@ -252,7 +252,7 @@ "请选择生日":"请选择生日", "请输入体重":"请输入体重", "必须登录提示":"请先登录!", - "待开发功能":"功能开发中...", + "待开发功能":"新功能开发中,敬请期待", "未知数据":"-", "在离床":"在离床", "体动":"体动", @@ -400,6 +400,28 @@ "全部消息":"全部消息", "请先在设置里的消息通知打开全部消息配置":"请先在设置里的消息通知打开全部消息配置", "请先打开全部消息配置":"请先打开全部消息配置", - "正常值":"正常值:" - + "正常值":"正常值:", + "今日":"今日", + "深色":"深色", + "皮肤指数":"皮肤指数", + "皮肤指数介绍":"皮肤指数通过用户睡眠过程中的体征数据,计算皮肤电反应,生成综合评估指标,用于睡眠中的生理应激状态或自主神经活动。", + "自主神经平衡指数":"自主神经平衡指数", + "自主神经平衡指数监测介绍":"自主神经平衡指数 是评估人体自主神经系统(ANS)功能状态的重要指标,主要反映交感神经和副交感神经的活性平衡关系。", + "慢性病风险指数":"慢性病风险指数", + "慢性病风险指数介绍":"慢性病风险指数是通过整合个体的生理指标、生活方式等多维度数据,构建的量化评估模型,用于预测用户未来患慢性非传染性疾病(如高血压、糖尿病、冠心病、癌症等)的风险概率。", + "心理健康评估":"心理健康评估", + "心理健康评估介绍":"心率健康评估主要通过用户睡眠报告中的时间点、体征数据及HRV数据等信息,来判断其心理健康水平、疲劳程度。", + "呼吸暂停监测":"呼吸暂停监测", + "呼吸暂停监测介绍":"呼吸暂停监测是指用户在睡眠过程中产生的呼吸暂停的图表说明。", + "打鼾监测":"打鼾监测", + "打鼾监测监测介绍":"打鼾监测是指用户在睡眠过程中打鼾频次的图表说明。", + "呼吸数据":"呼吸数据", + "呼吸数据介绍":"呼吸数据是指用户在睡眠过程中呼吸的基本数据,是评估睡眠呼吸质量、筛查睡眠呼吸障碍的核心指标。", + "心率散点图":"心率散点图", + "心率散点图介绍":"心电散点图是用非线性的图形方法描记的连续心冲击图的RR间期图,因图形由散点组成,又称散点图。", + "今日数据":"今日数据", + "昨日数据":"昨日数据", + "次":"次", + "秒":"秒" + } \ No newline at end of file diff --git a/assets/langs/zh_TW.json b/assets/langs/zh_TW.json index e656146..17216c4 100644 --- a/assets/langs/zh_TW.json +++ b/assets/langs/zh_TW.json @@ -1,352 +1,424 @@ { -"语言名称":"中文繁體", -"菜单": { -"首页": "首頁", -"报告": "報告", -"小e": "小e", -"消息": "消息", -"我的": "我的" -}, -"首页": { -"登录": "登錄", -"提示标题": "尊敬的用戶您好!綁定前請注意以下幾點:", -"提示内容1": "1.傳感器是否通電成功,控制盒呈綠燈快閃狀態;", -"提示内容2": "2.對APP進行藍牙和定位服務授權;", -"提示内容3": "3.若使用掃描功能,請對攝像頭進行授權。", -"扫一扫绑定": "掃描添加新設備", -"蓝牙绑定": "藍牙搜索附近設備", -"已关联体征监测设备": "已關聯體徵監測設備", -"我的e护": "我的e護", -"云关爱": "雲關愛", -"报告详情": "報告詳情" -}, -"我的": { -"个人信息": "個人資料", -"未登录": "未登入", -"账号": "帳號:", -"我的设备": "我的設備", -"设备报修": "設備報修", -"操作说明": "操作說明", -"关注我们": "關注我們", -"当前版本": "當前版本", -"未命名": "未命名", -"去登录": "去登錄", -"头像限制": "頭像圖片不能超過5MB", -"头像上传失败":"頭像上傳失敗", -"未选择图片":"未選擇圖片", -"上传成功":"上傳成功", -"保存失败":"保存失敗", -"保存成功":"保存成功", -"昵称为空":"暱稱不能為空", -"查询失败":"查詢用戶資料失敗" -}, -"我的设备": "我的設備", -"请选择设备类型": "請選擇設備類型", -"体征监测设备": "體徵監測設備", -"智能床/床垫": "智能床/床墊", -"摄像头": "攝像頭", -"绑定引导":{ -"说明标题": "設備放置說明:", -"说明正文": "該體徵監測設備在床墊下方使用(注意貼有標籤的一面朝上),放置在靠近使用人胸腔正下方為宜。放置完成後,連接電源,控制盒綠燈快閃時,可以進行綁定流程。", -"不再提示": "不再提示", -"跳过": "跳過" -}, -"蓝牙绑定":{ -"标题":"藍牙綁定", -"扫描":"掃描藍牙設備中…", -"信号":"最小信號強度", -"搜索提示":"檢索設備", -"搜索":"搜索", -"匹配":"匹配出的外圍設備", -"信号强度":"信號強度", -"SN":"SN", -"蓝牙地址":"藍牙地址", -"mac":"mac", -"网络":"網絡", -"在线":"在線", -"离线":"離線", -"版本":"版本", -"默认设备名称":"未知設備", -"传感器":"傳感器", -"可绑定":"可綁定", -"已被绑定":"已被綁定", -"双人版绑定标题":"該設備為雙人版,請選擇", -"绑定全部":"綁定全部", -"主设备":"主設備:", -"从设备":"從設備:", -"确定":"確定", -"取消":"取消", -"无法绑定":"無法綁定!", -"无法绑定1":"檢測到該設備", -"无法绑定2":"已被綁定", -"无法绑定3":",綁定前請先進行解綁,有疑問請聯繫客服", -"知道了":"知道了", -"是":"是", -"否":"否", -"确定绑定提示":"確定綁定該設備嗎?", -"连接成功":"藍牙連接成功", -"连接异常":"藍牙連接異常", -"连接":"連接", -"输入wifi密码":"請輸入wifi密碼", -"显示密码":"顯示", -"不显示密码":"不顯示" -}, -"登录页":{ -"欢迎使用太和e护":"歡迎使用太和e護", -"科技睡眠 洞悉万千":"科技睡眠 洞悉萬千", -"本机号码一键登录/注册":"本機號碼一鍵登錄/註冊", -"其他手机号码":"其他手機號碼", -"协议1":"登錄時將自動註冊,且代表您同意", -"协议2":"《用戶協議》", -"协议3":"和", -"协议4":"《隱私政策》", -"协议5":"以及", -"协议6":"《用戶使用條款》", -"其他登录方式":"歡迎使用太和e護", -"未同意协议":"請確認同意協議" -}, -"人员资料":{ -"标题":"人員資料", -"保存":"保存", -"名字输入提示":"使用人員姓名", -"生日输入提示":"生日", -"体重输入提示":"體重", -"疾病标题":"慢病管理", -"提示":"提示:填寫準確的使用人員相關資料,可以使睡眠報告監測數據更加精準!" -}, -"绑定成功":{ -"标题":"綁定完成", -"绑定成功":"綁定成功! ", -"分享标题":"是否進行分享?", -"分享内容":"設備綁定成功后,如需對朋友或家人共享我的睡眠情況,可以進行立即分享,分享成功后,對方即可享受查看該設備權限,可以收到該設備的睡眠報告。", -"立即分享":"立即分享", -"返回":"返回首頁 開啟體驗" -}, -"日期":{ -"取消":"取消", -"确定":"確定", -"年":"年", -"月":"月", -"日":"日" -}, -"wifi页":{ -"标题":"WIFI配置", -"跳过":"跳過", -"WLAN":"WLAN", -"未连接":"未連接", -"已连接":"已連接", -"可用WLAN":"可用WLAN", -"刷新":"刷新", -"密码为空":"密碼不能為空", -"配网成功":"配網成功", -"配网失败":"配網失敗", -"配网中":"配網中", -"需配网":"請給設備配置網絡!" -}, -"其他手机登录页":{ - "输入内容":"輸入手機號碼/郵箱", - "输入验证码":"輸入驗證碼", - "获取验证码":"獲取驗證碼", - "登录":"登錄", - "请输入手机号":"請輸入手機號/郵箱", - "不正确手机号":"請輸入正確的手機號或者郵箱", - "请输入验证码":"請輸入驗證碼", - "登录成功":"登錄成功", - "秒":"秒", - "发送成功":"驗證碼發送成功", - "发送失败":"驗證碼發送失敗", - "登录失败":"登錄失敗" -}, -"修改资料页":{ - "个人信息":"個人信息", - "保存":"保存", - "点击更换头像":"點擊更換頭像", - "保存成功":"保存成功!", - "保存失败":"保存失敗!" -}, -"设置页":{ - "标题":"設置", - "主题模式":"主題模式", - "选择语言":"選擇語言", - "关于我们":"關於我們", - "用户协议":"用戶協議", - "隐私协议":"隱私協議", - "退出登录":"退出登錄", - "注销账号":"註銷賬號", - "退出成功":"退出成功", - "退出失败":"退出失敗" -}, -"关于我们":{ - "标题":"關於我們" -}, -"服务器":{ - "失败":"服務器內部錯誤,請聯繫管理員" -}, -"体征检测设备":{ - "标题":"體徵監測設備", - "输入关键词":"輸入關鍵詞", - "搜索":"搜索", - "我的e护":"我的e護", + "语言名称":"中文繁體", + "菜单": { + "首页": "首頁", + "报告": "報告", + "小e": "小e", + "消息": "消息", + "我的": "我的" + }, + "首页": { + "登录": "登錄", + "提示标题": "尊敬的用戶您好!綁定前請注意以下幾點:", + "提示内容1": "1.傳感器是否上電成功,控制盒呈綠燈快閃狀態;", + "提示内容2": "2.對APP進行藍牙和位置(定位服務)授權;", + "提示内容3": "3.若使用掃一掃功能,請對攝像頭進行授權。", + "扫一扫绑定": "掃一掃添加新設備", + "蓝牙绑定": "藍牙搜附近的設備", + "已关联体征监测设备": "已關聯體徵監測設備", + "我的e护": "我的e護", + "云关爱": "雲關愛", + "报告详情": "報告詳情" + }, + "我的": { + "个人信息": "個人信息", + "未登录": "未登錄", + "账号": "賬號:", + "我的设备": "我的設備", + "设备报修": "設備報修", + "操作说明": "操作說明", + "关注我们": "關注我們", + "当前版本": "當前版本", + "未命名": "未命名", + "去登录": "去登錄", + "头像限制": "頭像圖片不能超過5MB", + "头像上传失败":"頭像上傳失敗", + "未选择图片":"未選擇圖片", + "上传成功":"上傳成功", + "保存失败":"保存失敗", + "保存成功":"保存成功", + "昵称为空":"暱稱不能為空", + "查询失败":"查詢用戶資料失敗" + }, + "我的设备": "我的設備", + "请选择设备类型": "請選擇設備類型", + "体征监测设备": "體徵監測設備", + "智能床/床垫": "智能床/床墊", + "摄像头": "攝像頭", + "绑定引导":{ + "说明标题": "設備放置說明:", + "说明正文": "該體徵監測設備在床墊下方使用(注意貼有標籤的一面朝上),放置在靠近使用人胸腔正下方為宜。放置完成後,連接電源,控制盒綠燈快閃時,可以進行綁定流程。", + "不再提示": "不再提示", + "跳过": "跳過" + }, + "蓝牙绑定":{ + "标题":"藍牙綁定", + "扫描":"掃描藍牙設備中…", + "信号":"最小信號強度", + "搜索提示":"檢索設備", + "搜索":"搜索", + "匹配":"匹配出的外圍設備", + "信号强度":"信號強度", + "SN":"SN", + "蓝牙地址":"藍牙地址", + "mac":"mac", + "网络":"網絡", + "在线":"在線", + "离线":"離線", + "版本":"版本", + "默认设备名称":"未知設備", + "传感器":"傳感器", + "可绑定":"可綁定", + "已被绑定":"已被綁定", + "双人版绑定标题":"該設備為雙人版,請選擇", + "绑定全部":"綁定全部", + "主设备":"主設備:", + "从设备":"從設備:", + "确定":"確定", + "取消":"取消", + "无法绑定":"無法綁定!", + "无法绑定1":"檢測到該設備", + "无法绑定2":"已被綁定", + "无法绑定3":",綁定前請先進行解綁,有疑問請聯繫客服", + "知道了":"知道了", + "是":"是", + "否":"否", + "确定绑定提示":"確定綁定該設備嗎?", + "连接成功":"藍牙連接成功", + "连接异常":"藍牙連接異常", + "连接":"連接", + "输入wifi密码":"請輸入wifi密碼", + "显示密码":"顯示", + "不显示密码":"不顯示" + }, + "登录页":{ + "欢迎使用太和e护":"歡迎使用太和e護", + "科技睡眠 洞悉万千":"科技睡眠 洞悉萬千", + "本机号码一键登录/注册":"本機號碼一鍵登錄/註冊", + "其他手机号码":"其他賬號登錄", + "协议1":"登錄時將自動註冊,且代表您同意", + "协议2":"《用戶協議》", + "协议3":"和", + "协议4":"《隱私政策》", + "协议5":"以及", + "协议6":"《用戶使用條款》", + "其他登录方式":"歡迎使用太和e護", + "未同意协议":"請確認同意協議" + }, + "人员资料":{ + "标题":"人員資料", + "保存":"保存", + "名字输入提示":"使用人員姓名(必填)", + "生日输入提示":"生日(必填)", + "体重输入提示":"體重kg(必填)", + "疾病标题":"慢病管理", + "提示":"提示:填寫準確的使用人員相關資料,可以使睡眠報告監測數據更加精準!" + }, + "绑定成功":{ + "标题":"綁定完成", + "绑定成功":"綁定成功! ", + "分享标题":"是否進行分享?", + "分享内容":"設備綁定成功後,如需對朋友或家人共享我的睡眠情況,可以進行立即分享,分享成功后,對方即可享受查看該設備權限,可以收到該設備的睡眠報告。", + "立即分享":"立即分享", + "返回":"返回" + }, + "日期":{ + "取消":"取消", + "确定":"確定", + "年":"年", + "月":"月", + "日":"日" + }, + "wifi页":{ + "标题":"WIFI配置", + "跳过":"跳過", + "WLAN":"網絡", + "未连接":"未連接", + "已连接":"已連接", + "可用WLAN":"可用WLAN", + "刷新":"刷新", + "密码为空":"密碼不能為空", + "配网成功":"配網成功", + "配网失败":"配網失敗", + "配网中":"配網中", + "需配网":"請給設備配置網絡!" + }, + "其他手机登录页":{ + "输入内容":"輸入手機號碼/郵箱", + "输入验证码":"輸入驗證碼", + "获取验证码":"獲取驗證碼", + "登录":"登錄", + "请输入手机号":"請輸入手機號/郵箱", + "不正确手机号":"請輸入正確的手機號或者郵箱", + "请输入验证码":"請輸入驗證碼", + "登录成功":"登錄成功", + "秒":"秒", + "发送成功":"驗證碼發送成功", + "发送失败":"驗證碼發送失敗", + "登录失败":"登錄失敗" + }, + "修改资料页":{ + "个人信息":"個人信息", + "保存":"保存", + "点击更换头像":"點擊更換頭像", + "保存成功":"保存成功!", + "保存失败":"保存失敗!" + }, + "设置页":{ + "标题":"設置", + "主题模式":"主題模式", + "选择语言":"選擇語言", + "关于我们":"關於我們", + "用户协议":"用戶協議", + "隐私协议":"隱私協議", + "退出登录":"退出登錄", + "注销账号":"註銷賬號", + "退出成功":"退出成功", + "退出失败":"退出失敗" + }, + "关于我们":{ + "标题":"關於我們" + }, + "服务器":{ + "失败":"服務器內部錯誤,請聯繫管理員" + }, + "体征检测设备":{ + "标题":"體徵監測設備", + "输入关键词":"輸入關鍵詞", + "搜索":"搜索", + "我的e护":"我的e護", + "云关爱":"雲關愛", + "设备ID":"設備ID", + "更新时间":"更新時間", + "设备来源":"設備來源", + "设备状态":"設備狀態", + "人员资料":"人員資料", + "实时体征":"實時體徵", + "消息回看":"消息回看", + "健康报告":"健康報告", + "首页展示":"首頁展示", + "设备详情":"設備詳情", + "重命名":"重命名", + "删除":"刪除" + }, + "设备详情":{ + "标题":"設備詳情", + "MAC":"MAC", + "设备来源":"設備來源", + "型号":"型號", + "设备名称":"設備名稱", + "网络状态":"網絡狀態", + "版本":"版本", + "更新状态":"更新狀態", + "更新时间":"更新時間", + "故障状态":"故障狀態" + }, + "实时体征":{ + "标题":"實時體徵", + "姓名":"姓名", + "年龄":"年齡", + "设备ID":"設備ID", + "体重":"體重", + "提示":"提示:實時體徵分析時,人員應躺在指定床位上且設備正常運行,保持身體靜止不動狀態下10~30秒左右,即可顯示實時體徵數據。" + }, + "待开发":{ + "提示":"功能開發中..." + }, + "扫一扫":{ + "标题":"掃一掃", + "提示":"請掃描設備二維碼", + "相册":"相冊", + "手电筒":"手電筒" + }, + "设备":{ + "设备列表请求失败":"設備列表請求失敗", + "设备列表请求成功":"設備列表請求成功" + }, + "未命名":"未命名", + "未知时间":"-", + "设备ID":"設備ID", + "更新时间":"更新時間", + "已分享":"已分享", + "设备来源":"設備來源", "云关爱":"雲關愛", - "设备ID":"設備ID", - "更新时间":"更新時間", - "设备来源":"設備來源", - "设备状态":"設備狀態", - "人员资料":"人員資料", - "实时体征":"實時體徵", - "消息回看":"消息回看", + "是否确认解绑":"是否確認解綁?", + "请求失败":"請求失敗!", + "操作成功":"操作成功!", + "操作失败":"操作失敗!", + "暂无数据":"暫無數據", + "请输入姓名":"請輸入姓名", + "请选择生日":"請選擇生日", + "请输入体重":"請輸入體重", + "必须登录提示":"請先登錄!", + "待开发功能":"新功能開發中,敬請期待", + "未知数据":"-", + "在离床":"在離床", + "体动":"體動", + "心率":"心率", + "打鼾":"打鼾", + "呼吸":"呼吸", + "呼吸暂停":"呼吸暫停", + "请保持静止":"請保持身體靜止", "健康报告":"健康報告", - "首页展示":"首頁展示", - "设备详情":"設備詳情", - "重命名":"重命名", - "删除":"刪除" -}, -"设备详情":{ - "标题":"設備詳情", - "MAC":"MAC", - "设备来源":"設備來源", - "型号":"型號", - "设备名称":"設備名稱", - "网络状态":"網絡狀態", - "版本":"版本", - "更新状态":"更新狀態", - "更新时间":"更新時間", - "故障状态":"故障狀態" -}, -"实时体征":{ - "标题":"實時體徵", - "姓名":"姓名", - "年龄":"年齡", - "设备ID":"設備ID", - "体重":"體重", - "提示":"提示:實時體徵分析時,人員應躺在指定床位上且設備正常運行,保持身體靜止不動狀態下10~30秒左右,即可顯示實時體徵數據。" -}, -"待开发":{ - "提示":"功能開發中..." -}, -"扫一扫":{ - "标题":"掃一掃", - "提示":"請掃描設備二維碼", - "相册":"相冊", - "手电筒":"手電筒" -}, -"设备":{ - "设备列表请求失败":"設備列表請求失敗", - "设备列表请求成功":"設備列表請求成功" -}, -"未命名":"未命名", -"未知时间":"-", -"设备ID":"設備ID", -"更新时间":"更新時間", -"已分享":"已分享", -"设备来源":"設備來源", -"云关爱":"雲關愛", -"是否确认解绑":"是否確認解綁?", -"请求失败":"請求失敗!", -"操作成功":"操作成功!", -"操作失败":"操作失敗!", -"暂无数据":"暫無數據", -"请输入姓名":"請輸入姓名", -"请选择生日":"請選擇生日", -"请输入体重":"請輸入體重", -"必须登录提示":"請先登錄!", -"待开发功能":"功能開發中...", -"未知数据":"-", -"在离床":"在離床", -"体动":"體動", -"心率":"心率", -"打鼾":"打鼾", -"呼吸":"呼吸", -"呼吸暂停":"呼吸暫停", -"请保持静止":"請保持身體靜止", -"健康报告":"健康報告", -"修改人员名称":"修改人員名稱", -"在线":"在線", -"离线":"離線", -"有更新":"有更新", -"无更新":"無更新", -"有故障":"有故障", -"无故障":"無故障", -"人":"人", -"WIFI配置":"WIFI配置", -"分享设备":"分享設備", -"消息设置":"消息設置", -"设备分享":"設備分享", -"请输入对方手机号或邮箱":"請輸入對方手機號或郵箱", -"微信好友一键分享":"微信好友一鍵分享", -"发送邀请":"發送邀請", -"要分享的设备":"要分享的設備", -"主设备":"主設備:", -"从设备":"從設備:", -"邀请成功":"邀請成功!", -"邀请失败":"邀請失敗!", -"请输入手机号或者邮箱":"請輸入手機號或者郵箱", -"请输入正确的手机号或者邮箱":"請輸入正確的手機號或者郵箱", -"体征消息":"體徵消息", -"系统消息":"系統消息", -"无需处理":"無需處理", -"待处理":"待處理", -"已处理":"已處理", -"已超时":"已超時", -"是否确认接受该设备":"是否確認接受該設備?", -"信号强度":"信號強度:", -"设备升级":"設備升級", -"设备故障":"設備發生故障!", -"是否在床":"是否在床:", -"在床":"在床", -"离床":"離床", -"较弱":"較弱", -"弱":"弱", -"一般":"一般", -"强":"強", -"网络状态":"網絡狀態:", -"确认":"確認", -"输入关键字":"輸入關鍵字", -"搜索":"搜索", -"名称":"名稱:", -"账号":"賬號:", -"分享时间":"分享時間", -"设备校准":"設備校準", -"离床校准":"離床校準", -"未完成":"未完成", -"已完成":"已完成", -"位置校准":"位置校準", -"床头":"床頭", -"离床校准提示":"請校準人員暫時離開床鋪且在校準期間保持周圍安靜", -"位置校准提示":"請校準人員到箭頭指定一側 平躺後點擊開始,保持10秒", -"开始校准":"開始校準", -"校准完成":"校準完成!", -"微信安装提示":"請先安裝微信APP,再使用微信登錄", -"安卓启用网络提示":"", -"ios启用网络提示":"", -"设备报修":"設備報修", -"联系人":"聯繫人", -"手机号":"手機號", -"名称输入提示":"請輸入聯繫人名稱", -"手机号输入提示":"請輸入聯繫人手機號", -"提交":"提交", -"设备参数":"設備參數", -"问题描述":"問題描述(60個字以內)", -"上传提示":"點擊上傳設備故障照片或視頻", -"设备参数提示":"請輸入設備參數", -"选择设备":"請選擇設備", -"上传限制":"文件不能超過5MB", -"选择语言":"選擇語言", -"设备列表":"設備列表", -"图片未上传":"圖片未上傳", -"设备未选择":"設備未選擇", -"参数未填写":"參數未填寫", -"问题描述未填写":"請上傳圖片或視頻", -"编辑":"編輯", -"滑动退出提醒":"再按一次退出程序", -"操作说明":"操作說明", -"关注我们":"關注我們", -"申请记录":"申請記錄", -"设备类型":"設備類型", -"发生时间":"發生時間", -"最小信号强度":"最小信號強度", -"匹配出的外围设备":"發生時間", -"连接中...": "連接中", -"刷新":"刷新", -"版本":"版本:" + "修改人员名称":"修改人員名稱", + "在线":"在線", + "离线":"離線", + "有更新":"有更新", + "无更新":"無更新", + "有故障":"有故障", + "无故障":"無故障", + "人":"人", + "WIFI配置":"WIFI配置", + "分享设备":"分享設備", + "消息设置":"消息設置", + "设备分享":"設備分享", + "请输入对方手机号或邮箱":"請輸入對方手機號或郵箱", + "微信好友一键分享":"微信好友一鍵分享", + "发送邀请":"發送邀請", + "要分享的设备":"要分享的設備", + "主设备":"主設備:", + "从设备":"從設備:", + "邀请成功":"邀請成功!", + "邀请失败":"邀請失敗!", + "请输入手机号或者邮箱":"請輸入手機號或者郵箱", + "请输入正确的手机号或者邮箱":"請輸入正確的手機號或者郵箱", + "体征消息":"體徵消息", + "系统消息":"系統消息", + "无需处理":"無需處理", + "待处理":"待處理", + "已处理":"已處理", + "已超时":"已超時", + "是否确认接受该设备":"是否確認接受該設備?", + "信号强度":"信號強度:", + "设备升级":"設備升級", + "设备故障":"設備發生故障!", + "是否在床":"是否在床:", + "在床":"在床", + "离床":"離床", + "较弱":"較弱", + "弱":"弱", + "一般":"一般", + "强":"強", + "网络状态":"網絡狀態:", + "确认":"確認", + "输入关键字":"輸入關鍵字", + "搜索":"搜索", + "名称":"名稱:", + "账号":"賬號:", + "分享时间":"分享時間", + "设备校准":"設備校準", + "离床校准":"離床校準", + "未完成":"未完成", + "已完成":"已完成", + "位置校准":"位置校準", + "床头":"床頭", + "离床校准提示":"請校準人員暫時離開床鋪且在校準期間保持周圍安靜", + "位置校准提示":"請校準人員到箭頭指定一側 平躺後點擊開始,保持10秒", + "开始校准":"開始校準", + "校准完成":"校準完成!", + "微信安装提示":"請先安裝微信APP,再使用微信登錄", + "安卓启用网络提示":"", + "ios启用网络提示":"", + "设备报修":"設備報修", + "联系人":"聯繫人", + "手机号":"手機號", + "名称输入提示":"請輸入聯繫人名稱", + "手机号输入提示":"請輸入聯繫人手機號", + "提交":"提交", + "设备参数":"設備參數", + "问题描述":"問題描述(60個字以內)", + "上传提示":"點擊上傳設備故障照片", + "设备参数提示":"請輸入設備參數", + "选择设备":"請選擇設備", + "上传限制":"文件不能超過5MB", + "选择语言":"選擇語言", + "设备列表":"設備列表", + "图片未上传":"圖片未上傳", + "设备未选择":"設備未選擇", + "参数未填写":"參數未填寫", + "问题描述未填写":"問題描述未填寫", + "编辑":"編輯", + "滑动退出提醒":"再按一次退出程序", + "操作说明":"操作說明", + "关注我们":"關注我們", + "申请记录":"申請記錄", + "设备类型":"設備類型", + "发生时间":"發生時間", + "最小信号强度":"最小信號強度", + "匹配出的外围设备":"匹配出的外圍設備", + "连接中...": "連接中", + "刷新":"刷新", + "版本":"版本:", + "日报":"日報", + "月报":"月報", + "周报":"週報", + "4g设备配置wifi提示":"該設備為4G設備,無需配置wifi", + "微信客服提示":"請先安裝微信APP,再聯繫客服", + "打开微信客服提示":"正在打開微信客服...", + "身高":"身高", + "身高输入提示":"請輸入身高cm(必填)", + "用户协议":"用戶協議", + "隐私协议":"隱私協議", + "呼吸基准":"呼吸基準", + "呼吸基准介绍":"呼吸基準介紹。", + "删除错误提示":"請至少選擇一項", + "解绑":"解綁", + "删除":"刪除", + "校准未完成提示":"校準還未完成,是否確認退出校準流程?", + "确定":"確定", + "查看":"查看", + "报修成功标题":"報修成功", + "报修成功":"報修成功!", + "查看报修历史":"查看報修歷史", + "报修成功标语":"報修申請提交後,我們的後台客服人員會與您取得聯繫,請保持電話暢通,感謝您對本產品的支持!", + "问题描述字数限制":"問題描述字數超過限制", + "30天平均分":"30天平均分", + "睡眠等级":"睡眠等級", + "睡眠评分":"睡眠評分", + "睡眠规律性":"睡眠規律性", + "入睡时间":"入睡時間", + "睡眠时长":"睡眠時長", + "起床时间":"起床時間", + "小时":"小時", + "分钟":"分鐘", + "消息提醒设置":"消息提醒設置", + "APP消息":"APP消息", + "APP消息介绍":"打開“太和e護”APP,可以查看該設備的消息內容", + "通用APP消息介绍":"打開“太和e護”APP,可以查看消息內容", + "服务号消息":"服務號消息", + "服务号消息介绍":"無需打開“太和e護”APP,關注太和e護服務號後,微信內即可接收該設備消息推送", + "通用服务号消息介绍":"無需打開“太和e護”APP,關注太和e護服務號後,微信內即可接收消息推送", + "消息通知":"消息通知", + "绑定操作提示":"設備放置說明", + "绑定操作提示介绍":"是否打開設備放置說明的提示", + "设备升级通知":"設備升級通知", + "设备升级通知介绍":"是否打開設備升級的提示", + "设备故障通知":"設備故障通知", + "设备故障通知介绍":"是否打開設備故障的提示", + "全部消息":"全部消息", + "请先在设置里的消息通知打开全部消息配置":"請先在設置裡的消息通知打開全部消息配置", + "请先打开全部消息配置":"請先打開全部消息配置", + "正常值":"正常值:", + "今日":"今日", + "深色":"深色", + "皮肤指数":"皮膚指數", + "皮肤指数介绍":"皮膚指數通過用戶睡眠過程中的體徵數據,計算皮膚電反應,生成綜合評估指標,用於睡眠中的生理應激狀態或自主神經活動。", + "自主神经平衡指数":"自主神經平衡指數", + "自主神经平衡指数监测介绍":"自主神經平衡指數 是評估人體自主神經系統(ANS)功能狀態的重要指標,主要反映交感神經和副交感神經的活性平衡關係。", + "慢性病风险指数":"慢性病風險指數", + "慢性病风险指数介绍":"慢性病風險指數是通過整合個體的生理指標、生活方式等多維度數據,構建的量化評估模型,用於預測用戶未來患慢性非傳染性疾病(如高血壓、糖尿病、冠心病、癌症等)的風險概率。", + "心理健康评估":"心理健康評估", + "心理健康评估介绍":"心率健康評估主要通過用戶睡眠報告中的時間點、體徵數據及HRV數據等信息,來判斷其心理健康水平、疲勞程度。", + "呼吸暂停监测":"呼吸暫停監測", + "呼吸暂停监测介绍":"呼吸暫停監測是指用戶在睡眠過程中產生的呼吸暫停的圖表說明。", + "打鼾监测":"打鼾監測", + "打鼾监测监测介绍":"打鼾監測是指用戶在睡眠過程中打鼾頻次的圖表說明。", + "呼吸数据":"呼吸數據", + "呼吸数据介绍":"呼吸數據是指用戶在睡眠過程中呼吸的基本數據,是評估睡眠呼吸質量、篩查睡眠呼吸障礙的核心指標。", + "心率散点图":"心率散點圖", + "心率散点图介绍":"心電散點圖是用非線性的圖形方法描記的連續心衝擊圖的RR間期圖,因圖形由散點組成,又稱散點圖。", + "今日数据":"今日數據", + "昨日数据":"昨日數據", + "次":"次", + "秒":"秒" } \ No newline at end of file diff --git a/lib/common/util/MyUtils.dart b/lib/common/util/MyUtils.dart index ffdaef3..76c1121 100644 --- a/lib/common/util/MyUtils.dart +++ b/lib/common/util/MyUtils.dart @@ -8,12 +8,17 @@ import 'package:vbvs_app/common/color/app_uri_status.dart'; import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/controller/setting/language/language_controller.dart'; import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; +import 'package:vbvs_app/language/AppLanguage.dart'; import 'package:vbvs_app/model/api_response.dart'; ThemeController themeController = Get.find(); LanguageController languageController = Get.find(); class MyUtils { + static String formatDate(DateTime dateTime) { + return "${dateTime.year}-${dateTime.month}-${dateTime.day.toString().padLeft(2, '0')}"; + } + static String formatToDate(int timestamp) { final dateTime = DateTime.fromMillisecondsSinceEpoch(timestamp); return "${dateTime.year}-${dateTime.month}-${dateTime.day.toString().padLeft(2, '0')}"; @@ -171,10 +176,16 @@ class MyUtils { DateTime target = DateTime(date.year, date.month, date.day); if (target == today) { - return '今日'; + return '今日'.tr; + } + List weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']; + String currentLanguageCode = AppLanguage().getCurrentLanguageCode(); + if (currentLanguageCode != null) { + if (currentLanguageCode != "zh_CN") { + weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + } } - const List weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']; return weekdays[date.weekday % 7]; // Dart中星期日是7,要映射到索引0 } @@ -197,6 +208,23 @@ class MyUtils { return '$dateStr $weekStr'; } + + static String getFormatEnglishDate(int millis) { + final date = DateTime.fromMillisecondsSinceEpoch(millis); + const weekdays = [ + 'Monday', + 'Tuesday', + 'Wednesday', + 'Thursday', + 'Friday', + 'Saturday', + 'Sunday' + ]; + final weekday = weekdays[date.weekday - 1]; + final formattedDate = + '${date.year}/${date.month.toString().padLeft(2, '0')}/${date.day.toString().padLeft(2, '0')}'; + return '$weekday, $formattedDate'; + } } Color stringToColor(String hexColor) { diff --git a/lib/component/home_page/DynamicReportDetailWidget.dart b/lib/component/home_page/DynamicReportDetailWidget.dart index 5b00bea..54336c8 100644 --- a/lib/component/home_page/DynamicReportDetailWidget.dart +++ b/lib/component/home_page/DynamicReportDetailWidget.dart @@ -11,33 +11,50 @@ import 'package:vbvs_app/component/home_page/SleepDateWidget.dart'; import 'package:vbvs_app/component/tool/ClickableContainer.dart'; import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; -class DynamicReportDetailWidget extends StatelessWidget { +class DynamicReportDetailWidget extends StatefulWidget { final List sleepDateWidgets; final List sleepDataModuleWidgets; - final ThemeController themeController = Get.find(); final Map targetDevice; - late ScrollController _scrollController; - DynamicReportDetailWidget({ + const DynamicReportDetailWidget({ + Key? key, required this.sleepDateWidgets, required this.sleepDataModuleWidgets, required this.targetDevice, - }); + }) : super(key: key); + + @override + State createState() => + _DynamicReportDetailWidgetState(); +} + +class _DynamicReportDetailWidgetState extends State { + final ThemeController themeController = Get.find(); + final ScrollController _scrollController = ScrollController(); + bool _hasScrolled = false; + + @override + void initState() { + super.initState(); + + WidgetsBinding.instance.addPostFrameCallback((_) { + Future.delayed(Duration(milliseconds: 100), () { + if (!_hasScrolled && + _scrollController.hasClients && + _scrollController.position.maxScrollExtent > 0) { + _scrollController.animateTo( + _scrollController.position.maxScrollExtent, + duration: Duration(milliseconds: 300), + curve: Curves.easeOut, + ); + _hasScrolled = true; + } + }); + }); + } @override Widget build(BuildContext context) { - _scrollController = ScrollController(); - WidgetsBinding.instance.addPostFrameCallback((_) { - if (_scrollController.hasClients) { - // _scrollController.jumpTo(_scrollController.position.maxScrollExtent); - // 如果你希望有动画,用下面这句替代 jumpTo: - _scrollController.animateTo( - _scrollController.position.maxScrollExtent, - duration: Duration(milliseconds: 300), - curve: Curves.easeOut, - ); - } - }); return Padding( padding: EdgeInsetsDirectional.fromSTEB(0, 25.rpx, 0, 25.rpx), child: Container( @@ -53,10 +70,8 @@ class DynamicReportDetailWidget extends StatelessWidget { child: Column( mainAxisSize: MainAxisSize.max, children: [ - _buildHeader(context, targetDevice), - SizedBox( - height: 33.rpx, - ), + _buildHeader(context, widget.targetDevice), + SizedBox(height: 33.rpx), _buildSleepDateWidgets(), SizedBox(height: 20.rpx), _buildSleepDataModuleWidgets(), @@ -68,88 +83,81 @@ class DynamicReportDetailWidget extends StatelessWidget { } Widget _buildHeader(BuildContext context, Map targetDevice) { - return Container( - width: double.infinity, - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - ClickableContainer( - backgroundColor: Colors.transparent, - highlightColor: themeController.currentColor.sc3.withOpacity(0.2), - borderRadius: 0, - padding: EdgeInsets.zero, - onTap: () async { - await Get.toNamed("/bodyDevice", arguments: targetDevice); - }, - child: Text( - '${targetDevice['person']?['name'] == null ? '未命名'.tr : targetDevice['person']['name']}', - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: 'Inter', - fontSize: 30.rpx, - letterSpacing: 0.0, - color: themeController.currentColor.sc3, - ), - ), + return Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + ClickableContainer( + backgroundColor: Colors.transparent, + highlightColor: themeController.currentColor.sc3.withOpacity(0.2), + borderRadius: 0, + padding: EdgeInsets.zero, + onTap: () async { + await Get.toNamed("/bodyDevice", arguments: targetDevice); + }, + child: Text( + '${targetDevice['person']?['name'] == null ? '未命名'.tr : targetDevice['person']['name']}', + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: 'Inter', + fontSize: 30.rpx, + letterSpacing: 0.0, + color: themeController.currentColor.sc3, + ), ), - ClickableContainer( - backgroundColor: Colors.transparent, - highlightColor: themeController.currentColor.sc3, - borderRadius: 0, - padding: EdgeInsets.zero, - onTap: () { - String mac = targetDevice['mac']; - List selectedWidgets = sleepDateWidgets - .where( - (widget) => widget.isSelected == true, - ) - .toList(); + ), + ClickableContainer( + backgroundColor: Colors.transparent, + highlightColor: themeController.currentColor.sc3, + borderRadius: 0, + padding: EdgeInsets.zero, + onTap: () { + String mac = targetDevice['mac']; + List selectedWidgets = widget.sleepDateWidgets + .where((w) => w.isSelected == true) + .toList(); + if (selectedWidgets.isNotEmpty) { DateTime dateTime = DateTime.fromMillisecondsSinceEpoch( int.parse(selectedWidgets[0].time!)); String time = MyUtils.formatBindTime(dateTime); String sleepReportUrl = - "${ServiceConstant.sleep_report_url}?mac=${mac}&token=${ServiceConstant.sleep_token}&date=${time}"; + "${ServiceConstant.sleep_report_url}?mac=$mac&token=${ServiceConstant.sleep_token}&date=$time"; Get.toNamed("/sleepReportPage", arguments: sleepReportUrl); - }, - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - Text( - '首页.报告详情'.tr, - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: 'Inter', - fontSize: 26.rpx, - letterSpacing: 0.0, - color: themeController.currentColor.sc3, - ), + } + }, + child: Row( + children: [ + Text( + '首页.报告详情'.tr, + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: 'Inter', + fontSize: 26.rpx, + letterSpacing: 0.0, + color: themeController.currentColor.sc3, + ), + ), + Padding( + padding: EdgeInsetsDirectional.fromSTEB(0, 6.rpx, 0, 0.rpx), + child: SvgPicture.asset( + 'assets/img/icon/arrow_right.svg', + width: 14.rpx, + height: 14.rpx, + color: themeController.currentColor.sc3, ), - Padding( - padding: EdgeInsetsDirectional.fromSTEB(0, 6.rpx, 0, 0.rpx), - child: SvgPicture.asset( - 'assets/img/icon/arrow_right.svg', - width: 14.rpx, - height: 14.rpx, - color: themeController.currentColor.sc3, - ), - ), - ].divide(SizedBox(width: 22.rpx)), - ), + ), + ].divide(SizedBox(width: 22.rpx)), ), - ], - ), + ), + ], ); } Widget _buildSleepDateWidgets() { return Container( width: double.infinity, - decoration: BoxDecoration(), child: SingleChildScrollView( - controller: _scrollController, // ⭐️ 关键点 + controller: _scrollController, scrollDirection: Axis.horizontal, child: Row( - mainAxisSize: MainAxisSize.max, - children: sleepDateWidgets + children: widget.sleepDateWidgets .map((widget) => widget) .toList() .divide(SizedBox(width: 20.rpx)), @@ -159,15 +167,13 @@ class DynamicReportDetailWidget extends StatelessWidget { } Widget _buildSleepDataModuleWidgets() { - bool hasData = sleepDataModuleWidgets.length > 0; - - if (!hasData) { + if (widget.sleepDataModuleWidgets.isEmpty) { return Container( height: 200.rpx, alignment: Alignment.center, child: Text( '暂无数据'.tr, - style: FlutterFlowTheme.of(Get.context!).bodyMedium.override( + style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: 'Inter', fontSize: 28.rpx, color: themeController.currentColor.sc4, @@ -182,8 +188,7 @@ class DynamicReportDetailWidget extends StatelessWidget { child: SingleChildScrollView( scrollDirection: Axis.horizontal, child: Row( - mainAxisSize: MainAxisSize.max, - children: sleepDataModuleWidgets + children: widget.sleepDataModuleWidgets .map((widget) => widget) .toList() .divide(SizedBox(width: 14.rpx)), diff --git a/lib/component/home_page/SleepDataModuleWidget.dart b/lib/component/home_page/SleepDataModuleWidget.dart index 934bae6..e3a0505 100644 --- a/lib/component/home_page/SleepDataModuleWidget.dart +++ b/lib/component/home_page/SleepDataModuleWidget.dart @@ -1,11 +1,14 @@ import 'package:ef/ef.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart'; import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/component/tool/ClickableContainer.dart'; +import 'package:vbvs_app/controller/sleep/sleep_report_controller.dart'; import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; +import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; class SleepDataModuleWidget extends StatefulWidget { final Map data; @@ -37,11 +40,192 @@ class _SleepDataModuleWidgetState extends State { ThemeController themeController = Get.find(); return ClickableContainer( backgroundColor: themeController.currentColor.sc5, - highlightColor: themeController.currentColor.sc3, + highlightColor: themeController.currentColor.sc21, borderRadius: 20.rpx, - padding: EdgeInsetsDirectional.fromSTEB(18.rpx, 18.rpx, 18.rpx, 22.rpx), + padding: EdgeInsetsDirectional.fromSTEB(18.rpx, 10.rpx, 18.rpx, 10.rpx), onTap: () { - print('点击了离床次数卡片'); + if (widget.data['showTip'] != null && widget.data['showTip'] == true) { + final String itemLevel = widget.data['code'] ?? ''; + SleepReportController sleepReportController = Get.find(); + + var report = sleepReportController.sleepReport; + List> levelGroups = []; + + if (report != null) { + var colorMap = + Map.from(report.value['info']['color']); + var levelMap = + Map.from(report.value['info']['level']); + + for (var prefix in ['G', 'R', 'Y']) { + List keys = + colorMap.keys.where((k) => k.startsWith(prefix)).toList(); + keys.sort(); // G1, G2, G3 + + List> items = keys.map((k) { + return { + "key": k, + "color": colorMap[k], + "level": levelMap[k] ?? "未知", + }; + }).toList(); + + levelGroups.add({ + "levelName": items.first['level'], // 默认同组level一致 + "items": items, + }); + } + } + showTipDialog( + backgroundColor: stringToColor("#FFFFFF"), + context, + Column( + children: [ + Text( + "${widget.data['name']}", + style: TextStyle( + color: stringToColor("#333333"), + fontSize: 36.rpx, + ), + ), + SizedBox( + height: 17.rpx, + ), + Text( + (widget.data['tips']?.toString().trim().isNotEmpty ?? false) + ? widget.data['tips'].toString() + : "未知数据".tr, + style: TextStyle( + color: stringToColor("#C8CBD2"), + fontSize: 26.rpx, + ), + ), + SizedBox( + height: 37.rpx, + ), + Text( + "${widget.data['value']}", + style: TextStyle( + color: stringToColor("${widget.data['color']}"), + fontSize: 60.rpx, + ), + ), + SizedBox( + height: 81.rpx, + ), + IntrinsicHeight( + child: Row( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + for (int i = 0; i < levelGroups.length; i++) ...[ + // 每个 levelGroup 区域 + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + // Level 名称 + Text( + levelGroups[i]['levelName'], + style: TextStyle( + fontSize: 30.rpx, + color: stringToColor("#333333"), + fontWeight: FontWeight.bold, + ), + ), + SizedBox(height: 38.rpx), + + // 颜色圆点 + key(包一层,和 svg 分离) + Row( + mainAxisAlignment: + MainAxisAlignment.spaceAround, + crossAxisAlignment: + CrossAxisAlignment.start, // 上对齐,避免撑高分割线 + children: + levelGroups[i]['items'].map((item) { + final bool isSelected = + (item['key'] == itemLevel); + return Column( + children: [ + // 颜色圆点 + key(参与分割线高度) + Column( + children: [ + Container( + width: 20.rpx, + height: 20.rpx, + decoration: BoxDecoration( + color: + stringToColor(item['color']), + shape: BoxShape.circle, + ), + ), + SizedBox(height: 30.rpx), + Text( + item['key'], + style: TextStyle( + color: stringToColor("#333333"), + fontSize: 20.rpx, + ), + ), + ], + ), + + // svg 箭头(不影响分割线高度) + SizedBox(height: 20.rpx), + isSelected + ? SvgPicture.asset( + 'assets/img/icon/triangle.svg', + width: 18.rpx, + height: 18.rpx, + color: themeController + .currentColor.sc9, + ) + : SizedBox(height: 18.rpx), + ], + ); + }).toList(), + ), + ], + ), + ), + + // 分割线(只和主要内容等高) + if (i != levelGroups.length - 1) + Container( + width: 1.rpx, + color: stringToColor("${widget.data['color']}"), + margin: EdgeInsets.symmetric(horizontal: 10.rpx), + ), + ] + ], + ), + ), + SizedBox( + height: 71.rpx, + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: "当前属于".tr, // 第一部分文本 + style: TextStyle( + color: Colors.black, // 你想要的样式 + fontSize: 30.rpx, + ), + ), + TextSpan( + text: itemLevel, // 第二部分文本 + style: TextStyle( + color: stringToColor("${widget.data['color']}"), + fontSize: 30.rpx, + ), + ), + ], + ), + ), + ], + ), + ); + } }, child: Container( // width: MediaQuery.sizeOf(context).width * 0.267, @@ -78,7 +262,7 @@ class _SleepDataModuleWidgetState extends State { '${widget.data['value']}', style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: 'Inter', - fontSize: 40.rpx, + fontSize: 36.rpx, letterSpacing: 0.0, color: themeController.currentColor.sc3, ), @@ -120,7 +304,7 @@ class _SleepDataModuleWidgetState extends State { alignment: Alignment.center, constraints: BoxConstraints( minWidth: 43.rpx, - minHeight: 36.rpx, + minHeight: 25.rpx, ), child: Text( '${widget.data['level']}', diff --git a/lib/component/tool/TopSlideNotification.dart b/lib/component/tool/TopSlideNotification.dart index e66d89a..a74b6ea 100644 --- a/lib/component/tool/TopSlideNotification.dart +++ b/lib/component/tool/TopSlideNotification.dart @@ -122,7 +122,7 @@ class _TopSlideNotificationState extends State @override Widget build(BuildContext context) { return Positioned( - top: 0, + top: 140.rpx, left: 0, right: 0, child: SlideTransition( @@ -130,7 +130,7 @@ class _TopSlideNotificationState extends State child: Material( color: stringToColor("#000000").withOpacity(0.8), child: Padding( - padding: const EdgeInsets.symmetric(vertical: 20.0), + padding: EdgeInsets.symmetric(vertical: 20.rpx), child: Container( child: Text( widget.text, diff --git a/lib/controller/device/blueteeth_bind_controller.dart b/lib/controller/device/blueteeth_bind_controller.dart index 08f3ef0..f7886ec 100644 --- a/lib/controller/device/blueteeth_bind_controller.dart +++ b/lib/controller/device/blueteeth_bind_controller.dart @@ -26,7 +26,7 @@ class BlueteethBindModel { @JsonKey(ignore: true) List? betDevicelist = []; //网络状态 @JsonKey(ignore: true) - List? blelist = [];//蓝牙扫描的原始数据 + List? blelist = []; //蓝牙扫描的原始数据 List bindArr = ["", "", ""]; String connectedWifiName = ""; @@ -67,14 +67,16 @@ class BlueteethBindController extends GetControllerEx { RxString scanMac = "".obs; RxString? currentDeviceMac = "".obs; - RxString? cid = "".obs ; + RxString? cid = "".obs; - RxString search = "".obs;//搜索关键字 + RxString search = "".obs; //搜索关键字 RxInt connectStatus = 0.obs; RxMap selectWifi = {}.obs; //正在连接wifi信息 + int returnPage = 0;//0返回首页 1.返回设备列表 + // 安全展示 TopSlideNotification void safeShowNotification(String msg) { try { diff --git a/lib/controller/device/body_device_controller.dart b/lib/controller/device/body_device_controller.dart index 2c1a09d..987f7a1 100644 --- a/lib/controller/device/body_device_controller.dart +++ b/lib/controller/device/body_device_controller.dart @@ -46,6 +46,8 @@ class BodyDeviceController extends GetControllerEx { String wifiMac = ""; + + Future getDeviceNum() async { try { ApiResponse apiResponse = ApiResponse(code: -1, msg: "设备.设备列表请求失败".tr); diff --git a/lib/controller/login/login_controller.dart b/lib/controller/login/login_controller.dart index 6149967..ff082ce 100644 --- a/lib/controller/login/login_controller.dart +++ b/lib/controller/login/login_controller.dart @@ -119,10 +119,10 @@ class LoginController extends GetControllerEx { Future getCode(BuildContext context) async { ApiResponse apiResponse = ApiResponse(code: -1, msg: "其他手机登录页.发送失败".tr); try { - if (model.register_agree == null || model.register_agree != true) { - apiResponse.msg = "登录页.未同意协议".tr; - return apiResponse; - } + // if (model.register_agree == null || model.register_agree != true) { + // apiResponse.msg = "登录页.未同意协议".tr; + // return apiResponse; + // } if (model.phone == null || model.phone!.isEmpty) { apiResponse.msg = "其他手机登录页.请输入手机号".tr; return apiResponse; diff --git a/lib/controller/message/message_controller.dart b/lib/controller/message/message_controller.dart index 9aec8b2..a543573 100644 --- a/lib/controller/message/message_controller.dart +++ b/lib/controller/message/message_controller.dart @@ -50,7 +50,7 @@ class MessageController extends GetControllerEx { String serviceApi = ServiceConstant.message_list; String messageType = "app_system"; if (model.type == 1) { - messageType = "app_body"; + messageType = "app_vsm"; } else { messageType = "app_system"; } diff --git a/lib/language/AppLanguage.dart b/lib/language/AppLanguage.dart index 24bb6c2..bcbefb2 100644 --- a/lib/language/AppLanguage.dart +++ b/lib/language/AppLanguage.dart @@ -98,4 +98,8 @@ class AppLanguage extends Translations { final parts = _currentLanguageCode.split('-'); return Locale(parts[0], parts.length > 1 ? parts[1] : null); } + + bool isChinese() { + return _currentLanguageCode == "zh_CN"; + } } diff --git a/lib/pages/device/BodyDeviceWidget.dart b/lib/pages/device/BodyDeviceWidget.dart index e8ede9b..d0400b2 100644 --- a/lib/pages/device/BodyDeviceWidget.dart +++ b/lib/pages/device/BodyDeviceWidget.dart @@ -11,6 +11,7 @@ import 'package:vbvs_app/component/NullDataComponentWidget.dart'; import 'package:vbvs_app/component/tool/ClickableContainer.dart'; import 'package:vbvs_app/component/tool/CustomCard.dart'; import 'package:vbvs_app/component/tool/TopSlideNotification.dart'; +import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart'; import 'package:vbvs_app/controller/device/body_device_controller.dart'; import 'package:vbvs_app/controller/home/home_controller.dart'; import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; @@ -117,6 +118,9 @@ class _BodyDevicePageState extends State { borderRadius: 0.rpx, onTap: () { _hidePopup(); + BlueteethBindController blueteethBindController = + Get.find(); + blueteethBindController.returnPage = 1; Get.toNamed("/deviceType"); }, child: Container( @@ -187,7 +191,9 @@ class _BodyDevicePageState extends State { } Future _fetchDeviceList() async { - await bodyDeviceController.getDeviceList().then((apiResponse) { + await bodyDeviceController + .getDeviceList(key: bodyDeviceController.keyWord.value) + .then((apiResponse) { if (apiResponse.code != HttpStatusCodes.ok) { TopSlideNotification.show( Get.context!, @@ -240,6 +246,7 @@ class _BodyDevicePageState extends State { ), ), child: Scaffold( + resizeToAvoidBottomInset: false, backgroundColor: Colors.transparent, appBar: AppBar( backgroundColor: themeController.currentColor.sc17, diff --git a/lib/pages/device/component/DeviceDataComponentWidget.dart b/lib/pages/device/component/DeviceDataComponentWidget.dart index 7cab3a1..ce61e34 100644 --- a/lib/pages/device/component/DeviceDataComponentWidget.dart +++ b/lib/pages/device/component/DeviceDataComponentWidget.dart @@ -1040,8 +1040,7 @@ class _DeviceDataComponentWidgetState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - Expanded( - // 使用 Expanded 来占据屏幕宽度 + Expanded( child: CustomCard( borderRadius: AppConstants().button_container_radius, onTap: () async { diff --git a/lib/pages/device/component/ReviewMessageWidgetWidget.dart b/lib/pages/device/component/ReviewMessageWidgetWidget.dart index 21f55e1..190a511 100644 --- a/lib/pages/device/component/ReviewMessageWidgetWidget.dart +++ b/lib/pages/device/component/ReviewMessageWidgetWidget.dart @@ -91,7 +91,7 @@ class _ReviewMessageWidgetWidgetState extends State { ); } - Widget _buildInfoItem(BuildContext context, String label) { + Widget _buildInfoItem(BuildContext context, label) { return Container( constraints: BoxConstraints( minHeight: 62.rpx, @@ -101,7 +101,7 @@ class _ReviewMessageWidgetWidgetState extends State { child: Text( overflow: TextOverflow.ellipsis, maxLines: 1, - label.tr, + "${label}", style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: 'Inter', fontSize: 26.rpx, @@ -113,7 +113,7 @@ class _ReviewMessageWidgetWidgetState extends State { ); } - Widget _buildValueItem(BuildContext context, String value) { + Widget _buildValueItem(BuildContext context, value) { return Container( constraints: BoxConstraints( minHeight: 62.rpx, @@ -123,7 +123,7 @@ class _ReviewMessageWidgetWidgetState extends State { child: Text( overflow: TextOverflow.ellipsis, maxLines: 1, - value, + "${value}", style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: 'Inter', fontSize: 26.rpx, diff --git a/lib/pages/device/message_review_page.dart b/lib/pages/device/message_review_page.dart index e0101a3..302d939 100644 --- a/lib/pages/device/message_review_page.dart +++ b/lib/pages/device/message_review_page.dart @@ -1,12 +1,15 @@ import 'package:ef/ef.dart'; import 'package:flutter/material.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart'; +import 'package:vbvs_app/common/color/ServiceConstant.dart'; import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/MyUtils.dart'; +import 'package:vbvs_app/common/util/requestWithLog.dart'; import 'package:vbvs_app/component/NullDataComponentWidget.dart'; import 'package:vbvs_app/component/tool/ClickableContainer.dart'; import 'package:vbvs_app/controller/message/message_review_controller.dart'; +import 'package:vbvs_app/model/api_response.dart'; import 'package:vbvs_app/pages/device/component/ReviewMessageWidgetWidget.dart'; class MessageReviewPage extends StatefulWidget { @@ -23,7 +26,7 @@ class _MessageReviewPageState extends State { @override void initState() { super.initState(); - loadData(); + loadData(widget.data); } @override @@ -277,60 +280,17 @@ class _MessageReviewPageState extends State { ); } - Future loadData() async { + Future loadData(data) async { //todo 请求历史体征数据 - // String serviceAddress = ServiceConstant.service_address; - // String serviceName = ServiceConstant.server_service; - // String serviceApi = ServiceConstant.submit_repair; - // String queryUrl = "${serviceAddress}${serviceName}${serviceApi}"; - // ApiResponse apiResponse = await requestWithLog( - // logTitle: "查询报修数据", method: MyHttpMethod.get, queryUrl: queryUrl); - // RepairController repairController = Get.find(); - // repairController.repairHistory.value = apiResponse.data; - // repairController.updateAll(); - - // messageReviewController.messageList.value = [ - // { - // "data": { - // "title": "实时监测结果通知", - // 'val': [ - // {'k': '消息类型', 'v': '心率异常'}, - // {'k': '检测数值', 'v': '106'}, - // {'k': '发生时间', 'v': '2024-07-30 01:15'}, - // ], - // } - // }, - // { - // "data": { - // "title": "实时监测结果通知", - // 'val': [ - // {'k': '消息类型', 'v': '心率异常'}, - // {'k': '检测数值', 'v': '106'}, - // {'k': '发生时间', 'v': '2024-07-30 01:15'}, - // ], - // } - // }, - // { - // "data": { - // "title": "实时监测结果通知", - // 'val': [ - // {'k': '消息类型', 'v': '心率异常'}, - // {'k': '检测数值', 'v': '106'}, - // {'k': '发生时间', 'v': '2024-07-30 01:15'}, - // ], - // } - // }, - // { - // "data": { - // "title": "实时监测结果通知", - // 'val': [ - // {'k': '消息类型', 'v': '心率异常'}, - // {'k': '检测数值', 'v': '106'}, - // {'k': '发生时间', 'v': '2024-07-30 01:15'}, - // ], - // } - // }, - // ]; + String serviceAddress = ServiceConstant.service_address; + String serviceName = ServiceConstant.server_service; + String serviceApi = ServiceConstant.message_list; + String queryUrl = + "${serviceAddress}${serviceName}${serviceApi}?type=app_vsm&mac=${data['mac']}"; + ApiResponse apiResponse = await requestWithLog( + logTitle: "查询消息回看数据", method: MyHttpMethod.get, queryUrl: queryUrl); + messageReviewController.messageList.value = apiResponse.data; + messageReviewController.updateAll(); } Widget _buildMessageListView(List dataList) { diff --git a/lib/pages/device_bind/bind_device_success.dart b/lib/pages/device_bind/bind_device_success.dart index fe8dcfe..d512e7b 100644 --- a/lib/pages/device_bind/bind_device_success.dart +++ b/lib/pages/device_bind/bind_device_success.dart @@ -268,7 +268,13 @@ class _EPageState extends State { borderRadius: AppConstants().button_container_radius, // 圆角半径 onTap: () { - Get.offAllNamed("/mianPageBottomChange"); + BlueteethBindController blueteethBindController = + Get.find(); + if (blueteethBindController.returnPage == 0) { + Get.offAllNamed("/mianPageBottomChange"); + } else { + Get.offAllNamed("/bodyDevice"); + } }, colors: [ // 渐变色 diff --git a/lib/pages/device_bind/componnet/bind_dialog.dart b/lib/pages/device_bind/componnet/bind_dialog.dart index e21768c..786020d 100644 --- a/lib/pages/device_bind/componnet/bind_dialog.dart +++ b/lib/pages/device_bind/componnet/bind_dialog.dart @@ -862,9 +862,11 @@ void showWifiDialog( void showTipDialog( BuildContext context, - Widget widget, - // String title, -) { + Widget widget, { + Color? backgroundColor, // 新增可选参数 +} + // String title, + ) { ThemeController themeController = Get.find(); BlueteethBindController blueteethBindController = Get.find(); @@ -877,7 +879,8 @@ void showTipDialog( blurSigma: 3.0, child: Container( decoration: BoxDecoration( - color: themeController.currentColor.sc17, + color: + backgroundColor ?? themeController.currentColor.sc17, // 使用默认颜色 borderRadius: BorderRadius.circular(20.0), ), padding: EdgeInsetsDirectional.fromSTEB(64.rpx, 0, 64.rpx, 0), diff --git a/lib/pages/device_bind/device_calibration.dart b/lib/pages/device_bind/device_calibration.dart index 923a4a2..70dc75f 100644 --- a/lib/pages/device_bind/device_calibration.dart +++ b/lib/pages/device_bind/device_calibration.dart @@ -92,6 +92,10 @@ class _CalibrationPageState extends State { context, Container(), "校准未完成提示".tr, onConfirm: () async { exit = true; + if (widget.type == 2) { + Get.back(); + return; + } await Get.toNamed("/personPage"); print("object"); deviceCalibrationController.process.value = 0; diff --git a/lib/pages/device_bind/device_type.dart b/lib/pages/device_bind/device_type.dart index 02488c6..8abfaa8 100644 --- a/lib/pages/device_bind/device_type.dart +++ b/lib/pages/device_bind/device_type.dart @@ -426,14 +426,18 @@ class _EPageState extends State { mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( - title, - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: 'Inter', - color: themeController.currentColor.sc3, - fontSize: 30.rpx, - letterSpacing: 0.0, - ), + Expanded( + child: Text( + title, + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: 'Inter', + color: themeController.currentColor.sc3, + fontSize: 30.rpx, + letterSpacing: 0.0, + ), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), ), ClipRRect( borderRadius: BorderRadius.circular(8.rpx), diff --git a/lib/pages/device_bind/device_type_list.dart b/lib/pages/device_bind/device_type_list.dart index acab096..bfa97df 100644 --- a/lib/pages/device_bind/device_type_list.dart +++ b/lib/pages/device_bind/device_type_list.dart @@ -163,7 +163,7 @@ class _DeviceTypeListPageState extends State { mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + Expanded(child: Text( title, style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: 'Inter', @@ -171,7 +171,9 @@ class _DeviceTypeListPageState extends State { fontSize: 30.rpx, letterSpacing: 0.0, ), - ), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ),), ClipRRect( borderRadius: BorderRadius.circular(8.rpx), // child: Image.asset( diff --git a/lib/pages/main_bottom/component/MessageWidgetWidget.dart b/lib/pages/main_bottom/component/MessageWidgetWidget.dart index 0189f35..8725ff0 100644 --- a/lib/pages/main_bottom/component/MessageWidgetWidget.dart +++ b/lib/pages/main_bottom/component/MessageWidgetWidget.dart @@ -31,6 +31,7 @@ class _MessageWidgetWidgetState extends State { @override Widget build(BuildContext context) { var messageInfo = widget.data; + print(messageInfo); return Stack( children: [ ClickableContainer( @@ -97,63 +98,63 @@ class _MessageWidgetWidgetState extends State { ], ), ), - Positioned( - bottom: 46.rpx, - right: 20.rpx, - child: Container( - width: 123.rpx, - height: 47.rpx, - child: CustomCard( - borderRadius: AppConstants().button_container_radius, // 直角 - colors: messageInfo['status'] == 1 - ? [ - themeController.currentColor.sc1, - themeController.currentColor.sc2 - ] - : [themeController.currentColor.sc4], // 单色背景 - enableAnimation: true, // 有点击缩放动画 - enableGradient: false, // 不用渐变 - onTap: () { - if (messageInfo['status'] == 1) { - showConfirmDialog(context, Container(), "是否确认接受该设备".tr, - onConfirm: () async { - ApiResponse apiResponse = await deviceShareController - .confirmShare(messageInfo['data']['shareCode']); - if (apiResponse.code == HttpStatusCodes.ok) { - TopSlideNotification.show( - context, - text: apiResponse.msg!, - textColor: themeController.currentColor.sc2, - ); - messageController.getMessageList(); - messageController.updateAll(); - } else { - TopSlideNotification.show( - context, - text: apiResponse.msg!, - textColor: themeController.currentColor.sc9, - ); - messageController.getMessageList(); - messageController.updateAll(); - } - }, onCancel: () {}); - } - }, - child: Center( - child: Text( - getMessageStatus(messageInfo['status']), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: 'Inter', - fontSize: 26.rpx, - letterSpacing: 0.0, - color: Colors.white, - ), + if (messageInfo['type'] == 'app_system') + Positioned( + bottom: 46.rpx, + right: 20.rpx, + child: Container( + width: 123.rpx, + height: 47.rpx, + child: CustomCard( + borderRadius: AppConstants().button_container_radius, // 直角 + colors: messageInfo['status'] == 1 + ? [ + themeController.currentColor.sc1, + themeController.currentColor.sc2 + ] + : [themeController.currentColor.sc4], // 单色背景 + enableAnimation: true, // 有点击缩放动画 + enableGradient: false, // 不用渐变 + onTap: () { + if (messageInfo['status'] == 1) { + showConfirmDialog(context, Container(), "是否确认接受该设备".tr, + onConfirm: () async { + ApiResponse apiResponse = await deviceShareController + .confirmShare(messageInfo['data']['shareCode']); + if (apiResponse.code == HttpStatusCodes.ok) { + TopSlideNotification.show( + context, + text: apiResponse.msg!, + textColor: themeController.currentColor.sc2, + ); + messageController.getMessageList(); + messageController.updateAll(); + } else { + TopSlideNotification.show( + context, + text: apiResponse.msg!, + textColor: themeController.currentColor.sc9, + ); + messageController.getMessageList(); + messageController.updateAll(); + } + }, onCancel: () {}); + } + }, + child: Center( + child: Text( + getMessageStatus(messageInfo['status']), + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: 'Inter', + fontSize: 26.rpx, + letterSpacing: 0.0, + color: Colors.white, + ), + ), ), ), ), ), - ), - ], ); } @@ -180,7 +181,7 @@ class _MessageWidgetWidgetState extends State { ); } - Widget _buildValueItem(BuildContext context, String value) { + Widget _buildValueItem(BuildContext context, value) { return Container( constraints: BoxConstraints( minHeight: 62.rpx, @@ -190,7 +191,7 @@ class _MessageWidgetWidgetState extends State { child: Text( overflow: TextOverflow.ellipsis, maxLines: 1, - value, + "${value}", style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: 'Inter', fontSize: 26.rpx, diff --git a/lib/pages/main_bottom/e_page.dart b/lib/pages/main_bottom/e_page.dart index 4cdfc34..042faba 100644 --- a/lib/pages/main_bottom/e_page.dart +++ b/lib/pages/main_bottom/e_page.dart @@ -1,6 +1,10 @@ import 'package:ef/ef.dart'; import 'package:flutter/material.dart'; import 'package:vbvs_app/common/color/appConstants.dart'; +import 'package:vbvs_app/common/util/FitTool.dart'; +import 'package:vbvs_app/common/util/MyUtils.dart'; +import 'package:vbvs_app/component/tool/ClickableContainer.dart'; +import 'package:vbvs_app/component/tool/TopSlideNotification.dart'; import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; import 'package:vbvs_app/controller/user_info_controller.dart'; @@ -20,13 +24,64 @@ class _EPageState extends State { builder: (context, boxConstraints) => GestureDetector( onTap: () => FocusScope.of(context).unfocus(), child: Scaffold( + appBar: AppBar( + backgroundColor: themeController.currentColor.sc17, + // backgroundColor: Colors.transparent, + automaticallyImplyLeading: false, + iconTheme: IconThemeData(color: themeController.currentColor.sc3), + titleSpacing: 0, + // leading: returnIconButtom, + title: Container( + width: double.infinity, + height: 180.rpx, + child: Stack( + alignment: Alignment.center, + children: [ + /// 居中标题 + Text( + '小e'.tr, + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: 'Readex Pro', + color: themeController.currentColor.sc3, + letterSpacing: 0, + fontSize: 30.rpx, + ), + ), + + /// 左边返回按钮 + // Positioned( + // left: 0, + // child: returnIconButtom, + // ), + ], + ), + ), + actions: [], + centerTitle: false, + ), backgroundColor: Colors.transparent, body: SafeArea( top: true, - child: Text("小e", - style: TextStyle( - fontSize: AppConstants().normal_text_fontSize, - color: Colors.white)), + child: Column(children: [ + Expanded( + child: ClickableContainer( + backgroundColor: Colors.transparent, + highlightColor: Colors.transparent, + padding: EdgeInsets.all(0.rpx), + onTap: () { + TopSlideNotification.show(context, text: "待开发功能".tr); + }, + child: Container( + // child: widget.webView, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage('assets/img/xiaoe.png'), // 本地图片 + fit: BoxFit.fill, // 填满整个 Container + ), + ), + ), + )), + ]), ), ), ), diff --git a/lib/pages/main_bottom/follow_page.dart b/lib/pages/main_bottom/follow_page.dart index e29c265..de142e3 100644 --- a/lib/pages/main_bottom/follow_page.dart +++ b/lib/pages/main_bottom/follow_page.dart @@ -74,6 +74,7 @@ class _FollowPageState extends State { actions: [], centerTitle: false, ), + body: SafeArea( top: true, child: Padding( diff --git a/lib/pages/main_bottom/home_page.dart b/lib/pages/main_bottom/home_page.dart index 327820d..5c32355 100644 --- a/lib/pages/main_bottom/home_page.dart +++ b/lib/pages/main_bottom/home_page.dart @@ -13,6 +13,7 @@ import 'package:vbvs_app/component/home_page/SleepDateWidget.dart'; import 'package:vbvs_app/component/tool/ClickableContainer.dart'; import 'package:vbvs_app/component/tool/CustomCard.dart'; import 'package:vbvs_app/component/tool/TopSlideNotification.dart'; +import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart'; import 'package:vbvs_app/controller/device/body_device_controller.dart'; import 'package:vbvs_app/controller/home/home_controller.dart'; import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; @@ -127,6 +128,9 @@ class _HomePageState extends State { onTap: () { _popupEntry?.remove(); _popupEntry = null; + BlueteethBindController blueteethBindController = + Get.find(); + blueteethBindController.returnPage = 0; Get.toNamed("/deviceType"); }, child: Container( diff --git a/lib/pages/main_bottom/message_page.dart b/lib/pages/main_bottom/message_page.dart index a1f7e71..f894327 100644 --- a/lib/pages/main_bottom/message_page.dart +++ b/lib/pages/main_bottom/message_page.dart @@ -92,10 +92,10 @@ class _MessagePageState extends State { backgroundColor: themeController.currentColor.sc17, automaticallyImplyLeading: false, iconTheme: IconThemeData(color: themeController.currentColor.sc3), - toolbarHeight: 140.rpx, + // toolbarHeight: 140.rpx, titleSpacing: 0, title: Padding( - padding: EdgeInsetsDirectional.fromSTEB(40.rpx, 0, 0, 0), + padding: EdgeInsetsDirectional.fromSTEB(0.rpx, 0, 0.rpx, 0), child: Container( width: double.infinity, height: 140.rpx, diff --git a/lib/pages/main_bottom/mine_page.dart b/lib/pages/main_bottom/mine_page.dart index 36c5022..916074d 100644 --- a/lib/pages/main_bottom/mine_page.dart +++ b/lib/pages/main_bottom/mine_page.dart @@ -693,7 +693,7 @@ class _MinePageState extends State { mainAxisSize: MainAxisSize.max, children: [ Text( - 'V1.0.2505.26', + 'V1.0.2505.28', style: FlutterFlowTheme.of(context) .bodyMedium diff --git a/lib/pages/person/update_person_page.dart b/lib/pages/person/update_person_page.dart index 4015bd1..e7496df 100644 --- a/lib/pages/person/update_person_page.dart +++ b/lib/pages/person/update_person_page.dart @@ -38,7 +38,7 @@ class _UpdatePageState extends State { @override void initState() { super.initState(); - personController.dateTime = null; + // personController.dateTime = null; personController.getDiseaseData().then((apiResponse) { if (apiResponse.code != HttpStatusCodes.ok) { TopSlideNotification.show( diff --git a/lib/pages/sleep_report/chart/TimeSeriesChart.dart b/lib/pages/sleep_report/chart/TimeSeriesChart.dart index eea0fc0..f124217 100644 --- a/lib/pages/sleep_report/chart/TimeSeriesChart.dart +++ b/lib/pages/sleep_report/chart/TimeSeriesChart.dart @@ -11,6 +11,8 @@ class TimeSeriesChart extends StatelessWidget { final double yMin; final double yMax; final List dataPoints; + final double actYMin; + final double actYMax; TimeSeriesChart({ required this.startTime, @@ -18,6 +20,8 @@ class TimeSeriesChart extends StatelessWidget { required this.yMin, required this.yMax, required this.dataPoints, + required this.actYMin, + required this.actYMax, }); @override @@ -147,7 +151,7 @@ class TimeSeriesChart extends StatelessWidget { return Padding( padding: EdgeInsets.only(right: 14.rpx), child: Text( - yMin.toStringAsFixed(0), + "${actYMin.toStringAsFixed(0)}", style: TextStyle( fontSize: 18.rpx, color: themeController.currentColor.sc4, @@ -161,7 +165,8 @@ class TimeSeriesChart extends StatelessWidget { return Padding( padding: EdgeInsets.only(right: 14.rpx), child: Text( - midValue.toStringAsFixed(0), + "${((actYMax + actYMin) / 2).toStringAsFixed(0)}", + // "${midValue}", style: TextStyle( fontSize: 18.rpx, color: themeController.currentColor.sc4, @@ -175,7 +180,7 @@ class TimeSeriesChart extends StatelessWidget { return Padding( padding: EdgeInsets.only(right: 14.rpx), child: Text( - yMax.toStringAsFixed(0), + "${actYMax.toStringAsFixed(0)}", style: TextStyle( fontSize: 18.rpx, color: themeController.currentColor.sc4, diff --git a/lib/pages/sleep_report/component/BreatheCard.dart b/lib/pages/sleep_report/component/BreatheCard.dart index ee753ca..cdd6144 100644 --- a/lib/pages/sleep_report/component/BreatheCard.dart +++ b/lib/pages/sleep_report/component/BreatheCard.dart @@ -52,6 +52,7 @@ class _BreatheCardState extends State { runSpacing: 25.rpx, // 每行之间的垂直间距 children: List.generate(data.length, (index) { final item = data[index]; + item['showTip'] = true; return SizedBox( width: (MediaQuery.of(context).size.width - 160.rpx) / 3, child: SleepDataModuleWidget(data: item), diff --git a/lib/pages/sleep_report/component/BreathePauseNewWidget.dart b/lib/pages/sleep_report/component/BreathePauseNewWidget.dart index 535d46a..abc8f07 100644 --- a/lib/pages/sleep_report/component/BreathePauseNewWidget.dart +++ b/lib/pages/sleep_report/component/BreathePauseNewWidget.dart @@ -105,9 +105,18 @@ class _SnoreViewWidgetWidgetState extends State { SizedBox( height: 32.rpx, ), + Row( + children: [ + Text( + "秒".tr, + style: TextStyle( + color: stringToColor("#FFFFFF"), fontSize: 18.rpx), + ), + ], + ), Padding( padding: - EdgeInsetsDirectional.fromSTEB(0.rpx, 0.rpx, 0.rpx, 0.rpx), + EdgeInsetsDirectional.fromSTEB(0.rpx, 40.rpx, 0.rpx, 0.rpx), child: LineChartByRange( showLabel: showLabel, startTime: startTime, diff --git a/lib/pages/sleep_report/component/BreatheStandardWidget.dart b/lib/pages/sleep_report/component/BreatheStandardWidget.dart index 98e7af8..2eaa3c0 100644 --- a/lib/pages/sleep_report/component/BreatheStandardWidget.dart +++ b/lib/pages/sleep_report/component/BreatheStandardWidget.dart @@ -59,6 +59,48 @@ class _BreatheStandardWidgetState extends State { return TimeSeriesPoint(x, y); }).toList(); + List> brs = + (widget.sleepReport['brs'] as List).cast>(); + //307 平均呼吸 + //305 基准呼吸 + //308 最低呼吸 + //309 最高呼吸 + // 307 平均呼吸 + Map? avgBreath = brs.firstWhere( + (element) => element['id'] == 307, + orElse: () => {}, + ); + +// 305 基准呼吸 + Map? baseBreath = brs.firstWhere( + (element) => element['id'] == 305, + orElse: () => {}, + ); + +// 308 最低呼吸 + Map? minBreath = brs.firstWhere( + (element) => element['id'] == 308, + orElse: () => {}, + ); + +// 309 最高呼吸 + Map? maxBreath = brs.firstWhere( + (element) => element['id'] == 309, + orElse: () => {}, + ); + + String range = baseBreath['range'] ?? ''; + int min = 0; + int max = 0; + + if (range.isNotEmpty && range.contains('~')) { + List parts = range.split('~'); + if (parts.length == 2) { + min = int.tryParse(parts[0]) ?? 0; + max = int.tryParse(parts[1]) ?? 0; + } + } + return Container( width: double.infinity, decoration: BoxDecoration( @@ -76,7 +118,7 @@ class _BreatheStandardWidgetState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - "呼吸基准".tr, + "呼吸数据".tr, style: TextStyle( color: themeController.currentColor.sc3, fontSize: AppConstants().title_text_fontSize), @@ -92,7 +134,7 @@ class _BreatheStandardWidgetState extends State { context, Container( child: Text( - "呼吸基准介绍".tr, + "呼吸数据介绍".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, @@ -139,7 +181,7 @@ class _BreatheStandardWidgetState extends State { SizedBox(width: 15.rpx), // 圆球和文字之间的间隔 // 文字 Text( - '正常范围(8~20)', + '正常范围'.tr + "${range}", style: TextStyle( fontSize: AppConstants().smaller_text_fontSize, // 文字的大小 @@ -158,6 +200,8 @@ class _BreatheStandardWidgetState extends State { yMin: 50, yMax: 150, dataPoints: dataPoints, + actYMax: max.toDouble(), + actYMin: min.toDouble(), ), ), Padding( @@ -169,7 +213,7 @@ class _BreatheStandardWidgetState extends State { Column( children: [ Text( - "平均呼吸", + "${avgBreath['name']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: @@ -179,14 +223,14 @@ class _BreatheStandardWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - "12", + "${avgBreath['value']}", style: TextStyle( color: themeController.currentColor.sc2, fontSize: AppConstants().normal_text_fontSize), ), Text( - "次/分钟", + "${avgBreath['unit']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: @@ -201,7 +245,7 @@ class _BreatheStandardWidgetState extends State { Column( children: [ Text( - "基准呼吸", + "${baseBreath['name']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: @@ -213,7 +257,7 @@ class _BreatheStandardWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - "15", + "${baseBreath['value']}", style: TextStyle( color: themeController.currentColor.sc2, fontSize: @@ -222,7 +266,7 @@ class _BreatheStandardWidgetState extends State { overflow: TextOverflow.ellipsis, ), Text( - "次/分钟", + "${baseBreath['unit']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: @@ -239,7 +283,7 @@ class _BreatheStandardWidgetState extends State { Column( children: [ Text( - "最低呼吸", + "${minBreath['name']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: @@ -251,7 +295,7 @@ class _BreatheStandardWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - "11", + "${minBreath['value']}", style: TextStyle( color: themeController.currentColor.sc2, fontSize: @@ -260,7 +304,7 @@ class _BreatheStandardWidgetState extends State { overflow: TextOverflow.ellipsis, ), Text( - "次/分钟", + "${minBreath['unit']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: @@ -277,7 +321,7 @@ class _BreatheStandardWidgetState extends State { Column( children: [ Text( - "最高呼吸", + "${maxBreath['name']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: @@ -289,7 +333,7 @@ class _BreatheStandardWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - "18", + "${maxBreath['value']}", style: TextStyle( color: themeController.currentColor.sc2, fontSize: @@ -298,7 +342,7 @@ class _BreatheStandardWidgetState extends State { overflow: TextOverflow.ellipsis, ), Text( - "次/分钟", + "${maxBreath['unit']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: diff --git a/lib/pages/sleep_report/component/CompareSleepWidget.dart b/lib/pages/sleep_report/component/CompareSleepWidget.dart index 0fae301..455ac6d 100644 --- a/lib/pages/sleep_report/component/CompareSleepWidget.dart +++ b/lib/pages/sleep_report/component/CompareSleepWidget.dart @@ -169,7 +169,7 @@ class _CompareSleepWidgetState extends State { SizedBox(width: 13.rpx), // 文字和容器之间的间距 // 文字 Text( - '今日数据', // 文字内容 + '今日数据'.tr, // 文字内容 style: TextStyle( fontSize: 18.rpx, // 文字大小 color: @@ -190,7 +190,7 @@ class _CompareSleepWidgetState extends State { SizedBox(width: 13.rpx), // 文字和容器之间的间距 // 文字 Text( - '昨日数据', // 文字内容 + '昨日数据'.tr, // 文字内容 style: TextStyle( fontSize: 18.rpx, // 文字大小 color: diff --git a/lib/pages/sleep_report/component/DiseasePercentsWidget.dart b/lib/pages/sleep_report/component/DiseasePercentsWidget.dart index 5c310a3..d8ac881 100644 --- a/lib/pages/sleep_report/component/DiseasePercentsWidget.dart +++ b/lib/pages/sleep_report/component/DiseasePercentsWidget.dart @@ -61,7 +61,7 @@ class _DiseasePercentsWidgetState extends State { // "explain": "呼吸系统是负责气体交换的器官系统,包括鼻、喉、气管和肺等。", // }, // ]; - + @override void setState(VoidCallback callback) { super.setState(callback); @@ -84,7 +84,7 @@ class _DiseasePercentsWidgetState extends State { widget.sleepReport['cdri'].isEmpty) { return Container(); } - List diseaseData = widget.sleepReport['cdri']; + List diseaseData = widget.sleepReport['cdri']; var showLabel = convertDiseaseData(diseaseData); return Container( width: double.infinity, @@ -120,7 +120,7 @@ class _DiseasePercentsWidgetState extends State { context, Container( child: Text( - "慢性病风险指数介绍。", + "慢性病风险指数介绍".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, @@ -158,23 +158,24 @@ class _DiseasePercentsWidgetState extends State { ), ); } - - List> convertDiseaseData(List data) { - return data.asMap().entries.map>((entry) { - final index = entry.key; - final item = entry.value; - return { - "key": item["id"], - "name": item["name"], - "color": item["id"] == 40004 - ? stringToColor("#FF7159") // 特殊颜色处理 - : stringToColor("#00C1AA"), - "percent": item["value"], - "explain": (item["tips"] != null && (item["tips"] as String).trim().isNotEmpty) - ? item["tips"] - : '未知数据'.tr, - }; - }).toList(); -} + List> convertDiseaseData(List data) { + return data.asMap().entries.map>((entry) { + final index = entry.key; + final item = entry.value; + + return { + "key": item["id"], + "name": item["name"], + "color": item["id"] == 40004 + ? stringToColor("#FF7159") // 特殊颜色处理 + : stringToColor("#00C1AA"), + "percent": item["value"], + "explain": + (item["tips"] != null && (item["tips"] as String).trim().isNotEmpty) + ? item["tips"] + : '未知数据'.tr, + }; + }).toList(); + } } diff --git a/lib/pages/sleep_report/component/HeartHealthWidget.dart b/lib/pages/sleep_report/component/HeartHealthWidget.dart index 8e26fb2..8e2b42c 100644 --- a/lib/pages/sleep_report/component/HeartHealthWidget.dart +++ b/lib/pages/sleep_report/component/HeartHealthWidget.dart @@ -76,7 +76,7 @@ class _HeartHealthWidgetState extends State { context, Container( child: Text( - "心理健康评估介绍。", + "心理健康评估介绍".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, diff --git a/lib/pages/sleep_report/component/HeartPointWidget.dart b/lib/pages/sleep_report/component/HeartPointWidget.dart index f31ff8c..f381056 100644 --- a/lib/pages/sleep_report/component/HeartPointWidget.dart +++ b/lib/pages/sleep_report/component/HeartPointWidget.dart @@ -104,7 +104,7 @@ class _HeartPointWidgetState extends State { context, Container( child: Text( - "心率散点图介绍。", + "心率散点图介绍".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, diff --git a/lib/pages/sleep_report/component/HeartRateCard.dart b/lib/pages/sleep_report/component/HeartRateCard.dart index ba35c8d..753190e 100644 --- a/lib/pages/sleep_report/component/HeartRateCard.dart +++ b/lib/pages/sleep_report/component/HeartRateCard.dart @@ -52,6 +52,7 @@ class _HeartRateCardState extends State { runSpacing: 25.rpx, // 每行之间的垂直间距 children: List.generate(data.length, (index) { final item = data[index]; + item['showTip'] = true; return SizedBox( width: (MediaQuery.of(context).size.width - 160.rpx) / 3, child: SleepDataModuleWidget(data: item), diff --git a/lib/pages/sleep_report/component/HeartRateStandardWidget.dart b/lib/pages/sleep_report/component/HeartRateStandardWidget.dart index 687d0b5..daa38d1 100644 --- a/lib/pages/sleep_report/component/HeartRateStandardWidget.dart +++ b/lib/pages/sleep_report/component/HeartRateStandardWidget.dart @@ -46,13 +46,52 @@ class _HeartRateStandardWidgetState extends State { final endTime = widget.sleepReport['endTime']; List> data = (widget.sleepReport['hrbc'] as List).cast>(); - final dataPoints = data.map((item) { - final x = item['st'] as int; - final y = (item['value'] as num).toDouble(); // 安全地转换为 double - return TimeSeriesPoint(x, y); -}).toList(); + final dataPoints = data.map((item) { + final x = item['st'] as int; + final y = (item['value'] as num).toDouble(); // 安全地转换为 double + return TimeSeriesPoint(x, y); + }).toList(); + List> hrs = + (widget.sleepReport['hrs'] as List).cast>(); + //206 平均心率 + //202 基准心率 + //207 最低心率 + //208 最高心率 + // 找 id == 206 的元素(平均心率) + Map? avgHeartRate = hrs.firstWhere( + (element) => element['id'] == 206, + orElse: () => {}, + ); +// 找 id == 202 的元素(基准心率) + Map? baseHeartRate = hrs.firstWhere( + (element) => element['id'] == 202, + orElse: () => {}, + ); + +// 找 id == 207 的元素(最低心率) + Map? minHeartRate = hrs.firstWhere( + (element) => element['id'] == 207, + orElse: () => {}, + ); + +// 找 id == 208 的元素(最高心率) + Map? maxHeartRate = hrs.firstWhere( + (element) => element['id'] == 208, + orElse: () => {}, + ); + String range = baseHeartRate['range'] ?? ''; + int min = 0; + int max = 0; + + if (range.isNotEmpty && range.contains('~')) { + List parts = range.split('~'); + if (parts.length == 2) { + min = int.tryParse(parts[0]) ?? 0; + max = int.tryParse(parts[1]) ?? 0; + } + } return Container( width: double.infinity, decoration: BoxDecoration( @@ -70,7 +109,7 @@ class _HeartRateStandardWidgetState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - "心率基准".tr, + "心率数据".tr, style: TextStyle( color: themeController.currentColor.sc3, fontSize: AppConstants().title_text_fontSize), @@ -86,7 +125,7 @@ class _HeartRateStandardWidgetState extends State { context, Container( child: Text( - "心率基准介绍".tr, + "心率数据介绍".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, @@ -133,7 +172,7 @@ class _HeartRateStandardWidgetState extends State { SizedBox(width: 15.rpx), // 圆球和文字之间的间隔 // 文字 Text( - '正常范围(50~80)', + '正常范围'.tr + "${range}", style: TextStyle( fontSize: AppConstants().smaller_text_fontSize, // 文字的大小 @@ -142,6 +181,18 @@ class _HeartRateStandardWidgetState extends State { ), ], ), + // Container( + // // color: Colors.red, + // width: double.infinity, + // // height: 300.rpx, + // child: TimeSeriesChart( + // startTime: startTime, + // endTime: endTime, + // yMin: min.toDouble(), + // yMax: max.toDouble(), + // dataPoints: dataPoints, + // ), + // ), Container( // color: Colors.red, width: double.infinity, @@ -152,6 +203,8 @@ class _HeartRateStandardWidgetState extends State { yMin: 50, yMax: 150, dataPoints: dataPoints, + actYMin: min.toDouble(), + actYMax: max.toDouble(), ), ), Padding( @@ -163,7 +216,7 @@ class _HeartRateStandardWidgetState extends State { Column( children: [ Text( - "平均心率", + "${avgHeartRate['name']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: @@ -173,14 +226,14 @@ class _HeartRateStandardWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - "89", + "${avgHeartRate['value']}", style: TextStyle( color: themeController.currentColor.sc2, fontSize: AppConstants().normal_text_fontSize), ), Text( - "次/分钟", + "${avgHeartRate['unit']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: @@ -195,7 +248,7 @@ class _HeartRateStandardWidgetState extends State { Column( children: [ Text( - "基准心率", + "${baseHeartRate['name']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: @@ -207,7 +260,7 @@ class _HeartRateStandardWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - "80", + "${baseHeartRate['value']}", style: TextStyle( color: themeController.currentColor.sc2, fontSize: @@ -216,7 +269,7 @@ class _HeartRateStandardWidgetState extends State { overflow: TextOverflow.ellipsis, ), Text( - "次/分钟", + "${baseHeartRate['unit']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: @@ -233,7 +286,7 @@ class _HeartRateStandardWidgetState extends State { Column( children: [ Text( - "最低心率", + "${minHeartRate['name']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: @@ -245,7 +298,7 @@ class _HeartRateStandardWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - "68", + "${minHeartRate['value']}", style: TextStyle( color: themeController.currentColor.sc2, fontSize: @@ -254,7 +307,7 @@ class _HeartRateStandardWidgetState extends State { overflow: TextOverflow.ellipsis, ), Text( - "次/分钟", + "${minHeartRate['unit']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: @@ -271,7 +324,7 @@ class _HeartRateStandardWidgetState extends State { Column( children: [ Text( - "最高心率", + "${maxHeartRate['name']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: @@ -283,7 +336,7 @@ class _HeartRateStandardWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - "98", + "${maxHeartRate['value']}", style: TextStyle( color: themeController.currentColor.sc2, fontSize: @@ -292,7 +345,7 @@ class _HeartRateStandardWidgetState extends State { overflow: TextOverflow.ellipsis, ), Text( - "次/分钟", + "${maxHeartRate['unit']}", style: TextStyle( color: themeController.currentColor.sc3, fontSize: diff --git a/lib/pages/sleep_report/component/SkinPercentWidget.dart b/lib/pages/sleep_report/component/SkinPercentWidget.dart index 6c719dd..1196741 100644 --- a/lib/pages/sleep_report/component/SkinPercentWidget.dart +++ b/lib/pages/sleep_report/component/SkinPercentWidget.dart @@ -92,7 +92,7 @@ class _SkinPercentWidgetState extends State { context, Container( child: Text( - "皮肤指数介绍。", + "皮肤指数介绍".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, diff --git a/lib/pages/sleep_report/component/SleepCard.dart b/lib/pages/sleep_report/component/SleepCard.dart index 42ee152..1dc905b 100644 --- a/lib/pages/sleep_report/component/SleepCard.dart +++ b/lib/pages/sleep_report/component/SleepCard.dart @@ -52,6 +52,7 @@ class _SleepCardState extends State { runSpacing: 25.rpx, // 每行之间的垂直间距 children: List.generate(data.length, (index) { final item = data[index]; + item['showTip'] = true; return SizedBox( width: (MediaQuery.of(context).size.width - 160.rpx) / 3, child: SleepDataModuleWidget(data: item), diff --git a/lib/pages/sleep_report/component/SleepScoreWidget.dart b/lib/pages/sleep_report/component/SleepScoreWidget.dart index fb33a0b..dbf9d6c 100644 --- a/lib/pages/sleep_report/component/SleepScoreWidget.dart +++ b/lib/pages/sleep_report/component/SleepScoreWidget.dart @@ -67,12 +67,16 @@ class _SleepScoreWidgetState extends State { mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.center, children: [ - Text( - '30天平均分'.tr, - style: TextStyle( - color: Color(0xFFD3D3D3), - fontSize: 26.rpx, - letterSpacing: 0.0, + Container( + constraints: BoxConstraints(maxWidth: 150.rpx), + child: Text( + '30天平均分'.tr, + style: TextStyle( + color: Color(0xFFD3D3D3), + fontSize: 26.rpx, + letterSpacing: 0.0, + ), + maxLines: 1, ), ), Text( diff --git a/lib/pages/sleep_report/component/SleepView.dart b/lib/pages/sleep_report/component/SleepView.dart index 0e80ad9..6b97e9b 100644 --- a/lib/pages/sleep_report/component/SleepView.dart +++ b/lib/pages/sleep_report/component/SleepView.dart @@ -47,69 +47,13 @@ class _SleepViewWidgetState extends State { .where((item) => item['show'] != false) .toList(); - // final snoreValues = generateSnoreValues( - // widget.sleepReport['startTime'], - // widget.sleepReport['endTime'], - // ); + List snoreValues = widget.sleepReport['ssp']; Map time = MyUtils.diffHoursMinutesMap( widget.sleepReport['startTime'], widget.sleepReport['endTime']); int hour = time['hours']; int minutes = time['minutes']; - // List stages = [ - // {"et": 1748011592746, "st": 1748010870326, "type": 1}, - // {"et": 1748013519534, "st": 1748011593746, "type": 2}, - // {"et": 1748013639534, "st": 1748013520534, "type": 1}, - // {"et": 1748014183143, "st": 1748013640534, "type": 2}, - // {"et": 1748014363143, "st": 1748014184143, "type": 1}, - // {"et": 1748014423143, "st": 1748014364143, "type": 2}, - // {"et": 1748014541143, "st": 1748014424143, "type": 1}, - // {"et": 1748015439477, "st": 1748014542143, "type": 0}, - // {"et": 1748018470415, "st": 1748015440477, "type": 1}, - // {"et": 1748019755726, "st": 1748018471415, "type": 2}, - // {"et": 1748020123225, "st": 1748019756726, "type": 1}, - // {"et": 1748021138809, "st": 1748020124225, "type": 2}, - // {"et": 1748021535809, "st": 1748021139809, "type": 1}, - // {"et": 1748021776809, "st": 1748021536809, "type": 2}, - // {"et": 1748022140117, "st": 1748021777809, "type": 1}, - // {"et": 1748022320117, "st": 1748022141117, "type": 2}, - // {"et": 1748022996627, "st": 1748022321117, "type": 1}, - // {"et": 1748023439627, "st": 1748022997627, "type": 2}, - // {"et": 1748023812173, "st": 1748023440627, "type": 1}, - // {"et": 1748023895173, "st": 1748023813173, "type": 2}, - // {"et": 1748024692483, "st": 1748023896173, "type": 1}, - // {"et": 1748024960483, "st": 1748024693483, "type": 2}, - // {"et": 1748025678983, "st": 1748024961483, "type": 1}, - // {"et": 1748026351585, "st": 1748025679983, "type": 2}, - // {"et": 1748027131585, "st": 1748026352585, "type": 1}, - // {"et": 1748027209585, "st": 1748027132585, "type": 2}, - // {"et": 1748027487864, "st": 1748027210585, "type": 1}, - // {"et": 1748027967864, "st": 1748027488864, "type": 3}, - // {"et": 1748028182371, "st": 1748027968864, "type": 1}, - // {"et": 1748028372371, "st": 1748028183371, "type": 2}, - // {"et": 1748029109981, "st": 1748028373371, "type": 1}, - // {"et": 1748029958223, "st": 1748029110981, "type": 2}, - // {"et": 1748030792223, "st": 1748029959223, "type": 1}, - // {"et": 1748030874723, "st": 1748030793223, "type": 2}, - // {"et": 1748032042305, "st": 1748030875723, "type": 1}, - // {"et": 1748032170305, "st": 1748032043305, "type": 2}, - // {"et": 1748033387611, "st": 1748032171305, "type": 1}, - // {"et": 1748033967118, "st": 1748033388611, "type": 2}, - // {"et": 1748034087118, "st": 1748033968118, "type": 1}, - // {"et": 1748034147118, "st": 1748034088118, "type": 2}, - // {"et": 1748034327118, "st": 1748034148118, "type": 1}, - // {"et": 1748034930672, "st": 1748034328118, "type": 2}, - // {"et": 1748035230672, "st": 1748034931672, "type": 1}, - // {"et": 1748035353974, "st": 1748035231672, "type": 2}, - // {"et": 1748036710471, "st": 1748035354974, "type": 1}, - // {"et": 1748037126471, "st": 1748036711471, "type": 2}, - // {"et": 1748037310051, "st": 1748037127471, "type": 1}, - // {"et": 1748037380051, "st": 1748037311051, "type": 2}, - // {"et": 1748038881358, "st": 1748037381051, "type": 1}, - // {"et": 1748038962867, "st": 1748038882358, "type": 0}, - // {"et": 1748039291867, "st": 1748038963867, "type": 1}, - // {"et": 1748039684867, "st": 1748039292867, "type": 0} - // ]; + List stages = widget.sleepReport['sleepData']['stages']; return Container( width: double.infinity, diff --git a/lib/pages/sleep_report/component/SnoreViewWidget.dart b/lib/pages/sleep_report/component/SnoreViewWidget.dart index 7fa8234..3943370 100644 --- a/lib/pages/sleep_report/component/SnoreViewWidget.dart +++ b/lib/pages/sleep_report/component/SnoreViewWidget.dart @@ -43,6 +43,10 @@ class _SnoreViewWidgetWidgetState extends State { List> data = (widget.sleepReport['ssp'] as List).cast>(); List> showLabel = convertToShowLabel(data); + // List> showLabel = [ + // // {'startTime': 1748275800344, "endTime": 1748283000000, "times": 4}, + // {'startTime': 1748293800000, "endTime": 1748294400000, "times": 7}, + // ]; var startTime = widget.sleepReport['startTime']; var endTime = widget.sleepReport['endTime']; return Container( @@ -105,9 +109,18 @@ class _SnoreViewWidgetWidgetState extends State { SizedBox( height: 32.rpx, ), + Row( + children: [ + Text( + "次".tr, + style: TextStyle( + color: stringToColor("#FFFFFF"), fontSize: 18.rpx), + ), + ], + ), Padding( padding: - EdgeInsetsDirectional.fromSTEB(0.rpx, 0.rpx, 0.rpx, 0.rpx), + EdgeInsetsDirectional.fromSTEB(0.rpx, 40.rpx, 0.rpx, 0.rpx), child: LineChartByRange( showLabel: showLabel, startTime: startTime, @@ -132,13 +145,14 @@ class _SnoreViewWidgetWidgetState extends State { List> result = []; int startTime = data[0]['st']; - int endTime = data[0]['st']; + int endTime = data[0]['et']; int currentValue = data[0]['value']; for (int i = 1; i < data.length; i++) { final item = data[i]; final st = item['st']; final value = item['value']; + final et = item['et']; if (value == currentValue) { endTime = st; @@ -149,7 +163,7 @@ class _SnoreViewWidgetWidgetState extends State { "times": currentValue, }); startTime = st; - endTime = st; + endTime = et; currentValue = value; } } diff --git a/lib/pages/sleep_report/component/ZiZhuShenJingPercentWidget.dart b/lib/pages/sleep_report/component/ZiZhuShenJingPercentWidget.dart index e264949..59d652c 100644 --- a/lib/pages/sleep_report/component/ZiZhuShenJingPercentWidget.dart +++ b/lib/pages/sleep_report/component/ZiZhuShenJingPercentWidget.dart @@ -95,7 +95,7 @@ class _ZiZhuShenJingPercentWidgetState context, Container( child: Text( - "自主神经平衡指数监测介绍。", + "自主神经平衡指数监测介绍".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, diff --git a/lib/pages/sleep_report/new_sleep_report_page.dart b/lib/pages/sleep_report/new_sleep_report_page.dart index f921f70..3e53689 100644 --- a/lib/pages/sleep_report/new_sleep_report_page.dart +++ b/lib/pages/sleep_report/new_sleep_report_page.dart @@ -6,9 +6,12 @@ import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/requestWithLog.dart'; +import 'package:vbvs_app/component/NullDataComponentWidget.dart'; import 'package:vbvs_app/component/tool/ClickableContainer.dart'; +import 'package:vbvs_app/component/tool/TopSlideNotification.dart'; import 'package:vbvs_app/controller/date/CalendarController.dart'; import 'package:vbvs_app/controller/sleep/sleep_report_controller.dart'; +import 'package:vbvs_app/language/AppLanguage.dart'; import 'package:vbvs_app/pages/common/selectDialog.dart'; import 'package:vbvs_app/pages/sleep_report/component/AIAdviceWidget.dart'; import 'package:vbvs_app/pages/sleep_report/component/BreatheCard.dart'; @@ -55,17 +58,22 @@ class _NewSleepReportPageState extends State { sleepReportController.model.type = 1; } String date = MyUtils.formatToDate(widget.data['date']); + // String date = '2025-5-27'; requestWithLog( logTitle: "查询睡眠报告", method: MyHttpMethod.get, queryUrl: - "http://192.168.1.80:9898/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${date}&type=${sleepReportController.model.type}", + "https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${date}&type=${sleepReportController.model.type}", onSuccess: (res) { print(res); sleepReportController.sleepReport.value = res.data; sleepReportController.updateAll(); }, onFailure: (res) { + TopSlideNotification.show(context, + text: res.msg!, textColor: themeController.currentColor.sc9); + sleepReportController.sleepReport.value = {}; + sleepReportController.updateAll(); print(res); }); super.initState(); @@ -78,6 +86,7 @@ class _NewSleepReportPageState extends State { @override Widget build(BuildContext context) { + double lineWidth = 115.rpx; return LayoutBuilder( builder: (context, bodySize) => GestureDetector( onTap: () => FocusScope.of(context).unfocus(), @@ -152,54 +161,52 @@ class _NewSleepReportPageState extends State { Row( mainAxisSize: MainAxisSize.max, children: [ - Obx(() { - return ClickableContainer( - backgroundColor: Colors.transparent, - highlightColor: themeController - .currentColor.sc3, - borderRadius: 8.rpx, - padding: EdgeInsets.all(0), - onTap: () async { - sleepReportController.model.type = - 1; - sleepReportController.updateAll(); - }, - child: Column( - mainAxisSize: MainAxisSize.max, - children: [ - Container( - width: - 115.rpx, // 固定宽度为 160.rpx - alignment: - Alignment.center, // 文字居中 - child: Text( - '日报'.tr, - style: FlutterFlowTheme.of( - context) - .bodyMedium - .override( - fontFamily: 'Inter', - fontSize: AppConstants() - .title_text_fontSize, - letterSpacing: 0.0, - color: sleepReportController - .model - .type == - 1 - ? themeController - .currentColor - .sc2 - : themeController - .currentColor - .sc3, - ), - ), + ClickableContainer( + backgroundColor: Colors.transparent, + highlightColor: + themeController.currentColor.sc3, + borderRadius: 8.rpx, + padding: EdgeInsets.all(0), + onTap: () async { + sleepReportController.model.type = + 1; + sleepReportController.updateAll(); + }, + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Container( + width: 115.rpx, // 固定宽度为 160.rpx + alignment: + Alignment.center, // 文字居中 + child: Text( + '日报'.tr, + style: FlutterFlowTheme.of( + context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: AppConstants() + .title_text_fontSize, + letterSpacing: 0.0, + color: + sleepReportController + .model + .type == + 1 + ? themeController + .currentColor + .sc2 + : themeController + .currentColor + .sc3, + ), ), - SizedBox(height: 10.rpx), - ], - ), - ); - }), + ), + SizedBox(height: 10.rpx), + ], + ), + ), // Obx(() { // return ClickableContainer( @@ -299,33 +306,28 @@ class _NewSleepReportPageState extends State { // }), ], ), - Obx(() { - double lineWidth = 115.rpx; - return AnimatedPositioned( - duration: Duration(milliseconds: 300), - curve: Curves.easeInOut, - bottom: 0, - left: - sleepReportController.model.type == - 1 - ? 0 - : sleepReportController - .model.type == - 2 - ? 115.rpx - : 230.rpx, - child: Container( - width: lineWidth, - height: 4.rpx, - decoration: BoxDecoration( - color: themeController - .currentColor.sc2, - borderRadius: - BorderRadius.circular(2.rpx), - ), + AnimatedPositioned( + duration: Duration(milliseconds: 300), + curve: Curves.easeInOut, + bottom: 0, + left: sleepReportController.model.type == + 1 + ? 0 + : sleepReportController.model.type == + 2 + ? 115.rpx + : 230.rpx, + child: Container( + width: lineWidth, + height: 4.rpx, + decoration: BoxDecoration( + color: + themeController.currentColor.sc2, + borderRadius: + BorderRadius.circular(2.rpx), ), - ); - }), + ), + ), ], ), // Padding( @@ -353,10 +355,7 @@ class _NewSleepReportPageState extends State { child: Padding( padding: EdgeInsetsDirectional.fromSTEB( 30.rpx, 32.rpx, 30.rpx, 32.rpx), - child: Obx(() { - var date = sleepReportController.selectedDate; - return getTimeWidget(); - }), + child: getTimeWidget(), ), ), Padding( @@ -430,7 +429,7 @@ class _NewSleepReportPageState extends State { ), ), Text( - '2022-02-02', + '69', style: FlutterFlowTheme.of(context) .bodyMedium @@ -703,23 +702,42 @@ class _NewSleepReportPageState extends State { Widget getTimeWidget() { final selectedDate = sleepReportController.selectedDate.value!; final type = sleepReportController.model.type; - + bool isChinese = AppLanguage().isChinese(); String displayText = ''; - if (type == 1) { - // 日报 - displayText = - MyUtils.getFormatChineseTime(selectedDate.millisecondsSinceEpoch); - } else if (type == 2) { - // 周报 - final startOfWeek = - selectedDate.subtract(Duration(days: selectedDate.weekday - 1)); - final endOfWeek = startOfWeek.add(const Duration(days: 6)); - displayText = - '${MyUtils.getFormatChineseTime(startOfWeek.millisecondsSinceEpoch, showWeekday: false)}-${MyUtils.getFormatChineseTime(endOfWeek.millisecondsSinceEpoch, showWeekday: false)}'; - } else if (type == 3) { - // 月报 - displayText = - '${selectedDate.year}年${selectedDate.month.toString().padLeft(2, '0')}月'; + if (isChinese) { + if (type == 1) { + // 日报 + displayText = + MyUtils.getFormatChineseTime(selectedDate.millisecondsSinceEpoch); + } else if (type == 2) { + // 周报 + final startOfWeek = + selectedDate.subtract(Duration(days: selectedDate.weekday - 1)); + final endOfWeek = startOfWeek.add(const Duration(days: 6)); + displayText = + '${MyUtils.getFormatChineseTime(startOfWeek.millisecondsSinceEpoch, showWeekday: false)}-${MyUtils.getFormatChineseTime(endOfWeek.millisecondsSinceEpoch, showWeekday: false)}'; + } else if (type == 3) { + // 月报 + displayText = + '${selectedDate.year}年${selectedDate.month.toString().padLeft(2, '0')}月'; + } + } else { + if (type == 1) { + // Daily Report + displayText = + MyUtils.getFormatEnglishDate(selectedDate.millisecondsSinceEpoch); + } else if (type == 2) { + // Weekly Report + final startOfWeek = + selectedDate.subtract(Duration(days: selectedDate.weekday - 1)); + final endOfWeek = startOfWeek.add(const Duration(days: 6)); + displayText = + '${MyUtils.getFormatEnglishDate(startOfWeek.millisecondsSinceEpoch)} - ${MyUtils.getFormatEnglishDate(endOfWeek.millisecondsSinceEpoch)}'; + } else if (type == 3) { + // Monthly Report + displayText = + '${_getEnglishMonthName(selectedDate.month)} ${selectedDate.year}'; + } } void onLeftArrowTap() { @@ -738,6 +756,26 @@ class _NewSleepReportPageState extends State { } calendarController.selectedDate.value = sleepReportController.selectedDate.value; + // String date = MyUtils.formatToDate(widget.data['date']); + String data = MyUtils.formatDate(calendarController.selectedDate.value!); + requestWithLog( + logTitle: "查询睡眠报告", + method: MyHttpMethod.get, + queryUrl: + "https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}", + onSuccess: (res) { + print(res); + sleepReportController.sleepReport.value = res.data; + sleepReportController.updateAll(); + }, + onFailure: (res) { + TopSlideNotification.show(context, + text: res.msg!, textColor: themeController.currentColor.sc9); + sleepReportController.sleepReport.value = {}; + sleepReportController.updateAll(); + print(res); + }); + sleepReportController.updateAll(); calendarController.updateAll(); } @@ -758,6 +796,24 @@ class _NewSleepReportPageState extends State { } calendarController.selectedDate.value = sleepReportController.selectedDate.value; + String data = MyUtils.formatDate(calendarController.selectedDate.value!); + requestWithLog( + logTitle: "查询睡眠报告", + method: MyHttpMethod.get, + queryUrl: + "https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}", + onSuccess: (res) { + print(res); + sleepReportController.sleepReport.value = res.data; + sleepReportController.updateAll(); + }, + onFailure: (res) { + TopSlideNotification.show(context, + text: res.msg!, textColor: themeController.currentColor.sc9); + sleepReportController.sleepReport.value = {}; + sleepReportController.updateAll(); + print(res); + }); sleepReportController.updateAll(); calendarController.updateAll(); } @@ -823,6 +879,26 @@ class _NewSleepReportPageState extends State { onDateSelected: (newDate) { sleepReportController.selectedDate.value = newDate; calendarController.selectedDate.value = newDate; + String data = + MyUtils.formatDate(calendarController.selectedDate.value!); + requestWithLog( + logTitle: "查询睡眠报告", + method: MyHttpMethod.get, + queryUrl: + "https://sleepdata.he-info.com/api/analysis/sleep/analysis?mac=${widget.data['mac']}&time=${data}&type=${sleepReportController.model.type}", + onSuccess: (res) { + print(res); + sleepReportController.sleepReport.value = res.data; + sleepReportController.updateAll(); + }, + onFailure: (res) { + TopSlideNotification.show(context, + text: res.msg!, + textColor: themeController.currentColor.sc9); + sleepReportController.sleepReport.value = {}; + sleepReportController.updateAll(); + print(res); + }); sleepReportController.updateAll(); calendarController.updateAll(); }, @@ -841,4 +917,22 @@ class _NewSleepReportPageState extends State { ], ); } + + static String _getEnglishMonthName(int month) { + const monthNames = [ + 'January', + 'February', + 'March', + 'April', + 'May', + 'June', + 'July', + 'August', + 'September', + 'October', + 'November', + 'December' + ]; + return monthNames[month - 1]; + } } diff --git a/lib/pages/user/setting_page.dart b/lib/pages/user/setting_page.dart index 680cb6c..d3cab69 100644 --- a/lib/pages/user/setting_page.dart +++ b/lib/pages/user/setting_page.dart @@ -153,7 +153,7 @@ class _SettingPageState extends State { mainAxisSize: MainAxisSize.max, children: [ Text( - '深色', + '深色'.tr, style: FlutterFlowTheme.of(context) .bodyMedium