Blame view

src/views/basic/askTestQuestion/index.vue 41.1 KB
f45b3c05   LH_PC   云平台新UI界面
1
2
3
4
5
6
7
8
9
  <template>
      <el-container class="default-body">
          <el-header>
              <div class="default-title" style="float: left;">
                  {{ dataType == "1" ? '随堂问备题' : '即时测组卷' }}
              </div>
              <el-dropdown v-if="this.dataType == '2'" :hide-on-click="true" style="float: right;margin-right: 50px;">
                  <el-button :size="'small'" :icon="'el-icon-plus'" class="green-el-button">添加试卷</el-button>
                  <el-dropdown-menu slot="dropdown">
6bca489d   LH_PC   云平台二期UI
10
                      <el-dropdown-item @click.native="importQuestion(1)">导入试卷</el-dropdown-item>
f45b3c05   LH_PC   云平台新UI界面
11
12
13
14
                      <el-dropdown-item @click.native="createAnwseredCard()">创建答题卡</el-dropdown-item>
                  </el-dropdown-menu>
              </el-dropdown>
              <el-button style="float: right;margin-right: 50px;" :size="'small'" :icon="'el-icon-plus'"
6bca489d   LH_PC   云平台二期UI
15
                  class="green-el-button" @click.native="importQuestion(2)" v-if="this.dataType == '1'">添加课件</el-button>
f45b3c05   LH_PC   云平台新UI界面
16
17
          </el-header>
          <div class="default-filter">
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
18
19
              <el-input v-model="query.paper" :placeholder="dataType == '1' ? '搜索课件' : '搜索试卷'"
                  suffix-icon="el-icon-search" class="filter-input" clearable />
f45b3c05   LH_PC   云平台新UI界面
20
              <el-select @change="_changeClass" v-model="query.class" class="filter-select" placeholder="选择班级">
6bb2b3e8   LH_PC   feat:打印调整
21
                  <el-option v-for="item in classList" :key="item.classId" :label="item.className"
f45b3c05   LH_PC   云平台新UI界面
22
23
24
                      :value="item.classId" />
              </el-select>
              <el-select v-model="query.subject" placeholder="选择科目" class="filter-select">
6bb2b3e8   LH_PC   feat:打印调整
25
                  <el-option v-for=" item in subjectList " :key="item" :label="item" :value="item" />
f45b3c05   LH_PC   云平台新UI界面
26
27
28
29
30
31
32
33
34
35
              </el-select>
              <el-select v-if="dataType == '2'" v-model="query.tagId" placeholder="选择测验类型" class="filter-select">
                  <el-option v-for="item in typeList" :key="item.label" :label="item.label" :value="item.value" />
              </el-select>
              <el-date-picker value-format="yyyy-MM-dd" class="filter-datePicker" v-model="query.dateRange"
                  type="daterange" range-separator="-">
              </el-date-picker>
              <el-button type="primary" @click="_serach">
                  筛选
              </el-button>
ef16e57e   LH_PC   fix:前端版本迭代
36
              <el-radio-group v-model="query.dateStatus" class="default-date-radio-group">
6bca489d   LH_PC   云平台二期UI
37
                  <el-radio-button label="onDay">今天</el-radio-button>
f45b3c05   LH_PC   云平台新UI界面
38
39
40
41
42
                  <el-radio-button label="onWeek">本周</el-radio-button>
                  <el-radio-button label="onMonth">本月</el-radio-button>
              </el-radio-group>
          </div>
          <el-main>
ead476dd   LH_PC   fix:最终定版
43
              <div class="paper-list">
f45b3c05   LH_PC   云平台新UI界面
44
                  <el-tabs v-model="tabType" v-loading="queryLoading" type="card" class="default-tabs">
6bca489d   LH_PC   云平台二期UI
45
46
47
48
49
50
51
52
53
54
55
                      <el-tab-pane :name="'0'" :label="`我自编的(${createdCount})`">
                          <div class="card-content" :key="index" v-for="( item, index ) in defaultList ">
                              <el-row>
                                  <el-col :span="6" class="left">
                                      <div class="left-icon">
                                          <div class="icon">
                                              <img src="../../../assets/images/shuben.png" />
                                          </div>
                                          <div class="text">
                                              {{ item.id }}
                                          </div>
ead476dd   LH_PC   fix:最终定版
56
57
58
                                          <div class="text-radius" v-if="item.tag && item.tag.length >= 1">
                                              <span> {{ item.tag }}&nbsp;</span>
                                          </div>
6bca489d   LH_PC   云平台二期UI
59
60
61
62
63
64
                                      </div>
                                  </el-col>
                                  <el-col :span="18" class="content">
                                      <div class="title-text">
                                          <el-tooltip effect="dark" :content="item.title" placement="left">
                                              <div class="title-label overflowText">
f45b3c05   LH_PC   云平台新UI界面
65
                                                  {{ item.title }}
f45b3c05   LH_PC   云平台新UI界面
66
                                              </div>
6bca489d   LH_PC   云平台二期UI
67
68
69
70
71
72
                                          </el-tooltip>
                                          <el-dropdown class="dropdown-button" :hide-on-click="false">
                                              <el-button>操作</el-button>
                                              <el-dropdown-menu slot="dropdown">
                                                  <el-dropdown-item
                                                      @click.native="_detailQ(item.id)">查看</el-dropdown-item>
6bb2b3e8   LH_PC   feat:打印调整
73
74
                                                  <el-dropdown-item v-if="dataType != 1"
                                                      @click.native="_print(item)">打印</el-dropdown-item>
