diff --git a/pages/other/score/guandong.vue b/pages/other/score/guandong.vue index e334234..c35ad08 100644 --- a/pages/other/score/guandong.vue +++ b/pages/other/score/guandong.vue @@ -14,6 +14,7 @@ import { imgLocal } from '@/utils/common.js'; const data = reactive({ bgImg:'', form: { + subject: '文科', avatar: '', name: '大王', idNumber: '', @@ -39,11 +40,25 @@ import { imgLocal } from '@/utils/common.js'; return sum || ''; }); + function getSubjectLabels(subject) { + const isScience = subject === '理科' + return { + subject3: isScience ? '物理' : '历史', + subject4: isScience ? '化学' : '思想政治', + subject5: isScience ? '生物学' : '地理', + trackName: isScience ? '物理' : '历史', + } + } + + const subjectLabels = computed(() => getSubjectLabels(data.form.subject || '文科')) + const editDialog = reactive({ show: false, data: {} }); + const editSubjectLabels = computed(() => getSubjectLabels(editDialog.data.subject || '文科')) + onMounted(async() => { data.bgImg= await imgLocal.getLocalImage('other/score/guandong/guandongbg.png'); @@ -55,7 +70,8 @@ import { imgLocal } from '@/utils/common.js'; if (cache) { data.form = { ...data.form, - ...cache + ...cache, + subject: cache.subject || '文科' }; } } @@ -66,6 +82,9 @@ import { imgLocal } from '@/utils/common.js'; function openEditDialog() { editDialog.data = JSON.parse(JSON.stringify(data.form)); + if (!editDialog.data.subject) { + editDialog.data.subject = '文科'; + } editDialog.show = true; } @@ -183,7 +202,7 @@ import { imgLocal } from '@/utils/common.js'; - 历史 + {{ subjectLabels.subject3 }} {{data.form.history}} @@ -191,7 +210,7 @@ import { imgLocal } from '@/utils/common.js'; - 思想政治 + {{ subjectLabels.subject4 }} {{data.form.politics}} @@ -199,7 +218,7 @@ import { imgLocal } from '@/utils/common.js'; - 地理 + {{ subjectLabels.subject5 }} {{data.form.geography}} @@ -207,7 +226,7 @@ import { imgLocal } from '@/utils/common.js'; - 普通类 (历史)总分 + 普通类 ({{ subjectLabels.trackName }})总分 {{data.form.total}} @@ -215,7 +234,7 @@ import { imgLocal } from '@/utils/common.js'; - 本科普通类 (历史)总分 (含加分) + 本科普通类 ({{ subjectLabels.trackName }})总分 (含加分) {{data.form.undergraduateTotal}} @@ -231,7 +250,7 @@ import { imgLocal } from '@/utils/common.js'; - 专科普通类 (历史)总分 (含加分) + 专科普通类 ({{ subjectLabels.trackName }})总分 (含加分) {{data.form.technicalTotal}} @@ -256,6 +275,15 @@ import { imgLocal } from '@/utils/common.js'; 编辑成绩信息 + + 科目 + + 文科 + 理科 + + 姓名 @@ -281,23 +309,23 @@ import { imgLocal } from '@/utils/common.js'; - 历史 - + {{ editSubjectLabels.subject3 }} + - 思想政治 - + {{ editSubjectLabels.subject4 }} + - 地理 - + {{ editSubjectLabels.subject5 }} + - 普通类 (历史)总分 + 普通类 ({{ editSubjectLabels.trackName }})总分 {{editTotal}} - 本科普通类 (历史)总分 (含加分) + 本科普通类 ({{ editSubjectLabels.trackName }})总分 (含加分) @@ -305,7 +333,7 @@ import { imgLocal } from '@/utils/common.js'; - 专科普通类 (历史)总分 (含加分) + 专科普通类 ({{ editSubjectLabels.trackName }})总分 (含加分) @@ -445,6 +473,27 @@ import { imgLocal } from '@/utils/common.js'; color: #333; text-align: right; } + + .subject-options { + flex: 1; + display: flex; + justify-content: flex-end; + gap: 20rpx; + } + + .subject-option { + padding: 8rpx 32rpx; + font-size: 26rpx; + color: #666; + border: 1rpx solid #ddd; + border-radius: 8rpx; + + &.active { + color: #187AFF; + border-color: #187AFF; + background-color: rgba(24, 122, 255, 0.08); + } + } } .popup-footer { diff --git a/pages/other/silkBanner/silkBanner.vue b/pages/other/silkBanner/silkBanner.vue index f16092b..4cdc125 100644 --- a/pages/other/silkBanner/silkBanner.vue +++ b/pages/other/silkBanner/silkBanner.vue @@ -6,7 +6,7 @@ - 样式一 + {{item}} - + + + 样式{{index+1}} + + -