Blame view

src/views/standard/test/index.vue 38.1 KB
4c4f7640   梁保满   路由表,路由前端文件
1
  <template>
76eb1bf6   梁保满   授课端版本管理,学生画像接口联调
2
    <div ref="main" class="page-container">
f356590c   阿宝   即时测列表,分析页面
3
4
5
6
      <back-box>
        <template slot="title">
          <span>即时测-数据报表</span>
        </template>
9e1c9c46   梁保满   报表归档数据放开
7
        <template slot="btns">
d3ca55ac   梁保满   等级设置
8
9
          <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>
e5e4a3e6   梁保满   v1.3
10
          </el-tooltip>
9e1c9c46   梁保满   报表归档数据放开
11
        </template>
f356590c   阿宝   即时测列表,分析页面
12
13
14
      </back-box>
      <div class="answer-header">
        <div class="sel-box">
d3ca55ac   梁保满   等级设置
15
          <el-select class="sel" v-model="query.classIds" placeholder="选择班级" @change="changeclass" multiple collapse-tags>
31436559   梁保满   多班级样式问题,成绩登记设置问题
16
            <p class="select-all">
d3ca55ac   梁保满   等级设置
17
              <el-checkbox v-model="classAll" @change="selectAll">全选</el-checkbox>
31436559   梁保满   多班级样式问题,成绩登记设置问题
18
            </p>
d3ca55ac   梁保满   等级设置
19
20
            <el-option :disabled="query.classIds.length == 1 && query.classIds[0] == item.value
              " v-for="item in classList" :key="item.value" :label="item.label" :value="item.value">
f356590c   阿宝   即时测列表,分析页面
21
22
            </el-option>
          </el-select>
d3ca55ac   梁保满   等级设置
23
24
25
          <el-select v-if="role == 'ROLE_BANZHUREN'" class="sel sel2" multiple v-model="query.subjectNames"
            placeholder="选择科目" @change="changeSub">
            <el-option v-for="item in subjectList" :key="item.value" :label="item.label" :value="item.value">
f356590c   阿宝   即时测列表,分析页面
26
27
            </el-option>
          </el-select>
d3ca55ac   梁保满   等级设置
28
29
          <el-select v-else class="sel sel2" v-model="query.subjectNames" placeholder="选择科目">
            <el-option v-for="item in subjectList" :key="item.value" :label="item.label" :value="item.value">
f356590c   阿宝   即时测列表,分析页面
30
31
32
            </el-option>
          </el-select>
          <div class="d1">
d3ca55ac   梁保满   等级设置
33
34
            <el-date-picker v-model="query.startDay" type="date" @change="handleChangeTimeStart" placeholder="选择日期时间"
              value-format="yyyy-MM-dd">
f356590c   阿宝   即时测列表,分析页面
35
36
            </el-date-picker>
            ~
d3ca55ac   梁保满   等级设置
37
38
            <el-date-picker v-model="query.endDay" type="date" placeholder="选择日期时间" @change="handleChangeTimeEnd"
              value-format="yyyy-MM-dd">
f356590c   阿宝   即时测列表,分析页面
39
40
41
            </el-date-picker>
          </div>
          <p class="p1">
d3ca55ac   梁保满   等级设置
42
43
44
45
            <span @click="setDate(1)" :class="[date == 1 ? 'active' : '', 's1']">今天</span>
            <span @click="setDate(2)" :class="[date == 2 ? 'active' : '', 's1']">本周</span>
            <span @click="setDate(3)" :class="[date == 3 ? 'active' : '', 's1']">本月</span>
            <span @click="setDate(4)" :class="[date == 4 ? 'active' : '', 's1']">本季度</span>
f356590c   阿宝   即时测列表,分析页面
46
47
48
49
          </p>
          <el-button type="primary" round @click="_QueryData()">筛选</el-button>
        </div>
      </div>
4295ede6   梁保满   即使测报表对比页面开发
50
      <div v-show="query.classIds.length == 1" class="table-box">
d3ca55ac   梁保满   等级设置
51
52
        <el-radio-group v-if="query.startDay != query.endDay" v-model="tabIndex" @change="changeTab"
          style="margin-bottom: 20px">
e5e4a3e6   梁保满   v1.3
53
          <template v-for="(item, index) in tabList">
f1b55bc6   梁保满   删除添加loading,提示词颜色
54
            <el-radio-button :label="index + 1">{{ item }}</el-radio-button>
e5e4a3e6   梁保满   v1.3
55
          </template>
f356590c   阿宝   即时测列表,分析页面
56
        </el-radio-group>
31436559   梁保满   多班级样式问题,成绩登记设置问题
57
58
59
60
61
        <div class="head-box" v-else>
          <div class="tit">
            <p class="txt">已考试卷信息</p>
          </div>
        </div>
8ea67428   梁保满   飞书bug
62
        <div v-show="tabIndex == 1" v-loading="loading">
d32e461c   梁保满   备题组卷
63
          <el-table :data="tableData" border style="width: 100%">
d3ca55ac   梁保满   等级设置
64
65
66
67
68
69
70
71
72
            <el-table-column prop="subjectName" label="科目" align="center" width="100"></el-table-column>
            <el-table-column prop="title" label="试卷名称" align="center"></el-table-column>
            <el-table-column prop="className" label="考试班级" align="center" width="100"></el-table-column>
            <el-table-column prop="examPaperScore" label="卷面分" align="center" width="68"></el-table-column>
            <el-table-column width="80" prop="answeredNum" label="测验人数" align="center"><template slot-scope="scoped">{{
              `${scoped.row.answeredNum}/${scoped.row.classPersonNum}`
            }}</template></el-table-column>
            <el-table-column prop="examStartTime" label="测验开始时间" width="160" align="center"></el-table-column>
            <el-table-column prop="examEndTime" label="测验结束时间" width="160" align="center"></el-table-column>
4295ede6   梁保满   即使测报表对比页面开发
73
74
            <!-- 添加对比删除 -->
            <!-- <el-table-column prop="avgScore" label="班平均分" align="center"
8ea67428   梁保满   飞书bug
75
              ><template slot-scope="scoped">{{
533a17d8   梁保满   备题组卷添加批量设置答案
76
77
                (scoped.row.subjectiveScore == scoped.row.examPaperScore ||
                  scoped.row.answerNum == 0) &&
255e2506   梁保满   飞书bug及优化
78
                scoped.row.recordStatus == 0
dbbfc6c5   梁保满   飞书优化及bug
79
                  ? "-"
8ea67428   梁保满   飞书bug
80
81
82
83
84
                  : scoped.row.avgScore
              }}</template></el-table-column
            >
            <el-table-column prop="highestScore" label="班最高分" align="center"
              ><template slot-scope="scoped">{{
533a17d8   梁保满   备题组卷添加批量设置答案
85
86
                (scoped.row.subjectiveScore == scoped.row.examPaperScore ||
                  scoped.row.answerNum == 0) &&
255e2506   梁保满   飞书bug及优化
87
                scoped.row.recordStatus == 0
dbbfc6c5   梁保满   飞书优化及bug
88
                  ? "-"
8ea67428   梁保满   飞书bug
89
90
91
92
93
                  : scoped.row.highestScore
              }}</template></el-table-column
            >
            <el-table-column prop="lowestScore" label="班最低分" align="center"
              ><template slot-scope="scoped">{{
533a17d8   梁保满   备题组卷添加批量设置答案
94
95
                (scoped.row.subjectiveScore == scoped.row.examPaperScore ||
                  scoped.row.answerNum == 0) &&
255e2506   梁保满   飞书bug及优化
96
                scoped.row.recordStatus == 0
dbbfc6c5   梁保满   飞书优化及bug
97
                  ? "-"
8ea67428   梁保满   飞书bug
98
99
100
                  : scoped.row.lowestScore
              }}</template></el-table-column
            >