96dbf0ac   刘鸿   feat:试卷下载
75
76
                                                  <el-dropdown-item v-if="dataType != 1"
                                                      @click.native="_download(item)">下载</el-dropdown-item>
6bb2b3e8   LH_PC   feat:打印调整
77
                                                  <el-dropdown-item @click.native="_updateQ(item)">修改</el-dropdown-item>
6bca489d   LH_PC   云平台二期UI
78
79
80
81
82
                                                  <el-dropdown-item @click.native="_copy(item)">复制</el-dropdown-item>
                                                  <el-dropdown-item>
                                                      <el-popconfirm style="color:gray !important;"
                                                          @confirm="_deleteDetermineQ(item.id)"
                                                          :title="dataType == 1 ? '确认删除此课件' : '确认删除此试卷'">
ead476dd   LH_PC   fix:最终定版
83
84
                                                          <el-button class="small-button" :size="'small'"
                                                              style="color:#606266 !important;"
6bca489d   LH_PC   云平台二期UI
85
86
87
88
89
90
91
92
93
94
95
96
                                                              @click.native="_delete(item.id)" type="text"
                                                              slot="reference">删除</el-button>
                                                      </el-popconfirm>
                                                  </el-dropdown-item>
                                              </el-dropdown-menu>
                                          </el-dropdown>
                                      </div>
                                      <div class="descption-tag-text" v-if="role != 'ROLE_PERSONAL'">
                                          <template>
                                              <span class="descption-label"> 授课端同步:</span>
                                              <div class="descption-box">
                                                  <span class="descption-tag"
6bb2b3e8   LH_PC   feat:打印调整
97
                                                      v-for="( clazzChild, indexs ) in item.classList "
6bca489d   LH_PC   云平台二期UI
98
99
100
101
                                                      :key="clazzChild.classId"
                                                      :class="clazzChild.keepStatus == 1 ? 'active' : ''">
                                                      {{ clazzChild.className }}
                                                      <i v-if="clazzChild.keepStatus == 1" class="el-icon-success"></i>
f45b3c05   LH_PC   云平台新UI界面
102
                                                  </span>
6bca489d   LH_PC   云平台二期UI
103
104
105
106
                                                  <el-tooltip effect="dark" content="刷新同步状态">
                                                      <img @click="_serach" height="18px" width="18px"
                                                          src="../../../assets/images/shuaxin.png" />
                                                  </el-tooltip>
f45b3c05   LH_PC   云平台新UI界面
107
                                              </div>
6bca489d   LH_PC   云平台二期UI
108
109
110
111
                                          </template>
                                      </div>
                                      <div class="descption-text">
                                          <span class="descption-text-block">
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
112
113
114
115
116
117
                                              <div class="blocks blocks-20">
                                                  <div class="pic">
                                                      <img src="../../../assets/images/tishu.png" />
                                                  </div>
                                                  <div class="text"> 总题数:</div>
                                                  <div class="value">{{ item.questionNum }}</div>
f45b3c05   LH_PC   云平台新UI界面
118
                                              </div>
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
119
120
121
122
123
124
125
126
                                              <div class="blocks" v-if="dataType == 2">
                                                  <div class="pic">
                                                      <img src="../../../assets/images/tishu.png" />
                                                  </div>
                                                  <div class="text" v-if="dataType == 2"> 考试时长:</div>
                                                  <div class="value" v-if="dataType == 2">{{ item.examsDuration }}
                                                      分钟
                                                  </div>
f45b3c05   LH_PC   云平台新UI界面
127
                                              </div>
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
128
129
130
131
132
133
134
135
136
137
138
                                              <div class="blocks"
                                                  :class="dataType == 1 ? 'ask-blocks-create' : 'test-blocks-create'">
                                                  <div class="pic">
                                                      <img src="../../../assets/images/tishu.png" />
                                                  </div>
                                                  <div class="text"> 创建人:</div>
                                                  <el-tooltip effect="dark" :content="item.realName" placement="left">
                                                      <div class="value">
                                                          {{ item.realName }}
                                                      </div>
                                                  </el-tooltip>
f45b3c05   LH_PC   云平台新UI界面
139
                                              </div>
6bca489d   LH_PC   云平台二期UI
140
141
142
143
144
                                          </span>
                                      </div>
                                      <div class="descption-text">
                                          <span class="descption-text-block">
                                              <div class="pic"><img src="../../../assets/images/rili.png"></img>
f45b3c05   LH_PC   云平台新UI界面
145
                                              </div>
6bca489d   LH_PC   云平台二期UI
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
                                              <div class="text"> 更新时间:</div>
                                              <div class="value">{{ item.modifiedTime }}</div>
                                              <span class="sharing-descption"
                                                  v-if="item.sharingType == 1">已分享到非任课班级</span>
                                          </span>
                                      </div>
                                  </el-col>
                              </el-row>
                          </div>
                      </el-tab-pane>
                      <el-tab-pane :name="'1'" :label="`被共享的(${sharedCount})`">
                          <div class="card-content" :key="index" v-for="( item, index ) in sharedList ">
                              <el-row>
                                  <el-col :span="6" class="left">
                                      <div class="left-icon">
                                          <div class="icon">
                                              <img src="../../../assets/images/shuben.png" />
                                          </div>
                                          <div class="text">
                                              {{ item.id }}
                                          </div>
ead476dd   LH_PC   fix:最终定版
167
168
169
                                          <div class="text-radius" v-if="item.tag && item.tag.length >= 1">
                                              <span> {{ item.tag }}&nbsp;</span>
                                          </div>
