1.修复划线切割界面操作时板材图片错位问题

2.上料理料反馈时增加作业计划id数据
master
董哲奇 8 months ago
parent eb74af7d0b
commit 72748d1d7f

@ -1010,7 +1010,6 @@ export default {
return;
}
}
console.log(this.queryParam)
ydjhxf(this.checkedList).then(res => {
if (res.success) {
this.initList()

@ -44,6 +44,8 @@ const baifang=function (option={}) {
bgGroup.add(slGroup)
slGroup.zIndex(1)
let currSlist=null
const thatHeight=height
const gangban=function (index,item){
const group=new Konva.Group({
@ -66,9 +68,7 @@ const baifang=function (option={}) {
let _index=0
let touchingFlag=false;
group.on('mousedown touchstart',function (evt){
console.log(evt)
const layer=evt.currentTarget.parent.parent
console.log(layer)
const layer=this.parent.parent.parent
touchingFlag=true
const {x,y}=evt.evt
setTimeout(()=>{
@ -78,7 +78,7 @@ const baifang=function (option={}) {
this.draggable(false)
const tmpGroup=this.clone()
tmpGroup.x(x-10)
tmpGroup.x(x-50)
tmpGroup.y(y-10)
layer.add(tmpGroup)
tmpGroup.draggable(true)
@ -97,7 +97,6 @@ const baifang=function (option={}) {
if ((thisX>=x&&thisY>=y&&thisX<=(x+item.attrs.width)&&thisY<=(y+item.attrs.height))&&!!worker){
const info=this.getAttr('item')
const zyjh=JSON.parse(window.localStorage.getItem('hxfk'))
console.log(zyjh)
if (!zyjh){
VXETable.modal.message({content: '请先选择待反馈的派工单', status: 'warning'})
this.remove()
@ -180,16 +179,14 @@ const baifang=function (option={}) {
}
})
let slList=null
group.on('dragend',function (){
const index=this.getAttr('index')
const element = slList.splice(index-1, 1)[0];
slList.splice(_index-1, 0, element);
const element = currSlist.splice(index-1, 1)[0];
currSlist.splice(_index-1, 0, element);
this.setAttr('index',_index)
_index=0
slGroup.destroyChildren()
handler(slList)
handler(currSlist)
})
const indexRect=new Konva.Rect({
@ -256,7 +253,7 @@ const baifang=function (option={}) {
}
function handler(slList){
currSlist=slList;
for (let i = 1; i <= slList.length; i++) {
const item=slList[i-1]
const _group=gangban(i,item,item.length)

@ -108,7 +108,6 @@ export default function (width,height){
group0.add(group7)
const group8=drawQz(data)
group0.add(group8)
console.log(data)
generateQRCode(data.gdh,group0)
return group
}

@ -164,6 +164,7 @@ export default {
const item=this.getAttr('item')
const data={
ydjh:item,
ydid:item.id,
dwId:that.currentDw.id,
ceng:that.dw[that.currentDwIndex].list.length+1,
czbh:item.dcCh,

@ -46,11 +46,13 @@ const baifang=function (option={}) {
slGroup.zIndex(1)
const thatHeight=height
let currSllist=null
const gangban=function (index,item,slList){
const group=new Konva.Group({
x:0,
y:thatHeight-310-index*40,
draggable:true
// draggable:true
})
group.setAttr('index',index)
@ -67,9 +69,7 @@ const baifang=function (option={}) {
let _index=0
let touchingFlag=false;
group.on('mousedown touchstart',function (evt){
console.log(evt)
const layer=evt.currentTarget.parent.parent
console.log(layer)
const layer=this.parent.parent.parent
touchingFlag=true
const {x,y}=evt.evt
setTimeout(()=>{
@ -188,23 +188,13 @@ const baifang=function (option={}) {
group.on('dragend',function (){
const index=this.getAttr('index')
const element = slList.splice(index-1, 1)[0];
slList.splice(_index-1, 0, element);
const element = currSllist.splice(index-1, 1)[0];
currSllist.splice(_index-1, 0, element);
this.setAttr('index',_index)
_index=0
slGroup.destroyChildren()
handler(slList)
})
const indexRect=new Konva.Rect({
x:0,
y:0,
width:40,
height:40,
stroke:'black',
strokeWidth:1,
handler(currSllist)
})
//group.add(indexRect)
const indexText=new Konva.Text({
x:0,
@ -260,6 +250,7 @@ const baifang=function (option={}) {
}
function handler(slList){
currSllist=slList
for (let i = 1; i <= slList.length; i++) {
const item=slList[i-1]
const _group=gangban(i,item,item.length,slList)

@ -63,6 +63,7 @@ export default {
}
}
this.drawBaiFang(this.dw[this.currentDwIndex].list)
this.$refs.pwpgd.initData(this.currentWorker.userCode,'31')
}
})
this.sockets.subscribe('zyjhzx', data => {

@ -5,9 +5,8 @@ import { VXETable } from 'vxe-table'
const baifang=function (option={}) {
const width=option.width,height=option.height,slList=option.dw,image=require('@/assets/gb.png')
const _width=width*0.32,_height=height*0.713
const container=function (){
const x=width*0.16+25,y=260
const x=width*0.16+25,y=260
const bg=function (){
const group=new Konva.Group({
x:x,
y:y,
@ -25,36 +24,34 @@ const baifang=function (option={}) {
height:_height,
image: this,
});
group.add(shape)
shape.zIndex(0)
}
const selectObj = new Image();
selectObj.src = require('@/assets/pwan/gbSelectBg.png');
selectObj.onload = function () {
const shape = new Konva.Image({
x: 0,
y: 0,
width: _width,
height:_height,
image: this,
visible:false
});
group.add(shape)
bgGroup.add(shape)
shape.zIndex(0)
}
return group
}
const container=function (){
return new Konva.Group({
x:0,
y:0,
width:_width,
height:_height
})
}
const bgGroup=bg();
const slGroup=container()
bgGroup.add(slGroup)
slGroup.zIndex(1)
let currSlist=null
const thatHeight=height
const gangban=function (index,item){
const group=new Konva.Group({
x:0,
y:thatHeight-310-index*40,
draggable:true
// draggable:true
})
group.setAttr('index',index)
@ -71,7 +68,7 @@ const baifang=function (option={}) {
let _index=0
let touchingFlag=false;
group.on('mousedown touchstart',function (evt){
const layer=evt.currentTarget.parent.parent
const layer=this.parent.parent.parent
touchingFlag=true
const {x,y}=evt.evt
setTimeout(()=>{
@ -81,7 +78,7 @@ const baifang=function (option={}) {
this.draggable(false)
const tmpGroup=this.clone()
tmpGroup.x(x-10)
tmpGroup.x(x-50)
tmpGroup.y(y-10)
layer.add(tmpGroup)
tmpGroup.draggable(true)
@ -94,7 +91,7 @@ const baifang=function (option={}) {
tmpGroup.on('dragend',function (){
const {x:thisX,y:thisY}=this.absolutePosition()
for (const item of layer.children) {
if(item.attrs.id==='csd'){
if(item.attrs.id==='sb'){
const {x,y}=item.absolutePosition()
const worker=JSON.parse(window.localStorage.getItem('worker'))
if ((thisX>=x&&thisY>=y&&thisX<=(x+item.attrs.width)&&thisY<=(y+item.attrs.height))&&!!worker){
@ -184,24 +181,14 @@ const baifang=function (option={}) {
group.on('dragend',function (){
const index=this.getAttr('index')
const element = slList.splice(index-1, 1)[0];
slList.splice(_index-1, 0, element);
const element = currSlist.splice(index-1, 1)[0];
currSlist.splice(_index-1, 0, element);
this.setAttr('index',_index)
_index=0
slGroup.destroyChildren()
handler(slList)
handler(currSlist)
})
const indexRect=new Konva.Rect({
x:0,
y:0,
width:40,
height:40,
stroke:'black',
strokeWidth:1,
})
//group.add(indexRect)
const indexText=new Konva.Text({
x:0,
y:0,
@ -256,7 +243,7 @@ const baifang=function (option={}) {
}
function handler(slList){
console.log(slList)
currSlist=slList;
for (let i = 1; i <= slList.length; i++) {
const item=slList[i-1]
const _group=gangban(i,item,item.length)
@ -264,10 +251,8 @@ const baifang=function (option={}) {
}
}
handler(slList)
return {
container,slGroup,handler
container,slGroup,handler,bgGroup
}
}

@ -3,6 +3,7 @@ import Konva from "konva";
export default function (width,height){
const x=width*0.5,y=260,_width=width*0.186,_height=height*0.713
const container=new Konva.Group({
id:'sb',
x:x,
y:y,
width:_width,

@ -18,7 +18,7 @@ import {getBzryList} from "@/api/sjzx/bzzGL";
import QgePgd from "@/views/zyjhzx/qgefkui/comps/QgePgd.vue";
export default {
name: 'PWanFKui',
name: 'QGeFKui',
components: {QgePgd},
data() {
return {
@ -33,7 +33,6 @@ export default {
dw:[],
pgd:[],
slGroup:null,
dw:[],
currentDw:null,
currentDwIndex:null,
currentWorker:null,
@ -105,8 +104,8 @@ export default {
getYcldw({type:'llj'}).then(res => {
const {container, dw} = drawDw(this.width, this.height, that.initDwInfo)
const {bgGroup,group} = container()
this.layer.add(bgGroup)
this.dw=res.data
for (let i = 0; i < res.data.length; i++) {
const item = res.data[i]

@ -108,7 +108,6 @@ export default function (width,height){
group0.add(group7)
const group8=drawQz(data)
group0.add(group8)
console.log(data)
generateQRCode(data.gdh,group0)
return group
}

@ -326,6 +326,7 @@ export default {
const item=this.getAttr('item')
const data={
ydjh:item,
ydid:item.id,
dwId:that.currentDw.id,
ceng:that.dw[that.currentDwIndex].list.length+1,
czbh:item.dcCh,

Loading…
Cancel
Save