mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-08 10:26:44 +08:00
--fix bug 考试
This commit is contained in:
@@ -183,15 +183,15 @@ export default {
|
||||
tablecolumns: [
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "studentCode",
|
||||
key: "studentCode",
|
||||
dataIndex: "studentUserNo",
|
||||
key: "studentUserNo",
|
||||
width: 60,
|
||||
align: "center",
|
||||
className: "h head",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.studentCode?text.record.studentCode:"-"}</span>
|
||||
<span> {text.record.studentUserNo?text.record.studentUserNo:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -245,8 +245,8 @@ export default {
|
||||
},
|
||||
{
|
||||
title: "考试次数",
|
||||
dataIndex: "testNumber",
|
||||
key: "testNumber",
|
||||
dataIndex: "num",
|
||||
key: "num",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
@@ -254,15 +254,15 @@ export default {
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.testNumber?text.record.testNumber:"-"}</span>
|
||||
<span> {text.record.num?text.record.num:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "成绩",
|
||||
dataIndex: "score",
|
||||
key: "score",
|
||||
dataIndex: "examinationScore",
|
||||
key: "examinationScore",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
@@ -270,7 +270,7 @@ export default {
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.score?text.record.score:"-"}</span>
|
||||
<span> {text.record.examinationScore?text.record.examinationScore:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -278,8 +278,8 @@ export default {
|
||||
|
||||
{
|
||||
title: "完成时间",
|
||||
dataIndex: "finishedTime",
|
||||
key: "finishedTime",
|
||||
dataIndex: "examinationSubmitTime",
|
||||
key: "examinationSubmitTime",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
@@ -287,27 +287,20 @@ export default {
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.finishedTime?text.record.finishedTime:"-"}</span>
|
||||
<span> {text.record.examinationSubmitTime?text.record.examinationSubmitTime:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "任务状态",
|
||||
dataIndex: "status",
|
||||
key: "status",
|
||||
dataIndex: "finishStatus",
|
||||
key: "finishStatus",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
console.log(text.record.status);
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.status==0||text.record.status==null?"未开始":text.record.status==10?"未通过":"已通过"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
customRender: ({record:{finishStatus}}) => ({1:'通过',2:'未通过'}[finishStatus] || '未开始'),
|
||||
},
|
||||
],
|
||||
loadingData: true
|
||||
@@ -354,40 +347,19 @@ export default {
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
console.log('我是传递的参数',{
|
||||
"chapterId": props.datasource.stageId,
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"studentName": state.name,
|
||||
"status": state.projectName,
|
||||
"targetId": props.datasource.projectId,
|
||||
"taskId": props.datasource.courseId,
|
||||
"type": 1
|
||||
})
|
||||
api.ExamManagementMessage({
|
||||
"chapterId": props.datasource.stageId,
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"studentName": state.name,
|
||||
"status": state.projectName,
|
||||
"targetId": props.datasource.projectId,
|
||||
"taskId": props.datasource.courseId,
|
||||
"type": 1
|
||||
api.AssessmentManagementMessage({
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
currentStageId: props.datasource.stageId,
|
||||
type: 1,
|
||||
pid: props.datasource.projectId,
|
||||
taskId: props.datasource.projectTaskId,
|
||||
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.managementDtoList.length;i++){
|
||||
res.data.data.managementDtoList[i].key = i + 1;
|
||||
newData.push(res.data.data.managementDtoList[i])
|
||||
}
|
||||
state.tabledata = newData;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
state.loadingData = false;
|
||||
console.log('我是处理过后的数据', newData)
|
||||
}
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
state.tabledata = res.data.data.records;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
state.loadingData = false;
|
||||
})
|
||||
}
|
||||
@@ -414,10 +386,9 @@ export default {
|
||||
|
||||
{/* 导出数据 */}
|
||||
function exportData() {
|
||||
console.log(props.datasource)
|
||||
console.log(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?chapterId=${props.datasource.stageId=="0"?"":props.datasource.stageId}&targetId=${props.datasource.projectId}&taskId=${props.datasource.courseId}&type=${2}`)
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?chapterId=${props.datasource.stageId=="0"?"":props.datasource.stageId}&targetId=${props.datasource.projectId}&taskId=${props.datasource.courseId}&type=${2}`)
|
||||
|
||||
// window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?chapterId=${props.datasource.stageId=="0"?"":props.datasource.stageId}&targetId=${props.datasource.projectId}&taskId=${props.datasource.courseId}&type=${2}`)
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}&taskType=${props.datasource.type}`)
|
||||
|
||||
{/* api.ExportExam({
|
||||
"chapterId": props.datasource.chapterId,
|
||||
"targetId": props.datasource.routerId,
|
||||
|
||||
@@ -186,15 +186,15 @@ export default {
|
||||
tablecolumns: [
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "studentCode",
|
||||
key: "studentCode",
|
||||
dataIndex: "studentUserNo",
|
||||
key: "studentUserNo",
|
||||
width: 120,
|
||||
align: "center",
|
||||
className: "h head",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.studentCode?text.record.studentCode:"-"}</span>
|
||||
<span> {text.record.studentUserNo?text.record.studentUserNo:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -263,8 +263,8 @@ export default {
|
||||
},
|
||||
{
|
||||
title: "考试次数",
|
||||
dataIndex: "testNumber",
|
||||
key: "testNumber",
|
||||
dataIndex: "num",
|
||||
key: "num",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
@@ -272,7 +272,7 @@ export default {
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.testNumber?text.record.testNumber:"-"}</span>
|
||||
<span> {text.record.num?text.record.num:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -288,7 +288,7 @@ export default {
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.score?text.record.score:"-"}</span>
|
||||
<span> {text.record.examinationScore?text.record.examinationScore:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -296,8 +296,8 @@ export default {
|
||||
|
||||
{
|
||||
title: "完成时间",
|
||||
dataIndex: "finishedTime",
|
||||
key: "finishedTime",
|
||||
dataIndex: "examinationSubmitTime",
|
||||
key: "examinationSubmitTime",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
@@ -305,27 +305,20 @@ export default {
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.finishedTime?text.record.finishedTime:"-"}</span>
|
||||
<span> {text.record.examinationSubmitTime?text.record.examinationSubmitTime:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "任务状态",
|
||||
dataIndex: "status",
|
||||
key: "status",
|
||||
dataIndex: "finishStatus",
|
||||
key: "finishStatus",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
console.log(text.record.status);
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.status==0||text.record.status==null?"未开始":text.record.status==10?"未通过":"已通过"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
customRender: ({record:{finishStatus}}) => ({1:'通过',2:'未通过'}[finishStatus] || '未开始'),
|
||||
},
|
||||
],
|
||||
loadingData: true
|
||||
@@ -372,40 +365,19 @@ export default {
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
console.log('我是传递的参数',{
|
||||
"chapterId": props.datasource.chapterId,
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"studentName": state.name,
|
||||
"status": state.projectName,
|
||||
"targetId": props.datasource.routerId,
|
||||
"taskId": props.datasource.courseId,
|
||||
"type": 1
|
||||
})
|
||||
api.ExamManagementMessage({
|
||||
"chapterId": props.datasource.chapterId,
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"studentName": state.name,
|
||||
"status": state.projectName,
|
||||
"targetId": props.datasource.routerId,
|
||||
"taskId": props.datasource.courseId,
|
||||
"type": 1
|
||||
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.managementDtoList.length;i++){
|
||||
res.data.data.managementDtoList[i].key = i + 1;
|
||||
newData.push(res.data.data.managementDtoList[i])
|
||||
}
|
||||
state.tabledata = newData;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
state.loadingData = false;
|
||||
console.log('我是处理过后的数据', newData)
|
||||
}
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
state.tabledata = res.data.data.records;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
state.loadingData = false;
|
||||
})
|
||||
}
|
||||
@@ -433,7 +405,9 @@ export default {
|
||||
|
||||
{/* 导出数据 */}
|
||||
function exportData() {
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?chapterId=${props.datasource.chapterId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&type=${1}`)
|
||||
// window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?chapterId=${props.datasource.chapterId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&type=${1}`)
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.routerTaskId}&taskType=${props.datasource.type}`)
|
||||
|
||||
{/* api.ExportExam({
|
||||
"chapterId": props.datasource.chapterId,
|
||||
"targetId": props.datasource.routerId,
|
||||
|
||||
Reference in New Issue
Block a user