| f45b3c05  LH_PC
 
云平台新UI界面 | 1
2
3
4
5
6 |   <template>
    <el-container class="default-body">
      <el-header>
        <div class="default-title">{{ dataType == "1" ? '随堂问报表' : '即时测报表' }}</div>
      </el-header>
      <div class="default-filter">
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 7
8
9
10 |         <el-select @change="_changeClass" v-model="query.class" class="filter-select" placeholder="选择班级">
          <el-option v-for="item in  classList " :key="item.classId" :label="item.className" :value="item.classId" />
        </el-select>
        <el-select v-model="query.subject" v-if="role == 'ROLE_JIAOSHI'" placeholder="选择科目" class="filter-select">
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 11 |           <el-option v-for="item in subjectList" :key="item" :label="item" :value="item" />
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 12 |         </el-select>
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 13
14
15
16
17 |         <el-select v-model="query.subjects" multiple popper-class="select-popover-class" v-if="role == 'ROLE_BANZHUREN'"
          placeholder="选择科目" collapse-tags class="filter-select" style="width: 18%;">
          <el-checkbox :value="selectAll" @change="selectAllHandle">全部科目</el-checkbox>
          <el-option v-for="(item, index) in subjectList" :key="index" :value="item" :label="item">
            <el-checkbox :value="query.subjects.includes(item)" :label="item" />
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 18
19 |           </el-option>
        </el-select>
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 20
21 |         <el-date-picker class="filter-datePicker" @change="_dateChange" v-model="query.dateRange" type="daterange"
          range-separator="-" value-format="yyyy-MM-dd">
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 22
23 |         </el-date-picker>
        <el-button type="primary" @click="_serach"> 筛选 </el-button>
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 24
25
26
27
28 |         <el-radio-group v-model="dateStatus" class="default-date-radio-group">
          <el-radio-button label="onDay">今天</el-radio-button>
          <el-radio-button label="onWeek">本周</el-radio-button>
          <el-radio-button label="onMonth">本月</el-radio-button>
        </el-radio-group>
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 29
30
31
32 |       </div>
      <el-main>
        <div style="position: relative">
          <el-tabs v-model="tabType" v-loading="queryLoading" type="card" class="default-tabs" :key="tabIndexs">
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 33
34
35
36 |             <el-tab-pane v-if="dataType == 1 && role == 'ROLE_JIAOSHI'" :name="'0'" :label="`单课时报表`">
              <askListReport v-if="apiDatas.askReportList" :datas="apiDatas.askReportList" @opration="_serach" />
            </el-tab-pane>
            <el-tab-pane v-if="dataType == 1 && role == 'ROLE_JIAOSHI'" :name="'1'" :label="`阶段报表`">
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 37
38
39 |               <askSummaryReport ref="askSummaryReport" v-if="apiDatas.askReportIds" :askReportIds="apiDatas.askReportIds"
                :queryParams="query" />
            </el-tab-pane>
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 40
41 |             <el-tab-pane v-if="dataType == 1 && role == 'ROLE_BANZHUREN' && query.status == 'multi'" :name="'0'"
              :label="`多科表现`" :queryParams="query">
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 42 |               <askBzrMulti v-if="apiDatas.askReportIds" :askReportIds="apiDatas.askReportIds" :queryParams="query" />
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 43
44
45 |             </el-tab-pane>
            <el-tab-pane v-if="dataType == 1 && role == 'ROLE_BANZHUREN' && query.status == 'single'" :name="'1'"
              :label="`单科表现`" :queryParams="query">
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 46
47
48
49
50 |               <askSummaryReport :role="role" ref="askSummaryReport" v-if="apiDatas.askReportIds"
                :askReportIds="apiDatas.askReportIds" :queryParams="query" />
            </el-tab-pane>
            <el-tab-pane v-if="dataType == 2 && role == 'ROLE_JIAOSHI'" :name="'0'" :label="`单卷报表`">
              <testListReport :datas="apiDatas.testReportList" @opration="_serach" />
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 51 |             </el-tab-pane>
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 52 |             <el-tab-pane v-if="dataType == 2 && role == 'ROLE_JIAOSHI'" :name="'1'" :label="`阶段报表`">
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 53 |               <testSummaryReport v-if="apiDatas.testReportIds" :testReportIds="apiDatas.testReportIds"
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 54 |                 @headerClick="_headerClick" :queryParams="query" />
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 55 |             </el-tab-pane>
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 56
57
58 |             <el-tab-pane v-if="dataType == 2 && role == 'ROLE_JIAOSHI'" :name="'2'" :label="`多班对比报表`">
              <testMultiClassReport :params="query" />
            </el-tab-pane>
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 59
60 |             <el-tab-pane v-if="dataType == 2 && role == 'ROLE_BANZHUREN' && query.status == 'multi'" :name="'0'"
              :label="`多科表现`">
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 61
62 |               <testBzrMulti v-if="apiDatas.testReportIds" :list="apiDatas.testReportList"
                :testReportIds="apiDatas.testReportIds" :queryParams="query" />
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 63
64
65
66 |             </el-tab-pane>
            <el-tab-pane v-if="dataType == 2 && role == 'ROLE_BANZHUREN' && query.status == 'single'" :name="'1'"
              :label="`单科表现`">
              <testSummaryReport v-if="apiDatas.testReportIds" :role="role" :list="apiDatas.testReportList"
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 67 |                 :testReportIds="apiDatas.testReportIds" :queryParams="query" @headerClick="_headerClick" />
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 68
69
70
71
72 |             </el-tab-pane>
            <div slot="tab-bar">
              <el-button type="primary" icon="el-icon-plus">新增</el-button>
            </div>
          </el-tabs>
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 73
74 |           <!-- <el-button size='mini' v-if="role == 'ROLE_PERSONAL' || role == 'ROLE_JIAOSHI'" @click="_recycle"
            style='position: absolute;right:40px;top:5px;'>查看回收站</el-button> -->
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 75
76
77
78
79
80
81 |   
        </div>
      </el-main>
    </el-container>
  </template>
  
  <script>
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 82 |   import { setDateRules } from "@/utils";
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124 |   export default {
    name: "repo",
    components: {
      askSummaryReport: () => import("./components/askSummaryReport.vue"),
      askListReport: () => import("./components/askListReport.vue"),
      testMultiClassReport: () => import("./components/testMultiClassReport.vue"),
      testListReport: () => import("./components/testListReport.vue"),
      testSummaryReport: () => import("./components/testSummaryReport.vue"),
      testBzrMulti: () => import("./components/testBzrMulti.vue"),
      askBzrMulti: () => import("./components/askBzrMulti.vue"),
    },
    data() {
      return {
        role: "",
        classList: [],
        subjectList: [],
        tabIndexs: 0,
        dataType: "1",
        tabType: null,
        checkedSubject: [],
        listPage: {
          page: 1,
          size: 20,
          total: 0,
        },
        query: {
          status: "multi",
          title: "",
          class: null,
          subject: null,
          subjects: [],
          dateRange: ["2022-03-01", "2026-05-01"],
          classIds: null,
          subjectName: null,
        },
        apiDatas: {
          askReportIds: null,
          askReportList: null,
          testReportIds: null,
          testReportList: null,
        },
        queryLoading: false,
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 125 |         dateStatus: "0"
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 126
127
128 |       };
    },
    watch: {
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 129 |       'dateStatus' (val) {
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 130
131
132
133 |         if (val == -1) return;
        var dateRange = setDateRules(val);
        this.query.dateRange = [dateRange.startDay, dateRange.endDay];
      },
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 134
135
136
137 |       '$route'() {
        this.dataType = location.href.endsWith("askReport") ? "1" : "2";
        this._loadQueryDatas();
      },
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 138
139 |       'query'(value) {
  
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 140 |       },
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 141 |       async 'query.subjects' (value) {
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 142
143
144 |         if (this.role == "ROLE_BANZHUREN") {
          if (value.length == 1 && value[0] != '全部科目') {
            this.query.status = 'single';
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 145 |             this.tabType = '1';
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 146
147
148 |             await this._serach();
          }
          else {
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 149 |             this.query.status = 'multi';
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 150
151
152
153 |             if (this.role == 'ROLE_BANZHUREN')
              this.tabType = '0';
            else
              this.tabType = '1';
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 154 |             await this._serach();
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 155
156
157
158
159
160
161
162
163
164
165 |           }
        }
  
      }
    },
    async created() {
      this.dataType = location.href.endsWith("askReport") ? "1" : "2";
      this.code = this.$store.getters.csCode;
      this.role =
        this.$store.getters.info.showRole ||
        this.$store.getters.info.permissions[0].role;
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 166 |       this.dateStatus = "onWeek";
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 167
168 |       await this._loadQueryDatas();
    },
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 169
170
171
172
173 |     computed: {
      selectAll() {
        return this.query?.subjects?.filter(f => f != '全部科目').length === this.subjectList.length;
      }
    },
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 174 |     methods: {
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 175
176
177 |       _dateChange() {
        this.dateStatus = -1;
      },
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 178
179
180
181 |       selectAllHandle() {
        if (this.selectAll) this.query.subjects = [];
        else this.query.subjects = [...this.subjectList]
      },
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 182
183
184
185
186
187
188
189
190
191
192
193
194
195 |       async _ReScore() {
        //重新记分 
        let { data, info, status } = await this.$request.reScore({
          examId: this.id,
        });
        if (status === 0) {
          this.$message.success(info);
          this._serach();
          this.paperModifyLog.modifiedTime = "";
          this.paperModifyLog.realName = "";
        } else {
          this.$message.error(info);
        }
      },
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215 |       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 ?? [];
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 216 |   
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246 |         this.query.subject = data?.subjectNames[0] ?? "";
        this.checkedSubject = [...this.subjectList];
        this.query.subjects = this.checkedSubject;
      },
      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();
        // this.$loading.close();
        await this._serach();
      },
      _recycle() { },
      async _serach() {
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 247 |   
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 248
249
250
251
252
253
254
255
256
257
258 |         this.queryLoading = true;
        var queryParams = {
          classId: "",
          classIds: [],
          startDay: "",
          endDay: "",
          subjectNames: [],
        };
  
        queryParams.classId = this.query.class;
        queryParams.classIds = [this.query.class];
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 259
260 |   
        if (this.query.subjects && this.role == 'ROLE_BANZHUREN') {
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 261 |           queryParams.subjectNames = this.query.subjects;
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 262 |           queryParams.subject = queryParams.subjectNames[0];
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 263
264
265
266 |         }
        else {
          queryParams.subjectNames = [this.query.subject];
        }
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289 |   
        queryParams.startDay = this.query.dateRange
          ? this.query.dateRange[0]
          : "";
        queryParams.endDay = this.query.dateRange ? this.query.dateRange[1] : "";
  
        if (this.dataType == "1") {
          this.apiDatas.askReportList = [];
          this.apiDatas.askReportIds = [];
          let fetchReportList =
            this.role == "ROLE_PERSONAL"
              ? this.$request.pExamReportList
              : this.$request.periodReportList;
  
          const askReportResponse = await fetchReportList({
            ...queryParams,
            page: this.page,
            size: 9999,
          });
          if (askReportResponse.status != 0) {
            this.$message.error(askReportResponse.info);
            return;
          }
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 290 |           
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 291 |           this.apiDatas.askReportList = [...askReportResponse?.data?.list ?? []];
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 292 |   
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314 |           this.apiDatas.askReportIds = [... this.apiDatas?.askReportList?.map((item) => item.id) ?? []];
  
          if (this.$refs["askSummaryReport"]) {
            this.$refs["askSummaryReport"].refresh();
          }
  
        } else if (this.dataType == "2") {
          this.apiDatas.testReportList = [];
          this.apiDatas.testReportIds = [];
          let fetchReportList =
            this.role == "ROLE_PERSONAL"
              ? this.$request.pExamReportList
              : this.$request.examReportList;
          const testReportResponse = await fetchReportList({
            ...queryParams,
            page: this.page,
            size: 9999,
          });
          if (testReportResponse.status != 0) {
            this.$message.error(testReportResponse.info);
            return;
          }
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 315 |   
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 316 |           this.apiDatas.testReportList = [...testReportResponse?.data?.list ?? []];
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 317 |   
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 318 |           this.apiDatas.testReportIds = [...this.apiDatas.testReportList?.map((item) => item.id) ?? []];
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 319 |   
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 320 |         }
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 321 |   
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 322 |         this.tabIndexs += 1;
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 323 |   
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341 |         this.queryLoading = false;
  
      },
      _detailQ(id) {
        let routerItem = {
          path: "/askPreparationQuestionsDetail",
          query: { id: id },
        };
        this.$router.push(routerItem);
      },
      _delete() { },
      _updateQ(id) {
        let routerItem = {
          path: "/askPreparationQuestionsUpdate",
          query: { paperId: id, paperType: 1 },
        };
        this.$router.push(routerItem);
      },
 | 
