Преглед на файлове

修改可可乐博助手默认位置与工具权限判断

11wqe1 преди 5 часа
родител
ревизия
4d078a877b
променени са 3 файла, в които са добавени 23 реда и са изтрити 35 реда
  1. 8 7
      src/components/sidebarL.vue
  2. 12 25
      src/components/topPage.vue
  3. 3 3
      src/views/HomeView.vue

+ 8 - 7
src/components/sidebarL.vue

@@ -135,13 +135,14 @@ import { myMixin } from "@/mixins/mixin.js"
                 return function(val){
                 return function(val){
                     
                     
                     let data = []
                     let data = []
-                    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) {
+                    // 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 =>{
                         val.forEach( e =>{
                             if (e.menuName || e.status == 0) {
                             if (e.menuName || e.status == 0) {
                                data.push(e)
                                data.push(e)

+ 12 - 25
src/components/topPage.vue

@@ -223,13 +223,6 @@ import { myMixin } from "@/mixins/mixin.js"
 
 
         computed: {
         computed: {
             ...mapGetters(['userinfo','userinfo2','fromL']),
             ...mapGetters(['userinfo','userinfo2','fromL']),
-            // banner循环图
-            // bannerL(){
-            //     return function(val){
-            //         console.log('val',val);
-            //         return val.split(',')
-            //     }
-            // },
             // 如果hk,com没有图标,默认使用cn的
             // 如果hk,com没有图标,默认使用cn的
             AppCon(){
             AppCon(){
                 return function(c) {
                 return function(c) {
@@ -385,13 +378,14 @@ import { myMixin } from "@/mixins/mixin.js"
                 let val = JSON.parse(JSON.stringify(this.roleUser.type == 1 ? this.fromL.admin.index.list : (this.fromL.admin.index.stuList ? this.fromL.admin.index.stuList : this.fromL.admin.index.list)))
                 let val = JSON.parse(JSON.stringify(this.roleUser.type == 1 ? this.fromL.admin.index.list : (this.fromL.admin.index.stuList ? this.fromL.admin.index.stuList : this.fromL.admin.index.list)))
                 
                 
                 // 用户是管理员全部展示
                 // 用户是管理员全部展示
-                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) {
+                // 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 =>{
                     val.forEach( e =>{
                         if (e.status == 0) {
                         if (e.status == 0) {
                             data.push(e)
                             data.push(e)
@@ -460,7 +454,6 @@ import { myMixin } from "@/mixins/mixin.js"
             // 打开平台应用
             // 打开平台应用
             async openApp(val){
             async openApp(val){
                 console.log('val',val);
                 console.log('val',val);
-                // if(val.toolId == 'AIPopCourse') return this.$message.info('开发中,敬请期待')
                 // 点击相同应用不刷新
                 // 点击相同应用不刷新
                 if (this.appSign == val.toolId) return
                 if (this.appSign == val.toolId) return
                 // 更新标识
                 // 更新标识
@@ -468,12 +461,10 @@ import { myMixin } from "@/mixins/mixin.js"
                 
                 
                 let url = ''
                 let url = ''
                 val.url.forEach(e => {
                 val.url.forEach(e => {
-                    // if (e.region == this.roleUser.schoolArea || e.region == this.roleUser.orgArea) {
                     if (e.region == this.$region) {
                     if (e.region == this.$region) {
                         url = e.url
                         url = e.url
                     }
                     }
                 });
                 });
-                // console.log('_userinfo',JSON.parse(JSON.stringify(this.roleUser)));
 
 
                 let _userinfo = this.roleUser, //登录用户信息
                 let _userinfo = this.roleUser, //登录用户信息
                 { userid: _userid, organizeid: _oid, type: _type, org: _org, role: _role, classid: _classId } = _userinfo; // 解构赋值获取用户信息
                 { userid: _userid, organizeid: _oid, type: _type, org: _org, role: _role, classid: _classId } = _userinfo; // 解构赋值获取用户信息
@@ -490,7 +481,6 @@ import { myMixin } from "@/mixins/mixin.js"
                     TscreenType: _TscreenType,
                     TscreenType: _TscreenType,
                     SscreenType: _SscreenType
                     SscreenType: _SscreenType
                     };
                     };
-                    // console.log('vallllllllllllll',val.argumentList);
                     
                     
                     const canshu = val.argumentList
                     const canshu = val.argumentList
                     .filter(param => paramsMap[param] !== undefined || param === 'type')
                     .filter(param => paramsMap[param] !== undefined || param === 'type')
@@ -519,12 +509,11 @@ import { myMixin } from "@/mixins/mixin.js"
                 
                 
             },
             },
             async openApp2(val){
             async openApp2(val){
-                // console.log('openApp2',val);
                 let url = ''
                 let url = ''
                 let argumentList = ['userid', 'oid', 'org','role','tType']
                 let argumentList = ['userid', 'oid', 'org','role','tType']
-                console.log('openApp2betaL',this.betaL);
+                // console.log('openApp2betaL',this.betaL);
                 
                 
-                if (this.betaL == 'beta') {
+                if (this.$region == 'beta') {
                     url = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/${val.toolId}`
                     url = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/${val.toolId}`
                 }else{
                 }else{
                     url = `https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/${val.toolId}`
                     url = `https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/${val.toolId}`
@@ -573,10 +562,10 @@ import { myMixin } from "@/mixins/mixin.js"
             // 打开CocoFlow应用
             // 打开CocoFlow应用
             openNewWindow(val) {
             openNewWindow(val) {
                 console.log(val);
                 console.log(val);
+                // 基本用法:打开指定 URL
+                window.open(val.url, "_blank");
                 this.addOp3('1', "", {id :val.id,name:val.name ,type:this.prefixL + (this.roleUser.type == 1 ? '_teacher' : '_student') + "appstoreOpen" }, "success")
                 this.addOp3('1', "", {id :val.id,name:val.name ,type:this.prefixL + (this.roleUser.type == 1 ? '_teacher' : '_student') + "appstoreOpen" }, "success")
 
 
-                // // 基本用法:打开指定 URL
-                window.open(val.url, "_blank");
             },
             },
              // 打开常见应用弹框
              // 打开常见应用弹框
             async lookMore(){
             async lookMore(){
@@ -617,8 +606,6 @@ import { myMixin } from "@/mixins/mixin.js"
                 
                 
             },
             },
         },
         },
-        mounted(){
-        }
     }
     }
 </script>
 </script>
 
 

+ 3 - 3
src/views/HomeView.vue

@@ -278,10 +278,10 @@ export default {
 			fullScreen:require('../assets/img/fullScreen.png'),
 			fullScreen:require('../assets/img/fullScreen.png'),
 			nofullScreen:require('../assets/img/nofullScreen.png'),
 			nofullScreen:require('../assets/img/nofullScreen.png'),
 			position: {
 			position: {
-				// x: window.innerWidth - 170, // 屏幕宽度减去元素宽度
+				x: window.innerWidth - 90, // 屏幕宽度减去元素宽度
+				y: window.innerHeight - 130, // 屏幕高度减去元素高度
+				// x: 80, // 屏幕宽度减去元素宽度
 				// y: window.innerHeight - 180, // 屏幕高度减去元素高度
 				// y: window.innerHeight - 180, // 屏幕高度减去元素高度
-				x: 80, // 屏幕宽度减去元素宽度
-				y: window.innerHeight - 180, // 屏幕高度减去元素高度
 			}, // 初始位置
 			}, // 初始位置
 			barpage:[
 			barpage:[
 				'coconote',
 				'coconote',