Commit ca39cc5253a620b50c780202bbf444040862fd33
1 parent
e823fb79
飞书问题处理
Showing
10 changed files
with
234 additions
and
136 deletions
src/router/index.js
... | ... | @@ -68,22 +68,22 @@ let defaultRouter = [ |
68 | 68 | } |
69 | 69 | ] |
70 | 70 | }, |
71 | - { | |
72 | - path: "/setUpConglomerate", | |
73 | - iconCls: "fa fa-building", // 图标样式class | |
74 | - name: "学校管理", | |
75 | - component: Layout, | |
76 | - alone: true, | |
77 | - children: [ | |
78 | - { | |
79 | - path: "/setUpConglomerate", | |
80 | - iconCls: "fa fa-building", | |
81 | - name: '集团管理', | |
82 | - component: SetUpConglomerate, | |
83 | - children: [] | |
84 | - }, | |
85 | - ] | |
86 | - }, | |
71 | + // { | |
72 | + // path: "/setUpConglomerate", | |
73 | + // iconCls: "fa fa-building", // 图标样式class | |
74 | + // name: "学校管理", | |
75 | + // component: Layout, | |
76 | + // alone: true, | |
77 | + // children: [ | |
78 | + // { | |
79 | + // path: "/setUpConglomerate", | |
80 | + // iconCls: "fa fa-building", | |
81 | + // name: '集团管理', | |
82 | + // component: SetUpConglomerate, | |
83 | + // children: [] | |
84 | + // }, | |
85 | + // ] | |
86 | + // }, | |
87 | 87 | { |
88 | 88 | path: "/404", |
89 | 89 | component: NotFound, |
... | ... | @@ -113,6 +113,7 @@ let addrouters = [ //测试用,后续后端获取 |
113 | 113 | iconCls: "", // 图标样式class |
114 | 114 | name: "添加答题卡", |
115 | 115 | component: ExaminationPaperAdd, |
116 | + parent:"examinationPaper", | |
116 | 117 | children: [] |
117 | 118 | }, |
118 | 119 | { |
... | ... | @@ -120,6 +121,7 @@ let addrouters = [ //测试用,后续后端获取 |
120 | 121 | iconCls: "", // 图标样式class |
121 | 122 | name: "修改答题卡", |
122 | 123 | component: ExaminationPaperEdit, |
124 | + parent:"examinationPaper", | |
123 | 125 | children: [] |
124 | 126 | }, |
125 | 127 | { |
... | ... | @@ -127,6 +129,7 @@ let addrouters = [ //测试用,后续后端获取 |
127 | 129 | iconCls: "", // 图标样式class |
128 | 130 | name: "已归档答题卡", |
129 | 131 | component: ExaminationPaperRecycle, |
132 | + parent:"examinationPaper", | |
130 | 133 | children: [] |
131 | 134 | }, |
132 | 135 | ] |
... | ... | @@ -151,6 +154,7 @@ let addrouters = [ //测试用,后续后端获取 |
151 | 154 | iconCls: "", // 图标样式class |
152 | 155 | name: "随堂问报表分析", |
153 | 156 | component: AskAnalysis, |
157 | + parent:"ask", | |
154 | 158 | children: [] |
155 | 159 | } |
156 | 160 | ] |
... | ... | @@ -174,6 +178,7 @@ let addrouters = [ //测试用,后续后端获取 |
174 | 178 | iconCls: "", // 图标样式class |
175 | 179 | name: "即时测报表分析", |
176 | 180 | component: TestAnalysis, |
181 | + parent:"test", | |
177 | 182 | children: [] |
178 | 183 | } |
179 | 184 | |
... | ... | @@ -292,6 +297,7 @@ let addrouters = [ //测试用,后续后端获取 |
292 | 297 | iconCls: "fa fa-list-alt", // 图标样式class |
293 | 298 | name: "", |
294 | 299 | component: DeviceLog, |
300 | + parent:"device", | |
295 | 301 | children: [] |
296 | 302 | } |
297 | 303 | ] |
... | ... | @@ -331,6 +337,7 @@ let addrouters = [ //测试用,后续后端获取 |
331 | 337 | iconCls: "", // 图标样式class |
332 | 338 | name: "授课端软件", |
333 | 339 | component: DownClient, |
340 | + parent:"down", | |
334 | 341 | children: [] |
335 | 342 | } |
336 | 343 | ] | ... | ... |
src/views/down/client.vue
... | ... | @@ -48,15 +48,17 @@ |
48 | 48 | </li> |
49 | 49 | </ul> |
50 | 50 | </div> |
51 | - <div class="edit-dia" v-show="dialogVis" height="100%"> | |
51 | + <div class="edit-dia" ref="editDia" v-show="dialogVis" height="100%"> | |
52 | 52 | <div class="back"> |
53 | 53 | <div class="back-l" @click="dialogVis = false"> |
54 | 54 | <i class="fa fa-mail-reply-all"></i> |
55 | - <p>参数设置</p> | |
55 | + <p> | |
56 | + {{ `${type == 1 ? "参数设置" : formData.configName + "-修改入口"}` }} | |
57 | + </p> | |
56 | 58 | </div> |
57 | 59 | </div> |
58 | 60 | <div class="form-box"> |
59 | - <el-form :model="formData" label-width="180px"> | |
61 | + <el-form :model="formData" :rules="ruleForm" label-width="180px"> | |
60 | 62 | <el-form-item label="主菜单设置:" prop="configName" v-if="type == 1"> |
61 | 63 | <el-col :span="12"> |
62 | 64 | <el-input |
... | ... | @@ -153,14 +155,14 @@ |
153 | 155 | <el-radio :label="2">老师选择</el-radio> |
154 | 156 | </el-radio-group> |
155 | 157 | <el-input-number |
156 | - v-show="formData.viesAnswerSet != 2" | |
158 | + v-show="formData.viesAnswerSet != 2" | |
157 | 159 | size="small" |
158 | 160 | class="count-down" |
159 | 161 | v-model="formData.countdown" |
160 | 162 | :step="1" |
161 | 163 | :step-strictly="true" |
162 | - ></el-input-number | |
163 | - > <span v-show="formData.viesAnswerSet != 2">秒</span> | |
164 | + ></el-input-number> | |
165 | + <span v-show="formData.viesAnswerSet != 2">秒</span> | |
164 | 166 | </el-form-item> |
165 | 167 | <el-form-item label="抽答设置:" prop="ballotAnswerSet"> |
166 | 168 | <el-radio-group v-model="formData.ballotAnswerSet"> |
... | ... | @@ -337,56 +339,56 @@ export default { |
337 | 339 | configName: [ |
338 | 340 | { required: true, message: "请填写配置名称", trigger: "blur" }, |
339 | 341 | ], |
340 | - mainMenu: [ | |
341 | - { required: true, message: "请选择主菜单", trigger: "blur" }, | |
342 | - ], | |
343 | - popupMenu: [ | |
344 | - { required: true, message: "请选择弹出菜单", trigger: "blur" }, | |
345 | - ], | |
346 | - viesAnswerSet: [ | |
347 | - { required: true, message: "请选择抢答类型", trigger: "blur" }, | |
348 | - ], | |
349 | - countdown: [ | |
350 | - { required: true, message: "请输入抢答倒计时", trigger: "blur" }, | |
351 | - ], | |
352 | - ballotAnswerSet: [ | |
353 | - { required: true, message: "请选择抽答类型", trigger: "blur" }, | |
354 | - ], | |
355 | - singleChoiceNum: [ | |
356 | - { | |
357 | - required: true, | |
358 | - message: "请输入单选题选项默认个数", | |
359 | - trigger: "blur", | |
360 | - }, | |
361 | - ], | |
362 | - multipleChoiceNum: [ | |
363 | - { | |
364 | - required: true, | |
365 | - message: "请输入多选题选项默认个数", | |
366 | - trigger: "blur", | |
367 | - }, | |
368 | - ], | |
369 | - singleTypeNum: [ | |
370 | - { | |
371 | - required: true, | |
372 | - message: "请输入测—单题型默认题数", | |
373 | - trigger: "blur", | |
374 | - }, | |
375 | - ], | |
376 | - displayModel: [ | |
377 | - { | |
378 | - required: true, | |
379 | - message: "请选择答题结构", | |
380 | - trigger: "blur", | |
381 | - }, | |
382 | - ], | |
383 | - languageSet: [ | |
384 | - { | |
385 | - required: true, | |
386 | - message: "请选择语言", | |
387 | - trigger: "blur", | |
388 | - }, | |
389 | - ], | |
342 | + // mainMenu: [ | |
343 | + // { required: true, message: "请选择主菜单", trigger: "blur" }, | |
344 | + // ], | |
345 | + // popupMenu: [ | |
346 | + // { required: true, message: "请选择弹出菜单", trigger: "blur" }, | |
347 | + // ], | |
348 | + // viesAnswerSet: [ | |
349 | + // { required: true, message: "请选择抢答类型", trigger: "blur" }, | |
350 | + // ], | |
351 | + // countdown: [ | |
352 | + // { required: true, message: "请输入抢答倒计时", trigger: "blur" }, | |
353 | + // ], | |
354 | + // ballotAnswerSet: [ | |
355 | + // { required: true, message: "请选择抽答类型", trigger: "blur" }, | |
356 | + // ], | |
357 | + // singleChoiceNum: [ | |
358 | + // { | |
359 | + // required: true, | |
360 | + // message: "请输入单选题选项默认个数", | |
361 | + // trigger: "blur", | |
362 | + // }, | |
363 | + // ], | |
364 | + // multipleChoiceNum: [ | |
365 | + // { | |
366 | + // required: true, | |
367 | + // message: "请输入多选题选项默认个数", | |
368 | + // trigger: "blur", | |
369 | + // }, | |
370 | + // ], | |
371 | + // singleTypeNum: [ | |
372 | + // { | |
373 | + // required: true, | |
374 | + // message: "请输入测—单题型默认题数", | |
375 | + // trigger: "blur", | |
376 | + // }, | |
377 | + // ], | |
378 | + // displayModel: [ | |
379 | + // { | |
380 | + // required: true, | |
381 | + // message: "请选择答题结构", | |
382 | + // trigger: "blur", | |
383 | + // }, | |
384 | + // ], | |
385 | + // languageSet: [ | |
386 | + // { | |
387 | + // required: true, | |
388 | + // message: "请选择语言", | |
389 | + // trigger: "blur", | |
390 | + // }, | |
391 | + // ], | |
390 | 392 | }, |
391 | 393 | menuList: ["问", "测", "析"], |
392 | 394 | }; |
... | ... | @@ -399,6 +401,7 @@ export default { |
399 | 401 | setConfigForm(obj) { |
400 | 402 | let content = JSON.parse(obj.content); |
401 | 403 | console.log(content); |
404 | + this.formData.configName = obj.configName | |
402 | 405 | for (let key in this.formData) { |
403 | 406 | content[key] ? (this.formData[key] = content[key]) : ""; |
404 | 407 | } |
... | ... | @@ -407,6 +410,9 @@ export default { |
407 | 410 | ); |
408 | 411 | this.type = 2; |
409 | 412 | (this.configId = obj.id), (this.dialogVis = true); |
413 | + this.$nextTick(function () { | |
414 | + this.$refs.editDia.scrollTop = 0; | |
415 | + }); | |
410 | 416 | }, |
411 | 417 | setDefaultForm() { |
412 | 418 | for (let key in this.formData) { |
... | ... | @@ -518,6 +524,7 @@ export default { |
518 | 524 | |
519 | 525 | <style lang="scss" scoped> |
520 | 526 | .page-container { |
527 | + width: 100%; | |
521 | 528 | position: relative; |
522 | 529 | } |
523 | 530 | .page-content { | ... | ... |
src/views/down/index.vue
1 | 1 | <template> |
2 | - <div> | |
2 | + <div class="content-box"> | |
3 | 3 | <back-box> |
4 | 4 | <template slot="title"> |
5 | 5 | <span>软件下载</span> |
... | ... | @@ -24,21 +24,24 @@ |
24 | 24 | |
25 | 25 | <script> |
26 | 26 | export default { |
27 | - methods:{ | |
28 | - links(){ | |
27 | + methods: { | |
28 | + links() { | |
29 | 29 | this.$router.push({ |
30 | - path:'/downClient' | |
31 | - }) | |
32 | - } | |
33 | - } | |
30 | + path: "/downClient", | |
31 | + }); | |
32 | + }, | |
33 | + }, | |
34 | 34 | }; |
35 | 35 | </script> |
36 | 36 | |
37 | 37 | <style lang="scss" scoped> |
38 | +.content-box { | |
39 | + width: 100%; | |
40 | +} | |
38 | 41 | .page-content { |
39 | - padding: 50px; | |
40 | 42 | display: flex; |
41 | - justify-content: center; | |
43 | + padding-top: 50px; | |
44 | + margin-left: 240px; | |
42 | 45 | .down-item { |
43 | 46 | width: 200px; |
44 | 47 | padding: 50px 20px; | ... | ... |
src/views/examinationPaper/add.vue
1 | 1 | <template> |
2 | - <div> | |
2 | + <div ref="content" class="content-box"> | |
3 | 3 | <back-box> |
4 | 4 | <template slot="title"> |
5 | 5 | <span>{{ "创建答题卡" }}</span> |
... | ... | @@ -24,17 +24,15 @@ |
24 | 24 | label-width="140px" |
25 | 25 | > |
26 | 26 | <el-form-item label="答题卡名称:" prop="title"> |
27 | - <el-col :span="10" | |
28 | - ><el-input | |
29 | - type="text" | |
30 | - placeholder="请输入答题卡名称" | |
31 | - v-model.trim="form.title" | |
32 | - maxlength="30" | |
33 | - size="45" | |
34 | - show-word-limit | |
35 | - > | |
36 | - </el-input | |
37 | - ></el-col> | |
27 | + <el-input | |
28 | + type="text" | |
29 | + placeholder="请输入答题卡名称" | |
30 | + v-model.trim="form.title" | |
31 | + maxlength="30" | |
32 | + size="45" | |
33 | + show-word-limit | |
34 | + > | |
35 | + </el-input> | |
38 | 36 | </el-form-item> |
39 | 37 | <el-form-item label="测验类型:"> |
40 | 38 | <el-select v-model="form.tagId" placeholder="选择测验类型"> |
... | ... | @@ -312,7 +310,7 @@ |
312 | 310 | label-width="100px" |
313 | 311 | > |
314 | 312 | <el-form-item label="标题:" prop="questionTitle"> |
315 | - <el-col :span="12"> | |
313 | + <el-col :span="20"> | |
316 | 314 | <el-input |
317 | 315 | v-model.trim="questionForm.questionTitle" |
318 | 316 | maxlength="30" |
... | ... | @@ -362,7 +360,7 @@ |
362 | 360 | </p> |
363 | 361 | <ul class="questions-ul"> |
364 | 362 | <li class="sub-questions"> |
365 | - <div class="qs-num">题号</div> | |
363 | + <div class="qs-num">题号</div> | |
366 | 364 | <div class="qs-type">题型</div> |
367 | 365 | <div class="qs-score">分数</div> |
368 | 366 | <div class="qs-partScore">漏选得分</div> |
... | ... | @@ -487,6 +485,13 @@ export default { |
487 | 485 | return Number(score).toFixed(2); |
488 | 486 | }, |
489 | 487 | }, |
488 | + watch:{ | |
489 | + step:function(){ | |
490 | + this.$nextTick(function(){ | |
491 | + this.$refs.content.scrollTop = 0 | |
492 | + }) | |
493 | + } | |
494 | + }, | |
490 | 495 | data() { |
491 | 496 | return { |
492 | 497 | type: 1, //1-创建,2-复制答题卡 |
... | ... | @@ -662,7 +667,7 @@ export default { |
662 | 667 | return; |
663 | 668 | } else { |
664 | 669 | this.$message.error( |
665 | - `大题名称不能为空,请检查第${valid.slice(0,-1)}大题!` | |
670 | + `大题名称不能为空,请检查第${valid.slice(0, -1)}大题!` | |
666 | 671 | ); |
667 | 672 | } |
668 | 673 | }, |
... | ... | @@ -801,13 +806,13 @@ export default { |
801 | 806 | this.$message.error("请填写测验名称!"); |
802 | 807 | return; |
803 | 808 | } |
804 | - let isRepeat = false | |
805 | - this.answerTypeList.map(item=>{ | |
806 | - if(item.typeName == this.answerTypeName){ | |
807 | - isRepeat = true | |
809 | + let isRepeat = false; | |
810 | + this.answerTypeList.map((item) => { | |
811 | + if (item.typeName == this.answerTypeName) { | |
812 | + isRepeat = true; | |
808 | 813 | } |
809 | - }) | |
810 | - if(isRepeat){ | |
814 | + }); | |
815 | + if (isRepeat) { | |
811 | 816 | this.$message.error("类型已存在请重新填写!"); |
812 | 817 | return; |
813 | 818 | } |
... | ... | @@ -916,7 +921,7 @@ export default { |
916 | 921 | }); |
917 | 922 | if (status == 0) { |
918 | 923 | this.form.title = data.title + "_副本"; |
919 | - this.form.tagId = data.tagId===0?"":data.tagId; | |
924 | + this.form.tagId = data.tagId === 0 ? "" : data.tagId; | |
920 | 925 | this.form.subjectName = data.subjectName; |
921 | 926 | this.form.gradeName = data.gradeName; |
922 | 927 | this.form.examsDuration = data.examsDuration; |
... | ... | @@ -950,6 +955,11 @@ export default { |
950 | 955 | .red { |
951 | 956 | color: #f30; |
952 | 957 | } |
958 | +.content-box{ | |
959 | + width:100%; | |
960 | + height:100%; | |
961 | + overflow-y: auto; | |
962 | +} | |
953 | 963 | .content { |
954 | 964 | width: 100%; |
955 | 965 | box-sizing: border-box; | ... | ... |
src/views/examinationPaper/edit.vue
... | ... | @@ -32,6 +32,7 @@ |
32 | 32 | <div class="qs-num">题号</div> |
33 | 33 | <div class="qs-type">题型</div> |
34 | 34 | <div class="qs-score">分数</div> |
35 | + <div class="qs-partScore">漏选得分</div> | |
35 | 36 | <div class="qs-options qs-options2">选项设置</div> |
36 | 37 | </li> |
37 | 38 | <li |
... | ... | @@ -54,6 +55,20 @@ |
54 | 55 | label="单题分值" |
55 | 56 | ></el-input-number> |
56 | 57 | </div> |
58 | + <div class="qs-partScore"> | |
59 | + <p v-if="subQuestions.questionType != 3">--</p> | |
60 | + <el-input-number | |
61 | + class="number-ipt" | |
62 | + v-else | |
63 | + size="medium" | |
64 | + :min="0" | |
65 | + :precision="2" | |
66 | + :max="subQuestions.score" | |
67 | + :step="0.5" | |
68 | + v-model="subQuestions.partScore" | |
69 | + label="漏选得分" | |
70 | + ></el-input-number> | |
71 | + </div> | |
57 | 72 | <div class="qs-options qs-options2"> |
58 | 73 | <p v-if="subQuestions.questionType == 5">--</p> |
59 | 74 | <p v-if="subQuestions.questionType == 4" class="answer-box"> | ... | ... |
src/views/examinationPaper/index.vue
... | ... | @@ -5,7 +5,13 @@ |
5 | 5 | <span>备题组卷</span> |
6 | 6 | </template> |
7 | 7 | <template slot="btns"> |
8 | - <el-button type="primary" size="mini" icon="el-icon-plus" plain @click="toAdd({})"> | |
8 | + <el-button | |
9 | + type="primary" | |
10 | + size="mini" | |
11 | + icon="el-icon-plus" | |
12 | + plain | |
13 | + @click="toAdd({})" | |
14 | + > | |
9 | 15 | 添加答题卡</el-button |
10 | 16 | > |
11 | 17 | </template> |
... | ... | @@ -94,6 +100,7 @@ |
94 | 100 | class="clazz" |
95 | 101 | v-for="(clazzChild, indexs) in item.classList" |
96 | 102 | :key="clazzChild.classId" |
103 | + :class="clazzChild.keepStatus == 1?'active':''" | |
97 | 104 | >{{ |
98 | 105 | `${clazzChild.className}${ |
99 | 106 | indexs != item.classList.length - 1 ? "、" : "" |
... | ... | @@ -358,9 +365,10 @@ export default { |
358 | 365 | } else { |
359 | 366 | query = { title: this.query.title }; |
360 | 367 | this.query.tagId = ""; |
361 | - this.query.subjectName = ""; | |
368 | + // this.query.subjectName = ""; | |
362 | 369 | } |
363 | 370 | query.classId = this.query.classId; |
371 | + query.subjectName = this.query.subjectName; | |
364 | 372 | for (let key in query) { |
365 | 373 | if (!query[key]) { |
366 | 374 | query[key] = null; |
... | ... | @@ -467,12 +475,10 @@ export default { |
467 | 475 | } |
468 | 476 | .clazz { |
469 | 477 | font-size: 14px; |
470 | - color: #667ffd; | |
471 | 478 | font-weight: 500; |
472 | 479 | position: relative; |
473 | 480 | position: relative; |
474 | - &.active:after { | |
475 | - content: "\e79c"; | |
481 | + &.active { | |
476 | 482 | color: #667ffd; |
477 | 483 | } |
478 | 484 | .el-icon-success { | ... | ... |
src/views/index/mainIndex.vue
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 | <div class="nav-item item1 item-child2" @click="links('/card')"> |
46 | 46 | <img class="icon" src="../../assets/nav/card.png" alt="" /> |
47 | 47 | <p class="p1">发卡补卡</p> |
48 | - <p class="p2">为学生办理发卡、补卡业务。</p> | |
48 | + <p class="p2">查看发卡、换卡记录信息。</p> | |
49 | 49 | </div> |
50 | 50 | <div class="nav-item item1 item-child2" @click="links('/down')"> |
51 | 51 | <img class="icon" src="../../assets/nav/down.png" alt="" /> | ... | ... |
src/views/layout/aside/aside.vue
... | ... | @@ -39,7 +39,7 @@ |
39 | 39 | |
40 | 40 | <menu-tree :menuData="item.children"></menu-tree> |
41 | 41 | </el-submenu> |
42 | - <el-menu-item :index="item.path" v-else :key="item.path"> | |
42 | + <el-menu-item :index="item.path" v-else :key="item.path" :class="path.includes(item.path)?'is-active':''"> | |
43 | 43 | <i :class="item.iconCls ? item.iconCls : [fa, fa - file]" /> |
44 | 44 | <span slot="title">{{ item.name }}</span> |
45 | 45 | </el-menu-item> |
... | ... | @@ -62,8 +62,17 @@ export default { |
62 | 62 | // 监听浏览器直接输入路由,将此路由添加到tabnavBox |
63 | 63 | "$route.path": function (val) { |
64 | 64 | // this.selectmenu(val); |
65 | + this.path = val | |
65 | 66 | }, |
66 | 67 | }, |
68 | + data(){ | |
69 | + return { | |
70 | + path:"" | |
71 | + } | |
72 | + }, | |
73 | + created(){ | |
74 | + this.path = this.$route.path | |
75 | + }, | |
67 | 76 | methods: { |
68 | 77 | selectmenu(key, indexpath) { |
69 | 78 | // 如果不使用 elemenUI 菜单的 vue-router 的模式将用以下方式进行页面跳转 el-menu的router设置为false |
... | ... | @@ -183,4 +192,7 @@ $right: right; |
183 | 192 | } |
184 | 193 | } |
185 | 194 | } |
195 | +:deep(.is-active){ | |
196 | + color:#fff | |
197 | +} | |
186 | 198 | </style> | ... | ... |
src/views/setUp/school.vue
... | ... | @@ -99,19 +99,30 @@ |
99 | 99 | label-width="160px" |
100 | 100 | > |
101 | 101 | <el-form-item label="科目:" prop="subjectNames"> |
102 | - <el-checkbox-group v-model="formGrade.subjectNames"> | |
103 | - <el-checkbox | |
104 | - v-for="item in subjectList" | |
105 | - :label="item" | |
106 | - :key="item" | |
107 | - >{{ item }}</el-checkbox | |
102 | + <div class="subject-box" :class="showAll?'active':''"> | |
103 | + <span class="showAll" @click="showAll = true" v-if="!showAll">更多...</span> | |
104 | + <el-checkbox-group v-model="formGrade.subjectNames"> | |
105 | + <el-checkbox | |
106 | + v-for="item in subjectList" | |
107 | + :label="item" | |
108 | + :key="item" | |
109 | + >{{ item }}</el-checkbox | |
110 | + > | |
111 | + </el-checkbox-group> | |
112 | + </div> | |
113 | + <el-col :span="8"> | |
114 | + <el-input | |
115 | + placeholder="添加科目" | |
116 | + v-model.trim="subjectName" | |
117 | + maxlength="30" | |
108 | 118 | > |
109 | - </el-checkbox-group> | |
110 | - <el-col :span="8"> | |
111 | - <el-input placeholder="添加科目" v-model.trim="subjectName" maxlength="30"> | |
112 | - <i slot="suffix" class="el-input__icon el-icon-plus" @click="addSubjectName"></i> | |
113 | - </el-input> | |
114 | - </el-col> | |
119 | + <i | |
120 | + slot="suffix" | |
121 | + class="el-input__icon el-icon-plus" | |
122 | + @click="addSubjectName" | |
123 | + ></i> | |
124 | + </el-input> | |
125 | + </el-col> | |
115 | 126 | </el-form-item> |
116 | 127 | <el-form-item label="班级:"> |
117 | 128 | <span v-for="(item, index) in formGrade.classList" :key="item.id">{{ |
... | ... | @@ -163,8 +174,9 @@ |
163 | 174 | <el-form-item label="手机号码:" prop="contactPhone" |
164 | 175 | ><el-col :span="10" |
165 | 176 | ><el-input |
166 | - maxlength="11" | |
177 | + type="number" | |
167 | 178 | v-model="formSchool.contactPhone" |
179 | + oninput="if(value.length > 11) value = value.slice(0,11)" | |
168 | 180 | placeholder="请输入联系人手机号码" |
169 | 181 | ></el-input></el-col |
170 | 182 | ></el-form-item> |
... | ... | @@ -219,6 +231,7 @@ export default { |
219 | 231 | diaUp: false, |
220 | 232 | diaSchool: false, |
221 | 233 | diaGrade: false, |
234 | + showAll:false,//修改年级科目显示 | |
222 | 235 | school: { |
223 | 236 | schoolName: "", |
224 | 237 | managePwd: "", |
... | ... | @@ -250,7 +263,7 @@ export default { |
250 | 263 | { required: true, message: "请选择科目", trigger: "blur" }, |
251 | 264 | ], |
252 | 265 | }, |
253 | - subjectName:"", | |
266 | + subjectName: "", | |
254 | 267 | sectionsList: [ |
255 | 268 | { id: "1", name: "小学" }, |
256 | 269 | { id: "2", name: "初中" }, |
... | ... | @@ -273,14 +286,14 @@ export default { |
273 | 286 | this.formGrade.gradeName = obj.gradeName; |
274 | 287 | this.diaGrade = true; |
275 | 288 | }, |
276 | - addSubjectName(){ | |
277 | - if(!this.subjectName){ | |
278 | - this.$message.warning("请填写科目名称") | |
279 | - return | |
289 | + addSubjectName() { | |
290 | + if (!this.subjectName) { | |
291 | + this.$message.warning("请填写科目名称"); | |
292 | + return; | |
280 | 293 | } |
281 | - this.subjectList.push(this.subjectName) | |
282 | - this.formGrade.subjectNames.push(this.subjectName) | |
283 | - this.subjectName = "" | |
294 | + this.subjectList.push(this.subjectName); | |
295 | + this.formGrade.subjectNames.push(this.subjectName); | |
296 | + this.subjectName = ""; | |
284 | 297 | }, |
285 | 298 | async editSchool() { |
286 | 299 | if (!this.formSchool.sections.length) { |
... | ... | @@ -429,7 +442,7 @@ export default { |
429 | 442 | flex-wrap: wrap; |
430 | 443 | padding: 20px; |
431 | 444 | .grade-item { |
432 | - width: 300px; | |
445 | + width: calc((100% - 100px) / 3); | |
433 | 446 | margin-right: 50px; |
434 | 447 | margin-bottom: 40px; |
435 | 448 | box-sizing: border-box; |
... | ... | @@ -442,6 +455,9 @@ export default { |
442 | 455 | transform: translate(-2px, -5px); |
443 | 456 | box-shadow: 5px 5px 10px #888; |
444 | 457 | } |
458 | + &:nth-of-type(3n) { | |
459 | + margin-right: 0; | |
460 | + } | |
445 | 461 | } |
446 | 462 | .grade-name { |
447 | 463 | font-size: 16px; |
... | ... | @@ -468,11 +484,32 @@ export default { |
468 | 484 | } |
469 | 485 | .form-box { |
470 | 486 | margin: 0 20px; |
487 | + .subject-box{ | |
488 | + height:90px; | |
489 | + overflow:hidden; | |
490 | + position:relative; | |
491 | + &.active{ | |
492 | + height:auto; | |
493 | + overflow:auto; | |
494 | + } | |
495 | + .showAll{ | |
496 | + position:absolute; | |
497 | + bottom:0; | |
498 | + right:10px; | |
499 | + font-size: 12px; | |
500 | + color: #7f7f7f; | |
501 | + cursor: pointer; | |
502 | + padding:2px; | |
503 | + &:hover{ | |
504 | + color:#667ffd | |
505 | + } | |
506 | + } | |
507 | + } | |
471 | 508 | } |
472 | -.el-icon-plus{ | |
509 | +.el-icon-plus { | |
473 | 510 | cursor: pointer; |
474 | - &:hover{ | |
475 | - color:#667ffd | |
511 | + &:hover { | |
512 | + color: #667ffd; | |
476 | 513 | } |
477 | 514 | } |
478 | 515 | </style> |
479 | 516 | \ No newline at end of file | ... | ... |
src/views/setUp/teacher.vue
... | ... | @@ -236,7 +236,7 @@ |
236 | 236 | prop="loginName" |
237 | 237 | > |
238 | 238 | <el-col :span="10"> |
239 | - <el-input maxlength="11" v-model.trim="formTeacher.loginName" /> | |
239 | + <el-input type="number" moninput="if(value.length > 11) value = value.slice(0,11)" v-model.trim="formTeacher.loginName" /> | |
240 | 240 | </el-col> |
241 | 241 | </el-form-item> |
242 | 242 | <el-form-item v-show="isAdd || (!isAdd && setTercherType == 1)" label="教师姓名:" prop="teacherName"> |
... | ... | @@ -736,6 +736,7 @@ export default { |
736 | 736 | } |
737 | 737 | &.active { |
738 | 738 | color: #667ffd; |
739 | + background: #eee; | |
739 | 740 | } |
740 | 741 | } |
741 | 742 | } | ... | ... |