1.完善抛丸反馈

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

@ -26,7 +26,7 @@
<el-container style="padding-top: 0px">
<el-main>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="月度计划编制" name="sygdjh" v-if="isUser">
<el-tab-pane label="月度计划明细" name="sygdjh" v-if="isUser">
<div class="mytable" >
<el-button type="success" @click="paichan"></el-button>
<el-button type="success" @click="jgcx(false)"></el-button>
@ -59,7 +59,7 @@
</vxe-grid>
</div>
</el-tab-pane>
<el-tab-pane label="前方三月需求计划" name="first">
<el-tab-pane label="月度计划编制" name="first">
<div class="mytable">
<el-button type="success" @click="confirmModal"></el-button>
<el-button type="success" @click="creatYdjh"></el-button>

@ -25,7 +25,7 @@
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="月度计划" name="first">
<div class="mytable">
<el-button type="success" @click="symxhz"></el-button>
<el-button type="success" @click="symxhz"></el-button>
<vxe-grid
id="id"
ref="xGrid"
@ -213,6 +213,9 @@ export default {
tableColumn:[
{ type: 'checkbox', width: 50 ,},
{ type: 'seq', width: 60, title: '序号'},
{ field: 'jhlx', title: '计划类型',width: 70,formatter:this.formatterZt,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }},
{ field: 'dcCh', title: '船号',width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }},
@ -341,9 +344,6 @@ export default {
{ field: 'zt', title: '状态',width: 70,formatter: ['dictFormat','SYZT'],
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }},
{ field: 'jhlx', title: '计划类型',width: 70,formatter:this.formatterZt,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }},
{ field: 'gxsj', title: '数据更新时间',width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }},

