Commit 225a00b6da1e0b3d38b5af796a70e130ca59e828
1 parent
296f7c47
飞书问题解决
Showing
20 changed files
with
376 additions
and
178 deletions
src/api/apis/apis.js
@@ -266,6 +266,14 @@ export default { | @@ -266,6 +266,14 @@ export default { | ||
266 | data, | 266 | data, |
267 | }); | 267 | }); |
268 | }, | 268 | }, |
269 | + // 设备使用分析 | ||
270 | + usageAnalysis(data) { | ||
271 | + return service({ | ||
272 | + url: setUpUrls.usageAnalysis, | ||
273 | + method: "POST", | ||
274 | + data, | ||
275 | + }); | ||
276 | + }, | ||
269 | 277 | ||
270 | /** | 278 | /** |
271 | * 集团管理员-学校管理 | 279 | * 集团管理员-学校管理 |
src/api/axios.js
@@ -83,7 +83,7 @@ service.interceptors.response.use( | @@ -83,7 +83,7 @@ service.interceptors.response.use( | ||
83 | router.push({ path: "/login" }); | 83 | router.push({ path: "/login" }); |
84 | if (res.message.includes("不存在")) { | 84 | if (res.message.includes("不存在")) { |
85 | Message({ | 85 | Message({ |
86 | - message: res.message, | 86 | + message: data.info, |
87 | type: "error", | 87 | type: "error", |
88 | duration: 3 * 1000, | 88 | duration: 3 * 1000, |
89 | }); | 89 | }); |
src/api/urls/apis.js
@@ -64,6 +64,8 @@ export default { | @@ -64,6 +64,8 @@ export default { | ||
64 | addAppConfig: "/api_html/school/manager/addAppConfig", | 64 | addAppConfig: "/api_html/school/manager/addAppConfig", |
65 | // 修改授课端应用配置 | 65 | // 修改授课端应用配置 |
66 | updateAppConfig: "/api_html/school/manager/updateAppConfig", | 66 | updateAppConfig: "/api_html/school/manager/updateAppConfig", |
67 | + // 设备使用分析 | ||
68 | + usageAnalysis: "/api_html/school/manager/usageAnalysis", | ||
67 | // 发卡记录 | 69 | // 发卡记录 |
68 | cardList: "/api_html/school/manager/cardList", | 70 | cardList: "/api_html/school/manager/cardList", |
69 | 71 |
src/assets/css/index.scss
src/components/charts/pieChart.vue
@@ -38,7 +38,7 @@ export default { | @@ -38,7 +38,7 @@ export default { | ||
38 | trigger: "item", | 38 | trigger: "item", |
39 | confine: true, | 39 | confine: true, |
40 | formatter(v) { | 40 | formatter(v) { |
41 | - return `${v.marker} ${v.name}-${v.value}` | 41 | + return `${v.marker} ${v.name}:${v.value}` |
42 | }, | 42 | }, |
43 | }, | 43 | }, |
44 | legend: { | 44 | legend: { |
@@ -65,7 +65,8 @@ export default { | @@ -65,7 +65,8 @@ export default { | ||
65 | normal: { | 65 | normal: { |
66 | formatter(v) { | 66 | formatter(v) { |
67 | console.log(v) | 67 | console.log(v) |
68 | - return v.name + v.data.rate + "%"; | 68 | + let rate = v.data.rate*100 |
69 | + return v.name + rate + "%"; | ||
69 | }, | 70 | }, |
70 | }, | 71 | }, |
71 | }, | 72 | }, |
src/components/charts/scatterChart.vue
@@ -99,13 +99,6 @@ export default { | @@ -99,13 +99,6 @@ export default { | ||
99 | shadowColor: "rgba(25, 100, 150, 0.5)", | 99 | shadowColor: "rgba(25, 100, 150, 0.5)", |
100 | shadowOffsetY: 5, | 100 | shadowOffsetY: 5, |
101 | }, | 101 | }, |
102 | - label: { | ||
103 | - show: true, | ||
104 | - position: "top", | ||
105 | - formatter: function (params) { | ||
106 | - return params.data.count ? params.data.count : ""; | ||
107 | - }, | ||
108 | - }, | ||
109 | selectedMode: true, | 102 | selectedMode: true, |
110 | hoverAnimation: true, | 103 | hoverAnimation: true, |
111 | avoidLabelOverlap: true, | 104 | avoidLabelOverlap: true, |
src/views/analysis/index.vue
@@ -13,6 +13,7 @@ | @@ -13,6 +13,7 @@ | ||
13 | v-model="query.regionId" | 13 | v-model="query.regionId" |
14 | placeholder="选择区域" | 14 | placeholder="选择区域" |
15 | @change="_QueryData" | 15 | @change="_QueryData" |
16 | + v-if="role == 'ROLE_JITUAN'" | ||
16 | > | 17 | > |
17 | <el-option | 18 | <el-option |
18 | v-for="item in gradeList" | 19 | v-for="item in gradeList" |
@@ -22,6 +23,21 @@ | @@ -22,6 +23,21 @@ | ||
22 | > | 23 | > |
23 | </el-option> | 24 | </el-option> |
24 | </el-select> | 25 | </el-select> |
26 | + <el-select | ||
27 | + v-else | ||
28 | + class="sel" | ||
29 | + v-model="query.gradeName" | ||
30 | + placeholder="选择年级" | ||
31 | + @change="_QueryData" | ||
32 | + > | ||
33 | + <el-option | ||
34 | + v-for="item in gradeList" | ||
35 | + :key="item.label" | ||
36 | + :label="item.label" | ||
37 | + :value="item.label" | ||
38 | + > | ||
39 | + </el-option> | ||
40 | + </el-select> | ||
25 | <div class="d1"> | 41 | <div class="d1"> |
26 | <el-date-picker | 42 | <el-date-picker |
27 | v-model="query.startDay" | 43 | v-model="query.startDay" |
@@ -77,7 +93,13 @@ | @@ -77,7 +93,13 @@ | ||
77 | align="center" | 93 | align="center" |
78 | v-for="(item, index) in dataList" | 94 | v-for="(item, index) in dataList" |
79 | :key="index" | 95 | :key="index" |
80 | - :label="item.schoolName||item.gradeName" | 96 | + :label=" |
97 | + role == 'ROLE_JITUAN' | ||
98 | + ? item.schoolName || item.gradeName | ||
99 | + : query.gradeName == '' | ||
100 | + ? item.gradeName | ||
101 | + : item.className | ||
102 | + " | ||
81 | > | 103 | > |
82 | <template> | 104 | <template> |
83 | <el-table-column | 105 | <el-table-column |
@@ -114,6 +136,7 @@ export default { | @@ -114,6 +136,7 @@ export default { | ||
114 | query: { | 136 | query: { |
115 | //搜索条件 | 137 | //搜索条件 |
116 | regionId: "", | 138 | regionId: "", |
139 | + gradeName: "", | ||
117 | startDay: "", | 140 | startDay: "", |
118 | endDay: "", | 141 | endDay: "", |
119 | day: "", | 142 | day: "", |
@@ -219,16 +242,15 @@ export default { | @@ -219,16 +242,15 @@ export default { | ||
219 | query[key] = this.query[key]; | 242 | query[key] = this.query[key]; |
220 | } | 243 | } |
221 | } | 244 | } |
222 | - // if (this.role == "ROLE_JITUAN") { | ||
223 | - // if (this.query.regionId == "") { | ||
224 | - // this.type = 1; | ||
225 | - // } else { | ||
226 | - // this.type = 2; | ||
227 | - // } | ||
228 | - // } | 245 | + if (this.role == "ROLE_JITUAN") { |
246 | + delete query.gradeName; | ||
247 | + } else { | ||
248 | + delete query.regionId; | ||
249 | + } | ||
250 | + this.tableData=[] | ||
229 | const Contrast = | 251 | const Contrast = |
230 | this.role != "ROLE_JITUAN" | 252 | this.role != "ROLE_JITUAN" |
231 | - ? this.$request.gradeContrast | 253 | + ? this.$request.usageAnalysis |
232 | : this.type == 1 | 254 | : this.type == 1 |
233 | ? this.$request.schoolContrast | 255 | ? this.$request.schoolContrast |
234 | : this.$request.gradeContrast; | 256 | : this.$request.gradeContrast; |
@@ -237,18 +259,78 @@ export default { | @@ -237,18 +259,78 @@ export default { | ||
237 | }); | 259 | }); |
238 | this.loading = false; | 260 | this.loading = false; |
239 | if (status === 0) { | 261 | if (status === 0) { |
240 | - this.tableData = data.map((item)=>{ | ||
241 | - let params={} | ||
242 | - item.dataList.map((items,index)=>{ | ||
243 | - params['examCount'+index] = items.examCount | ||
244 | - params['periodCount'+index] = items.periodCount | ||
245 | - }) | 262 | + let dataIdsList = [], |
263 | + dataList = []; | ||
264 | + | ||
265 | + data.map((item) => { | ||
266 | + item.dataList.map((items) => { | ||
267 | + if (this.role == "ROLE_JITUAN") { | ||
268 | + if (this.type == 1) { | ||
269 | + if (!dataIdsList.includes(items.schoolId)) { | ||
270 | + dataIdsList.push(items.schoolId); | ||
271 | + dataList.push(items); | ||
272 | + } | ||
273 | + } else if (this.type == 2) { | ||
274 | + if (!dataIdsList.includes(items.grade)) { | ||
275 | + dataIdsList.push(items.grade); | ||
276 | + dataList.push(items); | ||
277 | + } | ||
278 | + } | ||
279 | + } else { | ||
280 | + if (this.query.gradeName == "") { | ||
281 | + if (!dataIdsList.includes(items.grade)) { | ||
282 | + dataIdsList.push(items.grade); | ||
283 | + dataList.push(items); | ||
284 | + } | ||
285 | + } else if (this.query.gradeName) { | ||
286 | + if (!dataIdsList.includes(items.classId)) { | ||
287 | + dataIdsList.push(items.classId); | ||
288 | + dataList.push(items); | ||
289 | + } | ||
290 | + } | ||
291 | + } | ||
292 | + }); | ||
293 | + }); | ||
294 | + console.log(dataList); | ||
295 | + this.tableData = data.map((item) => { | ||
296 | + let params = {}; | ||
297 | + dataIdsList.map((ids, index) => { | ||
298 | + params["examCount" + index] = "--"; | ||
299 | + params["periodCount" + index] = "--"; | ||
300 | + item.dataList.map((items) => { | ||
301 | + if (this.role == "ROLE_JITUAN") { | ||
302 | + if (this.type == 1) { | ||
303 | + if (items.schoolId == ids) { | ||
304 | + params["examCount" + index] = items.examCount; | ||
305 | + params["periodCount" + index] = items.periodCount; | ||
306 | + } | ||
307 | + } else if (this.type == 2) { | ||
308 | + if (items.grade == ids) { | ||
309 | + params["examCount" + index] = items.examCount; | ||
310 | + params["periodCount" + index] = items.periodCount; | ||
311 | + } | ||
312 | + } | ||
313 | + } else { | ||
314 | + if (this.query.gradeName == "") { | ||
315 | + if (items.grade == ids) { | ||
316 | + params["examCount" + index] = items.examCount; | ||
317 | + params["periodCount" + index] = items.periodCount; | ||
318 | + } | ||
319 | + } else if (this.query.gradeName) { | ||
320 | + if (items.classId == ids) { | ||
321 | + params["examCount" + index] = items.examCount; | ||
322 | + params["periodCount" + index] = items.periodCount; | ||
323 | + } | ||
324 | + } | ||
325 | + } | ||
326 | + }); | ||
327 | + }); | ||
246 | return { | 328 | return { |
247 | - subjectName:item.subjectName, | 329 | + subjectName: item.subjectName, |
248 | ...params, | 330 | ...params, |
249 | - } | 331 | + }; |
250 | }); | 332 | }); |
251 | - this.dataList = data[0]?.dataList | 333 | + this.dataList = dataList; |
252 | } else { | 334 | } else { |
253 | this.$message.error(info); | 335 | this.$message.error(info); |
254 | } | 336 | } |
src/views/ask/index.vue
@@ -25,7 +25,6 @@ | @@ -25,7 +25,6 @@ | ||
25 | v-if="role == 'ROLE_BANZHUREN'" | 25 | v-if="role == 'ROLE_BANZHUREN'" |
26 | class="sel" | 26 | class="sel" |
27 | multiple | 27 | multiple |
28 | - collapse-tags | ||
29 | v-model="query.subjectId" | 28 | v-model="query.subjectId" |
30 | placeholder="选择科目" | 29 | placeholder="选择科目" |
31 | @change="_QueryData" | 30 | @change="_QueryData" |
src/views/card/index.vue
@@ -8,9 +8,8 @@ | @@ -8,9 +8,8 @@ | ||
8 | <div class="page-content"> | 8 | <div class="page-content"> |
9 | <div class="answer-header"> | 9 | <div class="answer-header"> |
10 | <div class="sel-box"> | 10 | <div class="sel-box"> |
11 | - <el-cascader | 11 | + <el-cascader size="small" |
12 | class="sel" | 12 | class="sel" |
13 | - collapse-tags | ||
14 | clearable | 13 | clearable |
15 | placeholder="选择班级" | 14 | placeholder="选择班级" |
16 | v-model="query.classId" | 15 | v-model="query.classId" |
src/views/device/index.vue
@@ -4,7 +4,10 @@ | @@ -4,7 +4,10 @@ | ||
4 | <template slot="title"> | 4 | <template slot="title"> |
5 | <span>设备管理</span> | 5 | <span>设备管理</span> |
6 | </template> | 6 | </template> |
7 | - <template slot="btns" v-if="type == 1 && school !== '长水'"> | 7 | + <template |
8 | + slot="btns" | ||
9 | + v-if="role != 'ROLE_JITUAN' && type == 1 && school !== '长水'" | ||
10 | + > | ||
8 | <el-tooltip effect="dark" content="设备导入" placement="bottom"> | 11 | <el-tooltip effect="dark" content="设备导入" placement="bottom"> |
9 | <el-button | 12 | <el-button |
10 | type="primary" | 13 | type="primary" |
@@ -37,9 +40,9 @@ | @@ -37,9 +40,9 @@ | ||
37 | </div> | 40 | </div> |
38 | <div class="content"> | 41 | <div class="content"> |
39 | <div v-if="type == 1"> | 42 | <div v-if="type == 1"> |
40 | - <div class="chart-box"> | 43 | + <div class="chart-box" v-if="count"> |
41 | <div class="device-num"> | 44 | <div class="device-num"> |
42 | - <p class="p1">{{ total }}</p> | 45 | + <p class="p1">{{ count }}</p> |
43 | <p class="p2">基站数量</p> | 46 | <p class="p2">基站数量</p> |
44 | </div> | 47 | </div> |
45 | <div class="chart"> | 48 | <div class="chart"> |
@@ -54,8 +57,8 @@ | @@ -54,8 +57,8 @@ | ||
54 | <div class="answer-header"> | 57 | <div class="answer-header"> |
55 | <div class="sel-box"> | 58 | <div class="sel-box"> |
56 | <el-cascader | 59 | <el-cascader |
60 | + size="small" | ||
57 | class="sel" | 61 | class="sel" |
58 | - collapse-tags | ||
59 | clearable | 62 | clearable |
60 | placeholder="选择班级" | 63 | placeholder="选择班级" |
61 | v-model="query.classId" | 64 | v-model="query.classId" |
@@ -78,7 +81,6 @@ | @@ -78,7 +81,6 @@ | ||
78 | </el-option> | 81 | </el-option> |
79 | </el-select> | 82 | </el-select> |
80 | <el-input | 83 | <el-input |
81 | - type="number" | ||
82 | placeholder="请输入设备编码" | 84 | placeholder="请输入设备编码" |
83 | v-model="query.sn" | 85 | v-model="query.sn" |
84 | class="input-with-select" | 86 | class="input-with-select" |
@@ -146,7 +148,12 @@ | @@ -146,7 +148,12 @@ | ||
146 | > | 148 | > |
147 | <el-table-column label="操作" align="center" | 149 | <el-table-column label="操作" align="center" |
148 | ><template slot-scope="scoped"> | 150 | ><template slot-scope="scoped"> |
149 | - <el-tooltip effect="dark" content="修改基站" placement="top"> | 151 | + <el-tooltip |
152 | + effect="dark" | ||
153 | + v-if="role != 'ROLE_JITUAN'" | ||
154 | + content="修改基站" | ||
155 | + placement="top" | ||
156 | + > | ||
150 | <el-button | 157 | <el-button |
151 | type="primary" | 158 | type="primary" |
152 | circle | 159 | circle |
@@ -169,9 +176,9 @@ | @@ -169,9 +176,9 @@ | ||
169 | </div> | 176 | </div> |
170 | </div> | 177 | </div> |
171 | <div v-if="type == 2"> | 178 | <div v-if="type == 2"> |
172 | - <div class="chart-box"> | 179 | + <div class="chart-box" v-if="count"> |
173 | <div class="device-num"> | 180 | <div class="device-num"> |
174 | - <p class="p1">{{ total }}</p> | 181 | + <p class="p1">{{ count }}</p> |
175 | <p class="p2">答题器数量</p> | 182 | <p class="p2">答题器数量</p> |
176 | </div> | 183 | </div> |
177 | <div class="chart"> | 184 | <div class="chart"> |
@@ -186,8 +193,8 @@ | @@ -186,8 +193,8 @@ | ||
186 | <div class="answer-header"> | 193 | <div class="answer-header"> |
187 | <div class="sel-box"> | 194 | <div class="sel-box"> |
188 | <el-cascader | 195 | <el-cascader |
196 | + size="small" | ||
189 | class="sel" | 197 | class="sel" |
190 | - collapse-tags | ||
191 | clearable | 198 | clearable |
192 | placeholder="选择班级" | 199 | placeholder="选择班级" |
193 | v-model="query.classId" | 200 | v-model="query.classId" |
@@ -210,7 +217,6 @@ | @@ -210,7 +217,6 @@ | ||
210 | </el-option> | 217 | </el-option> |
211 | </el-select> | 218 | </el-select> |
212 | <el-input | 219 | <el-input |
213 | - type="number" | ||
214 | placeholder="请输入设备编码" | 220 | placeholder="请输入设备编码" |
215 | v-model="query.sn" | 221 | v-model="query.sn" |
216 | class="input-with-select" | 222 | class="input-with-select" |
@@ -290,8 +296,8 @@ | @@ -290,8 +296,8 @@ | ||
290 | <div class="answer-header"> | 296 | <div class="answer-header"> |
291 | <div class="sel-box"> | 297 | <div class="sel-box"> |
292 | <el-cascader | 298 | <el-cascader |
299 | + size="small" | ||
293 | class="sel" | 300 | class="sel" |
294 | - collapse-tags | ||
295 | clearable | 301 | clearable |
296 | placeholder="选择班级" | 302 | placeholder="选择班级" |
297 | v-model="query.classId" | 303 | v-model="query.classId" |
@@ -436,6 +442,7 @@ | @@ -436,6 +442,7 @@ | ||
436 | <el-form-item label="选择班级:" prop="classId"> | 442 | <el-form-item label="选择班级:" prop="classId"> |
437 | <el-col :span="10"> | 443 | <el-col :span="10"> |
438 | <el-cascader | 444 | <el-cascader |
445 | + size="small" | ||
439 | clearable | 446 | clearable |
440 | v-model="form.classId" | 447 | v-model="form.classId" |
441 | :options="gradeList" | 448 | :options="gradeList" |
@@ -477,6 +484,7 @@ export default { | @@ -477,6 +484,7 @@ export default { | ||
477 | type: function (val) { | 484 | type: function (val) { |
478 | this.page = 1; | 485 | this.page = 1; |
479 | this.total = 0; | 486 | this.total = 0; |
487 | + this.count = 0; | ||
480 | this.query.classId = []; | 488 | this.query.classId = []; |
481 | this.query.onlineStatus = ""; | 489 | this.query.onlineStatus = ""; |
482 | this.query.sn = ""; | 490 | this.query.sn = ""; |
@@ -499,7 +507,7 @@ export default { | @@ -499,7 +507,7 @@ export default { | ||
499 | diaAnswerEqu: false, | 507 | diaAnswerEqu: false, |
500 | gradeList: [], | 508 | gradeList: [], |
501 | gradeListAll: [], | 509 | gradeListAll: [], |
502 | - schoolAll:[], | 510 | + schoolAll: [], |
503 | props: { multiple: true, checkStrictly: true }, | 511 | props: { multiple: true, checkStrictly: true }, |
504 | type: 1, | 512 | type: 1, |
505 | query: { | 513 | query: { |
@@ -541,6 +549,7 @@ export default { | @@ -541,6 +549,7 @@ export default { | ||
541 | }, | 549 | }, |
542 | tableData: [], | 550 | tableData: [], |
543 | total: 0, | 551 | total: 0, |
552 | + count: 0, | ||
544 | chartData: [], | 553 | chartData: [], |
545 | chartData2: [], | 554 | chartData2: [], |
546 | selectionTabIds: [], | 555 | selectionTabIds: [], |
@@ -559,7 +568,9 @@ export default { | @@ -559,7 +568,9 @@ export default { | ||
559 | this.stationReport(); | 568 | this.stationReport(); |
560 | this._QueryGradeList(); | 569 | this._QueryGradeList(); |
561 | this._QueryData(); | 570 | this._QueryData(); |
562 | - this.showSchool() | 571 | + if (role == "ROLE_JITUAN") { |
572 | + this.showSchool(); | ||
573 | + } | ||
563 | }, | 574 | }, |
564 | methods: { | 575 | methods: { |
565 | edit() {}, | 576 | edit() {}, |
@@ -614,20 +625,22 @@ export default { | @@ -614,20 +625,22 @@ export default { | ||
614 | this.page = page; | 625 | this.page = page; |
615 | this._QueryData(false); | 626 | this._QueryData(false); |
616 | }, | 627 | }, |
617 | - async showSchool() { | 628 | + async showSchool() { |
618 | const { data, status, info } = await this.$request.schoolList(); | 629 | const { data, status, info } = await this.$request.schoolList(); |
619 | if (status === 0) { | 630 | if (status === 0) { |
620 | - this.schoolAll= [{ | ||
621 | - value:0, | ||
622 | - label:"全部", | ||
623 | - children:data.list?.map(item=>{ | ||
624 | - return { | ||
625 | - value:item.id, | ||
626 | - label:item.schoolName, | ||
627 | - } | ||
628 | - }) | ||
629 | - }] | ||
630 | - this.gradeList = [...this.schoolAll,...this.gradeList] | 631 | + this.schoolAll = [ |
632 | + { | ||
633 | + value: 0, | ||
634 | + label: "全部", | ||
635 | + children: data.list?.map((item) => { | ||
636 | + return { | ||
637 | + value: item.id, | ||
638 | + label: item.schoolName, | ||
639 | + }; | ||
640 | + }), | ||
641 | + }, | ||
642 | + ]; | ||
643 | + this.gradeList = [...this.schoolAll, ...this.gradeList]; | ||
631 | } else { | 644 | } else { |
632 | this.$message.error(info); | 645 | this.$message.error(info); |
633 | } | 646 | } |
@@ -741,7 +754,7 @@ export default { | @@ -741,7 +754,7 @@ export default { | ||
741 | }) || []; | 754 | }) || []; |
742 | return gradeList; | 755 | return gradeList; |
743 | }) || []; | 756 | }) || []; |
744 | - this.gradeList = [...this.schoolAll,...this.gradeList] | 757 | + this.gradeList = [...this.schoolAll, ...this.gradeList]; |
745 | } | 758 | } |
746 | } | 759 | } |
747 | } else { | 760 | } else { |
@@ -769,7 +782,7 @@ export default { | @@ -769,7 +782,7 @@ export default { | ||
769 | rate: item.rate, | 782 | rate: item.rate, |
770 | }; | 783 | }; |
771 | }) || []; | 784 | }) || []; |
772 | - // this.total = data.total || 0; | 785 | + this.count = data.total || 0; |
773 | } else { | 786 | } else { |
774 | this.$message.error(info); | 787 | this.$message.error(info); |
775 | } | 788 | } |
@@ -797,17 +810,18 @@ export default { | @@ -797,17 +810,18 @@ export default { | ||
797 | : item.type == 5 | 810 | : item.type == 5 |
798 | ? "3月内" | 811 | ? "3月内" |
799 | : "3月以上", | 812 | : "3月以上", |
800 | - value: item.total, | ||
801 | - rate: item.rate, | 813 | + count: item.total, |
814 | + value: item.rate * 100, | ||
802 | }; | 815 | }; |
803 | }) || []; | 816 | }) || []; |
804 | - // this.total = data.total || 0; | 817 | + this.count = data.total || 0; |
805 | } else { | 818 | } else { |
806 | this.$message.error(info); | 819 | this.$message.error(info); |
807 | } | 820 | } |
808 | }, | 821 | }, |
809 | - setQuery(){//整理传参 | ||
810 | - let query = {} | 822 | + setQuery() { |
823 | + //整理传参 | ||
824 | + let query = {}; | ||
811 | if (this.query.sn) { | 825 | if (this.query.sn) { |
812 | query.sn = this.query.sn; | 826 | query.sn = this.query.sn; |
813 | } else { | 827 | } else { |
@@ -823,7 +837,7 @@ export default { | @@ -823,7 +837,7 @@ export default { | ||
823 | query.schoolIds = []; | 837 | query.schoolIds = []; |
824 | this.query.classId?.map((item) => { | 838 | this.query.classId?.map((item) => { |
825 | if (item.length == 1) { | 839 | if (item.length == 1) { |
826 | - if(!query.regionIds.includes(item[0])){ | 840 | + if (!query.regionIds.includes(item[0])) { |
827 | query.regionIds.push(item[0]); | 841 | query.regionIds.push(item[0]); |
828 | } | 842 | } |
829 | } else { | 843 | } else { |
@@ -840,7 +854,7 @@ export default { | @@ -840,7 +854,7 @@ export default { | ||
840 | query.classIds = []; | 854 | query.classIds = []; |
841 | this.query.classId?.map((item) => { | 855 | this.query.classId?.map((item) => { |
842 | if (item.length == 1) { | 856 | if (item.length == 1) { |
843 | - if(!query.gradeNames.includes(item[0])){ | 857 | + if (!query.gradeNames.includes(item[0])) { |
844 | query.gradeNames.push(item[0]); | 858 | query.gradeNames.push(item[0]); |
845 | } | 859 | } |
846 | } else { | 860 | } else { |
@@ -855,12 +869,12 @@ export default { | @@ -855,12 +869,12 @@ export default { | ||
855 | } | 869 | } |
856 | delete query.classId; | 870 | delete query.classId; |
857 | } | 871 | } |
858 | - return query | 872 | + return query; |
859 | }, | 873 | }, |
860 | // 设备列表信息 | 874 | // 设备列表信息 |
861 | async _QueryData(isRef) { | 875 | async _QueryData(isRef) { |
862 | this.loading = true; | 876 | this.loading = true; |
863 | - let query = this.setQuery() | 877 | + let query = this.setQuery(); |
864 | if (isRef) { | 878 | if (isRef) { |
865 | this.page = 1; | 879 | this.page = 1; |
866 | } | 880 | } |
@@ -877,8 +891,12 @@ export default { | @@ -877,8 +891,12 @@ export default { | ||
877 | }); | 891 | }); |
878 | this.loading = false; | 892 | this.loading = false; |
879 | if (status == 0) { | 893 | if (status == 0) { |
880 | - this.tableData = data?.list || []; | ||
881 | - this.total = data.count | 894 | + this.tableData = |
895 | + data?.list.map((item) => { | ||
896 | + item.upgradeFlag = item.upgradeFlag == 1 ? true : false; | ||
897 | + return item; | ||
898 | + }) || []; | ||
899 | + this.total = data.count; | ||
882 | } else { | 900 | } else { |
883 | this.$message.error(info); | 901 | this.$message.error(info); |
884 | } | 902 | } |
src/views/down/client.vue
@@ -162,7 +162,7 @@ | @@ -162,7 +162,7 @@ | ||
162 | <el-radio :label="2">老师选择</el-radio> | 162 | <el-radio :label="2">老师选择</el-radio> |
163 | </el-radio-group> | 163 | </el-radio-group> |
164 | <el-input-number | 164 | <el-input-number |
165 | - v-show="formData.viesAnswerSet != 2" | 165 | + v-show="formData.viesAnswerSet === 0" |
166 | size="small" | 166 | size="small" |
167 | class="count-down" | 167 | class="count-down" |
168 | v-model="formData.countdown" | 168 | v-model="formData.countdown" |
@@ -287,7 +287,7 @@ const defaultForm = { | @@ -287,7 +287,7 @@ const defaultForm = { | ||
287 | multipleChoiceNum: 4, | 287 | multipleChoiceNum: 4, |
288 | singleTypeNum: 25, | 288 | singleTypeNum: 25, |
289 | askCountdown: 30, | 289 | askCountdown: 30, |
290 | - examsDuration: 5400, | 290 | + examsDuration: 90, |
291 | displayModel: 0, | 291 | displayModel: 0, |
292 | languageSet: 0, | 292 | languageSet: 0, |
293 | otherSet: [], | 293 | otherSet: [], |
src/views/examinationPaper/recycle.vue
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | </back-box> | 7 | </back-box> |
8 | <div class="answer-header"> | 8 | <div class="answer-header"> |
9 | <div class="sel-box"> | 9 | <div class="sel-box"> |
10 | - <!-- <el-cascader | 10 | + <!-- <el-cascader size="small" |
11 | class="sel sel2" | 11 | class="sel sel2" |
12 | :options="options" | 12 | :options="options" |
13 | :props="props" | 13 | :props="props" |
src/views/index/mainIndex.vue
@@ -6,9 +6,16 @@ | @@ -6,9 +6,16 @@ | ||
6 | <div class="text"> | 6 | <div class="text"> |
7 | <p class="p1">账号管理</p> | 7 | <p class="p1">账号管理</p> |
8 | <p class="p2"> | 8 | <p class="p2"> |
9 | - 管理{{ dataInfo.teacherCourseCount }}个任课教师,{{ | ||
10 | - dataInfo.classManagerCount | ||
11 | - }}个班主任,{{ dataInfo.teacherGradeCount }}个备课组长账号信息。 | 9 | + 管理 |
10 | + <template v-if="dataInfo.teacherCourseCount"> | ||
11 | + {{ dataInfo.teacherCourseCount }}个任课教师, | ||
12 | + </template> | ||
13 | + <template v-if="dataInfo.classManagerCount"> | ||
14 | + {{ dataInfo.classManagerCount }}个班主任, | ||
15 | + </template> | ||
16 | + <template v-if="dataInfo.teacherGradeCount"> | ||
17 | + {{ dataInfo.teacherGradeCount }}个备课组长账号信息。 | ||
18 | + </template> | ||
12 | </p> | 19 | </p> |
13 | </div> | 20 | </div> |
14 | </li> | 21 | </li> |
@@ -17,9 +24,16 @@ | @@ -17,9 +24,16 @@ | ||
17 | <div class="text"> | 24 | <div class="text"> |
18 | <p class="p1">学校管理</p> | 25 | <p class="p1">学校管理</p> |
19 | <p class="p2"> | 26 | <p class="p2"> |
20 | - 管理{{ dataInfo.gradeCount }}个年级,{{ | ||
21 | - dataInfo.classCount | ||
22 | - }}个班级,{{ dataInfo.studentCount }}名学生信息。 | 27 | + 管理 |
28 | + <template v-if="dataInfo.gradeCount" | ||
29 | + >{{ dataInfo.gradeCount }}个年级, | ||
30 | + </template> | ||
31 | + <template v-if="dataInfo.classCount"> | ||
32 | + {{ dataInfo.classCount }}个班级, | ||
33 | + </template> | ||
34 | + <template v-if="dataInfo.studentCount"> | ||
35 | + {{ dataInfo.studentCount }}名学生信息。 | ||
36 | + </template> | ||
23 | </p> | 37 | </p> |
24 | </div> | 38 | </div> |
25 | </li> | 39 | </li> |
@@ -28,9 +42,13 @@ | @@ -28,9 +42,13 @@ | ||
28 | <div class="text"> | 42 | <div class="text"> |
29 | <p class="p1">设备状态</p> | 43 | <p class="p1">设备状态</p> |
30 | <p class="p2"> | 44 | <p class="p2"> |
31 | - 管理{{ dataInfo.stationCount }}个基站,{{ | ||
32 | - dataInfo.keyboardCount | ||
33 | - }}套答题器设备。 | 45 | + 管理 |
46 | + <template v-if="dataInfo.stationCount" | ||
47 | + >{{ dataInfo.stationCount }}个基站,</template | ||
48 | + > | ||
49 | + <template v-if="dataInfo.keyboardCount"> | ||
50 | + {{ dataInfo.keyboardCount }}套答题器设备。</template | ||
51 | + > | ||
34 | </p> | 52 | </p> |
35 | </div> | 53 | </div> |
36 | </li> | 54 | </li> |
@@ -65,15 +83,35 @@ | @@ -65,15 +83,35 @@ | ||
65 | <img class="icon" :src="getImgs(item.path)" alt="" /> | 83 | <img class="icon" :src="getImgs(item.path)" alt="" /> |
66 | <div class="text" v-if="item.path == '/setUpConglomerate'"> | 84 | <div class="text" v-if="item.path == '/setUpConglomerate'"> |
67 | <p class="p1">学校管理</p> | 85 | <p class="p1">学校管理</p> |
68 | - <p class="p2">管理{{dataInfo.regionCount}}个区域,{{dataInfo.schoolCount}}个学校。</p> | 86 | + <p class="p2"> |
87 | + 管理 | ||
88 | + <template v-if="dataInfo.regionCount" | ||
89 | + >{{ dataInfo.regionCount }}个区域,</template | ||
90 | + > | ||
91 | + <template v-if="dataInfo.schoolCount" | ||
92 | + >{{ dataInfo.schoolCount }}个学校。</template | ||
93 | + > | ||
94 | + </p> | ||
69 | </div> | 95 | </div> |
70 | <div class="text" v-else-if="item.path == '/setUpAccount'"> | 96 | <div class="text" v-else-if="item.path == '/setUpAccount'"> |
71 | <p class="p1">账号管理</p> | 97 | <p class="p1">账号管理</p> |
72 | - <p class="p2">共{{dataInfo.regionManagerCount+dataInfo.schoolManagerCount}}个各层级管理员账号。</p> | 98 | + <p class="p2"> |
99 | + 共{{ | ||
100 | + dataInfo.regionManagerCount + dataInfo.schoolManagerCount | ||
101 | + }}个各层级管理员账号。 | ||
102 | + </p> | ||
73 | </div> | 103 | </div> |
74 | <div class="text" v-else-if="item.path == '/device'"> | 104 | <div class="text" v-else-if="item.path == '/device'"> |
75 | <p class="p1">设备状态</p> | 105 | <p class="p1">设备状态</p> |
76 | - <p class="p2">管理{{dataInfo.stationCount}}个基站,{{dataInfo.keyboardCount}}套答题器设备。</p> | 106 | + <p class="p2"> |
107 | + 管理 | ||
108 | + <template v-if="dataInfo.stationCount" | ||
109 | + >{{ dataInfo.stationCount }}个基站,</template | ||
110 | + > | ||
111 | + <template v-if="dataInfo.keyboardCount"> | ||
112 | + {{ dataInfo.keyboardCount }}套答题器设备。</template | ||
113 | + > | ||
114 | + </p> | ||
77 | </div> | 115 | </div> |
78 | <div class="text" v-else-if="item.path == '/analysis'"> | 116 | <div class="text" v-else-if="item.path == '/analysis'"> |
79 | <p class="p1">使用分析</p> | 117 | <p class="p1">使用分析</p> |
@@ -96,7 +134,9 @@ | @@ -96,7 +134,9 @@ | ||
96 | <img class="icon" :src="getImgs(item.path)" alt="" /> | 134 | <img class="icon" :src="getImgs(item.path)" alt="" /> |
97 | <div class="text" v-if="item.path == '/examinationPaper'"> | 135 | <div class="text" v-if="item.path == '/examinationPaper'"> |
98 | <p class="p1">备题组卷</p> | 136 | <p class="p1">备题组卷</p> |
99 | - <p class="p2">管理{{ dataInfo.paperCount }}套答题卡。</p> | 137 | + <p class="p2" v-if="dataInfo.paperCount"> |
138 | + {{ dataInfo.paperCount }}套答题卡。 | ||
139 | + </p> | ||
100 | </div> | 140 | </div> |
101 | <div class="text" v-else-if="item.path == '/portrait'"> | 141 | <div class="text" v-else-if="item.path == '/portrait'"> |
102 | <p class="p1">学生画像</p> | 142 | <p class="p1">学生画像</p> |
@@ -105,13 +145,15 @@ | @@ -105,13 +145,15 @@ | ||
105 | </div> | 145 | </div> |
106 | <div class="text" v-else-if="item.path == '/ask'"> | 146 | <div class="text" v-else-if="item.path == '/ask'"> |
107 | <p class="p1">随堂问报表</p> | 147 | <p class="p1">随堂问报表</p> |
108 | - <p class="p2"> | 148 | + <p class="p2" v-if="dataInfo.classPeriodCount"> |
109 | 对{{ dataInfo.classPeriodCount }}套随堂问答题记录分析。 | 149 | 对{{ dataInfo.classPeriodCount }}套随堂问答题记录分析。 |
110 | </p> | 150 | </p> |
111 | </div> | 151 | </div> |
112 | <div class="text" v-else-if="item.path == '/test'"> | 152 | <div class="text" v-else-if="item.path == '/test'"> |
113 | <p class="p1">即时测报表</p> | 153 | <p class="p1">即时测报表</p> |
114 | - <p class="p2">对{{ dataInfo.examCount }}套即时测答题记录分析。</p> | 154 | + <p class="p2" v-if="dataInfo.examCount"> |
155 | + 对{{ dataInfo.examCount }}套即时测答题记录分析。 | ||
156 | + </p> | ||
115 | </div> | 157 | </div> |
116 | </li> | 158 | </li> |
117 | </template> | 159 | </template> |
@@ -164,7 +206,7 @@ export default { | @@ -164,7 +206,7 @@ export default { | ||
164 | this.schoolIndex(); | 206 | this.schoolIndex(); |
165 | } else if (this.type == "ROLE_JIAOSHI" || this.type == "ROLE_BANZHUREN") { | 207 | } else if (this.type == "ROLE_JIAOSHI" || this.type == "ROLE_BANZHUREN") { |
166 | this.teacherIndex(); | 208 | this.teacherIndex(); |
167 | - }else if (this.type == "ROLE_JITUAN") { | 209 | + } else if (this.type == "ROLE_JITUAN") { |
168 | this.tenantIndex(); | 210 | this.tenantIndex(); |
169 | } | 211 | } |
170 | }, | 212 | }, |
src/views/login/index.vue
@@ -91,14 +91,15 @@ export default { | @@ -91,14 +91,15 @@ export default { | ||
91 | disableClick: true, | 91 | disableClick: true, |
92 | passwordType: "password", | 92 | passwordType: "password", |
93 | loginForm: { | 93 | loginForm: { |
94 | - // username: "13610050254", | ||
95 | - // password: "Pw050254#", | 94 | + // username: "15911715665", |
95 | + // password: "Csiy88888", | ||
96 | + username: "13610050254", | ||
97 | + password: "Pw050254#", | ||
96 | // username: "18946034886", | 98 | // username: "18946034886", |
97 | // password: "Pw034886#", | 99 | // password: "Pw034886#", |
98 | // username: "18332123505", | 100 | // username: "18332123505", |
99 | // password: "Pw123505#", | 101 | // password: "Pw123505#", |
100 | - username: "15911715665", | ||
101 | - password: "Csiy88888", | 102 | + |
102 | }, | 103 | }, |
103 | loginRules: { | 104 | loginRules: { |
104 | username: [ | 105 | username: [ |
src/views/setUp/account.vue
@@ -30,9 +30,9 @@ | @@ -30,9 +30,9 @@ | ||
30 | <div class="answer-header"> | 30 | <div class="answer-header"> |
31 | <div class="sel-box"> | 31 | <div class="sel-box"> |
32 | <el-cascader | 32 | <el-cascader |
33 | + size="small" | ||
33 | v-if="role == 'ROLE_JITUAN'" | 34 | v-if="role == 'ROLE_JITUAN'" |
34 | class="sel" | 35 | class="sel" |
35 | - collapse-tags | ||
36 | clearable | 36 | clearable |
37 | placeholder="选择学校" | 37 | placeholder="选择学校" |
38 | v-model="query.schoolId" | 38 | v-model="query.schoolId" |
@@ -147,6 +147,7 @@ | @@ -147,6 +147,7 @@ | ||
147 | prop="createdTime" | 147 | prop="createdTime" |
148 | label="创建时间" | 148 | label="创建时间" |
149 | align="center" | 149 | align="center" |
150 | + width="200" | ||
150 | ></el-table-column> | 151 | ></el-table-column> |
151 | <el-table-column label="操作" align="center" width="160"> | 152 | <el-table-column label="操作" align="center" width="160"> |
152 | <template slot-scope="scoped"> | 153 | <template slot-scope="scoped"> |
@@ -290,6 +291,7 @@ | @@ -290,6 +291,7 @@ | ||
290 | <el-form-item label="选择管辖范围:" prop="regionId"> | 291 | <el-form-item label="选择管辖范围:" prop="regionId"> |
291 | <el-col :span="12"> | 292 | <el-col :span="12"> |
292 | <el-select | 293 | <el-select |
294 | + v-show="formAddCount.roleId == 3" | ||
293 | class="sel" | 295 | class="sel" |
294 | v-model="formAddCount.regionId" | 296 | v-model="formAddCount.regionId" |
295 | placeholder="选择管辖范围" | 297 | placeholder="选择管辖范围" |
@@ -301,6 +303,19 @@ | @@ -301,6 +303,19 @@ | ||
301 | :value="item.id" | 303 | :value="item.id" |
302 | ></el-option> | 304 | ></el-option> |
303 | </el-select> | 305 | </el-select> |
306 | + <el-select | ||
307 | + v-show="formAddCount.roleId == 4" | ||
308 | + class="sel" | ||
309 | + v-model="formAddCount.schoolId" | ||
310 | + placeholder="选择管辖范围" | ||
311 | + > | ||
312 | + <el-option | ||
313 | + v-for="item in addSelectSchoolList" | ||
314 | + :key="item.value" | ||
315 | + :label="item.label" | ||
316 | + :value="item.value" | ||
317 | + ></el-option> | ||
318 | + </el-select> | ||
304 | </el-col> | 319 | </el-col> |
305 | </el-form-item> | 320 | </el-form-item> |
306 | </el-form> | 321 | </el-form> |
@@ -337,7 +352,7 @@ export default { | @@ -337,7 +352,7 @@ export default { | ||
337 | tenantRoleList: [], | 352 | tenantRoleList: [], |
338 | regionList: [], | 353 | regionList: [], |
339 | schoolList: [], | 354 | schoolList: [], |
340 | - schoolAll:[], | 355 | + schoolAll: [], |
341 | props: { multiple: true, checkStrictly: true }, | 356 | props: { multiple: true, checkStrictly: true }, |
342 | roleList: [], | 357 | roleList: [], |
343 | query: { | 358 | query: { |
@@ -370,7 +385,9 @@ export default { | @@ -370,7 +385,9 @@ export default { | ||
370 | password: "", | 385 | password: "", |
371 | roleId: "", | 386 | roleId: "", |
372 | regionId: "", | 387 | regionId: "", |
388 | + schoolId:"" | ||
373 | }, | 389 | }, |
390 | + addSelectSchoolList: [], | ||
374 | ruleAddCount: { | 391 | ruleAddCount: { |
375 | phone: [{ required: true, message: "请输入联系电话", trigger: "blur" }], | 392 | phone: [{ required: true, message: "请输入联系电话", trigger: "blur" }], |
376 | realName: [{ required: true, message: "请输入姓名", trigger: "blur" }], | 393 | realName: [{ required: true, message: "请输入姓名", trigger: "blur" }], |
@@ -393,7 +410,7 @@ export default { | @@ -393,7 +410,7 @@ export default { | ||
393 | if (this.role == "ROLE_JITUAN") { | 410 | if (this.role == "ROLE_JITUAN") { |
394 | this._TenantRoleList(); | 411 | this._TenantRoleList(); |
395 | this._RegionList(); | 412 | this._RegionList(); |
396 | - this.showSchool() | 413 | + this.showSchool(); |
397 | } else { | 414 | } else { |
398 | this._RoleList(); | 415 | this._RoleList(); |
399 | } | 416 | } |
@@ -418,6 +435,7 @@ export default { | @@ -418,6 +435,7 @@ export default { | ||
418 | this.formAddCount.password = ""; | 435 | this.formAddCount.password = ""; |
419 | this.formAddCount.roleId = ""; | 436 | this.formAddCount.roleId = ""; |
420 | this.formAddCount.regionId = ""; | 437 | this.formAddCount.regionId = ""; |
438 | + this.formAddCount.schoolId = ""; | ||
421 | this.diaAdd = true; | 439 | this.diaAdd = true; |
422 | }, | 440 | }, |
423 | saveAddCount() { | 441 | saveAddCount() { |
@@ -496,17 +514,20 @@ export default { | @@ -496,17 +514,20 @@ export default { | ||
496 | async showSchool() { | 514 | async showSchool() { |
497 | const { data, status, info } = await this.$request.schoolList(); | 515 | const { data, status, info } = await this.$request.schoolList(); |
498 | if (status === 0) { | 516 | if (status === 0) { |
499 | - this.schoolAll= [{ | ||
500 | - value:0, | ||
501 | - label:"全部", | ||
502 | - children:data.list?.map(item=>{ | ||
503 | - return { | ||
504 | - value:item.id, | ||
505 | - label:item.schoolName, | ||
506 | - } | ||
507 | - }) | ||
508 | - }] | ||
509 | - this.schoolList = [...this.schoolAll,...this.schoolList] | 517 | + (this.addSelectSchoolList = data.list?.map((item) => { |
518 | + return { | ||
519 | + value: item.id, | ||
520 | + label: item.schoolName, | ||
521 | + }; | ||
522 | + })), | ||
523 | + (this.schoolAll = [ | ||
524 | + { | ||
525 | + value: 0, | ||
526 | + label: "全部", | ||
527 | + children: [...this.addSelectSchoolList], | ||
528 | + }, | ||
529 | + ]); | ||
530 | + this.schoolList = [...this.schoolAll, ...this.schoolList]; | ||
510 | } else { | 531 | } else { |
511 | this.$message.error(info); | 532 | this.$message.error(info); |
512 | } | 533 | } |
@@ -569,12 +590,13 @@ export default { | @@ -569,12 +590,13 @@ export default { | ||
569 | children: children, | 590 | children: children, |
570 | }; | 591 | }; |
571 | }); | 592 | }); |
572 | - this.schoolList = [...this.schoolAll,...this.schoolList] | 593 | + this.schoolList = [...this.schoolAll, ...this.schoolList]; |
573 | } else { | 594 | } else { |
574 | this.$message.error(info); | 595 | this.$message.error(info); |
575 | } | 596 | } |
576 | }, | 597 | }, |
577 | - setQuery(type) {//整理请求参数 | 598 | + setQuery(type) { |
599 | + //整理请求参数 | ||
578 | let query = {}; | 600 | let query = {}; |
579 | if (type == 1) { | 601 | if (type == 1) { |
580 | query.roleId = this.query.roleId; | 602 | query.roleId = this.query.roleId; |
@@ -621,6 +643,7 @@ export default { | @@ -621,6 +643,7 @@ export default { | ||
621 | let query = this.setQuery(type); | 643 | let query = this.setQuery(type); |
622 | this.loading = true; | 644 | this.loading = true; |
623 | this.tableData = []; | 645 | this.tableData = []; |
646 | + this.total = 0; | ||
624 | const { data, status, info } = | 647 | const { data, status, info } = |
625 | this.role != "ROLE_JITUAN" | 648 | this.role != "ROLE_JITUAN" |
626 | ? await this.$request.userPage({ | 649 | ? await this.$request.userPage({ |
src/views/setUp/conglomerate.vue
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | </div> | 34 | </div> |
35 | <div class="content-detail"> | 35 | <div class="content-detail"> |
36 | <div class="title-box"> | 36 | <div class="title-box"> |
37 | - <span>管辖的学校({{schoolData.num}})</span> | 37 | + <span>管辖的学校({{ schoolData.num }})</span> |
38 | <i class="icon el-icon-circle-plus-outline" @click="addSchool"></i> | 38 | <i class="icon el-icon-circle-plus-outline" @click="addSchool"></i> |
39 | </div> | 39 | </div> |
40 | <el-empty | 40 | <el-empty |
@@ -230,7 +230,7 @@ | @@ -230,7 +230,7 @@ | ||
230 | >确 定</el-button | 230 | >确 定</el-button |
231 | > | 231 | > |
232 | <el-button round @click="diaSchool2 = false">取 消</el-button> | 232 | <el-button round @click="diaSchool2 = false">取 消</el-button> |
233 | - <el-button round @click="removeSchool">删除学校</el-button> | 233 | + <el-button round v-if="showDelSclBtn" @click="removeSchool">删除学校</el-button> |
234 | </div> | 234 | </div> |
235 | </el-dialog> | 235 | </el-dialog> |
236 | </div> | 236 | </div> |
@@ -292,12 +292,13 @@ export default { | @@ -292,12 +292,13 @@ export default { | ||
292 | schoolName: [ | 292 | schoolName: [ |
293 | { required: true, message: "请输入学校名称", trigger: "blur" }, | 293 | { required: true, message: "请输入学校名称", trigger: "blur" }, |
294 | ], | 294 | ], |
295 | - // sections: [{ required: true, message: "请选择学段", trigger: "blur" }], | 295 | + sections: [{ required: true, message: "请选择学段", trigger: "blur" }], |
296 | }, | 296 | }, |
297 | setFormSchool: { | 297 | setFormSchool: { |
298 | schoolId: "", | 298 | schoolId: "", |
299 | schoolName: "", | 299 | schoolName: "", |
300 | }, | 300 | }, |
301 | + showDelSclBtn: false, | ||
301 | }; | 302 | }; |
302 | }, | 303 | }, |
303 | created() { | 304 | created() { |
@@ -320,7 +321,6 @@ export default { | @@ -320,7 +321,6 @@ export default { | ||
320 | this.formAdmin.password = ""; | 321 | this.formAdmin.password = ""; |
321 | this.formAdmin.realName = ""; | 322 | this.formAdmin.realName = ""; |
322 | 323 | ||
323 | - | ||
324 | this.diaAdmin = true; | 324 | this.diaAdmin = true; |
325 | }, | 325 | }, |
326 | addSchool() { | 326 | addSchool() { |
@@ -339,6 +339,13 @@ export default { | @@ -339,6 +339,13 @@ export default { | ||
339 | setSchool(obj) { | 339 | setSchool(obj) { |
340 | this.setFormSchool.schoolId = obj.id; | 340 | this.setFormSchool.schoolId = obj.id; |
341 | this.setFormSchool.schoolName = obj.schoolName; | 341 | this.setFormSchool.schoolName = obj.schoolName; |
342 | + let num = | ||
343 | + obj.stationCount + | ||
344 | + obj.keyboardCount + | ||
345 | + obj.classCount + | ||
346 | + obj.studentCount + | ||
347 | + obj.teacherCount; | ||
348 | + this.showDelSclBtn = num == 0 ? true : false; | ||
342 | this.diaSchool2 = true; | 349 | this.diaSchool2 = true; |
343 | }, | 350 | }, |
344 | async removeSchool() { | 351 | async removeSchool() { |
@@ -346,10 +353,10 @@ export default { | @@ -346,10 +353,10 @@ export default { | ||
346 | schoolId: this.setFormSchool.schoolId, | 353 | schoolId: this.setFormSchool.schoolId, |
347 | }); | 354 | }); |
348 | if (status === 0) { | 355 | if (status === 0) { |
349 | - this._QueryData() | ||
350 | - this.showSchool() | 356 | + this._QueryData(); |
357 | + this.showSchool(); | ||
351 | this.$message.success(info); | 358 | this.$message.success(info); |
352 | - this.diaSchool2 = false | 359 | + this.diaSchool2 = false; |
353 | } else { | 360 | } else { |
354 | this.$message.error(info); | 361 | this.$message.error(info); |
355 | } | 362 | } |
@@ -364,7 +371,7 @@ export default { | @@ -364,7 +371,7 @@ export default { | ||
364 | regionName: this.formCL.regionName, | 371 | regionName: this.formCL.regionName, |
365 | }); | 372 | }); |
366 | if (status === 0) { | 373 | if (status === 0) { |
367 | - this._QueryData() | 374 | + this._QueryData(); |
368 | this.$message.success(info); | 375 | this.$message.success(info); |
369 | this.diaCL = false; | 376 | this.diaCL = false; |
370 | } else { | 377 | } else { |
@@ -404,8 +411,8 @@ export default { | @@ -404,8 +411,8 @@ export default { | ||
404 | this.$refs["formSchool"].validate(async (valid) => { | 411 | this.$refs["formSchool"].validate(async (valid) => { |
405 | // 验证通过:保存 | 412 | // 验证通过:保存 |
406 | if (valid) { | 413 | if (valid) { |
407 | - let query = {...this.formSchool} | ||
408 | - query.sections = query.sections.join(',') | 414 | + let query = { ...this.formSchool }; |
415 | + query.sections = query.sections.join(","); | ||
409 | const { data, status, info } = await this.$request.saveSchool({ | 416 | const { data, status, info } = await this.$request.saveSchool({ |
410 | ...query, | 417 | ...query, |
411 | }); | 418 | }); |
@@ -445,11 +452,11 @@ export default { | @@ -445,11 +452,11 @@ export default { | ||
445 | }); | 452 | }); |
446 | }, | 453 | }, |
447 | async showSchool() { | 454 | async showSchool() { |
448 | - this.loading = true | 455 | + this.loading = true; |
449 | const { data, status, info } = await this.$request.schoolList({ | 456 | const { data, status, info } = await this.$request.schoolList({ |
450 | regionId: this.showId, | 457 | regionId: this.showId, |
451 | }); | 458 | }); |
452 | - this.loading = false | 459 | + this.loading = false; |
453 | if (status === 0) { | 460 | if (status === 0) { |
454 | this.schoolData.list = [...data.list] || []; | 461 | this.schoolData.list = [...data.list] || []; |
455 | this.schoolData.num = data.count; | 462 | this.schoolData.num = data.count; |
src/views/setUp/school.vue
@@ -99,8 +99,10 @@ | @@ -99,8 +99,10 @@ | ||
99 | label-width="160px" | 99 | label-width="160px" |
100 | > | 100 | > |
101 | <el-form-item label="科目:" prop="subjectNames"> | 101 | <el-form-item label="科目:" prop="subjectNames"> |
102 | - <div class="subject-box" :class="showAll?'active':''"> | ||
103 | - <span class="showAll" @click="showAll = true" v-if="!showAll">更多...</span> | 102 | + <div class="subject-box" :class="showAll ? 'active' : ''"> |
103 | + <span class="showAll" @click="showAll = !showAll">{{ | ||
104 | + showAll ? "收起" : "更多..." | ||
105 | + }}</span> | ||
104 | <el-checkbox-group v-model="formGrade.subjectNames"> | 106 | <el-checkbox-group v-model="formGrade.subjectNames"> |
105 | <el-checkbox | 107 | <el-checkbox |
106 | v-for="item in subjectList" | 108 | v-for="item in subjectList" |
@@ -139,6 +141,7 @@ | @@ -139,6 +141,7 @@ | ||
139 | </el-dialog> | 141 | </el-dialog> |
140 | <el-dialog title="修改学校信息" :visible.sync="diaSchool" width="400"> | 142 | <el-dialog title="修改学校信息" :visible.sync="diaSchool" width="400"> |
141 | <el-form | 143 | <el-form |
144 | + ref="formSchool" | ||
142 | class="form-box" | 145 | class="form-box" |
143 | :model="formSchool" | 146 | :model="formSchool" |
144 | :rules="rulesSchool" | 147 | :rules="rulesSchool" |
@@ -157,8 +160,9 @@ | @@ -157,8 +160,9 @@ | ||
157 | <el-form-item label="授课端管理密码:" prop="managePwd"> | 160 | <el-form-item label="授课端管理密码:" prop="managePwd"> |
158 | <el-col :span="10"> | 161 | <el-col :span="10"> |
159 | <el-input | 162 | <el-input |
160 | - maxlength="30" | 163 | + maxlength="20" |
161 | v-model="formSchool.managePwd" | 164 | v-model="formSchool.managePwd" |
165 | + show-password | ||
162 | placeholder="请输入授课端管理密码" | 166 | placeholder="请输入授课端管理密码" |
163 | ></el-input> | 167 | ></el-input> |
164 | </el-col> | 168 | </el-col> |
@@ -226,13 +230,13 @@ export default { | @@ -226,13 +230,13 @@ export default { | ||
226 | }, | 230 | }, |
227 | data() { | 231 | data() { |
228 | return { | 232 | return { |
229 | - code:"", | 233 | + code: "", |
230 | loading: false, | 234 | loading: false, |
231 | url: "xxx", | 235 | url: "xxx", |
232 | diaUp: false, | 236 | diaUp: false, |
233 | diaSchool: false, | 237 | diaSchool: false, |
234 | diaGrade: false, | 238 | diaGrade: false, |
235 | - showAll:false,//修改年级科目显示 | 239 | + showAll: false, //修改年级科目显示 |
236 | school: { | 240 | school: { |
237 | schoolName: "", | 241 | schoolName: "", |
238 | managePwd: "", | 242 | managePwd: "", |
@@ -252,6 +256,12 @@ export default { | @@ -252,6 +256,12 @@ export default { | ||
252 | sections: [{ required: true, message: "请选择学段", trigger: "blur" }], | 256 | sections: [{ required: true, message: "请选择学段", trigger: "blur" }], |
253 | managePwd: [ | 257 | managePwd: [ |
254 | { required: true, message: "请填写管理密码", trigger: "blur" }, | 258 | { required: true, message: "请填写管理密码", trigger: "blur" }, |
259 | + { | ||
260 | + min: 8, | ||
261 | + max: 20, | ||
262 | + message: "长度在 8 到 20 个字符", | ||
263 | + trigger: "blur", | ||
264 | + }, | ||
255 | ], | 265 | ], |
256 | }, | 266 | }, |
257 | formGrade: { | 267 | formGrade: { |
@@ -276,7 +286,7 @@ export default { | @@ -276,7 +286,7 @@ export default { | ||
276 | }; | 286 | }; |
277 | }, | 287 | }, |
278 | created() { | 288 | created() { |
279 | - this.code = localStorage.getItem("csCode")||"" | 289 | + this.code = localStorage.getItem("csCode") || ""; |
280 | this._QueryDataSchool(); | 290 | this._QueryDataSchool(); |
281 | this._QueryDataGrade(); | 291 | this._QueryDataGrade(); |
282 | this._QuerySubject(); | 292 | this._QuerySubject(); |
@@ -286,6 +296,7 @@ export default { | @@ -286,6 +296,7 @@ export default { | ||
286 | this.formGrade.subjectNames = obj.subjectNames; | 296 | this.formGrade.subjectNames = obj.subjectNames; |
287 | this.formGrade.classList = obj.classList; | 297 | this.formGrade.classList = obj.classList; |
288 | this.formGrade.gradeName = obj.gradeName; | 298 | this.formGrade.gradeName = obj.gradeName; |
299 | + this.showAll = false; | ||
289 | this.diaGrade = true; | 300 | this.diaGrade = true; |
290 | }, | 301 | }, |
291 | addSubjectName() { | 302 | addSubjectName() { |
@@ -297,7 +308,7 @@ export default { | @@ -297,7 +308,7 @@ export default { | ||
297 | this.formGrade.subjectNames.push(this.subjectName); | 308 | this.formGrade.subjectNames.push(this.subjectName); |
298 | this.subjectName = ""; | 309 | this.subjectName = ""; |
299 | }, | 310 | }, |
300 | - async editSchool() { | 311 | + editSchool() { |
301 | if (!this.formSchool.sections.length) { | 312 | if (!this.formSchool.sections.length) { |
302 | this.$message.error("请选择学段!"); | 313 | this.$message.error("请选择学段!"); |
303 | return; | 314 | return; |
@@ -309,20 +320,26 @@ export default { | @@ -309,20 +320,26 @@ export default { | ||
309 | if (this.loading) { | 320 | if (this.loading) { |
310 | return; | 321 | return; |
311 | } | 322 | } |
312 | - this.loading = true; | ||
313 | - let form = { ...this.formSchool }; | ||
314 | - form.sections = this.formSchool.sections.join(","); | ||
315 | - const { data, status, info } = await this.$request.updateSchool({ | ||
316 | - ...form, | 323 | + this.$refs.formSchool.validate(async (valid) => { |
324 | + if (valid) { | ||
325 | + this.loading = true; | ||
326 | + let form = { ...this.formSchool }; | ||
327 | + form.sections = this.formSchool.sections.join(","); | ||
328 | + const { data, status, info } = await this.$request.updateSchool({ | ||
329 | + ...form, | ||
330 | + }); | ||
331 | + this.loading = false; | ||
332 | + if (status === 0) { | ||
333 | + this.$message.success("修改成功~"); | ||
334 | + this.diaSchool = false; | ||
335 | + this._QueryDataSchool(); | ||
336 | + } else { | ||
337 | + this.$message.error(info); | ||
338 | + } | ||
339 | + } else { | ||
340 | + this.$message.error("数据有误,请检查!"); | ||
341 | + } | ||
317 | }); | 342 | }); |
318 | - this.loading = false; | ||
319 | - if (status === 0) { | ||
320 | - this.$message.success("修改成功~"); | ||
321 | - this.diaSchool = false; | ||
322 | - this._QueryDataSchool(); | ||
323 | - } else { | ||
324 | - this.$message.error(info); | ||
325 | - } | ||
326 | }, | 343 | }, |
327 | async editGrade() { | 344 | async editGrade() { |
328 | if (!this.formGrade.subjectNames.length) { | 345 | if (!this.formGrade.subjectNames.length) { |
@@ -486,24 +503,24 @@ export default { | @@ -486,24 +503,24 @@ export default { | ||
486 | } | 503 | } |
487 | .form-box { | 504 | .form-box { |
488 | margin: 0 20px; | 505 | margin: 0 20px; |
489 | - .subject-box{ | ||
490 | - height:90px; | ||
491 | - overflow:hidden; | ||
492 | - position:relative; | ||
493 | - &.active{ | ||
494 | - height:auto; | ||
495 | - overflow:auto; | 506 | + .subject-box { |
507 | + height: 90px; | ||
508 | + overflow: hidden; | ||
509 | + position: relative; | ||
510 | + &.active { | ||
511 | + height: auto; | ||
512 | + overflow: auto; | ||
496 | } | 513 | } |
497 | - .showAll{ | ||
498 | - position:absolute; | ||
499 | - bottom:0; | ||
500 | - right:10px; | 514 | + .showAll { |
515 | + position: absolute; | ||
516 | + bottom: 0; | ||
517 | + right: 10px; | ||
501 | font-size: 12px; | 518 | font-size: 12px; |
502 | color: #7f7f7f; | 519 | color: #7f7f7f; |
503 | cursor: pointer; | 520 | cursor: pointer; |
504 | - padding:2px; | ||
505 | - &:hover{ | ||
506 | - color:#667ffd | 521 | + padding: 2px; |
522 | + &:hover { | ||
523 | + color: #667ffd; | ||
507 | } | 524 | } |
508 | } | 525 | } |
509 | } | 526 | } |
src/views/setUp/student.vue
@@ -111,6 +111,7 @@ | @@ -111,6 +111,7 @@ | ||
111 | </div> | 111 | </div> |
112 | <el-dialog title="添加学生" :visible.sync="diaStu" width="400"> | 112 | <el-dialog title="添加学生" :visible.sync="diaStu" width="400"> |
113 | <el-form | 113 | <el-form |
114 | + ref="formBox" | ||
114 | class="form-box" | 115 | class="form-box" |
115 | :model="formStu" | 116 | :model="formStu" |
116 | :rules="rulesStu" | 117 | :rules="rulesStu" |
@@ -121,12 +122,12 @@ | @@ -121,12 +122,12 @@ | ||
121 | </el-form-item> | 122 | </el-form-item> |
122 | <el-form-item label="学生姓名:" prop="studentName"> | 123 | <el-form-item label="学生姓名:" prop="studentName"> |
123 | <el-col :span="10"> | 124 | <el-col :span="10"> |
124 | - <el-input maxlength="30" v-model.trim="formStu.studentName" /> | 125 | + <el-input maxlength="30" placeholder="输入学生姓名" v-model.trim="formStu.studentName" /> |
125 | </el-col> | 126 | </el-col> |
126 | </el-form-item> | 127 | </el-form-item> |
127 | <el-form-item label="长学号:" prop="studentCode"> | 128 | <el-form-item label="长学号:" prop="studentCode"> |
128 | <el-col :span="10"> | 129 | <el-col :span="10"> |
129 | - <el-input maxlength="12" v-model.trim="formStu.studentCode" /> | 130 | + <el-input maxlength="12" placeholder="输入学生长学号" v-model.trim="formStu.studentCode" /> |
130 | </el-col> | 131 | </el-col> |
131 | </el-form-item> | 132 | </el-form-item> |
132 | <el-form-item label="短学号:"> | 133 | <el-form-item label="短学号:"> |
@@ -296,7 +297,7 @@ export default { | @@ -296,7 +297,7 @@ export default { | ||
296 | if (status === 0) { | 297 | if (status === 0) { |
297 | this.$message.success("删除成功"); | 298 | this.$message.success("删除成功"); |
298 | this.studentList.splice(index, 1); | 299 | this.studentList.splice(index, 1); |
299 | - this._QueryClass() | 300 | + this._QueryClass(); |
300 | } else { | 301 | } else { |
301 | this.$message.error(info); | 302 | this.$message.error(info); |
302 | } | 303 | } |
@@ -306,7 +307,7 @@ export default { | @@ -306,7 +307,7 @@ export default { | ||
306 | await this._QueryClass(val); | 307 | await this._QueryClass(val); |
307 | this._QueryData(3); | 308 | this._QueryData(3); |
308 | }, | 309 | }, |
309 | - async addStu() { | 310 | + addStu() { |
310 | let query = {}; | 311 | let query = {}; |
311 | for (let key in this.formStu) { | 312 | for (let key in this.formStu) { |
312 | if (key != "className" && this.formStu[key]) { | 313 | if (key != "className" && this.formStu[key]) { |
@@ -314,20 +315,26 @@ export default { | @@ -314,20 +315,26 @@ export default { | ||
314 | } | 315 | } |
315 | } | 316 | } |
316 | this.loading = true; | 317 | this.loading = true; |
317 | - const { data, status, info } = await this.$request.addStudent({ | ||
318 | - classId: this.query.classId, | ||
319 | - ...query, | 318 | + this.$refs.formBox.validate(async (valid) => { |
319 | + if (valid) { | ||
320 | + const { data, status, info } = await this.$request.addStudent({ | ||
321 | + classId: this.query.classId, | ||
322 | + ...query, | ||
323 | + }); | ||
324 | + this.loading = false; | ||
325 | + console.log(status); | ||
326 | + if (status === 0) { | ||
327 | + this.$message.success(info); | ||
328 | + this.diaStu = false; | ||
329 | + this._QueryClass(); | ||
330 | + this._QueryData(); | ||
331 | + } else { | ||
332 | + this.$message.error(info); | ||
333 | + } | ||
334 | + } else { | ||
335 | + this.$message.error("数据有误,请检查!"); | ||
336 | + } | ||
320 | }); | 337 | }); |
321 | - this.loading = false; | ||
322 | - console.log(status); | ||
323 | - if (status === 0) { | ||
324 | - this.$message.success(info); | ||
325 | - this.diaStu = false; | ||
326 | - this._QueryClass() | ||
327 | - this._QueryData(); | ||
328 | - } else { | ||
329 | - this.$message.error(info); | ||
330 | - } | ||
331 | }, | 338 | }, |
332 | async _QueryData(type) { | 339 | async _QueryData(type) { |
333 | let query = {}; | 340 | let query = {}; |
@@ -342,8 +349,8 @@ export default { | @@ -342,8 +349,8 @@ export default { | ||
342 | } else if (type == 3) { | 349 | } else if (type == 3) { |
343 | this.query.studentName = ""; | 350 | this.query.studentName = ""; |
344 | this.query.studentCode = ""; | 351 | this.query.studentCode = ""; |
345 | - }else{ | ||
346 | - query = this.query | 352 | + } else { |
353 | + query = this.query; | ||
347 | } | 354 | } |
348 | this.loading = true; | 355 | this.loading = true; |
349 | const { data, status, info } = await this.$request.studentList({ | 356 | const { data, status, info } = await this.$request.studentList({ |
src/views/setUp/teacher.vue
@@ -300,7 +300,7 @@ | @@ -300,7 +300,7 @@ | ||
300 | > | 300 | > |
301 | </el-option> | 301 | </el-option> |
302 | </el-select> | 302 | </el-select> |
303 | - <el-cascader | 303 | + <el-cascader size="small" |
304 | v-if="item.roleId == 6" | 304 | v-if="item.roleId == 6" |
305 | class="sel-t" | 305 | class="sel-t" |
306 | collapse | 306 | collapse |
@@ -310,7 +310,7 @@ | @@ -310,7 +310,7 @@ | ||
310 | :options="gradeClassList" | 310 | :options="gradeClassList" |
311 | :props="{ expandTrigger: 'hover' }" | 311 | :props="{ expandTrigger: 'hover' }" |
312 | ></el-cascader> | 312 | ></el-cascader> |
313 | - <el-cascader | 313 | + <el-cascader size="small" |
314 | v-if="item.roleId == 7" | 314 | v-if="item.roleId == 7" |
315 | class="sel-t" | 315 | class="sel-t" |
316 | collapse | 316 | collapse |
@@ -320,7 +320,7 @@ | @@ -320,7 +320,7 @@ | ||
320 | :options="classList" | 320 | :options="classList" |
321 | :props="{ expandTrigger: 'hover' }" | 321 | :props="{ expandTrigger: 'hover' }" |
322 | ></el-cascader> | 322 | ></el-cascader> |
323 | - <el-cascader | 323 | + <el-cascader size="small" |
324 | v-if="item.roleId == 8" | 324 | v-if="item.roleId == 8" |
325 | class="sel-t" | 325 | class="sel-t" |
326 | collapse | 326 | collapse |
src/views/test/index.vue
@@ -25,7 +25,6 @@ | @@ -25,7 +25,6 @@ | ||
25 | v-if="role == 'ROLE_BANZHUREN'" | 25 | v-if="role == 'ROLE_BANZHUREN'" |
26 | class="sel" | 26 | class="sel" |
27 | multiple | 27 | multiple |
28 | - collapse-tags | ||
29 | v-model="query.subjectId" | 28 | v-model="query.subjectId" |
30 | placeholder="选择科目" | 29 | placeholder="选择科目" |
31 | @change="_QueryData" | 30 | @change="_QueryData" |