Commit dd6b5282 authored by 李苏's avatar 李苏 💬

修改

parent aad39b27
...@@ -4,8 +4,27 @@ var pdfshow=function(url,domid,time){ ...@@ -4,8 +4,27 @@ var pdfshow=function(url,domid,time){
let pdfobj=pdfjsLib.getDocument(url) let pdfobj=pdfjsLib.getDocument(url)
let canvas=document.getElementById(domid); let canvas=document.getElementById(domid);
pdfobj.promise.then(function(pdf){ pdfobj.promise.then(function(pdf){
let nowpage=0 let nowpage=1
let numPages=pdf._pdfInfo.numPages let numPages=pdf._pdfInfo.numPages
// 默认第一页
pdf.getPage(1).then(function(page) {
// 设置渲染属性
let viewport = page.getViewport({ scale: 2});
canvas.height = viewport.height;
canvas.width = viewport.width;
let outputScale = 1;
let context = canvas.getContext('2d');
let transform = outputScale !== 1
? [outputScale, 0, 0, outputScale, 0, 0]
: null;
let renderContext = {
canvasContext: context,
transform: transform,
viewport: viewport
};
page.render(renderContext);
});
// 循环
timenum=setInterval(function(){ timenum=setInterval(function(){
if(nowpage<numPages){ if(nowpage<numPages){
nowpage++ nowpage++
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
box-sizing: border-box; box-sizing: border-box;
} }
.toptitle { #kwrkb01 .toptitle {
height: 50px; height: 50px;
width: 100%; width: 100%;
background-color: #00aaff; background-color: #00aaff;
...@@ -28,47 +28,47 @@ ...@@ -28,47 +28,47 @@
line-height: 50px; line-height: 50px;
} }
.left { #kwrkb01 .left {
height: calc(100% - 60px); height: calc(100% - 60px);
width: 40%; width: 40%;
} }
.right { #kwrkb01 .right {
height: calc(100% - 60px); height: calc(100% - 60px);
width: calc(60% - 10px); width: calc(60% - 10px);
border: #EEEEEE 1px solid; border: #EEEEEE 1px solid;
} }
.rightPdf { #kwrkb01 .rightPdf {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
.cbinfor { #kwrkb01 .cbinfor {
width: 100%; width: 100%;
height: 40%; height: 40%;
} }
.tab { #kwrkb01 .tab {
width: 100%; width: 100%;
height: 60%; height: 60%;
padding-top: 10px; padding-top: 10px;
} }
.cpif { #kwrkb01 .cpif {
width: 100%; width: 100%;
height: 50%; height: 50%;
border: 1px solid #EEEEEE; border: 1px solid #EEEEEE;
} }
.cprz { #kwrkb01 .cprz {
width: 100%; width: 100%;
height: 50%; height: 50%;
border: 1px solid #EEEEEE; border: 1px solid #EEEEEE;
} }
.cpiftop { #kwrkb01 .cpiftop {
width: 100%; width: 100%;
height: 40px; height: 40px;
border-bottom: 1px solid #EEEEEE; border-bottom: 1px solid #EEEEEE;
...@@ -77,53 +77,53 @@ ...@@ -77,53 +77,53 @@
justify-content: center; justify-content: center;
} }
.cpifbot { #kwrkb01 .cpifbot {
height: calc(100% - 40px); height: calc(100% - 40px);
} }
.ery { #kwrkb01 .ery {
width: 50%; width: 50%;
height: 50%; height: 50%;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.ery span { #kwrkb01 .ery span {
padding-left: 20px; padding-left: 20px;
display: inline-block; display: inline-block;
width: 70px; width: 70px;
} }
.tipul>li { #kwrkb01 .tipul>li {
width: 150px; width: 150px;
padding-left: 20px; padding-left: 20px;
float: left; float: left;
line-height: 50px; line-height: 50px;
} }
.tipuli2 { #kwrkb01 .tipuli2 {
float: right !important; float: right !important;
} }
.maintab { #kwrkb01 .maintab {
height: 100%; height: 100%;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
border: 0.5px solid #EEEEEE; border: 0.5px solid #EEEEEE;
} }
.showtab { #kwrkb01 .showtab {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
.easyuitext{ #kwrkb01 .easyuitext{
height: 30px; height: 30px;
border: 0.5px solid #D3D3D3; border: 0.5px solid #D3D3D3;
} }
.wid70{ #kwrkb01 .wid70{
width: 70%; width: 70%;
} }
.ok-item {background:-webkit-gradient(linear, left top, right top, from(#42d79b), to(#a6e25f));background:linear-gradient(90deg, #42d79b, #a6e25f);} #kwrkb01 .ok-item {background:-webkit-gradient(linear, left top, right top, from(#42d79b), to(#a6e25f));background:linear-gradient(90deg, #42d79b, #a6e25f);}
</style> </style>
<div id="kwrkb01"> <div id="kwrkb01">
<!-- 顶部信息条 --> <!-- 顶部信息条 -->
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
mounted() { mounted() {
this.initpage() this.initpage()
dbenlarge('kwrkb01', 1, this.initpage) dbenlarge('kwrkb01', 1, this.initpage)
pdfshow("pdf/dcAcess.pdf", "gphy", 5000).then(e => { pdfshow("pdf/dcAcess.pdf", "gphy", 20000).then(e => {
this.sivpdf = e this.sivpdf = e
}) })
this.gettime() this.gettime()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment