1.修复语音文字提醒不显示问题

master
董哲奇 7 months ago
parent a7b1cbafd8
commit 2a0ba9ebcc

@ -61,7 +61,8 @@
</el-tab-pane>
<el-tab-pane label="月度计划编制" name="first">
<div class="mytable">
<el-button type="success" @click="confirmModal"></el-button>
<el-button type="success" @click="paichan"></el-button>
<!-- <el-button type="success" @click="confirmModal"></el-button>-->
<el-button type="success" @click="creatYdjh"></el-button>
<el-button type="success" @click="symxhz"></el-button>
<vxe-grid
@ -2767,10 +2768,10 @@ export default {
window.addEventListener('resize', this.getHeight)
this.getHeight()
this.initBase()
this.isUser=true
// if(this.yhdm==='user01'||this.yhdm==='user02'){
// this.isUser=true
// }
// this.isUser=true
if(this.yhdm==='user129'||this.yhdm==='SCYQS'||this.yhdm==='user01'){
this.isUser=true
}
},
watch: {
'queryParam.beginTime'(newValue, Value){

@ -44,6 +44,7 @@ export default {
drawItem:null,
workerGroup:null,
person:null,
deviceId:null,
kwBm:[
{"bmsm": "2跨超长超宽曲板", "bmlb": "QGKW", "bm": "10"},
{"bmsm": "2跨T型材腹板", "bmlb": "QGKW", "bm": "11"},
@ -67,9 +68,62 @@ export default {
this.initKonvaStage();
},
created(){
this.deviceId=this.$route.query.deviceId||''
window.addEventListener('resize', this.initKonvaStage)
},
sockets:{},
sockets:{
zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType==='开始报工'){
return
}
//
const djhWhLengh=3
const tmpList=this.sljhItemList.filter(item=>item.djh===data.djh||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return
}
for (const item of this.sljhItemList) {
if (item.djh===data.djh||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
if (!!this.currentDw.tzbh&&item.kw===this.currentDw.tzbh){
const tmpZxData={
id:item.id,
lldw:this.currentDw.id,
llcs:this.dw[that.currentDwIndex].list.length+1,
llfkry:this.getCurrentWorker()?.userCode
}
const data={
ydjh:tmpZxData,
ydid:item.id,
dwId:this.currentDw.id,
ceng:this.dw[that.currentDwIndex].list.length+1,
czbh:item.dcCh,
pl:item.dcPl,
fd:item.dcFd,
kw:item.kw,
zl:item.zl,
tlth:item.tzbh,
wph:item.wpxh,
wpgg:item.wpgg,
sljhrq:item.sljhrq,
qgjhrq:item.qgjhrq,
bfr:this.currentWorker?.userCode,
type:'LLJ'
}
shangLiao(data).then(res=>{})
this.sljhItemList.splice(this.getAttr('index'),1)
this.sljhGroup.destroyChildren()
this.drawSljhItem(that.sljhItemList)
}else{
that.$message.warning(`理料垛位错误,请放入${that.kwNameFormat(item.kw)}所在垛位`)
}
break
}
}
}
},
methods:{
wsSubscribe() {
this.sockets.subscribe('llComplete', data => {
@ -84,41 +138,41 @@ export default {
}
this.initDw()
})
this.sockets.subscribe('zyjhzx', data => {
if (this.zt===data.zt){
const item=data.zyjh
let dwId=0
let dwCeng=0
for (const dw of this.dw) {
if(dw.tzbh===data.zyjh.kw){
dwId=dw.dwId
dwCeng=dw.list.length
}
}
const tmp={
ydjh:item,
dwId:dwId,
ceng:dwCeng+1,
czbh:item.dcCh,
pl:item.dcPl,
fd:item.dcFd,
kw:item.kw,
zl:item.zl,
tlth:item.tzbh,
wph:item.wpxh,
wpgg:item.wpgg,
sljhrq:item.sljhrq,
qgjhrq:item.qgjhrq,
bfr:data.zyjh.llry,
type:'LLJ'
}
shangLiao(tmp).then(res=>{})
}else{
this.$message.error(`工单号错误:${data.gdh}`)
}
})
// this.sockets.subscribe('zyjhzx', data => {
// if (this.zt===data.zt){
// const item=data.zyjh
// let dwId=0
// let dwCeng=0
// for (const dw of this.dw) {
// if(dw.tzbh===data.zyjh.kw){
// dwId=dw.dwId
// dwCeng=dw.list.length
// }
// }
// const tmp={
// ydjh:item,
// dwId:dwId,
// ceng:dwCeng+1,
// czbh:item.dcCh,
// pl:item.dcPl,
// fd:item.dcFd,
// kw:item.kw,
// zl:item.zl,
// tlth:item.tzbh,
// wph:item.wpxh,
// wpgg:item.wpgg,
// sljhrq:item.sljhrq,
// qgjhrq:item.qgjhrq,
// bfr:data.zyjh.llry,
// type:'LLJ'
// }
//
// shangLiao(tmp).then(res=>{})
//
// }else{
// this.$message.error(`:${data.gdh}`)
// }
// })
},
initPgd(pgd={}){
const group=this.drawGd(pgd)

@ -4,32 +4,90 @@
<script>
import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd, getYcldw} from "@/api/zyjh";
import {getDw, getPgd, getYcldw, zx} from "@/api/zyjh";
export default {
name:'PwanPgd',
props:{
workers:{
type:Array,
default:[]
},
dw:{
type:Array,
default: []
}
},
data(){
return{
gridOptions:{},
setExt:null,
deviceId:null,
}
},
created(){
this.deviceId=this.$route.query.deviceId||''
const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt
this.gridOptions=options
this.gridOptions.columns=columns
},
sockets:{
zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType==='开始报工'){
return
}
//
const djhWhLengh=3
const tmpList=this.list.filter(item=>item.djh===data.djh||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList
this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return
}
for (const item of this.list) {
if (item.djh===data.djh||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const tmpArr=[{
id:item.id,
pwfkry: data.pwry
}]
this.baogong(tmpArr)
break
}
}
}
},
methods:{
initData(worker,zt){
getDw({type:'ycl'}).then(res=>{
this.gridOptions.ycldw=res.data
baogong(tmpArr,data){
let ycldwInfo=null
for (const dw of this.dw) {
for (const info of dw.list) {
if (data.dcCh===info.czbh&&data.dcPl!==info.pl&&data.dcFd!==info.fd&&data.tzbh!==info.tlth){
ycldwInfo=info
break
}
}
}
if (!ycldwInfo){
this.$message.warning(`预处理垛位上板材与记录不符,需查验后再进行报工!`)
return;
}
zx({
field:'pwfkrq',
zxZtName:'PWFK',
list:tmpArr,
ycldwInfo:ycldwInfo
}).then(res=>{
if (res.success){
window.localStorage.removeItem('zyjh')
}
})
},
initData(worker,zt){
// getDw({type:'ycl'}).then(res=>{
// console.log(res.data)
// this.gridOptions.ycldw=res.data
// })
this.gridOptions.ycldw=this.$props.dw
getPgd({user:worker,zt:zt,field:'pwry'}).then(res=>{
this.gridOptions.data=res.data
this.setExt('workers',this.$props.workers)

@ -1,7 +1,7 @@
<template>
<div class="container">
<div id="pwpg" class="pwpg" ref="pwpg"></div>
<PWanPgd id="pwbgd" ref="pwpgd" @initPgd="initPgd" :pgd="pgd" :workers="workers" @pgdClick="pgdClick"/>
<PWanPgd id="pwbgd" ref="pwpgd" @initPgd="initPgd" :pgd="pgd" :workers="workers" :dw="dw" @pgdClick="pgdClick"/>
<ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers"/>
<TipsComp />
</div>

@ -5,7 +5,7 @@
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd, getYcldw, zx} from "@/api/zyjh";
import {getDw, getPgd, zx} from "@/api/zyjh";
export default {
name:'PwanPgd',
@ -25,9 +25,11 @@ export default {
gridOptions:{},
list:{},
setExt:null,
deviceId:null,
}
},
created(){
this.deviceId=this.$route.query.deviceId||''
const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt
this.gridOptions=options
@ -36,6 +38,32 @@ export default {
this.gridOptions.ycldw=res.data
})
},
sockets:{
zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType==='开始派工'){
return
}
//
const djhWhLengh=3
const tmpList=this.list.filter(item=>item.djh===data.djh||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList
this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return
}
for (const item of this.list) {
if (item.djh===data.djh||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const worker=this.$props.worker()
const tmpArr=[{
id:item.id,
pwry:worker.userCode
}]
this.paigong0(tmpArr)
break
}
}
}
},
methods:{
initData(){
getPgd({zt:'21'}).then(res=>{
@ -56,7 +84,7 @@ export default {
this.paigong(worker)
}
},
checkboxChange({checked,row}){
checkboxChange({checked}){
const worker=this.$props.worker()
if (!worker){
this.$message.warning('请选择操作人')

@ -38,36 +38,19 @@ export default {
zt:'21',
workerGroup:null,
person:null,
deviceId:null,
}
},
mounted() {
this.$socket.open()
this.wsSubscribe()
this.initKonvaStage();
},
created(){
this.deviceId=this.$route.query.deviceId||''
window.addEventListener('resize', this.initKonvaStage)
},
sockets:{},
methods:{
wsSubscribe(){
this.sockets.subscribe('zyjhzx', data => {
const currentWorker=this.getCurrentWorker()
if (!currentWorker){
this.$message.error(`未选择指派人员`)
return;
}
if (this.zt===data.zt){
const tmpArr=[{
id:data.zyjh.id,
pwry:currentWorker.userCode
}]
this.$refs.pwpgd.paigong0(tmpArr)
}else{
this.$message.error(`工单号错误:${data.gdh}`)
}
})
},
initPgd(pgd={}){
const group=this.drawGd(pgd)
this.pgdGroup.add(group)

Loading…
Cancel
Save