12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>云阅卷本地代理工具</title>
- <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
- <link rel="stylesheet" href="css/style.css">
- </head>
- <body>
- <div class="wp">
- <div class="hd">
- <div class="logo"><a href="index.html"><img src="img/logo.png" /></a></div>
- <span class="y"> 欢迎您,<span id="user-name"></span><span class="pipe">|</span><a href="login.html">退出</a></span>
- </div>
- <div class="cont">
- <div class="title cl">
- <span class="y"><a href="index.html">返回考试主页</a></span>
- <h2>数据同步</h2>
- </div>
- <div class="data">
- <p>本地已下载考生数量:<b id="student-count"></b></p>
- <p>上次下载完成时间:<b id="last-time"></b></p>
- <div class="btn"><a href="sync-run.html"><span>开始同步数据</span></a></div>
- </div>
- </div>
- <div class="ft">Copyright © 2011-2020 www.qmth.com.cn, All Rights Reserved</div>
- </div>
- <script>
- const $ = require('jquery')
- const env = require('../lib/env.js')
- const config = require('../lib/config.js')
- const db = require('../lib/db.js')
- $(document).ready(() => {
- env.merge(JSON.parse(window.localStorage.getItem('env')))
- $('#user-name').html(env.user.userName)
- $('#last-time').html(config['syncTime'][env.server.host + '_' + env.exam.id])
- db.init()
- db.query('select count(*) as count from eb_exam_student where exam_id=?', [env.exam.id]).then((results) => {
- $('#student-count').html(results[0].count)
- }).catch(err => {
- alert('数据库查询失败\n' + (err || ''))
- })
- })
- </script>
- </body>
- </html>
|