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