1.完善抛丸派工

master
董哲奇 8 months ago
parent 1657283447
commit 978c45094f

@ -60,7 +60,7 @@ export default {
for (const item of list) {
const data={
id:item.id,
pwsgr:worker.userCode,//
pwry:worker.userCode,//
}
tmpArr.push(data)
}

@ -38,9 +38,6 @@ export default function (width,height){
width:width,
height:height
})
group.on('click touchstart',function (){
callback(index,dw[index].list)
})
const rect=new Konva.Rect({
x:0,
@ -59,10 +56,10 @@ export default function (width,height){
width: width,
height: height,
fill:'black',
text:item.name,
text:`${item.name}\n${item.list.length}`,
align:'center',
verticalAlign:'middle',
fontSize:20
fontSize:18
})
group.add(text)

@ -9,8 +9,6 @@ export default function (width,height){
const layer=new Konva.Layer({
x:x,
y:y,
width:_width,
height:_height
})
const group=new Konva.Group({
@ -32,7 +30,7 @@ export default function (width,height){
y:0,
})
bgGroup.clipFunc(function(ctx) {
ctx.rect(0, 0, width-929, 182);
ctx.rect(6, 0, width*0.5+1, 182);
});
const imageObj = new Image();
@ -41,9 +39,9 @@ export default function (width,height){
const shape = new Konva.Image({
x: 0,
y: 0,
offsetX:7,
width: 996*0.986,
height:182*0.986,
offsetX:6,
width: width*0.52-14,
height:182*0.8,
image: this,
});
bgGroup.add(shape)
@ -67,7 +65,7 @@ export default function (width,height){
const person=function (index,persons={}){
const width=120,height=110
const x=index*120+(index+1)*5,y=5
const x=index*125+(index+1)+14,y=5
const group=new Konva.Group({
x:x,
y:y,
@ -100,7 +98,7 @@ export default function (width,height){
}
group.on('click touchstart',function (){
currentWork=item
currentWork=persons
if (selectedShape){
selectedShape.hide()
if (selectedShape===selectShape){
@ -143,7 +141,7 @@ export default function (width,height){
}
const text=new Konva.Text({
x:0,
y:0,
y:75,
width:width,
height:height,
text: persons.userName,

@ -73,13 +73,13 @@ export default function (width,height){
group.add(sgdTitle)
const dhTitle=new Konva.Text({
x:0,
x:_width*0.7,
y:50,
width:_width-48,
height:15,
lineHeight:1,
text:'单号:PW_'+data.gdh,
align:'right',
text:`单号:${data.gdh?'PW_'+data.gdh:''}`,
align:'left',
fontSize:12,
})
group.add(dhTitle)
@ -230,7 +230,7 @@ export default function (width,height){
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jssj,
text:data.pwfkrq,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -316,7 +316,7 @@ export default function (width,height){
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jssj,
text:data.pwpgrq,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -475,7 +475,7 @@ export default function (width,height){
czbhGroup.add(czbhText)
return czbhGroup
}
const generateQRCode=function (text,group) {
const generateQRCode=function (text='',group) {
const imgSize=118
const rect=new Konva.Rect({
x:385,
@ -485,6 +485,7 @@ export default function (width,height){
stroke:'black',
strokeWidth:1,
})
console.log(text)
group.add(rect)
QRCode.toDataURL(text,{width:600,height:600,margin:1})
.then(url => {

@ -33,6 +33,9 @@ export default {
mounted() {
this.initKonvaStage();
},
created(){
window.addEventListener('resize', this.initKonvaStage)
},
methods:{
initPgd(pgd={}){
const group=this.drawGd(pgd)
@ -98,7 +101,7 @@ export default {
width:50%;
height: auto;
position: absolute;
top:230px;
top:200px;
left:20px;
border: none;
margin: 0;

Loading…
Cancel
Save