严智鑫
2025-09-04 5bd56f3ebf96aa9a71e4a452cd2402df59d17384
UI-Project/src/views/FlipSlice/flipSlice.vue
@@ -76,6 +76,13 @@
      }
    });
    // 线下数据
    request.post("/deviceInteraction/tasking/selectGlassDownLine").then((res) => { // 替换为你的API端点
      if (res.code === 200) {
        // 假设后端返回的数据格式与 handleMessage 预期一致
        const responseData = res.data || {};
        downLineTask.value =responseData;
      }
    });
  } catch (err) {
    console.error('定时请求后端接口失败:', err);
  }
@@ -349,6 +356,35 @@
        })
      })
}
//删除线下玻璃
const deleteGlassDownLine = async () => {
  ElMessageBox.confirm(
      t('functionState.tips'),
      t('delivery.prompt'),
      {
        confirmButtonText: t('functionState.sure'),
        cancelButtonText: t('functionState.cancel'),
        type: 'warning',
      }
  )
      .then(() => {
        //上线接口
        request.post("/deviceInteraction/tasking/deleteGlassDownLine").then((res) => { // 替换为你的API端点
          if (res.code === 200) {
            ElMessage.success(res.message);
          } else {
            ElMessage.warning(res.message)
          }
        })
      })
      .catch(() => {
        ElMessage({
          type: 'info',
          message: t('functionState.cancel'),
        })
      })
}
const handleDialogClose = () => {
}
@@ -389,8 +425,8 @@
      <el-button :type="(findMachine['mode'] == '定制' ? 'danger' : 'success')" id="ButtonMachineMode"
                 @click="machineMode((findMachine['mode'] == 0 ? 1 : 0))">{{ findMachine['mode'] == 0 ?
          $t('functionState.modeD') : $t('functionState.modeB') }}</el-button>
      <el-button type="primary" id="ButtonTopLine" @click="topLineShow">{{ $t('functionState.topLine') }}</el-button>
      <el-button type="primary" id="deleteGlassDownLine" @click="deleteGlassDownLine">{{ $t('functionState.deleteDownLineGlass') }}</el-button>
      <!-- <el-button type="primary" id="searchButton" @click="downLine('下线')">下线</el-button>
      <el-button type="primary" id="searchButton" @click="workStatus('破损')">破损</el-button>
      <el-button type="primary" id="searchButton" @click="workStatus('完工')">完工</el-button> -->