From 51123d5ad145745f855280783c01cc2906b693d0 Mon Sep 17 00:00:00 2001
From: su1124 <1583764726@qq.com>
Date: 星期三, 24 一月 2024 18:00:20 +0800
Subject: [PATCH] su

---
 src/views/doctor/test/index.vue |   57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 56 insertions(+), 1 deletions(-)

diff --git a/src/views/doctor/test/index.vue b/src/views/doctor/test/index.vue
index 0282eaf..cc094a3 100644
--- a/src/views/doctor/test/index.vue
+++ b/src/views/doctor/test/index.vue
@@ -6,7 +6,7 @@
           @keyup.enter.native="handleQuery"></el-input>
       </el-form-item>
       <el-form-item label="浣撴鍙�" prop="tjNumber">
-        <el-input ref="inputName" v-model="queryParams.tjNumber" style="width: 240px" placeholder="璇疯緭鍏ヤ綋妫�鍙�" @blur="submitForm" @keyup.enter.native="submitForm"></el-input>
+        <el-input ref="inputName" v-model="queryParams.tjNumber" style="width: 240px" placeholder="璇疯緭鍏ヤ綋妫�鍙�"  @keyup.enter.native="submitForm" @blur="hb"></el-input>
       </el-form-item>
       <el-form-item>
         <el-button size="mini" type="primary" @click="submitForm">鎼滅储</el-button>
@@ -543,6 +543,7 @@
       queryParams: {
         page: 1,
         pageSize: 10,
+        pageNum:1,
         tjNumber: "",
         type: "",
         name: null,
@@ -585,6 +586,14 @@
       listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
         (response) => {
           this.userList = response.rows;
+          if (this.doctorName == null) {
+            this.userList.forEach((element) => {
+              const userName = this.$store.state.user.name;
+              if (userName == element.userName) {
+                this.doctorName = element.nickName;
+              }
+            });
+          }
         }
       );
       getInfo().then((response) => {
@@ -707,6 +716,12 @@
         }
 
       });
+    },
+     hb(){
+      console.log(this.queryParams.tjNumber);
+       if (this.queryParams.tjNumber != "") {
+        this.submitForm();
+      }
     },
 
     // 鎼滅储
@@ -1033,6 +1048,14 @@
 
         this.proParentList.sons.forEach((item) => {
           this.doctorName = item.doctorName;
+          if (this.doctorName == null) {
+            this.userList.forEach((element) => {
+              const userName = this.$store.state.user.name;
+              if (userName == element.userName) {
+                this.doctorName = element.nickName;
+              }
+            });
+          }
 
           if (item.isReturn == 1) {
             item.isReturn = true;
@@ -1139,6 +1162,14 @@
           this.userList.forEach((item) => {
             if (this.doctorName == item.nickName) {
               this.doctorName = item.userId;
+              if (this.doctorName == null) {
+            this.userList.forEach((element) => {
+              const userName = this.$store.state.user.name;
+              if (userName == element.userName) {
+                this.doctorName = element.nickName;
+              }
+            });
+          }
             }
           });
           this.proParentList.sons.forEach((item) => {
@@ -1203,6 +1234,14 @@
             }
             this.proParentList.sons.forEach((item) => {
               this.doctorName = item.doctorName;
+              if (this.doctorName == null) {
+            this.userList.forEach((element) => {
+              const userName = this.$store.state.user.name;
+              if (userName == element.userName) {
+                this.doctorName = element.nickName;
+              }
+            });
+          }
               if (item.isReturn == 1) {
                 item.isReturn = true;
               }
@@ -1257,6 +1296,14 @@
             }
             this.proParentList.sons.forEach((item) => {
               this.doctorName = item.doctorName;
+              if (this.doctorName == null) {
+            this.userList.forEach((element) => {
+              const userName = this.$store.state.user.name;
+              if (userName == element.userName) {
+                this.doctorName = element.nickName;
+              }
+            });
+          }
               if (item.isReturn == 1) {
                 item.isReturn = true;
               }
@@ -1298,6 +1345,14 @@
       this.userList.forEach((item) => {
         if (this.doctorName == item.nickName) {
           this.doctorName = item.userId;
+          if (this.doctorName == null) {
+            this.userList.forEach((element) => {
+              const userName = this.$store.state.user.name;
+              if (userName == element.userName) {
+                this.doctorName = element.nickName;
+              }
+            });
+          }
         }
       });
       this.proParentList.sons.forEach((item) => {

--
Gitblit v1.8.0