4c4f7640
梁保满
路由表,路由前端文件
|
1
|
<template>
|
e3b0e3e7
梁保满
季度时间格式调整
|
2
|
<div ref="main" class="page-content">
|
bb778c90
阿宝
设备状态
|
3
4
5
6
|
<back-box>
<template slot="title">
<span>设备管理</span>
</template>
|
e3b0e3e7
梁保满
季度时间格式调整
|
7
|
<template slot="btns" v-if="role != 'ROLE_JITUAN' && type == 1 && !code">
|
d32e461c
梁保满
备题组卷
|
8
|
<!-- <el-tooltip effect="dark" content="设备导入" placement="bottom">
|
bb778c90
阿宝
设备状态
|
9
10
11
12
13
14
|
<el-button
type="primary"
icon="el-icon-upload2"
size="mini"
plain
circle
|
db11048f
阿宝
设备状态,学校管理
|
15
|
@click="diaUp = true"
|
bb778c90
阿宝
设备状态
|
16
|
></el-button>
|
d32e461c
梁保满
备题组卷
|
17
|
</el-tooltip> -->
|
e3b0e3e7
梁保满
季度时间格式调整
|
18
19
20
21
22
23
|
<el-tooltip
v-if="role == 'ROLE_XUEXIAO'"
effect="dark"
content="添加基站"
placement="bottom"
>
|
bb778c90
阿宝
设备状态
|
24
25
26
27
28
29
|
<el-button
type="primary"
icon="el-icon-receiving"
size="mini"
plain
circle
|
e3b0e3e7
梁保满
季度时间格式调整
|
30
|
@click="addDev"
|
bb778c90
阿宝
设备状态
|
31
|
></el-button>
|
e3b0e3e7
梁保满
季度时间格式调整
|
32
|
</el-tooltip>
|
bb778c90
阿宝
设备状态
|
33
34
|
</template>
</back-box>
|
1365ef5e
梁保满
优化
|
35
|
<div>
|
db11048f
阿宝
设备状态,学校管理
|
36
37
38
39
40
41
42
43
|
<div class="tab-box">
<el-radio-group v-model="type">
<el-radio-button :label="1">基站管理</el-radio-button>
<el-radio-button :label="2">答题器管理</el-radio-button>
<el-radio-button :label="3">授课端管理</el-radio-button>
</el-radio-group>
</div>
<div class="content">
|
8ea67428
梁保满
飞书bug
|
44
|
<div v-show="type == 1">
|
225a00b6
梁保满
飞书问题解决
|
45
|
<div class="chart-box" v-if="count">
|
db11048f
阿宝
设备状态,学校管理
|
46
|
<div class="device-num">
|
225a00b6
梁保满
飞书问题解决
|
47
|
<p class="p1">{{ count }}</p>
|
db11048f
阿宝
设备状态,学校管理
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
<p class="p2">基站数量</p>
</div>
<div class="chart">
<pie-chart
id="pieChart"
:params="chartData"
@clickPieChart="clickPieChart"
></pie-chart>
</div>
</div>
<div class="table-box">
<div class="answer-header">
<div class="sel-box">
<el-cascader
|
225a00b6
梁保满
飞书问题解决
|
62
|
size="small"
|
db11048f
阿宝
设备状态,学校管理
|
63
|
class="sel"
|
db11048f
阿宝
设备状态,学校管理
|
64
65
66
|
clearable
placeholder="选择班级"
v-model="query.classId"
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
67
|
:options="gradeList"
|
db11048f
阿宝
设备状态,学校管理
|
68
69
|
:props="props"
:show-all-levels="false"
|
db11048f
阿宝
设备状态,学校管理
|
70
71
72
|
></el-cascader>
<el-select
class="sel"
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
73
|
v-model="query.onlineStatus"
|
db11048f
阿宝
设备状态,学校管理
|
74
|
placeholder="选择状态"
|
b21d90ef
梁保满
长水登录
|
75
|
@change="_QueryData(true)"
|
db11048f
阿宝
设备状态,学校管理
|
76
77
78
79
80
81
82
83
84
85
|
>
<el-option
v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-input
|
db11048f
阿宝
设备状态,学校管理
|
86
|
placeholder="请输入设备编码"
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
87
|
v-model="query.sn"
|
db11048f
阿宝
设备状态,学校管理
|
88
89
90
91
92
93
94
95
96
|
class="input-with-select"
@keyup.enter.native="_QueryData(true)"
>
<el-button
slot="append"
icon="el-icon-search"
@click="_QueryData(true)"
></el-button>
</el-input>
|
1b9bae95
梁保满
级联选择器调整,日志接口调整
|
97
|
<el-button class="serach-box" round @click="_QueryData(true)"
|
b21d90ef
梁保满
长水登录
|
98
99
|
>筛选</el-button
>
|
db11048f
阿宝
设备状态,学校管理
|
100
101
102
103
|
</div>
</div>
<el-table :data="tableData" border style="width: 100%">
<el-table-column
|
6d7bd862
梁保满
飞书bug
|
104
|
prop="sn"
|
db11048f
阿宝
设备状态,学校管理
|
105
106
107
108
|
label="设备编码"
align="center"
></el-table-column>
<el-table-column
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
109
|
prop="frequency"
|
db11048f
阿宝
设备状态,学校管理
|
110
111
112
113
|
label="频点"
align="center"
></el-table-column>
<el-table-column
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
114
|
prop="pairingCode"
|
db11048f
阿宝
设备状态,学校管理
|
115
116
117
118
|
label="配对码"
align="center"
></el-table-column>
<el-table-column
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
119
|
prop="roomName"
|
db11048f
阿宝
设备状态,学校管理
|
120
121
122
|
label="所在教室"
align="center"
></el-table-column>
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
123
124
|
<el-table-column label="关联班级" align="center">
<template slot-scope="scoped">
|
e3b0e3e7
梁保满
季度时间格式调整
|
125
|
<p v-for="(item, index) in scoped.row.classList" :key="index">
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
126
127
128
129
|
{{ item.className }}
</p>
</template>
</el-table-column>
|
db11048f
阿宝
设备状态,学校管理
|
130
|
<el-table-column
|
6d7bd862
梁保满
飞书bug
|
131
|
prop="otaVersionName"
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
132
|
label="固件版本号"
|
db11048f
阿宝
设备状态,学校管理
|
133
134
135
|
align="center"
></el-table-column>
<el-table-column
|
6d7bd862
梁保满
飞书bug
|
136
|
prop="onlineTime"
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
137
|
label="最近上报"
|
db11048f
阿宝
设备状态,学校管理
|
138
139
|
align="center"
></el-table-column>
|
db11048f
阿宝
设备状态,学校管理
|
140
141
142
|
<el-table-column label="状态" align="center"
><template slot-scope="scope">
{{
|
6d7bd862
梁保满
飞书bug
|
143
|
scope.row.onlineStatus == 1
|
db11048f
阿宝
设备状态,学校管理
|
144
|
? "在线"
|
6d7bd862
梁保满
飞书bug
|
145
146
147
|
: scope.row.onlineStatus == 2
? "异常"
: "离线"
|
db11048f
阿宝
设备状态,学校管理
|
148
149
150
151
152
|
}}
</template></el-table-column
>
<el-table-column label="操作" align="center"
><template slot-scope="scoped">
|
225a00b6
梁保满
飞书问题解决
|
153
154
155
156
157
158
|
<el-tooltip
effect="dark"
v-if="role != 'ROLE_JITUAN'"
content="修改基站"
placement="top"
>
|
db11048f
阿宝
设备状态,学校管理
|
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
|
<el-button
type="primary"
circle
size="mini"
icon="fa fa-edit"
@click="edit(scoped.row)"
></el-button>
</el-tooltip>
<el-tooltip effect="dark" content="日志" placement="top">
<el-button
type="warning"
circle
size="mini"
icon="fa fa-eye"
@click="linkTo(scoped.row, 1)"
></el-button>
</el-tooltip> </template
></el-table-column>
</el-table>
</div>
</div>
|
8ea67428
梁保满
飞书bug
|
180
|
<div v-show="type == 2">
|
225a00b6
梁保满
飞书问题解决
|
181
|
<div class="chart-box" v-if="count">
|
db11048f
阿宝
设备状态,学校管理
|
182
|
<div class="device-num">
|
225a00b6
梁保满
飞书问题解决
|
183
|
<p class="p1">{{ count }}</p>
|
db11048f
阿宝
设备状态,学校管理
|
184
185
186
187
188
189
190
191
192
193
194
195
196
197
|
<p class="p2">答题器数量</p>
</div>
<div class="chart">
<scatter-chart
id="scatterChart"
:params="chartData2"
@clickScatterChart="clickScatterChart"
></scatter-chart>
</div>
</div>
<div class="table-box">
<div class="answer-header">
<div class="sel-box">
<el-cascader
|
225a00b6
梁保满
飞书问题解决
|
198
|
size="small"
|
db11048f
阿宝
设备状态,学校管理
|
199
|
class="sel"
|
db11048f
阿宝
设备状态,学校管理
|
200
201
202
|
clearable
placeholder="选择班级"
v-model="query.classId"
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
203
|
:options="gradeList"
|
db11048f
阿宝
设备状态,学校管理
|
204
205
|
:props="props"
:show-all-levels="false"
|
db11048f
阿宝
设备状态,学校管理
|
206
207
208
|
></el-cascader>
<el-select
class="sel"
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
209
|
v-model="query.type"
|
db11048f
阿宝
设备状态,学校管理
|
210
|
placeholder="选择状态"
|
b21d90ef
梁保满
长水登录
|
211
|
@change="_QueryData(true)"
|
db11048f
阿宝
设备状态,学校管理
|
212
213
|
>
<el-option
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
214
|
v-for="item in typeList"
|
db11048f
阿宝
设备状态,学校管理
|
215
216
217
218
219
220
221
|
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-input
|
db11048f
阿宝
设备状态,学校管理
|
222
|
placeholder="请输入设备编码"
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
223
|
v-model="query.sn"
|
db11048f
阿宝
设备状态,学校管理
|
224
225
226
227
228
229
230
231
232
|
class="input-with-select"
@keyup.enter.native="_QueryData(true)"
>
<el-button
slot="append"
icon="el-icon-search"
@click="_QueryData(true)"
></el-button>
</el-input>
|
1b9bae95
梁保满
级联选择器调整,日志接口调整
|
233
|
<el-button class="serach-box" round @click="_QueryData(true)"
|
b21d90ef
梁保满
长水登录
|
234
|
>筛选</el-button
|
1b9bae95
梁保满
级联选择器调整,日志接口调整
|
235
|
>
|
db11048f
阿宝
设备状态,学校管理
|
236
237
238
239
|
</div>
</div>
<el-table :data="tableData" border style="width: 100%">
<el-table-column
|
6d7bd862
梁保满
飞书bug
|
240
|
prop="sn"
|
db11048f
阿宝
设备状态,学校管理
|
241
242
243
|
label="设备编码"
align="center"
></el-table-column>
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
244
245
246
|
<el-table-column label="学生信息" align="center"
><template slot-scope="scoped"
><p
|
6d7bd862
梁保满
飞书bug
|
247
248
|
v-for="(item, index) in scoped.row.studentList"
:key="index"
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
249
250
251
252
253
|
>
{{ item.studentName }}
</p></template
></el-table-column
>
|
db11048f
阿宝
设备状态,学校管理
|
254
|
<el-table-column
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
255
|
prop="electricity"
|
db11048f
阿宝
设备状态,学校管理
|
256
257
258
|
label="电量"
align="center"
></el-table-column>
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
259
260
|
<el-table-column prop="class" label="关联班级" align="center">
<template slot-scope="scoped">
|
6d7bd862
梁保满
飞书bug
|
261
|
<p v-for="(item, index) in scoped.row.classList" :key="index">
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
262
263
264
265
|
{{ item.className }}
</p>
</template></el-table-column
>
|
db11048f
阿宝
设备状态,学校管理
|
266
|
<el-table-column
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
267
|
prop="pairingCode"
|
db11048f
阿宝
设备状态,学校管理
|
268
269
270
271
|
label="配对码"
align="center"
></el-table-column>
<el-table-column
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
272
|
prop="answerTimes"
|
db11048f
阿宝
设备状态,学校管理
|
273
274
275
276
|
label="答题次数"
align="center"
></el-table-column>
<el-table-column
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
277
|
prop="latestReportTime"
|
db11048f
阿宝
设备状态,学校管理
|
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
label="最后答题时间"
align="center"
></el-table-column>
<el-table-column label="操作" align="center"
><template slot-scope="scoped">
<el-tooltip effect="dark" content="日志" placement="top">
<el-button
type="warning"
circle
size="mini"
icon="fa fa-eye"
@click="linkTo(scoped.row, 2)"
></el-button>
</el-tooltip> </template
></el-table-column>
</el-table>
</div>
</div>
|
8ea67428
梁保满
飞书bug
|
296
|
<div v-show="type == 3">
|
db11048f
阿宝
设备状态,学校管理
|
297
298
299
300
|
<div class="table-box">
<div class="answer-header">
<div class="sel-box">
<el-cascader
|
225a00b6
梁保满
飞书问题解决
|
301
|
size="small"
|
db11048f
阿宝
设备状态,学校管理
|
302
|
class="sel"
|
db11048f
阿宝
设备状态,学校管理
|
303
304
305
|
clearable
placeholder="选择班级"
v-model="query.classId"
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
306
|
:options="gradeList"
|
db11048f
阿宝
设备状态,学校管理
|
307
308
309
310
|
:props="props"
:show-all-levels="false"
@change="_QueryData(false)"
></el-cascader>
|
e5ff81a1
阿宝
集团管理员接口
|
311
312
313
|
<span class="sel"
>共选择{{ selectionTabIds.length }}个授课端</span
>
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
314
|
<el-button plan round @click="autoUpDate(false)"
|
db11048f
阿宝
设备状态,学校管理
|
315
316
|
>开启自动更新</el-button
>
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
317
|
<el-button plan round @click="stopUpdate(false)"
|
db11048f
阿宝
设备状态,学校管理
|
318
319
320
321
322
323
324
325
326
327
|
>停止自动更新</el-button
>
</div>
</div>
<el-table
:data="tableData"
border
style="width: 100%"
@selection-change="handleSelectionChange"
>
|
6d7bd862
梁保满
飞书bug
|
328
|
<el-table-column type="selection" width="55"></el-table-column>
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
329
330
|
<el-table-column prop="class" label="关联班级" align="center"
><template slot-scope="scoped">
|
6d7bd862
梁保满
飞书bug
|
331
|
<p v-for="(item, index) in scoped.row.classList" :key="index">
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
332
333
334
335
|
{{ item.className }}
</p>
</template></el-table-column
>
|
db11048f
阿宝
设备状态,学校管理
|
336
|
<el-table-column
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
337
|
prop="lastUpdateTime"
|
db11048f
阿宝
设备状态,学校管理
|
338
339
340
341
|
label="最近更新"
align="center"
></el-table-column>
<el-table-column
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
342
|
prop="osInfo"
|
db11048f
阿宝
设备状态,学校管理
|
343
344
345
346
|
label="软件系统"
align="center"
></el-table-column>
<el-table-column
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
347
|
prop="hardwareInfo"
|
db11048f
阿宝
设备状态,学校管理
|
348
349
350
351
|
label="硬件环境"
align="center"
></el-table-column>
<el-table-column
|
255e2506
梁保满
飞书bug及优化
|
352
|
prop="otaVersionName"
|
db11048f
阿宝
设备状态,学校管理
|
353
354
355
356
357
358
|
label="版本号"
align="center"
></el-table-column>
<el-table-column label="状态" align="center"
><template slot-scope="scope">
{{
|
6d7bd862
梁保满
飞书bug
|
359
|
scope.row.onlineStatus == 1
|
db11048f
阿宝
设备状态,学校管理
|
360
|
? "在线"
|
6d7bd862
梁保满
飞书bug
|
361
362
363
|
: scope.row.onlineStatus == 2
? "异常"
: "离线"
|
db11048f
阿宝
设备状态,学校管理
|
364
365
366
367
368
369
|
}}
</template></el-table-column
>
<el-table-column label="自动更新" align="center"
><template slot-scope="scoped">
<el-switch
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
370
|
v-model="scoped.row.upgradeFlag"
|
db11048f
阿宝
设备状态,学校管理
|
371
372
373
374
375
376
377
|
@change="changeUpdate($event, scoped.row, this)"
>
</el-switch> </template
></el-table-column>
</el-table>
</div>
</div>
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
378
379
380
381
382
383
384
385
386
387
388
389
|
<div class="pagination-box">
<el-pagination
small=""
layout="total,prev, pager, next"
:hide-on-single-page="true"
:total="total"
@current-change="changePage"
:current-page="page"
:page-size="size"
>
</el-pagination>
</div>
|
db11048f
阿宝
设备状态,学校管理
|
390
391
392
|
</div>
</div>
<el-dialog title="设备导入" :visible.sync="diaUp" width="400">
|
e3b0e3e7
梁保满
季度时间格式调整
|
393
394
395
396
397
398
|
<up-load
id="downDevice"
:url="url"
@upSuccess="upSuccess"
fileName="设备信息"
>
|
db11048f
阿宝
设备状态,学校管理
|
399
400
|
<p class="down-txt" slot="down">
通过Excel名单导入设备,需要提供设备编码,点击
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
401
|
<el-link type="danger" @click="downExcel">模板下载</el-link> 。
|
db11048f
阿宝
设备状态,学校管理
|
402
403
404
405
406
407
|
</p>
</up-load>
<div class="dialog-footer" slot="footer">
<el-button @click="diaUp = false">取 消</el-button>
</div>
</el-dialog>
|
e3b0e3e7
梁保满
季度时间格式调整
|
408
|
<el-dialog :title="isAdd?'添加基站':'修改基站'" :visible.sync="diaAnswerEqu" width="400">
|
db11048f
阿宝
设备状态,学校管理
|
409
|
<el-form ref="forms" :model="form" :rules="formRules" label-width="140px">
|
1365ef5e
梁保满
优化
|
410
|
<el-form-item label="设备编码:" prop="sn">
|
6d7bd862
梁保满
飞书bug
|
411
|
<el-col :span="16"
|
db11048f
阿宝
设备状态,学校管理
|
412
413
414
|
><el-input
type="text"
placeholder="输入设备编码"
|
1365ef5e
梁保满
优化
|
415
|
v-model.trim="form.sn"
|
db11048f
阿宝
设备状态,学校管理
|
416
417
418
|
maxlength="30"
size="45"
show-word-limit
|
e3b0e3e7
梁保满
季度时间格式调整
|
419
|
:disabled="!isAdd"
|
db11048f
阿宝
设备状态,学校管理
|
420
421
422
423
|
>
</el-input
></el-col>
</el-form-item>
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
424
|
<el-form-item label="频点:" prop="frequency">
|
6d7bd862
梁保满
飞书bug
|
425
|
<el-col :span="16"
|
db11048f
阿宝
设备状态,学校管理
|
426
427
428
|
><el-input
type="text"
placeholder="输入频点"
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
429
|
v-model.trim="form.frequency"
|
db11048f
阿宝
设备状态,学校管理
|
430
431
432
433
434
435
436
|
maxlength="30"
size="45"
show-word-limit
>
</el-input
></el-col>
</el-form-item>
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
437
|
<el-form-item label="配对码:" prop="pairingCode">
|
6d7bd862
梁保满
飞书bug
|
438
|
<el-col :span="16"
|
db11048f
阿宝
设备状态,学校管理
|
439
440
441
|
><el-input
type="text"
placeholder="输入配对码"
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
442
|
v-model.trim="form.pairingCode"
|
db11048f
阿宝
设备状态,学校管理
|
443
444
445
446
447
448
449
|
maxlength="30"
size="45"
show-word-limit
>
</el-input
></el-col>
</el-form-item>
|
6d7bd862
梁保满
飞书bug
|
450
451
|
<el-form-item label="选择班级:" prop="classIds">
<el-col :span="16">
|
db11048f
阿宝
设备状态,学校管理
|
452
|
<el-cascader
|
6d7bd862
梁保满
飞书bug
|
453
|
class="sel"
|
db11048f
阿宝
设备状态,学校管理
|
454
|
clearable
|
6d7bd862
梁保满
飞书bug
|
455
|
v-model="form.classIds"
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
456
|
:options="gradeList"
|
e3b0e3e7
梁保满
季度时间格式调整
|
457
|
:props="{ expandTrigger: 'hover' }"
|
db11048f
阿宝
设备状态,学校管理
|
458
459
460
461
462
|
:show-all-levels="false"
></el-cascader>
</el-col>
</el-form-item>
<el-form-item label="所在教室:">
|
6d7bd862
梁保满
飞书bug
|
463
|
<el-col :span="16"
|
db11048f
阿宝
设备状态,学校管理
|
464
465
466
|
><el-input
type="text"
placeholder="输入所在教室"
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
467
|
v-model.trim="form.roomName"
|
db11048f
阿宝
设备状态,学校管理
|
468
469
470
471
472
473
474
475
476
|
maxlength="30"
size="45"
show-word-limit
>
</el-input
></el-col>
</el-form-item>
</el-form>
<div class="dialog-footer" slot="footer">
|
236b1f0e
梁保满
周末-飞书bug
|
477
|
<el-button type="primary" @click="setAnswerEqu">确 定</el-button>
|
db11048f
阿宝
设备状态,学校管理
|
478
479
480
|
<el-button @click="diaAnswerEqu = false">取 消</el-button>
</div>
</el-dialog>
|
bb778c90
阿宝
设备状态
|
481
|
</div>
|
4c4f7640
梁保满
路由表,路由前端文件
|
482
483
484
|
</template>
<script>
|
db11048f
阿宝
设备状态,学校管理
|
485
486
487
|
import pieChart from "@/components/charts/pieChart";
import scatterChart from "@/components/charts/scatterChart";
import _ from "lodash";
|
255e2506
梁保满
飞书bug及优化
|
488
489
|
import { downloadFile, formatClass, formatGradeNameClass } from "@/utils";
import api from "@/api/apis/apis";
|
db11048f
阿宝
设备状态,学校管理
|
490
491
|
export default {
components: { pieChart, scatterChart },
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
492
493
494
495
|
watch: {
type: function (val) {
this.page = 1;
this.total = 0;
|
225a00b6
梁保满
飞书问题解决
|
496
|
this.count = 0;
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
497
498
499
500
501
502
503
504
505
506
507
508
|
this.query.classId = [];
this.query.onlineStatus = "";
this.query.sn = "";
this.query.type = "";
if (val == 1) {
this.stationReport();
} else if (val == 2) {
this.keyboardReport();
}
this._QueryData();
},
},
|
db11048f
阿宝
设备状态,学校管理
|
509
510
|
data() {
return {
|
e3b0e3e7
梁保满
季度时间格式调整
|
511
|
isAdd:false,//添加还是修改基站
|
e5ff81a1
阿宝
集团管理员接口
|
512
|
role: "",
|
d32e461c
梁保满
备题组卷
|
513
|
code: "",
|
db11048f
阿宝
设备状态,学校管理
|
514
515
516
517
|
loading: false,
url: "/web/upLoadDevice",
diaUp: false,
diaAnswerEqu: false,
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
518
519
|
gradeList: [],
gradeListAll: [],
|
225a00b6
梁保满
飞书问题解决
|
520
|
schoolAll: [],
|
e3b0e3e7
梁保满
季度时间格式调整
|
521
|
school: {}, //校园账号所属学校信息
|
255e2506
梁保满
飞书bug及优化
|
522
523
524
|
props: {
multiple: true,
checkStrictly: true,
|
255e2506
梁保满
飞书bug及优化
|
525
|
},
|
db11048f
阿宝
设备状态,学校管理
|
526
527
528
|
type: 1,
query: {
classId: [],
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
529
530
531
|
onlineStatus: "",
sn: "",
type: "",
|
db11048f
阿宝
设备状态,学校管理
|
532
533
|
},
statusList: [
|
dbbfc6c5
梁保满
飞书优化及bug
|
534
|
{ label: "全部", value: "" },
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
535
|
{ label: "离线", value: 0 },
|
db11048f
阿宝
设备状态,学校管理
|
536
|
{ label: "在线", value: 1 },
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
537
538
539
540
541
542
543
544
545
546
|
{ label: "异常", value: 2 },
],
typeList: [
{ label: "全部", value: 0 },
{ label: "1日内", value: 1 },
{ label: "3日内", value: 2 },
{ label: "7日内", value: 3 },
{ label: "1月内", value: 4 },
{ label: "3月内", value: 5 },
{ label: "3月以上", value: 6 },
|
db11048f
阿宝
设备状态,学校管理
|
547
548
|
],
form: {
|
255e2506
梁保满
飞书bug及优化
|
549
|
deviceId: "",
|
1365ef5e
梁保满
优化
|
550
|
sn: "",
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
551
552
|
frequency: "",
pairingCode: "",
|
236b1f0e
梁保满
周末-飞书bug
|
553
|
classIds: "",
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
554
|
roomName: "",
|
db11048f
阿宝
设备状态,学校管理
|
555
556
|
},
formRules: {
|
e3b0e3e7
梁保满
季度时间格式调整
|
557
|
sn: [{ required: true, message: "请输入设备编码", trigger: "blur" }],
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
558
559
560
561
|
frequency: [{ required: true, message: "请输入频点", trigger: "blur" }],
pairingCode: [
{ required: true, message: "请输入配对码", trigger: "blur" },
],
|
6d7bd862
梁保满
飞书bug
|
562
|
classIds: [{ required: true, message: "请选择班级", trigger: "blur" }],
|
db11048f
阿宝
设备状态,学校管理
|
563
|
},
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
564
565
|
tableData: [],
total: 0,
|
225a00b6
梁保满
飞书问题解决
|
566
|
count: 0,
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
567
568
|
chartData: [],
chartData2: [],
|
db11048f
阿宝
设备状态,学校管理
|
569
|
selectionTabIds: [],
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
570
571
|
page: 1,
size: 20,
|
db11048f
阿宝
设备状态,学校管理
|
572
573
574
|
};
},
created() {
|
e3b0e3e7
梁保满
季度时间格式调整
|
575
|
this.code = localStorage.getItem("csCode") || "";
|
e5ff81a1
阿宝
集团管理员接口
|
576
577
578
579
580
581
582
|
let role = "";
this.$store.getters.info.permissions.map((item) => {
if (item.roleName == this.$store.getters.info.showRoleName) {
role = item.role;
}
});
this.role = role ? role : this.$store.getters.info.permissions[0].role;
|
255e2506
梁保满
飞书bug及优化
|
583
|
if (this.role == "ROLE_JITUAN") {
|
e3b0e3e7
梁保满
季度时间格式调整
|
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
|
(this.props.lazy = true),
(this.props.lazyLoad = function (node, resolve) {
const { level } = node;
if (level == 2) {
console.log(node);
api
.tenantClassList({
schoolId: node.data.value,
})
.then((res) => {
let children = formatGradeNameClass(res.data?.list).sort(
(a, b) => {
return a.grade - b.grade;
}
);
console.log();
|
255e2506
梁保满
飞书bug及优化
|
600
|
|
e3b0e3e7
梁保满
季度时间格式调整
|
601
602
603
604
605
606
607
608
609
610
611
|
const nodes = [...children];
// 通过调用resolve将子节点数据返回,通知组件数据加载完成
resolve(nodes);
});
} else {
resolve(node);
}
});
}
if (this.role == "ROLE_XUEXIAO") {
this._QueryDataSchool();
|
255e2506
梁保满
飞书bug及优化
|
612
|
}
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
613
614
615
|
this.stationReport();
this._QueryGradeList();
this._QueryData();
|
225a00b6
梁保满
飞书问题解决
|
616
617
618
|
if (role == "ROLE_JITUAN") {
this.showSchool();
}
|
db11048f
阿宝
设备状态,学校管理
|
619
620
|
},
methods: {
|
e3b0e3e7
梁保满
季度时间格式调整
|
621
622
623
|
upSuccess() {
//导入成功
this.diaUp = false;
|
255e2506
梁保满
飞书bug及优化
|
624
625
|
this._QueryData();
},
|
6d7bd862
梁保满
飞书bug
|
626
|
edit(obj) {
|
e3b0e3e7
梁保满
季度时间格式调整
|
627
|
this.isAdd=false
|
255e2506
梁保满
飞书bug及优化
|
628
629
|
for (let key in this.form) {
if (key == "classIds") {
|
e3b0e3e7
梁保满
季度时间格式调整
|
630
|
this.form[key] = obj.classList[0]?.classId;
|
255e2506
梁保满
飞书bug及优化
|
631
632
|
} else {
this.form[key] = obj[key];
|
6d7bd862
梁保满
飞书bug
|
633
634
|
}
}
|
e3b0e3e7
梁保满
季度时间格式调整
|
635
636
|
delete this.form.schoolId
this.form.deviceId = obj.id;
|
255e2506
梁保满
飞书bug及优化
|
637
|
this.diaAnswerEqu = true;
|
6d7bd862
梁保满
飞书bug
|
638
|
},
|
db11048f
阿宝
设备状态,学校管理
|
639
640
641
642
643
644
645
646
647
648
|
linkTo(obj, type) {
this.$router.push({
path: "/deviceLog",
query: {
id: obj.id,
type: type,
},
});
},
clickPieChart(obj) {
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
649
650
651
652
|
this.query.onlineStatus =
obj.name == "在线" ? 1 : obj.name == "离线" ? 0 : 2;
this.query.sn = "";
this.page = 1;
|
b21d90ef
梁保满
长水登录
|
653
|
this._QueryData(false);
|
db11048f
阿宝
设备状态,学校管理
|
654
655
|
},
clickScatterChart(obj) {
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
656
657
658
659
660
661
662
663
664
665
666
667
668
669
|
this.query.type =
obj.name == "1日内"
? 1
: obj.name == "3日内"
? 2
: obj.name == "7日内"
? 3
: obj.name == "1月内"
? 4
: obj.name == "3月内"
? 5
: 6;
this.query.sn = "";
this.page = 1;
|
b21d90ef
梁保满
长水登录
|
670
|
this._QueryData(false);
|
db11048f
阿宝
设备状态,学校管理
|
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
|
},
handleSelectionChange(val) {
console.log(val);
this.selectionTabIds = val.map((item) => {
return item.id;
});
},
changeUpdate: _.debounce(function (event, obj) {
console.log(this);
if (event) {
this.autoUpDate(obj.id);
} else {
this.stopUpdate(obj.id);
}
}, 800),
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
686
687
|
changePage(page) {
this.page = page;
|
b21d90ef
梁保满
长水登录
|
688
|
this._QueryData(false);
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
689
|
},
|
e3b0e3e7
梁保满
季度时间格式调整
|
690
691
692
693
694
695
696
697
698
699
700
|
addDev() {
this.form.sn = "";
this.form.frequency = "";
this.form.pairingCode = "";
this.form.classIds = "";
this.form.roomName = "";
this.form.schoolId= this.school.id
delete this.form.deviceId
this.isAdd = true
this.diaAnswerEqu = true;
},
|
225a00b6
梁保满
飞书问题解决
|
701
|
async showSchool() {
|
296f7c47
梁保满
集团管理员接口调整
|
702
703
|
const { data, status, info } = await this.$request.schoolList();
if (status === 0) {
|
225a00b6
梁保满
飞书问题解决
|
704
705
706
707
708
709
710
711
712
713
714
715
716
|
this.schoolAll = [
{
value: 0,
label: "全部",
children: data.list?.map((item) => {
return {
value: item.id,
label: item.schoolName,
};
}),
},
];
this.gradeList = [...this.schoolAll, ...this.gradeList];
|
296f7c47
梁保满
集团管理员接口调整
|
717
718
719
720
|
} else {
this.$message.error(info);
}
},
|
db11048f
阿宝
设备状态,学校管理
|
721
722
723
724
725
726
727
|
async autoUpDate(id) {
if (!this.selectionTabIds.length && !id) {
this.$message.warning("请选择授课端~");
return;
}
if (this.loadingUpDate) return;
this.loadingUpDate = true;
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
728
|
let data = await this.$request.modifyUpgradeFlag({
|
dd5150c5
阿宝
数据同步
|
729
|
deviceIds: id ? [id] : this.selectionTabIds,
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
730
|
upgradeFlag: 1,
|
db11048f
阿宝
设备状态,学校管理
|
731
732
733
734
|
});
this.loadingUpDate = false;
if (data && !data.code) {
this._QueryData(false);
|
e5ff81a1
阿宝
集团管理员接口
|
735
|
this.selectionTabIds = [];
|
db11048f
阿宝
设备状态,学校管理
|
736
737
|
this.$message.success("开启自动更新成功");
} else {
|
236b1f0e
梁保满
周末-飞书bug
|
738
|
this.$message.error(data.info);
|
db11048f
阿宝
设备状态,学校管理
|
739
740
741
742
743
744
745
746
747
|
}
},
async stopUpdate(id) {
if (!this.selectionTabIds.length && !id) {
this.$message.warning("请选择授课端~");
return;
}
if (this.loadingUpDate) return;
this.loadingUpDate = true;
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
748
|
let data = await this.$request.modifyUpgradeFlag({
|
dd5150c5
阿宝
数据同步
|
749
|
deviceIds: id ? [id] : this.selectionTabIds,
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
750
|
upgradeFlag: 0,
|
db11048f
阿宝
设备状态,学校管理
|
751
752
753
|
});
this.loadingUpDate = false;
if (data && !data.code) {
|
e5ff81a1
阿宝
集团管理员接口
|
754
|
this.selectionTabIds = [];
|
db11048f
阿宝
设备状态,学校管理
|
755
756
757
|
this._QueryData(false);
this.$message.success("关闭自动更新成功");
} else {
|
236b1f0e
梁保满
周末-飞书bug
|
758
|
this.$message.error(data.info);
|
db11048f
阿宝
设备状态,学校管理
|
759
760
761
762
763
764
765
766
767
768
769
770
|
}
},
async downExcel() {
let data = await this.$request.downDevice({
id: this.id,
});
if (data && !data.code) {
let blob = new Blob([data], {
type: "application/vnd.ms-excel;charset=utf-8",
});
downloadFile(`设备信息.xlsx`, blob);
} else {
|
255e2506
梁保满
飞书bug及优化
|
771
|
this.$message.error(data.info);
|
db11048f
阿宝
设备状态,学校管理
|
772
773
774
|
}
},
|
236b1f0e
梁保满
周末-飞书bug
|
775
776
|
// 修改基站
setAnswerEqu() {
|
6d7bd862
梁保满
飞书bug
|
777
778
779
780
|
this.$refs.forms.validate(async (valid) => {
if (valid) {
if (this.loadingAnswerEqu) return;
this.loadingAnswerEqu = true;
|
255e2506
梁保满
飞书bug及优化
|
781
|
let query = { ...this.form };
|
236b1f0e
梁保满
周末-飞书bug
|
782
783
784
785
|
// query.classIds = query.classIds.map((item) => {
// return item[1];
// });
|
e3b0e3e7
梁保满
季度时间格式调整
|
786
787
788
789
790
791
792
793
|
if(typeof query.classIds == 'string' || typeof query.classIds == 'number'){
query.classIds = [query.classIds];
}else{
query.classIds = [query.classIds[1]];
}
let deviceApi = this.isAdd?this.$request.addStation:this.$request.updateDevice
const { data, status, info } = await deviceApi({
|
255e2506
梁保满
飞书bug及优化
|
794
795
|
...query,
});
|
6d7bd862
梁保满
飞书bug
|
796
797
798
|
this.loadingAnswerEqu = false;
console.log(status);
if (status === 0) {
|
255e2506
梁保满
飞书bug及优化
|
799
|
this.diaAnswerEqu = false;
|
1365ef5e
梁保满
优化
|
800
|
this.$message.success(info);
|
6d7bd862
梁保满
飞书bug
|
801
|
this._QueryData();
|
e3b0e3e7
梁保满
季度时间格式调整
|
802
803
804
|
if(this.isAdd){
this.stationReport()
}
|
6d7bd862
梁保满
飞书bug
|
805
806
807
808
809
810
811
|
} else {
this.$message.error(info);
}
} else {
this.$message.warning("数据有误,请检查!");
}
});
|
db11048f
阿宝
设备状态,学校管理
|
812
|
},
|
e3b0e3e7
梁保满
季度时间格式调整
|
813
814
815
816
817
818
819
820
|
async _QueryDataSchool() {
const { data, status, info } = await this.$request.schoolDetail();
if (status === 0) {
this.school = { ...data };
} else {
this.$message.error(info);
}
},
|
db11048f
阿宝
设备状态,学校管理
|
821
|
// 查找班级
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
822
823
|
async _QueryGradeList() {
this.loading = true;
|
e5ff81a1
阿宝
集团管理员接口
|
824
825
826
827
828
|
const gradeList =
this.role != "ROLE_JITUAN"
? this.$request.gradeList
: this.$request.regionList;
const { data, status, info } = await gradeList();
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
829
830
|
if (status === 0) {
if (!!data.list) {
|
e5ff81a1
阿宝
集团管理员接口
|
831
832
833
834
|
if (this.role != "ROLE_JITUAN") {
this.gradeList =
data.list?.map((item) => {
let gradeList = {
|
1b9bae95
梁保满
级联选择器调整,日志接口调整
|
835
|
value: item.gradeName,
|
e5ff81a1
阿宝
集团管理员接口
|
836
837
838
839
840
|
label: item.gradeName,
};
gradeList.children =
item.classList?.map((items) => {
return {
|
1365ef5e
梁保满
优化
|
841
|
value: Number(items.id),
|
e5ff81a1
阿宝
集团管理员接口
|
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
|
label: items.className,
};
}) || [];
return gradeList;
}) || [];
} else {
this.gradeList =
data.list?.map((item) => {
let gradeList = {
value: item.id,
label: item.regionName,
};
gradeList.children =
item.schoolList?.map((items) => {
return {
value: items.id,
label: items.schoolName,
};
}) || [];
return gradeList;
}) || [];
|
225a00b6
梁保满
飞书问题解决
|
863
|
this.gradeList = [...this.schoolAll, ...this.gradeList];
|
e5ff81a1
阿宝
集团管理员接口
|
864
|
}
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
865
866
867
868
869
870
871
|
}
} else {
this.$message.error(info);
}
},
// 基站统计数据
async stationReport() {
|
e5ff81a1
阿宝
集团管理员接口
|
872
873
874
875
876
|
const stationReport =
this.role != "ROLE_JITUAN"
? this.$request.stationReport
: this.$request.tenantStationReport;
const { data, status, info } = await stationReport();
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
877
878
879
880
881
|
if (status === 0) {
this.chartData =
data.list?.map((item) => {
return {
name:
|
e5ff81a1
阿宝
集团管理员接口
|
882
883
884
885
886
|
item.onlineStatus == "1"
? "在线"
: item.onlineStatus == 0
? "离线"
: "异常",
|
296f7c47
梁保满
集团管理员接口调整
|
887
888
|
value: item.total,
rate: item.rate,
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
889
890
|
};
}) || [];
|
225a00b6
梁保满
飞书问题解决
|
891
|
this.count = data.total || 0;
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
892
893
894
895
896
897
|
} else {
this.$message.error(info);
}
},
// 答题器统计数据
async keyboardReport() {
|
e5ff81a1
阿宝
集团管理员接口
|
898
899
900
901
902
|
const keyboardReport =
this.role != "ROLE_JITUAN"
? this.$request.keyboardReport
: this.$request.tenantKeyboardReport;
const { data, status, info } = await keyboardReport();
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
|
if (status === 0) {
this.chartData2 =
data.list?.map((item) => {
return {
name:
item.type == 1
? "1日内"
: item.type == 2
? "3日内"
: item.type == 3
? "7日内"
: item.type == 4
? "1月内"
: item.type == 5
? "3月内"
: "3月以上",
|
225a00b6
梁保满
飞书问题解决
|
919
920
|
count: item.total,
value: item.rate * 100,
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
921
922
|
};
}) || [];
|
225a00b6
梁保满
飞书问题解决
|
923
|
this.count = data.total || 0;
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
924
925
926
|
} else {
this.$message.error(info);
}
|
db11048f
阿宝
设备状态,学校管理
|
927
|
},
|
225a00b6
梁保满
飞书问题解决
|
928
929
930
|
setQuery() {
//整理传参
let query = {};
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
931
932
933
|
if (this.query.sn) {
query.sn = this.query.sn;
} else {
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
934
935
936
937
938
939
940
|
if (this.type == 1) {
this.query.onlineStatus !== ""
? (query.onlineStatus = this.query.onlineStatus)
: "";
} else if (this.type == 2) {
this.query.type !== "" ? (query.type = this.query.type) : "";
}
|
1b9bae95
梁保满
级联选择器调整,日志接口调整
|
941
942
943
|
if (this.role == "ROLE_JITUAN") {
query.regionIds = [];
query.schoolIds = [];
|
255e2506
梁保满
飞书bug及优化
|
944
945
|
query.gradeNames = [];
query.classIds = [];
|
1b9bae95
梁保满
级联选择器调整,日志接口调整
|
946
947
|
this.query.classId?.map((item) => {
if (item.length == 1) {
|
225a00b6
梁保满
飞书问题解决
|
948
|
if (!query.regionIds.includes(item[0])) {
|
1b9bae95
梁保满
级联选择器调整,日志接口调整
|
949
950
|
query.regionIds.push(item[0]);
}
|
255e2506
梁保满
飞书bug及优化
|
951
|
} else if (item.length == 2) {
|
1b9bae95
梁保满
级联选择器调整,日志接口调整
|
952
953
954
|
if (!query.schoolIds.includes(item[1])) {
query.schoolIds.push(item[1]);
}
|
255e2506
梁保满
飞书bug及优化
|
955
956
957
958
|
query.regionIds.includes(item[0])
? query.regionIds.remove(item[0])
: "";
} else if (item.length == 3) {
|
1365ef5e
梁保满
优化
|
959
960
961
|
if (!query.schoolIds.includes(item[1])) {
query.schoolIds.push(item[1]);
}
|
255e2506
梁保满
飞书bug及优化
|
962
963
|
if (!query.gradeNames.includes(item[2])) {
query.gradeNames.push(item[2]);
|
1b9bae95
梁保满
级联选择器调整,日志接口调整
|
964
|
}
|
255e2506
梁保满
飞书bug及优化
|
965
966
967
|
query.regionIds.includes(item[0])
? query.regionIds.remove(item[0])
: "";
|
255e2506
梁保满
飞书bug及优化
|
968
969
970
971
972
973
974
975
976
977
978
979
980
|
} else if (item.length == 4) {
if (!query.classIds.includes(item[3])) {
query.classIds.push(item[3]);
}
query.regionIds.includes(item[0])
? query.regionIds.remove(item[0])
: "";
query.schoolIds.includes(item[1])
? query.schoolIds.remove(item[1])
: "";
query.gradeNames.includes(item[2])
? query.gradeNames.remove(item[2])
: "";
|
1b9bae95
梁保满
级联选择器调整,日志接口调整
|
981
982
983
984
985
986
987
|
}
});
} else {
query.gradeNames = [];
query.classIds = [];
this.query.classId?.map((item) => {
if (item.length == 1) {
|
225a00b6
梁保满
飞书问题解决
|
988
|
if (!query.gradeNames.includes(item[0])) {
|
1b9bae95
梁保满
级联选择器调整,日志接口调整
|
989
990
991
992
993
994
995
996
997
998
999
1000
1001
|
query.gradeNames.push(item[0]);
}
} else {
if (!query.classIds.includes(item[1])) {
query.classIds.push(item[1]);
}
if (query.gradeNames.includes(item[0])) {
query.gradeNames.remove(item[0]);
}
}
});
}
delete query.classId;
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
1002
|
}
|
225a00b6
梁保满
飞书问题解决
|
1003
|
return query;
|
1b9bae95
梁保满
级联选择器调整,日志接口调整
|
1004
1005
1006
1007
|
},
// 设备列表信息
async _QueryData(isRef) {
this.loading = true;
|
225a00b6
梁保满
飞书问题解决
|
1008
|
let query = this.setQuery();
|
1b9bae95
梁保满
级联选择器调整,日志接口调整
|
1009
1010
|
if (isRef) {
this.page = 1;
|
b21d90ef
梁保满
长水登录
|
1011
|
}
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
1012
|
this.loading = true;
|
e5ff81a1
阿宝
集团管理员接口
|
1013
1014
1015
1016
|
const deviceList =
this.role != "ROLE_JITUAN"
? this.$request.deviceList
: this.$request.tenantDeviceList;
|
6d7bd862
梁保满
飞书bug
|
1017
|
this.tableData = [];
|
e5ff81a1
阿宝
集团管理员接口
|
1018
|
const { data, status, info } = await deviceList({
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
1019
1020
1021
1022
1023
1024
|
...query,
deviceType: this.type,
page: this.page,
size: this.size,
});
this.loading = false;
|
e5ff81a1
阿宝
集团管理员接口
|
1025
|
if (status == 0) {
|
225a00b6
梁保满
飞书问题解决
|
1026
|
this.tableData =
|
255e2506
梁保满
飞书bug及优化
|
1027
1028
1029
1030
1031
1032
|
(data?.list &&
data?.list.map((item) => {
item.upgradeFlag = item.upgradeFlag == 1 ? true : false;
return item;
})) ||
[];
|
225a00b6
梁保满
飞书问题解决
|
1033
|
this.total = data.count;
|
e3b0e3e7
梁保满
季度时间格式调整
|
1034
1035
1036
|
this.$nextTick(function () {
this.$refs.main.scrollTop = 0;
});
|
23a6dc5f
阿宝
学校管理相关接口简单对接
|
1037
1038
1039
|
} else {
this.$message.error(info);
}
|
db11048f
阿宝
设备状态,学校管理
|
1040
1041
1042
|
},
},
};
|
4c4f7640
梁保满
路由表,路由前端文件
|
1043
1044
|
</script>
|
db11048f
阿宝
设备状态,学校管理
|
1045
1046
|
<style lang="scss" scoped>
.page-content {
|
1365ef5e
梁保满
优化
|
1047
1048
1049
|
padding: 0 20px;
height: 100%;
overflow-y: auto;
|
db11048f
阿宝
设备状态,学校管理
|
1050
1051
|
}
.tab-box {
|
e3b0e3e7
梁保满
季度时间格式调整
|
1052
|
padding: 20px 0 12px;
|
db11048f
阿宝
设备状态,学校管理
|
1053
|
}
|
255e2506
梁保满
飞书bug及优化
|
1054
1055
|
.sel {
width: 100%;
|
6d7bd862
梁保满
飞书bug
|
1056
|
}
|
db11048f
阿宝
设备状态,学校管理
|
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
|
.content {
background: #f8f8f8;
border: 1px solid #e2e2e2;
border-radius: 10px;
overflow: hidden;
:deep(.fa-edit) {
width: 12px;
height: 12px;
&::before {
margin-left: 2px;
}
}
:deep(.fa-eye) {
width: 12px;
height: 12px;
&::before {
margin-left: 1px;
}
}
.chart-box {
display: flex;
overflow: hidden;
height: 240px;
border-bottom: 0.5px solid #e2e2e2;
.device-num {
width: 280px;
border-right: 0.5px solid #e2e2e2;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.p1 {
font-size: 28px;
}
}
.chart {
flex: 1;
height: 100%;
}
}
.table-box {
padding: 20px;
.answer-header {
padding: 0;
margin-bottom: 12px;
}
}
}
|
4c4f7640
梁保满
路由表,路由前端文件
|
1105
|
</style>
|