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>
<script>
import {
submit
} from '@/api/questionnaire/index.js'
export default {
data() {
return {
@ -42,7 +45,15 @@
} else if (truelist.length == 0) {
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
radioChange(e, item, index) {

View File

@ -19,6 +19,9 @@
</template>
<script>
import {
submit
} from '@/api/questionnaire/index.js'
export default {
data() {
return {
@ -42,7 +45,17 @@
} else if (truelist.length == 0) {
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
radioChange(e, item, index) {

View File

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

View File

@ -19,6 +19,9 @@
</template>
<script>
import {
submit
} from '@/api/questionnaire/index.js'
export default {
data() {
return {
@ -54,7 +57,17 @@
if (this.list.evaluateResult.length > 0) {
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
radioChange(e, item, index) {

View File

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

View File

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

View File

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

View File

@ -19,6 +19,9 @@
</template>
<script>
import {
submit
} from '@/api/questionnaire/index.js'
export default {
data() {
return {
@ -42,7 +45,17 @@
} else if (truelist.length == 0) {
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
radioChange(e, item, index) {

View File

@ -1,9 +1,15 @@
<template>
<view class="app">
<view class="title">
健康处方
诊断结果
</view>
<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>
</view>
</view>
@ -17,6 +23,7 @@
data() {
return {
content: null,
list: {}
};
},
methods: {
@ -30,7 +37,11 @@
},
},
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>