|
|
@ -1,4 +1,5 @@
|
|
|
|
import Konva from "konva";
|
|
|
|
import Konva from "konva";
|
|
|
|
|
|
|
|
import {daoduo} from "@/api/zyjh";
|
|
|
|
|
|
|
|
|
|
|
|
const baifang=function (option={}) {
|
|
|
|
const baifang=function (option={}) {
|
|
|
|
const width=option.width,height=option.height,image=require('@/assets/gb.png')
|
|
|
|
const width=option.width,height=option.height,image=require('@/assets/gb.png')
|
|
|
@ -77,7 +78,7 @@ const baifang=function (option={}) {
|
|
|
|
if(_index===0){
|
|
|
|
if(_index===0){
|
|
|
|
_index=this.getAttr('index')
|
|
|
|
_index=this.getAttr('index')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.zIndex(999)
|
|
|
|
this.zIndex(4)
|
|
|
|
const {y:thisY}=this.absolutePosition()
|
|
|
|
const {y:thisY}=this.absolutePosition()
|
|
|
|
|
|
|
|
|
|
|
|
const dir=thisY-this.startPos.y>0?-40:40
|
|
|
|
const dir=thisY-this.startPos.y>0?-40:40
|
|
|
@ -119,7 +120,6 @@ const baifang=function (option={}) {
|
|
|
|
for (const it of movedList) {
|
|
|
|
for (const it of movedList) {
|
|
|
|
mList.push(it.getAttr('item'))
|
|
|
|
mList.push(it.getAttr('item'))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//todo 倒剁
|
|
|
|
|
|
|
|
const data={
|
|
|
|
const data={
|
|
|
|
id:item.id,
|
|
|
|
id:item.id,
|
|
|
|
lastCeng:item.ceng,
|
|
|
|
lastCeng:item.ceng,
|
|
|
@ -128,23 +128,22 @@ const baifang=function (option={}) {
|
|
|
|
duo:item.dwId,
|
|
|
|
duo:item.dwId,
|
|
|
|
movedList:mList
|
|
|
|
movedList:mList
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const element = slList.splice(index-1, 1)[0];
|
|
|
|
// const element = slList.splice(index-1, 1)[0];
|
|
|
|
slList.splice(_index-1, 0, element);
|
|
|
|
// slList.splice(_index-1, 0, element);
|
|
|
|
this.setAttr('index',_index)
|
|
|
|
// this.setAttr('index',_index)
|
|
|
|
_index=0
|
|
|
|
// _index=0
|
|
|
|
handler(slList)
|
|
|
|
// handler(slList)
|
|
|
|
//todo 倒剁
|
|
|
|
daoduo(data).then(res=>{
|
|
|
|
// daoduo(data).then(res=>{
|
|
|
|
if (res.success){
|
|
|
|
// if (res.success){
|
|
|
|
const element = slList.splice(index-1, 1)[0];
|
|
|
|
// const element = slList.splice(index-1, 1)[0];
|
|
|
|
slList.splice(_index-1, 0, element);
|
|
|
|
// slList.splice(_index-1, 0, element);
|
|
|
|
this.setAttr('index',_index)
|
|
|
|
// this.setAttr('index',_index)
|
|
|
|
_index=0
|
|
|
|
// _index=0
|
|
|
|
handler(slList)
|
|
|
|
// handler(slList)
|
|
|
|
}else {
|
|
|
|
// }else {
|
|
|
|
|
|
|
|
//
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
})
|
|
|
|
// })
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const indexRect=new Konva.Rect({
|
|
|
|
const indexRect=new Konva.Rect({
|
|
|
@ -186,9 +185,9 @@ const baifang=function (option={}) {
|
|
|
|
x: 60,
|
|
|
|
x: 60,
|
|
|
|
y: 0,
|
|
|
|
y: 0,
|
|
|
|
width: imgSize,
|
|
|
|
width: imgSize,
|
|
|
|
height:40,
|
|
|
|
height:30,
|
|
|
|
fill:'white',
|
|
|
|
fill:'black',
|
|
|
|
text:`${item.wph||''},${item.wpgg}`,
|
|
|
|
text:`${item.tlth}\n${item.wph||''},${item.wpgg}`,
|
|
|
|
align:'center',
|
|
|
|
align:'center',
|
|
|
|
verticalAlign:'middle',
|
|
|
|
verticalAlign:'middle',
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -201,7 +200,7 @@ const baifang=function (option={}) {
|
|
|
|
width: imgSize+40,
|
|
|
|
width: imgSize+40,
|
|
|
|
height:40,
|
|
|
|
height:40,
|
|
|
|
fill:'white',
|
|
|
|
fill:'white',
|
|
|
|
text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.bfrq||''},切割计划日期:${item.qgjhrq||''}`,
|
|
|
|
text:`${item.czbh},${item.pl},${item.fd},工单号:${item.djh||''}\n上料:${item.bfrq||''},切割计划日期:${item.qgjhrq||''}`,
|
|
|
|
align:'center',
|
|
|
|
align:'center',
|
|
|
|
verticalAlign:'middle',
|
|
|
|
verticalAlign:'middle',
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -212,7 +211,7 @@ const baifang=function (option={}) {
|
|
|
|
slGroup.destroyChildren()
|
|
|
|
slGroup.destroyChildren()
|
|
|
|
for (let i = 1; i <= slList.length; i++) {
|
|
|
|
for (let i = 1; i <= slList.length; i++) {
|
|
|
|
const item=slList[i-1]
|
|
|
|
const item=slList[i-1]
|
|
|
|
gangban(i,item)
|
|
|
|
gangban(i,item,slList)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|