| 6bca489d  LH_PC
 
云平台二期UI | 342
343
344
345
346
347
348
349
350
351
352 |       _headerClick(row) {
        this.$router.push({
          path: "/testReportDetail",
          query: {
            dataType: 2,
            classIds: this.query.class,
            id: row.examId,
            title: row.title
          },
        });
      },
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371 |       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">
 | 
| ef16e57e  LH_PC
 
fix:前端版本迭代 | 372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387 |   /* 控制全选按钮样式 */
  .select-popover-class .el-scrollbar__view>.el-checkbox {
    padding: 5px 20px;
  }
  
  /* 取消多选框触发事件 */
  .select-popover-class .el-scrollbar__view>li .el-checkbox {
    pointer-events: none;
  }
  
  /* 隐藏多选框选中勾选样式 √ */
  .select-popover-class .el-scrollbar__view>li::after {
    display: none;
  }
  
  
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 388
389
390
391
392
393
394
395
396 |   .el-tabs__content {
    padding-left: 20px !important;
    padding-right: 0px !important;
    padding-top: 20px !important;
  }
  
  .el-tabs__header {
    margin: 0px !important;
  }
 | 
| 574f1a90  LH_PC
 
fix:修改年级组长/任课老师缺少... | 397 |    
 | 
| f45b3c05  LH_PC
 
云平台新UI界面 | 398
399
400
401
402 |   
  .el-popconfirm__action {
    margin-top: 10px;
  }
  </style>
 |