|
@@ -206,6 +206,7 @@ export default {
|
|
|
themeColor,
|
|
themeColor,
|
|
|
evalExamList: [],
|
|
evalExamList: [],
|
|
|
coderExamList: [],
|
|
coderExamList: [],
|
|
|
|
|
+ courseName: "",
|
|
|
|
|
|
|
|
//create Coder exam
|
|
//create Coder exam
|
|
|
coderExamDialog: false,
|
|
coderExamDialog: false,
|
|
@@ -264,10 +265,6 @@ export default {
|
|
|
isStudent() {
|
|
isStudent() {
|
|
|
return this.$store.getters.isStudent;
|
|
return this.$store.getters.isStudent;
|
|
|
},
|
|
},
|
|
|
- courseName() {
|
|
|
|
|
- const res = this.$apis.getCourseById(this.courseId);
|
|
|
|
|
- return res.data.data.name;
|
|
|
|
|
- },
|
|
|
|
|
problemTypeOptions() {
|
|
problemTypeOptions() {
|
|
|
return problemTypeOptions(true);
|
|
return problemTypeOptions(true);
|
|
|
},
|
|
},
|
|
@@ -278,6 +275,8 @@ export default {
|
|
|
methods: {
|
|
methods: {
|
|
|
async init() {
|
|
async init() {
|
|
|
const _this = this;
|
|
const _this = this;
|
|
|
|
|
+ _this.coderExamForm.course = _this.coderId;
|
|
|
|
|
+ _this.courseName = (await _this.$apis.getCourseById(_this.courseId)).data.data.name || "";
|
|
|
if (_this.isTeacher) {
|
|
if (_this.isTeacher) {
|
|
|
if (_this.evalId !== null) {
|
|
if (_this.evalId !== null) {
|
|
|
_this.evalExamList = (await _this.$apis.getTeacherEvalExamsByCourseId(_this.evalId)).data.data || [];
|
|
_this.evalExamList = (await _this.$apis.getTeacherEvalExamsByCourseId(_this.evalId)).data.data || [];
|
|
@@ -370,23 +369,9 @@ export default {
|
|
|
window.open(url + "?id_token=" + this.$store.state.user.token);
|
|
window.open(url + "?id_token=" + this.$store.state.user.token);
|
|
|
},
|
|
},
|
|
|
// 创建Coder考试的Dialog
|
|
// 创建Coder考试的Dialog
|
|
|
- handleExamFormCancel(done) {
|
|
|
|
|
- //关闭dialog的提示
|
|
|
|
|
- ElMessageBox.confirm("是否确认退出?退出后将不保存表格信息。", "提示", {
|
|
|
|
|
- confirmButtonText: "确认退出",
|
|
|
|
|
- cancelButtonText: "我再想想",
|
|
|
|
|
- type: "warning",
|
|
|
|
|
- center: true,
|
|
|
|
|
- })
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- this.coderExamDialog = false;
|
|
|
|
|
- // this.clearForm();
|
|
|
|
|
- //TODO 清除表格信息
|
|
|
|
|
- done();
|
|
|
|
|
- })
|
|
|
|
|
- .catch((err) => {
|
|
|
|
|
- console.log(err);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ handleExamFormCancel() {
|
|
|
|
|
+ this.coderExamDialog = false;
|
|
|
|
|
+ this.$refs.coderExamFormRef.resetFields();
|
|
|
},
|
|
},
|
|
|
// 展示Coder所有的problem题目(代码题)
|
|
// 展示Coder所有的problem题目(代码题)
|
|
|
showProblemDialog() { //打开弹框,获取初始数据
|
|
showProblemDialog() { //打开弹框,获取初始数据
|