From c26281ff05585d8f3f337b290831803fe766748b Mon Sep 17 00:00:00 2001
From: su1124 <1583764726@qq.com>
Date: 星期二, 02 一月 2024 18:31:44 +0800
Subject: [PATCH] su

---
 src/views/doctor/check/index.vue |  118 ++++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 100 insertions(+), 18 deletions(-)

diff --git a/src/views/doctor/check/index.vue b/src/views/doctor/check/index.vue
index 0af36fa..7aca135 100644
--- a/src/views/doctor/check/index.vue
+++ b/src/views/doctor/check/index.vue
@@ -215,7 +215,11 @@
                 <el-radio-button label="1">绉戝浼氳瘖</el-radio-button>
               </el-radio-group>
             </el-form-item>
-            <el-form-item label="閫夋嫨绉戝" v-if="form.hzType == '1'">
+            <el-form-item
+              label="閫夋嫨绉戝"
+              v-if="form.hzType == '1'"
+              style="margin-top: 22px"
+            >
               <el-select
                 v-model="form.hzDeptId"
                 multiple
@@ -230,7 +234,11 @@
                 ></el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="鐢宠浜�" prop="hzDoctorId" style="margin-top:22px">
+            <el-form-item
+              label="鐢宠浜�"
+              prop="hzDoctorId"
+              style="margin-top: 22px"
+            >
               <el-select
                 v-model="form.hzDoctorId"
                 placeholder="璇烽�夋嫨"
@@ -471,6 +479,11 @@
             >鍘嗗彶鎶ュ憡</el-button
           >
         </div>
+        <div style="margin: 10px 10px">
+          <el-button type="primary" size="mini" @click="jianqian"
+            >妫�鍓嶉棶璇�</el-button
+          >
+        </div>
       </div>
 
       <el-row>
@@ -689,6 +702,7 @@
         </el-col>
         <el-col :span="6">
           <Historicalreport
+            v-show="lishi"
             :reportHistorydata="reportHistorydata"
           ></Historicalreport>
         </el-col>
@@ -736,11 +750,28 @@
       </div> -->
     </el-drawer>
     <Public ref="aaa" :row="row" @add="handleChanges" />
+
+    <el-dialog
+      title="鎻愮ず"
+      :visible.sync="jianqians"
+      width="1000px"
+      :before-close="handleClose1"
+    >
+      <jianqianwenzhen
+        :jianqianwenzhendata="jianqianwenzhendata"
+        v-if="flags"
+      ></jianqianwenzhen>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="jianqians = false">鍙� 娑�</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
 
 <script>
+import { getInfoById } from "@/api/hosp/history";
+import jianqianwenzhen from "@/components/jianqianwenzhen";
 import Public from "@/components/public";
 import { getPdf } from "@/api/hosp/order";
 import { getInfo } from "@/api/login";
@@ -763,9 +794,13 @@
 export default {
   dicts: ["sys_user_sex", "sys_yes_no", "tj_result_type", "lj_positive"],
   name: "check",
-  components: { Public, Historicalreport },
+  components: { Public, Historicalreport, jianqianwenzhen },
   data() {
     return {
+      flags: false,
+      lishi: false,
+      jianqianwenzhendata: [],
+      jianqians: false,
       selected: false,
       checkval: false,
       // 閬僵灞�
@@ -840,6 +875,7 @@
       deptId: "",
       userId: "",
       nickName: "",
+      doctorNames: "",
       date: new Date(new Date().getTime() + 8 * 3600 * 1000)
         .toJSON()
         .substr(0, 19)
@@ -853,7 +889,9 @@
         name: null,
       },
       rules: {
-        hzType: [{ required: true, message: "浼氳瘖绉戝涓哄繀濉」", trigger: "change" }],
+        hzType: [
+          { required: true, message: "浼氳瘖绉戝涓哄繀濉」", trigger: "change" },
+        ],
       },
     };
   },
@@ -888,6 +926,12 @@
       listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
         (response) => {
           this.userList = response.rows;
+          this.userList.forEach((element) => {
+            const userName = this.$store.state.user.name;
+            if (userName == element.userName) {
+              this.doctorName = element.nickName;
+            }
+          });
         }
       );
       getInfo().then((response) => {
@@ -899,6 +943,9 @@
     },
     handleClose() {
       this.$tab.refreshPage();
+    },
+    handleClose1() {
+      this.jianqians = false;
     },
     // 鑾峰彇鍖荤敓
     selName(val) {
@@ -1170,16 +1217,15 @@
     },
 
     hadleedit(row) {
-      console.log(row, 111);
       this.form.hzType = row.hzType;
       this.form.id = row.id;
-      this.form.hzDeptId = row.hzDeptNameList;
+      // this.form.hzDeptId = row.hzDeptNameList;
       // row.hzDeptIdList.forEach(item=>{
       //   console.log(item,222);
       //   this.deptList.forEach(items=>{
       //      console.log(item,333);
       //      if(item == items.deptId){
-      //       this.form.hzDeptNameList = 
+      //       this.form.hzDeptNameList =
       //      }
       //   })
       // })
@@ -1256,20 +1302,19 @@
                 hzDoctorName: this.form.hzDoctorName,
                 id: this.form.id,
               };
-              if(this.form.hzDeptId.length != 0){
+              if (this.form.hzDeptId.length != 0) {
                 addHzlog(data).then((res) => {
-                if (res.code == 200) {
-                  this.$modal.msgSuccess("鐢宠鎴愬姛");
-                  this.form = {};
-                  this.Hzlog();
-                  this.radioChange(1);
-                }
-              });
-              this.open = false;
-              }else{
+                  if (res.code == 200) {
+                    this.$modal.msgSuccess("鐢宠鎴愬姛");
+                    this.form = {};
+                    this.Hzlog();
+                    this.radioChange(1);
+                  }
+                });
+                this.open = false;
+              } else {
                 this.$modal.msgError("璇烽�夋嫨浼氳瘖绉戝");
               }
-              
             }
           }
         });
@@ -1296,7 +1341,20 @@
         if (res.data[0] != null) {
           this.reportHistorydata = res.data;
         }
+        if (this.reportHistorydata.length >= 1) {
+          this.lishi = true;
+        } else {
+          this.lishi = true;
+          this.$modal.msgError("鏆傛棤鍘嗗彶鎶ュ憡");
+        }
       });
+    },
+
+    jianqian() {
+      this.flags = true;
+      this.jianqians = true;
+      let tjNumber = this.tableAll.tjNumber;
+      this.jianqianwenzhendata.push(tjNumber);
     },
 
     handlecan(row) {
@@ -1462,6 +1520,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;
@@ -1597,6 +1663,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;
               }
@@ -1651,6 +1725,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;
               }

--
Gitblit v1.8.0