Commit 13b24a20 authored by songrui's avatar songrui

Merge branch 'chronic-dev' of http://gitlab.yiboshi.com/nightkis1995/frontend-h5 into chronic-dev

parents 3ab5ffa4 dbe549f8
...@@ -494,7 +494,7 @@ export default { ...@@ -494,7 +494,7 @@ export default {
// 创建一个电话号码的URL // 创建一个电话号码的URL
let phoneNumber = this.form.telephone // 替换为需要拨打的号码 let phoneNumber = this.form.telephone // 替换为需要拨打的号码
//判断是否是iOS环境 //判断是否是iOS环境
if (isIOSWebKit) { if (isIOSWebKit()) {
console.log('tel:', phoneNumber) console.log('tel:', phoneNumber)
callMobile('startCallUpActivity', phoneNumber) callMobile('startCallUpActivity', phoneNumber)
} else { } else {
......
<template>
<div class='disease-select'>
<div class='label-title mb-4'>请选择慢病类型</div>
<div v-for="(item, index) in store.getDict('CP00117')" :key='index'
:class="['flex justify-between items-center text-16 mb-3 disease-checked',
{ 'disease-checked-active': isSelect(item)},
]"
@click='onSelect(item)'>
<span>{{ item.name }}</span>
</div>
<div class='warn-error' v-if='showWarn'>请选择</div>
</div>
</template>
<script>
import { useStore } from '@/doctor/store/index.js'
import { showToast } from 'vant'
export default {
props: {
infoValue: String
},
data() {
return {
store: useStore(),
// 选中的疾病类型
innerValue: [],
//显示校验
showWarn: false
}
},
watch: {
infoValue: {
handler(value) {
if (value) {
this.innerValue = value.split(',')
}
},
immediate: true
}
},
created() {
this.init()
},
methods: {
init() {
if (!(this.innerValue && this.innerValue.length)) {
this.innerValue = this.store.getDict('CP00117').map(e => e.value)
}
},
// 是否选中
isSelect(item) {
return this.innerValue.includes(item.value)
},
onSelect(val) {
if (this.innerValue.includes(val.value)) {
this.innerValue = this.innerValue.filter(e => e !== val.value)
} else {
this.innerValue.push(val.value)
}
if (this.innerValue && this.innerValue.length) {
this.showWarn = false
} else {
this.showWarn = true
}
},
onSubmit() {
return new Promise((resolve, reject) => {
if (!(this.innerValue && this.innerValue.length)) {
this.showWarn = true
return
}
resolve(this.innerValue)
})
}
}
}
</script>
<style lang='less' scoped>
.label-title {
font-size: 14px;
color: #262626;
font-weight: 500;
&::after {
content: "*";
color: red;
font-weight: bold;
margin-left: 4px;
}
}
.no-req-label {
font-size: 13px;
color: #595959;
font-weight: 500;
}
.disease-checked {
border: 1px solid #BFBFBF;
border-radius: 40px;
color: #595959;
background-color: #fff;
padding: 10px 16px;
line-height: 22.4px;
}
.disease-checked-active {
color: var(--van-primary-color);
border-color: var(--van-primary-color);
}
.disease-checked-disabled {
border-color: #EFF2F7;
background-color: #EFF2F7;
}
.warn-error {
color: #FF4D4F;
}
</style>
This diff is collapsed.
...@@ -6,12 +6,18 @@ ...@@ -6,12 +6,18 @@
v-show='step ==1' v-show='step ==1'
ref='baseInfo' ref='baseInfo'
></archive-common> ></archive-common>
<form-cont :info='info' <DiseaseSelect
:infoValue='info.diseaseArrays'
v-show='step == 2' v-show='step == 2'
ref='diseaseInfo'
></DiseaseSelect>
<form-cont :info='info'
:disease-arrays-info='diseaseArraysInfo'
v-show='step == 3'
ref='formInfo' ref='formInfo'
></form-cont> ></form-cont>
<result :residentInfoId="residentInfoId" <result :residentInfoId="residentInfoId"
v-show='step == 3' v-show='step == 4'
></result> ></result>
</div> </div>
<div class='bottom-small-line'></div> <div class='bottom-small-line'></div>
...@@ -22,16 +28,24 @@ ...@@ -22,16 +28,24 @@
</van-button> </van-button>
</div> </div>
<!-- <div class='px-5 flex align-center justify-around' v-if='step == 2'> <div class='px-5 flex align-center justify-around' v-if='step == 2'>
<van-button type='primary' round plain style='width: 44%' <van-button type='primary' round plain style='width: 44%'
@click='toNext(1)'>上一步 @click='toNext(1)'>上一步
</van-button> </van-button>
<van-button type='primary' round style='width: 44%' <van-button type='primary' round style='width: 44%'
@click='toNext(3)'>下一步 @click='toNext(3)'>下一步
</van-button> </van-button>
</div>--> </div>
<div class='px-5 flex align-center justify-around' v-if='step == 3'>
<van-button type='primary' round plain style='width: 44%'
@click='toNext(2)'>上一步
</van-button>
<van-button type='primary' round style='width: 44%'
@click='toNext(4)'>下一步
</van-button>
</div>
<div class='px-5 grow flex flex-col justify-end' v-if='step == 2'> <div class='px-5 grow flex flex-col justify-end' v-if='step == 4'>
<van-button type='primary' block round <van-button type='primary' block round
@click='onsubmit'>提交 @click='onsubmit'>提交
</van-button> </van-button>
...@@ -43,12 +57,14 @@ ...@@ -43,12 +57,14 @@
<script> <script>
import DocNavBar from '@/doctor/components/docNavBar/DocNavBar.vue' import DocNavBar from '@/doctor/components/docNavBar/DocNavBar.vue'
import ArchiveCommon from '@/doctor/components/archiveCommon/archiveCommon' import ArchiveCommon from '@/doctor/components/archiveCommon/archiveCommon'
import { fetchCurrencyById, getChronicResidentsId, getResidentWX } from '@/api/doctor/generalFU' import { fetchCurrencyById, getChronicResidentsId } from '@/api/doctor/generalFU'
import FormCont from '@/doctor/screening/second/FormCont' import FormCont from '@/doctor/screening/second/FormCont'
import Result from '@/doctor/screening/second/Result' import Result from '@/doctor/screening/second/Result'
import DiseaseSelect from '@/doctor/screening/second/DiseaseSelect'
export default { export default {
components: { components: {
DiseaseSelect,
Result, Result,
FormCont, FormCont,
ArchiveCommon, ArchiveCommon,
...@@ -57,7 +73,8 @@ export default { ...@@ -57,7 +73,8 @@ export default {
data() { data() {
return { return {
step: 1, step: 1,
info: {} info: {},
diseaseArraysInfo: []
} }
}, },
computed: { computed: {
...@@ -107,11 +124,14 @@ export default { ...@@ -107,11 +124,14 @@ export default {
async toNext(val) { async toNext(val) {
this.$refs.all.scrollTo(0, 0) this.$refs.all.scrollTo(0, 0)
if (val == 2) { if (val == 2) {
this.firstForm = await this.$refs.baseInfo.onSubmit() await this.$refs.baseInfo.onSubmit()
}
if (val == 3) {
this.diseaseArraysInfo = await this.$refs.diseaseInfo.onSubmit() || []
}
if (val == 4) {
await this.$refs.formInfo.onSubmit()
} }
// if (val == 3) {
// await this.$refs.formInfo.onSubmit()
// }
this.step = val this.step = val
}, },
//提交所有表单 //提交所有表单
......
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