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

@@ -3,10 +3,10 @@ import http from "./config";
// 获取考试管理的信息 // 获取考试管理的信息
export const ExamManagementMessage = (obj) => http.post('/admin/exam/manage/queryExamManagementMessage',obj) export const ExamManagementMessage = (obj) => http.post('/admin/exam/manage/queryExamManagementMessage', obj)
// 获取评估管理的信息 // 获取评估管理的信息
export const AssessmentManagementMessage = (obj) => http.get(`/admin/student/getTaskStudent`, {params: obj}) export const AssessmentManagementMessage = (obj) => http.get(`/admin/student/getTaskStudent`, { params: obj })
// 导出学员信息 // 导出学员信息
export const ExportTaskStudent = (obj) => http.get('/admin/student/exportTaskStudent', {params: obj}) export const ExportTaskStudent = (obj) => http.get('/admin/student/exportTaskStudent', { params: obj })

View File

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

View File

@@ -16,7 +16,19 @@
/> />
</div> </div>
<div class="main"> <div class="main">
<div class="endtime">起止时间2022-07-21 14:00 2022-7-30 14:00</div> <div class="endtime">
起止时间{{
projectTaskInfo && projectTaskInfo.startTime
? projectTaskInfo.startTime
: "-"
}}
{{
projectTaskInfo && projectTaskInfo.endTime
? projectTaskInfo.endTime
: "-"
}}
</div>
<div class="search"> <div class="search">
<div class="namecon" style="margin-right: 30px"> <div class="namecon" style="margin-right: 30px">
<div class="name">姓名</div> <div class="name">姓名</div>
@@ -101,9 +113,10 @@
hideOnSinglePage="true" hideOnSinglePage="true"
:pageSize="pageSize" :pageSize="pageSize"
:current="currentPage" :current="currentPage"
:total="tableDataTotal" :total="tableDataTotal2"
class="pagination" class="pagination"
v-if="tableDataTotal > 10" v-if="tableDataTotal2 > 10"
@change="changePaginationStu"
/> />
</div> </div>
</div> </div>
@@ -133,6 +146,7 @@ import CQue from "../CheckQue.vue";
// import EntryScores from "../EntryScores.vue"; // import EntryScores from "../EntryScores.vue";
import EScore from "../ExportScore.vue"; import EScore from "../ExportScore.vue";
// import * as api from "../../../api/index"; // import * as api from "../../../api/index";
import * as api from "../../../api/indexTaskManage";
export default { export default {
name: "ProjectHomeWorkManage", name: "ProjectHomeWorkManage",
components: { components: {
@@ -155,6 +169,12 @@ export default {
type: Number, type: Number,
default: null, default: null,
}, },
projectTaskInfo: {
type: Object,
default: function () {
return {};
},
},
}, },
setup(props, ctx) { setup(props, ctx) {
@@ -189,56 +209,57 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
tableDataTotal: 1, tableDataTotal: -1,
tableDataTotal2: 0, //显示总数
tabledata: [ tabledata: [
{ // {
workNum: "123", // workNum: "123",
userName: "li", // userName: "li",
deptName: "开发", // deptName: "开发",
jobName: "前端开发", // jobName: "前端开发",
score: 89, // score: 89,
group: "-", // group: "-",
comptime: "2022-07-22 14:00:30", // comptime: "2022-07-22 14:00:30",
status: "已完成", // status: "已完成",
}, // },
], ],
tablecolumns: [ tablecolumns: [
{ {
title: "工号", title: "工号",
dataIndex: "workNum", dataIndex: "studentUserNo",
key: "workNum", key: "studentUserNo",
width: 50, width: 50,
align: "left", align: "left",
className: "h head", className: "h head",
}, },
{ {
title: "姓名", title: "姓名",
dataIndex: "userName", dataIndex: "studentName",
key: "userName", key: "studentName",
width: 50, width: 50,
align: "left", align: "left",
className: "h head", className: "h head",
}, },
{ {
title: "所在部门", title: "所在部门",
dataIndex: "deptName", dataIndex: "studentDepartName",
key: "userName", key: "studentDepartName",
width: 60, width: 60,
align: "center", align: "center",
className: "h", className: "h",
}, },
{ {
title: "所在岗位", title: "所在岗位",
dataIndex: "jobName", dataIndex: "studentJobName",
key: "jobName", key: "studentJobName",
width: 60, width: 60,
align: "center", align: "center",
className: "h", className: "h",
}, },
{ {
title: "所属小组", title: "所属小组",
dataIndex: "group", dataIndex: "studentOrgName",
key: "group", key: "studentOrgName",
width: 60, width: 60,
align: "center", align: "center",
className: "h", className: "h",
@@ -332,10 +353,13 @@ export default {
state.projectName = ""; state.projectName = "";
state.selectedRowKeys = []; state.selectedRowKeys = [];
state.currentPage = 1; state.currentPage = 1;
state.tableDataTotal = -1;
state.tableDataTotal2 = 0;
state.tabledata = [];
}; };
const afterVisibleChange = (bol) => { const afterVisibleChange = (bol) => {
if (bol == true) { if (bol == true) {
// getManageList(); getStudent();
} }
}; };
const selectProjectName = (value) => { const selectProjectName = (value) => {
@@ -364,6 +388,84 @@ export default {
state.selectedRowKeys = []; state.selectedRowKeys = [];
}; };
//获取学员
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.status == 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 { return {
...toRefs(state), ...toRefs(state),
selectProjectName, selectProjectName,
@@ -374,6 +476,11 @@ export default {
showEntryScore, showEntryScore,
godie, godie,
clearLine, clearLine,
searchTaskList,
resetTaskList,
changePaginationStu,
exportTaskStu,
}; };
}, },
}; };

View File

@@ -621,7 +621,7 @@
: item.type == '2' : item.type == '2'
? showFace(item.name, item.projectTaskId, item) ? showFace(item.name, item.projectTaskId, item)
: item.type == '4' : item.type == '4'
? showWork(item.name, item.projectTaskId) ? showWork(item.name, item.projectTaskId, item)
: item.type == '5' : item.type == '5'
? showTest(item.name, item.projectTaskId, item) ? showTest(item.name, item.projectTaskId, item)
: item.type == '10' : item.type == '10'
@@ -1102,13 +1102,14 @@
v-model:Fvisible="FaceVisivle" v-model:Fvisible="FaceVisivle"
:projectTaskId="projectTaskId" :projectTaskId="projectTaskId"
:title="showFaceText" :title="showFaceText"
:faceTaskInfo="faceTaskInfo" :projectTaskInfo="projectTaskInfo"
/> />
<!-- 作业管理抽屉 --> <!-- 作业管理抽屉 -->
<ProjectHomeWorkManage <ProjectHomeWorkManage
v-model:Wvisible="Wvisible" v-model:Wvisible="Wvisible"
:projectTaskId="projectTaskId" :projectTaskId="projectTaskId"
:title="showWorkText" :title="showWorkText"
:projectTaskInfo="projectTaskInfo"
/> />
<!-- 考试管理抽屉 --> <!-- 考试管理抽屉 -->
<ProjectExamManage <ProjectExamManage
@@ -2398,7 +2399,7 @@ export default {
showTestText: "", showTestText: "",
//面授传递title //面授传递title
showFaceText: "", showFaceText: "",
faceTaskInfo: null, //面授任务信息 projectTaskInfo: null, //任务信息
//直播、面授传递title //直播、面授传递title
showWorkText: "", showWorkText: "",
//直播、活动页面传递参数 //直播、活动页面传递参数
@@ -2506,7 +2507,7 @@ export default {
.getProjectDetail(objtl) .getProjectDetail(objtl)
.then((res) => { .then((res) => {
if (res.status == 200) { if (res.status == 200) {
console.log("阶段列表", res.data.data.stageList); console.log("阶段列表", res);
for (let i = 0; i < res.data.data.stageList.length; i++) { for (let i = 0; i < res.data.data.stageList.length; i++) {
for ( for (
let k = 0; let k = 0;
@@ -2713,8 +2714,8 @@ export default {
state.FaceVisivle = true; state.FaceVisivle = true;
state.showFaceText = name; state.showFaceText = name;
state.projectTaskId = id; state.projectTaskId = id;
state.faceTaskInfo = item; state.projectTaskInfo = item;
console.log("faceTaskInfo", item); console.log("projectTaskInfo", item);
}; };
const showSubset = () => { const showSubset = () => {
// 随机分组 // 随机分组
@@ -2736,10 +2737,11 @@ export default {
state.showkaoqinText = title; state.showkaoqinText = title;
}; };
//作业管理的抽屉 //作业管理的抽屉
const showWork = (name, id) => { const showWork = (name, id, item) => {
state.Wvisible = true; state.Wvisible = true;
state.showWorkText = name; state.showWorkText = name;
state.projectTaskId = id; state.projectTaskId = id;
state.projectTaskInfo = item;
}; };
//考试管理的抽屉 //考试管理的抽屉
const showTest = (name, id, data) => { const showTest = (name, id, data) => {