licp
2024-11-27 a06fc9ad238199d601ae86795188151f56fdd3fe
src/components/view/b1-inspect-order-plan.vue
@@ -421,6 +421,7 @@
        <el-button type="primary" @click="confirmExport" :loading="upLoadExport">确 定</el-button>
      </span>
    </el-dialog>
    <input id="ScanCodeInfo" v-model="codeInfo" @keyup.enter="keyup" style="opacity: 0;height: 0px;margin: 0px;padding: 0px;position: absolute;top: 0;"></input>
  </div>
</template>
@@ -680,6 +681,36 @@
        }
         }
      },
    watch:{
      qrCodeVisible(newVal){
        if(newVal){
            // this.$message.success('扫码:打开')
            this.sampleCode = null
            let input = document.getElementById('ScanCodeInfo');
            input.focus();
            this.startTime = setInterval(()=>{
                input.focus()
            },1000)
        }else{
            // this.$message.warning('扫码:关闭')
            clearInterval(this.startTime)
        }
      },
      exportVisible(newVal){
        if(newVal){
            // this.$message.success('扫码:打开')
            this.sampleCode = null
            let input = document.getElementById('ScanCodeInfo');
            input.focus();
            this.startTime = setInterval(()=>{
                input.focus()
            },1000)
        }else{
            // this.$message.warning('扫码:关闭')
            clearInterval(this.startTime)
        }
      },
    },
      created() {
         this.getLaboratoryDicts()
         this.getTypeDicts()
@@ -790,7 +821,6 @@
      keyup(e){
        var code = ''
        try{
          // console.log(2222,this.codeInfo)
          code = this.codeInfo.substring()
          if(code==null||code==undefined||code==''){
            this.$message.error('该二维码有误')