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

@ -36,7 +36,9 @@
</div>
<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-item label="手机号">
<el-input style="width: 100%;" placeholder="请输入手机号" v-model="phone" maxlength="11"></el-input>

@ -15,6 +15,9 @@
</el-card>
<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="nums">
<div class="item">
@ -82,10 +85,10 @@ import echarts from "echarts";
export default {
data() {
return {
systemId: this.$route.query.systemId,
id: this.$route.query.id,
classId: this.$route.query.classId,
projectId: this.$route.query.projectId,
projectName: this.$route.query.name,
classInfo: [],
experimentalName: this.$route.query.experimentalName,
className: this.$route.query.class,
keyword: "",
@ -94,32 +97,37 @@ export default {
page: 1,
pageSize: 10,
total: 0,
avg: 0
avg: 0,
activeName:'',
};
},
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();
},
methods: {
handleClick(tab, event) {
this.getData()
},
getData() {
let data = {
systemId: this.systemId,
page: this.page,
size: this.pageSize,
searchContant: this.keyword,
projectId: this.id
};
this.$get(this.api.queryEvaluationReport, data).then(res => {
let list = res.data.list;
this.$post(`${this.api.getAssessmentDetail}?assessmentId=${+this.id}&pageNum=${this.page}&pageSize=${this.pageSize}&classId=${this.activeName}`).then(res => {
if (res.status == 200){
this.avg = res.avgScore
this.total = res.peopleNum
let list = res.page.records;
let score = 0;
list.map(n => {
n.class = this.className;
score += n.score;
});
this.listData = list;
this.total = res.data.totalCount;
this.avg = score ? (score / res.data.totalCount).toFixed(2) : 0;
this.getChart();
}
}).catch(res => {
});
},

@ -4,7 +4,7 @@
<div class="tool mul">
<ul class="filter">
<li>
<label>考核时间</label>
<label>创建时间</label>
<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-group>
@ -327,15 +327,14 @@ export default {
this.$router.push(`add?id=${row.id}`);
},
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) {
let data = {
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("启动成功!");
this.getData();
}).catch(err => {

@ -760,18 +760,9 @@ export default {
}
this.accountReapeat = false;
}).catch(err => {
this.disableds = true
if (this.isAdd) {
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 {
this.accountReapeat = true;
}
@ -791,6 +782,15 @@ export default {
this.workNumberReapeat = false;
}
}).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;
});
}
@ -884,11 +884,6 @@ export default {
saveData(type) { // /
this.$refs.form.validate((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();
if (nodes.length) {
let tempArr = [];
@ -915,6 +910,10 @@ export default {
}).catch(res => {
});
} 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.$post(this.api.addStudent, this.form).then(res => {
util.successMsg("新增成功!");
@ -988,12 +987,15 @@ export default {
},
uploadSuccess(res, file, fileList) {
this.uploadFaild = false;
console.log(res)
if (res.status === 200) {
if (res.data.exportCode) {
this.exportCode = res.data.exportCode;
this.uploadFaild = true;
}
util.successMsg(`本次上传有${res.data.failureNum}个失败`);
this.getClassTreeData('','1','')
} else {
res.message ? util.errorMsg(res.message) : util.errorMsg("上传失败,请检查数据");
}

@ -14,7 +14,7 @@
</div>
<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 prop="roleName" label="角色名称" align="center" width="100"></el-table-column>
<el-table-column label="角色描述" align="center">
@ -151,6 +151,15 @@ export default {
util.errorMsg("请先选择数据!");
}
},
practiceSelectable(row, index){
let boolean = true;
if(row.roleName == '超级管理员'){
boolean = false
}else{
boolean = true
}
return boolean;
},
closeRole() {
this.isDetail = false;
this.form = {

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

Loading…
Cancel
Save