ocr.html 3.3 KB
Newer Older
L
lywen 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
$def with(post)
<script type="text/javascript" src="static/js/jquery.js"></script>   
<script type="text/javascript" src="static/js/jquery.form.js"></script> 
<script type="text/javascript" src="static/js/helps.js"></script> 
<link rel="stylesheet" href="static/css/bootstrap.min.css">
<link rel="stylesheet" type="static/css/css" href="css/zzsc.css">
 
<!-- CSS goes in the document HEAD or added to your external stylesheet -->
<style type="text/css">
table.gridtable {
	font-family: verdana,arial,sans-serif;
	font-size:10px;
	color:#333333;
	border-width: 1px;
	border-color: #666666;
	border-collapse: collapse;
}
table.gridtable th {
	border-width: 1px;
	padding: 10px;
	border-style: solid;
	border-color: #666666;
	background-color: #dedede;
}
table.gridtable td {
	border-width: 1px;
	padding: 10px;
	border-style: solid;
	border-color: #666666;
	background-color: #ffffff;
}
.loading{display: none; position: absolute; top: 50%; left: 50%; z-index:1002; }
.class_div{ display:inline} 
</style>



<script type="text/javascript">
    //变量初始化,存储需要请求的数据
imgJson = {"imgString":"",
               "num":0,
               "url":"",
W
wenlihaoyu 已提交
43 44
               "result":"",
               "timeTake":0.0
L
lywen 已提交
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
              };
 </script>   

                        
<div class="canvas-container" >
                                <img id='Preview' width="1600" height="1000"  src="" style="position: absolute; left: 35%; top: 50%; transform: translate(-50%, -50%) scale(0.5);z-index:1;"></img>
                                <canvas id="myCanvas" width="1600" height="1000" style="position: absolute; left: 35%; top: 50%; transform: translate(-50%, -50%) scale(0.5);z-index:2;">
                                
</div>


<div >
      <div class="image-input-container" style="position: absolute; left: 5%; top: 10%;">
                                    <input type="file"   id='imageButton'  accept="image/png, image/bmp, image/jpg, image/jpeg" class="image-local-input" onchange="FunimgPreview('imageButton','Preview','myCanvas')">
                                    
      </div> 
 </div>





<div>
    
 <!#############################识别结果######################################################### ---->   
                <div style="position: absolute; left: 68%; top: 12%;" >
                    <div class="json">
                        <div class="json-request-title" id="billmodelname">$post.get('name')</div>
                            <div style="height:500px;width:300px; overflow:scroll;">
                                <div id="billNameList"></div>
                                <div id="mytable"></div>
                                
                            </div>
                        
                    </div>
                </div>
                    
              <!##############################识别结果######################################################### ---->
                    

<img id='loadingGif' width="800" height="500"  src="static/img/loading.gif" style="position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.5);z-index:1;display:none"></img>

    

<script type="text/javascript">
            //点击文件,自动提交文件,进行识别
            jQuery('#imageButton').on('change', function()  
                      {  
                      });
</script>