Commit ec6394d12629bc985c2e7342cd30efcea8219a27
1 parent
24f4b248
v1.3.1。细节调整
Showing
9 changed files
with
192 additions
and
72 deletions
src/api/apis/apis.js
@@ -410,6 +410,14 @@ export default { | @@ -410,6 +410,14 @@ export default { | ||
410 | data, | 410 | data, |
411 | }); | 411 | }); |
412 | }, | 412 | }, |
413 | + // 删除科目 | ||
414 | + delSubject(data) { | ||
415 | + return service({ | ||
416 | + url: setUpUrls.delSubject, | ||
417 | + method: "POST", | ||
418 | + data, | ||
419 | + }); | ||
420 | + }, | ||
413 | // 修改年级信息 | 421 | // 修改年级信息 |
414 | updateGrade(data) { | 422 | updateGrade(data) { |
415 | return service({ | 423 | return service({ |
@@ -600,6 +608,14 @@ export default { | @@ -600,6 +608,14 @@ export default { | ||
600 | data, | 608 | data, |
601 | }); | 609 | }); |
602 | }, | 610 | }, |
611 | + // 设备自动升级状态(全部) | ||
612 | + modifyUpgradeFlagBySchool(data) { | ||
613 | + return service({ | ||
614 | + url: setUpUrls.modifyUpgradeFlagBySchool, | ||
615 | + method: "POST", | ||
616 | + data, | ||
617 | + }); | ||
618 | + }, | ||
603 | // 修改基站信息 | 619 | // 修改基站信息 |
604 | updateDevice(data) { | 620 | updateDevice(data) { |
605 | return service({ | 621 | return service({ |
src/api/urls/apis.js
@@ -99,6 +99,8 @@ export default { | @@ -99,6 +99,8 @@ export default { | ||
99 | gradeList: "/api_html/school/manager/gradeList", | 99 | gradeList: "/api_html/school/manager/gradeList", |
100 | // 查询学校所有科目 | 100 | // 查询学校所有科目 |
101 | subjectList: "/api_html/school/manager/subjectList", | 101 | subjectList: "/api_html/school/manager/subjectList", |
102 | + // 删除科目 | ||
103 | + delSubject: "/api_html/school/manager/delSubject", | ||
102 | // 修改年级信息 | 104 | // 修改年级信息 |
103 | updateGrade: "/api_html/school/manager/updateGrade", | 105 | updateGrade: "/api_html/school/manager/updateGrade", |
104 | // 查询学校班级列表 | 106 | // 查询学校班级列表 |
@@ -148,6 +150,8 @@ export default { | @@ -148,6 +150,8 @@ export default { | ||
148 | deviceLogList: "/api_html/school/manager/deviceLogList", | 150 | deviceLogList: "/api_html/school/manager/deviceLogList", |
149 | // 修改设备自动升级状态 | 151 | // 修改设备自动升级状态 |
150 | modifyUpgradeFlag: "/api_html/school/manager/modifyUpgradeFlag", | 152 | modifyUpgradeFlag: "/api_html/school/manager/modifyUpgradeFlag", |
153 | + // 设备自动升级状态(全部) | ||
154 | + modifyUpgradeFlagBySchool: "/api_html/school/manager/modifyUpgradeFlagBySchool", | ||
151 | // 修改基站信息 | 155 | // 修改基站信息 |
152 | updateDevice: "/api_html/school/manager/updateDevice", | 156 | updateDevice: "/api_html/school/manager/updateDevice", |
153 | // 新增基站 | 157 | // 新增基站 |
src/utils/index.js
@@ -412,7 +412,7 @@ export function getURLParams(variable) { | @@ -412,7 +412,7 @@ export function getURLParams(variable) { | ||
412 | * @param {*} questionCount 题目数目 | 412 | * @param {*} questionCount 题目数目 |
413 | */ | 413 | */ |
414 | function filtterChar(s, b, optionCount) { | 414 | function filtterChar(s, b, optionCount) { |
415 | - const ms = "ABCDEFG"; | 415 | + const ms = "ABCDEFGHIJ"; |
416 | let rs = ""; | 416 | let rs = ""; |
417 | for (let i = 0; i < s.length; i++) { | 417 | for (let i = 0; i < s.length; i++) { |
418 | let c = s[i]; | 418 | let c = s[i]; |
@@ -430,7 +430,7 @@ function filtterChar(s, b, optionCount) { | @@ -430,7 +430,7 @@ function filtterChar(s, b, optionCount) { | ||
430 | } | 430 | } |
431 | 431 | ||
432 | function removeDup(s) { | 432 | function removeDup(s) { |
433 | - const ms = "ABCDEFG"; | 433 | + const ms = "ABCDEFGHIJ"; |
434 | let rs = ""; | 434 | let rs = ""; |
435 | for (let i = 0; i < ms.length; i++) { | 435 | for (let i = 0; i < ms.length; i++) { |
436 | if (s.indexOf(ms[i]) >= 0) { | 436 | if (s.indexOf(ms[i]) >= 0) { |
src/views/examinationPaper/add.vue
@@ -334,7 +334,7 @@ | @@ -334,7 +334,7 @@ | ||
334 | subQuestions.questionType == 3 || | 334 | subQuestions.questionType == 3 || |
335 | subQuestions.questionType == 2 | 335 | subQuestions.questionType == 2 |
336 | " | 336 | " |
337 | - class="answer-box" | 337 | + class="answer-box answer-box2" |
338 | > | 338 | > |
339 | <el-button | 339 | <el-button |
340 | size="mini" | 340 | size="mini" |
@@ -504,7 +504,7 @@ | @@ -504,7 +504,7 @@ | ||
504 | <el-input-number | 504 | <el-input-number |
505 | v-model="questionForm.selectNum" | 505 | v-model="questionForm.selectNum" |
506 | :min="3" | 506 | :min="3" |
507 | - :max="7" | 507 | + :max="10" |
508 | :step-strictly="true" | 508 | :step-strictly="true" |
509 | :step="1" | 509 | :step="1" |
510 | label="label" | 510 | label="label" |
@@ -1048,7 +1048,7 @@ export default { | @@ -1048,7 +1048,7 @@ export default { | ||
1048 | { label: "判断题", value: 4 }, | 1048 | { label: "判断题", value: 4 }, |
1049 | { label: "主观题", value: 5 }, | 1049 | { label: "主观题", value: 5 }, |
1050 | ], | 1050 | ], |
1051 | - rightOptions: ["A", "B", "C", "D", "E", "F", "G"], | 1051 | + rightOptions: ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"], |
1052 | addSubQuestionsType: "", | 1052 | addSubQuestionsType: "", |
1053 | }; | 1053 | }; |
1054 | }, | 1054 | }, |
@@ -1345,8 +1345,8 @@ export default { | @@ -1345,8 +1345,8 @@ export default { | ||
1345 | this.diaSetAns = false; | 1345 | this.diaSetAns = false; |
1346 | }, | 1346 | }, |
1347 | keydownAnswer(event, type, isAddBig) { | 1347 | keydownAnswer(event, type, isAddBig) { |
1348 | - let answerA = "ABCDEFG"; | ||
1349 | - let answer_a = "abcdefg"; | 1348 | + let answerA = "ABCDEFGHIJ"; |
1349 | + let answer_a = "abcdefghij"; | ||
1350 | if (isAddBig) { | 1350 | if (isAddBig) { |
1351 | answerA = answerA.substring(0, this.questionForm.selectNum); | 1351 | answerA = answerA.substring(0, this.questionForm.selectNum); |
1352 | answer_a = answer_a.substring(0, this.questionForm.selectNum); | 1352 | answer_a = answer_a.substring(0, this.questionForm.selectNum); |
@@ -1646,7 +1646,7 @@ export default { | @@ -1646,7 +1646,7 @@ export default { | ||
1646 | //添加选项 | 1646 | //添加选项 |
1647 | addOptions(subQuestions) { | 1647 | addOptions(subQuestions) { |
1648 | let length = subQuestions.answerOptions.split(",").length; | 1648 | let length = subQuestions.answerOptions.split(",").length; |
1649 | - if (length > 6) return; | 1649 | + if (length > 9) return; |
1650 | subQuestions.selectNum = length + 1; | 1650 | subQuestions.selectNum = length + 1; |
1651 | subQuestions.answerOptions = this.rightOptions | 1651 | subQuestions.answerOptions = this.rightOptions |
1652 | .slice(0, subQuestions.selectNum) | 1652 | .slice(0, subQuestions.selectNum) |
@@ -1940,11 +1940,15 @@ export default { | @@ -1940,11 +1940,15 @@ export default { | ||
1940 | .answer-s { | 1940 | .answer-s { |
1941 | cursor: pointer; | 1941 | cursor: pointer; |
1942 | user-select: none; | 1942 | user-select: none; |
1943 | + margin-bottom: 10px; | ||
1943 | &:first-of-type { | 1944 | &:first-of-type { |
1944 | margin-left: 0; | 1945 | margin-left: 0; |
1945 | } | 1946 | } |
1946 | } | 1947 | } |
1947 | } | 1948 | } |
1949 | + .answer-box2 { | ||
1950 | + margin-bottom: 10px; | ||
1951 | + } | ||
1948 | .delButton { | 1952 | .delButton { |
1949 | text-indent: -9999999px; | 1953 | text-indent: -9999999px; |
1950 | border-color: #ff6868; | 1954 | border-color: #ff6868; |
@@ -2169,10 +2173,7 @@ export default { | @@ -2169,10 +2173,7 @@ export default { | ||
2169 | flex: 1; | 2173 | flex: 1; |
2170 | } | 2174 | } |
2171 | .qs-set { | 2175 | .qs-set { |
2172 | - width: 190px; | ||
2173 | - .delete { | ||
2174 | - margin-left: 9px; | ||
2175 | - } | 2176 | + width: 60px; |
2176 | } | 2177 | } |
2177 | .qs-options2 { | 2178 | .qs-options2 { |
2178 | text-align: left; | 2179 | text-align: left; |
src/views/layout/layout.vue
@@ -13,9 +13,6 @@ | @@ -13,9 +13,6 @@ | ||
13 | <transition name="main" mode="out-in"> | 13 | <transition name="main" mode="out-in"> |
14 | <router-view v-if="!$route.meta.keepAlive" key="not-keepAlive"></router-view> | 14 | <router-view v-if="!$route.meta.keepAlive" key="not-keepAlive"></router-view> |
15 | </transition> | 15 | </transition> |
16 | - <!-- <transition name="main" mode="out-in"> | ||
17 | - <router-view key="not-keepAlive"></router-view> | ||
18 | - </transition> --> | ||
19 | </el-main> | 16 | </el-main> |
20 | <el-footer height="28px"> | 17 | <el-footer height="28px"> |
21 | <Bottom></Bottom> | 18 | <Bottom></Bottom> |
src/views/standard/device/index.vue
@@ -396,6 +396,11 @@ | @@ -396,6 +396,11 @@ | ||
396 | >停止自动更新</el-button | 396 | >停止自动更新</el-button |
397 | > | 397 | > |
398 | </div> | 398 | </div> |
399 | + <p class="upgrade-all" v-if="this.role == 'ROLE_XUEXIAO'"> | ||
400 | + <span>全校更新:</span> | ||
401 | + <el-switch v-model="upgradeFlag" @change="changeUpdateBySchool"> | ||
402 | + </el-switch> | ||
403 | + </p> | ||
399 | </div> | 404 | </div> |
400 | <p class="loading" v-if="!tableData.length && loading"> | 405 | <p class="loading" v-if="!tableData.length && loading"> |
401 | 加载中<i class="el-icon-loading"></i> | 406 | 加载中<i class="el-icon-loading"></i> |
@@ -682,6 +687,7 @@ export default { | @@ -682,6 +687,7 @@ export default { | ||
682 | page: 1, | 687 | page: 1, |
683 | size: 20, | 688 | size: 20, |
684 | isBack: false, //是否是日志页面回来 | 689 | isBack: false, //是否是日志页面回来 |
690 | + upgradeFlag: false, | ||
685 | }; | 691 | }; |
686 | }, | 692 | }, |
687 | created() { | 693 | created() { |
@@ -816,6 +822,9 @@ export default { | @@ -816,6 +822,9 @@ export default { | ||
816 | return item.id; | 822 | return item.id; |
817 | }); | 823 | }); |
818 | }, | 824 | }, |
825 | + changeUpdateBySchool: _.debounce(function (event) { | ||
826 | + this._ModifyUpgradeFlagBySchool(); | ||
827 | + }, 800), | ||
819 | changeUpdate: _.debounce(function (event, obj) { | 828 | changeUpdate: _.debounce(function (event, obj) { |
820 | console.log(this); | 829 | console.log(this); |
821 | if (event) { | 830 | if (event) { |
@@ -839,6 +848,18 @@ export default { | @@ -839,6 +848,18 @@ export default { | ||
839 | this.isAdd = true; | 848 | this.isAdd = true; |
840 | this.diaAnswerEqu = true; | 849 | this.diaAnswerEqu = true; |
841 | }, | 850 | }, |
851 | + _ModifyUpgradeFlagBySchool() { | ||
852 | + let data = this.$request.modifyUpgradeFlagBySchool({ | ||
853 | + upgradeFlag: this.upgradeFlag ? 1 : 0, | ||
854 | + }); | ||
855 | + if (data && !data.code) { | ||
856 | + this._QueryData(false); | ||
857 | + this.selectionTabIds = []; | ||
858 | + this.$message.success("开启自动更新成功"); | ||
859 | + } else { | ||
860 | + this.$message.error(data.info); | ||
861 | + } | ||
862 | + }, | ||
842 | async showSchool() { | 863 | async showSchool() { |
843 | const { data, status, info } = await this.$request.schoolList(); | 864 | const { data, status, info } = await this.$request.schoolList(); |
844 | if (status === 0) { | 865 | if (status === 0) { |
@@ -1287,6 +1308,10 @@ export default { | @@ -1287,6 +1308,10 @@ export default { | ||
1287 | .answer-header { | 1308 | .answer-header { |
1288 | padding: 0; | 1309 | padding: 0; |
1289 | margin-bottom: 12px; | 1310 | margin-bottom: 12px; |
1311 | + .upgrade-all{ | ||
1312 | + display: flex; | ||
1313 | + align-items: center; | ||
1314 | + } | ||
1290 | } | 1315 | } |
1291 | } | 1316 | } |
1292 | } | 1317 | } |
src/views/standard/setUp/school.vue
@@ -121,7 +121,7 @@ | @@ -121,7 +121,7 @@ | ||
121 | label-width="160px" | 121 | label-width="160px" |
122 | > | 122 | > |
123 | <el-form-item label="科目:" prop="subjectNames"> | 123 | <el-form-item label="科目:" prop="subjectNames"> |
124 | - <div class="subject-box" :class="showAll ? 'active' : ''"> | 124 | + <div class="subject-box" v-loading="subjectLoading" :class="showAll ? 'active' : ''"> |
125 | <span | 125 | <span |
126 | v-show="subjectList.length > 12" | 126 | v-show="subjectList.length > 12" |
127 | class="showAll" | 127 | class="showAll" |
@@ -129,12 +129,10 @@ | @@ -129,12 +129,10 @@ | ||
129 | >{{ showAll ? "收起" : "更多..." }}</span | 129 | >{{ showAll ? "收起" : "更多..." }}</span |
130 | > | 130 | > |
131 | <el-checkbox-group v-model="formGrade.subjectNames"> | 131 | <el-checkbox-group v-model="formGrade.subjectNames"> |
132 | - <el-checkbox | ||
133 | - v-for="item in subjectList" | ||
134 | - :label="item" | ||
135 | - :key="item" | ||
136 | - >{{ item }}</el-checkbox | ||
137 | - > | 132 | + <p class="p1" v-for="(item, index) in subjectList" :key="item"> |
133 | + <el-checkbox :label="item">{{ item }}</el-checkbox> | ||
134 | + <i class="el-icon-delete" @click="_DelSubject(item, index)"></i> | ||
135 | + </p> | ||
138 | </el-checkbox-group> | 136 | </el-checkbox-group> |
139 | </div> | 137 | </div> |
140 | <el-col :span="8"> | 138 | <el-col :span="8"> |
@@ -301,6 +299,7 @@ export default { | @@ -301,6 +299,7 @@ export default { | ||
301 | }, | 299 | }, |
302 | subjectName: "", | 300 | subjectName: "", |
303 | sectionsList: [], | 301 | sectionsList: [], |
302 | + subjectLoading:false, | ||
304 | subjectList: [], | 303 | subjectList: [], |
305 | diaUpgradeGrade: false, //班级升级 | 304 | diaUpgradeGrade: false, //班级升级 |
306 | defaultSections: [], | 305 | defaultSections: [], |
@@ -399,6 +398,20 @@ export default { | @@ -399,6 +398,20 @@ export default { | ||
399 | } | 398 | } |
400 | }); | 399 | }); |
401 | }, | 400 | }, |
401 | + async _DelSubject(subject, index) { | ||
402 | + if(this.subjectLoading)return | ||
403 | + this.subjectLoading = true | ||
404 | + const { status, info } = await this.$request.delSubject({ | ||
405 | + subjectName: subject, | ||
406 | + }); | ||
407 | + this.subjectLoading = false | ||
408 | + if (status === 0) { | ||
409 | + this.$message.success(info); | ||
410 | + this.subjectList.splice(index, 1); | ||
411 | + } else { | ||
412 | + this.$message.error(info); | ||
413 | + } | ||
414 | + }, | ||
402 | async _UpgradeGrade() { | 415 | async _UpgradeGrade() { |
403 | this.loading = true; | 416 | this.loading = true; |
404 | const { data, status, info } = await this.$request.upgradeGrade(); | 417 | const { data, status, info } = await this.$request.upgradeGrade(); |
@@ -640,9 +653,6 @@ export default { | @@ -640,9 +653,6 @@ export default { | ||
640 | color: #667ffd; | 653 | color: #667ffd; |
641 | } | 654 | } |
642 | } | 655 | } |
643 | - .el-checkbox:last-of-type { | ||
644 | - margin-right: 30px; | ||
645 | - } | ||
646 | } | 656 | } |
647 | } | 657 | } |
648 | .el-icon-plus { | 658 | .el-icon-plus { |
@@ -651,4 +661,29 @@ export default { | @@ -651,4 +661,29 @@ export default { | ||
651 | color: #667ffd; | 661 | color: #667ffd; |
652 | } | 662 | } |
653 | } | 663 | } |
664 | +:deep(.el-checkbox-group) { | ||
665 | + display: flex; | ||
666 | + flex-wrap: wrap; | ||
667 | + .p1 { | ||
668 | + padding-right: 30px; | ||
669 | + position: relative; | ||
670 | + &:hover { | ||
671 | + .el-icon-delete { | ||
672 | + display: block; | ||
673 | + } | ||
674 | + .is-checked + .el-icon-delete { | ||
675 | + display: none; | ||
676 | + } | ||
677 | + } | ||
678 | + } | ||
679 | + .el-icon-delete { | ||
680 | + font-size: 14px; | ||
681 | + color: #999; | ||
682 | + position: absolute; | ||
683 | + right: 10px; | ||
684 | + top: 13px; | ||
685 | + cursor: pointer; | ||
686 | + display: none; | ||
687 | + } | ||
688 | +} | ||
654 | </style> | 689 | </style> |
655 | \ No newline at end of file | 690 | \ No newline at end of file |
src/views/standard/setUp/student.vue
@@ -32,7 +32,34 @@ | @@ -32,7 +32,34 @@ | ||
32 | </el-tooltip> | 32 | </el-tooltip> |
33 | </template> | 33 | </template> |
34 | </back-box> | 34 | </back-box> |
35 | - | 35 | + <div class="answer-header"> |
36 | + <div class="sel-box"> | ||
37 | + <el-input | ||
38 | + placeholder="请输入学生姓名" | ||
39 | + v-model="query.studentName" | ||
40 | + class="input-with-select" | ||
41 | + @keyup.enter.native="_QueryData(1)" | ||
42 | + > | ||
43 | + <el-button | ||
44 | + slot="append" | ||
45 | + icon="el-icon-search" | ||
46 | + @click="_QueryData(1)" | ||
47 | + ></el-button> | ||
48 | + </el-input> | ||
49 | + <el-input | ||
50 | + placeholder="请输入学生学号" | ||
51 | + v-model="query.studentCode" | ||
52 | + class="input-with-select" | ||
53 | + @keyup.enter.native="_QueryData(2)" | ||
54 | + > | ||
55 | + <el-button | ||
56 | + slot="append" | ||
57 | + icon="el-icon-search" | ||
58 | + @click="_QueryData(2)" | ||
59 | + ></el-button> | ||
60 | + </el-input> | ||
61 | + </div> | ||
62 | + </div> | ||
36 | <div class="page-content"> | 63 | <div class="page-content"> |
37 | <!-- <template v-if="!code && role !== 'ROLE_PERSONAL'"> | 64 | <!-- <template v-if="!code && role !== 'ROLE_PERSONAL'"> |
38 | <p class="tips" v-show="archivedTotal"> | 65 | <p class="tips" v-show="archivedTotal"> |
@@ -93,34 +120,7 @@ | @@ -93,34 +120,7 @@ | ||
93 | <p>配对码:{{ clazzDetail.pairingCode }}</p> | 120 | <p>配对码:{{ clazzDetail.pairingCode }}</p> |
94 | <p>频点:{{ clazzDetail.frequency }}</p> | 121 | <p>频点:{{ clazzDetail.frequency }}</p> |
95 | </div> | 122 | </div> |
96 | - <div class="answer-header"> | ||
97 | - <div class="sel-box"> | ||
98 | - <el-input | ||
99 | - placeholder="请输入学生姓名" | ||
100 | - v-model="query.studentName" | ||
101 | - class="input-with-select" | ||
102 | - @keyup.enter.native="_QueryData(1)" | ||
103 | - > | ||
104 | - <el-button | ||
105 | - slot="append" | ||
106 | - icon="el-icon-search" | ||
107 | - @click="_QueryData(1)" | ||
108 | - ></el-button> | ||
109 | - </el-input> | ||
110 | - <el-input | ||
111 | - placeholder="请输入学生学号" | ||
112 | - v-model="query.studentCode" | ||
113 | - class="input-with-select" | ||
114 | - @keyup.enter.native="_QueryData(2)" | ||
115 | - > | ||
116 | - <el-button | ||
117 | - slot="append" | ||
118 | - icon="el-icon-search" | ||
119 | - @click="_QueryData(2)" | ||
120 | - ></el-button> | ||
121 | - </el-input> | ||
122 | - </div> | ||
123 | - </div> | 123 | + |
124 | <ul class="s-ul" v-loading="loading"> | 124 | <ul class="s-ul" v-loading="loading"> |
125 | <li | 125 | <li |
126 | class="s-li" | 126 | class="s-li" |
@@ -134,8 +134,17 @@ | @@ -134,8 +134,17 @@ | ||
134 | > | 134 | > |
135 | <i class="el-icon-delete" slot="reference"></i> | 135 | <i class="el-icon-delete" slot="reference"></i> |
136 | </el-popconfirm> | 136 | </el-popconfirm> |
137 | - <i class="el-icon-user-solid" v-if="!code" @click="openChangeClazz(item)"></i> | ||
138 | - <p class="name">{{ item.studentName }}</p> | 137 | + <i |
138 | + class="el-icon-user-solid" | ||
139 | + v-if="!code" | ||
140 | + @click="openChangeClazz(item)" | ||
141 | + ></i> | ||
142 | + <p class="name"> | ||
143 | + {{ item.studentName }} | ||
144 | + </p> | ||
145 | + <p class="p2" v-if="!query.classId"> | ||
146 | + {{ getGradeName(item.grade) }}﹒{{ item.className }} | ||
147 | + </p> | ||
139 | <p class="p1">答题器:{{ item.clickerSn || "--" }}</p> | 148 | <p class="p1">答题器:{{ item.clickerSn || "--" }}</p> |
140 | <p class="p1">长学号:{{ item.studentCode }}</p> | 149 | <p class="p1">长学号:{{ item.studentCode }}</p> |
141 | <p class="p1">短学号:{{ item.shortNumber || "--" }}</p> | 150 | <p class="p1">短学号:{{ item.shortNumber || "--" }}</p> |
@@ -296,7 +305,9 @@ | @@ -296,7 +305,9 @@ | ||
296 | </div> | 305 | </div> |
297 | </el-dialog> | 306 | </el-dialog> |
298 | <el-dialog title="班级归档" :visible.sync="diaArchiving" width="400"> | 307 | <el-dialog title="班级归档" :visible.sync="diaArchiving" width="400"> |
299 | - <p>注意班级归档后,学生解除班级关系且相关老师任课信息将不存在,确认要将班级归档吗?</p> | 308 | + <p> |
309 | + 注意班级归档后,学生解除班级关系且相关老师任课信息将不存在,确认要将班级归档吗? | ||
310 | + </p> | ||
300 | <div class="dialog-footer" slot="footer"> | 311 | <div class="dialog-footer" slot="footer"> |
301 | <el-button type="danger" @click="archivingClass">确认归档</el-button> | 312 | <el-button type="danger" @click="archivingClass">确认归档</el-button> |
302 | <el-button type="primary" @click="diaArchiving = false" | 313 | <el-button type="primary" @click="diaArchiving = false" |
@@ -309,6 +320,7 @@ | @@ -309,6 +320,7 @@ | ||
309 | 320 | ||
310 | <script> | 321 | <script> |
311 | import _ from "lodash"; | 322 | import _ from "lodash"; |
323 | +import { setGradeName } from "@/utils"; | ||
312 | export default { | 324 | export default { |
313 | data() { | 325 | data() { |
314 | return { | 326 | return { |
@@ -398,10 +410,13 @@ export default { | @@ -398,10 +410,13 @@ export default { | ||
398 | this._QueryData(3); | 410 | this._QueryData(3); |
399 | }, | 411 | }, |
400 | methods: { | 412 | methods: { |
413 | + getGradeName(type) { | ||
414 | + return setGradeName(type); | ||
415 | + }, | ||
401 | openAddDia() { | 416 | openAddDia() { |
402 | - if(!this.query.classId){ | ||
403 | - this.$message.warning('暂无班级信息,请导入班级!') | ||
404 | - return | 417 | + if (!this.query.classId) { |
418 | + this.$message.warning("暂无班级信息,请选择或导入班级!"); | ||
419 | + return; | ||
405 | } | 420 | } |
406 | this.formStu.studentName = ""; | 421 | this.formStu.studentName = ""; |
407 | this.formStu.studentCode = ""; | 422 | this.formStu.studentCode = ""; |
@@ -503,8 +518,8 @@ export default { | @@ -503,8 +518,8 @@ export default { | ||
503 | this.formStuCla.studentId = obj.id; | 518 | this.formStuCla.studentId = obj.id; |
504 | this.formStuCla.studentName = obj.studentName; | 519 | this.formStuCla.studentName = obj.studentName; |
505 | this.formStuCla.studentCode = obj.studentCode; | 520 | this.formStuCla.studentCode = obj.studentCode; |
506 | - this.formStuCla.classId = this.query.classId; | ||
507 | - this.formStuCla.oldClassId = this.query.classId; | 521 | + this.formStuCla.classId = obj.classId; |
522 | + this.formStuCla.oldClassId = obj.classId; | ||
508 | this.diaChangeClass = true; | 523 | this.diaChangeClass = true; |
509 | }, | 524 | }, |
510 | //学生调班 | 525 | //学生调班 |
@@ -522,7 +537,7 @@ export default { | @@ -522,7 +537,7 @@ export default { | ||
522 | if (status == 0) { | 537 | if (status == 0) { |
523 | this.diaChangeClass = false; | 538 | this.diaChangeClass = false; |
524 | this.$message.success(info); | 539 | this.$message.success(info); |
525 | - this._QueryClass() | 540 | + this._QueryClass(); |
526 | this._QueryData(); | 541 | this._QueryData(); |
527 | } else { | 542 | } else { |
528 | this.$message.error(info); | 543 | this.$message.error(info); |
@@ -588,17 +603,19 @@ export default { | @@ -588,17 +603,19 @@ export default { | ||
588 | }, | 603 | }, |
589 | async _QueryData(type) { | 604 | async _QueryData(type) { |
590 | let query = {}; | 605 | let query = {}; |
591 | - query.gradeName = this.query.gradeName; | ||
592 | - query.classId = this.query.classId; | ||
593 | if (type == 1) { | 606 | if (type == 1) { |
607 | + this.query.classId = ""; | ||
594 | query.studentName = this.query.studentName; | 608 | query.studentName = this.query.studentName; |
595 | this.query.studentCode = ""; | 609 | this.query.studentCode = ""; |
596 | } else if (type == 2) { | 610 | } else if (type == 2) { |
611 | + this.query.classId = ""; | ||
597 | query.studentCode = this.query.studentCode; | 612 | query.studentCode = this.query.studentCode; |
598 | this.query.studentName = ""; | 613 | this.query.studentName = ""; |
599 | } else if (type == 3) { | 614 | } else if (type == 3) { |
600 | this.query.studentName = ""; | 615 | this.query.studentName = ""; |
601 | this.query.studentCode = ""; | 616 | this.query.studentCode = ""; |
617 | + query.gradeName = this.query.gradeName; | ||
618 | + query.classId = this.query.classId; | ||
602 | } else { | 619 | } else { |
603 | query = this.query; | 620 | query = this.query; |
604 | } | 621 | } |
@@ -667,7 +684,7 @@ export default { | @@ -667,7 +684,7 @@ export default { | ||
667 | 684 | ||
668 | <style lang="scss" scoped> | 685 | <style lang="scss" scoped> |
669 | .page-content { | 686 | .page-content { |
670 | - padding: 20px; | 687 | + padding: 0 20px; |
671 | } | 688 | } |
672 | .tips { | 689 | .tips { |
673 | display: flex; | 690 | display: flex; |
@@ -755,7 +772,7 @@ export default { | @@ -755,7 +772,7 @@ export default { | ||
755 | padding-left: 20px; | 772 | padding-left: 20px; |
756 | .s-li { | 773 | .s-li { |
757 | width: 180px; | 774 | width: 180px; |
758 | - height: 120px; | 775 | + min-height: 120px; |
759 | box-shadow: 2px 2px 5px #7f7f7f; | 776 | box-shadow: 2px 2px 5px #7f7f7f; |
760 | border-radius: 10px; | 777 | border-radius: 10px; |
761 | margin: 0 20px 20px 0; | 778 | margin: 0 20px 20px 0; |
@@ -805,12 +822,17 @@ export default { | @@ -805,12 +822,17 @@ export default { | ||
805 | line-height: 20px; | 822 | line-height: 20px; |
806 | padding-bottom: 5px; | 823 | padding-bottom: 5px; |
807 | } | 824 | } |
825 | + .p2 { | ||
826 | + color: #333; | ||
827 | + line-height: 20px; | ||
828 | + padding-bottom: 5px; | ||
829 | + } | ||
808 | } | 830 | } |
809 | } | 831 | } |
810 | } | 832 | } |
811 | .clazz-detail { | 833 | .clazz-detail { |
812 | display: flex; | 834 | display: flex; |
813 | - padding: 12px 12px 0 20px; | 835 | + padding: 12px 12px 12px 20px; |
814 | p { | 836 | p { |
815 | margin-right: 16px; | 837 | margin-right: 16px; |
816 | color: #666; | 838 | color: #666; |
src/views/standard/setUp/teacher.vue
@@ -53,6 +53,7 @@ | @@ -53,6 +53,7 @@ | ||
53 | :value="item.value" | 53 | :value="item.value" |
54 | > | 54 | > |
55 | </el-option> | 55 | </el-option> |
56 | + <el-option label="未分配教师" value="未分配教师"> </el-option> | ||
56 | </el-select> | 57 | </el-select> |
57 | <el-input | 58 | <el-input |
58 | placeholder="请输入老师姓名" | 59 | placeholder="请输入老师姓名" |
@@ -146,7 +147,9 @@ | @@ -146,7 +147,9 @@ | ||
146 | <i class="el-icon-delete" slot="reference"></i> | 147 | <i class="el-icon-delete" slot="reference"></i> |
147 | </el-popconfirm> | 148 | </el-popconfirm> |
148 | <div class="grade-item"> | 149 | <div class="grade-item"> |
149 | - <p class="grade-name">{{ item.className }}</p> | 150 | + <p class="grade-name"> |
151 | + {{ gradeName(item.grade) }}-{{ item.className }} | ||
152 | + </p> | ||
150 | <div class="grade-class"> | 153 | <div class="grade-class"> |
151 | <p> | 154 | <p> |
152 | <i class="fa fa-address-book-o"></i>学生:{{ | 155 | <i class="fa fa-address-book-o"></i>学生:{{ |
@@ -181,7 +184,9 @@ | @@ -181,7 +184,9 @@ | ||
181 | </el-popconfirm> | 184 | </el-popconfirm> |
182 | <div class="grade-item"> | 185 | <div class="grade-item"> |
183 | <p class="grade-name"> | 186 | <p class="grade-name"> |
184 | - {{ item.className }}({{ item.subjectName }}) | 187 | + {{ gradeName(item.grade) }}-{{ item.className }}({{ |
188 | + item.subjectName | ||
189 | + }}) | ||
185 | </p> | 190 | </p> |
186 | <div class="grade-class"> | 191 | <div class="grade-class"> |
187 | <p> | 192 | <p> |
@@ -217,7 +222,9 @@ | @@ -217,7 +222,9 @@ | ||
217 | </el-popconfirm> | 222 | </el-popconfirm> |
218 | <div class="grade-item"> | 223 | <div class="grade-item"> |
219 | <p class="grade-name"> | 224 | <p class="grade-name"> |
220 | - {{ item.gradeName }}({{ item.subjectName }}) | 225 | + {{ gradeName(item.grade) }}-{{ item.gradeName }}({{ |
226 | + item.subjectName | ||
227 | + }}) | ||
221 | </p> | 228 | </p> |
222 | </div> | 229 | </div> |
223 | </li> | 230 | </li> |
@@ -364,7 +371,12 @@ | @@ -364,7 +371,12 @@ | ||
364 | </template> | 371 | </template> |
365 | 372 | ||
366 | <script> | 373 | <script> |
367 | -import { downloadFile, formatGradeClass, randomWord, getBlob } from "@/utils"; | 374 | +import { |
375 | + downloadFile, | ||
376 | + formatGradeClass, | ||
377 | + randomWord, | ||
378 | + setGradeName, | ||
379 | +} from "@/utils"; | ||
368 | export default { | 380 | export default { |
369 | data() { | 381 | data() { |
370 | return { | 382 | return { |
@@ -440,6 +452,9 @@ export default { | @@ -440,6 +452,9 @@ export default { | ||
440 | await this._QueryClass(); | 452 | await this._QueryClass(); |
441 | }, | 453 | }, |
442 | methods: { | 454 | methods: { |
455 | + gradeName(type) { | ||
456 | + return setGradeName(type); | ||
457 | + }, | ||
443 | upSuccess(res) { | 458 | upSuccess(res) { |
444 | //导入成功 | 459 | //导入成功 |
445 | this.$message.closeAll(); | 460 | this.$message.closeAll(); |
@@ -703,6 +718,11 @@ export default { | @@ -703,6 +718,11 @@ export default { | ||
703 | } else if (type == 10) { | 718 | } else if (type == 10) { |
704 | query = { ...this.query }; | 719 | query = { ...this.query }; |
705 | } | 720 | } |
721 | + if (query.gradeName == "未分配教师") { | ||
722 | + query.type = 1; | ||
723 | + } else { | ||
724 | + query.type = 0; | ||
725 | + } | ||
706 | this.loading = true; | 726 | this.loading = true; |
707 | this.teacherList = []; | 727 | this.teacherList = []; |
708 | const { data, status, info } = await this.$request.teacherList({ | 728 | const { data, status, info } = await this.$request.teacherList({ |