Bläddra i källkod

添加电烙铁采集

qinhb 9 månader sedan
förälder
incheckning
3288a0a119

+ 6 - 0
src/components/RealTimeMsg/index.vue

@@ -132,6 +132,12 @@ const addWebSocket = () => {
           JSON.parse(receivedMessage).content
         );
         break;
+      case "14":
+        emitter.emit(
+          EventsNames.GETDATA_WKDLT,
+          JSON.parse(receivedMessage).content
+        );
+        break;
     }
   };
   ws.value.onclose = () => {

+ 2 - 0
src/utils/common.ts

@@ -15,6 +15,8 @@ enum EventsNames {
   GETDATA_YBKC = "GETDATA_YBKC",
   //高度尺
   GETDATA_GDC = "GETDATA_GDC",
+  //电烙铁
+  GETDATA_WKDLT = "GETDATA_WKDLT",
 }
 
 export { emitter, EventsNames };

+ 12 - 0
src/views/pro-steps/components/screwdriver.vue

@@ -338,6 +338,8 @@ const configeObj = (type) => {
       return ["length"];
     case "GDC":
       return ["height"];
+    case "WKDLT":
+      return ["temperature"];
     //电动螺丝刀
     case "DDLSD":
       return [
@@ -361,6 +363,9 @@ const addItem = (no, name, type, index) => {
     case "YBCK":
       data = { CH5Val: "", CH6Val: "", DataTimes: "" };
       break;
+    case "WKDLT":
+      data = {temperature:""};
+      break;
     case "GDC":
       data = { CH5Val: "", CH6Val: "", DataTimes: "" };
       break;
@@ -501,6 +506,13 @@ emitter.on(EventsNames.GETDATA_GDC, (name) => {
     }
   });
 });
+emitter.on(EventsNames.GETDATA_GDC, (name) => {
+  materialsData.value.forEach((item, index) => {
+    if (item.deviceType == "WKDLT" && item.deviceNo == name) {
+      setAcquisitionDatas(item.deviceNo, index);
+    }
+  });
+});
 </script>
 
 <style lang="scss" scoped>

+ 2 - 0
src/views/traceability/components/collect.vue

@@ -88,6 +88,8 @@ const configeObj = (type) => {
       return ["length"];
     case "GDC":
       return ["height"];
+    case "WKDLT":
+      return ["temperature"];
     //电动螺丝刀
     case "DDLSD":
       return [