Commit 0b1fa50592e890614848add36a91d2a76ca0ea25
Merge branch 'develop_interview' of 39.98.150.180:antissoft/antissoft.dati.admin…
… into develop_interview
Showing
5 changed files
with
204 additions
and
70 deletions
beifen20221105.zip
0 → 100644
No preview for this file type
src/views/TestPaper/ManualTestPaper.vue
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | <div id="id_test_video" style="width:100%; height:auto;"></div> | 3 | <div id="id_test_video" style="width:100%; height:auto;"></div> |
| 4 | - <div style="width: 100%;text-align: right;background: #efefef;height: 60px;vertical-align: middle;line-height: 60px;padding-right: 10px;"> | ||
| 5 | - | ||
| 6 | - <el-button style="margin-top: 12px;" @click="next" v-if="active==1">下一步</el-button> | ||
| 7 | - <el-button style="margin-top: 12px;z-index:888888888" @click="next" v-if="active==2">编辑基本信息</el-button> | ||
| 8 | - <el-button type="primary" style="" v-if="active==2" @click="SubmitTestPaper">保存 | ||
| 9 | - </el-button> | ||
| 10 | - </div> | 4 | + <div |
| 5 | + style="width: 100%;text-align: right;background: #efefef;height: 60px;vertical-align: middle;line-height: 60px;padding-right: 10px;"> | ||
| 6 | + | ||
| 7 | + <el-button style="margin-top: 12px;" @click="next" v-if="active==1">下一步</el-button> | ||
| 8 | + <el-button style="margin-top: 12px;z-index:888888888" @click="next" v-if="active==2">编辑基本信息</el-button> | ||
| 9 | + <el-button type="primary" style="" v-if="active==2" @click="SubmitTestPaper">保存 | ||
| 10 | + </el-button> | ||
| 11 | + </div> | ||
| 11 | <el-row :gutter="20"> | 12 | <el-row :gutter="20"> |
| 12 | 13 | ||
| 13 | 14 | ||
| @@ -25,9 +26,13 @@ | @@ -25,9 +26,13 @@ | ||
| 25 | <div class="grid-content bg-purple"> | 26 | <div class="grid-content bg-purple"> |
| 26 | <div class="areahead">组卷基本信息</div> | 27 | <div class="areahead">组卷基本信息</div> |
| 27 | <el-form ref="form" class="testPaper-manager" :rules="rules" :model="TestPaper" label-width="100px"> | 28 | <el-form ref="form" class="testPaper-manager" :rules="rules" :model="TestPaper" label-width="100px"> |
| 28 | - <el-form-item label="试卷名称:" prop="TestPaperTitle" required class="el-form-item-custom"> | 29 | + <el-form-item label="试卷名称:" prop="TestPaperTitle" required class="el-form-item-custom" style="margin-bottom: 20px !important;width:100%;"> |
| 29 | <el-input v-model="TestPaper.TestPaperTitle"></el-input> | 30 | <el-input v-model="TestPaper.TestPaperTitle"></el-input> |
| 30 | </el-form-item> | 31 | </el-form-item> |
| 32 | + | ||
| 33 | + <el-form-item label="自定义名称:" prop="CustomName" required class="el-form-item-custom" style="margin-bottom: 20px !important;width:100%;"> | ||
| 34 | + <el-input v-model="TestPaper.CustomName"></el-input> | ||
| 35 | + </el-form-item> | ||
| 31 | <!-- <el-form-item label="题目数量:" class="el-form-item-custom"> | 36 | <!-- <el-form-item label="题目数量:" class="el-form-item-custom"> |
| 32 | 37 | ||
| 33 | </el-form-item> --> | 38 | </el-form-item> --> |
| @@ -65,7 +70,7 @@ | @@ -65,7 +70,7 @@ | ||
| 65 | <el-form-item prop="date"> | 70 | <el-form-item prop="date"> |
| 66 | <el-date-picker v-model="TestPaper.date" @change="changetimestartend" type="datetimerange" | 71 | <el-date-picker v-model="TestPaper.date" @change="changetimestartend" type="datetimerange" |
| 67 | format="yyyy-MM-dd hh:mm:ss" range-separator="至" start-placeholder="开始时间" style="width:100%" | 72 | format="yyyy-MM-dd hh:mm:ss" range-separator="至" start-placeholder="开始时间" style="width:100%" |
| 68 | - end-placeholder="结束时间"> | 73 | + end-placeholder="结束时间" :picker-options="pickerOptions"> |
| 69 | </el-date-picker> | 74 | </el-date-picker> |
| 70 | </el-form-item> | 75 | </el-form-item> |
| 71 | </el-form-item> | 76 | </el-form-item> |
| @@ -100,10 +105,10 @@ | @@ -100,10 +105,10 @@ | ||
| 100 | </el-form> | 105 | </el-form> |
| 101 | </div> | 106 | </div> |
| 102 | </el-col> | 107 | </el-col> |
| 103 | - <el-col :span="6" :style="{'height':contentHeight+'px'}" class="jinyongtop"> | ||
| 104 | - <div class="jinyong" v-if="active==1"> | 108 | + <el-col :span="6" :style="{'height':contentHeight+'px'}" class="jinyongtop" v-show="active==2"> |
| 109 | + <!-- <div class="jinyong" v-if="active==1"> | ||
| 105 | 110 | ||
| 106 | - </div> | 111 | + </div> --> |
| 107 | <div class="grid-content bg-purple"> | 112 | <div class="grid-content bg-purple"> |
| 108 | <el-tabs v-model="activeTab" style="padding: 0 20px" :stretch="true"> | 113 | <el-tabs v-model="activeTab" style="padding: 0 20px" :stretch="true"> |
| 109 | <el-tab-pane label="专业类" name="6"></el-tab-pane> | 114 | <el-tab-pane label="专业类" name="6"></el-tab-pane> |
| @@ -117,8 +122,9 @@ | @@ -117,8 +122,9 @@ | ||
| 117 | </div> | 122 | </div> |
| 118 | 123 | ||
| 119 | <draggable :options="{animation:380,filter:'.unmover'}" group="itxst" v-model="arr1" @end="end1" | 124 | <draggable :options="{animation:380,filter:'.unmover'}" group="itxst" v-model="arr1" @end="end1" |
| 120 | - @add="RemoveHere" :move="onMove" class="infinite-list" :style="{'height':contentHeight-80+'px'}" | ||
| 121 | - infinite-scroll-disabled="disabled" v-infinite-scroll="load" style="overflow:auto"> | 125 | + :disabled="TestPaper.FLevelCount && arr2.length >= TestPaper.FLevelCount" @add="RemoveHere" :move="onMove" |
| 126 | + class="infinite-list" :style="{'height':contentHeight-80+'px'}" infinite-scroll-disabled="disabled" | ||
| 127 | + v-infinite-scroll="load" style="overflow:auto"> | ||
| 122 | 128 | ||
| 123 | <li v-for="i in arr1" class="infinite-list-item" :key="i.id" v-if="!classarr.some(o=>o == i.id)">{{ | 129 | <li v-for="i in arr1" class="infinite-list-item" :key="i.id" v-if="!classarr.some(o=>o == i.id)">{{ |
| 124 | i.subject }}</li> | 130 | i.subject }}</li> |
| @@ -128,10 +134,8 @@ | @@ -128,10 +134,8 @@ | ||
| 128 | 134 | ||
| 129 | </div> | 135 | </div> |
| 130 | </el-col> | 136 | </el-col> |
| 131 | - <el-col :span="10" :style="{'height':contentHeight+'px'}" class="jinyongtop"> | ||
| 132 | - <div class="jinyong" v-if="active==1"> | ||
| 133 | - | ||
| 134 | - </div> | 137 | + <el-col :span="10" :style="{'height':contentHeight+'px'}" class="jinyongtop" v-show="active==2"> |
| 138 | + | ||
| 135 | <div class="grid-content bg-purple"> | 139 | <div class="grid-content bg-purple"> |
| 136 | <div class="areahead"> | 140 | <div class="areahead"> |
| 137 | <!-- <span v-show="!edit" style="font-weight: bold;">{{ TestPaper.TestPaperTitle }}</span> --> | 141 | <!-- <span v-show="!edit" style="font-weight: bold;">{{ TestPaper.TestPaperTitle }}</span> --> |
| @@ -142,9 +146,13 @@ | @@ -142,9 +146,13 @@ | ||
| 142 | </div> | 146 | </div> |
| 143 | 147 | ||
| 144 | <draggable :options="{animation:380}" group="itxst" v-model="arr2" class="infinite-list" @end="end2" | 148 | <draggable :options="{animation:380}" group="itxst" v-model="arr2" class="infinite-list" @end="end2" |
| 145 | - @add="ComeHere" :style="{'height':contentHeight-60+'px'}" style="overflow:auto;padding-top: 10px;"> | 149 | + :disable="TestPaper.FLevelCount && arr2.length >= TestPaper.FLevelCount" @add="ComeHere" |
| 150 | + :style="{'height':contentHeight-60+'px'}" style="overflow:auto;padding-top: 10px;"> | ||
| 146 | <li v-for="(i,index) in arr2" class="infinite-list-item"> | 151 | <li v-for="(i,index) in arr2" class="infinite-list-item"> |
| 147 | <label> {{index+1}}. [{{i.subjectName}}]{{ i.subject }}</label> | 152 | <label> {{index+1}}. [{{i.subjectName}}]{{ i.subject }}</label> |
| 153 | + | ||
| 154 | + <el-button @click="removeItem(i,index)" type="danger" icon="el-icon-delete" circle size="mini" | ||
| 155 | + style="float:right"></el-button> | ||
| 148 | <div v-for="item in JSON.parse(i.subjectContent)"> | 156 | <div v-for="item in JSON.parse(i.subjectContent)"> |
| 149 | <p class="option-p">{{item.option}}:{{item.optionContent}}</p> | 157 | <p class="option-p">{{item.option}}:{{item.optionContent}}</p> |
| 150 | </div> | 158 | </div> |
| @@ -220,7 +228,7 @@ | @@ -220,7 +228,7 @@ | ||
| 220 | bottom: 0; | 228 | bottom: 0; |
| 221 | z-index: 9; | 229 | z-index: 9; |
| 222 | opacity: 0.1; | 230 | opacity: 0.1; |
| 223 | - background:black; | 231 | + background: black; |
| 224 | } | 232 | } |
| 225 | </style> | 233 | </style> |
| 226 | <script> | 234 | <script> |
| @@ -242,6 +250,12 @@ | @@ -242,6 +250,12 @@ | ||
| 242 | }, | 250 | }, |
| 243 | data() { | 251 | data() { |
| 244 | return { | 252 | return { |
| 253 | + pickerOptions: { | ||
| 254 | + disabledDate(time) { | ||
| 255 | + return | ||
| 256 | + time.getTime() > (Date.now() - 8.64e6) | ||
| 257 | + } | ||
| 258 | + }, | ||
| 245 | active: 1, | 259 | active: 1, |
| 246 | randomSubjectList: [ | 260 | randomSubjectList: [ |
| 247 | { | 261 | { |
| @@ -277,6 +291,7 @@ | @@ -277,6 +291,7 @@ | ||
| 277 | }, | 291 | }, |
| 278 | contentHeight: 0, | 292 | contentHeight: 0, |
| 279 | count: 0, | 293 | count: 0, |
| 294 | + totalCount: 0, | ||
| 280 | edit: false, | 295 | edit: false, |
| 281 | arr1: [], | 296 | arr1: [], |
| 282 | arr2: [], | 297 | arr2: [], |
| @@ -351,7 +366,14 @@ | @@ -351,7 +366,14 @@ | ||
| 351 | message: "请填写试总时长控制", | 366 | message: "请填写试总时长控制", |
| 352 | }, | 367 | }, |
| 353 | 368 | ||
| 369 | + | ||
| 354 | ], | 370 | ], |
| 371 | + | ||
| 372 | + CustomName: [ | ||
| 373 | + { | ||
| 374 | + required: true, | ||
| 375 | + message: "自定义名称必填", | ||
| 376 | + }] | ||
| 355 | }, | 377 | }, |
| 356 | QuestionClass: [], | 378 | QuestionClass: [], |
| 357 | treeData: [ | 379 | treeData: [ |
| @@ -409,22 +431,24 @@ | @@ -409,22 +431,24 @@ | ||
| 409 | //this.GetList(); | 431 | //this.GetList(); |
| 410 | }, | 432 | }, |
| 411 | methods: { | 433 | methods: { |
| 434 | + removeItem(item, index) { | ||
| 435 | + this.arr2.splice(index, 1); | ||
| 436 | + }, | ||
| 412 | next() { | 437 | next() { |
| 413 | var _this = this; | 438 | var _this = this; |
| 414 | console.log(this.active); | 439 | console.log(this.active); |
| 415 | - if(this.active == 1) | ||
| 416 | - { | 440 | + if (this.active == 1) { |
| 417 | _this.$refs['form'].validate((valid) => { | 441 | _this.$refs['form'].validate((valid) => { |
| 418 | - if(valid){ | ||
| 419 | - this.active = 2; | ||
| 420 | - } | 442 | + if (valid) { |
| 443 | + this.active = 2; | ||
| 444 | + } | ||
| 421 | }); | 445 | }); |
| 422 | - } | ||
| 423 | - else{ | ||
| 424 | - if (this.active++ >=2) this.active = 1; | 446 | + } |
| 447 | + else { | ||
| 448 | + if (this.active++ >= 2) this.active = 1; | ||
| 425 | 449 | ||
| 426 | } | 450 | } |
| 427 | - | 451 | + |
| 428 | }, | 452 | }, |
| 429 | changetype(a, item) { | 453 | changetype(a, item) { |
| 430 | var type = this.typelist.find(o => o.id == item.QuestionClassId[item.QuestionClassId.length - 1]); | 454 | var type = this.typelist.find(o => o.id == item.QuestionClassId[item.QuestionClassId.length - 1]); |
| @@ -483,6 +507,17 @@ | @@ -483,6 +507,17 @@ | ||
| 483 | this.dialogTableVisible = false; | 507 | this.dialogTableVisible = false; |
| 484 | }, | 508 | }, |
| 485 | randomSubmit() { | 509 | randomSubmit() { |
| 510 | + | ||
| 511 | + var _this = this; | ||
| 512 | + if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && _this.arr2.length >= _this.TestPaper.FLevelCount) { | ||
| 513 | + this.$notify({ | ||
| 514 | + title: '题目数量已经达到级别最大', | ||
| 515 | + // message: res.data.message, | ||
| 516 | + type: 'warning' | ||
| 517 | + }); | ||
| 518 | + return; | ||
| 519 | + } | ||
| 520 | + | ||
| 486 | var list = JSON.parse(JSON.stringify(this.randomSubjectList)); | 521 | var list = JSON.parse(JSON.stringify(this.randomSubjectList)); |
| 487 | if (list.findIndex((t) => !t.QuestionClassId || !t.QuestionClassId.length || !t.Count) > -1) { | 522 | if (list.findIndex((t) => !t.QuestionClassId || !t.QuestionClassId.length || !t.Count) > -1) { |
| 488 | this.$message.warning("参数不完整"); | 523 | this.$message.warning("参数不完整"); |
| @@ -493,9 +528,19 @@ | @@ -493,9 +528,19 @@ | ||
| 493 | t.QuestionClassId = t.QuestionClassId.pop(); | 528 | t.QuestionClassId = t.QuestionClassId.pop(); |
| 494 | return t; | 529 | return t; |
| 495 | }); | 530 | }); |
| 531 | + var count = 0; | ||
| 532 | + list.forEach(o=>{ count+=o.Count;}); | ||
| 533 | + if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && (_this.arr2.length + count) > _this.TestPaper.FLevelCount) { | ||
| 534 | + this.$notify({ | ||
| 535 | + title: '题目数量已经达到级别最大', | ||
| 536 | + // message: res.data.message, | ||
| 537 | + type: 'warning' | ||
| 538 | + }); | ||
| 539 | + return; | ||
| 540 | + } | ||
| 496 | PostRandomGetQuestion(list).then((res) => { | 541 | PostRandomGetQuestion(list).then((res) => { |
| 497 | let list = res.data.data; | 542 | let list = res.data.data; |
| 498 | - this.arr2 = list; | 543 | + this.arr2.push(...list); |
| 499 | this.dialogTableVisible = false; | 544 | this.dialogTableVisible = false; |
| 500 | if (!list.length) { | 545 | if (!list.length) { |
| 501 | this.$message.warning('所选分类没有试题'); | 546 | this.$message.warning('所选分类没有试题'); |
| @@ -555,7 +600,15 @@ | @@ -555,7 +600,15 @@ | ||
| 555 | this.GetList(); | 600 | this.GetList(); |
| 556 | }, | 601 | }, |
| 557 | SubmitTestPaper() { | 602 | SubmitTestPaper() { |
| 558 | - | 603 | + var _this = this; |
| 604 | + if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && _this.arr2.length >= _this.TestPaper.FLevelCount) { | ||
| 605 | + this.$notify({ | ||
| 606 | + title: '题目数量已经达到级别最大', | ||
| 607 | + // message: res.data.message, | ||
| 608 | + type: 'warning' | ||
| 609 | + }); | ||
| 610 | + return; | ||
| 611 | + } | ||
| 559 | this.$refs['form'].validate((valid) => { | 612 | this.$refs['form'].validate((valid) => { |
| 560 | 613 | ||
| 561 | if (!this.TestPaper.TestPaperTitle) { | 614 | if (!this.TestPaper.TestPaperTitle) { |
| @@ -668,6 +721,10 @@ | @@ -668,6 +721,10 @@ | ||
| 668 | }, | 721 | }, |
| 669 | //从左边添加到右边 | 722 | //从左边添加到右边 |
| 670 | ComeHere(e) { | 723 | ComeHere(e) { |
| 724 | + var _this = this; | ||
| 725 | + if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && _this.arr2.length >= _this.TestPaper.FLevelCount) { | ||
| 726 | + return; | ||
| 727 | + } | ||
| 671 | var d = e.item._underlying_vm_; | 728 | var d = e.item._underlying_vm_; |
| 672 | if (e.item._underlying_vm_.subjectType == 1) { | 729 | if (e.item._underlying_vm_.subjectType == 1) { |
| 673 | this.TestPaper.SingleNumber += 1; | 730 | this.TestPaper.SingleNumber += 1; |
| @@ -689,29 +746,37 @@ | @@ -689,29 +746,37 @@ | ||
| 689 | getQuestionList({ | 746 | getQuestionList({ |
| 690 | QuestionClassId: d.id, | 747 | QuestionClassId: d.id, |
| 691 | PageIndex: 1, | 748 | PageIndex: 1, |
| 692 | - PageSize: this.TestPaper.FLevelCount || 1000, | 749 | + PageSize: _this.TestPaper.FLevelCount || 1000, |
| 693 | }).then((res) => { | 750 | }).then((res) => { |
| 694 | var data = res.data.data.rows || []; | 751 | var data = res.data.data.rows || []; |
| 695 | - data = data.filter(o => !this.arr2.find(d => d.id == o.id)); | ||
| 696 | - this.arr2 = this.arr2.filter((o) => o.type != "wd"); | 752 | + data = data.filter(o => !_this.arr2.find(d => d.id == o.id)); |
| 753 | + _this.arr2 = _this.arr2.filter((o) => o.type != "wd"); | ||
| 697 | // this.arr1.splice(this.arr1.findIndex(o=>o.id == d.id),1) | 754 | // this.arr1.splice(this.arr1.findIndex(o=>o.id == d.id),1) |
| 698 | - this.classarr.push(d.id); | 755 | + _this.classarr.push(d.id); |
| 699 | // var test = this.arr2; | 756 | // var test = this.arr2; |
| 700 | - this.arr2.push(...data); | 757 | + // this.arr2.push(...data); |
| 701 | data.forEach((rs) => { | 758 | data.forEach((rs) => { |
| 702 | - if (rs.subjectType == 1) { | ||
| 703 | - this.TestPaper.SingleNumber += 1; | ||
| 704 | - } | ||
| 705 | - if (rs.subjectType == 2) { | ||
| 706 | - this.TestPaper.MultipleNumber += 1; | 759 | + if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && _this.arr2.length >= _this.TestPaper.FLevelCount) { |
| 760 | + // _this.arr2 = _this.arr2.filter((o) => o.type != "wd"); | ||
| 707 | } | 761 | } |
| 708 | - if (rs.subjectType == 3) { | ||
| 709 | - this.TestPaper.SubjectiveNumber += 1; | ||
| 710 | - } | ||
| 711 | - if (rs.subjectType == 4) { | ||
| 712 | - this.TestPaper.VoiceNumber += 1; | 762 | + else { |
| 763 | + _this.arr2.push(rs); | ||
| 764 | + if (rs.subjectType == 1) { | ||
| 765 | + _this.TestPaper.SingleNumber += 1; | ||
| 766 | + } | ||
| 767 | + if (rs.subjectType == 2) { | ||
| 768 | + _this.TestPaper.MultipleNumber += 1; | ||
| 769 | + } | ||
| 770 | + if (rs.subjectType == 3) { | ||
| 771 | + _this.TestPaper.SubjectiveNumber += 1; | ||
| 772 | + } | ||
| 773 | + if (rs.subjectType == 4) { | ||
| 774 | + _this.TestPaper.VoiceNumber += 1; | ||
| 775 | + } | ||
| 713 | } | 776 | } |
| 777 | + | ||
| 714 | }); | 778 | }); |
| 779 | + console.log(_this.arr2) | ||
| 715 | }); | 780 | }); |
| 716 | } | 781 | } |
| 717 | }, | 782 | }, |
src/views/TestPaper/TestPaperList.vue
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | <div class="seetingsDiv" style=""> | 3 | <div class="seetingsDiv" style=""> |
| 4 | - <el-button type="primary" @click="dialogAddTestPaperVIsible=true">添加试卷 | ||
| 5 | - </el-button> | 4 | + <div class="flex" style="width: 85%"> |
| 5 | + <el-form :inline="true" class="demo-form-inline"> | ||
| 6 | + | ||
| 7 | + <el-form-item label="试卷名称:" class="el-form-item-custom" > | ||
| 8 | + <el-input v-model="parameter.TestPaperTitle" placeholder="请输入试卷名称"></el-input> | ||
| 9 | + </el-form-item> | ||
| 10 | + | ||
| 11 | + <el-form-item label="自定义名称:" class="el-form-item-custom" > | ||
| 12 | + <el-input v-model="parameter.CustomName" placeholder="请输入自定义名称"></el-input> | ||
| 13 | + </el-form-item> | ||
| 14 | + <el-form-item label="分类" class="el-form-item-custom" > | ||
| 15 | + <el-cascader class="testpaper-input" v-model="parameter.TestPaperClassId" | ||
| 16 | + :props="{emitPath:false}" :clearable=true :options="QuestionClass"> | ||
| 17 | + </el-cascader> | ||
| 18 | + </el-form-item> | ||
| 19 | + | ||
| 20 | + | ||
| 21 | + <el-form-item label="工种" class="el-form-item-custom" > | ||
| 22 | + <el-select v-model="parameter.UserTypeOfWork" placeholder="请选择工种"> | ||
| 23 | + <el-option value="0">全部</el-option> | ||
| 24 | + <el-option v-for="item in usertypelist" :label="item.name" :value="item.id"></el-option> | ||
| 25 | + </el-select> | ||
| 26 | + </el-form-item> | ||
| 27 | + | ||
| 28 | + <el-form-item label="级别" class="el-form-item-custom" > | ||
| 29 | + <el-select v-model="parameter.FLevelCount" placeholder="请选择级别" style="width:100%"> | ||
| 30 | + <el-option value="-1">全部</el-option> | ||
| 31 | + <el-option v-for="item in levellist" :label="item.title" :value="item.f_count"></el-option> | ||
| 32 | + </el-select> | ||
| 33 | + </el-form-item> | ||
| 34 | + <el-form-item> | ||
| 35 | + <el-button type="success" @click="search">搜索</el-button> | ||
| 36 | + <el-button type="primary" @click="dialogAddTestPaperVIsible=true">添加试卷 | ||
| 37 | + </el-button> | ||
| 38 | + </el-form-item> | ||
| 39 | + </el-form> | ||
| 40 | + </div> | ||
| 41 | + | ||
| 6 | </div> | 42 | </div> |
| 7 | <el-table :data="testpaperlist" id="QuestionTable" border | 43 | <el-table :data="testpaperlist" id="QuestionTable" border |
| 8 | style="width: 100%;border-radius: 5px;box-shadow: 0 0 10px #efefef;margin-top: 10px;" :stripe='true'> | 44 | style="width: 100%;border-radius: 5px;box-shadow: 0 0 10px #efefef;margin-top: 10px;" :stripe='true'> |
| @@ -16,6 +52,13 @@ | @@ -16,6 +52,13 @@ | ||
| 16 | <span>{{ scope.row.TestPaperTitle }}</span> | 52 | <span>{{ scope.row.TestPaperTitle }}</span> |
| 17 | </template> | 53 | </template> |
| 18 | </el-table-column> | 54 | </el-table-column> |
| 55 | + | ||
| 56 | + <el-table-column prop="date" label="自定义名称" width="300"> | ||
| 57 | + <template slot-scope="scope"> | ||
| 58 | + <span>{{ scope.row.CustomName }}</span> | ||
| 59 | + </template> | ||
| 60 | + </el-table-column> | ||
| 61 | + | ||
| 19 | <el-table-column prop="date" label="试卷总分" width="80"> | 62 | <el-table-column prop="date" label="试卷总分" width="80"> |
| 20 | <template slot-scope="scope"> | 63 | <template slot-scope="scope"> |
| 21 | <span>{{ scope.row.TotalScore }}</span> | 64 | <span>{{ scope.row.TotalScore }}</span> |
| @@ -107,6 +150,10 @@ | @@ -107,6 +150,10 @@ | ||
| 107 | <el-form-item label="试卷名称:" class="el-form-item-custom" prop="TestPaperTitle"> | 150 | <el-form-item label="试卷名称:" class="el-form-item-custom" prop="TestPaperTitle"> |
| 108 | <el-input v-model="TestPaper.TestPaperTitle" placeholder="请输入试卷标题"></el-input> | 151 | <el-input v-model="TestPaper.TestPaperTitle" placeholder="请输入试卷标题"></el-input> |
| 109 | </el-form-item> | 152 | </el-form-item> |
| 153 | + | ||
| 154 | + <el-form-item label="自定义名称:" class="el-form-item-custom" prop="CustomName"> | ||
| 155 | + <el-input v-model="TestPaper.CustomName" placeholder="请输入自定义名称"></el-input> | ||
| 156 | + </el-form-item> | ||
| 110 | <el-form-item label="分类" class="el-form-item-custom" prop="TestPaperClassId"> | 157 | <el-form-item label="分类" class="el-form-item-custom" prop="TestPaperClassId"> |
| 111 | <el-cascader class="testpaper-input" v-model="TestPaper.TestPaperClassId" style="width:400px;" | 158 | <el-cascader class="testpaper-input" v-model="TestPaper.TestPaperClassId" style="width:400px;" |
| 112 | :props="{emitPath:false}" :clearable=true :options="QuestionClass"> | 159 | :props="{emitPath:false}" :clearable=true :options="QuestionClass"> |
| @@ -160,7 +207,7 @@ | @@ -160,7 +207,7 @@ | ||
| 160 | <el-input class="testpaper-input" :rows="10" type="textarea" v-model="TestPaper.Describe"> | 207 | <el-input class="testpaper-input" :rows="10" type="textarea" v-model="TestPaper.Describe"> |
| 161 | </el-input> | 208 | </el-input> |
| 162 | </el-form-item> | 209 | </el-form-item> |
| 163 | - <el-button type="primary" style="float: right;" @click="SubmitTestPaper">保存1 | 210 | + <el-button type="primary" style="float: right;" @click="SubmitTestPaper">保存 |
| 164 | </el-button> | 211 | </el-button> |
| 165 | <div style="clear: both;"></div> | 212 | <div style="clear: both;"></div> |
| 166 | </el-form> | 213 | </el-form> |
| @@ -186,6 +233,10 @@ | @@ -186,6 +233,10 @@ | ||
| 186 | GetTypeSetting | 233 | GetTypeSetting |
| 187 | } from '@/api/user' | 234 | } from '@/api/user' |
| 188 | import { formatTime } from '@/utils/util' | 235 | import { formatTime } from '@/utils/util' |
| 236 | + | ||
| 237 | + import { GetpaperLevelList } from "@/api/paperLevel"; | ||
| 238 | + | ||
| 239 | + | ||
| 189 | let that = {}; | 240 | let that = {}; |
| 190 | let list = []; | 241 | let list = []; |
| 191 | export default { | 242 | export default { |
| @@ -201,6 +252,7 @@ | @@ -201,6 +252,7 @@ | ||
| 201 | status: 1 | 252 | status: 1 |
| 202 | }, | 253 | }, |
| 203 | Count: 0, | 254 | Count: 0, |
| 255 | + levellist:[], | ||
| 204 | testpaperlist: [], | 256 | testpaperlist: [], |
| 205 | dialogAddTestPaperVIsible: false, | 257 | dialogAddTestPaperVIsible: false, |
| 206 | dialogQuestionVlsible: false, | 258 | dialogQuestionVlsible: false, |
| @@ -319,8 +371,19 @@ | @@ -319,8 +371,19 @@ | ||
| 319 | this.parameter.pageSize = Math.floor(lineNumber / 49) | 371 | this.parameter.pageSize = Math.floor(lineNumber / 49) |
| 320 | this.getTestPaperListHeadler(); | 372 | this.getTestPaperListHeadler(); |
| 321 | this.getQuestionClassListHeadler(); | 373 | this.getQuestionClassListHeadler(); |
| 374 | + | ||
| 375 | + GetpaperLevelList({ pageSize: 1000, sortOrder: 'asc' }).then(res => { | ||
| 376 | + if (res.data) { | ||
| 377 | + this.levellist = res.data.data || []; | ||
| 378 | + } | ||
| 379 | + }); | ||
| 380 | + | ||
| 381 | + | ||
| 322 | }, | 382 | }, |
| 323 | methods: { | 383 | methods: { |
| 384 | + search(){ | ||
| 385 | + this.getTestPaperListHeadler(); | ||
| 386 | + }, | ||
| 324 | changetimestartend(val, aa) { | 387 | changetimestartend(val, aa) { |
| 325 | this.TestPaper.EffectiveStartTime = formatTime(val[0]) | 388 | this.TestPaper.EffectiveStartTime = formatTime(val[0]) |
| 326 | this.TestPaper.EffectiveEndTime = formatTime(val[1]) | 389 | this.TestPaper.EffectiveEndTime = formatTime(val[1]) |
| @@ -470,22 +533,27 @@ | @@ -470,22 +533,27 @@ | ||
| 470 | </script> | 533 | </script> |
| 471 | 534 | ||
| 472 | <style scoped> | 535 | <style scoped> |
| 473 | - .seetingsDiv { | ||
| 474 | - width: 100%; | ||
| 475 | - height: 60px; | ||
| 476 | - background: #efefef; | ||
| 477 | - line-height: 60px; | ||
| 478 | - border-radius: 5px; | ||
| 479 | - box-shadow: 0 0 5px #cdcdcd; | ||
| 480 | - } | 536 | +.seetingsDiv { |
| 537 | + display: flex; | ||
| 538 | + align-items: center; | ||
| 539 | + width: 100%; | ||
| 540 | + padding-top: 10px; | ||
| 541 | + padding-left: 10px; | ||
| 542 | + height: 126px; | ||
| 543 | + background: #efefef; | ||
| 544 | + line-height: initial !important; | ||
| 545 | + border-radius: 5px; | ||
| 546 | + box-shadow: 0 0 5px #cdcdcd; | ||
| 547 | + justify-content: space-between; | ||
| 548 | + } | ||
| 481 | 549 | ||
| 482 | - .seetingsDiv button { | ||
| 483 | - background-color: #304156; | ||
| 484 | - border: 0px; | ||
| 485 | - margin-left: 10px; | ||
| 486 | - box-shadow: 0 0 5px #cdcdcd; | ||
| 487 | - float: right; | ||
| 488 | - margin-top: 12px; | ||
| 489 | - margin-right: 10px; | ||
| 490 | - } | 550 | + .seetingsDiv button { |
| 551 | + height: 40px; | ||
| 552 | + background-color: #304156; | ||
| 553 | + border: 0px; | ||
| 554 | + margin-left: 10px; | ||
| 555 | + box-shadow: 0 0 5px #cdcdcd; | ||
| 556 | + float: none; | ||
| 557 | + margin-right: 10px; | ||
| 558 | + } | ||
| 491 | </style> | 559 | </style> |
| 492 | \ No newline at end of file | 560 | \ No newline at end of file |
src/views/login/index.vue
| @@ -29,7 +29,7 @@ | @@ -29,7 +29,7 @@ | ||
| 29 | 29 | ||
| 30 | <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" | 30 | <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" |
| 31 | @click.native.prevent="handleLogin">登录</el-button> | 31 | @click.native.prevent="handleLogin">登录</el-button> |
| 32 | - <div style="text-align: center;color: #FFF;">技术支持:成都安第斯信息技术有限公司</div> | 32 | + <!-- <div style="text-align: center;color: #FFF;">技术支持:成都安第斯信息技术有限公司</div> --> |
| 33 | 33 | ||
| 34 | <!-- <div class="tips"> | 34 | <!-- <div class="tips"> |
| 35 | <span style="margin-right:20px;">username: admin</span> | 35 | <span style="margin-right:20px;">username: admin</span> |
| @@ -50,14 +50,14 @@ | @@ -50,14 +50,14 @@ | ||
| 50 | data() { | 50 | data() { |
| 51 | const validateUsername = (rule, value, callback) => { | 51 | const validateUsername = (rule, value, callback) => { |
| 52 | if (!validUsername(value)) { | 52 | if (!validUsername(value)) { |
| 53 | - callback(new Error('Please enter the correct user name')) | 53 | + callback(new Error('请输入登录的用户名')) |
| 54 | } else { | 54 | } else { |
| 55 | callback() | 55 | callback() |
| 56 | } | 56 | } |
| 57 | } | 57 | } |
| 58 | const validatePassword = (rule, value, callback) => { | 58 | const validatePassword = (rule, value, callback) => { |
| 59 | if (value.length < 6) { | 59 | if (value.length < 6) { |
| 60 | - callback(new Error('The password can not be less than 6 digits')) | 60 | + callback(new Error('密码长度最低6位')) |
| 61 | } else { | 61 | } else { |
| 62 | callback() | 62 | callback() |
| 63 | } | 63 | } |
| @@ -114,7 +114,7 @@ | @@ -114,7 +114,7 @@ | ||
| 114 | this.$store.dispatch('user/login', this.loginForm).then(() => { | 114 | this.$store.dispatch('user/login', this.loginForm).then(() => { |
| 115 | this.$router.push({ | 115 | this.$router.push({ |
| 116 | path: this.redirect || '/' | 116 | path: this.redirect || '/' |
| 117 | - }) | 117 | + }) |
| 118 | this.loading = false | 118 | this.loading = false |
| 119 | }).catch((ret) => { | 119 | }).catch((ret) => { |
| 120 | console.log(); | 120 | console.log(); |
src/views/user/userlist.vue
| @@ -526,6 +526,7 @@ | @@ -526,6 +526,7 @@ | ||
| 526 | SelectPhoneBool, | 526 | SelectPhoneBool, |
| 527 | ChangeClass | 527 | ChangeClass |
| 528 | } from "@/api/user"; | 528 | } from "@/api/user"; |
| 529 | + import BASE_URL from '@/common/config.js' | ||
| 529 | import { | 530 | import { |
| 530 | GetUserClassList, | 531 | GetUserClassList, |
| 531 | UserClassCreate, | 532 | UserClassCreate, |