f356590c   阿宝   即时测列表,分析页面
101
            <el-table-column
9309dc5d   梁保满   任课老师接口完成
102
              prop="excellenRate"
d32e461c   梁保满   备题组卷
103
              label="优秀数(率)"
f356590c   阿宝   即时测列表,分析页面
104
105
              sortable
              align="center"
d32e461c   梁保满   备题组卷
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
              width="110"
              class-name="p0"
              ><template slot-scope="scoped">
                <p
                  v-if="
                    (scoped.row.subjectiveScore == scoped.row.examPaperScore ||
                      scoped.row.answerNum == 0) &&
                    scoped.row.arecordStatus == 0
                  "
                >
                  "-"
                </p>
                <template v-else>
                  <p>{{ scoped.row.excellenNum }}</p>
                  <p v-if="scoped.row.excellenNum">
                    {{ `(${scoped.row.excellenRate}%)` }}
                  </p>
                </template>
              </template></el-table-column
f356590c   阿宝   即时测列表,分析页面
125
126
            >
            <el-table-column
9309dc5d   梁保满   任课老师接口完成
127
              prop="goodRate"
d32e461c   梁保满   备题组卷
128
              label="良好数(率)"
f356590c   阿宝   即时测列表,分析页面
129
130
              sortable
              align="center"
d32e461c   梁保满   备题组卷
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
              width="110"
              class-name="p0"
              ><template slot-scope="scoped">
                <p
                  v-if="
                    (scoped.row.subjectiveScore == scoped.row.examPaperScore ||
                      scoped.row.answerNum == 0) &&
                    scoped.row.arecordStatus == 0
                  "
                >
                  "-"
                </p>
                <template v-else>
                  <p>{{ scoped.row.goodNum }}</p>
                  <p v-if="scoped.row.goodNum">
                    {{ `(${scoped.row.goodRate}%)` }}
                  </p>
                </template>
8ea67428   梁保满   飞书bug
149
              </template></el-table-column
f356590c   阿宝   即时测列表,分析页面
150
151
            >
            <el-table-column
9309dc5d   梁保满   任课老师接口完成
152
              prop="passRate"
d32e461c   梁保满   备题组卷
153
              label="及格数(率)"
f356590c   阿宝   即时测列表,分析页面
154
155
              sortable
              align="center"
d32e461c   梁保满   备题组卷
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
              width="110"
              class-name="p0"
              ><template slot-scope="scoped">
                <p
                  v-if="
                    (scoped.row.subjectiveScore == scoped.row.examPaperScore ||
                      scoped.row.answerNum == 0) &&
                    scoped.row.arecordStatus == 0
                  "
                >
                  "-"
                </p>
                <template v-else>
                  <p>{{ scoped.row.passNum }}</p>
                  <p v-if="scoped.row.passNum">
                    {{ `(${scoped.row.passRate}%)` }}
                  </p>
                </template>
8ea67428   梁保满   飞书bug
174
              </template></el-table-column
f356590c   阿宝   即时测列表,分析页面
175
176
            >
            <el-table-column
9309dc5d   梁保满   任课老师接口完成
177
              prop="failedRate"
d32e461c   梁保满   备题组卷
178
              label="不及格数(率)"
f356590c   阿宝   即时测列表,分析页面
179
180
              sortable
              align="center"
d32e461c   梁保满   备题组卷
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
              width="130"
              class-name="p0"
              ><template slot-scope="scoped">
                <p
                  v-if="
                    (scoped.row.subjectiveScore == scoped.row.examPaperScore ||
                      scoped.row.answerNum == 0) &&
                    scoped.row.arecordStatus == 0
                  "
                >
                  "-"
                </p>
                <template v-else>
                  <p>{{ scoped.row.failedNum }}</p>
                  <p v-if="scoped.row.failedNum">
                    {{ `(${scoped.row.failedRate}%)` }}
                  </p>
                </template>
              </template></el-table-column
4295ede6   梁保满   即使测报表对比页面开发
200
201
            > -->
            <el-table-column label="操作" width="100" align="center">
f356590c   阿宝   即时测列表,分析页面
202
              <template slot-scope="scoped">
d3ca55ac   梁保满   等级设置
203
                <el-tooltip v-if="scoped.row.answerNum != 0 ||
533a17d8   梁保满   备题组卷添加批量设置答案
204
205
                    (scoped.row.recordStatus != 0 &&
                      scoped.row.subjectiveScore == scoped.row.examPaperScore)
d3ca55ac   梁保满   等级设置
206
207
208
                    " effect="dark" content="详情" placement="top">
                  <el-button type="primary" circle size="mini" icon="fa fa-arrow-right"
                    @click="linkTo(scoped.row)"></el-button>
f356590c   阿宝   即时测列表,分析页面
209
                </el-tooltip>
d3ca55ac   梁保满   等级设置
210
211
212
213
214
215
                <template v-if="scoped.row.answerNum == 0 &&
                  scoped.row.subjectiveScore != scoped.row.examPaperScore
                  ">
                  <el-tooltip v-if="role == 'ROLE_JIAOSHI'" effect="dark" content="设置答案" placement="top">
                    <el-button type="primary" circle size="mini" icon="fa fa-file-text"
                      @click="edit(scoped.row)"></el-button>
e4791388   梁保满   班主任屏蔽设置答案入口
216
217
218
                  </el-tooltip>
                  <template v-else>未设置答案</template>
                </template>
d3ca55ac   梁保满   等级设置
219
220
221
222
                <el-tooltip v-if="scoped.row.subjectiveScore == scoped.row.examPaperScore &&
                  scoped.row.recordStatus == 0
                  " effect="dark" content="导入主观题" placement="top">
                  <el-button type="primary" circle size="mini" icon="fa fa-cloud" @click="uploadSJ(scoped.row)"></el-button>
8ea67428   梁保满   飞书bug
223
                </el-tooltip>
d3ca55ac   梁保满   等级设置
224
225
226
227
                <el-popconfirm v-if="role != 'ROLE_BANZHUREN'" title="确定删除吗?"
                  @confirm="removeReport(scoped.row, scoped.$index)">
                  <el-button class="remove-test" slot="reference" type="danger" circle size="mini" icon="el-icon-delete"
                    :loading="scoped.row.loading"></el-button>
4295ede6   梁保满   即使测报表对比页面开发
228
                </el-popconfirm>
f356590c   阿宝   即时测列表,分析页面
229
230
231
              </template>
            </el-table-column>
          </el-table>
9309dc5d   梁保满   任课老师接口完成
232
          <div class="pagination-box">
d3ca55ac   梁保满   等级设置
233
234
            <el-pagination small="" layout="total,prev, pager, next" :hide-on-single-page="true" :total="total"
              @current-change="changePage" :current-page="page" :page-size="size">
9309dc5d   梁保满   任课老师接口完成
235
236
            </el-pagination>
          </div>
f356590c   阿宝   即时测列表,分析页面
237
        </div>
8ea67428   梁保满   飞书bug
238
        <div v-show="tabIndex == 2" v-loading="loading">
d3ca55ac   梁保满   等级设置
239
          <el-empty :image-size="100" v-if="!tableData.length && loading == false" description="没有更多数据"></el-empty>
503b6063   梁保满   判断题答案选项
240
          <template v-if="tableData.length && loading == false">
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
241
            <div id="print-content">
