From 621b71bb1cc0dc383db1e4b89c9413bb9925b231 Mon Sep 17 00:00:00 2001
From: litian <2804272236@qq.com>
Date: 星期三, 20 十一月 2024 16:54:32 +0800
Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/TextbookReader

---
 src/views/readerPages/webHome.vue |   66 +++++++++++++++++++++++++-------
 1 files changed, 51 insertions(+), 15 deletions(-)

diff --git a/src/views/readerPages/webHome.vue b/src/views/readerPages/webHome.vue
index e5858b5..910d53b 100644
--- a/src/views/readerPages/webHome.vue
+++ b/src/views/readerPages/webHome.vue
@@ -12,6 +12,9 @@
         <div v-else>
           <div class="layout hover" @click="goLogin">鐧诲綍</div>
         </div>
+        <!-- <div>
+          <div class="layout hover" @click="openFormulaDialog">鍏紡</div>
+        </div> -->
       </div>
     </div>
     <div class="contentBox">
@@ -396,7 +399,7 @@
                             class="icon hover"
                             size="20"
                             @click="JumpPosition(item)"
-                            v-if="resourceType == 'default'"
+                            v-if="item.pagination"
                           >
                             <LocationInformation />
                           </el-icon>
@@ -432,18 +435,20 @@
                           >
                             <View />
                           </el-icon>
+                          <!-- 鍏朵粬绫诲瀷棰勮鎴栫洿鎺ヤ笅杞� -->
+                          <el-icon
+                            @click="goPlay(item)"
+                            size="20"
+                            class="icon hover"
+                            v-if="item.resourceType != '瑙嗛' && item.resourceType != '闊抽' && item.resourceType != '鍥剧墖'"
+                          >
+                            <View />
+                          </el-icon>
                           <el-icon
                             size="20"
                             class="icon hover"
-                            @click="goPlay(item)"
-                            v-if="
-                              !(
-                                item.resourceType == '瑙嗛' ||
-                                item.resourceType == '闊抽' ||
-                                item.resourceType == '涔犻' ||
-                                item.resourceType == '鍥剧墖'
-                              ) && item.isDownload == '鏄�'
-                            "
+                            @click="goDownload(item)"
+                            v-if="item.isDownload == '鏄�'"
                           >
                             <Download />
                           </el-icon>
@@ -1277,6 +1282,16 @@
       <wrongQuestion />
     </div>
   </el-dialog>
+  <el-dialog
+    title="鍏紡缂栬緫"
+    align-center
+    v-model="formulaDialog"
+    class="myDialogs"
+  >
+    <div class="wendabox">
+      <formula />
+    </div>
+  </el-dialog>
   <!-- 绛旈鍣� -->
   <examination
     ref="examinationRef"
@@ -1287,7 +1302,8 @@
   />
   <!-- 璁$畻鍣� -->
   <el-dialog title="璁$畻鍣�" align-center v-model="calculatorVisble" width="850" class="myDialogs">
-    <calculatorNew></calculatorNew>
+    <!-- <calculatorNew></calculatorNew> -->
+    <iframe src="https://www.geogebra.org/scientific" frameborder="0" class="iframe-box"></iframe>
   </el-dialog>
 </template>
 <script setup lang="ts">
@@ -1306,6 +1322,7 @@
 import moment from 'moment'
 import dictionary from '@/views/components/dictionary.vue'
 import newWord from '@/views/components/newWord.vue'
+import formula from '@/views/components/formula.vue'
 import wrongQuestion from '@/views/components/wrongQuestion.vue'
 import voiceReader from '@/views/components/voiceReader.vue'
 import logo from '@/assets/images/header/logo.png'
@@ -1783,8 +1800,8 @@
     {
       icon: huabi,
       name: '鐢荤瑪',
-      // isShow: bookConfig.value.textbookComponents.indexOf('800109C0') > -1
-      isShow: true
+      isShow: bookConfig.value.textbookComponents.indexOf('800109C0') > -1
+      // isShow: true
     },
     {
       icon: baiban,
@@ -2030,7 +2047,7 @@
             if (!activeClassify.value) {
               activeClassify.value = classifySelectList.value[0].key
               defaultResourceList.value.forEach((resItem1) => {
-                if (resItem1.resourceType == classifySelectList.value[0].title) {
+                if (resItem1.resourceType != '鍥剧墖' && resItem1.resourceType != '瑙嗛' && resItem1.resourceType != '闊抽') {
                   resourceDataList.value.push(resItem1)
                 }
               })
@@ -2104,7 +2121,7 @@
             if (!activeClassify.value) {
               activeClassify.value = classifySelectList.value[0].key
               teacherResourceList.value.forEach((resItem1) => {
-                if (resItem1.resourceType == classifySelectList.value[0].title) {
+                if (resItem1.resourceType != '鍥剧墖' && resItem1.resourceType != '瑙嗛' && resItem1.resourceType != '闊抽') {
                   resourceDataList.value.push(resItem1)
                 }
               })
@@ -2168,6 +2185,13 @@
   //   testWord.value = bookConfig.value.resourceUrl + '/' + data.resourcePath
   // }
 }
+const goDownload =(data) =>{
+  if (data.md5) {
+    window.open(bookConfig.value.requestCtx + '/file/api/ApiDownload?md5=' + data.md5)
+  } else if (data.resourcePath) {
+    window.open(bookConfig.value.resourceUrl + '/' + data.resourcePath)
+  }
+}
 // 鍏抽棴瑙嗛
 const resourVisbleClose = () => {
   resourVisble.value = false
@@ -2194,6 +2218,9 @@
 //璧勬簮绫诲瀷閫夋嫨榛樿/鏁欏笀
 const selectResourceType = (type) => {
   resourceType.value = type
+  resourceDataList.value = []
+  classifySelectList.value = []
+  activeClassify.value = ''
   searchText.value = ''
   if (type == 'collect') {
     getCollectResource()
@@ -4118,6 +4145,11 @@
     })
   }
 }
+
+const formulaDialog = ref(false)
+const openFormulaDialog = () => {
+  formulaDialog.value = true
+}
 </script>
 
 <style lang="less">
@@ -5391,4 +5423,8 @@
   bottom: 30px;
   left: 50px;
 }
+.iframe-box {
+  width:100%;
+  height: 800px;
+}
 </style>

--
Gitblit v1.9.1