毕设
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

454 lines
10 KiB

<template>
<view class="container" style="min-height:100vh">
<view class="header" @click="handleBack">
<image class="header-back-img" src="../../imgs/back.png"></image>
{{ registerType == 1 ? '失能老年人医养结合和健康服务登记' : '高龄老人医养结合服务登记'}}
<view></view>
</view>
<view class="view-step">
<view>
<image src="../../imgs/icon_wanc.png" class="step-img"></image>
<p style="color:#3D3D3D">信息</p>
</view>
<h1></h1>
<view>
<image src="../../imgs/icon_wanc.png" class="step-img"></image>
<p style="color:#3D3D3D">评估</p>
</view>
<h1></h1>
<view>
<image src="../../imgs/icon_wanc.png" class="step-img"></image>
<p style="color:#3D3D3D">筛查</p>
</view>
<h1></h1>
<view>
<image src="../../imgs/icon_moren.png" class="step-img"></image>
<p>登记</p>
</view>
<h1></h1>
<view>
<image src="../../imgs/icon_moren.png" class="step-img"></image>
<p>确认</p>
</view>
</view>
<view style="flex: 1; position: relative;margin-top: 20px;">
<scroll-view class="view-scroll" scroll-y="true" :lower-threshold="50" scroll-with-animation >
<view class="view-modal">
<view class="slot-content">
<h1 class="view-modal-h1">认知障碍筛查</h1>
<p class="view-modal-p">AD8筛查0~1分者为认知正常>1存在认知障碍风险</p>
<view class="view-modal-ul">
<view class="view-modal-li" v-for="(item,index) in testList">
<p class="modal-li-p">{{item.name}}</p>
<view class="modal-li-options">
<u-radio-group v-model="form[item.code]">
<view class="li-options-item" style="margin-right: 10px;" v-for="(row, index) in item.options" :key="index">
<u-radio
active-color="#ff981f"
:wrap="true"
:label-disabled="false"
@change="radioChange(item,row)"
:name="row.score"
>
<span>{{row.name}}</span>
</u-radio>
</view>
</u-radio-group>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
<view class="view-modal-but" @click="handleSubmit">下一步{{form.score || 0}}</view>
</view>
</template>
<script>
import {ad8Submit, ad8Query } from '@/common/api.js';
export default {
data() {
return {
testList: [
{
name: '1. 判断力出现问题(举例:a.在解决日常生活问题、经济问题有困难,如不会算帐了,做出的决定经常出错:b.辨不清方向或容易迷路)',
code:'q1',
options:[{
name:'是',
disabled: false,
score: '1'
},{
name:'否',
disabled: false,
score: '0'
},{
name:'无法判断',
disabled: false,
score: '00'
}]
},{
name: '2. 缺乏兴趣、爱好了,活动减少了(举例:a几乎整天和衣躺着看电视;b.平时厌恶外出,常闷在家里,身体懒得活动,无精打采)',
code:'q2',
options:[{
name:'是',
disabled: false,
score: '1'
},{
name:'否',
disabled: false,
score: '0'
},{
name:'无法判断',
disabled: false,
score: '00'
}]
},{
name: '3. 不断重复同一件事(举例:a.总是提相同的问题;b.一句话重复多遍等)',
code:'q3',
options:[{
name:'是',
disabled: false,
score: '1'
},{
name:'否',
disabled: false,
score: '0'
},{
name:'无法判断',
disabled: false,
score: '00'
}]
},{
name: '4. 学习使用某些日常工具或者家用电器有困难(举例:遥控器、微波炉、VCD等)',
code:'q4',
options:[{
name:'是',
disabled: false,
score: '1'
},{
name:'否',
disabled: false,
score: '0'
},{
name:'无法判断',
disabled: false,
score: '00'
}]
},{
name: '5. 记不清当前的月份或者年份',
code:'q5',
options:[{
name:'是',
disabled: false,
score: '1'
},{
name:'否',
disabled: false,
score: '0'
},{
name:'无法判断',
disabled: false,
score: '00'
}]
},{
name: '6. 处理个人财务困难(举例:a.忘了如何使用存折;b.忘了付水、电、煤气账单等)',
code:'q6',
options:[{
name:'是',
disabled: false,
score: '1'
},{
name:'否',
disabled: false,
score: '0'
},{
name:'无法判断',
disabled: false,
score: '00'
}]
},{
name: '7. 记不住和别人的约定(举例:a.忘记和家人已约好的聚会:b.忘记拜访亲朋好友的计划)',
code:'q7',
options:[{
name:'是',
disabled: false,
score: '1'
},{
name:'否',
disabled: false,
score: '0'
},{
name:'无法判断',
disabled: false,
score: '00'
}]
},{
name: '8. 日常记忆和思考能力出现问题(举例:a.自己放置的东西经常找不着;b.经常忘了服药;c.想不起孰人的名字;d.忘记要买的东西:e.忘记看过的电视、报纸、书籍的主要内容;f.与别人谈话时,无法表达自己的意思等)',
code:'q8',
options:[{
name:'是',
disabled: false,
score: '1'
},{
name:'否',
disabled: false,
score: '0'
},{
name:'无法判断',
disabled: false,
score: '00'
}]
},
],
form:{
"evaId": "",
"reslut": "",
"q1":"",
"q2":"",
"q3":"",
"q4":"",
"q5":"",
"q6":"",
"q7":"",
"q8":"",
"score":""
},
evaId:""
}
},
methods: {
// 提交患者评估
async handleSubmit() {
// 0~1分者为认知正常;>1存在认知障碍风险
if (this.form.score <= 1) {
this.form.result = '认知正常';
} else {
this.form.result = '存在认知障碍风险';
}
// 以下为提交表单的伪代码,根据实际需求进行实现
const res = await ad8Submit(this.form);
if (res.code == 200) {
uni.navigateTo({ url: `/pages/healthService/healthService4?evaId=${this.evaId}&djType=${this.registerType}` });
}
},
// 查询评价结果
async getpgQuery(){
const res = await ad8Query({evaId: this.evaId})
if(res.code == 200){
this.form = res.data || {
"evaId": this.evaId,
"reslut": "",
"q1":"",
"q2":"",
"q3":"",
"q4":"",
"q5":"",
"q6":"",
"q7":"",
"q8":"",
"score":""
}
}
},
// 选中某个单选框时,由radio时触发
radioChange(_item,row) {
this.form[_item.code] = row.score
let data = JSON.parse(JSON.stringify(this.form))
let totalScore = 0; // 初始化总分为 0
// 遍历 q1 到 q8,累加它们的值到总分中
for (let i = 1; i <= 8; i++) {
const questionKey = `q${i}`; // 构建属性名,如 q1, q2, ... q8
const questionValue = this.form[questionKey]; // 获取对应属性的值
totalScore += questionValue - 0;
}
// 将计算后的总分存储到 form.score 中
this.form.score = totalScore;
},
handleChange(){
console.log(1111)
},
// 返回上一步
handleBack(){
uni.navigateBack({
delta: 1,
});
},
},
created() {
},
async mounted (){
},
onLoad(data) {
this.evaId = data.evaId
this.registerType = data.djType
console.log('this.registerType',this.registerType)
this.getpgQuery()
},
}
</script>
<style lang="scss">
.view-modal-but{
height: 45px;
background: #FF981F;
border-radius: 23px;
font-size: 15px;
color: #FFFFFF;
line-height: 45px;
text-align: center;
margin-top: 14px;
font-size: 15px;
color: #FFFFFF;
}
.view-modal-ul{
.view-modal-li{
border-bottom: 1px solid #EDEDED;
margin-bottom: 14px;
}
}
.li-options-item{
margin-bottom: 10px;
span{
font-size: 15px;
color: #555555;
}
}
.view-modal{
padding: 14px;
background: #fff;
border-radius: 10px;
.view-modal-h1{
font-size: 20px;
color: #3D3D3D;
text-align: center;
}
.modal-li-p{
font-size: 17px;
color: #3D3D3D;
margin-bottom: 20px;
font-weight: 600;
}
.view-modal-p{
font-size: 12px;
color: #999999;
margin: 10px 0;
}
}
.view-form1{
margin-top: 20px;
.view-form-li1{
p{
flex:1
}
.form-li-right{
view{
width: 100%;
text-align: right;
color:#FF981F;
line-height: 52px;
}
.li-right-unit{
font-size: 16px;
}
}
}
}
.view-form{
padding: 14px;
background: #fff;
.view-form-title{
font-size: 16px;
color:#FF981F;
margin-bottom: 10px;
}
.view-form-ul{
.view-form-li{
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #E2E2E2;
.form-li-right{
flex: 1;
display: flex;
align-items: center;
.form-li-input{
flex: 1;
border: none;
text-align: right;
height: 40px;
}
}
p{
font-size: 18px;
width: 120px;
}
}
// .view-form-li:last-child{
// border: none;
// }
}
}
.uploat_img{
padding: 14px 0 0 22px;
background: #fff;
border-radius: 8px;
margin-bottom: 10px ;
.uploat_img-ul{
display: flex;
flex-wrap: wrap;
.uploat_img-li{
width: 90px !important;
height: 90px !important;
border-radius: 10px !important;
border: 1px dashed #CACACA;
margin-right: 18px;
margin-bottom: 14px;
}
}
p{
font-size: 16px;
color:#FF981F;
margin-bottom: 10px;
}
}
.header{
font-size: 16px;
color: #3D3D3D;
display: flex;
align-items: center;
justify-content: space-between;
.header-back-img{
width: 18px;
height: 18px;
}
view{
width: 20px;
}
}
.container{
display: flex;
flex-direction: column;
box-sizing: border-box;
padding: 46px 16px 20px 16px;
background: linear-gradient(130deg,#ffe8cc 8%,#fcfcfc,#fcfcfc,#fcfcfc);
}
</style>
<style>
.u-modal__button-group__wrapper{
display: none !important;
}
.view-scroll {
height: 100%;
position: absolute;
}
.u-radio-group--row{
flex-wrap: wrap;
}
</style>