This commit is contained in:
zhutianqi
2022-01-11 11:43:40 +08:00
parent 60cc5e200a
commit 697fab7bf0
@@ -179,7 +179,7 @@
class="common-button-primary" class="common-button-primary"
size="mini" size="mini"
type="primary" type="primary"
@click="itemEdit(scope.row)">处理</el-button> @click="itemEdit(scope.row, scope.$index)">处理</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -447,14 +447,13 @@
}, },
saveUserInfo2 () { saveUserInfo2 () {
for( let a = 0; a < this.data.length; a++) { for( let a = 0; a < this.data.length; a++) {
if (this.data[a].id === this.itemId) { if (a === this.itemId) {
this.data[a].chapterNumber = this.editForm.chapterNumber this.data[a].chapterNumber = this.editForm.chapterNumber
this.data[a].chapterName = this.editForm.chapterName this.data[a].chapterName = this.editForm.chapterName
this.data[a].oldText = this.editForm.oldText this.data[a].oldText = this.editForm.oldText
this.data[a].newText = this.editForm.newText this.data[a].newText = this.editForm.newText
this.data[a].reason = this.editForm.reason this.data[a].reason = this.editForm.reason
this.data[a].cause = this.editForm.cause this.data[a].cause = this.editForm.cause
this.$set(this.data, a,this.editForm)
} }
} }
this.modalshowflag2 = false this.modalshowflag2 = false
@@ -462,8 +461,8 @@
cancleUserInfo2 () { cancleUserInfo2 () {
this.modalshowflag2 = false this.modalshowflag2 = false
}, },
itemEdit (row) { itemEdit (row, index) {
this.itemId = row.id this.itemId = index
this.modalshowflag2 = true this.modalshowflag2 = true
this.editForm = { this.editForm = {
chapterNumber: row.chapterNumber, chapterNumber: row.chapterNumber,