feat:增加学员端面授作业

This commit is contained in:
lixg
2023-01-05 15:55:19 +08:00
parent 0ea1a8de85
commit 421697c0ea
7 changed files with 2091 additions and 1496 deletions

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-04 22:45:31
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-01-05 11:06:02
* @LastEditTime: 2023-01-05 14:22:29
* @FilePath: /fe-manage/src/api/index1.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@@ -159,9 +159,10 @@ export const noticeList = (projectId) =>
// 获取任务学员的信息
export const AssessmentManagementMessage = (obj) => http.get(`/admin/student/getTaskStudent`, { params: obj })
// 考试导出任务学员信息
// 导出任务学员信息
export const exportTaskStudent = (obj) => http.post('/admin/student/exportTaskStudent', obj)
//导出任务作业
export const exportHomeWork = (obj) => http.post('/admin/student/exportHomeWork', obj)
// //面授课批量导入成绩
export const batchImportScore = (offcoursePlanId, obj) =>

View File

@@ -82,7 +82,7 @@
<div class="img2"></div>
<div class="wz">导出数据</div>
</div>
<div class="btn btn2">
<div class="btn btn2" @click="exportHomeWork">
<div class="wz">导出作业</div>
</div>
</div>
@@ -129,8 +129,8 @@
</div>
</div>
<div class="btnn">
<button class="btn1">取消</button>
<button class="btn2">确定</button>
<button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="closeDrawer">确定</button>
</div>
</div>
</a-drawer>
@@ -194,20 +194,20 @@ export default {
projectName: null,
projectNameList: [
{
id: 1,
value: "-1",
id: 0,
value: "0",
label: "未开始",
},
{
id: 2,
value: "0",
label: "未完成",
},
{
id: 3,
id: 1,
value: "1",
label: "已完成",
},
{
id: 2,
value: "2",
label: "未完成",
},
],
selectedRowKeys: [],
@@ -362,11 +362,26 @@ export default {
},
{
title: "任务状态",
dataIndex: "status",
key: "status",
dataIndex: "finishStatus",
key: "finishStatus",
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.finishStatus == 0
? "未开始"
: text.record.finishStatus == 1
? "已完成"
: text.record.finishStatus == 2
? "未完成"
: "-"}
</span>
</div>
);
},
},
{
title: "操作",
@@ -382,7 +397,7 @@ export default {
const ListOpera = () => {
let arr = state.tabledata;
arr.map((value) => {
if (value.status == "已完成") {
if (value.finishStatus == 1) {
value.operation = (
<div
style={{
@@ -443,7 +458,6 @@ export default {
}
});
};
ListOpera();
const closeDrawer = () => {
ctx.emit("update:Fvisible", false);
state.name = "";
@@ -463,9 +477,9 @@ export default {
state.projectName = value;
};
const onSelectChange = (selectedRowKeys) => {
if (selectedRowKeys.length > 2) {
return;
}
// if (selectedRowKeys.length > 2) {
// return;
// }
state.selectedRowKeys = selectedRowKeys;
};
@@ -493,7 +507,7 @@ export default {
currentStageId: props.projectTaskInfo.stageId,
type: 1,
pid: props.projectTaskInfo.projectId,
status: state.projectName,
status: Number(state.projectName),
studentName: state.name,
currentTaskId: props.projectTaskInfo.projectTaskId,
});
@@ -504,14 +518,21 @@ export default {
currentStageId: props.projectTaskInfo.stageId,
type: 1,
pid: props.projectTaskInfo.projectId,
status: state.projectName,
status: Number(state.projectName),
studentName: state.name,
currentTaskId: props.projectTaskInfo.projectTaskId,
taskType: props.projectTaskInfo.type,
})
.then((res) => {
console.log("获取面授管理学员", res);
if (res.data.code == 200) {
state.tabledata = res.data.data.records;
let newData = [];
for (let i = 0; i < res.data.data.records.length; i++) {
res.data.data.records[i].key = res.data.data.records[i].id;
newData.push(res.data.data.records[i]);
}
state.tabledata = newData;
ListOpera();
state.tableDataTotal = res.data.data.total;
state.tableDataTotal2 = res.data.data.total;
}
@@ -547,21 +568,44 @@ export default {
// 导出数据
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);
});
console.log("props.projectTaskInfo", props.projectTaskInfo);
window.open(
`${
process.env.VUE_APP_PROXY_URL
}admin/student/exportTaskStudent?currentStageId=${
props.projectTaskInfo.stageId
}&type=${1}&pid=${props.projectTaskInfo.projectId}&taskId=${
props.projectTaskInfo.projectTaskId
}&taskType=${props.projectTaskInfo.type}`
);
// 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);
// });
}
//导出作业
function exportHomeWork() {
console.log("props.projectTaskInfo", props.projectTaskInfo);
window.open(
`${
process.env.VUE_APP_PROXY_URL
}admin/student/exportHomeWork?currentStageId=${
props.projectTaskInfo.stageId
}&type=${1}&pid=${props.projectTaskInfo.projectId}&taskId=${
props.projectTaskInfo.projectTaskId
}&taskType=${props.projectTaskInfo.type}`
);
}
return {
...toRefs(state),
@@ -577,6 +621,7 @@ export default {
resetTaskList,
changePaginationStu,
exportTaskStu,
exportHomeWork,
};
},
};

View File

@@ -68,11 +68,11 @@
</div>
</div>
<div class="btnss" style="margin-top: 20px">
<div class="btn btn2">
<div class="btn btn2" @click="exportTaskStu">
<div class="img2"></div>
<div class="wz">导出数据</div>
</div>
<div class="btn btn2">
<div class="btn btn2" @click="exportHomeWork">
<div class="wz">导出作业</div>
</div>
<div class="btn btn2">
@@ -189,20 +189,20 @@ export default {
projectName: null,
projectNameList: [
{
id: 1,
value: "-1",
id: 0,
value: "0",
label: "未开始",
},
{
id: 2,
value: "0",
label: "未完成",
},
{
id: 3,
id: 1,
value: "1",
label: "已完成",
},
{
id: 2,
value: "2",
label: "未完成",
},
],
selectedRowKeys: [],
@@ -231,6 +231,15 @@ export default {
width: 50,
align: "left",
className: "h head",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.studentUserNo ? text.record.studentUserNo : "-"}
</span>
</div>
);
},
},
{
title: "姓名",
@@ -239,6 +248,15 @@ export default {
width: 50,
align: "left",
className: "h head",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.studentName ? text.record.studentName : "-"}
</span>
</div>
);
},
},
{
title: "所在部门",
@@ -247,6 +265,17 @@ export default {
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.studentDepartName
? text.record.studentDepartName
: "-"}
</span>
</div>
);
},
},
{
title: "所在岗位",
@@ -255,6 +284,17 @@ export default {
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.studentJobName
? text.record.studentJobName
: "-"}
</span>
</div>
);
},
},
{
title: "所属小组",
@@ -263,31 +303,77 @@ export default {
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.studentOrgName
? text.record.studentOrgName
: "-"}
</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: "comptime",
key: "comptime",
dataIndex: "lastStudyTime",
key: "lastStudyTime",
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.lastStudyTime ? text.record.lastStudyTime : "-"}
</span>
</div>
);
},
},
{
title: "任务状态",
dataIndex: "status",
key: "status",
dataIndex: "finishStatus",
key: "finishStatus",
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.finishStatus == 0
? "未开始"
: text.record.finishStatus == 1
? "已完成"
: text.record.finishStatus == 2
? "未完成"
: "-"}
</span>
</div>
);
},
},
{
title: "操作",
@@ -303,7 +389,7 @@ export default {
const ListOpera = () => {
let arr = state.tabledata;
arr.map((value) => {
if (value.status == "已完成") {
if (value.finishStatus == 1) {
value.operation = (
<div
style={{
@@ -346,7 +432,6 @@ export default {
}
});
};
ListOpera();
const closeDrawer = () => {
ctx.emit("update:Wvisible", false);
state.name = "";
@@ -366,9 +451,9 @@ export default {
state.projectName = value;
};
const onSelectChange = (selectedRowKeys) => {
if (selectedRowKeys.length > 2) {
return;
}
// if (selectedRowKeys.length > 2) {
// return;
// }
state.selectedRowKeys = selectedRowKeys;
};
@@ -396,9 +481,10 @@ export default {
currentStageId: props.projectTaskInfo.stageId,
type: 1,
pid: props.projectTaskInfo.projectId,
status: state.projectName,
status: Number(state.projectName),
studentName: state.name,
currentTaskId: props.projectTaskInfo.projectTaskId,
taskType: props.projectTaskInfo.type,
});
api
.AssessmentManagementMessage({
@@ -407,14 +493,21 @@ export default {
currentStageId: props.projectTaskInfo.stageId,
type: 1,
pid: props.projectTaskInfo.projectId,
status: state.projectName,
status: Number(state.projectName),
studentName: state.name,
currentTaskId: props.projectTaskInfo.projectTaskId,
taskType: props.projectTaskInfo.type,
})
.then((res) => {
console.log(res);
if (res.status == 200) {
state.tabledata = res.data.data.records;
if (res.data.code == 200) {
let newData = [];
for (let i = 0; i < res.data.data.records.length; i++) {
res.data.data.records[i].key = res.data.data.records[i].id;
newData.push(res.data.data.records[i]);
}
state.tabledata = newData;
ListOpera();
state.tableDataTotal = res.data.data.total;
state.tableDataTotal2 = res.data.data.total;
}
@@ -450,21 +543,43 @@ export default {
// 导出数据
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);
});
window.open(
`${
process.env.VUE_APP_PROXY_URL
}admin/student/exportTaskStudent?currentStageId=${
props.projectTaskInfo.stageId
}&type=${1}&pid=${props.projectTaskInfo.projectId}&taskId=${
props.projectTaskInfo.projectTaskId
}&taskType=${props.projectTaskInfo.type}`
);
// 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);
// });
}
//导出作业
function exportHomeWork() {
console.log("props.projectTaskInfo", props.projectTaskInfo);
window.open(
`${
process.env.VUE_APP_PROXY_URL
}admin/student/exportHomeWork?currentStageId=${
props.projectTaskInfo.stageId
}&type=${1}&pid=${props.projectTaskInfo.projectId}&taskId=${
props.projectTaskInfo.projectTaskId
}&taskType=${props.projectTaskInfo.type}`
);
}
return {
...toRefs(state),
@@ -481,6 +596,7 @@ export default {
resetTaskList,
changePaginationStu,
exportTaskStu,
exportHomeWork,
};
},
};

View File

@@ -17,7 +17,13 @@
/>
</div>
<div class="main">
<div class="endtime">起止时间2022-07-21 14:00 2022-7-30 14:00</div>
<div class="endtime">
起止时间{{
datasource && datasource.startTime ? datasource.startTime : "-"
}}
{{ datasource && datasource.endTime ? datasource.endTime : "-" }}
</div>
<div class="search">
<div class="namecon" style="margin-right: 30px">
<div class="name">姓名</div>
@@ -67,11 +73,11 @@
<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>
<div class="btn btn2">
<div class="btn btn2" @click="exportHomeWork">
<div class="wz">导出作业</div>
</div>
</div>
@@ -83,7 +89,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>
@@ -112,13 +118,14 @@
:total="tableDataTotal"
class="pagination"
v-if="tableDataTotal > 10"
@change="changePaginationStu"
/>
</div>
</div>
</div>
<div class="btnn">
<button class="btn1">取消</button>
<button class="btn2">确定</button>
<button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="closeDrawer">确定</button>
</div>
</div>
</a-drawer>
@@ -140,6 +147,7 @@
import CQue from "../CheckQue.vue";
import EntryScores from "../EntryScores.vue";
// import * as api from "../../../api/index";
import * as api from "../../../api/index1";
export default {
name: "RouterFaceTeachManage",
components: {
@@ -181,111 +189,211 @@
projectName: null,
projectNameList: [
{
id: 1,
value: "-1",
id: 0,
value: "0",
label: "未开始",
},
{
id: 2,
value: "0",
label: "未完成",
},
{
id: 3,
id: 1,
value: "1",
label: "已完成",
},
{
id: 2,
value: "2",
label: "未完成",
},
],
selectedRowKeys: [],
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: "level",
key: "level",
dataIndex: "chapterName",
key: "chapterName",
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.chapterName ? text.record.chapterName : "-"}
</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: "任务状态",
dataIndex: "status",
key: "status",
dataIndex: "finishStatus",
key: "finishStatus",
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.finishStatus == 0
? "未开始"
: text.record.finishStatus == 1
? "已完成"
: text.record.finishStatus == 2
? "未完成"
: "-"}
</span>
</div>
);
},
},
{
title: "操作",
@@ -301,7 +409,7 @@
const ListOpera = () => {
let arr = state.tabledata;
arr.map((value) => {
if (value.status == "已完成") {
if (value.finishStatus == 1) {
value.operation = (
<div
style={{
@@ -362,27 +470,28 @@
}
});
};
ListOpera();
const closeDrawer = () => {
ctx.emit("update:FaceTeachModelVisible", false);
state.name = "";
state.projectName = "";
state.selectedRowKeys = [];
state.currentPage = 1;
state.tableDataTotal = -1;
state.tableDataTotal2 = 0;
state.tabledata = [];
};
const afterVisibleChange = (bol) => {
if (bol == true) {
getData();
getStudent();
}
};
const selectProjectName = (value) => {
state.projectName = value;
};
const onSelectChange = (selectedRowKeys) => {
if (selectedRowKeys.length > 2) {
return;
}
// if (selectedRowKeys.length > 2) {
// return;
// }
state.selectedRowKeys = selectedRowKeys;
};
@@ -403,21 +512,115 @@
};
// 获取数据
function getData() {
state.tabledata = [
{
workNum: "123",
userName: "li",
deptName: "开发",
jobName: "前端开发",
score: 89,
exam: 98,
testscore: 80,
status: "已完成",
},
]
//获取学员
const getStudent = () => {
console.log("我是传递的查询参数", {
pageNo: state.currentPage,
pageSize: state.pageSize,
currentStageId: props.datasource.chapterId,
type: 2,
pid: props.datasource.routerId,
taskId: props.datasource.routerTaskId,
taskType: props.datasource.type,
status: state.projectName,
studentName: state.name,
});
api
.AssessmentManagementMessage({
pageNo: state.currentPage,
pageSize: state.pageSize,
currentStageId: props.datasource.chapterId,
type: 2,
pid: props.datasource.routerId,
taskId: props.datasource.routerTaskId,
taskType: props.datasource.type,
status: state.projectName,
studentName: state.name,
})
.then((res) => {
console.log("获取面授管理学员", res);
if (res.data.code == 200) {
let newData = [];
for (let i = 0; i < res.data.data.records.length; i++) {
res.data.data.records[i].key = res.data.data.records[i].id;
newData.push(res.data.data.records[i]);
}
state.tabledata = newData;
ListOpera();
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() {
console.log("props.datasource", props.datasource);
window.open(
`${
process.env.VUE_APP_PROXY_URL
}admin/student/exportTaskStudent?currentStageId=${
props.datasource.chapterId
}&type=${2}&pid=${props.datasource.routerId}&taskId=${
props.datasource.routerTaskId
}&taskType=${props.datasource.type}`
);
// api
// .exportTaskStudent({
// pageNo: state.currentPage,
// pageSize: state.pageSize,
// currentStageId: props.datasource.stageId,
// currentTaskId: props.datasource.projectTaskId,
// type: 1,
// pid: props.datasource.projectId,
// })
// .then((res) => {
// console.log(res);
// })
// .catch((err) => {
// console.log(err);
// });
}
//导出作业
function exportHomeWork() {
console.log("props.datasource", props.datasource);
window.open(
`${
process.env.VUE_APP_PROXY_URL
}admin/student/exportHomeWork?currentStageId=${
props.datasource.chapterId
}&type=${2}&pid=${props.datasource.routerId}&taskId=${
props.datasource.routerTaskId
}&taskType=${props.datasource.type}`
);
}
return {
...toRefs(state),
selectProjectName,
@@ -428,6 +631,11 @@
showEntryScore,
godie,
clearLine,
searchTaskList,
resetTaskList,
changePaginationStu,
exportTaskStu,
exportHomeWork,
};
},
};

View File

@@ -17,7 +17,13 @@
/>
</div>
<div class="main">
<div class="endtime">起止时间2022-07-21 14:00 2022-7-30 14:00</div>
<div class="endtime">
起止时间{{
datasource && datasource.startTime ? datasource.startTime : "-"
}}
{{ datasource && datasource.endTime ? datasource.endTime : "-" }}
</div>
<div class="search">
<div class="namecon" style="margin-right: 30px">
<div class="name">姓名</div>
@@ -57,11 +63,11 @@
</div>
</div>
<div class="btnss" style="margin-top: 20px">
<div class="btn btn2">
<div class="btn btn2" @click="exportTaskStu">
<div class="img2"></div>
<div class="wz">导出数据</div>
</div>
<div class="btn btn2">
<div class="btn btn2" @click="exportHomeWork">
<div class="wz">导出作业</div>
</div>
<div class="btn btn2">
@@ -105,13 +111,14 @@
:total="tableDataTotal"
class="pagination"
v-if="tableDataTotal > 10"
@change="changePaginationStu"
/>
</div>
</div>
</div>
<div class="btnn">
<button class="btn1">取消</button>
<button class="btn2">确定</button>
<button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="closeDrawer">确定</button>
</div>
</div>
</a-drawer>
@@ -134,6 +141,7 @@
// import EntryScores from "../EntryScores.vue";
import EScore from "../ExportScore.vue";
// import * as api from "../../../api/index";
import * as api from "../../../api/index1";
export default {
name: "RouterCommonManage",
components: {
@@ -176,112 +184,207 @@
projectName: null,
projectNameList: [
{
id: 1,
value: "-1",
id: 0,
value: "0",
label: "未开始",
},
{
id: 2,
value: "0",
label: "未完成",
},
{
id: 3,
id: 1,
value: "1",
label: "已完成",
},
{
id: 2,
value: "2",
label: "未完成",
},
],
selectedRowKeys: [],
pageNo: 1,
pageSize: 10,
currentPage: 1,
tableDataTotal: 1,
tableDataTotal: -1,
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",
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: "level",
key: "level",
dataIndex: "chapterName",
key: "chapterName",
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.chapterName ? text.record.chapterName : "-"}
</span>
</div>
);
},
},
{
title: "所属小组",
dataIndex: "group",
key: "group",
dataIndex: "studentOrgName",
key: "studentOrgName",
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.studentOrgName
? text.record.studentOrgName
: "-"}
</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: "comptime",
key: "comptime",
dataIndex: "lastStudyTime",
key: "lastStudyTime",
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.lastStudyTime ? text.record.lastStudyTime : "-"}
</span>
</div>
);
},
},
{
title: "任务状态",
dataIndex: "status",
key: "status",
dataIndex: "finishStatus",
key: "finishStatus",
width: 60,
align: "center",
className: "h",
customRender: (text) => {
return (
<div class="racona">
<span>
{text.record.finishStatus == 0
? "未开始"
: text.record.finishStatus == 1
? "已完成"
: text.record.finishStatus == 2
? "未完成"
: "-"}
</span>
</div>
);
},
},
{
title: "操作",
@@ -297,7 +400,7 @@
const ListOpera = () => {
let arr = state.tabledata;
arr.map((value) => {
if (value.status == "已完成") {
if (value.finishStatus == 1) {
value.operation = (
<div
style={{
@@ -340,27 +443,28 @@
}
});
};
ListOpera();
const closeDrawer = () => {
ctx.emit("update:HomeworkModelVisible", false);
state.name = "";
state.projectName = "";
state.selectedRowKeys = [];
state.currentPage = 1;
state.tableDataTotal = -1;
state.tabledata = [];
};
const afterVisibleChange = (bol) => {
if (bol == true) {
getData();
getStudent();
}
};
const selectProjectName = (value) => {
state.projectName = value;
};
const onSelectChange = (selectedRowKeys) => {
if (selectedRowKeys.length > 2) {
return;
}
// if (selectedRowKeys.length > 2) {
// return;
// }
state.selectedRowKeys = selectedRowKeys;
};
@@ -380,20 +484,110 @@
state.selectedRowKeys = [];
};
// 获取数据
function getData() {
state.tabledata = [
{
workNum: "123",
userName: "li",
deptName: "开发",
jobName: "前端开发",
score: 89,
group: "-",
comptime: "2022-07-22 14:00:30",
status: "已完成",
},
]
//获取学员
const getStudent = () => {
console.log("我是传递的查询参数", {
pageNo: state.currentPage,
pageSize: state.pageSize,
currentStageId: props.datasource.chapterId,
type: 2,
pid: props.datasource.routerId,
taskId: props.datasource.routerTaskId,
taskType: props.datasource.type,
status: state.projectName,
studentName: state.name,
});
api
.AssessmentManagementMessage({
pageNo: state.currentPage,
pageSize: state.pageSize,
currentStageId: props.datasource.chapterId,
type: 2,
pid: props.datasource.routerId,
taskId: props.datasource.routerTaskId,
taskType: props.datasource.type,
status: state.projectName,
studentName: state.name,
})
.then((res) => {
console.log("获取作业管理学员", res);
if (res.data.code == 200) {
let newData = [];
for (let i = 0; i < res.data.data.records.length; i++) {
res.data.data.records[i].key = res.data.data.records[i].id;
newData.push(res.data.data.records[i]);
}
state.tabledata = newData;
ListOpera();
state.tableDataTotal = res.data.data.total;
}
})
.catch((err) => {
console.log(err);
state.tabledata = [];
});
};
//搜索学员
const searchTaskList = () => {
state.currentPage = 1;
state.tableDataTotal = -1;
getStudent();
};
// 重置按钮
function resetTaskList() {
state.currentPage = 1;
state.name = "";
state.projectName = "";
state.tableDataTotal = -1;
getStudent();
}
//分页
const changePaginationStu = (page) => {
state.currentPage = page;
state.tableDataTotal = -1;
getStudent();
};
// 导出数据
function exportTaskStu() {
console.log("props.datasource", props.datasource);
window.open(
`${
process.env.VUE_APP_PROXY_URL
}admin/student/exportTaskStudent?currentStageId=${
props.datasource.chapterId
}&type=${2}&pid=${props.datasource.routerId}&taskId=${
props.datasource.routerTaskId
}&taskType=${props.datasource.type}`
);
// api
// .exportTaskStudent({
// pageNo: state.currentPage,
// pageSize: state.pageSize,
// currentStageId: props.datasource.stageId,
// currentTaskId: props.datasource.projectTaskId,
// type: 1,
// pid: props.datasource.projectId,
// })
// .then((res) => {
// console.log(res);
// })
// .catch((err) => {
// console.log(err);
// });
}
//导出作业
function exportHomeWork() {
console.log("props.datasource", props.datasource);
window.open(
`${
process.env.VUE_APP_PROXY_URL
}admin/student/exportHomeWork?currentStageId=${
props.datasource.chapterId
}&type=${2}&pid=${props.datasource.routerId}&taskId=${
props.datasource.routerTaskId
}&taskType=${props.datasource.type}`
);
}
return {
@@ -406,6 +600,11 @@
showEntryScore,
godie,
clearLine,
searchTaskList,
resetTaskList,
changePaginationStu,
exportTaskStu,
exportHomeWork,
};
},
};

View File

@@ -1491,7 +1491,6 @@
</div>
</div>
<div class="cstm_items">
<div class="signbox">
<div class="sign">
@@ -1510,8 +1509,6 @@
</div>
</div>
<div class="cstm_items">
<div class="signbox">
<span style="margin-right: 3px">报名设置</span>
@@ -6034,8 +6031,6 @@ export default defineComponent({
}
}
.items_fj {
margin-bottom: 1px;
.fujian {
@@ -6989,8 +6984,6 @@ export default defineComponent({
}
}
}
}
}

View File

@@ -440,9 +440,11 @@
/>
<span class="progresstext" style="margin-left: 10px"
>{{
item.totalStuNum == 0 ? 0 :
item.finishStuNum == 0 ? 0 :
parseInt(
item.totalStuNum == 0
? 0
: item.finishStuNum == 0
? 0
: parseInt(
(item.finishStuNum / item.totalStuNum) * 100
)
}}%</span
@@ -473,6 +475,12 @@
>
考勤
</div>
<div
class="operation"
v-if="
item.type != 2 && item.type != 6 && item.type != 9
"
></div>
<div
class="operation"
style="cursor: pointer"
@@ -1102,23 +1110,46 @@
<!-- 二维码弹窗 -->
<!-- 面授管理抽屉 开始 -->
<router-face-teach-manage v-model:FaceTeachModelVisible="faceTeachModelVisible" :title="faceTeachModelVisibleTitle" :datasource="faceData" />
<router-face-teach-manage
v-model:FaceTeachModelVisible="faceTeachModelVisible"
:title="faceTeachModelVisibleTitle"
:datasource="faceData"
/>
<!-- 面授管理抽屉 结束-->
<!-- 考试管理抽屉 开始-->
<router-examination-manage v-model:ExaminationModelVisible="examinationModelVisible" :title="examinationModelVisibleTitle" :datasource="examinationData" :levelName="examLevelName"/>
<router-examination-manage
v-model:ExaminationModelVisible="examinationModelVisible"
:title="examinationModelVisibleTitle"
:datasource="examinationData"
:levelName="examLevelName"
/>
<!-- 考试管理抽屉 结束-->
<!-- 测评管理抽屉 开始-->
<router-evaluation-manage v-model:EvaluationModelVisible="evaluationModelVisible" :title="evaluationModelVisibleTitle" :datasource="evaluationData" :levelName="evaluationLevelName" />
<router-evaluation-manage
v-model:EvaluationModelVisible="evaluationModelVisible"
:title="evaluationModelVisibleTitle"
:datasource="evaluationData"
:levelName="evaluationLevelName"
/>
<!-- 测评管理抽屉 结束-->
<!-- 作业管理抽屉 开始-->
<router-homework-manage v-model:HomeworkModelVisible="homeworkModelVisible" :title="homeworkModelVisibleTitle" :datasource="homeworkData" />
<router-homework-manage
v-model:HomeworkModelVisible="homeworkModelVisible"
:title="homeworkModelVisibleTitle"
:datasource="homeworkData"
/>
<!-- 作业管理抽屉 结束-->
<!-- 公共管理抽屉 开始-->
<router-common-manage v-model:CommonModelVisible="commonModelVisible" :title="commonModelVisibleTitle" :datasource="commonData" :levelName="commonLevelName" />
<router-common-manage
v-model:CommonModelVisible="commonModelVisible"
:title="commonModelVisibleTitle"
:datasource="commonData"
:levelName="commonLevelName"
/>
<!-- 公共管理抽屉 结束-->
</div>
</template>
@@ -1178,7 +1209,7 @@ export default {
RouterExaminationManage,
RouterEvaluationManage,
RouterHomeworkManage,
RouterCommonManage
RouterCommonManage,
},
setup() {
const router = useRouter();
@@ -1350,20 +1381,20 @@ export default {
evaluationModelVisible: false,
homeworkModelVisible: false,
commonModelVisible: false,
faceTeachModelVisibleTitle: '',
examinationModelVisibleTitle: '',
evaluationModelVisibleTitle: '',
homeworkModelVisibleTitle: '',
commonModelVisibleTitle: '',
faceTeachModelVisibleTitle: "",
examinationModelVisibleTitle: "",
evaluationModelVisibleTitle: "",
homeworkModelVisibleTitle: "",
commonModelVisibleTitle: "",
faceData: '',
examinationData: '',
evaluationData: '',
homeworkData: '',
commonData: '',
commonLevelName: '',
examLevelName: '',
evaluationLevelName: ''
faceData: "",
examinationData: "",
evaluationData: "",
homeworkData: "",
commonData: "",
commonLevelName: "",
examLevelName: "",
evaluationLevelName: "",
});
const levelList = reactive({
@@ -1631,47 +1662,47 @@ export default {
// 面授课点击管理弹框
const faceTeachModel = (data) => {
console.log(data)
console.log(data);
state.faceTeachModelVisible = true;
state.faceTeachModelVisibleTitle = data.name;
state.faceData = data;
// 面授课弹框名称 RouterFaceTeachManage
}
};
// 考试点击管理弹框
const examinationModel = (data, levelname) => {
console.log(data)
console.log(data);
state.examLevelName = levelname;
state.examinationModelVisible = true;
state.examinationModelVisibleTitle = data.name;
state.examinationData = data;
// 考试弹框名称 RouterExaminationManage
}
};
// 测评点击管理弹框
const evaluationModel = (data, levelname) => {
console.log(data)
console.log(data);
state.evaluationLevelName = levelname;
state.evaluationModelVisible = true;
state.evaluationModelVisibleTitle = data.name;
state.evaluationData = data;
// 测评弹框名称 RouterEvaluationManage
}
};
// 作业点击管理弹框
const homeworkModel = (data) => {
console.log(data)
console.log(data);
state.homeworkModelVisible = true;
state.homeworkModelVisibleTitle = data.name;
state.homeworkData = data;
// 作业弹框名称 RouterHomeworkManage
}
};
// 在线、案例、外链、评估、直播、活动点击管理弹框
const commonModel = (data, levelname) => {
state.commonLevelName = levelname;
console.log(data)
console.log(data);
state.commonModelVisible = true;
state.commonModelVisibleTitle = data.name;
state.commonData = data;
// 公共模块弹框名称 RouterCommonManage
}
};
//学员管理------------------------------------------------
//获取学员列表
@@ -2366,7 +2397,7 @@ export default {
examinationModel,
evaluationModel,
homeworkModel,
commonModel
commonModel,
};
},
};
@@ -3940,7 +3971,7 @@ export default {
.operations {
display: flex;
width: 200px;
width: 240px;
//flex-grow: 1;
.operation {
@@ -3948,6 +3979,8 @@ export default {
font-size: 14px;
padding: 10px;
margin-left: auto;
width: 63px;
text-align: center;
}
}
}