From b2e0bcff3ced2ac14a5de6511bff05b6a5045372 Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期五, 11 四月 2025 13:30:42 +0800
Subject: [PATCH] qx

---
 src/views/system/tijian/index.vue     |    9 ++-
 src/views/sampling/sampling/index.vue |  139 ++++++++++++++++++++++++----------------------
 src/views/hosp/project/index.vue      |   18 ++++-
 3 files changed, 92 insertions(+), 74 deletions(-)

diff --git a/src/views/hosp/project/index.vue b/src/views/hosp/project/index.vue
index 0ee06f4..c907204 100644
--- a/src/views/hosp/project/index.vue
+++ b/src/views/hosp/project/index.vue
@@ -9,7 +9,7 @@
         <div class="scrollable-container">
           <div class="content">
             <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
-              :filter-node-method="filterNode" ref="tree" node-key="id" :default-expanded-keys="treeId"
+              :filter-node-method="filterNode" ref="tree1" node-key="id" :default-expanded-keys="treeId"
               highlight-current @node-click="handleNodeClick" :render-content="renderContent" v-loading="loadings" />
           </div>
         </div>
@@ -549,7 +549,7 @@
           const lastId = newVal[newVal.length - 1] || "532";
           const node = this.findNodeById(this.deptOptions, lastId);
           if (node) {
-            this.$refs.tree.setCurrentKey(lastId);
+            this.$refs.tree1.setCurrentKey(lastId);
             const nodeElement = document.querySelector(`.el-tree-node[data-key="${lastId}"] .el-tree-node__content`);
             if (nodeElement) {
               nodeElement.click();
@@ -587,7 +587,7 @@
   },
   methods: {
     debounceFilter: debounce(function (val) {
-      this.$refs.tree.filter(val);
+      this.$refs.tree1.filter(val);
     }, 300),
     precomputePinyin() {
       const traverse = (nodes) => {
@@ -872,6 +872,11 @@
       getAllChildListById(data).then(() => {
         this.loading = false;
       });
+      this.deptName = "";
+      // 鎵嬪姩璋冪敤杩囨护鏂规硶锛堥渶绛夊緟 DOM 鏇存柊锛�
+      this.$nextTick(() => {
+        this.$refs.tree1.filter(this.deptName);
+      });
     },
     handleClose() {
       this.cancel();
@@ -910,7 +915,7 @@
     resetQuery() {
       this.resetForm("queryForm");
       this.queryParams.proId = undefined;
-      this.$refs.tree.setCurrentKey(null);
+      this.$refs.tree1.setCurrentKey(null);
       this.handleQuery();
     },
     flexColumnWidth(column) {
@@ -1067,6 +1072,11 @@
           }
         }
       });
+      this.deptName = "";
+      // 鎵嬪姩璋冪敤杩囨护鏂规硶锛堥渶绛夊緟 DOM 鏇存柊锛�
+      this.$nextTick(() => {
+        this.$refs.tree1.filter(this.deptName);
+      });
     },
     processSubmission(isUpdate, isY) {
       if (isUpdate) {
diff --git a/src/views/sampling/sampling/index.vue b/src/views/sampling/sampling/index.vue
index a2a25db..5f05186 100644
--- a/src/views/sampling/sampling/index.vue
+++ b/src/views/sampling/sampling/index.vue
@@ -105,8 +105,9 @@
       </div>
       <div style="width: 50%">
         <!-- v-if="this.rightTabShow" -->
-        <el-table :key="tableKey" :row-key="getRowKey" v-if="tableList.length > 0" v-loading="loading" :data="tableList" @selection-change="handleChange"
-          :span-method="objectSpanMethod" ref="tab1" :row-class-name="tableRowClassName" border height="520px">
+        <el-table :key="tableKey" :row-key="getRowKey" v-if="tableList.length > 0" v-loading="loading" :data="tableList"
+          @selection-change="handleChange" :span-method="objectSpanMethod" ref="tab1"
+          :row-class-name="tableRowClassName" border height="520px">
           <el-table-column type="selection" width="40" align="center" />
           <!--  :selectable="selectEnable" -->
           <!-- <el-table-column label="鏄惁绛炬敹" align="center" prop="isSignFor" /> -->
@@ -298,7 +299,7 @@
         proName: null,
       },
       startTime: "",
-     tableKey : "",
+      tableKey: "",
       pickerOptions: {
         shortcuts: [
           {
@@ -534,41 +535,41 @@
     },
     /** 鏌ヨ浣撴閲囨牱绠$悊鍒楄〃 */
     /** 鏌ヨ浣撴閲囨牱绠$悊鍒楄〃 */
-getList() {
-  this.queryParams.compId = this.CheckBox.drugManufacturerId;
-  this.loading1 = true;
-  this.queryParams.isSignFor = this.tjStatus;
+    getList() {
+      this.queryParams.compId = this.CheckBox.drugManufacturerId;
+      this.loading1 = true;
+      this.queryParams.isSignFor = this.tjStatus;
 
-  if (this.createTimeList) {
-    this.queryParams.beginTime = this.createTimeList[0];
-    this.queryParams.endTime = this.createTimeList[1];
-  } else {
-    this.queryParams.beginTime = null;
-    this.queryParams.endTime = null;
-  }
-
-  getList(this.queryParams).then((response) => {
-    this.loading1 = false;
-    if (response.data && response.data.list && response.data.list.length > 0) {
-      this.samplingList = response.data.list;
-      this.total = response.data.total;
-      // 绉婚櫎榛樿閫変腑绗竴琛岀殑閫昏緫
-      // this.$nextTick(() => {
-      //   this.$refs.tb.toggleRowSelection(this.samplingList[0], true); // 榛樿閫変腑绗竴琛�
-      //   this.fetchData(this.samplingList[0].tjNumber); // 鍒锋柊鍙充晶琛ㄦ牸
-      // });
-    } else {
-      this.samplingList = [];
-      this.tableList = [];
-      this.selectList = []; // 娓呯┖ selectList
-      this.ids = []; // 娓呯┖ ids
-      if (this.$refs.tab1) {
-        this.$refs.tab1.clearSelection(); // 娓呯┖鍙充晶琛ㄦ牸閫変腑鐘舵��
+      if (this.createTimeList) {
+        this.queryParams.beginTime = this.createTimeList[0];
+        this.queryParams.endTime = this.createTimeList[1];
+      } else {
+        this.queryParams.beginTime = null;
+        this.queryParams.endTime = null;
       }
-    }
-    this.loading1 = false;
-  });
-},
+
+      getList(this.queryParams).then((response) => {
+        this.loading1 = false;
+        if (response.data && response.data.list && response.data.list.length > 0) {
+          this.samplingList = response.data.list;
+          this.total = response.data.total;
+          // 绉婚櫎榛樿閫変腑绗竴琛岀殑閫昏緫
+          // this.$nextTick(() => {
+          //   this.$refs.tb.toggleRowSelection(this.samplingList[0], true); // 榛樿閫変腑绗竴琛�
+          //   this.fetchData(this.samplingList[0].tjNumber); // 鍒锋柊鍙充晶琛ㄦ牸
+          // });
+        } else {
+          this.samplingList = [];
+          this.tableList = [];
+          this.selectList = []; // 娓呯┖ selectList
+          this.ids = []; // 娓呯┖ ids
+          if (this.$refs.tab1) {
+            this.$refs.tab1.clearSelection(); // 娓呯┖鍙充晶琛ㄦ牸閫変腑鐘舵��
+          }
+        }
+        this.loading1 = false;
+      });
+    },
     // 鍙栨秷鎸夐挳
     cancel() {
       this.open = false;
@@ -661,6 +662,7 @@
       // 璋冭瘯鏃ュ織
       console.log(`褰撳墠閫変腑鏁伴噺: ${selectedCount}`);
       console.log(`鏄惁绂佺敤閫夋嫨: ${this.disableSelections}`);
+
     },
 
     getRowKey(row) {
@@ -679,6 +681,9 @@
                 if (this.$refs.tab1) {
                   this.$refs.tab1.doLayout(); // 淇敼涓烘纭殑 ref 鍚嶇О
                   this.$refs.tab1.clearSelection(); // 娓呯┖閫変腑鐘舵��
+                  const headerCheckbox = this.$refs.tab1.$el.querySelector('.el-table__header .el-checkbox');
+                  if (headerCheckbox) headerCheckbox.style.display = 'inline';
+
                 }
               });
               resolve(this.tableList);
@@ -1004,37 +1009,37 @@
         });
     },
     // 鍗曢�夋寜閽�
