qsj 2 years ago
commit c5cf3021f8

@ -63,6 +63,8 @@ import WaterTest from "./components/WaterTest/index";
/* 本页组件 END */
import Echarts from "./components/Echart";
import EchartsFullScean from "./components/EchartFullScean";
import Gears from "./components/Gears";
import "./FR200.less";
@ -231,9 +233,121 @@ class IotCarePlanFR200 extends Component<any, any> {
isShowHistoryMsg: false, // 是否显示正在同步历史
showEcharts: false,
echartsData: "", //传给echarts图表的数据
series: [
{
data: [2, 3, 5, 3, 5, 6, 8, 5, 6, 4],
type: "line",
smooth: true,
z: 1,
areaStyle: {},
color: "red",
},
{
data: [2, 3, 5, 3, 5, 6, 8, 5, 6, 4],
type: "line",
smooth: true,
symbolSize: 10,
lineStyle: {
color: "#ff8410",
width: 1,
},
itemStyle: {
color: "#ff8410",
},
},
{
name: "a",
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
type: "bar",
barWidth: 22,
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#ffcf56",
},
},
{
name: "b",
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#febb22",
},
},
{
name: "c",
data: [0, 1, 1, 1, 1, 1, 1, 1, 1, 1],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#ffac28",
},
},
{
name: "d",
data: [0, 0, 1, 0, 1, 1, 1, 1, 1, 1],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#ff8410",
},
},
{
name: "e",
data: [0, 0, 1, 0, 1, 1, 1, 1, 1, 0],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#f85804",
},
},
{
name: "f",
data: [0, 0, 0, 0, 0, 1, 1, 0, 1, 0],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#e02e14",
},
},
{
name: "h",
data: [0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#b30016",
},
},
{
name: "i",
data: [0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#750010",
},
},
],
};
}
isFullScreen: boolean = false;
// 不涉及渲染的页面变量
isRuning: any = true; // 设备默认运行中fr200贴脸就会自动开始工作
jsonStatus: any = {}; // 同步设备返回数据,用于结束
@ -339,43 +453,6 @@ class IotCarePlanFR200 extends Component<any, any> {
}
}
getOption() {
const option = {
grid: { top: 8, right: 8, bottom: 24, left: 36 },
xAxis: {
type: "category",
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
},
yAxis: {
type: "value",
},
series: [
{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: "line",
smooth: true,
},
],
tooltip: {
trigger: "axis",
},
// title: {
// text: 'ECharts 示例'
// },
// tooltip: {},
// xAxis: {
// data: ['A', 'B', 'C', 'D', 'E']
// },
// yAxis: {},
// series: [{
// name: '数量',
// type: 'bar',
// data: [5, 20, 36, 10, 10]
// }]
};
return option;
}
async init() {
// 查询离线记录汇总
const queryInstructionParams = {
@ -731,8 +808,6 @@ class IotCarePlanFR200 extends Component<any, any> {
let gears: any = [];
let eDate: any = [];
echartsData?.map((item) => {
console.log(item, "查看数据");
const result = item.createTime.split(" ")[0].substring(5);
eDate.push(result);
item.nursingData = JSON.parse(item.nursingData);
@ -769,28 +844,52 @@ class IotCarePlanFR200 extends Component<any, any> {
this.showTips("检测到您的设备没有紧贴肌肤,请紧贴肌肤后重新尝试");
});
};
look() {
updata() {
let that = this;
// this.setState({ showEcharts: !this.state.showEcharts });
let stop = 0;
let time = setInterval(function () {
stop++;
let random = Math.random();
that.setState({ echartsData: random });
let series = JSON.parse(JSON.stringify(that.state.series));
let num = Math.floor(Math.random() * 9);
let count = 0;
series.map((item) => {
if (item.type === "line") {
item.data.splice(0, 1);
item.data.push(num);
}
if (item.type === "bar") {
count++;
item.data.splice(0, 1);
if (count <= num) {
item.data.push(1);
} else {
item.data.push(0);
}
}
});
// 更新图表数据
that.setState({ series });
if (stop >= 20) {
clearInterval(time);
}
}, 1000);
}
updata() {}
// 绘制能量图
drawProwerPicture() {}
full() {
this.setState({ isFullScreen: !this.state.isFullScreen });
}
/** 切换光照 */
onSwitchChange = async () => {
// todo
let { isStopNurse } = this.state;
let { isStopNurse, ActiveModeItem } = this.state;
console.log("切换光照,", ActiveModeItem);
if (ActiveModeItem.modeType === "led") {
this.onSwitchChangeLED();
return;
}
if (isStopNurse) {
// 开始光照逻辑
this.onNursingTap();
@ -804,6 +903,37 @@ class IotCarePlanFR200 extends Component<any, any> {
isStopNurse: !isStopNurse,
});
};
/** LED切换模式 */
onSwitchChangeLED = () => {
let { isStopNurse } = this.state;
if (isStopNurse) {
// 开始光照逻辑
this.onNursingTap();
this.switchVideoPlay(); // 开始
} else {
// 暂停光照逻辑
let sendParams: any = {
...deviceCommandSamples.pause,
workMode: "led", // 使用模式
workStatus: "standby",
};
const pauseArrayBuffer = deviceToolKitInstance.toBleCommand(
sendParams as any
);
sendCommand({
value: pauseArrayBuffer,
}).then(() => {
this.workStatus = "pause";
this.resetTimer();
console.info(`发送暂停指令成功 参数为 =>`, sendParams);
});
// this.handleWorkStatus(false, MODE_WORKING_ENUM.PAUSE);
this.switchVideoPause(); // 暂停
}
this.setState({
isStopNurse: !isStopNurse,
});
};
/**
* @name
@ -1642,7 +1772,6 @@ class IotCarePlanFR200 extends Component<any, any> {
workMode: ActiveModeItem.modeType, // 使用模式
workStatus: newWorkStatus,
};
console.log(ActiveModeItem, "查看工作状态");
// 水分测试需要特殊处理
// 水分测试准备 水分测试工作 水分测试启动
@ -1997,6 +2126,8 @@ class IotCarePlanFR200 extends Component<any, any> {
params.workMode = jsonStatus?.workMode;
params.modeId = this.state.ActiveModeItem.id;
params.modeName = this.state.ActiveModeItem.modeName;
console.log(jsonStatus, 555555555555);
}
} else {
params.jsonStatus = jsonStatus;
@ -2497,6 +2628,8 @@ class IotCarePlanFR200 extends Component<any, any> {
echartsData,
isShowReReadRecordConnect,
currentServiceData,
series,
isFullScreen,
} = this.state;
return (
@ -2507,249 +2640,324 @@ class IotCarePlanFR200 extends Component<any, any> {
isCustomBack
customBack={this.customBack}
/>
{!isFullScreen && (
<View>
<View catchMove>
<PopupAlert
isShow={isModeLock}
zIndex={10020}
myClassName="level-up"
title="提示"
content="该模式即将上线,敬请期待"
confirmButtonText="我知道了"
textAlgin="center"
close={this.onModeLockClose}
confirm={this.onModeLockClose}
/>
<PopupInstrumentUploadTips
isShow={isFirstTipShow}
zIndex={10020}
myClassName="level-up"
title="打卡介绍"
data={nurseInfo}
close={this.onTipShowClose}
confirm={this.onTipShowClose}
/>
<View catchMove>
<PopupAlert
isShow={isModeLock}
zIndex={10020}
myClassName="level-up"
title="提示"
content="该模式即将上线,敬请期待"
confirmButtonText="我知道了"
textAlgin="center"
close={this.onModeLockClose}
confirm={this.onModeLockClose}
/>
<PopupInstrumentUploadTips
isShow={isFirstTipShow}
zIndex={10020}
myClassName="level-up"
title="打卡介绍"
data={nurseInfo}
close={this.onTipShowClose}
confirm={this.onTipShowClose}
/>
<PopupCountdown isShow={isShowCountdown} countdown={countdown} />
<PopupConfirm
isLarge
isClose
isShow={isEndCarePlan}
title="提示"
content="是否结束护理"
textAlgin="center"
cancelButtonText="取消"
confirmButtonText="确定"
close={this.cancelEndBtn}
confirm={this.confirmEndBtn}
/>
<PopupConfirm
isLarge
isClose
isShow={isSwitchActiveMode}
title="护理模式切换"
content={
<ModeListView
ModeID={ModeID}
activeModeID={activeModeID}
isPop
isShowNurse={isShowNurse}
ModeList={ModeList}
ModeType={ModeType}
onEmit={this.switchModeCurrentFun}
onEmitShowAll={this.openModeSwitch}
onModeLockOpen={this.onModeLockOpen}
<PopupCountdown isShow={isShowCountdown} countdown={countdown} />
<PopupConfirm
isLarge
isClose
isShow={isEndCarePlan}
title="提示"
content="是否结束护理"
textAlgin="center"
cancelButtonText="取消"
confirmButtonText="确定"
close={this.cancelEndBtn}
confirm={this.confirmEndBtn}
/>
}
textAlgin="center"
cancelButtonText="取消"
confirmButtonText="确定"
close={this.cancelModeSwitchBtn}
confirm={this.confirmModeSwitchBtn}
/>
{ActiveModeItem.openSourceData.length > 0 && (
<PopupStepTips
isShow={isShowStepTips}
isLarge
isFirstEntry={false}
confirmButtonText="知道了"
data={ActiveModeItem.openSourceData}
close={this.closeStepTips}
/>
)}
<PopupAlert
isShow={isNotEnoughTime}
isClose
title="提示"
content="您的本次护理时间不足,请重新护理"
confirmButtonText="确认"
textAlgin="center"
close={this.closeNotEnoughTime}
confirm={this.closeNotEnoughTime}
/>
<PopupAlert
isShow={isShowErrorTipsText}
isClose
zIndex={10020}
myClassName="level-up"
title="提示"
content={errorTipsText}
confirmButtonText="知道了"
textAlgin="center"
close={this.closeErrorTipsText}
confirm={this.closeErrorTipsText}
/>
<PopupConfirm
isShow={isShowTipsSave}
isClose
zIndex={10020}
myClassName="level-up"
title="提示"
content={
<Block>
<View></View>
<View></View>
</Block>
}
cancelButtonText="取消"
confirmButtonText="确认"
textAlgin="center"
close={this.closeTipsSave}
cancel={this.cancelTipsSave}
confirm={this.confirmTipsSave}
/>
<PopupStatus
isShow={isShowNursingSuccess}
isClose
title="您已结束本次护理"
type="success"
content="正在上传护理记录……"
confirmButtonText="知道了"
textAlgin="center"
close={() => {
/*不需要做处理*/
}}
/>
{isConnectShow && (
<ConnectionBluetoot
deviceInfo={currentDevice}
close={this.connectionClose}
isDisconnect={!isConnectionBlutoot}
offlineChange={() => {}}
pairingChange={this.pairingChange}
upgradeFun={() => {}}
/>
)}
<Popup
show={isShowHistoryMsg}
className="custom-popup"
overlay={false}
>
<View className="sync-history-msg">...</View>
</Popup>
</View>
<View>
<View className="iot-main">
<View className="banner-box">
<View>
<Video
className="video-or-image"
src={currentVideoSrc}
loop
id="myVideo"
objectFit="cover"
enablePlayGesture
showFullscreenBtn={false}
onLoadedMetaData={this.GetVideosTime}
/>
<PopupConfirm
isLarge
isClose
isShow={isSwitchActiveMode}
title="护理模式切换"
content={
<ModeListView
ModeID={ModeID}
activeModeID={activeModeID}
isPop
isShowNurse={isShowNurse}
ModeList={ModeList}
ModeType={ModeType}
onEmit={this.switchModeCurrentFun}
onEmitShowAll={this.openModeSwitch}
onModeLockOpen={this.onModeLockOpen}
/>
}
textAlgin="center"
cancelButtonText="取消"
confirmButtonText="确定"
close={this.cancelModeSwitchBtn}
confirm={this.confirmModeSwitchBtn}
/>
<Popup
show={isShowHistoryMsg}
className="custom-popup"
overlay={false}
>
<View className="sync-history-msg">...</View>
</Popup>
</View>
<View>
<View className="iot-main">
<View className="banner-box">
<View>
<Video
className="video-or-image"
src={currentVideoSrc}
loop
id="myVideo"
objectFit="cover"
enablePlayGesture
showFullscreenBtn={false}
onLoadedMetaData={this.GetVideosTime}
/>
{errorTips && (
<Block>
<View className="msg-tips">
<Image
className="msg-tips-img"
src={require("@/img/tips.png")}
/>
<View className="msg-tips-content">{errorTips}</View>
</View>
</Block>
)}
</View>
{errorTips && (
<Block>
<View className="msg-tips">
<Image
className="msg-tips-img"
src={require("@/img/tips.png")}
{ActiveModeItem.modeType !== "moistureTest" && (
<View className="fr200-iot-device">
<View className="item">
<Text className="device-time">
<Text className="time">{currentTime}</Text>
</Text>
</View>
<View className="line" />
<View className="item">
<Text className="gear">
{ActiveModeItem.modeType === "led"
? "-"
: currentGear}
</Text>
</View>
<View className="line" />
<ElectricityView
Electricity={Electricity}
DeviceConnectStatus={DeviceConnectStatus}
/>
<View className="msg-tips-content">{errorTips}</View>
</View>
</Block>
)}
</View>
{ModeList.length > 0 && (
<ModeListView
isPop={false}
isShowNurse={isShowNurse}
ModeList={ModeList}
ModeType={ModeType}
ModeID={ModeID}
activeModeID={activeModeID}
onEmit={this.modeCurrentFun}
onEmitShowAll={this.openModeSwitch}
onModeLockOpen={this.onModeLockOpen}
/>
)}
</View>
{/* <button onClick={this.look.bind(this)}>echarts </button>
<button onClick={this.updata.bind(this)}> </button> */}
{ActiveModeItem.modeType !== "moistureTest" && (
<View className="fr200-iot-device">
<View className="item">
<Text className="device-time">
<Text className="time">{currentTime}</Text>
</Text>
</View>
<View className="line" />
<View className="item">
<Text className="gear">
{ActiveModeItem.modeType === "led" ? "-" : currentGear}
</Text>
</View>
<View className="line" />
<ElectricityView
Electricity={Electricity}
DeviceConnectStatus={DeviceConnectStatus}
<PopupAlert
isShow={isNotEnoughTime}
isClose
title="提示"
content="您的本次护理时间不足,请重新护理"
confirmButtonText="确认"
textAlgin="center"
close={this.closeNotEnoughTime}
confirm={this.closeNotEnoughTime}
/>
<PopupAlert
isShow={isShowErrorTipsText}
isClose
zIndex={10020}
myClassName="level-up"
title="提示"
content={errorTipsText}
confirmButtonText="知道了"
textAlgin="center"
close={this.closeErrorTipsText}
confirm={this.closeErrorTipsText}
/>
<PopupConfirm
isShow={isShowTipsSave}
isClose
zIndex={10020}
myClassName="level-up"
title="提示"
content={
<Block>
<View></View>
<View></View>
</Block>
}
cancelButtonText="取消"
confirmButtonText="确认"
textAlgin="center"
close={this.closeTipsSave}
cancel={this.cancelTipsSave}
confirm={this.confirmTipsSave}
/>
<PopupStatus
isShow={isShowNursingSuccess}
isClose
title="您已结束本次护理"
type="success"
content="正在上传护理记录……"
confirmButtonText="知道了"
textAlgin="center"
close={() => {
/*不需要做处理*/
}}
/>
{isConnectShow && (
<ConnectionBluetoot
deviceInfo={currentDevice}
close={this.connectionClose}
isDisconnect={!isConnectionBlutoot}
offlineChange={() => {}}
pairingChange={this.pairingChange}
upgradeFun={() => {}}
/>
</View>
)}
</View>
)}
{ModeList.length > 0 && (
<ModeListView
isPop={false}
isShowNurse={isShowNurse}
ModeList={ModeList}
ModeType={ModeType}
ModeID={ModeID}
activeModeID={activeModeID}
onEmit={this.modeCurrentFun}
onEmitShowAll={this.openModeSwitch}
onModeLockOpen={this.onModeLockOpen}
/>
)}
{/* <button onClick={this.look.bind(this)}>echarts </button>
<button onClick={this.updata.bind(this)}> </button> */}
<Popup
show={isShowHistoryMsg}
className="custom-popup"
overlay={false}
>
<View className="sync-history-msg">...</View>
</Popup>
</View>
<View className={classnames({ show: showEcharts })}>
<Echarts data={echartsData}></Echarts>
</View>
{/* {(ActiveModeItem.modeType === "face" ||
<View>
<View className="iot-main">
<View className="banner-box">
<View>
<Video
className="video-or-image"
src={currentVideoSrc}
loop
id="myVideo"
objectFit="cover"
enablePlayGesture
showFullscreenBtn={false}
onLoadedMetaData={this.GetVideosTime}
/>
{/* <button onClick={this.executePromises}>点击按钮</button> */}
{errorTips && (
<Block>
<View className="msg-tips">
<Image
className="msg-tips-img"
src={require("@/img/tips.png")}
/>
<View className="msg-tips-content">
{errorTips}
</View>
</View>
</Block>
)}
</View>
<View className="fr200-iot-device">
<View className="item">
<Text className="device-time">
<Text className="time">{currentTime}</Text>
</Text>
</View>
<View className="line" />
<View className="item">
<Text className="gear">{currentGear}</Text>
</View>
<View className="line" />
<ElectricityView
Electricity={Electricity}
DeviceConnectStatus={DeviceConnectStatus}
/>
</View>
</View>
{ModeList.length > 0 && (
<ModeListView
isPop={false}
isShowNurse={isShowNurse}
ModeList={ModeList}
ModeType={ModeType}
ModeID={ModeID}
activeModeID={activeModeID}
onEmit={this.modeCurrentFun}
onEmitShowAll={this.openModeSwitch}
onModeLockOpen={this.onModeLockOpen}
/>
)}
<button onClick={this.updata.bind(this)}>
{" "}
</button>
{/* <button onClick={this.updata.bind(this)}>添加数据 </button> */}
<View className={classnames({ show: showEcharts })}>
<Echarts
series={series}
full={this.full.bind(this)}
></Echarts>
<EchartsFullScean
series={series}
full={this.full}
></EchartsFullScean>
</View>
{/* {(ActiveModeItem.modeType === "face" ||
ActiveModeItem.modeType === "eyes") && <Echarts></Echarts>} */}
{(ActiveModeItem.modeType === "maskPenetration" ||
ActiveModeItem.modeType === "essence") && (
<Gears
onEmitMinus={this.handleMinus}
onEmitAdd={this.handleAdd}
GearData={GearData}
></Gears>
)}
{ActiveModeItem.modeType === "moistureTest" && (
<WaterTest
isRuningTest={isRuningTest}
stepList={waterStepList}
stepIndex={waterStepIndex}
></WaterTest>
)}
</View>
{(ActiveModeItem.modeType === "maskPenetration" ||
ActiveModeItem.modeType === "essence") && (
<Gears
onEmitMinus={this.handleMinus}
onEmitAdd={this.handleAdd}
GearData={GearData}
></Gears>
)}
{ActiveModeItem.modeType === "moistureTest" && (
<WaterTest
isRuningTest={isRuningTest}
stepList={waterStepList}
stepIndex={waterStepIndex}
></WaterTest>
)}
</View>
<Footer
{/* <Footer
currentWorkModeType={currentWorkModeType}
isRuningTest={isRuningTest}
isStopNurse={isStopNurse}
@ -2757,8 +2965,21 @@ class IotCarePlanFR200 extends Component<any, any> {
onEmitSwitchChange={this.onSwitchChange}
onEmitEndPlan={this.onEndPlan}
onsuccess={this.onsuccess}
/>
</View>
/> */}
</View>
</View>
</View>
)}
{isFullScreen && (
<View>
<button onClick={this.updata.bind(this)}> </button>
<EchartsFullScean
series={series}
full={this.full}
></EchartsFullScean>
</View>
)}
</Block>
);
}

