Commit 280e7dfebb3e03e369f6e9dabf1048bb4ac09a36
1 parent
fc9cbff6
设备日志显示选项
Showing
2 changed files
with
19 additions
and
11 deletions
src/views/device/index.vue
... | ... | @@ -572,7 +572,7 @@ export default { |
572 | 572 | pairingCode: [ |
573 | 573 | { required: true, message: "请输入配对码", trigger: "blur" }, |
574 | 574 | ], |
575 | - // classIds: [{ required: true, message: "请选择班级", trigger: "blur" }], | |
575 | + classIds: [{ required: true, message: "请选择班级", trigger: "blur" }], | |
576 | 576 | }, |
577 | 577 | tableData: [], |
578 | 578 | total: 0, | ... | ... |
src/views/device/log.vue
... | ... | @@ -10,9 +10,6 @@ |
10 | 10 | <el-descriptions-item label="设备编码">{{ |
11 | 11 | device.sn |
12 | 12 | }}</el-descriptions-item> |
13 | - <el-descriptions-item label="电量">{{ | |
14 | - device.electricity | |
15 | - }}</el-descriptions-item> | |
16 | 13 | <el-descriptions-item label="配对码">{{ |
17 | 14 | device.pairingCode |
18 | 15 | }}</el-descriptions-item> |
... | ... | @@ -21,12 +18,18 @@ |
21 | 18 | item.className |
22 | 19 | }}</span> |
23 | 20 | </el-descriptions-item> |
24 | - <el-descriptions-item label="最后答题时间">{{ | |
25 | - device.latestReportTime | |
21 | + <el-descriptions-item label="操作时间">{{ | |
22 | + device.modifiedTime | |
26 | 23 | }}</el-descriptions-item> |
27 | - <el-descriptions-item label="答题次数">{{ | |
24 | + <el-descriptions-item v-if="type == 2" label="答题次数">{{ | |
28 | 25 | device.answerTimes |
29 | 26 | }}</el-descriptions-item> |
27 | + <el-descriptions-item v-if="type == 1" label="固件版本号">{{ | |
28 | + device.otaVersionName | |
29 | + }}</el-descriptions-item> | |
30 | + <el-descriptions-item v-if="type == 2" label="电量">{{ | |
31 | + device.electricity | |
32 | + }}</el-descriptions-item> | |
30 | 33 | </el-descriptions> |
31 | 34 | </div> |
32 | 35 | <div class="answer-header"> |
... | ... | @@ -64,7 +67,9 @@ |
64 | 67 | >本季度</span |
65 | 68 | > |
66 | 69 | </p> |
67 | - <el-button type="primary" class="serach-box" round @click="_QueryData">筛选</el-button> | |
70 | + <el-button type="primary" class="serach-box" round @click="_QueryData" | |
71 | + >筛选</el-button | |
72 | + > | |
68 | 73 | </div> |
69 | 74 | </div> |
70 | 75 | <div class="table-box"> |
... | ... | @@ -111,6 +116,7 @@ import { formatDate } from "utils"; |
111 | 116 | export default { |
112 | 117 | data() { |
113 | 118 | return { |
119 | + type: 1, | |
114 | 120 | id: "", |
115 | 121 | date: "", //今天-昨天-本周 |
116 | 122 | query: { |
... | ... | @@ -125,8 +131,9 @@ export default { |
125 | 131 | electricity: "", |
126 | 132 | pairingCode: "", |
127 | 133 | classList: [], |
128 | - latestReportTime: "", | |
134 | + modifiedTime: "", | |
129 | 135 | answerTimes: "", |
136 | + otaVersionName:"" | |
130 | 137 | }, |
131 | 138 | total: 0, |
132 | 139 | page: 1, |
... | ... | @@ -135,6 +142,7 @@ export default { |
135 | 142 | }, |
136 | 143 | created() { |
137 | 144 | this.id = this.$route.query.id; |
145 | + this.type = this.$route.query.type; | |
138 | 146 | this._QueryDetail(); |
139 | 147 | this.setDate(1); |
140 | 148 | let startDay = this.query?.startDay; |
... | ... | @@ -302,7 +310,7 @@ export default { |
302 | 310 | .table-box { |
303 | 311 | padding: 0 20px; |
304 | 312 | } |
305 | -.serach-box{ | |
306 | - margin-left:20px; | |
313 | +.serach-box { | |
314 | + margin-left: 20px; | |
307 | 315 | } |
308 | 316 | </style> |
309 | 317 | \ No newline at end of file | ... | ... |