import barTenderActiveX from '@utils/barTenderActiveX'
const printUtil = {
  data() {
    return {
      module_name: '',
      cabUrl: require('@assets/axtive/BartenderActivex.cab')
    }
  },
  methods: {
    getPrintData(bodyParms, callback) {
      this.$API
        .post(`${this.module_name}/print/`, {}, {}, bodyParms)
        .then(res => {
          if (res.status === 200) {
            for (const item of res.data) {
              console.log('打印的数据', JSON.stringify(item))
              barTenderActiveX(item, callback)
            }
          }
        })
    }
  }
}
export default printUtil
