feat: 组件样式优化
parent
705e2646ee
commit
89c5ac5ce6
|
|
@ -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()
|
||||
})
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
<view class="mt-auto bg-[#fff] p-[32rpx] box-shadow px-[32rpx] pt-[32rpx] pb-safe">
|
||||
<view
|
||||
class="text-[#fff] text-[32rpx] rounded-[8rpx] bg-[#1580FF] text-center py-[26rpx]"
|
||||
class="text-[#fff] text-[32rpx] rounded-[8rpx] bg-[#1580FF] text-center py-[26rpx] mb-[20rpx]"
|
||||
@click="navigatorTo"
|
||||
>
|
||||
智能选校
|
||||
|
|
|
|||
|
|
@ -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)"
|
||||
>
|
||||
<text class="drop-menu__title">{{ item }}</text>
|
||||
<text class="drop-menu__title">{{ item.title }}</text>
|
||||
<text
|
||||
class="drop-menu__arrow i-carbon-chevron-down"
|
||||
:class="{ 'drop-menu__arrow--active': index === activeIndex }"
|
||||
|
|
@ -46,15 +49,15 @@ const props = defineProps({
|
|||
})
|
||||
|
||||
// 标题列表
|
||||
const titles = ref<string[]>([])
|
||||
const titles = ref<any[]>([])
|
||||
// 当前激活的菜单索引
|
||||
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,
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
@ -155,4 +165,8 @@ provide('dropMenu', {
|
|||
background: rgba(0, 0, 0, 0.3);
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.drop-menu__disable {
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
},
|
||||
)
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
</template>
|
||||
</Navbar>
|
||||
|
||||
<view class="flex-1 overflow-auto pb-[30rpx] relative mt-[40rpx]">
|
||||
<view class="flex-1 overflow-auto relative mt-[40rpx]">
|
||||
<!-- 顶部卡片 -->
|
||||
<view class="flex flex-col pt-[32rpx] px-[84rpx] h-[244rpx] mb-[-116rpx] font-700">
|
||||
<image src="https://api.static.ycymedu.com/src/images/evaluate/bg.png" class="header-bg" />
|
||||
|
|
@ -38,9 +38,19 @@
|
|||
<InterestingThings :tag="studyRecord.hTag" :description="studyRecord.description" />
|
||||
|
||||
<!-- 底部AI智能顾问 -->
|
||||
<!-- <view class="ai-assistant mt-[20rpx] mb-[10rpx] flex items-center justify-center">
|
||||
<image src="" class="w-[32rpx] h-[32rpx] mr-[10rpx]"></image>
|
||||
<text class="text-[#117CFC] text-[26rpx]">智能AI顾问</text>
|
||||
<!-- <view
|
||||
class="pt-[16rpx] px-[32rpx] mt-[20rpx] flex items-center justify-center bg-[#fff] pb-safe"
|
||||
@click="toAiAssistant"
|
||||
>
|
||||
<view
|
||||
class="rounded-[8rpx] border-[#1580FF] border-[2rpx] border-solid w-full pt-[22rpx] pb-[20rpx] flex items-center justify-center"
|
||||
>
|
||||
<image
|
||||
src="https://api.static.ycymedu.com/images/btn-bottom.png"
|
||||
class="w-[52rpx] h-[52rpx] mr-[10rpx]"
|
||||
></image>
|
||||
<text class="text-[#1580FF] text-[32rpx] font-700">智能AI顾问</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -63,6 +73,12 @@ const handleBack = () => {
|
|||
|
||||
const studyRecord = ref({ description: '', title: '', picCharts: {}, reportItems: [], hTag: '' })
|
||||
|
||||
const toAiAssistant = () => {
|
||||
uni.navigateTo({
|
||||
url: `/aiService-sub/index/index?id=${pageId.value}&type=${pageType.value}`,
|
||||
})
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
pageType.value = +options.type
|
||||
pageId.value = options.id
|
||||
|
|
|
|||
|
|
@ -50,8 +50,6 @@ const personList = ref([])
|
|||
watch(
|
||||
() => props.tag,
|
||||
(newV) => {
|
||||
console.log(newV)
|
||||
|
||||
getTagMapPerson({ tag: newV }).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
personList.value = resp.result as any[]
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@ const majorList = ref([])
|
|||
watch(
|
||||
() => props.tag,
|
||||
(newV) => {
|
||||
console.log(newV)
|
||||
|
||||
getTagMapPro({ tag: newV }).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
majorList.value = resp.result as any[]
|
||||
|
|
|
|||
|
|
@ -20,23 +20,18 @@
|
|||
></Navbar>
|
||||
<view class="custom-background h-[200rpx] w-full absolute top-0 left-0 z-[-1]"></view>
|
||||
</view>
|
||||
<drop-menu>
|
||||
<drop-menu ref="dropMenuRef">
|
||||
<drop-menu-item
|
||||
:key="1"
|
||||
:title="searchParams.locationName || '省份'"
|
||||
custom-class="flex items-center"
|
||||
>
|
||||
<Region
|
||||
:defaultValue="searchParams.locationCode ? [searchParams.locationCode] : []"
|
||||
:max="1"
|
||||
@changeName="handleRegionChange"
|
||||
@change="handleRegionChangeCode"
|
||||
/>
|
||||
</drop-menu-item>
|
||||
:disabled="true"
|
||||
></drop-menu-item>
|
||||
<drop-menu-item
|
||||
:key="2"
|
||||
:title="searchParams.year || '年份'"
|
||||
custom-class="flex items-center"
|
||||
custom-class=""
|
||||
:activation="searchParams.year !== ''"
|
||||
>
|
||||
<CheckGroup
|
||||
:list="checkYearList"
|
||||
|
|
@ -45,13 +40,8 @@
|
|||
labelKey="year"
|
||||
valueKey="year"
|
||||
:max="1"
|
||||
/>
|
||||
</drop-menu-item>
|
||||
<drop-menu-item :key="3" title="类别" custom-class="flex items-center">
|
||||
<UniType
|
||||
@change="handleUniTypeChange"
|
||||
:max="1"
|
||||
:default-value="searchParams.type ? [searchParams.type] : []"
|
||||
class="custom-check-group"
|
||||
width="100%"
|
||||
/>
|
||||
</drop-menu-item>
|
||||
</drop-menu>
|
||||
|
|
@ -118,8 +108,6 @@
|
|||
import Navbar from '@/pages-evaluation-sub/components/navbar/Navbar.vue'
|
||||
import DropMenu from '@/pages-evaluation-sub/components/drop-menu/DropMenu.vue'
|
||||
import DropMenuItem from '@/pages-evaluation-sub/components/drop-menu/DropMenuItem.vue'
|
||||
import Region from './components/Region.vue'
|
||||
import UniType from './components/UniType.vue'
|
||||
import CheckGroup from '@/pages-evaluation-sub/components/check-group/CheckGroup.vue'
|
||||
import LEchart from '@/pages-evaluation-sub/uni_modules/lime-echart/components/l-echart/l-echart.vue'
|
||||
|
||||
|
|
@ -155,15 +143,7 @@ const handleConfirm = () => {
|
|||
}
|
||||
|
||||
const checkYearList = ref([])
|
||||
|
||||
const handleRegionChange = (val) => {
|
||||
searchParams.value.locationName = val.join(',')
|
||||
}
|
||||
const handleRegionChangeCode = (val) => {
|
||||
searchParams.value.locationCode = val[0]
|
||||
getScoreSectionData()
|
||||
}
|
||||
|
||||
const dropMenuRef = ref()
|
||||
const handleYearChange = (val) => {
|
||||
let _yearList = []
|
||||
|
||||
|
|
@ -173,11 +153,10 @@ const handleYearChange = (val) => {
|
|||
_yearList = val
|
||||
}
|
||||
searchParams.value.year = _yearList.join(',')
|
||||
getScoreSectionData()
|
||||
}
|
||||
|
||||
const handleUniTypeChange = (val) => {
|
||||
searchParams.value.type = val[0]
|
||||
if (val.length !== 0) {
|
||||
dropMenuRef.value.closeDropMenu()
|
||||
}
|
||||
getScoreSectionData()
|
||||
}
|
||||
|
||||
|
|
@ -252,6 +231,7 @@ onBeforeMount(() => {
|
|||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/pages-evaluation-sub/styles/navbar-background.scss';
|
||||
@import '@/pages-evaluation-sub/styles/grid-checkbox.scss';
|
||||
|
||||
.input-wrapper-class {
|
||||
border-radius: 8rpx;
|
||||
|
|
|
|||
|
|
@ -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%;
|
||||
}
|
||||
}
|
||||
|
|
@ -103,10 +103,10 @@ const handleClose = () => {
|
|||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
&-footer {
|
||||
padding: 24rpx 32rpx;
|
||||
border-top: 2rpx solid #f5f5f5;
|
||||
box-shadow: 0rpx -8rpx 8rpx 0rpx rgba(225, 225, 225, 0.2);
|
||||
}
|
||||
// &-footer {
|
||||
// padding: 20rpx 32rpx;
|
||||
// border-top: 2rpx solid #f5f5f5;
|
||||
// box-shadow: 0rpx -8rpx 8rpx 0rpx rgba(225, 225, 225, 0.2);
|
||||
// }
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@ const checkboxStyle = computed(() => {
|
|||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 16rpx;
|
||||
// padding: 32rpx 16rpx 16rpx;
|
||||
}
|
||||
|
||||
:deep(.checkbox-active) {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)"
|
||||
>
|
||||
<text class="drop-menu__title">{{ item }}</text>
|
||||
<text class="drop-menu__title">{{ item.title }}</text>
|
||||
<text
|
||||
class="drop-menu__arrow i-carbon-chevron-down"
|
||||
:class="{ 'drop-menu__arrow--active': index === activeIndex }"
|
||||
|
|
@ -22,7 +25,7 @@
|
|||
v-if="activeIndex !== -1"
|
||||
class="drop-menu__mask"
|
||||
:style="{ top: maskTop }"
|
||||
@click.self.stop="closeDropMenu"
|
||||
@click="closeDropMenu"
|
||||
></view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -46,23 +49,30 @@ const props = defineProps({
|
|||
})
|
||||
|
||||
// 标题列表
|
||||
const titles = ref<string[]>([])
|
||||
const titles = ref<any[]>([])
|
||||
// 当前激活的菜单索引
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
<view
|
||||
v-if="mounted"
|
||||
class="drop-menu-item"
|
||||
:class="[customClass, { 'drop-menu-item--show': isShow }]"
|
||||
:style="{
|
||||
|
|
@ -10,14 +9,14 @@
|
|||
>
|
||||
<view class="drop-menu-item__wrapper" :class="{ 'drop-menu-item__wrapper--show': isShow }">
|
||||
<!-- 默认选项列表 -->
|
||||
<scroll-view v-if="isShow && !$slots.default" scroll-y class="drop-menu-item__content">
|
||||
<scroll-view v-if="!$slots.default" scroll-y class="drop-menu-item__content">
|
||||
<view class="drop-menu-item__option-list">
|
||||
<view
|
||||
v-for="(option, index) in options"
|
||||
:key="index"
|
||||
class="drop-menu-item__option"
|
||||
:class="{ 'drop-menu-item__option--active': isOptionActive(option) }"
|
||||
@click.self.stop="handleOptionClick(option)"
|
||||
@click="handleOptionClick(option)"
|
||||
>
|
||||
<text class="drop-menu-item__text">{{ getOptionText(option) }}</text>
|
||||
<text v-if="isOptionActive(option)" class="drop-menu-item__icon">✓</text>
|
||||
|
|
@ -25,7 +24,7 @@
|
|||
</view>
|
||||
</scroll-view>
|
||||
<!-- 自定义内容插槽 -->
|
||||
<view v-if="isShow && $slots.default" class="drop-menu-item__custom-content">
|
||||
<view v-else class="drop-menu-item__custom-content">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -33,7 +32,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, inject, onMounted, computed, watch, nextTick } from 'vue'
|
||||
import { ref, inject, onMounted, computed, watch } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
|
|
@ -60,17 +59,25 @@ const props = defineProps({
|
|||
type: String,
|
||||
default: '',
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
activation: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'change', 'open'])
|
||||
|
||||
// 注入父组件提供的数据和方法
|
||||
const { activeIndex, addTitle, closeDropMenu, zIndex, duration, titles } = inject('dropMenu') as any
|
||||
const { activeIndex, addTitle, closeDropMenu, zIndex, duration, direction, titles } = inject(
|
||||
'dropMenu',
|
||||
) as any
|
||||
|
||||
// 当前组件的索引
|
||||
const itemIndex = ref(-1)
|
||||
// 是否已挂载
|
||||
const mounted = ref(false)
|
||||
|
||||
// 是否显示下拉内容
|
||||
const isShow = computed(() => activeIndex.value === itemIndex.value)
|
||||
|
|
@ -117,12 +124,7 @@ onMounted(() => {
|
|||
// 先获取当前索引
|
||||
itemIndex.value = titles.value.length
|
||||
// 再添加标题
|
||||
addTitle(props.title)
|
||||
|
||||
// 确保在下一个渲染周期后才显示组件
|
||||
nextTick(() => {
|
||||
mounted.value = true
|
||||
})
|
||||
addTitle({ title: props.title, disabled: props.disabled, activation: props.activation })
|
||||
})
|
||||
|
||||
// 监听标题变化
|
||||
|
|
@ -130,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
|
||||
},
|
||||
)
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
@ -154,17 +163,15 @@ watch(
|
|||
transition: all 0.25s ease;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
z-index: 11;
|
||||
}
|
||||
|
||||
.drop-menu-item__wrapper--show {
|
||||
transform: translateY(0);
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.drop-menu-item__content {
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
}"
|
||||
@click="handleClick"
|
||||
>
|
||||
<view class="radio__icon" :class="{ 'radio__icon--checked': isChecked }">
|
||||
<!-- <view class="radio__icon" :class="{ 'radio__icon--checked': isChecked }">
|
||||
<view v-if="isChecked" class="radio__icon-dot"></view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="radio__label">
|
||||
<slot>{{ label }}</slot>
|
||||
</view>
|
||||
|
|
@ -79,28 +79,28 @@ const handleClick = () => {
|
|||
opacity: 0.5;
|
||||
}
|
||||
|
||||
&__icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border: 2rpx solid #dcdfe6;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 8rpx;
|
||||
transition: all 0.2s;
|
||||
// &__icon {
|
||||
// width: 40rpx;
|
||||
// height: 40rpx;
|
||||
// border: 2rpx solid #dcdfe6;
|
||||
// border-radius: 50%;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: center;
|
||||
// margin-right: 8rpx;
|
||||
// transition: all 0.2s;
|
||||
|
||||
&--checked {
|
||||
border-color: #0083ff;
|
||||
}
|
||||
}
|
||||
// &--checked {
|
||||
// border-color: #0083ff;
|
||||
// }
|
||||
// }
|
||||
|
||||
&__icon-dot {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
background-color: #0083ff;
|
||||
border-radius: 50%;
|
||||
}
|
||||
// &__icon-dot {
|
||||
// width: 20rpx;
|
||||
// height: 20rpx;
|
||||
// background-color: #0083ff;
|
||||
// border-radius: 50%;
|
||||
// }
|
||||
|
||||
&__label {
|
||||
line-height: 1;
|
||||
|
|
@ -109,5 +109,7 @@ const handleClick = () => {
|
|||
|
||||
.radio-active {
|
||||
color: #0083ff;
|
||||
border: 2rpx solid #0083ff;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
>
|
||||
<FilterMenu ref="filterMenuRef" />
|
||||
<template #footer>
|
||||
<view class="flex items-center">
|
||||
<view class="flex items-center px-[32rpx]">
|
||||
<button
|
||||
plain
|
||||
class="border-[#f5f5f5]! flex-auto bg-[#f5f5f5]! rounded-[8rpx]! text-[#1580FF]! text-[32rpx]! font-normal! mr-[22rpx]"
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
class="border-[#1580FF]! flex-auto bg-[#1580FF]! rounded-[8rpx]! text-[#fff]! text-[32rpx]! font-normal!"
|
||||
@click="handleResult"
|
||||
>
|
||||
查看结果
|
||||
确定
|
||||
</button>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -38,33 +38,35 @@
|
|||
<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"
|
||||
v-for="(item, index) in subMenu"
|
||||
:key="item.id"
|
||||
:title="item.title"
|
||||
@open="handleOpenSubMenu(item.id)"
|
||||
custom-class="flex items-center"
|
||||
:activation="item.activation"
|
||||
>
|
||||
<view class="mx-[24rpx] my-[16rpx]">
|
||||
<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]">
|
||||
<Region
|
||||
:defaultValue="regionKeyInfo"
|
||||
v-if="currentMenu === 1"
|
||||
@changeName="handleRegionChange"
|
||||
@change="handleRegionIdChange"
|
||||
class="custom-check-group"
|
||||
/>
|
||||
<Nature
|
||||
v-if="currentMenu === 2"
|
||||
:defaultValue="natureKeyInfo"
|
||||
@changeName="handleNatureChange"
|
||||
@change="handleNatureIdChange"
|
||||
class="custom-check-group"
|
||||
/>
|
||||
<UniType
|
||||
v-if="currentMenu === 3"
|
||||
:defaultValue="uniTypeKeyInfo"
|
||||
@changeName="handleUniTypeChange"
|
||||
@change="handleUniTypeIdChange"
|
||||
class="custom-check-group"
|
||||
/>
|
||||
<view class="flex items-center justify-between px-[16rpx] pb-[32rpx]">
|
||||
<view class="cancel-btn" @click="handleClear">清空</view>
|
||||
<view class="submit-btn" @click="handleCheck">查看</view>
|
||||
</view>
|
||||
|
|
@ -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(() => {
|
|||
<style lang="scss" scoped>
|
||||
@import '../styles/navbar_search.scss';
|
||||
@import '@/pages-sub/home/styles/picker-view-btn.scss';
|
||||
@import '@/pages-sub/home/styles/grid-checkbox.scss';
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
value-key="id"
|
||||
label-key="name"
|
||||
v-bind="$attrs"
|
||||
width="100%"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
@ -23,10 +24,14 @@ getUniversityFeature().then((res) => {
|
|||
|
||||
const defaultInfo = ref<string[]>([])
|
||||
|
||||
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)
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="flex flex-col sheet-body-border">
|
||||
<view class="flex">
|
||||
<view class="flex flex-1">
|
||||
<view class="w-[176rpx] h-initial bg-[#F7F8FA] flex flex-col items-center">
|
||||
<view
|
||||
:class="`text-[#666] flex items-center justify-center h-[104rpx] w-full ${item.id === currentMenu ? 'active' : ''}`"
|
||||
|
|
@ -11,55 +11,65 @@
|
|||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view class="flex-1 pb-[24rpx] h-[50vh] mt-[32rpx] mx-[32rpx]" :scroll-y="true">
|
||||
<Phase v-show="currentMenu === 1" @change="handlePhaseChange" />
|
||||
<CollegeFeature
|
||||
v-show="currentMenu === 5"
|
||||
width="240rpx"
|
||||
height="60rpx"
|
||||
class="justify-center!"
|
||||
:defaultValue="defaultCollegeFeature"
|
||||
@change-name="handleCollegeFeatureChange"
|
||||
/>
|
||||
<Region
|
||||
width="240rpx"
|
||||
height="60rpx"
|
||||
class="justify-center!"
|
||||
v-show="currentMenu === 2"
|
||||
:defaultValue="defaultRegion"
|
||||
@change-name="handleRegionChange"
|
||||
/>
|
||||
<UniType
|
||||
width="240rpx"
|
||||
height="60rpx"
|
||||
class="justify-center!"
|
||||
v-show="currentMenu === 3"
|
||||
:defaultValue="defaultUniType"
|
||||
@change-name="handleUniTypeChange"
|
||||
/>
|
||||
<Nature
|
||||
width="240rpx"
|
||||
height="60rpx"
|
||||
class="justify-center!"
|
||||
v-show="currentMenu === 4"
|
||||
:defaultValue="defaultNature"
|
||||
@change-name="handleNatureChange"
|
||||
/>
|
||||
<scroll-view class="h-[40vh] pb-[14rpx] pt-[32rpx]" :scroll-y="true">
|
||||
<view class="px-[32rpx]">
|
||||
<Phase
|
||||
v-show="currentMenu === 1"
|
||||
:defaultValue="defaultPhase"
|
||||
@change="handlePhaseChange"
|
||||
/>
|
||||
<CollegeFeature
|
||||
v-show="currentMenu === 5"
|
||||
width="240rpx"
|
||||
height="60rpx"
|
||||
class="custom-pl"
|
||||
:defaultValue="defaultCollegeFeature"
|
||||
@change-obj="handleCollegeFeatureChangeObj"
|
||||
/>
|
||||
<Region
|
||||
width="240rpx"
|
||||
height="60rpx"
|
||||
class="custom-pl"
|
||||
v-show="currentMenu === 2"
|
||||
:defaultValue="defaultRegion"
|
||||
@change-obj="handleRegionChangeObj"
|
||||
/>
|
||||
<UniType
|
||||
width="240rpx"
|
||||
height="60rpx"
|
||||
class=""
|
||||
v-show="currentMenu === 3"
|
||||
:defaultValue="defaultUniType"
|
||||
@change-obj="handleUniTypeChangeObj"
|
||||
/>
|
||||
<Nature
|
||||
width="240rpx"
|
||||
height="60rpx"
|
||||
class="justify-center!"
|
||||
v-show="currentMenu === 4"
|
||||
:defaultValue="defaultNature"
|
||||
@change-obj="handleNatureChangeObj"
|
||||
/>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- <view class="pt-[32rpx] px-[32rpx] wei-xin-pt box-shadow">
|
||||
<view class="flex items-center flex-wrap gap-[24rpx]">
|
||||
<view
|
||||
class="px-[20rpx] py-[12rpx] bg-[#f8f8f8] rounded-[8rpx]"
|
||||
v-for="item in 4"
|
||||
:key="item"
|
||||
>
|
||||
<text class="text-[#303030] text-[24rpx] font-medium mr-[16rpx]">中外合作</text>
|
||||
<view class="i-carbon-close-filled"></view>
|
||||
|
||||
<scroll-view class="box-shadow" :scroll-x="true">
|
||||
<view class="flex items-center gap-[24rpx] w-max px-[32rpx] pt-[32rpx] pb-[40rpx]">
|
||||
<view
|
||||
class="px-[20rpx] py-[12rpx] bg-[#f8f8f8] rounded-[8rpx]"
|
||||
v-for="(item, index) in filterParams"
|
||||
:key="item.value.name"
|
||||
>
|
||||
<text class="text-[#303030] text-[24rpx] font-medium mr-[16rpx]">
|
||||
{{ item.value.name }}
|
||||
</text>
|
||||
<view
|
||||
class="i-carbon-close-filled text-[#CBCBCB] text-[24rpx]"
|
||||
@click="handleRemove(item, index)"
|
||||
></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -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;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
.large-checkbox {
|
||||
:deep(.custom-checkbox) {
|
||||
--checkbox-width: 240rpx;
|
||||
--checkbox-height: 60rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
value-key="id"
|
||||
label-key="name"
|
||||
v-bind="$attrs"
|
||||
width="100%"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
@ -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)
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<RadioGroup v-model="choosePhase" class="custom-radio-group" @change="handleChange">
|
||||
<RadioGroup
|
||||
v-model="choosePhase"
|
||||
class="custom-radio-group"
|
||||
@change="handleChange"
|
||||
v-bind="$attrs"
|
||||
>
|
||||
<Radio v-for="item in phaseList" :key="item.batch" :name="item.batch" class="custom-radio">
|
||||
{{ item.batch }}
|
||||
</Radio>
|
||||
|
|
@ -17,7 +22,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getBatchDynamicData, getWxUserInfo } from '@/service/index/api'
|
||||
import { getBatchDynamicData } 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'
|
||||
|
|
@ -25,12 +30,6 @@ import { useRules } from '@/pages-sub/home/inputScore/useRules'
|
|||
|
||||
const userStore = useUserStore()
|
||||
|
||||
defineOptions({
|
||||
options: {
|
||||
styleIsolation: 'shared',
|
||||
},
|
||||
})
|
||||
|
||||
const phaseList = ref([])
|
||||
|
||||
const choosePhase = ref('')
|
||||
|
|
@ -46,41 +45,21 @@ const fetchBatchData = () => {
|
|||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
phaseList.value = (res.result as { batches: any[] }).batches
|
||||
choosePhase.value = userStore.userInfo.batchName
|
||||
handleChange(choosePhase.value)
|
||||
}
|
||||
})
|
||||
choosePhase.value = userStore.userInfo.batchName
|
||||
handleChange(choosePhase.value)
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
useRules(fetchBatchData)
|
||||
|
||||
// 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()
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
})
|
||||
|
||||
const handleChange = (val: string) => {
|
||||
const phase = phaseList.value.find((item) => item.batch === val)
|
||||
choosePhase.value = val
|
||||
emits('changeName', val)
|
||||
emits('change', val)
|
||||
emits('change', phase)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
<template>
|
||||
<CheckGroup :list="regionList" @change="handleChange" label-key="simplename" v-bind="$attrs" />
|
||||
<CheckGroup
|
||||
:list="regionList"
|
||||
@change="handleChange"
|
||||
label-key="simplename"
|
||||
v-bind="$attrs"
|
||||
width="100%"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
|
@ -25,11 +31,16 @@ getRegionInfo().then((res) => {
|
|||
}
|
||||
})
|
||||
|
||||
const emits = defineEmits(['change', 'changeName'])
|
||||
const emits = defineEmits(['change', 'changeName', 'changeObj'])
|
||||
|
||||
const handleChange = (val: any) => {
|
||||
const names = regionList.value.filter((item) => val.includes(item.code)).map((item) => item.name)
|
||||
emits('changeName', names)
|
||||
const chooseObj = val.map((code) => regionList.value.find((item) => item.code === code))
|
||||
|
||||
emits(
|
||||
'changeName',
|
||||
chooseObj.map((item) => item.name),
|
||||
)
|
||||
emits('change', val)
|
||||
emits('changeObj', chooseObj)
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
value-key="id"
|
||||
label-key="name"
|
||||
v-bind="$attrs"
|
||||
width="100%"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
@ -22,11 +23,15 @@ getUniversityType().then((res) => {
|
|||
|
||||
const defaultInfo = ref<string[]>([])
|
||||
|
||||
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)
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -96,13 +96,14 @@
|
|||
|
||||
<ActionSheet v-model:show="show" title="">
|
||||
<template>
|
||||
<view class="py-[32rpx] flex flex-col items-center justify-center">
|
||||
<text class="text-[#303030] text-[36rpx] font-bold mb-[18rpx]">省份</text>
|
||||
<view class="pt-[32rpx] flex flex-col items-center justify-center">
|
||||
<text class="text-[#303030] text-[36rpx] font-bold">省份</text>
|
||||
<Region
|
||||
@change="handleRegionChangeCode"
|
||||
@change-name="handleRegionChangeName"
|
||||
:defaultValue="searchParams.locationCode ? [searchParams.locationCode] : []"
|
||||
:max="1"
|
||||
class="custom-check-group w-full"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -29,24 +29,38 @@
|
|||
/>
|
||||
<view class="custom-background h-[200rpx] w-full absolute top-0 left-0 z-[-1]"></view>
|
||||
</view>
|
||||
<drop-menu>
|
||||
<drop-menu-item :key="1" :title="'省份'" custom-class="flex items-center">
|
||||
<view class="pl-[32rpx] pb-[32rpx] pt-[16rpx]">
|
||||
<Region
|
||||
:defaultValue="searchParams.locationCode"
|
||||
@changeName="handleRegionChange"
|
||||
@change="handleRegionChangeCode"
|
||||
/>
|
||||
</view>
|
||||
</drop-menu-item>
|
||||
<drop-menu-item :key="2" :title="'层次'" custom-class="flex items-center">
|
||||
<view class="pl-[32rpx] pb-[32rpx] pt-[16rpx]">
|
||||
<Nature @changeName="handleNatureChange" />
|
||||
</view>
|
||||
</drop-menu-item>
|
||||
<drop-menu-item :key="3" title="类别" custom-class="flex items-center">
|
||||
<view class="pl-[32rpx] pb-[32rpx] pt-[16rpx]">
|
||||
<UniType @change-name="handleUniTypeChange" />
|
||||
<drop-menu ref="dropMenuRef">
|
||||
<drop-menu-item
|
||||
:key="item.id"
|
||||
:title="item.title"
|
||||
custom-class="flex items-center"
|
||||
v-for="item in subMenu"
|
||||
:activation="item.activation"
|
||||
>
|
||||
<Region
|
||||
:defaultValue="regionKeyInfo"
|
||||
@changeName="handleRegionChange"
|
||||
@change="handleRegionChangeCode"
|
||||
class="custom-check-group"
|
||||
v-if="item.id === 1"
|
||||
/>
|
||||
<Nature
|
||||
:defaultValue="natureKeyInfo"
|
||||
@changeName="handleNatureChange"
|
||||
@change="handleNatureChangeCode"
|
||||
class="custom-check-group"
|
||||
v-if="item.id === 2"
|
||||
/>
|
||||
<UniType
|
||||
:defaultValue="uniTypeKeyInfo"
|
||||
@change-name="handleUniTypeChange"
|
||||
@change="handleUniTypeChangeCode"
|
||||
class="custom-check-group"
|
||||
v-if="item.id === 3"
|
||||
/>
|
||||
<view class="flex items-center justify-between px-[16rpx] pb-[32rpx]">
|
||||
<view class="cancel-btn" @click="handleClear">清空</view>
|
||||
<view class="submit-btn" @click="handleCheck">查看</view>
|
||||
</view>
|
||||
</drop-menu-item>
|
||||
</drop-menu>
|
||||
|
|
@ -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()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/pages-sub/home/styles/navbar-background.scss';
|
||||
@import '@/pages-sub/home/styles/search-input.scss';
|
||||
@import '@/pages-sub/home/styles/grid-checkbox.scss';
|
||||
@import '@/pages-sub/home/styles/picker-view-btn.scss';
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -19,41 +19,36 @@
|
|||
/>
|
||||
<view class="custom-background h-[200rpx] w-full absolute top-0 left-0 z-[-1]"></view>
|
||||
</view>
|
||||
<drop-menu>
|
||||
<drop-menu-item :key="1" :title="searchParams.locationName || '省份'">
|
||||
<view class="pl-[32rpx] pb-[32rpx] pt-[16rpx]">
|
||||
<Region
|
||||
:defaultValue="searchParams.locationCode ? [searchParams.locationCode] : []"
|
||||
:max="1"
|
||||
@changeName="handleRegionChange"
|
||||
@change="handleRegionChangeCode"
|
||||
/>
|
||||
</view>
|
||||
<drop-menu ref="dropMenuRef">
|
||||
<drop-menu-item
|
||||
:key="1"
|
||||
:title="searchParams.locationName || '省份'"
|
||||
:activation="searchParams.locationName !== ''"
|
||||
>
|
||||
<Region
|
||||
:defaultValue="searchParams.locationCode ? [searchParams.locationCode] : []"
|
||||
:max="1"
|
||||
class="custom-check-group"
|
||||
@changeName="handleRegionChange"
|
||||
@change="handleRegionChangeCode"
|
||||
/>
|
||||
</drop-menu-item>
|
||||
<drop-menu-item
|
||||
:key="2"
|
||||
:title="searchParams.year || '年份'"
|
||||
custom-class="flex items-center"
|
||||
:activation="searchParams.year !== ''"
|
||||
>
|
||||
<view class="pl-[32rpx] pb-[32rpx] pt-[16rpx]">
|
||||
<CheckGroup
|
||||
:list="checkYearList"
|
||||
:default-value="searchParams.year ? [searchParams.year] : []"
|
||||
@change="handleYearChange"
|
||||
labelKey="year"
|
||||
valueKey="year"
|
||||
:max="1"
|
||||
/>
|
||||
</view>
|
||||
</drop-menu-item>
|
||||
<drop-menu-item :key="3" title="类别" custom-class="flex items-center">
|
||||
<view class="pl-[32rpx] pb-[32rpx] pt-[16rpx]">
|
||||
<UniType
|
||||
@change="handleUniTypeChange"
|
||||
:max="1"
|
||||
:default-value="searchParams.type ? [searchParams.type] : []"
|
||||
/>
|
||||
</view>
|
||||
<CheckGroup
|
||||
:list="checkYearList"
|
||||
:default-value="searchParams.year ? [searchParams.year] : []"
|
||||
@change="handleYearChange"
|
||||
labelKey="year"
|
||||
valueKey="year"
|
||||
:max="1"
|
||||
class="custom-check-group"
|
||||
width="100%"
|
||||
/>
|
||||
</drop-menu-item>
|
||||
</drop-menu>
|
||||
<WXXTable :data="lineList" class="px-[32rpx] mt-[16rpx] pb-safe flex-1">
|
||||
|
|
@ -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(() => {
|
|||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/pages-sub/home/styles/navbar-background.scss';
|
||||
@import '@/pages-sub/home/styles/grid-checkbox.scss';
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
/>
|
||||
<image
|
||||
class="h-[190rpx] w-[190rpx] absolute top-[194rpx] left-[460rpx] mix-blend-multiply z-[-1]"
|
||||
src="https://api.static.ycymedu.com/sub/images/schoolRank/trophy.jpg"
|
||||
src="https://api.static.ycymedu.com/sub/images/schoolRank/trophy.png"
|
||||
/>
|
||||
</view>
|
||||
<view class="my-[24rpx]">
|
||||
|
|
|
|||
|
|
@ -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%;
|
||||
}
|
||||
}
|
||||
|
|
@ -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)"
|
||||
>
|
||||
<view class="flex flex-col gap-[14rpx]">
|
||||
<text class="text-[#303030] text-[32rpx] font-semibold">
|
||||
|
|
@ -29,63 +29,12 @@
|
|||
<script setup lang="ts">
|
||||
import { getMyBusReports } from '@/service/index/api'
|
||||
import { useUserStore } from '@/store'
|
||||
import { useRouterDetail } from './useRouterDetail'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
const list = ref([])
|
||||
|
||||
const toDetail = (item: any) => {
|
||||
// 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,
|
||||
})
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
getMyBusReports({ CustomId: userStore.userInfo?.estimatedAchievement.wxId }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
<template>
|
||||
<view class="item-wrapper relative mt-[32rpx]" @click="toAssessmentPage">
|
||||
<view
|
||||
class="item-wrapper relative mt-[32rpx]"
|
||||
:style="`--start-color: ${startColor}; --end-color: ${endColor}`"
|
||||
@click="toAssessmentPage"
|
||||
>
|
||||
<view
|
||||
class="flag text-[22rpx] text-center absolute top-0 right-0"
|
||||
:class="{ free: item.isFree }"
|
||||
|
|
@ -37,6 +41,14 @@ const props = defineProps({
|
|||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
startColor: {
|
||||
type: String,
|
||||
default: '#e5f2fa',
|
||||
},
|
||||
endColor: {
|
||||
type: String,
|
||||
default: '#dae8fa',
|
||||
},
|
||||
})
|
||||
|
||||
const toAssessmentPage = () => {
|
||||
|
|
@ -59,7 +71,7 @@ const toAssessmentPage = () => {
|
|||
|
||||
<style scoped lang="scss">
|
||||
.item-wrapper {
|
||||
background: linear-gradient(270deg, #e5f2fa 0%, #dae8fa 100%);
|
||||
background: linear-gradient(90deg, #e5f2fa 0%, #dae8fa 100%);
|
||||
border-radius: 18rpx;
|
||||
padding: 32rpx;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,17 +13,35 @@
|
|||
<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>
|
||||
<EvaluationItem
|
||||
v-for="item in academicList"
|
||||
:key="item.id"
|
||||
:item="item"
|
||||
start-color="#e5f2fa"
|
||||
end-color="#dae8fa"
|
||||
></EvaluationItem>
|
||||
</view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<view class="mx-[32rpx] overflow-auto h-full">
|
||||
<EvaluationItem v-for="item in healthList" :key="item.id" :item="item"></EvaluationItem>
|
||||
<EvaluationItem
|
||||
v-for="item in healthList"
|
||||
:key="item.id"
|
||||
:item="item"
|
||||
start-color="#E6F4F2"
|
||||
end-color="#CAF4F0"
|
||||
></EvaluationItem>
|
||||
</view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<view class="mx-[32rpx] overflow-auto h-full">
|
||||
<EvaluationItem v-for="item in learningList" :key="item.id" :item="item"></EvaluationItem>
|
||||
<EvaluationItem
|
||||
v-for="item in learningList"
|
||||
:key="item.id"
|
||||
:item="item"
|
||||
start-color="#E9EFFF"
|
||||
end-color="#D8DFFD"
|
||||
></EvaluationItem>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
|
|
|||
|
|
@ -111,8 +111,10 @@ const handleAppointment = (
|
|||
if (res.code === 200) {
|
||||
list.value[index].isAppointment = !item.isAppointment
|
||||
list.value[index].appointId = res.result
|
||||
uni.showToast({
|
||||
title: item.isAppointment ? '预约成功' : '取消预约成功',
|
||||
uni.showModal({
|
||||
title: '预约成功',
|
||||
content: '稍后会有老师联系您',
|
||||
showCancel: false,
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ onShow(() => {
|
|||
onShareAppMessage(() => {
|
||||
return {
|
||||
title: '六维志愿',
|
||||
path: '/pages/index/index',
|
||||
path: '/pages/home/index/index',
|
||||
imageUrl: 'https://api.static.ycymedu.com/images/share.png',
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue