Sfoglia il codice sorgente

修改直接登录首页问题

11wqe1 12 ore fa
parent
commit
114836e1ec

+ 12 - 2
src/components/sidebarL.vue

@@ -148,7 +148,17 @@ import { myMixin } from "@/mixins/mixin.js"
                 // 二级选中第几个
                 activeLTwo: null,
                 cocoFlowList:[],
-
+                // 荔园集团下的学校 
+                mergedList: [
+						"3823a6a5-1b6e-11f0-a66a-005056924926",
+						"292e34dc-1b6e-11f0-a66a-005056924926",
+						"21d6b367-1b6e-11f0-a66a-005056924926",
+						"1a1a172d-1b6e-11f0-a66a-005056924926",
+						"1197f86b-1b6e-11f0-a66a-005056924926",
+						"f235659b-1b6d-11f0-a66a-005056924926",
+						"d87b62d3-1b6d-11f0-a66a-005056924926",
+						"c25ea59b-1b6d-11f0-a66a-005056924926",
+				]
             }
         },
         methods: {
@@ -157,7 +167,7 @@ import { myMixin } from "@/mixins/mixin.js"
             }),
             // 跳转到看板
             async gotoKanban(){
-                if (this.roleUser.orgName != '荔园小学教育集团') return console.log('非荔园平台不可进入');
+                if (!this.mergedList.includes(this.roleUser.org)) return console.log('非荔园平台不可进入');
                 // 重新获取基础数据
                 await store.dispatch('user/getschPerInfo')
                 // 清除数据让数据看板中的埋点正常(不能这样写,那点返回校区的话就完蛋了)

+ 14 - 3
src/components/topPage.vue

@@ -37,7 +37,7 @@
 
 
         <!-- 荔园 -->
-        <div v-if="roleUser.orgName == '荔园小学教育集团'" class="TabListAdmin">
+        <div v-if="mergedList.includes(roleUser.org)" class="TabListAdmin">
             <div
                 @mouseenter="lysetHovered(index, true)"
                 @mouseleave="lysetHovered(index, false)"
@@ -331,7 +331,18 @@ import { myMixin } from "@/mixins/mixin.js"
                     {toolId:'aiOffice',name:'智能教务',icon:require('../assets/lytop/kg.svg'),hoverIcon:require('../assets/lytop/kg.gif'),hovered:false,clearL:true},
                     {toolId:'lyStudentEva',name:'学生评价',icon:require('../assets/lytop/jg.svg'),hoverIcon:require('../assets/lytop/jg.gif'),hovered:false,clearL:true},
                     {toolId:'schoolSafe',name:'平安校园',icon:require('../assets/lytop/xy.svg'),hoverIcon:require('../assets/lytop/xy.gif'),hovered:false,clearL:true},
-                ]
+                ],
+                // 荔园集团下的学校 
+                mergedList: [
+						"3823a6a5-1b6e-11f0-a66a-005056924926",
+						"292e34dc-1b6e-11f0-a66a-005056924926",
+						"21d6b367-1b6e-11f0-a66a-005056924926",
+						"1a1a172d-1b6e-11f0-a66a-005056924926",
+						"1197f86b-1b6e-11f0-a66a-005056924926",
+						"f235659b-1b6d-11f0-a66a-005056924926",
+						"d87b62d3-1b6d-11f0-a66a-005056924926",
+						"c25ea59b-1b6d-11f0-a66a-005056924926",
+				]
             }
         },
         methods: {
@@ -568,7 +579,7 @@ import { myMixin } from "@/mixins/mixin.js"
              // 打开常见应用弹框
             async lookMore(){
                 let val = ''
-                if (this.roleUser.orgName == '荔园小学教育集团') {
+                if (this.mergedList.includes(this.roleUser.org)) {
                     val = {
                         id: "746ce524-0bae-11f0-baea-005056924926",
                         toolId: "appStoreLiYuan",

+ 11 - 1
src/permission.js

@@ -35,8 +35,18 @@ router.beforeEach(async (to, from, next) => {
 
           await store.dispatch('user/getschPerInfo')
 
+          let mergedList =  [
+						"3823a6a5-1b6e-11f0-a66a-005056924926",
+						"292e34dc-1b6e-11f0-a66a-005056924926",
+						"21d6b367-1b6e-11f0-a66a-005056924926",
+						"1a1a172d-1b6e-11f0-a66a-005056924926",
+						"1197f86b-1b6e-11f0-a66a-005056924926",
+						"f235659b-1b6d-11f0-a66a-005056924926",
+						"d87b62d3-1b6d-11f0-a66a-005056924926",
+						"c25ea59b-1b6d-11f0-a66a-005056924926",
+					]
 
-          if(data.type == 1 && data.role == 1 && data.rrole == 1){
+          if(data.type == 1 && data.role == 1 && data.rrole == 1 && mergedList.includes(data.org)){
             next({ path:'/KanBan', replace: true })
           }else {
             next({ ...to, replace: true })

+ 2 - 1
src/views/login/loginPage.vue

@@ -667,7 +667,8 @@ export default {
 						if (
 							userjson.data[0][0].type == 1 &&
 							userjson.data[0][0].role == 1 &&
-							userjson.data[0][0].rrole == 1
+							userjson.data[0][0].rrole == 1 &&
+							this.allowOrgList.findIndex((i) => i.area) != -1
 						) {
 							this.$router.push({ path: "/kanban" });
 						} else {