Commit 65bc0a53 authored by 李苏's avatar 李苏 💬

改easytextbox为普通textbox,适用vue

parent 7116e4d1
...@@ -28,13 +28,23 @@ function exitFullscreen() { ...@@ -28,13 +28,23 @@ function exitFullscreen() {
} }
} }
function dbenlarge(domid,isTrue) { function dbenlarge(domid,isTrue,func) {
let is=isTrue let is=isTrue
document.getElementById(domid).style.backgroundColor="#FFFFFF" document.getElementById(domid).style.backgroundColor="#FFFFFF"
document.getElementById(domid).addEventListener('dblclick', function(e) { document.getElementById(domid).addEventListener('dblclick', function(e) {
fullScreen(document.getElementById(domid)); fullScreen(document.getElementById(domid));
setTimeout(()=>{
if(func){
func()
}
},300)
}, false); }, false);
if(isTrue){ if(isTrue){
fullScreen(document.getElementById(domid)); fullScreen(document.getElementById(domid));
setTimeout(()=>{
if(func){
func()
}
},300)
} }
} }
...@@ -96,6 +96,13 @@ ...@@ -96,6 +96,13 @@
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
.easyuitext{
height: 30px;
border: 0.5px solid #D3D3D3;
}
.wid70{
width: 70%;
}
</style> </style>
<div id="gpjykb"> <div id="gpjykb">
<!-- 顶部信息条 --> <!-- 顶部信息条 -->
...@@ -117,21 +124,21 @@ ...@@ -117,21 +124,21 @@
<div class="cpif"> <div class="cpif">
<!-- top --> <!-- top -->
<div class="cpiftop" style="display: flex;align-items: center;"> <div class="cpiftop" style="display: flex;align-items: center;">
<span>序列号</span><input name="xlh" /> <span>序列号</span><input class="easyuitext " style="width: 84%;" v-model="xlh" @keydown="scanxlh()" name="xlh" />
</div> </div>
<!-- bot --> <!-- bot -->
<div class="cpifbot" style="display: flex;flex-wrap: wrap;"> <div class="cpifbot" style="display: flex;flex-wrap: wrap;">
<div class="ery"> <div class="ery">
<span>工序</span><input name="gx" /> <span>工序</span><input class="easyuitext wid70" v-model="gx" name="gx" />
</div> </div>
<div class="ery"> <div class="ery">
<span>工单</span><input name="gd" /> <span>工单</span><input class="easyuitext wid70" v-model="gd" name="gd" />
</div> </div>
<div class="ery"> <div class="ery">
<span>产品SN</span><input name="cpsn" /> <span>产品SN</span><input class="easyuitext wid70" v-model="cpsn" name="cpsn" />
</div> </div>
<div class="ery"> <div class="ery">
<span>品号</span><input name="ph" /> <span>品号</span><input class="easyuitext wid70" v-model="ph" name="ph" />
</div> </div>
</div> </div>
</div> </div>
...@@ -159,7 +166,7 @@ ...@@ -159,7 +166,7 @@
日志 日志
</div> </div>
<div style="height: calc(100% - 20px);display: flex;"> <div style="height: calc(100% - 20px);display: flex;">
<div style="width: 100%;height: 100%;background-color: #393456;color: #FFFFFF;"> <div class="rz" style="width: 100%;height: 100%;background-color: #393456;color: #FFFFFF;overflow: auto;">
<span>>>Tips</span> <span>>>Tips</span>
</div> </div>
</div> </div>
...@@ -191,6 +198,11 @@ ...@@ -191,6 +198,11 @@
}, },
data:function(){ data:function(){
return{ return{
xlh:"",
gx:"",
gd:"",
cpsn:"",
ph:"",
systime:"", systime:"",
tabdata:[ tabdata:[
...@@ -201,28 +213,20 @@ ...@@ -201,28 +213,20 @@
} }
}, },
methods:{ methods:{
// 扫码事件
scanxlh(e){
var evt = window.event || e;
if (evt.keyCode == 13) {
console.log(this.xlh)
$("#gpjykb").find(".rz").append("<br>>" + "<span>" +"正在查询:"+this.xlh+"</sapn>")
this.addtop = this.addtop + 600
$("#gpjykb").find(".rz").scrollTop(this.addtop)
this.xlh=""
}
},
// 初始化页面 // 初始化页面
initpage(){ initpage(){
let $xlh=$("#gpjykb").find('input[name="xlh"]')
let $gx=$("#gpjykb").find('input[name="gx"]')
let $gd=$("#gpjykb").find('input[name="gd"]')
let $cpsn=$("#gpjykb").find('input[name="cpsn"]')
let $ph=$("#gpjykb").find('input[name="ph"]')
$xlh.textbox({
width:'84%'
})
$gx.textbox({
width:'200'
})
$gd.textbox({
width:'200'
})
$cpsn.textbox({
width:'200'
})
$ph.textbox({
width:'200'
})
}, },
/* 展示时间 */ /* 展示时间 */
gettime(){ gettime(){
......
<style type="text/css"> <script src="js/pdfshow.js" type="text/javascript" charset="utf-8"></script>
<script src="js/dbenlarge.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css">
*{ *{
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
#kwrkb04{ #gpwxkb{
height: 100%; height: 100%;
width: 100%; width: 100%;
display: flex; display: flex;
...@@ -11,7 +13,7 @@ ...@@ -11,7 +13,7 @@
justify-content: space-between; justify-content: space-between;
align-items:stretch align-items:stretch
} }
#kwrkb04 div { #gpwxkb div {
box-sizing:border-box; box-sizing:border-box;
} }
.toptitle{ .toptitle{
...@@ -94,8 +96,15 @@ ...@@ -94,8 +96,15 @@
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
.easyuitext{
height: 30px;
border: 0.5px solid #D3D3D3;
}
.wid70{
width: 70%;
}
</style> </style>
<div id="kwrkb04"> <div id="gpwxkb">
<!-- 顶部信息条 --> <!-- 顶部信息条 -->
<div class="toptitle" > <div class="toptitle" >
<ul class="tipul" style="height: 100%;"> <ul class="tipul" style="height: 100%;">
...@@ -115,21 +124,21 @@ ...@@ -115,21 +124,21 @@
<div class="cpif"> <div class="cpif">
<!-- top --> <!-- top -->
<div class="cpiftop" style="display: flex;align-items: center;"> <div class="cpiftop" style="display: flex;align-items: center;">
<span>序列号</span><input name="xlh" /> <span>序列号</span><input class="easyuitext " style="width: 84%;" v-model="xlh" @keydown="scanxlh()" name="xlh" />
</div> </div>
<!-- bot --> <!-- bot -->
<div class="cpifbot" style="display: flex;flex-wrap: wrap;"> <div class="cpifbot" style="display: flex;flex-wrap: wrap;">
<div class="ery"> <div class="ery">
<span>工序</span><input name="gx" /> <span>工序</span><input class="easyuitext wid70" v-model="gx" name="gx" />
</div> </div>
<div class="ery"> <div class="ery">
<span>工单</span><input name="gd" /> <span>工单</span><input class="easyuitext wid70" v-model="gd" name="gd" />
</div> </div>
<div class="ery"> <div class="ery">
<span>产品SN</span><input name="cpsn" /> <span>产品SN</span><input class="easyuitext wid70" v-model="cpsn" name="cpsn" />
</div> </div>
<div class="ery"> <div class="ery">
<span>品号</span><input name="ph" /> <span>品号</span><input class="easyuitext wid70" v-model="ph" name="ph" />
</div> </div>
</div> </div>
</div> </div>
...@@ -157,7 +166,7 @@ ...@@ -157,7 +166,7 @@
日志 日志
</div> </div>
<div style="height: calc(100% - 20px);display: flex;"> <div style="height: calc(100% - 20px);display: flex;">
<div style="width: 100%;height: 100%;background-color: #393456;color: #FFFFFF;"> <div class="rz" style="width: 100%;height: 100%;background-color: #393456;color: #FFFFFF;overflow: auto;">
<span>>>Tips</span> <span>>>Tips</span>
</div> </div>
</div> </div>
...@@ -166,15 +175,15 @@ ...@@ -166,15 +175,15 @@
</div> </div>
<!-- 右侧信息pdf --> <!-- 右侧信息pdf -->
<div class="right"> <div class="right">
<canvas id="pdf" class="rightPdf"></canvas> <canvas id="gpwxpdf" class="rightPdf"></canvas>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
let Vkwrkb04= new Vue({ let Vgpwxkb= new Vue({
el:"#kwrkb04", el:"#gpwxkb",
mounted() { mounted() {
dbenlarge('kwrkb04',1) dbenlarge('gpwxkb',1)
pdfshow("pdf/dcAcess.pdf","pdf",5000).then(e=>{ pdfshow("pdf/dcAcess.pdf","gpwxpdf",5000).then(e=>{
this.sivpdf=e this.sivpdf=e
}) })
// this.sivpdf= // this.sivpdf=
...@@ -189,9 +198,14 @@ ...@@ -189,9 +198,14 @@
}, },
data:function(){ data:function(){
return{ return{
xlh:"",
gx:"",
gd:"",
cpsn:"",
ph:"",
systime:"", systime:"",
tabdata:[ tabdata:[
], ],
sivtimer:null,//时间计数器 sivtimer:null,//时间计数器
sivpdf:null, sivpdf:null,
...@@ -199,28 +213,20 @@ ...@@ -199,28 +213,20 @@
} }
}, },
methods:{ methods:{
// 扫码事件
scanxlh(e){
var evt = window.event || e;
if (evt.keyCode == 13) {
console.log(this.xlh)
$("#gpwxkb").find(".rz").append("<br>>" + "<span>" +"正在查询:"+this.xlh+"</sapn>")
this.addtop = this.addtop + 600
$("#gpwxkb").find(".rz").scrollTop(this.addtop)
this.xlh=""
}
},
// 初始化页面 // 初始化页面
initpage(){ initpage(){
let $xlh=$("#kwrkb04").find('input[name="xlh"]')
let $gx=$("#kwrkb04").find('input[name="gx"]')
let $gd=$("#kwrkb04").find('input[name="gd"]')
let $cpsn=$("#kwrkb04").find('input[name="cpsn"]')
let $ph=$("#kwrkb04").find('input[name="ph"]')
$xlh.textbox({
width:'84%'
})
$gx.textbox({
width:'200'
})
$gd.textbox({
width:'200'
})
$cpsn.textbox({
width:'200'
})
$ph.textbox({
width:'200'
})
}, },
/* 展示时间 */ /* 展示时间 */
gettime(){ gettime(){
...@@ -236,8 +242,8 @@ ...@@ -236,8 +242,8 @@
appdestory(){ appdestory(){
let that=this let that=this
this.sivdestory=setInterval(function(){ this.sivdestory=setInterval(function(){
if(!$("#kwrkb04").height()){ if(!$("#gpwxkb").height()){
Vkwrkb04.$destroy() Vgpwxkb.$destroy()
} }
},3000) },3000)
} }
......
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