修改
This commit is contained in:
parent
c5b51eddea
commit
52cd660c26
13
api/pagesC/healthtest/index.js
Normal file
13
api/pagesC/healthtest/index.js
Normal file
@ -0,0 +1,13 @@
|
||||
import request from "../../request.js"
|
||||
|
||||
// 列表查询
|
||||
export function surveylist(data) {
|
||||
return request({
|
||||
url: '/evaluate/survey/list',
|
||||
method: 'get',
|
||||
data,
|
||||
header: {
|
||||
region: uni.getStorageSync('region'),
|
||||
},
|
||||
})
|
||||
}
|
||||
44
pages.json
44
pages.json
@ -77,18 +77,14 @@
|
||||
"path": "orderlist/orderlist",
|
||||
"style": {
|
||||
"navigationBarTitleText": "预约详情",
|
||||
"enablePullDownRefresh": false,
|
||||
// "navigationStyle": "default",
|
||||
"navigationBarBackgroundColor": "#4ac4ab"
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "screenorder/screenorder",
|
||||
"style": {
|
||||
"navigationBarTitleText": "筛查预约",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "default",
|
||||
"navigationBarBackgroundColor": "#4ac4ab"
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}, {
|
||||
"path": "managefamily/managefamily",
|
||||
@ -508,7 +504,8 @@
|
||||
"path": "healthtest/healthtest",
|
||||
"style": {
|
||||
"navigationBarTitleText": "健康自评",
|
||||
"enablePullDownRefresh": false
|
||||
"onReachBottomDistance": 40, //距离底部多远时触发 单位为px
|
||||
"enablePullDownRefresh": true //设置参数为true
|
||||
}
|
||||
}, {
|
||||
"path": "Physicalexamination/Physicalexamination",
|
||||
@ -613,6 +610,39 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"root": "questionnaire",
|
||||
"pages": [{
|
||||
"path": "hypertension/hypertension",
|
||||
"style": {
|
||||
"navigationBarTitleText": "高血压评估问卷",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}, {
|
||||
"path": "diabetes/diabetes",
|
||||
"style": {
|
||||
"navigationBarTitleText": "糖尿病评估问卷",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
} ,{
|
||||
"path" : "copd/copd",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "慢阻肺评估问卷",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "cerebralapoplexy/cerebralapoplexy",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "脑卒中评估问卷",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "white",
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
请选择城市
|
||||
</text>
|
||||
</view>
|
||||
<!-- <view class="address" @tap="city">
|
||||
<!-- <view class="address" @tap="city">
|
||||
<image src="../../static/pages/address.png" mode=""></image>
|
||||
<text v-if="address">
|
||||
{{address}}
|
||||
@ -109,7 +109,7 @@
|
||||
uni.setStorageSync("region", 1)
|
||||
}
|
||||
this.userinfo = uni.getStorageSync('userinfo');
|
||||
if (this.userinfo) {
|
||||
if (this.userinfo) {
|
||||
this.patientName = this.userinfo.patientName
|
||||
checkSignApply(this.userinfo.cardNo).then(res => {
|
||||
if (res.data.code != 0) {
|
||||
|
||||
@ -17,11 +17,13 @@
|
||||
<span class="name" v-else>
|
||||
请先登录!
|
||||
</span>
|
||||
<view class="signing" v-if="appPersonallist.signNo">
|
||||
已签约
|
||||
</view>
|
||||
<view class="signing" v-else>
|
||||
未签约
|
||||
<view class="" v-if="appPersonallist.patientName">
|
||||
<view class="signing" v-if="appPersonallist.signNo">
|
||||
已签约
|
||||
</view>
|
||||
<view class="signing" v-else>
|
||||
未签约
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="phone" v-if="appPersonallist.phone">
|
||||
@ -208,13 +210,13 @@
|
||||
showhome: false, //切换
|
||||
familyList: {}, //切换列表
|
||||
userinfo: {}, //用户信息
|
||||
valueopenid:'',
|
||||
valueopenid: '',
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
|
||||
|
||||
|
||||
// this.bjimg = baseurl + '/profile/appletPicture/inviteFriendsOne.png'
|
||||
let that = this
|
||||
@ -229,7 +231,7 @@
|
||||
that.appPersonallist = null
|
||||
}
|
||||
this.getpersnoal()
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 退出登录
|
||||
@ -265,38 +267,37 @@
|
||||
}
|
||||
},
|
||||
// 获取成员
|
||||
getpersnoal(){
|
||||
getpersnoal() {
|
||||
getCurrentUser(this.valueopenid).then(res => {
|
||||
console.log(res)
|
||||
this.familyList = res.data
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
// 切换成员
|
||||
changeFamilyInfo(e) {
|
||||
console.log(e,'000')
|
||||
switchResident(this.valueopenid,e.patientCode).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.$refs.uToast.show({
|
||||
title: '切换成功',
|
||||
type: 'success',
|
||||
duration: '1000',
|
||||
})
|
||||
uni.setStorageSync('userinfo', res.data);
|
||||
uni.setStorageSync('patientId', res.data.id);
|
||||
this.myInfo()
|
||||
|
||||
}
|
||||
else{
|
||||
this.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
this.showhome = false
|
||||
console.log(e, '000')
|
||||
switchResident(this.valueopenid, e.patientCode).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.$refs.uToast.show({
|
||||
title: '切换成功',
|
||||
type: 'success',
|
||||
duration: '1000',
|
||||
})
|
||||
uni.setStorageSync('userinfo', res.data);
|
||||
uni.setStorageSync('patientId', res.data.id);
|
||||
this.myInfo()
|
||||
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
this.showhome = false
|
||||
},
|
||||
removes() {
|
||||
this.appPersonallist = null
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/medicalservice/medicalservice'
|
||||
url: '/pages/homepage/homepage'
|
||||
});
|
||||
}, 2000);
|
||||
},
|
||||
|
||||
@ -187,6 +187,7 @@
|
||||
appointmentDate: null,
|
||||
appointmentStartTime: null,
|
||||
appointmentEndTime: null,
|
||||
orderChannel: "WECHAT_APPLET",
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -255,11 +256,57 @@
|
||||
info() {
|
||||
consultationInfo(this.formdata).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.$refs.uToast.show({
|
||||
title: '新建专家问诊成功',
|
||||
type: 'success',
|
||||
duration: '1500',
|
||||
back: 1
|
||||
res.data.payType = "WECHAT_PAY"
|
||||
res.data.paymentPrice = res.data.totalPrice
|
||||
res.data.openid = this.openid
|
||||
let id = res.data.id
|
||||
appletGoodsOrderPay(res.data).then(response => {
|
||||
if (response.code == 200) {
|
||||
uni.requestPayment({
|
||||
timeStamp: response.data.timeStamp,
|
||||
nonceStr: response.data.nonceStr,
|
||||
package: response.data.prepayId,
|
||||
signType: response.data.signType,
|
||||
paySign: response.data.paySign,
|
||||
success: function(res) {
|
||||
that.$refs.uToast.show({
|
||||
title: '支付成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
})
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
// uni.redirectTo({
|
||||
// url: `/pages/CommodityOrder/CommodityOrder`
|
||||
// // url: `/pages/orderDetails/orderDetails?goodsOrderId=${id}`
|
||||
// })
|
||||
}, 1500)
|
||||
},
|
||||
fail: function(err) {
|
||||
that.$refs.uToast.show({
|
||||
title: '取消支付',
|
||||
type: 'error',
|
||||
duration: 1500,
|
||||
})
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
// uni.redirectTo({
|
||||
// url: `/pages/orderDetails/orderDetails?goodsOrderId=${id}`
|
||||
// })
|
||||
}, 1500)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: response.msg,
|
||||
type: 'error',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@ -158,10 +158,10 @@
|
||||
|
||||
.hospitalimage {
|
||||
position: absolute;
|
||||
width: 120rpx;
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
top: 30rpx;
|
||||
left: 30rpx;
|
||||
left: 10rpx;
|
||||
}
|
||||
|
||||
.hospitalteacher {
|
||||
|
||||
@ -1,51 +1,30 @@
|
||||
.app {
|
||||
height: 100vh;
|
||||
background-color: #F7F5F5;
|
||||
padding: 15rpx 0 0 0;
|
||||
overflow: scroll;
|
||||
padding: 15rpx 0 50rpx 0;
|
||||
|
||||
.tophealth {
|
||||
font-family: Source Han Sans CN;
|
||||
position: relative;
|
||||
left: 5%;
|
||||
width: 92%;
|
||||
// background: red;
|
||||
height: 60rpx;
|
||||
margin-bottom: 10rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
image {
|
||||
position: absolute;
|
||||
width: 32rpx;
|
||||
height: 36rpx;
|
||||
top: 15%;
|
||||
// transform: translateY(-50%);
|
||||
// vertical-align: middle;
|
||||
margin: 0 10rpx 0 0;
|
||||
width: 32rpx;
|
||||
height: 36rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.health {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
line-height: 38rpx;
|
||||
height: 38rpx;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 7%;
|
||||
}
|
||||
|
||||
.history {
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
color: #26A888;
|
||||
line-height: 38rpx;
|
||||
height: 38rpx;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 0%;
|
||||
|
||||
float: right;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.bodyhealth {
|
||||
@ -56,7 +35,6 @@
|
||||
border-radius: 5rpx;
|
||||
position: relative;
|
||||
left: 50%;
|
||||
font-family: Source Han Sans CN;
|
||||
transform: translateX(-50%);
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
@ -88,7 +66,5 @@
|
||||
left: 30%;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -5,37 +5,82 @@
|
||||
<span class="health">智慧健康驿站自评表</span>
|
||||
<span class="history">历史记录</span>
|
||||
</view>
|
||||
<view class="bodyhealth">
|
||||
<image src="../../static/pages/view_face_background.png" mode=""></image>
|
||||
<view class="risk">高血压风险评估</view>
|
||||
<view class="bodyhealth" v-for="item in list" @tap='gosurveySubject(item)'>
|
||||
<image src="../../static/pageC/books.png" mode=""></image>
|
||||
<view class="risk">
|
||||
{{item.surveySubject==1001?'高血压评估问卷':item.surveySubject==1002?'糖尿病评估问卷':item.surveySubject==1003?
|
||||
'脑卒中评估问卷':item.surveySubject==1004?'慢阻肺评估问卷':item.surveySubject==1005?'慢病评估问卷':item.surveySubject==1006?'糖尿病肾病评估问卷':item.surveySubject==1007?
|
||||
'糖尿病眼病评估问卷':item.surveySubject==1008?'糖尿病足病评估问卷':''}}
|
||||
</view>
|
||||
<view class="estimate">风险评估</view>
|
||||
|
||||
</view>
|
||||
<view class="bodyhealth">
|
||||
<image src="../../static/pages/view_face_background.png" mode=""></image>
|
||||
<view class="risk">高血压风险评估</view>
|
||||
<view class="estimate">风险评估</view>
|
||||
|
||||
</view>
|
||||
<view class="bodyhealth">
|
||||
<image src="../../static/pages/view_face_background.png" mode=""></image>
|
||||
<view class="risk">高血压风险评估</view>
|
||||
<view class="estimate">风险评估</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
surveylist
|
||||
} from '@/api/pagesC/healthtest/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
list: [],
|
||||
total: 0,
|
||||
query: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.info();
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
gosurveySubject(item) {
|
||||
if (item.surveySubject == 1001) {
|
||||
uni.navigateTo({
|
||||
url: `/questionnaire/hypertension/hypertension?item=${encodeURIComponent(JSON.stringify(item))}`
|
||||
})
|
||||
} else if (item.surveySubject == 1002) {
|
||||
uni.navigateTo({
|
||||
url: `/questionnaire/diabetes/diabetes?item=${encodeURIComponent(JSON.stringify(item))}`
|
||||
})
|
||||
} else if (item.surveySubject == 1003) {
|
||||
uni.navigateTo({
|
||||
url: `/questionnaire/cerebralapoplexy/cerebralapoplexy?item=${encodeURIComponent(JSON.stringify(item))}`
|
||||
})
|
||||
} else if (item.surveySubject == 1004) {
|
||||
uni.navigateTo({
|
||||
url: `/questionnaire/copd/copd?item=${encodeURIComponent(JSON.stringify(item))}`
|
||||
})
|
||||
}
|
||||
},
|
||||
info() {
|
||||
surveylist(this.query).then(res => {
|
||||
this.list = res.rows
|
||||
this.total = res.total
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() { //下滑加载
|
||||
if (this.list.length >= this.total) {} else {
|
||||
this.query.pageNum++
|
||||
surveylist(this.query).then(res => {
|
||||
if (res.rows) {
|
||||
res.rows.forEach(e => {
|
||||
this.list.push(e)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() { //下拉刷新
|
||||
this.query.pageNum = 1;
|
||||
this.info();
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 1000);
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -468,6 +468,14 @@
|
||||
content: JSON.parse(res.data).message,
|
||||
messageType: JSON.parse(res.data).message
|
||||
})
|
||||
setTimeout(() => {
|
||||
let query = uni.createSelectorQuery().in(this);
|
||||
//需要给黄色区域设置一个id标识,在这里是demo
|
||||
query.select('.input-box').boundingClientRect(data => {
|
||||
this.inputboxtop = data.height //赋值,待会要用
|
||||
this.scrollTop = this.scrollTop + 1;
|
||||
}).exec();
|
||||
}, 100)
|
||||
that.Read()
|
||||
})
|
||||
} catch (e) {
|
||||
@ -756,4 +764,4 @@
|
||||
bottom: 38rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
129
questionnaire/cerebralapoplexy/cerebralapoplexy.vue
Normal file
129
questionnaire/cerebralapoplexy/cerebralapoplexy.vue
Normal file
@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<view class="app" v-if='list'>
|
||||
<view class="item" v-for="(item,index) in list.questions" :key="index">
|
||||
<view class="title">
|
||||
{{Number(index)+1}}、{{item.questionName}}
|
||||
</view>
|
||||
<u-radio-group v-model="list.answers[index].optionContent" @change="radioGroupChange($event,item)">
|
||||
<u-radio @change="radioChange($event,aitem,index)" v-for="(aitem, aindex) in item.options" :key="aindex"
|
||||
:name="aitem.optionName">
|
||||
{{aitem.optionName}}
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<view class="btns" @tap='updata'>
|
||||
提交
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: null,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
updata() {
|
||||
this.list.answers.forEach(e => {
|
||||
if (!e.optionId) {
|
||||
this.$refs.uToast.show({
|
||||
title: '请选择完全部选项',
|
||||
type: 'error',
|
||||
})
|
||||
return
|
||||
}
|
||||
})
|
||||
var truelist = this.list.answers.filter(e => e.optionContent == '是')
|
||||
if (truelist.length > 0) {
|
||||
if (truelist.length >= 3) {
|
||||
this.list.evaluateResult = `本次评估结果为${truelist.length}分,3分及以上者,为脑卒中高危人群,请尽早到医疗机构进行专业评估和干预。`
|
||||
} else {
|
||||
this.list.evaluateResult = `本次评估结果为${truelist.length}分,3分以下者,没有脑卒中高危风险,请继续保持!`
|
||||
}
|
||||
} else if (truelist.length == 0) {
|
||||
this.list.evaluateResult = '本次评估结果为0分,3分以下者,没有脑卒中高危风险,请继续保持!'
|
||||
}
|
||||
},
|
||||
// 选中某个单选框时,由radio时触发
|
||||
radioChange(e, item, index) {
|
||||
this.list.answers[index].optionId = item.id
|
||||
},
|
||||
// 选中任一radio时,由radio-group触发
|
||||
radioGroupChange(e) {
|
||||
// console.log(e);
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
let list = JSON.parse(decodeURIComponent(options.item))
|
||||
list.answers = []
|
||||
list.questions.forEach(e => {
|
||||
e.name = '请选择'
|
||||
var obj = {
|
||||
"questionId": e.id,
|
||||
"optionId": null,
|
||||
"optionContent": null,
|
||||
}
|
||||
list.answers.push(obj)
|
||||
})
|
||||
this.list = {
|
||||
userId: uni.getStorageSync('patientId'),
|
||||
surveyId: list.id,
|
||||
surveySubject: list.surveySubject,
|
||||
evaluateResult: null,
|
||||
advice: null,
|
||||
questions: list.questions,
|
||||
answers: list.answers
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
width: 96%;
|
||||
margin: 16rpx auto;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 5rpx;
|
||||
padding-bottom: 200rpx;
|
||||
|
||||
.btns {
|
||||
width: 90%;
|
||||
margin: 100rpx auto;
|
||||
background-color: #26A888;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
height: 60rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
padding: 30rpx 0;
|
||||
|
||||
::v-deep .u-radio {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding: 40rpx 0 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
::v-deep .uni-picker-container {
|
||||
width: 100%;
|
||||
height: 63rpx;
|
||||
background: #A7A7A7;
|
||||
line-height: 63rpx;
|
||||
opacity: 0.1;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
125
questionnaire/copd/copd.vue
Normal file
125
questionnaire/copd/copd.vue
Normal file
@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<view class="app" v-if='list'>
|
||||
<view class="item" v-for="(item,index) in list.questions" :key="index">
|
||||
<view class="title">
|
||||
{{Number(index)+1}}、{{item.questionName}}
|
||||
</view>
|
||||
<u-radio-group v-model="list.answers[index].optionContent" @change="radioGroupChange($event,item)">
|
||||
<u-radio @change="radioChange($event,aitem,index)" v-for="(aitem, aindex) in item.options" :key="aindex"
|
||||
:name="aitem.optionName">
|
||||
{{aitem.optionName}}
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<view class="btns" @tap='updata'>
|
||||
提交
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: null,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
updata() {
|
||||
this.list.answers.forEach(e => {
|
||||
if (!e.optionId) {
|
||||
this.$refs.uToast.show({
|
||||
title: '请选择完全部选项',
|
||||
type: 'error',
|
||||
})
|
||||
return
|
||||
}
|
||||
})
|
||||
var truelist = this.list.answers.filter(e => e.optionContent == '是')
|
||||
if (truelist.length > 0) {
|
||||
this.list.evaluateResult = '您可能存在糖尿病高危风险,建议每年至医疗机构进行一次糖尿病筛查。'
|
||||
} else if (truelist.length == 0) {
|
||||
this.list.evaluateResult = '您没有糖尿病高危风险,请继续保持!'
|
||||
}
|
||||
},
|
||||
// 选中某个单选框时,由radio时触发
|
||||
radioChange(e, item, index) {
|
||||
this.list.answers[index].optionId = item.id
|
||||
},
|
||||
// 选中任一radio时,由radio-group触发
|
||||
radioGroupChange(e) {
|
||||
// console.log(e);
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
let list = JSON.parse(decodeURIComponent(options.item))
|
||||
list.answers = []
|
||||
list.questions.forEach(e => {
|
||||
e.name = '请选择'
|
||||
var obj = {
|
||||
"questionId": e.id,
|
||||
"optionId": null,
|
||||
"optionContent": null,
|
||||
}
|
||||
list.answers.push(obj)
|
||||
})
|
||||
this.list = {
|
||||
userId: uni.getStorageSync('patientId'),
|
||||
surveyId: list.id,
|
||||
surveySubject: list.surveySubject,
|
||||
evaluateResult: null,
|
||||
advice: null,
|
||||
questions: list.questions,
|
||||
answers: list.answers
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
width: 96%;
|
||||
margin: 16rpx auto;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 5rpx;
|
||||
padding-bottom: 200rpx;
|
||||
|
||||
.btns {
|
||||
width: 90%;
|
||||
margin: 100rpx auto;
|
||||
background-color: #26A888;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
height: 60rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
padding: 30rpx 0;
|
||||
|
||||
::v-deep .u-radio {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding: 40rpx 0 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
::v-deep .uni-picker-container {
|
||||
width: 100%;
|
||||
height: 63rpx;
|
||||
background: #A7A7A7;
|
||||
line-height: 63rpx;
|
||||
opacity: 0.1;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
125
questionnaire/diabetes/diabetes.vue
Normal file
125
questionnaire/diabetes/diabetes.vue
Normal file
@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<view class="app" v-if='list'>
|
||||
<view class="item" v-for="(item,index) in list.questions" :key="index">
|
||||
<view class="title">
|
||||
{{Number(index)+1}}、{{item.questionName}}
|
||||
</view>
|
||||
<u-radio-group v-model="list.answers[index].optionContent" @change="radioGroupChange($event,item)">
|
||||
<u-radio @change="radioChange($event,aitem,index)" v-for="(aitem, aindex) in item.options" :key="aindex"
|
||||
:name="aitem.optionName">
|
||||
{{aitem.optionName}}
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<view class="btns" @tap='updata'>
|
||||
提交
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: null,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
updata() {
|
||||
this.list.answers.forEach(e => {
|
||||
if (!e.optionId) {
|
||||
this.$refs.uToast.show({
|
||||
title: '请选择完全部选项',
|
||||
type: 'error',
|
||||
})
|
||||
return
|
||||
}
|
||||
})
|
||||
var truelist = this.list.answers.filter(e => e.optionContent == '是')
|
||||
if (truelist.length > 0) {
|
||||
this.list.evaluateResult = '您可能存在糖尿病高危风险,建议每年至医疗机构进行一次糖尿病筛查。'
|
||||
} else if (truelist.length == 0) {
|
||||
this.list.evaluateResult = '您没有糖尿病高危风险,请继续保持!'
|
||||
}
|
||||
},
|
||||
// 选中某个单选框时,由radio时触发
|
||||
radioChange(e, item, index) {
|
||||
this.list.answers[index].optionId = item.id
|
||||
},
|
||||
// 选中任一radio时,由radio-group触发
|
||||
radioGroupChange(e) {
|
||||
// console.log(e);
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
let list = JSON.parse(decodeURIComponent(options.item))
|
||||
list.answers = []
|
||||
list.questions.forEach(e => {
|
||||
e.name = '请选择'
|
||||
var obj = {
|
||||
"questionId": e.id,
|
||||
"optionId": null,
|
||||
"optionContent": null,
|
||||
}
|
||||
list.answers.push(obj)
|
||||
})
|
||||
this.list = {
|
||||
userId: uni.getStorageSync('patientId'),
|
||||
surveyId: list.id,
|
||||
surveySubject: list.surveySubject,
|
||||
evaluateResult: null,
|
||||
advice: null,
|
||||
questions: list.questions,
|
||||
answers: list.answers
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
width: 96%;
|
||||
margin: 16rpx auto;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 5rpx;
|
||||
padding-bottom: 200rpx;
|
||||
|
||||
.btns {
|
||||
width: 90%;
|
||||
margin: 100rpx auto;
|
||||
background-color: #26A888;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
height: 60rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
padding: 30rpx 0;
|
||||
|
||||
::v-deep .u-radio {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding: 40rpx 0 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
::v-deep .uni-picker-container {
|
||||
width: 100%;
|
||||
height: 63rpx;
|
||||
background: #A7A7A7;
|
||||
line-height: 63rpx;
|
||||
opacity: 0.1;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
125
questionnaire/hypertension/hypertension.vue
Normal file
125
questionnaire/hypertension/hypertension.vue
Normal file
@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<view class="app" v-if='list'>
|
||||
<view class="item" v-for="(item,index) in list.questions" :key="index">
|
||||
<view class="title">
|
||||
{{Number(index)+1}}、{{item.questionName}}
|
||||
</view>
|
||||
<u-radio-group v-model="list.answers[index].optionContent" @change="radioGroupChange($event,item)">
|
||||
<u-radio @change="radioChange($event,aitem,index)" v-for="(aitem, aindex) in item.options" :key="aindex"
|
||||
:name="aitem.optionName">
|
||||
{{aitem.optionName}}
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<view class="btns" @tap='updata'>
|
||||
提交
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: null,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
updata() {
|
||||
this.list.answers.forEach(e => {
|
||||
if (!e.optionId) {
|
||||
this.$refs.uToast.show({
|
||||
title: '请选择完全部选项',
|
||||
type: 'error',
|
||||
})
|
||||
return
|
||||
}
|
||||
})
|
||||
var truelist = this.list.answers.filter(e => e.optionContent == '是')
|
||||
if (truelist.length > 0) {
|
||||
this.list.evaluateResult = '您可能存在高血压易患风险,请密切关注血压变化,及时就医。'
|
||||
} else if (truelist.length == 0) {
|
||||
this.list.evaluateResult = '您没有高血压风险,请继续保持!'
|
||||
}
|
||||
},
|
||||
// 选中某个单选框时,由radio时触发
|
||||
radioChange(e, item, index) {
|
||||
this.list.answers[index].optionId = item.id
|
||||
},
|
||||
// 选中任一radio时,由radio-group触发
|
||||
radioGroupChange(e) {
|
||||
// console.log(e);
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
let list = JSON.parse(decodeURIComponent(options.item))
|
||||
list.answers = []
|
||||
list.questions.forEach(e => {
|
||||
e.name = '请选择'
|
||||
var obj = {
|
||||
"questionId": e.id,
|
||||
"optionId": null,
|
||||
"optionContent": null,
|
||||
}
|
||||
list.answers.push(obj)
|
||||
})
|
||||
this.list = {
|
||||
userId: uni.getStorageSync('patientId'),
|
||||
surveyId: list.id,
|
||||
surveySubject: list.surveySubject,
|
||||
evaluateResult: null,
|
||||
advice: null,
|
||||
questions: list.questions,
|
||||
answers: list.answers
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
width: 96%;
|
||||
margin: 16rpx auto;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 5rpx;
|
||||
padding-bottom: 200rpx;
|
||||
|
||||
.btns {
|
||||
width: 90%;
|
||||
margin: 100rpx auto;
|
||||
background-color: #26A888;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
height: 60rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
padding: 30rpx 0;
|
||||
|
||||
::v-deep .u-radio {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding: 40rpx 0 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
::v-deep .uni-picker-container {
|
||||
width: 100%;
|
||||
height: 63rpx;
|
||||
background: #A7A7A7;
|
||||
line-height: 63rpx;
|
||||
opacity: 0.1;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
static/pageC/books.png
Normal file
BIN
static/pageC/books.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
Loading…
Reference in New Issue
Block a user