From 5af76d2fad371b7a643457d27113ebe50f01fee3 Mon Sep 17 00:00:00 2001
From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com>
Date: 星期五, 17 十一月 2023 18:08:40 +0800
Subject: [PATCH] qxtj

---
 src/views/doctor/check/index.vue |   94 +++++++++++++++++++++++++++++++---------------
 1 files changed, 63 insertions(+), 31 deletions(-)

diff --git a/src/views/doctor/check/index.vue b/src/views/doctor/check/index.vue
index 6e5fb1d..aa8c1d8 100644
--- a/src/views/doctor/check/index.vue
+++ b/src/views/doctor/check/index.vue
@@ -13,11 +13,22 @@
         <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
       </el-form-item>
     </el-form>
+    <div style="display: flex;">
+      <el-radio-group v-model="tjStatus" @input="radioChange" style="margin-left: 30px">
+        <el-radio-button label="0">鏈</el-radio-button>
+        <el-radio-button label="1">宸叉</el-radio-button>
+      </el-radio-group>
+      <el-row :gutter="10" class="mb8" style="margin:8px 10px;">
+      <el-col :span="1.5">
+        <el-button type="primary"
+          size="mini"
+          @click="radioChange"
+          v-hasPermi="['system:notice:add']"
+        >浼氳瘖鐢宠</el-button>
+      </el-col>
+    </el-row>
+    </div>
 
-    <el-radio-group v-model="tjStatus" @input="radioChange" style="margin-left: 30px">
-      <el-radio-button label="0">鏈</el-radio-button>
-      <el-radio-button label="1">宸叉</el-radio-button>
-    </el-radio-group>
 
     <template>
       <el-table :data="tableList" v-loading="loading" ref="table" height="536px" style="margin: 20px; width: 98%"
@@ -95,7 +106,7 @@
                 <span v-if="scope.row.cusSex == '9'">鏈鏄庢�у埆</span>
               </template>
             </td>
-            <td style="border: 1px solid #dfe6ec; border-collapse: collapse;" align="right">
+            <td style="border: 1px solid #dfe6ec; border-collapse: collapse" align="right">
               鎬у埆锛�
             </td>
             <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
@@ -129,8 +140,8 @@
           </el-radio-group>
         </div>
       </template>
-
-      <el-table :data="proParentList.sons" border height="460px" style="width: 96%; margin: 10px 10px">
+      <el-table v-loading="loading" :data="proParentList.sons" border height="460px"
+        style="width: 96%; margin: 10px 10px">
         <el-table-column prop="project.proName" label="妫�娴嬮」鐩�" width="150">
           <!-- <template slot-scope="scope">
             {{ scope.row.project.proName }}
@@ -189,8 +200,8 @@
               鐥呯閫夋嫨锛�
             </td>
             <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
-              <el-select v-model="value" multiple placeholder="璇烽�夋嫨" style="width: 100%;height:45px" v-if="deptAdviceList"
-                @change="sel" filterable>
+              <el-select v-model="value" multiple placeholder="璇烽�夋嫨" style="width: 100%; height: 45px"
+                v-if="deptAdviceList" @change="sel" filterable>
                 <el-option v-for="item in deptAdviceList" :key="item.id" :label="item.title" :value="item.id">
                 </el-option>
               </el-select>
