11wqe1 4 bulan lalu
induk
melakukan
13a0cc0011

+ 4 - 0
src/api/user.js

@@ -19,6 +19,10 @@ export function getUser(data) {
   return axios.get(`${baseApi}/selectUser`, data)
 }
 
+export function addrrole(data) {
+  return axios.post(`${baseApi}/teacherRegistration`, [data])
+}
+
 
 export function addUser(data) {
   return axios.post(`${baseApi}/batchRegistrationUser`, [data])

+ 10 - 0
src/common/apiConfig.js

@@ -101,6 +101,16 @@ export const API_CONFIG = {
     functionName: "select_liYuanOrg",
   },
 
+  //查询组织
+  select_liYuanCampus: {
+    functionName: "select_liYuanCampus",
+  },
+  
+  //查询组织
+  teacherRegistration: {
+    functionName: "teacherRegistration",
+  },
+
   //查询cocofrow最近使用与收藏
   ajax_appStoreSave: {
     functionName: "select_lyAppStoreSave",

+ 1 - 1
src/components/botPage.vue

@@ -1,5 +1,5 @@
 <template>
-    <div style="width: 100%;">
+    <div style="width: 100%;margin-top: 30px;">
         <div style="color: #1f2937;font-weight: 600;font-size: 20px;margin-bottom: 16px;">
             热门应用
         </div>

+ 3 - 7
src/components/schoolArea.vue

@@ -37,17 +37,12 @@ export default {
                 "通新岭校区",
                 "百花校区",
                 "玮鹏校区",
-                "众孚校区",
                 "园岭校区",
+                "众孚校区",
+                "八卦岭校区",
             ],
             midList: [
                 "笔架山学校",
-                "笔架山学校",
-                "笔架山学校",
-                "笔架山学校",
-                "笔架山学校",
-                "笔架山学校",
-                "笔架山学校",
             ]
         }
     },
@@ -63,6 +58,7 @@ export default {
 .schoolArea {
     /* max-width: 192px;
     min-width: 192px; */
+    min-height: 600px;
     width: 267px;
     min-width: 100px;
     display: flex;

+ 20 - 21
src/components/sidebarL.vue

@@ -38,7 +38,7 @@
                             </div>
                         <div class="menu_left">
                             <img :src="activeL === (index +1) ? item.menuActiveIcon : item.menuIcon" class="logo" alt="">
-                            <span class="barT">{{ item.menuName }}</span>
+                            <span class="barT" :style="{color : activeL === (index +1) ? '#0051D7' :''}">{{ item.menuName }}</span>
                         </div>
                         
                      </div>
@@ -57,26 +57,26 @@
                                         {{ p.name }}
                                     </span>
                                 </div>
-                        <!-- 二级导航 -->
-                        <div class="ulTCopy" v-if="item.toolId == 'appStore'">
-                            <div class="ulTCopyTit">
-                                <span>CocoFlow</span>
-                            </div>
-                            <div class="ulTCopyHei" >
-                                <span v-if="cocoFlowList[0] && cocoFlowList[0].length" style="color: #00000066;">最近使用</span>
-                                <div class="ulTCopyTxt"  
-                                v-for="(i,ind) in cocoFlowList[0]" 
-                                @click="openNewWindow(i.url)" :key="ind+'ab'">
-                                        <div class="ulTCopyConT">{{ i.name }}</div>
-                                </div>
-                                <span v-if="cocoFlowList[0] && cocoFlowList[1].length" style="color: #00000066;">我的收藏</span>
-
-                                <div class="ulTCopyTxt"
-                                v-for="(i,ind) in cocoFlowList[1]" @click="openNewWindow(i.url)" :key="ind+'a'">
-                                        <div class="ulTCopyConT">{{ i.name }}</div>
+                                <!-- 二级导航 -->
+                                <div class="ulTCopy" v-if="item.toolId == 'appStore' && cocoFlowList[0] && cocoFlowList[1] && cocoFlowList[0].length && cocoFlowList[1].length">
+                                    <div class="ulTCopyTit">
+                                        <span>CocoFlow</span>
+                                    </div>
+                                    <div class="ulTCopyHei" >
+                                        <span v-if="cocoFlowList[0] && cocoFlowList[0].length" style="color: #00000066;">最近使用</span>
+                                        <div class="ulTCopyTxt"  
+                                        v-for="(i,ind) in cocoFlowList[0]" 
+                                        @click="openNewWindow(i.url)" :key="ind+'ab'">
+                                                <div class="ulTCopyConT">{{ i.name }}</div>
+                                        </div>
+                                        <span v-if="cocoFlowList[0] && cocoFlowList[1].length" style="color: #00000066;">我的收藏</span>
+
+                                        <div class="ulTCopyTxt"
+                                        v-for="(i,ind) in cocoFlowList[1]" @click="openNewWindow(i.url)" :key="ind+'a'">
+                                                <div class="ulTCopyConT">{{ i.name }}</div>
+                                        </div>
+                                    </div>
                                 </div>
-                            </div>
-                        </div>
                         </div>
                          
                     </div>
@@ -118,7 +118,6 @@ import { API_CONFIG } from "@/common/apiConfig";
             // 筛选是否为管理员可见,是否被删除
             appSignL(){
                 return function(val){
-                    // console.log('appSignL',val);
                     
                     let data = []
                     if (this.roleUser.type == 1 && this.roleUser.role == 1) {

+ 69 - 48
src/components/topPage.vue

@@ -1,6 +1,6 @@
 <template>
-    <div>
-        <div class="top" v-if="fromL.admin.banner && fromL.admin.banner.length == 0">
+    <div class="topPageCon">
+        <div class="top" v-if="(fromL.admin.banner && fromL.admin.banner.length == 0) || !fromL.admin.banner">
             <div class="topBlock">
                 <div class="topTit" style="display: flex;">
                     <div>欢迎使用</div>
@@ -21,7 +21,7 @@
             :src="fromL.admin.banner[0].src" alt="" @click="gotoBanner(fromL.admin.banner[0].url)">
         </div>
 
-        <div style="border-radius: 10px;overflow: hidden;" v-if="fromL.admin.banner && fromL.admin.banner.length > 1">
+        <div class="CarO" style="border-radius: 10px;overflow: hidden;" v-if="fromL.admin.banner && fromL.admin.banner.length > 1">
             <el-carousel style="width: 100%;" indicator-position="outside">
                 <el-carousel-item v-for="(i,index) in fromL.admin.banner" :key="index">
                     <img style="width: 100%;height: 100%;object-fit: cover;border-radius: 10px;" 
@@ -42,7 +42,9 @@
                 :key="index+'1p'">
                 <div class="TabListCon">
                     <div v-for="(p,pin) in AppCon(item.url)" :key="pin+'p'">
-                        <img class="imgApp" v-if="tabList[index].hovered ? p.hoverIcon : p.platformIcon" :src="tabList[index].hovered ? p.hoverIcon : p.platformIcon" alt="">
+                        
+                        <img class="imgApp"
+                         :src="tabList[index].hovered ? p.hoverIcon ? p.hoverIcon : p.platformIcon : p.platformIcon" alt="">
                         <div class="TabListName">
                             {{ p.name }}
                         </div>
@@ -54,7 +56,6 @@
                             </span>
                         </el-tooltip>
                     </div>
-
                 </div>
                     
             </div>
@@ -64,6 +65,9 @@
         <div class="footCon">
             <div class="footConLeft">
                 <img src="../assets/img/dong.png" alt="">
+                <div class="CocoTit">
+                    COCO FLOW
+                </div>
             </div>
 
             <div style="display: flex;gap: 16px;flex: 1;">
@@ -71,10 +75,11 @@
                     <div class="footListCon" v-for="(item,index) in admincocoFlow" @click="openNewWindow(item)" :key="index+'2p'">
                         <div class="footListConimg">
                             <img v-if="!fromL.admin.cocoFlow.length" 
-                            style="margin-bottom: 12px;height: 24px;width: 22px;" 
+                            style="margin-bottom: 12px;height: 30px;width: 30px;object-fit: contain;" 
                             :src="appImgList[index]" alt="">
+
                             <img
-                            style="margin-bottom: 12px;height: 24px;width: 22px;"  
+                            style="margin-bottom: 12px;height: 30px;width: 30px;object-fit: contain;"  
                             v-else :src="JSON.parse(item.json).icon" alt="">
                         </div>
                            
@@ -92,17 +97,12 @@
                         </div> -->
                     </div>
                 </div>
-
+<!-- 
                 <div class="footList2">
                     <div class="footList2Tit">
-                        常应用
+                        常应用
                     </div>
-                    <div v-for="(i,index) in (4 - CocoFlowList.length)" @click="openUsuallyApp" 
-                    :key="index+'3p'" class="footListCon2">
-                        <div style="margin-bottom: 8px;font-size: 40px;color: #0354D7;">
-                            <img src="../assets/img/add.svg" alt="">
-                        </div>
-                    </div> 
+
                     <div class="footListCon6" v-for="(item,index) in CocoFlowList" @click="openNewWindow(item)" :key="index+'4p'">
                         <div class="footListConimg">
                             <img style="margin-bottom: 12px;height: 24px;width: 22px;" :src="JSON.parse(item.json).icon" alt="">
@@ -119,7 +119,14 @@
                             <img style="width: 15px;" src="../assets/img/cha.svg" alt="">
                         </div>
                     </div>
-                </div>
+
+                    <div v-for="(i,index) in (4 - CocoFlowList.length)" @click="openUsuallyApp" 
+                    :key="index+'3p'" class="footListCon2">
+                        <div style="margin-bottom: 8px;font-size: 40px;color: #0354D7;">
+                            <img src="../assets/img/add.svg" alt="">
+                        </div>
+                    </div> 
+                </div> -->
             </div>
             
         </div>
@@ -181,10 +188,12 @@ import { API_CONFIG } from "@/common/apiConfig";
                 return function(c) {
                     let k = JSON.parse(JSON.stringify(c))
 
+                    // 获取属于区域的url
                     let data = k.filter(e=>{
                         return e.region == this.roleUser.schoolArea || e.region == this.roleUser.orgArea
                     })
 
+                    // 设置默认的区域的url(所在区域没有hover图标默认使用cn图标)
                     let data2 = k.filter(e=>{
                         return e.region == 'cn'
                     })
@@ -198,26 +207,7 @@ import { API_CONFIG } from "@/common/apiConfig";
                     return data
                 };
             },
-            // 筛选是否为管理员可见,是否被删除
-            appSignL(){
-                return function(val){
-                    let data = []
-                    if (this.roleUser.type == 1 && this.roleUser.role == 1) {
-                        val.forEach( e =>{
-                            if (e.menuName || e.status == 0) {
-                                data.push(e)
-                            }
-                        })
-                    } else {
-                        val.forEach( e =>{
-                            if (e.menuName || (e.isAdmin == '0' && e.status == 0)) {
-                                data.push(e)
-                            }
-                        })
-                    }
-                    return data
-                }
-            },
+
             // 判断是否被添加过
             isAdd(){
                 return function(val){
@@ -415,20 +405,19 @@ import { API_CONFIG } from "@/common/apiConfig";
                 // 用户是管理员全部展示
                 if (this.roleUser.type == 1 && this.roleUser.role == 1) {
                     val.forEach( e =>{
-                        if (e.menuName || e.status == 0) {
+                        if (e.status == 0) {
                             data.push(e)
                         }
                     })
                 } else {
                     // 用户不是管理员,判断是否为用户可见 isAdmin 0普通用户 status是否被删除
                     val.forEach( e =>{
-                        if (e.menuName || (e.isAdmin == '0' && e.status == 0)) {
+                        if (e.isAdmin == '0' && e.status == 0) {
                             data.push(e)
                         }
                     })
                 }
 
-                
                 this.tabList = data
                 console.log('this.tabList',this.tabList);
 
@@ -542,7 +531,25 @@ import { API_CONFIG } from "@/common/apiConfig";
     }
 </script>
 
+
 <style scoped>
+
+ /*指示器按钮*/
+.CarO >>> .el-carousel__button {
+    width: 10px;
+    height: 10px;
+    border: none;
+    border-radius: 50%;
+    background-color: rgba(0, 0, 0, 0.2);
+}
+/*指示器激活按钮*/
+.CarO >>> .is-active .el-carousel__button {
+  background: #0663FE;
+}
+.topPageCon{
+    display: flex;
+    flex-direction: column;
+}
 /* 顶部区域 */
 .topBlock{
     display: flex;
@@ -562,16 +569,12 @@ import { API_CONFIG } from "@/common/apiConfig";
 
 
 
-
-
-
-
 /* 平台应用 */
 .TabList{
     display: grid;
     grid-template-columns: repeat(3, 1fr);
     gap: 20px; /* 网格间距 */
-    margin-top: 10px;
+    margin: 16px 0 30px;
 }
 
 .TabListAll{
@@ -651,11 +654,12 @@ import { API_CONFIG } from "@/common/apiConfig";
 /* 常见应用样式 */
 .footCon{
     display: flex;
-    height: 350px;
+    /* padding-top: 30px; */
+    /* height: 350px; */
     justify-content: space-between;
     box-sizing: border-box;
     border-radius: 10px;
-    margin: 80px 0;
+    /* margin: 80px 0; */
     /* background-image: radial-gradient(#E6F0FF 1px, transparent 1px); */
     background-size: 20px 20px;
 }
@@ -666,11 +670,28 @@ import { API_CONFIG } from "@/common/apiConfig";
     min-width: 150px;
     box-sizing: border-box;
     display: flex;
-    align-items: center;
+    flex-direction: column;
+    padding-right: 40px;
 }
 .footConLeft img{
     min-width: 150px;
-    object-view-box: inset(0% 0% 0% 30px);
+    object-view-box: inset(0% 12px 30px 30px);
+}
+.CocoTit{
+    width: 100%;
+    min-width: 150px;
+    font-family: PingFang SC;
+    font-weight: 600;
+    font-size: 20px;
+    letter-spacing: 10%;
+    height: 83px;
+    padding: 20px;
+    box-sizing: border-box;
+    line-height: 83px;
+    background: #0663FE;
+    border-radius: 12px;
+    color: #fff;
+
 }
 
 /* 中间后面设置应用 */

+ 2 - 3
src/views/homepageL.vue

@@ -2,14 +2,14 @@
     <div class="allPage">
         <div class="packageL">
             <topPage @cutUrl="cutUrl" ref="topPageRef"></topPage>
-            <botPage :hotApp="hotApp" ref="botPageRef"></botPage>
+            <!-- <botPage :hotApp="hotApp" ref="botPageRef"></botPage> -->
         </div>
     </div>
 </template>
 
 <script>
 import topPage from '../components/topPage'
-import botPage from '../components/botPage'
+// import botPage from '../components/botPage'
 import { mapGetters } from 'vuex';
 import { API_CONFIG } from "@/common/apiConfig";
 
@@ -23,7 +23,6 @@ import { API_CONFIG } from "@/common/apiConfig";
         },
         components:{
             topPage,
-            botPage
         },
         data() {
             return {

+ 1 - 1
src/views/kanBan/components/AdataKanban.vue

@@ -39,7 +39,7 @@
                 </div>
             </div>
             <img style="width: 100%;"  src="../../../assets/img/chart7.svg" alt="">
-            <img style="width: 105%;"  src="../../../assets/img/chart9.svg" alt="">
+            <img style="width: 100%;"  src="../../../assets/img/chart9.svg" alt="">
         </div>
         <div v-if="pageEnd == 3">
             <img style="width: 100%;"  src="../../../assets/img/chart11.svg" alt="">

+ 59 - 11
src/views/kanBan/components/AquickEntrance.vue

@@ -5,9 +5,9 @@
                 小学部
             </div>
             <div class="EntBloConList">
-                <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="">
-                    <div>通新岭校区</div>
+                <div class="EntBloCon" @click="loginLiyuan(i.code)" v-for="(i,index) in CampusList" :key="index">
+                    <img style="width: 26px;margin-bottom: 10px;" :src="JSON.parse(i.json).basics.logo" alt="">
+                    <div>{{ i.detail }}</div>
                 </div>
             </div>
         </div>
@@ -30,19 +30,22 @@
 import { mapGetters } from 'vuex';
 import { API_CONFIG } from "@/common/apiConfig";
 import store from '../../../store'
+import { addrrole } from "@/api/user";
 
     export default {
         
         data(){
             return{
-
+                CampusList:[],
+                uCode :[]
             }
         },
         computed: {
             ...mapGetters(['userinfo','userinfo2']),
         },
         methods:{
-            async loginLiyuan(){
+            async loginLiyuan(code){
+                this.uCode = code
                 try{
                     let email = ''
                     let userName = JSON.parse(JSON.stringify(this.userinfo.accountNumber))
@@ -53,7 +56,7 @@ import store from '../../../store'
                         console.log('111');
                     } else {
                         const parts = userName.split('@');
-                        email = parts[0] + '-010504@010504.com';
+                        email = parts[0] + `-${code}@${code}.com`;
                     }
 
                     let params = [
@@ -65,28 +68,73 @@ import store from '../../../store'
                     
                     // 发起异步请求
                     const res = await this.$ajax.post(API_CONFIG.baseUrl, params);
-                    console.log('res.data[0]',res.data[0]);
+                    // 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()
+                        this.addRoleZh(email)
                     }
                 } catch (err) {
                     console.error("请求失败,错误信息:", err);
                 }
             },
-            addRoleZh(){
-              console.log('111');
+            async addRoleZh(email){
+
+                let params = {
+                        username: email,
+                        userpassword: 'Coco1234',
+                        alias: this.userinfo.username,
+                        org: this.userinfo.org,
+                        oid: this.userinfo.organizeid,
+                        ph: '',
+                        sid: '',
+                        cid: "",
+                        typ: 1,
+                        rol: 1
+                    }
+
+                let res = await addrrole(params)
+                console.log(res);
+                if (res.data.success != 1) {
+                    this.$message.error('创建账号失败')
+                }else{
+                    this.loginLiyuan(this.uCode)
+                }
+
+            },
+            getData(){
+                let params = [
+                    {
+                        functionName: API_CONFIG.select_liYuanCampus.functionName, // 调用存储过程的名称
+                        org: this.userinfo.org, //组织id
+                    },
+                ];
+                
+                // 发起请求
+                this.$ajax
+                    .post(API_CONFIG.baseUrl, params)
+                    .then((res) => {
+                        let data = res.data[0]
+                        this.CampusList = data
+                        console.log('data', data)
+                    })
+                    .catch((err) => {
+                        console.error("请求失败,错误信息:", err);
+                    });
+                
             }
+        },
+        mounted(){
+            this.getData()
         }
     }
 </script>
 
 <style  scoped>
 .EntBlo{
-    width: 80%;
+    width: 90%;
     margin: auto;
     margin-bottom: 80px;
 }

+ 2 - 2
src/views/kanBan/components/AschoolFeature.vue

@@ -1,5 +1,5 @@
 <template>
-    <div style="display: flex;flex-direction: column;gap: 20px;">
+    <div style="display: flex;flex-direction: column;gap: 20px;height: 100%;">
        <div class="top">
             <div class="topTit">
                 <div>
@@ -58,7 +58,7 @@
        <div class="feature">
             <div class="topTit">
                 <div>
-                    <div>师资力量</div>
+                    <div>特色应用</div>
                     <div style="height: 4px;background-color: #0663FE;width: 2rem;margin-top: 6px;"></div>
                 </div>
                 <div>

+ 17 - 6
src/views/kanBan/index.vue

@@ -7,7 +7,7 @@
               <span style="color: #0663FE;font-weight: 600;">{{ userinfo.schoolName }}</span>
             </div>
             <div class="person">
-                <el-button v-if="isIndex2 == 2" type="text" @click="gotoli" style="margin-right: 20px">返回</el-button>
+                <el-button v-if="isIndex2 == 2" type="text" @click="gotoli" style="margin-right: 20px">返回校区</el-button>
               <div class="person_name">
                 <img
                  @click="openData()"
@@ -26,7 +26,7 @@
             </div>
           </div>
         </div>
-        <div style="max-width: 1260px;margin: auto;">
+        <div class="midBlo">
             <div class="buttonArea">
                 <div style="width: 500px;display: flex;gap: 100px;">
                     <div class="btnDiv"  :class="{ active: isActive === 1 }" >
@@ -37,7 +37,7 @@
                     <div class="btnDiv" :class="{ active: isActive === 2 }" @click="setActive(2)">校区特色</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>
@@ -56,7 +56,7 @@
                     <AschoolFeature></AschoolFeature>
                     </div>
                     <div class="Con" v-if="isActive === 3">
-                        <AquickEntrance></AquickEntrance>
+                        <AquickEntrance :key="isActive"></AquickEntrance>
                     </div>
                 </div>
             </div>
@@ -157,6 +157,11 @@ export default {
   display: flex;
   height: 60px;
   box-sizing: border-box;
+  padding-right: 10px;
+}
+.midBlo{
+    height: calc(100% - 60px);
+    overflow: hidden;
 }
 .topCon{
   display: flex;
@@ -204,7 +209,7 @@ export default {
 .KanBan {
     background-color: #FAFAFA;
     /* 设置高度为视口高度 */
-    min-height: 100%;
+    height: 100%;
     padding: 0  120px;
     box-sizing: border-box;
     font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
@@ -278,10 +283,16 @@ export default {
     margin-top: 30px;
     display: flex;
     gap: 30px;
-    
+    height: 100%;
 }
 .right_content{
     width: 100%;
+    height: calc(100% - 101px);
+    overflow: auto;
+    overflow: auto;
+    padding-right: 10px;
+    padding-bottom: 50px;
+    box-sizing: border-box;
 }