【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> </template>
<span slot="action" slot-scope="text, record"> <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-divider type="vertical"/>
<a @click="handleDelete([record.id])"><a-icon type="delete"/> 彻底删除</a> <a @click="handleDelete([record.id])"><a-icon type="delete"/> 彻底删除</a>
</span> </span>
@@ -134,19 +134,17 @@ export default {
this.innerVisible = false this.innerVisible = false
}, },
// 还原用户 // 还原用户
handleRevert (userIds, userName) { handleRevert (userIds, username) {
this.$confirm({ this.$confirm({
title: '恢复用户', title: '恢复用户',
// content: `您确定要恢复这 ${userIds.length} 个用户吗`, content: `是否还原用户${username}`,
content: `是否还原选中用户?`,
centered: true, centered: true,
onOk: () => { onOk: () => {
postAction(this.url.putRecycleBin, { userIds: userIds.join(',') }).then((res) => { postAction(this.url.putRecycleBin, { userIds: userIds.join(',') }).then((res) => {
if (res.success) { if (res.success) {
this.handleOk() this.handleOk()
this.handleClearSelection() this.handleClearSelection()
// this.$message.success(`还原 ${userIds.length} 个用户成功!`) this.$message.success(`${username}用户还原成功!`)
this.$message.success(`选中用户还原成功!`)
} }
}) })
} }
@@ -176,7 +174,20 @@ export default {
}) })
}, },
handleRevertBatch () { 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 () { handleDeleteBatch () {
this.handleDelete(this.selectedRowKeys) this.handleDelete(this.selectedRowKeys)