Commit c5b615491eaf46a1c38e29567df910d55313cfef

Authored by 周超
1 parent cb41350e

111

src/layout/components/Sidebar/index.vue
... ... @@ -34,8 +34,7 @@ export default {
34 34 },
35 35 computed: {
36 36 ...mapGetters([
37   - 'sidebar',
38   - 'permissions'
  37 + 'sidebar'
39 38 ]),
40 39 // routes() {
41 40 // return this.$router.options.routes
... ... @@ -61,9 +60,9 @@ export default {
61 60 }
62 61 },
63 62 created() {
64   - this.routes = getRoutes(this.permissions);
  63 + this.routes = getRoutes( );
65 64 this.$bus.$on('relogin',()=>{
66   - this.routes = getRoutes(this.permissions);
  65 + this.routes = getRoutes( );
67 66 })
68 67 },
69 68 }
... ...
src/utils/request.js
... ... @@ -47,12 +47,10 @@ service.interceptors.response.use(
47 47 * Here is just an example
48 48 * You can also judge the status by HTTP Status Code
49 49 */
50   - response => {
51   -
  50 + response => {
52 51 const res = response.data
53 52 // if the custom code is not 20000, it is judged as an error.
54 53 if (res.code < 0 || res.data.code<0) {
55   -
56 54 Message({
57 55 message: res.data.message || 'Error',
58 56 type: 'error',
... ...
src/views/QuestionBank/index.vue
... ... @@ -15,11 +15,11 @@
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   - 添加顶级
19   - </el-button>
20   - <el-tree :data="activeTab == 'first' ? firstTreeData : secondTreeData" :default-expanded-keys="currentExpend"
21   - :props="activeTab == 'first' ? firstTreeData : secondTreeData" @node-click="handleNodeClick"
22   - class="eltree" :expand-on-click-node="false" ref="tree">
  18 + 添加顶级{{activeTab}}
  19 + </el-button>
  20 + <el-tree :data="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">
23 23 <span class="custom-tree-node" slot-scope="{ node, data }">
24 24 <span>{{ node.label }}</span>
25 25 <span style="">
... ... @@ -153,6 +153,7 @@
153 153 <el-input v-model="QuestionClassInfo.ClassificationName" placeholder="请输入分类名称"></el-input>
154 154 </el-form-item>
155 155 </el-form>
  156 + {{QuestionClassInfo}}
156 157 <el-button @click="CreateQuestionClassHealder" style="margin: 10px 0 0 0; float: right" type="primary">确定
157 158 </el-button>
158 159 <div style="clear: both"></div>
... ... @@ -350,7 +351,7 @@
350 351 CreatClassId: 0,
351 352 scoreRules: ['高', '中', '低'],
352 353 currentEditNode: undefined,
353   - currentExpend:[1]
  354 + currentExpend: [1]
354 355 };
355 356 },
356 357 created() { },
... ... @@ -370,7 +371,7 @@
370 371 closeEditDim(data) {
371 372 },
372 373  
373   - saveEditDim(data) {
  374 + saveEditDim(data) {
374 375 // if(this.currentEditNode && this.currentEditNode.parent)
375 376 // this.currentExpend=[this.currentEditNode.parent.data.id];
376 377 // {
... ... @@ -537,13 +538,15 @@
537 538 this.dialogsubjectlVisible = true;
538 539 });
539 540 },
540   - showClassDialog(node, parent, type) {
  541 + showClassDialog(node, parent, type) {
541 542 this.dialogClassIVIsible = true;
542 543 console.log(node);
543 544 if (parent && parent == 0) this.QuestionClassInfo.ParentId = 0;
544 545 if (node)
545 546 this.QuestionClassInfo.ParentId = node.data.value;
546   - if (type != undefined) this.QuestionClassInfo.ClassType = type;
  547 + if (type) this.QuestionClassInfo.ClassType = type;
  548 + else if (node.data.ClassType) this.QuestionClassInfo.ClassType = node.data.ClassType;
  549 +
547 550 // alert(this.QuestionClassInfo.ParentId);
548 551 },
549 552 //关闭弹框的事件
... ... @@ -702,11 +705,11 @@
702 705 // _this.$refs.tree.getNode(_this.currentEditNode.parent).expand();
703 706 // _this.$refs.tree.getNode(_this.currentEditNode.parent).expanded=true;
704 707 // _this.$forceUpdate()
705   -
  708 +
706 709 // }
707 710  
708 711 // });
709   -
  712 +
710 713 // this.firstTreeData = [firstClass];
711 714 // this.secondTreeData = [secondClass];
712 715 });
... ...
src/views/TestPaper/ManualTestPaper.vue
... ... @@ -55,11 +55,11 @@
55 55 <div class="grid-content bg-purple">
56 56 <div class="areahead">组卷基本信息</div>
57 57 <el-form ref="form" class="testPaper-manager" :rules="rules" :model="TestPaper" label-width="100px">
58   - <el-form-item label="试卷名称:" class="el-form-item-custom">
  58 + <el-form-item label="试卷名称:" prop="TestPaperTitle" required class="el-form-item-custom">
59 59 <el-input v-model="TestPaper.TestPaperTitle"></el-input>
60 60 </el-form-item>
61 61 <el-form-item label="题目数量:" class="el-form-item-custom">
62   - {{arr2.length}}
  62 +
63 63 </el-form-item>
64 64 <el-form-item label="题型数量:" class="el-form-item-custom">
65 65 <span style="margin-right: 10px;">单选题:{{TestPaper.SingleNumber}}</span>
... ... @@ -283,6 +283,14 @@
283 283 message: "请选择时间段",
284 284 },
285 285 ],
  286 + TestPaperTitle: [
  287 + {
  288 + required: true,
  289 + message: "请填写试卷名称",
  290 + },
  291 + ],
  292 +
  293 +
