1.增加上料计划查询条件

master
董哲奇 8 months ago
parent 3ce6bfd17f
commit 994d6b1bef

@ -16,10 +16,11 @@ export const shangLiao=function(data){
})
}
export const getSljhPgd=function(){
export const getSljhPgd=function(data={}){
return request({
url: '/zyjh/sljh',
method: 'post',
data:data
})
}

@ -27,6 +27,9 @@ export default {
search(){
this.queryParam.dcCh=this.$refs.projectSelectRef.getDcch()
this.$emit('search',this.queryParam)
},
getQueryParam(){
return this.queryParam
}
}
}

@ -87,9 +87,6 @@ const baifang=function (option={}) {
child.move({
y:dir
})
const item=child.getAttr('item')
item.ceng+=dir>0?1:-1
child.setAttr('item',item)
const movedIndex=movedList.indexOf(child)
if (movedIndex===-1){
movedList.push(child)
@ -108,25 +105,35 @@ const baifang=function (option={}) {
group.on('dragend',function (){
const index=this.getAttr('index')
const item=this.getAttr('item')
const mList=[]
for (const it of movedList) {
mList.push(it.getAttr('item'))
}
console.log(mList)
const data={
id:item.id,
lastCeng:item.ceng,
lastDuo:item.dwId,
ceng:_index,
duo:item.dwId,
movedList:movedList
movedList:mList
}
daoduo(data).then(res=>{
if (res.success){
const element = slList.splice(index-1, 1)[0];
slList.splice(_index-1, 0, element);
this.setAttr('index',_index)
_index=0
handler(slList)
}else {
}
})
// daoduo(data).then(res=>{
// if (res.success){
// const element = slList.splice(index-1, 1)[0];
// slList.splice(_index-1, 0, element);
// this.setAttr('index',_index)
// _index=0
// handler(slList)
// }else {
//
// }
// })
})
const indexRect=new Konva.Rect({

@ -7,9 +7,11 @@ const container=function (width=0,height=0,container){
height: height,
});
const layer = new Konva.Layer();
const layer = new Konva.Layer({
id:"1"
});
stage.add(layer)
layer.draw();
// layer.draw();
return {
stage,layer

@ -1,20 +1,22 @@
import Konva from "konva";
let _width=0,_height=0
export const sljh=function (width,height){
_width=width
_height=height
const layer=new Konva.Layer()
layer.draw()
const group=new Konva.Group({
const layer=new Konva.Layer({
id:'2',
x:15,
y:65,
})
layer.clipFunc(function(ctx) {
ctx.rect(0, 0, width-30, height*0.2-60);
});
//layer.draw()
const group=new Konva.Group({
x:0,
y:0,
width: width-30,
height: height*0.2-60,
stroke:'blue',
strokeWidth:1,
draggable: true,
dragBoundFunc:function (pos){
return {

@ -1,7 +1,7 @@
<template>
<div>
<div id="sliao" class="sliao" ref="sliao"></div>
<SliaoSearch @search="search" />
<SliaoSearch ref="sliaoSearch" @search="search" />
</div>
</template>
@ -64,7 +64,10 @@ export default {
})
},
search(queryParam){
console.log(queryParam)
getSljhPgd(queryParam).then(res=>{
this.sljhItemList=res.data
this.drawSljhItem(this.sljhItemList)
})
},
initBaiFang(index,dw){
if (this.slGroup){
@ -79,6 +82,9 @@ export default {
this.layer.add(slGroup)
},
drawSljhItem(list){
if (this.sljhGroup){
this.sljhGroup.destroyChildren()
}
const itemWith=85;
const itemHeight=108
for (let i = 0; i < list.length; i++) {
@ -231,10 +237,7 @@ export default {
this.layer.add(group)
getSljhPgd().then(res=>{
this.sljhItemList=res.data
this.drawSljhItem(this.sljhItemList)
})
this.search(this.$refs.sliaoSearch.getQueryParam())
const {layer:sljhLayer,group:sljhGroup}=sljh(this.width,this.height)
this.sljhGroup=sljhGroup

Loading…
Cancel
Save