From 89c5ac5ce6274265b2475f775b103a8a52951149 Mon Sep 17 00:00:00 2001 From: xjs Date: Tue, 15 Apr 2025 10:52:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/aiService-sub/index/index.vue | 9 +- src/pages-evaluation-sub/aiAutoFill/index.vue | 2 +- .../components/drop-menu/DropMenu.vue | 24 +- .../components/drop-menu/DropMenuItem.vue | 21 +- .../academicReport/InterestReport.vue | 24 +- .../evaluate/components/InterestingThings.vue | 2 - .../evaluate/components/IntroMajor.vue | 2 - src/pages-evaluation-sub/rank/index.vue | 44 +--- .../styles/grid-checkbox.scss | 12 + src/pages-sub/components/ActionSheet.vue | 10 +- .../components/check-group/CheckGroup.vue | 1 - .../components/collapse/Collapse.vue | 9 - .../components/drop-menu/DropMenu.vue | 28 ++- .../components/drop-menu/DropMenuItem.vue | 47 ++-- .../components/radio-group/Radio.vue | 46 ++-- src/pages-sub/evaluation/assessmentPage.vue | 8 +- src/pages-sub/evaluation/useRouterDetail.ts | 51 +++++ src/pages-sub/home/autoFill/index.vue | 6 +- src/pages-sub/home/college/index.vue | 63 +++--- .../home/components/CollegeFeature.vue | 11 +- src/pages-sub/home/components/FilterMenu.vue | 209 ++++++++++++------ src/pages-sub/home/components/Nature.vue | 11 +- src/pages-sub/home/components/Phase.vue | 43 +--- src/pages-sub/home/components/Region.vue | 19 +- src/pages-sub/home/components/UniType.vue | 11 +- src/pages-sub/home/distinguish/index.vue | 6 +- src/pages-sub/home/expand/index.vue | 106 ++++++--- src/pages-sub/home/line/index.vue | 65 +++--- src/pages-sub/home/schoolRank/index.vue | 2 +- src/pages-sub/home/styles/grid-checkbox.scss | 12 + .../ucenter/evaluate/evaluateList.vue | 55 +---- .../ucenter/evaluate/useRouterDetail.ts | 51 +++++ .../evaluation/components/EvaluationItem.vue | 16 +- src/pages/evaluation/index/index.vue | 24 +- src/pages/expert/index/index.vue | 6 +- src/pages/home/index/index.vue | 2 +- 36 files changed, 675 insertions(+), 383 deletions(-) create mode 100644 src/pages-evaluation-sub/styles/grid-checkbox.scss create mode 100644 src/pages-sub/evaluation/useRouterDetail.ts create mode 100644 src/pages-sub/home/styles/grid-checkbox.scss create mode 100644 src/pages-sub/ucenter/evaluate/useRouterDetail.ts diff --git a/src/aiService-sub/index/index.vue b/src/aiService-sub/index/index.vue index 58f7b23..2be4562 100644 --- a/src/aiService-sub/index/index.vue +++ b/src/aiService-sub/index/index.vue @@ -32,7 +32,14 @@ const handleChildMessage = (event) => { console.log('子应用传递的消息', event) } -onLoad(() => { +onLoad((options) => { + console.log(options) + if (options.id) { + url.value += `&reportId=${options.id}` + } + if (options.type) { + url.value += `&reportType=${options.type}` + } uni.getRecorderManager() uni.getBackgroundAudioManager() }) diff --git a/src/pages-evaluation-sub/aiAutoFill/index.vue b/src/pages-evaluation-sub/aiAutoFill/index.vue index dd3cc58..450e74a 100644 --- a/src/pages-evaluation-sub/aiAutoFill/index.vue +++ b/src/pages-evaluation-sub/aiAutoFill/index.vue @@ -51,7 +51,7 @@ 智能选校 diff --git a/src/pages-evaluation-sub/components/drop-menu/DropMenu.vue b/src/pages-evaluation-sub/components/drop-menu/DropMenu.vue index 87ba2c9..212d15b 100644 --- a/src/pages-evaluation-sub/components/drop-menu/DropMenu.vue +++ b/src/pages-evaluation-sub/components/drop-menu/DropMenu.vue @@ -5,10 +5,13 @@ v-for="(item, index) in titles" :key="index" class="drop-menu__item" - :class="{ 'drop-menu__item--active': index === activeIndex }" + :class="{ + 'drop-menu__item--active': index === activeIndex || item.activation, + 'drop-menu__disable': item.disabled, + }" @click="handleTitleClick(index)" > - {{ item }} + {{ item.title }} ([]) +const titles = ref([]) // 当前激活的菜单索引 const activeIndex = ref(-1) const maskTop = ref('88px') // 添加标题 -const addTitle = (title: string) => { - titles.value.push(title) +const addTitle = (options) => { + titles.value.push({ ...options }) } const instance = getCurrentInstance() @@ -62,6 +65,9 @@ const instance = getCurrentInstance() const dropMenuRef = ref() // 处理标题点击 const handleTitleClick = (index: number) => { + if (titles.value[index].disabled) { + return + } // 如果点击的是当前打开的菜单,则关闭 if (activeIndex.value === index) { activeIndex.value = -1 @@ -93,6 +99,10 @@ provide('dropMenu', { direction: props.direction, titles, // 提供titles给子组件 }) + +defineExpose({ + closeDropMenu, +}) diff --git a/src/pages-evaluation-sub/components/drop-menu/DropMenuItem.vue b/src/pages-evaluation-sub/components/drop-menu/DropMenuItem.vue index 6a6c018..bdc68ea 100644 --- a/src/pages-evaluation-sub/components/drop-menu/DropMenuItem.vue +++ b/src/pages-evaluation-sub/components/drop-menu/DropMenuItem.vue @@ -59,6 +59,14 @@ const props = defineProps({ type: String, default: '', }, + disabled: { + type: Boolean, + default: false, + }, + activation: { + type: Boolean, + default: false, + }, }) const emit = defineEmits(['update:modelValue', 'change', 'open']) @@ -116,7 +124,7 @@ onMounted(() => { // 先获取当前索引 itemIndex.value = titles.value.length // 再添加标题 - addTitle(props.title) + addTitle({ title: props.title, disabled: props.disabled, activation: props.activation }) }) // 监听标题变化 @@ -124,12 +132,19 @@ watch( () => props.title, (newTitle) => { // 更新对应索引位置的标题 - if (titles.value[itemIndex.value] !== newTitle) { - titles.value[itemIndex.value] = newTitle + if (titles.value[itemIndex.value].title !== newTitle) { + titles.value[itemIndex.value].title = newTitle } }, { immediate: false }, ) + +watch( + () => props.activation, + (newVal) => { + titles.value[itemIndex.value].activation = newVal + }, +) diff --git a/src/pages-sub/components/check-group/CheckGroup.vue b/src/pages-sub/components/check-group/CheckGroup.vue index b87e17e..5fe429f 100644 --- a/src/pages-sub/components/check-group/CheckGroup.vue +++ b/src/pages-sub/components/check-group/CheckGroup.vue @@ -110,7 +110,6 @@ const checkboxStyle = computed(() => { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16rpx; - // padding: 32rpx 16rpx 16rpx; } :deep(.checkbox-active) { diff --git a/src/pages-sub/components/collapse/Collapse.vue b/src/pages-sub/components/collapse/Collapse.vue index c4ea516..147fce7 100644 --- a/src/pages-sub/components/collapse/Collapse.vue +++ b/src/pages-sub/components/collapse/Collapse.vue @@ -45,7 +45,6 @@ const emitValue = (val) => { // 注册子组件 const register = (childInstance) => { - console.log('注册子组件:', childInstance.nameSync) childrens.value.push(childInstance) } @@ -58,8 +57,6 @@ const unregister = (childInstance) => { } // 设置打开状态 - 进一步优化 const setOpen = (val) => { - console.log('设置打开状态:', val, childrens.value.length) - // 处理不同类型的值 const isString = typeof val === 'string' || typeof val === 'number' const isArray = Array.isArray(val) @@ -105,7 +102,6 @@ const setOpen = (val) => { watch( () => dataValue.value, (val) => { - console.log('折叠面板值变化:', val, '手风琴模式:', props.accordion) if (val !== undefined && val !== null) { setOpen(val) } @@ -117,8 +113,6 @@ watch( const setAccordion = (self) => { if (!props.accordion) return - console.log('设置手风琴模式,当前组件:', self?.uid || self?.nameSync) - childrens.value.forEach((vm) => { // 检查各种可能的标识符比较方式 const isSameComponent = @@ -131,7 +125,6 @@ const setAccordion = (self) => { // 如果不是同一个组件,则关闭它 if (!isSameComponent) { - console.log('关闭其他面板:', vm.nameSync) vm.isOpen = false } }) @@ -167,7 +160,6 @@ const onChange = (isOpen, self) => { activeItem = activeItems } - console.log('折叠面板状态变化:', activeItem) emit('change', activeItem) emitValue(activeItem) } @@ -196,7 +188,6 @@ provide('uniCollapseContext', { // 组件挂载后初始化 onMounted(() => { nextTick(() => { - console.log('折叠面板挂载完成,当前值:', dataValue.value) if (dataValue.value !== undefined && dataValue.value !== null && dataValue.value !== '') { setOpen(dataValue.value) } diff --git a/src/pages-sub/components/drop-menu/DropMenu.vue b/src/pages-sub/components/drop-menu/DropMenu.vue index 603430c..212d15b 100644 --- a/src/pages-sub/components/drop-menu/DropMenu.vue +++ b/src/pages-sub/components/drop-menu/DropMenu.vue @@ -5,10 +5,13 @@ v-for="(item, index) in titles" :key="index" class="drop-menu__item" - :class="{ 'drop-menu__item--active': index === activeIndex }" - @click.self.stop="handleTitleClick(index)" + :class="{ + 'drop-menu__item--active': index === activeIndex || item.activation, + 'drop-menu__disable': item.disabled, + }" + @click="handleTitleClick(index)" > - {{ item }} + {{ item.title }} @@ -46,23 +49,30 @@ const props = defineProps({ }) // 标题列表 -const titles = ref([]) +const titles = ref([]) // 当前激活的菜单索引 const activeIndex = ref(-1) const maskTop = ref('88px') -const addTitle = (title: string) => { - titles.value.push(title) +// 添加标题 +const addTitle = (options) => { + titles.value.push({ ...options }) } const instance = getCurrentInstance() const dropMenuRef = ref() +// 处理标题点击 const handleTitleClick = (index: number) => { + if (titles.value[index].disabled) { + return + } + // 如果点击的是当前打开的菜单,则关闭 if (activeIndex.value === index) { activeIndex.value = -1 } else { + // 否则打开点击的菜单 activeIndex.value = index } const query = uni.createSelectorQuery().in(instance.proxy) @@ -155,4 +165,8 @@ defineExpose({ background: rgba(0, 0, 0, 0.3); z-index: 9; } + +.drop-menu__disable { + color: #999; +} diff --git a/src/pages-sub/components/drop-menu/DropMenuItem.vue b/src/pages-sub/components/drop-menu/DropMenuItem.vue index 6a02f2e..bdc68ea 100644 --- a/src/pages-sub/components/drop-menu/DropMenuItem.vue +++ b/src/pages-sub/components/drop-menu/DropMenuItem.vue @@ -1,6 +1,5 @@ diff --git a/src/pages-sub/evaluation/assessmentPage.vue b/src/pages-sub/evaluation/assessmentPage.vue index 49fb073..1d6152e 100644 --- a/src/pages-sub/evaluation/assessmentPage.vue +++ b/src/pages-sub/evaluation/assessmentPage.vue @@ -101,6 +101,7 @@ import Checkbox from '@/pages-sub/components/check-group/Checkbox.vue' import CheckboxGroup from '@/pages-sub/components/check-group/CheckboxGroup.vue' import { useUserStore } from '@/store/user' +import { useRouterDetail } from './useRouterDetail' const userStore = useUserStore() @@ -220,8 +221,13 @@ const handleSubmit = () => { params.inputs = _inputs saveBusScaleAnswer(params).then((res) => { isLoading.value = false + let _result = res.result as { + reportId: string + type: number + } if (res.code === 200) { - uni.navigateBack() + // uni.navigateBack() + useRouterDetail({ reportsId: _result.reportId, type: _result.type }) } else { uni.showToast({ title: res.message, diff --git a/src/pages-sub/evaluation/useRouterDetail.ts b/src/pages-sub/evaluation/useRouterDetail.ts new file mode 100644 index 0000000..085c57a --- /dev/null +++ b/src/pages-sub/evaluation/useRouterDetail.ts @@ -0,0 +1,51 @@ +export const useRouterDetail = (item: { reportsId: string; type: number }) => { + // type=0 兴趣测评报告 + // =1 性格测评报告 + // =2 能力测评 + // =3 学生考试考虑 + // =4 学习风格 + // =5 学习技能 + // =6 SAS + // =7 SDS + // =8 SCL-90 + // =9 MHT + /// =-1 价值观 + /// =-2 留学咨询 + let url = '' + + if (item.type === 0) { + url = `/pages-evaluation-sub/evaluate/academicReport/interestReport?id=${item.reportsId}&type=${item.type}` + } else if (item.type === 1) { + url = `/pages-evaluation-sub/evaluate/academicReport/characterReport?id=${item.reportsId}&type=${item.type}` + } else if (item.type === 2) { + url = `/pages-evaluation-sub/evaluate/academicReport/capabilityReport?id=${item.reportsId}&type=${item.type}` + } else if (item.type === -1) { + url = `/pages-evaluation-sub/evaluate/academicReport/opinionAboutReport?id=${item.reportsId}&type=${item.type}` + } else if (item.type === 6) { + url = `/pages-evaluation-sub/evaluate/psychologicalReport/sasReport?id=${item.reportsId}&type=${item.type}` + } else if (item.type === 7) { + url = `/pages-evaluation-sub/evaluate/psychologicalReport/sdsReport?id=${item.reportsId}&type=${item.type}` + } else if (item.type === 9) { + // url = `/pages-evaluation-sub/evaluate/psychologicalReport/mhtReport?id=${item.reportsId}&type=${item.type}` + uni.showToast({ + title: '开发中....', + icon: 'none', + }) + return + } else if (item.type === 4) { + url = `/pages-evaluation-sub/evaluate/studyReport/learnStudyReport?id=${item.reportsId}&type=${item.type}` + } else if (item.type === 5) { + url = `/pages-evaluation-sub/evaluate/studyReport/learnSkillReport?id=${item.reportsId}&type=${item.type}` + } else if (item.type === 3) { + url = `/pages-evaluation-sub/evaluate/studyReport/anxietyReport?id=${item.reportsId}&type=${item.type}` + } else { + uni.showToast({ + title: '开发中....', + icon: 'none', + }) + return + } + uni.navigateTo({ + url, + }) +} diff --git a/src/pages-sub/home/autoFill/index.vue b/src/pages-sub/home/autoFill/index.vue index ff15ab0..02e78ef 100644 --- a/src/pages-sub/home/autoFill/index.vue +++ b/src/pages-sub/home/autoFill/index.vue @@ -36,7 +36,7 @@ > @@ -80,6 +80,8 @@ const handleResult = () => { let _params = filterMenuRef.value.handleConfirm() countBadgeValue(_params) + console.log(_params) + let params = { p: userStore.userInfo.estimatedAchievement.sp, location: userStore.userInfo.estimatedAchievement.provinceCode, diff --git a/src/pages-sub/home/college/index.vue b/src/pages-sub/home/college/index.vue index 3db0eaf..cd9af50 100644 --- a/src/pages-sub/home/college/index.vue +++ b/src/pages-sub/home/college/index.vue @@ -38,33 +38,35 @@ - - - - - - + + + + 清空 查看 @@ -128,11 +130,11 @@ const navigatorBack = () => { uni.navigateBack() } -const subMenu = [ - { id: 1, title: '省份' }, - { id: 2, title: '层次' }, - { id: 3, title: '类型' }, -] +const subMenu = ref([ + { id: 1, title: '省份', activation: false }, + { id: 2, title: '层次', activation: false }, + { id: 3, title: '类型', activation: false }, +]) const dropMenuRef = ref() @@ -178,11 +180,15 @@ const handleClear = () => { regionKeyInfo.value = [] uniTypeKeyInfo.value = [] natureKeyInfo.value = [] + subMenu.value.forEach((item) => { + item.activation = false + }) dropMenuRef.value.closeDropMenu() } const handleRegionIdChange = (val) => { regionKeyInfo.value = val + subMenu.value[0].activation = val.length !== 0 } const handleRegionChange = (val) => { @@ -191,6 +197,7 @@ const handleRegionChange = (val) => { const handleUniTypeIdChange = (val) => { uniTypeKeyInfo.value = val + subMenu.value[2].activation = val.length !== 0 } const handleUniTypeChange = (val) => { @@ -199,6 +206,7 @@ const handleUniTypeChange = (val) => { const handleNatureIdChange = (val) => { natureKeyInfo.value = val + subMenu.value[1].activation = val.length !== 0 } const handleNatureChange = (val) => { @@ -218,4 +226,5 @@ onShow(() => { diff --git a/src/pages-sub/home/components/CollegeFeature.vue b/src/pages-sub/home/components/CollegeFeature.vue index 8ead72d..8553024 100644 --- a/src/pages-sub/home/components/CollegeFeature.vue +++ b/src/pages-sub/home/components/CollegeFeature.vue @@ -6,6 +6,7 @@ value-key="id" label-key="name" v-bind="$attrs" + width="100%" /> @@ -23,10 +24,14 @@ getUniversityFeature().then((res) => { const defaultInfo = ref([]) -const emits = defineEmits(['changeName']) +const emits = defineEmits(['changeName', 'changeObj']) const handleChange = (val: any) => { - const names = infoList.value.filter((item) => val.includes(item.id)).map((item) => item.name) - emits('changeName', names) + const chooseObj = infoList.value.filter((item) => val.includes(item.id)) + emits( + 'changeName', + chooseObj.map((item) => item.name), + ) + emits('changeObj', chooseObj) } diff --git a/src/pages-sub/home/components/FilterMenu.vue b/src/pages-sub/home/components/FilterMenu.vue index d759ae0..b246e86 100644 --- a/src/pages-sub/home/components/FilterMenu.vue +++ b/src/pages-sub/home/components/FilterMenu.vue @@ -1,6 +1,6 @@ @@ -104,30 +114,105 @@ const defaultUniType = ref([]) const defaultCollegeFeature = ref([]) const defaultPhase = ref('') +const filterParams = ref([]) + const chooseRegion = ref([]) const chooseNature = ref([]) const chooseUniType = ref([]) const chooseCollegeFeature = ref([]) const choosePhase = ref('') -const handleRegionChange = (val: string[]) => { - chooseRegion.value = val +const handleRegionChangeObj = (val: any[]) => { + console.log(val) + + defaultRegion.value = val.map((item) => item.code) + chooseRegion.value = val.map((item) => item.name) + + filterParams.value = filterParams.value.filter((item) => item.type !== 'region') + val.forEach((item) => { + filterParams.value.push({ + type: 'region', + value: item, + }) + }) } -const handleNatureChange = (val: string[]) => { - chooseNature.value = val +const handleNatureChangeObj = (val: any[]) => { + defaultNature.value = val.map((item) => item.id) + chooseNature.value = val.map((item) => item.name) + filterParams.value = filterParams.value.filter((item) => item.type !== 'nature') + val.forEach((item) => { + filterParams.value.push({ + type: 'nature', + value: item, + }) + }) } -const handleUniTypeChange = (val: string[]) => { - chooseUniType.value = val +const handleUniTypeChangeObj = (val: any[]) => { + defaultUniType.value = val.map((item) => item.id) + chooseUniType.value = val.map((item) => item.name) + filterParams.value = filterParams.value.filter((item) => item.type !== 'uniType') + val.forEach((item) => { + filterParams.value.push({ + type: 'uniType', + value: item, + }) + }) } -const handleCollegeFeatureChange = (val: string[]) => { - chooseCollegeFeature.value = val +const handleCollegeFeatureChangeObj = (val: any[]) => { + chooseCollegeFeature.value = val.map((item) => item.name) + filterParams.value = filterParams.value.filter((item) => item.type !== 'collegeFeature') + val.forEach((item) => { + filterParams.value.push({ + type: 'collegeFeature', + value: item, + }) + }) } -const handlePhaseChange = (val: string) => { - choosePhase.value = val +const handlePhaseChange = (val: any) => { + choosePhase.value = val.batch + filterParams.value = filterParams.value.filter((item) => item.type !== 'phase') + + filterParams.value.push({ + type: 'phase', + value: { ...val, name: val.batch }, + }) +} + +const handleRemove = (removeItem: { type: string; value: any }, index: number) => { + if (removeItem.type === 'region') { + defaultRegion.value = filterParams.value + .filter((item) => item.type === 'region' && item.value.code !== removeItem.value.code) + .map((item) => item.value.code) + console.log(defaultRegion.value) + } + if (removeItem.type === 'nature') { + defaultNature.value = filterParams.value + .filter((item) => item.type === 'nature' && item.value.id !== removeItem.value.id) + .map((item) => item.value.id) + } + if (removeItem.type === 'uniType') { + defaultUniType.value = filterParams.value + .filter((item) => item.type === 'uniType' && item.value.id !== removeItem.value.id) + .map((item) => item.value.id) + } + if (removeItem.type === 'collegeFeature') { + defaultCollegeFeature.value = filterParams.value + .filter((item) => item.type === 'collegeFeature' && item.value.id !== removeItem.value.id) + .map((item) => item.value.id) + } + if (removeItem.type === 'phase') { + uni.showToast({ + title: '该项不可删除', + icon: 'none', + }) + return + } else { + filterParams.value.splice(index, 1) + } } const handleConfirm = () => { @@ -145,6 +230,7 @@ const clearForm = () => { defaultUniType.value = [] defaultNature.value = [] defaultRegion.value = [] + defaultPhase.value = '' } defineExpose({ @@ -173,12 +259,3 @@ defineExpose({ border-top: 2rpx solid #f5f5f5; } - - diff --git a/src/pages-sub/home/components/Nature.vue b/src/pages-sub/home/components/Nature.vue index 5fb80f2..82aedea 100644 --- a/src/pages-sub/home/components/Nature.vue +++ b/src/pages-sub/home/components/Nature.vue @@ -5,6 +5,7 @@ value-key="id" label-key="name" v-bind="$attrs" + width="100%" /> @@ -20,11 +21,15 @@ getNature().then((res) => { } }) -const emits = defineEmits(['changeName', 'change']) +const emits = defineEmits(['changeName', 'change', 'changeObj']) const handleChange = (val: any) => { - const names = infoList.value.filter((item) => val.includes(item.id)).map((item) => item.name) - emits('changeName', names) + const chooseObj = val.map((id) => infoList.value.find((item) => item.id === id)) + emits( + 'changeName', + chooseObj.map((item) => item.name), + ) emits('change', val) + emits('changeObj', chooseObj) } diff --git a/src/pages-sub/home/components/Phase.vue b/src/pages-sub/home/components/Phase.vue index 4c182f9..ac25382 100644 --- a/src/pages-sub/home/components/Phase.vue +++ b/src/pages-sub/home/components/Phase.vue @@ -1,6 +1,11 @@ diff --git a/src/pages-sub/home/components/Region.vue b/src/pages-sub/home/components/Region.vue index 2b1da0e..10a2bba 100644 --- a/src/pages-sub/home/components/Region.vue +++ b/src/pages-sub/home/components/Region.vue @@ -1,5 +1,11 @@ diff --git a/src/pages-sub/home/components/UniType.vue b/src/pages-sub/home/components/UniType.vue index 899b1e5..d3300e1 100644 --- a/src/pages-sub/home/components/UniType.vue +++ b/src/pages-sub/home/components/UniType.vue @@ -6,6 +6,7 @@ value-key="id" label-key="name" v-bind="$attrs" + width="100%" /> @@ -22,11 +23,15 @@ getUniversityType().then((res) => { const defaultInfo = ref([]) -const emits = defineEmits(['change', 'changeName']) +const emits = defineEmits(['change', 'changeName', 'changeObj']) const handleChange = (val: any) => { - const names = infoList.value.filter((item) => val.includes(item.id)).map((item) => item.name) - emits('changeName', names) + const chooseObj = val.map((id) => infoList.value.find((item) => item.id === id)) + emits( + 'changeName', + chooseObj.map((item) => item.name), + ) emits('change', val) + emits('changeObj', chooseObj) } diff --git a/src/pages-sub/home/distinguish/index.vue b/src/pages-sub/home/distinguish/index.vue index e2f3268..90abf87 100644 --- a/src/pages-sub/home/distinguish/index.vue +++ b/src/pages-sub/home/distinguish/index.vue @@ -96,13 +96,14 @@ @@ -174,6 +175,7 @@ onLoad(() => { @import '@/pages-evaluation-sub/styles/navbar-background.scss'; @import '@/pages-sub/home/styles/search-input.scss'; @import '@/pages-sub/home/styles/picker-view-btn.scss'; +@import '@/pages-sub/home/styles/grid-checkbox.scss'; .border-right { border-right: 2rpx solid #eeeeee; diff --git a/src/pages-sub/home/expand/index.vue b/src/pages-sub/home/expand/index.vue index 4319172..7eb2dea 100644 --- a/src/pages-sub/home/expand/index.vue +++ b/src/pages-sub/home/expand/index.vue @@ -29,24 +29,38 @@ /> - - - - - - - - - - - - - - + + + + + + + 清空 + 查看 @@ -138,8 +152,7 @@ import { getAdmissionTrends } from '@/service/index/api' const userStore = useUserStore() const searchParams = ref({ - locationCode: [userStore.userInfo.estimatedAchievement.provinceCode || '370000'], - locationName: [userStore.userInfo.estimatedAchievement.provinceName || '山东省'], + locationName: [], type: [], searchNature: [], collegeName: '', @@ -153,22 +166,29 @@ const navigatorBack = () => { uni.navigateBack() } +const handleNatureChangeCode = (val) => { + natureKeyInfo.value = val +} +const handleUniTypeChangeCode = (val) => { + uniTypeKeyInfo.value = val +} + +const handleRegionChangeCode = (val) => { + regionKeyInfo.value = val +} + const handleRegionChange = (val) => { searchParams.value.locationName = val + subMenu.value[0].activation = val.length !== 0 } -const handleRegionChangeCode = (val) => { - searchParams.value.locationCode = val - paging.value.reload() +const handleNatureChange = (val) => { + searchParams.value.searchNature = val + subMenu.value[1].activation = val.length !== 0 } const handleUniTypeChange = (val) => { searchParams.value.type = val - paging.value.reload() -} - -const handleNatureChange = (val) => { - searchParams.value.searchNature = val - paging.value.reload() + subMenu.value[2].activation = val.length !== 0 } const lineList = ref([]) @@ -196,9 +216,37 @@ const queryList = (page: number, pageSize: number) => { const virtualListChange = (_vList) => { lineList.value = _vList } + +const subMenu = ref([ + { id: 1, title: '省份', activation: false }, + { id: 2, title: '层次', activation: false }, + { id: 3, title: '类别', activation: false }, +]) + +const dropMenuRef = ref() +const regionKeyInfo = ref([]) // 省份信息 +const uniTypeKeyInfo = ref([]) // 层次信息 +const natureKeyInfo = ref([]) // 类型信息 + +const handleClear = () => { + regionKeyInfo.value = [] + uniTypeKeyInfo.value = [] + natureKeyInfo.value = [] + subMenu.value.forEach((item) => { + item.activation = false + }) + dropMenuRef.value.closeDropMenu() +} + +const handleCheck = () => { + dropMenuRef.value.closeDropMenu() + handleConfirm() +} diff --git a/src/pages-sub/home/line/index.vue b/src/pages-sub/home/line/index.vue index 82e7cf0..c643c42 100644 --- a/src/pages-sub/home/line/index.vue +++ b/src/pages-sub/home/line/index.vue @@ -19,41 +19,36 @@ /> - - - - - + + + - - - - - - - - + @@ -72,7 +67,6 @@ import { useUserStore } from '@/store' import DropMenu from '@/pages-sub/components/drop-menu/DropMenu.vue' import DropMenuItem from '@/pages-sub/components/drop-menu/DropMenuItem.vue' import Region from '@/pages-sub/home/components/Region.vue' -import UniType from '@/pages-sub/home/components/UniType.vue' import CheckGroup from '@/pages-sub/components/check-group/CheckGroup.vue' import WXXTable from '@/pages-sub/components/table/Table.vue' @@ -91,6 +85,8 @@ const searchParams = ref({ const checkYearList = ref([]) +const dropMenuRef = ref() + const navigatorBack = () => { uni.navigateBack() } @@ -101,11 +97,9 @@ const handleRegionChange = (val) => { const handleRegionChangeCode = (val) => { searchParams.value.locationCode = val[0] getBatchListData() -} - -const handleUniTypeChange = (val) => { - searchParams.value.type = val[0] - getBatchListData() + if (val.length !== 0) { + dropMenuRef.value.closeDropMenu() + } } const handleYearChange = (val) => { @@ -161,4 +155,5 @@ onBeforeMount(() => { diff --git a/src/pages-sub/home/schoolRank/index.vue b/src/pages-sub/home/schoolRank/index.vue index 1c380af..a79b424 100644 --- a/src/pages-sub/home/schoolRank/index.vue +++ b/src/pages-sub/home/schoolRank/index.vue @@ -36,7 +36,7 @@ /> diff --git a/src/pages-sub/home/styles/grid-checkbox.scss b/src/pages-sub/home/styles/grid-checkbox.scss new file mode 100644 index 0000000..3e41604 --- /dev/null +++ b/src/pages-sub/home/styles/grid-checkbox.scss @@ -0,0 +1,12 @@ +.custom-check-group { + :deep(.checkbox-group) { + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr; + gap: 16rpx; + padding: 32rpx 16rpx 16rpx; + } + + :deep(.custom-checkbox) { + --checkbox-width: 100%; + } +} diff --git a/src/pages-sub/ucenter/evaluate/evaluateList.vue b/src/pages-sub/ucenter/evaluate/evaluateList.vue index 2ff1bbc..da0ace4 100644 --- a/src/pages-sub/ucenter/evaluate/evaluateList.vue +++ b/src/pages-sub/ucenter/evaluate/evaluateList.vue @@ -13,7 +13,7 @@ v-for="(item, index) in list" :key="index" class="flex gap-[24rpx] wish-border justify-between p-[32rpx] rounded-[8rpx]" - @click="toDetail(item)" + @click="useRouterDetail(item)" > @@ -29,63 +29,12 @@