Commit ce278878fa648b5eb3b4234899cef29c6f957f4a
1 parent
384a2a54
2-2 bugfix
Showing
18 changed files
with
408 additions
and
323 deletions
src/api/apis/apis.js
@@ -1653,7 +1653,8 @@ export default { | @@ -1653,7 +1653,8 @@ export default { | ||
1653 | return service({ | 1653 | return service({ |
1654 | url: setUpUrls.tClassAndStudentTemplate, | 1654 | url: setUpUrls.tClassAndStudentTemplate, |
1655 | method: "POST", | 1655 | method: "POST", |
1656 | - data | 1656 | + data, |
1657 | + responseType: 'arraybuffer', | ||
1657 | }); | 1658 | }); |
1658 | }, | 1659 | }, |
1659 | //教学班班级名册导出 | 1660 | //教学班班级名册导出 |
src/api/axios.js
@@ -29,7 +29,6 @@ service.interceptors.request.use( | @@ -29,7 +29,6 @@ service.interceptors.request.use( | ||
29 | config.headers.manager = 1 | 29 | config.headers.manager = 1 |
30 | config.headers.classes = classes | 30 | config.headers.classes = classes |
31 | } | 31 | } |
32 | - console.log(config) | ||
33 | return config; | 32 | return config; |
34 | }, | 33 | }, |
35 | (error) => { | 34 | (error) => { |
src/api/urls/apis.js
@@ -364,9 +364,6 @@ export default { | @@ -364,9 +364,6 @@ export default { | ||
364 | // 载指定版本授课端 | 364 | // 载指定版本授课端 |
365 | pGetAppDownloadUrl: "/api_html/personal/getAppDownloadUrl", | 365 | pGetAppDownloadUrl: "/api_html/personal/getAppDownloadUrl", |
366 | 366 | ||
367 | - //导出随堂问单科多课时报表 | ||
368 | - pExportPhaseAnswerReport: "/api_html/personal/exportPhaseAnswerReport", | ||
369 | - | ||
370 | 367 | ||
371 | // 修改密码 | 368 | // 修改密码 |
372 | changePwd: "/api_html/changePwd", | 369 | changePwd: "/api_html/changePwd", |
@@ -409,6 +406,7 @@ export default { | @@ -409,6 +406,7 @@ export default { | ||
409 | // 删除班级信息 | 406 | // 删除班级信息 |
410 | removeClass: "/api_html/school/manager/delClass", | 407 | removeClass: "/api_html/school/manager/delClass", |
411 | 408 | ||
409 | + | ||
412 | //删除即时测考试 | 410 | //删除即时测考试 |
413 | deleteReport: "/api_html/teaching/deleteReport", | 411 | deleteReport: "/api_html/teaching/deleteReport", |
414 | //设置单班科目分析低分区间 | 412 | //设置单班科目分析低分区间 |
@@ -419,34 +417,4 @@ export default { | @@ -419,34 +417,4 @@ export default { | ||
419 | exportExamMultiReport: "/api_html/teaching/exportExamMultiReport", | 417 | exportExamMultiReport: "/api_html/teaching/exportExamMultiReport", |
420 | //查询即时测多班默认等级列表 | 418 | //查询即时测多班默认等级列表 |
421 | defaultLevels: "/api_html/teaching/defaultLevels", | 419 | defaultLevels: "/api_html/teaching/defaultLevels", |
422 | - | ||
423 | - | ||
424 | - | ||
425 | - /** v1.5 */ | ||
426 | - // 教师/个人版导入备题组卷Word文档 | ||
427 | - paperWordUpload: "/api_html/common/paper/upload", | ||
428 | - // 删除随堂问报表 | ||
429 | - deletePaperReport: "/api_html/teaching/deletePaperReport", | ||
430 | - // 删除基站 | ||
431 | - deleteStation: "/api_html/school/manager/deleteStation", | ||
432 | - // 导出授课端日志 | ||
433 | - downloadDeviceLog: "/api_html/school/manager/downloadDeviceLog", | ||
434 | - // 教学班班级名册模板下载 | ||
435 | - tClassAndStudentTemplate: "/api_html/school/manager/tClassAndStudentTemplate", | ||
436 | - // 教学班班级名册导出 | ||
437 | - exportTClassAndStudent: "/api_html/school/manager/exportTClassAndStudent", | ||
438 | - // 删除班级信息(新) | ||
439 | - deleteClass: "/api_html/school/manager/deleteClass", | ||
440 | - // 清除老师下所有关联班级 | ||
441 | - clearTeacherClasses: "/api_html/school/manager/clearTeacherClasses", | ||
442 | - | ||
443 | - // 下载即时测导入分数模板 | ||
444 | - scoreTemplate: "/api_html/teaching/scoreTemplate", | ||
445 | - // 导入即时测报表分数 | ||
446 | - importScore: "/api_html/teaching/importScore", | ||
447 | - // 获取即时测报表学生名单和题目列表 | ||
448 | - listStudentsAndQuestions: "/api_html/teaching/listStudentsAndQuestions", | ||
449 | - // 提交即时测报表分数 | ||
450 | - submitScore: "/api_html/teaching/submitScore", | ||
451 | - | ||
452 | } | 420 | } |
src/components/charts/lineChart.vue
@@ -10,7 +10,8 @@ export default { | @@ -10,7 +10,8 @@ export default { | ||
10 | params: Array, | 10 | params: Array, |
11 | xAxis: Array, | 11 | xAxis: Array, |
12 | colors: Array, | 12 | colors: Array, |
13 | - formatterYAxis: true | 13 | + formatterYAxis: true, |
14 | + tooltipFormatter:false | ||
14 | }, | 15 | }, |
15 | watch: { | 16 | watch: { |
16 | params: { | 17 | params: { |
@@ -40,6 +41,11 @@ export default { | @@ -40,6 +41,11 @@ export default { | ||
40 | tooltip: { | 41 | tooltip: { |
41 | trigger: "item", | 42 | trigger: "item", |
42 | confine: true, | 43 | confine: true, |
44 | + formatter(v) { | ||
45 | + let html = `<p>${v.seriesName}</p>` | ||
46 | + html += `${v.marker} ${v.name}:${v.value}${that.tooltipFormatter?'%':''}` | ||
47 | + return html | ||
48 | + }, | ||
43 | }, | 49 | }, |
44 | legend: { | 50 | legend: { |
45 | show: true, | 51 | show: true, |
src/components/exportDia.vue
@@ -92,7 +92,7 @@ export default { | @@ -92,7 +92,7 @@ export default { | ||
92 | return item.studentId | 92 | return item.studentId |
93 | }) | 93 | }) |
94 | } | 94 | } |
95 | - this.$emit('exportData', studentIds) | 95 | + this.$emit('exportData', this.downType==1?null:studentIds) |
96 | }, | 96 | }, |
97 | cancel() { | 97 | cancel() { |
98 | if (this.exportType == 2) { | 98 | if (this.exportType == 2) { |
src/router/index.js
@@ -9,7 +9,7 @@ import HomeMain from "@/views/index/mainIndex" | @@ -9,7 +9,7 @@ import HomeMain from "@/views/index/mainIndex" | ||
9 | const NotFound = () => import("@/views/page404") | 9 | const NotFound = () => import("@/views/page404") |
10 | const ExaminationPaper = () => import("@/views/examinationPaper/index") | 10 | const ExaminationPaper = () => import("@/views/examinationPaper/index") |
11 | const ExaminationPaperAdd = () => import("@/views/examinationPaper/add") | 11 | const ExaminationPaperAdd = () => import("@/views/examinationPaper/add") |
12 | -const ExaminationPaperAddAsk = () => import("@/views/examinationPaper/addAsk") | 12 | +const ExaminationPaperAddQs = () => import("@/views/examinationPaper/addQs") |
13 | const ExaminationPaperEdit = () => import("@/views/examinationPaper/edit") | 13 | const ExaminationPaperEdit = () => import("@/views/examinationPaper/edit") |
14 | const ExaminationPaperRecycle = () => import("@/views/examinationPaper/recycle") | 14 | const ExaminationPaperRecycle = () => import("@/views/examinationPaper/recycle") |
15 | const ExaminationPaperArchiving = () => import("@/views/examinationPaper/archiving") | 15 | const ExaminationPaperArchiving = () => import("@/views/examinationPaper/archiving") |
@@ -169,10 +169,10 @@ let addrouters = [ | @@ -169,10 +169,10 @@ let addrouters = [ | ||
169 | children: [] | 169 | children: [] |
170 | }, | 170 | }, |
171 | { | 171 | { |
172 | - path: "/examinationPaperAddAsk", | 172 | + path: "/examinationPaperAddQs", |
173 | iconCls: "", // 图标样式class | 173 | iconCls: "", // 图标样式class |
174 | - name: "examinationPaperAddAsk", | ||
175 | - component: ExaminationPaperAddAsk, | 174 | + name: "examinationPaperAddQs", |
175 | + component: ExaminationPaperAddQs, | ||
176 | parent: "examinationPaper", | 176 | parent: "examinationPaper", |
177 | children: [] | 177 | children: [] |
178 | }, | 178 | }, |
@@ -810,10 +810,10 @@ const addroutersPersonal = [ | @@ -810,10 +810,10 @@ const addroutersPersonal = [ | ||
810 | children: [] | 810 | children: [] |
811 | }, | 811 | }, |
812 | { | 812 | { |
813 | - path: "/examinationPaperAddAsk", | 813 | + path: "/examinationPaperAddQs", |
814 | iconCls: "", | 814 | iconCls: "", |
815 | - name: "examinationPaperAddAsk", | ||
816 | - component: ExaminationPaperAddAsk, | 815 | + name: "examinationPaperAddQs", |
816 | + component: ExaminationPaperAddQs, | ||
817 | parent: "examinationPaper", | 817 | parent: "examinationPaper", |
818 | children: [] | 818 | children: [] |
819 | }, | 819 | }, |
src/store/index.js
@@ -26,6 +26,7 @@ const store = new Vuex.Store({ | @@ -26,6 +26,7 @@ const store = new Vuex.Store({ | ||
26 | : [], //动态路由 | 26 | : [], //动态路由 |
27 | tokenSources: new Map(), //正在请求接口(切换取消请求) | 27 | tokenSources: new Map(), //正在请求接口(切换取消请求) |
28 | classes: localStorage.getItem("classes") || "", //班主任选择班级查询报表(用于教学班学生筛选) | 28 | classes: localStorage.getItem("classes") || "", //班主任选择班级查询报表(用于教学班学生筛选) |
29 | + refreshTestList: false, //重新计分刷新列表 | ||
29 | }, | 30 | }, |
30 | mutations: { | 31 | mutations: { |
31 | setToken(state, token) { | 32 | setToken(state, token) { |
@@ -75,6 +76,9 @@ const store = new Vuex.Store({ | @@ -75,6 +76,9 @@ const store = new Vuex.Store({ | ||
75 | setClasses(state, data) { | 76 | setClasses(state, data) { |
76 | state.classes = data; | 77 | state.classes = data; |
77 | localStorage.setItem("classes", data); | 78 | localStorage.setItem("classes", data); |
79 | + }, | ||
80 | + setRefreshTestList(state, data) { | ||
81 | + state.refreshTestList = data; | ||
78 | } | 82 | } |
79 | }, | 83 | }, |
80 | actions: { | 84 | actions: { |
@@ -206,6 +210,7 @@ const store = new Vuex.Store({ | @@ -206,6 +210,7 @@ const store = new Vuex.Store({ | ||
206 | uniquerouter: (state) => state.layoutStore.uniquerouter, | 210 | uniquerouter: (state) => state.layoutStore.uniquerouter, |
207 | tabnavBox: (state) => state.layoutStore.tabnavBox, | 211 | tabnavBox: (state) => state.layoutStore.tabnavBox, |
208 | rightNav: (state) => state.layoutStore.rightNav, | 212 | rightNav: (state) => state.layoutStore.rightNav, |
213 | + refreshTestList: (state) => state.refreshTestList, | ||
209 | }, | 214 | }, |
210 | modules: { | 215 | modules: { |
211 | layoutStore, | 216 | layoutStore, |
src/views/basic/ask/analysis.vue
@@ -103,7 +103,7 @@ export default { | @@ -103,7 +103,7 @@ export default { | ||
103 | this.id = JSON.parse(this.$route.query.id) | 103 | this.id = JSON.parse(this.$route.query.id) |
104 | this.status = this.$route.query.status ? this.$route.query.status : 0; | 104 | this.status = this.$route.query.status ? this.$route.query.status : 0; |
105 | this._QueryData(); | 105 | this._QueryData(); |
106 | - this._QueryDataQuestionRank(); | 106 | + this.types != 1 ?this._QueryDataQuestionRank():''; |
107 | this.types != 3 ? this.periodDetail() : ''; | 107 | this.types != 3 ? this.periodDetail() : ''; |
108 | }, | 108 | }, |
109 | methods: { | 109 | methods: { |
@@ -209,13 +209,7 @@ export default { | @@ -209,13 +209,7 @@ export default { | ||
209 | }); | 209 | }); |
210 | this.loading = false; | 210 | this.loading = false; |
211 | if (status === 0) { | 211 | if (status === 0) { |
212 | - if (this.type == 2) { | ||
213 | - this.tableData = data?.list || [] | ||
214 | - } else { | ||
215 | - this.tableData = data?.list.sort((a, b) => { | ||
216 | - return a.questionIndex - b.questionIndex; | ||
217 | - }); | ||
218 | - } | 212 | + this.tableData = data?.list || [] |
219 | this.total = data.count; | 213 | this.total = data.count; |
220 | } else { | 214 | } else { |
221 | this.$message.error(info); | 215 | this.$message.error(info); |
@@ -224,22 +218,13 @@ export default { | @@ -224,22 +218,13 @@ export default { | ||
224 | async _QueryDataQuestionRank() { | 218 | async _QueryDataQuestionRank() { |
225 | let queryData; | 219 | let queryData; |
226 | let query = {}; | 220 | let query = {}; |
227 | - if (this.types == 1) { | ||
228 | - if (this.role == "ROLE_PERSONAL") { | ||
229 | - queryData = this.$request.pPeriodStudentReport | ||
230 | - } else { | ||
231 | - queryData = this.$request.periodStudentReport | ||
232 | - } | ||
233 | - query.type = this.type - 1 | ||
234 | - query.periodId = this.id[0] | ||
235 | - } else { | 221 | + |
236 | query.periodIds = this.id | 222 | query.periodIds = this.id |
237 | if (this.types == 2) { | 223 | if (this.types == 2) { |
238 | queryData = this.$request.phaseAnswerReport | 224 | queryData = this.$request.phaseAnswerReport |
239 | } else if (this.types == 3) { | 225 | } else if (this.types == 3) { |
240 | queryData = this.$request.cTPhaseAnswerReport | 226 | queryData = this.$request.cTPhaseAnswerReport |
241 | } | 227 | } |
242 | - } | ||
243 | if (this.types != 1) { | 228 | if (this.types != 1) { |
244 | query.classId = this.classId | 229 | query.classId = this.classId |
245 | } | 230 | } |
@@ -249,6 +234,7 @@ export default { | @@ -249,6 +234,7 @@ export default { | ||
249 | ...query, | 234 | ...query, |
250 | }); | 235 | }); |
251 | this.loading = false; | 236 | this.loading = false; |
237 | + console.log(data) | ||
252 | if (status === 0) { | 238 | if (status === 0) { |
253 | this.exportStudent = data?.list && [...data?.list] || [] | 239 | this.exportStudent = data?.list && [...data?.list] || [] |
254 | } else { | 240 | } else { |
@@ -268,16 +254,21 @@ export default { | @@ -268,16 +254,21 @@ export default { | ||
268 | this.exportLoading = true; | 254 | this.exportLoading = true; |
269 | let studentIds = arr | 255 | let studentIds = arr |
270 | let query = {}; | 256 | let query = {}; |
271 | - if (studentIds.length > 0) { | ||
272 | - query.studentIds = studentIds | ||
273 | - } else { | ||
274 | - query.studentIds = [] | 257 | + if(studentIds != null){ |
258 | + if (studentIds.length > 0) { | ||
259 | + query.studentIds = studentIds | ||
260 | + } else { | ||
261 | + query.studentIds = [] | ||
262 | + } | ||
275 | } | 263 | } |
276 | let exportPeriodReport = "" | 264 | let exportPeriodReport = "" |
277 | - if (this.id.length == 1) { | 265 | + if (this.types == 1) { |
278 | query.periodId = this.id[0] | 266 | query.periodId = this.id[0] |
279 | - exportPeriodReport = this.role == "ROLE_PERSONAL" ? this.$request.pExportPhaseAnswerReport : this.$request.exportPeriodReport | ||
280 | - } else { | 267 | + exportPeriodReport = this.role == "ROLE_PERSONAL" ? this.$request.pExportPeriodReport : this.$request.exportPeriodReport |
268 | + } else if(this.types == 2){ | ||
269 | + query.periodIds = this.id | ||
270 | + exportPeriodReport = this.role == "ROLE_PERSONAL" ?this.$request.pExportPhaseAnswerReport:this.$request.exportPhaseAnswerReport | ||
271 | + }else{ | ||
281 | query.periodIds = this.id | 272 | query.periodIds = this.id |
282 | exportPeriodReport = this.$request.cTExportPhaseAnswerReport | 273 | exportPeriodReport = this.$request.cTExportPhaseAnswerReport |
283 | } | 274 | } |
@@ -287,6 +278,7 @@ export default { | @@ -287,6 +278,7 @@ export default { | ||
287 | }); | 278 | }); |
288 | this.exportLoading = false; | 279 | this.exportLoading = false; |
289 | if (data) { | 280 | if (data) { |
281 | + this.cancel() | ||
290 | let blob = new Blob([data], { | 282 | let blob = new Blob([data], { |
291 | type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", | 283 | type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", |
292 | }); | 284 | }); |
src/views/basic/ask/components/answerQustion.vue
1 | <template> | 1 | <template> |
2 | <div> | 2 | <div> |
3 | <el-table :data="resultData" border style="width: 100%"> | 3 | <el-table :data="resultData" border style="width: 100%"> |
4 | - <el-table-column prop="studentCode" label="学号" align="center"></el-table-column> | ||
5 | - <el-table-column prop="studentName" label="姓名" align="center"></el-table-column> | 4 | + <el-table-column |
5 | + prop="studentCode" | ||
6 | + label="学号" | ||
7 | + align="center" | ||
8 | + ></el-table-column> | ||
9 | + <el-table-column | ||
10 | + prop="studentName" | ||
11 | + label="姓名" | ||
12 | + align="center" | ||
13 | + ></el-table-column> | ||
6 | <template v-if="types == 1"> | 14 | <template v-if="types == 1"> |
7 | - <el-table-column prop="answerTimes" label="答题次数" align="center"></el-table-column> | ||
8 | - <el-table-column prop="consumingDuration" label="答题耗时" align="center"><template slot-scope="scoped">{{ | ||
9 | - setDuration(scoped.row.consumingDuration) | ||
10 | - }}</template></el-table-column> | ||
11 | - <el-table-column prop="correctAnswerTimes" label="答对次数" align="center"></el-table-column> | ||
12 | - <el-table-column prop="participationRate" label="参与度" sortable align="center"><template slot-scope="scoped">{{ | ||
13 | - scoped.row.participationRate }}%</template></el-table-column> | ||
14 | - <el-table-column prop="correctRate" label="正确率" sortable align="center"><template slot-scope="scoped">{{ | ||
15 | - scoped.row.correctRate }}%</template></el-table-column> | ||
16 | - <el-table-column prop="answerCorrectRate" label="已答正确率" sortable align="center"><template slot-scope="scoped">{{ | ||
17 | - scoped.row.answerCorrectRate }}%</template></el-table-column> | ||
18 | - <el-table-column v-for="(item, index) in optionsList" :key="index" :label="'Q' + (index + 1)" | ||
19 | - align="center"><template slot-scope="scoped"> | 15 | + <el-table-column |
16 | + prop="answerTimes" | ||
17 | + label="答题次数" | ||
18 | + align="center" | ||
19 | + ></el-table-column> | ||
20 | + <el-table-column | ||
21 | + prop="consumingDuration" | ||
22 | + label="答题耗时" | ||
23 | + align="center" | ||
24 | + ><template slot-scope="scoped">{{ | ||
25 | + setDuration(scoped.row.consumingDuration) | ||
26 | + }}</template></el-table-column | ||
27 | + > | ||
28 | + <el-table-column | ||
29 | + prop="correctAnswerTimes" | ||
30 | + label="答对次数" | ||
31 | + align="center" | ||
32 | + ></el-table-column> | ||
33 | + <el-table-column | ||
34 | + prop="participationRate" | ||
35 | + label="参与度" | ||
36 | + sortable | ||
37 | + align="center" | ||
38 | + ><template slot-scope="scoped" | ||
39 | + >{{ scoped.row.participationRate }}%</template | ||
40 | + ></el-table-column | ||
41 | + > | ||
42 | + <el-table-column | ||
43 | + prop="correctRate" | ||
44 | + label="正确率" | ||
45 | + sortable | ||
46 | + align="center" | ||
47 | + ><template slot-scope="scoped" | ||
48 | + >{{ scoped.row.correctRate }}%</template | ||
49 | + ></el-table-column | ||
50 | + > | ||
51 | + <el-table-column | ||
52 | + prop="answerCorrectRate" | ||
53 | + label="已答正确率" | ||
54 | + sortable | ||
55 | + align="center" | ||
56 | + ><template slot-scope="scoped" | ||
57 | + >{{ scoped.row.answerCorrectRate }}%</template | ||
58 | + ></el-table-column | ||
59 | + > | ||
60 | + <el-table-column | ||
61 | + v-for="(item, index) in optionsList" | ||
62 | + :key="index" | ||
63 | + :label="'Q' + (index + 1)" | ||
64 | + align="center" | ||
65 | + ><template slot-scope="scoped"> | ||
20 | <span :class="scoped.row['isRight' + index] ? '' : 'red'">{{ | 66 | <span :class="scoped.row['isRight' + index] ? '' : 'red'">{{ |
21 | scoped.row["answer" + index] | 67 | scoped.row["answer" + index] |
22 | }}</span> | 68 | }}</span> |
@@ -24,59 +70,136 @@ | @@ -24,59 +70,136 @@ | ||
24 | </el-table-column> | 70 | </el-table-column> |
25 | </template> | 71 | </template> |
26 | <template v-if="types == 2"> | 72 | <template v-if="types == 2"> |
27 | - <el-table-column prop="answerTimes" label="累计答题次数" align="center"></el-table-column> | ||
28 | - <el-table-column prop="correctAnswerTimes" label="累计答对次数" align="center"></el-table-column> | ||
29 | - <el-table-column prop="participationRate" label="总参与度" align="center"><template slot-scope="scoped">{{ | ||
30 | - scoped.row.participationRate }}%</template></el-table-column> | 73 | + <el-table-column |
74 | + prop="answerTimes" | ||
75 | + label="累计答题次数" | ||
76 | + align="center" | ||
77 | + ></el-table-column> | ||
78 | + <el-table-column | ||
79 | + prop="correctAnswerTimes" | ||
80 | + label="累计答对次数" | ||
81 | + align="center" | ||
82 | + ></el-table-column> | ||
83 | + <el-table-column | ||
84 | + prop="participationRate" | ||
85 | + label="总参与度" | ||
86 | + align="center" | ||
87 | + ><template slot-scope="scoped" | ||
88 | + >{{ scoped.row.participationRate }}%</template | ||
89 | + ></el-table-column | ||
90 | + > | ||
31 | 91 | ||
32 | - <el-table-column prop="participationRateRank" label="总参与度班名" align="center"></el-table-column> | ||
33 | - <el-table-column prop="correctRate" label="总正确率" align="center"><template slot-scope="scoped">{{ | ||
34 | - scoped.row.correctRate }}%</template></el-table-column> | ||
35 | - <el-table-column prop="correctRateRank" label="总正确率班名" sortable align="center"></el-table-column> | ||
36 | - <el-table-column prop="answerCorrectRate" label="已答正确率" align="center"><template slot-scope="scoped">{{ | ||
37 | - scoped.row.answerCorrectRate }}%</template></el-table-column> | 92 | + <el-table-column |
93 | + prop="participationRateRank" | ||
94 | + label="总参与度班名" | ||
95 | + align="center" | ||
96 | + ></el-table-column> | ||
97 | + <el-table-column prop="correctRate" label="总正确率" align="center" | ||
98 | + ><template slot-scope="scoped" | ||
99 | + >{{ scoped.row.correctRate }}%</template | ||
100 | + ></el-table-column | ||
101 | + > | ||
102 | + <el-table-column | ||
103 | + prop="correctRateRank" | ||
104 | + label="总正确率班名" | ||
105 | + sortable | ||
106 | + align="center" | ||
107 | + ></el-table-column> | ||
108 | + <el-table-column | ||
109 | + prop="answerCorrectRate" | ||
110 | + label="已答正确率" | ||
111 | + align="center" | ||
112 | + ><template slot-scope="scoped" | ||
113 | + >{{ scoped.row.answerCorrectRate }}%</template | ||
114 | + ></el-table-column | ||
115 | + > | ||
38 | <el-table-column label="查看折线图" align="center"> | 116 | <el-table-column label="查看折线图" align="center"> |
39 | <template slot-scope="scoped"> | 117 | <template slot-scope="scoped"> |
40 | - <el-button @click="openLineChart(scoped.row)" type="primary" size="mini" circle | ||
41 | - icon="el-icon-arrow-right"></el-button></template> | 118 | + <el-button |
119 | + @click="openLineChart(scoped.row)" | ||
120 | + type="primary" | ||
121 | + size="mini" | ||
122 | + circle | ||
123 | + icon="el-icon-arrow-right" | ||
124 | + ></el-button | ||
125 | + ></template> | ||
42 | </el-table-column> | 126 | </el-table-column> |
43 | </template> | 127 | </template> |
44 | <template v-if="types == 3"> | 128 | <template v-if="types == 3"> |
45 | - <el-table-column v-for="(item, index) in phaseOption" :key="index" :label="item" align="center"> | ||
46 | - <el-table-column align="center" :label="index == 0 ? '总课时数' : '课时数'" :prop="'periodCount' + item"> | 129 | + <el-table-column |
130 | + v-for="(item, index) in phaseOption" | ||
131 | + :key="index" | ||
132 | + :label="item" | ||
133 | + align="center" | ||
134 | + > | ||
135 | + <el-table-column | ||
136 | + align="center" | ||
137 | + :label="index == 0 ? '总课时数' : '课时数'" | ||
138 | + :prop="'periodCount' + item" | ||
139 | + > | ||
47 | </el-table-column> | 140 | </el-table-column> |
48 | - <el-table-column align="center" :label="index == 0 ? '总出题数' : '出题数'" :prop="'questionNum' + item"> | 141 | + <el-table-column |
142 | + align="center" | ||
143 | + :label="index == 0 ? '总出题数' : '出题数'" | ||
144 | + :prop="'questionNum' + item" | ||
145 | + > | ||
49 | </el-table-column> | 146 | </el-table-column> |
50 | - <el-table-column align="center" :label="index == 0 ? '总参与度' : '参与度'" | ||
51 | - :prop="'participationRate' + item"><template slot-scope="scoped">{{ scoped.row["participationRate" + item] | ||
52 | - }}%</template> | 147 | + <el-table-column |
148 | + align="center" | ||
149 | + :label="index == 0 ? '总参与度' : '参与度'" | ||
150 | + :prop="'participationRate' + item" | ||
151 | + ><template slot-scope="scoped" | ||
152 | + >{{ scoped.row["participationRate" + item] }}%</template | ||
153 | + > | ||
53 | </el-table-column> | 154 | </el-table-column> |
54 | - <el-table-column align="center" :label="index == 0 ? '总正确率' : '正确率'" :prop="'correctRate' + item"><template | ||
55 | - slot-scope="scoped">{{ scoped.row["correctRate" + item] }}%</template> | 155 | + <el-table-column |
156 | + align="center" | ||
157 | + :label="index == 0 ? '总正确率' : '正确率'" | ||
158 | + :prop="'correctRate' + item" | ||
159 | + ><template slot-scope="scoped" | ||
160 | + >{{ scoped.row["correctRate" + item] }}%</template | ||
161 | + > | ||
56 | </el-table-column> | 162 | </el-table-column> |
57 | </el-table-column> | 163 | </el-table-column> |
58 | <el-table-column label="查看雷达图" align="center"> | 164 | <el-table-column label="查看雷达图" align="center"> |
59 | <template slot-scope="scoped"> | 165 | <template slot-scope="scoped"> |
60 | - <el-button @click="openRandarChart(scoped.row)" type="primary" size="mini" circle | ||
61 | - icon="el-icon-arrow-right"></el-button></template> | 166 | + <el-button |
167 | + @click="openRandarChart(scoped.row)" | ||
168 | + type="primary" | ||
169 | + size="mini" | ||
170 | + circle | ||
171 | + icon="el-icon-arrow-right" | ||
172 | + ></el-button | ||
173 | + ></template> | ||
62 | </el-table-column> | 174 | </el-table-column> |
63 | </template> | 175 | </template> |
64 | </el-table> | 176 | </el-table> |
65 | - <el-dialog class="chart-dia" :visible.sync="chartDia" :title="chartTitle" width="800"> | 177 | + <el-dialog |
178 | + class="chart-dia" | ||
179 | + :visible.sync="chartDia" | ||
180 | + :title="chartTitle" | ||
181 | + width="800" | ||
182 | + > | ||
66 | <div class="chart-box"> | 183 | <div class="chart-box"> |
67 | - <LineChart v-if="types == 2" id="askLineChart" :params="chartData" :xAxis="xAxis" /> | 184 | + <LineChart |
185 | + v-if="types == 2" | ||
186 | + id="askLineChart" | ||
187 | + :params="chartData" | ||
188 | + :xAxis="xAxis" | ||
189 | + :tooltipFormatter="true" | ||
190 | + /> | ||
68 | <RadarChart v-if="types == 3" id="askRadarChart" :params="chartData" /> | 191 | <RadarChart v-if="types == 3" id="askRadarChart" :params="chartData" /> |
69 | </div> | 192 | </div> |
70 | </el-dialog> | 193 | </el-dialog> |
71 | </div> | 194 | </div> |
72 | </template> | 195 | </template> |
73 | <script> | 196 | <script> |
74 | -import LineChart from "@/components/charts/lineChart" | ||
75 | -import RadarChart from "@/components/charts/radarChart" | 197 | +import LineChart from "@/components/charts/lineChart"; |
198 | +import RadarChart from "@/components/charts/radarChart"; | ||
76 | export default { | 199 | export default { |
77 | components: { | 200 | components: { |
78 | LineChart, | 201 | LineChart, |
79 | - RadarChart | 202 | + RadarChart, |
80 | }, | 203 | }, |
81 | props: { | 204 | props: { |
82 | tableData: Array, | 205 | tableData: Array, |
@@ -97,11 +220,11 @@ export default { | @@ -97,11 +220,11 @@ export default { | ||
97 | }, | 220 | }, |
98 | computed: { | 221 | computed: { |
99 | resultData: function () { | 222 | resultData: function () { |
100 | - let resultData = [] | 223 | + let resultData = []; |
101 | if (this.tableData.length) { | 224 | if (this.tableData.length) { |
102 | let optionsList = []; | 225 | let optionsList = []; |
103 | let subjectName = []; | 226 | let subjectName = []; |
104 | - let rank = {} | 227 | + let rank = {}; |
105 | resultData = this.tableData.map((item) => { | 228 | resultData = this.tableData.map((item) => { |
106 | let params = {}; | 229 | let params = {}; |
107 | 230 | ||
@@ -116,8 +239,8 @@ export default { | @@ -116,8 +239,8 @@ export default { | ||
116 | items.answer == 1 | 239 | items.answer == 1 |
117 | ? "✓" | 240 | ? "✓" |
118 | : items.answer == 2 | 241 | : items.answer == 2 |
119 | - ? "✗" | ||
120 | - : items.answer; | 242 | + ? "✗" |
243 | + : items.answer; | ||
121 | }); | 244 | }); |
122 | } else if (this.types == 3) { | 245 | } else if (this.types == 3) { |
123 | item.dataList.map((items, index) => { | 246 | item.dataList.map((items, index) => { |
@@ -134,47 +257,49 @@ export default { | @@ -134,47 +257,49 @@ export default { | ||
134 | }); | 257 | }); |
135 | } | 258 | } |
136 | if (this.types != 3) { | 259 | if (this.types != 3) { |
137 | - let participationRateArr = [] | ||
138 | - let correctRateArr = [] | ||
139 | - this.tableData.map(item => { | ||
140 | - participationRateArr.push(item.participationRate) | ||
141 | - correctRateArr.push(item.correctRate) | ||
142 | - }) | ||
143 | - participationRateArr = [...new Set(participationRateArr)] | 260 | + let participationRateArr = []; |
261 | + let correctRateArr = []; | ||
262 | + this.tableData.map((item) => { | ||
263 | + participationRateArr.push(item.participationRate); | ||
264 | + correctRateArr.push(item.correctRate); | ||
265 | + }); | ||
266 | + participationRateArr = [...new Set(participationRateArr)]; | ||
144 | participationRateArr = participationRateArr.sort((a, b) => { | 267 | participationRateArr = participationRateArr.sort((a, b) => { |
145 | - return b - a | ||
146 | - }) | ||
147 | - correctRateArr = [...new Set(correctRateArr)] | 268 | + return b - a; |
269 | + }); | ||
270 | + correctRateArr = [...new Set(correctRateArr)]; | ||
148 | correctRateArr = correctRateArr.sort((a, b) => { | 271 | correctRateArr = correctRateArr.sort((a, b) => { |
149 | - return b - a | ||
150 | - }) | ||
151 | - let participationRateRank = participationRateArr.findIndex(value => { | ||
152 | - return item.participationRate == value | ||
153 | - }) | ||
154 | - let correctRateRank = correctRateArr.findIndex(value => { | ||
155 | - return item.correctRate == value | ||
156 | - }) | 272 | + return b - a; |
273 | + }); | ||
274 | + let participationRateRank = participationRateArr.findIndex( | ||
275 | + (value) => { | ||
276 | + return item.participationRate == value; | ||
277 | + } | ||
278 | + ); | ||
279 | + let correctRateRank = correctRateArr.findIndex((value) => { | ||
280 | + return item.correctRate == value; | ||
281 | + }); | ||
157 | rank = { | 282 | rank = { |
158 | participationRateRank: participationRateRank + 1, | 283 | participationRateRank: participationRateRank + 1, |
159 | - correctRateRank: correctRateRank + 1 | ||
160 | - } | 284 | + correctRateRank: correctRateRank + 1, |
285 | + }; | ||
161 | } | 286 | } |
162 | return { | 287 | return { |
163 | ...item, | 288 | ...item, |
164 | ...params, | 289 | ...params, |
165 | - ...rank | 290 | + ...rank, |
166 | }; | 291 | }; |
167 | }); | 292 | }); |
168 | this.phaseOption = [...subjectName]; | 293 | this.phaseOption = [...subjectName]; |
169 | this.optionsList = [...optionsList]; | 294 | this.optionsList = [...optionsList]; |
170 | } else { | 295 | } else { |
171 | - resultData = [] | ||
172 | - this.optionsList = [] | 296 | + resultData = []; |
297 | + this.optionsList = []; | ||
173 | } | 298 | } |
174 | - return resultData | ||
175 | - } | 299 | + return resultData; |
300 | + }, | ||
176 | }, | 301 | }, |
177 | - created() { }, | 302 | + created() {}, |
178 | methods: { | 303 | methods: { |
179 | setDuration(times) { | 304 | setDuration(times) { |
180 | if (times) { | 305 | if (times) { |
@@ -198,84 +323,82 @@ export default { | @@ -198,84 +323,82 @@ export default { | ||
198 | }, | 323 | }, |
199 | //查看折线图 | 324 | //查看折线图 |
200 | openLineChart(obj) { | 325 | openLineChart(obj) { |
201 | - this.chartTitle = `${obj.studentName}-${this.subjectNames[0]}-多课时作答表现图` | ||
202 | - this.chartDia = true | ||
203 | - let participationRate = [] | ||
204 | - let correctRate = [] | ||
205 | - let answerCorrectRate = [] | ||
206 | - let dataList = obj.dataList | ||
207 | - this.xAxis = dataList.map(item => { | ||
208 | - participationRate.push(item.participationRate) | ||
209 | - correctRate.push(item.correctRate) | ||
210 | - answerCorrectRate.push(item.answerCorrectRate) | ||
211 | - return item.name | ||
212 | - }) | 326 | + this.chartTitle = `${obj.studentName}-${this.subjectNames[0]}-多课时作答表现图`; |
327 | + this.chartDia = true; | ||
328 | + let participationRate = []; | ||
329 | + let correctRate = []; | ||
330 | + let answerCorrectRate = []; | ||
331 | + let dataList = obj.dataList; | ||
332 | + this.xAxis = dataList.map((item) => { | ||
333 | + participationRate.push(item.participationRate); | ||
334 | + correctRate.push(item.correctRate); | ||
335 | + answerCorrectRate.push(item.answerCorrectRate); | ||
336 | + return item.name; | ||
337 | + }); | ||
213 | this.chartData = [ | 338 | this.chartData = [ |
214 | { | 339 | { |
215 | name: "参与度", | 340 | name: "参与度", |
216 | - value: participationRate | 341 | + value: participationRate, |
217 | }, | 342 | }, |
218 | { | 343 | { |
219 | name: "正确率", | 344 | name: "正确率", |
220 | - value: correctRate | 345 | + value: correctRate, |
221 | }, | 346 | }, |
222 | { | 347 | { |
223 | name: "已答正确率", | 348 | name: "已答正确率", |
224 | - value: answerCorrectRate | 349 | + value: answerCorrectRate, |
225 | }, | 350 | }, |
226 | - ] | ||
227 | - | 351 | + ]; |
228 | }, | 352 | }, |
229 | openRandarChart(obj) { | 353 | openRandarChart(obj) { |
230 | this.chartData = { | 354 | this.chartData = { |
231 | indicator: [ | 355 | indicator: [ |
232 | { | 356 | { |
233 | - name: '', max: 100, | 357 | + name: "", |
358 | + max: 100, | ||
234 | axisLabel: { | 359 | axisLabel: { |
235 | show: true, | 360 | show: true, |
236 | showMaxLabel: true, | 361 | showMaxLabel: true, |
237 | - formatter: '{value}%' | 362 | + formatter: "{value}%", |
238 | }, | 363 | }, |
239 | }, | 364 | }, |
240 | ], | 365 | ], |
241 | - seriesData: [] | ||
242 | - } | ||
243 | - this.chartTitle = obj.studentName + '-多科-多课时作答表现图' | ||
244 | - let dataList = obj.dataList.slice(1, obj.dataList.length) | ||
245 | - let subjectList = dataList.map(item => item.subjectName) | 366 | + seriesData: [], |
367 | + }; | ||
368 | + this.chartTitle = obj.studentName + "-多科-多课时作答表现图"; | ||
369 | + let dataList = obj.dataList.slice(1, obj.dataList.length); | ||
370 | + let subjectList = dataList.map((item) => item.subjectName); | ||
246 | subjectList.map((item, index) => { | 371 | subjectList.map((item, index) => { |
247 | if (index < 1) { | 372 | if (index < 1) { |
248 | - this.chartData.indicator[index].name = item | 373 | + this.chartData.indicator[index].name = item; |
249 | } else { | 374 | } else { |
250 | - this.chartData.indicator.push({ name: item, max: 100 }) | 375 | + this.chartData.indicator.push({ name: item, max: 100 }); |
251 | } | 376 | } |
252 | - }) | 377 | + }); |
253 | // 为了美观 | 378 | // 为了美观 |
254 | if (this.chartData.indicator.length < 3) { | 379 | if (this.chartData.indicator.length < 3) { |
255 | - let num = this.chartData.indicator.length | 380 | + let num = this.chartData.indicator.length; |
256 | for (let i = 0; i < 6; i++) { | 381 | for (let i = 0; i < 6; i++) { |
257 | if (i >= num) { | 382 | if (i >= num) { |
258 | - this.chartData.indicator.push({ name: "", max: 100 }) | 383 | + this.chartData.indicator.push({ name: "", max: 100 }); |
259 | } | 384 | } |
260 | } | 385 | } |
261 | } | 386 | } |
262 | - let participationRate = dataList.map(item => item.participationRate) | ||
263 | - let correctRate = dataList.map(item => item.correctRate) | 387 | + let participationRate = dataList.map((item) => item.participationRate); |
388 | + let correctRate = dataList.map((item) => item.correctRate); | ||
264 | this.chartData.seriesData = [ | 389 | this.chartData.seriesData = [ |
265 | { | 390 | { |
266 | value: participationRate, | 391 | value: participationRate, |
267 | - name: '参与度' | 392 | + name: "参与度", |
268 | }, | 393 | }, |
269 | { | 394 | { |
270 | value: correctRate, | 395 | value: correctRate, |
271 | - name: '正确率' | 396 | + name: "正确率", |
272 | }, | 397 | }, |
273 | - ] | ||
274 | - this.chartDia = true | ||
275 | - | ||
276 | - | 398 | + ]; |
399 | + this.chartDia = true; | ||
277 | }, | 400 | }, |
278 | - } | 401 | + }, |
279 | }; | 402 | }; |
280 | </script> | 403 | </script> |
281 | <style lang="scss"> | 404 | <style lang="scss"> |
src/views/basic/ask/components/example.vue
1 | <template> | 1 | <template> |
2 | 2 | ||
3 | <el-table :data="tableData" border style="width: 100%"> | 3 | <el-table :data="tableData" border style="width: 100%"> |
4 | - <el-table-column prop="questionIndex" label="题号" align="center"><template slot-scope="scoped">Q{{ | ||
5 | - scoped.row.questionIndex }}</template></el-table-column> | 4 | + <el-table-column prop="title" label="题号" align="center"></el-table-column> |
6 | <el-table-column prop="questionType" label="题型" align="center"> | 5 | <el-table-column prop="questionType" label="题型" align="center"> |
7 | <template slot-scope="scoped">{{ | 6 | <template slot-scope="scoped">{{ |
8 | setSubPro(scoped.row.questionType) | 7 | setSubPro(scoped.row.questionType) |
src/views/basic/setUp/teacher.vue
@@ -468,6 +468,13 @@ export default { | @@ -468,6 +468,13 @@ export default { | ||
468 | }, | 468 | }, |
469 | //添加教师 | 469 | //添加教师 |
470 | addTeacher() { | 470 | addTeacher() { |
471 | + if (this.setTercherType == 1) { | ||
472 | + delete this.rulesTeacher.roleList | ||
473 | + } else { | ||
474 | + this.rulesTeacher.roleList = [ | ||
475 | + { required: true, message: "请选择角色信息", trigger: "blur" }, | ||
476 | + ] | ||
477 | + } | ||
471 | this.$refs.formTeacher.validate(async (valid) => { | 478 | this.$refs.formTeacher.validate(async (valid) => { |
472 | if (valid) { | 479 | if (valid) { |
473 | let obj = this.setTeacharForm(); | 480 | let obj = this.setTeacharForm(); |
@@ -497,11 +504,12 @@ export default { | @@ -497,11 +504,12 @@ export default { | ||
497 | if (res.status === 0) { | 504 | if (res.status === 0) { |
498 | this.$message.success(res.info); | 505 | this.$message.success(res.info); |
499 | this.diaTeacher = false; | 506 | this.diaTeacher = false; |
500 | - this._QueryData(6); | 507 | + this._QueryData(10); |
501 | } else { | 508 | } else { |
502 | this.$message.error(res.info); | 509 | this.$message.error(res.info); |
503 | } | 510 | } |
504 | } else { | 511 | } else { |
512 | + console.log(valid) | ||
505 | this.$message.warning("输入有误请检查!"); | 513 | this.$message.warning("输入有误请检查!"); |
506 | return false; | 514 | return false; |
507 | } | 515 | } |
@@ -631,7 +639,7 @@ export default { | @@ -631,7 +639,7 @@ export default { | ||
631 | ...query, | 639 | ...query, |
632 | }); | 640 | }); |
633 | if (status === 0) { | 641 | if (status === 0) { |
634 | - this._QueryData(6); | 642 | + this._QueryData(10); |
635 | } else { | 643 | } else { |
636 | this.$message.error(info); | 644 | this.$message.error(info); |
637 | } | 645 | } |
src/views/basic/test/components/multipleSubTest.vue
@@ -239,10 +239,12 @@ export default { | @@ -239,10 +239,12 @@ export default { | ||
239 | this.exportLoading = true; | 239 | this.exportLoading = true; |
240 | let studentIds = arr | 240 | let studentIds = arr |
241 | let query = {}; | 241 | let query = {}; |
242 | - if (studentIds.length > 0) { | ||
243 | - query.studentIds = studentIds | ||
244 | - } else { | ||
245 | - query.studentIds = [] | 242 | + if(studentIds != null){ |
243 | + if (studentIds.length > 0) { | ||
244 | + query.studentIds = studentIds | ||
245 | + } else { | ||
246 | + query.studentIds = [] | ||
247 | + } | ||
246 | } | 248 | } |
247 | 249 | ||
248 | 250 |
src/views/basic/test/components/multipleTest.vue
@@ -205,10 +205,12 @@ export default { | @@ -205,10 +205,12 @@ export default { | ||
205 | this.exportLoading = true; | 205 | this.exportLoading = true; |
206 | let studentIds = [...arr] | 206 | let studentIds = [...arr] |
207 | let query = {}; | 207 | let query = {}; |
208 | - if (studentIds.length > 0) { | ||
209 | - query.studentIds = studentIds | ||
210 | - } else { | ||
211 | - query.studentIds = [] | 208 | + if(studentIds != null){ |
209 | + if (studentIds.length > 0) { | ||
210 | + query.studentIds = studentIds | ||
211 | + } else { | ||
212 | + query.studentIds = [] | ||
213 | + } | ||
212 | } | 214 | } |
213 | const exportPhaseExamReport = this.role == "ROLE_PERSONAL" | 215 | const exportPhaseExamReport = this.role == "ROLE_PERSONAL" |
214 | ? this.$request.pExportPhaseExamReport | 216 | ? this.$request.pExportPhaseExamReport |
src/views/basic/test/components/test.vue
@@ -198,7 +198,7 @@ | @@ -198,7 +198,7 @@ | ||
198 | </div> | 198 | </div> |
199 | <div class="down"> | 199 | <div class="down"> |
200 | <div> | 200 | <div> |
201 | - <el-button @click="openDown" type="primary" plain round icon="fa fa-cloud-download">导出报表</el-button> | 201 | + <el-button @click="exportData" type="primary" plain round icon="fa fa-cloud-download">导出报表</el-button> |
202 | <el-button v-if="!this.$store.getters.code" @click="print" type="primary" plain round | 202 | <el-button v-if="!this.$store.getters.code" @click="print" type="primary" plain round |
203 | icon="el-icon-printer">打印</el-button> | 203 | icon="el-icon-printer">打印</el-button> |
204 | </div> | 204 | </div> |
@@ -237,7 +237,6 @@ | @@ -237,7 +237,6 @@ | ||
237 | <el-button @click="diaMinScore = false">取 消</el-button> | 237 | <el-button @click="diaMinScore = false">取 消</el-button> |
238 | </div> | 238 | </div> |
239 | </el-dialog> | 239 | </el-dialog> |
240 | - <ExportDia :exportStudent="exportStudent" :diaShow="diaShow" @cancel="cancel" @exportData="exportData" /> | ||
241 | </div> | 240 | </div> |
242 | </template> | 241 | </template> |
243 | <script> | 242 | <script> |
@@ -445,6 +444,7 @@ export default { | @@ -445,6 +444,7 @@ export default { | ||
445 | }); | 444 | }); |
446 | this.loading = false; | 445 | this.loading = false; |
447 | if (status === 0) { | 446 | if (status === 0) { |
447 | + this.$store.commit("setRefreshTestList", true) | ||
448 | this.$message.success(info); | 448 | this.$message.success(info); |
449 | this._QueryData(); | 449 | this._QueryData(); |
450 | this.paperModifyLog.modifiedTime = ""; | 450 | this.paperModifyLog.modifiedTime = ""; |
@@ -564,30 +564,15 @@ export default { | @@ -564,30 +564,15 @@ export default { | ||
564 | } | 564 | } |
565 | }, | 565 | }, |
566 | 566 | ||
567 | - //导出 | ||
568 | - openDown() { | ||
569 | - this.diaShow = true; | ||
570 | - }, | ||
571 | - cancel() { | ||
572 | - this.diaShow = false; | ||
573 | - }, | ||
574 | - async exportData(arr) { | 567 | + async exportData() { |
575 | if (this.exportLoading == true) return; | 568 | if (this.exportLoading == true) return; |
576 | this.exportLoading = true; | 569 | this.exportLoading = true; |
577 | - let studentIds = arr | ||
578 | - let query = {}; | ||
579 | - if (studentIds.length > 0) { | ||
580 | - query.studentIds = studentIds | ||
581 | - } else { | ||
582 | - query.studentIds = [] | ||
583 | - } | ||
584 | const exportExamReport = this.role == "ROLE_PERSONAL" ? | 570 | const exportExamReport = this.role == "ROLE_PERSONAL" ? |
585 | this.$request.pExportExamReport | 571 | this.$request.pExportExamReport |
586 | : this.$request.exportExamReport; | 572 | : this.$request.exportExamReport; |
587 | 573 | ||
588 | const data = await exportExamReport({ | 574 | const data = await exportExamReport({ |
589 | examId: this.id, | 575 | examId: this.id, |
590 | - ...query | ||
591 | }); | 576 | }); |
592 | this.exportLoading = false; | 577 | this.exportLoading = false; |
593 | if (!data.status) { | 578 | if (!data.status) { |
src/views/examinationPaper/add.vue
1 | +<!-- 组卷 --> | ||
1 | <template> | 2 | <template> |
2 | <div ref="content" class="content-box"> | 3 | <div ref="content" class="content-box"> |
3 | <back-box> | 4 | <back-box> |
@@ -384,19 +385,22 @@ | @@ -384,19 +385,22 @@ | ||
384 | <span class="answer-s" v-for="option in subQuestions.answerOptions.split(',')" :class="subQuestions.correctAnswer == option ? 'active' : '' | 385 | <span class="answer-s" v-for="option in subQuestions.answerOptions.split(',')" :class="subQuestions.correctAnswer == option ? 'active' : '' |
385 | " :key="option" @click="subQuestions.correctAnswer = option">{{ option }}</span> | 386 | " :key="option" @click="subQuestions.correctAnswer = option">{{ option }}</span> |
386 | </p> | 387 | </p> |
388 | + <p v-if="subQuestions.questionType == 3 || | ||
389 | + subQuestions.questionType == 2 | ||
390 | + " class="answer-box answer-box2"> | ||
391 | + <el-button size="mini" type="primary" icon="el-icon-plus" circle | ||
392 | + @click="addOptions(subQuestions)"></el-button> | ||
393 | + <el-button size="mini" type="primary" icon="el-icon-minus" round circle | ||
394 | + @click="removeOptions(subQuestions)"></el-button> | ||
395 | + </p> | ||
387 | </div> | 396 | </div> |
388 | <template v-if="isUpload"> | 397 | <template v-if="isUpload"> |
389 | <div class="qs-upload"> | 398 | <div class="qs-upload"> |
390 | <el-popover placement="right" width="600" trigger="click"> | 399 | <el-popover placement="right" width="600" trigger="click"> |
391 | <div class="screenshot-box"> | 400 | <div class="screenshot-box"> |
392 | - <iframe class="screenshot" | ||
393 | - v-if="subQuestions.screenshot && subQuestions.screenshot.includes('html')" | ||
394 | - :src="subQuestions.screenshot"></iframe> | ||
395 | - <img class="screenshot screenshot-img" | ||
396 | - v-if="subQuestions.screenshot && !subQuestions.screenshot.includes('html')" | ||
397 | - :src="subQuestions.screenshot" alt=""> | 401 | + <iframe class="screenshot" v-if="subQuestions.screenshot" :src="subQuestions.screenshot"></iframe> |
398 | <p style="textAlign:center"><el-button type="primary" round size="mini" icon="el-icon-upload" | 402 | <p style="textAlign:center"><el-button type="primary" round size="mini" icon="el-icon-upload" |
399 | - @click="openStem(subQuestions, index, indexs, 1)">{{ subQuestions.answerScreenshot ? "重新选择图片" | 403 | + @click="openStem(subQuestions, index, indexs, 1)">{{ subQuestions.screenshot ? "重新选择图片" |
400 | : "上传题干" }}</el-button> | 404 | : "上传题干" }}</el-button> |
401 | </p> | 405 | </p> |
402 | </div> | 406 | </div> |
@@ -407,12 +411,8 @@ | @@ -407,12 +411,8 @@ | ||
407 | <div class="qs-upload"> | 411 | <div class="qs-upload"> |
408 | <el-popover placement="right" width="600" trigger="click"> | 412 | <el-popover placement="right" width="600" trigger="click"> |
409 | <div class="screenshot-box"> | 413 | <div class="screenshot-box"> |
410 | - <iframe class="screenshot" | ||
411 | - v-if="subQuestions.answerScreenshot && subQuestions.answerScreenshot.includes('html')" | 414 | + <iframe class="screenshot" v-if="subQuestions.answerScreenshot" |
412 | :src="subQuestions.answerScreenshot"></iframe> | 415 | :src="subQuestions.answerScreenshot"></iframe> |
413 | - <img class="screenshot screenshot-img" | ||
414 | - v-if="subQuestions.answerScreenshot && !subQuestions.answerScreenshot.includes('html')" | ||
415 | - :src="subQuestions.answerScreenshot" alt=""> | ||
416 | <p style="textAlign:center"><el-button type="primary" round size="mini" icon="el-icon-upload" | 416 | <p style="textAlign:center"><el-button type="primary" round size="mini" icon="el-icon-upload" |
417 | @click="openStem(subQuestions, index, indexs, 2)">{{ subQuestions.answerScreenshot ? "重新选择图片" | 417 | @click="openStem(subQuestions, index, indexs, 2)">{{ subQuestions.answerScreenshot ? "重新选择图片" |
418 | : "上传题目解析" }}</el-button> | 418 | : "上传题目解析" }}</el-button> |
@@ -505,11 +505,7 @@ | @@ -505,11 +505,7 @@ | ||
505 | <template v-for="(question, index) in form.questionList"> | 505 | <template v-for="(question, index) in form.questionList"> |
506 | <div class="screenshot-box" v-for="(subQuestions, indexs) in question.subQuestions" | 506 | <div class="screenshot-box" v-for="(subQuestions, indexs) in question.subQuestions" |
507 | :key="index + '-' + indexs"> | 507 | :key="index + '-' + indexs"> |
508 | - <iframe class="screenshot" v-if="subQuestions.screenshot && subQuestions.screenshot.includes('html')" | ||
509 | - :src="subQuestions.screenshot"></iframe> | ||
510 | - <img class="screenshot screenshot-img" | ||
511 | - v-if="subQuestions.screenshot && !subQuestions.screenshot.includes('html')" :src="subQuestions.screenshot" | ||
512 | - alt=""> | 508 | + <iframe class="screenshot" v-if="subQuestions.screenshot" :src="subQuestions.screenshot"></iframe> |
513 | </div> | 509 | </div> |
514 | </template> | 510 | </template> |
515 | </div> | 511 | </div> |
@@ -523,20 +519,14 @@ | @@ -523,20 +519,14 @@ | ||
523 | v-if="dialogStem" width="500"> | 519 | v-if="dialogStem" width="500"> |
524 | <div class="upload-box"> | 520 | <div class="upload-box"> |
525 | <template v-show="stem.type == 1"> | 521 | <template v-show="stem.type == 1"> |
526 | - <img v-if="stem.screenshot && !stem.screenshot.includes('html')" :src="stem.screenshot" class="stem-pic" /> | 522 | + <iframe class="screenshot" v-if="stem.screenshot" :src="stem.screenshot"></iframe> |
527 | </template> | 523 | </template> |
528 | <template v-show="stem.type == 2"> | 524 | <template v-show="stem.type == 2"> |
529 | - <img v-if="stem.answerScreenshot && !stem.answerScreenshot.includes('html')" :src="stem.answerScreenshot" | ||
530 | - class="stem-pic" /> | 525 | + <iframe class="screenshot" v-if="stem.answerScreenshot" :src="stem.answerScreenshot"></iframe> |
531 | </template> | 526 | </template> |
532 | - <el-upload class="upload-demo" action="http://121.40.127.171/file/uploadImg" :limit="1" :on-success="upSuccess" | ||
533 | - :on-error="upError" accept="image/*"> | ||
534 | - <el-button v-show="stem.type == 1" size="small" type="primary">{{ | ||
535 | - stem.screenshot && !stem.screenshot.includes('html') ? "重新上传" : "选择照片" | ||
536 | - }}</el-button> | ||
537 | - <el-button v-show="stem.type == 2" size="small" type="primary">{{ | ||
538 | - stem.answerScreenshot && !stem.answerScreenshot.includes('html') ? "重新上传" : "选择照片" | ||
539 | - }}</el-button> | 527 | + <el-upload class="upload-demo" :action="uploadUrl" :limit="1" :on-success="upSuccess" :on-error="upError" |
528 | + accept="image/*"> | ||
529 | + <el-button size="small" type="primary">选择照片</el-button> | ||
540 | </el-upload> | 530 | </el-upload> |
541 | </div> | 531 | </div> |
542 | <div slot="footer"> | 532 | <div slot="footer"> |
@@ -708,6 +698,7 @@ export default { | @@ -708,6 +698,7 @@ export default { | ||
708 | //返回列表页参数记录 | 698 | //返回列表页参数记录 |
709 | listType: 1, | 699 | listType: 1, |
710 | listShare: 0, | 700 | listShare: 0, |
701 | + uploadUrl: "/file/uploadImgToHtml" | ||
711 | }; | 702 | }; |
712 | }, | 703 | }, |
713 | async created() { | 704 | async created() { |
@@ -1511,15 +1502,21 @@ export default { | @@ -1511,15 +1502,21 @@ export default { | ||
1511 | } | 1502 | } |
1512 | const { data, status, info } = await fetchSubjectList({ ...query }); | 1503 | const { data, status, info } = await fetchSubjectList({ ...query }); |
1513 | if (status === 0) { | 1504 | if (status === 0) { |
1505 | + let subjectArr = [] | ||
1514 | this.subjectList = | 1506 | this.subjectList = |
1515 | data.subjectNames?.map((item) => { | 1507 | data.subjectNames?.map((item) => { |
1508 | + subjectArr.push(item.subjectName || item) | ||
1516 | return { | 1509 | return { |
1517 | value: this.role == "ROLE_PERSONAL" ? item.subjectName : item, | 1510 | value: this.role == "ROLE_PERSONAL" ? item.subjectName : item, |
1518 | label: this.role == "ROLE_PERSONAL" ? item.subjectName : item, | 1511 | label: this.role == "ROLE_PERSONAL" ? item.subjectName : item, |
1519 | }; | 1512 | }; |
1520 | }) || []; | 1513 | }) || []; |
1521 | if (this.subjectList.length) { | 1514 | if (this.subjectList.length) { |
1522 | - this.form.subjectName = this.subjectList[0].value; | 1515 | + if (subjectArr.includes(this.$route.query.subjectName)) { |
1516 | + this.form.subjectName = this.$route.query.subjectName; | ||
1517 | + } else { | ||
1518 | + this.form.subjectName = this.subjectList[0].value; | ||
1519 | + } | ||
1523 | } | 1520 | } |
1524 | } else { | 1521 | } else { |
1525 | this.$message.error(info); | 1522 | this.$message.error(info); |
@@ -1541,9 +1538,7 @@ export default { | @@ -1541,9 +1538,7 @@ export default { | ||
1541 | if (this.role != "ROLE_PERSONAL") { | 1538 | if (this.role != "ROLE_PERSONAL") { |
1542 | this.form.sharingType = data.sharingType; | 1539 | this.form.sharingType = data.sharingType; |
1543 | } | 1540 | } |
1544 | - if (data.sharingType != 1) { | ||
1545 | - this.form.tagId = data.tagId === 0 ? "" : data.tagId; | ||
1546 | - } | 1541 | + this.form.tagId = ""; |
1547 | this.formatData(data) | 1542 | this.formatData(data) |
1548 | } else { | 1543 | } else { |
1549 | this.$message.error(info); | 1544 | this.$message.error(info); |
src/views/examinationPaper/addAsk.vue renamed to src/views/examinationPaper/addQs.vue
1 | +<!-- 备题 --> | ||
1 | <template> | 2 | <template> |
2 | <div ref="content" class="content-box"> | 3 | <div ref="content" class="content-box"> |
3 | <back-box> | 4 | <back-box> |
@@ -120,40 +121,12 @@ | @@ -120,40 +121,12 @@ | ||
120 | </div> | 121 | </div> |
121 | 122 | ||
122 | <div class="qs-upload"> | 123 | <div class="qs-upload"> |
123 | - <el-popover placement="right" width="600" trigger="click"> | ||
124 | - <div class="screenshot-box"> | ||
125 | - <iframe class="screenshot" | ||
126 | - v-if="subQuestions.screenshot && subQuestions.screenshot.includes('html')" | ||
127 | - :src="subQuestions.screenshot"></iframe> | ||
128 | - <img class="screenshot screenshot-img" | ||
129 | - v-if="subQuestions.screenshot && !subQuestions.screenshot.includes('html')" | ||
130 | - :src="subQuestions.screenshot" alt=""> | ||
131 | - <p style="textAlign:center"><el-button type="primary" round size="mini" icon="el-icon-upload" | ||
132 | - @click="openStem(subQuestions, index, indexs, 1)">{{ subQuestions.answerScreenshot ? "重新选择图片" | ||
133 | - : "上传题干" }}</el-button> | ||
134 | - </p> | ||
135 | - </div> | ||
136 | - <el-button slot="reference" class="icon-tickets" type="primary" circle size="mini" | ||
137 | - icon="el-icon-tickets"></el-button> | ||
138 | - </el-popover> | 124 | + <el-button slot="reference" class="icon-tickets" type="primary" circle size="mini" |
125 | + icon="el-icon-tickets" @click="openStem(subQuestions, index, indexs, 1)"></el-button> | ||
139 | </div> | 126 | </div> |
140 | <div class="qs-upload"> | 127 | <div class="qs-upload"> |
141 | - <el-popover placement="right" width="600" trigger="click"> | ||
142 | - <div class="screenshot-box"> | ||
143 | - <iframe class="screenshot" | ||
144 | - v-if="subQuestions.answerScreenshot && subQuestions.answerScreenshot.includes('html')" | ||
145 | - :src="subQuestions.answerScreenshot"></iframe> | ||
146 | - <img class="screenshot screenshot-img" | ||
147 | - v-if="subQuestions.answerScreenshot && !subQuestions.answerScreenshot.includes('html')" | ||
148 | - :src="subQuestions.answerScreenshot" alt=""> | ||
149 | - <p style="textAlign:center"><el-button type="primary" round size="mini" icon="el-icon-upload" | ||
150 | - @click="openStem(subQuestions, index, indexs, 2)">{{ subQuestions.answerScreenshot ? "重新选择图片" | ||
151 | - : "上传题目解析" }}</el-button> | ||
152 | - </p> | ||
153 | - </div> | ||
154 | - <el-button slot="reference" class="icon-tickets" type="primary" circle size="mini" | ||
155 | - icon="el-icon-tickets"></el-button> | ||
156 | - </el-popover> | 128 | + <el-button slot="reference" class="icon-tickets" type="primary" circle size="mini" |
129 | + icon="el-icon-tickets" @click="openStem(subQuestions, index, indexs, 2)"></el-button> | ||
157 | </div> | 130 | </div> |
158 | <div class="qs-upload" v-if="knowledgeData.length"> | 131 | <div class="qs-upload" v-if="knowledgeData.length"> |
159 | <el-button type="primary" circle size="mini" icon="el-icon-price-tag" | 132 | <el-button type="primary" circle size="mini" icon="el-icon-price-tag" |
@@ -226,24 +199,18 @@ | @@ -226,24 +199,18 @@ | ||
226 | v-if="dialogStem" width="500"> | 199 | v-if="dialogStem" width="500"> |
227 | <div class="upload-box"> | 200 | <div class="upload-box"> |
228 | <template v-show="stem.type == 1"> | 201 | <template v-show="stem.type == 1"> |
229 | - <img v-if="stem.screenshot && !stem.screenshot.includes('html')" :src="stem.screenshot" class="stem-pic" /> | 202 | + <iframe class="screenshot" v-if="stem.screenshot" :src="stem.screenshot"></iframe> |
230 | </template> | 203 | </template> |
231 | <template v-show="stem.type == 2"> | 204 | <template v-show="stem.type == 2"> |
232 | - <img v-if="stem.answerScreenshot && !stem.answerScreenshot.includes('html')" :src="stem.answerScreenshot" | ||
233 | - class="stem-pic" /> | 205 | + <iframe class="screenshot" v-if="stem.answerScreenshot" :src="stem.answerScreenshot"></iframe> |
234 | </template> | 206 | </template> |
235 | - <el-upload class="upload-demo" action="http://121.40.127.171/file/uploadImg" :limit="1" | ||
236 | - :on-success="upSuccess" :on-error="upError" accept="image/*"> | ||
237 | - <el-button v-show="stem.type == 1" size="small" type="primary">{{ | ||
238 | - stem.screenshot && !stem.screenshot.includes('html') ? "重新上传" : "选择照片" | ||
239 | - }}</el-button> | ||
240 | - <el-button v-show="stem.type == 2" size="small" type="primary">{{ | ||
241 | - stem.answerScreenshot && !stem.answerScreenshot.includes('html') ? "重新上传" : "选择照片" | ||
242 | - }}</el-button> | 207 | + <el-upload class="upload-demo" :action="uploadUrl" :limit="1" :on-success="upSuccess" :on-error="upError" |
208 | + accept="image/*"> | ||
209 | + <el-button size="small" type="primary">选择上传照片</el-button> | ||
243 | </el-upload> | 210 | </el-upload> |
244 | </div> | 211 | </div> |
245 | <div slot="footer"> | 212 | <div slot="footer"> |
246 | - <el-button @click="dialogStem = false">确定</el-button> | 213 | + <el-button @click="dialogStem = false">保存</el-button> |
247 | </div> | 214 | </div> |
248 | </el-dialog> | 215 | </el-dialog> |
249 | <el-dialog :close-on-click-modal="false" title="知识点" :visible.sync="dialogKnowledge" width="500"> | 216 | <el-dialog :close-on-click-modal="false" title="知识点" :visible.sync="dialogKnowledge" width="500"> |
@@ -268,11 +235,7 @@ | @@ -268,11 +235,7 @@ | ||
268 | <div class="question-box"> | 235 | <div class="question-box"> |
269 | <template v-for="question in form.questionList"> | 236 | <template v-for="question in form.questionList"> |
270 | <div class="screenshot-box" v-for="subQuestions in question.subQuestions"> | 237 | <div class="screenshot-box" v-for="subQuestions in question.subQuestions"> |
271 | - <iframe class="screenshot" v-if="subQuestions.screenshot && subQuestions.screenshot.includes('html')" | ||
272 | - :src="subQuestions.screenshot"></iframe> | ||
273 | - <img class="screenshot screenshot-img" | ||
274 | - v-if="subQuestions.screenshot && !subQuestions.screenshot.includes('html')" :src="subQuestions.screenshot" | ||
275 | - alt=""> | 238 | + <iframe class="screenshot" v-if="subQuestions.screenshot" :src="subQuestions.screenshot"></iframe> |
276 | </div> | 239 | </div> |
277 | </template> | 240 | </template> |
278 | </div> | 241 | </div> |
@@ -355,6 +318,7 @@ export default { | @@ -355,6 +318,7 @@ export default { | ||
355 | //返回列表页参数记录 | 318 | //返回列表页参数记录 |
356 | listType: 1, | 319 | listType: 1, |
357 | listShare: 0, | 320 | listShare: 0, |
321 | + uploadUrl: "/file/uploadImgToHtml" | ||
358 | }; | 322 | }; |
359 | }, | 323 | }, |
360 | computed: { | 324 | computed: { |
@@ -391,11 +355,13 @@ export default { | @@ -391,11 +355,13 @@ export default { | ||
391 | this.role = | 355 | this.role = |
392 | this.$store.getters.info.showRole || | 356 | this.$store.getters.info.showRole || |
393 | this.$store.getters.info.permissions[0].role; | 357 | this.$store.getters.info.permissions[0].role; |
394 | - let params = this.$route.query.params && JSON.parse(this.$route.query.params) || null | ||
395 | - this.form.title = params?.name | ||
396 | - this.form.id = params?.id | ||
397 | - this.form.sharingType = params?.sharingType || 0 | ||
398 | - this.formatData(params) | 358 | + if (this.type != 2) { |
359 | + let params = this.$route.query.params && JSON.parse(this.$route.query.params) || null | ||
360 | + this.form.title = params?.name | ||
361 | + this.form.id = params?.id | ||
362 | + this.form.sharingType = params?.sharingType || 0 | ||
363 | + this.formatData(params) | ||
364 | + } | ||
399 | console.log(this.form) | 365 | console.log(this.form) |
400 | if (this.role != "ROLE_PERSONAL") { | 366 | if (this.role != "ROLE_PERSONAL") { |
401 | this.formRules.gradeName = [ | 367 | this.formRules.gradeName = [ |
@@ -934,9 +900,12 @@ export default { | @@ -934,9 +900,12 @@ export default { | ||
934 | }); | 900 | }); |
935 | if (status == 0) { | 901 | if (status == 0) { |
936 | this.form.title = data.title + "_副本"; | 902 | this.form.title = data.title + "_副本"; |
903 | + | ||
904 | + this.form.examsDuration = data.examsDuration; | ||
937 | if (this.role != "ROLE_PERSONAL") { | 905 | if (this.role != "ROLE_PERSONAL") { |
938 | this.form.sharingType = data.sharingType; | 906 | this.form.sharingType = data.sharingType; |
939 | } | 907 | } |
908 | + this.form.tagId = ""; | ||
940 | this.formatData(data) | 909 | this.formatData(data) |
941 | } else { | 910 | } else { |
942 | this.$message.error(info); | 911 | this.$message.error(info); |
src/views/examinationPaper/edit.vue
@@ -80,11 +80,7 @@ | @@ -80,11 +80,7 @@ | ||
80 | <div class="qs-set"> | 80 | <div class="qs-set"> |
81 | <el-popover placement="right" width="600" trigger="click"> | 81 | <el-popover placement="right" width="600" trigger="click"> |
82 | <div class="screenshot-box"> | 82 | <div class="screenshot-box"> |
83 | - <iframe class="screenshot" v-if="subQuestions.screenshot && subQuestions.screenshot.includes('html')" | ||
84 | - :src="subQuestions.screenshot"></iframe> | ||
85 | - <img class="screenshot screenshot-img" | ||
86 | - v-if="subQuestions.screenshot && !subQuestions.screenshot.includes('html')" | ||
87 | - :src="subQuestions.screenshot" alt=""> | 83 | + <iframe class="screenshot" v-if="subQuestions.screenshot" :src="subQuestions.screenshot"></iframe> |
88 | <p style="textAlign:center"><el-button type="primary" round size="mini" icon="el-icon-upload" | 84 | <p style="textAlign:center"><el-button type="primary" round size="mini" icon="el-icon-upload" |
89 | @click="openStem(subQuestions, 1, indexs)">重新选择图片</el-button></p> | 85 | @click="openStem(subQuestions, 1, indexs)">重新选择图片</el-button></p> |
90 | </div> | 86 | </div> |
@@ -95,12 +91,8 @@ | @@ -95,12 +91,8 @@ | ||
95 | <div class="qs-set"> | 91 | <div class="qs-set"> |
96 | <el-popover placement="right" width="600" trigger="click"> | 92 | <el-popover placement="right" width="600" trigger="click"> |
97 | <div class="screenshot-box"> | 93 | <div class="screenshot-box"> |
98 | - <iframe class="screenshot" | ||
99 | - v-if="subQuestions.answerScreenshot && subQuestions.answerScreenshot.includes('html')" | 94 | + <iframe class="screenshot" v-if="subQuestions.answerScreenshot" |
100 | :src="subQuestions.answerScreenshot"></iframe> | 95 | :src="subQuestions.answerScreenshot"></iframe> |
101 | - <img class="screenshot screenshot-img" | ||
102 | - v-if="subQuestions.answerScreenshot && !subQuestions.answerScreenshot.includes('html')" | ||
103 | - :src="subQuestions.answerScreenshot" alt=""> | ||
104 | <p style="textAlign:center"><el-button type="primary" round size="mini" icon="el-icon-upload" | 96 | <p style="textAlign:center"><el-button type="primary" round size="mini" icon="el-icon-upload" |
105 | @click="openStem(subQuestions, 2, indexs)">重新选择图片</el-button></p> | 97 | @click="openStem(subQuestions, 2, indexs)">重新选择图片</el-button></p> |
106 | </div> | 98 | </div> |
@@ -281,14 +273,9 @@ | @@ -281,14 +273,9 @@ | ||
281 | <img v-if="stem.answerScreenshot && !stem.answerScreenshot.includes('html')" :src="stem.answerScreenshot" | 273 | <img v-if="stem.answerScreenshot && !stem.answerScreenshot.includes('html')" :src="stem.answerScreenshot" |
282 | class="stem-pic" /> | 274 | class="stem-pic" /> |
283 | </template> | 275 | </template> |
284 | - <el-upload class="upload-demo" action="http://121.40.127.171/file/uploadImg" :limit="1" :on-success="upSuccess" | ||
285 | - :on-error="upError" accept="image/*"> | ||
286 | - <el-button v-show="stem.type == 1" size="small" type="primary">{{ | ||
287 | - stem.screenshot && !stem.screenshot.includes('html') ? "重新上传" : "选择照片" | ||
288 | - }}</el-button> | ||
289 | - <el-button v-show="stem.type == 2" size="small" type="primary">{{ | ||
290 | - stem.answerScreenshot && !stem.answerScreenshot.includes('html') ? "重新上传" : "选择照片" | ||
291 | - }}</el-button> | 276 | + <el-upload class="upload-demo" :action="uploadUrl" :limit="1" :on-success="upSuccess" :on-error="upError" |
277 | + accept="image/*"> | ||
278 | + <el-button size="small" type="primary">选择照片</el-button> | ||
292 | </el-upload> | 279 | </el-upload> |
293 | </div> | 280 | </div> |
294 | <div slot="footer"> | 281 | <div slot="footer"> |
@@ -364,7 +351,8 @@ export default { | @@ -364,7 +351,8 @@ export default { | ||
364 | answerScreenshot: "", //题目解析图片地址 | 351 | answerScreenshot: "", //题目解析图片地址 |
365 | knowledge: [], //知识点 | 352 | knowledge: [], //知识点 |
366 | }, | 353 | }, |
367 | - gradeClassList: [] //学段列表 | 354 | + gradeClassList: [], //学段列表 |
355 | + uploadUrl: "/file/uploadImgToHtml" | ||
368 | }; | 356 | }; |
369 | }, | 357 | }, |
370 | computed: { | 358 | computed: { |
src/views/examinationPaper/index.vue
@@ -39,7 +39,10 @@ | @@ -39,7 +39,10 @@ | ||
39 | <el-option v-for="item in subjectList" :key="item.value" :label="item.label" :value="item.value"> | 39 | <el-option v-for="item in subjectList" :key="item.value" :label="item.label" :value="item.value"> |
40 | </el-option> | 40 | </el-option> |
41 | </el-select> | 41 | </el-select> |
42 | - | 42 | + <el-select v-if="query.type == 2" class="sel" v-model="query.tagId" placeholder="选择类型" @change="getData(false)"> |
43 | + <el-option v-for="item in typeList" :key="item.label" :label="item.label" :value="item.value">{{ item.label }} | ||
44 | + </el-option> | ||
45 | + </el-select> | ||
43 | <el-input placeholder="试卷名称" v-model="query.title" class="input-with-select" @keyup.enter.native="getData(true)"> | 46 | <el-input placeholder="试卷名称" v-model="query.title" class="input-with-select" @keyup.enter.native="getData(true)"> |
44 | <el-button slot="append" icon="el-icon-search" @click="getData(true)"></el-button> | 47 | <el-button slot="append" icon="el-icon-search" @click="getData(true)"></el-button> |
45 | </el-input> | 48 | </el-input> |
@@ -101,7 +104,7 @@ | @@ -101,7 +104,7 @@ | ||
101 | <el-dropdown-menu slot="dropdown"> | 104 | <el-dropdown-menu slot="dropdown"> |
102 | <el-dropdown-item :command="1" | 105 | <el-dropdown-item :command="1" |
103 | v-if="userName == item.realName && role != 'ROLE_PERSONAL'">修改分享范围</el-dropdown-item> | 106 | v-if="userName == item.realName && role != 'ROLE_PERSONAL'">修改分享范围</el-dropdown-item> |
104 | - <el-dropdown-item v-show="query.type == 2" :command="2">复制</el-dropdown-item> | 107 | + <el-dropdown-item :command="2">复制</el-dropdown-item> |
105 | <el-dropdown-item v-show="query.share == 0" :command="3">放入回收站</el-dropdown-item> | 108 | <el-dropdown-item v-show="query.share == 0" :command="3">放入回收站</el-dropdown-item> |
106 | </el-dropdown-menu> | 109 | </el-dropdown-menu> |
107 | </el-dropdown> | 110 | </el-dropdown> |
@@ -168,12 +171,14 @@ export default { | @@ -168,12 +171,14 @@ export default { | ||
168 | query: { | 171 | query: { |
169 | classId: "", | 172 | classId: "", |
170 | subjectName: "", | 173 | subjectName: "", |
174 | + tagId: "", | ||
171 | title: "", | 175 | title: "", |
172 | type: 1, //试卷类型 | 176 | type: 1, //试卷类型 |
173 | share: 0, //分享类型 | 177 | share: 0, //分享类型 |
174 | }, | 178 | }, |
175 | classList: [], | 179 | classList: [], |
176 | subjectList: [], | 180 | subjectList: [], |
181 | + typeList: [], | ||
177 | archivedTotal: 0, //已归档答题卡数量 | 182 | archivedTotal: 0, //已归档答题卡数量 |
178 | tableData: [], | 183 | tableData: [], |
179 | shareForm: { | 184 | shareForm: { |
@@ -213,6 +218,7 @@ export default { | @@ -213,6 +218,7 @@ export default { | ||
213 | if (!this.query.classId) { | 218 | if (!this.query.classId) { |
214 | return; | 219 | return; |
215 | } | 220 | } |
221 | + this._QueryTypeList() | ||
216 | await this._QuerySubjectList(); | 222 | await this._QuerySubjectList(); |
217 | this._QueryData(); | 223 | this._QueryData(); |
218 | }, | 224 | }, |
@@ -228,7 +234,7 @@ export default { | @@ -228,7 +234,7 @@ export default { | ||
228 | path: "/examinationPaperArchiving", | 234 | path: "/examinationPaperArchiving", |
229 | }); | 235 | }); |
230 | }, | 236 | }, |
231 | - //去备题 | 237 | + //去组卷 |
232 | toAdd(query) { | 238 | toAdd(query) { |
233 | if (!this.query.classId) { | 239 | if (!this.query.classId) { |
234 | this.$message.warning("没有任课班级,请先设置。"); | 240 | this.$message.warning("没有任课班级,请先设置。"); |
@@ -240,18 +246,19 @@ export default { | @@ -240,18 +246,19 @@ export default { | ||
240 | ...query, | 246 | ...query, |
241 | listType: this.query.type, | 247 | listType: this.query.type, |
242 | listShare: this.query.share, | 248 | listShare: this.query.share, |
249 | + subjectName: this.query.subjectName | ||
243 | } | 250 | } |
244 | }; | 251 | }; |
245 | this.$router.push(routerItem); | 252 | this.$router.push(routerItem); |
246 | }, | 253 | }, |
247 | - //去组卷 | ||
248 | - toAddAsk(query) { | 254 | + //去备题 |
255 | + toAddQs(query) { | ||
249 | if (!this.query.classId) { | 256 | if (!this.query.classId) { |
250 | this.$message.warning("没有任课班级,请先设置。"); | 257 | this.$message.warning("没有任课班级,请先设置。"); |
251 | return; | 258 | return; |
252 | } | 259 | } |
253 | let routerItem = { | 260 | let routerItem = { |
254 | - path: "/examinationPaperAddAsk", | 261 | + path: "/examinationPaperAddQs", |
255 | query: { | 262 | query: { |
256 | ...query, | 263 | ...query, |
257 | listType: this.query.type, | 264 | listType: this.query.type, |
@@ -280,7 +287,11 @@ export default { | @@ -280,7 +287,11 @@ export default { | ||
280 | break; | 287 | break; |
281 | case 2: | 288 | case 2: |
282 | //复制 | 289 | //复制 |
283 | - that.toAdd({ type: 2, paperId: item.id }); | 290 | + if (that.type == 2) { |
291 | + that.toAdd({ type: 2, paperId: item.id }); | ||
292 | + } else { | ||
293 | + that.toAddQs({ type: 2, paperId: item.id }); | ||
294 | + } | ||
284 | break; | 295 | break; |
285 | case 3: | 296 | case 3: |
286 | //归档 | 297 | //归档 |
@@ -290,8 +301,8 @@ export default { | @@ -290,8 +301,8 @@ export default { | ||
290 | }, | 301 | }, |
291 | changPaperType(type) { | 302 | changPaperType(type) { |
292 | this.query.type = type | 303 | this.query.type = type |
304 | + this.query.tagId = "" | ||
293 | this.changShare(0) | 305 | this.changShare(0) |
294 | - | ||
295 | }, | 306 | }, |
296 | changePage(page) { | 307 | changePage(page) { |
297 | this.page = page; | 308 | this.page = page; |
@@ -339,6 +350,9 @@ export default { | @@ -339,6 +350,9 @@ export default { | ||
339 | //切换班级 | 350 | //切换班级 |
340 | async changClazz() { | 351 | async changClazz() { |
341 | this.page = 1; | 352 | this.page = 1; |
353 | + if (this.query.type == 2) { | ||
354 | + await this._QueryTypeList() | ||
355 | + } | ||
342 | await this._QuerySubjectList(); | 356 | await this._QuerySubjectList(); |
343 | this._QueryData(false); | 357 | this._QueryData(false); |
344 | }, | 358 | }, |
@@ -418,6 +432,35 @@ export default { | @@ -418,6 +432,35 @@ export default { | ||
418 | this.$message.error(info); | 432 | this.$message.error(info); |
419 | } | 433 | } |
420 | }, | 434 | }, |
435 | + // 查找答题卡类型 | ||
436 | + async _QueryTypeList() { | ||
437 | + if (!this.query.classId) return; | ||
438 | + let fetchTypeNames = | ||
439 | + this.role == "ROLE_PERSONAL" | ||
440 | + ? this.$request.pPaperTagList | ||
441 | + : this.$request.fetchTypeNames; | ||
442 | + | ||
443 | + const { data, status, info } = await fetchTypeNames({ | ||
444 | + classId: this.query.classId, | ||
445 | + type: 0, | ||
446 | + }); | ||
447 | + if (status === 0) { | ||
448 | + this.typeList = | ||
449 | + data.list.map((item) => { | ||
450 | + return { | ||
451 | + value: item.tagId, | ||
452 | + label: item.tag, | ||
453 | + }; | ||
454 | + }) || []; | ||
455 | + this.typeList.unshift({ | ||
456 | + value: "", | ||
457 | + label: "请选择标签", | ||
458 | + }); | ||
459 | + this.query.tagId = "" | ||
460 | + } else { | ||
461 | + this.$message.error(info); | ||
462 | + } | ||
463 | + }, | ||
421 | async _QueryData(type) { | 464 | async _QueryData(type) { |
422 | if (!this.query.classId) return; | 465 | if (!this.query.classId) return; |
423 | this.loading = true; | 466 | this.loading = true; |
@@ -479,7 +522,7 @@ export default { | @@ -479,7 +522,7 @@ export default { | ||
479 | if (this.query.type == 2) { | 522 | if (this.query.type == 2) { |
480 | this.toAdd({ params, isUpload: 1 }) | 523 | this.toAdd({ params, isUpload: 1 }) |
481 | } else { | 524 | } else { |
482 | - this.toAddAsk({ params }) | 525 | + this.toAddQs({ params }) |
483 | } | 526 | } |
484 | } | 527 | } |
485 | }, | 528 | }, |