diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index 5b17e3c..c063833 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -34,8 +34,7 @@ export default { }, computed: { ...mapGetters([ - 'sidebar', - 'permissions' + 'sidebar' ]), // routes() { // return this.$router.options.routes @@ -61,9 +60,9 @@ export default { } }, created() { - this.routes = getRoutes(this.permissions); + this.routes = getRoutes( ); this.$bus.$on('relogin',()=>{ - this.routes = getRoutes(this.permissions); + this.routes = getRoutes( ); }) }, } diff --git a/src/utils/request.js b/src/utils/request.js index 4a6a064..634670d 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -47,12 +47,10 @@ service.interceptors.response.use( * Here is just an example * You can also judge the status by HTTP Status Code */ - response => { - + response => { const res = response.data // if the custom code is not 20000, it is judged as an error. if (res.code < 0 || res.data.code<0) { - Message({ message: res.data.message || 'Error', type: 'error', diff --git a/src/views/QuestionBank/index.vue b/src/views/QuestionBank/index.vue index 14501f9..49f9baf 100644 --- a/src/views/QuestionBank/index.vue +++ b/src/views/QuestionBank/index.vue @@ -15,11 +15,11 @@ - 添加顶级 - - + 添加顶级 + + {{ node.label }} @@ -153,6 +153,7 @@ + {{QuestionClassInfo}} 确定
@@ -350,7 +351,7 @@ CreatClassId: 0, scoreRules: ['高', '中', '低'], currentEditNode: undefined, - currentExpend:[1] + currentExpend: [1] }; }, created() { }, @@ -370,7 +371,7 @@ closeEditDim(data) { }, - saveEditDim(data) { + saveEditDim(data) { // if(this.currentEditNode && this.currentEditNode.parent) // this.currentExpend=[this.currentEditNode.parent.data.id]; // { @@ -537,13 +538,15 @@ this.dialogsubjectlVisible = true; }); }, - showClassDialog(node, parent, type) { + showClassDialog(node, parent, type) { this.dialogClassIVIsible = true; console.log(node); if (parent && parent == 0) this.QuestionClassInfo.ParentId = 0; if (node) this.QuestionClassInfo.ParentId = node.data.value; - if (type != undefined) this.QuestionClassInfo.ClassType = type; + if (type) this.QuestionClassInfo.ClassType = type; + else if (node.data.ClassType) this.QuestionClassInfo.ClassType = node.data.ClassType; + // alert(this.QuestionClassInfo.ParentId); }, //关闭弹框的事件 @@ -702,11 +705,11 @@ // _this.$refs.tree.getNode(_this.currentEditNode.parent).expand(); // _this.$refs.tree.getNode(_this.currentEditNode.parent).expanded=true; // _this.$forceUpdate() - + // } // }); - + // this.firstTreeData = [firstClass]; // this.secondTreeData = [secondClass]; }); diff --git a/src/views/TestPaper/ManualTestPaper.vue b/src/views/TestPaper/ManualTestPaper.vue index bb7d9a9..4152a2c 100644 --- a/src/views/TestPaper/ManualTestPaper.vue +++ b/src/views/TestPaper/ManualTestPaper.vue @@ -55,11 +55,11 @@
组卷基本信息
- + - {{arr2.length}} + 单选题:{{TestPaper.SingleNumber}} @@ -283,6 +283,14 @@ message: "请选择时间段", }, ], + TestPaperTitle: [ + { + required: true, + message: "请填写试卷名称", + }, + ], + + }, QuestionClass: [], treeData: [ @@ -516,7 +524,7 @@ GetQuestionClassByType({ ClassType: 2 }).then((res) => { var classarr = res.data.data || []; this.arr1 = classarr.map((rs) => { - rs.subject = rs.subjectName = rs.ClassificationName; + rs.subject = rs.subjectName = rs.ClassificationName+'('+(rs.subjectCount || 0)+')'; rs.type = "wd"; rs.subjectContent = "[]"; return rs; diff --git a/src/views/user/picuserimport.vue b/src/views/user/picuserimport.vue index 52c1f73..759428f 100644 --- a/src/views/user/picuserimport.vue +++ b/src/views/user/picuserimport.vue @@ -292,11 +292,29 @@ import { formatTime } from '@/utils/util' if (!row) { this.table_data = []; } else { - console.log(index, row); - + console.log(index, row); } UserInfo_BatchToUser(row.id).then(res => { - this.table_data.splice(index, 1); + var msg = []; + var data = res.data.data || {}; + if(data) + { + if(data.success >0){ + msg.push('成功'+data.success+'个'); + } + if(data.error >0){ + msg.push('失败'+data.error+'个'); + } + if(data.has >0){ + msg.push('已存在'+data.has+'个'); + } + } + if(msg.length <1) this.table_data.splice(index, 1); + else + this.$message({ + message: msg.join('\r\n'), + type: "info", + }); }); }, diff --git a/src/views/user/userlist.vue b/src/views/user/userlist.vue index bd07151..5d39546 100644 --- a/src/views/user/userlist.vue +++ b/src/views/user/userlist.vue @@ -38,7 +38,8 @@ 搜索 - 重置 + 添加 + 重置 邀请面试(线上) 邀请面试(现场) @@ -269,7 +270,7 @@
- + @@ -812,7 +813,7 @@ }, handleEdit(data) { this.dialogClassIVIsible = true; - console.log("超哥是傻逼:", data); + console.log(" -_- ", data); this.adminUserInfo = data; }, handleTestHitory(row) {