d3ca55ac   梁保满   等级设置
242
243
244
245
246
              <el-table :max-height="tableMaxHeight" v-if="role == 'ROLE_JIAOSHI'" :data="tableData" border
                style="width: 100%">
                <el-table-column prop="studentCode" label="学号" align="center" fixed></el-table-column>
                <el-table-column prop="studentName" label="姓名" fixed align="center">
                  <template slot-scope="scoped"><span class="click-b" @click="toPortrait(scoped.row)">
3617eaad   梁保满   长水账号设置
247
                      {{ scoped.row.studentName }}
d3ca55ac   梁保满   等级设置
248
249
250
251
                    </span></template></el-table-column>
                <el-table-column align="center" v-for="(item, index) in answerList" :key="index" :label="item.title">
                  <el-table-column :prop="'score' + index" :label="index == 0 ? '总分' : '成绩'" align="center"
                    :class-name="index % 2 == 0 ? 'bg' : ''">
ee00775c   梁保满   测试bug
252
253
                    <template slot-scope="scoped">
                      {{ Number(scoped.row["score" + index]) }}
d3ca55ac   梁保满   等级设置
254
255
256
                    </template></el-table-column>
                  <el-table-column :prop="'classRank' + index" label="班名" align="center"
                    :class-name="index % 2 == 0 ? 'bg' : ''"></el-table-column>
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
257
258
                </el-table-column>
              </el-table>
d3ca55ac   梁保满   等级设置
259
260
              <el-table v-else :data="tableData" :max-height="tableMaxHeight" border style="width: 100%">
                <el-table-column prop="studentCode" label="学号" align="center" fixed></el-table-column>
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
261
  
d3ca55ac   梁保满   等级设置
262
263
                <el-table-column prop="studentName" label="姓名" fixed align="center">
                  <template slot-scope="scoped"><span class="click-b" @click="toPortrait(scoped.row)">
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
264
                      {{ scoped.row.studentName }}
d3ca55ac   梁保满   等级设置
265
                    </span></template>
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
266
                </el-table-column>
d3ca55ac   梁保满   等级设置
267
268
269
270
271
272
273
274
275
                <el-table-column align="center" v-for="(item, index) in answerList" :key="index" :label="item">
                  <el-table-column :prop="'examCount' + item" label="测练数" align="center"
                    :class-name="index % 2 == 0 ? 'bg' : ''"></el-table-column>
                  <el-table-column :prop="'participationCount' + item" label="参与数" align="center"
                    :class-name="index % 2 == 0 ? 'bg' : ''"></el-table-column>
                  <el-table-column :prop="'score' + item" label="总分" align="center"
                    :class-name="index % 2 == 0 ? 'bg' : ''"></el-table-column>
                  <el-table-column :prop="'classRank' + item" label="班名" align="center"
                    :class-name="index % 2 == 0 ? 'bg' : ''"></el-table-column>
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
276
277
278
                </el-table-column>
              </el-table>
            </div>
236b1f0e   梁保满   周末-飞书bug
279
          </template>
f356590c   阿宝   即时测列表,分析页面
280
        </div>
236b1f0e   梁保满   周末-飞书bug
281
        <p class="down" v-if="tabIndex == 2 && tableData.length">
d3ca55ac   梁保满   等级设置
282
283
284
          <el-button type="primary" plain round icon="fa fa-cloud-download" @click="downExl">导出报表</el-button>
          <el-button v-if="!this.$store.getters.code" @click="print" type="primary" plain round
            icon="el-icon-printer">打印</el-button>
f356590c   阿宝   即时测列表,分析页面
285
286
        </p>
      </div>
d3ca55ac   梁保满   等级设置
287
      <div v-show="query.classIds.length > 1" class="table-box" v-loading="loading">
da9346ee   梁保满   全选和排序问题
288
        <div class="head-box">
4295ede6   梁保满   即使测报表对比页面开发
289
          <div class="tit">
e5f407d6   梁保满   测试问题
290
291
            <p class="txt">
              已考试卷信息
d3ca55ac   梁保满   等级设置
292
              <em class="red">(相同报表名称后的数字代表同一份试卷的考试次数,例如:模拟卷_1指模拟卷第1次考试成绩,模拟卷_2指模拟卷第2次考试成绩)</em>
e5f407d6   梁保满   测试问题
293
            </p>
4295ede6   梁保满   即使测报表对比页面开发
294
            <p>
d3ca55ac   梁保满   等级设置
295
              共筛选出{{ classTable.length }}个班级的已考试卷,<em class="red">不同班级请选择同一份试卷进行对比</em>
4295ede6   梁保满   即使测报表对比页面开发
296
297
            </p>
          </div>
d3ca55ac   梁保满   等级设置
298
299
300
          <el-input placeholder="输入试卷名称" v-model="examReportName" class="input-with-select"
            @keyup.enter.native="examReportList(examReportName)">
            <el-button slot="append" icon="el-icon-search" @click="examReportList(examReportName)"></el-button>
4295ede6   梁保满   即使测报表对比页面开发
301
302
          </el-input>
        </div>
d3ca55ac   梁保满   等级设置
303
304
        <el-empty :imag-size="48" v-if="total === 0 && !loading" description="暂无数据"></el-empty>
        <ul class="tab-ul" v-if="classTable.length" v-masonry transition-duration="0.5s" gutter="0" item-selector=".tab-li">
4295ede6   梁保满   即使测报表对比页面开发
305
          <template v-for="(item, index) in classTable">
ee00775c   梁保满   测试bug
306
307
308
            <li class="tab-li">
              <p class="tab-tit">
                {{
d3ca55ac   梁保满   等级设置
309
310
                  `${item[0].className} ${item.length ? "(" + item.length + "份已考试卷)" : ""
                    }`
ee00775c   梁保满   测试bug
311
312
                }}
              </p>
d3ca55ac   梁保满   等级设置
313
              <el-table :data="item" border style="width: 100%" v-if="item.length">
4295ede6   梁保满   即使测报表对比页面开发
314
315
                <el-table-column label="选择" align="center" width="60">
                  <template slot-scope="scope">
d3ca55ac   梁保满   等级设置
316
317
                    <el-checkbox v-model="multipleSelection" :label="scope.row.id" :disabled="checkboxDisabled(scope.row)">
                      {{ ` ` }}</el-checkbox>
4295ede6   梁保满   即使测报表对比页面开发
318
319
                  </template>
                </el-table-column>
d3ca55ac   梁保满   等级设置
320
                <el-table-column prop="title" label="报表名称" align="center"></el-table-column>
ee00775c   梁保满   测试bug
321
322
323
324
325
                <el-table-column label="测验人数" align="center" width="80">
                  <template slot-scope="scope">{{
                    `${scope.row.answeredNum}/${scope.row.classPersonNum}`
                  }}</template>
                </el-table-column>
d3ca55ac   梁保满   等级设置
326
                <el-table-column prop="examStartTime" label="测验开始时间" width="120" align="center"></el-table-column>
ee00775c   梁保满   测试bug
327
                <el-table-column label="测验时长" align="center" width="80">
4295ede6   梁保满   即使测报表对比页面开发
328
                  <template slot-scope="scope">{{
d3ca55ac   梁保满   等级设置
329
330
                    `${Math.floor(scope.row.duration / 60)}分${scope.row.duration % 60
                      }`
4295ede6   梁保满   即使测报表对比页面开发
331
332
333
                  }}</template>
                </el-table-column>
              </el-table>
ee00775c   梁保满   测试bug
334
              <el-empty v-else :imag-size="32" description="暂无数据"></el-empty>
4295ede6   梁保满   即使测报表对比页面开发
335
336
337
            </li>
          </template>
        </ul>
31436559   梁保满   多班级样式问题,成绩登记设置问题
338
        <p class="btn-box" v-if="classTable.length">
4295ede6   梁保满   即使测报表对比页面开发
339
340
341
          <el-button @click="linkToContrast">生成对比报表</el-button>
        </p>
      </div>
