Commit 236b1f0ec23f7f97a3414a55b1990a442b62efe8
1 parent
277915e3
周末-飞书bug
Showing
20 changed files
with
247 additions
and
136 deletions
src/api/apis/apis.js
@@ -282,6 +282,24 @@ export default { | @@ -282,6 +282,24 @@ export default { | ||
282 | responseType: 'arraybuffer', | 282 | responseType: 'arraybuffer', |
283 | }); | 283 | }); |
284 | }, | 284 | }, |
285 | + //任课老师-导出阶段测练报表 | ||
286 | + exportPhaseExamReport(data) { | ||
287 | + return service({ | ||
288 | + url: setUpUrls.exportPhaseExamReport, | ||
289 | + method: "POST", | ||
290 | + data, | ||
291 | + responseType: 'arraybuffer', | ||
292 | + }); | ||
293 | + }, | ||
294 | + //任课老师-导出单卷测练报表 | ||
295 | + exportExamReport(data) { | ||
296 | + return service({ | ||
297 | + url: setUpUrls.exportExamReport, | ||
298 | + method: "POST", | ||
299 | + data, | ||
300 | + responseType: 'arraybuffer', | ||
301 | + }); | ||
302 | + }, | ||
285 | 303 | ||
286 | 304 | ||
287 | // 查询角色列表 | 305 | // 查询角色列表 |
src/api/axios.js
@@ -39,7 +39,7 @@ service.interceptors.response.use( | @@ -39,7 +39,7 @@ service.interceptors.response.use( | ||
39 | store.commit("delTokenSources", response.config.cancelToken); | 39 | store.commit("delTokenSources", response.config.cancelToken); |
40 | } | 40 | } |
41 | if (response.status == 200) { | 41 | if (response.status == 200) { |
42 | - // Cookies.set("access_token", response.data.message, { expires: 1 / 12 }) | 42 | + // Cookies.set("access_token", response.data.info, { expires: 1 / 12 }) |
43 | // console.log(response.status) | 43 | // console.log(response.status) |
44 | if (res.status == 999) { | 44 | if (res.status == 999) { |
45 | if (!location.href.includes("localhost")) { | 45 | if (!location.href.includes("localhost")) { |
@@ -57,7 +57,7 @@ service.interceptors.response.use( | @@ -57,7 +57,7 @@ service.interceptors.response.use( | ||
57 | } | 57 | } |
58 | } | 58 | } |
59 | } else { | 59 | } else { |
60 | - // Cookies.set("access_token", response.data.message, { expires: 1 / 12 }) | 60 | + // Cookies.set("access_token", response.data.info, { expires: 1 / 12 }) |
61 | } | 61 | } |
62 | } | 62 | } |
63 | return Promise.resolve(res); | 63 | return Promise.resolve(res); |
src/api/urls/apis.js
@@ -69,6 +69,10 @@ export default { | @@ -69,6 +69,10 @@ export default { | ||
69 | exportPhaseInteractiveReport: "/api_html/teaching/exportPhaseInteractiveReport", | 69 | exportPhaseInteractiveReport: "/api_html/teaching/exportPhaseInteractiveReport", |
70 | //任课老师-导出单课时报表 | 70 | //任课老师-导出单课时报表 |
71 | exportPeriodReport: "/api_html/teaching/exportPeriodReport", | 71 | exportPeriodReport: "/api_html/teaching/exportPeriodReport", |
72 | + //任课老师-导出阶段测练报表 | ||
73 | + exportPhaseExamReport: "/api_html/teaching/exportPhaseExamReport", | ||
74 | + //任课老师-导出单卷测练报表 | ||
75 | + exportExamReport: "/api_html/teaching/exportExamReport", | ||
72 | 76 | ||
73 | 77 | ||
74 | 78 |
src/components/charts/scatterChart.vue
@@ -42,9 +42,10 @@ export default { | @@ -42,9 +42,10 @@ export default { | ||
42 | type: "cross", | 42 | type: "cross", |
43 | }, | 43 | }, |
44 | formatter: function (params) { | 44 | formatter: function (params) { |
45 | + let value = params.data.value.toFixed(2) | ||
45 | return ( | 46 | return ( |
46 | params.marker + | 47 | params.marker + |
47 | - ` 占比:${params.data.value}% <br>数量:${params.data.count}` | 48 | + ` 占比:${value}% <br>数量:${params.data.count}` |
48 | ); | 49 | ); |
49 | }, | 50 | }, |
50 | }, | 51 | }, |
src/components/setAnswer.vue
src/router/index.js
@@ -34,13 +34,14 @@ const SetUpTeacher = () => import("@/views/setUp/teacher") | @@ -34,13 +34,14 @@ const SetUpTeacher = () => import("@/views/setUp/teacher") | ||
34 | * 重写路由的push方法 | 34 | * 重写路由的push方法 |
35 | */ | 35 | */ |
36 | const routerPush = Router.prototype.push | 36 | const routerPush = Router.prototype.push |
37 | -Router.prototype.push = function push (location) { | 37 | +Router.prototype.push = function push(location) { |
38 | return routerPush.call(this, location).catch(error => error) | 38 | return routerPush.call(this, location).catch(error => error) |
39 | } | 39 | } |
40 | Vue.use(Router) | 40 | Vue.use(Router) |
41 | let routeName = en.routeName | 41 | let routeName = en.routeName |
42 | let defaultRouter = [ | 42 | let defaultRouter = [ |
43 | - { path: "/", | 43 | + { |
44 | + path: "/", | ||
44 | redirect: "/index", | 45 | redirect: "/index", |
45 | hidden: true, | 46 | hidden: true, |
46 | children: [] | 47 | children: [] |
@@ -97,7 +98,7 @@ let addrouters = [ //测试用,后续后端获取 | @@ -97,7 +98,7 @@ let addrouters = [ //测试用,后续后端获取 | ||
97 | iconCls: "", // 图标样式class | 98 | iconCls: "", // 图标样式class |
98 | name: "添加答题卡", | 99 | name: "添加答题卡", |
99 | component: ExaminationPaperAdd, | 100 | component: ExaminationPaperAdd, |
100 | - parent:"examinationPaper", | 101 | + parent: "examinationPaper", |
101 | children: [] | 102 | children: [] |
102 | }, | 103 | }, |
103 | { | 104 | { |
@@ -105,7 +106,7 @@ let addrouters = [ //测试用,后续后端获取 | @@ -105,7 +106,7 @@ let addrouters = [ //测试用,后续后端获取 | ||
105 | iconCls: "", // 图标样式class | 106 | iconCls: "", // 图标样式class |
106 | name: "修改答题卡", | 107 | name: "修改答题卡", |
107 | component: ExaminationPaperEdit, | 108 | component: ExaminationPaperEdit, |
108 | - parent:"examinationPaper", | 109 | + parent: "examinationPaper", |
109 | children: [] | 110 | children: [] |
110 | }, | 111 | }, |
111 | { | 112 | { |
@@ -113,7 +114,7 @@ let addrouters = [ //测试用,后续后端获取 | @@ -113,7 +114,7 @@ let addrouters = [ //测试用,后续后端获取 | ||
113 | iconCls: "", // 图标样式class | 114 | iconCls: "", // 图标样式class |
114 | name: "已归档答题卡", | 115 | name: "已归档答题卡", |
115 | component: ExaminationPaperRecycle, | 116 | component: ExaminationPaperRecycle, |
116 | - parent:"examinationPaper", | 117 | + parent: "examinationPaper", |
117 | children: [] | 118 | children: [] |
118 | }, | 119 | }, |
119 | ] | 120 | ] |
@@ -130,6 +131,9 @@ let addrouters = [ //测试用,后续后端获取 | @@ -130,6 +131,9 @@ let addrouters = [ //测试用,后续后端获取 | ||
130 | iconCls: "fa fa-bar-chart", // 图标样式class | 131 | iconCls: "fa fa-bar-chart", // 图标样式class |
131 | name: "", | 132 | name: "", |
132 | component: Ask, | 133 | component: Ask, |
134 | + meta: { | ||
135 | + keepAlive: true, | ||
136 | + }, | ||
133 | children: [] | 137 | children: [] |
134 | 138 | ||
135 | }, | 139 | }, |
@@ -138,7 +142,7 @@ let addrouters = [ //测试用,后续后端获取 | @@ -138,7 +142,7 @@ let addrouters = [ //测试用,后续后端获取 | ||
138 | iconCls: "", // 图标样式class | 142 | iconCls: "", // 图标样式class |
139 | name: "随堂问报表分析", | 143 | name: "随堂问报表分析", |
140 | component: AskAnalysis, | 144 | component: AskAnalysis, |
141 | - parent:"ask", | 145 | + parent: "ask", |
142 | children: [] | 146 | children: [] |
143 | } | 147 | } |
144 | ] | 148 | ] |
@@ -155,6 +159,9 @@ let addrouters = [ //测试用,后续后端获取 | @@ -155,6 +159,9 @@ let addrouters = [ //测试用,后续后端获取 | ||
155 | iconCls: "fa fa-pie-chart", // 图标样式class | 159 | iconCls: "fa fa-pie-chart", // 图标样式class |
156 | name: "", | 160 | name: "", |
157 | component: Test, | 161 | component: Test, |
162 | + meta: { | ||
163 | + keepAlive: true, | ||
164 | + }, | ||
158 | children: [] | 165 | children: [] |
159 | }, | 166 | }, |
160 | { | 167 | { |
@@ -162,7 +169,7 @@ let addrouters = [ //测试用,后续后端获取 | @@ -162,7 +169,7 @@ let addrouters = [ //测试用,后续后端获取 | ||
162 | iconCls: "", // 图标样式class | 169 | iconCls: "", // 图标样式class |
163 | name: "即时测报表分析", | 170 | name: "即时测报表分析", |
164 | component: TestAnalysis, | 171 | component: TestAnalysis, |
165 | - parent:"test", | 172 | + parent: "test", |
166 | children: [] | 173 | children: [] |
167 | } | 174 | } |
168 | 175 | ||
@@ -184,7 +191,7 @@ let addrouters = [ //测试用,后续后端获取 | @@ -184,7 +191,7 @@ let addrouters = [ //测试用,后续后端获取 | ||
184 | // } | 191 | // } |
185 | // ] | 192 | // ] |
186 | // }, | 193 | // }, |
187 | - | 194 | + |
188 | { | 195 | { |
189 | path: "/setUpConglomerate", | 196 | path: "/setUpConglomerate", |
190 | iconCls: "fa fa-building", // 图标样式class | 197 | iconCls: "fa fa-building", // 图标样式class |
@@ -274,6 +281,9 @@ let addrouters = [ //测试用,后续后端获取 | @@ -274,6 +281,9 @@ let addrouters = [ //测试用,后续后端获取 | ||
274 | iconCls: "fa fa-dashboard", // 图标样式class | 281 | iconCls: "fa fa-dashboard", // 图标样式class |
275 | name: "", | 282 | name: "", |
276 | component: Device, | 283 | component: Device, |
284 | + meta: { | ||
285 | + keepAlive: true, | ||
286 | + }, | ||
277 | children: [] | 287 | children: [] |
278 | }, | 288 | }, |
279 | { | 289 | { |
@@ -281,7 +291,7 @@ let addrouters = [ //测试用,后续后端获取 | @@ -281,7 +291,7 @@ let addrouters = [ //测试用,后续后端获取 | ||
281 | iconCls: "fa fa-list-alt", // 图标样式class | 291 | iconCls: "fa fa-list-alt", // 图标样式class |
282 | name: "", | 292 | name: "", |
283 | component: DeviceLog, | 293 | component: DeviceLog, |
284 | - parent:"device", | 294 | + parent: "device", |
285 | children: [] | 295 | children: [] |
286 | } | 296 | } |
287 | ] | 297 | ] |
@@ -321,7 +331,7 @@ let addrouters = [ //测试用,后续后端获取 | @@ -321,7 +331,7 @@ let addrouters = [ //测试用,后续后端获取 | ||
321 | iconCls: "", // 图标样式class | 331 | iconCls: "", // 图标样式class |
322 | name: "授课端软件", | 332 | name: "授课端软件", |
323 | component: DownClient, | 333 | component: DownClient, |
324 | - parent:"down", | 334 | + parent: "down", |
325 | children: [] | 335 | children: [] |
326 | } | 336 | } |
327 | ] | 337 | ] |
@@ -347,4 +357,4 @@ let addrouters = [ //测试用,后续后端获取 | @@ -347,4 +357,4 @@ let addrouters = [ //测试用,后续后端获取 | ||
347 | export default new Router({ | 357 | export default new Router({ |
348 | routes: defaultRouter | 358 | routes: defaultRouter |
349 | }) | 359 | }) |
350 | -export {defaultRouter,addrouters} | 360 | +export { defaultRouter, addrouters } |
src/views/ask/analysis.vue
@@ -468,7 +468,7 @@ export default { | @@ -468,7 +468,7 @@ export default { | ||
468 | }); | 468 | }); |
469 | downloadFile("随堂问-单课时报表.xlsx", blob); | 469 | downloadFile("随堂问-单课时报表.xlsx", blob); |
470 | } else { | 470 | } else { |
471 | - this.$message.error(info); | 471 | + this.$message.error("下载失败"); |
472 | } | 472 | } |
473 | }, | 473 | }, |
474 | }, | 474 | }, |
src/views/ask/index.vue
@@ -439,7 +439,7 @@ | @@ -439,7 +439,7 @@ | ||
439 | > | 439 | > |
440 | </el-pagination> | 440 | </el-pagination> |
441 | </div> | 441 | </div> |
442 | - <p class="down" v-if="tabIndex == 3 || tabIndex == 2"> | 442 | + <p class="down" v-if="(tabIndex == 3 || tabIndex == 2) && tableData.length"> |
443 | <el-button | 443 | <el-button |
444 | @click="exportData" | 444 | @click="exportData" |
445 | type="primary" | 445 | type="primary" |
src/views/device/index.vue
@@ -447,7 +447,7 @@ | @@ -447,7 +447,7 @@ | ||
447 | clearable | 447 | clearable |
448 | v-model="form.classIds" | 448 | v-model="form.classIds" |
449 | :options="gradeList" | 449 | :options="gradeList" |
450 | - :props="{ expandTrigger: 'hover', checkStrictly: true }" | 450 | + :props="{ expandTrigger: 'hover'}" |
451 | :show-all-levels="false" | 451 | :show-all-levels="false" |
452 | ></el-cascader> | 452 | ></el-cascader> |
453 | </el-col> | 453 | </el-col> |
@@ -467,7 +467,7 @@ | @@ -467,7 +467,7 @@ | ||
467 | </el-form-item> | 467 | </el-form-item> |
468 | </el-form> | 468 | </el-form> |
469 | <div class="dialog-footer" slot="footer"> | 469 | <div class="dialog-footer" slot="footer"> |
470 | - <el-button type="primary" @click="addAnswerEqu">确 定</el-button> | 470 | + <el-button type="primary" @click="setAnswerEqu">确 定</el-button> |
471 | <el-button @click="diaAnswerEqu = false">取 消</el-button> | 471 | <el-button @click="diaAnswerEqu = false">取 消</el-button> |
472 | </div> | 472 | </div> |
473 | </el-dialog> | 473 | </el-dialog> |
@@ -541,7 +541,7 @@ export default { | @@ -541,7 +541,7 @@ export default { | ||
541 | sn: "", | 541 | sn: "", |
542 | frequency: "", | 542 | frequency: "", |
543 | pairingCode: "", | 543 | pairingCode: "", |
544 | - classIds: [], | 544 | + classIds: "", |
545 | roomName: "", | 545 | roomName: "", |
546 | }, | 546 | }, |
547 | formRules: { | 547 | formRules: { |
@@ -615,9 +615,7 @@ export default { | @@ -615,9 +615,7 @@ export default { | ||
615 | edit(obj) { | 615 | edit(obj) { |
616 | for (let key in this.form) { | 616 | for (let key in this.form) { |
617 | if (key == "classIds") { | 617 | if (key == "classIds") { |
618 | - this.form[key] = obj.classList?.map((item) => { | ||
619 | - return [item.classId]; | ||
620 | - }); | 618 | + this.form[key] = obj.classList[0]?.classId |
621 | } else { | 619 | } else { |
622 | this.form[key] = obj[key]; | 620 | this.form[key] = obj[key]; |
623 | } | 621 | } |
@@ -713,7 +711,7 @@ export default { | @@ -713,7 +711,7 @@ export default { | ||
713 | this.selectionTabIds = []; | 711 | this.selectionTabIds = []; |
714 | this.$message.success("开启自动更新成功"); | 712 | this.$message.success("开启自动更新成功"); |
715 | } else { | 713 | } else { |
716 | - this.$message.error(data.message); | 714 | + this.$message.error(data.info); |
717 | } | 715 | } |
718 | }, | 716 | }, |
719 | async stopUpdate(id) { | 717 | async stopUpdate(id) { |
@@ -733,7 +731,7 @@ export default { | @@ -733,7 +731,7 @@ export default { | ||
733 | this._QueryData(false); | 731 | this._QueryData(false); |
734 | this.$message.success("关闭自动更新成功"); | 732 | this.$message.success("关闭自动更新成功"); |
735 | } else { | 733 | } else { |
736 | - this.$message.error(data.message); | 734 | + this.$message.error(data.info); |
737 | } | 735 | } |
738 | }, | 736 | }, |
739 | async downExcel() { | 737 | async downExcel() { |
@@ -750,16 +748,18 @@ export default { | @@ -750,16 +748,18 @@ export default { | ||
750 | } | 748 | } |
751 | }, | 749 | }, |
752 | 750 | ||
753 | - // 添加设备 | ||
754 | - addAnswerEqu() { | 751 | + // 修改基站 |
752 | + setAnswerEqu() { | ||
755 | this.$refs.forms.validate(async (valid) => { | 753 | this.$refs.forms.validate(async (valid) => { |
756 | if (valid) { | 754 | if (valid) { |
757 | if (this.loadingAnswerEqu) return; | 755 | if (this.loadingAnswerEqu) return; |
758 | this.loadingAnswerEqu = true; | 756 | this.loadingAnswerEqu = true; |
759 | let query = { ...this.form }; | 757 | let query = { ...this.form }; |
760 | - query.classIds = query.classIds.map((item) => { | ||
761 | - return item[1]; | ||
762 | - }); | 758 | + |
759 | + // query.classIds = query.classIds.map((item) => { | ||
760 | + // return item[1]; | ||
761 | + // }); | ||
762 | + query.classIds = [query.classIds] | ||
763 | const { data, status, info } = await this.$request.updateDevice({ | 763 | const { data, status, info } = await this.$request.updateDevice({ |
764 | ...query, | 764 | ...query, |
765 | }); | 765 | }); |
src/views/examinationPaper/add.vue
@@ -186,7 +186,7 @@ | @@ -186,7 +186,7 @@ | ||
186 | class="number-ipt" | 186 | class="number-ipt" |
187 | size="medium" | 187 | size="medium" |
188 | :min="1" | 188 | :min="1" |
189 | - :max="100" | 189 | + :max="200" |
190 | :precision="2" | 190 | :precision="2" |
191 | :step="1" | 191 | :step="1" |
192 | v-model="subQuestions.score" | 192 | v-model="subQuestions.score" |
@@ -308,7 +308,7 @@ | @@ -308,7 +308,7 @@ | ||
308 | > | 308 | > |
309 | <div class="dia-content"> | 309 | <div class="dia-content"> |
310 | <el-form | 310 | <el-form |
311 | - ref="form" | 311 | + ref="form" |
312 | :model="questionForm" | 312 | :model="questionForm" |
313 | :rules="questionFormRules" | 313 | :rules="questionFormRules" |
314 | label-width="100px" | 314 | label-width="100px" |
@@ -364,7 +364,7 @@ | @@ -364,7 +364,7 @@ | ||
364 | <el-input-number | 364 | <el-input-number |
365 | v-model="questionForm.score" | 365 | v-model="questionForm.score" |
366 | :min="1" | 366 | :min="1" |
367 | - :max="100" | 367 | + :max="200" |
368 | :precision="2" | 368 | :precision="2" |
369 | :step="1" | 369 | :step="1" |
370 | label="label" | 370 | label="label" |
@@ -439,7 +439,7 @@ | @@ -439,7 +439,7 @@ | ||
439 | class="number-ipt" | 439 | class="number-ipt" |
440 | size="medium" | 440 | size="medium" |
441 | :min="1" | 441 | :min="1" |
442 | - :max="100" | 442 | + :max="200" |
443 | :precision="2" | 443 | :precision="2" |
444 | v-model="subQuestions.score" | 444 | v-model="subQuestions.score" |
445 | label="单题分值" | 445 | label="单题分值" |
@@ -508,6 +508,7 @@ | @@ -508,6 +508,7 @@ | ||
508 | <el-dialog | 508 | <el-dialog |
509 | title="批量设置答案" | 509 | title="批量设置答案" |
510 | :visible.sync="diaSetAns" | 510 | :visible.sync="diaSetAns" |
511 | + :close-on-click-modal="false" | ||
511 | width="400" | 512 | width="400" |
512 | :modal-append-to-body="false" | 513 | :modal-append-to-body="false" |
513 | > | 514 | > |
src/views/examinationPaper/index.vue
@@ -108,6 +108,9 @@ | @@ -108,6 +108,9 @@ | ||
108 | }} | 108 | }} |
109 | <i v-if="clazzChild.keepStatus == 1" class="el-icon-success"></i | 109 | <i v-if="clazzChild.keepStatus == 1" class="el-icon-success"></i |
110 | ></span> | 110 | ></span> |
111 | + <el-tooltip effect="dark" content="同步" placement="right"> | ||
112 | + <i class="icon-refresh el-icon-refresh" @click="refreshStic"></i> | ||
113 | + </el-tooltip> | ||
111 | </p> | 114 | </p> |
112 | <p class="person"> | 115 | <p class="person"> |
113 | {{ item.realName }}<em class="s-line">|</em | 116 | {{ item.realName }}<em class="s-line">|</em |
@@ -221,6 +224,11 @@ export default { | @@ -221,6 +224,11 @@ export default { | ||
221 | this._QueryTypeList(); | 224 | this._QueryTypeList(); |
222 | }, | 225 | }, |
223 | methods: { | 226 | methods: { |
227 | + refreshStic(){ | ||
228 | + setTimeout(function(){ | ||
229 | + window.location.reload() | ||
230 | + },500) | ||
231 | + }, | ||
224 | toAdd(query) { | 232 | toAdd(query) { |
225 | let routerItem = { | 233 | let routerItem = { |
226 | path: "/examinationPaperAdd", | 234 | path: "/examinationPaperAdd", |
@@ -499,6 +507,13 @@ export default { | @@ -499,6 +507,13 @@ export default { | ||
499 | margin-right: 12px; | 507 | margin-right: 12px; |
500 | } | 508 | } |
501 | } | 509 | } |
510 | + .icon-refresh{ | ||
511 | + margin-left:20px; | ||
512 | + cursor: pointer; | ||
513 | + &:hover{ | ||
514 | + color:#2e9afe | ||
515 | + } | ||
516 | + } | ||
502 | } | 517 | } |
503 | } | 518 | } |
504 | .answer-header { | 519 | .answer-header { |
src/views/layout/layout.vue
@@ -5,10 +5,13 @@ | @@ -5,10 +5,13 @@ | ||
5 | <el-container> | 5 | <el-container> |
6 | <layoutHeader></layoutHeader> | 6 | <layoutHeader></layoutHeader> |
7 | <el-main id="elmain"> | 7 | <el-main id="elmain"> |
8 | - <transition name="main" mode="out-in"> | ||
9 | - <keep-alive> | ||
10 | - <router-view></router-view> | 8 | + <!-- <transition name="main" mode="out-in"> |
9 | + <keep-alive key="keepAlive"> | ||
10 | + <router-view v-if="$route.meta.keepAlive" ></router-view> | ||
11 | </keep-alive> | 11 | </keep-alive> |
12 | + </transition> --> | ||
13 | + <transition name="main" mode="out-in"> | ||
14 | + <router-view key="not-keepAlive"></router-view> | ||
12 | </transition> | 15 | </transition> |
13 | </el-main> | 16 | </el-main> |
14 | <el-footer height="28px"> | 17 | <el-footer height="28px"> |
@@ -41,6 +44,7 @@ export default { | @@ -41,6 +44,7 @@ export default { | ||
41 | }, | 44 | }, |
42 | created() { | 45 | created() { |
43 | // this.initRouter(); | 46 | // this.initRouter(); |
47 | + console.log(this.$route.meta.keepAlive) | ||
44 | }, | 48 | }, |
45 | methods: { | 49 | methods: { |
46 | initRouter() { | 50 | initRouter() { |
src/views/login/index.vue
@@ -95,14 +95,14 @@ export default { | @@ -95,14 +95,14 @@ export default { | ||
95 | loginForm: { | 95 | loginForm: { |
96 | // username: "15911715665", | 96 | // username: "15911715665", |
97 | // password: "715665", | 97 | // password: "715665", |
98 | - username: "18314340313", | ||
99 | - password: "Pw340313#", | 98 | + // username: "18314340313", |
99 | + // password: "Pw340313#", | ||
100 | // username: "18687826606", | 100 | // username: "18687826606", |
101 | // password: "Pw826606#", | 101 | // password: "Pw826606#", |
102 | // username: "18893712576", | 102 | // username: "18893712576", |
103 | // password: "712576", | 103 | // password: "712576", |
104 | - // username: "13247726488", | ||
105 | - // password: "726488", | 104 | + username: "13247726488", |
105 | + password: "726488", | ||
106 | }, | 106 | }, |
107 | loginRules: { | 107 | loginRules: { |
108 | username: [ | 108 | username: [ |
src/views/setUp/account.vue
@@ -440,7 +440,7 @@ export default { | @@ -440,7 +440,7 @@ export default { | ||
440 | }); | 440 | }); |
441 | downloadFile(`账号信息.xlsx`, blob); | 441 | downloadFile(`账号信息.xlsx`, blob); |
442 | } else { | 442 | } else { |
443 | - this.$message.error(data.message); | 443 | + this.$message.error(data.info); |
444 | } | 444 | } |
445 | }, | 445 | }, |
446 | openAddDia() { | 446 | openAddDia() { |
src/views/setUp/school.vue
@@ -412,7 +412,7 @@ export default { | @@ -412,7 +412,7 @@ export default { | ||
412 | }); | 412 | }); |
413 | downloadFile(`设备信息.xlsx`, blob); | 413 | downloadFile(`设备信息.xlsx`, blob); |
414 | } else { | 414 | } else { |
415 | - this.$message.error(data.message); | 415 | + this.$message.error(data.info); |
416 | } | 416 | } |
417 | }, | 417 | }, |
418 | }, | 418 | }, |
src/views/setUp/student.vue
@@ -425,7 +425,7 @@ export default { | @@ -425,7 +425,7 @@ export default { | ||
425 | }); | 425 | }); |
426 | downloadFile(`设备信息.xlsx`, blob); | 426 | downloadFile(`设备信息.xlsx`, blob); |
427 | } else { | 427 | } else { |
428 | - this.$message.error(data.message); | 428 | + this.$message.error(data.info); |
429 | } | 429 | } |
430 | }, | 430 | }, |
431 | }, | 431 | }, |
src/views/setUp/teacher.vue
@@ -761,9 +761,9 @@ export default { | @@ -761,9 +761,9 @@ export default { | ||
761 | let blob = new Blob([data], { | 761 | let blob = new Blob([data], { |
762 | type: "application/vnd.ms-excel;charset=utf-8", | 762 | type: "application/vnd.ms-excel;charset=utf-8", |
763 | }); | 763 | }); |
764 | - downloadFile(`设备信息.xlsx`, blob); | 764 | + downloadFile(`教师名单.xlsx`, blob); |
765 | } else { | 765 | } else { |
766 | - this.$message.error(data.message); | 766 | + this.$message.error(data.info); |
767 | } | 767 | } |
768 | }, | 768 | }, |
769 | }, | 769 | }, |
src/views/test/analysis.vue
@@ -131,12 +131,12 @@ | @@ -131,12 +131,12 @@ | ||
131 | :label="item.title" | 131 | :label="item.title" |
132 | :prop="'count' + index" | 132 | :prop="'count' + index" |
133 | align="center" | 133 | align="center" |
134 | - ><template slot-scope="scope"><p class="present">{{ | 134 | + ><template slot-scope="scope"><p class="persent">{{ |
135 | scope.row.questionType == "5" | 135 | scope.row.questionType == "5" |
136 | ? "" | 136 | ? "" |
137 | : scope.row["option" + index] | 137 | : scope.row["option" + index] |
138 | ? `${scope.row["option" + index]}(${ | 138 | ? `${scope.row["option" + index]}(${ |
139 | - scope.row["present" + index] | 139 | + scope.row["persent" + index] |
140 | })` | 140 | })` |
141 | : "" | 141 | : "" |
142 | }}</p></template> | 142 | }}</p></template> |
@@ -522,7 +522,7 @@ export default { | @@ -522,7 +522,7 @@ export default { | ||
522 | }); | 522 | }); |
523 | downloadFile(`主观题模版.xlsx`, blob); | 523 | downloadFile(`主观题模版.xlsx`, blob); |
524 | } else { | 524 | } else { |
525 | - this.$message.error(data.message); | 525 | + this.$message.error(data.info); |
526 | } | 526 | } |
527 | }, | 527 | }, |
528 | async _QueryData() { | 528 | async _QueryData() { |
@@ -625,8 +625,8 @@ export default { | @@ -625,8 +625,8 @@ export default { | ||
625 | if (index != 4) { | 625 | if (index != 4) { |
626 | params["count" + index] = | 626 | params["count" + index] = |
627 | defaultArr[index]?.option != "未答" ? defaultArr[index]?.count : ""; | 627 | defaultArr[index]?.option != "未答" ? defaultArr[index]?.count : ""; |
628 | - params["present" + index] = | ||
629 | - defaultArr[index]?.option != "未答" ? defaultArr[index]?.present : ""; | 628 | + params["persent" + index] = |
629 | + defaultArr[index]?.option != "未答" ? defaultArr[index]?.persent : ""; | ||
630 | params["option" + index] = | 630 | params["option" + index] = |
631 | defaultArr[index]?.option != "未答" | 631 | defaultArr[index]?.option != "未答" |
632 | ? defaultArr[index]?.option == 1 | 632 | ? defaultArr[index]?.option == 1 |
@@ -639,7 +639,7 @@ export default { | @@ -639,7 +639,7 @@ export default { | ||
639 | } else { | 639 | } else { |
640 | items["title"] = "未答"; | 640 | items["title"] = "未答"; |
641 | params["count" + index] = lastOPtion.count; | 641 | params["count" + index] = lastOPtion.count; |
642 | - params["present" + index] = lastOPtion.present; | 642 | + params["persent" + index] = lastOPtion.persent; |
643 | params["option" + index] = "?"; | 643 | params["option" + index] = "?"; |
644 | } | 644 | } |
645 | }); | 645 | }); |
@@ -660,15 +660,23 @@ export default { | @@ -660,15 +660,23 @@ export default { | ||
660 | }, | 660 | }, |
661 | //导出 | 661 | //导出 |
662 | async exportData() { | 662 | async exportData() { |
663 | - // if (this.exportLoading == true) return; | ||
664 | - // this.exportLoading = true; | ||
665 | - // const { data, status, info } = await this.$request.exportPeriodReport(); | ||
666 | - // this.exportLoading = false; | ||
667 | - // if (data) { | ||
668 | - // downloadFile(this.title + "报表", data); | ||
669 | - // } else { | ||
670 | - // this.$message.error(info); | ||
671 | - // } | 663 | + if (this.exportLoading == true) return; |
664 | + this.exportLoading = true; | ||
665 | + const data = await this.$request.exportExamReport({ | ||
666 | + examId:this.id | ||
667 | + }); | ||
668 | + this.exportLoading = false; | ||
669 | + if (data) { | ||
670 | + let blob = new Blob([data], { | ||
671 | + type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", | ||
672 | + }); | ||
673 | + downloadFile( | ||
674 | + "即时测-单卷测练报表.xlsx", | ||
675 | + blob | ||
676 | + ); | ||
677 | + } else { | ||
678 | + this.$message.error("下载失败"); | ||
679 | + } | ||
672 | }, | 680 | }, |
673 | }, | 681 | }, |
674 | }; | 682 | }; |
@@ -706,7 +714,7 @@ div::-webkit-scrollbar-thumb { | @@ -706,7 +714,7 @@ div::-webkit-scrollbar-thumb { | ||
706 | z-index: 10; | 714 | z-index: 10; |
707 | } | 715 | } |
708 | } | 716 | } |
709 | -.present{ | 717 | +.persent{ |
710 | white-space: nowrap; | 718 | white-space: nowrap; |
711 | } | 719 | } |
712 | .error { | 720 | .error { |
src/views/test/editAnswer.vue
@@ -208,6 +208,7 @@ | @@ -208,6 +208,7 @@ | ||
208 | </div> | 208 | </div> |
209 | <el-dialog | 209 | <el-dialog |
210 | title="批量设置答案" | 210 | title="批量设置答案" |
211 | + :close-on-click-modal="false" | ||
211 | :visible.sync="diaSetAns" | 212 | :visible.sync="diaSetAns" |
212 | width="400" | 213 | width="400" |
213 | :modal-append-to-body="false" | 214 | :modal-append-to-body="false" |
src/views/test/index.vue
@@ -322,99 +322,103 @@ | @@ -322,99 +322,103 @@ | ||
322 | </div> | 322 | </div> |
323 | </div> | 323 | </div> |
324 | <div v-show="tabIndex == 2" v-loading="loading"> | 324 | <div v-show="tabIndex == 2" v-loading="loading"> |
325 | - <el-table | ||
326 | - :max-height="tableMaxHeight" | ||
327 | - v-if="role == 'ROLE_JIAOSHI'" | ||
328 | - :data="tableData" | ||
329 | - border | ||
330 | - style="width: 100%" | ||
331 | - > | ||
332 | - <el-table-column | ||
333 | - prop="studentCode" | ||
334 | - label="学号" | ||
335 | - align="center" | ||
336 | - fixed | ||
337 | - ></el-table-column> | ||
338 | - <el-table-column | ||
339 | - prop="studentName" | ||
340 | - label="姓名" | ||
341 | - fixed | ||
342 | - align="center" | ||
343 | - ></el-table-column> | ||
344 | - <el-table-column | ||
345 | - align="center" | ||
346 | - v-for="(item, index) in answerList" | ||
347 | - :key="index" | ||
348 | - :label="item.title" | 325 | + <el-empty :image-size="100" v-if="!tableData.length&&loading==false" description="没有更多数据"></el-empty> |
326 | + <template v-if="tableData.length&&loading==false"> | ||
327 | + <el-table | ||
328 | + :max-height="tableMaxHeight" | ||
329 | + v-if="role == 'ROLE_JIAOSHI'" | ||
330 | + :data="tableData" | ||
331 | + border | ||
332 | + style="width: 100%" | ||
349 | > | 333 | > |
350 | <el-table-column | 334 | <el-table-column |
351 | - :prop="'score' + index" | ||
352 | - :label="index == 0 ? '总分' : '成绩'" | 335 | + prop="studentCode" |
336 | + label="学号" | ||
353 | align="center" | 337 | align="center" |
354 | - :class-name="index % 2 == 0 ? 'bg' : ''" | 338 | + fixed |
355 | ></el-table-column> | 339 | ></el-table-column> |
356 | <el-table-column | 340 | <el-table-column |
357 | - :prop="'classRank' + index" | ||
358 | - label="班名" | 341 | + prop="studentName" |
342 | + label="姓名" | ||
343 | + fixed | ||
359 | align="center" | 344 | align="center" |
360 | - :class-name="index % 2 == 0 ? 'bg' : ''" | ||
361 | ></el-table-column> | 345 | ></el-table-column> |
362 | - </el-table-column> | ||
363 | - </el-table> | ||
364 | - <el-table | ||
365 | - v-else | ||
366 | - :data="tableData" | ||
367 | - :max-height="tableMaxHeight" | ||
368 | - border | ||
369 | - style="width: 100%" | ||
370 | - > | ||
371 | - <el-table-column | ||
372 | - prop="studentCode" | ||
373 | - label="学号" | ||
374 | - align="center" | ||
375 | - fixed | ||
376 | - ></el-table-column> | ||
377 | - <el-table-column | ||
378 | - prop="studentName" | ||
379 | - label="姓名" | ||
380 | - fixed | ||
381 | - align="center" | ||
382 | - ></el-table-column> | ||
383 | - <el-table-column | ||
384 | - align="center" | ||
385 | - v-for="(item, index) in answerList" | ||
386 | - :key="index" | ||
387 | - :label="item" | ||
388 | - > | ||
389 | <el-table-column | 346 | <el-table-column |
390 | - :prop="'examCount' + item" | ||
391 | - label="测练数" | ||
392 | align="center" | 347 | align="center" |
393 | - :class-name="index % 2 == 0 ? 'bg' : ''" | ||
394 | - ></el-table-column> | 348 | + v-for="(item, index) in answerList" |
349 | + :key="index" | ||
350 | + :label="item.title" | ||
351 | + > | ||
352 | + <el-table-column | ||
353 | + :prop="'score' + index" | ||
354 | + :label="index == 0 ? '总分' : '成绩'" | ||
355 | + align="center" | ||
356 | + :class-name="index % 2 == 0 ? 'bg' : ''" | ||
357 | + ></el-table-column> | ||
358 | + <el-table-column | ||
359 | + :prop="'classRank' + index" | ||
360 | + label="班名" | ||
361 | + align="center" | ||
362 | + :class-name="index % 2 == 0 ? 'bg' : ''" | ||
363 | + ></el-table-column> | ||
364 | + </el-table-column> | ||
365 | + </el-table> | ||
366 | + <el-table | ||
367 | + v-else | ||
368 | + :data="tableData" | ||
369 | + :max-height="tableMaxHeight" | ||
370 | + border | ||
371 | + style="width: 100%" | ||
372 | + > | ||
395 | <el-table-column | 373 | <el-table-column |
396 | - :prop="'participationCount' + item" | ||
397 | - label="参与数" | 374 | + prop="studentCode" |
375 | + label="学号" | ||
398 | align="center" | 376 | align="center" |
399 | - :class-name="index % 2 == 0 ? 'bg' : ''" | 377 | + fixed |
400 | ></el-table-column> | 378 | ></el-table-column> |
401 | <el-table-column | 379 | <el-table-column |
402 | - :prop="'score' + item" | ||
403 | - label="总分" | 380 | + prop="studentName" |
381 | + label="姓名" | ||
382 | + fixed | ||
404 | align="center" | 383 | align="center" |
405 | - :class-name="index % 2 == 0 ? 'bg' : ''" | ||
406 | ></el-table-column> | 384 | ></el-table-column> |
407 | <el-table-column | 385 | <el-table-column |
408 | - :prop="'classRank' + item" | ||
409 | - label="班名" | ||
410 | align="center" | 386 | align="center" |
411 | - :class-name="index % 2 == 0 ? 'bg' : ''" | ||
412 | - ></el-table-column> | ||
413 | - </el-table-column> | ||
414 | - </el-table> | 387 | + v-for="(item, index) in answerList" |
388 | + :key="index" | ||
389 | + :label="item" | ||
390 | + > | ||
391 | + <el-table-column | ||
392 | + :prop="'examCount' + item" | ||
393 | + label="测练数" | ||
394 | + align="center" | ||
395 | + :class-name="index % 2 == 0 ? 'bg' : ''" | ||
396 | + ></el-table-column> | ||
397 | + <el-table-column | ||
398 | + :prop="'participationCount' + item" | ||
399 | + label="参与数" | ||
400 | + align="center" | ||
401 | + :class-name="index % 2 == 0 ? 'bg' : ''" | ||
402 | + ></el-table-column> | ||
403 | + <el-table-column | ||
404 | + :prop="'score' + item" | ||
405 | + label="总分" | ||
406 | + align="center" | ||
407 | + :class-name="index % 2 == 0 ? 'bg' : ''" | ||
408 | + ></el-table-column> | ||
409 | + <el-table-column | ||
410 | + :prop="'classRank' + item" | ||
411 | + label="班名" | ||
412 | + align="center" | ||
413 | + :class-name="index % 2 == 0 ? 'bg' : ''" | ||
414 | + ></el-table-column> | ||
415 | + </el-table-column> | ||
416 | + </el-table> | ||
417 | + </template> | ||
415 | </div> | 418 | </div> |
416 | - <p class="down" v-if="tabIndex == 2"> | 419 | + <p class="down" v-if="tabIndex == 2 && tableData.length"> |
417 | <el-button type="primary" plain round icon="fa fa-cloud-download" | 420 | <el-button type="primary" plain round icon="fa fa-cloud-download" |
421 | + @click="downExl" | ||
418 | >导出报表</el-button | 422 | >导出报表</el-button |
419 | > | 423 | > |
420 | </p> | 424 | </p> |
@@ -458,6 +462,7 @@ export default { | @@ -458,6 +462,7 @@ export default { | ||
458 | components: { editAnswer }, | 462 | components: { editAnswer }, |
459 | data() { | 463 | data() { |
460 | return { | 464 | return { |
465 | + exportLoading:false, | ||
461 | tableMaxHeight: 300, | 466 | tableMaxHeight: 300, |
462 | role: "", | 467 | role: "", |
463 | loading: false, | 468 | loading: false, |
@@ -643,7 +648,7 @@ export default { | @@ -643,7 +648,7 @@ export default { | ||
643 | }); | 648 | }); |
644 | downloadFile(`主观题模版.xlsx`, blob); | 649 | downloadFile(`主观题模版.xlsx`, blob); |
645 | } else { | 650 | } else { |
646 | - this.$message.error(data.message); | 651 | + this.$message.error(data.info); |
647 | } | 652 | } |
648 | }, | 653 | }, |
649 | async changClazz() { | 654 | async changClazz() { |
@@ -837,6 +842,49 @@ export default { | @@ -837,6 +842,49 @@ export default { | ||
837 | this.$message.error(info); | 842 | this.$message.error(info); |
838 | } | 843 | } |
839 | }, | 844 | }, |
845 | + async downExl(){ | ||
846 | + if (this.exportLoading == true) return; | ||
847 | + let query = {}; | ||
848 | + for (let key in this.query) { | ||
849 | + if (this.query[key] != "") { | ||
850 | + if (key == "subjectNames" && this.role != "ROLE_BANZHUREN") { | ||
851 | + query["subjectName"] = this.query[key]; | ||
852 | + } else { | ||
853 | + query[key] = this.query[key]; | ||
854 | + } | ||
855 | + } | ||
856 | + } | ||
857 | + if (this.role == "ROLE_BANZHUREN") { | ||
858 | + if ( | ||
859 | + query["subjectNames"] && | ||
860 | + query["subjectNames"].length == 1 && | ||
861 | + query["subjectNames"][0] == "全部" | ||
862 | + ) { | ||
863 | + query["subjectNames"] = this.subjectList.map((item) => { | ||
864 | + return item.value; | ||
865 | + }); | ||
866 | + query["subjectNames"].shift(); | ||
867 | + } | ||
868 | + if (!query["subjectNames"]) { | ||
869 | + this.$message.warning("请选择科目"); | ||
870 | + return; | ||
871 | + } | ||
872 | + } | ||
873 | + this.exportLoading = true; | ||
874 | + const data = await this.$request.exportPhaseExamReport({ ...query }); | ||
875 | + this.exportLoading = false; | ||
876 | + if (data) { | ||
877 | + let blob = new Blob([data], { | ||
878 | + type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", | ||
879 | + }); | ||
880 | + downloadFile( | ||
881 | + "即时测-阶段测练报表.xlsx", | ||
882 | + blob | ||
883 | + ); | ||
884 | + } else { | ||
885 | + this.$message.error("下载失败"); | ||
886 | + } | ||
887 | + } | ||
840 | }, | 888 | }, |
841 | }; | 889 | }; |
842 | </script> | 890 | </script> |