-   // 鍗曢�夋寜閽�
-radioChange(value) {
-  this.loading = true;
-  this.queryParams.isSignFor = value;
-  getList(this.queryParams).then((response) => {
-    if (response.data) {
-      if (response.data.list == null) {
-        this.samplingList = [];
-        this.tableList = [];
-        this.loading = false;
-      } else {
-        this.samplingList = response.data.list;
-        this.loading = false;
-        // 绉婚櫎榛樿閫変腑绗竴琛岀殑閫昏緫
-        // if (this.samplingList.length != 0) {
-        //   this.$nextTick(() => {
-        //     this.$refs.tb.toggleRowSelection(this.samplingList[0], true);
-        //   });
-        // } else {
-        //   this.$refs.tb.clearSelection();
-        // }
-      }
-      this.total = response.data.total;
-      this.loading = false;
-    } else {
-      this.samplingList = [];
-      this.tableList = [];
-      this.loading = false;
-    }
-  });
-},
+    // 鍗曢�夋寜閽�
+    radioChange(value) {
+      this.loading = true;
+      this.queryParams.isSignFor = value;
+      getList(this.queryParams).then((response) => {
+        if (response.data) {
+          if (response.data.list == null) {
+            this.samplingList = [];
+            this.tableList = [];
+            this.loading = false;
+          } else {
+            this.samplingList = response.data.list;
+            this.loading = false;
+            // 绉婚櫎榛樿閫変腑绗竴琛岀殑閫昏緫
+            // if (this.samplingList.length != 0) {
+            //   this.$nextTick(() => {
+            //     this.$refs.tb.toggleRowSelection(this.samplingList[0], true);
+            //   });
+            // } else {
+            //   this.$refs.tb.clearSelection();
+            // }
+          }
+          this.total = response.data.total;
+          this.loading = false;
+        } else {
+          this.samplingList = [];
+          this.tableList = [];
+          this.loading = false;
+        }
+      });
+    },
 
     // 榛樿鎺ュ彈鍥涗釜鍊� { 褰撳墠琛岀殑鍊�, 褰撳墠鍒楃殑鍊�, 琛岀殑涓嬫爣, 鍒楃殑涓嬫爣 }
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue
index 97c63ae..238e654 100644
--- a/src/views/system/tijian/index.vue
+++ b/src/views/system/tijian/index.vue
@@ -1289,7 +1289,8 @@
       // }
       if (!value) return true;
       if (data.proName.indexOf(value) !== -1) return true;
-      if (data.proEngName.indexOf(value) !== -1) return true;
+      let values = value.toLowerCase();
+      if (data.proEngName.indexOf(values) !== -1) return true;
       // 鍖归厤灏忓啓
       let arr = data.proName.spell('low', 'array');
       let spell = arr.join('');
@@ -1313,7 +1314,8 @@
       if (data.zhmc.indexOf(value) !== -1) {
         return data.zhmc.indexOf(value) !== -1;
       } else {
-        return data.pym.indexOf(value) !== -1;
+        let values = value.toLowerCase();
+        return data.pym.indexOf(values) !== -1;
       }
     },
     beforeDestroy() {
@@ -2280,7 +2282,8 @@
         dwId: this.form.firmId,
       };
       if (this.name) {
-        getPackageListName(this.name).then((response) => {
+        let name= this.name.toLowerCase()
+        getPackageListName(name).then((response) => {
           this.newpacName = response.data;
           this.loading = false;
         });

--
Gitblit v1.8.0