Compare commits

..

No commits in common. "c933a2c663436e67bc0d8f4fe059d455cd990233" and "1b65430bd205beef225214e02379a752a98c8355" have entirely different histories.

6 changed files with 473 additions and 818 deletions

View File

@ -14,7 +14,6 @@ import { imgLocal } from '@/utils/common.js';
const data = reactive({ const data = reactive({
bgImg:'', bgImg:'',
form: { form: {
subject: '文科',
avatar: '', avatar: '',
name: '大王', name: '大王',
idNumber: '', idNumber: '',
@ -40,25 +39,11 @@ import { imgLocal } from '@/utils/common.js';
return sum || ''; 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({ const editDialog = reactive({
show: false, show: false,
data: {} data: {}
}); });
const editSubjectLabels = computed(() => getSubjectLabels(editDialog.data.subject || '文科'))
onMounted(async() => { onMounted(async() => {
data.bgImg= await imgLocal.getLocalImage('other/score/guandong/guandongbg.png'); data.bgImg= await imgLocal.getLocalImage('other/score/guandong/guandongbg.png');
@ -70,8 +55,7 @@ import { imgLocal } from '@/utils/common.js';
if (cache) { if (cache) {
data.form = { data.form = {
...data.form, ...data.form,
...cache, ...cache
subject: cache.subject || '文科'
}; };
} }
} }
@ -82,9 +66,6 @@ import { imgLocal } from '@/utils/common.js';
function openEditDialog() { function openEditDialog() {
editDialog.data = JSON.parse(JSON.stringify(data.form)); editDialog.data = JSON.parse(JSON.stringify(data.form));
if (!editDialog.data.subject) {
editDialog.data.subject = '文科';
}
editDialog.show = true; editDialog.show = true;
} }
@ -202,7 +183,7 @@ import { imgLocal } from '@/utils/common.js';
</view> </view>
<view class="item"> <view class="item">
<view class="text1"> <view class="text1">
{{ subjectLabels.subject3 }} 历史
</view> </view>
<view class="text2"> <view class="text2">
{{data.form.history}} {{data.form.history}}
@ -210,7 +191,7 @@ import { imgLocal } from '@/utils/common.js';
</view> </view>
<view class="item"> <view class="item">
<view class="text1"> <view class="text1">
{{ subjectLabels.subject4 }} 思想政治
</view> </view>
<view class="text2"> <view class="text2">
{{data.form.politics}} {{data.form.politics}}
@ -218,7 +199,7 @@ import { imgLocal } from '@/utils/common.js';
</view> </view>
<view class="item"> <view class="item">
<view class="text1"> <view class="text1">
{{ subjectLabels.subject5 }} 地理
</view> </view>
<view class="text2"> <view class="text2">
{{data.form.geography}} {{data.form.geography}}
@ -226,7 +207,7 @@ import { imgLocal } from '@/utils/common.js';
</view> </view>
<view class="item"> <view class="item">
<view class="text1"> <view class="text1">
普通类 ({{ subjectLabels.trackName }})总分 普通类 (历史)总分
</view> </view>
<view class="text2"> <view class="text2">
{{data.form.total}} {{data.form.total}}
@ -234,7 +215,7 @@ import { imgLocal } from '@/utils/common.js';
</view> </view>
<view class="item"> <view class="item">
<view class="text1"> <view class="text1">
本科普通类 ({{ subjectLabels.trackName }})总分 (含加分) 本科普通类 (历史)总分 (含加分)
</view> </view>
<view class="text2"> <view class="text2">
{{data.form.undergraduateTotal}} {{data.form.undergraduateTotal}}
@ -250,7 +231,7 @@ import { imgLocal } from '@/utils/common.js';
</view> </view>
<view class="item"> <view class="item">
<view class="text1"> <view class="text1">
专科普通类 ({{ subjectLabels.trackName }})总分 (含加分) 专科普通类 (历史)总分 (含加分)
</view> </view>
<view class="text2"> <view class="text2">
{{data.form.technicalTotal}} {{data.form.technicalTotal}}
@ -275,15 +256,6 @@ import { imgLocal } from '@/utils/common.js';
<text class="title">编辑成绩信息</text> <text class="title">编辑成绩信息</text>
</view> </view>
<view class="editDialog_body"> <view class="editDialog_body">
<view class="formItem">
<text>科目</text>
<view class="subject-options">
<view class="subject-option" :class="{ active: editDialog.data.subject === '文科' }"
@click="editDialog.data.subject = '文科'">文科</view>
<view class="subject-option" :class="{ active: editDialog.data.subject === '理科' }"
@click="editDialog.data.subject = '理科'">理科</view>
</view>
</view>
<view class="formItem"> <view class="formItem">
<text>姓名</text> <text>姓名</text>
<input v-model="editDialog.data.name" placeholder="请输入姓名" /> <input v-model="editDialog.data.name" placeholder="请输入姓名" />
@ -309,23 +281,23 @@ import { imgLocal } from '@/utils/common.js';
<input v-model="editDialog.data.english" type="digit" placeholder="请输入英语成绩" /> <input v-model="editDialog.data.english" type="digit" placeholder="请输入英语成绩" />
</view> </view>
<view class="formItem"> <view class="formItem">
<text>{{ editSubjectLabels.subject3 }}</text> <text>历史</text>
<input v-model="editDialog.data.history" type="digit" :placeholder="'请输入' + editSubjectLabels.subject3 + '成绩'" /> <input v-model="editDialog.data.history" type="digit" placeholder="请输入历史成绩" />
</view> </view>
<view class="formItem"> <view class="formItem">
<text>{{ editSubjectLabels.subject4 }}</text> <text>思想政治</text>
<input v-model="editDialog.data.politics" type="digit" :placeholder="'请输入' + editSubjectLabels.subject4 + '成绩'" /> <input v-model="editDialog.data.politics" type="digit" placeholder="请输入思想政治成绩" />
</view> </view>
<view class="formItem"> <view class="formItem">
<text>{{ editSubjectLabels.subject5 }}</text> <text>地理</text>
<input v-model="editDialog.data.geography" type="digit" :placeholder="'请输入' + editSubjectLabels.subject5 + '成绩'" /> <input v-model="editDialog.data.geography" type="digit" placeholder="请输入地理成绩" />
</view> </view>
<view class="formItem"> <view class="formItem">
<text>普通类 ({{ editSubjectLabels.trackName }})总分</text> <text>普通类 (历史)总分</text>
<text style="flex:1;text-align:right;font-size:28rpx;color:#333;">{{editTotal}}</text> <text style="flex:1;text-align:right;font-size:28rpx;color:#333;">{{editTotal}}</text>
</view> </view>
<view class="formItem"> <view class="formItem">
<text>本科普通类 ({{ editSubjectLabels.trackName }})总分 (含加分)</text> <text>本科普通类 (历史)总分 (含加分)</text>
<input v-model="editDialog.data.undergraduateTotal" type="digit" placeholder="请输入本科总分" /> <input v-model="editDialog.data.undergraduateTotal" type="digit" placeholder="请输入本科总分" />
</view> </view>
<view class="formItem"> <view class="formItem">
@ -333,7 +305,7 @@ import { imgLocal } from '@/utils/common.js';
<input v-model="editDialog.data.ranking" type="digit" placeholder="请输入排位" /> <input v-model="editDialog.data.ranking" type="digit" placeholder="请输入排位" />
</view> </view>
<view class="formItem"> <view class="formItem">
<text>专科普通类 ({{ editSubjectLabels.trackName }})总分 (含加分)</text> <text>专科普通类 (历史)总分 (含加分)</text>
<input v-model="editDialog.data.technicalTotal" type="digit" placeholder="请输入专科总分" /> <input v-model="editDialog.data.technicalTotal" type="digit" placeholder="请输入专科总分" />
</view> </view>
<view class="formItem"> <view class="formItem">
@ -473,27 +445,6 @@ import { imgLocal } from '@/utils/common.js';
color: #333; color: #333;
text-align: right; 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 { .popup-footer {

View File

@ -6,7 +6,7 @@
<view class="footer-box"> <view class="footer-box">
<view class="btn" v-for="(item, index) in data.typeList" :key="index" :class="{ active: data.type == index }" <view class="btn" v-for="(item, index) in data.typeList" :key="index" :class="{ active: data.type == index }"
@click="setType(index)"> @click="setType(index)">
{{item}} 样式一
</view> </view>
</view> </view>
<view <view

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB