Ver código fonte

数据看板与管理员权限

11wqe1 3 meses atrás
pai
commit
168fe050b5

+ 1 - 1
src/assets/img/cha.svg

@@ -1 +1 @@
-<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1744360176222" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4297" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M625.28 512l263.68-263.68c31.36-31.36 31.36-81.92 0-113.28s-81.92-31.36-113.28 0L512 398.72 248.32 135.68c-31.36-31.36-81.92-31.36-113.28 0s-31.36 81.92 0 113.28l263.68 263.68-263.68 263.68a80 80 0 0 0 0 113.28c15.36 15.36 35.84 23.68 56.32 23.68s40.96-7.68 56.32-23.68l263.68-263.68 263.68 263.68c15.36 15.36 35.84 23.68 56.32 23.68s40.96-7.68 56.32-23.68c31.36-31.36 31.36-81.92 0-113.28L624 512.64z" p-id="4298" fill="#785DC8"></path></svg>
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1744968490756" class="icon" viewBox="0 0 1030 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5495" xmlns:xlink="http://www.w3.org/1999/xlink" width="201.171875" height="200"><path d="M610.583851 508.819876L1004.919255 114.484472c25.440994-25.440994 25.440994-76.322981 0-101.763975-25.440994-25.440994-76.322981-25.440994-101.763975 0L508.819876 407.055901 114.484472 25.440994C89.043478 0 38.161491 0 12.720497 25.440994-12.720497 50.881988-12.720497 101.763975 12.720497 127.204969l394.335404 381.614907-381.614907 394.335404c-25.440994 25.440994-25.440994 76.322981 0 101.763975 25.440994 25.440994 76.322981 25.440994 101.763975 0l381.614907-394.335404 394.335404 394.335404c25.440994 25.440994 76.322981 25.440994 101.763975 0 25.440994-25.440994 25.440994-76.322981 0-101.763975L610.583851 508.819876z" p-id="5496" fill="#0663FE"></path></svg>

+ 1 - 0
src/assets/img/dui.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1744968741523" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6522" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M416.832 798.08C400.64 798.08 384.512 791.872 372.16 779.52L119.424 525.76C94.784 500.992 94.784 460.8 119.424 436.032 144.128 411.264 184.128 411.264 208.768 436.032L416.832 644.928 814.4 245.76C839.04 220.928 879.04 220.928 903.744 245.76 928.384 270.528 928.384 310.656 903.744 335.424L461.504 779.52C449.152 791.872 432.96 798.08 416.832 798.08Z" fill="#0663FE" p-id="6523"></path></svg>

+ 5 - 0
src/common/apiConfig.js

@@ -82,6 +82,11 @@ export const API_CONFIG = {
       functionName: "select_schUsuallyApp",
       functionName: "select_schUsuallyApp",
     },
     },
 
 
