12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <!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"><img src="img/logo.png" /></div>
- <span class="y"> 欢迎您,<span id="user-name"></span>
- <span class="pipe">|</span><a href="##">退出</a>
- </span>
- </div>
- <div class="cont">
- <div class="title title_grey cl">
- <h2>图片检查中 …</h2>
- </div>
- <div class="progress-box">
- <h3>正在检查图片,请耐心等候 ~</h3>
- <div class="progress">
- <div class="progress-outer">
- <div id="progress" class="progress-inner" style="width: 0%;"><span class="progress-text"></span>
- </div>
- </div>
- </div>
- <p>已检查人数:<b id="finish-count"></b> / 全部人数:<b id="total-count"></b></p>
- </div>
- </div>
- <div class="xcConfirm" id="popup" style="display: none">
- <div class="xc_layer"></div>
- <div class="popbox">
- <a href="##" id="popup-close"><span class="close"></span></a>
- <div class="txtbox">
- <div id="popup-error" class="icon error" style="display: none"></div>
- <div id="popup-success" class="icon success" style="display: none"></div>
- <div id="popup-text" class="text"></div>
- </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 imageUtil = require('../lib/image.js')()
- $(document).ready(() => {
- env.merge(JSON.parse(window.localStorage.getItem('env')))
- $('#user-name').html(env.user.userName)
- let config = JSON.parse(window.localStorage.getItem('check-config'))
- let totalCount;
- imageUtil.on('total', (count) => {
- totalCount = count
- $('#total-count').html(count)
- })
- imageUtil.on('count', (count) => {
- $('#finish-count').html(count)
- let rate = parseInt(count * 100 / totalCount)
- $('#progress').css('width', rate + '%')
- $('.progress-text').html(rate + '%')
- })
- imageUtil.on('finish', () => {
- $('#popup-success').show()
- $('#popup-text').html('图片检查完成')
- $('#popup-close').click(() => {
- $('#popup').hide()
- window.location.href = 'check.html'
- })
- $('#popup').show()
- })
- imageUtil.on('error', (err) => {
- $('#popup-error').show()
- $('#popup-text').html('图片检查出错\n' + (err || ''))
- $('#popup-close').click(() => {
- $('#popup').hide()
- window.location.href = 'check.html'
- })
- $('#popup').show()
- })
- if (config.concurrent == 1) {
- imageUtil.checkSliceSerial(config.dir)
- } else {
- imageUtil.checkSlice(config.dir, config.concurrent)
- }
- })
- </script>
- </body>
- </html>
|