feat: 报告更新
parent
f23605497b
commit
d480c6adf0
|
|
@ -7,15 +7,15 @@
|
|||
}
|
||||
</route>
|
||||
<template>
|
||||
<!-- <web-view :src="url" @message="handleChildMessage" :update-title="false" /> -->
|
||||
<input
|
||||
<web-view :src="url" @message="handleChildMessage" :update-title="false" />
|
||||
<!-- <input
|
||||
v-model="message"
|
||||
type="text"
|
||||
placeholder="请输入你的高考分数"
|
||||
confirm-type="done"
|
||||
class="flex-auto"
|
||||
@confirm="handleMessage"
|
||||
/>
|
||||
/> -->
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
<TitleBar :title="title" />
|
||||
|
||||
<view v-for="(item, index) in items" :key="index" class="suggestion-item">
|
||||
<view class="text-[32rpx]">{{ item.title }}</view>
|
||||
<view class="text-[26rpx] font-400 mt-[10rpx]">
|
||||
<view class="text-[32rpx] font-500">{{ item.title }}</view>
|
||||
<view class="text-[26rpx] font-400 mt-[10rpx] text-[#666]">
|
||||
{{ item.description instanceof Array ? item.description.join(',') : item.description }}
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,33 @@
|
|||
<template>
|
||||
<view class="mt-[30rpx] bg-white rounded-[20rpx] p-[30rpx]">
|
||||
<TitleBar :title="title" />
|
||||
<view class="text-[26rpx] text-[#666] mt-[10rpx] text-center">
|
||||
<text
|
||||
class="text-[22rpx] px-[12rpx] py-[4rpx] rounded-[20rpx] bg-[rgba(250,142,35,0.15)] text-[#FA8E23]"
|
||||
>
|
||||
{{ item.notes }}
|
||||
</text>
|
||||
<view class="mt-[20rpx] text-center">
|
||||
<view class="text-[#000] text-[26rpx] font-700">学习风格表现</view>
|
||||
<view class="mt-[10rpx]" v-for="(item, index) in item.learning_performance" :key="index">
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-[20rpx] text-center">
|
||||
<view class="text-[#000] text-[26rpx] font-700">学习风格特点</view>
|
||||
<view class="mt-[10rpx]" v-for="(item, index) in item.features" :key="index">
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import TitleBar from './TitleBar.vue'
|
||||
defineProps({
|
||||
items: {
|
||||
type: Array<{ title: string; description: string | [] }>,
|
||||
default: () => [],
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@
|
|||
opacity: `${1 - Math.abs(i * 8 - 90) / 90}`,
|
||||
}"
|
||||
></view>
|
||||
<view class="font-500 text-color">
|
||||
<text :class="`${score > 99 ? 'text-[50rpx]' : 'text-[62rpx]'}`">{{ score }}</text>
|
||||
<text class="text-[28rpx]">分</text>
|
||||
<view class="font-500 text-color w-full h-full flex items-center justify-center">
|
||||
<view :class="`${score > 99 ? 'text-[50rpx]' : 'text-[62rpx]'}`">{{ score }}</view>
|
||||
<view class="text-[28rpx] mt-[8rpx]">分</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,22 @@
|
|||
mode="scaleToFill"
|
||||
class="w-[180rpx] h-[52rpx] absolute top-[-9rpx] left-[20rpx]"
|
||||
/>
|
||||
<view v-for="item in innerParsing">{{ item.split(',').join(':') }}</view>
|
||||
<view v-for="(item, index) in innerParsing" class="text-[26rpx] mb-[20rpx]" :key="index">
|
||||
<text class="text-[#000] font-700">{{ item.title }}: </text>
|
||||
<text class="text-[#3d3d3d] font-400">{{ item.desc }}</text>
|
||||
</view>
|
||||
<view class="text-[26rpx]">
|
||||
<text class="text-[#000] font-700">策略偏好:</text>
|
||||
<view class="flex gap-x-[20rpx] gap-y-[16rpx] text-[22rpx] flex-wrap mt-[16rpx]">
|
||||
<view
|
||||
v-for="(item, index) in policy.items"
|
||||
:key="index"
|
||||
class="text-[22rpx] px-[12rpx] py-[4rpx] rounded-[20rpx] bg-[rgba(250,142,35,0.15)] text-[#FA8E23]"
|
||||
>
|
||||
{{ item.title }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -31,6 +46,7 @@ const props = defineProps({
|
|||
})
|
||||
|
||||
const innerParsing = ref([])
|
||||
const policy = ref({ items: [] })
|
||||
|
||||
watch(
|
||||
() => props.parsing,
|
||||
|
|
@ -38,13 +54,14 @@ watch(
|
|||
const _val = JSON.parse(newV) as {
|
||||
tags: { title: string; items: { title: string; desc: string }[] }[]
|
||||
}
|
||||
_val.tags.forEach((item, index) => {
|
||||
_val.tags.forEach((item) => {
|
||||
if (item.title === '策略偏好') {
|
||||
policy.value = item
|
||||
return
|
||||
} else {
|
||||
innerParsing.value.push(...item.items)
|
||||
}
|
||||
innerParsing.value.push(...item.items.map((item) => `${item.title},${item.desc}`))
|
||||
})
|
||||
console.log(innerParsing.value)
|
||||
},
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -23,15 +23,23 @@
|
|||
<view class="flex-1 overflow-auto pb-safe relative mx-[24rpx]">
|
||||
<!-- 顶部卡片 -->
|
||||
<view class="mt-[60rpx]">
|
||||
<learnStyleChart :pic-data="chartData" :parsing="parsing" />
|
||||
<LearnStyleChart :pic-data="chartData" :parsing="parsing" />
|
||||
</view>
|
||||
<view>
|
||||
<LearnStudySuggestion
|
||||
:title="item.name"
|
||||
:item="item"
|
||||
v-for="(item, index) in suggestions"
|
||||
:key="index"
|
||||
/>
|
||||
</view>
|
||||
<view class="mt-[30rpx]"></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import Navbar from '@/pages-evaluation-sub/components/navbar/Navbar.vue'
|
||||
import learnStyleChart from '../components/studyChart/LearnStyleChart.vue'
|
||||
import LearnStyleChart from '../components/studyChart/LearnStyleChart.vue'
|
||||
import LearnStudySuggestion from '../components/LearnStudySuggestion.vue'
|
||||
|
||||
import { getCustomScaleExplains } from '@/service/index/api'
|
||||
|
||||
|
|
@ -52,6 +60,7 @@ const studyRecord = ref({
|
|||
|
||||
const chartData = ref([])
|
||||
const parsing = ref('')
|
||||
const suggestions = ref([])
|
||||
|
||||
onLoad((options) => {
|
||||
pageType.value = +options.type
|
||||
|
|
@ -68,6 +77,8 @@ onLoad((options) => {
|
|||
}
|
||||
chartData.value = JSON.parse(studyRecord.value.result)
|
||||
parsing.value = studyRecord.value.suggestions
|
||||
suggestions.value = JSON.parse(studyRecord.value.description)
|
||||
console.log(suggestions.value)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -0,0 +1,138 @@
|
|||
<route lang="json5" type="page">
|
||||
{
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view :scroll-y="true" class="flex flex-col h-screen relative custom-bg">
|
||||
<Navbar
|
||||
safeAreaInsetTop
|
||||
:bordered="false"
|
||||
leftArrow
|
||||
@clickLeft="handleBack"
|
||||
bg-color="transparent"
|
||||
>
|
||||
<template #title>
|
||||
<text class="text-[#1F2329] text-[36rpx] font-medium text-[#fff]">考试焦虑测评报告</text>
|
||||
</template>
|
||||
</Navbar>
|
||||
|
||||
<view class="flex-1 overflow-auto pb-safe relative mx-[24rpx]">
|
||||
<!-- 顶部卡片 -->
|
||||
<view class="mt-[60rpx]">
|
||||
<StatusCard
|
||||
:score="score"
|
||||
:rules="anxietyRules"
|
||||
tip="测评结果只做参考。"
|
||||
:level="level"
|
||||
:description="studyRecord.description"
|
||||
:tagName="studyRecord.tagName"
|
||||
/>
|
||||
</view>
|
||||
<view>
|
||||
<LearnSkillSuggestion
|
||||
v-for="(item, index) in suggestions"
|
||||
:key="index"
|
||||
:items="item.items"
|
||||
:title="item.title"
|
||||
></LearnSkillSuggestion>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import Navbar from '@/pages-evaluation-sub/components/navbar/Navbar.vue'
|
||||
import StatusCard from '../components/StatusCard.vue'
|
||||
import LearnSkillSuggestion from '../components/LearnSkillSuggestion.vue'
|
||||
|
||||
import { getCustomScaleExplains } from '@/service/index/api'
|
||||
|
||||
const pageType = ref(0)
|
||||
const pageId = ref(0)
|
||||
const anxietyRules = [
|
||||
{
|
||||
label: '较低水平',
|
||||
range: '≤12分',
|
||||
color: '#00B281',
|
||||
},
|
||||
{
|
||||
label: '中等程度',
|
||||
range: '12-20分',
|
||||
color: '#F8B801',
|
||||
},
|
||||
{
|
||||
label: '较高水平',
|
||||
range: '≥21分',
|
||||
color: '#F5663E',
|
||||
},
|
||||
]
|
||||
|
||||
const score = ref(0)
|
||||
const level = ref(0)
|
||||
|
||||
const handleBack = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
const studyRecord = ref({
|
||||
description: '',
|
||||
title: '',
|
||||
result: '',
|
||||
tagName: '',
|
||||
suggestions: '',
|
||||
})
|
||||
|
||||
const calcLevel = (val: string) => {
|
||||
let _s = JSON.parse(val)
|
||||
if (_s[0].Total >= 21) {
|
||||
return 2
|
||||
} else if (_s[0].Total >= 12) {
|
||||
return 1
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
const suggestions = ref([])
|
||||
|
||||
onLoad((options) => {
|
||||
pageType.value = +options.type
|
||||
pageId.value = options.id
|
||||
|
||||
getCustomScaleExplains({ CustomScaleId: pageId.value }).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
studyRecord.value = resp.result as {
|
||||
description: string
|
||||
title: string
|
||||
result: string
|
||||
tagName: string
|
||||
suggestions: string
|
||||
}
|
||||
level.value = calcLevel(studyRecord.value.result)
|
||||
score.value = JSON.parse(studyRecord.value.result)[0].Total
|
||||
suggestions.value = JSON.parse(studyRecord.value.suggestions)
|
||||
console.log(suggestions)
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.custom-bg {
|
||||
background: linear-gradient(184deg, #0d79fc 0%, #2186fc 100%);
|
||||
}
|
||||
:deep(.icon-class) {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.custom-border {
|
||||
width: 162rpx;
|
||||
height: 162rpx;
|
||||
border-radius: 50%;
|
||||
border: 6rpx dashed;
|
||||
border-color: #05d69c transparent transparent transparent;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -157,6 +157,7 @@ const questionType = ref(-1)
|
|||
const questionName = ref('')
|
||||
const useTime = ref('')
|
||||
const quesApplication = ref('')
|
||||
const isLoading = ref(false)
|
||||
|
||||
onLoad((options) => {
|
||||
pageName.value = options.name
|
||||
|
|
@ -202,6 +203,11 @@ const handleNextQuestion = () => {
|
|||
}
|
||||
|
||||
const handleSubmit = () => {
|
||||
if (isLoading.value) {
|
||||
return
|
||||
}
|
||||
|
||||
isLoading.value = true
|
||||
let params = {
|
||||
customId: userStore.userInfo.estimatedAchievement.wxId,
|
||||
scaleId: pageId.value,
|
||||
|
|
@ -213,6 +219,7 @@ const handleSubmit = () => {
|
|||
})
|
||||
params.inputs = _inputs
|
||||
saveBusScaleAnswer(params).then((res) => {
|
||||
isLoading.value = false
|
||||
if (res.code === 200) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ let editType = ''
|
|||
let vTbId = ref(0)
|
||||
let webUrl = computed(() => {
|
||||
if (vTbId.value !== 0) {
|
||||
//sort.ycymedu.com
|
||||
return `https://sort.ycymedu.com/sort-college?id=${vTbId.value}&token=${userStore.userInfo.token}&score=${userStore.userInfo.estimatedAchievement.expectedScore}&batchName=${userStore.userInfo.batchName}&subjectGroup=${userStore.userInfo.estimatedAchievement.subjectGroup}&location=${userStore.userInfo.estimatedAchievement.provinceCode}`
|
||||
}
|
||||
return ''
|
||||
|
|
|
|||
|
|
@ -69,9 +69,11 @@ const toDetail = (item: any) => {
|
|||
})
|
||||
return
|
||||
} else if (item.type === 4) {
|
||||
url = `/pages-evaluation-sub/evaluate/studyReport/LearnStudyReport?id=${item.reportsId}&type=${item.type}`
|
||||
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}`
|
||||
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: '开发中....',
|
||||
|
|
|
|||
|
|
@ -393,14 +393,21 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "evaluate/studyReport/LearnSkillReport",
|
||||
"path": "evaluate/studyReport/anxietyReport",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "evaluate/studyReport/LearnStudyReport",
|
||||
"path": "evaluate/studyReport/learnSkillReport",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "evaluate/studyReport/learnStudyReport",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,13 @@
|
|||
<route lang="json5" type="page">
|
||||
{
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
enableShareAppMessage: true,
|
||||
enableShareTimeline: true,
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="flex flex-col relative">
|
||||
<view class="sticky top-0 z-99">
|
||||
|
|
@ -88,6 +98,18 @@ onShow(() => {
|
|||
})
|
||||
}
|
||||
})
|
||||
onShareAppMessage(() => {
|
||||
return {
|
||||
title: '六维志愿',
|
||||
path: '/pages/index/index',
|
||||
imageUrl: 'https://api.static.ycymedu.com/src/images/home/app-logo.svg',
|
||||
}
|
||||
})
|
||||
onShareTimeline(() => {
|
||||
return {
|
||||
title: '六维志愿',
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
|
|
@ -46,8 +46,9 @@ interface NavigateToOptions {
|
|||
"/pages-evaluation-sub/evaluate/psychologicalReport/mhtReport" |
|
||||
"/pages-evaluation-sub/evaluate/psychologicalReport/sasReport" |
|
||||
"/pages-evaluation-sub/evaluate/psychologicalReport/sdsReport" |
|
||||
"/pages-evaluation-sub/evaluate/studyReport/LearnSkillReport" |
|
||||
"/pages-evaluation-sub/evaluate/studyReport/LearnStudyReport" |
|
||||
"/pages-evaluation-sub/evaluate/studyReport/anxietyReport" |
|
||||
"/pages-evaluation-sub/evaluate/studyReport/learnSkillReport" |
|
||||
"/pages-evaluation-sub/evaluate/studyReport/learnStudyReport" |
|
||||
"/aiService-sub/index/index";
|
||||
}
|
||||
interface RedirectToOptions extends NavigateToOptions {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue