UI-Project/src/views/Slicecage/slicecage.vue
@@ -81,52 +81,10 @@
const printFlowCardId = ref('')
const printLayer = ref('')
const printGlassId = ref('')
const dialogTableVisible1 = ref(false)
const open1 = async (row) => {
printFlowCardId.value = row.flowCardId;
printLayer.value = row.layer
printGlassId.value = row.glassId
dialogTableVisible1.value = true;
setTimeout(() => {
  printFlowCard1();
  //dialogTableVisible1.value = false;
}, 1000);
}
const printFlowCard1 = () => {
  // 需要打印的局部区域赋予"print-wrap"的id
  let el = document.getElementById("printFlowCard");
  let doc = document;
  let body = doc.body || doc.getElementsByTagName("body")[0];
  let printId = "print-" + Date.now();
  // 创建无副作用的打印容器(因不确定页面的打印元素有无其它样式)
  let content = doc.createElement("div");
  content.id = printId;
  // 样式控制与打印无关的元素隐藏
  let style = doc.createElement("style");
  style.innerHTML =
    "body>#" +
    printId +
    "{display:none}@media print{" +
    "@page {" +
    "    size: auto; " +
    "    margin: 2mm 2mm 2mm 2mm;  " +
    "  }body>:not(#" +
    printId +
    "){display:none !important}body>#" +
    printId +
    "{display:block;padding-top:1px}}";
  //
  content.innerHTML = el.outerHTML;
  // // console.log("el.outerHTML", el.outerHTML);
  body.appendChild(style);
  // 与style元素设置的样式相配合
  // 把打印内容的元素添加到body(作为body的子元素,可用body的子选择器 '>' 控制打印样式)
  body.appendChild(content);
  setTimeout(() => {
    window.print();
    body.removeChild(content);
    body.removeChild(style);
  }, 20);
}
//     setInterval(() => {  
//     localStorage.clear(); // 清除所有localStorage数据  
@@ -149,7 +107,6 @@
}
const handlePageChange2 = (newPage) => {
  currentPage2.value = newPage;
  console.log(currentPage2.value);
  window.localStorage.setItem('pagenumber', currentPage2.value)
  fetchxiang(currentPage2.value);
};
@@ -174,7 +131,6 @@
      ElMessage.error(response.message);
    }
  } catch (error) {
    console.error(error);
  }
};
// 是否禁用
@@ -202,7 +158,6 @@
  row.isDamage = newState;   
}
catch (error) {
    console.error(error);
  }
}
 // 删除 
@@ -227,7 +182,6 @@
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  }  
}; 
 // 破损
@@ -251,8 +205,7 @@
      ElMessage.error(response.message);
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  } catch (error) {
  }  
}; 
// 历史任务
@@ -282,8 +235,7 @@
      ElMessage.error(response.message);
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  } catch (error) {
  }  
}; 
 // 出片
@@ -306,8 +258,7 @@
      ElMessage.error(response.message);
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  } catch (error) {
  }  
}; 
 // 出片队列破损
@@ -330,8 +281,7 @@
      ElMessage.error(response.message);
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  } catch (error) {
  }  
}; 
 // 指定钢化
@@ -358,8 +308,7 @@
      ElMessage.error(response.message);
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  } catch (error) {
  }  
  handleganghua();
}; 
@@ -383,8 +332,7 @@
      ElMessage.error(response.message);
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  } catch (error) {
  }  
}; 
// 取消指定
@@ -409,8 +357,7 @@
      ElMessage.error(response.message);
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  } catch (error) {
  }  
}; 
 // 指定流程卡
@@ -436,8 +383,7 @@
      ElMessage.error(response.message);
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  } catch (error) {
  }  
}; 
// 出片队列拿走
@@ -460,8 +406,7 @@
      ElMessage.error(response.message);
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  } catch (error) {
  }  
}; 
// 出片队列删除
@@ -488,8 +433,7 @@
      ElMessage.error(response.message);
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  } catch (error) {
  }  
}; 
// 完成任务
@@ -513,7 +457,6 @@
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  }  
}; 
// 确认添加
@@ -549,7 +492,6 @@
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  }  
};
const handleganghua = () => {
@@ -656,7 +598,6 @@
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
// 笼内详情
@@ -667,8 +608,6 @@
        temperingLayoutId: temperingLayoutId,
    })
    if (response.code == 200) {
      console.log(response.data);
      ElMessage.success(response.message);
      tableDatacagedetails.value = response.data
    } else {
@@ -676,8 +615,6 @@
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const fetchFlow = async () => {
@@ -704,8 +641,6 @@
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
function handleRowClick(row) {  
@@ -728,7 +663,6 @@
      }  
}
catch (error) {
    console.error(error);
  }
}
// 调度开关
@@ -747,7 +681,6 @@
      }  
}
catch (error) {
    console.error(error);
  }
}
// 任务重置
@@ -770,8 +703,7 @@
      ElMessage.error(response.msg);
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  } catch (error) {
  }  
}; 
let socket = null;
@@ -1026,8 +958,6 @@
  const backendTime = new Date(globalDate);
  const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 减去7天
  oneWeekAgo.setHours(0, 0, 0, 0);
  console.log(formatTimestamp(oneWeekAgo));
  console.log(oneWeekAgo);
  timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)];
  window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo))
}
@@ -1149,10 +1079,9 @@
        <i :style="{ marginTop: '2px', backgroundColor: outRequestEntity, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i>
  </div>
    <div class="table-container">
    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;" v-loading="loading">
    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 300px;">
       <el-table height="300px" ref="table" 
        @selection-change="handleSelectionChange"
        :row-class-name="tableRowClassName"
        :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="glassId" align="center" :label="$t('searchOrder.intoglassid')" min-width="140" />
@@ -1173,7 +1102,7 @@
        </el-table>
       </div>
    </el-card>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;" v-loading="loading">
    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;">
      <el-table height="300px" ref="table" 
       :data="tableDatac" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
         <el-table-column prop="glassId" align="center" :label="$t('searchOrder.outputglassID')" min-width="140" />
@@ -1268,7 +1197,7 @@
    </div>
</div>
</div>
<el-card style="flex: 1;margin-left: 1220px;margin-top: -510px;" v-loading="loading">
<el-card style="flex: 1;margin-left: 1220px;margin-top: -510px;">
      <div style="width: 100%; height: calc(100% - 35px); overflow-y: auto;max-height: 420px;">
       <el-table height="420px" ref="table" border 
       :data="tableDatass" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
@@ -1680,10 +1609,6 @@
        </el-table-column>
        </el-table> -->
</el-dialog>
        <el-dialog id="sizePrintCalrd1" v-model="dialogTableVisible1" destroy-on-close>
    <print-label id="printFlowCard" :printFlowCardId="printFlowCardId" :printLayer="printLayer"
                 :printGlassId="printGlassId" style=""/>
  </el-dialog>
</template>
<style>
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}