|
@@ -0,0 +1,291 @@
|
|
|
|
+<!DOCTYPE html>
|
|
|
|
+<html xmlns:th="http://www.thymeleaf.org">
|
|
|
|
+<head>
|
|
|
|
+ <meta charset="utf-8" />
|
|
|
|
+ <title>赵县行政审批局</title>
|
|
|
|
+ <link rel="stylesheet" type="text/css" href="/print/css/index.css">
|
|
|
|
+
|
|
|
|
+ <link rel="stylesheet" type="text/css" href="/print/css/style.css">
|
|
|
|
+ <link rel="stylesheet" type="text/css" href="/print/css/bootstrap.min.css">
|
|
|
|
+ <style>
|
|
|
|
+ .list-left-active{
|
|
|
|
+ color: #459fff!important;
|
|
|
|
+ }
|
|
|
|
+ </style>
|
|
|
|
+ <script>
|
|
|
|
+ function checkLeave() {
|
|
|
|
+ console.log("quit")
|
|
|
|
+ cl_closeidA4photos();
|
|
|
|
+ }
|
|
|
|
+ function goIndex() {
|
|
|
|
+ window.location.href='/zhuxiao/index'
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ </script>
|
|
|
|
+</head>
|
|
|
|
+<body onbeforeunload="return checkLeave()" class="bluebg" >
|
|
|
|
+<header>
|
|
|
|
+ <img class="fl" style="width: 800px;padding: 20px 90px;" src="/print/img/logo_03.png" />
|
|
|
|
+ <div class="anniu"><a class="button" onclick="goIndex()" ><img src="/print/img/index.png"/></a>
|
|
|
|
+ <a class="button" onclick="goBack()"><img src="/print/img/fh.png"/></a></div>
|
|
|
|
+</header>
|
|
|
|
+<div class="con write">
|
|
|
|
+ <div class="row clearfix" style="width:98%;margin:0 auto;padding:1% 0;height: 100%;">
|
|
|
|
+ <div class="col-md-12 column">
|
|
|
|
+ <div class="row">
|
|
|
|
+ <div class="col-md-3">
|
|
|
|
+ <h3 class="title">—— 事项列表 ——</h3>
|
|
|
|
+ <div style="height:810px;overflow:auto">
|
|
|
|
+ <table class="table table-bordered">
|
|
|
|
+ <tbody>
|
|
|
|
+ <tr class="info" th:each="item,itemStar : ${files}">
|
|
|
|
+ <td>
|
|
|
|
+ [[${itemStar.index+1}]]
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <a th:id="${itemStar.index+1}" th:onclick="'javascript:chageFile('+${itemStar.index+1}+')'" class="list">[[${item}]]</a>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="col-md-6">
|
|
|
|
+ <h3 class="title">—— 高拍仪 ——</h3>
|
|
|
|
+ <div class="gaopaiyi" id="CameraCtl"></div>
|
|
|
|
+ <div id="idCard" style="display: none;width:100%; height:600px; background:#fff;"></div>
|
|
|
|
+ <div class="gaopai" style="padding-left: 200px">
|
|
|
|
+ <button class="btn btn-lg btn-success" onclick = "cl_openidA4photos(1,1)">打开高拍仪</button>
|
|
|
|
+ <button class="btn btn-lg btn-warning" onclick = "cl_closeidA4photos()">关闭高拍仪</button>
|
|
|
|
+ <button class="btn btn-lg btn-info" onclick="cl_takePhotos()">拍照</button>
|
|
|
|
+ <button class="btn btn-lg btn-warning" onclick="saveFile()">保存并关闭</button>
|
|
|
|
+ <!--<button class="btn btn-lg btn-info">拍照</button>
|
|
|
|
+ <button class="btn btn-lg btn-success">上传</button>
|
|
|
|
+ <button class="btn btn-lg btn-warning">重置</button><button class="btn btn-lg btn-info">拍照</button>
|
|
|
|
+ <button class="btn btn-lg btn-success">上传</button>-->
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="col-md-3">
|
|
|
|
+ <h3 class="title">—— 预览 ——</h3>
|
|
|
|
+ <div id="ylDivList" style="height:810px;overflow:auto" >
|
|
|
|
+ <div class="col-md-12 yllist" style="display:none;" th:each="item,itemStar : ${files}" th:id="'yl'+${itemStar.index+1}" >
|
|
|
|
+ <a >[[${item}]]</a>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+<footer class="foot">
|
|
|
|
+ 技术支持:石家庄开发区亿网科技发展有限公司
|
|
|
|
+</footer>
|
|
|
|
+</body>
|
|
|
|
+<script src="/print/js/cookie.tool.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
+<script th:src="@{/js/jquery.min.js}"></script>
|
|
|
|
+<script th:src="@{/js/bootstrap.min.js}"></script>
|
|
|
|
+<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
|
|
|
+<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
|
|
|
|
+<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
|
|
|
+<script th:src="@{/ajax/libs/layui/layui.js}"></script>
|
|
|
|
+<script th:src="@{/ruoyi/js/ry-ui.js?v=4.0.0}"></script>
|
|
|
|
+<!-- jquery-validate 表单验证插件 -->
|
|
|
|
+<script src="/raio/newjs/qwebchannel.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
+<script src="/raio/newjs/app.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ function chageFile(index){
|
|
|
|
+ $(".list").removeClass('list-left-active');
|
|
|
|
+ $("#"+index).addClass('list-left-active');
|
|
|
|
+
|
|
|
|
+ $(".yllist").hide();
|
|
|
|
+ $("#yl"+index).show();
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ var filebase64s=[]
|
|
|
|
+ var card=getCookie("cardno")
|
|
|
|
+ var name=getCookie("cardname")
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //材料上传--打开摄像头
|
|
|
|
+ function cl_openidA4photos(size,type) {
|
|
|
|
+
|
|
|
|
+ var oViewport;
|
|
|
|
+ var offsetWidth;
|
|
|
|
+ var offsetHeight;
|
|
|
|
+ var topWidth;
|
|
|
|
+ var topHeight;
|
|
|
|
+ Toast('', '高拍仪正在打开');
|
|
|
|
+ if (size == 0 || size == 1) {
|
|
|
|
+ // 设置A3 A4窗口
|
|
|
|
+ topWidth=535
|
|
|
|
+ topHeight=160
|
|
|
|
+ offsetWidth=850;
|
|
|
|
+ offsetHeight=575;
|
|
|
|
+ } else if (size == 2) {
|
|
|
|
+ // 设置身份证窗口
|
|
|
|
+ topWidth=565
|
|
|
|
+ topHeight=240
|
|
|
|
+ offsetWidth=428;
|
|
|
|
+ offsetHeight=270;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ module_camera.open(type, 0, 0, 0, topWidth, topHeight, offsetWidth,offsetHeight);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //材料上传-关闭摄像头
|
|
|
|
+ function cl_closeidA4photos() {
|
|
|
|
+ close_light()
|
|
|
|
+ Toast('', '高拍仪/摄像头正在关闭');
|
|
|
|
+ module_camera.close();
|
|
|
|
+ Toast('res', '高拍仪/摄像头关闭成功');
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //材料上传
|
|
|
|
+ function saveFile() {
|
|
|
|
+ cl_closeidA4photos()
|
|
|
|
+ $.modal.confirm("是否保存文件并关闭该页面",function(){
|
|
|
|
+
|
|
|
|
+ $("#ylDivList div").each(function(){
|
|
|
|
+ var filename=$(this).find("a")[0].text
|
|
|
|
+
|
|
|
|
+ $(this).find("img").each(function (){
|
|
|
|
+ filebase64s.push({
|
|
|
|
+ "filename":filename,
|
|
|
|
+ "src":$(this)[0].src, });
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: "http://127.0.0.1:5000/saveFile",
|
|
|
|
+ type: "post",
|
|
|
|
+ dataType: "json",
|
|
|
|
+ cache: false,
|
|
|
|
+ data: {
|
|
|
|
+ "filebase64s":JSON.stringify(filebase64s),
|
|
|
|
+ "card": card,
|
|
|
|
+ "name":name,
|
|
|
|
+ },
|
|
|
|
+ success: function (data) {
|
|
|
|
+ alert("success")
|
|
|
|
+ },
|
|
|
|
+ error:function(data){
|
|
|
|
+ alert("文件已保存到D盘目录下")
|
|
|
|
+ goBack()
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ var RAIO_lightctrl_light = {
|
|
|
|
+ RAIO_LIGHTCTR_LIGHT_CAMERA: 0x04, // 拍摄灯
|
|
|
|
+ RAIO_LIGHTCTR_LIGHT_IDCARD: 0x05, // 身份证读卡器背光灯
|
|
|
|
+ RAIO_LIGHTCTR_LIGHT_PRINTER: 0x06, // 激光打印机出稿灯
|
|
|
|
+ RAIO_LIGHTCTR_LIGHT_UNIONPAY: 0x07, // 银联读卡器指示灯
|
|
|
|
+ RAIO_LIGHTCTR_LIGHT_TICKET: 0x08, // 热敏小票打印机出稿灯
|
|
|
|
+ RAIO_LIGHTCTR_LIGHT_KEYBOARD: 0x09, // 金属密码键盘指示灯
|
|
|
|
+ RAIO_LIGHTCTR_LIGHT_FILL: 0x0a, // 前置摄像头补光灯
|
|
|
|
+ RAIO_LIGHTCTR_LIGHT_CARDSENDER: 0x0b, // 发卡机指示灯
|
|
|
|
+ };
|
|
|
|
+ var RAIO_lightctrl_mode = {
|
|
|
|
+ RAIO_LIGHTCTR_MODE_FLASHES_THREE_TIMES: 0, // 闪烁3次后常亮
|
|
|
|
+ RAIO_LIGHTCTR_MODE_ALWAYS: 1, // 常亮
|
|
|
|
+ RAIO_LIGHTCTR_MODE_FLICKER: 2, // 闪烁
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ function open_light() {
|
|
|
|
+ module_lightctrl.open_light(RAIO_lightctrl_light.RAIO_LIGHTCTR_LIGHT_CAMERA,RAIO_lightctrl_mode.RAIO_LIGHTCTR_MODE_FLICKER);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function close_light() {
|
|
|
|
+ module_lightctrl.close_light(RAIO_lightctrl_light.RAIO_LIGHTCTR_LIGHT_CAMERA);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //材料上传--拍照
|
|
|
|
+ function cl_takePhotos() {//材料名称,材料index
|
|
|
|
+ Toast('', '开始拍照');
|
|
|
|
+ module_camera.take_photo();
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ function output(message) {
|
|
|
|
+ console.log(message)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ window.onload = function () {
|
|
|
|
+ // var baseUrl = "http://127.0.0.1:12345/";
|
|
|
|
+ if (location.search != "")
|
|
|
|
+ var baseUrl = (/[?&]webChannelBaseUrl=([A-Za-z0-9\-:/\.]+)/.exec(location.search)[1]);
|
|
|
|
+ else
|
|
|
|
+ var baseUrl = "ws://localhost:12345";
|
|
|
|
+
|
|
|
|
+ output("正在连接RAIO:" + baseUrl);
|
|
|
|
+ var socket = new WebSocket(baseUrl);
|
|
|
|
+
|
|
|
|
+ socket.onclose = function () {
|
|
|
|
+ console.error("web channel closed");
|
|
|
|
+ };
|
|
|
|
+ socket.onerror = function (error) {
|
|
|
|
+ console.error("web channel error: " + error);
|
|
|
|
+ };
|
|
|
|
+ socket.onopen = function () {
|
|
|
|
+ output("RAIO连接成功");
|
|
|
|
+ new QWebChannel(socket, function (channel) {
|
|
|
|
+ window.module_camera = channel.objects.camera;
|
|
|
|
+ window.module_lightctrl = channel.objects.lightctrl;
|
|
|
|
+ module_camera.sig_open_result.connect(function (code) {
|
|
|
|
+ Toast('res', "摄像头打开结果:" + code);
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ module_lightctrl.sig_open_light_error.connect(function (code) {
|
|
|
|
+ Toast('res', '打开控制灯结果:' + code);
|
|
|
|
+ });
|
|
|
|
+ module_lightctrl.sig_close_light_error.connect(function (code) {
|
|
|
|
+ Toast('res', "关闭控制灯结果" + code)
|
|
|
|
+ });
|
|
|
|
+ module_camera.sig_take_photo.connect(function (code, image) {
|
|
|
|
+ if (code == 0) {
|
|
|
|
+ Toast('res', '拍照成功');
|
|
|
|
+ addImage(image);
|
|
|
|
+ } else if (code == -1) {
|
|
|
|
+ Toast('errs', '摄像头未打开拍照失败');
|
|
|
|
+ } else {
|
|
|
|
+ Toast('err', '拍照失败:' + code);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ cl_openidA4photos(0,1);
|
|
|
|
+ open_light()
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ function delImage(This) {
|
|
|
|
+ var obj = This.parentNode;
|
|
|
|
+ obj.parentNode.removeChild(obj);
|
|
|
|
+ Toast('', '删除成功');
|
|
|
|
+ }
|
|
|
|
+ function addImage(base64) {
|
|
|
|
+ var base64 = "data:image/jpeg;base64," + base64;
|
|
|
|
+ var imghtml='<li ><i class="iconfont icon-guanbi" onClick="delImage(this)"></i><img src="'+base64+'" style="width:100%;height:200px;z-index:100;"/></li>'
|
|
|
|
+ if($(".list-left-active").attr("id")==undefined){
|
|
|
|
+ alert("请选择要扫描的事项")
|
|
|
|
+ return ;
|
|
|
|
+ }
|
|
|
|
+ var imgId=$(".list-left-active").attr("id");
|
|
|
|
+ $("#yl"+imgId).append(imghtml);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ function goBack() {
|
|
|
|
+ history.go(-2);
|
|
|
|
+ }
|
|
|
|
+</script>
|
|
|
|
+</html>
|