diff --git a/src/api/user.js b/src/api/user.js index f0c0d34..e0dcabb 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -211,3 +211,9 @@ export function saveTypeSetting(data) { } +export function ChangeClass(id,type) { + return request({ + url: `/Users/ChangeClass?id=${id}&type=${type}`, + method: 'post', + }) +} \ No newline at end of file diff --git a/src/views/QuestionBank/components/EditDimension.vue b/src/views/QuestionBank/components/EditDimension.vue index 5e4b2da..b0e00ba 100644 --- a/src/views/QuestionBank/components/EditDimension.vue +++ b/src/views/QuestionBank/components/EditDimension.vue @@ -1,11 +1,12 @@ - + - + - + - + @@ -351,7 +363,19 @@ CreatClassId: 0, scoreRules: ['高', '中', '低'], currentEditNode: undefined, - currentExpend: [1] + currentExpend: [1], + rules: { + subject: [ + { required: true, message: '题目名称必填', trigger: 'blur' } + ], + subjectType: [ + { required: true, message: '请选择分类', trigger: 'change' } + ], + QuestionClassId: [ + { required: true, message: '请选择分类', trigger: 'change' } + ] + } + }; }, created() { }, @@ -424,7 +448,8 @@ }, handleChangeCat() { var rows = this.$refs.table.selection; - if (!rows || rows.length < 1) { + if (!rows || rows.length < 1) + { this.$message.warning('至少选择一项进行操作!'); return; } @@ -467,6 +492,7 @@ this.dialogsubjectlVisible = true }, changequestionclass(a, b, c) { + debugger; var item = this.QuestionClass.find(o => o.id == a); if (item) this.FormClassType = item.ClassType; }, @@ -474,7 +500,7 @@ handleEditDimension(node, data) { console.log(data); // this.$refs.editDimensionDialog.dialogFormVisible = true; - this.$refs.editDimensionDialog.show(data.id); + this.$refs.editDimensionDialog.show(data.id, node); this.currentEditDimension = data; this.currentEditNode = node; }, @@ -487,13 +513,30 @@ this.loading = true; // console.log(node, data); // console.log(this.API); - this.API.deleteQuestionClass(data.value).then((res) => { - - this.getQuestionClassListHeadler(); + setTimeout(() => { this.loading = false; - this.$message.success('操作成功!'); + + }, 1000); + this.$confirm("确认删除该分类信息吗?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }).then(() => { + this.API.deleteQuestionClass(data.value).then((res) => { + if(res.data.success){ + this.getQuestionClassListHeadler(); + this.$message.success('操作成功!'); + } + else{ + this.$message.error(res.data.message || '删除失败!'); + } + + }); }); + + + }, closeClassDialog() { this.dialogClassIVIsible = false; @@ -538,7 +581,9 @@ this.dialogsubjectlVisible = true; }); }, - showClassDialog(node, parent, type) { + showClassDialog(node, parent, type) { + this.QuestionClassInfo.ClassificationName = ''; + this.$forceUpdate(); this.dialogClassIVIsible = true; console.log(node); if (parent && parent == 0) this.QuestionClassInfo.ParentId = 0; @@ -547,6 +592,7 @@ if (type) this.QuestionClassInfo.ClassType = type; else if (node.data.ClassType) this.QuestionClassInfo.ClassType = node.data.ClassType; + // alert(this.QuestionClassInfo.ParentId); }, //关闭弹框的事件 @@ -612,6 +658,7 @@ if (this.loading) return; this.parameter.QuestionClassId = val.value; this.parameter.pageIndex = 1; + this.Dataform.QuestionClassId = val.value; this.GetList(); }, DelQuestionBankEventHeadler(id) { @@ -630,23 +677,32 @@ }, }); }, - EditQuestionHeadler() { - let reg = new RegExp('"', "g"); - //this.Dataform.subjectContent = JSON.stringify(this.subjectContent).replace(reg, "\""); - this.Dataform.subjectContent = this.subjectContent; - if (typeof this.Dataform.answer != "string") - //判断是否为字符串 - this.Dataform.answer = this.Dataform.answer.join(","); - var _this = this; - EditQuestion(this.Dataform).then((res) => { - if (res.data.code == 200) { - _this.GetList(); - this.$message(res.data.message); - setTimeout(function () { - _this.dialogsubjectlVisible = false; - }, 10); + EditQuestionHeadler() { + this.$refs['Dataform'].validate((valid) => { + if (valid) { + + let reg = new RegExp('"', "g"); + //this.Dataform.subjectContent = JSON.stringify(this.subjectContent).replace(reg, "\""); + this.Dataform.subjectContent = this.subjectContent; + if (typeof this.Dataform.answer != "string") + //判断是否为字符串 + this.Dataform.answer = this.Dataform.answer.join(","); + var _this = this; + EditQuestion(this.Dataform).then((res) => { + if (res.data.code == 200) { + _this.GetList(); + this.$message.success(res.data.message); + setTimeout(function () { + _this.dialogsubjectlVisible = false; + }, 10); + } + }); + } else { + console.log('error submit!!'); + return false; } }); + }, GetList() { let _this = this; @@ -723,7 +779,7 @@ } /deep/.el-form-item { - margin-bottom: 5px; + /* margin-bottom: 5px; */ } /deep/.el-radio { diff --git a/src/views/TestPaper/ManualTestPaper.vue b/src/views/TestPaper/ManualTestPaper.vue index 4152a2c..c87c6ec 100644 --- a/src/views/TestPaper/ManualTestPaper.vue +++ b/src/views/TestPaper/ManualTestPaper.vue @@ -287,10 +287,16 @@ { required: true, message: "请填写试卷名称", - }, + } ], - + AnswerTime: [ + { + required: true, + message: "请填写试总时长控制", + }, + + ], }, QuestionClass: [], treeData: [ @@ -480,6 +486,14 @@ this.$refs['form'].validate((valid) => { + if(!this.TestPaper.TestPaperTitle){ + this.$notify({ + title: '试卷标题必填!', + // message: res.data.message, + type: 'warning' + }); + return; + } if (valid) { this.TestPaper.QuestionBankIds = this.arr2.map((u) => u.id); var d = this.TestPaper; diff --git a/src/views/TestPaper/TestPaperList.vue b/src/views/TestPaper/TestPaperList.vue index 4aaedd1..5d8e914 100644 --- a/src/views/TestPaper/TestPaperList.vue +++ b/src/views/TestPaper/TestPaperList.vue @@ -103,11 +103,11 @@
- - + + - + @@ -119,22 +119,22 @@ --> - + - - + + - + @@ -160,7 +160,7 @@ - 保存 + 保存1
@@ -225,6 +225,56 @@ label: "全部" }], value: '', + rules: { + OriginalPrice: [ + { + required: true, + message: "不能为空", + }, + ], + PresentPrice: [ + { + required: true, + message: "不能为空", + }, + ], + UserTypeOfWork: [ + { + required: true, + message: "请选择工种", + }, + ], QuestionClassId: [ + { + required: true, + message: "请选择分类", + }, + ],date: [ + { + required: true, + message: "请选择时间段", + }, + ], + TestPaperTitle: [ + { + required: true, + message: "请填写试卷名称", + } + ], + TestPaperClassId: [ + { + required: true, + message: "分类必须选择", + }, + + ], + AnswerTime: [ + { + required: true, + message: "请填写试总时长控制", + }, + + ] + } } }, computed: { @@ -293,7 +343,17 @@ } }, //添加试卷基本信息 - SubmitTestPaper() { + async SubmitTestPaper() { + if(!this.TestPaper.TestPaperTitle){ + this.$message.warning('试卷名称不能为空!'); + return; + } + if(!this.TestPaper.AnswerTime){ + this.$message.warning('请填写总时长!'); + return; + } + + if (this.value == '') { EditTestPaper(this.TestPaper).then(res => { if (res.data.code == 200) { diff --git a/src/views/login/index.vue b/src/views/login/index.vue index f378c39..bdbc394 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -44,7 +44,7 @@ import { validUsername } from '@/utils/validate' - + // import axios from 'axios' export default { name: 'Login', data() { @@ -86,14 +86,16 @@ }, watch: { $route: { - handler: function(route) { + handler: function (route) { this.redirect = route.query && route.query.redirect - if(this.redirect.indexOf('404') !=-1) - this.redirect = this.redirect.replace('404','dashboard') + if (this.redirect.indexOf('404') != -1) + this.redirect = this.redirect.replace('404', 'dashboard') }, immediate: true } }, + created() { + }, methods: { showPwd() { if (this.passwordType === 'password') { @@ -112,7 +114,7 @@ this.loading = true this.$store.dispatch('user/login', this.loginForm).then(() => { this.$router.push({ - path: '/' + path: '/' }) this.loading = false }).catch((ret) => { @@ -132,20 +134,23 @@ + \ No newline at end of file diff --git a/src/views/user/picuserimport.vue b/src/views/user/picuserimport.vue index 759428f..516469d 100644 --- a/src/views/user/picuserimport.vue +++ b/src/views/user/picuserimport.vue @@ -84,16 +84,16 @@ -
-
- - +
diff --git a/src/views/user/userlist.vue b/src/views/user/userlist.vue index 29fac48..b92681f 100644 --- a/src/views/user/userlist.vue +++ b/src/views/user/userlist.vue @@ -38,8 +38,9 @@ 搜索 - 添加 - 重置 + 添加 + 批量修改分类 + 重置 邀请面试(线上) 邀请面试(现场) @@ -49,9 +50,11 @@
下载模板 - 导入用户 +
@@ -206,8 +209,8 @@ {{ - "[" + item.id + "] " + (item.TestPaperTitle || "未命名") - }} + "[" + item.id + "] " + (item.TestPaperTitle || "未命名") + }}
@@ -335,7 +338,8 @@ - + + @@ -349,10 +353,12 @@ - + + - + + @@ -361,7 +367,8 @@ - + + @@ -375,15 +382,14 @@ 取消 提交
-
- - + +
@@ -437,16 +443,12 @@ - - + @@ -499,11 +519,13 @@ ImportUserByExcel, GetUserList, UsersUpdate, + UsersCreate, AddInvitationAnswerMultiple, AddInvitationCompanyMultiple, UsersDelete, ChangeTags, - SelectPhoneBool + SelectPhoneBool, + ChangeClass } from "@/api/user"; import { GetUserClassList, @@ -529,6 +551,8 @@ return time.getTime() < Date.now() - 8.64e7; } }, + QuestionClassId: 0, + dialogsubjectlVisibleSetCat: false, loading: false, dialogFormVisible: false, dialogTableVisible: false, @@ -550,6 +574,13 @@ temp: { ParentId: 0, }, + rules: { + startTime: [ + { type: 'date', required: true, message: '请选择日期', trigger: 'change' } + ], + + } + , mzlist: [ "汉族", "蒙古族 ", @@ -606,37 +637,37 @@ "基诺族", ], processlist: [{ - label: '入库', - value: 0 - }, - { - label: '面试邀请', - value: 1 - }, - { - label: '正在面试', - value: 2 - }, - { - label: '面试完成', - value: 3 - }, - { - label: '公司面试', - value: 4 - }, - { - label: '已录用', - value: 5 - }, - { - label: '未录用', - value: 9 - }, - { - label: '禁用', - value: 11 - }, + label: '入库', + value: 0 + }, + { + label: '面试邀请', + value: 1 + }, + { + label: '正在面试', + value: 2 + }, + { + label: '面试完成', + value: 3 + }, + { + label: '线下面试', + value: 4 + }, + { + label: '已录用', + value: 5 + }, + { + label: '未录用', + value: 9 + }, + { + label: '禁用', + value: 11 + }, ], type: "1", dialogClassIVIsible: false, @@ -669,14 +700,43 @@ this.loadTree(); }, methods: { + handleChangeCat() { + var rows = this.$refs.userList.selection; + if (!rows || rows.length < 1) { + this.$message.warning('至少选择一项进行操作!'); + return; + } + this.dialogsubjectlVisibleSetCat = true; + }, + + closeDialogCat() { + this.QuestionClassId = 0; + this.dialogsubjectlVisibleSetCat = false; + }, + handleSetClass() { + var rows = this.$refs.userList.selection; + if (!this.QuestionClassId || this.QuestionClassId < 1) { + this.$message.warning('至少选择一个分类进行操作!'); + return; + } + this.$confirm("确认批量修改分类吗?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }).then(() => { + ChangeClass(rows.map(o => o.id).join(','), this.QuestionClassId).then((o) => { + this.$message.success("修改成功"); + this.GetUser(); + this.dialogsubjectlVisibleSetCat = false; + }); + }); + }, handleToResume(item) { window.open( - `http://interview-admin.7-stars.com.cn/Appraise/${item.sex == 1?'malestaff':'femalestaff'}/${item.id}.html`, + `http://interview-admin.7-stars.com.cn/Appraise/${item.sex == 1 ? 'malestaff' : 'femalestaff'}/${item.id}.html`, '_blank'); }, handleClose(tag, row) { - - this.$confirm('确定删除该标签吗?', '消息', { confirmButtonText: '确认', cancelButtonText: '取消', @@ -727,7 +787,7 @@ }, //点击进度 processEvent(row) { - // if(row.procesName == '公司面试') + // if(row.procesName == '线下面试') // { // this. // } @@ -737,6 +797,7 @@ this.$message.success("没有邀请对象!"); return; } + var isrequire = true; var senddata = []; this.sendUserList.forEach(o => { // var item = Object.assign({},o); @@ -749,6 +810,7 @@ // start = o.date[0]; // end = o.date[1]; // } + if (!o.startTime) isrequire = false; senddata.push({ userId: o.id, startTime: formatTime(o.startTime), @@ -758,6 +820,11 @@ msgBody: o.msgBody || '' }); }); + if (!isrequire) { + this.$message.warning("请选择面试时间范围!"); + return; + } + AddInvitationCompanyMultiple(senddata).then(res => { if (res.data.code == 200) { this.$message.success("邀请成功"); @@ -779,10 +846,20 @@ handleDelete(item, index) { - this.userList.splice(index, 1); - UsersDelete({ - ids: item.id + this.$confirm("确认删除该人才信息吗?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }).then(() => { + + this.userList.splice(index, 1); + UsersDelete({ + ids: item.id + }); }); + + + }, handleWatchLive(item) { console.log("handleWatchLive", item); @@ -804,17 +881,35 @@ } else { UsersUpdate(formData).then((res) => { this.GetUser(); + + this.dialogClassIVIsible = false; console.log(res); }); } }); } - this.dialogClassIVIsible = false; + else { + UsersCreate(formData).then(res => { + if (res.data.success) { + this.GetUser(); + this.$message.success("添加成功"); + + this.dialogClassIVIsible = false; + } + else + this.$message.error(res.data.message || "添加失败!"); + + }); + } }, handleEdit(data) { this.dialogClassIVIsible = true; console.log(" -_- ", data); - this.adminUserInfo = data; + if (data == -1) { + this.adminUserInfo = { userClassId: (this.query.userClassId || 0) }; + } + else + this.adminUserInfo = data; }, handleTestHitory(row) { GetHistoryList({ @@ -848,23 +943,23 @@ this.$confirm( "确认向选择的" + ids.length + "个用户发送试卷连接进行测试吗?", "提示消息", { - confirmButtonText: "确认", - cancelButtonText: "取消", - callback: (action) => { - if (action == "confirm") { - AddInvitationAnswerMultiple(postData).then((res) => { - if (res.data.code == 200) { - this.$message.success("发送成功"); - this.form = {}; - this.dialogFormVisible = false; - this.GetUser(); - } else { - this.$message.error("发送失败"); - } - }); - } - }, - } + confirmButtonText: "确认", + cancelButtonText: "取消", + callback: (action) => { + if (action == "confirm") { + AddInvitationAnswerMultiple(postData).then((res) => { + if (res.data.code == 200) { + this.$message.success("发送成功"); + this.form = {}; + this.dialogFormVisible = false; + this.GetUser(); + } else { + this.$message.error("发送失败"); + } + }); + } + }, + } ); }, forceTestPaper() { @@ -913,8 +1008,8 @@ console.log(val); this.selectedList = val; }, - handleExceed() {}, - ImportUser() {}, + handleExceed() { }, + ImportUser() { }, showcontent(c, row) { this.showbody = c; @@ -964,7 +1059,11 @@ GetUserClassList({ ParentId: 0 }).then((res) => { - this.data = res.data.data; + var list = [{ id: 0, ClassTitle: '全部' }]; + + list.push(...res.data.data || []); + + this.data = list; }); }, filterNode(value, data) { @@ -1014,6 +1113,7 @@ }, handleNodeClick(data, checked, indeterminate) { this.query.userClassId = data.id; + this.temp = data; this.GetUser(); }, @@ -1060,6 +1160,7 @@ box-shadow: 0 0 5px #cdcdcd; justify-content: space-between; } + .seetingsDiv button { height: 40px; background-color: #304156; @@ -1069,9 +1170,11 @@ float: none; margin-right: 10px; } + .el-tag+.el-tag { margin-left: 10px; } + .button-new-tag { margin-left: 10px; height: 32px; @@ -1079,13 +1182,15 @@ padding-top: 0; padding-bottom: 0; } + .input-new-tag { width: 90px; margin-left: 10px; vertical-align: bottom; } + .el-form-itemByWang { width: 33% !important; float: left !important; } - + \ No newline at end of file