ZengTao
2024-07-18 06ab9d2c987383154fe7759e23be7f4a69bf4f33
UI-Project/src/views/Slicecage/slicecage.vue
@@ -69,8 +69,8 @@
const cell8=ref(true);
const cell9=ref(true);
const selectedRow = ref(null); // 存储选中的行数据  
    // 当前页码和每页显示的条数
    const currentPage = ref(1);
    const itemsPerPage = computed(() => {
@@ -94,14 +94,14 @@
        return 25; // 默认值,可以根据实际需求修改
      }
    });
    // 计算分页后的数据
    const paginatedUsers = computed(() => {
      const startIndex = calculateStartIndex();
      const endIndex = startIndex + itemsPerPage.value;
      return tableData.value.slice(startIndex, endIndex);
    });
    // 计算当前页的起始索引
    function calculateStartIndex() {
      let index = 0;
@@ -145,7 +145,7 @@
        currentPage.value++;
      }
    };
    // 总页数计算
    const totalPages = computed(() => {
      // let total = 0;
@@ -162,9 +162,9 @@
      // }
      return 9;
    });
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
@@ -452,7 +452,7 @@
      ElMessage.success(response.message);
      glassId.value = '';
      tableDataf.value = '';
      } else {  
      ElMessage.error(response.message);
      }  
@@ -548,14 +548,14 @@
            top: 29/length
          })); 
  }
  
};
// 初始化 WebSocket,并传递消息处理函数
onMounted(() => {
  // fetchFlowCardId();
  initializeWebSocket(socketUrl, handleMessage);
});
function getStatusType(enableState: number) {  
  switch (enableState) {  
@@ -1039,7 +1039,7 @@
          </el-input>
          <el-button type="primary" plain style="margin-left: 10px;" @click="searchout">{{ $t('searchOrder.search') }}</el-button>
    </div>
    <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 200px;">
        <el-table height="100%" ref="table"
        :data="tableDataf" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">