la vor 2 Jahren
Ursprung
Commit
d56d8608b0

+ 8 - 7
src/components/leftSider/index.vue

@@ -43,9 +43,10 @@ import { defineProps,defineEmits } from 'vue';
 const props = defineProps(['activeIndex','ykjId']);
 const emit = defineEmits(['parentClick'])
 
-console.log(router)
+console.log(router,props)
+const fixedYkjId = ref(props.ykjId);
 const openeds = ref(['1-1', '1-2', '1-3', '1-4', '1-5', '2-1', '2-2']);
-
+console.log('fixedYkjId',fixedYkjId)
 //点击事件
 const selectMenu = (key: string, keyPath: string[]) => {
   emit('parentClick', key);
@@ -58,23 +59,23 @@ const selectMenu = (key: string, keyPath: string[]) => {
       break;
     case '1-2'://三率一分
       router.push(
-        { name: 'ksfx-cjfx_slyf-ykj_id', params: { ykj_id: props.ykjId } }
+        { name: 'ksfx-cjfx_slyf-ykj_id', params: { ykj_id: fixedYkjId.value } }
       )
       break;
     case '1-3'://分数段统计
       router.push({ name: 'ksfx-cjfx_fsdtj-ykj_id', params: {ykj_id:props.ykjId} })
       break;
     case '1-4'://平均分离差分析
-      router.push('cjfx_pjflcfx')
+      router.push({ name: 'ksfx-cjfx_pjflcfx-ykj_id', params: {ykj_id:props.ykjId} })
       break;
     case '1-5'://教师统计
-      router.push('cjfx_jstj')
+    router.push({ name: 'ksfx-cjfx_jstj-ykj_id', params: {ykj_id:props.ykjId} })
       break;
     case '2-1'://总体分析
-      router.push('sjfx_ztfx')
+    router.push({ name: 'ksfx-sjfx_ztfx-ykj_id', params: {ykj_id:props.ykjId} })
       break;
     case '2-2'://客观题分析
-      router.push('sjfx_kgtfx')
+    router.push({ name: 'ksfx-sjfx_kgtfx-ykj_id', params: {ykj_id:props.ykjId} })
       break;
   }
 }

+ 30 - 15
src/pages/ksfx/cjfx_cjd/[ykj_id].vue

@@ -120,30 +120,21 @@ let school_list = ref([{
   label: '学校1'
 }]);
 
-let classroom_list = [{
+let classroom_list =ref([{
   value: '1',
   label: '初一(1)班'
-}, {
-  value: '2',
-  label: '初一(2)班'
-}, {
-  value: '3',
-  label: '初一(3)班'
-}
-];
+}]) ;
 
 let subject_list = ref([{
   value: '1',
   label: '语文'
-}, {
-  value: '2',
-  label: '数学'
 }]);
 
+let schoolAndClass = ref([]);
 
 // 侧边栏点击
 const activeIndex = ref('1-1');
