ZengTao
5 天以前 b8a043314eb644f45e3e110c75c29b19218c2ae8
UI-Project/src/views/hollow/hollowslicecage.vue
@@ -6,6 +6,7 @@
import {onBeforeUnmount, onMounted, onUnmounted, reactive, ref} from "vue";
import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
import {ElMessage, ElMessageBox} from 'element-plus'
import LackDetailDialog from './LackDetailDialog.vue';
const dialogFormVisibleaDownGlasss = ref(false)
const scanGlass = ref([])
const {t} = useI18n()
@@ -77,8 +78,23 @@
const cell9=ref(true);
const blindb = ref(false)
const dialogFormVisibleb = ref(false)
const dialogFormVisibleLack = ref(false)
const selectedRow = ref(null);
const temperingengineerId=ref('');
function nestedTableRowClassName(parentRow, row) {
  if (parentRow.isThroughSlot == true) {
    return 'row-red-background';
  }
  if (row.row?.sumCount !== undefined && row.row?.pairCount !== undefined && row.row.sumCount !== row.row.pairCount) {
    return 'sum-equal-pair-row' // 返回自定义类名
  }
  return '';
}
// 缺片详情
const handleSliceRack = (row) => {
  currentRow.flowCardId = row.flowCardId;
  dialogFormVisibleLack.value = true;
};
const handleBindRack = (row) => {
  selectedRow.value = row; // 更新选中的行数据  
  currentRow.deviceId  = row.deviceId; // 直接设置响应式属性  
@@ -550,13 +566,8 @@
   }));
    tableDataAlert.value = formattedData;
  if(data.lackDetailsList!=null){
    const summaries = data.lackDetailsList[0];
      const updatedData = summaries.map(summary => ({
        ...summary,
        totalNumber: summary.layer * summary.sumCount,
      }));
      tableDatass.value = updatedData;
  if(data.HollowAllFlowCard!=null){
    tableDatass.value = data.HollowAllFlowCard[0];
  }else{
    tableDatass.value = []
      }
@@ -631,52 +642,52 @@
}else{
  hollowPriority.value = ''
  }
  if(data.bigStorageCageInfos!=null){
    adjustedRects.value = data.bigStorageCageInfos[0][1].map((rect, index) => ({
    id: index + 1,
    height: 15/55,
    top: 64/55,
  }));
subRectsCounts.value = data.bigStorageCageInfos[0][1].map(rect => rect.count);
adjustedRectsa.value = data.bigStorageCageInfos[0][2].map((rect, index) => ({
    id: index + 1,
    height: 15/55,
    top: 64/55,
  }));
subRectsCountsa.value = data.bigStorageCageInfos[0][2].map(rect => rect.count);
adjustedRectsb.value = data.bigStorageCageInfos[0][3].map((rect, index) => ({
    id: index + 1,
    height: 15/55,
    top: 64/55,
  }));
subRectsCountsb.value = data.bigStorageCageInfos[0][3].map(rect => rect.count);
adjustedRectsc.value = data.bigStorageCageInfos[0][4].map((rect, index) => ({
    id: index + 1,
    height: 15/55,
    top: 64/55,
  }));
subRectsCountsc.value = data.bigStorageCageInfos[0][4].map(rect => rect.count);
adjustedRectsd.value = data.bigStorageCageInfos[0][5].map((rect, index) => ({
    id: index + 1,
    height: 15/55,
    top: 64/55,
  }));
subRectsCountsd.value = data.bigStorageCageInfos[0][5].map(rect => rect.count);
adjustedRectse.value = data.bigStorageCageInfos[0][6].map((rect, index) => ({
    id: index + 1,
    height: 15/55,
    top: 64/55,
  }));
subRectsCountse.value = data.bigStorageCageInfos[0][6].map(rect => rect.count);
//   if(data.bigStorageCageInfos!=null){
//     adjustedRects.value = data.bigStorageCageInfos[0][1].map((rect, index) => ({
//     id: index + 1,
//     height: 15/55,
//     top: 64/55,
//   }));
// subRectsCounts.value = data.bigStorageCageInfos[0][1].map(rect => rect.count);
// adjustedRectsa.value = data.bigStorageCageInfos[0][2].map((rect, index) => ({
//     id: index + 1,
//     height: 15/55,
//     top: 64/55,
//   }));
// subRectsCountsa.value = data.bigStorageCageInfos[0][2].map(rect => rect.count);
// adjustedRectsb.value = data.bigStorageCageInfos[0][3].map((rect, index) => ({
//     id: index + 1,
//     height: 15/55,
//     top: 64/55,
//   }));
// subRectsCountsb.value = data.bigStorageCageInfos[0][3].map(rect => rect.count);
// adjustedRectsc.value = data.bigStorageCageInfos[0][4].map((rect, index) => ({
//     id: index + 1,
//     height: 15/55,
//     top: 64/55,
//   }));
// subRectsCountsc.value = data.bigStorageCageInfos[0][4].map(rect => rect.count);
// adjustedRectsd.value = data.bigStorageCageInfos[0][5].map((rect, index) => ({
//     id: index + 1,
//     height: 15/55,
//     top: 64/55,
//   }));
// subRectsCountsd.value = data.bigStorageCageInfos[0][5].map(rect => rect.count);
// adjustedRectse.value = data.bigStorageCageInfos[0][6].map((rect, index) => ({
//     id: index + 1,
//     height: 15/55,
//     top: 64/55,
//   }));
// subRectsCountse.value = data.bigStorageCageInfos[0][6].map(rect => rect.count);
  }else{
    adjustedRects.value = '',
    adjustedRectsa.value = '',
    adjustedRectsb.value = '',
    adjustedRectsc.value = '',
    adjustedRectsd.value = '',
    adjustedRectse.value = ''
  }
