Commit 6963d762e8301f54097951509f0161da895560be

Authored by 周超
1 parent 904199bf

拉取志哥最新的

src/api/user.js
... ... @@ -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 220 \ No newline at end of file
... ...
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="75%">
3 3 <el-form :model="data">
4 4 <el-form-item label="名称">
5 5 <el-input v-model="data.ClassificationName"></el-input>
  6 +
6 7 </el-form-item>
7 8  
8   - <el-form-item label="规则">
  9 + <el-form-item label="规则" v-show="level ==3">
9 10 <div style="padding:10px 5px 0px 5px">
10 11 <el-table v-if="data.rules" :data="data.rules" style="width: 100%;">
11 12 <el-table-column align="left" label="状态">
... ... @@ -34,7 +35,7 @@
34 35 </el-option>
35 36 </el-select>
36 37 <el-input style="width:20%;margin-right:1%" type="number" v-model="row.StartScore"
37   - :placeholder="'开始分值'">
  38 + :placeholder="'开始分值'">
38 39 </el-input>
39 40 <el-select style="width:18%;margin-right:1%" v-model="row.EndFormula" placeholder="规则" clearable>
40 41 <el-option v-for="item in ruleOptions" :key="item.value" :label="item.label" :value="item.value">
... ... @@ -122,6 +123,7 @@
122 123 activeName: '',
123 124 dialogFormVisible: false,
124 125 form: {},
  126 + level:0,
