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

改easytextbox为普通textbox,适用vue

parent 7116e4d1
......@@ -28,13 +28,23 @@ function exitFullscreen() {
}
}
function dbenlarge(domid,isTrue) {
function dbenlarge(domid,isTrue,func) {
let is=isTrue
document.getElementById(domid).style.backgroundColor="#FFFFFF"
document.getElementById(domid).addEventListener('dblclick', function(e) {
fullScreen(document.getElementById(domid));
setTimeout(()=>{
if(func){
func()
}
},300)
}, false);
if(isTrue){
fullScreen(document.getElementById(domid));
setTimeout(()=>{
if(func){
func()
}
},300)
}
}
......@@ -96,6 +96,13 @@
height: 100%;
width: 100%;
}
.easyuitext{
height: 30px;
border: 0.5px solid #D3D3D3;
}
.wid70{
width: 70%;
}
</style>
<div id="gpjykb">
<!-- 顶部信息条 -->
......@@ -117,21 +124,21 @@
<div class="cpif">
<!-- top -->
<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>
<!-- bot -->
<div class="cpifbot" style="display: flex;flex-wrap: wrap;">
<div class="ery">
<span>工序</span><input name="gx" />
<span>工序</span><input class="easyuitext wid70" v-model="gx" name="gx" />
</div>
<div class="ery">
<span>工单</span><input name="gd" />
<span>工单</span><input class="easyuitext wid70" v-model="gd" name="gd" />
</div>
<div class="ery">
<span>产品SN</span><input name="cpsn" />
<span>产品SN</span><input class="easyuitext wid70" v-model="cpsn" name="cpsn" />
</div>
<div class="ery">
<span>品号</span><input name="ph" />
<span>品号</span><input class="easyuitext wid70" v-model="ph" name="ph" />
</div>
</div>
</div>
......@@ -159,7 +166,7 @@
日志
</div>
<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>
</div>
</div>
......@@ -191,6 +198,11 @@
},
data:function(){
return{
xlh:"",
gx:"",
gd:"",
cpsn:"",
ph:"",
systime:"",
tabdata:[
......@@ -201,28 +213,20 @@
}
},
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(){
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(){
......
<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;
padding: 0;
}
#kwrkb04{
#gpwxkb{
height: 100%;
width: 100%;
display: flex;
......@@ -11,7 +13,7 @@
justify-content: space-between;
align-items:stretch
}
#kwrkb04 div {
#gpwxkb div {
box-sizing:border-box;
}
.toptitle{
......@@ -94,8 +96,15 @@
height: 100%;
width: 100%;
}
.easyuitext{
height: 30px;
border: 0.5px solid #D3D3D3;
}
.wid70{
width: 70%;
}
</style>
<div id="kwrkb04">
<div id="gpwxkb">
<!-- 顶部信息条 -->
<div class="toptitle" >
<ul class="tipul" style="height: 100%;">
......@@ -115,21 +124,21 @@
<div class="cpif">
<!-- top -->
<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>
<!-- bot -->
<div class="cpifbot" style="display: flex;flex-wrap: wrap;">
<div class="ery">
<span>工序</span><input name="gx" />
<span>工序</span><input class="easyuitext wid70" v-model="gx" name="gx" />
</div>
<div class="ery">
<span>工单</span><input name="gd" />
<span>工单</span><input class="easyuitext wid70" v-model="gd" name="gd" />
</div>
<div class="ery">
<span>产品SN</span><input name="cpsn" />
<span>产品SN</span><input class="easyuitext wid70" v-model="cpsn" name="cpsn" />
</div>
<div class="ery">
<span>品号</span><input name="ph" />
<span>品号</span><input class="easyuitext wid70" v-model="ph" name="ph" />
</div>
</div>
</div>
......@@ -157,7 +166,7 @@
日志
</div>
<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>
</div>
</div>
......@@ -166,15 +175,15 @@
</div>
<!-- 右侧信息pdf -->
<div class="right">
<canvas id="pdf" class="rightPdf"></canvas>
<canvas id="gpwxpdf" class="rightPdf"></canvas>
</div>
</div>
<script type="text/javascript">
let Vkwrkb04= new Vue({
el:"#kwrkb04",
let Vgpwxkb= new Vue({
el:"#gpwxkb",
mounted() {
dbenlarge('kwrkb04',1)
pdfshow("pdf/dcAcess.pdf","pdf",5000).then(e=>{
dbenlarge('gpwxkb',1)
pdfshow("pdf/dcAcess.pdf","gpwxpdf",5000).then(e=>{
this.sivpdf=e
})
// this.sivpdf=
......@@ -189,6 +198,11 @@
},
data:function(){
return{
xlh:"",
gx:"",
gd:"",
cpsn:"",
ph:"",
systime:"",
tabdata:[
......@@ -199,28 +213,20 @@
}
},
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(){
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(){
......@@ -236,8 +242,8 @@
appdestory(){
let that=this
this.sivdestory=setInterval(function(){
if(!$("#kwrkb04").height()){
Vkwrkb04.$destroy()
if(!$("#gpwxkb").height()){
Vgpwxkb.$destroy()
}
},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