11wqe1 il y a 2 mois
Parent
commit
a859f60e42

+ 1 - 0
src/assets/img/hg1.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="1743572706807" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="23826" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M907.2 257.2c0.8 0.3 1.4 0.7 2.2 1l0.4-3.3-2.6 2.3z m-803.1-0.5c0.4-0.2 0.9-0.3 1.3-0.6l-1.7-1.4 0.4 2z m769.7 40.1c-7.1 0-13.5 2.8-18.2 7.3-0.3 0.3-0.4 0.2-0.3-0.2L679.6 462.4 536.5 175.7c-6.7-8.9-17.3-14.5-29.3-14.5-14 0-26.2 7.9-32.4 19.4L334.1 462.4 152.8 298.8c-3.8-2.1-8.2-3.3-12.9-3.3-14.5 0-26.2 11.8-26.2 26.2 0 1.2-0.2 1.8-0.6 1.8l56.1 419.1c0-1.6-0.1-3.2-0.3-4.9 3.4 29.2 23.1 53.4 49.6 63.4-2.4-0.9-4.8-1.6-7-2 56.3 21.1 166.8 34.8 294.1 33.6 127.9-1.1 239.4-16.9 296.5-39.2-2.1 0.4-4.3 1-6.7 1.9 26.5-10.1 46.2-34.3 49.6-63.5-0.4 3.4-0.4 6.6-0.2 9.5l55.7-416.9c-0.2-0.2-0.4-0.8-0.4-1.7 0-14.2-11.7-26-26.3-26z" fill="#FFD700" p-id="23827"></path></svg>

+ 1 - 0
src/assets/img/hg2.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="1743572706807" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="23826" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M907.2 257.2c0.8 0.3 1.4 0.7 2.2 1l0.4-3.3-2.6 2.3z m-803.1-0.5c0.4-0.2 0.9-0.3 1.3-0.6l-1.7-1.4 0.4 2z m769.7 40.1c-7.1 0-13.5 2.8-18.2 7.3-0.3 0.3-0.4 0.2-0.3-0.2L679.6 462.4 536.5 175.7c-6.7-8.9-17.3-14.5-29.3-14.5-14 0-26.2 7.9-32.4 19.4L334.1 462.4 152.8 298.8c-3.8-2.1-8.2-3.3-12.9-3.3-14.5 0-26.2 11.8-26.2 26.2 0 1.2-0.2 1.8-0.6 1.8l56.1 419.1c0-1.6-0.1-3.2-0.3-4.9 3.4 29.2 23.1 53.4 49.6 63.4-2.4-0.9-4.8-1.6-7-2 56.3 21.1 166.8 34.8 294.1 33.6 127.9-1.1 239.4-16.9 296.5-39.2-2.1 0.4-4.3 1-6.7 1.9 26.5-10.1 46.2-34.3 49.6-63.5-0.4 3.4-0.4 6.6-0.2 9.5l55.7-416.9c-0.2-0.2-0.4-0.8-0.4-1.7 0-14.2-11.7-26-26.3-26z" fill="#C0C0C0" p-id="23827"></path></svg>

+ 1 - 0
src/assets/img/hg3.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="1743572706807" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="23826" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M907.2 257.2c0.8 0.3 1.4 0.7 2.2 1l0.4-3.3-2.6 2.3z m-803.1-0.5c0.4-0.2 0.9-0.3 1.3-0.6l-1.7-1.4 0.4 2z m769.7 40.1c-7.1 0-13.5 2.8-18.2 7.3-0.3 0.3-0.4 0.2-0.3-0.2L679.6 462.4 536.5 175.7c-6.7-8.9-17.3-14.5-29.3-14.5-14 0-26.2 7.9-32.4 19.4L334.1 462.4 152.8 298.8c-3.8-2.1-8.2-3.3-12.9-3.3-14.5 0-26.2 11.8-26.2 26.2 0 1.2-0.2 1.8-0.6 1.8l56.1 419.1c0-1.6-0.1-3.2-0.3-4.9 3.4 29.2 23.1 53.4 49.6 63.4-2.4-0.9-4.8-1.6-7-2 56.3 21.1 166.8 34.8 294.1 33.6 127.9-1.1 239.4-16.9 296.5-39.2-2.1 0.4-4.3 1-6.7 1.9 26.5-10.1 46.2-34.3 49.6-63.5-0.4 3.4-0.4 6.6-0.2 9.5l55.7-416.9c-0.2-0.2-0.4-0.8-0.4-1.7 0-14.2-11.7-26-26.3-26z" fill="#CD7F32" p-id="23827"></path></svg>

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
src/assets/img/jxzx.svg


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
src/assets/img/jxzx2.svg


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

@@ -1 +0,0 @@
-<?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="1743562641385" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16214" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M978.295467 849.5104v33.28H46.011733v-33.28H978.261333z m33.416533-33.211733H12.6976v99.805866H1011.712v-99.805866z" fill="#0253d7" p-id="16215"></path><path d="M512.2048 164.010667l176.196267 176.196266 9.796266 9.796267h213.6064v466.193067H112.605867V350.0032h213.6064l9.796266-9.796267 176.196267-176.196266z m0-47.0016L312.388267 316.757333H79.291733v532.821334h865.792V316.757333H712.021333l-199.7824-199.7824z" fill="#0253d7" p-id="16216"></path><path d="M445.610667 616.413867v199.7824h-66.594134V616.448h66.56z m33.1776-33.314134h-133.188267v266.410667h133.188267v-266.410667z m166.6048 33.314134v199.7824h-66.594134V616.448h66.594134z m33.314133-33.314134H545.450667v266.410667h133.2224v-266.410667zM245.76 449.911467v66.696533H179.2V449.877333h66.594133z m33.314133-33.314134H145.885867v133.188267h133.2224v-133.188267z m-33.314133 233.130667v66.56H179.2v-66.56h66.594133z m33.314133-33.314133H145.885867v133.188266h133.2224v-133.188266z m565.998934-166.5024v66.696533h-66.594134V449.877333h66.56z m33.3824-33.314134h-133.188267v133.188267h133.188267v-133.188267z m-33.3824 233.130667v66.56h-66.594134v-66.56h66.56z m33.3824-33.314133h-133.188267v133.188266h133.188267v-133.188266zM512.2048 283.409067c36.693333 0 66.594133 29.9008 66.594133 66.56a66.696533 66.696533 0 0 1-66.594133 66.628266 66.628267 66.628267 0 0 1 0-133.188266z m0-33.314134a99.874133 99.874133 0 0 0-99.908267 99.908267 99.874133 99.874133 0 0 0 99.908267 99.908267c55.1936 0 96.597333-44.714667 96.597333-99.908267s-41.403733-99.908267-96.597333-99.908267z" fill="#0253d7" p-id="16217"></path></svg>