d3ca55ac   梁保满   等级设置
342
343
      <el-dialog :close-on-click-modal="false" title="导入主观题分数" :visible.sync="diaUp" width="600">
        <up-load :url="url" :examId="examId" @upSuccess="upSuccess" fileName="主观题分数" v-loading="loadingDown">
8ea67428   梁保满   飞书bug
344
345
346
347
348
349
350
351
352
353
354
355
          <template slot="down">
            <p class="down-txt">
              第一步:下载模板并编辑完成学生分数
              <el-link type="danger" @click="downExcel">模板下载</el-link> 。
            </p>
            <p class="down-txt">第二步:上传完成编辑的模板文件并导入。</p>
          </template>
        </up-load>
        <div class="dialog-footer" slot="footer">
          <el-button @click="diaUp = false">取 消</el-button>
        </div>
      </el-dialog>
4c4f7640   梁保满   路由表,路由前端文件
356
357
358
359
    </div>
  </template>
  
  <script>
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
360
  import { formatDate, downloadFile, tablePrint } from "utils";
a0d49348   梁保满   授课端管理添加设备编码,随堂问、即...
361
  import BusEvent from "@/utils/busEvent";
4c4f7640   梁保满   路由表,路由前端文件
362
  export default {
f356590c   阿宝   即时测列表,分析页面
363
364
    data() {
      return {
e5e4a3e6   梁保满   v1.3
365
        code: "",
47a01cb6   梁保满   v1.3测试问题
366
        gdClass: 0, //已归档班级数量
503b6063   梁保满   判断题答案选项
367
        exportLoading: false,
255e2506   梁保满   飞书bug及优化
368
        tableMaxHeight: 300,
f356590c   阿宝   即时测列表,分析页面
369
370
        role: "",
        loading: false,
8ea67428   梁保满   飞书bug
371
        diaUp: false,
533a17d8   梁保满   备题组卷添加批量设置答案
372
        loadingDown: false,
8ea67428   梁保满   飞书bug
373
374
        url: "/api_html/teaching/importSubjectiveScore",
        examId: "",
9309dc5d   梁保满   任课老师接口完成
375
376
377
378
        form: {
          id: "",
          title: "",
          examPaperScore: "",
aed43d3a   阿宝   即时测修改答案
379
        },
f356590c   阿宝   即时测列表,分析页面
380
381
382
        date: "", //今天-昨天-本周
        query: {
          //搜索条件
4295ede6   梁保满   即使测报表对比页面开发
383
          classIds: [],
9309dc5d   梁保满   任课老师接口完成
384
          subjectNames: "",
f356590c   阿宝   即时测列表,分析页面
385
386
387
388
          startDay: "",
          endDay: "",
          day: "",
        },
4295ede6   梁保满   即使测报表对比页面开发
389
390
        examReportName: "", //试卷名称
        tabList: ["已考试卷信息", "阶段测练报表"],
f356590c   阿宝   即时测列表,分析页面
391
392
393
        classList: [], //班级
        subjectList: [], //科目
        tabIndex: 1, //选项卡
9309dc5d   梁保满   任课老师接口完成
394
395
396
397
        tableData: [],
        answerList: [], //设置多卷内容供tableStage表格数据用
        page: 1,
        size: 20,
31436559   梁保满   多班级样式问题,成绩登记设置问题
398
        total: null,
4295ede6   梁保满   即使测报表对比页面开发
399
        multipleSelection: [], //选中的试卷ID
ee00775c   梁保满   测试bug
400
        classTable: [], //多班级数据
da9346ee   梁保满   全选和排序问题
401
        classAll: false, //搜索条件多班全选
f356590c   阿宝   即时测列表,分析页面
402
403
      };
    },
f356590c   阿宝   即时测列表,分析页面
404
    async created() {
e5e4a3e6   梁保满   v1.3
405
      this.code = localStorage.getItem("csCode") || "";
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
406
407
408
      this.role =
        this.$store.getters.info.showRole ||
        this.$store.getters.info.permissions[0].role;
47a01cb6   梁保满   v1.3测试问题
409
      this._QueryClassList2();
f356590c   阿宝   即时测列表,分析页面
410
      await this._QueryClassList();
4295ede6   梁保满   即使测报表对比页面开发
411
      if (!this.query.classIds.length) {
e5e4a3e6   梁保满   v1.3
412
413
        return;
      }
f356590c   阿宝   即时测列表,分析页面
414
      await this._QuerySubjectList();
9309dc5d   梁保满   任课老师接口完成
415
      await this.setDate(1);
f356590c   阿宝   即时测列表,分析页面
416
417
418
419
420
421
      let startDay = this.query?.startDay;
      if (!startDay) {
        this.query.startDay = new Date();
        this.query.endDay = new Date();
      }
    },
a0d49348   梁保满   授课端管理添加设备编码,随堂问、即...
422
423
424
    activated() {
      const that = this;
      BusEvent.$on("keepAlive", async function () {
e5e4a3e6   梁保满   v1.3
425
        // if (that.$route.path == "/test") {
47a01cb6   梁保满   v1.3测试问题
426
427
428
        that.query.subjectNames = that.role == "ROLE_BANZHUREN" ? [] : "";
        that._QueryClassList2();
        await that._QueryClassList();
4295ede6   梁保满   即使测报表对比页面开发
429
        if (!that.query.classIds.length) {
47a01cb6   梁保满   v1.3测试问题
430
431
432
433
434
435
436
437
438
          return;
        }
        await that._QuerySubjectList();
        await that.setDate(1);
        let startDay = that.query?.startDay;
        if (!startDay) {
          that.query.startDay = new Date();
          that.query.endDay = new Date();
        }
e5e4a3e6   梁保满   v1.3
439
        // }
a0d49348   梁保满   授课端管理添加设备编码,随堂问、即...
440
441
      });
    },
f356590c   阿宝   即时测列表,分析页面
442
    methods: {
da9346ee   梁保满   全选和排序问题
443
444
445
446
447
448
449
450
451
452
      //搜索条件多班全选
      selectAll(val) {
        this.query.classIds = [];
        if (val) {
          this.classList.forEach((item) => {
            this.query.classIds.push(item.value);
          });
        } else {
          this.query.classIds.push(this.classList[0].value);
        }
31436559   梁保满   多班级样式问题,成绩登记设置问题
453
        this.changeclass(this.query.classIds);
da9346ee   梁保满   全选和排序问题
454
      },
4295ede6   梁保满   即使测报表对比页面开发
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
      // 多班级选择同一试卷
      checkboxDisabled(obj) {
        let id = this.multipleSelection[0] || "";
        if (id) {
          let examPaperId;
          for (let i = 0; i < this.tableData.length; i++) {
            if (this.tableData[i].id == id) {
              examPaperId = this.tableData[i].examPaperId;
              break;
            }
          }
          return obj.examPaperId == examPaperId ? false : true;
        } else {
          return false;
        }
      },
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
471
      print() {
e5e4a3e6   梁保满   v1.3
472
        tablePrint("print-content", "即时测-" + this.tabList[this.tabIndex - 1]);
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
473
      },
4295ede6   梁保满   即使测报表对比页面开发
474
      //科目改变触发事件
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
475
      changeSub(val) {
dbbfc6c5   梁保满   飞书优化及bug
476
477
478
479
480
        let sub;
        if (val && val.length) {
          let leng = val.length - 1;
          sub = val[leng];
        }
255e2506   梁保满   飞书bug及优化
481
        console.log(val);
dbbfc6c5   梁保满   飞书优化及bug
482
483
484
485
        this.query.subjectNames = val.filter((item) => {
          return sub != "全部" ? item != "全部" : item == "全部";
        });
      },
e5e4a3e6   梁保满   v1.3
486
487
488
489
490
      toArchiving() {
        this.$router.push({
          path: "/testArchiving",
        });
      },
4295ede6   梁保满   即使测报表对比页面开发
491
      //去详情
f356590c   阿宝   即时测列表,分析页面
492
      linkTo(obj) {
f356590c   阿宝   即时测列表,分析页面
493
494
495
496
        this.$router.push({
          path: "/testAnalysis",
          query: {
            id: obj.id,
9309dc5d   梁保满   任课老师接口完成
497
498
            title: obj.title,
            score: obj.examPaperScore,
4295ede6   梁保满   即使测报表对比页面开发
499
500
501
502
503
504
505
506
507
508
509
            classId: obj.classId,
            subjectName: obj.subjectName,
          },
        });
      },
      //去报表对比
      linkToContrast() {
        if (this.multipleSelection.length < 2) {
          this.$message.warning("请选择同一份试卷多个班级进行对比!");
          return;
        }
d3ca55ac   梁保满   等级设置
510
511
512
513
514
515
516
517
518
        let examPaperScore
        console.log(this.multipleSelection[0])
        this.tableData.map(item => {
          console.log(item.id)
          if (item.id == this.multipleSelection[0]) {
            examPaperScore = item.examPaperScore
          }
        })
        console.log(examPaperScore)
4295ede6   梁保满   即使测报表对比页面开发
519
520
521
522
523
        this.$router.push({
          path: "/testContrast",
          query: {
            ids: this.multipleSelection,
            subjectNames: this.query.subjectNames,
d3ca55ac   梁保满   等级设置
524
            examPaperScore: examPaperScore
f356590c   阿宝   即时测列表,分析页面
525
526
527
          },
        });
      },
4295ede6   梁保满   即使测报表对比页面开发
528
      //暂时不上线
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
529
      toPortrait(obj) {
e5e4a3e6   梁保满   v1.3
530
        return;
3617eaad   梁保满   长水账号设置
531
532
533
        if (this.$store.getters.code) {
          return;
        }
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
534
        let subjectNames = [];
e5e4a3e6   梁保满   v1.3
535
536
537
538
        subjectNames =
          this.role == "ROLE_BANZHUREN"
            ? [...this.query["subjectNames"]]
            : [this.query["subjectNames"]];
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
        if (
          this.query["subjectNames"] &&
          this.query["subjectNames"]?.length == 1 &&
          this.query["subjectNames"][0] == "全部"
        ) {
          subjectNames = this.subjectList.map((item) => {
            return item.value;
          });
          subjectNames?.shift();
        }
        //去学生画像
        this.$router.push({
          path: "/portraitDetail",
          query: {
            id: obj.studentId,
3617eaad   梁保满   长水账号设置
554
            classId: this.query.classId,
10cf4c8c   梁保满   学生画像接口调整
555
            subjectNames: subjectNames.join(","),
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
556
557
            studentName: obj.studentName,
            studentCode: obj.studentCode,
c065091a   梁保满   即时测跳转画像参数调整
558
559
            startDay: this.query.startDay,
            endDay: this.query.endDay,
e5e4a3e6   梁保满   v1.3
560
            date: this.date,
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
561
562
563
          },
        });
      },
4295ede6   梁保满   即使测报表对比页面开发
564
      //导入开关
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
565
      uploadSJ(obj) {
8ea67428   梁保满   飞书bug
566
567
568
        this.examId = obj.id;
        this.diaUp = true;
      },
4295ede6   梁保满   即使测报表对比页面开发
569
570
      //删除即时测考试
      async removeReport(obj, index) {
f1b55bc6   梁保满   删除添加loading,提示词颜色
571
        this.tableData[index].loading = true;
4295ede6   梁保满   即使测报表对比页面开发
572
573
574
        const { data, status, info } = await this.$request.deleteReport({
          id: obj.id,
        });
f1b55bc6   梁保满   删除添加loading,提示词颜色
575
        if (status === 0) {
4295ede6   梁保满   即使测报表对比页面开发
576
          this.$message.success("删除成功!");
ee00775c   梁保满   测试bug
577
          this.tableData.splice(index, 1);
4295ede6   梁保满   即使测报表对比页面开发
578
579
580
581
        } else {
          this.$message.error(info);
        }
      },
f356590c   阿宝   即时测列表,分析页面
582
583
584
585
586
587
588
589
590
591
592
593
594
      setDate(index) {
        const that = this;
        this.date = index == this.date ? "" : index;
        let aYear = new Date().getFullYear();
        let aMonth = new Date().getMonth() + 1;
        that.query.day = "";
        that.query.startDay = "";
        that.query.endDay = "";
        switch (index) {
          case 1:
            that.query.day = formatDate(new Date(), "yyyy-MM-dd");
            that.query.startDay = that.query.day;
            that.query.endDay = that.query.day;
d32e461c   梁保满   备题组卷
595
            that.tabIndex = 1;
f356590c   阿宝   即时测列表,分析页面
596
597
598
599
600
601
602
            break;
          case 2:
            let day = new Date().getDay();
            if (day == 0) {
              //中国式星期天是一周的最后一天
              day = 7;
            }
8ea67428   梁保满   飞书bug
603
            day--;
f356590c   阿宝   即时测列表,分析页面
604
605
606
607
608
609
610
611
612
613
            let aTime = new Date().getTime() - 24 * 60 * 60 * 1000 * day;
            that.query.startDay = formatDate(new Date(aTime), "yyyy-MM-dd");
            that.query.endDay = formatDate(new Date(), "yyyy-MM-dd");
            break;
          case 3:
            aMonth = aMonth < 10 ? "0" + aMonth : aMonth;
            that.query.startDay = `${aYear}-${aMonth}-01`;
            that.query.endDay = formatDate(new Date(), "yyyy-MM-dd");
            break;
          case 4:
9309dc5d   梁保满   任课老师接口完成
614
            if (aMonth > 0 && aMonth < 4) {
e3b0e3e7   梁保满   季度时间格式调整
615
              aMonth = "1";
f356590c   阿宝   即时测列表,分析页面
616
            } else if (aMonth > 3 && aMonth < 7) {
e3b0e3e7   梁保满   季度时间格式调整
617
              aMonth = "4";
f356590c   阿宝   即时测列表,分析页面
618
            } else if (aMonth > 6 && aMonth < 10) {
e3b0e3e7   梁保满   季度时间格式调整
619
              aMonth = "7";
f356590c   阿宝   即时测列表,分析页面
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
            } else {
              aMonth = "10";
            }
  
            aMonth = aMonth < 10 ? "0" + aMonth : aMonth;
            that.query.startDay = `${aYear}-${aMonth}-01`;
            that.query.endDay = formatDate(new Date(), "yyyy-MM-dd");
            break;
        }
        this.page = 1;
        this._QueryData();
      },
      handleChangeTimeStart(val) {
        this.query.day = "";
        this.date = "";
        if (this.query.endDay) {
          if (new Date(val).getTime() > new Date(this.query.endDay).getTime()) {
            this.$message.error("任务结束时间不能任务开始时间前面,请重新设置");
            this.query.startDay = "";
          }
        }
      },
      handleChangeTimeEnd(val) {
        this.query.day = "";
        this.date = "";
        if (this.query.startDay) {
          if (new Date(val).getTime() < new Date(this.query.startDay).getTime()) {
            this.$message.error("任务结束时间不能任务开始时间前面,请重新设置");
            this.query.endDay = "";
          }
        }
      },
9309dc5d   梁保满   任课老师接口完成
652
653
654
      changePage(page) {
        this.page = page;
        this._QueryData();
aed43d3a   阿宝   即时测修改答案
655
      },
f356590c   阿宝   即时测列表,分析页面
656
      edit(item) {
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
657
658
659
660
661
662
663
664
        this.$router.push({
          path: "/examinationPaperEdit",
          query: {
            paperId: item.id,
            title: item.title,
            type: 2,
          },
        });
f356590c   阿宝   即时测列表,分析页面
665
      },
9309dc5d   梁保满   任课老师接口完成
666
      changeTab() {
255e2506   梁保满   飞书bug及优化
667
        this.tableMaxHeight = this.$refs.main.offsetHeight;
9309dc5d   梁保满   任课老师接口完成
668
669
        this.page = 1;
        this._QueryData();
aed43d3a   阿宝   即时测修改答案
670
      },
4295ede6   梁保满   即使测报表对比页面开发
671
      //导入成功
e5e4a3e6   梁保满   v1.3
672
      upSuccess(res) {
e5e4a3e6   梁保满   v1.3
673
        this.$message.success("导入成功");
533a17d8   梁保满   备题组卷添加批量设置答案
674
        this.diaUp = false;
255e2506   梁保满   飞书bug及优化
675
676
        this._QueryData();
      },
4295ede6   梁保满   即使测报表对比页面开发
677
      //切换班级
da9346ee   梁保满   全选和排序问题
678
679
680
681
682
683
      async changeclass(list) {
        if (list.length == this.classList.length) {
          this.classAll = true;
        } else {
          this.classAll = false;
        }
ee00775c   梁保满   测试bug
684
685
686
687
688
689
        if (this.query.classIds.length == 0) {
          this.$message.warning("请至少选择一个班级!");
        }
        if (this.query.classIds != 1) {
          this.tabIndex = 1;
        }
533a17d8   梁保满   备题组卷添加批量设置答案
690
691
692
        await this._QuerySubjectList();
        this.page = 1;
        this._QueryData();
255e2506   梁保满   飞书bug及优化
693
      },
47a01cb6   梁保满   v1.3测试问题
694
      async _QueryClassList2() {
4295ede6   梁保满   即使测报表对比页面开发
695
        if (this.code) return;
47a01cb6   梁保满   v1.3测试问题
696
697
698
699
700
701
702
703
704
705
706
        const fetchClassList =
          this.role == "ROLE_BANZHUREN"
            ? this.$request.cTClassList
            : this.$request.tClassList;
        const { data, status, info } = await fetchClassList({ status: 1 });
        if (status === 0) {
          this.gdClass = data?.list?.length || 0;
        } else {
          this.$message.error(info);
        }
      },
f356590c   阿宝   即时测列表,分析页面
707
      async _QueryClassList() {
9309dc5d   梁保满   任课老师接口完成
708
709
710
711
712
        const fetchClassList =
          this.role == "ROLE_BANZHUREN"
            ? this.$request.cTClassList
            : this.$request.tClassList;
        const { data, status, info } = await fetchClassList();
4295ede6   梁保满   即使测报表对比页面开发
713
        this.query.classIds = [];
f356590c   阿宝   即时测列表,分析页面
714
715
716
717
        if (status === 0) {
          this.classList = data.list.map((item) => {
            return {
              value: item.classId,
45504a95   阿宝   即时测页面,以及小题修改答案
718
              label: item.className,
f356590c   阿宝   即时测列表,分析页面
719
720
            };
          });
4295ede6   梁保满   即使测报表对比页面开发
721
          this.query.classIds.push(this.classList[0]?.value);
f356590c   阿宝   即时测列表,分析页面
722
723
724
725
726
        } else {
          this.$message.error(info);
        }
      },
      async _QuerySubjectList() {
4295ede6   梁保满   即使测报表对比页面开发
727
728
729
730
731
732
733
        let query = {};
        if (!this.query.classIds.length) return;
        if (this.query.classIds.length == 1) {
          query.classId = this.query.classIds[0];
        } else {
          query.classIds = this.query.classIds;
        }
9309dc5d   梁保满   任课老师接口完成
734
735
736
737
738
        const fetchSubjectList =
          this.role == "ROLE_BANZHUREN"
            ? this.$request.cTSubjectList
            : this.$request.tSubjectList;
  
4295ede6   梁保满   即使测报表对比页面开发
739
        const { data, status, info } = await fetchSubjectList({ ...query });
f356590c   阿宝   即时测列表,分析页面
740
741
        if (status === 0) {
          this.subjectList =
45504a95   阿宝   即时测页面,以及小题修改答案
742
            data.subjectNames?.map((item) => {
f356590c   阿宝   即时测列表,分析页面
743
              return {
45504a95   阿宝   即时测页面,以及小题修改答案
744
745
                value: item,
                label: item,
f356590c   阿宝   即时测列表,分析页面
746
747
              };
            }) || [];
aed43d3a   阿宝   即时测修改答案
748
          if (this.role == "ROLE_BANZHUREN") {
f356590c   阿宝   即时测列表,分析页面
749
            this.subjectList.unshift({
9309dc5d   梁保满   任课老师接口完成
750
              value: "全部",
f356590c   阿宝   即时测列表,分析页面
751
752
              label: "全部",
            });
d44087bd   梁保满   分数去零,班主任切换班级多次添加科目
753
            this.query.subjectNames = [this.subjectList[0]?.value];
aed43d3a   阿宝   即时测修改答案
754
          } else {
9309dc5d   梁保满   任课老师接口完成
755
            this.query.subjectNames = this.subjectList[0]?.value;
f356590c   阿宝   即时测列表,分析页面
756
          }
f356590c   阿宝   即时测列表,分析页面
757
758
759
760
761
        } else {
          this.$message.error(info);
        }
      },
      async _QueryData() {
4295ede6   梁保满   即使测报表对比页面开发
762
763
        this.examReportName = "";
        if (!this.query.classIds.length) return;
9309dc5d   梁保满   任课老师接口完成
764
765
766
767
768
769
770
771
        this.tableData = [];
        if (this.tabIndex == 1) {
          this.examReportList();
        } else {
          this.phaseExamReport();
        }
      },
      //单卷测练
4295ede6   梁保满   即使测报表对比页面开发
772
      async examReportList(msg) {
f356590c   阿宝   即时测列表,分析页面
773
774
775
776
777
778
        let query = {};
        for (let key in this.query) {
          if (this.query[key] != "") {
            query[key] = this.query[key];
          }
        }
9309dc5d   梁保满   任课老师接口完成
779
780
781
782
        if (this.role != "ROLE_BANZHUREN") {
          query.subjectNames = [query.subjectNames];
        } else {
          if (
8ea67428   梁保满   飞书bug
783
            query["subjectNames"] &&
9309dc5d   梁保满   任课老师接口完成
784
785
786
787
788
789
790
            query["subjectNames"].length == 1 &&
            query["subjectNames"][0] == "全部"
          ) {
            query["subjectNames"] = this.subjectList.map((item) => {
              return item.value;
            });
            query["subjectNames"].shift();
dbbfc6c5   梁保满   飞书优化及bug
791
          }
255e2506   梁保满   飞书bug及优化
792
          if (!query["subjectNames"]) {
dbbfc6c5   梁保满   飞书优化及bug
793
794
            this.$message.warning("请选择科目");
            return;
9309dc5d   梁保满   任课老师接口完成
795
796
          }
        }
31436559   梁保满   多班级样式问题,成绩登记设置问题
797
798
799
        this.classTable = [];
        this.multipleSelection = [];
        this.loading = true;
4295ede6   梁保满   即使测报表对比页面开发
800
801
802
803
804
805
806
807
808
        if (this.query.classIds.length == 1) {
          query.classId = query.classIds[0];
          query.page = this.page;
          query.size = this.size;
          delete query.classIds;
        }
        if (msg) {
          query.title = msg;
        }
9309dc5d   梁保满   任课老师接口完成
809
        const { data, status, info } = await this.$request.examReportList({
f356590c   阿宝   即时测列表,分析页面
810
          ...query,
f356590c   阿宝   即时测列表,分析页面
811
812
813
        });
        this.loading = false;
        if (status === 0) {
f1b55bc6   梁保满   删除添加loading,提示词颜色
814
          this.tableData =
e5f407d6   梁保满   测试问题
815
            data?.list?.map((item) => {
f1b55bc6   梁保满   删除添加loading,提示词颜色
816
817
818
              item.loading = false;
              return item;
            }) || [];
ee00775c   梁保满   测试bug
819
820
          this.total = data?.count || 0;
          if (!query.classId) {
4295ede6   梁保满   即使测报表对比页面开发
821
822
            //多班级
            this.classTable = [];
da9346ee   梁保满   全选和排序问题
823
            let classIds = [];
4295ede6   梁保满   即使测报表对比页面开发
824
            let tableData = [];
ee00775c   梁保满   测试bug
825
            data?.list?.map((item) => {
da9346ee   梁保满   全选和排序问题
826
827
              if (!classIds.includes(item.classId)) {
                classIds.push(item.classId);
ee00775c   梁保满   测试bug
828
829
              }
              let idx = classIds.indexOf(item.classId);
4295ede6   梁保满   即使测报表对比页面开发
830
831
832
833
834
835
836
837
              if (tableData[idx]) {
                tableData[idx].push(item);
              } else {
                tableData[idx] = [item];
              }
            });
            this.classTable = [...tableData];
          }
9309dc5d   梁保满   任课老师接口完成
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
        } else {
          this.$message.error(info);
        }
      },
      //多卷测练
      async phaseExamReport() {
        this.loading = true;
        let query = {};
        for (let key in this.query) {
          if (this.query[key] != "") {
            if (key == "subjectNames" && this.role != "ROLE_BANZHUREN") {
              query["subjectName"] = this.query[key];
            } else {
              query[key] = this.query[key];
            }
          }
        }
        if (this.role == "ROLE_BANZHUREN") {
          if (
8ea67428   梁保满   飞书bug
857
858
            query["subjectNames"] &&
            query["subjectNames"]?.length == 1 &&
9309dc5d   梁保满   任课老师接口完成
859
860
861
862
863
            query["subjectNames"][0] == "全部"
          ) {
            query["subjectNames"] = this.subjectList.map((item) => {
              return item.value;
            });
8ea67428   梁保满   飞书bug
864
            query["subjectNames"]?.shift();
9309dc5d   梁保满   任课老师接口完成
865
866
          }
        }
4295ede6   梁保满   即使测报表对比页面开发
867
868
869
870
        if (this.query.classIds.length == 1) {
          query.classId = query.classIds[0];
          delete query.classIds;
        }
9309dc5d   梁保满   任课老师接口完成
871
872
873
874
875
876
877
878
879
880
        const phaseExamReport =
          this.role == "ROLE_BANZHUREN"
            ? this.$request.cTPhaseExamReport
            : this.$request.phaseExamReport;
        const { data, status, info } = await phaseExamReport({
          ...query,
        });
        this.loading = false;
        if (status === 0) {
          this.total = data.count;
8ea67428   梁保满   飞书bug
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
          if (this.role == "ROLE_BANZHUREN") {
            let subjectName = [];
            this.tableData = data?.list.map((item) => {
              let params = {};
              item.dataList.map((items, index) => {
                if (!subjectName.includes(items.subjectName)) {
                  subjectName.push(items.subjectName);
                }
                params["examCount" + items.subjectName] = items.examCount;
                params["participationCount" + items.subjectName] =
                  items.participationCount;
                params["score" + items.subjectName] = items.score;
                params["classRank" + items.subjectName] = items.classRank;
              });
              return {
                ...item,
                ...params,
              };
            });
            this.answerList = [...subjectName];
          } else {
            let dataIdsList = [],
              dataList = [];
            data?.list.map((item) => {
              item.examList.map((items) => {
9309dc5d   梁保满   任课老师接口完成
906
907
908
909
                if (!dataIdsList.includes(items.title)) {
                  dataIdsList.push(items.title);
                  dataList.push(items);
                }
8ea67428   梁保满   飞书bug
910
              });
9309dc5d   梁保满   任课老师接口完成
911
            });
8ea67428   梁保满   飞书bug
912
913
914
915
916
917
918
            console.log(dataList);
            this.tableData = data?.list.map((item) => {
              let params = {};
              dataIdsList.map((ids, index) => {
                params["score" + index] = "--";
                params["classRank" + index] = "--";
                item.examList.map((items) => {
9309dc5d   梁保满   任课老师接口完成
919
920
921
922
                  if (items.title == ids) {
                    params["score" + index] = items.score;
                    params["classRank" + index] = items.classRank;
                  }
8ea67428   梁保满   飞书bug
923
                });
9309dc5d   梁保满   任课老师接口完成
924
              });
8ea67428   梁保满   飞书bug
925
926
927
928
              return {
                ...item,
                ...params,
              };
9309dc5d   梁保满   任课老师接口完成
929
            });
8ea67428   梁保满   飞书bug
930
931
            this.answerList = dataList;
          }
f356590c   阿宝   即时测列表,分析页面
932
933
934
935
        } else {
          this.$message.error(info);
        }
      },
4295ede6   梁保满   即使测报表对比页面开发
936
      //报表导出
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
937
      async downExl() {
503b6063   梁保满   判断题答案选项
938
        if (this.exportLoading == true) return;
236b1f0e   梁保满   周末-飞书bug
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
        let query = {};
        for (let key in this.query) {
          if (this.query[key] != "") {
            if (key == "subjectNames" && this.role != "ROLE_BANZHUREN") {
              query["subjectName"] = this.query[key];
            } else {
              query[key] = this.query[key];
            }
          }
        }
        if (this.role == "ROLE_BANZHUREN") {
          if (
            query["subjectNames"] &&
            query["subjectNames"].length == 1 &&
            query["subjectNames"][0] == "全部"
          ) {
            query["subjectNames"] = this.subjectList.map((item) => {
              return item.value;
            });
            query["subjectNames"].shift();
          }
          if (!query["subjectNames"]) {
            this.$message.warning("请选择科目");
            return;
          }
        }
ee00775c   梁保满   测试bug
965
966
        query.classId = query.classIds[0];
        delete query.classIds;
503b6063   梁保满   判断题答案选项
967
968
969
970
        const exportPhaseExamReport =
          this.role == "ROLE_BANZHUREN"
            ? this.$request.cTExportPhaseExamReport
            : this.$request.exportPhaseExamReport;
236b1f0e   梁保满   周末-飞书bug
971
        this.exportLoading = true;
503b6063   梁保满   判断题答案选项
972
        const data = await exportPhaseExamReport({ ...query });
236b1f0e   梁保满   周末-飞书bug
973
        this.exportLoading = false;
a6eb85ed   梁保满   下载模版错误信息展示,图标根据环境切换
974
        if (data && !data.code) {
236b1f0e   梁保满   周末-飞书bug
975
976
977
          let blob = new Blob([data], {
            type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
          });
503b6063   梁保满   判断题答案选项
978
          downloadFile("即时测-阶段测练报表.xlsx", blob);
236b1f0e   梁保满   周末-飞书bug
979
        } else {
a6eb85ed   梁保满   下载模版错误信息展示,图标根据环境切换
980
          this.$message.error(data.info);
236b1f0e   梁保满   周末-飞书bug
981
        }
503b6063   梁保满   判断题答案选项
982
      },
4295ede6   梁保满   即使测报表对比页面开发
983
      //模板下载
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
984
      async downExcel() {
c2460294   梁保满   平台管理员接口联调
985
986
987
988
989
990
991
992
993
994
995
996
997
998
        this.loadingDown = true;
        let data = await this.$request.subjectiveScoreTemplate({
          examId: this.examId,
        });
        this.loadingDown = false;
        if (data && !data.code) {
          let blob = new Blob([data], {
            type: "application/vnd.ms-excel;charset=utf-8",
          });
          downloadFile(`主观题模版.xlsx`, blob);
        } else {
          this.$message.error(data.info);
        }
      },
f356590c   阿宝   即时测列表,分析页面
999
1000
    },
  };
