This commit is contained in:
2023-10-27 14:06:42 +08:00
parent c75b85447c
commit 2857b778a7
7 changed files with 91 additions and 6 deletions

View File

@ -19,3 +19,21 @@ export function templateget(templateType) {
} }
}) })
} }
export function timeline(userId) {
return request({
url: `/evaluate/record/timeline/${userId}`,
method: 'get',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
}
})
}
export function answer(recordId) {
return request({
url: `/evaluate/survey/answer/${recordId}`,
method: 'get',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
}
})
}

View File

@ -666,7 +666,25 @@
"navigationBarTitleText": "健康处方", "navigationBarTitleText": "健康处方",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}] } ,{
"path" : "History/History",
"style" :
{
"navigationBarTitleText": "健康自评历史记录",
"enablePullDownRefresh": false
}
}
,{
"path" : "HistoryQuestionnaire/HistoryQuestionnaire",
"style" :
{
"navigationBarTitleText": "历史记录评估问卷",
"enablePullDownRefresh": false
}
}
]
}], }],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",

View File

@ -3,7 +3,7 @@
<view class="tophealth"> <view class="tophealth">
<image src="../../static/pageC/self.png" mode=""></image> <image src="../../static/pageC/self.png" mode=""></image>
<span class="health">智慧健康驿站自评表</span> <span class="health">智慧健康驿站自评表</span>
<span class="history">历史记录</span> <span class="history" @tap='gohistory'>历史记录</span>
</view> </view>
<view class="bodyhealth" v-for="item in list" @tap='gosurveySubject(item)'> <view class="bodyhealth" v-for="item in list" @tap='gosurveySubject(item)'>
<image src="../../static/pageC/books.png" mode=""></image> <image src="../../static/pageC/books.png" mode=""></image>
@ -36,6 +36,11 @@
this.info(); this.info();
}, },
methods: { methods: {
gohistory() {
uni.navigateTo({
url: '/questionnaire/History/History'
})
},
gosurveySubject(item) { gosurveySubject(item) {
if (item.surveySubject == 1001) { if (item.surveySubject == 1001) {
uni.navigateTo({ uni.navigateTo({

View File

@ -19,6 +19,9 @@
</template> </template>
<script> <script>
import {
submit
} from '@/api/questionnaire/index.js'
export default { export default {
data() { data() {
return { return {
@ -46,7 +49,19 @@
} else if (truelist.length == 0) { } else if (truelist.length == 0) {
this.list.evaluateResult = '本次评估结果为0分3分以下者没有脑卒中高危风险请继续保持' this.list.evaluateResult = '本次评估结果为0分3分以下者没有脑卒中高危风险请继续保持'
} }
console.log(this.list) submit(this.list).then(res => {
if (truelist.length >= 3) {
uni.redirectTo({
url: `/questionnaire/prescription/prescription?code=1003`
})
} else {
this.$refs.uToast.show({
title: '提交成功',
type: 'success',
back: 1
})
}
})
}, },
// radio // radio
radioChange(e, item, index) { radioChange(e, item, index) {

View File

@ -19,6 +19,9 @@
</template> </template>
<script> <script>
import {
submit
} from '@/api/questionnaire/index.js'
export default { export default {
data() { data() {
return { return {
@ -64,7 +67,19 @@
} else if (value >= 5) { } else if (value >= 5) {
this.list.evaluateResult = `您的评估结果为${value}5分及以上可能存在慢性阻塞性肺疾病风险如有以下情形请尽早就医。` this.list.evaluateResult = `您的评估结果为${value}5分及以上可能存在慢性阻塞性肺疾病风险如有以下情形请尽早就医。`
} }
console.log(this.list) submit(this.list).then(res => {
if (value >= 5) {
uni.redirectTo({
url: `/questionnaire/prescription/prescription?code=1004`
})
} else {
this.$refs.uToast.show({
title: '提交成功',
type: 'success',
back: 1
})
}
})
}, },
// radio // radio
radioChange(e, item, index) { radioChange(e, item, index) {

View File

@ -19,6 +19,9 @@
</template> </template>
<script> <script>
import {
submit
} from '@/api/questionnaire/index.js'
export default { export default {
data() { data() {
return { return {
@ -42,7 +45,19 @@
} else if (truelist.length == 0) { } else if (truelist.length == 0) {
this.list.evaluateResult = '您没有糖尿病高危风险,请继续保持!' this.list.evaluateResult = '您没有糖尿病高危风险,请继续保持!'
} }
console.log(this.list) submit(this.list).then(res => {
if (truelist.length > 0) {
uni.redirectTo({
url: `/questionnaire/prescription/prescription?code=1002`
})
} else {
this.$refs.uToast.show({
title: '提交成功',
type: 'success',
back: 1
})
}
})
}, },
// radio // radio
radioChange(e, item, index) { radioChange(e, item, index) {

View File

@ -46,7 +46,6 @@
} else if (truelist.length == 0) { } else if (truelist.length == 0) {
this.list.evaluateResult = '您没有高血压风险,请继续保持!' this.list.evaluateResult = '您没有高血压风险,请继续保持!'
} }
console.log(this.list)
submit(this.list).then(res => { submit(this.list).then(res => {
if (truelist.length > 0) { if (truelist.length > 0) {
uni.redirectTo({ uni.redirectTo({