You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

337 lines
9.5 KiB

<template>
<view class="container safe-area-inset-bottom">
<view class="wrap">
<view class="picked-data">
<view>{{ detail.aspiration ? detail.aspiration.year : '-' }}</view>
<view>{{ detail.aspiration ? detail.aspiration.group : '-' }}</view>
</view>
<view class="card" v-for="batch in detail.data" :key="batch.batchId">
<view class="card__title">
<view class="batch__title">
{{ batch.name || '-' }}
</view>
</view>
<view class="card__body">
<view class="batch-sub" v-for="batchSub in batch.batchSubs" :key="batchSub.batchSubId">
<view class="batch-sub__title">
{{ batchSub.name || '-' }}
</view>
<view class="batch-sub__body">
<template v-if="hasSpecialty(batchSub.batchSubSchools)">
<view class="batch-sub-school" v-for="school in batchSub.batchSubSchools" :key="school.id">
<view class="batch-sub-school__form sub-form2">
<view class="sub-form2__row sub-form2-title">
<view class="sub-form2__col1">
志愿序号
</view>
<view class="sub-form2__col2">
代码
</view>
<view class="sub-form2__col3">
学校
</view>
</view>
<view class="sub-form2__row">
<view class="sub-form2__col1">
{{ school.name || '-' }}
</view>
<view class="sub-form2__col2">
{{ school.code || '-' }}
</view>
<view class="sub-form2__col3">
{{ school.value || '-' }}
</view>
</view>
</view>
<view class="batch-sub-school-specialty sub-form2" v-if="school.specialties && school.specialties.length > 0">
<view class="sub-form2__row sub-form2-title">
<view class="sub-form2__col1">
序号
</view>
<view class="sub-form2__col2">
代码
</view>
<view class="sub-form2__col3">
专业
</view>
</view>
<view class="sub-form2__row" v-for="(spec) in school.specialties" :key="spec.specialtyId">
<view class="sub-form2__col1">
{{ spec.name || '-' }}
</view>
<view class="sub-form2__col2">
{{ spec.code || '-' }}
</view>
<view class="sub-form2__col3">
{{ spec.value || '-' }}
</view>
</view>
</view>
<view class="batch-sub-is-obey" v-if="!batchSub.notShowSpecialtyObey">
<view>
其他专业是否服从
</view>
<u-radio-group disabled v-model="batchSub.specialtyObey">
<u-radio name="1">是</u-radio>
<u-radio name="0">否</u-radio>
</u-radio-group>
</view>
<view class="batch-sub-is-obey" v-if="!batchSub.notShowSchoolObey">
<view>
其他院校是否服从
</view>
<u-radio-group disabled v-model="batchSub.schoolObey">
<u-radio name="1">是</u-radio>
<u-radio name="0">否</u-radio>
</u-radio-group>
</view>
</view>
</template>
<template v-else>
<view class="batch-sub-school">
<view class="batch-sub-school__form sub-form1">
<view class="sub-form2__row sub-form1-title">
<view class="sub-form2__col1">
志愿序号
</view>
<view class="sub-form2__col2">
代码
</view>
<view class="sub-form2__col3">
学校
</view>
</view>
<view class="sub-form2__row" v-for="school in batchSub.batchSubSchools" :key="school.id">
<view class="sub-form2__col1">
{{ school.name || '-' }}
</view>
<view class="sub-form2__col2">
{{ school.code || '-' }}
</view>
<view class="sub-form2__col3">
{{ school.value || '-' }}
</view>
</view>
</view>
<view class="batch-sub-is-obey" v-if="!batchSub.notShowSpecialtyObey">
<view>
其他专业是否服从
</view>
<u-radio-group disabled v-model="batchSub.specialtyObey">
<u-radio name="1">是</u-radio>
<u-radio name="0">否</u-radio>
</u-radio-group>
</view>
<view class="batch-sub-is-obey" v-if="!batchSub.notShowSchoolObey">
<view>
其他院校是否服从
</view>
<u-radio-group disabled v-model="batchSub.schoolObey">
<u-radio name="1">是</u-radio>
<u-radio name="0">否</u-radio>
</u-radio-group>
</view>
</view>
</template>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
detail: {}
};
},
methods: {
async getDetail(id) {
try {
const { list } = await this.$u.api.batchDataDetail({ id })
console.log(list)
this.detail = list
} catch (err) {
console.error(err)
}
}
},
computed: {
hasSpecialty() {
return function (schools) {
return schools.reduce((pre, cur) => cur.specialties.length > 0, false)
}
}
},
onLoad(options) {
if (options.id) {
this.getDetail(options.id)
}
},
}
</script>
<style lang="scss">
.u-radio__icon-wrap--disabled--checked {
background: #4177f6 !important;
}
.container {
min-height: 100vh;
background: #eaf8fe;
.wrap {
padding-top: 20rpx;
.picked-data {
display: flex;
align-items: center;
border-radius: 20rpx;
filter: drop-shadow(-2.179rpx 3.355rpx 2.5rpx rgba(208,209,209,0.3));
background-color: rgba(255, 255, 255, 0.5);
margin: 0 24rpx ;
padding: 26rpx 160rpx;
& > view {
flex: 1;
text-align: center;
font-size: 32rpx;
text-transform: uppercase;
color: #333333;
font-weight: bold;
white-space: nowrap;
}
& > view + view {
margin-left: 10rpx;
}
}
.card {
margin: 28rpx 24rpx 0;
border-radius: 20rpx;
filter: drop-shadow(-2.179rpx 3.355rpx 2.5rpx rgba(208,209,209,0.3));
background-color: #ffffff;
&__title {
background: #fbf1e8;
border-radius: 20rpx 20rpx 0 0;
padding: 0 16rpx;
}
&__body {
padding: 34rpx 28rpx 52rpx 28rpx;
}
}
.card + .card {
margin-top: 22rpx;
}
}
}
.batch__title {
text-align: center;
font-size: 28rpx;
text-transform: uppercase;
color: #e77817;
font-weight: 500;
padding: 30rpx 20rpx;
}
.batch-sub {
&__title {
font-size: 28rpx;
text-transform: uppercase;
color: #333333;
font-weight: 500;
padding: 0 0 0 32rpx;
}
&-is-obey {
display: flex;
align-items: center;
margin-top: 40rpx;
& > view:nth-child(1) {
font-size: 24rpx;
text-transform: uppercase;
color: #333333;
font-weight: 500;
margin-right: 110rpx;
}
}
}
.batch-sub + .batch-sub {
margin-top: 50rpx;
}
.batch-sub-school {
}
.batch-sub-school + .batch-sub-school {
margin-top: 50rpx;
}
.sub-form1 {
text-align: center;
margin-top: 34rpx;
&-title {
font-size: 24rpx;
padding: 20rpx 0;
text-transform: uppercase;
background-color: #f6f8f7;
color: #333333;
font-weight: 500;
text-align: center;
}
&__row {
display: flex;
align-items: center;
justify-content: space-between;
}
&__col1 {
flex-basis: 29%;
}
&__col2 {
flex-basis: 67.5%;
}
}
.sub-form2 {
text-align: center;
margin-top: 34rpx;
&-title {
font-size: 24rpx;
padding: 20rpx 0;
text-transform: uppercase;
color: #333333;
font-weight: 500;
background-color: #f6f8f7;
text-align: center;
border-bottom: none !important;
}
&__row {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1rpx solid #e0e0e0;
padding: 22rpx 0;
}
&__col1 {
flex-basis: 20%;
text-transform: uppercase;
color: #333333;
}
&__col2 {
flex-basis: 24.8%;
}
&__col3 {
flex-basis: 47.9%;
}
}
</style>