Commit 6963d762e8301f54097951509f0161da895560be

Authored by 周超
1 parent 904199bf

拉取志哥最新的

src/api/user.js
@@ -211,3 +211,9 @@ export function saveTypeSetting(data) { @@ -211,3 +211,9 @@ export function saveTypeSetting(data) {
211 } 211 }
212 212
213 213
  214 +export function ChangeClass(id,type) {
  215 + return request({
  216 + url: `/Users/ChangeClass?id=${id}&type=${type}`,
  217 + method: 'post',
  218 + })
  219 +}
214 \ No newline at end of file 220 \ No newline at end of file
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="75%">
3 <el-form :model="data"> 3 <el-form :model="data">
4 <el-form-item label="名称"> 4 <el-form-item label="名称">
5 <el-input v-model="data.ClassificationName"></el-input> 5 <el-input v-model="data.ClassificationName"></el-input>
  6 +
6 </el-form-item> 7 </el-form-item>
7 8
8 - <el-form-item label="规则"> 9 + <el-form-item label="规则" v-show="level ==3">
9 <div style="padding:10px 5px 0px 5px"> 10 <div style="padding:10px 5px 0px 5px">
10 <el-table v-if="data.rules" :data="data.rules" style="width: 100%;"> 11 <el-table v-if="data.rules" :data="data.rules" style="width: 100%;">
11 <el-table-column align="left" label="状态"> 12 <el-table-column align="left" label="状态">
@@ -34,7 +35,7 @@ @@ -34,7 +35,7 @@
34 </el-option> 35 </el-option>
35 </el-select> 36 </el-select>
36 <el-input style="width:20%;margin-right:1%" type="number" v-model="row.StartScore" 37 <el-input style="width:20%;margin-right:1%" type="number" v-model="row.StartScore"
37 - :placeholder="'开始分值'"> 38 + :placeholder="'开始分值'">
38 </el-input> 39 </el-input>
39 <el-select style="width:18%;margin-right:1%" v-model="row.EndFormula" placeholder="规则" clearable> 40 <el-select style="width:18%;margin-right:1%" v-model="row.EndFormula" placeholder="规则" clearable>
40 <el-option v-for="item in ruleOptions" :key="item.value" :label="item.label" :value="item.value"> 41 <el-option v-for="item in ruleOptions" :key="item.value" :label="item.label" :value="item.value">
@@ -122,6 +123,7 @@ @@ -122,6 +123,7 @@
122 activeName: '', 123 activeName: '',
123 dialogFormVisible: false, 124 dialogFormVisible: false,
124 form: {}, 125 form: {},
  126 + level:0,
