Jelajahi Sumber

修改样式

lex 1 tahun lalu
induk
melakukan
7a0e6f36b8

+ 24 - 1
src/views/classList/components/classStudent.tsx

@@ -31,7 +31,7 @@ export default defineComponent({
 
     const state = reactive({
       upgradeFlag: props.upgradeFlag == 0 ? true : false, // 是否为历史班
-      searchForm: { keyword: '', gender: null as any },
+      searchForm: { keyword: '', gender: null as any, membership: null as any },
       loading: false,
       pagination: {
         page: 1,
@@ -227,6 +227,29 @@ export default defineComponent({
                 } as any)}
                 v-model:value={state.searchForm.gender}></CSelect>
             </NFormItem>
+            <NFormItem>
+              <CSelect
+                {...({
+                  options: [
+                    {
+                      label: '学生类型',
+                      value: null
+                    },
+                    {
+                      label: '会员',
+                      value: true
+                    },
+                    {
+                      label: '普通',
+                      value: false
+                    }
+                  ],
+                  placeholder: '学生类型',
+                  clearable: true,
+                  inline: true
+                } as any)}
+                v-model:value={state.searchForm.membership}></CSelect>
+            </NFormItem>
 
             <NFormItem>
               <NSpace justify="end">

+ 33 - 11
src/views/studentList/components/evaluationRecords.tsx

@@ -10,7 +10,6 @@ import {
   NSpace,
   NTag
 } from 'naive-ui';
-import numeral from 'numeral';
 import { useECharts } from '@/hooks/web/useECharts';
 import Pagination from '/src/components/pagination';
 import { getPracticeRecordList } from '../api';
@@ -29,7 +28,8 @@ export default defineComponent({
     studentId: {
       type: String,
       default: ''
-    }, classGroupId: {
+    },
+    classGroupId: {
       type: String,
       default: ''
     }
@@ -148,8 +148,8 @@ export default defineComponent({
       const res = await getPracticeRecordList({
         userId: props.studentId,
         ...state.pagination,
-        classGroupId:props.classGroupId,
-        feature: "EVALUATION",
+        classGroupId: props.classGroupId,
+        feature: 'EVALUATION',
         ...getTimes(timer.value, ['startTime', 'endTime'], 'YYYY-MM-DD')
       });
       state.tableList = res.data.rows;
@@ -202,8 +202,8 @@ export default defineComponent({
         </NForm>
         <div class={styles.tableWrap}>
           <NDataTable
-             v-slots={{
-              empty:()=><TheEmpty></TheEmpty>
+            v-slots={{
+              empty: () => <TheEmpty></TheEmpty>
             }}
             class={styles.classTable}
             loading={state.loading}
@@ -222,11 +222,33 @@ export default defineComponent({
           preset="card"
           class={['modalTitle background', styles.reportModel]}
           title={'评测报告'}>
-          <iframe
-            width={'100%'}
-            height={'450px'}
-            frameborder="0"
-            src={reportSrc.value}></iframe>
+          <div class={styles.reportContainer} style={{ lineHeight: 0 }}>
+            <iframe
+              width={'100%'}
+              height={'450px'}
+              frameborder="0"
+              onLoad={() => {
+                // const iframeDocument =
+                //   iframe.contentDocument || iframe.contentWindow.document;
+                // const styleElement = iframeDocument.createElement('style');
+                // styleElement.textContent = `
+                //   body {
+                //     margin: 0;
+                //     font-family: 'Arial', sans-serif;
+                //     font-size: 16px;
+                //     line-height: 1.5;
+                //     color: #333;
+                //     background-color: #f0f0f0;
+                //   }
+                //   p {
+                //     margin-bottom: 10px;
+                //     color: red;
+                //   }
+                // `;
+                // iframeDocument.head.appendChild(styleElement);
+              }}
+              src={reportSrc.value}></iframe>
+          </div>
         </NModal>
       </>
     );

+ 20 - 0
src/views/studentList/index.module.less

@@ -274,6 +274,25 @@
 .reportModel {
   width: 1030px;
   overflow: hidden;
+
+  /* 设置滚动条的宽度、颜色和轨道背景 */
+  iframe::-webkit-scrollbar {
+    width: 10px;
+  }
+
+  iframe::-webkit-scrollbar-thumb {
+    background-color: red;
+  }
+
+  iframe::-webkit-scrollbar-track {
+    background-color: green;
+  }
+
+  /* Firefox */
+  iframe {
+    scrollbar-width: thin;
+    scrollbar-color: #888 #f0f0f0;
+  }
 }
 
 .addStudentWrap {
@@ -587,6 +606,7 @@
   }
 }
 
+
 .updateStudent {
   width: 480px;
 }