This commit is contained in:
2023-10-27 09:36:30 +08:00
parent c5b51eddea
commit 52cd660c26
15 changed files with 726 additions and 102 deletions

View 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'),
},
})
}

View File

@ -77,18 +77,14 @@
"path": "orderlist/orderlist", "path": "orderlist/orderlist",
"style": { "style": {
"navigationBarTitleText": "预约详情", "navigationBarTitleText": "预约详情",
"enablePullDownRefresh": false, "enablePullDownRefresh": false
// "navigationStyle": "default",
"navigationBarBackgroundColor": "#4ac4ab"
} }
}, },
{ {
"path": "screenorder/screenorder", "path": "screenorder/screenorder",
"style": { "style": {
"navigationBarTitleText": "筛查预约", "navigationBarTitleText": "筛查预约",
"enablePullDownRefresh": false, "enablePullDownRefresh": false
"navigationStyle": "default",
"navigationBarBackgroundColor": "#4ac4ab"
} }
}, { }, {
"path": "managefamily/managefamily", "path": "managefamily/managefamily",
@ -508,7 +504,8 @@
"path": "healthtest/healthtest", "path": "healthtest/healthtest",
"style": { "style": {
"navigationBarTitleText": "健康自评", "navigationBarTitleText": "健康自评",
"enablePullDownRefresh": false "onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
} }
}, { }, {
"path": "Physicalexamination/Physicalexamination", "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": { "globalStyle": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",

View File

@ -17,6 +17,7 @@
<span class="name" v-else> <span class="name" v-else>
请先登录! 请先登录!
</span> </span>
<view class="" v-if="appPersonallist.patientName">
<view class="signing" v-if="appPersonallist.signNo"> <view class="signing" v-if="appPersonallist.signNo">
已签约 已签约
</view> </view>
@ -24,6 +25,7 @@
未签约 未签约
</view> </view>
</view> </view>
</view>
<view class="phone" v-if="appPersonallist.phone"> <view class="phone" v-if="appPersonallist.phone">
{{appPersonallist.phone}} {{appPersonallist.phone}}
</view> </view>
@ -286,8 +288,7 @@
uni.setStorageSync('patientId', res.data.id); uni.setStorageSync('patientId', res.data.id);
this.myInfo() this.myInfo()
} } else {
else{
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.msg, title: res.msg,
type: 'error', type: 'error',

View File

@ -48,7 +48,7 @@
}) })
setTimeout(() => { setTimeout(() => {
uni.reLaunch({ uni.reLaunch({
url: '/pages/medicalservice/medicalservice' url: '/pages/homepage/homepage'
}); });
}, 2000); }, 2000);
}, },

View File

@ -187,6 +187,7 @@
appointmentDate: null, appointmentDate: null,
appointmentStartTime: null, appointmentStartTime: null,
appointmentEndTime: null, appointmentEndTime: null,
orderChannel: "WECHAT_APPLET",
} }
}; };
}, },
@ -255,11 +256,57 @@
info() { info() {
consultationInfo(this.formdata).then(res => { consultationInfo(this.formdata).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$refs.uToast.show({ res.data.payType = "WECHAT_PAY"
title: '新建专家问诊成功', 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', type: 'success',
duration: '1500', duration: 1500,
back: 1 })
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
})
}
}) })
} }
}) })

View File

@ -158,10 +158,10 @@
.hospitalimage { .hospitalimage {
position: absolute; position: absolute;
width: 120rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
top: 30rpx; top: 30rpx;
left: 30rpx; left: 10rpx;
} }
.hospitalteacher { .hospitalteacher {

View File

@ -1,51 +1,30 @@
.app { .app {
height: 100vh; padding: 15rpx 0 50rpx 0;
background-color: #F7F5F5;
padding: 15rpx 0 0 0;
overflow: scroll;
.tophealth { .tophealth {
font-family: Source Han Sans CN;
position: relative;
left: 5%;
width: 92%; width: 92%;
// background: red;
height: 60rpx; height: 60rpx;
margin-bottom: 10rpx; margin: 0 auto;
image { image {
position: absolute; margin: 0 10rpx 0 0;
width: 32rpx; width: 32rpx;
height: 36rpx; height: 36rpx;
top: 15%; vertical-align: middle;
// transform: translateY(-50%);
// vertical-align: middle;
} }
.health { .health {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
color: #000000; color: #000000;
line-height: 38rpx;
height: 38rpx;
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 7%;
} }
.history { .history {
font-size: 26rpx; font-size: 26rpx;
font-weight: 400; font-weight: 400;
color: #26A888; color: #26A888;
line-height: 38rpx; float: right;
height: 38rpx;
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 0%;
} }
} }
.bodyhealth { .bodyhealth {
@ -56,7 +35,6 @@
border-radius: 5rpx; border-radius: 5rpx;
position: relative; position: relative;
left: 50%; left: 50%;
font-family: Source Han Sans CN;
transform: translateX(-50%); transform: translateX(-50%);
margin-bottom: 20rpx; margin-bottom: 20rpx;
@ -88,7 +66,5 @@
left: 30%; left: 30%;
top: 50%; top: 50%;
} }
} }
} }

View File

@ -5,37 +5,82 @@
<span class="health">智慧健康驿站自评表</span> <span class="health">智慧健康驿站自评表</span>
<span class="history">历史记录</span> <span class="history">历史记录</span>
</view> </view>
<view class="bodyhealth"> <view class="bodyhealth" v-for="item in list" @tap='gosurveySubject(item)'>
<image src="../../static/pages/view_face_background.png" mode=""></image> <image src="../../static/pageC/books.png" mode=""></image>
<view class="risk">高血压风险评估</view> <view class="risk">
<view class="estimate">风险评估</view> {{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>
<view class="bodyhealth">
<image src="../../static/pages/view_face_background.png" mode=""></image>
<view class="risk">高血压风险评估</view>
<view class="estimate">风险评估</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>
</view> </view>
</template> </template>
<script> <script>
import {
surveylist
} from '@/api/pagesC/healthtest/index.js'
export default { export default {
data() { data() {
return { return {
list: [],
total: 0,
query: {
pageNum: 1,
pageSize: 10,
}
} }
}, },
onLoad() {
this.info();
},
methods: { 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> </script>

View File

@ -468,6 +468,14 @@
content: JSON.parse(res.data).message, content: JSON.parse(res.data).message,
messageType: JSON.parse(res.data).message messageType: JSON.parse(res.data).message
}) })
setTimeout(() => {
let query = uni.createSelectorQuery().in(this);
//iddemo
query.select('.input-box').boundingClientRect(data => {
this.inputboxtop = data.height //
this.scrollTop = this.scrollTop + 1;
}).exec();
}, 100)
that.Read() that.Read()
}) })
} catch (e) { } catch (e) {

View 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
},
// radioradio-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
View 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
},
// radioradio-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>

View 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
},
// radioradio-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>

View 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
},
// radioradio-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

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB