diff --git a/.env b/.env index 5910943..faf5ccf 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ #VITE_HOST = http://192.168.0.114:9053 -#VITE_HOST = http://43.136.52.196:9053 -VITE_HOST= https://ai.xuexiaole.com +VITE_HOST = http://43.136.52.196:9053 +#VITE_HOST= https://ai.xuexiaole.com VITE_OSS_HOST = https://xxl-1313840333.cos.ap-guangzhou.myqcloud.com VITE_WS_URL = wss://test.qiaoying.vip/wss/websocket \ No newline at end of file diff --git a/src/api/teacher.ts b/src/api/teacher.ts index 8e114a6..bd15bef 100644 --- a/src/api/teacher.ts +++ b/src/api/teacher.ts @@ -203,3 +203,53 @@ export const getClassHomeworkReport = (params: { method: 'GET', }); }; + +// ---------- 薄弱知识点 Top10 school/report/weakKnowledge/top10 ---------- +export interface WeakKnowledgeItem { + knowledgeId: number | string; + knowledgeName: string; + subjectId: number | string; + subjectName: string; + errorCount: number; + titleCount: number; + [key: string]: any; +} + +export interface WeakKnowledgeTop10Data { + classId: number | string; + className: string; + topWeakKnowledgeList: WeakKnowledgeItem[]; +} + +/** 薄弱知识点 Top10:GET,参数 form 风格 */ +export const getWeakKnowledgeTop10 = (params: { + classId: string | number; + subjectIds?: number[]; + startTime?: string; + endTime?: string; + schoolId?: string; +}) => { + const formEncode = (v: string) => encodeURIComponent(v).replace(/%20/g, '+'); + const query: string[] = []; + query.push('classId=' + formEncode(String(params.classId))); + if (params.schoolId) { + query.push('schoolId=' + formEncode(String(params.schoolId))); + } + if (params.subjectIds && params.subjectIds.length > 0) { + params.subjectIds.forEach((id) => { + query.push('subjectIds=' + formEncode(String(id))); + }); + } + if (params.startTime != null && params.startTime !== '' && String(params.startTime).trim() !== '') { + const st = String(params.startTime).trim(); + query.push('startTime=' + formEncode(st.includes(' ') ? st : st + ' 00:00:00')); + } + if (params.endTime != null && params.endTime !== '' && String(params.endTime).trim() !== '') { + const et = String(params.endTime).trim(); + query.push('endTime=' + formEncode(et.includes(' ') ? et : et + ' 23:59:59')); + } + return request({ + url: '/school/report/weakKnowledge/top10?' + query.join('&'), + method: 'GET', + }); +}; diff --git a/src/components/Loading/index.vue b/src/components/Loading/index.vue new file mode 100644 index 0000000..a363812 --- /dev/null +++ b/src/components/Loading/index.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/src/pages.json b/src/pages.json index ba027e8..3623489 100644 --- a/src/pages.json +++ b/src/pages.json @@ -140,6 +140,19 @@ "pageOrientation": "landscape" } } + }, + { + "path": "weakKnowledge/index", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "薄弱知识点 Top10", + "disableScroll": true, + "pageOrientation": "landscape", + "allowsBounceVertical": "NO", + "mp-weixin": { + "pageOrientation": "landscape" + } + } } ] } diff --git a/src/pages/doWork/index.vue b/src/pages/doWork/index.vue index 0f7a5bd..a73b232 100644 --- a/src/pages/doWork/index.vue +++ b/src/pages/doWork/index.vue @@ -77,10 +77,7 @@ - + diff --git a/src/pages/teacher/homework/filter.vue b/src/pages/teacher/homework/filter.vue index de38138..1f5ff07 100644 --- a/src/pages/teacher/homework/filter.vue +++ b/src/pages/teacher/homework/filter.vue @@ -90,7 +90,7 @@ 重置 - 查询 + {{ confirmButtonText }} @@ -98,13 +98,22 @@ + + diff --git a/src/static/loading.webp b/src/static/loading.webp new file mode 100644 index 0000000..16fe5c9 Binary files /dev/null and b/src/static/loading.webp differ