From 6afa80f05bf3f001070fd8a2510ac7cde0d1d15d Mon Sep 17 00:00:00 2001
From: litian <2804272236@qq.com>
Date: 星期三, 24 四月 2024 16:26:14 +0800
Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/TextbookReader

---
 src/views/home.vue |  115 ++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 96 insertions(+), 19 deletions(-)

diff --git a/src/views/home.vue b/src/views/home.vue
index ec58c69..d50278e 100644
--- a/src/views/home.vue
+++ b/src/views/home.vue
@@ -40,12 +40,23 @@
       <!-- 鑿滃崟鍐呭 -->
       <div class="menuContent" v-if="menuState.open">
         <div class="searchBox">
-          <div class="inputBox">
+          <div class="inputBox" v-if="activeMenu !== 2">
             <el-input class="custom-input" placeholder="璇疯緭鍏ュ唴瀹�">
               <template #prefix>
                 <el-icon><Search /></el-icon>
               </template>
             </el-input>
+          </div>
+          <div v-else class="resourceTab">
+            <div class="tabItem hover" @click="selectResourceType('default')">
+              <p>榛樿璧勬簮</p>
+              <div :class="resourceType == 'default' ? 'text' : 'line'"></div>
+            </div>
+            <hr class="hr"/>
+            <div class="tabItem hover" @click="selectResourceType('teacher')">
+              <p>鏁欏笀璧勬簮</p>
+              <div :class="resourceType == 'teacher' ? 'text' : 'line'"></div>
+            </div>
           </div>
         </div>
         <!-- 鐩綍 -->
@@ -71,7 +82,17 @@
           </div>
         </div>
         <!-- 璧勬簮 -->
-        <div class="" v-if="activeMenu == 2"></div>
+        <div class="" v-if="activeMenu == 2">
+          <div class="resourceBox">
+            <div class="inputBox">
+              <el-input class="custom-input" placeholder="璇疯緭鍏ュ唴瀹�">
+                <template #prefix>
+                  <el-icon><Search /></el-icon>
+                </template>
+              </el-input>
+            </div>
+          </div>
+        </div>
         <!-- 鐭ヨ瘑鍥捐氨 -->
         <div class="" v-if="activeMenu == 3"></div>
         <!-- 鎴浘 -->
@@ -99,7 +120,7 @@
               <div><img :src="zoomOut" @click="changePageSize('reduce')" /></div>
             </div>
             <div class="brushImgBox">
-              <div><img :src="huabi2" class="brushImg" />鐢荤瑪</div>
+              <div @click="loadChild"><img :src="huabi2" class="brushImg" />鐢荤瑪</div>
               <!-- <el-switch v-model="headerData.brushToolShow"  @change="brushToolShow"/> -->
             </div>
           </div>
@@ -422,6 +443,13 @@
 
 <script setup lang="ts">
 import { ref, reactive, watch, onMounted } from 'vue'
+import { useRouter, useRoute } from 'vue-router'
+
+//鑾峰彇璺敱鍣�
+let $router = useRouter()
+//鑾峰彇褰撳墠璺敱鐨勪俊鎭�
+let $route = useRoute()
+
 import { ElMessage } from 'element-plus'
 import mulu from '@/assets/images/menu/mulu.png'
 import biji from '@/assets/images/menu/biji.png'
@@ -492,12 +520,8 @@
 import zoomIn from '../assets/images/operation/zoomIn.png'
 import zoomOut from '../assets/images/operation/zoomOut.png'
 import huabi2 from '../assets/images/operation/huabi.svg'
-import { start } from 'qiankun'
-onMounted(() => {
-  
-  start()
- 
-})
+import { loadMicroApp } from 'qiankun'
+
 // 鑿滃崟
 const menuData = reactive([
   {
@@ -527,12 +551,19 @@
 ])
 // 閫変腑鑿滃崟
 const activeMenu = ref(0)
+//璧勬簮绫诲瀷
 
+const resourceType = ref("default")
 // 鑿滃崟鐐瑰嚮
 const menuItemClick = (index) => {
   activeMenu.value = index
   menuState.open = true
 }
+
+const selectResourceType = (type) => {
+  resourceType.value = type
+}
+
 const menuState = reactive({
   open: true,
   notesColor: ''
@@ -1049,6 +1080,15 @@
     ctx = canvas.value.getContext('2d') as CanvasRenderingContext2D
   }
 }
+
+const loadChild = () => {
+  // loadMicroApp({
+  //   name: 'book',
+  //   entry: '//192.168.3.196:8080/',
+  //   container: document.querySelector('#container')
+  // })
+  // $router.push({path: "/aa"})
+}
 </script>
 
 <style lang="less">
@@ -1120,16 +1160,53 @@
         display: flex;
         justify-content: center;
         align-items: center;
-        .inputBox {
-          .custom-input {
-            border: 1px solid #0093ff !important;
-            border-radius: 50px;
-            overflow: hidden;
-          }
-          .is-focus,
-          .el-input__wrapper {
-            box-shadow: none !important;
-          }
+      }
+      .resourceBox{
+        width: 100%;
+        height: 60px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+      }
+      .resourceTab{
+        width:100%;
+        height: 60px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        font-size:16px;
+        .hr{
+          height:25px;
+          background:#DBDBDB !important;
+        }
+        .tabItem:first-child(1){
+          border-right:1px solid #707070;
+        }
+        .tabItem{
+          flex:1;
+          text-align: center;
+          line-height:57px;
+        }
+        .text {
+          width: 43px;
+          height: 3px;
+          margin: 0 auto;
+          background: #0093ff;
+          border-radius: 3px 3px 0px 0px;
+        }
+        .line{
+          height: 3px;
+        }
+      }
+      .inputBox {
+        .custom-input {
+          border: 1px solid #0093ff !important;
+          border-radius: 50px;
+          overflow: hidden;
+        }
+        .is-focus,
+        .el-input__wrapper {
+          box-shadow: none !important;
         }
       }
       .screenBox {

--
Gitblit v1.9.1