diff --git a/src/pages/Middle/Mold/InkjetPrinter/print.vue b/src/pages/Middle/Mold/InkjetPrinter/print.vue
index da11bf3..e5073f5 100644
--- a/src/pages/Middle/Mold/InkjetPrinter/print.vue
+++ b/src/pages/Middle/Mold/InkjetPrinter/print.vue
@@ -4,8 +4,8 @@
-
+
{{ (item.ip || '') + (item.ip ? ":" : '') + (item.port || '') }}
+
@@ -26,13 +30,15 @@
-
+
-
+
获取打印统计
@@ -44,9 +50,9 @@
Y
角度
- 字体
+ 字体
字号
- 间距
+ 间距
@@ -56,11 +62,9 @@
-
-
+
+
@@ -87,16 +91,29 @@ export default {
currentPrint: null,
table1Height: 300,
- addText:'',
+ addText: '',
InkjetPrinterData: [
],
fonts: [
{ value: 'Arial', label: 'Arial' }
],
+ fontSpacings: [
+ { value: 5, label: '5' },
+ { value: 4, label: '4' },
+ { value: 3, label: '3' },
+ { value: 2, label: '2' },
+ { value: 1, label: '1' },
+ { value: 0, label: '0' },
+ { value: -1, label: '-1' },
+ { value: -2, label: '-2' },
+ { value: -3, label: '-3' },
+ { value: -4, label: '-4' },
+ { value: -5, label: '-5' },
+ ],
detailsData: [
- { fileName: '080142-690844XAB', x: 0, y: 0, direction: 0, fontName: 'Arial', fontSize: 24, fontSpacing: 10 }
+ { fileName: '080142-690844XAB', x: 0, y: 0, direction: 0, fontName: 'Arial', fontSize: 100, fontSpacing: 10 }
]
@@ -115,7 +132,9 @@ export default {
},
// 函数
methods: {
-
+ pageSetting(row) {
+ this.$openPage("/InkjetPrinter/InkjetPrinterSetting/" + row.id); // 打开页面
+ },
filesInit() {
this.$mk.post({
url: this.actions.getFiles,
@@ -129,17 +148,17 @@ export default {
let ds = [];
let textList = a.textList || a.data.textList || [];
textList.forEach(text => {
- ds.push({ fileName: text, x: 0, y: 0, direction: 0, fontName: 'Arial', fontSize: 24, fontSpacing: 10 })
+ ds.push({ fileName: text, x: 0, y: 0, direction: 0, fontName: 'Arial', fontSize: 100, fontSpacing: 10 })
});
this.detailsData = ds;
}
});
},
- pageAdd(){
+ pageAdd() {
+
+ this.detailsData = [...this.detailsData, { fileName: this.addText || '', x: 0, y: 0, direction: 0, fontName: 'Arial', fontSize: 100, fontSpacing: 10 }]
- this.detailsData = [...this.detailsData ,{ fileName: this.addText || '', x: 0, y: 0, direction: 0, fontName: 'Arial', fontSize: 24, fontSpacing: 10 }]
-
},
printInit() {
@@ -195,7 +214,7 @@ export default {
pageStart(item) {
var sendData = {
id: this.$mk.toBigInt(item.id)
- };
+ };
this.$mk.post({
url: `${BASE_URL.BASE_URL}/InkjetPrinter/v1/start/machine`,
loading: "启动中...",
@@ -213,7 +232,7 @@ export default {
pageStop(item) {
var sendData = {
id: this.$mk.toBigInt(item.id)
- };
+ };
this.$mk.post({
url: `${BASE_URL.BASE_URL}/InkjetPrinter/v1/stop/machine`,
loading: "停止中...",
@@ -227,13 +246,13 @@ export default {
}
});
},
- pageGetPrintInfo() {
+ pageGetPrintInfo(row) {
if (!this.currentPrint) {
this.$mk.error("请先选择机器");
return;
}
- var sendData = {};
- sendData.id = this.$mk.toBigInt(this.currentPrint.id);
+ var sendData = {};
+ sendData.id = this.$mk.toBigInt(this.currentPrint.id);
this.$mk.post({
url: `${BASE_URL.BASE_URL}/InkjetPrinter/v1/get/print/statistics`,
loading: "获取中...",
@@ -243,7 +262,11 @@ export default {
if (a.code != 200) {
this.$mk.error(a.msg);
} else {
- console.log(a)
+ if (a.data && a.data.print_statistics) {
+ row.print_statistics = a.data.print_statistics;
+
+ this.$forceUpdate();
+ }
}
});
},
@@ -255,7 +278,7 @@ export default {
}
var sendData = Object.assign({}, item);
delete sendData._X_ROW_KEY;
- delete sendData.times;
+ delete sendData.print_statistics;
sendData.id = this.$mk.toBigInt(this.currentPrint.id);
sendData.contents = sendData.fileName;
this.$mk.post({
@@ -293,7 +316,7 @@ export default {
width: calc(33.33% - 20px);
/* 调整卡片宽度,包括间距 */
margin: 10px;
- padding: 20px;
+ padding: 15px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
@@ -313,6 +336,8 @@ export default {
font-size: 16px;
color: #333;
line-height: 1.5;
+ position: relative;
+ padding-bottom: 20px;
}
.printcard-content .ant-input {
@@ -334,4 +359,14 @@ export default {
.printcard-selected {
background-color: #b2d9f1;
}
+
+.printcard-toolbar {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ padding: 10px;
+ display: flex;
+ justify-content: flex-end;
+}
diff --git a/src/pages/Middle/Mold/InkjetPrinter/setting.vue b/src/pages/Middle/Mold/InkjetPrinter/setting.vue
index e9b1bd9..daec841 100644
--- a/src/pages/Middle/Mold/InkjetPrinter/setting.vue
+++ b/src/pages/Middle/Mold/InkjetPrinter/setting.vue
@@ -53,8 +53,20 @@ export default {
{ title: '复位打印统计', url: "/InkjetPrinter/v1/reset/print/statistics" },
{ title: '取消报警闪烁', url: "/InkjetPrinter/v1/cancel/alarm/flash" },
{ title: '设置打印延迟', postField: 'delay', url: "/InkjetPrinter/v1/set/print/delay", type: 'integer', value: 1000 },
- { title: '设置字体大小', postField: 'fontSize', url: "/InkjetPrinter/v1/font/size", type: 'integer', value: 80 },
- { title: '设置字体间距', postField: 'fontSpacing', url: "/InkjetPrinter/v1/font/spacing", type: 'integer', value: 80 },
+ { title: '设置字体大小', postField: 'fontSize',isNumber:true, url: "/InkjetPrinter/v1/font/size", type: 'integer', value: 80 },
+ { title: '设置字体间距', postField: 'fontSpacing', url: "/InkjetPrinter/v1/font/spacing", type: 'select',options: [
+ { value: 5, label: '5' },
+ { value: 4, label: '4' },
+ { value: 3, label: '3' },
+ { value: 2, label: '2' },
+ { value: 1, label: '1' },
+ { value: 0, label: '0' },
+ { value: -1, label: '-1' },
+ { value: -2, label: '-2' },
+ { value: -3, label: '-3' },
+ { value: -4, label: '-4' },
+ { value: -5, label: '-5' },
+ ] , value: 0 },
{
title: '设置打印上下翻转', postField: 'direction', url: "/InkjetPrinter/v1/set/print/flip", type: 'select', value: 0,
options: [{ value: 0, label: '上翻' }, { value: 1, label: '下翻' }]
@@ -141,6 +153,9 @@ export default {
if (item.postField) {
sendData[item.postField] = item.value;
}
+ if(item.isString){
+ sendData[item.postField] = item.value +"";
+ }
this.$mk.post({
url: `${BASE_URL.BASE_URL}` + item.url,
loading: "发送指令中...",