| | |
| | | <div v-if="item.term === '研究生'"> {{item.content}}</div> |
| | | <div v-if="item.term === '工作'"> {{item.content}}</div> |
| | | <div v-if="item.term === '结婚后'"> {{item.content}}</div> |
| | | <el-button size='mini' type="text" class="btn_edit" @click="editData(item)" style='position: absolute;right:10px;top:5px;'> |
| | | <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn> |
| | | </el-button> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | |
| | | <el-button size='mini' type="text" class="btn_autobiography" @click="showDialog('autobiography')" style='position: absolute;right:10px;top:5px;'> |
| | | <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn> |
| | | </el-button> |
| | |
| | | </div> |
| | | </el-dialog> |
| | | <!--新增自传--> |
| | | <el-dialog :title="title" :visible.sync="dialogVisible.autobiography" width="900px" append-to-body> |
| | | <el-dialog :title="isEdit ? '编辑记录' : '新增记录'" :visible.sync="dialogVisible.autobiography" width="900px" append-to-body> |
| | | <el-col > |
| | | <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-position="left" > |
| | | <el-row :span="5"> |
| | | <!-- <el-form-item label="需要修改的记录:" prop="id">--> |
| | | <!-- <el-select v-model="formDat.id" placeholder="请选择需要修改的记录" clearable :style="{width: '50%'}" >--> |
| | | <!-- <el-option v-for="(item, index) in AutobiographyList" :key='item.id' :label="item.ageBegin+'~'+item.ageEnd+'岁'+'('+item.term+')'"--> |
| | | <!-- ></el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="年龄段:" prop="ageBegin ageEnd" label-width="70px"> |
| | | <el-input v-model="formDat.ageBegin" placeholder="" clearable :style="{width: '20%'}" > |
| | | </el-input> |
| | |
| | | listExperience, addExperience, updateExperience, delExperience, |
| | | getIndividualRelation, addRelation, updateRelation, delRelation, |
| | | getCertificateList, addCertificate, updateCertificate, delCertificate, |
| | | getAbroadList, addAbroad,updateAbroad, delAbroad, |
| | | getAutobiographyList, getAutobiographyTermList, addAutobiography, |
| | | getAbroadList, addAbroad, updateAbroad, delAbroad, |
| | | getAutobiographyList, getAutobiographyTermList, addAutobiography,updateAutobiography, |
| | | getCategory, |
| | | } from "@/api/self/index"; |
| | | import { delFamilyevent, uploadPic } from '../../api/bignote' |
| | |
| | | dateRange: [], |
| | | // 数据范围选项 |
| | | fot:[".jpg",".jif"], |
| | | fileList:[ |
| | | ], |
| | | fileListOther:[ |
| | | |
| | | ], |
| | | fileList:[], |
| | | fileListOther:[], |
| | | dsb:true, |
| | | btn:false, |
| | | isShow:true, |
| | | isShow_2:false, |
| | | isEdit:false, |
| | | formDat: { |
| | | //个人基本信息 |
| | | nickName:undefined, |
| | |
| | | term:undefined, |
| | | |
| | | }, |
| | | AgeEnd:'', |
| | | // 菜单列表 |
| | | menuOptions: [], |
| | | // 部门列表 |
| | |
| | | }], |
| | | |
| | | }, |
| | | selectedOption:'', |
| | | typeOptions:[], |
| | | typeOption: [{ |
| | | value:'护照', |
| | |
| | | this.getAutobiographyInfor(); |
| | | // this.getSrc1(typeOptions) |
| | | }, |
| | | //个人自传编辑 |
| | | editData(data) { |
| | | this.isEdit = true; // 设置为编辑操作 |
| | | // 将要修改的数据填充到formDat对象中 |
| | | this.formDat.ageBegin = data.ageBegin; |
| | | this.formDat.ageEnd = data.ageEnd; |
| | | this.formDat.term = data.term; |
| | | this.formDat.content = data.content; |
| | | |
| | | // 打开弹窗 |
| | | this.dialogVisible.autobiography = true; |
| | | }, |
| | | |
| | | //隔行变色 |
| | | tableRowClassName({ row, rowIndex }) { |
| | |
| | | return '——————' |
| | | } |
| | | }, |
| | | getSrc1(term){ |
| | | if(term==='7'){ |
| | | return '研究生' |
| | | } |
| | | }, |
| | | |
| | | /** 查询角色列表 */ |
| | | getList() { |
| | |
| | | this.total = response.data.total; |
| | | this.loading = false; |
| | | } |
| | | |
| | | ); |
| | | //成员关系 |
| | | getIndividualRelation(this.queryParams).then(response => { |
| | |
| | | // this.total = response.data.total; |
| | | // this.loading = false; |
| | | // }); |
| | | |
| | | }, |
| | | |
| | | //图片的上传及上传按钮隐藏 |
| | |
| | | this.formDat[key] = ''; |
| | | }); |
| | | }, |
| | | //个人自传 |
| | | //个人自传的保存 |
| | | submitDataScope6: function() { |
| | | this.$refs["elForm"].validate(valid => { |
| | | if (valid) { |
| | | // 根据值找到选中的选项对象 |
| | | const selectedOption = this.typeOptions.find(option => option.value === this.formDat.term); |
| | | // 将选中选项的文本设置为"term"字段的值 |
| | | this.formDat.term = selectedOption.label; |
| | | addAutobiography(this.formDat).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.dialogVisible.autobiography = false; |
| | | this.getList(); |
| | | }); |
| | | |
| | | if (this.isEdit) { |
| | | // 执行修改操作 |
| | | updateAutobiography(this.formDat).then(response => { |
| | | // 将选中选项的文本设置为"term"字段的值 |
| | | this.formDat.term = selectedOption.label; |
| | | this.formDat.id = selectedOption.id; |
| | | console.log("1") |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.dialogVisible.autobiography = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | // 执行新增操作 |
| | | addAutobiography(this.formDat).then(response => { |
| | | this.formDat.term = selectedOption.label; |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.dialogVisible.autobiography = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | // 清空formDat对象的数据 |
| | | Object.keys(this.formDat).forEach(key => { |
| | | this.formDat[key] = ''; |
| | | }); |
| | | // 重置isEdit为false,以便下次点击新增时为新增操作 |
| | | this.isEdit = false; |
| | | }, |
| | | |
| | | editRow(row) { |
| | |
| | | .btn_autobiography{ |
| | | background:center no-repeat url('../../assets/icons/add1.png') ; |
| | | } |
| | | .btn_edit{ |
| | | background:center no-repeat url('../../assets/icons/edit.png') ; |
| | | } |
| | | .button { |
| | | background:center no-repeat url('../../assets/icons/add1.png') ; |
| | | margin-left: 69.5vw; |