125 127
126 ruleOptions: [ 128 ruleOptions: [
127 { label: '大于', value: '>' }, 129 { label: '大于', value: '>' },
@@ -242,7 +244,8 @@ @@ -242,7 +244,8 @@
242 this.tableData = tmpdata 244 this.tableData = tmpdata
243 } catch (e) { } 245 } catch (e) { }
244 }, 246 },
245 - show(id) { 247 + show(id,node) {
  248 + if(node) this.level = node.level;
246 this.data = { 249 this.data = {
247 // id: Date.parse(new Date()) + '_' + Math.ceil(Math.random() * 99999), 250 // id: Date.parse(new Date()) + '_' + Math.ceil(Math.random() * 99999),
248 // key: Date.parse(new Date()) + '_' + Math.ceil(Math.random() * 99999), 251 // key: Date.parse(new Date()) + '_' + Math.ceil(Math.random() * 99999),
@@ -264,7 +267,7 @@ @@ -264,7 +267,7 @@
264 267
265 this.dialogFormVisible = true; 268 this.dialogFormVisible = true;
266 getQuestionClass({ id }).then(res => { 269 getQuestionClass({ id }).then(res => {
267 - 270 +
268 if (res) { 271 if (res) {
269 var data = res.data.data; 272 var data = res.data.data;
270 if (!data.rules) { 273 if (!data.rules) {
src/views/QuestionBank/index.vue
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <label style="font-size: 18px">题目分类</label> 7 <label style="font-size: 18px">题目分类</label>
8 </div> 8 </div>
9 9
10 - <div :style="{ height: TableColHeight + 'px' }" class="areadiv" 10 + <div :style="{ height: TableColHeight + 'px','overflow-y':'auto' }" class="areadiv"
11 style="margin: 10px 0 0 0; padding: 5px 0 0 0"> 11 style="margin: 10px 0 0 0; padding: 5px 0 0 0">
12 <el-tabs v-model="activeTab" @tab-click="handleTabsClick" style="padding: 0 20px" :stretch="true"> 12 <el-tabs v-model="activeTab" @tab-click="handleTabsClick" style="padding: 0 20px" :stretch="true">
13 <el-tab-pane label="专业类" name="first"></el-tab-pane> 13 <el-tab-pane label="专业类" name="first"></el-tab-pane>
@@ -15,16 +15,16 @@ @@ -15,16 +15,16 @@
15 </el-tabs> 15 </el-tabs>
16 <el-button type="button" size="mini" style="width:100%;margin-bottom:10px" 16 <el-button type="button" size="mini" style="width:100%;margin-bottom:10px"
17 @click="showClassDialog(null,0,activeTab == 'first' ? 0 : 2)"> 17 @click="showClassDialog(null,0,activeTab == 'first' ? 0 : 2)">
18 - 添加顶级 18 + 添加顶级
19 </el-button> 19 </el-button>
20 <el-tree :data="activeTab == 'first' ? firstTreeData : secondTreeData" 20 <el-tree :data="activeTab == 'first' ? firstTreeData : secondTreeData"
21 :default-expanded-keys="currentExpend" :props="activeTab == 'first' ? firstTreeData : secondTreeData" 21 :default-expanded-keys="currentExpend" :props="activeTab == 'first' ? firstTreeData : secondTreeData"
22 @node-click="handleNodeClick" class="eltree" :expand-on-click-node="false" ref="tree"> 22 @node-click="handleNodeClick" class="eltree" :expand-on-click-node="false" ref="tree">
23 <span class="custom-tree-node" slot-scope="{ node, data }"> 23 <span class="custom-tree-node" slot-scope="{ node, data }">
24 - <span>{{ node.label }}</span> 24 + <span>{{ node.label }} ({{data.subjectCount || 0}})</span>
25 <span style=""> 25 <span style="">
26 <!-- v-if="activeTab == 'first'?true:node.level<2?true:false" --> 26 <!-- v-if="activeTab == 'first'?true:node.level<2?true:false" -->
27 - <el-button type="text" size="mini" @click="showClassDialog(node)"> 27 + <el-button type="text" size="mini" @click="showClassDialog(node)" v-if="node.level <3">
28 添加下级 28 添加下级
29 </el-button> 29 </el-button>
30 <el-button type="text" v-if="activeTab == 'second' || 1==1" @click="handleEditDimension(node, data)"> 30 <el-button type="text" v-if="activeTab == 'second' || 1==1" @click="handleEditDimension(node, data)">
@@ -66,28 +66,28 @@ @@ -66,28 +66,28 @@
66 <span>{{ scope.row.id }}</span> 66 <span>{{ scope.row.id }}</span>
67 </template> 67 </template>
68 </el-table-column> 68 </el-table-column>
69 - <el-table-column prop="date" label="题目类型" width="100"> 69 + <el-table-column prop="date" label="题目类型" width="110" sortable>
70 <template slot-scope="scope"> 70 <template slot-scope="scope">
71 <span style="padding-left: 10px">{{ 71 <span style="padding-left: 10px">{{
72 scope.row.subjectName 72 scope.row.subjectName
73 }}</span> 73 }}</span>
74 </template> 74 </template>
75 </el-table-column> 75 </el-table-column>
76 - <el-table-column prop="QuestionClassName" label="分类" width="100"> 76 + <el-table-column prop="QuestionClassName" label="分类" width="110" sortable>
77 <template slot-scope="scope"> 77 <template slot-scope="scope">
78 <span style="padding-left: 10px">{{ 78 <span style="padding-left: 10px">{{
79 scope.row.QuestionClassName 79 scope.row.QuestionClassName
80 }}</span> 80 }}</span>
81 </template> 81 </template>
82 </el-table-column> 82 </el-table-column>
83 - <el-table-column prop="name" label="分数" width="80"> 83 + <el-table-column prop="name" label="分数" width="90" sortable>
84 <template slot-scope="scope"> 84 <template slot-scope="scope">
85 <span style="padding-left: 10px">{{ 85 <span style="padding-left: 10px">{{
86 scope.row.fraction 86 scope.row.fraction
87 }}</span> 87 }}</span>
88 </template> 88 </template>
89 </el-table-column> 89 </el-table-column>
90 - <el-table-column prop="name" label="单项分数" width="80"> 90 + <el-table-column prop="name" label="单项分数" width="110" sortable>
91 <template slot-scope="scope"> 91 <template slot-scope="scope">
92 <span style="padding-left: 10px">{{ 92 <span style="padding-left: 10px">{{
93 scope.row.singleFraction 93 scope.row.singleFraction
@@ -153,23 +153,32 @@ @@ -153,23 +153,32 @@
153 <el-input v-model="QuestionClassInfo.ClassificationName" placeholder="请输入分类名称"></el-input> 153 <el-input v-model="QuestionClassInfo.ClassificationName" placeholder="请输入分类名称"></el-input>
154 </el-form-item> 154 </el-form-item>
155 </el-form> 155 </el-form>
156 - {{QuestionClassInfo}} 156 + <!-- {{QuestionClassInfo}} -->
157 <el-button @click="CreateQuestionClassHealder" style="margin: 10px 0 0 0; float: right" type="primary">确定 157 <el-button @click="CreateQuestionClassHealder" style="margin: 10px 0 0 0; float: right" type="primary">确定
158 </el-button> 158 </el-button>
159 <div style="clear: both"></div> 159 <div style="clear: both"></div>
160 </el-dialog> 160 </el-dialog>
161 <el-dialog title="编辑题目" :visible.sync="dialogsubjectlVisible" @close="closeDialog" width="800px" 161 <el-dialog title="编辑题目" :visible.sync="dialogsubjectlVisible" @close="closeDialog" width="800px"
162 :close-on-click-modal="false"> 162 :close-on-click-modal="false">
163 - <el-form ref="Dataform" :model="Dataform" label-width="60px"> 163 +
  164 + <el-form ref="Dataform" :model="Dataform" label-width="60px" :rules="rules">
164 <div style="padding:10px"> 165 <div style="padding:10px">
165 <el-alert v-if="FormClassType==2" title="选项的维度分值如不设置将按照分值规则自动计算" type="warning"></el-alert> 166 <el-alert v-if="FormClassType==2" title="选项的维度分值如不设置将按照分值规则自动计算" type="warning"></el-alert>
166 </div> 167 </div>
167 - <el-form-item label="题目"> 168 + <el-form-item label="题目" prop="subject">
168 <el-input v-model="Dataform.subject" placeholder="请输入题目名称"></el-input> 169 <el-input v-model="Dataform.subject" placeholder="请输入题目名称"></el-input>
169 </el-form-item> 170 </el-form-item>
170 - <el-form-item label="分类" style="padding-top: 5px">  
171 - <el-cascader @change="changequestionclass" v-model="Dataform.QuestionClassId" style="width: 400px" 171 + <el-form-item label="分类" style="padding-top: 5px" prop="QuestionClassId">
  172 +
  173 + <el-cascader @change="changequestionclass" filterable v-model="Dataform.QuestionClassId" style="width: 400px"
172 :props="{ emitPath: false ,checkStrictly:true}" :clearable="true" :options="QuestionClass"> 174 :props="{ emitPath: false ,checkStrictly:true}" :clearable="true" :options="QuestionClass">
  175 +
  176 + <template slot-scope="{ node, data }">
  177 + <span>{{ data.label }}</span>
  178 + <span v-if="!node.isLeaf"> ({{ data.subjectCount || 0 }}) </span>
  179 + </template>
  180 +
  181 +
173 </el-cascader> 182 </el-cascader>
174 </el-form-item> 183 </el-form-item>
175 <el-form-item label="题型" style="padding-top: 5px"> 184 <el-form-item label="题型" style="padding-top: 5px">
@@ -190,9 +199,12 @@ @@ -190,9 +199,12 @@
190 <template slot="prepend">{{ scope.row.option }}</template> 199 <template slot="prepend">{{ scope.row.option }}</template>
191 </el-input> 200 </el-input>
192 201
193 - <el-input placeholder="维度分值" v-model="scope.row.score" class="optionInput" 202 + <!-- <el-input placeholder="维度分值" v-model="scope.row.score" class="optionInput"
194 style="width:21% !important;margin-left:1%"> 203 style="width:21% !important;margin-left:1%">
195 - </el-input> 204 + </el-input> -->
  205 +
  206 + <el-input-number v-model="scope.row.score" class="optionInput" :min="0" :step="5" placeholder="分值"
  207 + style="width:21% !important;margin-left:1%"></el-input-number>
196 <!-- v-if="FormClassType==2" --> 208 <!-- v-if="FormClassType==2" -->
197 <el-select v-model="scope.row.scorerule" class="optionInput" placeholder="分值规则" 209 <el-select v-model="scope.row.scorerule" class="optionInput" placeholder="分值规则"
198 style="width:20% !important;margin-left:1%"> 210 style="width:20% !important;margin-left:1%">
@@ -200,7 +212,7 @@ @@ -200,7 +212,7 @@
200 <el-option v-for="sritem in scoreRules" :label="sritem" :value="sritem">{{sritem}}</el-option> 212 <el-option v-for="sritem in scoreRules" :label="sritem" :value="sritem">{{sritem}}</el-option>
201 </el-select> 213 </el-select>
202 <i class="el-icon-circle-plus el-icon" @click="Addlist"></i> 214 <i class="el-icon-circle-plus el-icon" @click="Addlist"></i>
203 - <i class="el-icon-remove el-icon" @click="RemoveList(scope)" v-if="scope.$index != 0"></i> 215 + <i class="el-icon-remove el-icon" @click="RemoveList(scope)" v-if="subjectContent.length >1"></i>
204 </template> 216 </template>
205 </el-table-column> 217 </el-table-column>
206 218
@@ -351,7 +363,19 @@ @@ -351,7 +363,19 @@
351 CreatClassId: 0, 363 CreatClassId: 0,
352 scoreRules: ['高', '中', '低'], 364 scoreRules: ['高', '中', '低'],
353 currentEditNode: undefined, 365 currentEditNode: undefined,
354 - currentExpend: [1] 366 + currentExpend: [1],
  367 + rules: {
  368 + subject: [
  369 + { required: true, message: '题目名称必填', trigger: 'blur' }
  370 + ],
  371 + subjectType: [
  372 + { required: true, message: '请选择分类', trigger: 'change' }
  373 + ],
  374 + QuestionClassId: [
  375 + { required: true, message: '请选择分类', trigger: 'change' }
  376 + ]
  377 + }
  378 +
355 }; 379 };
356 }, 380 },
357 created() { }, 381 created() { },
@@ -424,7 +448,8 @@ @@ -424,7 +448,8 @@
424 }, 448 },
425 handleChangeCat() { 449 handleChangeCat() {
426 var rows = this.$refs.table.selection; 450 var rows = this.$refs.table.selection;
427 - if (!rows || rows.length < 1) { 451 + if (!rows || rows.length < 1)
  452 + {
428 this.$message.warning('至少选择一项进行操作!'); 453 this.$message.warning('至少选择一项进行操作!');
429 return; 454 return;
430 } 455 }
@@ -467,6 +492,7 @@ @@ -467,6 +492,7 @@
467 this.dialogsubjectlVisible = true 492 this.dialogsubjectlVisible = true
468 }, 493 },
469 changequestionclass(a, b, c) { 494 changequestionclass(a, b, c) {
  495 + debugger;
470 var item = this.QuestionClass.find(o => o.id == a); 496 var item = this.QuestionClass.find(o => o.id == a);
471 if (item) this.FormClassType = item.ClassType; 497 if (item) this.FormClassType = item.ClassType;
472 }, 498 },
@@ -474,7 +500,7 @@ @@ -474,7 +500,7 @@
474 handleEditDimension(node, data) { 500 handleEditDimension(node, data) {
475 console.log(data); 501 console.log(data);
476 // this.$refs.editDimensionDialog.dialogFormVisible = true; 502 // this.$refs.editDimensionDialog.dialogFormVisible = true;
477 - this.$refs.editDimensionDialog.show(data.id); 503 + this.$refs.editDimensionDialog.show(data.id, node);
478 this.currentEditDimension = data; 504 this.currentEditDimension = data;
479 this.currentEditNode = node; 505 this.currentEditNode = node;
480 }, 506 },
@@ -487,13 +513,30 @@ @@ -487,13 +513,30 @@
487 this.loading = true; 513 this.loading = true;
488 // console.log(node, data); 514 // console.log(node, data);
489 // console.log(this.API); 515 // console.log(this.API);
490 - this.API.deleteQuestionClass(data.value).then((res) => {  
491 -  
492 - this.getQuestionClassListHeadler();  
493 516
  517 + setTimeout(() => {
494 this.loading = false; 518 this.loading = false;
495 - this.$message.success('操作成功!'); 519 +
  520 + }, 1000);
  521 + this.$confirm("确认删除该分类信息吗?", "提示", {
  522 + confirmButtonText: "确定",
  523 + cancelButtonText: "取消",
  524 + type: "warning",
  525 + }).then(() => {
  526 + this.API.deleteQuestionClass(data.value).then((res) => {
  527 + if(res.data.success){
  528 + this.getQuestionClassListHeadler();
  529 + this.$message.success('操作成功!');
  530 + }
  531 + else{
  532 + this.$message.error(res.data.message || '删除失败!');
  533 + }
  534 +
  535 + });
496 }); 536 });
  537 +
  538 +
  539 +
497 }, 540 },
498 closeClassDialog() { 541 closeClassDialog() {
499 this.dialogClassIVIsible = false; 542 this.dialogClassIVIsible = false;
@@ -538,7 +581,9 @@ @@ -538,7 +581,9 @@
538 this.dialogsubjectlVisible = true; 581 this.dialogsubjectlVisible = true;
539 }); 582 });
540 }, 583 },
541 - showClassDialog(node, parent, type) { 584 + showClassDialog(node, parent, type) {
  585 + this.QuestionClassInfo.ClassificationName = '';
  586 + this.$forceUpdate();
542 this.dialogClassIVIsible = true; 587 this.dialogClassIVIsible = true;
543 console.log(node); 588 console.log(node);
544 if (parent && parent == 0) this.QuestionClassInfo.ParentId = 0; 589 if (parent && parent == 0) this.QuestionClassInfo.ParentId = 0;
@@ -547,6 +592,7 @@ @@ -547,6 +592,7 @@
547 if (type) this.QuestionClassInfo.ClassType = type; 592 if (type) this.QuestionClassInfo.ClassType = type;
548 else if (node.data.ClassType) this.QuestionClassInfo.ClassType = node.data.ClassType; 593 else if (node.data.ClassType) this.QuestionClassInfo.ClassType = node.data.ClassType;
549 594
  595 +
550 // alert(this.QuestionClassInfo.ParentId); 596 // alert(this.QuestionClassInfo.ParentId);
551 }, 597 },
552 //关闭弹框的事件 598 //关闭弹框的事件
@@ -612,6 +658,7 @@ @@ -612,6 +658,7 @@
612 if (this.loading) return; 658 if (this.loading) return;
613 this.parameter.QuestionClassId = val.value; 659 this.parameter.QuestionClassId = val.value;
614 this.parameter.pageIndex = 1; 660 this.parameter.pageIndex = 1;
  661 + this.Dataform.QuestionClassId = val.value;
615 this.GetList(); 662 this.GetList();
616 }, 663 },
617 DelQuestionBankEventHeadler(id) { 664 DelQuestionBankEventHeadler(id) {
@@ -630,23 +677,32 @@ @@ -630,23 +677,32 @@
630 }, 677 },
631 }); 678 });
632 }, 679 },
633 - EditQuestionHeadler() {  
634 - let reg = new RegExp('"', "g");  
635 - //this.Dataform.subjectContent = JSON.stringify(this.subjectContent).replace(reg, "\"");  
636 - this.Dataform.subjectContent = this.subjectContent;  
637 - if (typeof this.Dataform.answer != "string")  
638 - //判断是否为字符串  
639 - this.Dataform.answer = this.Dataform.answer.join(",");  
640 - var _this = this;  
641 - EditQuestion(this.Dataform).then((res) => {  
642 - if (res.data.code == 200) {  
643 - _this.GetList();  
644 - this.$message(res.data.message);  
645 - setTimeout(function () {  
646 - _this.dialogsubjectlVisible = false;  
647 - }, 10); 680 + EditQuestionHeadler() {
  681 + this.$refs['Dataform'].validate((valid) => {
  682 + if (valid) {
  683 +
  684 + let reg = new RegExp('"', "g");
  685 + //this.Dataform.subjectContent = JSON.stringify(this.subjectContent).replace(reg, "\"");
  686 + this.Dataform.subjectContent = this.subjectContent;
  687 + if (typeof this.Dataform.answer != "string")
  688 + //判断是否为字符串
  689 + this.Dataform.answer = this.Dataform.answer.join(",");
  690 + var _this = this;
  691 + EditQuestion(this.Dataform).then((res) => {
  692 + if (res.data.code == 200) {
  693 + _this.GetList();
  694 + this.$message.success(res.data.message);
  695 + setTimeout(function () {
  696 + _this.dialogsubjectlVisible = false;
  697 + }, 10);
  698 + }
  699 + });
  700 + } else {
  701 + console.log('error submit!!');
  702 + return false;
648 } 703 }
649 }); 704 });
  705 +
650 }, 706 },
651 GetList() { 707 GetList() {
652 let _this = this; 708 let _this = this;
@@ -723,7 +779,7 @@ @@ -723,7 +779,7 @@
723 } 779 }
724 780
725 /deep/.el-form-item { 781 /deep/.el-form-item {
726 - margin-bottom: 5px; 782 + /* margin-bottom: 5px; */
727 } 783 }
728 784
729 /deep/.el-radio { 785 /deep/.el-radio {
src/views/TestPaper/ManualTestPaper.vue
@@ -287,10 +287,16 @@ @@ -287,10 +287,16 @@
287 { 287 {
288 required: true, 288 required: true,
289 message: "请填写试卷名称", 289 message: "请填写试卷名称",
290 - }, 290 + }
291 ], 291 ],
292 292
293 - 293 + AnswerTime: [
  294 + {
  295 + required: true,
  296 + message: "请填写试总时长控制",
  297 + },
  298 +
  299 + ],
