mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
Fix label print open issue [SCI-7296]
This commit is contained in:
parent
e05ad97498
commit
884fe58525
2 changed files with 27 additions and 30 deletions
|
@ -7,37 +7,35 @@ Vue.prototype.i18n = window.I18n;
|
|||
|
||||
function initPrintModalComponent() {
|
||||
const container = $('.print-label-modal-container');
|
||||
if (!window.PrintModalComponent && container.length) {
|
||||
window.PrintModalComponent = new Vue({
|
||||
el: '.print-label-modal-container',
|
||||
name: 'PrintModalComponent',
|
||||
components: {
|
||||
'print-modal-container': PrintModalContainer
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showModal: false,
|
||||
row_ids: [],
|
||||
zebraEnabled: container.data('zebra-enabled'),
|
||||
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'),
|
||||
fluicsInfo: container.data('fluics-info-url'),
|
||||
printValidation: container.data('print-validation-url'),
|
||||
labelPreview: container.data('label-preview-url')
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
closeModal() {
|
||||
this.showModal = false;
|
||||
window.PrintModalComponent = new Vue({
|
||||
el: '.print-label-modal-container',
|
||||
name: 'PrintModalComponent',
|
||||
components: {
|
||||
'print-modal-container': PrintModalContainer
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showModal: false,
|
||||
row_ids: [],
|
||||
zebraEnabled: container.data('zebra-enabled'),
|
||||
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'),
|
||||
fluicsInfo: container.data('fluics-info-url'),
|
||||
printValidation: container.data('print-validation-url'),
|
||||
labelPreview: container.data('label-preview-url')
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
closeModal() {
|
||||
this.showModal = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
initPrintModalComponent();
|
||||
|
|
|
@ -177,5 +177,4 @@
|
|||
<%= stylesheet_pack_tag 'pdfjs/pdf_js_styles' %>
|
||||
|
||||
<%= javascript_pack_tag 'vue/protocol' %>
|
||||
<%= render partial: 'label_printers/label_printer_modal' %>
|
||||
|
||||
|
|
Loading…
Reference in a new issue