zhangjie vor 2 Jahren
Ursprung
Commit
6528539d90

+ 2 - 2
src/components/Layout.vue

@@ -13,12 +13,12 @@
               顶级机构管理
             </router-link>
           </a-menu-item>
-          <a-menu-item v-if="store.isGreaterThanEqualRootOrgAdmin" key="12">
+          <a-menu-item v-if="store.isSuperAdmin" key="12">
             <router-link activeClass="active-route" to="/basic/subOrg">
               机构管理
             </router-link>
           </a-menu-item>
-          <a-menu-item v-if="store.isGreaterThanEqualRootOrgAdmin" key="13">
+          <a-menu-item v-if="store.isSuperAdmin" key="13">
             <router-link activeClass="active-route" to="/basic/role">
               角色管理
             </router-link>

+ 19 - 10
src/components/ProjectCourseSelect.vue

@@ -6,13 +6,12 @@
     :value="valueStr"
     style="width: 200px"
     :disabled="props.disabled"
-    :filterOption="false"
-    @search="handleSearch"
+    :filterOption="filterAction"
     @change="handleChange"
   >
     <a-select-option
-      v-for="(item, index) in optionList"
-      :key="index"
+      v-for="item in optionList"
+      :key="`${item.courseName}${item.courseCode}`"
       :value="item.courseId"
     >
       {{ item.courseName }}({{ item.courseCode }})
@@ -31,9 +30,13 @@ const props = defineProps<{
 }>();
 const emit = defineEmits(["update:value"]);
 
-let optionList = $ref<
-  { courseId: number; courseName: string; courseCode: string }[]
->([]);
+interface CoureOption {
+  courseId: number;
+  courseName: string;
+  courseCode: string;
+}
+
+let optionList = $ref<CoureOption[]>([]);
 
 onMounted(fetchData);
 async function fetchData(searchStr = "") {
@@ -41,12 +44,18 @@ async function fetchData(searchStr = "") {
     projectId: props.projectId,
     courseName: searchStr,
     pageNo: 1,
-    pageSize: 100,
+    pageSize: 200,
   });
   optionList = res.data.content;
 }
