From 94c40e717c313d91bde25bff7c6938dfc21d9aaf Mon Sep 17 00:00:00 2001
From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com>
Date: 星期五, 24 五月 2024 18:14:14 +0800
Subject: [PATCH] qxtj

---
 src/components/proposal/index.vue |   32 ++++++++++++++++++++------------
 1 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/src/components/proposal/index.vue b/src/components/proposal/index.vue
index e9a676f..d588d59 100644
--- a/src/components/proposal/index.vue
+++ b/src/components/proposal/index.vue
@@ -52,7 +52,7 @@
             :total="total"
             :page.sync="queryParams.page"
             :limit.sync="queryParams.pageSize"
-            @pagination="getList"
+            @pagination="radiotjproposalChange"
           />
         </div>
       </div>
@@ -99,13 +99,12 @@
   },
   watch: {
     cusobj(val, newVla) {
-      // console.log(val,newVla,1111)
-      this.fList= val
+      console.log(val,newVla,1111)
+      this.fList = val;
       this.queryParams.sex = val.sex;
       this.queryParams.isZj = val.isZj;
-      if (this.queryParams.sex) {
+        this.tjproposal ="0"
         this.getList();
-      }
     },
   },
   mounted() {
@@ -127,6 +126,7 @@
       });
     },
     getList() {
+      console.log(1111)
       this.loading = true;
       getKjTjAdviceKjbqBySex(this.queryParams).then((res) => {
         this.dataList = res.data.records;
@@ -138,16 +138,17 @@
       this.getAllList();
     },
     handleSelectionChange(selection) {
-    //   if (selection.length > 1) {
-    //     this.$refs.elTable.clearSelection(); // 娓呯┖鎵�鏈夐�夋嫨
-    //     this.$refs.elTable.toggleRowSelection(selection.pop()); // 璁剧疆閫夋嫨椤�
-    //   }
+      //   if (selection.length > 1) {
+      //     this.$refs.elTable.clearSelection(); // 娓呯┖鎵�鏈夐�夋嫨
+      //     this.$refs.elTable.toggleRowSelection(selection.pop()); // 璁剧疆閫夋嫨椤�
+      //   }
       this.list = selection;
-      console.log( this.list)
+      console.log(this.list);
     },
     radiotjproposalChange() {
       if (this.tjproposal == "0") {
         this.queryParams.isZj = this.fList.isZj;
+        this.queryParams.userId = null
         this.getList();
       } else {
         this.loading = true;
@@ -155,8 +156,15 @@
           this.queryParams.userId = res.user.userId;
           this.queryParams.isZj = null;
           getCyTjAdviceKjbqBySex(this.queryParams).then((res) => {
-            this.dataList = res.data.records;
-            this.total = res.data.total;
+            if (res.data) {
+              this.dataList = res.data.records;
+              this.total = res.data.total;
+             
+            } else {
+                this.dataList =[]
+                this.total = 0
+                this.$modal.msgError(res.msg);
+            }
             this.loading = false;
           });
         });

--
Gitblit v1.8.0