wangfei
2024-12-13 55aa572d4750c29b1bb6b21dae800a2dbe71a9d4
UI-Project/src/views/Returns/upreturns.vue
@@ -19,11 +19,10 @@
const dialoglea = ref(false)
const tableDatax = ref([])
const upstatus = ref(t('basicData.machineaa'));
const cuttingMachineStatusColor = ref('#911005'); // 用于动态设置i标签的背景色
const cuttingMachineStatusColor = ref('#911005');
const tableDataa = ref<any[]>([]);
const tableDatab = ref<any[]>([]);
const tableData = ref([])
// const tableData = reactive([]);
const titleSelectJson = ref({
  engineerId: [],
})
@@ -59,15 +58,12 @@
      ElMessage.error(response.message);
    }
  } catch (error) {
    // 处理请求失败的情况
    // ElMessage.error('获取表格数据失败,请重试');
  }
};
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/uploadGlass`;
const handleMessage = (data: any) => {
  tableDataa.value = data.list[0].slice(0, 2);
  // tableDatab.value = data.list[0].slice(2, 4);
};
onBeforeUnmount(() => {
  closeWebSocket();
@@ -100,7 +96,6 @@
    const response = await request.post('/loadGlass/up-patten-usage/selectUpPattenUsage', {
      stationCell: 5,
      engineerId: selectedProjectNo.value,
      // filmRemove: filmRemove.value,
      filmRemove: parseInt(filmRemove.value, 10),
    })
    window.localStorage.setItem('engineeringId', selectedProjectNo.value)
@@ -153,7 +148,6 @@
  let engineeringId = window.localStorage.getItem('engineeringId')
  if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') {
    try {
      // const response = await request.post('/loadGlass/engineering/engineering/pause', {
      const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
        stationCell: 5,
        filmRemove: filmRemove,
@@ -170,7 +164,6 @@
      console.error(error);
    }
  } else if (markingMachineStatus.value === '#911005' || cuttingMachineStatus.value === '#911005') {
    // 提示用户打标机未就绪
    ElMessage.warning(t('basicData.pausea'));
  }
}
@@ -213,7 +206,6 @@
  }
  const response = await request.post("/loadGlass/up-patten-usage/setUpPattenRequest", {
    state: selectValuesa[0],
    // state: stateList,
    stationCell: 5
  })
  if (response.code === 200) {
@@ -250,10 +242,9 @@
  blinda.value = true;
};
const toggleEnableState = async (row: any) => {
  // 检查 id 是否为空
  if (!row.id) {  
    ElMessage.error(t('basicData.updatanull'));  
    return; // 如果 id 为空,则不执行后续操作
    return;
  }  
  const newState = row.state === 100 ? 0 : 100;
  try {
@@ -268,7 +259,6 @@
    ElMessage.error(t('basicData.glassnull'));
  }
};
function getStatusType2(filmRemove) {
  switch (filmRemove) {
    case 0:
@@ -279,7 +269,6 @@
      return 'warning';
  }
}
function getStatusText2(filmRemove) {
  switch (filmRemove) {
    case 0:
@@ -334,7 +323,7 @@
    <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
        <el-table
            height="350"
            height="400"
            ref="table"
            :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
            :data="tableData"
@@ -346,7 +335,6 @@
          <el-table-column prop="filmsId" :label="$t('Mounting.loadinglinea')" align="center"/>
          <el-table-column :label="$t('Mounting.projectnumber')" align="center">
            <template #default="{ row }">
              <!-- 这里总是显示 1 -->
              <span>{{ 1 }}</span>
            </template>
          </el-table-column>
@@ -365,19 +353,6 @@
            </el-tag>
          </template>
      </el-table-column>
          <!-- <el-table-column prop="filmRemove" :label="$t('Mounting.removalmethodp')" align="center"/> -->
          <!-- <el-table-column
              align="center"
              :label="$t('Mounting.removalmethodp')"
              prop="filmRemove"
          >
            <template #default="scope">
              <el-tag :type="getStatusType2(scope.row.filmRemove)">
                {{ getStatusText2(scope.row.filmRemove) }}
              </el-tag>
            </template>
          </el-table-column> -->
          <!-- <el-table-column prop="stationCell" :label="$t('Mounting.loadinglinea')" align="center"/> -->
        </el-table>
      </div>
    </el-card>
@@ -387,8 +362,7 @@
          <img src="../../assets/shangpianji.png" alt=""
               style="max-width: 20%;max-height: 25%;margin-left: 10%;margin-top: 5%;">
          <el-table :data="tableDataa" border style="width: 75%;margin-top: 10%;margin-left: 8%;"
                    :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
          >
                    :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" >
            <el-table-column prop="workstationId" align="center" :label="$t('basicData.station')" min-width="60"/>
            <el-table-column prop="patternWidth" align="center" :label="$t('basicData.width')" min-width="80"/>
            <el-table-column prop="patternHeight" align="center" :label="$t('basicData.height')" min-width="80"/>
@@ -397,20 +371,6 @@
          </el-table>
    </div>
  </div>
      <!-- <div style="width: 48%;float: right;">
        <div style="display: flex;">
          <img src="../../assets/shangpianji.png" alt="" style="max-width: 25%;max-height: 25%;margin-left: 10%;margin-top: 5%;">
          <el-table :data="tableDatab" border style="width: 75%;margin-top: 10%;margin-left: 2%;"
       :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
          >
            <el-table-column prop="workstationId" align="center" :label="$t('basicData.station')" min-width="60" />
            <el-table-column prop="patternWidth" align="center" :label="$t('basicData.width')" min-width="80" />
            <el-table-column prop="patternHeight" align="center" :label="$t('basicData.height')" min-width="80" />
            <el-table-column prop="filmsId" align="center" :label="$t('basicData.coatingtypes')" min-width="80" />
            <el-table-column prop="number" align="center" :label="$t('basicData.quantity')" min-width="80" />
          </el-table>
      </div>
  </div> -->
</div>
  <el-dialog v-model="blind" top="30vh" width="25%" :title="$t('basicData.startfilm')">
    <template #footer>
@@ -439,14 +399,8 @@
        <el-table-column prop="line" fixed align="center" :label="$t('searchOrder.line')"/>
        <el-table-column prop="workProcesses" fixed align="center" :label="$t('searchOrder.process')"/>
        <el-table-column prop="teamsGroupsName" align="center" :label="$t('searchOrder.team')">
          <!-- <template #default="{ row }">
            <el-input v-model="row.teamsGroupsName" autocomplete="off" min-width="150"/>
          </template>   -->
        </el-table-column>
        <el-table-column prop="deviceName" align="center" :label="$t('searchOrder.basic')">
          <!-- <template #default="{ row }">
        <el-input v-model="row.deviceName" autocomplete="off" min-width="150"/>
      </template> -->
        </el-table-column>
        </el-table>
        <template #footer>
@@ -458,8 +412,7 @@
  <el-dialog v-model="blinda" top="24vh" width="30%" :title="$t('basicData.whetherpause')">
    <div style="margin-left: 50px;margin-bottom: 10px;">
    <el-form-item :label="$t('Mounting.loadingline')" :required="true">
      <el-select disabled v-model="stationCell" clearable :placeholder="$t('Mounting.inloadingline')"
                 style="margin-left: 20px;">
      <el-select disabled v-model="stationCell" clearable :placeholder="$t('Mounting.inloadingline')" style="margin-left: 20px;">
        <el-option :label="$t('Mounting.all')" value="0"></el-option>
        <el-option :label="$t('Mounting.oneloadingline')" value="1"></el-option>
        <el-option :label="$t('Mounting.twoloadingline')" value="2"></el-option>
@@ -520,22 +473,18 @@
  </el-dialog>
  </div>
</template>
<style scoped>
 .flex-container {  
  display: flex;  
  align-items: center; /* 垂直居中 */
  align-items: center;
}  
.flex-container .el-form-item {  
  flex: 1; /* 使每个表单项占据相等的空间 */
  flex: 1;
  margin-right: 0; /* 移除默认的右侧边距 */  
}  
.flex-container .el-form-item:last-child {  
  margin-left: 20px; /* 为第二个表单项添加左侧边距 */  
}
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
#dialog-footer{