You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
klhis/hcemr_new/partogram/partogram.html

88 lines
2.5 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.container {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.label_tb {
text-anchor:middle;
font-family:sans-serif;
font-size: 14;
writing-mode : horizontal-tb
}
.label_lr {
text-anchor:middle;
font-family:sans-serif;
font-size: 14;
writing-mode : vertical-lr
}
.date{
font-family:sans-serif;
font-size: 11px;
writing-mode : vertical-lr
}
.bp {
font-family:sans-serif;
font-size: 11px;
}
</style>
<script src="./d3.v6.min.js"></script>
<script src="./partogram.js"></script>
</head>
<body onload="load()" >
<div class="container">
<svg id="svgTop" width="900" height="500" background="#fff" display="block"></svg>
<svg id="svgBottom" width="900" height="560" background="#fff" display="block"></svg>
</div>
<script >
var partoGram ;
function watResultToIFrame(data){
var jsonData = JSON.parse(data);
console.log("平台传入的数据event:"+jsonData);
partoGram.setPatInfo(jsonData);
}
function load(){
let args ={
topSvg : document.getElementById("svgTop"),
bottomSvg : document.getElementById("svgBottom"),
marginLeft : 180,
marginTop : 100
}
partoGram = new PartoGram(args);
partoGram.run();
var patInfo = {"name":"张嘻嘻嘻",
"sex":"女",
}
var cr_b = [3,2,4];
var cr_r = [-2,-4,-5];
var date = ["09:30","09:49"]
var bp = [120,90,110];
partoGram.setDilatationCervix(cr_b);
partoGram.setFetalHeadDescent(cr_r);
console.log("平台传入的数据event:"+patInfo);
partoGram.setText("姓名:"+patInfo.name,90,75);
partoGram.setTextData(date,2,0.5,0.1,"date");
partoGram.setTextData(bp,1,0.1,0.3,"bp");
}
</script>
</body>
</html>