Commit e371f2dca0d39d5e80f13bc3d8a20351a3c8a051
1 parent
d703d72c
软件下载,学校,班级老师等报表导入导出,学生画像接口联调
Showing
32 changed files
with
2043 additions
and
2261 deletions
src/api/apis/apis.js
... | ... | @@ -443,6 +443,50 @@ export default { |
443 | 443 | data, |
444 | 444 | }); |
445 | 445 | }, |
446 | + // 导入学生答题器文件上传 | |
447 | + importStudentClicker(data) { | |
448 | + return service({ | |
449 | + url: setUpUrls.importStudentClicker, | |
450 | + method: "POST", | |
451 | + data, | |
452 | + }); | |
453 | + }, | |
454 | + // 班级名册模板下载 | |
455 | + classAndStudentTemplate(data) { | |
456 | + return service({ | |
457 | + url: setUpUrls.classAndStudentTemplate, | |
458 | + method: "POST", | |
459 | + data, | |
460 | + responseType: 'arraybuffer', | |
461 | + }); | |
462 | + }, | |
463 | + // 班级名册导出 | |
464 | + exportClassAndStudent(data) { | |
465 | + return service({ | |
466 | + url: setUpUrls.exportClassAndStudent, | |
467 | + method: "POST", | |
468 | + data, | |
469 | + responseType: 'arraybuffer', | |
470 | + }); | |
471 | + }, | |
472 | + // 教师模板下载 | |
473 | + teacherTemplate(data) { | |
474 | + return service({ | |
475 | + url: setUpUrls.teacherTemplate, | |
476 | + method: "POST", | |
477 | + data, | |
478 | + }); | |
479 | + }, | |
480 | + // 教师导出 | |
481 | + exportTeacher(data) { | |
482 | + return service({ | |
483 | + url: setUpUrls.exportTeacher, | |
484 | + method: "POST", | |
485 | + data, | |
486 | + responseType: 'arraybuffer', | |
487 | + }); | |
488 | + }, | |
489 | + | |
446 | 490 | // 删除学生 |
447 | 491 | delStudent(data) { |
448 | 492 | return service({ |
... | ... | @@ -938,9 +982,9 @@ export default { |
938 | 982 | }); |
939 | 983 | }, |
940 | 984 | // 分页查询课时报表列表 |
941 | - pPersonal(data) { | |
985 | + pPeriodReportList(data) { | |
942 | 986 | return service({ |
943 | - url: setUpUrls.pPersonal, | |
987 | + url: setUpUrls.pPeriodReportList, | |
944 | 988 | method: "POST", |
945 | 989 | data |
946 | 990 | }); |
... | ... | @@ -1177,6 +1221,14 @@ export default { |
1177 | 1221 | data |
1178 | 1222 | }); |
1179 | 1223 | }, |
1224 | + //删除授课端版本 | |
1225 | + delVersion(data) { | |
1226 | + return service({ | |
1227 | + url: setUpUrls.delVersion, | |
1228 | + method: "POST", | |
1229 | + data | |
1230 | + }); | |
1231 | + }, | |
1180 | 1232 | //基站统计数据 |
1181 | 1233 | pStationReport(data) { |
1182 | 1234 | return service({ |
... | ... | @@ -1234,7 +1286,7 @@ export default { |
1234 | 1286 | responseType: 'arraybuffer', |
1235 | 1287 | }); |
1236 | 1288 | }, |
1237 | - //班级名册导出 | |
1289 | + //上传图片 | |
1238 | 1290 | puploadImg(data) { |
1239 | 1291 | return service({ |
1240 | 1292 | url: setUpUrls.uploadImg, |
... | ... | @@ -1242,4 +1294,28 @@ export default { |
1242 | 1294 | data, |
1243 | 1295 | }); |
1244 | 1296 | }, |
1297 | + //学生测练统计 | |
1298 | + studentExamReport(data) { | |
1299 | + return service({ | |
1300 | + url: setUpUrls.studentExamReport, | |
1301 | + method: "POST", | |
1302 | + data, | |
1303 | + }); | |
1304 | + }, | |
1305 | + //查询最新的授课端应用版本 | |
1306 | + pLatestVersion(data) { | |
1307 | + return service({ | |
1308 | + url: setUpUrls.pLatestVersion, | |
1309 | + method: "POST", | |
1310 | + data, | |
1311 | + }); | |
1312 | + }, | |
1313 | + //载指定版本授课端 | |
1314 | + pGetAppDownloadUrl(data) { | |
1315 | + return service({ | |
1316 | + url: setUpUrls.pGetAppDownloadUrl, | |
1317 | + method: "POST", | |
1318 | + data, | |
1319 | + }); | |
1320 | + }, | |
1245 | 1321 | }; | ... | ... |
src/api/urls/apis.js
... | ... | @@ -24,7 +24,7 @@ export default { |
24 | 24 | cTExportPhaseInteractiveReport: "/api_html/class/manager/exportPhaseInteractiveReport", |
25 | 25 | //班主任- 导出阶段测练报表 |
26 | 26 | cTExportPhaseExamReport: "/api_html/class/manager/exportPhaseExamReport", |
27 | - | |
27 | + | |
28 | 28 | //任课老师-查询管理班级 |
29 | 29 | tClassList: "/api_html/teaching/classList", |
30 | 30 | //任课老师-查询管理班级授课科目 |
... | ... | @@ -110,6 +110,19 @@ export default { |
110 | 110 | addStudent: "/api_html/school/manager/addStudent", |
111 | 111 | // 导入学生答题器绑定模板下载地址 |
112 | 112 | studentClickerTemplateUrl: "/api_html/school/manager/studentClickerTemplateUrl", |
113 | + // 导入学生答题器文件上传 | |
114 | + importStudentClicker: "/api_html/school/manager/importStudentClicker", | |
115 | + // 班级名册模板下载 | |
116 | + classAndStudentTemplate: "/api_html/school/manager/classAndStudentTemplate", | |
117 | + // 班级名册导出 | |
118 | + exportClassAndStudent: "/api_html/school/manager/exportClassAndStudent", | |
119 | + // 教师模板下载 | |
120 | + teacherTemplate: "/api_html/school/manager/teacherTemplate", | |
121 | + // 教师导入 | |
122 | + importTeacher: "/api_html/school/manager/importTeacher", | |
123 | + // 教师导出 | |
124 | + exportTeacher: "/api_html/school/manager/exportTeacher", | |
125 | + | |
113 | 126 | // 删除学生 |
114 | 127 | delStudent: "/api_html/school/manager/delStudent", |
115 | 128 | // 查询学校教师列表 |
... | ... | @@ -201,121 +214,129 @@ export default { |
201 | 214 | syncUser: "/api_html/tenant/syncUser", |
202 | 215 | |
203 | 216 | |
204 | - // 个人版首页统计数据 | |
205 | - personalIndex:"/api_html/personal/index", | |
206 | - // 个人信息 | |
207 | - getInfo:"/api_html/personal/personalInfo", | |
208 | - // 修改个人信息 | |
209 | - modifyInfo:"/api_html/personal/modifyInfo", | |
210 | - // 查询班级列表 | |
211 | - pClassList:"/api_html/personal/classList", | |
212 | - // 查询科目列表 | |
213 | - pSubjectList:"/api_html/personal/subjectList", | |
214 | - // 查询学生列表 | |
215 | - pStudentList:"/api_html/personal/studentList", | |
216 | - // 新增或修改班级 | |
217 | - pSaveClass:"/api_html/personal/saveClass", | |
218 | - // 删除班级 | |
219 | - pDelClass:"/api_html/personal/delClass", | |
220 | - // 增加学生 | |
221 | - pAddStudent:"/api_html/personal/addStudent", | |
222 | - // 删除学生 | |
223 | - pDelStudent:"/api_html/personal/delStudent", | |
224 | - // 查询答题卡类型列表 | |
225 | - pPaperTagList:"/api_html/personal/paperTagList", | |
226 | - // 查询答题卡列表 | |
227 | - pPaperList:"/api_html/personal/paperList", | |
228 | - // 查询答题卡详情 | |
229 | - pPaperDetail:"/api_html/personal/paperDetail", | |
230 | - // 增加答题卡 | |
231 | - pAddPaper:"/api_html/personal/addPaper", | |
232 | - // 修改答题卡 | |
233 | - pModifyPaper:"/api_html/personal/modifyPaper", | |
234 | - // 删除答题卡 | |
235 | - pDelPaper:"/api_html/personal/delPaper", | |
236 | - // 增加答题卡类型 | |
237 | - pAddPaperType:"/api_html/personal/addPaperType", | |
238 | - // 修改答题卡类型 | |
239 | - pModifyPaperType:"/api_html/personal/modifyPaperType", | |
240 | - // 删除答题卡类型 | |
241 | - pDelPaperType:"/api_html/personal/delPaperType", | |
242 | - // 分页查询课时报表列表 | |
243 | - pPeriodReportList:"/api_html/personal/periodReportList", | |
244 | - // 查询阶段问答报表 | |
245 | - pPhaseAnswerReport:"/api_html/personal/phaseAnswerReport", | |
246 | - // 查询阶段互动报表 | |
247 | - pPhaseInteractiveReport:"/api_html/personal/phaseInteractiveReport", | |
248 | - // 查询课时题目列表 | |
249 | - pPeriodQuestionList:"/api_html/personal/periodQuestionList", | |
250 | - // 设置课时报表答案 | |
251 | - pSetPeriodAnswer:"/api_html/personal/setPeriodAnswer", | |
252 | - // 查询课时报表详情 | |
253 | - pPeriodDetail:"/api_html/personal/periodDetail", | |
254 | - // 分页查询课时题目统计列表 | |
255 | - pPeriodQuestionReport:"/api_html/personal/periodQuestionReport", | |
256 | - // 查询课时学生答题明细 | |
257 | - pPeriodStudentReport:"/api_html/personal/periodStudentReport", | |
258 | - // 导出阶段报表 | |
259 | - pExportPhaseReport:"/api_html/personal/exportPhaseReport", | |
260 | - // 分页查询即时测报表 | |
261 | - pExamReportList:"/api_html/personal/examReportList", | |
262 | - // 查询阶段测练报表 | |
263 | - pPhaseExamReport:"/api_html/personal/phaseExamReport", | |
264 | - // 查询即时测报表题目列表 | |
265 | - pExamQuestionList:"/api_html/personal/examQuestionList", | |
266 | - // 设置即时测报表答案 | |
267 | - pSetExamAnswer:"/api_html/personal/setExamAnswer", | |
268 | - // 查询即时测报表详情 | |
269 | - pExamDetail:"/api_html/personal/examDetail", | |
270 | - // 下载导入主观题分模板 | |
271 | - pSubjectiveScoreTemplate:"/api_html/personal/subjectiveScoreTemplate", | |
272 | - // 导入主观题得分 | |
273 | - pImportSubjectiveScore:"/api_html/personal/importSubjectiveScore", | |
274 | - // 分页查询即时测题目统计 | |
275 | - pExamQuestionReport:"/api_html/personal/examQuestionReport", | |
276 | - // 查询即时测学生统计 | |
277 | - pExamStudentReport:"/api_html/personal/examStudentReport", | |
278 | - // 重新判分 | |
279 | - pReScore:"/api_html/personal/reScore", | |
280 | - // 导出单课时报表 | |
281 | - pExportPeriodReport:"/api_html/personal/exportPeriodReport", | |
282 | - // 导出阶段测练报表 | |
283 | - pExportPhaseExamReport:"/api_html/personal/exportPhaseExamReport", | |
284 | - // 导出单卷测练报表 | |
285 | - pExportExamReport:"/api_html/personal/exportExamReport", | |
286 | - // 数据导出 | |
287 | - pExportData:"/api_html/personal/exportData", | |
288 | - // 数据导入 | |
289 | - pImportData:"/api_html/personal/importData", | |
217 | + // 个人版首页统计数据 | |
218 | + personalIndex: "/api_html/personal/index", | |
219 | + // 个人信息 | |
220 | + getInfo: "/api_html/personal/personalInfo", | |
221 | + // 修改个人信息 | |
222 | + modifyInfo: "/api_html/personal/modifyInfo", | |
223 | + // 查询班级列表 | |
224 | + pClassList: "/api_html/personal/classList", | |
225 | + // 查询科目列表 | |
226 | + pSubjectList: "/api_html/personal/subjectList", | |
227 | + // 查询学生列表 | |
228 | + pStudentList: "/api_html/personal/studentList", | |
229 | + // 新增或修改班级 | |
230 | + pSaveClass: "/api_html/personal/saveClass", | |
231 | + // 删除班级 | |
232 | + pDelClass: "/api_html/personal/delClass", | |
233 | + // 增加学生 | |
234 | + pAddStudent: "/api_html/personal/addStudent", | |
235 | + // 删除学生 | |
236 | + pDelStudent: "/api_html/personal/delStudent", | |
237 | + // 查询答题卡类型列表 | |
238 | + pPaperTagList: "/api_html/personal/paperTagList", | |
239 | + // 查询答题卡列表 | |
240 | + pPaperList: "/api_html/personal/paperList", | |
241 | + // 查询答题卡详情 | |
242 | + pPaperDetail: "/api_html/personal/paperDetail", | |
243 | + // 增加答题卡 | |
244 | + pAddPaper: "/api_html/personal/addPaper", | |
245 | + // 修改答题卡 | |
246 | + pModifyPaper: "/api_html/personal/modifyPaper", | |
247 | + // 删除答题卡 | |
248 | + pDelPaper: "/api_html/personal/delPaper", | |
249 | + // 增加答题卡类型 | |
250 | + pAddPaperType: "/api_html/personal/addPaperType", | |
251 | + // 修改答题卡类型 | |
252 | + pModifyPaperType: "/api_html/personal/modifyPaperType", | |
253 | + // 删除答题卡类型 | |
254 | + pDelPaperType: "/api_html/personal/delPaperType", | |
255 | + // 分页查询课时报表列表 | |
256 | + pPeriodReportList: "/api_html/personal/periodReportList", | |
257 | + // 查询阶段问答报表 | |
258 | + pPhaseAnswerReport: "/api_html/personal/phaseAnswerReport", | |
259 | + // 查询阶段互动报表 | |
260 | + pPhaseInteractiveReport: "/api_html/personal/phaseInteractiveReport", | |
261 | + // 查询课时题目列表 | |
262 | + pPeriodQuestionList: "/api_html/personal/periodQuestionList", | |
263 | + // 设置课时报表答案 | |
264 | + pSetPeriodAnswer: "/api_html/personal/setPeriodAnswer", | |
265 | + // 查询课时报表详情 | |
266 | + pPeriodDetail: "/api_html/personal/periodDetail", | |
267 | + // 分页查询课时题目统计列表 | |
268 | + pPeriodQuestionReport: "/api_html/personal/periodQuestionReport", | |
269 | + // 查询课时学生答题明细 | |
270 | + pPeriodStudentReport: "/api_html/personal/periodStudentReport", | |
271 | + // 导出阶段报表 | |
272 | + pExportPhaseReport: "/api_html/personal/exportPhaseReport", | |
273 | + // 分页查询即时测报表 | |
274 | + pExamReportList: "/api_html/personal/examReportList", | |
275 | + // 查询阶段测练报表 | |
276 | + pPhaseExamReport: "/api_html/personal/phaseExamReport", | |
277 | + // 查询即时测报表题目列表 | |
278 | + pExamQuestionList: "/api_html/personal/examQuestionList", | |
279 | + // 设置即时测报表答案 | |
280 | + pSetExamAnswer: "/api_html/personal/setExamAnswer", | |
281 | + // 查询即时测报表详情 | |
282 | + pExamDetail: "/api_html/personal/examDetail", | |
283 | + // 下载导入主观题分模板 | |
284 | + pSubjectiveScoreTemplate: "/api_html/personal/subjectiveScoreTemplate", | |
285 | + // 导入主观题得分 | |
286 | + pImportSubjectiveScore: "/api_html/personal/importSubjectiveScore", | |
287 | + // 分页查询即时测题目统计 | |
288 | + pExamQuestionReport: "/api_html/personal/examQuestionReport", | |
289 | + // 查询即时测学生统计 | |
290 | + pExamStudentReport: "/api_html/personal/examStudentReport", | |
291 | + // 重新判分 | |
292 | + pReScore: "/api_html/personal/reScore", | |
293 | + // 导出单课时报表 | |
294 | + pExportPeriodReport: "/api_html/personal/exportPeriodReport", | |
295 | + // 导出阶段测练报表 | |
296 | + pExportPhaseExamReport: "/api_html/personal/exportPhaseExamReport", | |
297 | + // 导出单卷测练报表 | |
298 | + pExportExamReport: "/api_html/personal/exportExamReport", | |
299 | + // 数据导出 | |
300 | + pExportData: "/api_html/personal/exportData", | |
301 | + // 数据导入 | |
302 | + pImportData: "/api_html/personal/importData", | |
290 | 303 | |
291 | 304 | |
292 | - /** 平台管理 */ | |
293 | - //账户管理 | |
294 | - tenantPage:"/api_html/system/tenantPage", | |
295 | - //修改账号 | |
296 | - updateTenant:"/api_html/system/updateTenant", | |
297 | - //新增租户账号 | |
298 | - addTenant:"/api_html/system/addTenant", | |
299 | - // 授课端版本管理 | |
300 | - versionPage:"/api_html/system/versionPage", | |
301 | - // 新增授课端版本 | |
302 | - addVersion:"/api_html/system/addVersion", | |
303 | - // 基站统计数据 | |
304 | - pStationReport:"/api_html/system/stationReport", | |
305 | - // 答题器统计数据 | |
306 | - pKeyboardReport:"/api_html/system/keyboardReport", | |
307 | - // 查询设备列表 | |
308 | - pDeviceList:"/api_html/system/deviceList", | |
309 | - // 查询设备详情 | |
310 | - pDeviceDetail:"/api_html/system/deviceDetail", | |
311 | - // 查询设备日志列表 | |
312 | - pDeviceLogList:"/api_html/system/deviceLogList", | |
313 | - // 文件上传 | |
314 | - uploadApp:"/file/uploadApp", | |
315 | - // 图片上传 | |
316 | - uploadImg:"/file/uploadImg", | |
317 | - // 班级名册导入 | |
318 | - studentTemplateUrl:"/api_html/personal/studentTemplateUrl", | |
319 | - // 班级名册导出 | |
320 | - exportStudent:"/api_html/personal/exportStudent", | |
305 | + /** 平台管理 */ | |
306 | + //账户管理 | |
307 | + tenantPage: "/api_html/system/tenantPage", | |
308 | + //修改账号 | |
309 | + updateTenant: "/api_html/system/updateTenant", | |
310 | + //新增租户账号 | |
311 | + addTenant: "/api_html/system/addTenant", | |
312 | + // 授课端版本管理 | |
313 | + versionPage: "/api_html/system/versionPage", | |
314 | + // 新增授课端版本 | |
315 | + addVersion: "/api_html/system/addVersion", | |
316 | + // 删除授课端版本 | |
317 | + delVersion: "/api_html/system/delVersion", | |
318 | + // 基站统计数据 | |
319 | + pStationReport: "/api_html/system/stationReport", | |
320 | + // 答题器统计数据 | |
321 | + pKeyboardReport: "/api_html/system/keyboardReport", | |
322 | + // 查询设备列表 | |
323 | + pDeviceList: "/api_html/system/deviceList", | |
324 | + // 查询设备详情 | |
325 | + pDeviceDetail: "/api_html/system/deviceDetail", | |
326 | + // 查询设备日志列表 | |
327 | + pDeviceLogList: "/api_html/system/deviceLogList", | |
328 | + // 文件上传 | |
329 | + uploadApp: "/file/uploadApp", | |
330 | + // 图片上传 | |
331 | + uploadImg: "/file/uploadImg", | |
332 | + // 班级名册导入 | |
333 | + studentTemplateUrl: "/api_html/personal/studentTemplateUrl", | |
334 | + // 班级名册导出 | |
335 | + exportStudent: "/api_html/personal/exportStudent", | |
336 | + // 学生测练统计 | |
337 | + studentExamReport: "/api_html/personal/studentExamReport", | |
338 | + // 查询最新的授课端应用版本 | |
339 | + pLatestVersion: "/api_html/personal/latestVersion", | |
340 | + // 载指定版本授课端 | |
341 | + pGetAppDownloadUrl: "/api_html/personal/getAppDownloadUrl", | |
321 | 342 | } | ... | ... |
src/assets/img404/bg404.jpg renamed to src/assets/images/img404/bg404.jpg
35.8 KB
src/assets/img404/i404.png renamed to src/assets/images/img404/i404.png
16.8 KB
src/assets/img404/sign.png renamed to src/assets/images/img404/sign.png
423 KB
src/router/index.js
... | ... | @@ -8,10 +8,14 @@ import HomeMain from "@/views/index/mainIndex" |
8 | 8 | |
9 | 9 | // 不是必须加载的组件使用懒加载 |
10 | 10 | const NotFound = () => import("@/views/page404") |
11 | -const ExaminationPaper = () => import("@/views/standard/examinationPaper/index") | |
12 | -const ExaminationPaperAdd = () => import("@/views/standard/examinationPaper/add") | |
13 | -const ExaminationPaperEdit = () => import("@/views/standard/examinationPaper/edit") | |
14 | -const ExaminationPaperRecycle = () => import("@/views/standard/examinationPaper/recycle") | |
11 | +const ExaminationPaper = () => import("@/views/examinationPaper/index") | |
12 | +const ExaminationPaperAdd = () => import("@/views/examinationPaper/add") | |
13 | +const ExaminationPaperEdit = () => import("@/views/examinationPaper/edit") | |
14 | +const ExaminationPaperRecycle = () => import("@/views/examinationPaper/recycle") | |
15 | +const Portrait = () => import("@/views/portrait/index") | |
16 | +const PortraitDetail = () => import("@/views/portrait/detail") | |
17 | + | |
18 | + | |
15 | 19 | const Ask = () => import("@/views/standard/ask/index") |
16 | 20 | const AskAnalysis = () => import("@/views/standard/ask/analysis") |
17 | 21 | const Test = () => import("@/views/standard/test/index") |
... | ... | @@ -29,17 +33,11 @@ const SetUpSchool = () => import("@/views/standard/setUp/school") |
29 | 33 | const SetUpStudent = () => import("@/views/standard/setUp/student") |
30 | 34 | const SetUpTeacher = () => import("@/views/standard/setUp/teacher") |
31 | 35 | |
32 | -const PersonalExaminationPaper = () => import("@/views/personal/examinationPaper/index") | |
33 | -const PersonalExaminationPaperAdd = () => import("@/views/personal/examinationPaper/add") | |
34 | -const PersonalExaminationPaperEdit = () => import("@/views/personal/examinationPaper/edit") | |
35 | -const PersonalExaminationPaperRecycle = () => import("@/views/personal/examinationPaper/recycle") | |
36 | 36 | const PersonalAsk = () => import("@/views/personal/ask/index") |
37 | 37 | const PersonalAskAnalysis = () => import("@/views/personal/ask/analysis") |
38 | 38 | const PersonalTest = () => import("@/views/personal/test/index") |
39 | 39 | const PersonalTestAnalysis = () => import("@/views/personal/test/analysis") |
40 | 40 | const PersonalDataSync = () => import("@/views/personal/dataSync/index") |
41 | -const PersonalPortrait = () => import("@/views/personal/portrait/index") | |
42 | -const PersonalPortraitDetail = () => import("@/views/personal/portrait/detail") | |
43 | 41 | const PersonalSetUpStudent = () => import("@/views/personal/setUp/student") |
44 | 42 | const PersonalDown = () => import("@/views/personal/down/index") |
45 | 43 | const PersonalUserInfo = () => import("@/views/personal/userInfo/index") |
... | ... | @@ -371,6 +369,33 @@ let addrouters = [ //测试用,后续后端获取 |
371 | 369 | } |
372 | 370 | ] |
373 | 371 | }, |
372 | + { | |
373 | + path: "/portrait", | |
374 | + iconCls: "fa fa-users", // 图标样式class | |
375 | + name: "学生画像", | |
376 | + component: Layout, | |
377 | + alone: true, | |
378 | + children: [ | |
379 | + { | |
380 | + path: "/portrait", | |
381 | + iconCls: "fa fa-users", // 图标样式class | |
382 | + name: "", | |
383 | + component: Portrait, | |
384 | + meta: { | |
385 | + keepAlive: true, | |
386 | + }, | |
387 | + children: [] | |
388 | + }, | |
389 | + { | |
390 | + path: "/portraitDetail", | |
391 | + iconCls: "", // 图标样式class | |
392 | + name: "授课端软件", | |
393 | + component: PortraitDetail, | |
394 | + parent: "down", | |
395 | + children: [] | |
396 | + } | |
397 | + ] | |
398 | + }, | |
374 | 399 | ] |
375 | 400 | |
376 | 401 | const addroutersPersonal = [ |
... | ... | @@ -401,14 +426,14 @@ const addroutersPersonal = [ |
401 | 426 | path: "/examinationPaper", |
402 | 427 | iconCls: "fa fa-file-text", // 图标样式class |
403 | 428 | name: "examinationPaper", |
404 | - component: PersonalExaminationPaper, | |
429 | + component: ExaminationPaper, | |
405 | 430 | children: [] |
406 | 431 | }, |
407 | 432 | { |
408 | 433 | path: "/examinationPaperAdd", |
409 | 434 | iconCls: "", // 图标样式class |
410 | 435 | name: "examinationPaperAdd", |
411 | - component: PersonalExaminationPaperAdd, | |
436 | + component: ExaminationPaperAdd, | |
412 | 437 | parent: "examinationPaper", |
413 | 438 | children: [] |
414 | 439 | }, |
... | ... | @@ -416,7 +441,7 @@ const addroutersPersonal = [ |
416 | 441 | path: "/examinationPaperEdit", |
417 | 442 | iconCls: "", // 图标样式class |
418 | 443 | name: "修改答题卡", |
419 | - component: PersonalExaminationPaperEdit, | |
444 | + component: ExaminationPaperEdit, | |
420 | 445 | parent: "examinationPaper", |
421 | 446 | children: [] |
422 | 447 | }, |
... | ... | @@ -424,7 +449,7 @@ const addroutersPersonal = [ |
424 | 449 | path: "/examinationPaperRecycle", |
425 | 450 | iconCls: "", // 图标样式class |
426 | 451 | name: "已归档答题卡", |
427 | - component: PersonalExaminationPaperRecycle, | |
452 | + component: ExaminationPaperRecycle, | |
428 | 453 | parent: "examinationPaper", |
429 | 454 | children: [] |
430 | 455 | }, |
... | ... | @@ -498,7 +523,7 @@ const addroutersPersonal = [ |
498 | 523 | path: "/portrait", |
499 | 524 | iconCls: "fa fa-users", // 图标样式class |
500 | 525 | name: "", |
501 | - component: PersonalPortrait, | |
526 | + component: Portrait, | |
502 | 527 | meta: { |
503 | 528 | keepAlive: true, |
504 | 529 | }, |
... | ... | @@ -508,7 +533,7 @@ const addroutersPersonal = [ |
508 | 533 | path: "/portraitDetail", |
509 | 534 | iconCls: "", // 图标样式class |
510 | 535 | name: "授课端软件", |
511 | - component: PersonalPortraitDetail, | |
536 | + component: PortraitDetail, | |
512 | 537 | parent: "down", |
513 | 538 | children: [] |
514 | 539 | } | ... | ... |
src/utils/index.js
... | ... | @@ -197,7 +197,7 @@ export function b64DecodeUnicode(str) { |
197 | 197 | }) |
198 | 198 | .join("") |
199 | 199 | ); |
200 | - } catch (e) {} | |
200 | + } catch (e) { } | |
201 | 201 | return uni; |
202 | 202 | } |
203 | 203 | |
... | ... | @@ -568,7 +568,7 @@ function setSectionName(num) { |
568 | 568 | } |
569 | 569 | return txt; |
570 | 570 | } |
571 | -function setGradeName(num) { | |
571 | +export function setGradeName(num) { | |
572 | 572 | let txt = ""; |
573 | 573 | switch (num) { |
574 | 574 | case 1: |
... | ... | @@ -619,6 +619,9 @@ function setGradeName(num) { |
619 | 619 | case 16: |
620 | 620 | txt = "大四"; |
621 | 621 | break; |
622 | + default: | |
623 | + txt = "未知"; | |
624 | + break; | |
622 | 625 | } |
623 | 626 | return txt; |
624 | 627 | } |
... | ... | @@ -724,7 +727,7 @@ export function formatGradeNameClass(data) { |
724 | 727 | { |
725 | 728 | value: item.id, |
726 | 729 | label: item.className, |
727 | - leaf:true | |
730 | + leaf: true | |
728 | 731 | }, |
729 | 732 | ], |
730 | 733 | }); |
... | ... | @@ -738,7 +741,7 @@ export function formatGradeNameClass(data) { |
738 | 741 | gradeNameArr[gradeIndex].children.push({ |
739 | 742 | value: item.id, |
740 | 743 | label: item.className, |
741 | - leaf:true | |
744 | + leaf: true | |
742 | 745 | }); |
743 | 746 | } |
744 | 747 | }); | ... | ... |
src/views/admin/clientVersion/components/upLoad.vue
... | ... | @@ -8,15 +8,15 @@ |
8 | 8 | :action="url" |
9 | 9 | :multiple="false" |
10 | 10 | :data="{ ...query }" |
11 | - :with-credentials="true" | |
12 | 11 | :limit="1" |
13 | 12 | :on-change="change" |
14 | 13 | :on-success="upSuccess" |
15 | 14 | :on-error="upError" |
15 | + accept=".zip" | |
16 | 16 | > |
17 | 17 | <!-- accept="application/vnd.ms-excel" --> |
18 | 18 | <div class="upload-btn"> |
19 | - <el-button class="btn" size="mini" type="primary">选择文件</el-button> | |
19 | + <el-button class="btn" size="mini" type="primary">选择zip文件</el-button> | |
20 | 20 | </div> |
21 | 21 | </el-upload> |
22 | 22 | </div> | ... | ... |
src/views/admin/clientVersion/components/upLoadImg.vue
... | ... | @@ -7,10 +7,10 @@ |
7 | 7 | :action="url" |
8 | 8 | :multiple="false" |
9 | 9 | :data="{ ...query }" |
10 | - :with-credentials="true" | |
11 | 10 | :limit="1" |
12 | 11 | :on-success="upSuccess" |
13 | 12 | :on-error="upError" |
13 | + accept="image/*" | |
14 | 14 | > |
15 | 15 | <!-- accept="application/vnd.ms-excel" --> |
16 | 16 | <img v-if="imageUrl" :src="imageUrl" class="avatar" /> | ... | ... |
src/views/admin/clientVersion/index.vue
... | ... | @@ -75,7 +75,12 @@ |
75 | 75 | </el-pagination> |
76 | 76 | </div> |
77 | 77 | </div> |
78 | - <el-dialog title="添加账号" :visible.sync="diaAdd" width="400"> | |
78 | + <el-dialog | |
79 | + title="添加账号" | |
80 | + :visible.sync="diaAdd" | |
81 | + v-if="diaAdd" | |
82 | + width="400" | |
83 | + > | |
79 | 84 | <el-form |
80 | 85 | class="form-box" |
81 | 86 | :model="formAdd" |
... | ... | @@ -93,7 +98,7 @@ |
93 | 98 | </el-input> |
94 | 99 | </el-col> |
95 | 100 | </el-form-item> |
96 | - <el-form-item label="版本号:" prop="versionNumber"> | |
101 | + <el-form-item label="版本号:"> | |
97 | 102 | <el-col :span="12"> |
98 | 103 | <el-input |
99 | 104 | placeholder="请输入版本号" |
... | ... | @@ -103,19 +108,19 @@ |
103 | 108 | </el-input> |
104 | 109 | </el-col> |
105 | 110 | </el-form-item> |
106 | - <el-form-item label="软件图标:" prop="logo"> | |
111 | + <el-form-item label="软件图标:"> | |
107 | 112 | <el-col :span="12"> |
108 | - <upLoadImg :url="url" @upSuccess="logoSuccess"/> | |
113 | + <upLoadImg url="/file/uploadImg" @upSuccess="logoSuccess" /> | |
109 | 114 | </el-col> |
110 | 115 | </el-form-item> |
111 | - <el-form-item label="上传全量文件包:" prop="appfiles"> | |
116 | + <el-form-item label="上传全量文件包:" prop="filePath"> | |
112 | 117 | <el-col :span="12"> |
113 | - <upLoad :url="url" @upSuccess="appfilesSuccess"/> | |
118 | + <upLoad :url="url" @upSuccess="appfilesSuccess" /> | |
114 | 119 | </el-col> |
115 | 120 | </el-form-item> |
116 | - <el-form-item label="上传增量文件包:" prop="addfiles"> | |
121 | + <el-form-item label="上传增量文件包:" prop="incrementFilePath"> | |
117 | 122 | <el-col :span="12"> |
118 | - <upLoad :url="url" @upSuccess="addfilesSuccess"/> | |
123 | + <upLoad :url="url" @upSuccess="addfilesSuccess" /> | |
119 | 124 | </el-col> |
120 | 125 | </el-form-item> |
121 | 126 | <el-form-item label="更新描述:" prop="description"> |
... | ... | @@ -138,17 +143,18 @@ |
138 | 143 | </template> |
139 | 144 | |
140 | 145 | <script> |
141 | -import upLoad from "./components/upLoad.vue" | |
142 | -import upLoadImg from "./components/upLoadImg.vue" | |
146 | +import upLoad from "./components/upLoad.vue"; | |
147 | +import upLoadImg from "./components/upLoadImg.vue"; | |
143 | 148 | export default { |
144 | - components:{ | |
149 | + components: { | |
145 | 150 | upLoad, |
146 | - upLoadImg | |
151 | + upLoadImg, | |
147 | 152 | }, |
148 | 153 | data() { |
149 | 154 | return { |
150 | 155 | url: "/file/uploadApp", |
151 | 156 | loading: false, |
157 | + addLoading: false, | |
152 | 158 | diaAdd: false, |
153 | 159 | tableData: [], |
154 | 160 | formAdd: { |
... | ... | @@ -163,12 +169,6 @@ export default { |
163 | 169 | versionName: [ |
164 | 170 | { required: true, message: "请输入版本名称", trigger: "blur" }, |
165 | 171 | ], |
166 | - versionNumber: [ | |
167 | - { required: true, message: "请输入版本号", trigger: "blur" }, | |
168 | - ], | |
169 | - appImage: [ | |
170 | - { required: true, message: "请上传软件图标", trigger: "blur" }, | |
171 | - ], | |
172 | 172 | filePath: [ |
173 | 173 | { required: true, message: "请上传全量文件包", trigger: "blur" }, |
174 | 174 | ], |
... | ... | @@ -198,17 +198,42 @@ export default { |
198 | 198 | this.page = page; |
199 | 199 | this._QueryData(); |
200 | 200 | }, |
201 | - remove(obj) {}, | |
202 | - logoSuccess(res){ | |
203 | - this.formAdd.appImage = res.data; | |
201 | + async remove(obj) { | |
202 | + const { data, status, info } = await this.$request.delVersion({ | |
203 | + id: obj.id, | |
204 | + }); | |
205 | + if (status === 0) { | |
206 | + this.$message.success("删除成功~"); | |
207 | + this._QueryData(); | |
208 | + } else { | |
209 | + this.$message.error(info); | |
210 | + } | |
211 | + }, | |
212 | + logoSuccess(res) { | |
213 | + this.formAdd.appImage = res.data.resId; | |
204 | 214 | }, |
205 | - appfilesSuccess(res){ | |
215 | + appfilesSuccess(res) { | |
206 | 216 | this.formAdd.filePath = res.data; |
207 | 217 | }, |
208 | - addfilesSuccess(res){ | |
218 | + addfilesSuccess(res) { | |
209 | 219 | this.formAdd.incrementFilePath = res.data; |
210 | 220 | }, |
211 | - save() {}, | |
221 | + async save() { | |
222 | + if (this.addLoading) return; | |
223 | + this.addLoading = true; | |
224 | + const { data, status, info } = await this.$request.addVersion({ | |
225 | + ...this.formAdd, | |
226 | + }); | |
227 | + | |
228 | + this.addLoading = false; | |
229 | + if (status === 0) { | |
230 | + this.diaAdd = false; | |
231 | + this.$message.success("添加成功~"); | |
232 | + this._QueryData(); | |
233 | + } else { | |
234 | + this.$message.error(info); | |
235 | + } | |
236 | + }, | |
212 | 237 | async _QueryData() { |
213 | 238 | this.loading = true; |
214 | 239 | this.tableData = []; | ... | ... |
src/views/admin/device/index.vue
... | ... | @@ -27,27 +27,27 @@ |
27 | 27 | <div class="answer-header"> |
28 | 28 | <div class="sel-box"> |
29 | 29 | <el-input |
30 | - placeholder="请输入租户" | |
30 | + placeholder="请输入学校" | |
31 | 31 | v-model="query.schoolName" |
32 | 32 | class="input-with-select" |
33 | - @keyup.enter.native="_QueryData(true)" | |
33 | + @keyup.enter.native="query.loginName='',_QueryData(true)" | |
34 | 34 | > |
35 | 35 | <el-button |
36 | 36 | slot="append" |
37 | 37 | icon="el-icon-search" |
38 | - @click="_QueryData(true)" | |
38 | + @click="query.loginName='',_QueryData(true)" | |
39 | 39 | ></el-button> |
40 | 40 | </el-input> |
41 | 41 | <el-input |
42 | 42 | placeholder="请输入租户" |
43 | - v-model="query.sn" | |
43 | + v-model="query.loginName" | |
44 | 44 | class="input-with-select" |
45 | - @keyup.enter.native="_QueryData(true)" | |
45 | + @keyup.enter.native="query.schoolName='',_QueryData(true)" | |
46 | 46 | > |
47 | 47 | <el-button |
48 | 48 | slot="append" |
49 | 49 | icon="el-icon-search" |
50 | - @click="_QueryData(true)" | |
50 | + @click="query.schoolName='',_QueryData(true)" | |
51 | 51 | ></el-button> |
52 | 52 | </el-input> |
53 | 53 | <el-button class="serach-box" round @click="_QueryData(true)" |
... | ... | @@ -135,30 +135,28 @@ |
135 | 135 | <div class="table-box"> |
136 | 136 | <div class="answer-header"> |
137 | 137 | <div class="sel-box"> |
138 | - <el-select | |
139 | - class="sel" | |
140 | - v-model="query.school" | |
141 | - placeholder="选择学校" | |
142 | - @change="_QueryData(true)" | |
138 | + <el-input | |
139 | + placeholder="请输入学校" | |
140 | + v-model="query.schoolName" | |
141 | + class="input-with-select" | |
142 | + @keyup.enter.native="query.loginName='',_QueryData(true)" | |
143 | 143 | > |
144 | - <el-option | |
145 | - v-for="item in schoolList" | |
146 | - :key="item.value" | |
147 | - :label="item.label" | |
148 | - :value="item.value" | |
149 | - > | |
150 | - </el-option> | |
151 | - </el-select> | |
144 | + <el-button | |
145 | + slot="append" | |
146 | + icon="el-icon-search" | |
147 | + @click="query.loginName='',_QueryData(true)" | |
148 | + ></el-button> | |
149 | + </el-input> | |
152 | 150 | <el-input |
153 | 151 | placeholder="请输入租户" |
154 | - v-model="query.sn" | |
152 | + v-model="query.loginName" | |
155 | 153 | class="input-with-select" |
156 | - @keyup.enter.native="_QueryData(true)" | |
154 | + @keyup.enter.native="query.schoolName='',_QueryData(true)" | |
157 | 155 | > |
158 | 156 | <el-button |
159 | 157 | slot="append" |
160 | 158 | icon="el-icon-search" |
161 | - @click="_QueryData(true)" | |
159 | + @click="query.schoolName='',_QueryData(true)" | |
162 | 160 | ></el-button> |
163 | 161 | </el-input> |
164 | 162 | <el-button class="serach-box" round @click="_QueryData(true)" |
... | ... | @@ -255,7 +253,6 @@ export default { |
255 | 253 | this.page = 1; |
256 | 254 | this.total = 0; |
257 | 255 | this.count = 0; |
258 | - this.query.onlineStatus = ""; | |
259 | 256 | this.query.schoolName = ""; |
260 | 257 | this.query.loginName = ""; |
261 | 258 | if (val == 1) { |
... | ... | @@ -275,7 +272,6 @@ export default { |
275 | 272 | query: { |
276 | 273 | schoolName: "", |
277 | 274 | loginName: "", |
278 | - onlineStatus: "", | |
279 | 275 | }, |
280 | 276 | tableData: [], |
281 | 277 | total: 0, |
... | ... | @@ -377,13 +373,6 @@ export default { |
377 | 373 | query[key] = this.query[key]; |
378 | 374 | } |
379 | 375 | } |
380 | - if (query.loginName) { | |
381 | - delete query.schoolName; | |
382 | - delete query.onlineStatus; | |
383 | - } else if (query.schoolName) { | |
384 | - delete query.loginName; | |
385 | - delete query.onlineStatus; | |
386 | - } | |
387 | 376 | if (isRef) { |
388 | 377 | this.page = 1; |
389 | 378 | } | ... | ... |
src/views/admin/device/log.vue
src/views/personal/examinationPaper/add.vue renamed to src/views/examinationPaper/add.vue
... | ... | @@ -55,6 +55,26 @@ |
55 | 55 | @click="openTagDia" |
56 | 56 | ></el-button> |
57 | 57 | </el-form-item> |
58 | + <el-form-item | |
59 | + v-if="role != 'ROLE_PERSONAL'" | |
60 | + label="年级:" | |
61 | + prop="gradeName" | |
62 | + > | |
63 | + <el-select | |
64 | + class="sel" | |
65 | + v-model="form.gradeName" | |
66 | + placeholder="" | |
67 | + @change="changeGrade" | |
68 | + > | |
69 | + <el-option | |
70 | + v-for="item in gradeList" | |
71 | + :key="item" | |
72 | + :label="item" | |
73 | + :value="item" | |
74 | + > | |
75 | + </el-option> | |
76 | + </el-select> | |
77 | + </el-form-item> | |
58 | 78 | <el-form-item label="科目:" prop="subjectName"> |
59 | 79 | <el-select class="sel" v-model="form.subjectName" placeholder=""> |
60 | 80 | <el-option |
... | ... | @@ -77,6 +97,16 @@ |
77 | 97 | label="考试时长" |
78 | 98 | ></el-input-number> |
79 | 99 | </el-form-item> |
100 | + <el-form-item | |
101 | + v-if="role != 'ROLE_PERSONAL'" | |
102 | + label="分享范围:" | |
103 | + prop="sharingType" | |
104 | + > | |
105 | + <el-radio-group v-model="form.sharingType"> | |
106 | + <el-radio :label="0">任课班级分享</el-radio> | |
107 | + <el-radio :label="1">全年级分享</el-radio> | |
108 | + </el-radio-group> | |
109 | + </el-form-item> | |
80 | 110 | </el-form> |
81 | 111 | <div class="btn-box"> |
82 | 112 | <el-button type="danger" plain round @click="linkBack" |
... | ... | @@ -830,23 +860,29 @@ |
830 | 860 | </div> |
831 | 861 | </div> |
832 | 862 | <el-dialog |
833 | - :title="upLoadType == 1 ? '上传题干' : '上传题目解析'" | |
863 | + :title="stem.type == 1 ? '上传题干' : '上传题目解析'" | |
834 | 864 | :visible.sync="dialogStem" |
865 | + v-if="dialogStem" | |
835 | 866 | width="500" |
836 | 867 | > |
837 | - <div> | |
838 | - <img class="stem-pic" :src="stem.screenshot" alt="" /> | |
868 | + <div class="upload-box"> | |
869 | + <img | |
870 | + v-if="stem.screenshot || stem.answerScreenshot" | |
871 | + :src=" | |
872 | + stem.type == 1 ? stem.screenshotSrc : stem.answerScreenshotSrc | |
873 | + " | |
874 | + class="stem-pic" | |
875 | + /> | |
839 | 876 | <el-upload |
840 | 877 | class="upload-demo" |
841 | 878 | action="http://121.40.127.171/file/uploadImg" |
842 | 879 | :limit="1" |
843 | - :with-credentials="true" | |
844 | 880 | :on-success="upSuccess" |
845 | 881 | :on-error="upError" |
846 | 882 | accept="image/*" |
847 | 883 | > |
848 | 884 | <el-button size="small" type="primary">{{ |
849 | - stem.src ? "重新上传" : "选择照片" | |
885 | + stem.screenshot || stem.answerScreenshot ? "重新上传" : "选择照片" | |
850 | 886 | }}</el-button> |
851 | 887 | </el-upload> |
852 | 888 | </div> |
... | ... | @@ -930,43 +966,8 @@ export default { |
930 | 966 | }, |
931 | 967 | data() { |
932 | 968 | return { |
933 | - dialogStem: false, | |
934 | - dialogTag: false, | |
935 | - upLoadType: 1, | |
936 | - stem: { | |
937 | - id: "", | |
938 | - type: 1, | |
939 | - index: 0, | |
940 | - indexs: 0, | |
941 | - screenshot: "", //题干图片地址 | |
942 | - answerScreenshot: "", //题干解析图片地址 | |
943 | - difficultyFactor: 0, //题目难度 | |
944 | - knowledge: [], //知识点 | |
945 | - }, | |
946 | - type: 1, //1-创建,2-复制答题卡 | |
947 | - dialogVisible: false, //测验类型设置弹窗 | |
948 | - addQuestionVisible: false, //添加大题弹窗 | |
949 | - questionForm: { ...questionForm }, | |
950 | - questionFormRules: { | |
951 | - questionTitle: [ | |
952 | - { required: true, message: "请输入大题名称", trigger: "blur" }, | |
953 | - { | |
954 | - min: 1, | |
955 | - max: 30, | |
956 | - message: "长度在 1 到 30 个字符", | |
957 | - trigger: "blur", | |
958 | - }, | |
959 | - ], | |
960 | - }, | |
961 | - questionOptions: [ | |
962 | - { label: "单选题", value: 2 }, | |
963 | - { label: "多选题", value: 3 }, | |
964 | - { label: "判断题", value: 4 }, | |
965 | - { label: "主观题", value: 5 }, | |
966 | - ], | |
967 | - rightOptions: ["A", "B", "C", "D", "E", "F", "G"], | |
968 | - addSubQuestionsType: "", | |
969 | - step: 1, //步骤 | |
969 | + role: "", | |
970 | + step: 0, //步骤 | |
970 | 971 | gradeList: [], //年级 |
971 | 972 | subjectList: [], //科目 |
972 | 973 | answerTypeList: [], //测验类型 |
... | ... | @@ -978,6 +979,8 @@ export default { |
978 | 979 | subjectName: "", |
979 | 980 | examsDuration: 90, |
980 | 981 | questionList: [], |
982 | + gradeName: "", | |
983 | + sharingType: 0, | |
981 | 984 | }, |
982 | 985 | formRules: { |
983 | 986 | //答题卡验证 |
... | ... | @@ -998,7 +1001,9 @@ export default { |
998 | 1001 | ], |
999 | 1002 | }, |
1000 | 1003 | tagList: [], |
1001 | - diaSetAns: false, | |
1004 | + diaSetAns: false, //答案开关 | |
1005 | + dialogStem: false, //截图开关 | |
1006 | + dialogTag: false, //打标开关 | |
1002 | 1007 | formAns: { |
1003 | 1008 | listIndex: 0, //大题位置 |
1004 | 1009 | endIndex: 0, //相同题目最后一位题目的questionIndex |
... | ... | @@ -1008,10 +1013,53 @@ export default { |
1008 | 1013 | answerOptions: [], //答案选项 |
1009 | 1014 | answerList: "", //答案列表-字符串 |
1010 | 1015 | }, |
1016 | + stem: { | |
1017 | + type: 1, //类型 | |
1018 | + index: 0, //大题位置 | |
1019 | + indexs: 0, //小题位置 | |
1020 | + screenshot: "", //题干图片id | |
1021 | + answerScreenshot: "", //题干解析图片id | |
1022 | + screenshotSrc: "", //题干图片地址显示用保存时删除 | |
1023 | + answerScreenshotSrc: "", //题干解析图片地址显示用保存时删除 | |
1024 | + difficultyFactor: 0, //题目难度 | |
1025 | + knowledge: null, //知识点 | |
1026 | + }, | |
1027 | + type: 1, //1-创建,2-复制答题卡 | |
1028 | + dialogVisible: false, //测验类型设置弹窗 | |
1029 | + addQuestionVisible: false, //添加大题弹窗 | |
1030 | + questionForm: { ...questionForm }, | |
1031 | + questionFormRules: { | |
1032 | + questionTitle: [ | |
1033 | + { required: true, message: "请输入大题名称", trigger: "blur" }, | |
1034 | + { | |
1035 | + min: 1, | |
1036 | + max: 30, | |
1037 | + message: "长度在 1 到 30 个字符", | |
1038 | + trigger: "blur", | |
1039 | + }, | |
1040 | + ], | |
1041 | + }, | |
1042 | + questionOptions: [ | |
1043 | + { label: "单选题", value: 2 }, | |
1044 | + { label: "多选题", value: 3 }, | |
1045 | + { label: "判断题", value: 4 }, | |
1046 | + { label: "主观题", value: 5 }, | |
1047 | + ], | |
1048 | + rightOptions: ["A", "B", "C", "D", "E", "F", "G"], | |
1049 | + addSubQuestionsType: "", | |
1011 | 1050 | }; |
1012 | 1051 | }, |
1013 | 1052 | async created() { |
1014 | 1053 | this.type = this.$route.query.type ? this.$route.query.type : 1; |
1054 | + this.role = | |
1055 | + this.$store.getters.info.showRole || | |
1056 | + this.$store.getters.info.permissions[0].role; | |
1057 | + if (this.role != "ROLE_PERSONAL") { | |
1058 | + this.formRules.gradeName = [ | |
1059 | + { required: true, message: "请选择年级", trigger: "blur" }, | |
1060 | + ]; | |
1061 | + await this._GradeList(); | |
1062 | + } | |
1015 | 1063 | await this._QuerySubjectList(this.gradeList[0]); |
1016 | 1064 | await this._TypeList(); |
1017 | 1065 | if (this.type == 2) { |
... | ... | @@ -1021,18 +1069,25 @@ export default { |
1021 | 1069 | methods: { |
1022 | 1070 | openStem(obj, type, index, indexs) { |
1023 | 1071 | //上传截图 |
1024 | - this.upLoadType = type; | |
1025 | - this.stem.id = obj.id; | |
1026 | 1072 | this.stem.type = type; |
1027 | 1073 | this.stem.index = index; |
1028 | 1074 | this.stem.indexs = indexs; |
1029 | - this.stem.screenshot = type == 1 ? obj.screenshot : obj.answerScreenshot; | |
1075 | + if (type == 1) { | |
1076 | + this.stem.screenshot = obj.screenshot || ""; | |
1077 | + this.stem.screenshotSrc = obj.screenshotSrc || ""; | |
1078 | + this.stem.answerScreenshot = ""; | |
1079 | + this.stem.answerScreenshotSrc = ""; | |
1080 | + } else { | |
1081 | + this.stem.screenshot = ""; | |
1082 | + this.stem.screenshotSrc = ""; | |
1083 | + this.stem.answerScreenshot = obj.answerScreenshot || ""; | |
1084 | + this.stem.answerScreenshotSrc = obj.answerScreenshotSrc || ""; | |
1085 | + } | |
1030 | 1086 | this.dialogStem = true; |
1031 | 1087 | }, |
1032 | 1088 | openTag(obj, type, index, indexs) { |
1033 | 1089 | //难度,知识点 |
1034 | 1090 | this.stem = { ...this.stem, obj }; |
1035 | - this.stem.id = obj.id; | |
1036 | 1091 | this.stem.type = type; |
1037 | 1092 | this.stem.index = index; |
1038 | 1093 | this.stem.indexs = indexs; |
... | ... | @@ -1040,14 +1095,18 @@ export default { |
1040 | 1095 | this.stem.difficultyFactor = obj.difficultyFactor || ""; |
1041 | 1096 | this.dialogTag = true; |
1042 | 1097 | }, |
1043 | - upSuccess(res) { | |
1098 | + upSuccess(res, file) { | |
1044 | 1099 | //图片上传成功 |
1045 | 1100 | if (res && res.status == 0) { |
1046 | - this.dialogStem = false; | |
1047 | 1101 | let keys = this.stem.type == 1 ? "screenshot" : "answerScreenshot"; |
1102 | + this.stem[keys + "Src"] = res.data.url; | |
1103 | + this.stem[keys] = res.data.resId; | |
1048 | 1104 | this.form.questionList[this.stem.index].subQuestions[this.stem.indexs][ |
1049 | 1105 | keys |
1050 | 1106 | ] = this.stem[keys]; |
1107 | + this.form.questionList[this.stem.index].subQuestions[this.stem.indexs][ | |
1108 | + keys + "Src" | |
1109 | + ] = this.stem[keys + "Src"]; | |
1051 | 1110 | this.$message.success("上传成功"); |
1052 | 1111 | } else { |
1053 | 1112 | this.$message.error(res.info); |
... | ... | @@ -1175,7 +1234,6 @@ export default { |
1175 | 1234 | val |
1176 | 1235 | ); |
1177 | 1236 | } else { |
1178 | - console.log(this.questionForm.answerList.split(",")); | |
1179 | 1237 | this.questionForm.answerList = this.questionForm.answerList |
1180 | 1238 | .split(",") |
1181 | 1239 | .splice(0, val) |
... | ... | @@ -1431,12 +1489,12 @@ export default { |
1431 | 1489 | ); |
1432 | 1490 | } |
1433 | 1491 | } |
1434 | - console.log(types); | |
1435 | 1492 | }); |
1436 | 1493 | this.step = 2; |
1437 | 1494 | return; |
1438 | 1495 | }, |
1439 | 1496 | formatQuestionList() { |
1497 | + //删除批量操作数据 | |
1440 | 1498 | for (let i = 0; i < this.form.questionList.length; i++) { |
1441 | 1499 | for ( |
1442 | 1500 | let j = 0; |
... | ... | @@ -1627,7 +1685,11 @@ export default { |
1627 | 1685 | return; |
1628 | 1686 | } |
1629 | 1687 | //修改测验类型 |
1630 | - const { data, status, info } = await this.$request.pModifyPaperType({ | |
1688 | + let editPaperType = | |
1689 | + this.role == "ROLE_PERSONAL" | |
1690 | + ? this.$request.pModifyPaperType | |
1691 | + : this.$request.editPaperType; | |
1692 | + const { data, status, info } = await editPaperType({ | |
1631 | 1693 | tagId: obj.id, |
1632 | 1694 | tag: obj.typeName, |
1633 | 1695 | }); |
... | ... | @@ -1641,7 +1703,11 @@ export default { |
1641 | 1703 | }, |
1642 | 1704 | async removeTypeName(obj) { |
1643 | 1705 | //删除测验类型 |
1644 | - const { data, status, info } = await this.$request.pDelPaperType({ | |
1706 | + let delPaperType = | |
1707 | + this.role == "ROLE_PERSONAL" | |
1708 | + ? this.$request.pDelPaperType | |
1709 | + : this.$request.delPaperType; | |
1710 | + const { data, status, info } = await delPaperType({ | |
1645 | 1711 | tagId: obj.id, |
1646 | 1712 | }); |
1647 | 1713 | if (status == 0) { |
... | ... | @@ -1669,7 +1735,11 @@ export default { |
1669 | 1735 | return; |
1670 | 1736 | } |
1671 | 1737 | //添加测验类型 |
1672 | - const { data, status, info } = await this.$request.pAddPaperType({ | |
1738 | + let addPaperType = | |
1739 | + this.role == "ROLE_PERSONAL" | |
1740 | + ? this.$request.pAddPaperType | |
1741 | + : this.$request.addPaperType; | |
1742 | + const { data, status, info } = await addPaperType({ | |
1673 | 1743 | tag: this.answerTypeName, |
1674 | 1744 | }); |
1675 | 1745 | if (status == 0) { |
... | ... | @@ -1689,8 +1759,21 @@ export default { |
1689 | 1759 | let formDatas = deepClone(this.form); |
1690 | 1760 | for (let i = 0; i < formDatas.questionList.length; i++) { |
1691 | 1761 | delete formDatas.questionList[i].show; |
1762 | + for (let j = 0; j < formDatas.questionList[i].subQuestions; j++) { | |
1763 | + if (!!formDatas.questionList[i].subQuestions[j].answerScreenshotSrc) { | |
1764 | + delete formDatas.questionList[i].subQuestions[j] | |
1765 | + .answerScreenshotSrc; | |
1766 | + } | |
1767 | + if (!!formDatas.questionList[i].subQuestions[j].screenshotSrc) { | |
1768 | + delete formDatas.questionList[i].subQuestions[j].screenshotSrc; | |
1769 | + } | |
1770 | + } | |
1692 | 1771 | } |
1693 | - const { data, status, info } = await this.$request.pAddPaper({ | |
1772 | + let addPaper = | |
1773 | + this.role == "ROLE_PERSONAL" | |
1774 | + ? this.$request.pAddPaper | |
1775 | + : this.$request.addPaper; | |
1776 | + const { data, status, info } = await addPaper({ | |
1694 | 1777 | ...formDatas, |
1695 | 1778 | }); |
1696 | 1779 | this.saveLoading = false; |
... | ... | @@ -1702,9 +1785,17 @@ export default { |
1702 | 1785 | this.$message.error(info); |
1703 | 1786 | } |
1704 | 1787 | }, |
1788 | + async changeGrade() { | |
1789 | + //切换年级查询科目 | |
1790 | + this._QuerySubjectList(this.form.gradeName); | |
1791 | + }, | |
1705 | 1792 | async _TypeList() { |
1706 | 1793 | //测验类型查询 |
1707 | - const { data, status, info } = await this.$request.pPaperTagList({ | |
1794 | + let fetchTypeNames = | |
1795 | + this.role == "ROLE_PERSONAL" | |
1796 | + ? this.$request.pPaperTagList | |
1797 | + : this.$request.fetchTypeNames; | |
1798 | + const { data, status, info } = await fetchTypeNames({ | |
1708 | 1799 | type: 1, |
1709 | 1800 | }); |
1710 | 1801 | if (status == 0) { |
... | ... | @@ -1722,30 +1813,51 @@ export default { |
1722 | 1813 | this.$message.error(info); |
1723 | 1814 | } |
1724 | 1815 | }, |
1725 | - | |
1726 | - async _QuerySubjectList() { | |
1816 | + async _GradeList() { | |
1817 | + //查询年级列表 | |
1818 | + const { data, status, info } = await this.$request.fetchGradeList(); | |
1819 | + if (status == 0) { | |
1820 | + this.gradeList = (data.gradeNames && [...data.gradeNames]) || []; | |
1821 | + if (this.type != 2) { | |
1822 | + this.form.gradeName = this.gradeList[0]; | |
1823 | + } | |
1824 | + } else { | |
1825 | + this.$message.error(info); | |
1826 | + } | |
1827 | + }, | |
1828 | + async _QuerySubjectList(grade) { | |
1727 | 1829 | //查询科目列表 |
1728 | - const { data, status, info } = await this.$request.pSubjectList(); | |
1830 | + let query = {}; | |
1831 | + let fetchSubjectList = | |
1832 | + this.role == "ROLE_PERSONAL" | |
1833 | + ? this.$request.pSubjectList | |
1834 | + : this.$request.fetchSubjectList; | |
1835 | + if (this.role != "ROLE_PERSONAL") { | |
1836 | + query.gradeName = grade; | |
1837 | + } | |
1838 | + const { data, status, info } = await fetchSubjectList({ ...query }); | |
1729 | 1839 | if (status === 0) { |
1730 | 1840 | this.subjectList = |
1731 | 1841 | data.subjectNames?.map((item) => { |
1732 | 1842 | return { |
1733 | - value: item.subjectName, | |
1734 | - label: item.subjectName, | |
1843 | + value: this.role == "ROLE_PERSONAL" ?item.subjectName: item , | |
1844 | + label: this.role == "ROLE_PERSONAL" ?item.subjectName: item , | |
1735 | 1845 | }; |
1736 | 1846 | }) || []; |
1737 | - console.log(this.subjectList); | |
1738 | 1847 | if (this.subjectList.length) { |
1739 | 1848 | this.form.subjectName = this.subjectList[0].value; |
1740 | 1849 | } |
1741 | - console.log(this.form); | |
1742 | 1850 | } else { |
1743 | 1851 | this.$message.error(info); |
1744 | 1852 | } |
1745 | 1853 | }, |
1746 | 1854 | async _QueryDetail() { |
1747 | 1855 | //查询答题卡详情 |
1748 | - const { data, status, info } = await this.$request.pPaperDetail({ | |
1856 | + let fetchPaperDetail = | |
1857 | + this.role == "ROLE_PERSONAL" | |
1858 | + ? this.$request.pPaperDetail | |
1859 | + : this.$request.fetchPaperDetail; | |
1860 | + const { data, status, info } = await fetchPaperDetail({ | |
1749 | 1861 | paperId: this.$route.query.paperId, |
1750 | 1862 | }); |
1751 | 1863 | if (status == 0) { |
... | ... | @@ -1753,6 +1865,10 @@ export default { |
1753 | 1865 | this.form.tagId = data.tagId === 0 ? "" : data.tagId; |
1754 | 1866 | this.form.subjectName = data.subjectName; |
1755 | 1867 | this.form.examsDuration = data.examsDuration; |
1868 | + if (this.role != "ROLE_PERSONAL") { | |
1869 | + this.form.sharingType = data.sharingType; | |
1870 | + this.form.gradeName = data.gradeName; | |
1871 | + } | |
1756 | 1872 | this.form.questionList = data.questionList?.map((item) => { |
1757 | 1873 | let subQuestions = |
1758 | 1874 | item.subQuestions?.map((items) => { |
... | ... | @@ -1763,6 +1879,12 @@ export default { |
1763 | 1879 | selectNum: items.answerOptions.split(",").length, |
1764 | 1880 | answerOptions: items.answerOptions || "A,B,C,D", |
1765 | 1881 | correctAnswer: items.correctAnswer, |
1882 | + screenshot: items.screenshot || "", | |
1883 | + screenshotSrc: items.screenshot || "", | |
1884 | + answerScreenshot: items.answerScreenshot || "", | |
1885 | + answerScreenshotSrc: items.answerScreenshot || "", | |
1886 | + difficultyFactor: items.difficultyFactor || "", //题目难度 | |
1887 | + knowledge: items.knowledge || null, //知识点 | |
1766 | 1888 | }; |
1767 | 1889 | }) || []; |
1768 | 1890 | return { |
... | ... | @@ -1800,7 +1922,7 @@ export default { |
1800 | 1922 | .delButton { |
1801 | 1923 | text-indent: -9999999px; |
1802 | 1924 | border-color: #ff6868; |
1803 | - background: #ff6868 url("../../../assets/images/arrow.png") no-repeat center; | |
1925 | + background: #ff6868 url("../../assets/images/arrow.png") no-repeat center; | |
1804 | 1926 | background-size: 19px; |
1805 | 1927 | color: transparent; |
1806 | 1928 | } |
... | ... | @@ -2048,10 +2170,15 @@ export default { |
2048 | 2170 | } |
2049 | 2171 | } |
2050 | 2172 | } |
2051 | -.upload-demo { | |
2052 | - text-align: center; | |
2053 | -} | |
2054 | -.stem-pic { | |
2055 | - width: 100%; | |
2173 | +.upload-box { | |
2174 | + .upload-demo { | |
2175 | + text-align: center; | |
2176 | + } | |
2177 | + .stem-pic { | |
2178 | + display: block; | |
2179 | + margin: 0 auto 20px; | |
2180 | + height: 200px; | |
2181 | + object-fit: cover; | |
2182 | + } | |
2056 | 2183 | } |
2057 | 2184 | </style> |
2058 | 2185 | \ No newline at end of file | ... | ... |
src/views/personal/examinationPaper/edit.vue renamed to src/views/examinationPaper/edit.vue
... | ... | @@ -418,23 +418,31 @@ |
418 | 418 | </div> |
419 | 419 | </el-dialog> |
420 | 420 | <el-dialog |
421 | - :title="upLoadType == 1 ? '上传题干' : '上传题目解析'" | |
421 | + :title="stem.type == 1 ? '上传题干' : '上传题目解析'" | |
422 | 422 | :visible.sync="dialogStem" |
423 | + v-if="dialogStem" | |
423 | 424 | width="500" |
424 | 425 | > |
425 | - <div> | |
426 | - <img class="stem-pic" :src="stem.screenshot" alt="" /> | |
426 | + <div class="upload-box"> | |
427 | + <img | |
428 | + v-if="stem.screenshot || stem.answerScreenshot" | |
429 | + :src=" | |
430 | + stem.type == 1 | |
431 | + ? stem.screenshotSrc || stem.screenshot | |
432 | + : stem.answerScreenshotSrc || stem.answerScreenshot | |
433 | + " | |
434 | + class="stem-pic" | |
435 | + /> | |
427 | 436 | <el-upload |
428 | 437 | class="upload-demo" |
429 | 438 | action="http://121.40.127.171/file/uploadImg" |
430 | 439 | :limit="1" |
431 | - :with-credentials="true" | |
432 | 440 | :on-success="upSuccess" |
433 | 441 | :on-error="upError" |
434 | 442 | accept="image/*" |
435 | 443 | > |
436 | 444 | <el-button size="small" type="primary">{{ |
437 | - stem.src ? "重新上传" : "选择照片" | |
445 | + stem.screenshot || stem.answerScreenshot ? "重新上传" : "选择照片" | |
438 | 446 | }}</el-button> |
439 | 447 | </el-upload> |
440 | 448 | </div> |
... | ... | @@ -483,16 +491,17 @@ import { deepClone, checkAnswer } from "utils"; |
483 | 491 | export default { |
484 | 492 | data() { |
485 | 493 | return { |
494 | + role: "", | |
486 | 495 | dialogStem: false, |
487 | 496 | dialogTag: false, |
488 | - upLoadType: 1, | |
489 | 497 | stem: { |
490 | - id: "", | |
491 | - type: 1, | |
492 | - index: 0, | |
493 | - indexs: 0, | |
494 | - screenshot: "", //题干图片地址 | |
495 | - answerScreenshot: "", //题干解析图片地址 | |
498 | + type: 1, //类型 | |
499 | + index: 0, //大题位置 | |
500 | + indexs: 0, //小题位置 | |
501 | + screenshot: "", //题干图片id | |
502 | + answerScreenshot: "", //题干解析图片id | |
503 | + screenshotSrc: "", //题干图片地址显示用保存时删除 | |
504 | + answerScreenshotSrc: "", //题干解析图片地址显示用保存时删除 | |
496 | 505 | difficultyFactor: 0, //题目难度 |
497 | 506 | knowledge: [], //知识点 |
498 | 507 | }, |
... | ... | @@ -541,6 +550,9 @@ export default { |
541 | 550 | }, |
542 | 551 | }, |
543 | 552 | created() { |
553 | + this.role = | |
554 | + this.$store.getters.info.showRole || | |
555 | + this.$store.getters.info.permissions[0].role; | |
544 | 556 | this.type = this.$route.query.type || 1; |
545 | 557 | this.title = this.$route.query.title || ""; |
546 | 558 | this._QueryDetail(); |
... | ... | @@ -548,18 +560,25 @@ export default { |
548 | 560 | methods: { |
549 | 561 | openStem(obj, type, index, indexs) { |
550 | 562 | //上传截图 |
551 | - this.upLoadType = type; | |
552 | - this.stem.id = obj.id; | |
553 | 563 | this.stem.type = type; |
554 | 564 | this.stem.index = index; |
555 | 565 | this.stem.indexs = indexs; |
556 | - this.stem.screenshot = type == 1 ? obj.screenshot : obj.answerScreenshot; | |
566 | + if (type == 1) { | |
567 | + this.stem.screenshot = obj.screenshot || ""; | |
568 | + this.stem.screenshotSrc = obj.screenshotSrc || ""; | |
569 | + this.stem.answerScreenshot = ""; | |
570 | + this.stem.answerScreenshotSrc = ""; | |
571 | + } else { | |
572 | + this.stem.screenshot = ""; | |
573 | + this.stem.screenshotSrc = ""; | |
574 | + this.stem.answerScreenshot = obj.answerScreenshot || ""; | |
575 | + this.stem.answerScreenshotSrc = obj.answerScreenshotSrc || ""; | |
576 | + } | |
557 | 577 | this.dialogStem = true; |
558 | 578 | }, |
559 | 579 | openTag(obj, type, index, indexs) { |
560 | 580 | //难度,知识点 |
561 | 581 | this.stem = { ...this.stem, obj }; |
562 | - this.stem.id = obj.id; | |
563 | 582 | this.stem.type = type; |
564 | 583 | this.stem.index = index; |
565 | 584 | this.stem.indexs = indexs; |
... | ... | @@ -567,19 +586,24 @@ export default { |
567 | 586 | this.stem.difficultyFactor = obj.difficultyFactor || ""; |
568 | 587 | this.dialogTag = true; |
569 | 588 | }, |
570 | - upSuccess(res) { | |
589 | + upSuccess(res, file) { | |
571 | 590 | //图片上传成功 |
572 | 591 | if (res && res.status == 0) { |
573 | - this.dialogStem = false; | |
574 | 592 | let keys = this.stem.type == 1 ? "screenshot" : "answerScreenshot"; |
575 | - if (typeof this.stem.indexs != undefined) { | |
593 | + this.stem[keys + "Src"] = res.data.url; | |
594 | + this.stem[keys] = res.data.resId; | |
595 | + if (this.questionList[0].subQuestions) { | |
576 | 596 | this.questionList[this.stem.index].subQuestions[this.stem.indexs][ |
577 | 597 | keys |
578 | 598 | ] = this.stem[keys]; |
599 | + this.questionList[this.stem.index].subQuestions[this.stem.indexs][ | |
600 | + keys + "Src" | |
601 | + ] = this.stem[keys + "Src"]; | |
579 | 602 | } else { |
580 | 603 | this.questionList[this.stem.index][keys] = this.stem[keys]; |
604 | + this.questionList[this.stem.index][keys + "Src"] = | |
605 | + this.stem[keys + "Src"]; | |
581 | 606 | } |
582 | - | |
583 | 607 | this.$message.success("上传成功"); |
584 | 608 | } else { |
585 | 609 | this.$message.error(res.info); |
... | ... | @@ -847,12 +871,25 @@ export default { |
847 | 871 | for (let j = 0; j < this.questionList[i].subQuestions.length; j++) { |
848 | 872 | if (this.questionList[i].subQuestions[j].qusType) { |
849 | 873 | this.questionList[i].subQuestions.splice(j, 1); |
874 | + } else { | |
875 | + if (!!this.questionList[i].subQuestions[j].answerScreenshotSrc) { | |
876 | + delete this.questionList[i].subQuestions[j].answerScreenshotSrc; | |
877 | + } | |
878 | + if (!!this.questionList[i].subQuestions[j].screenshotSrc) { | |
879 | + delete this.questionList[i].subQuestions[j].screenshotSrc; | |
880 | + } | |
850 | 881 | } |
851 | 882 | } |
852 | 883 | } else { |
853 | 884 | if (this.questionList[i].qusType) { |
854 | 885 | this.questionList.splice(i, 1); |
855 | 886 | i--; |
887 | + if (!!this.questionList[i].answerScreenshotSrc) { | |
888 | + delete this.questionList[i].answerScreenshotSrc; | |
889 | + } | |
890 | + if (!!this.questionList[i].screenshotSrc) { | |
891 | + delete this.questionList[i].screenshotSrc; | |
892 | + } | |
856 | 893 | } |
857 | 894 | } |
858 | 895 | } |
... | ... | @@ -865,19 +902,28 @@ export default { |
865 | 902 | //更新答题卡 |
866 | 903 | let modifyPaper, params; |
867 | 904 | if (this.type == 1) { |
868 | - modifyPaper = this.$request.pModifyPaper; | |
905 | + modifyPaper = | |
906 | + this.role == "ROLE_PERSONAL" | |
907 | + ? this.$request.pModifyPaper | |
908 | + : this.$request.modifyPaper; | |
869 | 909 | params = { |
870 | 910 | paperId: this.$route.query.paperId, |
871 | 911 | questionList: questionList, |
872 | 912 | }; |
873 | 913 | } else if (this.type == 2) { |
874 | - modifyPaper = this.$request.pSetExamAnswer; | |
914 | + modifyPaper = | |
915 | + this.role == "ROLE_PERSONAL" | |
916 | + ? this.$request.pSetExamAnswer | |
917 | + : this.$request.setExamAnswer; | |
875 | 918 | params = { |
876 | 919 | examId: this.$route.query.paperId, |
877 | 920 | questionList: questionList, |
878 | 921 | }; |
879 | 922 | } else { |
880 | - modifyPaper = this.$request.pSetPeriodAnswer; | |
923 | + modifyPaper = | |
924 | + this.role == "ROLE_PERSONAL" | |
925 | + ? this.$request.pSetPeriodAnswer | |
926 | + : this.$request.setPeriodAnswer; | |
881 | 927 | params = { |
882 | 928 | periodId: this.$route.query.paperId, |
883 | 929 | questionList: questionList, |
... | ... | @@ -892,12 +938,22 @@ export default { |
892 | 938 | }, |
893 | 939 | async _QueryDetail() { |
894 | 940 | //查询详情 |
895 | - let detail = | |
896 | - this.type == 1 | |
897 | - ? this.$request.pPaperDetail | |
898 | - : this.type == 2 | |
899 | - ? this.$request.pExamQuestionList | |
900 | - : this.$request.pPeriodQuestionList; | |
941 | + let detail; | |
942 | + if (this.role == "ROLE_PERSONAL") { | |
943 | + detail = | |
944 | + this.type == 1 | |
945 | + ? this.$request.pPaperDetail | |
946 | + : this.type == 2 | |
947 | + ? this.$request.pExamQuestionList | |
948 | + : this.$request.pPeriodQuestionList; | |
949 | + } else { | |
950 | + detail = | |
951 | + this.type == 1 | |
952 | + ? this.$request.paperDetail | |
953 | + : this.type == 2 | |
954 | + ? this.$request.examQuestionList | |
955 | + : this.$request.periodQuestionList; | |
956 | + } | |
901 | 957 | let params = |
902 | 958 | this.type == 1 |
903 | 959 | ? { paperId: this.$route.query.paperId } |
... | ... | @@ -1190,10 +1246,15 @@ export default { |
1190 | 1246 | } |
1191 | 1247 | } |
1192 | 1248 | } |
1193 | -.upload-demo { | |
1194 | - text-align: center; | |
1195 | -} | |
1196 | -.stem-pic { | |
1197 | - width: 100%; | |
1249 | +.upload-box { | |
1250 | + .upload-demo { | |
1251 | + text-align: center; | |
1252 | + } | |
1253 | + .stem-pic { | |
1254 | + display: block; | |
1255 | + margin: 0 auto 20px; | |
1256 | + height: 200px; | |
1257 | + object-fit: cover; | |
1258 | + } | |
1198 | 1259 | } |
1199 | 1260 | </style> |
1200 | 1261 | \ No newline at end of file | ... | ... |
src/views/personal/examinationPaper/index.vue renamed to src/views/examinationPaper/index.vue
... | ... | @@ -95,6 +95,31 @@ |
95 | 95 | <em class="s-line">|</em> |
96 | 96 | 预计时长:{{ item.examsDuration }} |
97 | 97 | <em class="s-line">|</em> |
98 | + <template v-if="role != 'ROLE_PERSONAL'"> | |
99 | + 授课端同步: | |
100 | + <span | |
101 | + class="clazz" | |
102 | + v-for="(clazzChild, indexs) in item.classList" | |
103 | + :key="clazzChild.classId" | |
104 | + :class="clazzChild.keepStatus == 1 ? 'active' : ''" | |
105 | + >{{ | |
106 | + `${clazzChild.className}${ | |
107 | + indexs != item.classList.length - 1 ? "、" : "" | |
108 | + }` | |
109 | + }} | |
110 | + <i v-if="clazzChild.keepStatus == 1" class="el-icon-success"></i | |
111 | + ></span> | |
112 | + <el-tooltip | |
113 | + effect="dark" | |
114 | + content="刷新同步状态" | |
115 | + placement="right" | |
116 | + > | |
117 | + <i | |
118 | + class="icon-refresh el-icon-refresh" | |
119 | + @click="refreshStic" | |
120 | + ></i> | |
121 | + </el-tooltip> | |
122 | + </template> | |
98 | 123 | </p> |
99 | 124 | <p class="person"> |
100 | 125 | {{ item.realName }}<em class="s-line">|</em |
... | ... | @@ -123,6 +148,11 @@ |
123 | 148 | icon="el-icon-more" |
124 | 149 | ></el-button> |
125 | 150 | <el-dropdown-menu slot="dropdown"> |
151 | + <el-dropdown-item | |
152 | + :command="1" | |
153 | + v-if="userName == item.realName && role != 'ROLE_PERSONAL'" | |
154 | + >修改分享范围</el-dropdown-item | |
155 | + > | |
126 | 156 | <el-dropdown-item :command="2">复制</el-dropdown-item> |
127 | 157 | <el-dropdown-item :command="3">归档</el-dropdown-item> |
128 | 158 | </el-dropdown-menu> |
... | ... | @@ -147,7 +177,20 @@ |
147 | 177 | content="没有更多数据" |
148 | 178 | :image-size="100" |
149 | 179 | ></el-empty> |
150 | - | |
180 | + <el-dialog title="选择分享范围" :visible.sync="dialogVisible" width="400"> | |
181 | + <el-form :model="shareForm" :rules="shareRulesForm" label-width="160px"> | |
182 | + <el-form-item prop="share" label="分享范围:"> | |
183 | + <el-radio-group v-model="shareForm.sharingType"> | |
184 | + <el-radio :label="0">任课班级分享</el-radio> | |
185 | + <el-radio :label="1">全年级分享</el-radio> | |
186 | + </el-radio-group> | |
187 | + </el-form-item> | |
188 | + </el-form> | |
189 | + <div slot="footer" class="dialog-footer"> | |
190 | + <el-button type="primary" @click="saveShare">确 定</el-button> | |
191 | + <el-button @click="dialogVisible = false">取 消</el-button> | |
192 | + </div> | |
193 | + </el-dialog> | |
151 | 194 | </div> |
152 | 195 | </template> |
153 | 196 | |
... | ... | @@ -158,6 +201,7 @@ export default { |
158 | 201 | return { |
159 | 202 | loading: false, |
160 | 203 | userName: "", |
204 | + dialogVisible: false, | |
161 | 205 | query: { |
162 | 206 | classId: "", |
163 | 207 | subjectName: "", |
... | ... | @@ -169,12 +213,24 @@ export default { |
169 | 213 | typeList: [], |
170 | 214 | archivedTotal: 0, //已归档答题卡数量 |
171 | 215 | tableData: null, |
216 | + shareForm: { | |
217 | + id: "", | |
218 | + sharingType: 0, //0-任课班级/1-全年级 | |
219 | + }, | |
220 | + shareRulesForm: { | |
221 | + sharingType: [ | |
222 | + { required: true, message: "选择分享范围", trigger: "blur" }, | |
223 | + ], | |
224 | + }, | |
172 | 225 | total: 0, |
173 | 226 | page: 1, |
174 | 227 | size: 20, |
175 | 228 | }; |
176 | 229 | }, |
177 | 230 | async created() { |
231 | + this.role = | |
232 | + this.$store.getters.info.showRole || | |
233 | + this.$store.getters.info.permissions[0].role; | |
178 | 234 | this.userName = this.$store.getters.info.name || ""; |
179 | 235 | await this._QueryClassList(); |
180 | 236 | await this._QuerySubjectList(); |
... | ... | @@ -182,6 +238,11 @@ export default { |
182 | 238 | this._QueryTypeList(); |
183 | 239 | }, |
184 | 240 | methods: { |
241 | + refreshStic() { | |
242 | + setTimeout(function () { | |
243 | + window.location.reload(); | |
244 | + }, 500); | |
245 | + }, | |
185 | 246 | toAdd(query) { |
186 | 247 | let routerItem = { |
187 | 248 | path: "/examinationPaperAdd", |
... | ... | @@ -201,6 +262,12 @@ export default { |
201 | 262 | //更多 |
202 | 263 | const that = this; |
203 | 264 | switch (value) { |
265 | + case 1: | |
266 | + //修改分享范围 | |
267 | + that.shareForm.id = item.id; | |
268 | + that.shareForm.sharingType = item.sharingType; | |
269 | + that.dialogVisible = true; | |
270 | + break; | |
204 | 271 | case 2: |
205 | 272 | //复制 |
206 | 273 | that.toAdd({ type: 2, paperId: item.id }); |
... | ... | @@ -215,9 +282,29 @@ export default { |
215 | 282 | this.page = page; |
216 | 283 | this._QueryData(this.query.title); |
217 | 284 | }, |
285 | + async saveShare() { | |
286 | + //修改分享范围 | |
287 | + const { data, status, info } = await this.$request.modifyPaper({ | |
288 | + paperId: this.shareForm.id, | |
289 | + sharingType: this.shareForm.sharingType, | |
290 | + }); | |
291 | + if (status === 0) { | |
292 | + this.shareForm.id = ""; | |
293 | + this.shareForm.sharingType = 1; | |
294 | + this.dialogVisible = false; | |
295 | + this.$message.success(info); | |
296 | + this._QueryData(this.query.title == ""); | |
297 | + } else { | |
298 | + this.$message.error(info); | |
299 | + } | |
300 | + }, | |
218 | 301 | async recovery(item) { |
219 | 302 | //归档 |
220 | - const { data, status, info } = await this.$request.pModifyPaper({ | |
303 | + let modifyPaper = | |
304 | + this.role == "ROLE_PERSONAL" | |
305 | + ? this.$request.pModifyPaper | |
306 | + : this.$request.modifyPaper; | |
307 | + const { data, status, info } = await modifyPaper({ | |
221 | 308 | paperId: item.id, |
222 | 309 | status: 2, |
223 | 310 | }); |
... | ... | @@ -232,12 +319,16 @@ export default { |
232 | 319 | //切换班级 |
233 | 320 | async changClazz() { |
234 | 321 | await this._QuerySubjectList(); |
235 | - this._QueryTypeList() | |
236 | 322 | this._QueryData(false); |
237 | 323 | }, |
238 | 324 | // 查找答题卡类型 |
239 | 325 | async _QueryTypeList() { |
240 | - const { data, status, info } = await this.$request.pPaperTagList({ | |
326 | + let fetchTypeNames = | |
327 | + this.role == "ROLE_PERSONAL" | |
328 | + ? this.$request.pPaperTagList | |
329 | + : this.$request.fetchTypeNames; | |
330 | + | |
331 | + const { data, status, info } = await fetchTypeNames({ | |
241 | 332 | classId: this.query.classId, |
242 | 333 | type: 0, |
243 | 334 | }); |
... | ... | @@ -251,7 +342,7 @@ export default { |
251 | 342 | }) || []; |
252 | 343 | this.typeList.unshift({ |
253 | 344 | value: "", |
254 | - label: "全部", | |
345 | + label: "请选择标签", | |
255 | 346 | }); |
256 | 347 | } else { |
257 | 348 | this.$message.error(info); |
... | ... | @@ -260,14 +351,19 @@ export default { |
260 | 351 | // 查找班级 |
261 | 352 | async _QueryClassList() { |
262 | 353 | this.loading = true; |
263 | - const { data, status, info } = await this.$request.pClassList(); | |
354 | + let fetchClassList = | |
355 | + this.role == "ROLE_PERSONAL" | |
356 | + ? this.$request.pClassList | |
357 | + : this.$request.fetchClassList; | |
358 | + | |
359 | + const { data, status, info } = await fetchClassList(); | |
264 | 360 | console.log(status); |
265 | 361 | if (status === 0) { |
266 | 362 | if (!!data.list) { |
267 | 363 | this.classList = |
268 | 364 | data.list?.map((item) => { |
269 | 365 | return { |
270 | - value: item.id, | |
366 | + value: this.role == "ROLE_PERSONAL" ? item.id : item.classId, | |
271 | 367 | label: item.className, |
272 | 368 | }; |
273 | 369 | }) || []; |
... | ... | @@ -279,7 +375,12 @@ export default { |
279 | 375 | }, |
280 | 376 | // 查找科目 |
281 | 377 | async _QuerySubjectList() { |
282 | - const { data, status, info } = await this.$request.pSubjectList({ | |
378 | + let fetchSubjectList = | |
379 | + this.role == "ROLE_PERSONAL" | |
380 | + ? this.$request.pSubjectList | |
381 | + : this.$request.fetchSubjectList; | |
382 | + | |
383 | + const { data, status, info } = await fetchSubjectList({ | |
283 | 384 | classId: this.query.classId, |
284 | 385 | }); |
285 | 386 | if (status === 0) { |
... | ... | @@ -321,7 +422,12 @@ export default { |
321 | 422 | return; |
322 | 423 | } |
323 | 424 | this.loading = true; |
324 | - const { data, status, info } = await this.$request.pPaperList({ | |
425 | + let fetchPaperList = | |
426 | + this.role == "ROLE_PERSONAL" | |
427 | + ? this.$request.pPaperList | |
428 | + : this.$request.fetchPaperList; | |
429 | + | |
430 | + const { data, status, info } = await fetchPaperList({ | |
325 | 431 | ...query, |
326 | 432 | status: 1, |
327 | 433 | page: this.page, |
... | ... | @@ -439,11 +545,11 @@ export default { |
439 | 545 | margin-right: 12px; |
440 | 546 | } |
441 | 547 | } |
442 | - .icon-refresh{ | |
443 | - margin-left:20px; | |
548 | + .icon-refresh { | |
549 | + margin-left: 20px; | |
444 | 550 | cursor: pointer; |
445 | - &:hover{ | |
446 | - color:#2e9afe | |
551 | + &:hover { | |
552 | + color: #2e9afe; | |
447 | 553 | } |
448 | 554 | } |
449 | 555 | } | ... | ... |
src/views/personal/examinationPaper/recycle.vue renamed to src/views/examinationPaper/recycle.vue
... | ... | @@ -149,6 +149,7 @@ |
149 | 149 | export default { |
150 | 150 | data() { |
151 | 151 | return { |
152 | + role: "", | |
152 | 153 | loading: false, |
153 | 154 | props: { multiple: true, checkStrictly: true }, |
154 | 155 | options: [ |
... | ... | @@ -197,6 +198,9 @@ export default { |
197 | 198 | }; |
198 | 199 | }, |
199 | 200 | async created() { |
201 | + this.role = | |
202 | + this.$store.getters.info.showRole || | |
203 | + this.$store.getters.info.permissions[0].role; | |
200 | 204 | await this._QueryClassList(); |
201 | 205 | await this._QuerySubjectList(); |
202 | 206 | this._QueryTypeList(); |
... | ... | @@ -205,7 +209,11 @@ export default { |
205 | 209 | methods: { |
206 | 210 | async modify(obj) { |
207 | 211 | //恢复答题卡 |
208 | - const { data, status, info } = await this.$request.pModifyPaper({ | |
212 | + let modifyPaper = | |
213 | + this.role == "ROLE_PERSONAL" | |
214 | + ? this.$request.pModifyPaper | |
215 | + : this.$request.modifyPaper; | |
216 | + const { data, status, info } = await modifyPaper({ | |
209 | 217 | paperId: obj.id, |
210 | 218 | status: 1, |
211 | 219 | }); |
... | ... | @@ -218,7 +226,11 @@ export default { |
218 | 226 | }, |
219 | 227 | async remove(obj) { |
220 | 228 | //删除答题卡 |
221 | - const { data, status, info } = await this.$request.pDelPaper({ | |
229 | + let delPaper = | |
230 | + this.role == "ROLE_PERSONAL" | |
231 | + ? this.$request.pDelPaper | |
232 | + : this.$request.delPaper; | |
233 | + const { data, status, info } = await delPaper({ | |
222 | 234 | paperId: obj.id, |
223 | 235 | }); |
224 | 236 | if (status == 0) { |
... | ... | @@ -255,7 +267,11 @@ export default { |
255 | 267 | query[key] = null; |
256 | 268 | } |
257 | 269 | } |
258 | - const { data, status, info } = await this.$request.pPaperList({ | |
270 | + let fetchPaperList = | |
271 | + this.role == "ROLE_PERSONAL" | |
272 | + ? this.$request.pPaperList | |
273 | + : this.$request.fetchPaperList; | |
274 | + const { data, status, info } = await fetchPaperList({ | |
259 | 275 | ...query, |
260 | 276 | status: 2, |
261 | 277 | page: this.page, |
... | ... | @@ -271,14 +287,18 @@ export default { |
271 | 287 | }, |
272 | 288 | // 查找班级 |
273 | 289 | async _QueryClassList() { |
274 | - const { data, status, info } = await this.$request.pClassList(); | |
290 | + let fetchClassList = | |
291 | + this.role == "ROLE_PERSONAL" | |
292 | + ? this.$request.pClassList | |
293 | + : this.$request.fetchClassList; | |
294 | + const { data, status, info } = await fetchClassList(); | |
275 | 295 | console.log(status); |
276 | 296 | if (status === 0) { |
277 | 297 | if (!!data.list) { |
278 | 298 | this.classList = |
279 | 299 | data.list?.map((item) => { |
280 | 300 | return { |
281 | - value: item.id, | |
301 | + value: this.role == "ROLE_PERSONAL" ? item.id : item.classId, | |
282 | 302 | label: item.className, |
283 | 303 | }; |
284 | 304 | }) || []; |
... | ... | @@ -290,7 +310,12 @@ export default { |
290 | 310 | }, |
291 | 311 | // 查找科目 |
292 | 312 | async _QuerySubjectList() { |
293 | - const { data, status, info } = await this.$request.pSubjectList({ | |
313 | + let fetchSubjectList = | |
314 | + this.role == "ROLE_PERSONAL" | |
315 | + ? this.$request.pSubjectList | |
316 | + : this.$request.fetchSubjectList; | |
317 | + | |
318 | + const { data, status, info } = await fetchSubjectList({ | |
294 | 319 | classId: this.query.classId, |
295 | 320 | }); |
296 | 321 | if (status === 0) { |
... | ... | @@ -308,7 +333,12 @@ export default { |
308 | 333 | }, |
309 | 334 | // 查找答题卡类型 |
310 | 335 | async _QueryTypeList() { |
311 | - const { data, status, info } = await this.$request.pPaperTagList({ | |
336 | + let fetchTypeNames = | |
337 | + this.role == "ROLE_PERSONAL" | |
338 | + ? this.$request.pPaperTagList | |
339 | + : this.$request.fetchTypeNames; | |
340 | + | |
341 | + const { data, status, info } = await fetchTypeNames({ | |
312 | 342 | classId: this.query.classId, |
313 | 343 | tyle: 0, |
314 | 344 | }); | ... | ... |
src/views/index/mainIndex.vue
... | ... | @@ -194,7 +194,7 @@ |
194 | 194 | 对{{ dataInfo.classPeriodCount }}套随堂问答题记录分析 |
195 | 195 | </p> |
196 | 196 | </div> |
197 | - <div class="nav-item item1 item-child2" @click="links('/test')"> | |
197 | + <div class="nav-item item1 item-child3" @click="links('/test')"> | |
198 | 198 | <img class="icon" src="../../assets/nav/analysis.png" alt="" /> |
199 | 199 | <p class="p1">即时测报表</p> |
200 | 200 | <p class="p2" v-if="dataInfo.examCount"> |
... | ... | @@ -403,6 +403,7 @@ export default { |
403 | 403 | height: calc(50% - 8px); |
404 | 404 | flex-wrap: wrap; |
405 | 405 | padding: 12px 0 12px 30px; |
406 | + margin-right:20px; | |
406 | 407 | .icon { |
407 | 408 | width: 60px; |
408 | 409 | height: 60px; |
... | ... | @@ -419,6 +420,23 @@ export default { |
419 | 420 | margin-right: 0; |
420 | 421 | } |
421 | 422 | } |
423 | + &.item-child3 { | |
424 | + height: calc(50% - 8px); | |
425 | + flex-wrap: wrap; | |
426 | + padding: 12px 0 12px 30px; | |
427 | + .icon { | |
428 | + width: 60px; | |
429 | + height: 60px; | |
430 | + } | |
431 | + .p1 { | |
432 | + flex: 1; | |
433 | + line-height: 60px; | |
434 | + margin-bottom: 0; | |
435 | + } | |
436 | + .p2 { | |
437 | + width: 100%; | |
438 | + } | |
439 | + } | |
422 | 440 | } |
423 | 441 | .item2 { |
424 | 442 | width: calc(50% - 10px); |
... | ... | @@ -447,6 +465,7 @@ export default { |
447 | 465 | height: 240px; |
448 | 466 | display: flex; |
449 | 467 | flex-wrap: wrap; |
468 | + | |
450 | 469 | } |
451 | 470 | .item4 { |
452 | 471 | width: calc(50% - 10px); | ... | ... |
src/views/personal/ask/index.vue
... | ... | @@ -88,202 +88,209 @@ |
88 | 88 | > |
89 | 89 | </el-radio-group> |
90 | 90 | <div class="table-cont" v-loading="loading"> |
91 | - <div v-show="tabIndex == 1"> | |
92 | - <el-table | |
93 | - :data="tableData" | |
94 | - border | |
95 | - style="width: 100%" | |
96 | - @sort-change="sortChange" | |
97 | - > | |
98 | - <el-table-column | |
99 | - prop="title" | |
100 | - label="课时" | |
101 | - align="center" | |
102 | - ></el-table-column> | |
103 | - <el-table-column | |
104 | - prop="questionNum" | |
105 | - label="题目总数" | |
106 | - align="center" | |
107 | - width="100" | |
108 | - ></el-table-column> | |
109 | - <el-table-column | |
110 | - prop="startTime" | |
111 | - label="上课时间" | |
112 | - align="center" | |
113 | - ></el-table-column> | |
114 | - <el-table-column | |
115 | - prop="participationRate" | |
116 | - label="参与度" | |
117 | - sortable="custom" | |
118 | - align="center" | |
119 | - > | |
120 | - <template slot-scope="scoped" | |
121 | - >{{ scoped.row.participationRate }}%</template | |
122 | - ></el-table-column | |
123 | - > | |
124 | - <el-table-column | |
125 | - prop="answerCorrectRate" | |
126 | - label="已答总正确率" | |
127 | - sortable="custom" | |
128 | - align="center" | |
129 | - > | |
130 | - <template slot-scope="scoped" | |
131 | - >{{ scoped.row.answerCorrectRate }}%</template | |
132 | - > | |
133 | - </el-table-column> | |
134 | - <el-table-column | |
135 | - prop="classCorrectRate" | |
136 | - label="班级总正确率" | |
137 | - sortable="custom" | |
138 | - align="center" | |
139 | - ><template slot-scope="scoped" | |
140 | - >{{ scoped.row.classCorrectRate }}%</template | |
141 | - ></el-table-column | |
142 | - > | |
143 | - <el-table-column label="操作" align="center"> | |
144 | - <template slot-scope="scoped"> | |
145 | - <el-tooltip | |
146 | - effect="dark" | |
147 | - v-if="scoped.row.answerNum == 0" | |
148 | - content="设置答案" | |
149 | - placement="top" | |
150 | - > | |
151 | - <el-button | |
152 | - type="primary" | |
153 | - circle | |
154 | - size="mini" | |
155 | - icon="fa fa-file-text" | |
156 | - @click="edit(scoped.row)" | |
157 | - ></el-button> | |
158 | - </el-tooltip> | |
159 | - <el-tooltip v-else effect="dark" content="详情" placement="top"> | |
160 | - <el-button | |
161 | - type="primary" | |
162 | - circle | |
163 | - size="mini" | |
164 | - icon="fa fa-arrow-right" | |
165 | - @click="linkTo(scoped.row)" | |
166 | - ></el-button> | |
167 | - </el-tooltip> | |
168 | - </template> | |
169 | - </el-table-column> | |
170 | - </el-table> | |
171 | - </div> | |
172 | - <div v-show="tabIndex == 2"> | |
173 | - <el-table | |
174 | - id="print-content2" | |
175 | - :max-height="tableMaxHeight" | |
176 | - :data="tableData" | |
177 | - border | |
178 | - style="width: 100%" | |
179 | - > | |
180 | - <el-table-column | |
181 | - prop="studentCode" | |
182 | - label="学号" | |
183 | - align="center" | |
184 | - fixed | |
185 | - ></el-table-column> | |
186 | - <el-table-column | |
187 | - prop="studentName" | |
188 | - label="姓名" | |
189 | - align="center" | |
190 | - fixed | |
191 | - width="100" | |
192 | - ></el-table-column> | |
193 | - <el-table-column | |
194 | - v-for="(item, index) in phaseOption" | |
195 | - :key="index" | |
196 | - :label="item" | |
197 | - align="center" | |
91 | + <div id="print-content"> | |
92 | + <div v-show="tabIndex == 1"> | |
93 | + <el-table | |
94 | + :data="tableData" | |
95 | + border | |
96 | + style="width: 100%" | |
97 | + @sort-change="sortChange" | |
198 | 98 | > |
199 | 99 | <el-table-column |
100 | + prop="title" | |
101 | + label="课时" | |
200 | 102 | align="center" |
201 | - :label="index == 0 ? '总课时数' : '课时数'" | |
202 | - :prop="'periodCount' + item" | |
203 | - > | |
204 | - </el-table-column> | |
103 | + ></el-table-column> | |
104 | + <el-table-column | |
105 | + prop="questionNum" | |
106 | + label="题目总数" | |
107 | + align="center" | |
108 | + width="100" | |
109 | + ></el-table-column> | |
110 | + <el-table-column | |
111 | + prop="startTime" | |
112 | + label="上课时间" | |
113 | + align="center" | |
114 | + ></el-table-column> | |
205 | 115 | <el-table-column |
116 | + prop="participationRate" | |
117 | + label="参与度" | |
118 | + sortable="custom" | |
206 | 119 | align="center" |
207 | - :label="index == 0 ? '总出题数' : '出题数'" | |
208 | - :prop="'questionNum' + item" | |
209 | 120 | > |
210 | - </el-table-column> | |
121 | + <template slot-scope="scoped" | |
122 | + >{{ scoped.row.participationRate }}%</template | |
123 | + ></el-table-column | |
124 | + > | |
211 | 125 | <el-table-column |
126 | + prop="answerCorrectRate" | |
127 | + label="已答总正确率" | |
128 | + sortable="custom" | |
212 | 129 | align="center" |
213 | - :label="index == 0 ? '总参与度' : '参与度'" | |
214 | - :prop="'participationRate' + item" | |
215 | - ><template slot-scope="scoped" | |
216 | - >{{ scoped.row["participationRate" + item] }}%</template | |
130 | + > | |
131 | + <template slot-scope="scoped" | |
132 | + >{{ scoped.row.answerCorrectRate }}%</template | |
217 | 133 | > |
218 | 134 | </el-table-column> |
219 | 135 | <el-table-column |
136 | + prop="classCorrectRate" | |
137 | + label="班级总正确率" | |
138 | + sortable="custom" | |
220 | 139 | align="center" |
221 | - :label="index == 0 ? '总正确率' : '正确率'" | |
222 | - :prop="'correctRate' + item" | |
223 | 140 | ><template slot-scope="scoped" |
224 | - >{{ scoped.row["correctRate" + item] }}%</template | |
225 | - > | |
141 | + >{{ scoped.row.classCorrectRate }}%</template | |
142 | + ></el-table-column | |
143 | + > | |
144 | + <el-table-column label="操作" align="center"> | |
145 | + <template slot-scope="scoped"> | |
146 | + <el-tooltip | |
147 | + effect="dark" | |
148 | + v-if="scoped.row.answerNum == 0" | |
149 | + content="设置答案" | |
150 | + placement="top" | |
151 | + > | |
152 | + <el-button | |
153 | + type="primary" | |
154 | + circle | |
155 | + size="mini" | |
156 | + icon="fa fa-file-text" | |
157 | + @click="edit(scoped.row)" | |
158 | + ></el-button> | |
159 | + </el-tooltip> | |
160 | + <el-tooltip | |
161 | + v-else | |
162 | + effect="dark" | |
163 | + content="详情" | |
164 | + placement="top" | |
165 | + > | |
166 | + <el-button | |
167 | + type="primary" | |
168 | + circle | |
169 | + size="mini" | |
170 | + icon="fa fa-arrow-right" | |
171 | + @click="linkTo(scoped.row)" | |
172 | + ></el-button> | |
173 | + </el-tooltip> | |
174 | + </template> | |
226 | 175 | </el-table-column> |
227 | - </el-table-column> | |
228 | - </el-table> | |
229 | - </div> | |
230 | - <div v-show="tabIndex == 3"> | |
231 | - <el-table | |
232 | - id="print-content3" | |
233 | - :max-height="tableMaxHeight" | |
234 | - :data="tableData" | |
235 | - border | |
236 | - style="width: 100%" | |
237 | - > | |
238 | - <el-table-column | |
239 | - prop="studentCode" | |
240 | - label="学号" | |
241 | - align="center" | |
242 | - ></el-table-column> | |
243 | - <el-table-column | |
244 | - prop="studentName" | |
245 | - label="姓名" | |
246 | - align="center" | |
247 | - width="100" | |
248 | - ></el-table-column> | |
249 | - <el-table-column | |
250 | - v-for="(item, index) in phaseInter" | |
251 | - :key="index" | |
252 | - :label="item" | |
253 | - align="center" | |
176 | + </el-table> | |
177 | + </div> | |
178 | + <div v-show="tabIndex == 2"> | |
179 | + <el-table | |
180 | + id="print-content2" | |
181 | + :max-height="tableMaxHeight" | |
182 | + :data="tableData" | |
183 | + border | |
184 | + style="width: 100%" | |
254 | 185 | > |
255 | 186 | <el-table-column |
187 | + prop="studentCode" | |
188 | + label="学号" | |
256 | 189 | align="center" |
257 | - v-if="index == 0" | |
258 | - label="参与分" | |
259 | - sortable | |
260 | - :prop="'interactionsNum' + item" | |
261 | - > | |
262 | - </el-table-column> | |
190 | + fixed | |
191 | + ></el-table-column> | |
263 | 192 | <el-table-column |
264 | - v-else | |
193 | + prop="studentName" | |
194 | + label="姓名" | |
265 | 195 | align="center" |
266 | - label="互动数" | |
267 | - :prop="'interactionsNum' + item" | |
268 | - > | |
269 | - </el-table-column> | |
196 | + fixed | |
197 | + width="100" | |
198 | + ></el-table-column> | |
270 | 199 | <el-table-column |
271 | - v-if="index == 0" | |
200 | + v-for="(item, index) in phaseOption" | |
201 | + :key="index" | |
202 | + :label="item" | |
272 | 203 | align="center" |
273 | - label="对错分" | |
274 | - sortable | |
275 | - :prop="'interactionsCorrectNum' + item" | |
276 | 204 | > |
205 | + <el-table-column | |
206 | + align="center" | |
207 | + :label="index == 0 ? '总课时数' : '课时数'" | |
208 | + :prop="'periodCount' + item" | |
209 | + > | |
210 | + </el-table-column> | |
211 | + <el-table-column | |
212 | + align="center" | |
213 | + :label="index == 0 ? '总出题数' : '出题数'" | |
214 | + :prop="'questionNum' + item" | |
215 | + > | |
216 | + </el-table-column> | |
217 | + <el-table-column | |
218 | + align="center" | |
219 | + :label="index == 0 ? '总参与度' : '参与度'" | |
220 | + :prop="'participationRate' + item" | |
221 | + ><template slot-scope="scoped" | |
222 | + >{{ scoped.row["participationRate" + item] }}%</template | |
223 | + > | |
224 | + </el-table-column> | |
225 | + <el-table-column | |
226 | + align="center" | |
227 | + :label="index == 0 ? '总正确率' : '正确率'" | |
228 | + :prop="'correctRate' + item" | |
229 | + ><template slot-scope="scoped" | |
230 | + >{{ scoped.row["correctRate" + item] }}%</template | |
231 | + > | |
232 | + </el-table-column> | |
277 | 233 | </el-table-column> |
234 | + </el-table> | |
235 | + </div> | |
236 | + <div v-show="tabIndex == 3"> | |
237 | + <el-table | |
238 | + id="print-content3" | |
239 | + :max-height="tableMaxHeight" | |
240 | + :data="tableData" | |
241 | + border | |
242 | + style="width: 100%" | |
243 | + > | |
278 | 244 | <el-table-column |
279 | - v-else | |
245 | + prop="studentCode" | |
246 | + label="学号" | |
247 | + align="center" | |
248 | + ></el-table-column> | |
249 | + <el-table-column | |
250 | + prop="studentName" | |
251 | + label="姓名" | |
252 | + align="center" | |
253 | + width="100" | |
254 | + ></el-table-column> | |
255 | + <el-table-column | |
256 | + v-for="(item, index) in phaseInter" | |
257 | + :key="index" | |
258 | + :label="item" | |
280 | 259 | align="center" |
281 | - label="参与数" | |
282 | - :prop="'interactionsCorrectNum' + item" | |
283 | 260 | > |
261 | + <el-table-column | |
262 | + align="center" | |
263 | + v-if="index == 0" | |
264 | + label="参与分" | |
265 | + sortable | |
266 | + :prop="'interactionsNum' + item" | |
267 | + > | |
268 | + </el-table-column> | |
269 | + <el-table-column | |
270 | + v-else | |
271 | + align="center" | |
272 | + label="互动数" | |
273 | + :prop="'interactionsNum' + item" | |
274 | + > | |
275 | + </el-table-column> | |
276 | + <el-table-column | |
277 | + v-if="index == 0" | |
278 | + align="center" | |
279 | + label="对错分" | |
280 | + sortable | |
281 | + :prop="'interactionsCorrectNum' + item" | |
282 | + > | |
283 | + </el-table-column> | |
284 | + <el-table-column | |
285 | + v-else | |
286 | + align="center" | |
287 | + label="参与数" | |
288 | + :prop="'interactionsCorrectNum' + item" | |
289 | + > | |
290 | + </el-table-column> | |
284 | 291 | </el-table-column> |
285 | - </el-table-column> | |
286 | - </el-table> | |
292 | + </el-table> | |
293 | + </div> | |
287 | 294 | </div> |
288 | 295 | <div class="pagination-box" v-show="tabIndex == 1"> |
289 | 296 | <el-pagination |
... | ... | @@ -381,7 +388,7 @@ export default { |
381 | 388 | }); |
382 | 389 | }, |
383 | 390 | methods: { |
384 | - print() { | |
391 | + print() { | |
385 | 392 | tablePrint("print-content"); |
386 | 393 | }, |
387 | 394 | changeSub(val) { |
... | ... | @@ -521,7 +528,7 @@ export default { |
521 | 528 | if (status === 0) { |
522 | 529 | this.classList = data.list.map((item) => { |
523 | 530 | return { |
524 | - value: item.classId, | |
531 | + value: item.id, | |
525 | 532 | label: item.className, |
526 | 533 | }; |
527 | 534 | }); |
... | ... | @@ -683,11 +690,10 @@ export default { |
683 | 690 | this.$message.warning("请选择科目"); |
684 | 691 | return; |
685 | 692 | } |
686 | - const { data, status, info } = await this.$request.pPhaseInteractiveReport( | |
687 | - { | |
693 | + const { data, status, info } = | |
694 | + await this.$request.pPhaseInteractiveReport({ | |
688 | 695 | ...query, |
689 | - } | |
690 | - ); | |
696 | + }); | |
691 | 697 | this.loading = false; |
692 | 698 | if (status === 0) { |
693 | 699 | let subjectName = []; | ... | ... |
src/views/personal/down/index.vue
... | ... | @@ -8,9 +8,11 @@ |
8 | 8 | <div class="down-box" v-loading="loading"> |
9 | 9 | <img class="logo" src="" alt="" /> |
10 | 10 | <div class="txt"> |
11 | - <p class="p1">中天易教授课端 V1.3.4</p> | |
12 | - <p class="p2">文件大小:35M</p> | |
13 | - <p class="p2">最近更新:2022-12-03 13:30</p> | |
11 | + <p class="p1"> | |
12 | + {{ `${info.appName || ""} ${info.versionName || ""}` }} | |
13 | + </p> | |
14 | + <p class="p2">文件大小:{{ `${info.fileSize}` }}M</p> | |
15 | + <p class="p2">最近更新:{{ info.modifiedTime }}</p> | |
14 | 16 | </div> |
15 | 17 | <el-button type="primary" @click="downCard">立即下载</el-button> |
16 | 18 | </div> |
... | ... | @@ -22,13 +24,38 @@ export default { |
22 | 24 | data() { |
23 | 25 | return { |
24 | 26 | loading: false, |
27 | + info: { | |
28 | + id:"", | |
29 | + appName: "", | |
30 | + appImage: "", | |
31 | + versionName: "", | |
32 | + fileSize: "", | |
33 | + modifiedTime: "", | |
34 | + }, | |
25 | 35 | }; |
26 | 36 | }, |
37 | + created() { | |
38 | + this.latestVersion(); | |
39 | + }, | |
27 | 40 | methods: { |
41 | + async latestVersion() { | |
42 | + const { data, status, info } = await this.$request.pLatestVersion(); | |
43 | + if (status == 0) { | |
44 | + this.info = { ...data }; | |
45 | + this.info.fileSize = | |
46 | + (this.info.fileSize && | |
47 | + (this.info.fileSize / 1024 / 1024).toFixed(2)) || | |
48 | + "--"; | |
49 | + } else { | |
50 | + this.$message.error(info); | |
51 | + } | |
52 | + }, | |
28 | 53 | async downCard() { |
29 | 54 | if (this.loading == true) return; |
30 | 55 | this.loading = true; |
31 | - const { data, status, info } = await this.$request.latestClickersApp(); | |
56 | + const { data, status, info } = await this.$request.pGetAppDownloadUrl({ | |
57 | + versionId:this.info.id | |
58 | + }); | |
32 | 59 | this.loading = false; |
33 | 60 | if (status == 0) { |
34 | 61 | const a = document.createElement("a"); |
... | ... | @@ -51,7 +78,7 @@ export default { |
51 | 78 | } |
52 | 79 | |
53 | 80 | .down-box { |
54 | - padding:20px 50px; | |
81 | + padding: 20px 50px; | |
55 | 82 | display: flex; |
56 | 83 | align-items: center; |
57 | 84 | } | ... | ... |
src/views/personal/setUp/student.vue
... | ... | @@ -450,15 +450,9 @@ export default { |
450 | 450 | let { data, info, status } = await this.$request.studentTemplateUrl(); |
451 | 451 | this.loadingDown = false; |
452 | 452 | if (status == 0) { |
453 | - // getBlob(data.downloadUrl).then((res) => { | |
454 | - // downloadFile("学生模板", res); | |
455 | - // }); | |
456 | - const a = document.createElement("a"); | |
457 | - a.href = data.downloadUrl; | |
458 | - a.download = data.appName; | |
459 | - document.body.appendChild(a); | |
460 | - a.click(); | |
461 | - a.remove(); | |
453 | + getBlob(data.downloadUrl).then((res) => { | |
454 | + downloadFile("学生模板", res); | |
455 | + }); | |
462 | 456 | } else { |
463 | 457 | this.$message.error(info); |
464 | 458 | } | ... | ... |
src/views/personal/test/index.vue
... | ... | @@ -517,6 +517,8 @@ export default { |
517 | 517 | id: obj.studentId, |
518 | 518 | classId: obj.classId, |
519 | 519 | subjectNames: subjectNames.join(","), |
520 | + studentName:obj.studentName, | |
521 | + studentCode:obj.studentCode, | |
520 | 522 | }, |
521 | 523 | }); |
522 | 524 | }, |
... | ... | @@ -648,7 +650,7 @@ export default { |
648 | 650 | if (status === 0) { |
649 | 651 | this.classList = data.list.map((item) => { |
650 | 652 | return { |
651 | - value: item.classId, | |
653 | + value: item.id, | |
652 | 654 | label: item.className, |
653 | 655 | }; |
654 | 656 | }); | ... | ... |
src/views/personal/portrait/detail.vue renamed to src/views/portrait/detail.vue
... | ... | @@ -60,8 +60,10 @@ |
60 | 60 | </div> |
61 | 61 | </div> |
62 | 62 | <div class="page-content"> |
63 | - <p class="tips">张三 (学号:1301) 测练总次数:16</p> | |
64 | - <div class="chart"> | |
63 | + <p class="tips"> | |
64 | + {{ studentName }}(学号:{{ studentCode }}) 测练总次数:{{ count }} | |
65 | + </p> | |
66 | + <div class="chart" v-if="tableData.length"> | |
65 | 67 | <template v-if="type == 1"> |
66 | 68 | <radarChart id="radarChart" :params="radarChartData" /> |
67 | 69 | </template> |
... | ... | @@ -69,6 +71,7 @@ |
69 | 71 | <lineChart id="lineChart" :params="lineChartData" :xAxis="xAxis" /> |
70 | 72 | </template> |
71 | 73 | </div> |
74 | + | |
72 | 75 | <div class="tab-box"> |
73 | 76 | <el-table |
74 | 77 | v-show="type == 1" |
... | ... | @@ -82,22 +85,22 @@ |
82 | 85 | align="center" |
83 | 86 | ></el-table-column> |
84 | 87 | <el-table-column |
85 | - prop="cl" | |
88 | + prop="examCount" | |
86 | 89 | label="参与测练数" |
87 | 90 | align="center" |
88 | 91 | ></el-table-column> |
89 | 92 | <el-table-column |
90 | - prop="bg" | |
93 | + prop="highestScore" | |
91 | 94 | label="班最高分" |
92 | 95 | align="center" |
93 | 96 | ></el-table-column> |
94 | 97 | <el-table-column |
95 | - prop="bp" | |
98 | + prop="avgScore" | |
96 | 99 | label="班平均分" |
97 | 100 | align="center" |
98 | 101 | ></el-table-column> |
99 | 102 | <el-table-column |
100 | - prop="br" | |
103 | + prop="examScore" | |
101 | 104 | label="个人得分" |
102 | 105 | align="center" |
103 | 106 | ></el-table-column> |
... | ... | @@ -109,22 +112,22 @@ |
109 | 112 | style="width: 100%" |
110 | 113 | > |
111 | 114 | <el-table-column |
112 | - prop="subjectName" | |
115 | + prop="title" | |
113 | 116 | label="课堂测练" |
114 | 117 | align="center" |
115 | 118 | ></el-table-column> |
116 | 119 | <el-table-column |
117 | - prop="br" | |
120 | + prop="examScore" | |
118 | 121 | label="个人成绩" |
119 | 122 | align="center" |
120 | 123 | ></el-table-column> |
121 | 124 | <el-table-column |
122 | - prop="bp" | |
125 | + prop="avgScore" | |
123 | 126 | label="平均成绩" |
124 | 127 | align="center" |
125 | 128 | ></el-table-column> |
126 | 129 | <el-table-column |
127 | - prop="pm" | |
130 | + prop="classRank" | |
128 | 131 | label="班级排名" |
129 | 132 | align="center" |
130 | 133 | ></el-table-column> |
... | ... | @@ -143,6 +146,8 @@ export default { |
143 | 146 | data() { |
144 | 147 | return { |
145 | 148 | id: "", |
149 | + studentName: "", | |
150 | + studentCode: "", | |
146 | 151 | classId: "", |
147 | 152 | subjectNames: [], |
148 | 153 | type: 1, |
... | ... | @@ -156,28 +161,8 @@ export default { |
156 | 161 | date: "", |
157 | 162 | subjectList: [], //科目 |
158 | 163 | radarChartData: { |
159 | - indicator: [ | |
160 | - { name: "语文" }, | |
161 | - { name: "数学" }, | |
162 | - { name: "地理" }, | |
163 | - { name: "物理" }, | |
164 | - { name: "化学" }, | |
165 | - { name: "生物" }, | |
166 | - ], | |
167 | - num: [ | |
168 | - { | |
169 | - name: "班最高分", | |
170 | - value: [100, 99, 98, 99, 100, 100], | |
171 | - }, | |
172 | - { | |
173 | - name: "班平均分", | |
174 | - value: [95, 85, 90, 86, 92, 87], | |
175 | - }, | |
176 | - { | |
177 | - name: "本人得分", | |
178 | - value: [90, 80, 95, 82, 95, 89], | |
179 | - }, | |
180 | - ], | |
164 | + indicator: [], | |
165 | + num: [], | |
181 | 166 | }, |
182 | 167 | lineChartData: [ |
183 | 168 | { |
... | ... | @@ -194,24 +179,16 @@ export default { |
194 | 179 | }, |
195 | 180 | ], |
196 | 181 | xAxis: ["卷1", "卷2", "卷3", "卷4", "卷5"], |
197 | - tableData: [ | |
198 | - { | |
199 | - subjectName: "语文", | |
200 | - cl: 5, | |
201 | - bg: 100, | |
202 | - bp: 90, | |
203 | - br: 95, | |
204 | - pm: 1, | |
205 | - }, | |
206 | - ], | |
182 | + tableData: [], | |
183 | + count: 0, //测练数 | |
207 | 184 | }; |
208 | 185 | }, |
209 | 186 | async created() { |
210 | 187 | this.id = this.$route.query.id; |
211 | 188 | this.classId = this.$route.query.classId; |
189 | + this.studentCode = this.$route.query.studentCode; | |
190 | + this.studentName = this.$route.query.studentName; | |
212 | 191 | this.subjectNames = this.$route.query.subjectNames?.split(",") || []; |
213 | - this.type = | |
214 | - this.subjectNames.length > 1 || this.subjectNames.length == 0 ? 1 : 2; | |
215 | 192 | await this._QuerySubjectList(); |
216 | 193 | await this.setDate(1); |
217 | 194 | let startDay = this.query?.startDay; |
... | ... | @@ -231,8 +208,9 @@ export default { |
231 | 208 | return sub != "全部" ? item != "全部" : item == "全部"; |
232 | 209 | }); |
233 | 210 | this.type = |
234 | - this.query.subjectNames.length > 1 || | |
235 | - this.query.subjectNames.length == 0 | |
211 | + this.query.subjectNames.length > 1 | |
212 | + ? 1 | |
213 | + : this.query.subjectNames[0] == "全部" && this.subjectList.length != 2 | |
236 | 214 | ? 1 |
237 | 215 | : 2; |
238 | 216 | }, |
... | ... | @@ -324,7 +302,16 @@ export default { |
324 | 302 | }); |
325 | 303 | if (this.subjectNames.length == 0) { |
326 | 304 | this.query.subjectNames.push(this.subjectList[0]?.value); |
305 | + } else { | |
306 | + this.query.subjectNames = [...this.subjectNames]; | |
327 | 307 | } |
308 | + this.type = | |
309 | + this.query.subjectNames.length > 1 | |
310 | + ? 1 | |
311 | + : this.query.subjectNames[0] == "全部" && | |
312 | + this.subjectList.length != 2 | |
313 | + ? 1 | |
314 | + : 2; | |
328 | 315 | } else { |
329 | 316 | this.$message.error(info); |
330 | 317 | } |
... | ... | @@ -337,12 +324,62 @@ export default { |
337 | 324 | query[key] = this.query[key]; |
338 | 325 | } |
339 | 326 | } |
340 | - return; | |
341 | - const { data, status, info } = await this.$request.studentList({ | |
327 | + delete query.subjectNames; | |
328 | + let subjectNames; | |
329 | + if ( | |
330 | + this.query.subjectNames.length == 1 && | |
331 | + this.query.subjectNames[0] == "全部" | |
332 | + ) { | |
333 | + subjectNames = this.subjectList | |
334 | + .filter((item) => { | |
335 | + return item.value != "全部"; | |
336 | + }) | |
337 | + .map((item) => { | |
338 | + return item.value; | |
339 | + }); | |
340 | + } else { | |
341 | + subjectNames = [...this.query.subjectNames]; | |
342 | + } | |
343 | + const { data, status, info } = await this.$request.studentExamReport({ | |
344 | + studentId: this.id, | |
345 | + subjectNames: subjectNames, | |
342 | 346 | ...query, |
343 | 347 | }); |
344 | 348 | this.loading = false; |
345 | 349 | if (status === 0) { |
350 | + this.count = 0; | |
351 | + this.tableData = data.list || []; | |
352 | + if (this.type == 1) { | |
353 | + this.radarChartData.indicator = []; | |
354 | + this.radarChartData.num = [ | |
355 | + { name: "班最高分", value: [] }, | |
356 | + { name: "班平均分", value: [] }, | |
357 | + { name: "本人得分", value: [] }, | |
358 | + ]; | |
359 | + this.tableData.map((item) => { | |
360 | + this.count += item.examCount; | |
361 | + this.radarChartData.indicator.push({ | |
362 | + name: item.subjectName, | |
363 | + }); | |
364 | + this.radarChartData.num[0].value.push(item.highestScore); | |
365 | + this.radarChartData.num[1].value.push(item.avgScore); | |
366 | + this.radarChartData.num[2].value.push(item.examScore); | |
367 | + }); | |
368 | + } else { | |
369 | + this.count = data.count; | |
370 | + this.xAxis = []; | |
371 | + this.lineChartData = [ | |
372 | + { name: "班平均分", value: [] }, | |
373 | + { name: "个人成绩", value: [] }, | |
374 | + { name: "班级排名", value: [] }, | |
375 | + ]; | |
376 | + this.tableData.map((item) => { | |
377 | + this.xAxis.push(item.title); | |
378 | + this.lineChartData[0].value.push(item.avgScore); | |
379 | + this.lineChartData[1].value.push(item.examScore); | |
380 | + this.lineChartData[2].value.push(item.classRank); | |
381 | + }); | |
382 | + } | |
346 | 383 | } else { |
347 | 384 | this.$message.error(info); |
348 | 385 | } | ... | ... |
src/views/personal/portrait/index.vue renamed to src/views/portrait/index.vue
... | ... | @@ -69,8 +69,8 @@ |
69 | 69 | {{ item.studentName }} <i class="fa fa-calculator"></i> |
70 | 70 | {{ item.clickerSn }} |
71 | 71 | </p> |
72 | - <p class="p2">{{ item.sectionName + item.className }}</p> | |
73 | - <p class="p3">最近活跃:{{ item.time }}</p> | |
72 | + <p class="p2">{{ gradeName(item.grade) }}</p> | |
73 | + <p class="p3">最近活跃:{{ item.modifiedTime }}</p> | |
74 | 74 | </div> |
75 | 75 | <el-button |
76 | 76 | class="btn" |
... | ... | @@ -87,11 +87,12 @@ |
87 | 87 | </template> |
88 | 88 | |
89 | 89 | <script> |
90 | -import { formatDate } from "utils"; | |
90 | +import { formatDate, setGradeName } from "utils"; | |
91 | 91 | import BusEvent from "@/utils/busEvent"; |
92 | 92 | export default { |
93 | 93 | data() { |
94 | 94 | return { |
95 | + role: "", | |
95 | 96 | query: { |
96 | 97 | //搜索条件 |
97 | 98 | classId: "", |
... | ... | @@ -101,24 +102,16 @@ export default { |
101 | 102 | }, |
102 | 103 | date: "", |
103 | 104 | classList: [], |
104 | - tableData: [ | |
105 | - { | |
106 | - studentId: "111", | |
107 | - studentName: "丁方菲", | |
108 | - studentCode: 123321, | |
109 | - clickerSn: 32312, | |
110 | - sectionName: "初一", | |
111 | - className: "三班", | |
112 | - classId:12, | |
113 | - time: "2022-11-04 18:09:49", | |
114 | - }, | |
115 | - ], | |
105 | + tableData: [], | |
116 | 106 | page: 1, |
117 | 107 | size: 20, |
118 | 108 | total: 0, |
119 | 109 | }; |
120 | 110 | }, |
121 | 111 | async created() { |
112 | + this.role = | |
113 | + this.$store.getters.info.showRole || | |
114 | + this.$store.getters.info.permissions[0].role; | |
122 | 115 | await this._QueryClassList(); |
123 | 116 | await this.setDate(1); |
124 | 117 | let startDay = this.query?.startDay; |
... | ... | @@ -140,12 +133,17 @@ export default { |
140 | 133 | }); |
141 | 134 | }, |
142 | 135 | methods: { |
136 | + gradeName(type) { | |
137 | + return setGradeName(type); | |
138 | + }, | |
143 | 139 | linkDetail(obj) { |
144 | 140 | this.$router.push({ |
145 | 141 | path: "/portraitDetail", |
146 | 142 | query: { |
147 | - id: obj.studentId, | |
148 | - classId:obj.classId, | |
143 | + studentName: obj.studentName, | |
144 | + studentCode: obj.studentCode, | |
145 | + id: obj.id, | |
146 | + classId: this.query.classId, | |
149 | 147 | }, |
150 | 148 | }); |
151 | 149 | }, |
... | ... | @@ -224,11 +222,16 @@ export default { |
224 | 222 | } |
225 | 223 | }, |
226 | 224 | async _QueryClassList() { |
227 | - const { data, status, info } = await this.$request.pClassList(); | |
225 | + let fetchClassList = | |
226 | + this.role == "ROLE_PERSONAL" | |
227 | + ? this.$request.pClassList | |
228 | + : this.$request.fetchClassList; | |
229 | + | |
230 | + const { data, status, info } = await fetchClassList(); | |
228 | 231 | if (status === 0) { |
229 | 232 | this.classList = data.list.map((item) => { |
230 | 233 | return { |
231 | - value: item.classId, | |
234 | + value: this.role == "ROLE_PERSONAL" ? item.id : item.classId, | |
232 | 235 | label: item.className, |
233 | 236 | }; |
234 | 237 | }); |
... | ... | @@ -245,8 +248,11 @@ export default { |
245 | 248 | query[key] = this.query[key]; |
246 | 249 | } |
247 | 250 | } |
248 | - return; | |
249 | - const { data, status, info } = await this.$request.pStudentList({ | |
251 | + let studentList = | |
252 | + this.role == "ROLE_PERSONAL" | |
253 | + ? this.$request.pStudentList | |
254 | + : this.$request.tStudentList; | |
255 | + const { data, status, info } = await studentList({ | |
250 | 256 | ...query, |
251 | 257 | page: this.page, |
252 | 258 | size: this.size, | ... | ... |
src/views/standard/ask/analysis.vue
... | ... | @@ -53,75 +53,85 @@ |
53 | 53 | 反馈时长:{{ setDuration(detail.consumingDuration) }} |
54 | 54 | </li> |
55 | 55 | </ul> |
56 | - <el-table v-if="type == 1" :data="tableData" border style="width: 100%"> | |
57 | - <el-table-column prop="questionIndex" label="题号" align="center" | |
58 | - ><template slot-scope="scoped" | |
59 | - >Q{{ scoped.row.questionIndex }}</template | |
60 | - ></el-table-column | |
56 | + <div id="print-content"> | |
57 | + <el-table | |
58 | + v-if="type == 1" | |
59 | + :data="tableData" | |
60 | + border | |
61 | + style="width: 100%" | |
61 | 62 | > |
62 | - <el-table-column prop="questionType" label="题型" align="center"> | |
63 | - <template slot-scope="scoped">{{ | |
64 | - setSubPro(scoped.row.questionType) | |
65 | - }}</template> | |
66 | - </el-table-column> | |
67 | - <el-table-column | |
68 | - prop="answeredNum" | |
69 | - label="答题人数" | |
70 | - sortable | |
71 | - align="center" | |
72 | - ></el-table-column> | |
73 | - <el-table-column | |
74 | - prop="correctAnswerNum" | |
75 | - label="答对人数" | |
76 | - sortable | |
77 | - align="center" | |
78 | - ></el-table-column> | |
79 | - <el-table-column | |
80 | - prop="participationRate" | |
81 | - label="班级参与度" | |
82 | - sortable | |
83 | - align="center" | |
84 | - ><template slot-scope="scoped" | |
85 | - >{{ scoped.row.participationRate }}%</template | |
86 | - ></el-table-column | |
87 | - > | |
88 | - <el-table-column | |
89 | - prop="classCorrectRate" | |
90 | - label="班级正确率" | |
91 | - sortable | |
92 | - align="center" | |
93 | - ><template slot-scope="scoped" | |
94 | - >{{ scoped.row.classCorrectRate }}%</template | |
95 | - ></el-table-column | |
96 | - > | |
97 | - <el-table-column | |
98 | - prop="answerCorrectRate" | |
99 | - label="已答正确率" | |
100 | - sortable | |
101 | - align="center" | |
102 | - ><template slot-scope="scoped" | |
103 | - >{{ scoped.row.answerCorrectRate }}%</template | |
104 | - ></el-table-column | |
105 | - > | |
106 | - <el-table-column prop="correctAnswer" label="正确答案" align="center"> | |
107 | - <template slot-scope="scoped">{{ | |
108 | - scoped.row.correctAnswer == 1 | |
109 | - ? "✓" | |
110 | - : scoped.row.correctAnswer == 2 | |
111 | - ? "✗" | |
112 | - : scoped.row.correctAnswer | |
113 | - }}</template></el-table-column | |
114 | - > | |
115 | - <el-table-column prop="fallible" label="干扰答案" align="center" | |
116 | - ><template slot-scope="scoped">{{ | |
117 | - scoped.row.fallible == 1 | |
118 | - ? "✓" | |
119 | - : scoped.row.fallible == 2 | |
120 | - ? "✗" | |
121 | - : scoped.row.fallible | |
122 | - }}</template></el-table-column | |
123 | - > | |
124 | - <!-- <el-table-column prop="screenshot" label="题干" align="center"> | |
63 | + <el-table-column prop="questionIndex" label="题号" align="center" | |
64 | + ><template slot-scope="scoped" | |
65 | + >Q{{ scoped.row.questionIndex }}</template | |
66 | + ></el-table-column | |
67 | + > | |
68 | + <el-table-column prop="questionType" label="题型" align="center"> | |
69 | + <template slot-scope="scoped">{{ | |
70 | + setSubPro(scoped.row.questionType) | |
71 | + }}</template> | |
72 | + </el-table-column> | |
73 | + <el-table-column | |
74 | + prop="answeredNum" | |
75 | + label="答题人数" | |
76 | + sortable | |
77 | + align="center" | |
78 | + ></el-table-column> | |
79 | + <el-table-column | |
80 | + prop="correctAnswerNum" | |
81 | + label="答对人数" | |
82 | + sortable | |
83 | + align="center" | |
84 | + ></el-table-column> | |
85 | + <el-table-column | |
86 | + prop="participationRate" | |
87 | + label="班级参与度" | |
88 | + sortable | |
89 | + align="center" | |
90 | + ><template slot-scope="scoped" | |
91 | + >{{ scoped.row.participationRate }}%</template | |
92 | + ></el-table-column | |
93 | + > | |
94 | + <el-table-column | |
95 | + prop="classCorrectRate" | |
96 | + label="班级正确率" | |
97 | + sortable | |
98 | + align="center" | |
99 | + ><template slot-scope="scoped" | |
100 | + >{{ scoped.row.classCorrectRate }}%</template | |
101 | + ></el-table-column | |
102 | + > | |
103 | + <el-table-column | |
104 | + prop="answerCorrectRate" | |
105 | + label="已答正确率" | |
106 | + sortable | |
107 | + align="center" | |
108 | + ><template slot-scope="scoped" | |
109 | + >{{ scoped.row.answerCorrectRate }}%</template | |
110 | + ></el-table-column | |
111 | + > | |
112 | + <el-table-column | |
113 | + prop="correctAnswer" | |
114 | + label="正确答案" | |
115 | + align="center" | |
116 | + > | |
117 | + <template slot-scope="scoped">{{ | |
118 | + scoped.row.correctAnswer == 1 | |
119 | + ? "✓" | |
120 | + : scoped.row.correctAnswer == 2 | |
121 | + ? "✗" | |
122 | + : scoped.row.correctAnswer | |
123 | + }}</template></el-table-column | |
124 | + > | |
125 | + <el-table-column prop="fallible" label="干扰答案" align="center" | |
126 | + ><template slot-scope="scoped">{{ | |
127 | + scoped.row.fallible == 1 | |
128 | + ? "✓" | |
129 | + : scoped.row.fallible == 2 | |
130 | + ? "✗" | |
131 | + : scoped.row.fallible | |
132 | + }}</template></el-table-column | |
133 | + > | |
134 | + <!-- <el-table-column prop="screenshot" label="题干" align="center"> | |
125 | 135 | <template slot-scope="scoped"> |
126 | 136 | <el-image |
127 | 137 | v-if="scoped.row.screenshot" |
... | ... | @@ -131,139 +141,158 @@ |
131 | 141 | > |
132 | 142 | </el-image><span v-else>暂无</span></template |
133 | 143 | ></el-table-column> --> |
134 | - </el-table> | |
135 | - <el-table v-if="type == 2" :data="tableData" border style="width: 100%"> | |
136 | - <el-table-column | |
137 | - prop="studentCode" | |
138 | - label="学号" | |
139 | - align="center" | |
140 | - ></el-table-column> | |
141 | - <el-table-column | |
142 | - prop="studentName" | |
143 | - label="姓名" | |
144 | - align="center" | |
145 | - ></el-table-column> | |
146 | - <el-table-column | |
147 | - prop="answerTimes" | |
148 | - label="答题次数" | |
149 | - align="center" | |
150 | - ></el-table-column> | |
151 | - <el-table-column | |
152 | - prop="consumingDuration" | |
153 | - label="答题耗时" | |
154 | - align="center" | |
155 | - ><template slot-scope="scoped">{{setDuration(scoped.row.consumingDuration)}}</template></el-table-column> | |
156 | - <el-table-column | |
157 | - prop="correctAnswerTimes" | |
158 | - label="答对次数" | |
159 | - align="center" | |
160 | - ></el-table-column> | |
161 | - <el-table-column | |
162 | - prop="participationRate" | |
163 | - label="参与度" | |
164 | - sortable | |
165 | - align="center" | |
166 | - ><template slot-scope="scoped" | |
167 | - >{{ scoped.row.participationRate }}%</template | |
168 | - ></el-table-column | |
144 | + </el-table> | |
145 | + <el-table | |
146 | + v-if="type == 2" | |
147 | + :data="tableData" | |
148 | + border | |
149 | + style="width: 100%" | |
169 | 150 | > |
170 | - <el-table-column | |
171 | - prop="correctRate" | |
172 | - label="正确率" | |
173 | - sortable | |
174 | - align="center" | |
175 | - ><template slot-scope="scoped" | |
176 | - >{{ scoped.row.correctRate }}%</template | |
177 | - ></el-table-column | |
151 | + <el-table-column | |
152 | + prop="studentCode" | |
153 | + label="学号" | |
154 | + align="center" | |
155 | + ></el-table-column> | |
156 | + <el-table-column | |
157 | + prop="studentName" | |
158 | + label="姓名" | |
159 | + align="center" | |
160 | + ></el-table-column> | |
161 | + <el-table-column | |
162 | + prop="answerTimes" | |
163 | + label="答题次数" | |
164 | + align="center" | |
165 | + ></el-table-column> | |
166 | + <el-table-column | |
167 | + prop="consumingDuration" | |
168 | + label="答题耗时" | |
169 | + align="center" | |
170 | + ><template slot-scope="scoped">{{ | |
171 | + setDuration(scoped.row.consumingDuration) | |
172 | + }}</template></el-table-column | |
173 | + > | |
174 | + <el-table-column | |
175 | + prop="correctAnswerTimes" | |
176 | + label="答对次数" | |
177 | + align="center" | |
178 | + ></el-table-column> | |
179 | + <el-table-column | |
180 | + prop="participationRate" | |
181 | + label="参与度" | |
182 | + sortable | |
183 | + align="center" | |
184 | + ><template slot-scope="scoped" | |
185 | + >{{ scoped.row.participationRate }}%</template | |
186 | + ></el-table-column | |
187 | + > | |
188 | + <el-table-column | |
189 | + prop="correctRate" | |
190 | + label="正确率" | |
191 | + sortable | |
192 | + align="center" | |
193 | + ><template slot-scope="scoped" | |
194 | + >{{ scoped.row.correctRate }}%</template | |
195 | + ></el-table-column | |
196 | + > | |
197 | + <el-table-column | |
198 | + prop="answerCorrectRate" | |
199 | + label="已答正确率" | |
200 | + sortable | |
201 | + align="center" | |
202 | + ><template slot-scope="scoped" | |
203 | + >{{ scoped.row.answerCorrectRate }}%</template | |
204 | + ></el-table-column | |
205 | + > | |
206 | + <el-table-column | |
207 | + v-for="(item, index) in optionsList" | |
208 | + :key="index" | |
209 | + :label="'Q' + (index + 1)" | |
210 | + align="center" | |
211 | + ><template slot-scope="scoped"> | |
212 | + <span :class="scoped.row['isRight' + index] ? '' : 'red'">{{ | |
213 | + scoped.row["answer" + index] | |
214 | + }}</span> | |
215 | + </template> | |
216 | + </el-table-column> | |
217 | + </el-table> | |
218 | + <el-table | |
219 | + v-if="type == 3" | |
220 | + :data="tableData" | |
221 | + border | |
222 | + style="width: 100%" | |
178 | 223 | > |
179 | - <el-table-column | |
180 | - prop="answerCorrectRate" | |
181 | - label="已答正确率" | |
182 | - sortable | |
183 | - align="center" | |
184 | - ><template slot-scope="scoped" | |
185 | - >{{ scoped.row.answerCorrectRate }}%</template | |
186 | - ></el-table-column | |
224 | + <el-table-column | |
225 | + prop="studentCode" | |
226 | + label="学号" | |
227 | + align="center" | |
228 | + ></el-table-column> | |
229 | + <el-table-column | |
230 | + prop="studentName" | |
231 | + label="姓名" | |
232 | + align="center" | |
233 | + ></el-table-column> | |
234 | + <el-table-column | |
235 | + prop="rushAnswerTimes" | |
236 | + label="抢答成功次数" | |
237 | + sortable | |
238 | + align="center" | |
239 | + ></el-table-column> | |
240 | + <el-table-column | |
241 | + prop="rushAnswerCorrectTimes" | |
242 | + label="答对次数" | |
243 | + sortable | |
244 | + align="center" | |
245 | + ></el-table-column> | |
246 | + <el-table-column | |
247 | + prop="checkAnswerTimes" | |
248 | + label="抽答次数" | |
249 | + sortable | |
250 | + align="center" | |
251 | + ></el-table-column> | |
252 | + <el-table-column | |
253 | + prop="checkAnswerCorrectTimes" | |
254 | + label="抽答答对次数" | |
255 | + sortable | |
256 | + align="center" | |
257 | + ></el-table-column> | |
258 | + <el-table-column | |
259 | + prop="interactionsNum" | |
260 | + label="参与得分" | |
261 | + sortable | |
262 | + align="center" | |
263 | + ></el-table-column> | |
264 | + <el-table-column | |
265 | + prop="interactionsCorrectNum" | |
266 | + label="对错得分" | |
267 | + sortable | |
268 | + align="center" | |
269 | + ></el-table-column> | |
270 | + </el-table> | |
271 | + <el-table | |
272 | + v-if="type == 4" | |
273 | + :data="tableData" | |
274 | + border | |
275 | + style="width: 100%" | |
187 | 276 | > |
188 | - <el-table-column | |
189 | - v-for="(item, index) in optionsList" | |
190 | - :key="index" | |
191 | - :label="'Q' + (index + 1)" | |
192 | - align="center" | |
193 | - ><template slot-scope="scoped"> | |
194 | - <span :class="scoped.row['isRight' + index] ? '' : 'red'">{{ | |
195 | - scoped.row["answer" + index] | |
196 | - }}</span> | |
197 | - </template> | |
198 | - </el-table-column> | |
199 | - </el-table> | |
200 | - <el-table v-if="type == 3" :data="tableData" border style="width: 100%"> | |
201 | - <el-table-column | |
202 | - prop="studentCode" | |
203 | - label="学号" | |
204 | - align="center" | |
205 | - ></el-table-column> | |
206 | - <el-table-column | |
207 | - prop="studentName" | |
208 | - label="姓名" | |
209 | - align="center" | |
210 | - ></el-table-column> | |
211 | - <el-table-column | |
212 | - prop="rushAnswerTimes" | |
213 | - label="抢答成功次数" | |
214 | - sortable | |
215 | - align="center" | |
216 | - ></el-table-column> | |
217 | - <el-table-column | |
218 | - prop="rushAnswerCorrectTimes" | |
219 | - label="答对次数" | |
220 | - sortable | |
221 | - align="center" | |
222 | - ></el-table-column> | |
223 | - <el-table-column | |
224 | - prop="checkAnswerTimes" | |
225 | - label="抽答次数" | |
226 | - sortable | |
227 | - align="center" | |
228 | - ></el-table-column> | |
229 | - <el-table-column | |
230 | - prop="checkAnswerCorrectTimes" | |
231 | - label="抽答答对次数" | |
232 | - sortable | |
233 | - align="center" | |
234 | - ></el-table-column> | |
235 | - <el-table-column | |
236 | - prop="interactionsNum" | |
237 | - label="参与得分" | |
238 | - sortable | |
239 | - align="center" | |
240 | - ></el-table-column> | |
241 | - <el-table-column | |
242 | - prop="interactionsCorrectNum" | |
243 | - label="对错得分" | |
244 | - sortable | |
245 | - align="center" | |
246 | - ></el-table-column> | |
247 | - </el-table> | |
248 | - <el-table v-if="type == 4" :data="tableData" border style="width: 100%"> | |
249 | - <el-table-column | |
250 | - prop="studentName" | |
251 | - label="姓名" | |
252 | - align="center" | |
253 | - ></el-table-column> | |
254 | - <el-table-column | |
255 | - prop="checkInTime" | |
256 | - label="签到时间" | |
257 | - sortable | |
258 | - align="center" | |
259 | - ></el-table-column> | |
260 | - <el-table-column | |
261 | - prop="makeUpTime" | |
262 | - label="补签时间" | |
263 | - sortable | |
264 | - align="center" | |
265 | - ></el-table-column> | |
266 | - </el-table> | |
277 | + <el-table-column | |
278 | + prop="studentName" | |
279 | + label="姓名" | |
280 | + align="center" | |
281 | + ></el-table-column> | |
282 | + <el-table-column | |
283 | + prop="checkInTime" | |
284 | + label="签到时间" | |
285 | + sortable | |
286 | + align="center" | |
287 | + ></el-table-column> | |
288 | + <el-table-column | |
289 | + prop="makeUpTime" | |
290 | + label="补签时间" | |
291 | + sortable | |
292 | + align="center" | |
293 | + ></el-table-column> | |
294 | + </el-table> | |
295 | + </div> | |
267 | 296 | <div class="pagination-box" v-show="type == 1"> |
268 | 297 | <el-pagination |
269 | 298 | small="" |
... | ... | @@ -285,6 +314,14 @@ |
285 | 314 | icon="fa fa-cloud-download" |
286 | 315 | >导出报表</el-button |
287 | 316 | > |
317 | + <el-button | |
318 | + @click="print" | |
319 | + type="primary" | |
320 | + plain | |
321 | + round | |
322 | + icon="el-icon-printer" | |
323 | + >打印</el-button | |
324 | + > | |
288 | 325 | <!-- <el-button @click="edit" type="primary" round>修改答案</el-button> --> |
289 | 326 | </p> |
290 | 327 | </div> |
... | ... | @@ -301,7 +338,7 @@ |
301 | 338 | </template> |
302 | 339 | |
303 | 340 | <script> |
304 | -import { downloadFile } from "@/utils"; | |
341 | +import { downloadFile,tablePrint } from "@/utils"; | |
305 | 342 | export default { |
306 | 343 | data() { |
307 | 344 | return { |
... | ... | @@ -327,28 +364,31 @@ export default { |
327 | 364 | this.periodDetail(); |
328 | 365 | }, |
329 | 366 | methods: { |
367 | + print() { | |
368 | + tablePrint("print-content"); | |
369 | + }, | |
330 | 370 | setType(type) { |
331 | 371 | this.type = type; |
332 | 372 | this.page = 1; |
333 | 373 | this._QueryData(); |
334 | 374 | }, |
335 | - setDuration(times){ | |
336 | - let m = parseInt(times/1000 / 60) | |
337 | - let s = parseInt((times/1000)%60) | |
338 | - let ms = times | |
375 | + setDuration(times) { | |
376 | + let m = parseInt(times / 1000 / 60); | |
377 | + let s = parseInt((times / 1000) % 60); | |
378 | + let ms = times; | |
339 | 379 | let aTime; |
340 | - if(times==0){ | |
341 | - aTime = `0` | |
342 | - }else{ | |
343 | - if(m==0&&s==0){ | |
344 | - aTime = `${ms}毫秒` | |
345 | - }else if(m==0&&s!=0){ | |
346 | - aTime = `${s}秒` | |
347 | - }else if(m!=0&&s!=0){ | |
348 | - aTime = `${m}分${s}秒` | |
380 | + if (times == 0) { | |
381 | + aTime = `0`; | |
382 | + } else { | |
383 | + if (m == 0 && s == 0) { | |
384 | + aTime = `${ms}毫秒`; | |
385 | + } else if (m == 0 && s != 0) { | |
386 | + aTime = `${s}秒`; | |
387 | + } else if (m != 0 && s != 0) { | |
388 | + aTime = `${m}分${s}秒`; | |
349 | 389 | } |
350 | 390 | } |
351 | - return aTime | |
391 | + return aTime; | |
352 | 392 | }, |
353 | 393 | setSubPro(type) { |
354 | 394 | let tit; |
... | ... | @@ -458,8 +498,8 @@ export default { |
458 | 498 | }); |
459 | 499 | this.optionsList = [...optionsList]; |
460 | 500 | } else { |
461 | - this.tableData = data?.list.sort((a,b)=>{ | |
462 | - return a.questionIndex-b.questionIndex | |
501 | + this.tableData = data?.list.sort((a, b) => { | |
502 | + return a.questionIndex - b.questionIndex; | |
463 | 503 | }); |
464 | 504 | } |
465 | 505 | this.total = data.count; |
... | ... | @@ -504,7 +544,9 @@ div::-webkit-scrollbar-thumb { |
504 | 544 | display: flex; |
505 | 545 | justify-content: space-between; |
506 | 546 | } |
507 | -.red{color:#f30} | |
547 | +.red { | |
548 | + color: #f30; | |
549 | +} | |
508 | 550 | .page-content { |
509 | 551 | padding: 20px 20px 0; |
510 | 552 | } | ... | ... |
src/views/standard/ask/index.vue
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | </el-option> |
23 | 23 | </el-select> |
24 | 24 | <el-select |
25 | - v-if="role == 'ROLE_BANZHUREN'" | |
25 | + v-if="role == 'ROLE_BANZHUREN' || role == 'ROLE_PERSONAL'" | |
26 | 26 | class="sel" |
27 | 27 | multiple |
28 | 28 | v-model="query.subjectNames" |
... | ... | @@ -104,333 +104,340 @@ |
104 | 104 | >阶段互动报表</el-radio-button |
105 | 105 | > |
106 | 106 | </el-radio-group> |
107 | - <!-- <p class="table-tit" v-if="tabIndex != 1"> | |
108 | - <span>总课时数:10</span> | |
109 | - <span>互动总数:22</span> | |
110 | - </p> --> | |
111 | 107 | <div class="table-cont" v-loading="loading"> |
112 | - <div v-show="tabIndex == 1"> | |
113 | - <el-table | |
114 | - :data="tableData" | |
115 | - border | |
116 | - style="width: 100%" | |
117 | - @sort-change="sortChange" | |
118 | - > | |
119 | - <el-table-column | |
120 | - prop="title" | |
121 | - label="课时" | |
122 | - align="center" | |
123 | - ></el-table-column> | |
124 | - <el-table-column | |
125 | - prop="questionNum" | |
126 | - label="题目总数" | |
127 | - align="center" | |
128 | - width="100" | |
129 | - ></el-table-column> | |
130 | - <el-table-column | |
131 | - prop="startTime" | |
132 | - label="上课时间" | |
133 | - align="center" | |
134 | - ></el-table-column> | |
135 | - <el-table-column | |
136 | - prop="participationRate" | |
137 | - label="参与度" | |
138 | - sortable="custom" | |
139 | - align="center" | |
140 | - > | |
141 | - <template slot-scope="scoped" | |
142 | - >{{ scoped.row.participationRate }}%</template | |
143 | - ></el-table-column | |
108 | + <div id="print-content"> | |
109 | + <div v-show="tabIndex == 1"> | |
110 | + <el-table | |
111 | + :data="tableData" | |
112 | + border | |
113 | + style="width: 100%" | |
114 | + @sort-change="sortChange" | |
144 | 115 | > |
145 | - <el-table-column | |
146 | - prop="answerCorrectRate" | |
147 | - label="已答总正确率" | |
148 | - sortable="custom" | |
149 | - align="center" | |
150 | - > | |
151 | - <template slot-scope="scoped" | |
152 | - >{{ scoped.row.answerCorrectRate }}%</template | |
116 | + <el-table-column | |
117 | + prop="title" | |
118 | + label="课时" | |
119 | + align="center" | |
120 | + ></el-table-column> | |
121 | + <el-table-column | |
122 | + prop="questionNum" | |
123 | + label="题目总数" | |
124 | + align="center" | |
125 | + width="100" | |
126 | + ></el-table-column> | |
127 | + <el-table-column | |
128 | + prop="startTime" | |
129 | + label="上课时间" | |
130 | + align="center" | |
131 | + ></el-table-column> | |
132 | + <el-table-column | |
133 | + prop="participationRate" | |
134 | + label="参与度" | |
135 | + sortable="custom" | |
136 | + align="center" | |
153 | 137 | > |
154 | - </el-table-column> | |
155 | - <el-table-column | |
156 | - prop="classCorrectRate" | |
157 | - label="班级总正确率" | |
158 | - sortable="custom" | |
159 | - align="center" | |
160 | - ><template slot-scope="scoped" | |
161 | - >{{ scoped.row.classCorrectRate }}%</template | |
162 | - ></el-table-column | |
163 | - > | |
164 | - <el-table-column label="操作" align="center"> | |
165 | - <template slot-scope="scoped"> | |
166 | - <el-tooltip | |
167 | - effect="dark" | |
168 | - v-if="scoped.row.answerNum == 0" | |
169 | - content="设置答案" | |
170 | - placement="top" | |
171 | - > | |
172 | - <el-button | |
173 | - type="primary" | |
174 | - circle | |
175 | - size="mini" | |
176 | - icon="fa fa-file-text" | |
177 | - @click="edit(scoped.row)" | |
178 | - ></el-button> | |
179 | - </el-tooltip> | |
180 | - <el-tooltip v-else effect="dark" content="详情" placement="top"> | |
181 | - <el-button | |
182 | - type="primary" | |
183 | - circle | |
184 | - size="mini" | |
185 | - icon="fa fa-arrow-right" | |
186 | - @click="linkTo(scoped.row)" | |
187 | - ></el-button> | |
188 | - </el-tooltip> | |
189 | - </template> | |
190 | - </el-table-column> | |
191 | - </el-table> | |
192 | - </div> | |
193 | - <div v-show="tabIndex == 2"> | |
194 | - <el-table | |
195 | - v-if="role == 'ROLE_JIAOSHI'" | |
196 | - :max-height="tableMaxHeight" | |
197 | - :data="tableData" | |
198 | - border | |
199 | - style="width: 100%" | |
200 | - > | |
201 | - <el-table-column | |
202 | - prop="studentCode" | |
203 | - label="学号" | |
204 | - fixed | |
205 | - align="center" | |
206 | - ></el-table-column> | |
207 | - <el-table-column | |
208 | - prop="studentName" | |
209 | - label="姓名" | |
210 | - fixed | |
211 | - align="center" | |
212 | - width="100" | |
213 | - ></el-table-column> | |
214 | - <el-table-column | |
215 | - prop="answerTimes" | |
216 | - label="累计答题次数" | |
217 | - sortable | |
218 | - align="center" | |
219 | - ></el-table-column> | |
220 | - <el-table-column | |
221 | - prop="correctAnswerTimes" | |
222 | - label="累计答对次数" | |
223 | - sortable | |
224 | - align="center" | |
225 | - ></el-table-column> | |
226 | - <el-table-column | |
227 | - prop="participationRate" | |
228 | - label="总参与度" | |
229 | - sortable | |
230 | - align="center" | |
231 | - > | |
232 | - <template slot-scope="scoped" | |
233 | - >{{ scoped.row.participationRate }}%</template | |
234 | - ></el-table-column | |
235 | - > | |
236 | - <el-table-column | |
237 | - prop="correctRate" | |
238 | - label="总正确率" | |
239 | - sortable | |
240 | - align="center" | |
241 | - > | |
242 | - <template slot-scope="scoped" | |
243 | - >{{ scoped.row.correctRate }}%</template | |
244 | - ></el-table-column | |
245 | - > | |
246 | - <el-table-column | |
247 | - prop="answerCorrectRate" | |
248 | - label="已答总正确率" | |
249 | - sortable | |
250 | - align="center" | |
251 | - > | |
252 | - <template slot-scope="scoped" | |
253 | - >{{ scoped.row.answerCorrectRate }}%</template | |
138 | + <template slot-scope="scoped" | |
139 | + >{{ scoped.row.participationRate }}%</template | |
140 | + ></el-table-column | |
254 | 141 | > |
255 | - </el-table-column> | |
256 | - <el-table-column | |
257 | - prop="classRank" | |
258 | - label="总正确率班排名" | |
259 | - sortable | |
260 | - align="center" | |
261 | - ></el-table-column> | |
262 | - </el-table> | |
263 | - <el-table | |
264 | - :max-height="tableMaxHeight" | |
265 | - v-else | |
266 | - :data="tableData" | |
267 | - border | |
268 | - style="width: 100%" | |
269 | - > | |
270 | - <el-table-column | |
271 | - prop="studentCode" | |
272 | - label="学号" | |
273 | - align="center" | |
274 | - fixed | |
275 | - ></el-table-column> | |
276 | - <el-table-column | |
277 | - prop="studentName" | |
278 | - label="姓名" | |
279 | - align="center" | |
280 | - fixed | |
281 | - width="100" | |
282 | - ></el-table-column> | |
283 | - <el-table-column | |
284 | - v-for="(item, index) in phaseOption" | |
285 | - :key="index" | |
286 | - :label="item" | |
287 | - align="center" | |
288 | - > | |
289 | 142 | <el-table-column |
143 | + prop="answerCorrectRate" | |
144 | + label="已答总正确率" | |
145 | + sortable="custom" | |
290 | 146 | align="center" |
291 | - :label="index == 0 ? '总课时数' : '课时数'" | |
292 | - :prop="'periodCount' + item" | |
293 | 147 | > |
148 | + <template slot-scope="scoped" | |
149 | + >{{ scoped.row.answerCorrectRate }}%</template | |
150 | + > | |
294 | 151 | </el-table-column> |
295 | 152 | <el-table-column |
153 | + prop="classCorrectRate" | |
154 | + label="班级总正确率" | |
155 | + sortable="custom" | |
296 | 156 | align="center" |
297 | - :label="index == 0 ? '总出题数' : '出题数'" | |
298 | - :prop="'questionNum' + item" | |
157 | + ><template slot-scope="scoped" | |
158 | + >{{ scoped.row.classCorrectRate }}%</template | |
159 | + ></el-table-column | |
299 | 160 | > |
161 | + <el-table-column label="操作" align="center"> | |
162 | + <template slot-scope="scoped"> | |
163 | + <el-tooltip | |
164 | + effect="dark" | |
165 | + v-if="scoped.row.answerNum == 0" | |
166 | + content="设置答案" | |
167 | + placement="top" | |
168 | + > | |
169 | + <el-button | |
170 | + type="primary" | |
171 | + circle | |
172 | + size="mini" | |
173 | + icon="fa fa-file-text" | |
174 | + @click="edit(scoped.row)" | |
175 | + ></el-button> | |
176 | + </el-tooltip> | |
177 | + <el-tooltip | |
178 | + v-else | |
179 | + effect="dark" | |
180 | + content="详情" | |
181 | + placement="top" | |
182 | + > | |
183 | + <el-button | |
184 | + type="primary" | |
185 | + circle | |
186 | + size="mini" | |
187 | + icon="fa fa-arrow-right" | |
188 | + @click="linkTo(scoped.row)" | |
189 | + ></el-button> | |
190 | + </el-tooltip> | |
191 | + </template> | |
300 | 192 | </el-table-column> |
193 | + </el-table> | |
194 | + </div> | |
195 | + <div v-show="tabIndex == 2"> | |
196 | + <el-table | |
197 | + id="print-content2" | |
198 | + v-if="role == 'ROLE_JIAOSHI'" | |
199 | + :max-height="tableMaxHeight" | |
200 | + :data="tableData" | |
201 | + border | |
202 | + style="width: 100%" | |
203 | + > | |
301 | 204 | <el-table-column |
205 | + prop="studentCode" | |
206 | + label="学号" | |
207 | + fixed | |
302 | 208 | align="center" |
303 | - :label="index == 0 ? '总参与度' : '参与度'" | |
304 | - :prop="'participationRate' + item" | |
305 | - ><template slot-scope="scoped" | |
306 | - >{{ scoped.row["participationRate" + item] }}%</template | |
209 | + ></el-table-column> | |
210 | + <el-table-column | |
211 | + prop="studentName" | |
212 | + label="姓名" | |
213 | + fixed | |
214 | + align="center" | |
215 | + width="100" | |
216 | + ></el-table-column> | |
217 | + <el-table-column | |
218 | + prop="answerTimes" | |
219 | + label="累计答题次数" | |
220 | + sortable | |
221 | + align="center" | |
222 | + ></el-table-column> | |
223 | + <el-table-column | |
224 | + prop="correctAnswerTimes" | |
225 | + label="累计答对次数" | |
226 | + sortable | |
227 | + align="center" | |
228 | + ></el-table-column> | |
229 | + <el-table-column | |
230 | + prop="participationRate" | |
231 | + label="总参与度" | |
232 | + sortable | |
233 | + align="center" | |
234 | + > | |
235 | + <template slot-scope="scoped" | |
236 | + >{{ scoped.row.participationRate }}%</template | |
237 | + ></el-table-column | |
238 | + > | |
239 | + <el-table-column | |
240 | + prop="correctRate" | |
241 | + label="总正确率" | |
242 | + sortable | |
243 | + align="center" | |
244 | + > | |
245 | + <template slot-scope="scoped" | |
246 | + >{{ scoped.row.correctRate }}%</template | |
247 | + ></el-table-column | |
248 | + > | |
249 | + <el-table-column | |
250 | + prop="answerCorrectRate" | |
251 | + label="已答总正确率" | |
252 | + sortable | |
253 | + align="center" | |
254 | + > | |
255 | + <template slot-scope="scoped" | |
256 | + >{{ scoped.row.answerCorrectRate }}%</template | |
307 | 257 | > |
308 | 258 | </el-table-column> |
309 | 259 | <el-table-column |
260 | + prop="classRank" | |
261 | + label="总正确率班排名" | |
262 | + sortable | |
310 | 263 | align="center" |
311 | - :label="index == 0 ? '总正确率' : '正确率'" | |
312 | - :prop="'correctRate' + item" | |
313 | - ><template slot-scope="scoped" | |
314 | - >{{ scoped.row["correctRate" + item] }}%</template | |
264 | + ></el-table-column> | |
265 | + </el-table> | |
266 | + <el-table | |
267 | + id="print-content2" | |
268 | + :max-height="tableMaxHeight" | |
269 | + v-else | |
270 | + :data="tableData" | |
271 | + border | |
272 | + style="width: 100%" | |
273 | + > | |
274 | + <el-table-column | |
275 | + prop="studentCode" | |
276 | + label="学号" | |
277 | + align="center" | |
278 | + fixed | |
279 | + ></el-table-column> | |
280 | + <el-table-column | |
281 | + prop="studentName" | |
282 | + label="姓名" | |
283 | + align="center" | |
284 | + fixed | |
285 | + width="100" | |
286 | + ></el-table-column> | |
287 | + <el-table-column | |
288 | + v-for="(item, index) in phaseOption" | |
289 | + :key="index" | |
290 | + :label="item" | |
291 | + align="center" | |
292 | + > | |
293 | + <el-table-column | |
294 | + align="center" | |
295 | + :label="index == 0 ? '总课时数' : '课时数'" | |
296 | + :prop="'periodCount' + item" | |
315 | 297 | > |
298 | + </el-table-column> | |
299 | + <el-table-column | |
300 | + align="center" | |
301 | + :label="index == 0 ? '总出题数' : '出题数'" | |
302 | + :prop="'questionNum' + item" | |
303 | + > | |
304 | + </el-table-column> | |
305 | + <el-table-column | |
306 | + align="center" | |
307 | + :label="index == 0 ? '总参与度' : '参与度'" | |
308 | + :prop="'participationRate' + item" | |
309 | + ><template slot-scope="scoped" | |
310 | + >{{ scoped.row["participationRate" + item] }}%</template | |
311 | + > | |
312 | + </el-table-column> | |
313 | + <el-table-column | |
314 | + align="center" | |
315 | + :label="index == 0 ? '总正确率' : '正确率'" | |
316 | + :prop="'correctRate' + item" | |
317 | + ><template slot-scope="scoped" | |
318 | + >{{ scoped.row["correctRate" + item] }}%</template | |
319 | + > | |
320 | + </el-table-column> | |
316 | 321 | </el-table-column> |
317 | - </el-table-column> | |
318 | - </el-table> | |
319 | - </div> | |
320 | - <div v-show="tabIndex == 3"> | |
321 | - <el-table | |
322 | - v-if="role == 'ROLE_JIAOSHI'" | |
323 | - :max-height="tableMaxHeight" | |
324 | - :data="tableData" | |
325 | - border | |
326 | - style="width: 100%" | |
327 | - > | |
328 | - <el-table-column | |
329 | - prop="studentCode" | |
330 | - label="学号" | |
331 | - fixed | |
332 | - align="center" | |
333 | - ></el-table-column> | |
334 | - <el-table-column | |
335 | - prop="studentName" | |
336 | - label="姓名" | |
337 | - fixed | |
338 | - align="center" | |
339 | - width="100" | |
340 | - ></el-table-column> | |
341 | - <el-table-column | |
342 | - prop="rushAnswerTimes" | |
343 | - label="抢答成功次数" | |
344 | - sortable | |
345 | - align="center" | |
346 | - ></el-table-column> | |
347 | - <el-table-column | |
348 | - prop="rushAnswerCorrectTimes" | |
349 | - label="抢答答对次数" | |
350 | - sortable | |
351 | - align="center" | |
352 | - ></el-table-column> | |
353 | - <el-table-column | |
354 | - prop="checkAnswerTimes" | |
355 | - label="抽答次数" | |
356 | - sortable | |
357 | - align="center" | |
358 | - ></el-table-column> | |
359 | - <el-table-column | |
360 | - prop="checkAnswerCorrectTimes" | |
361 | - label="抽答答对次数" | |
362 | - sortable | |
363 | - align="center" | |
364 | - ></el-table-column> | |
365 | - <el-table-column | |
366 | - prop="interactionsNum" | |
367 | - label="参与得分" | |
368 | - sortable | |
369 | - align="center" | |
370 | - ></el-table-column> | |
371 | - <el-table-column | |
372 | - prop="interactionsCorrectNum" | |
373 | - label="对错得分" | |
374 | - sortable | |
375 | - align="center" | |
376 | - ></el-table-column> | |
377 | - </el-table> | |
378 | - <el-table | |
379 | - v-else | |
380 | - :max-height="tableMaxHeight" | |
381 | - :data="tableData" | |
382 | - border | |
383 | - style="width: 100%" | |
384 | - > | |
385 | - <el-table-column | |
386 | - prop="studentCode" | |
387 | - label="学号" | |
388 | - align="center" | |
389 | - ></el-table-column> | |
390 | - <el-table-column | |
391 | - prop="studentName" | |
392 | - label="姓名" | |
393 | - align="center" | |
394 | - width="100" | |
395 | - ></el-table-column> | |
396 | - <el-table-column | |
397 | - v-for="(item, index) in phaseInter" | |
398 | - :key="index" | |
399 | - :label="item" | |
400 | - align="center" | |
322 | + </el-table> | |
323 | + </div> | |
324 | + <div v-show="tabIndex == 3"> | |
325 | + <el-table | |
326 | + id="print-content3" | |
327 | + v-if="role == 'ROLE_JIAOSHI'" | |
328 | + :max-height="tableMaxHeight" | |
329 | + :data="tableData" | |
330 | + border | |
331 | + style="width: 100%" | |
401 | 332 | > |
402 | 333 | <el-table-column |
334 | + prop="studentCode" | |
335 | + label="学号" | |
336 | + fixed | |
337 | + align="center" | |
338 | + ></el-table-column> | |
339 | + <el-table-column | |
340 | + prop="studentName" | |
341 | + label="姓名" | |
342 | + fixed | |
403 | 343 | align="center" |
404 | - v-if="index == 0" | |
405 | - label="参与分" | |
344 | + width="100" | |
345 | + ></el-table-column> | |
346 | + <el-table-column | |
347 | + prop="rushAnswerTimes" | |
348 | + label="抢答成功次数" | |
406 | 349 | sortable |
407 | - :prop="'interactionsNum' + item" | |
408 | - > | |
409 | - </el-table-column> | |
350 | + align="center" | |
351 | + ></el-table-column> | |
410 | 352 | <el-table-column |
411 | - v-else | |
353 | + prop="rushAnswerCorrectTimes" | |
354 | + label="抢答答对次数" | |
355 | + sortable | |
412 | 356 | align="center" |
413 | - label="互动数" | |
414 | - :prop="'interactionsNum' + item" | |
415 | - > | |
416 | - </el-table-column> | |
357 | + ></el-table-column> | |
417 | 358 | <el-table-column |
418 | - v-if="index == 0" | |
359 | + prop="checkAnswerTimes" | |
360 | + label="抽答次数" | |
361 | + sortable | |
419 | 362 | align="center" |
420 | - label="对错分" | |
363 | + ></el-table-column> | |
364 | + <el-table-column | |
365 | + prop="checkAnswerCorrectTimes" | |
366 | + label="抽答答对次数" | |
421 | 367 | sortable |
422 | - :prop="'interactionsCorrectNum' + item" | |
423 | - > | |
424 | - </el-table-column> | |
368 | + align="center" | |
369 | + ></el-table-column> | |
370 | + <el-table-column | |
371 | + prop="interactionsNum" | |
372 | + label="参与得分" | |
373 | + sortable | |
374 | + align="center" | |
375 | + ></el-table-column> | |
425 | 376 | <el-table-column |
426 | - v-else | |
377 | + prop="interactionsCorrectNum" | |
378 | + label="对错得分" | |
379 | + sortable | |
380 | + align="center" | |
381 | + ></el-table-column> | |
382 | + </el-table> | |
383 | + <el-table | |
384 | + id="print-content3" | |
385 | + v-else | |
386 | + :max-height="tableMaxHeight" | |
387 | + :data="tableData" | |
388 | + border | |
389 | + style="width: 100%" | |
390 | + > | |
391 | + <el-table-column | |
392 | + prop="studentCode" | |
393 | + label="学号" | |
394 | + align="center" | |
395 | + ></el-table-column> | |
396 | + <el-table-column | |
397 | + prop="studentName" | |
398 | + label="姓名" | |
399 | + align="center" | |
400 | + width="100" | |
401 | + ></el-table-column> | |
402 | + <el-table-column | |
403 | + v-for="(item, index) in phaseInter" | |
404 | + :key="index" | |
405 | + :label="item" | |
427 | 406 | align="center" |
428 | - label="参与数" | |
429 | - :prop="'interactionsCorrectNum' + item" | |
430 | 407 | > |
408 | + <el-table-column | |
409 | + align="center" | |
410 | + v-if="index == 0" | |
411 | + label="参与分" | |
412 | + sortable | |
413 | + :prop="'interactionsNum' + item" | |
414 | + > | |
415 | + </el-table-column> | |
416 | + <el-table-column | |
417 | + v-else | |
418 | + align="center" | |
419 | + label="互动数" | |
420 | + :prop="'interactionsNum' + item" | |
421 | + > | |
422 | + </el-table-column> | |
423 | + <el-table-column | |
424 | + v-if="index == 0" | |
425 | + align="center" | |
426 | + label="对错分" | |
427 | + sortable | |
428 | + :prop="'interactionsCorrectNum' + item" | |
429 | + > | |
430 | + </el-table-column> | |
431 | + <el-table-column | |
432 | + v-else | |
433 | + align="center" | |
434 | + label="参与数" | |
435 | + :prop="'interactionsCorrectNum' + item" | |
436 | + > | |
437 | + </el-table-column> | |
431 | 438 | </el-table-column> |
432 | - </el-table-column> | |
433 | - </el-table> | |
439 | + </el-table> | |
440 | + </div> | |
434 | 441 | </div> |
435 | 442 | <div class="pagination-box" v-show="tabIndex == 1"> |
436 | 443 | <el-pagination |
... | ... | @@ -456,21 +463,22 @@ |
456 | 463 | icon="fa fa-cloud-download" |
457 | 464 | >导出报表</el-button |
458 | 465 | > |
466 | + <el-button | |
467 | + @click="print" | |
468 | + type="primary" | |
469 | + plain | |
470 | + round | |
471 | + icon="el-icon-printer" | |
472 | + >打印</el-button | |
473 | + > | |
459 | 474 | </p> |
460 | 475 | </div> |
461 | 476 | </div> |
462 | - <set-answer | |
463 | - :diaVisible="dialogVisible" | |
464 | - :questionList="form.questionList" | |
465 | - :paperId="form.id" | |
466 | - @saveSuccess="handleSuccess" | |
467 | - @cancel="cancel" | |
468 | - /> | |
469 | 477 | </div> |
470 | 478 | </template> |
471 | 479 | |
472 | 480 | <script> |
473 | -import { formatDate, deepClone, downloadFile } from "utils"; | |
481 | +import { formatDate, deepClone, downloadFile, tablePrint } from "utils"; | |
474 | 482 | import BusEvent from "@/utils/busEvent"; |
475 | 483 | export default { |
476 | 484 | data() { |
... | ... | @@ -478,8 +486,6 @@ export default { |
478 | 486 | tableMaxHeight: 300, |
479 | 487 | role: "", |
480 | 488 | loading: false, |
481 | - dialogVisible: false, | |
482 | - form: { questionList: [] }, | |
483 | 489 | date: "", //今天-昨天-本周 |
484 | 490 | query: { |
485 | 491 | //搜索条件 |
... | ... | @@ -506,7 +512,9 @@ export default { |
506 | 512 | }; |
507 | 513 | }, |
508 | 514 | async created() { |
509 | - this.role = this.$store.getters.info.showRole || this.$store.getters.info.permissions[0].role; | |
515 | + this.role = | |
516 | + this.$store.getters.info.showRole || | |
517 | + this.$store.getters.info.permissions[0].role; | |
510 | 518 | this.query.subjectNames = this.role == "ROLE_BANZHUREN" ? [] : ""; |
511 | 519 | await this._QueryClassList(); |
512 | 520 | await this._QuerySubjectList(); |
... | ... | @@ -532,6 +540,9 @@ export default { |
532 | 540 | }); |
533 | 541 | }, |
534 | 542 | methods: { |
543 | + print() { | |
544 | + tablePrint("print-content"); | |
545 | + }, | |
535 | 546 | changeSub(val) { |
536 | 547 | let sub; |
537 | 548 | if (val && val.length) { |
... | ... | @@ -623,26 +634,14 @@ export default { |
623 | 634 | } |
624 | 635 | }, |
625 | 636 | async edit(item) { |
626 | - if (this.editLoading) return; | |
627 | - this.editLoading = true; | |
628 | - const { data, status, info } = await this.$request.periodQuestionList({ | |
629 | - periodId: item.id, | |
637 | + this.$router.push({ | |
638 | + path: "/examinationPaperEdit", | |
639 | + query: { | |
640 | + paperId: item.id, | |
641 | + title: item.title, | |
642 | + type: 3, | |
643 | + }, | |
630 | 644 | }); |
631 | - this.editLoading = false; | |
632 | - if (status === 0) { | |
633 | - this.form.id = item.id; | |
634 | - this.form.questionList = (data.list && [...data.list]) || []; | |
635 | - this.dialogVisible = true; | |
636 | - } else { | |
637 | - this.$message.error(info); | |
638 | - } | |
639 | - }, | |
640 | - cancel() { | |
641 | - this.dialogVisible = false; | |
642 | - }, | |
643 | - handleSuccess() { | |
644 | - this.dialogVisible = false; | |
645 | - this._QueryData(); | |
646 | 645 | }, |
647 | 646 | tabChange() { |
648 | 647 | this.tableMaxHeight = this.$refs.main.offsetHeight; | ... | ... |
src/views/standard/setUp/school.vue
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <span>学校设置</span> |
6 | 6 | </template> |
7 | 7 | <template slot="btns" v-if="!code"> |
8 | - <el-tooltip effect="dark" content="导入学校名单" placement="bottom"> | |
8 | + <el-tooltip effect="dark" content="导入班级名单" placement="bottom"> | |
9 | 9 | <el-button |
10 | 10 | type="primary" |
11 | 11 | icon="el-icon-upload2" |
... | ... | @@ -15,6 +15,16 @@ |
15 | 15 | @click="diaUp = true" |
16 | 16 | ></el-button> |
17 | 17 | </el-tooltip> |
18 | + <el-tooltip effect="dark" content="导出班级名单" placement="bottom"> | |
19 | + <el-button | |
20 | + type="primary" | |
21 | + icon="el-icon-download" | |
22 | + size="mini" | |
23 | + plain | |
24 | + circle | |
25 | + @click="exportClazzExl" | |
26 | + ></el-button> | |
27 | + </el-tooltip> | |
18 | 28 | </template> |
19 | 29 | </back-box> |
20 | 30 | <div class="page-content"> |
... | ... | @@ -81,9 +91,14 @@ |
81 | 91 | </div> |
82 | 92 | </div> |
83 | 93 | <el-dialog title="导入学校名单" :visible.sync="diaUp" width="400"> |
84 | - <up-load id="downDevice" :url="url" @upSuccess="upSuccess" fileName="学校名单"> | |
94 | + <up-load | |
95 | + id="downDevice" | |
96 | + :url="url" | |
97 | + @upSuccess="upSuccess" | |
98 | + fileName="学校名单" | |
99 | + > | |
85 | 100 | <p class="down-txt" slot="down"> |
86 | - 通过Excel名单导入学校名单,点击 | |
101 | + 通过Excel导入学校全部班级名单,点击 | |
87 | 102 | <el-link type="danger" @click="downExcel">模板下载</el-link> 。 |
88 | 103 | </p> |
89 | 104 | </up-load> |
... | ... | @@ -230,9 +245,9 @@ export default { |
230 | 245 | }, |
231 | 246 | data() { |
232 | 247 | return { |
233 | - code: "",//长水跳转标志 | |
248 | + code: "", //长水跳转标志 | |
234 | 249 | loading: false, |
235 | - url: "xxx", | |
250 | + url: "/api_html/school/manager/importClassAndStudent", | |
236 | 251 | diaUp: false, |
237 | 252 | diaSchool: false, |
238 | 253 | diaGrade: false, |
... | ... | @@ -246,7 +261,8 @@ export default { |
246 | 261 | tenantName: "", |
247 | 262 | }, |
248 | 263 | tableData: [], |
249 | - formSchool: {//修改学校 | |
264 | + formSchool: { | |
265 | + //修改学校 | |
250 | 266 | sections: "", |
251 | 267 | managePwd: "", |
252 | 268 | contactPerson: "", |
... | ... | @@ -264,7 +280,8 @@ export default { |
264 | 280 | }, |
265 | 281 | ], |
266 | 282 | }, |
267 | - formGrade: {//修改年级 | |
283 | + formGrade: { | |
284 | + //修改年级 | |
268 | 285 | gradeName: "", |
269 | 286 | subjectNames: [], |
270 | 287 | classList: [], |
... | ... | @@ -292,23 +309,26 @@ export default { |
292 | 309 | this._QuerySubject(); |
293 | 310 | }, |
294 | 311 | methods: { |
295 | - upSuccess(){//导入成功 | |
296 | - this.diaUp = false | |
312 | + upSuccess() { | |
313 | + //导入成功 | |
314 | + this.diaUp = false; | |
297 | 315 | this._QueryDataSchool(); |
298 | 316 | this._QueryDataGrade(); |
299 | 317 | }, |
300 | - setGrade(obj) {//打开年级设置 | |
318 | + setGrade(obj) { | |
319 | + //打开年级设置 | |
301 | 320 | this.formGrade.subjectNames = obj.subjectNames; |
302 | 321 | this.formGrade.classList = obj.classList; |
303 | 322 | this.formGrade.gradeName = obj.gradeName; |
304 | 323 | this.showAll = false; |
305 | 324 | this.diaGrade = true; |
306 | 325 | }, |
307 | - addSubjectName() {//添加科目 | |
326 | + addSubjectName() { | |
327 | + //添加科目 | |
308 | 328 | if (!this.subjectName) { |
309 | 329 | this.$message.warning("请填写科目名称"); |
310 | 330 | return; |
311 | - }else if(this.subjectList.includes(this.subjectName)){ | |
331 | + } else if (this.subjectList.includes(this.subjectName)) { | |
312 | 332 | this.$message.warning("科目已存在,请重新填写~"); |
313 | 333 | return; |
314 | 334 | } |
... | ... | @@ -316,7 +336,8 @@ export default { |
316 | 336 | this.formGrade.subjectNames.push(this.subjectName); |
317 | 337 | this.subjectName = ""; |
318 | 338 | }, |
319 | - editSchool() {//保存修改学校信息 | |
339 | + editSchool() { | |
340 | + //保存修改学校信息 | |
320 | 341 | if (!this.formSchool.sections.length) { |
321 | 342 | this.$message.error("请选择学段!"); |
322 | 343 | return; |
... | ... | @@ -349,7 +370,8 @@ export default { |
349 | 370 | } |
350 | 371 | }); |
351 | 372 | }, |
352 | - async editGrade() {//保存修改年级信息 | |
373 | + async editGrade() { | |
374 | + //保存修改年级信息 | |
353 | 375 | if (!this.formGrade.subjectNames.length) { |
354 | 376 | this.$message.error("请选择科目!"); |
355 | 377 | return; |
... | ... | @@ -371,7 +393,8 @@ export default { |
371 | 393 | this.$message.error(info); |
372 | 394 | } |
373 | 395 | }, |
374 | - async _QueryDataSchool() {//学校详情 | |
396 | + async _QueryDataSchool() { | |
397 | + //学校详情 | |
375 | 398 | this.loading = true; |
376 | 399 | const { data, status, info } = await this.$request.schoolDetail(); |
377 | 400 | this.loading = false; |
... | ... | @@ -406,18 +429,29 @@ export default { |
406 | 429 | } |
407 | 430 | }, |
408 | 431 | async downExcel() { |
409 | - let data = await this.$request.downDevice({ | |
410 | - id: this.id, | |
411 | - }); | |
432 | + let data = await this.$request.classAndStudentTemplate(); | |
412 | 433 | if (data && !data.code) { |
413 | 434 | let blob = new Blob([data], { |
414 | 435 | type: "application/vnd.ms-excel;charset=utf-8", |
415 | 436 | }); |
416 | - downloadFile(`设备信息.xlsx`, blob); | |
437 | + downloadFile(`班级名单模版.xlsx`, blob); | |
417 | 438 | } else { |
418 | 439 | this.$message.error(data.info); |
419 | 440 | } |
420 | 441 | }, |
442 | + async exportClazzExl() { | |
443 | + this.loadingDown = true; | |
444 | + let data = await this.$request.exportClassAndStudent(); | |
445 | + this.loadingDown = false; | |
446 | + if (data) { | |
447 | + let blob = new Blob([data], { | |
448 | + type: "application/vnd.ms-excel;charset=utf-8", | |
449 | + }); | |
450 | + downloadFile(`班级名单.xlsx`, blob); | |
451 | + } else { | |
452 | + this.$message.error("下载失败"); | |
453 | + } | |
454 | + }, | |
421 | 455 | }, |
422 | 456 | }; |
423 | 457 | </script> | ... | ... |
src/views/standard/setUp/student.vue
... | ... | @@ -347,19 +347,6 @@ export default { |
347 | 347 | this.diaUp = false; |
348 | 348 | this._QueryData(3); |
349 | 349 | }, |
350 | - async downExcel() { | |
351 | - this.loadingDown = true; | |
352 | - let { data, info, status } = | |
353 | - await this.$request.studentClickerTemplateUrl(); | |
354 | - this.loadingDown = false; | |
355 | - if (status == 0) { | |
356 | - getBlob(data.downloadUrl).then((res) => { | |
357 | - downloadFile("学生答题器绑定模板", res); | |
358 | - }); | |
359 | - } else { | |
360 | - this.$message.error(info); | |
361 | - } | |
362 | - }, | |
363 | 350 | async removeStu(obj, index) { |
364 | 351 | const { data, status, info } = await this.$request.delStudent({ |
365 | 352 | studentId: obj.id, |
... | ... | @@ -470,6 +457,19 @@ export default { |
470 | 457 | this.$message.error(info); |
471 | 458 | } |
472 | 459 | }, |
460 | + async downExcel() { | |
461 | + this.loadingDown = true; | |
462 | + let { data, info, status } = | |
463 | + await this.$request.studentClickerTemplateUrl(); | |
464 | + this.loadingDown = false; | |
465 | + if (status == 0) { | |
466 | + getBlob(data.downloadUrl).then((res) => { | |
467 | + downloadFile("学生答题器绑定模板", res); | |
468 | + }); | |
469 | + } else { | |
470 | + this.$message.error(info); | |
471 | + } | |
472 | + }, | |
473 | 473 | }, |
474 | 474 | }; |
475 | 475 | </script> | ... | ... |
src/views/standard/setUp/teacher.vue
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <span>教师管理</span> |
6 | 6 | </template> |
7 | 7 | <template slot="btns" v-if="!code"> |
8 | - <!-- <el-tooltip effect="dark" content="导入教师名单" placement="bottom"> | |
8 | + <el-tooltip effect="dark" content="导入教师名单" placement="bottom"> | |
9 | 9 | <el-button |
10 | 10 | type="primary" |
11 | 11 | icon="el-icon-upload2" |
... | ... | @@ -14,7 +14,17 @@ |
14 | 14 | circle |
15 | 15 | @click="diaUp = true" |
16 | 16 | ></el-button> |
17 | - </el-tooltip> --> | |
17 | + </el-tooltip> | |
18 | + <el-tooltip effect="dark" content="导出教师名单" placement="bottom"> | |
19 | + <el-button | |
20 | + type="primary" | |
21 | + icon="el-icon-download" | |
22 | + size="mini" | |
23 | + plain | |
24 | + circle | |
25 | + @click="exportTeacherExl" | |
26 | + ></el-button> | |
27 | + </el-tooltip> | |
18 | 28 | <el-tooltip effect="dark" content="添加教师" placement="bottom"> |
19 | 29 | <el-button |
20 | 30 | type="primary" |
... | ... | @@ -217,7 +227,12 @@ |
217 | 227 | </div> |
218 | 228 | </div> |
219 | 229 | <el-dialog title="导入教师名单" :visible.sync="diaUp" width="600"> |
220 | - <up-load id="downTeacher" :url="url" @upSuccess="upSuccess" fileName="教师名单"> | |
230 | + <up-load | |
231 | + id="downTeacher" | |
232 | + :url="url" | |
233 | + @upSuccess="upSuccess" | |
234 | + fileName="教师名单" | |
235 | + > | |
221 | 236 | <p class="down-txt" slot="down"> |
222 | 237 | 通过Excel名单导入教师名单,点击 |
223 | 238 | <el-link type="danger" @click="downExcel">模板下载</el-link> 。 |
... | ... | @@ -300,7 +315,8 @@ |
300 | 315 | > |
301 | 316 | </el-option> |
302 | 317 | </el-select> |
303 | - <el-cascader size="small" | |
318 | + <el-cascader | |
319 | + size="small" | |
304 | 320 | v-if="item.roleId == 6" |
305 | 321 | class="sel-t" |
306 | 322 | collapse |
... | ... | @@ -310,7 +326,8 @@ |
310 | 326 | :options="gradeClassList" |
311 | 327 | :props="{ expandTrigger: 'hover' }" |
312 | 328 | ></el-cascader> |
313 | - <el-cascader size="small" | |
329 | + <el-cascader | |
330 | + size="small" | |
314 | 331 | v-if="item.roleId == 7" |
315 | 332 | class="sel-t" |
316 | 333 | collapse |
... | ... | @@ -320,7 +337,8 @@ |
320 | 337 | :options="classList" |
321 | 338 | :props="{ expandTrigger: 'hover' }" |
322 | 339 | ></el-cascader> |
323 | - <el-cascader size="small" | |
340 | + <el-cascader | |
341 | + size="small" | |
324 | 342 | v-if="item.roleId == 8" |
325 | 343 | class="sel-t" |
326 | 344 | collapse |
... | ... | @@ -346,13 +364,13 @@ |
346 | 364 | </template> |
347 | 365 | |
348 | 366 | <script> |
349 | -import { downloadFile, formatGradeClass, randomWord } from "@/utils"; | |
367 | +import { downloadFile, formatGradeClass, randomWord, getBlob } from "@/utils"; | |
350 | 368 | export default { |
351 | 369 | data() { |
352 | 370 | return { |
353 | 371 | code: "", |
354 | 372 | loading: false, |
355 | - url: "", | |
373 | + url: "/api_html/school/manager/importTeacher", | |
356 | 374 | diaUp: false, |
357 | 375 | diaTeacher: false, |
358 | 376 | isAdd: false, |
... | ... | @@ -423,8 +441,9 @@ export default { |
423 | 441 | await this._QueryClass(); |
424 | 442 | }, |
425 | 443 | methods: { |
426 | - upSuccess(){//导入成功 | |
427 | - this.diaUp = false | |
444 | + upSuccess() { | |
445 | + //导入成功 | |
446 | + this.diaUp = false; | |
428 | 447 | this._QueryData(10); |
429 | 448 | }, |
430 | 449 | addRoleList() { |
... | ... | @@ -494,7 +513,6 @@ export default { |
494 | 513 | ...obj, |
495 | 514 | }); |
496 | 515 | } else { |
497 | - | |
498 | 516 | res = await this.$request.updateTeacher({ |
499 | 517 | teacherId: this.formTeacher.id, |
500 | 518 | teacherName: this.formTeacher.teacherName, |
... | ... | @@ -626,7 +644,7 @@ export default { |
626 | 644 | //角色 |
627 | 645 | const { data, status, info } = await this.$request.delTeacherManager({ |
628 | 646 | teacherId: obj.teacherId, |
629 | - ...query | |
647 | + ...query, | |
630 | 648 | }); |
631 | 649 | if (status === 0) { |
632 | 650 | this._QueryData(10); |
... | ... | @@ -755,16 +773,27 @@ export default { |
755 | 773 | } |
756 | 774 | }, |
757 | 775 | async downExcel() { |
758 | - let data = await this.$request.downDevice({ | |
759 | - id: this.id, | |
760 | - }); | |
761 | - if (data && !data.code) { | |
776 | + let { data, status, info } = await this.$request.teacherTemplate(); | |
777 | + debugger; | |
778 | + if (status == 0) { | |
779 | + getBlob(data.downloadUrl).then((res) => { | |
780 | + downloadFile("教师名单模板", res); | |
781 | + }); | |
782 | + } else { | |
783 | + this.$message.error(info); | |
784 | + } | |
785 | + }, | |
786 | + async exportTeacherExl() { | |
787 | + this.loadingDown = true; | |
788 | + let data = await this.$request.exportTeacher(); | |
789 | + this.loadingDown = false; | |
790 | + if (data) { | |
762 | 791 | let blob = new Blob([data], { |
763 | 792 | type: "application/vnd.ms-excel;charset=utf-8", |
764 | 793 | }); |
765 | 794 | downloadFile(`教师名单.xlsx`, blob); |
766 | 795 | } else { |
767 | - this.$message.error(data.info); | |
796 | + this.$message.error("下载失败"); | |
768 | 797 | } |
769 | 798 | }, |
770 | 799 | }, | ... | ... |
src/views/standard/test/analysis.vue
1 | 1 | <template> |
2 | - <div ref="main" class="page-container" :class="dialogVisible ? 'active' : ''"> | |
2 | + <div ref="main" class="page-container"> | |
3 | 3 | <back-box> |
4 | 4 | <template slot="title"> |
5 | 5 | <span>单卷分析</span> |
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | >作答明细表</span |
54 | 54 | > |
55 | 55 | </div> |
56 | - <div class="table-box" v-loading="loading"> | |
56 | + <div id="print-content" class="table-box" v-loading="loading"> | |
57 | 57 | <el-table |
58 | 58 | :max-height="tableMaxHeight" |
59 | 59 | v-show="type == 1" |
... | ... | @@ -131,15 +131,19 @@ |
131 | 131 | :label="item.title" |
132 | 132 | :prop="'count' + index" |
133 | 133 | align="center" |
134 | - ><template slot-scope="scope"><p class="persent">{{ | |
135 | - scope.row.questionType == "5" | |
136 | - ? "" | |
137 | - : scope.row["option" + index] | |
138 | - ? `${scope.row["option" + index]}(${ | |
139 | - scope.row["persent" + index] | |
140 | - })` | |
141 | - : "" | |
142 | - }}</p></template> | |
134 | + ><template slot-scope="scope" | |
135 | + ><p class="persent"> | |
136 | + {{ | |
137 | + scope.row.questionType == "5" | |
138 | + ? "" | |
139 | + : scope.row["option" + index] | |
140 | + ? `${scope.row["option" + index]}(${ | |
141 | + scope.row["persent" + index] | |
142 | + })` | |
143 | + : "" | |
144 | + }} | |
145 | + </p></template | |
146 | + > | |
143 | 147 | </el-table-column> |
144 | 148 | </el-table> |
145 | 149 | <div class="hui-box" v-show="type == 1"> |
... | ... | @@ -340,9 +344,7 @@ |
340 | 344 | :label="'Q' + item.id" |
341 | 345 | > |
342 | 346 | <template slot-scope="scope"> |
343 | - <span | |
344 | - v-if="tableData[index]?.questionType==5" | |
345 | - >*</span> | |
347 | + <span v-if="tableData[index]?.questionType == 5">*</span> | |
346 | 348 | <span |
347 | 349 | v-else-if="scope.row['answer' + item.id]" |
348 | 350 | :class="scope.row['isRight' + item.id] ? '' : 'error'" |
... | ... | @@ -352,11 +354,14 @@ |
352 | 354 | <span |
353 | 355 | v-else |
354 | 356 | :class="scope.row['questionType' + item.id] == 5 ? '' : 'error'" |
355 | - >-</span> | |
357 | + >-</span | |
358 | + > | |
356 | 359 | </template> |
357 | 360 | </el-table-column> |
358 | 361 | </el-table> |
359 | - <div class="down"> | |
362 | + </div> | |
363 | + <div class="down"> | |
364 | + <div> | |
360 | 365 | <el-button |
361 | 366 | @click="exportData" |
362 | 367 | type="primary" |
... | ... | @@ -365,33 +370,32 @@ |
365 | 370 | icon="fa fa-cloud-download" |
366 | 371 | >导出报表</el-button |
367 | 372 | > |
368 | - <div> | |
369 | - <el-button | |
370 | - v-if="examReport.subjectiveScore != 0" | |
371 | - @click="diaUp = true" | |
372 | - type="primary" | |
373 | - round | |
374 | - v-loading="exportLoading" | |
375 | - >导入主观题分数</el-button | |
376 | - > | |
377 | - <el-button | |
378 | - @click="edit" | |
379 | - type="primary" | |
380 | - v-if="examReport.subjectiveScore != examReport.examPaperScore" | |
381 | - round | |
382 | - >修改答案</el-button | |
383 | - > | |
384 | - </div> | |
373 | + <el-button | |
374 | + @click="print" | |
375 | + type="primary" | |
376 | + plain | |
377 | + round | |
378 | + icon="el-icon-printer" | |
379 | + >打印</el-button | |
380 | + > | |
381 | + </div> | |
382 | + <div> | |
383 | + <el-button | |
384 | + v-if="examReport.subjectiveScore != 0" | |
385 | + @click="diaUp = true" | |
386 | + type="primary" | |
387 | + round | |
388 | + v-loading="exportLoading" | |
389 | + >导入主观题分数</el-button | |
390 | + > | |
391 | + <el-button | |
392 | + @click="edit" | |
393 | + type="primary" | |
394 | + v-if="examReport.subjectiveScore != examReport.examPaperScore" | |
395 | + round | |
396 | + >查看题目</el-button | |
397 | + > | |
385 | 398 | </div> |
386 | - </div> | |
387 | - <div class="edit-dia" v-show="dialogVisible" height="100%"> | |
388 | - <editAnswer | |
389 | - ref="editAnswer" | |
390 | - :title="title" | |
391 | - :score="score" | |
392 | - @cancel="cancel" | |
393 | - @saveSuccess="saveSuccess" | |
394 | - /> | |
395 | 399 | </div> |
396 | 400 | <el-dialog title="导入主观题分数" :visible.sync="diaUp" width="600"> |
397 | 401 | <up-load |
... | ... | @@ -417,17 +421,14 @@ |
417 | 421 | </template> |
418 | 422 | |
419 | 423 | <script> |
420 | -import { downloadFile } from "@/utils"; | |
421 | -import editAnswer from "./editAnswer.vue"; | |
424 | +import { downloadFile, tablePrint } from "@/utils"; | |
422 | 425 | export default { |
423 | - components: { editAnswer }, | |
424 | 426 | data() { |
425 | 427 | return { |
426 | 428 | tableMaxHeight: 600, |
427 | 429 | loading: false, |
428 | 430 | exportLoading: false, |
429 | 431 | diaUp: false, |
430 | - dialogVisible: false, | |
431 | 432 | url: "/api_html/teaching/importSubjectiveScore", |
432 | 433 | id: "", |
433 | 434 | title: "", |
... | ... | @@ -466,10 +467,12 @@ export default { |
466 | 467 | created() { |
467 | 468 | this.id = this.$route.query.id; |
468 | 469 | this.title = this.$route.query.title || ""; |
469 | - this.score = this.$route.query.score || ""; | |
470 | 470 | this._QueryData(); |
471 | 471 | }, |
472 | 472 | methods: { |
473 | + print() { | |
474 | + tablePrint("print-content"); | |
475 | + }, | |
473 | 476 | upSuccess() { |
474 | 477 | //导入成功 |
475 | 478 | this.diaUp = false; |
... | ... | @@ -499,15 +502,14 @@ export default { |
499 | 502 | return tit; |
500 | 503 | }, |
501 | 504 | edit() { |
502 | - this.$refs.editAnswer.edit(this.id); | |
503 | - this.dialogVisible = true; | |
504 | - }, | |
505 | - cancel() { | |
506 | - this.dialogVisible = false; | |
507 | - }, | |
508 | - saveSuccess() { | |
509 | - this.dialogVisible = false; | |
510 | - this._QueryData(); | |
505 | + this.$router.push({ | |
506 | + path: "/examinationPaperEdit", | |
507 | + query: { | |
508 | + paperId: this.id, | |
509 | + title: this.title, | |
510 | + type: 2, | |
511 | + }, | |
512 | + }); | |
511 | 513 | }, |
512 | 514 | changePage(page) { |
513 | 515 | this.page = page; |
... | ... | @@ -568,7 +570,9 @@ export default { |
568 | 570 | } |
569 | 571 | detail.map((items, index) => { |
570 | 572 | params["que" + items.id] = items.id; |
571 | - params["score" + items.id] = String(items.score).includes('.')?Number(items.score).toFixed(2):items.score; | |
573 | + params["score" + items.id] = String(items.score).includes(".") | |
574 | + ? Number(items.score).toFixed(2) | |
575 | + : items.score; | |
572 | 576 | params["answer" + items.id] = |
573 | 577 | items.answer == 1 ? "✓" : items.answer == 2 ? "✗" : items.answer; |
574 | 578 | params["isRight" + items.id] = items.isRight; |
... | ... | @@ -608,13 +612,17 @@ export default { |
608 | 612 | let defaultArr = detail?.filter((item) => { |
609 | 613 | return item.option != "未答"; |
610 | 614 | }); |
611 | - | |
615 | + | |
612 | 616 | optionsList.map((items, index) => { |
613 | 617 | if (index != 4) { |
614 | 618 | params["count" + index] = |
615 | - defaultArr[index]?.option != "未答" ? defaultArr[index]?.count : ""; | |
619 | + defaultArr[index]?.option != "未答" | |
620 | + ? defaultArr[index]?.count | |
621 | + : ""; | |
616 | 622 | params["persent" + index] = |
617 | - defaultArr[index]?.option != "未答" ? defaultArr[index]?.persent : ""; | |
623 | + defaultArr[index]?.option != "未答" | |
624 | + ? defaultArr[index]?.persent | |
625 | + : ""; | |
618 | 626 | params["option" + index] = |
619 | 627 | defaultArr[index]?.option != "未答" |
620 | 628 | ? defaultArr[index]?.option == 1 |
... | ... | @@ -651,17 +659,14 @@ export default { |
651 | 659 | if (this.exportLoading == true) return; |
652 | 660 | this.exportLoading = true; |
653 | 661 | const data = await this.$request.exportExamReport({ |
654 | - examId:this.id | |
662 | + examId: this.id, | |
655 | 663 | }); |
656 | 664 | this.exportLoading = false; |
657 | 665 | if (data) { |
658 | - let blob = new Blob([data], { | |
666 | + let blob = new Blob([data], { | |
659 | 667 | type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", |
660 | 668 | }); |
661 | - downloadFile( | |
662 | - "即时测-单卷测练报表.xlsx", | |
663 | - blob | |
664 | - ); | |
669 | + downloadFile("即时测-单卷测练报表.xlsx", blob); | |
665 | 670 | } else { |
666 | 671 | this.$message.error("下载失败"); |
667 | 672 | } |
... | ... | @@ -715,7 +720,7 @@ div::-webkit-scrollbar-thumb { |
715 | 720 | z-index: 10; |
716 | 721 | } |
717 | 722 | } |
718 | -.persent{ | |
723 | +.persent { | |
719 | 724 | white-space: nowrap; |
720 | 725 | } |
721 | 726 | .error { | ... | ... |
src/views/standard/test/editAnswer.vue deleted
1 | -<template> | |
2 | - <div> | |
3 | - <div class="back"> | |
4 | - <div class="back-l" @click="cancel"> | |
5 | - <i class="fa fa-mail-reply-all"></i> | |
6 | - <p>修改答案</p> | |
7 | - </div> | |
8 | - </div> | |
9 | - <div class="form-box"> | |
10 | - <div class="answer-title"> | |
11 | - <p class="name">{{ title }}</p> | |
12 | - <p class="totals">卷面总分:{{ score }}分</p> | |
13 | - </div> | |
14 | - <div v-if="questionList && questionList.length"> | |
15 | - <template v-if="questionList[0].subQuestions"> | |
16 | - <div v-for="(question, index) in questionList" :key="index"> | |
17 | - <p class="question-title"> | |
18 | - <span>{{ setBigNum(index) }}、</span> | |
19 | - <span class="title-txt">{{ question.questionTitle }}</span> | |
20 | - <span>共 {{ question.score }} 分</span> | |
21 | - </p> | |
22 | - <ul class="questions-ul"> | |
23 | - <li class="sub-questions"> | |
24 | - <div class="qs-num">题号</div> | |
25 | - <div class="qs-type">题型</div> | |
26 | - <div class="qs-score">分数</div> | |
27 | - <div class="qs-partScore">漏选得分</div> | |
28 | - <div class="qs-options qs-options2">选项设置</div> | |
29 | - </li> | |
30 | - <li | |
31 | - v-for="(subQuestions, indexs) in question.subQuestions" | |
32 | - :key="indexs" | |
33 | - > | |
34 | - <p | |
35 | - class="set-ans-btn" | |
36 | - v-if=" | |
37 | - subQuestions.qusType && | |
38 | - subQuestions.subNum && | |
39 | - subQuestions.subNum > 4 | |
40 | - " | |
41 | - > | |
42 | - <el-button type="primary" @click="setFormAns(indexs, index)" | |
43 | - >批量设置答案</el-button | |
44 | - > | |
45 | - </p> | |
46 | - <div v-else class="sub-questions"> | |
47 | - <div class="qs-num">{{ subQuestions.questionIndex }}</div> | |
48 | - <div class="qs-type"> | |
49 | - {{ setSubPro(subQuestions.questionType) }} | |
50 | - </div> | |
51 | - <div class="qs-score"> | |
52 | - {{ subQuestions.score }} | |
53 | - </div> | |
54 | - <div class="qs-partScore"> | |
55 | - <p v-if="subQuestions.questionType != 3">--</p> | |
56 | - <el-input-number | |
57 | - class="number-ipt" | |
58 | - v-else | |
59 | - size="medium" | |
60 | - :min="0" | |
61 | - :precision="2" | |
62 | - :max="subQuestions.score" | |
63 | - :step="0.5" | |
64 | - v-model="subQuestions.partScore" | |
65 | - label="漏选得分" | |
66 | - ></el-input-number> | |
67 | - </div> | |
68 | - <div class="qs-options qs-options2"> | |
69 | - <p v-if="subQuestions.questionType == 5">--</p> | |
70 | - <p v-if="subQuestions.questionType == 4" class="answer-box"> | |
71 | - <span | |
72 | - class="answer-s" | |
73 | - :class="subQuestions.correctAnswer == 1 ? 'active' : ''" | |
74 | - @click="subQuestions.correctAnswer = 1" | |
75 | - >✓</span | |
76 | - > | |
77 | - <span | |
78 | - class="answer-s" | |
79 | - :class="subQuestions.correctAnswer == 2 ? 'active' : ''" | |
80 | - @click="subQuestions.correctAnswer = 2" | |
81 | - >✗</span | |
82 | - > | |
83 | - </p> | |
84 | - <p v-if="subQuestions.questionType == 3" class="answer-box"> | |
85 | - <template | |
86 | - v-for="option in subQuestions.answerOptions.split(',')" | |
87 | - > | |
88 | - <span | |
89 | - v-if="option" | |
90 | - class="answer-s" | |
91 | - :class=" | |
92 | - subQuestions.correctAnswer.includes(option) | |
93 | - ? 'active' | |
94 | - : '' | |
95 | - " | |
96 | - :key="option" | |
97 | - @click="changAnswer(subQuestions, option)" | |
98 | - >{{ option }}</span | |
99 | - > | |
100 | - </template> | |
101 | - </p> | |
102 | - <p v-if="subQuestions.questionType == 2" class="answer-box"> | |
103 | - <template | |
104 | - v-for="option in subQuestions.answerOptions.split(',')" | |
105 | - > | |
106 | - <span | |
107 | - class="answer-s" | |
108 | - v-if="option" | |
109 | - :class=" | |
110 | - subQuestions.correctAnswer == option ? 'active' : '' | |
111 | - " | |
112 | - :key="option" | |
113 | - @click="subQuestions.correctAnswer = option" | |
114 | - >{{ option }}</span | |
115 | - > | |
116 | - </template> | |
117 | - </p> | |
118 | - </div> | |
119 | - </div> | |
120 | - </li> | |
121 | - </ul> | |
122 | - </div> | |
123 | - </template> | |
124 | - <ul class="questions-ul" v-else> | |
125 | - <li class="sub-questions"> | |
126 | - <div class="qs-num">题号</div> | |
127 | - <div class="qs-type">题型</div> | |
128 | - <div class="qs-score">分数</div> | |
129 | - <div class="qs-partScore">漏选得分</div> | |
130 | - <div class="qs-options qs-options2">选项设置</div> | |
131 | - </li> | |
132 | - <li v-for="(subQuestions, indexs) in questionList" :key="indexs"> | |
133 | - <p | |
134 | - class="set-ans-btn" | |
135 | - v-if=" | |
136 | - subQuestions.qusType && | |
137 | - subQuestions.subNum && | |
138 | - subQuestions.subNum > 4 | |
139 | - " | |
140 | - > | |
141 | - <el-button type="primary" @click="setFormAns(indexs)" | |
142 | - >批量设置答案</el-button | |
143 | - > | |
144 | - </p> | |
145 | - <div v-else class="sub-questions"> | |
146 | - <div class="qs-num">{{ subQuestions.questionIndex }}</div> | |
147 | - <div class="qs-type"> | |
148 | - {{ setSubPro(subQuestions.questionType) }} | |
149 | - </div> | |
150 | - <div class="qs-score"> | |
151 | - {{ subQuestions.score }} | |
152 | - </div> | |
153 | - <div class="qs-partScore"> | |
154 | - <p v-if="subQuestions.questionType != 3">--</p> | |
155 | - <el-input-number | |
156 | - class="number-ipt" | |
157 | - v-else | |
158 | - size="medium" | |
159 | - :min="0" | |
160 | - :precision="2" | |
161 | - :max="subQuestions.score" | |
162 | - :step="0.5" | |
163 | - v-model="subQuestions.partScore" | |
164 | - label="漏选得分" | |
165 | - ></el-input-number> | |
166 | - </div> | |
167 | - <div class="qs-options qs-options2"> | |
168 | - <p v-if="subQuestions.questionType == 5">--</p> | |
169 | - <p v-if="subQuestions.questionType == 4" class="answer-box"> | |
170 | - <span | |
171 | - class="answer-s" | |
172 | - :class="subQuestions.correctAnswer == 1 ? 'active' : ''" | |
173 | - @click="subQuestions.correctAnswer = 1" | |
174 | - >✓</span | |
175 | - > | |
176 | - <span | |
177 | - class="answer-s" | |
178 | - :class="subQuestions.correctAnswer == 2 ? 'active' : ''" | |
179 | - @click="subQuestions.correctAnswer = 2" | |
180 | - >✗</span | |
181 | - > | |
182 | - </p> | |
183 | - <p v-if="subQuestions.questionType == 3" class="answer-box"> | |
184 | - <template | |
185 | - v-for="option in subQuestions.answerOptions.split(',')" | |
186 | - > | |
187 | - <span | |
188 | - v-if="option" | |
189 | - class="answer-s" | |
190 | - :class=" | |
191 | - subQuestions.correctAnswer.includes(option) | |
192 | - ? 'active' | |
193 | - : '' | |
194 | - " | |
195 | - :key="option" | |
196 | - @click="changAnswer(subQuestions, option)" | |
197 | - >{{ option }}</span | |
198 | - > | |
199 | - </template> | |
200 | - </p> | |
201 | - <p v-if="subQuestions.questionType == 2" class="answer-box"> | |
202 | - <template | |
203 | - v-for="option in subQuestions.answerOptions.split(',')" | |
204 | - > | |
205 | - <span | |
206 | - class="answer-s" | |
207 | - v-if="option" | |
208 | - :class=" | |
209 | - subQuestions.correctAnswer == option ? 'active' : '' | |
210 | - " | |
211 | - :key="option" | |
212 | - @click="subQuestions.correctAnswer = option" | |
213 | - >{{ option }}</span | |
214 | - > | |
215 | - </template> | |
216 | - </p> | |
217 | - </div> | |
218 | - </div> | |
219 | - </li> | |
220 | - </ul> | |
221 | - </div> | |
222 | - <div class="btn-box"> | |
223 | - <el-button type="danger" plain round @click="cancel">取消</el-button> | |
224 | - <el-button type="primary" round @click="saveAnswer">保存</el-button> | |
225 | - </div> | |
226 | - </div> | |
227 | - <el-dialog | |
228 | - title="批量设置答案" | |
229 | - :close-on-click-modal="false" | |
230 | - :visible.sync="diaSetAns" | |
231 | - width="400" | |
232 | - :modal-append-to-body="false" | |
233 | - > | |
234 | - <div class="qs-options"> | |
235 | - <p class="dia-tips"> | |
236 | - 请点击选项按钮设置答案,多选题题目之间用“,”隔开,若添加5道题:“AC,AD,BD,AC,CD” | |
237 | - </p> | |
238 | - <p>{{ setSubPro(formAns.qusType) }}:</p> | |
239 | - <p class="ipt"> | |
240 | - <el-input | |
241 | - ref="formAnsIpt" | |
242 | - v-if="formAns.qusType == 2 || formAns.qusType == 3" | |
243 | - v-model="formAns.answerList" | |
244 | - @keydown.native="keydownAnswer($event, formAns.qusType)" | |
245 | - @input="setAllAnswer($event, formAns.qusType)" | |
246 | - ></el-input> | |
247 | - <el-input | |
248 | - v-if="formAns.qusType == 4" | |
249 | - v-model="formAns.answerList" | |
250 | - readonly="" | |
251 | - ></el-input> | |
252 | - </p> | |
253 | - <p class="answer-box"> | |
254 | - <template v-if="formAns.qusType == 4"> | |
255 | - <span | |
256 | - class="answer-s active" | |
257 | - @click=" | |
258 | - formAns.answerList.length < formAns.subNum | |
259 | - ? (formAns.answerList += '✓') | |
260 | - : '' | |
261 | - " | |
262 | - >✓</span | |
263 | - > | |
264 | - <span | |
265 | - class="answer-s active" | |
266 | - @click=" | |
267 | - formAns.answerList.length < formAns.subNum | |
268 | - ? (formAns.answerList += '✗') | |
269 | - : '' | |
270 | - " | |
271 | - >✗</span | |
272 | - > | |
273 | - </template> | |
274 | - <template v-if="formAns.qusType == 3"> | |
275 | - <span | |
276 | - class="answer-s active" | |
277 | - v-for="option in formAns.answerOptions.split(',')" | |
278 | - :key="option" | |
279 | - @click="setMultiple(formAns, option)" | |
280 | - >{{ option }}</span | |
281 | - > | |
282 | - <span | |
283 | - class="answer-s active" | |
284 | - @click="setMultiple(formAns, ',')" | |
285 | - >,</span | |
286 | - > | |
287 | - </template> | |
288 | - <template v-if="formAns.qusType == 2"> | |
289 | - <span | |
290 | - class="answer-s active" | |
291 | - v-for="option in formAns.answerOptions.split(',')" | |
292 | - :key="option" | |
293 | - @click=" | |
294 | - formAns.answerList.length < formAns.subNum | |
295 | - ? (formAns.answerList += option) | |
296 | - : '' | |
297 | - " | |
298 | - >{{ option }}</span | |
299 | - > | |
300 | - </template> | |
301 | - <span | |
302 | - class="answer-s delButton" | |
303 | - @click="formAns.answerList = formAns.answerList.slice(0, -1)" | |
304 | - >x</span | |
305 | - > | |
306 | - <span class="answer-s ac" @click="formAns.answerList = ''">ac</span> | |
307 | - </p> | |
308 | - </div> | |
309 | - <div class="dialog-footer" slot="footer"> | |
310 | - <el-button @click="saveFormAns">确 定</el-button> | |
311 | - <el-button @click="diaSetAns = false">取 消</el-button> | |
312 | - </div> | |
313 | - </el-dialog> | |
314 | - </div> | |
315 | -</template> | |
316 | - | |
317 | -<script> | |
318 | -import { deepClone, checkAnswer } from "utils"; | |
319 | -export default { | |
320 | - props: { | |
321 | - title: "", | |
322 | - score: "", | |
323 | - }, | |
324 | - watch: { | |
325 | - // id: { | |
326 | - // handler: function (val) { | |
327 | - // if (val) { | |
328 | - // this.edit(); | |
329 | - // } | |
330 | - // }, | |
331 | - // immediate: true, | |
332 | - // }, | |
333 | - }, | |
334 | - data() { | |
335 | - return { | |
336 | - id: "", | |
337 | - diaSetAns: false, | |
338 | - form: {}, | |
339 | - questionList: [], | |
340 | - formAns: { | |
341 | - listIndex: 0, //大题位置 | |
342 | - endIndex: 0, //相同题目最后一位题目的questionIndex | |
343 | - index:0, | |
344 | - qusType: "", //题目类型 | |
345 | - subNum: 0, //数量 | |
346 | - answerOptions: [], //答案选项 | |
347 | - answerList: "", //答案列表-字符串 | |
348 | - }, | |
349 | - }; | |
350 | - }, | |
351 | - created() { | |
352 | - // this.edit(); | |
353 | - }, | |
354 | - methods: { | |
355 | - cancel() { | |
356 | - this.$emit("cancel"); | |
357 | - }, | |
358 | - setSubPro(type) { | |
359 | - let tit; | |
360 | - switch (type) { | |
361 | - case 2: | |
362 | - tit = "单选题"; | |
363 | - break; | |
364 | - case 3: | |
365 | - tit = "多选题"; | |
366 | - break; | |
367 | - case 4: | |
368 | - tit = "判断题"; | |
369 | - break; | |
370 | - case 5: | |
371 | - tit = "主观题"; | |
372 | - break; | |
373 | - } | |
374 | - return tit; | |
375 | - }, | |
376 | - setBigNum(num) {//转题号格式 | |
377 | - let txt = ""; | |
378 | - let bigNum = [ | |
379 | - "一", | |
380 | - "二", | |
381 | - "三", | |
382 | - "四", | |
383 | - "五", | |
384 | - "六", | |
385 | - "七", | |
386 | - "八", | |
387 | - "九", | |
388 | - "十", | |
389 | - "十一", | |
390 | - "十二", | |
391 | - "十三", | |
392 | - "十四", | |
393 | - "十五", | |
394 | - "十六", | |
395 | - "十七", | |
396 | - "十八", | |
397 | - "十九", | |
398 | - "二十", | |
399 | - ]; | |
400 | - txt = bigNum[num]; | |
401 | - | |
402 | - return txt; | |
403 | - }, | |
404 | - keydownAnswer(event, type) { | |
405 | - let answerA = "ABCDEFG"; | |
406 | - let answer_a = "abcdefg"; | |
407 | - answerA = answerA.substring(0, this.formAns.subNum); | |
408 | - answer_a = answer_a.substring(0, this.formAns.subNum); | |
409 | - answerA += answer_a; | |
410 | - answerA = type == 2 ? answerA : answerA + ","; | |
411 | - if ( | |
412 | - event.key == "Meta" || | |
413 | - event.key == "CapsLock" || | |
414 | - event.key == "Shift" || | |
415 | - event.key == "Enter" || | |
416 | - event.key == "Alt" || | |
417 | - event.key == "Backspace" || | |
418 | - event.key == "Delete" || | |
419 | - event.key == "ArrowUp" || | |
420 | - event.key == "ArrowDown" || | |
421 | - event.key == "ArrowLeft" || | |
422 | - event.key == "v" || | |
423 | - event.key == "V" || | |
424 | - event.key == "ArrowRight" | |
425 | - ) | |
426 | - return; | |
427 | - if (!answerA.includes(event.key)) { | |
428 | - event.returnValue = ""; | |
429 | - } | |
430 | - }, | |
431 | - setAllAnswer(event, type) {//批量设置答案输入格式化答案 | |
432 | - let str = this.formAns.answerList; | |
433 | - let str2 = checkAnswer( | |
434 | - str, | |
435 | - type, | |
436 | - this.formAns.answerOptions.split(",").length, | |
437 | - this.formAns.subNum | |
438 | - ); | |
439 | - this.formAns.answerList = str2; | |
440 | - }, | |
441 | - setAnswer(type, ans) {//答案显示格式 | |
442 | - let txt = ""; | |
443 | - if (type == 2) { | |
444 | - txt = ans; | |
445 | - } else if (type == 3) { | |
446 | - txt = ans + ","; | |
447 | - } else if (type == 4) { | |
448 | - txt = ans == 1 ? "✓" : ans == 2 ? "✗" : ""; | |
449 | - } | |
450 | - return txt; | |
451 | - }, | |
452 | - insertTxtAndSetcursor(answerList, str) {//调整重新设置答案后的光标位置 | |
453 | - let element = this.$refs.formAnsIpt.$el.children[0]; // 获取到指定标签 | |
454 | - let startPos = element.selectionStart; // 获取光标开始的位置 | |
455 | - if (startPos === undefined) { | |
456 | - // 如果没有光标位置 不操作 | |
457 | - return answerList; | |
458 | - } else { | |
459 | - return { | |
460 | - text: | |
461 | - answerList.substring(0, startPos) + | |
462 | - str + | |
463 | - answerList.substring(startPos), // 将文本插入 | |
464 | - startPos: startPos + str.length, | |
465 | - }; | |
466 | - } | |
467 | - }, | |
468 | - setMultiple(obj, answer) { //多选答案设置 | |
469 | - let resault = this.insertTxtAndSetcursor(obj.answerList || "", answer); | |
470 | - obj.answerList = resault.text; | |
471 | - let str = obj.answerList; | |
472 | - let str2 = checkAnswer( | |
473 | - str, | |
474 | - 3, | |
475 | - obj.answerOptions.split(",").length, | |
476 | - obj.subNum | |
477 | - ); | |
478 | - obj.answerList = str2; | |
479 | - this.$refs.formAnsIpt.$el.children[0].focus(); | |
480 | - this.$refs.formAnsIpt.$el.children[0].selectionStart = resault.startPos; | |
481 | - }, | |
482 | - changAnswer(sub, option) {//设置多选答案 | |
483 | - let str = new RegExp(option, "g"); | |
484 | - if (sub.correctAnswer?.includes(option)) { | |
485 | - sub.correctAnswer = sub.correctAnswer.replace(str, ""); | |
486 | - } else { | |
487 | - let arrs = (sub.correctAnswer && sub.correctAnswer.split("")) || []; | |
488 | - arrs.push(option); | |
489 | - sub.correctAnswer = arrs.sort().join(""); | |
490 | - } | |
491 | - }, | |
492 | - setFormAns(indexs, index) {//初始化要修改的答案 | |
493 | - if (this.questionList[0].subQuestions) { | |
494 | - this.formAns = { ...this.questionList[index].subQuestions[indexs] }; | |
495 | - this.formAns.listIndex = index; | |
496 | - let startIndex = (this.formAns.index+1) - this.formAns.subNum;//批量设置答案开始位置 | |
497 | - let answerList = ""; | |
498 | - this.questionList[index].subQuestions.map((item, subIdx) => { | |
499 | - if (subIdx >= startIndex) { | |
500 | - answerList += this.setAnswer(item.questionType, item.correctAnswer); | |
501 | - if (subIdx != indexs) { | |
502 | - if (!!item.qusType) { | |
503 | - answerList = ""; | |
504 | - } | |
505 | - } else { | |
506 | - if (item.qusType == 3) { | |
507 | - answerList = answerList.slice(0, -1); | |
508 | - } | |
509 | - this.formAns.answerList = answerList; | |
510 | - } | |
511 | - } | |
512 | - }); | |
513 | - } else { | |
514 | - this.formAns = { ...this.questionList[indexs] }; | |
515 | - this.formAns.listIndex = indexs; | |
516 | - let startIndex = this.formAns.endIndex - this.formAns.subNum; | |
517 | - let answerList = ""; | |
518 | - this.questionList[index].map((item, subIdx) => { | |
519 | - if (subIdx >= startIndex) { | |
520 | - answerList += this.setAnswer(item.questionType, item.correctAnswer); | |
521 | - if (subIdx != indexs) { | |
522 | - if (!!item.qusType) { | |
523 | - answerList = ""; | |
524 | - } | |
525 | - } else { | |
526 | - if (item.qusType == 3) { | |
527 | - answerList = answerList.slice(0, -1); | |
528 | - } | |
529 | - this.formAns.answerList = answerList; | |
530 | - } | |
531 | - } | |
532 | - }); | |
533 | - } | |
534 | - this.diaSetAns = true; | |
535 | - }, | |
536 | - saveFormAns() { | |
537 | - //批量修改答案 | |
538 | - let EndIndex; | |
539 | - let subNum = this.formAns.subNum - 1; | |
540 | - if (this.questionList[this.formAns.listIndex].subQuestions) { | |
541 | - this.questionList[this.formAns.listIndex].subQuestions.some( | |
542 | - (item, index) => { | |
543 | - if (this.formAns.endIndex == item.questionIndex) { | |
544 | - EndIndex = index; | |
545 | - return; | |
546 | - } | |
547 | - } | |
548 | - ); | |
549 | - } else { | |
550 | - this.questionList.some((item, index) => { | |
551 | - if (this.formAns.endIndex == item.questionIndex) { | |
552 | - EndIndex = index; | |
553 | - return; | |
554 | - } | |
555 | - }); | |
556 | - } | |
557 | - | |
558 | - for (let i = 0; i <= subNum; i++) { | |
559 | - let correctAnswer = ""; | |
560 | - if (this.formAns.qusType == 2) { | |
561 | - correctAnswer = this.formAns.answerList[subNum - i] || ""; | |
562 | - } else if (this.formAns.qusType == 3) { | |
563 | - correctAnswer = this.formAns.answerList.split(",")[subNum - i] || ""; | |
564 | - } else if (this.formAns.qusType == 4) { | |
565 | - correctAnswer = | |
566 | - this.formAns.answerList[subNum - i] == "✓" | |
567 | - ? 1 | |
568 | - : this.formAns.answerList[subNum - i] == "✗" | |
569 | - ? 2 | |
570 | - : ""; | |
571 | - } | |
572 | - if (this.questionList[0].subQuestions) { | |
573 | - this.questionList[this.formAns.listIndex].subQuestions[ | |
574 | - EndIndex - i | |
575 | - ].correctAnswer = correctAnswer; | |
576 | - } else { | |
577 | - this.questionList[EndIndex - i].correctAnswer = correctAnswer; | |
578 | - } | |
579 | - } | |
580 | - this.diaSetAns = false; | |
581 | - }, | |
582 | - async edit(id) { | |
583 | - //修改答案 | |
584 | - this.id = id; | |
585 | - const { data, status, info } = await this.$request.examQuestionList({ | |
586 | - examId: id, | |
587 | - }); | |
588 | - if (status == 0) { | |
589 | - this.questionList = deepClone(data?.list || []); | |
590 | - } else { | |
591 | - this.$message.error(info); | |
592 | - } | |
593 | - if (!!this.questionList[0].subQuestions) { | |
594 | - this.questionList?.map((item) => { | |
595 | - let types = [{}]; | |
596 | - let addndex = 0; | |
597 | - item.subQuestions.map((sub, index) => { | |
598 | - if (!!sub.questionType) { | |
599 | - if (sub.questionType == types[addndex].qusType && sub.questionType != 5) { | |
600 | - //同类型批量答案+1 | |
601 | - types[addndex].subNum += 1; | |
602 | - if ( | |
603 | - types[addndex].answerOptions.length < sub.answerOptions.length | |
604 | - ) { | |
605 | - types[addndex].answerOptions = sub.answerOptions; | |
606 | - } | |
607 | - types[addndex].answerList += this.setAnswer( | |
608 | - sub.questionType, | |
609 | - sub.correctAnswer | |
610 | - ); | |
611 | - if (index == item.subQuestions.length - 1) { | |
612 | - //循环最后类型数量大于等于5,保存批量答案 | |
613 | - if (types[addndex].subNum && types[addndex].subNum >= 5) { | |
614 | - types[addndex].endIndex = sub.questionIndex; | |
615 | - types[addndex].index = index; | |
616 | - } | |
617 | - } | |
618 | - } else { | |
619 | - if (types[addndex].subNum && types[addndex].subNum >= 5) { | |
620 | - //不同类型时如果原有类型数量大于等于5,保存批量答案 | |
621 | - types[addndex].endIndex = | |
622 | - item.subQuestions[index - 1].questionIndex; | |
623 | - types[addndex].index = index - 1; | |
624 | - addndex += 1; | |
625 | - types[addndex] = {}; | |
626 | - } | |
627 | - //不同类型初始化批量答案 | |
628 | - types[addndex].qusType = sub.questionType; | |
629 | - types[addndex].subNum = 1; | |
630 | - types[addndex].answerOptions = sub.answerOptions; | |
631 | - types[addndex].answerList = this.setAnswer( | |
632 | - sub.questionType, | |
633 | - sub.correctAnswer | |
634 | - ); | |
635 | - } | |
636 | - } | |
637 | - }); | |
638 | - for (let i = 0; i < types.length; i++) { | |
639 | - if (types[i].qusType == 3) { | |
640 | - types[i].answerList = types[i].answerList.slice(0, -1); | |
641 | - } | |
642 | - if (types[i].subNum >= 5) { | |
643 | - item.subQuestions.splice( | |
644 | - types[i].index + i + 1, | |
645 | - 0, | |
646 | - deepClone(types[i]) | |
647 | - ); | |
648 | - } | |
649 | - } | |
650 | - }); | |
651 | - } else { | |
652 | - let types = [{}]; | |
653 | - let addndex = 0; | |
654 | - this.questionList?.map((sub, index) => { | |
655 | - if (!!sub.questionType) { | |
656 | - if (sub.questionType == types[addndex].qusType && sub.questionType != 5) { | |
657 | - //同类型批量答案+1 | |
658 | - types[addndex].subNum += 1; | |
659 | - if ( | |
660 | - types[addndex].answerOptions.length < sub.answerOptions.length | |
661 | - ) { | |
662 | - types[addndex].answerOptions = sub.answerOptions; | |
663 | - } | |
664 | - types[addndex].answerList += this.setAnswer( | |
665 | - sub.questionType, | |
666 | - sub.correctAnswer | |
667 | - ); | |
668 | - if (index == this.questionList.length - 1) { | |
669 | - //循环最后类型数量大于等于5,保存批量答案 | |
670 | - if (types[addndex].subNum && types[addndex].subNum >= 5) { | |
671 | - types[addndex].endIndex = sub.questionIndex; | |
672 | - types[addndex].index = index; | |
673 | - } | |
674 | - } | |
675 | - } else { | |
676 | - if (types[addndex].subNum && types[addndex].subNum >= 5) { | |
677 | - //不同类型时如果原有类型数量大于等于5,保存批量答案 | |
678 | - types[addndex].endIndex = | |
679 | - this.questionList[index - 1].questionIndex; | |
680 | - types[addndex].index = index - 1; | |
681 | - addndex += 1; | |
682 | - types[addndex] = {}; | |
683 | - } | |
684 | - //不同类型初始化批量答案 | |
685 | - types[addndex].qusType = sub.questionType; | |
686 | - types[addndex].subNum = 1; | |
687 | - types[addndex].answerOptions = sub.answerOptions; | |
688 | - types[addndex].answerList = this.setAnswer( | |
689 | - sub.questionType, | |
690 | - sub.correctAnswer | |
691 | - ); | |
692 | - } | |
693 | - } | |
694 | - }); | |
695 | - for (let i = 0; i < types.length; i++) { | |
696 | - if (types[i].qusType == 3) { | |
697 | - types[i].answerList = types[i].answerList.slice(0, -1); | |
698 | - } | |
699 | - if (types[i].subNum >= 5) { | |
700 | - item.subQuestions.splice( | |
701 | - types[i].index + i + 1, | |
702 | - 0, | |
703 | - deepClone(types[i]) | |
704 | - ); | |
705 | - } | |
706 | - } | |
707 | - } | |
708 | - | |
709 | - this.dialogVisible = true; | |
710 | - }, | |
711 | - async saveAnswer() { | |
712 | - //保存答案 | |
713 | - for (let i = 0; i < this.questionList.length; i++) { | |
714 | - if (this.questionList[0].subQuestions) { | |
715 | - for (let j = 0; j < this.questionList[i].subQuestions.length; j++) { | |
716 | - if (this.questionList[i].subQuestions[j].qusType) { | |
717 | - this.questionList[i].subQuestions.splice(j, 1); | |
718 | - } | |
719 | - } | |
720 | - } else { | |
721 | - if (this.questionList[i].qusType) { | |
722 | - this.questionList.splice(i, 1); | |
723 | - i--; | |
724 | - } | |
725 | - } | |
726 | - } | |
727 | - const { data, status, message } = await this.$request.setExamAnswer({ | |
728 | - examId: this.id, | |
729 | - questionList: [...this.questionList], | |
730 | - }); | |
731 | - if (status == 0) { | |
732 | - this.$emit("saveSuccess"); | |
733 | - } else { | |
734 | - this.$message.error(message); | |
735 | - } | |
736 | - }, | |
737 | - }, | |
738 | -}; | |
739 | -</script> | |
740 | - | |
741 | -<style lang="scss" scoped> | |
742 | -.back { | |
743 | - width: 100%; | |
744 | - height: 56px; | |
745 | - border-bottom: 1px solid #e2e2e2; | |
746 | - display: flex; | |
747 | - align-items: center; | |
748 | - padding: 0 20px; | |
749 | - box-sizing: border-box; | |
750 | - .back-l { | |
751 | - display: flex; | |
752 | - align-items: center; | |
753 | - cursor: pointer; | |
754 | - flex-shrink: 0; | |
755 | - font-size: 18px; | |
756 | - font-weight: 500; | |
757 | - } | |
758 | - .fa-mail-reply-all { | |
759 | - font-size: 28px; | |
760 | - color: #b3b3b3; | |
761 | - margin-right: 12px; | |
762 | - } | |
763 | -} | |
764 | -.form-box { | |
765 | - padding: 20px; | |
766 | -} | |
767 | -.answer-title { | |
768 | - text-align: center; | |
769 | - font-size: 20px; | |
770 | - color: #333; | |
771 | - font-weight: 700; | |
772 | - padding-bottom: 20px; | |
773 | - .totals { | |
774 | - font-size: 16px; | |
775 | - color: #888; | |
776 | - font-weight: normal; | |
777 | - } | |
778 | -} | |
779 | -.question-title { | |
780 | - line-height: 40px; | |
781 | - .ipt { | |
782 | - width: 300px; | |
783 | - margin: 0 16px 0 10px; | |
784 | - :deep(.el-input__inner) { | |
785 | - border-radius: 20px; | |
786 | - border-color: #667ffd; | |
787 | - background: rgba($color: #667ffd, $alpha: 0.05); | |
788 | - } | |
789 | - } | |
790 | - .delete { | |
791 | - margin-right: 8px; | |
792 | - } | |
793 | - .title-txt { | |
794 | - margin-right: 20px; | |
795 | - font-size: 16px; | |
796 | - font-weight: 700; | |
797 | - } | |
798 | -} | |
799 | -.questions-ul { | |
800 | - border-left: 1px solid #e2e2e2; | |
801 | - border-top: 1px solid #e2e2e2; | |
802 | - margin: 12px 0; | |
803 | -} | |
804 | -.sub-questions { | |
805 | - width: 100%; | |
806 | - display: flex; | |
807 | - border-bottom: 1px solid #e2e2e2; | |
808 | - & > div { | |
809 | - min-height: 40px; | |
810 | - padding: 5px; | |
811 | - flex-shrink: 0; | |
812 | - border-right: 1px solid #e2e2e2; | |
813 | - display: flex; | |
814 | - justify-content: center; | |
815 | - align-items: center; | |
816 | - } | |
817 | - .qs-num { | |
818 | - width: 80px; | |
819 | - } | |
820 | - .qs-type { | |
821 | - width: 160px; | |
822 | - } | |
823 | - .qs-score, | |
824 | - .qs-partScore { | |
825 | - width: 160px; | |
826 | - } | |
827 | - .qs-options { | |
828 | - flex: 1; | |
829 | - } | |
830 | - .qs-set { | |
831 | - width: 80px; | |
832 | - } | |
833 | - .qs-options2 { | |
834 | - text-align: left; | |
835 | - justify-content: flex-start; | |
836 | - padding-left: 20px; | |
837 | - .answer-s { | |
838 | - cursor: pointer; | |
839 | - } | |
840 | - } | |
841 | - :deep(.el-select) { | |
842 | - .el-input__inner { | |
843 | - border-radius: 20px; | |
844 | - border-color: #667ffd; | |
845 | - width: 150px; | |
846 | - height: 32px; | |
847 | - line-height: 32px; | |
848 | - background: rgba($color: #667ffd, $alpha: 0.05); | |
849 | - } | |
850 | - .el-input__icon { | |
851 | - line-height: 32px; | |
852 | - } | |
853 | - } | |
854 | -} | |
855 | -.set-ans-btn { | |
856 | - width: 100%; | |
857 | - padding: 10px 0 10px 630px; | |
858 | - box-sizing: border-box; | |
859 | - border-bottom: 1px solid #e2e2e2; | |
860 | -} | |
861 | -.fa-exchange { | |
862 | - color: #667ffd; | |
863 | - cursor: pointer; | |
864 | - font-size: 16px; | |
865 | - margin-left: 10px; | |
866 | -} | |
867 | -.dia-btn { | |
868 | - border-radius: 20px; | |
869 | - margin: 0 20px; | |
870 | - padding: 10px 20px; | |
871 | -} | |
872 | -.dia-tips { | |
873 | - padding-bottom: 10px; | |
874 | -} | |
875 | -.answer-s { | |
876 | - width: 32px; | |
877 | - height: 28px; | |
878 | - cursor: pointer; | |
879 | - user-select: none; | |
880 | -} | |
881 | -.set-questions { | |
882 | - display: flex; | |
883 | - margin-bottom: 12px; | |
884 | - width: 100%; | |
885 | - .qs-num { | |
886 | - flex-shrink: 0; | |
887 | - margin-right: 10px; | |
888 | - } | |
889 | -} | |
890 | -.qs-options { | |
891 | - flex: 1; | |
892 | - .ipt { | |
893 | - margin-bottom: 5px; | |
894 | - } | |
895 | - .delButton { | |
896 | - border-color: #ff6868; | |
897 | - background: #ff6868 url("../../../assets/images/arrow.png") no-repeat center; | |
898 | - background-size: 19px; | |
899 | - cursor: pointer; | |
900 | - color: transparent; | |
901 | - } | |
902 | - .ac { | |
903 | - border-color: #ff6868; | |
904 | - background: #ff6868; | |
905 | - color: #fff; | |
906 | - } | |
907 | -} | |
908 | -</style> | |
909 | 0 | \ No newline at end of file |
src/views/standard/test/index.vue
... | ... | @@ -329,96 +329,105 @@ |
329 | 329 | description="没有更多数据" |
330 | 330 | ></el-empty> |
331 | 331 | <template v-if="tableData.length && loading == false"> |
332 | - <el-table | |
333 | - :max-height="tableMaxHeight" | |
334 | - v-if="role == 'ROLE_JIAOSHI'" | |
335 | - :data="tableData" | |
336 | - border | |
337 | - style="width: 100%" | |
338 | - > | |
339 | - <el-table-column | |
340 | - prop="studentCode" | |
341 | - label="学号" | |
342 | - align="center" | |
343 | - fixed | |
344 | - ></el-table-column> | |
345 | - <el-table-column | |
346 | - prop="studentName" | |
347 | - label="姓名" | |
348 | - fixed | |
349 | - align="center" | |
350 | - ></el-table-column> | |
351 | - <el-table-column | |
352 | - align="center" | |
353 | - v-for="(item, index) in answerList" | |
354 | - :key="index" | |
355 | - :label="item.title" | |
332 | + <div id="print-content"> | |
333 | + <el-table | |
334 | + :max-height="tableMaxHeight" | |
335 | + v-if="role == 'ROLE_JIAOSHI'" | |
336 | + :data="tableData" | |
337 | + border | |
338 | + style="width: 100%" | |
356 | 339 | > |
357 | 340 | <el-table-column |
358 | - :prop="'score' + index" | |
359 | - :label="index == 0 ? '总分' : '成绩'" | |
341 | + prop="studentCode" | |
342 | + label="学号" | |
360 | 343 | align="center" |
361 | - :class-name="index % 2 == 0 ? 'bg' : ''" | |
344 | + fixed | |
362 | 345 | ></el-table-column> |
363 | 346 | <el-table-column |
364 | - :prop="'classRank' + index" | |
365 | - label="班名" | |
347 | + prop="studentName" | |
348 | + label="姓名" | |
349 | + fixed | |
366 | 350 | align="center" |
367 | - :class-name="index % 2 == 0 ? 'bg' : ''" | |
368 | 351 | ></el-table-column> |
369 | - </el-table-column> | |
370 | - </el-table> | |
371 | - <el-table | |
372 | - v-else | |
373 | - :data="tableData" | |
374 | - :max-height="tableMaxHeight" | |
375 | - border | |
376 | - style="width: 100%" | |
377 | - > | |
378 | - <el-table-column | |
379 | - prop="studentCode" | |
380 | - label="学号" | |
381 | - align="center" | |
382 | - fixed | |
383 | - ></el-table-column> | |
384 | - <el-table-column | |
385 | - prop="studentName" | |
386 | - label="姓名" | |
387 | - fixed | |
388 | - align="center" | |
389 | - ></el-table-column> | |
390 | - <el-table-column | |
391 | - align="center" | |
392 | - v-for="(item, index) in answerList" | |
393 | - :key="index" | |
394 | - :label="item" | |
395 | - > | |
396 | 352 | <el-table-column |
397 | - :prop="'examCount' + item" | |
398 | - label="测练数" | |
399 | 353 | align="center" |
400 | - :class-name="index % 2 == 0 ? 'bg' : ''" | |
401 | - ></el-table-column> | |
354 | + v-for="(item, index) in answerList" | |
355 | + :key="index" | |
356 | + :label="item.title" | |
357 | + > | |
358 | + <el-table-column | |
359 | + :prop="'score' + index" | |
360 | + :label="index == 0 ? '总分' : '成绩'" | |
361 | + align="center" | |
362 | + :class-name="index % 2 == 0 ? 'bg' : ''" | |
363 | + ></el-table-column> | |
364 | + <el-table-column | |
365 | + :prop="'classRank' + index" | |
366 | + label="班名" | |
367 | + align="center" | |
368 | + :class-name="index % 2 == 0 ? 'bg' : ''" | |
369 | + ></el-table-column> | |
370 | + </el-table-column> | |
371 | + </el-table> | |
372 | + <el-table | |
373 | + v-else | |
374 | + :data="tableData" | |
375 | + :max-height="tableMaxHeight" | |
376 | + border | |
377 | + style="width: 100%" | |
378 | + > | |
402 | 379 | <el-table-column |
403 | - :prop="'participationCount' + item" | |
404 | - label="参与数" | |
380 | + prop="studentCode" | |
381 | + label="学号" | |
405 | 382 | align="center" |
406 | - :class-name="index % 2 == 0 ? 'bg' : ''" | |
383 | + fixed | |
407 | 384 | ></el-table-column> |
385 | + | |
408 | 386 | <el-table-column |
409 | - :prop="'score' + item" | |
410 | - label="总分" | |
387 | + prop="studentName" | |
388 | + label="姓名" | |
389 | + fixed | |
411 | 390 | align="center" |
412 | - :class-name="index % 2 == 0 ? 'bg' : ''" | |
413 | - ></el-table-column> | |
391 | + > | |
392 | + <template slot-scope="scoped" | |
393 | + ><span class="click-b" @click="toPortrait(scoped.row)"> | |
394 | + {{ scoped.row.studentName }} | |
395 | + </span></template | |
396 | + > | |
397 | + </el-table-column> | |
414 | 398 | <el-table-column |
415 | - :prop="'classRank' + item" | |
416 | - label="班名" | |
417 | 399 | align="center" |
418 | - :class-name="index % 2 == 0 ? 'bg' : ''" | |
419 | - ></el-table-column> | |
420 | - </el-table-column> | |
421 | - </el-table> | |
400 | + v-for="(item, index) in answerList" | |
401 | + :key="index" | |
402 | + :label="item" | |
403 | + > | |
404 | + <el-table-column | |
405 | + :prop="'examCount' + item" | |
406 | + label="测练数" | |
407 | + align="center" | |
408 | + :class-name="index % 2 == 0 ? 'bg' : ''" | |
409 | + ></el-table-column> | |
410 | + <el-table-column | |
411 | + :prop="'participationCount' + item" | |
412 | + label="参与数" | |
413 | + align="center" | |
414 | + :class-name="index % 2 == 0 ? 'bg' : ''" | |
415 | + ></el-table-column> | |
416 | + <el-table-column | |
417 | + :prop="'score' + item" | |
418 | + label="总分" | |
419 | + align="center" | |
420 | + :class-name="index % 2 == 0 ? 'bg' : ''" | |
421 | + ></el-table-column> | |
422 | + <el-table-column | |
423 | + :prop="'classRank' + item" | |
424 | + label="班名" | |
425 | + align="center" | |
426 | + :class-name="index % 2 == 0 ? 'bg' : ''" | |
427 | + ></el-table-column> | |
428 | + </el-table-column> | |
429 | + </el-table> | |
430 | + </div> | |
422 | 431 | </template> |
423 | 432 | </div> |
424 | 433 | <p class="down" v-if="tabIndex == 2 && tableData.length"> |
... | ... | @@ -430,6 +439,14 @@ |
430 | 439 | @click="downExl" |
431 | 440 | >导出报表</el-button |
432 | 441 | > |
442 | + <el-button | |
443 | + @click="print" | |
444 | + type="primary" | |
445 | + plain | |
446 | + round | |
447 | + icon="el-icon-printer" | |
448 | + >打印</el-button | |
449 | + > | |
433 | 450 | </p> |
434 | 451 | </div> |
435 | 452 | <el-dialog title="导入主观题分数" :visible.sync="diaUp" width="600"> |
... | ... | @@ -452,24 +469,13 @@ |
452 | 469 | <el-button @click="diaUp = false">取 消</el-button> |
453 | 470 | </div> |
454 | 471 | </el-dialog> |
455 | - <div class="edit-dia" v-show="dialogVisible" height="100%"> | |
456 | - <editAnswer | |
457 | - ref="editAnswer" | |
458 | - :title="form.title" | |
459 | - :score="form.examPaperScore" | |
460 | - @cancel="cancel" | |
461 | - @saveSuccess="saveSuccess" | |
462 | - /> | |
463 | - </div> | |
464 | 472 | </div> |
465 | 473 | </template> |
466 | 474 | |
467 | 475 | <script> |
468 | -import { formatDate, downloadFile } from "utils"; | |
469 | -import editAnswer from "./editAnswer.vue"; | |
476 | +import { formatDate, downloadFile, tablePrint } from "utils"; | |
470 | 477 | import BusEvent from "@/utils/busEvent"; |
471 | 478 | export default { |
472 | - components: { editAnswer }, | |
473 | 479 | data() { |
474 | 480 | return { |
475 | 481 | exportLoading: false, |
... | ... | @@ -480,7 +486,6 @@ export default { |
480 | 486 | loadingDown: false, |
481 | 487 | url: "/api_html/teaching/importSubjectiveScore", |
482 | 488 | examId: "", |
483 | - dialogVisible: false, | |
484 | 489 | form: { |
485 | 490 | id: "", |
486 | 491 | title: "", |
... | ... | @@ -506,7 +511,9 @@ export default { |
506 | 511 | }; |
507 | 512 | }, |
508 | 513 | async created() { |
509 | - this.role = this.$store.getters.info.showRole || this.$store.getters.info.permissions[0].role; | |
514 | + this.role = | |
515 | + this.$store.getters.info.showRole || | |
516 | + this.$store.getters.info.permissions[0].role; | |
510 | 517 | await this._QueryClassList(); |
511 | 518 | await this._QuerySubjectList(); |
512 | 519 | await this.setDate(1); |
... | ... | @@ -530,7 +537,11 @@ export default { |
530 | 537 | }); |
531 | 538 | }, |
532 | 539 | methods: { |
533 | - changeSub(val) {//科目改变触发事件 | |
540 | + print() { | |
541 | + tablePrint("print-content"); | |
542 | + }, | |
543 | + changeSub(val) { | |
544 | + //科目改变触发事件 | |
534 | 545 | let sub; |
535 | 546 | if (val && val.length) { |
536 | 547 | let leng = val.length - 1; |
... | ... | @@ -552,17 +563,36 @@ export default { |
552 | 563 | }, |
553 | 564 | }); |
554 | 565 | }, |
555 | - uploadSJ(obj) {//导入开关 | |
566 | + toPortrait(obj) { | |
567 | + let subjectNames = []; | |
568 | + subjectNames = [...this.query["subjectNames"]]; | |
569 | + if ( | |
570 | + this.query["subjectNames"] && | |
571 | + this.query["subjectNames"]?.length == 1 && | |
572 | + this.query["subjectNames"][0] == "全部" | |
573 | + ) { | |
574 | + subjectNames = this.subjectList.map((item) => { | |
575 | + return item.value; | |
576 | + }); | |
577 | + subjectNames?.shift(); | |
578 | + } | |
579 | + //去学生画像 | |
580 | + this.$router.push({ | |
581 | + path: "/portraitDetail", | |
582 | + query: { | |
583 | + id: obj.studentId, | |
584 | + classId: obj.classId, | |
585 | + subjectNames: subjectNames.join(","), | |
586 | + studentName: obj.studentName, | |
587 | + studentCode: obj.studentCode, | |
588 | + }, | |
589 | + }); | |
590 | + }, | |
591 | + uploadSJ(obj) { | |
592 | + //导入开关 | |
556 | 593 | this.examId = obj.id; |
557 | 594 | this.diaUp = true; |
558 | 595 | }, |
559 | - cancel() { | |
560 | - this.dialogVisible = false; | |
561 | - }, | |
562 | - saveSuccess() {//修改答案回调 | |
563 | - this.dialogVisible = false; | |
564 | - this._QueryData(); | |
565 | - }, | |
566 | 596 | setDate(index) { |
567 | 597 | const that = this; |
568 | 598 | this.date = index == this.date ? "" : index; |
... | ... | @@ -638,9 +668,14 @@ export default { |
638 | 668 | this._QueryData(); |
639 | 669 | }, |
640 | 670 | edit(item) { |
641 | - this.form = { ...item }; | |
642 | - this.$refs.editAnswer.edit(this.form.id); | |
643 | - this.dialogVisible = true; | |
671 | + this.$router.push({ | |
672 | + path: "/examinationPaperEdit", | |
673 | + query: { | |
674 | + paperId: item.id, | |
675 | + title: item.title, | |
676 | + type: 2, | |
677 | + }, | |
678 | + }); | |
644 | 679 | }, |
645 | 680 | changeTab() { |
646 | 681 | this.tableMaxHeight = this.$refs.main.offsetHeight; |
... | ... | @@ -848,7 +883,8 @@ export default { |
848 | 883 | this.$message.error(info); |
849 | 884 | } |
850 | 885 | }, |
851 | - async downExl() {//报表到处 | |
886 | + async downExl() { | |
887 | + //报表到处 | |
852 | 888 | if (this.exportLoading == true) return; |
853 | 889 | let query = {}; |
854 | 890 | for (let key in this.query) { |
... | ... | @@ -892,7 +928,8 @@ export default { |
892 | 928 | this.$message.error("下载失败"); |
893 | 929 | } |
894 | 930 | }, |
895 | - async downExcel() {//模板下载 | |
931 | + async downExcel() { | |
932 | + //模板下载 | |
896 | 933 | this.loadingDown = true; |
897 | 934 | let data = await this.$request.subjectiveScoreTemplate({ |
898 | 935 | examId: this.examId, |
... | ... | @@ -944,16 +981,7 @@ div::-webkit-scrollbar-thumb { |
944 | 981 | .down { |
945 | 982 | padding-top: 16px; |
946 | 983 | } |
947 | -.edit-dia { | |
948 | - position: absolute; | |
949 | - left: 0; | |
950 | - top: 0; | |
951 | - right: 0; | |
952 | - bottom: 0; | |
953 | - width: 100%; | |
954 | - height: calc(100vh - 70px); | |
955 | - background: #fff; | |
956 | - overflow-y: auto; | |
957 | - z-index: 10; | |
984 | +.click-b { | |
985 | + cursor: pointer; | |
958 | 986 | } |
959 | 987 | </style> |
960 | 988 | \ No newline at end of file | ... | ... |