增加心里健康评估内部的界面
This commit is contained in:
parent
bfbe620765
commit
9bc067a27b
@ -73,6 +73,21 @@ const routes = [
|
|||||||
name: 'UserProfile',
|
name: 'UserProfile',
|
||||||
component: UserProfile,
|
component: UserProfile,
|
||||||
meta: { title: '中医药与心理健康' }
|
meta: { title: '中医药与心理健康' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/customer/social-circle',
|
||||||
|
name: 'AnonymousShareCircle',
|
||||||
|
component: () => import('@/views/customer/AnonymousShareCircle.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/customer/psychological-test',
|
||||||
|
name: 'PsychologicalTest',
|
||||||
|
component: () => import('@/views/customer/PsychologicalTest.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/customer/questionnaire',
|
||||||
|
name: 'Questionnaire',
|
||||||
|
component: () => import('@/views/customer/Questionnaire.vue')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
47
src/views/customer/AnonymousShareCircle.vue
Normal file
47
src/views/customer/AnonymousShareCircle.vue
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<template>
|
||||||
|
<div class="anonymous-share-circle">
|
||||||
|
<h1>匿名分享圈</h1>
|
||||||
|
<el-input v-model="newPost" placeholder="分享你的想法..."></el-input>
|
||||||
|
<el-button type="primary" @click="submitPost">发布</el-button>
|
||||||
|
<div class="posts">
|
||||||
|
<div v-for="post in posts" :key="post.id" class="post">
|
||||||
|
<p>{{ post.content }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
newPost: '',
|
||||||
|
posts: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
submitPost () {
|
||||||
|
if (this.newPost) {
|
||||||
|
this.posts.push({ id: Date.now(), content: this.newPost })
|
||||||
|
this.newPost = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.anonymous-share-circle {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post {
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
47
src/views/customer/PsychologicalTest.vue
Normal file
47
src/views/customer/PsychologicalTest.vue
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<template>
|
||||||
|
<div class="psychological-test">
|
||||||
|
<h1>心理测试</h1>
|
||||||
|
<el-form @submit.prevent="submitTest">
|
||||||
|
<el-form-item label="问题 1">
|
||||||
|
<el-radio-group v-model="answers.q1">
|
||||||
|
<el-radio label="A">选项 A</el-radio>
|
||||||
|
<el-radio label="B">选项 B</el-radio>
|
||||||
|
<el-radio label="C">选项 C</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="问题 2">
|
||||||
|
<el-radio-group v-model="answers.q2">
|
||||||
|
<el-radio label="A">选项 A</el-radio>
|
||||||
|
<el-radio label="B">选项 B</el-radio>
|
||||||
|
<el-radio label="C">选项 C</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-button type="primary" @click="submitTest">提交测试</el-button>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
answers: {
|
||||||
|
q1: '',
|
||||||
|
q2: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
submitTest () {
|
||||||
|
console.log('提交的答案:', this.answers)
|
||||||
|
// 处理提交逻辑
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.psychological-test {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
45
src/views/customer/Questionnaire.vue
Normal file
45
src/views/customer/Questionnaire.vue
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
<template>
|
||||||
|
<div class="questionnaire">
|
||||||
|
<h1>问卷调查</h1>
|
||||||
|
<el-form @submit.prevent="submitSurvey">
|
||||||
|
<el-form-item label="您的年龄">
|
||||||
|
<el-input v-model="survey.age" placeholder="请输入您的年龄"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="您的性别">
|
||||||
|
<el-radio-group v-model="survey.gender">
|
||||||
|
<el-radio label="男">男</el-radio>
|
||||||
|
<el-radio label="女">女</el-radio>
|
||||||
|
<el-radio label="其他">其他</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-button type="primary" @click="submitSurvey">提交问卷</el-button>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
// eslint-disable-next-line vue/multi-word-component-names
|
||||||
|
name: 'Questionnaire',
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
survey: {
|
||||||
|
age: '',
|
||||||
|
gender: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
submitSurvey () {
|
||||||
|
console.log('提交的问卷:', this.survey)
|
||||||
|
// 处理提交逻辑
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.questionnaire {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue
Block a user