feige
2024-11-26 a2c92276402a4c5ad6373928986e040cf1a87483
ruoyi-ui/src/views/homeRoot/personInfo.vue
@@ -57,7 +57,7 @@
                  <el-col>
                    <el-row :span="8">
                      <el-form-item label="性别" prop="sex" label-width="45px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                        <el-input v-model="personInfos[0].sex === 1 ? '男':'女'" placeholder="请输入性别" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
                        <el-input v-model="personInfos[0].sex === 0 ? '男':'女'" placeholder="请输入性别" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
                      </el-form-item>
                    </el-row>
                    <el-row :span="8">
@@ -95,8 +95,11 @@
                    </el-row>
                    <el-row :span="8">
                      <el-form-item label="配偶" prop="nickName" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                        <el-input v-model="personInfos[0].nickName" placeholder="请输入配偶" clearable :style="{width: '100%'}" :disabled="dsb">
                        </el-input>
                        <el-input v-if="personInfos[1]!=null" v-model="personInfos[1].nickName" placeholder="请输入配偶" clearable :style="{width: '100%'}" :disabled="dsb">
                         <template slot="suffix">
         <a @click="handleCheck(personInfos[1].userId)" class="aft">查看详情</a>
                            </template>
                  </el-input>
                      </el-form-item>
                    </el-row>
@@ -122,6 +125,7 @@
                  </el-col>
              </div>
            </el-container>
            <el-divider />
         <div>
           <el-tabs type="border-card"
@@ -129,10 +133,10 @@
      
                      
            
            <div style="margin-bottom: 20px;">
            <div style="margin-bottom: 20px;"  v-if="cid==uid">
            <el-button size='mini' type="text" class="btn_edit" @click="editAutography" style='top: 0px; bottom:20px;right: 20px;'>
              <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn>
              <span >{{ editMode ? this.bstn='保存' : this.bstn='修改' }}</span>
              <sapn v-if="cid==uid" v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn>
              <span v-if="cid==uid">{{ editMode ? this.bstn='保存' : this.bstn='修改' }}</span>
            </el-button>
            </div>
            <el-tab-pane
@@ -151,9 +155,6 @@
      </div>
<el-divider style="top:120px;"/>
      <div id="building2" v-show="!isshow">
      </div>
    </div>
   <div>
@@ -182,14 +183,16 @@
</template>
<script>
import {getRoot} from "@/api/root/index";
import {getRoot,updateInfoUser} from "@/api/root/index";
  export default {
    name: "index",
    name: "personInfo",
    data(){
      return{
        cid: undefined,
        uid: undefined,
        bstn: undefined,
        editMode:false,
        autoGrahpy: "22222222222222222",
        autoGrahpy: "姓名__________,性别__________,出生于____年__月__日。我毕业于__________大学的__________专业,获得__________学历。目前就职于__________的__________职位,主要负责__________,通过运用__________技能/方法,成功实现了__________,不仅提升了个人专业能力,也促进了团队与项目的成功。在业余时间,我热衷于__________(如阅读、旅行、摄影等)作为我的兴趣爱好,这些活动不仅丰富了我的生活,也让我在放松的同时不断学习和成长。回顾过往,最令我难忘的一件事是__________(简述事件,如参与的一次重大项目、一次难忘的旅行经历或解决某个难题的过程),这件事不仅让我深刻体会到了__________(如团队合作的力量、坚持不懈的重要性、生活的美好等),也对我的人生观和价值观产生了深远的影响。我具备__________等特质,能够快速适应新环境,勇于挑战,致力于在__________领域中不断追求卓越",
        // 遮罩层
      
        disabled: false,
@@ -250,28 +253,53 @@
  ,
  mounted() {
     const id = this.$route.params && this.$route.params.id;
    this.uid = id;
     this.getList(id);
  },
  methods:{
     /** 查看详细信息 */
     handleCheck(id){
       // const id = row.userId;
      //alert(id)
       // alert(id)
   //   alert(23)
this.$store.dispatch("tagsView/delView", this.$route); //关闭当前页
      this.$router.replace({ path: "/familymodel/jiagenwang/personInfo/" + id });
    //  this.$router.push("/familymodel/jiagenwang/personInfo/" + id);
     },
     editAutography(data)
     {
        this.editMode = true;
        if(this.bstn=="保存")
        {
            this.editMode = false
           }
           var fdt = {
             selfIntroduction: this.autoGrahpy}
             updateInfoUser(fdt).then(response=>{
               this.$modal.msgSuccess("修改成功")
               this.getList(this.uid)
            })
        }
     },
     
    getList(id)
    {
      this.cid = this.$store.state.user.userId
     let _this = this;
      getRoot(id).then(response => {
         console.log(response.data)
       console.log("-----")
        //这里是夫妻的信息,已经拿到了
        _this.personInfos = response.data
        if(_this.personInfos[1]==null)
          _this.isshow = false;
      //  if(_this.personInfos[1]==null)
        //  _this.isshow = false;
        _this.personInfo1 = response.data[0]
      if(response.data[0].selfIntroduction!=null)
      _this.autoGrahpy = response.data[0].selfIntroduction
        //alert(this.personInfos[0].url)
    });
@@ -351,4 +379,9 @@
    .box-card {
      width:100%;
    }
   .aft{
      cursor: pointer;
      color: red;
      font-weight: bold;
   }
</style>