白白 2 éve
szülő
commit
a0e08c13a8

+ 1 - 0
src/apis/axios.config.ts

@@ -2,6 +2,7 @@ import axios from "axios";
 
 // const BASEURL = 'http://47.111.23.171:8081'
 const BASEURL = 'http://localhost:8080'
+// const BASEURL = 'http://8.130.126.86:8080'
 
 const axiosInstance = axios.create({
     baseURL: BASEURL,

+ 1 - 1
src/components/AIChatter/AIChatter.vue

@@ -41,7 +41,7 @@
           <!--名字-->
           <div style="margin-bottom: 2px">{{ index % 2 === 0 ? 'You' : data.model }}</div>
           <!--内容-->
-          <div :class="$style.content">{{ item.content }}</div>
+          <div :class="$style.content">{{ item?.content }}</div>
         </div>
       </div>
       <div ref="messagesEndRef" />

+ 4 - 3
src/components/WordEditor/WordEditor.vue

@@ -32,7 +32,7 @@
 
   const props = defineProps<IProps>()
 
-  const documentServerUrl = 'http://47.111.23.171:8082/';
+  const documentServerUrl = 'http://139.196.252.184:8082/';
 
   // OnlyOffice编辑器配置
   let config = reactive({
@@ -62,14 +62,14 @@
     },
     editorConfig: {
       lang: 'zh-CN',
-      callbackUrl: 'http://47.111.23.171:8081/api/onlyoffice/callback',
+      callbackUrl: 'http://139.196.252.184:8081/api/onlyoffice/callback',
       customization: {
         autosave: false,
         comments: false,
         compactHeader: true,
         compactToolbar: false,
         compatibleFeatures: false,
-        forcesave: true,
+        forceSave: true,
         help: false,
         hideRightMenu: true,
         hideRulers: true,
@@ -133,6 +133,7 @@
 
   // 监听 OnlyOffice组件中的文档状态变化事件
   const onDocumentStateChange = (event: any) => {
+    console.log("监听 OnlyOffice组件中的文档状态变化事件", event.data)
     props.onValueChange?.(event.data);
   };
 </script>

+ 12 - 5
src/views/CorrectPage/CorrectAssignmentPage.vue

@@ -40,7 +40,7 @@
       <el-table-column prop="remark" label="评价"/>
       <el-table-column label="操作">
         <template #default="scope">
-          <el-button @click="handleCorrect(scope.row.assignmentId)" style="margin-right: 0; margin-left: 0;padding-left: 10px; padding-right: 10px" color="#597D3B">
+          <el-button @click="handleCorrect(scope.row.assignmentId, scope.row.studentId)" style="margin-right: 0; margin-left: 0;padding-left: 10px; padding-right: 10px" color="#597D3B">
             <el-icon style="margin-right: 3px"><ZoomIn/></el-icon>
             批改
           </el-button>
@@ -59,7 +59,7 @@
       <el-table-column prop="remark" label="评价"/>
       <el-table-column label="操作">
         <template #default="scope">
-          <el-button @click="handleCorrect(scope.row.assignmentId)" style="margin-right: 0; margin-left: 0;padding-left: 10px; padding-right: 10px" color="#597D3B">
+          <el-button @click="handleCorrect(scope.row.assignmentId, scope.row.studentId)" style="margin-right: 0; margin-left: 0;padding-left: 10px; padding-right: 10px" color="#597D3B">
             <el-icon style="margin-right: 3px"><ZoomIn/></el-icon>
             批改
           </el-button>
@@ -125,9 +125,16 @@ import {useFormatDate} from "@/hooks/useFormatDate";
     });
   }
 
-  const handleCorrect = (assignmentId:number) => {
-    // router.push(`/home/myCorrect/assignment/${assignmentId}`)
-    alert("TODO:跳转到批改页面")
+  const handleCorrect = (assignmentId:number, studentId:number) => {
+    router.push(`/home/myCorrect/assignment/${assignmentId}`)
+    router.push({
+      path:
+          `/home/assignment/${assignmentId}/correct`,
+      query: {
+        studentId: studentId
+      }
+    })
+    // alert(studentId)
   }
 
   const handleCurrentChange = (pageNum: number) => {

+ 1 - 0
src/views/Home/component/Edit/index.vue

@@ -81,6 +81,7 @@
   const handleValueChange = (state: boolean) => {
     if (state) data.hasModified = true;
     data.isModified = state;
+    alert("1")
   };
 
   // 提交操作

+ 4 - 4
vite.config.ts

@@ -13,8 +13,8 @@ export default defineConfig({
       '@': fileURLToPath(new URL('./src', import.meta.url))
     }
   },
-  server: {
-    host: '127.0.0.1',
-    port: 4000
-  }
+ server: {
+   host: '127.0.0.1',
+   port: 4000
+ }
 })