1.各种调整

master
董哲奇 5 months ago
parent 539f778774
commit 4786a5d42d

@ -97,7 +97,7 @@ Object.keys(filters).forEach(key => {
}) })
Vue.use(new VueSocketIO({ Vue.use(new VueSocketIO({
debug: false, debug: true,
connection: process.env.VUE_APP_WEBSOCKET, // connection: process.env.VUE_APP_WEBSOCKET, //
options: { autoConnect:false,path: "",transports: ['websocket', 'xhr-polling', 'jsonp-polling'], } //Optional options options: { autoConnect:false,path: "",transports: ['websocket', 'xhr-polling', 'jsonp-polling'], } //Optional options
})) }))

@ -142,6 +142,15 @@ export default {
tableColumn: [ tableColumn: [
{ type: "checkbox", width: "50", align: "center" }, { type: "checkbox", width: "50", align: "center" },
{ type: "seq", width: "50", title: "序号", 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'], { field: 'tzbh', title: '套料图名称', width: 120,formatter:['dictFormat','QGKW'],
editRender: { editRender: {
name: "$select", name: "$select",
@ -547,6 +556,13 @@ export default {
}).then((res) => { }).then((res) => {
const tableRef = this.$refs.tableRef; const tableRef = this.$refs.tableRef;
if (params == "bmbm") { 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; // this.departmentOptions = res.data;
// const sbztText = tableRef.getColumnByField("szcs"); // const sbztText = tableRef.getColumnByField("szcs");
@ -751,7 +767,7 @@ export default {
rowspanMethod({row, _rowIndex, column, visibleData}) { rowspanMethod({row, _rowIndex, column, visibleData}) {
//vxe-grid :scroll-y="{enabled: false}" //vxe-grid :scroll-y="{enabled: false}"
// //
let fields = ['tzbh'];// let fields = ['zyq','tzbh'];//
const cellValue = row[column.property];// const cellValue = row[column.property];//
if (cellValue && fields.includes(column.property)) { if (cellValue && fields.includes(column.property)) {
const prevRow = visibleData[_rowIndex - 1]; const prevRow = visibleData[_rowIndex - 1];

@ -36,7 +36,7 @@ export default {
return 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) const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){ if (tmpList.length>1){
this.list=tmpList this.list=tmpList

@ -242,9 +242,9 @@ const baifang=function (option={}) {
x: 40, x: 40,
y: 0, y: 0,
width: imgSize, width: imgSize,
height:40, height:30,
fill:'white', fill:'black',
text:`${item.wph||''},${item.wpgg}`, text:`${item.tlth}\n${item.wph||''},${item.wpgg}`,
align:'center', align:'center',
verticalAlign:'middle', verticalAlign:'middle',
}) })
@ -257,7 +257,7 @@ const baifang=function (option={}) {
width: imgSize-20, width: imgSize-20,
height:40, height:40,
fill:'white', 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', align:'center',
verticalAlign:'middle', verticalAlign:'middle',
}) })

@ -25,6 +25,7 @@ export default function () {
return item.userName return item.userName
} }
} }
return cellValue
} }
const gdhFormat=function ({cellValue}){ const gdhFormat=function ({cellValue}){
if (cellValue){ if (cellValue){

@ -46,7 +46,7 @@ export default {
return 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) const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){ if (tmpList.length>1){
this.list=tmpList this.list=tmpList

@ -238,9 +238,9 @@ const baifang=function (option={}) {
x: 40, x: 40,
y: 0, y: 0,
width: imgSize, width: imgSize,
height:40, height:30,
fill:'white', fill:'black',
text:`${item.wph||''},${item.wpgg}`, text:`${item.tlth}\n${item.wph||''},${item.wpgg}`,
align:'center', align:'center',
verticalAlign:'middle', verticalAlign:'middle',
}) })
@ -253,7 +253,7 @@ const baifang=function (option={}) {
width: imgSize-20, width: imgSize-20,
height:40, height:40,
fill:'white', 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', align:'center',
verticalAlign:'middle', verticalAlign:'middle',
}) })

@ -56,8 +56,8 @@ export default function () {
{ type: 'checkbox', width: 40 }, { type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 60 }, { type: 'seq',title:'序号', width: 60 },
{ field: 'djh',title:'派工单号', width: 120}, { field: 'djh',title:'派工单号', width: 120},
{field: 'slycldw', title: '垛位', width: 60,formatter: dwFormat}, // {field: 'slycldw', title: '垛位', width: 60,formatter: dwFormat},
{field: 'slyclcs', title: '层数', width: 60}, // {field: 'slyclcs', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80}, {field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80}, {field: 'dcPl', title: '批量', width: 80},
{field: 'wpgg', title: '材质', width: 80}, {field: 'wpgg', title: '材质', width: 80},

@ -55,6 +55,9 @@ export default {
worker:this.$props.worker().userCode, worker:this.$props.worker().userCode,
list:this.gridOptions.data, list:this.gridOptions.data,
} }
// aa(data).then(()=>{
//
// })
pwpg(data).then(res=>{ pwpg(data).then(res=>{
if (res.success){ if (res.success){
this.export() this.export()

@ -89,6 +89,7 @@ export default function (_height=0) {
{field: 'ceng', title: '层数', width: 50}, {field: 'ceng', title: '层数', width: 50},
{field: 'czbh', title: '船号', width: 80}, {field: 'czbh', title: '船号', width: 80},
{field: 'pl', title: '批量', width: 50}, {field: 'pl', title: '批量', width: 50},
{field: 'djh', title: '工单号', width: 100},
{field: 'fd', title: '分段',width: 50,visible:false}, {field: 'fd', title: '分段',width: 50,visible:false},
{field: 'tlth', title: '套料图号',width: 120}, {field: 'tlth', title: '套料图号',width: 120},
{field: 'wph', title: '材质', width: 60,}, {field: 'wph', title: '材质', width: 60,},

@ -7,7 +7,7 @@
<div id="pdf" class="pdf" :style="{height:height,overflowY:'auto'}" v-if="pdfShow"> <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" /> <pdf v-for="i in numPages" :key="i" :page="i" :src="pdfUrl" />
</div> </div>
<TipsComp /> <!-- <TipsComp />-->
<Drawer ref="drawer"/> <Drawer ref="drawer"/>
</div> </div>
</template> </template>

@ -38,7 +38,7 @@ export default {
return 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) const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){ if (tmpList.length>1){
this.list=tmpList this.list=tmpList

@ -232,9 +232,9 @@ const baifang=function (option={}) {
x: 40, x: 40,
y: 0, y: 0,
width: imgSize, width: imgSize,
height:40, height:30,
fill:'white', fill:'black',
text:`${item.wph||''},${item.wpgg}`, text:`${item.tlth}\n${item.wph||''},${item.wpgg}`,
align:'center', align:'center',
verticalAlign:'middle', verticalAlign:'middle',
}) })
@ -247,7 +247,7 @@ const baifang=function (option={}) {
width: imgSize-20, width: imgSize-20,
height:40, height:40,
fill:'white', 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', align:'center',
verticalAlign:'middle', verticalAlign:'middle',
}) })

@ -1,4 +1,5 @@
import Konva from "konva"; import Konva from "konva";
import {daoduo} from "@/api/zyjh";
const baifang=function (option={}) { const baifang=function (option={}) {
const width=option.width,height=option.height,image=require('@/assets/gb.png') const width=option.width,height=option.height,image=require('@/assets/gb.png')
@ -77,7 +78,7 @@ const baifang=function (option={}) {
if(_index===0){ if(_index===0){
_index=this.getAttr('index') _index=this.getAttr('index')
} }
this.zIndex(999) this.zIndex(4)
const {y:thisY}=this.absolutePosition() const {y:thisY}=this.absolutePosition()
const dir=thisY-this.startPos.y>0?-40:40 const dir=thisY-this.startPos.y>0?-40:40
@ -119,7 +120,6 @@ const baifang=function (option={}) {
for (const it of movedList) { for (const it of movedList) {
mList.push(it.getAttr('item')) mList.push(it.getAttr('item'))
} }
//todo 倒剁
const data={ const data={
id:item.id, id:item.id,
lastCeng:item.ceng, lastCeng:item.ceng,
@ -128,23 +128,22 @@ const baifang=function (option={}) {
duo:item.dwId, duo:item.dwId,
movedList:mList movedList:mList
} }
const element = slList.splice(index-1, 1)[0]; // const element = slList.splice(index-1, 1)[0];
slList.splice(_index-1, 0, element); // slList.splice(_index-1, 0, element);
this.setAttr('index',_index) // this.setAttr('index',_index)
_index=0 // _index=0
handler(slList) // handler(slList)
//todo 倒剁 daoduo(data).then(res=>{
// daoduo(data).then(res=>{ if (res.success){
// if (res.success){ const element = slList.splice(index-1, 1)[0];
// const element = slList.splice(index-1, 1)[0]; slList.splice(_index-1, 0, element);
// slList.splice(_index-1, 0, element); this.setAttr('index',_index)
// this.setAttr('index',_index) _index=0
// _index=0 handler(slList)
// handler(slList) }else {
// }else {
// }
// } })
// })
}) })
const indexRect=new Konva.Rect({ const indexRect=new Konva.Rect({
@ -186,9 +185,9 @@ const baifang=function (option={}) {
x: 60, x: 60,
y: 0, y: 0,
width: imgSize, width: imgSize,
height:40, height:30,
fill:'white', fill:'black',
text:`${item.wph||''},${item.wpgg}`, text:`${item.tlth}\n${item.wph||''},${item.wpgg}`,
align:'center', align:'center',
verticalAlign:'middle', verticalAlign:'middle',
}) })
@ -201,7 +200,7 @@ const baifang=function (option={}) {
width: imgSize+40, width: imgSize+40,
height:40, height:40,
fill:'white', 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', align:'center',
verticalAlign:'middle', verticalAlign:'middle',
}) })
@ -212,7 +211,7 @@ const baifang=function (option={}) {
slGroup.destroyChildren() slGroup.destroyChildren()
for (let i = 1; i <= slList.length; i++) { for (let i = 1; i <= slList.length; i++) {
const item=slList[i-1] const item=slList[i-1]
gangban(i,item) gangban(i,item,slList)
} }
} }

@ -54,6 +54,10 @@ const liliao=function (width,height,dw,callback) {
let selectedShape=null; let selectedShape=null;
const getSelectedShape=function (){
return selectedShape;
}
const duowei=function (index,item){ const duowei=function (index,item){
const alignSize=3 const alignSize=3
const width=((_width-60)/alignSize),height=208 const width=((_width-60)/alignSize),height=208
@ -131,7 +135,7 @@ const liliao=function (width,height,dw,callback) {
} }
return { return {
container,duowei,getCurrentDw container,duowei,getCurrentDw,getSelectedShape
} }
} }

@ -3,6 +3,7 @@
<div id="sliao" class="sliao" ref="sliao"></div> <div id="sliao" class="sliao" ref="sliao"></div>
<SliaoSearch ref="sliaoSearch" @search="search" :workers="workers"/> <SliaoSearch ref="sliaoSearch" @search="search" :workers="workers"/>
<ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers" @clear="clear"/> <ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers" @clear="clear"/>
<TipsComp />
</div> </div>
</template> </template>
@ -35,6 +36,7 @@ export default {
sljhGroup:null, sljhGroup:null,
drawBaiFang:null, drawBaiFang:null,
ycldwGroup:null, ycldwGroup:null,
getSelectedShape:null,
canSl:false, canSl:false,
workerGroup:null, workerGroup:null,
getCurrentWorker:null, getCurrentWorker:null,
@ -65,12 +67,12 @@ export default {
}, },
sockets:{ sockets:{
zyjhzx(data){ zyjhzx(data){
console.log(data)
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){ if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){
return 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) const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh?.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){ if (tmpList.length>1){
this.list=tmpList this.list=tmpList
@ -141,10 +143,7 @@ export default {
this.dw[data.dwId].list.push(data) this.dw[data.dwId].list.push(data)
} }
this.initYcldw(); this.initYcldw();
for (const item of this.list) { // this.getSelectedShape()
}
}) })
this.sockets.subscribe('pwComplete', data => { this.sockets.subscribe('pwComplete', data => {
this.initYcldw() this.initYcldw()
@ -494,8 +493,9 @@ export default {
this.ycldwGroup.destroyChildren() this.ycldwGroup.destroyChildren()
} }
this.dw=res.data 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() const group=container()
this.getSelectedShape=getSelectedShape
this.ycldwGroup=group this.ycldwGroup=group
this.layer.add(group) this.layer.add(group)
}) })

Loading…
Cancel
Save