This commit is contained in:
2023-11-14 15:27:08 +08:00
parent 79a2fd1a59
commit 820772171b
9 changed files with 113 additions and 40 deletions

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,15 @@
} 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 => {
this.$refs.uToast.show({
title: '提交成功',
type: 'success',
})
uni.redirectTo({
url: `/questionnaire/prescription/prescription?code=1008&list=${encodeURIComponent(JSON.stringify(this.list))}`
})
})
}, },
// 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,17 @@
} 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 => {
this.$refs.uToast.show({
title: '提交成功',
type: 'success',
})
setTimeout(e => {
uni.redirectTo({
url: `/questionnaire/prescription/prescription?code=1007&list=${encodeURIComponent(JSON.stringify(this.list))}`
})
}, 2000)
})
}, },
// radio // radio
radioChange(e, item, index) { radioChange(e, item, index) {

View File

@ -50,16 +50,22 @@
this.list.evaluateResult = '本次评估结果为0分3分以下者没有脑卒中高危风险请继续保持' this.list.evaluateResult = '本次评估结果为0分3分以下者没有脑卒中高危风险请继续保持'
} }
submit(this.list).then(res => { submit(this.list).then(res => {
this.$refs.uToast.show({
title: '提交成功',
type: 'success',
})
if (truelist.length >= 3) { if (truelist.length >= 3) {
uni.redirectTo({ setTimeout(e => {
url: `/questionnaire/prescription/prescription?code=1003` uni.redirectTo({
}) url: `/questionnaire/prescription/prescription?code=1003&truelistlength=${truelist.length}&list=${encodeURIComponent(JSON.stringify(this.list))}`
})
}, 2000)
} else { } else {
this.$refs.uToast.show({ setTimeout(e => {
title: '提交成功', uni.redirectTo({
type: 'success', url: `/questionnaire/prescription/prescription?code=1003&list=${encodeURIComponent(JSON.stringify(this.list))}`
back: 1 })
}) }, 2000)
} }
}) })
}, },

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 {
@ -54,7 +57,17 @@
if (this.list.evaluateResult.length > 0) { if (this.list.evaluateResult.length > 0) {
this.list.evaluateResult = this.list.evaluateResult.substr(0, this.list.evaluateResult.length - 1); this.list.evaluateResult = this.list.evaluateResult.substr(0, this.list.evaluateResult.length - 1);
} }
console.log(this.list) submit(this.list).then(res => {
this.$refs.uToast.show({
title: '提交成功',
type: 'success',
})
setTimeout(e => {
uni.redirectTo({
url: `/questionnaire/prescription/prescription?code=1005&list=${encodeURIComponent(JSON.stringify(this.list))}`
})
}, 2000)
})
}, },
// radio // radio
radioChange(e, item, index) { radioChange(e, item, index) {

View File

@ -68,16 +68,22 @@
this.list.evaluateResult = `您的评估结果为${value}5分及以上可能存在慢性阻塞性肺疾病风险如有以下情形请尽早就医。` this.list.evaluateResult = `您的评估结果为${value}5分及以上可能存在慢性阻塞性肺疾病风险如有以下情形请尽早就医。`
} }
submit(this.list).then(res => { submit(this.list).then(res => {
this.$refs.uToast.show({
title: '提交成功',
type: 'success',
})
if (value >= 5) { if (value >= 5) {
uni.redirectTo({ setTimeout(e => {
url: `/questionnaire/prescription/prescription?code=1004` uni.redirectTo({
}) url: `/questionnaire/prescription/prescription?code=1004&truelistlength=${value}&list=${encodeURIComponent(JSON.stringify(this.list))}`
})
}, 2000)
} else { } else {
this.$refs.uToast.show({ setTimeout(e => {
title: '提交成功', uni.redirectTo({
type: 'success', url: `/questionnaire/prescription/prescription?code=1004&list=${encodeURIComponent(JSON.stringify(this.list))}`
back: 1 })
}) }, 2000)
} }
}) })
}, },

View File

@ -26,6 +26,7 @@
data() { data() {
return { return {
list: null, list: null,
timer: null,
}; };
}, },
methods: { methods: {
@ -45,18 +46,17 @@
} else if (truelist.length == 0) { } else if (truelist.length == 0) {
this.list.evaluateResult = '您没有糖尿病高危风险,请继续保持!' this.list.evaluateResult = '您没有糖尿病高危风险,请继续保持!'
} }
clearInterval(this.timer);
submit(this.list).then(res => { submit(this.list).then(res => {
if (truelist.length > 0) { this.$refs.uToast.show({
title: '提交成功',
type: 'success',
})
this.timer = setTimeout(e => {
uni.redirectTo({ uni.redirectTo({
url: `/questionnaire/prescription/prescription?code=1002` url: `/questionnaire/prescription/prescription?code=1002&truelistlength=${truelist.length}&list=${encodeURIComponent(JSON.stringify(this.list))}`
}) })
} else { }, 2000)
this.$refs.uToast.show({
title: '提交成功',
type: 'success',
back: 1
})
}
}) })
}, },
// radio // radio

View File

@ -27,6 +27,7 @@
return { return {
list: null, list: null,
questions: null, questions: null,
timer: null,
}; };
}, },
methods: { methods: {
@ -46,18 +47,17 @@
} else if (truelist.length == 0) { } else if (truelist.length == 0) {
this.list.evaluateResult = '您没有高血压风险,请继续保持!' this.list.evaluateResult = '您没有高血压风险,请继续保持!'
} }
clearInterval(this.timer);
submit(this.list).then(res => { submit(this.list).then(res => {
if (truelist.length > 0) { this.$refs.uToast.show({
title: '提交成功',
type: 'success',
})
this.timer = setTimeout(e => {
uni.redirectTo({ uni.redirectTo({
url: `/questionnaire/prescription/prescription?code=1001` url: `/questionnaire/prescription/prescription?code=1001&truelistlength=${truelist.length}&list=${encodeURIComponent(JSON.stringify(this.list))}`
}) })
} else { }, 2000)
this.$refs.uToast.show({
title: '提交成功',
type: 'success',
back: 1
})
}
}) })
}, },
// radio // radio

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,17 @@
} 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 => {
this.$refs.uToast.show({
title: '提交成功',
type: 'success',
})
setTimeout(e => {
uni.redirectTo({
url: `/questionnaire/prescription/prescription?code=1006&list=${encodeURIComponent(JSON.stringify(this.list))}`
})
}, 2000)
})
}, },
// radio // radio
radioChange(e, item, index) { radioChange(e, item, index) {

View File

@ -1,9 +1,15 @@
<template> <template>
<view class="app"> <view class="app">
<view class="title"> <view class="title">
健康处方 诊断结果
</view> </view>
<view class="text"> <view class="text">
{{list.evaluateResult}}
</view>
<view class="title" v-if="content">
健康处方
</view>
<view class="text" v-if="content">
<u-parse :html="content"></u-parse> <u-parse :html="content"></u-parse>
</view> </view>
</view> </view>
@ -17,6 +23,7 @@
data() { data() {
return { return {
content: null, content: null,
list: {}
}; };
}, },
methods: { methods: {
@ -30,7 +37,11 @@
}, },
}, },
onLoad(options) { onLoad(options) {
this.info(options.code) console.log(options)
this.list = JSON.parse(decodeURIComponent(options.list))
if (options.truelistlength > 0) {
this.info(options.code)
}
} }
} }
</script> </script>