Ver código fonte

Merge branch 'master' into luohl

* master:
  个人成绩单  试题分析 接入接口
  .....
  ....
luohailiang 2 anos atrás
pai
commit
5978550a00

+ 2 - 1
.vscode/settings.json

@@ -7,5 +7,6 @@
   "files.associations": {
     "*.css": "postcss"
   },
-  "editor.formatOnSave": false
+  "editor.formatOnSave": false,
+  "vue.features.codeActions.enable": false
 }

+ 46 - 10
src/components/leftSider/index.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="leftSideMenu">
-    <el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
+    <!-- @open="handleOpen" @close="handleClose" -->
+    <el-menu  class="el-menu-vertical-demo" :default-active="props.activeIndex" :collapse-transition="false" :default-openeds="openeds" @select="selectMenu">
           <el-sub-menu index="1">
             <template #title>
               <el-icon>
@@ -8,13 +9,12 @@
               </el-icon>
               <span>成绩分析</span>
             </template>
-            <el-menu-item-group title="">
-              <el-menu-item index="1-1">成绩单</el-menu-item>
+
+              <el-menu-item index="1-1" >成绩单</el-menu-item>
               <el-menu-item index="1-2">三率一分</el-menu-item>
               <el-menu-item index="1-3">分数段统计</el-menu-item>
               <el-menu-item index="1-4">平均分离差分析</el-menu-item>
               <el-menu-item index="1-5">教师统计</el-menu-item>
-            </el-menu-item-group>
           </el-sub-menu>
           <el-sub-menu index="2">
             <template #title>
@@ -23,10 +23,8 @@
               </el-icon>
               <span>试卷分析</span>
             </template>
-            <el-menu-item-group title="">
               <el-menu-item index="2-1">总体分析</el-menu-item>
-              <el-menu-item index="2-1">客观题分析</el-menu-item>
-            </el-menu-item-group>
+              <el-menu-item index="2-2">客观题分析</el-menu-item>
           </el-sub-menu>
 
         </el-menu>
@@ -37,18 +35,56 @@
 import { useRouter } from "vue-router";
 const router = useRouter();
 import { Document, Location, Setting} from '@element-plus/icons-vue';
+import { defineProps,defineEmits } from 'vue';
+const props = defineProps(['activeIndex']);
+const emit = defineEmits(['parentClick'])
+
+
+const isCollapse = ref(false)
+const openeds = ref(['1-1', '1-2', '1-3', '1-4', '1-5', '2-1', '2-2']);
+
+const selectMenu = (key: string, keyPath: string[]) => {
+  console.log(key);
+  emit('parentClick', key);
+  switch (key) {
+    case '1-1'://成绩单
+      router.push('cjfx_cjd')
+      break;
+    case '1-2'://三率一分
+      router.push('cjfx_slyf')
+      break;
+    case '1-3'://分数段统计
+      router.push('cjfx_fsdtj')
+      break;
+    case '1-4'://平均分离差分析
+      router.push('cjfx_pjflcfx')
+      break;
+    case '1-5'://教师统计
+      router.push('cjfx_jstj')
+      break;
+    case '2-1'://总体分析
+      router.push('sjfx_ztfx')
+      break;
+    case '2-1'://客观题分析
+      router.push('sjfx_kgtfx')
+      break;
+  }
+}
+
+
+
 
 
 
 //开启
 const handleOpen = (key: string, keyPath: string[]) => {
-  console.log(key, keyPath)
+  console.log(key, keyPath,"open");
 }
-
 const handleClose = (key: string, keyPath: string[]) => {
-  console.log(key, keyPath)
+  console.log(key, keyPath,"close")
 }
 
+
 </script>
 
 <style lang="scss" scoped>

+ 9 - 1
src/pages/ksfx/cjfx_cjd.vue

@@ -5,7 +5,7 @@
 
     <div class="w-1200px m-auto flex flex-row justify-between">
       <div class="w-188">
-        <leftSider />
+        <leftSider :activeIndex="activeIndex"  @parentClick="parentClick"/>
       </div>
 
       <div class="w-942 p-4 blueBg">
@@ -131,6 +131,14 @@ let school_list = [{
   label: '学校2'
 }]
 
