Переглянути джерело

Merge branch 'master' into pre

DESKTOP-USV654P\pc 6 місяців тому
батько
коміт
ca9ea71302

+ 1 - 1
.drone.yml

@@ -117,8 +117,8 @@ node:
 
 steps:
   - name: yarn-install
+    image: gplane/pnpm:node20
     depends_on: [clone]
-    image: node:18.16.1
     volumes:
       - name: modules-cache
         path: /drone/src/node_modules # 下载依赖的目录挂载出来,防止重复下载

+ 8 - 7
src/views/notice/components/newsView.vue

@@ -52,6 +52,7 @@
   const handleReview = (item, type) => {
     const env = getAppEnvConfig();
     const newUrl = env.VITE_GLOB_FFFILEVIEW_URL + encodeURIComponent(encode(item.fileUrl));
+    const index = item.fileUrl.lastIndexOf('.');
     const a = document.createElement('a');
     a.href = newUrl;
     switch (type) {
@@ -62,7 +63,7 @@
       case 2:
         downloadByUrl({
           url: item.fileUrl,
-          fileName: item.fileName,
+          fileName: item.fileName + item.fileUrl.slice(index),
         });
     }
 
@@ -111,16 +112,16 @@
             <div v-html="initHtml(newsData?.newsContent)"></div>
           </div>
         </div>
-        <div style="z-index: 100;">
+        <div style="z-index: 100">
           <a-form
             v-if="newsData.openReply !== 2 && !isAdmin"
             ref="formRef"
             :model="formData"
-            style="position: absolute; bottom: 1%; right: 2%;"
+            style="position: absolute; bottom: 1%; right: 2%"
             layout="vertical"
           >
             <a-form-item label="回复内容" name="content" :required="newsData.openReply === 1">
-              <Textarea :rows="4" style="width: 300px;" v-model:value="formData.content" />
+              <Textarea :rows="4" style="width: 300px" v-model:value="formData.content" />
             </a-form-item>
             <a-form-item>
               <a-button type="primary" :loading="isLoading" @click="handleSubmitRes">回复</a-button>
@@ -130,10 +131,10 @@
 
         <div class="newsView-content-footer"> </div>
         <div class="fileLListBox" v-if="Array.isArray(newsData.appendixList)">
-          <span style="margin-bottom: 12px; font-size: 16px; color: black;">{{ title }}附件:</span>
+          <span style="margin-bottom: 12px; font-size: 16px; color: black">{{ title }}附件:</span>
           <ul>
             <li
-              style="display: flex; align-items: center; justify-content: space-between;"
+              style="display: flex; align-items: center; justify-content: space-between"
               v-for="item in newsData.appendixList"
               :key="item.id"
             >
@@ -143,7 +144,7 @@
               </div>
 
               <div>
-                <span style="margin-right: 12px;" @click="handleReview(item, 1)">预览</span>
+                <span style="margin-right: 12px" @click="handleReview(item, 1)">预览</span>
                 <span @click="handleReview(item, 2)">下载</span>
               </div>
             </li>

+ 5 - 9
src/views/sys/door/components/timetable/index.vue

@@ -1,11 +1,7 @@
 <template>
   <Card title="我的课表" class="!mt-4">
     <template #extra>
-      <div
-        class="flex items-center cursor-pointer"
-        style="font-size: 12px;"
-        @click="handleGotoPage"
-      >
+      <div class="flex items-center cursor-pointer" style="font-size: 12px" @click="handleGotoPage">
         查看更多
         <Icon icon="material-symbols-light:double-arrow" :size="16" />
       </div>
@@ -22,7 +18,7 @@
               :format="state.format"
               v-model:value="currentDate"
               @change="handelMonthChange"
-              style="width: 120px;"
+              style="width: 120px"
               :allowClear="false"
             >
               <template #suffixIcon>
@@ -61,7 +57,7 @@
             >
               {{ item.key }}
             </div>
-            <div class="flex" style="height: 4px; margin-top: 8px;">
+            <div class="flex" style="height: 4px; margin-top: 8px">
               <div class="week-calendar-body-day-item-extend" v-if="item.exist"> </div>
             </div>
           </div>
@@ -76,7 +72,7 @@
           </div>
           <div class="timetable-item-body mt-2">
             {{ item.className }} | 课程地点:
-            <span style="color: rgb(22, 100, 255);">{{ item.classroomName }}</span>
+            <span style="color: rgb(22, 100, 255)">{{ item.classroomName }}</span>
           </div>
           <div class="timetable-item-floot flex mt-2 items-center">
             <div class="timetable-item-floot-tag">课程</div>
@@ -180,7 +176,7 @@
             classroomName: item.classroomName || '-',
             courseName: item.courseName,
             timePeriod: timePeriods[Number(item.timePeriod)],
-            timeNumber: `第${item.timeNumber}节课`,
+            timeNumber: `${item.shortName}`,
             time: `${classTimeItem?.summerStartTime}~${classTimeItem?.summerEndTime}`,
           });
         });