qinhb пре 4 месеци
родитељ
комит
f02881ac09

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

@@ -116,6 +116,12 @@ const addWebSocket = () => {
           JSON.parse(receivedMessage).content
         );
         break;
+      case "10":
+        emitter.emit(
+            EventsNames.GETDATA_WSD,
+            JSON.parse(receivedMessage).content
+        );
+        break;
       case "12":
         emitter.emit(
           EventsNames.GETDATA_YBKC,

+ 2 - 0
src/utils/common.ts

@@ -17,6 +17,8 @@ enum EventsNames {
   GETDATA_GDC = "GETDATA_GDC",
   //电烙铁
   GETDATA_WKDLT = "GETDATA_WKDLT",
+  //温湿度
+  GETDATA_WSD = "GETDATA_WSD",
 }
 
 export { emitter, EventsNames };

+ 34 - 33
src/views/pro-steps/components/screwdriver.vue

@@ -321,20 +321,20 @@ const showLable = (key) => {
   switch (key) {
     case "tipTemperature":
       return "温度";
-    case "CH5Val":
-      return "温度";
-    case "CH6Val":
-      return "湿度";
+    case "errCode":
+      return "错误代码";
+    case "Finalangle":
+      return "最终角度";
+    case "Finaltime":
+      return "最终时间";
+    case "Tighteningresult":
+      return "最终结果";
+    case "Finaltorque":
+      return "最终扭矩";
     case "DataTimes":
       return "采集时间";
-    case "torquetarget":
-      return "当前任务目标扭力";
-    case "tightenTorqueMax":
-      return "拧紧过程中最大扭力值";
     case "taskNo":
       return "当前任务号";
-    case "taskName":
-      return "任务名";
     case "warning":
       return "警报";
     case "tightenResult":
@@ -345,10 +345,10 @@ const showLable = (key) => {
       return "长度";
     case "height":
       return "高度";
-    case "DDLSD1":
-      return "拧紧的模式";
-    case "DDLSD2":
-      return "拧紧旋转方向";
+    case "ch1_temperature":
+      return "电烙铁通道1温度";
+    case "ch2_temperature":
+      return "电烙铁通道2温度";
     case "DDLSD3":
       return "目标扭力";
     case "DDLSD4":
@@ -373,10 +373,6 @@ const showLable = (key) => {
       return "扭力偏差下限";
     case "DDLSD14":
       return "扭力免检圈数";
-    case "DDLSD15":
-      return "拧松有效触发的扭力阀值";
-    case "DDLSD16":
-      return "拧松有效触发的保持时间";
     case "DDLSD17":
       return "自由旋转方向";
     case "DDLSD18":
@@ -409,12 +405,12 @@ const showLable = (key) => {
       return "STEP-01拧松速度";
     case "DDLSD32":
       return "STEP-02拧松圈数";
-    case "DDLSD33":
-      return "STEP-02拧松速度";
-    case "DDLSD34":
-      return "STEP-00自由圈数";
-    case "DDLSD35":
-      return "STEP-00自由速度";
+    case "humidity":
+      return "湿度";
+    case "temp":
+      return "温度";
+    case "ts":
+      return "时间";
     default:
       return key;
   }
@@ -476,23 +472,21 @@ const configeObj = (type) => {
   switch (type) {
     //温湿度
     case "WXDJC":
-      return ["CH5Val", "CH6Val"];
+      return ["temp", "humidity","errCode"];
     case "YBKC":
       return ["length"];
     case "GDC":
       return ["height"];
     case "WKDLT":
-      return ["tipTemperature"];
+      return ["ch1_temperature","ch2_temperature","errCode"];
     //电动螺丝刀
     case "DDLSD":
       return [
-        "taskName",
-        "taskNo",
-        "tightenResult",
-        "totalCycles",
-        "torquetarget",
-        "tightenTorqueMax",
-        "warning",
+        "Finaltorque",
+        "Finalangle",
+        "Finaltime",
+        "Tighteningresult",
+        "errCode",
       ];
     default:
       return ["数据1", "数据2", "数据3"];
@@ -657,6 +651,13 @@ emitter.on(EventsNames.GETDATA_WKDLT, (name) => {
     }
   });
 });
+emitter.on(EventsNames.GETDATA_WSD, (name) => {
+  materialsData.value.forEach((item, index) => {
+    if (item.deviceType == "WXDJC" && item.deviceNo == name) {
+      setAcquisitionDatas(item.deviceNo, index);
+    }
+  });
+});
 </script>
 
 <style lang="scss" scoped>

+ 20 - 22
src/views/traceability/components/collect.vue

@@ -107,16 +107,18 @@ const showLable = (key) => {
   switch (key) {
     case "tipTemperature":
       return "温度";
-    case "CH5Val":
-      return "CH5";
-    case "CH6Val":
-      return "CH6";
+    case "errCode":
+      return "错误代码";
+    case "Finalangle":
+      return "最终角度";
+    case "Finaltime":
+      return "最终时间";
+    case "Tighteningresult":
+      return "最终结果";
+    case "Finaltorque":
+      return "最终扭矩";
     case "DataTimes":
       return "采集时间";
-    case "torquetarget":
-      return "当前任务目标扭力";
-    case "tightenTorqueMax":
-      return "拧紧过程中最大扭力值";
     case "taskNo":
       return "当前任务号";
     case "warning":
@@ -129,10 +131,10 @@ const showLable = (key) => {
       return "长度";
     case "height":
       return "高度";
-    case "DDLSD1":
-      return "拧紧的模式";
-    case "DDLSD2":
-      return "拧紧旋转方向";
+    case "ch1_temperature":
+      return "电烙铁通道1温度";
+    case "ch2_temperature":
+      return "电烙铁通道2温度";
     case "DDLSD3":
       return "目标扭力";
     case "DDLSD4":
@@ -157,10 +159,6 @@ const showLable = (key) => {
       return "扭力偏差下限";
     case "DDLSD14":
       return "扭力免检圈数";
-    case "DDLSD15":
-      return "拧松有效触发的扭力阀值";
-    case "DDLSD16":
-      return "拧松有效触发的保持时间";
     case "DDLSD17":
       return "自由旋转方向";
     case "DDLSD18":
@@ -193,12 +191,12 @@ const showLable = (key) => {
       return "STEP-01拧松速度";
     case "DDLSD32":
       return "STEP-02拧松圈数";
-    case "DDLSD33":
-      return "STEP-02拧松速度";
-    case "DDLSD34":
-      return "STEP-00自由圈数";
-    case "DDLSD35":
-      return "STEP-00自由速度";
+    case "humidity":
+      return "湿度";
+    case "temp":
+      return "温度";
+    case "ts":
+      return "时间";
     default:
       return key;
   }