From 38bb6cfe527cfa264f7b6b88168bdba23863b189 Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期一, 11 十一月 2024 17:17:56 +0800 Subject: [PATCH] 修改了性别 --- ruoyi-ui/src/views/homeRoot/personInfo.vue | 72 ++++++++++++++++++++++++++--------- 1 files changed, 53 insertions(+), 19 deletions(-) diff --git a/ruoyi-ui/src/views/homeRoot/personInfo.vue b/ruoyi-ui/src/views/homeRoot/personInfo.vue index e44dbda..c95ed04 100644 --- a/ruoyi-ui/src/views/homeRoot/personInfo.vue +++ b/ruoyi-ui/src/views/homeRoot/personInfo.vue @@ -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,16 +133,18 @@ - - <el-button size='mini' type="text" class="btn_edit" @click="editAutography" style='top: 0px;right: 20px;'> - <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn> - <span >{{ editMode ? this.bstn='淇濆瓨' : this.bstn='淇敼' }}</span> + <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-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 label="涓汉绠�浠�"> <template v-if="editMode"> - <div style="padding-top: 10px"> - <el-input v-model="autoGrahpy" type="textarea" ></el-input></div> + <div style="padding-top: 20px;margin-top: 10px;width: 90%;"> + <el-input v-model="autoGrahpy" autosize type="textarea" maxlength="1024" +></el-input></div> </template> <template v-else> {{autoGrahpy}} @@ -149,9 +155,6 @@ </div> <el-divider style="top:120px;"/> - <div id="building2" v-show="!isshow"> - - </div> </div> <div> @@ -180,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: "濮撳悕__________锛屾�у埆__________锛屽嚭鐢熶簬____骞確_鏈坃_鏃ャ�傛垜姣曚笟浜巁_________澶у鐨刜_________涓撲笟锛岃幏寰梍_________瀛﹀巻銆傜洰鍓嶅氨鑱屼簬__________鐨刜_________鑱屼綅锛屼富瑕佽礋璐_________锛岄�氳繃杩愮敤__________鎶�鑳�/鏂规硶锛屾垚鍔熷疄鐜颁簡__________锛屼笉浠呮彁鍗囦簡涓汉涓撲笟鑳藉姏锛屼篃淇冭繘浜嗗洟闃熶笌椤圭洰鐨勬垚鍔熴�傚湪涓氫綑鏃堕棿锛屾垜鐑》浜巁_________锛堝闃呰銆佹梾琛屻�佹憚褰辩瓑锛変綔涓烘垜鐨勫叴瓒g埍濂斤紝杩欎簺娲诲姩涓嶄粎涓板瘜浜嗘垜鐨勭敓娲伙紝涔熻鎴戝湪鏀炬澗鐨勫悓鏃朵笉鏂涔犲拰鎴愰暱銆傚洖椤捐繃寰�锛屾渶浠ゆ垜闅惧繕鐨勪竴浠朵簨鏄痏_________锛堢畝杩颁簨浠讹紝濡傚弬涓庣殑涓�娆¢噸澶ч」鐩�佷竴娆¢毦蹇樼殑鏃呰缁忓巻鎴栬В鍐虫煇涓毦棰樼殑杩囩▼锛夛紝杩欎欢浜嬩笉浠呰鎴戞繁鍒讳綋浼氬埌浜哶_________锛堝鍥㈤槦鍚堜綔鐨勫姏閲忋�佸潥鎸佷笉鎳堢殑閲嶈鎬с�佺敓娲荤殑缇庡ソ绛夛級锛屼篃瀵规垜鐨勪汉鐢熻鍜屼环鍊艰浜х敓浜嗘繁杩滅殑褰卞搷銆傛垜鍏峰__________绛夌壒璐紝鑳藉蹇�熼�傚簲鏂扮幆澧冿紝鍕囦簬鎸戞垬锛岃嚧鍔涗簬鍦╛_________棰嗗煙涓笉鏂拷姹傚崜瓒�", // 閬僵灞� disabled: false, @@ -248,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) }); @@ -317,8 +347,7 @@ } .btn_edit{ background:center no-repeat url('../../assets/icons/edit.png') ; - position: absolute; - top: 0; + float: right; padding-right: 90px; } .bordered-col { @@ -350,4 +379,9 @@ .box-card { width:100%; } + .aft{ + cursor: pointer; + color: red; + font-weight: bold; + } </style> -- Gitblit v1.9.1