From 2f0e1ee5a74344f6a108df4559beed0423b9639d Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期二, 08 四月 2025 17:50:19 +0800
Subject: [PATCH] 1

---
 src/views/advice/advice/index.vue |  111 ++++++++++++++++++++++++++++++-------------------------
 1 files changed, 61 insertions(+), 50 deletions(-)

diff --git a/src/views/advice/advice/index.vue b/src/views/advice/advice/index.vue
index cac724a..7bb29aa 100644
--- a/src/views/advice/advice/index.vue
+++ b/src/views/advice/advice/index.vue
@@ -78,18 +78,20 @@
     <el-row :gutter="20">
       <el-col :span="3" :xs="24">
         <div class="head-container">
-          <el-tree
-            :data="deptOptions"
-            :props="defaultProps"
-            :expand-on-click-node="false"
-            :filter-node-method="filterNode"
-            ref="tree"
-            node-key="id"
-            default-expand-all
-            :default-expanded-keys="treeId"
-            highlight-current
-            @node-click="handleNodeClick"
-          />
+          <div class="content">
+            <el-tree
+              :data="deptOptions"
+              :props="defaultProps"
+              :expand-on-click-node="false"
+              :filter-node-method="filterNode"
+              ref="tree"
+              node-key="id"
+              default-expand-all
+              :default-expanded-keys="treeId"
+              highlight-current
+              @node-click="handleNodeClick"
+            />
+          </div>
         </div>
       </el-col>
 
@@ -163,20 +165,18 @@
           </el-table-column>
         </el-table>
         <div class="pag">
-      <div class="pag1">
-        <pagination
-          v-show="total > 0"
-          :total="total"
-          :page.sync="queryParams.page"
-          :limit.sync="queryParams.pageSize"
-          @pagination="getList"
-        />
-      </div>
-    </div>
+          <div class="pag1">
+            <pagination
+              v-show="total > 0"
+              :total="total"
+              :page.sync="queryParams.page"
+              :limit.sync="queryParams.pageSize"
+              @pagination="getList"
+            />
+          </div>
+        </div>
       </el-col>
     </el-row>
-
-
 
     <!-- 娣诲姞鎴栦慨鏀筧dvice瀵硅瘽妗� -->
     <el-dialog
@@ -187,24 +187,24 @@
     >
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="褰掑睘绉戝" prop="deptId">
-            <!-- <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="璇烽�夋嫨褰掑睘绉戝"
+          <!-- <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="璇烽�夋嫨褰掑睘绉戝"
               style="width: 200px" /> -->
-            <el-select
-            v-if="DepartmentList.length > 0" 
-              v-model="form.deptId"
-              placeholder="璇烽�夋嫨褰掑睘绉戝"
-              clearable
-              style="width: 200px"
-              filterable
-            >
-              <el-option
-                v-for="dict in DepartmentList"
-                :key="dict.deptId"
-                :label="dict.deptName || ''"
-                :value="dict.deptId"
-              />
-            </el-select>
-          </el-form-item>
+          <el-select
+            v-if="DepartmentList.length > 0"
+            v-model="form.deptId"
+            placeholder="璇烽�夋嫨褰掑睘绉戝"
+            clearable
+            style="width: 200px"
+            filterable
+          >
+            <el-option
+              v-for="dict in DepartmentList"
+              :key="dict.deptId"
+              :label="dict.deptName || ''"
+              :value="dict.deptId"
+            />
+          </el-select>
+        </el-form-item>
         <el-form-item label="妫�鏌ラ」鐩�" prop="proName">
           <el-select
             v-model="form.proId"
@@ -221,7 +221,7 @@
             />
           </el-select>
         </el-form-item>
-        
+
         <el-form-item label="寤鸿鏍囬" prop="title">
           <el-input v-model="form.title" placeholder="璇疯緭鍏ュ悕绉版爣棰�" />
         </el-form-item>
@@ -276,7 +276,7 @@
 </template>
 
 <script>
-import { deptTreeSelect ,getDeptListByDictHospId} from "@/api/system/user";
+import { deptTreeSelect, getDeptListByDictHospId } from "@/api/system/user";
 import {
   listAdvice,
   getAdvice,
@@ -353,7 +353,7 @@
     };
   },
   created() {
-    this.sendhospName()
+    this.sendhospName();
     this.getDeptTree();
   },
   watch: {
@@ -371,9 +371,8 @@
   },
   methods: {
     sendhospName() {
-   
       getDeptListByDictHospId({
-        id: 2000
+        id: 2000,
       }).then((res) => {
         this.DepartmentList = res.data;
         this.form.deptId = String(this.form.deptId);
@@ -381,7 +380,8 @@
     },
     // 鑺傜偣鍗曞嚮浜嬩欢
     handleNodeClick(data) {
-      this.queryParams.deptId = data.id;
+      // this.queryParams.deptId = data.id;
+      this.queryParams.deptId = null;;
       this.handleQuery();
     },
 
@@ -392,7 +392,6 @@
     },
     getDeptTree() {
       deptTreeSelect().then((response) => {
-
         this.deptOptions = response.data;
         this.treeId.push(this.deptOptions[0].id);
         this.queryParams.deptId = this.deptOptions[0].id;
@@ -474,7 +473,7 @@
       this.reset();
       this.title = "浣撴寤鸿淇℃伅缁存姢";
       this.getlistProject();
-      this.form.deptId = this.queryParams.deptId
+      this.form.deptId = this.queryParams.deptId;
       this.open = true;
     },
     /** 淇敼鎸夐挳鎿嶄綔 */
@@ -489,7 +488,7 @@
         }
         this.getlistProject();
         this.open = true;
-        this.form.deptId = this.queryParams.deptId
+        this.form.deptId = this.queryParams.deptId;
         this.title = "浣撴寤鸿淇℃伅缁存姢";
       });
     },
@@ -575,4 +574,16 @@
 .pag1 {
   width: 30%;
 }
+.content {
+  width: 1000px;
+  height: 1000px;
+}
+.head-container {
+  width: 200px;
+  height: 629px;
+  overflow: auto;
+  border: 1px solid #ccc;
+  position: relative;
+}
+
 </style>

--
Gitblit v1.8.0