6bca489d   LH_PC   云平台二期UI
170
171
172
173
174
175
176
177
178
179
180
181
182
183
                                      </div>
                                  </el-col>
                                  <el-col :span="18" class="content">
                                      <div class="title-text">
                                          <el-tooltip effect="dark" :content="item.title" placement="left">
                                              <div class="title-label overflowText">
                                                  {{ item.title }}
                                              </div>
                                          </el-tooltip>
                                          <el-dropdown class="dropdown-button" :hide-on-click="false">
                                              <el-button>操作</el-button>
                                              <el-dropdown-menu slot="dropdown">
                                                  <el-dropdown-item
                                                      @click.native="_detailQ(item.id)">查看</el-dropdown-item>
ef16e57e   LH_PC   fix:前端版本迭代
184
                                                  <el-dropdown-item @click.native="_copy(item)">复制</el-dropdown-item>
6bca489d   LH_PC   云平台二期UI
185
186
187
188
                                                  <el-dropdown-item>
                                                      <el-popconfirm style="color:gray !important;"
                                                          @confirm="_deleteDetermineQ(item.id)"
                                                          :title="dataType == 1 ? '确认删除此课件' : '确认删除此试卷'">
ead476dd   LH_PC   fix:最终定版
189
190
                                                          <el-button class="small-button" :size="'small'"
                                                              style="color:#606266 !important;"
6bca489d   LH_PC   云平台二期UI
191
192
193
194
195
196
197
198
199
200
201
202
                                                              @click.native="_delete(item.id)" type="text"
                                                              slot="reference">删除</el-button>
                                                      </el-popconfirm>
                                                  </el-dropdown-item>
                                              </el-dropdown-menu>
                                          </el-dropdown>
                                      </div>
                                      <div class="descption-tag-text" v-if="role != 'ROLE_PERSONAL'">
                                          <template>
                                              <span class="descption-label"> 授课端同步:</span>
                                              <div class="descption-box">
                                                  <span class="descption-tag"
6bb2b3e8   LH_PC   feat:打印调整
203
                                                      v-for="( clazzChild, indexs ) in item.classList "
6bca489d   LH_PC   云平台二期UI
204
205
206
207
                                                      :key="clazzChild.classId"
                                                      :class="clazzChild.keepStatus == 1 ? 'active' : ''">
                                                      {{ clazzChild.className }}
                                                      <i v-if="clazzChild.keepStatus == 1" class="el-icon-success"></i>
f45b3c05   LH_PC   云平台新UI界面
208
                                                  </span>
6bca489d   LH_PC   云平台二期UI
209
210
211
212
213
214
215
216
217
                                                  <el-tooltip effect="dark" content="刷新同步状态">
                                                      <img @click="_serach" height="18px" width="18px"
                                                          src="../../../assets/images/shuaxin.png" />
                                                  </el-tooltip>
                                              </div>
                                          </template>
                                      </div>
                                      <div class="descption-text">
                                          <span class="descption-text-block">
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
218
219
220
221
222
223
                                              <div class="blocks blocks-20">
                                                  <div class="pic">
                                                      <img src="../../../assets/images/tishu.png" />
                                                  </div>
                                                  <div class="text"> 总题数:</div>
                                                  <div class="value">{{ item.questionNum }}</div>
6bca489d   LH_PC   云平台二期UI
224
                                              </div>
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
225
226
227
228
229
230
231
232
                                              <div class="blocks" v-if="dataType == 2">
                                                  <div class="pic" v-if="dataType == 2">
                                                      <img src="../../../assets/images/tishu.png" />
                                                  </div>
                                                  <div class="text" v-if="dataType == 2"> 考试时长:</div>
                                                  <div class="value" v-if="dataType == 2">{{ item.examsDuration }}
                                                      分钟
                                                  </div>
6bca489d   LH_PC   云平台二期UI
233
                                              </div>
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
234
235
236
237
238
239
240
241
242
243
244
                                              <div class="blocks"
                                                  :class="dataType == 1 ? 'ask-blocks-create' : 'test-blocks-create'">
                                                  <div class="pic">
                                                      <img src="../../../assets/images/tishu.png" />
                                                  </div>
                                                  <div class="text"> 创建人:</div>
                                                  <el-tooltip effect="dark" :content="item.realName" placement="left">
                                                      <div class="value">
                                                          {{ item.realName }}
                                                      </div>
                                                  </el-tooltip>
f45b3c05   LH_PC   云平台新UI界面
245
                                              </div>
6bca489d   LH_PC   云平台二期UI
246
247
248
249
250
251
252
253
254
255
256
257
258
                                          </span>
                                      </div>
                                      <div class="descption-text">
                                          <span class="descption-text-block">
                                              <div class="pic"><img src="../../../assets/images/rili.png"></img>
                                              </div>
                                              <div class="text"> 更新时间:</div>
                                              <div class="value">{{ item.modifiedTime }}</div>
                                          </span>
                                      </div>
                                  </el-col>
                              </el-row>
                          </div>
f45b3c05   LH_PC   云平台新UI界面
259
260
261
262
263
264
                      </el-tab-pane>
                      <div slot="tab-bar">
                          <el-button type="primary" icon="el-icon-plus">新增</el-button>
                      </div>
                  </el-tabs>
                  <el-button size='mini' v-if="role == 'ROLE_PERSONAL' || role == 'ROLE_JIAOSHI'" @click="recycle"
6bca489d   LH_PC   云平台二期UI
265
                      style='position: absolute;right:40px;top:2.5px;'>查看回收站</el-button>
f45b3c05   LH_PC   云平台新UI界面
266
267
268
              </div>
          </el-main>
          <el-footer class="el-footer-pagination">
