护理报告提交

master
qsj 2 years ago
parent 2945b222f3
commit 382a194c42

@ -1563,6 +1563,7 @@ class IotCarePlanFR200 extends Component<any, any> {
// 水分测试需要特殊处理 // 水分测试需要特殊处理
// 水分测试准备 水分测试工作 水分测试启动 // 水分测试准备 水分测试工作 水分测试启动
if (ActiveModeItem.modeType === "moistureTest") { if (ActiveModeItem.modeType === "moistureTest") {
let that =this
sendParams.testStatus = "standby"; // 切换为准备 sendParams.testStatus = "standby"; // 切换为准备
let waterStepList = this.state.waterStepList; let waterStepList = this.state.waterStepList;
let waterStepIndex = this.state.waterStepIndex; let waterStepIndex = this.state.waterStepIndex;
@ -1574,16 +1575,16 @@ class IotCarePlanFR200 extends Component<any, any> {
timerIdSuccess = setTimeout(function () { timerIdSuccess = setTimeout(function () {
waterStepList[waterStepIndex].finish = true; waterStepList[waterStepIndex].finish = true;
this.setState({ that.setState({
waterStepList, waterStepList,
}); });
}, 2000); }, 2000);
this.setState({ that.setState({
waterStepList, waterStepList,
timerIdSuccess, timerIdSuccess,
}); });
}, 3000); }, 3000);
this.setState({ that.setState({
isRuningTest: 2, isRuningTest: 2,
timerIdSchedule, timerIdSchedule,
}); });
@ -2203,18 +2204,16 @@ class IotCarePlanFR200 extends Component<any, any> {
"headLiftingPro", "headLiftingPro",
].includes(nursingData.workMode) ].includes(nursingData.workMode)
) { ) {
let obj = { // let obj = {
modeName: nursingData.modeName, // modeName: nursingData.modeName,
data: nursingData, // data: nursingData,
}; // };
let report = true; let report = true;
go( go(
"/recoding/pages/face_report_one/face_report_one?id=" + "/recoding/pages/face_report_one/face_report_one?id=" +
id + id +
"&report=" + "&report=" +
report + report
"&obj=" +
JSON.stringify(obj)
); );
} else if ("moistureTest" === nursingData.workMode) { } else if ("moistureTest" === nursingData.workMode) {
console.log("水分测试"); console.log("水分测试");

@ -42,15 +42,9 @@ function Index({
default: default:
} }
// const chartRef = useRef(null);
// console.log(chartRef,'chartRefchartRef');
// let chartInstance = echarts.init(chartRef.current);
const echartsRef = useRef<EchartsHandle>(null); const echartsRef = useRef<EchartsHandle>(null);
// const echartsRef = useRef< null>(null);
// let echartsRef:any = React.createRef();;
// console.log(chartRef,'echartsRefechartsRef',chartInstance);
function generateColorArray(startColor, endColor, steps) { function generateColorArray(startColor, endColor, steps) {
var startRGB = hexToRgb(startColor); var startRGB = hexToRgb(startColor);
var endRGB = hexToRgb(endColor); var endRGB = hexToRgb(endColor);
@ -91,13 +85,13 @@ const colors = generateColorArray(startColor, endColor, steps);
// const xList = [...new Array(type).fill(0).map((item, key) => key)]; // const xList = [...new Array(type).fill(0).map((item, key) => key)];
let seriesData:any =[] let seriesData:any =[]
seriesData = EchartsData?.data?.groupedAa seriesData = EchartsData?.data?.groupedAa
const xList = [...new Array(37).fill(0).map((item, key) => key)]; const xList = [...new Array(type).fill(0).map((item, key) => key)];
// const seriesData = [ // const seriesData = [
// ...xList.map((item) => { // ...xList.map((item) => {
// return Math.random() * 80; // return Math.random() * 80;
// }), // }),
// ]; // ];
let [option, setOption] = useState<EChartOption>({ const option: EChartOption = {
grid: { grid: {
// 让图表占满容器 // 让图表占满容器
top: "10rpx", top: "10rpx",
@ -178,40 +172,8 @@ let [option, setOption] = useState<EChartOption>({
}, },
}, },
], ],
}) }
useEffect(() =>{
setOption({...option,
series:[
{
barCategoryGap: '0%',
data: [11,22,33,44,55,55],
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], // 黄色
},
]);;
},
},
},
},
]})
console.log(option,'optionoption',xList);
},[EchartsData])
// 基于 EchartsData 生成 ECharts 配置 // 基于 EchartsData 生成 ECharts 配置
// const option: EChartOption ={ // const option: EChartOption ={
// grid: { // grid: {
@ -295,22 +257,7 @@ let [option, setOption] = useState<EChartOption>({
// }, // },
// ], // ],
// }; // };
// const chartOptions = useMemo(() => {
// console.log(option,'optionoptionoption');
// return option;
// }, [EchartsData]);
// // 使用 useMemo 来记住创建的 ECharts 实例
// const chartRef = useMemo(() => {
// return option;
// }, []); // 空数组意味着 chartRef 仅在组件挂载时创建一次
return ( return (
<Block> <Block>

@ -82,16 +82,16 @@ export default class Index extends Component<any, any> {
data["nursingId"] = ids; data["nursingId"] = ids;
} }
let res = await InstrumentInfo.apiNursingLog.getStatisticsFace(data); let res = await InstrumentInfo.apiNursingLog.getStatisticsFace(data);
// 获取echarts数据 这个是获取接口更新echarts页面 // // 获取echarts数据 这个是获取接口更新echarts页面
let res2 = await InstrumentInfo.apiNursingLog.getStatiCDE(ids); // let res2 = await InstrumentInfo.apiNursingLog.getStatiCDE(ids);
let nursingData=JSON.parse(res2.data.data.nursingData) // let nursingData=JSON.parse(res2.data.data.nursingData)
let obj ={ // let obj ={
modeName:res2.data.data.modeName, // modeName:res2.data.data.modeName,
data:nursingData // data:nursingData
} // }
this.init({ // this.init({
obj:JSON.stringify(obj) // obj:JSON.stringify(obj)
}) // })
if (res.data.code === 200) { if (res.data.code === 200) {
this.setState({ statistics: res.data.data }); this.setState({ statistics: res.data.data });
} }
@ -286,7 +286,7 @@ export default class Index extends Component<any, any> {
reportShow: Bool reportShow: Bool
}) })
} }
// this.init(options) this.init(options)
this.getRouteId(); this.getRouteId();
// this.getClockStatistics() // this.getClockStatistics()
} }
@ -322,9 +322,6 @@ console.log(obj,'obj111111111111111');
...obj.data ...obj.data
} }
this.setState({recordData,modeImage,EchartsData:{...obj}}) this.setState({recordData,modeImage,EchartsData:{...obj}})
} }
componentDidShow() { } componentDidShow() { }

@ -316,19 +316,25 @@ export default class Recording extends Component<any, any> {
} }
// 打开第一种类型 // 打开第一种类型
One = async (item) => { One = async (item) => {
let ids =Number(item.id)
// 获取echarts数据 这个是获取接口更新echarts页面
let res2 = await InstrumentInfo.apiNursingLog.getStatiCDE(ids);
let nursingData=JSON.parse(res2.data.data.nursingData)
nursingData.groupedAa.push(50)
let obj ={
modeName:res2.data.data.modeName,
data:nursingData
}
let report = false; let report = false;
// let nursingData = JSON.parse(item.nursingData)
// let obj = {
// modeName: item.modeName,
// data: nursingData
// }
// console.log("打开第一种类型", item, obj);
go( go(
"/recoding/pages/face_report_one/face_report_one?id=" + "/recoding/pages/face_report_one/face_report_one?id=" +
item.id + item.id +
"&report=" + "&report=" +
report report+ "&obj=" +
JSON.stringify(obj)
); );
}; };
// 打开第二种类型 // 打开第二种类型

Loading…
Cancel
Save