1.完善抛丸反馈

master
董哲奇 10 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-container style="padding-top: 0px">
<el-main> <el-main>
<el-tabs v-model="activeName" @tab-click="handleClick"> <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" > <div class="mytable" >
<el-button type="success" @click="paichan"></el-button> <el-button type="success" @click="paichan"></el-button>
<el-button type="success" @click="jgcx(false)"></el-button> <el-button type="success" @click="jgcx(false)"></el-button>
@ -59,7 +59,7 @@
</vxe-grid> </vxe-grid>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="前方三月需求计划" name="first"> <el-tab-pane label="月度计划编制" name="first">
<div class="mytable"> <div class="mytable">
<el-button type="success" @click="confirmModal"></el-button> <el-button type="success" @click="confirmModal"></el-button>
<el-button type="success" @click="creatYdjh"></el-button> <el-button type="success" @click="creatYdjh"></el-button>

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

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

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

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

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

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

@ -1,4 +1,5 @@
import Konva from "konva"; import Konva from "konva";
import {shangLiao} from "@/api/zyjh";
const baifang=function (option={}) { const baifang=function (option={}) {
const width=option.width,height=option.height,slList=option.dw,image=require('@/assets/gb.png') 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 height:_height
}) })
const rect=new Konva.Rect({ const imageObj = new Image();
x:0, imageObj.src = require('@/assets/sliao/personbg.png');
y:0, imageObj.onload = function () {
width:_width, const shape = new Konva.Image({
height:_height, x: 0,
stroke:'black', y: 0,
strokeWidth:1, width: _width,
}) height:_height,
image: this,
group.add(rect) });
group.add(shape)
shape.zIndex(0)
}
return group return group
} }
@ -30,7 +34,7 @@ const baifang=function (option={}) {
const slGroup=container() const slGroup=container()
const thatHeight=height const thatHeight=height
const gangban=function (index,str){ const gangban=function (index,item){
const group=new Konva.Group({ const group=new Konva.Group({
x:0, x:0,
y:thatHeight-310-index*40, y:thatHeight-310-index*40,
@ -48,6 +52,62 @@ const baifang=function (option={}) {
} }
}) })
let _index=0 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 (){ group.on('dragstart',function (){
const {x,y}=this.absolutePosition() const {x,y}=this.absolutePosition()
@ -60,7 +120,7 @@ const baifang=function (option={}) {
if(_index===0){ if(_index===0){
_index=this.getAttr('index') _index=this.getAttr('index')
} }
this.zIndex(999) this.zIndex(7)
const {y:thisY}=this.absolutePosition() const {y:thisY}=this.absolutePosition()
const dir=thisY-this.startPos.y>0?-40:40 const dir=thisY-this.startPos.y>0?-40:40
@ -140,7 +200,7 @@ const baifang=function (option={}) {
width: imgSize, width: imgSize,
height:40, height:40,
fill:'black', fill:'black',
text:str+',12*2830*13090', text:`${item.wph||''},${item.wpgg}`,
align:'center', align:'center',
verticalAlign:'middle', verticalAlign:'middle',
}) })
@ -153,7 +213,7 @@ const baifang=function (option={}) {
width: imgSize-20, width: imgSize-20,
height:40, height:40,
fill:'black', 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', align:'center',
verticalAlign:'middle', verticalAlign:'middle',
}) })

