zhoushihao
2025-03-10 976cee4892eec261f6c2927e788e476e5cc5028e
UI-Project/src/views/hollow/hollowequipmenttwo.vue
@@ -30,35 +30,8 @@
  </div>
     
    <div id="dotClass">
      <!-- <div style="margin-bottom: -5px;margin-left: 5px;"> -->
        <!-- <el-form> -->
          <!-- <el-row> -->
            <!-- <el-col :span="4">
              <div  style="font-size: 15px;">
                <el-form-item :label="$t('hellow.currenttask')" style="width: 14vw">
                  {{ temperingtotal }}
                </el-form-item>
              </div>
            </el-col> -->
            <!-- <el-col :span="5">
              <div style="font-size: 15px;">
                <el-form-item :label="$t('hellow.claimednumber')" style="width: 14vw">
                  {{ glasstotal }}
                </el-form-item>
              </div>
            </el-col> -->
            <!-- <el-col :span="4">
              <div style="font-size: 15px;">
                <el-form-item :label="$t('hellow.linenumber')" style="width: 14vw">
                  {{ fulltotals }}
                </el-form-item>
              </div>
            </el-col> -->
            <div style="margin-left: 70px;">{{ $t('hellow.freetwo') }}</div>
        <i :style="{ marginTop: '2px', backgroundColor: freetwo, width: '18px', height: '18px', borderRadius: '50%', display: 'block' }"></i>
          <!-- </el-row> -->
        <!-- </el-form> -->
      <!-- </div> -->
       </div>
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
        <el-table height="650" ref="table" :data="tableDataa"
@@ -95,6 +68,7 @@
    <div style="display: flex;">
    <el-input v-model="flowCardId" style="margin-left: 10px;margin-bottom: 10px;width: 240px;" :placeholder="$t('searchOrder.incardnumber')" />
    <el-input v-model="filmsId" style="margin-left: 10px;margin-bottom: 10px;width: 240px;" :placeholder="$t('film.infilms')"/>
    <el-input v-model="thickness" style="margin-left: 10px;margin-bottom: 10px;width: 240px;" :placeholder="$t('searchOrder.inthickness')"/>
    <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="fetchFlowCardsearch">
      {{$t('reportmanage.inquire')}}</el-button>
  </div>
@@ -494,7 +468,13 @@
      <el-table ref="table" style="margin-top: 20px;height: 400px;"
                :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
        <el-table-column prop="formulaName" fixed align="center" :label="$t('hellow.formulaNamep')"/>
        <el-table-column prop="filmRemove" fixed align="center" :label="$t('Mounting.removalmethodp')"/>
        <el-table-column prop="filmRemove" align="center" :label="$t('Mounting.removalmethodp')" min-width="110">
      <template #default="scope">
        <el-tag :type="getcasOnea(scope.row.filmRemove)">
          {{ getStatuscasOnea(scope.row.filmRemove) }}
        </el-tag>
      </template>
    </el-table-column>
        <el-table-column prop="topRemove" align="center" :label="$t('hellow.topRemovep')"> </el-table-column>
        <el-table-column prop="bottomRemove" align="center" :label="$t('hellow.bottomRemovep')"> </el-table-column>
        <el-table-column prop="leftRemove" align="center" :label="$t('hellow.leftRemovep')"> </el-table-column>
@@ -540,6 +520,7 @@
const filmRemove = ref('')
const formulaName = ref('')
const leftRemove = ref('')
const thickness = ref('')
const rightRemove = ref('')
const topRemove = ref('')
const filmsId = ref('')
@@ -592,8 +573,8 @@
    const allPageData = data;
    const currentPageKeyValue = currentPageKey.value;
    const currentPageData = allPageData[currentPageKeyValue];
    if (data.freeTwoReqvestEntity != null) {
    freetwo.value = data.freetwo[0] == true ? 'green' : '#911005';
    if (data.freeTwoRequestEntity != null) {
    freetwo.value = data.freeTwoRequestEntity[0] == true ? 'green' : '#911005';
  }
    // if (currentPageData && Array.isArray(currentPageData) && currentPageData.length > 0) {
    //   tableDataa.value = currentPageData[0];
@@ -606,12 +587,33 @@
};
onMounted(() => {
  socket = initializeWebSocket(socketUrl, handleMessage);
  window.localStorage.setItem('flowCardId', '')
});
onUnmounted(() => {
  if (socket) {
    closeWebSocket(socket);
  }
});
function getcasOnea(filmRemove) {
  switch (filmRemove) {
    case 1:
      return 'success';
    case 0:
      return 'warning';
    default:
      return 'info';
  }
}
function getStatuscasOnea(filmRemove) {
  switch (filmRemove) {
    case 1:
      return t('Mounting.removal');
    case 0:
      return t('Mounting.noremoval');
    default:
      return '';
  }
}
// 开始任务 
const handleBinda = (row) => {
  blinda.value = true;
@@ -690,6 +692,7 @@
    const response = await request.post('/hollowGlass/hollowGlassRelationInfo/queryHollowAllFlowCard',{
      filmsId: '',
      flowCardId: '',
      thickness: '',
    });
    if (response.code == 200) {
      ElMessage.success(response.message);
@@ -707,6 +710,7 @@
    const response = await request.post('/hollowGlass/hollowGlassRelationInfo/queryHollowAllFlowCard',{
      filmsId: filmsId.value,
      flowCardId: flowCardId.value,
      thickness: thickness.value
    });
    if (response.code == 200) {
      ElMessage.success(response.message);
@@ -765,6 +769,7 @@
      leftRemove.value = '';
      rightRemove.value = '';
      topRemove.value = '';
      fetchmulan()
    } else {
      ElMessage.error('Failed to fetch data');
    }
@@ -815,7 +820,8 @@
    const response = await request.post(url)
    if (response.code === 200) {
      ElMessage.success(response.message);
      } else {
      fetchmulan()
    } else {
      ElMessage.error(response.msg);
      }  
    }