1.调整优化

2.增加零件派工功能
master
董哲奇 8 months ago
parent a473fafbb2
commit 048a451e6e

@ -69,6 +69,7 @@ export function selectQmByQgAndJh(data) {return request({url: '/pgdQmjh/selectQm
export function insertQmList(data) {return request({url: '/pgdQmjh/insertQmList', method: 'post', data})}
export function removeQmList(data) {return request({url: '/pgdQmjh/removeQmList', method: 'post', data})}
export function ljpg(data) {return request({url: '/pgdQmjh/pg', method: 'post', data})}
export function getPkPgd(data) {return request({url: '/pgdPkjh/getPkPgd', method: 'post', data})}

@ -31,6 +31,7 @@ export default {
hxfk:{path:'/hxpg'},
qgpg:{path:'/qgfk'},
qgfk:{path:'/qgpg'},
ljian:{path:''}
},
}
},
@ -38,7 +39,7 @@ export default {
this.data.zyType=this.$route.query.zyType||'0'
const path=this.$route.path.replace('/','')
this.nextPath=this.nextPathName[path].path
if (path==='llfk'){
if (path==='llfk'||path==='ljian'){
this.zyRadioShow=false
}
},
@ -46,12 +47,6 @@ export default {
changePage(){
this.$emit('clear')
this.$router.push(`${this.nextPath}?zyq=${this.$route.query.zyq}&zyType=${this.data.zyType}`)
// if (this.data.zyType==='0'){
// this.$router.push(`/${this.nextPath}?zyq=${this.$route.query.zyq}&zyType=${this.data.zyType}`)
// }
// if (this.data.zyType==='1'){
// this.$router.push(`/qgfk?zyq=${this.$route.query.zyq}&zyType=${this.data.zyType}`)
// }
},
init(){
this.$emit('initWorkers',this.data.bzType)

@ -0,0 +1,80 @@
<template>
<div id="searchPl" ref="searchPl">
<ProjectSelect ref="projectSelectRef" :_style="{width:'115px'}"/>
<VxeInput v-model="queryParam.dcPl" placeholder="请输入批量"/>
<VxeInput v-if="kwShow" v-model="queryParam.kw" placeholder="请输入跨位"/>
<VxeButton status="primary" content="查询" @click="search" />
<VxeSelect v-if="ljbs" v-model="gylxSelectData" ref="gylxSelectRef" :options="gylx" placeholder="选择工艺路线"/>
<VxeSelect v-if="ljbs" v-model="worker.pscry" ref="pkSelectRef" :options="sgry" placeholder="坡口施工"/>
<VxeSelect v-if="ljbs" v-model="worker.qscry" ref="qmSelectRef" :options="sgry" placeholder="曲面施工"/>
<VxeSelect v-if="ljbs" v-model="worker.dscry" ref="dmSelectRef" :options="sgry" placeholder="打磨施工"/>
<VxeButton v-if="ljbs" status="primary" content="批量" @click="plGylx" />
<VxeButton v-if="ljbs" status="success" content="派工" @click="paigong" />
</div>
</template>
<script>
import ProjectSelect from "@/components/ProjectSelect/index.vue";
import {startLoading} from "@/utils";
export default {
name:'SliaoSearch',
components:{ProjectSelect},
props:{
workers:{
type:Array,
default:[]
}
},
data(){
return{
sgry:[],
worker:{
pscry:'',
qscry:'',
dscry:'',
},
kwShow:true,
ljbs:false,
queryParam:{
zt:'11',
dcCh:'',
dcPl:'',
dcFd:'',
},
gylxSelectData:'',
gylx:[
{label:'坡口->曲面',value:['pkbs','qbs']},
{label:'坡口->曲面->打磨',value:['pkbs','qbs','dmbs']},
],
}
},
created(){
const path=this.$route.path.replace('/','')
if (path==='ljian'){
this.ljbs=true
}
this.sgry=this.$props.workers.map(item=>{
return {label:item.userName,value:item.userCode}
})
},
methods:{
plGylx(){
this.$emit('plGylx',this.gylxSelectData,this.worker)
},
paigong(){
this.$emit('paigong')
},
search(){
this.queryParam.dcCh=this.$refs.projectSelectRef.getDcch()
this.$emit('search',this.queryParam)
},
getQueryParam(){
return this.queryParam
}
}
}
</script>
<style scoped>
</style>

@ -189,7 +189,7 @@ export default function (width,height){
width:(_width-60),
height:30,
fill:'#fff',
text:'报',
text:'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -422,7 +422,7 @@ export default function (width,height){
const fdText=new Konva.Text({
x:(_width-188)/2,
y:0,
width:(-width-188)/2,
width:(_width-188)/2,
height:60,
fill:'#fff',
text:'分段:'+data.dcFd,

@ -189,7 +189,7 @@ export default function (width,height){
width:(_width-60),
height:30,
fill:'#fff',
text:'报',
text:'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -422,7 +422,7 @@ export default function (width,height){
const fdText=new Konva.Text({
x:(_width-188)/2,
y:0,
width:(-width-188)/2,
width:(_width-188)/2,
height:60,
fill:'#fff',
text:'分段:'+data.dcFd,

@ -1,48 +0,0 @@
<template>
<VxeGrid ref="hxPgd" v-bind="gridOptions" @cell-click="cellClick" @current-change="getCurrentData" />
</template>
<script>
import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd} from "@/api/zyjh";
export default {
name:'HxianPgd',
props:{
workers:{
type:Array,
default:[]
},
},
data(){
return{
gridOptions:{},
list:{},
setExt:null,
}
},
created(){
const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt
this.gridOptions=options
this.gridOptions.columns=columns
},
methods:{
initData(worker,zt){
getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data
})
getPgd({user:worker,zt:zt,field:'hxry'}).then(res=>{
this.gridOptions.data=res.data
this.setExt('workers',this.$props.workers)
})
},
getCurrentData(){
const data= this.$refs.hxPgd.getCurrentRecord()
window.localStorage.setItem("hxfk",JSON.stringify(data))
},
cellClick({row}){
this.$emit('initPgd',row)
}
}
}
</script>

@ -0,0 +1,114 @@
<template>
<VxeGrid ref="ljpgd" v-bind="gridOptions" @cell-click="cellClick" @current-change="getCurrentData" />
</template>
<script>
import paoWanPgdConfig from './pgdTable'
import {ljpg} from "@/api/jhzxgl/pgd";
import {endLoading, startLoading} from "@/utils";
export default {
name:'LjianPgd',
props:{
worker:{
type:Object,
default: {}
},
workers:{
type:Array,
default:[]
},
},
data(){
return{
gridOptions:{},
list:{},
setExt:null,
}
},
created(){
this.$store.dispatch('page/handler', true)
const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt
this.gridOptions=options
this.gridOptions.columns=columns
console.log(this.$props.workers)
this.setExt("workers",this.$props.workers)
},
methods:{
plGylx(gylx,worker){
if (!gylx){
this.$message.warning('请选择工艺路线')
return;
}
const data=this.$refs.ljpgd.getCheckboxRecords()
if (data.length===0){
this.$message.warning('工单未选择')
return;
}
data.forEach(item=>{
gylx.forEach(gy=>{
item[gy]='Y'
})
item.pscry=worker.pscry
item.qscry=worker.qscry
item.dscry=worker.dscry
})
},
paigong(worker){
const data=this.$refs.ljpgd.getCheckboxRecords()
if (data.length===0){
this.$message.warning('请选择需要派工的工单')
return;
}
for (const item of data) {
if (item.pkbs&&!item.pscry){
this.$message.warning('坡口施工人员未安排')
return
}
if (item.qbs&&!item.qscry){
this.$message.warning('曲面施工人员未安排')
return
}
if (item.dmbs&&!item.dscry){
this.$message.warning('打磨施工人员未安排')
return
}
}
const pgData=data//.filter(item=>this.isAllNotEmpty(item.dmry,item.pkry,item.qjgry,item.pkbs,item.qbs,item.dmbs))
.map(item=>{
const data={
id:item.id,
dscry:item.dscry,pscry:item.pscry,qscry:item.qscry,
pkbs:item.pkbs,qbs:item.qbs,dmbs:item.dmbs
}
return data
})
startLoading()
ljpg(pgData).then(res=>{
if (res.success){
this.$message.warning('成功')
this.$emit('search')
}
})
},
isAllNotEmpty(...data){
},
initData(data){
// this.gridOptions.data=data
this.$refs.ljpgd.reloadData(data)
setTimeout(()=>{
endLoading()
},2000)
},
getCurrentData(){
const data= this.$refs.ljpgd.getCheckboxRecords()
window.localStorage.setItem("ljfk",JSON.stringify(data))
},
cellClick({row}){
this.$emit('initPgd',row)
}
}
}
</script>

@ -1,276 +0,0 @@
import Konva from "konva";
import {zx} from "@/api/zyjh";
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 x=width*0.16+25,y=260
const bg=function (){
const group=new Konva.Group({
x:x,
y:y,
width:_width,
height:_height
})
const imageObj = new Image();
imageObj.src = require('@/assets/sliao/personbg.png');
imageObj.onload = function () {
const shape = new Konva.Image({
x: 0,
y: 0,
width: _width,
height:_height,
image: this,
});
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
})
group.setAttr('index',index)
group.setAttr('item',item)
slGroup.add(group)
const {x}=group.absolutePosition()
group.dragBoundFunc(function (pos){
return {
x:x,
y:pos.y
}
})
let _index=0
let touchingFlag=false;
group.on('mousedown touchstart',function (evt){
const layer=this.parent.parent.parent
touchingFlag=true
const {x,y}=evt.evt
setTimeout(()=>{
const moving=this.isDragging()
if (!moving){
if (touchingFlag){
this.draggable(false)
const tmpGroup=this.clone()
tmpGroup.x(x-50)
tmpGroup.y(y-10)
layer.add(tmpGroup)
tmpGroup.draggable(true)
tmpGroup.dragBoundFunc(function (pos){
return{...pos}
})
tmpGroup.startDrag()
const that=this
tmpGroup.on('dragend',function (){
const {x:thisX,y:thisY}=this.absolutePosition()
for (const item of layer.children) {
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){
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()
that.visible(true)
return
}
if (zyjh.dcCh!==info.czbh&&zyjh.dcPl!==info.pl&&zyjh.dcFd!==info.fd&&zyjh.tzbh!==info.tlth){
VXETable.modal.message({content: '板材与工单未对应', status: 'warning'})
this.remove()
that.visible(true)
return
}
zx({
field:'hxfkrq',
zxZtName:'HXFK',
list:[{
id:zyjh.id,
hxfkry: worker.userCode
}],
ycldwInfo:info
}).then(res=>{
if (res.success){
window.localStorage.removeItem('hxfk')
this.remove()
that.remove()
}else{
this.remove()
that.visible(true)
}
})
}else{
this.remove()
that.visible(true)
}
}
}
})
this.visible(false)
}
}
},500)
})
group.on('mouseup touchend',function (){
touchingFlag=false
})
group.on('dragstart',function (){
const {x,y}=this.absolutePosition()
this.startPos={
x:x,
y:y
}
})
group.on('dragmove',function (){
if(_index===0){
_index=this.getAttr('index')
}
this.zIndex(7)
const {y:thisY}=this.absolutePosition()
const dir=thisY-this.startPos.y>0?-40:40
const children=slGroup.children
for (const child of children) {
if (child===this){
return
}
const {y:thatY}=child.absolutePosition()
const moveDir=child.getAttr('moveDir')||0
if (thisY>=thatY&&thisY<=thatY+40&&moveDir!==dir){
child.setAttr('moveDir',dir);
_index+=dir>0?1:-1
child.move({
y:dir
})
this.startPos={
x:x,
y:thisY
}
}
}
})
group.on('dragend',function (){
const index=this.getAttr('index')
const element = currSlist.splice(index-1, 1)[0];
currSlist.splice(_index-1, 0, element);
this.setAttr('index',_index)
_index=0
slGroup.destroyChildren()
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,
width:40,
height:40,
fill:'black',
text:index,
align:'center',
verticalAlign:'middle',
})
group.add(indexText)
//层 规格,套料图 船号,上料日期,计划切割日期
const imageObj = new Image();
const imgSize=200
imageObj.src = image;
imageObj.onload = function () {
const shape = new Konva.Image({
x: 40,
y: 0,
width: imgSize,
height:40,
image: imageObj,
});
group.add(shape)
const gbText=new Konva.Text({
x: 40,
y: 0,
width: imgSize,
height:40,
fill:'black',
text:`${item.wph||''},${item.wpgg}`,
align:'center',
verticalAlign:'middle',
})
group.add(gbText)
}
const concent=new Konva.Text({
x: imgSize+60,
y: 0,
width: imgSize-20,
height:40,
fill:'black',
text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`,
align:'center',
verticalAlign:'middle',
})
group.add(concent)
return group
}
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)
slGroup.add(_group)
}
}
return {
container,slGroup,handler,bgGroup
}
}
export default baifang

@ -1,156 +0,0 @@
import Konva from "konva";
export default function (width,height,callback){
const _width=width*0.08,_height=height*0.73
const container=function (){
const x=width*0.08+20,y=260
const group=new Konva.Group({
x:0,
y:0,
width:_width,
height:_height,
draggable:true,
dragBoundFunc:function (pos){
return {
x:x,
y:pos.y
}
},
})
const bgGroup=new Konva.Group({
x:x,
y:y,
width:_width,
height:_height
})
bgGroup.add(group)
bgGroup.clipFunc(function(ctx) {
ctx.rect(0, 4, _width, _height*0.969);
});
const imageObj = new Image();
imageObj.src = require('@/assets/sliao/personbg.png');
imageObj.onload = function () {
const shape = new Konva.Image({
x: 0,
y: 0,
width: _width,
height:_height*0.975,
image: this,
});
bgGroup.add(shape)
shape.zIndex(0)
}
return {bgGroup,group}
}
let selectedShape=null;
const dw=function (index,item=[]){
const alignSize=1
const width=((_width-5)/alignSize),height=150
const x=index%alignSize*width+index%alignSize*10+5,y=height*(Math.floor(index/alignSize))+(Math.floor(index/alignSize)+1)*10
const group=new Konva.Group({
x:x,
y:y,
width:width,
height:height
})
group.on('click touchstart',function (){
if (selectedShape){
selectedShape.hide()
if (selectedShape===selectShape){
selectedShape=null
callback(null,null)
return
}
}
selectedShape=selectShape
selectedShape.show()
callback(index,item)
})
const bgObj = new Image();
bgObj.src = require('@/assets/sliao/personbg1.png');
bgObj.onload = function () {
const shape = new Konva.Image({
x: 0,
y: 0,
offsetX:4,
width: width,
height:height,
image: this,
});
group.add(shape)
shape.zIndex(0)
}
const selectObj = new Image();
selectObj.src = require('@/assets/sliao/selected.png');
let selectShape=null
const setSelectShape=function (shape){
selectShape=shape
}
selectObj.onload = function () {
const shape = new Konva.Image({
x: width-width*0.31,
y: 4,
width: width*0.25,
height:width*0.25,
image: this,
visible:false
});
group.add(shape)
shape.zIndex(0)
setSelectShape(shape)
}
const formatName=()=>{
for (const it of qgkw) {
if (it.bm===item.tzbh){
return it.bmsm
}
}
}
const text=new Konva.Text({
x:0,
y:0,
width: width,
height: height,
fill:'black',
text:`${formatName()}\n${item.list.length}`,
align:'center',
verticalAlign:'middle',
fontSize:14
})
group.add(text)
return group
}
const qgkw=[
{"bmsm": "2跨超长超宽曲板", "bmlb": "QGKW", "bm": "10"},
{"bmsm": "2跨T型材腹板", "bmlb": "QGKW", "bm": "11"},
{"bmsm": "2跨激光切割板", "bmlb": "QGKW", "bm": "12"},
{"bmsm": "3跨曲板", "bmlb": "QGKW", "bm": "13"},
{"bmsm": "3跨厚板", "bmlb": "QGKW", "bm": "14"},
{"bmsm": "4跨普通板", "bmlb": "QGKW", "bm": "15"},
{"bmsm": "7跨型板", "bmlb": "QGKW", "bm": "16"},
{"bmsm": "光电", "bmlb": "QGKW", "bm": "17"},
{"bmsm": "2跨T型材面板", "bmlb": "QGKW", "bm": "5"},
{"bmsm": "3跨平铁", "bmlb": "QGKW", "bm": "6"},
{"bmsm": "1跨平直大板", "bmlb": "QGKW", "bm": "7"},
{"bmsm": "1跨进线板", "bmlb": "QGKW", "bm": "8"},
{"bmsm": "2跨超长超宽板", "bmlb": "QGKW", "bm": "9"}
]
return {
container,dw
}
}

@ -1,10 +1,10 @@
import Konva from "konva";
export default function (width,height){
const _width=width*0.075,_height=height*0.73
const _width=width*0.075,_height=height*0.942
const container=function (){
const x=20,y=260
const x=20,y=70
const group=new Konva.Group({
x:0,

@ -2,7 +2,7 @@ import Konva from "konva";
import QRCode from 'qrcode'
export default function (width,height){
const x=width*0.66+40,y=40,_width=width*0.30,_height=height*0.95
const x=width*0.66+40,y=70,_width=width*0.30,_height=height*0.917
const container=function (){
const group=new Konva.Group({
@ -34,6 +34,8 @@ export default function (width,height){
}
const formatWorker=function (code){
console.log(code)
console.log(workers)
for (const item of workers) {
if(item.userCode===code){
return item.userName
@ -79,7 +81,7 @@ export default function (width,height){
lineHeight:1,
fill:'#fff',
strokeWidth:1,
text:'划线计划单',
text:'零件计划单',
align:'center',
fontSize:20,
})
@ -91,7 +93,7 @@ export default function (width,height){
width:_width-48,
height:15,
fill:'#fff',
text:`单号:${data.djh}`,
text:`单号:${data.qgdh?data.qgdh:''}`,
align:'left',
fontSize:12,
})
@ -115,6 +117,12 @@ export default function (width,height){
group0.add(group4)
const group5=drawJs(data)
group0.add(group5)
const group51=drawJs1(data)
group0.add(group51)
const group52=drawJs2(data)
group0.add(group52)
const group6=drawHb(data)
group0.add(group6)
const group7=drawBz(data)
@ -189,7 +197,7 @@ export default function (width,height){
width:(_width-60),
height:30,
fill:'#fff',
text:'报',
text:'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -212,7 +220,7 @@ export default function (width,height){
width:(_width-60)/2,
height:30,
fill:'#fff',
text:data.jsr,
text:data.qjgFkrq,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -246,6 +254,172 @@ export default function (width,height){
return group
}
const drawJs=function (data){
const group=new Konva.Group({
x:0,
y:150,
width:(_width-60),
height:30,
})
const jsRect=new Konva.Rect({
x:0,
y:0,
width:(_width-60),
height:30,
stroke:'#4991E5',
strokeWidth:1,
})
group.add(jsRect)
const jsText=new Konva.Text({
x:0,
y:0,
width:(_width-60),
height:30,
fill:'#fff',
text:'坡口施工',
fontSize:18,
align:'center',
verticalAlign:'middle'
})
group.add(jsText)
const plRect=new Konva.Rect({
x:0,
y:30,
width:(_width-60),
height:30,
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
const pscry=formatWorker(data.pscry)
const qscry=formatWorker(data.qscry)
const dscry=formatWorker(data.dscry)
const plText=new Konva.Text({
x:0,
y:30,
width:(_width-60)/2,
height:30,
fill:'#fff',
text:pscry,
fontSize:18,
align:'center',
verticalAlign:'middle'
})
const fdRect=new Konva.Rect({
x:(_width-60)/2,
y:30,
width:(_width-60)/2,
height:30,
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
const fdText=new Konva.Text({
x:(_width-60)/2,
y:30,
width:(_width-60)/2,
height:30,
fill:'#fff',
text:data.pkXfrq||'',
fontSize:18,
align:'center',
verticalAlign:'middle'
})
group.add(fdText)
group.add(plText)
return group
}
const drawJs1=function (data){
const group=new Konva.Group({
x:0,
y:250,
width:(_width-60),
height:30,
})
const jsRect=new Konva.Rect({
x:0,
y:0,
width:(_width-60),
height:30,
stroke:'#4991E5',
strokeWidth:1,
})
group.add(jsRect)
const jsText=new Konva.Text({
x:0,
y:0,
width:(_width-60),
height:30,
fill:'#fff',
text:'曲面施工',
fontSize:18,
align:'center',
verticalAlign:'middle'
})
group.add(jsText)
const plRect=new Konva.Rect({
x:0,
y:30,
width:(_width-60),
height:30,
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
const qscry=formatWorker(data.qscry)
const plText=new Konva.Text({
x:0,
y:30,
width:(_width-60)/2,
height:30,
fill:'#fff',
text:qscry,
fontSize:18,
align:'center',
verticalAlign:'middle'
})
const fdRect=new Konva.Rect({
x:(_width-60)/2,
y:30,
width:(_width-60)/2,
height:30,
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
const fdText=new Konva.Text({
x:(_width-60)/2,
y:30,
width:(_width-60)/2,
height:30,
fill:'#fff',
text:data.qjgXfrq||'',
fontSize:18,
align:'center',
verticalAlign:'middle'
})
group.add(fdText)
group.add(plText)
return group
}
const drawJs2=function (data){
const group=new Konva.Group({
x:0,
y:350,
@ -269,7 +443,7 @@ export default function (width,height){
width:(_width-60),
height:30,
fill:'#fff',
text:'接收',
text:'打磨施工',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -286,7 +460,7 @@ export default function (width,height){
})
group.add(plRect)
const name=formatWorker(data.pwry)
const dscry=formatWorker(data.dscry)
const plText=new Konva.Text({
x:0,
@ -294,7 +468,7 @@ export default function (width,height){
width:(_width-60)/2,
height:30,
fill:'#fff',
text:name,
text:dscry,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -316,7 +490,7 @@ export default function (width,height){
width:(_width-60)/2,
height:30,
fill:'#fff',
text:data.pwpgrq||'',
text:data.dmXfrq||'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -370,7 +544,7 @@ export default function (width,height){
width:(_width-60),
height:30,
fill:'#fff',
text:data.tzbh,
text:data.tlth,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -402,7 +576,7 @@ export default function (width,height){
width:(_width-188)/2,
height:60,
fill:'#fff',
text:'批量:'+data.dcPl,
text:'批量:'+data.pl,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -422,10 +596,10 @@ export default function (width,height){
const fdText=new Konva.Text({
x:(_width-188)/2,
y:0,
width:(-width-188)/2,
width:(_width-188)/2,
height:60,
fill:'#fff',
text:'分段:'+data.dcFd,
text:'分段:'+data.fd,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -459,7 +633,7 @@ export default function (width,height){
width:(_width-188),
height:60,
fill:'#fff',
text:'船号:'+data.dcCh,
text:'船号:'+data.czbh,
fontSize:18,
align:'center',
verticalAlign:'middle'

@ -1,7 +1,7 @@
export default function () {
const options={
height:215,
height:835,
align:'center',
border: true,
resizable: true,
@ -26,56 +26,293 @@ export default function () {
}
}
}
const gdhFormat=function ({cellValue}){
if (cellValue){
return 'PW'+cellValue
}
return ''
}
const dwFormat=function ({cellValue}){
console.log(cellValue)
console.log(options.ycldw)
for (const item of options.ycldw) {
if (cellValue===(item.id+"")){
for (const it of ycldw){
if (it.bm===item.tzbh){
return it.bmsm
}
}
}
}
}
const columns = [
{ type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 50 },
{ field: 'djh',title:'派工单号', width: 120,},
{field: 'lldw', title: '垛位', width: 80,formatter: dwFormat},
{field: 'llcs', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80},
{field: 'wpgg', title: '材质', width: 80},
{field: 'wpxh', title: '规格', width: 70},
{field: 'slwlh', title: '炉批号', width: 100},
{field: 'tzbh', title: '套料图号', width: 100},
{field: 'hxry', title: '接收人', width: 80,formatter: nameFormat},
{field: 'hxpgry', title: '派工人', width: 80,formatter: nameFormat},
{field: 'hxpgrq', title: '派工时间', width: 100},
]
{ type: 'seq', width: 50, title: '序号' },
{ field: 'pkbs', title: '坡口标识', width: 90,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'pscry', title: '坡口施工', width: 90,formatter:nameFormat,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'qbs', title: '曲面标识', width: 90,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'qscry', title: '曲面施工', width: 90,formatter:nameFormat,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dmbs', title: '打磨标识', width: 90,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dscry', title: '打磨施工', width: 90,formatter:nameFormat,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
// { field: 'qjgZt', title: '状态', width: 120,formatter: ['dictFormat','PGZT'],
// filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
// filterRender: { name: 'FilterCombination', },
// },
{ field: 'czbh', title: '船号', width: 70,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'pl', title: '批量', width: 70,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'fd', title: '分段', width: 70,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'kw', title: '跨位', width: 70,formatter: ['dictFormat', 'QGKW'],
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'zl', title: '组立', width: 70,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'tlth', title: '套料图号', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'ljbh', title: '零件编号', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'ljmc', title: '零件名称', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'ljgg', title: '零件规格', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'ljcz', title: '零件材质', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'wpfl', title: '物品分类', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'jldw', title: '计量单位', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'sl', title: '数量', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'qfxqrqxz', title: '前方需求小组期', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'qfxqrqdz', title: '前方需求大组期', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'qjgjhrq', title: '曲加工计划期', width: 120,editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'qsbbh', title: '曲设备编号', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'qjgXfry', title: '曲派工人员', width: 120,editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'qjgXfrq', title: '曲派工日期', width: 120,editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'qjgFkry', title: '曲反馈人', width: 120,editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'qjgFkrq', title: '曲反馈日期', width: 120,editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'pghd', title: '坡口工单号', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'pkjhrq', title: '坡口计划日期', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'pksbbh', title: '坡口设备编号', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'pklx', title: '坡口类型', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'pkcd', title: '坡口长度', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'pkXfry', title: '坡口派工人员', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'pkXfrq', title: '坡口派工日期', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'pkFkrq', title: '坡口反馈日期', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'pkFkry', title: '坡口反馈人', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dgdh', title: '打磨工单号', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dmsbbh', title: '打磨设备编号', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dmcd', title: '打磨打磨长度', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dmXfry', title: '打磨派工人', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dmXfrq', title: '打磨派工日期', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dmFkry', title: '打磨反馈人', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dmFkrq', title: '打磨反馈日期', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{
field: 'slfkry',
title: '上料反馈人',
width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'slfkrq',
title: '上料反馈日期',
width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'pwfkry',
title: '抛丸反馈人',
width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'pwfkrq',
title: '抛丸反馈日期',
width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'llfkry',
title: '理料反馈人',
width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'llfkrq',
title: '理料反馈日期',
width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'hxfkrq',
title: '划线反馈日期',
width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'hxfkry',
title: '划线反馈人员',
width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
const ycldw=[
{"bmsm": "2跨超长超宽曲板", "bmlb": "QGKW", "bm": "10"},
{"bmsm": "2跨T型材腹板", "bmlb": "QGKW", "bm": "11"},
{"bmsm": "2跨激光切割板", "bmlb": "QGKW", "bm": "12"},
{"bmsm": "3跨曲板", "bmlb": "QGKW", "bm": "13"},
{"bmsm": "3跨厚板", "bmlb": "QGKW", "bm": "14"},
{"bmsm": "4跨普通板", "bmlb": "QGKW", "bm": "15"},
{"bmsm": "7跨型板", "bmlb": "QGKW", "bm": "16"},
{"bmsm": "光电", "bmlb": "QGKW", "bm": "17"},
{"bmsm": "2跨T型材面板", "bmlb": "QGKW", "bm": "5"},
{"bmsm": "3跨平铁", "bmlb": "QGKW", "bm": "6"},
{"bmsm": "1跨平直大板", "bmlb": "QGKW", "bm": "7"},
{"bmsm": "1跨进线板", "bmlb": "QGKW", "bm": "8"},
{"bmsm": "2跨超长超宽板", "bmlb": "QGKW", "bm": "9"}
{
field: 'qgfkry',
title: '切割反馈人',
width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'qgfkrq',
title: '切割反馈日期',
width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'sljhrq',
title: '上料计划日期',
width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'pwjhrq',
title: '抛丸计划日期',
width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'lljhrq',
title: '理料计划日期',
width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'hxjhrq',
title: '划线计划日期',
width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
{
field: 'qgjhrq',
title: '切割计划日期',
width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination' }
},
]
return {

@ -1,41 +0,0 @@
import Konva from "konva";
export default function (width,height){
const x=width*0.495,y=260,_width=width*0.186,_height=height*0.713
const container=new Konva.Group({
id:'sb',
x:x,
y:y,
width:_width,
height:_height
})
const imageObj = new Image();
imageObj.src = require('@/assets/sliao/personbg.png');
imageObj.onload = function () {
const shape = new Konva.Image({
x: 0,
y: 0,
width: _width,
height:_height,
image: this,
});
container.add(shape)
shape.zIndex(0)
}
const text=new Konva.Text({
x: 0,
y: 0,
width: _width,
height:_height,
fill:'black',
text:'划线设备',
align:'center',
verticalAlign:'middle',
})
container.add(text)
return container
}

@ -1,7 +1,8 @@
<template>
<div class="container">
<div id="pwpg" class="pwpg" ref="pwpg"></div>
<HxianPgd id="hxpgd" ref="hxpgd" @initPgd="initPgd" :pgd="pgd" :workers="workers" @pgdClick="pagClick" />
<SliaoSearch v-if="show" ref="sliaoSearch" @search="search" @paigong="paigong" @plGylx="plGylx" :workers="workers" />
<LjianPgd v-if="show" id="ljianpgd" ref="hxpgd" @initPgd="initPgd" @search="search" :worker="currentWorker" :workers="workers" />
<ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers"/>
</div>
</template>
@ -10,44 +11,37 @@
import container from "./comps/container";
import drawTitle from './comps/title'
import workers from "./comps/person";
import drawDw from './comps/dw'
import drawPgd from './comps/pgd'
import drawSb from './comps/sb'
import baifang from "./comps/baifang";
import {getPgd, getYcldw} from "@/api/zyjh";
import {getBzryList} from "@/api/sjzx/bzzGL";
import HxianPgd from "@/views/zyjhzx/hxianfkui/comps/HxianPgd.vue";
import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue";
import LjianPgd from "@/views/zyjhzx/ljian/comps/LjianPgd.vue";
import SliaoSearch from "@/views/zyjhzx/components/SliaoSearch.vue";
import {getQmPgd} from "@/api/jhzxgl/pgd";
import initSearch from "@/views/zyjhzx/components/search";
import {startLoading} from "@/utils";
export default {
name:'PWanFKui',
components: {ZyjhSelectComp, HxianPgd},
components: {SliaoSearch, LjianPgd, ZyjhSelectComp},
data(){
return {
title:'零 件 作 业 工',
title:'零 件 作 业 工',
width:0,
height:0,
stage:null,
layer:null,
sljhGroup:null,
pgdGroup:null,
drawGd:null,
dw:[],
pgd:[],
slGroup:null,
currentDw:null,
currentDwIndex:null,
currentWorker:null,
setWorkers:null,
workers:null,
dwGroup:null,
workerGroup:null,
person:null,
show:false
}
},
mounted() {
this.$socket.open()
this.wsSubscribe()
this.initKonvaStage();
},
created(){
@ -55,77 +49,16 @@ export default {
},
sockets:{},
methods:{
wsSubscribe(){
this.sockets.subscribe('hxComplete', data => {
if (this.currentDw&&this.currentDw.id===data.dwId) {
if (this.slGroup){
this.slGroup.destroyChildren()
}
for (let i = 0; i < this.currentDw.list.length; i++) {
const item=this.currentDw.list[i]
if (item.czbh===data.czbh&&item.pl===data.pl&&item.tlth===data.tlth){
this.currentDw.list.splice(i,1)
break
}
}
this.drawBaiFang(this.dw[this.currentDwIndex].list)
this.initDw()
this.$refs.hxpgd.initData(this.currentWorker.userCode,'51')
}
})
this.sockets.subscribe('zyjhzx', data => {
if (this.zt===data.zt){
const tmpArr=[{
id:data.zyjh.id,
hxfkry:data.zyjh.hxry
}]
this.$refs.hxpgd.paigong0(tmpArr)
}else{
this.$message.error(`工单号错误:${data.gdh}`)
}
})
plGylx(gylx,worker){
this.$refs.hxpgd.plGylx(gylx,worker)
},
paigong(){
this.$refs.hxpgd.paigong(this.currentWorker)
},
initPgd(pgd={}){
const group=this.drawGd(pgd)
this.pgdGroup.add(group)
},
pagClick(){
},
initDwInfo(index,dw){
if (this.slGroup){
this.slGroup.destroyChildren()
}
this.canSl=true
this.currentDw=dw
this.currentDwIndex=index
!!dw&&this.drawBaiFang(dw.list)
},
initBaiFang(){
const {slGroup,handler,bgGroup:slBgGroup}= baifang({width:this.width,height:this.height})
this.slGroup=slGroup
this.layer.add(slBgGroup)
this.drawBaiFang=handler
},
initDw(){
if (this.dwGroup){
this.dwGroup.destroyChildren()
}
const that=this
getYcldw({type:'llj'}).then(res=>{
const {container,dw}=drawDw(this.width,this.height,that.initDwInfo)
const {bgGroup,group}=container()
this.dwGroup=group
this.dw=res.data
this.layer.add(bgGroup)
for (let i=0;i<res.data.length;i++){
const item=res.data[i]
const dwGroup=dw(i,item)
group.add(dwGroup)
}
})
},
initWorkers(bzType){
if (this.workerGroup){
this.workerGroup.destroyChildren()
@ -140,6 +73,7 @@ export default {
}
getBzryList({zyq:this.$route.query.zyq,zt:bzType}).then(res=>{
this.workers=res.data
this.show=true
this.setWorkers(res.data)
const that=this
for (let i=0;i<res.data.length;i++){
@ -147,12 +81,38 @@ export default {
const worker=this.person(i,item)
worker.on('click touchstart',function (){
that.currentWorker=item
that.$refs.hxpgd.initData(that.currentWorker.userCode,'51')
that.search(item)
})
this.workerGroup.add(worker)
}
})
},
search(worker){
const data=this.$refs.sliaoSearch.getQueryParam()
const searchParam={
dcch:data.dcCh,
pl:data.dcPl,
fd:data.dcFd,
lx:'q',
zt:'01'
}
if (worker){
searchParam.qjgry=worker.userCode
// searchParam.dmry=worker.userCode
// searchParam.pkry=worker.userCode
}else{
if (!searchParam.dcch){
this.$message.warning('请选择船号')
return
}
}
startLoading()
// !!this.currentWorker&&(searchParam.worker=this.currentWorker)
getQmPgd(searchParam).then((res) => {
this.$refs.hxpgd.initData(res.data)
})
},
initKonvaStage(){
this.width=this.$refs.pwpg.clientWidth
this.height=this.$refs.pwpg.clientHeight
@ -165,18 +125,14 @@ export default {
this.initWorkers(this.$refs.selRef.getData().bzType)
this.initDw()
const {container:pgdContainer,drawGd,setWorkers}=drawPgd(this.width,this.height)
this.setWorkers=setWorkers
this.drawGd=drawGd
this.pgdGroup=pgdContainer()
this.layer.add(this.pgdGroup)
const csdGroup = drawSb(this.width, this.height)
this.layer.add(csdGroup)
this.initBaiFang()
const {group}=initSearch()
this.layer.add(group)
},
}
}
@ -184,6 +140,30 @@ export default {
</script>
<style>
.vxe-button{
top: 0px;
width: 80px;
height: 22px !important;
}
.vxe-input{
width: 115px;
}
#searchPl {
position: absolute;
top:45px;
left:15px;
border: none;
margin: 0;
}
#searchPl input{
border: none;
background: none;
outline: none;
}
#selectComp {
width:50%;
height: auto;
@ -193,12 +173,12 @@ export default {
border: none;
margin: 0;
}
#hxpgd {
width:67%;
#ljianpgd {
width:59.6%;
height: auto;
position: absolute;
top:45px;
left:20px;
top:76px;
left:165px;
border: none;
margin: 0;
}

@ -189,7 +189,7 @@ export default function (width,height){
width:(_width-60),
height:30,
fill:'#fff',
text:'报',
text:'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -422,7 +422,7 @@ export default function (width,height){
const fdText=new Konva.Text({
x:(_width-188)/2,
y:0,
width:(-width-188)/2,
width:(_width-188)/2,
height:60,
fill:'#fff',
text:'分段:'+data.dcFd,

@ -189,7 +189,7 @@ export default function (width,height){
width:(_width-60),
height:30,
fill:'#fff',
text:'报',
text:'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -422,7 +422,7 @@ export default function (width,height){
const fdText=new Konva.Text({
x:(_width-188)/2,
y:0,
width:(-width-188)/2,
width:(_width-188)/2,
height:60,
fill:'#fff',
text:'分段:'+data.dcFd,

@ -190,7 +190,7 @@ export default function (width,height){
width:(_width-60),
height:30,
fill:'#fff',
text:'报',
text:'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -421,7 +421,7 @@ export default function (width,height){
const fdText=new Konva.Text({
x:(_width-188)/2,
y:0,
width:(-width-188)/2,
width:(_width-188)/2,
height:60,
fill:'#fff',
text:'分段:'+data.dcFd,

@ -189,7 +189,7 @@ export default function (width,height){
width:(_width-60),
height:30,
fill:'#fff',
text:'报',
text:'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -422,7 +422,7 @@ export default function (width,height){
const fdText=new Konva.Text({
x:(_width-188)/2,
y:0,
width:(-width-188)/2,
width:(_width-188)/2,
height:60,
fill:'#fff',
text:'分段:'+data.dcFd,

@ -55,7 +55,7 @@ export default function (width,height,callback){
const width=((_width-5)/alignSize),height=150
const x=index%alignSize*width+index%alignSize*10+5,y=height*(Math.floor(index/alignSize))+(Math.floor(index/alignSize)+1)*10
const group=new Konva.Group({
id:item.id,
id:item.id+'',
x:x,
y:y,
width:width,

@ -189,7 +189,7 @@ export default function (width,height){
width:(_width-60),
height:30,
fill:'#fff',
text:'报',
text:'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -422,7 +422,7 @@ export default function (width,height){
const fdText=new Konva.Text({
x:(_width-188)/2,
y:0,
width:(-width-188)/2,
width:(_width-188)/2,
height:60,
fill:'#fff',
text:'分段:'+data.dcFd,

@ -189,7 +189,7 @@ export default function (width,height){
width:(_width-60),
height:30,
fill:'#fff',
text:'报',
text:'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -422,7 +422,7 @@ export default function (width,height){
const fdText=new Konva.Text({
x:(_width-188)/2,
y:0,
width:(-width-188)/2,
width:(_width-188)/2,
height:60,
fill:'#fff',
text:'分段:'+data.dcFd,

@ -7,7 +7,7 @@
</template>
<script>
import initSearch from "@/views/zyjhzx/sliao/comps/search";
import initSearch from "@/views/zyjhzx/components/search";
import {openCzplBase} from "@/api/openapi";
export default {

@ -1,39 +0,0 @@
<template>
<div id="searchPl" ref="searchPl">
<ProjectSelect ref="projectSelectRef" :_style="{width:'115px'}"/>
<VxeInput v-model="queryParam.dcPl" placeholder="请输入批量"/>
<VxeInput v-model="queryParam.kw" placeholder="请输入跨位"/>
<VxeButton status="primary" content="查询" @click="search" />
</div>
</template>
<script>
import ProjectSelect from "@/components/ProjectSelect/index.vue";
export default {
name:'SliaoSearch',
components:{ProjectSelect},
data(){
return{
queryParam:{
zt:'11',
dcCh:'',
dcPl:'',
dcFd:'',
},
}
},
methods:{
search(){
this.queryParam.dcCh=this.$refs.projectSelectRef.getDcch()
this.$emit('search',this.queryParam)
},
getQueryParam(){
return this.queryParam
}
}
}
</script>
<style scoped>
</style>

@ -9,10 +9,10 @@
import Konva from "konva";
import container from "@/views/zyjhzx/sliao/comps/container";
import drawTitle from "@/views/zyjhzx/sliao/comps/title";
import initSearch from "@/views/zyjhzx/sliao/comps/search";
import initSearch from "@/views/zyjhzx/components/search";
import {sljh} from "@/views/zyjhzx/sliao/comps/sljh";
import workers from "@/views/zyjhzx/sliao/comps/person";
import SliaoSearch from "@/views/zyjhzx/sliao/comps/SliaoSearch.vue";
import SliaoSearch from "@/views/zyjhzx/components/SliaoSearch.vue";
import liliao from "@/views/zyjhzx/sliao/comps/liliao";
import baifang from "@/views/zyjhzx/sliao/comps/baifang";
import {dict, getSljhPgd, getYcldw, shangLiao} from "@/api/zyjh";
@ -433,7 +433,6 @@ export default {
this.layer.add(title)
const {group}=initSearch()
this.layer.add(group)
this.search(this.$refs.sliaoSearch.getQueryParam())

Loading…
Cancel
Save