Record.vue
3.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<template>
<p class="sub_back" @click="handleBack"><返回</p>
<p class="sub_title">个案辅导</p>
<el-card class="account-container">
<img class="edge" src="@/assets/edge1.png" alt="">
<p class="info"><span>姓名:</span>{{info.name}}</p>
<p class="info"><span>性别:</span>{{info.male}}</p>
<p class="info"><span>年级:</span>{{info.class}}</p>
<p class="info"><span>咨询问题:</span>{{info.bookTypeName}}</p>
<p class="info"><span>时间:</span>{{info.timeDescription}}</p>
<!-- <p class="history" @click="handleInterview">访谈记录</p>
<p class="item_title">咨询结果</p>
<div class="result">
<div class="result_item" v-if="info.level==1">
<p class="title">一类危机学生</p>
<p class="des">需班主任辅导</p>
</div>
<div class="result_item" v-if="info.level==2">
<p class="title">二类危机学生</p>
<p class="des">需要在校心理辅导</p>
</div>
<div class="result_item" v-if="info.level==3">
<p class="title">三类危机学生</p>
<p class="des">需尽快进行心理治疗</p>
</div>
<div class="result_item" v-if="info.isNeedsHospital">
<p class="title">需要转介</p>
</div>
</div> -->
<p class="item_title">留言</p>
<p class="leave">{{info.leave}}</p>
</el-card>
</template>
<script>
import { onMounted, reactive, toRefs, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { ElMessage } from 'element-plus'
import axios from '@/utils/axios'
export default {
name: 'PsychologyRecord',
components: {
},
setup () {
const route = useRoute()
const router = useRouter()
const { detailId,UserId } = route.query
const state = reactive({
info: '',
})
onMounted(() => {
if(!UserId)return;
// 获取诊断反馈记录
axios.get(`/Counse/Diagnosis?detailId=${detailId}&userId=${UserId}`).then(res => {
// console.log('诊断反馈记录:', res)
state.info = res;
}).catch(err => {
console.log('err', err)
})
})
// const handleInterview = () => {
// router.push({ path: '/interview', query: { detailId: detailId ,readonly:true} })
// }
const handleBack = () => {
router.back()
}
return {
...toRefs(state),
handleBack,
// handleInterview
}
}
}
</script>
<style lang="scss" scoped>
.account-container {
position: relative;
min-height: 500px;
}
.book_btn {
display: block;
margin: 30px auto;
}
.info {
font-size: 15px;
padding: 15px 0;
margin: 0;
span {
display: inline-block;
width: 130px;
color: #999;
}
}
.history {
font-size: 17px;
color: #3a84ff;
text-decoration: underline;
margin: 30px 0;
cursor: pointer;
}
.item_title {
font-size: 17px;
font-weight: bold;
padding: 20px 0;
margin: 0;
}
.result {
.result_item {
display: inline-flex;
vertical-align: top;
width: 148px;
height: 84px;
font-size: 14px;
background: #f5f6fa;
border: 2px solid #f5f6fa;
margin-right: 30px;
box-sizing: border-box;
padding: 10px;
flex-wrap: wrap;
align-items: center;
justify-content: center;
&.active {
background: #fff;
border: 2px solid #3a84ff;
}
.title {
text-align: center;
margin: 0;
font-weight: bold;
}
.des {
margin: 0;
color: #999;
text-align: justify;
}
}
}
.edge {
width: 289px;
position: absolute;
bottom: 30px;
right: 30px;
z-index: 0;
}
</style>