Commit fec5d585 authored by gengchunlei's avatar gengchunlei

Merge branch 'chronic-master' of…

Merge branch 'chronic-master' of http://gitlab.yiboshi.com/nightkis1995/frontend-h5 into chronic-master
parents d78ca92b d4a1b02e
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
.text-12 { font-size: 12px; } .text-12 { font-size: 12px; }
.text-center { text-align: center; } .text-center { text-align: center; }
.text-black { color: #000; } .text-black { color: #000; }
.text-red { color: #FF4D4F; }
.text-primary { color: var(--van-primary-color); } .text-primary { color: var(--van-primary-color); }
.font-semibold { font-weight: 600; } .font-semibold { font-weight: 600; }
// 文字省略 // 文字省略
......
...@@ -41,6 +41,7 @@ body { ...@@ -41,6 +41,7 @@ body {
.van-cell:after { .van-cell:after {
transform: scaleY(1); transform: scaleY(1);
} }
// 为表单最后一个控件添加底部边框
>.van-field:last-child { >.van-field:last-child {
&::before { &::before {
position: absolute; position: absolute;
...@@ -53,11 +54,21 @@ body { ...@@ -53,11 +54,21 @@ body {
border-bottom: 1px solid var(--van-cell-border-color); border-bottom: 1px solid var(--van-cell-border-color);
} }
} }
// 在table表格中的控件
.table-field {
padding: 0;
input::placeholder {
float: none;
}
&:after {
display: none;
}
}
} }
// 按键形式的单选框 // 按键形式的单选框
.doc-radio-button { .doc-radio-button {
height: 26px; height: 27px;
.radio-item { .radio-item {
border: 1px solid #BFBFBF; border: 1px solid #BFBFBF;
border-radius: 4px; border-radius: 4px;
...@@ -73,4 +84,8 @@ body { ...@@ -73,4 +84,8 @@ body {
border: 1px solid var(--van-primary-color); border: 1px solid var(--van-primary-color);
color: #fff; color: #fff;
} }
.van-radio--horizontal {
margin-right: 0;
margin-left: var(--van-padding-sm);
}
} }
\ No newline at end of file
<svg width="13" height="14" viewBox="0 0 13 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0.268654 13.0683C0.625636 13.4253 1.21575 13.418 1.56545 13.0683L6.27906 8.35466L10.9927 13.0683C11.3424 13.418 11.9325 13.4253 12.2895 13.0683C12.6465 12.7113 12.6465 12.1139 12.2968 11.7642L7.58314 7.05058L12.2895 2.34425C12.6392 1.99456 12.6465 1.40444 12.2895 1.04746C11.9325 0.690481 11.3351 0.690481 10.9854 1.04018L6.27906 5.74651L1.57273 1.04018C1.22303 0.690481 0.625636 0.690481 0.268654 1.04746C-0.0883277 1.40444 -0.0810424 1.99456 0.268654 2.34425L4.97499 7.05058L0.261369 11.7642C-0.0883277 12.1139 -0.0883277 12.7113 0.268654 13.0683Z" fill="black"/>
</svg>
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
<van-field v-model="form.currentAge" <van-field v-model="form.currentAge"
name="currentAge" required name="currentAge" required
readonly
label="年龄" label="年龄"
type="digit" type="digit"
placeholder="请输入年龄" placeholder="请输入年龄"
......
...@@ -48,12 +48,7 @@ export default { ...@@ -48,12 +48,7 @@ export default {
inject: ['checkInfo'], inject: ['checkInfo'],
methods: { methods: {
onClose() { onClose() {
if (isWeiXin()) { this.$parent.onClose()
// 微信中关闭页面
WeixinJSBridge.call('closeWindow')
} else {
window.close()
}
} }
} }
} }
......
<template> <template>
<div class="h-full pb-5 flex flex-col "> <div class="h-full pb-5 flex flex-col ">
<div class="p-3 text-16 text-black text-center shrink-0 top-bar"> <div class="p-3 text-16 text-black text-center shrink-0 top-bar">
<span class="back-bt" @click="onBack" v-if="step >= 2"> <span class="back-bt" v-if="step >= 2">
<doc-icon type="doc-left" /> <span @click="onClose" v-if="[5].includes(step)">
<doc-icon type="doc-close" />
</span>
<span @click="onBack" v-else>
<doc-icon type="doc-left" />
</span>
</span> </span>
<span>慢病自我初筛</span> <span>慢病自我初筛</span>
</div> </div>
...@@ -13,24 +18,28 @@ ...@@ -13,24 +18,28 @@
<BaseInfo v-else-if="step === 3"/> <BaseInfo v-else-if="step === 3"/>
<!-- 筛查表单 --> <!-- 筛查表单 -->
<ScreenInfo v-else-if="step === 4"/> <ScreenInfo v-else-if="step === 4"/>
<!-- 筛查结果 -->
<Result v-else-if="step === 5"/>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { showNotify } from 'vant' import { showNotify } from 'vant'
import { isWeiXin } from '@/utils/common.js'
import IdCheck from './IdCheck.vue' import IdCheck from './IdCheck.vue'
import CheckTip from './CheckTip.vue' import CheckTip from './CheckTip.vue'
import BaseInfo from './BaseInfo.vue' import BaseInfo from './BaseInfo.vue'
import ScreenInfo from './ScreenInfo.vue' import ScreenInfo from './ScreenInfo.vue'
import Result from './Result.vue'
export default { export default {
components: { components: {
IdCheck, IdCheck,
CheckTip, CheckTip,
BaseInfo, BaseInfo,
ScreenInfo ScreenInfo,
Result
}, },
data() { data() {
return { return {
...@@ -64,6 +73,9 @@ export default { ...@@ -64,6 +73,9 @@ export default {
}, },
methods: { methods: {
onNext(step) { onNext(step) {
if (this.step === 1) {
this.recordForm = {}
}
this.step = step ? step : this.step + 1 this.step = step ? step : this.step + 1
this.setpHistory.push(this.step) this.setpHistory.push(this.step)
}, },
...@@ -71,6 +83,14 @@ export default { ...@@ -71,6 +83,14 @@ export default {
if (this.step === 1) return if (this.step === 1) return
this.setpHistory.pop() this.setpHistory.pop()
this.step = this.setpHistory[this.setpHistory.length - 1] this.step = this.setpHistory[this.setpHistory.length - 1]
},
onClose() {
if (isWeiXin()) {
// 微信中关闭页面
WeixinJSBridge.call('closeWindow')
} else {
window.close()
}
} }
} }
} }
......
<template> <template>
<div class="submit-result"> <div class="submit-result">
筛查提交成功! <div class="pt-5 text-center">
<doc-icon type="doc-check-circle"
style="color: #faad14;font-size: .46rem;"/>
</div>
<div class="text-center mt-4">筛查提交成功</div>
<p class="tip" v-if="screenInfo.screenResult == 2">
<!-- v-if="screenInfo.screenResult === 2" -->
通过筛查,您的慢病高危评估结果为:<span class="text-red">高危风险人群</span><br />
存在慢性病患病风险,可前往医院进一步检查。
</p>
<p class="tip" v-else>
通过筛查,您的慢病高危评估结果为:一般人群。目前不存在慢性病患病风险,若有疑问,可前往医院进一步检查。
</p>
<div class="result text-12" v-if="screenInfo.screenResult === 2">
<div>风险主要体现在以下3个方面:</div>
<div class="mt-2"></div>
<div v-for="(item, index) in resultInfo" :key="index">
<span>{{index + 1}}</span>
<span>{{item}}</span>
</div>
</div>
<van-button round block class="button"
@click="toRecord">查看慢病筛查记录</van-button>
</div> </div>
</template> </template>
<script> <script>
import { useStore } from '@/resident/store/index.js'
export default { export default {
inject: ['recordForm'],
setup() {
const store = useStore()
return { store }
},
computed: {
screenInfo() {
return this.recordForm.screen || {}
},
resultInfo() {
// return this.store.getDict('CP00113').map(e => e.name)
const highItem = this.screenInfo.highItem
return highItem && highItem.length ?
this.store.getDict('CP00113').filter(e => highItem.includes(e.value)).map(e => e.name) : []
}
},
methods:{
toRecord() {
}
}
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.submit-result {
padding: 0 30px;
}
.tip {
color: #595959;
line-height: 1.5;
font-size: 12px;
}
.result {
background-color: #F8FAFC;
padding: 12px;
line-height: 1.5;
}
.button {
color: #8C8C8C;
border-color: #BFBFBF;
margin-top: 30px;
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment