|
@@ -194,7 +194,7 @@ export default {
|
|
for (let i = 0; i < res.data.length; i++) {
|
|
for (let i = 0; i < res.data.length; i++) {
|
|
//
|
|
//
|
|
let obj = {
|
|
let obj = {
|
|
- value: `'${res.data[i].id}'`,
|
|
|
|
|
|
+ value: `${res.data[i].orgNo}`,
|
|
label: res.data[i].orgName,
|
|
label: res.data[i].orgName,
|
|
disabled: res.data[i].isOptional == "1" ? false : true,
|
|
disabled: res.data[i].isOptional == "1" ? false : true,
|
|
};
|
|
};
|
|
@@ -385,9 +385,8 @@ export default {
|
|
let listTmp = [];
|
|
let listTmp = [];
|
|
for (let i = 0; i < res.data.gradeEntities.length; i++) {
|
|
for (let i = 0; i < res.data.gradeEntities.length; i++) {
|
|
//
|
|
//
|
|
- listTmp.push(res.data.gradeEntities[i].id);
|
|
|
|
|
|
+ listTmp.push(res.data.gradeEntities[i].orgNo);
|
|
}
|
|
}
|
|
-
|
|
|
|
this.ruleForm.studentNumber = res.data.userNo;
|
|
this.ruleForm.studentNumber = res.data.userNo;
|
|
//回显姓名
|
|
//回显姓名
|
|
this.ruleForm.name = res.data.userName;
|
|
this.ruleForm.name = res.data.userName;
|
|
@@ -462,17 +461,25 @@ export default {
|
|
// console.log(this.ruleForm.group);
|
|
// console.log(this.ruleForm.group);
|
|
let that = this;
|
|
let that = this;
|
|
console.log("grade");
|
|
console.log("grade");
|
|
-
|
|
|
|
// gradeList
|
|
// gradeList
|
|
let list = this.gradeList.filter((item) => {
|
|
let list = this.gradeList.filter((item) => {
|
|
- return this.ruleForm.grade.includes(item.id);
|
|
|
|
|
|
+ return this.ruleForm.grade.includes(item.orgNo);
|
|
});
|
|
});
|
|
- console.log(list);
|
|
|
|
|
|
+ let listTm = [];
|
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
|
+ let obj = {
|
|
|
|
+ orgName: list[i].orgName,
|
|
|
|
+ orgNo: list[i].orgNo,
|
|
|
|
+ parentOrgNo: list[i].parentOrgNo,
|
|
|
|
+ };
|
|
|
|
+ listTm.push(obj);
|
|
|
|
+ }
|
|
|
|
+ // console.log(list);
|
|
// this.ruleForm.password = md5(this.ruleForm.password);
|
|
// this.ruleForm.password = md5(this.ruleForm.password);
|
|
this.$http.post(
|
|
this.$http.post(
|
|
`/user/addOrUpdateUser`,
|
|
`/user/addOrUpdateUser`,
|
|
{
|
|
{
|
|
- gradeEntities: list,
|
|
|
|
|
|
+ gradeEntities: listTm,
|
|
orgNo: this.userInfo.orgNo,
|
|
orgNo: this.userInfo.orgNo,
|
|
orgName: this.userInfo.orgName,
|
|
orgName: this.userInfo.orgName,
|
|
userNo: this.ruleForm.studentNumber,
|
|
userNo: this.ruleForm.studentNumber,
|
|
@@ -503,12 +510,24 @@ export default {
|
|
editUserFun() {
|
|
editUserFun() {
|
|
let that = this;
|
|
let that = this;
|
|
let list = this.gradeList.filter((item) => {
|
|
let list = this.gradeList.filter((item) => {
|
|
- return this.ruleForm.grade.includes(item.id);
|
|
|
|
|
|
+ return this.ruleForm.grade.includes(item.orgNo);
|
|
});
|
|
});
|
|
|
|
+ console.log(list);
|
|
|
|
+ console.log(this.gradeList);
|
|
|
|
+ console.log(this.ruleForm.grade);
|
|
|
|
+ let listTm = [];
|
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
|
+ let obj = {
|
|
|
|
+ orgName: list[i].orgName,
|
|
|
|
+ orgNo: list[i].orgNo,
|
|
|
|
+ parentOrgNo: list[i].parentOrgNo,
|
|
|
|
+ };
|
|
|
|
+ listTm.push(obj);
|
|
|
|
+ }
|
|
// this.queryOrgName();
|
|
// this.queryOrgName();
|
|
// this.userDetailData.orgNo = this.ruleForm.group[this.ruleForm.group.length - 1];
|
|
// this.userDetailData.orgNo = this.ruleForm.group[this.ruleForm.group.length - 1];
|
|
// this.userDetailData.orgName = this.groupName;
|
|
// this.userDetailData.orgName = this.groupName;
|
|
- this.userDetailData.gradeEntities = list;
|
|
|
|
|
|
+ this.userDetailData.gradeEntities = listTm;
|
|
this.userDetailData.userName = this.ruleForm.name;
|
|
this.userDetailData.userName = this.ruleForm.name;
|
|
this.userDetailData.gender = this.ruleForm.sex;
|
|
this.userDetailData.gender = this.ruleForm.sex;
|
|
this.userDetailData.userNo = this.ruleForm.studentNumber;
|
|
this.userDetailData.userNo = this.ruleForm.studentNumber;
|