Commit 2a17ae1d authored by songrui's avatar songrui

筛查 表单修改

parent 36543182
...@@ -36,6 +36,7 @@ body { ...@@ -36,6 +36,7 @@ body {
.screen-form { .screen-form {
input::placeholder { input::placeholder {
color: #999999; color: #999999;
opacity: 1;
} }
.van-cell:after { .van-cell:after {
transform: scaleY(1); transform: scaleY(1);
......
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
if (!token) { if (!token) {
token = sessionStorage.getItem('token') token = sessionStorage.getItem('token')
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {
token = '0e5b7b8b-f6b0-4232-90ff-a674159c4fff' token = '42a5a452-5b42-478f-93f8-0b5198686791'
} }
} }
if (token) { if (token) {
......
...@@ -24,8 +24,9 @@ export default { ...@@ -24,8 +24,9 @@ export default {
'32': '肾', '32': '肾',
'64': '脂' '64': '脂'
} }
// const colors = ['red', 'orange', 'paleYellow', 'blue', 'cyan', 'pink', 'paleGreen']
typeof list === 'string' && (list = list.split(',')) typeof list === 'string' && (list = list.split(','))
return list.map(e => { return list.map((e, i) => {
if (!map[e]) return if (!map[e]) return
return { return {
name: map[e], name: map[e],
...@@ -86,4 +87,40 @@ export default { ...@@ -86,4 +87,40 @@ export default {
background-color: #E6F9FF; background-color: #E6F9FF;
color: #4D86DA; color: #4D86DA;
} }
.tag-red {
.common-tag();
background-color: #FFF1F0;
color: #F5222D;
}
.tag-orange {
.common-tag();
background-color: #FFFBE6;
color: #FA8C16;
}
.tag-cyan {
.common-tag();
color: #13C2C2;
background-color: #E6FFFB;
}
.tag-blue {
.common-tag();
color: #2F54EB;
background-color: #F0F5FF;
}
.tag-pink {
.common-tag();
color: #F61E54;
background-color: #FFE5F1;
}
.tag-paleGreen {
.common-tag();
color: #A0D911;
background-color: #FCFFE6;
}
.tag-paleYellow {
.common-tag();
background-color: #FEFFE6;
color: #D4B106;
}
</style> </style>
...@@ -108,6 +108,7 @@ export default { ...@@ -108,6 +108,7 @@ export default {
.detail-left { .detail-left {
width: 8em; width: 8em;
color: #8C8C8C; color: #8C8C8C;
flex-shrink: 0;
} }
.detail-bt { .detail-bt {
color: #607FF0; color: #607FF0;
......
...@@ -234,6 +234,7 @@ export default { ...@@ -234,6 +234,7 @@ export default {
.detail-left { .detail-left {
width: 8em; width: 8em;
color: #8C8C8C; color: #8C8C8C;
flex-shrink: 0;
} }
.card-bt { .card-bt {
font-size: 14px; font-size: 14px;
......
...@@ -18,13 +18,11 @@ ...@@ -18,13 +18,11 @@
</van-field> </van-field>
<van-field required <van-field required
v-model="form.genderName" v-model="form.genderName"
is-link
readonly readonly
name="gender" name="gender"
label="性别" label="性别"
placeholder="请选择" placeholder="请选择"
:rules="rules.gender" :rules="rules.gender"/>
@click="showGender = true"/>
<van-popup v-model:show="showGender" position="bottom"> <van-popup v-model:show="showGender" position="bottom">
<van-picker <van-picker
:columns-field-names="{ text: 'name', value: 'value' }" :columns-field-names="{ text: 'name', value: 'value' }"
...@@ -43,7 +41,10 @@ ...@@ -43,7 +41,10 @@
@click="showBirth = true" @click="showBirth = true"
/> />
<van-popup v-model:show="showBirth" position="bottom"> <van-popup v-model:show="showBirth" position="bottom">
<van-date-picker @confirm="dataBirthConfirm" @cancel="showBirth = false" /> <van-date-picker v-model="form._dataBirth"
:min-date="birthRange.min"
:max-date="birthRange.max"
@confirm="dataBirthConfirm" @cancel="showBirth = false" />
</van-popup> </van-popup>
<van-field v-model="form.currentAge" <van-field v-model="form.currentAge"
...@@ -98,7 +99,8 @@ ...@@ -98,7 +99,8 @@
@click="showPresent = true" @click="showPresent = true"
> >
<template #input> <template #input>
<span class="text-end">{{ form.presentCodeName }}</span> <span class="text-end" v-if="form.presentCodeName">{{ form.presentCodeName }}</span>
<span class="text-end" style="color: #999999" v-else>请选择</span>
</template> </template>
</van-field> </van-field>
<van-popup v-model:show="showPresent" :close-on-click-overlay="false" position="bottom" <van-popup v-model:show="showPresent" :close-on-click-overlay="false" position="bottom"
...@@ -132,7 +134,8 @@ ...@@ -132,7 +134,8 @@
@click="showRegistered = true" @click="showRegistered = true"
> >
<template #input> <template #input>
<span class="text-end">{{ form.registeredCodeName }}</span> <span class="text-end" v-if="form.registeredCodeName">{{ form.registeredCodeName }}</span>
<span class="text-end" style="color: #999999" v-else>请选择</span>
</template> </template>
</van-field> </van-field>
<van-popup v-model:show="showRegistered" :close-on-click-overlay="false" position="bottom" <van-popup v-model:show="showRegistered" :close-on-click-overlay="false" position="bottom"
...@@ -164,6 +167,7 @@ import { useStore } from '@/resident/store/index.js' ...@@ -164,6 +167,7 @@ import { useStore } from '@/resident/store/index.js'
import { getInfoByIdCard, fetchDataHandle, addToArr } from '@/utils/common.js' import { getInfoByIdCard, fetchDataHandle, addToArr } from '@/utils/common.js'
import { mobileValidator, addressValidator } from '@/utils/commonReg.js' import { mobileValidator, addressValidator } from '@/utils/commonReg.js'
import DocAddress from '@/components/docAddress/DocAddress.vue' import DocAddress from '@/components/docAddress/DocAddress.vue'
import dayjs from 'dayjs'
const defaultForm = (info = {}) => { const defaultForm = (info = {}) => {
const form = { const form = {
...@@ -191,6 +195,7 @@ const defaultForm = (info = {}) => { ...@@ -191,6 +195,7 @@ const defaultForm = (info = {}) => {
createdUserName: undefined, createdUserName: undefined,
// 出生日期 // 出生日期
dataBirth: undefined, dataBirth: undefined,
_dataBirth: undefined,
// 职业,[DC00010] // 职业,[DC00010]
duty: undefined, duty: undefined,
// 文化程度(学历),[DC00007] // 文化程度(学历),[DC00007]
...@@ -273,7 +278,11 @@ export default { ...@@ -273,7 +278,11 @@ export default {
showPresent: false, showPresent: false,
// 户籍地址 // 户籍地址
showRegistered: false, showRegistered: false,
store: useStore() store: useStore(),
birthRange: {
start: undefined,
end: undefined
}
} }
}, },
computed: { computed: {
...@@ -282,10 +291,14 @@ export default { ...@@ -282,10 +291,14 @@ export default {
} }
}, },
created() { created() {
console.log('checkInfo', this.checkInfo)
this.init() this.init()
}, },
methods: { methods: {
init() { init() {
const date = dayjs()
this.birthRange.max = new Date(date.year(), date.month(), date.date())
this.birthRange.min = new Date(date.year() - 120, date.month(), date.date())
if (this.recordForm.base) { if (this.recordForm.base) {
this.form = defaultForm(this.recordForm.base) this.form = defaultForm(this.recordForm.base)
return return
...@@ -301,6 +314,7 @@ export default { ...@@ -301,6 +314,7 @@ export default {
this.form.genderName = this.store.getDictValue('DC00005', this.form.gender) this.form.genderName = this.store.getDictValue('DC00005', this.form.gender)
this.form.currentAge = info.age this.form.currentAge = info.age
this.form.dataBirth = info.dataBirth this.form.dataBirth = info.dataBirth
this.form._dataBirth = info.dataBirth.split('-')
}, },
submit() { submit() {
// this.recordForm.base = {...this.form} // this.recordForm.base = {...this.form}
......
...@@ -78,6 +78,7 @@ export default { ...@@ -78,6 +78,7 @@ export default {
onNext(step) { onNext(step) {
if (this.step === 1) { if (this.step === 1) {
this.recordForm = {} this.recordForm = {}
this.checkInfo = {}
} }
this.step = step ? step : this.step + 1 this.step = step ? step : this.step + 1
this.setpHistory.push(this.step) this.setpHistory.push(this.step)
......
...@@ -128,7 +128,20 @@ ...@@ -128,7 +128,20 @@
label="家族史" label="家族史"
placeholder="请选择" placeholder="请选择"
:rules="rules.familyHistory" :rules="rules.familyHistory"
@click="showFamily = true"/> @click="showFamily = true">
<template #input>
<div class="pb-3">
<!-- <span class="text-end" v-if="form.familyHistoryName">{{ form.familyHistoryName }}</span>
<span class="text-end" style="color: #999999" v-else>请选择</span> -->
<van-field v-model="form.familyHistoryName"
placeholder="请选择"
readonly
style="padding: 0;background: transparent;"
/>
</div>
<div class="tip">若一级家属(如父母)有家族病史,则请选择</div>
</template>
</van-field>
<van-popup v-model:show="showFamily" position="bottom"> <van-popup v-model:show="showFamily" position="bottom">
<div class="pt-4 popup-checkbox"> <div class="pt-4 popup-checkbox">
<div class="flex justify-between"> <div class="flex justify-between">
......
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