lincl il y a 1 an
Parent
commit
43bdf805bf

+ 1 - 1
mini-pro-web/src/views/machine/components/TipsDialog.vue

@ -317,7 +317,7 @@ export default {
		initCloseTimer(){
			if(this.hasTimer){
				this.removeInterval(closeThread)
				this.closeTimes = this.contentType==11? 20 : this.contentType==8? 15 : this.contentType==7? 120 : this.contentType==2? 60 : 30
				this.closeTimes = this.contentType==11? 20 : this.contentType==8? 15 : this.contentType==7? 120 : (this.contentType==2||this.contentType==18)? 60 : 30
				closeThread = setInterval(()=>{
					if(this.closeTimes <= 0){
						this.removeInterval()

+ 1 - 1
mini-pro-web/src/views/machine/index.vue

@ -118,7 +118,7 @@ export default {
			},
			isErr: 2, //1设备维护  2正常使用
			deviceNum: this.$route.query.deviceNum || '14912202107000001500000000000000',//14912202107000001500000000000000    14912202111000001000000000000000
			deviceNum: this.$route.query.deviceNum, //|| '14912202107000001500000000000000',//14912202107000001500000000000000    14912202111000001000000000000000
			step: 0, //0启动页  1首页  2扫码页  3订单页
			
			socketUrl: '',

+ 12 - 2
mini-pro-web/src/views/machine/utils/socket.js

@ -90,7 +90,12 @@ class SocketUtils extends Vue {
    }
    getMessage(msg) {
        console.log(msg.data)
        try {
            console.log("接收到消息:", msg.data)
        } catch (error) {
            
        }
        
        var msgobj = JSON.parse(msg.data)
        if (msgobj.type == 'ShipInfo') {
            if(!this.inOut){
@ -242,6 +247,11 @@ class SocketUtils extends Vue {
                //发送消息时  重置重连定时器时间
                // this.reconnectTimeout()
            }
            try {
                console.log("发送消息:", JSON.stringify(obj))
            } catch (error) {
                
            }
            
            this.socket.send(JSON.stringify(obj));
        }
@ -342,7 +352,7 @@ class SocketUtils extends Vue {
                type:"text", text: (v.drugName||v.goodsName)+"\n",nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
            })
            printcon.push({
                type:"text", text: `数量:${v.quantity}${v.unit}\n规格:${v.specif}\n用法:${v.useWay||''}  ${v.useDose||''}${v.unit||''}  ${v.useRate||''}`,nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
                type:"text", text: `数量:${v.quantity}${v.quantityUnit}\n规格:${v.specif}\n用法:${v.useWay||''}  ${v.useDose||''}${v.unit||''}  ${v.useRate||''}`,nLan:0,nOrgx:-1,nWidthTimes:0,nHeightTimes:0,FontType:0,nFontStyle:0
            })
            printcon.push({type:"line"})
        })