294 }, 300 },
295 QuestionClass: [], 301 QuestionClass: [],
296 treeData: [ 302 treeData: [
@@ -480,6 +486,14 @@ @@ -480,6 +486,14 @@
480 486
481 this.$refs['form'].validate((valid) => { 487 this.$refs['form'].validate((valid) => {
482 488
  489 + if(!this.TestPaper.TestPaperTitle){
  490 + this.$notify({
  491 + title: '试卷标题必填!',
  492 + // message: res.data.message,
  493 + type: 'warning'
  494 + });
  495 + return;
  496 + }
483 if (valid) { 497 if (valid) {
484 this.TestPaper.QuestionBankIds = this.arr2.map((u) => u.id); 498 this.TestPaper.QuestionBankIds = this.arr2.map((u) => u.id);
485 var d = this.TestPaper; 499 var d = this.TestPaper;
src/views/TestPaper/TestPaperList.vue
@@ -103,11 +103,11 @@ @@ -103,11 +103,11 @@
103 <el-dialog title="试卷基本信息" :visible.sync="dialogAddTestPaperVIsible" @close="closeClassDialog" width="600px" 103 <el-dialog title="试卷基本信息" :visible.sync="dialogAddTestPaperVIsible" @close="closeClassDialog" width="600px"
104 :close-on-click-modal="false"> 104 :close-on-click-modal="false">
105 <div class="grid-content bg-purple"> 105 <div class="grid-content bg-purple">
106 - <el-form ref="form" class="testPaper-manager" :model="TestPaper" label-width="100px">  
107 - <el-form-item label="试卷名称:" class="el-form-item-custom"> 106 + <el-form ref="form" class="testPaper-manager" :rules="rules" :model="TestPaper" label-width="100px">
  107 + <el-form-item label="试卷名称:" class="el-form-item-custom" prop="TestPaperTitle">
108 <el-input v-model="TestPaper.TestPaperTitle" placeholder="请输入试卷标题"></el-input> 108 <el-input v-model="TestPaper.TestPaperTitle" placeholder="请输入试卷标题"></el-input>
109 </el-form-item> 109 </el-form-item>
110 - <el-form-item label="分类" class="el-form-item-custom"> 110 + <el-form-item label="分类" class="el-form-item-custom" prop="TestPaperClassId">
111 <el-cascader class="testpaper-input" v-model="TestPaper.TestPaperClassId" style="width:400px;" 111 <el-cascader class="testpaper-input" v-model="TestPaper.TestPaperClassId" style="width:400px;"
112 :props="{emitPath:false}" :clearable=true :options="QuestionClass"> 112 :props="{emitPath:false}" :clearable=true :options="QuestionClass">
113 </el-cascader> 113 </el-cascader>
@@ -119,22 +119,22 @@ @@ -119,22 +119,22 @@
119 </el-form-item> --> 119 </el-form-item> -->
120 120
121 121
122 - <el-form-item label="工种" class="el-form-item-custom"> 122 + <el-form-item label="工种" class="el-form-item-custom" prop="UserTypeOfWork" >
123 <el-select v-model="TestPaper.UserTypeOfWork" placeholder="请选择工种"> 123 <el-select v-model="TestPaper.UserTypeOfWork" placeholder="请选择工种">
124 <el-option v-for="item in usertypelist" :label="item.name" :value="item.id"></el-option> 124 <el-option v-for="item in usertypelist" :label="item.name" :value="item.id"></el-option>
125 </el-select> 125 </el-select>
126 </el-form-item> 126 </el-form-item>
127 127
128 128
129 - <el-form-item label="有效时间" required>  
130 - <el-form-item prop="date1"> 129 + <el-form-item label="有效时间" >
  130 + <el-form-item prop="date" required>
131 <el-date-picker v-model="TestPaper.date" @change="changetimestartend" type="datetimerange" 131 <el-date-picker v-model="TestPaper.date" @change="changetimestartend" type="datetimerange"
132 format="yyyy-MM-dd hh:mm:ss" range-separator="至" start-placeholder="开始时间" style="width:100%" 132 format="yyyy-MM-dd hh:mm:ss" range-separator="至" start-placeholder="开始时间" style="width:100%"
133 end-placeholder="结束时间"> 133 end-placeholder="结束时间">
134 </el-date-picker> 134 </el-date-picker>
135 </el-form-item> 135 </el-form-item>
136 </el-form-item> 136 </el-form-item>
137 - <el-form-item label="总时长控制" :prop="AnswerTime"> 137 + <el-form-item label="总时长控制" :prop="AnswerTime" required>
138 <el-input class="testpaper-input" type="number" placeholder="总时长控制(分钟)" v-model="TestPaper.AnswerTime"> 138 <el-input class="testpaper-input" type="number" placeholder="总时长控制(分钟)" v-model="TestPaper.AnswerTime">
139 </el-input> 139 </el-input>
140 </el-form-item> 140 </el-form-item>
@@ -160,7 +160,7 @@ @@ -160,7 +160,7 @@
160 <el-input class="testpaper-input" :rows="10" type="textarea" v-model="TestPaper.Describe"> 160 <el-input class="testpaper-input" :rows="10" type="textarea" v-model="TestPaper.Describe">
161 </el-input> 161 </el-input>
162 </el-form-item> 162 </el-form-item>
163 - <el-button type="primary" style="float: right;" @click="SubmitTestPaper">保存 163 + <el-button type="primary" style="float: right;" @click="SubmitTestPaper">保存1
164 </el-button> 164 </el-button>
165 <div style="clear: both;"></div> 165 <div style="clear: both;"></div>
166 </el-form> 166 </el-form>
@@ -225,6 +225,56 @@ @@ -225,6 +225,56 @@
225 label: "全部" 225 label: "全部"
226 }], 226 }],
227 value: '', 227 value: '',
  228 + rules: {
  229 + OriginalPrice: [
  230 + {
  231 + required: true,
  232 + message: "不能为空",
  233 + },
  234 + ],
  235 + PresentPrice: [
  236 + {
  237 + required: true,
  238 + message: "不能为空",
  239 + },
  240 + ],
  241 + UserTypeOfWork: [
  242 + {
  243 + required: true,
  244 + message: "请选择工种",
  245 + },
  246 + ], QuestionClassId: [
  247 + {
  248 + required: true,
  249 + message: "请选择分类",
  250 + },
  251 + ],date: [
  252 + {
  253 + required: true,
  254 + message: "请选择时间段",
  255 + },
  256 + ],
  257 + TestPaperTitle: [
  258 + {
  259 + required: true,
  260 + message: "请填写试卷名称",
  261 + }
  262 + ],
  263 + TestPaperClassId: [
  264 + {
  265 + required: true,
  266 + message: "分类必须选择",
  267 + },
  268 +
  269 + ],
  270 + AnswerTime: [
  271 + {
  272 + required: true,
  273 + message: "请填写试总时长控制",
  274 + },
  275 +
  276 + ]
  277 + }
228 } 278 }
229 }, 279 },
230 computed: { 280 computed: {
@@ -293,7 +343,17 @@ @@ -293,7 +343,17 @@
293 } 343 }
294 }, 344 },
295 //添加试卷基本信息 345 //添加试卷基本信息
296 - SubmitTestPaper() { 346 + async SubmitTestPaper() {
  347 + if(!this.TestPaper.TestPaperTitle){
  348 + this.$message.warning('试卷名称不能为空!');
  349 + return;
  350 + }
  351 + if(!this.TestPaper.AnswerTime){
  352 + this.$message.warning('请填写总时长!');
  353 + return;
  354 + }
  355 +
  356 +
297 if (this.value == '') { 357 if (this.value == '') {
298 EditTestPaper(this.TestPaper).then(res => { 358 EditTestPaper(this.TestPaper).then(res => {
299 if (res.data.code == 200) { 359 if (res.data.code == 200) {
src/views/login/index.vue
@@ -44,7 +44,7 @@ @@ -44,7 +44,7 @@
44 import { 44 import {
45 validUsername 45 validUsername
46 } from '@/utils/validate' 46 } from '@/utils/validate'
47 - 47 + // import axios from 'axios'
48 export default { 48 export default {
49 name: 'Login', 49 name: 'Login',
50 data() { 50 data() {
@@ -86,14 +86,16 @@ @@ -86,14 +86,16 @@
86 }, 86 },
87 watch: { 87 watch: {
88 $route: { 88 $route: {
89 - handler: function(route) { 89 + handler: function (route) {
90 this.redirect = route.query && route.query.redirect 90 this.redirect = route.query && route.query.redirect
91 - if(this.redirect.indexOf('404') !=-1)  
92 - this.redirect = this.redirect.replace('404','dashboard') 91 + if (this.redirect.indexOf('404') != -1)
  92 + this.redirect = this.redirect.replace('404', 'dashboard')
93 }, 93 },
94 immediate: true 94 immediate: true
95 } 95 }
96 }, 96 },
  97 + created() {
  98 + },
97 methods: { 99 methods: {
98 showPwd() { 100 showPwd() {
99 if (this.passwordType === 'password') { 101 if (this.passwordType === 'password') {
@@ -112,7 +114,7 @@ @@ -112,7 +114,7 @@
112 this.loading = true 114 this.loading = true
113 this.$store.dispatch('user/login', this.loginForm).then(() => { 115 this.$store.dispatch('user/login', this.loginForm).then(() => {
114 this.$router.push({ 116 this.$router.push({
115 - path: '/' 117 + path: '/'
116 }) 118 })
117 this.loading = false 119 this.loading = false
118 }).catch((ret) => { 120 }).catch((ret) => {
@@ -132,20 +134,23 @@ @@ -132,20 +134,23 @@
132 <style lang="scss"> 134 <style lang="scss">
133 /* 修复input 背景不协调 和光标变色 */ 135 /* 修复input 背景不协调 和光标变色 */
134 /* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */ 136 /* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
135 - $bg:#283443;  
136 - $light_gray:#fff; 137 + $bg: #283443;
  138 + $light_gray: #fff;
137 $cursor: #fff; 139 $cursor: #fff;
  140 +
138 @supports (-webkit-mask: none) and (not (cater-color: $cursor)) { 141 @supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
139 .login-container .el-input input { 142 .login-container .el-input input {
140 color: $cursor; 143 color: $cursor;
141 } 144 }
142 } 145 }
  146 +
143 /* reset element-ui css */ 147 /* reset element-ui css */
144 .login-container { 148 .login-container {
145 .el-input { 149 .el-input {
146 display: inline-block; 150 display: inline-block;
147 height: 47px; 151 height: 47px;
148 width: 85%; 152 width: 85%;
  153 +
149 input { 154 input {
150 background: transparent; 155 background: transparent;
151 border: 0px; 156 border: 0px;
@@ -155,12 +160,14 @@ @@ -155,12 +160,14 @@
155 color: $light_gray; 160 color: $light_gray;
156 height: 47px; 161 height: 47px;
157 caret-color: $cursor; 162 caret-color: $cursor;
  163 +
158 &:-webkit-autofill { 164 &:-webkit-autofill {
159 box-shadow: 0 0 0px 1000px $bg inset !important; 165 box-shadow: 0 0 0px 1000px $bg inset !important;
160 - -webkit-text-fill-color: $cursor !important; 166 + -webkit-text-fill-color: $cursor !important;
161 } 167 }
162 } 168 }
163 } 169 }
  170 +
164 .el-form-item { 171 .el-form-item {
165 border: 1px solid rgba(255, 255, 255, 0.1); 172 border: 1px solid rgba(255, 255, 255, 0.1);
166 background: rgba(0, 0, 0, 0.1); 173 background: rgba(0, 0, 0, 0.1);
@@ -171,14 +178,16 @@ @@ -171,14 +178,16 @@
171 </style> 178 </style>
172 179
173 <style lang="scss" scoped> 180 <style lang="scss" scoped>
174 - $bg:#2d3a4b;  
175 - $dark_gray:#889aa4;  
176 - $light_gray:#eee; 181 + $bg: #2d3a4b;
  182 + $dark_gray: #889aa4;
  183 + $light_gray: #eee;
  184 +
177 .login-container { 185 .login-container {
178 min-height: 100%; 186 min-height: 100%;
179 width: 100%; 187 width: 100%;
180 background-color: $bg; 188 background-color: $bg;
181 overflow: hidden; 189 overflow: hidden;
  190 +
182 .login-form { 191 .login-form {
183 position: relative; 192 position: relative;
184 width: 520px; 193 width: 520px;
@@ -187,16 +196,19 @@ @@ -187,16 +196,19 @@
187 margin: 0 auto; 196 margin: 0 auto;
188 overflow: hidden; 197 overflow: hidden;
189 } 198 }
  199 +
190 .tips { 200 .tips {
191 font-size: 14px; 201 font-size: 14px;
192 color: #fff; 202 color: #fff;
193 margin-bottom: 10px; 203 margin-bottom: 10px;
  204 +
194 span { 205 span {
195 &:first-of-type { 206 &:first-of-type {
196 margin-right: 16px; 207 margin-right: 16px;
197 } 208 }
198 } 209 }
199 } 210 }
  211 +
200 .svg-container { 212 .svg-container {
201 padding: 6px 5px 6px 15px; 213 padding: 6px 5px 6px 15px;
202 color: $dark_gray; 214 color: $dark_gray;
@@ -204,8 +216,10 @@ @@ -204,8 +216,10 @@
204 width: 30px; 216 width: 30px;
205 display: inline-block; 217 display: inline-block;
206 } 218 }
  219 +
207 .title-container { 220 .title-container {
208 position: relative; 221 position: relative;
  222 +
209 .title { 223 .title {
210 font-size: 26px; 224 font-size: 26px;
211 color: $light_gray; 225 color: $light_gray;
@@ -214,6 +228,7 @@ @@ -214,6 +228,7 @@
214 font-weight: bold; 228 font-weight: bold;
215 } 229 }
216 } 230 }
  231 +
217 .show-pwd { 232 .show-pwd {
218 position: absolute; 233 position: absolute;
219 right: 10px; 234 right: 10px;
@@ -224,4 +239,4 @@ @@ -224,4 +239,4 @@
224 user-select: none; 239 user-select: none;
225 } 240 }
226 } 241 }
227 -</style> 242 -</style>
  243 +</style>
228 \ No newline at end of file 244 \ No newline at end of file
src/views/user/picuserimport.vue
@@ -84,16 +84,16 @@ @@ -84,16 +84,16 @@
84 <el-dialog 84 <el-dialog
85 title="编辑信息" 85 title="编辑信息"
86 :visible.sync="dialogVisible" 86 :visible.sync="dialogVisible"
87 - width="60%" 87 + width="80%"
88 :before-close="handleClose" 88 :before-close="handleClose"
89 :close-on-click-modal="false"> 89 :close-on-click-modal="false">
90 - <div style="height: 800px;">  
91 - <div class="el-col-14" v-if="currentFilePath">  
92 - <iframe style="width: 100%; height:800px" 90 + <div style="height:fit-content;overflow-y:auto;">
  91 + <div class="el-col-14" v-if="currentFilePath" >
  92 + <iframe style="width: 100%; height:auto;min-height:800px;"
93 v-if="currentFilePath && currentFilePath.indexOf('.pdf') !=-1" :src=" 93 v-if="currentFilePath && currentFilePath.indexOf('.pdf') !=-1" :src="
94 BASE_ROOT_DOMAIN + '/pdf/web/viewer.html?file=' + BASE_ROOT_DOMAIN +currentFilePath 94 BASE_ROOT_DOMAIN + '/pdf/web/viewer.html?file=' + BASE_ROOT_DOMAIN +currentFilePath
95 " frameborder="0"></iframe> 95 " frameborder="0"></iframe>
96 - <el-image v-else :src=" BASE_ROOT_DOMAIN +currentFilePath"> 96 + <el-image v-else :src=" BASE_ROOT_DOMAIN +currentFilePath" :fit="'cover '">
97 97
98 </el-image> 98 </el-image>
99 </div> 99 </div>
src/views/user/userlist.vue
@@ -38,8 +38,9 @@ @@ -38,8 +38,9 @@
38 38
39 <el-form-item> 39 <el-form-item>
40 <el-button type="success" @click="search">搜索</el-button> 40 <el-button type="success" @click="search">搜索</el-button>
41 - <el-button type="success" @click="handleEdit({})">添加</el-button>  
42 - <el-button type="success" @click="resetSearch">重置</el-button> 41 + <el-button type="success" @click="handleEdit(-1)">添加</el-button>
  42 + <el-button type="danger" @click="handleChangeCat">批量修改分类</el-button>
  43 + <el-button type="success" @click="resetSearch">重置</el-button>
43 <el-button type="primary" @click="handleInviteInterview()">邀请面试(线上)</el-button> 44 <el-button type="primary" @click="handleInviteInterview()">邀请面试(线上)</el-button>
44 45
45 <el-button type="primary" @click="handleCompanyInterview()">邀请面试(现场)</el-button> 46 <el-button type="primary" @click="handleCompanyInterview()">邀请面试(现场)</el-button>
@@ -49,9 +50,11 @@ @@ -49,9 +50,11 @@
49 50
50 <div class="flex aligin-center"> 51 <div class="flex aligin-center">
51 <el-link :href="BASE_URL + '/temp/用户导入模板.xlsx'" target="_blank" type="primary">下载模板</el-link> 52 <el-link :href="BASE_URL + '/temp/用户导入模板.xlsx'" target="_blank" type="primary">下载模板</el-link>
52 - <el-upload class="upload-demo" action="/api/Account/importUsers?UserClassId=0" multiple :limit="1" 53 + <el-upload class="upload-demo"
  54 + :action="'/api/Account/importUsers?UserClassId='+ (query.userClassId || 0)" multiple :limit="1"
53 :show-file-list="false" :on-exceed="handleExceed" :on-success="handleSuccess" :file-list="fileList"> 55 :show-file-list="false" :on-exceed="handleExceed" :on-success="handleSuccess" :file-list="fileList">
54 <el-button size="small" type="primary">导入用户</el-button> 56 <el-button size="small" type="primary">导入用户</el-button>
  57 +
55 </el-upload> 58 </el-upload>
56 </div> 59 </div>
57 </div> 60 </div>
@@ -206,8 +209,8 @@ @@ -206,8 +209,8 @@
206 <el-select v-model="form.TestPaperId" placeholder="请选择试卷" style="width: 80%"> 209 <el-select v-model="form.TestPaperId" placeholder="请选择试卷" style="width: 80%">
207 <el-option :value="item.id" :label="'['+item.id+']'+item.TestPaperTitle" 210 <el-option :value="item.id" :label="'['+item.id+']'+item.TestPaperTitle"
208 v-for="item in testpaperlist">{{ 211 v-for="item in testpaperlist">{{
209 - "[" + item.id + "] " + (item.TestPaperTitle || "未命名")  
210 - }}</el-option> 212 + "[" + item.id + "] " + (item.TestPaperTitle || "未命名")
  213 + }}</el-option>
211 </el-select> 214 </el-select>
212 </el-form-item> 215 </el-form-item>
213 <el-form-item label="允许测评次数"> 216 <el-form-item label="允许测评次数">
@@ -335,7 +338,8 @@ @@ -335,7 +338,8 @@
335 <el-input v-model="adminUserInfo.Weight" placeholder="请输入体重" style="width: 70%"></el-input> 338 <el-input v-model="adminUserInfo.Weight" placeholder="请输入体重" style="width: 70%"></el-input>
336 </el-form-item> 339 </el-form-item>
337 <el-form-item label="毕业专业" class="el-form-itemByWang" prop="GraduationMajor"> 340 <el-form-item label="毕业专业" class="el-form-itemByWang" prop="GraduationMajor">
338 - <el-input v-model="adminUserInfo.GraduationMajor" placeholder="请输入毕业专业" style="width: 70%"></el-input> 341 + <el-input v-model="adminUserInfo.GraduationMajor" placeholder="请输入毕业专业" style="width: 70%">
  342 + </el-input>
339 </el-form-item> 343 </el-form-item>
340 <el-form-item label="毕业院校" class="el-form-itemByWang" prop="GraduationSchool"> 344 <el-form-item label="毕业院校" class="el-form-itemByWang" prop="GraduationSchool">
341 <el-input v-model="adminUserInfo.GraduationSchool" placeholder="请输入毕业院校" style="width: 70%"> 345 <el-input v-model="adminUserInfo.GraduationSchool" placeholder="请输入毕业院校" style="width: 70%">
@@ -349,10 +353,12 @@ @@ -349,10 +353,12 @@
349 </el-input> 353 </el-input>
350 </el-form-item> 354 </el-form-item>
351 <el-form-item label="毕业时间" class="el-form-itemByWang" prop="GraduationTime"> 355 <el-form-item label="毕业时间" class="el-form-itemByWang" prop="GraduationTime">
352 - <el-input v-model="adminUserInfo.GraduationTime" placeholder="请输入毕业时间" style="width: 70%"></el-input> 356 + <el-input v-model="adminUserInfo.GraduationTime" placeholder="请输入毕业时间" style="width: 70%">
  357 + </el-input>
353 </el-form-item> 358 </el-form-item>
354 <el-form-item label="计算机等级" class="el-form-itemByWang" prop="ComputerGrade"> 359 <el-form-item label="计算机等级" class="el-form-itemByWang" prop="ComputerGrade">
355 - <el-input v-model="adminUserInfo.ComputerGrade" placeholder="请输入计算机等级" style="width: 70%"></el-input> 360 + <el-input v-model="adminUserInfo.ComputerGrade" placeholder="请输入计算机等级" style="width: 70%">
  361 + </el-input>
356 </el-form-item> 362 </el-form-item>
357 <el-form-item label="血型" class="el-form-itemByWang" prop="BloodType"> 363 <el-form-item label="血型" class="el-form-itemByWang" prop="BloodType">
358 <el-input v-model="adminUserInfo.BloodType" placeholder="请输入血型" style="width: 70%"></el-input> 364 <el-input v-model="adminUserInfo.BloodType" placeholder="请输入血型" style="width: 70%"></el-input>
@@ -361,7 +367,8 @@ @@ -361,7 +367,8 @@
361 <el-input v-model="adminUserInfo.Qualification" placeholder="请输入资格证书" style="width: 70%"></el-input> 367 <el-input v-model="adminUserInfo.Qualification" placeholder="请输入资格证书" style="width: 70%"></el-input>
362 </el-form-item> 368 </el-form-item>
363 <el-form-item label="就业意向城市" class="el-form-itemByWang" prop="IntendedCity"> 369 <el-form-item label="就业意向城市" class="el-form-itemByWang" prop="IntendedCity">
364 - <el-input v-model="adminUserInfo.IntendedCity" placeholder="请输入就业意向城市" style="width: 70%"></el-input> 370 + <el-input v-model="adminUserInfo.IntendedCity" placeholder="请输入就业意向城市" style="width: 70%">
  371 + </el-input>
365 </el-form-item> 372 </el-form-item>
366 <el-form-item label="户籍所在地" class="el-form-itemByWang" prop="RegisteredResidence"> 373 <el-form-item label="户籍所在地" class="el-form-itemByWang" prop="RegisteredResidence">
367 <el-input v-model="adminUserInfo.RegisteredResidence" placeholder="请输入户籍所在地" style="width: 70%"> 374 <el-input v-model="adminUserInfo.RegisteredResidence" placeholder="请输入户籍所在地" style="width: 70%">
@@ -375,15 +382,14 @@ @@ -375,15 +382,14 @@
375 <el-button @click="dialogClassIVIsible = false">取消</el-button> 382 <el-button @click="dialogClassIVIsible = false">取消</el-button>
376 <el-button type="primary" @click="submitForm('adminUserInfo')">提交</el-button> 383 <el-button type="primary" @click="submitForm('adminUserInfo')">提交</el-button>
377 </div> 384 </div>
378 -  
379 </el-form> 385 </el-form>
380 386
381 <div style="clear: both"></div> 387 <div style="clear: both"></div>
382 </el-dialog> 388 </el-dialog>
383 389
384 390
385 - <el-dialog title="邀请公司面试" :visible.sync="dialogCompany">  
386 - <el-form ref="dynamicValidateForm" label-width="100px" class="demo-dynamic"> 391 + <el-dialog title="邀请线下面试" :visible.sync="dialogCompany">
  392 + <el-form ref="dynamicValidateForm" :rules="rules" label-width="100px" class="demo-dynamic">
387 <div v-for="(user, index) in sendUserList"> 393 <div v-for="(user, index) in sendUserList">
388 394
389 <el-descriptions class="margin-top" :title="(index+1)" :column="2" border> 395 <el-descriptions class="margin-top" :title="(index+1)" :column="2" border>
@@ -437,16 +443,12 @@ @@ -437,16 +443,12 @@
437 </el-descriptions-item> 443 </el-descriptions-item>
438 <el-descriptions-item> 444 <el-descriptions-item>
439 <template slot="label"> 445 <template slot="label">
440 -  
441 - 面试时间范围 446 + <label style="color:#F56C6C">*</label> 面试时间范围
442 </template> 447 </template>
443 - <!-- <el-date-picker v-model="user.date" type="datetimerange" range-separator="至" start-placeholder="开始日期"  
444 - end-placeholder="最后日期">  
445 - </el-date-picker> -->  
446 -  
447 <el-date-picker v-model="user.startTime" type="datetime" placeholder="选择日期时间" 448 <el-date-picker v-model="user.startTime" type="datetime" placeholder="选择日期时间"
448 :picker-options="pickerOptions"> 449 :picker-options="pickerOptions">
449 </el-date-picker> 450 </el-date-picker>
  451 +
450 </el-descriptions-item> 452 </el-descriptions-item>
451 <el-descriptions-item> 453 <el-descriptions-item>
452 <template slot="label"> 454 <template slot="label">
@@ -490,6 +492,24 @@ @@ -490,6 +492,24 @@
490 </div> 492 </div>
491 </el-dialog> 493 </el-dialog>
492 494
  495 + <el-dialog title="批量设置分类" :visible.sync="dialogsubjectlVisibleSetCat" @close="closeDialogCat" width="800px"
  496 + :close-on-click-modal="false">
  497 + <el-form ref="Dataform" :model="Dataform" label-width="60px">
  498 +
  499 + <el-form-item label="分类" style="padding-top: 5px">
  500 + <el-select v-model="QuestionClassId" placeholder="请选择">
  501 + <el-option :key="0" :value="0" label="请选择"></el-option>
  502 + <el-option v-for="item in data" :key="item.id" :label="item.ClassTitle" :value="item.id"
  503 + v-if="item.id !=0">
  504 + </el-option>
  505 + </el-select>
  506 + </el-form-item>
  507 +
  508 + </el-form>
  509 + <el-button @click="handleSetClass" style="margin: 10px 0 0 0; float: right" type="primary">确定
  510 + </el-button>
  511 + <div style="clear: both"></div>
  512 + </el-dialog>
493 513
494 </div> 514 </div>
495 </template> 515 </template>
@@ -499,11 +519,13 @@ @@ -499,11 +519,13 @@
499 ImportUserByExcel, 519 ImportUserByExcel,
500 GetUserList, 520 GetUserList,
501 UsersUpdate, 521 UsersUpdate,
  522 + UsersCreate,
502 AddInvitationAnswerMultiple, 523 AddInvitationAnswerMultiple,
503 AddInvitationCompanyMultiple, 524 AddInvitationCompanyMultiple,
504 UsersDelete, 525 UsersDelete,
505 ChangeTags, 526 ChangeTags,
506 - SelectPhoneBool 527 + SelectPhoneBool,
  528 + ChangeClass
507 } from "@/api/user"; 529 } from "@/api/user";
508 import { 530 import {
509 GetUserClassList, 531 GetUserClassList,
@@ -529,6 +551,8 @@ @@ -529,6 +551,8 @@
529 return time.getTime() < Date.now() - 8.64e7; 551 return time.getTime() < Date.now() - 8.64e7;
530 } 552 }
531 }, 553 },
  554 + QuestionClassId: 0,
  555 + dialogsubjectlVisibleSetCat: false,
532 loading: false, 556 loading: false,
533 dialogFormVisible: false, 557 dialogFormVisible: false,
534 dialogTableVisible: false, 558 dialogTableVisible: false,
@@ -550,6 +574,13 @@ @@ -550,6 +574,13 @@
550 temp: { 574 temp: {
551 ParentId: 0, 575 ParentId: 0,
552 }, 576 },
  577 + rules: {
  578 + startTime: [
  579 + { type: 'date', required: true, message: '请选择日期', trigger: 'change' }
  580 + ],
  581 +
  582 + }
  583 + ,
553 mzlist: [ 584 mzlist: [
554 "汉族", 585 "汉族",
555 "蒙古族 ", 586 "蒙古族 ",
@@ -606,37 +637,37 @@ @@ -606,37 +637,37 @@
606 "基诺族", 637 "基诺族",
607 ], 638 ],
608 processlist: [{ 639 processlist: [{
609 - label: '入库',  
610 - value: 0  
611 - },  
612 - {  
613 - label: '面试邀请',  
614 - value: 1  
615 - },  
616 - {  
617 - label: '正在面试',  
618 - value: 2  
619 - },  
620 - {  
621 - label: '面试完成',  
622 - value: 3  
623 - },  
624 - {  
625 - label: '公司面试',  
626 - value: 4  
627 - },  
628 - {  
629 - label: '已录用',  
630 - value: 5  
631 - },  
632 - {  
633 - label: '未录用',  
634 - value: 9  
635 - },  
636 - {  
637 - label: '禁用',  
638 - value: 11  
639 - }, 640 + label: '入库',
  641 + value: 0
  642 + },
  643 + {
  644 + label: '面试邀请',
  645 + value: 1
  646 + },
  647 + {
  648 + label: '正在面试',
  649 + value: 2
  650 + },
  651 + {
  652 + label: '面试完成',
  653 + value: 3
  654 + },
  655 + {
  656 + label: '线下面试',
  657 + value: 4
  658 + },
  659 + {
  660 + label: '已录用',
  661 + value: 5
  662 + },
  663 + {
  664 + label: '未录用',
  665 + value: 9
  666 + },
  667 + {
  668 + label: '禁用',
  669 + value: 11
  670 + },
640 ], 671 ],
641 type: "1", 672 type: "1",
642 dialogClassIVIsible: false, 673 dialogClassIVIsible: false,
@@ -669,14 +700,43 @@ @@ -669,14 +700,43 @@
669 this.loadTree(); 700 this.loadTree();
670 }, 701 },
671 methods: { 702 methods: {
  703 + handleChangeCat() {
  704 + var rows = this.$refs.userList.selection;
  705 + if (!rows || rows.length < 1) {
  706 + this.$message.warning('至少选择一项进行操作!');
  707 + return;
  708 + }
  709 + this.dialogsubjectlVisibleSetCat = true;
  710 + },
  711 +
  712 + closeDialogCat() {
  713 + this.QuestionClassId = 0;
  714 + this.dialogsubjectlVisibleSetCat = false;
  715 + },
  716 + handleSetClass() {
  717 + var rows = this.$refs.userList.selection;
  718 + if (!this.QuestionClassId || this.QuestionClassId < 1) {
  719 + this.$message.warning('至少选择一个分类进行操作!');
  720 + return;
  721 + }
  722 + this.$confirm("确认批量修改分类吗?", "提示", {
  723 + confirmButtonText: "确定",
  724 + cancelButtonText: "取消",
  725 + type: "warning",
  726 + }).then(() => {
  727 + ChangeClass(rows.map(o => o.id).join(','), this.QuestionClassId).then((o) => {
  728 + this.$message.success("修改成功");
  729 + this.GetUser();
  730 + this.dialogsubjectlVisibleSetCat = false;
  731 + });
  732 + });
  733 + },
672 handleToResume(item) { 734 handleToResume(item) {
673 window.open( 735 window.open(
674 - `http://interview-admin.7-stars.com.cn/Appraise/${item.sex == 1?'malestaff':'femalestaff'}/${item.id}.html`, 736 + `http://interview-admin.7-stars.com.cn/Appraise/${item.sex == 1 ? 'malestaff' : 'femalestaff'}/${item.id}.html`,
675 '_blank'); 737 '_blank');
676 }, 738 },
677 handleClose(tag, row) { 739 handleClose(tag, row) {
678 -  
679 -  
680 this.$confirm('确定删除该标签吗?', '消息', { 740 this.$confirm('确定删除该标签吗?', '消息', {
681 confirmButtonText: '确认', 741 confirmButtonText: '确认',
682 cancelButtonText: '取消', 742 cancelButtonText: '取消',
@@ -727,7 +787,7 @@ @@ -727,7 +787,7 @@
727 }, 787 },
728 //点击进度 788 //点击进度
729 processEvent(row) { 789 processEvent(row) {
730 - // if(row.procesName == '公司面试') 790 + // if(row.procesName == '线下面试')
731 // { 791 // {
732 // this. 792 // this.
733 // } 793 // }
@@ -737,6 +797,7 @@ @@ -737,6 +797,7 @@
737 this.$message.success("没有邀请对象!"); 797 this.$message.success("没有邀请对象!");
738 return; 798 return;
739 } 799 }
  800 + var isrequire = true;
740 var senddata = []; 801 var senddata = [];
741 this.sendUserList.forEach(o => { 802 this.sendUserList.forEach(o => {
742 // var item = Object.assign({},o); 803 // var item = Object.assign({},o);
@@ -749,6 +810,7 @@ @@ -749,6 +810,7 @@
749 // start = o.date[0]; 810 // start = o.date[0];
750 // end = o.date[1]; 811 // end = o.date[1];
751 // } 812 // }
  813 + if (!o.startTime) isrequire = false;
752 senddata.push({ 814 senddata.push({
753 userId: o.id, 815 userId: o.id,
754 startTime: formatTime(o.startTime), 816 startTime: formatTime(o.startTime),
@@ -758,6 +820,11 @@ @@ -758,6 +820,11 @@
758 msgBody: o.msgBody || '' 820 msgBody: o.msgBody || ''
759 }); 821 });
760 }); 822 });
  823 + if (!isrequire) {
  824 + this.$message.warning("请选择面试时间范围!");
  825 + return;
  826 + }
  827 +
761 AddInvitationCompanyMultiple(senddata).then(res => { 828 AddInvitationCompanyMultiple(senddata).then(res => {
762 if (res.data.code == 200) { 829 if (res.data.code == 200) {
763 this.$message.success("邀请成功"); 830 this.$message.success("邀请成功");
@@ -779,10 +846,20 @@ @@ -779,10 +846,20 @@
779 846
780 847
781 handleDelete(item, index) { 848 handleDelete(item, index) {
782 - this.userList.splice(index, 1);  
783 - UsersDelete({  
784 - ids: item.id 849 + this.$confirm("确认删除该人才信息吗?", "提示", {
  850 + confirmButtonText: "确定",
  851 + cancelButtonText: "取消",
  852 + type: "warning",
  853 + }).then(() => {
  854 +
  855 + this.userList.splice(index, 1);
  856 + UsersDelete({
  857 + ids: item.id
  858 + });
785 }); 859 });
  860 +
  861 +
  862 +
786 }, 863 },
787 handleWatchLive(item) { 864 handleWatchLive(item) {
788 console.log("handleWatchLive", item); 865 console.log("handleWatchLive", item);
@@ -804,17 +881,35 @@ @@ -804,17 +881,35 @@
804 } else { 881 } else {
805 UsersUpdate(formData).then((res) => { 882 UsersUpdate(formData).then((res) => {
806 this.GetUser(); 883 this.GetUser();
  884 +
  885 + this.dialogClassIVIsible = false;
807 console.log(res); 886 console.log(res);
808 }); 887 });
809 } 888 }
810 }); 889 });
811 } 890 }
812 - this.dialogClassIVIsible = false; 891 + else {
  892 + UsersCreate(formData).then(res => {
  893 + if (res.data.success) {
  894 + this.GetUser();
  895 + this.$message.success("添加成功");
  896 +
  897 + this.dialogClassIVIsible = false;
  898 + }
  899 + else
  900 + this.$message.error(res.data.message || "添加失败!");
  901 +
  902 + });
  903 + }
813 }, 904 },
814 handleEdit(data) { 905 handleEdit(data) {
815 this.dialogClassIVIsible = true; 906 this.dialogClassIVIsible = true;
816 console.log(" -_- ", data); 907 console.log(" -_- ", data);
817 - this.adminUserInfo = data; 908 + if (data == -1) {
  909 + this.adminUserInfo = { userClassId: (this.query.userClassId || 0) };
  910 + }
  911 + else
  912 + this.adminUserInfo = data;
818 }, 913 },
819 handleTestHitory(row) { 914 handleTestHitory(row) {
820 GetHistoryList({ 915 GetHistoryList({
@@ -848,23 +943,23 @@ @@ -848,23 +943,23 @@
848 this.$confirm( 943 this.$confirm(
849 "确认向选择的" + ids.length + "个用户发送试卷连接进行测试吗?", 944 "确认向选择的" + ids.length + "个用户发送试卷连接进行测试吗?",
850 "提示消息", { 945 "提示消息", {
851 - confirmButtonText: "确认",  
852 - cancelButtonText: "取消",  
853 - callback: (action) => {  
854 - if (action == "confirm") {  
855 - AddInvitationAnswerMultiple(postData).then((res) => {  
856 - if (res.data.code == 200) {  
857 - this.$message.success("发送成功");  
858 - this.form = {};  
859 - this.dialogFormVisible = false;  
860 - this.GetUser();  
861 - } else {  
862 - this.$message.error("发送失败");  
863 - }  
864 - });  
865 - }  
866 - },  
867 - } 946 + confirmButtonText: "确认",
  947 + cancelButtonText: "取消",
  948 + callback: (action) => {
  949 + if (action == "confirm") {
  950 + AddInvitationAnswerMultiple(postData).then((res) => {
  951 + if (res.data.code == 200) {
  952 + this.$message.success("发送成功");
  953 + this.form = {};
  954 + this.dialogFormVisible = false;
  955 + this.GetUser();
  956 + } else {
  957 + this.$message.error("发送失败");
  958 + }
  959 + });
  960 + }
  961 + },
  962 + }
868 ); 963 );
869 }, 964 },
870 forceTestPaper() { 965 forceTestPaper() {
@@ -913,8 +1008,8 @@ @@ -913,8 +1008,8 @@
913 console.log(val); 1008 console.log(val);
914 this.selectedList = val; 1009 this.selectedList = val;
915 }, 1010 },
916 - handleExceed() {},  
917 - ImportUser() {}, 1011 + handleExceed() { },
  1012 + ImportUser() { },
918 1013
919 showcontent(c, row) { 1014 showcontent(c, row) {
920 this.showbody = c; 1015 this.showbody = c;
@@ -964,7 +1059,11 @@ @@ -964,7 +1059,11 @@
964 GetUserClassList({ 1059 GetUserClassList({
965 ParentId: 0 1060 ParentId: 0
966 }).then((res) => { 1061 }).then((res) => {
967 - this.data = res.data.data; 1062 + var list = [{ id: 0, ClassTitle: '全部' }];
  1063 +
  1064 + list.push(...res.data.data || []);
  1065 +
  1066 + this.data = list;
968 }); 1067 });
969 }, 1068 },
970 filterNode(value, data) { 1069 filterNode(value, data) {
@@ -1014,6 +1113,7 @@ @@ -1014,6 +1113,7 @@
1014 }, 1113 },
1015 handleNodeClick(data, checked, indeterminate) { 1114 handleNodeClick(data, checked, indeterminate) {
1016 this.query.userClassId = data.id; 1115 this.query.userClassId = data.id;
  1116 +
1017 this.temp = data; 1117 this.temp = data;
1018 this.GetUser(); 1118 this.GetUser();
1019 }, 1119 },
@@ -1060,6 +1160,7 @@ @@ -1060,6 +1160,7 @@
1060 box-shadow: 0 0 5px #cdcdcd; 1160 box-shadow: 0 0 5px #cdcdcd;
1061 justify-content: space-between; 1161 justify-content: space-between;
1062 } 1162 }
  1163 +
1063 .seetingsDiv button { 1164 .seetingsDiv button {
1064 height: 40px; 1165 height: 40px;
1065 background-color: #304156; 1166 background-color: #304156;
@@ -1069,9 +1170,11 @@ @@ -1069,9 +1170,11 @@
1069 float: none; 1170 float: none;
1070 margin-right: 10px; 1171 margin-right: 10px;
1071 } 1172 }
  1173 +
1072 .el-tag+.el-tag { 1174 .el-tag+.el-tag {
1073 margin-left: 10px; 1175 margin-left: 10px;
1074 } 1176 }
  1177 +
1075 .button-new-tag { 1178 .button-new-tag {
1076 margin-left: 10px; 1179 margin-left: 10px;
1077 height: 32px; 1180 height: 32px;
@@ -1079,13 +1182,15 @@ @@ -1079,13 +1182,15 @@
1079 padding-top: 0; 1182 padding-top: 0;
1080 padding-bottom: 0; 1183 padding-bottom: 0;
1081 } 1184 }
  1185 +
1082 .input-new-tag { 1186 .input-new-tag {
1083 width: 90px; 1187 width: 90px;
1084 margin-left: 10px; 1188 margin-left: 10px;
1085 vertical-align: bottom; 1189 vertical-align: bottom;
1086 } 1190 }
  1191 +
1087 .el-form-itemByWang { 1192 .el-form-itemByWang {
1088 width: 33% !important; 1193 width: 33% !important;
1089 float: left !important; 1194 float: left !important;
1090 } 1195 }
1091 -</style> 1196 -</style>
  1197 +</style>
1092 \ No newline at end of file 1198 \ No newline at end of file