From 0efe80f285b799fbf376c6567889dfa9061b72ec Mon Sep 17 00:00:00 2001
From: su1124 <1583764726@qq.com>
Date: 星期日, 04 二月 2024 16:26:35 +0800
Subject: [PATCH] su

---
 src/api/hosp/project.js          |    9 +++++++++
 src/views/hosp/project/index.vue |   33 ++++++++++++++++++++++++++++++++-
 2 files changed, 41 insertions(+), 1 deletions(-)

diff --git a/src/api/hosp/project.js b/src/api/hosp/project.js
index 6f20087..a380f4d 100644
--- a/src/api/hosp/project.js
+++ b/src/api/hosp/project.js
@@ -93,3 +93,12 @@
     params: query
   })
 }
+
+// 鏌ヨ浣撴椤圭洰璇︾粏
+export function getInfoByProId(proId) {
+  return request({
+    url: 'hosp/project/getInfoByProId',
+    method: 'get',
+    params: {proId:proId}
+  })
+}
diff --git a/src/views/hosp/project/index.vue b/src/views/hosp/project/index.vue
index 90889e4..179afff 100644
--- a/src/views/hosp/project/index.vue
+++ b/src/views/hosp/project/index.vue
@@ -76,6 +76,17 @@
               >鏂板</el-button
             >
           </el-col>
+          <el-col :span="1.5">
+            <el-button
+            :disabled = "xiugais"
+              type="primary"
+              icon="el-icon-plus"
+              size="mini"
+              @click="handleUpdate1"
+              v-hasPermi="['hosp:project:add']"
+              >淇敼</el-button
+            >
+          </el-col>
           <!-- <el-col :span="1.5">
         <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['hosp:project:edit']">淇敼</el-button>
       </el-col> -->
@@ -361,6 +372,7 @@
             v-model="form.proSex"
             placeholder="璇烽�夋嫨浣撴浜烘�у埆"
             style="width: 200px"
+            clearable
           >
             <el-option
               v-for="dict in dict.type.sys_user_sex"
@@ -806,7 +818,8 @@
   ProjectTree,
   deptTree,
   deptTree111,
-  getAllChildListById
+  getAllChildListById,
+  getInfoByProId
 } from "@/api/hosp/project";
 import { listDept } from "@/api/system/dept";
 import Treeselect from "@riophae/vue-treeselect";
@@ -850,6 +863,8 @@
       }
     };
     return {
+      xiugais:true,
+      xiugaiList:[],
       // 閮ㄩ棬鏍戦�夐」
       deptOptions: undefined,
       dialogTableVisible: false,
@@ -1033,6 +1048,7 @@
         proName: this.queryParams.proName,
         checkType: this.queryParams.checkType,
         deptId: this.queryParams.deptId,
+        proId: this.queryParams.proId,
       };
       getAllChildListById(data).then((response) => {
         // this.projectList = this.handleTree(response.data.list, "proId");
@@ -1219,11 +1235,22 @@
     },
     // 鑺傜偣鍗曞嚮浜嬩欢
     handleNodeClick(date) {
+      if(date.$treeNodeId == 3){
+        this.xiugais = true;
+      }else{
+        this.xiugais = false;
+      }
+      let proId = date.id;
+      getInfoByProId(proId).then((response)=>{
+        this.xiugaiList = response.data;
+        console.log(this.xiugaiList,222);
+      })
       console.log(date,111);
       this.id = date.id;
       this.queryParams.proId = date.id;
       let data = {
         proId: this.queryParams.proId,
+        proName:this.queryParams.proNamez
       };
       this.loading = true;
       getAllChildListById(data).then((response) => {
@@ -1434,6 +1461,10 @@
         this.form.tjStandardList.splice(index, 1);
       }
     },
+    handleUpdate1(){
+      this.open = true;
+      this.form = this.xiugaiList;
+    },
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(row) {
       this.reset();

--
Gitblit v1.8.0