refactor: 界面优化
parent
e8eec5c38f
commit
ab1beec959
|
|
@ -36,7 +36,7 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, watch, nextTick, onMounted } from 'vue'
|
||||
import { ref, watch, nextTick, onMounted } from 'vue'
|
||||
|
||||
// 唯一ID,防止多个Tab组件冲突
|
||||
const tabScrollId = `tab-scroll-${Date.now()}`
|
||||
|
|
@ -201,7 +201,6 @@ const handleTabClick = (index) => {
|
|||
}
|
||||
|
||||
.tab-item.active .tab-text {
|
||||
font-weight: bold;
|
||||
color: v-bind('props.themeColor');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ const handleClose = () => {
|
|||
|
||||
&-content {
|
||||
max-height: 75vh;
|
||||
overflow-y: auto;
|
||||
min-height: 500rpx;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,10 @@ provide('dropMenu', {
|
|||
direction: props.direction,
|
||||
titles, // 提供titles给子组件
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
closeDropMenu,
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
|
|
@ -2,11 +2,12 @@
|
|||
<view
|
||||
class="flex items-center rounded-[48rpx] bg-[#F7F7F7]! px-[24rpx] py-[12rpx] w-[350rpx] ml-[32rpx]"
|
||||
>
|
||||
<view class="i-carbon-search text-[#d9d9d9]"></view>
|
||||
<view class="i-carbon-search text-[#999]"></view>
|
||||
<input
|
||||
v-model="searchValue"
|
||||
:placeholder="placeholder"
|
||||
confirm-type="done"
|
||||
placeholder-style="color:#999"
|
||||
class="text-start ml-20rpx"
|
||||
@confirm="handleConfirm"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
}"
|
||||
>
|
||||
<!-- 左侧区域 -->
|
||||
<view class="navbar-left" @click="handleClickLeft">
|
||||
<view :class="`navbar-left ${leftWidthMin ? 'w-m-[100rpx]' : ''}`" @click="handleClickLeft">
|
||||
<view v-if="leftArrow" class="back-icon">
|
||||
<view class="i-carbon-chevron-left text-[40rpx] text-[#333] font-semibold icon-class" />
|
||||
</view>
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: '',
|
||||
|
|
@ -86,6 +86,10 @@ const props = defineProps({
|
|||
type: String,
|
||||
default: 'justify-between',
|
||||
},
|
||||
leftWidthMin: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(['clickLeft'])
|
||||
|
|
@ -154,7 +158,6 @@ const handleClickLeft = () => {
|
|||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
min-width: 100rpx;
|
||||
}
|
||||
|
||||
.back-icon {
|
||||
|
|
|
|||
|
|
@ -1,56 +1,54 @@
|
|||
<template>
|
||||
<view
|
||||
v-if="show"
|
||||
class="overlay"
|
||||
:class="{ 'overlay-show': show }"
|
||||
:style="{
|
||||
'background-color': backgroundColor,
|
||||
'z-index': zIndex,
|
||||
}"
|
||||
@click="handleClick"
|
||||
@touchmove.prevent
|
||||
:style="{ zIndex }"
|
||||
>
|
||||
<slot></slot>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
show: boolean
|
||||
backgroundColor?: string
|
||||
zIndex?: number
|
||||
lockScroll?: boolean
|
||||
}>(),
|
||||
{
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.7)',
|
||||
zIndex: 10,
|
||||
lockScroll: true,
|
||||
const props = defineProps({
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
)
|
||||
zIndex: {
|
||||
type: Number,
|
||||
default: 10,
|
||||
},
|
||||
closeOnClickOverlay: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'click'): void
|
||||
}>()
|
||||
const emit = defineEmits(['click', 'update:show'])
|
||||
|
||||
const handleClick = (event: Event) => {
|
||||
emit('click')
|
||||
emit('click', event)
|
||||
if (props.closeOnClickOverlay) {
|
||||
emit('update:show', false)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
<style scoped>
|
||||
.overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
&-show {
|
||||
.overlay-show {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="flex flex-col p-[32rpx] bg-[#fff] mt-16rpx">
|
||||
<view class="flex flex-col px-[32rpx] pt-[32rpx] bg-[#fff] mt-16rpx">
|
||||
<text class="text-[32rpx] font-semibold text-[#333]">院系设置</text>
|
||||
|
||||
<WXXTable :data="tableData.slice(0, 4)" class="my-[24rpx]">
|
||||
|
|
@ -15,23 +15,21 @@
|
|||
<view class="i-carbon-chevron-down rotate-270"></view>
|
||||
</button>
|
||||
</view>
|
||||
<MessageBox v-model:show="show" title="院系设置">
|
||||
<template>
|
||||
<scroll-view class="max-h-600rpx mb-[32rpx] overflow-y-auto" :scroll-y="true">
|
||||
<ActionSheet v-model:show="show" title="院系设置" :show-close="true">
|
||||
<view class="mx-[32rpx]">
|
||||
<WXXTable :data="tableData">
|
||||
<WXXTableCol prop="name" label="学院" width="30%"></WXXTableCol>
|
||||
<WXXTableCol prop="major" label="所含专业" width="70%"></WXXTableCol>
|
||||
</WXXTable>
|
||||
</scroll-view>
|
||||
</template>
|
||||
</MessageBox>
|
||||
</view>
|
||||
</ActionSheet>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import MessageBox from '@/pages-sub/components/messageBox/MessageBox.vue'
|
||||
import WXXTable from '@/pages-sub/components/table/Table.vue'
|
||||
import WXXTableCol from '@/pages-sub/components/table/TableCol.vue'
|
||||
import { getUniversityListByProvince } from '@/service/index/api'
|
||||
import ActionSheet from '@/pages-sub/components/ActionSheet.vue'
|
||||
|
||||
const props = defineProps({
|
||||
id: {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
<template>
|
||||
<scroll-view class="pb-safe" :scroll-y="false">
|
||||
<view class="pb-safe overflow-y-auto">
|
||||
<view class="mx-[32rpx] border-item" v-for="item in recruits" :key="item.id">
|
||||
<view class="text-[#303030] text-[28rpx] font-normal py-[32rpx]" @click="navigateTo(item.id)">
|
||||
<view
|
||||
class="text-[#303030] text-[28rpx] font-normal py-[32rpx] flex items-center justify-between"
|
||||
@click="navigateTo(item.id)"
|
||||
>
|
||||
{{ item.title }}
|
||||
<view class="i-carbon-chevron-down rotate-270"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
<view
|
||||
@click="handleShow(1)"
|
||||
class="px-[24rpx] py-[8rpx] bg-[#f8f8f8] rounded-[8rpx] flex justify-between items-center text-[24rpx]"
|
||||
v-show="year"
|
||||
>
|
||||
{{ year }}
|
||||
<view class="i-carbon-chevron-down rotate-270"></view>
|
||||
|
|
@ -14,6 +15,7 @@
|
|||
<view
|
||||
@click="handleShow(2)"
|
||||
class="px-[24rpx] py-[8rpx] bg-[#f8f8f8] rounded-[8rpx] flex justify-between items-center text-[24rpx]"
|
||||
v-show="batche"
|
||||
>
|
||||
{{ batche }}
|
||||
<view class="i-carbon-chevron-down rotate-270"></view>
|
||||
|
|
@ -35,7 +37,7 @@
|
|||
<CustomPickerView :list="pickList" v-model:modelValue="pickValue" />
|
||||
</view>
|
||||
<template #footer>
|
||||
<view class="flex items-center justify-between px-[32rpx]">
|
||||
<view class="flex items-center justify-between px-[32rpx] gap-[32rpx]">
|
||||
<view class="cancel-btn" @click="show = false">取消</view>
|
||||
<view class="submit-btn" @click="handleConfirm">确认</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<view class="flex flex-col p-[32rpx] bg-[#fff] mt-16rpx" v-show="subjectIntroduceList.length > 0">
|
||||
<view class="flex flex-col p-[32rpx] bg-[#fff]" v-show="subjectIntroduceList.length > 0">
|
||||
<text class="text-[32rpx] font-semibold text-[#333]">
|
||||
双一流学科·{{ subjectIntroduceList.length }}
|
||||
</text>
|
||||
<text class="text-[22rpx] font-normal text-[#636363] my-[24rpx] line-clamp-3">
|
||||
<text class="text-[24rpx] font-normal text-[#636363] my-[24rpx] line-clamp-3">
|
||||
{{ subjectIntroduceList.join(',') }}
|
||||
</text>
|
||||
<button
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
<text class="text-[32rpx] font-semibold text-[#333]">
|
||||
学科评估·{{ assessmentSubjectList.length }}
|
||||
</text>
|
||||
<text class="text-[22rpx] font-normal text-[#636363] my-[24rpx] line-clamp-3">
|
||||
<text class="text-[24rpx] font-normal text-[#636363] my-[24rpx] line-clamp-3">
|
||||
{{ assessmentSubjectList.join(',') }}
|
||||
</text>
|
||||
<button
|
||||
|
|
@ -34,11 +34,11 @@
|
|||
<view class="i-carbon-chevron-down rotate-270"></view>
|
||||
</button>
|
||||
</view>
|
||||
<view class="flex flex-col p-[32rpx] bg-[#fff] mt-[16rpx]">
|
||||
<view class="flex flex-col p-[32rpx] bg-[#fff] mt-[16rpx]" v-show="featureSubjectList.length > 0">
|
||||
<text class="text-[32rpx] font-semibold text-[#333]">
|
||||
特色专业·{{ featureSubjectList.length }}
|
||||
</text>
|
||||
<text class="text-[22rpx] font-normal text-[#636363] my-[24rpx]">
|
||||
<text class="text-[24rpx] font-normal text-[#636363] my-[24rpx]">
|
||||
{{ featureSubjectList.join(',') }}
|
||||
</text>
|
||||
<button
|
||||
|
|
@ -51,16 +51,16 @@
|
|||
</button>
|
||||
</view>
|
||||
|
||||
<MessageBox v-model:show="show" :title="title">
|
||||
<template>
|
||||
<view class="text-[22rpx] text-[#636363] max-h-600rpx mb-[32rpx]">{{ innerContent }}</view>
|
||||
</template>
|
||||
</MessageBox>
|
||||
<ActionSheet v-model:show="show" :title="title" :show-close="true">
|
||||
<view class="text-[24rpx] text-[#636363] px-[32rpx] pt-[32rpx]">
|
||||
{{ innerContent }}
|
||||
</view>
|
||||
</ActionSheet>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getSubjectIntroduceList } from '@/service/index/api'
|
||||
import MessageBox from '@/pages-sub/components/messageBox/MessageBox.vue'
|
||||
import ActionSheet from '@/pages-sub/components/ActionSheet.vue'
|
||||
|
||||
const subjectIntroduceList = ref([])
|
||||
const assessmentSubjectList = ref([])
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="line-clamp-4 mt-[14rpx] text-[22rpx] text-[#636363]">
|
||||
<view class="line-clamp-4 mt-[14rpx] text-[24rpx] text-[#636363]">
|
||||
{{ universityResult?.detail }}
|
||||
</view>
|
||||
<button
|
||||
|
|
@ -35,19 +35,18 @@
|
|||
<view class="i-carbon-chevron-down rotate-270"></view>
|
||||
</button>
|
||||
|
||||
<MessageBox v-model:show="show" title="院校简介">
|
||||
<template>
|
||||
<scroll-view class="text-[22rpx] text-[#636363] max-h-600rpx mb-[32rpx]" :scroll-y="true">
|
||||
<ActionSheet v-model:show="show" title="院校简介" :show-close="true">
|
||||
<view class="text-[22rpx] text-[#636363] px-[32rpx] pt-[32rpx]">
|
||||
{{ universityResult?.detail }}
|
||||
</scroll-view>
|
||||
</template>
|
||||
</MessageBox>
|
||||
</view>
|
||||
</ActionSheet>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { UniversityResult } from '@/types/app-type'
|
||||
import MessageBox from '@/pages-sub/components/messageBox/MessageBox.vue'
|
||||
|
||||
import ActionSheet from '@/pages-sub/components/ActionSheet.vue'
|
||||
|
||||
defineProps({
|
||||
universityResult: {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@
|
|||
/>
|
||||
</template>
|
||||
</Navbar>
|
||||
<drop-menu>
|
||||
<view style="box-shadow: 0rpx 8rpx 8rpx 0rpx rgba(225, 225, 225, 0.2)">
|
||||
<drop-menu ref="dropMenuRef">
|
||||
<drop-menu-item
|
||||
v-for="item in subMenu"
|
||||
:key="item.id"
|
||||
|
|
@ -44,12 +45,32 @@
|
|||
custom-class="flex items-center"
|
||||
>
|
||||
<view class="mx-[24rpx] my-[16rpx]">
|
||||
<Region v-if="currentMenu === 1" @changeName="handleRegionChange" />
|
||||
<Nature v-if="currentMenu === 2" @changeName="handleNatureChange" />
|
||||
<UniType v-if="currentMenu === 3" @changeName="handleUniTypeChange" />
|
||||
<Region
|
||||
:defaultValue="regionKeyInfo"
|
||||
v-if="currentMenu === 1"
|
||||
@changeName="handleRegionChange"
|
||||
@change="handleRegionIdChange"
|
||||
/>
|
||||
<Nature
|
||||
v-if="currentMenu === 2"
|
||||
:defaultValue="natureKeyInfo"
|
||||
@changeName="handleNatureChange"
|
||||
@change="handleNatureIdChange"
|
||||
/>
|
||||
<UniType
|
||||
v-if="currentMenu === 3"
|
||||
:defaultValue="uniTypeKeyInfo"
|
||||
@changeName="handleUniTypeChange"
|
||||
@change="handleUniTypeIdChange"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center justify-between px-[32rpx] pb-[32rpx]">
|
||||
<view class="cancel-btn" @click="handleClear">清空</view>
|
||||
<view class="submit-btn" @click="handleCheck">查看</view>
|
||||
</view>
|
||||
</drop-menu-item>
|
||||
</drop-menu>
|
||||
</view>
|
||||
</template>
|
||||
<view
|
||||
class="item-wrapper"
|
||||
|
|
@ -60,21 +81,21 @@
|
|||
>
|
||||
<view class="flex items-center p-[32rpx] w-full">
|
||||
<image class="w-[80rpx] h-[80rpx] ml-[18rpx] mr-[24rpx]" :src="item.logo"></image>
|
||||
<view class="flex justify-between items-center flex-1">
|
||||
<view class="flex flex-col" hover-class="none">
|
||||
<view class="flex justify-between items-center flex-1 overflow-y-hidden">
|
||||
<view class="flex flex-col w-full" hover-class="none">
|
||||
<text class="text-[28rpx] text-[#333] font-semibold mb-[6rpx]">
|
||||
{{ item.name }}
|
||||
</text>
|
||||
<view class="flex items-center gap-[8rpx] mb-[16rpx]">
|
||||
<view class="flex items-center gap-[8rpx] mb-[16rpx] max-w-[90%]">
|
||||
<view
|
||||
class="truncate max-w-[176rpx] bg-[#f8f8f8] rounded-[4rpx] text-[20rpx] px-[8rpx] py-[2rpx]"
|
||||
class="truncate bg-[#f8f8f8] rounded-[4rpx] text-[20rpx] px-[8rpx] py-[2rpx] text-[#666]"
|
||||
v-for="(fea, fIndex) in item.features.slice(0, 5)"
|
||||
:key="fIndex"
|
||||
>
|
||||
{{ fea }}
|
||||
</view>
|
||||
</view>
|
||||
<text class="text-[22rpx] text-[#999] font-normal">
|
||||
<text class="text-[22rpx] text-[#333] font-normal">
|
||||
{{ item.cityName }}.{{ item.nature }}
|
||||
</text>
|
||||
</view>
|
||||
|
|
@ -113,10 +134,16 @@ const subMenu = [
|
|||
{ id: 3, title: '类型' },
|
||||
]
|
||||
|
||||
const dropMenuRef = ref()
|
||||
|
||||
const regionInfo = ref([]) // 省份信息
|
||||
const uniTypeInfo = ref([]) // 层次信息
|
||||
const natureInfo = ref([]) // 类型信息
|
||||
|
||||
const regionKeyInfo = ref([]) // 省份信息
|
||||
const uniTypeKeyInfo = ref([]) // 层次信息
|
||||
const natureKeyInfo = ref([]) // 类型信息
|
||||
|
||||
const currentMenu = ref(1)
|
||||
const handleOpenSubMenu = (id: number) => {
|
||||
currentMenu.value = id
|
||||
|
|
@ -147,19 +174,40 @@ const itemClick = (item, index) => {
|
|||
uni.navigateTo({ url: `/pages-sub/home/college/info?collegeId=${item._id}` })
|
||||
}
|
||||
|
||||
const handleClear = () => {
|
||||
regionKeyInfo.value = []
|
||||
uniTypeKeyInfo.value = []
|
||||
natureKeyInfo.value = []
|
||||
dropMenuRef.value.closeDropMenu()
|
||||
}
|
||||
|
||||
const handleRegionIdChange = (val) => {
|
||||
regionKeyInfo.value = val
|
||||
}
|
||||
|
||||
const handleRegionChange = (val) => {
|
||||
regionInfo.value = val
|
||||
paging.value.reload()
|
||||
}
|
||||
|
||||
const handleUniTypeIdChange = (val) => {
|
||||
uniTypeKeyInfo.value = val
|
||||
}
|
||||
|
||||
const handleUniTypeChange = (val) => {
|
||||
uniTypeInfo.value = val
|
||||
paging.value.reload()
|
||||
}
|
||||
|
||||
const handleNatureIdChange = (val) => {
|
||||
natureKeyInfo.value = val
|
||||
}
|
||||
|
||||
const handleNatureChange = (val) => {
|
||||
natureInfo.value = val
|
||||
}
|
||||
|
||||
const handleCheck = () => {
|
||||
paging.value.reload()
|
||||
dropMenuRef.value.closeDropMenu()
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
|
|
@ -169,4 +217,5 @@ onShow(() => {
|
|||
|
||||
<style lang="scss" scoped>
|
||||
@import '../styles/navbar_search.scss';
|
||||
@import '@/pages-sub/home/styles/picker-view-btn.scss';
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -15,12 +15,13 @@
|
|||
:bordered="false"
|
||||
left-arrow
|
||||
@click-left="navigatorBack"
|
||||
:title="universityBaseInfo?.universityResult.name"
|
||||
content-class="justify-between"
|
||||
></Navbar>
|
||||
<view class="custom-background h-[200rpx] w-full absolute top-0 left-0 z-[-1]"></view>
|
||||
</view>
|
||||
|
||||
<scroll-view class="flex-1 flex flex-col pb-safe" :scroll-y="true">
|
||||
<view class="flex-1 flex flex-col pb-safe overflow-y-auto">
|
||||
<view class="flex items-center p-[32rpx]" hover-class="none">
|
||||
<image
|
||||
class="w-[104rpx] h-[104rpx]"
|
||||
|
|
@ -47,7 +48,7 @@
|
|||
</button>
|
||||
</view>
|
||||
|
||||
<view class="card-swiper mb-[32rpx] h-[126rpx]">
|
||||
<view class="mb-[32rpx] h-[126rpx]">
|
||||
<swiper
|
||||
class="mx-[32rpx]"
|
||||
circular
|
||||
|
|
@ -56,15 +57,20 @@
|
|||
:display-multiple-items="universityBaseInfo?.universityResult.imglist ? 3 : 0"
|
||||
>
|
||||
<swiper-item
|
||||
v-for="item in universityBaseInfo?.universityResult.imglist"
|
||||
v-for="(item, index) in universityBaseInfo?.universityResult.imglist"
|
||||
:key="item"
|
||||
class="flex justify-center"
|
||||
>
|
||||
<image :src="item" mode="scaleToFill" class="w-full h-full mx-[4rpx] rounded-[8rpx]" />
|
||||
<image
|
||||
:src="item"
|
||||
mode="scaleToFill"
|
||||
class="w-full h-full mx-[4rpx] rounded-[8rpx]"
|
||||
@click.stop="handlePreviewImage(item, index)"
|
||||
/>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
<view class="sticky top-0 z-9">
|
||||
<z-tabs
|
||||
:current="currentTab"
|
||||
:list="tabsList"
|
||||
|
|
@ -72,10 +78,10 @@
|
|||
inactive-color="#BFBFBF"
|
||||
active-color="#303030"
|
||||
:bar-style="{ backgroundColor: '#1580FF' }"
|
||||
:tabsStyle="{ position: 'sticky', top: '0', zIndex: '9' }"
|
||||
@change="handleTabChange"
|
||||
v-bind="{} as any"
|
||||
/>
|
||||
</view>
|
||||
<view class="bg-[#f8f8f8]" v-show="currentTab === 0">
|
||||
<Profile :university-result="universityBaseInfo?.universityResult" />
|
||||
<FirstClass :id="collegeId" />
|
||||
|
|
@ -87,7 +93,7 @@
|
|||
<EnrollmentIntro :id="collegeId" v-show="currentTab === 2" />
|
||||
<EnrollmentMark :id="collegeId" v-show="currentTab === 3" />
|
||||
<Situation :id="collegeId" v-show="currentTab === 4" />
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -119,6 +125,13 @@ const universityBaseInfo = ref()
|
|||
|
||||
const collegeId = ref(0)
|
||||
|
||||
const handlePreviewImage = (src: string, index: number) => {
|
||||
uni.previewImage({
|
||||
urls: universityBaseInfo.value?.universityResult.imglist,
|
||||
current: index,
|
||||
})
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
collegeId.value = Number(options.collegeId) || 0
|
||||
getUniversityInfo({ Id: collegeId.value }).then((res) => {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
<CheckGroup
|
||||
:list="infoList"
|
||||
@change="handleChange"
|
||||
:default-value="defaultInfo"
|
||||
value-key="id"
|
||||
label-key="name"
|
||||
v-bind="$attrs"
|
||||
|
|
@ -21,12 +20,11 @@ getNature().then((res) => {
|
|||
}
|
||||
})
|
||||
|
||||
const defaultInfo = ref<string[]>([])
|
||||
|
||||
const emits = defineEmits(['changeName'])
|
||||
const emits = defineEmits(['changeName', 'change'])
|
||||
|
||||
const handleChange = (val: any) => {
|
||||
const names = infoList.value.filter((item) => val.includes(item.id)).map((item) => item.name)
|
||||
emits('changeName', names)
|
||||
emits('change', val)
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getBatchData, getWxUserInfo } from '@/service/index/api'
|
||||
import { getBatchDynamicData, getWxUserInfo } from '@/service/index/api'
|
||||
import RadioGroup from '@/pages-sub/components/radio-group/RadioGroup.vue'
|
||||
import Radio from '@/pages-sub/components/radio-group/Radio.vue'
|
||||
import { useUserStore } from '@/store/user'
|
||||
|
|
@ -37,9 +37,14 @@ const choosePhase = ref('')
|
|||
const emits = defineEmits(['changeName', 'change'])
|
||||
|
||||
const fetchBatchData = () => {
|
||||
getBatchData(userStore.userInfo.batchDataUrl).then((res) => {
|
||||
let _provinceCode = userStore.userInfo.estimatedAchievement.provinceCode
|
||||
let _requireSubject = userStore.userInfo.estimatedAchievement.requireSubject
|
||||
getBatchDynamicData({
|
||||
LocationCode: _provinceCode,
|
||||
Course: _requireSubject.length > 0 ? _requireSubject[0].name : '',
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
phaseList.value = res.result[0].batches
|
||||
phaseList.value = (res.result as { batches: any[] }).batches
|
||||
}
|
||||
})
|
||||
choosePhase.value = userStore.userInfo.batchName
|
||||
|
|
@ -47,26 +52,27 @@ const fetchBatchData = () => {
|
|||
}
|
||||
|
||||
onLoad(() => {
|
||||
if (userStore.userInfo.batchDataUrl) {
|
||||
fetchBatchData()
|
||||
} else {
|
||||
getWxUserInfo().then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
const infoData = resp.result as unknown as {
|
||||
userExtend: { provinceCode: string }
|
||||
zyBatches: any[]
|
||||
batchDataUrl: string
|
||||
batchName: string
|
||||
}
|
||||
userStore.setEstimatedAchievement(infoData.userExtend)
|
||||
userStore.setZyBatches(infoData.zyBatches)
|
||||
userStore.setBatchDataUrl(infoData.batchDataUrl)
|
||||
userStore.setBatchName(infoData.batchName)
|
||||
// if (userStore.userInfo.batchDataUrl) {
|
||||
// fetchBatchData()
|
||||
// } else {
|
||||
// getWxUserInfo().then((resp) => {
|
||||
// if (resp.code === 200) {
|
||||
// const infoData = resp.result as unknown as {
|
||||
// userExtend: { provinceCode: string }
|
||||
// zyBatches: any[]
|
||||
// batchDataUrl: string
|
||||
// batchName: string
|
||||
// }
|
||||
// userStore.setEstimatedAchievement(infoData.userExtend)
|
||||
// userStore.setZyBatches(infoData.zyBatches)
|
||||
// userStore.setBatchDataUrl(infoData.batchDataUrl)
|
||||
// userStore.setBatchName(infoData.batchName)
|
||||
|
||||
fetchBatchData()
|
||||
}
|
||||
})
|
||||
}
|
||||
// fetchBatchData()
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
})
|
||||
|
||||
const handleChange = (val: string) => {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ export default defineComponent({
|
|||
|
||||
<style scoped>
|
||||
.progress-bar {
|
||||
width: 100%;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
|
|
|
|||
|
|
@ -30,8 +30,7 @@
|
|||
<input
|
||||
v-model="score"
|
||||
placeholder="请输入分数"
|
||||
@confirm="handleChange"
|
||||
input-mode="numeric"
|
||||
@input="handleChange"
|
||||
type="number"
|
||||
:focus="true"
|
||||
class="flex-1"
|
||||
|
|
@ -80,7 +79,7 @@
|
|||
({{ optionalSubjectList.length }}选{{ requireSubjectList.length > 0 ? 2 : 3 }})
|
||||
</text>
|
||||
</view>
|
||||
<CheckboxGroup v-model="optionalSubject" :max="3">
|
||||
<CheckboxGroup v-model="optionalSubject" :max="requireSubjectList.length > 0 ? 2 : 3">
|
||||
<Checkbox
|
||||
v-for="item in optionalSubjectList"
|
||||
:key="item.code"
|
||||
|
|
@ -179,7 +178,8 @@ const btnFlag = computed(() => {
|
|||
|
||||
onShow(() => {
|
||||
userStore.$subscribe(() => {
|
||||
requireSubject.value = userStore.userInfo.estimatedAchievement.requireSubject[0].code ?? ''
|
||||
const _requireSubject = userStore.userInfo.estimatedAchievement.requireSubject
|
||||
requireSubject.value = _requireSubject.length > 0 ? _requireSubject[0].code : ''
|
||||
optionalSubject.value = userStore.userInfo.estimatedAchievement.optionalSubject.map(
|
||||
(item) => item.code,
|
||||
)
|
||||
|
|
@ -206,10 +206,9 @@ const saveScore = () => {
|
|||
|
||||
const subjects = data.optionalSubject
|
||||
.map((item) => item.simplename)
|
||||
.concat(data.requireSubject ? data.requireSubject[0].simplename : [])
|
||||
.concat(data.requireSubject.length > 0 ? data.requireSubject[0].simplename : [])
|
||||
.join(',')
|
||||
|
||||
console.log(subjects, data.requireSubject)
|
||||
userStore.setEstimatedAchievement({
|
||||
...data,
|
||||
subjectGroup: subjects,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="flex flex-col py-[32rpx] px-[24rpx] bg-[#fff] mt-16rpx">
|
||||
<text class="text-[32rpx] font-semibold text-[#333]">就业方向</text>
|
||||
<text class="text-[22rpx] font-normal text-[#636363] my-[24rpx] line-clamp-3">
|
||||
<text class="text-[24rpx] font-normal text-[#636363] my-[24rpx] line-clamp-3">
|
||||
{{ careerInfo.jobs || '暂无' }}
|
||||
</text>
|
||||
<button
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
<view class="h-[16rpx] bg-[#f8f8f8]"></view>
|
||||
<view class="flex flex-col py-[32rpx] px-[24rpx] bg-[#fff]">
|
||||
<text class="text-[32rpx] font-semibold text-[#333]">具体职位</text>
|
||||
<text class="text-[22rpx] font-normal text-[#636363] my-[24rpx] line-clamp-3">
|
||||
<text class="text-[24rpx] font-normal text-[#636363] my-[24rpx] line-clamp-3">
|
||||
{{ careerInfo.profession || '暂无' }}
|
||||
</text>
|
||||
<button
|
||||
|
|
@ -34,31 +34,25 @@
|
|||
<view class="flex flex-col py-[32rpx] px-[24rpx] bg-[#fff]">
|
||||
<text class="text-[32rpx] font-semibold text-[#333]">从事行业</text>
|
||||
<view class="my-[24rpx] flex flex-col gap-[30rpx]">
|
||||
<view
|
||||
v-for="item in careerInfo.rates"
|
||||
:key="item.key"
|
||||
class="grid grid-cols-12 gap-[16rpx] items-center"
|
||||
>
|
||||
<text class="col-span-4">{{ item.key }}</text>
|
||||
<ProgressBar :progress="item.value" class="flex-1 col-span-7 h-[16rpx]" />
|
||||
<text class="col-span-1">{{ item.value }}%</text>
|
||||
<view v-for="item in careerInfo.rates" :key="item.key" class="grid grid-cols-12 items-center">
|
||||
<text class="col-span-4 text-[24rpx]">{{ item.key }}</text>
|
||||
<ProgressBar :progress="item.value ?? 0" class="col-span-6 h-[16rpx]" />
|
||||
<text class="col-span-2 text-end">{{ item.value ?? 0 }}%</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<MessageBox v-model:show="show" :title="title">
|
||||
<template>
|
||||
<view class="text-[22rpx] text-[#636363] max-h-600rpx mb-[32rpx]" v-show="showType !== 3">
|
||||
<ActionSheet v-model:show="show" :title="title" :show-close="true">
|
||||
<view class="mx-[32rpx] mt-[32rpx] text-[24rpx] text-[#636363]" v-show="showType !== 3">
|
||||
{{ innerContent }}
|
||||
</view>
|
||||
</template>
|
||||
</MessageBox>
|
||||
</ActionSheet>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import MessageBox from '@/pages-sub/components/messageBox/MessageBox.vue'
|
||||
import { getCareerProspects } from '@/service/index/api'
|
||||
import ProgressBar from '../../components/ProgressBar.vue'
|
||||
import ActionSheet from '@/pages-sub/components/ActionSheet.vue'
|
||||
|
||||
const props = defineProps({
|
||||
zydm: {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<view class="flex flex-col py-[32rpx] px-[24rpx] bg-[#fff] mt-16rpx">
|
||||
<text class="text-[32rpx] font-semibold text-[#333]">专业介绍</text>
|
||||
<text class="text-[24rpx] font-semibold text-[#333] mt-[32rpx] mb-[26rpx]">专业简介</text>
|
||||
<text class="text-[22rpx] font-normal text-[#636363] my-[24rpx] line-clamp-3">
|
||||
<text class="text-[24rpx] font-normal text-[#636363] my-[24rpx] line-clamp-3">
|
||||
{{ zyjx || '暂无' }}
|
||||
</text>
|
||||
<button
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
<view class="flex flex-col py-[32rpx] px-[24rpx] bg-[#fff]">
|
||||
<text class="text-[32rpx] font-semibold text-[#333]">课程要求</text>
|
||||
<text class="text-[24rpx] font-semibold text-[#333] mt-[32rpx] mb-[26rpx]">主干课程</text>
|
||||
<text class="text-[22rpx] font-normal text-[#636363] my-[24rpx] line-clamp-3">
|
||||
<text class="text-[24rpx] font-normal text-[#636363] my-[24rpx] line-clamp-3">
|
||||
{{ kyfx.map((item) => item.zymc).join(',') || '暂无' }}
|
||||
</text>
|
||||
|
||||
|
|
@ -50,26 +50,23 @@
|
|||
<view class="i-carbon-chevron-down rotate-270"></view>
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<MessageBox v-model:show="show" :title="title">
|
||||
<template>
|
||||
<view class="text-[22rpx] text-[#636363] max-h-600rpx mb-[32rpx]" v-show="showType !== 3">
|
||||
<ActionSheet v-model:show="show" :title="title" :show-close="true">
|
||||
<view class="mx-[32rpx] mt-[32rpx]">
|
||||
<view class="text-[24rpx] text-[#636363]" v-show="showType !== 3">
|
||||
{{ innerContent }}
|
||||
</view>
|
||||
<scroll-view class="max-h-600rpx mb-[32rpx] overflow-y-auto" :scroll-y="true">
|
||||
<WXXTable :data="courseInfo" class="my-[24rpx]" v-show="showType === 3">
|
||||
<WXXTable :data="courseInfo" class="" v-show="showType === 3">
|
||||
>
|
||||
<WXXTableCol prop="kcmc" label="课程名称" width="50%"></WXXTableCol>
|
||||
<WXXTableCol prop="difficulty" label="课程难易度" width="25%"></WXXTableCol>
|
||||
<WXXTableCol prop="practicality" label="课程实用度" width="25%"></WXXTableCol>
|
||||
</WXXTable>
|
||||
</scroll-view>
|
||||
</template>
|
||||
</MessageBox>
|
||||
</view>
|
||||
</ActionSheet>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import MessageBox from '@/pages-sub/components/messageBox/MessageBox.vue'
|
||||
import ActionSheet from '@/pages-sub/components/ActionSheet.vue'
|
||||
import WXXTable from '@/pages-sub/components/table/Table.vue'
|
||||
import WXXTableCol from '@/pages-sub/components/table/TableCol.vue'
|
||||
import { getMajorCourse } from '@/service/index/api'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="bg-white flex w-full flex-1">
|
||||
<view class="w-[260rpx] bg-[#F7F8FA] flex flex-col items-center">
|
||||
<view class="bg-white flex h-full">
|
||||
<view class="w-[260rpx] bg-[#F7F8FA] flex flex-col items-center overflow-y-auto h-full">
|
||||
<view
|
||||
v-for="item in menus"
|
||||
:key="item.key"
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-1 mt-[40rpx] flex flex-col">
|
||||
<view class="flex-1 mt-[40rpx] flex flex-col overflow-y-auto h-full">
|
||||
<MajorTreeList v-if="currentMenuObj" :sub-major-list="currentMenuObj" />
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -130,6 +130,6 @@ const handleConfirm = () => {
|
|||
<style lang="scss" scoped>
|
||||
@import '@/pages-sub/home/styles/picker-view-btn.scss';
|
||||
.border-bt {
|
||||
border-bottom: 1rpx solid #f8f8f8;
|
||||
border-bottom: 1rpx solid #ededed;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
</template>
|
||||
</Navbar>
|
||||
|
||||
<scroll-view class="flex-1 pb-safe flex flex-col" :scroll-y="true">
|
||||
<z-tabs
|
||||
:current="currentTab"
|
||||
:list="tabsList"
|
||||
|
|
@ -34,11 +33,26 @@
|
|||
@change="handleTabChange"
|
||||
v-bind="{} as any"
|
||||
/>
|
||||
|
||||
<MajorList :type="1050" :keyword="searchValue" v-show="currentTab === 0"></MajorList>
|
||||
<MajorList :type="1070" :keyword="searchValue" v-show="currentTab === 1"></MajorList>
|
||||
<MajorList :type="1060" :keyword="searchValue" v-show="currentTab === 2"></MajorList>
|
||||
</scroll-view>
|
||||
<view class="flex-1 pb-safe flex flex-col overflow-y-auto">
|
||||
<MajorList
|
||||
class="h-full"
|
||||
:type="1050"
|
||||
:keyword="searchValue"
|
||||
v-if="currentTab === 0"
|
||||
></MajorList>
|
||||
<MajorList
|
||||
class="h-full"
|
||||
:type="1070"
|
||||
:keyword="searchValue"
|
||||
v-if="currentTab === 1"
|
||||
></MajorList>
|
||||
<MajorList
|
||||
class="h-full"
|
||||
:type="1060"
|
||||
:keyword="searchValue"
|
||||
v-if="currentTab === 2"
|
||||
></MajorList>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
src="https://api.static.ycymedu.com/sub/images/schoolRank/trophy.jpg"
|
||||
/>
|
||||
</view>
|
||||
<view class="px-[32rpx] my-[24rpx]">
|
||||
<view class="my-[24rpx]">
|
||||
<z-tabs
|
||||
:current="tabIndex"
|
||||
:list="unSortTypeList"
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
{{ item.cityName }}.{{ item.uType }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="flex flex-col">
|
||||
<view class="flex flex-col items-end">
|
||||
<text class="text-[28rpx] text-[#333] font-medium mb-[10rpx]">{{ item.score }}</text>
|
||||
<text class="text-[22rpx] text-[#999] font-normal">综合得分</text>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { getBatchBase } from '@/service/index/api'
|
||||
import { getBatchDynamicData } from '@/service/index/api'
|
||||
|
||||
export const calcTypeName = (type: number) => {
|
||||
const style = {
|
||||
|
|
@ -66,11 +66,12 @@ export const countModel = (list: any[]) => {
|
|||
return { tModel }
|
||||
}
|
||||
|
||||
export const useScore = (provinceCode, batchName) => {
|
||||
export const useScore = (provinceCode, batchName, requireSubject) => {
|
||||
const score = ref(0)
|
||||
const minScore = ref(0)
|
||||
const maxScore = ref(0)
|
||||
getBatchBase({ locationCode: provinceCode }).then((resp) => {
|
||||
const _requireSubject = requireSubject.length > 0 ? requireSubject[0].name : ''
|
||||
getBatchDynamicData({ LocationCode: provinceCode, Course: _requireSubject }).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
const _result = resp.result as { batches: any[]; maxScore: number; minScore: number }
|
||||
if (_result.batches.length > 0) {
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@
|
|||
class="item-wrapper"
|
||||
:id="`zp-id-${item.zp_index}`"
|
||||
:key="item.zp_index"
|
||||
v-for="(item, index) in schoolList"
|
||||
@click="itemClick(item, index)"
|
||||
v-for="item in schoolList"
|
||||
@click="itemClick(item)"
|
||||
>
|
||||
<ScrollListItem
|
||||
:college="item"
|
||||
|
|
@ -196,7 +196,7 @@ const virtualListChange = (_vList) => {
|
|||
schoolList.value = _vList
|
||||
}
|
||||
|
||||
const itemClick = (item, index) => {
|
||||
const itemClick = (item) => {
|
||||
uni.navigateTo({ url: `/pages-sub/home/college/info?collegeId=${item.uId}` })
|
||||
}
|
||||
|
||||
|
|
@ -245,8 +245,8 @@ const handleRegionName = (val: string[]) => {
|
|||
}
|
||||
|
||||
const sliderValue = ref([
|
||||
+userStore.userInfo.estimatedAchievement.expectedScore - 50,
|
||||
+userStore.userInfo.estimatedAchievement.expectedScore + 50,
|
||||
+userStore.userInfo.estimatedAchievement.expectedScore - 100,
|
||||
+userStore.userInfo.estimatedAchievement.expectedScore,
|
||||
])
|
||||
const handleSliderChange = (val) => {
|
||||
paging.value.reload()
|
||||
|
|
@ -255,6 +255,7 @@ const handleSliderChange = (val) => {
|
|||
const { score, minScore, maxScore } = useScore(
|
||||
userStore.userInfo.estimatedAchievement.provinceCode,
|
||||
userStore.userInfo.batchName,
|
||||
userStore.userInfo.estimatedAchievement.requireSubject,
|
||||
)
|
||||
|
||||
const handlePreview = () => {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<template>
|
||||
<view class="flex flex-col h-screen">
|
||||
<Tabs v-model:modelValue="currentIndex" :tabs="tabs"></Tabs>
|
||||
<swiper class="flex-1" :current="currentIndex">
|
||||
<swiper class="flex-1" :current="currentIndex" @change="handleSwiperChange">
|
||||
<swiper-item>
|
||||
<view class="mx-[32rpx] overflow-auto h-full">
|
||||
<EvaluationItem v-for="item in academicList" :key="item.id" :item="item"></EvaluationItem>
|
||||
|
|
@ -54,6 +54,11 @@ const currentIndex = ref(0)
|
|||
const academicList = ref([])
|
||||
const healthList = ref([])
|
||||
const learningList = ref([])
|
||||
|
||||
const handleSwiperChange = (val) => {
|
||||
currentIndex.value = val.detail.current
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
getEvaluationList({ menuid: '340509778657349' }).then((res) => {
|
||||
academicList.value = res.result as any[]
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ const opacity = ref(0)
|
|||
|
||||
onPageScroll((e) => {
|
||||
const scrollTop = e.scrollTop
|
||||
// 在0-100px的滚动范围内,透明度从0渐变到1
|
||||
opacity.value = Math.min(scrollTop / 100, 1)
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -441,3 +441,7 @@ export const getOpinionAbout = (params: { ScaleId: number }) => {
|
|||
export const downloadPDF = (params: { id: number; location: string }) => {
|
||||
return http.get('/api/volunTb/downloadpdfUrl', params)
|
||||
}
|
||||
|
||||
export const getBatchDynamicData = (params: { LocationCode: string; Course: string }) => {
|
||||
return http.get('/api/busBatchBase/batch', params)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ const initState = {
|
|||
estimatedAchievement: {
|
||||
year: 0, // 学期
|
||||
expectedScore: '', // 成绩
|
||||
requireSubject: { code: 0, name: '', simplename: '' },
|
||||
requireSubject: [],
|
||||
optionalSubject: [],
|
||||
provinceCode: '',
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ export const useUserStore = defineStore(
|
|||
userInfo.value.estimatedAchievement = Object.assign(userInfo.value.estimatedAchievement, {
|
||||
year: 0, // 学期
|
||||
expectedScore: '', // 成绩
|
||||
requireSubject: { code: 0, name: '', simplename: '' },
|
||||
requireSubject: [],
|
||||
optionalSubject: [],
|
||||
provinceCode: '',
|
||||
subjectGroup: '',
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export type ExtraUserInfo = {
|
|||
estimatedAchievement: {
|
||||
year: number
|
||||
expectedScore: number | string
|
||||
requireSubject: Rule
|
||||
requireSubject: Rule[]
|
||||
optionalSubject: Rule[]
|
||||
provinceCode: string
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue