This commit is contained in:
zhutianqi
2022-01-21 15:59:40 +08:00
parent 40e48c1915
commit 976350feea
4 changed files with 45 additions and 13 deletions
@@ -432,7 +432,6 @@
}
}
},
saveUserInfo2 () {
if (this.addType === 'add') {
this.data.push(this.editForm)
@@ -446,8 +445,23 @@
this.data[a].reason = this.editForm.reason
}
}
this.modalshowflag2 = false
console.log(this.editForm);
if (this.addType === 'add') {
var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36);
this.itemId = id
this.editForm = {
chapterNumber: '',
chapterName: '',
oldText: '',
newText: '',
reason: '',
id: id,
department: this.$store.getters.userInfo.institutionName,
responUserName: this.$store.getters.userInfo.userName,
responUser: this.$store.getters.userInfo.userId
}
} else if (this.addType === 'edit') {
this.modalshowflag2 = false
}
},
addModal() {
var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36);
@@ -480,7 +494,6 @@
reason: row.reason,
}
},
cancleUserInfo2 () {
this.modalshowflag2 = false
},
@@ -486,7 +486,23 @@ export default {
this.data[a].reason = this.editForm.reason
}
}
this.modalshowflag2 = false
if (this.addType === 'add') {
var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36);
this.itemId = id
this.editForm = {
chapterNumber: '',
chapterName: '',
oldText: '',
newText: '',
reason: '',
id: id,
department: this.$store.getters.userInfo.institutionName,
responUserName: this.$store.getters.userInfo.userName,
responUser: this.$store.getters.userInfo.userId
}
} else if (this.addType === 'edit') {
this.modalshowflag2 = false
}
},
addModal() {
var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36);
@@ -450,12 +450,6 @@
saveUserInfo2 () {
for( let a = 0; a < this.data.length; a++) {
if (this.data[a].id === this.itemId) {
// this.data[a].chapterNumber = this.editForm.chapterNumber
// this.data[a].chapterName = this.editForm.chapterName
// this.data[a].oldText = this.editForm.oldText
// this.data[a].newText = this.editForm.newText
// this.data[a].reason = this.editForm.reason
// this.data[a].cause = this.editForm.cause
this.$set(this.data, a, this.editForm);
}
}