4c4f7640   梁保满   路由表,路由前端文件
1001
1002
  </script>
  
9309dc5d   梁保满   任课老师接口完成
1003
1004
1005
1006
1007
  <style>
  div::-webkit-scrollbar {
    width: 3px;
    height: 10px;
  }
d3ca55ac   梁保满   等级设置
1008
  
9309dc5d   梁保满   任课老师接口完成
1009
1010
1011
1012
1013
  div::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: #ccc;
  }
  </style>
f356590c   阿宝   即时测列表,分析页面
1014
  <style lang="scss" scoped>
9309dc5d   梁保满   任课老师接口完成
1015
1016
  .page-container {
    position: relative;
255e2506   梁保满   飞书bug及优化
1017
    height: 100%;
d3ca55ac   梁保满   等级设置
1018
  
9309dc5d   梁保满   任课老师接口完成
1019
    &.active {
9309dc5d   梁保满   任课老师接口完成
1020
1021
1022
      overflow: hidden;
    }
  }
d3ca55ac   梁保满   等级设置
1023
  
f356590c   阿宝   即时测列表,分析页面
1024
1025
1026
1027
1028
  .table-box {
    margin: 0 20px;
    padding: 16px;
    background: #f8f8f8;
    border-radius: 5px;
31436559   梁保满   多班级样式问题,成绩登记设置问题
1029
    min-height: 300px;
d3ca55ac   梁保满   等级设置
1030
  
f356590c   阿宝   即时测列表,分析页面
1031
1032
1033
    :deep(.fa-arrow-right) {
      padding-left: 2px;
    }
d3ca55ac   梁保满   等级设置
1034
  
f356590c   阿宝   即时测列表,分析页面
1035
1036
1037
1038
    :deep(.fa-file-text) {
      padding-left: 2px;
    }
  }
