|
|
|
@ -10,6 +10,10 @@ import {bgControl, getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
|
|
|
|
|
export default {
|
|
|
|
|
name:'PwanPgd',
|
|
|
|
|
props:{
|
|
|
|
|
height:{
|
|
|
|
|
type:Number,
|
|
|
|
|
default:0
|
|
|
|
|
},
|
|
|
|
|
worker:{
|
|
|
|
|
type:Function,
|
|
|
|
|
default:function (){}
|
|
|
|
@ -30,7 +34,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
created(){
|
|
|
|
|
this.deviceId=this.$route.query.deviceId||''
|
|
|
|
|
const {options,columns,setExt}=paoWanPgdConfig()
|
|
|
|
|
const {options,columns,setExt}=paoWanPgdConfig(this.$props.height)
|
|
|
|
|
this.setExt=setExt
|
|
|
|
|
this.gridOptions=options
|
|
|
|
|
this.gridOptions.columns=columns
|
|
|
|
@ -40,11 +44,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
sockets:{
|
|
|
|
|
zyjhzx(data){
|
|
|
|
|
console.log(data)
|
|
|
|
|
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始派工'){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
console.log(123)
|
|
|
|
|
//工单号尾号长度
|
|
|
|
|
const djhWhLengh=3
|
|
|
|
|
const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
|
|
|
|
@ -54,7 +56,6 @@ export default {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log(111,tmpList)
|
|
|
|
|
for (const item of this.list) {
|
|
|
|
|
if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
|
|
|
|
|
const worker=this.$props.worker()
|
|
|
|
@ -99,25 +100,33 @@ export default {
|
|
|
|
|
this.initData()
|
|
|
|
|
},
|
|
|
|
|
checkboxAll({checked}){
|
|
|
|
|
const worker=this.$props.worker()
|
|
|
|
|
if (!worker){
|
|
|
|
|
this.$message.warning('请选择操作人')
|
|
|
|
|
return;
|
|
|
|
|
if (!this.privateCheck(checked)){
|
|
|
|
|
this.$refs.vxeGrid.setAllCheckboxRow(!checked);
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (checked){
|
|
|
|
|
const worker=this.$props.worker()
|
|
|
|
|
this.paigong(worker)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
checkboxChange({checked}){
|
|
|
|
|
const worker=this.$props.worker()
|
|
|
|
|
if (!worker){
|
|
|
|
|
this.$message.warning('请选择操作人')
|
|
|
|
|
return;
|
|
|
|
|
if (!this.privateCheck(checked)){
|
|
|
|
|
this.$refs.vxeGrid.setAllCheckboxRow(!checked);
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (checked){
|
|
|
|
|
const worker=this.$props.worker()
|
|
|
|
|
this.paigong(worker)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
privateCheck(){
|
|
|
|
|
const worker=this.$props.worker()
|
|
|
|
|
if (!worker){
|
|
|
|
|
this.$message.warning('请选择操作人')
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true
|
|
|
|
|
},
|
|
|
|
|
paigong(worker){
|
|
|
|
|
const list=this.$refs.vxeGrid.getCheckboxRecords()
|
|
|
|
|
const tmpArr=[]
|
|
|
|
|