+
+const activeIndex =ref('1-1');
+
+const parentClick = (val) => {
+  activeIndex.value = val;
+}
+
+
 let listTitleShow = {
   kh: "考号",
   xm: "姓名",

+ 8 - 1
src/pages/ksfx/cjfx_fsdtj.vue

@@ -5,7 +5,7 @@
 
     <div class="w-1200px m-auto flex flex-row justify-between">
       <div class="w-188px">
-        <leftSider />
+        <leftSider :activeIndex="activeIndex"  @parentClick="parentClick"/>
       </div>
 
       <div class="w-1012px p-4 blueBg">
@@ -105,6 +105,13 @@ let school_list = [{
   label: '学校2'
 }]
 
+
+const activeIndex =ref('1-3');
+
+const parentClick = (val) => {
+  activeIndex.value = val;
+}
+
 let echartData = {
   xAxis_data: ['[0-10]', '[10-20]', '[20-30]', '[30-40]', '[40-50]', '[50-60]', '[60-70]'],
   series_data:[120,200,200,150,80,70,110,130]

+ 8 - 1
src/pages/ksfx/cjfx_jstj.vue

@@ -5,7 +5,7 @@
 
     <div class="w-1200px m-auto flex flex-row justify-between">
       <div class="w-188px">
-        <leftSider />
+        <leftSider :activeIndex="activeIndex"  @parentClick="parentClick"/>
       </div>
 
       <div class="w-1012px p-4 blueBg">
@@ -105,6 +105,13 @@ onMounted(() => {
 
 
 
+const activeIndex =ref('1-6');
+
+const parentClick = (val) => {
+  activeIndex.value = val;
+}
+
+
 const tableData = [
   {
     xx: "临沂市蒙阴县乡镇小学",

+ 8 - 1
src/pages/ksfx/cjfx_pjflcfx.vue

@@ -5,7 +5,7 @@
 
     <div class="w-1200px m-auto flex flex-row justify-between">
       <div class="w-188px">
-        <leftSider />
+        <leftSider :activeIndex="activeIndex"  @parentClick="parentClick"/>
       </div>
 
       <div class="w-1012px p-4 blueBg">
@@ -91,6 +91,13 @@ let school_list = [{
   label: '学校2'
 }]
 
+
+const activeIndex =ref('1-4');
+
+const parentClick = (val) => {
+  activeIndex.value = val;
+}
+
 let ecahrtData = {
   xAxis_data: ['蒙阴县市级中小学', '蒙阴县市级中小学', '蒙阴县市级中小学', '蒙阴县市级中小学', '蒙阴县市级中小学', '蒙阴县市级中小学', '蒙阴县市级中小学'],
   series:[

+ 8 - 1
src/pages/ksfx/cjfx_slyf.vue

@@ -5,7 +5,7 @@
 
     <div class="w-1200px m-auto flex flex-row justify-between">
       <div class="w-188px">
-        <leftSider />
+        <leftSider :activeIndex="activeIndex"  @parentClick="parentClick"/>
       </div>
 
       <div class="w-1012px p-4 overflow-visible blueBg">
@@ -151,6 +151,13 @@ let school_list = [{
   label: '学校2'
 }]
 
+
+const activeIndex =ref('1-2');
+
+const parentClick = (val) => {
+  activeIndex.value = val;
+}
+
 const tableData = [
   {
   xx: "总体",

+ 8 - 2
src/pages/ksfx/sjfx_kgtfx.vue

@@ -5,7 +5,7 @@
 
     <div class="w-1200px m-auto flex flex-row justify-between">
       <div class="w-188px">
-        <leftSider />
+        <leftSider :activeIndex="activeIndex"  @parentClick="parentClick"/>
       </div>
 
       <div class="w-1012px p-4 blueBg">
@@ -107,6 +107,13 @@ let school_list = [{
   label: '学校2'
 }]
 
+const activeIndex =ref('2-2');
+
+const parentClick = (val) => {
+  activeIndex.value = val;
+}
+
+
 let barChartData = {
   xAxis_data: ['选项A', '选项B', '选项C', '选项D'],
   series_data:[120,200,200,150]
@@ -125,7 +132,6 @@ let circleChartData = {
 onMounted(() => {
   initbarChart();
   initcircleChart();
-
 })
 const initbarChart = () => {
   var myChart = echarts.init(document.getElementById('barChart'));

+ 7 - 1
src/pages/ksfx/sjfx_ztfx.vue

@@ -5,7 +5,7 @@
 
     <div class="w-1200px m-auto flex flex-row justify-between">
       <div class="w-188px">
-        <leftSider />
+        <leftSider :activeIndex="activeIndex"  @parentClick="parentClick"/>
       </div>
 
       <div class="w-1012px p-4 blueBg">
@@ -156,6 +156,12 @@ onMounted(() => {
 
 })
 
+const activeIndex =ref('2-1');
+
+const parentClick = (val) => {
+  activeIndex.value = val;
+}
+
 const tableDataZtcjfx = [{
   mx:122,
   pjf:87.45,

+ 30 - 103
src/pages/ksfx/stu_grcjd.vue

@@ -55,7 +55,7 @@
 
 <script setup lang="ts">
 import * as echarts from 'echarts';
-import {student_grcjd_list} from "~/pages/process/api";
+import {student_grcjd_list} from "@/pages/ksfx/api";
 
 import { useRouter } from "vue-router";
 import { skeletonProps } from 'element-plus';
@@ -72,105 +72,37 @@ let subject_list = [{
   label: '数学'
 }]
 
-const tableData = [
-  {
-    km: '语文',
-    mf: '1',
-    cj: '选择题',
-
-    bj_pjf:120,
-    bj_zgf:120,
-    nj_pjf:120,
-    nj_zgf:120,
-    ztks_pjf:120,
-    ztks_zgf:120,
-
-   bj_pjf:120,
-    bj_zgf:120,
-    nj_pjf:120,
-    nj_zgf:120,
-    ztks_pjf:120,
-    ztks_zgf:120,
-  },
-  {
-    km: '语文',
-    mf: '1',
-    cj: '选择题',
-
-   bj_pjf:120,
-    bj_zgf:120,
-    nj_pjf:120,
-    nj_zgf:120,
-    ztks_pjf:120,
-    ztks_zgf:120,
-  },
-  {
-    km: '语文',
-    mf: '1',
-    cj: '选择题',
-
-   bj_pjf:120,
-    bj_zgf:120,
-    nj_pjf:120,
-    nj_zgf:120,
-    ztks_pjf:120,
-    ztks_zgf:120,
-  },
-  {
-    km: '语文',
-    mf: '1',
-    cj: '选择题',
-
-   bj_pjf:120,
-    bj_zgf:120,
-    nj_pjf:120,
-    nj_zgf:120,
-    ztks_pjf:120,
-    ztks_zgf:120,
-  },
-  {
-    km: '语文',
-    mf: '1',
-    cj: '选择题',
-
-   bj_pjf:120,
-    bj_zgf:120,
-    nj_pjf:120,
-    nj_zgf:120,
-    ztks_pjf:120,
-    ztks_zgf:120,
-  },
-  {
-    km: '语文',
-    mf: '1',
-    cj: '选择题',
-
-   bj_pjf:120,
-    bj_zgf:120,
-    nj_pjf:120,
-    nj_zgf:120,
-    ztks_pjf:120,
-    ztks_zgf:120,
-  },
-  {
-    km: '语文',
-    mf: '1',
-    cj: '选择题',
-
-   bj_pjf:120,
-    bj_zgf:120,
-    nj_pjf:120,
-    nj_zgf:120,
-    ztks_pjf:120,
-    ztks_zgf:120,
-  },
-]
+const tableData =ref([])
+
+//导出
+const exportBtn = () => {
+  console.log("导出")
+}
 
 onMounted(() => {
-  initChart()
+  initData();
 })
 
-const initChart = () => {
+const initData = () => {
+  let transObj = {
+    xueke_id: '',
+    grade_id: '',
+    school_id: ''
+  }
+  student_grcjd_list(transObj)
+    .then(res => {
+      if (res.code == "1") {
+        console.log(res)
+        tableData.value = res.data.data.tableData;
+        initChart(res.data.data.ecahrtData);
+      }
+    })
+    .catch(error => {
+      console.log(error);
+    })
+}
+
+const initChart = (item) => {
   var myChart = echarts.init(document.getElementById('echartData'));
   myChart.setOption({
     title: {
@@ -183,7 +115,7 @@ const initChart = () => {
       containLabel: true
     },
     xAxis: {
-      data: ['语文', '语文', '语文', '语文', '语文', '语文', '语文']
+      data: item.xAxis_data
     },
     yAxis: {
       type: 'value',
@@ -209,17 +141,12 @@ const initChart = () => {
             }
           }
         },
-        data: [120,200,200,150,80,70,110,130],
+        data: item.series_data,
       }
     ]
   });
 }
 
-//导出
-const exportBtn = () => {
-  console.log("导出")
-}
-
 
 
 </script>

+ 25 - 100
src/pages/ksfx/stu_stfx.vue

@@ -22,6 +22,7 @@
 
         <div class="h-auto mt-9px listMain">
           <el-table :data="tableData" style="width: 100%" height="auto">
+
             <el-table-column prop="xk" label="学科" />
             <el-table-column prop="tm" label="题目" />
             <el-table-column prop="lx" label="类型" />
@@ -31,10 +32,11 @@
 
             <el-table-column label="得分率" fixed="right">
               <el-table-column prop="gr" label="个人" />
-              <el-table-column prop="bj" label="班级"  />
-              <el-table-column prop="bj" label="年级"  />
-              <el-table-column prop="ztks" label="整体考试" />
+              <el-table-column prop="bj" label="班级" />
+              <el-table-column prop="bj" label="年级" />
+              <el-table-column prop="ztks" label="整体考试"/>
             </el-table-column>
+
           </el-table>
 
         </div>
@@ -46,9 +48,8 @@
 </template>
 
 <script setup lang="ts">
-import {student_stfx_list} from "~/pages/process/api";
+import {student_stfx_list} from "@/pages/ksfx/api";
 import { useRouter } from "vue-router";
-import { skeletonProps } from 'element-plus';
 const router = useRouter();
 
 let StuLeftMenuNum = 0;
@@ -62,101 +63,25 @@ let subject_list = [{
   label: '数学'
 }]
 
-const tableData = [
-  {
-   xk: '语文',
-    tm: '1',
-    lx: '选择题',
-    nd: '5',
-    df: '12',
-    grdf: '12',
-
-    gr: '23%',
-    bj: '23%',
-    nj: '23%',
-    ztks:'23%',
-  },
-  {
-   xk: '语文',
-    tm: '1',
-    lx: '选择题',
-    nd: '5',
-    df: '12',
-    grdf: '12',
-
-    gr: '23%',
-    bj: '23%',
-    nj: '23%',
-    ztks:'23%',
-  },
-  {
-   xk: '语文',
-    tm: '1',
-    lx: '选择题',
-    nd: '5',
-    df: '12',
-    grdf: '12',
-
-    gr: '23%',
-    bj: '23%',
-    nj: '23%',
-    ztks:'23%',
-  },
-  {
-   xk: '语文',
-    tm: '1',
-    lx: '选择题',
-    nd: '5',
-    df: '12',
-    grdf: '12',
-
-    gr: '23%',
-    bj: '23%',
-    nj: '23%',
-    ztks:'23%',
-  },
-  {
-   xk: '语文',
-    tm: '1',
-    lx: '选择题',
-    nd: '5',
-    df: '12',
-    grdf: '12',
-
-    gr: '23%',
-    bj: '23%',
-    nj: '23%',
-    ztks:'23%',
-  },
-  {
-   xk: '语文',
-    tm: '1',
-    lx: '选择题',
-    nd: '5',
-    df: '12',
-    grdf: '12',
-
-    gr: '23%',
-    bj: '23%',
-    nj: '23%',
-    ztks:'23%',
-  },
-  {
-   xk: '语文',
-    tm: '1',
-    lx: '选择题',
-    nd: '5',
-    df: '12',
-    grdf: '12',
-
-    gr: '23%',
-    bj: '23%',
-    nj: '23%',
-    ztks:'23%',
-  },
-]
-
-
+const tableData = ref([]);
+onMounted(() => {
+  initData()
+})
+
+const initData = () => {
+  let transObj = {
+    xueke_id: '',
+    grade_id: '',
+    school_id:''
+  }
+  student_stfx_list(transObj)
+    .then(res => {
+      if (res.code == "1") {
+        tableData.value = res.data.data.tableData;
+      }
+    })
+    .catch(error => { console.log(error) });
+}
 
 //导出
 const exportBtn = () => {

+ 2 - 8
src/pages/ksfx/stu_wdsj.vue

@@ -7,14 +7,8 @@
 
       <div class="w-1012px p-12 blueBg">
 
-        <swiper :modules="modules" :pagination="{ clickable: true }">
-          <swiper-slide>
-            <img :src="examIcon" srcset="">
-          </swiper-slide>
-          <swiper-slide>
-            <img :src="examIcon" srcset="">
-          </swiper-slide>
-          <swiper-slide>
+        <swiper class="h-300px text-center" :modules="modules" :pagination="{ clickable: true }">
+          <swiper-slide v-for="(item,index) in 5" :key="index">
             <img :src="examIcon" srcset="">
           </swiper-slide>
         </swiper>