【fix bug】67864 还原用户提示语修改

This commit is contained in:
dujie
2023-04-07 16:49:36 +08:00
parent 476648f58b
commit df8d7baa45
@@ -43,7 +43,7 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleRevert([record.id])"><a-icon type="redo"/> 还原用户</a>
<a @click="handleRevert([record.id],[record.username])"><a-icon type="redo"/> 还原用户</a>
<a-divider type="vertical"/>
<a @click="handleDelete([record.id])"><a-icon type="delete"/> 彻底删除</a>
</span>
@@ -134,19 +134,17 @@ export default {
this.innerVisible = false
},
// 还原用户
handleRevert (userIds, userName) {
handleRevert (userIds, username) {
this.$confirm({
title: '恢复用户',
// content: `您确定要恢复这 ${userIds.length} 个用户吗`,
content: `是否还原选中用户?`,
content: `是否还原用户${username}`,
centered: true,
onOk: () => {
postAction(this.url.putRecycleBin, { userIds: userIds.join(',') }).then((res) => {
if (res.success) {
this.handleOk()
this.handleClearSelection()
// this.$message.success(`还原 ${userIds.length} 个用户成功!`)
this.$message.success(`选中用户还原成功!`)
this.$message.success(`${username}用户还原成功!`)
}
})
}
@@ -176,7 +174,20 @@ export default {
})
},
handleRevertBatch () {
this.handleRevert(this.selectedRowKeys)
this.$confirm({
title: '恢复用户',
content: `是否还原选中用户?`,
centered: true,
onOk: () => {
postAction(this.url.putRecycleBin, { userIds: this.selectedRowKeys.join(',') }).then((res) => {
if (res.success) {
this.handleOk()
this.handleClearSelection()
this.$message.success(`选中用户还原成功!`)
}
})
}
})
},
handleDeleteBatch () {
this.handleDelete(this.selectedRowKeys)