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,
};
},
};

View File

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

View File

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