diff --git a/src/api/zyjh.js b/src/api/zyjh.js index 8d3c2ec..7580c0d 100644 --- a/src/api/zyjh.js +++ b/src/api/zyjh.js @@ -8,6 +8,22 @@ export const daoduo=function(data){ }) } +export const zx=function(data){ + return request({ + url: '/zyjh/pgfk', + method: 'post', + data: data + }) +} + +export const getPgd=function(data){ + return request({ + url: '/zyjh/pgd', + method: 'post', + data: data + }) +} + export const shangLiao=function(data){ return request({ url: '/zyjh/sl', diff --git a/src/views/zyjhzx/pwanfkui/comps/person.js b/src/views/zyjhzx/pwanfkui/comps/person.js index 99851c2..7528657 100644 --- a/src/views/zyjhzx/pwanfkui/comps/person.js +++ b/src/views/zyjhzx/pwanfkui/comps/person.js @@ -53,7 +53,7 @@ export default function (width,height){ y:0, width:width, height:height, - text: persons.name, + text: persons.userName, align: 'center', verticalAlign:'middle', fontSize:12 diff --git a/src/views/zyjhzx/pwanfkui/comps/pgdTable.js b/src/views/zyjhzx/pwanfkui/comps/pgdTable.js index 4d162c0..e6b16ac 100644 --- a/src/views/zyjhzx/pwanfkui/comps/pgdTable.js +++ b/src/views/zyjhzx/pwanfkui/comps/pgdTable.js @@ -9,9 +9,7 @@ export default function () { size:'mini', showOverflow: true, scrollY:{enable:true}, - data:[ - {dcCh:'G175K-6',gdh:'20240812101',dcPl:'002',dcFd:'2302','tzbh':'1231232'} - ] + data:[] } const gdhFormat=function ({cellValue}){ if (cellValue){ diff --git a/src/views/zyjhzx/pwanfkui/index.vue b/src/views/zyjhzx/pwanfkui/index.vue index 909ef29..16fe32a 100644 --- a/src/views/zyjhzx/pwanfkui/index.vue +++ b/src/views/zyjhzx/pwanfkui/index.vue @@ -1,7 +1,7 @@ @@ -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 { - 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 - +