125 127  
126 128 ruleOptions: [
127 129 { label: '大于', value: '>' },
... ... @@ -242,7 +244,8 @@
242 244 this.tableData = tmpdata
243 245 } catch (e) { }
244 246 },
245   - show(id) {
  247 + show(id,node) {
  248 + if(node) this.level = node.level;
246 249 this.data = {
247 250 // id: Date.parse(new Date()) + '_' + Math.ceil(Math.random() * 99999),
248 251 // key: Date.parse(new Date()) + '_' + Math.ceil(Math.random() * 99999),
... ... @@ -264,7 +267,7 @@
264 267  
265 268 this.dialogFormVisible = true;
266 269 getQuestionClass({ id }).then(res => {
267   -
  270 +
268 271 if (res) {
269 272 var data = res.data.data;
270 273 if (!data.rules) {
... ...
src/views/QuestionBank/index.vue
... ... @@ -7,7 +7,7 @@
7 7 <label style="font-size: 18px">题目分类</label>
8 8 </div>
9 9  
10   - <div :style="{ height: TableColHeight + 'px' }" class="areadiv"
  10 + <div :style="{ height: TableColHeight + 'px','overflow-y':'auto' }" class="areadiv"
11 11 style="margin: 10px 0 0 0; padding: 5px 0 0 0">
12 12 <el-tabs v-model="activeTab" @tab-click="handleTabsClick" style="padding: 0 20px" :stretch="true">
13 13 <el-tab-pane label="专业类" name="first"></el-tab-pane>
... ... @@ -15,16 +15,16 @@
15 15 </el-tabs>
16 16 <el-button type="button" size="mini" style="width:100%;margin-bottom:10px"
17 17 @click="showClassDialog(null,0,activeTab == 'first' ? 0 : 2)">
18   - 添加顶级
  18 + 添加顶级
19 19 </el-button>
20 20 <el-tree :data="activeTab == 'first' ? firstTreeData : secondTreeData"
21 21 :default-expanded-keys="currentExpend" :props="activeTab == 'first' ? firstTreeData : secondTreeData"
22 22 @node-click="handleNodeClick" class="eltree" :expand-on-click-node="false" ref="tree">
23 23 <span class="custom-tree-node" slot-scope="{ node, data }">
24   - <span>{{ node.label }}</span>
  24 + <span>{{ node.label }} ({{data.subjectCount || 0}})</span>
25 25 <span style="">
26 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 29 </el-button>
30 30 <el-button type="text" v-if="activeTab == 'second' || 1==1" @click="handleEditDimension(node, data)">
... ... @@ -66,28 +66,28 @@
66 66 <span>{{ scope.row.id }}</span>
67 67 </template>
68 68 </el-table-column>
69   - <el-table-column prop="date" label="题目类型" width="100">
  69 + <el-table-column prop="date" label="题目类型" width="110" sortable>
70 70 <template slot-scope="scope">
71 71 <span style="padding-left: 10px">{{
72 72 scope.row.subjectName
73 73 }}</span>
74 74 </template>
75 75 </el-table-column>
76   - <el-table-column prop="QuestionClassName" label="分类" width="100">
  76 + <el-table-column prop="QuestionClassName" label="分类" width="110" sortable>
77 77 <template slot-scope="scope">
78 78 <span style="padding-left: 10px">{{
79 79 scope.row.QuestionClassName
80 80 }}</span>
81 81 </template>
82 82 </el-table-column>
83   - <el-table-column prop="name" label="分数" width="80">
  83 + <el-table-column prop="name" label="分数" width="90" sortable>
84 84 <template slot-scope="scope">
85 85 <span style="padding-left: 10px">{{
86 86 scope.row.fraction
87 87 }}</span>
88 88 </template>
89 89 </el-table-column>
90   - <el-table-column prop="name" label="单项分数" width="80">
  90 + <el-table-column prop="name" label="单项分数" width="110" sortable>
91 91 <template slot-scope="scope">
92 92 <span style="padding-left: 10px">{{
93 93 scope.row.singleFraction
... ... @@ -153,23 +153,32 @@
153 153 <el-input v-model="QuestionClassInfo.ClassificationName" placeholder="请输入分类名称"></el-input>
154 154 </el-form-item>
155 155 </el-form>
156   - {{QuestionClassInfo}}
  156 + <!-- {{QuestionClassInfo}} -->
157 157 <el-button @click="CreateQuestionClassHealder" style="margin: 10px 0 0 0; float: right" type="primary">确定
158 158 </el-button>
159 159 <div style="clear: both"></div>
160 160 </el-dialog>
161 161 <el-dialog title="编辑题目" :visible.sync="dialogsubjectlVisible" @close="closeDialog" width="800px"
162 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 165 <div style="padding:10px">
165 166 <el-alert v-if="FormClassType==2" title="选项的维度分值如不设置将按照分值规则自动计算" type="warning"></el-alert>
166 167 </div>
167   - <el-form-item label="题目">
  168 + <el-form-item label="题目" prop="subject">
168 169 <el-input v-model="Dataform.subject" placeholder="请输入题目名称"></el-input>
169 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 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 182 </el-cascader>
174 183 </el-form-item>
175 184 <el-form-item label="题型" style="padding-top: 5px">
... ... @@ -190,9 +199,12 @@
190 199 <template slot="prepend">{{ scope.row.option }}</template>
191 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 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 208 <!-- v-if="FormClassType==2" -->
197 209 <el-select v-model="scope.row.scorerule" class="optionInput" placeholder="分值规则"
198 210 style="width:20% !important;margin-left:1%">
... ... @@ -200,7 +212,7 @@
200 212 <el-option v-for="sritem in scoreRules" :label="sritem" :value="sritem">{{sritem}}</el-option>
201 213 </el-select>
202 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 216 </template>
205 217 </el-table-column>
206 218  
... ... @@ -351,7 +363,19 @@
351 363 CreatClassId: 0,
352 364 scoreRules: ['高', '中', '低'],
353 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 381 created() { },
... ... @@ -424,7 +448,8 @@
424 448 },
425 449 handleChangeCat() {
426 450 var rows = this.$refs.table.selection;
427   - if (!rows || rows.length < 1) {
  451 + if (!rows || rows.length < 1)
  452 + {
428 453 this.$message.warning('至少选择一项进行操作!');
429 454 return;
430 455 }
... ... @@ -467,6 +492,7 @@
467 492 this.dialogsubjectlVisible = true
468 493 },
469 494 changequestionclass(a, b, c) {
  495 + debugger;
470 496 var item = this.QuestionClass.find(o => o.id == a);
471 497 if (item) this.FormClassType = item.ClassType;
472 498 },
... ... @@ -474,7 +500,7 @@
474 500 handleEditDimension(node, data) {
475 501 console.log(data);
476 502 // this.$refs.editDimensionDialog.dialogFormVisible = true;
477   - this.$refs.editDimensionDialog.show(data.id);
  503 + this.$refs.editDimensionDialog.show(data.id, node);
478 504 this.currentEditDimension = data;
479 505 this.currentEditNode = node;
480 506 },
... ... @@ -487,13 +513,30 @@
487 513 this.loading = true;
488 514 // console.log(node, data);
489 515 // console.log(this.API);
490   - this.API.deleteQuestionClass(data.value).then((res) => {
491   -
492   - this.getQuestionClassListHeadler();
493 516  
  517 + setTimeout(() => {
494 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 541 closeClassDialog() {
499 542 this.dialogClassIVIsible = false;
... ... @@ -538,7 +581,9 @@
538 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 587 this.dialogClassIVIsible = true;
543 588 console.log(node);
544 589 if (parent && parent == 0) this.QuestionClassInfo.ParentId = 0;
... ... @@ -547,6 +592,7 @@
547 592 if (type) this.QuestionClassInfo.ClassType = type;
548 593 else if (node.data.ClassType) this.QuestionClassInfo.ClassType = node.data.ClassType;
549 594  
  595 +
550 596 // alert(this.QuestionClassInfo.ParentId);
551 597 },
552 598 //关闭弹框的事件
... ... @@ -612,6 +658,7 @@
612 658 if (this.loading) return;
613 659 this.parameter.QuestionClassId = val.value;
614 660 this.parameter.pageIndex = 1;
  661 + this.Dataform.QuestionClassId = val.value;
615 662 this.GetList();
616 663 },
617 664 DelQuestionBankEventHeadler(id) {
... ... @@ -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 707 GetList() {
652 708 let _this = this;
... ... @@ -723,7 +779,7 @@
723 779 }
724 780  
725 781 /deep/.el-form-item {
726   - margin-bottom: 5px;
  782 + /* margin-bottom: 5px; */
727 783 }
728 784  
729 785 /deep/.el-radio {
... ...
src/views/TestPaper/ManualTestPaper.vue
... ... @@ -287,10 +287,16 @@
287 287 {
288 288 required: true,
289 289 message: "请填写试卷名称",
290   - },
  290 + }
291 291 ],
292 292  
293   -
  293 + AnswerTime: [
  294 + {
  295 + required: true,
  296 + message: "请填写试总时长控制",
  297 + },
  298 +
  299 + ],
294 300 },
295 301 QuestionClass: [],
296 302 treeData: [
... ... @@ -480,6 +486,14 @@
480 486  
481 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 497 if (valid) {
484 498 this.TestPaper.QuestionBankIds = this.arr2.map((u) => u.id);
485 499 var d = this.TestPaper;
... ...
src/views/TestPaper/TestPaperList.vue
... ... @@ -103,11 +103,11 @@
103 103 <el-dialog title="试卷基本信息" :visible.sync="dialogAddTestPaperVIsible" @close="closeClassDialog" width="600px"
104 104 :close-on-click-modal="false">
105 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 108 <el-input v-model="TestPaper.TestPaperTitle" placeholder="请输入试卷标题"></el-input>
109 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 111 <el-cascader class="testpaper-input" v-model="TestPaper.TestPaperClassId" style="width:400px;"
112 112 :props="{emitPath:false}" :clearable=true :options="QuestionClass">
113 113 </el-cascader>
... ... @@ -119,22 +119,22 @@
119 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 123 <el-select v-model="TestPaper.UserTypeOfWork" placeholder="请选择工种">
124 124 <el-option v-for="item in usertypelist" :label="item.name" :value="item.id"></el-option>
125 125 </el-select>
126 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 131 <el-date-picker v-model="TestPaper.date" @change="changetimestartend" type="datetimerange"
132 132 format="yyyy-MM-dd hh:mm:ss" range-separator="至" start-placeholder="开始时间" style="width:100%"
133 133 end-placeholder="结束时间">
134 134 </el-date-picker>
135 135 </el-form-item>
136 136 </el-form-item>
137   - <el-form-item label="总时长控制" :prop="AnswerTime">
  137 + <el-form-item label="总时长控制" :prop="AnswerTime" required>
138 138 <el-input class="testpaper-input" type="number" placeholder="总时长控制(分钟)" v-model="TestPaper.AnswerTime">
139 139 </el-input>
140 140 </el-form-item>
... ... @@ -160,7 +160,7 @@
160 160 <el-input class="testpaper-input" :rows="10" type="textarea" v-model="TestPaper.Describe">
161 161 </el-input>
162 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 164 </el-button>
165 165 <div style="clear: both;"></div>
166 166 </el-form>
... ... @@ -225,6 +225,56 @@
225 225 label: "全部"
226 226 }],
227 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 280 computed: {
... ... @@ -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 357 if (this.value == '') {
298 358 EditTestPaper(this.TestPaper).then(res => {
299 359 if (res.data.code == 200) {
... ...
src/views/login/index.vue
... ... @@ -44,7 +44,7 @@
44 44 import {
45 45 validUsername
46 46 } from '@/utils/validate'
47   -
  47 + // import axios from 'axios'
48 48 export default {
49 49 name: 'Login',
50 50 data() {
... ... @@ -86,14 +86,16 @@
86 86 },
87 87 watch: {
88 88 $route: {
89   - handler: function(route) {
  89 + handler: function (route) {
90 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 94 immediate: true
95 95 }
96 96 },
  97 + created() {
  98 + },
97 99 methods: {
98 100 showPwd() {
99 101 if (this.passwordType === 'password') {
... ... @@ -112,7 +114,7 @@
112 114 this.loading = true
113 115 this.$store.dispatch('user/login', this.loginForm).then(() => {
114 116 this.$router.push({
115   - path: '/'
  117 + path: '/'
116 118 })
117 119 this.loading = false
118 120 }).catch((ret) => {
... ... @@ -132,20 +134,23 @@
132 134 <style lang="scss">
133 135 /* 修复input 背景不协调 和光标变色 */
134 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 139 $cursor: #fff;
  140 +
138 141 @supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
139 142 .login-container .el-input input {
140 143 color: $cursor;
141 144 }
142 145 }
  146 +
143 147 /* reset element-ui css */
144 148 .login-container {
145 149 .el-input {
146 150 display: inline-block;
147 151 height: 47px;
148 152 width: 85%;
  153 +
149 154 input {
150 155 background: transparent;
151 156 border: 0px;
... ... @@ -155,12 +160,14 @@
155 160 color: $light_gray;
156 161 height: 47px;
157 162 caret-color: $cursor;
  163 +
158 164 &:-webkit-autofill {
159 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 171 .el-form-item {
165 172 border: 1px solid rgba(255, 255, 255, 0.1);
166 173 background: rgba(0, 0, 0, 0.1);
... ... @@ -171,14 +178,16 @@
171 178 </style>
172 179  
173 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 185 .login-container {
178 186 min-height: 100%;
179 187 width: 100%;
180 188 background-color: $bg;
181 189 overflow: hidden;
  190 +
182 191 .login-form {
183 192 position: relative;
184 193 width: 520px;
... ... @@ -187,16 +196,19 @@
187 196 margin: 0 auto;
188 197 overflow: hidden;
189 198 }
  199 +
190 200 .tips {
191 201 font-size: 14px;
192 202 color: #fff;
193 203 margin-bottom: 10px;
  204 +
194 205 span {
195 206 &:first-of-type {
196 207 margin-right: 16px;
197 208 }
198 209 }
199 210 }
  211 +
200 212 .svg-container {
201 213 padding: 6px 5px 6px 15px;
202 214 color: $dark_gray;
... ... @@ -204,8 +216,10 @@
204 216 width: 30px;
205 217 display: inline-block;
206 218 }
  219 +
207 220 .title-container {
208 221 position: relative;
  222 +
209 223 .title {
210 224 font-size: 26px;
211 225 color: $light_gray;
... ... @@ -214,6 +228,7 @@
214 228 font-weight: bold;
215 229 }
216 230 }
  231 +
217 232 .show-pwd {
218 233 position: absolute;
219 234 right: 10px;
... ... @@ -224,4 +239,4 @@
224 239 user-select: none;
225 240 }
226 241 }
227 242 -</style>
  243 +</style>
228 244 \ No newline at end of file
... ...
src/views/user/picuserimport.vue
... ... @@ -84,16 +84,16 @@
84 84 <el-dialog
85 85 title="编辑信息"
86 86 :visible.sync="dialogVisible"
87   - width="60%"
  87 + width="80%"
88 88 :before-close="handleClose"
89 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 93 v-if="currentFilePath && currentFilePath.indexOf('.pdf') !=-1" :src="
94 94 BASE_ROOT_DOMAIN + '/pdf/web/viewer.html?file=' + BASE_ROOT_DOMAIN +currentFilePath
95 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 98 </el-image>
99 99 </div>
... ...
src/views/user/userlist.vue
... ... @@ -38,8 +38,9 @@
38 38  
39 39 <el-form-item>
40 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 44 <el-button type="primary" @click="handleInviteInterview()">邀请面试(线上)</el-button>
44 45  
45 46 <el-button type="primary" @click="handleCompanyInterview()">邀请面试(现场)</el-button>
... ... @@ -49,9 +50,11 @@
49 50  
50 51 <div class="flex aligin-center">
51 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 55 :show-file-list="false" :on-exceed="handleExceed" :on-success="handleSuccess" :file-list="fileList">
54 56 <el-button size="small" type="primary">导入用户</el-button>
  57 +
55 58 </el-upload>
56 59 </div>
57 60 </div>
... ... @@ -206,8 +209,8 @@
206 209 <el-select v-model="form.TestPaperId" placeholder="请选择试卷" style="width: 80%">
207 210 <el-option :value="item.id" :label="'['+item.id+']'+item.TestPaperTitle"
208 211 v-for="item in testpaperlist">{{
209   - "[" + item.id + "] " + (item.TestPaperTitle || "未命名")
210   - }}</el-option>
  212 + "[" + item.id + "] " + (item.TestPaperTitle || "未命名")
  213 + }}</el-option>
211 214 </el-select>
212 215 </el-form-item>
213 216 <el-form-item label="允许测评次数">
... ... @@ -335,7 +338,8 @@
335 338 <el-input v-model="adminUserInfo.Weight" placeholder="请输入体重" style="width: 70%"></el-input>
336 339 </el-form-item>
337 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 343 </el-form-item>
340 344 <el-form-item label="毕业院校" class="el-form-itemByWang" prop="GraduationSchool">
341 345 <el-input v-model="adminUserInfo.GraduationSchool" placeholder="请输入毕业院校" style="width: 70%">
... ... @@ -349,10 +353,12 @@
349 353 </el-input>
350 354 </el-form-item>
351 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 358 </el-form-item>
354 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 362 </el-form-item>
357 363 <el-form-item label="血型" class="el-form-itemByWang" prop="BloodType">
358 364 <el-input v-model="adminUserInfo.BloodType" placeholder="请输入血型" style="width: 70%"></el-input>
... ... @@ -361,7 +367,8 @@
361 367 <el-input v-model="adminUserInfo.Qualification" placeholder="请输入资格证书" style="width: 70%"></el-input>
362 368 </el-form-item>
363 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 372 </el-form-item>
366 373 <el-form-item label="户籍所在地" class="el-form-itemByWang" prop="RegisteredResidence">
367 374 <el-input v-model="adminUserInfo.RegisteredResidence" placeholder="请输入户籍所在地" style="width: 70%">
... ... @@ -375,15 +382,14 @@
375 382 <el-button @click="dialogClassIVIsible = false">取消</el-button>
376 383 <el-button type="primary" @click="submitForm('adminUserInfo')">提交</el-button>
377 384 </div>
378   -
379 385 </el-form>
380 386  
381 387 <div style="clear: both"></div>
382 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 393 <div v-for="(user, index) in sendUserList">
388 394  
389 395 <el-descriptions class="margin-top" :title="(index+1)" :column="2" border>
... ... @@ -437,16 +443,12 @@
437 443 </el-descriptions-item>
438 444 <el-descriptions-item>
439 445 <template slot="label">
440   -
441   - 面试时间范围
  446 + <label style="color:#F56C6C">*</label> 面试时间范围
442 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 448 <el-date-picker v-model="user.startTime" type="datetime" placeholder="选择日期时间"
448 449 :picker-options="pickerOptions">
449 450 </el-date-picker>
  451 +
450 452 </el-descriptions-item>
451 453 <el-descriptions-item>
452 454 <template slot="label">
... ... @@ -490,6 +492,24 @@
490 492 </div>
491 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 514 </div>
495 515 </template>
... ... @@ -499,11 +519,13 @@
499 519 ImportUserByExcel,
500 520 GetUserList,
501 521 UsersUpdate,
  522 + UsersCreate,
502 523 AddInvitationAnswerMultiple,
503 524 AddInvitationCompanyMultiple,
504 525 UsersDelete,
505 526 ChangeTags,
506   - SelectPhoneBool
  527 + SelectPhoneBool,
  528 + ChangeClass
507 529 } from "@/api/user";
508 530 import {
509 531 GetUserClassList,
... ... @@ -529,6 +551,8 @@
529 551 return time.getTime() < Date.now() - 8.64e7;
530 552 }
531 553 },
  554 + QuestionClassId: 0,
  555 + dialogsubjectlVisibleSetCat: false,
532 556 loading: false,
533 557 dialogFormVisible: false,
534 558 dialogTableVisible: false,
... ... @@ -550,6 +574,13 @@
550 574 temp: {
551 575 ParentId: 0,
552 576 },
  577 + rules: {
  578 + startTime: [
  579 + { type: 'date', required: true, message: '请选择日期', trigger: 'change' }
  580 + ],
  581 +
  582 + }
  583 + ,
553 584 mzlist: [
554 585 "汉族",
555 586 "蒙古族 ",
... ... @@ -606,37 +637,37 @@
606 637 "基诺族",
607 638 ],
608 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 672 type: "1",
642 673 dialogClassIVIsible: false,
... ... @@ -669,14 +700,43 @@
669 700 this.loadTree();
670 701 },
671 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 734 handleToResume(item) {
673 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 737 '_blank');
676 738 },
677 739 handleClose(tag, row) {
678   -
679   -
680 740 this.$confirm('确定删除该标签吗?', '消息', {
681 741 confirmButtonText: '确认',
682 742 cancelButtonText: '取消',
... ... @@ -727,7 +787,7 @@
727 787 },
728 788 //点击进度
729 789 processEvent(row) {
730   - // if(row.procesName == '公司面试')
  790 + // if(row.procesName == '线下面试')
731 791 // {
732 792 // this.
733 793 // }
... ... @@ -737,6 +797,7 @@
737 797 this.$message.success("没有邀请对象!");
738 798 return;
739 799 }
  800 + var isrequire = true;
740 801 var senddata = [];
741 802 this.sendUserList.forEach(o => {
742 803 // var item = Object.assign({},o);
... ... @@ -749,6 +810,7 @@
749 810 // start = o.date[0];
750 811 // end = o.date[1];
751 812 // }
  813 + if (!o.startTime) isrequire = false;
752 814 senddata.push({
753 815 userId: o.id,
754 816 startTime: formatTime(o.startTime),
... ... @@ -758,6 +820,11 @@
758 820 msgBody: o.msgBody || ''
759 821 });
760 822 });
  823 + if (!isrequire) {
  824 + this.$message.warning("请选择面试时间范围!");
  825 + return;
  826 + }
  827 +
761 828 AddInvitationCompanyMultiple(senddata).then(res => {
762 829 if (res.data.code == 200) {
763 830 this.$message.success("邀请成功");
... ... @@ -779,10 +846,20 @@
779 846  
780 847  
781 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 864 handleWatchLive(item) {
788 865 console.log("handleWatchLive", item);
... ... @@ -804,17 +881,35 @@
804 881 } else {
805 882 UsersUpdate(formData).then((res) => {
806 883 this.GetUser();
  884 +
  885 + this.dialogClassIVIsible = false;
807 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 905 handleEdit(data) {
815 906 this.dialogClassIVIsible = true;
816 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 914 handleTestHitory(row) {
820 915 GetHistoryList({
... ... @@ -848,23 +943,23 @@
848 943 this.$confirm(
849 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 965 forceTestPaper() {
... ... @@ -913,8 +1008,8 @@
913 1008 console.log(val);
914 1009 this.selectedList = val;
915 1010 },
916   - handleExceed() {},
917   - ImportUser() {},
  1011 + handleExceed() { },
  1012 + ImportUser() { },
918 1013  
919 1014 showcontent(c, row) {
920 1015 this.showbody = c;
... ... @@ -964,7 +1059,11 @@
964 1059 GetUserClassList({
965 1060 ParentId: 0
966 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 1069 filterNode(value, data) {
... ... @@ -1014,6 +1113,7 @@
1014 1113 },
1015 1114 handleNodeClick(data, checked, indeterminate) {
1016 1115 this.query.userClassId = data.id;
  1116 +
1017 1117 this.temp = data;
1018 1118 this.GetUser();
1019 1119 },
... ... @@ -1060,6 +1160,7 @@
1060 1160 box-shadow: 0 0 5px #cdcdcd;
1061 1161 justify-content: space-between;
1062 1162 }
  1163 +
1063 1164 .seetingsDiv button {
1064 1165 height: 40px;
1065 1166 background-color: #304156;
... ... @@ -1069,9 +1170,11 @@
1069 1170 float: none;
1070 1171 margin-right: 10px;
1071 1172 }
  1173 +
1072 1174 .el-tag+.el-tag {
1073 1175 margin-left: 10px;
1074 1176 }
  1177 +
1075 1178 .button-new-tag {
1076 1179 margin-left: 10px;
1077 1180 height: 32px;
... ... @@ -1079,13 +1182,15 @@
1079 1182 padding-top: 0;
1080 1183 padding-bottom: 0;
1081 1184 }
  1185 +
1082 1186 .input-new-tag {
1083 1187 width: 90px;
1084 1188 margin-left: 10px;
1085 1189 vertical-align: bottom;
1086 1190 }
  1191 +
1087 1192 .el-form-itemByWang {
1088 1193 width: 33% !important;
1089 1194 float: left !important;
1090 1195 }
1091 1196 -</style>
  1197 +</style>
1092 1198 \ No newline at end of file
... ...