Commit 50c1482f3d21251754457747cb19150ca833d5cf

Authored by 梁保满
1 parent 7222c2eb

授课端日志下载。学生教师管理添加全部类型

src/api/apis/apis.js
@@ -881,4 +881,8 @@ export default { @@ -881,4 +881,8 @@ export default {
881 submitScore(data) { 881 submitScore(data) {
882 return defaltService(setUpUrls.submitScore, data) 882 return defaltService(setUpUrls.submitScore, data)
883 }, 883 },
  884 + // 提交即时测报表分数
  885 + deviceZipLogList(data) {
  886 + return defaltService(setUpUrls.deviceZipLogList, data)
  887 + },
884 }; 888 };
src/api/urls/apis.js
@@ -442,6 +442,8 @@ export default { @@ -442,6 +442,8 @@ export default {
442 deletePaperReport: "/api_html/teaching/deletePaperReport", 442 deletePaperReport: "/api_html/teaching/deletePaperReport",
443 //获取即时测报表学生名单和题目列表 443 //获取即时测报表学生名单和题目列表
444 listStudentsAndQuestions: "/api_html/teaching/listStudentsAndQuestions", 444 listStudentsAndQuestions: "/api_html/teaching/listStudentsAndQuestions",
  445 + //分页查询授课端日志列表
  446 + deviceZipLogList: "/api_html/school/manager/deviceZipLogList",
445 447
446 448
447 } 449 }
src/views/basic/ask/list.vue
@@ -123,20 +123,21 @@ @@ -123,20 +123,21 @@
123 @click="linkToDetail(scoped.row, 1)" 123 @click="linkToDetail(scoped.row, 1)"
124 ></el-button> 124 ></el-button>
125 </el-tooltip> 125 </el-tooltip>
126 - <el-tooltip 126 + <el-popconfirm
127 v-if="role != 'ROLE_BANZHUREN'" 127 v-if="role != 'ROLE_BANZHUREN'"
128 - effect="dark"  
129 - content="删除"  
130 - placement="top" 128 + title="确定删除吗?"
  129 + @confirm="remove(scoped.row)"
131 > 130 >
132 <el-button 131 <el-button
133 - type="primary" 132 + class="remove-test"
  133 + slot="reference"
  134 + type="danger"
