|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="container">
|
|
|
|
|
<div id="pwpg" class="pwpg" ref="pwpg"></div>
|
|
|
|
|
<HxianPgd id="pwpgd" ref="pwpgd" @initPgd="initPgd" />
|
|
|
|
|
<HxianPgd id="pwpgd" ref="pwpgd" @initPgd="initPgd" :pgd="pgd" />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -12,32 +12,25 @@ import workers from "./comps/person";
|
|
|
|
|
import drawDw from './comps/dw'
|
|
|
|
|
import drawPgd from './comps/pgd'
|
|
|
|
|
import baifang from "./comps/baifang";
|
|
|
|
|
import drawSb from './comps/sb'
|
|
|
|
|
import {getPgd, getYcldw} from "@/api/zyjh";
|
|
|
|
|
import {getBzryList} from "@/api/sjzx/bzzGL";
|
|
|
|
|
import HxianPgd from "@/views/zyjhzx/hxianfkui/comps/HxianPgd.vue";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name:'PWanFKui',
|
|
|
|
|
components: {HxianPgd,},
|
|
|
|
|
components: {HxianPgd},
|
|
|
|
|
data(){
|
|
|
|
|
return {
|
|
|
|
|
title:'划 线 作 业 反 馈',
|
|
|
|
|
title:'抛 丸 作 业 反 馈',
|
|
|
|
|
width:0,
|
|
|
|
|
height:0,
|
|
|
|
|
stage:null,
|
|
|
|
|
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 +54,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.userCode}).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)
|
|
|
|
|
}
|
|
|
|
@ -114,7 +106,7 @@ export default {
|
|
|
|
|
this.pgdGroup=pgdContainer()
|
|
|
|
|
this.layer.add(this.pgdGroup)
|
|
|
|
|
|
|
|
|
|
const csdGroup=drawSb(this.width,this.height)
|
|
|
|
|
const csdGroup=drawCsd(this.width,this.height)
|
|
|
|
|
this.layer.add(csdGroup)
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
@ -124,7 +116,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
#pwpgd {
|
|
|
|
|
width:66%;
|
|
|
|
|
width:55%;
|
|
|
|
|
height: auto;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top:45px;
|
|
|
|
|