1.看板数据修正

2.增加环境变量配置
master
董哲奇 7 months ago
parent e8505f4a66
commit 5e3d47e776

@ -54,6 +54,7 @@
"svg-baker-runtime": "^1.4.7",
"vue": "2.6.10",
"vue-count-to": "1.0.13",
"vue-pdf": "^4.3.0",
"vue-print-nb": "^1.7.5",
"vue-router": "3.0.2",
"vue-socket.io": "^3.0.10",

@ -104,6 +104,9 @@ dependencies:
vue-count-to:
specifier: 1.0.13
version: 1.0.13
vue-pdf:
specifier: ^4.3.0
version: 4.3.0(webpack@4.46.0)
vue-print-nb:
specifier: ^1.7.5
version: 1.7.5
@ -1956,7 +1959,6 @@ packages:
/@types/json-schema@7.0.12:
resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==}
dev: true
/@types/minimatch@5.1.2:
resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==}
@ -3307,6 +3309,10 @@ packages:
- supports-color
dev: true
/babel-plugin-syntax-dynamic-import@6.18.0:
resolution: {integrity: sha512-MioUE+LfjCEz65Wf7Z/Rm4XCP5k2c+TbMd2Z2JKc7U9uwjBhAfNPE48KC4GTGKhppMeYVepwDBNO/nGY6NYHBA==}
dev: false
/babel-plugin-syntax-object-rest-spread@6.13.0:
resolution: {integrity: sha512-C4Aq+GaAj83pRQ0EFgTvw5YO6T3Qz2KGrNRwIj9mSoNHVvdZY4KO2uA6HNtNXCw993iSZnckY1aLW8nOi8i4+w==}
dev: true
@ -8519,7 +8525,6 @@ packages:
resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
engines: {node: '>=6'}
hasBin: true
dev: true
/jsonfile@4.0.0:
resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==}
@ -8833,7 +8838,6 @@ packages:
big.js: 5.2.2
emojis-list: 3.0.0
json5: 2.2.3
dev: true
/locate-path@2.0.0:
resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==}
@ -10253,6 +10257,10 @@ packages:
worker-loader: 2.0.0(webpack@4.46.0)
dev: false
/pdfjs-dist@2.6.347:
resolution: {integrity: sha512-QC+h7hG2su9v/nU1wEI3SnpPIrqJODL7GTDFvR74ANKGq1AFJW16PH8VWnhpiTi9YcLSFV9xLeWSgq+ckHLdVQ==}
dev: false
/performance-now@2.1.0:
resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==}
requiresBuild: true
@ -11042,6 +11050,17 @@ packages:
resolution: {integrity: sha512-sf7oGoLuaYAScB4VGr0tzetsYlS8EJH6qnTCfQ/WVEa89hALQ4RQfCKt5xCyPQKPDUbVUAIP1QsxAwfAjlDp7Q==}
dev: false
/raw-loader@4.0.2(webpack@4.46.0):
resolution: {integrity: sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==}
engines: {node: '>= 10.13.0'}
peerDependencies:
webpack: ^4.0.0 || ^5.0.0
dependencies:
loader-utils: 2.0.4
schema-utils: 3.3.0
webpack: 4.46.0
dev: false
/react-is@16.13.1:
resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==}
dev: true
@ -11586,6 +11605,15 @@ packages:
ajv-keywords: 3.5.2(ajv@6.12.6)
dev: true
/schema-utils@3.3.0:
resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==}
engines: {node: '>= 10.13.0'}
dependencies:
'@types/json-schema': 7.0.12
ajv: 6.12.6
ajv-keywords: 3.5.2(ajv@6.12.6)
dev: false
/screenfull@4.2.0:
resolution: {integrity: sha512-qpyI9XbwuMJElWRP5vTgxkFAl4k7HpyhIqBFOZEwX9QBXn0MAuRSpn7LOc6/4CeSwoz61oBu1VPV+2fbIWC+5Q==}
engines: {node: '>=0.10.0'}
@ -13304,12 +13332,29 @@ packages:
- whiskers
dev: true
/vue-pdf@4.3.0(webpack@4.46.0):
resolution: {integrity: sha512-zd3lJj6CbtrawgaaDDciTDjkJMUKiLWtbEmBg5CvFn9Noe9oAO/GNy/fc5c59qGuFCJ14ibIV1baw4S07e5bSQ==}
dependencies:
babel-plugin-syntax-dynamic-import: 6.18.0
loader-utils: 1.4.2
pdfjs-dist: 2.6.347
raw-loader: 4.0.2(webpack@4.46.0)
vue-resize-sensor: 2.0.0
worker-loader: 2.0.0(webpack@4.46.0)
transitivePeerDependencies:
- webpack
dev: false
/vue-print-nb@1.7.5:
resolution: {integrity: sha512-iNbNyUVRWz0Ha1UTiCKxMPtHLUDGgNI8e8xmD3xqm9RlXIUeX9bT7DgNAfY8vPzqyFRHqGjxLI1rycKH366ziQ==}
dependencies:
vue: 2.7.14
dev: false
/vue-resize-sensor@2.0.0:
resolution: {integrity: sha512-W+y2EAI/BxS4Vlcca9scQv8ifeBFck56DRtSwWJ2H4Cw1GLNUYxiZxUHHkuzuI5JPW/cYtL1bPO5xPyEXx4LmQ==}
dev: false
/vue-router@3.0.2(vue@2.6.10):
resolution: {integrity: sha512-opKtsxjp9eOcFWdp6xLQPLmRGgfM932Tl56U9chYTnoWqKxQ8M20N7AkdEbM5beUh6wICoFGYugAX9vQjyJLFg==}
peerDependencies:

@ -1,5 +1,14 @@
import request from '@/utils/request'
export function pdfList(params) {
return request({
url: "/kban/pdfList",
method: "get",
params,
});
}
export const getYdjhByZtOrForeman=function(data){
return request({
url: '/zyjh/getYdjhByZtOrForeman',

@ -5,7 +5,7 @@
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {bgControl, getDw, getPgd, getPgd2, getYdjhByZt, pgWithForeman, zx} from "@/api/zyjh";
import {bgControl, getDw, getPgd, getPgd2, getYdjhByZt, pdfList, pgWithForeman, zx} from "@/api/zyjh";
export default {
name:'HxianPgd',
@ -34,24 +34,15 @@ export default {
}
//
const djhWhLengh=3
const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
const tmpList=this.list.filter(item=>item.plxh===data.msg.orderNumber||item.plxh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList
this.$message.warning('短号有重复,请使用工单号重新派工!!!')
this.$message.warning('短号有重复,请使用完整工单号重新派工!!!')
return
}
for (const item of this.list) {
if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const worker=this.$props.worker()
if (!worker){
this.$message.warning('请选择施工人员后再次派工!!!')
return
}
const tmpArr=[{
id:item.id,
hxry:worker.userCode
}]
this.paigong0(tmpArr)
if (item.plxh===data.msg.orderNumber||item.plxh.slice(-djhWhLengh)===data.msg.orderNumber){
this.paigong0(item)
break
}
}
@ -117,14 +108,20 @@ export default {
this.paigong(worker)
}
},
paigong0(arr){
paigong0(item){
if (!this.privateCheck()){
return
}
const worker=this.$props.worker()
const data={
type:this.type,
field:'hxpgrq',
foremanId:worker.userCode,
dcCh:item.dcCh,
dcPl:item.dcPl,
zxZtName:'HXPG',
list:arr
zt:'42'
}
zx(data).then(resp=>{
const tmpArr=[data]
pgWithForeman(tmpArr).then(()=>{
this.initData()
})
},
@ -134,7 +131,7 @@ export default {
for (const item of list) {
const data={
id:item.id,
foremanId:worker.userCode,//
foremanId:worker.userCode,
dcCh:item.dcCh,
dcPl:item.dcPl,
zxZtName:'HXPG',
@ -155,7 +152,20 @@ export default {
})
},
cellClick({row}){
this.$emit('initPgd',row)
// this.$emit('initPgd',row)
pdfList({
dcCh: row.dcCh,
dcPl: row.dcPl,
}).then((res) => {
this.pdfDataList = res.data;
for (const item of this.pdfDataList) {
if (item.indexOf('套料图')>-1){
const url=`${process.env.VUE_APP_BASE_API}/upload/${row.dcCh}/${row.dcPl}/PDF/${item}.pdf`;
this.$emit('loadPdf',url)
return;
}
}
});
}
}
}

@ -48,6 +48,7 @@ export default function () {
// { field: 'djh',title:'派工单号', width: 120},
// {field: 'slycldw', title: '垛位', width: 60,formatter: dwFormat},
// {field: 'slyclcs', title: '层数', width: 60},
{field: 'plxh', title: '工单号', },
{field: 'dcCh', title: '船号'},
{field: 'dcPl', title: '批量', },
{field: 'total', title: '总数量', },

@ -1,8 +1,11 @@
<template>
<div class="container">
<div id="pwpg" class="pwpg" ref="pwpg"></div>
<HxianPgd id="pwpgd" ref="pwpgd" @initPgd="initPgd" :worker="getWorker" :workers="workers" />
<HxianPgd id="pwpgd" ref="pwpgd" @loadPdf="loadPdf" @initPgd="initPgd" :worker="getWorker" :workers="workers" />
<ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers"/>
<div id="pdf" class="pdf" :style="{height:height,overflowY:'auto'}" v-if="pdfShow">
<pdf ref="pdfRef" v-for="i in numPages" :key="i" :page="i" :src="pdfUrl" />
</div>
<TipsComp />
<Drawer ref="drawer"/>
</div>
@ -14,16 +17,16 @@ import drawTitle from './comps/title'
import workers from "./comps/person";
import drawDw from './comps/dw'
import drawPgd from './comps/pgd'
import {getBzryList} from "@/api/sjzx/bzzGL";
import {getForeman, getYcldw} from "@/api/zyjh";
import HxianPgd from "@/views/zyjhzx/hxianpgong/comps/HxianPgd.vue";
import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue";
import TipsComp from "@/views/zyjhzx/components/TipsComp.vue";
import Drawer from "@/views/zyjhzx/components/Drawer.vue";
import pdf from "vue-pdf";
export default {
name:'HxianPGong',
components: {Drawer, TipsComp, ZyjhSelectComp, HxianPgd},
components: {Drawer, TipsComp, ZyjhSelectComp, HxianPgd,pdf},
data(){
return {
title:'划 线 作 业 派 工',
@ -39,6 +42,9 @@ export default {
zyq:null,
deviceId:null,
person:null,
pdfShow:false,
pdfUrl:null,
numPages:null,
}
},
mounted() {
@ -53,6 +59,16 @@ export default {
},
sockets:{},
methods:{
loadPdf(url){
if (this.pdfShow){
this.pdfShow=false
}
this.pdfUrl=pdf.createLoadingTask(url)
this.pdfUrl.promise.then((pdf) => {
this.numPages = pdf.numPages;
this.pdfShow=true
});
},
wsSubscribe(){
// this.sockets.subscribe('zyjhzx', data => {
// const currentWorker=this.getCurrentWorker()
@ -155,6 +171,16 @@ export default {
</script>
<style>
#pdf {
width:28.8%;
height: 93.5vh;
position: absolute;
top:50px;
right:2.5%;
border: none;
margin: 0;
}
#selectComp {
width:50%;
height: auto;

@ -5,7 +5,7 @@
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {bgControl, getDw, getForeman, getPgd, getPgd2, getYdjhByZt, pgWithForeman, zx} from "@/api/zyjh";
import {bgControl, getDw, getForeman, getPgd, getPgd2, getYdjhByZt, pdfList, pgWithForeman, zx} from "@/api/zyjh";
export default {
name:'PwanPgd',
@ -44,6 +44,27 @@ export default {
this.gridOptions.ycldw=res.data
})
},
sockets:{
zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始派工'){
return
}
//
const djhWhLengh=3
const tmpList=this.list.filter(item=>item.plxh===data.msg.orderNumber||item.plxh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList
this.$message.warning('短号有重复,请使用完整工单号重新派工!!!')
return
}
for (const item of this.list) {
if (item.plxh===data.msg.orderNumber||item.plxh.slice(-djhWhLengh)===data.msg.orderNumber){
this.paigong0(item)
break
}
}
}
},
methods:{
initData(){
bgControl({}).then(res=>{
@ -106,8 +127,7 @@ export default {
const tmpArr=[]
for (const item of list) {
const data={
id:item.id,
foremanId:worker.userCode,//
foremanId:worker.userCode,
dcCh:item.dcCh,
dcPl:item.dcPl,
zxZtName:'PWPG',
@ -121,23 +141,38 @@ export default {
})
})
},
paigong0(arr){
paigong0(item){
if (!this.privateCheck()){
return
}
const worker=this.$props.worker()
const data={
type:this.type,
field:'pwpgrq',
foremanId:worker.userCode,
dcCh:item.dcCh,
dcPl:item.dcPl,
zxZtName:'PWPG',
list:arr
zt:'21'
}
zx(data).then(resp=>{
const tmpArr=[data]
pgWithForeman(tmpArr).then(()=>{
this.initData()
})
},
cellClick({row}){
// this.$emit('initPgd',row)
const url=`http://127.0.0.1:9080/upload/T110K-4/046/PDF/5203HC102HN%E7%AC%AC046%E6%89%B9%E9%87%8F5203%E5%88%86%E6%AE%B5%E9%85%8D%E5%A5%97%E8%A1%A82023-05-11.pdf`;
// const url=`http://127.0.0.1:9080/upload/${row.dcCh}/${row.dcPl}/PDF/5203HC102HN%E7%AC%AC046%E6%89%B9%E9%87%8F5203%E5%88%86%E6%AE%B5%E9%85%8D%E5%A5%97%E8%A1%A82023-05-11.pdf`;
this.$emit('loadPdf',url)
pdfList({
dcCh: row.dcCh,
dcPl: row.dcPl,
}).then((res) => {
this.pdfDataList = res.data;
for (const item of this.pdfDataList) {
if (item.indexOf('套料图')>-1){
const url=`${process.env.VUE_APP_BASE_API}/upload/${row.dcCh}/${row.dcPl}/PDF/${item}.pdf`;
this.$emit('loadPdf',url)
return;
}
}
});
}
}
}

@ -51,6 +51,7 @@ export default function () {
// { field: 'djh',title:'派工单号', width: 120},
// {field: 'slycldw', title: '垛位', width: 60,formatter: dwFormat},
// {field: 'slyclcs', title: '层数', width: 60},
{field: 'plxh', title: '工单号', },
{field: 'dcCh', title: '船号'},
{field: 'dcPl', title: '批量', },
{field: 'total', title: '总数量', },

@ -3,28 +3,31 @@
<div id="pwpg" class="pwpg" ref="pwpg"></div>
<PWanPgd id="pwpgd" ref="pwpgd" @loadPdf="loadPdf" @initPgd="initPgd" :height="height" :worker="getWorker" :workers="workers"/>
<ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers"/>
<div id="pdf" class="pdf" :style="{height:height,overflowY:'auto'}" v-if="pdfShow">
<pdf v-for="i in numPages" :key="i" :page="i" :src="pdfUrl" />
</div>
<TipsComp />
<Drawer ref="drawer"/>
</div>
</template>
<script>
import * as pdfjsLib from 'pdfjs-dist';
// import * as pdfjsLib from 'pdfjs-dist';
import PWanPgd from "@/views/zyjhzx/pwanpgong/comps/PwanPgd.vue";
import container from "./comps/container";
import drawTitle from './comps/title'
import workers from "./comps/person";
import drawDw from './comps/dw'
import drawPgd from './comps/pgd'
import {getBzryList} from "@/api/sjzx/bzzGL";
import {dict, getForeman, getYcldw, shangLiao} from "@/api/zyjh";
import {getForeman, getYcldw} from "@/api/zyjh";
import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue";
import TipsComp from "@/views/zyjhzx/components/TipsComp.vue";
import Drawer from "@/views/zyjhzx/components/Drawer.vue";
import pdf from "vue-pdf";
export default {
name:'PWanPGong',
components: {Drawer, TipsComp, ZyjhSelectComp, PWanPgd},
components: {Drawer, TipsComp, ZyjhSelectComp, PWanPgd,pdf},
data(){
return {
title:'抛 丸 作 业 派 工',
@ -44,6 +47,9 @@ export default {
zyq:null,
deviceId:null,
dwGroup:null,
pdfShow:false,
pdfUrl:null,
numPages:null,
}
},
mounted() {
@ -62,46 +68,56 @@ export default {
}
},
methods:{
loadPdf(url) {
const loadingTask = pdfjsLib.getDocument(url);
loadingTask.promise.then(pdf => {
pdf.getPage(3).then(page => {
const viewport = page.getViewport();
const canvas = document.createElement('canvas');
const context = canvas.getContext('2d');
canvas.height = this.height;
canvas.width = this.width/3;
context.setTransform(1, 0, 0, -1, 0, canvas.height)
const renderContext = {
canvasContext: context,
viewport: viewport
};
page.render(renderContext).promise.then(() => {
const image = new Konva.Image({
x: 10,
y: 10,
image: canvas,
width: canvas.width / (window.devicePixelRatio || 1),
height: canvas.height / (window.devicePixelRatio || 1)
});
image.scale({
x:0.6,
y:0.6
});
image.rotation(90)
image.offsetY(image.width()*1.45)
this.pgdGroup.add(image);
});
}).catch(err => {
console.error('Cannot load page', err);
loadPdf(url){
this.pdfShow=false
this.pdfUrl=null
this.numPages=null
this.pdfUrl=pdf.createLoadingTask(url)
this.pdfUrl.promise.then((pdf) => {
this.numPages = pdf.numPages;
this.pdfShow=true
});
}).catch(err => {
console.error('Cannot load PDF document', err);
});
},
// loadPdf(url) {
// const loadingTask = pdfjsLib.getDocument(url);
// loadingTask.promise.then(pdf => {
// pdf.getPage(3).then(page => {
// const viewport = page.getViewport();
// const canvas = document.createElement('canvas');
// const context = canvas.getContext('2d');
// canvas.height = this.height;
// canvas.width = this.width/3;
// context.setTransform(1, 0, 0, -1, 0, canvas.height)
//
// const renderContext = {
// canvasContext: context,
// viewport: viewport
// };
//
// page.render(renderContext).promise.then(() => {
//
// const image = new Konva.Image({
// x: 10,
// y: 10,
// image: canvas,
// width: canvas.width / (window.devicePixelRatio || 1),
// height: canvas.height / (window.devicePixelRatio || 1)
// });
// image.scale({
// x:0.6,
// y:0.6
// });
// image.rotation(90)
// image.offsetY(image.width()*1.45)
// this.pgdGroup.add(image);
// });
// }).catch(err => {
// console.error('Cannot load page', err);
// });
// }).catch(err => {
// console.error('Cannot load PDF document', err);
// });
// },
initPgd(pgd={}){
const group=this.drawGd(pgd)
this.pgdGroup.add(group)
@ -191,6 +207,16 @@ export default {
</script>
<style>
#pdf {
width:28.8%;
height: 93.5vh;
position: absolute;
top:50px;
right:2.5%;
border: none;
margin: 0;
}
#selectComp {
width:30%;
height: auto;

@ -5,7 +5,7 @@
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {bgControl, getDw, getPgd, getPgd2, getYdjhByZt, pgWithForeman, zx} from "@/api/zyjh";
import {bgControl, getDw, getPgd, getPgd2, getYdjhByZt, pdfList, pgWithForeman, zx} from "@/api/zyjh";
export default {
name:'QgePgd',
@ -34,24 +34,15 @@ export default {
}
//
const djhWhLengh=3
const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
const tmpList=this.list.filter(item=>item.plxh===data.msg.orderNumber||item.plxh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList
this.$message.warning('短号有重复,请使用工单号重新派工!!!')
this.$message.warning('短号有重复,请使用完整工单号重新派工!!!')
return
}
for (const item of this.list) {
if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const worker=this.$props.worker()
if (!worker){
this.$message.warning('请选择施工人员后再次派工!!!')
return
}
const tmpArr=[{
id:item.id,
qgry:worker.userCode
}]
this.paigong0(tmpArr)
if (item.plxh===data.msg.orderNumber||item.plxh.slice(-djhWhLengh)===data.msg.orderNumber){
this.paigong0(item)
break
}
}
@ -115,14 +106,20 @@ export default {
this.paigong(worker)
}
},
paigong0(arr){
paigong0(item){
if (!this.privateCheck()){
return
}
const worker=this.$props.worker()
const data={
type:this.type,
field:'qgpgrq',
foremanId:worker.userCode,
dcCh:item.dcCh,
dcPl:item.dcPl,
zxZtName:'QGPG',
list:arr
zt:'52'
}
zx(data).then(resp=>{
const tmpArr=[data]
pgWithForeman(tmpArr).then(()=>{
this.initData()
})
},
@ -132,7 +129,7 @@ export default {
for (const item of list) {
const data={
id:item.id,
foremanId:worker.userCode,//
foremanId:worker.userCode,
dcCh:item.dcCh,
dcPl:item.dcPl,
zxZtName:'QGPG',
@ -153,7 +150,20 @@ export default {
})
},
cellClick({row}){
this.$emit('initPgd',row)
// this.$emit('initPgd',row)
pdfList({
dcCh: row.dcCh,
dcPl: row.dcPl,
}).then((res) => {
this.pdfDataList = res.data;
for (const item of this.pdfDataList) {
if (item.indexOf('套料图')>-1){
const url=`${process.env.VUE_APP_BASE_API}/upload/${row.dcCh}/${row.dcPl}/PDF/${item}.pdf`;
this.$emit('loadPdf',url)
return;
}
}
});
}
}
}

@ -48,6 +48,7 @@ export default function () {
// { field: 'djh',title:'派工单号', width: 120},
// {field: 'slycldw', title: '垛位', width: 60,formatter: dwFormat},
// {field: 'slyclcs', title: '层数', width: 60},
{field: 'plxh', title: '工单号', },
{field: 'dcCh', title: '船号'},
{field: 'dcPl', title: '批量', },
{field: 'total', title: '总数量', },

@ -1,8 +1,11 @@
<template>
<div class="container">
<div id="pwpg" class="pwpg" ref="pwpg"></div>
<QgePgd id="qgpgd" v-if="pgdShow" ref="pwpgd" @initPgd="initPgd" :worker="getWorker" :workers="workers" />
<QgePgd id="qgpgd" v-if="pgdShow" ref="pwpgd" @loadPdf="loadPdf" @initPgd="initPgd" :worker="getWorker" :workers="workers" />
<ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers" @clear="clear"/>
<div id="pdf" class="pdf" :style="{height:height,overflowY:'auto'}" v-if="pdfShow">
<pdf v-for="i in numPages" :key="i" :page="i" :src="pdfUrl" />
</div>
<TipsComp />
<Drawer ref="drawer"/>
</div>
@ -14,16 +17,16 @@ import drawTitle from './comps/title'
import workers from "./comps/person";
import drawDw from './comps/dw'
import drawPgd from './comps/pgd'
import {getBzryList} from "@/api/sjzx/bzzGL";
import {getForeman, getYcldw} from "@/api/zyjh";
import QgePgd from "@/views/zyjhzx/qgepgong/comps/QgePgd.vue";
import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue";
import TipsComp from "@/views/zyjhzx/components/TipsComp.vue";
import Drawer from "@/views/zyjhzx/components/Drawer.vue";
import pdf from "vue-pdf";
export default {
name:'PWanPGong',
components: {Drawer, TipsComp, ZyjhSelectComp, QgePgd},
components: {Drawer, TipsComp, ZyjhSelectComp, QgePgd,pdf},
data(){
return {
title:'切 割 作 业 派 工',
@ -39,12 +42,15 @@ export default {
workerGroup:null,
zyq:null,
deviceId:null,
person:null
person:null,
pdfShow:false,
pdfUrl:null,
numPages:null,
}
},
mounted() {
this.$socket.open()
this.wsSubscribe()
// this.$socket.open()
// this.wsSubscribe()
this.initKonvaStage();
},
created(){
@ -54,23 +60,15 @@ export default {
},
sockets:{},
methods:{
wsSubscribe(){
// this.sockets.subscribe('zyjhzx', data => {
// const currentWorker=this.getCurrentWorker()
// if (!currentWorker){
// this.$message.error(``)
// return;
// }
// if (this.zt===data.zt){
// const tmpArr=[{
// id:data.zyjh.id,
// pwry:currentWorker.userCode
// }]
// this.$refs.pwpgd.paigong0(tmpArr)
// }else{
// this.$message.error(`:${data.gdh}`)
// }
// })
loadPdf(url){
this.pdfShow=false
this.pdfUrl=null
this.numPages=null
this.pdfUrl=pdf.createLoadingTask(url)
this.pdfUrl.promise.then((pdf) => {
this.numPages = pdf.numPages;
this.pdfShow=true
});
},
initPgd(pgd={}){
const group=this.drawGd(pgd)
@ -159,6 +157,16 @@ export default {
</script>
<style>
#pdf {
width:28.8%;
height: 93.5vh;
position: absolute;
top:50px;
right:2.5%;
border: none;
margin: 0;
}
#selectComp {
width:50%;
height: auto;

Loading…
Cancel
Save