//   }else{
//     adjustedRects.value = '',
//     adjustedRectsa.value = '',
//     adjustedRectsb.value = '',
//     adjustedRectsc.value = '',
//     adjustedRectsd.value = '',
//     adjustedRectse.value = ''
//   }
};
const getAlertText = (alarmCode) => {
  const codeMap = {
@@ -1104,29 +1115,34 @@
</div>
<el-card style="flex: 1; height: 500px; overflow-y: auto;">
  <div style="width: 100%; height: 100%; overflow: hidden;">
    <el-table
      ref="table"
      :data="tableDatass"
      :header-cell-style="{background:'#F2F3F5', color:'#1D2129'}"
      max-height="calc(500px - 35px)"
      style="width: 100%;"
    >
      <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.cardnumber')" min-width="139" />
      <el-table-column prop="layer" align="center" :label="$t('reportmanage.layer')" min-width="38" />
      <el-table-column prop="glassType" align="center" :label="$t('large.serialnumber')" min-width="80" />
      <el-table-column prop="thickness" align="center" :label="$t('hellow.thickness')" min-width="52" />
      <el-table-column prop="filmsId" align="center" :label="$t('hellow.coatingtypes')" min-width="62"/>
      <!-- <el-table-column prop="filmsId" align="center" :label="$t('hellow.coatingtypes')" min-width="62" show-overflow-tooltip/> -->
      <el-table-column prop="height" align="center" :label="$t('hellow.height')" min-width="55" />
      <el-table-column prop="width" align="center" :label="$t('hellow.width')" min-width="55" />
      <el-table-column prop="lackCount" align="center" :label="$t('hellow.missingnumber')" min-width="80" />
      <el-table-column prop="damageCount" align="center" :label="$t('large.brokenNum')"/>
      <!-- <el-table-column prop="patchCount" align="center" :label="$t('large.patchCount')"/> -->
      <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center"  min-width="82">
            <template #default="scope">
              <el-button type="text" plain  @click="handleMissingFilms(scope.row)">{{ $t('hellow.missingfilms') }}</el-button>
            </template>
        </el-table-column>
     <el-table ref="table" style="margin-top: 20px; height: 700px;" :data="tableDatass"
      :row-class-name="tableRowClassName" :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }"
      row-key="projectNumber">
      <el-table-column>
        <template #default="props">
          <el-table :data="props.row.flowCardGlassInfoDTOList" style="width: 100%"
            :row-class-name="(row) => nestedTableRowClassName(props.row, row)">
            <el-table-column prop="layer" fixed align="center" :label="$t('hellow.layernumber')" min-width="50" />
            <el-table-column prop="thickness" align="center" :label="$t('hellow.thickness')" min-width="50" />
            <el-table-column prop="filmsId" align="center" :label="$t('hellow.coatingtypes')" min-width="80" />
            <el-table-column prop="sumCount" align="center" :label="$t('hellow.totalnumber')" min-width="80" />
            <el-table-column prop="realCount" align="center" :label="$t('hellow.realpieces')" min-width="80" />
            <el-table-column prop="damageCount" align="center" :label="$t('hellow.damagenumber')" min-width="80" />
            <el-table-column prop="pairCount" align="center" :label="$t('hellow.pairsnumber')" min-width="100" />
          </el-table>
        </template>
      </el-table-column>
      <el-table-column prop="flowCardId" fixed align="center" :label="$t('hellow.cardnumber')" min-width="20" />
      <!-- <el-table-column prop="productName" fixed align="center" :label="$t('large.productname')" min-width="20" /> -->
      <!-- <el-table-column prop="customerName" fixed align="center" :label="$t('large.customerName')" min-width="20" /> -->
      <el-table-column fixed="right" :label="$t('hellow.operate')" align="center" width="82">
        <template #default="scope">
          <el-button type="text" plain @click="handleSliceRack(scope.row)">{{
            $t('hellow.missingfilms')
          }}
          </el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</el-card>
@@ -1297,6 +1313,12 @@
        <div>
  </div>
  </el-dialog>
  <!-- 缺片详情 -->
<LackDetailDialog
  v-model="dialogFormVisibleLack"
  :flow-card-id="currentRow.flowCardId"
  @refresh-data="fetchFlowCardId"
/>
  <!-- 多条破损数据 -->
  <el-dialog v-model="dialogFormVisibleb" top="15vh" width="70%" height="500">
    <el-button plain  @click="handleAllBroke">{{ $t('order.dilapidationAll') }}</el-button>