102 lines
2.4 KiB
HTML
102 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-cmn-Hans">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
<!-- <link rel="stylesheet" href="../statics/github.css">
|
|
<link rel="stylesheet" href="../statics/theme.css"> -->
|
|
<script src="../statics/modules/jquery.min.js"></script>
|
|
<title>流动相用量</title>
|
|
<script type="module">
|
|
import { Decimal } from "../statics/modules/decimal.mjs"
|
|
|
|
let decimal = Decimal.set({
|
|
rounding: Decimal.ROUND_HALF_EVEN,
|
|
precision: 12
|
|
})
|
|
|
|
let debug = true
|
|
let tip = `
|
|
`
|
|
|
|
let data = [
|
|
{
|
|
"time": 0,
|
|
"a": 60,
|
|
"b": 40,
|
|
},
|
|
{
|
|
"time": 10,
|
|
"a": 20,
|
|
"b": 80,
|
|
},
|
|
{
|
|
"time": 20,
|
|
"stop": true,
|
|
}
|
|
]
|
|
|
|
mobilePhase(data, 1, 3)
|
|
|
|
/**
|
|
* 计算流动相用量
|
|
* @params data 流动相梯度程序
|
|
* @params speed 流速,单位 mL/min
|
|
* @params inject_times 进样次数
|
|
*/
|
|
function mobilePhase(data, speed, inject_times) {
|
|
let sum_a = new Decimal(0)
|
|
let sum_b = new Decimal(0)
|
|
for (let index = 0; index < data.length; index++) {
|
|
const element = data[index]
|
|
const next_element = data[index + 1]
|
|
|
|
}
|
|
}
|
|
|
|
</script>
|
|
<style>
|
|
input {
|
|
/* border: none; */
|
|
height: 32px;
|
|
width: fit-content;
|
|
line-height: 32px;
|
|
border: none;
|
|
outline: none;
|
|
display: inline-block;
|
|
}
|
|
|
|
label {
|
|
padding-left: 3px;
|
|
padding-right: 3px;
|
|
background-color: aliceblue;
|
|
}
|
|
|
|
#btn {
|
|
border: 1px solid;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.sep {
|
|
display: initial;
|
|
background-color: black;
|
|
height: 28px;
|
|
width: 333px;
|
|
}
|
|
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<h3>流动相用量</h3>
|
|
<div class="msg"></div>
|
|
|
|
<div id="btn">
|
|
<label for="name">Name</label>
|
|
<input id="name" type="text" autocomplete="off">
|
|
</div>
|
|
</body>
|
|
|
|
</html>
|