ef16e57e   LH_PC   fix:前端版本迭代
269
270
              <el-pagination @current-change="pageSizeChange" background layout="prev, pager, next"
                  :page-size="listPage.size" :current-page="listPage.page" :total="listPage.total">
f45b3c05   LH_PC   云平台新UI界面
271
272
              </el-pagination>
          </el-footer>
6bca489d   LH_PC   云平台二期UI
273
274
          <el-dialog :append-to-body="true" :close-on-click-modal="false" title="上传word文档" :visible.sync="diaUp"
              width="600px">
f45b3c05   LH_PC   云平台新UI界面
275
              <upload :url="url" :params="{ type: importType }" @upSuccess="upSuccess" fileName="下载">
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
276
                  <div class="down-box p0" slot="down" style="padding-left: 0px !important;">
ef16e57e   LH_PC   fix:前端版本迭代
277
278
279
280
281
                      <div class="down-head" v-if="importType == 1">
                          <span>第一步:
                              导出菁优网试卷/组卷网(学科网)试卷;为保证第三方试卷导入成功,请注意参考导出示例:
                          </span>
                          <p> 菁优网示例如下:</p>
f45b3c05   LH_PC   云平台新UI界面
282
283
284
                          <span class="img-box">
                              <el-image class="img" :src="examplePic" :preview-src-list="examplePicList">
                              </el-image>
ef16e57e   LH_PC   fix:前端版本迭代
285
286
                          </span>
                          <p> 组卷网(学科网)示例如下:</p>
f45b3c05   LH_PC   云平台新UI界面
287
288
289
                          <span class="img-box">
                              <el-image class="img" :src="examplePic2" :preview-src-list="examplePicList2">
                              </el-image>
f45b3c05   LH_PC   云平台新UI界面
290
                          </span>
ef16e57e   LH_PC   fix:前端版本迭代
291
                      </div>
ef16e57e   LH_PC   fix:前端版本迭代
292
293
294
295
296
297
298
                      <div class="down-head" v-if="importType == 2">
                          <span>
                              第一步:
                              <el-link type="primary" @click="downExcel">下载模板</el-link>,
                              或者导出菁优网试卷/组卷网(学科网)试卷;为保证第三方试卷导入成功,请注意参考导出示例:
                          </span>
                          <p> 菁优网示例如下:</p>
f45b3c05   LH_PC   云平台新UI界面
299
300
301
                          <span class="img-box">
                              <el-image class="img" :src="examplePic" :preview-src-list="examplePicList">
                              </el-image>
ef16e57e   LH_PC   fix:前端版本迭代
302
  
f45b3c05   LH_PC   云平台新UI界面
303
                          </span>
ef16e57e   LH_PC   fix:前端版本迭代
304
                          <p> 组卷网(学科网)示例如下:</p>
f45b3c05   LH_PC   云平台新UI界面
305
306
307
                          <span class="img-box">
                              <el-image class="img" :src="examplePic2" :preview-src-list="examplePicList2">
                              </el-image>
ef16e57e   LH_PC   fix:前端版本迭代
308
  
f45b3c05   LH_PC   云平台新UI界面
309
                          </span>
ead476dd   LH_PC   fix:最终定版
310
                      </div>
f45b3c05   LH_PC   云平台新UI界面
311
312
313
314
315
316
317
318
319
320
321
322
                      <p>第二步:上传完成编辑好的试卷。</p>
                  </div>
              </upload>
              <div class="dialog-footer" slot="footer">
                  <el-button @click="diaUp = false">取 消</el-button>
              </div>
          </el-dialog>
      </el-container>
  
  </template>
  
  <script>
6bca489d   LH_PC   云平台二期UI
323
  import { setDateRules, downloadFile } from "@/utils";
d3943e0d   LH_PC   feat:错题打印
324
  import { paperPrint } from "@/utils";
6bca489d   LH_PC   云平台二期UI
325
  import example from "@/assets/images/example.png";
f45b3c05   LH_PC   云平台新UI界面
326
  import example2 from "@/assets/images/example2.png";
6bca489d   LH_PC   云平台二期UI
327
  import axios from "axios";
