From d019c1632d2a92ed48b27b9cce1debcbe79afb2c Mon Sep 17 00:00:00 2001 From: linwenling <3256558519@qq.com> Date: 星期一, 07 八月 2023 16:53:46 +0800 Subject: [PATCH] 修改婚姻部分 --- ruoyi-ui/src/views/self/show.vue | 46 ++++++++++++++++++++++++++++++++++++---------- 1 files changed, 36 insertions(+), 10 deletions(-) diff --git a/ruoyi-ui/src/views/self/show.vue b/ruoyi-ui/src/views/self/show.vue index 1a5b6c0..41e3d9a 100644 --- a/ruoyi-ui/src/views/self/show.vue +++ b/ruoyi-ui/src/views/self/show.vue @@ -1,5 +1,7 @@ <template> <div class="app-container"> + <!-- 鍒锋柊椤甸潰 --> +<!-- <MyComponent :key="componentKey" />--> <!-- 鍥炲埌椤堕儴--> <el-backtop :bottom="150" :right="30"> <el-button type="primary" circle @@ -59,7 +61,7 @@ <el-input v-model="individualList.sex === 1 ? '鐢�':'濂�'" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> </template> <template v-else> - <el-select v-model="individualList.sex" placeholder="璇烽�夋嫨鎬у埆" clearable :style="{width: '100%'}"> + <el-select v-model="individualList.sex" placeholder="璇烽�夋嫨鎬у埆" clearable :style="{width: '100%'}" :disabled="dsb"> <el-option label="鐢�" value="1"></el-option> <el-option label="濂�" value="0"></el-option> </el-select> @@ -239,7 +241,7 @@ <div> <el-form v-loading="loading" :data="individualList" @selection-change="handleSelectionChange"> <el-form-item label="鏄惁鎷ユ湁澶栫睄銆佸澶栧眳鐣欐潈銆侀暱鏈熷眳鐣欒鍙�" > - <el-radio-group v-model="individualList.outStatus" style="margin-bottom: 0;color: #FEF7FC;"> + <el-radio-group v-model="individualList.outStatus" style="margin-bottom: 0;color: #FEF7FC;" :disabled="dsb"> <el-radio :label="1">鏄�</el-radio> <el-radio :label="0">鍚�</el-radio> </el-radio-group> @@ -266,7 +268,7 @@ <div class="title-wrapper"> 涓昏瀛︿範鍙婂伐浣滅粡鍘� <div> - <el-button class="button" size="mini" type="text" @click="showDialog('open')"> + <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> @@ -631,7 +633,7 @@ </div> </el-dialog> <!--鏂板鑷紶--> - <el-dialog :title="isEdit ? '缂栬緫璁板綍' : '鏂板璁板綍'" :visible.sync="dialogVisible.autobiography" width="900px" append-to-body> + <el-dialog :title="isEdit1 ? '缂栬緫璁板綍' : '鏂板璁板綍'" :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"> @@ -697,6 +699,9 @@ export default { name: "show", dicts: ['sys_normal_disable'], + // components: { + // MyComponent + // }, data() { return { // 閬僵灞� @@ -704,6 +709,7 @@ loading: true, formData:[], + componentKey: 0, // 閫変腑鏁扮粍 ids: [], // 闈炲崟涓鐢� @@ -782,7 +788,7 @@ btn:false, isShow:true, isShow_2:false, - isEdit:false, + isEdit1:false, formDat: { //涓汉鍩烘湰淇℃伅 nickName:undefined, @@ -982,8 +988,13 @@ this.dialogVisible.relation1 = false; this.dialogVisible.certificate =false; this.dialogVisible.abroad=false; - this.dialogVisible.autobiography=false + this.dialogVisible.autobiography=false; + this.isEdit1 = false; this.reset(); + // 娓呯┖formDat瀵硅薄鐨勬暟鎹� + Object.keys(this.formDat).forEach(key => { + this.formDat[key] = ''; + }); }, //涓嬫媺 handleChange(activeNames) { @@ -1002,7 +1013,7 @@ }, //涓汉鑷紶缂栬緫 editData(data) { - this.isEdit = true; // 璁剧疆涓虹紪杈戞搷浣� + this.isEdit1 = true; // 璁剧疆涓虹紪杈戞搷浣� // 灏嗚淇敼鐨勬暟鎹~鍏呭埌formDat瀵硅薄涓� this.formDat.ageBegin = data.ageBegin; this.formDat.ageEnd = data.ageEnd; @@ -1312,7 +1323,7 @@ // 鏍规嵁鍊兼壘鍒伴�変腑鐨勯�夐」瀵硅薄 const selectedOption = this.typeOptions.find(option => option.value === this.formDat.term); - if (this.isEdit) { + if (this.isEdit1) { // 鎵ц淇敼鎿嶄綔 updateAutobiography(this.formDat).then(response => { // 灏嗛�変腑閫夐」鐨勬枃鏈缃负"term"瀛楁鐨勫�� @@ -1321,7 +1332,12 @@ console.log("1") this.$modal.msgSuccess("淇敼鎴愬姛"); this.dialogVisible.autobiography = false; + this.isEdit1 = false; this.getList(); + }).catch(error => { + console.log(error); + this.isEdit1 = false; + this.dialogVisible.autobiography = false; }); } else { // 鎵ц鏂板鎿嶄綔 @@ -1330,6 +1346,9 @@ this.$modal.msgSuccess("鏂板鎴愬姛"); this.dialogVisible.autobiography = false; this.getList(); + }).catch(error => { + console.log(error); + this.dialogVisible.autobiography = false; }); } } @@ -1339,7 +1358,7 @@ this.formDat[key] = ''; }); // 閲嶇疆isEdit涓篺alse锛屼互渚夸笅娆$偣鍑绘柊澧炴椂涓烘柊澧炴搷浣� - this.isEdit = false; + this.isEdit1 = false; }, editRow(row) { @@ -1362,8 +1381,14 @@ if (this.individualList.userId !== undefined) { updateIndividual(this.individualList).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛"); + // 寮哄埗鏇存柊鐩稿叧缁勪欢 + this.individualList={...this.individualList} + // this.open = false; + this.dsb = true this.btn=false + this.isShow_2=false + this.isShow=true }); } else { this.$modal.msgSuccess("淇敼澶辫触"); @@ -1372,7 +1397,7 @@ } }) // 鍒锋柊椤甸潰 - window.location.reload(); + // window.location.reload(); }, //涓昏缁忓巻 saveRowExperienceList(row) { @@ -1573,6 +1598,7 @@ .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; -- Gitblit v1.9.1