From b3bd8bb2cedee4e60a2aac12ed88c7ebe8ba98ed Mon Sep 17 00:00:00 2001
From: linwenling <3256558519@qq.com>
Date: 星期四, 25 五月 2023 13:46:25 +0800
Subject: [PATCH] 修改保洁收纳

---
 ruoyi-ui/src/views/genealogy/index.vue |  100 ++++++++++++++++++++++++-------------------------
 1 files changed, 49 insertions(+), 51 deletions(-)

diff --git a/ruoyi-ui/src/views/genealogy/index.vue b/ruoyi-ui/src/views/genealogy/index.vue
index 46d08b4..4fd0266 100644
--- a/ruoyi-ui/src/views/genealogy/index.vue
+++ b/ruoyi-ui/src/views/genealogy/index.vue
@@ -142,7 +142,7 @@
       </el-row>
     </div>
 
-    <el-table v-loading="loading" :data="listRoot"  @selection-change="handleSelectionChange"  @row-click="handleCheck" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
+    <el-table v-loading="loading" :data="listRoot"  @selection-change="handleSelectionChange"  :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
       <el-table-column type="selection" width="25"  align="center" />
       <el-table-column  label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80"/>
 
@@ -174,40 +174,25 @@
       <el-table-column label="鎵�鍦ㄥ崟浣�" prop="unit" sortable width="150" align="center" >
         <template slot-scope="scope">{{scope.row.unit? scope.row.unit: '鈥斺�斺�斺��'}}</template>
       </el-table-column>
-      <el-table-column label="閰嶅伓" prop="userId" sortable width="110" align="center" >
-        <template slot-scope="scope">{{scope.row.phoneNumber? scope.row.phoneNumber: '鈥斺�斺�斺��'}}</template>
+      <el-table-column label="閰嶅伓" prop="spouseId" sortable width="110" align="center" >
+        <template slot-scope="scope"><span>{{getPerson(scope.row.spouseId)}}</span></template>
       </el-table-column>
-      <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+  <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope" v-if="scope.row.roleId !== 1">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['system:role:edit']"
-          >淇敼</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['system:role:remove']"
-          >鍒犻櫎</el-button>
-
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-d-arrow-right"
-            @click="handleCheck(scope.row)">
-            鏌ョ湅璇︽儏</el-button>
 
 
+<el-button
+             size="mini"
+              type="text"
+             icon="el-icon-d-arrow-right"
+              @click="handleCheck(scope.row)">
+鏌ョ湅璇︽儏</el-button>
         </template>
       </el-table-column>
     </el-table>
 
     <pagination
-      v-show="total>0"
+      v-show="total"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -340,7 +325,7 @@
 
 //瀵煎叆鎺ュ彛鍑芥暟
 import {enload, uploadPic} from "@/api/contacts/index";
-import {getRoot} from "@/api/root/index";
+import {getRoot,listUserAll} from "@/api/root/index";
 export default {
   name: "index",
   dicts: ['sys_normal_disable'],
@@ -484,7 +469,31 @@
       this.open = false;
       this.reset();
     },
+     //鎷垮埌閰嶅伓鐨勫鍚�
+     getPerson(id)
+     {
+     //  alert(id)
+   //    alert(typeof(id))
+       // this.listRoot.forEach(function(item, index) {
+       //             //item 灏辨槸褰撴棩鎸夊惊鐜埌鐨勫璞�
+       //             //index鏄惊鐜殑绱㈠紩锛屼粠0寮�濮�
+       //              //alert(typeof(item.userId))
+       //             if(item.userId==id){
+       //            //   alert(89)
+       //            alert(item.nickName)
+       //               return item.nickName
+       //             }
 
+       // })
+       let username = ""
+       for(let i = 0; i < this.listRoot.length;i++)
+       {
+         if(this.listRoot[i].userId==id)
+          username = this.listRoot[i].nickName
+       }
+       return username;
+      // return "12ddd"
+     },
     //闅旇鍙樿壊
     tableRowClassName({ row, rowIndex }) {
       if (rowIndex % 2 == 0) {
@@ -497,13 +506,18 @@
     /** 鏌ヨ閫氳褰曞垪琛� */
     getList() {
       this.loading = true;
-      // console.log(this.queryParams)
+     //  console.log(this.queryParams)
+      //alert(23)
+
       //  listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-      getRoot(this.queryParams).then(response => {
+      listUserAll(this.queryParams).then(response => {
           //  alert(123)
           //   console.log(response.data)
-          this.listRoot = response.data.data;
-          this.total = response.data.total;
+       //   alert(76)
+          this.listRoot = response.data;
+        //  alert(this.listRoot)
+          this.total = response.data.length;
+       //   alert(this.total)
           this.loading = false;
         }
       );
@@ -583,28 +597,12 @@
     // },
 
 
-    /** 鏂板鎸夐挳鎿嶄綔 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "娣诲姞閫氳褰曡缁嗕俊鎭�";
-    },
+
     /** 鏌ョ湅璇︾粏淇℃伅 */
     handleCheck(row){
-      const id = row.id;
-      this.$router.push("/familymodel/Contact/contactsInfo/" + id);
-    },
-    /** 淇敼鎸夐挳鎿嶄綔 */
-    handleUpdate(row) {
-      const id = row.id;
-      let jd = true
-
-      this.$router.push({
-        path:"/familymodel/Contact/contactsInfo/" + id,
-        query:{
-          detail:jd
-        }
-      });
+      const id = row.userId;
+      alert(id)
+     this.$router.push("/familymodel/jiagenwang/getPInfo/" + id);
     },
 
 

--
Gitblit v1.9.1