ソースを参照

桐艺云校 驾驶舱-5

la 2 年 前
コミット
a49b2b263b
共有4 個のファイルを変更した25 個の追加26 個の削除を含む
  1. 2 1
      src/App.vue
  2. 9 14
      src/pages/home/scrollblock.vue
  3. 5 4
      src/pages/index.vue
  4. 9 7
      src/pages/teacher.vue

+ 2 - 1
src/App.vue

@@ -32,7 +32,8 @@ function routerReplace(path: string) {
       </div>
     </header>
     <div class="w-full flex-grow px-9 pb-6 overflow-y-auto scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-hex-fff6 scrollbar-track-transparent">
-      <router-view class="h-full" />
+      <suspense><router-view class="h-full" /></suspense>
+      
     </div>
   </div>
 </template>

+ 9 - 14
src/pages/home/scrollblock.vue

@@ -1,10 +1,13 @@
 <script setup lang="ts">
 import dialog from '~/assets/img/home/dialog2.png';
+
 const props = defineProps<{
-  packageAll: Array
-}>()
+  packageAll: object,
+
 
+}>()
 
+console.log(props.packageAll,"87654")
 
 // const ZaiXian_XunKe_table = $ref([
 //   ['家乡的古塔', '吴宇荻', '魏筱甜', '/#/zbkt/ssys/content/57'],
@@ -22,13 +25,14 @@ const props = defineProps<{
 // ])
 
 const ZaiXian_XunKe_table = ref('');
+const dialogData = ref()
 
 let scrollTop = $ref(0)
 let timer: number | undefined
 onMounted(() => {
-  ZaiXian_XunKe_table.value=props.packageAll.ZaiXian_XunKe_table
+  ZaiXian_XunKe_table.value = props.packageAll.ZaiXian_XunKe_table;
+  dialogData.value=props.packageAll.dialogData;
   handleMouseLeaveScroll();
-
   
 })
 function handleMouseEnterScroll() {
@@ -61,16 +65,7 @@ let dialogVisible = $ref(false)
 let dialogPage = $ref(0)
 const dialogRef = $ref()
 const buttonRef = $ref()
-const dialogData = $ref([
-  'https://myvod.bozedu.net/sv/1e3b5670-18404cdea41/1e3b5670-18404cdea41.mp4',
-  'https://myvod.bozedu.net/sv/11060231-18404f3730d/11060231-18404f3730d.mp4',
-  'https://myvod.bozedu.net/sv/207af45c-18408bd6126/207af45c-18408bd6126.mp4',
-  'https://myvod.bozedu.net/sv/1e90113d-18408cd28be/1e90113d-18408cd28be.mp4',
-  'https://myvod.bozedu.net/sv/1bfe4cb1-18404fc27fd/1bfe4cb1-18404fc27fd.mp4',
-  'https://myvod.bozedu.net/sv/36ea00ee-18408c431d3/36ea00ee-18408c431d3.mp4',
-  'https://myvod.bozedu.net/sv/3e9a246-18408c8e6b1/3e9a246-18408c8e6b1.mp4',
-  'https://myvod.bozedu.net/sv/399c3fff-18408cf0f7f/399c3fff-18408cf0f7f.mp4',
-])
+
 function handleClickNextpage() {
   dialogPage = (dialogPage + 1) % 2
 }

+ 5 - 4
src/pages/index.vue

@@ -32,14 +32,14 @@ const right_middle_echartsData=ref("")
 const right_bottom_echartsData=ref("")
 const right_bottomSec_echartsData = ref("");
 
-const initData = () => {
+const initData = async () => {
   let  date=new Date;
   let getYear = date.getFullYear();
   let transData = {
     year:getYear
   };
 
-  _request({
+ await  _request({
     headers: {
       'Content-Type': 'application/x-www-form-urlencoded',
     },
@@ -69,7 +69,7 @@ const initData = () => {
     })
   .catch(error=>{console.log(error)})
 }
-initData();
+await initData();
 
 
 </script>
@@ -159,7 +159,8 @@ initData();
 
       <div class="flex justify-between h-240px">
         <blocks :objectPackbage="left_baseShow" class="w-557px border border-hex-0A337E bg-block py-6 px-8 mr-4" />
-        <!-- <scrollblock v-if="onineClass" :packageAll="onineClass" /> -->
+        <!-- :packageAll="onineClass" -->
+        <scrollblock v-if="onineClass" :packageAll="onineClass"  />
       </div>
     </div>
     <div class="h-full flex flex-col justify-between" style="width: 25%;">

+ 9 - 7
src/pages/teacher.vue

@@ -7,6 +7,8 @@ import pie3 from './teacher/pie3.vue'
 const AllResponse = ref('');
 
 const left_top_mainShow = ref('');
+const newTotal1 = ref('');
+
 const left_middle_table = ref('');
 const left_bottom_table = ref('');
 
@@ -28,6 +30,7 @@ const initData = () => {
         AllResponse.value = res.data;
         console.log(res,"alvis")
         left_top_mainShow.value = res.data.left_top_mainShow;
+
         left_middle_table.value =res.data.left_middle_table ;
         left_bottom_table.value =res.data.left_bottom_table ;
 
@@ -46,9 +49,9 @@ initData();
 
 function numTrans(num) {
   let newNum = converToArray(num)
-  if (newNum.length < 7) {
+  if (newNum.length < 4) {
     const zero = []
-    for (let i = 0; i < 7 - newNum.length; i++)
+    for (let i = 0; i < 4 - newNum.length; i++)
       zero.push(0)
 
     newNum = [...zero, ...newNum]
@@ -69,12 +72,11 @@ const converToArray = number => [...`${number}`].map(el => parseInt(el))
         <div class="flex flex-row justify-between ">
           <div v-for="(item,index) in left_top_mainShow" :key="index" >
             <h4 class="text-lg font-medium">{{ item.title }}</h4>
-            <!-- <div class="border-blue-500/50  text-4xl mt-2">{{ item.detailNum }}</div> -->
+            <!-- <div class="border-blue-500/50  text-4xl mt-2 splitNum">
+              <span class="bg-block" v-for="n in newTotal1">{{n}}</span>
+            </div> -->
             <div class="border-blue-500/50  text-4xl mt-4 splitNum">
-              <span class="bg-block">0</span>
-              <span class="bg-block">1</span>
-              <span class="bg-block">1</span>
-              <span class="bg-block">1</span>
+              <span class="bg-block">{{ item.detailNum }}</span>
             </div>
           </div>
         </div>