report.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <template>
  2. <view class="page-content">
  3. <mx-nav-bar title="心理健康诊断报告" :sub-title="subTitle"/>
  4. <scroll-view :scroll-top="scrollTop" scroll-y scroll-with-animation class="report-container"
  5. @scroll="handleScrolling">
  6. <uv-cell-group title="心理健康诊断测验介绍">
  7. <template #title>
  8. <view class="fx-row items-center">
  9. <uv-line direction="col" :custom-style="titleLineStyle"/>
  10. 心理健康诊断测验介绍
  11. </view>
  12. </template>
  13. <uv-cell class="bg-white">
  14. <template #title>
  15. <div class="indent-50">
  16. 本测验按焦虑情绪所指向的对象和由焦虑情绪而产生的行为这两个方面进行测定。
  17. 全量表由8个内容量表构成,把这8个内容量表的结果综合起来得到全量表分数,全量表分数从整体上表示焦虑程度强不强、焦虑范围广不广,分数越高,表明学生的焦虑程度越强:
  18. 而8个内容量表的结果可诊断出个人的焦虑中,哪个方面问题较大,主要包括;学习焦虑、对人焦虑、孤独倾向、自责倾向、过敏倾向、身体症状、恐怖倾向、冲动倾向。
  19. </div>
  20. </template>
  21. </uv-cell>
  22. <uv-cell class="bg-white" title="这是按照焦虑反应的表现方式和场合来分类的:" :border="false"/>
  23. <view class="p-20">
  24. <uv-cell class="bg-white mx-card" :border="false">
  25. <template #title>
  26. <view class="sub-title">学习焦虑</view>
  27. </template>
  28. <template #label>
  29. <view class="mt-20 text-content text-xs">
  30. 近年来,随着升学考试和就业考试的难度增加,学生和父母都很关心学习。每天把学习挂在心上,担心被老师提问,上课时一直不放心,一有考试就怕得坏分数而无法安心学习,这些就是学习焦虑的表现。
  31. </view>
  32. </template>
  33. </uv-cell>
  34. <uv-cell class="bg-white mx-card mt-10" :border="false">
  35. <template #title>
  36. <view class="sub-title">对人焦虑</view>
  37. </template>
  38. <template #label>
  39. <view class="mt-20 text-content text-xs">
  40. 青少年时期,由于自我过强,不会与人交往,很怕生人,所以,与他人讲话时,担心会不会脸红,受到教师或父母责备时,一直放在心上,并担心朋友也会背地里说自己的坏话,因而经常感到焦躁。
  41. </view>
  42. </template>
  43. </uv-cell>
  44. <uv-cell class="bg-white mx-card mt-10" :border="false">
  45. <template #title>
  46. <view class="sub-title">孤独倾向</view>
  47. </template>
  48. <template #label>
  49. <view class="mt-20 text-content text-xs">
  50. 被父母疏远的儿童,娇生惯养在家称大王在外懦弱的儿童,腼腆抑郁的青少年,都经常因孤独而烦恼。这类儿童和青少年,和大家一起做某件事时,由于技术差、经验不足,经常感到失败的威胁。因此,感到和大家一起玩还不如一个人玩。这样,就越来越不会和大家一起相处。当别人高兴地相互谈话时,就有一种我不仅不能参加,而且还被人家排挤的心情。这样恶性循环下去,最后只要是人们聚集在一起,就会感到恐怖。这样,既想加入到伙伴当中去,又想避免在伙伴们面前出现失败,因而产生不安倾向。
  51. </view>
  52. </template>
  53. </uv-cell>
  54. <uv-cell class="bg-white mx-card mt-10" :border="false">
  55. <template #title>
  56. <view class="sub-title">自责倾向</view>
  57. </template>
  58. <template #label>
  59. <view class="mt-20 text-content text-xs">
  60. 像打篮球、排球那样,如果自己的队输了,有些儿童和青少年就认为是因为自己加入了才输的,而一直放在心上。在受到责备、打架之后或成绩不好时,常会认为是自己不好。这样,就对自己所做的事失去了信心。经常担心,阻碍自己的行动。当发生不如意的事情时,不认为是他人的问题,而经常认为是自己不好,对自己所做的事抱有恐惧倾向,称为自责倾向。
  61. </view>
  62. </template>
  63. </uv-cell>
  64. <uv-cell class="bg-white mx-card mt-10" :border="false">
  65. <template #title>
  66. <view class="sub-title">过敏倾向</view>
  67. </template>
  68. <template #label>
  69. <view class="mt-20 text-content text-xs">
  70. 感受性太强,就连小事都放心不下,行动受到严重损害的倾向,称为过敏倾问。对周围的噪声特别敏感,担心家属中有人会受伤,生病或死亡,决定事情不果断,即使做了好事也感到烦恼。
  71. </view>
  72. </template>
  73. </uv-cell>
  74. <uv-cell class="bg-white mx-card mt-10" :border="false">
  75. <template #title>
  76. <view class="sub-title">身体症状</view>
  77. </template>
  78. <template #label>
  79. <view class="mt-20 text-content text-xs">
  80. 当焦虑急剧袭来时,感到将要死去,呼吸感到困难,心跳加快,感到喘不过气,出虚汗,头晕、知觉异常。如果焦虑是慢慢产生的,就会心神不定,心跳异常,脉搏混乱,想呕吐,食欲不振,肚子痛或失眠等,这种身体上的症状是比较明显的,所以,过去也曾用于焦虑的诊断。本测验除了这种身体症状外,还包括身体某个部分是否有毛病,身体某个部分是否比别人难看,对身体缺陷不放心等,这些都能用身体症状的内容量表来测定。
  81. </view>
  82. </template>
  83. </uv-cell>
  84. <uv-cell class="bg-white mx-card mt-10" :border="false">
  85. <template #title>
  86. <view class="sub-title">恐怖倾向</view>
  87. </template>
  88. <template #label>
  89. <view class="mt-20 text-content text-xs">
  90. 恐怖和焦虑通常是区别开来使用的。这里所说的是,客观上一点不需要恐惧,主观上也不知道为什么要恐惧,然而却抱有一种恐惧心理,这称为恐惧倾向。例如,只要登上高处就怕得不能站立,无缘无故地恐惧黑暗,晚上开灯睡觉等,都是用来测定这种倾向的。
  91. </view>
  92. </template>
  93. </uv-cell>
  94. <uv-cell class="bg-white mx-card mt-10" :border="false">
  95. <template #title>
  96. <view class="sub-title">冲动倾向</view>
  97. </template>
  98. <template #label>
  99. <view class="mt-20 text-content text-xs">
  100. 有时无缘无故地想大声哭、大声叫,或者一看到想要的东西,就一定要拿到手,毫无理由地想到远处去,或想死,这些称为冲动倾向。这种想干危险的事或愚蠢的事的观念,是因为内部具有焦虑倾向而产生的。
  101. </view>
  102. </template>
  103. </uv-cell>
  104. </view>
  105. </uv-cell-group>
  106. <uv-gap bg-color="white" :height="12"/>
  107. <uv-cell-group title="测评结果及辅导建议">
  108. <template #title>
  109. <view class="fx-row items-center">
  110. <uv-line direction="col" :custom-style="titleLineStyle"/>
  111. 测评结果及辅导建议
  112. </view>
  113. </template>
  114. </uv-cell-group>
  115. <template v-for="(rule,idx) in firedRules">
  116. <uv-gap v-if="idx>0" bg-color="#eeeeee" :height="5"/>
  117. <uv-cell-group :title="rule.title" class="bg-white">
  118. <template #title>
  119. <view class="font-[FZBangSKJW]" :class="rule.result.className">{{ rule.title }}</view>
  120. </template>
  121. <uv-cell>
  122. <template #title>
  123. <view class="text-xs text-content">结果解释</view>
  124. </template>
  125. <template #label>
  126. <view v-for="(ex,i) in rule.result.explain" :key="i" class="mt-15 text-sm"
  127. :style="{paddingLeft: ex.indent+'em'}">
  128. {{ ex.text }}
  129. </view>
  130. </template>
  131. </uv-cell>
  132. <uv-cell>
  133. <template #title>
  134. <view class="text-xs text-content">辅导建议</view>
  135. </template>
  136. <template #label>
  137. <view v-for="(ad,i) in rule.result.advice" :key="i" class="mt-15 text-sm"
  138. :style="{paddingLeft: ad.indent+'em'}">
  139. {{ ad.text }}
  140. </view>
  141. </template>
  142. </uv-cell>
  143. </uv-cell-group>
  144. </template>
  145. <uv-divider text="已经到底啦~" custom-style="margin:0; padding:30px 0;"/>
  146. <uv-back-top :scroll-top="scrollTop" :icon-style="{color: 'var(--primary-color)'}" @click="backToTop"/>
  147. </scroll-view>
  148. </view>
  149. </template>
  150. <script setup>
  151. import {ref, computed, onMounted} from 'vue'
  152. import {getMentalHealthReport} from "@/api/webApi/mental-health"
  153. import {useTransfer} from "@/hooks/useTransfer";
  154. import ReportRules from "@/pages/test-center/mental-health/report-rules";
  155. import {useUserStore} from "@/hooks/useUserStore";
  156. import {empty} from "@/uni_modules/uv-ui-tools/libs/function/test";
  157. const {currentUser} = useUserStore()
  158. const {prevData} = useTransfer()
  159. const scrollTop = ref(0)
  160. const report = ref({})
  161. const titleLineStyle = {
  162. marginRight: '5px',
  163. height: '15px',
  164. borderLeft: '8px solid var(--primary-color)',
  165. }
  166. const subTitle = computed(() => {
  167. const title = [currentUser.value.nickName]
  168. if (report.value.endTime) title.push(report.value.endTime)
  169. return title.join('/')
  170. })
  171. const firedRules = computed(() => {
  172. if (empty(report.value)) return []
  173. const formatValue = val => {
  174. if (typeof val === 'string') return {text: val, indent: 0}
  175. if (Array.isArray(val)) return val.map(formatValue)
  176. return val
  177. }
  178. const formatResult = (result) => {
  179. if (!result) return
  180. const r = {...result} // create a new result
  181. r.explain = formatValue(result.explain)
  182. r.advice = formatValue(result.advice)
  183. if (!Array.isArray(r.explain)) r.explain = [r.explain]
  184. if (!Array.isArray(r.advice)) r.advice = [r.advice]
  185. return r
  186. }
  187. return ReportRules.map(rule => ({
  188. ...rule,
  189. result: formatResult(rule.results.find(r => r.matcher(report.value[rule.key])))
  190. }))
  191. })
  192. onMounted(async () => {
  193. const {examineeId, testType} = prevData.value
  194. if (!examineeId || !testType) return
  195. const res = await getMentalHealthReport({examineeId, testType})
  196. report.value = res.data
  197. })
  198. const handleScrolling = (e) => {
  199. scrollTop.value = e.detail.scrollTop
  200. }
  201. const backToTop = () => {
  202. scrollTop.value = 0
  203. }
  204. </script>
  205. <style lang="scss" scoped>
  206. .report-container {
  207. height: calc(100vh - 44px);
  208. }
  209. .direction-item + .direction-item {
  210. margin-top: 10px;
  211. }
  212. .report-content {
  213. .rule-item + .rule-item {
  214. margin-top: 5px;
  215. }
  216. }
  217. /* 短横线 BEGIN */
  218. .sub-title {
  219. position: relative;
  220. display: inline-block;
  221. }
  222. .sub-title::after {
  223. content: '';
  224. position: absolute;
  225. bottom: -5px; /* 调整横线位置 */
  226. left: 0;
  227. width: 20px;
  228. height: 4px; /* 横线高度 */
  229. background-color: var(--primary-color); /* 横线颜色 */
  230. }
  231. /* 短横线 END */
  232. </style>