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,10 +7,12 @@ | ||
| 7 | <div class="right-menu"> | 7 | <div class="right-menu"> |
| 8 | <el-dropdown class="avatar-container" trigger="click"> | 8 | <el-dropdown class="avatar-container" trigger="click"> |
| 9 | <div class="avatar-wrapper"> | 9 | <div class="avatar-wrapper"> |
| 10 | - <span>您好</span> | 10 | + <span v-if="name">您好、({{name}})</span> |
| 11 | + <span v-else>您好</span> | ||
| 11 | <i class="el-icon-caret-bottom" style="margin-top: -7px;" /> | 12 | <i class="el-icon-caret-bottom" style="margin-top: -7px;" /> |
| 12 | </div> | 13 | </div> |
| 13 | <el-dropdown-menu slot="dropdown" class="user-dropdown"> | 14 | <el-dropdown-menu slot="dropdown" class="user-dropdown"> |
| 15 | + | ||
| 14 | <el-dropdown-item @click.native="logout"> | 16 | <el-dropdown-item @click.native="logout"> |
| 15 | <span style="display:block;">退出</span> | 17 | <span style="display:block;">退出</span> |
| 16 | </el-dropdown-item> | 18 | </el-dropdown-item> |
| @@ -33,7 +35,8 @@ export default { | @@ -33,7 +35,8 @@ export default { | ||
| 33 | computed: { | 35 | computed: { |
| 34 | ...mapGetters([ | 36 | ...mapGetters([ |
| 35 | 'sidebar', | 37 | 'sidebar', |
| 36 | - 'avatar' | 38 | + 'avatar', |
| 39 | + 'name' | ||
| 37 | ]) | 40 | ]) |
| 38 | }, | 41 | }, |
| 39 | methods: { | 42 | methods: { |
src/utils/request.js
| @@ -12,7 +12,7 @@ import { | @@ -12,7 +12,7 @@ import { | ||
| 12 | const service = axios.create({ | 12 | const service = axios.create({ |
| 13 | baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url | 13 | baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url |
| 14 | // withCredentials: true, // send cookies when cross-domain requests | 14 | // withCredentials: true, // send cookies when cross-domain requests |
| 15 | - timeout: 5000 // request timeout | 15 | + timeout: 9000 // request timeout |
| 16 | }) | 16 | }) |
| 17 | 17 | ||
| 18 | // request interceptor | 18 | // request interceptor |
src/views/QuestionBank/components/EditDimension.vue
| 1 | <template> | 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 | <el-form :model="data"> | 3 | <el-form :model="data"> |
| 4 | <el-form-item label="上级分类" style="padding-top: 5px"> | 4 | <el-form-item label="上级分类" style="padding-top: 5px"> |
| 5 | 5 |
src/views/QuestionBank/index.vue
| @@ -148,9 +148,9 @@ | @@ -148,9 +148,9 @@ | ||
| 148 | </div> | 148 | </div> |
| 149 | </el-col> | 149 | </el-col> |
| 150 | </el-row> | 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 | :close-on-click-modal="false"> | 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 | <el-form-item label="分类名称"> | 154 | <el-form-item label="分类名称"> |
| 155 | 155 | ||
| 156 | <el-input v-model="QuestionClassInfo.ClassificationName" placeholder="请输入分类名称"></el-input> | 156 | <el-input v-model="QuestionClassInfo.ClassificationName" placeholder="请输入分类名称"></el-input> |
| @@ -181,7 +181,7 @@ | @@ -181,7 +181,7 @@ | ||
| 181 | 181 | ||
| 182 | <template slot-scope="{ node, data }"> | 182 | <template slot-scope="{ node, data }"> |
| 183 | <span>{{ data.label }}</span> | 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 | </template> | 185 | </template> |
| 186 | 186 | ||
| 187 | 187 | ||
| @@ -297,8 +297,7 @@ | @@ -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 | action="/api/QuestionBank/import" :limit="1"> | 301 | action="/api/QuestionBank/import" :limit="1"> |
| 303 | <i class="el-icon-upload"></i> | 302 | <i class="el-icon-upload"></i> |
| 304 | <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> | 303 | <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
| @@ -307,7 +306,7 @@ | @@ -307,7 +306,7 @@ | ||
| 307 | <br> | 306 | <br> |
| 308 | <br> | 307 | <br> |
| 309 | <span style="color:red;line-height:20px;font-size:16px"> | 308 | <span style="color:red;line-height:20px;font-size:16px"> |
| 310 | - 注意: | 309 | + 注意: |
| 311 | <br> | 310 | <br> |
| 312 | 1.导入每个选项格式 分为三段 用” @@ “ 隔开 选项内容@@选项分值@@选项权重(权重 分为三个 高 中 低) <br /> 例如: | 311 | 1.导入每个选项格式 分为三段 用” @@ “ 隔开 选项内容@@选项分值@@选项权重(权重 分为三个 高 中 低) <br /> 例如: |
| 313 | <p>选项A 今天感觉怎么样@@10@@高</p> | 312 | <p>选项A 今天感觉怎么样@@10@@高</p> |
| @@ -319,16 +318,16 @@ | @@ -319,16 +318,16 @@ | ||
| 319 | 318 | ||
| 320 | <br> | 319 | <br> |
| 321 | <span style="color:red;line-height:20px;font-size:16px"> | 320 | <span style="color:red;line-height:20px;font-size:16px"> |
| 322 | - 2.分类编号 从后台题库管理左侧分类的名称前获取 [1] 只需填写中间的数字即可 | 321 | + 2.分类编号 从后台题库管理左侧分类的名称前获取 [1] 只需填写中间的数字即可 |
| 323 | </span> | 322 | </span> |
| 324 | 323 | ||
| 325 | <br> | 324 | <br> |
| 326 | 325 | ||
| 327 | <span style="color:red;line-height:20px;font-size:16px"> | 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 | <el-link :href="BASE_URL + '/temp/题目导入模板.xlsx'" target="_blank" type="primary">点击下载导入模板</el-link> | 331 | <el-link :href="BASE_URL + '/temp/题目导入模板.xlsx'" target="_blank" type="primary">点击下载导入模板</el-link> |
| 333 | 332 | ||
| 334 | </div> | 333 | </div> |
| @@ -464,12 +463,12 @@ | @@ -464,12 +463,12 @@ | ||
| 464 | }, | 463 | }, |
| 465 | handleSuccess(res) { | 464 | handleSuccess(res) { |
| 466 | var msg = ''; | 465 | var msg = ''; |
| 467 | - if(res.data.data){ | 466 | + if (res.data.data) { |
| 468 | msg = `导入完成 共:${res.data.data.tableCount}个题目 成功 ${res.data.data.SuccessCount}个题目`; | 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 | saveEditDim(data) { | 472 | saveEditDim(data) { |
| 474 | // if(this.currentEditNode && this.currentEditNode.parent) | 473 | // if(this.currentEditNode && this.currentEditNode.parent) |
| 475 | // this.currentExpend=[this.currentEditNode.parent.data.id]; | 474 | // this.currentExpend=[this.currentEditNode.parent.data.id]; |
| @@ -628,7 +627,14 @@ | @@ -628,7 +627,14 @@ | ||
| 628 | CreateQuestionClassHealder() { | 627 | CreateQuestionClassHealder() { |
| 629 | if (this.loading) return; | 628 | if (this.loading) return; |
| 630 | this.loading = true; | 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 | this.QuestionClassInfo.Addtime = parseTime(new Date(), ""); | 638 | this.QuestionClassInfo.Addtime = parseTime(new Date(), ""); |
| 633 | CreateQuestionClass(this.QuestionClassInfo).then((res) => { | 639 | CreateQuestionClass(this.QuestionClassInfo).then((res) => { |
| 634 | this.getQuestionClassListHeadler(); | 640 | this.getQuestionClassListHeadler(); |
| @@ -665,7 +671,10 @@ | @@ -665,7 +671,10 @@ | ||
| 665 | } | 671 | } |
| 666 | if (node) | 672 | if (node) |
| 667 | this.QuestionClassInfo.ParentId = node.data.value; | 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 | else if (node.data.ClassType) this.QuestionClassInfo.ClassType = node.data.ClassType; | 678 | else if (node.data.ClassType) this.QuestionClassInfo.ClassType = node.data.ClassType; |
| 670 | 679 | ||
| 671 | 680 | ||
| @@ -776,6 +785,9 @@ | @@ -776,6 +785,9 @@ | ||
| 776 | _this.dialogsubjectlVisible = false; | 785 | _this.dialogsubjectlVisible = false; |
| 777 | }, 10); | 786 | }, 10); |
| 778 | } | 787 | } |
| 788 | + else{ | ||
| 789 | + this.$message.warning(res.data.message); | ||
| 790 | + } | ||
| 779 | }); | 791 | }); |
| 780 | } else { | 792 | } else { |
| 781 | console.log('error submit!!'); | 793 | console.log('error submit!!'); |
| @@ -820,7 +832,53 @@ | @@ -820,7 +832,53 @@ | ||
| 820 | // firstClass.children = this.getSubTree(6, list); | 832 | // firstClass.children = this.getSubTree(6, list); |
| 821 | // let secondClass = list.find((t) => t.id == 1); | 833 | // let secondClass = list.find((t) => t.id == 1); |
| 822 | // secondClass.children = this.getSubTree(1, list); | 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 | var firstlist = list.filter(o => o.ClassType == 0 && o.ParentId == 0).map(o => { | 883 | var firstlist = list.filter(o => o.ClassType == 0 && o.ParentId == 0).map(o => { |
| 826 | o.children = this.getSubTree(o.id, list); | 884 | o.children = this.getSubTree(o.id, list); |
src/views/TestPaper/ManualTestPaper.vue
| @@ -26,11 +26,13 @@ | @@ -26,11 +26,13 @@ | ||
| 26 | <div class="grid-content bg-purple"> | 26 | <div class="grid-content bg-purple"> |
| 27 | <div class="areahead">组卷基本信息</div> | 27 | <div class="areahead">组卷基本信息</div> |
| 28 | <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"> |
| 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 | <el-input v-model="TestPaper.TestPaperTitle"></el-input> | 31 | <el-input v-model="TestPaper.TestPaperTitle"></el-input> |
| 31 | </el-form-item> | 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 | <el-input v-model="TestPaper.CustomName"></el-input> | 36 | <el-input v-model="TestPaper.CustomName"></el-input> |
| 35 | </el-form-item> | 37 | </el-form-item> |
| 36 | <!-- <el-form-item label="题目数量:" class="el-form-item-custom"> | 38 | <!-- <el-form-item label="题目数量:" class="el-form-item-custom"> |
| @@ -70,7 +72,7 @@ | @@ -70,7 +72,7 @@ | ||
| 70 | <el-form-item prop="date"> | 72 | <el-form-item prop="date"> |
| 71 | <el-date-picker v-model="TestPaper.date" @change="changetimestartend" type="datetimerange" | 73 | <el-date-picker v-model="TestPaper.date" @change="changetimestartend" type="datetimerange" |
| 72 | format="yyyy-MM-dd hh:mm:ss" range-separator="至" start-placeholder="开始时间" style="width:100%" | 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 | </el-date-picker> | 76 | </el-date-picker> |
| 75 | </el-form-item> | 77 | </el-form-item> |
| 76 | </el-form-item> | 78 | </el-form-item> |
| @@ -110,7 +112,7 @@ | @@ -110,7 +112,7 @@ | ||
| 110 | 112 | ||
| 111 | </div> --> | 113 | </div> --> |
| 112 | <div class="grid-content bg-purple"> | 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 | <el-tab-pane label="专业类" name="6"></el-tab-pane> | 116 | <el-tab-pane label="专业类" name="6"></el-tab-pane> |
| 115 | <el-tab-pane label="测评类" name="1"></el-tab-pane> | 117 | <el-tab-pane label="测评类" name="1"></el-tab-pane> |
| 116 | </el-tabs> | 118 | </el-tabs> |
| @@ -134,8 +136,8 @@ | @@ -134,8 +136,8 @@ | ||
| 134 | 136 | ||
| 135 | </div> | 137 | </div> |
| 136 | </el-col> | 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 | <div class="grid-content bg-purple"> | 141 | <div class="grid-content bg-purple"> |
| 140 | <div class="areahead"> | 142 | <div class="areahead"> |
| 141 | <!-- <span v-show="!edit" style="font-weight: bold;">{{ TestPaper.TestPaperTitle }}</span> --> | 143 | <!-- <span v-show="!edit" style="font-weight: bold;">{{ TestPaper.TestPaperTitle }}</span> --> |
| @@ -252,8 +254,7 @@ | @@ -252,8 +254,7 @@ | ||
| 252 | return { | 254 | return { |
| 253 | pickerOptions: { | 255 | pickerOptions: { |
| 254 | disabledDate(time) { | 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 | active: 1, | 260 | active: 1, |
| @@ -368,7 +369,7 @@ | @@ -368,7 +369,7 @@ | ||
| 368 | 369 | ||
| 369 | 370 | ||
| 370 | ], | 371 | ], |
| 371 | - | 372 | + |
| 372 | CustomName: [ | 373 | CustomName: [ |
| 373 | { | 374 | { |
| 374 | required: true, | 375 | required: true, |
| @@ -428,9 +429,20 @@ | @@ -428,9 +429,20 @@ | ||
| 428 | mounted() { | 429 | mounted() { |
| 429 | //计算页面内容区域的高度 | 430 | //计算页面内容区域的高度 |
| 430 | this.contentHeight = window.innerHeight - 90; | 431 | this.contentHeight = window.innerHeight - 90; |
| 431 | - //this.GetList(); | 432 | + this.GetList(); |
| 432 | }, | 433 | }, |
| 433 | methods: { | 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 | removeItem(item, index) { | 446 | removeItem(item, index) { |
| 435 | this.arr2.splice(index, 1); | 447 | this.arr2.splice(index, 1); |
| 436 | }, | 448 | }, |
| @@ -490,6 +502,54 @@ | @@ -490,6 +502,54 @@ | ||
| 490 | getQuestionClassList().then((res) => { | 502 | getQuestionClassList().then((res) => { |
| 491 | let alllist = res.data.data; | 503 | let alllist = res.data.data; |
| 492 | this.typelist = alllist; | 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 | let list = alllist.filter(t => !t.ParentId); | 553 | let list = alllist.filter(t => !t.ParentId); |
| 494 | list = list.map((t) => { | 554 | list = list.map((t) => { |
| 495 | t.value = t.id; | 555 | t.value = t.id; |
| @@ -500,6 +560,7 @@ | @@ -500,6 +560,7 @@ | ||
| 500 | } | 560 | } |
| 501 | return t; | 561 | return t; |
| 502 | }); | 562 | }); |
| 563 | + | ||
| 503 | this.randomQuestionTypeList = list; | 564 | this.randomQuestionTypeList = list; |
| 504 | }); | 565 | }); |
| 505 | }, | 566 | }, |
| @@ -507,7 +568,6 @@ | @@ -507,7 +568,6 @@ | ||
| 507 | this.dialogTableVisible = false; | 568 | this.dialogTableVisible = false; |
| 508 | }, | 569 | }, |
| 509 | randomSubmit() { | 570 | randomSubmit() { |
| 510 | - | ||
| 511 | var _this = this; | 571 | var _this = this; |
| 512 | if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && _this.arr2.length >= _this.TestPaper.FLevelCount) { | 572 | if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && _this.arr2.length >= _this.TestPaper.FLevelCount) { |
| 513 | this.$notify({ | 573 | this.$notify({ |
| @@ -517,7 +577,7 @@ | @@ -517,7 +577,7 @@ | ||
| 517 | }); | 577 | }); |
| 518 | return; | 578 | return; |
| 519 | } | 579 | } |
| 520 | - | 580 | + |
| 521 | var list = JSON.parse(JSON.stringify(this.randomSubjectList)); | 581 | var list = JSON.parse(JSON.stringify(this.randomSubjectList)); |
| 522 | if (list.findIndex((t) => !t.QuestionClassId || !t.QuestionClassId.length || !t.Count) > -1) { | 582 | if (list.findIndex((t) => !t.QuestionClassId || !t.QuestionClassId.length || !t.Count) > -1) { |
| 523 | this.$message.warning("参数不完整"); | 583 | this.$message.warning("参数不完整"); |
| @@ -529,7 +589,7 @@ | @@ -529,7 +589,7 @@ | ||
| 529 | return t; | 589 | return t; |
| 530 | }); | 590 | }); |
| 531 | var count = 0; | 591 | var count = 0; |
| 532 | - list.forEach(o=>{ count+=o.Count;}); | 592 | + list.forEach(o => { count += o.Count; }); |
| 533 | if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && (_this.arr2.length + count) > _this.TestPaper.FLevelCount) { | 593 | if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && (_this.arr2.length + count) > _this.TestPaper.FLevelCount) { |
| 534 | this.$notify({ | 594 | this.$notify({ |
| 535 | title: '题目数量已经达到级别最大', | 595 | title: '题目数量已经达到级别最大', |
| @@ -601,7 +661,7 @@ | @@ -601,7 +661,7 @@ | ||
| 601 | }, | 661 | }, |
| 602 | SubmitTestPaper() { | 662 | SubmitTestPaper() { |
| 603 | var _this = this; | 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 | this.$notify({ | 665 | this.$notify({ |
| 606 | title: '题目数量已经达到级别最大', | 666 | title: '题目数量已经达到级别最大', |
| 607 | // message: res.data.message, | 667 | // message: res.data.message, |
| @@ -643,13 +703,10 @@ | @@ -643,13 +703,10 @@ | ||
| 643 | this.$confirm("试题没有题目!", "消息"); | 703 | this.$confirm("试题没有题目!", "消息"); |
| 644 | } | 704 | } |
| 645 | } else { | 705 | } else { |
| 646 | - | ||
| 647 | return false; | 706 | return false; |
| 648 | } | 707 | } |
| 649 | }); | 708 | }); |
| 650 | - | ||
| 651 | - | ||
| 652 | - | 709 | + |
| 653 | }, | 710 | }, |
| 654 | load() { | 711 | load() { |
| 655 | this.loading = true; | 712 | this.loading = true; |
| @@ -670,7 +727,8 @@ | @@ -670,7 +727,8 @@ | ||
| 670 | }); | 727 | }); |
| 671 | this.loadingType = true; | 728 | this.loadingType = true; |
| 672 | }); | 729 | }); |
| 673 | - } else { | 730 | + } |
| 731 | + else { | ||
| 674 | getQuestionList(this.parameter).then((res) => { | 732 | getQuestionList(this.parameter).then((res) => { |
| 675 | if (this.parameter.pageIndex == 1) { | 733 | if (this.parameter.pageIndex == 1) { |
| 676 | this.arr1 = []; | 734 | this.arr1 = []; |
| @@ -680,8 +738,10 @@ | @@ -680,8 +738,10 @@ | ||
| 680 | }); | 738 | }); |
| 681 | this.count = res.data.data.total; | 739 | this.count = res.data.data.total; |
| 682 | this.$forceUpdate(); | 740 | this.$forceUpdate(); |
| 741 | + this.loadingType=true; | ||
| 683 | }); | 742 | }); |
| 684 | } | 743 | } |
| 744 | + | ||
| 685 | }, | 745 | }, |
| 686 | end1(e) { | 746 | end1(e) { |
| 687 | var that = this; | 747 | var that = this; |
| @@ -723,6 +783,12 @@ | @@ -723,6 +783,12 @@ | ||
| 723 | ComeHere(e) { | 783 | ComeHere(e) { |
| 724 | var _this = this; | 784 | var _this = this; |
| 725 | if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && _this.arr2.length >= _this.TestPaper.FLevelCount) { | 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 | return; | 792 | return; |
| 727 | } | 793 | } |
| 728 | var d = e.item._underlying_vm_; | 794 | var d = e.item._underlying_vm_; |
src/views/TestPaper/TestPaperList.vue
| @@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
| 33 | </el-form-item> | 33 | </el-form-item> |
| 34 | <el-form-item> | 34 | <el-form-item> |
| 35 | <el-button type="success" @click="search">搜索</el-button> | 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 | </el-button> | 37 | </el-button> |
| 38 | </el-form-item> | 38 | </el-form-item> |
| 39 | </el-form> | 39 | </el-form> |
| @@ -121,6 +121,11 @@ | @@ -121,6 +121,11 @@ | ||
| 121 | <span>{{ scope.row.Describe }}</span> | 121 | <span>{{ scope.row.Describe }}</span> |
| 122 | </template> | 122 | </template> |
| 123 | </el-table-column> | 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 | <el-table-column fixed="right" label="操作" width="150"> | 129 | <el-table-column fixed="right" label="操作" width="150"> |
| 125 | <template slot-scope="scope"> | 130 | <template slot-scope="scope"> |
| 126 | <el-dropdown @command="(e)=>{handleCommand(e,scope.row)}"> | 131 | <el-dropdown @command="(e)=>{handleCommand(e,scope.row)}"> |
| @@ -361,6 +366,13 @@ | @@ -361,6 +366,13 @@ | ||
| 361 | console.log(e); | 366 | console.log(e); |
| 362 | return '未知' | 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 | beforeCreate() { | 378 | beforeCreate() { |
src/views/user/userlist.vue
| @@ -8,20 +8,23 @@ | @@ -8,20 +8,23 @@ | ||
| 8 | <el-input placeholder="输入关键字搜索" v-model="query.keyword"></el-input> | 8 | <el-input placeholder="输入关键字搜索" v-model="query.keyword"></el-input> |
| 9 | </el-form-item> | 9 | </el-form-item> |
| 10 | <el-form-item label="最高学历"> | 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 | </el-select> | 17 | </el-select> |
| 15 | </el-form-item> | 18 | </el-form-item> |
| 16 | 19 | ||
| 17 | <el-form-item label="性别"> | 20 | <el-form-item label="性别"> |
| 18 | - <el-select v-model="query.sex" placeholder="性别"> | 21 | + <el-select v-model="query.sex" placeholder="性别" clearable> |
| 19 | <el-option label="男" value="1"></el-option> | 22 | <el-option label="男" value="1"></el-option> |
| 20 | <el-option label="女" value="0"></el-option> | 23 | <el-option label="女" value="0"></el-option> |
| 21 | </el-select> | 24 | </el-select> |
| 22 | </el-form-item> | 25 | </el-form-item> |
| 23 | <el-form-item label="面试进度"> | 26 | <el-form-item label="面试进度"> |
| 24 | - <el-select v-model="query.process" placeholder="进度"> | 27 | + <el-select v-model="query.process" placeholder="进度" clearable> |
| 25 | <el-option label="全部" value="-1"></el-option> | 28 | <el-option label="全部" value="-1"></el-option> |
| 26 | <el-option v-for="item in processlist" :key="item.value" :label="item.label" | 29 | <el-option v-for="item in processlist" :key="item.value" :label="item.label" |
| 27 | :value="item.value"> | 30 | :value="item.value"> |
| @@ -31,7 +34,7 @@ | @@ -31,7 +34,7 @@ | ||
| 31 | 34 | ||
| 32 | <el-form-item label="推荐指数"> | 35 | <el-form-item label="推荐指数"> |
| 33 | <el-rate v-model="query.stars" text-color="#ff9900" style="margin-top:10px;" show-score | 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 | </el-rate> | 38 | </el-rate> |
| 36 | </el-form-item> | 39 | </el-form-item> |
| 37 | 40 | ||
| @@ -289,6 +292,7 @@ | @@ -289,6 +292,7 @@ | ||
| 289 | <el-select v-model="adminUserInfo.xueli" placeholder="最高学历"> | 292 | <el-select v-model="adminUserInfo.xueli" placeholder="最高学历"> |
| 290 | <el-option label="大专" value="大专"></el-option> | 293 | <el-option label="大专" value="大专"></el-option> |
| 291 | <el-option label="本科" value="本科"></el-option> | 294 | <el-option label="本科" value="本科"></el-option> |
| 295 | + <el-option label="硕士" value="硕士"></el-option> | ||
| 292 | <el-option label="博士" value="博士"></el-option> | 296 | <el-option label="博士" value="博士"></el-option> |
| 293 | <el-option label="博士后" value="博士后"></el-option> | 297 | <el-option label="博士后" value="博士后"></el-option> |
| 294 | </el-select> | 298 | </el-select> |
| @@ -1157,6 +1161,13 @@ | @@ -1157,6 +1161,13 @@ | ||
| 1157 | // this.$loading({lock:true,text:'保存中...'}); | 1161 | // this.$loading({lock:true,text:'保存中...'}); |
| 1158 | if (this.loading) { | 1162 | if (this.loading) { |
| 1159 | return; | 1163 | return; |
| 1164 | + } | ||
| 1165 | + if(!this.temp.ClassTitle){ | ||
| 1166 | + this.$message({ | ||
| 1167 | + message: "请填写分类名称!", | ||
| 1168 | + type: "warning", | ||
| 1169 | + }); | ||
| 1170 | + return; | ||
| 1160 | } | 1171 | } |
| 1161 | this.loading = true; | 1172 | this.loading = true; |
| 1162 | var postData = this.temp; | 1173 | var postData = this.temp; |
vue.config.js
| @@ -39,7 +39,7 @@ module.exports = { | @@ -39,7 +39,7 @@ module.exports = { | ||
| 39 | proxy: { | 39 | proxy: { |
| 40 | '/development': { | 40 | '/development': { |
| 41 | // target: `http://admin.7-stars.com.cn/`, //后台服务地址 | 41 | // target: `http://admin.7-stars.com.cn/`, //后台服务地址 |
| 42 | - target:'http://localhost:8877', | 42 | + target:'https://localhost:44399/', |
| 43 | // target:'http://localhost:8009', | 43 | // target:'http://localhost:8009', |
| 44 | changeOrigin: true, | 44 | changeOrigin: true, |
| 45 | pathRewrite: { | 45 | pathRewrite: { |
| @@ -47,7 +47,9 @@ module.exports = { | @@ -47,7 +47,9 @@ module.exports = { | ||
| 47 | } | 47 | } |
| 48 | }, | 48 | }, |
| 49 | '/api': { | 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 | // target: 'http://localhost:8877', | 53 | // target: 'http://localhost:8877', |
| 52 | changeOrigin: true, | 54 | changeOrigin: true, |
| 53 | pathRewrite: {} | 55 | pathRewrite: {} |