diff --git a/.env.development b/.env.development index dcf21ec..a1bde1c 100644 --- a/.env.development +++ b/.env.development @@ -18,4 +18,7 @@ VITE_APP_BASE_API = '/' # VITE_APP_BASE_API = 'http://118.31.7.2:7548/' VITE_APP_AI_API = 'https://whmnjy.sztzjy.com:8764/' VITE_APP_ENV = 'development' -VITE_APP_BASE_API = 'http://192.168.1.74:7548/' +# VITE_APP_BASE_API = 'http://192.168.1.74:7548/' +# 开发环境通过 vite 代理转发到线上,baseURL 用相对路径 '/' 避免跨域 +# VITE_APP_BASE_API = 'http://120.79.161.177:8999/' +VITE_APP_BASE_API = '/' diff --git a/src/assets/styles/student-training.scss b/src/assets/styles/student-training.scss index e8fff74..1638849 100644 --- a/src/assets/styles/student-training.scss +++ b/src/assets/styles/student-training.scss @@ -1,3 +1,23 @@ +/* 全局字体变量(:root):确保所有 .vue 文件均可访问,不限于 .student-training-shell */ +:root { + /* 字体栈:中文优先苹方/思源黑体,回退微软雅黑,跨平台一致 */ + --student-font-base: "PingFang SC", "Source Han Sans SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; + /* 数字/数据字体:等宽对齐,成绩/金额专用 */ + --student-font-data: "PingFang SC", "SF Mono", "JetBrains Mono", "Microsoft YaHei", monospace; + + /* 字号变量(对齐 Word 标准:1pt ≈ 1.333px) */ + --student-fs-display: 20px; /* 小三 15pt - 任务主标题 */ + --student-fs-h1: 18px; /* 小三 15pt - 步骤大标题 */ + --student-fs-h2: 16px; /* 小四 12pt - 面板/步骤行标题 */ + --student-fs-h3: 14px; /* 五号 10.5pt - 区块小标题 */ + --student-fs-body: 14px; /* 五号 10.5pt - 正文/描述 */ + --student-fs-body-sm: 13px; /* 表格次要文字 */ + --student-fs-caption: 12px; /* 小五 9pt - 标签/徽章 */ + --student-fs-button: 14px; /* 五号 - 按钮文字 */ + --student-fs-button-lg: 15px; /* 主操作按钮 */ + --student-fs-data: 16px; /* 小四 12pt - 数字/成绩/金额 */ +} + .student-training-shell { --student-step-height: 46px; --student-step-font: 14px; @@ -37,25 +57,33 @@ margin: 0 !important; padding: 24px 24px 32px !important; background: #06111d !important; + /* 应用实训页专用字体栈 + 数字等宽对齐 */ + font-family: var(--student-font-base) !important; + font-size: var(--student-fs-body) !important; + line-height: 1.8 !important; + font-variant-numeric: tabular-nums !important; } .student-training-shell .task-header .task-title { - font-size: 30px !important; - line-height: 1.3 !important; + font-size: var(--student-fs-display) !important; /* 20px 小三 */ + line-height: 1.4 !important; letter-spacing: 0 !important; + font-weight: 700 !important; } .student-training-shell .workbench-head h3 { - font-size: 26px !important; - line-height: 1.3 !important; + font-size: var(--student-fs-h1) !important; /* 18px 小三 */ + line-height: 1.4 !important; letter-spacing: 0 !important; + font-weight: 700 !important; } .student-training-shell .panel-title h4, .student-training-shell .step-title-row h3 { - font-size: 22px !important; - line-height: 1.3 !important; + font-size: var(--student-fs-h2) !important; /* 16px 小四 */ + line-height: 1.5 !important; letter-spacing: 0 !important; + font-weight: 600 !important; } .student-training-shell .task-desc, @@ -64,10 +92,23 @@ .student-training-shell .background-block, .student-training-shell .example-block, .student-training-shell .source-title { - font-size: 15px !important; + font-size: var(--student-fs-body) !important; /* 14px 五号 */ line-height: 1.8 !important; } +/* 数字/成绩/金额专用:等宽对齐,避免列内跳动(小四 16px) */ +.student-training-shell .score-value, +.student-training-shell .data-number, +.student-training-shell .amount, +.student-training-shell .stat-value, +.student-training-shell .progress-value { + font-family: var(--student-font-data) !important; + font-size: var(--student-fs-data) !important; /* 16px 小四 */ + font-variant-numeric: tabular-nums !important; + font-weight: 700 !important; + line-height: 1.4 !important; +} + .student-training-shell .flow-steps, .student-training-shell .step-indicator { display: flex !important; @@ -200,7 +241,7 @@ border-radius: 999px !important; color: #ffffff !important; background: linear-gradient(95deg, #0a6b9e, #0a5c86) !important; - font-size: 15px !important; + font-size: var(--student-fs-body) !important; font-weight: 800 !important; line-height: 1 !important; letter-spacing: 0 !important; @@ -239,7 +280,7 @@ .training-step-area .online, .training-step-area .online span { color: #d7ecff !important; - font-size: 15px !important; + font-size: var(--student-fs-body) !important; line-height: 1.75 !important; letter-spacing: 0 !important; } @@ -263,7 +304,7 @@ color: #e9fbff !important; background: linear-gradient(180deg, #22aad6, #1687ba) !important; box-shadow: none !important; - font-size: 15px !important; + font-size: var(--student-fs-body) !important; font-weight: 800 !important; line-height: 1 !important; letter-spacing: 0 !important; @@ -512,7 +553,7 @@ .student-training-shell .large-textarea, .student-training-shell .input-field, .student-training-shell .table-textarea { - font-size: 15px !important; + font-size: var(--student-fs-body) !important; line-height: 1.65 !important; letter-spacing: 0 !important; } @@ -568,7 +609,7 @@ color: #e9fbff !important; background: rgba(13, 64, 88, 0.62) !important; box-shadow: none !important; - font-size: 15px !important; + font-size: var(--student-fs-body) !important; font-weight: 800 !important; line-height: 1 !important; letter-spacing: 0 !important; diff --git a/src/components/Crontab/index.vue b/src/components/Crontab/index.vue index f1d7201..5fa31db 100644 --- a/src/components/Crontab/index.vue +++ b/src/components/Crontab/index.vue @@ -2,66 +2,33 @@
- + - + - + - + - + - + - + @@ -70,41 +37,49 @@

