diff --git a/src/main.js b/src/main.js index 38f4416..b22ffd1 100644 --- a/src/main.js +++ b/src/main.js @@ -97,7 +97,7 @@ Object.keys(filters).forEach(key => { }) Vue.use(new VueSocketIO({ - debug: false, + debug: true, connection: process.env.VUE_APP_WEBSOCKET, // options: { autoConnect:false,path: "",transports: ['websocket', 'xhr-polling', 'jsonp-polling'], } //Optional options })) diff --git a/src/views/sjzx/sbcnWH.vue b/src/views/sjzx/sbcnWH.vue index afb0cfb..1b7d74b 100644 --- a/src/views/sjzx/sbcnWH.vue +++ b/src/views/sjzx/sbcnWH.vue @@ -142,6 +142,15 @@ export default { tableColumn: [ { type: "checkbox", width: "50", align: "center" }, { type: "seq", width: "50", title: "序号", align: "center" }, + { field: 'zyq', title: '作业区', width: 120,formatter:['dictFormat','BMBM'], + editRender: { + name: "$select", + options: [], + props: { clearable: true }, + }, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, + }, { field: 'tzbh', title: '套料图名称', width: 120,formatter:['dictFormat','QGKW'], editRender: { name: "$select", @@ -547,6 +556,13 @@ export default { }).then((res) => { const tableRef = this.$refs.tableRef; if (params == "bmbm") { + const zyq=this.$refs.tableRef.getColumnByField('zyq'); + const list=[] + res.data.forEach(item=>{ + const data={label:item.bmsm,value:item.bm} + list.push(data) + }) + zyq.editRender.options = list // 所属部门 // this.departmentOptions = res.data; // const sbztText = tableRef.getColumnByField("szcs"); @@ -751,7 +767,7 @@ export default { rowspanMethod({row, _rowIndex, column, visibleData}) { //不要忘记在vxe-grid上配置 :scroll-y="{enabled: false}" 防止下拉时样式变化 // 需要合并的列字段 - let fields = ['tzbh'];// 需要合并的列 + let fields = ['zyq','tzbh'];// 需要合并的列 const cellValue = row[column.property];// 合并行的相同的唯一标识 if (cellValue && fields.includes(column.property)) { const prevRow = visibleData[_rowIndex - 1]; diff --git a/src/views/zyjhzx/hxianfkui/comps/HxianPgd.vue b/src/views/zyjhzx/hxianfkui/comps/HxianPgd.vue index c007f37..6a91b25 100644 --- a/src/views/zyjhzx/hxianfkui/comps/HxianPgd.vue +++ b/src/views/zyjhzx/hxianfkui/comps/HxianPgd.vue @@ -36,7 +36,7 @@ export default { return } //工单号尾号长度 - const djhWhLengh=3 + const djhWhLengh=4 const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber) if (tmpList.length>1){ this.list=tmpList diff --git a/src/views/zyjhzx/hxianfkui/comps/baifang.js b/src/views/zyjhzx/hxianfkui/comps/baifang.js index 331cfdc..94096d5 100644 --- a/src/views/zyjhzx/hxianfkui/comps/baifang.js +++ b/src/views/zyjhzx/hxianfkui/comps/baifang.js @@ -242,9 +242,9 @@ const baifang=function (option={}) { x: 40, y: 0, width: imgSize, - height:40, - fill:'white', - text:`${item.wph||''},${item.wpgg}`, + height:30, + fill:'black', + text:`${item.tlth}\n${item.wph||''},${item.wpgg}`, align:'center', verticalAlign:'middle', }) @@ -257,7 +257,7 @@ const baifang=function (option={}) { width: imgSize-20, height:40, fill:'white', - text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`, + text:`${item.czbh},${item.pl},${item.fd},工单号:${item.djh||''}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`, align:'center', verticalAlign:'middle', }) diff --git a/src/views/zyjhzx/hxianfkui/comps/pgdTable.js b/src/views/zyjhzx/hxianfkui/comps/pgdTable.js index 5e55c04..5c31ede 100644 --- a/src/views/zyjhzx/hxianfkui/comps/pgdTable.js +++ b/src/views/zyjhzx/hxianfkui/comps/pgdTable.js @@ -25,6 +25,7 @@ export default function () { return item.userName } } + return cellValue } const gdhFormat=function ({cellValue}){ if (cellValue){ diff --git a/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue b/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue index fc847c6..413dea9 100644 --- a/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue +++ b/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue @@ -46,7 +46,7 @@ export default { return } //工单号尾号长度 - const djhWhLengh=3 + const djhWhLengh=4 const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber) if (tmpList.length>1){ this.list=tmpList diff --git a/src/views/zyjhzx/pwanfkui/comps/baifang.js b/src/views/zyjhzx/pwanfkui/comps/baifang.js index 3e003e7..d40e1bd 100644 --- a/src/views/zyjhzx/pwanfkui/comps/baifang.js +++ b/src/views/zyjhzx/pwanfkui/comps/baifang.js @@ -238,9 +238,9 @@ const baifang=function (option={}) { x: 40, y: 0, width: imgSize, - height:40, - fill:'white', - text:`${item.wph||''},${item.wpgg}`, + height:30, + fill:'black', + text:`${item.tlth}\n${item.wph||''},${item.wpgg}`, align:'center', verticalAlign:'middle', }) @@ -253,7 +253,7 @@ const baifang=function (option={}) { width: imgSize-20, height:40, fill:'white', - text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`, + text:`${item.czbh},${item.pl},${item.fd},工单号:${item.djh||''}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`, align:'center', verticalAlign:'middle', }) diff --git a/src/views/zyjhzx/pwanfkui/comps/pgdTable.js b/src/views/zyjhzx/pwanfkui/comps/pgdTable.js index 88dfbfa..aa0e85f 100644 --- a/src/views/zyjhzx/pwanfkui/comps/pgdTable.js +++ b/src/views/zyjhzx/pwanfkui/comps/pgdTable.js @@ -56,8 +56,8 @@ export default function () { { type: 'checkbox', width: 40 }, { type: 'seq',title:'序号', width: 60 }, { field: 'djh',title:'派工单号', width: 120}, - {field: 'slycldw', title: '垛位', width: 60,formatter: dwFormat}, - {field: 'slyclcs', title: '层数', width: 60}, + // {field: 'slycldw', title: '垛位', width: 60,formatter: dwFormat}, + // {field: 'slyclcs', title: '层数', width: 60}, {field: 'dcCh', title: '船号', width: 80}, {field: 'dcPl', title: '批量', width: 80}, {field: 'wpgg', title: '材质', width: 80}, diff --git a/src/views/zyjhzx/pwanpgong/comps/PwanSgd.vue b/src/views/zyjhzx/pwanpgong/comps/PwanSgd.vue index 82b4284..d9adfd0 100644 --- a/src/views/zyjhzx/pwanpgong/comps/PwanSgd.vue +++ b/src/views/zyjhzx/pwanpgong/comps/PwanSgd.vue @@ -55,6 +55,9 @@ export default { worker:this.$props.worker().userCode, list:this.gridOptions.data, } + // aa(data).then(()=>{ + // + // }) pwpg(data).then(res=>{ if (res.success){ this.export() diff --git a/src/views/zyjhzx/pwanpgong/comps/pgdTable.js b/src/views/zyjhzx/pwanpgong/comps/pgdTable.js index 35c85c2..7eb27ac 100644 --- a/src/views/zyjhzx/pwanpgong/comps/pgdTable.js +++ b/src/views/zyjhzx/pwanpgong/comps/pgdTable.js @@ -89,6 +89,7 @@ export default function (_height=0) { {field: 'ceng', title: '层数', width: 50}, {field: 'czbh', title: '船号', width: 80}, {field: 'pl', title: '批量', width: 50}, + {field: 'djh', title: '工单号', width: 100}, {field: 'fd', title: '分段',width: 50,visible:false}, {field: 'tlth', title: '套料图号',width: 120}, {field: 'wph', title: '材质', width: 60,}, diff --git a/src/views/zyjhzx/pwanpgong/index.vue b/src/views/zyjhzx/pwanpgong/index.vue index f61c367..c06d871 100644 --- a/src/views/zyjhzx/pwanpgong/index.vue +++ b/src/views/zyjhzx/pwanpgong/index.vue @@ -7,7 +7,7 @@
- + diff --git a/src/views/zyjhzx/qgefkui/comps/QgePgd.vue b/src/views/zyjhzx/qgefkui/comps/QgePgd.vue index 79f95fd..816912b 100644 --- a/src/views/zyjhzx/qgefkui/comps/QgePgd.vue +++ b/src/views/zyjhzx/qgefkui/comps/QgePgd.vue @@ -38,7 +38,7 @@ export default { return } //工单号尾号长度 - const djhWhLengh=3 + const djhWhLengh=4 const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber) if (tmpList.length>1){ this.list=tmpList diff --git a/src/views/zyjhzx/qgefkui/comps/baifang.js b/src/views/zyjhzx/qgefkui/comps/baifang.js index 1532628..678c4e9 100644 --- a/src/views/zyjhzx/qgefkui/comps/baifang.js +++ b/src/views/zyjhzx/qgefkui/comps/baifang.js @@ -232,9 +232,9 @@ const baifang=function (option={}) { x: 40, y: 0, width: imgSize, - height:40, - fill:'white', - text:`${item.wph||''},${item.wpgg}`, + height:30, + fill:'black', + text:`${item.tlth}\n${item.wph||''},${item.wpgg}`, align:'center', verticalAlign:'middle', }) @@ -247,7 +247,7 @@ const baifang=function (option={}) { width: imgSize-20, height:40, fill:'white', - text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`, + text:`${item.czbh},${item.pl},${item.fd},工单号:${item.djh||''}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`, align:'center', verticalAlign:'middle', }) diff --git a/src/views/zyjhzx/sliao/comps/baifang.js b/src/views/zyjhzx/sliao/comps/baifang.js index 780549b..c05053b 100644 --- a/src/views/zyjhzx/sliao/comps/baifang.js +++ b/src/views/zyjhzx/sliao/comps/baifang.js @@ -1,4 +1,5 @@ import Konva from "konva"; +import {daoduo} from "@/api/zyjh"; const baifang=function (option={}) { const width=option.width,height=option.height,image=require('@/assets/gb.png') @@ -77,7 +78,7 @@ const baifang=function (option={}) { if(_index===0){ _index=this.getAttr('index') } - this.zIndex(999) + this.zIndex(4) const {y:thisY}=this.absolutePosition() const dir=thisY-this.startPos.y>0?-40:40 @@ -119,7 +120,6 @@ const baifang=function (option={}) { for (const it of movedList) { mList.push(it.getAttr('item')) } - //todo 倒剁 const data={ id:item.id, lastCeng:item.ceng, @@ -128,23 +128,22 @@ const baifang=function (option={}) { duo:item.dwId, movedList:mList } - const element = slList.splice(index-1, 1)[0]; - slList.splice(_index-1, 0, element); - this.setAttr('index',_index) - _index=0 - handler(slList) - //todo 倒剁 - // daoduo(data).then(res=>{ - // if (res.success){ - // const element = slList.splice(index-1, 1)[0]; - // slList.splice(_index-1, 0, element); - // this.setAttr('index',_index) - // _index=0 - // handler(slList) - // }else { - // - // } - // }) + // const element = slList.splice(index-1, 1)[0]; + // slList.splice(_index-1, 0, element); + // this.setAttr('index',_index) + // _index=0 + // handler(slList) + daoduo(data).then(res=>{ + if (res.success){ + const element = slList.splice(index-1, 1)[0]; + slList.splice(_index-1, 0, element); + this.setAttr('index',_index) + _index=0 + handler(slList) + }else { + + } + }) }) const indexRect=new Konva.Rect({ @@ -186,9 +185,9 @@ const baifang=function (option={}) { x: 60, y: 0, width: imgSize, - height:40, - fill:'white', - text:`${item.wph||''},${item.wpgg}`, + height:30, + fill:'black', + text:`${item.tlth}\n${item.wph||''},${item.wpgg}`, align:'center', verticalAlign:'middle', }) @@ -201,7 +200,7 @@ const baifang=function (option={}) { width: imgSize+40, height:40, fill:'white', - text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.bfrq||''},切割计划日期:${item.qgjhrq||''}`, + text:`${item.czbh},${item.pl},${item.fd},工单号:${item.djh||''}\n上料:${item.bfrq||''},切割计划日期:${item.qgjhrq||''}`, align:'center', verticalAlign:'middle', }) @@ -212,7 +211,7 @@ const baifang=function (option={}) { slGroup.destroyChildren() for (let i = 1; i <= slList.length; i++) { const item=slList[i-1] - gangban(i,item) + gangban(i,item,slList) } } diff --git a/src/views/zyjhzx/sliao/comps/liliao.js b/src/views/zyjhzx/sliao/comps/liliao.js index fa148a4..99424a4 100644 --- a/src/views/zyjhzx/sliao/comps/liliao.js +++ b/src/views/zyjhzx/sliao/comps/liliao.js @@ -54,6 +54,10 @@ const liliao=function (width,height,dw,callback) { let selectedShape=null; + const getSelectedShape=function (){ + return selectedShape; + } + const duowei=function (index,item){ const alignSize=3 const width=((_width-60)/alignSize),height=208 @@ -131,7 +135,7 @@ const liliao=function (width,height,dw,callback) { } return { - container,duowei,getCurrentDw + container,duowei,getCurrentDw,getSelectedShape } } diff --git a/src/views/zyjhzx/sliao/index.vue b/src/views/zyjhzx/sliao/index.vue index 0535a39..73c0a3d 100644 --- a/src/views/zyjhzx/sliao/index.vue +++ b/src/views/zyjhzx/sliao/index.vue @@ -3,6 +3,7 @@
+ @@ -35,6 +36,7 @@ export default { sljhGroup:null, drawBaiFang:null, ycldwGroup:null, + getSelectedShape:null, canSl:false, workerGroup:null, getCurrentWorker:null, @@ -65,12 +67,12 @@ export default { }, sockets:{ zyjhzx(data){ - console.log(data) + if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){ return } //工单号尾号长度 - const djhWhLengh=3 + const djhWhLengh=4 const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh?.slice(-djhWhLengh)===data.msg.orderNumber) if (tmpList.length>1){ this.list=tmpList @@ -141,10 +143,7 @@ export default { this.dw[data.dwId].list.push(data) } this.initYcldw(); - for (const item of this.list) { - - } - + // this.getSelectedShape() }) this.sockets.subscribe('pwComplete', data => { this.initYcldw() @@ -494,8 +493,9 @@ export default { this.ycldwGroup.destroyChildren() } this.dw=res.data - const {container,getCurrentDw}= liliao(this.width,this.height,this.dw,this.initDwInfo) + const {container,getCurrentDw,getSelectedShape}= liliao(this.width,this.height,this.dw,this.initDwInfo) const group=container() + this.getSelectedShape=getSelectedShape this.ycldwGroup=group this.layer.add(group) })