+ 0 - 0
src/assets/img/cocoFlow2.svg → src/assets/img/sucai2.svg


+ 1 - 0
src/assets/img/sy.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="1744013519945" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4321" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M939.175079 484.343103 557.721321 107.755166c-1.927909-2.289136-5.950526-6.025227-11.568477-9.730619-10.06217-6.627954-20.757766-10.001795-31.783891-10.001795-11.855002 0-22.820752 3.40454-32.597419 10.092869-6.477528 4.458545-9.942443 8.465812-11.4334 10.454096L89.606831 484.373803c-6.522554 6.417153-10.107195 14.973016-10.107195 24.071232 0 9.06854 3.584642 17.624403 10.107195 24.041556 11.990079 11.900028 29.494755 8.495488 46.169529-7.92346l25.592888-25.306362 41.892109-40.08495 0 389.497968c0 48.143487 39.617299 87.308485 88.317465 87.308485l148.993382 0L440.572204 687.670975c0-19.160385 15.84692-34.736129 35.30918-34.736129l77.020164 0c19.47761 0 35.293831 15.575744 35.293831 34.736129l0 248.307296 149.008732 0c48.685839 0 88.332814-39.164998 88.332814-87.308485L825.536926 461.189777l67.484997 66.355267c11.508102 7.531534 21.842471 11.538801 30.217209 11.538801 6.236028 0 11.44875-2.169409 15.936971-6.598278 6.507204-6.417153 10.092869-14.94334 10.122545-24.041556C949.297624 499.346819 945.712983 490.789932 939.175079 484.343103z" fill="#64748B" p-id="4322" data-spm-anchor-id="a313x.search_index.0.i0.3ddb3a81SQqGzv" class="selected"></path></svg>

+ 1 - 0
src/assets/img/sy1.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="1744013519945" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4321" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M939.175079 484.343103 557.721321 107.755166c-1.927909-2.289136-5.950526-6.025227-11.568477-9.730619-10.06217-6.627954-20.757766-10.001795-31.783891-10.001795-11.855002 0-22.820752 3.40454-32.597419 10.092869-6.477528 4.458545-9.942443 8.465812-11.4334 10.454096L89.606831 484.373803c-6.522554 6.417153-10.107195 14.973016-10.107195 24.071232 0 9.06854 3.584642 17.624403 10.107195 24.041556 11.990079 11.900028 29.494755 8.495488 46.169529-7.92346l25.592888-25.306362 41.892109-40.08495 0 389.497968c0 48.143487 39.617299 87.308485 88.317465 87.308485l148.993382 0L440.572204 687.670975c0-19.160385 15.84692-34.736129 35.30918-34.736129l77.020164 0c19.47761 0 35.293831 15.575744 35.293831 34.736129l0 248.307296 149.008732 0c48.685839 0 88.332814-39.164998 88.332814-87.308485L825.536926 461.189777l67.484997 66.355267c11.508102 7.531534 21.842471 11.538801 30.217209 11.538801 6.236028 0 11.44875-2.169409 15.936971-6.598278 6.507204-6.417153 10.092869-14.94334 10.122545-24.041556C949.297624 499.346819 945.712983 490.789932 939.175079 484.343103z" fill="#0354D7" p-id="4322" data-spm-anchor-id="a313x.search_index.0.i0.3ddb3a81SQqGzv" class="selected"></path></svg>

+ 1 - 0
src/assets/img/zhexian.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="1743565265909" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="31308" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M979 1024H127.1C57 1024 0 967 0 896.9V45C0 20.1 20.1 0 45 0s45 20.1 45 45v851.9c0 20.5 16.6 37.1 37.1 37.1H979c24.9 0 45 20.1 45 45s-20.1 45-45 45z" fill="#0051d7" p-id="31309"></path><path d="M207.3 877.7c-6.3 0-12.6-1.3-18.7-4.1-22.6-10.4-32.5-37.1-22.2-59.7L323.1 472c5-10.8 14.1-19.3 25.2-23.4 11.2-4.2 23.6-3.7 34.4 1.3l278 127.5 217.6-474.7c10.4-22.6 37.1-32.5 59.7-22.2 22.6 10.4 32.5 37.1 22.2 59.7L723.9 655.8c-5 10.8-14.1 19.3-25.2 23.4-11.2 4.2-23.6 3.7-34.4-1.3l-278-127.5-138 301c-7.6 16.6-24 26.3-41 26.3z" fill="#0051d7" p-id="31310"></path></svg>

+ 5 - 0
src/common/apiConfig.js

