linwenling
2023-08-07 d019c1632d2a92ed48b27b9cce1debcbe79afb2c
修改婚姻部分
1个文件已修改
785 ■■■■ 已修改文件
ruoyi-ui/src/views/marry/index.vue 785 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/marry/index.vue
@@ -6,10 +6,34 @@
                   class="el-icon-top"
        ></el-button>
      </el-backtop>
      <h1 style="font-size:21px;padding-top:30px">婚姻状况登记表</h1>
    <h2 style="font-size:30px;padding-top:0px">婚姻状况登记表</h2>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['system:role:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['family:note:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
      <el-divider />
  <!--    基本信息-->
      <h2 style="font-size:16px">基本情况</h2>
    <h2 style="font-size:21px">基本情况</h2>
      <el-container>
        <div style="padding-left:0px" >
          <el-container >
@@ -36,8 +60,23 @@
                </el-row>
                <el-row :span="16">
                  <el-form-item label="婚姻状况" prop="marryStatus" label-width="70px">
                    <el-input v-model="marryList.marryStatus" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb" >
                    </el-input>
                  <template v-if="!isEditing">
                    <el-input v-if="marryList.marryStatus===0" placeholder="未婚" style="" :disabled="dsb"></el-input>
                    <el-input v-if="marryList.marryStatus===1" placeholder="初婚"  :disabled="dsb"></el-input>
                    <el-input v-if="marryList.marryStatus===2" placeholder="离婚"  :disabled="dsb"></el-input>
                    <el-input v-if="marryList.marryStatus===3" placeholder="再婚"   :disabled="dsb"></el-input>
                  </template>
                  <template v-else>
                    <el-select v-model="marryList.marryStatus" placeholder="请选择婚姻状态" clearable :style="{width: '100%'}">
                      <el-option label="未婚" value="0"></el-option>
                      <el-option label="初婚" value="1"></el-option>
                      <el-option label="离婚" value="2"></el-option>
                      <el-option label="再婚" value="3"></el-option>
                    </el-select>
                  </template>
                  </el-form-item>
                </el-row>
                <el-row :span="16">
@@ -94,10 +133,11 @@
            <el-row  >
                <el-button
                  type="primary"
                  @click="handleUpdate(scope.row)"
              @click="handleEdit()"
              v-if="isShow"
                  v-hasPermi="['system:role:edit']"
                >编辑</el-button>
            <el-button v-if="isShow_2" type="primary" @click="submitForm" :disabled="dsb">完成</el-button>
                <br>
                  <el-button
                    type="primary"
@@ -137,8 +177,22 @@
                </el-row>
                <el-row :span="16">
                  <el-form-item label="婚姻状况" prop="spouseMarryStatus" label-width="70px">
                    <el-input v-model="marryList.spouseMarryStatus" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                    </el-input>
                  <template v-if="!isEditing">
                    <el-input v-if="marryList.spouseMarryStatus===0" placeholder="未婚"  :disabled="dsb"></el-input>
                    <el-input v-if="marryList.spouseMarryStatus===1" placeholder="初婚"  :disabled="dsb"></el-input>
                    <el-input v-if="marryList.spouseMarryStatus===2" placeholder="离婚"  :disabled="dsb"></el-input>
                    <el-input v-if="marryList.spouseMarryStatus===3" placeholder="再婚"   :disabled="dsb"></el-input>
                  </template>
                  <template v-else>
                    <el-select v-model="marryList.spouseMarryStatus" placeholder="请选择婚姻状态" clearable :style="{width: '100%'}">
                      <el-option label="未婚" value="0"></el-option>
                      <el-option label="初婚" value="1"></el-option>
                      <el-option label="离婚" value="2"></el-option>
                      <el-option label="再婚" value="3"></el-option>
                    </el-select>
                  </template>
                  </el-form-item>
                </el-row>
                <el-row :span="16">
@@ -190,16 +244,7 @@
  
        <div style="padding-left:30px;padding-top:30px" >
          <el-container >
  <!--          <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>-->
  
  <!--          </template>-->
  
    
          </el-container>
@@ -207,82 +252,125 @@
  <!--      </el-dialog> self:user:export-->
      </el-container>
      <!-- <h2 style="font-size:16px " >前任情况</h2>
      <el-container>
        <div style="padding-top:15px" >
          <el-container >
            <el-col >
              <el-form ref="elForm" :model="marryList.oldSpouseList" :rules="rules" size="medium"  label-position="left"
                       v-loading="loading" :data="marryList.oldSpouseList" @selection-change="handleSelectionChange" >
                <el-row :span="16">
                  <el-form-item label="姓名" prop="name" label-width="40px">
                    <el-input v-model="marryList.oldSpouseList.name" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                    </el-input>
                  </el-form-item>
                </el-row>
                <el-row :span="16">
                  <el-form-item label="出生日期" prop="spouseBirthday" label-width="70px">
                    <el-input v-model="marryList.spouseBirthday" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                    </el-input>
                  </el-form-item>
                </el-row>
                <el-row :span="16">
                  <el-form-item label="身份证号码" prop="spouseId" label-width="85px">
                    <el-input v-model="marryList.spouseId" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                    </el-input>
                  </el-form-item>
                </el-row>
                <el-row :span="16">
                  <el-form-item label="婚姻状况" prop="spouseMarryStatus" label-width="70px">
                    <el-input v-model="marryList.spouseMarryStatus" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                    </el-input>
                  </el-form-item>
                </el-row>
                <el-row :span="16">
                  <el-form-item label="户籍地址" prop="spouseAddress" label-width="70px">
                    <el-input v-model="marryList.spouseAddress" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                    </el-input>
                  </el-form-item>
                </el-row>
    <!-- <h2 style="font-size:16px " >前任情况</h2> -->
    <!-- <div>
     <el-table v-loading="loading" :data="oldSpouseList"  @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
      <el-table-column type="selection" width="55"  align="center" />
      <el-table-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="70"/>
      <el-table-column label="名字" prop="name" sortable width="120" />
      <el-table-column label="出生时间" prop="birthday" sortable width="120" />
      <el-table-column label="户籍地址" prop="address" sortable width="120" />
      <el-table-column label="工作地址" prop="workAddress" sortable width="120" />
      <el-table-column label="婚姻状态" prop="marryStatus" sortable width="120" >
        <template slot-scope="scope">
        <span v-if="scope.row.marryStatus== 0">未婚</span>
        <span v-if="scope.row.marryStatus== 1">初婚</span>
        <span v-if="scope.row.marryStatus== 2">离婚</span>
        <span v-if="scope.row.marryStatus== 3">再婚</span>
      </template>
      </el-table-column>
      <el-table-column label="性别" prop="sex" sortable width="100" >
        <template slot-scope="scope">
        <span v-if="scope.row.sex== 0">女</span>
        <span v-if="scope.row.sex== 1">男</span>
      </template>
      </el-table-column>
      <el-table-column label="民族" prop="nation" sortable width="100" />
      <el-table-column label="电话号码" prop="phone" sortable width="150" />
      <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" v-if="!editStatus[scope.row.id]"
               @click="editRow(scope.row)" v-hasPermi="['system:role:edit']">修改</el-button>
              <el-button size="mini" type="text"
                v-if="editStatus[scope.row.id]" @click="saveRowExperienceList(scope.row)">保存</el-button>
              <el-button size="mini" type="text" icon="el-icon-delete"
                @click="handleExperienceDelete(scope.row)" v-hasPermi="['system:role:remove']">删除</el-button>
            </template>
          </el-table-column>
    </el-table>
  </div> -->
    <div>
      <el-collapse v-model="activeNames" @change="handleChange">
              </el-form>
            </el-col>
          </el-container>
        <el-collapse-item name="1"  >
          <template v-slot:title>
            <div class="title-wrapper">
              <h2 style="font-size:16px ">前任情况</h2>
              <div>
                <el-button class="button" size="mini" type="text"  @click="showDialog('open')">
                  <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn></el-button>
        </div>
        <div style="padding-left:200px;padding-top:15px">
          <el-container>
            <el-col v-loading="loading" :data="marryList" @selection-change="handleSelectionChange">
              <el-form ref="elForm" :model="marryList" :rules="rules" size="medium"  label-position="left">
                <el-row :span="16">
                  <el-form-item label="性别" prop="spouseSex" label-width="40px">
                    <el-input v-model="marryList.spouseSex === 1 ? '男':'女' " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                    </el-input>
                  </el-form-item>
                </el-row>
                <el-row :span="16">
                  <el-form-item label="民族" prop="spouseNation" label-width="40px">
                    <el-input v-model="marryList.spouseNation " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                    </el-input>
                  </el-form-item>
                </el-row>
                <el-row :span="16">
                  <el-form-item label="联系电话" prop="spousePhone" label-width="70px">
                    <el-input v-model="marryList.spousePhone" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                    </el-input>
                  </el-form-item>
                </el-row>
                <el-row :span="16">
                  <el-form-item label="结婚时间" prop="marryTime" label-width="70px">
                    <el-input v-model="marryList.marryTime" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                    </el-input>
                  </el-form-item>
                </el-row>
              </el-form>
            </el-col>
          </el-container>
        </div>
      </el-container> -->
          </template>
          <el-table v-loading="loading" :data="oldSpouseList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
            <el-table-column label="姓名" prop="name" sortable width="180" align="center" >
              <template slot-scope="scope">
                <template v-if="!scope.row.isEdit">{{ scope.row.name }}</template>
                <template v-else><el-input v-model="scope.row.name"></el-input></template>
              </template>
            </el-table-column>
            <el-table-column label="出生日期" prop="birthday" sortable width="180" align="center" >
              <template slot-scope="scope">
                <template v-if="!scope.row.isEdit">{{ scope.row.birthday }}</template>
                <template v-else><el-input v-model="scope.row.birthday"></el-input></template>
              </template>
            </el-table-column>
            <el-table-column label="户籍地址" prop="address" sortable width="180" align="center" >
              <template slot-scope="scope">
                <template v-if="!scope.row.isEdit">{{ scope.row.address }}</template>
                <template v-else><el-input v-model="scope.row.address"></el-input></template>
              </template>
            </el-table-column>
            <el-table-column label="工作地址" prop="workAddress" sortable width="180" align="center" >
              <template slot-scope="scope">
                <template v-if="!scope.row.isEdit">{{ scope.row.workAddress }}</template>
                <template v-else><el-input v-model="scope.row.workAddress"></el-input></template>
              </template>
            </el-table-column>
            <el-table-column label="户籍地址" prop="address" sortable width="180" align="center" >
              <template slot-scope="scope">
                <template v-if="!scope.row.isEdit">{{ scope.row.address }}</template>
                <template v-else><el-input v-model="scope.row.address"></el-input></template>
              </template>
            </el-table-column>
            <el-table-column label="性别" prop="sex" sortable width="100" align="center" >
              <template slot-scope="scope">
                <template v-if="!scope.row.isEdit">{{ scope.row.sex }}</template>
                <template v-else><el-input v-model="scope.row.sex"></el-input></template>
              </template>
            </el-table-column>
            <el-table-column label="民族" prop="nation" sortable width="100" align="center" >
              <template slot-scope="scope">
                <template v-if="!scope.row.isEdit">{{ scope.row.nation }}</template>
                <template v-else><el-input v-model="scope.row.nation"></el-input></template>
              </template>
            </el-table-column>
            <el-table-column label="婚姻状态" prop="marryStatus" sortable width="140" align="center" >
              <template slot-scope="scope">
                <template v-if="!scope.row.isEdit">{{ scope.row.marryStatus }}</template>
                <template v-else>  <span v-if="scope.row.marryStatus== 0">未婚</span>
                  <span v-if="scope.row.marryStatus== 1">初婚</span>
                  <span v-if="scope.row.marryStatus== 2">离婚</span>
                  <span v-if="scope.row.marryStatus== 3">再婚</span></template>
              </template>
            </el-table-column>
            <!-- 操作 -->
            <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" v-if="!editStatus[scope.row.id]"
                           @click="editRow(scope.row)" v-hasPermi="['system:role:edit']">修改</el-button>
                <el-button size="mini" type="text"
                           v-if="editStatus[scope.row.id]" @click="saveRowmarryList(scope.row)">保存</el-button>
                <el-button size="mini" type="text" icon="el-icon-delete"
                           @click="handleDelete(scope.row)" v-hasPermi="['system:role:remove']">删除</el-button>
              </template>
            </el-table-column>
          </el-table>
        </el-collapse-item>
      </el-collapse>
    </div>
    <h2 style="font-size:16px " >生育情况</h2>
@@ -295,8 +383,13 @@
                       v-loading="loading" :data="marryList" @selection-change="handleSelectionChange" >
                <el-row :span="16">
                  <el-form-item label="生育情况" prop="bearStatus" label-width="80px">
                    <el-input v-model="marryList.bearStatus" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                    </el-input>
                  <template >
                    <el-input v-if="marryList.bearStatus===0" placeholder="未生育"  :disabled="dsb"></el-input>
                    <el-input v-if="marryList.bearStatus===1" placeholder="在孕"  :disabled="dsb"></el-input>
                    <el-input v-if="marryList.bearStatus===2" placeholder="已生育"  :disabled="dsb"></el-input>
                  </template>
                  </el-form-item>
                </el-row>
                <el-row :span="16">
@@ -347,6 +440,246 @@
  <!--      </el-dialog> self:user:export-->
      </el-container>
    
    <h2 style="font-size:16px " >需声明的情况</h2>
    <el-container>
      <el-input v-model="marryList.content " placeholder="" clearable :style="{width: '80%'}" :disabled="dsb"> </el-input>
    </el-container>
    <h2 style="font-size:16px " >备注</h2>
    <el-container>
      <el-input v-model="marryList.remark " placeholder="" clearable :style="{width: '80%'}" :disabled="dsb"> </el-input>
    </el-container>
    <!-- 新增  -->
    <el-dialog :title="title" :visible.sync="open" width="80%" append-to-body>
      <el-form ref="elForm" :model="formDat" :rules="rules" size="medium"  label-width="100px">
        <h2 style="margin-left: 50px;">基本情况</h2>
        <div style="width: 500px; display:table-cell;">
          <el-form-item label="姓名" prop="name">
            <el-input v-model="formDat.name" placeholder="请输入姓名" clearable :style="{width: '100%'}" ></el-input>
          </el-form-item>
          <el-form-item label="出生时间" prop="birthday" >
            <el-date-picker
              v-model='formDat.birthday'
              type='date'
              placeholder='选择日期'
              style="width: 100%;"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="身份证号" prop="id">
            <el-input v-model="formDat.id" placeholder="请输入身份证号" clearable :style="{width: '100%'}" >
            </el-input>
          </el-form-item>
          <el-form-item label="婚姻状况" prop="marryStatus">
            <el-select v-model="formDat.marryStatus" placeholder="请选择婚姻状况" clearable :style="{width: '100%'}"  >
              <el-option v-for="(item, index) in typeOption" :key="index" :label="item.label" :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="户籍地址" prop="address">
            <el-input v-model="formDat.address" placeholder="请输入户籍地址" clearable :style="{width: '100%'}" >
            </el-input>
          </el-form-item>
        </div>
        <div style=" width: 500px;display:table-cell;">
          <el-form-item label="性别" prop="sex">
            <el-select v-model="formDat.sex" placeholder="请选择性别" clearable :style="{width: '100%'}"  >
              <el-option v-for="(item, index) in typeOption1" :key="index" :label="item.label" :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="民族" prop="nation">
            <el-input v-model="formDat.nation" placeholder="请输入民族" clearable :style="{width: '100%'}" >
            </el-input>
          </el-form-item>
          <el-form-item label="联系电话" prop="phone">
            <el-input v-model="formDat.phone" placeholder="请输入联系电话" clearable :style="{width: '100%'}" >
            </el-input>
          </el-form-item>
          <el-form-item label="结婚时间" prop="marryTime">
            <el-date-picker
              v-model='formDat.marryTime'
              type='date'
              placeholder='选择结婚日期'
              style="width: 100%;"
            ></el-date-picker>
          </el-form-item>
        </div>
        <h2 style="margin-left: 50px;">配偶情况</h2>
        <div style="width: 500px; display:table-cell;">
          <el-form-item label="姓名" prop="spouseName">
            <el-input v-model="formDat.spouseName" placeholder="请输入姓名" clearable :style="{width: '100%'}" ></el-input>
          </el-form-item>
          <el-form-item label="出生时间" prop="spouseBirthday" >
            <el-date-picker
              v-model='formDat.spouseBirthday'
              type='date'
              placeholder='选择日期'
              style="width: 100%;"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="身份证号" prop="spouseId">
            <el-input v-model="formDat.spouseId" placeholder="请输入身份证号" clearable :style="{width: '100%'}" >
            </el-input>
          </el-form-item>
          <el-form-item label="婚姻状况" prop="spouseMarryStatus">
            <el-select v-model="formDat.spouseMarryStatus" placeholder="请选择婚姻状况" clearable :style="{width: '100%'}"  >
              <el-option v-for="(item, index) in typeOption" :key="index" :label="item.label" :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="户籍地址" prop="spouseAddress">
            <el-input v-model="formDat.spouseAddress" placeholder="请输入户籍地址" clearable :style="{width: '100%'}" >
            </el-input>
          </el-form-item>
        </div>
        <div style=" width: 500px;display:table-cell;">
          <el-form-item label="性别" prop="spouseSex">
            <el-select v-model="formDat.spouseSex" placeholder="请选择性别" clearable :style="{width: '100%'}"  >
              <el-option v-for="(item, index) in typeOption1" :key="index" :label="item.label" :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="民族" prop="spouseNation">
            <el-input v-model="formDat.spouseNation" placeholder="请输入民族" clearable :style="{width: '100%'}" >
            </el-input>
          </el-form-item>
          <el-form-item label="联系电话" prop="spousePhone">
            <el-input v-model="formDat.spousePhone" placeholder="请输入联系电话" clearable :style="{width: '100%'}" >
            </el-input>
          </el-form-item>
          <el-form-item label="结婚时间" prop="marryTime">
            <el-date-picker
              v-model='formDat.marryTime'
              type='date'
              placeholder='选择结婚日期'
              style="width: 100%;"
            ></el-date-picker>
          </el-form-item>
        </div>
        <h2 style="margin-left: 50px;">前任情况</h2>
        <div style="width: 500px; display:table-cell;">
          <el-form-item label="姓名" prop="spouseName">
            <el-input v-model="formDat.spouseName" placeholder="请输入姓名" clearable :style="{width: '100%'}" ></el-input>
          </el-form-item>
          <el-form-item label="出生时间" prop="spouseBirthday" >
            <el-date-picker
              v-model='formDat.spouseBirthday'
              type='date'
              placeholder='选择日期'
              style="width: 100%;"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="身份证号" prop="spouseId">
            <el-input v-model="formDat.spouseId" placeholder="请输入身份证号" clearable :style="{width: '100%'}" >
            </el-input>
          </el-form-item>
          <el-form-item label="婚姻状况" prop="spouseMarryStatus">
            <el-select v-model="formDat.spouseMarryStatus" placeholder="请选择婚姻状况" clearable :style="{width: '100%'}"  >
              <el-option v-for="(item, index) in typeOption" :key="index" :label="item.label" :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="户籍地址" prop="spouseAddress">
            <el-input v-model="formDat.spouseAddress" placeholder="请输入户籍地址" clearable :style="{width: '100%'}" >
            </el-input>
          </el-form-item>
        </div>
        <div style=" width: 500px;display:table-cell;">
          <el-form-item label="性别" prop="spouseSex">
            <el-select v-model="formDat.spouseSex" placeholder="请选择性别" clearable :style="{width: '100%'}"  >
              <el-option v-for="(item, index) in typeOption1" :key="index" :label="item.label" :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="民族" prop="spouseNation">
            <el-input v-model="formDat.spouseNation" placeholder="请输入民族" clearable :style="{width: '100%'}" >
            </el-input>
          </el-form-item>
          <el-form-item label="联系电话" prop="spousePhone">
            <el-input v-model="formDat.spousePhone" placeholder="请输入联系电话" clearable :style="{width: '100%'}" >
            </el-input>
          </el-form-item>
          <el-form-item label="结婚时间" prop="marryTime">
            <el-date-picker
              v-model='formDat.marryTime'
              type='date'
              placeholder='选择结婚日期'
              style="width: 100%;"
            ></el-date-picker>
          </el-form-item>
        </div>
        <h2 style="margin-left: 50px;">生育情况</h2>
        <div style="width: 500px; display:table-cell;">
          <el-form-item label="生育情况" prop="bearStatus">
            <el-select v-model="formDat.bearStatus" placeholder="请选择生育情况" clearable :style="{width: '100%'}"  >
              <el-option v-for="(item, index) in typeOption2" :key="index" :label="item.label" :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="领取《计划生育服务手册》" prop="handbookStatus">
            <el-select v-model="formDat.handbookStatus" placeholder="请选择" clearable :style="{width: '100%'}"  >
              <el-option v-for="(item, index) in typeOption3" :key="index" :label="item.label" :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="手册领取时间" prop="handbookTime" >
            <el-date-picker
              v-model='formDat.handbookTime'
              type='date'
              placeholder='选择日期'
              style="width: 100%;"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="领取《独生子女证》" prop="oneBorn">
            <el-select v-model="formDat.oneBorn" placeholder="请选择" clearable :style="{width: '100%'}"  >
              <el-option v-for="(item, index) in typeOption3" :key="index" :label="item.label" :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="《独生子女证》领取时间" prop="oneBornTime" >
            <el-date-picker
              v-model='formDat.oneBornTime'
              type='date'
              placeholder='选择日期'
              style="width: 100%;"
            ></el-date-picker>
          </el-form-item>
        </div>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="formDat.remark" placeholder="请输入备注" clearable :style="{width: '80%'}" ></el-input>
        </el-form-item>
        <el-form-item label="需声明情况" prop="content">
          <el-input v-model="formDat.content" placeholder="请输入需声明情况" clearable :style="{width: '80%'}" ></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitDataScope">保 存</el-button>
        <el-button @click="cancelData">取 消</el-button>
      </div>
    </el-dialog>
    </div>
  </template>
  
@@ -357,7 +690,7 @@
  
  
  //在system/note/index.js中导入接口函数  --接好了
  import {listMarry} from "@/api/marry/index";
import {listMarry,updateMarry,delMarry,addMarry} from "@/api/marry/index";
  import { delFamilyevent, uploadPic } from '../../api/bignote'
  import { blobValidate } from '../../utils/ruoyi'
  
@@ -413,53 +746,15 @@
        fileListOther:[
  
        ],
      editStatus: {},
        dsb:true,
        btn:false,
      isShow:true,
      isShow_2:false,
  
        formDat: {
          //个人基本信息
          name:undefined,
          oldName:undefined,
          sex:undefined,
          nationality:undefined,
          nation:undefined,
          maritalStatus:undefined,
          phoneNumber:undefined,
          idNum:undefined,
          locationAddress:undefined,
          alwaysAddress:undefined,
          locationPolice:undefined,
          alwaysPolice:undefined,
          outStatus:undefined,
          idNo:undefined,
          unit:undefined,
          position:undefined,
          politicalOutlook:undefined,
          img:undefined,
          fatherId:undefined,
          momId:undefined,
          birthday:undefined,
          familyId:undefined,
  
          //主要学习及工作经历
          id:undefined,
          userId:undefined,
          startDate:undefined,
          content:undefined,
          witness:undefined,
          remark: undefined,
          //家庭成员及主要社会关系情况
          relation:undefined,
          //持有出入境证件情况
          cerName:undefined,
          validityDate:undefined,
          ownStatus:undefined,
          //出国(境)情况
          destination:undefined,
          cause:undefined,
          url: undefined,
        oldSpouseList:undefined,
        },
        // 菜单列表
        menuOptions: [],
@@ -557,6 +852,52 @@
  
        },
        typeOptions: [],
      //婚姻状况
      typeOption: [{
        value:'0',
        label:'未婚'
      },{
        value:'1',
        label:'初婚'
      },{
        value:'2',
        label:'离婚'
      },
        {
          value:'3',
          label:'再婚'
        }],
      //性别
      typeOption1: [{
        value:'0',
        label:'女'
      },{
        value:'1',
        label:'男'
      },],
      //生育情况
      typeOption2: [{
        value:'0',
        label:'未生育'
      },{
        value:'1',
        label:'在孕'
      },
        {
          value:'2',
          label:'已生育'
        }],
      //领取证件
      typeOption3: [{
        value:'0',
        label:'否'
      },{
        value:'1',
        label:'是'
      },
      ],
      };
    },
    created() {
@@ -575,37 +916,6 @@
        console.log(val);
      },
  
      // edit(row){
      //   const id= row.id;
      //   this.reset();
      //   this.title='编辑个人信息';
      //   this.$router.push('/self/self/edit/' + id);
      // },
      //个人自传
      handleClick(tab, event) {
        // console.log(tab, event);
        this.getAutobiographyInfor();
        if(tab.name == 0) {
        }
        //根据不同时段的个人自传
        getAutobiographyTermList(this.queryParams).then(response => {
          //  alert(123)
          //   console.log(response.data)
          this.AutobiographyTermList = response.data;
          this.total = response.data.total;
          this.loading = false;
        });
        getAutobiographyList(this.queryParams).then(response => {
          //  alert(123)
          //   console.log(response.data)
          this.AutobiographyList = response.data;
          this.total = response.data.total;
          this.loading = false;
        });
      },
  
  
  
