Selaa lähdekoodia

Merge remote-tracking branch 'origin/correctPage-byXY'

白白 2 vuotta sitten
vanhempi
commit
f7da98b69f

BIN
src/image/seecoderLogo.png


BIN
src/image/seecoderLogo_wide.png


+ 3 - 2
src/layout/Header/Header.vue

@@ -9,10 +9,11 @@
     <!--产品图标与名称-->
     <el-col :span="2" class="header-icons">
       <div>
-        Logo
+        <!-- 这个相对路径很迷 -->
+        <img src="../Header/seecoderLogo_wide.png" alt="logo">
       </div>
       <div>
-        /name
+        
       </div>
     </el-col>
     <!--选择菜单-->

+ 11 - 2
src/layout/Header/index.scss

@@ -9,10 +9,19 @@
   display: flex;
   align-items: center;
   background-color: #fff;
+  overflow: hidden;
 
   .header-icons {
-    display: flex;
-    color: #597D3B;
+    
+    justify-content: space-between;  
+    display: flex;   
+    align-items: center;
+    // color: #597D3B;
+
+    img{
+      width:auto ;
+      height: 36px;
+    }
   }
 
   .header-menu {

BIN
src/layout/Header/seecoderLogo_wide.png


+ 15 - 4
src/views/CorrectPage/CorrectPage.vue

@@ -7,6 +7,7 @@
 
     <div class="my-correct">
       <!-- 写作题目 及 作文内容 -->
+      
       <div class="my-correct-header">
         <StudentWritingRequirements /> 
         <StudentEssay :studentId = "studentId" :assignmentId="assignmentId"/> 
@@ -14,16 +15,20 @@
       
       <div class="right-side">
         <!-- TODO:AI评分及写作过程记录:框架已完成,内容调取待完成 -->
-        <div class="my-correct-item">
+        <div class="my-correct-record">
             <h2>历史记录</h2><br>
             <ContentSelector/>
         </div>
         
         <!-- 教师评分、修改意见及评价 -->
-        <div class="my-correct-item">
+        <div class="my-correct-remark">
             
             <Remark :studentId = "studentId" :assignmentId="assignmentId"/>              
-        </div>    
+        </div>  
+        
+      <div class = "my-correct-goback">
+        <el-button color="#597D3B" @click="goBack">返回</el-button> 
+      </div>  
         
       </div>
       
@@ -107,6 +112,12 @@ onMounted( () => {
 
 <script lang="ts">
 export default {
-name: "CorrectPage"
+  methods: {  
+    goBack() {  
+      // 使用Vue Router的$router.go(-1)来返回上一个页面  
+      this.$router.go(-1);  
+    },  
+  },  
+  name: "CorrectPage"
 }
 </script>

+ 18 - 2
src/views/CorrectPage/index.scss

@@ -7,6 +7,12 @@
     display: flex;
     gap: 20px;
     //border: 1px solid black;
+
+    .my-correct-goback{
+      position: absolute;  
+      bottom: 5vh;  
+      right: 3vh; 
+    }
   
     .my-correct-header {
       width: 50%;
@@ -24,12 +30,22 @@
       height: 100%;
       width: 50%;
 
-      .my-correct-item {
+      .my-correct-record {
+        background-color: #f9f9f9;  
+        border-radius: 5px;  
+        padding: 15px;  
+        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
+        height: 35vh;
+        //border: 1px solid black;
+        background-color: #fff;
+        
+      }
+      .my-correct-remark {
         background-color: #f9f9f9;  
         border-radius: 5px;  
         padding: 15px;  
         box-shadow: 0 2px 4px rgba(0,0,0,0.1);
-        flex-grow: 1;
+        height: 64vh;
         //border: 1px solid black;
         background-color: #fff;
         

+ 1 - 0
src/views/CourseSquare/component/CourseDetails/component/CourseHomeworkTable.vue

@@ -19,6 +19,7 @@
             :width="column.width"
         >
         </el-table-column>
+        <!-- TODO:找到了 详情界面 -->
         <el-table-column label="详情" width="60">
           <template #default="scope">
             <el-button color="#597d3b" circle @click="openEditor(scope.row.descriptionFile, scope.row.assignmentName)">

+ 3 - 2
src/views/Home/component/ContentSelector/ContentSelector.vue

@@ -78,7 +78,8 @@ export default {
 }   */
   
 .content-input-box {  
-  flex-grow: 1; /* 占据剩余空间 */  
+  height: 25vh; 
+  width: 65vh;
   border: 2px solid #ccc; /* 实线边框 */  
   padding: 10px;  
   border-radius: 5px;  
@@ -89,7 +90,7 @@ export default {
   
 textarea {  
   width: 100%; /* 宽度占满内容输入框 */  
-  height: 150px; /* 示例高度,可以根据需要调整 */  
+  height: 24vh; /* 示例高度,可以根据需要调整 */  
   border: none; /* 移除默认的textarea边框 */  
   resize: none; /* 禁止用户调整大小 */  
   background-color: #f9f9f9; /* 可选的背景色 */  

+ 1 - 1
src/views/Home/component/Remark/Remark.vue

@@ -18,7 +18,7 @@
       <textarea v-model="correction.remark" placeholder="暂无评语" :readonly="isStudent"></textarea>  
     </div>  
   
-    <el-button color="#597D3B" @click="handleCorrect" :disabled="isStudent">提交批改</el-button>  
+    <el-button color="#597D3B" @click="handleCorrect" v-if="!isStudent">提交批改</el-button>  
   </div>  
 </template>  
   

+ 2 - 2
src/views/Home/component/Remark/index.scss

@@ -10,7 +10,7 @@
 
 } 
 .rating-component {  
-  margin-bottom: 10px; // 下边距  
+  margin-bottom: 2vh; // 下边距  
 } 
 .score-input {  
   /* 设置边框样式 */  
@@ -35,7 +35,7 @@
 // 文本区域样式  
 textarea { 
   margin-bottom: 10px; /* 为textarea底部留出空间给提交按钮 */ 
-  height:250px;
+  height:35vh;
   width: 98%; // 宽度占满父容器  
   padding: 10px; // 内边距   
   border: 1px solid #ccc; // 边框  

+ 22 - 2
src/views/Home/component/StudentEssay/StudentWritingRequirements.vue

@@ -17,7 +17,8 @@
             {{data.description}}
           </div>
           <div class="item">
-            <el-link type="primary" @click="console.log('文件下载')">相关文件下载</el-link>
+                      <!-- TODO:相关文件下载逻辑补全 -->
+            <!-- <el-link type="primary" @click="downloadFile">相关文件下载</el-link> -->
           </div>
         </div>
       </div>
@@ -68,7 +69,26 @@
   
   <script lang="ts">
   export default {
-    name: "StudentEssay"
+    name: "StudentEssay",
+    methods: {  
+    downloadFile() {  
+      // 假设这是文件的URL  
+      const url = 'https://example.com/path/to/your/file.pdf';  
+      // 创建一个a标签  
+      const link = document.createElement('a');  
+      // 设置a标签的href属性为文件的URL  
+      link.href = url;  
+      // 设置下载的文件名,这里假设服务器支持通过URL参数设置文件名  
+      // 如果不支持,可以省略这一步  
+      link.download = 'downloaded_file.pdf'; // 设置下载文件的名称  
+      // 触发点击事件  
+      document.body.appendChild(link);  
+      link.click();  
+      // 清理工作,移除a标签  
+      document.body.removeChild(link);  
+    }  
+  }  
+
   }
   </script>
   

+ 1 - 1
src/views/LoginPage/LoginPage.vue

@@ -11,7 +11,7 @@
     <div class="container-box">
       <div class="login-logo">
         <div class="logo-image">
-          Logo
+          <img src="../LoginPage/seecoderLogo.png" alt="logo" width="500vh">
         </div>
       </div>
       <div class="login-box">

BIN
src/views/LoginPage/seecoderLogo.png