工资单新增样式,广东高考理科
This commit is contained in:
parent
3467d370ca
commit
007f0c7238
|
|
@ -14,6 +14,7 @@ import { imgLocal } from '@/utils/common.js';
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
bgImg:'',
|
bgImg:'',
|
||||||
form: {
|
form: {
|
||||||
|
subject: '文科',
|
||||||
avatar: '',
|
avatar: '',
|
||||||
name: '大王',
|
name: '大王',
|
||||||
idNumber: '',
|
idNumber: '',
|
||||||
|
|
@ -39,11 +40,25 @@ 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');
|
||||||
|
|
@ -55,7 +70,8 @@ import { imgLocal } from '@/utils/common.js';
|
||||||
if (cache) {
|
if (cache) {
|
||||||
data.form = {
|
data.form = {
|
||||||
...data.form,
|
...data.form,
|
||||||
...cache
|
...cache,
|
||||||
|
subject: cache.subject || '文科'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -66,6 +82,9 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -183,7 +202,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}}
|
||||||
|
|
@ -191,7 +210,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}}
|
||||||
|
|
@ -199,7 +218,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}}
|
||||||
|
|
@ -207,7 +226,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}}
|
||||||
|
|
@ -215,7 +234,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}}
|
||||||
|
|
@ -231,7 +250,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}}
|
||||||
|
|
@ -256,6 +275,15 @@ 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="请输入姓名" />
|
||||||
|
|
@ -281,23 +309,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>历史</text>
|
<text>{{ editSubjectLabels.subject3 }}</text>
|
||||||
<input v-model="editDialog.data.history" type="digit" placeholder="请输入历史成绩" />
|
<input v-model="editDialog.data.history" type="digit" :placeholder="'请输入' + editSubjectLabels.subject3 + '成绩'" />
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<text>思想政治</text>
|
<text>{{ editSubjectLabels.subject4 }}</text>
|
||||||
<input v-model="editDialog.data.politics" type="digit" placeholder="请输入思想政治成绩" />
|
<input v-model="editDialog.data.politics" type="digit" :placeholder="'请输入' + editSubjectLabels.subject4 + '成绩'" />
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<text>地理</text>
|
<text>{{ editSubjectLabels.subject5 }}</text>
|
||||||
<input v-model="editDialog.data.geography" type="digit" placeholder="请输入地理成绩" />
|
<input v-model="editDialog.data.geography" type="digit" :placeholder="'请输入' + editSubjectLabels.subject5 + '成绩'" />
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<text>普通类 (历史)总分</text>
|
<text>普通类 ({{ editSubjectLabels.trackName }})总分</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>本科普通类 (历史)总分 (含加分)</text>
|
<text>本科普通类 ({{ editSubjectLabels.trackName }})总分 (含加分)</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">
|
||||||
|
|
@ -305,7 +333,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>专科普通类 (历史)总分 (含加分)</text>
|
<text>专科普通类 ({{ editSubjectLabels.trackName }})总分 (含加分)</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">
|
||||||
|
|
@ -445,6 +473,27 @@ 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 {
|
||||||
|
|
|
||||||
|
|
@ -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.
|
After Width: | Height: | Size: 753 B |
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Loading…
Reference in New Issue