|
@@ -301,6 +301,7 @@ let addRules = ref({
|
|
* 详情数据
|
|
* 详情数据
|
|
*/
|
|
*/
|
|
let detailsDb = ref({
|
|
let detailsDb = ref({
|
|
|
|
+ "id": null,
|
|
// 账号
|
|
// 账号
|
|
"userName": null,
|
|
"userName": null,
|
|
// 0 表示教师,1表示学生
|
|
// 0 表示教师,1表示学生
|
|
@@ -610,19 +611,51 @@ const btnBatchDel = () => {
|
|
const btnDetail = (res) => {
|
|
const btnDetail = (res) => {
|
|
|
|
|
|
console.log('弹出指定分页详情', res);
|
|
console.log('弹出指定分页详情', res);
|
|
|
|
+
|
|
|
|
+ let submit = {
|
|
|
|
+ id: res.id,
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ userDetail(submit)
|
|
|
|
+ .then(response => {
|
|
|
|
|
|
- // detailsDb.value = {
|
|
|
|
- // name: '名字',
|
|
|
|
- // username: '账号',
|
|
|
|
- // password: '123456',
|
|
|
|
- // orgId: 6568450359870132,
|
|
|
|
- // roles: [],
|
|
|
|
- // }
|
|
|
|
|
|
+ let data = response?.data?.data;
|
|
|
|
+ // console.log(
|
|
|
|
+ // "userDetailEvent response", response, data
|
|
|
|
+ // );
|
|
|
|
+
|
|
|
|
+ let classInfoIdArray = [];
|
|
|
|
+ if (data.classInfo != null && data.classInfo != undefined) {
|
|
|
|
+ for (let i = 0; i < data.classInfo.length; i++) {
|
|
|
|
+ let thisClassInfo = data.classInfo[i];
|
|
|
|
+ // console.log("thisClassInfo", thisClassInfo);
|
|
|
|
+ classInfoIdArray.push(thisClassInfo.id);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
- // state.value.showDetails = true;
|
|
|
|
|
|
+ detailsDb.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);
|
|
|
|
|
|
-
|
|
|
|
|
|
+ state.value.showDetails = true;
|
|
|
|
+
|
|
|
|
+ }).catch(error => {
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|