qinhb 2 дней назад
Родитель
Сommit
47f6b38609

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

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

+ 2 - 0
src/utils/common.ts

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

+ 17 - 3
src/views/pro-steps/components/screwdriver.vue

@@ -320,9 +320,9 @@ const startTest1 = (a, b, c) => {
 const showLable = (key) => {
   switch (key) {
     case "tipTemperature":
-      return "温度";
+      return "采集温度";
     case "CH5Val":
-      return "温度";
+      return "采集温度";
     case "CH6Val":
       return "湿度";
     case "DataTimes":
@@ -341,6 +341,10 @@ const showLable = (key) => {
       return "最终拧紧结果";
     case "totalCycles":
       return "总圈数";
+    case "weight":
+      return "重量";
+    case "setTemp":
+      return "设置温度";
     case "length":
       return "长度";
     case "height":
@@ -482,7 +486,9 @@ const configeObj = (type) => {
     case "GDC":
       return ["height"];
     case "WKDLT":
-      return ["tipTemperature"];
+      return ["tipTemperature","setTemp"];
+    case "CZSB":
+      return ["weight"];
     //电动螺丝刀
     case "DDLSD":
       return [
@@ -657,6 +663,14 @@ emitter.on(EventsNames.GETDATA_WKDLT, (name) => {
     }
   });
 });
+
+emitter.on(EventsNames.GETDATA_CZSB, (name) => {
+  materialsData.value.forEach((item, index) => {
+    if (item.deviceType == "CZSB" && item.deviceNo == name) {
+      setAcquisitionDatas(item.deviceNo, index);
+    }
+  });
+});
 </script>
 
 <style lang="scss" scoped>

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

@@ -88,7 +88,7 @@ const configeObj = (type) => {
     case "GDC":
       return ["height"];
     case "WKDLT":
-      return ["tipTemperature"];
+      return ["tipTemperature","setTemp"];
     //电动螺丝刀
     case "DDLSD":
       return [
@@ -106,7 +106,9 @@ const configeObj = (type) => {
 const showLable = (key) => {
   switch (key) {
     case "tipTemperature":
-      return "温度";
+      return "采集温度";
+    case "setTemp":
+      return "设置温度";
     case "CH5Val":
       return "CH5";
     case "CH6Val":

+ 5 - 2
src/views/traceability/components/excel.vue

@@ -14,11 +14,11 @@
         >
           <el-table :data="item.children" border>
             <el-table-column prop="formName" label="表格名称" />
-            <el-table-column prop="formType" label="表格类型">
+<!--            <el-table-column prop="formType" label="表格类型">
               <template #default="scope">
                 {{ dictS.getLableByValue("excel_type", scope.row.formType) }}
               </template>
-            </el-table-column>
+            </el-table-column>-->
             <el-table-column label="操作" prop="operation">
               <template #default="{ row }">
                 <el-button
@@ -72,6 +72,9 @@ const loading = ref(false);
 //  查看excel相关
 const excelDialogVisible = ref(false);
 const showExcelDialog = async (row) => {
+  if(row.writeData){
+    row.excelData = row.writeData
+  }
   excelData.value = row;
   excelDialogVisible.value = true;
 };