@ -9,13 +9,13 @@ import echarts from "@/utils/echarts.min.js";
import "./index.less";
interface Props {
data: any
series: any,
full:any
}
function Index({ data }: Props) {
const buttonRef = useRef(null);
function Index({ series ,full}: Props) {
const echartsRef = useRef<EchartsHandle>(null);
const [options, setOptions] = useState({
animation: false,
@ -145,205 +145,33 @@ function Index({ data }: Props) {
color: "#ff8410",
},
},
series: [
{
data: [2, 3, 5, 3, 5, 6, 8, 5, 6, 4],
type: "line",
smooth: true,
z: 1,
areaStyle: {},
color: "red",
},
{
data: [2, 3, 5, 3, 5, 6, 8, 5, 6, 4],
type: "line",
smooth: true,
symbolSize: 5,
lineStyle: {
color: "#ff8410",
width: 1,
},
itemStyle: {
color: "#ff8410",
},
},
{
name: "a",
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
type: "bar",
barWidth: 12,
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#ffcf56",
},
},
{
name: "b",
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#febb22",
},
},
{
name: "c",
data: [0, 1, 1, 1, 1, 1, 1, 1, 1, 1],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#ffac28",
},
},
{
name: "d",
data: [0, 0, 1, 0, 1, 1, 1, 1, 1, 1],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#ff8410",
},
},
{
name: "e",
data: [0, 0, 1, 0, 1, 1, 1, 1, 1, 0],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#f85804",
},
},
{
name: "f",
data: [0, 0, 0, 0, 0, 1, 1, 0, 1, 0],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#e02e14",
},
},
{
name: "h",
data: [0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#b30016",
},
},
{
name: "i",
data: [0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#750010",
},
},
],
series: []
})
const level = [8, 7, 6, 5, 4, 3, 2];
const [newOptions, setNewOptions] = useState(options)
const [newData, setNewData] = useState(0)
const full = useCallback(() => {
// let box = document.getElementById("box");
// box?.classList.add('fullscreen')
let stop = 0
// let time = setInterval(function () {
// stop++
const updata = useCallback((res) => {
let option = JSON.parse(JSON.stringify(options))
let num = Math.floor(Math.random() * 9)
let count = 0
options.series.map(item => {
if (item.type === 'line') {
item.data.splice(0, 1)
item.data.push(num)
}
if (item.type === 'bar') {
count++
item.data.splice(0, 1)
if (count <= num) {
item.data.push(1)
} else {
item.data.push(0)
}
}
})
console.log(option);
option.series = JSON.parse(JSON.stringify(res))
// 更新图表数据
setNewOptions(option)
// if (stop > 20) {
// clearInterval(time)
// }
// }, 1000)
}, [])
const cancelFull = useCallback((res) => {
full()
}, [])
}, [data])
useEffect(() => {
setOptions(newOptions)
}, [newOptions]);
useEffect(() => {
setNewData(data)
}, [data]);
useEffect(() => {
let option = JSON.parse(JSON.stringify(options))
let num = Math.floor(newData * 9)
let count = 0
options.series.map(item => {
if (item.type === 'line') {
item.data.splice(0, 1)
item.data.push(num)
}
if (item.type === 'bar') {
count++
item.data.splice(0, 1)
if (count <= num) {
item.data.push(1)
} else {
item.data.push(0)
}
}
})
console.log(option, data);
// 更新图表数据
setNewOptions(option)
}, [newData])
// 当 someProp 变化时执行
// const quanping = () => {
// T.setPageOrientation({
// orientation: "portrait",
// });
// // taro.setPageOrientation({
// // orientation: "landscape",
// // });
// },
updata(series)
}, [series])
return (
@ -359,7 +187,7 @@ function Index({ data }: Props) {
style={{ width: "630rpx", height: "260rpx", zIndex: 1 }}
/>
<View className='box_background'>
<Image className='full' ref={buttonRef} src={require("@/img/full-scran.png")} onClick={full}></Image>
<Image className='full' src={require("@/img/full-scran.png")} onClick={cancelFull}></Image>
<View className='power'></View>
{level.map((item) => (
<View className='line' key={item}>

@ -0,0 +1,106 @@
.box_full {
width: 690rpx;
height: 83vh;
margin: 28rpx auto 150rpx;
background-color: #fff;
border-radius: 30rpx;
padding: 35rpx 25rpx 25rpx 35rpx;
box-sizing: border-box;
position: relative;
// writing-mode: vertical-lr;
// text-orientation: upright;
// white-space: nowrap;
// font-size: 18px;
// font-weight: bold;
// background-color: #c2e5f3;
// color: #fff;
// width: 100%;
}
.fullscreen {
position: fixed;
top: 450rpx;
left: -450rpx;
right: 0;
bottom: 0;
width: 100vh;
height: 100vw;
z-index: 9999;
background-color: rgba(0, 0, 0, 0.5); /* 背景色 */
transform: rotate(90deg);
// animation: rotate 0s linear;
}
@keyframes rotate {
from {
width: 690rpx;
height: 320rpx;
transform: rotate(0deg);
}
to {
width: 100vh;
height: 100vw;
transform: rotate(0deg);
}
}
.box_background1 {
position: absolute;
top: 330rpx;
left: -326rpx;
width: 83vh;
height: 690rpx;
border-radius: 30rpx;
background-color: rgba(0, 0, 0, 0);
transform: rotate(90deg);
.power {
margin: 56rpx 0 103rpx 38rpx;
font-family: PingFang-SC;
font-weight: 500;
font-size: 36rpx;
color: #cccccc;
}
.part {
width: 48rpx;
height: 48rpx;
position: absolute;
top: 37rpx;
right: 37rpx;
z-index: 100;
transform: rotate(90deg);
}
.line {
margin: 0 30rpx 0 52rpx;
font-family: PingFang-SC;
font-size: 28rpx;
color: #cccccc;
display: flex;
position: relative;
height: 47rpx;
.bottom_line {
// border-bottom: 1rpx #ccc dashed;
width: 550rpx;
margin-left: 20rpx;
position: absolute;
bottom: -6rpx;
right: 74rpx;
height: 4rpx;
color: #fff;
}
}
.time {
position: absolute;
bottom: 62rpx;
right: 44rpx;
font-family: PingFang-SC;
font-size: 36rpx;
color: #cccccc;
}
}
page {
background: #f8f8f8;
background: #f3f3f3;
}

@ -0,0 +1,212 @@
import Taro from "@tarojs/taro";
import classnames from "classnames";
import { Block, View, Image, Text, Input } from "@tarojs/components";
import { Popup, Progress, Slider } from "@antmjs/vantui";
import { useEffect, useRef, useState, useCallback } from "react";
import Echarts, { EChartOption, EchartsHandle } from "taro-react-echarts";
import echarts from "@/utils/echarts.min.js";
import "./index.less";
interface Props {
series: any,
full: any
}
function Index({ series, full }: Props) {
const echartsRef = useRef<EchartsHandle>(null);
const [options, setOptions] = useState({
animation: false,
grid: {
// 让图表占满容器
// containLabel: true,
top: "32rpx",
left: "48rpx",
right: "86rpx",
bottom: "68rpx",
},
// legend: {
// itemStyle: {
// decal: {
// rotation: 90
// }
// }
// },
yAxis: {
// name: '',
// nameGap: 5,
// nameTextStyle: {
// color: '#e4e4e4',
// fontSize:7
// },
type: "category",
inverse: true,
axisLine: {
//坐标轴轴线相关设置。数学上的x轴
show: true,
lineStyle: {
color: "#cccccc",
},
},
axisLabel: {
//坐标轴刻度标签的相关设置
color: "#cccccc",
fontSize: 14,
rotate: -90,
margin: 18
},
axisTick: {
show: false,
},
data: [
"00:01",
"00:02",
"00:03",
"00:04",
"00:05",
"00:06",
"00:07",
"00:08",
"00:09",
"00:10",
],
},
xAxis: {
type: "value",
min: 0,
max: 8,
splitNumber: 8,
splitLine: {
show: true,
lineStyle: {
color: "#cccccc",
type: [4, 2],
dashOffset: 4,
},
},
axisLine: {
show: false,
},
axisLabel: {
show: false,
},
axisTick: {
show: false,
},
},
visualMap: {
z: 1,
top: 0,
right: 0,
seriesIndex: 0,
show: false,
dimension: 0,
pieces: [
{
gt: 0,
lte: 1,
color: "#fff8c9",
},
{
gt: 1,
lte: 2,
color: "#fff0c6",
},
{
gt: 2,
lte: 3,
color: "#ffe5c3",
},
{
gt: 3,
lte: 4,
color: "#ffdbbf",
},
{
gt: 4,
lte: 5,
color: "#ffcfbb",
},
{
gt: 5,
lte: 6,
color: "#ffbab5",
},
{
gt: 6,
lte: 7,
color: "#ffb4b3",
},
{
gt: 7,
lte: 8,
color: "#ffb4b3",
},
],
outOfRange: {
color: "#ff8410",
},
},
series: []
})
const level = [8, 7, 6, 5, 4, 3, 2];
const [newOptions, setNewOptions] = useState(options)
const updata = useCallback((res) => {
let option = JSON.parse(JSON.stringify(options))
option.series = JSON.parse(JSON.stringify(res))
// 更新图表数据
setNewOptions(option)
}, [])
const cancelFull = useCallback((res) => {
console.log(1111);
full()
}, [])
useEffect(() => {
setOptions(newOptions)
}, [newOptions]);
useEffect(() => {
updata(series)
}, [series])
return (
<Block>
<View id='box' className='box_full'>
<Echarts
force-use-old-canvas='false'
echarts={echarts}
option={options}
ref={echartsRef}
// isPage={false}
// style自定义设置echarts宽高
style={{ width: "620rpx", height: "80vh", zIndex: 1 }}
/>
<View className='box_background1'>
<Image className='part' src={require("@/img/part-scran.png")} onClick={cancelFull}></Image>
<View className='power'></View>
{level.map((item) => (
<View className='line' key={item}>
<View className='number'>{item}</View>
<View className='bottom_line'></View>
</View>
))}
<View className='line'>
<View className='number'>1</View>
</View>
<View className='time'></View>
</View>
</View>
</Block >
);
}
export default Index;

@ -7,44 +7,44 @@ import Echarts, { EChartOption, EchartsHandle } from "taro-react-echarts";
// import echarts from "@/utils/echarts.min.js";
import * as echarts from "echarts";
import React, { useState, useEffect,useMemo } from 'react';
import React, { useState, useEffect, useMemo } from 'react';
import "./index.less";
interface Props {
EchartsData:any
EchartsData: any
}
function Index({
EchartsData
}:Props) {
let type =0
}: Props) {
let type = 0
// console.log(EchartsData,'EchartsDataEchartsData');
switch(EchartsData.modeName) {
switch (EchartsData.modeName) {
case '基础班脸部':
type=37
type = 37
break;
case '基础版眼部':
type=25
type = 25
break;
case '法令纹Pro':
type=25
case '法令纹Pro':
type = 25
break;
case '下颌线Pro':
type=19
case '下颌线Pro':
type = 19
break;
case '抬头纹Pro':
type=13
case '抬头纹Pro':
type = 13
break;
default:
}
}
const echartsRef = useRef<EchartsHandle>(null);
function generateColorArray(startColor, endColor, steps) {
var startRGB = hexToRgb(startColor);
var endRGB = hexToRgb(endColor);
@ -81,33 +81,33 @@ function Index({
const steps = 81; // 80个颜色
const colors = generateColorArray(startColor, endColor, steps);
// const xList = [...new Array(type).fill(0).map((item, key) => key)];
let seriesData:any =[]
seriesData = EchartsData?.data?.groupedAa
const xList = [...new Array(type).fill(0).map((item, key) => key)];
// const seriesData = [
// ...xList.map((item) => {
// return Math.random() * 80;
// }),
// ];
const option: EChartOption = {
grid: {
// 让图表占满容器
top: "10rpx",
left: "45rpx",
right: "28rpx",
bottom: "17rpx",
},
xAxis: {
type: "category",
data: [...xList],
axisLabel: {
interval: 5,
formatter: function (value, index) {
return value * 10 + 's';
},
textStyle: {
const colors = generateColorArray(startColor, endColor, steps);
// const xList = [...new Array(type).fill(0).map((item, key) => key)];
let seriesData: any = []
seriesData = EchartsData?.data?.groupedAa
const xList = [...new Array(type).fill(0).map((item, key) => key)];
// const seriesData = [
// ...xList.map((item) => {
// return Math.random() * 80;
// }),
// ];
const option: EChartOption = {
grid: {
// 让图表占满容器
top: "10rpx",
left: "45rpx",
right: "28rpx",
bottom: "17rpx",
},
xAxis: {
type: "category",
data: [...xList],
axisLabel: {
interval: 5,
formatter: function (value, index) {
return value * 10 + 's';
},
textStyle: {
color: '#999999', // 文字颜色
fontSize: 8 // 文字大小
},
@ -173,90 +173,90 @@ const option: EChartOption = {
},
],
}
// 基于 EchartsData 生成 ECharts 配置
// const option: EChartOption ={
// grid: {
// // 让图表占满容器
// top: "10rpx",
// left: "45rpx",
// right: "28rpx",
// bottom: "17rpx",
// },
// xAxis: {
// type: "category",
// data: [...xList],
// axisLabel: {
// interval: 5,
// formatter: function (value, index) {
// return value * 10 + 's';
// },
// textStyle: {
// color: '#999999', // 文字颜色
// fontSize: 8 // 文字大小
// },
// },
// axisTick: {
// // alignWithLabel: true,
// show: false,
// interval: 9,
// },
// // axisLine: {
// // show: false,
// // },
// },
// yAxis: [
// {
// min: 0,
// max: 80,
// splitNumber: 10,
// axisLabel: {
// formatter: function (value, index) {
// const num = value / 10 + 1
// return num === 9 ? '' : num + '级';
// },
// textStyle: {
// color: '#999999', // 文字颜色
// fontSize: 8 // 文字大小
// },
// },
// type: "value",
// splitLine: {
// lineStyle: {
// color: ["#ccc", "#ccc", "#ccc", "#ccc", "#ccc", "#ccc", "#ccc", "#ccc", "#fff"],
// type: 'dashed'
// },
// }
// },
// ],
// series: [
// {
// barCategoryGap: '0%',
// data: seriesData,
// type: "bar",
// // barWidth: 15,
// gapWidth: "0%",
// itemStyle: {
// normal: {
// color: function (params) {
// var value = params.data;
// return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
// {
// offset: 0,
// color: colors[parseInt(value)], // 红色
// },
// {
// offset: 1,
// color: colors[0], // 黄色
// },
// ]);;
// },
// },
// },
// },
// ],
// };
// 基于 EchartsData 生成 ECharts 配置
// const option: EChartOption ={
// grid: {
// // 让图表占满容器
// top: "10rpx",
// left: "45rpx",
// right: "28rpx",
// bottom: "17rpx",
// },
// xAxis: {
// type: "category",
// data: [...xList],
// axisLabel: {
// interval: 5,
// formatter: function (value, index) {
// return value * 10 + 's';
// },
// textStyle: {
// color: '#999999', // 文字颜色
// fontSize: 8 // 文字大小
// },
// },
// axisTick: {
// // alignWithLabel: true,
// show: false,
// interval: 9,
// },
// // axisLine: {
// // show: false,
// // },
// },
// yAxis: [
// {
// min: 0,
// max: 80,
// splitNumber: 10,
// axisLabel: {
// formatter: function (value, index) {
// const num = value / 10 + 1
// return num === 9 ? '' : num + '级';
// },
// textStyle: {
// color: '#999999', // 文字颜色
// fontSize: 8 // 文字大小
// },
// },
// type: "value",
// splitLine: {
// lineStyle: {
// color: ["#ccc", "#ccc", "#ccc", "#ccc", "#ccc", "#ccc", "#ccc", "#ccc", "#fff"],
// type: 'dashed'
// },
// }
// },
// ],
// series: [
// {
// barCategoryGap: '0%',
// data: seriesData,
// type: "bar",
// // barWidth: 15,
// gapWidth: "0%",
// itemStyle: {
// normal: {
// color: function (params) {
// var value = params.data;
// return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
// {
// offset: 0,
// color: colors[parseInt(value)], // 红色
// },
// {
// offset: 1,
// color: colors[0], // 黄色
// },
// ]);;
// },
// },
// },
// },
// ],
// };
return (

@ -31,7 +31,6 @@ function Index({
let PermeationList = ModeList.filter((item) => item.modeClass === 3); // 专研促渗
let SensitiveList = ModeList.filter((item) => item.modeClass === 4); // 敏感期护理
let IntelligenceList = ModeList.filter((item) => item.modeClass === 5); // 智能测肤
console.log(activeModeID, "查看id", BaseList, ModeList);
const onItemClick = (item) => {
if (item.lock) {
onModeLockOpen(); // 点击了锁定模式

@ -0,0 +1,4 @@
export default definePageConfig({
navigationBarTitleText: "水分测试",
enablePageMeta: true,
});

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

@ -403,13 +403,18 @@ export default class Recording extends Component<any, any> {
gears.push(level);
});
echartsData = {
gears, eDate
}
setStorageSync('moistureEachtsData', JSON.stringify(echartsData))
let report =false
go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${allData.nursingData}&date=${allData.createTime}&modeId=${allData.modeId}&id=${allData.instrumentId}&echartsData=${JSON.stringify(echartsData)}&report=${report }`);
gears,
eDate,
};
setStorageSync("moistureEachtsData", JSON.stringify(echartsData));
let report = false;
go(
`/recoding/pages/moisture_test_report/moisture_test_report?data=${
allData.nursingData
}&date=${allData.createTime}&modeId=${allData.modeId}&id=${
allData.instrumentId
}&echartsData=${JSON.stringify(echartsData)}&report=${report}`
);
}
// 打开其他类型

Loading…
Cancel
Save