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);
}
}
@@ -210,7 +210,7 @@
<el-form-item label="章节名称" prop="chapterName" label-width="" class="add-form-item">
<el-input v-model="opinionContent.chapterName" autocomplete="off" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="修改前" prop="oldText" label-width="" class="add-form-item">
<el-form-item label="修改前" label-width="" class="add-form-item">
<div v-html="opinionContent.oldText" style="margin: 56px 0 0 10px;"></div>
</el-form-item>
<el-form-item label="修改后" prop="newText" label-width="" class="add-form-item">
@@ -465,9 +465,18 @@ export default {
if (res.respCode === '200') {
this.form.page = 1
this.getList()
if (this.type === 'edit') {
this.isDialog = false
} else {
this.id = ''
this.opinionContent.partCode = ''
this.opinionContent.reason = ''
this.opinionContent.oldText = ''
this.opinionContent.newText = ''
this.opinionContent.cause = ''
}
}
})
this.isDialog = false
}
})
},