@ -11,6 +11,21 @@ const container=function (width=0,height=0,container){
stage.add(layer) stage.add(layer)
layer.draw(); 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 { return {
stage,layer stage,layer
} }

@ -4,35 +4,115 @@ import Konva from "konva";
export default function (width,height){ export default function (width,height){
const x=width*0.55+40,y=45,_width=width*0.1,_height=height*0.945 const x=width*0.55+40,y=45,_width=width*0.1,_height=height*0.945
const container=new Konva.Group({ const container=new Konva.Group({
id:'csd',
x:x, x:x,
y:y, y:y,
width:_width, width:_width,
height:_height 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, x:0,
y:0, y:_height*0.1,
width:_width, width: imgSize,
height:_height, height:_height-_height*0.1,
stroke:'black',
strokeWidth:1,
}) })
container.add(group)
group.clipFunc(function(ctx) {
ctx.rect(0, 0, imgSize, _height-_height*0.1);
});
container.add(rect) initCsd()
const text=new Konva.Text({ function initCsd() {
x: 0, const imageObj2 = new Image();
y: 0, imageObj2.src = require('@/assets/pwan/csd1.png');
width: _width, imageObj2.onload = function () {
height:_height, play(this,imgSize,_height)
fill:'black', }
text:'传送带', }
align:'center',
verticalAlign:'middle', 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 return container
} }

@ -1,7 +1,6 @@
import Konva from "konva"; import Konva from "konva";
export default function (width,height,callback){ export default function (width,height,callback){
console.log(callback)
const x=0,y=0,_width=width*0.16,_height=height*0.67 const x=0,y=0,_width=width*0.16,_height=height*0.67
const container=function (){ const container=function (){
@ -14,16 +13,19 @@ export default function (width,height,callback){
height:_height height:_height
}) })
const rect=new Konva.Rect({ const imageObj = new Image();
x:0, imageObj.src = require('@/assets/sliao/personbg.png');
y:0, imageObj.onload = function () {
width:_width, const shape = new Konva.Image({
height:_height, x: 0,
stroke:'black', y: 0,
strokeWidth:1, width: _width,
}) height:_height,
image: this,
group.add(rect) });
group.add(shape)
shape.zIndex(0)
}
return group return group
} }
@ -40,20 +42,23 @@ export default function (width,height,callback){
height:height height:height
}) })
group.on('click touchstart',function (){ group.on('click touchstart',function (){
console.log(item)
callback(index,item.list) callback(index,item.list)
}) })
const rect=new Konva.Rect({ const bgObj = new Image();
x:0, bgObj.src = require('@/assets/sliao/personbg1.png');
y:0, bgObj.onload = function () {
width:width, const shape = new Konva.Image({
height:height, x: 0,
stroke:'black', y: 0,
strokeWidth:1, offsetX:4,
}) width: width,
height:height,
group.add(rect) image: this,
});
group.add(shape)
shape.zIndex(0)
}
const text=new Konva.Text({ const text=new Konva.Text({
x:0, x:0,
@ -61,10 +66,10 @@ export default function (width,height,callback){
width: width, width: width,
height: height, height: height,
fill:'black', fill:'black',
text:item.name, text:`${item.name}\n${item.list.length}`,
align:'center', align:'center',
verticalAlign:'middle', verticalAlign:'middle',
fontSize:20 fontSize:18
}) })
group.add(text) group.add(text)

@ -1,36 +1,63 @@
import Konva from "konva"; import Konva from "konva";
export default function (width,height){ 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 container=function (){
const x=20,y=300 const x=20,y=300
const group=new Konva.Group({ const group=new Konva.Group({
x:x, x:0,
y:y, y:0,
width:_width, width:_width,
height:_height height:_height,
draggable:true,
dragBoundFunc:function (pos){
return {
x:x,
y:pos.y
}
},
}) })
const rect=new Konva.Rect({ const bgGroup=new Konva.Group({
x:0, x:x,
y:0, y:y,
width:_width, width:_width,
height:_height, 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 person=function (index,persons={}){
const alignSize=2 const alignSize=2
const width=(_width-20)/alignSize,height=110 const width=(_width-5)/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 x=index%alignSize*width+index%alignSize+5,y=height*(Math.floor(index/alignSize))+(Math.floor(index/alignSize)+1)*10
const group=new Konva.Group({ const group=new Konva.Group({
x:x, x:x,
y:y, y:y,
@ -38,19 +65,73 @@ export default function (width,height){
height:height height:height
}) })
const rect=new Konva.Rect({ const selectObj = new Image();
x:0, selectObj.src = require('@/assets/sliao/selected.png');
y:0, let selectShape=null
width:width, const setSelectShape=function (shape){
height:height, selectShape=shape
stroke:'black', }
strokeWidth:1, 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({ const text=new Konva.Text({
x:0, x:0,
y:0, y:62,
width:width, width:width,
height:height, height:height,
text: persons.userName, text: persons.userName,

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

@ -1,18 +1,40 @@
import Konva from "konva"; import Konva from "konva";
const title=function (width,height,title) { 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, x: 0,
y: 8, y: 8,
width: width, width: width,
height: 20, height: 20,
lineHeight: 1,
stroke: 'blue',
strokeWidth: 2,
text: title, text: title,
align: 'center', align: 'center',
fill:'#fff',
fontSize: 32, fontSize: 32,
fontStyle:'bold'
}) })
group.add(text)
return group
} }
export default title export default title

@ -38,6 +38,9 @@ export default {
mounted() { mounted() {
this.initKonvaStage(); this.initKonvaStage();
}, },
created(){
window.addEventListener('resize', this.initKonvaStage)
},
methods:{ methods:{
initPgd(pgd={}){ initPgd(pgd={}){
const group=this.drawGd(pgd) const group=this.drawGd(pgd)
@ -81,11 +84,10 @@ export default {
const worker=person(i,item) const worker=person(i,item)
worker.on('click touchstart',function (){ worker.on('click touchstart',function (){
that.currentWorker=item that.currentWorker=item
getPgd({field:'pwry',jhrqField:'pwjhrq',user:that.currentWorker.userCode}).then(res=>[ that.$refs.pwpgd.initData(that.currentWorker.userCode,'31')
that.pgd=res.data
])
}) })
group.add(worker) 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 x=0,y=0,_width=width*0.16,_height=height*0.945
const container=function (){ const container=function (){
const x=width*0.5+30,y=45 const x=width*0.5+30,y=40
const group=new Konva.Group({ const group=new Konva.Group({
x:x, x:x,
@ -13,16 +13,19 @@ export default function (width,height){
height:_height height:_height
}) })
const rect=new Konva.Rect({ const imageObj = new Image();
x:0, imageObj.src = require('@/assets/sliao/personbg.png');
y:0, imageObj.onload = function () {
width:_width, const shape = new Konva.Image({
height:_height, x: 0,
stroke:'black', y: 0,
strokeWidth:1, width: _width,
}) height:_height,
image: this,
group.add(rect) });
group.add(shape)
shape.zIndex(0)
}
return group return group
} }
@ -39,16 +42,20 @@ export default function (width,height){
height:height height:height
}) })
const rect=new Konva.Rect({ const bgObj = new Image();
x:0, bgObj.src = require('@/assets/sliao/personbg1.png');
y:0, bgObj.onload = function () {
width:width, const shape = new Konva.Image({
height:height, x: 0,
stroke:'black', y: 0,
strokeWidth:1, offsetX:4,
}) width: width,
height:height,
group.add(rect) image: this,
});
group.add(shape)
shape.zIndex(0)
}
const text=new Konva.Text({ const text=new Konva.Text({
x:0, x:0,

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

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

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

@ -74,7 +74,7 @@ export default {
const group=container() const group=container()
group.on('click touchstart',function (){ group.on('click touchstart',function (){
that.currentWorker=person 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 that.pgd=res.data
]) ])
}) })

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

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

Loading…
Cancel
Save