Browse Source

三率一分新增字段 总体分析 新增分页

la 1 year ago
parent
commit
0a972a61e7

+ 7 - 0
src/pages/ksfx/apiItem.js

@@ -95,6 +95,13 @@ export const cjfx_ztfx_list = (data = {}) => {
     data,
   })
 }
+//成绩分析-总体分析_详情
+export const cjfx_ztfx_list_detail = (data = {}) => {
+  return request({
+    url: '/openapi/echart/total_data_detail.php',
+    data,
+  })
+}
 
 //成绩分析-客观题分析_列表
 export const cjfx_kgtfx_list = (data = {}) => {

+ 4 - 2
src/pages/ksfx/cjfx_cjd/[ykj_id].vue

@@ -3,7 +3,7 @@
     <NavHeader />
     <bread-crumb />
 
-    <div class="w-1200px m-auto flex flex-row justify-between">
+    <div class="w-1200px m-auto flex flex-row justify-between mainCotent">
       <div class="w-188px">
         <leftSider :activeIndex="activeIndex" :ykjId="ykjId"  @parentClick="parentClick"/>
       </div>
@@ -142,7 +142,9 @@ const exportBtn = () => {
 .whiteBG {
   background: #fff;
 }
-
+.mainCotent{
+  min-height:665px;
+}
 .singlepart {
   background-color: rgba($color: #ffffff, $alpha: 0.2);
   color: #fff;

+ 19 - 7
src/pages/ksfx/cjfx_slyf/[ykj_id].vue

@@ -3,7 +3,7 @@
     <NavHeader />
     <bread-crumb />
 
-    <div class="w-1200px m-auto flex flex-row justify-between">
+    <div class="w-1200px m-auto flex flex-row justify-between mainCotent">
       <div class="w-188px">
         <leftSider :ykjId="ykjId" :activeIndex="activeIndex"  @parentClick="parentClick"/>
       </div>
@@ -51,8 +51,8 @@
           </el-table>
 
           <div class="mt-4" >
-            <el-pagination background layout="prev, pager, next " :total="totalPage" style="justify-content: right;" />
-            </div>
+            <el-pagination background layout="prev, pager, next " :total="totalPage" style="justify-content: right;" :current-page="pageNum"  @current-change="handleCurrentChange"  />
+          </div>
 
         </div>
 
@@ -120,18 +120,20 @@ const searchVal = ref();
 
 
 const tableData = ref([]);
-const totalPage = ref();
-const pageNum = ref(0);
+const totalPage = ref(0);
+const pageNum = ref(1);
 ykjId.value = route.params.ykj_id;
 
 onMounted(() => {
   initData()
+  // initDataAll()
 })
 
 const school_id = ref("");
 const grade_id = ref("");
 const xueke_id = ref("");
 
+
 const initData =() => {
   let transObj = {
     school_id:school_id.value,
@@ -164,6 +166,12 @@ const optionClick = (val: any, marke: any) => {
   }
   initData();
 }
+//分页
+const handleCurrentChange=(val: number)=>{
+  pageNum.value = val;
+  // 在这里执行您的分页函数
+  initData();
+}
 //搜索
 const handleSearch = () => {
   initData();
@@ -192,7 +200,9 @@ const openDialog = () => {
 
 
 <style lang="scss" scoped>
-
+:deep(.el-pagination.is-background .el-pager li.is-active){
+  background-color: #003eee!important;
+}
 :deep(.el-input__wrapper) {
   height:40px;
 }
@@ -223,7 +233,9 @@ const openDialog = () => {
 .whiteBG {
   background: #fff;
 }
-
+.mainCotent{
+  min-height:665px;
+}
 .singlepart {
   background-color: rgba($color: #ffffff, $alpha: 0.2);
   color: #fff;

+ 20 - 7
src/pages/ksfx/sjfx_kgtfx/[ykj_id].vue

@@ -125,7 +125,6 @@ const initOption = () => {
     school_id:school_id.value,
     xueke_id: xueke_id.value,
     ykj_id: route.params.ykj_id,
-    
   }
 
   ksjh_detail(transObj)
@@ -142,8 +141,11 @@ const initOption = () => {
         });
         school_list.value = temp_school;
 
-        //联考下的学科-从lc_filter下取值
+        if (temp_school.length > 0) {
+          normal_school.value = temp_school[0].value;
+        }
 
+        //联考下的学科-从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; }) => {
@@ -154,6 +156,12 @@ const initOption = () => {
         })
         subject_list.value = temp_xueke;
 
+        if (temp_xueke.length > 0) {
+          normal_subject.value = temp_xueke[0].value;
+        }
+        //默认选中第一个学的第一个联考科目 请求题目
+        initTopic(temp_xueke[0].value)
+
       }
     })
     .catch(error => { console.log(error) })
@@ -176,7 +184,7 @@ const initData = () => {
     })
     .catch(error => { console.log(error) })
 }
-//初始化echarts
+//初始化echarts1
 const initbarChart = (barChartData: { xAxis_data: any; series_data: any; }) => {
   var myChart = echarts.init(document.getElementById('barChart'));
   myChart.setOption({
@@ -221,6 +229,7 @@ const initbarChart = (barChartData: { xAxis_data: any; series_data: any; }) => {
     ]
   });
 }
+//初始化echarts2
 const initcircleChart = (circleChartData: { series_name: any; series_data: any; }) => {
   var myChart = echarts.init(document.getElementById('circleChart'));
   myChart.setOption({
@@ -266,6 +275,9 @@ const initcircleChart = (circleChartData: { series_name: any; series_data: any;
   });
 }
 
+//
+
+
 const dialogTableVisible = ref(false)
 const openDialog = () => {
   dialogTableVisible.value = true;
@@ -332,18 +344,19 @@ const handelOption = (val, marklabel) => {
     school_id.value = val;
   } else if (marklabel == "subject") {
     xueke_id.value = val;
-    initTopic();
+    initTopic(val);
   } else {
     hq_id.value = val;
   }
   initData();
- 
+
 }
 
 // option 题目
-const initTopic = () => {
+const initTopic = (sjID) => {
   let transObj = {
-    zs_id:xueke_id.value
+    // zs_id:sjID,
+    zs_id:2727
   }
   normalToppic_list(transObj)
     .then(res => {

+ 67 - 30
src/pages/ksfx/sjfx_ztfx/[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">
@@ -21,7 +21,7 @@
             <el-table-column prop="ykrs" label="应考人数" />
             <el-table-column prop="skrs" label="实考人数" />
             <el-table-column prop="nd" label="难度" />
-            <el-table-column prop="qfd" label="区分度"/>
+            <el-table-column prop="qfd" label="区分度" />
             <el-table-column prop="bzc" label="标准差" />
             <el-table-column prop="qkrs" label="缺考人数" />
             <el-table-column prop="zgf" label="最高分" />
@@ -34,7 +34,7 @@
 
         <div class="flex mt-20px items-center">
 
-          <optionSelect  @optionClick="optionClick" />
+          <optionSelect @optionClick="optionClick" />
 
         </div>
         <div class="flex justify-between mt-4 exportBtn">
@@ -55,7 +55,7 @@
             <el-table-column prop="mf" label="满分" />
             <el-table-column prop="pjf" label="平均分" />
             <el-table-column prop="nd" label="难度" />
-            <el-table-column prop="qfd" label="区分度"  />
+            <el-table-column prop="qfd" label="区分度" />
             <el-table-column prop="bzc" label="标准差" />
             <el-table-column prop="gfzjf" label="高分组均分" />
             <el-table-column prop="zdzjf" label="中等组均分" />
@@ -68,25 +68,16 @@
           <div class="normalTit">
             <span>整体成绩分析</span>
           </div>
-          <el-table :data="tableData" style="width: 100%">
-            <el-table-column prop="xm" label="姓名" show-overflow-tooltip width="100" />
-            <el-table-column prop="xh" label="学号" show-overflow-tooltip width="100" />
-            <el-table-column prop="bj" label="班级" show-overflow-tooltip width="100" />
-            <el-table-column prop="zf" label="总分" />
-            <el-table-column prop="fir_0" label="1" />
-            <el-table-column prop="fir_1" label="2"  />
-            <el-table-column prop="fir_2" label="17-19" />
-            <el-table-column prop="sec_0" label="1" />
-            <el-table-column prop="sec_1" label="2"  />
-            <el-table-column prop="sec_2" label="17-19" />
-            <el-table-column prop="thr_0" label="1" />
-            <el-table-column prop="thr_1" label="2"  />
-            <el-table-column prop="thr_2" label="17-19" />
-
+          <el-table :data="tableDataAll">
+            <el-table-column v-for="column in columnsAll" :key="column.prop" :prop="column.prop" :label="column.label"
+              show-overflow-tooltip width="120"></el-table-column>
           </el-table>
 
         </div>
-
+        <div class="mt-4">
+          <el-pagination background layout="prev, pager, next " :total="totalPage" :page-size="limit" style="justify-content: right;"
+            :current-page="pageNum" @current-change="handleCurrentChange" />
+        </div>
       </div>
 
     </div>
@@ -103,12 +94,12 @@
 }
 </route>
 <script lang="ts" setup>
-import {cjfx_ztfx_list } from '../apiItem';
+import { cjfx_ztfx_list,cjfx_ztfx_list_detail } from '../apiItem';
 const route = useRoute();
 import { user } from "~/store";
 
 
-const activeIndex =ref('2-1');
+const activeIndex = ref('2-1');
 const ykjId = ref();
 const parentClick = (val: string) => {
   activeIndex.value = val;
@@ -117,31 +108,77 @@ const parentClick = (val: string) => {
 const tableDataZtcjfx = ref([]);
 const tableDataTmfx = ref()
 
-const tableData = ref();
+const tableDataAll = ref([
+  { xm: '迪丽热巴', xh: '1234567', bj: '初一(1)班', zf: '123', },
+  { xm: '迪丽热巴', xh: '1234567', bj: '初一(1)班', zf: '123', },
+]);
+const columnsAll = ref([
+  { prop: 'xm', label: '姓名' },
+  { prop: 'xh', label: '学号' },
+  { prop: 'bj', label: '班级' },
+  { prop: 'zf', label: '总分' },
+])
+
+
+const totalPage = ref(0);
+const pageNum = ref(1);
+const limit = ref(10);
+
 ykjId.value = route.params.ykj_id;
 onMounted(() => {
-  initData()
+  initData();
+  initDataAll();
 })
 
 const school_id = ref("");
 const grade_id = ref("");
 const xueke_id = ref("");
+
 const initData = () => {
   let transObj = {
-    school_id:school_id.value,
+    school_id: school_id.value,
     cm_id: grade_id.value,
     xueke_id: xueke_id.value,
-    jh_id:route.params.ykj_id
+    jh_id: route.params.ykj_id,
   }
   cjfx_ztfx_list(transObj)
     .then(res => {
       if (res.code == "1") {
         tableDataZtcjfx.value = res.data.data.tableDataZtcjfx;
         tableDataTmfx.value = res.data.data.tableDataTmfx;
-        tableData.value = res.data.data.tableData;
       }
     })
-  .catch(error=>{console.log(error)})
+    .catch(error => { console.log(error) })
+}
+
+//
+const initDataAll = () => {
+  let transObj = {
+    school_id: school_id.value,
+    cm_id: grade_id.value,
+    xueke_id: xueke_id.value,
+    jh_id: route.params.ykj_id,
+    page: pageNum.value,
+    limit: limit.value,
+  }
+  cjfx_ztfx_list_detail(transObj)
+    .then(res => {
+      if (res.code == "1") {
+        tableDataAll.value = res.data.data.page_data.tableDataAll;
+        columnsAll.value = res.data.data.page_data.columnsAll;
+        totalPage.value = res.data.data.total_rows * 1;
+        pageNum.value = res.data.data.page_now*1;
+        console.log(res,"alvis")
+      }
+    })
+    .catch(error => { console.log(error) });
+}
+
+//分页
+const handleCurrentChange = (val: number) => {
+  pageNum.value = val;
+  // 在这里执行您的分页函数
+  initDataAll();
 }
 
 //option筛选
@@ -154,13 +191,14 @@ const optionClick = (val: any, marke: any) => {
     xueke_id.value = val;
   }
   initData();
+  initDataAll();
 }
 
 //导出
 const exportBtn = () => {
   let prefixedUrl = window.GLOBAL_CONFIG.web_pc;
   let fullUrl = prefixedUrl + '/openapi/echart/total_data.php?api=xls&token=' + user.value.token;
-  window.open(fullUrl,'_blank')
+  window.open(fullUrl, '_blank')
 }
 
 </script>
@@ -168,5 +206,4 @@ const exportBtn = () => {
 
 <style lang="scss" scoped>
 @import '@/styles/ksfx.css';
-
 </style>

+ 3 - 0
src/styles/ksfx.css

@@ -1,3 +1,6 @@
+:deep(.el-pagination.is-background .el-pager li.is-active){
+  background-color: #003eee!important;
+}
 :deep(.el-sub-menu__title){
   background: #003eee;
   color: #fff;