286 294 },
287 295 QuestionClass: [],
288 296 treeData: [
... ... @@ -516,7 +524,7 @@
516 524 GetQuestionClassByType({ ClassType: 2 }).then((res) => {
517 525 var classarr = res.data.data || [];
518 526 this.arr1 = classarr.map((rs) => {
519   - rs.subject = rs.subjectName = rs.ClassificationName;
  527 + rs.subject = rs.subjectName = rs.ClassificationName+'('+(rs.subjectCount || 0)+')';
520 528 rs.type = "wd";
521 529 rs.subjectContent = "[]";
522 530 return rs;
... ...
src/views/user/picuserimport.vue
... ... @@ -292,11 +292,29 @@ import { formatTime } from &#39;@/utils/util&#39;
292 292 if (!row) {
293 293 this.table_data = [];
294 294 } else {
295   - console.log(index, row);
296   -
  295 + console.log(index, row);
297 296 }
298 297 UserInfo_BatchToUser(row.id).then(res => {
299   - this.table_data.splice(index, 1);
  298 + var msg = [];
  299 + var data = res.data.data || {};
  300 + if(data)
  301 + {
  302 + if(data.success >0){
  303 + msg.push('成功'+data.success+'个');
  304 + }
  305 + if(data.error >0){
  306 + msg.push('失败'+data.error+'个');
  307 + }
  308 + if(data.has >0){
  309 + msg.push('已存在'+data.has+'个');
  310 + }
  311 + }
  312 + if(msg.length <1) this.table_data.splice(index, 1);
  313 + else
  314 + this.$message({
  315 + message: msg.join('\r\n'),
  316 + type: "info",
  317 + });
300 318 });
301 319 },
302 320  
... ...
src/views/user/userlist.vue
... ... @@ -38,7 +38,8 @@
38 38  
39 39 <el-form-item>
40 40 <el-button type="success" @click="search">搜索</el-button>
41   - <el-button type="success" @click="resetSearch">重置</el-button>
  41 + <el-button type="success" @click="handleEdit({})">添加</el-button>
  42 + <el-button type="success" @click="resetSearch">重置</el-button>
42 43 <el-button type="primary" @click="handleInviteInterview()">邀请面试(线上)</el-button>
43 44  
44 45 <el-button type="primary" @click="handleCompanyInterview()">邀请面试(现场)</el-button>
... ... @@ -269,7 +270,7 @@
269 270 </div>
270 271 </el-dialog>
271 272  
272   - <el-dialog title="人才用户信息" :visible.sync="dialogClassIVIsible" width="450">
  273 + <el-dialog title="人才用户信息" :visible.sync="dialogClassIVIsible" width="80%">
273 274 <el-form ref="adminUserInfo" label-width="120px">
274 275 <el-form-item class="el-form-itemByWang" label="名称" prop="fullName">
275 276 <el-input v-model="adminUserInfo.fullName" placeholder="请输入姓名" style="width: 70%"></el-input>
... ... @@ -812,7 +813,7 @@
812 813 },
813 814 handleEdit(data) {
814 815 this.dialogClassIVIsible = true;
815   - console.log("超哥是傻逼:", data);
  816 + console.log(" -_- ", data);
816 817 this.adminUserInfo = data;
817 818 },
818 819 handleTestHitory(row) {
... ...