dev_2022-05-11
e 3 years ago
parent b6fbb65e27
commit 2322f2c9fb
  1. 2
      src/api/index.js
  2. 2
      src/pages/account/login/index.vue
  3. 36
      src/pages/achievement/ass/index.vue
  4. 9
      src/pages/assessment/list/index.vue
  5. 32
      src/pages/student/list/index.vue
  6. 11
      src/pages/system/list/role.vue
  7. 22
      src/pages/system/list/staff.vue

@ -52,10 +52,10 @@ export default {
pageByCondition: `${host}occupationlab/assessment/pageByCondition`, // 考核管理列表 pageByCondition: `${host}occupationlab/assessment/pageByCondition`, // 考核管理列表
saveAssessment: `${host}occupationlab/assessment/saveAssessment`, // 创建考核 saveAssessment: `${host}occupationlab/assessment/saveAssessment`, // 创建考核
modifyAssessment: `${host}occupationlab/assessment/modifyAssessment`, // 编辑考核 modifyAssessment: `${host}occupationlab/assessment/modifyAssessment`, // 编辑考核
enableAssessment: `${host}occupationlab/assessment/enableAssessment`, // 修改考核状态
getDetailById: `${host}occupationlab/assessment/getDetailById`, // 根据考核Id查询考核详情 getDetailById: `${host}occupationlab/assessment/getDetailById`, // 根据考核Id查询考核详情
deleteAssessment: `${host}occupationlab/assessment/deleteAssessment`, // 单个、批量删除 deleteAssessment: `${host}occupationlab/assessment/deleteAssessment`, // 单个、批量删除
collectPaper: `${host}occupationlab/assessment/collectPaper`, // 收卷(提前结束) collectPaper: `${host}occupationlab/assessment/collectPaper`, // 收卷(提前结束)
schoolCourse: `${host}nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程 schoolCourse: `${host}nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程
projectListByCourseId: `${host}nakadai/nakadai/curriculum/projectListByCourseId`, // 根据课程id获取实训项目列表 projectListByCourseId: `${host}nakadai/nakadai/curriculum/projectListByCourseId`, // 根据课程id获取实训项目列表

@ -36,7 +36,9 @@
</div> </div>
<el-dialog title="绑定手机号" :visible.sync="phoneVisible" :close-on-click-modal="false" width="30%"> <el-dialog title="绑定手机号" :visible.sync="phoneVisible" :close-on-click-modal="false" width="30%">
<div style='padding: 0 13px 20px 13px;'>
依据国家政策法规需绑定手机号进行实网络实名才可登录使用本平台 依据国家政策法规需绑定手机号进行实网络实名才可登录使用本平台
</div>
<el-form ref="form" label-width="60px"> <el-form ref="form" label-width="60px">
<el-form-item label="手机号"> <el-form-item label="手机号">
<el-input style="width: 100%;" placeholder="请输入手机号" v-model="phone" maxlength="11"></el-input> <el-input style="width: 100%;" placeholder="请输入手机号" v-model="phone" maxlength="11"></el-input>

@ -15,6 +15,9 @@
</el-card> </el-card>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="item in classInfo" :label="item.className" :name="item.id"></el-tab-pane>
</el-tabs>
<div class="stat"> <div class="stat">
<div class="nums"> <div class="nums">
<div class="item"> <div class="item">
@ -82,10 +85,10 @@ import echarts from "echarts";
export default { export default {
data() { data() {
return { return {
systemId: this.$route.query.systemId,
id: this.$route.query.id, id: this.$route.query.id,
classId: this.$route.query.classId,
projectId: this.$route.query.projectId, projectId: this.$route.query.projectId,
projectName: this.$route.query.name, classInfo: [],
experimentalName: this.$route.query.experimentalName, experimentalName: this.$route.query.experimentalName,
className: this.$route.query.class, className: this.$route.query.class,
keyword: "", keyword: "",
@ -94,32 +97,37 @@ export default {
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
avg: 0 avg: 0,
activeName:'',
}; };
}, },
mounted() { mounted() {
this.classInfo = JSON.parse(this.$route.query.classInfo)
for(var i=0;i<this.classInfo.length;i++){
let id = this.classInfo[i].id
this.classInfo[i].id = id.toString()
}
this.activeName= this.classInfo[0].id
this.getData(); this.getData();
}, },
methods: { methods: {
handleClick(tab, event) {
this.getData()
},
getData() { getData() {
let data = { this.$post(`${this.api.getAssessmentDetail}?assessmentId=${+this.id}&pageNum=${this.page}&pageSize=${this.pageSize}&classId=${this.activeName}`).then(res => {
systemId: this.systemId, if (res.status == 200){
page: this.page, this.avg = res.avgScore
size: this.pageSize, this.total = res.peopleNum
searchContant: this.keyword, let list = res.page.records;
projectId: this.id
};
this.$get(this.api.queryEvaluationReport, data).then(res => {
let list = res.data.list;
let score = 0; let score = 0;
list.map(n => { list.map(n => {
n.class = this.className; n.class = this.className;
score += n.score; score += n.score;
}); });
this.listData = list; this.listData = list;
this.total = res.data.totalCount;
this.avg = score ? (score / res.data.totalCount).toFixed(2) : 0;
this.getChart(); this.getChart();
}
}).catch(res => { }).catch(res => {
}); });
}, },

@ -4,7 +4,7 @@
<div class="tool mul"> <div class="tool mul">
<ul class="filter"> <ul class="filter">
<li> <li>
<label>考核时间</label> <label>创建时间</label>
<el-radio-group v-model="form.month" @change="initData"> <el-radio-group v-model="form.month" @change="initData">
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{ item.name }}</el-radio> <el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{ item.name }}</el-radio>
</el-radio-group> </el-radio-group>
@ -327,15 +327,14 @@ export default {
this.$router.push(`add?id=${row.id}`); this.$router.push(`add?id=${row.id}`);
}, },
show(row) { show(row) {
this.$router.push(`/achievement/ass?curriculumId=${this.curriculumId}&id=${row.id}&projectId=${row.projectId}&name=${row.projectName}&experimentalName=${row.experimentalName}&class=${row.experimentalClassName}`); console.log(row)
this.$router.push(`/achievement/ass?id=${row.id}&classId=${row.classId}&projectId=${row.projectId}&classInfo=${JSON.stringify(row.classInfo)}&experimentalName=${row.experimentalName}&class=${row.experimentalClassName}`);
}, },
start(row) { start(row) {
let data = { let data = {
id: row.id, id: row.id,
startTime: util.formatDate("yyyy-MM-dd hh:mm:ss", new Date()),
status: 1
}; };
this.$post(this.api.modifyAssessment, data).then(res => { this.$post(this.api.enableAssessment, data).then(res => {
util.successMsg("启动成功!"); util.successMsg("启动成功!");
this.getData(); this.getData();
}).catch(err => { }).catch(err => {

@ -760,18 +760,9 @@ export default {
} }
this.accountReapeat = false; this.accountReapeat = false;
}).catch(err => { }).catch(err => {
this.disableds = true
if (this.isAdd) { if (this.isAdd) {
this.showTree = false; this.showTree = false;
this.$post(`${this.api.getDetailByAccount}?workNumber=${this.form.workNumber}&platformId=${Setting.platformId}&type=1`).then(res => {
this.showTree = true;
let classId = res.data.classList.map(e => e.id);
this.form.classId = classId.toString();
delete this.form.classList;
// this.showTree = true;
this.accountReapeat = false;
this.$refs.form.clearValidate();
}).catch(res => {});
} else { } else {
this.accountReapeat = true; this.accountReapeat = true;
} }
@ -791,6 +782,15 @@ export default {
this.workNumberReapeat = false; this.workNumberReapeat = false;
} }
}).catch(err => { }).catch(err => {
this.$post(`${this.api.getDetailByAccount}?workNumber=${this.form.workNumber}&platformId=${Setting.platformId}&type=1`).then(res => {
this.showTree = true;
let classId = res.data.classList.map(e => e.id);
this.form.classId = classId.toString();
delete this.form.classList;
// this.showTree = true;
this.accountReapeat = false;
this.$refs.form.clearValidate();
}).catch(res => {});
this.workNumberReapeat = true; this.workNumberReapeat = true;
}); });
} }
@ -884,11 +884,6 @@ export default {
saveData(type) { // / saveData(type) { // /
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
if (this.accountReapeat) return util.warningMsg("该账号已存在");
if (this.workNumberReapeat) return util.warningMsg("该学生学号已存在");
if (this.phoneRepeat) return util.warningMsg("该手机号已存在");
if (this.emailRepeat) return util.warningMsg("该邮箱已存在");
let nodes = this.$refs.classTree.getCheckedNodes(); let nodes = this.$refs.classTree.getCheckedNodes();
if (nodes.length) { if (nodes.length) {
let tempArr = []; let tempArr = [];
@ -915,6 +910,10 @@ export default {
}).catch(res => { }).catch(res => {
}); });
} else { } else {
if (this.accountReapeat) return util.warningMsg("该账号已存在");
if (this.workNumberReapeat) return util.warningMsg("该学生学号已存在");
if (this.phoneRepeat) return util.warningMsg("该手机号已存在");
if (this.emailRepeat) return util.warningMsg("该邮箱已存在");
this.form.uniqueIdentification = new Date().getTime(); this.form.uniqueIdentification = new Date().getTime();
this.$post(this.api.addStudent, this.form).then(res => { this.$post(this.api.addStudent, this.form).then(res => {
util.successMsg("新增成功!"); util.successMsg("新增成功!");
@ -988,12 +987,15 @@ export default {
}, },
uploadSuccess(res, file, fileList) { uploadSuccess(res, file, fileList) {
this.uploadFaild = false; this.uploadFaild = false;
console.log(res)
if (res.status === 200) { if (res.status === 200) {
if (res.data.exportCode) { if (res.data.exportCode) {
this.exportCode = res.data.exportCode; this.exportCode = res.data.exportCode;
this.uploadFaild = true; this.uploadFaild = true;
} }
util.successMsg(`本次上传有${res.data.failureNum}个失败`); util.successMsg(`本次上传有${res.data.failureNum}个失败`);
this.getClassTreeData('','1','')
} else { } else {
res.message ? util.errorMsg(res.message) : util.errorMsg("上传失败,请检查数据"); res.message ? util.errorMsg(res.message) : util.errorMsg("上传失败,请检查数据");
} }

@ -14,7 +14,7 @@
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys"> <el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :selectable="practiceSelectable" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="roleName" label="角色名称" align="center" width="100"></el-table-column> <el-table-column prop="roleName" label="角色名称" align="center" width="100"></el-table-column>
<el-table-column label="角色描述" align="center"> <el-table-column label="角色描述" align="center">
@ -151,6 +151,15 @@ export default {
util.errorMsg("请先选择数据!"); util.errorMsg("请先选择数据!");
} }
}, },
practiceSelectable(row, index){
let boolean = true;
if(row.roleName == '超级管理员'){
boolean = false
}else{
boolean = true
}
return boolean;
},
closeRole() { closeRole() {
this.isDetail = false; this.isDetail = false;
this.form = { this.form = {

@ -45,7 +45,7 @@
<el-dialog :title="isDetail ? '查看员工' : (isAdd ? '新增员工' : '编辑员工')" :visible.sync="teacherVisible" <el-dialog :title="isDetail ? '查看员工' : (isAdd ? '新增员工' : '编辑员工')" :visible.sync="teacherVisible"
width="30%" @close="closeTeacher" class="dialog" :close-on-click-modal="false"> width="30%" @close="closeTeacher" class="dialog" :close-on-click-modal="false">
<el-form ref="teacherForm" :model="teacherForm" :rules="rules" label-width="140px" :disabled="isDetail"> <el-form ref="teacherForm" :model="teacherForm" :rules="rules" label-width="65px" :disabled="isDetail">
<el-form-item prop="account" label="账号"> <el-form-item prop="account" label="账号">
<el-input v-model.trim="teacherForm.account" placeholder="请输入职工账号"></el-input> <el-input v-model.trim="teacherForm.account" placeholder="请输入职工账号"></el-input>
</el-form-item> </el-form-item>
@ -149,7 +149,7 @@ export default {
this.workNumberChange(); this.workNumberChange();
callback(); callback();
}else{ }else{
callback(new Error('职工工号必须为数字')); callback(new Error('职工工号必须为数字或英文'));
} }
} }
}; };
@ -310,9 +310,16 @@ export default {
}).catch(res => {}); }).catch(res => {});
}, },
getRoleData() { // getRoleData() { //
this.$get(`${this.api.roleList}?page=1&size=100&name=''&platformId=1`).then(res => { this.roleList =[];
console.log(res) this.$get(`${this.api.roleList}?page=1&size=100&name=&platformId=1`).then(res => {
this.roleList = res.rolePage.records; for(var i=0;i<res.rolePage.records.length;i++){
if (res.rolePage.records[i].roleName == '超级管理员'){
}else{
this.roleList.push(res.rolePage.records[i])
}
}
// this.roleList = res.rolePage.records;
}).catch(res => {}); }).catch(res => {});
}, },
closeTeacher() { // / closeTeacher() { // /
@ -341,7 +348,7 @@ export default {
this.$get(`${this.api.staffDetail}?accountId=${accountId}`).then(res => { this.$get(`${this.api.staffDetail}?accountId=${accountId}`).then(res => {
let { data } = res; let { data } = res;
this.teacherForm = data; this.teacherForm = data;
this.roleList = data.roleAndDeptList // this.roleList = data.roleAndDeptList
this.teacherForm.roleValue = data.roleAndDeptList.map(i => i.roleName); this.teacherForm.roleValue = data.roleAndDeptList.map(i => i.roleName);
this.teacherForm.roleAndDeptList = data.roleAndDeptList.map(i => { this.teacherForm.roleAndDeptList = data.roleAndDeptList.map(i => {
i.cascaderValue = [i.staffArchitectureId, i.gradeId] i.cascaderValue = [i.staffArchitectureId, i.gradeId]
@ -443,6 +450,7 @@ export default {
} }
}, },
roleChange(value) { // roleChange(value) { //
console.log(this.teacherForm.roleValue)
if (value.length) { if (value.length) {
let ids = this.teacherForm.roleAndDeptList.map(e => e.roleId); let ids = this.teacherForm.roleAndDeptList.map(e => e.roleId);
this.roleList.forEach(i => { this.roleList.forEach(i => {
@ -453,7 +461,7 @@ export default {
}; };
if (value.includes(i.id) && !ids.includes(i.id)) { if (value.includes(i.id) && !ids.includes(i.id)) {
console.log(i) console.log(i)
obj.roleId = i.roleId; obj.roleId = i.id;
obj.roleName = i.roleName; obj.roleName = i.roleName;
this.teacherForm.roleAndDeptList.push(obj); this.teacherForm.roleAndDeptList.push(obj);
} }

Loading…
Cancel
Save