src/components/Table/lims-table.vue
@@ -162,7 +162,7 @@
// plain:按elementUi 文档为准
// clickFun:按钮的回调函数
export default {
  name: "ZTTable",
  name: "LimsTable",
  filters: {
    typeFn(val, row) {
      if (typeof val === "function") {
@@ -264,11 +264,21 @@
  data() {
    return {
      spanList: [],
      btnWidth: "120px",
      uploadRefs: [],
      currentFiles: {}, // 用于存储每行的当前文件
      uploadKeys: {} // 用于动态重置组件
    };
  },
  computed: {
    btnWidth() {
      let width = 120;
      this.column.filter(item => item.dataType === 'action').forEach(item => {
        this.tableData.forEach(row => {
          width = Math.max(width, parseInt(this.getWidth(item.operation, row), 10));
        });
      });
      return `${width}px`;
    }
  },
  mounted() {
    this.calculateSpanInfo();
@@ -302,8 +312,7 @@
          count += a.name.length;
        }
      });
      this.btnWidth = count * 18 + 60 + "px";
      return count * 18 + 60 + "px";
      return count * 15 + 60 + "px";
    },
    getTitleWidth(row) {
      if (row.label.includes('时间') || row.label.includes('编号') || row.label.includes('样品名称') || row.label.includes('零件')) {
@@ -321,10 +330,11 @@
      }
    },
    iconFn(row) {
      if (Object.prototype.hasOwnProperty.call(row, 'icon')) {
        return row.icon;
      }
      if (row.name === "编辑" || row.name === "修改") {
        return "el-icon-edit";
      } else if (row.name === "删除") {
        return "el-icon-delete";
      } else if (row.name === "查看") {
        return "el-icon-view";
      } else {
@@ -492,19 +502,22 @@
  padding-left: 10px !important;
}
.lims-table .highlight-warning-row-border td:first-child {
.lims-table >>> .highlight-warning-row-border td:first-child {
  border-left: 4px solid #ffcd29;
}
.lims-table .highlight-warning-row-border td:last-child {
.lims-table >>> .highlight-warning-row-border td:last-child {
  border-right: 4px solid #ffcd29;
}
.lims-table .highlight-danger-row-border td:first-child {
.lims-table >>> .highlight-danger-row-border td:first-child {
  border-left: 4px solid #f56c6c;
}
.lims-table .highlight-danger-row-border td:last-child {
.lims-table >>> .highlight-danger-row-border td:last-child {
  border-right: 4px solid #f56c6c;
}
>>>.red-row td {
  background: #FFCCCC !important;
}
</style>