f45b3c05   LH_PC   云平台新UI界面
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
  
  export default {
      data() {
          return {
              diaUp: false,
              examplePic: example,
              examplePic2: example2,
              examplePicList: [example],
              examplePicList2: [example2],
              role: "",
              classList: [],
              subjectList: [],
              defaultList: [],
              typeList: [],
              sharedList: [],
              dataType: "1",
              importType: 0,
ead476dd   LH_PC   fix:最终定版
345
              tabType: "0",
f45b3c05   LH_PC   云平台新UI界面
346
347
348
349
350
351
              url: "/api_html/common/paper/upload", //上传文档地址
              listPage: {
                  page: 1,
                  size: 8,
                  total: 0,
              },
ead476dd   LH_PC   fix:最终定版
352
              query: {
ef16e57e   LH_PC   fix:前端版本迭代
353
                  dateStatus: "-1",
f45b3c05   LH_PC   云平台新UI界面
354
355
356
357
358
359
360
361
362
363
364
365
366
                  title: "",
                  class: null,
                  subject: null,
                  dateRange: [
                      "2022-03-01", "2023-05-01"
                  ],
                  tagId: null
              },
              queryLoading: false,
              createdCount: 0,
              sharedCount: 0
          };
      },
6bca489d   LH_PC   云平台二期UI
367
      watch: {
f45b3c05   LH_PC   云平台新UI界面
368
          '$route'() {
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
369
              this.query.paper = "";
f45b3c05   LH_PC   云平台新UI界面
370
371
372
373
374
375
376
              this.dataType = location.href.endsWith("askPreparationQuestions") ? "1" : "2";
              this._serach();
          },
          'tabType'() {
              this.listPage.page = 1;
              this._serach();
          },
ead476dd   LH_PC   fix:最终定版
377
          'query.dateStatus'(val) {
f45b3c05   LH_PC   云平台新UI界面
378
              var dateRange = setDateRules(val);
f45b3c05   LH_PC   云平台新UI界面
379
380
381
              this.query.dateRange = [dateRange.startDay, dateRange.endDay];
          }
      },
ead476dd   LH_PC   fix:最终定版
382
      async created() {
f45b3c05   LH_PC   云平台新UI界面
383
384
385
386
387
          this.dataType = location.href.endsWith("askPreparationQuestions") ? "1" : "2";
          this.code = this.$store.getters.csCode;
          this.role =
              this.$store.getters.info.showRole ||
              this.$store.getters.info.permissions[0].role;
ead476dd   LH_PC   fix:最终定版
388
          this.query.dateStatus = "onWeek";
34aad61a   刘鸿   fix:修复tag列表显示问题、分...
389
          this.query.tagId = "";
6bca489d   LH_PC   云平台二期UI
390
          await this._loadQueryDatas();
f45b3c05   LH_PC   云平台新UI界面
391
392
      },
      methods: {
6bca489d   LH_PC   云平台二期UI
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
          async downExcel() {
              let url;
              let that = this;
              if (that.dataType == 1) {
                  url = "static/课件模板.docx";
              } else {
                  url = "static/试卷模板.docx";
              }
              axios(url, {
                  responseType: "arraybuffer",
              }).then((res) => {
                  let blob = new Blob([res.data], {
                      type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                  });
                  downloadFile(
                      that.dataType == 1 ? "课件模板.docx" : "试卷模板.docx",
                      blob
                  );
              });
          },
          async pageSizeChange(value) {
f45b3c05   LH_PC   云平台新UI界面
414
415
416
417
418
419
420
421
422
423
424
425
              this.listPage.page = value;
              await this._serach();
          },
          recycle() {
              let routerItem = {
                  path: "/askPreparationQuestionsRecycle"
              };
              if (this.dataType == '2') {
                  routerItem.path = "/testPaperRecycle";
              }
              this.$router.push(routerItem);
          },
6bca489d   LH_PC   云平台二期UI
426
          createAnwseredCard(params) {
f45b3c05   LH_PC   云平台新UI界面
427
428
429
430
431
432
433
434
435
436
              let routerItem = {
                  path: "/testPaperAdd",
                  query: {
                      listType: 2,
                      listShare: 0,
                      subjectName: this.query.subject,
                  },
              };
              this.$router.push(routerItem);
          },
6bca489d   LH_PC   云平台二期UI
437
          importQuestion(type) {
f45b3c05   LH_PC   云平台新UI界面
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
              this.importType = type;
              this.diaUp = true;
          },
          //v1.5
          upSuccess(res) {
              if (res.status == 0) {
                  //导入成功
                  this.$message.closeAll();
                  this.$message({
                      showClose: true,
                      message: `${res.info}`,
                      type: "success",
                      duration: 2000,
                  });
                  this.diaUp = false;
                  let params = JSON.stringify(res.data);
6bca489d   LH_PC   云平台二期UI
454
455
                  if (this.dataType == 1) {
                      this.toAdd({ params, isUpload: true });
f45b3c05   LH_PC   云平台新UI界面
456
                  } else {
6bca489d   LH_PC   云平台二期UI
457
                      this.toAddQs({ params, isUpload: true });
f45b3c05   LH_PC   云平台新UI界面
458
459
460
                  }
              }
          },
6bca489d   LH_PC   云平台二期UI
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
          toAdd(query) {
              if (!this.query.class) {
                  this.$message.warning("没有任课班级,请先设置。");
                  return;
              }
              let routerItem = {
                  path: "/askPreparationQuestionsAdd",
                  query: {
                      ...query,
                      classId: this.query.class,
                      listType: 2,
                      listShare: 0,
                      subjectName: this.query.subject,
                  },
              };
              this.$router.push(routerItem);
          },
          //去备题
          toAddQs(query) {
              if (!this.query.class) {
                  this.$message.warning("没有任课班级,请先设置。");
                  return;
              }
              let routerItem = {
                  path: "/testPaperAdd",
                  query: {
                      ...query,
                      classId: this.query.class,
                      listType: 2,
                      listShare: 0,
                      subjectName: this.query.subject,
                  },
              };
              this.$router.push(routerItem);
          },
f45b3c05   LH_PC   云平台新UI界面
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
          async _changeClass() {
              await this._loadSubjectData();
          },
          async _loadSubjectData() {
              const fetchSubject =
                  this.role == "ROLE_BANZHUREN" ? this.$request.cTSubjectList :
                      this.role == "ROLE_PERSONAL" ? this.$request.pSubjectList : this.$request.tSubjectList;
  
              const { data, status, info } = await fetchSubject({
                  classId: this.query.class,
              });
  
              if (status != 0) {
                  this.$message.error(info);
                  return;
              }
              this.subjectList = data?.subjectNames ?? [];
              this.query.subject = data?.subjectNames[0] ?? "";
          },
34aad61a   刘鸿   fix:修复tag列表显示问题、分...
515
          async _loadTypes(queryParams) {
f45b3c05   LH_PC   云平台新UI界面
516
517
518
519
520
521
              let fetchTypeNames =
                  this.role == "ROLE_PERSONAL"
                      ? this.$request.pPaperTagList
                      : this.$request.fetchTypeNames;
  
              const { data, status, info } = await fetchTypeNames({
34aad61a   刘鸿   fix:修复tag列表显示问题、分...
522
523
                  ...queryParams,
                  status: 1,
f45b3c05   LH_PC   云平台新UI界面
524
                  type: 0,
34aad61a   刘鸿   fix:修复tag列表显示问题、分...
525
526
                  page: this.listPage.page,
                  size: this.listPage.size
f45b3c05   LH_PC   云平台新UI界面
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
              });
              if (status != 0) {
                  this.$message.error(info);
                  return;
              }
              this.typeList =
                  data.list.map((item) => {
                      return {
                          value: item.tagId,
                          label: item.tag,
                      };
                  }) || [];
              this.typeList.unshift({
                  value: "",
                  label: "请选择标签",
              });
f45b3c05   LH_PC   云平台新UI界面
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
          },
          async _loadClassData() {
              const fetchClassList =
                  this.role == "ROLE_BANZHUREN" ? this.$request.cTClassList :
                      this.role == "ROLE_PERSONAL" ? this.$request.pClassList : this.$request.tClassList;
  
              const { data, status, info } = await fetchClassList();
  
              if (status != 0) {
                  this.$message.error(info);
                  return;
              }
  
              this.classList = data?.list ?? [];
  
              this.query.class = this.classList[0]?.classId
          },
          async _loadQueryDatas() {
              this.$loading.open();
              await this._loadClassData();
              await this._loadSubjectData();
f45b3c05   LH_PC   云平台新UI界面
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
              this.$loading.close();
              await this._serach();
          },
          async _serach() {
              this.queryLoading = true;
              let fetchPaperList =
                  this.role == "ROLE_PERSONAL"
                      ? this.$request.pPaperList
                      : this.$request.fetchPaperList;
  
              var queryParams = {
                  classId: "",
                  subjectName: "",
                  tagId: "",
                  title: "",
ef16e57e   LH_PC   fix:前端版本迭代
579
580
                  start: null,
                  end: null,
f45b3c05   LH_PC   云平台新UI界面
581
582
                  type: this.dataType, //试卷类型
                  share: this.tabType, //分享类型
525f4715   刘鸿   fix:修复分页异常
583
584
              }; 
              this.listPage.page = 1;
f45b3c05   LH_PC   云平台新UI界面
585
586
587
588
              queryParams.classId = this.query.class;
              queryParams.subjectName = this.query.subject;
              queryParams.tagId = this.query.tagId;
              queryParams.title = this.query.paper;
ef16e57e   LH_PC   fix:前端版本迭代
589
590
591
592
              if (this.query?.dateRange?.length >= 2) {
                  queryParams.start = this.query.dateRange[0] ?? "";
                  queryParams.end = this.query.dateRange[1] ?? "";
              }
34aad61a   刘鸿   fix:修复tag列表显示问题、分...
593
              if (this.dataType == "2") await this._loadTypes(queryParams);
f45b3c05   LH_PC   云平台新UI界面
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
              const { data, status, info } = await fetchPaperList({
                  ...queryParams,
                  status: 1,
                  page: this.listPage.page,
                  size: this.listPage.size
              });
  
              if (status != 0) {
                  this.$message.error(info);
                  return;
              }
              this.queryLoading = false;
              this.createdCount = data?.myCount || 0;
              this.sharedCount = data?.gradeCount || 0;
              this.listPage.total = data.total;
ef16e57e   LH_PC   fix:前端版本迭代
609
              console.log('page', this.listPage)
f45b3c05   LH_PC   云平台新UI界面
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
              if (this.tabType == "0") {
                  this.defaultList = [];
                  if (data?.list) this.defaultList = [...data?.list];
              }
              else if (this.tabType == "1") {
                  this.sharedList = [];
                  if (data?.list) this.sharedList = [...data?.list];
              }
          },
          _detailQ(id) {
              let routerItem = {
                  path: "/askPreparationQuestionsDetail",
                  query: { id: id },
              };
              if (this.dataType == '2') {
6bca489d   LH_PC   云平台二期UI
625
626
627
628
629
630
631
632
                  var currentClass = this.classList.find(item => item.classId == this.query.class);
                  routerItem.query.paperId = routerItem.query.id;
                  routerItem.query.classId = currentClass.classId;
                  routerItem.query.isViewer = true;
                  routerItem.query.gradeName = currentClass.gradeName;
                  routerItem.query.paperType = 2;
                  routerItem.path = '/testPaperQuestionsUpdate';
                  // routerItem.path = "/testPaperQuestionsDetail";
f45b3c05   LH_PC   云平台新UI界面
633
634
635
              }
              this.$router.push(routerItem);
          },
6bca489d   LH_PC   云平台二期UI
636
          _copy(currentRow) {
f45b3c05   LH_PC   云平台新UI界面
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
              let routerItem = {
                  path: "/askPreparationQuestionsAdd",
                  query: {
                      type: 2,
                      paperId: currentRow.id,
                      listType: 1,
                      listShare: 0,
                      subjectName: this.query.subjectName,
                  },
              };
  
              if (this.dataType == '2') {
                  routerItem.path = "/testPaperAdd";
              }
  
              this.$router.push(routerItem);
          },
          _delete() {
  
          },
6bb2b3e8   LH_PC   feat:打印调整
657
          _print(item) {
d3943e0d   LH_PC   feat:错题打印
658
              this.$loading.open();
6bb2b3e8   LH_PC   feat:打印调整
659
660
661
662
663
664
665
              this.$request.tPaperDetail({ paperId: item.id }).then(({ data, status, info }) => {
                  if (status != 0) {
                      this.$message.error(info);
                      return;
                  }
                  paperPrint(data);
                  this.$loading.close();
96dbf0ac   刘鸿   feat:试卷下载
666
667
668
669
670
671
              })
          },
          async _download(item) {
              this.$loading.open();
              await this.$request.tPaperDownload(item.id, item.title);
              this.$loading.close();
d3943e0d   LH_PC   feat:错题打印
672
          },
f45b3c05   LH_PC   云平台新UI界面
673
          _updateQ(item) {
6bca489d   LH_PC   云平台二期UI
674
  
f45b3c05   LH_PC   云平台新UI界面
675
676
677
678
679
              var currentClass = this.classList.find(item => item.classId == this.query.class);
  
              let routerItem = {
                  path: "/askPreparationQuestionsUpdate",
                  query: {
6bca489d   LH_PC   云平台二期UI
680
681
                      paperId: item.id,
                      paperType: 1,
f45b3c05   LH_PC   云平台新UI界面
682
683
684
685
686
687
                      classId: currentClass.classId,
                      gradeName: currentClass.gradeName
                  },
              };
  
              if (this.dataType == '2') {
6bca489d   LH_PC   云平台二期UI
688
                  routerItem.query.paperType = 2;
f45b3c05   LH_PC   云平台新UI界面
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
                  routerItem.path = "/testPaperQuestionsUpdate";
              }
  
              this.$router.push(routerItem);
          },
          async _deleteDetermineQ(id) {
              let modifyPaper =
                  this.role == "ROLE_PERSONAL"
                      ? this.$request.pModifyPaper
                      : this.$request.modifyPaper;
              const { data, status, info } = await modifyPaper({
                  paperId: id,
                  status: 2,
              });
              if (status != 0) {
                  this.$message.error(info);
              }
              this.page = 1;
              this._serach();
          }
      },
  };
  </script>
  <style lang="scss">
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
713
  .paper-list {
ead476dd   LH_PC   fix:最终定版
714
      position: relative;
f45b3c05   LH_PC   云平台新UI界面
715
  
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
716
      .down-box {
ead476dd   LH_PC   fix:最终定版
717
718
          .down-head {
              display: block;
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
719
              padding-left: 20px !important;
f45b3c05   LH_PC   云平台新UI界面
720
  
ead476dd   LH_PC   fix:最终定版
721
722
723
724
              span,
              a {
                  vertical-align: middle;
              }
f45b3c05   LH_PC   云平台新UI界面
725
726
          }
      }
f45b3c05   LH_PC   云平台新UI界面
727
  
ead476dd   LH_PC   fix:最终定版
728
729
730
      .header-button {
          float: right;
          margin-right: 50px;
f45b3c05   LH_PC   云平台新UI界面
731
732
          background: rgba(65, 204, 149, 1);
          color: white;
f45b3c05   LH_PC   云平台新UI界面
733
  
ead476dd   LH_PC   fix:最终定版
734
735
736
737
738
          :hover {
              background: rgba(65, 204, 149, 1);
              color: white;
          }
      }
f45b3c05   LH_PC   云平台新UI界面
739
  
ead476dd   LH_PC   fix:最终定版
740
741
742
743
744
      .el-tabs__content {
          padding-left: 20px !important;
          padding-right: 0px !important;
          padding-top: 20px !important;
      }
f45b3c05   LH_PC   云平台新UI界面
745
  
ead476dd   LH_PC   fix:最终定版
746
747
      .el-tabs__header {
          margin: 0px !important;
f45b3c05   LH_PC   云平台新UI界面
748
749
      }
  
ead476dd   LH_PC   fix:最终定版
750
      .card-content {
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
751
  
ead476dd   LH_PC   fix:最终定版
752
753
754
755
756
757
758
759
760
761
          .descption-tag {
              display: inline-block;
              background: rgba(102, 127, 253, 0.1);
              border-radius: 4px 4px 4px 4px;
              color: #667FFD;
              line-height: 32px;
              padding: 0 10px;
              margin-right: 10px;
              height: 32px;
              margin-top: 3px;
6bca489d   LH_PC   云平台二期UI
762
763
          }
  
ead476dd   LH_PC   fix:最终定版
764
765
766
767
768
769
770
771
          width: 48.4%;
          display: inline-block;
          margin-bottom: 10px;
          min-height: 190px;
          border: 1px solid #E6E9F4;
          border-radius: 10px 10px 10px 10px;
          box-shadow: 0px 4px 14px 0px rgba(0, 0, 0, 0.08);
          margin-right: 20px;
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
772
773
          // background: #FFFFFF;
          background-color: #41CC95;
ead476dd   LH_PC   fix:最终定版
774
775
  
          .content {
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
776
777
778
              background-color: white;
              border: 1px solid white;
              padding-top: 15px !important;
ead476dd   LH_PC   fix:最终定版
779
              padding-left: 10px !important;
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
780
              padding-bottom: 5px !important;
ead476dd   LH_PC   fix:最终定版
781
782
783
784
785
786
              font-size: 14px;
              font-weight: 400;
  
              .descption-label {
                  min-width: 120px;
              }
f45b3c05   LH_PC   云平台新UI界面
787
  
ead476dd   LH_PC   fix:最终定版
788
789
790
791
792
793
794
              .descption-tag-text {
                  margin-bottom: 20px;
                  display: flex;
                  justify-content: flex-start;
                  align-items: center;
                  width: calc(100% - 5px);
              }
6bca489d   LH_PC   云平台二期UI
795
796
  
  
f45b3c05   LH_PC   云平台新UI界面
797
  
ead476dd   LH_PC   fix:最终定版
798
799
800
              .descption-text {
                  height: 30px;
                  margin-top: 10px;
f45b3c05   LH_PC   云平台新UI界面
801
  
ead476dd   LH_PC   fix:最终定版
802
                  .descption-text-block {
ead476dd   LH_PC   fix:最终定版
803
804
                      display: flex;
                      justify-content: flex-start;
f45b3c05   LH_PC   云平台新UI界面
805
  
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
                      .blocks {
                          width: 37%;
                          margin-right: 10px;
                          white-space: nowrap;
                          overflow: hidden;
                          display: flex;
                          text-align: left;
  
                          div {
                              display: inline;
                          }
                      }
  
                      .ask-blocks-create {
                          width: 72% !important;
                      }
  
                      .ask-blocks-create,
                      .test-blocks-create {
                          .value {
                              display: inline-block;
                              width: calc(100% - 90px);
                              overflow: hidden;
                              white-space: nowrap;
                              text-overflow: ellipsis;
                          }
                      }
  
                      .blocks-20 {
                          width: 24%;
                      }
  
ead476dd   LH_PC   fix:最终定版
838
839
840
841
                      .sharing-descption {
                          flex: 1;
                          color: gray;
                          opacity: 0.8;
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
842
843
                          text-align: right;
                          padding-right: 5px;
ead476dd   LH_PC   fix:最终定版
844
                      }
f45b3c05   LH_PC   云平台新UI界面
845
  
ead476dd   LH_PC   fix:最终定版
846
847
848
849
850
851
                      img {
                          height: 20px;
                          width: 20px;
                          margin-right: 5px;
                      }
                  }
6bca489d   LH_PC   云平台二期UI
852
              }
f45b3c05   LH_PC   云平台新UI界面
853
  
ead476dd   LH_PC   fix:最终定版
854
855
856
857
858
859
860
861
862
863
864
              .title-text {
                  .title-label {
                      font-weight: bold;
                      font-size: 24px !important;
                      color: #303133;
                      line-height: 28px;
                      display: inline-block;
                      width: calc(100% - 100px);
                      height: 28px;
                      text-transform: none;
                      padding-bottom: 10px !important;
f45b3c05   LH_PC   云平台新UI界面
865
866
                  }
  
ead476dd   LH_PC   fix:最终定版
867
868
869
870
871
                  .dropdown-button {
                      .el-button {
                          background-color: #667FFD !important;
                          color: white;
                      }
f45b3c05   LH_PC   云平台新UI界面
872
  
ead476dd   LH_PC   fix:最终定版
873
874
875
                      float: right;
                      margin-right: 20px;
                  }
f45b3c05   LH_PC   云平台新UI界面
876
877
              }
          }
f45b3c05   LH_PC   云平台新UI界面
878
  
ead476dd   LH_PC   fix:最终定版
879
          .left {
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
880
              min-height: 190px;
ead476dd   LH_PC   fix:最终定版
881
882
883
884
885
886
              background-color: #41CC95;
              vertical-align: middle;
              border-radius: 10px 0px 0px 10px;
  
              .left-icon {
                  margin-top: 26px;
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
887
888
                  height: 70px;
  
ead476dd   LH_PC   fix:最终定版
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
                  .icon {
                      height: 100px;
                      width: 100px;
                      background: rgba(255, 255, 255, 0.1);
                      border-radius: 61px 61px 61px 61px;
                      margin: auto;
                      text-align: center;
  
                      img {
                          margin-top: 24px;
                          height: 52px;
                          width: 52px;
                      }
                  }
  
                  .text {
                      width: 100%;
                      text-align: center;
                      margin-top: 5px;
                      font-size: 20px;
                      color: #FFFFFF;
                  }
  
                  .text-radius {
                      width: 100%;
                      text-align: left;
ead476dd   LH_PC   fix:最终定版
915
916
                      margin-left: 1px;
                      white-space: nowrap;
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
917
918
919
920
                      width: calc(100% - 7.5px);
                      position: absolute;
                      bottom: -4px;
  
ead476dd   LH_PC   fix:最终定版
921
922
923
924
925
926
927
928
929
930
931
932
933
934
                      span {
                          overflow: hidden;
                          white-space: nowrap;
                          color: #209466;
                          text-overflow: ellipsis;
                          display: inline-block;
                          border-radius: 1px 15px 0px 10px;
                          padding-left: 8px;
                          padding-right: 4px;
                          padding-top: 2px;
                          padding-bottom: 2px;
                          max-width: calc(100% - 1px);
                          background: #E4F8F0;
                      }
f45b3c05   LH_PC   云平台新UI界面
935
936
                  }
              }
ead476dd   LH_PC   fix:最终定版
937
          }
f45b3c05   LH_PC   云平台新UI界面
938
  
ead476dd   LH_PC   fix:最终定版
939
          .right {
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
940
  
ead476dd   LH_PC   fix:最终定版
941
942
943
              .el-button {
                  background-color: #667FFD;
                  line-height: 16px;
f45b3c05   LH_PC   云平台新UI界面
944
                  color: #FFFFFF;
ead476dd   LH_PC   fix:最终定版
945
946
                  margin-top: 15px;
                  padding: 10px 20px !important;
f45b3c05   LH_PC   云平台新UI界面
947
948
              }
          }
f45b3c05   LH_PC   云平台新UI界面
949
  
f45b3c05   LH_PC   云平台新UI界面
950
951
      }
  
ead476dd   LH_PC   fix:最终定版
952
953
954
      .el-popconfirm__action {
          margin-top: 10px;
      }
f45b3c05   LH_PC   云平台新UI界面
955
956
  }
  </style>