Explorar el Código

筛选接口换字段

la hace 2 años
padre
commit
490f3b0129

+ 5 - 4
src/components/optionSelect/index.vue

@@ -63,13 +63,14 @@ const initOption = () => {
 
         //
         schoolAndClass.value = res.data.one_info.school_and_class;
-        //联考下的学科-从lc下取值
-        let allLc = res.data.one_info.lc;
+        //联考下的学科-从lc_filter下取值
+
+        let allLc = res.data.one_info.lc_filter;
         let temp_xueke: { value: any; label: any; }[] = [];
         allLc.forEach((item: { ze_id: any; ykl_lc: string; }) => {
           temp_xueke.push({
             value: item.ze_id,
-            label: JSON.parse(item.ykl_lc).ze_xueke_name
+            label: item.ze_xueke_name
           })
         })
         subject_list.value = temp_xueke;
@@ -80,7 +81,7 @@ const initOption = () => {
 }
 
 // 筛选点击
-const handelOption = (value,marke) => {
+const handelOption = (value, marke) => {
   emit('optionClick', value,marke);
 }
 

+ 1 - 38
src/pages/ksfx/cjfx_cjd/[ykj_id].vue

@@ -161,46 +161,9 @@ let listShow = ref([
 ykjId.value = route.params.ykj_id;
 
 onMounted(() => {
-  initOption();
   initData();
 })
-// 初始化选项列表
-const initOption = () => {
-  let transObj = {
-    ykj_id:route.params.ykj_id,
-  }
-
-  ksjh_detail(transObj)
-    .then(res => {
-      if (res.code == "1") {
-        //初始化联考学校
-        let linkao_scholl = res.data.one_info.ykj_lkxx_ex;
-        let temp_school: { value: any; label: any; }[] = [];
-        linkao_scholl.forEach((item: { sm_id: any; sm_name: any; }) => {
-          temp_school.push({
-            value: item.sm_id,
-            label: item.sm_name
-          })
-        });
-        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; }[] = [];
-        allLc.forEach((item: { ze_id: any; ykl_lc: string; }) => {
-          temp_xueke.push({
-            value: item.ze_id,
-            label: JSON.parse(item.ykl_lc).ze_xueke_name
-          })
-        })
-        subject_list.value = temp_xueke;
 
-      }
-    })
-    .catch(error => { console.log(error) })
-}
 const school_id = ref("");
 const grade_id = ref("");
 const xueke_id = ref("");
@@ -226,6 +189,7 @@ const initData =() => {
 
 //option筛选
 const optionClick = (val: any, marke: any) => {
+
   if (marke == "scholl") {
     school_id.value = val;
   } else if (marke == "grade") {
@@ -234,7 +198,6 @@ const optionClick = (val: any, marke: any) => {
     xueke_id.value = val;
   }
   initData();
-  console.log(val,marke,"98789");
 }
 
 //导出

+ 76 - 158
src/pages/ksfx/sjfx_kgtfx/[ykj_id].vue

@@ -5,7 +5,7 @@
 
     <div class="w-1200px m-auto flex flex-row justify-between">
       <div class="w-188px">
-        <leftSider :ykjId="ykjId" :activeIndex="activeIndex"  @parentClick="parentClick"/>
+        <leftSider :ykjId="ykjId" :activeIndex="activeIndex" @parentClick="parentClick" />
       </div>
 
       <div class="w-1012px p-4 blueBg">
@@ -17,6 +17,11 @@
             <el-option v-for="item in school_list" :key="item.value" :label="item.label" :value="item.value" />
           </el-select>
 
+          <el-select class="mr-10px" v-model="normal_school" placeholder="请选择学科" size="large">
+            <el-option label="全部" value="0" />
+            <el-option v-for="item in school_list" :key="item.value" :label="item.label" :value="item.value" />
+          </el-select>
+
           <el-select class="mr-10px" v-model="normal_topic" placeholder="请选择题目" size="large">
             <el-option label="全部" value="0" />
             <el-option v-for="item in topic_list" :key="item.value" :label="item.label" :value="item.value" />
@@ -31,9 +36,9 @@
           </div>
           <div class="mt-4 exportBtn" style="text-align: right;">
             <el-button color="#003eee" type="primary" size="large" @click="openDialog">详情</el-button>
-        </div>
+          </div>
           <div class="w-full h-388px flex">
-            <div class=" w-1/2 h-full left_chart"  id="barChart"></div>
+            <div class=" w-1/2 h-full left_chart" id="barChart"></div>
             <div class=" w-1/2 h-full right_chart" id="circleChart"></div>
           </div>
 
@@ -46,26 +51,26 @@
 
     <commonFooter />
 
-      <!-- dialog  -->
-      <el-dialog v-model="dialogTableVisible" title="" style="width: 90%;">
-       <div class="mainShow">
-          <div class="mainShow_single" v-for="(item,index) in dialogArr " :key="index">
-            <p>{{ item.option }}<span>({{ item.stuNum }})</span>人:</p>
-            <ul class="flex flex-wrap">
-              <li v-for="(secItem,secIndex) in item.detail" :key="secIndex">
-                <span>{{secItem.stuSchool  }}</span>
-                <span>{{ secItem.classRomm }}</span>
-                <span>{{ secItem.stuName }}</span>
-              </li>
-            </ul>
-          </div>
-       </div>
-        <template #footer>
-          <span class="dialog-footer">
-            <el-button type="primary" color="#003eee" @click="dialogTableVisible = false">关闭</el-button>
-          </span>
-        </template>
-      </el-dialog>
+    <!-- dialog  -->
+    <el-dialog v-model="dialogTableVisible" title="" style="width: 90%;">
+      <div class="mainShow">
+        <div class="mainShow_single" v-for="(item, index) in dialogArr " :key="index">
+          <p>{{ item.option }}<span>({{ item.stuNum }})</span>人:</p>
+          <ul class="flex flex-wrap">
+            <li v-for="(secItem, secIndex) in item.detail" :key="secIndex">
+              <span>{{ secItem.stuSchool }}</span>
+              <span>{{ secItem.classRomm }}</span>
+              <span>{{ secItem.stuName }}</span>
+            </li>
+          </ul>
+        </div>
+      </div>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button type="primary" color="#003eee" @click="dialogTableVisible = false">关闭</el-button>
+        </span>
+      </template>
+    </el-dialog>
 
   </div>
 </template>
@@ -79,9 +84,7 @@
 </route>
 <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 { cjfx_kgtfx_list } from '../apiItem';
 const route = useRoute();
 
 let normal_topic = ref("");
@@ -103,7 +106,7 @@ let topic_list = ref([{
   label: '客观题'
 }]);
 
-const activeIndex =ref('2-2');
+const activeIndex = ref('2-2');
 const ykjId = ref();
 const parentClick = (val: string) => {
   activeIndex.value = val;
@@ -127,7 +130,7 @@ const initData = () => {
         initcircleChart(res.data.data.circleChartData);
       }
     })
-  .catch(error=>{console.log(error)})
+    .catch(error => { console.log(error) })
 }
 
 const initbarChart = (barChartData: { xAxis_data: any; series_data: any; }) => {
@@ -177,46 +180,46 @@ const initbarChart = (barChartData: { xAxis_data: any; series_data: any; }) => {
 const initcircleChart = (circleChartData: { series_name: any; series_data: any; }) => {
   var myChart = echarts.init(document.getElementById('circleChart'));
   myChart.setOption({
-  tooltip: {
-    trigger: 'item'
-  },
-  legend: {
-    itemWidth: 10,
-    itemHeight: 10,
-    itemGap: 40,
-    icon: "circle",
-    orient: 'vertical',
-    textStyle: {
-      fontSize: 12,
-      color: '#171721'
+    tooltip: {
+      trigger: 'item'
     },
-    x: 'right',
-    y: 'center'
-  },
-  series: [
-    {
-      name: circleChartData.series_name,
-      type: 'pie',
-      radius: ['40%', '70%'],
-      avoidLabelOverlap: false,
-      label: {
-        show: false,
-        position: 'center'
+    legend: {
+      itemWidth: 10,
+      itemHeight: 10,
+      itemGap: 40,
+      icon: "circle",
+      orient: 'vertical',
+      textStyle: {
+        fontSize: 12,
+        color: '#171721'
       },
-      emphasis: {
+      x: 'right',
+      y: 'center'
+    },
+    series: [
+      {
+        name: circleChartData.series_name,
+        type: 'pie',
+        radius: ['40%', '70%'],
+        avoidLabelOverlap: false,
         label: {
-          show: true,
-          fontSize: 40,
-          fontWeight: 'bold'
-        }
-      },
-      labelLine: {
-        show: false
-      },
-      data: circleChartData.series_data
-    }
-  ]
-});
+          show: false,
+          position: 'center'
+        },
+        emphasis: {
+          label: {
+            show: true,
+            fontSize: 40,
+            fontWeight: 'bold'
+          }
+        },
+        labelLine: {
+          show: false
+        },
+        data: circleChartData.series_data
+      }
+    ]
+  });
 }
 
 const dialogTableVisible = ref(false)
@@ -232,72 +235,7 @@ let dialogArr = [
       {
         stuSchool: "苏州小学",
         classRomm: "初一(2)班",
-        stuName:"张大大",
-      },
-      {
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      },{
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      },
-      {
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      },
-      {
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      },{
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      },
-      {
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      },
-      {
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      },{
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      },
-      {
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      },
-      {
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      },{
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      },
-      {
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      },
-      {
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      },{
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
+        stuName: "张大大",
       }
     ]
   },
@@ -308,16 +246,16 @@ let dialogArr = [
       {
         stuSchool: "苏州小学",
         classRomm: "初一(2)班",
-        stuName:"张大大",
+        stuName: "张大大",
       },
       {
         stuSchool: "苏州小学",
         classRomm: "初一(2)班",
-        stuName:"张大大",
-      },{
+        stuName: "张大大",
+      }, {
         stuSchool: "苏州小学",
         classRomm: "初一(2)班",
-        stuName:"张大大",
+        stuName: "张大大",
       }
     ]
   },
@@ -328,18 +266,8 @@ let dialogArr = [
       {
         stuSchool: "苏州小学",
         classRomm: "初一(2)班",
-        stuName:"张大大",
-      },
-      {
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      },{
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      }
-    ]
+        stuName: "张大大",
+      }]
   },
   {
     option: "选项D",
@@ -348,16 +276,7 @@ let dialogArr = [
       {
         stuSchool: "苏州小学",
         classRomm: "初一(2)班",
-        stuName:"张大大",
-      },
-      {
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
-      },{
-        stuSchool: "苏州小学",
-        classRomm: "初一(2)班",
-        stuName:"张大大",
+        stuName: "张大大",
       }
     ]
   }
@@ -369,5 +288,4 @@ let dialogArr = [
 
 <style lang="scss" scoped>
 @import '@/styles/ksfx.css';
-
 </style>