82 lines
2.3 KiB
HTML
82 lines
2.3 KiB
HTML
<!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="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
|
<script>
|
|
const md = window.markdownit({
|
|
breaks: true
|
|
})
|
|
const tips = `整理了常用的操作规程中的关键内容以供查询,请以纸质操作规程为准!`
|
|
const sop = [
|
|
"L014-1",
|
|
"L018-1",
|
|
"L018-4W",
|
|
"L018-5",
|
|
"L018-6",
|
|
]
|
|
|
|
$(() => {
|
|
$("#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
|
|
}
|
|
|
|
$.ajax({
|
|
url: `../statics/sop/${name}`,
|
|
success: (data) => {
|
|
$("#content").html(md.render(data))
|
|
}
|
|
})
|
|
})
|
|
})
|
|
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<div>
|
|
<label for="selector">选择要查看的操作规程:</label><br>
|
|
<select name="selector" id="selector">
|
|
<option value='null' selected>请选择</option>
|
|
</select>
|
|
</div>
|
|
<br>
|
|
<div id="content"></div>
|
|
</body>
|
|
|
|
</html>
|