diff --git a/src/api/base/server.ts b/src/api/base/server.ts index 6c2c56f..1a34b72 100644 --- a/src/api/base/server.ts +++ b/src/api/base/server.ts @@ -80,8 +80,13 @@ export const jsFindByBzrNjIdApi = async (params: { njId: string }) => { }; // 根据职务ID查询教师 -export const jsFindByZwIdApi = async (params: { zwId: string; zwType: string }) => { - return await get(`/api/js/findByZwId?zwId=${params.zwId}&zwType=${params.zwType}`); +export const jsFindByZwIdApi = async (params: { + zwId: string; + zwType: string; +}) => { + return await get( + `/api/js/findByZwId?zwId=${params.zwId}&zwType=${params.zwType}` + ); }; // 选课列表 @@ -98,6 +103,37 @@ export const jsdXkkcSaveApi = async (params: any) => { export const jsdXkXsListApi = async (params: any) => { return await get("/mobile/js/xkxs/list", params); }; + +// 获取班级学生考试成绩 +export const jsdBjKscjApi = async (params: any) => { + return await get("/mobile/js/kscj/bj", params); +}; + +// 获取班级学生考试成绩(按科目) +export const jsdBjKscjKmApi = async (params: any) => { + return await get("/mobile/js/kscj/bjKm", params); +}; + +// 获取考试场次列表 +export const jsdKsccListApi = async (params: any) => { + return await get("/api/kscc/findPage", params); +}; + +// 获取教师授课班级列表 +export const jsdJsdkbApi = async (params: any) => { + return await get("/mobile/js/jsdkb", params); +}; + +// 获取班级考试场次列表 +export const jsdKsccApi = async (params: any) => { + return await get("/mobile/js/kscc", params); +}; + +// 获取考试场次科目列表 +export const ksccKmFindByKsccIdApi = async (params: any) => { + return await get("/api/kscc/findKsccKmmcById", params); +}; + //根据年级ID和班级ID查询学生及家长信息 export const mobilejlstudentListApi = async (params: any) => { return await get("/mobile/jl/studentList", params); @@ -113,7 +149,6 @@ export const getByJlIdApi = async (params: any) => { return res.result; }; - // 提交点名信息 export const jsdXkdmListApi = async (params: any) => { return await post("/mobile/js/xkdm/add", params); @@ -121,37 +156,37 @@ export const jsdXkdmListApi = async (params: any) => { // 获取待办列表 export const dbListApi = async (params: any) => { - return await get("/api/db/findPage", params); + return await get("/api/db/findPage", params); }; // 处理待办 export const dbBlApi = async (params: any) => { - return await post("/api/db/bl", params); + return await post("/api/db/bl", params); }; // 查询学生请假信息 export const xsQjFindByIdApi = async (params: any) => { - return await get("/api/xsQj/findById", params); + return await get("/api/xsQj/findById", params); }; // 学生请假审批 export const xsQjSpApi = async (params: any) => { - return await post("/api/xsQj/sp", params); + return await post("/api/xsQj/sp", params); }; // 获取所有班级 export const bjFindAllApi = async (params: any) => { - return await get("/api/bj/findAll", params); + return await get("/api/bj/findAll", params); }; // 获取学生列表 export const xsFindList = async (params: any) => { - return await get("/api/xs/findPage", params); + return await get("/api/xs/findPage", params); }; // 获取学生家长列表 export const xsJzListByXsIdApi = async (params: any) => { - return await get("/api/jz/getListByXsId", params); + return await get("/api/jz/getListByXsId", params); }; // 教学资源树形 @@ -182,27 +217,25 @@ export const getJsPjGzlApi = async () => { return await get("/api/comConfig/getJsPjGzl"); }; - - // 接龙相关API // 根据ID获取接龙详情 export const jlFindByIdApi = async (params: { id: string }) => { - return await get("/api/jl/findById", params); + return await get("/api/jl/findById", params); }; // 保存接龙(新增/编辑) export const jlSaveApi = async (params: any) => { - return await post("/api/jl/save", params); + return await post("/api/jl/save", params); }; // 根据接龙ID查询接龙执行情况(学生列表) export const jlzxFindByJlParamsApi = async (params: { jlId: string }) => { - return await get("/api/jlzx/findByJlParams", params); + return await get("/api/jlzx/findByJlParams", params); }; // 保存接龙消息推送 export const xxtsSaveByJlzxParamsApi = async (params: { jlId: string }) => { - return await post("/api/xxts/saveByJlzxParams", params); + return await post("/api/xxts/saveByJlzxParams", params); }; /** @@ -216,7 +249,7 @@ export const gzlGetDqXqAndZcApi = async () => { * 当前学期排课公共配置(排课设置、排课周次、排课时间) */ export const dqpkApi = async () => { - return await get("/mobile/jz/pkkb/dqpk" ); + return await get("/mobile/jz/pkkb/dqpk"); }; /** @@ -249,7 +282,10 @@ export const qdzxFindByQdParamsApi = async (params: { qdId: string }) => { return await get("/api/qdzx/findByQdParams", params); }; -export const qdzxFindByQdAndJsApi = async (params: { qdId: string; jsId: string }) => { +export const qdzxFindByQdAndJsApi = async (params: { + qdId: string; + jsId: string; +}) => { return await get("/api/qdzx/findByQdAndJs", params); }; diff --git a/src/pages/view/homeSchool/ChengJiFenXi.vue b/src/pages/view/homeSchool/ChengJiFenXi.vue index fd3f088..a7125d5 100644 --- a/src/pages/view/homeSchool/ChengJiFenXi.vue +++ b/src/pages/view/homeSchool/ChengJiFenXi.vue @@ -1,918 +1,319 @@ diff --git a/src/pages/view/homeSchool/components/CjBjNjPjf.vue b/src/pages/view/homeSchool/components/CjBjNjPjf.vue new file mode 100644 index 0000000..6bc05cc --- /dev/null +++ b/src/pages/view/homeSchool/components/CjBjNjPjf.vue @@ -0,0 +1,201 @@ + + + + + diff --git a/src/pages/view/homeSchool/components/CjBjPicker.vue b/src/pages/view/homeSchool/components/CjBjPicker.vue new file mode 100644 index 0000000..c6f52f6 --- /dev/null +++ b/src/pages/view/homeSchool/components/CjBjPicker.vue @@ -0,0 +1,141 @@ + + + + + diff --git a/src/pages/view/homeSchool/components/CjBjTjGl.vue b/src/pages/view/homeSchool/components/CjBjTjGl.vue new file mode 100644 index 0000000..3b2aa92 --- /dev/null +++ b/src/pages/view/homeSchool/components/CjBjTjGl.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/src/pages/view/homeSchool/components/CjBjXsList.vue b/src/pages/view/homeSchool/components/CjBjXsList.vue new file mode 100644 index 0000000..b4c2121 --- /dev/null +++ b/src/pages/view/homeSchool/components/CjBjXsList.vue @@ -0,0 +1,104 @@ + + + + + diff --git a/src/pages/view/homeSchool/components/CjKsccPicker.vue b/src/pages/view/homeSchool/components/CjKsccPicker.vue new file mode 100644 index 0000000..d57ab0c --- /dev/null +++ b/src/pages/view/homeSchool/components/CjKsccPicker.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/src/pages/view/homeSchool/components/CjZfDj.vue b/src/pages/view/homeSchool/components/CjZfDj.vue new file mode 100644 index 0000000..b101e2c --- /dev/null +++ b/src/pages/view/homeSchool/components/CjZfDj.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/pages/view/homeSchool/components/CjZfFs.vue b/src/pages/view/homeSchool/components/CjZfFs.vue new file mode 100644 index 0000000..c9eed7d --- /dev/null +++ b/src/pages/view/homeSchool/components/CjZfFs.vue @@ -0,0 +1,176 @@ + + + + + diff --git a/src/pages/view/homeSchool/components/cj.data.ts b/src/pages/view/homeSchool/components/cj.data.ts new file mode 100644 index 0000000..e55aa70 --- /dev/null +++ b/src/pages/view/homeSchool/components/cj.data.ts @@ -0,0 +1,370 @@ +export const ringOption = { + type: "ring", + // context: ctx, + // width: containerWidth, + // height: containerHeight, + // series: donutData.series, + animation: true, + timing: "easeOut", + duration: 1000, + rotate: false, + rotateLock: false, + background: "#FFFFFF", + color: [ + "#1890FF", + "#91CB74", + "#FAC858", + "#EE6666", + "#73C0DE", + "#3CA272", + "#FC8452", + "#9A60B4", + "#ea7ccc", + ], + padding: [5, 5, 5, 5], + fontSize: 13, + fontColor: "#666666", + dataLabel: true, + dataPointShape: true, + dataPointShapeType: "solid", + touchMoveLimit: 60, + enableScroll: false, + enableMarkLine: false, + legend: { + show: true, + position: "right", + lineHeight: 25, + float: "center", + padding: 5, + margin: 5, + backgroundColor: "rgba(0,0,0,0)", + borderColor: "rgba(0,0,0,0)", + borderWidth: 0, + fontSize: 13, + fontColor: "#666666", + hiddenColor: "#CECECE", + itemGap: 10, + }, + title: { + name: "", + fontSize: 15, + color: "#666666", + offsetX: 0, + offsetY: 0, + }, + subtitle: { + name: "", + fontSize: 25, + color: "#7cb5ec", + offsetX: 0, + offsetY: 0, + }, + extra: { + ring: { + ringWidth: 30, + activeOpacity: 0.5, + activeRadius: 10, + offsetAngle: 0, + labelWidth: 15, + border: true, + borderWidth: 3, + borderColor: "#FFFFFF", + centerColor: "#FFFFFF", + customRadius: 0, + linearType: "none", + }, + tooltip: { + showBox: true, + showArrow: true, + showCategory: false, + borderWidth: 0, + borderRadius: 0, + borderColor: "#000000", + borderOpacity: 0.7, + bgColor: "#000000", + bgOpacity: 0.7, + gridType: "solid", + dashLength: 4, + gridColor: "#CCCCCC", + boxPadding: 3, + fontSize: 13, + lineHeight: 20, + fontColor: "#FFFFFF", + legendShow: true, + legendShape: "auto", + splitLine: true, + horizentalLine: false, + xAxisLabel: false, + yAxisLabel: false, + labelBgColor: "#FFFFFF", + labelBgOpacity: 0.7, + labelFontColor: "#666666", + }, + }, +}; + +export const areaOption = { + type: "area", + // context: ctx, + // width: containerWidth, + // height: containerHeight, + // categories: areaData.categories, + // series: areaData.series, + animation: true, + timing: "easeOut", + duration: 1000, + rotate: false, + rotateLock: false, + background: "#FFFFFF", + color: [ + "#1890FF", + "#91CB74", + "#FAC858", + "#EE6666", + "#73C0DE", + "#3CA272", + "#FC8452", + "#9A60B4", + "#ea7ccc", + ], + padding: [15, 15, 0, 15], + fontSize: 13, + fontColor: "#666666", + dataLabel: true, + dataPointShape: true, + dataPointShapeType: "solid", + touchMoveLimit: 60, + enableScroll: false, + enableMarkLine: false, + legend: { + show: false, + position: "bottom", + float: "center", + padding: 5, + margin: 5, + backgroundColor: "rgba(0,0,0,0)", + borderColor: "rgba(0,0,0,0)", + borderWidth: 0, + fontSize: 13, + fontColor: "#666666", + lineHeight: 11, + hiddenColor: "#CECECE", + itemGap: 10, + }, + xAxis: { + disableGrid: true, + disabled: false, + axisLine: true, + axisLineColor: "#CCCCCC", + calibration: false, + fontColor: "#666666", + fontSize: 13, + lineHeight: 20, + marginTop: 0, + rotateLabel: false, + rotateAngle: 45, + itemCount: 5, + boundaryGap: "center", + splitNumber: 5, + gridColor: "#CCCCCC", + gridType: "solid", + dashLength: 4, + gridEval: 1, + scrollShow: false, + scrollAlign: "left", + scrollColor: "#A6A6A6", + scrollBackgroundColor: "#EFEBEF", + title: "", + titleFontSize: 13, + titleOffsetY: 0, + titleOffsetX: 0, + titleFontColor: "#666666", + formatter: "", + }, + yAxis: { + gridType: "dash", + dashLength: 2, + disabled: false, + disableGrid: false, + splitNumber: 5, + gridColor: "#CCCCCC", + padding: 10, + showTitle: false, + data: [], + }, + extra: { + area: { + type: "straight", + opacity: 0.2, + addLine: true, + width: 2, + gradient: false, + activeType: "hollow", + }, + tooltip: { + showBox: true, + showArrow: true, + showCategory: false, + borderWidth: 0, + borderRadius: 0, + borderColor: "#000000", + borderOpacity: 0.7, + bgColor: "#000000", + bgOpacity: 0.7, + gridType: "solid", + dashLength: 4, + gridColor: "#CCCCCC", + boxPadding: 3, + fontSize: 13, + lineHeight: 20, + fontColor: "#FFFFFF", + legendShow: true, + legendShape: "auto", + splitLine: true, + horizentalLine: false, + xAxisLabel: false, + yAxisLabel: false, + labelBgColor: "#FFFFFF", + labelBgOpacity: 0.7, + labelFontColor: "#666666", + }, + markLine: { + type: "solid", + dashLength: 4, + data: [], + }, + }, +}; + +export const lineOption = { + type: "line", + // context: ctx, + // width: containerWidth, + // height: containerHeight, + // categories: lineData.categories, + // series: lineData.series, + animation: true, + timing: "easeOut", + duration: 1000, + rotate: false, + rotateLock: false, + background: "#FFFFFF", + color: [ + "#1890FF", + "#91CB74", + "#FAC858", + "#EE6666", + "#73C0DE", + "#3CA272", + "#FC8452", + "#9A60B4", + "#ea7ccc", + ], + padding: [15, 10, 0, 15], + fontSize: 13, + fontColor: "#666666", + dataLabel: true, + dataPointShape: true, + dataPointShapeType: "solid", + touchMoveLimit: 60, + enableScroll: false, + enableMarkLine: false, + legend: { + show: false, + position: "bottom", + float: "center", + padding: 5, + margin: 5, + backgroundColor: "rgba(0,0,0,0)", + borderColor: "rgba(0,0,0,0)", + borderWidth: 0, + fontSize: 13, + fontColor: "#666666", + lineHeight: 11, + hiddenColor: "#CECECE", + itemGap: 10, + }, + xAxis: { + disableGrid: true, + disabled: false, + axisLine: true, + axisLineColor: "#CCCCCC", + calibration: false, + fontColor: "#666666", + fontSize: 13, + lineHeight: 20, + marginTop: 0, + rotateLabel: false, + rotateAngle: 45, + itemCount: 5, + boundaryGap: "center", + splitNumber: 5, + gridColor: "#CCCCCC", + gridType: "solid", + dashLength: 4, + gridEval: 1, + scrollShow: false, + scrollAlign: "left", + scrollColor: "#A6A6A6", + scrollBackgroundColor: "#EFEBEF", + title: "", + titleFontSize: 13, + titleOffsetY: 0, + titleOffsetX: 0, + titleFontColor: "#666666", + formatter: "", + }, + yAxis: { + gridType: "dash", + dashLength: 2, + disabled: false, + disableGrid: false, + splitNumber: 5, + gridColor: "#CCCCCC", + padding: 10, + showTitle: false, + data: [], + }, + extra: { + line: { + type: "straight", + width: 2, + activeType: "hollow", + linearType: "none", + onShadow: false, + animation: "vertical", + }, + tooltip: { + showBox: true, + showArrow: true, + showCategory: false, + borderWidth: 0, + borderRadius: 0, + borderColor: "#000000", + borderOpacity: 0.7, + bgColor: "#000000", + bgOpacity: 0.7, + gridType: "solid", + dashLength: 4, + gridColor: "#CCCCCC", + boxPadding: 3, + fontSize: 13, + lineHeight: 20, + fontColor: "#FFFFFF", + legendShow: true, + legendShape: "auto", + splitLine: true, + horizentalLine: false, + xAxisLabel: false, + yAxisLabel: false, + labelBgColor: "#FFFFFF", + labelBgOpacity: 0.7, + labelFontColor: "#666666", + }, + markLine: { + type: "solid", + dashLength: 4, + data: [], + }, + }, +}; diff --git a/src/pages/view/test/ApiTest.vue b/src/pages/view/test/ApiTest.vue new file mode 100644 index 0000000..42cfe59 --- /dev/null +++ b/src/pages/view/test/ApiTest.vue @@ -0,0 +1,228 @@ + + + + + diff --git a/src/store/modules/common.ts b/src/store/modules/common.ts index 2c5bb38..5c4d363 100644 --- a/src/store/modules/common.ts +++ b/src/store/modules/common.ts @@ -1,11 +1,12 @@ -import { defineStore } from "pinia"; -import { - njFindAll, +import { bjFindByNjId, jsFindAll, + njFindAll, zwFindAllApi, zwGetListByLxApi, } from "@/api/base/common"; +import { jsdJsdkbApi, jsdKsccApi } from "@/api/base/server"; +import { defineStore } from "pinia"; interface CommonState { data: any; @@ -15,12 +16,12 @@ export const useCommonStore = defineStore({ id: "app-common", state: (): CommonState => ({ // 字典数据 - data: {} + data: {}, }), getters: { getData(): any { return this.data; - } + }, }, actions: { setData(data: any) { @@ -36,6 +37,7 @@ export const useCommonStore = defineStore({ // 根据年级查询班级 async getBjListByNj(params: any): Promise { if (!this.data.bj || !this.data.bj[params.njId]) { + this.data.bj = this.data.bj || {}; this.data.bj[params.njId] = await bjFindByNjId(params); } return Promise.resolve(this.data.bj[params.njId]); @@ -62,10 +64,38 @@ export const useCommonStore = defineStore({ } return Promise.resolve(this.data.zw[params.zwlx]); }, + // 获取教师授课班级列表 + async getJsdkb(params: any): Promise { + if (!this.data.jsdkb || !this.data.jsdkb[params.jsId]) { + this.data.jsdkb = this.data.jsdkb || {}; + this.data.jsdkb[params.jsId] = await jsdJsdkbApi(params); + } + return Promise.resolve(this.data.jsdkb[params.jsId]); + }, + // 获取班级考试场次列表(带缓存机制) + async getKscc(params: any): Promise { + if (!this.data.kscc || !this.data.kscc[params.bjId]) { + this.data.kscc = this.data.kscc || {}; + this.data.kscc[params.bjId] = await jsdKsccApi(params); + } + return Promise.resolve(this.data.kscc[params.bjId]); + }, + // 清除班级考试场次缓存 + clearKsccCache(bjId?: string) { + if (bjId) { + // 清除指定班级的缓存 + if (this.data.kscc && this.data.kscc[bjId]) { + delete this.data.kscc[bjId]; + } + } else { + // 清除所有考试场次缓存 + this.data.kscc = {}; + } + }, }, persist: { enabled: true, detached: true, - H5Storage: localStorage + H5Storage: localStorage, }, });