|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="container">
|
|
|
|
|
<div id="pwpg" class="pwpg" ref="pwpg"></div>
|
|
|
|
|
<PWanPgd id="pwpgd" ref="pwpgd" @initPgd="initPgd" />
|
|
|
|
|
<PWanPgd id="pwpgd" ref="pwpgd" @initPgd="initPgd" :pgd="pgd" />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -14,6 +14,9 @@ import drawDw from './comps/dw'
|
|
|
|
|
import drawPgd from './comps/pgd'
|
|
|
|
|
import baifang from "./comps/baifang";
|
|
|
|
|
import drawCsd from './comps/csd'
|
|
|
|
|
import {getPgd, getYcldw} from "@/api/zyjh";
|
|
|
|
|
import liliao from "@/views/zyjhzx/sliao/comps/liliao";
|
|
|
|
|
import {getBzryList} from "@/api/sjzx/bzzGL";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name:'PWanFKui',
|
|
|
|
@ -27,17 +30,9 @@ export default {
|
|
|
|
|
layer:null,
|
|
|
|
|
pgdGroup:null,
|
|
|
|
|
drawGd:null,
|
|
|
|
|
dw:[
|
|
|
|
|
{name:'预处理垛位\n垛位1\n摆放预览',
|
|
|
|
|
list:['板材1','板材2','板材3','板材4','板材5','板材6','板材7','板材8','板材9','板材10','板材11','板材12','板材13','板材14',]
|
|
|
|
|
},
|
|
|
|
|
{name:'预处理垛位\n垛位2\n摆放预览',
|
|
|
|
|
list:['板材1','板材2','板材3','板材4','板材5','板材6','板材7','板材8','板材9','板材10','板材11','板材12','板材13','板材14',]
|
|
|
|
|
},
|
|
|
|
|
{name:'预处理垛位\n垛位2\n摆放预览',
|
|
|
|
|
list:['板材1','板材2','板材3','板材4','板材5','板材6','板材7','板材8','板材9','板材10','板材11','板材12','板材13','板材14',]
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
dw:[],
|
|
|
|
|
pgd:[],
|
|
|
|
|
currentWorker:null,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
@ -61,35 +56,34 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
initDw(){
|
|
|
|
|
const that=this
|
|
|
|
|
new Promise(resolve => {
|
|
|
|
|
return resolve(this.dw)
|
|
|
|
|
}).then(res=>{
|
|
|
|
|
console.log(this)
|
|
|
|
|
getYcldw().then(res=>{
|
|
|
|
|
const {container,dw}=drawDw(this.width,this.height,that.initBaiFang)
|
|
|
|
|
const group=container()
|
|
|
|
|
|
|
|
|
|
this.layer.add(group)
|
|
|
|
|
|
|
|
|
|
for (let i=0;i<res.length;i++){
|
|
|
|
|
const item=res[i]
|
|
|
|
|
for (let i=0;i<res.data.length;i++){
|
|
|
|
|
const item=res.data[i]
|
|
|
|
|
const dwGroup=dw(i,item)
|
|
|
|
|
group.add(dwGroup)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
initWorkers(){
|
|
|
|
|
new Promise(resolve => {
|
|
|
|
|
return resolve([
|
|
|
|
|
{name:'张三1'},{name:'张三2'},
|
|
|
|
|
{name:'张三1'},{name:'张三2'},
|
|
|
|
|
])
|
|
|
|
|
}).then(res=>{
|
|
|
|
|
const {container,person}=workers(this.width,this.height,res)
|
|
|
|
|
const that=this
|
|
|
|
|
getBzryList({resourcesCode:'4KB002'}).then(res=>{
|
|
|
|
|
const {container,person}=workers(this.width,this.height)
|
|
|
|
|
const group=container()
|
|
|
|
|
group.on('click touchstart',function (){
|
|
|
|
|
that.currentWorker=person
|
|
|
|
|
getPgd({field:'',jhrqField:'',user:that.currentWorker.userName}).then(res=>[
|
|
|
|
|
that.pgd=res.data
|
|
|
|
|
])
|
|
|
|
|
})
|
|
|
|
|
this.layer.add(group)
|
|
|
|
|
|
|
|
|
|
for (let i=0;i<res.length;i++){
|
|
|
|
|
const item=res[i]
|
|
|
|
|
for (let i=0;i<res.data.length;i++){
|
|
|
|
|
const item=res.data[i]
|
|
|
|
|
const worker=person(i,item)
|
|
|
|
|
group.add(worker)
|
|
|
|
|
}
|
|
|
|
|