wu
2024-09-18 f9945d84badac1949b8ff19cdbd9197203b09caa
Merge branch 'master' of http://10.153.19.25:10105/r/JiuMuMES
2个文件已修改
81 ■■■■ 已修改文件
UI-Project/src/lang/zh.js 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Marking/marking.vue 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/lang/zh.js
@@ -121,14 +121,50 @@
        page:'页面:',
        pagechoice:'请选择页面',
    },
    marking:{
    glassInfo: {
        number: '序号',
        glassId: '玻璃ID',
        batchNumber: '批次号',
        scanId: '扫码ID',
        programId: '程序ID',
        taskType: '任务类型',
        taskSequence: '任务顺序',
        taskQuantity: '任务数量',
        length: '长',
        width: '宽',
        thickness: '厚',
        drawingGlue: '点胶图纸',
        drawingMarking: '打标图纸',
        silkScreenX: '丝印X',
        silkScreenY: '丝印Y',
        isMarking: '是否打标',
        isSilkScreen: '是否丝印',
        workState: '任务状态',
        lineConfigurationId: '所在位置',
        state: '生产状态',
        glassState: '玻璃状态'
    },
    machine: {
        marking: '自动打标机',
        silkScreen:'自动丝印机',
        GlueDispenser:'自动点胶机'
    },
    functionState:{
        deleteTips:'是否确认破损?',
        delete :'删除',
        tips:'是否确认?',
        yes:'是',
        sure :'确认',
        cancel :'取消',
        canceled :'失败'
        canceled :'失败',
        anew :'重发',
        finish :'完工',
        lose :'破损',
        downLine :'下线',
        topLine :'上线',
        start :'开工',
        stop :'暂停'
    }
    ,
    mechanicalArm:{
UI-Project/src/views/Marking/marking.vue
@@ -14,6 +14,7 @@
});
const loadData = ref([]);
const findMachine = ref([]);
const machineId=11;//当前页面的设备ID
//使用WebSocket方式展示数据
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/deviceInteraction/api/talk/marking`;
@@ -75,7 +76,7 @@
//修改工作状态 【失败/正在工作/完工】
const workStatus = async(row,state) => {
  let url;
  if(state=="失败"){
  if(state=="重发"){
    url="/deviceInteraction/tasking/loseMachineTask";
  }else if(state=="正在工作"){
    url="/deviceInteraction/tasking/startMachineTask";
@@ -97,7 +98,7 @@
          //开始修改
          request.post(url,
            {
              "id": 11
              "id": machineId
            }).then((res) => { // 替换为你的API端点  
              if (res.code === 200) {
                ElMessage.success(res.message);
@@ -130,7 +131,7 @@
          //下线接口
          request.post("/deviceInteraction/machine/updateMachineState",
            {
              "id": 11,
              "id": machineId,
              "state": state
            }).then((res) => { // 替换为你的API端点  
              if (res.code === 200) {
@@ -216,16 +217,16 @@
</script>
<template>
  <div ref="content">
  <div ref="content" style="padding:0 20px;">
    <div id="div-title" style="font-size: 20px; font-weight: bold; margin:10px 0 10px 0;padding-left: 20px;">
      自动打标机
      {{$t('machine.marking')}}
    </div>
    <hr />
    <br>
    <div id="search" style="padding-left: 20px;">
    <div id="search" >
      <!-- 功能 -->
      <el-button type="primary" id="ButtonMachineStatus" @click="machineStatus((findMachine['state']=='暂停'?'开工':'暂停'))">{{findMachine['state']=='开工'?'开工':'暂停'}}</el-button>
      <el-button type="primary" id="ButtonTopLine" @click="topLine">上线</el-button>
      <el-button type="primary" id="ButtonMachineStatus" @click="machineStatus((findMachine['state']=='暂停'?'开工':'暂停'))">{{findMachine['state']=='开工'?$t('functionState.start'):$t('functionState.stop')}}</el-button>
      <el-button type="primary" id="ButtonTopLine" @click="topLine">{{$t('functionState.topLine')}}</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> -->
@@ -236,20 +237,20 @@
        :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }"
        :cell-style="{ textAlign: 'center' }">
        <!-- <el-table-column type="selection" min-width="30" /> -->
        <el-table-column type="index" label="序号" min-width="30" />
        <el-table-column prop="batchNumber" label="批次号" />
        <el-table-column prop="taskType" label="任务类型" />
        <el-table-column prop="glassId" label="玻璃编号" />
        <el-table-column prop="length" label="长" />
        <el-table-column prop="width" label="宽" />
        <el-table-column prop="thickness" label="厚" />
        <el-table-column prop="workState" label="状态" />
        <el-table-column type="index" :label="$t('glassInfo.number')" min-width="30" />
        <el-table-column prop="batchNumber" :label="$t('glassInfo.batchNumber')"/>
        <el-table-column prop="taskType" :label="$t('glassInfo.taskType')"/>
        <el-table-column prop="glassId" :label="$t('glassInfo.glassId')"/>
        <el-table-column prop="length" :label="$t('glassInfo.length')"/>
        <el-table-column prop="width" :label="$t('glassInfo.width')"/>
        <el-table-column prop="thickness" :label="$t('glassInfo.thickness')"/>
        <el-table-column prop="workState" :label="$t('glassInfo.workState')"/>
        <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
          <template #default="scope">
            <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '失败')">重发</el-button>
            <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '完工')">完工</el-button>
            <el-button size="mini" link type="primary" plain @click="damagedTask(scope.row)">破损</el-button>
            <el-button size="mini" link type="primary" plain @click="glassDownLine(scope.row)">下线</el-button>
            <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '重发')" >{{$t('functionState.anew')}}</el-button>
            <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '完工')">{{$t('functionState.finish')}}</el-button>
            <el-button size="mini" link type="primary" plain @click="damagedTask(scope.row)">{{$t('functionState.lose')}}</el-button>
            <el-button size="mini" link type="primary" plain @click="glassDownLine(scope.row)">{{$t('functionState.downLine')}}</el-button>
          </template>
        </el-table-column>
      </el-table>