feat:修改面授任务管理

This commit is contained in:
lixg
2023-01-05 11:02:08 +08:00
parent 3dbf35d2c1
commit 0bc0e91896
4 changed files with 342 additions and 68 deletions

View File

@@ -18,13 +18,15 @@
<div class="main">
<div class="endtime">
起止时间{{
faceTaskInfo && faceTaskInfo.startTime
? faceTaskInfo.startTime
projectTaskInfo && projectTaskInfo.startTime
? projectTaskInfo.startTime
: "-"
}}
{{
faceTaskInfo && faceTaskInfo.endTime ? faceTaskInfo.endTime : "-"
projectTaskInfo && projectTaskInfo.endTime
? projectTaskInfo.endTime
: "-"
}}
</div>
<div class="search">
@@ -76,7 +78,7 @@
<div class="btn btn2">
<div class="wz" @click="showEntryScore">批量录入成绩</div>
</div>
<div class="btn btn2">
<div class="btn btn2" @click="exportTaskStu">
<div class="img2"></div>
<div class="wz">导出数据</div>
</div>
@@ -92,7 +94,7 @@
<div class="text2">{{ selectedRowKeys.length }}</div>
<div class="text"></div>
<div class="text3">列表选项总计</div>
<div class="text4">{{ tableDataTotal }}</div>
<div class="text4">{{ tableDataTotal2 }}</div>
</div>
<div class="right" @click="clearLine">清空</div>
</div>
@@ -121,6 +123,7 @@
:total="tableDataTotal"
class="pagination"
v-if="tableDataTotal > 10"
@change="changePaginationStu"
/>
</div>
</div>
@@ -149,6 +152,7 @@ import CKWork from "../CheckWork.vue";
import CQue from "../CheckQue.vue";
import EntryScores from "../EntryScores.vue";
// import * as api from "../../../api/index";
import * as api from "../../../api/indexTaskManage";
export default {
name: "ProjectFaceTaskManage",
components: {
@@ -170,7 +174,7 @@ export default {
type: Number,
default: null,
},
faceTaskInfo: {
projectTaskInfo: {
type: Object,
default: function () {
return {};
@@ -210,75 +214,151 @@ export default {
pageNo: 1,
pageSize: 10,
currentPage: 1,
tableDataTotal: 1,
tableDataTotal: -1,
tableDataTotal2: 0, //显示列表总数
tabledata: [
{
workNum: "123",
userName: "li",
deptName: "开发",
jobName: "前端开发",
score: 89,
exam: 98,
testscore: 80,
status: "已完成",
},
// {
// workNum: "123",
// userName: "li",
// deptName: "开发",
// jobName: "前端开发",
// score: 89,
// exam: 98,
// testscore: 80,
// status: "已完成",
// },
],
tablecolumns: [
{
title: "工号",
dataIndex: "workNum",
key: "workNum",
dataIndex: "studentUserNo",
key: "studentUserNo",
width: 50,
align: "left",
className: "h head",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.studentUserNo ? text.record.studentUserNo : "-"}
</span>
</div>
);
},
},
{
title: "姓名",
dataIndex: "userName",
key: "userName",
dataIndex: "studentName",
key: "studentName",
width: 50,
align: "left",
className: "h head",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.studentName ? text.record.studentName : "-"}
</span>
</div>
);
},
},
{
title: "所在部门",
dataIndex: "deptName",
key: "userName",
dataIndex: "studentDepartName",
key: "studentDepartName",
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.studentDepartName
? text.record.studentDepartName
: "-"}
</span>
</div>
);
},
},
{
title: "所在岗位",
dataIndex: "jobName",
key: "jobName",
dataIndex: "studentJobName",
key: "studentJobName",
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.studentJobName
? text.record.studentJobName
: "-"}
</span>
</div>
);
},
},
{
title: "作业成绩",
dataIndex: "score",
key: "score",
dataIndex: "workScore",
key: "workScore",
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.workScore || text.record.workScore == 0
? text.record.workScore
: "-"}
</span>
</div>
);
},
},
{
title: "考试成绩",
dataIndex: "exam",
key: "exam",
dataIndex: "examinationScore",
key: "examinationScore",
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.examinationScore ||
text.record.examinationScore == 0
? text.record.examinationScore
: "-"}
</span>
</div>
);
},
},
{
title: "评分",
dataIndex: "testscore",
key: "testscore",
dataIndex: "assessmentScore",
key: "assessmentScore",
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.assessmentScore ||
text.record.assessmentScore == 0
? text.record.examinationScore
: "-"}
</span>
</div>
);
},
},
{
title: "任务状态",
@@ -370,10 +450,13 @@ export default {
state.projectName = "";
state.selectedRowKeys = [];
state.currentPage = 1;
state.tableDataTotal = -1;
state.tableDataTotal2 = 0;
state.tabledata = [];
};
const afterVisibleChange = (bol) => {
if (bol == true) {
// getManageList();
getStudent();
}
};
const selectProjectName = (value) => {
@@ -401,7 +484,85 @@ export default {
const clearLine = () => {
state.selectedRowKeys = [];
};
console.log("props", props.faceTaskInfo);
//获取学员
const getStudent = () => {
console.log("我是传递的查询参数", props.projectTaskInfo, {
pageNo: state.currentPage,
pageSize: state.pageSize,
currentStageId: props.projectTaskInfo.stageId,
type: 1,
pid: props.projectTaskInfo.projectId,
status: state.projectName,
studentName: state.name,
currentTaskId: props.projectTaskInfo.projectTaskId,
});
api
.AssessmentManagementMessage({
pageNo: state.currentPage,
pageSize: state.pageSize,
currentStageId: props.projectTaskInfo.stageId,
type: 1,
pid: props.projectTaskInfo.projectId,
status: state.projectName,
studentName: state.name,
currentTaskId: props.projectTaskInfo.projectTaskId,
})
.then((res) => {
console.log("获取面授管理学员", res);
if (res.data.code == 200) {
state.tabledata = res.data.data.records;
state.tableDataTotal = res.data.data.total;
state.tableDataTotal2 = res.data.data.total;
}
})
.catch((err) => {
console.log(err);
state.tabledata = [];
});
};
//搜索学员
const searchTaskList = () => {
state.currentPage = 1;
state.tableDataTotal = -1;
state.tableDataTotal2 = 0;
getStudent();
};
// 重置按钮
function resetTaskList() {
state.currentPage = 1;
state.name = "";
state.projectName = "";
state.tableDataTotal = -1;
state.tableDataTotal2 = 0;
getStudent();
}
//分页
const changePaginationStu = (page) => {
state.currentPage = page;
state.tableDataTotal = -1;
state.tableDataTotal2 = 0;
getStudent();
};
// 导出数据
function exportTaskStu() {
api
.ExportTaskStudent({
pageNo: state.currentPage,
pageSize: state.pageSize,
currentStageId: props.projectTaskInfo.stageId,
currentTaskId: props.projectTaskInfo.projectTaskId,
type: 1,
pid: props.projectTaskInfo.projectId,
})
.then((res) => {
console.log(res);
})
.catch((err) => {
console.log(err);
});
}
return {
...toRefs(state),
selectProjectName,
@@ -412,6 +573,10 @@ export default {
showEntryScore,
godie,
clearLine,
searchTaskList,
resetTaskList,
changePaginationStu,
exportTaskStu,
};
},
};