排版
This commit is contained in:
@@ -168,13 +168,13 @@
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="form-floating mb-3">
|
||||
<input type="number" id="xPosition" class="form-control form-control-sm mb-2">
|
||||
<input type="number" id="xPosition" class="form-control form-control-sm mb-2" onchange="Designer.changePosition()">
|
||||
<label class="small" for="xPosition">X</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-floating mb-3">
|
||||
<input type="number" id="yPosition" class="form-control form-control-sm mb-2">
|
||||
<input type="number" id="yPosition" class="form-control form-control-sm mb-2" onchange="Designer.changePosition()">
|
||||
<label class="small" for="yPosition">Y</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -225,8 +225,8 @@
|
||||
allSize: [
|
||||
],
|
||||
bg: [
|
||||
{ name: "黃1", path: "../../admin/print/html/tablet-1.svg" },
|
||||
{ name: "黃2", path: "../../admin/print/html/tablet-1B.svg" },
|
||||
{ name: "黃1", path: "../../admin/print/html/tablet-1_new.svg" },
|
||||
{ name: "黃2", path: "../../admin/print/html/tablet-1B_new.svg" },
|
||||
{ name: "紅1", path: "../../admin/print/html/tablet-2.svg" },
|
||||
{ name: "紅2", path: "../../admin/print/html/tablet-2B.svg" }
|
||||
],
|
||||
@@ -572,6 +572,13 @@
|
||||
},
|
||||
changePrintSize() {
|
||||
|
||||
},
|
||||
changePosition() {
|
||||
//this.activeId = id;
|
||||
const el = this.elements.find(x => x.id === this.activeId);
|
||||
el.x=$('#xPosition').val();
|
||||
el.y = $("#yPosition").val();
|
||||
$(`.tablet-element[id="${this.activeId}"]`).css({ left: el.x + "mm", top: el.y + "mm" });
|
||||
},
|
||||
changePaper() {
|
||||
let paperSize = $("#paperSize").val()
|
||||
@@ -599,6 +606,9 @@
|
||||
.post(HTTP_HOST + 'api/tablet/SavePaperSize', ps)
|
||||
.then(response => {
|
||||
if (response.status == "200") {
|
||||
if (response.data.result=="Y") {
|
||||
alert("ok");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -926,7 +936,7 @@
|
||||
const id = `${prefix}-${Date.now()}-${i}`;
|
||||
this.elements.push({
|
||||
id, type: 'title', text: `正名${i}`, x: 100 - (i * 30), y: 80,
|
||||
style: { fontSize: 24, fontFamily: 'Kaiti', isVertical: true }
|
||||
style: { fontSize: 24, fontFamily: 'DFKai-sb', isVertical: true }
|
||||
});
|
||||
}
|
||||
//this.render();
|
||||
@@ -937,7 +947,7 @@
|
||||
|
||||
this.elements.push({
|
||||
id: 'combined-' + Date.now(), type: 'combined-center', text: '林張\n氏歷代祖先', x: 130, y: 80,
|
||||
style: { fontSize: 24, fontFamily: 'Kaiti', isVertical: true }
|
||||
style: { fontSize: 24, fontFamily: 'DFKai-sb', isVertical: true }
|
||||
});
|
||||
//this.render();
|
||||
},
|
||||
@@ -1015,7 +1025,11 @@
|
||||
await axios
|
||||
.post(HTTP_HOST + `api/tablet/${path}`, master)
|
||||
.then(response => {
|
||||
console.log(response);
|
||||
if (response.status == "200") {
|
||||
if (response.data.result == "Y") {
|
||||
alert("ok");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user