|
|
@ -3,7 +3,7 @@ import html from "html"; |
|
|
|
import useConfig from "../../models/user.js"; |
|
|
|
import request from "../../request/index.js"; |
|
|
|
import { format } from "../../utils/index.js"; |
|
|
|
import { ElMessage } from "element-plus"; |
|
|
|
import { ElMessage, ElMessageBox } from "element-plus"; |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { AppList }, |
|
|
@ -17,10 +17,30 @@ export default { |
|
|
|
if (item.path === "%s/reset-password") { |
|
|
|
const url = format(item.path, rows[0].id); |
|
|
|
await request(`base/user/${url}`, null, { method: item.meta.method }); |
|
|
|
ElMessage({ |
|
|
|
type: "info", |
|
|
|
message: format("用户%s的密码已经成功重置为123456", rows[0].userName), |
|
|
|
}); |
|
|
|
try { |
|
|
|
await ElMessageBox.confirm(format("是否重置用户%s密码", rows[0].userName), "提示", { |
|
|
|
type: "warning", |
|
|
|
}); |
|
|
|
await ElMessage({ |
|
|
|
type: "info", |
|
|
|
message: "密码已经成功重置为123456", |
|
|
|
}); |
|
|
|
const url = `${config.baseUrl}/${item.path}`; |
|
|
|
await request( |
|
|
|
url, |
|
|
|
rows.map((o) => o.id), |
|
|
|
{ method: "POST" } |
|
|
|
); |
|
|
|
console.log(context); |
|
|
|
await load(); |
|
|
|
} catch (error) { |
|
|
|
if (error === "cancel") { |
|
|
|
ElMessage({ |
|
|
|
type: "info", |
|
|
|
message: "操作取消", |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
return { config, onCommand }; |
|
|
|