feat: 功能需求增加
parent
c35933f251
commit
51fb07329f
|
|
@ -0,0 +1,100 @@
|
|||
<template>
|
||||
<view class="flex items-center pt-[14rpx] pb-[20rpx] justify-center">
|
||||
<view
|
||||
class="w-[84rpx] h-[36rpx] rounded-full border-[#187CFF] border-solid border-[2rpx] flex items-center px-[18rpx] py-[10rpx] text-[#1580FF] text-[26rpx] bg-[rgba(21,128,255,0.1)]"
|
||||
>
|
||||
<input
|
||||
v-model="currentLeftValue"
|
||||
class="leading-[1] h-auto! min-h-auto! text-right!"
|
||||
type="number"
|
||||
@blur="handleNumberChange"
|
||||
/>
|
||||
分
|
||||
</view>
|
||||
<image
|
||||
src="https://api-static-zhiy.oss-cn-shanghai.aliyuncs.com/images/qujian.png"
|
||||
mode="scaleToFill"
|
||||
class="mx-[20rpx] flex-1 h-[20rpx]"
|
||||
/>
|
||||
<view
|
||||
class="w-[84rpx] h-[36rpx] rounded-full border-[#187CFF] border-solid border-[2rpx] flex items-center px-[18rpx] py-[10rpx] text-[#1580FF] text-[26rpx] bg-[rgba(21,128,255,0.1)]"
|
||||
>
|
||||
<input
|
||||
v-model="currentRightValue"
|
||||
class="leading-[1] h-auto! min-h-auto! text-right"
|
||||
type="number"
|
||||
@blur="handleNumberChange"
|
||||
/>
|
||||
分
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="w-[120rpx] h-[56rpx] bg-[#1580FF] rounded-full text-[#fff] flex items-center justify-center text-[26rpx] font-500 ml-[20rpx]"
|
||||
@click.stop="handleRightThumbTouchEnd"
|
||||
>
|
||||
查询
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Array,
|
||||
default: () => [0, 0],
|
||||
},
|
||||
min: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
max: {
|
||||
type: Number,
|
||||
default: 200,
|
||||
},
|
||||
})
|
||||
|
||||
// 当前值
|
||||
const currentLeftValue = ref(props.modelValue.length > 0 ? props.modelValue[0] : props.min)
|
||||
const currentRightValue = ref(
|
||||
props.modelValue.length > 0 ? props.modelValue[1] : props.modelValue[0],
|
||||
)
|
||||
|
||||
const emits = defineEmits(['update:modelValue', 'change'])
|
||||
|
||||
const handleNumberChange = () => {
|
||||
let changeValue = [currentLeftValue.value, currentRightValue.value].map((item) => Number(item))
|
||||
if (currentLeftValue.value > currentRightValue.value) {
|
||||
changeValue = changeValue.reverse()
|
||||
currentLeftValue.value = changeValue[0]
|
||||
currentRightValue.value = changeValue[1]
|
||||
}
|
||||
|
||||
// 添加最小值和最大值的判断
|
||||
const leftValue = Number(currentLeftValue.value)
|
||||
const rightValue = Number(currentRightValue.value)
|
||||
|
||||
if (leftValue < props.min) {
|
||||
currentLeftValue.value = props.min
|
||||
}
|
||||
if (rightValue > props.max) {
|
||||
currentRightValue.value = props.max
|
||||
}
|
||||
|
||||
emitValueChange()
|
||||
}
|
||||
|
||||
const handleRightThumbTouchEnd = () => {
|
||||
let changeValue = [currentLeftValue.value, currentRightValue.value]
|
||||
emits('change', changeValue)
|
||||
}
|
||||
|
||||
// 发送值变化事件
|
||||
const emitValueChange = () => {
|
||||
emits(
|
||||
'update:modelValue',
|
||||
[currentLeftValue.value, currentRightValue.value].map((item) => Number(item)),
|
||||
)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
@ -109,7 +109,7 @@ const getPlanProListData = async (newVal) => {
|
|||
tableData.value = _res.newZsplanfusions.map((item) => {
|
||||
let _item = item
|
||||
_item.score = `最高分:${item.score_max !== '0' ? item.score_max : '--'} \n 最低分:${item.score_min !== '0' ? item.score_min : '--'} \n 平均分:${item.score_average !== '0' ? item.score_average : '--'}`
|
||||
_item.subjectAndCollege = ` 院校/批次:${item.subject_name} \n 专业:${item.second_subject}`
|
||||
_item.subjectAndCollege = ` 院校/批次:${item.subject_name} \n 选科:${item.second_subject}`
|
||||
return _item
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,13 @@ const handleRemove = (item, index) => {
|
|||
menus.value[item.groupIndex].items[item.majorIndex].childMajors[item.cIndex].check = 1
|
||||
}
|
||||
|
||||
const handleClear = () => {
|
||||
filterParams.value.forEach((item) => {
|
||||
menus.value[item.groupIndex].items[item.majorIndex].childMajors[item.cIndex].check = 1
|
||||
})
|
||||
filterParams.value = []
|
||||
}
|
||||
|
||||
const menus = ref([])
|
||||
const currentMenuObj = ref(null)
|
||||
|
||||
|
|
@ -164,7 +171,7 @@ watch(
|
|||
const getSearchParam = () => {
|
||||
return filterParams.value
|
||||
}
|
||||
defineExpose({ getSearchParam })
|
||||
defineExpose({ getSearchParam, handleClear })
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
|
|
@ -41,10 +41,11 @@
|
|||
|
||||
<view class="flex flex-col gap-[8rpx] items-center whitespace-nowrap">
|
||||
<view
|
||||
class="text-[24rpx] px-[16rpx] py-[12rpx] rounded-[8rpx] border-[2rpx] border-[#1580FF] border-solid whitespace-nowrap"
|
||||
class="text-[24rpx] px-[16rpx] py-[12rpx] rounded-[8rpx] border-[2rpx] border-[#1580FF] border-solid whitespace-nowrap flex items-center text-[#1580FF]"
|
||||
@click.stop="handleShow"
|
||||
>
|
||||
专业{{ college.items.length }}
|
||||
<view class="i-carbon-add-large"></view>
|
||||
<view>专业{{ college.items.length }}</view>
|
||||
</view>
|
||||
<text class="text-[20rpx] text-[#8F959E]" v-if="collegeMajorCount > 0">
|
||||
已填 {{ collegeMajorCount }}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
<SearchInput @confirm="handleChange" placeholder="请输入意向院校" />
|
||||
</view>
|
||||
|
||||
<view class="flex gap-[10rpx] px-[32rpx] border-top">
|
||||
<view class="flex gap-[10rpx] px-[32rpx] border-top justify-between">
|
||||
<view
|
||||
class="flex justify-between items-center text-[28rpx] line-height-none"
|
||||
@click="handleShow(3)"
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
<view class="i-carbon-caret-down"></view>
|
||||
</view>
|
||||
|
||||
<Slider
|
||||
<!-- <Slider
|
||||
v-model:modelValue="sliderValue"
|
||||
:min="minScore"
|
||||
:max="maxScore"
|
||||
|
|
@ -74,6 +74,13 @@
|
|||
:range="true"
|
||||
@change="handleSliderChange"
|
||||
class="custom-slider"
|
||||
/> -->
|
||||
<NumberInterval
|
||||
v-model:modelValue="sliderValue"
|
||||
:min="minScore"
|
||||
:max="maxScore"
|
||||
@change="handleSliderChange"
|
||||
class="w-[537rpx]"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -105,7 +112,7 @@
|
|||
</view>
|
||||
</template>
|
||||
</z-paging>
|
||||
<ActionSheet v-model:show="show" :title="actionTitle">
|
||||
<ActionSheet v-model:show="show" :title="actionTitle" :showClose="true">
|
||||
<Region
|
||||
v-show="actionType === 2"
|
||||
width="210rpx"
|
||||
|
|
@ -126,7 +133,8 @@
|
|||
<FilterMajorList ref="filterMajorRef" v-show="actionType === 4" :type="1050" class="h-full" />
|
||||
<template #footer>
|
||||
<view class="flex items-center justify-between mx-[32rpx] gap-[20rpx]">
|
||||
<view class="cancel-btn" @click="show = false">取消</view>
|
||||
<view class="cancel-btn" @click="show = false" v-if="actionType !== 4">取消</view>
|
||||
<view class="cancel-btn" @click="resetMajorList" v-else>重置</view>
|
||||
<view class="submit-btn" @click="handleConfirm">查看结果</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -144,7 +152,8 @@ import SearchInput from '@/pages-sub/components/input/SearchInput.vue'
|
|||
import ActionSheet from '@/pages-sub/components/ActionSheet.vue'
|
||||
import Region from '@/pages-sub/home/components/Region.vue'
|
||||
import FilterMenu from '@/pages-sub/home/components/FilterMenu.vue'
|
||||
import Slider from '@/pages-sub/components/Slider.vue'
|
||||
// import Slider from '@/pages-sub/components/Slider.vue'
|
||||
import NumberInterval from '@/pages-sub/components/interval/NumberInterval.vue'
|
||||
import CustomPickerView from '@/pages-sub/components/CustomPickerView.vue'
|
||||
|
||||
import ScrollListItemAction from './components/ScrollListItemAction.vue'
|
||||
|
|
@ -314,6 +323,10 @@ const handlePreview = () => {
|
|||
}
|
||||
uni.navigateTo({ url: '/pages-sub/home/wishesList/wishesList?editType=add&typeName=智能填报' })
|
||||
}
|
||||
|
||||
const resetMajorList = () => {
|
||||
filterMajorRef.value.handleClear()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
|
|
@ -19,9 +19,12 @@
|
|||
mode="scaleToFill"
|
||||
/>
|
||||
<view class="flex flex-col gap-[6rpx] py-[8rpx] z-[1] text-white">
|
||||
<text class="text-[32rpx] font-semibold">
|
||||
<view class="text-[32rpx] font-semibold flex items-center">
|
||||
<view>
|
||||
{{ userStore.userInfo.nickname || '未登录' }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="i-carbon-chevron-right font-700"></view>
|
||||
</view>
|
||||
<text class="text-[24rpx]" v-show="userStore.userInfo.openid">
|
||||
{{ userStore.userInfo.estimatedAchievement.provinceName }}·{{
|
||||
userStore.userInfo.estimatedAchievement.expectedScore
|
||||
|
|
|
|||
Loading…
Reference in New Issue