ZengTao
2025-02-18 4644a64be87033d1569e43cc672ed9c777eae43b
UI-Project/src/views/Returns/upreturns.vue
@@ -60,7 +60,8 @@
    if (response.code === 200) {
      tableData.splice(0, tableData.length, ...response.data);
      ElMessage.error(response.message);
    }
     window.localStorage.setItem('engineeringIda', tableData[0].engineeringId)
}
  } catch (error) {
  }
};
@@ -78,6 +79,7 @@
  canSelectProjecta.value = true;
  canSelectProjectb.value = true;
  canSelectProjectc.value = false;
  tableData.value = '';
}
};
onBeforeUnmount(() => {
@@ -113,11 +115,11 @@
      engineerId: selectedProjectNo.value,
      filmRemove: parseInt(filmRemove.value, 10),
    })
    window.localStorage.setItem('engineeringId', selectedProjectNo.value)
    window.localStorage.setItem('engineeringIda', selectedProjectNo.value)
    window.localStorage.setItem('filmRemove', filmRemove.value)
    if (response.code == 200) {
      ElMessage.success(response.message);
      // closeWebSocket(socket);
      closeWebSocket(socket);
      tableData.value = response.data;
      dialogFormVisible.value = false;
      selectedProjectNo.value = '';
@@ -134,7 +136,7 @@
// 结束工程
const deleteTask = async () => {
  try {
    let engineeringId = window.localStorage.getItem('engineeringId')
    let engineeringId = window.localStorage.getItem('engineeringIda')
    console.log(engineeringId);
    if (engineeringId !== '') {
      const response = await request.post('/loadGlass/engineering/engineering/deleteTask', {
@@ -165,13 +167,13 @@
// 开始上片
const handleon = async () => {
  let filmRemove = window.localStorage.getItem('filmRemove')
  let engineeringId = window.localStorage.getItem('engineeringId')
  let engineeringIda = window.localStorage.getItem('engineeringIda')
  if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') {
    try {
      const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
        stationCell: 5,
        filmRemove: filmRemove,
        engineerId: engineeringId,
        engineerId: engineeringIda,
        state: 1,
      })
      if (response.code == 200) {
@@ -179,7 +181,7 @@
        canSelectProjecta.value = false;
        canSelectProjectb.value = false;
        canSelectProjectc.value = true;
        // socket = initializeWebSocket(socketUrl, handleMessage);
        socket = initializeWebSocket(socketUrl, handleMessage);
        blind.value = false;
      } else {
        ElMessage.error(response.message);
@@ -195,7 +197,7 @@
const handleup = async () => {
  try {
    let filmRemove = window.localStorage.getItem('filmRemove')
    let engineeringId = window.localStorage.getItem('engineeringId')
    let engineeringId = window.localStorage.getItem('engineeringIda')
    console.log(engineeringId);
    if (engineeringId !== '') {
      const response = await request.post('/loadGlass/engineering/engineering/pause', {
@@ -382,10 +384,6 @@
        </el-button>
        <div style="margin-left: 70px;">{{ upstatus }}</div>
        <i :style="{ marginTop: '2px', backgroundColor: cuttingMachineStatusColor, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i>
        <el-button @click="confirmCutting" style="margin-left: 30px;margin-top: -3px;">{{
            $t('basicData.change')
          }}
        </el-button>
  </div>
    <el-button :disabled="!canSelectProjecta" style="margin-top: 5px;margin-left: 15px;"  type="primary" @click="selectproject">{{ $t('Mounting.previewproject') }}</el-button>
    <el-button :disabled="!canSelectProjectb" style="margin-top: 5px;margin-left: 20px;" type="success" @click="handleBind">{{ $t('basicData.startloading') }}</el-button>