调整成绩分析

This commit is contained in:
ywyonui 2025-08-23 01:35:23 +08:00
parent 720bd62f84
commit 22d1f59efe
2 changed files with 13 additions and 13 deletions

View File

@ -39,7 +39,7 @@
<!-- 6. 本班与年级平均分对比分析图表 -->
<CjBjNjPjf
v-model:selected-km-id="xzkmId"
:bj-pj-list="bjPjList"
:bj-pj-list="bjFxList"
:current-bj-id="xzbjId"
/>
@ -134,7 +134,7 @@ const tjglData = ref<TjglData>({
jgl: 0,
jgrs: 0,
});
const bjPjList = ref<BjPjInfo[]>([]);
const bjFxList = ref<BjPjInfo[]>([]);
const djRsList = ref<DjRsInfo[]>([]);
// --- API Functions ---
@ -194,7 +194,7 @@ const getBjKscjKmData = async (
tjglData.value.jgl = res.result.jgl || 0;
// CjBjNjPjf
bjPjList.value = res.result.bjPjList || [];
bjFxList.value = res.result.bjFxList || [];
// CjZfFsCjZfDj
djRsList.value = res.result.djRsList || [];

View File

@ -34,12 +34,12 @@ interface BjPjInfo {
// --- Props ---
interface Props {
bjPjList?: BjPjInfo[];
bjFxList?: BjPjInfo[];
currentBjId?: string | number;
}
const props = withDefaults(defineProps<Props>(), {
bjPjList: () => [],
bjFxList: () => [],
currentBjId: "",
});
@ -75,17 +75,17 @@ const drawLineChart = () => {
// 使
const lineData = {
categories: props.bjPjList.map((bj) => {
categories: props.bjFxList.map((bj) => {
const label = bj.bjmc || bj.njmc + bj.bjmc;
return label;
}),
series: [
{
name: "班级平均分",
data: props.bjPjList.map((bj) => bj.fs),
data: props.bjFxList.map((bj) => bj.fs),
color: ["#ea7ccc"],
textColorFormatter: (item: any, index: number, opts: any) => {
const bj = props.bjPjList[index];
const bj = props.bjFxList[index];
if (bj && bj.bjId === props.currentBjId) {
return "#1890ff"; // 使
}
@ -135,7 +135,7 @@ const drawLineChart = () => {
index: number,
opts: any
) => {
const bj = props.bjPjList[index];
const bj = props.bjFxList[index];
if (bj && bj.bjId === props.currentBjId) {
return "#1890ff"; // 使
}
@ -148,7 +148,7 @@ const drawLineChart = () => {
index: number,
opts: any
) => {
const bj = props.bjPjList[index];
const bj = props.bjFxList[index];
if (bj && bj.bjId === props.currentBjId) {
return "#1890ff"; // 使
}
@ -181,11 +181,11 @@ const drawLineChart = () => {
};
// --- Watch ---
// bjPjList
// bjFxList
watch(
() => props.bjPjList,
() => props.bjFxList,
() => {
if (props.bjPjList && props.bjPjList.length > 0) {
if (props.bjFxList && props.bjFxList.length > 0) {
drawLineChart();
}
},