1.抛丸反馈执行完成后不再重新加载待反馈表格数据,采用在页面删除对应行的方式优化页面响应速度

master
董哲奇 4 months ago
parent a086749003
commit 1211d12309

@ -1,5 +1,5 @@
<template>
<VxeGrid v-bind="gridOptions" @cell-click="cellClick" @checkbox-change="checkboxChange" @checkbox-all="checkboxAll" />
<VxeGrid ref="pwfkRef" v-bind="gridOptions" @cell-click="cellClick" @checkbox-change="checkboxChange" @checkbox-all="checkboxAll" />
</template>
<script>
@ -41,6 +41,16 @@ export default {
this.gridOptions.columns=columns
},
sockets:{
pwComplete(data){
console.log(data)
const selected=this.$refs.pwfkRef.getCheckboxRecords();
for (const item of selected) {
if (item.dcCh===data.czbh&&item.dcPl===data.pl&&item.tzbh===data.tlth){
this.$refs.pwfkRef.remove(item)
break;
}
}
},
zyjhzx(data){
console.log(data)
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){
@ -117,7 +127,7 @@ export default {
}).then(res=>{
if (res.success){
window.localStorage.removeItem('zyjh')
this.initData(this.$props.worker().userCode,'31')
//this.initData(this.$props.worker().userCode,'31')
}
})
},
@ -145,7 +155,7 @@ export default {
}).then(res=>{
if (res.success){
window.localStorage.removeItem('zyjh')
this.initData(this.$props.worker().userCode,'31')
//this.initData(this.$props.worker().userCode,'31')
}
})
})
@ -153,7 +163,7 @@ export default {
initData(worker,zt){
this.gridOptions.ycldw=this.$props.dw
getForemanByWorker({worker:worker}).then(res=>{
getYdjhByZtOrForeman({foreman:res.data.userCode,zt:zt,field:'pwpgry'}).then(res=>{
getYdjhByZtOrForeman({foreman:res.data?.userCode,zt:zt,field:'pwpgry'}).then(res=>{
this.list=res.data
this.gridOptions.data=res.data
this.setExt('workers',this.$props.workers)

@ -73,8 +73,8 @@ export default function () {
{field: 'wpxh', title: '规格', width: 70},
{field: 'sllph', title: '炉批号', width: 100},
{field: 'tzbh', title: '套料图号', width: 100},
{field: 'pwry', title: '接收人', width: 80,formatter:nameFormat},
{field: 'pwpgrq', title: '接收时间', width: 100},
// {field: 'pwry', title: '接收人', width: 80,formatter:nameFormat},
// {field: 'pwpgrq', title: '接收时间', width: 100},
{field: 'pwfkry', title: '报工人', width: 80,formatter:nameFormat},
{field: 'pwfkrq', title: '报工时间', width: 100},
{field: 'pgr', title: '派工人', width: 80},

Loading…
Cancel
Save