| | |
| | | </el-backtop> |
| | | <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" |
| | |
| | | |
| | | </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 v-model="mrs" 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-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="sex" label-width="40px"> |
| | | <el-input v-model="marryList.sex === 1 ? '男':'女' " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | </el-input> |
| | | <template v-if="!isEditing"> |
| | | <el-input v-model="marryList.sex === '男' ? sinds='男':sinds='女'" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> |
| | | </template> |
| | | <template v-else> |
| | | <el-select v-model="sinds" placeholder="请选择性别" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | <el-option label="男" value='男'></el-option> |
| | | <el-option label="女" value='女'></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row :span="16"> |
| | |
| | | >编辑</el-button> |
| | | <el-button v-if="isShow_2" type="primary" @click="submitForm" :disabled="dsb">完成</el-button> |
| | | <br> |
| | | <el-button |
| | | type="primary" |
| | | @click="handleExport" |
| | | v-hasPermi="['family:note:export']" |
| | | >导出</el-button> |
| | | |
| | | </el-row> |
| | | |
| | | </el-container> |
| | |
| | | |
| | | </template> |
| | | <template v-else> |
| | | <el-select v-model="marryList.spouseMarryStatus" placeholder="请选择婚姻状态" clearable :style="{width: '100%'}"> |
| | | <el-select v-model="smrs" 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-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> |
| | | |
| | | <template v-if="!isEditing"> |
| | | <el-input v-model="marryList.spouseSex === '男' ? inds='男':inds='女'" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> |
| | | </template> |
| | | <template v-else> |
| | | <el-select v-model="inds" placeholder="请选择性别" clearable :style="{width: '100%'}" :disabled="dsb"> |
| | | <el-option label="男" value='男'></el-option> |
| | | <el-option label="女" value='女'></el-option> |
| | | </el-select> |
| | | </template> |
| | | |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row :span="16"> |
| | |
| | | |
| | | // 遮罩层 |
| | | disabled: false, |
| | | |
| | | isEditing:false, |
| | | inds: undefined, |
| | | sinds: undefined, |
| | | loading: false, |
| | | formData:[], |
| | | // 选中数组 |
| | |
| | | noneBtnImg:false, |
| | | limitCountImg:1,//上传图片的最大数量 |
| | | //个人信息数据 |
| | | marryList:[], |
| | | marryList:{}, |
| | | fit:['fill'], |
| | | |
| | | oldSpouseList:[], |
| | | oldSpouseList:{}, |
| | | //下拉实现 |
| | | activeNames:['1'], |
| | | // 弹出层标题 |
| | |
| | | open: false, |
| | | // open:true, |
| | | // 是否显示弹出层(数据权限) |
| | | mrs:undefined, |
| | | smrs:undefined, |
| | | openDataScope: false, |
| | | menuExpand: false, |
| | | menuNodeAll: false, |
| | |
| | | },{ |
| | | value:'1', |
| | | label:'男' |
| | | },], |
| | | }], |
| | | |
| | | //生育情况 |
| | | |
| | |
| | | |
| | | getList() { |
| | | this.loading = false; |
| | | alert(344) |
| | | //个人信息 |
| | | listMarry(this.queryParams).then(response => { |
| | | alert(124) |
| | | console.log(response.data) |
| | | if(response.data.length == 0){ |
| | | this.loading = false; |
| | | this.marryList=[]; |
| | | this.total = 0; |
| | | this.oldSpouseList = []; |
| | | this.marryList={}; |
| | | |
| | | this.oldSpouseList = {}; |
| | | } |
| | | else{ |
| | | this.marryList = response.data; |
| | | this.total = response.data.total; |
| | | |
| | | this.oldSpouseList = this.marryList.oldSpouseList; |
| | | this.loading = false; |
| | | |
| | |
| | | this.isShow=false |
| | | this.isShow_2=true |
| | | this.isEditing=true |
| | | if(this.marryList.marryStatus == 0) |
| | | this.mrs = '未婚' |
| | | else if(this.marryList.marryStatus == 1) |
| | | this.mrs = '初婚' |
| | | else if(this.marryList.marryStatus == 2) |
| | | this.mrs = '离婚' |
| | | else |
| | | this.mrs = '再婚'// this.isEdit=false |
| | | if(this.marryList.spouseMarryStatus == 0) |
| | | this.smrs = '未婚' |
| | | else if(this.marryList.spouseMarryStatus == 1) |
| | | this.smrs = '初婚' |
| | | else if(this.marryList.spouseMarryStatus == 2) |
| | | this.smrs = '离婚' |
| | | else |
| | | this.smrs = '再婚'// this.isEdit=false |
| | | // this.isEdit=false |
| | | }, |
| | | |
| | |
| | | //修改后的保存 |
| | | |
| | | 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 |
| | | |
| | | if(parseInt(this.mrs)) |
| | | this.marryList.marryStatus = parseInt(this.mrs) |
| | | if(parseInt(this.smrs)) |
| | | this.marryList.spouseMarryStatus = parseInt(this.smrs) |
| | | this.marryList.sex = this.sinds |
| | | this.marryList.spouseSex = this.inds |
| | | this.$refs['elForm'].validate(valid => { |
| | | if (valid) { |
| | | if (this.marryList.id !== undefined) { |
| | |
| | | this.$modal.msgSuccess("修改成功"); |
| | | // this.open = false; |
| | | this.btn=false |
| | | this.isEditing = false |
| | | this.dsb = true |
| | | this.isShow_2=false |
| | | this.isShow = true |
| | | |
| | | }); |
| | | } else { |
| | | this.$modal.msgSuccess("修改失败"); |