d3ca55ac   梁保满   等级设置
1039
  
f356590c   阿宝   即时测列表,分析页面
1040
1041
1042
  .down {
    padding-top: 16px;
  }
d3ca55ac   梁保满   等级设置
1043
  
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
1044
1045
  .click-b {
    cursor: pointer;
c065091a   梁保满   即时测跳转画像参数调整
1046
    color: #409eff;
10cf4c8c   梁保满   学生画像接口调整
1047
    text-decoration: underline;
aed43d3a   阿宝   即时测修改答案
1048
  }
d3ca55ac   梁保满   等级设置
1049
  
4295ede6   梁保满   即使测报表对比页面开发
1050
1051
1052
1053
1054
  .head-box {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
d3ca55ac   梁保满   等级设置
1055
  
4295ede6   梁保满   即使测报表对比页面开发
1056
1057
1058
1059
1060
1061
    .txt {
      font-size: 16px;
      color: #333;
      line-height: 20px;
      position: relative;
      margin-bottom: 6px;
d3ca55ac   梁保满   等级设置
1062
  
4295ede6   梁保满   即使测报表对比页面开发
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
      &:after {
        content: "";
        position: absolute;
        top: 0;
        left: -16px;
        width: 4px;
        height: 100%;
        background: #409eff;
      }
    }
d3ca55ac   梁保满   等级设置
1073
  
4295ede6   梁保满   即使测报表对比页面开发
1074
1075
    .red {
      font-style: normal;
e5f407d6   梁保满   测试问题
1076
      font-size: 12px;
4295ede6   梁保满   即使测报表对比页面开发
1077
1078
      color: #f30;
    }
d3ca55ac   梁保满   等级设置
1079
  
4295ede6   梁保满   即使测报表对比页面开发
1080
1081
    .sel {
      width: 200px;
d3ca55ac   梁保满   等级设置
1082
  
4295ede6   梁保满   即使测报表对比页面开发
1083
1084
1085
1086
1087
      :deep(.el-input__inner) {
        border-radius: 20px;
      }
    }
  }
