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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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,113 +6031,111 @@ export default defineComponent({
}
}
.items_fj {
margin-bottom: 1px;
.fujian{
display: none;
}
.mbl_items12 {
width: 440px;
margin-right:56px;
.fujian {
display: none;
}
.mbl_items12 {
width: 440px;
margin-right: 56px;
.i12_box1 {
display: flex;
align-items: center;
padding: 17px 0px 17px 21px;
border: 1px solid #eff4fc;
border-radius: 8px;
margin-bottom: 10px;
.i12_box1 {
display: flex;
align-items: center;
padding: 17px 0px 17px 21px;
border: 1px solid #eff4fc;
border-radius: 8px;
margin-bottom: 10px;
.file_img {
width: 27px;
height: 32px;
background-image: url(@/assets/images/coursewareManage/imgs.png);
margin-right: 22px;
.file_img {
width: 27px;
height: 32px;
background-image: url(@/assets/images/coursewareManage/imgs.png);
margin-right: 22px;
img {
width: 100%;
height: 100%;
}
}
img {
width: 100%;
height: 100%;
}
}
.file_detail {
width: 250px;
margin-right: 21px;
.file_detail {
width: 250px;
margin-right: 21px;
.file_updata {
display: flex;
align-items: center;
.file_updata {
display: flex;
align-items: center;
.updatabox {
position: relative;
width: 230px;
height: 5px;
background-color: rgba(192, 192, 192, 0.25);
border-radius: 3px;
.updatabox {
position: relative;
width: 230px;
height: 5px;
background-color: rgba(192, 192, 192, 0.25);
border-radius: 3px;
.updatacolor {
position: absolute;
left: 0;
width: 100%;
height: 5px;
background-color: #57c887;
border-radius: 3px;
}
.updatacolor {
position: absolute;
left: 0;
width: 100%;
height: 5px;
background-color: #57c887;
border-radius: 3px;
}
.updatacolor2 {
position: absolute;
left: 0;
width: 80%;
height: 5px;
background-color: #ff7474;
border-radius: 3px;
}
.updatacolor2 {
position: absolute;
left: 0;
width: 80%;
height: 5px;
background-color: #ff7474;
border-radius: 3px;
}
.updatacolor3 {
position: absolute;
left: 0;
width: 60%;
height: 5px;
background-color: #4ea6ff;
border-radius: 3px;
}
.updatacolor3 {
position: absolute;
left: 0;
width: 60%;
height: 5px;
background-color: #4ea6ff;
border-radius: 3px;
}
.updataxq {
position: absolute;
right: 2px;
top: -30px;
color: #57c887;
}
.updataxq {
position: absolute;
right: 2px;
top: -30px;
color: #57c887;
}
.updataxq2 {
position: absolute;
right: 2px;
top: -30px;
color: #ff7474;
}
.updataxq2 {
position: absolute;
right: 2px;
top: -30px;
color: #ff7474;
}
.updataxq3 {
position: absolute;
right: 2px;
top: -30px;
color: #4ea6ff;
}
}
}
}
.updataxq3 {
position: absolute;
right: 2px;
top: -30px;
color: #4ea6ff;
}
}
}
}
.file_operation {
display: flex;
.file_operation {
display: flex;
.fobox {
margin-right: 5px;
cursor: pointer;
}
}
}
}
.fobox {
margin-right: 5px;
cursor: pointer;
}
}
}
}
}
.items_btn {
@@ -6989,8 +6984,6 @@ export default defineComponent({
}
}
}
}
}

View File

@@ -440,11 +440,13 @@
/>
<span class="progresstext" style="margin-left: 10px"
>{{
item.totalStuNum == 0 ? 0 :
item.finishStuNum == 0 ? 0 :
parseInt(
(item.finishStuNum / item.totalStuNum) * 100
)
item.totalStuNum == 0
? 0
: item.finishStuNum == 0
? 0
: parseInt(
(item.finishStuNum / item.totalStuNum) * 100
)
}}%</span
>
</div>
@@ -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;
}
}
}