Commit ca353abe authored by songrui's avatar songrui

筛查列表

parent cee515a4
import { fetchBase } from './fetch.js' import { fetchBase } from '../fetch.js'
// 证件号查询是否管理慢病档案 // 证件号查询是否管理慢病档案
export function queryResidentInfo(params) { export function queryResidentInfo(params) {
...@@ -14,3 +14,8 @@ export function querScreenList(params) { ...@@ -14,3 +14,8 @@ export function querScreenList(params) {
export function querScreenDetail(params) { export function querScreenDetail(params) {
return fetchBase({ url: `/chronic-resident/v1/chronic-screening-record/record`, body: params, loading: true }) return fetchBase({ url: `/chronic-resident/v1/chronic-screening-record/record`, body: params, loading: true })
} }
// 新增筛查记录
export function savefirstScreen(params) {
return fetchBase({ url: `/chronic-resident/v1/chronic-screening-record/save`, body: params, loading: true })
}
\ No newline at end of file
...@@ -14,4 +14,23 @@ dayjs.locale('cn') ...@@ -14,4 +14,23 @@ dayjs.locale('cn')
export function registe(app) { export function registe(app) {
// 自定义组件 // 自定义组件
app.use(DocIcon) app.use(DocIcon)
app.config.globalProperties.$idCardHide = idCardHide
app.config.globalProperties.$phoneHide = phoneHide
}
// idCard 脱敏
function idCardHide(idCard) {
if (!idCard || idCard.length < 18) {
return idCard
}
return idCard.substring(0, 6) + '******' + idCard.substring(14)
}
// phone 脱敏
function phoneHide(phone) {
if (!phone || phone.length < 11) {
return phone
}
return phone.substring(0, 3) + '******' + phone.substring(9)
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<span>慢病自我初筛详情</span> <span>慢病自我初筛详情</span>
</div> </div>
<div class="py-4 border-bottom"> <div class="py-4 border-bottom">
<div class="px-4 title">居民信息</div> <div class="px-4 doc-title">居民信息</div>
</div> </div>
<div class="px-4 list"> <div class="px-4 list">
<div v-for="item in columnsBase" :key="item.key" <div v-for="item in columnsBase" :key="item.key"
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</div> </div>
<div class="py-4 border-bottom"> <div class="py-4 border-bottom">
<div class="px-4 title">筛查信息</div> <div class="px-4 doc-title">筛查信息</div>
</div> </div>
<div class="px-4 list"> <div class="px-4 list">
<template v-for="item in columnsScreen" :key="item.key"> <template v-for="item in columnsScreen" :key="item.key">
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<script> <script>
import { showNotify } from 'vant' import { showNotify } from 'vant'
import { querScreenDetail } from '@/api/screening.js' import { querScreenDetail } from '@/api/resident/screening.js'
export default { export default {
data() { data() {
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
}) })
}, },
onBack() { onBack() {
this.$router.back()
} }
} }
} }
......
<template> <template>
<div> <div class="h-full">
<div class="p-3 text-16 text-black text-center shrink-0 top-bar">
<!-- <span class="back-bt">
<span @click="onBack">
<doc-icon type="doc-left" />
</span>
</span> -->
<span>慢病筛查记录</span>
</div>
<div class='card' v-for='item in list' :key="item.id">
<div class="p-4">
<div class='text-16 font-semibold mb-2 title'>{{ item.residentName }}</div>
<div class="mb-2">
<span class="label">证件号码</span>
<span>{{ $idCardHide(item.idCard) }}</span>
</div>
<div class="mb-2">
<span class="label">筛查日期</span>
<span>{{ item.screenDate }}</span>
</div>
<div class="mb-2">
<span class="label">筛查机构</span>
<span>{{ item.screenUnitName }}</span>
</div>
<div class="bt-box flex pt-2 justify-end">
<van-button type="primary" size="small"
@click="toDetail(item)">详 情</van-button>
</div>
</div>
<div class="divide"></div>
</div>
</div> </div>
</template> </template>
<script> <script>
import { showNotify } from 'vant' import { showNotify } from 'vant'
import { querScreenList } from '@/api/screening.js' import { querScreenList } from '@/api/resident/screening.js'
export default { export default {
data() {
return {
list: []
}
},
computed: { computed: {
routeQuery() { routeQuery() {
return this.$route.query return this.$route.query
...@@ -26,12 +60,35 @@ export default { ...@@ -26,12 +60,35 @@ export default {
}, },
methods: { methods: {
init() { init() {
querScreenList({ idCard: this.idCard }) querScreenList({ idCard: this.idCard }).then(res => {
this.list = res.data || []
})
},
toDetail(record) {
if (!record) return
const path = `/resident/screening/first/detail/${record.id}`
this.$router.push({ path })
} }
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import url('../../../utils/common.less');
.card {
.label {
display: inline-block;
min-width: 5em;
color: #8C8C8C;
}
.bt-box {
border-top: 1px solid var(--van-border-color);
}
.divide {
border-top: 6px solid #f5f5f5;
}
&:last-child {
.divide { display: none; }
}
}
</style> </style>
<template> <template>
<div class="base-info"> <div class="base-info">
<div class="flex py-4 border-bottom"> <div class="flex py-4 border-bottom">
<div class="px-4 title">居民信息</div> <div class="px-4 doc-title">居民信息</div>
<div class="text-12">请准确填写您的证件信息,标*内容为必填</div> <div class="text-12">请准确填写您的证件信息,标*内容为必填</div>
</div> </div>
<van-form label-width="5em" ref="form" class="screen-form" <van-form label-width="5em" ref="form" class="screen-form"
...@@ -285,9 +285,9 @@ export default { ...@@ -285,9 +285,9 @@ export default {
this.form.dataBirth = info.dataBirth this.form.dataBirth = info.dataBirth
}, },
submit() { submit() {
this.recordForm.base = {...this.form} // this.recordForm.base = {...this.form}
this.$parent.onNext() // this.$parent.onNext()
return // return
this.$refs.form.validate().then(() => { this.$refs.form.validate().then(() => {
this.recordForm.base = {...this.form} this.recordForm.base = {...this.form}
this.$parent.onNext() this.$parent.onNext()
......
<template> <template>
<div class="h-full flex flex-col id-check"> <div class="h-full flex flex-col id-check">
<div class="flex items-end py-4 border-bottom"> <div class="flex items-end py-4 border-bottom">
<div class="px-4 font-semibold title">居民证件信息</div> <div class="px-4 font-semibold doc-title">居民证件信息</div>
<div class="text-12">请准确填写您的证件信息,标*内容为必填</div> <div class="text-12">请准确填写您的证件信息,标*内容为必填</div>
</div> </div>
<van-form label-width="5em" ref="form" <van-form label-width="5em" ref="form"
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<script> <script>
import { useStore } from '@/resident/store/index.js' import { useStore } from '@/resident/store/index.js'
import { idCardRule } from '@/utils/commonReg.js' import { idCardRule } from '@/utils/commonReg.js'
import { queryResidentInfo } from '@/api/screening.js' import { queryResidentInfo } from '@/api/resident/screening.js'
import { showNotify } from 'vant' import { showNotify } from 'vant'
export default { export default {
......
...@@ -69,7 +69,9 @@ export default { ...@@ -69,7 +69,9 @@ export default {
created() { created() {
if (!this.doctorId) { if (!this.doctorId) {
showNotify({ type: 'warning', message: '未获取到医生信息', duration: 0 }) showNotify({ type: 'warning', message: '未获取到医生信息', duration: 0 })
return
} }
this.recordForm.doctorId = this.doctorId
}, },
methods: { methods: {
onNext(step) { onNext(step) {
......
...@@ -46,11 +46,19 @@ export default { ...@@ -46,11 +46,19 @@ export default {
const highItem = this.screenInfo.highItem const highItem = this.screenInfo.highItem
return highItem && highItem.length ? return highItem && highItem.length ?
this.store.getDict('CP00113').filter(e => highItem.includes(e.value)).map(e => e.name) : [] this.store.getDict('CP00113').filter(e => highItem.includes(e.value)).map(e => e.name) : []
},
baseInfo() {
return this.recordForm.base || {}
} }
}, },
methods:{ methods:{
toRecord() { toRecord() {
this.$router.replace({
path: '/resident/screening/first/detail',
query: {
idCard: this.baseInfo.idCard
}
})
} }
} }
} }
......
<template> <template>
<div class="screen-info"> <div class="screen-info">
<div class="flex items-end py-4 border-bottom"> <div class="flex items-end py-4 border-bottom">
<div class="px-4 font-semibold title">筛查信息</div> <div class="px-4 font-semibold doc-title">筛查信息</div>
<div class="text-12">请根据您身体实际情况填写以下内容</div> <div class="text-12">请根据您身体实际情况填写以下内容</div>
</div> </div>
...@@ -322,7 +322,8 @@ ...@@ -322,7 +322,8 @@
<script> <script>
import { useStore } from '@/resident/store/index.js' import { useStore } from '@/resident/store/index.js'
import { checkboxReject } from '@/utils/common.js' import { checkboxReject, fetchDataHandle } from '@/utils/common.js'
import { savefirstScreen } from '@/api/resident/screening.js'
import dayjs from 'dayjs' import dayjs from 'dayjs'
const defaultForm = (info = {}) => { const defaultForm = (info = {}) => {
...@@ -446,8 +447,19 @@ export default { ...@@ -446,8 +447,19 @@ export default {
this.resultHandle() this.resultHandle()
this.recordForm.screen = {...this.form} this.recordForm.screen = {...this.form}
console.log(this.form) console.log(this.form)
const query = {
...this.form,
screenDoctorId: this.recordForm.doctorId,
residentsRecord: this.recordForm.base
}
// 提交表单 // 提交表单
savefirstScreen(fetchDataHandle(query, {
familyHistory: 'arrToStr',
highItem: 'arrToStr',
medicalHistory: 'arrToStr',
})).then(() => {
this.$parent.onNext() this.$parent.onNext()
})
}).catch(err => console.warn(err)) }).catch(err => console.warn(err))
}, },
onPrev() { onPrev() {
......
.title { .doc-title {
font-weight: 600; font-weight: 600;
display: flex; display: flex;
align-items: center; align-items: center;
......
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