d3ca55ac   梁保满   等级设置
1088
  
4295ede6   梁保满   即使测报表对比页面开发
1089
1090
1091
  .tab-ul {
    display: flex;
    flex-wrap: wrap;
d3ca55ac   梁保满   等级设置
1092
  
4295ede6   梁保满   即使测报表对比页面开发
1093
    .tab-li {
ee00775c   梁保满   测试bug
1094
      width: calc(50% - 12px);
4295ede6   梁保满   即使测报表对比页面开发
1095
      margin: 0 12px 12px 0;
d3ca55ac   梁保满   等级设置
1096
  
4295ede6   梁保满   即使测报表对比页面开发
1097
1098
1099
      &:nth-child(2n) {
        margin-right: 0;
      }
d3ca55ac   梁保满   等级设置
1100
  
4295ede6   梁保满   即使测报表对比页面开发
1101
      .tab-tit {
ee00775c   梁保满   测试bug
1102
        font-size: 15px;
4295ede6   梁保满   即使测报表对比页面开发
1103
1104
        line-height: 40px;
        border: 1px solid #ebeef5;
ee00775c   梁保满   测试bug
1105
        padding-left: 12px;
4295ede6   梁保满   即使测报表对比页面开发
1106
1107
1108
      }
    }
  }
d3ca55ac   梁保满   等级设置
1109
  
