|
|
@ -91,7 +91,9 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="实验状态" align="center"> |
|
|
|
<el-table-column label="实验状态" align="center"> |
|
|
|
<template slot-scope="scope" v-if="scope.row.show"> |
|
|
|
<template slot-scope="scope" v-if="scope.row.show"> |
|
|
|
<span>{{ status[scope.row.status] }}</span> |
|
|
|
<span> |
|
|
|
|
|
|
|
{{ status[scope.row.status] }} |
|
|
|
|
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center" width="170"> |
|
|
|
<el-table-column label="操作" align="center" width="170"> |
|
|
@ -126,12 +128,10 @@ export default { |
|
|
|
{ |
|
|
|
{ |
|
|
|
value: "", |
|
|
|
value: "", |
|
|
|
name: "不限" |
|
|
|
name: "不限" |
|
|
|
}, |
|
|
|
}, { |
|
|
|
{ |
|
|
|
|
|
|
|
value: 1, |
|
|
|
value: 1, |
|
|
|
name: "手动发布" |
|
|
|
name: "手动发布" |
|
|
|
}, |
|
|
|
}, { |
|
|
|
{ |
|
|
|
|
|
|
|
value: 2, |
|
|
|
value: 2, |
|
|
|
name: "定时发布" |
|
|
|
name: "定时发布" |
|
|
|
} |
|
|
|
} |
|
|
@ -141,17 +141,14 @@ export default { |
|
|
|
{ |
|
|
|
{ |
|
|
|
value: "", |
|
|
|
value: "", |
|
|
|
name: "不限" |
|
|
|
name: "不限" |
|
|
|
}, |
|
|
|
}, { |
|
|
|
{ |
|
|
|
value: 0, |
|
|
|
value: 1, |
|
|
|
|
|
|
|
name: "待开始" |
|
|
|
name: "待开始" |
|
|
|
}, |
|
|
|
}, { |
|
|
|
{ |
|
|
|
value: 1, |
|
|
|
value: 2, |
|
|
|
|
|
|
|
name: "进行中" |
|
|
|
name: "进行中" |
|
|
|
}, |
|
|
|
}, { |
|
|
|
{ |
|
|
|
value: 2, |
|
|
|
value: 3, |
|
|
|
|
|
|
|
name: "已结束" |
|
|
|
name: "已结束" |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
], |
|
|
@ -160,16 +157,13 @@ export default { |
|
|
|
{ |
|
|
|
{ |
|
|
|
id: "", |
|
|
|
id: "", |
|
|
|
name: "不限" |
|
|
|
name: "不限" |
|
|
|
}, |
|
|
|
}, { |
|
|
|
{ |
|
|
|
|
|
|
|
id: 1, |
|
|
|
id: 1, |
|
|
|
name: "近一个月" |
|
|
|
name: "近一个月" |
|
|
|
}, |
|
|
|
}, { |
|
|
|
{ |
|
|
|
|
|
|
|
id: 3, |
|
|
|
id: 3, |
|
|
|
name: "近三个月" |
|
|
|
name: "近三个月" |
|
|
|
}, |
|
|
|
}, { |
|
|
|
{ |
|
|
|
|
|
|
|
id: 6, |
|
|
|
id: 6, |
|
|
|
name: "近六个月" |
|
|
|
name: "近六个月" |
|
|
|
} |
|
|
|
} |
|
|
@ -250,11 +244,12 @@ export default { |
|
|
|
if (item.countDown > 0) { |
|
|
|
if (item.countDown > 0) { |
|
|
|
item.countDown--; |
|
|
|
item.countDown--; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (item.status === 0 && item.type === 2) { // 待开始-定时发布 |
|
|
|
if (item.status == 0 && item.type == 2) { // 待开始-定时发布 |
|
|
|
item.status = 1; |
|
|
|
item.status = 1; |
|
|
|
item.countDown = (new Date(item.stopTime).getTime() - new Date().getTime()) / 1000; |
|
|
|
item.countDown = (new Date(item.stopTime).getTime() - new Date().getTime()) / 1000; |
|
|
|
} else if (item.status === 1) { |
|
|
|
// } |
|
|
|
item.status = 2; |
|
|
|
} else if (item.status == 1) { |
|
|
|
|
|
|
|
// item.status = 2; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
item.show = true; |
|
|
|
item.show = true; |
|
|
@ -277,25 +272,26 @@ export default { |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.$post(this.api.pageByCondition, data).then(res => { |
|
|
|
this.$post(this.api.pageByCondition, data).then(res => { |
|
|
|
this.listData = res.list; |
|
|
|
this.listData = res.list; |
|
|
|
|
|
|
|
console.log(this.listData) |
|
|
|
this.total = res.total; |
|
|
|
this.total = res.total; |
|
|
|
this.listData.forEach(i => { |
|
|
|
this.listData.forEach(i => { |
|
|
|
i.show = false; |
|
|
|
i.show = false; |
|
|
|
if (i.status === 2) { // 已结束 |
|
|
|
if (i.status == 2) { // 已结束 |
|
|
|
i.countDown = 0; |
|
|
|
i.countDown = 0; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (i.type === 2) { // 定时发布 |
|
|
|
if (i.type == 2) { // 定时发布 |
|
|
|
if (i.status === 0) { |
|
|
|
if (i.status == 0) { |
|
|
|
// 待开始 |
|
|
|
// 待开始 |
|
|
|
i.countDown = (new Date(i.startTime).getTime() - new Date().getTime()) / 1000; // 获得两个日期时间的秒数差 |
|
|
|
i.countDown = (new Date(i.startTime).getTime() - new Date().getTime()) / 1000; // 获得两个日期时间的秒数差 |
|
|
|
} else if (i.status === 1) { |
|
|
|
} else if (i.status == 1) { |
|
|
|
// 进行中 |
|
|
|
// 进行中 |
|
|
|
i.countDown = (new Date(i.stopTime).getTime() - new Date().getTime()) / 1000; |
|
|
|
i.countDown = (new Date(i.stopTime).getTime() - new Date().getTime()) / 1000; |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (i.type === 1) { // 手动发布 |
|
|
|
} else if (i.type == 1) { // 手动发布 |
|
|
|
if (i.status === 0) { |
|
|
|
if (i.status == 0) { |
|
|
|
// 待开始 |
|
|
|
// 待开始 |
|
|
|
i.countDown = 0; |
|
|
|
i.countDown = 0; |
|
|
|
} else if (i.status === 1) { |
|
|
|
} else if (i.status == 1) { |
|
|
|
// 进行中 |
|
|
|
// 进行中 |
|
|
|
i.countDown = (new Date(i.stopTime).getTime() - new Date().getTime()) / 1000; |
|
|
|
i.countDown = (new Date(i.stopTime).getTime() - new Date().getTime()) / 1000; |
|
|
|
} |
|
|
|
} |
|
|
@ -331,10 +327,7 @@ export default { |
|
|
|
this.$router.push(`/achievement/ass?id=${row.id}&classId=${row.classId}&projectId=${row.projectId}&classInfo=${JSON.stringify(row.classInfo)}&experimentalName=${row.experimentalName}&class=${row.experimentalClassName}`); |
|
|
|
this.$router.push(`/achievement/ass?id=${row.id}&classId=${row.classId}&projectId=${row.projectId}&classInfo=${JSON.stringify(row.classInfo)}&experimentalName=${row.experimentalName}&class=${row.experimentalClassName}`); |
|
|
|
}, |
|
|
|
}, |
|
|
|
start(row) { |
|
|
|
start(row) { |
|
|
|
let data = { |
|
|
|
this.$post(`${this.api.enableAssessment}?id=${row.id}`).then(res => { |
|
|
|
id: row.id, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
this.$post(this.api.enableAssessment, data).then(res => { |
|
|
|
|
|
|
|
util.successMsg("启动成功!"); |
|
|
|
util.successMsg("启动成功!"); |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
@ -344,36 +337,32 @@ export default { |
|
|
|
finish(row) { |
|
|
|
finish(row) { |
|
|
|
this.$confirm("确定要提前结束吗?", "提示", { |
|
|
|
this.$confirm("确定要提前结束吗?", "提示", { |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}) |
|
|
|
}).then(() => { |
|
|
|
.then(() => { |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
id: row.id, |
|
|
|
id: row.id, |
|
|
|
endTime: util.formatDate("yyyy-MM-dd hh:mm:ss", new Date()), |
|
|
|
endTime: util.formatDate("yyyy-MM-dd hh:mm:ss", new Date()), |
|
|
|
status: 2 |
|
|
|
status: 2 |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.$post(`${this.api.collectPaper}?id=${row.id}`).then(res => { |
|
|
|
this.$post(`${this.api.collectPaper}?id=${row.id}`).then(res => { |
|
|
|
util.successMsg("提前结束成功!"); |
|
|
|
util.successMsg("提前结束成功!"); |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
console.log(err); |
|
|
|
console.log(err); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
delData(row) { |
|
|
|
delData(row) { |
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}) |
|
|
|
}).then(() => { |
|
|
|
.then(() => { |
|
|
|
this.$post(this.api.deleteAssessment, [row.id]).then(res => { |
|
|
|
this.$post(this.api.deleteAssessment, [row.id]).then(res => { |
|
|
|
util.successMsg("删除成功"); |
|
|
|
util.successMsg("删除成功"); |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
}).catch(res => { |
|
|
|
}).catch(res => { |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
delAllData() { |
|
|
|
delAllData() { |
|
|
|
if (this.multipleSelection.length) { |
|
|
|
if (this.multipleSelection.length) { |
|
|
@ -382,18 +371,16 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}) |
|
|
|
}).then(() => { |
|
|
|
.then(() => { |
|
|
|
this.$post(this.api.deleteAssessment, ids).then(res => { |
|
|
|
this.$post(this.api.deleteAssessment, ids).then(res => { |
|
|
|
this.multipleSelection = []; |
|
|
|
this.multipleSelection = []; |
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
util.successMsg("删除成功"); |
|
|
|
util.successMsg("删除成功"); |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
}).catch(res => { |
|
|
|
}).catch(res => { |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
util.errorMsg("请先选择数据 !"); |
|
|
|
util.errorMsg("请先选择数据 !"); |
|
|
|
} |
|
|
|
} |
|
|
|