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