2022-09-22 17:07:08 +08:00
|
|
|
import TurbolinksAdapter from 'vue-turbolinks';
|
|
|
|
import Vue from 'vue/dist/vue.esm';
|
|
|
|
import PrintModalContainer from '../../vue/repository_print_modal/container.vue';
|
|
|
|
|
|
|
|
Vue.use(TurbolinksAdapter);
|
|
|
|
Vue.prototype.i18n = window.I18n;
|
|
|
|
|
|
|
|
function initPrintModalComponent() {
|
|
|
|
const container = $('.print-label-modal-container');
|
|
|
|
|
|
|
|
window.PrintModalComponent = new Vue({
|
|
|
|
el: '.print-label-modal-container',
|
|
|
|
components: {
|
|
|
|
'print-modal-container': PrintModalContainer
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
showModal: false,
|
|
|
|
row_ids: [],
|
|
|
|
urls: {
|
|
|
|
print: container.data('print-url'),
|
|
|
|
zebraProgress: container.data('zebra-progress-url'),
|
|
|
|
printers: container.data('printers-url'),
|
|
|
|
labelTemplates: container.data('label-templates-url'),
|
|
|
|
rows: container.data('rows-url'),
|
2022-09-27 21:46:48 +08:00
|
|
|
fluicsInfo: container.data('fluics-info-url'),
|
|
|
|
printValidation: container.data('print-validation-url'),
|
|
|
|
labelPreview: container.data('label-preview-url')
|
2022-09-22 17:07:08 +08:00
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
closeModal() {
|
|
|
|
this.showModal = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
initPrintModalComponent();
|