-async function handleSearch(searchStr: string) {
-  await fetchData(searchStr);
+// async function handleSearch(searchStr: string) {
+//   await fetchData(searchStr);
+// }
+function filterAction(inputValue: string, option: { key: string }): boolean {
+  const escapeRegexpString = (value = "") =>
+    String(value).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
+  const reg = new RegExp(escapeRegexpString(inputValue), "i");
+  return reg.test(option.key);
 }
 
 let valueStr = computed(() => {

+ 6 - 7
src/components/ProjectSelect.vue

@@ -4,7 +4,7 @@
     allowClear
     :value="valueStr"
     :disabled="props.disabled"
-    style="width: 140px"
+    style="width: 200px"
     @change="handleChange"
   >
     <a-select-option
@@ -21,12 +21,11 @@
 import { getProjectList } from "@/api/projectManagementPage";
 import { onMounted, computed } from "vue";
 
-const props =
-  defineProps<{
-    value?: null | number;
-    projectId: number;
-    disabled?: boolean;
-  }>();
+const props = defineProps<{
+  value?: null | number;
+  projectId: number;
+  disabled?: boolean;
+}>();
 const emit = defineEmits(["update:value"]);
 
 let optionList = $ref<{ id: number; name: string }[]>([]);

+ 4 - 2
src/components/RoleSelect.vue

@@ -27,7 +27,7 @@ const props = withDefaults(
   defineProps<{
     value?: null | number;
     rootOrgId?: null | number;
-    isManage: boolean;
+    isManage?: boolean;
   }>(),
   {
     value: null,
@@ -61,7 +61,9 @@ async function fetchData() {
       const info = ROLE_MANAGE_SET[r.roleCode];
       userRoleSet.push(...info);
     });
-    optionList = optionList.filter((item) => userRoleSet.includes(item.code));
+    optionList = optionList.filter((item: RoleOption) =>
+      userRoleSet.includes(item.code)
+    );
   }
 }
 const valueStr = computed(() => {

+ 54 - 18
src/features/allAnalysis/AllAnalysis2.vue

@@ -8,17 +8,17 @@
       <a-button class="query-btn" @click="search">查询</a-button>
 
       <div class="tw-float-right tw-flex tw-gap-2">
-        <a-button @click="goProjectPapers(projectId)"> 试卷列表 </a-button>
+        <!-- <a-button @click="goProjectPapers(projectId)"> 试卷列表 </a-button> -->
         <a-button @click="goBack">返回</a-button>
       </div>
     </div>
 
     <div class="tw-bg-white tw-p-5 tw-rounded-xl">
-      <a-radio-group v-model:value="activeTab">
+      <!-- <a-radio-group v-model:value="activeTab">
         <a-radio-button value="1">试卷特征量数</a-radio-button>
         <a-radio-button value="2">科目成绩(总分)频率分布</a-radio-button>
         <a-radio-button value="3">科目成绩占初试总分权重</a-radio-button>
-      </a-radio-group>
+      </a-radio-group> -->
       <div class="tw-mb-4"></div>
       <div v-if="activeTab === '1'">
         <a-table
@@ -36,14 +36,15 @@
               pageSize = pageSizeChanged;
             },
           }"
+          @change="tableChange"
         >
           <template #course="{ record }">
             <a>{{ `${record.courseName}(${record.courseCode})` }}</a>
           </template>
           <template #action="{ record }">
             <span>
-              <a-button @click="openModal">说明</a-button>
-              <a-button @click="goPaperAnalysis(record)">查看分析结果</a-button>
+              <!-- <a-button @click="openModal">说明</a-button> -->
+              <a-button @click="goPaperAnalysis(record)">详情</a-button>
             </span>
           </template>
         </a-table>
@@ -64,16 +65,31 @@ import { watch, onMounted } from "vue";
 import { useRoute } from "vue-router";
 import router from "@/router";
 import { getSasPaperList } from "@/api/allAnalysisPage";
-import EventBus from "@/plugins/eventBus";
+// import EventBus from "@/plugins/eventBus";
 import ScoreRate from "./ScoreRate.vue";
 import ScoreFirstTryRate from "./ScoreFirstTryRate.vue";
 import { SASPaper } from "@/types";
 
+type PaginationType = {
+  current: number;
+  pageSize: number;
+};
+
+type FilterType = {
+  name: string;
+  address: string;
+};
+
+type SorterType = {
+  field: string;
+  order: string;
+};
+
 const store = useMainStore();
-store.currentLocation = "项目管理 / 项目列表 / 整体分析";
+store.currentLocation = "项目管理 / 项目列表 / 结果查询";
 
 // let rootOrgId = $ref(undefined as unknown as number);
-let courseId = $ref(undefined as undefined | number);
+let courseId = $ref(undefined as unknown as number);
 const route = useRoute();
 const projectId = +route.params.projectId;
 
@@ -119,8 +135,13 @@ const columns = [
     dataIndex: "paperType",
   },
   {
-    title: "试卷名称",
+    title: "科目代码",
+    dataIndex: "courseCode",
+  },
+  {
+    title: "样本数",
     dataIndex: "paperName",
+    sorter: true,
   },
   {
     title: "满分",
@@ -137,22 +158,27 @@ const columns = [
   {
     title: "全距",
     dataIndex: "allRange",
+    sorter: true,
   },
   {
     title: "平均分",
     dataIndex: "avgScore",
+    sorter: true,
   },
   {
     title: "标准差",
     dataIndex: "stdev",
+    sorter: true,
   },
   {
     title: "差异系数",
     dataIndex: "coefficient",
+    sorter: true,
   },
   {
     title: "信度",
     dataIndex: "reliability1",
+    sorter: true,
   },
   // {
   //   title: "信度2",
@@ -161,32 +187,42 @@ const columns = [
   {
     title: "难度",
     dataIndex: "difficulty",
+    sorter: true,
   },
   {
     title: "操作",
     key: "action",
     slots: { customRender: "action" },
+    width: 100,
   },
 ];
 
 onMounted(async () => {
   // rootOrgId = store.userInfo.rootOrgId;
   await search();
-  if (sessionStorage.getItem("allAnalysisReload")) {
-    activeTab = "2";
-    sessionStorage.removeItem("allAnalysisReload");
-  }
+  // if (sessionStorage.getItem("allAnalysisReload")) {
+  //   activeTab = "2";
+  //   sessionStorage.removeItem("allAnalysisReload");
+  // }
 });
 
 async function goPaperAnalysis(record: SASPaper) {
   await router.push(`/project/${projectId}/paperAnalysis/${record.paperId}`);
 }
 
-async function goProjectPapers(id: number) {
-  await router.push("/project/papers/" + id);
+function tableChange(
+  pagination: PaginationType,
+  filters: FilterType[],
+  sorter: SorterType
+) {
+  console.log(sorter);
+  // TODO:
 }
+// async function goProjectPapers(id: number) {
+//   await router.push("/project/papers/" + id);
+// }
 
-function openModal() {
-  EventBus.emit("SHOW_SETTING", "DESCRIBE010");
-}
+// function openModal() {
+//   EventBus.emit("SHOW_SETTING", "DESCRIBE010");
+// }
 </script>

+ 66 - 53
src/features/allAnalysis/ScoreRate.vue

@@ -20,35 +20,39 @@
         >
           <div class="tw-flex tw-justify-between tw-items-center tw-my-4">
             <h3 class="section-title">等距({{ scoreGap }}分)分组频数分布</h3>
-            <a-button @click="openModal1">说明</a-button>
+            <!-- <a-button @click="openModal1">说明</a-button> -->
           </div>
-          <div class="tw-flex tw-gap-4">
-            <table class="custom-table" style="width: 400px">
-              <tr>
-                <th>分数段</th>
-                <th>频数</th>
-                <th>频率(%)</th>
-                <th>累计频数</th>
-                <th>累计频数(%)</th>
-              </tr>
-              <tr
-                v-for="(seg, index2) in course.segements"
-                :key="index2 + scoreGap * 100000"
-              >
-                <td>
-                  <span v-if="index2 < course.segements.length - 1"
-                    >{{ scoreGap * index2 }}-{{ scoreGap * (index2 + 1) }}</span
-                  >
-                  <span>{{ seg[0] }}</span>
-                </td>
-                <td>{{ seg[1] }}</td>
-                <td v-number-to-percent>{{ seg[2] }}%</td>
-                <td>{{ seg[3] }}</td>
-                <td v-number-to-percent>{{ seg[4] }}%</td>
-              </tr>
-            </table>
+          <div class="tw-flex tw-gap-4" style="max-height: 500px">
+            <div class="tw-overflow-auto">
+              <table class="custom-table" style="width: 400px">
+                <tr>
+                  <th>分数段</th>
+                  <th>频数</th>
+                  <th>频率(%)</th>
+                  <th>累计频数</th>
+                  <th>累计频数(%)</th>
+                </tr>
+                <tr
+                  v-for="(seg, index2) in course.segements"
+                  :key="index2 + scoreGap * 100000"
+                >
+                  <td>
+                    <span v-if="index2 < course.segements.length - 1"
+                      >{{ scoreGap * index2 }}-{{
+                        scoreGap * (index2 + 1)
+                      }}</span
+                    >
+                    <span v-else>{{ seg[0] }}</span>
+                  </td>
+                  <td>{{ seg[1] }}</td>
+                  <td v-number-to-percent>{{ seg[2] }}%</td>
+                  <td>{{ seg[3] }}</td>
+                  <td v-number-to-percent>{{ seg[4] }}%</td>
+                </tr>
+              </table>
+            </div>
 
-            <div style="flex-grow: 1; min-height: 200px">
+            <div style="flex-grow: 1; min-height: 260px">
               <v-chart
                 class="chart"
                 :option="segementsLine(course)"
@@ -63,28 +67,37 @@
               <a-button @click="openRangeConfigModal(course)">
                 分段设置
               </a-button>
-              <!-- <a-button @click="openModal2">说明</a-button> -->
+              <a-button @click="openModal2">说明</a-button>
             </div>
           </div>
-          <div v-if="course.rangeConfig" class="tw-flex tw-gap-4">
-            <table class="custom-table" style="width: 450px">
-              <tr>
-                <th>分数段</th>
-                <th>频数</th>
-                <th>频率(%)</th>
-                <th>累计频数</th>
-                <th>累计频数(%)</th>
-              </tr>
-              <tr v-for="(seg, index3) in course.rangeSegements" :key="index3">
-                <td>{{ seg[0] }}</td>
-                <td>{{ seg[1] }}</td>
-                <td v-number-to-percent>{{ seg[2] }}%</td>
-                <td>{{ seg[3] }}</td>
-                <td v-number-to-percent>{{ seg[4] }}%</td>
-              </tr>
-            </table>
+          <div
+            v-if="course.rangeConfig"
+            class="tw-flex tw-gap-4"
+            style="max-height: 500px"
+          >
+            <div class="tw-overflow-auto">
+              <table class="custom-table" style="width: 400px">
+                <tr>
+                  <th>分数段</th>
+                  <th>频数</th>
+                  <th>频率(%)</th>
+                  <th>累计频数</th>
+                  <th>累计频数(%)</th>
+                </tr>
+                <tr
+                  v-for="(seg, index3) in course.rangeSegements"
+                  :key="index3"
+                >
+                  <td>{{ seg[0] }}</td>
+                  <td>{{ seg[1] }}</td>
+                  <td v-number-to-percent>{{ seg[2] }}%</td>
+                  <td>{{ seg[3] }}</td>
+                  <td v-number-to-percent>{{ seg[4] }}%</td>
+                </tr>
+              </table>
+            </div>
 
-            <div style="flex-grow: 1; min-height: 200px">
+            <div style="flex-grow: 1; min-height: 260px">
               <v-chart
                 class="chart"
                 :option="rangeSegementsLine(course)"
@@ -166,7 +179,7 @@ async function fetchData() {
     v.scoreRangeTotal = acc;
     return v;
   });
-  // console.log(res.data);
+  console.log(res.data);
   courses = res.data;
 }
 
@@ -293,14 +306,14 @@ function scoreTitle(rangeConfig: RangeConfig) {
   }${rangeConfig.adjustScore > 0 ? "+" : ""}${rangeConfig.adjustScore})-`;
 }
 
-function openModal1() {
-  EventBus.emit("SHOW_SETTING", "DESCRIBE020");
-}
-
-// function openModal2() {
-//   EventBus.emit("SHOW_SETTING", "DESCRIBE030");
+// function openModal1() {
+//   EventBus.emit("SHOW_SETTING", "DESCRIBE020");
 // }
 
+function openModal2() {
+  EventBus.emit("SHOW_SETTING", "DESCRIBE030");
+}
+
 function segementsLine(course: SasCourse) {
   // console.log(course);
   return {

+ 8 - 3
src/features/paperAnalysis/PaperAnalysis.vue

@@ -22,6 +22,7 @@
 
     <div class="tw-bg-white tw-p-5 tw-rounded-xl">
       <a-radio-group v-model:value="activeTab">
+        <a-radio-button value="6">科目频数分布</a-radio-button>
         <a-radio-button value="1">试卷题目编排</a-radio-button>
         <a-radio-button value="2">试题特征量数</a-radio-button>
         <a-radio-button value="5">试题难度分组分布</a-radio-button>
@@ -58,6 +59,9 @@
           :rangeConfig="paper.difficulityRangeConfig"
         />
       </div>
+      <div v-if="activeTab === '6'">
+        <ScoreRate v-if="courseId" :courseId="courseId" />
+      </div>
     </div>
   </div>
 </template>
@@ -67,7 +71,7 @@ import { useMainStore } from "@/store";
 import { goBack } from "@/utils/utils";
 import { watch, onMounted } from "vue";
 import { useRoute } from "vue-router";
-import ProjectSelect from "@/components/ProjectSelect.vue";
+// import ProjectSelect from "@/components/ProjectSelect.vue";
 import {
   getPaper,
   getPaperQuestionGroups,
@@ -79,12 +83,13 @@ import QuestionAttr from "./QuestionAttr.vue";
 import QuestionDifficultyGroup from "./QuestionDifficultyGroup.vue";
 import QuestionTypeDifficulty from "./QuestionTypeDifficulty.vue";
 import QuestionTypeDiscrimination from "./QuestionTypeDiscrimination.vue";
+import ScoreRate from "../allAnalysis/ScoreRate.vue";
 import { Paper, SASQuestion, SASQuestionGroup } from "@/types";
 
 const store = useMainStore();
-store.currentLocation = "项目管理 / 项目列表 / 试卷分析";
+store.currentLocation = "项目管理 / 项目列表 / 详情";
 
-let activeTab = $ref("1");
+let activeTab = $ref("6");
 
 let rootOrgId = $ref(undefined as unknown as number);
 let courseId = $ref(undefined as unknown as number);

+ 6 - 1
src/features/paperAnalysis/QuestionBianPai.vue

@@ -58,12 +58,17 @@ function openModal() {
 }
 
 function chartOption(questions: SASQuestion[]) {
-  console.log(questions);
+  // console.log(questions);
   return {
     title: {
       text: "难度",
       left: "left",
     },
+    grid: {
+      left: 40,
+      bottom: 50,
+      right: 80,
+    },
     xAxis: {
       type: "category",
       data: questions.map((v) => v.mainNumber + "-" + v.subNumber),

+ 6 - 6
src/features/projectManagement/ProjectManagement.vue

@@ -121,19 +121,19 @@
                   >
                     参数配置
                   </a-button>
-                  <a-button
+                  <!-- <a-button
                     type="text"
                     style="color: white"
                     @click="goProjectPapers(record.id)"
                   >
                     试卷列表
-                  </a-button>
+                  </a-button> -->
                   <a-button
                     type="text"
                     style="color: white"
                     @click="goAllAnalysis(record.id)"
                   >
-                    整体分析
+                    结果查询
                   </a-button>
                 </div>
               </template>
@@ -404,9 +404,9 @@ async function goProjectParams(id: number) {
   await router.push("params/" + id);
 }
 
-async function goProjectPapers(id: number) {
-  await router.push("papers/" + id);
-}
+// async function goProjectPapers(id: number) {
+//   await router.push("papers/" + id);
+// }
 
 async function goAllAnalysis(projectId: number) {
   await router.push(`/project/allAnalysis/${projectId}`);

+ 28 - 12
src/features/projectParamsManagement/ProjectParamsManagement.vue

@@ -66,15 +66,15 @@
         <a-form-item label="复试科目线">
           <a-input v-model:value="projectObj.retestScore"></a-input>
         </a-form-item>
-        <a-form-item label="国家总分线">
+        <!-- <a-form-item label="国家总分线">
           <a-input v-model:value="projectObj.nationalTotalScore"></a-input>
         </a-form-item>
         <a-form-item label="复试总分线">
           <a-input v-model:value="projectObj.retestTotalScore"></a-input>
-        </a-form-item>
-        <a-form-item label="总分满分线">
+        </a-form-item> -->
+        <!-- <a-form-item label="总分满分线">
           <a-input v-model:value="projectObj.totalScoreLine"></a-input>
-        </a-form-item>
+        </a-form-item> -->
       </a-form>
     </a-modal>
 
@@ -157,6 +157,14 @@ const columns = [
     dataIndex: "course",
     slots: { customRender: "course" },
   },
+  {
+    title: "满分",
+    dataIndex: "nationalScore",
+  },
+  {
+    title: "起始计算分",
+    dataIndex: "nationalScore",
+  },
   {
     title: "国家单科线",
     dataIndex: "nationalScore",
@@ -166,17 +174,25 @@ const columns = [
     dataIndex: "retestScore",
   },
   {
-    title: "国家总分线",
-    dataIndex: "nationalTotalScore",
-  },
-  {
-    title: "复试总分线",
-    dataIndex: "retestTotalScore",
+    title: "考生属性起始分",
+    dataIndex: "retestScore",
   },
   {
-    title: "总分满分线",
-    dataIndex: "totalScoreLine",
+    title: "考生属性终止分",
+    dataIndex: "retestScore",
   },
+  // {
+  //   title: "国家总分线",
+  //   dataIndex: "nationalTotalScore",
+  // },
+  // {
+  //   title: "复试总分线",
+  //   dataIndex: "retestTotalScore",
+  // },
+  // {
+  //   title: "总分满分线",
+  //   dataIndex: "totalScoreLine",
+  // },
   {
     title: "操作",
     key: "action",