77ebf04d
梁保满
个人版
|
1
2
3
4
5
6
7
|
<template>
<div>
<back-box>
<template slot="title">
<span>备题组卷</span>
</template>
<template slot="btns">
|
b0cd2598
梁保满
fix:测试问题
|
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<el-tooltip
v-if="!code && gdClass"
effect="dark"
content="已归档试卷"
placement="bottom"
>
<el-button
type="primary"
icon="fa fa-archive"
size="mini"
plain
circle
@click="toArchiving"
></el-button>
|
799818f7
梁保满
背题组卷
|
22
|
</el-tooltip>
|
77ebf04d
梁保满
个人版
|
23
24
|
</template>
</back-box>
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
25
26
|
<div class="examinationPaper-type">
<el-button-group>
|
b0cd2598
梁保满
fix:测试问题
|
27
28
29
30
31
32
33
34
35
36
37
38
|
<el-button
size="large"
:type="query.type == 1 ? 'primary' : 'default'"
@click="changPaperType(1)"
>备题</el-button
>
<el-button
size="large"
:type="query.type == 2 ? 'primary' : 'default'"
@click="changPaperType(2)"
>组卷</el-button
>
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
39
|
</el-button-group>
|
77ebf04d
梁保满
个人版
|
40
|
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
41
|
<p>
|
b0cd2598
梁保满
fix:测试问题
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
<el-button
v-if="query.type == 1"
type="primary"
size="mini"
icon="el-icon-plus"
round
@click="diaUp = true"
>
导入课件</el-button
>
<el-dropdown
v-if="query.type == 2"
trigger="click"
@command="handleAdd"
>
<el-button type="primary" size="mini" icon="el-icon-plus" round
>添加试卷</el-button
>
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
61
62
63
64
65
66
67
|
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="1">导入试卷</el-dropdown-item>
<el-dropdown-item :command="2">手动创建</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</p>
</div>
|
77ebf04d
梁保满
个人版
|
68
69
|
<div class="answer-header">
<div class="sel-box">
|
b0cd2598
梁保满
fix:测试问题
|
70
71
72
73
74
75
76
77
78
79
80
81
|
<el-select
class="sel"
v-model="query.classId"
placeholder="选择班级"
@change="changClazz"
>
<el-option
v-for="item in classList"
:key="item.value"
:label="item.label"
:value="item.value"
>
|
77ebf04d
梁保满
个人版
|
82
83
|
</el-option>
</el-select>
|
b0cd2598
梁保满
fix:测试问题
|
84
85
86
87
88
89
90
91
92
93
94
95
|
<el-select
class="sel"
v-model="query.subjectName"
placeholder="选择科目"
@change="getData(false)"
>
<el-option
v-for="item in subjectList"
:key="item.value"
:label="item.label"
:value="item.value"
>
|
77ebf04d
梁保满
个人版
|
96
97
|
</el-option>
</el-select>
|
b0cd2598
梁保满
fix:测试问题
|
98
99
100
101
102
103
104
105
106
107
108
109
110
|
<el-select
v-if="query.type == 2"
class="sel"
v-model="query.tagId"
placeholder="选择类型"
@change="getData(false)"
>
<el-option
v-for="item in typeList"
:key="item.label"
:label="item.label"
:value="item.value"
>{{ item.label }}
|
ce278878
梁保满
2-2 bugfix
|
111
112
|
</el-option>
</el-select>
|
b0cd2598
梁保满
fix:测试问题
|
113
114
115
116
117
118
119
120
121
122
123
|
<el-input
placeholder="试卷名称"
v-model="query.title"
class="input-with-select"
@keyup.enter.native="getData(true)"
>
<el-button
slot="append"
icon="el-icon-search"
@click="getData(true)"
></el-button>
|
77ebf04d
梁保满
个人版
|
124
125
126
127
|
</el-input>
</div>
</div>
<p class="tips" v-show="archivedTotal">
|
cffc1a98
梁保满
3-8BUG
|
128
|
<span>回收站内已有{{ archivedTotal }}份答题卡,</span>
|
77ebf04d
梁保满
个人版
|
129
130
|
<router-link to="/examinationPaperRecycle">点击查看>></router-link>
</p>
|
352c53cc
梁保满
上传word回传数据
|
131
132
|
<div class="content">
<p class="tab-box">
|
b0cd2598
梁保满
fix:测试问题
|
133
134
135
136
137
138
139
140
141
142
|
<span
:class="['tab-s', query.share == 0 ? 'active' : '']"
@click="changShare(0)"
>我自编的 ({{ totalCount.my }})</span
>
<span
:class="['tab-s', query.share == 1 ? 'active' : '']"
@click="changShare(1)"
>年级共享的 ({{ totalCount.share }})</span
>
|
352c53cc
梁保满
上传word回传数据
|
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
</p>
<ul v-if="tableData && tableData.length" v-loading="loading">
<li class="item" v-for="item in tableData" :key="item.id">
<div class="pic-box">
<p class="i-box"><i class="fa fa-map-o"></i></p>
<p class="ids">{{ item.id }}</p>
</div>
<div class="info">
<p class="title">
{{ item.title }}
<span class="label" v-if="!!item.tag">{{ item.tag }}</span>
</p>
<p class="num">
总题数:{{ item.questionNum }}
<em class="s-line">|</em>
|
77da338a
梁保满
自测问题修改
|
158
159
160
161
|
<template v-if="query.type == 2">
预计时长:{{ item.examsDuration }}
<em class="s-line">|</em>
</template>
|
352c53cc
梁保满
上传word回传数据
|
162
163
|
<template v-if="role != 'ROLE_PERSONAL'">
授课端同步:
|
b0cd2598
梁保满
fix:测试问题
|
164
165
166
167
168
169
170
171
172
|
<span
class="clazz"
v-for="(clazzChild, indexs) in item.classList"
:key="clazzChild.classId"
:class="clazzChild.keepStatus == 1 ? 'active' : ''"
>{{
`${clazzChild.className}${
indexs != item.classList.length - 1 ? "、" : ""
}`
|
352c53cc
梁保满
上传word回传数据
|
173
|
}}
|
b0cd2598
梁保满
fix:测试问题
|
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
<i
v-if="clazzChild.keepStatus == 1"
class="el-icon-success"
></i
></span>
<el-tooltip
effect="dark"
content="刷新同步状态"
placement="right"
>
<i
class="icon-refresh el-icon-refresh"
@click="refreshStic"
></i>
|
352c53cc
梁保满
上传word回传数据
|
188
189
190
191
|
</el-tooltip>
</template>
</p>
<p class="person">
|
b0cd2598
梁保满
fix:测试问题
|
192
193
|
{{ item.realName }}<em class="s-line">|</em
><span class="date">{{ item.modifiedTime }}</span>
|
352c53cc
梁保满
上传word回传数据
|
194
195
196
197
|
</p>
</div>
<div class="btn-box">
<el-tooltip effect="dark" content="修改答案" placement="bottom">
|
b0cd2598
梁保满
fix:测试问题
|
198
199
200
201
202
203
204
205
|
<el-button
class="edit"
type="primary"
size="mini"
circle
icon="el-icon-edit"
@click="toEdit(item)"
></el-button>
|
352c53cc
梁保满
上传word回传数据
|
206
|
</el-tooltip>
|
b0cd2598
梁保满
fix:测试问题
|
207
208
209
210
211
212
213
214
215
216
|
<el-dropdown
trigger="click"
@command="handleDropdownClick($event, item)"
>
<el-button
type="info"
size="mini"
circle
icon="el-icon-more"
></el-button>
|
352c53cc
梁保满
上传word回传数据
|
217
|
<el-dropdown-menu slot="dropdown">
|
b0cd2598
梁保满
fix:测试问题
|
218
219
220
221
222
|
<el-dropdown-item
:command="1"
v-if="userName == item.realName && role != 'ROLE_PERSONAL'"
>修改分享范围</el-dropdown-item
>
|
ce278878
梁保满
2-2 bugfix
|
223
|
<el-dropdown-item :command="2">复制</el-dropdown-item>
|
b0cd2598
梁保满
fix:测试问题
|
224
225
226
|
<el-dropdown-item v-show="query.share == 0" :command="3"
>放入回收站</el-dropdown-item
>
|
352c53cc
梁保满
上传word回传数据
|
227
228
229
230
231
232
|
</el-dropdown-menu>
</el-dropdown>
</div>
</li>
</ul>
<div class="pagination-box">
|
b0cd2598
梁保满
fix:测试问题
|
233
234
235
236
237
238
239
240
241
|
<el-pagination
small=""
layout="total,prev, pager, next"
:hide-on-single-page="true"
:total="total"
@current-change="changePage"
:current-page="page"
:page-size="size"
>
|
352c53cc
梁保满
上传word回传数据
|
242
243
|
</el-pagination>
</div>
|
b0cd2598
梁保满
fix:测试问题
|
244
245
246
247
248
|
<el-empty
v-if="!loading && tableData.length == 0"
content="没有更多数据"
:image-size="100"
></el-empty>
|
77ebf04d
梁保满
个人版
|
249
|
</div>
|
352c53cc
梁保满
上传word回传数据
|
250
|
|
b0cd2598
梁保满
fix:测试问题
|
251
252
253
254
255
256
|
<el-dialog
:close-on-click-modal="false"
title="选择分享范围"
:visible.sync="dialogVisible"
width="400px"
>
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
257
258
259
260
261
262
263
264
265
266
267
268
269
|
<el-form :model="shareForm" :rules="shareRulesForm" label-width="160px">
<el-form-item prop="share" label="分享范围:">
<el-radio-group v-model="shareForm.sharingType">
<el-radio :label="0">任课班级分享</el-radio>
<el-radio :label="1">全年级分享</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveShare">确 定</el-button>
<el-button @click="dialogVisible = false">取 消</el-button>
</div>
</el-dialog>
|
b0cd2598
梁保满
fix:测试问题
|
270
271
272
273
274
275
276
277
278
279
280
281
|
<el-dialog
:close-on-click-modal="false"
title="上传word文档"
:visible.sync="diaUp"
width="600px"
>
<upload
:url="url"
:params="{ type: query.type }"
@upSuccess="upSuccess"
fileName="下载"
>
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
282
|
<div class="down-box" slot="down">
|
b0cd2598
梁保满
fix:测试问题
|
283
284
285
|
<p class="down-head">
<span>第一步:导出菁优网试卷,</span>
|
4d5235d7
梁保满
学生,教师修改,顶部返回备题组卷记...
|
286
|
<span class="img-box">
|
b0cd2598
梁保满
fix:测试问题
|
287
288
289
290
291
|
<el-image
class="img"
:src="examplePic"
:preview-src-list="examplePicList"
>
|
4d5235d7
梁保满
学生,教师修改,顶部返回备题组卷记...
|
292
293
294
|
</el-image>
导出选项示例。
</span>
|
b0cd2598
梁保满
fix:测试问题
|
295
296
|
或者
<el-link type="primary" @click="downExcel">下载模板</el-link> 。
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
297
298
299
300
301
302
303
304
|
</p>
<p>第二步:上传完成编辑好的试卷。</p>
</div>
</upload>
<div class="dialog-footer" slot="footer">
<el-button @click="diaUp = false">取 消</el-button>
</div>
</el-dialog>
|
77ebf04d
梁保满
个人版
|
305
306
307
308
|
</div>
</template>
<script>
|
23659274
梁保满
备题接口对接
|
309
|
import { downloadFile } from "@/utils";
|
5f80d60e
梁保满
备题试卷模版
|
310
|
import axios from "axios";
|
b0cd2598
梁保满
fix:测试问题
|
311
|
import example from "@/assets/images/example.jpg";
|
77ebf04d
梁保满
个人版
|
312
313
314
315
|
export default {
name: "examinationPaper",
data() {
return {
|
e5e4a3e6
梁保满
v1.3
|
316
|
code: "",
|
47a01cb6
梁保满
v1.3测试问题
|
317
|
gdClass: 0, //已归档班级数量
|
77ebf04d
梁保满
个人版
|
318
319
|
loading: false,
userName: "",
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
320
|
dialogVisible: false,
|
77ebf04d
梁保满
个人版
|
321
322
323
|
query: {
classId: "",
subjectName: "",
|
ce278878
梁保满
2-2 bugfix
|
324
|
tagId: "",
|
77ebf04d
梁保满
个人版
|
325
|
title: "",
|
352c53cc
梁保满
上传word回传数据
|
326
|
type: 1, //试卷类型
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
327
|
share: 0, //分享类型
|
77ebf04d
梁保满
个人版
|
328
329
330
|
},
classList: [],
subjectList: [],
|
ce278878
梁保满
2-2 bugfix
|
331
|
typeList: [],
|
77ebf04d
梁保满
个人版
|
332
|
archivedTotal: 0, //已归档答题卡数量
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
333
|
tableData: [],
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
334
335
336
337
338
339
340
341
342
|
shareForm: {
id: "",
sharingType: 0, //0-任课班级/1-全年级
},
shareRulesForm: {
sharingType: [
{ required: true, message: "选择分享范围", trigger: "blur" },
],
},
|
77ebf04d
梁保满
个人版
|
343
344
345
|
total: 0,
page: 1,
size: 20,
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
346
347
|
// v1.5
|
b0cd2598
梁保满
fix:测试问题
|
348
349
|
totalCount: {
//数量统计
|
352c53cc
梁保满
上传word回传数据
|
350
351
352
|
my: 0,
share: 0,
},
|
b0cd2598
梁保满
fix:测试问题
|
353
354
|
diaUp: false, //上传word弹窗开关
url: "/api_html/common/paper/upload", //上传文档地址
|
4d5235d7
梁保满
学生,教师修改,顶部返回备题组卷记...
|
355
|
examplePic: example,
|
b0cd2598
梁保满
fix:测试问题
|
356
|
examplePicList: [example],
|
77ebf04d
梁保满
个人版
|
357
358
359
|
};
},
async created() {
|
7812e986
梁保满
班主任查看报表添加额外信息
|
360
|
this.code = this.$store.getters.csCode;
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
361
362
363
|
this.role =
this.$store.getters.info.showRole ||
this.$store.getters.info.permissions[0].role;
|
77ebf04d
梁保满
个人版
|
364
|
this.userName = this.$store.getters.info.name || "";
|
77da338a
梁保满
自测问题修改
|
365
366
|
this.query.type = this.$route.query.type || 1;
this.query.share = this.$route.query.share || 0;
|
b0cd2598
梁保满
fix:测试问题
|
367
|
this._QueryClassList2();
|
352c53cc
梁保满
上传word回传数据
|
368
369
370
371
|
await this._QueryClassList();
if (!this.query.classId) {
return;
}
|
b0cd2598
梁保满
fix:测试问题
|
372
|
this._QueryTypeList();
|
352c53cc
梁保满
上传word回传数据
|
373
374
|
await this._QuerySubjectList();
this._QueryData();
|
77ebf04d
梁保满
个人版
|
375
376
|
},
methods: {
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
377
|
refreshStic() {
|
77da338a
梁保满
自测问题修改
|
378
379
380
|
this.loading = true;
setTimeout(() => {
this._QueryData();
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
381
382
|
}, 500);
},
|
e5e4a3e6
梁保满
v1.3
|
383
384
385
386
387
|
toArchiving() {
this.$router.push({
path: "/examinationPaperArchiving",
});
},
|
ce278878
梁保满
2-2 bugfix
|
388
|
//去组卷
|
77ebf04d
梁保满
个人版
|
389
|
toAdd(query) {
|
c3cdce9c
梁保满
bug
|
390
391
392
393
|
if (!this.query.classId) {
this.$message.warning("没有任课班级,请先设置。");
return;
}
|
77ebf04d
梁保满
个人版
|
394
395
|
let routerItem = {
path: "/examinationPaperAdd",
|
384a2a54
梁保满
请求头添加班主任信息,bug修改
|
396
397
398
399
|
query: {
...query,
listType: this.query.type,
listShare: this.query.share,
|
b0cd2598
梁保满
fix:测试问题
|
400
401
|
subjectName: this.query.subjectName,
},
|
77ebf04d
梁保满
个人版
|
402
|
};
|
77ebf04d
梁保满
个人版
|
403
404
|
this.$router.push(routerItem);
},
|
ce278878
梁保满
2-2 bugfix
|
405
406
|
//去备题
toAddQs(query) {
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
407
408
409
410
411
|
if (!this.query.classId) {
this.$message.warning("没有任课班级,请先设置。");
return;
}
let routerItem = {
|
ce278878
梁保满
2-2 bugfix
|
412
|
path: "/examinationPaperAddQs",
|
384a2a54
梁保满
请求头添加班主任信息,bug修改
|
413
414
415
416
|
query: {
...query,
listType: this.query.type,
listShare: this.query.share,
|
b0cd2598
梁保满
fix:测试问题
|
417
|
},
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
418
|
};
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
419
420
|
this.$router.push(routerItem);
},
|
77ebf04d
梁保满
个人版
|
421
422
423
424
425
|
toEdit(item) {
this.$router.push({
path: "/examinationPaperEdit",
query: {
paperId: item.id,
|
b0cd2598
梁保满
fix:测试问题
|
426
|
paperType: this.query.type,
|
77ebf04d
梁保满
个人版
|
427
428
429
|
},
});
},
|
b0cd2598
梁保满
fix:测试问题
|
430
431
|
handleDropdownClick(value, item) {
//更多
|
77ebf04d
梁保满
个人版
|
432
433
|
const that = this;
switch (value) {
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
434
435
436
437
438
439
|
case 1:
//修改分享范围
that.shareForm.id = item.id;
that.shareForm.sharingType = item.sharingType;
that.dialogVisible = true;
break;
|
77ebf04d
梁保满
个人版
|
440
441
|
case 2:
//复制
|
ce278878
梁保满
2-2 bugfix
|
442
443
444
445
446
|
if (that.type == 2) {
that.toAdd({ type: 2, paperId: item.id });
} else {
that.toAddQs({ type: 2, paperId: item.id });
}
|
77ebf04d
梁保满
个人版
|
447
448
449
450
451
452
453
|
break;
case 3:
//归档
that.recovery(item);
break;
}
},
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
454
|
changPaperType(type) {
|
b0cd2598
梁保满
fix:测试问题
|
455
456
457
|
this.query.type = type;
this.query.tagId = "";
this.changShare(0);
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
458
|
},
|
77ebf04d
梁保满
个人版
|
459
460
461
462
|
changePage(page) {
this.page = page;
this._QueryData(this.query.title);
},
|
352c53cc
梁保满
上传word回传数据
|
463
|
//修改分享范围
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
464
|
async saveShare() {
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
465
466
467
468
469
470
471
472
473
474
475
476
477
478
|
const { data, status, info } = await this.$request.modifyPaper({
paperId: this.shareForm.id,
sharingType: this.shareForm.sharingType,
});
if (status === 0) {
this.shareForm.id = "";
this.shareForm.sharingType = 1;
this.dialogVisible = false;
this.$message.success(info);
this._QueryData(this.query.title == "");
} else {
this.$message.error(info);
}
},
|
352c53cc
梁保满
上传word回传数据
|
479
|
//归档
|
77ebf04d
梁保满
个人版
|
480
|
async recovery(item) {
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
481
482
483
484
485
|
let modifyPaper =
this.role == "ROLE_PERSONAL"
? this.$request.pModifyPaper
: this.$request.modifyPaper;
const { data, status, info } = await modifyPaper({
|
77ebf04d
梁保满
个人版
|
486
487
488
489
|
paperId: item.id,
status: 2,
});
if (status === 0) {
|
352c53cc
梁保满
上传word回传数据
|
490
|
let type = this.query.title ? true : false;
|
77ebf04d
梁保满
个人版
|
491
492
493
494
495
496
|
this.page = 1;
this._QueryData(type);
} else {
this.$message.error(info);
}
},
|
352c53cc
梁保满
上传word回传数据
|
497
498
|
//根据试卷名称查找
async getData(bool) {
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
499
|
this.page = 1;
|
352c53cc
梁保满
上传word回传数据
|
500
|
this._QueryData(bool);
|
352c53cc
梁保满
上传word回传数据
|
501
|
},
|
77ebf04d
梁保满
个人版
|
502
503
|
//切换班级
async changClazz() {
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
504
|
this.page = 1;
|
ce278878
梁保满
2-2 bugfix
|
505
|
if (this.query.type == 2) {
|
b0cd2598
梁保满
fix:测试问题
|
506
|
await this._QueryTypeList();
|
ce278878
梁保满
2-2 bugfix
|
507
|
}
|
77ebf04d
梁保满
个人版
|
508
|
await this._QuerySubjectList();
|
77ebf04d
梁保满
个人版
|
509
|
this._QueryData(false);
|
352c53cc
梁保满
上传word回传数据
|
510
511
|
},
//切换类型
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
512
|
async changShare(share) {
|
b0cd2598
梁保满
fix:测试问题
|
513
|
this.query.share = share;
|
352c53cc
梁保满
上传word回传数据
|
514
|
this.page = 1;
|
4d5235d7
梁保满
学生,教师修改,顶部返回备题组卷记...
|
515
516
517
518
519
|
this.$router.replace({
name: "examinationPaper",
query: {
type: this.query.type,
share: this.query.share,
|
b0cd2598
梁保满
fix:测试问题
|
520
521
|
},
});
|
352c53cc
梁保满
上传word回传数据
|
522
|
this._QueryData(false);
|
77ebf04d
梁保满
个人版
|
523
|
},
|
47a01cb6
梁保满
v1.3测试问题
|
524
525
526
527
528
529
530
531
532
533
534
535
536
|
// 查找班级
async _QueryClassList2() {
this.loading = true;
let fetchClassList =
this.role == "ROLE_PERSONAL"
? this.$request.pClassList
: this.$request.fetchClassList;
const { data, status, info } = await fetchClassList({ status: 1 });
if (status === 0) {
this.gdClass = data?.list?.length || 0;
} else {
this.$message.error(info);
|
77ebf04d
梁保满
个人版
|
537
538
539
540
541
|
}
},
// 查找班级
async _QueryClassList() {
this.loading = true;
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
542
543
544
545
546
547
|
let fetchClassList =
this.role == "ROLE_PERSONAL"
? this.$request.pClassList
: this.$request.fetchClassList;
const { data, status, info } = await fetchClassList();
|
77ebf04d
梁保满
个人版
|
548
549
550
551
552
|
if (status === 0) {
if (!!data.list) {
this.classList =
data.list?.map((item) => {
return {
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
553
|
value: this.role == "ROLE_PERSONAL" ? item.id : item.classId,
|
77ebf04d
梁保满
个人版
|
554
555
556
557
558
559
560
561
562
563
564
|
label: item.className,
};
}) || [];
this.query.classId = this.classList[0]?.value;
}
} else {
this.$message.error(info);
}
},
// 查找科目
async _QuerySubjectList() {
|
34b574e0
梁保满
细节优化
|
565
|
if (!this.query.classId) return;
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
566
567
568
569
570
571
|
let fetchSubjectList =
this.role == "ROLE_PERSONAL"
? this.$request.pSubjectList
: this.$request.fetchSubjectList;
const { data, status, info } = await fetchSubjectList({
|
77ebf04d
梁保满
个人版
|
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
|
classId: this.query.classId,
});
if (status === 0) {
this.subjectList =
data.subjectNames?.map((item) => {
return {
value: item,
label: item,
};
}) || [];
this.query.subjectName = this.subjectList[0]?.value;
} else {
this.$message.error(info);
}
},
|
ce278878
梁保满
2-2 bugfix
|
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
|
// 查找答题卡类型
async _QueryTypeList() {
if (!this.query.classId) return;
let fetchTypeNames =
this.role == "ROLE_PERSONAL"
? this.$request.pPaperTagList
: this.$request.fetchTypeNames;
const { data, status, info } = await fetchTypeNames({
classId: this.query.classId,
type: 0,
});
if (status === 0) {
this.typeList =
data.list.map((item) => {
return {
value: item.tagId,
label: item.tag,
};
}) || [];
this.typeList.unshift({
value: "",
label: "请选择标签",
});
|
b0cd2598
梁保满
fix:测试问题
|
611
|
this.query.tagId = "";
|
ce278878
梁保满
2-2 bugfix
|
612
613
614
615
|
} else {
this.$message.error(info);
}
},
|
77ebf04d
梁保满
个人版
|
616
|
async _QueryData(type) {
|
34b574e0
梁保满
细节优化
|
617
|
if (!this.query.classId) return;
|
77ebf04d
梁保满
个人版
|
618
619
620
621
622
|
this.loading = true;
//获取答题卡列表
let query = {};
if (!type) {
this.query.title = "";
|
77ebf04d
梁保满
个人版
|
623
|
}
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
624
|
query = { ...this.query };
|
77ebf04d
梁保满
个人版
|
625
|
for (let key in query) {
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
626
|
if (!query[key] && query[key] !== 0) {
|
b0cd2598
梁保满
fix:测试问题
|
627
|
delete query[key];
|
77ebf04d
梁保满
个人版
|
628
629
630
631
632
633
634
635
636
|
}
}
if (!query.classId) {
this.total = 0;
this.tableData = [];
this.loading = false;
return;
}
this.loading = true;
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
637
638
639
640
641
642
|
let fetchPaperList =
this.role == "ROLE_PERSONAL"
? this.$request.pPaperList
: this.$request.fetchPaperList;
const { data, status, info } = await fetchPaperList({
|
77ebf04d
梁保满
个人版
|
643
644
645
646
647
648
649
|
...query,
status: 1,
page: this.page,
size: this.size,
});
this.loading = false;
if (status === 0) {
|
e17ec739
梁保满
随堂问,即时测导出爆表修改
|
650
651
|
this.totalCount.my = data?.myCount || 0;
this.totalCount.share = data?.gradeCount || 0;
|
77ebf04d
梁保满
个人版
|
652
653
654
655
656
657
658
|
this.archivedTotal = data.archivedTotal;
this.total = data.total;
this.tableData = (data.list && [...data.list]) || [];
} else {
this.$message.error(info);
}
},
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
659
|
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
660
661
|
//v1.5
upSuccess(res) {
|
352c53cc
梁保满
上传word回传数据
|
662
663
664
665
666
667
668
669
670
671
|
if (res.status == 0) {
//导入成功
this.$message.closeAll();
this.$message({
showClose: true,
message: `${res.info}`,
type: "success",
duration: 2000,
});
this.diaUp = false;
|
b0cd2598
梁保满
fix:测试问题
|
672
|
let params = JSON.stringify(res.data);
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
673
|
if (this.query.type == 2) {
|
b0cd2598
梁保满
fix:测试问题
|
674
|
this.toAdd({ params, isUpload: 1 });
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
675
|
} else {
|
b0cd2598
梁保满
fix:测试问题
|
676
|
this.toAddQs({ params });
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
677
|
}
|
352c53cc
梁保满
上传word回传数据
|
678
|
}
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
679
680
681
|
},
handleAdd(value) {
if (value == 2) {
|
b0cd2598
梁保满
fix:测试问题
|
682
|
this.toAdd();
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
683
|
} else {
|
b0cd2598
梁保满
fix:测试问题
|
684
|
this.diaUp = true;
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
685
686
687
|
}
},
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
688
|
async downExcel() {
|
5f80d60e
梁保满
备题试卷模版
|
689
|
axios("static/试卷模板.docx", {
|
b0cd2598
梁保满
fix:测试问题
|
690
691
|
responseType: "arraybuffer",
}).then((res) => {
|
5f80d60e
梁保满
备题试卷模版
|
692
693
|
let blob = new Blob([res.data], {
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
694
|
});
|
5f80d60e
梁保满
备题试卷模版
|
695
|
downloadFile("试卷模板.docx", blob);
|
b0cd2598
梁保满
fix:测试问题
|
696
|
});
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
697
|
},
|
77ebf04d
梁保满
个人版
|
698
699
700
701
702
703
704
705
706
707
708
709
710
|
},
};
</script>
<style scoped lang="scss">
.tips {
display: flex;
padding-left: 30px;
line-height: 16px;
font-size: 14px;
color: #999;
margin-bottom: 10px;
}
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
711
|
|
77ebf04d
梁保满
个人版
|
712
713
714
715
716
|
.content {
margin: 0 20px;
background: #f8f8f8;
padding: 12px;
border-radius: 20px;
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
717
|
|
77ebf04d
梁保满
个人版
|
718
719
720
721
722
723
724
725
726
727
|
.item {
display: flex;
align-items: center;
width: 100%;
overflow: hidden;
box-sizing: border-box;
padding: 12px;
border-radius: 20px;
background: #fff;
margin-bottom: 12px;
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
728
|
|
77ebf04d
梁保满
个人版
|
729
730
731
|
&:last-of-type {
margin-bottom: 0;
}
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
732
|
|
77ebf04d
梁保满
个人版
|
733
734
735
736
737
738
739
740
741
742
|
.pic-box {
width: 80px;
height: 80px;
border-radius: 10px;
margin-right: 10px;
flex-shrink: 0;
background: #667ffd;
text-align: center;
color: #fff;
font-weight: 500;
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
743
|
|
77ebf04d
梁保满
个人版
|
744
745
746
747
748
749
|
.i-box {
padding-top: 10px;
font-size: 32px;
margin-bottom: 3px;
}
}
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
750
|
|
77ebf04d
梁保满
个人版
|
751
752
753
754
755
756
757
|
.info {
min-height: 80px;
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
758
|
|
77ebf04d
梁保满
个人版
|
759
760
761
762
|
.s-line {
padding: 0 5px;
color: #e2e2e2;
}
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
763
|
|
77ebf04d
梁保满
个人版
|
764
765
766
767
|
.title {
font-size: 16px;
color: #222;
font-weight: 500;
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
768
|
|
77ebf04d
梁保满
个人版
|
769
770
771
772
773
774
775
776
777
778
779
|
.label {
display: inline-block;
font-size: 12px;
color: #2e9afe;
line-height: 16px;
padding: 0 10px;
border: 1px solid #2e9afe;
border-radius: 10px;
transform: translateY(-2px);
}
}
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
780
|
|
77ebf04d
梁保满
个人版
|
781
782
783
784
|
.person {
color: #666;
}
}
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
785
|
|
77ebf04d
梁保满
个人版
|
786
787
788
789
790
|
.clazz {
font-size: 14px;
font-weight: 500;
position: relative;
position: relative;
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
791
|
|
77ebf04d
梁保满
个人版
|
792
793
794
|
&.active {
color: #667ffd;
}
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
795
|
|
77ebf04d
梁保满
个人版
|
796
797
798
799
800
801
|
.el-icon-success {
position: absolute;
right: 0;
top: -5px;
color: #667ffd;
}
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
802
|
|
77ebf04d
梁保满
个人版
|
803
804
805
806
807
808
|
&:last-of-type {
.el-icon-success {
right: -18px;
}
}
}
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
809
|
|
77ebf04d
梁保满
个人版
|
810
811
|
.btn-box {
flex-shrink: 0;
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
812
|
|
77ebf04d
梁保满
个人版
|
813
814
815
816
|
.edit {
margin-right: 12px;
}
}
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
817
|
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
818
819
|
.icon-refresh {
margin-left: 20px;
|
77ebf04d
梁保满
个人版
|
820
|
cursor: pointer;
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
821
|
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
822
823
|
&:hover {
color: #2e9afe;
|
77ebf04d
梁保满
个人版
|
824
825
826
827
|
}
}
}
}
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
828
|
|
77ebf04d
梁保满
个人版
|
829
830
831
832
833
|
.answer-header {
.sel-box {
.sel {
min-width: 160px;
}
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
834
|
|
77ebf04d
梁保满
个人版
|
835
836
837
838
839
|
:deep(.el-cascader__tags) {
flex-wrap: nowrap;
}
}
}
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
840
|
|
77ebf04d
梁保满
个人版
|
841
842
|
.dialog-footer {
text-align: center;
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
843
|
|
77ebf04d
梁保满
个人版
|
844
845
846
847
848
849
|
:deep(.el-button) {
border-radius: 20px;
padding: 8px 20px 7px;
margin: 0 12px;
}
}
|
6192eba8
梁保满
引用上传文件组件问题,备题组卷顶部
|
850
851
852
853
854
855
856
857
858
|
// v1.5
.examinationPaper-type {
padding: 16px 40px 0 20px;
width: 100%;
box-sizing: border-box;
display: flex;
justify-content: space-between;
}
|
352c53cc
梁保满
上传word回传数据
|
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
|
.content {
.tab-box {
padding-bottom: 10px;
.tab-s {
margin: 0 10px;
font-size: 17px;
line-height: 24px;
font-weight: 500;
cursor: pointer;
&:hover {
color: #667ffd;
}
&.active {
color: #667ffd;
|
b0cd2598
梁保满
fix:测试问题
|
877
|
border-bottom: 1px solid #667ffd;
|
352c53cc
梁保满
上传word回传数据
|
878
879
880
881
|
}
}
}
}
|
4d5235d7
梁保满
学生,教师修改,顶部返回备题组卷记...
|
882
883
884
885
886
887
888
889
|
.down-head {
display: flex;
align-items: center;
line-height: 22px;
.img-box {
position: relative;
|
b0cd2598
梁保满
fix:测试问题
|
890
|
color: #409EFF;
|
4d5235d7
梁保满
学生,教师修改,顶部返回备题组卷记...
|
891
892
893
894
895
896
897
898
899
900
901
|
.img {
position: absolute;
left: -1px;
top: -1px;
opacity: 0;
width: 86px;
height: 22px;
}
}
}
|
77ebf04d
梁保满
个人版
|
902
|
</style>
|