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