From f1bd530bc3fcfc006426ebd2e79d0b09c31ba41f Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期二, 24 六月 2025 16:34:47 +0800
Subject: [PATCH] 1

---
 src/views/hosp/advicerules/index.vue |   36 +++++++++++++++++++++++-------------
 1 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/src/views/hosp/advicerules/index.vue b/src/views/hosp/advicerules/index.vue
index dff715e..b61755d 100644
--- a/src/views/hosp/advicerules/index.vue
+++ b/src/views/hosp/advicerules/index.vue
@@ -88,10 +88,10 @@
           v-hasPermi="['hosp:advicerules:export']">瀵煎嚭
         </el-button>
       </el-col> -->
-      <right-toolbar
+      <!-- <right-toolbar
         :showSearch.sync="showSearch"
         @queryTable="getList"
-      ></right-toolbar>
+      ></right-toolbar> -->
     </el-row>
 
     <el-row :gutter="20" style="display: flex">
@@ -238,6 +238,7 @@
       >
         <el-form-item label="绉戝" prop="ks">
           <el-select
+            :rules="rules"
             v-model="form.ks"
             placeholder="璇烽�夋嫨绉戝"
             style="width: 200px"
@@ -611,10 +612,12 @@
       },
       // 琛ㄥ崟鍙傛暟
       form: {
-        xb: "2",
+        // xb: "2",
       },
       // 琛ㄥ崟鏍¢獙
-      rules: {},
+      rules: {
+        ks: [{ required: true, message: " ", trigger: ["blur", "change"] }],
+      },
       upload: {
         // 鏄惁鏄剧ず寮瑰嚭灞傦紙鐢ㄦ埛瀵煎叆锛�
         open: false,
@@ -643,9 +646,14 @@
     treeId(newVal, oldVal) {
       if (newVal) {
         this.$nextTick(() => {
-          document
-            .querySelector(".el-tree-node__children .el-tree-node__content")
-            .click();
+          const node = document.querySelector(
+            ".el-tree-node__children .el-tree-node__content"
+          );
+          if (node) {
+            node.click();
+          } else {
+            console.warn("娌℃湁鎵惧埌 el-tree 鑺傜偣锛屾棤娉曡Е鍙戠偣鍑�");
+          }
         });
       }
     },
@@ -659,6 +667,7 @@
         this.total = response.total;
         this.loading = false;
       }); */
+      
       getTjProAdvicerulesKsList().then((response) => {
         this.deptOptions = response.data.map((name, index) => {
           return {
@@ -676,6 +685,8 @@
     getListByXmId() {
       this.loading = true;
       listAdvicerules(this.queryParams).then((response) => {
+        console.log(response,123456);
+        
         response.rows.forEach((item, index) => {
           item.newID =
             (this.queryParams.pageNum - 1) * this.queryParams.pageSize +
@@ -740,7 +751,7 @@
         createBy: null,
         updateBy: null,
         deleted: null,
-        xb: "2",
+        // xb: "2",
       };
       if (this.$refs.form) {
         this.$refs.form.resetFields();
@@ -749,7 +760,7 @@
     /** 鎼滅储鎸夐挳鎿嶄綔 */
     handleQuery() {
       this.queryParams.pageNum = 1;
-      this.getList();
+      this.getListByXmId();
     },
     handlecharge() {
       this.querycharge.pageNum = 1;
@@ -849,19 +860,18 @@
     submitForm() {
       this.$refs["form"].validate((valid) => {
         if (valid) {
+          this.form.xb = this.form.xb === "1" ? "1" : null;
           if (this.form.id != null) {
             updateAdvicerules(this.form).then((response) => {
-              console.log(response, 1111333);
-
               this.$modal.msgSuccess("淇敼鎴愬姛");
               this.open = false;
-              this.getList();
+              this.getListByXmId();
             });
           } else {
             addAdvicerules(this.form).then((response) => {
               this.$modal.msgSuccess("鏂板鎴愬姛");
               this.open = false;
-              this.getList();
+              this.getListByXmId();
             });
           }
         }

--
Gitblit v1.8.0