134 circle 135 circle
135 size="mini" 136 size="mini"
136 icon="el-icon-delete" 137 icon="el-icon-delete"
137 - @click="remove(scoped.row)" 138 + :loading="scoped.row.loading"
138 ></el-button> 139 ></el-button>
139 - </el-tooltip> 140 + </el-popconfirm>
140 </template> 141 </template>
141 </el-table-column> 142 </el-table-column>
142 </el-table> 143 </el-table>
@@ -430,7 +431,9 @@ div::-webkit-scrollbar-thumb { @@ -430,7 +431,9 @@ div::-webkit-scrollbar-thumb {
430 .main { 431 .main {
431 height: 100%; 432 height: 100%;
432 } 433 }
433 - 434 +.remove-test {
  435 + margin-left: 10px;
  436 +}
434 .table-box { 437 .table-box {
435 padding: 16px; 438 padding: 16px;
436 border-radius: 5px; 439 border-radius: 5px;
src/views/basic/device/index.vue
@@ -7,16 +7,37 @@ @@ -7,16 +7,37 @@
7 <template slot="btns"> 7 <template slot="btns">
8 <template v-if="tableData.length"> 8 <template v-if="tableData.length">
9 <el-tooltip effect="dark" content="设备导出" placement="bottom"> 9 <el-tooltip effect="dark" content="设备导出" placement="bottom">
10 - <el-button type="primary" icon="fa fa-cloud-download" size="mini" plain circle @click="downExl"></el-button> 10 + <el-button
  11 + type="primary"
  12 + icon="fa fa-cloud-download"
  13 + size="mini"
  14 + plain
  15 + circle
  16 + @click="downExl"
  17 + ></el-button>
11 </el-tooltip> 18 </el-tooltip>
12 </template> 19 </template>
13 <template v-if="role == 'ROLE_XUEXIAO' && type == 1"> 20 <template v-if="role == 'ROLE_XUEXIAO' && type == 1">
14 <el-tooltip effect="dark" content="设备导入" placement="bottom"> 21 <el-tooltip effect="dark" content="设备导入" placement="bottom">
15 - <el-button type="primary" icon="el-icon-upload2" size="mini" plain circle @click="diaUp = true"></el-button> 22 + <el-button
  23 + type="primary"
  24 + icon="el-icon-upload2"
  25 + size="mini"
  26 + plain
  27 + circle
  28 + @click="diaUp = true"
  29 + ></el-button>
16 </el-tooltip> 30 </el-tooltip>
17 <el-tooltip effect="dark" content="添加基站" placement="bottom"> 31 <el-tooltip effect="dark" content="添加基站" placement="bottom">
18 - <el-button type="primary" icon="el-icon-receiving" size="mini" plain circle @click="addDev"></el-button>  
19 - </el-tooltip></template> 32 + <el-button
  33 + type="primary"
  34 + icon="el-icon-receiving"
  35 + size="mini"
  36 + plain
  37 + circle
  38 + @click="addDev"
  39 + ></el-button> </el-tooltip
  40 + ></template>
20 </template> 41 </template>
21 </back-box> 42 </back-box>
22 <div> 43 <div>
@@ -27,10 +48,16 @@ @@ -27,10 +48,16 @@
27 <el-radio-button :label="3">授课端管理</el-radio-button> 48 <el-radio-button :label="3">授课端管理</el-radio-button>
28 </el-radio-group> 49 </el-radio-group>
29 </div> 50 </div>
30 - <p v-show="(type == 1 && stationCount) || (type == 2 && clickerCount)" class="error-tips"> 51 + <p
  52 + v-show="(type == 1 && stationCount) || (type == 2 && clickerCount)"
  53 + class="error-tips"
  54 + >
31 有{{ 55 有{{
32 type == 1 ? stationCount : clickerCount 56 type == 1 ? stationCount : clickerCount
33 - }}条设备异常信息,<router-link :to="{ path: '/deviceError', query: { type: type } }">点击查看&gt;&gt;</router-link> 57 + }}条设备异常信息,<router-link
  58 + :to="{ path: '/deviceError', query: { type: type } }"
  59 + >点击查看&gt;&gt;</router-link
  60 + >
34 </p> 61 </p>
35 <div class="content"> 62 <div class="content">
36 <div v-show="type == 1"> 63 <div v-show="type == 1">
@@ -40,39 +67,97 @@ @@ -40,39 +67,97 @@
40 <p class="p2">基站数量</p> 67 <p class="p2">基站数量</p>
41 </div> 68 </div>
42 <div class="chart"> 69 <div class="chart">
43 - <pie-chart id="pieChart" :params="chartData" @clickPieChart="clickPieChart"></pie-chart> 70 + <pie-chart
  71 + id="pieChart"
  72 + :params="chartData"
  73 + @clickPieChart="clickPieChart"
  74 + ></pie-chart>
44 </div> 75 </div>
45 </div> 76 </div>
46 <div class="table-box"> 77 <div class="table-box">
47 <div class="answer-header"> 78 <div class="answer-header">
48 <div class="sel-box"> 79 <div class="sel-box">
49 - <el-cascader size="small" class="sel sel2" clearable placeholder="选择班级" v-model="query.classId"  
50 - :options="gradeList" :props="props" collapse-tags :show-all-levels="false"></el-cascader>  
51 - <el-select class="sel" v-model="query.onlineStatus" placeholder="选择状态" @change="_QueryData(true)">  
52 - <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"> 80 + <el-cascader
  81 + size="small"
  82 + class="sel sel2"
  83 + clearable
  84 + placeholder="选择班级"
  85 + v-model="query.classId"
  86 + :options="gradeList"
  87 + :props="props"
  88 + collapse-tags
  89 + :show-all-levels="false"
  90 + ></el-cascader>
  91 + <el-select
  92 + class="sel"
  93 + v-model="query.onlineStatus"
  94 + placeholder="选择状态"
  95 + @change="_QueryData(true)"
  96 + >
  97 + <el-option
  98 + v-for="item in statusList"
  99 + :key="item.value"
  100 + :label="item.label"
  101 + :value="item.value"
  102 + >
53 </el-option> 103 </el-option>
54 </el-select> 104 </el-select>
55 - <el-input placeholder="请输入设备编码" v-model="query.sn" class="input-with-select" clearable  
56 - @keyup.enter.native="_QueryData(true)">  
57 - <el-button slot="append" icon="el-icon-search" @click="_QueryData(true)"></el-button> 105 + <el-input
  106 + placeholder="请输入设备编码"
  107 + v-model="query.sn"
  108 + class="input-with-select"
  109 + clearable
  110 + @keyup.enter.native="_QueryData(true)"
  111 + >
  112 + <el-button
  113 + slot="append"
  114 + icon="el-icon-search"
  115 + @click="_QueryData(true)"
  116 + ></el-button>
58 </el-input> 117 </el-input>
59 - <el-button class="serach-box" round @click="_QueryData(true)">筛选</el-button> 118 + <el-button class="serach-box" round @click="_QueryData(true)"
  119 + >筛选</el-button
  120 + >
60 </div> 121 </div>
61 </div> 122 </div>
62 <p class="loading" v-if="!tableData.length && loading"> 123 <p class="loading" v-if="!tableData.length && loading">
63 加载中<i class="el-icon-loading"></i> 124 加载中<i class="el-icon-loading"></i>
64 </p> 125 </p>
65 <el-table v-else :data="tableData" border style="width: 100%"> 126 <el-table v-else :data="tableData" border style="width: 100%">
66 - <el-table-column prop="sn" label="设备编码" align="center"></el-table-column>  
67 - <el-table-column prop="frequency" label="频点" align="center" width="60"></el-table-column>  
68 - <el-table-column prop="pairingCode" label="配对码" align="center"></el-table-column>  
69 - <el-table-column v-if="role == 'ROLE_JITUAN'" prop="schoolName" label="学校" align="center"></el-table-column>  
70 - <el-table-column prop="gradeName" label="年级" align="center"><template slot-scope="scoped"> 127 + <el-table-column
  128 + prop="sn"
  129 + label="设备编码"
  130 + align="center"
  131 + ></el-table-column>
  132 + <el-table-column
  133 + prop="frequency"
  134 + label="频点"
  135 + align="center"
  136 + width="60"
  137 + ></el-table-column>
  138 + <el-table-column
  139 + prop="pairingCode"
  140 + label="配对码"
  141 + align="center"
  142 + ></el-table-column>
  143 + <el-table-column
  144 + v-if="role == 'ROLE_JITUAN'"
  145 + prop="schoolName"
  146 + label="学校"
  147 + align="center"
  148 + ></el-table-column>
  149 + <el-table-column prop="gradeName" label="年级" align="center"
  150 + ><template slot-scope="scoped">
71 <p v-for="(item, index) in scoped.row.classList" :key="index"> 151 <p v-for="(item, index) in scoped.row.classList" :key="index">
72 {{ item.gradeName }} 152 {{ item.gradeName }}
73 </p> 153 </p>
74 - </template></el-table-column>  
75 - <el-table-column prop="roomName" label="所在教室" align="center"></el-table-column> 154 + </template></el-table-column
  155 + >
  156 + <el-table-column
  157 + prop="roomName"
  158 + label="所在教室"
  159 + align="center"
  160 + ></el-table-column>
76 <el-table-column label="关联班级" align="center"> 161 <el-table-column label="关联班级" align="center">
77 <template slot-scope="scoped"> 162 <template slot-scope="scoped">
78 <p v-for="(item, index) in scoped.row.classList" :key="index"> 163 <p v-for="(item, index) in scoped.row.classList" :key="index">
@@ -80,31 +165,73 @@ @@ -80,31 +165,73 @@
80 </p> 165 </p>
81 </template> 166 </template>
82 </el-table-column> 167 </el-table-column>
83 - <el-table-column prop="otaVersionName" label="固件版本号" align="center"></el-table-column>  
84 - <el-table-column prop="onlineTime" label="最近上报" align="center" width="160"></el-table-column>  
85 - <el-table-column prop="createdTime" label="创建时间" align="center" width="160"></el-table-column>  
86 - <el-table-column label="状态" align="center" width="60"><template slot-scope="scope"> 168 + <el-table-column
  169 + prop="otaVersionName"
  170 + label="固件版本号"
  171 + align="center"
  172 + ></el-table-column>
  173 + <el-table-column
  174 + prop="onlineTime"
  175 + label="最近上报"
  176 + align="center"
  177 + width="160"
  178 + ></el-table-column>
  179 + <el-table-column
  180 + prop="createdTime"
  181 + label="创建时间"
  182 + align="center"
  183 + width="160"
  184 + ></el-table-column>
  185 + <el-table-column label="状态" align="center" width="60"
  186 + ><template slot-scope="scope">
87 {{ 187 {{
88 scope.row.onlineStatus == 1 188 scope.row.onlineStatus == 1
89 - ? "在线"  
90 - : scope.row.onlineStatus == 2 189 + ? "在线"
  190 + : scope.row.onlineStatus == 2
91 ? "异常" 191 ? "异常"
92 : "离线" 192 : "离线"
93 }} 193 }}
94 - </template></el-table-column>  
95 - <el-table-column label="操作" align="center" width="130"><template slot-scope="scoped">  
96 - <el-tooltip effect="dark" v-if="role != 'ROLE_JITUAN'" content="修改基站" placement="top">  
97 - <el-button type="primary" circle size="mini" icon="fa fa-edit" @click="edit(scoped.row)"></el-button> 194 + </template></el-table-column
  195 + >
  196 + <el-table-column label="操作" align="center" width="130"
  197 + ><template slot-scope="scoped">
  198 + <el-tooltip
  199 + effect="dark"
  200 + v-if="role != 'ROLE_JITUAN'"
  201 + content="修改基站"
  202 + placement="top"
  203 + >
  204 + <el-button
  205 + type="primary"
  206 + circle
  207 + size="mini"
  208 + icon="fa fa-edit"
  209 + @click="edit(scoped.row)"
  210 + ></el-button>
98 </el-tooltip> 211 </el-tooltip>
99 <el-tooltip effect="dark" content="日志" placement="top"> 212 <el-tooltip effect="dark" content="日志" placement="top">
100 - <el-button type="warning" circle size="mini" icon="fa fa-eye"  
101 - @click="linkTo(scoped.row, 1)"></el-button> 213 + <el-button
  214 + type="warning"
  215 + circle
  216 + size="mini"
  217 + icon="fa fa-eye"
  218 + @click="linkTo(scoped.row, 1)"
  219 + ></el-button>
102 </el-tooltip> 220 </el-tooltip>
103 - <el-popconfirm title="确定删除吗?" @confirm="_delStation($event, scoped.row)">  
104 - <el-button class="del" slot="reference" type="danger" circle size="mini"  
105 - icon="fa fa-trash-o"></el-button>  
106 - </el-popconfirm>  
107 - </template></el-table-column> 221 + <el-popconfirm
  222 + title="确定删除吗?"
  223 + @confirm="_delStation($event, scoped.row)"
  224 + >
  225 + <el-button
  226 + class="del"
  227 + slot="reference"
  228 + type="danger"
  229 + circle
  230 + size="mini"
  231 + icon="fa fa-trash-o"
  232 + ></el-button>
  233 + </el-popconfirm> </template
  234 + ></el-table-column>
108 </el-table> 235 </el-table>
109 </div> 236 </div>
110 </div> 237 </div>
@@ -115,61 +242,151 @@ @@ -115,61 +242,151 @@
115 <p class="p2">答题器数量</p> 242 <p class="p2">答题器数量</p>
116 </div> 243 </div>
117 <div class="chart"> 244 <div class="chart">
118 - <scatter-chart id="scatterChart" :params="chartData2"  
119 - @clickScatterChart="clickScatterChart"></scatter-chart> 245 + <scatter-chart
  246 + id="scatterChart"
  247 + :params="chartData2"
  248 + @clickScatterChart="clickScatterChart"
  249 + ></scatter-chart>
120 </div> 250 </div>
121 </div> 251 </div>
122 <div class="table-box"> 252 <div class="table-box">
123 <div class="answer-header"> 253 <div class="answer-header">
124 <div class="sel-box"> 254 <div class="sel-box">
125 - <el-cascader size="small" class="sel sel2" clearable placeholder="选择班级" v-model="query.classId"  
126 - :options="gradeList" :props="props" collapse-tags :show-all-levels="false"></el-cascader>  
127 - <el-select class="sel" v-model="query.type" placeholder="选择状态" @change="_QueryData(true)">  
128 - <el-option v-for="item in typeList" :key="item.value" :label="item.label" :value="item.value"> 255 + <el-cascader
  256 + size="small"
  257 + class="sel sel2"
  258 + clearable
  259 + placeholder="选择班级"
  260 + v-model="query.classId"
  261 + :options="gradeList"
  262 + :props="props"
  263 + collapse-tags
  264 + :show-all-levels="false"
  265 + ></el-cascader>
  266 + <el-select
  267 + class="sel"
  268 + v-model="query.type"
  269 + placeholder="选择状态"
  270 + @change="_QueryData(true)"
  271 + >
  272 + <el-option
  273 + v-for="item in typeList"
  274 + :key="item.value"
  275 + :label="item.label"
  276 + :value="item.value"
  277 + >
129 </el-option> 278 </el-option>
130 </el-select> 279 </el-select>
131 - <el-input placeholder="请输入设备编码" v-model="query.sn" class="input-with-select" clearable  
132 - @input.native="query.studentName = ''" @keyup.enter.native="_QueryData(true)">  
133 - <el-button slot="append" icon="el-icon-search" @click="_QueryData(true)"></el-button> 280 + <el-input
  281 + placeholder="请输入设备编码"
  282 + v-model="query.sn"
  283 + class="input-with-select"
  284 + clearable
  285 + @input.native="query.studentName = ''"
  286 + @keyup.enter.native="_QueryData(true)"
  287 + >
  288 + <el-button
  289 + slot="append"
  290 + icon="el-icon-search"
  291 + @click="_QueryData(true)"
  292 + ></el-button>
134 </el-input> 293 </el-input>
135 - <el-input placeholder="学生姓名" v-model="query.studentName" class="input-with-select" clearable  
136 - @input.native="query.sn = ''" @keyup.enter.native="_QueryData(true)">  
137 - <el-button slot="append" icon="el-icon-search" @click="_QueryData(true)"></el-button> 294 + <el-input
  295 + placeholder="学生姓名"
  296 + v-model="query.studentName"
  297 + class="input-with-select"
  298 + clearable
  299 + @input.native="query.sn = ''"
  300 + @keyup.enter.native="_QueryData(true)"
  301 + >
  302 + <el-button
  303 + slot="append"
  304 + icon="el-icon-search"
  305 + @click="_QueryData(true)"
  306 + ></el-button>
138 </el-input> 307 </el-input>
139 - <el-button class="serach-box" round @click="_QueryData(true)">筛选</el-button> 308 + <el-button class="serach-box" round @click="_QueryData(true)"
  309 + >筛选</el-button
  310 + >
140 </div> 311 </div>
141 </div> 312 </div>
142 <p class="loading" v-if="!tableData.length && loading"> 313 <p class="loading" v-if="!tableData.length && loading">
143 加载中<i class="el-icon-loading"></i> 314 加载中<i class="el-icon-loading"></i>
144 </p> 315 </p>
145 <el-table v-else :data="tableData" border style="width: 100%"> 316 <el-table v-else :data="tableData" border style="width: 100%">
146 - <el-table-column prop="sn" label="设备编码" align="center"></el-table-column>  
147 - <el-table-column label="学生信息" align="center"><template slot-scope="scoped">  
148 - <p v-for="(item, index) in scoped.row.studentList" :key="index"> 317 + <el-table-column
  318 + prop="sn"
  319 + label="设备编码"
  320 + align="center"
  321 + ></el-table-column>
  322 + <el-table-column label="学生信息" align="center"
  323 + ><template slot-scope="scoped">
  324 + <p
  325 + v-for="(item, index) in scoped.row.studentList"
  326 + :key="index"
  327 + >
149 {{ item.studentName }} 328 {{ item.studentName }}
150 </p> 329 </p>
151 - </template></el-table-column>  
152 - <el-table-column v-if="role == 'ROLE_JITUAN'" prop="schoolName" label="学校" align="center"></el-table-column>  
153 - <el-table-column v-if="role == 'ROLE_JITUAN'" prop="gradeName" label="年级" align="center"  
154 - width="120"><template slot-scope="scoped"> 330 + </template></el-table-column
  331 + >
  332 + <el-table-column
  333 + v-if="role == 'ROLE_JITUAN'"
  334 + prop="schoolName"
  335 + label="学校"
  336 + align="center"
  337 + ></el-table-column>
  338 + <el-table-column
  339 + v-if="role == 'ROLE_JITUAN'"
  340 + prop="gradeName"
  341 + label="年级"
  342 + align="center"
  343 + width="120"
  344 + ><template slot-scope="scoped">
155 <p v-for="(item, index) in scoped.row.classList" :key="index"> 345 <p v-for="(item, index) in scoped.row.classList" :key="index">
156 {{ item.gradeName }} 346 {{ item.gradeName }}
157 </p> 347 </p>
158 - </template></el-table-column>  
159 - <el-table-column prop="class" label="关联班级" align="center" width="160"> 348 + </template></el-table-column
  349 + >
  350 + <el-table-column
  351 + prop="class"
  352 + label="关联班级"
  353 + align="center"
  354 + width="160"
  355 + >
160 <template slot-scope="scoped"> 356 <template slot-scope="scoped">
161 <p v-for="(item, index) in scoped.row.classList" :key="index"> 357 <p v-for="(item, index) in scoped.row.classList" :key="index">
162 {{ item.className }} 358 {{ item.className }}
163 </p> 359 </p>
164 - </template></el-table-column>  
165 - <el-table-column prop="pairingCode" label="配对码" align="center"></el-table-column>  
166 - <el-table-column prop="answerTimes" label="答题次数" align="center"></el-table-column>  
167 - <el-table-column prop="latestReportTime" label="最后答题时间" align="center" width="160"></el-table-column>  
168 - <el-table-column label="操作" align="center" width="80"><template slot-scope="scoped"> 360 + </template></el-table-column
  361 + >
  362 + <el-table-column
  363 + prop="pairingCode"
  364 + label="配对码"
  365 + align="center"
  366 + ></el-table-column>
  367 + <el-table-column
  368 + prop="answerTimes"
  369 + label="答题次数"
  370 + align="center"
  371 + ></el-table-column>
  372 + <el-table-column
  373 + prop="latestReportTime"
  374 + label="最后答题时间"
  375 + align="center"
  376 + width="160"
  377 + ></el-table-column>
  378 + <el-table-column label="操作" align="center" width="80"
  379 + ><template slot-scope="scoped">
169 <el-tooltip effect="dark" content="日志" placement="top"> 380 <el-tooltip effect="dark" content="日志" placement="top">
170 - <el-button type="warning" circle size="mini" icon="fa fa-eye"  
171 - @click="linkTo(scoped.row, 2)"></el-button>  
172 - </el-tooltip> </template></el-table-column> 381 + <el-button
  382 + type="warning"
  383 + circle
  384 + size="mini"
  385 + icon="fa fa-eye"
  386 + @click="linkTo(scoped.row, 2)"
  387 + ></el-button>
  388 + </el-tooltip> </template
  389 + ></el-table-column>
173 </el-table> 390 </el-table>
174 </div> 391 </div>
175 </div> 392 </div>
@@ -177,12 +394,27 @@ @@ -177,12 +394,27 @@
177 <div class="table-box"> 394 <div class="table-box">
178 <div class="answer-header"> 395 <div class="answer-header">
179 <div class="sel-box"> 396 <div class="sel-box">
180 - <el-cascader size="small" class="sel sel2" clearable placeholder="选择班级" v-model="query.classId"  
181 - :options="gradeList" :props="props" collapse-tags :show-all-levels="false"  
182 - @change="_QueryData(false)"></el-cascader>  
183 - <span class="sel">共选择{{ selectionTabIds.length }}个授课端</span>  
184 - <el-button plan round @click="autoUpDate(false)">开启自动更新</el-button>  
185 - <el-button plan round @click="stopUpdate(false)">停止自动更新</el-button> 397 + <el-cascader
  398 + size="small"
  399 + class="sel sel2"
  400 + clearable
  401 + placeholder="选择班级"
  402 + v-model="query.classId"
  403 + :options="gradeList"
  404 + :props="props"
  405 + collapse-tags
  406 + :show-all-levels="false"
  407 + @change="_QueryData(false)"
  408 + ></el-cascader>
  409 + <span class="sel"
  410 + >共选择{{ selectionTabIds.length }}个授课端</span
  411 + >
  412 + <el-button plan round @click="autoUpDate(false)"
  413 + >开启自动更新</el-button
  414 + >
  415 + <el-button plan round @click="stopUpdate(false)"
  416 + >停止自动更新</el-button
  417 + >
186 </div> 418 </div>
187 <p class="upgrade-all" v-if="this.role == 'ROLE_XUEXIAO'"> 419 <p class="upgrade-all" v-if="this.role == 'ROLE_XUEXIAO'">
188 <span>全校更新:</span> 420 <span>全校更新:</span>
@@ -193,55 +425,118 @@ @@ -193,55 +425,118 @@
193 <p class="loading" v-if="!tableData.length && loading"> 425 <p class="loading" v-if="!tableData.length && loading">
194 加载中<i class="el-icon-loading"></i> 426 加载中<i class="el-icon-loading"></i>
195 </p> 427 </p>
196 - <el-table v-else ref="multipleTable" :data="tableData" border style="width: 100%"  
197 - @selection-change="handleSelectionChange"> 428 + <el-table
  429 + v-else
  430 + ref="multipleTable"
  431 + :data="tableData"
  432 + border
  433 + style="width: 100%"
  434 + @selection-change="handleSelectionChange"
  435 + >
198 <el-table-column type="selection" width="55"></el-table-column> 436 <el-table-column type="selection" width="55"></el-table-column>
199 <!-- <el-table-column prop="sn" label="设备编码" align="center"></el-table-column> --> 437 <!-- <el-table-column prop="sn" label="设备编码" align="center"></el-table-column> -->
200 - <el-table-column prop="class" label="关联班级" align="center" width="100"><template slot-scope="scoped"> 438 + <el-table-column
  439 + prop="class"
  440 + label="关联班级"
  441 + align="center"
  442 + width="100"
  443 + ><template slot-scope="scoped">
201 <p v-for="(item, index) in scoped.row.classList" :key="index"> 444 <p v-for="(item, index) in scoped.row.classList" :key="index">
202 {{ item.className }} 445 {{ item.className }}
203 </p> 446 </p>
204 - </template></el-table-column>  
205 - <el-table-column v-if="role == 'ROLE_JITUAN'" prop="schoolName" label="学校" align="center"></el-table-column>  
206 - <el-table-column v-if="role == 'ROLE_JITUAN'" prop="gradeName" label="年级" align="center"  
207 - width="80"><template slot-scope="scoped"> 447 + </template></el-table-column
  448 + >
  449 + <el-table-column
  450 + v-if="role == 'ROLE_JITUAN'"
  451 + prop="schoolName"
  452 + label="学校"
  453 + align="center"
  454 + ></el-table-column>
  455 + <el-table-column
  456 + v-if="role == 'ROLE_JITUAN'"
  457 + prop="gradeName"
  458 + label="年级"
  459 + align="center"
  460 + width="80"
  461 + ><template slot-scope="scoped">
208 <p v-for="(item, index) in scoped.row.classList" :key="index"> 462 <p v-for="(item, index) in scoped.row.classList" :key="index">
209 {{ item.gradeName }} 463 {{ item.gradeName }}
210 </p> 464 </p>
211 - </template></el-table-column>  
212 - <el-table-column prop="lastUpdateTime" label="最近更新" align="center"></el-table-column>  
213 - <el-table-column prop="osInfo" label="软件系统" align="center"></el-table-column>  
214 - <el-table-column prop="hardwareInfo" label="硬件环境" align="center"></el-table-column>  
215 - <el-table-column prop="otaVersionName" label="版本号" align="center" width="80"></el-table-column>  
216 - <el-table-column label="状态" align="center" width="80"><template slot-scope="scope"> 465 + </template></el-table-column
  466 + >
  467 + <el-table-column
  468 + prop="lastUpdateTime"
  469 + label="最近更新"
  470 + align="center"
  471 + ></el-table-column>
  472 + <el-table-column
  473 + prop="osInfo"
  474 + label="软件系统"
  475 + align="center"
  476 + ></el-table-column>
  477 + <el-table-column
  478 + prop="hardwareInfo"
  479 + label="硬件环境"
  480 + align="center"
  481 + ></el-table-column>
  482 + <el-table-column
  483 + prop="otaVersionName"
  484 + label="版本号"
  485 + align="center"
  486 + width="80"
  487 + ></el-table-column>
  488 + <el-table-column label="状态" align="center" width="80"
  489 + ><template slot-scope="scope">
217 {{ 490 {{
218 scope.row.onlineStatus == 1 491 scope.row.onlineStatus == 1
219 - ? "在线"  
220 - : scope.row.onlineStatus == 2 492 + ? "在线"
  493 + : scope.row.onlineStatus == 2
221 ? "异常" 494 ? "异常"
222 : "离线" 495 : "离线"
223 }} 496 }}
224 - </template></el-table-column> 497 + </template></el-table-column
  498 + >
225 <el-table-column label="日志记录" align="center" width="80"> 499 <el-table-column label="日志记录" align="center" width="80">
226 <template slot-scope="scope"> 500 <template slot-scope="scope">
227 - <el-link v-if="scope.row.content" type="primary" :href="scope.row.content" download>下载</el-link>  
228 - <span v-else>暂无记录</span> 501 + <el-link
  502 + type="primary"
  503 + @click="openLogia(scope.row.id)"
  504 + download
  505 + >查看</el-link
  506 + >
229 </template> 507 </template>
230 </el-table-column> 508 </el-table-column>
231 - <el-table-column label="自动更新" align="center" width="100"><template slot-scope="scoped">  
232 - <el-switch v-model="scoped.row.upgradeFlag" @change="changeUpdate($event, scoped.row, this)">  
233 - </el-switch> </template></el-table-column> 509 + <el-table-column label="自动更新" align="center" width="100"
  510 + ><template slot-scope="scoped">
  511 + <el-switch
  512 + v-model="scoped.row.upgradeFlag"
  513 + @change="changeUpdate($event, scoped.row, this)"
  514 + >
  515 + </el-switch> </template
  516 + ></el-table-column>
234 </el-table> 517 </el-table>
235 </div> 518 </div>
236 </div> 519 </div>
237 <div class="pagination-box"> 520 <div class="pagination-box">
238 - <el-pagination small="" layout="total,prev, pager, next" :hide-on-single-page="true" :total="total"  
239 - @current-change="changePage" :current-page="page" :page-size="size"> 521 + <el-pagination
  522 + small=""
  523 + layout="total,prev, pager, next"
  524 + :hide-on-single-page="true"
  525 + :total="total"
  526 + @current-change="changePage"
  527 + :current-page="page"
  528 + :page-size="size"
  529 + >
240 </el-pagination> 530 </el-pagination>
241 </div> 531 </div>
242 </div> 532 </div>
243 </div> 533 </div>
244 - <el-dialog :close-on-click-modal="false" title="设备导入" :visible.sync="diaUp" width="400"> 534 + <el-dialog
  535 + :close-on-click-modal="false"
  536 + title="设备导入"
  537 + :visible.sync="diaUp"
  538 + width="400"
  539 + >
245 <upload :url="url" @upSuccess="upSuccess" fileName="设备信息"> 540 <upload :url="url" @upSuccess="upSuccess" fileName="设备信息">
246 <p class="down-txt" slot="down"> 541 <p class="down-txt" slot="down">
247 通过Excel名单导入设备,需要提供设备编码,点击 542 通过Excel名单导入设备,需要提供设备编码,点击
@@ -252,33 +547,76 @@ @@ -252,33 +547,76 @@
252 <el-button @click="diaUp = false">取 消</el-button> 547 <el-button @click="diaUp = false">取 消</el-button>
253 </div> 548 </div>
254 </el-dialog> 549 </el-dialog>
255 - <el-dialog :close-on-click-modal="false" :title="isAdd ? '添加基站' : '修改基站'" :visible.sync="diaAnswerEqu" width="400"> 550 + <el-dialog
  551 + :close-on-click-modal="false"
  552 + :title="isAdd ? '添加基站' : '修改基站'"
  553 + :visible.sync="diaAnswerEqu"
  554 + width="400"
  555 + >
256 <el-form ref="forms" :model="form" :rules="formRules" label-width="140px"> 556 <el-form ref="forms" :model="form" :rules="formRules" label-width="140px">
257 <el-form-item label="设备编码:" prop="sn"> 557 <el-form-item label="设备编码:" prop="sn">
258 - <el-col :span="16"><el-input type="text" placeholder="输入设备编码" v-model.trim="form.sn" maxlength="30" size="45"  
259 - show-word-limit :disabled="!isAdd">  
260 - </el-input></el-col> 558 + <el-col :span="16"
  559 + ><el-input
  560 + type="text"
  561 + placeholder="输入设备编码"
  562 + v-model.trim="form.sn"
  563 + maxlength="30"
  564 + size="45"
  565 + show-word-limit
  566 + :disabled="!isAdd"
  567 + >
  568 + </el-input
  569 + ></el-col>
261 </el-form-item> 570 </el-form-item>
262 <el-form-item label="频点:" prop="frequency"> 571 <el-form-item label="频点:" prop="frequency">
263 - <el-col :span="16"><el-input type="text" placeholder="输入频点" v-model.trim="form.frequency" maxlength="30"  
264 - size="45" show-word-limit>  
265 - </el-input></el-col> 572 + <el-col :span="16"
  573 + ><el-input
  574 + type="text"
  575 + placeholder="输入频点"
  576 + v-model.trim="form.frequency"
  577 + maxlength="30"
  578 + size="45"
  579 + show-word-limit
  580 + >
  581 + </el-input
  582 + ></el-col>
266 </el-form-item> 583 </el-form-item>
267 <el-form-item label="配对码:" prop="pairingCode"> 584 <el-form-item label="配对码:" prop="pairingCode">
268 - <el-col :span="16"><el-input type="text" placeholder="输入配对码" v-model.trim="form.pairingCode" maxlength="30"  
269 - size="45" show-word-limit>  
270 - </el-input></el-col> 585 + <el-col :span="16"
  586 + ><el-input
  587 + type="text"
  588 + placeholder="输入配对码"
  589 + v-model.trim="form.pairingCode"
  590 + maxlength="30"
  591 + size="45"
  592 + show-word-limit
  593 + >
  594 + </el-input
  595 + ></el-col>
271 </el-form-item> 596 </el-form-item>
272 <el-form-item label="选择班级:" prop="classIds"> 597 <el-form-item label="选择班级:" prop="classIds">
273 <el-col :span="16"> 598 <el-col :span="16">
274 - <el-cascader class="sel" clearable v-model="form.classIds" :options="gradeList"  
275 - :show-all-levels="false"></el-cascader> 599 + <el-cascader
  600 + class="sel"
  601 + clearable
  602 + v-model="form.classIds"
  603 + :options="gradeList"
  604 + :show-all-levels="false"
  605 + ></el-cascader>
276 </el-col> 606 </el-col>
277 </el-form-item> 607 </el-form-item>
278 <el-form-item label="所在教室:"> 608 <el-form-item label="所在教室:">
279 - <el-col :span="16"><el-input type="text" placeholder="输入所在教室" v-model.trim="form.roomName" maxlength="30"  
280 - size="45" show-word-limit>  
281 - </el-input></el-col> 609 + <el-col :span="16"
  610 + ><el-input
  611 + type="text"
  612 + placeholder="输入所在教室"
  613 + v-model.trim="form.roomName"
  614 + maxlength="30"
  615 + size="45"
  616 + show-word-limit
  617 + >
  618 + </el-input
  619 + ></el-col>
282 </el-form-item> 620 </el-form-item>
283 </el-form> 621 </el-form>
284 <div class="dialog-footer" slot="footer"> 622 <div class="dialog-footer" slot="footer">
@@ -286,6 +624,39 @@ @@ -286,6 +624,39 @@
286 <el-button @click="diaAnswerEqu = false">取 消</el-button> 624 <el-button @click="diaAnswerEqu = false">取 消</el-button>
287 </div> 625 </div>
288 </el-dialog> 626 </el-dialog>
  627 + <el-dialog
  628 + :close-on-click-modal="false"
  629 + title="设备日志"
  630 + :visible.sync="diaLog"
  631 + width="400"
  632 + >
  633 + <div v-loading="logLoading">
  634 + <p class="down-p" v-for="item in logList">
  635 + {{ item.modifiedTime }} -
  636 + <el-link type="primary" :href="item.content" download>下载</el-link>
  637 + </p>
  638 + <el-empty
  639 + :image-size="100"
  640 + v-if="!logList.length && !logLoading"
  641 + description="暂无数据"
  642 + ></el-empty>
  643 + <div class="pagination-box">
  644 + <el-pagination
  645 + small=""
  646 + layout="total,prev, pager, next"
  647 + :hide-on-single-page="true"
  648 + :total="logTotal"
  649 + @current-change="logChangePage"
  650 + :current-page="logPage"
  651 + :page-size="logSize"
  652 + >
  653 + </el-pagination>
  654 + </div>
  655 + </div>
  656 + <div class="dialog-footer" slot="footer">
  657 + <el-button @click="diaUp = false">取 消</el-button>
  658 + </div>
  659 + </el-dialog>
289 </div> 660 </div>
290 </template> 661 </template>
291 662
@@ -384,6 +755,13 @@ export default { @@ -384,6 +755,13 @@ export default {
384 upgradeFlag: false, 755 upgradeFlag: false,
385 stationCount: 0, //异常基站数量 756 stationCount: 0, //异常基站数量
386 clickerCount: 0, //异常答题器数量 757 clickerCount: 0, //异常答题器数量
  758 + // 设备日志相关
  759 + diaLog: false,
  760 + logLoading: false,
  761 + logList: [],
  762 + logTotal: 0,
  763 + logPage: 1,
  764 + logSize: 20,
387 }; 765 };
388 }, 766 },
389 created() { 767 created() {
@@ -485,7 +863,7 @@ export default { @@ -485,7 +863,7 @@ export default {
485 }, 863 },
486 _delStation: _.debounce(async function (event, obj) { 864 _delStation: _.debounce(async function (event, obj) {
487 const { status, info } = await this.$request.deleteStation({ 865 const { status, info } = await this.$request.deleteStation({
488 - id: obj.id 866 + id: obj.id,
489 }); 867 });
490 if (status === 0) { 868 if (status === 0) {
491 this._QueryData(false); 869 this._QueryData(false);
@@ -507,14 +885,14 @@ export default { @@ -507,14 +885,14 @@ export default {
507 obj.name == "1日内" 885 obj.name == "1日内"
508 ? 1 886 ? 1
509 : obj.name == "3日内" 887 : obj.name == "3日内"
510 - ? 2  
511 - : obj.name == "7日内"  
512 - ? 3  
513 - : obj.name == "1月内"  
514 - ? 4  
515 - : obj.name == "3月内"  
516 - ? 5  
517 - : 6; 888 + ? 2
  889 + : obj.name == "7日内"
  890 + ? 3
  891 + : obj.name == "1月内"
  892 + ? 4
  893 + : obj.name == "3月内"
  894 + ? 5
  895 + : 6;
518 this.query.sn = ""; 896 this.query.sn = "";
519 this.query.classId = []; 897 this.query.classId = [];
520 this.page = 1; 898 this.page = 1;
@@ -559,7 +937,9 @@ export default { @@ -559,7 +937,9 @@ export default {
559 if (data && !data.code) { 937 if (data && !data.code) {
560 this._QueryData(false); 938 this._QueryData(false);
561 this.selectionTabIds = []; 939 this.selectionTabIds = [];
562 - this.$message.success(this.upgradeFlag ? "开启自动更新成功" : "关闭/停止自动更新成功"); 940 + this.$message.success(
  941 + this.upgradeFlag ? "开启自动更新成功" : "关闭/停止自动更新成功"
  942 + );
563 } else { 943 } else {
564 this.$message.error(data.info); 944 this.$message.error(data.info);
565 } 945 }
@@ -661,13 +1041,63 @@ export default { @@ -661,13 +1041,63 @@ export default {
661 this.type == 1 1041 this.type == 1
662 ? "基站管理报表.xlsx" 1042 ? "基站管理报表.xlsx"
663 : this.type == 2 1043 : this.type == 2
664 - ? "答题器报表.xlsx"  
665 - : "授课端报表.xlsx"; 1044 + ? "答题器报表.xlsx"
  1045 + : "授课端报表.xlsx";
666 downloadFile(txt, blob); 1046 downloadFile(txt, blob);
667 } else { 1047 } else {
668 this.$message.error(data.info); 1048 this.$message.error(data.info);
669 } 1049 }
670 }, 1050 },
  1051 + //授课端日志列表
  1052 + async openLogia(id) {
  1053 + this.diaLog = true;
  1054 + this.page = 1;
  1055 + this.logLoading = true;
  1056 + const { data, info, status } = await this.$request.deviceZipLogList({
  1057 + id: id,
  1058 + page: this.logPage,
  1059 + size: this.logSize,
  1060 + });
  1061 + this.logLoading = false;
  1062 + if (status == 0) {
  1063 + this.logList = data?.list || [];
  1064 + } else {
  1065 + this.$message.error(info);
  1066 + }
  1067 + },
  1068 + async downloadLog() {
  1069 + if (this.exportLoading == true) return;
  1070 + let query = this.setQuery();
  1071 + const exportDevice =
  1072 + this.role != "ROLE_JITUAN"
  1073 + ? this.$request.exportDevice
  1074 + : this.$request.tenantExportDevice;
  1075 +
  1076 + this.exportLoading = true;
  1077 + const data = await exportDevice({
  1078 + ...query,
  1079 + deviceType: this.type,
  1080 + });
  1081 + this.exportLoading = false;
  1082 + if (data && !data.code) {
  1083 + let blob = new Blob([data], {
  1084 + type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
  1085 + });
  1086 + let txt =
  1087 + this.type == 1
  1088 + ? "基站管理报表.xlsx"
  1089 + : this.type == 2
  1090 + ? "答题器报表.xlsx"
  1091 + : "授课端报表.xlsx";
  1092 + downloadFile(txt, blob);
  1093 + } else {
  1094 + this.$message.error(data.info);
  1095 + }
  1096 + },
  1097 + logChangePage(page) {
  1098 + this.logPage = page;
  1099 + this.downloadLog();
  1100 + },
671 1101
672 // 修改基站 1102 // 修改基站
673 setAnswerEqu() { 1103 setAnswerEqu() {
@@ -773,8 +1203,8 @@ export default { @@ -773,8 +1203,8 @@ export default {
773 item.onlineStatus == "1" 1203 item.onlineStatus == "1"
774 ? "在线" 1204 ? "在线"
775 : item.onlineStatus == 0 1205 : item.onlineStatus == 0
776 - ? "离线"  
777 - : "异常", 1206 + ? "离线"
  1207 + : "异常",
778 value: item.total, 1208 value: item.total,
779 rate: item.rate, 1209 rate: item.rate,
780 }; 1210 };
@@ -799,14 +1229,14 @@ export default { @@ -799,14 +1229,14 @@ export default {
799 item.type == 1 1229 item.type == 1
800 ? "1日内" 1230 ? "1日内"
801 : item.type == 2 1231 : item.type == 2
802 - ? "3日内"  
803 - : item.type == 3  
804 - ? "7日内"  
805 - : item.type == 4  
806 - ? "1月内"  
807 - : item.type == 5  
808 - ? "3月内"  
809 - : "3月以上", 1232 + ? "3日内"
  1233 + : item.type == 3
  1234 + ? "7日内"
  1235 + : item.type == 4
  1236 + ? "1月内"
  1237 + : item.type == 5
  1238 + ? "3月内"
  1239 + : "3月以上",
810 count: item.total, 1240 count: item.total,
811 value: item.rate * 100, 1241 value: item.rate * 100,
812 }; 1242 };
@@ -978,7 +1408,10 @@ export default { @@ -978,7 +1408,10 @@ export default {
978 .down { 1408 .down {
979 padding: 0 0 16px 20px; 1409 padding: 0 0 16px 20px;
980 } 1410 }
981 - 1411 +.down-p{
  1412 + line-height:24px;
  1413 + display: flex;
  1414 +}
982 .error-tips { 1415 .error-tips {
983 margin-bottom: 12px; 1416 margin-bottom: 12px;
984 } 1417 }
src/views/basic/setUp/clazz.vue
@@ -25,7 +25,12 @@ @@ -25,7 +25,12 @@
25 @click="exportTeacherExl" 25 @click="exportTeacherExl"
26 ></el-button> 26 ></el-button>
27 </el-tooltip> 27 </el-tooltip>
28 - <el-tooltip effect="dark" content="分班" placement="bottom"> 28 + <el-tooltip
  29 + effect="dark"
  30 + content="分班"
  31 + placement="bottom"
  32 + v-show="type == 0"
  33 + >
29 <img 34 <img
30 @click="toArchived" 35 @click="toArchived"
31 src="../../../assets/images/fenban.png" 36 src="../../../assets/images/fenban.png"
src/views/basic/setUp/student.vue
@@ -45,6 +45,7 @@ @@ -45,6 +45,7 @@
45 @change="changeGrade(query.grade)" 45 @change="changeGrade(query.grade)"
46 placeholder="选择类型" 46 placeholder="选择类型"
47 > 47 >
  48 + <el-option label="全部" value=""></el-option>
48 <el-option label="行政班" :value="0"></el-option> 49 <el-option label="行政班" :value="0"></el-option>
49 <el-option label="教学班" :value="1"></el-option> 50 <el-option label="教学班" :value="1"></el-option>
50 </el-select> 51 </el-select>
@@ -634,12 +635,14 @@ export default { @@ -634,12 +635,14 @@ export default {
634 serQuery(type) { 635 serQuery(type) {
635 let query = {}; 636 let query = {};
636 if (type == 1) { 637 if (type == 1) {
  638 + this.query.classType = "";
637 this.query.classId = ""; 639 this.query.classId = "";
638 this.query.studentCode = ""; 640 this.query.studentCode = "";
639 this.query.grade = ""; 641 this.query.grade = "";
640 query.studentName = this.query.studentName; 642 query.studentName = this.query.studentName;
641 query.status = 9; 643 query.status = 9;
642 } else if (type == 2) { 644 } else if (type == 2) {
  645 + this.query.classType = "";
643 this.query.classId = ""; 646 this.query.classId = "";
644 this.query.studentName = ""; 647 this.query.studentName = "";
645 this.query.grade = ""; 648 this.query.grade = "";
src/views/basic/setUp/teacher.vue
@@ -46,6 +46,7 @@ @@ -46,6 +46,7 @@
46 @change="changeType" 46 @change="changeType"
47 placeholder="选择类型" 47 placeholder="选择类型"
48 > 48 >
  49 + <el-option disabled label="全部" value=""></el-option>
49 <el-option label="行政班" :value="0"></el-option> 50 <el-option label="行政班" :value="0"></el-option>
50 <el-option label="教学班" :value="1"></el-option> 51 <el-option label="教学班" :value="1"></el-option>
51 </el-select> 52 </el-select>
@@ -899,12 +900,14 @@ export default { @@ -899,12 +900,14 @@ export default {
899 this.query.phone = ""; 900 this.query.phone = "";
900 this.query.type = 0; 901 this.query.type = 0;
901 } else if (type == 2) { 902 } else if (type == 2) {
  903 + this.query.classType = "";
902 this.query.type = 9; 904 this.query.type = 9;
903 this.query.phone = ""; 905 this.query.phone = "";
904 this.query.gradeClassSub = []; 906 this.query.gradeClassSub = [];
905 query.teacherName = this.query.teacherName; 907 query.teacherName = this.query.teacherName;
906 query.type = this.query.type; 908 query.type = this.query.type;
907 } else if (type == 3) { 909 } else if (type == 3) {
  910 + this.query.classType = "";
908 this.query.type = 9; 911 this.query.type = 9;
909 this.query.teacherName = ""; 912 this.query.teacherName = "";
910 this.query.gradeClassSub = []; 913 this.query.gradeClassSub = [];