Tcsm
2023-08-05 3f2e2443a61d1ff98a829925e3d42cdfa1275f0b
ruoyi-ui/src/views/genealogy/index.vue
@@ -57,16 +57,23 @@
          <i slot="prefix" class="el-input__icon el-icon-search"></i>
        </el-input>
      </el-form-item>
      <el-form-item label="生日" prop="birth">
        <el-input
          v-model="queryParams.birth"
          placeholder="请输入生日"
          clearable
          style="width: 240px"
          @keyup.enter.native="handleQuery"
        >
          <i slot="prefix" class="el-input__icon el-icon-search"></i>
        </el-input>
        <el-date-picker
          v-model="dateRange"
          style="width:  197px;
          height: 30px;
          background: #FFFFFF;
          border-radius: 14px 14px 14px 14px;
          opacity: 0.5;
          border: 1px solid rgba(0,0,0,0.25);"
          value-format="yyyy-MM-dd"
          type="daterange"
          range-separator="-"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        ></el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button size="mini" @click="handleQuery" style=" width: 67px;height: 27px;background: #FFDDE3;
@@ -152,8 +159,9 @@
      <el-table-column fixed label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80"/>
      <el-table-column label="身份" prop="identity" sortable width="100" >
        <template slot-scope="scope">
          <span>第{{scope.row.identity}}代</span>
        <template slot-scope="scope" >
          <span v-if="scope.row.isMyFamily==1">第{{scope.row.identity}}代</span>
          <span v-else>——</span>
        </template>
<!--        <template slot-scope="scope">{{ getSrc(scope.row.identity) }}</template>-->
      </el-table-column>
@@ -212,30 +220,30 @@
      <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px">
        <el-form-item label="身份" prop="identity">
          <el-input v-model="formDat.identity" placeholder="请输入成员姓名" clearable :style="{width: '100%'}" >
          <el-input v-model="formDat.identity" placeholder="请输入身份" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="姓名" prop="nickName">
          <el-input v-model="formDat.nickName" placeholder="请输入称呼" clearable :style="{width: '100%'}" ></el-input>
          <el-input v-model="formDat.nickName" placeholder="请输入姓名" clearable :style="{width: '100%'}" ></el-input>
        </el-form-item>
        <el-form-item label="性别" prop="sex">
          <el-input v-model="formDat.sex" placeholder="请输入姓名" clearable :style="{width: '100%'}" >
          <el-input v-model="formDat.sex" placeholder="请输入性别" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="出生时间" prop="birth">
          <el-input v-model="formDat.birth" placeholder="请输入工作单位" clearable :style="{width: '100%'}" >
          <el-input v-model="formDat.birth" placeholder="请输入出生时间" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="全生命周期" prop="deadDay">
          <el-input v-model="formDat.deadDay" placeholder="请输入手机" clearable :style="{width: '100%'}" >
          <el-input v-model="formDat.deadDay" placeholder="请输入全生命周期" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="手机号码" prop="phoneNumber">
          <el-input v-model="formDat.phoneNumber" placeholder="请输入微信" clearable :style="{width: '100%'}" >
          <el-input v-model="formDat.phoneNumber" placeholder="请输入手机号码" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="所在单位" prop="unit">
          <el-input v-model="formDat.unit" placeholder="请输入QQ" clearable :style="{width: '100%'}" >
          <el-input v-model="formDat.unit" placeholder="请输入所在单位" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="配偶" prop="spouseName">
@@ -304,11 +312,8 @@
      dateRange: [],
      // 数据范围选项
      fot:[".jpg",".jif"],
      fileList:[
      ],
      fileListOther:[
      ],
      fileList:[],
      fileListOther:[],
      dsb:true,
      btn:false,
      fit:['fill'],
@@ -344,6 +349,7 @@
        secondFamilyId:undefined,
        childList:undefined,
        identity:undefined,
        isMyFamily:undefined,
        url: undefined,
      },
@@ -427,30 +433,30 @@
      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"
   //   },
     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) {
@@ -470,7 +476,8 @@
      this.loading = true;
     //  console.log(this.queryParams)
      //alert(23)
      this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0]
      this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1]
      //  listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
      listUserAll(this.queryParams).then(response => {
          //  alert(123)
@@ -656,7 +663,7 @@
          ...this.queryParams
        }, `zGenealogy_${new Date().getTime()}.xlsx`)
      }else{
        this.download('/self/user/export/genealogy/'+Ids, {
        this.download('/self/user/export/genealogy1/'+Ids, {
        }, `zGenealogy_${new Date().getTime()}.xlsx`)
      }