Commit cf176b8f721df26a4c48239bb6034445fabde0f8
1 parent
57b2d5ec
3
Showing
8 changed files
with
203 additions
and
51 deletions
src/layout/components/Navbar.vue
| ... | ... | @@ -7,10 +7,12 @@ |
| 7 | 7 | <div class="right-menu"> |
| 8 | 8 | <el-dropdown class="avatar-container" trigger="click"> |
| 9 | 9 | <div class="avatar-wrapper"> |
| 10 | - <span>您好</span> | |
| 10 | + <span v-if="name">您好、({{name}})</span> | |
| 11 | + <span v-else>您好</span> | |
| 11 | 12 | <i class="el-icon-caret-bottom" style="margin-top: -7px;" /> |
| 12 | 13 | </div> |
| 13 | 14 | <el-dropdown-menu slot="dropdown" class="user-dropdown"> |
| 15 | + | |
| 14 | 16 | <el-dropdown-item @click.native="logout"> |
| 15 | 17 | <span style="display:block;">退出</span> |
| 16 | 18 | </el-dropdown-item> |
| ... | ... | @@ -33,7 +35,8 @@ export default { |
| 33 | 35 | computed: { |
| 34 | 36 | ...mapGetters([ |
| 35 | 37 | 'sidebar', |
| 36 | - 'avatar' | |
| 38 | + 'avatar', | |
| 39 | + 'name' | |
| 37 | 40 | ]) |
| 38 | 41 | }, |
| 39 | 42 | methods: { | ... | ... |
src/utils/request.js
| ... | ... | @@ -12,7 +12,7 @@ import { |
| 12 | 12 | const service = axios.create({ |
| 13 | 13 | baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url |
| 14 | 14 | // withCredentials: true, // send cookies when cross-domain requests |
| 15 | - timeout: 5000 // request timeout | |
| 15 | + timeout: 9000 // request timeout | |
| 16 | 16 | }) |
| 17 | 17 | |
| 18 | 18 | // request interceptor | ... | ... |
src/views/QuestionBank/components/EditDimension.vue
| 1 | 1 | <template> |
| 2 | - <el-dialog title="编辑" :visible.sync="dialogFormVisible" @closed="handleclose" width="75%"> | |
| 2 | + <el-dialog title="编辑" :visible.sync="dialogFormVisible" @closed="handleclose" width="650px"> | |
| 3 | 3 | <el-form :model="data"> |
| 4 | 4 | <el-form-item label="上级分类" style="padding-top: 5px"> |
| 5 | 5 | ... | ... |
src/views/QuestionBank/index.vue
| ... | ... | @@ -148,9 +148,9 @@ |
| 148 | 148 | </div> |
| 149 | 149 | </el-col> |
| 150 | 150 | </el-row> |
| 151 | - <el-dialog title="分类维护" :visible.sync="dialogClassIVIsible" @close="closeClassDialog" width="400px" | |
| 151 | + <el-dialog title="分类维护" :visible.sync="dialogClassIVIsible" @close="closeClassDialog" width="450px" | |
| 152 | 152 | :close-on-click-modal="false"> |
| 153 | - <el-form ref="QuestionClassInfo" :model="QuestionClassInfo" label-width="70px"> | |
| 153 | + <el-form ref="QuestionClassInfo" :model="QuestionClassInfo" label-width="80px"> | |
| 154 | 154 | <el-form-item label="分类名称"> |
| 155 | 155 | |
| 156 | 156 | <el-input v-model="QuestionClassInfo.ClassificationName" placeholder="请输入分类名称"></el-input> |
| ... | ... | @@ -181,7 +181,7 @@ |
| 181 | 181 | |
| 182 | 182 | <template slot-scope="{ node, data }"> |
| 183 | 183 | <span>{{ data.label }}</span> |
| 184 | - <span v-if="!node.isLeaf"> ({{ data.subjectCount || 0 }}) </span> | |
| 184 | + <span v-if="!node.isLeaf && data.id >0" > ({{ data.subjectCount || 0 }}) </span> | |
| 185 | 185 | </template> |
| 186 | 186 | |
| 187 | 187 | |
| ... | ... | @@ -297,8 +297,7 @@ |
| 297 | 297 | |
| 298 | 298 | |
| 299 | 299 | |
| 300 | - <el-upload class="upload-demo" style="width:80%" :headers="{Authorization:token}" drag | |
| 301 | - :on-success="handleSuccess" | |
| 300 | + <el-upload class="upload-demo" style="width:80%" :headers="{Authorization:token}" drag :on-success="handleSuccess" | |
| 302 | 301 | action="/api/QuestionBank/import" :limit="1"> |
| 303 | 302 | <i class="el-icon-upload"></i> |
| 304 | 303 | <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
| ... | ... | @@ -307,7 +306,7 @@ |
| 307 | 306 | <br> |
| 308 | 307 | <br> |
| 309 | 308 | <span style="color:red;line-height:20px;font-size:16px"> |
| 310 | - 注意: | |
| 309 | + 注意: | |
| 311 | 310 | <br> |
| 312 | 311 | 1.导入每个选项格式 分为三段 用” @@ “ 隔开 选项内容@@选项分值@@选项权重(权重 分为三个 高 中 低) <br /> 例如: |
| 313 | 312 | <p>选项A 今天感觉怎么样@@10@@高</p> |
| ... | ... | @@ -319,16 +318,16 @@ |
| 319 | 318 | |
| 320 | 319 | <br> |
| 321 | 320 | <span style="color:red;line-height:20px;font-size:16px"> |
| 322 | - 2.分类编号 从后台题库管理左侧分类的名称前获取 [1] 只需填写中间的数字即可 | |
| 321 | + 2.分类编号 从后台题库管理左侧分类的名称前获取 [1] 只需填写中间的数字即可 | |
| 323 | 322 | </span> |
| 324 | 323 | |
| 325 | 324 | <br> |
| 326 | 325 | |
| 327 | 326 | <span style="color:red;line-height:20px;font-size:16px"> |
| 328 | - 3.多选题 多选题选项 多个用 英文,隔开 如: A,B,C | |
| 329 | - </span> | |
| 330 | - | |
| 331 | - <br> | |
| 327 | + 3.多选题 多选题选项 多个用 英文,隔开 如: A,B,C | |
| 328 | + </span> | |
| 329 | + | |
| 330 | + <br> | |
| 332 | 331 | <el-link :href="BASE_URL + '/temp/题目导入模板.xlsx'" target="_blank" type="primary">点击下载导入模板</el-link> |
| 333 | 332 | |
| 334 | 333 | </div> |
| ... | ... | @@ -464,12 +463,12 @@ |
| 464 | 463 | }, |
| 465 | 464 | handleSuccess(res) { |
| 466 | 465 | var msg = ''; |
| 467 | - if(res.data.data){ | |
| 466 | + if (res.data.data) { | |
| 468 | 467 | msg = `导入完成 共:${res.data.data.tableCount}个题目 成功 ${res.data.data.SuccessCount}个题目`; |
| 469 | - } | |
| 470 | - this.$message.success(msg); | |
| 471 | - this.GetList(); | |
| 472 | - }, | |
| 468 | + } | |
| 469 | + this.$message.success(msg); | |
| 470 | + this.GetList(); | |
| 471 | + }, | |
| 473 | 472 | saveEditDim(data) { |
| 474 | 473 | // if(this.currentEditNode && this.currentEditNode.parent) |
| 475 | 474 | // this.currentExpend=[this.currentEditNode.parent.data.id]; |
| ... | ... | @@ -628,7 +627,14 @@ |
| 628 | 627 | CreateQuestionClassHealder() { |
| 629 | 628 | if (this.loading) return; |
| 630 | 629 | this.loading = true; |
| 631 | - | |
| 630 | + if (!this.QuestionClassInfo.ClassificationName) { | |
| 631 | + this.$notify({ | |
| 632 | + title: '请填写名称后提交!', | |
| 633 | + type: 'warning' | |
| 634 | + }); | |
| 635 | + this.loading = false; | |
| 636 | + return; | |
| 637 | + } | |
| 632 | 638 | this.QuestionClassInfo.Addtime = parseTime(new Date(), ""); |
| 633 | 639 | CreateQuestionClass(this.QuestionClassInfo).then((res) => { |
| 634 | 640 | this.getQuestionClassListHeadler(); |
| ... | ... | @@ -665,7 +671,10 @@ |
| 665 | 671 | } |
| 666 | 672 | if (node) |
| 667 | 673 | this.QuestionClassInfo.ParentId = node.data.value; |
| 668 | - if (type) this.QuestionClassInfo.ClassType = type; | |
| 674 | + if (type) { | |
| 675 | + this.QuestionClassInfo.ClassType = type; | |
| 676 | + // this.FormClassType = type; | |
| 677 | + } | |
| 669 | 678 | else if (node.data.ClassType) this.QuestionClassInfo.ClassType = node.data.ClassType; |
| 670 | 679 | |
| 671 | 680 | |
| ... | ... | @@ -776,6 +785,9 @@ |
| 776 | 785 | _this.dialogsubjectlVisible = false; |
| 777 | 786 | }, 10); |
| 778 | 787 | } |
| 788 | + else{ | |
| 789 | + this.$message.warning(res.data.message); | |
| 790 | + } | |
| 779 | 791 | }); |
| 780 | 792 | } else { |
| 781 | 793 | console.log('error submit!!'); |
| ... | ... | @@ -820,7 +832,53 @@ |
| 820 | 832 | // firstClass.children = this.getSubTree(6, list); |
| 821 | 833 | // let secondClass = list.find((t) => t.id == 1); |
| 822 | 834 | // secondClass.children = this.getSubTree(1, list); |
| 823 | - this.QuestionClass = list; | |
| 835 | + //之前用的 | |
| 836 | + // this.QuestionClass = list; | |
| 837 | + | |
| 838 | + { | |
| 839 | + | |
| 840 | + let zylist = [],cplist=[]; | |
| 841 | + let zylistSource = res.data.data.filter(o=>{ return o.ClassType == 0; }); | |
| 842 | + let cplistSource = res.data.data.filter(o=>{ return o.ClassType == 2; }); | |
| 843 | + | |
| 844 | + zylist = zylistSource.filter(t => !t.ParentId); | |
| 845 | + zylist = zylist.map((t) => { | |
| 846 | + t.value = t.id; | |
| 847 | + t.label = t.ClassificationName; | |
| 848 | + t.children = this.getSubTree(t.id, zylistSource); | |
| 849 | + if (!t.children || !t.children.length) { | |
| 850 | + delete t.children; | |
| 851 | + } | |
| 852 | + return t; | |
| 853 | + }); | |
| 854 | + | |
| 855 | + cplist = cplistSource.filter(t => !t.ParentId); | |
| 856 | + cplist = cplist.map((t) => { | |
| 857 | + t.value = t.id; | |
| 858 | + t.label = t.ClassificationName; | |
| 859 | + t.children = this.getSubTree(t.id, cplistSource); | |
| 860 | + if (!t.children || !t.children.length) { | |
| 861 | + delete t.children; | |
| 862 | + } | |
| 863 | + return t; | |
| 864 | + }); | |
| 865 | + var questionclass_list = [{ | |
| 866 | + value:'-1', | |
| 867 | + label:'专业类', | |
| 868 | + children:zylist , | |
| 869 | + disabled: true | |
| 870 | + }, | |
| 871 | + { | |
| 872 | + value:'-2', | |
| 873 | + label:'测评类', | |
| 874 | + children:cplist , | |
| 875 | + disabled: true, | |
| 876 | + } | |
| 877 | + ]; | |
| 878 | + this.QuestionClass = questionclass_list; | |
| 879 | + } | |
| 880 | + | |
| 881 | + | |
| 824 | 882 | |
| 825 | 883 | var firstlist = list.filter(o => o.ClassType == 0 && o.ParentId == 0).map(o => { |
| 826 | 884 | o.children = this.getSubTree(o.id, list); | ... | ... |
src/views/TestPaper/ManualTestPaper.vue
| ... | ... | @@ -26,11 +26,13 @@ |
| 26 | 26 | <div class="grid-content bg-purple"> |
| 27 | 27 | <div class="areahead">组卷基本信息</div> |
| 28 | 28 | <el-form ref="form" class="testPaper-manager" :rules="rules" :model="TestPaper" label-width="100px"> |
| 29 | - <el-form-item label="试卷名称:" prop="TestPaperTitle" required class="el-form-item-custom" style="margin-bottom: 20px !important;width:100%;"> | |
| 29 | + <el-form-item label="试卷名称:" prop="TestPaperTitle" required class="el-form-item-custom" | |
| 30 | + style="margin-bottom: 20px !important;width:100%;"> | |
| 30 | 31 | <el-input v-model="TestPaper.TestPaperTitle"></el-input> |
| 31 | 32 | </el-form-item> |
| 32 | 33 | |
| 33 | - <el-form-item label="自定义名称:" prop="CustomName" required class="el-form-item-custom" style="margin-bottom: 20px !important;width:100%;"> | |
| 34 | + <el-form-item label="自定义名称:" prop="CustomName" required class="el-form-item-custom" | |
| 35 | + style="margin-bottom: 20px !important;width:100%;"> | |
| 34 | 36 | <el-input v-model="TestPaper.CustomName"></el-input> |
| 35 | 37 | </el-form-item> |
| 36 | 38 | <!-- <el-form-item label="题目数量:" class="el-form-item-custom"> |
| ... | ... | @@ -70,7 +72,7 @@ |
| 70 | 72 | <el-form-item prop="date"> |
| 71 | 73 | <el-date-picker v-model="TestPaper.date" @change="changetimestartend" type="datetimerange" |
| 72 | 74 | format="yyyy-MM-dd hh:mm:ss" range-separator="至" start-placeholder="开始时间" style="width:100%" |
| 73 | - end-placeholder="结束时间" :picker-options="pickerOptions"> | |
| 75 | + end-placeholder="结束时间" :picker-options="pickerOptions"> | |
| 74 | 76 | </el-date-picker> |
| 75 | 77 | </el-form-item> |
| 76 | 78 | </el-form-item> |
| ... | ... | @@ -110,7 +112,7 @@ |
| 110 | 112 | |
| 111 | 113 | </div> --> |
| 112 | 114 | <div class="grid-content bg-purple"> |
| 113 | - <el-tabs v-model="activeTab" style="padding: 0 20px" :stretch="true"> | |
| 115 | + <el-tabs v-model="activeTab" style="padding: 0 20px" @tab-click="changeTab" :stretch="true"> | |
| 114 | 116 | <el-tab-pane label="专业类" name="6"></el-tab-pane> |
| 115 | 117 | <el-tab-pane label="测评类" name="1"></el-tab-pane> |
| 116 | 118 | </el-tabs> |
| ... | ... | @@ -134,8 +136,8 @@ |
| 134 | 136 | |
| 135 | 137 | </div> |
| 136 | 138 | </el-col> |
| 137 | - <el-col :span="10" :style="{'height':contentHeight+'px'}" class="jinyongtop" v-show="active==2"> | |
| 138 | - | |
| 139 | + <el-col :span="10" :style="{'height':contentHeight+'px'}" class="jinyongtop" v-show="active==2"> | |
| 140 | + | |
| 139 | 141 | <div class="grid-content bg-purple"> |
| 140 | 142 | <div class="areahead"> |
| 141 | 143 | <!-- <span v-show="!edit" style="font-weight: bold;">{{ TestPaper.TestPaperTitle }}</span> --> |
| ... | ... | @@ -252,8 +254,7 @@ |
| 252 | 254 | return { |
| 253 | 255 | pickerOptions: { |
| 254 | 256 | disabledDate(time) { |
| 255 | - return | |
| 256 | - time.getTime() > (Date.now() - 8.64e6) | |
| 257 | + return time.getTime() <= Date.now() - 1 * 24 * 3600 * 1000 | |
| 257 | 258 | } |
| 258 | 259 | }, |
| 259 | 260 | active: 1, |
| ... | ... | @@ -368,7 +369,7 @@ |
| 368 | 369 | |
| 369 | 370 | |
| 370 | 371 | ], |
| 371 | - | |
| 372 | + | |
| 372 | 373 | CustomName: [ |
| 373 | 374 | { |
| 374 | 375 | required: true, |
| ... | ... | @@ -428,9 +429,20 @@ |
| 428 | 429 | mounted() { |
| 429 | 430 | //计算页面内容区域的高度 |
| 430 | 431 | this.contentHeight = window.innerHeight - 90; |
| 431 | - //this.GetList(); | |
| 432 | + this.GetList(); | |
| 432 | 433 | }, |
| 433 | 434 | methods: { |
| 435 | + changeTab(a, b) { | |
| 436 | + if (a.index == "1") { | |
| 437 | + this.randomQuestionTypeList[0].disabled = true; | |
| 438 | + this.randomQuestionTypeList[1].disabled = false; | |
| 439 | + } | |
| 440 | + else { | |
| 441 | + | |
| 442 | + this.randomQuestionTypeList[1].disabled = true; | |
| 443 | + this.randomQuestionTypeList[0].disabled = false; | |
| 444 | + } | |
| 445 | + }, | |
| 434 | 446 | removeItem(item, index) { |
| 435 | 447 | this.arr2.splice(index, 1); |
| 436 | 448 | }, |
| ... | ... | @@ -490,6 +502,54 @@ |
| 490 | 502 | getQuestionClassList().then((res) => { |
| 491 | 503 | let alllist = res.data.data; |
| 492 | 504 | this.typelist = alllist; |
| 505 | + | |
| 506 | + let zylist = [], cplist = []; | |
| 507 | + let zylistSource = alllist.filter(o => { return o.ClassType == 0; }); | |
| 508 | + let cplistSource = alllist.filter(o => { return o.ClassType == 2; }); | |
| 509 | + | |
| 510 | + zylist = zylistSource.filter(t => !t.ParentId); | |
| 511 | + zylist = zylist.map((t) => { | |
| 512 | + t.value = t.id; | |
| 513 | + t.label = t.ClassificationName; | |
| 514 | + t.children = this.getSubTree(t.id, zylistSource); | |
| 515 | + if (!t.children || !t.children.length) { | |
| 516 | + delete t.children; | |
| 517 | + } | |
| 518 | + return t; | |
| 519 | + }); | |
| 520 | + | |
| 521 | + cplist = cplistSource.filter(t => !t.ParentId); | |
| 522 | + cplist = cplist.map((t) => { | |
| 523 | + t.value = t.id; | |
| 524 | + t.label = t.ClassificationName; | |
| 525 | + t.children = this.getSubTree(t.id, cplistSource); | |
| 526 | + if (!t.children || !t.children.length) { | |
| 527 | + delete t.children; | |
| 528 | + } | |
| 529 | + return t; | |
| 530 | + }); | |
| 531 | + var list = [{ | |
| 532 | + value: '-1', | |
| 533 | + label: '专业类', | |
| 534 | + children: zylist, | |
| 535 | + disabled: false | |
| 536 | + }, | |
| 537 | + { | |
| 538 | + value: '-2', | |
| 539 | + label: '测评类', | |
| 540 | + children: cplist, | |
| 541 | + disabled: true, | |
| 542 | + } | |
| 543 | + ]; | |
| 544 | + this.randomQuestionTypeList = list; | |
| 545 | + }); | |
| 546 | + }, | |
| 547 | + | |
| 548 | + getQuestionClassListHeadler2bk() { | |
| 549 | + let _this = this; | |
| 550 | + getQuestionClassList().then((res) => { | |
| 551 | + let alllist = res.data.data; | |
| 552 | + this.typelist = alllist; | |
| 493 | 553 | let list = alllist.filter(t => !t.ParentId); |
| 494 | 554 | list = list.map((t) => { |
| 495 | 555 | t.value = t.id; |
| ... | ... | @@ -500,6 +560,7 @@ |
| 500 | 560 | } |
| 501 | 561 | return t; |
| 502 | 562 | }); |
| 563 | + | |
| 503 | 564 | this.randomQuestionTypeList = list; |
| 504 | 565 | }); |
| 505 | 566 | }, |
| ... | ... | @@ -507,7 +568,6 @@ |
| 507 | 568 | this.dialogTableVisible = false; |
| 508 | 569 | }, |
| 509 | 570 | randomSubmit() { |
| 510 | - | |
| 511 | 571 | var _this = this; |
| 512 | 572 | if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && _this.arr2.length >= _this.TestPaper.FLevelCount) { |
| 513 | 573 | this.$notify({ |
| ... | ... | @@ -517,7 +577,7 @@ |
| 517 | 577 | }); |
| 518 | 578 | return; |
| 519 | 579 | } |
| 520 | - | |
| 580 | + | |
| 521 | 581 | var list = JSON.parse(JSON.stringify(this.randomSubjectList)); |
| 522 | 582 | if (list.findIndex((t) => !t.QuestionClassId || !t.QuestionClassId.length || !t.Count) > -1) { |
| 523 | 583 | this.$message.warning("参数不完整"); |
| ... | ... | @@ -529,7 +589,7 @@ |
| 529 | 589 | return t; |
| 530 | 590 | }); |
| 531 | 591 | var count = 0; |
| 532 | - list.forEach(o=>{ count+=o.Count;}); | |
| 592 | + list.forEach(o => { count += o.Count; }); | |
| 533 | 593 | if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && (_this.arr2.length + count) > _this.TestPaper.FLevelCount) { |
| 534 | 594 | this.$notify({ |
| 535 | 595 | title: '题目数量已经达到级别最大', |
| ... | ... | @@ -601,7 +661,7 @@ |
| 601 | 661 | }, |
| 602 | 662 | SubmitTestPaper() { |
| 603 | 663 | var _this = this; |
| 604 | - if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && _this.arr2.length >= _this.TestPaper.FLevelCount) { | |
| 664 | + if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && _this.arr2.length > _this.TestPaper.FLevelCount) { | |
| 605 | 665 | this.$notify({ |
| 606 | 666 | title: '题目数量已经达到级别最大', |
| 607 | 667 | // message: res.data.message, |
| ... | ... | @@ -643,13 +703,10 @@ |
| 643 | 703 | this.$confirm("试题没有题目!", "消息"); |
| 644 | 704 | } |
| 645 | 705 | } else { |
| 646 | - | |
| 647 | 706 | return false; |
| 648 | 707 | } |
| 649 | 708 | }); |
| 650 | - | |
| 651 | - | |
| 652 | - | |
| 709 | + | |
| 653 | 710 | }, |
| 654 | 711 | load() { |
| 655 | 712 | this.loading = true; |
| ... | ... | @@ -670,7 +727,8 @@ |
| 670 | 727 | }); |
| 671 | 728 | this.loadingType = true; |
| 672 | 729 | }); |
| 673 | - } else { | |
| 730 | + } | |
| 731 | + else { | |
| 674 | 732 | getQuestionList(this.parameter).then((res) => { |
| 675 | 733 | if (this.parameter.pageIndex == 1) { |
| 676 | 734 | this.arr1 = []; |
| ... | ... | @@ -680,8 +738,10 @@ |
| 680 | 738 | }); |
| 681 | 739 | this.count = res.data.data.total; |
| 682 | 740 | this.$forceUpdate(); |
| 741 | + this.loadingType=true; | |
| 683 | 742 | }); |
| 684 | 743 | } |
| 744 | + | |
| 685 | 745 | }, |
| 686 | 746 | end1(e) { |
| 687 | 747 | var that = this; |
| ... | ... | @@ -723,6 +783,12 @@ |
| 723 | 783 | ComeHere(e) { |
| 724 | 784 | var _this = this; |
| 725 | 785 | if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && _this.arr2.length >= _this.TestPaper.FLevelCount) { |
| 786 | + this.$notify({ | |
| 787 | + title: '题目数量已经达到级别最大', | |
| 788 | + // message: res.data.message, | |
| 789 | + type: 'warning' | |
| 790 | + }); | |
| 791 | + return; | |
| 726 | 792 | return; |
| 727 | 793 | } |
| 728 | 794 | var d = e.item._underlying_vm_; | ... | ... |
src/views/TestPaper/TestPaperList.vue
| ... | ... | @@ -33,7 +33,7 @@ |
| 33 | 33 | </el-form-item> |
| 34 | 34 | <el-form-item> |
| 35 | 35 | <el-button type="success" @click="search">搜索</el-button> |
| 36 | - <el-button type="primary" @click="dialogAddTestPaperVIsible=true">添加试卷 | |
| 36 | + <!-- <el-button type="primary" @click="dialogAddTestPaperVIsible=true">添加试卷 --> | |
| 37 | 37 | </el-button> |
| 38 | 38 | </el-form-item> |
| 39 | 39 | </el-form> |
| ... | ... | @@ -121,6 +121,11 @@ |
| 121 | 121 | <span>{{ scope.row.Describe }}</span> |
| 122 | 122 | </template> |
| 123 | 123 | </el-table-column> |
| 124 | + <el-table-column prop="name" label="有效期" :show-overflow-tooltip=true width="200"> | |
| 125 | + <template slot-scope="scope"> | |
| 126 | + <span>{{ scope.row.EffectiveStartTime | timeF }} - {{ scope.row.EffectiveEndTime | timeF }}</span> | |
| 127 | + </template> | |
| 128 | + </el-table-column> | |
| 124 | 129 | <el-table-column fixed="right" label="操作" width="150"> |
| 125 | 130 | <template slot-scope="scope"> |
| 126 | 131 | <el-dropdown @command="(e)=>{handleCommand(e,scope.row)}"> |
| ... | ... | @@ -361,6 +366,13 @@ |
| 361 | 366 | console.log(e); |
| 362 | 367 | return '未知' |
| 363 | 368 | } |
| 369 | + }, | |
| 370 | + timeF(val) { | |
| 371 | + try { | |
| 372 | + return val.split('T')[0]; | |
| 373 | + } catch (e) { | |
| 374 | + return val | |
| 375 | + } | |
| 364 | 376 | } |
| 365 | 377 | }, |
| 366 | 378 | beforeCreate() { | ... | ... |
src/views/user/userlist.vue
| ... | ... | @@ -8,20 +8,23 @@ |
| 8 | 8 | <el-input placeholder="输入关键字搜索" v-model="query.keyword"></el-input> |
| 9 | 9 | </el-form-item> |
| 10 | 10 | <el-form-item label="最高学历"> |
| 11 | - <el-select v-model="query.xueli" placeholder="最高学历"> | |
| 12 | - <el-option label="大专" value="shanghai"></el-option> | |
| 13 | - <el-option label="本科" value="beijing"></el-option> | |
| 11 | + <el-select v-model="query.xueli" placeholder="最高学历" clearable> | |
| 12 | + <el-option label="大专" value="大专"></el-option> | |
| 13 | + <el-option label="本科" value="本科"></el-option> | |
| 14 | + <el-option label="硕士" value="硕士"></el-option> | |
| 15 | + <el-option label="博士" value="博士"></el-option> | |
| 16 | + <el-option label="博士后" value="博士后"></el-option> | |
| 14 | 17 | </el-select> |
| 15 | 18 | </el-form-item> |
| 16 | 19 | |
| 17 | 20 | <el-form-item label="性别"> |
| 18 | - <el-select v-model="query.sex" placeholder="性别"> | |
| 21 | + <el-select v-model="query.sex" placeholder="性别" clearable> | |
| 19 | 22 | <el-option label="男" value="1"></el-option> |
| 20 | 23 | <el-option label="女" value="0"></el-option> |
| 21 | 24 | </el-select> |
| 22 | 25 | </el-form-item> |
| 23 | 26 | <el-form-item label="面试进度"> |
| 24 | - <el-select v-model="query.process" placeholder="进度"> | |
| 27 | + <el-select v-model="query.process" placeholder="进度" clearable> | |
| 25 | 28 | <el-option label="全部" value="-1"></el-option> |
| 26 | 29 | <el-option v-for="item in processlist" :key="item.value" :label="item.label" |
| 27 | 30 | :value="item.value"> |
| ... | ... | @@ -31,7 +34,7 @@ |
| 31 | 34 | |
| 32 | 35 | <el-form-item label="推荐指数"> |
| 33 | 36 | <el-rate v-model="query.stars" text-color="#ff9900" style="margin-top:10px;" show-score |
| 34 | - :allow-half="true" :max="7" :score-template="query.stars <0?'无':query.stars+' 星' "> | |
| 37 | + :allow-half="true" :max="7" :score-template="(!query.stars || query.stars<1) ?'无':query.stars+' 星' "> | |
| 35 | 38 | </el-rate> |
| 36 | 39 | </el-form-item> |
| 37 | 40 | |
| ... | ... | @@ -289,6 +292,7 @@ |
| 289 | 292 | <el-select v-model="adminUserInfo.xueli" placeholder="最高学历"> |
| 290 | 293 | <el-option label="大专" value="大专"></el-option> |
| 291 | 294 | <el-option label="本科" value="本科"></el-option> |
| 295 | + <el-option label="硕士" value="硕士"></el-option> | |
| 292 | 296 | <el-option label="博士" value="博士"></el-option> |
| 293 | 297 | <el-option label="博士后" value="博士后"></el-option> |
| 294 | 298 | </el-select> |
| ... | ... | @@ -1157,6 +1161,13 @@ |
| 1157 | 1161 | // this.$loading({lock:true,text:'保存中...'}); |
| 1158 | 1162 | if (this.loading) { |
| 1159 | 1163 | return; |
| 1164 | + } | |
| 1165 | + if(!this.temp.ClassTitle){ | |
| 1166 | + this.$message({ | |
| 1167 | + message: "请填写分类名称!", | |
| 1168 | + type: "warning", | |
| 1169 | + }); | |
| 1170 | + return; | |
| 1160 | 1171 | } |
| 1161 | 1172 | this.loading = true; |
| 1162 | 1173 | var postData = this.temp; | ... | ... |
vue.config.js
| ... | ... | @@ -39,7 +39,7 @@ module.exports = { |
| 39 | 39 | proxy: { |
| 40 | 40 | '/development': { |
| 41 | 41 | // target: `http://admin.7-stars.com.cn/`, //后台服务地址 |
| 42 | - target:'http://localhost:8877', | |
| 42 | + target:'https://localhost:44399/', | |
| 43 | 43 | // target:'http://localhost:8009', |
| 44 | 44 | changeOrigin: true, |
| 45 | 45 | pathRewrite: { |
| ... | ... | @@ -47,7 +47,9 @@ module.exports = { |
| 47 | 47 | } |
| 48 | 48 | }, |
| 49 | 49 | '/api': { |
| 50 | - target: `http://admin.7-stars.com.cn/`, //后台服务地址 | |
| 50 | + target:'https://localhost:44399/', | |
| 51 | + | |
| 52 | + // target: `http://admin.7-stars.com.cn/`, //后台服务地址 | |
| 51 | 53 | // target: 'http://localhost:8877', |
| 52 | 54 | changeOrigin: true, |
| 53 | 55 | pathRewrite: {} | ... | ... |