zouyu
2025-03-07 1bf6023783ecfdb2e578b22145d9911099280b98
src/views/business/inspectionOrder/index.vue
@@ -14,14 +14,18 @@
          <el-button size="medium" type="primary" @click="print"
            >标签打印</el-button
          >
          <el-button size="medium" type="primary" @click="playOrder(1)"
          <el-button
            size="medium"
            type="primary"
            @click="playOrder(1)"
            v-hasPermi="['business:order:add']"
            >下单</el-button
          >
        </el-col>
      </el-row>
    </div>
    <basic-container>
      <div class="search" :style="`height: ${more ? 130 : 80}px;`">
      <div class="search" :style="`height: ${more ? 100 : 50}px;`">
        <el-row :gutter="10" style="width: 100%">
          <el-col :span="20" style="display: flex; flex-wrap: wrap">
            <div class="search_thing" style="width: 20%">
@@ -160,7 +164,7 @@
      </div>
    </basic-container>
    <basic-container>
      <div style="width: 100%; height: 100%" v-show="active == 0">
      <div v-show="active == 0">
        <div class="table">
          <ul class="tab">
            <li
@@ -828,11 +832,15 @@
import vueQr from "vue-qr";
import getLodop from "@/utils/lodop";
import Add from "./add.vue";
import { mapGetters } from "vuex";
export default {
  components: {
    limsTable,
    Add,
    vueQr,
  },
  computed: {
    ...mapGetters(["permissions"]),
  },
  data() {
    return {
@@ -1369,16 +1377,21 @@
  beforeDestroy() {
    window.removeEventListener("resize", this.getTableHeight);
  },
  watch: {
    more() {
      this.getTableHeight();
    },
  },
  methods: {
    //获取表格高度
    getTableHeight() {
      const otherHeight = 400; // 其余高度
      const tableH = 50; // 距离页面下方的高度
      const tableHeightDetil = window.innerHeight - tableH;
      const otherHeight = this.more ? 430 : 380; // 其余高度
      const tableBottom = 50; // 距离页面下方的高度
      const tableHeightDetil = window.innerHeight - tableBottom;
      if (tableHeightDetil <= 300) {
        this.tableHeight = 200;
      } else {
        this.tableHeight = window.innerHeight - tableH - otherHeight;
        this.tableHeight = window.innerHeight - tableBottom - otherHeight;
      }
    },
    getDictList() {
@@ -1649,9 +1662,8 @@
        this.personList = res.data;
      });
    },
    refreshTable(e) {
      this.$refs["ValueTable"].selectList(e);
      this.queryCount = 0;
    refreshTable() {
      this.getList();
    },
    getTableData(newData) {
      if (newData && newData.length == 1) {
@@ -2204,7 +2216,7 @@
              this.deleteDialogVisible = false;
              this.printLoading = false;
              this.revokeData = [];
              this.refreshTable("page");
              this.refreshTable();
              this.$message.success("撤销成功");
            }
          });
@@ -2252,7 +2264,7 @@
            if (res.code === 200) {
              this.printLoading = false;
              this.deleteDialogVisible = false;
              this.refreshTable("page");
              this.refreshTable();
              this.$message.success("更新成功");
            }
          });
@@ -2307,7 +2319,7 @@
            if (res.code === 200) {
              this.printLoading = false;
              this.deleteDialogVisible = false;
              this.refreshTable("page");
              this.refreshTable();
              this.$message.success("更新成功");
            }
          });
@@ -2391,7 +2403,7 @@
          this.$message.success("修改成功");
          this.upLoad = false;
          this.issuedDialogVisible = false;
          this.refreshTable("page");
          this.refreshTable();
        })
        .catch((e) => {
          this.$message.error("修改失败");
@@ -2409,7 +2421,7 @@
            if (res.code === 200) {
              this.upLoad = false;
              this.quashDialogVisible = false;
              this.refreshTable("page");
              this.refreshTable();
              this.$message.success("更新成功");
            }
          });
@@ -2420,7 +2432,7 @@
            if (res.code === 200) {
              this.upLoad = false;
              this.quashDialogVisible = false;
              this.refreshTable("page");
              this.refreshTable();
              this.$message.success("更新成功");
            }
          });
@@ -2437,9 +2449,13 @@
    },
    // 下单
    playOrder(num) {
      this.$router.push({
        name: "addOrder",
        params: {},
      });
      this.active = num;
      this.examine = 0;
      this.refreshTable("page");
      // this.refreshTable();
    },
    handleTab(m, i) {
      this.tabIndex = i;
@@ -2489,9 +2505,6 @@
          this.componentData.tagField.orderType.select = res.data;
        });
    },
    getStyle() {
      return "height: calc(100% - " + (this.more ? "94" : "44") + "px)";
    },
    changeUser() {
      if (this.sonLaboratoryList.length > 0) {
        this.distributeData.sonLaboratory = this.sonLaboratoryList[0].value;
@@ -2509,7 +2522,7 @@
.search {
  background-color: #fff;
  height: 80px;
  height: 50px;
  display: flex;
  align-items: center;
  overflow: hidden;
@@ -2543,7 +2556,7 @@
.tab {
  list-style-type: none;
  display: flex;
  margin-bottom: 12px;
  /* margin-bottom: 12px; */
  padding-inline-start: 0px;
}