|
@@ -776,11 +776,12 @@ const btnBatchDel = () => {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 弹出指定分页详情
|
|
* 弹出指定分页详情
|
|
- * @param res
|
|
|
|
|
|
+ * @param res 当前点击分页的数据参数
|
|
|
|
+ * type 类型 ,不传的时候,弹出,编辑, pwd 弹出修改密码
|
|
*/
|
|
*/
|
|
-const btnDetail = (res) => {
|
|
|
|
|
|
+const btnDetail = (res, type) => {
|
|
|
|
|
|
- console.log('弹出指定分页详情', res);
|
|
|
|
|
|
+ console.log('弹出指定分页详情', res, type);
|
|
|
|
|
|
let submit = {
|
|
let submit = {
|
|
id: res.id,
|
|
id: res.id,
|
|
@@ -819,9 +820,30 @@ const btnDetail = (res) => {
|
|
// "password2": data.password2
|
|
// "password2": data.password2
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ updatePwdDb.value = {
|
|
|
|
+ "id": data.id,
|
|
|
|
+ // 账号
|
|
|
|
+ "userName": data.userName,
|
|
|
|
+ // 0 表示教师,1表示学生
|
|
|
|
+ "userType": data.userType,
|
|
|
|
+ // 昵称
|
|
|
|
+ "nickName": data.nickName,
|
|
|
|
+ // 用户分配到的班级数组,可以是多个
|
|
|
|
+ "classInfo": classInfoIdArray,
|
|
|
|
+ // 密码
|
|
|
|
+ "password": data.password,
|
|
|
|
+ // 确认密码
|
|
|
|
+ "password2": data.password2
|
|
|
|
+ }
|
|
|
|
+
|
|
// console.log("detailsDb.value", detailsDb.value);
|
|
// console.log("detailsDb.value", detailsDb.value);
|
|
|
|
|
|
- state.value.showDetails = true;
|
|
|
|
|
|
+ if (type == null || type == undefined) {
|
|
|
|
+ state.value.showDetails = true;
|
|
|
|
+ }
|
|
|
|
+ else if (type == 'pwd') {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
|
|
|
|
@@ -1017,7 +1039,7 @@ onMounted(function() {
|
|
<el-table-column label="操作">
|
|
<el-table-column label="操作">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-button link type="primary" @click="btnDetail(scope.row)">编辑</el-button>
|
|
<el-button link type="primary" @click="btnDetail(scope.row)">编辑</el-button>
|
|
- <!-- <el-button link type="primary" @click="btnDetail(scope.row)">修改密码</el-button> -->
|
|
|
|
|
|
+ <el-button link type="primary" @click="btnDetail(scope.row, 'pwd')">修改密码</el-button>
|
|
<el-popconfirm :title="`你确定删除${scope.row.userName}吗?`" @confirm="btnDel(scope.row)">
|
|
<el-popconfirm :title="`你确定删除${scope.row.userName}吗?`" @confirm="btnDel(scope.row)">
|
|
<template #reference>
|
|
<template #reference>
|
|
<el-button link type="danger" style="margin-left: 3rem">移除</el-button>
|
|
<el-button link type="danger" style="margin-left: 3rem">移除</el-button>
|