| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406 |
- <!DOCTYPE html>
- <html lang="zh">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>LabStatistics</title>
- <style>
- body {
- font-family: Arial, sans-serif;
- margin: 0;
- padding: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- min-height: 100vh;
- background-color: #f4f4f9;
- }
- .container {
- display: flex;
- flex-direction: column;
- width: 90%;
- max-width: 900px;
- background: #fff;
- padding: 1.5rem;
- border-radius: 8px;
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
- }
- .tabs {
- display: flex;
- border-bottom: 1px solid #ddd;
- margin-bottom: 1.5rem;
- justify-content: space-around;
- align-items: center;
- }
- .tab {
- padding: 0.5rem 0.2rem;
- cursor: pointer;
- border: 1px solid transparent;
- border-bottom: none;
- border-radius: 4px 4px 0 0;
- transition: all 0.3s ease;
- text-align: center;
- width: 100%;
- }
- .tab.active {
- border-color: #ddd;
- border-bottom-color: #fff;
- background-color: #fff;
- color: #007bff;
- font-weight: bold;
- }
- .tab-content {
- display: none;
- }
- .tab-content.active {
- display: block;
- }
- .content-container {
- display: flex;
- flex-direction: row;
- gap: 2rem;
- width: 100%;
- }
- .input-section,
- .results-section {
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- }
- h1 {
- font-size: 1.5rem;
- margin-bottom: 1rem;
- }
- .input-group {
- display: flex;
- flex-direction: column;
- gap: 1rem;
- max-height: 300px;
- overflow-y: auto;
- }
- .input-row {
- display: flex;
- align-items: center;
- }
- .input-row span {
- width: 80px;
- font-size: 0.9rem;
- }
- .input-row input {
- flex: 1;
- }
- .error-point-header {
- font-size: 1.17em;
- font-weight: bold;
- margin-block-start: 1em;
- margin-block-end: 1em;
- display: flex;
- align-items: center;
- }
- .error-point-input {
- width: 60px;
- text-align: right;
- font-weight: bold;
- font-size: 1.17em;
- border: 1px solid #ccc;
- border-radius: 4px;
- padding: 2px 4px;
- margin-right: 2px;
- }
- .delete-btn {
- color: #ff0000;
- cursor: pointer;
- margin-left: 10px;
- font-size: 1.2rem;
- display: flex;
- align-items: center;
- justify-content: center;
- width: 30px;
- }
- .add-input-btn {
- margin-top: 10px;
- padding: 8px 12px;
- background-color: #007bff;
- color: white;
- border-radius: 4px;
- cursor: pointer;
- text-align: center;
- transition: background-color 0.3s;
- }
- .add-input-btn:hover {
- background-color: #0056b3;
- }
- input[type="number"] {
- padding: 0.5rem;
- font-size: 1rem;
- border: 1px solid #ccc;
- border-radius: 4px;
- transition: border-color 0.3s;
- }
- input[type="number"]:focus {
- outline: none;
- border-color: #007bff;
- }
- .results {
- display: flex;
- flex-direction: column;
- gap: 0.5rem;
- }
- .result-item {
- font-size: 1rem;
- color: #333;
- }
- .result-item:nth-child(4) {
- color: #0f72db;
- }
- .result-item:nth-child(5) {
- color: #11b9b9;
- }
- #stdDev {
- color: #0f72db;
- }
- #rsd {
- color: #11b9b9;
- }
- .stability-container,
- .error-container {
- display: flex;
- flex-direction: column;
- gap: 1rem;
- margin-bottom: 1.5rem;
- }
- .progress-container {
- display: inline-flex;
- position: relative;
- padding: 0.2rem 0.5rem;
- border-radius: 4px;
- background: linear-gradient(to right, #a9d3ff var(--progress-percent), #e0e0e0 var(--progress-percent));
- background-size: 100% 100%;
- transition: background-position 0.3s ease;
- gap: 0.8rem;
- align-items: center;
- margin-bottom: 1rem;
- justify-content: center;
- }
- .progress-container.completed {
- background: linear-gradient(to right, #ff0000 100%, #e0e0e0 100%);
- }
- .stability-time-display {
- font-size: 0.9rem;
- color: #666;
- position: relative;
- z-index: 1;
- }
- .stability-time-display.warning {
- color: #ff0000;
- font-weight: bold;
- }
- .error-point-container {
- border: 1px solid #eee;
- border-radius: 4px;
- padding: 1rem;
- margin-bottom: 1rem;
- min-width: 180px;
- flex-shrink: 0;
- }
- .error-inputs {
- display: flex;
- flex-direction: column;
- gap: 0.5rem;
- margin: 0.5rem 0;
- }
- .error-input {
- width: 100%;
- }
- .button-container {
- display: flex;
- justify-content: space-between;
- width: 100%;
- gap: 1rem;
- }
- .export-btn,
- .import-btn {
- flex: 1;
- padding: 1rem;
- border: none;
- border-radius: 4px;
- background-color: #007bff;
- color: white;
- font-size: 1rem;
- cursor: pointer;
- transition: background-color 0.3s;
- }
- .export-btn:hover,
- .import-btn:hover {
- background-color: #0056b3;
- }
- .error-result {
- margin-top: 0.5rem;
- font-weight: bold;
- }
- .error-container {
- display: flex;
- flex-direction: row;
- gap: 1rem;
- overflow-x: auto;
- padding-bottom: 1rem;
- }
- .chart-container {
- margin-top: 1.5rem;
- position: relative;
- border: 1px solid #ddd;
- border-radius: 4px;
- padding-left: 1%;
- }
- canvas {
- width: 100%;
- height: 100%;
- }
- @media (max-width: 600px) {
- .container {
- width: 86%;
- flex-direction: column;
- }
- .content-container {
- flex-direction: column;
- }
- .input-section,
- .results-section {
- width: 100%;
- }
- h1 {
- font-size: 1.2rem;
- }
- input[type="number"] {
- font-size: 0.9rem;
- padding: 0.4rem;
- }
- .error-container {
- padding-bottom: 0.5rem;
- }
- .error-point-container {
- min-width: 150px;
- }
- .error-inputs {
- flex-direction: column;
- }
- .error-input {
- width: 92%;
- }
- }
- </style>
- </head>
- <body>
- <audio id="alertSound" src="./alert.mp3" preload="auto" loop></audio>
- <!-- 倒计时设置对话框 -->
- <div id="timer-dialog"
- style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center;">
- <div style="background-color: white; padding: 20px; border-radius: 8px; width: 300px;">
- <h3 style="margin-top: 0;">倒计时设置</h3>
- <div style="margin-bottom: 15px;">
- <label for="timer-minutes">分钟:</label>
- <input type="number" id="timer-minutes" min="0" max="60" value="10"
- style="width: 60px; margin-right: 10px;">
- <label for="timer-seconds">秒钟:</label>
- <input type="number" id="timer-seconds" min="0" max="59" value="0"
- style="width: 60px;">
- </div>
- <div style="display: flex; justify-content: space-around;">
- <button onclick="startTimer()"
- style="padding: 8px 12px; background-color: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer;">开始</button>
- <button onclick="resetTimer()"
- style="padding: 8px 12px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">复位</button>
- <button onclick="closeTimerDialog()"
- style="padding: 8px 12px; background-color: #6c757d; color: white; border: none; border-radius: 4px; cursor: pointer;">关闭</button>
- </div>
- </div>
- </div>
- <div id="container" class="container">
- <div class="progress-container" onclick="openTimerDialog()" style="cursor: pointer;">
- <span id="current-time" class="stability-time-display"></span>
- <span class="stability-time-display"> · </span>
- <span id="countdown" class="stability-time-display">10:00</span>
- </div>
- <div class="tabs">
- <div class="tab active" data-tab="repeatability">重复性</div>
- <div class="tab" data-tab="stability">稳定性</div>
- <div class="tab" data-tab="error">示值误差</div>
- <div class="tab" data-tab="data">数据</div>
- </div>
- <!-- 重复性标签页 -->
- <!-- <div id="repeatability" class="tab-content active"> </div> -->
- <!-- 稳定性标签页 -->
- <!-- <div id="stability" class="tab-content"> </div> -->
- <!-- 示值误差标签页 -->
- <!-- <div id="error" class="tab-content"> </div> -->
- <!-- 数据标签页 -->
- <!-- <div id="data" class="tab-content"> </div> -->
- </div>
- <script src="./chart.js"></script>
- <script src="./utils.js"></script>
- <script src="./pageRepeatability.js"></script>
- <script src="./pageStability.js"></script>
- <script src="./pageError.js"></script>
- <script src="./pageData.js"></script>
- <script src="./common.js"></script>
- </body>
- </html>
|