+    // 查询超级管理员信息
+    ajax_roleUser: {
+      functionName: "select_roleUser",
+    },
+
   //新增学校应用
   //新增学校应用
   ajax_add_usuallyApp: {
   ajax_add_usuallyApp: {
     functionName: "insert_usuallyApp",
     functionName: "insert_usuallyApp",

+ 6 - 3
src/components/botPage.vue

@@ -103,13 +103,16 @@ import { mapGetters } from 'vuex';
     export default {
     export default {
         props:['hotApp'],
         props:['hotApp'],
         computed: {
         computed: {
-            ...mapGetters(['userinfo']),
+            ...mapGetters(['userinfo','userinfo2']),
             list(){
             list(){
                 return function(val) {
                 return function(val) {
                     // console.log(val);
                     // console.log(val);
                     let newArr = val.slice(1)
                     let newArr = val.slice(1)
                     return newArr
                     return newArr
                 }
                 }
+            },
+            roleUser(){
+                return this.userinfo.role == 1 && this.userinfo.rrole == 1 && this.userinfo.type == 1&& this.userinfo2 !== '' ? this.userinfo2 : this.userinfo
             }
             }
         },
         },
         data() {
         data() {
@@ -147,9 +150,9 @@ import { mapGetters } from 'vuex';
                 let params = [
                 let params = [
                     {
                     {
                         functionName: API_CONFIG.ajax_morHotApp.functionName,
                         functionName: API_CONFIG.ajax_morHotApp.functionName,
-                        uid: this.userinfo.userid, 
+                        uid: this.roleUser.userid, 
                         type: this.tab[index].type,
                         type: this.tab[index].type,
-                        cn: this.userinfo.schoolArea ? this.userinfo.schoolArea : this.userinfo.orgArea, //学校id
+                        cn: this.roleUser.schoolArea ? this.roleUser.schoolArea : this.roleUser.orgArea, //学校id
                     },
                     },
                 ];
                 ];
                 this.$ajax
                 this.$ajax

+ 36 - 31
src/components/sidebarL.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
         <div class="left">
         <div class="left">
             <!-- <div > -->
             <!-- <div > -->
-                <div class="logo2">
+                <div class="logo2" @click="gotoKanban">
                     <img :src="fromL.basics.logo ? fromL.basics.logo : require('../assets/img/moren.png')" alt="">
                     <img :src="fromL.basics.logo ? fromL.basics.logo : require('../assets/img/moren.png')" alt="">
                 </div>
                 </div>
                 <!-- <div class="ulT"> -->
                 <!-- <div class="ulT"> -->
@@ -9,9 +9,7 @@
                 <!-- 默认首页 -->
                 <!-- 默认首页 -->
                 <div class="ulTOne" @click.stop="goto(0)">
                 <div class="ulTOne" @click.stop="goto(0)">
                     <div class="menu_left">
                     <div class="menu_left">
-                        <div class="iconW">
-                            <img  class="logo" :src="activeL === 0 ? require('../assets/img/sy.svg') : require('../assets/img/sy1.svg')" alt="">
-                        </div>
+                        <img  class="logo" :src="activeL === 0 ? require('../assets/img/sy.svg') : require('../assets/img/sy1.svg')" alt="">
                         <span class="barT" :style="{color : activeL === 0 ? '#0051D7' :''}">首页</span>
                         <span class="barT" :style="{color : activeL === 0 ? '#0051D7' :''}">首页</span>
                     </div>
                     </div>
                 </div>
                 </div>
@@ -43,9 +41,7 @@
                             </div>
                             </div>
                         </transition>
                         </transition>
                         <div class="menu_left">
                         <div class="menu_left">
-                            <div class="iconW">
-                                <img :src="activeL === (index +1) ? item.menuActiveIcon : item.menuIcon" class="logo" alt="">
-                            </div>
+                            <img :src="activeL === (index +1) ? item.menuActiveIcon : item.menuIcon" class="logo" alt="">
                             <span class="barT">{{ item.menuName }}</span>
                             <span class="barT">{{ item.menuName }}</span>
                         </div>
                         </div>
                         
                         
@@ -65,13 +61,13 @@
                                                 <span>CocoFlow</span>
                                                 <span>CocoFlow</span>
                                             </div>
                                             </div>
                                             <div class="ulTCopyHei" >
                                             <div class="ulTCopyHei" >
-                                                <span v-if="cocoFlowList[0].length" style="color: #00000066;">最近使用</span>
+                                                <span v-if="cocoFlowList[0] && cocoFlowList[0].length" style="color: #00000066;">最近使用</span>
                                                 <div class="ulTCopyTxt"  
                                                 <div class="ulTCopyTxt"  
                                                 v-for="(i,ind) in cocoFlowList[0]" 
                                                 v-for="(i,ind) in cocoFlowList[0]" 
                                                 @click="openNewWindow(i.url)" :key="ind+'ab'">
                                                 @click="openNewWindow(i.url)" :key="ind+'ab'">
                                                         <div class="ulTCopyConT">{{ i.name }}</div>
                                                         <div class="ulTCopyConT">{{ i.name }}</div>
                                                 </div>
                                                 </div>
-                                                <span v-if="cocoFlowList[1].length" style="color: #00000066;">我的收藏</span>
+                                                <span v-if="cocoFlowList[0] && cocoFlowList[1].length" style="color: #00000066;">我的收藏</span>
 
 
                                                 <div class="ulTCopyTxt"
                                                 <div class="ulTCopyTxt"
                                                 v-for="(i,ind) in cocoFlowList[1]" @click="openNewWindow(i.url)" :key="ind+'a'">
                                                 v-for="(i,ind) in cocoFlowList[1]" @click="openNewWindow(i.url)" :key="ind+'a'">
@@ -81,11 +77,9 @@
                                         </div>
                                         </div>
                                     </transition>
                                     </transition>
                                 <div class="menu_left" >
                                 <div class="menu_left" >
-                                    <div class="iconW">
-                                        <img class="logo"  
-                                        :src="activeL === (index +1) ? p.activeIcon : p.defaultIcon" 
-                                        alt="">
-                                    </div>
+                                    <img class="logo"  
+                                    :src="activeL === (index +1) ? p.activeIcon : p.defaultIcon" 
+                                    alt="">
                                     <span class="barT" :style="{color : activeL === (index +1) ? '#0051D7' :''}">
                                     <span class="barT" :style="{color : activeL === (index +1) ? '#0051D7' :''}">
                                         {{ p.name }}
                                         {{ p.name }}
                                     </span>
                                     </span>
@@ -107,13 +101,13 @@ import { API_CONFIG } from "@/common/apiConfig";
     export default {
     export default {
         props:['urlAddress'],
         props:['urlAddress'],
         computed: {
         computed: {
-            ...mapGetters(['userinfo','fromL','appSign']),
+            ...mapGetters(['userinfo','userinfo2','fromL','appSign']),
             // 如果hk,com没有图标,默认使用cn的
             // 如果hk,com没有图标,默认使用cn的
             AppCon(){
             AppCon(){
                 return function(c) {
                 return function(c) {
                     let k = JSON.parse(JSON.stringify(c))
                     let k = JSON.parse(JSON.stringify(c))
                     let data = k.filter(e=>{
                     let data = k.filter(e=>{
-                        return e.region == this.userinfo.schoolArea || e.region == this.userinfo.orgArea
+                        return e.region == this.roleUser.schoolArea || e.region == this.roleUser.orgArea
                     })
                     })
 
 
                     let data2 = k.filter(e=>{
                     let data2 = k.filter(e=>{
@@ -134,7 +128,7 @@ import { API_CONFIG } from "@/common/apiConfig";
                     // console.log('appSignL',val);
                     // console.log('appSignL',val);
                     
                     
                     let data = []
                     let data = []
-                    if (this.userinfo.type == 1 && this.userinfo.role == 1) {
+                    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)
@@ -149,6 +143,9 @@ import { API_CONFIG } from "@/common/apiConfig";
                     }
                     }
                     return data
                     return data
                 }
                 }
+            },
+            roleUser(){
+                return this.userinfo.role == 1 && this.userinfo.rrole == 1 && this.userinfo.type == 1&& this.userinfo2 !== "" ? this.userinfo2 : this.userinfo
             }
             }
         },
         },
         data() {
         data() {
@@ -166,7 +163,16 @@ import { API_CONFIG } from "@/common/apiConfig";
             ...mapActions({
             ...mapActions({
                 logout: 'user/logout'
                 logout: 'user/logout'
             }),
             }),
-
+            // 跳转到看板
+            gotoKanban(){
+                let num = this.userinfo.type == 1 && this.userinfo.role == 1 && this.userinfo.rrole == 1 ? 1 : 2
+                this.$router.push({
+                    path: '/KanBan',
+                    query: { 
+                        index: num, 
+                    }
+                });
+            },
             mouGet(val){
             mouGet(val){
                 if(val != 'appStore') return
                 if(val != 'appStore') return
                 console.log('666')
                 console.log('666')
@@ -203,12 +209,12 @@ import { API_CONFIG } from "@/common/apiConfig";
                     let url = ''
                     let url = ''
                     // 查出对应账号的应用区域地址
                     // 查出对应账号的应用区域地址
                     val.url.forEach(e => {
                     val.url.forEach(e => {
-                         // if (e.region == this.userinfo.schoolArea || e.region == this.userinfo.orgArea) {
+                         // 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
                         }
                         }
                     });
                     });
-                    let _userinfo = this.userinfo, //登录用户信息
+                    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; // 解构赋值获取用户信息
                     const _TscreenType = 1, _SscreenType = 3; // 常量定义
                     const _TscreenType = 1, _SscreenType = 3; // 常量定义
                     let queryString = ''
                     let queryString = ''
@@ -234,7 +240,6 @@ import { API_CONFIG } from "@/common/apiConfig";
                     let _url = url + queryString
                     let _url = url + queryString
 
 
                     let kpl = ` <iframe 
                     let kpl = ` <iframe 
-                                    v-if="appSign && urlAddress"
                                     allow= "camera *; microphone *;display-capture;midi;encrypted-media;"
                                     allow= "camera *; microphone *;display-capture;midi;encrypted-media;"
                                     frameborder="no" 
                                     frameborder="no" 
                                     border="0" 
                                     border="0" 
@@ -252,10 +257,11 @@ import { API_CONFIG } from "@/common/apiConfig";
             
             
             // 获取cocoFlow收藏与历史使用记录
             // 获取cocoFlow收藏与历史使用记录
             getData(){
             getData(){
+                this.cocoFlowList = []
                 let params = [
                 let params = [
                     {
                     {
                         functionName: API_CONFIG.ajax_appStoreSave.functionName,
                         functionName: API_CONFIG.ajax_appStoreSave.functionName,
-                        uid: this.userinfo.userid, 
+                        uid: this.roleUser.userid, 
                     },
                     },
                 ];
                 ];
                 
                 
@@ -267,7 +273,7 @@ import { API_CONFIG } from "@/common/apiConfig";
                     })
                     })
                     .catch((err) => {
                     .catch((err) => {
                         console.log(err);
                         console.log(err);
-                        this.$message.error("获取常见应用失败");
+                        this.$message.error("获取cocoFlow收藏与历史失败");
                     });
                     });
             },
             },
             // 点击二级导航
             // 点击二级导航
@@ -285,13 +291,13 @@ import { API_CONFIG } from "@/common/apiConfig";
                 
                 
                 let url = ''
                 let url = ''
                 val.url.forEach(e => {
                 val.url.forEach(e => {
-                    // if (e.region == this.userinfo.schoolArea || e.region == this.userinfo.orgArea) {
+                    // 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
                     }
                     }
                 });
                 });
 
 
-                let _userinfo = this.userinfo, //登录用户信息
+                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; // 解构赋值获取用户信息
                 const _TscreenType = 1, _SscreenType = 3; // 常量定义
                 const _TscreenType = 1, _SscreenType = 3; // 常量定义
                 let queryString = ''
                 let queryString = ''
@@ -372,8 +378,8 @@ import { API_CONFIG } from "@/common/apiConfig";
 
 
 .logo{
 .logo{
   margin: auto;
   margin: auto;
-  width: 21px;
-  max-height: 24px;
+  width: 24px;
+  height: 24px;
 }
 }
 
 
 .iconW{
 .iconW{
@@ -386,16 +392,15 @@ import { API_CONFIG } from "@/common/apiConfig";
     box-sizing: border-box;
     box-sizing: border-box;
 }
 }
 .logo2 {
 .logo2 {
-  padding: 8px;
+    cursor: pointer;
   box-sizing: border-box;
   box-sizing: border-box;
-  height: 48px;
   width: 100%;
   width: 100%;
   background-color: #fff;
   background-color: #fff;
   text-align: center;
   text-align: center;
 }
 }
 .logo2 img{
 .logo2 img{
-    width: 30px;
-    height: 30px;
+    width: 60px;
+    height: 60px;
 }
 }
 
 
 .userInfo{
 .userInfo{

+ 18 - 16
src/components/topPage.vue

@@ -4,7 +4,7 @@
             <div class="topBlock">
             <div class="topBlock">
                 <div class="topTit" style="display: flex;">
                 <div class="topTit" style="display: flex;">
                     <div>欢迎使用</div>
                     <div>欢迎使用</div>
-                    <div style="color: #0354D7;margin: 0 15px;"><span v-if="userinfo.orgName">{{userinfo.orgName}}—</span>{{ userinfo.schoolName }}</div>
+                    <div style="color: #0354D7;margin: 0 15px;"><span v-if="roleUser.orgName">{{roleUser.orgName}}—</span>{{ roleUser.schoolName }}</div>
                     <div>AI平台!</div>
                     <div>AI平台!</div>
                 </div>
                 </div>
                 <div class="topDetail">
                 <div class="topDetail">
@@ -116,7 +116,7 @@
                             </el-tooltip>
                             </el-tooltip>
                         </div>
                         </div>
                         <div class="cha" @click.stop="delApp(item.lid)">
                         <div class="cha" @click.stop="delApp(item.lid)">
-                            <img style="width: 20px;" src="../assets/img/cha.svg" alt="">
+                            <img style="width: 15px;" src="../assets/img/cha.svg" alt="">
                         </div>
                         </div>
                     </div>
                     </div>
                 </div>
                 </div>
@@ -148,7 +148,7 @@
                                 </div>
                                 </div>
                             </div>
                             </div>
                             <div style="position: absolute;top: 6px;right: 15px;" v-if="tab.includes(item.id)">
                             <div style="position: absolute;top: 6px;right: 15px;" v-if="tab.includes(item.id)">
-                                
+                                <img style="width: 20px;" src="../assets//img/dui.svg" alt="">
                             </div>
                             </div>
                     </div>
                     </div>
                 </div>
                 </div>
@@ -168,7 +168,7 @@ import { API_CONFIG } from "@/common/apiConfig";
 
 
     export default {
     export default {
         computed: {
         computed: {
-            ...mapGetters(['userinfo','fromL']),
+            ...mapGetters(['userinfo','userinfo2','fromL']),
             // banner循环图
             // banner循环图
             // bannerL(){
             // bannerL(){
             //     return function(val){
             //     return function(val){
@@ -182,7 +182,7 @@ import { API_CONFIG } from "@/common/apiConfig";
                     let k = JSON.parse(JSON.stringify(c))
                     let k = JSON.parse(JSON.stringify(c))
 
 
                     let data = k.filter(e=>{
                     let data = k.filter(e=>{
-                        return e.region == this.userinfo.schoolArea || e.region == this.userinfo.orgArea
+                        return e.region == this.roleUser.schoolArea || e.region == this.roleUser.orgArea
                     })
                     })
 
 
                     let data2 = k.filter(e=>{
                     let data2 = k.filter(e=>{
@@ -202,7 +202,7 @@ import { API_CONFIG } from "@/common/apiConfig";
             appSignL(){
             appSignL(){
                 return function(val){
                 return function(val){
                     let data = []
                     let data = []
-                    if (this.userinfo.type == 1 && this.userinfo.role == 1) {
+                    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)
@@ -226,6 +226,9 @@ import { API_CONFIG } from "@/common/apiConfig";
                     );
                     );
                     return difference
                     return difference
                 }
                 }
+            },
+            roleUser(){
+                return this.userinfo.role == 1 && this.userinfo.rrole == 1 && this.userinfo.type == 1&& this.userinfo2 !== "" ? this.userinfo2 : this.userinfo
             }
             }
         },
         },
         data() {
         data() {
@@ -332,8 +335,8 @@ import { API_CONFIG } from "@/common/apiConfig";
                 let params = [
                 let params = [
                     {
                     {
                         functionName: API_CONFIG.ajax_usuallyApp.functionName,
                         functionName: API_CONFIG.ajax_usuallyApp.functionName,
-                        uid: this.userinfo.userid, 
-                        cn: this.userinfo.schoolArea ? this.userinfo.schoolArea : this.userinfo.orgArea, //学校id
+                        uid: this.roleUser.userid, 
+                        cn: this.roleUser.schoolArea ? this.roleUser.schoolArea : this.roleUser.orgArea, //学校id
                     },
                     },
                 ];
                 ];
                 
                 
@@ -369,9 +372,9 @@ import { API_CONFIG } from "@/common/apiConfig";
                     let params = [
                     let params = [
                         {
                         {
                             functionName: API_CONFIG.ajax_add_usuallyApp.functionName,
                             functionName: API_CONFIG.ajax_add_usuallyApp.functionName,
-                            oid:this.userinfo.organizeid,
+                            oid:this.roleUser.organizeid,
                             aid: val,
                             aid: val,
-                            uid: this.userinfo.userid,
+                            uid: this.roleUser.userid,
                         },
                         },
                     ];
                     ];
                     
                     
@@ -391,7 +394,7 @@ import { API_CONFIG } from "@/common/apiConfig";
                 let params = [
                 let params = [
                     {
                     {
                         functionName: API_CONFIG.ajax_addedUsuallyApp.functionName,
                         functionName: API_CONFIG.ajax_addedUsuallyApp.functionName,
-                        uid: this.userinfo.userid, 
+                        uid: this.roleUser.userid, 
                     },
                     },
                 ];
                 ];
                 
                 
@@ -410,7 +413,7 @@ import { API_CONFIG } from "@/common/apiConfig";
                 let val = JSON.parse(JSON.stringify(this.fromL.admin.index.list))
                 let val = JSON.parse(JSON.stringify(this.fromL.admin.index.list))
                 
                 
                 // 用户是管理员全部展示
                 // 用户是管理员全部展示
-                if (this.userinfo.type == 1 && this.userinfo.role == 1) {
+                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)
@@ -471,13 +474,13 @@ import { API_CONFIG } from "@/common/apiConfig";
                 
                 
                 let url = ''
                 let url = ''
                 val.url.forEach(e => {
                 val.url.forEach(e => {
-                     // if (e.region == this.userinfo.schoolArea || e.region == this.userinfo.orgArea) {
+                     // 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
                     }
                     }
                 });
                 });
 
 
-                let _userinfo = this.userinfo, //登录用户信息
+                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; // 解构赋值获取用户信息
                 const _TscreenType = 1, _SscreenType = 3; // 常量定义
                 const _TscreenType = 1, _SscreenType = 3; // 常量定义
                 let queryString = ''
                 let queryString = ''
@@ -506,7 +509,6 @@ import { API_CONFIG } from "@/common/apiConfig";
 
 
 
 
                   let kpl = ` <iframe 
                   let kpl = ` <iframe 
-                                v-if="appSign && urlAddress"
                                 allow= "camera *; microphone *;display-capture;midi;encrypted-media;"
                                 allow= "camera *; microphone *;display-capture;midi;encrypted-media;"
                                 frameborder="no" 
                                 frameborder="no" 
                                 border="0" 
                                 border="0" 
@@ -659,7 +661,7 @@ import { API_CONFIG } from "@/common/apiConfig";
 
 
 /* 图片 */
 /* 图片 */
 .footConLeft{
 .footConLeft{
-    width: 400px;
+    width: 375px;
     min-width: 150px;
     min-width: 150px;
     box-sizing: border-box;
     box-sizing: border-box;
     display: flex;
     display: flex;

+ 1 - 0
src/store/getters.js

@@ -8,5 +8,6 @@ const getters = {
   fromL: state => state.user.fromL,
   fromL: state => state.user.fromL,
   token: state => state.user.token,
   token: state => state.user.token,
   appSign: state => state.user.appSign,
   appSign: state => state.user.appSign,
+  userinfo2:state => state.user.userinfo2
 }
 }
 export default getters
 export default getters

+ 35 - 15
src/views/HomeView.vue

@@ -10,8 +10,8 @@
         <div class="top">
         <div class="top">
           <div class="topCon">
           <div class="topCon">
             <div class="title">
             <div class="title">
-              <span v-if="userinfo.orgName">{{userinfo.orgName}}</span >
-              <span style="color: #0663FE;font-weight: 600;">{{ userinfo.schoolName }}</span>
+              <span v-if="roleUser.orgName">{{roleUser.orgName}}</span >
+              <span style="color: #0663FE;font-weight: 600;">{{ roleUser.schoolName }}</span>
                 
                 
             </div>
             </div>
             <div class="person">
             <div class="person">
@@ -19,13 +19,13 @@
                 <img
                 <img
                  @click="openData()"
                  @click="openData()"
                 style="width: 40px;height: 40px;object-fit: cover;border-radius: 50%; cursor: pointer;" 
                 style="width: 40px;height: 40px;object-fit: cover;border-radius: 50%; cursor: pointer;" 
-                :src="userinfo.headportrait ? userinfo.headportrait : require('../assets/img/toux.png')" alt="">
+                :src="roleUser.headportrait ? roleUser.headportrait : require('../assets/img/toux.png')" alt="">
                 <div class="personInfo">
                 <div class="personInfo">
                   <div class="personInfoTit">
                   <div class="personInfoTit">
-                    {{  userinfo.username }}
+                    {{  roleUser.username }}
                   </div>
                   </div>
                   <div class="personInfoBri">
                   <div class="personInfoBri">
-                    {{ userinfo.accountNumber }}
+                    {{ userSuffix() }}
                   </div>
                   </div>
                 </div>
                 </div>
               </div>
               </div>
@@ -84,7 +84,34 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
-    ...mapGetters(['userinfo','appSign']),
+    ...mapGetters(['userinfo','appSign','userinfo2']),
+    userSuffix(){
+      let yym = ''
+      return function() {
+        
+        
+        yym = this.userinfo.role == 1 && this.userinfo.rrole == 1 && this.userinfo.type == 1 && this.userinfo2 !== '' ? this.userinfo2 : this.userinfo
+       
+        let val = yym.accountNumber
+
+        let userName = JSON.parse(JSON.stringify(val))
+
+        const regEmail = new RegExp("^[A-Za-z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$");
+        
+        // // 判断用户输入账户带不带后缀
+        if (!regEmail.test(userName)) {
+          console.log('111');
+        } else {
+          const parts = userName.split('@');
+          userName = parts[0];
+        }
+
+        return userName
+      }
+    },
+    roleUser(){
+        return this.userinfo.role == 1 && this.userinfo.rrole == 1 && this.userinfo.type == 1&& this.userinfo2 !== '' ? this.userinfo2 : this.userinfo
+    }
   },
   },
   methods: {
   methods: {
     ...mapActions({
     ...mapActions({
@@ -101,12 +128,6 @@ export default {
       let data = this.AppJSon.filter(e=>{
       let data = this.AppJSon.filter(e=>{
         return val.toolId == e.toolId
         return val.toolId == e.toolId
       })
       })
-     
-
-     
-      
-     
-
       // console.log('data',data);
       // console.log('data',data);
 
 
       if (data.length == 0) {   //为0则添加进列表,并将其他的展示状态改为false
       if (data.length == 0) {   //为0则添加进列表,并将其他的展示状态改为false
@@ -165,8 +186,8 @@ export default {
       let params = [
       let params = [
         {
         {
           functionName: API_CONFIG.ajax_schoolPermission.functionName, // 调用存储过程的名称
           functionName: API_CONFIG.ajax_schoolPermission.functionName, // 调用存储过程的名称
-          org: this.userinfo.org, //组织id
-          oid: this.userinfo.organizeid, //学校id
+          org: this.roleUser.org, //组织id
+          oid: this.roleUser.organizeid, //学校id
         },
         },
       ];
       ];
       
       
@@ -333,7 +354,6 @@ export default {
   font-weight: 300;
   font-weight: 300;
   font-size: 10px;
   font-size: 10px;
   line-height: 100%;
   line-height: 100%;
-  text-align: center;
   color: #969BA3;
   color: #969BA3;
 }
 }
 .container {
 .container {

+ 6 - 3
src/views/homepageL.vue

@@ -16,7 +16,10 @@ import { API_CONFIG } from "@/common/apiConfig";
     export default {
     export default {
         props:['urlAddress'],
         props:['urlAddress'],
         computed: {
         computed: {
-            ...mapGetters(['userinfo']),
+            ...mapGetters(['userinfo','userinfo2']),
+            roleUser(){
+                return this.userinfo.role == 1 && this.userinfo.rrole == 1 && this.userinfo.type == 1&& this.userinfo2 !== "" ? this.userinfo2 : this.userinfo
+            }
         },
         },
         components:{
         components:{
             topPage,
             topPage,
@@ -44,8 +47,8 @@ import { API_CONFIG } from "@/common/apiConfig";
                 let params = [
                 let params = [
                     {
                     {
                         functionName: API_CONFIG.ajax_allApp.functionName, // 调用存储过程的名称
                         functionName: API_CONFIG.ajax_allApp.functionName, // 调用存储过程的名称
-                        uid: this.userinfo.userid, 
-                        cn: this.userinfo.schoolArea ? this.userinfo.schoolArea : this.userinfo.orgArea, 
+                        uid: this.roleUser.userid, 
+                        cn: this.roleUser.schoolArea ? this.roleUser.schoolArea : this.roleUser.orgArea, 
                     },
                     },
                 ];
                 ];
                 
                 

+ 54 - 5
src/views/kanBan/components/AquickEntrance.vue

@@ -5,33 +5,81 @@
                 小学部
                 小学部
             </div>
             </div>
             <div class="EntBloConList">
             <div class="EntBloConList">
-                <div class="EntBloCon" v-for="i in 9" :key="i">
+                <div class="EntBloCon" @click="loginLiyuan" v-for="i in 1" :key="i">
                     <img style="width: 18px;margin-bottom: 10px;" src="../../../assets/img/tese.svg" alt="">
                     <img style="width: 18px;margin-bottom: 10px;" src="../../../assets/img/tese.svg" alt="">
-                    <div>笔架山中学</div>
+                    <div>通新岭校区</div>
                 </div>
                 </div>
             </div>
             </div>
         </div>
         </div>
 
 
-        <div class="EntBlo">
+        <!-- <div class="EntBlo">
             <div style="text-align: center;margin-bottom: 60px;">
             <div style="text-align: center;margin-bottom: 60px;">
                 初中部
                 初中部
             </div>
             </div>
             <div class="EntBloConList">
             <div class="EntBloConList">
                 <div class="EntBloCon" v-for="i in 1" :key="i">
                 <div class="EntBloCon" v-for="i in 1" :key="i">
                     <img style="width: 18px;margin-bottom: 10px;" src="../../../assets/img/tese.svg" alt="">
                     <img style="width: 18px;margin-bottom: 10px;" src="../../../assets/img/tese.svg" alt="">
-                    <div>笔架山中学</div>
+                    <div>通新岭校区</div>
                 </div>
                 </div>
             </div>
             </div>
-        </div>
+        </div> -->
     </div>
     </div>
 </template>
 </template>
 
 
 <script>
 <script>
+import { mapGetters } from 'vuex';
+import { API_CONFIG } from "@/common/apiConfig";
+import store from '../../../store'
+
     export default {
     export default {
+        
         data(){
         data(){
             return{
             return{
 
 
             }
             }
+        },
+        computed: {
+            ...mapGetters(['userinfo','userinfo2']),
+        },
+        methods:{
+            async loginLiyuan(){
+                try{
+                    let email = ''
+                    let userName = JSON.parse(JSON.stringify(this.userinfo.accountNumber))
+                    const regEmail = new RegExp("^[A-Za-z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$");
+                    
+                    // // 判断用户输入账户带不带后缀
+                    if (!regEmail.test(userName)) {
+                        console.log('111');
+                    } else {
+                        const parts = userName.split('@');
+                        email = parts[0] + '-010504@010504.com';
+                    }
+
+                    let params = [
+                        {
+                            functionName: API_CONFIG.ajax_roleUser.functionName, // 调用存储过程的名称
+                            uname: email
+                        },
+                    ];
+                    
+                    // 发起异步请求
+                    const res = await this.$ajax.post(API_CONFIG.baseUrl, params);
+                    console.log('res.data[0]',res.data[0]);
+                    if (res.data[0].length) {
+                        await store.commit('user/SET_USERINFO2', res.data[0][0])
+                        console.log('this.userinfo2',this.userinfo2);
+                        this.$router.push('homepageL');
+                    }else{
+                        this.addRoleZh()
+                    }
+                } catch (err) {
+                    console.error("请求失败,错误信息:", err);
+                }
+            },
+            addRoleZh(){
+              console.log('111');
+            }
         }
         }
     }
     }
 </script>
 </script>
@@ -50,6 +98,7 @@
 
 
 
 
 .EntBloCon{
 .EntBloCon{
+    cursor: pointer;
     padding: 40px 20px;
     padding: 40px 20px;
     background: #fff;
     background: #fff;
     border-radius: 10px;
     border-radius: 10px;

+ 141 - 2
src/views/kanBan/index.vue

@@ -1,11 +1,45 @@
 <template>
 <template>
     <div class="KanBan">
     <div class="KanBan">
+        <div class="top">
+          <div class="topCon">
+            <div class="title">
+              <span v-if="userinfo.orgName">{{userinfo.orgName}}</span >
+              <span style="color: #0663FE;font-weight: 600;">{{ userinfo.schoolName }}</span>
+            </div>
+            <div class="person">
+                <el-button type="text" @click="gotoli" style="margin-right: 20px">返回</el-button>
+              <div class="person_name">
+                <img
+                 @click="openData()"
+                style="width: 40px;height: 40px;object-fit: cover;border-radius: 50%; cursor: pointer;" 
+                :src="userinfo.headportrait ? userinfo.headportrait : require('../../assets/img/toux.png')" alt="">
+                <div class="personInfo">
+                  <div class="personInfoTit">
+                    {{  userinfo.username }}
+                  </div>
+                  <div class="personInfoBri">
+                    {{ userSuffix(userinfo.accountNumber) }}
+                  </div>
+                </div>
+              </div>
+              <el-button type="text" @click="handleLogout" style="margin-left: 20px">退出</el-button>
+            </div>
+          </div>
+        </div>
         <div style="max-width: 1260px;margin: auto;">
         <div style="max-width: 1260px;margin: auto;">
             <div class="buttonArea">
             <div class="buttonArea">
                 <div style="width: 500px;display: flex;gap: 100px;">
                 <div style="width: 500px;display: flex;gap: 100px;">
-                    <div class="btnDiv" :class="{ active: isActive === 1 }" @click="setActive(1)">数据看板</div>
+                    <div class="btnDiv"  :class="{ active: isActive === 1 }" >
+                        <div v-if="userinfo.role == 1 && userinfo.rrole == 1 && userinfo.type ==1" @click="setActive(1)">
+                            数据看板
+                        </div>
+                    </div>
                     <div class="btnDiv" :class="{ active: isActive === 2 }" @click="setActive(2)">校区特色</div>
                     <div class="btnDiv" :class="{ active: isActive === 2 }" @click="setActive(2)">校区特色</div>
-                    <div class="btnDiv" :class="{ active: isActive === 3 }" @click="setActive(3)">快捷入口</div>
+                    <div class="btnDiv" :class="{ active: isActive === 3 }" >
+                        <div v-if="userinfo.role == 1 && userinfo.rrole == 1 && userinfo.type ==1"  @click="setActive(3)">
+                            快捷入口
+                        </div>
+                    </div>
                 </div>
                 </div>
             </div>
             </div>
             
             
@@ -35,6 +69,8 @@ import schoolArea from '../../components/schoolArea.vue';
 import AdataKanban from './components/AdataKanban';
 import AdataKanban from './components/AdataKanban';
 import AquickEntrance from './components/AquickEntrance';
 import AquickEntrance from './components/AquickEntrance';
 import AschoolFeature from './components/AschoolFeature';
 import AschoolFeature from './components/AschoolFeature';
+import { mapGetters, mapActions } from 'vuex';
+import { loginOut } from '@/api/user';
 
 
 export default {
 export default {
     name:'kanBan',
     name:'kanBan',
@@ -44,19 +80,121 @@ export default {
         AquickEntrance,
         AquickEntrance,
         AschoolFeature
         AschoolFeature
     },
     },
+    computed: {
+    ...mapGetters(['userinfo','userinfo2','appSign']),
+    userSuffix(){
+      return function(val) {
+        let userName = JSON.parse(JSON.stringify(val))
+        const regEmail = new RegExp("^[A-Za-z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$");
+        
+        // // 判断用户输入账户带不带后缀
+        if (!regEmail.test(userName)) {
+          console.log('111');
+        } else {
+          const parts = userName.split('@');
+          userName = parts[0];
+        }
+        return userName
+      }
+    },
+    roleUser(){
+        return this.userinfo.type == 1 && this.userinfo.role == 1 && this.userinfo.rrole == 1 ? this.userinfo2 : this.userinfo
+    }
+  },
     data() {
     data() {
         return {
         return {
             isActive: 1
             isActive: 1
         }
         }
     },
     },
     methods: {
     methods: {
+        gotoli(){
+            this.$router.push('/homepageL');
+        },
+        async handleLogout() {
+            this.$confirm('确定退出吗', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(async () => {
+                loginOut()
+                .then(async () => {
+                    this.$message({
+                    message: '退出成功',
+                    type: 'success'
+                    });
+                    await this.logout();
+                    this.$router.push('/login');
+                })
+                .catch(err => {
+                    console.error(err);
+                });
+            }).catch(() => {
+                // 取消操作
+            });
+        },
+        ...mapActions({
+            logout: 'user/logout'
+        }),
         setActive(Index) {
         setActive(Index) {
             this.isActive = Index; // 设置激活的按钮
             this.isActive = Index; // 设置激活的按钮
         }
         }
+    },
+    mounted() {
+        const index = this.$route.query.index; // 123
+        if (index == 2) this.isActive = 2
     }
     }
 }
 }
 </script>
 </script>
 <style scoped>
 <style scoped>
+.top{
+  width: 100%;
+  display: flex;
+  height: 60px;
+  box-sizing: border-box;
+}
+.topCon{
+  display: flex;
+  width: 100%;
+  justify-content: space-between;
+  align-items: center;
+}
+.title{
+  font-family: PingFang SC;
+  font-weight: 400;
+  font-size: 14px;
+  line-height: 100%;
+  letter-spacing: 0%;
+  color: #969BA3;
+  display: flex;
+  gap: 11px;
+}
+.person{
+  display: flex;
+  align-items: center;
+}
+.person_name{
+  display: flex;
+  gap: 9px;
+}
+.personInfo{
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+}
+.personInfoTit{
+  font-family: PingFang SC;
+  font-weight: 500;
+  font-size: 16px;
+  line-height: 100%;
+  color: #000000;
+}
+.personInfoBri{
+  font-family: PingFang SC;
+  font-weight: 300;
+  font-size: 10px;
+  line-height: 100%;
+  color: #969BA3;
+}
 .KanBan {
 .KanBan {
     background-color: #FAFAFA;
     background-color: #FAFAFA;
     /* 设置高度为视口高度 */
     /* 设置高度为视口高度 */
@@ -113,6 +251,7 @@ export default {
 
 
 .btnDiv {
 .btnDiv {
     height: 48px;
     height: 48px;
+    width: 64px;
     text-align: center;
     text-align: center;
     line-height: 48px;
     line-height: 48px;
     margin-left: 15px;
     margin-left: 15px;