From 1bf6023783ecfdb2e578b22145d9911099280b98 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 07 三月 2025 17:31:22 +0800
Subject: [PATCH] 下单页面调整

---
 src/views/business/inspectionOrder/index.vue |   57 +++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 35 insertions(+), 22 deletions(-)

diff --git a/src/views/business/inspectionOrder/index.vue b/src/views/business/inspectionOrder/index.vue
index 3014481..7c68b70 100644
--- a/src/views/business/inspectionOrder/index.vue
+++ b/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;
 }
 

--
Gitblit v1.9.3