psj 2 years ago
parent
commit
227285a19f
2 changed files with 20 additions and 2 deletions
  1. 1 0
      src/role_button.js
  2. 19 2
      src/views/home/Login.vue

+ 1 - 0
src/role_button.js

@@ -86,6 +86,7 @@ export function selectConfigButtonByRole(){
                 }
                //显示已经配置的按钮
                 var buttons = $(".role_button");
+                console.log(JSON.stringify(tempConfigButtonMap) + "11");
                 for(let i = 0 ; i <buttons.length ; i++ ){
                     if(tempConfigButtonMap[$(buttons[i]).attr("role_button_code")] == null){
                         $(buttons[i]).css("pointer-events","none");

+ 19 - 2
src/views/home/Login.vue

@@ -201,7 +201,6 @@
                     localStorage.setItem("ywtb_userkeycode", userkeycode);
                     localStorage.setItem("ywtb_changetime", changetime);
                     localStorage.setItem("ywtb_role_uuid", role_uuid);
-                    // alert(userkeycode);
                     this.editUserinfoLoginStates(usercode,userkeycode);
                     //
                 })
@@ -222,11 +221,29 @@
                     //var result = eval("(" + data.msg + ")");
                     let result =response.data.msg;
                     if (result[0]["success"] == "true") {
-                        this.$router.push('/origion/home');
+                        this.selecModuleByRoleCode();
                         return;
                     }
                 })
             },
+            selecModuleByRoleCode(){
+                this.$request({
+                    url:'/ptjkInterface/selecModuleByRoleCode',
+                    method:'post',
+                    data:{
+                        "ROLE_ID":localStorage.getItem("ywtb_role"),
+                        "APPKEY":localStorage.getItem("ywtb_userkeycode")
+                    }
+                }).then(response => {
+                    //var result = eval("(" + data.msg + ")");
+                    var result =response.data.msg;
+                    var rows = result[0].Rows;
+                    localStorage.setItem("ywtb_role_models",JSON.stringify(rows));
+                    this.$router.push('/origion/home');
+                    return;
+                })
+            }
+            ,
             //重复动画
             drawFrame() {
                 requestAnimationFrame(this.drawFrame);