@@ -50,6 +50,11 @@ export const API_CONFIG = {
   ajax_Suffix: {
     functionName: "select_Suffix",
   },
+
+  // 查询权限
+  ajax_schoolPermission: {
+    functionName: "select_schoolPermission",
+  },
   ////////////// 以下是账号审核的数据接口
 
   moveUser: {

+ 22 - 11
src/components/botPage.vue

@@ -12,13 +12,16 @@
             <div style="display: grid;grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));gap: 16px;">
                 <div v-for="(item,index) in tab" class="tabCon" :key="index" style="min-width: 308px;">
                         <div style="flex-wrap: wrap;display: flex;justify-content: space-between;border: 1px rgb(243 244 246 / var(--tw-border-opacity, 1)) solid;border-radius: 10px;padding: 16px;box-sizing: border-box;">
-                            <img style="width: 48px;border-radius: 50%;" src="../assets/date.png" alt="">
+                            <img style="width: 48px;border-radius: 50%;" src="../assets/img/root.png" alt="">
                             <div style="flex: 1;margin-left: 12px;display: flex;flex-direction: column;justify-content: center;">
                                 <div style="color: #1f2937;font-size: 16px;height: 24px;line-height: 24px;">{{ item.name }}</div>
                                 <div style="color: #6b7280;font-size: 12px;height: 16px;line-height: 16px;">{{ item.bir }}</div>
                             </div>
-                            <div>
-                                <img style="width: 20px;" src="../assets/startIcon.svg" alt="">
+                            <div class="hg">
+                                <img style="width: 20px;" v-if="index == 0" src="../assets/img/hg1.svg" alt="">
+                                <img style="width: 20px;" v-if="index == 1" src="../assets/img/hg2.svg" alt="">
+                                <img style="width: 20px;" v-if="index == 2" src="../assets/img/hg3.svg" alt="">
+
                             </div>
                     </div>
                 </div>
@@ -26,7 +29,7 @@
             </div>
         </div>
 
-        <div class="conBlock">
+        <!-- <div class="conBlock">
             <div style="display: flex;justify-content: space-between;margin-bottom: 16px;">
                 <div style="color: #1f2937;font-weight: 600;font-size: 18px;margin-bottom: 16px;">项目式学习</div>
                 <div style="color: #0354d7;font-size: 14px;cursor: pointer;">查看全部</div>
@@ -34,13 +37,15 @@
             <div style="display: grid;grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));gap: 16px;">
                 <div v-for="(item,index) in tab" class="tabCon"  :key="index" style="min-width: 308px;">
                         <div style="flex-wrap: wrap;display: flex;justify-content: space-between;border: 1px rgb(243 244 246 / var(--tw-border-opacity, 1)) solid;border-radius: 10px;padding: 16px;box-sizing: border-box;">
-                            <img style="width: 48px;border-radius: 50%;" src="../assets/date.png" alt="">
+                            <img style="width: 48px;border-radius: 50%;" src="../assets/img/root.png" alt="">
                             <div style="flex: 1;margin-left: 12px;display: flex;flex-direction: column;justify-content: center;">
                                 <div style="color: #1f2937;font-size: 16px;height: 24px;line-height: 24px;">{{ item.name }}</div>
                                 <div style="color: #6b7280;font-size: 12px;height: 16px;line-height: 16px;">{{ item.bir }}</div>
                             </div>
-                            <div>
-                                <img style="width: 20px;" src="../assets/startIcon.svg" alt="">
+                            <div class="hg">
+                                <img style="width: 20px;" v-if="index == 0" src="../assets/img/hg1.svg" alt="">
+                                <img style="width: 20px;" v-if="index == 1" src="../assets/img/hg2.svg" alt="">
+                                <img style="width: 20px;" v-if="index == 2" src="../assets/img/hg3.svg" alt="">
                             </div>
                     </div>
                 </div>
@@ -56,19 +61,21 @@
             <div style="display: grid;grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));gap: 16px;">
                 <div v-for="(item,index) in tab" class="tabCon"  :key="index" style="min-width: 308px;">
                         <div style="flex-wrap: wrap;display: flex;justify-content: space-between;border: 1px rgb(243 244 246 / var(--tw-border-opacity, 1)) solid;border-radius: 10px;padding: 16px;box-sizing: border-box;">
-                            <img style="width: 48px;border-radius: 50%;" src="../assets/date.png" alt="">
+                            <img style="width: 48px;border-radius: 50%;" src="../assets/img/root.png" alt="">
                             <div style="flex: 1;margin-left: 12px;display: flex;flex-direction: column;justify-content: center;">
                                 <div style="color: #1f2937;font-size: 16px;height: 24px;line-height: 24px;">{{ item.name }}</div>
                                 <div style="color: #6b7280;font-size: 12px;height: 16px;line-height: 16px;">{{ item.bir }}</div>
                             </div>
-                            <div>
-                                <img style="width: 20px;" src="../assets/startIcon.svg" alt="">
+                            <div class="hg">
+                                <img style="width: 20px;" v-if="index == 0" src="../assets/img/hg1.svg" alt="">
+                                <img style="width: 20px;" v-if="index == 1" src="../assets/img/hg2.svg" alt="">
+                                <img style="width: 20px;" v-if="index == 2" src="../assets/img/hg3.svg" alt="">
                             </div>
                     </div>
                 </div>
                 
             </div>
-        </div>
+        </div> -->
     </div>
 </template>
 
@@ -103,4 +110,8 @@
     transform: translateY(-5px); /* 向上位移 */
     box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
 }
+.hg img{
+    width: 23px !important;
+    height: 20px;
+}
 </style>

+ 282 - 154
src/components/sidebarL.vue

@@ -1,181 +1,309 @@
 <template>
-    <div>
-        <!-- 窄侧边导航栏 -->
-        <div id="sidebar"
-            class="bg-white shadow-lg w-20 flex-shrink-0 transition-all duration-300 ease-in-out z-20 flex flex-col">
-            <!-- 顶部Logo -->
-            <div class="flex items-center justify-center p-4 border-b">
-                <i class="fas fa-school text-primary text-3xl"></i>
+        <div class="left">
+            <div class="logo2">
+                <img :src="fromL.basics.logo" alt="">
             </div>
+            <div class="ulT">
 
-            <!-- 导航菜单 - 一级图标 -->
-            <nav class="p-2 flex-1">
-                <div class="space-y-2">
-                    <!-- 首页 -->
-                    <a href="#"
-                        class="nav-icon-btn w-full flex flex-col items-center justify-center p-3 rounded-lg hover:bg-gray-100 text-primary active"
-                        data-direct-link="true">
-                        <i class="fas fa-home text-xl"></i>
-                        <span class="nav-icon-text">首页</span>
-                    </a>
-
-                    <!-- cocoflow -->
-                    <a href="#"
-                        class="nav-icon-btn w-full flex flex-col items-center justify-center p-3 rounded-lg hover:bg-gray-100 text-gray-700"
-                        data-direct-link="true">
-                        <i class="fas fa-layer-group text-xl"></i>
-                        <span class="nav-icon-text">CocoFlow</span>
-                    </a>
-
-                    <!-- 教学中心 -->
-                    <button
-                        class="nav-icon-btn w-full flex flex-col items-center justify-center p-3 rounded-lg hover:bg-gray-100 text-gray-700"
-                        data-menu="teaching">
-                        <i class="fas fa-chalkboard-teacher text-xl"></i>
-                        <span class="nav-icon-text">教学中心</span>
-                    </button>
-
-                    <!-- 智能教务 -->
-                    <button
-                        class="nav-icon-btn w-full flex flex-col items-center justify-center p-3 rounded-lg hover:bg-gray-100 text-gray-700"
-                        data-menu="office">
-                        <i class="fas fa-briefcase text-xl"></i>
-                        <span class="nav-icon-text">智能教务</span>
-                    </button>
-
-                    <!-- 知识库 -->
-                    <a href="#"
-                        class="nav-icon-btn w-full flex flex-col items-center justify-center p-3 rounded-lg hover:bg-gray-100 text-gray-700"
-                        data-direct-link="true">
-                        <i class="fas fa-database text-xl"></i>
-                        <span class="nav-icon-text">知识库</span>
-                    </a>
+                <div @click.stop="goto(0)" :style="{background :activeL === 0 ?'#E6F0FF':'',zIndex : 10000 }">
+                    <div class="menu_left">
+                        <img  class="logo" :src="activeL === 0 ? require('../assets/img/sy1.svg') : require('../assets/img/sy.svg')" alt="">
+                        <span  :style="{color : activeL === 0 ? '#0051D7' :''}">首页</span>
+                    </div>
                 </div>
-            </nav>
-
-            <!-- 底部用户头像和信息 -->
-            <div class="p-2">
-                <!-- 提醒图标按钮 -->
-                <div class="flex justify-center mb-4">
-                    <div class="relative cursor-pointer hover:opacity-80">
-                        <i class="fas fa-bell text-gray-600 text-xl"></i>
-                        <!-- 红点通知标记 -->
-                        <span class="absolute -top-1 -right-1 bg-red-500 rounded-full w-2 h-2"></span>
+
+                <div v-for="(item,index) in fromL.admin.sidebar.list" @click.stop="goto(index,item)" :style="{background :activeL === (index +1) ?'#E6F0FF':'',zIndex : 10000 }" :key="index+1">
+                    <div class="menu_left" v-if="item.menuName">
+                        <img  class="logo" :src="activeL === (index +1) ? item.menuActiveIcon : item.menuIcon" alt="">
+                        <span  :style="{color : activeL === (index +1) ? '#0051D7' :''}">{{ item.menuName }}</span>
                     </div>
+                  
+                    <div class="menu_left" v-else>
+                        <div v-for="(p,pin) in item.url" :key="pin+'p'">
+                            <img class="logo3"  
+                            v-if="p.region == userinfo.schoolArea && p.icon" 
+                            :src="activeL === (index +1) ? p.icon : p.activeIcon" 
+                            alt="">
+                            <img class="logo3" v-else-if="p.region == 'cn'"  :src="p.icon" alt="">
+                        </div>
+                        <span  :style="{color : activeL === (index +1) ? '#0051D7' :''}">{{ item.description }}</span>
+                    </div>
+                </div>
+               
+            </div>
+            <div class="userInfo">
+                <img style="width: 40px;border-radius: 50%;margin-bottom: 4px;" :src="userinfo.headportrait ? userinfo.headportrait : require('../assets/img/root.png')" alt="">
+                <div style="margin-bottom: 8px;">{{ userinfo.username }}</div>
+            </div>
+
+            <div class="ulTCopy" v-if="isShow && barCopy.length != 0" >
+                <div class="ulTCopyTit">
+                    <span>教学中心</span>
+                    <span @click="closeCopy" class="cha" style="color: #6B7280;font-size: 23px;cursor: pointer;">⨯</span>
                 </div>
-                <div class="flex flex-col items-center justify-center mb-2">
-                    <img src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=100&q=80"
-                        alt="用户头像" class="w-10 h-10 rounded-full cursor-pointer hover:opacity-80 mb-1">
-                    <span class="text-xs text-gray-700">李老师</span>
+                <div style="padding: 16px;box-sizing: border-box;">
+                    <div class="ulTCopyTxt" v-for="(i,ind) in barCopy" @click="levTwo(i)" :key="ind+'a'">
+                        <div v-for="(p,pin) in i.url" :key="pin+'p'">  
+                            <img style="width: 30px;object-fit: contain;margin-right: 5px;"  
+                            v-if="p.region == userinfo.schoolArea && p.icon" 
+                            :src="p.icon" 
+                            alt="">
+                            
+                            <img style="width: 30px;object-fit: contain;margin-right: 5px;" v-else-if="p.region == 'cn'"  :src="p.icon" alt="">
+                        </div>
+                        <span >{{ i.description }}</span>
+                    </div>
                 </div>
             </div>
+            
+            <div v-if="isShow" @click="closeCopy" style="width: 100vw;height: 100vh;position: absolute;left: 0;top: 0;z-index: 1;"></div>
         </div>
+</template>
 
-        <!-- 展开的侧边栏菜单 -->
-        <div id="expanded-menu"
-            class="fixed left-20 top-0 bottom-0 w-64 bg-white shadow-lg z-10 transform -translate-x-full transition-transform duration-300 ease-in-out">
-            <!-- 二级菜单标题 -->
-            <div class="flex items-center p-4 relative" style="border-bottom: 1px solid #e5e7eb; height: 72px;">
-                <h3 id="expanded-menu-title" class="text-lg font-semibold text-gray-800">首页</h3>
-                <button id="close-expanded-menu"
-                    class="absolute right-4 top-1/2 transform -translate-y-1/2 text-gray-500 hover:text-gray-700">
-                    <i class="fas fa-times"></i>
-                </button>
-            </div>
+<script>
+import { mapGetters, mapActions } from 'vuex';
+import { loginOut } from '@/api/user';
 
-            <!-- 首页二级菜单 -->
-            <div id="home-menu" class="menu-content p-4 space-y-2">
-                <a href="#" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
-                    <i class="fas fa-tachometer-alt text-gray-600"></i>
-                    <span>仪表盘</span>
-                </a>
-                <a href="#" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
-                    <i class="fas fa-star text-gray-600"></i>
-                    <span>收藏应用</span>
-                </a>
-                <a href="#" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
-                    <i class="fas fa-history text-gray-600"></i>
-                    <span>最近使用</span>
-                </a>
-            </div>
+    export default {
+        computed: {
+            ...mapGetters(['userinfo','fromL']),
+        },
+        data() {
+            return {
+                // 二级弹框是否显示
+                isShow:false,
+                // 一级选中第几个
+                activeL:0,
+                // 二级分类
+                barCopy:[],
+                // 应用标识
+                appSign:'',
+                levAppSign:''
+            }
+        },
+        methods: {
+            ...mapActions({
+                logout: 'user/logout'
+            }),
+            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(() => {
+                    // 取消操作
+                });
+            },
+            // 关闭二级导航遮罩层
+            closeCopy(){
+                this.isShow = false
+            },
+            // 点击一级导航
+            goto(index,val = null){
+                this.levAppSign = ''
+                if (val) {
+                    this.activeL = index + 1               
+                }else{
+                    this.appSign = ''
+                    document.querySelector('#pageCon').innerHTML = '';
 
+                    this.isShow = false
+                    this.activeL = index
+                    return
+                }
 
 
-            <!-- 教学中心二级菜单 -->
-            <div id="teaching-menu" class="menu-content p-4 space-y-2 hidden">
-                <a href="#" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
-                    <i class="fas fa-book text-gray-600"></i>
-                    <span>课程管理</span>
-                </a>
-                <a href="#" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700" id="course-center-link">
-                    <i class="fas fa-graduation-cap text-gray-600"></i>
-                    <span>课程中心</span>
-                </a>
-                <a href="#" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
-                    <i class="fas fa-star text-gray-600"></i>
-                    <span>学生评价</span>
-                </a>
-                <a href="#" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
-                    <i class="fas fa-eye text-gray-600"></i>
-                    <span>课堂观察</span>
-                </a>
-                <a href="#" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
-                    <i class="fas fa-users text-gray-600"></i>
-                    <span>协同建构</span>
-                </a>
-            </div>
+                // 有二级导航的显示二级导航,清除一级导航应用
+                if (this.fromL.admin.sidebar.list[index].children) {
+                    this.barCopy = JSON.parse(JSON.stringify(this.fromL.admin.sidebar.list[index].children))
+                    this.isShow = true
 
+                    this.appSign = ''
+                    document.querySelector('#pageCon').innerHTML = '';
+                }else{
+                    this.isShow = false
 
-            <!-- 智能教务二级菜单 -->
-            <div id="office-menu" class="menu-content p-4 space-y-2 hidden">
-                <a href="#" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
-                    <i class="fas fa-chart-line text-gray-600"></i>
-                    <span>综合看板</span>
-                </a>
-                <a href="#" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
-                    <i class="fas fa-file-alt text-gray-600"></i>
-                    <span>智能表单</span>
-                </a>
-                <a href="#" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
-                    <i class="fas fa-user-tie text-gray-600"></i>
-                    <span>教师管理</span>
-                </a>
-                <a href="#" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
-                    <i class="fas fa-chalkboard-teacher text-gray-600"></i>
-                    <span>教师中心</span>
-                </a>
-                <a href="#" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
-                    <i class="fas fa-comments text-gray-600"></i>
-                    <span>会议妙记</span>
-                </a>
-                <a href="#" class="flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-100 text-gray-700">
-                    <i class="fas fa-user-graduate text-gray-600"></i>
-                    <span>学生管理</span>
-                </a>
-            </div>
+                    // 点击相同应用不刷新  
+                    if (this.appSign == val.toolId) return
+                    this.appSign = val.toolId
 
-          </div>
-    </div>
-</template>
+                    let url = ''
+                    // 查出对应账号的应用区域地址
+                    val.url.forEach(e => {
+                        if (e.region == this.userinfo.schoolArea) {
+                            url = e.url
+                        }
+                    });
 
-<script>
-    export default {
-        data() {
-            return {
+                    let dom = document.querySelector('#pageCon')
+                    
+                    document.querySelector('#pageCon').innerHTML = '';
+                    
+                    // console.log(document.querySelector('#pageCon'));
+                    window.topU.U.MD.D.I.openApplicationWai(val.toolId, url, dom)
+                    // 应用标识,url,存储dom
+                }
+            },
+            // 点击二级导航
+            levTwo(val){
+                this.appSign = ''
+
+                // 点击相同应用不刷新
+                if (this.levAppSign == val.toolId) return
+                this.levAppSign = val.toolId
+                
+                let url = ''
+                val.url.forEach(e => {
+                    if (e.region == this.userinfo.schoolArea) {
+                        url = e.url
+                    }
+                });
+
+                let dom = document.querySelector('#pageCon')
+        
+                document.querySelector('#pageCon').innerHTML = '';
                 
+                window.topU.U.MD.D.I.openApplicationWai(val.toolId, url, dom)
             }
         },
+       
+       
     }
 </script>
 
 <style scoped>
-  #expanded-menu {
-            transition: transform 0.3s ease-in-out;
-            box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
-        }
-
-        #expanded-menu.show {
-            transform: translateX(0);
-        }
+.logo{
+  width: 80px;
+  height: 68px;
+}
+.logo3{
+    height: 25px;object-fit: contain;transform: scale(1.5);
+}
+.logo2{
+  padding: 16px;
+  box-sizing: border-box;
+  height: 68px;
+  border-bottom: .5px #e5e7eb solid;
+}
+.logo2 img{
+  width: 37px;
+}
+.userInfo{
+  width: 80px;
+  color: #374151;
+  font-size: 12px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: 8px;
+  box-sizing: border-box;
+}
+.left {
+    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
+    width: 80px;
+    height: 100%;
+    background-color: #ffffff;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: space-between;
+    position: relative;
+    box-shadow: 5px 0 8px rgba(0, 0, 0, 0.1);
+    z-index: 9999;
+
+}
+.left .ulT { 
+  width: 100%;
+  height: 100%;
+  padding: 8px;
+  box-sizing: border-box;
+  display: flex;
+  flex-direction: column;
+  background-color: #ffffff;
+}
+.left .ulT div{ 
+  margin-top: 10px;
+  border-radius: 10px;
+  overflow: hidden;
+}
+.ulTCopy{
+    position: absolute;
+    right: 0;
+    top: 0;
+    transform: translate(256px,0);
+    height: 100%;
+    width: 256px;
+    z-index: 999999999;
+    background-color: #ffffff;
+    overflow: visible; 
+    transition: width 2s ease; /* 定义过渡效果 */
+    box-shadow: inset 2px 0 8px rgba(0, 0, 0, 0.1),5px 3px 5px 0px rgba(0, 0, 0, 0.1);
+}
+
+.ulTCopyTit{
+    height: 72px;padding: 16px;box-sizing: border-box;color: #000;font-size: 18px;font-weight: 600;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    border-bottom: .5px #e5e7eb solid;
+
+}
+.ulTCopyTxt{
+    height: 48px;padding: 12px;box-sizing: border-box;display: flex;align-items: center;
+    color: #374151;
+    border-radius: 10px;
+    cursor: pointer;
+}
+.ulTCopyTxt:hover{
+    background-color: #f3f4f6;
+}
+.cha:hover{
+    color: #000 !important;
+}
+
+.menu_left {
+  width: 64px;
+  height: 70px;
+  font-size: 10px;
+  margin-top: 3px;
+  white-space: nowrap;
+  color: #64748b;
+  align-items: center;
+  justify-content: center;
+  display: flex;
+  flex-wrap: wrap;
+  padding: 12px;
+  box-sizing: border-box;
+  border-radius: 10px;
+  border: none;
+  z-index: 1000000;
+  text-decoration: none; /* 移除下划线 */
+  cursor: pointer;
+  border-radius: 10px;
+  margin-top: 12px;
+}
+.ulT div:nth-child(1){
+    margin-top: 0;
+}
+.menu_left:hover{
+    background-color: #f3f4f6 !important;
+}
+.menu_left img{
+  width: 22px;
+  height: 20px;
+}
 
 </style>

+ 64 - 30
src/components/topPage.vue

@@ -4,61 +4,79 @@
             <div class="topBlock">
                 <div class="topTit" style="display: flex;">
                     <div>欢迎使用</div>
-                    <div style="color: #0354D7;margin: 0 15px;">深圳市荔园教育集团—通新岭校区</div>
+                    <div style="color: #0354D7;margin: 0 15px;">深圳市荔园教育集团—{{ fromL.basics.title }}</div>
                     <div>AI平台!</div>
                 </div>
                 <div class="topDetail">
-                    探索AI教育的无限可能,提升教学效率与学习体验
+                    <!-- 探索AI教育的无限可能,提升教学效率与学习体验 -->
+                     {{ fromL.basics.brief }}
                 </div>
             </div>
             <img style="width: 96px;height: 96px;" src="../assets/img/root.png" alt="">
         </div>
         <div class="TabList">
-            <div class="TabListCon" v-for="(item,index) in tabData" :key="index">
-                <div></div>
-                <div class="TabListName">{{ item.name }}</div>
-                <div class="TabListBri">{{ item.bri }}</div>
+            <div class="TabListCon" v-for="(item,index) in fromL.admin.index.list" :key="index">
+                <div v-for="(p,pin) in item.url" :key="pin+'p'">
+                    <img style="height: 25px;object-fit: contain;transform: scale(1.5);"  
+                    v-if="p.region == userinfo.schoolArea && p.icon" 
+                    :src="p.icon" 
+                    alt="">
+                    
+                    <img style="height: 25px;object-fit: contain;transform: scale(1.5);" v-else-if="p.region == 'cn'"  :src="p.icon" alt="">
+                </div>
+
+                <div class="TabListName">{{ item.description }}</div>
+                <div class="TabListBri">暂无</div>
             </div>
         </div>
         <div class="footCon">
             <div class="footConLeft">
-                <div></div>
+                <div><img style="margin-bottom: 12px;height: 41px;width: 36px;" src="../assets/img/sucai2.svg" alt=""></div>
                 <div style="font-size: 20px;font-weight: 600;color: #1f2937;margin-bottom: 8px;">CocoFlow</div>
                 <div style="color: #4b5563;font-size: 14px;">汇聚丰富的教育AI应用,搭建属于您的专属教育应用</div>
             </div>
+
             <div class="footList">
-                <div class="footListCon" v-for="(item,index) in tabData" :key="index">
-                    <div></div>
+                <div class="footListCon" v-for="(item,index) in footData" :key="index">
+                    <div><img style="margin-bottom: 12px;height: 24px;width: 22px;" :src="item.icon" alt=""></div>
                     <div class="TabListName">{{ item.name }}</div>
                     <div class="TabListBri">{{ item.bri }}</div>
                 </div>
+                <div class="footListCon footListCon2">
+                    <div style="margin-bottom: 8px;font-size: 40px;color: #0354D7;">+</div>
+                    <div class="TabListBri">添加常用应用</div>
+                </div>
             </div>
         </div>
     </div>
 </template>
 
 <script>
+import { mapGetters } from 'vuex';
+
     export default {
+        computed: {
+            ...mapGetters(['userinfo','fromL']),
+        },
         data() {
             return {
-                tabData:[
-                    {name:'综合看板',icon:'',bri:'平台数据可视化看板'},
-                    {name:'智能表单',icon:'',bri:'智能化表单管理'},
-                    {name:'教师管理',icon:'',bri:'教师账号与权限管理'},
-                    {name:'课程中心',icon:'',bri:'在AI的辅助下进行授课与评价'},
-                    {name:'课程管理',icon:'',bri:'创建和管理课程'},
-                    {name:'课堂观察',icon:'',bri:'对课堂进行全方位、多维度的分析'},
-                ],
+                // tabData:[
+                //     {name:'综合看板',icon:require('@/assets/img/zhexian.svg'),bri:'平台数据可视化看板'},
+                //     {name:'智能表单',icon:require('@/assets/img/biaodanll.svg'),bri:'智能化表单管理'},
+                //     {name:'教师管理',icon:require('@/assets/img/kehu.svg'),bri:'教师账号与权限管理'},
+                //     {name:'课程中心',icon:require('@/assets/img/kecheng.svg'),bri:'在AI的辅助下进行授课与评价'},
+                //     {name:'课程管理',icon:require('@/assets/img/guanli.svg'),bri:'创建和管理课程'},
+                //     {name:'课堂观察',icon:require('@/assets/img/guancha.svg'),bri:'对课堂进行全方位、多维度的分析'},
+                // ],
                 footData:[
-                    {name:'项目式课程设计',icon:'',bri:'从创意开始,帮助你设计PBL的课程案例。'},
-                    {name:'STEM活动设计',icon:'',bri:'以“5EX”模型设计STEM课程'},
-                    {name:'跨学科课程设计',icon:'',bri:'以“C-POTE”模型设计跨学科课程'},
-                    {name:'创意智造',icon:'',bri:'以设计思维为核心,深度启发学生创意。'},
-                    {name:'资料搜集',icon:'',bri:'搜集适合教学使用的高质量媒体资源。'},
-                    {name:'文本改写',icon:'',bri:'按自定义标准改写文本。'},
-                    {name:'智能总结',icon:'',bri:'按自定义要求总结文本。'},
-                    {name:'班级管理助手',icon:'',bri:'诊断班级管理问题并给出建议'},
-
+                    {name:'项目式课程设计',icon:require('@/assets/img/zhexian.svg'),bri:'从创意开始,帮助你设计PBL的课程案例。'},
+                    {name:'STEM活动设计',icon:require('@/assets/img/zhexian.svg'),bri:'以“5EX”模型设计STEM课程'},
+                    {name:'跨学科课程设计',icon:require('@/assets/img/zhexian.svg'),bri:'以“C-POTE”模型设计跨学科课程'},
+                    {name:'创意智造',icon:require('@/assets/img/zhexian.svg'),bri:'以设计思维为核心,深度启发学生创意。'},
+                    {name:'资料搜集',icon:require('@/assets/img/zhexian.svg'),bri:'搜集适合教学使用的高质量媒体资源。'},
+                    {name:'文本改写',icon:require('@/assets/img/zhexian.svg'),bri:'按自定义标准改写文本。'},
+                    {name:'智能总结',icon:require('@/assets/img/zhexian.svg'),bri:'按自定义要求总结文本。'},
+                    {name:'班级管理助手',icon:require('@/assets/img/zhexian.svg'),bri:'诊断班级管理问题并给出建议'},
                 ],
             }
         },
@@ -66,10 +84,7 @@
 </script>
 
 <style scoped>
-.footConLeft{
-    padding: 25px;
-    box-sizing: border-box;
-}
+
 .footCon{
     display: flex;
     justify-content: space-between;
@@ -77,6 +92,15 @@
     box-sizing: border-box;
     background-color: #eff6ff;
     border-radius: 10px;
+    background-image: radial-gradient(#E6F0FF 1px, transparent 1px);
+    background-size: 20px 20px;
+}
+.footListCon2{
+    display: flex;
+    justify-content: center;
+    flex-direction: column;
+    align-items: center;
+  
 }
 .footListCon{
     background-color: #fff;
@@ -85,11 +109,19 @@
     box-sizing: border-box;
     transition: all 0.3s ease; /* 统一过渡效果 */
     min-height: 156px;
+    max-width: 187px;
+    background-image: radial-gradient(#E6F0FF 1px, transparent 1px);
+    background-size: 20px 20px;
 }
 .footListCon:hover{
     transform: translateY(-5px); /* 向上位移 */
     box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
 }
+.footConLeft{
+    padding: 25px;
+    min-width: 50px;
+    box-sizing: border-box;
+}
 .footList{
     display: grid;
     grid-template-columns: repeat(4, 1fr);
@@ -112,6 +144,8 @@
     width: 100%;
     box-shadow: 0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgb(0 0 0 / 0.05);
     transition: all 0.3s ease; /* 统一过渡效果 */
+    background-image: radial-gradient(#E6F0FF 1px, transparent 1px);
+    background-size: 20px 20px;
 }
 .TabListCon:hover{
     transform: translateY(-5px); /* 向上位移 */

+ 1 - 1
src/permission.js

@@ -5,7 +5,7 @@ import 'nprogress/nprogress.css' // progress bar style
 
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
 
-const whiteList = ['/login', '/examineDialog','/versionInstr','/updateDate'] // no redirect whitelist
+const whiteList = ['/login'] // no redirect whitelist
 
 router.beforeEach(async (to, from, next) => {
   // start progress bar

+ 1 - 1
src/router/index.js

@@ -27,7 +27,7 @@ const routes = [
         path: 'homepageL',
         name: 'homepageL',
         component: homepageL,
-      },
+      }
     ],
   },
   {

+ 1 - 0
src/store/getters.js

@@ -5,6 +5,7 @@ const getters = {
   id: state => state.user.id,
   userid: state => state.user.userinfo.userid,
   userinfo: state => state.user.userinfo,
+  fromL: state => state.user.fromL,
   token: state => state.user.token,
 }
 export default getters

+ 24 - 31
src/store/modules/user.js

@@ -1,6 +1,7 @@
 // import { user_info, login } from '@/api/user'
 import { eduGet, getUser } from "@/api/user";
 import { getToken, removeToken, setToken } from "@/utils/auth";
+
 // import { Message } from 'element-ui'
 // import { loginOut } from '@/api/user';
 
@@ -14,6 +15,25 @@ const getDefaultState = () => {
     avatar: "",
     is_init: false,
     userinfo: {},
+    fromL: {
+      basics: {
+        title: "",
+        brief: "",
+        logo: "",
+      },
+      //桌面  管理平台首页  管理平台侧边栏
+      desktop: {
+        list: [],
+      },
+      admin: {
+        index: {
+          list: [],
+        },
+        sidebar: {
+          list: [],
+        },
+      },
+    },
   };
 };
 
@@ -31,6 +51,9 @@ const mutations = {
   SET_ID: (state, id) => {
     state.id = id;
   },
+  SET_FROM: (state, from) => {
+    state.fromL = from;
+  },
   SET_NAME: (state, name) => {
     state.name = name;
   },
@@ -67,6 +90,7 @@ const actions = {
             commit("SET_TOKEN", _user.userid);
             setToken(_user.userid);
             resolve(_user.userid);
+            
           // } else if(_user.userid){
           //   loginOut()
           //   .then(async () => {
@@ -115,38 +139,7 @@ const actions = {
         });
     });
   },
-  // get user info
-  // getInfo({ commit, state }) {
-  //   return new Promise((resolve, reject) => {
-  //     getUser()
-  //       .then(response => {
-  //         const { data } = response
-
-  //         if (!data) {
-  //           reject('验证失败,请重新登录。')
-  //         }
-  //         console.log(response)
-
-  //         const { id, roles, is_init, cn, avatar, username } = response.data
-  //         // roles must be a non-empty array
-  //         if (!roles || roles.length <= 0) {
-  //           reject('getInfo: 角色必须为非空数组!')
-  //         }
-  //         commit('SET_NAME', cn)
-  //         commit('SET_USERNAME', username)
-  //         commit('SET_ROLES', roles)
-  //         commit('SET_ID', id)
-  //         commit('SET_AVATAR', avatar)
-  //         commit('SET_IS_INIT', is_init)
-  //         resolve(data)
-  //       })
-  //       .catch(error => {
-  //         reject(error)
-  //       })
-  //   })
-  // },
 
-  // user logout
   logout({ commit }) {
     return new Promise((resolve) => {
       commit("SET_TOKEN", "");

+ 140 - 82
src/views/HomeView.vue

@@ -8,36 +8,14 @@
       </div>
     </div> -->
     <div class="container">
-      <div class="left">
-        <img class="logo"  src="../assets/可可乐博logo.jpg" alt="">
-        <ul>
-          <router-link class="menu_left" to="/">
-            <i class="fas fa-home text-xl"></i>
-            <span>首页</span>
-          </router-link>
-          <router-link class="menu_left" to="/">
-            <img src="" alt="">
-            <span>CocoFlow</span>
-          </router-link>
-          <router-link class="menu_left" to="/">
-            <img src="" alt="">
-            <span>教学中心</span>
-          </router-link>
-          <router-link class="menu_left" to="/">
-            <img src="" alt="">
-            <span>智能教务</span>
-          </router-link>
-          <router-link class="menu_left" to="/">
-            <img src="" alt="">
-            <span>知识库</span>
-          </router-link>
-        </ul>
-        <div class="userInfo">
-          李老师
-        </div>
+      <div class="leftBar" style="height: 100%;">
+        <sidebarL ref="sidebarLRef"></sidebarL>
       </div>
-      <div class="table-container">
-        <router-view></router-view>
+      <div class="table-container" v-if="$refs.sidebarLRef">
+        <!-- <router-view></router-view> -->
+         <homepageL v-if="!$refs.sidebarLRef.appSign && !$refs.sidebarLRef.levAppSign"></homepageL>
+
+         <div v-else id="pageCon"></div>
       </div>
     </div>
   </div>
@@ -46,12 +24,24 @@
 <script>
 import { mapGetters, mapActions } from 'vuex';
 import { loginOut } from '@/api/user';
-// import sidebarL from '../components/sidebarL.vue';
+import sidebarL from '../components/sidebarL.vue';
+import { API_CONFIG } from "@/common/apiConfig";
+import store from '../store'
+import homepageL from './homepageL.vue';
+
 
 export default {
   name: "HomeView",
   components:{
-    // sidebarL
+    sidebarL,
+    homepageL
+  },
+  data() {
+    return {
+      perData:[],
+      toolList:[],
+      form:{}
+    }
   },
   computed: {
     ...mapGetters(['userinfo']),
@@ -81,66 +71,130 @@ export default {
       }).catch(() => {
         // 取消操作
       });
-    }
+    },
+    // 获取学校权限与组织权限,优先使用学校权限,其次使用组织权限
+    getPer() {
+      let params = [
+        {
+          functionName: API_CONFIG.ajax_schoolPermission.functionName, // 调用存储过程的名称
+          org: this.userinfo.org, //组织id
+          oid: this.userinfo.organizeid, //学校id
+        },
+      ];
+      
+      // 发起请求
+      this.$ajax
+        .post(API_CONFIG.baseUrl, params)
+        .then((res) => {
+          let data = res.data[0]
+          console.log('data', data)
+          this.perData= JSON.parse(data[0].json)
+          this.getToolData()
+
+        })
+        .catch((err) => {
+          console.error("请求失败,错误信息:", err);
+        });
+    },
+    getToolData() {
+			let params = [
+				{
+					functionName: "select_desktopToolByPage",
+					status: "",
+					page: 1,
+					lim: 9999999,
+				},
+			];
+			this.$ajax
+				.post(API_CONFIG.baseUrl, params)
+				.then((res) => {
+					let _data = res.data;
+					let _list = _data[0];
+					_list.forEach((i) => {
+						i.url = JSON.parse(i.url);
+						i.json = JSON.parse(i.json);
+						i.argumentList = JSON.parse(i.argumentList);
+					});
+					this.toolList = _list;
+          console.log('_list',_list);
+          
+					this.setDataListToo(_list);
+				})
+				.catch((err) => {
+					console.log(err);
+					this.$message.error("获取工具数据失败");
+				});
+		},
+    async setDataListToo(toolList = []) {
+      console.log('toolList',toolList);
+      
+			let _form = JSON.parse(JSON.stringify(this.perData));
+			// _form.desktop.list.forEach((i, index) => {
+			// 	let _index = toolList.findIndex((i2) => i == i2.id);
+			// 	if (_index != -1) {
+			// 		_form.desktop.list[index] = toolList[_index];
+			// 	} else {
+			// 		console.log("无工具", i);
+			// 	}
+			// });
+
+			_form.admin.index.list.forEach((i, index) => {
+				let _index = toolList.findIndex((i2) => i == i2.id);
+				if (_index != -1) {
+					_form.admin.index.list[index] = toolList[_index];
+				} else {
+					console.log("无工具", i);
+				}
+			});
+
+			_form.admin.sidebar.list.forEach((i, index) => {
+				if (i.children) {
+					i.children.forEach((i2, index2) => {
+						let _toolList = JSON.parse(JSON.stringify(toolList))
+						let _index = _toolList.findIndex((i3) => i2 == i3.id);
+						
+						if (_index != -1) {
+							_form.admin.sidebar.list[index].children[index2] = _toolList[_index];
+							_form.admin.sidebar.list[index].children[index2].typeId = _form.admin.sidebar.list[index].typeId + "," +_toolList[_index].id;
+						} else {
+							console.log("无工具", i);
+						}
+					});
+				} else {
+					let _toolList = JSON.parse(JSON.stringify(toolList))
+					let _index = _toolList.findIndex((i2) => i == i2.id);
+					if (_index != -1) {
+						_form.admin.sidebar.list[index] = _toolList[_index];
+						_form.admin.sidebar.list[index].typeId =
+							_form.admin.sidebar.list[index].id;
+					} else {
+						console.log("无工具", i);
+					} 
+				}
+			});
+
+      console.log('_form',_form);
+      await store.commit('user/SET_FROM', _form)
+
+      console.log('999999999999999999999999',this.$refs.sidebarLRef.appSign);
+      
+      
+			this.$forceUpdate();
+		},
+  },
+  mounted() {
+      this.getPer()
   },
-  mounted() {},
 };
 </script>
 
 <style scoped>
-.logo{
-  width: 80px;
-  height: 68px;
-}
-.userInfo{
-  width: 80px;
-  height: 128px;
-}
-.left {
-  width: 80px;
-  height: 100%;
-  background-color: #ffffff;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: space-between;
-  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
-  overflow: visible; /* 默认值,允许阴影溢出 */
-  z-index: 99999;
-}
-.left ul { 
-  width: 100%;
-  height: 100%;
-  padding: 8px;
-  box-sizing: border-box;
-  display: flex;
-  flex-direction: column;
-  background-color: #ffffff;
-}
 
-.menu_left {
-  width: 64px;
-  height: 70px;
-  font-size: 10px;
-  margin-top: 3px;
-  white-space: nowrap;
-  color: #64748b;
-  align-items: center;
-  justify-content: center;
-  display: flex;
-  padding: 12px;
-  box-sizing: border-box;
-  border-radius: 10px;
-  border: none;
-  text-decoration: none; /* 移除下划线 */
-}
-.menu_left > i {
-  margin-right: 10px;
-}
 .body {
   width: 100%;
   height: 100%;
   overflow: hidden;
+  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
 }
 
 .container {
@@ -154,5 +208,9 @@ export default {
   justify-content: center;
   background-color: #F9FAFB;
 }
-
+/* .leftBar{ */
+  /* box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px 6px rgb(0 0 0 / 0.1); */
+  /* overflow: visible;  */
+  /* z-index: 999999999; */
+/* } */
 </style>

+ 23 - 0
src/views/homepageL.vue

@@ -39,4 +39,27 @@ import botPage from '../components/botPage'
         max-width: 1280px;
     }
 
+/* 整个滚动条轨道 */
+::-webkit-scrollbar {
+  width: 10px;   /* 垂直滚动条宽度 */
+  height: 10px;  /* 水平滚动条高度 */
+}
+
+/* 滚动条轨道背景 */
+::-webkit-scrollbar-track {
+  background: #f1f1f1;
+  border-radius: 5px;
+}
+
+/* 滚动条滑块 */
+::-webkit-scrollbar-thumb {
+  background: #888;
+  border-radius: 5px;
+}
+
+/* 鼠标悬停时的滑块 */
+::-webkit-scrollbar-thumb:hover {
+  background: #555;
+}
+
 </style>

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff