Commit dbe549f8 authored by gengchunlei's avatar gengchunlei

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

parents ef3e2411 2a5b3437
<template>
<div class="flex flex-wrap check-btn">
<div class="check-btn">
<div v-for="item in options" :key="item[fieldNames.value]"
@click="onClick(item)"
:class="['py-2 px-3 shrink-0 check-btn-item',
......@@ -103,6 +103,8 @@ export default {
<style lang="less" scoped>
.check-btn {
display: flex;
flex-wrap: wrap;
row-gap: 10px;
column-gap: 10px;
.check-btn-item {
......@@ -145,7 +147,14 @@ export default {
color: var(--van-primary-color);
}
}
// 圆角
.check-btn[round] {
.check-btn-item {
border-radius: 30px;
}
}
// 每行排列个数
.check-btn[column-3] {
.check-btn-item {
width: calc(33.3% - 6.6px);
......
<template>
<div class="instpect-common">
<van-form ref='form' class="instpect-common" >
<div class='doc-form-label' required>检验项目</div>
<van-field is-link
:modelValue='inspectName'
......@@ -97,7 +97,7 @@
:dict="selectOption.dict"
@change="onSelectInputConfirm"></InputSelect>
</div>
</div>
</van-form>
</template>
<script>
......@@ -183,6 +183,22 @@ export default {
console.log(this.viewData)
})
},
submit() {
return new Promise((resolve, reject) => {
this.$refs.form.validate().then(() => {
const inspect = this.inspect.join(',')
const image = this.image
let data = []
this.viewData.forEach(e => {
data = data.concat(e.items)
})
console.log(data, inspect, image)
resolve({ inspect, data, image })
}).catch((e) => {
reject(e)
})
})
},
inspectConfirm() {
this.inspectName = this.store.getDict('CP00100').map(e => {
return this.inspect.includes(e.value) ? e.name : ''
......
......@@ -12,18 +12,24 @@
@click="showMedical = true"
/>
<van-popup v-model:show="showMedical" position="bottom">
<div class="pt-4 popup-checkbox">
<div class="pt-4 pb-4 popup-checkbox">
<div class="flex justify-between pb-2">
<button class="van-picker__cancel van-haptics-feedback" @click="showMedical = false">取消</button>
<span class="text-16" >既往史(可多选)</span>
<button class="van-picker__confirm van-haptics-feedback" @click="medicalConfirm">确认</button>
</div>
<div class="bottom-small-line"></div>
<van-checkbox-group v-model="form.medicalHistory" class="px-4 pb-4 pt-2">
<!-- <van-checkbox-group v-model="form.medicalHistory" class="px-4 pb-4 pt-2">
<van-checkbox v-for="(item, index) in store.getDict('CP00118')" :key="index"
@click="medicalChange"
:name="item.value"
class="mb-3">{{ item.name }}</van-checkbox>
</van-checkbox-group>
</van-checkbox-group> -->
<CheckBtn v-model:value="form.medicalHistory"
:options="medicalHistoryArray"
multiple round column-1
class="py-3 px-4"
@change="medicalChange" />
</div>
</van-popup>
......@@ -40,17 +46,24 @@
@click="showFamily = true"
/>
<van-popup v-model:show="showFamily" position="bottom">
<div class="pt-4 popup-checkbox">
<div class="flex justify-between">
<div class="pt-4 pb-4 popup-checkbox">
<div class="flex justify-between pb-2">
<button class="van-picker__cancel van-haptics-feedback" @click="showFamily = false">取消</button>
<span class="text-16" >家族史(可多选)</span>
<button class="van-picker__confirm van-haptics-feedback" @click="familyConfirm">确认</button>
</div>
<van-checkbox-group v-model="form.familyHistory" class="p-4">
<div class="bottom-small-line"></div>
<!-- <van-checkbox-group v-model="form.familyHistory" class="p-4">
<van-checkbox v-for="(item, index) in store.getDict('CP00167').filter(e => e.value != 7)" :key="index"
@click="familyChange"
:name="item.value"
class="mb-3">{{ item.name }}</van-checkbox>
</van-checkbox-group>
</van-checkbox-group> -->
<CheckBtn v-model:value="form.familyHistory"
:options="familyHistoryArray"
multiple round column-1
class="py-3 px-4"
@change="familyChange" />
</div>
</van-popup>
......@@ -340,6 +353,7 @@ import { useStore } from '@/doctor/store'
import { checkboxReject, fetchDataHandle } from '@/utils/common.js'
import dayjs from 'dayjs'
import DoctorInfo from './DoctorInfo.vue'
import CheckBtn from '@/doctor/components/checkBtn/CheckBtn.vue'
import { BloodPressurePanel, BloodPressureBt } from '@/doctor/components/bloodPressure/index.js'
const defaultForm = (info = {}) => {
......@@ -397,6 +411,7 @@ const defaultForm = (info = {}) => {
}
export default {
components: {
CheckBtn,
DoctorInfo,
BloodPressurePanel,
BloodPressureBt
......@@ -451,6 +466,30 @@ export default {
bmi() {
const { height, weight } = this.form
return height && weight ? (weight / (height / 100 * height / 100)).toFixed(2) : undefined
},
// 既往史
medicalHistoryArray() {
const result = []
this.store.getDict('CP00118').forEach(e => {
if (e.value == 9) {
result.unshift(e)
return
}
result.push(e)
})
return result
},
// 家族史
familyHistoryArray() {
const result = []
this.store.getDict('CP00167').forEach(e => {
if (e.value == 9) {
result.unshift(e)
return
}
result.push(e)
})
return result
}
},
methods: {
......@@ -471,7 +510,7 @@ export default {
}).filter(e => e).join('、')
this.showMedical = false
},
medicalChange(e) {
medicalChange(val) {
this.form.medicalHistory = checkboxReject(this.form.medicalHistory, [9])
},
// 家族史
......
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