Przeglądaj źródła

添加学生权限

11wqe1 1 tydzień temu
rodzic
commit
233b69792b

+ 7 - 1
src/components/sidebarL.vue

@@ -135,7 +135,13 @@ import { myMixin } from "@/mixins/mixin.js"
                 return function(val){
                     
                     let data = []
-                    if (this.roleUser.type == 1 && this.roleUser.role == 1) {
+                    if (this.roleUser.type == 2) {
+                        val.forEach( e =>{
+                            if (e.menuName || e.id == 'c59dac89-0bac-11f0-baea-005056924926' || e.id == "dd87149c-1f52-11f0-a66a-005056924926") {
+                                data.push(e)
+                            }
+                        })
+                    } else if (this.roleUser.type == 1 && this.roleUser.role == 1) {
                         val.forEach( e =>{
                             if (e.menuName || e.status == 0) {
                                data.push(e)

+ 9 - 3
src/components/topPage.vue

@@ -82,7 +82,7 @@
         </div>
 
         <!-- 常见应用  -->
-        <div class="footCon" v-if="fromL.admin.cocoFlowShow">
+        <div class="footCon" v-if="fromL.admin.cocoFlowShow && roleUser.type == 1">
             <div class="footConLeft">
                 <img v-if="fromL.basics.cocoFlow" :src="fromL.basics.cocoFlow" alt="">
 
@@ -326,7 +326,7 @@ import { myMixin } from "@/mixins/mixin.js"
 						"f235659b-1b6d-11f0-a66a-005056924926",
 						"d87b62d3-1b6d-11f0-a66a-005056924926",
 						"c25ea59b-1b6d-11f0-a66a-005056924926",
-                        "0fec3a8a-ad04-11ed-b13d-005056b86db5" //这个是测试学校的
+                        // "0fec3a8a-ad04-11ed-b13d-005056b86db5" //这个是测试学校的
 				]
             }
         },
@@ -385,7 +385,13 @@ import { myMixin } from "@/mixins/mixin.js"
                 let val = JSON.parse(JSON.stringify(this.fromL.admin.index.list))
                 
                 // 用户是管理员全部展示
-                if (this.roleUser.type == 1 && this.roleUser.role == 1) {
+                if (this.roleUser.type == 2) {
+                    val.forEach( e =>{
+                        if (e.id == 'c59dac89-0bac-11f0-baea-005056924926' || e.id == "dd87149c-1f52-11f0-a66a-005056924926") {
+                            data.push(e)
+                        }
+                    })
+                } else if (this.roleUser.type == 1 && this.roleUser.role == 1) {
                     val.forEach( e =>{
                         if (e.status == 0) {
                             data.push(e)

+ 2 - 2
src/views/HomeView.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="body">
 		<div class="container">
-			<div class="leftBar" style="height: 100%" v-if="roleUser.type == 1">
+			<div class="leftBar" style="height: 100%">
 				<sidebarL
 					@getPer="getPer"
 					@AddAppJson="AddAppJson"
@@ -61,7 +61,7 @@
 				<!-- 首页 -->
 				<homepageL
 					@AddAppJson="AddAppJson"
-					v-show="!appSign && roleUser.type == 1"
+					v-show="!appSign"
 					ref="homepageLRef"
 				></homepageL>
 

+ 14 - 14
src/views/login/loginPage.vue

@@ -604,11 +604,11 @@ export default {
 						console.log("this.userRequestres", res);
 						let _data = res.data[0][0];
 						let userjson = await getUser({ userid: _data.userid });
-						if (userjson.data[0][0].type == 2) {
-							this.loading = false;
-							this.$message.error(this.lang.Nologinpermission);
-							return;
-						}
+						// if (userjson.data[0][0].type == 2) {
+						// 	this.loading = false;
+						// 	this.$message.error(this.lang.Nologinpermission);
+						// 	return;
+						// }
 
 						console.log("userjson", userjson);
 						if (_data.active === 1) {
@@ -682,11 +682,11 @@ export default {
 						console.log("res", res);
 						let _data = res.data[0][0];
 						let userjson = await getUser({ userid: _data.userid });
-						if (userjson.data[0][0].type == 2) {
-							this.loading = false;
-							this.$message.error(this.lang.Nologinpermission);
-							return;
-						}
+						// if (userjson.data[0][0].type == 2) {
+						// 	this.loading = false;
+						// 	this.$message.error(this.lang.Nologinpermission);
+						// 	return;
+						// }
 
 						console.log("userjson", userjson);
 						if (_data.active === 1) {
@@ -945,10 +945,10 @@ export default {
 						}
 					}
 					let userjson = await getUser({ userid: _data.userid });
-					if (userjson.data[0][0].type == 2) {
-						this.$message.error(this.lang.Nologinpermission);
-						return;
-					}
+					// if (userjson.data[0][0].type == 2) {
+					// 	this.$message.error(this.lang.Nologinpermission);
+					// 	return;
+					// }
 
 					console.log("userjson", userjson);
 					if (_data.active === 1) {