@@ -383,7 +394,7 @@
     },
     // 鑾峰彇鍖荤敓
     selName(val) {
-      this.doctorName = val
+      this.doctorName = val;
       // this.userList.forEach(item =>{
       //   if(val === item.userId){
       //     this.doctorName = item.nickName
@@ -410,7 +421,7 @@
           });
         });
       } else {
-        this.proParentList.remark = ""
+        this.proParentList.remark = "";
         this.deptAdviceList.forEach((item) => {
           this.ids = item.id;
           val.forEach((item1) => {
@@ -436,17 +447,19 @@
     },
     // 瑙勫垯
     handleguize(row) {
-      this.row = row
+      this.row = row;
       this.$refs.aaa.open = true;
+      this.$refs.aaa.title = "璇婃柇缁撴灉缁撹";
       this.$refs.aaa.getList(this.row);
     },
 
     handleChanges(param1, param2) {
-      this.row.conclusion = param1
-      this.row.rulesList = param2
+      this.row.conclusion = param1;
+      this.row.rulesList = param2;
     },
 
     getList() {
+      this.queryParams.type = this.tjStatus;
       getProList(this.queryParams).then((response) => {
         if (response.data) {
           if (response.data.date) {
@@ -513,6 +526,7 @@
 
     // 鐐瑰嚮璇︽儏
     handleClick(row) {
+      this.loading = true;
       this.drawer = true;
       this.tableAll = row;
       if (this.tableAll.cusSex === 0) {
@@ -541,12 +555,17 @@
             };
             getParentId(data).then((response) => {
               this.proParentList = response.data;
+              this.loading = false;
               this.value = [];
-              if (this.proParentList.xiaoJie.length != 0) {
-                this.proParentList.xiaoJie.forEach((item2) => {
-                  this.value.push(item2.id);
-                });
+              if (this.proParentList.xiaoJieIds != null) {
+                if (this.proParentList.xiaoJieIds.length != 0) {
+                  this.proParentList.xiaoJieIds.forEach((item2) => {
+                    let item = Number(item2)
+                    this.value.push(item);
+                  });
+                }
               }
+
               this.proParentList.sons.forEach((item) => {
                 this.doctorName = item.doctorName;
 
@@ -616,6 +635,11 @@
         .then(() => {
           // 浣撴鍙�
           let tjNumber = this.tableAll.tjNumber;
+          this.userList.forEach((item) => {
+            if (this.doctorName == item.nickName) {
+              this.doctorName = item.userId;
+            }
+          });
           this.proParentList.sons.forEach((item) => {
             if (this.rows) {
               this.rows.forEach((item1) => {
@@ -640,7 +664,7 @@
               isReturn: item.isReturn === true ? 1 : 0,
               exceptionDesc: item.exceptionDesc === true ? 1 : 0,
               conclusion: item.conclusion,
-              rulesList: item.rulesList
+              rulesList: item.rulesList,
             });
           });
 
@@ -668,10 +692,13 @@
           getParentId(data).then((response) => {
             this.proParentList = response.data;
             this.value = [];
-            if (this.proParentList.xiaoJie.length != 0) {
-              this.proParentList.xiaoJie.forEach((item2) => {
-                this.value.push(item2.id);
-              });
+            if (this.proParentList.xiaoJieIds != null) {
+              if (this.proParentList.xiaoJieIds.length != 0) {
+                this.proParentList.xiaoJieIds.forEach((item2) => {
+                  let item = Number(item2)
+                  this.value.push(item);
+                });
+              }
             }
             this.proParentList.sons.forEach((item) => {
               this.doctorName = item.doctorName;
@@ -688,7 +715,6 @@
               if (item.exceptionDesc == "0") {
                 item.exceptionDesc = false;
               }
-
             });
             if (this.proParentList.xiaoJie.length != 0) {
               this.Parent.forEach((item3) => {
@@ -720,10 +746,13 @@
           getParentId(data).then((response) => {
             this.proParentList = response.data;
             this.value = [];
-            if (this.proParentList.xiaoJie.length != 0) {
-              this.proParentList.xiaoJie.forEach((item2) => {
-                this.value.push(item2.id);
-              });
+            if (this.proParentList.xiaoJieIds != null) {
+              if (this.proParentList.xiaoJieIds.length != 0) {
+                this.proParentList.xiaoJieIds.forEach((item2) => {
+                  let item = Number(item2)
+                  this.value.push(item);
+                });
+              }
             }
             this.proParentList.sons.forEach((item) => {
               this.doctorName = item.doctorName;
@@ -740,7 +769,6 @@
               if (item.exceptionDesc == "0") {
                 item.exceptionDesc = false;
               }
-
             });
             if (this.proParentList.xiaoJie.length != 0) {
               this.Parent.forEach((item3) => {
@@ -759,7 +787,6 @@
         });
     },
 
-
     handleInputConfirm(row) {
       this.rows.push(row);
     },
@@ -767,6 +794,11 @@
     determine() {
       // 浣撴鍙�
       let tjNumber = this.tableAll.tjNumber;
+      this.userList.forEach((item) => {
+        if (this.doctorName == item.nickName) {
+          this.doctorName = item.userId;
+        }
+      });
       this.proParentList.sons.forEach((item) => {
         if (this.rows) {
           this.rows.forEach((item1) => {
@@ -791,7 +823,7 @@
           isReturn: item.isReturn === true ? 1 : 0,
           exceptionDesc: item.exceptionDesc === true ? 1 : 0,
           conclusion: item.conclusion,
-          rulesList: item.rulesList
+          rulesList: item.rulesList,
         });
       });
 

--
Gitblit v1.8.0