Liuteng 5 months ago
parent
commit
1d9ceeeab2

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "newsmzc",
-  "version": "1.0.0",
+  "version": "2.1.0",
   "private": true,
   "scripts": {
     "serve": "vue-cli-service serve",

+ 24 - 0
src/views/HVversion/VocationalWork/YiqiOffice/dyyyzz/components/xzyyzzqy.vue

@@ -18,6 +18,7 @@ export default {
       faceInfo: {},
       idCardInfo: {},
       data: [],
+      stateMap: null,
     };
   },
 
@@ -34,10 +35,33 @@ export default {
       this.idCardInfo = JSON.parse(idCardInfo);
     }
 
+    this.printerStateMap();
     this.getPrintStates();
   },
 
   methods: {
+    printerStateMap() {
+      const statusCodes = new Map([
+        ["003000002000", "正常"],
+        ["003001002001", "繁忙"],
+        ["003001002002", "卡纸"],
+        ["003001002003", "缺纸"],
+        ["003001002004", "脱机"],
+        ["003001002005", "出错"],
+        ["003001002006", "纸盒错误"],
+        ["003001002007", "休眠"],
+        ["003001002008", "预热"],
+        ["003001002009", "盖子打开"],
+        ["003001002799", "其他故障"],
+        ["003001002899", "未知错误"],
+        ["003002002000", "墨粉充足"],
+        ["003002002001", "墨粉量低"],
+        ["003002002002", "墨粉用光"],
+        ["003002002003", "墨盒异常"],
+      ]);
+      this.stateMap = statusCodes;
+    },
+    
     getIsTest() {
       return new Promise((resolve, reject) => {
         let form = {};

+ 24 - 0
src/views/HVversion/VocationalWork/YiqiOffice/dyyyzz_1/components/xzyyzzqy.vue

@@ -18,6 +18,7 @@ export default {
       faceInfo: {},
       idCardInfo: {},
       data: [],
+      stateMap: null,
     };
   },
 
@@ -34,10 +35,33 @@ export default {
       this.idCardInfo = JSON.parse(idCardInfo);
     }
 
+    this.printerStateMap();
     this.getPrintStates();
   },
 
   methods: {
+    printerStateMap() {
+      const statusCodes = new Map([
+        ["003000002000", "正常"],
+        ["003001002001", "繁忙"],
+        ["003001002002", "卡纸"],
+        ["003001002003", "缺纸"],
+        ["003001002004", "脱机"],
+        ["003001002005", "出错"],
+        ["003001002006", "纸盒错误"],
+        ["003001002007", "休眠"],
+        ["003001002008", "预热"],
+        ["003001002009", "盖子打开"],
+        ["003001002799", "其他故障"],
+        ["003001002899", "未知错误"],
+        ["003002002000", "墨粉充足"],
+        ["003002002001", "墨粉量低"],
+        ["003002002002", "墨粉用光"],
+        ["003002002003", "墨盒异常"],
+      ]);
+      this.stateMap = statusCodes;
+    },
+
     getIsTest() {
       return new Promise((resolve, reject) => {
         let form = {};