4295ede6   梁保满   即使测报表对比页面开发
1110
1111
1112
1113
  .btn-box {
    padding-top: 12px;
    text-align: right;
  }
d3ca55ac   梁保满   等级设置
1114
  
4295ede6   梁保满   即使测报表对比页面开发
1115
1116
1117
  .remove-test {
    margin-left: 10px;
  }
d3ca55ac   梁保满   等级设置
1118
  
4295ede6   梁保满   即使测报表对比页面开发
1119
1120
1121
1122
1123
1124
1125
1126
  .input-with-select {
    width: 200px;
    height: 36px;
    margin-right: 50px;
    border-radius: 20px;
    border: 1px solid #e2e2e2;
    box-sizing: border-box;
    background: #fff;
d3ca55ac   梁保满   等级设置
1127
  
4295ede6   梁保满   即使测报表对比页面开发
1128
1129
1130
1131
1132
1133
1134
    :deep(.el-input__inner) {
      border-radius: 20px;
      border: none;
      height: 34px;
      line-height: 34px;
      padding-right: 0;
    }
d3ca55ac   梁保满   等级设置
1135
  
4295ede6   梁保满   即使测报表对比页面开发
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
    :deep(.el-button) {
      padding: 12px;
    }
  
    :deep(.el-input-group__append),
    :deep(.el-input-group__prepend) {
      border: none;
      background: transparent;
    }
  }
d3ca55ac   梁保满   等级设置
1146
  
da9346ee   梁保满   全选和排序问题
1147
1148
  .select-all {
    padding-left: 16px;
31436559   梁保满   多班级样式问题,成绩登记设置问题
1149
1150
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e2e2;
da9346ee   梁保满   全选和排序问题
1151
  }
4c4f7640   梁保满   路由表,路由前端文件
1152
  </style>