+ 常用操作规程更名为操作规程
+ 首页功能列表增加高度以防止误触 + 添加设置页面 + 删除 L014-1 与 L414-5KR 相关物质计算页面
This commit is contained in:
84
views/sop.html
Normal file
84
views/sop.html
Normal file
@@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cmn-Hans">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<title>操作规程</title>
|
||||
<link rel="stylesheet" href="../statics/github.css">
|
||||
<link rel="stylesheet" href="../statics/theme.css">
|
||||
<style>
|
||||
select {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
padding-left: 10px;
|
||||
border: 1px solid;
|
||||
border-radius: 6px;
|
||||
border-color: rgba(27, 31, 36, 0.15);
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
option {
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/13.0.1/markdown-it.min.js"></script>
|
||||
<script src="../statics/modules/jquery.min.js"></script>
|
||||
<script>
|
||||
const md = window.markdownit({
|
||||
breaks: true
|
||||
})
|
||||
const tips = `<br>整理了常用的操作规程中的关键内容以供查询,请以纸质操作规程为准!`
|
||||
const sop = [
|
||||
"L014-1",
|
||||
"L018-1",
|
||||
"L018-4W",
|
||||
"L018-5",
|
||||
"L018-6",
|
||||
"L414-5KR",
|
||||
"L414-801KR",
|
||||
]
|
||||
|
||||
$(() => {
|
||||
$("#content").html(tips)
|
||||
|
||||
sop.forEach(value => $("#selector").append(`<option value='${value}.md'>${value}</option>`))
|
||||
|
||||
$("#selector").on("change", () => {
|
||||
let name = $("#selector").val()
|
||||
|
||||
if (name == "null") {
|
||||
$("#content").empty()
|
||||
$("#content").html(tips)
|
||||
return
|
||||
}
|
||||
|
||||
$("#content").empty()
|
||||
$("#content").html("<br>加载中...")
|
||||
$.ajax({
|
||||
url: `../statics/sop/${name}`,
|
||||
success: (data) => {
|
||||
$("#content").empty()
|
||||
$("#content").html(md.render(data))
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>
|
||||
<select name="selector" id="selector">
|
||||
<option value='null' selected>选择要查看的操作规程</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="content"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user