@@ -618,21 +928,22 @@
        //个人信息
        listMarry(this.queryParams).then(response => {
            //  alert(123)
            //   console.log(response.data)
          if(response.data.length == 0){
            this.loading = false;
            this.marryList=[];
          }
          else{
            this.marryList = response.data;
            this.total = response.data.total;
            this.oldSpouseList = this.marryList.oldSpouseList;
            this.loading = false;
          }
          }
        );
        listMarry(this.queryParams).then(response => {
            //  alert(123)
            //   console.log(response.data)
            this.oldSpouseList = response.data;
            this.total = response.data.total;
            this.loading = false;
          }
        );
  
      },
  
@@ -695,7 +1006,7 @@
      handleAdd() {
        this.reset();
        this.open = true;
        this.title = "添加个人信息";
      this.title = "新增婚姻信息";
      },
  
  
@@ -705,16 +1016,26 @@
        this.$router.push("/self/self/edit/" + id);
      },
      /** 修改按钮操作 */
      handleUpdate(row) {
        const id = row.id;
    handleUpdate() {
        let jd = true
  
        this.$router.push({
          path:"/self/marry/edit/" + id,
          query:{
            detail:jd
          }
        });
      // this.$router.push({
      //   path:"/self/marry/edit/" + id,
      //   query:{
      //     detail:jd
      //   }
      // });
    },
    // 编辑按钮
    handleEdit()
    {
      this.dsb = false
      this.btn = true
      this.isShow=false
      this.isShow_2=true
      this.isEditing=true
      // this.isEdit=false
      },
  
      handleRemoveFile(file) {
@@ -742,17 +1063,7 @@
        })
      },
  
      /** 查询自传信息 */
      getAutobiographyInfor()
      {
        let _this = this
        getAutobiography().then(response=>{
  
          response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{
            _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]})
          })
        })
      },
      /** 提交按钮(数据权限) */
      submitDataScope: function() {
  
@@ -766,7 +1077,7 @@
        this.$refs["elForm"].validate(valid => {
          if (valid) {
  
            addIndividual(this.formDat).then(response => {
          addMarry(this.formDat).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
@@ -797,26 +1108,83 @@
        })
  
      },
    editRow(row) {
      this.$set(row, 'isEdit', true);
      this.$set(this.editStatus, row.id, true);
    },
    //修改后的保存
    submitForm() {
      let ul = this.fileList.map(function (elem){
        return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
      }).join(",")
      let uls = this.fileListOther.map(function (elem){
        return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
      }).join(",")
      this.marryList.url = ul+","+uls
      this.$refs['elForm'].validate(valid => {
        if (valid) {
          if (this.marryList.id !== undefined) {
            updateMarry(this.marryList).then(response => {
              this.$modal.msgSuccess("修改成功");
              // this.open = false;
              this.btn=false
            });
          } else {
            this.$modal.msgSuccess("修改失败");
          }
        }
      })
      // 刷新页面
      // window.location.reload();
    },
    //主要经历
    saveRowmarryList(row) {
      this.$refs['elForm'].validate(valid => {
        if (valid) {
          this.oldSpouseList = this.marryList.oldSpouseList
          const foundIndex = this.oldSpouseList.findIndex(item => item.id === row.id);
          if (foundIndex !== -1) {
            const updatedData = Object.assign({}, this.marryList.oldSpouseList[foundIndex], row);
            updateMarry(updatedData).then(response => {
              this.$modal.msgSuccess("修改成功");
            }).catch(error => {
              this.$modal.msgError("修改失败");
              console.log(error);
            });
          } else {
            this.$modal.msgError("修改失败");
          }
        }
      });
      this.$set(row, 'isEdit', false);
      this.$set(this.editStatus, row.id, false);
    },
    //隔行变色
    tableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 == 0) {
        return "statistics-warning-row1";
      } else {
        return "statistics-warning-row";
      }
    },
      /** 删除个人经历按钮操作 */
      handleExperienceDelete(row) {
    handleDelete(row) {
        const Ids = row.id || this.ids;
        this.$modal.confirm('是否确认删除序号为"' + Ids + '"的数据项?').then(function() {
          return delExperience(Ids);
      this.$modal.confirm('是否确认删除所选数据项?').then(function() {
        return delMarry(Ids);
        }).then(() => {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        window.location.reload();
        }).catch(() => {});
      },
      /** 删除持有出入境证件情况按钮操作 */
      handleCertificateDelete(row) {
        const Ids = row.id || this.ids;
        this.$modal.confirm('是否确认删除序号为"' + Ids + '"的数据项?').then(function() {
          return delCertificate(Ids);
        }).then(() => {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        }).catch(() => {});
      },
      /** 导出按钮操作 */
      handleExport() {
        this.download('/self/user/export', {
@@ -826,5 +1194,4 @@
    }
  };
  </script>