Quellcode durchsuchen

驾驶舱接入接口

la vor 2 Jahren
Ursprung
Commit
464f1908a7

+ 17 - 12
src/pages/home/bar1.vue

@@ -1,11 +1,15 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 
+const props = defineProps<{
+  ecahrtsData: object
+}>()
+
 const chartRef = ref()
 onMounted(() => {
   echarts.init(chartRef.value).setOption({
     title: {
-      text: '线上教研活动',
+      text: props.ecahrtsData.title_text,
       textStyle: {
         color: '#fff',
       },
@@ -25,17 +29,18 @@ onMounted(() => {
     },
     color: ['#11a597', '#ff8366', '#5f54ef'],
     dataset: {
-      source: [
-        ['date', '在线学习', '协同备课', '同步教研'],
-        ['3月', 180, 280, 320],
-        ['4月', 260, 210, 270],
-        ['5月', 280, 180, 280],
-        ['6月', 260, 180, 280],
-        ['7月', 310, 0, 0],
-        ['8月', 300, 0, 0],
-        ['9月', 280, 180, 280],
-        ['10月', 250, 300, 270],
-      ],
+      source:props.ecahrtsData.dataset_source
+      // source: [
+      //   ['date', '在线学习', '协同备课', '同步教研'],
+      //   ['3月', 180, 280, 320],
+      //   ['4月', 260, 210, 270],
+      //   ['5月', 280, 180, 280],
+      //   ['6月', 260, 180, 280],
+      //   ['7月', 310, 0, 0],
+      //   ['8月', 300, 0, 0],
+      //   ['9月', 280, 180, 280],
+      //   ['10月', 250, 300, 270],
+      // ],
     },
     xAxis: {
       type: 'category',

+ 6 - 6
src/pages/home/bar2.vue

@@ -1,11 +1,15 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 
+const props = defineProps<{
+  ecahrtsData: object
+}>()
+
 const chartRef = ref()
 onMounted(() => {
   echarts.init(chartRef.value).setOption({
     title: {
-      text: '结对教师数',
+      text: props.ecahrtsData.title_text,
       textStyle: {
         color: '#fff',
       },
@@ -25,11 +29,7 @@ onMounted(() => {
     },
     color: ['#ff8366', '#5f54ef'],
     dataset: {
-      source: [
-        ['date', '客座名师', '全科教师'],
-        ['2022年3月', 22, 37],
-        ['2022年9月', 45, 58],
-      ],
+      source: props.ecahrtsData.dataset_source,
     },
     xAxis: {
       type: 'category',

+ 23 - 1
src/pages/home/geoblock.vue

@@ -1,5 +1,6 @@
 <script setup lang="ts">
-import { list } from './componsables/geoblock'
+// import { list } from './componsables/geoblock'
+
 import dialog from '~/assets/img/home/dialog.png'
 import geo from '~/assets/img/home/geo.png'
 
@@ -7,6 +8,27 @@ import sign_blue from '~/assets/img/home/blue.png'
 import sign_yellow from '~/assets/img/home/yellow.png'
 import sign_red from '~/assets/img/home/red.png'
 
+const props = defineProps<{
+  list_red: Array,
+  list_yellow:Array,
+  list_blue:Array
+
+}>()
+
+const list = ref('');
+onMounted(() => {
+  let list_red = props.list_red;
+  let list_yellow =props.list_yellow;
+  let list_blue=props.list_blue;
+
+ list.value = [
+  ...list_red,
+  ...list_yellow,
+  ...list_blue,
+].map((_, idx) => Object.assign({ idx }, _))
+})
+
+
 function getPosStr(item: any) {
   return {
     left: `${item.pos.x - 14}px`,

+ 7 - 3
src/pages/home/line1.vue

@@ -1,6 +1,10 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 
+const props = defineProps<{
+  ecahrtsData: object
+}>()
+
 const chartRef = ref()
 onMounted(() => {
   echarts.init(chartRef.value).setOption({
@@ -24,7 +28,7 @@ onMounted(() => {
     {
       type: 'category',
       boundaryGap: false,
-      data: ['2021年9月', '2021年10月', '2021年11月', '2021年12月','2022年1月', '2022年2月', '2022年3月', '2022年4月','2022年5月', '2022年6月', '2022年7月', '2022年8月']
+      data: props.ecahrtsData.xAxis_data
     }
   ],
   yAxis: [
@@ -37,7 +41,7 @@ onMounted(() => {
   ],
   series: [
     {
-      name: '覆盖率(%)',
+      name: props.ecahrtsData.series_name,
       type: 'line',
       stack: 'Total',
       smooth: true,
@@ -61,7 +65,7 @@ onMounted(() => {
       emphasis: {
         focus: 'series'
       },
-      data: [1.3, 3.02, 3, 2,5, 1.6, 2.7, 3,7, 3, 5, 3]
+      data: props.ecahrtsData.series_data
     },
   ]
 })

+ 7 - 3
src/pages/home/line2.vue

@@ -1,6 +1,10 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 
+const props = defineProps<{
+  ecahrtsData: object
+}>()
+
 const chartRef = ref()
 onMounted(() => {
   echarts.init(chartRef.value).setOption({
@@ -24,7 +28,7 @@ onMounted(() => {
     {
       type: 'category',
       boundaryGap: false,
-      data: ['2021年9月', '2021年10月', '2021年11月', '2021年12月','2022年1月', '2022年2月', '2022年3月', '2022年4月','2022年5月', '2022年6月', '2022年7月', '2022年8月']
+      data: props.ecahrtsData.xAxis_data
     }
   ],
   yAxis: [
@@ -36,7 +40,7 @@ onMounted(() => {
   ],
   series: [
     {
-      name: '贡献度(%)',
+      name: props.ecahrtsData.series_name,
       type: 'line',
       stack: 'Total',
       smooth: true,
@@ -60,7 +64,7 @@ onMounted(() => {
       emphasis: {
         focus: 'series'
       },
-      data: [1.3, 3.02, 3, 2,5, 1.6, 2.7, 3,7, 3, 5, 3]
+      data: props.ecahrtsData.series_data
     },
   ]
 })

+ 8 - 3
src/pages/home/line3.vue

@@ -1,6 +1,11 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 
+
+const props = defineProps<{
+  ecahrtsData: object
+}>()
+
 const chartRef = ref()
 onMounted(() => {
   echarts.init(chartRef.value).setOption({
@@ -24,7 +29,7 @@ onMounted(() => {
     {
       type: 'category',
       boundaryGap: false,
-      data: ['2021年9月', '2021年10月', '2021年11月', '2021年12月','2022年1月', '2022年2月', '2022年3月', '2022年4月','2022年5月', '2022年6月', '2022年7月', '2022年8月']
+      data: props.ecahrtsData.xAxis_data
     }
   ],
   yAxis: [
@@ -37,7 +42,7 @@ onMounted(() => {
   ],
   series: [
     {
-      name: '应用度(%)',
+      name: props.ecahrtsData.series_name,
       type: 'line',
       stack: 'Total',
       smooth: true,
@@ -61,7 +66,7 @@ onMounted(() => {
       emphasis: {
         focus: 'series'
       },
-      data: [1.3, 3.02, 3, 2,5, 1.6, 2.7, 3,7, 3, 5, 3]
+      data: props.ecahrtsData.series_data
     },
   ]
 })

+ 3 - 9
src/pages/home/radars.vue

@@ -1,18 +1,12 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 
-interface PropsType {
-  ecahrtsData: Object
-}
-const props = withDefaults(defineProps<PropsType>(), {
-  ecahrtsData: '' 
-});
-
-
+const props = defineProps<{
+  ecahrtsData: object
+}>()
 
 const chartRef = ref()
 onMounted(() => {
-  console.log(props.ecahrtsData,"9999")
   echarts.init(chartRef.value).setOption({
     title: {
       text: props.ecahrtsData.title_text,

+ 21 - 21
src/pages/home/scrollblock.vue

@@ -1,34 +1,34 @@
 <script setup lang="ts">
+import dialog from '~/assets/img/home/dialog2.png';
+const props = defineProps<{
+  packageAll: Array
+}>()
 
-interface PropsType{
-  objectPackbageOne:Array
-}
-withDefaults(defineProps<PropsType>(), {
-  objectPackbageOne:"",
-})
 
-import dialog from '~/assets/img/home/dialog2.png';
 
-const ZaiXian_XunKe_table = $ref([
-  ['家乡的古塔', '吴宇荻', '魏筱甜', '/#/zbkt/ssys/content/57'],
-  ['戏曲人物', '谢秋丽', '徐文欣', '/#/zbkt/ssys/content/58'],
-  ['江南民居', '', '', '/#/zbkt/ssys/content/59'],
-  ['为自己的书设计封面', '孙菲菲', '杨其华', '/#/zbkt/ssys/content/60'],
-  ['家乡的古塔', '吴敏', '赵依静', '/#/zbkt/ssys/content/61'],
-  ['西湖十景', '', '', '/#/zbkt/ssys/content/62'],
-  ['窗外的风景', '陈艳', '孙涛杰', '/#/zbkt/ssys/content/63'],
-  ['色彩的世界', '王晓庆', '吴乾斌', '/#/zbkt/ssys/content/64'],
-  ['为自己的书设计封面', '孙霏霏', '杨其华', '/#/zbkt/ssys/content/65'],
-  ['窗外的风景', '陈艳', '孙涛杰', '/#/zbkt/ssys/content/66'],
-  ['窗外的风景', '谢秋丽', '沈小花', '/#/zbkt/ssys/content/68'],
-  ['为自己的书设计封面', '孙霏霏', '胡娟', '/#/zbkt/ssys/content/70'],
-])
+// const ZaiXian_XunKe_table = $ref([
+//   ['家乡的古塔', '吴宇荻', '魏筱甜', '/#/zbkt/ssys/content/57'],
+//   ['戏曲人物', '谢秋丽', '徐文欣', '/#/zbkt/ssys/content/58'],
+//   ['江南民居', '', '', '/#/zbkt/ssys/content/59'],
+//   ['为自己的书设计封面', '孙菲菲', '杨其华', '/#/zbkt/ssys/content/60'],
+//   ['家乡的古塔', '吴敏', '赵依静', '/#/zbkt/ssys/content/61'],
+//   ['西湖十景', '', '', '/#/zbkt/ssys/content/62'],
+//   ['窗外的风景', '陈艳', '孙涛杰', '/#/zbkt/ssys/content/63'],
+//   ['色彩的世界', '王晓庆', '吴乾斌', '/#/zbkt/ssys/content/64'],
+//   ['为自己的书设计封面', '孙霏霏', '杨其华', '/#/zbkt/ssys/content/65'],
+//   ['窗外的风景', '陈艳', '孙涛杰', '/#/zbkt/ssys/content/66'],
+//   ['窗外的风景', '谢秋丽', '沈小花', '/#/zbkt/ssys/content/68'],
+//   ['为自己的书设计封面', '孙霏霏', '胡娟', '/#/zbkt/ssys/content/70'],
+// ])
 
+const ZaiXian_XunKe_table = ref('');
 
 let scrollTop = $ref(0)
 let timer: number | undefined
 onMounted(() => {
+  ZaiXian_XunKe_table.value=props.packageAll.ZaiXian_XunKe_table
   handleMouseLeaveScroll();
+
   
 })
 function handleMouseEnterScroll() {

+ 49 - 26
src/pages/index.vue

@@ -1,29 +1,42 @@
 <script setup lang="ts">
 
 import _request from '../utils/request';
+import radars from './home/radars.vue';
+import bar1 from './home/bar1.vue';
 
-import scrollblock from './home/scrollblock.vue';
 import geoblock from './home/geoblock.vue';
-import bar1 from './home/bar1.vue';
+
+import blocks from './home/blocks.vue'
+import scrollblock from './home/scrollblock.vue';
+
 import bar2 from './home/bar2.vue';
-import radars from './home/radars.vue';
+
 import line1 from './home/line1.vue';
 import line2 from './home/line2.vue';
 import line3 from './home/line3.vue';
 
-import blocks from './home/blocks.vue'
 
 const AllResponse = ref('');
 
-const left_top_ecahrtsData = ref({});
+const left_top_ecahrtsData = ref("");
+const left_bottom_ecahrtsData = ref("");
 
 const middle_top_data = ref({})
+const middle_middle_data = ref('');
+
 const left_baseShow = ref({});
 const onineClass=ref({})
 
+const right_top_echartsData=ref("")
+const right_middle_echartsData=ref("")
+const right_bottom_echartsData=ref("")
+const right_bottomSec_echartsData = ref("");
+
 const initData = () => {
+  let  date=new Date;
+  let getYear = date.getFullYear();
   let transData = {
-    year:'2023'
+    year:getYear
   };
 
   _request({
@@ -35,14 +48,23 @@ const initData = () => {
     data:transData,
   })
     .then(res => {
-      if (res.code == "1") {
+      if (res.code == '1') {
         AllResponse.value = res.data;
-        left_top_ecahrtsData.value=res.data.left_top_ecahrtsData
-
+        console.log(res,"67567");
+        left_top_ecahrtsData.value = res.data.left_top_ecahrtsData;
+        left_bottom_ecahrtsData.value = res.data.left_bottom_ecahrtsData;
 
         middle_top_data.value = res.data.middle_top_data;
+        middle_middle_data.value = res.data.middle_middle_data;
+
         left_baseShow.value = res.data.middle_bottom_data.left_baseShow;
         onineClass.value = res.data.middle_bottom_data.onineClass;
+
+        right_top_echartsData.value = res.data.right_top_echartsData;
+
+        right_middle_echartsData.value = res.data.right_middle_echartsData;
+        right_bottom_echartsData.value = res.data.right_bottom_echartsData;
+        right_bottomSec_echartsData.value=res.data.right_bottomSec_echartsData;
       }
     })
   .catch(error=>{console.log(error)})
@@ -56,10 +78,10 @@ initData();
   <div class="flex justify-between">
     <div class="h-full flex flex-col justify-between" style="width: 25%;">
       <div class="border border-hex-0A337E bg-block p-4  h-1/2">
-        <radars :ecahrtsData="left_top_ecahrtsData" />
+        <radars v-if="left_top_ecahrtsData"  :ecahrtsData="left_top_ecahrtsData" />
       </div>
       <div class="border border-hex-0A337E bg-block mt-4 h-1/2">
-        <bar1 />
+        <bar1 v-if="left_bottom_ecahrtsData" :ecahrtsData="left_bottom_ecahrtsData" />
       </div>
     </div>
     <div class="flex flex-col justify-between " style="width: 48%;">
@@ -132,37 +154,38 @@ initData();
           </div>
         </div>
       </div>
-      <geoblock />
+
+      <geoblock v-if="middle_middle_data" :list_blue="middle_middle_data.list_blue" :list_yellow="middle_middle_data.list_yellow" :list_red="middle_middle_data.list_red" />
 
       <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 :objectPackbageOne="onineClass.ZaiXian_XunKe_table" />
+        <!-- <scrollblock v-if="onineClass" :packageAll="onineClass" /> -->
       </div>
     </div>
     <div class="h-full flex flex-col justify-between" style="width: 25%;">
       <div class="border border-hex-0A337E bg-block p-4 mb-4 h-1/4">
-        <bar2 />
+        <bar2 v-if="right_top_echartsData" :ecahrtsData="right_top_echartsData"  />
       </div>
       <div class="border border-hex-0A337E bg-block mb-4 h-1/4">
-        <div class="w-full flex flex-row justify-between p-2">
-          <div class="left_1">覆盖率·参与或者结对班级覆盖率</div>
-          <div class="left_2">1.0728%</div>
+        <div class="w-full flex flex-row justify-between p-2" v-if="right_middle_echartsData.baseTitleObj">
+          <div class="left_1">{{ right_middle_echartsData.baseTitleObj.titleShow}}</div>
+          <div class="left_2">{{ right_middle_echartsData.baseTitleObj.pencent }}</div>
         </div>
-        <line1 />
+        <line1 v-if="right_middle_echartsData" :ecahrtsData="right_middle_echartsData" />
       </div>
-      <div class="border border-hex-0A337E bg-block mb-4 h-1/4">
+      <div class="border border-hex-0A337E bg-block mb-4 h-1/4" v-if="right_bottom_echartsData.baseTitleObj">
         <div class="w-full flex flex-row justify-between p-2">
-          <div class="left_1">贡献度·教师周人均开课数</div>
-          <div class="left_2">0.1%</div>
+          <div class="left_1">{{ right_bottom_echartsData.baseTitleObj.titleShow}}</div>
+          <div class="left_2">{{ right_bottom_echartsData.baseTitleObj.pencent }}</div>
         </div>
-        <line2 />
+        <line2 v-if="right_bottom_echartsData" :ecahrtsData="right_bottom_echartsData" />
       </div>
-      <div class="border border-hex-0A337E bg-block mb-4 h-1/4">
+      <div class="border border-hex-0A337E bg-block mb-4 h-1/4" v-if="right_bottomSec_echartsData.baseTitleObj">
         <div class="w-full flex flex-row justify-between p-2">
-          <div class="left_1">应用度·班级周均上课次数</div>
-          <div class="left_2">0.3%</div>
+          <div class="left_1">{{ right_bottomSec_echartsData.baseTitleObj.titleShow }}</div>
+          <div class="left_2">{{ right_bottomSec_echartsData.baseTitleObj.pencent }}</div>
         </div>
-        <line3 />
+        <line3 v-if="right_bottomSec_echartsData" :ecahrtsData="right_bottomSec_echartsData" />
       </div>
     </div>
   </div>

+ 80 - 57
src/pages/school.vue

@@ -4,45 +4,66 @@ import cone from './school/cone.vue';
 
 import { userDetail } from './school/apiItem';
 
+const AllResponse = ref("");
+
+const left_coneEchartsData = ref("");
+const left_bottom_table = ref("");
+const right_top_table = ref("");
+const right_bottom_table = ref("");
 
 // 二级分校基本情况
-const secScholltableTitle = ref(["二级分校", "结对学校数量", "结对教师数量", "结对班级数量", "开课数量", "资源贡献数量", "线上教研次数", "覆盖学生数量"]);
-const secSchollTableContent = ref([
-  { schollName: "尚阳学校", linkNum: 1, linkTeacherNum: 2, linkClassMates: 3, startClassNum: 2, resourceControNum: 4, onlineTeachNum: 3, coverStudentNum: 120 },
-  { schollName: "振东小校", linkNum: 1, linkTeacherNum: 2, linkClassMates: 3, startClassNum: 2, resourceControNum: 4, onlineTeachNum: 3, coverStudentNum: 120 },
-  { schollName: "尚阳学校", linkNum: 1, linkTeacherNum: 2, linkClassMates: 3, startClassNum: 2, resourceControNum: 4, onlineTeachNum: 3, coverStudentNum: 120 },
-  { schollName: "振东小校", linkNum: 1, linkTeacherNum: 2, linkClassMates: 3, startClassNum: 2, resourceControNum: 4, onlineTeachNum: 3, coverStudentNum: 120 },
-  { schollName: "尚阳学校", linkNum: 1, linkTeacherNum: 2, linkClassMates: 3, startClassNum: 2, resourceControNum: 4, onlineTeachNum: 3, coverStudentNum: 120 },
-  { schollName: "振东小校", linkNum: 1, linkTeacherNum: 2, linkClassMates: 3, startClassNum: 2, resourceControNum: 4, onlineTeachNum: 3, coverStudentNum: 120 }
-])
+// const secScholltableTitle = ref(["二级分校", "结对学校数量", "结对教师数量", "结对班级数量", "开课数量", "资源贡献数量", "线上教研次数", "覆盖学生数量"]);
+// const secSchollTableContent = ref([
+//   { schollName: "尚阳学校", linkNum: 1, linkTeacherNum: 2, linkClassMates: 3, startClassNum: 2, resourceControNum: 4, onlineTeachNum: 3, coverStudentNum: 120 },
+//   { schollName: "振东小校", linkNum: 1, linkTeacherNum: 2, linkClassMates: 3, startClassNum: 2, resourceControNum: 4, onlineTeachNum: 3, coverStudentNum: 120 },
+//   { schollName: "尚阳学校", linkNum: 1, linkTeacherNum: 2, linkClassMates: 3, startClassNum: 2, resourceControNum: 4, onlineTeachNum: 3, coverStudentNum: 120 },
+//   { schollName: "振东小校", linkNum: 1, linkTeacherNum: 2, linkClassMates: 3, startClassNum: 2, resourceControNum: 4, onlineTeachNum: 3, coverStudentNum: 120 },
+//   { schollName: "尚阳学校", linkNum: 1, linkTeacherNum: 2, linkClassMates: 3, startClassNum: 2, resourceControNum: 4, onlineTeachNum: 3, coverStudentNum: 120 },
+//   { schollName: "振东小校", linkNum: 1, linkTeacherNum: 2, linkClassMates: 3, startClassNum: 2, resourceControNum: 4, onlineTeachNum: 3, coverStudentNum: 120 }
+// ])
 
 //二级分校月考核数据表
-const secSchollYKTitle = ref(["学校", "硬件设施", "辐射范围", "教学管理", "教研活动", "教学效果", "总分"]);
-const secSchollYKContent = ref([
-  { a1: "尚阳学校", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4, a7: 3 },
-  { a1: "振东小校", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4, a7: 3 },
-  { a1: "尚阳学校", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4, a7: 3 },
-  { a1: "振东小校", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4, a7: 3 },
-  { a1: "尚阳学校", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4, a7: 3 },
-  { a1: "振东小校", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4, a7: 3 }
-])
+// const secSchollYKTitle = ref(["学校", "硬件设施", "辐射范围", "教学管理", "教研活动", "教学效果", "总分"]);
+// const secSchollYKContent = ref([
+//   { a1: "尚阳学校", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4, a7: 3 },
+//   { a1: "振东小校", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4, a7: 3 },
+//   { a1: "尚阳学校", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4, a7: 3 },
+//   { a1: "振东小校", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4, a7: 3 },
+//   { a1: "尚阳学校", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4, a7: 3 },
+//   { a1: "振东小校", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4, a7: 3 }
+// ])
 
 
 //受援学校月考核数据表
-const secSchollSupportTitle = ref(["学校", "硬件设施", "教学管理", "教研活动", "教学效果", "总分"]);
-const secSchollSupportContent = ref([
-  { a1: "河山", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4},
-  { a1: "大麻", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4},
-  { a1: "东方", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4},
-  { a1: "河山", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4},
-  { a1: "大麻", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4},
-  { a1: "东方", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4},
-])
+// const secSchollSupportTitle = ref(["学校", "硬件设施", "教学管理", "教研活动", "教学效果", "总分"]);
+// const secSchollSupportContent = ref([
+//   { a1: "河山", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4},
+//   { a1: "大麻", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4},
+//   { a1: "东方", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4},
+//   { a1: "河山", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4},
+//   { a1: "大麻", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4},
+//   { a1: "东方", a2: 1, a3: 2, a4: 3, a5: 2, a6: 4},
+// ])
+
 
 const initData = () => {
-  userDetail()
+  _request({
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded',
+    },
+    baseURL:window.GLOBAL_CONFIG.api,
+    url: "/openapi/chart/school_data.php",
+    data:{},
+  })
     .then(res => {
-      console.log(res,"8978")
+      if (res.code == '1') {
+        AllResponse.value = res.data;
+        console.log(res, "alvis")
+        left_coneEchartsData.value = res.data.left_coneEchartsData;
+        left_bottom_table.value = res.data.left_bottom_table;
+        right_top_table.value = res.data.right_top_table;
+        right_bottom_table.value = res.data.right_bottom_table;
+      }
     })
   .catch(error=>{console.log(error)})
 }
@@ -58,27 +79,28 @@ initData();
       <div style="width:49%;">
         <div class="w-full flex flex-col border border-hex-0A337E bg-block p-6">
           <div class="text-lg mb-2 ">桐乡农村学校艺术类教师结构性缺编情况</div>
-          <div class="h-60"><cone/></div>
+          <div class="h-60">
+            <cone v-if="left_coneEchartsData" :ecahrtsData="left_coneEchartsData" />
+          </div>
           
         </div>
         
       </div>
       <div style="width:49%;">
-        <div class="text-lg mb-2 ">二级分校基本情况</div>
+        <div class="text-lg mb-2 ">{{ left_bottom_table.bigtitle }}</div>
         <div class="normalTable">
-          <div class="flex justify-between normalTable_title">
-            <div class="wslice8" v-for="(item,index)  in secScholltableTitle " :key="index" >{{item }}</div>
+          <div class="flex justify-between normalTable_title" v-if="left_bottom_table.mainTable">
+            <div class="wslice8" v-for="(item,index)  in left_bottom_table.mainTable.secScholltableTitle " :key="index" >{{item }}</div>
           </div>
-          <div class="normalTable_content" v-for="(item,index) in secSchollTableContent" :key="index">
+          <div class="normalTable_content" v-if="left_bottom_table.mainTable" v-for="(item,index) in left_bottom_table.mainTable.secSchollTableContent" :key="index">
             <div class="normalTable_contentDetile" >
-             <div class="wslice8" >{{ item.schollName}}</div>
-             <div class="wslice8" >{{ item.linkNum }}</div>
-             <div class="wslice8" >{{ item.linkTeacherNum }}</div>
-             <div class="wslice8" >{{ item.linkClassMates }}</div>
-             <div class="wslice8" >{{ item.startClassNum }}</div>
-             <div class="wslice8" >{{ item.resourceControNum }}</div>
-             <div class="wslice8" >{{ item.onlineTeachNum }}</div>
-             <div class="wslice8" >{{ item.coverStudentNum }}</div>
+              <div class="wslice7">{{ item.a1}}</div>
+              <div class="wslice7">{{ item.a2 }}</div>
+              <div class="wslice7">{{ item.a3 }}</div>
+              <div class="wslice7">{{ item.a4 }}</div>
+              <div class="wslice7">{{ item.a5 }}</div>
+              <div class="wslice7">{{ item.a6 }}</div>
+              <div class="wslice7">{{ item.a7 }}</div>
             </div>
           </div>
         </div>
@@ -88,32 +110,33 @@ initData();
     <div class="flex justify-between mt-4">
       <div style="width:49%;">
         
-        <div class="text-lg mb-2 ">二级分校月考核数据表</div>
+        <div class="text-lg mb-2 ">{{ right_top_table.bigtitle }}</div>
         <div class="normalTable">
-          <div class="flex justify-between normalTable_title">
-            <div class="wslice7" v-for="(item,index)  in secSchollYKTitle " :key="index" >{{item }}</div>
+          <div class="flex justify-between normalTable_title" v-if="right_top_table.mainTable">
+            <div class="wslice7" v-for="(item,index)  in right_top_table.mainTable.secScholltableTitle " :key="index" >{{item}}</div>
           </div>
-          <div class="flex justify-between normalTable_content" v-for="(item,index) in secSchollYKContent" :key="index">
+          <div class="flex justify-between normalTable_content" v-if="right_top_table.mainTable" v-for="(item,index) in right_top_table.mainTable.secSchollTableContent" :key="index">
             <div class="normalTable_contentDetile" >
-             <div class="wslice7">{{ item.a1}}</div>
-             <div class="wslice7">{{ item.a2 }}</div>
-             <div class="wslice7">{{ item.a3 }}</div>
-             <div class="wslice7">{{ item.a4 }}</div>
-             <div class="wslice7">{{ item.a5 }}</div>
-             <div class="wslice7">{{ item.a6 }}</div>
-             <div class="wslice7">{{ item.a7 }}</div>
+             <div class="wslice8" >{{ item.schollName}}</div>
+             <div class="wslice8" >{{ item.linkNum }}</div>
+             <div class="wslice8" >{{ item.linkTeacherNum }}</div>
+             <div class="wslice8" >{{ item.linkClassMates }}</div>
+             <div class="wslice8" >{{ item.startClassNum }}</div>
+             <div class="wslice8" >{{ item.resourceControNum }}</div>
+             <div class="wslice8" >{{ item.onlineTeachNum }}</div>
+             <div class="wslice8" >{{ item.coverStudentNum }}</div>
             </div>
           </div>
         </div>
 
       </div>
       <div style="width:49%;">
-        <div class="text-lg mb-2 ">受援学校月考核数据表</div>
+        <div class="text-lg mb-2 ">{{ right_bottom_table.bigtitle }}</div>
         <div class="normalTable">
-          <div class="flex justify-between normalTable_title">
-            <div class="wslice6" v-for="(item,index)  in secSchollSupportTitle " :key="index" >{{item }}</div>
+          <div class="flex justify-between normalTable_title" v-if="right_bottom_table.mainTable">
+            <div class="wslice6" v-for="(item,index)  in right_bottom_table.mainTable.secScholltableTitle " :key="index" >{{item }}</div>
           </div>
-          <div class="flex justify-between normalTable_content" v-for="(item,index) in secSchollSupportContent" :key="index">
+          <div class="flex justify-between normalTable_content" v-if="right_bottom_table.mainTable" v-for="(item,index) in right_bottom_table.mainTable.secSchollTableContent" :key="index">
             <div class="normalTable_contentDetile" >
              <div class="wslice6">{{ item.a1}}</div>
              <div class="wslice6">{{ item.a2 }}</div>

+ 6 - 2
src/pages/school/cone.vue

@@ -1,12 +1,16 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 
+const props = defineProps<{
+  ecahrtsData: Object
+}>()
+// console.log(props.ecahrtsData,"56789")
 const chartRef = ref()
 onMounted(() => {
   echarts.init(chartRef.value).setOption({
     xAxis: {
     type: 'category',
-    data: ["美术专职教师占比100%", " 美术专职教师占比80%至99% ", "美术专职教师占比50以下"]
+    data: props.ecahrtsData.xAxis_data
   },
   grid: {
     left: '3%',
@@ -19,7 +23,7 @@ onMounted(() => {
     },
     series: [
     {
-      data: [4, 8, 16],
+      data: props.ecahrtsData.series_data,
       type: 'pictorialBar', // 象形柱图
       symbol: 'triangle', // 三角形
       color: {

+ 54 - 33
src/pages/student.vue

@@ -1,29 +1,50 @@
 <script setup lang="ts">
-import bar from './student/bar.vue'
-import lines from './student/lines.vue'
+import _request from '../utils/request';
+
 import radars1 from './student/radars1.vue'
 import radars2 from './student/radars2.vue'
+import bar from './student/bar.vue'
+import lines from './student/lines.vue'
+
+
+const AllResponse = ref('');
 
+const left_middle_table = ref('');
+const left_bottom_table = ref('');
 
-//本学期优秀美术作品排行
-const secSchollGoodArtTitle = ref(["序号", "作品展名称", "策展人", "单位", "作品类型", "作品数量", "点赞数","浏览量"]);
-const secSchollGoodArtContent = ref([
-  {a1:1, a2: "家乡的古塔", a3: "流年", a4: "世纪路学校", a5: "课堂作业展", a6: 12, a7: 930, a8: 348 },
-  {a1:2, a2: "戏曲人物", a3: "流年", a4: "世纪路学校", a5: "课堂作业展", a6: 12, a7: 930, a8: 348 },
-  {a1:3, a2: "为自己的书设计封面", a3: "流年", a4: "世纪路学校", a5: "课堂作业展", a6: 12, a7: 930, a8: 348 },
-  {a1:4, a2: "窗外的风景", a3: "流年", a4: "世纪路学校", a5: "课堂作业展", a6: 12, a7: 930, a8: 348 },
-  {a1:5, a2: "色彩的世界", a3: "流年", a4: "世纪路学校", a5: "课堂作业展", a6: 12, a7: 930, a8: 348 },
-])
-
-//本周优秀作业排行
-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:4, a2: "窗外的风景", a3: "流年", a4: 602, a5: "世纪路学校", a6: "李爱国", a7: 930, a8: 348 },
-  {a1:5, a2: "色彩的世界", a3: "流年", a4: 601, a5: "世纪路学校", a6: "李爱国", a7: 930, a8: 348 },
-])
+const left_top_left_echartsData = ref('');
+const left_top_right_echartsData = ref('');
+
+const right_top_echartsData = ref('');
+const right_bottom_echartsData = ref('');
+
+const initData = () => {
+  _request({
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded',
+    },
+    baseURL:window.GLOBAL_CONFIG.api,
+    url: "/openapi/chart/student_data.php",
+    data:{},
+  })
+    .then(res => {
+      if (res.code == '1') {
+        AllResponse.value = res.data;
+        console.log(res, "alvis")
+        left_middle_table.value =res.data.left_middle_table;
+        left_bottom_table.value =res.data.left_bottom_table;
+
+        left_top_left_echartsData.value = res.data.left_top_left_echartsData;
+        left_top_right_echartsData.value = res.data.left_top_right_echartsData;
+
+        right_top_echartsData.value = res.data.right_top_echartsData;
+        right_bottom_echartsData.value = res.data.right_bottom_echartsData;
+
+      }
+    })
+  .catch(error=>{console.log(error)})
+}
+initData();
 
 </script>
 
@@ -32,19 +53,19 @@ const secSchollWeekArtContent = ref([
     <div class="flex flex-col justify-between" style="width:50%;">
       <div class="flex justify-between">
         <div class="px-3 py-2 w-410px h-332px border border-hex-0A337E bg-block" style="margin-right: 1%;">
-          <radars1 />
+          <radars1 v-if="left_top_left_echartsData"  :ecahrtsData="left_top_left_echartsData"/>
         </div>
         <div class="px-3 py-2 w-410px h-332px border border-hex-0A337E bg-block">
-          <radars2 />
+          <radars2 v-if="left_top_right_echartsData" :ecahrtsData="left_top_right_echartsData" />
         </div>
       </div>
       <div class="mt-4" >
-        <div class="text-lg mb-4">本学期优秀美术作品排行</div>
+        <div class="text-lg mb-4">{{ left_middle_table.bigtitle }}</div>
         <div class="normalTable">
-          <div class="flex justify-between normalTable_title">
-            <div class="wslice8" v-for="(item,index)  in secSchollGoodArtTitle " :key="index" >{{item }}</div>
+          <div class="flex justify-between normalTable_title" v-if="left_middle_table.mainTable">
+            <div class="wslice8" v-for="(item,index)  in left_middle_table.mainTable.secScholltableTitle " :key="index" >{{item }}</div>
           </div>
-          <div class="flex justify-between normalTable_content" v-for="(item,index) in secSchollGoodArtContent" :key="index">
+          <div class="flex justify-between normalTable_content" v-if="left_middle_table.mainTable" v-for="(item,index) in left_middle_table.mainTable.secSchollTableContent" :key="index">
             <div class="normalTable_contentDetile">
              <div class="wslice8">{{ item.a1}}</div>
              <div class="wslice8">{{ item.a2 }}</div>
@@ -59,12 +80,12 @@ const secSchollWeekArtContent = ref([
         </div>
       </div>
       <div class="mt-4">
-        <div class="text-lg mb-4 ">本周优秀作业排行</div>
+        <div class="text-lg mb-4 ">{{ left_bottom_table.bigtitle }}</div>
         <div class="normalTable">
-          <div class="flex justify-between normalTable_title">
-            <div class="wslice8" v-for="(item,index)  in secSchollWeekArtTitle " :key="index" >{{item }}</div>
+          <div class="flex justify-between normalTable_title" v-if="left_bottom_table.mainTable">
+            <div class="wslice8" v-for="(item,index)  in left_bottom_table.mainTable.secScholltableTitle" :key="index" >{{item }}</div>
           </div>
-          <div class="flex justify-between normalTable_content" v-for="(item,index) in secSchollWeekArtContent" :key="index">
+          <div class="flex justify-between normalTable_content" v-if="left_bottom_table.mainTable" v-for="(item,index) in left_bottom_table.mainTable.secSchollTableContent" :key="index">
             <div class="normalTable_contentDetile">
              <div class="wslice8">{{ item.a1}}</div>
              <div class="wslice8">{{ item.a2 }}</div>
@@ -82,10 +103,10 @@ const secSchollWeekArtContent = ref([
 
     <div class="flex flex-col justify-between " style="width:49%;">
       <div class="w-full h-450px px-5 py-4 border border-hex-0A337E bg-block">
-        <bar />
+        <bar v-if="right_top_echartsData" :ecahrtsData="right_top_echartsData" />
       </div>
       <div class="w-full h-450px px-5 py-4 border border-hex-0A337E bg-block" style="margin-top: 2%;">
-        <lines />
+        <lines v-if="right_bottom_echartsData" :ecahrtsData="right_bottom_echartsData" />
       </div>
     </div>
 

+ 6 - 1
src/pages/student/bar.vue

@@ -1,11 +1,15 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 
+const props = defineProps<{
+  ecahrtsData: object
+}>()
+
 const chartRef = ref()
 onMounted(() => {
   echarts.init(chartRef.value).setOption({
     title: {
-      text: '学生作品情况',
+      text: props.ecahrtsData.title_text,
       textStyle: {
         color: '#fff',
       },
@@ -25,6 +29,7 @@ onMounted(() => {
     },
     color: ['#11a597', '#ff8366', '#5f54ef'],
     dataset: {
+      // source:props.ecahrtsData.dataset_source,
       source: [
         ['date', '学生作品总数', '五星作品数', '线上作品数'],
         ['2021年12月', 15, 8, 11],

+ 7 - 7
src/pages/student/lines.vue

@@ -1,11 +1,15 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 
+const props = defineProps<{
+  ecahrtsData: object
+}>()
+
 const chartRef = ref()
 onMounted(() => {
   echarts.init(chartRef.value).setOption({
     title: {
-      text: '结对帮扶情况',
+      text: props.ecahrtsData.title_text,
       textStyle: {
         color: '#fff',
       },
@@ -47,7 +51,7 @@ onMounted(() => {
         },
       },
       boundaryGap: false,
-      data: ['2021年12月', '2022年1月', '2022年2月', '2022年3月', '2022年4月', '2022年5月', '2022年6月', '2022年7月', '2022年8月', '2022年9月', '2022年10月', '2022年11月', '2022年12月'],
+      data: props.ecahrtsData.xAxis_data,
     },
     yAxis: {
       type: 'value',
@@ -67,11 +71,7 @@ onMounted(() => {
         },
       },
     },
-    series: [
-      { type: 'line', name: '全景课堂', smooth: true, symbolSize: 12, itemStyle: { borderWidth: 2 }, lineStyle: { width: 6 }, data: [42, 46, 51, 53, 57, 61, 73, 0, 0, 71, 81] },
-      { type: 'line', name: '资源包  ', smooth: true, symbolSize: 12, itemStyle: { borderWidth: 2 }, lineStyle: { width: 6 }, data: [14, 26, 39, 43, 55, 57, 61, 89, 92, 69, 63] },
-      { type: 'line', name: '自由结对', smooth: true, symbolSize: 12, itemStyle: { borderWidth: 2 }, lineStyle: { width: 6 }, data: [19, 23, 28, 32, 37, 42, 44, 0, 0, 51, 66] },
-    ],
+    series: props.ecahrtsData.series,
 
   })
 })

+ 31 - 35
src/pages/student/radars1.vue

@@ -1,11 +1,15 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 
+const props = defineProps<{
+  ecahrtsData: object
+}>()
+
 const chartRef = ref()
 onMounted(() => {
   echarts.init(chartRef.value).setOption({
     title: {
-      text: '学生艺术评价',
+      text: props.ecahrtsData.title_text,
       textStyle: {
         color: '#fff',
       },
@@ -15,7 +19,7 @@ onMounted(() => {
       confine: true,
     },
     legend: {
-      date: ['全市平均', '前一年农村平均', '目前农村平均'],
+      date: props.ecahrtsData.legend_date,
       top: '28px',
       right: '0',
       textStyle: {
@@ -29,44 +33,36 @@ onMounted(() => {
     color: ['#11a597', '#ff8366', '#eff410'],
     radar: {
       // shape: 'circle',
-      indicator: [
-        { name: '色彩丰富', max: 100 },
-        { name: '造型生动', max: 100 },
-        { name: '制作精美', max: 100 },
-        { name: '元素多样', max: 100 },
-        { name: '围绕主题', max: 100 },
-        { name: '线条流畅', max: 100 },
-        { name: '构图饱满', max: 100 },
-      ],
-
+      indicator: props.ecahrtsData.radar_indicator,
       center: ['50%', '62%'],
       radius: '70%',
     },
     series: [{
       type: 'radar',
-      data: [
-        {
-          value: [81, 81, 83, 97, 94, 88, 87],
-          name: '全市平均',
-          areaStyle: {
-            color: '#11a59760',
-          },
-        },
-        {
-          value: [47, 43, 59, 44, 56, 45, 52],
-          name: '前一年农村平均',
-          areaStyle: {
-            color: '#ff8366',
-          },
-        },
-        {
-          value: [74, 74, 62, 77, 61, 77, 66],
-          name: '目前农村平均',
-          areaStyle: {
-            color: '#eff41060',
-          },
-        },
-      ],
+      data:props.ecahrtsData.series_data,
+      // data: [
+      //   {
+      //     value: [81, 81, 83, 97, 94, 88, 87],
+      //     name: '全市平均',
+      //     areaStyle: {
+      //       color: '#11a59760',
+      //     },
+      //   },
+      //   {
+      //     value: [47, 43, 59, 44, 56, 45, 52],
+      //     name: '前一年农村平均',
+      //     areaStyle: {
+      //       color: '#ff8366',
+      //     },
+      //   },
+      //   {
+      //     value: [74, 74, 62, 77, 61, 77, 66],
+      //     name: '目前农村平均',
+      //     areaStyle: {
+      //       color: '#eff41060',
+      //     },
+      //   },
+      // ],
     }],
 
   })

+ 31 - 35
src/pages/student/radars2.vue

@@ -1,11 +1,15 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 
+const props = defineProps<{
+  ecahrtsData: object
+}>()
+
 const chartRef = ref()
 onMounted(() => {
   echarts.init(chartRef.value).setOption({
     title: {
-      text: '学生形成评价',
+      text: props.ecahrtsData.title_text,
       textStyle: {
         color: '#fff',
       },
@@ -15,7 +19,7 @@ onMounted(() => {
       confine: true,
     },
     legend: {
-      date: ['全市平均', '前一年农村平均', '目前农村平均'],
+      date: props.ecahrtsData.legend_date,
       top: '28px',
       right: '0',
       textStyle: {
@@ -29,44 +33,36 @@ onMounted(() => {
     color: ['#11a597', '#ff8366', '#eff410'],
     radar: {
       // shape: 'circle',
-      indicator: [
-        { name: '课前准备', max: 100 },
-        { name: '课外拓展', max: 100 },
-        { name: '卫生整理', max: 100 },
-        { name: '作品评述', max: 100 },
-        { name: '探究实践', max: 100 },
-        { name: '学习兴趣', max: 100 },
-        { name: '合作分工', max: 100 },
-      ],
-
+      indicator: props.ecahrtsData.radar_indicator,
       center: ['50%', '62%'],
       radius: '70%',
     },
     series: [{
       type: 'radar',
-      data: [
-        {
-          value: [83, 82, 90, 86, 80, 99, 99],
-          name: '全市平均',
-          areaStyle: {
-            color: '#11a59760',
-          },
-        },
-        {
-          value: [44, 40, 46, 52, 51, 59, 45],
-          name: '前一年农村平均',
-          areaStyle: {
-            color: '#ff8366',
-          },
-        },
-        {
-          value: [63, 65, 76, 74, 79, 63, 75],
-          name: '目前农村平均',
-          areaStyle: {
-            color: '#eff41060',
-          },
-        },
-      ],
+      data:props.ecahrtsData.series_data,
+      // data: [
+      //   {
+      //     value: [83, 82, 90, 86, 80, 99, 99],
+      //     name: '全市平均',
+      //     areaStyle: {
+      //       color: '#11a59760',
+      //     },
+      //   },
+      //   {
+      //     value: [44, 40, 46, 52, 51, 59, 45],
+      //     name: '前一年农村平均',
+      //     areaStyle: {
+      //       color: '#ff8366',
+      //     },
+      //   },
+      //   {
+      //     value: [63, 65, 76, 74, 79, 63, 75],
+      //     name: '目前农村平均',
+      //     areaStyle: {
+      //       color: '#eff41060',
+      //     },
+      //   },
+      // ],
     }],
 
   })

+ 50 - 49
src/pages/teacher.vue

@@ -1,44 +1,45 @@
 <script setup lang="ts">
+import _request from '../utils/request';
 import pie1 from './teacher/pie1.vue'
 import pie2 from './teacher/pie2.vue'
 import pie3 from './teacher/pie3.vue'
 
-
-const baseInfo = ref([
-  {
-    title: "参与教师",
-    detailNum:'0111',
-  },
-  {
-    title: "开课数量",
-    detailNum:'0911',
-  },
-  {
-    title: "教研数量",
-    detailNum:'0911',
-  },
-  {
-    title: "资源数量",
-    detailNum:'8911',
-  }
-]);
-
-const secSchollTeacherTitle = ref(["全科教师", "协同数量", "教研次数", "教学效果","上传资源"]);
-const secSchollTeacherContent = ref([
-  { a1: "花花", a2: 28, a3: 8, a4: 5,a5:5, },
-  { a1: "花花", a2: 28, a3: 8, a4: 5,a5:5, },
-  { a1: "花花", a2: 28, a3: 8, a4: 5,a5:5, },
-  { a1: "花花", a2: 28, a3: 8, a4: 5,a5:5, },
-  
-])
-
-const secSchollTeacher2Title = ref(["客座名师", "开课数量", "教研次数", "教学效果","上传资源"]);
-const secSchollTeacher2Content = ref([
-  { a1: "花花", a2: 26, a3: 8, a4: 5,a5:5, },
-  { a1: "花花", a2: 26, a3: 8, a4: 5,a5:5, },
-  { a1: "花花", a2: 26, a3: 8, a4: 5,a5:5, },
-  { a1: "花花", a2: 26, a3: 8, a4: 5,a5:5, },
-])
+const AllResponse = ref('');
+
+const left_top_mainShow = ref('');
+const left_middle_table = ref('');
+const left_bottom_table = ref('');
+
+const right_top_echartsData = ref('');
+const right_middle_echartsData = ref('');
+const right_bottom_echartsData = ref('');
+
+const initData = () => {
+  _request({
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded',
+    },
+    baseURL:window.GLOBAL_CONFIG.api,
+    url: "/openapi/chart/teacher_data.php",
+    data:{},
+  })
+    .then(res => {
+      if (res.code == '1') {
+        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 ;
+
+        right_top_echartsData.value = res.data.right_top_echartsData;
+        right_middle_echartsData.value = res.data.right_middle_echartsData;
+        right_bottom_echartsData.value = res.data.right_bottom_echartsData;
+
+      }
+    })
+  .catch(error=>{console.log(error)})
+}
+initData();
 
 
 // newTotal = numTrans(res.data.school_base_data.yhgmData.total)
@@ -66,7 +67,7 @@ const converToArray = number => [...`${number}`].map(el => parseInt(el))
     <div class="flex flex-col justify-between" style="width:49%;">
       <div class="w-full ">
         <div class="flex flex-row justify-between ">
-          <div v-for="(item,index) in baseInfo" :key="index" >
+          <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-4 splitNum">
@@ -80,10 +81,10 @@ const converToArray = number => [...`${number}`].map(el => parseInt(el))
       </div>
       <div class="w-full ">
         <div class="normalTable">
-          <div class="flex justify-between normalTable_title">
-            <div class="wslice5" v-for="(item,index)  in secSchollTeacherTitle " :key="index" >{{item }}</div>
+          <div class="flex justify-between normalTable_title" v-if="left_middle_table.mainTable">
+            <div class="wslice5" v-for="(item,index)  in left_middle_table.mainTable.secScholltableTitle " :key="index" >{{item }}</div>
           </div>
-          <div class="normalTable_content" v-for="(item,index) in secSchollTeacherContent" :key="index">
+          <div class="normalTable_content" v-if="left_middle_table.mainTable" v-for="(item,index) in left_middle_table.mainTable.secSchollTableContent" :key="index">
             <div class="normalTable_contentDetile" >
              <div class="wslice5" >{{ item.a1}}</div>
              <div class="wslice5" >{{ item.a2 }}</div>
@@ -96,10 +97,10 @@ const converToArray = number => [...`${number}`].map(el => parseInt(el))
       </div>
       <div class="w-full ">
         <div class="normalTable">
-          <div class="flex justify-between normalTable_title">
-            <div class="wslice5" v-for="(item,index)  in secSchollTeacher2Title " :key="index" >{{item }}</div>
+          <div class="flex justify-between normalTable_title" v-if="left_bottom_table.mainTable">
+            <div class="wslice5" v-for="(item,index)  in left_bottom_table.mainTable.secScholltableTitle" :key="index" >{{item }}</div>
           </div>
-          <div class="normalTable_content" v-for="(item,index) in secSchollTeacher2Content" :key="index">
+          <div class="normalTable_content" v-if="left_bottom_table.mainTable" v-for="(item,index) in left_bottom_table.mainTable.secSchollTableContent" :key="index">
             <div class="normalTable_contentDetile" >
              <div class="wslice5" >{{ item.a1}}</div>
              <div class="wslice5" >{{ item.a2 }}</div>
@@ -113,21 +114,21 @@ const converToArray = number => [...`${number}`].map(el => parseInt(el))
     </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">
-        <div class="text-lg mb-4 ">全市美术教师数据</div>
+        <div class="text-lg mb-4 ">{{ right_top_echartsData.bigtitle }}</div>
         <div class="flex flex-auto">
-          <pie1 />
+          <pie1 v-show="right_top_echartsData.echartsData" :ecahrtsData="right_top_echartsData.echartsData" />
         </div>
       </div>
       <div class="w-full h-300px flex flex-col border border-hex-0A337E bg-block p-6" style="margin-top: 1%;">
-        <div class="text-lg mb-4 ">客座名师数量及构成</div>
+        <div class="text-lg mb-4 ">{{ right_middle_echartsData.bigtitle }}</div>
         <div class="flex flex-auto">
-          <pie2 />
+          <pie2 v-show="right_middle_echartsData.echartsData" :ecahrtsData="right_middle_echartsData.echartsData"  />
         </div>
       </div>
       <div class="w-full h-300px flex flex-col border border-hex-0A337E bg-block p-6" style="margin-top: 1%;">
-        <div class="text-lg mb-4 ">全科教师数量及构成</div>
+        <div class="text-lg mb-4 ">{{ right_bottom_echartsData.bigtitle }}</div>
         <div class="flex flex-auto">
-          <pie3 />
+          <pie3 v-show="right_bottom_echartsData.echartsData" :ecahrtsData="right_bottom_echartsData.echartsData" />
         </div>
       </div>
     </div>

+ 86 - 85
src/pages/teacher/pie1.vue

@@ -1,9 +1,9 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 import 'echarts-liquidfill'
-// const props = defineProps<{
-//   val: number
-// }>()
+const props = defineProps<{
+  ecahrtsData: Array
+}>()
 // console.log('val :>> ', props, props.val)
 const chartRef = ref()
 const option = {
@@ -15,88 +15,89 @@ const option = {
   //   left: 'center',
   // },
   color: ['#228FFE', '#34B2D1', '#2D23F4', '#2822A6', '#23D4F4', '#6054FF', '#00D2BC'],
-  series: [
-    {
-      name: '农村城市分布',
-      type: 'pie',
-      radius: '60px',
-      center: ['12.5%', '75px'],
-      avoidLabelOverlap: false,
-      label: { color: '#fff' },
-      labelLine: {
-        show: true,
-        length: 0,
-      },
-      data: [
-        { value: 40, name: '农村' },
-        { value: 60, name: '城市' },
-      ],
-    },
-    {
-      name: '名优教师占比',
-      type: 'pie',
-      roseType: 'radius',
-      radius: ['30px', '60px'],
-      center: ['37.5%', '75px'],
-      avoidLabelOverlap: false,
-      label: { color: '#fff' },
-      labelLine: {
-        show: true,
-        length: 0,
-      },
-      data: [
-        { value: 11, name: '桐乡市教坛新秀' },
-        { value: 21, name: '嘉兴市学科带头人' },
-        { value: 17, name: '嘉兴市教坛新秀' },
-        { value: 31, name: '浙江省教坛新秀' },
-        { value: 14, name: '嘉兴市名师' },
-        { value: 41, name: '桐乡市学科带头人' },
-        { value: 21, name: '桐乡骨干教师' },
-      ],
-    },
-    {
-      name: '教师年龄分布',
-      type: 'pie',
-      roseType: 'radius',
-      radius: ['30px', '60px'],
-      center: ['62.5%', '75px'],
-      avoidLabelOverlap: false,
-      label: { color: '#fff' },
-      labelLine: {
-        show: true,
-        length: 0,
-      },
-      data: [
-        { value: 11, name: '45-50' },
-        { value: 21, name: '40-45' },
-        { value: 15, name: '50-60' },
-        { value: 31, name: '35-40' },
-        { value: 41, name: '25-35' },
-        { value: 18, name: '25岁以下' },
-      ],
-    },
-    {
-      name: '教师职称分布',
-      type: 'pie',
-      roseType: 'radius',
-      radius: ['30px', '60px'],
-      center: ['87.5%', '75px'],
-      avoidLabelOverlap: false,
-      label: { color: '#fff' },
-      labelLine: {
-        show: true,
-        length: 0,
-      },
-      data: [
-        { value: 27, name: '一级' },
-        { value: 29, name: '高级' },
-        { value: 42, name: '正高级' },
-        { value: 34, name: '其他' },
-        { value: 14, name: '见习期' },
-        { value: 20, name: '二级' },
-      ],
-    },
-  ],
+  series:props.ecahrtsData,
+  // series: [
+  //   {
+  //     name: '农村城市分布',
+  //     type: 'pie',
+  //     radius: '60px',
+  //     center: ['12.5%', '75px'],
+  //     avoidLabelOverlap: false,
+  //     label: { color: '#fff' },
+  //     labelLine: {
+  //       show: true,
+  //       length: 0,
+  //     },
+  //     data: [
+  //       { value: 40, name: '农村' },
+  //       { value: 60, name: '城市' },
+  //     ],
+  //   },
+  //   {
+  //     name: '名优教师占比',
+  //     type: 'pie',
+  //     roseType: 'radius',
+  //     radius: ['30px', '60px'],
+  //     center: ['37.5%', '75px'],
+  //     avoidLabelOverlap: false,
+  //     label: { color: '#fff' },
+  //     labelLine: {
+  //       show: true,
+  //       length: 0,
+  //     },
+  //     data: [
+  //       { value: 11, name: '桐乡市教坛新秀' },
+  //       { value: 21, name: '嘉兴市学科带头人' },
+  //       { value: 17, name: '嘉兴市教坛新秀' },
+  //       { value: 31, name: '浙江省教坛新秀' },
+  //       { value: 14, name: '嘉兴市名师' },
+  //       { value: 41, name: '桐乡市学科带头人' },
+  //       { value: 21, name: '桐乡骨干教师' },
+  //     ],
+  //   },
+  //   {
+  //     name: '教师年龄分布',
+  //     type: 'pie',
+  //     roseType: 'radius',
+  //     radius: ['30px', '60px'],
+  //     center: ['62.5%', '75px'],
+  //     avoidLabelOverlap: false,
+  //     label: { color: '#fff' },
+  //     labelLine: {
+  //       show: true,
+  //       length: 0,
+  //     },
+  //     data: [
+  //       { value: 11, name: '45-50' },
+  //       { value: 21, name: '40-45' },
+  //       { value: 15, name: '50-60' },
+  //       { value: 31, name: '35-40' },
+  //       { value: 41, name: '25-35' },
+  //       { value: 18, name: '25岁以下' },
+  //     ],
+  //   },
+  //   {
+  //     name: '教师职称分布',
+  //     type: 'pie',
+  //     roseType: 'radius',
+  //     radius: ['30px', '60px'],
+  //     center: ['87.5%', '75px'],
+  //     avoidLabelOverlap: false,
+  //     label: { color: '#fff' },
+  //     labelLine: {
+  //       show: true,
+  //       length: 0,
+  //     },
+  //     data: [
+  //       { value: 27, name: '一级' },
+  //       { value: 29, name: '高级' },
+  //       { value: 42, name: '正高级' },
+  //       { value: 34, name: '其他' },
+  //       { value: 14, name: '见习期' },
+  //       { value: 20, name: '二级' },
+  //     ],
+  //   },
+  // ],
 }
 onMounted(() => {
   echarts.init(chartRef.value).setOption(option)

+ 87 - 86
src/pages/teacher/pie2.vue

@@ -1,9 +1,9 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 import 'echarts-liquidfill'
-// const props = defineProps<{
-//   val: number
-// }>()
+const props = defineProps<{
+  ecahrtsData: Array
+}>()
 // console.log('val :>> ', props, props.val)
 const chartRef = ref()
 const option = {
@@ -15,89 +15,90 @@ const option = {
   //   left: 'center',
   // },
   color: ['#2ABB78', '#34D160', '#22FBFE', '#168A8E', '#44D794', '#0C9154', '#2151db'],
-  series: [
-    {
-      name: '客座名师占比',
-      type: 'pie',
-      radius: '60px',
-      center: ['12.5%', '75px'],
-      avoidLabelOverlap: false,
-      label: { color: '#fff' },
-      labelLine: {
-        show: true,
-        length: 0,
-      },
-      data: [
-        { value: 20, name: '艺术名家' },
-        { value: 60, name: '名优教师' },
-        { value: 25, name: '社会师资' },
-      ],
-    },
-    {
-      name: '名优教师比例',
-      type: 'pie',
-      roseType: 'radius',
-      radius: ['30px', '60px'],
-      center: ['37.5%', '75px'],
-      avoidLabelOverlap: false,
-      label: { color: '#fff' },
-      labelLine: {
-        show: true,
-        length: 0,
-      },
-      data: [
-        { value: 11, name: '桐乡市教坛新秀' },
-        { value: 21, name: '嘉兴市学科带头人' },
-        { value: 17, name: '嘉兴市教坛新秀' },
-        { value: 31, name: '浙江省教坛新秀' },
-        { value: 14, name: '嘉兴市名师' },
-        { value: 41, name: '桐乡市学科带头人' },
-        { value: 21, name: '桐乡骨干教师' },
-      ],
-    },
-    {
-      name: '年龄分布',
-      type: 'pie',
-      roseType: 'radius',
-      radius: ['30px', '60px'],
-      center: ['62.5%', '75px'],
-      avoidLabelOverlap: false,
-      label: { color: '#fff' },
-      labelLine: {
-        show: true,
-        length: 0,
-      },
-      data: [
-        { value: 11, name: '45-50' },
-        { value: 21, name: '40-45' },
-        { value: 15, name: '50-60' },
-        { value: 31, name: '35-40' },
-        { value: 41, name: '25-35' },
-        { value: 18, name: '25岁以下' },
-      ],
-    },
-    {
-      name: '职称分布',
-      type: 'pie',
-      roseType: 'radius',
-      radius: ['30px', '60px'],
-      center: ['87.5%', '75px'],
-      avoidLabelOverlap: false,
-      label: { color: '#fff' },
-      labelLine: {
-        show: true,
-        length: 0,
-      },
-      data: [
-        { value: 27, name: '一级' },
-        { value: 29, name: '高级' },
-        { value: 42, name: '正高级' },
-        { value: 34, name: '其他' },
-        { value: 14, name: '见习期' },
-        { value: 20, name: '二级' },
-      ],
-    },
-  ],
+  series:props.ecahrtsData,
+  // series: [
+  //   {
+  //     name: '客座名师占比',
+  //     type: 'pie',
+  //     radius: '60px',
+  //     center: ['12.5%', '75px'],
+  //     avoidLabelOverlap: false,
+  //     label: { color: '#fff' },
+  //     labelLine: {
+  //       show: true,
+  //       length: 0,
+  //     },
+  //     data: [
+  //       { value: 20, name: '艺术名家' },
+  //       { value: 60, name: '名优教师' },
+  //       { value: 25, name: '社会师资' },
+  //     ],
+  //   },
+  //   {
+  //     name: '名优教师比例',
+  //     type: 'pie',
+  //     roseType: 'radius',
+  //     radius: ['30px', '60px'],
+  //     center: ['37.5%', '75px'],
+  //     avoidLabelOverlap: false,
+  //     label: { color: '#fff' },
+  //     labelLine: {
+  //       show: true,
+  //       length: 0,
+  //     },
+  //     data: [
+  //       { value: 11, name: '桐乡市教坛新秀' },
+  //       { value: 21, name: '嘉兴市学科带头人' },
+  //       { value: 17, name: '嘉兴市教坛新秀' },
+  //       { value: 31, name: '浙江省教坛新秀' },
+  //       { value: 14, name: '嘉兴市名师' },
+  //       { value: 41, name: '桐乡市学科带头人' },
+  //       { value: 21, name: '桐乡骨干教师' },
+  //     ],
+  //   },
+  //   {
+  //     name: '年龄分布',
+  //     type: 'pie',
+  //     roseType: 'radius',
+  //     radius: ['30px', '60px'],
+  //     center: ['62.5%', '75px'],
+  //     avoidLabelOverlap: false,
+  //     label: { color: '#fff' },
+  //     labelLine: {
+  //       show: true,
+  //       length: 0,
+  //     },
+  //     data: [
+  //       { value: 11, name: '45-50' },
+  //       { value: 21, name: '40-45' },
+  //       { value: 15, name: '50-60' },
+  //       { value: 31, name: '35-40' },
+  //       { value: 41, name: '25-35' },
+  //       { value: 18, name: '25岁以下' },
+  //     ],
+  //   },
+  //   {
+  //     name: '职称分布',
+  //     type: 'pie',
+  //     roseType: 'radius',
+  //     radius: ['30px', '60px'],
+  //     center: ['87.5%', '75px'],
+  //     avoidLabelOverlap: false,
+  //     label: { color: '#fff' },
+  //     labelLine: {
+  //       show: true,
+  //       length: 0,
+  //     },
+  //     data: [
+  //       { value: 27, name: '一级' },
+  //       { value: 29, name: '高级' },
+  //       { value: 42, name: '正高级' },
+  //       { value: 34, name: '其他' },
+  //       { value: 14, name: '见习期' },
+  //       { value: 20, name: '二级' },
+  //     ],
+  //   },
+  // ],
 }
 onMounted(() => {
   echarts.init(chartRef.value).setOption(option)

+ 67 - 66
src/pages/teacher/pie3.vue

@@ -1,9 +1,9 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 import 'echarts-liquidfill'
-// const props = defineProps<{
-//   val: number
-// }>()
+const props = defineProps<{
+  ecahrtsData: Array
+}>()
 // console.log('val :>> ', props, props.val)
 const chartRef = ref()
 const option = {
@@ -15,69 +15,70 @@ const option = {
   //   left: 'center',
   // },
   color: ['#7817B5', '#703297', '#AB56C0', '#8A00E1', '#4C1A6C', '#6054FF', '#AB68D6'],
-  series: [
-    {
-      name: '学科类别分布',
-      type: 'pie',
-      radius: '60px',
-      center: ['16%', '75px'],
-      avoidLabelOverlap: false,
-      label: { color: '#fff' },
-      labelLine: {
-        show: true,
-        length: 0,
-      },
-      data: [
-        { value: 40, name: '语文' },
-        { value: 50, name: '数学' },
-        { value: 60, name: '英语' },
-        { value: 70, name: '科学' },
-        { value: 60, name: '体育' },
-      ],
-    },
-    {
-      name: '教师年龄分布',
-      type: 'pie',
-      roseType: 'radius',
-      radius: ['30px', '60px'],
-      center: ['50%', '75px'],
-      avoidLabelOverlap: false,
-      label: { color: '#fff' },
-      labelLine: {
-        show: true,
-        length: 0,
-      },
-      data: [
-        { value: 11, name: '45-50' },
-        { value: 21, name: '40-45' },
-        { value: 15, name: '50-60' },
-        { value: 31, name: '35-40' },
-        { value: 41, name: '25-35' },
-        { value: 18, name: '25岁以下' },
-      ],
-    },
-    {
-      name: '教师职称分布',
-      type: 'pie',
-      roseType: 'radius',
-      radius: ['30px', '60px'],
-      center: ['84%', '75px'],
-      avoidLabelOverlap: false,
-      label: { color: '#fff' },
-      labelLine: {
-        show: true,
-        length: 0,
-      },
-      data: [
-        { value: 27, name: '一级' },
-        { value: 29, name: '高级' },
-        { value: 42, name: '正高级' },
-        { value: 34, name: '其他' },
-        { value: 14, name: '见习期' },
-        { value: 20, name: '二级' },
-      ],
-    },
-  ],
+  series:props.ecahrtsData,
+  // series: [
+  //   {
+  //     name: '学科类别分布',
+  //     type: 'pie',
+  //     radius: '60px',
+  //     center: ['16%', '75px'],
+  //     avoidLabelOverlap: false,
+  //     label: { color: '#fff' },
+  //     labelLine: {
+  //       show: true,
+  //       length: 0,
+  //     },
+  //     data: [
+  //       { value: 40, name: '语文' },
+  //       { value: 50, name: '数学' },
+  //       { value: 60, name: '英语' },
+  //       { value: 70, name: '科学' },
+  //       { value: 60, name: '体育' },
+  //     ],
+  //   },
+  //   {
+  //     name: '教师年龄分布',
+  //     type: 'pie',
+  //     roseType: 'radius',
+  //     radius: ['30px', '60px'],
+  //     center: ['50%', '75px'],
+  //     avoidLabelOverlap: false,
+  //     label: { color: '#fff' },
+  //     labelLine: {
+  //       show: true,
+  //       length: 0,
+  //     },
+  //     data: [
+  //       { value: 11, name: '45-50' },
+  //       { value: 21, name: '40-45' },
+  //       { value: 15, name: '50-60' },
+  //       { value: 31, name: '35-40' },
+  //       { value: 41, name: '25-35' },
+  //       { value: 18, name: '25岁以下' },
+  //     ],
+  //   },
+  //   {
+  //     name: '教师职称分布',
+  //     type: 'pie',
+  //     roseType: 'radius',
+  //     radius: ['30px', '60px'],
+  //     center: ['84%', '75px'],
+  //     avoidLabelOverlap: false,
+  //     label: { color: '#fff' },
+  //     labelLine: {
+  //       show: true,
+  //       length: 0,
+  //     },
+  //     data: [
+  //       { value: 27, name: '一级' },
+  //       { value: 29, name: '高级' },
+  //       { value: 42, name: '正高级' },
+  //       { value: 34, name: '其他' },
+  //       { value: 14, name: '见习期' },
+  //       { value: 20, name: '二级' },
+  //     ],
+  //   },
+  // ],
 }
 onMounted(() => {
   echarts.init(chartRef.value).setOption(option)

+ 63 - 43
src/pages/teaching.vue

@@ -5,33 +5,53 @@ import pie from './teaching/pie.vue';
 import stackLine from './teaching/stackLine.vue'
 
 
-const secSchollResourceTitle = ref(["资源名称", "点击量", "点赞数", "下载数"]);
-const secSchollResourceContent = ref([
-  { a1: "童谣童话(课件)", a2: 98150, a3: 220925, a4: 72645 },
-  { a1: "家乡的古塔(教案)", a2: 98150, a3: 220925, a4: 72645 },
-  { a1: "墙(教案)", a2: 98150, a3: 220925, a4: 72645 },
-  { a1: "公交站台设计(课件)", a2: 98150, a3: 220925, a4: 72645 },
-  { a1: "流动的风景线(课件)", a2: 98150, a3: 220925, a4: 72645 },
-  { a1: "砖石上的雕刻(课件)", a2: 98150, a3: 220925, a4: 72645 },
-  { a1: "墙(教案)", a2: 98150, a3: 220925, a4: 72645 },
-  { a1: "公交站台设计(课件)", a2: 98150, a3: 220925, a4: 72645 },
-  { a1: "流动的风景线(课件)", a2: 98150, a3: 220925, a4: 72645 },
-  { a1: "砖石上的雕刻(课件)", a2: 98150, a3: 220925, a4: 72645 }
-])
-
-const secSchollOpenClassTitle = ref(["", "昨日", "本周", "本月","累计"]);
-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 AllResponse = ref('');
+const left_top_table = ref('');
+const left_bottom_table = ref('');
+
+const right_top_echartsData = ref('');
+const right_bottom_echartsData_right = ref('');
+const right_bottom_echartsData_left = ref('');
+
+// const secSchollResourceTitle = ref(["资源名称", "点击量", "点赞数", "下载数"]);
+// const secSchollResourceContent = ref([
+//   { a1: "童谣童话(课件)", a2: 98150, a3: 220925, a4: 72645 },
+//   { a1: "家乡的古塔(教案)", a2: 98150, a3: 220925, a4: 72645 },
+//   { a1: "墙(教案)", a2: 98150, a3: 220925, a4: 72645 },
+//   { a1: "公交站台设计(课件)", a2: 98150, a3: 220925, a4: 72645 },
+//   { a1: "流动的风景线(课件)", a2: 98150, a3: 220925, a4: 72645 },
+//   { a1: "砖石上的雕刻(课件)", a2: 98150, a3: 220925, a4: 72645 },
+//   { a1: "墙(教案)", a2: 98150, a3: 220925, a4: 72645 },
+//   { a1: "公交站台设计(课件)", a2: 98150, a3: 220925, a4: 72645 },
+//   { a1: "流动的风景线(课件)", a2: 98150, a3: 220925, a4: 72645 },
+//   { a1: "砖石上的雕刻(课件)", a2: 98150, a3: 220925, a4: 72645 }
+// ])
+
+// const secSchollOpenClassTitle = ref(["", "昨日", "本周", "本月","累计"]);
+// 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',
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded',
+    },
+    baseURL:window.GLOBAL_CONFIG.api,
+    url: "/openapi/chart/teaching_data.php",
     data:{},
   })
     .then(res => {
-    console.log(res,"987978")
+      if (res.code == '1') {
+        AllResponse.value = res.data;
+        console.log(res,"alvis")
+        left_top_table.value = res.data.left_top_table;
+        left_bottom_table.value = res.data.left_bottom_table;
+
+        right_top_echartsData.value = res.data.right_top_echartsData;
+        right_bottom_echartsData_right.value =res.data.right_bottom_echartsData_right
+        right_bottom_echartsData_left.value=res.data.right_bottom_echartsData_left
+      }
     })
   .catch(error=>{console.log(error)})
 }
@@ -48,12 +68,12 @@ initData();
     <div class="flex flex-col justify-between" style="width:59%;">
 
       <div class="w-full">
-        <div class="text-lg py-4">优秀资源呈现</div>
+        <div class="text-lg py-4">{{ left_top_table.bigtitle }}</div>
         <div class="normalTable">
-          <div class="flex justify-between normalTable_title">
-            <div class="wslice4" v-for="(item,index)  in secSchollResourceTitle " :key="index" >{{item }}</div>
+          <div class="flex justify-between normalTable_title" v-if="left_top_table.mainTable">
+            <div class="wslice4" v-for="(item,index)  in left_top_table.mainTable.secScholltableTitle " :key="index" >{{item }}</div>
           </div>
-          <div class="normalTable_content" v-for="(item,index) in secSchollResourceContent" :key="index">
+          <div class="normalTable_content" v-if="left_top_table.mainTable"  v-for="(item,index) in left_top_table.mainTable.secSchollTableContent" :key="index">
             <div class="normalTable_contentDetile" >
              <div class="wslice4" >{{ item.a1}}</div>
              <div class="wslice4" >{{ item.a2 }}</div>
@@ -65,12 +85,12 @@ initData();
       </div>
 
       <div class="w-full">
-        <div class="text-lg py-2">近期开课情况</div>
+        <div class="text-lg py-2">{{ left_bottom_table.bigtitle }}</div>
         <div class="normalTable">
-          <div class="flex justify-between normalTable_title">
-            <div class="wslice5" v-for="(item,index)  in secSchollOpenClassTitle " :key="index" >{{item }}</div>
+          <div class="flex justify-between normalTable_title" v-if="left_bottom_table.mainTable">
+            <div class="wslice5" v-for="(item,index)  in left_bottom_table.mainTable.secScholltableTitle" :key="index" >{{item }}</div>
           </div>
-          <div class="normalTable_content" v-for="(item,index) in secSchollOpenClassContent" :key="index">
+          <div class="normalTable_content" v-if="left_bottom_table.mainTable" v-for="(item,index) in left_bottom_table.mainTable.secSchollTableContent" :key="index">
             <div class="normalTable_contentDetile" >
              <div class="wslice5" >{{ item.a1}}</div>
              <div class="wslice5" >{{ item.a2 }}</div>
@@ -85,35 +105,35 @@ initData();
     </div>
     <div class="w-965px flex flex-col justify-between " style="width:39%;">
       <div class="w-full h-362px flex flex-col border border-hex-0A337E bg-block p-6 mt-15">
-        <div class="text-lg mb-4 ">课程资源分布</div>
+        <div class="text-lg mb-4 ">{{ right_top_echartsData.bigtitle }}</div>
         <div class="flex flex-auto">
           <div class="w-1/2 h-full">
-            <div class="flex items-end">
-              <span class="text-sm ">基础课程资源数</span>
-              <span class="text-xl ml-4">675</span>
+            <div class="flex items-end" v-if="right_top_echartsData.right_echartsData">
+              <span class="text-sm ">{{ right_top_echartsData.right_echartsData.chat_oneTitle }}</span>
+              <span class="text-xl ml-4">{{ right_top_echartsData.right_echartsData.chat_oneNumber }}</span>
             </div>
-            <liquidfill :val=".35" />
+            <liquidfill  v-if="right_top_echartsData.right_echartsData" :val="right_top_echartsData.right_echartsData.chat_oneVal" />
           </div>
           <div class="w-1/2 h-full">
-            <div class="flex items-end">
-              <span class="text-sm">拓展课程资源数</span>
-              <span class="text-xl ml-4">1238</span>
+            <div class="flex items-end" v-if="right_top_echartsData.right_echartsData">
+              <span class="text-sm">{{ right_top_echartsData.right_echartsData.chat_twoTitle }}</span>
+              <span class="text-xl ml-4">{{ right_top_echartsData.right_echartsData.chat_twoNumber }}</span>
             </div>
-            <liquidfill :val=".65" />
+            <liquidfill v-if="right_top_echartsData.right_echartsData" :val="right_top_echartsData.right_echartsData.chat_twoVal" />
           </div>
         </div>
       </div>
 
       <div class="w-full flex  h-457px justify-between mt-7">
         <div class="w-405px h-full p-4 flex flex-col border border-hex-0A337E bg-block" style="width:49%;">
-          <div class="text-lg py-4">教学场景分布</div>
+          <div class="text-lg py-4">{{ right_bottom_echartsData_right.bigtitle }}</div>
           <div class="w-full flex-grow">
-            <pie />
+            <pie v-if="right_bottom_echartsData_right.echartsData" :ecahrtsData="right_bottom_echartsData_right.echartsData" />
           </div>
         </div>
         <div class="w-528px h-full p-4 flex flex-col border border-hex-0A337E bg-block" style="width:49%;">
-          <div class="text-lg mb-4 ">教学场景开课趋势</div>
-          <stackLine/>
+          <div class="text-lg mb-4 ">{{ right_bottom_echartsData_left.bigtitle }}</div>
+          <stackLine v-if="right_bottom_echartsData_left.echartsData"  :ecahrtsData="right_bottom_echartsData_left.echartsData" />
         </div>
       </div>
     </div>

+ 5 - 9
src/pages/teaching/pie.vue

@@ -1,9 +1,9 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 import 'echarts-liquidfill'
-// const props = defineProps<{
-//   val: number
-// }>()
+const props = defineProps<{
+  ecahrtsData: object
+}>()
 // console.log('val :>> ', props, props.val)
 const chartRef = ref()
 onMounted(() => {
@@ -19,7 +19,7 @@ onMounted(() => {
     color: ['#F45E23', '#44D7B6', '#6054FF'],
     series: [
       {
-        name: '教学场景分布',
+        name: props.ecahrtsData.series_name,
         type: 'pie',
         radius: ['40px', '86px'],
         avoidLabelOverlap: false,
@@ -28,11 +28,7 @@ onMounted(() => {
           show: true,
           length: 10,
         },
-        data: [
-          { value: 74, name: '自主教学节次' },
-          { value: 91, name: '名师飞课节次' },
-          { value: 240, name: '全景课堂节次' },
-        ],
+        data:props.ecahrtsData.series_data,
       },
     ],
   })

+ 11 - 27
src/pages/teaching/stackLine.vue

@@ -1,6 +1,10 @@
 <script setup lang="ts">
 import * as echarts from 'echarts'
 
+const props = defineProps<{
+  ecahrtsData: object
+}>()
+
 const chartRef = ref()
 onMounted(() => {
   echarts.init(chartRef.value).setOption({
@@ -8,7 +12,10 @@ onMounted(() => {
     trigger: 'axis'
   },
   legend: {
-    data: ['自主教学', '结对双师', '名师直播']
+    data: props.ecahrtsData.legend_data,
+    textStyle:{
+      color:'#ccc',
+    }
   },
   grid: {
     left: '3%',
@@ -19,36 +26,13 @@ onMounted(() => {
   xAxis: {
     type: 'category',
     boundaryGap: false,
-    data: ['2022年1月', '2022年3月', '2022年5月','2022年7月', '2022年9月',
-    '2022年11月','2023年1月', '2023年3月']
+    data:props.ecahrtsData.xAxis_data,
+    
   },
   yAxis: {
     type: 'value'
   },
-  series: [
-    
-    {
-      name: '自主教学',
-      type: 'line',
-      stack: 'Total',
-      data: [220, 182, 191, 234, 290, 330, 310, 330,],
-      smooth: true
-    },
-    {
-      name: '结对双师',
-      type: 'line',
-      stack: 'Total',
-      data: [150, 232, 201, 154, 190, 330, 410, 330,],
-      smooth: true
-    },
-    {
-      name: '名师直播',
-      type: 'line',
-      stack: 'Total',
-      data: [320, 332, 301, 334, 390, 330, 320, 330,],
-      smooth: true
-    }
-  ]
+  series: props.ecahrtsData.series
 })
 })
 </script>