时间表达式

- +
{{item}}{{ item }} Cron 表达式
- {{crontabValueObj.second}} - {{crontabValueObj.second}} + {{ crontabValueObj.second }} + {{ crontabValueObj.second }} - {{crontabValueObj.min}} - {{crontabValueObj.min}} + {{ crontabValueObj.min }} + {{ crontabValueObj.min }} - {{crontabValueObj.hour}} - {{crontabValueObj.hour}} + {{ crontabValueObj.hour }} + {{ crontabValueObj.hour }} - {{crontabValueObj.day}} - {{crontabValueObj.day}} + {{ crontabValueObj.day }} + {{ crontabValueObj.day }} - {{crontabValueObj.month}} - {{crontabValueObj.month}} + {{ crontabValueObj.month }} + {{ crontabValueObj.month }} - {{crontabValueObj.week}} - {{crontabValueObj.week}} + {{ crontabValueObj.week }} + {{ crontabValueObj.week }} - {{crontabValueObj.year}} - {{crontabValueObj.year}} + {{ crontabValueObj.year }} + {{ crontabValueObj.year }} - {{crontabValueString}} - {{crontabValueString}} + {{ crontabValueString }} + {{ crontabValueString }}
@@ -248,20 +223,23 @@ onMounted(() => { text-align: center; margin-top: 20px; } + .popup-main { position: relative; margin: 10px auto; background: #fff; border-radius: 5px; - font-size: 12px; + font-size: var(--student-fs-caption); overflow: hidden; } + .popup-title { overflow: hidden; line-height: 34px; padding-top: 6px; background: #f2f2f2; } + .popup-result { box-sizing: border-box; line-height: 24px; @@ -270,27 +248,31 @@ onMounted(() => { border: 1px solid #ccc; position: relative; } + .popup-result .title { position: absolute; top: -28px; left: 50%; width: 140px; - font-size: 14px; + font-size: var(--student-fs-body); margin-left: -70px; text-align: center; line-height: 30px; background: #fff; } + .popup-result table { text-align: center; width: 100%; margin: 0 auto; } + .popup-result table td:not(.result) { width: 3.5rem; min-width: 3.5rem; max-width: 3.5rem; } + .popup-result table span { display: block; width: 100%; @@ -301,10 +283,11 @@ onMounted(() => { overflow: hidden; border: 1px solid #e8e8e8; } + .popup-result-scroll { - font-size: 12px; + font-size: var(--student-fs-caption); line-height: 24px; height: 10em; overflow-y: auto; } - \ No newline at end of file + diff --git a/src/components/codemirror/index.vue b/src/components/codemirror/index.vue index cc065b4..7162d00 100644 --- a/src/components/codemirror/index.vue +++ b/src/components/codemirror/index.vue @@ -168,14 +168,14 @@ watch( :deep(#answer) { display: block; margin: -41px 0px 0px 0px; - font-size: 14px; + font-size: var(--student-fs-body); ol { line-height: 10px; li, span { - font-family: Source Han Sans CN; + font-family: var(--student-font-base); font-weight: 400; - font-size: 14px; + font-size: var(--student-fs-body); color: #666666; line-height: 14px; } diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index c799bfe..afa79bf 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -370,10 +370,10 @@ onMounted(() => { display: flex; // justify-content: center; align-items: center; - font-family: Source Han Sans CN; + font-family: var(--student-font-base); font-weight: bold; color: #ffffff; - font-size: 27px; + font-size: var(--student-fs-h1); margin-left: 10px; margin-top: 3px; letter-spacing: 4px; @@ -388,8 +388,8 @@ onMounted(() => { z-index: 1000; padding: 5px 20px; span { - font-size: 26px; - font-family: Source Han Sans CN; + font-size: var(--student-fs-h1); + font-family: var(--student-font-base); font-weight: 700; color: #fff; line-height: 50px; @@ -423,7 +423,7 @@ onMounted(() => { left: 45%; top: 50%; transform: translate(-50%, -50%); - font-size: 20px; + font-size: var(--student-fs-display); color: #fff; font-weight: bold; display: flex; @@ -455,7 +455,7 @@ onMounted(() => { &.school-admin-nav { left: 55%; gap: 8px; - font-size: 16px; + font-size: var(--student-fs-h2); .el-ment-item { padding: 6px 10px; } @@ -465,7 +465,7 @@ onMounted(() => { z-index: 1002; max-width: calc(100vw - 560px); gap: 8px; - font-size: 15px; + font-size: var(--student-fs-body); overflow-x: auto; overflow-y: hidden; padding: 4px 2px; @@ -503,7 +503,7 @@ onMounted(() => { display: inline-block; padding: 0 8px; height: 100%; - font-size: 18px; + font-size: var(--student-fs-h1); color: #5a5e66; vertical-align: text-bottom; @@ -536,7 +536,7 @@ onMounted(() => { position: absolute; right: -20px; top: 25px; - font-size: 12px; + font-size: var(--student-fs-caption); } } } @@ -556,7 +556,7 @@ onMounted(() => { z-index: 1001; span { - font-size: 22px; + font-size: var(--student-fs-h2); letter-spacing: 2px; text-shadow: 0 0 14px rgba(80, 200, 255, 0.28); } diff --git a/src/layout/components/Settings/index.vue b/src/layout/components/Settings/index.vue index 3bf28fe..5d88153 100644 --- a/src/layout/components/Settings/index.vue +++ b/src/layout/components/Settings/index.vue @@ -185,7 +185,7 @@ defineExpose({ line-height: 22px; font-weight: bold; .drawer-title { - font-size: 14px; + font-size: var(--student-fs-body); } } .setting-drawer-block-checbox { @@ -223,7 +223,7 @@ defineExpose({ padding-left: 24px; color: #1890ff; font-weight: 700; - font-size: 14px; + font-size: var(--student-fs-body); } } } @@ -231,7 +231,7 @@ defineExpose({ .drawer-item { color: rgba(0, 0, 0, 0.65); padding: 12px 0; - font-size: 14px; + font-size: var(--student-fs-body); .comp-style { float: right; diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index c6ebdba..0f57fd2 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -259,7 +259,7 @@ function handleScroll() { color: #495060; background: #fff; padding: 0 8px; - font-size: 12px; + font-size: var(--student-fs-caption); margin-left: 5px; margin-top: 4px; &:first-of-type { @@ -293,7 +293,7 @@ function handleScroll() { list-style-type: none; padding: 5px 0; border-radius: 4px; - font-size: 12px; + font-size: var(--student-fs-caption); font-weight: 400; color: #333; box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3); diff --git a/src/views/AI/index.vue b/src/views/AI/index.vue index 69e1412..6e0d88a 100644 --- a/src/views/AI/index.vue +++ b/src/views/AI/index.vue @@ -954,7 +954,7 @@ .active { //放大 transform: scale(1.12); - font-size: 18px; + font-size: var(--student-fs-h1); font-weight: 600; box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); color: #ffffff; @@ -1018,7 +1018,7 @@ border: 1px solid #003e7c; border-radius: 12px 12px 12px 0; padding: 10px 12px 10px 12px; - font-size: 14px; + font-size: var(--student-fs-body); color: #ffffff; // 鼠标小手 cursor: pointer; @@ -1032,7 +1032,7 @@ :deep(.md-editor-preview-wrapper) { padding: 0px 0px !important; .md-editor-preview { - font-size: 15px !important; + font-size: var(--student-fs-body) !important; } } .questionItem { @@ -1043,7 +1043,7 @@ border-radius: 12px 12px 0 12px; // padding: 0px 12px 0px 16px; font-weight: 400; - font-size: 14px; + font-size: var(--student-fs-body); line-height: 20px; max-width: calc(100% - 51px); word-break: break-all; @@ -1056,7 +1056,7 @@ :deep(.answerCon) { display: flex; font-weight: 400; - font-size: 14px; + font-size: var(--student-fs-body); // color: rgb(68, 68, 68); line-height: 22px; // width: calc(100% - 51px); diff --git a/src/views/analysis-of-students/dialogue.vue b/src/views/analysis-of-students/dialogue.vue index 3f42f89..d6ea9da 100644 --- a/src/views/analysis-of-students/dialogue.vue +++ b/src/views/analysis-of-students/dialogue.vue @@ -269,7 +269,7 @@ onUnmounted(() => { border: 1px solid #003e7c; border-radius: 12px 12px 12px 0; padding: 10px 12px 10px 12px; - font-size: 14px; + font-size: var(--student-fs-body); color: #ffffff; // 鼠标小手 cursor: pointer; @@ -283,7 +283,7 @@ onUnmounted(() => { .md-editor-preview-wrapper { padding: 0px 0px !important; .md-editor-preview { - font-size: 15px !important; + font-size: var(--student-fs-body) !important; } } .questionItem { @@ -294,7 +294,7 @@ onUnmounted(() => { border-radius: 12px 12px 0 12px; // padding: 0px 12px 0px 16px; font-weight: 400; - font-size: 14px; + font-size: var(--student-fs-body); line-height: 20px; max-width: calc(100% - 51px); word-break: break-all; @@ -307,7 +307,7 @@ onUnmounted(() => { :deep(.answerCon) { display: flex; font-weight: 400; - font-size: 14px; + font-size: var(--student-fs-body); // color: rgb(68, 68, 68); line-height: 22px; // width: calc(100% - 51px); diff --git a/src/views/assessment/diagnosis.vue b/src/views/assessment/diagnosis.vue index 0e868d3..81d1279 100644 --- a/src/views/assessment/diagnosis.vue +++ b/src/views/assessment/diagnosis.vue @@ -72,5 +72,5 @@ onMounted(async () => { try { taskConfig.value = (await getTrainingTaskByKey(TAS diff --git a/src/views/assessment/optimization.vue b/src/views/assessment/optimization.vue index e0af0d5..9a48692 100644 --- a/src/views/assessment/optimization.vue +++ b/src/views/assessment/optimization.vue @@ -347,13 +347,13 @@ onMounted(async () => { diff --git a/src/views/channel/index.vue b/src/views/channel/index.vue index b762b46..a65c09c 100644 --- a/src/views/channel/index.vue +++ b/src/views/channel/index.vue @@ -1,4 +1,4 @@ -