la 2 years ago
parent
commit
c8732ffcb0

+ 0 - 2
src/pages/home/bar1.vue

@@ -35,8 +35,6 @@ onMounted(() => {
         ['8月', 300, 0, 0],
         ['9月', 280, 180, 280],
         ['10月', 250, 300, 270],
-        // ['11月', 260, 400, 370],
-        // ['12月', 280, 180, 280],
       ],
     },
     xAxis: {

+ 0 - 2
src/pages/home/radars.vue

@@ -37,7 +37,6 @@ onMounted(() => {
         { name: '创意实践', max: 100 },
         { name: '审美判断', max: 100 },
       ],
-
       center: ['50%', '57%'],
       radius: '70%',
     },
@@ -67,7 +66,6 @@ onMounted(() => {
         },
       ],
     }],
-
   })
 })
 </script>

+ 16 - 4
src/pages/index.vue

@@ -11,10 +11,22 @@ import line3 from './home/line3.vue';
 import blocks from './home/blocks.vue'
 
 
-
-
-
-
+const baseInfo = ref({
+  allSchoolNum: 40,
+  allCitySchoolNum: 1326,
+  linkSchool: 12,
+  outlinkSchool: 3,
+  linkTeacher: 75,
+  outLinkTeacher: 20,
+  lackschool: 7,
+  lackschoolPercent:"17.5%",
+  lackClassNum: 327,
+  lackClassNumPercent:"24.6%",
+  linkClass: 60,
+  outLinkClass: 14,
+  linkStudentNum: 2480,
+  outLinkStudentNum:144,
+})
 
 </script>
 

+ 3 - 3
src/pages/school.vue

@@ -1,8 +1,8 @@
 <script setup lang="ts">
-import ysl from '~/assets/img/school/ysl.png'
+import _request from '../utils/request';
 import cone from './school/cone.vue';
 
-// import { userDetail } from './home/apiItem';
+import { userDetail } from './school/apiItem';
 
 
 // 二级分校基本情况
@@ -46,7 +46,7 @@ const initData = () => {
     })
   .catch(error=>{console.log(error)})
 }
-// initData();
+initData();
 
 
 

+ 1 - 1
src/pages/apiItem.js

