|
|
@@ -1,6 +1,7 @@
|
|
|
<script>
|
|
|
import {ElLoading, ElMessage, ElMessageBox} from "element-plus";
|
|
|
import {Back, UploadFilled} from "@element-plus/icons-vue";
|
|
|
+import { REQUEST_BASE_URL_EAI } from "@/api/analysis/const";
|
|
|
|
|
|
export default {
|
|
|
name: "HomeworkPage",
|
|
|
@@ -174,8 +175,17 @@ export default {
|
|
|
return `${date.getFullYear()}-${date.getMonth()+1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
|
|
|
},
|
|
|
toEAI(){
|
|
|
- window.location.href = "http://localhost:4000/";
|
|
|
+ this.$apis.getEaiToken(this.$store.state.user.token)
|
|
|
+ .then(res=>{
|
|
|
+ if(this.$store.getters.isTeacher){
|
|
|
+ console.log(res.data.data);
|
|
|
+ window.location.href = `${REQUEST_BASE_URL_EAI}/home/myCorrect/assignment/${this.assignmentId}?token=${encodeURIComponent(res.data.data)}`;
|
|
|
+ } else{
|
|
|
+ window.location.href = `${REQUEST_BASE_URL_EAI}/home/homeworkDetail/${this.assignmentId}?token=${encodeURIComponent(res.data.data)}`;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
+
|
|
|
contentToAHTML(content){
|
|
|
return "<a href=\""+ content +"\" target=\"_blank\">"+content+"</a>";
|
|
|
},
|