From e20f3d2945acedf83676a0720821e9ec5c8f228e Mon Sep 17 00:00:00 2001
From: Tcsm <1377977403@qq.com>
Date: 星期六, 05 八月 2023 17:17:06 +0800
Subject: [PATCH] 个人自传完善新增按钮
---
ruoyi-ui/src/views/self/show.vue | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/ruoyi-ui/src/views/self/show.vue b/ruoyi-ui/src/views/self/show.vue
index 1b1e0c2..5661b2b 100644
--- a/ruoyi-ui/src/views/self/show.vue
+++ b/ruoyi-ui/src/views/self/show.vue
@@ -631,7 +631,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">
@@ -782,7 +782,7 @@
btn:false,
isShow:true,
isShow_2:false,
- isEdit:false,
+ isEdit1:false,
formDat: {
//涓汉鍩烘湰淇℃伅
nickName:undefined,
@@ -982,8 +982,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 +1007,7 @@
},
//涓汉鑷紶缂栬緫
editData(data) {
- this.isEdit = true; // 璁剧疆涓虹紪杈戞搷浣�
+ this.isEdit1 = true; // 璁剧疆涓虹紪杈戞搷浣�
// 灏嗚淇敼鐨勬暟鎹~鍏呭埌formDat瀵硅薄涓�
this.formDat.ageBegin = data.ageBegin;
this.formDat.ageEnd = data.ageEnd;
@@ -1312,7 +1317,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,9 +1326,11 @@
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 {
@@ -1345,7 +1352,7 @@
this.formDat[key] = '';
});
// 閲嶇疆isEdit涓篺alse锛屼互渚夸笅娆$偣鍑绘柊澧炴椂涓烘柊澧炴搷浣�
- this.isEdit = false;
+ this.isEdit1 = false;
},
editRow(row) {
--
Gitblit v1.9.1