@ -2,7 +2,7 @@ import Konva from "konva";
import QRCode from 'qrcode'
export default function (width,height){
const x=width*0.66+40,y=45,_width=width*0.30,_height=height*0.945
const x=width*0.66+40,y=40,_width=width*0.30,_height=height*0.945
const container=function (){
const group=new Konva.Group({
@ -12,16 +12,19 @@ export default function (width,height){
height:_height
})
const rect=new Konva.Rect({
x:0,
y:0,
width:_width,
height:_height,
stroke:'black',
strokeWidth:1,
})
group.add(rect)
const bgObj = new Image();
bgObj.src = require('@/assets/pwan/pgdbg.png');
bgObj.onload = function () {
const shape = new Konva.Image({
x: 0,
y: 0,
width: _width,
height:_height,
image: this,
});
group.add(shape)
shape.zIndex(0)
}
return group
}
@ -29,8 +32,8 @@ export default function (width,height){
// this.layer.destroyChildren();
const group=new Konva.Group({
x:0,
y:0,
x:13,
y:12,
width:_width,
height:_height
})
@ -38,9 +41,8 @@ export default function (width,height){
const rect=new Konva.Rect({
x:0,
y:0,
width:_width,
height:_height,
fill:'white'
width:_width-25,
height:_height-20,
})
group.add(rect)
@ -49,9 +51,7 @@ export default function (width,height){
y:10,
width:_width,
height:35,
lineHeight:1,
stroke:'black',
strokeWidth:1.2,
fill:'#fff',
text:'大连重工大连钢材加工配送有限公司',
align:'center',
fontSize:22,
@ -64,7 +64,7 @@ export default function (width,height){
width:_width,
height:25,
lineHeight:1,
stroke:'black',
fill:'#fff',
strokeWidth:1,
text:'抛丸施工单',
align:'center',
@ -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',
fill:'#fff',
text:`单号:${data.gdh?'PW_'+data.gdh:''}`,
align:'left',
fontSize:12,
})
group.add(dhTitle)
@ -126,9 +126,7 @@ export default function (width,height){
y:1,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'负责人:',
fontSize:18,
verticalAlign:'middle'
@ -149,7 +147,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:180,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -168,7 +166,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(jsRect)
@ -178,9 +176,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'回报',
fontSize:18,
align:'center',
@ -193,7 +189,7 @@ export default function (width,height){
y:30,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -203,9 +199,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:data.jsr,
fontSize:18,
align:'center',
@ -217,7 +211,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -227,10 +221,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jssj,
fill:'#fff',
text:data.pwfkrq,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -254,7 +246,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(jsRect)
@ -264,9 +256,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'接收',
fontSize:18,
align:'center',
@ -279,7 +269,7 @@ export default function (width,height){
y:30,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -289,10 +279,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jsr,
fill:'#fff',
text:data.pwry,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -303,7 +291,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -313,10 +301,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jssj,
fill:'#fff',
text:data.pwpgrq||'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -340,7 +326,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:200,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -359,7 +345,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -369,9 +355,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:data.tzbh,
fontSize:18,
align:'center',
@ -393,7 +377,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -403,9 +387,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'批量:'+data.dcPl,
fontSize:18,
align:'center',
@ -418,7 +400,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -428,9 +410,7 @@ export default function (width,height){
y:0,
width:(-width-188)/2,
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'分段:'+data.dcFd,
fontSize:18,
align:'center',
@ -454,7 +434,7 @@ export default function (width,height){
y:0,
width:(_width-188),
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
czbhGroup.add(czbhRect)
@ -464,9 +444,7 @@ export default function (width,height){
y:0,
width:(_width-188),
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'船号:'+data.dcCh,
fontSize:18,
align:'center',
@ -475,14 +453,14 @@ 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,
y:0,
width:128.7,
height:120,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)

@ -2,7 +2,7 @@ import Konva from "konva";
import QRCode from 'qrcode'
export default function (width,height){
const x=width*0.66+40,y=45,_width=width*0.30,_height=height*0.945
const x=width*0.66+40,y=40,_width=width*0.30,_height=height*0.945
const container=function (){
const group=new Konva.Group({
@ -12,16 +12,19 @@ export default function (width,height){
height:_height
})
const rect=new Konva.Rect({
x:0,
y:0,
width:_width,
height:_height,
stroke:'black',
strokeWidth:1,
})
group.add(rect)
const bgObj = new Image();
bgObj.src = require('@/assets/pwan/pgdbg.png');
bgObj.onload = function () {
const shape = new Konva.Image({
x: 0,
y: 0,
width: _width,
height:_height,
image: this,
});
group.add(shape)
shape.zIndex(0)
}
return group
}
@ -29,8 +32,8 @@ export default function (width,height){
// this.layer.destroyChildren();
const group=new Konva.Group({
x:0,
y:0,
x:13,
y:12,
width:_width,
height:_height
})
@ -38,9 +41,8 @@ export default function (width,height){
const rect=new Konva.Rect({
x:0,
y:0,
width:_width,
height:_height,
fill:'white'
width:_width-25,
height:_height-20,
})
group.add(rect)
@ -49,9 +51,7 @@ export default function (width,height){
y:10,
width:_width,
height:35,
lineHeight:1,
stroke:'black',
strokeWidth:1.2,
fill:'#fff',
text:'大连重工大连钢材加工配送有限公司',
align:'center',
fontSize:22,
@ -64,7 +64,7 @@ export default function (width,height){
width:_width,
height:25,
lineHeight:1,
stroke:'black',
fill:'#fff',
strokeWidth:1,
text:'抛丸施工单',
align:'center',
@ -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',
fill:'#fff',
text:`单号:${data.gdh?'PW_'+data.gdh:''}`,
align:'left',
fontSize:12,
})
group.add(dhTitle)
@ -126,9 +126,7 @@ export default function (width,height){
y:1,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'负责人:',
fontSize:18,
verticalAlign:'middle'
@ -149,7 +147,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:180,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -168,7 +166,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(jsRect)
@ -178,9 +176,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'回报',
fontSize:18,
align:'center',
@ -193,7 +189,7 @@ export default function (width,height){
y:30,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -203,9 +199,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:data.jsr,
fontSize:18,
align:'center',
@ -217,7 +211,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -227,10 +221,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jssj,
fill:'#fff',
text:data.pwfkrq,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -254,7 +246,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(jsRect)
@ -264,9 +256,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'接收',
fontSize:18,
align:'center',
@ -279,7 +269,7 @@ export default function (width,height){
y:30,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -289,10 +279,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jsr,
fill:'#fff',
text:data.pwry,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -303,7 +291,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -313,10 +301,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jssj,
fill:'#fff',
text:data.pwpgrq||'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -340,7 +326,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:200,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -359,7 +345,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -369,9 +355,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:data.tzbh,
fontSize:18,
align:'center',
@ -393,7 +377,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -403,9 +387,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'批量:'+data.dcPl,
fontSize:18,
align:'center',
@ -418,7 +400,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -428,9 +410,7 @@ export default function (width,height){
y:0,
width:(-width-188)/2,
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'分段:'+data.dcFd,
fontSize:18,
align:'center',
@ -454,7 +434,7 @@ export default function (width,height){
y:0,
width:(_width-188),
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
czbhGroup.add(czbhRect)
@ -464,9 +444,7 @@ export default function (width,height){
y:0,
width:(_width-188),
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'船号:'+data.dcCh,
fontSize:18,
align:'center',
@ -475,14 +453,14 @@ 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,
y:0,
width:128.7,
height:120,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)

@ -2,7 +2,7 @@ import Konva from "konva";
import QRCode from 'qrcode'
export default function (width,height){
const x=width*0.66+40,y=45,_width=width*0.30,_height=height*0.945
const x=width*0.66+40,y=40,_width=width*0.30,_height=height*0.945
const container=function (){
const group=new Konva.Group({
@ -12,16 +12,19 @@ export default function (width,height){
height:_height
})
const rect=new Konva.Rect({
x:0,
y:0,
width:_width,
height:_height,
stroke:'black',
strokeWidth:1,
})
group.add(rect)
const bgObj = new Image();
bgObj.src = require('@/assets/pwan/pgdbg.png');
bgObj.onload = function () {
const shape = new Konva.Image({
x: 0,
y: 0,
width: _width,
height:_height,
image: this,
});
group.add(shape)
shape.zIndex(0)
}
return group
}
@ -29,8 +32,8 @@ export default function (width,height){
// this.layer.destroyChildren();
const group=new Konva.Group({
x:0,
y:0,
x:13,
y:12,
width:_width,
height:_height
})
@ -38,9 +41,8 @@ export default function (width,height){
const rect=new Konva.Rect({
x:0,
y:0,
width:_width,
height:_height,
fill:'white'
width:_width-25,
height:_height-20,
})
group.add(rect)
@ -49,9 +51,7 @@ export default function (width,height){
y:10,
width:_width,
height:35,
lineHeight:1,
stroke:'black',
strokeWidth:1.2,
fill:'#fff',
text:'大连重工大连钢材加工配送有限公司',
align:'center',
fontSize:22,
@ -64,7 +64,7 @@ export default function (width,height){
width:_width,
height:25,
lineHeight:1,
stroke:'black',
fill:'#fff',
strokeWidth:1,
text:'抛丸施工单',
align:'center',
@ -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',
fill:'#fff',
text:`单号:${data.gdh?'PW_'+data.gdh:''}`,
align:'left',
fontSize:12,
})
group.add(dhTitle)
@ -126,9 +126,7 @@ export default function (width,height){
y:1,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'负责人:',
fontSize:18,
verticalAlign:'middle'
@ -149,7 +147,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:180,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -168,7 +166,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(jsRect)
@ -178,9 +176,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'回报',
fontSize:18,
align:'center',
@ -193,7 +189,7 @@ export default function (width,height){
y:30,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -203,9 +199,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:data.jsr,
fontSize:18,
align:'center',
@ -217,7 +211,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -227,10 +221,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jssj,
fill:'#fff',
text:data.pwfkrq,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -254,7 +246,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(jsRect)
@ -264,9 +256,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'接收',
fontSize:18,
align:'center',
@ -279,7 +269,7 @@ export default function (width,height){
y:30,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -289,10 +279,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jsr,
fill:'#fff',
text:data.pwry,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -303,7 +291,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -313,10 +301,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jssj,
fill:'#fff',
text:data.pwpgrq||'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -340,7 +326,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:200,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -359,7 +345,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -369,9 +355,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:data.tzbh,
fontSize:18,
align:'center',
@ -393,7 +377,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -403,9 +387,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'批量:'+data.dcPl,
fontSize:18,
align:'center',
@ -418,7 +400,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -428,9 +410,7 @@ export default function (width,height){
y:0,
width:(-width-188)/2,
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'分段:'+data.dcFd,
fontSize:18,
align:'center',
@ -454,7 +434,7 @@ export default function (width,height){
y:0,
width:(_width-188),
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
czbhGroup.add(czbhRect)
@ -464,9 +444,7 @@ export default function (width,height){
y:0,
width:(_width-188),
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'船号:'+data.dcCh,
fontSize:18,
align:'center',
@ -475,14 +453,14 @@ 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,
y:0,
width:128.7,
height:120,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)

@ -2,7 +2,7 @@ import Konva from "konva";
import QRCode from 'qrcode'
export default function (width,height){
const x=width*0.66+40,y=45,_width=width*0.30,_height=height*0.945
const x=width*0.66+40,y=40,_width=width*0.30,_height=height*0.945
const container=function (){
const group=new Konva.Group({
@ -12,16 +12,19 @@ export default function (width,height){
height:_height
})
const rect=new Konva.Rect({
x:0,
y:0,
width:_width,
height:_height,
stroke:'black',
strokeWidth:1,
})
group.add(rect)
const bgObj = new Image();
bgObj.src = require('@/assets/pwan/pgdbg.png');
bgObj.onload = function () {
const shape = new Konva.Image({
x: 0,
y: 0,
width: _width,
height:_height,
image: this,
});
group.add(shape)
shape.zIndex(0)
}
return group
}
@ -29,8 +32,8 @@ export default function (width,height){
// this.layer.destroyChildren();
const group=new Konva.Group({
x:0,
y:0,
x:13,
y:12,
width:_width,
height:_height
})
@ -38,9 +41,8 @@ export default function (width,height){
const rect=new Konva.Rect({
x:0,
y:0,
width:_width,
height:_height,
fill:'white'
width:_width-25,
height:_height-20,
})
group.add(rect)
@ -49,9 +51,7 @@ export default function (width,height){
y:10,
width:_width,
height:35,
lineHeight:1,
stroke:'black',
strokeWidth:1.2,
fill:'#fff',
text:'大连重工大连钢材加工配送有限公司',
align:'center',
fontSize:22,
@ -64,7 +64,7 @@ export default function (width,height){
width:_width,
height:25,
lineHeight:1,
stroke:'black',
fill:'#fff',
strokeWidth:1,
text:'抛丸施工单',
align:'center',
@ -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',
fill:'#fff',
text:`单号:${data.gdh?'PW_'+data.gdh:''}`,
align:'left',
fontSize:12,
})
group.add(dhTitle)
@ -126,9 +126,7 @@ export default function (width,height){
y:1,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'负责人:',
fontSize:18,
verticalAlign:'middle'
@ -149,7 +147,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:180,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -168,7 +166,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(jsRect)
@ -178,9 +176,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'回报',
fontSize:18,
align:'center',
@ -193,7 +189,7 @@ export default function (width,height){
y:30,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -203,9 +199,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:data.jsr,
fontSize:18,
align:'center',
@ -217,7 +211,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -227,10 +221,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jssj,
fill:'#fff',
text:data.pwfkrq,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -254,7 +246,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(jsRect)
@ -264,9 +256,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'接收',
fontSize:18,
align:'center',
@ -279,7 +269,7 @@ export default function (width,height){
y:30,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -289,10 +279,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jsr,
fill:'#fff',
text:data.pwry,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -303,7 +291,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -313,10 +301,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jssj,
fill:'#fff',
text:data.pwpgrq||'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -340,7 +326,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:200,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -359,7 +345,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -369,9 +355,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:data.tzbh,
fontSize:18,
align:'center',
@ -393,7 +377,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -403,9 +387,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'批量:'+data.dcPl,
fontSize:18,
align:'center',
@ -418,7 +400,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -428,9 +410,7 @@ export default function (width,height){
y:0,
width:(-width-188)/2,
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'分段:'+data.dcFd,
fontSize:18,
align:'center',
@ -454,7 +434,7 @@ export default function (width,height){
y:0,
width:(_width-188),
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
czbhGroup.add(czbhRect)
@ -464,9 +444,7 @@ export default function (width,height){
y:0,
width:(_width-188),
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'船号:'+data.dcCh,
fontSize:18,
align:'center',
@ -475,14 +453,14 @@ 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,
y:0,
width:128.7,
height:120,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)

@ -4,12 +4,12 @@
<script>
import paoWanPgdConfig from './pgdTable'
import {getPgd} from "@/api/zyjh";
export default {
name:'PwanPgd',
data(){
return{
gridOptions:{},
list:{},
}
},
created(){
@ -18,6 +18,11 @@ export default {
this.gridOptions.columns=columns
},
methods:{
initData(worker,zt){
getPgd({user:worker,zt:zt,field:'pwry'}).then(res=>{
this.gridOptions.data=res.data
})
},
cellClick({row}){
this.$emit('initPgd',row)
}

@ -1,4 +1,5 @@
import Konva from "konva";
import {shangLiao} from "@/api/zyjh";
const baifang=function (option={}) {
const width=option.width,height=option.height,slList=option.dw,image=require('@/assets/gb.png')
@ -13,16 +14,19 @@ const baifang=function (option={}) {
height:_height
})
const rect=new Konva.Rect({
x:0,
y:0,
width:_width,
height:_height,
stroke:'black',
strokeWidth:1,
})
group.add(rect)
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,
});
group.add(shape)
shape.zIndex(0)
}
return group
}
@ -30,7 +34,7 @@ const baifang=function (option={}) {
const slGroup=container()
const thatHeight=height
const gangban=function (index,str){
const gangban=function (index,item){
const group=new Konva.Group({
x:0,
y:thatHeight-310-index*40,
@ -48,6 +52,62 @@ const baifang=function (option={}) {
}
})
let _index=0
let touchingFlag=false;
group.on('mousedown touchstart',function (evt){
const layer=evt.currentTarget.parent.parent
console.log(layer)
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-10)
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==='csd'){
const {x,y}=item.absolutePosition()
if (thisX>=x&&thisY>=y){
this.x(41)
this.y(800)
// this.rotate(-90)
this.scaleX(0.5)
console.log(item.children[0])
this.moveTo(item.children[0].children[0])
this.zIndex(1)
}else{
this.remove()
that.visible(true)
}
}
}
//const {x,y}=that.slGroup.absolutePosition()
})
this.visible(false)
}
}
},500)
})
group.on('mouseup touchend',function (){
touchingFlag=false
})
group.on('dragstart',function (){
const {x,y}=this.absolutePosition()
@ -60,7 +120,7 @@ const baifang=function (option={}) {
if(_index===0){
_index=this.getAttr('index')
}
this.zIndex(999)
this.zIndex(7)
const {y:thisY}=this.absolutePosition()
const dir=thisY-this.startPos.y>0?-40:40
@ -140,7 +200,7 @@ const baifang=function (option={}) {
width: imgSize,
height:40,
fill:'black',
text:str+',12*2830*13090',
text:`${item.wph||''},${item.wpgg}`,
align:'center',
verticalAlign:'middle',
})
@ -153,7 +213,7 @@ const baifang=function (option={}) {
width: imgSize-20,
height:40,
fill:'black',
text:'G175K-4,001,2302\n上料:2024/07/01,切割:2024/07/04',
text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`,
align:'center',
verticalAlign:'middle',
})

@ -11,6 +11,21 @@ const container=function (width=0,height=0,container){
stage.add(layer)
layer.draw();
const imageObj = new Image();
const imgSize=width
imageObj.src = require('@/assets/kban/bg.png');
imageObj.onload = function () {
const shape = new Konva.Image({
x: 0,
y: 0,
width: imgSize,
height:this.height,
image: imageObj,
});
layer.add(shape)
shape.zIndex(0)
}
return {
stage,layer
}

@ -4,35 +4,115 @@ import Konva from "konva";
export default function (width,height){
const x=width*0.55+40,y=45,_width=width*0.1,_height=height*0.945
const container=new Konva.Group({
id:'csd',
x:x,
y:y,
width:_width,
height:_height
})
const rect=new Konva.Rect({
// const imageObj = new Image();
const imgSize=_width
// imageObj.src = require('@/assets/pwan/csdbg.png');
// imageObj.onload = function () {
// const shape = new Konva.Image({
// x: 0,
// y: 0,
// width: imgSize,
// height:_height,
// image: imageObj,
// });
// container.add(shape)
// shape.zIndex(0)
// }
const imageObj1 = new Image();
imageObj1.src = require('@/assets/pwan/csd0.png');
imageObj1.onload = function () {
const shape = new Konva.Image({
x: 0,
y: 0,
width: imgSize,
height:_height*0.1,
image: this,
});
container.add(shape)
shape.zIndex(1)
}
const imageObj3 = new Image();
imageObj3.src = require('@/assets/pwan/csd0.png');
imageObj3.onload = function () {
const shape = new Konva.Image({
x: 0,
y: _height-_height*0.1,
width: imgSize,
height:_height*0.1,
image: this,
});
container.add(shape)
shape.zIndex(1)
}
const group=new Konva.Group({
x:0,
y:0,
width:_width,
height:_height,
stroke:'black',
strokeWidth:1,
y:_height*0.1,
width: imgSize,
height:_height-_height*0.1,
})
container.add(group)
group.clipFunc(function(ctx) {
ctx.rect(0, 0, imgSize, _height-_height*0.1);
});
container.add(rect)
const text=new Konva.Text({
x: 0,
y: 0,
width: _width,
height:_height,
fill:'black',
text:'传送带',
align:'center',
verticalAlign:'middle',
})
initCsd()
function initCsd() {
const imageObj2 = new Image();
imageObj2.src = require('@/assets/pwan/csd1.png');
imageObj2.onload = function () {
play(this,imgSize,_height)
}
}
function play(img,imgSize,_height){
const csdGroup=new Konva.Group({
x: 0,
y: 0,
width: imgSize,
height: _height,
image: img,
})
group.add(csdGroup)
const shape = new Konva.Image({
x: 0,
y: 0,
width: imgSize,
height: _height,
image: img,
});
csdGroup.add(shape)
shape.zIndex(0)
container.add(text)
const shape1 = new Konva.Image({
x: 0,
y: _height,
width: imgSize,
height: _height,
image: img,
});
csdGroup.add(shape1)
shape1.zIndex(1)
csdGroup.to({
x: 0,
y: -700,
duration: 20, //持续时间
onFinish() {
csdGroup.remove()
play(img,imgSize,_height)
}
})
}
return container
}

@ -1,7 +1,6 @@
import Konva from "konva";
export default function (width,height,callback){
console.log(callback)
const x=0,y=0,_width=width*0.16,_height=height*0.67
const container=function (){
@ -14,16 +13,19 @@ export default function (width,height,callback){
height:_height
})
const rect=new Konva.Rect({
x:0,
y:0,
width:_width,
height:_height,
stroke:'black',
strokeWidth:1,
})
group.add(rect)
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,
});
group.add(shape)
shape.zIndex(0)
}
return group
}
@ -40,20 +42,23 @@ export default function (width,height,callback){
height:height
})
group.on('click touchstart',function (){
console.log(item)
callback(index,item.list)
})
const rect=new Konva.Rect({
x:0,
y:0,
width:width,
height:height,
stroke:'black',
strokeWidth:1,
})
group.add(rect)
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 text=new Konva.Text({
x:0,
@ -61,10 +66,10 @@ export default function (width,height,callback){
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)

@ -1,36 +1,63 @@
import Konva from "konva";
export default function (width,height){
const _width=width*0.134,_height=height*0.67
const _width=width*0.134,_height=height*0.737
const container=function (){
const x=20,y=300
const group=new Konva.Group({
x:x,
y:y,
x:0,
y:0,
width:_width,
height:_height
height:_height,
draggable:true,
dragBoundFunc:function (pos){
return {
x:x,
y:pos.y
}
},
})
const rect=new Konva.Rect({
x:0,
y:0,
const bgGroup=new Konva.Group({
x:x,
y:y,
width:_width,
height:_height,
stroke:'black',
strokeWidth:1,
})
bgGroup.clipFunc(function(ctx) {
ctx.rect(0, 6, _width, _height-11);
});
bgGroup.add(group)
group.add(rect)
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
return bgGroup
}
let currentWork=null;
let selectedShape=null;
const getCurrentWorker=function (){
return currentWork
}
const person=function (index,persons={}){
const alignSize=2
const width=(_width-20)/alignSize,height=110
const x=index%alignSize*width+index%alignSize*10+5,y=height*(Math.floor(index/alignSize))+(Math.floor(index/alignSize)+1)*10
const width=(_width-5)/alignSize,height=110
const x=index%alignSize*width+index%alignSize+5,y=height*(Math.floor(index/alignSize))+(Math.floor(index/alignSize)+1)*10
const group=new Konva.Group({
x:x,
y:y,
@ -38,19 +65,73 @@ export default function (width,height){
height:height
})
const rect=new Konva.Rect({
x:0,
y:0,
width:width,
height:height,
stroke:'black',
strokeWidth:1,
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.3,
y: 2,
width: width*0.25,
height:height*0.25,
image: this,
visible:false
});
group.add(shape)
shape.zIndex(0)
setSelectShape(shape)
}
group.on('click touchstart',function (){
currentWork=persons
if (selectedShape){
selectedShape.hide()
if (selectedShape===selectShape){
selectedShape=null
return
}
}
selectedShape=selectShape
selectedShape.show()
})
group.add(rect)
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 imageObj = new Image();
imageObj.src = require('@/assets/sliao/headImage.png');
imageObj.onload = function () {
const shape = new Konva.Image({
x: 0,
y: 0,
offsetX:-4,
offsetY:-10,
width: width*0.89,
height:height*0.85,
image: this,
});
group.add(shape)
shape.zIndex(0)
}
const text=new Konva.Text({
x:0,
y:0,
y:62,
width:width,
height:height,
text: persons.userName,

@ -2,7 +2,7 @@ import Konva from "konva";
import QRCode from 'qrcode'
export default function (width,height){
const x=width*0.66+40,y=45,_width=width*0.30,_height=height*0.945
const x=width*0.66+40,y=40,_width=width*0.30,_height=height*0.945
const container=function (){
const group=new Konva.Group({
@ -12,16 +12,19 @@ export default function (width,height){
height:_height
})
const rect=new Konva.Rect({
x:0,
y:0,
width:_width,
height:_height,
stroke:'black',
strokeWidth:1,
})
group.add(rect)
const bgObj = new Image();
bgObj.src = require('@/assets/pwan/pgdbg.png');
bgObj.onload = function () {
const shape = new Konva.Image({
x: 0,
y: 0,
width: _width,
height:_height,
image: this,
});
group.add(shape)
shape.zIndex(0)
}
return group
}
@ -29,8 +32,8 @@ export default function (width,height){
// this.layer.destroyChildren();
const group=new Konva.Group({
x:0,
y:0,
x:13,
y:12,
width:_width,
height:_height
})
@ -38,9 +41,8 @@ export default function (width,height){
const rect=new Konva.Rect({
x:0,
y:0,
width:_width,
height:_height,
fill:'white'
width:_width-25,
height:_height-20,
})
group.add(rect)
@ -49,9 +51,7 @@ export default function (width,height){
y:10,
width:_width,
height:35,
lineHeight:1,
stroke:'black',
strokeWidth:1.2,
fill:'#fff',
text:'大连重工大连钢材加工配送有限公司',
align:'center',
fontSize:22,
@ -64,7 +64,7 @@ export default function (width,height){
width:_width,
height:25,
lineHeight:1,
stroke:'black',
fill:'#fff',
strokeWidth:1,
text:'抛丸施工单',
align:'center',
@ -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',
fill:'#fff',
text:`单号:${data.gdh?'PW_'+data.gdh:''}`,
align:'left',
fontSize:12,
})
group.add(dhTitle)
@ -126,9 +126,7 @@ export default function (width,height){
y:1,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'负责人:',
fontSize:18,
verticalAlign:'middle'
@ -149,7 +147,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:180,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -168,7 +166,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(jsRect)
@ -178,9 +176,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'回报',
fontSize:18,
align:'center',
@ -193,7 +189,7 @@ export default function (width,height){
y:30,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -203,9 +199,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:data.jsr,
fontSize:18,
align:'center',
@ -217,7 +211,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -227,10 +221,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jssj,
fill:'#fff',
text:data.pwfkrq,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -254,7 +246,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(jsRect)
@ -264,9 +256,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'接收',
fontSize:18,
align:'center',
@ -279,7 +269,7 @@ export default function (width,height){
y:30,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -289,10 +279,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jsr,
fill:'#fff',
text:data.pwry,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -303,7 +291,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -313,10 +301,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jssj,
fill:'#fff',
text:data.pwpgrq||'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -340,7 +326,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:200,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -359,7 +345,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -369,9 +355,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:data.tzbh,
fontSize:18,
align:'center',
@ -393,7 +377,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -403,9 +387,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'批量:'+data.dcPl,
fontSize:18,
align:'center',
@ -418,7 +400,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -428,9 +410,7 @@ export default function (width,height){
y:0,
width:(-width-188)/2,
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'分段:'+data.dcFd,
fontSize:18,
align:'center',
@ -454,7 +434,7 @@ export default function (width,height){
y:0,
width:(_width-188),
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
czbhGroup.add(czbhRect)
@ -464,9 +444,7 @@ export default function (width,height){
y:0,
width:(_width-188),
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'船号:'+data.dcCh,
fontSize:18,
align:'center',
@ -475,14 +453,14 @@ 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,
y:0,
width:128.7,
height:120,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)

@ -1,18 +1,40 @@
import Konva from "konva";
const title=function (width,height,title) {
return new Konva.Text({
const group=new Konva.Group({
x: 0,
y: 0,
width: width,
height: 20,
})
const imageObj = new Image();
imageObj.src = require('@/assets/kban/logo.png');
imageObj.onload = function () {
const shape = new Konva.Image({
x: 0,
y: 0,
width: width*0.86,
height:41,
image: imageObj,
});
group.add(shape)
}
const text=new Konva.Text({
x: 0,
y: 8,
width: width,
height: 20,
lineHeight: 1,
stroke: 'blue',
strokeWidth: 2,
text: title,
align: 'center',
fill:'#fff',
fontSize: 32,
fontStyle:'bold'
})
group.add(text)
return group
}
export default title

@ -38,6 +38,9 @@ export default {
mounted() {
this.initKonvaStage();
},
created(){
window.addEventListener('resize', this.initKonvaStage)
},
methods:{
initPgd(pgd={}){
const group=this.drawGd(pgd)
@ -81,11 +84,10 @@ export default {
const worker=person(i,item)
worker.on('click touchstart',function (){
that.currentWorker=item
getPgd({field:'pwry',jhrqField:'pwjhrq',user:that.currentWorker.userCode}).then(res=>[
that.pgd=res.data
])
that.$refs.pwpgd.initData(that.currentWorker.userCode,'31')
})
group.add(worker)
worker.zIndex(1)
}
})
},

@ -4,7 +4,7 @@ export default function (width,height){
const x=0,y=0,_width=width*0.16,_height=height*0.945
const container=function (){
const x=width*0.5+30,y=45
const x=width*0.5+30,y=40
const group=new Konva.Group({
x:x,
@ -13,16 +13,19 @@ export default function (width,height){
height:_height
})
const rect=new Konva.Rect({
x:0,
y:0,
width:_width,
height:_height,
stroke:'black',
strokeWidth:1,
})
group.add(rect)
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,
});
group.add(shape)
shape.zIndex(0)
}
return group
}
@ -39,16 +42,20 @@ export default function (width,height){
height:height
})
const rect=new Konva.Rect({
x:0,
y:0,
width:width,
height:height,
stroke:'black',
strokeWidth:1,
})
group.add(rect)
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 text=new Konva.Text({
x:0,

@ -102,6 +102,7 @@ export default function (width,height){
if (selectedShape){
selectedShape.hide()
if (selectedShape===selectShape){
selectedShape=null
return
}
}

@ -2,7 +2,7 @@ import Konva from "konva";
import QRCode from 'qrcode'
export default function (width,height){
const x=width*0.66+40,y=45,_width=width*0.30,_height=height*0.945
const x=width*0.66+40,y=40,_width=width*0.30,_height=height*0.945
const container=function (){
const group=new Konva.Group({
@ -12,16 +12,19 @@ export default function (width,height){
height:_height
})
const rect=new Konva.Rect({
x:0,
y:0,
width:_width,
height:_height,
stroke:'black',
strokeWidth:1,
})
group.add(rect)
const bgObj = new Image();
bgObj.src = require('@/assets/pwan/pgdbg.png');
bgObj.onload = function () {
const shape = new Konva.Image({
x: 0,
y: 0,
width: _width,
height:_height,
image: this,
});
group.add(shape)
shape.zIndex(0)
}
return group
}
@ -29,8 +32,8 @@ export default function (width,height){
// this.layer.destroyChildren();
const group=new Konva.Group({
x:0,
y:0,
x:13,
y:12,
width:_width,
height:_height
})
@ -38,9 +41,8 @@ export default function (width,height){
const rect=new Konva.Rect({
x:0,
y:0,
width:_width,
height:_height,
fill:'white'
width:_width-25,
height:_height-20,
})
group.add(rect)
@ -49,9 +51,7 @@ export default function (width,height){
y:10,
width:_width,
height:35,
lineHeight:1,
stroke:'black',
strokeWidth:1.2,
fill:'#fff',
text:'大连重工大连钢材加工配送有限公司',
align:'center',
fontSize:22,
@ -64,7 +64,7 @@ export default function (width,height){
width:_width,
height:25,
lineHeight:1,
stroke:'black',
fill:'#fff',
strokeWidth:1,
text:'抛丸施工单',
align:'center',
@ -77,7 +77,7 @@ export default function (width,height){
y:50,
width:_width-48,
height:15,
lineHeight:1,
fill:'#fff',
text:`单号:${data.gdh?'PW_'+data.gdh:''}`,
align:'left',
fontSize:12,
@ -126,9 +126,7 @@ export default function (width,height){
y:1,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'负责人:',
fontSize:18,
verticalAlign:'middle'
@ -149,7 +147,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:180,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -168,7 +166,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(jsRect)
@ -178,9 +176,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'回报',
fontSize:18,
align:'center',
@ -193,7 +189,7 @@ export default function (width,height){
y:30,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -203,9 +199,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:data.jsr,
fontSize:18,
align:'center',
@ -217,7 +211,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -227,9 +221,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:data.pwfkrq,
fontSize:18,
align:'center',
@ -254,7 +246,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(jsRect)
@ -264,9 +256,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'接收',
fontSize:18,
align:'center',
@ -279,7 +269,7 @@ export default function (width,height){
y:30,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -289,10 +279,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.jsr,
fill:'#fff',
text:data.pwry,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -303,7 +291,7 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -313,10 +301,8 @@ export default function (width,height){
y:30,
width:(_width-60)/2,
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
text:data.pwpgrq,
fill:'#fff',
text:data.pwpgrq||'',
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -340,7 +326,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:200,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -359,7 +345,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(rect)
@ -369,9 +355,7 @@ export default function (width,height){
y:0,
width:(_width-60),
height:30,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:data.tzbh,
fontSize:18,
align:'center',
@ -393,7 +377,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(plRect)
@ -403,9 +387,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'批量:'+data.dcPl,
fontSize:18,
align:'center',
@ -418,7 +400,7 @@ export default function (width,height){
y:0,
width:(_width-188)/2,
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
group.add(fdRect)
@ -428,9 +410,7 @@ export default function (width,height){
y:0,
width:(-width-188)/2,
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'分段:'+data.dcFd,
fontSize:18,
align:'center',
@ -454,7 +434,7 @@ export default function (width,height){
y:0,
width:(_width-188),
height:60,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
czbhGroup.add(czbhRect)
@ -464,9 +444,7 @@ export default function (width,height){
y:0,
width:(_width-188),
height:60,
lineHeight:1,
stroke:'black',
strokeWidth:0.8,
fill:'#fff',
text:'船号:'+data.dcCh,
fontSize:18,
align:'center',
@ -482,10 +460,9 @@ export default function (width,height){
y:0,
width:128.7,
height:120,
stroke:'black',
stroke:'#4991E5',
strokeWidth:1,
})
console.log(text)
group.add(rect)
QRCode.toDataURL(text,{width:600,height:600,margin:1})
.then(url => {

@ -1,7 +1,7 @@
export default function () {
const options={
height:685,
height:706,
align:'center',
border: true,
resizable: true,

@ -74,7 +74,7 @@ export default {
const group=container()
group.on('click touchstart',function (){
that.currentWorker=person
getPgd({field:'',jhrqField:'',user:that.currentWorker.userCode}).then(res=>[
getPgd({user:that.currentWorker.userCode,zt:'6'}).then(res=>[
that.pgd=res.data
])
})

@ -96,6 +96,7 @@ const workers=function (width,height,persons) {
if (selectedShape){
selectedShape.hide()
if (selectedShape===selectShape){
selectedShape=null
return
}
}

@ -338,7 +338,6 @@ export default {
}
_sljhGroup.draggable(true)
})
}
}
},500)

Loading…
Cancel
Save