@@ -1,4 +1,4 @@
-import { _request } from '../../utils/request.ts'
+import _request from '../../utils/request'
 
 export const userDetail = (data = {}) =>
 _request({

+ 1 - 1
src/pages/student.vue

@@ -20,7 +20,7 @@ const secSchollWeekArtTitle = ref(["序号", "作品名称", "作者", "班级",
 const secSchollWeekArtContent = ref([
   {a1:1, a2: "家乡的古塔", a3: "流年", a4: 601, a5: "世纪路学校", a6: "李爱国", a7: 930, a8: 348 },
   {a1:2, a2: "戏曲人物", a3: "流年", a4: 401, a5: "世纪路学校", a6: "李爱国", a7: 930, a8: 348 },
-  {a1:3, a2: "为自己的书设计封面", a3: "流年", a4: 402, a5: "世纪路学校", a6: "李爱国", a7: 930, a8: 348 },
+  {a1:3, a2: "设计封面", a3: "流年", a4: 402, a5: "世纪路学校", a6: "李爱国", a7: 930, a8: 348 },
   {a1:4, a2: "窗外的风景", a3: "流年", a4: 602, a5: "世纪路学校", a6: "李爱国", a7: 930, a8: 348 },
   {a1:5, a2: "色彩的世界", a3: "流年", a4: 601, a5: "世纪路学校", a6: "李爱国", a7: 930, a8: 348 },
 ])

+ 35 - 3
src/pages/teacher.vue

@@ -3,7 +3,6 @@ import pie1 from './teacher/pie1.vue'
 import pie2 from './teacher/pie2.vue'
 import pie3 from './teacher/pie3.vue'
 
-import top from '~/assets/img/teacher/top.png'
 
 const baseInfo = ref([
   {
@@ -41,6 +40,25 @@ const secSchollTeacher2Content = ref([
   { a1: "花花", a2: 26, a3: 8, a4: 5,a5:5, },
 ])
 
+
+// newTotal = numTrans(res.data.school_base_data.yhgmData.total)
+
+function numTrans(num) {
+  let newNum = converToArray(num)
+  if (newNum.length < 7) {
+    const zero = []
+    for (let i = 0; i < 7 - newNum.length; i++)
+      zero.push(0)
+
+    newNum = [...zero, ...newNum]
+    // return [...zero, ...newNum]
+  }
+  return newNum
+}
+const converToArray = number => [...`${number}`].map(el => parseInt(el))
+
+
+
 </script>
 
 <template>
@@ -50,7 +68,13 @@ const secSchollTeacher2Content = ref([
         <div class="flex flex-row justify-between ">
           <div v-for="(item,index) in baseInfo" :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">{{ item.detailNum }}</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>
+            </div>
           </div>
         </div>
       </div>
@@ -86,7 +110,6 @@ const secSchollTeacher2Content = ref([
           </div>
         </div>
       </div>
-      <img :src="top" alt="">
     </div>
     <div class="w-960px flex flex-col justify-between" style="width:50%;">
       <div class="w-full h-300px flex flex-col border border-hex-0A337E bg-block p-6">
@@ -161,4 +184,13 @@ const secSchollTeacher2Content = ref([
   text-align: center;
 }
 
+.splitNum span{
+  border: 2px solid rgba(35,188,248,1 );
+  border-image-source: linear-gradient(135deg, #23BEFA, #0358C1);
+  border-image-slice: 1;
+  border-image-repeat: stretch;
+  padding:2px 5px;
+  margin-right: 3px;
+  background-color: rgba(11,39,146,0.3);
+}
 </style>

+ 1 - 1
src/pages/teacher/pie1.vue

@@ -106,7 +106,7 @@ onMounted(() => {
 <template>
   <div class="flex flex-col w-full h-full">
     <div ref="chartRef" class="w-full h-full flex-grow" />
-    <div class="w-full flex">
+    <div class="w-full flex mt-2">
       <div v-for="name in option.series.map(({ name }) => name)" :key="name" class="flex_center flex-auto text-sm">
         {{ name }}
       </div>

+ 1 - 1
src/pages/teacher/pie2.vue

@@ -107,7 +107,7 @@ onMounted(() => {
 <template>
   <div class="flex flex-col w-full h-full">
     <div ref="chartRef" class="w-full h-full flex-grow" />
-    <div class="w-full flex">
+    <div class="w-full flex mt-2">
       <div v-for="name in option.series.map(({ name }) => name)" :key="name" class="flex_center flex-auto text-sm">
         {{ name }}
       </div>

+ 1 - 1
src/pages/teacher/pie3.vue

@@ -87,7 +87,7 @@ onMounted(() => {
 <template>
   <div class="flex flex-col w-full h-full">
     <div ref="chartRef" class="w-full h-full flex-grow" />
-    <div class="w-full flex">
+    <div class="w-full flex mt-2">
       <div v-for="name in option.series.map(({ name }) => name)" :key="name" class="flex_center flex-auto text-sm">
         {{ name }}
       </div>

+ 17 - 0
src/pages/teaching.vue

@@ -1,4 +1,5 @@
 <script setup lang="ts">
+import _request from '../utils/request';
 import liquidfill from './teaching/liquidfill.vue';
 import pie from './teaching/pie.vue';
 import stackLine from './teaching/stackLine.vue'
@@ -23,6 +24,22 @@ const secSchollOpenClassContent = ref([
   { a1: "开课课时数", a2: 2, a3: 12, a4: 16, a5: 50, a6:216 },
   { a1: "参与教师数", a2: 6, a3: 28, a4: 32,a5: 76, a6:189 },
 ])
+const initData = () => {
+  _request({
+    baseURL:"https://jsonplaceholder.typicode.com",
+    url: '/posts',
+    data:{},
+  })
+    .then(res => {
+    console.log(res,"987978")
+    })
+  .catch(error=>{console.log(error)})
+}
+initData();
+
+
+
+
 
 </script>
 

+ 2 - 1
src/utils/request.ts

@@ -4,7 +4,8 @@ import { showFailToast } from 'vant';
 import { token } from '~/store/index'
 
 const _request = axios.create({
-  baseURL: window.GLOBAL_CONFIG.api,
+  // baseURL: window.GLOBAL_CONFIG.api,
+  baseURL:"https://jsonplaceholder.typicode.com",
   timeout: 3 * 1000,
   headers: {
     'Content-Type': 'application/x-www-form-urlencoded',