-let ykjId = ref('');
+let ykjId = ref();
 const parentClick = (val: string) => {
   activeIndex.value = val;
   ykjId.value = route.params.ykj_id;
@@ -193,9 +184,9 @@ let listShow = ref([
 ]);
 
 
+ykjId.value = route.params.ykj_id;
 
 onMounted(() => {
-  // ykjId.value = route.params.ykj_id;
   initOption();
   initData();
 })
@@ -220,7 +211,7 @@ const initOption = () => {
         school_list.value = temp_school;
 
         //
-
+        schoolAndClass.value = res.data.one_info.school_and_class;
         //联考下的学科-从lc下取值
         let allLc = res.data.one_info.lc;
         let temp_xueke: { value: any; label: any; }[] = [];
@@ -270,6 +261,30 @@ const handelSchool = (item) => {
   initData();
   //这里的联动缺失
   //..................
+  let aa = [
+    {
+      sm_id: "267",
+      sm_name: "aaa",
+      classes: [
+        {
+          cm_id: "8765",
+          cm_name:"bbbbb"
+        }
+      ]
+    }
+  ]
+  aa.forEach(element => {
+    let temp_classes: { value: string; label: string; }[] = [];
+    if (element.sm_id == item) {
+      element.classes.forEach(i => {
+        temp_classes.push({
+          value: i.cm_id,
+          label: i.cm_name
+        })
+      })
+    }
+    classroom_list.value = temp_classes;
+  })
 
 }
 //点击班级筛选

+ 5 - 7
src/pages/ksfx/cjfx_fsdtj/[ykj_id].vue

@@ -5,7 +5,7 @@
 
     <div class="w-1200px m-auto flex flex-row justify-between">
       <div class="w-188px">
-        <leftSider :activeIndex="activeIndex"  @parentClick="parentClick"/>
+        <leftSider :ykjId="ykjId" :activeIndex="activeIndex"  @parentClick="parentClick"/>
       </div>
 
       <div class="w-1012px p-4 blueBg">
@@ -49,10 +49,6 @@
         </div>
 
       </div>
-
-
-
-
     </div>
 
     <commonFooter />
@@ -71,6 +67,7 @@ import {cjfx_fsdtj_list } from '../apiItem';
 import * as echarts from 'echarts';
 import { useRouter } from "vue-router";
 const router = useRouter();
+const route = useRoute();
 
 let normal_subject = $ref("");
 let normal_classroom = $ref("");
@@ -106,9 +103,10 @@ let school_list = [{
 
 
 const activeIndex =ref('1-3');
-
+const ykjId = ref();
 const parentClick = (val) => {
   activeIndex.value = val;
+  ykjId.value = route.params.ykj_id;
 }
 
 let echartData = {
@@ -148,9 +146,9 @@ let classBaseInfoArr =ref( [
   }
 ]);
 
+ykjId.value = route.params.ykj_id;
 onMounted(() => {
   initData();
-
 })
 
 const initData =() => {

+ 7 - 59
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 :activeIndex="activeIndex"  @parentClick="parentClick"/>
+        <leftSider :ykjId="ykjId" :activeIndex="activeIndex"  @parentClick="parentClick"/>
       </div>
 
       <div class="w-1012px p-4 blueBg">
@@ -74,10 +74,10 @@
 }
 </route>
 <script lang="ts" setup>
-import {normalSchool_list,normalSubject_list,normalClassroom_list,cjfx_jstj_list } from './apiItem';
+import {cjfx_jstj_list } from '../apiItem';
 import { useRouter } from "vue-router";
 const router = useRouter();
-
+const route = useRoute();
 
 let normal_subject = $ref("");
 let normal_school = $ref("");
@@ -101,9 +101,10 @@ let school_list = [{
 }]
 
 const activeIndex =ref('1-6');
-
+const ykjId = ref();
 const parentClick = (val) => {
   activeIndex.value = val;
+  ykjId.value = route.params.ykj_id;
 }
 
 
@@ -124,64 +125,11 @@ const tableData = ref([
     jgl: '23.34%',
     dfrs: "23.43%",
     dfl: "23.34%",
-  },
-  {
-    xx: "临沂市蒙阴县乡镇小学",
-    js: "热巴",
-    xk: "语文",
-    pm: "1",
-    xpm: "23",
-    bj: "初一(2)班、初一(3)班初一(4)班",
-    pjf: "123.23",
-    skrs: "1234",
-    zgf: "132.22",
-    yxrs: "2637",
-    yxl: "23.34%",
-    jgrs: "4323",
-    jgl: '23.34%',
-    dfrs: "23.43%",
-    dfl: "23.34%",
-  },
-  {
-    xx: "临沂市蒙阴县乡镇小学",
-    js: "热巴",
-    xk: "语文",
-    pm: "1",
-    xpm: "23",
-    bj: "初一(2)班、初一(3)班初一(4)班",
-    pjf: "123.23",
-    skrs: "1234",
-    zgf: "132.22",
-    yxrs: "2637",
-    yxl: "23.34%",
-    jgrs: "4323",
-    jgl: '23.34%',
-    dfrs: "23.43%",
-    dfl: "23.34%",
-  },
-  {
-    xx: "临沂市蒙阴县乡镇小学",
-    js: "热巴",
-    xk: "语文",
-    pm: "1",
-    xpm: "23",
-    bj: "初一(2)班、初一(3)班初一(4)班",
-    pjf: "123.23",
-    skrs: "1234",
-    zgf: "132.22",
-    yxrs: "2637",
-    yxl: "23.34%",
-    jgrs: "4323",
-    jgl: '23.34%',
-    dfrs: "23.43%",
-    dfl: "23.34%",
-  }
-]);
-
+  }]);
 
