|
|
|
|
@ -1,4 +1,11 @@
|
|
|
|
|
<template>
|
|
|
|
|
<page-meta
|
|
|
|
|
:page-style="`overflow:${
|
|
|
|
|
isShowRecommend
|
|
|
|
|
? 'hidden'
|
|
|
|
|
: 'visible'
|
|
|
|
|
};`"
|
|
|
|
|
></page-meta>
|
|
|
|
|
<view class="container safe-area-inset-bottom">
|
|
|
|
|
<image class="bkg" src="~@/static/me/wave.png" mode="widthFix"></image>
|
|
|
|
|
|
|
|
|
|
@ -23,7 +30,7 @@
|
|
|
|
|
<u-form-item label="所在县区" required prop="area_id">
|
|
|
|
|
<u-input type="select" :value="formArea" placeholder="请选择" input-align="right" @click="isShowAreaSelect = true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="所在学校" required prop="school_id">
|
|
|
|
|
<u-form-item label="所在学校" prop="school_id">
|
|
|
|
|
<u-input type="select" :value="form.school_name" placeholder="请输入" input-align="right" @click="isShowSchoolSelect = true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-form>
|
|
|
|
|
@ -97,6 +104,66 @@
|
|
|
|
|
<u-select v-model="isShowAreaSelect"
|
|
|
|
|
:list="areaList"
|
|
|
|
|
@confirm="areaConfirm"></u-select>
|
|
|
|
|
|
|
|
|
|
<u-popup v-model="isShowRecommend" border-radius="10" mode="bottom" safe-area-inset-bottom length="90%" closeable :custom-style="{ 'background': '#eaf9fe' }">
|
|
|
|
|
<view>
|
|
|
|
|
<view class="recommend-panel" v-for="(value, key) in {top:'冲',steady:'稳',safeguard:'保'}" :key="key">
|
|
|
|
|
<view class="recommend-panel__title">
|
|
|
|
|
“{{ value }}”推荐学校
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="recommend-panel__content">
|
|
|
|
|
<view class="list">
|
|
|
|
|
<view
|
|
|
|
|
class="list-item"
|
|
|
|
|
v-for="i in recommends[key]"
|
|
|
|
|
:key="i.id"
|
|
|
|
|
@click="$u.route({
|
|
|
|
|
url: '/package_sub/pages/SchoolDetail/SchoolDetail',
|
|
|
|
|
params: {
|
|
|
|
|
id: i.id
|
|
|
|
|
}
|
|
|
|
|
})">
|
|
|
|
|
<view class="left">
|
|
|
|
|
<image mode="aspectFill" class="list-item__img" :src="(i.icon && i.icon.url) ? i.icon.url : vuex_default_icon"></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="right">
|
|
|
|
|
<view class="list-item__title">
|
|
|
|
|
<text>{{ i.name }}</text>
|
|
|
|
|
<u-icon name="arrow-right" color="#333" :size="30"></u-icon>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="list-item__tags">
|
|
|
|
|
<view class="list-item__tags--area">
|
|
|
|
|
{{ schoolArea(i.area_id) }}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="list-item__tags--type" v-for="(tag, index1) in i.type" :key="index1">
|
|
|
|
|
{{ tag }}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="list-item__info">
|
|
|
|
|
办学性质:{{ i.nature === 1 ? '公办' : (i.nature === 2 ? '民办' : '-') }}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<u-button
|
|
|
|
|
shape="circle"
|
|
|
|
|
:custom-style="{
|
|
|
|
|
background: 'linear-gradient(to right, #2e63ef, #4186f2)',
|
|
|
|
|
height: '76rpx',
|
|
|
|
|
'line-height': '76rpx',
|
|
|
|
|
'color': '#fff',
|
|
|
|
|
'font-size': '33rpx',
|
|
|
|
|
'letter-spacing': '5rpx',
|
|
|
|
|
'width': '450rpx',
|
|
|
|
|
'margin': '60rpx auto 0'
|
|
|
|
|
}"
|
|
|
|
|
@click="">去模拟填报</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -135,26 +202,44 @@ export default {
|
|
|
|
|
is_stable: 1,
|
|
|
|
|
is_bare: 1
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
area_id: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择县区'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
isShowAreaSelect: false,
|
|
|
|
|
areaList: [],
|
|
|
|
|
isShowSchoolSelect: false,
|
|
|
|
|
schoolList: [],
|
|
|
|
|
|
|
|
|
|
recommends: {
|
|
|
|
|
top: [],
|
|
|
|
|
steady: [],
|
|
|
|
|
safeguard: []
|
|
|
|
|
},
|
|
|
|
|
isShowRecommend: false,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
vuex_user(newVal) {
|
|
|
|
|
const keys = new Map([
|
|
|
|
|
vuex_user: {
|
|
|
|
|
handler: function (newVal) {
|
|
|
|
|
const keys = new Map([
|
|
|
|
|
['middle_exam_year', 'year'],
|
|
|
|
|
['name', 'name'],
|
|
|
|
|
['sex', 'sex'],
|
|
|
|
|
['nationality', 'nationality']
|
|
|
|
|
])
|
|
|
|
|
Array.from(keys.keys()).forEach(key => {
|
|
|
|
|
if (newVal[key]) {
|
|
|
|
|
this.form[keys.get(key)] = newVal[key]
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
])
|
|
|
|
|
Array.from(keys.keys()).forEach(key => {
|
|
|
|
|
if (newVal[key]) {
|
|
|
|
|
this.form[keys.get(key)] = newVal[key]
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
immediate: true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
@ -176,6 +261,11 @@ export default {
|
|
|
|
|
if (this.regionType === 'area') {
|
|
|
|
|
return [this.form.province,this.form.city]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
schoolArea() {
|
|
|
|
|
return function (areaId) {
|
|
|
|
|
return this.areaList.find(i => i.value === areaId)?.label
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
@ -240,8 +330,12 @@ export default {
|
|
|
|
|
console.log(res)
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '提交成功',
|
|
|
|
|
icon: 'none'
|
|
|
|
|
icon: 'none',
|
|
|
|
|
duration: 1000
|
|
|
|
|
})
|
|
|
|
|
const { model } = res
|
|
|
|
|
this.recommends = model?.recommends
|
|
|
|
|
this.isShowRecommend = true
|
|
|
|
|
})
|
|
|
|
|
} catch (err) {
|
|
|
|
|
console.error(err)
|
|
|
|
|
@ -260,6 +354,9 @@ export default {
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
.u-drawer-bottom {
|
|
|
|
|
background: #eaf9fe !important;
|
|
|
|
|
}
|
|
|
|
|
.container {
|
|
|
|
|
position: relative;
|
|
|
|
|
min-height: 100vh;
|
|
|
|
|
@ -355,4 +452,90 @@ export default {
|
|
|
|
|
margin-left: 18rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.recommend-panel {
|
|
|
|
|
padding: 0 24rpx;
|
|
|
|
|
|
|
|
|
|
&__title {
|
|
|
|
|
font-size: 36rpx;
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
color: #333333;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
padding: 44rpx 0;
|
|
|
|
|
}
|
|
|
|
|
&__content {
|
|
|
|
|
.list {
|
|
|
|
|
|
|
|
|
|
&-item {
|
|
|
|
|
padding: 24rpx 28rpx 24rpx 32rpx;
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
filter: drop-shadow(-2.179px 3.355px 2.5px rgba(208,209,209,0.3));
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
.left {
|
|
|
|
|
.list-item__img {
|
|
|
|
|
border-radius: 100%;
|
|
|
|
|
height: 150rpx;
|
|
|
|
|
width: 150rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.right {
|
|
|
|
|
flex: 1;
|
|
|
|
|
margin-left: 34rpx;
|
|
|
|
|
|
|
|
|
|
.list-item__title {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
|
|
text {
|
|
|
|
|
max-width: 300rpx;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
color: #333333;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.list-item__tags {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
padding-top: 20rpx;
|
|
|
|
|
|
|
|
|
|
&--area {
|
|
|
|
|
color: #1a95da;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
background-color: rgba(26, 149, 218, 0.2);
|
|
|
|
|
padding: 8rpx 18rpx;
|
|
|
|
|
}
|
|
|
|
|
&--type {
|
|
|
|
|
color: #dd9447;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
background-color: rgba(233, 144, 50, 0.2);
|
|
|
|
|
padding: 6rpx 18rpx;
|
|
|
|
|
}
|
|
|
|
|
& > view + view {
|
|
|
|
|
margin-left: 10rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.list-item__info {
|
|
|
|
|
padding-top: 20rpx;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
color: rgba(51, 51, 51, 0.8);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.list-item + .list-item {
|
|
|
|
|
margin-top: 24rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|