@@ -170,7 +170,8 @@
params:{
parentId:'',
},
- userPost:"system/user/list"
+ userPost:"system/user/list",
+ deptObj:{}
},
mounted(){
// 初始化地市列表
@@ -179,8 +180,23 @@
this.getAreaList()
}
this.getUserList()
+ this.getDept()
},
methods:{
+ getDept(){
+ if (this.userName !== ''){
+ $.ajax({
+ url: ctx + this.userPost,
+ data:{userId:this.userName},
+ type: 'POST',
+ success:((res)=>{
+ this.deptObj = res.rows[0].dept
+ }) ,
+ });
+ }else{
+ this.deptObj ={}
+ }
+ },
getUserList(){
$.ajax({
url: ctx + this.userPost,
diff --git a/ruoyi-admin/src/main/resources/templates/system/train/edit.html b/ruoyi-admin/src/main/resources/templates/system/train/edit.html
index 4aa002a..1b06d36 100644
--- a/ruoyi-admin/src/main/resources/templates/system/train/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/system/train/edit.html
@@ -41,7 +41,7 @@