+ykjId.value = route.params.ykj_id;
 onMounted(() => {
   initData();
-
 })
 
 const initData =() => {

+ 7 - 41
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 :activeIndex="activeIndex"  @parentClick="parentClick"/>
+        <leftSider :ykjId="ykjId" :activeIndex="activeIndex"  @parentClick="parentClick"/>
       </div>
 
       <div class="w-1012px p-4 blueBg">
@@ -65,9 +65,10 @@
 </route>
 <script lang="ts" setup>
 import * as echarts from 'echarts';
-import {normalSchool_list,normalSubject_list,normalClassroom_list,cjfx_pjflcfx_list } from './apiItem';
+import {normalSchool_list,normalSubject_list,normalClassroom_list,cjfx_pjflcfx_list } from '../apiItem';
 import { useRouter } from "vue-router";
 const router = useRouter();
+const route = useRoute();
 
 let normal_subject = $ref("");
 let normal_school = $ref("");
@@ -92,48 +93,13 @@ let school_list = [{
 
 
 const activeIndex =ref('1-4');
-
+const ykjId = ref();
 const parentClick = (val) => {
   activeIndex.value = val;
+  ykjId.value = route.params.ykj_id;
 }
 
-let ecahrtData = {
-  xAxis_data: ['蒙阴县市级中小学', '蒙阴县市级中小学', '蒙阴县市级中小学', '蒙阴县市级中小学', '蒙阴县市级中小学', '蒙阴县市级中小学', '蒙阴县市级中小学'],
-  series:[
-    {
-      name: 'Income',
-      type: 'bar',
-      stack: 'Total',
-      label: {
-        show: true
-      },
-      emphasis: {
-        focus: 'series'
-      },
-      data: [1.23, 1.23, -1.23, 1.23, 1.23, 1.23, 1.23]
-    },
-    {
-      name: 'Expenses',
-      type: 'bar',
-      stack: 'Total',
-      label: {
-        show: true,
-        position: 'left'
-      },
-      emphasis: {
-        focus: 'series'
-      },
-      data: [-1.23, -1.23, 1.23, -1.23, -1.23, -1.23, -1.23]
-    }
-  ]
-}
-
-let classArr = ref([
-  "学校",
-  "平均分",
-  "总均分",
-  "均分差离",
-]);
+let classArr = ref([]);
 
 let classBaseInfoArr = ref([
   {
@@ -162,9 +128,9 @@ let classBaseInfoArr = ref([
   },
 ]);
 
+ykjId.value = route.params.ykj_id;
 onMounted(() => {
   initData();
-
 })
 
 const initData =() => {

+ 5 - 44
src/pages/ksfx/cjfx_slyf/[ykj_id].vue

@@ -5,7 +5,7 @@
 
     <div class="w-1200px m-auto flex flex-row justify-between">
       <div class="w-188px">
-        <leftSider :activeIndex="activeIndex"  @parentClick="parentClick"/>
+        <leftSider :ykjId="ykjId" :activeIndex="activeIndex"  @parentClick="parentClick"/>
       </div>
 
       <div class="w-1012px p-4 overflow-visible blueBg">
@@ -154,56 +154,17 @@ let school_list = [{
 }]
 
 // 侧边栏点击
-const ykjId = ref('');
 const activeIndex =ref('1-2');
+const ykjId = ref();
 const parentClick = (val) => {
-  console.log(val,"898989")
   activeIndex.value = val;
   ykjId.value = route.params.ykj_id;
 }
 
-const tableData = ref([
-  {
-    xx: "总体",
-    bj: "初一(2)班",
-    pm: "1",
-    pjf: "87.45",
-    ykrs: "123",
-    skrs: "123",
-    zgf: "123",
-    yxrs: "98",
-    yxl: "89%",
-    jgrs: "98",
-    jgl: "89%",
-    dfrs: "23",
-    dfl: "90%",
-    nd: "0.92",
-    qfd: "0.92",
-    bzc: "87.45",
-  },
-  {
-    xx: "临沂市蒙阴县乡镇小学",
-    bj: "初一(2)班",
-    pm: "1",
-    pjf: "87.45",
-    ykrs: "123",
-    skrs: "123",
-    zgf: "123",
-    yxrs: "98",
-    yxl: "89%",
-    jgrs: "98",
-    jgl: "89%",
-    dfrs: "23",
-    dfl: "90%",
-    nd: "0.92",
-    qfd: "0.92",
-    bzc: "87.45",
-
-  },
-]);
+const tableData = ref([]);
+ykjId.value = route.params.ykj_id;
 
 onMounted(() => {
-  ykjId.value = route.params.ykj_id;
   initData()
 })
 
@@ -216,7 +177,7 @@ const initData =() => {
   cjfx_slyf_list(transObj)
     .then(res => {
       if (res.code == "1") {
-        tableData.value = res.data.data.tableData;
+        tableData.value = res.data.tableData;
       }
     })
   .catch(error=>{console.log(error)})

+ 6 - 5
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 :activeIndex="activeIndex"  @parentClick="parentClick"/>
+        <leftSider :ykjId="ykjId" :activeIndex="activeIndex"  @parentClick="parentClick"/>
       </div>
 
       <div class="w-1012px p-4 blueBg">
@@ -80,11 +80,11 @@
 <script lang="ts" setup>
 import * as echarts from 'echarts';
 import { skeletonProps } from 'element-plus';
-import {normalSchool_list,normalSubject_list,normalClassroom_list,cjfx_kgtfx_list } from './apiItem';
+import {normalSchool_list,normalSubject_list,normalClassroom_list,cjfx_kgtfx_list } from '../apiItem';
 
 import { useRouter } from "vue-router";
 const router = useRouter();
-
+const route = useRoute();
 
 let normal_topic = $ref("");
 let normal_school = $ref("");
@@ -107,11 +107,12 @@ let school_list = [{
 
 
 const activeIndex =ref('2-2');
-
+const ykjId = ref();
 const parentClick = (val) => {
   activeIndex.value = val;
+  ykjId.value = route.params.ykj_id;
 }
-
+ykjId.value = route.params.ykj_id;
 onMounted(() => {
   initData()
 })

+ 6 - 6
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 :activeIndex="activeIndex"  @parentClick="parentClick"/>
+        <leftSider :ykjId="ykjId" :activeIndex="activeIndex"  @parentClick="parentClick"/>
       </div>
 
       <div class="w-1012px p-4 blueBg">
@@ -116,10 +116,10 @@
 }
 </route>
 <script lang="ts" setup>
-import {normalSchool_list,normalSubject_list,normalClassroom_list,cjfx_ztfx_list } from './apiItem';
+import {normalSchool_list,normalSubject_list,normalClassroom_list,cjfx_ztfx_list } from '../apiItem';
 import { useRouter } from "vue-router";
 const router = useRouter();
-
+const route = useRoute();
 
 let normal_subject = $ref("");
 let normal_school = $ref("");
@@ -157,9 +157,10 @@ let classroom_list = [{
 
 
 const activeIndex =ref('2-1');
-
+const ykjId = ref();
 const parentClick = (val) => {
   activeIndex.value = val;
+  ykjId.value = route.params.ykj_id;
 }
 
 const tableDataZtcjfx = ref([]);
@@ -208,7 +209,7 @@ const tableDataTmfx = ref()
 
 
 const tableData = ref();
-
+ykjId.value = route.params.ykj_id;
 onMounted(() => {
   initData()
 })
@@ -226,7 +227,6 @@ const initData = () => {
         tableDataTmfx.value = res.data.data.tableDataTmfx;
         tableData.value = res.data.data.tableData;
       }
-      console.log(res,"87654321")
     })
   .catch(error=>{console.log(error)})
 }